Need help with project

Hi all I'm working on a project and need help.
I want the "New" button to clear all the fields.
Any help?
=======================================================
import java.awt.*;
import java.awt.event.*;
import javax.swing.*;
public class Message extends JFrame implements ActionListener {
     public Message() {
     super("Write a Message - by Kieran Hannigan");
     setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
     setSize(370,270);
     FlowLayout flo = new FlowLayout(FlowLayout.RIGHT);
     setLayout(flo);
     //Make the bar
     JMenuBar bar = new JMenuBar();
     //Make "File" on Menu
     JMenu File = new JMenu("File");
     JMenuItem f1 = new JMenuItem("New");
     JMenuItem f2 = new JMenuItem("Open");
     JMenuItem f3 = new JMenuItem("Save");
     JMenuItem f4 = new JMenuItem("Save As");
     JMenuItem f5 = new JMenuItem("Exit");
     File.add(f1);
     File.add(f2);
     File.add(f3);
     File.add(f4);
     File.add(f5);
     bar.add(File);
     //Make "Edit" on menu
     JMenu Edit = new JMenu("Edit");
     JMenuItem e1 = new JMenuItem("Cut");
     JMenuItem e2 = new JMenuItem("Paste");
     JMenuItem e3 = new JMenuItem("Copy");
     JMenuItem e4 = new JMenuItem("Repeat");
     JMenuItem e5 = new JMenuItem("Undo");
     Edit.add(e5);
     Edit.add(e4);
     Edit.add(e1);
     Edit.add(e3);
     Edit.add(e2);
     bar.add(Edit);
     //Make "View" on menu
     JMenu View = new JMenu("View");
     JMenuItem v1 = new JMenuItem("Bold");
     JMenuItem v2 = new JMenuItem("Italic");
     JMenuItem v3 = new JMenuItem("Normal");
     JMenuItem v4 = new JMenuItem("Bold-Italic");
     View.add(v1);
     View.add(v2);
     View.add(v3);
     View.addSeparator();
     View.add(v4);
     bar.add(View);
     //Make "Help" on menu
     JMenu Help = new JMenu("Help");
     JMenuItem h1 = new JMenuItem("Help Online");
     JMenuItem h2 = new JMenuItem("E-mail Programmer");
     Help.add(h1);
     Help.add(h2);
     bar.add(Help);
     setJMenuBar(bar);
     //Make Contents of window.
     //Make "Subject" text field
     JPanel row2 = new JPanel();
     JLabel sublabel = new JLabel("Subject:");
     row2.add(sublabel);
     JTextField text2 = new JTextField("RE:",24);
     row2.add(text2);
     //Make "To" text field
     JPanel row1 = new JPanel();
     JLabel tolabel = new JLabel("To:");
     row1.add(tolabel);
     JTextField text1 = new JTextField(24);
     row1.add(text1);
     //Make "Message" text area
     JPanel row3 = new JPanel();
     JLabel Meslabel = new JLabel("Message:");
     row3.add(Meslabel);
     JTextArea text3 = new JTextArea(6,22);
     messagearea.setLineWrap(true);
     messagearea.setWrapStyleWord(true);
     JScrollPane scroll = new JScrollPane(text3,
                              JScrollPane.VERTICAL_SCROLLBAR_ALWAYS,
                              JScrollPane.HORIZONTAL_SCROLLBAR_NEVER);
     row3.add(scroll);
     add(row1);
     add(row2);
     add(row3);
     setVisible(true);
     public static void main(String[] arguments)  {
     Message Message = new Message();
}

Ok, given that I may have not been the kindest to you on the other thread (and I'm still annoyed that you went and cross-posted this), and that you did actually use code tags, I'm going to post some code here:
Please take the following advice onboard though.
1. When you are naming your artifacts, please use the java coding standard as your guide. So if you are naming a class you use a capital letter first, and use camel case thereafter. All method names begin with a lower case letter, and all variable names begin with a lower case letter (and again camel case after that)
2. Please use self explanitory names (for everything), so no more row1, row2, or text1, text2, etc.
3. The example I am giving below makes use of a single class to handle all actions, this is not really the best way to do this, and a better way would be to have a class to handle each action (that would remove the massive if() else if() in the action handler class.
4. When you are using class variables they should be private (no exceptions, ever!), if you need to access them from other classes use accessors (eclipse and other IDE tools can generate these methods for you in seconds)
5. Notice the naming convention for my constants (final statics), they are all upper case (again from the java coding standards document, which you are going to look for with google right?)
6. I have hived some of the creation work to helper methods (the getSubjectTextField() etc), although it isn't advisable to be calling other methods from the constructor, since this is a GUI, and you want it to appear as soon as you create the class, we won't worry about this, but perhaps as an execrise you could work out a better way to do this?
7. Personally, I don't like classes that implement listeners, unless they are specifically designed to do that job. So a Frame that is set up as an action listener is fine, provided the actions it listens for are associated with the frame, not its contents. If the actions are related to its contents, then a dedicated class is better.
8. Another personal opinion, but I feel it makes code clearer, but others may disagree. If you are creating a variable solely to hold the result of a calculation, to be passed to a method in the very next line, then don't create the variable, just pass the method as the argument to the method (feel free to ignore this advice if the method call is extremely long, and a local would make it easier to read)
Anyway, here is the code. I have removed most of the menu items, and leave this as an exercise for you. Also I have only created 2 methods (new and exit), I'll again leave it as an exercise for you to complete this.
package jdc;
import java.awt.FlowLayout;
import java.awt.event.ActionEvent;
import javax.swing.AbstractAction;
import javax.swing.JFrame;
import javax.swing.JLabel;
import javax.swing.JMenu;
import javax.swing.JMenuBar;
import javax.swing.JMenuItem;
import javax.swing.JOptionPane;
import javax.swing.JPanel;
import javax.swing.JScrollPane;
import javax.swing.JTextArea;
import javax.swing.JTextField;
import javax.swing.ScrollPaneConstants;
public class Message extends JFrame {
    /** Constant for the new action command. */
    private static final String NEW_COMMAND = "New";
    /** Constant for the exit action command. */
    private static final String EXIT_COMMAND = "Exit";
    /** Subject text field. */
    private JTextField subjectTextField;
    /** Recipient text field. */
    private JTextField toTextField;
    /** Message text area. */
    private JTextArea messageTextArea;
    public Message() {
        super("Write a Message - by Kieran Hannigan");
        setSize(370, 270);
        FlowLayout flo = new FlowLayout(FlowLayout.RIGHT);
        setLayout(flo);
        setJMenuBar(createMenuBar());
        // Add "Subject" text field
        JPanel subjectRow = new JPanel();
        subjectRow.add(new JLabel("Subject:"));
        subjectRow.add(getSubjectTextField());
        // Add "To" text field
        JPanel toRow = new JPanel();
        toRow.add(new JLabel("To:"));
        toRow.add(getToTextField());
        // Make "Message" text area
        JPanel messageRow = new JPanel();
        JScrollPane scroll = new JScrollPane(getMessageTextArea(), ScrollPaneConstants.VERTICAL_SCROLLBAR_ALWAYS,
                ScrollPaneConstants.HORIZONTAL_SCROLLBAR_NEVER);
        messageRow.add(scroll);
        add(toRow);
        add(subjectRow);
        add(messageRow);
        setVisible(true);
     * Clear all the fields.
    public void createNewMessage() {
        getSubjectTextField().setText("");
        getToTextField().setText("");
        getMessageTextArea().setText("");
     * Exit the application.
    public void exitApplication() {
        if (JOptionPane.showConfirmDialog(this, "Are you sure you would like to exit now?", "Exit",
                JOptionPane.YES_NO_OPTION) == JOptionPane.YES_OPTION) {
            System.exit(0);
     * @return The subject text field, (creates a new one if it doesn't already exist)
    private JTextField getSubjectTextField() {
        if (this.subjectTextField == null) {
            this.subjectTextField = new JTextField("RE:", 24);
        return this.subjectTextField;
     * @return The to text field, (creates a new one if it doesn't already exist)
    private JTextField getToTextField() {
        if (this.toTextField == null) {
            this.toTextField = new JTextField(24);
        return this.toTextField;
     * @return The message text area, (creates a new one if it doesn't already exist
    private JTextArea getMessageTextArea() {
        if (this.messageTextArea == null) {
            this.messageTextArea = new JTextArea(6, 22);
            this.messageTextArea.setLineWrap(true);
            this.messageTextArea.setWrapStyleWord(true);
        return this.messageTextArea;
     * Helper method to create the menu bar.
     * @return Menu bar with all menus and menu items added
    private JMenuBar createMenuBar() {
        JMenuBar bar = new JMenuBar();
        JMenu fileMenu = new JMenu("File");
        fileMenu.add(new JMenuItem(new MenuItemAction(this, NEW_COMMAND)));
        fileMenu.add(new JMenuItem(new MenuItemAction(this, EXIT_COMMAND)));
        bar.add(fileMenu);
        // TODO add all other menu's and menu items here....
        return bar;
     * Private static class to handle all menu item actions.
    private static class MenuItemAction extends AbstractAction {
        /** Instance of the message class. */
        private Message message;
         * @param actionName
        public MenuItemAction(Message messageFrame, String actionName) {
            super(actionName);
            this.message = messageFrame;
         * @see java.awt.event.ActionListener#actionPerformed(java.awt.event.ActionEvent)
        public void actionPerformed(ActionEvent e) {
            if (e.getActionCommand().equals(NEW_COMMAND)) {
                this.message.createNewMessage();
            } else if (e.getActionCommand().equals(EXIT_COMMAND)) {
                this.message.exitApplication();
            // TODO Add the other event handlers here
    public static void main(String[] arguments) {
        Message messageFrame = new Message();
        messageFrame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
}If you have any questions, please let me know, as there are a number of new areas introduced that you may not have come across before.

Similar Messages

  • Need help with Project Pro

    Hi,
    I recently purchased few licenses for Project pro from office 365 (online version). When I log in to office 365 and go to my apps I can not see Project Pro app there? Where it might be?
    Also when I create a project with desktop app, where is the option to sync that project to server? The license already included with
    Project Online and Project server Sync.
    Any Help solving my issues will be greatly appreciated.
    Thanks in advance..

    Hi,
    Please see this
    article for starting a project with Project Pro for Project Online.
    Don't forget to use in Project Pro the email adress used for creating your O365 account.
    Hope this helps,
    Guillaume Rouyre, MBA, MVP, P-Seller |

  • Need help with project (calling methods) please!!

    Hi there i have a project for uni requiring me to create a java program that creates a random No. and lets the user have three guesses to find the No. When the users guesses correct he gets a message telling him hes won and if he doesnt get it correct he gets a message telling him the correct No then terminates.
    The code has to call an outside method called[b] Public Static Boolean CheckGuess
    I have tried to create this and got it to compile with no errors (eventually) but i keep getting a message saying i have whenever i type any number in. I think the problem is the way i am calling the method i havnt got much experience this is all pretty new to me any help would be really appreciated. Thanks.
    import javax.swing.*;
    import java.util.*;
    public class Coursework1{
         public static void main(String args[]){
              int randomnumber,usersguessint,checkguess,guessvalid,attempts;
              String usersguess,output;
              boolean match;
              //create random number generator
              Random numGenerator = new Random();
              //generate a random number between 1 & 10 inclusive
              randomnumber = Math.abs(numGenerator.nextInt(9))+1;
              //initialize variable attempts
              for ( attempts = 0; attempts < 3; attempts++ ) {
                   //ask user for his first guess
                   usersguess=JOptionPane.showInputDialog("Please enter your guess between 1 & 10");
                   //convert users guess to integer
                   usersguessint = Integer.parseInt(usersguess);
                        //validate input
                        while (usersguessint<1||usersguessint>10){
                        usersguess=JOptionPane.showInputDialog("You entered an incorrect number \nPlease enter a numberbetween 1 & 10");
                         //convert users guess to integer
                        usersguessint = Integer.parseInt(usersguess);
                        } //end while loop
                             //call boolean method
                             if (match=true){
                             //display text area in JoptionPane
                             output="You won";
                             JOptionPane.showMessageDialog(null,output,"You Won",JOptionPane.INFORMATION_MESSAGE);
                             break;}
                             else{
                             output="Try again";     
                             JOptionPane.showInputDialog("Try again");
                                  }     //end if
                   } //end for
              }//end main
                             //user defined method
                             public static boolean checkGuess(int usersguessint,int randomnumber){
                             boolean match = false;
                             if (usersguessint == randomnumber){
                             match = true;
                             return match;
                             }//end method
         }//endclass

    Thank you very much that worked a treat the program is working better now. I have just realised that my for loopcontaining my counter may be in the wrong place as the program is running though both messages 3 times e.g
    "Please enter your guess between 1 & 10"
    "Try again"
    "Please enter your guess between 1 & 10"
    "Try again"
    "Please enter your guess between 1 & 10"
    "Try again"
    "Please enter your guess between 1 & 10"
    "Try again"
    I want my program to run like
    "Please enter your guess between 1 & 10"
    "Try again"
    "Try again"
    "Try again"
    Do u think if i placed my for stament (counter) in between the two messages it would eliminate this problem.

  • Need help with calculator project for an assignment...

    Hi all, I please need help with my calculator project that I have to do for an assignment.
    Here is the project's specifications that I need to do"
    """Create a console calculator applicaion that:
    * Takes one command line argument: your name and surname. When the
    program starts, display the date and time with a welcome message for the
    user.
    * Display all the available options to the user. Your calculator must include
    the arithmetic operations as well as at least five scientific operations of the
    Math class.
    -Your program must also have the ability to round a number and
    truncate it.
    -When you multiply by 2, you should not use the '*' operator to perform the
    operation.
    -Your program must also be able to reverse the sign of a number.
    * Include sufficient error checking in your program to ensure that the user
    only enters valid input. Make use of the String; Character, and other
    wrapper classes to help you.
    * Your program must be able to do conversions between decimal, octal and
    hex numbers.
    * Make use of a menu. You should give the user the option to end the
    program when entering a certain option.
    * When the program exits, display a message for the user, stating the
    current time, and calculate and display how long the user used your
    program.
    * Make use of helper classes where possible.
    * Use the SDK to run your program."""
    When the program starts, it asks the user for his/her name and surname. I got the program to ask the user again and again for his/her name and surname
    when he/she doesn't insert anything or just press 'enter', but if the user enters a number for the name and surname part, the program continues.
    Now my question is this: How can I restrict the user to only enter 'letters' (and spaces of course) but allow NO numbers for his/her surname??
    Here is the programs code that I've written so far:
    {code}
    import java.io.*;
    import java.util.*;
    import java.text.*;
    public class Project {
         private static String nameSurname = "";     
         private static String num1 = null;
         private static String num2 = null;
         private static String choice1 = null;
         private static double answer = 0;
         private static String more;
         public double Add() {
              answer = (Double.parseDouble(num1) + Double.parseDouble(num2));
              return answer;
         public double Subtract() {
              answer = (Double.parseDouble(num1) - Double.parseDouble(num2));
              return answer;
         public double Multiply() {
              answer = (Double.parseDouble(num1) * Double.parseDouble(num2));
              return answer;
         public double Divide() {
              answer = (Double.parseDouble(num1) / Double.parseDouble(num2));
              return answer;
         public double Modulus() {
              answer = (Double.parseDouble(num1) % Double.parseDouble(num2));
              return answer;
         public double maximumValue() {
              answer = (Math.max(Double.parseDouble(num1), Double.parseDouble(num2)));
              return answer;
         public double minimumValue() {
              answer = (Math.min(Double.parseDouble(num1), Double.parseDouble(num2)));
              return answer;
         public double absoluteNumber1() {
              answer = (Math.abs(Double.parseDouble(num1)));
              return answer;
         public double absoluteNumber2() {
              answer = (Math.abs(Double.parseDouble(num2)));
              return answer;
         public double Squareroot1() {
              answer = (Math.sqrt(Double.parseDouble(num1)));
              return answer;
         public double Squareroot2() {
              answer = (Math.sqrt(Double.parseDouble(num2)));
              return answer;
         public static String octalEquivalent1() {
              int iNum1 = Integer.parseInt(num1);
    String octal1 = Integer.toOctalString(iNum1);
    return octal1;
         public static String octalEquivalent2() {
              int iNum2 = Integer.parseInt(num2);
              String octal2 = Integer.toOctalString(iNum2);
              return octal2;
         public static String hexadecimalEquivalent1() {
              int iNum1 = Integer.parseInt(num1);
              String hex1 = Integer.toHexString(iNum1);
              return hex1;
         public static String hexadecimalEquivalent2() {
              int iNum2 = Integer.parseInt(num2);
              String hex2 = Integer.toHexString(iNum2);
              return hex2;
         public double Round1() {
              answer = Math.round(Double.parseDouble(num1));
              return answer;
         public double Round2() {
              answer = Math.round(Double.parseDouble(num2));
              return answer;
              SimpleDateFormat format1 = new SimpleDateFormat("EEEE, dd MMMM yyyy");
         Date now = new Date();
         SimpleDateFormat format2 = new SimpleDateFormat("hh:mm a");
         static Date timeIn = new Date();
         public static long programRuntime() {
              Date timeInD = timeIn;
              long timeOutD = System.currentTimeMillis();
              long msec = timeOutD - timeInD.getTime();
              float timeHours = msec / 1000;
                   return (long) timeHours;
         DecimalFormat decimals = new DecimalFormat("#0.00");
         public String insertNameAndSurname() throws IOException{
              boolean inputCorrect = false;
                   while (inputCorrect == false) {
                        while (nameSurname == null || nameSurname.length() == 0) {
                             for (int i = 0; i < nameSurname.length(); i++) {
                             if ((nameSurname.charAt(i) > 'a') && (nameSurname.charAt(i) < 'Z')){
                                       inputCorrect = true;
                        else{
                        inputCorrect = false;
                        break;
                        try {
                             BufferedReader inStream = new BufferedReader (new InputStreamReader(System.in));
                             System.out.print("Please enter your name and surname: ");
                             nameSurname = inStream.readLine();
                             inputCorrect = true;
                        }catch (IOException ex) {
                             System.out.println("You did not enter your name and surname, " + nameSurname + " is not a name, please enter your name and surname :");
                             inputCorrect = false;
                        System.out.println("\nA warm welcome " + nameSurname + " ,todays date is: " + format1.format(now));
                        System.out.println("and the time is now exactly " + format2.format(timeIn) + ".");
                        return nameSurname;
              public String inputNumber1() throws IOException {
              boolean inputCorrect = false;
                   while (inputCorrect == false) {
                        try {
                             BufferedReader br = new BufferedReader (new InputStreamReader(System.in));
                             System.out.print("\nPlease enter a number you want to do a calculation with and hit <ENTER>: ");
                             num1 = br.readLine();
                             double number1 = Double.parseDouble(num1);
                             System.out.println("\nThe number you have entered is: " + number1);
                             inputCorrect = true;
                        } catch (NumberFormatException nfe) {
                             System.out.println("\nYou did not enter a valid number: " + "\""+ num1 + "\" is not a number!!");
                             inputCorrect = false;
                        return num1;
         public String calculatorChoice() throws IOException {
              System.out.println("Please select an option of what you would like to do with this number from the menu below and hit <ENTER>: ");
              System.out.println("\n*********************************************");
              System.out.println("---------------------------------------------");
              System.out.println("Please select an option from the list below: ");
              System.out.println("---------------------------------------------");
              System.out.println("1 - Add");
              System.out.println("2 - Subtract");
              System.out.println("3 - Multiply");
              System.out.println("4 - Divide (remainder included)");
              System.out.println("5 - Maximum and minimum value of two numbers");
              System.out.println("6 - Squareroot");
              System.out.println("7 - Absolute value of numbers");
              System.out.println("8 - Octal and Hexadecimal equivalent of numbers");
              System.out.println("9 - Round numbers");
              System.out.println("0 - Exit program");
              System.out.println("**********************************************");
              boolean inputCorrect = false;
                   while (inputCorrect == false) {
                        try {
                             BufferedReader inStream = new BufferedReader (new InputStreamReader(System.in));
                             System.out.print("Please enter your option and hit <ENTER>: ");
                             choice1 = inStream.readLine();
                             int c1 = Integer.parseInt(choice1);
                             System.out.println("\nYou have entered choice number: " + c1);
                             inputCorrect = true;
                        } catch (NumberFormatException nfe) {
                             System.out.println("You did not enter a valid choice number: " + "\""+ choice1 + "\" is not in the list!!");
                             inputCorrect = false;
                        return choice1;
         public String inputNumber2() throws IOException {
              boolean inputCorrect = false;
                   while (inputCorrect == false) {
                        try {
                             BufferedReader br2 = new BufferedReader (new InputStreamReader(System.in));
                             System.out.print("\nPlease enter another number you want to do the calculation with and hit <ENTER>: ");
                             num2 = br2.readLine();
                             double n2 = Double.parseDouble(num2);
                             System.out.println("\nThe second number you have entered is: " + n2);
                             System.out.println("\nYour numbers are: " + num1 + " and " + num2);
                             inputCorrect = true;
                        } catch (NumberFormatException nfe) {
                             System.out.println("You did not enter a valid number: " + "\""+ num2 + "\" is not a number!!");
                             inputCorrect = false;
                        return num2;
         public int Calculator() {
              int choice2 = (int) Double.parseDouble(choice1);
              switch (choice2) {
                        case 1 :
                             Add();
                             System.out.print("The answer of " + num1 + " + " + num2 + " is: " + decimals.format(answer));
                             break;
                        case 2 :
                             Subtract();
                             System.out.print("The answer of " + num1 + " - " + num2 + " is: " + decimals.format(answer));
                             break;
                        case 3 :
                             Multiply();
                             System.out.print("The answer of " + num1 + " * " + num2 + " is: " + decimals.format(answer));
                             break;
                        case 4 :
                             Divide();
                             System.out.print("The answer of " + num1 + " / " + num2 + " is: " + decimals.format(answer));
                             Modulus();
                             System.out.print(" and the remainder is " + decimals.format(answer));
                             break;
                        case 5 :
                             maximumValue();
                             System.out.println("The maximum number between the numbers " + num1 + " and " + num2 + " is: " + decimals.format(answer));
                             minimumValue();
                             System.out.println("The minimum number between the numbers " + num1 + " and " + num2 + " is: " + decimals.format(answer));
                             break;
                        case 6 :
                             Squareroot1();
                             System.out.println("The squareroot of value " + num1 + " is: " + decimals.format(answer));
                             Squareroot2();
                             System.out.println("The squareroot of value " + num2 + " is: " + decimals.format(answer));
                             break;
                        case 7 :
                             absoluteNumber1();
                             System.out.println("The absolute number of " + num1 + " is: " + decimals.format(answer));
                             absoluteNumber2();
                             System.out.println("The absolute number of " + num2 + " is: " + decimals.format(answer));
                             break;
                        case 8 :
                             octalEquivalent1();
                             System.out.println("The octal equivalent of " + num1 + " is: " + octalEquivalent1());
                             octalEquivalent2();
                             System.out.println("The octal equivalent of " + num2 + " is: " + octalEquivalent2());
                             hexadecimalEquivalent1();
                             System.out.println("\nThe hexadecimal equivalent of " + num1 + " is: " + hexadecimalEquivalent1());
                             hexadecimalEquivalent2();
                             System.out.println("The hexadecimal equivalent of " + num2 + " is: " + hexadecimalEquivalent2());
                             break;
                        case 9 :
                             Round1();
                             System.out.println("The rounded number of " + num1 + " is: " + decimals.format(answer));
                             Round2();
                             System.out.println("The rounded number of " + num2 + " is: " + decimals.format(answer));
                             break;
                        case 0 :
                             if (choice2 == 0) {
                                  System.exit(1);
                             break;
                   return choice2;
              public String anotherCalculation() throws IOException {
                   boolean inputCorrect = false;
                   while (inputCorrect == false) {
                             try {                              
                                  BufferedReader br3 = new BufferedReader (new InputStreamReader(System.in));
                                  System.out.print("\nWould you like to do another calculation? Y/N ");
                                  more = br3.readLine();
                                  String s1 = "y";
                                  String s2 = "Y";
                                  if (more.equals(s1) || more.equals(s2)) {
                                       inputCorrect = true;
                                       while (inputCorrect = true){
                                            inputNumber1();
                                            System.out.println("");
                                            calculatorChoice();
                                            System.out.println("");
                                            inputNumber2();
                                            System.out.println("");
                                            Calculator();
                                            System.out.println("");
                                            anotherCalculation();
                                            System.out.println("");
                                            inputCorrect = true;
                                  } else {
                                       System.out.println("\n" + nameSurname + " thank you for using this program, you have used this program for: " + decimals.format(programRuntime()) + " seconds");
                                       System.out.println("the program will now exit, Goodbye.");
                                       System.exit(0);
                             } catch (IOException ex){
                                  System.out.println("You did not enter a valid answer: " + "\""+ more + "\" is not in the list!!");
                                  inputCorrect = false;
              return more;
         public static void main(String[] args) throws IOException {
              Project p1 = new Project();
              p1.insertNameAndSurname();
              System.out.println("");
              p1.inputNumber1();
              System.out.println("");
              p1.calculatorChoice();
              System.out.println("");
              p1.inputNumber2();
              System.out.println("");
              p1.Calculator();
                   System.out.println("");
                   p1.anotherCalculation();
                   System.out.println("");
    {code}
    *Can you please run my code for yourself and have a look at how this program is constructed*
    *and give me ANY feedback on how I can better this code(program) or if I've done anything wrong from your point of view.*
    Your help will be much appreciated.
    Thanks in advance

    Smirre wrote:
    Now my question is this: How can I restrict the user to only enter 'letters' (and spaces of course) but allow NO numbers for his/her surname??You cannot restrict the user. It is a sad fact in programming that the worst bug always sits in front of the Computer.
    What you could do is checking the input string for numbers. If it contains numbers, just reprompt for the Name.
    AND you might want to ask yourself why the heck a calculator needs to know the users Name.

  • Need help with almost completed plugin engine project

    Hi all,
    For a while now I have been working on a plugin engine. After a few iterations, the engine is similar to the Eclipse engine, in that plugins use extension points and extensions to allow contributions. Unlike the eclipse engine I have added the ability for plugins to fire events through the engine and other plugins can add listeners, all through the plugin.xml manifest. Dependencies are mostly handled automatically at plugin load time (when extensions get resolved to extension points, and listeners get resolved to events). For the case where a plugin needs to use classes from another plugin, dependencies are also allowed to be declared. Like the eclipse engine, activation of plugins occurs the first time a class is used within the plugin's classpath, OR a plugin can be activated after it is loaded.
    What I need help with is testing, working on examples to provide with the engine project, and feedback/suggestions before we release the M1 build. I am asking for those that are interested in this type of work to volunteer to help where applicable and possible. I want to provide a solid plugin engine to the java community, one that is easy to use, works well, and is pretty effecient in terms of resource usage and performance.
    Of particular interest to me right at the moment is dealing with multiple versions. As I see it, the engine will be used within an application and as such plugins would be distributed with a specific application version. The plugin version itself is more of a notification as to what version a plugin is, although I imagine it will help when updating at runtime as well.
    Just a few other details of the engine. It handles (or will soon) dynamic load, unload and reload of plugins at runtime. Plugins can be distributed in an archive file format, we call .par (Plugin ARchive), with additional plugin filename extensions configurable at runtime. The plugins can be developed and deployed in an expanded directory format as they are in Eclipse as well, or in the archive format. In the archive format they do not need to be unzipped when deployed, and they can contain embeded jar/zip libraries. The engine handles finding and creating classes directly out of the .par file at runtime.
    Multiple locations to find plugins are configurable before the engine starts, and even after it starts more could be added to allow additional locations to find plugins. URLs are supported, and soon the HTTP protocol will be supported so that plugins can be downloaded and installed at runtime.
    The project can be found at www.sourceforge.net/projects/genpluginengine. If you would like to get involved and help out, please sign up on the dev mail list and send an email to introduce yourself to the rest of the members on the list.
    I'll also add that I am working on a Swing UI Framework built entirely from plugins. It provides a ready-to-launce UI application that developers can simply add their plugins to, extending various extension points of the framework to have menu items, toolbar buttons, status bar access, help and preferences dialog additions, file i/o choosers, tons of open-source components ready to use (or extend to add on to), and like Eclipse, hopefully... draggable window frames that can be dropped on any other frame to form a tabbed frame of windows. Some of this is a ways off, some is getting there now. Presently you can add menu items that do allow plugin activation when first clicked, so plugins can be loaded but not activated until needed. The Preference dialog works but is not completed, and a plugin that adds a plugin control panel to view all loaded plugins, activate them, load/unload/reload, view extension points, extensions, dependencies, etc is partially completed. The point is, to allow a ready to run UI framework in Swing with an easy path for developers to quickly build applications with. If you are interested in this, when you join the mail list and introduce yourself, indicate that you are interested in this as well, as we need help with plugin development for it and would appreciate more help here too.
    Look forward to some replies.

    Might I suggest setting up a project at a known project-site? I've seen your progress and questions posted here from time to time, but one of the drawbacks is that you have to fill each post with the entirity of your vision to explain what you're doing. That's a lot of text to read - and most folks will skip right over it.
    On the other hand, a well-crafted, good-looking project web-site, with appropriate links and docs and vision statements, diagrams, etc. will have more likelyhood of attracting volunteers. java.net and sourceforge.net are likely spots to set up shop. In addition, you get CVS and bug-tracking systems, which can be quite valuable in such a large-scale project where there are lots of pieces.

  • Need Help with a Flash Web Project

    Hello, everyone. I am trying to use Flash to make a two-step
    system. I want the flash document to, first, allow a person to
    upload multiple image files and then, second, for the flash
    document be able to create a slideshow with the uploaded images and
    fade in and out from each image until the slideshow is over. I want
    it to be where the flash document creates its own slideshow with
    the images that are uploaded in the first step that I mentioned. I
    want it to do it completely on its own so I need to know how to
    give it the proper AI so that it can do this task.
    So, are there any tips that anyone has on how to do this? Can
    anyone tell me exactly how to do this? I really need help with this
    for my new website project. Thanks in advance, everyone!

    The problem with the text not appearing at all has to do with you setting the alpha of the movieclip to 0%.  Not within the movieclip, but the movieclip itself.  The same for the xray graphic, except you have that as a graphic symbol rather than a movieclip.  To have that play while inhabiting one frame you'll need to change it to a movieclip symbol.
    To get the text to play after the blinds (just a minor critique, I'd speed up the blinds), you will want to add some code in the frame where you added the stop in the blinds animation.  You will also need to assign instance names for the text movieclips in the properties panel, as well as place a stop(); in their first frames (inside).
    Let's say you name them upperText and lowerText.  Then the code you'd add at the end of the blinds animation (in the stop frame) would be...
    _parent.upperText.play();
    _parent.lowerText.play();
    The "_parent" portion of that is used to target the timeline that is containing the item making the command, basically meaning it's the guy inside the blinds telling the guy outside the blinds to do something.
    You'll probably want to add stops to the ends of the text animations as well.
    If you want to have the first text trigger the second text, then you'd take that second line above and place it in the last frame of the first text animation instead of the blinds animation.
    Note, on occasion, undeterminably, that code above doesn't work for some odd reason... the animation plays to the next frame and stops... so if you run into that, just put a play(); in the second frame to help push it along.
    PS GotoandPlay would actually be gotoAndPlay, and for the code above you could substitute play(); with gotoAndPlay(2);

  • Project Server 2013: I am using Project Server Permission Mode and need help with permission assignments?

    Hi 
    Project Server 2013: I am using Project Server Permission Mode and need help with permission assignments?
    How can I change Permissions for the individual users to see specific projects or all projects in project center and to see specific quick launch items?
    For Example: if i have 4 users, A, B, C and D. what i want is:
    User A can see everything and act as a project manager or Admin.
    User B can view all projects in project centre but can change the schedule or resource assignment etc.
    User C can only act as approver of projects and can view all projects in project centre.
    User D can only view specific projects for which permissions are given.
    can i have some expert help in sorting and understanding permission modes... as i was playing with project server mode permissions and can't figure out how to apply the above scenario to set of my user.
    Thanks in Advance
    Cheers
    AJ
    Ajay Kumar

    Hi Ajay,
    Please refer to this link for detailed explanations about PS2013 security model. 
    http://technet.microsoft.com/en-us/library/cc197638(v=office.15).aspx
    Actually, it will take a couple of days to explain in detail the security model that is a fundamental and tricky aspect of every PS implementation. But basically, you NEVER set permissions for a single user. You have groups in which your insert users. Groups
    define "what users can do". Then you associate groups to a corresponding category. Categories define "what user can see". Thus the association of a group with a category will set "what the user can do on the objects he can see". Then, for more advanced security
    level, you can use the RBS that will consist in "branches" in which you'll insert users. Based on those branches, you'll customize categories to fine-tune what user can see (for projects and resources) depending on the RBS branch and level.
    I'd advice you to start "playing" in a test environment with the default categories/groups that might probably cover your need.
    Concerning your 4 users:
    user A : add him to the "administrator" group. Be careful that you're mentionning either project manager or administrator, which are 2 groups/categories with totally different permissions level.
    user B : basically can see everything and change everything? it could be in the project manager group, assuming that there are no project visibility restrictions on the category via the RBS.
    user C : waht do you mean by "approver"? Workflow approvals? Then it will be the portfolio manager group. Task update or timesheet approval? Then it is another long topic: please refer in the documentation to the "status manager" and "timesheet manager"
    concepts. There are not related to the security model. In a few words, the status manager is the owner of the project plan, is defined for each task and approves tasks updates. The timesheet manager is an attribute defined for each resource in its parameters
    and approves resource timesheet.
    user D : you have to define which permission level must be given to this user. Basically it could be a team member that will see only projects he's in the project team. Note that team member cannot interact with the project plan in another way than submitting
    timesheets and/or tasks updates which must be approved.
    Once more, those are large and complex subjects that require a deep dive into your business model and tons of tests in a test environment.
    Hope this helps.
    Guillaume Rouyre - MBA, MCP, MCTS

  • Need help with Template - unbalanced #EndEditable tag

    I am unable to use this template to create a new page and get the "unbalanced #EndEditable tag" error.
    If I open the file independently it looks great - otherwise I get the error.
    Code for internal_students.dwt
    There is an error at line 45, column 79 (absolute position 2188)
    <div id="metanav"><!-- #BeginLibraryItem "/Library/metaNav.lbi" -->
    <p><a href="../Library/contact/index.html">Contact Us</a></p>
    <!-- #EndLibraryItem --></div>
            <div id="navigation">
                <div id="navigation_l">
                    <div id="navigation_r"><!-- #BeginLibraryItem "/Library/mainNav.lbi" --> <ul>
                            <li><a href="../index.html" class="first"><img src="../images/spacer.gif" alt="CAITE Homepage" width="75" height="20" border="0" /></a></li>
                            <li><a href="../about/index.html">About</a></li>
      <li><a href="../news/index.html">News And Events</a></li>
      <li><a href="../educators/index.html">For Educators</a></li>
      <li><a href="../students/index.html">For Students</a></li>
      <li><a href="../industry/index.html" class="last">For Industry</a></li>
                        </ul>
    <!-- #EndLibraryItem --></div>
    I need help with this as the site and templates were created 2/3 years before I arrived on the job.
    Thank you
    Cheryl

    Okay
    - This is on-line page  http://caite.cs.umass.edu/students/index.html
    If you want code from template here it is:
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml"><!-- InstanceBegin template="/Templates/internal_about.dwt" codeOutsideHTMLIsLocked="false" -->
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
    <!-- InstanceBeginEditable name="doctitle" -->
    <title>CAITE - Commonwealth Alliance for Information Technology Education</title>
    <!-- InstanceEndEditable -->
    <!-- InstanceBeginEditable name="head" -->
    <meta name="Description" content="Commonwealth Alliance for Information Technology Education (CAITE) to design and carry out comprehensive programs that address under representation in information technology (IT) education and the workforce. CAITE will focus on women and minorities in groups that are underrepresented in the Massachusetts innovation economy" />
    <meta name="Keywords" content="Commonwealth Alliance for Information Technology Education CAITE Massachusetts women minorities information technology IT" />
    <meta name="robots" content="all, index, follow" />
    <meta name="revisit-after" content="14 days" />
    <meta name="author" content="Outreach Web Team" />
    <!-- TemplateBeginEditable name="head" --><!-- TemplateEndEditable --><!-- InstanceEndEditable -->
    <link rel="shortcut icon" href="/images/favicon.ico" />
    <script type="text/javascript" src="../scripts/jquery.js"></script>
    <script type="text/javascript" src="../scripts/jquery.easing.js"></script>
    <script type="text/javascript" src="../scripts/jquery.pngfix.js"></script>
    <script language="JavaScript" type="text/JavaScript">
        <!--
        $(document).ready(function() {
            $("img[@src$=png], div#wrapper_l, div#wrapper_r, div#whatsnew").pngfix();
        //-->
    </script>
    <link href="../css/screenstyle.css" rel="stylesheet" type="text/css" media="screen" />
    <link href="../css/printstyle.css" rel="stylesheet" type="text/css" media="print" />
    </head>
    <script type="text/javascript">
    var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
    document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
    </script>
    <body>  
        <div id="wrapper">
            <div id="metanav"><!-- #BeginLibraryItem "/Library/metaNav.lbi" -->
    <p><a href="../Library/contact/index.html">Contact Us</a></p>
    <!-- #EndLibraryItem --></div>
            <div id="navigation">
                <div id="navigation_l">
                    <div id="navigation_r"><!-- #BeginLibraryItem "/Library/mainNav.lbi" --> <ul>
                            <li><a href="../index.html" class="first"><img src="../images/spacer.gif" alt="CAITE Homepage" width="75" height="20" border="0" /></a></li>
                            <li><a href="../about/index.html">About</a></li>
      <li><a href="../news/index.html">News And Events</a></li>
      <li><a href="../educators/index.html">For Educators</a></li>
      <li><a href="../students/index.html">For Students</a></li>
      <li><a href="../industry/index.html" class="last">For Industry</a></li>
                        </ul>
    <!-- #EndLibraryItem --></div>
                    <!-- end navigation right -->
                </div><!-- end navigation left -->
           </div><!-- end navigation -->
            <div id="wrapper_l">
                <div id="wrapper_r">
                      <div id="innerwrapper">
                        <div id="internalBanner-print"> <h1>Commonwealth Alliance for Information Technology Education (CAITE)</h1></div>
                        <div id="internalBanner"><!-- InstanceBeginEditable name="internalBanner" -->
                          <div class="students-banner">
                            <table width="100%" border="0" cellspacing="0" cellpadding="0">
                              <tr>
                                <td width="125" height="188" align="left" valign="top" id="homeImage"><img src="../images/logo_vertical_small.png" alt="CAITE" width="105" height="188" /></td>
                                <td align="left" valign="top" id="internal-banner-quote"><div id="internalQuote">
                                    <div id="internalQuote-inner">
                                      <p>CAITE designs and carrys out comprehensive programs that address under-representation in information technology (IT).</p>
                                  </div>
                                </div></td>
                              </tr>
                            </table>
                        </div>
                        <!-- InstanceEndEditable --></div> <!-- end banner -->
                        <div id="internalContent">
                            <table width="100%" border="0" cellspacing="0" cellpadding="0">
                              <tr>
                                <td width="317" align="left" valign="top" id="secondary-content">
                                  <!-- InstanceBeginEditable name="SecondaryNav" --><!-- #BeginLibraryItem "/Library/studentNav.lbi" -->
                                  <h3><a href="../students/index.html">For Students</a></h3>
                                  <div id="secondaryNav">
                                    <ul>
                                      <li><a href="http://www.takeITgoanywhere.org" target="_blank">TakeITgoanywhere.org</a></li>
                                    </ul>
    </div><!-- #EndLibraryItem --><!-- InstanceEndEditable -->
                                </td>
                                <td align="left" valign="top" id="contentCell"><!-- InstanceBeginEditable name="mainContent" -->
                                  <h1>For Students</h1>
                                  <p>The University of Massachusetts Amherst is leading a Commonwealth Alliance for Information Technology Education (CAITE) to design and carry out comprehensive programs that address under representation in information technology (IT) education and the workforce. CAITE will focus on women and minorities in groups that are underrepresented in the Massachusetts innovation economy; that is, economically, academically, and socially disadvantaged residents.</p>
                                  <p>The project will pilot a series of outreach programs supported by educational pathways in three regions (one rural, one suburban, and one urban). The project will include work with high school teachers, staff, and counselors. CAITE will identify best practices and disseminate, deploy, extend and institutionalize these best practices statewide and nationally.</p>
                                  <p>Community colleges are the centerpiece of CAITE because of the central role they play in reaching out to underserved populations and in serving as a gateway to careers and further higher education.</p>
                                  <p>This project will build a broad alliance built on its leadership in and partnership with the Commonwealth Information Technology Initiative (CITI), the Boston Area Advanced Technological Education Center (BATEC), regional Louis Stokes Alliances and NSF EGEP programs, and other partnerships and initiatives focused on information technology education and STEM pipeline issues</p>
                                  <p> </p>
                                <!-- InstanceEndEditable --></td>
                              </tr>
                          </table>
                        </div>
                        <div id="alliances">
                              <table width="100%" border="0" cellpadding="0" cellspacing="0">
                                <tr>
                                  <td height="30"  align="left" valign="top"><h2><a href="../about/alliances.html">Alliances</a></h2></td>
                                </tr>
                                <tr>
                                  <td  align="center" valign="middle"><!-- #BeginLibraryItem "/Library/AllianceTable.lbi" --><p>
    <table border="0" cellpadding="2" cellspacing="0">
                                    <tr>
                                      <td width="35"  align="center" valign="middle"> </td>
                                      <td  align="center" valign="middle"><a href="http://www.citi.mass.edu/" target="_blank"><img src="../images/logo_citi.jpg" alt="Citi" width="65" height="50"  border="0 /"></a></td>
                                      <td align="center" valign="middle"><a href="http://www.batec.org/index.php" target="_blank"><img src="../images/logo_batec.jpg" alt="BATEC" width="69" height="46" border="0" /></a></td>
                                      <td  align="center" valign="middle"><a href="http://www.nsf.gov/index.jsp" target="_blank"><img src="../images/nsflogo.gif" alt="NSF" width="64" height="65" border="0" ></a></td>
                                      <td  align="center" valign="middle"><a href="http://www.nelsamp.neu.edu/" target="_blank"><img src="../images/nelsamplogo.gif" width="100" border="0"></a></td>
                                      <td  align="center" valign="middle"><p><a href="http://mysite.verizon.net/milnerm/" target="_blank"><img src="../images/umlsamp.png" width="85" height="63" border="0"></a></p>                                  </td>
                                      <td  align="center" valign="middle"><a href="http://www.neagep.org/index.asp" target="_blank"><img src="../images/nealogo.gif" border="0" ></a></td>
      </tr>
                                  </table>
    <!-- #EndLibraryItem --></td>
                                </tr>
                          </table>
                        </div>
                    </div> <!-- end inner wrapper -->
                </div><!-- end wrapper right -->
            </div><!-- end wrapper left -->
            <div id="bottom">
                <div id="bottom_l">
                    <div id="bottom_r"> </div><!-- end bottom right -->
                </div><!-- end bottom left -->
            </div>  <!-- end bottom -->
        </div><!-- end wrapper -->
        <div id="copyright"><!-- #BeginLibraryItem "/Library/copyright.lbi" -->
    <p>Sponsored by CAITE an NSF CISE Broadening Participation in Computing Alliance<br />
    &copy; copyright 2008 <a href="http://www.umass.edu/" target="_blank">University of Massachusetts, Amherst</a></p>
    <font color="#666666"><br>
    </font>
    <p><font color="#666666" size=2>  This material is based upon work supported by the National Science Foundation under Grant No.s NSF-0634412 and NSF-0837739. Any opinions, findings, and conclusions or recommendations expressed in this material are those of the author(s) and do not necessarily reflect the views of the National Science Foundation.</font> </p>
    <!-- #EndLibraryItem --></div>    
    <!-- end copyright -->
    <script type="text/javascript">
    var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
    document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
    </script>
    <script type="text/javascript">
    try {
    var pageTracker = _gat._getTracker("UA-7435501-1");
    pageTracker._trackPageview();
    } catch(err) {}</script>
        </body>
    <!-- InstanceEnd --></html>

  • I need help with a VB Application

    I need help with building an application and I am on a tight deadline.  Below I have included the specifics for what I need the application to do as well as the code that I have completed so far.  I am having trouble getting the data input into
    the text fields to save to a .txt file.  Also, I need validation to ensure that the values entered into the text fields coincide with the field type.  I am new to VB so please be gentle.  Any help would be appreciated.  Thanx
    •I need to use the OpenFileDialog and SaveFileDialog in my application.
    •Also, I need to use a structure.
    1. The application needs to prompt the user to enter the file name on Form_Load.
    2. Also, the app needs to use the AppendText method to write the Employee Data to the text file. My project should allow me to write multiple Employee Data to the same text file.  The data should be written to the text file in the following format (comma
    delimited)
    FirstName, MiddleName, LastName, EmployeeNumber, Department, Telephone, Extension, Email
    3. The Department dropdown menu DropDownStyle property should be set so that the user cannot enter inputs that are not in the menu.
    Public Class Form1
    Dim filename As String
    Dim oFile As System.IO.File
    Dim oWrite As System.IO.StreamWriter
    Dim openFileDialog1 As New OpenFileDialog()
    Dim fileLocation As String
    Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
    openFileDialog1.InitialDirectory = "c:\"
    openFileDialog1.Filter = "Text files (*.txt)|*.txt|All files (*.*)|*.*"
    openFileDialog1.FilterIndex = 1
    openFileDialog1.RestoreDirectory = True
    If openFileDialog1.ShowDialog() = System.Windows.Forms.DialogResult.OK Then
    fileLocation = openFileDialog1.FileName
    End If
    'filename = InputBox("Enter output file name")
    'oWrite = oFile.CreateText(filename)
    cobDepartment.Items.Add("Accounting")
    cobDepartment.Items.Add("Administration")
    cobDepartment.Items.Add("Marketing")
    cobDepartment.Items.Add("MIS")
    cobDepartment.Items.Add("Sales")
    End Sub
    Private Sub btnSave_Click(ByValsender As System.Object, ByVal e As System.EventArgs) Handles btnSave.Click
    'oWrite.WriteLine("Write e file")
    oWrite.WriteLine("{0,10}{1,10}{2,10}{3,10}{4,10}{5,10}{6,10}{7,10}", txtFirstname.Text, txtMiddlename.Text, txtLastname.Text, txtEmployee.Text, cobDepartment.SelectedText, txtTelephone.Text, txtExtension.Text, txtEmail.Text)
    oWrite.WriteLine()
    End Sub
    Private Sub btnExit_Click(ByValsender As System.Object, ByVal e As System.EventArgs) Handles btnExit.Click
    oWrite.Close()
    End
    End Sub
    Private Sub btnClear_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnClear.Click
    txtFirstname.Text = ""
    txtMiddlename.Text = ""
    txtLastname.Text = ""
    txtEmployee.Text = ""
    txtTelephone.Text = ""
    txtExtension.Text = ""
    txtEmail.Text = ""
    cobDepartment.SelectedText = ""
    End Sub
    End Class

    Hi Mikey81,
    Your issue is about VB programming, so Visual Basic forum is a better forum for your case. I moved this thread there,
    Thanks,
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • Need help with Berkeley XML DB Performance

    We need help with maximizing performance of our use of Berkeley XML DB. I am filling most of the 29 part question as listed by Oracle's BDB team.
    Berkeley DB XML Performance Questionnaire
    1. Describe the Performance area that you are measuring? What is the
    current performance? What are your performance goals you hope to
    achieve?
    We are measuring the performance while loading a document during
    web application startup. It is currently taking 10-12 seconds when
    only one user is on the system. We are trying to do some testing to
    get the load time when several users are on the system.
    We would like the load time to be 5 seconds or less.
    2. What Berkeley DB XML Version? Any optional configuration flags
    specified? Are you running with any special patches? Please specify?
    dbxml 2.4.13. No special patches.
    3. What Berkeley DB Version? Any optional configuration flags
    specified? Are you running with any special patches? Please Specify.
    bdb 4.6.21. No special patches.
    4. Processor name, speed and chipset?
    Intel Xeon CPU 5150 2.66GHz
    5. Operating System and Version?
    Red Hat Enterprise Linux Relase 4 Update 6
    6. Disk Drive Type and speed?
    Don't have that information
    7. File System Type? (such as EXT2, NTFS, Reiser)
    EXT3
    8. Physical Memory Available?
    4GB
    9. Are you using Replication (HA) with Berkeley DB XML? If so, please
    describe the network you are using, and the number of Replica’s.
    No
    10. Are you using a Remote Filesystem (NFS) ? If so, for which
    Berkeley DB XML/DB files?
    No
    11. What type of mutexes do you have configured? Did you specify
    –with-mutex=? Specify what you find inn your config.log, search
    for db_cv_mutex?
    None. Did not specify -with-mutex during bdb compilation
    12. Which API are you using (C++, Java, Perl, PHP, Python, other) ?
    Which compiler and version?
    Java 1.5
    13. If you are using an Application Server or Web Server, please
    provide the name and version?
    Oracle Appication Server 10.1.3.4.0
    14. Please provide your exact Environment Configuration Flags (include
    anything specified in you DB_CONFIG file)
    Default.
    15. Please provide your Container Configuration Flags?
    final EnvironmentConfig envConf = new EnvironmentConfig();
    envConf.setAllowCreate(true); // If the environment does not
    // exist, create it.
    envConf.setInitializeCache(true); // Turn on the shared memory
    // region.
    envConf.setInitializeLocking(true); // Turn on the locking subsystem.
    envConf.setInitializeLogging(true); // Turn on the logging subsystem.
    envConf.setTransactional(true); // Turn on the transactional
    // subsystem.
    envConf.setLockDetectMode(LockDetectMode.MINWRITE);
    envConf.setThreaded(true);
    envConf.setErrorStream(System.err);
    envConf.setCacheSize(1024*1024*64);
    envConf.setMaxLockers(2000);
    envConf.setMaxLocks(2000);
    envConf.setMaxLockObjects(2000);
    envConf.setTxnMaxActive(200);
    envConf.setTxnWriteNoSync(true);
    envConf.setMaxMutexes(40000);
    16. How many XML Containers do you have? For each one please specify:
    One.
    1. The Container Configuration Flags
              XmlContainerConfig xmlContainerConfig = new XmlContainerConfig();
              xmlContainerConfig.setTransactional(true);
    xmlContainerConfig.setIndexNodes(true);
    xmlContainerConfig.setReadUncommitted(true);
    2. How many documents?
    Everytime the user logs in, the current xml document is loaded from
    a oracle database table and put it in the Berkeley XML DB.
    The documents get deleted from XML DB when the Oracle application
    server container is stopped.
    The number of documents should start with zero initially and it
    will grow with every login.
    3. What type (node or wholedoc)?
    Node
    4. Please indicate the minimum, maximum and average size of
    documents?
    The minimum is about 2MB and the maximum could 20MB. The average
    mostly about 5MB.
    5. Are you using document data? If so please describe how?
    We are using document data only to save changes made
    to the application data in a web application. The final save goes
    to the relational database. Berkeley XML DB is just used to store
    temporary data since going to the relational database for each change
    will cause severe performance issues.
    17. Please describe the shape of one of your typical documents? Please
    do this by sending us a skeleton XML document.
    Due to the sensitive nature of the data, I can provide XML schema instead.
    18. What is the rate of document insertion/update required or
    expected? Are you doing partial node updates (via XmlModify) or
    replacing the document?
    The document is inserted during user login. Any change made to the application
    data grid or other data components gets saved in Berkeley DB. We also have
    an automatic save every two minutes. The final save from the application
    gets saved in a relational database.
    19. What is the query rate required/expected?
    Users will not be entering data rapidly. There will be lot of think time
    before the users enter/modify data in the web application. This is a pilot
    project but when we go live with this application, we will expect 25 users
    at the same time.
    20. XQuery -- supply some sample queries
    1. Please provide the Query Plan
    2. Are you using DBXML_INDEX_NODES?
    Yes.
    3. Display the indices you have defined for the specific query.
         XmlIndexSpecification spec = container.getIndexSpecification();
         // ids
         spec.addIndex("", "id", XmlIndexSpecification.PATH_NODE | XmlIndexSpecification.NODE_ATTRIBUTE | XmlIndexSpecification.KEY_EQUALITY, XmlValue.STRING);
         spec.addIndex("", "idref", XmlIndexSpecification.PATH_NODE | XmlIndexSpecification.NODE_ATTRIBUTE | XmlIndexSpecification.KEY_EQUALITY, XmlValue.STRING);
         // index to cover AttributeValue/Description
         spec.addIndex("", "Description", XmlIndexSpecification.PATH_EDGE | XmlIndexSpecification.NODE_ELEMENT | XmlIndexSpecification.KEY_SUBSTRING, XmlValue.STRING);
         // cover AttributeValue/@value
         spec.addIndex("", "value", XmlIndexSpecification.PATH_EDGE | XmlIndexSpecification.NODE_ATTRIBUTE | XmlIndexSpecification.KEY_EQUALITY, XmlValue.STRING);
         // item attribute values
         spec.addIndex("", "type", XmlIndexSpecification.PATH_EDGE | XmlIndexSpecification.NODE_ATTRIBUTE | XmlIndexSpecification.KEY_EQUALITY, XmlValue.STRING);
         // default index
         spec.addDefaultIndex(XmlIndexSpecification.PATH_NODE | XmlIndexSpecification.NODE_ELEMENT | XmlIndexSpecification.KEY_EQUALITY, XmlValue.STRING);
         spec.addDefaultIndex(XmlIndexSpecification.PATH_NODE | XmlIndexSpecification.NODE_ATTRIBUTE | XmlIndexSpecification.KEY_EQUALITY, XmlValue.STRING);
         // save the spec to the container
         XmlUpdateContext uc = xmlManager.createUpdateContext();
         container.setIndexSpecification(spec, uc);
    4. If this is a large query, please consider sending a smaller
    query (and query plan) that demonstrates the problem.
    21. Are you running with Transactions? If so please provide any
    transactions flags you specify with any API calls.
    Yes. READ_UNCOMMITED in some and READ_COMMITTED in other transactions.
    22. If your application is transactional, are your log files stored on
    the same disk as your containers/databases?
    Yes.
    23. Do you use AUTO_COMMIT?
         No.
    24. Please list any non-transactional operations performed?
    No.
    25. How many threads of control are running? How many threads in read
    only mode? How many threads are updating?
    We use Berkeley XML DB within the context of a struts web application.
    Each user logged into the web application will be running a bdb transactoin
    within the context of a struts action thread.
    26. Please include a paragraph describing the performance measurements
    you have made. Please specifically list any Berkeley DB operations
    where the performance is currently insufficient.
    We are clocking 10-12 seconds of loading a document from dbd when
    five users are on the system.
    getContainer().getDocument(documentName);
    27. What performance level do you hope to achieve?
    We would like to get less than 5 seconds when 25 users are on the system.
    28. Please send us the output of the following db_stat utility commands
    after your application has been running under "normal" load for some
    period of time:
    % db_stat -h database environment -c
    % db_stat -h database environment -l
    % db_stat -h database environment -m
    % db_stat -h database environment -r
    % db_stat -h database environment -t
    (These commands require the db_stat utility access a shared database
    environment. If your application has a private environment, please
    remove the DB_PRIVATE flag used when the environment is created, so
    you can obtain these measurements. If removing the DB_PRIVATE flag
    is not possible, let us know and we can discuss alternatives with
    you.)
    If your application has periods of "good" and "bad" performance,
    please run the above list of commands several times, during both
    good and bad periods, and additionally specify the -Z flags (so
    the output of each command isn't cumulative).
    When possible, please run basic system performance reporting tools
    during the time you are measuring the application's performance.
    For example, on UNIX systems, the vmstat and iostat utilities are
    good choices.
    Will give this information soon.
    29. Are there any other significant applications running on this
    system? Are you using Berkeley DB outside of Berkeley DB XML?
    Please describe the application?
    No to the first two questions.
    The web application is an online review of test questions. The users
    login and then review the items one by one. The relational database
    holds the data in xml. During application load, the application
    retrieves the xml and then saves it to bdb. While the user
    is making changes to the data in the application, it writes those
    changes to bdb. Finally when the user hits the SAVE button, the data
    gets saved to the relational database. We also have an automatic save
    every two minues, which saves bdb xml data and saves it to relational
    database.
    Thanks,
    Madhav
    [email protected]

    Could it be that you simply do not have set up indexes to support your query? If so, you could do some basic testing using the dbxml shell:
    milu@colinux:~/xpg > dbxml -h ~/dbenv
    Joined existing environment
    dbxml> setverbose 7 2
    dbxml> open tv.dbxml
    dbxml> listIndexes
    dbxml> query     { collection()[//@date-tip]/*[@chID = ('ard','zdf')] (: example :) }
    dbxml> queryplan { collection()[//@date-tip]/*[@chID = ('ard','zdf')] (: example :) }Verbosity will make the engine display some (rather cryptic) information on index usage. I can't remember where the output is explained; my feeling is that "V(...)" means the index is being used (which is good), but that observation may not be accurate. Note that some details in the setVerbose command could differ, as I'm using 2.4.16 while you're using 2.4.13.
    Also, take a look at the query plan. You can post it here and some people will be able to diagnose it.
    Michael Ludwig

  • Need help with navigation within a spark list...

    hey guys, so in my application when you click on a list item, it opens up an image, and along with the image a few buttons are created dynamically...
    the image and the url/labels for the dynamic buttons is provided through an xml/xmlListCollection.
    what i need help with is the url or more specifically when you click on one of these dynamic buttons it needs to navigate me to another part of an list or display a certain set of images that is not in my spark list...
    please let me know if this makes no sence
    the code i have is
    <code>
        [Bindable] private var menuXml:XML;
        [Bindable] private var imgList:XMLListCollection = new XMLListCollection();
        [Bindable] private var navControl:XMLListCollection = new XMLListCollection();
        [Bindable] private var fullList:XMLListCollection = new XMLListCollection();
        private var returnedXml:XMLListCollection = new XMLListCollection();
        private var myXmlSource:XML = new XML();
        //[Bindable] private var xmlReturn:Object;
        private var currImage:int = 0;
        //public var userOpProv:XMLListCollection = new XMLListCollection();
        //private var troubleShootProvider:XMLListCollection = new XMLListCollection();
        private function myXml_resultHandeler(event:ResultEvent):void{
            userOptionProvider.source = event.result.apx32.userOptions.children();
            troubleShootProvider.source = event.result.apx32.troubleShooting.children();
            fullList.source = event.result.apx32.children();
            returnedXml.source = event.result[0].children();
            myXmlSource = event.result[0];
        private function myXml_faultHandler(event:FaultEvent):void{
            Alert.show("Error loading XML");
            Alert.show(event.fault.message);
        private function app_creationComplete(event:FlexEvent):void{
            userOptions.scroller.setStyle("horizontalScrollPolicy", ScrollPolicy.OFF);
            myXml.send();
            //trouble.scroller.setStyle("horizontalScrollPolicy", ScrollPolicy.OFF);
            myXml = new HTTPService();
            myXml.url = "modules/apx32/apx32TroubleshootingXml.xml";
            myXml.resultFormat = "e4x";
            myXml.addEventListener(ResultEvent.RESULT, myXml_resultHandeler);
            myXml.addEventListener(FaultEvent.FAULT, myXml_faultHandler);
            myXml.send();
        private function troubleShootChange(event:IndexChangeEvent):void{
            dynamicButtons.removeAllElements();
            navControl.source = troubleShootProvider[event.newIndex].children();
            currImage = 0;
            imgList.source = troubleShootProvider[event.newIndex].images.children();
            definition.source = imgList[currImage].@url;
            if(imgList[currImage].@details == "true"){
                if(imgList[currImage].buttons.@hasButtons == "true"){
                    for each(var item:XML in imgList[currImage].buttons.children()){
                        var newButton:LinkButton = new LinkButton();
                        newButton.label = item.@name;
                        newButton.x = item.@posX;
                        newButton.y = item.@posY;
                        newButton.setStyle("skin", null);
                        newButton.styleName = "dynamicButtonStyle";
                        dynamicButtons.addElement(newButton);
            //var isMultiPage:String = navControl[2]["multiPages"];
            //trace(isMultiPage);
            //        if(isMultiPage){
            if(currImage >= imgList.length - 1){
                next.visible = false;
                back.visible = false;
            else{
                back.visible = false;
                next.visible = true;
        private function customButtonPressed(event:Event):void{
            if(imgList[currImage].button.@changeTo != ""){
        private function userOptionsChange(event:IndexChangeEvent):void{
            dynamicButtons.removeAllElements();
            navControl.source = userOptionProvider[event.newIndex].children();
            currImage = 0;
            imgList.source = userOptionProvider[event.newIndex].images.children();
            definition.source = imgList[currImage].@url;
            if(imgList[currImage].@details == "true"){
                if(imgList[currImage].buttons.@hasButtons == "true"){
                    for each(var item:XML in imgList[currImage].buttons.children()){
                        var newButton:LinkButton = new LinkButton();
                        newButton.label = item.@name;
                        newButton.x = item.@posX;
                        newButton.y = item.@posY;
                        newButton.setStyle("skin", null);
                        newButton.styleName = "dynamicButtonStyle";
                        newButton.addEventListener(MouseEvent.MOUSE_DOWN, customButtonPressed);
                        dynamicButtons.addElement(newButton);
            var isMultiPage:String = navControl[2]["multiPages"];
            if(isMultiPage == "true"){
                if(navControl[2]["next"] == "NEXT STEP"){
                    navContainer.x = 630;
                else{
                    navContainer.x = 640;
                next.label = navControl[2]["next"];
                back.label = navControl[2]["back"];
            if(currImage >= imgList.length - 1){
                next.visible = false;
                back.visible = false;
            else{
                back.visible = false;
                next.visible = true;
        private function nextClickHandler(event:MouseEvent):void{
            currImage += 1;
            dynamicButtons.removeAllElements();
            if(currImage >= imgList.length-1){
                currImage = imgList.length - 1;
                //next.visible = false;
                next.label = "YOU'RE DONE";
            else
                next.label = navControl[2]["next"];
            back.visible = true;
            if(imgList[currImage].@details == "true"){
                if(imgList[currImage].buttons.@hasButtons == "true"){
                    for each(var item:XML in imgList[currImage].buttons.children()){
                        var newButton:LinkButton = new LinkButton();
                        newButton.label = item.@name;
                        newButton.x = item.@posX;
                        newButton.y = item.@posY;
                        newButton.setStyle("skin", null);
                        newButton.styleName = "dynamicButtonStyle";
                        dynamicButtons.addElement(newButton);
            definition.source = imgList[currImage].@url;
        private function backClickHandler(event:MouseEvent):void{
            currImage -= 1;
            dynamicButtons.removeAllElements();
            if(currImage == 0){
                back.visible = false;
            next.visible = true;
            next.label = navControl[2]["next"];
            if(imgList[currImage].@details == "true"){
                if(imgList[currImage].buttons.@hasButtons == "true"){
                    for each(var item:XML in imgList[currImage].buttons.children()){
                        var newButton:LinkButton = new LinkButton();
                        newButton.label = item.@name;
                        newButton.x = item.@posX;
                        newButton.y = item.@posY;
                        newButton.setStyle("skin", null);
                        newButton.styleName = "dynamicButtonStyle";
                        dynamicButtons.addElement(newButton);
            definition.source = imgList[currImage].@url;
    </code>
    i have attached a copy of the xml that i have right now to this post for reference...
    any help will be greatly appretiated!!! i've been stuck on this problem for the last week and my project is due soon
    again thank you in advance...

    hey david... just nevermind my previous post... I was able to subclass a link button, so i now have two variables that get assigned to a link button,
    one is "tabId" <-- contains the information on which tab to swtich to, and the second is, "changeTo"... this contans the label name which it needs to switch to
    I'm just stuck on how to change my selected item in my tabNavigator/list
    the code i have right now is
        private function customButtonPressed(event:Event):void{
            if(event.currentTarget.tabId == "troubleShooting"){
                for each(var item:Object in troubleShootProvider){
                    if(item.@label == event.currentTarget.changeTo){
        private function userOptionsChange(event:IndexChangeEvent):void{
            dynamicButtons.removeAllElements();
            navControl.source = userOptionProvider[event.newIndex].children();
            currImage = 0;
            imgList.source = userOptionProvider[event.newIndex].images.children();
            definition.source = imgList[currImage].@url;
            if(imgList[currImage].@details == "true"){
                if(imgList[currImage].buttons.@hasButtons == "true"){
                    for each(var item:XML in imgList[currImage].buttons.children()){
                        var newButton:customLinkButton = new customLinkButton();
                        newButton.label = item.@name;
                        newButton.tabId = item.@tab;
                        newButton.changeTo = item.@changeTo;
                        newButton.x = item.@posX;
                        newButton.y = item.@posY;
                        newButton.setStyle("skin", null);
                        newButton.styleName = "dynamicButtonStyle";
                        newButton.addEventListener(MouseEvent.MOUSE_DOWN, customButtonPressed);
                        dynamicButtons.addElement(newButton);
            var isMultiPage:String = navControl[2]["multiPages"];
            var videoPresent:String = navControl[1]["videoPresent"];
            if(videoPresent == "true"){
                if(isMultiPage != "true"){
                    navContainer.x = 825;
            if(isMultiPage == "true"){
                if(navControl[2]["next"] == "NEXT STEP"){
                    navContainer.x = 630;
                else{
                    navContainer.x = 640;
                next.label = navControl[2]["next"];
                back.label = navControl[2]["back"];
            if(currImage >= imgList.length - 1){
                next.visible = false;
                back.visible = false;
            else{
                back.visible = false;
                next.visible = true;
    as you know, my xml gets divided into two saperate xmllistcollections one is the userOptionProvider, and the troubleshootingProvider
    as is in the following xml
    <mx:TabNavigator id="tabNav" width="275" tabStyleName="tabStyle" fontWeight="bold" height="400" paddingTop="0"
                             tabWidth="137.5" creationPolicy="all" borderVisible="false">
                <mx:VBox label="USER OPTIONS" width="100%" height="100%" horizontalScrollPolicy="off" verticalScrollPolicy="off">
                    <s:List id="userOptions" width="100%" height="100%" itemRenderer="modules.apx32.myComponents.listRenderer"
                            borderVisible="false" contentBackgroundColor="#e9e9e9"
                            change="userOptionsChange(event)">
                        <s:dataProvider>
                            <s:XMLListCollection id="userOptionProvider" />
                        </s:dataProvider>
                    </s:List>
                </mx:VBox>
                <mx:VBox label="TROUBLESHOOTING">
                    <s:List id="trouble" width="100%" height="100%" itemRenderer="modules.apx32.myComponents.listRenderer"
                            borderAlpha="0" borderVisible="false" contentBackgroundColor="#e9e9e9"
                            change="troubleShootChange(event)">
                        <s:dataProvider>
                            <s:XMLListCollection id="troubleShootProvider" />
                        </s:dataProvider>
                    </s:List>
                </mx:VBox>
            </mx:TabNavigator>
    Im having some trouble updating my list... basically change to the troubleshooting tab, and then select the one that i need...
    hopefully that makes sence...

  • Need help with CS4 transitions

    Hi,
    I am trying to use a cross dissolve transition. To make it simple, I have two clips. I'm obviously doing something wrong here. I've watched the Adobe TV tutorial and all the guy does is to select cross dissolve from the effects box, and drags it over to the clip on the timeline. I think I am doing the exact same thing, but when I play my clip back, I can see no transition effect played back.
    Maybe I'm putting it in the wrong place I thought, so I tried putting it in front of the split between the two clips. Then again at the beginning of the second clip. Neither of them worked, so I shut CS4 down, and booted it up again. I started a new project, and put two new clips in it. I put the dissolve transition at the beginning of the second clip, and it worked like a charm. Then to see if that was a fluke, went to a point about 3 minutes earlier in the timeline. So now I am on clip one. I go and make a cut in the timeline, and try to place another Cross dissolve at this spot. It appears to place the transition there because it creates the rectangular box, and it has the name cross dissolve in that rectangular box,but when I try to play it to see the transition, it isn't working. Go back to the beginning of the second clip, and that one still works perfectly.
    I noticed that there is a difference in the appearance of the two cross dissolve rectangular boxes. The one that works has a single diagonal line that goes from lower left to upper right in the cross dissolve box, and then there are a whole series of diagonal lines that go from upper left to lower right all across the cross dissolve box . It looks like a whole bunch of dark gray and white backslashes. In the one that doesn't work, there is just that single diagonal line that goes from lower left to upper right. No backslashes on this one. What am I doing right in the first one, but not in the second?
    I find that it will work perfectly if I put in a new clip. If I put in the Cross Dissolve at the beginning of a new clip that I add to the timelime,  it will work perfectly. It is only when I try to split a clip that is already on the timeline, and then put the cross dissolve in at that point.
    Perhaps it is not possible to do what I am attempting to do. Maybe you can't split a clip and place the transition at that point?

    When I am shooting video, it is not unusual for me to be taping a scene of a mountain, for example, and then put the camera on pause, while I briefly position myself to take video of the river that is flowing at my feet. That is what is happened on this clip that I am attempting to put the transition in between. Rather than having the scene just instantly change at this point, from the mountain to the river, it would be nice to have a smoother transition then that.
    My mind was working on the problem while sleeping last night, and I think I might understand how to handle it. It might have been too simple for me to think about yesterday. I haven't tried it yet, but would it not work, to insert the mountain scene from my source monitor into the timeline, and then go back and insert the river scene into the time line instead of inserting both of them at the same time. Would these not now be two separate clips on the timeline, and the transition could now be applied?
    Your analogy with the DJ is very good, but it isn't quite the same. You are correct in that he would be only fading from one song to the same spot on the same song. In my case I am going from an image of a mountain to an image of a river. Same clip, but different images. I appreciate the help, and your thoughts.
    Terry Lee Martin
    Date: Sat, 22 Aug 2009 23:15:55 -0600
    From: [email protected]
    To: [email protected]
    Subject: Need help with CS4 transitions
    From a creative standpoiint, I don't understand the desire to transition from one clip to the exact same spot on that same clip.  That's like a DJ at a night club fading from one song to the exact same spot on that same song being played on a second CD player.  What's the point?
    >

  • I need help with this code error "unreachable statement"

    the error_
    F:\Java\Projects\Tools.java:51: unreachable statement <-----------------------------------------------------------------------------------------------------------------THIS
    int index;
    ^
    F:\Java\Projects\Tools.java:71: missing return statement
    }//end delete method
    ^
    F:\Java\Projects\Tools.java:86: missing return statement
    }//end getrecod
    ^
    3 errors
    import java.util.*;
    import javax.swing.*;
    import java.awt.*;
    public class Tools//tool class
    private int numberOfToolItems;
    private ToolItems[] toolArray = new ToolItems[10];
    public Tools()//array of tool
    numberOfToolItems = 0;
    for(int i = 0; i < toolArray.length; i++)//for loop to create the array tools
    toolArray[i] = new ToolItems();
    }//end for loop
    }//end of array of tools
    public int search(int id)//search mehtod
    int index = 0;
    while (index < numberOfToolItems)//while and if loop search
    if(toolArray[index].getID() == id)
    return index;
    else
    index ++;
    }//en while and if loop
    return -1;
    }//end search method
    public int insert(int id, int numberInStock, int quality, double basePrice, String nm)//insert method
    if(numberOfToolItems >= toolArray.length)
    return 0;
    int index;
    index = search(id); <-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------HERE
    if (index == -1)
    toolArray[index].assign(id,numberInStock, quality, basePrice,nm);
    numberInStock ++;
    return 1;
    }//end if index
    }//end if toolitem array
    return -1;
    }//end insert method
    public int delete(/*int id*/)//delete method
    }//end delete method
    public void display()//display method
    for(int i = 0; i < numberOfToolItems; i++)
    //toolArray.display(g,y,x);
    }//end display method
    public String getRecord(int i)//get record method
    // return toolArray[i].getName()+ "ID: "+toolArray[i].getID()
    }//end getrecod
    }//end class
    Edited by: ladsoftware on Oct 9, 2009 6:08 AM
    Edited by: ladsoftware on Oct 9, 2009 6:09 AM
    Edited by: ladsoftware on Oct 9, 2009 6:10 AM
    Edited by: ladsoftware on Oct 9, 2009 6:11 AM

    ladsoftware wrote:
    Subject: Re: I need help with this code error "unreachable statement"
    F:\Java\Projects\Tools.java:51: unreachable statement <-----------------------------------------------------------------------------------------------------------------THIS
    int index;
    ^
    F:\Java\Projects\Tools.java:71: missing return statement
    }//end delete method
    ^
    F:\Java\Projects\Tools.java:86: missing return statement
    }//end getrecod
    ^
    3 errorsThe compiler is telling you exactly what the problems are:
    public int insert(int id, int numberInStock, int quality, double basePrice, String nm)//insert method
    if(numberOfToolItems >= toolArray.length)
    return 0; // <<== HERE you return, so everyting in the if block after this is unreachable
    int index;
    index = search(id);  //< -----------------------------------------------------------------------------------------------------------------HERE
    if (index == -1)
    toolArray[index].assign(id,numberInStock, quality, basePrice,nm);
    numberInStock ++;
    return 1;
    }//end if index
    }//end if toolitem array
    return -1;
    }//end insert method
    public int delete(/*int id*/)//delete method
    // <<== HERE where is the return statement?
    }//end delete method
    public String getRecord(int i)//get record method
    // return toolArray.getName()+ "ID: "+toolArray[i].getID() <<== HERE you commented out the return statement
    }//end getrecod
    }//end class

  • I need Help with the dynamic link feature in CS3

    Hi I was wondering if anyone could help me with an issue I am having? I have the adobe cs3 master collection. Having watched tutorials on the dynamic link feature my version seems not to have the same options as those I have viewed. I wish to send my premiere video creation to encore using dynamic link, however when I click "file" and then "adobe dynamic link" the only options available are about "adobe after effects". I can export to encore however I am only alloowed to export one premiere sequence to one new encore file, I cannot create an encore file and import several premiere sequence into the same encore project. That means currently I can only have an encore creation with one premiere sequence in it, and I have no adobe dynamic link. Any help anyone could offer would be greatly appreciated.

    Thanks very much for that guys but my premiere media encoder only lets me export as: MPEG1, MPEG1-VCD, MPEG2, MPEG2 blu-ray, MPEG2-DVD, MPEG2-SVCD, H.264, H.264 blu-ray, Adobe Flash Video, Quicktime, Real Media, Windows Media. Are any of these formats DV AVI?
    Am I to export my videos direct to encore or save them elsewhere (e.g desktop). It seems that I cannot export sequences from different premiere projects to the same encore project.
    Sorry if any of these questions seem obvious, I am just new to premiere and keen to do things right from the off.
    Many thanks again guys.
    Date: Tue, 24 Nov 2009 19:32:47 -0700
    From: [email protected]
    To: [email protected]
    Subject: I need Help with the dynamic link feature in CS3
    Harm is correct.  For SD DVD, exporting as a DV AVI file from Pr will give you good results.  Encore's Automatic Transcoding will give you maximum quality for the available disc space.
    -Jeff
    >

  • Need help with "your purchase can not be completed" when buying an ibook (or anything else for that matter)

    I need help with an error message - "your purchase cannot be completed" when buying something on itunes.

    Lukas --
    Out of curiosity, did you activate the trial software?  Let us know and we will try to help.
    Dale A. Howard [MVP]
    VP of Educational Services
    msProjectExperts
    http://www.msprojectexperts.com
    http://www.projectserverexperts.com
    "We write the books on Project Server"

Maybe you are looking for

  • PDF attachments automatically opening ???

    This just started, but when I attach a PDF file to my email message it is now opening in its entirety in the message body. Some of these PDF files are large and I don't want them to automatically open when I attach them. Why did this start and how do

  • Error on extended check for types include structure statements

    Hi All ,               On Extended check im getting error : Program:  ZFIR_VALUATE_OBSOLETE_STOCK  Include:  ZFIR_VALUATE_OBSOLETE_STOCK_F  Row:   1205 The current ABAP command is obsolete Within classes and interfaces, you can only use "TYPE" to ref

  • AWM Set Aggregation Operator based on Measure instead of Dimension?

    Is there anyway to base an operator of a measure over a dimension on the measure instead of the dimension? In AWM, I notice that each Measure has an Aggregation tab that summarizes its operator over each dimension, but it is greyed out. The way I'd l

  • I have an iPhone 4s and want to show % of battery available

    I have an iPhone 4S and want to have the battery % indicator showing and I cannot remember how to do this.  Your assistance would be appreciated

  • POPUP_TO_DISPLAY_TEXT but with warning icon

    Hi there ABAP-people, I've got simple question ... ... how can I do simple popup window with: - warning icon - message - button (OK, proceed or sth) I see there is a 'POPUP_TO_DISPLAY_TEXT' but it has 'INFO' icon... there is a 'POPUP_WITH_WARNING' bu