Help me with this program

Hi all,
I am trying to executr this .it is compiled and running but it ids giving no out put.(def.doc not found)
import org.apache.poi.hdf.extractor.util.*;
import org.apache.poi.hdf.extractor.data.*;
import org.apache.poi.hdf.extractor.*;
import java.util.*;
import java.io.*;
import javax.swing.*;
import java.awt.*;
import org.apache.poi.poifs.filesystem.POIFSFileSystem;
import org.apache.poi.poifs.filesystem.POIFSDocument;
import org.apache.poi.poifs.filesystem.DocumentEntry;
import org.apache.poi.util.LittleEndian;
class hdf {
String origFileName;
String tempFile;
WordDocument wd;
hdf(String origFileName, String tempFile) {
this.tempFile=tempFile;
this.origFileName=origFileName;
public void getText() {
try {
wd = new WordDocument(origFileName);
Writer out = new BufferedWriter(new FileWriter(tempFile));
wd.writeAllText(out);
out.flush();
out.close();
catch (Exception eN) {
System.out.println("Error reading document:"+origFileName+"\n"+eN.toString());
public static void main(String args[])
hdf h=new hdf("c:\\abc.doc","c:\\def.doc");
}// end
thanks in advance

The solution is for you to either learn something about Java, or just drop it.
If you decide on the first course...
Sun's basic Java tutorial
Sun's New To Java Center. Includes an overview of what Java is, instructions for setting up Java, an intro to programming (that includes links to the above tutorial or to parts of it), quizzes, a list of resources, and info on certification and courses.
http://javaalmanac.com. A couple dozen code examples that supplement The Java Developers Almanac.
jGuru. A general Java resource site. Includes FAQs, forums, courses, more.
JavaRanch. To quote the tagline on their homepage: "a friendly place for Java greenhorns." FAQs, forums (moderated, I believe), sample code, all kinds of goodies for newbies. From what I've heard, they live up to the "friendly" claim.
Bruce Eckel's Thinking in Java (Available online.)
Joshua Bloch's Effective Java
Bert Bates and Kathy Sierra's Head First Java.
James Gosling's The Java Programming Language. Gosling is
the creator of Java. It doesn't get much more authoratative than this.

Similar Messages

  • Can someone help me with this program?

    Can someone make this program for me?
    Make a Java-webapplication containing a few webpages (html-files and servlets, but NO jsp's). With this application you can get bankdata from a database, for example:
    page 1: html-file: Welcome on the website, type your bankaccount and password
    page 2: error if bankaccount doesn't exist or wrong password
    page 3: welcome with name and option to choose for your balance or a list with transactions from that account (the user can give a starting date)
    page 4: showing the balance or the list with transactions, name and accountnumber
    Store the information about the account and name in sessionsvariables
    the database is an access-file with two tables
    table Accounts with colums: accountnumber, name, balance and password
    table Transactions with colums: accountnumber, amount, plus/minus, date, sorttransaction and contra-account
    (when I need to send you the database by mail, you can ask me ...)
    maybe someone can help me,
    thanks in advance
    greetings Bastiaan

    Sure we can help you. Post the code you have already and explain any problems you are currently having together with any and all complete compiler error messages and/or exceptions.
    But no, we are not going to do your homework for you.

  • Pls help me with this program - urgent

    Hi,
    I am new to Java. First time to do the program. Stuck here.
    The description of the program:
    Implement a complex number (numbers of the form a+ib, where i2 = -1, i2 is i raised to power 2 ). Recall that a complex number consists of a real part (a) and an imaginary part (b). Provide a reasonable set of constructors; the methods add, subtract, multiply and divide; as well as toString and equals.
    You are to implement a complex number as having two fields, one for the real part another for the imaginary part.
    If z = a + ib and x = c + id are two complex numbers, then their sum z+ x = (a+c) + i(b+d), quotient z/x = (ac+bd)/(c*c+d*d) + i(-ab+bc)/(c*c + d*d). two complex numbers are equal if their real and imaginary parts are equal.
    I really do not have any clues about imaginary parts and how to do it.
    Could you please help me with that.
    Thanks a lot.

    ur dboubt has nothing to do java.. its a mathematical concept..
    as the question says the complexnumbers can be represented in the form of a+ib where i=squre-root of -1 .. and as this is imaginary (ie u cant get a minus number by squring a number) the second part is called imaginay.
    so as a programmer u dont have to give more strain on this but to declare a class having to instance varaiables and inplememts the methods as said.
    and in the toString() method u can return the numbers in the reuired format like
    return ( a + "+i" +b);

  • Can anyone help me with this program using the Scanner Class?

    I have to write a program that asks for the speed of a vehicle (in miles-per-hour) and the number of hours it has traveled. It should use a loop to display the distance a vehicle has traveled for each hour of a time period specified by the user. Such as 1 hour will equal 40 miles traveled, 2 hours will equal 80, 3 hours will equal 120, etc. This is what I've come up with thus far. Any help is appreciated.
    import java.util.Scanner;
         public class DistanceTraveled
              public static void main(String[] args)
                   int speed;
                   int hours;
                   int distance;
                   Scanner keyboard = new Scanner(System.in);
                   System.out.print("What is the speed of the vehicle in miles-per-hour?");
                   speed = keyboard.nextInt();
                   System.out.print("How many hours has the vehicle traveled for?");
                   hours = keyboard.nextInt();
                   distance = speed*hours;
                   while (speed < 0)
                   while (hours < 1)
                   System.out.println("Hour     Distance Traveled");
                   System.out.println("------------------------");
                   System.out.println(hours + " " + distance);
    }

    When you post code, wrap it in code tags. Highlight it and click the CODE button above the text input area.
    You seem to be trying to reuse the speed and hours variables in your loop. That's probably a mistake at this point. Keep it simpler by defining a loop variable.
    Also I don't see the need for two loops. You just want to show how far the vehicle has traveled for each one-hour increment, assuming constant speed, for the number of hours it has been traveling, right? So a single for loop should be sufficient.

  • Can anyone help me with this program?

    I have to make program that asks the user for information that they would want on a business card. Then, I am supposed ot take that information that was gathered with a listener and display it on a second panel using graphicsstuff (such as g.drawString(VARIABLEHERE, int x, int y). I can get thepart of the program that would ask for the information, but I can't figure out where to go from there on how to display the information. If anyone could help I would be enternally gratefully. This assignment is due Friday morning at 9:00. Thanks!
    import javax.swing.*;
    import java.awt.*;
    import java.awt.event.*;
    public class PanelPractice extends JPanel
         private static JButton insert;
         private static JTextField nameField, positionField, areaField, telField, faxField, emailField, add1Field, add2Field, add3Field;
         private static String nameText, positionText, areaText, telText, faxText, emailText, add1Text, add2Text, add3Text;
         public static void main (String[] args)
              //Makes two colored panels that are nested within a third.
              JFrame frame = new JFrame ("Business Card");
              frame.setDefaultCloseOperation (JFrame.EXIT_ON_CLOSE);
              //Makes the first subpanel
              JPanel subPanel1 = new JPanel();
                   JLabel nameLabel, positionLabel, areaLabel, telLabel, faxLabel, emailLabel, add1Label, add2Label, add3Label;
                   //     Sets up the GUI
                        //Creates labels for the information questions
                        nameLabel = new JLabel ("Type the name you want on the card: ");
                        positionLabel = new JLabel ("Type the person's position: ");
                        areaLabel = new JLabel ("Type the person's area of business: ");
                        telLabel = new JLabel ("Type the person's telephone number: ");
                        faxLabel = new JLabel ("Type the person's fax number: ");
                        emailLabel = new JLabel ("Type the person's e-mail address: ");
                        add1Label = new JLabel ("Type the person's place of business: ");
                        add2Label = new JLabel ("Type the business' street address: ");
                        add3Label = new JLabel ("Type the business' city, state, and zip: ");
                        //Creates a JTextField to hold the person's name
                        nameField = new JTextField (10);
                        positionField = new JTextField (10);
                        areaField = new JTextField (10);
                        telField = new JTextField (10);
                        faxField = new JTextField (10);
                        emailField = new JTextField (10);
                        add1Field = new JTextField (10);
                        add2Field = new JTextField (10);
                        add3Field = new JTextField (10);
                        //add the nameLabel and nameField to the panel
                        subPanel1.add (nameLabel);
                        subPanel1.add (nameField);
                        //add the positionLabel and positionField to the panel
                        subPanel1.add (positionLabel);
                        subPanel1.add (positionField);
                        //add the areaLabel and areaField to the panel
                        subPanel1.add (areaLabel);
                        subPanel1.add (areaField);
                        //add the telLabel and telField to the panel
                        subPanel1.add (telLabel);
                        subPanel1.add (telField);
                        //add the faxLabel and faxField to the panel
                        subPanel1.add (faxLabel);
                        subPanel1.add (faxField);
                        //add the emailLabel and emailField to the panel
                        subPanel1.add (emailLabel);
                        subPanel1.add (emailField);
                        //add the add1Label and add1Field to the panel
                        subPanel1.add (add1Label);
                        subPanel1.add (add1Field);
                        //add the add2Label and add2Field to the panel
                        subPanel1.add (add2Label);
                        subPanel1.add (add2Field);
                        //add the add3Label and add3Field to the panel
                        subPanel1.add (add3Label);
                        subPanel1.add (add3Field);
                        //Creates a button to press to insert the information onto the card
                        insert = new JButton ("Insert Information!");
                        //Creates a Listener and makes it listen for the button to be pressed
                        insert.addActionListener (new ButtonListener());
                        //add the button to the panel
                        subPanel1.add (insert);
                        //set the size of the panel to the width and height constants
                        subPanel1.setPreferredSize (new Dimension (350, 300));
                        //set the color of the panel to whatever you choose
                        subPanel1.setBackground (Color.red);
              //Makes the second subpanel
              JPanel subPanel2 = new JPanel();
              subPanel2.setPreferredSize (new Dimension(500,300));
              subPanel2.setBackground (Color.blue);
              //Makes the primary panel
              JPanel primary = new JPanel();
              primary.setBackground (Color.black);
              primary.add (subPanel1);
              primary.add (subPanel2);
              frame.getContentPane().add(primary);
              frame.pack();
              frame.setVisible(true);
                   //     Represents an action listener for the insert button.
                   private static class ButtonListener implements ActionListener
                        public void actionPerformed (ActionEvent event)
                             //get the text from the textfields
                             nameText = nameField.getText();
                             positionText = positionField.getText();
                             areaText = areaField.getText();
                             telText = telField.getText();
                             faxText = faxField.getText();
                             emailText = emailField.getText();
                             add1Text = add1Field.getText();
                             add2Text = add2Field.getText();
                             add3Text = add3Field.getText();
                   public static class CustomComponent extends JPanel
                   public void paintComponent(Graphics g)
                   super.paintComponent(g);
                   g.drawString(nameText, 5, 5);
    }

    Sorry about that...
    import javax.swing.*;
    import java.awt.*;
    import java.awt.event.*;
    public class PanelPractice extends JPanel
    private static JButton insert;
    private static JTextField nameField, positionField, areaField, telField, faxField, emailField, add1Field, add2Field, add3Field;
    private static String nameText, positionText, areaText, telText, faxText, emailText, add1Text, add2Text, add3Text;
    public static void main (String[] args)
    //Makes two colored panels that are nested within a third.
    JFrame frame = new JFrame ("Business Card");
    frame.setDefaultCloseOperation (JFrame.EXIT_ON_CLOSE);
    //Makes the first subpanel
    JPanel subPanel1 = new JPanel();
    JLabel nameLabel, positionLabel, areaLabel, telLabel, faxLabel, emailLabel, add1Label, add2Label, add3Label;
    // Sets up the GUI
    //Creates labels for the information questions
    nameLabel = new JLabel ("Type the name you want on the card: ");
    positionLabel = new JLabel ("Type the person's position: ");
    areaLabel = new JLabel ("Type the person's area of business: ");
    telLabel = new JLabel ("Type the person's telephone number: ");
    faxLabel = new JLabel ("Type the person's fax number: ");
    emailLabel = new JLabel ("Type the person's e-mail address: ");
    add1Label = new JLabel ("Type the person's place of business: ");
    add2Label = new JLabel ("Type the business' street address: ");
    add3Label = new JLabel ("Type the business' city, state, and zip: ");
    //Creates a JTextField to hold the person's name
    nameField = new JTextField (10);
    positionField = new JTextField (10);
    areaField = new JTextField (10);
    telField = new JTextField (10);
    faxField = new JTextField (10);
    emailField = new JTextField (10);
    add1Field = new JTextField (10);
    add2Field = new JTextField (10);
    add3Field = new JTextField (10);
    //add the nameLabel and nameField to the panel
    subPanel1.add (nameLabel);
    subPanel1.add (nameField);
    //add the positionLabel and positionField to the panel
    subPanel1.add (positionLabel);
    subPanel1.add (positionField);
    //add the areaLabel and areaField to the panel
    subPanel1.add (areaLabel);
    subPanel1.add (areaField);
    //add the telLabel and telField to the panel
    subPanel1.add (telLabel);
    subPanel1.add (telField);
    //add the faxLabel and faxField to the panel
    subPanel1.add (faxLabel);
    subPanel1.add (faxField);
    //add the emailLabel and emailField to the panel
    subPanel1.add (emailLabel);
    subPanel1.add (emailField);
    //add the add1Label and add1Field to the panel
    subPanel1.add (add1Label);
    subPanel1.add (add1Field);
    //add the add2Label and add2Field to the panel
    subPanel1.add (add2Label);
    subPanel1.add (add2Field);
    //add the add3Label and add3Field to the panel
    subPanel1.add (add3Label);
    subPanel1.add (add3Field);
    //Creates a button to press to insert the information onto the card
    insert = new JButton ("Insert Information!");
    //Creates a Listener and makes it listen for the button to be pressed
    insert.addActionListener (new ButtonListener());
    //add the button to the panel
    subPanel1.add (insert);
    //set the size of the panel to the width and height constants
    subPanel1.setPreferredSize (new Dimension (350, 300));
    //set the color of the panel to whatever you choose
    subPanel1.setBackground (Color.red);
    //Makes the second subpanel
    JPanel subPanel2 = new JPanel();
    subPanel2.setPreferredSize (new Dimension(500,300));
    subPanel2.setBackground (Color.blue);
    //Makes the primary panel
    JPanel primary = new JPanel();
    primary.setBackground (Color.black);
    primary.add (subPanel1);
    primary.add (subPanel2);
    frame.getContentPane().add(primary);
    frame.pack();
    frame.setVisible(true);
    // Represents an action listener for the insert button.
    private static class ButtonListener implements ActionListener
    public void actionPerformed (ActionEvent event)
    //get the text from the textfields
    nameText = nameField.getText();
    positionText = positionField.getText();
    areaText = areaField.getText();
    telText = telField.getText();
    faxText = faxField.getText();
    emailText = emailField.getText();
    add1Text = add1Field.getText();
    add2Text = add2Field.getText();
    add3Text = add3Field.getText();
    public static class CustomComponent extends JPanel
    public void paintComponent(Graphics g)
    super.paintComponent(g);
    g.drawString(nameText, 5, 5);
    } No..I'm not expecting someone to do it for me. I am having trouble figuring out what to do next. I cannot get anything to show up on the second panel...the part that displays the information that the listener gathered.
    If I could figure out how to get one thing to show up...then I could probably do the rest...it's getting it started that I can't get.

  • Help needed with this program

    Hello,
    I would like to enquire on whether this VI  has any error. I need to configure the digital input as a positive limit switch which is a sensor which when blocked, will produce a change in the voltage pulse.
    Attachments:
    sensor.vi ‏34 KB

    Hello,
    I could not open. Can you save it for LabView 8.2 or 8.5?
    Andy
    Best Regards,
    Andy
    PCI-7356@UMI7764; PCIe-6320@SCB-68; LV2011; Motion Assistant 2.7; NI Motion 8.3; DAQmx 9.4; Win7

  • New to Java and need help with this program..please!

    I'd really appreciate any helpful comments about this program assignment that I have to turn in a week from Friday. I'm taking a class one night a week and completely new to Java. I'd ask my professor for help, but we can't call him during the week and he never answers e-mails. He didn't tell us how to call from other classes yet, and I just can't get the darn thing to do what I want it to do!
    The assignment requirements are:
    1. Change a card game application that draws two cards
    and the higher card wins, to a Blackjack application
    2. Include a new class called Hand
    3. The Hand class should record the number of draws
    4. The application should prompt for a number of draws
    5. The game is played against the Dealer
    6. The dealer always draws a card if the dealer's hand total is <= 17
    7. Prompt the player after each hand if he wants to quit
    8. Display the total games won by the dealer and total and the total games wond by the player after each hand
    9. Display all of the dealer's and player's cards at the
    end of each hand
    10. Player has the option of drawing an additional card after the first two cards
    11. The Ace can have a value of 11 or 1
    (Even though it's not called for in the requirements, I would like to be able to let the Ace have a value of 1 or an 11)
    The following is my code with some comments about a few things that are driving me nuts:
    import java.util.*;
    import javax.swing.*;
    import java.text.*;
    public class CardDeck
    public CardDeck()
    deck = new Card[52];
    fill();
    shuffle();
    public void fill()
    int i;
    int j;
    for (i = 1; i <= 13; i++)
    for (j = 1; j <= 4; j++)
    deck[4 * (i - 1) + j - 1] = new Card(i, j);
    cards = 52;
    public void shuffle()
    int next;
    for (next = 0; next < cards - 1; next++)
    int rand = (int)(Math.random()*(next+1));
    Card temp = deck[next];
    deck[next] = deck[rand];
    deck[rand] = temp;
    public final Card draw()
    if (cards == 0)
    return null;
    cards--;
    return deck[cards];
    public int changeValue()
    int val = 0;
    boolean ace = false;
    int cds;
    for (int i = 0; i < cards; i++)
    if (cardValue > 10)
    cardValue = 10;
    if (cardValue ==1)     {
    ace = true;
    val = val + cardValue;
    if ( ace = true && val + 10 <= 21 )
    val = val + 10;
    return val;
    public static void main(String[] args)
    CardDeck d = new CardDeck();
    int x = 3;
    int i;
    int wins = 1;
    int playerTotal = 1;
    do {
    Card dealer = (d.draw());
    /**I've tried everything I can think of to call the ChangeValue() method after I draw the card, but nothing is working for me.**/
    System.out.println("Dealer draws: " + dealer);
    do {
    dealer = (d.draw());
    System.out.println(" " + dealer);
    }while (dealer.rank() <= 17);
    Card mine = d.draw();
    System.out.println("\t\t\t\t Player draws: "
    + mine);
    mine = d.draw();
    System.out.println("\t\t\t\t\t\t" + mine);
    do{
    String input = JOptionPane.showInputDialog
    ("Would you like a card? ");
    if(input.equalsIgnoreCase("yes"))
         mine = d.draw();
    System.out.println("\t\t\t\t\t\t" + mine);
         playerTotal++;
         else if(input.equalsIgnoreCase("no"))
    System.out.println("\t\t\t\t Player stands");
         else
    System.out.println("\t\tInvalid input.
    Please try again.");
    I don't know how to go about making and calling a method or class that will combine the total cards delt to the player and the total cards delt to the dealer. The rank() method only seems to give me the last cards drawn to compare with when I try to do the tests.**/
    if ((dealer.rank() > mine.rank())
    && (dealer.rank() <= 21)
    || (mine.rank() > 21)
    && (dealer.rank() < 22)
    || ((dealer.rank() == 21)
    && (mine.rank() == 21))
    || ((mine.rank() > 21)
    && (dealer.rank() <= 21)))
    System.out.println("Dealer wins");
    wins++;
         else
    System.out.println("I win!");
    break;
    } while (playerTotal <= 1);
    String stop = JOptionPane.showInputDialog
    ("Would you like to play again? ");
    if (stop.equalsIgnoreCase("no"))
    break;
    if (rounds == 5)
    System.out.println("Player wins " +
    (CardDeck.rounds - wins) + "rounds");
    } while (rounds <= 5);
    private Card[] deck;
    private int cards;
    public static int rounds = 1;
    public int cardValue;
    /**When I try to compile this nested class, I get an error message saying I need a brace here and at the end of the program. I don't know if any of this code would work because I've tried adding braces and still can't compile it.**/
    class Hand()
    static int r = 1;
    public Hand() { CardDeck.rounds = r; }
    public int getRounds() { return r++; }
    final class Card
    public static final int ACE = 1;
    public static final int JACK = 11;
    public static final int QUEEN = 12;
    public static final int KING = 13;
    public static final int CLUBS = 1;
    public static final int DIAMONDS = 2;
    public static final int HEARTS = 3;
    public static final int SPADES = 4;
    public Card(int v, int s)
    value = v;
    suit = s;
    public int getValue() { return value; }
    public int getSuit() { return suit;  }
    public int rank()
    if (value == 1)
    return 4 * 13 + suit;
    else
    return 4 * (value - 1) + suit;
    /**This works, but I'm confused. How is this method called? Does it call itself?**/
    public String toString()
    String v;
    String s;
    if (value == ACE)
    v = "Ace";
    else if (value == JACK)
    v = "Jack";
    else if (value == QUEEN)
    v = "Queen";
    else if (value == KING)
    v = "King";
    else
    v = String.valueOf(value);
    if (suit == DIAMONDS)
    s = "Diamonds";
    else if (suit == HEARTS)
    s = "Hearts";
    else if (suit == SPADES)
    s = "Spades";
    else
    s = "Clubs";
    return v + " of " + s;
    private int value; //Value is an integer, so how can a
    private int suit; //string be assigned to an integer?
    }

    Thank you so much for offering to help me with this Jamie! When I tried to call change value using:
    Card dealer = (d.changeValue());
    I get an error message saying:
    Incompatible types found: int
    required: Card
    I had my weekly class last night and the professor cleared up a few things for me, but I've not had time to make all of the necessary changes. I did find out how toString worked, so that's one question out of the way, and he gave us a lot of information for adding another class to generate random numbers.
    Again, thank you so much. I really want to learn this but I'm feeling so stupid right now. Any help you can give me about the above error message would be appreciated.

  • TS3276 I am not able to Mobile Me email account to connect with iCloud or my Apple Mail program. Don't know if my settings are correct or not. Can anyone help me with this please?

    I am not able to Mobile Me email account to connect with iCloud or my Apple Mail program. Don't know if my settings are correct or not. Can anyone help me with this please?

    http://support.apple.com/kb/HT5922
    If you want to mirror your desktop, see:
    http://support.apple.com/kb/HT5404
    Regards.

  • 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();

  • 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

  • HT201487 i have a problem with xcode programming app when i lunch to it it asking me to enter my password and when i enter it the program show that it is wrong but am 100% sure it's wright so please help me with this issue thanks

    i have a problem with xcode programming app when i lunch to it it asking me to enter my password and when i enter it the program show that it is wrong but am 100% sure it's wright so please help me with this issue thanks

    That's not very intuitive
    Check your mail server setup (mail>preferences>accounts>) choose your MobileMe account and select Outgoing Mail Server (SMTP) dropdown box, select Edit SMTP server list, verify that each instance of the me server has a password, if there are more than one and you only have one account then delete the one without a password.

  • Any one could help me with this soap client program?

    Any one could help me with this soap client program?
    Below is the request format my partner is expecting to see:
    POST /Service.asmx HTTP/1.1
    Host: 192.168.1.1
    Content-Type: text/xml; charset=utf-8
    Content-Length: length
    SOAPAction: "https://api.abcdefg.com/GetList"
    <?xml version="1.0" encoding="utf-8"?>
    <soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"
              xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
         <soap:Body>
              <GetList xmlns="https://api.abcdefg.com/">
                   <username>string</username>
                   <password>string</password>
              </GetList>
         </soap:Body>
    </soap:Envelope>The java client I wrote is blow:
    import javax.xml.soap.*;
    import java.util.Iterator;
    import java.net.URL;
    import java.io.*;
    public class Client {
        public static void main(String [] args) {
            try {
                SOAPConnectionFactory soapConnectionFactory = SOAPConnectionFactory.newInstance();
                SOAPConnection connection = soapConnectionFactory.createConnection();
                SOAPFactory soapFactory = SOAPFactory.newInstance();
                MessageFactory factory = MessageFactory.newInstance();
                SOAPMessage message = factory.createMessage();
             // addd SOAPAction;
             MimeHeaders hd = message.getMimeHeaders();
             hd.addHeader("SOAPAction", "https://api.abcdefg.com/GetList");
                // get env and body;
                SOAPPart soapPart = message.getSOAPPart();
                SOAPEnvelope envelope = soapPart.getEnvelope();
             SOAPBody body = envelope.getBody();
                Name bodyName = soapFactory.createName("GetList", "", "https://api.abcdefg.com/");
                SOAPBodyElement bodyElement = body.addBodyElement(bodyName);
                //Constructing the body for the request;
             SOAPElement username = bodyElement.addChildElement("username");
             username.addTextNode("1234567");
             SOAPElement password = bodyElement.addChildElement("password");
             password.addTextNode("7654321");
                System.out.print("\nPrinting the message that is being sent: \n\n");
                message.writeTo(System.out);
                System.out.println("\n\n");
                URL endpoint = new URL ("https://api.abcdefg.com/Service.asmx");
                SOAPMessage response = connection.call(message, endpoint);
                connection.close();
                response.writeTo(System.out);
            }catch (Exception e) {
                 System.err.println("ERROR: ******* " + e.toString());
    }The response my partner's server returned is:
    <faultstring>Server did not recognize the value of HTTP Header SOAPAction:. </faultstring>I used similar code to access the web services provides via tomcat, it works fine...however, for this .NET services it does not work.
    By the way, I also have another version of the clirnt, using JDOM to construct a XML request and wrap with axis message. I got the same error message as above.
    Can anyone point out something for me?
    Any kind of comments will be appreciated!!
    Edited by: Nickolas.Chen on May 6, 2008 7:20 PM

    You will need to Contact iTunes Customer Service and request assistance
    Use this Link  >  Apple  Support  iTunes Store  Contact

  • HELP!!!!! How do I set the BPM with this program?

    Hi all,...can someone please help me with this soundtrack pro 2? I;m a newbe at a mac, i came from windows using protools now im on this mac (which i love) but i'm lost How do i change the BPM for the whole project? i see it in the window on the bottom right, but when i change it,.it dont do anything, it still sounds the same. Can you please help? Thanks for your time.
    HYPE
    www.djhypelive.com

    Setting the tempo in STP will change the tempo of any audio files that have apple loops information - that is, they have metadata in the audio file that gives STP an indication of where the beats lie. So if the audio file doesn't have that metadata, it's not going to change with the tempo change in STP.
    I don't have Logic, but that might have some kind of beat detection analysis that you can run for that song, and change it there. The other option is to try to add that information to the audio file using the Apple Loop Editor. Soundtrack alone is not going to help you.

  • Can someone pls help me with this code

    The method createScreen() creates the first screen wherein the user makes a selection if he wants all the data ,in a range or single data.The problem comes in when the user makes a selection of single.that then displays the singleScreen() method.Then the user has to input a key data like date or invoice no on the basis of which all the information for that set of data is selected.Now if the user inputs a wrong key that does not exist for the first time the program says invalid entry of data,after u click ok on the option pane it prompts him to enter the data again.But since then whenever the user inputs wrong data the program says wrong data but after displaying the singlescreen again does not wait for input from the user it again flashes the option pane with the invalid entry message.and this goes on doubling everytime the user inputs wrong data.the second wrong entry of data flashes the error message twice,the third wrong entry flashes the option pane message 4 times and so on.What actually happens is it does not wait at the singlescreen() for user to input data ,it straight goes into displaying the JOptionPane message for wrong data entry so we have to click the optiion pane twice,four times and so on.
    Can someone pls help me with this!!!!!!!!!
    import java.util.*;
    import javax.swing.*;
    import javax.swing.event.*;
    import java.awt.*;
    import java.awt.event.*;
    import java.text.*;
    import java.util.*;
    public class MainMenu extends JFrame implements ActionListener,ItemListener{
    //class     
         FileReaderDemo1 fd=new FileReaderDemo1();
         FileReaderDemo1 fr;
         Swing1Win sw;
    //primary
         int monthkey=1,counter=0;
         boolean flag=false,splitflag=false;
         String selection,monthselection,dateselection="01",yearselection="00",s,searchcriteria="By Date",datekey,smonthkey,invoiceno;
    //arrays
         String singlesearcharray[];
         String[] monthlist={"Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sept","Oct","Nov","Dec"};
         String[] datelist=new String[31];
         String[] yearlist=new String[100];
         String[] searchlist={"By Date","By Invoiceno"};
    //collection
         Hashtable allinvoicesdata=new Hashtable();
         Vector data=new Vector();
         Enumeration keydata;
    //components
         JButton next=new JButton("NEXT>>");
         JComboBox month,date,year,search;
         JLabel bydate,byinvno,trial;
         JTextField yeartext,invtext;
         JPanel panel1,panel2,panel3,panel4;
         JRadioButton single,range,all;
         ButtonGroup group;
         JButton select=new JButton("SELECT");
    //frame and layout declarations
         JFrame jf;
         Container con;
         GridBagLayout gridbag=new GridBagLayout();
         GridBagConstraints gc=new GridBagConstraints();
    //constructor
         MainMenu(){
              jf=new JFrame();
              con=getContentPane();
              con.setLayout(null);
              fr=new FileReaderDemo1();
              createScreen();
              setSize(500,250);
              setLocation(250,250);
              setVisible(true);
    //This is thefirst screen displayed
         public void createScreen(){
              group=new ButtonGroup();
              single=new JRadioButton("SINGLE");
              range=new JRadioButton("RANGE");
              all=new JRadioButton("ALL");
              search=new JComboBox(searchlist);
              group.add(single);
              group.add(range);
              group.add(all);
              single.setBounds(100,50,100,20);
              search.setBounds(200,50,100,20);
              range.setBounds(100,90,100,20);
              all.setBounds(100,130,100,20);
              select.setBounds(200,200,100,20);
              con.add(single);
              con.add(search);
              con.add(range);
              con.add(all);
              con.add(select);
              search.setEnabled(false);
              single.addItemListener(this);
              search.addActionListener(new MyActionListener());     
              range.addItemListener(this);
              all.addItemListener(this);
              select.addActionListener(this);
         public class MyActionListener implements ActionListener{
              public void actionPerformed(ActionEvent a){
                   JComboBox cb=(JComboBox)a.getSource();
                   if(a.getSource().equals(month))
                        monthkey=((cb.getSelectedIndex())+1);
                   if(a.getSource().equals(date)){
                        dateselection=(String)cb.getSelectedItem();
                   if(a.getSource().equals(year))
                        yearselection=(String)cb.getSelectedItem();
                   if(a.getSource().equals(search)){
                        searchcriteria=(String)cb.getSelectedItem();
         public void itemStateChanged(ItemEvent ie){
              if(ie.getItem()==single){
                   selection="single";     
                   search.setEnabled(true);
              else if (ie.getItem()==all){
                   selection="all";
                   search.setEnabled(false);
              else if (ie.getItem()==range){
                   search.setEnabled(false);
         public void actionPerformed(ActionEvent ae){          
              if(ae.getSource().equals(select))
                        if(selection.equals("single")){
                             singleScreen();
                        if(selection.equals("all"))
                             sw=new Swing1Win();
              if(ae.getSource().equals(next)){
                   if(monthkey<9)
                        smonthkey="0"+monthkey;
                   System.out.println(smonthkey+"/"+dateselection+"/"+yearselection+"it prints this");
                   allinvoicesdata=fr.read(searchcriteria);
                   if (searchcriteria.equals("By Date")){
                        System.out.println("it goes in this");
                        singleinvoice(smonthkey+"/"+dateselection+"/"+yearselection);
                   else if (searchcriteria.equals("By Invoiceno")){
                        invoiceno=invtext.getText();
                        singleinvoice(invoiceno);
                   if (flag == false){
                        System.out.println("flag is false");
                        singleScreen();
                   else{
                   System.out.println("its in here");
                   singlesearcharray=new String[data.size()];
                   data.copyInto(singlesearcharray);
                   sw=new Swing1Win(singlesearcharray);
         public void singleinvoice(String searchdata){
              keydata=allinvoicesdata.keys();
              while(keydata.hasMoreElements()){
                        s=(String)keydata.nextElement();
                        if(s.equals(searchdata)){
                             System.out.println(s);
                             flag=true;
                             break;
              if (flag==true){
                   System.out.println("vector found");
                   System.exit(0);
                   data= ((Vector)(allinvoicesdata.get(s)));
              else{
                   JOptionPane.showMessageDialog(jf,"Invalid entry of date : choose again");     
         public void singleScreen(){
              System.out.println("its at the start");
              con.removeAll();
              SwingUtilities.updateComponentTreeUI(con);
              con.setLayout(null);
              counter=0;
              panel2=new JPanel(gridbag);
              bydate=new JLabel("By Date : ");
              byinvno=new JLabel("By Invoice No : ");
              dateComboBox();
              invtext=new JTextField(6);
              gc.gridx=0;
              gc.gridy=0;
              gc.gridwidth=1;
              gridbag.setConstraints(month,gc);
              panel2.add(month);
              gc.gridx=1;
              gc.gridy=0;
              gridbag.setConstraints(date,gc);
              panel2.add(date);
              gc.gridx=2;
              gc.gridy=0;
              gc.gridwidth=1;
              gridbag.setConstraints(year,gc);
              panel2.add(year);
              bydate.setBounds(100,30,60,20);
              con.add(bydate);
              panel2.setBounds(170,30,200,30);
              con.add(panel2);
              byinvno.setBounds(100,70,100,20);
              invtext.setBounds(200,70,50,20);
              con.add(byinvno);
              con.add(invtext);
              next.setBounds(300,200,100,20);
              con.add(next);
              if (searchcriteria.equals("By Invoiceno")){
                   month.setEnabled(false);
                   date.setEnabled(false);
                   year.setEnabled(false);
              else if(searchcriteria.equals("By Date")){
                   byinvno.setEnabled(false);
                   invtext.setEnabled(false);
              monthkey=1;
              dateselection="01";
              yearselection="00";
              month.addActionListener(new MyActionListener());
              date.addActionListener(new MyActionListener());
              year.addActionListener(new MyActionListener());
              next.addActionListener(this);
              invtext.addKeyListener(new KeyAdapter(){
                   public void keyTyped(KeyEvent ke){
                        char c=ke.getKeyChar();
                        if ((c == KeyEvent.VK_BACK_SPACE) ||(c == KeyEvent.VK_DELETE)){
                             System.out.println(counter+"before");
                             counter--;               
                             System.out.println(counter+"after");
                        else
                             counter++;
                        if(counter>6){
                             System.out.println(counter);
                             counter--;
                             ke.consume();
                        else                    
                        if(!((Character.isDigit(c) || (c == KeyEvent.VK_BACK_SPACE) || (c == KeyEvent.VK_DELETE)))){
                             getToolkit().beep();
                             counter--;     
                             JOptionPane.showMessageDialog(null,"please enter numerical value");
                             ke.consume();
              System.out.println("its at the end");
         public void dateComboBox(){          
              for (int counter=0,day=01;day<=31;counter++,day++)
                   if(day<=9)
                        datelist[counter]="0"+String.valueOf(day);
                   else
                        datelist[counter]=String.valueOf(day);
              for(int counter=0,yr=00;yr<=99;yr++,counter++)
                   if(yr<=9)
                        yearlist[counter]="0"+String.valueOf(yr);
                   else
                        yearlist[counter]=String.valueOf(yr);
              month=new JComboBox(monthlist);
              date=new JComboBox(datelist);
              year=new JComboBox(yearlist);
         public static void main(String[] args){
              MainMenu mm=new MainMenu();
         public class WindowHandler extends WindowAdapter{
              public void windowClosing(WindowEvent we){
                   jf.dispose();
                   System.exit(0);
    }     

    Hi,
    I had a similar problem with a message dialog. Don't know if it is a bug, I was in a hurry and had no time to search the bug database... I found a solution by using keyPressed() and keyReleased() instead of keyTyped():
       private boolean pressed = false;
       public void keyPressed(KeyEvent e) {
          pressed = true;
       public void keyReleased(KeyEvent e) {
          if (!pressed) {
             e.consume();
             return;
          // Here you can test whatever key you want
       //...I don't know if it will help you, but it worked for me.
    Regards.

  • Help me with  this assignment

    can anyone out there help me with this assignment ????? i`ll attach the file to this topic
    In this assignment, you are to write a Java applet, using arrays, to simulate the functions of a drinks-vending machine.
    The assignment requirements described below are broken down into 2 stages of development, described in this document
    as 'Basic Requirements' and 'Additional Features'. You are advised to do your programming progressively in these
    stages. An Activity Plan has also been specified for you to follow. Refer to the 'Grading Criteria' on page 5 to have
    an idea of how the different components are graded.
    1.     1. BACKGROUND
    A company intends to build computerised drinks-vending machines to enlarge its business portfolio. You have been tasked to develop a
    Java applet that simulates the operation of such a machine to determine if it will meet their needs.
    2.     1. BASIC REQUIREMENTS
    The machine should have a wide range of drinks available. A customer can choose a drink according to the following criteria:
    a)     a) Category of Drinks
    �     � Beverages
    �     � Soft Drinks
    (For beverages, there is choice of whether sugar and/or creamer is required, for which there is an additional charge.)
    b)     b) Type of Beverages
    �     � Hot
    �     � Cold
    Once a customer has specified the drink he wants, the amount payable is displayed. The unit prices to be displayed are as follows:
    Drinks     Price per Cup/Packet ($)
    Beverage:     Coffee     1.00
         Tea     1.20
         Milo     1.40
         Horlicks     1.35
         Chrysanthemum     1.00
         Ginger     0.80
    Soft Drinks:     Apple     1.40
         Orange     1.40
         Pineapple     1.50
         Carrot     2.00
         Longan     1.20
         Bandung     1.00
    (For beverages, a request for sugar or creamer attracts an additional charge of $0.10 each. Creamer is not applicable for
    chrysanthemum and ginger.)
    The customer may then confirm his order by entering the amount payable (this symbolises his payment for the drink). Whenever the
    payment input is not correct, an appropriate error message is displayed, whereupon the customer has to re-enter the amount again.
    When the correct amount is paid, the required drink is dispensed.
    For any drink that is out of stock, a message is shown, stating that it is not available. Each time a drink is dispensed, the stock for that
    drink is updated (For beverages, the stock is stored in units of servings for each cup.) To simplify the testing, you may start the simulation
    by setting the stock for each drink to 10 packets or cup-servings.
    3.     2. ADDITIONAL FEATURES
    In addition, the simulator can have the following features:
    a)     a) Smart Graphical User-Interface (GUI)
    You may build upon the basic requirements by recommending alternative drinks of the same category, whenever a requested
    drink is not available (as signified from the stock). In this case, only drinks which are available (i.e., in sufficient stock) are
    displayed for the customer to choose. And if only soft drinks are available, the selections for creamer and sugar should be disabled.
    b)     b) Multiple Orders
    A customer could order more than one drink. The system could allow him to specify as many drinks as he wants, prompting him
    for an appropriate payment, and then dispensing the drinks accordingly, subject to availability. This may also entail the extension
    of the graphical user-interface.
    c)     c) Sales Analysis
    Periodically, the total revenue accumulated since the last collection is printed in descending order of sales for each drink sold,
    together with a grand total. The cash is then cleared from the machine. This feature requires password-protection.
    d)     d) Replenishment of Stock
    Periodically, the stock is checked to determine how much of each drink needs to be replenished. For this purpose, a list of the
    drinks with the corresponding quantity on hand is printed in ascending order of stock level. Drinks with insufficient stock are
    topped up to a level of 10 servings or packets. This feature also requires password-protection.
    e)     e) Any other relevant features
    You are limited only by your creativity. You can add any other relevant features for this project. Please consult your tutor before
    you proceed.
    To qualify for the full marks for this section, you need to implement 2 features, at least one of which must be either (a) or (b) above.
    4.     3. ACTIVITY PLAN
    Suggestions for Getting Started
    There are many ways that you could complete this assignment. The most important part is to think about the entire project first so that
    it is easy to integrate the various pieces. You should also consider what type of graphics you want to incorporate.
    a)     a) Analysis
    1. Understand the program specification and the requirements before attempting the project.
    b)     b) Program Design
    2.     Work out the GUI components (e.g., TextFields, CheckBoxes, ChoiceBoxes, Buttons, etc.) needed to get the user input.
    3.     3. Work out the main logic of the program using modular programming techniques; i.e. use methods appropriately. E.g., tasks that perform
    4.     4. a well-defined function or those that are repeated should be coded as methods. For example, you can write the methods, displayBill(),
    5.     5. makePayment(), computeTotal(), dispenseDrink(), etc. You need to think carefully about the return type and the parameters of each
    6.     6. method.
    7.     7. You are required to use arrays appropriately for this assignment. Marks will be deducted for inefficient use or non-usage of arrays.
    c) Implementation & Testing
    8.     8. Write the method definition of each method ONE at a time.
    9.     9. Test your program logic to make sure that it works. In the interim, you can use �g.drawString(�);� or �System.out.println(�);� to print
    10.     10. out intermediate results so that you can see whether your program is working correctly. You may not want to bother about error-checking
    11.     11. at this point. You should test each method as soon as it is written, as it is much easier to debug your program in this way.
    5.     4. DELIVERABLES
    By Monday, 25th February before 5:00 p.m., hand in the following to the School of ICT Administrative Office at Block 31, level 8:
    �     � A copy of the printout of your .java file.
    �     � A diskette labelled with your name, group, student ID. The diskette should contain ALL the necessary files (.java, .html, and .class)
    to run your applet.
    �     � The above in an envelope topped with the Assignment Completion Report (see pages 6, 7 & 8). Page 6 is for you to paste on top
    of your envelope whilst pages 7 and 8 are for you to document your Test Plan, and write your comments (including any
    special instructions to run your program) - to be inserted into the envelope.
    In your .java program, you are to include a blocked comment at the top stating:
    q     q Your name, group, student ID.
    q     q Assumptions (if any) or any deviations from the specified requirements.
    q     q Any features that you would like to highlight.
    6.     5. WALK-THROUGH OF PROGRAM
    Monday 25th February at 9:30 a.m. SHARP
    In the walk-through, you will be asked to give short, written answers to some questions about your program. These questions will assess
    your basic understanding of the code that you are handing in. If you fail to display adequate understanding of your own program, you can
    be down-graded by up to two letter grades from what you would have normally received. It is also possible that you will be called to
    perform a demonstration cum explanation of your work if it is suspected that you have copied someone else�s work. Lesson: do your own
    work and you will have no problem!
    7.     6. GRADING CRITERIA FOR PROGRAMMING
    Correct and robust implementation of basic features     55 %
    Additional features     20 %
    Programming style:�     � Program design�     � Appropriate use of arrays�     � Appropriate use of variables, methods, and parameters�     � Proper usage of control structures (e.g. if/else, loops)     15 %
    Good programming practice:�     � Meaningful variable names �     � Proper indentations�     � Useful and neat comments     5 %
    Adequate (black-box) testing:�     � Suitably-designed test plan     5 %
    Total:     100 %
    PROBLEM SOLVING & PROGRAMMING II
    (Dip IT/MMC/EI, Year 1, Semester 2)
    Assignment Completion Report (to be attached to cover of envelope)
    Name: ___________________________________ Group: ________
    ID: ___________________ Date & Time submitted: ____________
    Requirements     % Done (0-100)     Remarks
    BASIC FEATURES          
    �     � Can choose category (and select appropriate additives)          
    �     � Can choose drink (with error checking)          
    �     � Can display amount payable          
    �     � Can indicate availability of drink (with error checking)          
    �     � Can accept payment for drink (with error checking)          
    �     � Can dispense drink          
    �     � Can update stock          
    ADDITIONAL FEATURES          
    �     � Smart GUI          
    �     � Multiple Orders          
    �     � Sales Analysis (with password checking)          
    �     � Stock Replenishment(with password checking)          
    �     � Any other relevant features          
    Test Plan
    Using black-box testing, record your test specification and the results according to the following format (the examples here are provided
    for your reference only):
    Test No.     Purpose     Test Shot/Data     Expected Result     Actual Result
    E.g. 1a)     Check whether beverage can be selected      Click on �Chrysanthe-mum� button     Checkbox for �Sugar� but not �Creamer� appear     �Sugar� and checkboxes appeared
    E.g. 1b)     Check whether chrysanthemum with sugar can be ordered      Select sugar and click on �Order� button     Amount payable appears as �$1.10� (i.e., $1.00 + $0.10)     Amount payable shown as $1.10
    E.g. 1c)     Check whether correct payment can be accepted      Enter �1.00� in �Payment� textfield     Error message �Insufficient payment - $0.10 short� appears     Confirmation message �Drink being dispensed� appeared � ERROR!
    E.g. 1d)     Re-test 1c), after amending program      As above     As above     Error message �Insufficient payment - $0.10 short� appeared
    etc.                    
    etc.                    
    Remember to hand in this test plan together with the other deliverables in the envelope.
    Have you�
    1.     1. Checked to make sure program still works properly even with windows resized?
    2.     2. Tested your program thoroughly, as if you're trying to break it?
    Any comments about this assignment? Any special instructions to run your program? Write it here.

    public class testing1 {
    String gg;
    public void testing3() {
    System.out.print(gg); }
    // this is are constructor for the object and method we are going to make
    next code
    class testing {
    public static void main(String[] args) {
    testing1 tes = new testing1();
    tes.gg = "hello there";
    tes.testing3(); //here we have made a object and a method
    hope this helps

Maybe you are looking for

  • Data rocovery

    I have gone to the genius bar to have my macbook fixed because it wont boot up and i need to have my data recovered and the software wiped and reinstalled. the genius bar guy who helped me said that he cant retrieve my data and he suggested that i ta

  • Changes to a site which view in chrome and not in safari?

    Hi, I have recently made some changes to my site www.philcleaver.com, I then viewed the site in safari and the changes don't show up? I have tried updating the FTP with only modified files, I have tried uploading the FTP with all the files and I have

  • Trail balance with legacy balances problem

    Hi Experts, Need yours input for me on trail balance amounts mismatch with Legacy system. My client using the both systems legacy and sap. Now client taking the reports from legacy for the legal submissions for this year08-09. I have done matching ea

  • Site refreshed from dynamic data.

    I have a site stubb out that has multiple accordian canvases each containing a tree. In my header area I have a combo box that give you a list of clients. When you select a new client, I want to reload all the trees in each accordian cavas with that

  • Why can't I edit photos that I saved from the internet?

    I'm completely new to this, so dumb it down as much as is possible. I am working on setting up a webpage and have had to manually go into the client's old web page and save any images on there. Now when I open them up in photoshop, it won't let me ed