Final help with this stupid program

so here is the code of the final greekNumbers program
import java.math.*;
import java.util.*;
import javax.swing.JOptionPane;
public class GreekNumbers {
     private String userInput;
     private int supliedNumber;
     private int numberFactor;
     private int generatedNumber;
     public ArrayList factors;
     private int counter = 1;
     private String message = "Your Number was ";
     private int addedFactors;
     public void Factoring () {
     factors = new ArrayList(1);
          userInput =
               JOptionPane.showInputDialog (null, "Please enter your number.");
               supliedNumber = Integer.parseInt(userInput);
               message += (supliedNumber + ". And " + supliedNumber + " is ");
                    do {
                              numberFactor = supliedNumber / counter;
                              if (numberFactor % 1 == 0){
                                   factors.add (counter);
                                   factors.add (numberFactor);
                                   counter++;
                              else {counter++;}
                    }while (counter <= supliedNumber);
                    counter = 0;
                    do {
                            int a = (Integer) factors.get (counter); 
                              counter++;
                              int b = (Integer) factors.get (counter);
                              addedFactors = a + b;
                              counter++;
                    }while (counter <= factors.size ());
     public void Perfect () { // sees if the number abblied is perfect
          if (addedFactors == supliedNumber){
               message += "Perfect ";
     public void Abundant () { // sees if the number supplied is abundant
          if (addedFactors >= (supliedNumber * 2)){
                         message += "Abundant ";
     public void Deficient () {  // sees if the number supplied is deficient
          if (addedFactors <= (supliedNumber * 2)){
                         message += " Deficient";
     public String sendGreekNumber (){
         return message;// sends main method the greek number analysis.
}and all it does is run directly through the program and pops up with a box that contains my message string instance?
what am i doing wrong here?

DJ-Xen wrote:
here is the main thread
import javax.swing.JOptionPane;
     public class GreekNumbersDriver{
          public static void main (String [] args) {
               GreekNumbers number  = new GreekNumbers ();
               (new GreekNumbers()).sendGreekNumber ();
                    String finalNumber = number.sendGreekNumber ();
                    JOptionPane.showMessageDialog(null, finalNumber);
          }is the problem in there somewhere?Yes, you never call the Factoring method of your GreekNumber object.
Plus you are creating two instances of GreekNumber, why I don't know. There is no need to do this.

Similar Messages

  • Plz need help with this hashmap program

    as far as i know, this hashmap program works, but i cant get it to compile correctly because of one line error:
    phoneArray[2] = int f;
    the second position in phoneArray is and will always be a number, but the array is a String array, making it difficult for me to take the number in that position and change it.
    In actuality, the number is a score (a grade) and i need to take it to change it to a letter grade, where it will later be spit out in order from Name, Year, Score, Grade.
    plz help, this is a school assignment and its driving me mad.
    import java.util.*;
    import java.io.*;
    * A class that represents a phone book.  This phone
    * book maps names to phone numbers.  This will
    * read teh phone book information from a file.
    public class CourseData2 {
      /////////////////// fields ///////////////////
      private String fileName;
      private Map phoneMap = new HashMap();
      /////////////////// constructors ///////////////////
       * Constructor that takes a file name and reads
       * in the names and phone numbers from a file.
       * @param file the name of the file to read
      public CourseData2(String file) {
        this.fileName = file;
        // Read the map information in form the file
        readInfoFromFile();
      } // constructor
      /////////////////// methods ///////////////////
       * Get the phone number for hte passed nam
       * @param name the name to look up in hte map
       * @return the phone number if found, else null
      public String getPhoneNumber(String name) {
        String phoneNumber = (String) phoneMap.get(name);
        return phoneNumber;
      } // method getPhoneNumber()
       * Method to read the phone information from a
       * file and use it to fill hte map
      public void readInfoFromFile() {
        String line = null;
        String[] phoneArray = null;
        try {
          // create the reader
          BufferedReader reader =
            new BufferedReader(new FileReader(fileName));
          // loop reading from the file
          while ((line = reader.readLine()) != null) {
            if (line.indexOf(":") >= 0) {
              phoneArray = line.split(":");
              phoneMap.put(phoneArray[0].trim(),
                           phoneArray[1].trim(),
                           phoneArray[2].trim());
            } // if
            } // while
            (int)phoneArray[2] = int f;
            if (f < 60) { (String)a = "E";}
            else if (60 <= f < 70) { (String)f = "D";}
            else if (70 <= f < 80) { (String)f = "C";}
            else if (70 <= f < 90) { (String)f = "B";}
            else if (90 <= f) { (String)a = "A";}
          // Close the reader
          reader.close();
        } // try
        catch (FileNotFoundException ex) {
          SimpleOutput.showError("Could not find the file \"" + fileName + "\".");
        } // catch
        catch (Exception ex) {
          ex.printStackTrace();
        } // catch
      } // method readInfoFromFile()
      public void printBook() {
        // Sort hashtable.
        Vector phoneVector = new Vector(phoneMap.keySet());
        Collections.sort(phoneVector);
        // Display (sorted) hashtable.
        for (Enumeration phoneEnumeration = phoneVector.elements(); phoneEnumeration.hasMoreElements();) {
          String key = (String)phoneEnumeration.nextElement();
          System.out.println("Name: " + key + ", Year: " + phoneMap.get(key) + ", Score: " + phoneMap.get(key) + ", Grade: " + phoneMap.get(key));
        } // for
      } // method printBook()
      /* main method for testing */
      public static void main(String[] args) {
        CourseData2 phoneBook = new CourseData2("scores12.txt");
        System.out.println(phoneBook.getPhoneNumber("Lee"));
        System.out.println(phoneBook.getPhoneNumber("Smith"));
        phoneBook.printBook();
      } // main()
    } // class

    after much time and editing, this is the revised coding:
    import java.util.*;
    import java.io.*;
    * A class that represents a class score book.  This
    * book maps names to scores and grades.  This will
    * read the names, scores and grade information from a file.
    public class CourseData2 {
      /////////////////// fields ///////////////////
      private String fileName;
      private Map phoneMap = new HashMap();
      /////////////////// constructors ///////////////////
       * Constructor that takes a file name and reads
       * in the names and phone numbers from a file.
       * @param file the name of the file to read
      public CourseData2(String file) {
        this.fileName = file;
        // Read the map information in form the file
        readInfoFromFile();
      } // constructor
      /////////////////// methods ///////////////////
       * Get the phone number for hte passed nam
       * @param name the name to look up in hte map
       * @return the phone number if found, else null
      public String getPhoneNumber(String name) {
        String phoneNumber = (String) phoneMap.get(name);
        return phoneNumber;
      } // method getPhoneNumber()
       * Method to read the phone information from a
       * file and use it to fill hte map
      public void readInfoFromFile() {
        String line = null;
        String[] phoneArray = null;
        String a = "";
        try {
          // create the reader
          BufferedReader reader =
            new BufferedReader(new FileReader(fileName));
          // loop reading from the file
          while ((line = reader.readLine()) != null) {
            while ((line = reader.readLine()) != null) {
            if (line.indexOf(":") >= 0) {
              phoneArray = line.split(":");
              int f = Integer.parseInt(phoneArray[2]);
              if (0 <= f && f <= 100) {
            if (0 <= f && f < 60) { a = "E";}
            else if (60 <= f && f < 70) { a = "D";}
            else if (70 <= f && f < 80) { a = "C";}
            else if (80 <= f && f < 90) { a = "B";}
            else if (90 <= f && f <= 100) { a = "A";}
              } // if f between 0 and 100
            else if ( f > 100 && f < 0 )  {
            SimpleOutput.showError("Score is not an integer");
            String g = new String();
            g = phoneArray[2];
              }//if < 0
            }// if (line.index....
            phoneMap.put(phoneArray[0].trim(),
                        (phoneArray[1].trim() + phoneArray[2].trim() + (String)a));
            } // while2
            } // while
          // Close the reader
          reader.close();
        } // try
        catch (FileNotFoundException ex) { 
          SimpleOutput.showError("Could not find the file \"" + fileName + "\".");
        } // catch
        catch (Exception ex) {
          ex.printStackTrace();
        } // catch
      } // method readInfoFromFile()
      public void printBook() {
        // Sort hashtable.
        Vector phoneVector = new Vector(phoneMap.keySet());
        Collections.sort(phoneVector);
        // Display (sorted) hashtable.
        for (Enumeration phoneEnumeration = phoneVector.elements(); phoneEnumeration.hasMoreElements();) {
          String key = (String)phoneEnumeration.nextElement();
          System.out.println("Name: " + key + ", Year: " + phoneMap.get(key) + ", Score: " + phoneMap.get(key) + ", Grade: " + phoneMap.get(key));
        } // for
      } // method printBook()
      /* main method for testing */
      public static void main(String[] args) {
        CourseData2 phoneBook = new CourseData2("scores12.txt");
        System.out.println(phoneBook.getPhoneNumber("Depp"));
          System.out.println(phoneBook.getPhoneNumber("Gonzales"));
            System.out.println(phoneBook.getPhoneNumber("Jenkins"));
                System.out.println(phoneBook.getPhoneNumber("Lee"));
                   System.out.println(phoneBook.getPhoneNumber("Mac Donald"));
                      System.out.println(phoneBook.getPhoneNumber("O'Malley"));
                         System.out.println(phoneBook.getPhoneNumber("Price"));
                            System.out.println(phoneBook.getPhoneNumber("Ramesh"));
                                System.out.println(phoneBook.getPhoneNumber("Smith"));
                                    System.out.println(phoneBook.getPhoneNumber("Winston"));
        phoneBook.printBook();
      } // main()
    } // classthis has no errors, but gives me 4 warnings, which i can't solve, plz help

  • Can anyone help with this error? ;At line 102 of file"C:/Program files (x86)/Macromedia/Dreamweaver

    Can anyone help with this error please?;At line 102 of file"C:/Program files (x86)/Macromedia/Dreamweaver 8/Configuration/Objects/Common/Images.js"; TypeError: cmdDOM.parentWindow.setFormItem is not a function

    If Dreamweaver shows a message saying "the following JavaScript error(s) occurred",  it's usually a sign of a corrupt cache file. The first thing you should always be to delete the file cache. If that doesn't work, delete your personal Configuration folder. Please go through the steps mentioned in thread Deleting a corrupted cache file.

  • Does anybody know how to get help with this one?

    Hello there!  
    I wanted to get an advice on how to get in touch with the appropriate person at BT that could help with my situation.
    I have tried telephone help, complaints by email and unfortunately still waiting for somebody from the customer services to help me out.
    I have recently moved home.  I contacted BT on 26th June to organise the line transfer to the new address. The date was set for 18th July. I also ordered line rental saver and paid for it over the phone. All went smooth, telephone and broadband was working fine at the new place, but on the 23rd July I was sent an email that "BT is sorry that I am leaving". 
    I thought it was a mistake, but the lady in the on-line chat said somebody stopped my service. Later she rang and left a message saying that I must have requested to move to another provider. Did not manage to speak to her again, but phoned the help line this time.
    There a gentleman was trying to convince me that I called BT and cancelled my service on the 18th July and to him I was not a BT customer anymore. The truth is that I did not request to stop my service, anyway - why would I do that after paying for a year in advance. This has no logic, but because computer says so then he thinks I did it.
    He also added that my account is a 'mess'. He then promised that somebody would get in touch to sort it out as my line rental was gone and my phone and internet could go off any minute.
    I did not get any help. After that I wrote to them  3 email complaints to request assistance. They called and aknowledge they will help, but 3 weeks down the line nothing was done to explain the situation. Left the messages to the person from email complaints to ring me or email me -never happened.
    Last week I got 2 emails welcoming me to BT and outlining the call plans that were diferent from each other and the one I agreed to on the 25th June. When I called help line 2 days ago a lady confirmed on which one I am on, but could not sort out the most annoying thing - the 'final' bill. 
    I was sent a bill for over 200 pounds due to premature termination of phone and broadband service , which I never ordered. They already took the money this week. My line saver is gone as well. So I am 360 pounds short. I aslo have no access to myBT to monitor my phone activity or make orders.They also did not send any confrimation of the call plan I am currently on.
    It is a very annoying situation, because somebody at BT made an error and I am unable to get to anybody that could help. Everytime you call the help line you speak to somebody else and despite me thinking the email complaints would be the way forward they are not. Would appreciate some advice on how to tackle these issues: false accusations from them, inappropriate billing, problem with myBT.
    Thanks Lukasz

    Hi lbadek
    I can help with this please send us an email using the contact the mods link in my proifle and we will investigated from there.
    Thanks
    Stuart
    BTCare Community Mod
    If we have asked you to email us with your details, please make sure you are logged in to the forum, otherwise you will not be able to see our ‘Contact Us’ link within our profiles.
    We are sorry that we are unable to deal with service/account queries via the private message(PM) function so please don't PM your account info, we need to deal with this via our email account :-)

  • Can anyone help with this log? Thanks in advance

    Can you please help with this?
    I cannot make any sense out if it.
    Thank You
    Wed Jan 14 17:06:08 2009
    panic(cpu 1 caller 0x001A8CEC): Kernel trap at 0x00c8000e, type 14=page fault, registers:
    CR0: 0x8001003b, CR2: 0x96ff3776, CR3: 0x01461000, CR4: 0x00000660
    EAX: 0x07a3f000, EBX: 0x07a3fd44, ECX: 0x00001342, EDX: 0x00003384
    CR2: 0x96ff3776, EBP: 0x7ab8f918, ESI: 0x07a3f004, EDI: 0x0000001c
    EFL: 0x00010202, EIP: 0x00c8000e, CS: 0x00000008, DS: 0x077b0010
    Error code: 0x00000002
    Backtrace (CPU 1), Frame : Return Address (4 potential args on stack)
    0x7ab8f308 : 0x12b0fa (0x459234 0x7ab8f33c 0x133243 0x0)
    0x7ab8f358 : 0x1a8cec (0x4627a0 0xc8000e 0xe 0x461f50)
    0x7ab8f438 : 0x19eed5 (0x7ab8f450 0x53654c 0x7ab8f918 0xc8000e)
    0x7ab8f448 : 0xc8000e (0xe 0x48 0x7ab80010 0xbe0010)
    0x7ab8f918 : 0xc84911 (0x79df804 0x7a3f004 0x0 0x0)
    0x7ab8f988 : 0xba8f79 (0x79df804 0x7a3f004 0x0 0x0)
    0x7ab8fb48 : 0xba005b (0x0 0x5340f0 0xd3000001 0x8c55a000)
    0x7ab8fb98 : 0xba156f (0x74db400 0x6f1c400 0x0 0x4)
    0x7ab8fbe8 : 0xba1673 (0x74db400 0x74ce100 0xb7e350 0x79b43c0)
    0x7ab8fc08 : 0xb83133 (0x74db400 0x1 0x0 0x0)
    0x7ab8fc68 : 0xb7c93a (0x74db400 0x5 0x5 0x7801a60)
    0x7ab8fc98 : 0x40fbf5 (0x74db400 0x7801a60 0x7801a60 0x0)
    0x7ab8fce8 : 0x43af53 (0x74db400 0x7801a60 0x7801a60 0x0)
    0x7ab8fd48 : 0x18d210 (0x74db400 0x7801a60 0x0 0x0)
    0x7ab8fdb8 : 0x12d17e (0x767d178 0x767d490 0x7ab8fdf8 0x11ee14)
    0x7ab8fdf8 : 0x126257 (0x767d100 0x6db6ebc 0x7722d20 0x0)
    Backtrace continues...
    Kernel loadable modules in backtrace (with dependencies):
    com.apple.NVDAResman(5.3.0)@0xb9e000->0xdddfff
    dependency: com.apple.iokit.IONDRVSupport(1.5.2)@0xb90000
    dependency: com.apple.iokit.IOPCIFamily(2.4.1)@0x5c1000
    dependency: com.apple.iokit.IOGraphicsFamily(1.5.2)@0xb74000
    com.apple.iokit.IOGraphicsFamily(1.5.2)@0xb74000->0xb8ffff
    dependency: com.apple.iokit.IOPCIFamily(2.4.1)@0x5c1000
    BSD process name corresponding to current thread: WindowServer
    Mac OS version:
    9F33
    Kernel version:
    Darwin Kernel Version 9.5.0: Wed Sep 3 11:29:43 PDT 2008; root:xnu-1228.7.58~1/RELEASE_I386
    System model name: MacBookPro3,1 (Mac-F42388C8)

    Andrea Paesano wrote:
    I have updated the ram but this was over 2 years ago it was right after i purchased the mbp; I never had problem with this computer until last week. Funny enough is now working perfectly "knocking on wood"
    There are two problems with taking that approach to RAM:
    1) RAM can go bad over time for various reasons.
    2) Bad RAM is often only detected if it's something important.
    For example, if a pixel in a graphic changes you may not notice.
    If a jump address in a program changes, it will crash.
    If it's in the kernel, you'll get a panic.
    Worse yet, RAM failures often depend on the value of cells around them, so it's quite possible to get a memory location that only fails if the addresses before and after it contain a particular value.

  • TS3074 Hello anyone with Windows 7, not sure why having followed instructions above, install of latest version of itunes won't work and can no longer open old version either.  anyone help with this?

    Hello anyone with Windows 7, not sure why having followed instructions above, install of latest version of itunes won't work and can no longer open old version either.  anyone help with this?

    Hi,
    thanks for your reply.
    Yes, except n°1 - empty Temp directory, I had tried/checked all of those.
    I emptied the local temp folder tonight, but it still won't work.
    Please note: the installation doesn't give me any problem. The program was working fine, until at one point *plouf* it stopped working. I can re-install it without any problem, it just crashes when opening.
    \\edit\\ I seem to have located the problem, it's in the library files. If I re-install iTunes without my library, it works fine (though there is no music in it, yet). As soon as I import my library, or replace the My Music\iTunes folder with the old one, it stops working.

  • TS3999 I am unable to sync my Outlook calendar with my Iphone. I have noted that the Icloud Outlook add in is not ticked When I attempt to load it from the designated file nothing happens Can anyone help with this? Robyn

    I am unable to sync my Outlook calendar with my Iphone. I have noted that the Icloud Outlook add in is not ticked When I attempt to load it from the designated file nothing happens Can anyone help with this? Robyn

    Re: check that the appointments in my phone are going into iCloud calendars....exactly how do I do this?  I fear this is a really stupid question!
    My iCloud account is set up with my Apple ID as one email account (for example [email protected]) which is the email account I use to sign up for internet sites like Amazon, Apple,etc, so that I can differentiate vendors/mass emails.  But my default calendar on my iPhone is in a different email name (ie [email protected]) which I use for most communications to friends, relatives, etc. and it is this account that holds most of my appointments.  To further complicate things I have other email accounts that I use for business/professional and community work.  If I want all my calendars to show on my iPhone AND sync to my iCloud, do I set this at the phone level or the iCloud level?  or both?   
    Let me clarify....It looks like if I go into appointments that I previously set up through my personal account (ie above [email protected]) and edit the entry on my iPhone, selecting the iCloud "home" calendar within the entry, it will then sync to my iCloud account, no problem....do I have to do this to EVERY entry I have? or is there  a way to name my personal account as one to sync to iCloud?

  • Anybody can help with this SQL?

    The table is simple, only 2 columns:
    create table personpay(
    id integer primary key,
    pay number(8,2) not null);
    So the original talbe looks like this:
    ID PAY
    1 800
    2 400
    3 1200
    4 500
    5 600
    6 1900
    The requirement is to use one single query(no pl/sql) to show something lile the following, in other words, for each ID, the pay is the sum of all before itself and itself. So the query result looks like this:
    ID PAY
    1 800
    2 1200
    3 2400
    4 2900
    5 3500
    6 5400
    Again, just use one sql. No pl/sql. Anybody can help with this? I really appreciate that.
    thanks,

    Eh, people are so "analytically minded" that can't even notice a simple join?
    Counting Ordered Rows
    Let’s start with a basic counting problem. Suppose we are given a list of integers, for example:
    x
    2
    3
    4
    6
    9
    and want to enumerate all of them sequentially like this:
    x      #
    2      1
    3      2
    4      3
    6      4
    9      5
    Enumerating rows in the increasing order is the same as counting how many rows precede a given row.
    SQL enjoys success unparalleled by any rival query language. Not the last reason for such popularity might be credited to its proximity to English . Let examine the informal idea
    Enumerating rows in increasing order is counting how many rows precede a given row.
    carefully. Perhaps the most important is that we referred to the rows in the source table twice: first, to a given row, second, to a preceding row. Therefore, we need to join our number list with itself (fig 1.1).
    Cartesian Product
    Surprisingly, not many basic SQL tutorials, which are so abundant on the web today, mention Cartesian product. Cartesian product is a join operator with no join condition
    select A.*, B.* from A, B
    Figure 1.1: Cartesian product of the set A = {2,3,4,6,9} by itself. Counting all the elements x that are no greater than y produces the sequence number of y in the set A.
    Carrying over this idea into formal SQL query is straightforward. As it is our first query in this book, let’s do it step by step. The Cartesian product itself is
    select t.x x, tt.x y
    from T t, T tt
    Next, the triangle area below the main diagonal is
    select t.x x, tt.x y
    from T t, T tt
    where tt.x <= t.x
    Finally, we need only one column – t.x – which we group the previous result by and count
    select t.x, count(*) seqNum
    from T t, T tt
    where tt.x <= t.x
    group by t.x
    What if we modify the problem slightly and ask for a list of pairs where each number is coupled with its predecessor?
    x      predecessor
    2      
    3      2
    4      3
    6      4
    9      6
    Let me provide a typical mathematician’s answer, first -- it is remarkable in a certain way. Given that we already know how to number list elements successively, it might be tempted to reduce the current problem to the previous one:
    Enumerate all the numbers in the increasing order and match each sequence number seq# with predecessor seq#-1. Next!
    This attitude is, undoubtedly, the most economical way of thinking, although not necessarily producing the most efficient SQL. Therefore, let’s revisit our original approach, as illustrated on fig 1.2.
    Figure 1.2: Cartesian product of the set A = {2,3,4,6,9} by itself. The predecessor of y is the maximal number in a set of x that are less than y. There is no predecessor for y = 2.
    This translates into the following SQL query
    select t.x, max(tt.x) predecessor
    from T t, T tt
    where tt.x < t.x
    group by t.x
    Both solutions are expressed in standard SQL leveraging join and grouping with aggregation. Alternatively, instead of joining and grouping why don’t we calculate the count or max just in place as a correlated scalar subquery:
    select t.x,
    (select count(*) from T tt where tt.x <= t.x) seq#
    from T t
    group by t.x
    The subquery always returns a single value; this is why it is called scalar. The tt.x <= t.x predicate connects it to the outer query; this is why it is called correlated. Arguably, leveraging correlated scalar subqueries is one the most intuitive techniques to write SQL queries.
    How about counting rows that are not necessarily distinct? This is where our method breaks. It is challenging to distinguish duplicate rows by purely logical means, so that various less “pure” counting methods were devised. They all, however, require extending the SQL syntactically, which was the beginning of slipping along the ever increasing language complexity slope.
    Here is how analytic SQL extension counts rows
    select x, rank() over(order by x) seq# from T; -- first problem
    select x, lag() over(order by x) seq# from T; -- second problem
    Many people suggest that it’s not only more efficient, but more intuitive. The idea that “analytics rocks” can be challenged in many ways. The syntactic clarity has its cost: SQL programmer has to remember (or, at least, lookup) the list of analytic functions. The performance argument is not evident, since non-analytical queries are simpler construction from optimizer perspective. A shorter list of physical execution operators implies fewer query transformation rules, and less dramatic combinatorial explosion of the optimizer search space.
    It might even be argued that the syntax could be better. The partition by and order by clauses have similar functionality to the group by and order by clauses in the main query block. Yet one name was reused, and the other had been chosen to have a new name. Unlike other scalar expressions, which can be placed anywhere in SQL query where scalar values are accepted, the analytics clause lives in the scope of the select clause only. I have never been able to suppress an impression that analytic extension could be designed in more natural way.

  • Help with this vi and top level vi's

    Hi, need a bit of help with this vi below. It consists of field point inputs. And also consists of 2 while loops, the first while loop basically displays the raw data, the second loop eventually will display processed data, but this will only take place when told to start by the push button connected to the case loop. the problem is that when i start the second loop and then go to stop it it keeps on running even when the case loop is false, any help greatly appreciated(also had help with a labview engineer, but could not solve it).
    The other way about going around this is to separate the 2 loops into separate vis. Is it possible to use the first loop as the top level vi and if i press a button on the toplevel front
    panel vi, the front panel of the second loop program pops up. Any info on this greatly appreciated.
    Thanks Stuart
    Attachments:
    basicscat1configxy1.41_changed.vi ‏207 KB
    XY_Chart_Buffer.vi ‏54 KB

    I have created another update to your example showing how you can have the xy graph popup in another window. This time it is in a library as there are now 2 VIs. Again i cant test it as i dont have Fieldpoint, but *crosses fingers* it should work. Basically i have moved the inner while loop into it's own VI, linked it to the controls feeding it, and placed it into the main case structure. This subVI has also had it's properties changed so that it opens when called and closes afterwards, so you do not need to open it manually when you start.
    As to what i use for my interface, i guess you mean interface with instruments?...Well i use drivers. And if i dont have drivers, i write them. To be honest, i dont really know what Fieldpoint does, so mayb
    e you can enlighten me there..
    Good luck with the PhD Chemists..working in a university myself i have an idea what it must be like for you!
    Kim
    Attachments:
    Basicscat1configxy1.41.llb ‏133 KB

  • Help with this prefix method

    I need help with this method. The program runs but i still hava problem for example i enter +56 and return 11 but when i tried to enter -+567 return 25 instead of 23 also when i tried to enter +45-3 it return 9 so after 5 the program stop it just return the addition of 4+5
    public static int prefixEvaluation(String s){
      int result=0 ;
      int i=1;
      char ch = s.charAt(0);
      s=s.substring(i , s.length());// I want to be able to read all the character of the string every time i call the recursive method
      if (ch>='0'&& ch<='9'){
        result=((int)ch-48);
        System.out.println(result);
        return result;
      else if (ch=='+'|| ch=='-'|| ch=='*'|| ch=='/'){
        char op=ch;
        System.out.println(ch);
        int operand1= prefixEvaluation(s);
        s = s.substring(i++);
        int operand2= prefixEvaluation(s);

    double post!
    http://forum.java.sun.com/thread.jspa?threadID=781431&messageID=4444181#4444181

  • Error 1603: Need some help with this one

    When installing iTunes I first get an error box saying
    "Error 1406: Could not write value to key \Software\classes\.cdda\OpenWithList\iTunes.exe. Verify that you have sufficient access to that key, or contact your support personnel."
    The second one (after I click on Ignore on the last box) I get it this one:
    "Error: -1603 Fatal error during installation.
    Consult Windows Installer Help (Msi.chm) or MSDN for more information"
    Strange thing is that I do have full access to my computer (or atleast in all other cases I have had since I am the only one with an account on it).
    I have done my best in trying to solve it myself but I'm running out of ideas. I have downloaded latest versions from the website and tried installing Quicktime separately. I have also tried removing Quicktime using add/or remove programs though I just I didn't dare to take full removal because it said something about system files.
    Anyway I really need some help with this, anyone got any ideas?
    Greets,
    Sixten
      Windows XP Pro  

    Do you know how to count backwards? Do you know how to construct a loop? Do you know what an autodecrementor is? Do you know how to use String length? Do you know Java arrays start with index 0 and run to length-1? Do you know you use length on arrays too? Do you know what System.out.println does?
    Show us what you have, there isn't anything here that isn't easily done the same as it would be on paper.

  • OniPhone 6 Plus. Connectinge 6 Plus. Connecting Bluetooth to my Prius bluetooth has been successful However, I am unable to answer or place calls via the bluetooth connection even though the connection has been established. Can anyone help with this?

    With my new iPhone 6 Plus. Connectinge 6 Plus. Connecting Bluetooth to my Prius bluetooth has been successful. However, I am unable to answer or place calls via the bluetooth connection even though the connection has been established. It worked well with my previous iPhone 4S. Can anyone help with this?

        I can see that this issue has been quite extensive, and frustrating, and I am so sorry for all that has happened societygirl! I would like to help you work this issue out. Please follow & send me a Direct Message, so I can get your account specifics and help finally bring this to a resolution.
    Thank you,
    MichelleH_VZW
    Follow us on Twitter @VZWSupport

  • I need advise and help with this problem . First , I have been with Mac for many years ( 14 to be exact ) I do have some knowledge and understanding of Apple product . At the present time I'm having lots of problems with the router so I was looking in to

    I need advise and help with this problem .
    First , I have been with Mac for many years ( 14 to be exact ) I do have some knowledge and understanding of Apple product .
    At the present time I'm having lots of problems with the router so I was looking in to some info , and come across one web site regarding : port forwarding , IP addresses .
    In my frustration , amongst lots of open web pages tutorials and other useless information , I come across innocent looking link and software to installed called Genieo , which suppose to help with any router .
    Software ask for permission to install , and about 30 % in , my instinct was telling me , there is something not right . I stop installation . Delete everything , look for any
    trace in Spotlight , Library . Nothing could be find .
    Now , every time I open Safari , Firefox or Chrome , it will open in my home page , but when I start looking for something in steed of Google page , there is
    ''search.genieo.com'' page acting like a Google . I try again to get raid of this but I can not find solution .
    With more research , again using genieo.com search eng. there is lots of articles and warnings . From that I learn do not use uninstall software , because doing this will install more things where it come from.
    I do have AppleCare support but its to late to phone them , so maybe there some people with knowledge , how to get this of my computer
    Any help is welcome , English is my learned language , you may notice this , so I'm not that quick with the respond

    Genieo definitely doesn't help with your router. It's just adware, and has no benefit to you at all. They scammed you so that they could display their ads on your computer.
    To remove it, see:
    http://www.thesafemac.com/arg-genieo/
    Do not use the Genieo uninstaller!

  • My calendar will no longer let me add new event or delete them, it comes up with an error saying "cannot save event, no end date set" or "event does not belong to that event store". can anyone help with this?

    my calendar will no longer let me add new event or delete them, it comes up with an error saying "cannot save event, no end date set" or "event does not belong to that event store". can anyone help with this?

    Hi,
    To configure your ODBC DataSource, go to Control Panel ---> DataSources(ODBC) (If you are in a Windows environment).
    Select the tab System DSN. If you have not added your data source, then do so by clicking on the Add button. If you have added the datasource, click on the Configure button to configure it.
    Give the datasource name, then the database name.
    You have to give the hostname, service name and server name. I guess, in most cases, the datasource name and host name will be the same, service name and server name will be the same. If you are using TCP/IP, the protocol will be onsoctcp.
    There will be a file named Services under C:\WINNT\system32\drivers\etc where you have to give the port number for accessing this server.
    It will be like this <service name> <portnumber>/tcp
    Hope this helps...
    best wishes,
    Nish

  • I need help with this script please ASAP

    So I need this to work properly, but when ran and the correct answer is chosen the app quits but when the wrong answer is chosen the app goes on to the next question. I need help with this ASAP, it is due tommorow. Thank you so much for the help if you can.
    The script (Sorry if it's a bit long):
    #------------Startup-------------
    display dialog "Social Studies Exchange Trviva Game by Justin Parzik" buttons {"Take the Quiz", "Cyaaaa"} default button 1
    set Lolz to (button returned of the result)
    if Lolz is "Cyaaaa" then
    killapp()
    else if Lolz is "Take the Quiz" then
              do shell script "say -v samantha Ok starting in 3…2…1…GO!"
    #------------Question 1-----------
              display dialog "Around age 11, many boys left their fathers to become…" buttons {"Scholars", "Warriors", "Apprentices"}
              set A1 to (button returned of the result)
              if A1 is "Apprentices" then
                        do shell script "say -v samantha Correct Answer"
              else
                        do shell script "say -v samantha Wrong Answer"
      #----------Question 2--------
                        display dialog "Most children were taught
    to read so that they could understand the…" buttons {"Music of Mozart", "Bible", "art of cooking"}
                        set A2 to (button returned of the result)
                        if A2 is "Bible" then
                                  do shell script "say -v samantha Correct Answer"
                        else
                                  do shell script "say -v samantha Wrong Answer"
      #------------Question 3---------
                                  display dialog "In the 1730s and 1740s, a religious movement called the_______swept through the colonies." buttons {"Glorius Revolution", "Great Awakening", "The Enlightenment"}
                                  set A3 to (button returned of the result)
                                  if A3 is "Great Awakening" then
                                            do shell script "say -v samantha Correct Answer"
                                  else
                                            do shell script "say -v samantha Wrong Answer"
      #-----------Question 4--------
                                            display dialog "_______ was
    a famous American Enlightenment figure." buttons {"Ben Franklin", "George Washington", "Jesus"}
                                            set A4 to (button returned of the result)
                                            if A4 is "Ben Franklin" then
                                                      do shell script "say -v samantha Correct Answer"
                                            else
                                                      do shell script "say -v samantha Wrong Answer"
      #----------Question 5-------
                                                      display dialog "______ ownership gave colonists political rights as well as prosperity." buttons {"Land", "Dog", "Slave"}
                                                      set A5 to (button returned of the result)
                                                      if A5 is "Land" then
                                                                do shell script "say -v samantha Correct Answer"
                                                      else
                                                                do shell script "say -v samantha Wrong Answer"
      #---------Question 6--------
                                                                display dialog "The first step toward guaranteeing these rights came in 1215. That
    year, a group of English noblemen forced King John to accept the…" buttons {"Declaration of Independence", "Magna Carta", "Constitution"}
                                                                set A6 to (button returned of the result)
                                                                if A6 is "Magna Carta" then
                                                                          do shell script "say -v samantha Correct Answer"
                                                                else
                                                                          do shell script "say -v samantha Wrong Answer"
      #----------Question 7--------
                                                                          display dialog "England's cheif lawmaking body was" buttons {"the Senate", "Parliament", "King George"}
                                                                          set A7 to (button returned of the result)
                                                                          if A7 is "Parliament" then
                                                                                    do shell script "say -v samantha Correct Answer"
                                                                          else
                                                                                    do shell script "say -v samantha Wrong Answer"
      #--------Question 8-----
                                                                                    display dialog "Pariliament decided to overthrow _______ for not respecting their rights" buttons {"King James II", "King George", "King Elizabeth"}
                                                                                    set A8 to (button returned of the result)
                                                                                    if A8 is "King James II" then
                                                                                              do shell script "say -v samantha Correct Answer"
                                                                                    else
                                                                                              do shell script "say -v samantha Wrong Answer"
      #--------Question 9------
                                                                                              display dialog "Parliament named ___ and ___ as England's new monarchs in something called ____." buttons {"William/Mary/Glorius Revolution", "Adam/Eve/Great Awakening", "Johhny/Mr.Laphalm/Burning of the hand ceremony"}
                                                                                              set A9 to (button returned of the result)
                                                                                              if A9 is "William/Mary/Glorius Revolution" then
                                                                                                        do shell script "say -v samantha Correct Answer"
                                                                                              else
                                                                                                        do shell script "say -v samantha Wrong Answer"
      #---------Question 10-----
                                                                                                        display dialog "After accepting the throne William and Mary agreed in 1689 to uphold the English Bill of _____." buttons {"Money", "Colonies", "Rights"}
                                                                                                        set A10 to (button returned of the result)
                                                                                                        if A10 is "Rights" then
                                                                                                                  do shell script "say -v samantha Correct Answer"
                                                                                                        else
                                                                                                                  do shell script "say -v samantha Wrong Answer"
      #---------Question 11------
                                                                                                                  display dialog "By the late 1600s French explorers had claimed the ___ River Valey" buttons {"Mississippi", "Ohio", "Hudson"}
                                                                                                                  set A11 to (button returned of the result)
                                                                                                                  if A11 is "Ohio" then
                                                                                                                            do shell script "say -v samantha Correct Answer"
                                                                                                                  else
                                                                                                                            do shell script "say -v samantha Wrong Answer"
      #------Question 12---------
                                                                                                                            display dialog "______ was sent to ask the French to leave 'English Land'." buttons {"Johhny Tremain", "George Washington", "Paul Revere"}
                                                                                                                            set A12 to (button returned of the result)
                                                                                                                            if A12 is "George Washington" then
                                                                                                                                      do shell script "say -v samantha Correct Answer"
                                                                                                                            else
                                                                                                                                      do shell script "say -v samantha Wrong Answer"
      #---------Question 13-------
                                                                                                                                      display dialog "_____ proposed the Albany Plan of Union" buttons {"George Washingon", "Ben Franklin", "John Hancock"}
                                                                                                                                      set A13 to (button returned of the result)
                                                                                                                                      if A13 is "Ben Franklin" then
                                                                                                                                                do shell script "say -v samantha Correct Answer"
                                                                                                                                      else
                                                                                                                                                do shell script "say -v samantha Wrong Answer"
      #--------Question 14------
                                                                                                                                                display dialog "The __________ declared that England owned all of North America east of the Mississippi" buttons {"Proclomation of England", "Treaty of Paris", "Pontiac Treaty"}
                                                                                                                                                set A14 to (button returned of the result)
                                                                                                                                                if A14 is "" then
                                                                                                                                                          do shell script "say -v samantha Correct Answer"
                                                                                                                                                else
                                                                                                                                                          do shell script "say -v samantha Wrong Answer"
      #-------Question 15-------
                                                                                                                                                          display dialog "Braddock was sent to New England so he could ______" buttons {"Command an attack against French", "Scalp the French", "Kill the colonists"}
                                                                                                                                                          set A15 to (button returned of the result)
                                                                                                                                                          if A15 is "Command an attack against French" then
                                                                                                                                                                    do shell script "say -v samantha Correct Answer"
                                                                                                                                                          else
                                                                                                                                                                    do shell script "say -v samantha Wrong Answer"
      #------TheLolQuestion-----
                                                                                                                                                                    display dialog "____ is the name of the teacher who runs this class." buttons {"Mr.White", "Mr.John", "Paul Revere"} default button 1
                                                                                                                                                                    set LOOL to (button returned of the result)
                                                                                                                                                                    if LOOL is "Mr.White" then
                                                                                                                                                                              do shell script "say -v samantha Congratulations…you…have…common…sense"
                                                                                                                                                                    else
                                                                                                                                                                              do shell script "say -v alex Do…you…have…eyes?"
                                                                                                                                                                              #------END------
                                                                                                                                                                              display dialog "I hope you enjoyed the quiz!" buttons {"I did!", "It was horrible"}
                                                                                                                                                                              set endmenu to (button returned of the result)
                                                                                                                                                                              if endmenu is "I did!" then
                                                                                                                                                                                        do shell script "say -v samantha Your awesome"
                                                                                                                                                                              else
                                                                                                                                                                                        do shell script "say -v alex Go outside and run a lap"
                                                                                                                                                                              end if
                                                                                                                                                                    end if
                                                                                                                                                          end if
                                                                                                                                                end if
                                                                                                                                      end if
                                                                                                                            end if
                                                                                                                  end if
                                                                                                        end if
                                                                                              end if
                                                                                    end if
                                                                          end if
                                                                end if
                                                      end if
                                            end if
                                  end if
                        end if
              end if
    end if

    Use code such as:
    display dialog "Around age 11, many boys left their fathers to become…" buttons {"Scholars", "Warriors", "Apprentices"}
    set A1 to (button returned of the result)
    if A1 is "Apprentices" then
    do shell script "say -v samantha Correct Answer"
    else
    do shell script "say -v samantha Wrong Answer"
    return
    end if
    #----------Question 2--------
    display dialog "Most children were taught to read so that they could understand the…" buttons {"Music of Mozart", "Bible", "art of cooking"}
    set A2 to (button returned of the result)
    if A2 is "Bible" then
    do shell script "say -v samantha Correct Answer"
    else
    do shell script "say -v samantha Wrong Answer"
    return
    end if
    (90444)

Maybe you are looking for

  • Exchange 2010 to Exchange 2013 mail flow?

    We are planning to migrate Exchange 2010 to Exchange 2013. I understand that we need to upgrade the CAS to 2013 for Internet Facing. What about mail flow. Currently, Internet mail flows to Exchange 2010 (single site). Can I keep it for sometime after

  • SQL Server Express is being a real pain

    I've been messing with this SQL Server Express installation since Friday and still can't get this application and database to work together correctly. The program is written in ColdFusion, but the errors seem to be permissions related to me but I jus

  • 24" iMac - fan comes on, Mac won't sleep

    Sometimes when I try to "sleep" my Mac, the fan comes on, the screen blanks, and then immediately it comes to life. Other times the fan comes on, even though I don't think it's overheating, and then maybe I can sleep it, and maybe I can't. Anyone els

  • Idoc to File -- Records will depend on repetition of particular segment.

    Hi Experts, Iam doing a Idoc to file scenario. Based on the sales organization(VKORG),i need to create the multiple records in the file. For example : E1MARAM  0..Unbounded      |      |E1MARMM   0..Unbounded      |      E1MARMM      |      E1MARMM  

  • Behavior of Automatic Domain Checking in ALV

    Lets say I have an ALV cell whose underlying domain supports a number with one decimal place. When someone puts in 8.25 , a message is thrown that says ' Entry has too Many Decimal Places (Max 1)' This is free, and it is goodness. It seems that when