Need help-merge free partition

how can i merge that? please any help
thx...

any one please... i can't update software cuse it's full

Similar Messages

  • Need help: merge array

    Hi everybody
    Need help in merging array of strong edges (coordinates).
    Already using array in 'if else' but have problem in merging those sequence values into two arrays of x and y coordinates (it will take all coordinates in image).
    Any ideas?
    Thanks.
    mySiti
    for (int i = 0; i < width; i++) { //for width
                for (int j = 0; j < height; j++) { //for height
                    Color c = pic.get(i, j);
                    int r = c.getRed();
                    int g = c.getGreen();
                    int b = c.getBlue();
                   int finalEdgeR=0, finalEdgeG=0, finalEdgeB=0;
                   int notEdgeR, notEdgeG, notEdgeB;
                   int [] StrongEdgeCoordX = new int ;
    int [] StrongEdgeCoordY = new int [j];
    if(r>=50 && r<=255)
    finalEdgeR=r;
    System.out.println("--------------------------------");
    System.out.println("coordinate of this pixel '"+i+"'");
    System.out.println("coordinate of this pixel '"+j+"'");
    System.out.println("StrongEdgeCoordX '"+i+"'");
    System.out.println("StrongEdgeCoordY '"+j+"'");
    System.out.println("edge red '"+finalEdgeR+"'");
    else if (r>=0 && r<50) notEdgeR=0;
    if(g>=50 && g<=255)
    finalEdgeG=g;
    System.out.println("edge green '"+finalEdgeG+"'");
    else if (g>=0 && g<50) notEdgeG=0;
    if(b>=50 && b<=255)
    finalEdgeB=b;
    System.out.println("edge blue '"+finalEdgeB+"'");
    else if (b>=0 && b<50) notEdgeB=0;

    hi, i have here a codes but i dont know on how to print the value that stored in array C;
    heres the sample code;
    // your array a and b
    int[] a, b;
    // you fill them
    a = ...;
    b = ...;
    // now you merge them
    int cSize = a.length + b.length;
    int[] c = new int[cSize];
    // pos of the c array
    int count = 0;
    int i = 0;
    for(i = 0; i < a.length; i++){
    c[count++] = a;
    for(i = 0; i < b.length; i++){
    c[count++] = b[i];

  • Need help restoring a partition image

    Setup: OSX 10.7
    One OSX partition, one Windows 7 Bootcamp partition.
    Initially, I made a backup image of the windows partition using disk utility and saved that to an external drive.  For some reason, using any format besides DVD master would result in an "invalid argument" error.*  So now I have an ISO image sitting around, the same size as the entire partition.  I can mount this image and see all my Windows files and directories inside.
    What I want to do is image this ISO file back over my original windows partition to restore it to an earlier state.  However, when I use disk utility, this is what happens:
    Select .iso as source, greyed out (unmounted) partition as destination.
    press restore, agree to erase
    DU asks to scan, and then fails with "unable to scan.  Invalid argument"
    I can also open the image so that now in finder there is the icon of a disk, surrounded by a rectangle with a corner folder over, and underneath is an image of an external disk drive.  If I choose this as the source, I get "restore failure.  Invalid argument."
    All I want to do is write my partition image back to the actual partition.
    *That's weird, I just tried to image the partition again right now to a .dmg, and it seemed to start ok.  Oh well.  Still doesn't help with my current problem, though.

    OK, I managed to fix it using old fashioned techniques.
    First, I needed to check that the image I had was an actual disk image, and not something else contained in a wrapper.
    In terminal, I used the command "file" on the image file and it saw a boot sector + other stuff.  That's good.
    Next, I checked that the size of the image file is exactly the same as the size of the partition I was going to write to using "diskutil info (name of partition)".  That checked out as well.
    Finally, I just did the usual dd if=image file of=target bs=4096 to write the image file back in.  Magically, it worked.  I guess it was good that in the process the partition table was not damaged.
    All the other GUI programs like disk utility, winclone, etc refused to touch my iso image file.
    I should have saved myself the headache and grabbed the original source image using dd as well.

  • Need help with table partitions

    Hi all,
    I'm new at partitions and tablespaces and I've been asked to create a partition for a table. First off, here's a sample table that I have.
    create table M_TRANS  (
       TRAN_ID NUMBER,
       MONTH_KEY INTEGER,
       ACCOUNT_KEY INTEGER,
       ACCOUNT_NUMBER CHAR(8),
       LINE_KEY VARCHAR2(40),
       SERVICE_TYPE VARCHAR2(10)
    )I need to create a range partition based on Month_Key and list sub-partition based on last char of Line_Key.
    MONTH_KEY has a data format of "YYYYMM" (200802).
    LINE_KEY's last char should be in 0-9 / A-Z. 1 partition for each number 0-9 and 1 partition for alphabet values.
    Upon reading articles, samples on this particular subject, I came up with this...
    create table M_TRANS  (
       TRAN_ID                    NUMBER,
       MONTH_KEY            INTEGER,
       ACCOUNT_KEY          INTEGER,
       ACCOUNT_NUMBER       CHAR(8),
       LINE_KEY             NUMBER,
       SERVICE_TYPE         VARCHAR2(10)
    PARTITION BY RANGE(MONTH_KEY)
    SUBPARTITION BY LIST (LINE_KEY)
    SUBPARTITION TEMPLATE(
    SUBPARTITION P_0 VALUES 1 TABLESPACE TS_0,
    SUBPARTITION P_1 VALUES 2 TABLESPACE TS_1,
    SUBPARTITION P_2 VALUES 3 TABLESPACE TS_2,
    SUBPARTITION P_3 VALUES 4 TABLESPACE TS_3,
    SUBPARTITION P_4 VALUES 5 TABLESPACE TS_4,
    SUBPARTITION P_5 VALUES 6 TABLESPACE TS_5,
    SUBPARTITION P_6 VALUES 7 TABLESPACE TS_6,
    SUBPARTITION P_7 VALUES 8 TABLESPACE TS_7,
    SUBPARTITION P_8 VALUES 9 TABLESPACE TS_8,
    SUBPARTITION P_9 VALUES 0 TABLESPACE TS_9,
    SUBPARTITION P_AZ VALUES ('A','B','C','D','E','F','G','H','I','J','K','L','M','N','O','P','Q','R','S','T','U','V','W','X','Y','Z') TABLESPACE TS_AZ
    PARTITION M_JAN VALUES 'JAN'
    PARTITION M_FEB VALUES 'FEB'
    PARTITION M_MAR VALUES 'MAR'
    PARTITION M_APR VALUES 'APR'
    PARTITION M_MAY VALUES 'MAY'
    PARTITION M_JUN VALUES 'JUN'
    PARTITION M_JUL VALUES 'JUL'
    PARTITION M_AUG VALUES 'AUG'
    PARTITION M_SEP VALUES 'SEP'
    PARTITION M_OCT VALUES 'OCT'
    PARTITION M_NOV VALUES 'NOV'
    PARTITION M_DEC VALUES 'DEC'
    );The only problem is that since the MONTH_KEY has a format of "YYYYMM", how do I compare just the last 2 numbers. Same goes with the LINE_KEY.
    Can some help me? Thanks.
    Regards,
    A.Sandiego

    In 10g and earlier, you need to create separate columns for the last 1-2 characters and use those columns as partitioning keys.
    In 11g, you can use virtual columns:
    CREATE TABLE M_TRANS (
       TRAN_ID NUMBER,
       MONTH_KEY INTEGER,
       LINE_KEY VARCHAR2(40),
       MONTH_ONLY as ((month_key/100-trunc(month_key/100))*100),
       LAST_CHAR as (upper(substr(line_key,length(line_key),1)))
    PARTITION BY RANGE(MONTH_ONLY)
    SUBPARTITION BY LIST (LAST_CHAR)
       SUBPARTITION TEMPLATE (
       SUBPARTITION P_0 VALUES ('1'),
       SUBPARTITION P_1 VALUES ('2'),
       SUBPARTITION P_2 VALUES ('3'),
       SUBPARTITION P_AZ VALUES ('A','B','C')
    PARTITION M_JAN VALUES LESS THAN (2),
    PARTITION M_FEB VALUES LESS THAN (3),
    PARTITION M_MAR VALUES LESS THAN (4)

  • [Need help] Would Hash partitioning preferable here?

    I have idea about Hash partitioning.
    Now in my case volume of data is very high while search criteria on that table is dynamically coming from GUI.
    There is search criteria for date range but date filed is dynamically decided.
    In database terminology, different queries with different date type columns in where clause are executed based on the search criteria selected from GUI.
    While using Range partition, we are allowed to use only one date column so query that do not use this date column would not get benefit from partitioning.
    so i feel i can't go for range partitioning.
    So here i need suggestion that would Hash partitioning would help in this case ?

    The only reason i have put my query in this forum is
    that here i found instant answers.So seeing that it is obvious that the only right way for such question is to divert them to the right forum and not provide any answer. Otherwise people start to become ignorant to polite requests.
    And this forum is all about "feedback and suggestion"
    again i am also asked for suggestions so i feel i am
    right here.Are you blind or unable to read? Already 2 users asked you to post in more appropriate forum and when you open this forum there is following text just after the forum title:
    "Use this forum for feedback about OTN programs, Web site content, and systems - product-related questions cannot be answered here. "
    Is this not enough?
    Gints Plivna
    http://www.gplivna.eu

  • Need Help with Format/Partition.. using cmd

    Okay guys.. Im kinda sick of trying to get my Recovery to work. Seems like its about to finish and everything is perfect.. then suddenly I get an error message saying that Recovery didnt work, or something like that..
    I figured I might as well try starting with a fresh hard drive, then trying the recovery again..
    So someone told me that if I have the HP Recovery disks, then I would be able to try them, even on a brand new hard drive, or a formatted one or whatever..
    Is this true?
    If so, then what I am asking you guys, is, if there is anybody that would be able to help guide me thru the steps needed, in order for me to Format my hard drive, & then partition it or whatever…
    & I wanna be able to do all this, using cmd (command prompt)
    So Please.. anyone.. your help would be greatly appreciated..
    I have an HP Pavilion dv6653cl
    Thanks!!

    Hi,
    There's no need to pre-format a new Hard Drive - if you perform a 'Factory Reset' using your Recovery Discs, these will perform a quick format and also re-create all the original partitions on the new drive as part of the process.
    A complete guide to using Recovery Discs can be found on the relevant link below.
    Performing An HP System Recovery - Windows 7.
    Performing An HP System Recovery - Windows Vista.
    Performing An HP System Recovery - Windows XP.
    Regards,
    DP-K
    ****Click the White thumb to say thanks****
    ****Please mark Accept As Solution if it solves your problem****
    ****I don't work for HP****
    Microsoft MVP - Windows Experience

  • I need help merging an old Mozilla Firefox with a new one, How do I do it?

    Can Firefox merge my two Mozilla Firefox accounts?
    Between 2010 and 2012 I created to separate Mozilla Firefox accounts. The first was under Teri Muckleroy with the Username savdXGodsgrace and email address (Email removed by mod) that has been changed as of 05/30/2012 to (Email removed by mod) and the second account that I created for my Firefox Personas that is under the name Teri Hinton with the Username CountryGirlsHeartAlways and email address (Email removed by mod) that as of 05/30/2012 has been changed to (Email removed by mod) so what I want to know is could Mozilla Firefox help me merge the two accounts into one. The only info I want to use is,
    Username: CountryGirlsHeartAlways
    Email address: (Email removed by mod)
    I'd like Mozilla Firefox to send me an email with a link to enter my password or send me a temporary password once the merge of both accounts has been completed or if a merge is not possible a solution that will make it possible for me to merge the two accounts myself.

    What do you mean with a Mozilla Firefox account? Note also that a moderator already removed your e-mail details to protect you from getting spam. Please don't post private information in this public forum, for your own safety. Thanks!

  • Need help merging these two files togehter

    I have the following class files one reads in a file another creates a file, Can somebody help me put the two class files together so i have one file which creates a file and reads it in, as i am stuck as to which bits need to be copied and which bits i only need once.
    /////////////////////////////////////////////////Code to create and save data in to file////////////////
    import java.io.*;
    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    import bank.BankUI;
    import bank.*;
    public class CreateSequentialFile extends JFrame {
       private ObjectOutputStream output;
       private BankUI userInterface;
       private JButton enterButton, openButton;
       private Store store;
       private Employee record;
       // set up GUI
       public CreateSequentialFile()
          super( "Creating a Sequential File of Objects" ); // appears in top of gui
          // create instance of reusable user interface
          userInterface = new BankUI( 9 );  // number of textfields
          getContentPane().add( userInterface, BorderLayout.CENTER );
          // configure button doTask1 for use in this program
          openButton = userInterface.getDoTask1Button();
          openButton.setText( "Save to file" );
          // register listener to call openFile when button pressed
          openButton.addActionListener(
             // anonymous inner class to handle openButton event
             new ActionListener() {
                // call openFile when button pressed
                public void actionPerformed( ActionEvent event )
                   openFile();
             } // end anonymous inner class
          ); // end call to addActionListener
          // configure button doTask2 for use in this program
          enterButton = userInterface.getDoTask2Button();
          enterButton.setText( "Save to file..." );
          enterButton.setEnabled( false );  // disable button
          // register listener to call addRecord when button pressed
          enterButton.addActionListener(
             // anonymous inner class to handle enterButton event
             new ActionListener() {
                // call addRecord when button pressed
                public void actionPerformed( ActionEvent event )
                   addRecord();
             } // end anonymous inner class
          ); // end call to addActionListener
          // register window listener to handle window closing event
          addWindowListener(
             // anonymous inner class to handle windowClosing event
             new WindowAdapter() {
                // add current record in GUI to file, then close file
                public void windowClosing( WindowEvent event )
                             if ( output != null )
                                addRecord();
                                  closeFile();
             } // end anonymous inner class
          ); // end call to addWindowListener
          setSize( 600, 500 );
          setVisible( true );
         store = new Store(100);
       } // end CreateSequentialFile constructor
       // allow user to specify file name
       private void openFile()
          // display file dialog, so user can choose file to open
          JFileChooser fileChooser = new JFileChooser();
          fileChooser.setFileSelectionMode( JFileChooser.FILES_ONLY );
          int result = fileChooser.showSaveDialog( this );
          // if user clicked Cancel button on dialog, return
          if ( result == JFileChooser.CANCEL_OPTION )
             return;
          File fileName = fileChooser.getSelectedFile(); // get selected file
          // display error if invalid
          if ( fileName == null || fileName.getName().equals( "" ) )
             JOptionPane.showMessageDialog( this, "Invalid File Name",
                "Invalid File Name", JOptionPane.ERROR_MESSAGE );
          else {
             // open file
             try {
                output = new ObjectOutputStream(
                   new FileOutputStream( fileName ) );
                openButton.setEnabled( false );
                enterButton.setEnabled( true );
             // process exceptions from opening file
             catch ( IOException ioException ) {
                JOptionPane.showMessageDialog( this, "Error Opening File",
                   "Error", JOptionPane.ERROR_MESSAGE );
          } // end else
       } // end method openFile
       // close file and terminate application
       private void closeFile()
          // close file
          try {
    int storeSize = store.getCount();
    for (int i = 0; i<storeSize;i++)
    output.writeObject(store.elementAt(i));
             output.close();
             System.exit( 0 );
          // process exceptions from closing file
          catch( IOException ioException ) {
             JOptionPane.showMessageDialog( this, "Error closing file",
                "Error", JOptionPane.ERROR_MESSAGE );
             System.exit( 1 );
       } // end method closeFile
       // add record to file
       public void addRecord()
          int employeeNumber = 0;
          String fieldValues[] = userInterface.getFieldValues();
          // if account field value is not empty
          if ( ! fieldValues[ BankUI.IDNUMBER ].equals( "" ) ) {
             // output values to file
             try {
                employeeNumber = Integer.parseInt(
                   fieldValues[ BankUI.IDNUMBER ] );
                        String dob = fieldValues[ BankUI.DOB ];
                        String[] dateofBirth = dob.split ("-"); // what used to put between number
                        String sDate = fieldValues[ BankUI.START ];
                        String[] startDate = sDate.split ("-");
                        String sex = fieldValues[ BankUI.GENDER ];
                        char gender = (sex.charAt(0));
    if ( employeeNumber >= 0 ) {
                    record  = new Employee(
                    fieldValues[ BankUI.NAME ],
                        gender,
                    new Date(     Integer.parseInt(dateofBirth[0]),
                              Integer.parseInt(dateofBirth[1]),
                              Integer.parseInt(dateofBirth[2])),
                        fieldValues[ BankUI.ADDRESS ],
                        fieldValues[ BankUI.NATINTNO ],
                        fieldValues[ BankUI.PHONE ],
                        fieldValues[ BankUI.IDNUMBER ],
              new Date(     Integer.parseInt(startDate[0]),
                              Integer.parseInt(startDate[1]),
                              Integer.parseInt(startDate[2])),
              Float.parseFloat( fieldValues[ BankUI.SALARY ] ));
                        if (!store.isFull())
                             store.add(record);
                        else
                        JOptionPane.showMessageDialog( this, "The Store is full you cannot add\n"+
                         "anymore employees. \nPlease Save Current File and Create a New File." );
                             System.out.println("Store full");
                        store.displayAll();
                        System.out.println("Count is " + store.getCount());
                                  // output record and flush buffer
                        //should be written to fuile in the close file method.
                   output.flush();
                else
                    JOptionPane.showMessageDialog( this,
                       "Account number must be greater than 0",
                       "Bad account number", JOptionPane.ERROR_MESSAGE );
                // clear textfields
                userInterface.clearFields();
             } // end try
             // process invalid account number or balance format
             catch ( NumberFormatException formatException ) {
                JOptionPane.showMessageDialog( this,
                   "Bad ID number, Date or Salary", "Invalid Number Format",
                   JOptionPane.ERROR_MESSAGE );
             // process exceptions from file output
             catch ( ArrayIndexOutOfBoundsException ArrayException ) {
                 JOptionPane.showMessageDialog( this, "Error with Start Date or Date of Birth",
                    "IO Exception", JOptionPane.ERROR_MESSAGE );
                      // process exceptions from file output
             catch ( IOException ioException ) {
                 JOptionPane.showMessageDialog( this, "Error writing to file",
                    "IO Exception", JOptionPane.ERROR_MESSAGE );
                closeFile();
          } // end if
       } // end method addRecord
       public static void main( String args[] )
          new CreateSequentialFile();
    } // end class CreateSequentialFile
    /////////////////////////////Code to read and cycle through the file created above///////////
    import java.io.*;
    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    import bank.*;
    public class ReadSequentialFile extends JFrame {
       private ObjectInputStream input;
       private BankUI userInterface;
       private JButton nextButton, openButton, nextRecordButton ;
       private Store store = new Store(100);
         private Employee employeeList[] = new Employee[100];
         private int count = 0, next = 0;
       // Constructor -- initialize the Frame
       public ReadSequentialFile()
          super( "Add Employee" );
          // create instance of reusable user interface
          userInterface = new BankUI( 9 ); 
          getContentPane().add( userInterface, BorderLayout.CENTER );
          // get reference to generic task button doTask1 from BankUI
          openButton = userInterface.getDoTask1Button();
          openButton.setText( "Open File" );
          // register listener to call openFile when button pressed
          openButton.addActionListener(
             // anonymous inner class to handle openButton event
             new ActionListener() {
                // close file and terminate application
                public void actionPerformed( ActionEvent event )
                   openFile();
             } // end anonymous inner class
          ); // end call to addActionListener
          // register window listener for window closing event
          addWindowListener(
             // anonymous inner class to handle windowClosing event
             new WindowAdapter() {
                // close file and terminate application
                public void windowClosing( WindowEvent event )
                   if ( input != null )
                             closeFile();
                   System.exit( 0 );
             } // end anonymous inner class
          ); // end call to addWindowListener
          // get reference to generic task button doTask2 from BankUI
          nextButton = userInterface.getDoTask2Button();
          nextButton.setText( "Next Record" );
          nextButton.setEnabled( false );
          // register listener to call readRecord when button pressed
          nextButton.addActionListener(
             // anonymous inner class to handle nextRecord event
             new ActionListener() {
                // call readRecord when user clicks nextRecord
                public void actionPerformed( ActionEvent event )
                   readRecord();
             } // end anonymous inner class
          ); // end call to addActionListener
          //get reference to generic task button do Task3 from BankUI
          // get reference to generic task button doTask3 from BankUI
          nextRecordButton = userInterface.getDoTask3Button();
          nextRecordButton.setText( "Get Next Record" );
          nextRecordButton.setEnabled( false );
          // register listener to call readRecord when button pressed
          nextRecordButton.addActionListener(
             // anonymous inner class to handle nextRecord event
             new ActionListener() {
                // call readRecord when user clicks nextRecord
                public void actionPerformed( ActionEvent event )
                   getNextRecord();
             } // end anonymous inner class
          ); // end call to addActionListener
          pack();
          setSize( 600, 300 );
          setVisible( true );
       } // end ReadSequentialFile constructor
       // enable user to select file to open
       private void openFile()
          // display file dialog so user can select file to open
          JFileChooser fileChooser = new JFileChooser();
          fileChooser.setFileSelectionMode( JFileChooser.FILES_ONLY );
          int result = fileChooser.showOpenDialog( this );
          // if user clicked Cancel button on dialog, return
          if ( result == JFileChooser.CANCEL_OPTION )
             return;
          // obtain selected file
          File fileName = fileChooser.getSelectedFile();
          // display error if file name invalid
          if ( fileName == null || fileName.getName().equals( "" ) )
             JOptionPane.showMessageDialog( this, "Invalid File Name",
                "Invalid File Name", JOptionPane.ERROR_MESSAGE );
          else {
             // open file
             try {
                input = new ObjectInputStream(
                   new FileInputStream( fileName ) );
                openButton.setEnabled( false );
                nextButton.setEnabled( true );
             // process exceptions opening file
             catch ( IOException ioException ) {
                JOptionPane.showMessageDialog( this, "Error Opening File",
                   "Error", JOptionPane.ERROR_MESSAGE );
          } // end else
       } // end method openFile
       // read record from file
       public void readRecord()
          Employee record;
          // input the values from the file
          try {
                  record = ( Employee ) input.readObject();
                   employeeList[count++]= record;
                   store.add(record);
              store.displayAll();
              System.out.println("Count is " + store.getCount());
             // create array of Strings to display in GUI
             String values[] = {
                        String.valueOf(record.getName()),
                            String.valueOf(record.getGender()),
                        String.valueOf( record.getDateOfBirth()),
                        String.valueOf( record.getID()),
                             String.valueOf( record.getStartDate()),
                        String.valueOf( record.getSalary()),
                        String.valueOf( record.getAddress()),
                           String.valueOf( record.getNatInsNo()),
                        String.valueOf( record.getPhone())
    // i added all those bits above split onto one line to look neater
             // display record contents
             userInterface.setFieldValues( values );
          // display message when end-of-file reached
          catch ( EOFException endOfFileException ) {
             nextButton.setEnabled( false );
          nextRecordButton.setEnabled( true );
             JOptionPane.showMessageDialog( this, "No more records in file",
                "End of File", JOptionPane.ERROR_MESSAGE );
          // display error message if class is not found
          catch ( ClassNotFoundException classNotFoundException ) {
             JOptionPane.showMessageDialog( this, "Unable to create object",
                "Class Not Found", JOptionPane.ERROR_MESSAGE );
          // display error message if cannot read due to problem with file
          catch ( IOException ioException ) {
             JOptionPane.showMessageDialog( this,
                "Error during read from file",
                "Read Error", JOptionPane.ERROR_MESSAGE );
       } // end method readRecord
       private void getNextRecord()
               Employee record = employeeList[next++%count];//cycles throught accounts
          //create aray of string to display in GUI
          String values[] = {String.valueOf(record.getName()),
             String.valueOf(record.getGender()),
              String.valueOf( record.getStartDate() ), String.valueOf( record.getAddress()),
         String.valueOf( record.getNatInsNo()),
         String.valueOf( record.getPhone()),
             String.valueOf( record.getID() ),
               String.valueOf( record.getDateOfBirth() ),
         String.valueOf( record.getSalary() ) };
         //display record contents
         userInterface.setFieldValues(values);
         //display record contents
      // again i nicked these write them on one line
      // close file and terminate application
       private void closeFile()
          // close file and exit
          try {
             input.close();
             System.exit( 0 );
          // process exception while closing file
          catch ( IOException ioException ) {
             JOptionPane.showMessageDialog( this, "Error closing file",
                "Error", JOptionPane.ERROR_MESSAGE );
             System.exit( 1 );
       } // end method closeFile
       public static void main( String args[] )
          new ReadSequentialFile();
    } // end class ReadSequentialFile

    I tired putting both codes together and got this, it runs but does not do what i want can anybody help me put the above two codes together as one
    import java.io.*;
    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    import bank.BankUI;
    import bank.*;
    public class togehter extends JFrame {
       private ObjectOutputStream output;
       private BankUI userInterface;
       private JButton enterButton, openButton;
       //private Store store; wont work if i un comment this
       private Employee record;
    // from read
         private ObjectInputStream input;
         private JButton nextButton, openButton2, nextRecordButton ;
            private Store store = new Store(100);
         private Employee employeeList[] = new Employee[100];
         private int count = 0, next = 0;
    // end of read
       // set up GUI
       public togehter()
          super( "Creating a Sequential File of Objects" ); // appears in top of gui
          // create instance of reusable user interface
          userInterface = new BankUI( 9 );  //  textfields
          getContentPane().add( userInterface, BorderLayout.CENTER );
          // configure button doTask1 for use in this program
          openButton = userInterface.getDoTask1Button();
          openButton.setText( "Save to file" );
          // register listener to call openFile when button pressed
          openButton.addActionListener(
             // anonymous inner class to handle openButton event
             new ActionListener() {
                // call openFile when button pressed
                public void actionPerformed( ActionEvent event )
                   openFile();
             } // end anonymous inner class
          ); // end call to addActionListener
    // from read
          // get reference to generic task button doTask1 from BankUI
          openButton2 = userInterface.getDoTask1Button();
          openButton2.setText( "Open File" );
          // register listener to call openFile when button pressed
          openButton2.addActionListener(
             // anonymous inner class to handle openButton2 event
             new ActionListener() {
                // close file and terminate application
                public void actionPerformed( ActionEvent event )
                   openFile();
             } // end anonymous inner class
          ); // end call to addActionListener
    // from read end
    // from read
    // register window listener for window closing event
          addWindowListener(
             // anonymous inner class to handle windowClosing event
             new WindowAdapter() {
                // close file and terminate application
                public void windowClosing( WindowEvent event )
                   if ( input != null )
                             closeFile();
                   System.exit( 0 );
             } // end anonymous inner class
          ); // end call to addWindowListener
    //from read end
    // from read
       // get reference to generic task button doTask2 from BankUI
          nextButton = userInterface.getDoTask2Button();
          nextButton.setText( "Next Record" );
          nextButton.setEnabled( false );
          // register listener to call readRecord when button pressed
          nextButton.addActionListener(
             // anonymous inner class to handle nextRecord event
             new ActionListener() {
                // call readRecord when user clicks nextRecord
                public void actionPerformed( ActionEvent event )
                   readRecord();
             } // end anonymous inner class
          ); // end call to addActionListener
          //get reference to generic task button do Task3 from BankUI
          // get reference to generic task button doTask3 from BankUI
          nextRecordButton = userInterface.getDoTask3Button();
          nextRecordButton.setText( "Get Next Record" );
          nextRecordButton.setEnabled( false );
          // register listener to call readRecord when button pressed
          nextRecordButton.addActionListener(
             // anonymous inner class to handle nextRecord event
             new ActionListener() {
                // call readRecord when user clicks nextRecord
                public void actionPerformed( ActionEvent event )
                   getNextRecord();
             } // end anonymous inner class
          ); // end call to addActionListener
    // from read end
          // configure button doTask2 for use in this program
          enterButton = userInterface.getDoTask2Button();
          enterButton.setText( "Save to file..." );
          enterButton.setEnabled( false );  // disable button
          // register listener to call addRecord when button pressed
          enterButton.addActionListener(
             // anonymous inner class to handle enterButton event
             new ActionListener() {
                // call addRecord when button pressed
                public void actionPerformed( ActionEvent event )
                   addRecord();
             } // end anonymous inner class
          ); // end call to addActionListener
          // register window listener to handle window closing event
          addWindowListener(
             // anonymous inner class to handle windowClosing event
             new WindowAdapter() {
                // add current record in GUI to file, then close file
                public void windowClosing( WindowEvent event )
                             if ( output != null )
                                addRecord();
                                  closeFile();
             } // end anonymous inner class
          ); // end call to addWindowListener
          setSize( 600, 500 );
          setVisible( true );
         store = new Store(100);
       } // end CreateSequentialFile constructor
       // allow user to specify file name
       private void openFile()
          // display file dialog, so user can choose file to open
          JFileChooser fileChooser = new JFileChooser();
          fileChooser.setFileSelectionMode( JFileChooser.FILES_ONLY );
          int result = fileChooser.showSaveDialog( this );
          // if user clicked Cancel button on dialog, return
          if ( result == JFileChooser.CANCEL_OPTION )
             return;
          File fileName = fileChooser.getSelectedFile(); // get selected file
          // display error if invalid
          if ( fileName == null || fileName.getName().equals( "" ) )
             JOptionPane.showMessageDialog( this, "Invalid File Name",
                "Invalid File Name", JOptionPane.ERROR_MESSAGE );
          else {
             // open file
             try {
                output = new ObjectOutputStream(
                   new FileOutputStream( fileName ) );
                openButton.setEnabled( false );
                enterButton.setEnabled( true );
             // process exceptions from opening file
             catch ( IOException ioException ) {
                JOptionPane.showMessageDialog( this, "Error Opening File",
                   "Error", JOptionPane.ERROR_MESSAGE );
          } // end else
       } // end method openFile
    // from read
    public void readRecord()
          Employee record;
          // input the values from the file
          try {
                  record = ( Employee ) input.readObject();
                   employeeList[count++]= record;
                   store.add(record);/////////ADDS record to Store
              store.displayAll();
              System.out.println("Count is " + store.getCount());
             // create array of Strings to display in GUI
             String values[] = {
                        String.valueOf(record.getName()),
                            String.valueOf(record.getGender()),
                        String.valueOf( record.getDateOfBirth()),
                        String.valueOf( record.getID()),
                             String.valueOf( record.getStartDate()),
                        String.valueOf( record.getSalary()),
                        String.valueOf( record.getAddress()),
                           String.valueOf( record.getNatInsNo()),
                        String.valueOf( record.getPhone())
             // display record contents
             userInterface.setFieldValues( values );
          // display message when end-of-file reached
          catch ( EOFException endOfFileException ) {
             nextButton.setEnabled( false );
          nextRecordButton.setEnabled( true );
             JOptionPane.showMessageDialog( this, "No more records in file",
                "End of File", JOptionPane.ERROR_MESSAGE );
          // display error message if class is not found
          catch ( ClassNotFoundException classNotFoundException ) {
             JOptionPane.showMessageDialog( this, "Unable to create object",
                "Class Not Found", JOptionPane.ERROR_MESSAGE );
          // display error message if cannot read due to problem with file
          catch ( IOException ioException ) {
             JOptionPane.showMessageDialog( this,
                "Error during read from file",
                "Read Error", JOptionPane.ERROR_MESSAGE );
       } // end method readRecord
    //from read end
    // from read
    private void getNextRecord()
               Employee record = employeeList[next++%count];//cycles throught accounts
          //create aray of string to display in GUI
          String values[] = {String.valueOf(record.getName()),
             String.valueOf(record.getGender()),
              String.valueOf( record.getStartDate() ), String.valueOf( record.getAddress()),
         String.valueOf( record.getNatInsNo()),
         String.valueOf( record.getPhone()),
             String.valueOf( record.getID() ),
               String.valueOf( record.getDateOfBirth() ),
         String.valueOf( record.getSalary() ) };
         //display record contents
         userInterface.setFieldValues(values);
         //display record contents
    // from read end
       // close file and terminate application
       private void closeFile()
          // close file
          try {
                                            int storeSize = store.getCount();
                                            for (int i = 0; i<storeSize;i++)
                                            output.writeObject(store.elementAt(i));
             output.close();
    input.close(); // from read
             System.exit( 0 );
          // process exceptions from closing file
          catch( IOException ioException ) {
             JOptionPane.showMessageDialog( this, "Error closing file",
                "Error", JOptionPane.ERROR_MESSAGE );
             System.exit( 1 );
       } // end method closeFile
       // add record to file
       public void addRecord()
          int employeeNumber = 0;
          String fieldValues[] = userInterface.getFieldValues();
          // if account field value is not empty
          if ( ! fieldValues[ BankUI.IDNUMBER ].equals( "" ) ) {
             // output values to file
             try {
                employeeNumber = Integer.parseInt(
                   fieldValues[ BankUI.IDNUMBER ] );
                        String dob = fieldValues[ BankUI.DOB ];
                        String[] dateofBirth = dob.split ("-"); // what used to put between number chnage to /
                        String sDate = fieldValues[ BankUI.START ];
                        String[] startDate = sDate.split ("-");
                        String sex = fieldValues[ BankUI.GENDER ];
                        char gender = (sex.charAt(0)); // check if m or f prob check in employee
    if ( employeeNumber >= 0 ) {
                    record  = new Employee(
                    fieldValues[ BankUI.NAME ],
                        gender,
                    new Date(     Integer.parseInt(dateofBirth[0]),
                              Integer.parseInt(dateofBirth[1]),
                              Integer.parseInt(dateofBirth[2])),
                        fieldValues[ BankUI.ADDRESS ],
                        fieldValues[ BankUI.NATINTNO ],
                        fieldValues[ BankUI.PHONE ],
                        fieldValues[ BankUI.IDNUMBER ],
              new Date(     Integer.parseInt(startDate[0]),
                              Integer.parseInt(startDate[1]),
                              Integer.parseInt(startDate[2])),
              Float.parseFloat( fieldValues[ BankUI.SALARY ] ));
                        if (!store.isFull())
                             store.add(record);
                        else
                        JOptionPane.showMessageDialog( this, "The Store is full you cannot add\n"+
                         "anymore employees. \nPlease Save Current File and Create a New File." );
                             System.out.println("Store full");
                        store.displayAll();
                        System.out.println("Count is " + store.getCount());
                             output.flush();
                else
                    JOptionPane.showMessageDialog( this,
                       "Account number must be greater than 0",
                       "Bad account number", JOptionPane.ERROR_MESSAGE );
                // clear textfields
                userInterface.clearFields();
             } // end try
             // process invalid account number or balance format
             catch ( NumberFormatException formatException ) {
                JOptionPane.showMessageDialog( this,
                   "Bad ID number, Date or Salary", "Invalid Number Format",
                   JOptionPane.ERROR_MESSAGE );
             // process exceptions from file output
             catch ( ArrayIndexOutOfBoundsException ArrayException ) {
                 JOptionPane.showMessageDialog( this, "Error with Start Date or Date of Birth",
                    "IO Exception", JOptionPane.ERROR_MESSAGE );
                      // process exceptions from file output
             catch ( IOException ioException ) {
                 JOptionPane.showMessageDialog( this, "Error writing to file",
                    "IO Exception", JOptionPane.ERROR_MESSAGE );
                closeFile();
          } // end if
       } // end method addRecord
       public static void main( String args[] )
          new togehter();
    } // end class CreateSequentialFileI GOT IT WORKING BUT THERE WAS A WEIRD ERROR I GET WHEN TRYING TO READ A FILE I JUST WROTE THE THREAD FOR THAT CAN BE FOUND:
    http://forum.java.sun.com/thread.jspa?threadID=5147209
    Message was edited by:
    ajrobson

  • Need help merging two users

    I mistakenly have 2 users profiles for my desktop and want to merge them into one. Any advice?

    Apps should be stored in the application folder. Either user should have access to them. If not, check the accounts an make sure they are not restricted.
    For the iTunes accounts, if you have music in both users, then you can't simply merge the 2 accounts.
    What you need to do is decide which account you are going to keep. Log into the other account you are going to delete.
    For iTunes, you will need to export the music Library to another drive. If you have no other drive, then export the music library to the desktop. Then, move or copy that to the desktop of the other user. Desktop should be the only file you have access to on the other user.
    For any other files, copy them to the external drive or to the desktop of the other user. You might want to just copy the whole user folder to the desktop of the other user. Then all files will be availabel.
    Once the above is done, log back into the user you want to keep. For iTunes, open the application and import the music from the exported music file you did earlier. Then all music should be in one library.
    Next, copy or move any files from the other files or user folder you copied to the desktop.
    Once all is done and working OK, then just delete the other account and all files on the desktop no longer needed.

  • I need help fixing my partitions without wiping my current install?

    I deleted my BootCamp partition. Now everything seems a mess.
    In the end, I am trying to reinstall the bootcamp partition with Windows 7, but I am running into problems.
    It looks like there might be an issue with my partition layout.
    Here are the results of "diskutil list"
    /dev/disk0
       #:                       TYPE NAME                    SIZE       IDENTIFIER
       0:      GUID_partition_scheme                        *750.2 GB   disk0
       1:                        EFI                         209.7 MB   disk0s1
       2:          Apple_CoreStorage                         749.3 GB   disk0s2
       3:                 Apple_Boot Recovery HD             650.0 MB   disk0s3
    /dev/disk1
       #:                       TYPE NAME                    SIZE       IDENTIFIER
       0:                  Apple_HFS Macintosh HD           *498.0 GB   disk1
    and a screenshot of my disks partitions
    It looks like something is very messed up. especially with disk1.
    Also, I am currently decrypting the partition, to see if that opens up more options for fixing this!!
    Any help is truly appreciated.
    Thank you.

    One problem I'm having is that it seems my OS X partition is only 498 GB, while my hard drive is 750GB. I want to give the BootCamp partition the difference (about 250GB) but when I use BootCamp assistant to make a windows install, it steals the space from the 498. I tried to expand the OS X partition from 498 to fill the entire drive using
    sudo diskutil resizeVolume /dev/disk1 R
    but then I get the following error:
    Error obtaining resizing information for grow to maximum
    thanks for any help

  • IMovie HD/08: Need help merging projects from both versions.

    I have some video that was imported using iMovie HD6 (saved to my internal hard drive with some editing already done) and some using iMovie 08. (Save to an external hard drive and unedited). I realized later that iMovie 08 lacks features available on iMovie HD6. I would like to move all video to my external hard drive and merge my projects. I would then like to edit the whole thing on iMovie HD6. I've noticed that I can simply drag my iMovie 08 project directly into iMovie HD6 and directly into my other project. However, it wants to save it to my internal hard drive. (No where near enough space on my internal drive for that). Is it safe to assume that if I were to move my iMovie HD6 project onto my external drive that it would then attempt to import/merge my iMovie 08 project keeping it on my external drive? Also, do I run a risk of losing any editing already done to my iMovie HD6 project if I move it to my external drive? If not, is there a right or wrong way to move it? Also, my external drive is connected to my computer via USB. Am I going to have any problems editing from my external drive because of that?

    I am trying to transfer a movie project I made on my work computer (MacBook Pro, iMovie '08) to my home computer (iMovie HD, iBook). I've transferred the files using a Lacie, but when I open iMovie HD on my personal computer, it does not let me open the project I desire.
    As you have already found, iMovie '08 projects, as such, are not backwards compatible with previous versions of iMovie. iMovie '08's project basically consists of a list of instructions detailing how a project is to be exported while previous versions of iMovie actually rendered physical file segments ordered properly in a physical timeline reference file.
    I can import, but not the whole file, it keeps putting items in the trash. I have exported Mobile, Medium, and Large files.
    Basically you have two options. You can either import your raw footage (the Event clips) and "re-create" a project in iMovie HD or export your iMovie '08 project, complete with edits to an HD compatible format (e.g., DV or AIC/AIFF) and import this file into iMovie HD. Unfortunately, this latter approach will not allow you to "manipulate" your previous edits.
    Basically, I want to be able to open the file in iMovie, in case I wanted to duplicate it or edit it.
    As indicated above, you can import iMovie '08 shared/exported files to iMovie HD but you then have to edit them as source files. To remove a previous edit, you would literally have to delete it from your new project in order to add another.
    I also want to be able to continue burning copies of this movie slideshow to DVD (I created a DVD project using iDVD).
    Previously authored and burned DVDs can be copy-burned by applications like Toast or used to create stored "image" files that can be used to burn new DVDs on an as needed basis in the Mac OS "Burn" folder or using the Disk Utility application. In fact the "image" file can also be created for this purpose from within iDVD.

  • Malware on New Helix (out of the box) / Need Help Accessing Recovery Partition

    Hi,
    I'm working on a problem for my folks.  My dad got my mom a brand spanking new Helix (not exactly a cheap laptop).  
    It came with two pieces of malware:
    1.  Windows 8
    2.  AstroMenda
    Since I can't do anything about #1 and #2 is a serious PITA and the machine is new out of the box (really), I thought I'd just restore the machine from the recovery partition.
    However, I cannot seem to get the machine to boot to recovery mode.
    Enter doesn't seem to do anything (that is the only keystroke suggested by the splash screen).
    F12 gets me a boot menu but I don't see any recovery options.  Selecting the Windows Boot Manager or the Hard Drive itself results in Windows 8 booting.
    F1 gets me the BIOS.  Though I imagine I might be able to set the recovery partition (which #?) to the #1 boot option, I absolutely should not have to do that.
    Shift doesn't do anything (suggested elsewhere on these forums).
    F2 doesn't do anything.
    F11 doesn't do anything.
    Esc doesn't do anything.
    My older lenovo T61p had the ThinkVantage.  I always thought that was pretty goofy but now I'm wishing I had a ThinkVantage.
    BTW, Lenovo Support was USELESS.  They told me to return the machine and transferred me to returns but since my folks were on vacation when it arrived, we are outside the 30 day window, returns wouldn't do an exchange.  They opened a case with Customer Advocacy (never heard of that) but told me I wouldn't hear anything for 3-5 business days and there is no number, website, or email you can call to check your "Customer Advocacy" claim.  That sounds a lot like GFY.

    Hello.
    Open up the Charms Bar - Settings - Click the Power Icon - Hold either Shift button down and press Restart. This will open up the Advanced Startup menu.
    Cheers!
    ThinkPad W540 (20BG) - i7-4800MQ/24GB // ThinkPad T440s (20AQ) - i7-4600U/12GB
    ThinkPad T440p (20AW) - i7-4800MQ/16GB // ThinkPad Helix (3698-6EU) - i5-3337U/4GB
    ThinkPad W520 (4282-W4Q) - i7-2720QM/32GB // ThinkPad T400 (2767-W1C) - P9500/8GB
    ThinkPad T61 (7665-CTO) - T7700/4GB // ThinkPad T60p (8741-C2G) - T7400/4GB

  • Need help - Merging PST & OST

    I'm using outlook 2013. I recently refreshed my Windows 8.1 laptop. After this took place, I reinstalled/configured my outlook for office emails. But now, there are two inbox folders. All the mails before the laptop refresh are in one mailbox and the new
    mails are coming into another mailbox.
    There are now two data files. How do I manage to get all mails in one place?

    Go into File > Account Settings > Account Settings...
    In the E-mail tab, do you see one or two mailboxes listed? Are you seeing an Exchange account and a POP3/IMAP account? If you're seeing two mailboxes, if you select the Exchange account, at the bottom does it say that the account delivers new messages to
    the .ost file or the .pst file? If it says it's going to the .pst file, if there's an option to "Change Folder" then click that and you'll likely see the non-Exchange mailbox is the one that's selected, in which case select the Exchange mailbox instead
    and click OK.
    Failing that, go into the Data Files tab, do you see two files listed? If it isn't currently, select the .ost file and set it to be default.
    Once you have new mails being delivered to the correct place, assuming the ones which arrived in the interim are only listed in the .pst file then you'll need to copy those over to the correct folder in your Exchange mailbox. Give Outlook time to finish
    copying the data and syncing it to Exchange (eg wait until the message at the bottom says that All folders are up to date), then go back into the account settings and remove the errant .pst mailbox.

  • Need help with Free case program in Canada

    hi, I just recently brought 2 iPhones unlocked from Canadian apple store
    I do have apple ID but my billing is in Thailand, not Canada, so when I logged on to app store(Thailand), i could NOT find the free case App. Unless I signed out and search, i would find them in Canadian app store.
    I'm student and I do not have any Credit card in Canada
    Is there another way to get the free case? What should I do?

    From what I understand (as a retailer) the program in Canada will be the same as the U.S.
    iPhone 4 Bumper Program
    If you have already purchased an iPhone 4 without a case, or will purchase an iPhone 4 next week in Canada, you will use the newly released application
    to claim the free iPhone 4 case. The claim your case, follow the process below:
    1.) Download the iPhone 4 Case Program app from the App Store (not available in Canada yet).
    2.) Launch the app on your iPhone 4. Sign in using your iTunes/Apple ID.
    3.) Select your case.
    Notes:
    * For iPhone 4 purchases made before July 23, 2010, customers must apply to the program no later than August 22, 2010; otherwise, customers can apply within 30 days of their iPhone 4 purchase.
    * To qualify for the case program, customer must have purchased their iPhone 4 by September 30, 2010.

  • Need help merging & consolidating 2 iTunes Music Folders on the same drive

    I have2 iTunes Music Folders on the hard drive of my iMac. Each folder is 80+ gigs and there are many duplicates in each folder. Currently iTunes is pulling songs from each folder. I would like to combine the contents of each folder in to one. What is the best way to do this, with out making a complete mess of my iTunes library.

    Natalie Beresford, "Multiple iPods/iTunes Installations", 04:04am Nov 26, 2004 CDT

Maybe you are looking for

  • My browser on my Curve will only save low resolution pictures. Help!

    For some reason now, everytime I browse on the internet and find a picture I want to save, it will view it and save it in a very low resolution instead of its normal resolution. Why is that? I have tried freeing up memory and I have all my media save

  • Which power adapter for Europe

    I will be visiting Russia soon and I would need a power adapter for both my macbook pro and my iphone, any idea of what is needed? Thanks!

  • Gmail problems on new iPad

    Hi all I can't access gmail via the default mail client on the new iPad or my YouTube account. The passwords are correct, so would appreciate any help you can provide. THank you

  • Profit center actual line items

    Hello ALL, What is the profit center actual line items display report in NEW GL -  ecc 6.0.I want to see all the line items posted to all accounts by profit center wise  in a particular period. Thanks, Sai.

  • After Effects 6.5 on a Quad Core

    Hello, 1 - Can I use after Effects 6.5 on a Quad core... Will it take advantage of it like CS3. 2 - How much memory should I have for 32 bit version of windows? I don't want to have to upgrade both hardware and software unless I really have to. 3 - A