Finally Rebuilding: Need Help

Hi guys
Now at last, after the obvious delay during the start of Euro2004, I'm rebuilding the computer!  I just want to do it right this time with connections and BIOS settings etc so I need some help.  If it crashes today after this test, it's off to the hardware store for a new psu.
(1) I have the BIOS that came as standard pre-installed in the retail boxed MSI motherboard.  I bought this in February or early March, can't recall.... I don't know what version it is ... do I need to upgrade?  I've never "flashed" anything before ... how do I do it?  Is it worth it?
(2) I'm connecting my two sata HDDs to the VIA controller ... not raid, just two separate drives.  When I F6 on the Windows XP installation, I insert the VIA drivers floppy that came with teh motherboard.  I install the following drivers:
       (a) VIA ATA driver for Windows XP
       (b) VIA SATA RAID driver for Windows XP
.... is that correct or do I just want (b) ?
(3) Before anything else, do I need to "clear the CMOS jumper"?  What exactly does this mean and how is it done?  Is it necessary?
(4) Do I need to enable/disable any BIOS settings just to get up and running?
(5) I want to run the following programs to test the system:
------ Memtest86
------ the newer version of Memtest from wonkanoby's site
------ Prime95
I haven't got a clue how to do this or what to do ... I'm reading about "blend tests" and "torture tests" and "large FFTs" and I need some seeeerious explanation
By the end of this test, I hope to establish that my memory and cpu are not faulty and are not overheating, so I just need to return/change the psu.  As it stands, I might have more faulty components and ned to return them too.
Thanks for your help.
Fizz
p.s. .... some of you asked how I had HDD LED working on the VIA controller.  Well, the red light on the case came on whenever the HDD was doing a read or write, but there was no case light ... I probabaly had the connectors the wrong way round.  I had:
ON JFP1-----------------------
* Reset Switch = on pins 7 & 5 with the label facing outwards ... i.e. at the Promise controller
* HDD LED = on pins 1 & 3, label facing same way as Reset Switch
* Power Switch = on pins 8 & 6, label facing oposite direction from HDD LED and Reset Switch ... i.e. with the label facing the bottom of the case and the white wire connected to the "+" sign on pin 6, the black wire connected to the "-" sign on pin 8.
* My case has no 2-pin connector for Power LED on JFP1 ... instead it has a 3pin connector for Power LED on JFP2 ... is that why I get no Power LED?
ON JFP2---------------------
* 3pin Power LED = on pins 1,3,5 ... label facing outwards towards Promise controller
* 4pin Speaker = on pins 2,4,6,8 ... label facing oposite of Power LED ... i.e. facing bottom of case.

My PC has crashed again.  This, however, is totally different to the previous problem.  That does indeed seem to have been caused by a faulty cpu cooler installation and automatic hardware shutdown due to overheating.  That problem resulted (every time) in a total hardware collapse, so that all fans would stop, the monitor would go black and essentially all electricity would stop flowing in the computer.  You would then need to go to the mains socket and turn it OFF-ON before being able to use the Power button on the case.  Once I found that the cpu cooler was loose on the motherboard (and that it could actually lose contact with the cpu when the case was upright), I reinstalled it, using the correct backplate (I had been using the wrong one before).  Since then, the same problem has nver occured and the pc has been running fine for about 10 days with no problems whatsoever.  Until now...
This problem is different.  The fans keep spinning and there is no trouble with electricity.  Instead, Windows XP just seems to freeze.  It happened when I visited a website.  I was using a proper firewall and antivirus program (updated very recently).  It just froze for a few seconds ... I tried ctrl-alt-del but that didn't work so I just pressed the Power button on the case to shutdown.  This freezing problem occured from time to time on my Windows95 PC and pressing the Power button is the only way to fix it.  When you restart, Scandisk starts but you just exit immediately and there are no problems.  It occurs on Windows95 when I have a lot of multitasking going on, which is probably due to lack of Ram (32 mb).  This new PC, however, has 1024mb of Ram.  I've checked the Ram extensively using the Microsoft Memory Diagnostic Tool (boot from floppy) it passed every possible test configuration without any errors.  Anyway, back to my story ... when I pressed the Power button, nothing happened but a few seconds later, the PC "unfroze" and the mouse cursor became moveable again.  Windows then shutdown properly (on Win95 it just literally zaps off when you press the Power button ... XP obviously controlls the process more carefully).  
The PC then started back fine and I went back online and then shut the PC off for the night.  This morning, whilst using the internet again, the PC froze the same way.  ... Shut the PC down and then turned it back on .... Upon restart, a blue screen saying "UNMOUNTABLE BOOT VOLUME" appeared.  I've seen this before, once or twice, with the previous problem.  Subsequent attempts at restarting the machine led to the follwing black screen.
Windows XP was unable to start up normally, please select how you would like to start up:
Safe Mode
Safe Mode with Prompt
Last Known Good Configuration
Normal Mode
.... Windows will start up in Normal Mode in (xx seconds [counting down])
I tried all apart from Safe Mode with Prompt (it probably won't work if Safe Mode didn't work and I don't want to get into command line operations right now).  When you select a mode for restart, e.g. Normal Mode, it goes along fine for the first few seconds and then when the Windows XP splashscreen appears, it stalls.  The blue progress bar under the Windows XP logo keeps moving from end to end repeatedly but it doesn't move on from there.  It stays there for about 30 seconds and then the same blue screen appears again.
It seems to be a software problem (probably with Windows) but I did notice one unusual thing with hardware.  When it froze last night whilst I was online, the hard drive started making sporadic "beep" noises that I haven't heard before.  When starting Windows up now (and failing), the same "beep" noises come again.  In addition to these "beep" noises, the hard drive starts spinning (the slight high-pitch whine noise) and then seems to restart ... i.e. the whine dies down for a second and then restarts, like spinning slows down and then the disk spins up again.  Hard drive corruption would seem a bit unlikely, as it's been running fine for a week now with no problems and the hard drives are on their own (not in the SmartDrives anymore), running at perfectly normal temperatures.
Any suggestions?  I was thinking of running chkdsk.
By The Way:
I managed to transfer all my files from my Windows95 and Windows3.1 PCs, by connecting their HDDs to my new PC and using copy-paste in "My Computer".  The Windows3.1 HDD took a while longer and a couple of restarts of XP before it would show up, but it worked.  These were installed under a couple of subdirectories called something like:
/myOldWin95PC
/myOldWin3.1PC
I copied the whole drive, so Windows95 and Windows3.1 and DOS were copied too.  Was this a bad idea for conflicts etc?  I deleted the Windows3.1 and DOS folders and just kept the data.  Windows XP is supposed to have protection against such conflicts anyway.
Thanks for all your help everyone.

Similar Messages

  • Windows Server 2008 R2 with multiple Roles OS Rebuild, Need help with Certificates.

    Hi,
    I have rebuilt a Server for my client and I require help with certificates..
    I am unsure exactly what to do to get this server working as it was.
    Example, The Windows Server 2008 R2 has Microsoft Exchange, DNS, DHCP, ADDS, FileServices,Network Policy and access Services and Webservices roles installed on a single box.
    Since the Server OS Rebuild I am getting 2 issues that pop up usually when Outlook in opened on a client Workstation,
    I have not dont anything certificate wise to the server since OS Install, and the messages I get and best described here
    I seen on a backdrive, a few certificate files I dont know if we can use these files for anything but we have the following files of drive E (Backup)
    e:\server.xxxx.com.au\gd_iis_intermediates.p7b
    e:\server.xxxx.com.au\server.xxxx.com.au.crt
    e:\ssl\2013-2018.cer
    1st Message is about a Proxy certificate I dont get this often but saw it today and my client clicked ok too quickly.
    I have seen it and didnt see it again after trying to close outlook and reopen
    I looked up google images and tried to find it...
    It's like this, (There is a problem with the proxy server's security certificate.
    The security certificate is not from a trusted certifying authority.)
    2nd Message is about Security Alert, Autodiscover.xxxx.com.au Information you exchange with this site cannot be viewed or changed by others. However, there is a problem with the sites security certificate.
    -X- The security certificate was issued by a company you have not chosen to trust. View the certificate to determine whether you want to trust the certificating authority
    -TICK- The security certificate date is valid
    -X- The name on the security certificate is invalid or does not match the name of the site
    Do you want to preceed
    [Yes][No][View Certificate ...]
    3rd Message is very Close to the 2nd Message, is about Security Alert, xxxx-server.xxxx.local, Information you exchange with this site cannot be viewed or changed by others. However, there is a problem with the sites security certificate.
    -X- The security certificate was issued by a company you have not chosen to trust. View the certificate to determine whether you want to trust the certificating authority
    -TICK- The security certificate date is valid
    -TICK- The name on the security certificate is invalid or does not match the name of the site
    Do you want to preceded
    [Yes][No][View Certificate ...]
    If you can help guide me thou this as I'm very new to setting up certificates. I had a friend tell me about something in DNS.. but he has been super busy and I want to learn what to do.
    Thank-You.

    Hiya,
    quite a lot has the same confusions as you do, so I've written a simple explanation on the subjet of certificates
    http://jesperarnecke.wordpress.com/2014/03/22/certificates-simple-explanation/
    Let me know if that helps you and if you need further assistance.

  • Class final project need help

    I have this final project due Monday for my java class. I'm having some trouble with this zoom slider which gives me 2 errors about "cannot find symbol". I've tried just about eveything i can think of and i cant come up with the solution... Here is my code:
    import java.awt.event.ActionEvent;
    import java.awt.event.ActionListener;
    import javax.swing.JFrame;
    import javax.swing.JMenu;
    import javax.swing.JMenuBar;
    import javax.swing.JMenuItem;
    import javax.swing.event.*;
    import javax.swing.*;
    import java.util.*;
    import java.awt.event.*;
    import java.awt.*;
    import java.io.*;
    public class MenuExp extends JFrame implements MouseMotionListener,MouseListener,ActionListener
    /* creates the file menus and submenus */
         JMenu fileMenu = new JMenu("File");
        JMenu plotMenu = new JMenu("Plotting");
        JMenu helpMenu = new JMenu("Help");
        JMenuItem loadAction = new JMenuItem("Load");
        JMenuItem saveAction = new JMenuItem("Save");
        JMenuItem quitAction = new JMenuItem("Quit");
        JMenuItem colorAction = new JMenuItem("Segment Colors");
        JMenuItem helpAction = new JMenuItem("Instructions");
        JButton button;
         Cursor previousCursor = new Cursor(Cursor.DEFAULT_CURSOR);
        JLabel cLabel;
        JPanel cPanel;
        private String filename = null;  // set by "Open" or "Save As"
        double scale = 1.0;
        public MenuExp(File f)
            setTitle("PlotVac");
            Container pane = getContentPane();
            ImageIcon chartImage = new ImageIcon(f.getName());
              ChartDisplay chartLabel = new ChartDisplay(chartImage);
              JScrollPane scpane = new JScrollPane(chartLabel);
              pane.add(scpane, BorderLayout.CENTER);
              chartLabel.addMouseListener(this);  //change cursor
              chartLabel.addMouseMotionListener(this); //handle mouse movement
              JPanel cPanel = new JPanel();
              cLabel= new JLabel("cursor outside chart");
              cPanel.add(cLabel);
              pane.add(cPanel, BorderLayout.NORTH);
              button = new JButton("Clear Route");
            button.setAlignmentX(Component.LEFT_ALIGNMENT);
            button.setFont(new Font("serif", Font.PLAIN, 14));
              cPanel.add(button);
              getContentPane().add(getSlider(), "Last");
    /* Creates a menubar for a JFrame */
            JMenuBar menuBar = new JMenuBar();
    /* Add the menubar to the frame */
            setJMenuBar(menuBar);
    /* Define and add three drop down menu to the menubar */
            menuBar.add(fileMenu);
            menuBar.add(plotMenu);
            menuBar.add(helpMenu);
    /* Create and add simple menu item to the drop down menu */
            fileMenu.add(loadAction);
            fileMenu.add(saveAction);
            fileMenu.addSeparator();
            fileMenu.add(quitAction);
            plotMenu.add(colorAction);
            helpMenu.add(helpAction);
             loadAction.addActionListener(this);
             saveAction.addActionListener(this);
             quitAction.addActionListener(this);
        private JSlider getSlider()
            JSlider slider = new JSlider(25, 200, 100);
            slider.setMinorTickSpacing(5);
            slider.setMajorTickSpacing(25);
            slider.setPaintTicks(true);
            slider.setPaintLabels(true);
            slider.addChangeListener(new ChangeListener()
                public void stateChanged(ChangeEvent e)
                     int value = ((JSlider)e.getSource()).getValue();
                     cPanel.zoom(value/100.0);
            return slider;
        private void zoom(double scale)
            this.scale = scale;
            cPanel.setToScale(scale, scale);
            repaint();
    /* Handle menu events. */
           public void actionPerformed(ActionEvent e)
              if (e.getSource() == loadAction)
                   loadFile();
             else if (e.getSource() == saveAction)
                    saveFile(filename);
             else if (e.getSource() == quitAction)
                   System.exit(0);
    /** Prompt user to enter filename and load file.  Allow user to cancel. */
    /* If file is not found, pop up an error and leave screen contents
    /* and filename unchanged. */
           private void loadFile()
             JFileChooser fc = new JFileChooser();
             String name = null;
             if (fc.showOpenDialog(null) != JFileChooser.CANCEL_OPTION)
                    name = fc.getSelectedFile().getAbsolutePath();
             else
                    return;  // user cancelled
             try
                    Scanner in = new Scanner(new File(name));  // might fail
                    filename = name;
                    while (in.hasNext())
                    in.close();
             catch (FileNotFoundException e)
                    JOptionPane.showMessageDialog(null, "File not found: " + name,
                     "Error", JOptionPane.ERROR_MESSAGE);
    /* Save named file.  If name is null, prompt user and assign to filename.
    /* Allow user to cancel, leaving filename null.  Tell user if save is
    /* successful. */
           private void saveFile(String name)
             if (name == null)
                    JFileChooser fc = new JFileChooser();
                    if (fc.showSaveDialog(null) != JFileChooser.CANCEL_OPTION)
                      name = fc.getSelectedFile().getAbsolutePath();
             if (name != null)
                  try
                      Formatter out = new Formatter(new File(name));  // might fail
                        filename = name;
                      out.close();
                      JOptionPane.showMessageDialog(null, "Saved to " + filename,
                        "Save File", JOptionPane.PLAIN_MESSAGE);
                    catch (FileNotFoundException e)
                      JOptionPane.showMessageDialog(null, "Cannot write to file: " + name,
                       "Error", JOptionPane.ERROR_MESSAGE);
    /* implement MouseMotionListener methods */     
         public void mouseDragged(MouseEvent arg0)
         public void mouseMoved(MouseEvent arg0)
              int x = arg0.getX();
              int y = arg0.getY();
              cLabel.setText("X pixel coordiate: " + x + "     Y pixel coordinate: " + y);
    /*      implement MouseListener methods */
         public void mouseClicked(MouseEvent arg0)
         public void mouseEntered(MouseEvent arg0)
             previousCursor = getCursor();
             setCursor(new Cursor (Cursor.CROSSHAIR_CURSOR) );
         public void mouseExited(MouseEvent arg0)
             setCursor(previousCursor);
             cLabel.setText("cursor outside chart");
         public void mousePressed(MouseEvent arg0)
         public void mouseReleased(MouseEvent arg0)
    /* main method to execute demo */          
        public static void main(String[] args)
             File chart = new File("teritory-map.gif");
            MenuExp me = new MenuExp(chart);
            me.setSize(1000,1000);
            me.setLocationRelativeTo(null);
            me.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
            me.setVisible(true);
    }and this is the other part:
    import java.awt.Graphics;
    import java.awt.Graphics2D;
    import java.awt.BasicStroke;
    import java.awt.Color;
    import java.awt.geom.Line2D;
    import javax.swing.Icon;
    import javax.swing.JLabel;
    public class ChartDisplay extends JLabel
    /* line at 45 degrees from horizontal */
         private int x1=884, y1=290, x2=1084, y2=490;
    /* horizontal line - x3 same as x2 */
         private int x3=1084, y3=490, x4=1384, y4=490;
         public ChartDisplay(Icon arg0)
              super(arg0);
    /* This overrides inherited method to draw on image */
         protected void paintComponent(Graphics arg0)
              super.paintComponent(arg0);
    /* Utility method to draw a "dot" at line ends */
         private void drawDot(Graphics g, Color c, int xDot, int yDot, int sizeDot)
              Color previousColor = g.getColor();
              g.setColor(c);
                g.fillOval(xDot-(sizeDot/2), yDot-(sizeDot/2), sizeDot, sizeDot);
                g.setColor(previousColor);   
    /* Utility method to draw a wider line */
         private void drawLine(Graphics g, Color c, int lineWidth, int xStart, int yStart, int xEnd, int yEnd)
              Color previousColor = g.getColor(); // save previous color
              Graphics2D g2 = (Graphics2D) g;  // access 2D properties
                g2.setPaint(c);  // use color provided as parameter
             g2.setStroke(new BasicStroke(lineWidth)); // line width
             g.setColor(previousColor);    // restore previous color
    }I've basically used the structure of other programs and incorporated them into my design. If anyone knows how i can fix the errors please let me know. The errors are found in line 91 and 100 which is where the zoom slider is occuring.
    **NOTE** the program isnt fully functional in the sense that there are buttons and tabs etc.. that are missing action listeners and things like that.
    Thanks for the help
    Edited by: gonzale3 on Apr 17, 2008 6:55 PM

    gonzale3 wrote:
    The code was on the forums as the person who posted it was using it as an example in a program he used... i didnt borrow the entire code im just using the way he did the zoom method and added it into my program. I wasnt aware that it was used in the JPanel class. C'mon, it's your program. If you don't know what you are doing in this program, then you shouldn't be using it.
    That is why im asking if someone can show me the right way to implement a zoom slider into my program or maybe give me an example where its used.What the fuck is a zoom slider???
    Edited by: Encephalopathic on Apr 17, 2008 8:00 PM

  • I have final cut pro x-i have been using the share button previously and had no problem.as of today i share a movie to 720hd, and after a white it says share successful but i cannot find where the movie has been saved???need help

    i have final cut pro x-i have been using the share button previously and had no problem.as of today i share a movie to 720hd, and after a while it says share successful but i cannot find where the movie has been saved???need help--i cannot find the destination. can this be changed.it used to go to itunes, home video.thanks, dimitrios

    EExactly what settings are you using. Some go to iTunes.

  • Help urgently needed, I have installed Logic Pro 9, since then my Final Cut Pro X keep freezing. Anyone what is wrong and how to solve it? I desperately need help on this. Thanks

    Help urgently needed, I have installed Logic Pro 9, since then my Final Cut Pro X keep freezing. Anyone what is wrong and how to solve it? I desperately need help on this. Apple support says I have to pay £85 for to help me. Thanks

    Just a word of advice. Never ever use the word "urgent" on this forum

  • 30p with a Canon XA10 - need help with Final Cut 7 "FIELD DOMINANCE" setting and an explanation of "drop frames". Thank you!!

    I shot footage using a Canon XA10 and there are issues with the HD quality not looking as crisp as it should.  I am trying to make sure the settings in Final Cut are right.  Need help confirming what should be in "Field Dominance" --- have seen discussions about making sure it's set to "none" but I'm confused as to what to do. 
    Also someone suggested I use "drop frames" to change from 30p to 24p within Final Cut.  He couldn't explain how to do it so any input appreciated as well as any thoughts on whether this is a good option to try.

    If you're shooting 30p, field dominance should be set to none.   Since you need to use log and transfer to bring this material in to fcp, I would assume it would be set correctly automatically.  Are you sure you've set the camera properly?
    Drop frames will not change 30 p to 24p.   Dropframe timecode simply refers to the number assigned to each frame which drops an occasional number (not any frames) so the timecode duration is the actual duration, since 30p videoi is actually 29.97 frames per second which each frame assigned a timecode number. 
    This is very basic video stuff and requires some basic knowledge of video.  Wikipedia is a pretty good resource for much of this stuff plus there are lots of great resources on the web.  Look up interlaced and progressive video, 24p and 30p. 
    And as far as judging quality, you can only get an accurate view of the quality in fcp when you have a video card attached to a video monitor.  The viewer and canvas are only an approximation of what the quality is.  Minimally, set the canvas or viewer to 100% to get a better approximation of the quality. 

  • I am needing help with the final steps in restoring my iPod Touch 5

    I need help with the final steps in restoring my iPod

    I was told that the iPod would automatically go to restore mode when connected to wifi. It did not do that

  • FREE TRIAL ON PAGEMAKER INSTALLED, BUT REQUIRES STUFFIT FOR FINAL STEP.  CAN'T SEEM TO MANAGE THIS STEP. NEED HELP MANAGING THE FINAL STEPS BEFORE PAGEMAKER IS USEABLE.  THANK YOU

    HAVE INSTALLED PAGEMAKER, BUT BECAME CONFUSED WHEN "STUFFIT" SEEMED TO BE REQUIRED FOR NEXT STEP.  NEED HELP IN FINAL STEPS IN DOWNLOADING PAGEMAKER FOR USE.

    >I would like to purchase a new mac with the appropriate operating system that will
    run pagemaker 7.  If not, I understand that my current mac, Mac OS X, version
    10.6.8, processor 2.8 GHz Intel Core i7, Memory 4GB 1067 MHz DDR3 will not support
    either Pagemaker 7 or InDesign.  My question is what package can I purchase that
    will satisfy one or both of these needs?  Thank you for any guidance.
    R_Kelly  created the discussion
    "FREE TRIAL ON PAGEMAKER INSTALLED, BUT REQUIRES STUFFIT FOR FINAL STEP. 
    CAN'T SEEM TO MANAGE THIS STEP. NEED HELP MANAGING THE FINAL STEPS BEFORE PAGEMAKER
    IS USEABLE.  THANK YOU"
    To view the discussion, visit: https://forums.adobe.com/message/6607524#6607524
    >

  • I need help. How to export split track for Final Cut Pro 7 Thanks

    I need help. I have edited a film and now the company I have made the film for want a split track of it. I have no idea how to export a split track off Final Cut Pro 7 and I need simple language to explain it to me as I am a beginner. Thanks

    I assume you have multiple tracks of audio? And the audio is distributed discretely over these tracks (sync sound on tracks 1 and 2, sound effects on tracks 3 and 4, music on tracks 5 and 6 for example)?
    Then duplicate your sequence by clicking on the icon for your sequence in the FCP browser and control-clicking on it. From the drop-down menu choose Duplicate. Double click on the duplicate sequence you just created to load it to the timeline and canvas.
    Now, working on the copy you just made of your finished sequence, click anywhere on the timeline, and type Command + 0 {zero} to bring up your sequence settings. Click on the Audio Outputs Tab.
    Once the Audio Output Tab opens, set the Outputs to the desired number of discrete tracks you want to export - in this case I will set it to 8, as I have sync sound on tracks 1 & 2, Voice Over on tracks 3 & 4, Sound Effects on tracks 5 & 6 and Music on tracks 7 & 8.
    Once I do that the 8 tracks appear. I set them all to Dual Mono as I want them to be discrete tracks:
    Once I am done, I click OK and return to the far left side of the timeline where the audio selectors are, and carefully control - clicking in the empty space above the lock symbol,
    From the drop down menu I assign the output of each track - track 1 to to output track 1, track 2 to output track 2, doing so to each track:
    You need to set the output for each track. Once all my track assignments are done, I go to the menu File > Export . . . > QuickTime Movie and export my sequence, but now it is exporting with 8 discrete tracks of audio.
    To do a quick check that everything is OK, re-import the movie you just exported back into FCP, and open it in the Viewer and you will see that it does indeed have the multi-tracks, as 8 mono track tabs appear at the top of the viewer.
    Now give that QuickTime a name that includes "Split Tracks" in the title and copy it to your delivery drive.
    MtD
    Message was edited by: Meg The Dog to fix typo

  • Imovie user needs help in final cut!

    hi, i am an imovie editor who has made the smart move to final cut pro. but i am confused sometimes on what to do. i am editing a promo video for my school, i have an audio clip that runs the whole promo (voiceover)and i want to cut out a piece of it out. in imovie i would just "split" the audio at the beginning and end, reselect it and delete it. not sure how to do it in final cut. any help would be much appreciated. thanks
    aaron

    To do that same technique in FCP... use the B tool (for razor).
    If you hit it once, it will only cut items linked at a certain spot... if you hit it twice it will cut the whole timeline.
    Then... use the del key over by HOME and the media on the timeline will close when you delete the selected material. If you just want to LIFE out the section and leave the hole... use the delete key by the += key.
    Yes?
    Good luck and welcome!
    CaptM

  • Need help in creating a java program

    Hi everyone.
    I'd like to say before i start about my problem, that i've only begun learning java and my teacher hasn't explained anything at all. He only showed us by doing it himself and then showing us the final version. I've searched a little on how to program but i get little success in finding a good tutorial.
    I need help creating a program which has been assigned to me due in a few days in which i can't contact my teacher for help.
    I need to write a java program which inputs 3 items. The number of kilometres you drove, the number of litres of gas you used and the price you paid for the gas. Then, the program must calculate the number of litres used per 100km driven, which is litres divided by kilometres times 100, how much it costs to drive 100km, which is the result (a) times the price per litre and the number of miles per American gallon of gas ( one American gallon = 3.785 litres, and one mile = 1.609 km.
    The program has to output my name, the inputs given, the results computed and a message saying "Program Complete".
    To give you what i've done to begin with, from what i understood, is:
    import javax.swing.JOptionPane;
    public class prog1
         public static void main(String args[])
              final double americanGallon = 3.785;
              final double mile = 1.609;
              kilometresDriven,
              gasUsed;
              priceOfLiterGas;
              System.out.println("My Name");
              System.out.println("Number of kilometres driven:");
              kilometresDriven = JOptionPane.showInputDialog ("Kilometres Driven");
              System.out.println("Number of Litres of gas used:");
              gasUsed = JOptionPane.showInputDialog ("Litres of gas used");
              System.out.println("Price of a liter of gas:");
              priceOfLiterGas = JoptionPane.showInputDialog("Price per liter");
    Up to now, that's all i've got. i know i'm wrong, but i'm not sure how to do this. Could someone give me an outline of what this program is suppose to look like?
    Thanks in advance.

    Here's an update on my program. I've worked on certain details and would need your comments whether it contains errors. I'd also want to know if it would work or not because i don't know how to check it on my computer.
    Here's the update:
    import javax.swing.JOptionPane;
    public class Prog1
    public static void main(String args[])
    String name;
    double kmDriven;
    double litresUsed;
    double pricePaidForGas;
    double priceOfALiter;
    name = JOptionPane.showInputDialog("Name");
    input = JOptionPane.showInputDialog("Number of km driven");
    kmDriven = Double.parseDouble (input);
    input = JOptionPane.showInputDialog("Number of litres of gas used");
    litresUsed = Double.parseDouble (input);
    input = JOptionPane.showInputDialog("Price paid for gas");
    pricePaidForGas = Double.parseDouble (input);
    input = JOptionPane.showInputDialog("Price of a litre of gas");
    priceOfALiter = Double.parseDouble (input);
    a = (litresUsed/kmDriven)*100;
    b = ((litresUsed/kmDriven)*100)*priceOfALiter);
    c = (kmDriven/1.609)
    System.out.println("Name:" + name);
    System.out.println("Number of litres used per 100km:" + a);
    System.out.println("Cost of driving 100km" + b);
    System.out.println("Number of miles per American Gallon of Gas:" + c);
    System.out.println("Program Complete");
    System.exit(0);
    Comments please.
    Thanks in advance

  • Need help making ball move and bounce off of sides of JPanel

    I'm currently working on a program that creates a ball of random color. I'm trying to make the ball move around the JPanel it is contained in and if it hits a wall it should bounce off of it. I have been able to draw the ball and make it fill with a random color. However, I cannot get it to move around and bounce off the walls. Below is the code for the class that creates the ball. Should I possible be using multithreads? As part of the project requirements I will need to utilizes threads and include a runnable. However, I wanted to get it working with one first and than add to it as the final product needs to include new balls being added with each mouse click. Any help would be appreciated.
    Thanks
    import java.awt.Color;
    import java.awt.Graphics;
    import javax.swing.JPanel;
    public class Ball extends JPanel{
        Graphics g;
        int rval; // red color value
        int gval; // green color value
        int bval; // blue color value
        private int x = 1;
        private int y = 1;
        private int dx = 2;
        private int dy = 2;
        public void paintComponent(Graphics g){
            for(int counter = 0; counter < 100; counter++){
                // randomly chooses red, green and blue values changing color of ball each time
                rval = (int)Math.floor(Math.random() * 256);
                gval = (int)Math.floor(Math.random() * 256);
                bval = (int)Math.floor(Math.random() * 256);
                super.paintComponent(g);
                g.drawOval(0,0,30,30);   // draws circle
                g.setColor(new Color(rval,gval,bval)); // takes random numbers from above and creates RGB color value to be displayed
                g.fillOval(x,y,30,30); // adds color to circle
                move(g);
        } // end paintComponent
        public void move(Graphics g){
            g.fillOval(x, y, 30, 30);
            x += dx;
            y += dy;
            if(x < 0){
                x = 0;
                dx = -dx;
            if (x + 30 >= 400) {
                x = 400 - 30;
                dx = -dx;
            if (y < 0) {
                y = 0;
                dy = -dy;
            if (y + 30 >= 400) {
                y = 400 - 30;
                dy = -dy;
            g.fillOval(x, y, 30, 30);
            g.dispose();
    } // end Ball class

    Create a bounding box using the size of the panel. Each time you move the ball, check that it's still inside the box. If it isn't, then change it's direction. You know where the ball is, (x, y), so just compare those values to the boundary values.

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

  • Setting Up New FCP5 HD Bay -- Need Help

    I'm setting up an HD edit bay for a friend, and I have a number of questions. Any help would be a godsend.
    Basically, he's got a G5 with Final Cut Studio installed, a Motu audio interface, a Mackie Mixer, a Decklink Pro HD dual link, M-audio LX4 5.1 speakers, and a DVD/VHS recorder. He has one 250G internal capture drive, and one external 1TB firewire G-Raid. He's running a 23" and 20" Cinema Displays, and a Panasonic 32" HD LCD Flatscreen.
    He wants to rent decks per project for capture and output.
    My questions is this, how do we output to SD VHS/DVD or other formats for clients? Do we need a Switcher? Is it possible to do format conversion in Final Cut and output via Firewire instead of decklink to SD devices?
    Also, is SDI (serial digital interface) cross-platform from SD to HD? Kramer Electonics has an interesting format converter that supports SDI, but will that change HD to SD? Here is a model number and link. FC-7402
    http://www.kramerelectronics.com/indexes/item.asp?pic=71
    Kramer also has a firewire format converter that looks interesting. FC-20
    http://www.kramerelectronics.com/indexes/item.asp?pic=430
    One of the Mac Vendors suggested the Blackmagic Multibridge Extreme, which sounds perfect, but costs $2000 - 3000.
    I'm looking for a low cost alternative, if possible.
    I really need help from someone experienced with this. I'm a freelance editor who cuts offline mostly on Avid for episodic TV, but my friend master HD out of his Mac edit suite. This is new territory for me.
    Thanks in advance.

    You should setup your local DNS to resolve only for the 'film.lab.' domain. Any requests that your local DNS will not be authoritative for should be forwarded to your district's DNS server. You should also set your local DNS to allow recursion only for clients on the 10.x.x.x subnet. The failure of clients configured to use your DNS for name resolution could be due to rules that have bee setup on your district's edge router to block outbound and inbound port 53 requests for all internal clients.
    If you set your server and clients to use your district's DNS server as the secondary for your zone, you must make certain that any hostnames within your local zone are defined on your district's DNS to resolve to the private, 10.x.x.x, subnet that you will be running your systems on. If you don't -and your DNS goes down and there is no secondary defined on the clients that contains the zone info for your subnet- your clients won't be able to find any hosts. If you wish to run services that will be accessible from the Internet on your local server, this may require your network admins to make changes to routing to allow those request to be pass from the public network to the private one.
    Also, if your district runs a central DHCP server you will need your district network admins to setup their DHCP server to return the correct client settings for your DNS and search domains for the clients within your subnet. If they do run a central DHCP server, do not attempt to set up a local one for your subnet. If you do, the probability that you will receive a very angry phone call from a not so happy fellow at your district is very high.

Maybe you are looking for

  • TS3694 iphone cant be update to ios6 and saying a 3014error

    iphone cant be update to ios6 and saying a 3014error

  • Xcelsius - Export to PDF

    Hi All, Is it possible to have the dasboard exported in a landscape view?. It is getting exported only to the potrait view. Thought i can rotate angle in the pdf, Still it would be better to have it exported as landscape view itself. Any suggestion.?

  • Can't insert a dvd in the slot

    Cannot insert a DVD into the DVD slot on my iMac running 10.8.3.  DVD will go in the slot but will not stay in..Drive does not recognize anything inserted into it.  Is there a way to correct this?  Rebooting the machine does not work.

  • Olympus E-3 Users Initial Experiences

    Now that Apple has finally released an update that covers the E-3 without DNG conversion, I'm curious as to initial and ongoing impressions. I'm still using Lightroom, but is Aperture 2 worth consideration?

  • What's the best way?? Need Master Class POV

    I've got material shot with two cameras. The video portion I want to use...the audio I'm using from another source that is better quality (live musical performance). Somehow, all of this needs to come together in one edited music video. How do I go a