Is this a bug: variables() gives duplicate variables

When I try to get a list of declared variables in a method, using variables() from class Method, I sometimes get two variables with the same name, although there is one declared. Is this a known bug?
Example:
the following method gives two local variables, both named mx.
int computeMaximum(int a, int b) {                                          
int mx;
if (a >= b){
mx = a;
}else{
mx = b;
return mx;
Thanks for your thoughts,
Keeds

I'm guessing this is probably not a bug. The method variables() will return multiple instances of the same variable if it is declared in multiple scopes within the function. I'm not sure exactly why 'mx' is counted in two scopes in the given code, but I assume it has to do with how java compiles the if-statement.
From the java documentation:
List<LocalVariable> variables() throws AbsentInformationException
    Returns a list containing each LocalVariable declared in this method.
The list includes any variable declared in any scope within the method.
It may contain multiple variables of the same name declared within
disjoint scopes. Arguments are considered local variables and will be
present in the returned list.

Similar Messages

  • I can't give my variable to the get method

    Hello togheter
    At the moment I work with JDOM. It is possible to get access to an XML File with JDOM, but I want to pass the String I get, to another Method in a different class. My problem is, that my getMethod doesn't get the variable. The variable is always "null". What is the problem, please help me.
    I will also give you my code:
    Here is the code for class 1, I take the String from this class. See the arrow
    package FahrplanXML;
    import java.io.File;
    import java.io.IOException;
    import javax.swing.JFileChooser;
    import javax.swing.filechooser.FileFilter;
    import org.jdom.Attribute;
    import org.jdom.Document;
    import org.jdom.Element;
    import org.jdom.JDOMException;
    import org.jdom.input.SAXBuilder;
    import org.xml.sax.InputSource;
    public class FileAuswahl {
       private File filenames;
       private String scheduledtdversion;
       public void ablauf() throws JDOMException, IOException {
          FileAuswaehlen();
          saxwer();
          grundoberflaeche xmloberflaeche = new grundoberflaeche();
          xmloberflaeche.grundoberflaechen();
       public void FileAuswaehlen() {
       JFileChooser datei = new JFileChooser();
       datei.setFileFilter(new FileFilter()
                @Override public boolean accept (File f)
                   return f.isDirectory() ||
                   f.getName().toLowerCase().endsWith(".xml");
                @Override public String getDescription()
                   return "XML-Files";
       int state = datei.showOpenDialog(null);
       if (state == JFileChooser.APPROVE_OPTION )
          filenames = datei.getSelectedFile();
          System.out.println (filenames);
          if (filenames != null)
                   try {
                      System.out.print(filenames);
                      saxwer();
                   } catch (JDOMException e) {
                      // TODO Auto-generated catch block
                      e.printStackTrace();
                   } catch (IOException e) {
                      // TODO Auto-generated catch block
                      e.printStackTrace();
          else
             System.out.println("Kein File ausgew�hlt");
       else
       System.out.println("Auswahl abgebrochen");
       System.exit(0);
       //Ausgew�hlter Dateiname an saxwer �bergeben
       public File getNames() {
          System.out.println (filenames);
          return this.filenames;
       public void saxwer() throws JDOMException, IOException {
          //FileAuswahl filename = new FileAuswahl();
          File files = getNames();
          System.out.println (files);
             SAXBuilder builder = new SAXBuilder();
             Document doc = builder.build(files);
             Element schedulemessage = doc.getRootElement();
             //Root Element auslesen
             String sch_msg_dtdversion = schedulemessage.getAttributeValue ("DtdVersion");  // <---
             scheduledtdversion = sch_msg_dtdversion;
             new grundoberflaeche().grundoberflaechen();
             public String getDtdVersion() {
                System.out.println (scheduledtdversion);
                return this.scheduledtdversion;
       } Now, you will see the class in which I pass the String. See also arrow...
    package FahrplanXML;
    import java.awt.Component;
    import java.awt.Container;
    import java.awt.GridBagConstraints;
    import java.awt.GridBagLayout;
    import java.awt.event.ActionEvent;
    import java.awt.event.ActionListener;
    import java.io.IOException;
    import javax.swing.JButton;
    import javax.swing.JFrame;
    import javax.swing.JLabel;
    import javax.swing.JTextField;
    import javax.swing.text.Caret;
    import org.jdom.Attribute;
    import org.jdom.JDOMException;
    public class grundoberflaeche {
    //      Layout f�r Laender vorbereiten
          static void addComponent (Container cont,
                GridBagLayout diversemoegl,
                Component laenderdetails,
                int x, int y,
                int width, int height,
                double weightx, double weighty )
                GridBagConstraints grundoberflaechen = new GridBagConstraints();
                grundoberflaechen.fill = GridBagConstraints.BOTH;
                grundoberflaechen.gridx = x; grundoberflaechen.gridy = y;
                grundoberflaechen.gridwidth = width; grundoberflaechen.gridheight = height;
                grundoberflaechen.weightx = weightx; grundoberflaechen.weighty = weighty;
                diversemoegl.setConstraints(laenderdetails, grundoberflaechen);
                cont.add(laenderdetails);
          //Ausw�hlen des XML Files
          public void XMLAuswaehlen() {
             JFrame xmlauswahl = new JFrame("Fahrplan ausw�hlen");
             xmlauswahl.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
             Container laenderdetails = xmlauswahl.getContentPane();
             GridBagLayout diversemoegl = new GridBagLayout();
             laenderdetails.setLayout(diversemoegl);
             JButton dateiauswahl = new JButton ("Datei ausw�hlen");
             addComponent(laenderdetails,diversemoegl,dateiauswahl,1,1,1,1,1,1);
             ActionListener ersterdateiauswaehler = new ActionListener()
                public void actionPerformed( ActionEvent e)
                      try {
                         new FileAuswahl().ablauf();
                      } catch (JDOMException e1) {
                         // TODO Auto-generated catch block
                         e1.printStackTrace();
                      } catch (IOException e1) {
                         // TODO Auto-generated catch block
                         e1.printStackTrace();
             dateiauswahl.addActionListener(ersterdateiauswaehler);
             xmlauswahl.setSize(150,70);
             xmlauswahl.setVisible(true);
          //Layout machen
          public void grundoberflaechen() {
             JFrame fahrplan = new JFrame("Fahrplanauswahldetails");
             fahrplan.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
             Container laenderdetails = fahrplan.getContentPane();
             GridBagLayout diversemoegl = new GridBagLayout();
             laenderdetails.setLayout(diversemoegl);
             //Klassenobjekt aufbauen
             FileAuswahl fileauswahl = new FileAuswahl();
             // Labelsbauen und einbauen in den Fahrpl�nen
             String dtdversion = fileauswahl.getDtdVersion();   // <---
             System.out.println(dtdversion);
             JTextField DtdVersion = new JTextField(1);
             DtdVersion.setText(dtdversion);
             JTextField fahrplanzeit = new JTextField(1);
             fahrplanzeit.setText("123");
             JTextField fahrplanzeita = new JTextField(1);
             fahrplanzeita.setText("piips");
             //JButton oesterreich = new JButton("�sterreich");
             //JButton italien = new JButton("Italien");
             //JButton frankreich = new JButton("Frankreich");
             //JButton spanien = new JButton("Spanien");
             addComponent(laenderdetails,diversemoegl,new JLabel("Fahrplandetails"),0,0,1,1,0,0);
             addComponent(laenderdetails,diversemoegl,DtdVersion,1,0,1,1,0,0);
             addComponent(laenderdetails,diversemoegl,fahrplanzeit,2,0,1,1,0,0);
             addComponent(laenderdetails,diversemoegl,fahrplanzeita,3,0,1,1,0,0);
             //         Action Listener f�r Dateiauswahl
             //         Action Listener f�r das Speichern der Datei
             //addComponent(laenderdetails,diversemoegl,frankreich,2,1,1,1,0,0);
             //addComponent(laenderdetails,diversemoegl,spanien,3,1,1,1,0,0);
             fahrplan.setSize(600,750);
             fahrplan.setVisible(true);
    }Thank you very much for your help....
    Your Java Learner

    Reposted here, rather than bumping up this topic:
    http://forum.java.sun.com/thread.jspa?threadID=736492

  • Help for this error  user.avf(44): Unbound variable 'w32rsf80'

    hi
    when i install devloper 6 then show me this error
    user.avf(44): Unbound variable 'w32rsf80'
    at stage three when give the installation location
    thanking you

    Hi,
    This error appears when trying to install from a shared area that uses the universal naming convention (UNC) format, e.g. \\machine2\dev60.
    The Oracle installer does not support UNC formats, therefore your share or staging area must be mapped to a drive letter.
    Nicolas.

  • I am getting this error message "ORA-01006: bind variable does not exist.

    My code works fine like this:
    DECLARE
    v_JOBTYPE varchar2(8);
    v_STATUS varchar2(8);
    v_FAILURE varchar2(8);
    v_CAUSE varchar2(8);
    v_ACTION varchar2(8);
    BEGIN
    SELECT EVT_STATUS, EVT_FAILURE, EVT_CAUSE, EVT_ACTION, EVT_JOBTYPE
    INTO v_STATUS, v_FAILURE, v_CAUSE, v_ACTION, v_JOBTYPE
    FROM R5EVENTS WHERE ROWID = :ROWID;
    IF NVL(v_STATUS, 'X') = 'C' AND NVL(v_JOBTYPE , 'X') IN ('BRKD','UNPLBRKD','FILTRA', 'LUB', 'FAC') AND (v_FAILURE IS NULL OR v_CAUSE IS NULL OR v_ACTION IS NULL) THEN
    RAISE_APPLICATION_ERROR( -20001, 'FAILURE, CAUSE AND ACTION FIELDS MUST BE POPULATED');
    END IF;
    END;
    But I want to change the code to include a record (ACT_TRADE) from another table(R5ACTIVITIES). I am getting this error message "ORA-01006: bind variable does not exist - POST-UPDATE 200Before Binding". Any help would be appreciated.
    DECLARE
    v_STATUS varchar2(8);
    v_FAILURE varchar2(8);
    v_CAUSE varchar2(8);
    v_ACTION varchar2(8);
    V_CODE varchar2(8);
    V_EVENT varchar2(8);
    V_TRADE varchar2(8);
    BEGIN
    SELECT R5EVENTS.EVT_STATUS, R5EVENTS.EVT_FAILURE, R5EVENTS.EVT_CAUSE, R5EVENTS.EVT_ACTION, R5EVENTS.EVT_CODE, R5ACTIVITIES.ACT_EVENT, R5ACTIVITIES.ACT_TRADE
    INTO v_STATUS, v_FAILURE, v_CAUSE, v_ACTION, V_CODE, V_EVENT, V_TRADE
    FROM R5EVENTS, R5ACTIVITIES WHERE V_CODE = :V_EVENT;
    IF NVL(v_STATUS, 'X') = 'C' AND NVL(v_TRADE , 'X') IN ('MTM','MTL','MTMGT', 'FTM', 'FTL', 'FTMGT', 'R5') AND (v_FAILURE IS NULL OR v_CAUSE IS NULL OR v_ACTION IS NULL) THEN
    RAISE_APPLICATION_ERROR( -20001, 'FAILURE, CAUSE AND ACTION FIELDS MUST BE POPULATED');
    END IF;
    END;

    Thank you for your responses. Your feedback was helpful. This is what I ended up doing for a solution:
    DECLARE
    v_JOBTYPE varchar2(8);
    v_STATUS varchar2(8);
    v_FAILURE varchar2(8);
    v_CAUSE varchar2(8);
    v_ACTION varchar2(8);
    v_GROUP varchar2(30);
    BEGIN
    SELECT EVT_STATUS, EVT_FAILURE, EVT_CAUSE, EVT_ACTION, EVT_JOBTYPE, USR_GROUP
    INTO v_STATUS, v_FAILURE, v_CAUSE, v_ACTION, v_JOBTYPE, v_GROUP
    FROM R5EVENTS, R5USERS WHERE R5EVENTS.ROWID = :ROWID
    AND USR_CODE = O7SESS.CUR_USER;
    IF NVL(v_STATUS, 'X') = 'C' AND NVL(V_GROUP,'X') IN ('MTM','MTL','MTMGT','FTL','FTMGTS','PLANNER','DISPATCH','PMCOOR','R5') AND (v_FAILURE IS NULL OR v_CAUSE IS NULL OR v_ACTION IS NULL) THEN
    RAISE_APPLICATION_ERROR( -20001, 'FAILURE, CAUSE AND ACTION FIELDS MUST BE POPULATED');
    END IF;
    END;

  • When reading my book on iBooks, I encounter duplicate pages for many pages then it skips the pages that should be there so I am missing large parts to chapters, is this a "bug" in the book or app? How can this be fixed?

    When reading my book on iBooks, I encounter duplicate pages for many pages then it skips the pages that should be there so I am missing large parts to chapters, is this a "bug" in the book or app? How can this be fixed?

    Does the same thing happen on any other books that you have in the app ? If not then it's probably just that one book, in which can you could try deleting the book and re-downloading it - if it re-downloads in the same state then try the 'report a problem' from your purchase history :http://support.apple.com/kb/HT1933

  • Duplicate variable 'altova:table' definition

    I have a little class that I wrote to apply a XSLT file to a XML using Oracle XML Parser.
    Here is the code:
    XSLProcessor processor = new XSLProcessor();
    String sInputXSL = "d:/xsl.xsl";
    String sInputXML = "d:/xml.xml";
    File fXSL = new File(sInputXSL);
    URI uri = fXSL.toURI();
    URL url = uri.toURL();
    XSLStylesheet stylesheet = processor.newXSLStylesheet(url); (*)
    When I execute it, I get the following error on the line (*)
    XML-22050: (Error) Duplicate variable 'altova:table' definition.
    XML-22050: (Error) Duplicate variable 'altova:table' definition.
    XML-22050: (Error) Duplicate variable 'altova:table' definition.
    oracle.xml.xslt.XSLException: XML-22050: (Error) Duplicate variable 'altova:table' definition.
    at oracle.xml.xslt.XSLStylesheet.flushErrors(XSLStylesheet.java:1848)
    The XSL file is a XSL file that was generated by Altova Stylevision.
    I opened the XSL to watch is content and there is in dead several declarations of altova:table variable:
         <xsl:variable name="altova:table">:
    The XSLT is valid because when I execute the transformation with java.xml.Transformer class it works.
    What can I do to solve the problem?

    Please don't cross-post your questions.

  • Expanding video to full screen mode gives full white screen. Is this a bug? It works fine in IE.

    Expanding video to full screen mode gives unwanted full "white" screen. Is this a bug? It works fine in IE.
    == This happened ==
    Every time Firefox opened

    Same thing happens to me. As far as I can tell, it just started a few days ago. I have made no changes of which I am aware. Today, I disabled Java Development toolkit add-ons. (One was already disabled, but one was still active.) I have only one version of shockwave flash running as a Firefox add-on. Having more than one version running is a known issue with Firefox. Reluctantly, I have just made IE my default browser, after several years as a devout Firefox fan. Pretty frustrating.

  • Trying to move a list of form variables to session variables of the same name

    I am trying to move a list of form variables to session variables of the same name and I am having a lot of trouble.
    I have never had to post of this forum with a language question in all the 10 years I have been using ColdFusion. I was a qa Engineer @ Allaire/Macromedia back when it was going from one to the other. I have a pretty good grasp of the language.
    I have software that runs off a list. The fieldnames are variable and stored off in an array. It's survey software that runs off a "meta file". In this example; I have the number of fields in the survey set to 12 in the "metafile". I have each field declared in that file in array Session.SurveyField[1] and the above loop works fine. I include this "metafile" at the start of the process.
    I cfloop around a struct and it works wherever I have needed to use it; such as here - writing to the database for example;
    <CFQUERY NAME="InsertRec" DATASOURCE="Survey">
    INSERT into #variables.SurveyTableName#
    (EntryTime
    <cfloop from="1" to="#Session.NumberOfSurveyFields#" index="arrayindex">
    ,#Session.SurveyField[arrayindex]#
    </cfloop>
    <!--- EXAMPLE OF WHAT THE ABOVE GENERATES
    ,q01_name,q02_AcadTechORNA,q03_Water,q04_FirstAid,q05_CPR,q06_LifeGuard,q07_AED
    ,q08_ProjAdv,q09_Color,q10_SantaClaus,q11_Supervisor,q12_SupervisorOpinion --->
       VALUES
        ('#EntryTime#'
    <cfloop from="1" to="#Session.NumberOfSurveyFields#" index="arrayindex">
    <cfset thisname = "Session." & Session.SurveyField[arrayindex]>
    ,'#evaluate(variables.thisname)#'
    </cfloop>
    <!--- EXAMPLE OF WHAT THE ABOVE GENERATES
    ,'#Session.q01_name#','#Session.q02_AcadTechORNA#','#Session.q03_Water#','#Session.q04_Fi rstAid#'
    ,'#Session.q05_CPR#','#Session.q06_LifeGuard#','#Session.q07_AED#','#Session.q08_ProjAdv# ',
    ,'#Session.q09_Color#','#Session.q10_SantaClaus#','#Session.q11_Supervisor#','#Session.q1 2_SupervisorOpinion#' --->
    </CFQUERY>
    NOW HERE'S THE PROBLEM: I am running into trouble when trying to move the form variables to session variables of the same name. It is the only part of the software that I still need the datanames hard coded and that is a roadblock for me.
    <cfloop from="1" to="#Session.NumberOfSurveyFields#" index="arrayindex">
    <cfset thissessionfield = "Session." & Session.SurveyField[arrayindex]>
    <cfset thisformfield = "Form." & Session.SurveyField[arrayindex]>
    <cfset #thissessionfield# = #evaluate(thisformfield)#>
    </cfloop>
    I have tried it with or without the "evaluate"; same result. It doesn't give an error; it just ignores them (session variables look as such in the next page in the chain)
    q01_name=
    q02_acadtechorna=
    q03_water=
    q04_firstaid=
    q05_cpr=
    q06_lifeguard=
    q07_aed=
    q08_projadv=
    q09_color=
    q10_santaclaus=
    q11_supervisor=
    q12_supervisoropinion=
    Note: they exist because I CFPARAM them in a loop like the above at the start of the procedure) - and this works just fine!
    <cflock scope="Session" type="EXCLUSIVE" timeout="30">
    <cfloop from="1" to="#Session.NumberOfSurveyFields#" index="arrayindex">
    <cfset dataname = "Session." & Session.SurveyField[arrayindex]>
    <cfparam name="#variables.dataname#" default="">
    </cfloop>
    </cflock>
    I EVEN tried exploiting the Form.Fieldnames list using CFLoop over the list and the same sort of logic within and it still gives me nothing....
    Here's the FORM.FIELDNAMES value
    "Q01_NAME,Q02_ACADTECHORNA,Q03_WATER,Q04_FIRSTAID,Q05_CPR,Q06_LIFEGUARD,Q07_AED,Q08_PROJAD V,Q09_COLOR,
    Q10_SANTACLAUS,Q11_SUPERVISOR,Q12_SUPERVISOROPINION"
    Here's the logic; SAME RESULT - The session variables don't get set.
    <cfoutput>
    <cfloop list="#Form.FieldNames#" index="thisfield">
    <!--- <br>#thisfield# --->
    <cfscript>
    thisSESSIONfield = "Session." & thisfield;
    thisFORMfield = "Form." & thisfield;
    #thisSESSIONfield# = #thisFORMfield#;
    </cfscript>
    </cfloop>
    </cfoutput>
    The CFPARAM in a loop with variable output name works just fine; so does the post (which I included above) as does the SQL Create, Param Form Variables, Param Session Variables, etc.
    THIS even works for moving BLANK to each session variable, to zero them all out at the end of the process;
    <cflock scope="Session" type="EXCLUSIVE" timeout="30">
    <cfloop from="1" to="#Session.NumberOfSurveyFields#" index="arrayindex">
    <cfset thislocalfield = Session.SurveyField[arrayindex]>
    <cfscript>
    thissessionfield = "Session." & thislocalfield;
    </cfscript>
    <cfset #thissessionfield# = "">
    </cfloop>
    </cflock>
    Expanding on that code, you would think this would work, but it doesn't;
    <cfloop from="1" to="#Session.NumberOfSurveyFields#" index="arrayindex">
    <cfset thislocalfield = Session.SurveyField[arrayindex]>
    <cfscript>
    thissessionfield = "Session." & thislocalfield;
    thisformfield = "Form." & thislocalfield;
    </cfscript>
    <!--- debug --->
    <!--- <cfoutput>#thissessionfield# = "#evaluate(thisformfield)#"</cfoutput><br> --->
    <cfoutput>
    <cfset #thissessionfield# = "#evaluate(thisformfield)#">
    </cfoutput>
    </cfloop>
    And see that debug code in the middle? To add insult to injury... When I uncomment that it shows me this. So it certainly looks like this should work....
    Session.q01_name = "Me"
    Session.q02_AcadTechORNA = "N/A"
    Session.q03_Water = "Yes (certificate expired)"
    Session.q04_FirstAid = "Yes (certificate is current)"
    Session.q05_CPR = "No"
    Session.q06_LifeGuard = "Yes (certificate expired)"
    Session.q07_AED = "Yes (certificate expired)"
    Session.q08_ProjAdv = "Yes (certificate expired)"
    Session.q09_Color = "Gray"
    Session.q10_SantaClaus = "Yes"
    Session.q11_Supervisor = "Da Boss"
    Session.q12_SupervisorOpinion = "Not a bad thing"
    There must be some simpler way to do this. This way won't work against all odds even though it seems so much like it should.
    So I end up having to hardcode it; still looking for an automated way to set these #@%$*@!## session variables over the list from the form variables of the same @#@!$#%$%# name. Do I sound frustrated???
    No matter what I do, if I don't HARDCODE like this;
    <cfset Session.q01_name = Form.q01_name>
    <cfset Session.q02_AcadTechORNA = Form.q02_AcadTechORNA>
    <cfset Session.q03_Water = Form.q03_Water>
    <cfset Session.q04_FirstAid = Form.q04_FirstAid>
    <cfset Session.q05_CPR = Form.q05_CPR>
    <cfset Session.q06_LifeGuard = Form.q06_LifeGuard>
    <cfset Session.q07_AED = Form.q07_AED>
    <cfset Session.q08_ProjAdv = Form.q08_ProjAdv>
    <cfset Session.q09_Color = Form.q09_Color>
    <cfset Session.q10_SantaClaus = Form.q10_SantaClaus>
    <cfset Session.q11_Supervisor = Form.q11_Supervisor>
    <cfset Session.q12_SupervisorOpinion = Form.q12_SupervisorOpinion>
    I always get this from my next page because the session variables are empty;
    You must answer question 1.
    You must answer question 2.
    You must answer question 3.
    You must answer question 4.
    You must answer question 5.
    You must answer question 6.
    You must answer question 7.
    You must answer question 8.
    You must answer question 9.
    You must answer question 10.
    I tried duplicate as well, but I can not get the above to work...
    Can anyone help me do this thing that one would think is simple????

    I think if you use structure array syntax you should get the results you want.
    <cfloop from="1" to="#Session.NumberOfSurveyFields#" index="arrayindex">
          <cfset session[Session.SurveyField[arrayindex]] = Form[Session.SurveyField[arrayindex]]>
    </cfloop>
    Or probably even easier.
    <cfset session = duplicate(form)>

  • Is this a bug or a simple Newbie mistake?

    Hi.
    I'm brand new to JavaFX, so I'm probably misunderstanding something. I've searched the web looking for information concerning it, but since it involves the 'new' operator, it's hard to filter down.
    Anyhow, here is the problem:
    I'm getting different results when I instantiate an object
    using the 'new' operator vs. the declaring it the more
    accepted JavaFX way.
    This is how I found the "problem".
    In order to learn how to program in JavaFX, I found a simple game from the Internet, "Blasteroids", to look at (http://www.remwebdevelopment.com/dev/a41/Programming-Games-in-JavaFX-Part-1.html). I copied and pasted this into:
    NetBeans IDE 6.9 (Build 201006101454)
    JavaFX 1.3 and got the game to work.
    In playing around with it, I converted instantiating an object from the "normal" way:
        var a: Asteroid = Asteroid
            type: type
            posX: x
            posY: y
            moveAngle: moveAngle
            velocityX: Math.sin(Math.toRadians(moveAngle))
                * randomVelocity
            velocityY: -Math.cos(Math.toRadians(moveAngle))
                * randomVelocity
            rotation_increment: rotation_increment
            active: true;
            return a;To using the "new" operator:
            var a:Asteroid = new Asteroid();
            a.type = type;
            a.posX = x;
            a.posY = y;
            a.moveAngle = moveAngle;
            a.velocityX = Math.sin(Math.toRadians(moveAngle)) * randomVelocity;
            a.velocityY = -Math.cos(Math.toRadians(moveAngle))* randomVelocity;
            a.rotation_increment = rotation_increment;
            a.active = true;
            return a;This is the only changes I made. I would "toggle" back and forth between the two, and I would always get the same results.
    When I did this conversion, the ship would show up, but the asteroids were gone. Actually, I think they were invisible because every once and a while, my ship would "blow up" and get reset to it's starting position. I tried adding:
    a.visible = true;
    But that didn't help.
    Indecently, I did the same thing with defining the "Stage" using a new operator, and got differing results:
    1. the window would open in the bottom right of my screen (vs filling up
    most of my screen. I would have to drag it up to play.
    2. it had a regular windows border with the minimize, maximize, close
    buttons in the top right (vs. a non-movable, border less window with no
    maximize, minimize, close buttons.)
    Is this a bug, or am I doing something wrong?
    Thank you

    I suspect you've run into bugs in the Blasteroids program and possibly in Stage in the JavaFX runtime.
    For simple cases one would think there should be no difference between this:
    var so = SomeObject {
        a: 1
        b: 2
        c: 3
    }and this:
    var so = SomeObject { }; // or var so = new SomeObject();
    so.a = 1;
    so.b = 2;
    so.c = 3;However, these cases do run through different code paths. In the first case, the init-block of SomeObject sees all the values provided by the caller. In the second case, the triggers on the a, b, and c variables would have to modify the internal state of the object appropriately. If the object has a lot of complex state, the result at the end of setting the three variables (and running their triggers) might not be identical to the object literal after initialization. This is most likely a bug. If an object isn't prepared to have its state variables modified after initialization, it should make them public-init instead of public.
    Depending on the object, though, initializing things via an object literal vs. setting variables after initialization might actually have different semantics. This seems to be the case with Stage. The Stage's size is established by its contents at initialization time, and its location at initialization time is determined by using its contents' size and the screen size to center the Stage on the screen. If you create the Stage empty, and then later add contents, the sizing/centering calculations will be based on an empty Stage and will thus give a different result.
    Using the object literal technique is idiomatic JavaFX Script, and it's probably more efficient than setting variables after initialization, so I'd recommend sticking with object literals.

  • Is this a bug in OWB 11.2 - importing table metadata for character columns

    The Oracle® Warehouse Builder Data Modeling, ETL, and Data Quality Guide provides an overview of the data types supported.
    http://docs.oracle.com/cd/E11882_01/owb.112/e10935/orcl_data_objx.htm
    It says that for VARCHAR2 data type it saws (http://docs.oracle.com/cd/E11882_01/owb.112/e10935/orcl_data_objx.htm#CHDFIADI )
    "Stores variable-length character data. How the data is represented internally depends on the database character set. The VARCHAR2 data type takes a required parameter that specifies a maximum size up to 4,000 characters"
    That means , I guess, it says that when I import a table, any columns of type VARCHAR2(10) in the database should have its length show as characters in OWB, so a column of type Varchar2(10) in the Oracle database, should be shown as Varchar2(10) when imported into OWB table metadata via the OWB import function.
    However, if I have a database that set-up as a single-byte and import a table using the OWB import function a column that has a size of e.g. 10 in the database, is imported as OWB table metadata and the size is 10. Correct, I am happy.
    However, if the database is modified to support multi-byte characters, ALTUF16 encoding with the semantics set to "CHAR", then when I import the same table into OWB, OWB reports the size as 40, I guess its 40 bytes as in 10 characters @ 4 bytes per character.
    Is this a bug in OWB, as the datatype in the Oracle DB is varchar2(10), should OWB after importing a table not also report the column as VARCHAR2(10) ? Currently, is shows the column as varchar2(40).

    I noticed that myself in our project.
    Our varchars2 are defined as VARCHAR2(xxx CHAR) - OWB puts the size*4
    In fact if you have special characters like umlauts (ü,ä,ö,...) it will use 4 bytes per character.
    You can try it yourself. Define a Varchar2(1 CHAR) and manually change the size of the Column in your mapping inside OWB (in filters, joins or your target table).
    Then shoot an umlaut through the mapping and will end up with a "too small" error.
    Dont mind the size*4 issue - we totally ignored it and run without error since 4 years now.

  • Replacement Path Variable with Another Variable

    Hi,
    I am currently trying to create a report that would need me to have the same values for different characteristics (e.g. clearing date, posting date, net due date). I have seen that there is a way in the replacement path variable that would replace its value with another variable that is ready for input. I also looked into SAP help but I can't seem to figure out on how to do it specifically. Does anyone know a step-by-step process on how to do this? How does this work?
    Thank you in advance!

    take an e.g.
    u have characteristic say ch1
    u want to restrict it with replacement path variable
    first of all create a variable var1
    click what it is based upon for e.g. 0calday, 0material etc.
    make it user entry variable
    select single or multiple entry
    make it mandatory
    save it and hit okey
    click on ch1
    right click and say restrict
    in new window create a new variable
    give its name and technical name
    processing path is replacement path
    go to next tab of replacement path
    select several ooptions
    replace variable with another variable
    select a variable called var1
    change the offset length and offset start with different parameters.
    hit okey
    this way u have restricted ch1 with replacement path variable var1
    now when u run report u have to enter value of var1
    which will then further feeded to ch1
    this way u can create replacement path variables at lots of instances and then u can always feed the value from var1 at different time
    make sure as this ur requirement is date
    try to use 0calday as reference infoobject all the times....

  • [SOLVED] Is this a bug or just me ?

    Chromium  freezes when I type something on the adress bar.
    [6884:6898:0124/014216:ERROR:object_proxy.cc(608)] Failed to get name owner. Got org.freedesktop.DBus.Error.NameHasNoOwner: Could not get owner of name 'org.freedesktop.NetworkManager': no such name
    [6884:6898:0124/014216:ERROR:object_proxy.cc(513)] Failed to call method: org.freedesktop.DBus.Properties.Get: object_path= /org/freedesktop/NetworkManager: org.freedesktop.systemd1.LoadFailed: Unit dbus-org.freedesktop.NetworkManager.service failed to load: No such file or directory. See system logs and 'systemctl status dbus-org.freedesktop.NetworkManager.service' for details.
    [6884:6906:0124/014216:ERROR:object_proxy.cc(608)] Failed to get name owner. Got org.freedesktop.DBus.Error.NameHasNoOwner: Could not get owner of name 'org.chromium.Mtpd': no such name
    [6884:6906:0124/014216:ERROR:object_proxy.cc(608)] Failed to get name owner. Got org.freedesktop.DBus.Error.NameHasNoOwner: Could not get owner of name 'org.chromium.Mtpd': no such name
    [6884:6884:0124/014216:ERROR:object_proxy.cc(513)] Failed to call method: org.chromium.Mtpd.EnumerateStorage: object_path= /org/chromium/Mtpd: org.freedesktop.DBus.Error.ServiceUnknown: The name org.chromium.Mtpd was not provided by any .service files
    Is anyone facing the same issue ?
    L.E Installing dbus solved the issue.
    Last edited by xfce (2013-01-23 23:58:57)

    I would still consider this a bug  --  if the CAS doesn't like it then it can reject the formula like it does elsewhere in the calculator  eg...
    in Home  (13)(3) is entered and when the enter key is pressed it becomes:   (13)*(3)           39
    in CAS  (13)(3) is entered, enter key pressed it becomes:                                        39                     39
    in Home (13)(3)^2 is entered, enter key pressed it becomes:                             (13)*(3)^2       117
    in CAS  (13)(3)^2  is entered,  enter key pressed it becomes:                              39^2                 1521
    true
    Home sees  MN  as M*N  ;    whereas
    CAS sees     mn   as one variable  mn  ;   whereas
    Solver sees MN  as M*N     but 
    Solver sees M(N)    as a Syntax error  which needs to be corrected,  but
    Solver sees (M)(N)  as (M)*(N)    pretty much the same as in Home....
    just seems like unneccessare confusion setting students up for failure,  
    but thanks for your help and insight

  • Is this a bug in CF 8

    I have the following code (just as a sample):
    <CFQUERY NAME="MyProjects" DATASOURCE="DSN_Name">
    select PID, PName from projects
    </CFQUERY>
    Assume the above query will bring only one record, I'm using
    CF 8 with latest hot fix, running on windows server 2003 machine,
    with MSSQL 2005.
    Now if I try simply just to print this PID (PID is a primary
    key set by the table) as below:
    <cfoutput>
    <cfloop query="MyProjects">
    #PID#
    </cfloop>
    <cfoutput>
    Now to run the above code in a stress test with 10 concurrent
    users, this PID could bring NULL, while if I write it this way with
    same type of test it doesn't break and it doesn't bring NULL
    <cfoutput>
    <cfloop query="MyProjects">
    #MyProjects.PID#
    </cfloop>
    <cfoutput>
    Is this a bug in CF or maybe the JDBC drivers ? Is it scoping
    issue ? ... anyone notice this before ?.

    Qais wrote:
    > Thanks for your reply, I know I can do it as
    <cfoutput query= ......> but I
    > have a friend which told me that if you don't scope a
    column name by the name
    > of the query, like query_name.column_name and this
    column name just by chance
    > exists as a variable in another scope (like session or
    application or ...etc.)
    > and with a stress test it could jump and read that other
    value in the other
    > scope.
    >
    > My understanding for CF since before until today that
    when you print a query
    > like
    > <cfoutput query= ......>
    > #column_name#
    > </cfoutput>
    > then CF will look into ONLY that recordset and will not
    go further and make a
    > search into other scopes.
    If there is someone here in this forum from Adobe
    > can I get a clear answer if this SHOULD scoped or
    not.
    >
    Yes, scoping is considered a best practice. Inside an
    <cfoutput...>
    block, ColdFusion will look in the named query *first*, but
    it does not
    stop there. If the value is not found in the query, then it
    will look
    into other scopes in a defined and documented order.
    Outside of an <cfoutput...>, i.e., in your first
    example with a
    <cfloop...> I suspect the query is not the first scope
    looked into.
    http://www.adobe.com/devnet/server_archive/articles/using_cf_variables2.html#scopes
    http://www.chapter31.com/2008/03/28/evaluating-coldfusion-unscoped-query-variables/
    http://www.oreillynet.com/pub/a/oreilly/web/news/coldfusion_0701.html
    Not exactly a hidden secret here.

  • How to get a "char variable" with presentation variable???

    I want to pass a char variable with presentation variable, I don't have problems if I pass "int".
    For example in answers page I add a column that contains years of my dimension. 2000 until 2012 and prompted my presentation variable "year" (from my dashboard prompt) and when I go to dashboard if I choose in my prompt 2006 in my report appear 2006...any problem and easy. But my problem is if I would pass a char variable, in my prompt also I have months but not numbers else names: January, February, March...and a presentation variable that name is "month". If I do the same report but change column year to month (name) I don't have any results and I have an error.
    How can I solucionate this???
    Thank you!!

    Alex,
    Do you have separate columns for Year and Month Name. If Yes, Then why it is so confusing?
    1. create a dashboard prompt with month name column
    2. Assign it to monthname variable
    3. In your report use above variable any where.., but what ever you are doing should be logical and valid to get some data.
    In general above approach will work.
    You said, "No! I don't want to do a filter with month! I would like to pass this variable, in this example don't make sense but I need to pass a char variable with presentation variable to do another things..."
    what does that mean, what you are trying to do with the variable in your report. If you give a example that would be better.
    - Madan

  • Is this a bug or what?

    Hi,
    Have you ever tried to pass integers from a popup to its
    parent after manipulating it?
    unfortunately the integer keeps its value in the parent
    without applying the changes that happened inside the popup.
    So...
    Is this a bug or a problem with my code?

    Actually I passed two variables from the parent to the popup,
    one is an array, and the seconed is an integer.
    When changing the array inside the popup and adding new
    elements to it without referencing it by using the
    parentDocument.{the array}, the manipulation was successful and the
    parent kept the changes. But when doing the same with the integer,
    the parent didn't accept the change and kept its value without
    changing, so I had to reference the integer using the
    parentDocument.{the integer} which is the opposite of what is
    described in the flex mannual under the topic of "passing data from
    and to the popup", and that was the reason of my wonder.
    Do you have any idea of why is that?

Maybe you are looking for

  • Why these problems with one component?

    I'm going slowly and methodically but can't seem to get anywhere. I am working from a backup copy of my Web site. I first tried creating a fresh copy from the DVD backup file. In that case, as in all cases, almost every page has a bad link bug. I tho

  • Macbook Pro 15" Model - Native/Forced Resolutions

    I'm looking into buying a 15" Macbook Pro, but the only thing holding me back is it seems like it can only support 1440x900 as its native. Is there an upgrade I can buy for it from apple to achieve somewhere around 1920x1200 like the 17" model, or is

  • FRM-40831 : Truncation occured: value too long for filed MAST_EMP_NAME

    Hi I'm using Forms 5 and getting following error. FRM-40831 : Truncation occured: value too long for filed MAST_EMP_NAME. When i checked in the column Mast_emp_name, all the values are with in the limit. Table contains some 9 lacs record. Please help

  • What does the "other" section in my storage holds?

    I currently have a MacBook Air and even though I have almost nothing on my computer, there is the "Other" sectino on the storage report that is takes almost one third of my total storage memory. What is this??? HOw can I free it??? Thanks beforehand!

  • Use of RSSM to create authorization objects

    I have a few questions on the way of using authorization objects via RSSM. First, i would like to know if there is a limit in the number of values used as a filter in the authorisation object. First, what is the quantity limit of values that we can u