I need help with Help

I have the Apple docs on "providing assistance ..." and the specs on HTML 4.01 & XHTML 1.0. Since I am writing software just for myself, I don't want to spend megabucks on Dreamweaver or GoLive in order to write help files. Is there a poor man's route to writing these files? I don't need anything fancy - just plain text will do for most of it.
I believe I saw somewhere that IB could help but I can't find anything there. I am using Xcode 2.4.1.
There is a note in "providing assistance ..." that an example is at /Library/Documentation/Help/MacHelp.help/Contents/Resources/. How do I see into this filewrapper?
Pete

You can use any text editor, just save the file as .html instead of .txt
To get an idea of how to write help content you can look at the help books of existing applications. To see one, go to:
Library > Documentation > Help
Right-click on one of those and choose "show package contents" to see whats inside.
You can also check out the help content in application (lets say ichat) by right clicking on the app and choosing show package contents, then go to:
Contents > Resources > English.lproj > iChatHelp
You can copy these files and modify them as you need.

Similar Messages

  • I got new hard driver for my MacBook I don't have the cd but I do have flash drive that has the software I need help because when I turn on my laptop it shows me a file with question mark how can I install the software from the flash driver?

    I got new hard driver for my MacBook I don't have the cd but I do have flash drive that has the software I need help because when I turn on my laptop it shows me a file with question mark how can I install the software from the flash driver?

    Hold down the Option key while you boot your Mac. Then, it should show you a selection of devices. Click your flash drive and it will boot from that.

  • Installation of Photoshop update 13.1.2 for creative cloud fails with error code U44M1P7 I need help

    I need help installing update 13.1.2 for Photoshop creative cloud, installation fails with error code: U44M1P7. Could someone please help?

    Sorry to bother you.
    I could find the answer after searching previous posts about this language problem.
    Had to change my language in AAM profile and then download PS CS6 again ( english version ).
    Then open the actual Photoshop and in preferences > interface you can besides the Dutch also option for English.
    restart application and Voila.
    Greetz, Jeroen

  • Need help with Math related operations...

    I'm learning JAVA for more than 3 weeks and I really need help...
    I'm using SDK1.4 with Elixir IDE Lite (+patch installed).
    In the following screenshot <http://www.geocities.com/jonny_fyy/pics/java1.png>, I've got this error (when I right-click -> Compile) . Do you know what it means & how can I solve it?
    Here's how it should look if correct (pic scan from lab worksheet)... <http://www.geocities.com/jonny_fyy/pics/lab.jpg>
    Here's my java file... <http://www.geocities.com/jonny_fyy/FahToCeltxt.java>
    Thanks for helping :>

    Hi jonny
    One step ahead:
    import java.awt.*;
    import java.applet.*;
    import java.awt.event.*;
    public class FahToCeltxt extends Applet implements ActionListener {
         TextField msgField ;
         String msg = null;
         int msgValue;
         Label title;
         Button b;
         public void init() {
              title = new Label("Enter degrees in Fahrenheit: ");
              add(title);
              msgField = new TextField (10);
              add(msgField);
    //          msgField.addTextListener(this);
              b = new Button("Convert");
              b.addActionListener(this);
              add(b);
    //     public void textValueChanged(TextEvent event) {
    //          msgValue = Integer.parseInt(msgField.getText());
    //          repaint();
         public void paint (Graphics g) {
              int result = (msgValue - 32) * 5/9 ;
              g.drawString("Degree Centigrade is " + result , 50, 50);
      public void actionPerformed(ActionEvent e) {
              msgValue = Integer.parseInt(msgField.getText());
              repaint();
    }Regards.

  • Need help with a currently "in-use" form we want to switch to Adobes hosting service

    Hi, I am in desperate need of help with some issues concerning several forms which we currently use a paid third party (not Adobe) to host and "re-distribute through email"...Somehow I got charged $14.95 for YOUR service, (signed up for a trial, but never used it)..and now I am paying for a year of use of the similar service which Adobe is in control of.  I might want to port my form distribution through Adobe in the hopes of reducing the errors, problems and hassles my customers are experiencing when some of them push our  "submit button". (and I guess I am familiar with these somewhat from reading what IS available in here, and I also know that, Adobe is working to alleviate some of these " submit"  issues, so let's don't start by going backwards, here) I need solutions now for my issues or I can leave it as is, If Adobe's solution will be no better for my end users...
    We used FormsCentral to code these forms and it works for the most part (if the end-user can co-operate, and thats iffy, sometimes), but I need help with how to make it go through your servers (and not the third party folks we use now), Not being cruel or racist here, but your over the phone "support techs" are about horrible & I cannot understand them or work with any of them, so I would definitely need someone who speaks English and can understand the nuances of programming these forms, to please contact me back. (Sorry, but both those attributes will be required to be able to help me, so, no "newbie-interns" or first week trainees are gonna cut it).... If you have anyone who fits the bill on those items and would be willing to help us, please contact me back at your earliest convenience. If we have to communicate here, I will do that & I can submit whatever we need to & to whoever we need to.
    I need to get this right and working for the majority of my users and on any platform and OS.
    You may certainly call me to talk about this, and I have given my number numerous times to your (expletive deleted) time wasting - recording message thingy. So, If it's not available look it up under [email protected]
    (and you will probably get right to me, unlike my and I'm sure most other folks',  "Adobe phone-in experiences")
    Thank You,
    Michael Corman
    VinylCouture
    Phenix City, Alabama  36869

    Well, thanks for writing back...just so you know...I started using Adobe products in 1987, ...yeah...back then...like Illustrator 1 & 9" B&W Macs ...John Warnock's Helvetica's....stuff like that...8.5 x 11 LaserWriters...all that good stuff...I still have some of it working on a mac...much of it was stuff I bought. some stuff I did not...I'm not a big fan of this "cloud" thing Adobe has foisted upon the creatives of the world...which I'm sure you can tell...but the functionality and usefulness of your software can not be disputed, so feel free to do whatever we will continue to pay for, ...I am very impressed with CC PS on the 64 bit PC and perhaps I will end up paying you the stipend that you demand for the other services.
    So  I guess that brings us to our problem.. a few years back and at the height of the recession and near bankruptcy myself,  I was damn lucky and hit on something and began a small arts and crafts supply service to sell my products online to a very "niche market" ...I had a unique product and still sell that product (plus others) online...My website is www.vinylcouture.com...Strange? Yes...but there is a market it seems, for everything now, and this is the market I service...Catagorically, these are 99%+ women that use these "adhesive, sticky backed vinyl products"  to make different "craft items" that are just way too various and numerous to go into... generally older women, women who are computer illiterate for the most part...and all this is irrelevant to my problem, but I want you to have every bit of background on this and especially the demographic we are dealing with, so we can get right to the meat of the problem.
    OK...So about two years ago, I decided to offer a "plain sheet" product of a plain colored "stick back" vinyl... it is available in multiple quantities of packs ( like 5 pieces, 10 pieces, 15 pieces, in a packi  & so on)...and if you are still on my site.. go to any  "GO RIGHT TO OUR ORDER PAGE"  button, scroll down a little...and then to the "PLAIN VINYL" section...you will see the Weebly website order process.) You can back out from here, I think,..but, anyway this product is available in 63 colors + or - a few. So then the problem is,  how do they select their individual colors within that (whatever) pack?... .
    So my initial idea was to enable a "selection form" for these "colors" that would be transmitted to me via email as 'part" of the "order process".. We tried getting our customers to submit a  " a list" ( something my competitiors still do, lol, poor bastards)......but that..is just unbelievable..I can't even begin to tell you what a freakin' nightmare that was...these people cannot even count to 10, much less any higher... figuring out what colors to list and send me... well, lets just say, it wasn't working......I had to figure out a better way...Something had to be done.
    So after thinking this all out,  and yeah...due to my total ignorance, i figured that we could make a form with Live Cycle Designer (Now Forms Central)...(back then something that was bundled with Adobe Acrobat Pro), I believe, and thats what this thing was authored in... and it would be all good...LOL!
    Well not so simple...as you well know, Adobe Acrobat would NOT LET YOU EMAIL anything from itself.....it just wouldn't work (and I know why, and all that hooey), but not being one to take NO for answer,.I started looking for a way to make my little gizmo work.. So I found this company that said they can "hijack" (re-direct actually) the request to email, bypass the wah-wah, and re-transmit it to the proper parties.....for less than $100 a year,  I think...its called http://pdf-fillableforms.com/.
    A nice gentleman named Joseph Silva helped us program the thing to go to his servers and back out. Please dont hassle them...I need them...for now..it basically does work...try it...you should get back a copy of the form that you filled out...good luck however,  if you're on MAC OSX or similar...
    I have included a copy of both of our forms (and feel free to fill it out and play with it)...just put test somewhere on it...(and you must include YOUR email or it will balk)..they are supposed to be mostly identical, except one seems to be twice as large....generating a 1.7 meg file upon submission, while the other one only generates a 600K file or so...thats another issue for another day or maybe you can advise on that also...
    OK so far so good......In our shop, once Grandma buys a 10 pack (or whatever), Only then she gets to the link on her receipt page ro the relevant "selection form" ,(this prevents "Filling and Sending"  with "no order" and "no payment", another early problem we had)... which they can click on and it will usually download and open up on their device if all goes well...Then our little form is supposed to be fillable and is supposed to ADD UP all the quantities, so grandma knows how many she is buying and so forth right on the fly,  and even while she changes her mind..., and IT'S LARGE so grandma can see it, and then it TOTALS it all up for them, ( cause remember, they can NOT add)..,  except there is a programming bug (mouse-click should be a mouse-up probably or something..) which makes you click in the blank spaces to get to a correct TOTAL...about 70-80% of our customers can enable all these features and usually the process completes without problems for them especially on PC's running Windows OS and Acrobat Reader X or XI...at least for most... Unfortunately it is still not the "seamless process" I would like or had envisioned for the other folks out there that do have trouble using our form....  Many folks report to us the following issues that we know of.  First of all it takes too much time to load up...We know its HUGE...is there anyway that you can see, to streamline this thing? I would love for it to be more compact...this really helps on the phones and pads as I'm sure you well know.
    Some just tell us,"it WON'T work"....I believe this is because they are totally out of it and dont even have Adobe Reader on their machine, & don't know how to get it ( yes, we provide the links).....or it's some ancient version....no one can stop this one...
    It almost always generates some kind ( at least one time)  of "error message" which we do warn them about..., telling one,  basically that "Acrobat doesnt even like this happening at all, and it could be detrimental to ones computer files", blah-blah...(this freaks grandma out really bad)...& usually they end up not even trying to send it...  and then I get calls that even you wouldn't believe...& If they DO nut up and push the Red "Submit Form" button, it will usually send the thing to us (and also back to them at the "required email address" they furnished on the form, thats what the folks at the "fillable forms place" do) so, if it's performing it's functions, why it is having to complain?. What are we doing wrong?....and how can I fix it?...Will re-compiling it or saving it as a newer version of "FormsCentral" correct any of these problems ?
    Ok, so that should keep you busy for a minute and we can start out with those problems...but the next thing is, how can I take advantage of YOUR re-direct & hosting services?, And will it get rid of the error messages, and the slowness, and the iOS incompatibilities ? (amazingly,  the last iOS Reader version worked almost OK.. but the newest version doesnt seem to work with my form on my iphone4)  If it will enable any version of the iOS to send my form correctly and more transparently, then it might be worth the money...$14.95 a MONTH you say. hmmmmm...Better be good.
    Another problem is, that I really don't need 5000 forms a month submitted. I think its like 70-100 or less....Got any plans for that?  Maybe I'm just not BIG ENOUGH to use Adobe's services, however in this case, I really don't care whose I do use as long as the product works most correctly for my customers as well as us. Like I said, If I'm doing the best I can, I won't change anything, and still use the other third party, If Adobe has a better solution, then i'm all for that as well. In the meantime, Thanks for any help you can provide on this...
    Michael Corman
    VinylCouture.com
    (706) 326-7911

  • If i reset my ipad can i install paye games for free if i sign back into my apple ID. Please i need help because i need to update my games but i need to put in this billing thing and i want to get rid of it so then i cant buy games with my credit card

    If i reset my ipad can i install paye games for free if i sign back into my apple ID. Please i need help because i need to update my games but i need to put in this billing thing and i want to get rid of it so then i cant buy games with my credit card

    Hello,
    As frustrating as it seems, your best to post any frustrations about the iPhone in the  iPhone discussion here:
    https://discussions.apple.com/community/iphone/using_iphone
    As this discussion is for iBook laptops.
    Best of Luck.

  • Need help to create report with jpeg/gif image

    Hello,
    I need help with creating a form with a special jpeg/gif seal. I never done this Java. Until now, I created all forms with ansi C++ with HP escape characters to draw lines, boxs, and text. This form will contain boxes which is populated with database information read from a text file.
    Since this form contains a special seal on the upper right, I don't think it can be done with old fashion ansi C++. How can I create a form with Java and create it as a simple exe to just print the form to a specified printer.
    Thanks,
    John

    Hi,
    I am creating a form with boxes (lines and text). What is special about this form is that it has an image jpeg or gif at the top right corner. Is is a state department seal. Up to this form, I had used ansi C++ and print out escape HP character to print out the lines, boxes, and text. I have no idea how to print out the image. I am new to JAVA and only 1 class in it. Is there sample code out there to create this type of form with the image? I need a starting point.
    Thanks,
    John

  • Need help to draw a graph from the output I get with my program please

    Hi all,
    I please need help with this program, I need to display the amount of money over the years (which the user has to enter via the textfields supplied)
    on a graph, I'm not sure what to do further with my program, but I have created a test with a System.out.println() method just to see if I get the correct output and it looks fine.
    My question is, how do I get the input that was entered by the user (the initial deposit amount as well as the number of years) and using these to draw up the graph? (I used a button for the user to click after he/she has entered both the deposit and year values to draw the graph but I don't know how to get this to work?)
    Please help me.
    The output that I got looked liked this: (just for a test!) - basically this kind of output must be shown on the graph...
    The initial deposit made was: 200.0
    After year: 1        Amount is:  210.00
    After year: 2        Amount is:  220.50
    After year: 3        Amount is:  231.53
    After year: 4        Amount is:  243.10
    After year: 5        Amount is:  255.26
    After year: 6        Amount is:  268.02
    After year: 7        Amount is:  281.42
    After year: 8        Amount is:  295.49
    After year: 9        Amount is:  310.27
    After year: 10        Amount is:  325.78
    After year: 11        Amount is:  342.07
    After year: 12        Amount is:  359.17
    After year: 13        Amount is:  377.13
    After year: 14        Amount is:  395.99
    After year: 15        Amount is:  415.79
    After year: 16        Amount is:  436.57
    After year: 17        Amount is:  458.40And here is my code that Iv'e done so far:
    import javax.swing.*;
    import java.awt.Color;
    import java.awt.Graphics;
    import java.awt.Graphics2D;
    import java.awt.RenderingHints;
    import java.awt.event.ActionEvent;
    import java.awt.event.ActionListener;
    import java.lang.Math;
    import java.text.DecimalFormat;
    public class CompoundInterestProgram extends JFrame implements ActionListener {
        JLabel amountLabel = new JLabel("Please enter the initial deposit amount:");
        JTextField amountText = new JTextField(5);
        JLabel yearsLabel = new JLabel("Please enter the numbers of years:");
        JTextField yearstext = new JTextField(5);
        JButton drawButton = new JButton("Draw Graph");
        public CompoundInterestProgram() {
            super("Compound Interest Program");
            setSize(500, 500);
            setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
            amountText.addActionListener(this);
            yearstext.addActionListener(this);
            JPanel panel = new JPanel();
            panel.setBackground(Color.white);
            panel.add(amountLabel);
            amountLabel.setToolTipText("Range of deposit must be 20 - 200!");
            panel.add(amountText);
            panel.add(yearsLabel);
            yearsLabel.setToolTipText("Range of years must be 1 - 25!");
            panel.add(yearstext);
            panel.add(drawButton);
            add(panel);
            setVisible(true);
            public static void main(String[] args) {
                 DecimalFormat dec2 = new DecimalFormat( "0.00" );
                CompoundInterestProgram cip1 = new CompoundInterestProgram();
                JFrame f = new JFrame();
                f.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
                f.getContentPane().add(new GraphPanel());
                f.setSize(500, 500);
                f.setLocation(200,200);
                f.setVisible(true);
                Account a = new Account(200);
                System.out.println("The initial deposit made was: " + a.getBalance() + "\n");
                for (int year = 1; year <= 17; year++) {
                      System.out.println("After year: " + year + "   \t" + "Amount is:  " + dec2.format(a.getBalance() + a.calcInterest(year)));
              @Override
              public void actionPerformed(ActionEvent arg0) {
                   // TODO Auto-generated method stub
    class Account {
        double balance = 0;
        double interest = 0.05;
        public Account() {
             balance = 0;
             interest = 0.05;
        public Account(int deposit) {
             balance = deposit;
             interest = 0.05;
        public double calcInterest(int year) {
               return  balance * Math.pow((1 + interest), year) - balance;
        public double getBalance() {
              return balance;
    class GraphPanel extends JPanel {
        public GraphPanel() {
        public void paintComponent(Graphics g) {
            Graphics2D g2 = (Graphics2D)g;
            g2.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON);
            g2.setColor(Color.red);
    }Your help would be much appreciated.
    Thanks in advance.

    watertownjordan wrote:
    http://www.jgraph.com/jgraph.html
    The above is also good.Sorry but you need to look a bit more closely at URLs that you cite. What the OP wants is a chart (as in X against Y) not a graph (as in links and nodes) . 'jgraph' deals with links and nodes.
    The best free charting library that I know of is JFreeChart from www.jfree.org.

  • Need help with INSERT and WITH clause

    I wrote sql statement which correctly work, but how i use this statment with INSERT query? NEED HELP. when i wrote insert i see error "ORA 32034: unsupported use of with clause"
    with t1 as(
    select a.budat,a.monat as period,b.vtweg,
    c.gjahr,c.buzei,c.shkzg,c.hkont, c.prctr,
    c.wrbtr,
    c.matnr,
    c.menge,
    a.monat,
    c.zuonr
    from ldw_v1.BKPF a,ldw_v1.vbrk b, ldw_v1.bseg c
    where a.AWTYP='VBRK' and a.BLART='RV' and a.BUKRS='8431' and a.awkey=b.vbeln
    and a.bukrs=c.bukrs and a.belnr=c.belnr and a.gjahr=c.gjahr and c.koart='D'
    and c.ktosl is null and c.gsber='4466' and a.gjahr>='2011' and b.vtweg='01'
    ,t2 as(
    select a.BUKRS,a.BELNR, a.GJAHR,t1.vtweg,t1.budat,t1.monat from t1, ldw_v1.bkpf a
    where t1.zuonr=a.xblnr and a.blart='WL' and bukrs='8431'
    ,tcogs as (
    select t2.budat,t2.monat,t2.vtweg, bseg.gjahr,bseg.hkont,bseg.prctr,
    sum(bseg.wrbtr) as COGS,bseg.matnr,bseg.kunnr,sum(bseg.menge) as QUANTITY
    from t2, ldw_v1.bseg
    where t2.bukrs=bseg.bukrs and t2.belnr=bseg.BELNR and t2.gjahr=bseg.gjahr and BSEG.KOART='S'
    group by t2.budat,t2.monat,t2.vtweg, bseg.gjahr,bseg.hkont,bseg.prctr,
    bseg.matnr,bseg.kunnr
    ,t3 as
    select a.budat,a.monat,b.vtweg,
    c.gjahr,c.buzei,c.shkzg,c.hkont, c.prctr,
    case when c.shkzg='S' then c.wrbtr*(-1)
    else c.wrbtr end as NTS,
    c.matnr,c.kunnr,
    c.menge*(-1) as Quantity
    from ldw_v1.BKPF a,ldw_v1.vbrk b, ldw_v1.bseg c
    where a.AWTYP='VBRK' and a.BLART='RV' and a.BUKRS='8431' and a.awkey=b.vbeln
    and a.bukrs=c.bukrs and a.belnr=c.belnr and a.gjahr=c.gjahr and c.koart='S'
    and c.ktosl is null and c.gsber='4466' and a.gjahr>='2011' and b.vtweg='01'
    ,trevenue as (
    select t3.budat,t3.monat,t3.vtweg, t3.gjahr,t3.hkont,t3.prctr,
    sum(t3.NTS) as NTS,t3.matnr,t3.kunnr,sum(t3.QUANTITY) as QUANTITY
    from t3
    group by t3.budat,t3.monat,t3.vtweg, t3.gjahr,t3.hkont,t3.prctr,t3.matnr,t3.kunnr
    select NVL(tr.budat,tc.budat) as budat,
    NVL(tr.monat,tc.monat) as monat,
    NVL(tr.vtweg,tc.vtweg) as vtweg,
    NVL(tr.gjahr, tc.gjahr) as gjahr,
    tr.hkont as NTS_hkont,
    tc.hkont as COGS_hkont,
    NVL(tr.prctr,tc.prctr) as prctr,
    NVL(tr.MATNR, tc.MATNR) as matnr,
    NVL(tr.kunnr, tc.kunnr) as kunnr,
    NVL(tr.Quantity, tc.Quantity) as Quantity,
    tr.NTS as NTS,
    tc.COGS as COGS
    from trevenue TR full outer join tcogs TC
    on TR.BUDAT=TC.BUDAT and TR.MONAT=TC.MONAT and TR.GJAHR=TC.GJAHR
    and TR.MATNR=TC.MATNR and TR.KUNNR=TC.KUNNR and TR.QUANTITY=TC.QUANTITY
    and TR.VTWEG=TC.VTWEG and TR.PRCTR=TC.PRCTR
    Edited by: user13566113 on 25.03.2011 5:26

    Without seeing what you tried it is hard to say what you did wrong, but this is how it would work
    SQL> create table t ( n number );
    Table created.
    SQL> insert into t
      2  with test_data as
      3    (select 1 x from dual union all
      4     select 2 x from dual union all
      5     select 3 x from dual union all
      6     select 4 x from dual)
      7  select x from test_data;
    4 rows created.
    SQL>

  • Need help with JTextArea and Scrolling

    import java.awt.*;
    import java.awt.event.*;
    import java.text.DecimalFormat;
    import javax.swing.*;
    public class MORT_RETRY extends JFrame implements ActionListener
    private JPanel keypad;
    private JPanel buttons;
    private JTextField lcdLoanAmt;
    private JTextField lcdInterestRate;
    private JTextField lcdTerm;
    private JTextField lcdMonthlyPmt;
    private JTextArea displayArea;
    private JButton CalculateBtn;
    private JButton ClrBtn;
    private JButton CloseBtn;
    private JButton Amortize;
    private JScrollPane scroll;
    private DecimalFormat calcPattern = new DecimalFormat("$###,###.00");
    private String[] rateTerm = {"", "7years @ 5.35%", "15years @ 5.5%", "30years @ 5.75%"};
    private JComboBox rateTermList;
    double interest[] = {5.35, 5.5, 5.75};
    int term[] = {7, 15, 30};
    double balance, interestAmt, monthlyInterest, monthlyPayment, monPmtInt, monPmtPrin;
    int termInMonths, month, termLoop, monthLoop;
    public MORT_RETRY()
    Container pane = getContentPane();
    lcdLoanAmt = new JTextField();
    lcdMonthlyPmt = new JTextField();
    displayArea = new JTextArea();//DEFINE COMBOBOX AND SCROLL
    rateTermList = new JComboBox(rateTerm);
    scroll = new JScrollPane(displayArea);
    scroll.setSize(600,170);
    scroll.setLocation(150,270);//DEFINE BUTTONS
    CalculateBtn = new JButton("Calculate");
    ClrBtn = new JButton("Clear Fields");
    CloseBtn = new JButton("Close");
    Amortize = new JButton("Amortize");//DEFINE PANEL(S)
    keypad = new JPanel();
    buttons = new JPanel();//DEFINE KEYPAD PANEL LAYOUT
    keypad.setLayout(new GridLayout( 4, 2, 5, 5));//SET CONTROLS ON KEYPAD PANEL
    keypad.add(new JLabel("Loan Amount$ : "));
    keypad.add(lcdLoanAmt);
    keypad.add(new JLabel("Term of loan and Interest Rate: "));
    keypad.add(rateTermList);
    keypad.add(new JLabel("Monthly Payment : "));
    keypad.add(lcdMonthlyPmt);
    lcdMonthlyPmt.setEditable(false);
    keypad.add(new JLabel("Amortize Table:"));
    keypad.add(displayArea);
    displayArea.setEditable(false);//DEFINE BUTTONS PANEL LAYOUT
    buttons.setLayout(new GridLayout( 1, 3, 5, 5));//SET CONTROLS ON BUTTONS PANEL
    buttons.add(CalculateBtn);
    buttons.add(Amortize);
    buttons.add(ClrBtn);
    buttons.add(CloseBtn);//ADD ACTION LISTENER
    CalculateBtn.addActionListener(this);
    ClrBtn.addActionListener(this);
    CloseBtn.addActionListener(this);
    Amortize.addActionListener(this);
    rateTermList.addActionListener(this);//ADD PANELS
    pane.add(keypad, BorderLayout.NORTH);
    pane.add(buttons, BorderLayout.SOUTH);
    pane.add(scroll, BorderLayout.CENTER);
    addWindowListener( new WindowAdapter()
    public void windowClosing(WindowEvent e)
    System.exit(0);
    public void actionPerformed(ActionEvent e)
    String arg = lcdLoanAmt.getText();
    int combined = Integer.parseInt(arg);
    if (e.getSource() == CalculateBtn)
    try
    JOptionPane.showMessageDialog(null, "Got try here", "Error", JOptionPane.ERROR_MESSAGE);
    catch(NumberFormatException ev)
    JOptionPane.showMessageDialog(null, "Got here", "Error", JOptionPane.ERROR_MESSAGE);
    if ((e.getSource() == CalculateBtn) && (arg != null))
    try{
    if ((e.getSource() == CalculateBtn) && (rateTermList.getSelectedIndex() == 1))
    monthlyInterest = interest[0] / (12 * 100);
    termInMonths = term[0] * 12;
    monthlyPayment = combined * (monthlyInterest / (1 - (Math.pow (1 + monthlyInterest,  -termInMonths))));
    lcdMonthlyPmt.setText(calcPattern.format(monthlyPayment));
    if ((e.getSource() == CalculateBtn) && (rateTermList.getSelectedIndex() == 2))
    monthlyInterest = interest[1] / (12 * 100);
    termInMonths = term[1] * 12;
    monthlyPayment = combined * (monthlyInterest / (1 - (Math.pow (1 + monthlyInterest,  -termInMonths))));
    lcdMonthlyPmt.setText(calcPattern.format(monthlyPayment));
    if ((e.getSource() == CalculateBtn) && (rateTermList.getSelectedIndex() == 3))
    monthlyInterest = interest[2] / (12 * 100);
    termInMonths = term[2] * 12;
    monthlyPayment = combined * (monthlyInterest / (1 - (Math.pow (1 + monthlyInterest,  -termInMonths))));
    lcdMonthlyPmt.setText(calcPattern.format(monthlyPayment));
    catch(NumberFormatException ev)
    JOptionPane.showMessageDialog(null, "Invalid Entry!\nPlease Try Again", "Error", JOptionPane.ERROR_MESSAGE);
    }                    //IF STATEMENTS FOR AMORTIZATION
    if ((e.getSource() == Amortize) && (rateTermList.getSelectedIndex() == 1))
    loopy(7, 5.35);
    if ((e.getSource() == Amortize) && (rateTermList.getSelectedIndex() == 2))
    loopy(15, 5.5);
    if ((e.getSource() == Amortize) && (rateTermList.getSelectedIndex() == 3))
    loopy(30, 5.75);
    if (e.getSource() == ClrBtn)
    rateTermList.setSelectedIndex(0);
    lcdLoanAmt.setText(null);
    lcdMonthlyPmt.setText(null);
    displayArea.setText(null);
    if (e.getSource() == CloseBtn)
    System.exit(0);
    private void loopy(int lTerm,double lInterest)
    double total, monthly, monthlyrate, monthint, monthprin, balance, lastint, paid;
    int amount, months, termloop, monthloop;
    String lcd2 = lcdLoanAmt.getText();
    amount = Integer.parseInt(lcd2);
    termloop = 1;
    paid = 0.00;
    monthlyrate = lInterest / (12 * 100);
    months = lTerm * 12;
    monthly = amount *(monthlyrate/(1-Math.pow(1+monthlyrate,-months)));
    total = months * monthly;
    balance = amount;
    while (termloop <= lTerm)
    displayArea.setCaretPosition(0);
    displayArea.append("\n");
    displayArea.append("Year " + termloop + " of " + lTerm + ": payments\n");
    displayArea.append("\n");
    displayArea.append("Month\tMonthly\tPrinciple\tInterest\tBalance\n");
    monthloop = 1;
    while (monthloop <= 12)
    monthint = balance * monthlyrate;
    monthprin = monthly - monthint;
    balance -= monthprin;
    paid += monthly;
    displayArea.setCaretPosition(0);
    displayArea.append(monthloop + "\t" + calcPattern.format(monthly) + "\t" + calcPattern.format(monthprin) + "\t");
    displayArea.append(calcPattern.format(monthint) + "\t" + calcPattern.format(balance) + "\n");
    monthloop ++;
    termloop ++;
    public static void main(String args[])
    MORT_RETRY f = new MORT_RETRY();
    f.setTitle("MORTGAGE PAYMENT CALCULATOR");
    f.setBounds(600, 600, 500, 500);
    f.setLocationRelativeTo(null);
    f.setVisible(true);
    }need help with displaying the textarea correctly and the scroll bar please.
    Message was edited by:
    new2this2020

    What's the problem you're having ???
    PS.

  • Need help with trim and null function

    Hi all,
    I need help with a query. I use the trim function to get the first three characters of a string. How do I write my query so if a null value occurs in combination with my trim to say 'Null' in my results?
    Thanks

    Hi,
    Thanks for the reply. What am I doing wrong?
    SELECT trim(SUBSTR(AL1.user_data_text,1,3)),NVL
    (AL1.user_data_text,'XX')
    FROM Table
    I want the XX to appear in the same column as the
    trim.The main thing you're doing wrong is not formatting your code. The solution may become obvious if you do.
    What you're saying is:
    SELECT  trim ( SUBSTR (AL1.user_data_text, 1, 3))
    ,       NVL ( AL1.user_data_text, 'XX' )
    FROM    Tablewhich makes it clear that you're SELECTing two columns, when you only want to have one.
    If you want that column to be exactly like the first column you're currently SELECTing, except that when that column is NULL you want it to be 'XX', then you have to apply NVL to that column, like this:
    SELECT  NVL ( trim ( SUBSTR (AL1.user_data_text, 1, 3))
                , 'XX'
    FROM    Table

  • Newbie needs help with Flex app

    Hi there. I am very new to Flex and also fairly new to
    programming although I do have a little experience.
    I am trying to create an app which stores code snippets or
    common text I tend to use every day in my documents and emails.
    So basically I need help on a design level. I can refer to
    the developer's manual for exact instructions for commands, but I
    need to know what to code first.
    The app will consist of:
    -a tree directory structure where I can create groups.
    -There will be a basic text editor where I input all my data,
    basic text formatting options (font, bullets etc) would be a bonus.
    -A search function
    -Finally it will ideally allow multiple client apps write to
    a central database file over a network
    Can anyone suggest how I should approach such a project?
    Or are there any tutorials / source files which demonstrate
    each bullet point?
    thanks.

    Hey jono,
    I'm new too. But I think I might know the right components.
    If you google any of these + flex 3 you should get some
    decent documentation
    tree - advanced dataGrid component
    basic text editor - rich text editor component
    search function - well, you're gonna need to read up on
    arrays, and arraycollection. Once you get that stuff working, you
    can write up a function to search for a string in an array.
    network functionality - HTTPService, you can dump the
    datagrid into a database, and have it load the database when you
    open up the application.
    Give these things a shot, tutorials / sources will come with
    the google searches.

  • Need help with an assignment

    first of all, who has heard of the game called zuul? It is a very boring text based game I am currently having the pleasure of improving.
    Basically, you are in a room, that is connected to a bunch of other rooms and depending on the room you are in, you have different exists and different items in the room.
    The goal is to navigate through the collection of Rooms and there is no real win condition, It is more for learning then for actually playing.
    You navigate by a series of commands such as: go (direction)( as in "direction of exit", NSEW), quit, a few other odd bits.
    ex: go south, quit, go west etc
    The game has several classes: Game, Command, CommandWords, Item, Parser, Room.
    Obviously Game is the main central head conch, (it is not the super class.)
    Game makes use of Item, Room, Parser, and Command.
    Item is the class that deals with the number of items in the Room.
    Room is the class that deals with the rooms the player will navigate to and from.
    Command reads in the commands such as "go-(direction)" or "quit".
    Parser makes everybody understand each other by using both Command and CommandWords.
    CommandWords is a list of commands such as "go", "quit" etc.
    The problem I am having right now is to allow a player to move through the rooms while holding a certain item. The item has to come from the rooms and the player should be able to drop it.
    So I have to add two new commands: take and drop. The problem is that I have been asked to do this without creating a new class. Otherwise I would have just created class Player and be done with it. So I am trying to figure out whose responsibility should it be to take care of the take and drop command. I have done some preliminary work in class Game, it is the take(Command command) and drop() methods.
    I have also a few questions concerning other aspects of the project, I have listed their locations here:
    1. The take() method in class Game, the for-each loop, a complier error with ArrayList
    2. class Parser, a general question about the string tokenzier
    If you want to see how the game is suppose to run, just comment out the bodies of take() and drop(). Not the declaration. Everything else works.
    I shall now provide the code to all classes. I wish there were an option to upload a zip file, then you don't have to read through all the codes and copy&paste all the codes. The complier I am using is BlueJ. And the SDK version is 1.6. With the exception of class Game, everything else can be assumed to be error free.
    Thank you for your time,
    Davy
    class Game
    import java.util.*;
    *  This class is the main class of the "World of Zuul" application.
    *  "World of Zuul" is a very simple, text based adventure game.  Users
    *  can walk around some scenery. That's all. It should really be extended
    *  to make it more interesting!
    *  To play this game, create an instance of this class and call the "play"
    *  method.
    *  This main class creates and initialises all the others: it creates all
    *  rooms, creates the parser and starts the game.  It also evaluates and
    *  executes the commands that the parser returns.
    * @author  Michael Kolling and David J. Barnes
    * @version 2006.03.30
    public class Game
        private Parser parser;
        private Room currentRoom;
        private Room previousRoom;
        private Stack<Room> previousRooms;
         * Create the game and initialise its internal map.
        public Game()
            createRooms();
            parser = new Parser();
         * Create all the rooms and link their exits together.
        private void createRooms()
            Room outside, theatre, pub, lab, office;
            // create the rooms
            outside = new Room("outside the main entrance of the university");
            theatre = new Room("in a lecture theatre");
            pub = new Room("in the campus pub");
            lab = new Room("in a computing lab");
            office = new Room("in the computing admin office");
            // create some items
            Item desk, chair, beer, podium, tree;
            desk = new Item("desk", "student desk",10);
            chair = new Item("chair", "student chair",5);
            beer = new Item("beer", "glass of beer", 0.5);
            podium = new Item("podium", "lecture podium", 100);
            tree = new Item("tree", "a tree", 500.5);
            // put items in some of the rooms
            outside.addItem(tree);
            theatre.addItem(desk);
            theatre.addItem(chair);
            theatre.addItem(podium);
            pub.addItem(beer);
            pub.addItem(beer);
            office.addItem(desk);
            lab.addItem(chair);
            lab.addItem(beer);
            // initialise room exits
            outside.setExit("east", theatre);
            outside.setExit("south", lab);
            outside.setExit("west", pub);
            theatre.setExit("west", outside);
            pub.setExit("east", outside);
            lab.setExit("north", outside);
            lab.setExit("east", office);
            office.setExit("west", lab);
            currentRoom = outside;  // start game outside
            previousRooms = new Stack<Room>(); // no rooms on the stack
            previousRoom = null;
         *  Main play routine.  Loops until end of play.
        public void play()
            printWelcome();
            // Enter the main command loop.  Here we repeatedly read commands and
            // execute them until the game is over.
            boolean finished = false;
            while (! finished) {
                Command command = parser.getCommand();
                finished = processCommand(command);
            System.out.println("Thank you for playing.  Good bye.");
         * Print out the opening message for the player.
        private void printWelcome()
            System.out.println();
            System.out.println("Welcome to the World of Zuul!");
            System.out.println("World of Zuul is a new, incredibly boring adventure game.");
            System.out.println("Type 'help' if you need help.");
            System.out.println();
            System.out.println(currentRoom.getLongDescription());
         * Given a command, process (that is: execute) the command.
         * @param command The command to be processed.
         * @return true If the command ends the game, false otherwise.
        private boolean processCommand(Command command)
            boolean wantToQuit = false;
            if(command.isUnknown()) {
                System.out.println("I don't know what you mean...");
                return false;
            String commandWord = command.getCommandWord();
            if (commandWord.equals("help")) {
                printHelp();
            else if (commandWord.equals("go")) {
                goRoom(command);
            else if (commandWord.equals("look")) {
                look(command);
            else if (commandWord.equals("eat")) {
                eat(command);
            else if (commandWord.equals("back")) {
                back(command);
            else if (commandWord.equals("stackBack")) {
                stackBack(command);
            else if (commandWord.equals("take")){
                take(command);
            else if (commandWord.equals("drop")) {
                drop(command);
            else if (commandWord.equals("quit")) {
                wantToQuit = quit(command);
            // else command not recognised.
            return wantToQuit;
        // implementations of user commands:
         * Print out some help information.
         * Here we print some stupid, cryptic message and a list of the
         * command words.
        private void printHelp()
            System.out.println("You are lost. You are alone. You wander");
            System.out.println("around at the university.");
            System.out.println();
            System.out.println("Your command words are:");
            System.out.println(parser.getCommands());
         * Try to go to one direction. If there is an exit, enter the new
         * room, otherwise print an error message.
         * @param command The command entered.
        private void goRoom(Command command)
            if(!command.hasSecondWord()) {
                // if there is no second word, we don't know where to go...
                System.out.println("Go where?");
                return;
            String direction = command.getSecondWord();
            // Try to leave current room.
            Room nextRoom = currentRoom.getExit(direction);
            if (nextRoom == null) {
                System.out.println("There is no door!");
            else {
                previousRooms.push(currentRoom);
                previousRoom = currentRoom;
                currentRoom = nextRoom;
                System.out.println(currentRoom.getLongDescription());
         * "Look" was entered.
         * @param command The command entered.
        private void look(Command command)
            if(command.hasSecondWord()) {
                System.out.println("Look what?");
                return;
            System.out.println(currentRoom.getLongDescription());
         * "Eat" was entered.
         * @param command The command entered.
        private void eat(Command command)
            if(command.hasSecondWord()) {
                System.out.println("Eat what?");
                return;
            System.out.println("You have eaten and are no longer hungry!");
         * "Back" was entered.
         * @param command The command entered.
        private void back(Command command)
            if(command.hasSecondWord()) {
                System.out.println("Back what?");
                return;
            if (previousRoom==null) {
                System.out.println("Can't go back.");
                return;
            // push current room on stack (for stackBack)
            previousRooms.push(currentRoom);
            // swap current and previous rooms (for back)
            Room temp = currentRoom;
            currentRoom = previousRoom;
            previousRoom = temp;
            // You could replace the previous three lines with the following
            // which use the stack to get the previous room
            // but note that this makes "back" dependent on "stackBack".
            // (If you do it this way you no longer need "temp".
            // currentRoom = previousRoom;
            // previousRoom = previousRooms.peek();
            System.out.println("You have gone back:");
            System.out.println(currentRoom.getLongDescription());
         * "StackBack" was entered.
         * @param command The command entered.
        private void stackBack(Command command)
            if(command.hasSecondWord()) {
                System.out.println("StackBack what?");
                return;
            if (previousRooms.isEmpty()) {
                System.out.println("Can't go StackBack.");
                return;
            // set previous room (for "back")
            previousRoom = currentRoom;
            // set new current room (using stack)
            currentRoom = previousRooms.pop();
            System.out.println("You have gone StackBack:");
            System.out.println(currentRoom.getLongDescription());
         * allows a player to take something from the room
         * @param command
        private void take(Command command){
        String a;
        a=command.getSecondWord();
        for (Item i:currentRoom.items()) { //a for each loop, since the room's items are kept in a list, but this gives a                                           //compiler error, it doesn't work because items is an ArrayList, but I need a way to pick up the item. I thought that if //given the item's name, I could run a check through the room's ArrayList of items via a for-each loop
            if (a==i.getName()) {
            removeItem (i);
            return;
         * allows a player to drop an item in the room
         * @param command
        private void drop(Command command) {
            if(command.hasSecondWord()) {
                System.out.println("drop what?");
                return;
            //add item method is suppose to be used here
         * "Quit" was entered. Check the rest of the command to see
         * whether we really quit the game.
         * @param command The command entered.
         * @return true, if this command quits the game, false otherwise.
        private boolean quit(Command command)
            if(command.hasSecondWord()) {
                System.out.println("Quit what?");
                return false;
            else {
                return true;  // signal that we want to quit
    }class Room
    import java.util.*;
    * Class Room - a room in an adventure game.
    * This class is part of the "World of Zuul" application.
    * "World of Zuul" is a very simple, text based adventure game. 
    * A "Room" represents one location in the scenery of the game.  It is
    * connected to other rooms via exits.  For each existing exit, the room
    * stores a reference to the neighboring room.
    * @author  Michael Kolling and David J. Barnes
    * @version 2006.03.30
    * @author L.S. Marshall
    * @version 1.03 October 25, 2007
    public class Room
        private String description;
        private HashMap<String, Room> exits;        // stores exits of this room.
        // The items in the room
        private ArrayList<Item> items;
         * Create a room described "description". Initially, it has
         * no exits. "description" is something like "a kitchen" or
         * "an open court yard".
         * @param description The room's description.
        public Room(String description)
            this.description = description;
            exits = new HashMap<String, Room>();
            items = new ArrayList<Item>();
         * Define an exit from this room.
         * @param direction The direction of the exit.
         * @param neighbor  The room to which the exit leads.
        public void setExit(String direction, Room neighbor)
            exits.put(direction, neighbor);
         * Gives a short description of the room.
         * @return The short description of the room
         * (the one that was defined in the constructor).
        public String getShortDescription()
            return description;
         * Return a description of the items in the room
         * (Note that this could be combined with getLongDescription, but
         * this way shows better cohesion, and could avoid code duplication
         * for future enhancements.)
         * @return A description of the items in this room
        public String getItemsDescription()
            String s = new String();
            if (items.size()==0)
                s += "There are no items in this room.\n";
            else {
                s += "The item(s) in the room are:\n";
                for (Item item : items ) {
                   s += item.getInfo() + "\n";
            return s;
         * Return a description of the room in the form:
         *     You are in the kitchen.
         *     Exits: north west
         *     and information on the items in the room
         * @return A long description of this room
        public String getLongDescription()
            String s = "You are " + description + ".\n" + getExitString() + "\n";
            s += getItemsDescription();
            return s;
         * Return a string describing the room's exits, for example
         * "Exits: north west".
         * @return Details of the room's exits.
        private String getExitString()
            String returnString = "Exits:";
            Set<String> keys = exits.keySet();
            for(String exit : keys) {
                returnString += " " + exit;
            return returnString;
         * Return the room that is reached if we go from this room in direction
         * "direction". If there is no room in that direction, return null.
         * @param direction The exit's direction.
         * @return The room in the given direction.
        public Room getExit(String direction)
            return exits.get(direction);
         * Adds the given item to the room.
         * @param item The item to be added
        public void addItem(Item item)
            items.add(item);
         * Removes an item if the person picks it up
         * @param item the item to be removed
        public void removeItem (Item item)
            items.remove(item);
    }class Item
    * This represents an item in a room in zuul.
    * @author L.S. Marshall
    * @version 1.00 October 9, 2007
    public class Item
        // The description of the item
        private String description;
        // The weight of the item
        private double weight;
        private String name;
         * Constructor for objects of class Item
         * @param desc description of the item
         * @param weight the weight of the item
        public Item(String name, String desc, double weight)
            description = desc;
            this.weight = weight;
            this.name=name;
         * Returns a string representing this item
         * @return string representing this item
        public String getInfo()
            return ("Item: " + description + ", weighs " + weight + ".");
         * returns the name of the string
         * @ return the name in a string
        public String getName()
            return ( name );
    }class Command
    * This class is part of the "World of Zuul" application.
    * "World of Zuul" is a very simple, text based adventure game. 
    * This class holds information about a command that was issued by the user.
    * A command currently consists of two strings: a command word and a second
    * word (for example, if the command was "take map", then the two strings
    * obviously are "take" and "map").
    * The way this is used is: Commands are already checked for being valid
    * command words. If the user entered an invalid command (a word that is not
    * known) then the command word is <null>.
    * If the command had only one word, then the second word is <null>.
    * @author  Michael Kolling and David J. Barnes
    * @version 2006.03.30
    public class Command
        private String commandWord;
        private String secondWord;
         * Create a command object. First and second word must be supplied, but
         * either one (or both) can be null.
         * @param firstWord The first word of the command. Null if the command
         *                  was not recognised.
         * @param secondWord The second word of the command.
        public Command(String firstWord, String secondWord)
            commandWord = firstWord;
            this.secondWord = secondWord;
         * Return the command word (the first word) of this command. If the
         * command was not understood, the result is null.
         * @return The command word.
        public String getCommandWord()
            return commandWord;
         * @return The second word of this command. Returns null if there was no
         * second word.
        public String getSecondWord()
            return secondWord;
         * @return true if this command was not understood.
        public boolean isUnknown()
            return (commandWord == null);
         * @return true if the command has a second word.
        public boolean hasSecondWord()
            return (secondWord != null);
    }class Parser
    import java.util.Scanner;
    import java.util.StringTokenizer;
    //I read the documentation for String Tokenizer, and I have a few questions relating to a pet project of mine. The //project is to build a boolean algebra simplifer. I would give it a boolean expression and it will simplify it for me.
    //Which is very similar to what this class does. The documentation mentioned a delimiter for separating the tokens.
    //yet I see none here, is the delimiter at default, the space between the words? and if I were to set manually //delimiters, how do I do that?
    //Once I read in the string, should it be Parser's job to execute the boolean simplification part? According the RDD,
    //it shouldn't, but doing so would keep everything in fewer classes and therefore easier to manage, wouldn't it?
    * This class is part of the "World of Zuul" application.
    * "World of Zuul" is a very simple, text based adventure game. 
    * This parser reads user input and tries to interpret it as an "Adventure"
    * command. Every time it is called it reads a line from the terminal and
    * tries to interpret the line as a two word command. It returns the command
    * as an object of class Command.
    * The parser has a set of known command words. It checks user input against
    * the known commands, and if the input is not one of the known commands, it
    * returns a command object that is marked as an unknown command.
    * @author  Michael Kolling and David J. Barnes
    * @version 2006.03.30
    * @author L.S. Marshall
    * @version 1.01 October 9, 2007
    public class Parser
        private CommandWords commands;  // holds all valid command words
        private Scanner reader;         // source of command input
         * Create a parser to read from the terminal window.
        public Parser()
            commands = new CommandWords();
            reader = new Scanner(System.in);
         * Command returns the command typed by the user.
         * @return The next command from the user.
        public Command getCommand()
            String inputLine;   // will hold the full input line
            String word1 = null;
            String word2 = null;
            System.out.print("> ");     // print prompt
            inputLine = reader.nextLine();
            // Find up to two words on the line.
            Scanner tokenizer = new Scanner(inputLine);
            if(tokenizer.hasNext()) {
                word1 = tokenizer.next();      // get first word
                if(tokenizer.hasNext()) {
                    word2 = tokenizer.next();      // get second word
                    // note: we just ignore the rest of the input line.
            // Now check whether this word is known. If so, create a command
            // with it. If not, create a "null" command (for unknown command).
            if(commands.isCommand(word1)) {
                return new Command(word1, word2);
            else {
                return new Command(null, word2);
         * Returns a list of valid command words.
         * @string list of valid command words
        public String getCommands()
            return commands.getCommandList();
    }class CommandWords
    * This class is part of the "World of Zuul" application.
    * "World of Zuul" is a very simple, text based adventure game.
    * This class holds an enumeration of all command words known to the game.
    * It is used to recognise commands as they are typed in.
    * @author  Michael Kolling and David J. Barnes
    * @version 2006.03.30
    * @author L.S. Marshall
    * @version 1.01 October 9, 2007
    public class CommandWords
        // a constant array that holds all valid command words
        private static final String[] validCommands = {
            "go", "quit", "help", "look", "eat", "back", "stackBack",
            "take", "drop",
         * Constructor - initialise the command words.
        public CommandWords()
            // nothing to do at the moment...
         * Check whether a given String is a valid command word.
         * @param aString the command word
         * @return true if it is, false if it isn't.
        public boolean isCommand(String aString)
            for(int i = 0; i < validCommands.length; i++) {
                if(validCommands.equals(aString))
    return true;
    // if we get here, the string was not found in the commands
    return false;
    * Return a string containing all valid commands.
    * @return string of all valid commands
    public String getCommandList()
    String s="";
    for(String command: validCommands) {
    s += command + " ";
    return s;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            

    right, sorry, that was thoughtless of me.
    class Parser
    import java.util.Scanner;
    import java.util.StringTokenizer;
    //I read the documentation for String Tokenizer, and I have a few questions relating to a pet project of mine. The //project is to build a boolean algebra simplifer. I would give it a boolean expression and it will simplify it for me.
    //Which is very similar to what this class does. The documentation mentioned a delimiter for separating the tokens.
    //yet I see none here, is the delimiter at default, the space between the words? and if I were to set manually //delimiters, how do I do that?
    //Once I read in the string, should it be Parser's job to execute the boolean simplification part? According the RDD,
    //it shouldn't, but doing so would keep everything in fewer classes and therefore easier to manage, wouldn't it?
    * This class is part of the "World of Zuul" application.
    * "World of Zuul" is a very simple, text based adventure game. 
    * This parser reads user input and tries to interpret it as an "Adventure"
    * command. Every time it is called it reads a line from the terminal and
    * tries to interpret the line as a two word command. It returns the command
    * as an object of class Command.
    * The parser has a set of known command words. It checks user input against
    * the known commands, and if the input is not one of the known commands, it
    * returns a command object that is marked as an unknown command.
    * @author  Michael Kolling and David J. Barnes
    * @version 2006.03.30
    * @author L.S. Marshall
    * @version 1.01 October 9, 2007
    public class Parser
        private CommandWords commands;  // holds all valid command words
        private Scanner reader;         // source of command input
         * Create a parser to read from the terminal window.
        public Parser()
            commands = new CommandWords();
            reader = new Scanner(System.in);
         * Command returns the command typed by the user.
         * @return The next command from the user.
        public Command getCommand()
            String inputLine;   // will hold the full input line
            String word1 = null;
            String word2 = null;
            System.out.print("> ");     // print prompt
            inputLine = reader.nextLine();
            // Find up to two words on the line.
            Scanner tokenizer = new Scanner(inputLine);
            if(tokenizer.hasNext()) {
                word1 = tokenizer.next();      // get first word
                if(tokenizer.hasNext()) {
                    word2 = tokenizer.next();      // get second word
                    // note: we just ignore the rest of the input line.
            // Now check whether this word is known. If so, create a command
            // with it. If not, create a "null" command (for unknown command).
            if(commands.isCommand(word1)) {
                return new Command(word1, word2);
            else {
                return new Command(null, word2);
         * Returns a list of valid command words.
         * @string list of valid command words
        public String getCommands()
            return commands.getCommandList();
    }

  • Hi, I need help and advice. Basically me and my ex partner both had iphones and synced it with the same computer under the same ID. We split i have a new laptop and now it keeps asking for the old ID or it'll erase my apps bought on theold account.

    Hi, I need help and advice. Basically me and my ex partner both had iphones and synced it with the same computer under the same ID. We split up and now im trying to get all my apps and info onto my new laptop with a new account but it keeps asking me for the old apple ID which she is still using and she changed the password. i tried backing it up but still nohing. When i try to back up purchased items being apps etc its keeps asking for the old one. help

    See Recover your iTunes library from your iPod or iOS device. But you'll still need the password.
    Once you have the computer authorized to use the account she could change the password again to stop you buying apps on her card (assuming it's not on yours!). It would lock you out of upgrading them too but they should work unless she uses the deathorize all feature.
    It depends on how amicable the split is...
    tt2

  • I need help with resetting my ichat. When i try to login now it wont let me... it says "AOL Instant Messenger password" and then "iChat can't log in to ... because your login ID or password is incorrect. How do I reset this if I cant log in?

    I need help with resetting my ichat. When i try to login now it wont let me... it says "AOL Instant Messenger password" and then "iChat can't log in to ... because your login ID or password is incorrect. How do I reset this if I cant log in? When I try to press online the same thing pops up and I have no way of logging in or asking for help.

    Hi,
    iChat (it would help to know which version) can accept Apple IDs as valid AIM Screen Names.
    However if you have iChat 5 or earlier you cannot use ones ending in @me.com or @icloud.com issued by iCloud. (they can be used in iChat 6 or Messages as these versions make a double login to AIM and Apple to allow the use of the password).
    In addition if you are using an Apple ID for an AIM Screen Name the password still needs to keep to the 16 character limit that AIM has.
    AN @mac.com name can be used on any version of iChat  (Until the 30th June 2014)
    As it does not need a double check with Apple you can use it to log in to the AIM Web pages
    Login here with an AIM Name registered at AIM or and @mac.com name and see if you get any suspended account messages.
    Sometimes account can be suspended. Usually because something has triggered the "Unusual Activity" item.
    About a year ago many @mac.com users that travelled out of their own country found themselves suspended when they got home.
    If the Name checks out of if an Apple ID the password in known to be 16 characters or Less then do this:-
    In Lion upwards open a Finder Window and use the Go Menu whilst holding down the ALT key.
    Select the Library that appears in the menu list.
    Navigate to Preferences.
    (If you have version earlier than Lion the just navigate to ~/Library/Preferences (that's the Library in you Home - Little House icon - folder)
    Fnd com.apple.ichat.aim.plist (even if you are using Messages)
    Drag the file to the Trash and Restart the app.
    7:39 pm      Thursday; May 29, 2014
    ​  iMac 2.5Ghz i5 2011 (Mavericks 10.9)
     G4/1GhzDual MDD (Leopard 10.5.8)
     MacBookPro 2Gb (Snow Leopard 10.6.8)
     Mac OS X (10.6.8),
     Couple of iPhones and an iPad

  • Need help with Airport Express and so on.

    Ok so my main problem before getting into what I need help with here is that our MacBooks and now my iPhone 6 plus isn't staying online. Keep getting booted off and then I either have to select the network again or it will eventually go back on. If anyone has a solution or so please feel free to answer that as well. I'm running on Roadrunner with a Netgear 600 wireless router and a motorola modem. Both of which I'll leave the link to below for a better look.
    My Main Question: So I'm looking at a new wireless router mainly and possibly a new modem. I know Apple products are trustworthy but how good is the Airport Express and other Airport products. Also what is the Maximum speed and Maximum data speed for the cheapest express station and if anyone knows the speeds of the other devices it would be greatly appreciated.

    DSL Router to Netgear 5-port Switch and I used the switch to connect to Airport Extreme, TV, Blue-Ray DVD player and DirecTV Receiver.
    The AirPort Extreme base station (AEBS) is a router so it will do what you need.
    You need to reconfigure your setup. Connect the WAN port of the AEBS to the DSL router. Then connect the Netgear switch to one of the LAN ports on the AEBS. The AEBS will properly share the connection.

Maybe you are looking for

  • Is there a way to create user logins or some other way to ...

    Is there a way to create user logins or some other grouping for a set of applications to use (memory) resources optimally -- for example only mail and Safari and Word in one grouping and another for Safari and an audio recording application, etc.?

  • E3000 severe drop in speed from ethernet connection to wireless

    I have an E3000 connected to COMCAST. My download speed with an Ethernet connection to my computer (Windows 7) is just over 60Mbbs. When I connect to the internet using wireless only (computer adjacent to the router), my download speed drops 50% or m

  • My Time Capsule died today

    Beware of some Time Capsules actually being a time capsule and being buried for life. Mine just lost power and now wont ever turn back on and is now a big heavy paper weight.

  • How to link Muse PayPal widget securely to PayPal account?

    I am testing using the PayPal widget for a client. It is a one sell item. When I test it online it shows me a PayPal that isn't customized, I'd like for the linked paged to be more customized and securely linked to PayPal. How do I do this and still

  • Compression rates out of date

    Hello, We did an Online Backup in our system. The backup was a success with message: <b>BR0053I BRBACKUP completed successfully with warnings</b> Since there is a warning, i checked the log and found out about this message: <b>BR0083W Compression rat