Need help figuring out what's going wrong

With the explicit help/instructions of some users here I've managed to build some sort of a tokenizer.
There are a couple of mistakes in its rules which I am aware of, and probably it could be a lot more efficient, but I've found something funny. When copying a sentence from a WSJ article:
"Book publishers were locked in 11th-hour negotiations with Apple Inc. that could rewrite the industry's revenue model after the technology giant unveils its highly anticipated tablet device Wednesday."
I got:
Book
publishers
were
locked
in
11th-hour
negotiations
with
Apple
Incorporated
that
could
rewrin
exemplificationthe
industry
is
revenue
model
after
the
technology
giant
unveils
its
highly
anticipated
tablet
devin
exemplificationWednesday
./sd
Remarkably, it rewrites the "ite" from "rewrite" to "in exemplification", just as "ice" from "device".
Any thoughs as to why this mystery occurs?
Here's the code:
public static void main(String args[])
         InputStreamReader istream = new InputStreamReader(System.in) ;
         BufferedReader bufRead = new BufferedReader(istream) ;
         try {
              System.out.println("Enter input.");
              //read input
              String input = bufRead.readLine();
              //rewrite abbreviations
              input = input.replaceAll("dr.", "doctor");
              input = input.replaceAll("mr.", "mister");
              input = input.replaceAll("e.g.", "exempli gratia");
              input = input.replaceAll("vs.", "versus");
              input = input.replaceAll("i.e.", "in exemplification");
              input = input.replaceAll("Inc." , "Incorporated");
              //more abbreviations to come here
              //rewrite contractions
              input = input.replaceAll("'ll", " will");
              input = input.replaceAll("n't", " not"); // this one needs to be a bit smarter to cover cases like "won't"
              input = input.replaceAll("'s", " is"); // this one needs to be a lot smarter, since now it incorrectly rewrites "John's house" to "John is house"
              //perhaps rewrite some more stuff here
              String[] tokens = input.split("(?=\\p{Punct}(\\s|$))|\\s+");
              for(String t : tokens) {
                   //maybe rewrite back the stuff rewritten above?
                   //mark/tag sentence delimiters alreadys
                   if (t.equals(".") || t.equals("?") || t.equals("!") || t.equals(":") || t.equals(";")){
                        t = t + "/sd";
                   System.out.println(t);
         catch (IOException err) {
              System.out.println("Error reading line");
         }     

You're passing a regular expression into the replaceAll function (not just a normal String), so the "." you use in "i.e" really means "any character".
To mean literally a dot, you have to escape it: "i\\.e".
This problem will also happen in any of the other regular expressions with dots in them. So for example, "e.g." will replace "eggs", "edge", and "ergo" with "exempli gratia" as well.
Read all about it here !
PS- You might want to try using more meaningful post titles in the future...

Similar Messages

  • Need help figuring out what's wrong with my code!

    I am having a few problems with my code and can't see what I've done wrong. Here are my issues:
    #1. My program is not displaying the answers to my calculations in the table.
    #2. The program is supposed to pause after 24 lines and ask the user to hit enter to continue.
    2a. First, it works correctly for the first 24 lines, but then jumps to every 48 lines.
    2b. The line count is supposed to go 24, 48, etc...but the code is going from 24 to 74 to 124 ... that is NOT right!
    import java.text.DecimalFormat; //needed to format decimals
    import java.io.*;
    class Mortgage2
    //Define variables
    double MonthlyPayment = 0; //monthly payment
    double Principal = 200000; //principal of loan
    double YearlyInterestRate = 5.75; //yearly interest rate
    double MonthlyInterestRate = (5.75/1200); //monthly interest rate
    double MonthlyPrincipal = 0; //monthly principal
    double MonthlyInterest = 0; //monthly interest
    double Balance = 0; //balance of loan
    int TermInYears = 30; //term of loan in yearly terms
    int linecount = 0; //line count for list of results
    // Buffered input Reader
    BufferedReader myInput = new BufferedReader (new
    InputStreamReader(System.in));
    //Calculation Methods
    void calculateMonthlyPayment() //Calculates monthly mortgage
    MonthlyPayment = Principal * (MonthlyInterestRate * (Math.pow(1 + MonthlyInterestRate, 12 * TermInYears))) /
    (Math.pow(1 + MonthlyInterestRate, 12 * TermInYears) - 1);
    void calculateMonthlyInterestRate() //Calculates monthly interest
    MonthlyInterest = Balance * MonthlyInterestRate;
    void calculateMonthlyPrincipal() //Calculates monthly principal
    MonthlyPrincipal = MonthlyPayment - MonthlyInterest;
    void calculateBalance() //Calculates balance
    Balance = Principal + MonthlyInterest - MonthlyPayment;
    void Amortization() //Calculates Amortization
    DecimalFormat df = new DecimalFormat("$,###.00"); //Format decimals
    int NumberOfPayments = TermInYears * 12;
    for (int i = 1; i <= NumberOfPayments; i++)
    // If statements asking user to enter to continue
    if(linecount == 24)
    System.out.println("Press Enter to Continue.");
    linecount = 0;
    try
    System.in.read();
    catch(IOException e) {
    e.printStackTrace();
    else
    linecount++;
    System.out.println(i + "\t\t" + df.format(MonthlyPrincipal) + "\t" + df.format(MonthlyInterest) + "\t" + df.format(Balance));
    //Method to display output
    public void display ()
    DecimalFormat df = new DecimalFormat(",###.00"); //Format decimals
    System.out.println("\n\nMORTGAGE PAYMENT CALCULATOR"); //title of the program
    System.out.println("=================================="); //separator
    System.out.println("\tPrincipal Amount: $" + df.format(Principal)); //principal amount of the mortgage
    System.out.println("\tTerm:\t" + TermInYears + " years"); //number of years of the loan
    System.out.println("\tInterest Rate:\t" + YearlyInterestRate + "%"); //interest rate as a percentage
    System.out.println("\tMonthly Payment: $" + df.format(MonthlyPayment)); //calculated monthly payment
    System.out.println("\n\nAMORTIZATION TABLE"); //title of amortization table
    System.out.println("======================================================"); //separator
    System.out.println("\nPayment\tPrincipal\tInterest\t Balance");
    System.out.println(" Month\t Paid\t\t Paid\t\tRemaining");
    System.out.println("--------\t---------\t--------\t-------");
    public static void main (String rgs[]) //Start main function
    Mortgage2 Mortgage = new Mortgage2();
    Mortgage.calculateMonthlyPayment();
    Mortgage.display();
    Mortgage.Amortization();
    ANY help would be greatly appreciated!
    Edited by: Jeaneene on May 25, 2008 11:54 AM

    From [http://developers.sun.com/resources/forumsFAQ.html]:
    Post once and in the right area: Multiple postings are allowed, but they make the category lists longer and create more email traffic for developers who have placed watches on multiple categories. Because of this, duplicate posts are considered a waste of time and an annoyance to many community members, that is, the people who might help you.

  • I need help figuring out what is wrong with my Macbook Pro

    I have a mid 2012 Macbook Pro with OS X Mavericks on it and for the past few weeks it has running VERY SLOW! I have no idea what is wrong with it, i have read other discussion forums trying to figure it out on my own. So far i have had no luck in fixing the slowness. When i open applications the icon will bounce in dock forever before opening and then my computer will freeze with the little rainbow wheel circling and circling for a few minutes... and if i try to browse websites it take forever for them to load or youtube will just stop working for me. Everything i do, no matter what i click, the rainbow wheel will pop up! The only thing i can think of messing it up was a friend of mine plugging in a flash drive a few weeks ago to take some videos and imovie to put on his Macbook Pro, he has said his laptop has been running fine though... so idk if that was the problem. Anyways, could someone please help me try something? Thank you!!

    OS X Mavericks: If your Mac runs slowly?
    http://support.apple.com/kb/PH13895
    Startup in Safe Mode
    http://support.apple.com/kb/PH14204
    Repair Disk
    Steps 1 through 7
    http://support.apple.com/kb/PH5836
    Reset SMC.     http://support.apple.com/kb/HT3964
    Choose the method for:
    "Resetting SMC on portables with a battery you should not remove on your own".
    Increase disk space.
    http://support.apple.com/kb/PH13806

  • Need Help figuring out how to alphabetize itunes artist.

    I need help figuring out one more thing. I have my artist tab in my itunes library and I need to figure out how to get all the artists grouped together instead of being scattered all around.
    This is how it looks now:
    Justin Timberlake
    Linkin Park
    Linkin Park
    Linkin Park
    Justin Bieber
    Daughtry
    Linkin Park
    Linkin Park
    JoJo
    Linkin Park
    This is how I want it to look:
    Daughtry
    Justin Timberlake
    Justin Bieber
    JoJo
    Linkin Park
    Linkin Park
    Linkin Park
    Linkin Park
    Linkin Park
    Please help! Thanks!

    Enable the Sort Artist, Album Artist and Sort Album Artist columns so you can see what is going on. Album Artist normally takes precedence over Artist, with the Sort fields further controlling the order.
    See also Grouping tracks into albums.
    tt2

  • Local hostname already in use - can't figure out what's going on

    I've been having issues with a wireless router and I think the problem lies somewhere within my computer. As I switch back and forth from trying to connect to the internet via my router or directly connected to my cable modem, I will often get this error:
    "This computer's local hostname "xyz" is already in use on this network"
    There is only one compuer on the network, however and I cannot figure out what's going on.
    I have 2 users set up on this machine, but I'm the admin and acting as such. Even with no other networked equipment hooked up to my Mac (except for the cable modem) this problem won't go away.
    I guess my real quesiton is what causes this and where should I go to troubleshoot things?
    I'm running 10.4.6, connect to my ISP using DHCP and have the same problem with both a D-Link and Linksys router.
    Any ideas?
    Thanks!

    Thanks very much for your help, fu.
    If your previous setup follows a flow like this: RCA
    CableModem-->NetGear Router-->AirPortExpress, there's
    something misconfigured routing-wise in your network.
    You have to decide which device (Netgear or AirPort
    Xpress) will handle the routing in your network.
    Previous to these problems, that was the basic flow of my network. The netgear router also fed a wired connection into a Wintel PC, and the AirPort Express hosted a wireless network that was extended by a second Airport Express. And that second AE connected to a ReplayTV with a wired connection. And then, of course, the PowerBook got Internet access wirelessly through the AE-hosted network. And that was it.
    That network always was configured so that the netgear router assigned IP addresses using DHCP, and the Airport Expresses would not assign IP addresses (i.e., "Distribute IP addresses" was NOT checked when you look at the configuration in Airport Admin Utility).
    How big is your network j? just 1 Mac (your
    PowerBook)?
    That was the state of the network a couple of days ago when I posted this. I have established that the PowerBook gets access to the Internet just fine directly though the cable modem, and just fine when it is the only wired connection to the router.
    Let's deal with your Mac first:
    Start with your Mac connected directly to the cable
    Modem. (When your mac is attached directly to the
    Cable Modem, do you use DHCP?)
    Go to SystemPreferences-->Sharing and type a Computer
    Name other than the default one
    Open Applications-->Utilities-->Terminal and type
    lookupd -flushcache (press Return) and reboot
    the Mac.
    I did this.
    One way to fix your network is to have the NetGear do
    the routing, and the AirPort Express to (just) extend
    your (wired) network wirelessly (No routing will be
    done from the AirPortXPress, (No distribution of IP
    Addresses)
    I soft reset both of my Airport Expresses. I configured the first one so that it was hosting a network, but not distributing IP addresses, and the second so that it was extending that wireless network. And I plugged the host AE into the netgear router. And for a little while, that was working.
    But then I got a message saying "IP Configuration 192.168.0.4 in use by 00:04:40:06:1f:82, DHCP Server 192.168.0.1". The dialog box with that message will come up periodically as long as the Airport Expresses are plugged into power and one is plugged into the router. Also, I once agaiin received the message saying the local hostname (the completely original one that I had created) was in use, and the name was being changed.
    Here is the thing. I cannot figure out what has that ...0.4 IP address and ...1f:82 MAC address on the network. That is not the "Internet port MAC address" or the "LAN port MAC address" for the Netgear router. It is also not the MAC address for either of the Airport Expresses or the PowerBook's internal Ethernet card.
    I accessed the router through my browser, and clicked on "Attached Devices." Here is the list of Attached Devices:
    # IP Address Device Name MAC Address
    1 192.168.0.2 00:11:24:08:4c:88
    2 192.168.0.3 00:14:51:6d:15:7c
    3 192.168.0.5 00:0a:95:da:4f:24
    The first two addresses are the two AE's, and the third is the internal Ethernet card of the PowerBook.
    I ran "Netstat" under the Network Utility to get "Routing Table Information," and here is what I get (with some identifying info removed):
    Internet:
    Destination Gateway Flags Refs Use Netif Expire
    default 192.168.0.1 UGSc 23 10 en0
    127 localhost UCS 0 0 lo0
    localhost localhost UH 11 2400 lo0
    169.254 link#4 UCS 0 0 en0
    192.168.0 link#4 UCS 3 0 en0
    192.168.0.4 link#4 UHLW 1 1 en0
    192.168.0.5 localhost UHS 0 14 lo0
    Internet6:
    Destination Gateway Flags Netif Expire
    localhost link#1 UHL lo0
    localhost Uc lo0
    localhost link#1 UHL lo0
    link#4 UC en0
    justin-and-***** 0:a:95:da:4f:24 UHL lo0
    **************bedro 0:14:51:6d:15:7c UHLW en0
    link#5 UC en1
    justin-and-***** 0:a:95:f3:3e:df UHL lo0
    **************bedro 0:14:51:6d:15:7c UHLW en1
    ff01:: localhost U lo0
    ff02::%lo0 localhost UC lo0
    ff02::%en0 link#4 UC en0
    ff02::%en1 link#5 UC en1
    Any ideas? Thanks again for your help.

  • TS3798 I get this error message"your operation could not be completed" I need help figuring out why I can not access the web page.

    I get this error message"your operation could not be completed" I need help figuring out why I can not access the web page.

    amarilysfl wrote:
    "Your disk could not be partitioned. An error occurred while partitioning the disk".
    https://www.apple.com/support/bootcamp/
    If you were using Apple's BootCamp and received this message, quit it and open Disk Uility in your Applicaitons/Utilities folder.
    Select the Macintosh HD partition on the left and select Erase and Erase Free Space > Zero option and let it complete (important) this will check the spare space for bad sectors that can cause issues formatting partitions.
    Once it's completed, try creating a partiton again in BootCamp.
    If that doesn't work, then hold command option r keys down while connected to a fast internet connection, Internet Recovery should load (spinning globe) and then in that Disk Utility, select your entire internal drive and click > First Aid > Repair Disk and Permissions.
    reboot and attempt Bootcamp again.
    If you still get a error, it might be that you have OS X data on the bottom area where BootCamp partition needs to go. This would occur if you had the drive or computer for a long time or wrote a large amount of files to the drive and nearly filling it up and then reduced some, but it left traces in the area BootCamp needs to go.
    To fix this
    BootCamp: "This disc can not be partitioned/impossible to move files."
    How to safely defrag a Mac's hard drive

  • I have a mac 10.5 and need help figuring out how to change my email settings so it does not automatically delete my inbox every 30 days.  How to I adjust the mail settings?

    I have a mac 10.5 and need help figuring out how to change my email settings so it does not automatically delete my inbox every 30 days.  How to I adjust the mail settings?

    I think it must be an IMAP account then, & in Mail>Preferences>Accounts>Advanced>Keep copies for Offline viewing:>Don't keep copies, then on the Server, or maybe it's just this one itself, but on the Server you have a setting to remove eMails after 30 days.
    If it's a POP account we'd have to investigate that... but you didn't say so I'm guessing here.

  • How do I get my previous contacts from mobileme now to the icloud? I need help figuring out how to make that transition?

    How do I get my previous contacts from mobileme now to the icloud? I need help figuring out how to make that transition?

    Try using the app My Contacts Backup, which will back up your contacts as an attachment to an email.  Send this email to yourself, open it on your Mac and double-click the attachment to import them to Address Book (or Contacts if you have Mountain Lion).

  • Need help figuring out crash report please!

    Hi there,
    So, lately I have been playing Diablo 3 and found out that it has been running slow (FPS wise) so I switched over my graphics card to the NVIDIA GeForce 9600M GT.
    Everytime I run the game, randomly my computer will full on crash the sound will freeze and repeat it's self and no buttons work except a hard shut down.
    Once I reboot, this is the crash report I get:
    Interval Since Last Panic Report:  1233165 sec
    Panics Since Last Report:          7
    Anonymous UUID: 7B2BFC9A-4351-4CC0-8A24-3F6077B1BD3F
    Sat May 19 18:34:23 2012
    panic(cpu 1 caller 0x9d4c97): NVRM[0/2:0:0]: Read Error 0x00000100: CFG 0xffffffff 0xffffffff 0xffffffff, BAR0 0xd4000000 0x5a191000 0x096380c1, D0, P3/4
    Backtrace (CPU 1), Frame : Return Address (4 potential args on stack)
    0x5292b888 : 0x21b837 (0x5dd7fc 0x5292b8bc 0x223ce1 0x0)
    0x5292b8d8 : 0x9d4c97 (0xbea22c 0xc5a840 0xbf8f88 0x0)
    0x5292b978 : 0xaef5db (0x8f4a004 0x98b2004 0x100 0x200)
    0x5292b9c8 : 0xae65d4 (0x98b2004 0x100 0x5292bac8 0x558ce4)
    0x5292b9f8 : 0x17eb7bb (0x98b2004 0x100 0x4bcd2cee 0x1)
    0x5292bb38 : 0xb0e258 (0x98b2004 0x98ae004 0x0 0x0)
    0x5292bb78 : 0x9dde2b (0x98b2004 0x98ae004 0x0 0x0)
    0x5292bc18 : 0x9da50a (0x0 0x9 0x0 0x0)
    0x5292bdc8 : 0x9dc3d9 (0x0 0x600d600d 0x702a 0x5292bdf8)
    0x5292be98 : 0x970582 (0xc1d00021 0xaa910001 0x20802040 0x5292bee0)
    0x5292bef8 : 0xd3257d (0x8f94000 0x5292bf4c 0x0 0x7)
    0x5292bf58 : 0xd3271a (0x8f76800 0xd39e54 0x5292bf78 0x2a45c9)
    0x5292bf78 : 0x230235 (0x8f76800 0x0 0x5292bfc8 0x227cea)
    0x5292bfc8 : 0x2a179c (0x863ea0 0x0 0x10 0x150b6f00)
          Kernel Extensions in backtrace (with dependencies):
             com.apple.driver.AGPM(100.12.31)@0xd2f000->0xd39fff
    dependency: com.apple.iokit.IOGraphicsFamily(2.2.1)@0x93f000
    dependency: com.apple.iokit.IONDRVSupport(2.2.1)@0x961000
    dependency: com.apple.iokit.IOPCIFamily(2.6.5)@0x928000
    com.apple.nvidia.nv50hal(6.3.6)@0x16c0000->0x1ad4fff
    dependency: com.apple.NVDAResman(6.3.6)@0x96e000
    com.apple.NVDAResman(6.3.6)@0x96e000->0xc5bfff
    dependency: com.apple.iokit.IOPCIFamily(2.6.5)@0x928000
    dependency: com.apple.iokit.IONDRVSupport(2.2.1)@0x961000
    dependency: com.apple.iokit.IOGraphicsFamily(2.2.1)@0x93f000
    BSD process name corresponding to current thread: kernel_task
    Mac OS version:
    10K549
    Kernel version:
    Darwin Kernel Version 10.8.0: Tue Jun  7 16:33:36 PDT 2011; root:xnu-1504.15.3~1/RELEASE_I386
    System model name: MacBookPro5,1 (Mac-F42D86C8)
    System uptime in nanoseconds: 34473350339409
    unloaded kexts:
    com.apple.driver.AirPortBrcm43xx            423.91.27 (addr 0xeeb000, size 0x1900544) - last unloaded 165512271751
    loaded kexts:
    com.vmware.kext.vmnet            3.0.0 - last loaded 37912026302
    com.vmware.kext.vmioplug            3.0.0
    com.vmware.kext.vmci            3.0.0
    com.vmware.kext.vmx86            3.0.0
    com.mcafee.kext.Virex            1.0.0d1
    com.manycamllc.driver.ManyCamDriver            0.0.9
    com.apple.driver.AppleHWSensor            1.9.3d0
    com.apple.filesystems.autofs            2.1.0
    com.apple.driver.AGPM            100.12.31
    com.apple.driver.AppleMikeyHIDDriver            1.2.0
    com.apple.driver.AppleMikeyDriver            2.0.5f14
    com.apple.driver.AppleHDA            2.0.5f14
    com.apple.driver.AudioAUUC            1.57
    com.apple.filesystems.ntfs            3.4
    com.apple.driver.AppleLPC            1.5.1
    com.apple.driver.SMCMotionSensor            3.0.1d2
    com.apple.Dont_Steal_Mac_OS_X            7.0.0
    com.apple.driver.AudioIPCDriver            1.1.6
    com.apple.driver.AppleIntelPenrynProfile            17
    com.apple.driver.ACPI_SMC_PlatformPlugin            4.7.0a1
    com.apple.driver.AppleUpstreamUserClient            3.5.7
    com.apple.driver.AppleMCCSControl            1.0.20
    com.apple.kext.AppleSMCLMU            1.5.2d10
    com.apple.driver.AppleGraphicsControl            2.10.6
    com.apple.GeForce            6.3.6
    com.apple.driver.AppleUSBTCButtons            201.6
    com.apple.driver.AppleUSBTCKeyboard            201.6
    com.apple.driver.AppleIRController            303.8
    com.apple.iokit.SCSITaskUserClient            2.6.8
    com.apple.iokit.IOAHCIBlockStorage            1.6.4
    com.apple.driver.AppleAHCIPort            2.1.7
    com.apple.BootCache            31.1
    com.apple.AppleFSCompression.AppleFSCompressionTypeZlib            1.0.0d1
    com.apple.driver.AppleFWOHCI            4.7.3
    com.apple.driver.AppleEFINVRAM            1.4.0
    com.apple.driver.AppleRTC            1.3.1
    com.apple.driver.AppleSmartBatteryManager            160.0.0
    com.apple.driver.AirPortBrcm43224            428.42.4
    com.apple.driver.AppleUSBHub            4.2.4
    com.apple.nvenet            2.0.17
    com.apple.driver.AppleUSBOHCI            4.2.0
    com.apple.driver.AppleUSBEHCI            4.2.4
    com.apple.driver.AppleHPET            1.5
    com.apple.driver.AppleACPIButtons            1.3.6
    com.apple.driver.AppleSMBIOS            1.7
    com.apple.driver.AppleACPIEC            1.3.6
    com.apple.driver.AppleAPIC            1.4
    com.apple.driver.AppleIntelCPUPowerManagementClient            142.6.0
    com.apple.security.sandbox            1
    com.apple.security.quarantine            0
    com.apple.nke.applicationfirewall            2.1.14
    com.apple.driver.AppleIntelCPUPowerManagement            142.6.0
    com.apple.driver.AppleSMBusController            1.0.10d0
    com.apple.driver.AppleSMBusPCI            1.0.10d0
    com.apple.driver.AppleProfileReadCounterAction            17
    com.apple.driver.DspFuncLib            2.0.5f14
    com.apple.driver.AppleProfileTimestampAction            10
    com.apple.driver.AppleProfileThreadInfoAction            14
    com.apple.driver.AppleProfileRegisterStateAction            10
    com.apple.driver.AppleProfileKEventAction            10
    com.apple.driver.AppleProfileCallstackAction            20
    com.apple.iokit.IOFireWireIP            2.0.3
    com.apple.iokit.IOSurface            74.2
    com.apple.iokit.IOBluetoothSerialManager            2.4.5f3
    com.apple.iokit.IOSerialFamily            10.0.3
    com.apple.iokit.IOAudioFamily            1.8.3fc2
    com.apple.kext.OSvKernDSPLib            1.3
    com.apple.driver.AppleHDAController            2.0.5f14
    com.apple.iokit.IOHDAFamily            2.0.5f14
    com.apple.iokit.AppleProfileFamily            41
    com.apple.driver.IOPlatformPluginFamily            4.7.0a1
    com.apple.driver.AppleSMC            3.1.0d5
    com.apple.driver.AppleBacklightExpert            1.0.1
    com.apple.nvidia.nv50hal            6.3.6
    com.apple.NVDAResman            6.3.6
    com.apple.iokit.IONDRVSupport            2.2.1
    com.apple.iokit.IOGraphicsFamily            2.2.1
    com.apple.driver.BroadcomUSBBluetoothHCIController            2.4.5f3
    com.apple.driver.AppleUSBBluetoothHCIController            2.4.5f3
    com.apple.iokit.IOBluetoothFamily            2.4.5f3
    com.apple.driver.AppleUSBMultitouch            207.7
    com.apple.iokit.IOUSBHIDDriver            4.2.0
    com.apple.iokit.IOSCSIMultimediaCommandsDevice            2.6.8
    com.apple.iokit.IOBDStorageFamily            1.6
    com.apple.iokit.IODVDStorageFamily            1.6
    com.apple.iokit.IOCDStorageFamily            1.6.1
    com.apple.driver.AppleUSBMergeNub            4.2.4
    com.apple.driver.AppleUSBComposite            3.9.0
    com.apple.iokit.IOAHCISerialATAPI            1.2.6
    com.apple.iokit.IOSCSIArchitectureModelFamily            2.6.8
    com.apple.driver.XsanFilter            402.1
    com.apple.iokit.IOAHCIFamily            2.0.6
    com.apple.iokit.IOFireWireFamily            4.2.6
    com.apple.iokit.IO80211Family            320.1
    com.apple.iokit.IOUSBUserClient            4.2.4
    com.apple.iokit.IONetworkingFamily            1.10
    com.apple.driver.NVSMU            2.2.7
    com.apple.driver.AppleEFIRuntime            1.4.0
    com.apple.iokit.IOUSBFamily            4.2.4
    com.apple.iokit.IOHIDFamily            1.6.6
    com.apple.iokit.IOSMBusFamily            1.1
    com.apple.kext.AppleMatch            1.0.0d1
    com.apple.security.TMSafetyNet            6
    com.apple.driver.DiskImages            289.1
    com.apple.iokit.IOStorageFamily            1.6.3
    com.apple.driver.AppleACPIPlatform            1.3.6
    com.apple.iokit.IOPCIFamily            2.6.5
    com.apple.iokit.IOACPIFamily            1.3.0
    Model: MacBookPro5,1, BootROM MBP51.007E.B06, 2 processors, Intel Core 2 Duo, 2.8 GHz, 4 GB, SMC 1.33f8
    Graphics: NVIDIA GeForce 9600M GT, NVIDIA GeForce 9600M GT, PCIe, 512 MB
    Graphics: NVIDIA GeForce 9400M, NVIDIA GeForce 9400M, PCI, 256 MB
    Memory Module: global_name
    AirPort: spairport_wireless_card_type_airport_extreme (0x14E4, 0x8D), Broadcom BCM43xx 1.0 (5.10.131.42.4)
    Bluetooth: Version 2.4.5f3, 2 service, 19 devices, 1 incoming serial ports
    Network Service: Ethernet, Ethernet, en0
    Serial ATA Device: Hitachi HTS723232L9SA62, 298.09 GB
    Serial ATA Device: MATSHITADVD-R   UJ-868
    USB Device: Built-in iSight, 0x05ac  (Apple Inc.), 0x8507, 0x24400000 / 2
    USB Device: Apple Internal Keyboard / Trackpad, 0x05ac  (Apple Inc.), 0x0236, 0x04600000 / 3
    USB Device: IR Receiver, 0x05ac  (Apple Inc.), 0x8242, 0x04500000 / 2
    USB Device: BRCM2046 Hub, 0x0a5c  (Broadcom Corp.), 0x4500, 0x06100000 / 2
    USB Device: Bluetooth USB Host Controller, 0x05ac  (Apple Inc.), 0x8213, 0x06110000 / 5
    I have no idea what any of this means, but if anyone does could you please help me in figuring out what is wrong here??
    Thank you so much!
    ~Mike

    Nope, it happened again about 2 minutes into playing Diablo 3, personally it feels like it is overheating, I feel as if the bottom of the Macbook is getting really hot very quickly.
    Here is the updated crash report:
    P.S. I have uninstalled VMWare, but it still appears in the crash report... not sure what else to do I cannot find anything about VMWare under the Computer search.
    Interval Since Last Panic Report:  1636 sec
    Panics Since Last Report:          1
    Anonymous UUID:                    7B2BFC9A-4351-4CC0-8A24-3F6077B1BD3F
    Sat May 19 19:08:17 2012
    panic(cpu 1 caller 0x58c8ec97): NVRM[0/2:0:0]: Read Error 0x00000100: CFG 0xffffffff 0xffffffff 0xffffffff, BAR0 0xd4000000 0x597c7000 0x096380c1, D0, P3/4
    Backtrace (CPU 1), Frame : Return Address (4 potential args on stack)
    0x51243888 : 0x21b837 (0x5dd7fc 0x512438bc 0x223ce1 0x0)
    0x512438d8 : 0x58c8ec97 (0x58ea422c 0x58f14840 0x58eb2f88 0x0)
    0x51243978 : 0x58da95db (0x7c4e804 0x747d004 0x100 0x2aa21d)
    0x512439c8 : 0x58da05d4 (0x747d004 0x100 0x58217391 0x42)
    0x512439f8 : 0x594dd7bb (0x747d004 0x100 0x4bcd2cee 0x5119f218)
    0x51243b38 : 0x58dc8258 (0x747d004 0x747b004 0x0 0x0)
    0x51243b78 : 0x58c97e2b (0x747d004 0x747b004 0x0 0x0)
    0x51243c18 : 0x58c9450a (0x0 0x9 0x0 0x0)
    0x51243dc8 : 0x58c963d9 (0x0 0x600d600d 0x702a 0x51243df8)
    0x51243e98 : 0x58c2a582 (0xc1d0002f 0xaa910001 0x20802040 0x51243ee0)
    0x51243ef8 : 0x50dae57d (0x7d3d400 0x51243f4c 0x0 0x7)
    0x51243f58 : 0x50dae71a (0x7d40000 0x50db5e54 0x51243f78 0x2a45c9)
    0x51243f78 : 0x230235 (0x7d40000 0x0 0x51243fc8 0x227cea)
    0x51243fc8 : 0x2a179c (0x863ea0 0x0 0x10 0x0)
          Kernel Extensions in backtrace (with dependencies):
             com.apple.driver.AGPM(100.12.31)@0x50dab000->0x50db5fff
                dependency: com.apple.iokit.IOGraphicsFamily(2.2.1)@0x57ed1000
                dependency: com.apple.iokit.IONDRVSupport(2.2.1)@0x57ef3000
                dependency: com.apple.iokit.IOPCIFamily(2.6.5)@0x5111a000
             com.apple.nvidia.nv50hal(6.3.6)@0x593b2000->0x597c6fff
                dependency: com.apple.NVDAResman(6.3.6)@0x58c28000
             com.apple.NVDAResman(6.3.6)@0x58c28000->0x58f15fff
                dependency: com.apple.iokit.IOPCIFamily(2.6.5)@0x5111a000
                dependency: com.apple.iokit.IONDRVSupport(2.2.1)@0x57ef3000
                dependency: com.apple.iokit.IOGraphicsFamily(2.2.1)@0x57ed1000
    BSD process name corresponding to current thread: kernel_task
    Mac OS version:
    10K549
    Kernel version:
    Darwin Kernel Version 10.8.0: Tue Jun  7 16:33:36 PDT 2011; root:xnu-1504.15.3~1/RELEASE_I386
    System model name: MacBookPro5,1 (Mac-F42D86C8)
    System uptime in nanoseconds: 284952138421
    unloaded kexts:
    com.apple.driver.AppleFileSystemDriver          2.0 (addr 0x579c0000, size 0x12288) - last unloaded 229767652201
    loaded kexts:
    com.vmware.kext.vmnet          3.0.0 - last loaded 42448227803
    com.vmware.kext.vmioplug          3.0.0
    com.vmware.kext.vmci          3.0.0
    com.vmware.kext.vmx86          3.0.0
    com.apple.driver.AppleHWSensor          1.9.3d0
    com.apple.filesystems.autofs          2.1.0
    com.apple.driver.AGPM          100.12.31
    com.apple.driver.AudioAUUC          1.57
    com.apple.driver.AppleMikeyHIDDriver          1.2.0
    com.apple.driver.AppleIntelPenrynProfile          17
    com.apple.Dont_Steal_Mac_OS_X          7.0.0
    com.apple.driver.AppleUpstreamUserClient          3.5.7
    com.apple.driver.AppleMikeyDriver          2.0.5f14
    com.apple.driver.AppleHDA          2.0.5f14
    com.apple.driver.AudioIPCDriver          1.1.6
    com.apple.driver.AppleMCCSControl          1.0.20
    com.apple.nvenet          2.0.17
    com.apple.driver.SMCMotionSensor          3.0.1d2
    com.apple.driver.AppleGraphicsControl          2.10.6
    com.apple.GeForce          6.3.6
    com.apple.driver.AirPortBrcm43224          428.42.4
    com.apple.driver.ACPI_SMC_PlatformPlugin          4.7.0a1
    com.apple.driver.AppleLPC          1.5.1
    com.apple.kext.AppleSMCLMU          1.5.2d10
    com.apple.filesystems.ntfs          3.4
    com.apple.driver.AppleUSBTCButtons          201.6
    com.apple.driver.AppleUSBTCKeyboard          201.6
    com.apple.driver.AppleIRController          303.8
    com.apple.BootCache          31.1
    com.apple.AppleFSCompression.AppleFSCompressionTypeZlib          1.0.0d1
    com.apple.iokit.SCSITaskUserClient          2.6.8
    com.apple.iokit.IOAHCIBlockStorage          1.6.4
    com.apple.driver.AppleRTC          1.3.1
    com.apple.driver.AppleHPET          1.5
    com.apple.driver.AppleAHCIPort          2.1.7
    com.apple.driver.AppleFWOHCI          4.7.3
    com.apple.driver.AppleUSBHub          4.2.4
    com.apple.driver.AppleUSBEHCI          4.2.4
    com.apple.driver.AppleUSBOHCI          4.2.0
    com.apple.driver.AppleEFINVRAM          1.4.0
    com.apple.driver.AppleSmartBatteryManager          160.0.0
    com.apple.driver.AppleACPIButtons          1.3.6
    com.apple.driver.AppleSMBIOS          1.7
    com.apple.driver.AppleACPIEC          1.3.6
    com.apple.driver.AppleAPIC          1.4
    com.apple.driver.AppleIntelCPUPowerManagementClient          142.6.0
    com.apple.security.sandbox          1
    com.apple.security.quarantine          0
    com.apple.nke.applicationfirewall          2.1.14
    com.apple.driver.AppleIntelCPUPowerManagement          142.6.0
    com.apple.driver.AppleProfileReadCounterAction          17
    com.apple.driver.AppleProfileTimestampAction          10
    com.apple.driver.AppleProfileThreadInfoAction          14
    com.apple.driver.AppleProfileRegisterStateAction          10
    com.apple.driver.AppleProfileKEventAction          10
    com.apple.driver.AppleProfileCallstackAction          20
    com.apple.iokit.IOSurface          74.2
    com.apple.iokit.IOBluetoothSerialManager          2.4.5f3
    com.apple.iokit.IOSerialFamily          10.0.3
    com.apple.driver.DspFuncLib          2.0.5f14
    com.apple.iokit.IOAudioFamily          1.8.3fc2
    com.apple.kext.OSvKernDSPLib          1.3
    com.apple.driver.AppleSMBusController          1.0.10d0
    com.apple.driver.AppleHDAController          2.0.5f14
    com.apple.iokit.IOHDAFamily          2.0.5f14
    com.apple.iokit.IOFireWireIP          2.0.3
    com.apple.iokit.AppleProfileFamily          41
    com.apple.iokit.IO80211Family          320.1
    com.apple.iokit.IONetworkingFamily          1.10
    com.apple.driver.NVSMU          2.2.7
    com.apple.driver.IOPlatformPluginFamily          4.7.0a1
    com.apple.driver.AppleSMBusPCI          1.0.10d0
    com.apple.driver.AppleBacklightExpert          1.0.1
    com.apple.driver.AppleSMC          3.1.0d5
    com.apple.nvidia.nv50hal          6.3.6
    com.apple.NVDAResman          6.3.6
    com.apple.iokit.IONDRVSupport          2.2.1
    com.apple.iokit.IOGraphicsFamily          2.2.1
    com.apple.driver.BroadcomUSBBluetoothHCIController          2.4.5f3
    com.apple.driver.AppleUSBBluetoothHCIController          2.4.5f3
    com.apple.iokit.IOBluetoothFamily          2.4.5f3
    com.apple.driver.AppleUSBMultitouch          207.7
    com.apple.iokit.IOUSBHIDDriver          4.2.0
    com.apple.driver.AppleUSBMergeNub          4.2.4
    com.apple.driver.AppleUSBComposite          3.9.0
    com.apple.iokit.IOSCSIMultimediaCommandsDevice          2.6.8
    com.apple.iokit.IOBDStorageFamily          1.6
    com.apple.iokit.IODVDStorageFamily          1.6
    com.apple.iokit.IOCDStorageFamily          1.6.1
    com.apple.driver.XsanFilter          402.1
    com.apple.iokit.IOAHCISerialATAPI          1.2.6
    com.apple.iokit.IOSCSIArchitectureModelFamily          2.6.8
    com.apple.iokit.IOAHCIFamily          2.0.6
    com.apple.iokit.IOFireWireFamily          4.2.6
    com.apple.iokit.IOUSBUserClient          4.2.4
    com.apple.iokit.IOUSBFamily          4.2.4
    com.apple.driver.AppleEFIRuntime          1.4.0
    com.apple.iokit.IOHIDFamily          1.6.6
    com.apple.iokit.IOSMBusFamily          1.1
    com.apple.security.TMSafetyNet          6
    com.apple.kext.AppleMatch          1.0.0d1
    com.apple.driver.DiskImages          289.1
    com.apple.iokit.IOStorageFamily          1.6.3
    com.apple.driver.AppleACPIPlatform          1.3.6
    com.apple.iokit.IOPCIFamily          2.6.5
    com.apple.iokit.IOACPIFamily          1.3.0
    Model: MacBookPro5,1, BootROM MBP51.007E.B06, 2 processors, Intel Core 2 Duo, 2.8 GHz, 4 GB, SMC 1.33f8
    Graphics: NVIDIA GeForce 9600M GT, NVIDIA GeForce 9600M GT, PCIe, 512 MB
    Graphics: NVIDIA GeForce 9400M, NVIDIA GeForce 9400M, PCI, 256 MB
    Memory Module: global_name
    AirPort: spairport_wireless_card_type_airport_extreme (0x14E4, 0x8D), Broadcom BCM43xx 1.0 (5.10.131.42.4)
    Bluetooth: Version 2.4.5f3, 2 service, 19 devices, 1 incoming serial ports
    Network Service: Ethernet, Ethernet, en0
    Serial ATA Device: Hitachi HTS723232L9SA62, 298.09 GB
    Serial ATA Device: MATSHITADVD-R   UJ-868
    USB Device: Built-in iSight, 0x05ac  (Apple Inc.), 0x8507, 0x24400000 / 2
    USB Device: BRCM2046 Hub, 0x0a5c  (Broadcom Corp.), 0x4500, 0x06100000 / 2
    USB Device: Bluetooth USB Host Controller, 0x05ac  (Apple Inc.), 0x8213, 0x06110000 / 3
    USB Device: Apple Internal Keyboard / Trackpad, 0x05ac  (Apple Inc.), 0x0236, 0x04600000 / 3
    USB Device: IR Receiver, 0x05ac  (Apple Inc.), 0x8242, 0x04500000 / 2
    Any Ideas?? Thanks again!
    ~Mike

  • Need Help figuring out security sandbox issue after changing webhost

    I'm in the process of switching my webhost from 1&1 shared hosting to a dedicated IP address with a smaller company that specializes in Drupal sites and doesn't know much about flash. 
    1&1 is still the Registrar for my domain, but I've 'parked' YourGods.com on the Holistic servers and have 'pointed' my site to the Holistic DomainNameServers instead of the 1&1 servers.
    After doing this, my Flash site (which is based on the Gaia framework) stopped working, and the Flashplayer Debugger, gave me the following errors:
    Error: Failed to load policy file from xmlsocket://127.0.0.1:5800
    Error: Request for resource at xmlsocket://127.0.0.1:5800 by requestor from http://www.yourgods.com/bin/main.swf has failed because the server cannot be reached.
    *** Security Sandbox Violation ***
    Connection to 127.0.0.1:5800 halted - not permitted from http://www.yourgods.com/bin/main.swf
    Someone helping me on another thread thought 127.0.0.1:5800 might mean the problem had to do with my paths and that I was trying to access something on my local computer, as opposed to being a standard cross-domain issue where one server was trying to access files on another, unrelated server.
    Can someone clarify this?
    I Googled 127.0.0.1:5800 and found some stuff about loops between a server and the originating computer but I'm really not sure how to put all of this together.
    Is there a way (with the flash debugger or other software) to step through my actionscript code with periodic breakpoints so I can figure out what line is causing the problem?
    Or a way to figure out if this is a problem between Holistic and my local computer or Holistic and the 1&1 web servers?
    Thanks for any help.

    Thanks Josh.
    I finally tracked this down last night with help from the folks at actionscript.org.  I hadn't deactivated my Debugger which runs off of a desktop AIR application - so the server was trying to reach my localhost to run its trace statements.  Deactivating the Debugger fixed the problem. 

  • Need Help Figuring Out an Icon

    Hello,
    I am using a template and I see the following icons next to the comp icon - can you please help me figure out what they are?
    Thank you!

    One layer is being used as a track matte for another layer. Read up on Track Mattes here.
    Track Mattes are one of the very basic things you should know about working with AE. If you don't know what they are, there must be a TON of other useful things you've missed. I would highly recommend that you go through these resources before you do much more in AE. It will help you work with a lot less frustration.

  • I started making a movie in the new imovie '10.  I opened up the project and can not record any new audio.  All the recorded audio and music isn't playing.  I can't figure out what's going on, I teach a flipped classroom and need to get these videos done!

    I am not sure what is going on, but I need help ASAP! 

    soon as you start up the computer, keep hitting the F1 key.  That should get you into the BIOS.
    Also, try disabling Active System Protection for your freezing issues.  I'm using XP so  I don't know where to tell you to find it in Vista.

  • I need help figuring out GRUB [SOLVED]

    So, I'm having a bit of trouble figuring out how grub's menu.lst should be configured on my system. I've scoured the internet and wiki, but I can't quite get it. Hopefully you can help me!
    Here's some info:
    joe@Snow-Crash:~$ sudo fdisk -l
    [sudo] password for joe:
    Disk /dev/sda: 160.0 GB, 160041885696 bytes
    255 heads, 63 sectors/track, 19457 cylinders
    Units = cylinders of 16065 * 512 = 8225280 bytes
    Disk identifier: 0x1e721e72
       Device Boot      Start         End      Blocks   Id  System
    /dev/sda1               1       16554   132969973+  83  Linux
    /dev/sda2   *       16555       19104    20482875   83  Linux
    /dev/sda3           19105       19457     2835472+   5  Extended
    /dev/sda5           19105       19457     2835441   82  Linux swap / Solaris
    I have HH 8.04 on my main partition [sda1], and I'm trying to put Arch on my 20gb sda2 partition. I followed the beginner's guide up to the install grub section. When it had me review menu.lst the pertinent Arch section was
    "title Arch Linux
    root (hd0,0)
    kernel /vmlinuz26 root=/dev/hda3 ro
    initrd /kernel26.img"
    Now, I was planning on just copying this bit and pasting it into HH's menu.lst (and not installing grub in arch's partition), but I thought that it didn't seem quite right. It turns out I was right, since I get an "error 15: File not found" when I choose to boot Arch.
    So what should it be? This is how I understand it, in my admittedly newbie way.
    Am I mistaken in that it should be "root (hd0,0)"   Since the root command points to where grub is residing (and I'm using HH's grub in sda1)?
    And "kernel (hd0,1)/vmlinuz26 root=/dev/sda2" Since I need to designate that the kernel is on a different partition than (hd0,0), and my Arch partition is sda2?
    and as far as I can tell it should be "initrd (hd0,1)/kernel26.img" since it's on a different partition.
    I know I'm doing something wrong here, since I still get the same "file not found" error message. Can someone point out the error in my ways?
    PS: Since I was having trouble with this I decided to try to to install GRUB in sda2 and use chainloader to point to it from HH's menu.lst. But when I tried to install grub via my Arch cd it gave me a generic "unable to install Grub" message. So I'm up a creek!
    I hope you guys can help me out! Thanks.
    Last edited by Joe_Arch (2008-11-27 07:51:13)

    Welcome Joe_Arch,
    You have to set the root to the partition that contains the "OS image" (the kernel).  Also, you apparently don't have a separate /boot partition, so you have to add /boot/ to the beginning of the file names.
    root (hd0,1)
    kernel /boot/vmlinuz26 root=/dev/sda2 ro
    initrd /boot/kernel26.img

  • Need Help figuring out a percentage formula

    Hi, I have a simple percentage formula that i' struggling to figure out.
    I need a formula to work out what A7 is as a percentage of the figure in B4. So in other words what 54.66% of £1998.14 is. Does anyone know how to do this?
    I need to use the percentage in A7 as part of the formula as the percentage is updated automatically when other values are changed.
    The screenshot is below and a link to the screenshot is here in case yo can't see it: https://www.dropbox.com/s/2ji7qdxmh4ymkby/Screen%20shot%202014-10-04%20at%2012.2 2.34.jpg?dl=0
    Thanks

    Hi alierrett,
    Check here:
    Simple Percentage Formula Help
    It will work in '09 too.
    quinn

  • I can't figure out what im doing wrong with my File I/O program lol

    I'm new to the java language and was wondering if anybody could help me with the program i an writing. I don't quite understand file I/O but I've given it my best and I'm stuck. I'm supposed to write a program that will read in a file of student academic credit data and create a list of students on academic warning. The list of students on warning will be written to a file. Each line of the input file will contain the
    student name (a single String with no spaces), the number of semester hours earned (an integer), the total quality points earned (a double). The program should compute the GPA (grade point or quality point average) for each student (the total quality points divided by the number of semester hours) then write the student information to the output file if that student should be put on academic warning. A student will be on warning if he/she has a GPA less than 1.5 for students with fewer than 30 semester hours credit, 1.75 for students with fewer than 60 semester hours credit, and 2.0 for all other students. The instructions are :
    1. Set up a Scanner object scan from the input file and a PrintWriter outFile to the output file inside the try
    clause (see the comments in the program). Note that you’ll have to create the PrintWriter from a FileWriter,
    but you can still do it in a single statement.
    2. Inside the while loop add code to read the input file—get the name, the number of credit hours, and the
    number of quality points. Compute the GPA, determine if the student is on academic warning, and if so
    write the name, credit hours, and GPA (separated by spaces) to the output file.
    3. After the loop close the PrintWriter and Scanner objects in a finally block.
    4. Think about the exceptions that could be thrown by this program:
    • A FileNotFoundException if the input file does not exist
    • A InputMismatchException if it can’t read an int or double when it tries to – this indicates an error in the
    input file format
    • An IOException if something else goes wrong with the input or output stream
    Add a catch for each of these situations, and in each case give as specific a message as you can. The
    program will terminate if any of these exceptions is thrown, but at least you can supply the user with useful
    information.
    5. Test the program. Test data is in the file students.txt. Be sure to test each of the exceptions as well.
    My source code is:
    // Warning.java
    // Reads student data from a text file and writes data to another text file.
    import java.util.*;
    import java.io.*;
    public class Warning
    // Reads student data (name, semester hours, quality points) from a
    // text file, computes the GPA, then writes data to another file
    // if the student is placed on academic warning.
    public static void main (String[] args)
         int creditHrs; // number of semester hours earned
         double qualityPts; // number of quality points earned
         double gpa; // grade point (quality point) average
         Scanner scan=null;
         PrintWriter outFile=null;
         String name, inputName = "students.txt";
         String outputName = "warning.txt";
         try
              // Set up Scanner to input file
              scan=new Scanner(new FileInputStream(inputName));
              // Set up the output file stream
              outFile = new PrintWriter(new FileWriter(outputName));
              // Print a header to the output file
              outFile.println ();
              outFile.println ("Students on Academic Warning");
              outFile.println ();
              // Process the input file, one token at a time
              while (scan.hasNext())
                   // Get the credit hours and quality points and
                   // determine if the student is on warning. If so,
                   // write the student data to the output file.
                   name=scan.next();
                   creditHrs=scan.nextInt();
                   qualityPts=scan.nextDouble();
                   gpa=qualityPts/creditHrs;
                   if ((gpa < 1.5 && creditHrs < 30) || (gpa < 1.75 && creditHrs < 60) || (gpa < 2.0 && creditHrs >= 60))
                        outFile.print(name + " ");
                        outFile.print(creditHrs + " ");
                        outFile.print(qualityPts + " ");
                        outFile.print(gpa);
              //Add a catch for each of the specified exceptions, and in each case
              //give as specific a message as you can
    catch (FileNotFoundException e)
    System.out.println("The file " + inputName + " was not found.");
    catch (IOException e)
    System.out.println("The I/O operation failed and " + outputName + " could not be created.");
    catch (InputMismatchException e)
    System.out.println("The input information was not of the right type.");
              //Close both files in a finally block
    finally
         scan.close();
         outFile.close();
    The txt file is:
    Smith 27 83.7
    Jones 21 28.35
    Walker 96 182.4
    Doe 60 150
    Wood 100 400
    Street 33 57.4
    Taylor 83 190
    Davis 110 198
    Smart 75 292.5
    Bird 84 168
    Summers 52 83.2
    The program will run and then terminate without creating warning.txt. How can I get it to create the warning .txt file? Any help that you could give would be greatly appreciated.

    Alright, here is my code reposted:
    // Warning.java
    // Reads student data from a text file and writes data to another text file.
    import java.util.;
    import java.io.;
    public class Warning
    // // Reads student data (name, semester hours, quality points) from a
    // text file, computes the GPA, then writes data to another file
    // if the student is placed on academic warning.
    public static void main (String[] args)
    int creditHrs; // number of semester hours earned
    double qualityPts; // number of quality points earned
    double gpa; // grade point (quality point) average
    Scanner scan=null;
    PrintWriter outFile=null;
    String name, inputName = "students.txt";
    String outputName = "warning.txt";
    try
    // Set up Scanner to input file
    scan=new Scanner(new FileInputStream(inputName));
    // Set up the output file stream
    outFile = new PrintWriter(new FileWriter(outputName));
    // Print a header to the output file
    outFile.println ();
    outFile.println ("Students on Academic Warning");
    outFile.println ();
    // Process the input file, one token at a time
    while (scan.hasNext())
    // Get the credit hours and quality points and
    // determine if the student is on warning. If so,
    // write the student data to the output file.
    name=scan.next();
    creditHrs=scan.nextInt();
    qualityPts=scan.nextDouble();
    gpa=qualityPts/creditHrs;
    if ((gpa < 1.5 && creditHrs < 30) || (gpa < 1.75 && creditHrs < 60) || (gpa < 2.0 && creditHrs >= 60))
    outFile.print(name " ");
    outFile.print(creditHrs " ");
    outFile.print(qualityPts " ");
    outFile.print(gpa);
    //Add a catch for each of the specified exceptions, and in each case
    //give as specific a message as you can
    catch (FileNotFoundException e)
    System.out.println("The file " inputName " was not found.");
    catch (IOException e)
    System.out.println("The I/O operation failed and " outputName + " could not be created.");
    catch (InputMismatchException e)
    System.out.println("The input information was not of the right type.");

Maybe you are looking for

  • QT Export To DV Gives Weird "Interlaced" Result

    I have FCP 4.5 and Quicktime 6.5.2 and OS 10.3.9. I recently upgraded DivX to DivX 6 "Convertor". That may or may not be related to this issue. I really don't know. I've been sent some AVI files to edit in FCP 4.5 before being made into a DVD. I deci

  • IO Actual Line Items Balance Carry Forward

    HI Guru's, We are using one IO for  Expenses and Reciepts.. Expenses is for 2007  1000 Reciepts is for 2007    1500 No Budget and Commitments Items.. any chance carry forward remaining balance 500 to next year.. what is tcode.. regards JK

  • Migrating parked invoices

    We have a large number of parked invoices to migrate into SAP from an external system. Note 381593 states that transaction MIR7 cannot be used via batch processing and to use BAPI BUS2081 instead.  However this is not available via the LSMW. Are ther

  • How do I create a slideshow with selected photos on my iPad2

    I want to create a slideslow using selected photos (not all photos) from the photos that I've imported to my iPad.  Can you tell me how to do this?

  • FM Transmitter Problem with iPhone 3G

    Hi there. I have an iPhone 3G and a fm transmitter for my car. Basicly when I plug the headphone cable from the fm transmitter into my iPhone 3G it dosent sit in flush, it keeps poping out. I have been looking on eBay for a 3.5mm jack .. Would this s