Storing in an array from my own created class

Hi,
Here I am again with more questions. I am grovelling for help.
I am working on a program in Netbeans 5.5.1 where I created a class called Student that gets and sets Last Name, First Name and Student ID. Now the program to run as a samle of this class will store the first Student I get and put it into slot [0] of my array and then I increment my NumStudents, as a count to moveon to the next array slot. The problem is that it only puts the Student info into slot[0], even on the 2nd or 3rd entry to store information. I'm not sure if the problem is in the gets and sets in my class or in my Store Info button listener.
Here is a bit of the code. I have comments to help explain my problem.
Thank you oh virtuosos of Java! This stuff brings me to tears!
private void mouseclickedbtnStoreInfo(java.awt.event.MouseEvent evt)
// Code to store info from the textbox entered by user:
s.setFirstName(txtFirstName.getText());
s.setLastName(txtLastName.getText());
s.setStudentID(txtStudentID.getText());
arrayAllStudents[NumStu] = s;
NumStu++;
txtFirstName.setText("");
txtLastName.setText("");
txtStudentID.setText("");
//Testing array storage here also
/*This only prints out only for the second student entered, loses the first, NumStu times, apparently only storing in slot 0. array is of Student class as is the variable s.*/
for(int i=0;i<NumStu;i++){
System.out.println(arrayAllStudents.getStudentID());
System.out.println(arrayAllStudents[i].getFirstName());
System.out.println(arrayAllStudents[i].getLastName());
Hopefully this is not a challenging puzzle for all you experts out there. Pop me a line soon. I'll take my turn helping when I get this #*@& figured out.

O.k. I'll try this again. We'll see if anything is clearer with this code. Before this I also have automatically generated code from Netbeans coding my gui. I also have another page of code generating my Student.class. The only methods I have in that are the sets and gets of StudentID, LastName, and FirstName.
    private void mouseclickedbtnStoreInfo(java.awt.event.MouseEvent evt) {                                         
// Code to store info from the textbox entered by user:
        s.setFirstName(txtFirstName.getText());
        s.setLastName(txtLastName.getText());
        s.setStudentID(txtStudentID.getText());
        arrayAllStudents[NumStu] = s;
        NumStu++;
        txtFirstName.setText("");
        txtLastName.setText("");
        txtStudentID.setText("");
        //Testing array storage here also
        //This only prints out only for the second student entered and loses the first NumStu times
        for(int i=0;i<NumStu;i++){
            System.out.println(arrayAllStudents.getStudentID());
System.out.println(arrayAllStudents[i].getFirstName());
System.out.println(arrayAllStudents[i].getLastName());
private void mouseClickedRetrieveInfo(java.awt.event.MouseEvent evt) {                                         
// Code for user to retrieve the info from textboxes:
//This is all printing out as only the last student entered but as many times as Num##.
for(int i=0;i<NumStu;i++){
System.out.println(arrayAllStudents[i].getStudentID());
System.out.println(arrayAllStudents[i].getFirstName());
System.out.println(arrayAllStudents[i].getLastName());
* @param args the command line arguments
public static void main(String args[]) {
java.awt.EventQueue.invokeLater(new Runnable() {
public void run() {
new frmTestStudentClass().setVisible(true);
// Variables declaration - do not modify
private javax.swing.JButton btnRetrieveInfo;
private javax.swing.JButton btnStoreInfo;
private javax.swing.JLabel lblFirstName;
private javax.swing.JLabel lblLastName;
private javax.swing.JLabel lblStudentID;
private javax.swing.JTextField txtFirstName;
private javax.swing.JTextField txtLastName;
private javax.swing.JTextField txtStudentID;
// End of variables declaration
Student s;
Student arrayAllStudents[] = new Student[MaxStu];
}This does compile and run the gui. User can enter text into the textboxes and when I hit my StoreInfo button the textboxes clear and NumStu is incremented and first entrance is stored in arrayAllStudents[0].  This seemed to paste just as it is in Netbeans.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

Similar Messages

  • Why i cannot create the sql azure database from my own country 'Nepal' ?. why it is not include in the list of country when we sign up for azure database. :( !!!

    why i cannot create the sql azure database from my own country 'Nepal' ?. why it is not include in the list of country when we sign up for azure database. :(  !!!
    canot we try this new feature ,dosnot we need to try this too..why such discermination for our country nepal. :(

    Hi Anil,
    I am Mahesh from Microsoft Innovation Center. From August 2014 we have made Azure Available to Nepal. You can now directly sign in to azure with your Nepal Based Mobile Number as Verification.
    Thanks for showing your Interest in our Product.
    Mahesh Dahal

  • How can I edit material from 1 or more dvds that I created from my own filmed material in iMovie but which I no longer have in iMovie

    How can I edit material from 1 or more dvds that I created from my own filmed material in iMovie but which I no longer have in iMovie

    You need to 'reverse engineer' them :
    You need to convert the VOB files in the TS-Folder of the DVD back to DV which iMovie is designed to handle. For that you need mpegStreamclip:
    http://www.squared5.com/svideo/mpeg-streamclip-mac.html
    which is free, but you must also have the  Apple mpeg2 plugin :
    http://www.apple.com/quicktime/mpeg2/
    (unless you are running Lion in which case see below))
    which is a mere $20.
    Another possibility is to use DVDxDV:
    http://www.dvdxdv.com/NewFolderLookSite/Products/DVDxDV.overview.htm
    which costs $25.
    For the benefit of others who may read this thread:
    Obviously the foregoing only applies to DVDs you have made yourself, or other home-made DVDs that have been given to you. It will NOT work on copy-protected commercial DVDs, which in any case would be illegal.
    And from the TOU of these forums:
    Keep within the Law
    No material may be submitted that is intended to promote or commit an illegal act.
    Do not submit software or descriptions of processes that break or otherwise ‘work around’ digital rights management software or hardware. This includes conversations about ‘ripping’ DVDs or working around FairPlay software used on the iTunes Store.
    If you are running Lion:
    From the MPEG Streamclip homepage
    The installer of the MPEG-2 Playback Component may refuse to install the component in Lion. Apple states the component is unnecessary in Lion, however MPEG Streamclip still needs it.
    To install the component in Lion, please download MPEG Streamclip 1.9.3b7 beta above; inside the disk image you will find the Utility MPEG2 Component Lion: use it to install the MPEG-2 Playback Component in Lion. The original installer's disk image (QuickTimeMPEG2.dmg) is required.
    The current versions of MPEG Streamclip cannot take advantage of the built-in MPEG-2 functionality of Lion. For MPEG-2 files you still need to install the QuickTime MPEG-2 Playback Component, which is not preinstalled in Lion. You don't have to install QuickTime 7.

  • Create Array from Record

    Hi
    Somebody have a example how can I to create a Array from record ?
    tks

    Hi!
    Pls go through the followinglink --
    [url http://download-west.oracle.com/docs/cd/B14117_01/appdev.101/b10807/05_colls.htm]VArray From Record In Oracle
    Hope that will help u.
    Regards.
    Satyaki De.

  • URGENT: Passing Array from JSP to a Stored Procedure

    Hi,
    Can some one please help me understanding how can I pass array from JSP page to a stored procedure in database.
    Thanks in advance.
    Jatinder

    Thanks.
    I tried ArrayExampla.java and was successful in passing array values to the stored database procedure.
    How can I use this class in JSP? Like I have first JSP where in I will collect input from the user and then submit it to the second JSP - that needs to call the ArrayExample.java to pass the values as array to the database.
    How should I call this java code in my second JSP?
    Thanks in advance.

  • Removes duplicates from a sorted array without having to create a new array

    Funcation removes duplicates from a sorted array without having to create a new array

    Funcation removes duplicates from a sorted array
    without having to create a new arrayIs a 'funcation' like a vacation but more fun or
    something?LMFAO. You just jumped with both feet on one of my biggest peeves. I've been outed!
    Actual words/phrases I've seen used which I hate with every fiber of my being:
    "Mrs. Freshly's"
    "McFlurry"
    "Freshissimo"
    "Spee-dee"
    "Moons Over My Hammy"
    One of my favorite SNL skits had Will Ferrell leading a panel of movie reviewers (they're the worst for this kind of junk). Each one had some cheesy pun to describe their respective movie. Ferrell topped the show off with his endorsement of "Fantasia 2000 is Fantasgreat!"
    LOL.
    "Come to Slippy Village - it's a FUNCATION!"
    &#167; (runs off, laughing maniacally, head explodes)

  • Programmatically create array from common cluster items inside array of clusters

    I have seen many questions and responses on dealing with arrays of clusters, but none that discuss quite what I am looking for. I am trying to programmatically create an array from common cluster items inside array of clusters. I have a working solution but looking for a cleaner approach.  I have an array of clusters representing channels of data.  Each cluster contains a mixture of control data types, i.e.. names, types, range, values, units, etc. The entire cluster is a typedef made up of other typedefs such as the type, range and units and native controls like numeric and boolean. One array is a “block” or module. One cluster is a channel of data. I wrote a small vi to extract all the data with the same units and “pipe” them into another array so that I can process all the data from all the channels of the same units together.  It consists of a loop to iterate through the array, in which there is an unbundle by name and a case structure with a case for each unit.  Within a specific case, there is a build array for that unit and all the other non-relevant shift registers pass through.  As you can see from the attached snapshots, the effort to add an additional unit grows as each non-relevant case must be wired through.  It is important to note that there is no default case.  My question:  Is there a cleaner, more efficient and elegant way to do this?
    Thanks in advance!
    Solved!
    Go to Solution.
    Attachments:
    NI_Chan units to array_1.png ‏35 KB
    NI_Chan units to array_2.png ‏50 KB

    nathand wrote:
    Your comments made me curious, so I put together a quick test. Maybe there's an error in the code (below as a snippet, and attached as a VI) or maybe it's been fixed in LabVIEW 2013, but I'm consistently getting faster times from the IPE (2-3 ms versus 5-6ms for unbundle/index). See if you get the same results. For fun I flipped the order of the test and got the same results (this is why the snippet and the VI execute the tests in opposite order).
    This seems like a poster child for using the IPES!  We can look at the index array + replace subset and recognize that it is in place, but the compiler is not so clever (yet!).  The bundle/unbundle is a well-known "magic pattern" so it should be roughly equivalent to the IPES, with a tiny penalty due to overhead.
    Replace only the array operation with an IPES and leave the bundle/unbundle alone and I wager the times will be roughly the same as using the nested IPES.  Maybe even a slight lean toward the magic pattern now if I recall correctly.
    If you instantly recognize all combinations which the compiler will optimize and not optimize, or you want to exhaustively benchmark all of your code then pick and choose between the two to avoid the slight overhead.  Otherwise I think the IPES looks better, at best works MUCH better, and at worst works ever-so-slightly worse.  And as a not-so-gentle reminder to all:  if you really care about performance at this level of detail: TURN OFF DEBUGGING!

  • Create Class objects from an Array of File Objects

    Hi There,
    I'm having extreme difficulty in trying to convert an array of file objects to Class objects. My problem is as follows: I'm using Jfilechooser to select a directory and get an array of files of which are all .class files. I want to create Class objects from these .class files. Therefore, i can extract all the constructor, method and field information. I eventually want this class information to display in a JTree. Very similar to the explorer used in Netbeans. I've already created some code below, but it seems to be throwing a NoSuchMethodError exception. Can anyone please help??
    Thanks in advance,
    Vikash
    /* the following is the class im using */
    class FileClassLoader extends ClassLoader {
    private File file;
    public FileClassLoader (File ff) {
    this.file = ff;
    protected synchronized Class loadClass() throws ClassNotFoundException {
    Class c = null;
    try {
    // Get size of class file
    int size = (int)file.length();
    // Reserve space to read
    byte buff[] = new byte[size];
    // Get stream to read from
    FileInputStream fis = new FileInputStream(file);
    DataInputStream dis = new DataInputStream (fis);
    // Read in data
    dis.readFully (buff);
    // close stream
    dis.close();
    // get class name and remove ".class"
    String classname = null;
    String filename = file.getName();
    int i = filename.lastIndexOf('.');
    if(i>0 && i<filename.length()-1) {
    classname = filename.substring(0,i);
    // create class object from bytes
    c = defineClass (classname, buff, 0, buff.length);
    resolveClass (c);
    } catch (java.io.IOException e) {
    e.printStackTrace();
    return c;
    } // end of method loadClass
    } // end of class FileClassLoader
    /* The above class is used in the following button action in my gui */
    /* At the moment im trying to output the data to standard output */
    private void SelectPackage_but2ActionPerformed(java.awt.event.ActionEvent evt) {
    final JFileChooser f = new JFileChooser();
    f.setFileSelectionMode(JFileChooser.DIRECTORIES_ONLY);
    int rVal = f.showOpenDialog(Remedy.this);
    // selects directory
    File dir = f.getSelectedFile();
    // gets a list of files within the directory
    File[] allfiles = dir.listFiles();
    // for loop to filter out all the .class files
    for (int k=0; k < allfiles.length; k++) {
    if (allfiles[k].getName().endsWith(".class")) {
    try {
    System.out.println("File name: " + allfiles[k].getName()); // used for debugging
    FileClassLoader loader = new FileClassLoader(allfiles[k]);
    Class cl = loader.loadClass();
    //Class cl = null;
    Class[] interfaces = cl.getInterfaces();
    java.lang.reflect.Method[] methods = cl.getDeclaredMethods();
    java.lang.reflect.Field[] fields = cl.getDeclaredFields();
    System.out.println("Class Name: " + cl.getName());
    //print out methods
    for (int m=0; m < methods.length; m++) {
    System.out.println("Method: " + methods[m].getName());
    // print out fields
    for (int fld=0; fld < fields.length; fld++) {
    System.out.println("Field: " + fields[fld].getName());
    } catch (Exception e) {
    e.printStackTrace();
    } // end of if loop
    } // end of for loop
    packageName2.setText(dir.getPath());
    }

    It's throwing the exeption on the line:
    FileClassLoader loader = new FileClassLoader(allfiles[k]);
    I'm sure its something to do with the extended class i've created. but i cant seem to figure it out..
    Thanks if you can figure it out

  • Calling Oracle 10g Stored Proc with Assoc Array from C# VS 2008

    I have the following PL/SQL procedure:
    CREATE OR REPLACE PROCEDURE HMA_ADM.PRC_VDM_SAVDEL_VEN_DOC
    P_OP IN VARCHAR2,
    P_USRID IN TB_VDM_MANAGE_DOCUMENTS.CREATEDBY%TYPE,
    P_DATE IN VARCHAR2, -- HAS TO BE STRING, ELSE WE GET AN ERROR
    P_DOCNAM IN TB_VDM_MANAGE_DOCUMENTS.DOCUMENT_NAME%TYPE,
    P_DOCLNK IN TB_VDM_MANAGE_DOCUMENTS.DOCUMENTLINK%TYPE,
    P_FNGUID IN TB_VDM_MANAGE_DOCUMENTS.FILENET_GUID%TYPE,
    P_DESC IN TB_VDM_MANAGE_DOCUMENTS.DESCRIPTION%TYPE,
    P_REQID IN VARR
    ) IS
    Where VARR is:
    CREATE OR REPLACE TYPE VARR IS TABLE OF INTEGER;
    In C# I have the following code:
    int64[] intReqID;
    OracleCommand cmdVDL = new OracleCommand(DBQueries.SPQRY_SAVDELVENDOC, connDB);
    cmdVDL.CommandType = CommandType.StoredProcedure;
    cmdVDL.Parameters.Add(new OracleParameter("P_OP", strOP));
    cmdVDL.Parameters.Add(new OracleParameter("P_CREATEBY", strUID));
    cmdVDL.Parameters.Add(new OracleParameter("P_CREATEDATE", strDate));
    cmdVDL.Parameters.Add(new OracleParameter("P_DOCNAM", strDocNam));
    cmdVDL.Parameters.Add(new OracleParameter("P_DOCLNK", strURL));
    cmdVDL.Parameters.Add(new OracleParameter("P_FNGUID", strGUID));
    cmdVDL.Parameters.Add(new OracleParameter("P_DESC", strDesc));
    cmdVDL.Parameters.Add(new OracleParameter("P_REQID", OracleDbType.Int64) {
    CollectionType = OracleCollectionType.PLSQLAssociativeArray,
    Size = intReqID.Count(),
    Value = intReqID,
    DbType = DbType.Int64,
    OracleDbType = OracleDbType.Int64
    OracleParameterStatus[] stat = new OracleParameterStatus[intReqID.Count()];
    for (i = 0; i < intReqID.Count(); i++) {
    stat[i] = OracleParameterStatus.Success;
    cmdVDL.Parameters["P_REQID"].ArrayBindStatus = stat;
    cmdVDL.ExecuteNonQuery();
    When I run this I get the following error:
    ORA-06550: line 1, column 7:
    PLS-00306: wrong number or types of arguments in call to 'PRC_VDM_SAVDEL_VEN_DOC'
    ORA-06550: line 1, column 7:
    PL/SQL: Statement ignored
    If I remove the Associative Array from both, the procedure runs fine.
    What am I doing wrong?

    Additionally,
    1) UDT support requires 11106.20 or higher ODP (but can be used against 10g db)
    2) if the plsql is changeable, you may want to swap it to associative array instead to avoid having to create custom classes for the UDT, and here's a short sweet example.
    Greg
    CREATE or replace PACKAGE MYPACK3 AS
    TYPE numarray is table of number index by BINARY_INTEGER;
    PROCEDURE getempsinarray(thearray IN numarray, numrecs out number);
    END MYPACK3;
    CREATE or replace PACKAGE BODY MYPACK3 AS
    PROCEDURE getempsinarray(thearray IN numarray, numrecs out number)
    IS
    begin
      numrecs :=  thearray.count;
    END getempsinarray;
    END MYPACK3;
    using System;
    using System.Data;
    using Oracle.DataAccess.Client;
    public class indexby
         public static void Main()
          OracleConnection con = new OracleConnection("data source=orcl;user id=scott;password=tiger;");
          con.Open();
          OracleCommand cmd = new OracleCommand("mypack3.getempsinarray", con);
          cmd.CommandType = CommandType.StoredProcedure;
          OracleParameter Param1 = cmd.Parameters.Add("param1", OracleDbType.Int32);
          Param1.Direction = ParameterDirection.Input;
          Param1.CollectionType = OracleCollectionType.PLSQLAssociativeArray;
          Param1.Value = new int[3]{7369,7499, 7521};
          Param1.Size = 3;
          OracleParameter Param2 = cmd.Parameters.Add("param2", OracleDbType.Int32, DBNull.Value, ParameterDirection.Output );
         cmd.ExecuteNonQuery();
         Console.WriteLine("{0} records passed in",Param2.Value);               
          con.Close();
    }

  • Scripting: Create Cluster in Array from existing cluster

    I am creating a custom programming tool to generate some custom LabVIEW TypeDefs.
    One of the structures I have to create is an array of clusters; but from an existing cluster.  That is, I have a reference to a previously defined cluster, and I need to array this.
    One possible way to do this is to duplicate the cluster next to the empty array, and then 'move it into' the array.  This seems to be an ugly solution.
    Is there a better way?  When I try and use "Create from Reference" method, the cluster is created in the array, but the sub-elements trigger error 0x421: Type Mismatch.
    Thanks!
    Jed

    Hi Viper,
    Sorry- you misunderstand.  We are talking about doing this with LV Scripting; what you did statically defines the array type in the VI.  Writing LV code that would create the array from an undefined array by running a VI.  (In the situation above, the code would actually EDIT the VI and change it's functionality)
    There are a few examples in the distro if you search for "scripting", but here's a page with some example code you can look at.
    http://zone.ni.com/reference/en-XX/help/371361H-01/lvhowto/wiring_scripting_objects/

  • What happened to the feature enabling me to create a signature from my own files?

    I have been able to sign my PDF forms from my own files now I cannot do this where or when did this feature disappear ??

    Some menu entries in the main menu bar are hidden if you use the mouse and only appear if you use the keyboard to open the menu (Bug 626825).
    You can see the difference if you use Alt+F to open the File menu or other menus like the Edit menu (Alt+E) and Bookmarks menu (Alt+B) and compare that to what you see if you use the mouse to open the menu after you have made the menu bar visible by tapping Alt or by pressing F10.
    * "Bookmark All Tabs" (Shift+Ctrl+D) no longer shows in the Bookmarks menu unless you open the Bookmarks menu via the keyboard (Alt + B).
    * "Bookmark All Tabs" can be accessed via the right-click context menu of a tab on the tab bar.
    See also:
    * https://support.mozilla.com/kb/how-do-i-use-bookmarks
    * Bookmark All: https://addons.mozilla.org/firefox/addon/bookmark-all/

  • Calling an array from another class

    Ok I have this little program that I created to display values stored in an array. Well, I want my array to automatically be populated with the same values that are in another array that resides in a different class. Here is my code for the class that I want the values to be displayed:
    import javax.swing.*;
    import java.awt.*;
    public class GUIRead extends JFrame
         double[] interest = new double[3];
         MemicCSVReader[] interestObjectArray = new MemicCSVReader[3];
         interestObjectArray[0] = new MemicCSVReader();
         interestObjectArray[1] = new MemicCSVReader();
         interestObjectArray[2] = new MemicCSVReader():
         for(int x = 0; x < 3; x++)
         JPanel display = new JPanel();
         JTextField interestText = new JTextField(10);
         JPanel display2 = new JPanel();
         JTextField interestText2 = new JTextField(10);
         JPanel display3 = new JPanel();
         JTextField interestText3 = new JTextField(10);
         public GUIRead()
              super("Test");
              setSize(160,200);
              setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
              setVisible(true);
              GridLayout config = new GridLayout(3,1);
              FlowLayout config2 = new FlowLayout(FlowLayout.LEFT,10,10);
              Container pane = getContentPane();
              pane.setLayout(config2);
              display.setLayout(config2);
              display.add(interestText);
              interestText.setText(interest[0]);
              interestText.setEditable(false);
              pane.add(display);
              display2.setLayout(config2);
              display2.add(interestText2);
              interestText2.setText(interest[1]);
              interestText2.setEditable(false);
              pane.add(display2);
              display3.setLayout(config2);
              display3.add(interestText3);
              interestText3.setText(interest[2]);
              interestText3.setEditable(false);
              pane.add(display3);
              setContentPane(pane);
         public static void main(String[] args)
              GUIRead run = new GUIRead();
    Here is my code that I want the double[] interest array to pull it's data from:
    public class MemicCSVReader
         double interestArray[];
         MemicCSVReader()
              String[] interestString = {"5.5","5.35","5.75"};
              for(int x = 0; x < 3; x++)
                   interestArray[x] = Double.parseDouble(interestString[x]);
    }

    Ok, thanks for your help. Now I have another problem. I can't get the values to display. Here is my code:
    This is the program that runs the application:
    import javax.swing.*;
    import java.awt.*;
    public class GUIRead extends JFrame
         MemicCSVReader readCSV = new MemicCSVReader();
         double[] interestDouble = readCSV.getInterestArray();
         String[] interest;
         JPanel display = new JPanel();
         JTextField interestText = new JTextField(10);
         JPanel display2 = new JPanel();
         JTextField interestText2 = new JTextField(10);
         JPanel display3 = new JPanel();
         JTextField interestText3 = new JTextField(10);
         public GUIRead()
              super("Test");
              setSize(160,200);
              setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
              setVisible(true);
              GridLayout config = new GridLayout(3,1);
              FlowLayout config2 = new FlowLayout(FlowLayout.LEFT,10,10);
              Container pane = getContentPane();
              pane.setLayout(config2);
              display.setLayout(config2);
              display.add(interestText);
              interestText.setEditable(false);
              pane.add(display);
              display2.setLayout(config2);
              display2.add(interestText2);
              interestText2.setEditable(false);
              pane.add(display2);
              display3.setLayout(config2);
              display3.add(interestText3);
              interestText3.setEditable(false);
              pane.add(display3);
              setContentPane(pane);
         public void actionPerformed()
              for(int x = 0; x < 3; x++)
                   interest[x] = Double.toString(interestDouble[x]);
              interestText.setText(interest[0]);
              interestText2.setText(interest[1]);
              interestText3.setText(interest[2]);
         public static void main(String[] args)
              GUIRead run = new GUIRead();
    This is the file that it pulls the array from:
    public class MemicCSVReader
         private double[] InterestArray = new double[3];
         MemicCSVReader()
              double[] InterestArray = {5.5,5.35,5.75};
         public double[] getInterestArray()
              return InterestArray;
    }

  • Obtain Array from an XML file with Multiple Arrays

    Hi,
    So I have been struggling with this program I am making for the last few months but I am almost there. I have a program that creates multiple arrays and place them one after another in an xml file and each array has its own unique name. Now I would like to create a VI that takes this XML file and when the user inputs the specific array name they are looking for it goes into the xml file finds the entire array under that name and displays it in an output indictor to be viewed on the VI. Attached is a sample of my xml file and the VI that creates this xml file.
    Thanks,
    dlovell
    Solved!
    Go to Solution.
    Attachments:
    I_Win.zip ‏20 KB

    Here is a slightly different version. The one above reads from a file. This is how you would read from an already loaded XML string.
    =====================
    LabVIEW 2012
    Attachments:
    Find Array.vi ‏18 KB

  • How to retrieve web service results that are stored in an array?

    Hi, everyone,
    I am using a manually created web service reference in APEX3.0.1 to call an external web service for a simple company search. Here is the WSDL:
    http://ws.strikeiron.com/DnBBusinessProspectLinkage2?WSDL
    The web referene is tested fine. And here is a sample test result:
    <?xml version="1.0" encoding="utf-8"?>
    <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
    <Header xmlns="http://schemas.xmlsoap.org/soap/envelope/">
    <SubscriptionInfo xmlns="http://ws.strikeiron.com">
    <LicenseStatusCode>0</LicenseStatusCode>
    <LicenseStatus>Valid license key</LicenseStatus>
    <LicenseActionCode>7</LicenseActionCode>
    <LicenseAction>No hit deduction for invocation</LicenseAction>
    <RemainingHits>4921</RemainingHits>
    <Amount>0</Amount>
    </SubscriptionInfo>
    </Header>
    <soap:Body>
    <CompanySearchResponse xmlns="http://www.strikeiron.com">
    <CompanySearchResult>
    <ServiceStatus>
    <StatusNbr>213</StatusNbr>
    <StatusDescription>Successful search</StatusDescription>
    </ServiceStatus>
    <ServiceResult>
    <Count>2</Count>
    <CandidateCompanies>
    <CandidateCompany>
    <CompanyName>MSC SOFTWARE CORPORATION</CompanyName>
    <StreetAddress>2 MACARTHUR PL</StreetAddress>
    <City>SANTA ANA</City>
    <State>CA</State>
    <PostalCode>927075924</PostalCode>
    <Phone>7145408900</Phone>
    <CountryCode>US</CountryCode>
    <BranchIndicator>Headquarters</BranchIndicator>
    <TradingName />
    <ConfidenceCode>8</ConfidenceCode>
    <MatchGrade>BAAAAZZ</MatchGrade>
    <MatchNameGrade>Similar</MatchNameGrade>
    <MatchNamePercent>62</MatchNamePercent>
    <MatchStreetNumberGrade>Same</MatchStreetNumberGrade>
    <MatchStreetNumberPercent>100</MatchStreetNumberPercent>
    <MatchStreetNameGrade>Same</MatchStreetNameGrade>
    <MatchStreetNamePercent>100</MatchStreetNamePercent>
    <MatchCityGrade>Same</MatchCityGrade>
    <MatchCityPercent>100</MatchCityPercent>
    <MatchCountryStateGrade>Same</MatchCountryStateGrade>
    <MatchCountryStatePercent>100</MatchCountryStatePercent>
    <MatchPOBoxGrade>Not provided</MatchPOBoxGrade>
    <MatchPOBoxPercent>-1</MatchPOBoxPercent>
    <MatchPhoneGrade>Not provided</MatchPhoneGrade>
    <MatchPhonePercent>-1</MatchPhonePercent>
    </CandidateCompany>
    <CandidateCompany>
    <CompanyName>TYRA TECHNOLOGIES, INC</CompanyName>
    <StreetAddress>2 MACARTHUR PL</StreetAddress>
    <City>SANTA ANA</City>
    <State>CA</State>
    <PostalCode>927075924</PostalCode>
    <Phone>7145408900</Phone>
    <CountryCode>US</CountryCode>
    <BranchIndicator>Headquarters</BranchIndicator>
    <TradingName />
    <ConfidenceCode>8</ConfidenceCode>
    <MatchGrade>BAAAAZZ</MatchGrade>
    <MatchNameGrade>Similar</MatchNameGrade>
    <MatchNamePercent>62</MatchNamePercent>
    <MatchStreetNumberGrade>Same</MatchStreetNumberGrade>
    <MatchStreetNumberPercent>100</MatchStreetNumberPercent>
    <MatchStreetNameGrade>Same</MatchStreetNameGrade>
    <MatchStreetNamePercent>100</MatchStreetNamePercent>
    <MatchCityGrade>Same</MatchCityGrade>
    <MatchCityPercent>100</MatchCityPercent>
    <MatchCountryStateGrade>Same</MatchCountryStateGrade>
    <MatchCountryStatePercent>100</MatchCountryStatePercent>
    <MatchPOBoxGrade>Not provided</MatchPOBoxGrade>
    <MatchPOBoxPercent>-1</MatchPOBoxPercent>
    <MatchPhoneGrade>Not provided</MatchPhoneGrade>
    <MatchPhonePercent>-1</MatchPhonePercent>
    </CandidateCompany>
    </CandidateCompanies>
    </ServiceResult>
    </CompanySearchResult>
    </CompanySearchResponse>
    </soap:Body>
    </soap:Envelope>
    Here is my xpath defined in the report:
    /CompanySearchResponse/CompanySearchResult/ServiceResult/CandidateCompanies
    According to the WSDL file, the candidate companies are stored in an array. I am having problem to retrieve this values from the array. The web service ref is called but it returns nothing.
    Anyone in the forum can tell me what I did wrong?
    Thanks in advance!
    Jeff

    Hi, did you manage to figure this out? I'm having a similar problem with arrays.
    Also, i'm looking at how I can pass an array of values as input to the webservice call.. eg if I were calling a stock ticker service that allows you to supply a list of tickers as input so that you can get all your responses in one call. Anyone any thoughts on that?
    Cheers,
    Paul.

  • Can not select from my own MV. Please help.

    Hello Gurus,
    I have created a MV with following clauses
    CREATE or REPLACE MATERIALIZED VIEW "OWNER_NAME1"."MV_Name1"
    BUILD IMMEDIATE
    USING INDEX
    REFRESH COMPLETE
    AS
    SELECT column1, column2 .... from table1,table2
    where .....
    I have logged in to DB with the 'owner_name1' schema itself which is the owner of the MV.
    But, when I try to select from the above MV. It gives error "Ora-00942 table or view does not exist"
    I can see the same under 'user_objects' view as an object of owner_name1 schema.
    Could you please help me in understanding where I have gone wrong?
    DB - Oracle 9i on unix platform.
    Thanks in advance!
    Abhijit.

    Oh! I missed to mention the exact steps followed by me which created error for me,
    viz.
    1) I have 2 Database and their users as follows
    bq. i) DB1 in local server - 'localUser'
    bq. ii) DB2 in remote server - 'RemoteUser1' and 'RemoteUser2'
    2) 'RemoteUser2' user in DB2 has 'select' privilage on table 'RemoteTable1' of 'RemoteUser1' ( both are remote DB's users ! )
    i.e. select * from RemoteUser1.RemoteTable1; --works okay when logged into RemoteUser2. no synonyms are created hence using schema_name.table_name convention.
    3) Logged in to 'localUser' in DB1.
    4) Created a DB link 'local_to_remote2' in 'localUser' schema ( in DB1) to 'RemoteUser2' schema (in DB2)
    i.e.
    create database link local_to_remote2 connect to RemoteUser2 identified by password using 'connection_string';
    DBLink was created successfully.
    5) I could select from the tables of 'RemoteUser2' using DB Link. (by logging in to 'localUser')
    i.e. select * from RemoteUser1.RemoteTable1@local_to_remote2 ; --- gives me expected output. no issues!
    6) Now, I created below MV in 'localUser' ( no need to tell in 'DB1' )
    the exact syntax I used is as follows,
    CREATE or REPLACE MATERIALIZED VIEW "localUser"."MV_Name1"
    BUILD IMMEDIATE
    USING INDEX
    REFRESH COMPLETE
    AS
    SELECT column1, column2
    From RemoteUser1.RemoteTable1@local_to_remote2
    where condition1
    and condition2;
    The MV was created successfully, and I could see it as an 'Valid' object of 'localUser' schema.
    i.e. select * from user_objects where object_name ='MV_NAME1' and status ='VALID' --- tells that above create MV is an object of owner 'localUser'
    But, when I try to select from the said MV. it gives me error "Ora-00942 table or view does not exist"
    i.e. select * from MV_Name1; ---- neither this
    select * from localUser.MV_Name1; ---- nor this works :(
    Even when I try to drop the same MV it gives me same error. :(
    Could you please suggest me anything so that I will be able to select from MY OWN MV ?
    Please help Gurus.

Maybe you are looking for

  • Event Handling in Abstract Portal Component

    Hi Friends, I am using HTMLB Classlib in an Abstract Portal Component to develop a Dropdownlistbox. Now I want to handle the event of change of selection in this dropdown. However, this event is not getting captured. Sample code is as follows: public

  • Names not showing in Messages app on OS X Mountain Lion

    When new iMessages appear, names of my contacts show in the banner that appears, however in the app itself, only the phone number or email address of each person is listed, not their names. What could be wrong?

  • How much memory to run Logic 9 smoothly

    Hi all I'm the happy owner of a new iMac 21,5" since yesterday. Brilliant machine. It comes with 4GB of memory DDR3. Snow Leopard is the OS. I will be using it mainly to produce music, using Logic Studio 9. Is there any point on upgrading the memory

  • Data base access time

    Hello all, I have following scenario: 1) I have one select query which is fetching 5,000 records from data base in single select. 2)Two select query from the same table fetching 1,000 records each time. I want to know that which option will take more

  • Sound vs. NetStream: mp3 and m4A - can they both be played the same way?

    I have an audio player that works just fine with mp3's. now my client wants it to accept m4a files also. I see that they are handled differently, using the netstream class. But mp3's can't be handled this way.(or can they) Is there a method that will