Need help fixing a bug with this program...

I've been working for hours trying to fix the bug I have with this program...
http://ss.majinnet.com/AccountManager.java - This is the source code of my program
http://ss.majinnet.com/Dalzhim.jpg - This is an image used inside the program
http://ss.majinnet.com/sphereaccu.scp - This is a text file you need to use the program
First of all, to know what bug I am talking about.. You will need to download those 3 files.. Then you can compile AccountManager.java and run it.. When the program has opened, go into: File -> Open Account File
and browse until you can open up the text file sphereaccu.scp ... Then there should be a list of names appearing on the left, and when you select any, there will be variables appearing in the TextFields on the right. When that's done, all you have to do to see where the bugs are is to use the options: Edit -> Create New Account as well as Edit -> Remove Account ... When you use the Create New Account option for the first time, it works fine.. But when you use it a second time, errors are appearing on the console (can't find what generates those errors...). And the biggest problem is that when you use the Remove Account option, it doesn't remove the selected account, and over that it generates errors in the console as well...
If anyone can help me fix those errors, I'd be very grateful !

won't pretend to understand everything or why you do somethings, but FWIW,
//package Dalzhim.AccountManager;
import java.io.*;
import java.awt.*;
import java.util.*;
import javax.swing.*;
import java.awt.event.*;
import javax.swing.event.*;
public class AccountManager
      JFrame window;
      Container mainPane;
      JSplitPane splitPane;
      JPanel leftPane,rightPane;
      JList accountList;
      JTextField accountName,plevel,priv,password,totaltime,lasttime,lastchar,firstconnect;
      JTextField firstIP,lastconnect,lastIP,lang;
      JLabel label1,label2,label3,label4,label5,label6,label7,label8,label9,label10,label11,label12;
      JMenuBar menuBar;
      JMenu file,edit,end;
      JMenuItem open,save,quit,create,remove,search,ab;
      JFileChooser jfc,jfcs;
      JButton searchButton,createButton;
      JTextField searchString,newName,newPassword,newPLevel;
      JDialog searchWindow,createWindow;
      File accountFile = null;
      File savingFile = null;
      FileInputStream fis;
      StringTokenizer st;
      String content;
      String lastSearch = "";
      String[] strings,lines;
      String[] parameters,arguments;
      Vector accountNames;
      Hashtable plevels,privs,passwords,totaltimes,lasttimes,lastchars,firstconnects;
      Hashtable firstIPs,lastconnects,lastIPs,langs;
      String newline = "";
      int[] activated;
      int lastSelection = -1;
      AL al;
      LL ll;
      public static void main(String args[])
      AccountManager am = new AccountManager();
      public AccountManager()
      al = new AL();
      ll = new LL();
      window = new JFrame("Account Manager");
      mainPane = window.getContentPane();
      leftPane = new JPanel();
      rightPane = new JPanel();
      leftPane.setLayout(new GridLayout(1,1,5,5));
      rightPane.setLayout(null);
      splitPane = new JSplitPane(JSplitPane.HORIZONTAL_SPLIT,leftPane,rightPane);
      mainPane.setLayout(new GridLayout(1,1,5,5));
      mainPane.add(splitPane);
      menuBar = new JMenuBar();
      file = new JMenu("File");
      edit = new JMenu("Edit");
      end = new JMenu("?");
      menuBar.add(file);
      menuBar.add(edit);
      menuBar.add(end);
      open = new JMenuItem("Open Account File");
      open.addActionListener(al);
      file.add(open);
      save = new JMenuItem("Save Account File");
      save.addActionListener(al);
      file.add(save);
      quit = new JMenuItem("Quit");
      quit.addActionListener(al);
      file.add(quit);
      create = new JMenuItem("Create New Account");
      create.addActionListener(al);
      edit.add(create);
      remove = new JMenuItem("Remove Selected Account");
      remove.addActionListener(al);
      edit.add(remove);
      search = new JMenuItem("Search");
      search.addActionListener(al);
      edit.add(search);
      ab = new JMenuItem("About");
      ab.addActionListener(al);
      end.add(ab);
      window.setJMenuBar(menuBar);
      accountList = new JList();
      accountList.addListSelectionListener(ll);
      leftPane.add(new JScrollPane(accountList));
      accountName = new JTextField(50);
      plevel = new JTextField(50);
      priv = new JTextField(50);
      password = new JTextField(50);
      totaltime = new JTextField(50);
      lasttime = new JTextField(50);
      lastchar = new JTextField(50);
      firstconnect = new JTextField(50);
      firstIP = new JTextField(50);
      lastconnect = new JTextField(50);
      lastIP = new JTextField(50);
      lang = new JTextField(50);
      label1 = new JLabel("Account Name:");
      label2 = new JLabel("Player Level:");
      label3 = new JLabel("Priv Level:");
      label4 = new JLabel("Password:");
      label5 = new JLabel("Total Connected Time:");
      label6 = new JLabel("Last Connected Time:");
      label7 = new JLabel("Last Character Used:");
      label8 = new JLabel("First Connect Data:");
      label9 = new JLabel("First Connected IP:");
      label10 = new JLabel("Last Connected Date:");
      label11 = new JLabel("Last Connected IP:");
      label12 = new JLabel("Language:");
      rightPane.add(accountName);
      rightPane.add(plevel);
      rightPane.add(priv);
      rightPane.add(password);
      rightPane.add(totaltime);
      rightPane.add(lasttime);
      rightPane.add(lastchar);
      rightPane.add(firstconnect);
      rightPane.add(firstIP);
      rightPane.add(lastconnect);
      rightPane.add(lastIP);
      rightPane.add(lang);
      rightPane.add(label1);
      rightPane.add(label2);
      rightPane.add(label3);
      rightPane.add(label4);
      rightPane.add(label5);
      rightPane.add(label6);
      rightPane.add(label7);
      rightPane.add(label8);
      rightPane.add(label9);
      rightPane.add(label10);
      rightPane.add(label11);
      rightPane.add(label12);
      label1.setBounds(10,10,150,25);
      accountName.setBounds(175,10,200,25);
      label2.setBounds(10,40,150,25);
      plevel.setBounds(175,40,200,25);
      label3.setBounds(10,70,150,25);
      priv.setBounds(175,70,200,25);
      label4.setBounds(10,100,150,25);
      password.setBounds(175,100,200,25);
      label5.setBounds(10,130,150,25);
      totaltime.setBounds(175,130,200,25);
      label6.setBounds(10,160,150,25);
      lasttime.setBounds(175,160,200,25);
      label7.setBounds(10,190,150,25);
      lastchar.setBounds(175,190,200,25);
      label8.setBounds(10,220,150,25);
      firstconnect.setBounds(175,220,200,25);
      label9.setBounds(10,250,150,25);
      firstIP.setBounds(175,250,200,25);
      label10.setBounds(10,280,150,25);
      lastconnect.setBounds(175,280,200,25);
      label11.setBounds(10,310,150,25);
      lastIP.setBounds(175,310,200,25);
      label12.setBounds(10,340,150,25);
      lang.setBounds(175,340,200,25);
      Dimension rightdim = new Dimension(380,425);
      rightPane.setMinimumSize(rightdim);
      window.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
      window.pack();
      window.setSize(550,425);
      window.setResizable(false);
      window.setVisible(true);
      public void openAccountFile()
      byte[] b = null;
      try
         fis = new FileInputStream(accountFile);
         b = new byte[fis.available()];
         fis.read(b,0,fis.available());
      catch(FileNotFoundException e)
      catch(IOException e)
      content = new String(b);
      newline = String.valueOf(content.charAt(content.indexOf("\n")));
      parseAccountFile();
      public void parseAccountFile()
      StringTokenizer st = new StringTokenizer(content, "[");
      strings = new String[st.countTokens()];
      createArrays();
      for (int i=0;i<strings.length;i++)
         strings[i] = st.nextToken();
      for(int i=0;i<strings.length;i++)
         parseAccountParameters(i);
      sort();
      public void parseAccountParameters(int which)
      StringTokenizer st = new StringTokenizer(strings[which],"\n");
      lines = new String[st.countTokens()];
      for(int i=0;i<lines.length;i++)
         lines[i] = st.nextToken();
      parameters = new String[lines.length];
      arguments = new String[lines.length];
      accountNames.add(getAccountName(lines[0]));
      for(int i=1;i<lines.length;i++)
         parseAccountParameter(i,which);
      public void parseAccountParameter(int which,int strings)
      StringTokenizer st = new StringTokenizer(lines[which],"=");
      parameters[which] = st.nextToken();
      if(st.hasMoreTokens())
         arguments[which] = st.nextToken();
      stockValues(strings);
      public void stockValues(int a)
      for(int i=0;i<parameters.length;i++)
         if(arguments!=null)
     if(parameters[i].equals("PLEVEL"))
          plevels.put(accountNames.get(a),arguments[i]);
     else if(parameters[i].equals("PRIV"))
          privs.put(accountNames.get(a),arguments[i]);
     else if(parameters[i].equals("PASSWORD"))
          passwords.put(accountNames.get(a),arguments[i]);
     else if(parameters[i].equals("TOTALCONNECTTIME"))
          totaltimes.put(accountNames.get(a),arguments[i]);
     else if(parameters[i].equals("LASTCONNECTTIME"))
          lasttimes.put(accountNames.get(a),arguments[i]);
     else if(parameters[i].equals("LASTCHARUID"))
          lastchars.put(accountNames.get(a),arguments[i]);
     else if(parameters[i].equals("FIRSTCONNECTDATE"))
          firstconnects.put(accountNames.get(a),arguments[i]);
     else if(parameters[i].equals("FIRSTIP"))
          firstIPs.put(accountNames.get(a),arguments[i]);
     else if(parameters[i].equals("LASTCONNECTDATE"))
          lastconnects.put(accountNames.get(a),arguments[i]);
     else if(parameters[i].equals("LASTIP"))
          lastIPs.put(accountNames.get(a),arguments[i]);
     else if(parameters[i].equals("LANG"))
          langs.put(accountNames.get(a),arguments[i]);
public String getAccountName(String line)
     String name = "";
     for(int i=0;i<line.indexOf("]");i++)
     name = name + (String.valueOf(line.charAt(i)));
     return name;
public void createArrays()
     accountNames = new Vector();
     plevels = new Hashtable();
     privs = new Hashtable();
     passwords = new Hashtable();
     totaltimes = new Hashtable();
     lasttimes = new Hashtable();
     lastchars = new Hashtable();
     firstconnects = new Hashtable();
     firstIPs = new Hashtable();
     lastconnects = new Hashtable();
     lastIPs = new Hashtable();
     langs = new Hashtable();
public void showValues()
     if(lastSelection!=-1)
     //keepValues();
     int i = -1 == accountList.getSelectedIndex() ?
     lastSelection :
     accountList.getSelectedIndex();
     accountName.setText((String)accountNames.get( i ));
     plevel.setText((String)plevels.get(accountNames.get( i )));
     priv.setText((String)privs.get(accountNames.get( i )));
     password.setText((String)passwords.get(accountNames.get( i )));
     totaltime.setText((String)totaltimes.get(accountNames.get( i )));
     lasttime.setText((String)lasttimes.get(accountNames.get( i )));
     lastchar.setText((String)lastchars.get(accountNames.get( i )));
     firstconnect.setText((String)firstconnects.get(accountNames.get( i )));
     firstIP.setText((String)firstIPs.get(accountNames.get( i )));
     lastconnect.setText((String)lastconnects.get(accountNames.get( i )));
     lastIP.setText((String)lastIPs.get(accountNames.get( i )));
     lang.setText((String)langs.get(accountNames.get( i )));
     lastSelection = i ;
public void keepValues()
     accountNames.setElementAt(accountName.getText(),lastSelection);
     plevels.put(accountNames.get(lastSelection),plevel.getText());
     privs.put(accountNames.get(lastSelection),priv.getText());
     passwords.put(accountNames.get(lastSelection),password.getText());
     totaltimes.put(accountNames.get(lastSelection),totaltime.getText());
     lasttimes.put(accountNames.get(lastSelection),lasttime.getText());
     lastchars.put(accountNames.get(lastSelection),lastchar.getText());
     firstconnects.put(accountNames.get(lastSelection),firstconnect.getText());
     firstIPs.put(accountNames.get(lastSelection),firstIP.getText());
     lastconnects.put(accountNames.get(lastSelection),lastconnect.getText());
     lastIPs.put(accountNames.get(lastSelection),lastIP.getText());
     langs.put(accountNames.get(lastSelection),lang.getText());
public void saveAccountFile()
     keepValues();
     String saving = "";
     for(int i=0;i<strings.length;i++)
     saving = saving + ("["+(String)accountNames.get(i)+"]"+newline);
     if(plevels.get((String)accountNames.get(i))!=null && !(plevels.get((String)accountNames.get(i)).equals("")))
     saving = saving + ("PLEVEL="+plevels.get((String)accountNames.get(i))+newline);
     if(privs.get((String)accountNames.get(i))!=null && !(privs.get((String)accountNames.get(i)).equals("")))
     saving = saving + ("PRIV="+privs.get((String)accountNames.get(i))+newline);
     if(passwords.get((String)accountNames.get(i))!=null && !(passwords.get((String)accountNames.get(i)).equals("")))
     saving = saving + ("PASSWORD="+passwords.get((String)accountNames.get(i))+newline);
     if(totaltimes.get((String)accountNames.get(i))!=null && !(totaltimes.get((String)accountNames.get(i)).equals("")))
     saving = saving + ("TOTALCONNECTTIME="+totaltimes.get((String)accountNames.get(i))+newline);
     if(lasttimes.get((String)accountNames.get(i))!=null && !(lasttimes.get((String)accountNames.get(i)).equals("")))
     saving = saving + ("LASTCONNECTTIME="+lasttimes.get((String)accountNames.get(i))+newline);
     if(lastchars.get((String)accountNames.get(i))!=null && !(lastchars.get((String)accountNames.get(i)).equals("")))
     saving = saving + ("LASTCHARUID="+lastchars.get((String)accountNames.get(i))+newline);
     if(firstconnects.get((String)accountNames.get(i))!=null && !(firstconnects.get((String)accountNames.get(i)).equals("")))
     saving = saving + ("FIRSTCONNECTDATE="+firstconnects.get((String)accountNames.get(i))+newline);
     if(firstIPs.get((String)accountNames.get(i))!=null && !(firstIPs.get((String)accountNames.get(i)).equals("")))
     saving = saving + ("FIRSTIP="+firstIPs.get((String)accountNames.get(i))+newline);
     if(lastconnects.get((String)accountNames.get(i))!=null && !(lastconnects.get((String)accountNames.get(i)).equals("")))
     saving = saving + ("LASTCONNECTDATE="+lastconnects.get((String)accountNames.get(i))+newline);
     if(lastIPs.get((String)accountNames.get(i))!=null && !(lastIPs.get((String)accountNames.get(i)).equals("")))
     saving = saving + ("LASTIP="+lastIPs.get((String)accountNames.get(i))+newline);
     if(langs.get((String)accountNames.get(i))!=null && !(langs.get((String)accountNames.get(i)).equals("")))
     saving = saving + ("LANG="+langs.get((String)accountNames.get(i))+newline);
     saving = saving + newline;
     try
     FileOutputStream fos = new FileOutputStream(savingFile);
     fos.write(saving.getBytes());
     catch(FileNotFoundException e)
     catch(IOException e)
public void about()
     final JDialog info = new JDialog(window,"About",true);
     Container aboutPane = info.getContentPane();
     aboutPane.setLayout(null);
     Image image = Toolkit.getDefaultToolkit().getImage(getClass().getResource("Dalzhim.jpg"));
     ImageIcon sig = new ImageIcon(image);
     JLabel sign = new JLabel(sig);
     JLabel text1 = new JLabel("AccountManager v0.2Beta");
     JEditorPane text2 = new JEditorPane();
     JEditorPane text3 = new JEditorPane();
     JEditorPane text4 = new JEditorPane();
     JButton close = new JButton("Okay");
     JEditorPane jep = new JEditorPane();
     sign.setBounds(10,0,374,292);
     text1.setBounds(125,300,250,20);
     text2.setBounds(10,350,400,20);
     text3.setBounds(10,400,400,20);
     text4.setBounds(10,450,400,20);
     close.setBounds(150,500,100,20);
     close.addActionListener(new ActionListener()
          public void actionPerformed(ActionEvent e)
          info.setVisible(false);
     text2.setText("Created by �alzhim");
     text3.setText("Dalzhim, also known as, Amlaruil");
     text4.setText("[email protected] - [email protected]");
     text2.setEditable(false);
     text3.setEditable(false);
     text4.setEditable(false);
     text2.setBackground(new Color(207,207,207));
     text3.setBackground(new Color(207,207,207));
     text4.setBackground(new Color(207,207,207));
     aboutPane.add(sign);
     aboutPane.add(text1);
     aboutPane.add(text2);
     aboutPane.add(text3);
     aboutPane.add(text4);
     aboutPane.add(close);
     jep.setBackground(new Color(207,207,207));
     jep.setEditable(false);
     jep.setText("TEST");
     info.pack();
     info.setSize(400,550);
     info.setResizable(false);
     info.setVisible(true);
public void search()
     searchWindow = new JDialog(window,"Search");
     Container searchPane = searchWindow.getContentPane();
     searchPane.setLayout(null);
     searchString = new JTextField(lastSearch);
     searchButton = new JButton("Search");
     searchString.addActionListener(al);
     searchButton.addActionListener(al);
     searchPane.add(searchString);
     searchPane.add(searchButton);
     searchString.setBounds(10,10,175,25);
     searchButton.setBounds(200,10,100,25);
     searchString.selectAll();
     searchWindow.pack();
     searchWindow.setSize(320,65);
     searchWindow.setResizable(false);
     searchWindow.setVisible(true);
public void search(String what)
     accountList.setSelectedValue(what,true);
public void createAccount()
     createWindow = new JDialog(window,"Create New Account");
     Container createPane = createWindow.getContentPane();
     createPane.setLayout(null);
     newName = new JTextField();
     newPassword = new JTextField();
     newPLevel = new JTextField();
     createButton = new JButton("Create Account");
     JLabel createlabel1 = new JLabel("Account Name:");
     JLabel createlabel2 = new JLabel("Account Password:");
     JLabel createlabel3 = new JLabel("Account PLevel:");
     createPane.add(newName);
     createPane.add(newPassword);
     createPane.add(newPLevel);
     createPane.add(createButton);
     createPane.add(createlabel1);
     createPane.add(createlabel2);
     createPane.add(createlabel3);
     newName.addActionListener(al);
     newPassword.addActionListener(al);
     newPLevel.addActionListener(al);
     createButton.addActionListener(al);
     newName.setBounds(160,10,200,25);
     newPassword.setBounds(160,45,200,25);
     newPLevel.setBounds(160,80,200,25);
     createButton.setBounds(160,115,200,25);
     createlabel1.setBounds(10,10,150,25);
     createlabel2.setBounds(10,45,150,25);
     createlabel3.setBounds(10,80,150,25);
     createWindow.pack();
     createWindow.setSize(375,175);
     createWindow.setResizable(false);
     createWindow.setVisible(true);
public void createProcess()
     String tempname = newName.getText();
     String temppass = newPassword.getText();
     String templeve = newPLevel.getText();
     createWindow.dispose();
     if(!(accountNames.contains(tempname)))
     accountNames.add(tempname);
     sort();
     passwords.put(tempname,temppass);
     plevels.put(tempname,templeve);
     search(newName.getText());
public void sort()
     Object[] sorting = new Object[accountNames.size()];
     accountNames.toArray(sorting);
     String[] sorting2 = new String[sorting.length];
     for(int i=0;i<sorting.length;i++)
     sorting2[i] = (String)sorting[i];
     Arrays.sort(sorting2,String.CASE_INSENSITIVE_ORDER);
     accountNames.clear();
     for(int i=0;i<sorting2.length;i++)
     accountNames.add(sorting2[i]);
     accountList.setListData(accountNames);
public void removeAccount()
     if(accountList.getSelectedIndex()==-1)
     JOptionPane.showMessageDialog(window,"You must select an account from the list to use the Remove option");
     else
     int i = accountList.getSelectedIndex();
     System.out.println( "ra: " + i + " an: " + accountNames.elementAt( i ) );
     System.out.println(accountNames.elementAt( i ));
     plevels.remove(accountNames.elementAt( i ));
     privs.remove(accountNames.elementAt( i ));
     passwords.remove(accountNames.elementAt( i ));
     totaltimes.remove(accountNames.elementAt( i ));
     lasttimes.remove(accountNames.elementAt( i ));
     lastchars.remove(accountNames.elementAt( i ));
     firstconnects.remove(accountNames.elementAt( i ));
     firstIPs.remove(accountNames.elementAt( i ));
     lastconnects.remove(accountNames.elementAt( i ));
     lastIPs.remove(accountNames.elementAt( i ));
     langs.remove(accountNames.elementAt( i ));
     accountNames.removeElementAt( i );
     accountList.setListData( accountNames );
     //sort();
     showValues();
class AL implements ActionListener
     public void actionPerformed(ActionEvent e)
     if(e.getSource()==open)
          jfc = new JFileChooser(accountFile);
          jfc.setDialogTitle("Select your account file");
          jfc.setMultiSelectionEnabled(false);
          jfc.addActionListener(al);
          jfc.showOpenDialog(window);
     else if(e.getSource()==jfc)
          accountFile = jfc.getSelectedFile();
          openAccountFile();
     else if(e.getSource()==save)
          jfcs = new JFileChooser(savingFile);
          jfcs.setDialogTitle("Where do you wish to save?");
          jfcs.setMultiSelectionEnabled(false);
          jfcs.addActionListener(al);
          jfcs.showSaveDialog(window);
     else if(e.getSource()==ab)
          about();
     else if(e.getSource()==jfcs)
          savingFile = jfcs.getSelectedFile();
          saveAccountFile();
     else if(e.getSource()==quit)
          System.exit(-1);
     else if(e.getSource()==search)
          search();
     else if(e.getSource()==searchString)
          searchButton.doClick();
     else if(e.getSource()==searchButton)
          accountList.setSelectedValue(searchString.getText(),true);
          lastSearch = searchString.getText();
          searchWindow.dispose();
     else if(e.getSource()==create)
          createAccount();
     else if(e.getSource()==newName)
          newPassword.requestFocus();
          newPassword.selectAll();
     else if(e.getSource()==newPassword)
          newPLevel.requestFocus();
          newPLevel.selectAll();
     else if(e.getSource()==newPLevel)
          createButton.doClick();
     else if(e.getSource()==createButton)
          if(newName.getText().equals("") || newPassword.getText().equals("") || newPLevel.getText().equals(""))
          createWindow.dispose();
          JOptionPane.showMessageDialog(window,"You have to enter an account name, a password and a plevel");
          else
          createProcess();
     else if(e.getSource()==remove)
          removeAccount();
class LL implements ListSelectionListener
     public void valueChanged(ListSelectionEvent e)
     showValues();

Similar Messages

  • Really need help on how to write this program some 1 plz help me out here.

    i am new to java and i confused on how to be writing this program.
    i have completed the Part 1 but i am stuck on Part 2 & 3 so it would would be really great if any 1 could help me out on how to write the program.
    Part I
    An algorithm describes how a problem is solved in terms of the actions to be executed, and it specifies the order in which the actions should be executed. An algorithm must be detailed enough so that you can "walk" through the algorithm with test data. This means the algorithm must include all the necessary calculations.
    Here is an algorithm that calculates the cost of a rectangular window. The
    total cost of a window is based on two prices; the cost of the glass plus the cost of the metal frame around the glass. The glass is 50 cents per
    square inch (area) and the metal frame is 75 cents per inch (perimeter).
    The length and width of the window will be entered by the user. The
    output of the program should be the length and width (entered by the user)
    and the total cost of the window.
    FORMULAS:
    area = length times width perimeter = 2 times (length plus width)
    Here is the corresponding algorithm:
    read in the length of the window in inches
    read in the width of the window in inches
    compute the area
    compute the cost of the glass (area times 50 cents)
    compute the perimeter
    compute the cost of the frame (perimeter times 75 cents)
    compute the total cost of the window (cost of glass plus cost of frame)
    display the length, width and total cost
    The next step would be to "desk check" the algorithm. First you would need to make up the "test data". For this algorithm, the test data would involve making up a length and a width, and then calculating the cost of the window based on those values. The results are computing by hand or using a calculator. The results of your test data are always calculated before translating your algorithm into a programming language. Here is an example of the test data for the problem given:
    length = 10
    width = 20
    area = 200, glass cost= 100.00 (area times 50 cents)
    perimeter = 60, frame cost = 45.00 (perimeter times 75 cents)
    total cost =145.00
    Once the test data is chosen, you should "walk" through the algorithm using the test data to see if the algorithm produces the same answers that you obtained from your calculations.
    If the results are the same, then you would begin translating your algorithm into a programming language. If the results are not the same, then you would attempt to find out what part of the algorithm is incorrect and correct it. It is also
    necessary to re-check your hand calculations.
    Each time you revise your algorithm, you should walk through it with your test data again. You keep revising your algorithm until it produces the same answers as your test data.
    ?Now write and submit a Java program that will calculate the cost of a rectangular window according to the algorithm explained. Be sure to prompt for input and label your output.?
    Part II
    Write, compile and execute a Java program that displays the following prompts:
    Enter an integer.
    Enter a second integer
    Enter a third integer.
    Enter a fourth integer.
    After each prompt is displayed, your program should use the nextint method of the Scanner class to accept a number from the keyboard for the displayed
    prompt. After the fourth integer has been entered, your program should calculate and display the average of the four integers and the value of the first integer entered raised to the power of the second integer entered. The average and result of raising to a power should be included in an appropriate messages
    (labels).
    Sample Test Data:
    Set 1: 100 100 100 100
    Set 2: 100 0 100 0
    Be sure to write an algorithm first before attempting to write the Java code. Walk through your algorithm with test data to be sure it works as anticipated.
    Part III
    Repeat Part lI but only calculate the average, not the power. This time, make sure to use the same variable name, number, for each of the four numbers input. Also use the variable sum for the sum of the numbers. (Hint: To do this, you may use the statement sum = sum + number after each number is read.)
    For Part 1 this is what i got
    import java.util.Scanner;
    public class Window
         public static void main(String[] args)
              double length, width, glass_cost, perimeter, frame_cost, area, total;
              Scanner keyboard = new Scanner (System.in);
              System.out.println("Enter the length of the window in inches");
              length = keyboard.nextInt();
              System.out.println("Enter the width of the window in inches");
              width = keyboard.nextInt();
              area = length * width;
              glass_cost = area * .5;
              perimeter = 2 * (length + width);
              frame_cost = perimeter * .75;
              total = glass_cost + frame_cost;
                   System.out.println("The Length of the window is " + length + "inches");
                   System.out.println("The Width of the window is " + length + "inches");
                   System.out.println("The total cost of the window is $ " + total);
         Enter the length of the window in inches
         5
         Enter the width of the window in inches
         8
         The Length of the window is 5.0inches
         The Width of the window is 5.0inches
         The total cost of the window is $ 39.5
    Press any key to continue . . .
    Edited by: Adhi on Feb 24, 2008 10:33 AM

    Adhi wrote:
    i am new to java and i confused on how to be writing this program.
    i have completed the Part 1 but i am stuck on Part 2 & 3 so it would would be really great if any 1 could help me out on how to write the program.Looks like homework to me.
    What have you written so far? Post it.
    Part I
    An algorithm describes how a problem is solved in terms of the actions to be executed, and it specifies the order in which the actions should be executed. An algorithm must be detailed enough so that you can "walk" through the algorithm with test data. This means the algorithm must include all the necessary calculations.
    Here is an algorithm that calculates the cost of a rectangular window. The
    total cost of a window is based on two prices; the cost of the glass plus the cost of the metal frame around the glass. The glass is 50 cents per
    square inch (area) and the metal frame is 75 cents per inch (perimeter).
    The length and width of the window will be entered by the user. The
    output of the program should be the length and width (entered by the user)
    and the total cost of the window.
    FORMULAS:
    area = length times width perimeter = 2 times (length plus width)
    Here is the corresponding algorithm:
    read in the length of the window in inches
    read in the width of the window in inches
    compute the area
    compute the cost of the glass (area times 50 cents)
    compute the perimeter
    compute the cost of the frame (perimeter times 75 cents)
    compute the total cost of the window (cost of glass plus cost of frame)
    display the length, width and total cost
    The next step would be to "desk check" the algorithm. First you would need to make up the "test data". For this algorithm, the test data would involve making up a length and a width, and then calculating the cost of the window based on those values. The results are computing by hand or using a calculator. The results of your test data are always calculated before translating your algorithm into a programming language. Here is an example of the test data for the problem given:
    length = 10
    width = 20
    area = 200, glass cost= 100.00 (area times 50 cents)
    perimeter = 60, frame cost = 45.00 (perimeter times 75 cents)
    total cost =145.00
    Once the test data is chosen, you should "walk" through the algorithm using the test data to see if the algorithm produces the same answers that you obtained from your calculations.
    If the results are the same, then you would begin translating your algorithm into a programming language. If the results are not the same, then you would attempt to find out what part of the algorithm is incorrect and correct it. It is also
    necessary to re-check your hand calculations.
    Each time you revise your algorithm, you should walk through it with your test data again. You keep revising your algorithm until it produces the same answers as your test data.
    &#147;Now write and submit a Java program that will calculate the cost of a rectangular window according to the algorithm explained. Be sure to prompt for input and label your output.&#148;
    Part II
    Write, compile and execute a Java program that displays the following prompts:
    Enter an integer.
    Enter a second integer
    Enter a third integer.
    Enter a fourth integer.
    After each prompt is displayed, your program should use the nextint method of the Scanner class to accept a number from the keyboard for the displayed
    prompt. After the fourth integer has been entered, your program should calculate and display the average of the four integers and the value of the first integer entered raised to the power of the second integer entered. The average and result of raising to a power should be included in an appropriate messages
    (labels).
    Sample Test Data:
    Set 1: 100 100 100 100
    Set 2: 100 0 100 0
    Be sure to write an algorithm first before attempting to write the Java code. Walk through your algorithm with test data to be sure it works as anticipated.So this is where you actually have to do something. My guess is that you've done nothing so far.
    Part III
    Repeat Part lI but only calculate the average, not the power. This time, make sure to use the same variable name, number, for each of the four numbers input. Also use the variable sum for the sum of the numbers. (Hint: To do this, you may use the statement sum = sum + number after each number is read.)Man, this specification writes itself. Sit down and start coding.
    One bit of advice: Nobody here takes kindly to lazy, stupid students who are just trying to con somebody into doing their homework for them. If that's you, better have your asbestos underpants on.
    %

  • C# Programming - I Need Help Putting a Loop into this Program!

    using System;
    using System.Collections.Generic;
    using System.Linq;
    using System.Text;
    using System.Threading.Tasks;
    using System.IO;
    namespace Homework_2
        class Program
            static void Main(string[] args)
                    Console.WriteLine("Enter the First Value:");
                    var number1StringValue = Console.ReadLine();
                    Console.WriteLine("Enter the Second Value");
                    var number2StringValue = Console.ReadLine();
                    var number1 = Convert.ToDouble(number1StringValue);
                    var number2 = Convert.ToDouble(number2StringValue);
                    var sum = number1 + number2;
                    var difference = number1 - number2;
                    var product = number1 * number2;
                    var quotient = number1 / number2;
                    var remainder = number1 % number2;
                    Console.WriteLine("The Sum Is:");
                    Console.WriteLine(sum);
                    Console.WriteLine("The Difference Is:");
                    Console.WriteLine(difference);
                    Console.WriteLine("The Product Is:");
                    Console.WriteLine(product);
                    Console.WriteLine("The Quotient Is:");
                    Console.WriteLine(quotient);
                    Console.WriteLine("The Remainder Is:");
                    Console.WriteLine(remainder);
                        string answer;
                        Console.Write("Would You Like to Calculate More Numbers? Type: [Yes] or [No]");
                        answer = Console.ReadLine();
                        if (answer.Equals("Yes", StringComparison.InvariantCultureIgnoreCase))
                            Console.WriteLine("You Answered: Yes... The Program Will Continue");
                            Console.WriteLine("Not Really, I do not have enough knowledge to make this Program Loop, Sorry.");
                            Console.WriteLine("Press Any Key To Continue!");
                            Console.ReadKey();
    // THIS IS WHERE I NEED THE PROGRAM TO LOOP AGAIN. 
                        else if (answer.Equals("No", StringComparison.InvariantCultureIgnoreCase))
                            Console.WriteLine("You Answered: No... Press Any Key To Stop Program");
                            Console.ReadKey();
    }

     static void Main(string[] args)
               bool done = false;
               while( !done )
                    Console.WriteLine("Enter the First Value:");
                    var number1StringValue = Console.ReadLine();
                    Console.WriteLine("Enter the Second Value");
                    var number2StringValue = Console.ReadLine();
                    var number1 = Convert.ToDouble(number1StringValue);
                    var number2 = Convert.ToDouble(number2StringValue);
                    var sum = number1 + number2;
                    var difference = number1 - number2;
                    var product = number1 * number2;
                    var quotient = number1 / number2;
                    var remainder = number1 % number2;
                    Console.WriteLine("The Sum Is:");
                    Console.WriteLine(sum);
                    Console.WriteLine("The Difference Is:");
                    Console.WriteLine(difference);
                    Console.WriteLine("The Product Is:");
                    Console.WriteLine(product);
                    Console.WriteLine("The Quotient Is:");
                    Console.WriteLine(quotient);
                    Console.WriteLine("The Remainder Is:");
                    Console.WriteLine(remainder);
                        string answer;
                        Console.Write("Would You Like to
    Calculate More Numbers? Type: [Yes] or [No]");
                        answer = Console.ReadLine();
                        if (answer.Equals("Yes", StringComparison.InvariantCultureIgnoreCase))
                            Console.WriteLine("You
    Answered: Yes... The Program Will Continue");
                            Console.WriteLine("Not
    Really, I do not have enough knowledge to make this Program Loop, Sorry.");
                            Console.WriteLine("Press
    Any Key To Continue!");
                            Console.ReadKey();
    // THIS IS WHERE I NEED THE PROGRAM TO LOOP AGAIN. 
                        else if (answer.Equals("No",
    StringComparison.InvariantCultureIgnoreCase))
                            Console.WriteLine("You
    Answered: No... Press Any Key To Stop Program");
                            Console.ReadKey();
                            done = true;

  • OLAP ... Adobe example used; need help fixing a bug (clearing variables on error)

    Okay ...
    So I used one of the Adobe examples except now it's part of a container and it's using a datasource instead of the flatfile the example uses.  Also, for some reason I need to create a button instead of using the creationComplete to get it to work.  My problem is if the button is clicked to fast while it's loading the data (since another part of the application has a dropdown menu so you can requery information) you get an error and for some reason, you'll still get the same error even if the data is fully loaded and even if you change the parameter to reload the data.  My feeling is that the variables are not getting cleared out after it throws the error.
    So my question is what is the best way to clear out the variables (and how) when it throws an error.  The code for the page is below.
    Joe
    <?xml version="1.0" encoding="utf-8"?>
    <v:MaxRestorePanel xmlns:mx="http://www.adobe.com/2006/mxml"
        xmlns:v="views.*"
        layout="vertical"
        creationComplete="creationCompleteHandler3();">
        <mx:Script>
          <![CDATA[
            import mx.collections.ICollectionView;
            import mx.rpc.AsyncResponder;
            import mx.rpc.AsyncToken;
            import mx.olap.OLAPQuery;
            import mx.olap.OLAPSet;
            import mx.olap.IOLAPQuery;
            import mx.olap.IOLAPQueryAxis;
            import mx.olap.IOLAPCube;
            import mx.olap.OLAPResult;
            import mx.events.CubeEvent;
            import mx.controls.Alert;
            import mx.collections.ArrayCollection;
            [Bindable]
            public var dp:ICollectionView = null;
            // Format of Objects in the ArrayCollection:
            //  data:Object = {
            //    customer:"AAA",
            //    product:"ColdFusion",
            //    quarter:"Q1"
            //    revenue: "100.00"
            private function creationCompleteHandler3():void {
                // You must initialize the cube before you
                // can execute a query on it.
                myMXMLCube3.refresh();
            // Create the OLAP query.
            private function getQuery(cube:IOLAPCube):IOLAPQuery {
                // Create an instance of OLAPQuery to represent the query.
                var query:OLAPQuery = new OLAPQuery;
                // Get the row axis from the query instance.
                var rowQueryAxis:IOLAPQueryAxis =
                    query.getAxis(OLAPQuery.ROW_AXIS);
                // Create an OLAPSet instance to configure the axis.
                var productSet:OLAPSet = new OLAPSet;
                // Add the Product to the row to aggregate data
                // by the Product dimension.
                productSet.addElements(
                    cube.findDimension("ProductDim").findAttribute("Product").children);
                // Add the OLAPSet instance to the axis.
                rowQueryAxis.addSet(productSet);
                // Get the column axis from the query instance, and configure it
                // to aggregate the columns by the Quarter dimension.
                var colQueryAxis:IOLAPQueryAxis =
                    query.getAxis(OLAPQuery.COLUMN_AXIS);        
                var quarterSet:OLAPSet= new OLAPSet;
                quarterSet.addElements(
                    cube.findDimension("QuarterDim").findAttribute("HLMC").children);
                colQueryAxis.addSet(quarterSet);
                return query;      
            // Event handler to execute the OLAP query
            // after the cube completes initialization.
            private function runQuery(event:CubeEvent):void {
                // Get cube.
                var cube:IOLAPCube = IOLAPCube(event.currentTarget);
                // Create a query instance.
                var query:IOLAPQuery = getQuery(cube);
                // Execute the query.
                var token:AsyncToken = cube.execute(query);
                // Setup handlers for the query results.
                token.addResponder(new AsyncResponder(showResult, showFault));
            // Handle a query fault.
            private function showFault(result:Object, token:Object):void {
                Alert.show("Error in query.");
            // Handle a successful query by passing the query results to
            // the OLAPDataGrid control..
            private function showResult(result:Object, token:Object):void {
                if (!result) {
                    Alert.show("No results from query.");
                    return;
                myOLAPDG3.dataProvider= result as OLAPResult;           
          ]]>
        </mx:Script>
        <mx:OLAPCube name="FlatSchemaCube" dataProvider="{dp}" id="myMXMLCube3" complete="runQuery(event);">
            <mx:OLAPDimension name="CustomerDim">
                <mx:OLAPAttribute name="Customer" dataField="TITLE_NAME"/>
                <mx:OLAPHierarchy name="CustomerHier" hasAll="true">
                    <mx:OLAPLevel attributeName="Customer"/>
                </mx:OLAPHierarchy>
            </mx:OLAPDimension>
            <mx:OLAPDimension name="ProductDim">
                <mx:OLAPAttribute name="Product" dataField="CORP_SITE"/>
                <mx:OLAPHierarchy name="ProductHier" hasAll="true">
                    <mx:OLAPLevel attributeName="Product"/>
                </mx:OLAPHierarchy>
            </mx:OLAPDimension>
            <mx:OLAPDimension name="QuarterDim">
                <mx:OLAPAttribute name="HLMC" dataField="HLMC"/>
                <mx:OLAPHierarchy name="QuarterHier" hasAll="true">
                    <mx:OLAPLevel attributeName="HLMC"/>
                </mx:OLAPHierarchy>
            </mx:OLAPDimension>
            <mx:OLAPMeasure name="Revenue"
                dataField="CUR_YR_1"
                aggregator="SUM"/>
        </mx:OLAPCube>
             <mx:OLAPDataGrid id="myOLAPDG3" defaultCellString="-" textAlign="right" color="0x323232" width="100%" height="100%"/>
            <mx:ControlBar id="controls">       
            <mx:Button label="Pull Details" click="creationCompleteHandler3();"/>
            </mx:ControlBar>
    </v:MaxRestorePanel>

    Okay ...
    So I used one of the Adobe examples except now it's part of a container and it's using a datasource instead of the flatfile the example uses.  Also, for some reason I need to create a button instead of using the creationComplete to get it to work.  My problem is if the button is clicked to fast while it's loading the data (since another part of the application has a dropdown menu so you can requery information) you get an error and for some reason, you'll still get the same error even if the data is fully loaded and even if you change the parameter to reload the data.  My feeling is that the variables are not getting cleared out after it throws the error.
    So my question is what is the best way to clear out the variables (and how) when it throws an error.  The code for the page is below.
    Joe
    <?xml version="1.0" encoding="utf-8"?>
    <v:MaxRestorePanel xmlns:mx="http://www.adobe.com/2006/mxml"
        xmlns:v="views.*"
        layout="vertical"
        creationComplete="creationCompleteHandler3();">
        <mx:Script>
          <![CDATA[
            import mx.collections.ICollectionView;
            import mx.rpc.AsyncResponder;
            import mx.rpc.AsyncToken;
            import mx.olap.OLAPQuery;
            import mx.olap.OLAPSet;
            import mx.olap.IOLAPQuery;
            import mx.olap.IOLAPQueryAxis;
            import mx.olap.IOLAPCube;
            import mx.olap.OLAPResult;
            import mx.events.CubeEvent;
            import mx.controls.Alert;
            import mx.collections.ArrayCollection;
            [Bindable]
            public var dp:ICollectionView = null;
            // Format of Objects in the ArrayCollection:
            //  data:Object = {
            //    customer:"AAA",
            //    product:"ColdFusion",
            //    quarter:"Q1"
            //    revenue: "100.00"
            private function creationCompleteHandler3():void {
                // You must initialize the cube before you
                // can execute a query on it.
                myMXMLCube3.refresh();
            // Create the OLAP query.
            private function getQuery(cube:IOLAPCube):IOLAPQuery {
                // Create an instance of OLAPQuery to represent the query.
                var query:OLAPQuery = new OLAPQuery;
                // Get the row axis from the query instance.
                var rowQueryAxis:IOLAPQueryAxis =
                    query.getAxis(OLAPQuery.ROW_AXIS);
                // Create an OLAPSet instance to configure the axis.
                var productSet:OLAPSet = new OLAPSet;
                // Add the Product to the row to aggregate data
                // by the Product dimension.
                productSet.addElements(
                    cube.findDimension("ProductDim").findAttribute("Product").children);
                // Add the OLAPSet instance to the axis.
                rowQueryAxis.addSet(productSet);
                // Get the column axis from the query instance, and configure it
                // to aggregate the columns by the Quarter dimension.
                var colQueryAxis:IOLAPQueryAxis =
                    query.getAxis(OLAPQuery.COLUMN_AXIS);        
                var quarterSet:OLAPSet= new OLAPSet;
                quarterSet.addElements(
                    cube.findDimension("QuarterDim").findAttribute("HLMC").children);
                colQueryAxis.addSet(quarterSet);
                return query;      
            // Event handler to execute the OLAP query
            // after the cube completes initialization.
            private function runQuery(event:CubeEvent):void {
                // Get cube.
                var cube:IOLAPCube = IOLAPCube(event.currentTarget);
                // Create a query instance.
                var query:IOLAPQuery = getQuery(cube);
                // Execute the query.
                var token:AsyncToken = cube.execute(query);
                // Setup handlers for the query results.
                token.addResponder(new AsyncResponder(showResult, showFault));
            // Handle a query fault.
            private function showFault(result:Object, token:Object):void {
                Alert.show("Error in query.");
            // Handle a successful query by passing the query results to
            // the OLAPDataGrid control..
            private function showResult(result:Object, token:Object):void {
                if (!result) {
                    Alert.show("No results from query.");
                    return;
                myOLAPDG3.dataProvider= result as OLAPResult;           
          ]]>
        </mx:Script>
        <mx:OLAPCube name="FlatSchemaCube" dataProvider="{dp}" id="myMXMLCube3" complete="runQuery(event);">
            <mx:OLAPDimension name="CustomerDim">
                <mx:OLAPAttribute name="Customer" dataField="TITLE_NAME"/>
                <mx:OLAPHierarchy name="CustomerHier" hasAll="true">
                    <mx:OLAPLevel attributeName="Customer"/>
                </mx:OLAPHierarchy>
            </mx:OLAPDimension>
            <mx:OLAPDimension name="ProductDim">
                <mx:OLAPAttribute name="Product" dataField="CORP_SITE"/>
                <mx:OLAPHierarchy name="ProductHier" hasAll="true">
                    <mx:OLAPLevel attributeName="Product"/>
                </mx:OLAPHierarchy>
            </mx:OLAPDimension>
            <mx:OLAPDimension name="QuarterDim">
                <mx:OLAPAttribute name="HLMC" dataField="HLMC"/>
                <mx:OLAPHierarchy name="QuarterHier" hasAll="true">
                    <mx:OLAPLevel attributeName="HLMC"/>
                </mx:OLAPHierarchy>
            </mx:OLAPDimension>
            <mx:OLAPMeasure name="Revenue"
                dataField="CUR_YR_1"
                aggregator="SUM"/>
        </mx:OLAPCube>
             <mx:OLAPDataGrid id="myOLAPDG3" defaultCellString="-" textAlign="right" color="0x323232" width="100%" height="100%"/>
            <mx:ControlBar id="controls">       
            <mx:Button label="Pull Details" click="creationCompleteHandler3();"/>
            </mx:ControlBar>
    </v:MaxRestorePanel>

  • Need help writing a code for this program

    Design a code that reads a sentence and prints each individual word on a different line

    tsith's suggestion is excellent. Run it and see what happens. I just did that myself and doing so I learned something new about the Scanner class.
    Before you run it, add a couple of extra System.out.println for (hopefully) illustrating debugging purposes:
    import java.lang.String;
    import java.util.Scanner;
    public class Sentence {
        // main line of program
        public static void main(String[] args) {
            boolean z;
            String a;
            Scanner keyboard = new Scanner(System.in);
            System.out.print("Enter sentence: ");
            z = keyboard.hasNext();
            while (z) {
                System.out.println("z = " + z + ". Fetching the next word...");
                a = keyboard.next();
                System.out.println(a);
            System.out.println("Done!");
    }Let us know if the program ever prints "Done!" to the console. While you are waiting, read what the javadocs has to say about the Scanner class, and pay extra attention to what it says about the hasNext() and next() methods:
    http://java.sun.com/j2se/1.5.0/docs/api/java/util/Scanner.html

  • I need help fixing this... i can't get PDF to open

    [2011-08-07:20:00:49] Launching subprocess with commandline c:\Program Files (x86)\Common Files\Adobe AIR\Versions\1.0\Resources\Adobe AIR Updater -installupdatecheck
    [2011-08-07:20:00:49] Runtime Installer end with exit code 0
    [2011-08-07:20:00:49] Runtime Installer begin with version 2.7.0.19530 on Windows 7 x86
    [2011-08-07:20:00:49] Commandline is: -installupdatecheck
    [2011-08-07:20:00:49] Installed runtime (2.7.0.19530) located at c:\Program Files (x86)\Common Files\Adobe AIR
    [2011-08-07:20:00:49] Performing pingback request
    [2011-08-07:20:00:50] Pingback request completed with HTTP status 200
    [2011-08-07:20:00:50] Starting runtime background update check
    [2011-08-07:20:00:50] Begin Background update download from http://airdownload.adobe.com/air/3/background/windows/x86/patch/2.7.0.19530/update
    [2011-08-07:20:00:50] Unpackaging http://airdownload.adobe.com/air/3/background/windows/x86/patch/2.7.0.19530/update to C:\Users\Troy M\AppData\Roaming\Adobe\AIR\Updater\Background
    [2011-08-07:20:00:50] Runtime update not available
    [2011-08-07:20:00:50] Unpackaging cancelled
    [2011-08-07:20:00:50] Runtime Installer end with exit code 0
    [2011-08-07:20:01:23] Application Installer begin with version 2.7.0.19530 on Windows 7 x86
    [2011-08-07:20:01:23] Commandline is: "C:\Users\Troy M\PamperedPartnerPlus\workspace\.report\SalesReceiptReport_08082011_010122AM.pdf"
    [2011-08-07:20:01:23] Installed runtime (2.7.0.19530) located at c:\Program Files (x86)\Common Files\Adobe AIR
    [2011-08-07:20:01:24] Unpackaging file:///C:/Users/Troy%20M/PamperedPartnerPlus/workspace/.report/SalesReceiptReport_080820 11_010122AM.pdf to C:\Users\Troy M\AppData\Local\Temp\fla54C3.tmp
    [2011-08-07:20:01:24] Got an unexpected fatal error while unpackaging: [ErrorEvent type="error" bubbles=false cancelable=false eventPhase=2 text="not an AIR file" errorID=0]
    [2011-08-07:20:01:29] Application Installer end with exit code 7
    [2011-08-07:20:01:33] Runtime Installer begin with version 2.7.0.19530 on Windows 7 x86
    [2011-08-07:20:01:33] Commandline is: -arp:uninstall
    [2011-08-07:20:01:33] Installed runtime (2.7.0.19530) located at c:\Program Files (x86)\Common Files\Adobe AIR
    [2011-08-07:20:01:37] Relaunching with elevation
    [2011-08-07:20:01:37] Launching subprocess with commandline c:\program files (x86)\common files\adobe air\versions\1.0\resources\adobe air updater.exe -eu
    [2011-08-07:20:01:37] Runtime Installer begin with version 2.7.0.19530 on Windows 7 x86
    [2011-08-07:20:01:37] Commandline is: -stdio \\.\pipe\AIR_2996_0 -eu
    [2011-08-07:20:01:37] Installed runtime (2.7.0.19530) located at c:\Program Files (x86)\Common Files\Adobe AIR
    [2011-08-07:20:01:37] Starting runtime uninstall. Uninstalling runtime version 2.7.0.19530
    [2011-08-07:20:01:37] Uninstalling product with GUID {FDB3B167-F4FA-461D-976F-286304A57B2A}
    [2011-08-07:20:01:39] Runtime Installer end with exit code 0
    [2011-08-07:20:01:39] Elevated install completed
    [2011-08-07:20:01:39] Runtime Installer end with exit code 0
    [2011-08-08:05:12:23] Runtime Installer begin with version 2.7.0.19530 on Windows 7 x86
    [2011-08-08:05:12:23] Commandline is: -silent
    [2011-08-08:05:12:23] No installed runtime detected
    [2011-08-08:05:12:23] Starting silent runtime install. Installing runtime version 2.7.0.19530
    [2011-08-08:05:12:24] Installing msi at c:\users\troym~1\appdata\local\temp\airb8a4.tmp\setup.msi with guid {FDB3B167-F4FA-461D-976F-286304A57B2A}
    [2011-08-08:05:12:43] Runtime Installer end with exit code 0
    [2011-08-08:05:14:53] Application Installer begin with version 2.7.0.19530 on Windows 7 x86
    [2011-08-08:05:14:53] Commandline is: "C:\Users\Troy M\PamperedPartnerPlus\workspace\.report\SalesReceiptReport_08082011_101451AM.pdf"
    [2011-08-08:05:14:53] Installed runtime (2.7.0.19530) located at c:\Program Files (x86)\Common Files\Adobe AIR
    [2011-08-08:05:14:54] Unpackaging file:///C:/Users/Troy%20M/PamperedPartnerPlus/workspace/.report/SalesReceiptReport_080820 11_101451AM.pdf to C:\Users\Troy M\AppData\Local\Temp\fla1120.tmp
    [2011-08-08:05:14:54] Got an unexpected fatal error while unpackaging: [ErrorEvent type="error" bubbles=false cancelable=false eventPhase=2 text="not an AIR file" errorID=0]
    [2011-08-08:05:15:01] Application Installer end with exit code 7
    [2011-08-08:05:16:11] Application Installer begin with version 2.7.0.19530 on Windows 7 x86
    [2011-08-08:05:16:11] Commandline is: "C:\Users\Troy M\PamperedPartnerPlus\workspace\.report\ShowSummaryReport_08082011_101610AM.pdf"
    [2011-08-08:05:16:11] Installed runtime (2.7.0.19530) located at c:\Program Files (x86)\Common Files\Adobe AIR
    [2011-08-08:05:16:11] Unpackaging file:///C:/Users/Troy%20M/PamperedPartnerPlus/workspace/.report/ShowSummaryReport_0808201 1_101610AM.pdf to C:\Users\Troy M\AppData\Local\Temp\fla3F41.tmp
    [2011-08-08:05:16:11] Got an unexpected fatal error while unpackaging: [ErrorEvent type="error" bubbles=false cancelable=false eventPhase=2 text="not an AIR file" errorID=0]
    [2011-08-08:05:16:16] Application Installer end with exit code 7
    [2011-08-08:06:29:43] Application Installer begin with version 2.7.0.19530 on Windows 7 x86
    [2011-08-08:06:29:43] Commandline is: "C:\Users\Troy M\Documents\hs_11jul.pdf"
    [2011-08-08:06:29:43] Installed runtime (2.7.0.19530) located at c:\Program Files (x86)\Common Files\Adobe AIR
    [2011-08-08:06:29:44] Unpackaging file:///C:/Users/Troy%20M/Documents/hs_11jul.pdf to C:\Users\Troy M\AppData\Local\Temp\fla13FC.tmp
    [2011-08-08:06:29:45] Got an unexpected fatal error while unpackaging: [ErrorEvent type="error" bubbles=false cancelable=false eventPhase=2 text="not an AIR file" errorID=0]
    [2011-08-08:06:29:46] Application Installer end with exit code 7
    [2011-08-08:06:30:25] Runtime Installer begin with version 2.7.0.19530 on Windows 7 x86
    [2011-08-08:06:30:25] Commandline is:
    [2011-08-08:06:30:25] Installed runtime (2.7.0.19530) located at c:\Program Files (x86)\Common Files\Adobe AIR
    [2011-08-08:06:30:28] Launching subprocess with commandline c:\Program Files (x86)\Common Files\Adobe AIR\Versions\1.0\Resources\Adobe AIR Updater -installupdatecheck
    [2011-08-08:06:30:28] Runtime Installer end with exit code 0
    [2011-08-08:06:30:29] Runtime Installer begin with version 2.7.0.19530 on Windows 7 x86
    [2011-08-08:06:30:29] Commandline is: -installupdatecheck
    [2011-08-08:06:30:29] Installed runtime (2.7.0.19530) located at c:\Program Files (x86)\Common Files\Adobe AIR
    [2011-08-08:06:30:29] Performing pingback request
    [2011-08-08:06:30:29] Pingback request completed with HTTP status 200
    [2011-08-08:06:30:29] Starting runtime background update check
    [2011-08-08:06:30:29] Begin Background update download from http://airdownload.adobe.com/air/3/background/windows/x86/patch/2.7.0.19530/update
    [2011-08-08:06:30:29] Unpackaging http://airdownload.adobe.com/air/3/background/windows/x86/patch/2.7.0.19530/update to C:\Users\Troy M\AppData\Roaming\Adobe\AIR\Updater\Background
    [2011-08-08:06:30:30] Runtime update not available
    [2011-08-08:06:30:30] Unpackaging cancelled
    [2011-08-08:06:30:30] Runtime Installer end with exit code 0
    [2011-08-08:06:31:02] Application Installer begin with version 2.7.0.19530 on Windows 7 x86
    [2011-08-08:06:31:02] Commandline is: "C:\Users\Troy M\Documents\hs_11jul.pdf"
    [2011-08-08:06:31:02] Installed runtime (2.7.0.19530) located at c:\Program Files (x86)\Common Files\Adobe AIR
    [2011-08-08:06:31:02] Unpackaging file:///C:/Users/Troy%20M/Documents/hs_11jul.pdf to C:\Users\Troy M\AppData\Local\Temp\fla43F2.tmp
    [2011-08-08:06:31:02] Got an unexpected fatal error while unpackaging: [ErrorEvent type="error" bubbles=false cancelable=false eventPhase=2 text="not an AIR file" errorID=0]
    [2011-08-08:06:31:05] Application Installer end with exit code 7
    [2011-08-08:06:31:08] Application Installer begin with version 2.7.0.19530 on Windows 7 x86
    [2011-08-08:06:31:08] Commandline is: "C:\Users\Troy M\Documents\hs_11jul.pdf"
    [2011-08-08:06:31:08] Installed runtime (2.7.0.19530) located at c:\Program Files (x86)\Common Files\Adobe AIR
    [2011-08-08:06:31:08] Unpackaging file:///C:/Users/Troy%20M/Documents/hs_11jul.pdf to C:\Users\Troy M\AppData\Local\Temp\fla5C13.tmp
    [2011-08-08:06:31:08] Got an unexpected fatal error while unpackaging: [ErrorEvent type="error" bubbles=false cancelable=false eventPhase=2 text="not an AIR file" errorID=0]
    [2011-08-08:06:31:10] Application Installer end with exit code 7
    [2011-08-08:06:31:25] Runtime Installer begin with version 2.7.0.19530 on Windows 7 x86
    [2011-08-08:06:31:25] Commandline is: -arp:uninstall
    [2011-08-08:06:31:25] Installed runtime (2.7.0.19530) located at c:\Program Files (x86)\Common Files\Adobe AIR
    [2011-08-08:06:31:27] Runtime Installer end with exit code 6
    [2011-08-08:06:32:54] Application Installer begin with version 2.7.0.19530 on Windows 7 x86
    [2011-08-08:06:32:54] Commandline is: "C:\Users\Troy M\PamperedPartnerPlus\workspace\.report\ShowSummaryReport_08082011_113253AM.pdf"
    [2011-08-08:06:32:54] Installed runtime (2.7.0.19530) located at c:\Program Files (x86)\Common Files\Adobe AIR
    [2011-08-08:06:32:55] Unpackaging file:///C:/Users/Troy%20M/PamperedPartnerPlus/workspace/.report/ShowSummaryReport_0808201 1_113253AM.pdf to C:\Users\Troy M\AppData\Local\Temp\flaFB7D.tmp
    [2011-08-08:06:32:55] Got an unexpected fatal error while unpackaging: [ErrorEvent type="error" bubbles=false cancelable=false eventPhase=2 text="not an AIR file" errorID=0]
    [2011-08-08:06:34:32] Application Installer end with exit code 7
    [2011-08-08:06:36:06] Application Installer begin with version 2.7.0.19530 on Windows 7 x86
    [2011-08-08:06:36:06] Commandline is: "C:\Users\Troy M\PamperedPartnerPlus\workspace\.report\ShowSummaryReport_08082011_113606AM.pdf"
    [2011-08-08:06:36:06] Installed runtime (2.7.0.19530) located at c:\Program Files (x86)\Common Files\Adobe AIR
    [2011-08-08:06:36:06] Unpackaging file:///C:/Users/Troy%20M/PamperedPartnerPlus/workspace/.report/ShowSummaryReport_0808201 1_113606AM.pdf to C:\Users\Troy M\AppData\Local\Temp\flaE83C.tmp
    [2011-08-08:06:36:06] Got an unexpected fatal error while unpackaging: [ErrorEvent type="error" bubbles=false cancelable=false eventPhase=2 text="not an AIR file" errorID=0]
    [2011-08-08:06:36:08] Application Installer end with exit code 7
    [2011-08-08:06:40:11] Application Installer begin with version 2.7.0.19530 on Windows 7 x86
    [2011-08-08:06:40:11] Commandline is: "C:\Users\Troy M\PamperedPartnerPlus\workspace\.report\ShowSummaryReport_08082011_114010AM.pdf"
    [2011-08-08:06:40:11] Installed runtime (2.7.0.19530) located at c:\Program Files (x86)\Common Files\Adobe AIR
    [2011-08-08:06:40:11] Unpackaging file:///C:/Users/Troy%20M/PamperedPartnerPlus/workspace/.report/ShowSummaryReport_0808201 1_114010AM.pdf to C:\Users\Troy M\AppData\Local\Temp\flaA488.tmp
    [2011-08-08:06:40:11] Got an unexpected fatal error while unpackaging: [ErrorEvent type="error" bubbles=false cancelable=false eventPhase=2 text="not an AIR file" errorID=0]
    [2011-08-08:06:40:17] Application Installer end with exit code 7
    [2011-08-08:06:41:40] Application Installer begin with version 2.7.0.19530 on Windows 7 x86
    [2011-08-08:06:41:40] Commandline is: "C:\Users\Troy M\PamperedPartnerPlus\workspace\.report\SalesReceiptReport_08082011_114140AM.pdf"
    [2011-08-08:06:41:40] Installed runtime (2.7.0.19530) located at c:\Program Files (x86)\Common Files\Adobe AIR
    [2011-08-08:06:41:40] Unpackaging file:///C:/Users/Troy%20M/PamperedPartnerPlus/workspace/.report/SalesReceiptReport_080820 11_114140AM.pdf to C:\Users\Troy M\AppData\Local\Temp\fla138.tmp
    [2011-08-08:06:41:41] Got an unexpected fatal error while unpackaging: [ErrorEvent type="error" bubbles=false cancelable=false eventPhase=2 text="not an AIR file" errorID=0]
    [2011-08-08:06:42:57] Application Installer begin with version 2.7.0.19530 on Windows 7 x86
    [2011-08-08:06:42:57] Commandline is: "C:\Users\Troy M\PamperedPartnerPlus\workspace\.report\SalesReceiptReport_08082011_114257AM.pdf"
    [2011-08-08:06:42:57] Installed runtime (2.7.0.19530) located at c:\Program Files (x86)\Common Files\Adobe AIR
    [2011-08-08:06:42:57] Unpackaging file:///C:/Users/Troy%20M/PamperedPartnerPlus/workspace/.report/SalesReceiptReport_080820 11_114257AM.pdf to C:\Users\Troy M\AppData\Local\Temp\fla2E11.tmp
    [2011-08-08:06:42:58] Got an unexpected fatal error while unpackaging: [ErrorEvent type="error" bubbles=false cancelable=false eventPhase=2 text="not an AIR file" errorID=0]
    [2011-08-08:06:43:02] Application Installer end with exit code 7
    [2011-08-08:06:44:48] Application Installer end with exit code 7

    i have reader... and this is the error message i get when i attempt to open one
    sorry, an error has occured.
    The application could not be installed because the installer file is damaged.  Try obtaining a new installer file from the application author.
    Date: Mon, 8 Aug 2011 11:19:37 -0600
    From: [email protected]
    To: [email protected]
    Subject: I need help fixing this... i can't get PDF to open
    To open files with the .pdf extension, please use http://get.adobe.com/reader/.
    Thanks,
    Chris
    >

  • I need help fixing this asap

    I'm just new to java so this code is not be the best way to do it but anyways I need to fix the repainting in this asap since its due in about 1 1/2 hrs I tried every thing I know but so far none has worked. I really don't care much about efficiency now. What's wrong with this and how do I fix this?
         public void moveDisc(int n, int s, int d, int x)
              if(s != d) {
                   if(n == 1)
                        transferDisc(s,d);
                   if (n > 1)
                        moveDisc(n-1,s,x,d);
                        transferDisc(s,d);
                        moveDisc(n-1,x,d,s);
         public void transferDisc(int s, int d) {
              cntnt[d][cntnt[d][0]+1] = cntnt[s][cntnt[s][0]];
              cntnt[s][cntnt[s][0]] = 0;
              cntnt[s][0]--;
              cntnt[d][0]++;
              peg[1].removeAll();
              peg[2].removeAll();
              peg[3].removeAll();
              for(int y = 1; y < 4; y++) {
                   peg[y].add(Box.createVerticalGlue());
                   for(int x = 7; x > 0; x--) {
                        if(cntnt[y][x] != 0)
                             peg[y].add(discs[cntnt[y][x]]);
              peg[1].repaint();
              peg[2].repaint();
              peg[3].repaint();
              movDisplay.setText(Integer.toString(++ctr));
              try {
                   Thread.sleep(1000);
              } catch(InterruptedException ie) {}
         }

    the peg[] are JPanels.
    I think it's probably in the repaint since the
    program waits for the sum total of the sleeptime and
    does nothing until the time is over then it displays
    the final position after the time is up.Very much possible. You tell the AWT thread to repaint, but right after you tell it to do nothing for a second. It's be easier if there were a correct view-model separation, you could time the changes to the model and the view would paint whatever state the model is in, without the need to wait for anything.

  • ITunes needs to fix the problem with there gift cards not being activated this is not up to the retailer and they will not return scratched coded cards! There is thousands of people having this problem please fix it

    iTunes needs to fix the problem with there iTunes cards not activating properly! This is not the retailers fault and they will not return iTunes cards that have had the code area scratched there for apple needs to credit and or activated the cards there is thousands of people having this problem please bite the bullet and fix it already I will not be using iTunes until this is corrected...

    If you haven't received the item then try the 'report a problem' page to contact iTunes Support : http://reportaproblem.apple.com
    If the 'report a problem' link doesn't work then you can try contacting iTunes support via this page : http://www.apple.com/support/itunes/contact/- click on Contact iTunes Store Support on the right-hand side of the page, then Purchases, Billing & Redemption

  • I need help with my shockwave flash it is crashed i need help fixing

    I need help with shockwave flash it is crash i need help fixing it

    http://forums.adobe.com/thread/1195540

  • Help with Note cards?? I thought I could do them with this program...

    Help! I purchased Adobe Photoshop Elements 12 back in September, but due to computer problems and working on other projects, I just got started using it. Or at least I'm trying to!
    My main (read: pretty well ONLY) reason for purchasing was that I thought I could make note cards (photo on front, folded, like a blank card, but with one of my photos on the front) for personal use and Christmas gift for my aunt who writes a lot of notes. I really wanted to create a special gift for her, as well as unique cards for my own use.
    But when I open the program and click "Create" all I see is Greeting Cards! And when I click on it, I don't see anything like what I want to create! Help! Is there any way to create this type of card with this program? Or at least close? I would really appreciate ANY and ALL help!!!
    Thanks!

    Hi,
    You can try going to finder, hitting CMD + F and below search this mac, you should see kind. You can try switching that contents and the second option to documents.
    Hope this helps,
    Zevie

  • Hi, Need help about ios7 upgrade, after this upgrade I cannot watch youtube or any video with my Ipad,

    Hi, Need help about ios7 upgrade, after this upgrade I cannot watch youtube or any video with Ipad, and Iphone as well
    I think my wireless rooter's setting has some problem but cannot found anything to solve,
    I can watch if there is another wireless network , I tried this option in another place who has wireless network and I can watch.
    Do you have any idea to do these setting , I dont have any problem when Ipad has 6.1.3 IOS,
    need help
    thanks

    Thanks
    I will and share the result.

  • Well my ipod 4th gen was updated it shut off and now when i try to turn it on it stays on the apple logo for abit then gets stuck on a white screen od blue or mixed colores i really need help fixing this plzz help :(

    Well my ipod 4th gen was updated it shut off and now when i try to turn it on it stays on the apple logo for abit then gets stuck on a white screen od blue or mixed colores i really need help fixing this plzz help

    Try:
    - iOS: Not responding or does not turn on
    - Also try DFU mode after try recovery mode
    How to put iPod touch / iPhone into DFU mode « Karthik's scribblings
    - If not successful and you can't fully turn the iOS device fully off, let the battery fully drain. After charging for an least an hour try the above again.
    - Try on another computer
    - If still not successful that usually indicates a hardware problem and an appointment at the Genius Bar of an Apple store is in order.
    Apple Retail Store - Genius Bar       

  • I deleted aperture and now my sistem is acting crazy. I desperately need help fixing it.Can anyone help me please?

    I deleted aperture and now my sistem is acting crazy.The dock disappeared and almost all icons are gone except for their names.I have an important project for tomorrow and I desperately need help fixing it.Can anyone help me please?

    Well it all started with Aperture 3 trying to import some photos from my iphone.It took ages to import those photos and like I was in a hurry to finish my work in Illustrator so I tryied to force quit on A3 and it didn´t, so I shut down the computer and started over.it was all ok but I uninstalled the A3 and the I realized the icons were back to original form and a few fonts changed.so I Installed the trial version of A3.I did a restart of the system and then there was.aperture lauching but no dock and a 80% of the icons disappeared, but the names of the files and folder remained.and I cand acces the apps from the apple sign on the left corner.I tried also restarting a few time but it´s always the same.I am a recent user of a mac , and please excuse my bad english.If this is in any way useful please help me!

  • I did a manual restore but it gave me an error it was 3914 i need help fixing it.

    i did a manual restore but it gave me an error it was 3914 i need help fixing it.

    From this Apple support document: iTunes: Specific update-and-restore error messages and advanced troubleshooting
    This device is not eligible for the requested build: Also sometimes displayed as an "error 3194." If you receive this alert, update to the latest version of iTunes. Third-party security software or router security settings can also cause this issue. To resolve this, follow Troubleshooting security software issues.
    Downgrading to a previous version of iOS is not supported. If you have installed software to perform unauthorized modifications to your iOS device, that software may have redirected connections to the update server (gs.apple.com) within the Hosts file. First you must uninstall the unauthorized modification software from the computer, then edit out the "gs.apple.com" redirect from the hosts file, and then restart the computer for the host file changes to take affect.  For steps to edit the Hosts file and allow iTunes to communicate with the update server, see iTunes: Troubleshooting iTunes Store on your computer, iPhone, iPad, or iPod—follow steps under the headingBlocked by configuration (Mac OS X / Windows) > Rebuild network information > The hosts file may also be blocking the iTunes Store. If you do not uninstall the unauthorized modification software prior to editing the hosts file, that software may automatically modify the hosts file again on restart. Also, using an older or modified .ipsw file can cause this issue. Try moving the current .ipsw file, or try restoring in a new user to ensure that iTunes downloads a new .ipsw.
    Error 3194: Resolve error 3194 by updating to the latest version of iTunes. "This device is not eligible for the requested build" in the updater logs confirms this is the root of the issue. For more Error 3194 steps see: This device is not eligible for the requested build above.
    B-rock

  • Can I fix a disk with this message?-Disk Utility can't repair this disk. Back up as many of your files as possible, reformat the disk, and restore your backed-up files.

    Can I fix a disk with this message?
    Disk Utility can’t repair this disk. Back up as many of your files as possible, reformat the disk, and restore your backed-up files.

    Some problems can indeed be fixed this way. But working from Recovery_HD or Disk Warrior DVDs and working in the restricted environment those provide can be difficult. You can literally spend days working on this problem (while your regular work is unavailable) only to discover the old drive is unsalvageable.
    There is no way to know up front whether you are facing a major Hardware failure or a minor software glitch, or something in between. Often you are forced to work from the drive you no longer trust. I continue to recommend you do this work from a different, fully functioning Mac OS X booted from a different drive.
    If you have had the foresight to (as The hatter often recommends) clone your virgin install onto another drive for use in such situations, you will be able to recover from such problems in record time. If not, my previous recommendations stands:
    Buy a new Drive. Or  two. Install Mac OS X from scratch on a new drive, and get your Mac running again. Later, you can use the full power of Mac OS X to attempt to rescue your data, if needed. Then Zero the old drive, to see if it can hold data again reliably.
    If the old drive eventually provides some needed data, and is salvageable, Merry Christmas.

Maybe you are looking for

  • TS1398 iPhone wifi connection problem

    My iPhone 5s recognizes my wi-fi when I am in the house but it is still working off Verizon which has a weak signal. How do I get it to work off the wi-fi when I am in the house? I just re-set the wi-fi but no change--still connecting to Verizon.

  • Iphoto 11 can't read my nikon D7000 raw files, why?

    I bought the latest Macbook air 13 inches and the Nikon D7000. I tried to import the raw files (NEF) from the Nikon d7000, but it show can't read the files type, or unsupported image file. It works fine with my nikon D5000, why? anyone can help?

  • Startup problems w/ Power Mac G4 (QuickSilver 2002) M8667LL (dual 1 GHz)?

    Startup problems w/ Power Mac G4 (QuickSilver 2002) M8667LL (dual 1 GHz) Starts up with bong and then a long wait then screen comes on with old time smiley Mac and spinning beach ball then another long wait and then OS X loading bar and then a panic

  • [multithread] newbie here ... is inputStream shared?

    Hi, a newbie here. I've been playing with java for six month now and it's been pretty fun. Looking forward to learn more about java from this forum. Now I have a question about this little project I've been doing. I'm currently developing a multi-thr

  • MOV imports get cropped in CS5.  Help.

    I imported footage from my iphone (MOV files).  On Premiere Pro, the footage is cropped all around.  How do I fix this?  Oh, I have no idea about settings, where to find them or what any of the configurations mean.  thank you, Liana