Trouble with class

I am unable to figure out what I am having trouble with this, here is the code
public class Tools3
    protected long item_number;
    protected String product_name;
    protected long units_in_stock;
    protected double price_of_each_unit;
    protected static double total_price_of_inventory;
public Tools3( long pitem_number, String pproduct_name, long punits_in_stock, double pprice_of_each_unit)
   item_number = pitem_number;
   product_name = pproduct_name;
   units_in_stock = punits_in_stock;
   price_of_each_unit = pprice_of_each_unit;
   total_price_of_inventory = punits_in_stock * pprice_of_each_unit;
// Overloaded constructor for empty balance
public Tools3()
   item_number = 0;
public void set_item_number( long pitem_number )
   item_number = pitem_number;
public void set_product_name( String pproduct_name )
   product_name = pproduct_name.toString();
public void set_units_in_stock( long punits_in_stock )
   units_in_stock = punits_in_stock;
public void set_price_of_each_unit( double pprice_of_each_unit )
   price_of_each_unit = pprice_of_each_unit;
public long get_item_number()
   return item_number;
public String get_product_name()
   return product_name;
public long get_units_in_stock()
   return units_in_stock;
public double get_price_of_each_unit()
   return price_of_each_unit;
public double calculate_total_price()
   return units_in_stock * price_of_each_unit;
public double calculate_total_price_of_inventory(Tools3[] mytools)
   double rettotal = 0;
   for (int i = 0; i < mytools.length; i++)
    rettotal = rettotal + (mytools.get_units_in_stock() * mytools.get_price_of_each_unit());
   return rettotal;
  public void sort_by_names(Tools3[] mytools)
  int a,b;
  int sortTheStrings = mytools.length - 1;
  String tempproduct_name;
  long tempitem_number;
  long tempunits_in_stock;
  double tempprice_of_each_unit;
    //need to implement a bubble sort here
    for (a = 0; a < sortTheStrings; ++a)
  for (b = 0; b < sortTheStrings; ++b)
  if(mytools.product_name.compareTo(mytools[b + 1].product_name) >0)
    //move name
    tempproduct_name = mytools.product_name;
    mytools.product_name = mytools[b+1].product_name;
    mytools[b+1].product_name = tempproduct_name;
    //move item_number
    tempitem_number = mytools.item_number;
    mytools.item_number = mytools[b+1].item_number;
    mytools[b+1].item_number = tempitem_number;
    //move units_in_stock
    tempunits_in_stock = mytools.units_in_stock;
    mytools.units_in_stock = mytools[b+1].units_in_stock;
    mytools[b+1].units_in_stock = tempunits_in_stock;
    //move price_of_each_unit
    tempprice_of_each_unit = mytools.price_of_each_unit;
    mytools.price_of_each_unit = mytools[b+1].price_of_each_unit;
    mytools[b+1].price_of_each_unit = tempprice_of_each_unit;
//end of tools3.java class

Results from javac
C:\Java>javac Tools3.java
Tools3.java:77: cannot find symbol
symbol  : method get_units_in_stock()
location: class Tools3[]
    rettotal = rettotal + (mytools.get_units_in_stock() * mytools.get_price_of_e
ach_unit());
                                  ^
Tools3.java:77: cannot find symbol
symbol  : method get_price_of_each_unit()
location: class Tools3[]
    rettotal = rettotal + (mytools.get_units_in_stock() * mytools.get_price_of_e
ach_unit());
                                                                 ^
Tools3.java:94: cannot find symbol
symbol  : variable product_name
location: class Tools3[]
  if(mytools.product_name.compareTo(mytools[b + 1].product_name) >0)
            ^
Tools3.java:97: cannot find symbol
symbol  : variable product_name
location: class Tools3[]
    tempproduct_name = mytools.product_name;
                              ^
Tools3.java:98: cannot find symbol
symbol  : variable product_name
location: class Tools3[]
    mytools.product_name = mytools[b+1].product_name;
           ^
Tools3.java:101: cannot find symbol
symbol  : variable item_number
location: class Tools3[]
    tempitem_number = mytools.item_number;
                             ^
Tools3.java:102: cannot find symbol
symbol  : variable item_number
location: class Tools3[]
    mytools.item_number = mytools[b+1].item_number;
           ^
Tools3.java:105: cannot find symbol
symbol  : variable units_in_stock
location: class Tools3[]
    tempunits_in_stock = mytools.units_in_stock;
                                ^
Tools3.java:106: cannot find symbol
symbol  : variable units_in_stock
location: class Tools3[]
    mytools.units_in_stock = mytools[b+1].units_in_stock;
           ^
Tools3.java:109: cannot find symbol
symbol  : variable price_of_each_unit
location: class Tools3[]
    tempprice_of_each_unit = mytools.price_of_each_unit;
                                    ^
Tools3.java:110: cannot find symbol
symbol  : variable price_of_each_unit
location: class Tools3[]
    mytools.price_of_each_unit = mytools[b+1].price_of_each_unit;
           ^
11 errors

Similar Messages

  • I am having a little trouble with classes

    I can not figure out what is wrong or missing from this code because I keep getting "declare in file" error code
    this is the simple code
    import java.util.Scanner; //program uses class Scanner
    import java.text.NumberFormat;//used to format currency
    import java.util.Locale;
    public class Employee
    public Employee();
    //main method begins execution of Java application
    //create Scanner to obtain input from command window
    Scanner input=new Scanner (System.in);
    //varibles declared
    String Emp_name;//Stores employee name
    double Hours_worked;///Stores hours worked
    double PayRate;//Stores PayRate
    System.out.print("Enter Employee;s name:");//prompt
    Emp_name=input.nextLine();//read employee's name entered
    System.out.print("Enter the pay rate of the Employee:");//prompt
    PayRate=input.nextDouble();//read the payrate of employee
    System.out.print("Enter the Employee's Hours worked:");//prompt
    Hours_worked=input.nextDouble();//read hourlyrate of pay entered by user
    NumberFormat nf=NumberFormat.getCurrencyInstance(Locale.US);
    System.out.printIn("Employee" + Emp_name);//display employee_Name
    System.out.printf("Employee's Pay: $" +nf.format(Hours_worked*PayRate));//display GPA
    }

    masterbuild,
    Firstly, post your code between code tags.
    [code]... your code goes here ...[/code]
    so it looks like thisdouble check it using preview before you commit the post.
    Now, Please don't be offended, That's not a bad first try, but it's just all wrong, which is part of the learning process.
    Here's a list the problems I can see with that code, and what to do about them... if you address these problems you should end up with a working program.
    Number 1
    public class Employee
    public Employee();
    //main method begins execution of Java application
    {As The Pair of Condiments and The Sick Brainiac have already stated... lose the semicolon!... it should look like this...
    public class Employee
      public Employee() {
    Number 2
    //main method begins execution of Java application
    What main method? I don't see any main method... Where's your main method? It should look like this
      public void main(String[] args) {
        Scanner input = new Scanner(System.in);
        System.out.print("employee's name : ");
        String name = input.nextLine();
        System.out.print("hourly rate : ");
        double hourlyRate = input.nextDouble();
        System.out.print("hours worked : ");
        double hoursWorked = input.nextDouble();
        System.out.printf("%s's gross pay is $%s\n", name, NUMBER_FORMATTER.format(hoursWorked*hourlyRate));
      }* The convention is to use camelCase (hump in the middle) for variable names, and CapitalCase for class names. See http://java.sun.com/docs/codeconv/
    Number 3
    The numberFormatter would best be declared as a class attribute, so you can reuse whenever you print a currency amount... as in...
    public class Employee
      private static final NumberFormat NUMBER_FORMATTER = NumberFormat.getCurrencyInstance(Locale.US);
      public Employee() {
        ....Also... these three comments worry me a bit...
    // Stores employee name
    // Stores hours worked
    // Stores PayRate
    None of these values are being "stored". These three values are local variables, which exist only while the method (actually block) in which they are declared is executing... after that they are "forgotten". To a programmer the word "store" implies that the values are being persisted in a file, or database... that is the values are being stored in any fashion for reuse by a subsequent execution of this program, or indeed another program. I think it's just that you don't know the lingo yet, but I just wanted to be sure that you know that these values will be forgotten as soon as the main method is finished.
    Cheers. Keith.

  • New to java, having trouble with classes

    I am new to java and I am having problems importing classes in my first program, please help

    hi
    please tell, what`s your problem exatly?

  • Having trouble with Class.forName & Class.newInstance

    i have a string name of a JPanel class i want to place on a TabbedPane. the JPanel class is in another package, that i import.
    i have been trying all kinds of ways to do this, and it is not working. does anyone have any ideas on how to do this?
    i need: myTabPane.addTab("financial calc", new myBzPanel());
    i tried: myTabPane.addTab("financial calc", Class.newInstance(Class.forName("myBzPanel()"));
    without any success.
    any ideas appreciated. thanks.

    The Class.newInstance() method does not take any arguement and you passed a wrong stuff to the Class.forName(String) method.
    Class c = Class.forName("mypackage.myBzPanel");
    myBzPanel bz = (myBzPanel)c.newInstance();
    myTabPane.addTab("financial calc", bz);

  • Trouble with class cast

    Hi,
    this is a theoretic and probably simple question. The following code compiles but throws an error while running:
    public class A {
    public class B extends A {
    // this is ok
    B _2 = new B();
    A _1 = (A)_2;
    // but here comes a class cast exception
    A a = new A();
    B b = (B)a;
    Apperently one can't cast from the general to the specialized class. But if this is true, why does the compiler let me do it? Or: How can I make this work?
    Thanks a lot for any help,
    Boris

    The compiler lets you do it because it doesn't really know what kind of an object will be referenced by the reference "a" in runtime. The class cast moves the responsibility from the compiler to the developer.

  • Trouble with interface class

    Hi there,
    for a school project we're building a helicopter which can be controlled via the computer. We're going to connect some wires to the remote control of the helicopter and the wires we also connect to a LabJack (a digital/analog converter). Via java we can give signals to this labjack and control so the helicopter. Only one thing: I've downloaded the library for labjack for java. You can see this labrary, it called LabJackJava: http://www.teravation.com/downloads/LabJackJava.zip
    In it is a few classes and one of them is called LabJack (this is in fact a interface). In the interface there is a method called: void setAO(int channel, float value) throws LabJackException;
    This method I'm going to need to set the voltage on the wires. For compiling I use the program BlueJ (which is a object-orientated compiler). But because the the class LabJack is a interface, I cannot call the method setAO(). How can I solve this?? I also had some trouble with the System.loadLibrary("ljackj"); in the class LabJackDriver. I copied the file ljackj.dll into the folder system32 (windows) and it still doesn't work... Is this dll essential for the working of the class LabJack??? How can I solve this???
    Please help me!!
    Thanks!
    Héctor van den Boorn

    This is a forum for the Java programming language, not for every program and library ever written in Java. The LabJack site has a support area and forum, which should be the right place to seek a solution.
    That said, the documentation indicates that you obtain a LabJack reference from the appropriate method of LabJackFactory. The reference returned will be that of a platform dependent concrete class that implements the interface.
    db
    edit Oh, I see you have a history of not replying to responses on your posts. This was exceptionally bad, 9 responses and not a peep out of you.
    [http://forums.sun.com/thread.jspa?threadID=5242071]
    Fine. One for the blacklist.
    Edited by: Darryl.Burke

  • Having trouble with First Class mail

    I'm trying to use my email at school (Benito Juarez Community Academy) and also set up Gradespeed but having trouble with both.
    In composing mail, the screen will only accept a line or so and no more. I can mail that but message is incomplete. Also, can't get into Gradespeed. All I get is a multicolored pinwheel that is a security check but never stops spinning.

    See this thread: [[/en-US/questions/894442]] OWA 2010/Firefox 8 and ASHX Attachments

  • Trouble with Toshiba built-in webcam: "unable to enumerate USB device"

    I am running archlinux on a Toshiba Satellite L70-B-12H laptop, and having troubles with the Webcam. *Once in a while*, everything goes well and I get
    # lsusb
    Bus 004 Device 002: ID 8087:8000 Intel Corp.
    Bus 004 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
    Bus 003 Device 004: ID 04f2:b448 Chicony Electronics Co., Ltd
    Bus 003 Device 003: ID 8087:07dc Intel Corp.
    Bus 003 Device 002: ID 8087:8008 Intel Corp.
    Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
    Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
    Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
    # dmesg
    [ 3433.456115] usb 3-1.3: new high-speed USB device number 4 using ehci-pci
    [ 3433.781119] media: Linux media interface: v0.10
    [ 3433.809842] Linux video capture interface: v2.00
    [ 3433.826889] uvcvideo: Found UVC 1.00 device TOSHIBA Web Camera - HD (04f2:b448)
    [ 3433.835893] input: TOSHIBA Web Camera - HD as /devices/pci0000:00/0000:00:1a.0/usb3/3-1/3-1.3/3-1.3:1.0/input/input15
    [ 3433.835976] usbcore: registered new interface driver uvcvideo
    [ 3433.835977] USB Video Class driver (1.1.1)
    Unfortunately, *most of the time* the camera seems invisible to my system, and I get
    # lsusb
    Bus 004 Device 002: ID 8087:8000 Intel Corp.
    Bus 004 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
    Bus 003 Device 003: ID 8087:07dc Intel Corp.
    Bus 003 Device 002: ID 8087:8008 Intel Corp.
    Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
    Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
    Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
    (note the missing "04f2:b448 Chicony Electronics Co., Ltd" device), and
    # dmesg
    [ 480.104252] usb 3-1.3: new full-speed USB device number 4 using ehci-pci
    [ 480.171097] usb 3-1.3: device descriptor read/64, error -32
    [ 480.341235] usb 3-1.3: device descriptor read/64, error -32
    [ 480.511375] usb 3-1.3: new full-speed USB device number 5 using ehci-pci
    [ 480.578007] usb 3-1.3: device descriptor read/64, error -32
    [ 480.748151] usb 3-1.3: device descriptor read/64, error -32
    [ 480.918282] usb 3-1.3: new full-speed USB device number 6 using ehci-pci
    [ 481.325196] usb 3-1.3: device not accepting address 6, error -32
    [ 481.392091] usb 3-1.3: new full-speed USB device number 7 using ehci-pci
    [ 481.798926] usb 3-1.3: device not accepting address 7, error -32
    [ 481.799166] hub 3-1:1.0: unable to enumerate USB device on port 3
    Searching on the web, most results I found lead to this page, where it is said that the problem is due to badly tuned overcurrent protection, and advocated that unplugging and switching off the computer for a little while gets things back into normal. This does not really work for me; the problem seems to occur more randomly, unfortunately with high probability (my camera is available after less than one boot out of ten).
    I tried to ensure that the ehci-hcd module is loaded at boot with the ignore-oc option (with a file in /etc/module-load.d/), to no avail.
    I also wrote a script which alternatively removes and reloads the ehci-pci driver until my device is found in lsusb. It is sometimes helpful, but usually not. And even when my device is found that way, it can only be used for a while before disappearing again.
    Anyway, such a hack is unacceptable... So, my questions are:
    is it indeed related to overcurrent protection ?
    is there anything else I can try ?
    should I file somewhere an other of the numerous bug reports about "unable to enumerate USB device" already existing ?
    If of any importance, I am running linux 3.15.7, because at the time I installed my system, I couldn't get the hybrid graphic card Intel/AMD working under 3.16.
    Last edited by $nake (2014-10-18 16:29:06)

    uname -a
    Linux libra 3.9.4-1-ARCH #1 SMP PREEMPT Sat May 25 16:14:55 CEST 2013 x86_64 GNU/Linux
    pacman -Qi linux
    Name : linux
    Version : 3.9.4-1
    Description : The linux kernel and modules
    Architecture : x86_64
    URL : http://www.kernel.org/
    Licences : GPL2
    Groups : base
    Provides : kernel26=3.9.4
    Depends On : coreutils linux-firmware kmod mkinitcpio>=0.7
    Optional Deps : crda: to set the correct wireless channels of your country
    Required By : nvidia
    Optional For : None
    Conflicts With : kernel26
    Replaces : kernel26
    Installed Size : 65562.00 KiB
    Packager : Tobias Powalowski <[email protected]>
    Build Date : Sat 25 May 2013 16:28:17 CEST
    Install Date : Sun 02 Jun 2013 15:30:35 CEST
    Install Reason : Explicitly installed
    Install Script : Yes
    Validated By : Signature

  • A trouble with "LIKE" in a select statement

    Hi!
    I'm having trouble with "LIKE" in a select statement...
    With Access I can make the following and everything works well:
    SELECT name, birthday
    FROM client
    WHERE birthday LIKE '*/02/*';
    but if try to do it in my application (it uses Access), it doesn't work - I just can't understand that!!!
    In my application the "month" is always the currently month taken from the "System". Look what I'm doing...
    String query1 = "SELECT name, birthday " +
              "FROM client " +
              "WHERE birthday " +
              "LIKE '*/" +
              pMonth +
              "/*' " +
              "ORDER BY birthday ASC ";
    ResultSet rs = statement1.executeQuery(consulta1);
    boolean moreRecords = rs.next();
    The variable "moreRecords" is always "false", the query returns nothing although the table "client" has records that attend the query.
    Please, anyone can help me?! It's a little bit urgent.
    Thanks,
    Katia.

    Hi Katia,
    I'll bet the problem lies with the characters you're using to escape the LIKE clause. You're using the ones that Access likes to see, but that's not necessarily what's built into the JDBC-ODBC driver class.
    You can find out what the correct escape wildcard characters are from the java.sql.DatabaseMetaData.getSearchStringEscape() method. It'll tell you what to use in the LIKE clause.
    I'm not 100% sure about your code. It doesn't use query1 anywhere. I'd do this:
    String query = "SELECT name, birthday FROM client WHERE birthday LIKE ? ORDER BY birthday ASC";
    PreparedStatement statement = connection.createStatement(query);
    String escape = connection.getMetaData().getSearchStringEscape();
    String test = escape + '/' + pMonth + '/' + escape;
    statement.setString(1, test);
    ResultSet rs = statement.executeQuery();
    while (rs.hasNext())
    // load your data into a data structure to pass back.
    rs.close();
    statement.close();Let me know if that works. - MOD

  • The trouble with 'expression' -- how to edit that

    I just walked to the corner bodega ( even though its korean sooo bodega is misleading ).. to get some beer...
    ITS BEER THIRTY -- yipee !
    and on way back down the block where I live ( which is suburban ) some boy kid on a bike was riding and playing with a girl kid ( probably was his slightly older sister - these kids probably around 12 years old ) in front of a rental property with some spanish americans hanging out in their cemented yard on hammocks near bar b q...with their own kids...(they have planted another hopeful "veg garden" around the perimeter of their so called yard...tomato plants etc )...so anyway, the picture here is a "neighborhood" of sorts with a somewhat lower middle class family atmosphere in a fairly lower class area on the verge of becoming middle class ( with God's help ).
    And anyway, I passed by the boy kid on the bike and smiled at him cause he seemed to be a decent kid having fun with his friend ( they were sorta laughing about something and having fun before I showed up as the big "adult" and looked at me ). His smile back was like sunshine and true and he immediately recognized he could keep having fun with his friend and I wasn't a "threat" , but instead some sorta "neighbor".  She did the same more or less ( I think she had some devious design re: the game they were playing ... like " OK, you think you're so great on that bike, try to CHASE me ! " or something like that....kid stuff... and fun thank God.  This neighborhood has it's share of bad things going on in the streets at times.  And that leads to my focus on " The trouble with expression".
    A lot of people, like me for example, can't express themselves well in some ways. I didn't say , " Hi there kids !  What's new ? " when I met them on the way back from the bodega.  I didn't stop and ask what the heck they were laughing about.  Nor did I speak to the spanish people adjacent to the kids ...in their "yard" ...with the bar b q and hammock and obvious friday afternoon socializing they were into....
    We in nyc area are typically a mixed bag of races... I'm white, kids were african amer ( black but more like brownish if you ask me ), spanish people like mexicans IMO... who cares.  This is suburbia so you can imagine how more mixed it is in the city.
    Anyway, the reason I don't express myself so well in situations like that ( spontaneously on the street ) is cause I used to stutter real bad as a kid.. couldnt talk... so I clamed up. All my life I've been fighting that disability ( and other "challenges" re: learning, reading , writing, asthma , etc ) in terms of the "repercusions".  Kids like me make fun of me cause I stutter...I can't fight back verbally and lash out physically... become a "maniac".  Get kicked out of city schools etc...  Trouble maker.  Can't express myself, fight back with words....when kids are mean to me. After a while they dont matter much as if they are mean I just keep quiet and keep mouth shut and start "thinking" instead... how to keep on top of this person and not let things get crazy... meet the challenge.
    Turns out I'm not stupid and at some point my being " quiet" becomes a positive thing.. peers start asking my advice.. I'm suddenly a " deep thinker" in their eyes.  I go from being disabled ( stupid ) to being " a deep thinker" about the age of puberty... when nobody knows what they are doing anymore.
    I start thinking about expressing myself some other way than talking.. like maybe draw pictures... paint stuff, do things to have fun with people that doesnt put me in the " limelight".. where I have to talk etc.  More success follows this tendency to socialize and express myself... and I discover that chics like the strong silent type.
    ( I have been into gymnastics thru my fathers infactuation with it since age 2 -- which I think eventually ( inadvertantly ) " cured me " of many of my learning disabilities etc --  (talk to an OT about this and modern child development stuff to know what I mean here )
    Meanwhile I am very fond of dogs as my family has dogs one after the other and I am one of their best friends. I find I can communicate with dogs better than I can communicate with people sometimes.  This seems to be a problem in some cases with some people, but for me it never got crazy... where I " loved dogs " more than I " love people ".  I have never loved any dog more than any person and shudder when I think of those who do.  Those people who do have more problems than I ever had to deal with.
    And now, after all these years ( I am now 60 ), working on movies and tv stuff etc as a crew person with some college fine art schooling ( eventual photo major ) to get me started, I got into this " editing " stuff... A program I can actually " use " on my mousey computer introduces me to a more " final product " than I ever had access to before.
    BUT I don't shoot motion pic stuff, cant afford that - and never could before basically, and now I think about the triple threats and future of movies and tv as a business... as well as the tools ( in this case the editing programs in conjunction with the cameras ( arri, panavision etc ) ) and the desire to express something ...
    This has to be ( if you want an audience ) ... " tell a story ".  You could just put a camera on a rocket ( strap it to the rocket ) and shoot the takeoff etc and show that.. but you need a V.O. saying " well, I just shot off a rocket and this is what it looked like"...to bring the experience to the audience... or else IMO there is no story.
    Which leads to what's going on now in the world of reality tv, episodic tv , some big movies, etc.  Telling a story is more than showing you stuff that you just wouldnt have seen if you hadn't been there yourself. Telling a story is more like saying something that bridges the gap between your own experience of life and its challenges ( of being part of your neighborhood and making sense of your own childhood and being an adult now maybe ).. and what others also have gone through to get to the same conclusions....
    This is the object of " expression" IMO, whether you can talk about it, draw pictures about it, or make music about it...
    And the editing program is a tool to help do that.. it is not the end all or purpose of life or the " personal crusade" in the long run.
    It's one reason scary snakes often shock people out of their desire for comfort and predictable living... makes you think about that one serpent in the garden of eden you create for yourself .... and IMO who cares what editing program you use to write that and shoot it ??

    Steve Grisetti, the MOD of the Premiere Elements forum and co-founder of a video/photo/editing Web site, Muvipix, did a nice article, "Don't just make a movie - tell a story." His audience was more consumer video editors, than the folk that we see around here, but his points were well-made, and were embraced by many in the Muvipix community.
    I think that too many, forget that concept - and I am talking Hollywood and NYC here. It's almost as if, when the story breaks down, they instinctively know to throw in a car chase, or big explosion.
    I know that I cite it too often around The Lounge, but that was what I enjoyed most about the LOR trilogy. It told a story. Now, though I had some exposure to the story, when much younger, I have to admit that I never read Tolkien, though almost everyone, that I knew, was busy with every book. Still, I only knew some of the high points, and not much more. However, almost immediately, I was drawn into the story, and only wished that I did not have to wait so long between episodes. The FX were cool, and I am a technoid sort, but it was the story that hooked me. I had read several articles on the FX production, so WAS looking for some of that, but what I wanted was the story. This is one that I will buy the BD "Director's Cut" of, and do a marathon. I have seen each segment, maybe three times, but never back to back to back. I still need to fill in a few blanks, and an entire day of viewing should do that - no phone, no visitors, nothing but LOR.
    As far as human communications, I can talk, even more than I write here, but only concerning things that I care about. I am horrible at "small talk," and would rather addrss an auditorium of 10,000, on something that matters to me, than talk about the weather to a single person at a fund raiser. Not that long ago, I was seated next to a potential donor at a charity dinner. I was rather dreading it, and when she mentioned that she did not drink (what, no wine?), I was worried. At some point, early in the evening, the subject turned to politics. Now, I usually am very quiet on my feelings, as they are not exaclty politically correct, and worry about hurting feelings, or making a scene. I fielded a question on Senatorial candidates, and just decided to answer from my heart. Her eyes lit up, and I did not notice that the event had ended. Her husband was standing, as was my wife, and we were talking politics, talk-radio, FoxNews, Senator John Kyl, Will Rogers and much more. I found that we were kindred spirits. Finally, our spouses pulled us apart, and we departed. We continued that conversation at 2 - 3 more events during "the season." One day, my wife informed me that she had just given $10M to the foundation - the largest single gift ever. At least she wasn't a screaming liberal, as I would surely have really messed up the deal... However, had it all been small talk, I would have found a reason to excuse myself and hide in the bar for a few hours.
    Also, the way that our society has developed, I will smile, nod, and say "hello" to strangers on the street, but always leave it at that. I am sure that many walk past and think "he wasn't all that friendly." They are probably right, but at least I was pleasant to them and did not rob them! Heck, I will usually tell telemarketers, "No, but thank you for your generous offer on that time-share... "
    Hunt

  • Trouble with "body" images lining up at the top

    Hi, I am having troubles with the #body style in my web page. I have inserted a table into the #body area and the the body editable region will not line up on the top with the sideBar editable region when I add text and apply my css to it. Can you look at the code and let me know what I am doing wrong? Thanks!
    <!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">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <!-- TemplateBeginEditable name="doctitle" -->
    <title>Ram Restaurant &amp; Brewery</title>
    <!-- TemplateEndEditable -->
    <meta name="keywords" content="Ram Restaurant, The Ram restaurant, Ram Restaurant and brewpub, Ram Restaurant Group, Ram International" />
    <meta name="description" content="Welcome to The Ram!  Your stomach wants food.  Your tastebuds want beer.  Satisfy them both at the Ram Restaurant & Brewery." />
    <style type="text/css">
    <!--
    body {
    background-color: #333;
    margin: 0 auto;
    padding: 0px;
    margin-left: 0px;
    margin-right: 0px;
    .navbar_center {
    text-align: center;
    -->
    </style>
    <link href="/RamWebsite_NEW/cssstyles.css" rel="stylesheet" type="text/css" />
    <style type="text/css">
    <!--
    body,td,th {
    font-family: Arial, Helvetica, sans-serif;
    color: #F00;
    margin: 0px;
    padding: 0px;
    a:link {
    color: #666;
    text-decoration: none;
    h1 {
    font-size: 36px;
    color: #000;
    h2 {
    font-size: 24px;
    color: #000;
    h3 {
    font-size: 18px;
    color: #000;
    h4 {
    font-size: 12px;
    color: #000;
    a:visited {
    text-decoration: none;
    color: #000;
    a:hover {
    text-decoration: underline;
    a:active {
    text-decoration: none;
    -->
    </style>
    <!--[if lte IE 8]>
    <style type="text/css">
    ul.MenuBarHorizontalul  li ul li ul li.MenuBarHorizontal, ul.MenuBarHorizontal li ul li.MenuBarHorizontal {
    width:100px;
    height:23px;
    </style>
    <![endif]-->
    <script src="/RamWebsite_NEW/SpryAssets/SpryMenuBar.js" type="text/javascript"></script>
    <script type="text/javascript">
    <!--
    function MM_preloadImages() { //v3.0
      var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
        var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
        if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
    function MM_swapImgRestore() { //v3.0
      var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
    function MM_findObj(n, d) { //v4.01
      var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
        d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
      if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
      for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
      if(!x && d.getElementById) x=d.getElementById(n); return x;
    function MM_swapImage() { //v3.0
      var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
       if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
    //-->
    </script>
    <link href="/RamWebsite_NEW/SpryAssets/SpryMenuBarHorizontal.css" rel="stylesheet" type="text/css" />
    <!-- TemplateBeginEditable name="head" -->
    <!-- TemplateEndEditable -->
    </head>
    <body link="#000000" topmargin="0" onload="MM_preloadImages('/RamWebsite_NEW/images/Menu_rollover.jpg','/RamWebsite_NEW/imag es/EventsLink2_rollover.jpg','/RamWebsite_NEW/images/GiftCards_rollover.jpg','/RamWebsite_ NEW/images/BeerLink2_rollover.jpg')">
    <div id="wrapper">
    <div id="header">
        <table width="900" border="0" cellpadding="0" cellspacing="0">
          <tr>
            <th width="200" height="36" rowspan="2" align="center" valign="middle" scope="col"><a href="http://www.theram.com"><img src="/RamWebsite_NEW/images/Ram-Logo-red.gif" alt="Ram Restaurant &amp; Brewery Logo" width="175" height="69" border="0" /></a></th>
            <th width="350" height="50" align="center" valign="middle" scope="col"> </th>
            <th width="200" align="center" valign="middle" scope="col"> </th>
            <th width="150" align="right" valign="middle" scope="col"><a href="http://www.facebook.com/home.php?#!/theramrestaurant?ref=ts"><img src="/RamWebsite_NEW/images/FacebookBox.gif" alt="Becoma a Facebook Fan!" width="40" height="40" border="0" /></a><a href="http://www.twitter.com/theram"><img src="/RamWebsite_NEW/images/TwitterBox.gif" alt="Follow Us on Twitter" width="40" height="40" hspace="30" border="0" /></a></th>
          </tr>
          <tr>
            <th colspan="3" align="right" scope="col"><ul id="MenuBar1" class="MenuBarHorizontal">
              <li><a class="MenuBarItemSubmenu" href="#">MENU</a>
                <ul>
                  <li><a href="#" class="MenuBarItemSubmenu">Idaho</a>
                    <ul>
                      <li><a href="/menus/idaho/boise.shtml">Boise</a></li>
                      <li><a href="/menus/idaho/meridian.shtml">Meridian</a></li>
                    </ul>
                  </li>
                  <li><a href="#" class="MenuBarItemSubmenu">Illinois</a>
                    <ul>
                      <li><a href="/menus/illinois/rosemont.shtml">Rosemont</a></li>
                      <li><a href="/menus/illinois/schaumburg.shtml">Schaumburg</a></li>
                      <li><a href="/menus/illinois/wheeling.shtml">Wheeling</a></li>
                    </ul>
                  </li>
                  <li><a href="#" class="MenuBarItemSubmenu">Indiana</a>
                    <ul>
                      <li><a href="/menus/indiana/fishers.shtml">Fishers</a></li>
                      <li><a href="/menus/indiana/indianapolis.shtml">Indianapolis</a></li>
    </ul>
                  </li>
                  <li><a href="#" class="MenuBarItemSubmenu">Oregon</a>
                    <ul>
                      <li><a href="/menus/oregon/clackamas.shtml">Clackamas</a></li>
                      <li><a href="/menus/oregon/salem.shtml">Salem</a></li>
                    </ul>
                  </li>
                  <li><a href="#" class="MenuBarItemSubmenu">Washington</a>
                    <ul>
                      <li><a href="/menus/washington/kent.shtml">Kent</a></li>
                      <li><a href="/menus/washington/lacey.shtml">Lacey</a></li>
                      <li><a href="/menus/washington/lakewood.shtml">Lakewood</a></li>
                      <li><a href="/menus/washington/puyallup.shtml">Puyallup South Hill Mall</a></li>
                      <li><a href="/menus/washington/puyallup2.shtml">Puyallup Sunrise Village</a></li>
                      <li><a href="/menus/washington/northgate.shtml">Seattle Northgate</a></li>
                      <li><a href="/menus/washington/seattle.shtml">Seattle University Village</a></li>
                      <li><a href="/menus/washington/tacoma.shtml">Tacoma</a></li>
                    </ul>
                  </li>
                </ul>
              </li>
              <li><a href="#" class="MenuBarItemSubmenu">LOCATIONS</a>
                <ul>
                  <li><a href="#" class="MenuBarItemSubmenu">Idaho</a>
                    <ul>
                      <li><a href="/idaho/boiseNew.html">Boise</a></li>
                      <li><a href="/idaho/meridianNew.html">Meridian</a></li>
                    </ul>
                  </li>
                  <li><a href="#" class="MenuBarItemSubmenu">Illinois</a>
                    <ul>
                      <li><a href="/illinois/rosemontNew.html">Rosemont</a></li>
                      <li><a href="/illinois/schaumburgNew.html">Schaumburg</a></li>
                      <li><a href="/illinois/wheelingNew.html">Wheeling</a></li>
                    </ul>
                  </li>
                  <li><a href="#" class="MenuBarItemSubmenu">Indiana</a>
                    <ul>
                      <li><a href="/indiana/fishersNew.html">Fishers</a></li>
                      <li><a href="/indiana/indianapolisNew.html">Indianapolis</a></li>
                    </ul>
                  </li>
                  <li><a href="#" class="MenuBarItemSubmenu">Oregon</a>
                    <ul>
                      <li><a href="/oregon/clackamasNew.html">Clackamas</a></li>
                      <li><a href="/oregon/salemNew.html">Salem</a></li>
                    </ul>
                  </li>
                  <li><a href="#" class="MenuBarItemSubmenu">Washington</a>
                    <ul>
                      <li><a href="/washington/kentNew.html">Kent</a></li>
                      <li><a href="/washington/laceyNew.html">Lacey</a></li>
                      <li><a href="/washington/lakewoodNew.html">Lakewood</a></li>
                      <li><a href="/washington/puyallup-southHill-NEW.html">Puyallup South Hill Mall</a></li>
                      <li><a href="/washington/puyallup-Sunrise-New.html">Puyallup Sunrise Village</a></li>
                      <li><a href="/washington/northgateNew.html">Seattle Northgate</a></li>
                      <li><a href="/washington/seattleNew.html">Seattle University Village</a></li>
                      <li><a href="/washington/tacomaNew.html">Tacoma</a></li>
                    </ul>
                  </li>
                </ul>
              </li>
              <li><a class="MenuBarItemSubmenu" href="#">PROMOS</a>
                <ul>
                  <li><a href="/drink_specials.shtml">Drink Promos</a>              </li>
                  <li><a href="/food_specials.shtml">Food Promos</a></li>
    </ul>
              </li>
              <li><a href="/news.shtml">RAM NEWS</a></li>
              <li><a href="/about.shtml">ABOUT US</a></li>
              <li><a href="#" class="MenuBarItemSubmenu">CONTACT US</a>
                <ul>
                  <li><a href="/contact.shtml">General Info</a></li>
                  <li><a href="/employment.shtml">Careers</a></li>
                  <li><a href="/comments.shtml">Comments</a></li>
                </ul>
              </li>
              <li><a href="/banquets.shtml" class="MenuBarItemSubmenu">BANQUETS</a>
                <ul>
                  <li><a href="/banquets.shtml">Banquets</a></li>
                  <li><a href="/banquets-catering.shtml">Off-Site Catering</a></li>
                </ul>
              </li>
            </ul></th>
          </tr>
          <tr>
            <th colspan="4" align="center" valign="middle" scope="col"><img src="/RamWebsite_NEW/images/redbar.gif" width="900" height="11" /></th>
          </tr>
        </table>
    </div>
    <div id="body">
      <table width="900" border="0" cellpadding="0" cellspacing="0">
        <tr>
          <th height="300" valign="top" scope="col"><table width="900" border="0" cellspacing="0" cellpadding="0">
            <tr>
              <th width="225" align="center" valign="top" bgcolor="#000000" scope="col"><!-- TemplateBeginEditable name="sideBar" -->adfadsfds<!-- TemplateEndEditable --></th>
              <th width="675" align="left" valign="top" bgcolor="#FFFFFF" scope="col"><!-- TemplateBeginEditable name="body" -->
                <p><img src="/images/aboutus2.jpg" width="675" height="300" /></p>
                <p class="foodNameDesc">adfadslkj</p>
              <!-- TemplateEndEditable --></th>
            </tr>
          </table></th>
        </tr>
      </table>
    </div>
    <div id="bottomMenuSubPg">
      <table width="900" border="0" cellspacing="0" cellpadding="0">
        <tr>
          <th width="200" align="center" scope="col"><a href="#" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('Menu','','/RamWebsite_NEW/images/Menu_rollover.jpg',1)"><img src="/RamWebsite_NEW/images/Menu.jpg" alt="Menu" name="Menu" width="212" height="125" hspace="6" border="0" id="Menu" /></a></th>
          <th width="200" align="center" scope="col"><a href="#" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('Big Horn Beer','','/RamWebsite_NEW/images/BeerLink2_rollover.jpg',1)"><img src="/RamWebsite_NEW/images/BeerLink2.jpg" alt="Big Horn Beer" name="Big Horn Beer" width="212" height="125" hspace="6" border="0" id="Big Horn Beer" /></a></th>
          <th width="200" align="center" scope="col"><a href="#" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('Events','','/RamWebsite_NEW/images/EventsLink2_rollover.jpg',1 )"><img src="/RamWebsite_NEW/images/EventsLink2.jpg" alt="Events at the Ram" name="Events" width="212" height="125" hspace="6" border="0" id="Events" /></a></th>
          <th width="200" align="center" scope="col"><a href="#" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('Gift Cards','','/RamWebsite_NEW/images/GiftCards_rollover.jpg',1)"><img src="/RamWebsite_NEW/images/GiftCards.jpg" alt="Gift Cards" name="Gift Cards" width="212" height="125" hspace="6" border="0" id="Gift Cards" /></a></th>
        </tr>
      </table>
    </div>
    <div id="bottommenu2"></div>
    <map name="Map" id="Map">
      <area shape="poly" coords="16,103" href="#" />
      <area shape="poly" coords="49,71,102,58,158,73,191,113,180,141,151,161,109,169,65,162,31,141,18,112" href="http://theram.fbmta.com/members/UpdateProfile.aspx?Action=Subscribe&amp;InputSource=W" target="_blank" />
    </map>
    <script type="text/javascript">
    <!--
    var MenuBar1 = new Spry.Widget.MenuBar("MenuBar1", {imgDown:"/RamWebsite_NEW/SpryAssets/SpryMenuBarDownHover.gif", imgRight:"/RamWebsite_NEW/SpryAssets/SpryMenuBarRightHover.gif"});
    //-->
    </script>
    </div>
    </body>
    </html>

    You have your image in the 'body editable region' wrapped in <p></p> tags (paragraph tags). <p> tags have padding and margin set on them by default.
    <p><img src="/images/aboutus2.jpg" width="675" height="300" /></p>
    You can either just remove the <p></p> tags or you can zero out the padding and margin:
    p {
    padding: 0;
    margin: 0;
    Unfortuanately the above will target every paragraph on your page which might not be desirable so I would just remove the <p> tags as it is not necessary to wrap an image in them.
    If you do want to keep the <p> tags then use some inline css to specifically remove the padding and margin on that particular one:
    <p style="padding: 0; margin: 0;"><img src="/images/aboutus2.jpg" width="675" height="300" /></p>

  • Having trouble with persist

    I have created a simple application where a user can order items and then i'm saving the order and all the items (details of order) to the dataBase.
    i'm using jdk1.5 with jboss and mySql (also hibernate).
    i'm having troubles with saving the details of the order, the relevant code is-
    order entity -
    @Entity
    public class Orders implements Serializable
        @Id @GeneratedValue
        private long orderId;                    //generated in db
        private String name;
       public Orders(String userName)
            this.userName=userName;
        public long getOrderId() { return orderId; }
        //getters and setters...
    detailsOfOrder entity -
    @Entity
    public class DetailsOfOrders implements Serializable
    @Id
    private long orderId;
    @Id
    private int productId;
    private int quantity;
    public DetailsOfOrders(long orderId,int productId)
         this.productId=productId;
         this.orderId=orderId;
    public long getOrderId() { return orderId; }
    public int getProductId() { return productId; }
    //getters and setters...
    }session bean (order method) -
            List<SCItem> listOfItems;                         //SCItem is a regular class
            Orders order=new Orders(userName);
            manager.persist(order);
            long orderId=order.getOrderId();   //get order id after persisting
            for(SCItem item : listOfItems)    //save details of order
             DetailsOfOrders detail=new DetailsOfOrders(orderId,"1");
             manager.persist(detail);                                                   //exception occures here
           }when i'm trying to make an order i'm getting the exception-
    javax.transaction.RollbackException: [com.arjuna.ats.internal.jta.transaction.arjunacore.commitwhenaborted] [com.arjuna.ats.internal.jta.transaction.arjunacore.commitwhenaborted] Can't commit because the transaction is in aborted state
    what is the problem?
    thanks in advanced.

    yes, the entity classes have no-arg constructors (i just tried to write it shortly here...)
    about the other thing , well i'm sorry , the right code is-
    session bean (order method) -
       List<SCItem> listOfItems;                         //SCItem is a regular class
       Orders order=new Orders(userName);
       manager.persist(order);
       long orderId=order.getOrderId();   //get order id after persisting
       for(SCItem item : listOfItems)    //save details of order
         DetailsOfOrders detail=new DetailsOfOrders(orderId,item.getProductId());
         manager.persist(detail);                                                   //exception occures here
         }what else could it be?

  • How to Use Interactive Forms in BSP Applications - trouble with demo

    Is anyone else out there having trouble with the subject how to guide? https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/d0e58022-2a39-2a10-69a8-c1a892e2b3f4
    I think I have everything built out correctly but I get the following run time error.
    Business Server Page (BSP) error
    What happened?
    Calling the BSP page was terminated due to an error.
    SAP Note
    The following error text was processed in the system:
    An exception with the type CX_SY_REF_IS_INITIAL occurred, but was neither handled locally, nor declared in a RAISING clause
    Exception Class CX_SY_REF_IS_INITIAL
    Error Name 
    Program Z_PROCESS_BOOKING_FORM========CP
    Include Z_PROCESS_BOOKING_FORM========CM002
    ABAP Class Z_PROCESS_BOOKING_FORM
    Method DO_REQUEST
    Line 33 
    Long text An attempt was made to execute a dynamic method callon an initial(NULL-) object reference. The reference must refer to an object.
    Following is my code:  line 33 reads as strChecked = node->get_value( ).
    method DO_REQUEST.
    *CALL METHOD SUPER->DO_REQUEST
      data: bookingxml type string.
      bookingxml = request->get_cdata( ).
      data: streamFactory type ref to
      if_ixml_stream_factory.
      data: iStream type ref to if_ixml_istream.
      streamFactory = g_ixml->create_stream_factory( ).
      iStream =
      streamFactory->create_istream_string(
      bookingxml ).
      data: document type ref to if_ixml_document.
      document = g_ixml->create_document( ).
      data: parser type ref to if_ixml_parser.
      parser = g_ixml->create_parser( stream_factory =
      streamFactory
      istream =
      iStream
      document =
      document ).
      parser->parse( ).
      data: node type ref to if_ixml_node.
      data: strChecked type string.
      node = document->find_from_name( name = 'RESERVED'
      strChecked = node->get_value( ).
      data: reserved type BAPISBODAT-RESERVED.
      data: checked type i.
      move strChecked to checked.
      if ( checked = 1 ).
        reserved = 'X'.
      else.
        reserved = ''.
      endif.
      data: custbook type BAPISBONEW.
      node = document->find_from_name( name = 'AIRLINEID'
      custbook-airlineid = node->get_value( ).
      node = document->find_from_name( name = 'CONNECTID'
      custbook-connectid = node->get_value( ).
      data: fd type BAPISBONEW-FLIGHTDATE.
      data: strFd type string.
      node = document->find_from_name( name =
      'FLIGHTDATE' ).
      strFd = node->get_value( ).
      CALL FUNCTION 'CONVERT_DATE_TO_INTERNAL'
      EXPORTING
      DATE_EXTERNAL = strFd
    * ACCEPT_INITIAL_DATE =
      IMPORTING
      DATE_INTERNAL = custbook-flightdate
      EXCEPTIONS
      DATE_EXTERNAL_IS_INVALID = 1
      OTHERS = 2
      IF SY-SUBRC <> 0.
    * Do something
      ENDIF.
      node = document->find_from_name( name =
      'CUSTOMERID' ).
      custbook-customerid = node->get_value( ).
      node = document->find_from_name( name = 'CLASS' ).
      custbook-class = node->get_value( ).
      node = document->find_from_name( name = 'AGENCYNUM'
      custbook-agencynum = node->get_value( ).
      node = document->find_from_name( name = 'PASSNAME'
      custbook-passname = node->get_value( ).
      data: pb type BAPISBONEW-PASSBIRTH.
      data: strPb type string.
      node = document->find_from_name( name = 'PASSBIRTH'
      strPb = node->get_value( ).
      CALL FUNCTION 'CONVERT_DATE_TO_INTERNAL'
      EXPORTING
      DATE_EXTERNAL = strPb
    * ACCEPT_INITIAL_DATE =
      IMPORTING
      DATE_INTERNAL = custbook-passbirth
      EXCEPTIONS
      DATE_EXTERNAL_IS_INVALID = 1
      OTHERS = 2
      IF SY-SUBRC <> 0.
    * Something
      ENDIF.
      data: bn type BAPISBOKEY-BOOKINGID.
      data: return type bapiret2_tab.
      data: errmsg type string.
      CALL FUNCTION 'BAPI_FLBOOKING_CREATEFROMDATA'
      EXPORTING
      RESERVE_ONLY = reserved
      BOOKING_DATA = custbook
    * TEST_RUN = ' '
      IMPORTING
    * AIRLINEID =
      BOOKINGNUMBER = bn
    * TICKET_PRICE =
      TABLES
    * EXTENSION_IN =
      RETURN = return.
      data: wa type bapiret2.
      loop at return into wa.
        if wa-type = 'E'.
          move wa-message to errmsg.
          response->append_cdata( errmsg ).
          response->append_cdata( '<BR>' ).
        endif.
      endloop.
    response->append_cdata( 'Flight booked, booking reference number: ').
      data: strBn type string.
      move bn to strBn.
      response->append_cdata( strBn ).
    endmethod.
    The first page works fine but when I submit my form it fails.  I debugged and the request object doesn't look right.
    Any ideas would be greatly appreciated.
    Regards,
    Dan
    Message was edited by:
            Dan Scheck
    Message was edited by:
            Dan Scheck

    Hi Surija,
    there is an issue with Internet Explorer that causes this problem when you launch the BSP applicaiton using the test menu in SE80. The issue does not occur with Firefox...very strange I know.
    Anyway, to get around this you just copy the BSP application URL and open a browser and paste the URL in...so essentially do not use the "Test" in SE80 to launch your application.
    Hope this fixes your problem!
    Cheers,
    Jeff

  • Having Trouble With Formula

    i am doing an assignment and im having a lot of trouble with it.
    here is what it is asking for
    read a value representing a number of seconds, then print the equivalent amount of time as a combination of hours, minutes, and seconds. (For example, 9999 seconds is equivalent to 2 hours, 46 minutes, and 39 seconds).
    and so far i have this
    package Convert;
    import java.util.Scanner;
    public class nSeconds {
    public static void main(String[] args)
    long Seconds = 0;
    long Hours = 0;
    long Minutes = 0;
    Scanner scan = new Scanner(System.in);
    System.out.println("Please enter the hours: ");
    Hours = scan.nextInt();
    System.out.println("Please enter the minutes: ");
    Minutes = scan.nextInt();
    System.out.println("Please enter the seconds: ");
    Seconds = scan.nextInt();
    Seconds = (Hours*3600) + (Minutes*60) + (Seconds + 0);
    System.out.println("The total number of seconds is: " + Seconds);
    please help me with the formula
    thanks

    sorry that was the wrong app.
    this is the code i need help with
    package Convert;
    import java.util.Scanner;
    public class reverseSeconds {
         public static void main(String[] args)
              long Hours = 0;
    long Minutes = 0;
    long Second = 0;
              Scanner scan = new Scanner (System.in);
              System.out.println ("Please enter in the seconds:");
         Second = scan.nextInt();
         Hours = (Second / 3600);
         Minutes = (Second / 60) + Minutes;
         Second = Second / 60;
         System.out.println ("Hours:" + Hours);
         System.out.println ("Minutes:" + Minutes);
         System.out.println ("Seconds:" + Second);
         System.out.println(Hours + " Hours :" + Minutes + " Minutes:" + Second + " Seconds");
    }

  • Trouble with first progråµ

    I'm having trouble with my simple calculator, which is similar to the calculator in "cocoa programming for dummies".
    http://public.me.com/schoolkid144
    its firstproject.zip
    The trouble is that when I get the value of the two text fields, it always returns 0 even when the value of both text fields is 1.

    Hi S-T Programmer, and welcome to the Dev Forums!
    The connections between the FuseBox outlets and the three text fields just need to be reversed in Interface Builder. An IBOutlet instance variable is associated with an Interface Builder object by Ctrl-Dragging from the object which owns the variable to the object the variable wants to reference. For example, to connect the FuseBox ivar named answerField to the text field which is to display the answer, Ctrl-Click on the FuseBox icon in the xib window then drag to the desired text field object. The text field object may either be found as an icon in the xib (Document) window, or as the full-scale drawing of the object in the IB Editor window (where you lay out the view). When you release the mouse at the end of the drag, a black list of all the FuseBox class outlets will pop up. Select the outlet you meant to connect (in this case answerField), and the connection will be made.
    The problem with giving IB instructions in the forum is that a picture is worth a thousand words, and this post is on the wrong side of that equation. So I'm hoping you'll be able to see enough of the picture from all these words. There are two other ways of making IB connections that are harder to use, but easier to explain:
    1) If you Ctrl-Click (without dragging) on any icon in the xib window, a floating, black panel will pop up showing every possible connection to that object. To make the same connection discussed above from the answerField outlet to the right-hand text field, Ctrl-Click on the FuseBox icon and find answerField in Outlet list. You can now drag directly from the connector symbol to the desired text field. This time there's no popup when you release the mouse because IB already knows which outlet is to be connected. After the connection is made, you can Ctrl-Click on the text field icon and see its connection panel. You'll know the connection is going in the right direction when the connection to the text field is listed under +Referencing Outlets+ and the connection back at the FuseBox object is listed under Outlets.
    The floating, black connection panels are especially useful for deleting connections. Since your project currently has three backwards connections, you can use these panels to delete those by clicking on the 'X' which is visible on each connection line.
    2) There's also a tab in the Inspector window for making connections. Select one of the objects you want to connect and select Tools>Connections Inspector from the top menu if you have trouble finding the tab. You can make connections in this window if you want, but you can also use the Connections Inspector to view the connections previously made by dragging.
    This topic is covered in more detail (including some screen shots! yay!!) under Creating and Managing Outlet and Action Connections in the +Interface Builder User Guide+.
    I think your connection between the Calculate button and the FuseBox was correct. This post has gotten so long I can't remember if I had to reverse that one too, but I don't think I did. Anyway you'll be able to check for yourself now that you know what to look for, right? The connection between an object's Sent Action and an IBAction method goes in the direction opposite to an IBOutlet connection. Thus to connect the Calculate button you need to drag from the button to the FuseBox.
    _Outlet from_ the FuseBox
    _Action to_ the FuseBox
    Hope that helps!
    \- Ray

Maybe you are looking for