Stuck Please Help

I have to loop through all of the employees in a hashMap collection:
This is what I have so far:
Iterator inerator = employees.iterator();
StringBuffer output = new String Buffer("");
while (iterator.hasNext())
   Object currentKey = iterator.next();
   Employee employee = (Employee) employees.get(currentKey); 
   //I HAVE AN ERROR HERE:  ERROR = THE METHOD get(int) IN THE TYPE     LIST IS NOT APPLICABLE FOR THE ARGUMENTS (Object)
   output.append(employee.toString() + "\n");Is this error coming for using a hashMap?

Here is my code maybe this will help understand what Iam doing wrong
private void runPayroll(List employees)
// **** add code ****
// sort the list of employees (using a PersonComparator object)
Collections.sort(employees, new PersonComparator());
//System.out.println("test"+ employees);  //See the sorted list
// place the following code in a try-catch statement to check for the following errors
//- InvalidValue (the pay units must be a decimal number > 0)
try
double payRate = Double.parseDouble(jtfPayRate.getText());
catch (InvalidValueException ivEx)
JOptionPane.showMessageDialog(this, "the pay units must be a decimal number > 0", "Error Message", JOptionPane.ERROR_MESSAGE);
return;
// loop through all of the employees in the collection 'while with an iterator'
Iterator iterator = employees.iterator();
StringBuffer output = new StringBuffer("");
while (iterator.hasNext())
Map.Entry currentKey = (Map.Entry)iterator.next();
Object key = currentKey.getKey();
Employee employee = (Employee)currentKey.getValue(currentKey);
output.append( employee.toString() + "\n" );
// get the next employee
// create a new paycheck for the employee
// prompt the user for the number of pay units for employee
// calculate the amount of the paycheck               
// end loop     //     
// **** end - add code ****
}

Similar Messages

  • Time Machine backup gets stuck - Please help

    Hi all,
    I'm backing up my MBP via ethernet to a Time Capsule. The incremental backups take forever and are driving me nuts. The backups seem to be getting stuck midway. The disk sounds like it's spinning but the progress bar doesn't move. Also, it seems to be copying over too many files every hour, like >60000 or so (log below). I doubt that so many files get modified every hour.
    I've tried everything (I could think of and find on the discussion boards) like deleting the sparsebundle, deleting the entire backup drive, playing with the backup frequency, nothing works.
    Please help!!
    Thanks,
    DB
    11/27/08 10:02:57 PM /System/Library/CoreServices/backupd[7045] Starting standard backup
    11/27/08 10:02:57 PM /System/Library/CoreServices/backupd[7045] Network mountpoint /Volumes/TC Backup Disk not owned by backupd... remounting
    11/27/08 10:02:57 PM /System/Library/CoreServices/backupd[7045] Network volume mounted at: /Volumes/TC Backup Disk-1
    11/27/08 10:03:07 PM /System/Library/CoreServices/backupd[7045] Disk image /Volumes/TC Backup Disk-1/Dhiren's MBP_002332d43774.sparsebundle mounted at: /Volumes/Backup of Dhiren's MBP
    11/27/08 10:03:07 PM /System/Library/CoreServices/backupd[7045] Backing up to: /Volumes/Backup of Dhiren's MBP/Backups.backupdb
    11/27/08 10:04:39 PM /System/Library/CoreServices/backupd[7045] No pre-backup thinning needed: 570.5 MB requested (including padding), 426.79 GB available
    11/27/08 10:14:44 PM /System/Library/CoreServices/backupd[7045] *_Copied 87124 files_* (20.3 MB) from volume Macintosh HD.
    11/27/08 10:14:48 PM /System/Library/CoreServices/backupd[7045] No pre-backup thinning needed: 559.1 MB requested (including padding), 426.69 GB available
    11/27/08 10:15:02 PM /System/Library/CoreServices/backupd[7045] Unable to rebuild path cache for source item. Partial source path:
    11/27/08 10:15:02 PM /System/Library/CoreServices/backupd[7045] Error: (-39) SrcErr:YES Copying (null) to (null)
    11/27/08 10:15:14 PM /System/Library/CoreServices/backupd[7045] Copied 1067 files (10.6 MB) from volume Macintosh HD.
    11/27/08 10:15:22 PM /System/Library/CoreServices/backupd[7045] Starting post-backup thinning
    11/27/08 10:15:22 PM /System/Library/CoreServices/backupd[7045] No post-back up thinning needed: no expired backups exist
    11/27/08 10:15:22 PM /System/Library/CoreServices/backupd[7045] Backup completed successfully.
    11/27/08 10:15:26 PM /System/Library/CoreServices/backupd[7045] Ejected Time Machine disk image.
    11/27/08 10:15:32 PM /System/Library/CoreServices/backupd[7045] Ejected Time Machine network volume.
    11/27/08 10:15:32 PM /System/Library/CoreServices/backupd[7045] Ejected Time Machine network volume.
    Message was edited by: dhiren9

    The indication that the backup completed successfully is the best evidence that it did. If you want something more explicit, you can proceed as below.
    Launch the Terminal application in any of the following ways:
    ☞ Enter the first few letters of its name into a Spotlight search. Select it in the results (it should be at the top.)
    ☞ In the Finder, select Go ▹ Utilities from the menu bar, or press the key combination shift-command-U. The application is in the folder that opens.
    ☞ Open LaunchPad. Click Utilities, then Terminal in the icon grid.
    Drag or copy — do not type — the following line into the Terminal window, then press return:
    sudo tmutil compare
    You'll be prompted for your login password, which won't be displayed when you type it. You may get a one-time warning not to screw up.
    The command will take at least a few minutes to run. Eventually some lines of output will appear below what you entered.
    Each line that begins with a plus sign (“+”) represents a file that has been added to the source volume since the last snapshot was taken. These files have not been backed up yet.
    Each line that begins with an exclamation point (“!”) represents a file that has changed on the source volume. These files have been backed up, but not in their present state.
    Each line that begins with a minus sign (“-“) represents a file that has been removed from the source volume.
    Files that you’ve excluded from backup, or that are excluded automatically, are ignored.
    At the end of the output, you’ll get some lines like the following:
    Added:
    Removed:
    Changed:
    These lines show the total amount of data added, removed, or changed on the source(s) since the last snapshot.

  • Library disappeared - I'm stuck - please help

    We just moved so I unplugged my computer. I backed up files onto a portable hard drive.
    After hooking up my computer at my new place, my itunes library is blank. I see 2 choices, but I'm afraid to press any buttons and wipe out the songs which are stored on my ipod.
    1) Automatically sync songs to my ipod. It says it syncs ipod to mirror music library (which is blank) so I don't think I want that one.
    2) Follow the new computer instructions - Drag itunes folder to itunes window?? Where is the itunes window? I've copied the files a few times (from external hard drive into itunes as well as file stored under my documents/my music (where I can see the songs I've purchased.)
    I'm just stuck and worried I'll lose all the songs I've paid for. Can someone please help me?
    Thanks!
    Dianne

    *After hooking up my computer at my new place, my itunes library is blank*
    In addition to your back-up, are all your songs still in the usual folder(s) on your computer? Try holding down the Shift key in Windows when opening iTunes. In the resulting dialogue you will get the option to create a new library or navigate to an existing one. The default location for your iTunes library is in C:\Documents and Settings\Username\My Documents\My Music\iTunes\ (or C:\Username\Music\iTunes\ in Vista). Look in there and see if you have more than one library file (they have the extension .itl) If you have more than one try opening them in turn, you may find your original library is still intact: How to open an alternate iTunes Library file
    *but I'm afraid to press any buttons and wipe out the songs which are stored on my ipod.*
    If your iPod is set to update automatically you need to take care connecting to an empty iTunes. You can use a keyboard command to prevent your iPod auto-syncing with iTunes. While connecting the iPod to the computer on Windows with iTunes 7.3 or later installed hold down the Shift + Ctrl keys together. This will stop the iPod from auto-syncing with iTunes and the iPod will appear in the source list. Wait until you are sure the iPod has mounted, and that it will not auto sync and then you can let the keys go. This may take between 20 to 30 seconds depending on your computer: iTunes - Keyboard Shortcuts for Windows
    When your iPod appears in the iTunes source list change the update setting to manual, that way you can continue to use your iPod without the risk of accidentally erasing it. Also when using most of the utilities listed below your iPod needs to be enabled for disc use, changing to manual update will do this by default: Managing content manually on iPod and iPhone
    Once you are safely connected there are a few things you can do to restore your iTunes from the iPod. There are a number of third party utilities that you can use to retrieve music files and playlists from your iPod. I use Senuti but have a look at the web pages and documentation for the others too, you'll find that they have varying degrees of functionality and some will transfer movies, videos, photos and games as well. This is just a small selection of what's available, you can read reviews and comparisons of some of them here:
    Wired News - Rescue Your Stranded Tunes
    Comparison of iPod managers
    Senuti Mac Only (Currently only the beta version is iPod Touch & iPhone compatible)
    PodView Mac Only
    PodWorks Mac Only
    iPodDisk PPC Mac Only (experimental version available for Intel Macs)
    TuneAid Mac only (iPhone and iPod Touch compatible)
    iPodRip Mac & Windows
    YamiPod Mac & Windows
    Music Rescue Mac & Windows
    iPod Music Liberator Mac & Windows
    iGadget Mac & Windows (iPhone and iPod Touch compatible)
    Floola Mac & Windows
    iRepo Mac & Windows (iPhone and iPod Touch compatible)
    iPod Access Mac & Windows (iPhone and iPod Touch compatible)
    TouchCopy Mac & Windows (iPhone and iPod Touch compatible)
    If you have any iTunes Music Store purchases the transfer of purchased content only from the iPod to authorised computers was introduced with iTunes 7. You'll find details in this article: Copying iTunes Store purchases from your iPod or iPhone to a computer
    There's also a manual method of copying songs from your iPod to a Mac or PC. The procedure is a bit involved and won't recover playlists but if you're interested it's available on page 2 at this link: Copying Content from your iPod to your Computer - The Definitive Guide
    Keep your iPod in manual mode until you have reloaded your iTunes and you are happy with your playlists etc then it will be safe to return it auto-sync.

  • Tried to install the latest update on my ipad. i get an image of "itunes" with a connecting cord. hasnt changed in three hours. if i turn it off, it goes right back to same image on black background. i am stuck, please help me, thanks

    i tried to install the latest update on my ipad. i get an image which says I tunes with a cord to plug in. it is on a black background.. it has been like this for three hours now. if i turn it off and then on again that is the only page that appears. i am stuck. please can anyone help me? thanks.

    It's too bad you lost stuff. I would recommend that you back stuff up before the next one. For example, iOS8 will be out sometime this fall. Just in case you experience the same thing again, do a backup before you do the update.

  • Installed the OS X Yosemite my computer  froze up daily, trying to reinstall then I got really stucked, please help

    My computer kept freeze up daily with OS X Yosemite installed a while ago, and I followed the other  instruction to do "OS X" Recovery to: (1) erased my start up disk (2) Reinstalling Mac OS X Yosemite.
    While  about 18 or 20 minutes remaining from the installation, it went back to 2 hours 57 minutes but stuck there. I let my computer run over night but it was still at 2 hours 57 minutes. so I cancelled the installation which seemed to be the only choice.
    I tried again today, erased my start up disk and reinstalled again, same situation happened again, when the remaining time said around 20 minutes, it went back to 2 hours 56 minutes and stuck there.  I cancelled it again.
    I read some other instructions in this community and did a hard shutdown and restarted while hold down the command key + R key. it took me to the disk manager screen and the only choice I had was the OS X Lion version.
    I tried to install the OS X Lion, it said that will take 3 hours or so, after 20 minutes, a screen came up and said I need to turn off the computer by press the power button down then turn the computer on again.  And I did.  When I turn on the computer again, with Comand + R key pressed, I had to wait for an
    internet recovery before I went back to the disk manager and trying to reinstall the OS X system. It kept coming back to ask me to turn the power off…
    what can I do?  Please help,
    MacBook Air

    Boot back into the Recovery Partition. Run Disk Utility Verify/Repair and Repair Permissions until you get no errors. Then re-install the OS.
    X Yosemite Installation Stuck with Minutes Remaining?

  • I had 4 albums on my iPhone 5C, all bar 1 song on each album has been deleted, I can't delete these songs at all.  Show all music is not on and I am stuck, please help

    please help. I have tried deleting songs on my iPhone 5c and all but one song on each album have deleted.  When I try to delete these songs they just start playing.   Show all music is off.

    This will delete all the music from the device:
    Settings > General > Usage > Music > Edit > > Delete

  • My iPod is stuck, please help me...

    my iPod, for some reason, has frozen, as if the lock switch is on. when I turn on the switch(orange pad showing), nothing happens. but when i turn it back off(orange pad not showing),the ipod turns off, and not in the regular way. the screen shuts off, but some of the scren is still showing on the LCD. then i can turn it back on with the center button(showing the apple logo), and it turns back on, still frozen. please help me.

    Is the iPod recognized by the computer?
    Have you tried a Reset or Restore?
    Check out these links:
    5Rs
    5Rs Tutorials
    Restoring iPod to Factory Settings
    iPod Does Not Appear in My Computer
    iPod Appears in Windows but not in iTunes
    iPod Appears on OS X Desktop but not in iTunes
    iPod Doesn’t Appear on OS X Desktop or in iTunes
    I hope this helps!

  • I tunes 7 bugs and downgrades? so stuck please help

    i downloaded iT7, worked fine sound, speed, interface, updated to 7.0.1 and every song is static. tried to downgrade to 6.0.5 but wont allow to open library since it was rewritten by iT7. please help what should i do and how can i do it are all my songs this way or will it be fixable? dont kow what to do.

    hopefully they will come out with a fix on this, there are a lot of people in this same boat.

  • MacBook Pro stuck please help!!!

    I just used a program called Drive Genius to speed up my MBP. I verified the disk, then repaired it. When I finished and went to restart my mac, the Apple logo comes up, then a grey screen comes down with 5 different languages telling me to restart my MBP. I have restarted it about 25 times, I have tried to resent the pram on it, with no help, and I am still stuck on the screen. Can anyone please give me some advice before I have to do a full reinstall of the mac osx, or before I take it to the Apple store??

    Check out the following:
    http://docs.info.apple.com/article.html?artnum=106805 Mac OS X: "Broken folder" icon, prohibitory sign, or *kernel panic* when computer starts
    User Tips: Kernel Panics

  • Wireless update freezes phone now stuck please help

    my torch has started a wirless update but when getting through back up freezes between 8 an 20 % . Have noticed in forum that this is known but for a computer update you just take out this as a back up option but on a wireless update the phone is stuck if I do a battery pull and put itback after few mins it starts again and tries to update is there anyway to cancel update or solve this. tried pluggin into pc but doesnt do anything different. please help

    Hello,
    A forced wireless update? I've honestly never seen that...quite unusual...normally, you must initiate the process. Nevertheless, as I'm sure you've seen, OTA updates are NEVER recommended for exactly the situation you are experiencing. The OTA update conducts an on-device backup, which is used to restore after a successful OS update. But, if anything should go wrong, that backup file is lost forever. Hence, updating via PC is recommended since you then have the opportunity to take a manual backup and store that resulting IPD file on your PC.
    But, back to your issue...the update being forced is rather strange. If there's no way to prevent it, then perhaps you could try the following:
    Turn off all network connections (both mobile carrier data network as well as WiFi) and then do a batt-pull reboot. See if the update continues to be forced...if not, then proceed with a PC/USB based update.
    Failing that, try booting into Safe Mode and see if you can then keep the forced update from running:
    KB17877 How to start a BlackBerry smartphone in Safe Mode
    I've honestly never tried to update the BB OS (from a PC) when the BB is in Safe Mode, but you could give that a try and see if it helps.
    Let us know how those attempts work out for you.
    Cheers!
    Occam's Razor nearly always applies when troubleshooting technology issues!
    If anyone has been helpful to you, please show your appreciation by clicking the button inside of their post. Please click here and read, along with the threads to which it links, for helpful information to guide you as you proceed. I always recommend that you treat your BlackBerry like any other computing device, including using a regular backup schedule...click here for an article with instructions.
    Join our BBM Channels
    BSCF General Channel
    PIN: C0001B7B4   Display/Scan Bar Code
    Knowledge Base Updates
    PIN: C0005A9AA   Display/Scan Bar Code

  • I am stuck, please help...

    When I started development in Air, I was told I could develop with Flash. I have Flash CS4, and I went ahead and downloaded an update that allowed me to develop air 1.5.0 applications withing the familiar settings of Flash.
    All I had to do is to create a new Air File, and then publish and that was it.
    But, Adobe released Air 1.5.2. It does have an SDK update, but it does not seem to have an update for those of us who use Flash CS4 for deployment, so, when I compile my flash files, it does not seem to be in the new 1.5.2 version. I tried to update CS4 many times, and I have the latest updates, but none include the Air 1.5.2 update.
    How do I manually update my Flash CS4 if possible? Does adobe provide such update? If not, why leave developers who were using flash to develop their applications in limbo?
    Adobe, Please respond.
    Thanks.

    Hopefully, this'll help:
    http://java.sun.com/docs/books/tutorial/uiswing/overview/event.html
    That's assuming the applet uses the 1.1 event model...
    You'd have to override specifically the class that defines the event handling in the applet. You'd have to do a little reverse-engineering.
    Maybe javap would help.
    And given than you're hijacking someone else's code...it may be better all around just to rewrite it from scratch.

  • Newbie Stuck, please help!

    hello all.
    i'm really stuck. the website i'm working on used to have a
    .htaccess in each admin folder, but now that it's been moved off
    apache to tomcat, this isn't working at all, and about 20 admin
    areas are now completely open and not password protected. I'm
    completely new to coldfusion and from a php background. I was
    hoping someone might know a way to protect the content of these
    folders quickly and easily with coldfusion. I've read that there
    are proprietry functions within CFML for login, roles, logout and
    session management but I'm not getting anywhere with it. Has
    anybody got a little bit of simple code that could help me out?? I
    would be so, so, so grateful...
    Thanks,
    Alex

    Put a test for a SESSION variable created when a user logs in
    (such as SESSION.isLoggedIn) into the Application.cfm of the
    directories to be protected. If the SESSION variable is not
    detected, redirect them to as login page above the protected
    directoies.

  • SIM Card Stuck Please Help

    I inserted my original iphone sim card into my brand new 3g and am trying to get it back out, but it isn't popping out now. Please tell me that I didn't just break the phone already. Help please.

    moochieh,
    Did you fit the SIM card into the SIM tray prior to inserting it? I've seen situations where accidentally inserting the SIM without the tray can result in this.
    Here is an article the outlines the process of removing it (giving you an idea of reinserting it as well):
    Removing SIM card prior to iPhone repair
    http://support.apple.com/kb/HT1438?viewlocale=en_US
    If your still can't manage to remove the SIM to reinsert it, you can always visit an Apple Store your area and they should be able to help: http://www.apple.com/retail/
    Hope this helps,
    Raleigh

  • Mac Pro is stuck - please help

    The power went out briefly today while my MacPro was powered up. Once power was restored I
    booted up and when the log in screen came up, the field was already filled in and over the speaker was the sound of you get when you have depressed a key but run out of text field. I backspaced the text and typed in my password and login ensued normally. Once my desktop was present the sound of the stuck keystroke reappeared and persisted. I unplugged the keyboard but the sound persisted. My wireless mouse worked fine. I tried open various applications as well as disk utility or various file menus but as soon as I release the mouse to select an option the menu options window closes. The computer is clearly repeating a keystroke on its own repetitively and will not allow any other action. I rebooted in safe mode with the same result. I tried to reboot to my external backup clone but it ignored the keys held down during bootup and proceeded as it normally would. I tried to bootup to disk and the same thing occurred. I am completely stumped.
    Any advice is appreciated
    jt

    Hi KJK555
    Thanks for your reply.
    Last evening after trying multiple times to correct including disconnecting all the peripherals and also trying to get to disk utility with no luck, I put Disk Warrior in the optical drive but when I tried o boot to the disk the computer ignored the keyboard and went straight to normal bootup, however once up the disk image of Disk Warrior showed up on desktop and when I clicked on it everything started to act normally, weird. So I proceeded to run disk utility verify and repair and did so successfully. I then proceeded to do a bunch of work and backups etc. I let the computer sit, idle for the day and went back to it this evening and decided to reboot and see if this had resolved.
    On boot up things went normally ih no sound however when I got to the desktop and tried to double click on file folders or file menus I was unable to open. The drop downs show up if I right click but as soon as I move to select an option the menu disappears. I rebooted again with the same result. When I log off the sound comes back but haven't got the sound in any other circumstances I have found.
    I can double click on dock icons and those applications open. If I use key commands to open applications folder and double click on an app there , nothing occurs.
    I will look into cache cleaning, have never done that so will have to lok into it. Any other ideas would be most welcome. Thanks again.
    jt

  • HT201210 Done everything possible to make it work but still its not updating... Please help, i ruined my whole sunday afternoon to update my ipad2 from ios 4.3 to ios 6. But now its stuck PLEASE HELP

    I am trying to update my iPad 2 from iOS 4.3.2 to iOS 6. but its stuck after 'extracting the software' thing. Its showing error no 3194 PLEASEEEEE HELPPPPPPP

    You've followed the instructions for that error code on the page that you posted from :
    Error 1004, 1013, 1638, 3014, 3194: These errors may be the result of the connection to gs.apple.com being redirected or blocked. Follow these steps to resolve these errors:
    Install the latest version of iTunes.
    Check security software. Ensure that communication to gs.apple.com is allowed. Follow this article for assistance with security software. iTunes for Windows: Troubleshooting security software issues.
    Check the hosts file. The restore will fail if there is an active entry to redirect gs.apple.com. Follow iTunes: Advanced iTunes Store troubleshooting to edit the hosts file or revert to a default hosts file. See section "Blocked by configuration: (Mac OS X/Windows) > Rebuild network information".
    Try to restore from another known-good computer and network.
    If the errors persist on another computer, the device may need service.

  • Help, logo created in CS4 copying weird in CS6!! really stuck, Please help!

    I apologize for re posting this, but im trying to get some new help for my problem. I have created a logo in CS4 years ago, i need to work on it in CS6.
    You can see the problem here:
    http://www.bellwoodbnb.ca/1.html
    When i open:
    http://www.bellwoodbnb.ca/1.ai
    It opens correctly in CS6,
    when i copy and paste it into a new CS6 Ai file, it pastes as a faded version as seen here:
    http://www.bellwoodbnb.ca/2.ai
    We have checked to make sure all of the settings i can find are identical, we have replaces the CS6 pantones with legacy pantones and it did nothing. We know it opens, copy and pastes correctly in CS4 & CS5. But when copy/pasting or placing in CS6 it fades out for some reason.
    Any help would be appreciated.
    Thank you in advance!

    There's a redirect on the site which removed the "1.ai" portion. But you can put it back in and get the download. I posted too quickly.
    The reason things are different....
    Pantone color builds
    When you open the previous file you open the file with their existing Pantone CMYK color builds. When you paste the file, you paste and get the new Pantone LAB builds in CS6.
    Illustrator CS6 Pantone+ libraries do not contain CMYK color builds. The LAB builds are not as vibrant as the CMYK builds. Pantone states this is to "better represent colors on screen". Although I'm not a fan of this.
    You can read more about it here:
    http://helpx.adobe.com/illustrator/kb/pantone-plus.html
    If working for print, the differnce in screen representation is not really something which is supposed to matter. After all Pantone 297U is Pantone 297U on press. I find the visual differnce pretty disconcerting and always revert to previous Pantone color books.
    Viewing the other thread... I don't know what more you expect to learn. Monika gave you sound advice there.

Maybe you are looking for