Would like some help with hashmaps please :)

Map<Integer, Double> probabilities = new HashMap<Integer, Double>();When i try to use the above code in a foreach loop
for (Map.Entry<Integer, Double> entry : probabilities)i get this error
Foreach not applicable to expressionCould anyone please enlighten me on what is wrong with that and maybe suggest another way of running through the HashMap.
THANKS!

for (Map.Entry<Integer, Double> entry : probabilities.entrySet())

Similar Messages

  • Would like some help with Chrome Browser and interrupted downloads

    Hi all,
    This is my first foray into Macs and I have brought the Mac Mini (base spec, using latest version of lion) about 3 months ago and not regretted it either! I am however having one issue that is puzzling me. Upon getting my Mac I installed Chrome instantly I love it as a web browser and everything worked great, however one day Chrome crashed and I had to use force close from the Apple menu to close it, since then every time I attempt to download any file from the web to my network hdd I instantly get a 'download interrupted' message. Upon trying every other browser it works perfectly and Chrome it self WILL download to the internal hdd but not to my network drive. I really do prefer Chrome for web browsing but having to manually move each file rather than just download it to a set location is annoying. I have reset the PRAM and it didn't have any effect, I am unsure as to what is happening as it was working fine before I needed to force close Chrome. Please does anyone else have this problem and if so is it resolved and how can I resolve this annoying problem.
    Thanks all for any help!!!!
    Best Wishes,
    Nigel

    The Chrome forum is here:
    https://accounts.google.com/ServiceLogin?service=groups2&passive=1209600&continu e=http://productforums.google.com/d/categories/chrome/report-a-problem-and-get-t roubleshooting-help&followup=http://productforums.google.com/d/categories/chrome /report-a-problem-and-get-troubleshooting-help

  • I bought an album on iTunes and 3 of the songs only play for 30 seconds. I have tried re-downloading the album 3 times and the problem has not been fixed. I would like some help please and thank you.

    I bought an album on iTunes and 3 of the songs only play for 30 seconds. I have tried re-downloading the album 3 times and the problem has not been fixed. I would like some help please and thank you.
    Artist: Imagine Dragons
    Album: Night Vision

    Report it here:
    iTunes Store Support
    http://www.apple.com/emea/support/itunes/contact.html

  • I would like some help in determining the proper structure/implementation

    I would like some help in determining the proper structure/implementation for the following scenario:
    I have ~10 steel rods that have been equipped with a strain gauge.  The most I would have is ~30 steel rods.
    Each setup has had a 10 point calibration done.
    These steel rod/strain gauge setups are assigned a calibration number.
    The data would be grouped for each steel rod and identified by the calibration number. 
    I would like to use that calibration data to determine the Young’s Modulus for each steel rod and store that within the specific rod’s information.
    I want the user to be able to add new steel rods dynamically and the Young’s Modulus calculated and stored with it.
    There are two different types of rods.
    The cross-sectional area of the rod needs to be stored and that value is constant based on the rod type (so there are two different area values).
    After a rod’s calibration data is entered the first time, the data should be static so it doesn’t need to be re-entered.
    The user would enter the cal#, the 10 point calibration data, and the rod type.
    The user will only see the steel rod cal# on the FP.
    I am using a queue-based producer/consumer with event structure for the front panel interface.  So I’m thinking whenever a rod cal# was added I would call a subvi where the calibration data can be entered and then the Young’s Modulus could be calculated and stored.  An option to edit/review existing cal data should be available.
    LabVIEW 2010, Win 7.
    My initial idea was:
    Rod Arr – array of clusters:
    Rod Info - cluster:
    Calibration number – string
    Rod Scale cluster:
    mV/V – double array
    force – double array
    Young’s Modulus – double
    Rod type – enum
    Cross-sectional area – double
    I have not implemented this because I’m not sure how to implement that AND keep the data after it’s been entered.  And all of the bundling/unbundling anytime I want to access/edit any rod information can be BD consuming.  I thought a lookup table might work.  When I looked on the forums for a lookup table I was pointed in the direction of arrays/clusters.
    So I have two questions:
    What would be the best structure for the steel rod data?
    What would be the best data type for the calibration# that the user can edit (enum, ring, ?)?

    I would make a couple of small change to your proposed data layout (highlighted in blue):
    Rod Arr – array of clusters:
    Rod Info - cluster:
    Calibration number – string
    Array of Rod Scale cluster:
    mV/V – double
    force – double
    Young’s Modulus – double
    Rod type – enum
    Cross-sectional area – double
    For the calibration data, I would have an array of clusters rather than a cluster of arrays.  IMHO, this makes it easier to index through the calibration points, and makes it less likely you will ever have a situation where you don't have the same number of mV/V and force points.  I'd also move the Young's modulus, type, and area info into the Rod Info cluster.
    I prefer to store this type of configuration in the system registry, but that is more complicated and far from universal in the LabVIEW world.  A simpler way would be to simply pass the entire array to the "write to binary file" function.  If you do this, however, you might want to add a version number, otherwise it will be very difficult to maintain backwards compatibility if you ever need to change the data structure.
    As far as the control type, it depends on what the user is entering.  If the user is mostly entering calibration numbers already in the system, I would use a (system) combo box.  This allows the user to select an existing calibration number from the menu, but also to enter a new calibration number if they need to.  If the user will almost always enter new calibration numbers, then I would use a standard string control.  Either way, you'll probably want to validate the format of the number the user enters.
    Mark Moss
    Electrical Validation Engineer
    GHSP

  • I'm moving to college soon, and would appreciate some help with my library.

    I am moving to college in just over a week and a half and was needing some help with my iTunes library. Currently, at home, I use iTunes as my main source of music entertainment. I purchase music through the iTues Store and upload older music from CDs onto the library as well. I have made several smart playlists based off of information such as play counts and last played dates. Unfortunately, this is all on a desktop that I will be unable to bring with me to school. So I have recently purchased a laptop that I will be taking with me to school. I have already downloaded iTunes and have activated the laptop to my Apple ID. The desktop currently runs on Windows 7, while the laptop runs on Windows 8. Both are up-to-date with iTunes.
    With all of that background information, here comes my question. Is there a way to have the same library on both PCs? I don't just mean the same songs, but rather have the same play counts, last played dates, playlists, etc. on both computers. Is this something that can be accomplished through the cloud or iTunes Match?

    Copy the ENTIRE /Music/iTunes folder from the old computer to the new computer.
    Sync only with the new computer going forward.
    Nothing will be updated on the old computer, but if you are not going to be at home using the desktop is that really relevant?

  • First time Blackberry owner, would like some help plz with loading music & making it ringtone

    Hello all & thanks for taking time to read this. I just got a Sprint Blackberry 8330 & after playingwith it for the past 2 days, I still can't figure out how to add music to it. And then once I do add the music to it, how do I make a ring tone from my music. Thanks to every and all that can help.

    Hi and Welcome to the Forums!
    Here is a thread that might be helpful:
    http://supportforums.blackberry.com/rim/board/message?board.id=BlackBerryDesktopSoftware&thread.id=3...
    You should choose the version of the RIM desktop software that is compatible with your desktop PIM...see this article for that:
    KB12268 Applications supported by BlackBerry Desktop Manager for synchronization
    Good luck and let us know!
    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

  • Sun would like your help with the "System Name Already In Use"  error

    A couple of users have reported getting an erroneous "System Name Already in Use" error when re-registering a system after a fresh Solaris re-install. We'd like your help in tracking down this problem.
    The scenario is this:
    * Install Solaris 10 and register with updatemanager,
    * Wipe out the installation and re-install Solaris.
    * re-register with updatemanager.
    The system erroneously reports that the system name is already in use. It is supposed to detect a duplicate registration of the same system.
    We have not been able to reproduce this error in our lab.
    If this has happened to you, would you let us know at [email protected]?
    Here are the things that we would like to ask of you:
    * If you run "updatemanager -debug" if will create a log file /tmp/basicreg<timestamp>.log.
    * Details on the exact hardware you have (make/model/configuration).
    * Details on the steps you took to get to the bad state. REALLY detailed!
    Thanks!
    Based on what we know now, we believe you can work around the issue by either:
    * Changing the host name and re-registering.
    * Creating a different user account and registering the host to that account.
    Some previously-posted workarounds are known NOT to work:
    * Wait 24 hours and try again.
    * Do some "ccr" incantations and try again.

    Hi,
    Can you drop me an email as i am a sun employee and i will be able to check if the swup frontline team have received any support cases on this issue and then we can work with you directly to resolve the issue.
    Scott Wallace

  • New to Breeze, would like some helpful info

    I have a java web application built with structs. My clients
    wants the ability to upload online exam and someone recommended me
    look into 'Adobe Breeze' for this. I am totally new to Adobe
    Breeze, I will do research, but can anyone with experience with
    Breeze give me some info or feasibility on using this product with
    my app?
    Maybe some sites linking JAVA with Breeze?
    Thanks so much,
    C

    Meg-
    I had to go out of town for a family emergency. I really want to get an iPod but the first 2 I had I broke and could never figure out how to get the songs on the iPod. it seems some songs I purchased fro iTunes will download and play but some will not I would like to know all the places I can get songs to play on my iPod (well, when I get one tat will work for me). I have a lot of CDs, should I get them on iTunes first. Do I look for other type of songs in various formats to install in the iPod like…oh, what are some of the formats that music can be downloaded in? mp4 all the various types I am sure you know what I am getting at.
    I want the classic but I am nervous being an exerciser. I do not care for videos but if the classic allows one to play them that is OK.
    I would like you to look at this ear plug store online that sell to artists for their recording, heavy duty iPod users, runners, etc. I need an awesome ear plug that will take the music to the next level but I have no idea what type will be best for me.
    Let me see if I can find that website. It was something like earphone Solutions but it might not be the exact one. They have a lot of the same ear plugs.
    But back to what iPod and where I can get the music. That is what I need help with ow. I do not want to pay for whole CDs, but songs that are good to workout to.
    If you get a chance and look at tat ear plug website and give me your opinion on ear plugs. This is where I am lost but need a much better ear plug and one that will stay in my odd shaped ears.
    Thanks for waiting. I am still with my pops in the hospital most of the time but I will get back to you.
    Blessings

  • I have a spare Apple display screen an would like to make this a second screen for my iMac, would like some help on how to do this

    I have a spare Apple display screen and would like to make this a second scren for my iMac,
    would like to have some ideas on how to do this
    laro.t

    First format the drive to OS X Extended (journaled) with ownership set to be ignored:
    Next drag your iPhoto library from your Pictures folder to the EHD.  When the copying is complete launch iPhoto with the Option key held down and in the window that comes up select the library on the EHD:
    Check the file path under the window to make sure the correct library has been selected.
    Once you've confirmed that the EHD library is working properly and has all of your photos you can delete the library in your Pictures folder.
    OT

  • Would like some help converting an array of strings into multiple parsed string arrays

    Hello everyone.
    this is a very novice question and I sincerely apologize for that, but i need some direction!
    i have an array of strings:
    (('J01',), ('0', '0', '0', '1'))
    (('J02',), ('0', '1', '0', '1'))
    (('J03',), ('0', '0', '0', '0'))
    ect...
    i would like to know what are some of the best ways to gain access to this information (aka, parse it). The field lengths are not static and all those ones and zeros could very possibly be two digits at times (0 = off state, 1-100 = on state), so simply pulling characters out of a given position of the string will not always work.
    what i would like to achieve is to make either separate arrays for each desirable element, eg:
    array one:
    J01
    J02
    J03
    array two:
    0
    0
    0
    array three:
    0
    1
    0
    and so on.
    or maybe even a matrix (if that’s feasible).
    other than that I am totally up for suggestions!!
    thank you very much,
    Grant.

    Assuming fixed structure (not necessarily length of the different numbers or names).

  • I would like some Help please!

    Hey everyone. I bought a new Ipod 30Gb Black Video yesterday which i recieved at about 11am. I turned it on and it got stalled on hold. I couldnt turn the ipod off or nothing at around 3 the Ipod was dead so I installed all the programs and plugged it into the computer at around 3.45. It has been on all night and now at almost 1 the next day it is still saying Do Not Disconnect. I have been into Itunes many times and cannot see that in anyway being in contact with the ipod. What should I do. I am planning to leave it on till about 7.30 tonight but thats the latest I can really do.
    Also When I open up itunes and go into Prefrences and click Ipod it says that there is no Ipod Connected.

    Report it here:
    iTunes Store Support
    http://www.apple.com/emea/support/itunes/contact.html

  • I would welcome some help with colour gradients in CS5 - please.

    I am using CS5 and want to draw a curved line (with say line tool ) which has a coloured gradient running top to bottom uniformly within the stroke (or line) size.
    Yes it sound simple but..........
    I am happy (well I think I am) with Linear gradients and setting alphas etc
    I have played with "extended colour" and reflected and repeated.
    I have also looked at using the gradient transform tool But I can not find out how to produce a curved line with that magic vertical
    Sorry if it may not be clear what I want to do but if you have a look at  the pic below
    I welcome any suggestions
    Thanks for reading.

    I don't.  I am positive that is how the image you showed originally was done if it was done in Flash.  Your attempt doesn't do what I described (not sure what you did), and having contrasting color areas in the image makes the effect come off somewhat differently as well.

  • We have a new iPod  Classic and would like some help in choosing "Import Settings" (under Peferences) when loading the iPod from the Mac.  We want to be sure that we can maintain a constant sound level.  Used with Bose sound dock. OS 10.6.8 iTunes 10.6.1.

    Using an iPod Classic on a Bose sound dock....when loading the iPod from the Mac, what  "Import Settings" (under iTune "Preferences"),  should be used to maintain a constant sound level when playing music?  Mac OS 10.6.8, iTunes 10.6.1.
    There are many Import Settings available and it is somewhat confusing.  Any suggestions?

    Go to iTunes>Preferences>Playback. Tick "Sound Check."
    iTunes: About Sound Check

  • Would like some input on models please.

    I have been Mac user for years and want to get an Ipad but like most money is tight, Have a friend that has a brand new 64gig IPad 1 in box never used. Only want one to use when travial for email, online banking, a little surfing and a few movies and games. Dont need a camara. My friend wants $300 for it. I cant see 1 specs in Apple Store. Can some one please give me some pro and con input on this please.

    The specs are in the Apple Store: look harder.
    As long as your friend"s iPod satisfies your requirements regarding WiFi only versus 3G connection, bite his/her arm off. You can see the prices as well as anybody else in the Apple Store.

  • Some Help with Code please?

    Hi, Basicly i hope someone can help me with a small issue. Im
    new to flash.
    I found code which uses a switchboard to switch between a
    broadcast to the swf player or client side.
    I want to to have a single connection button(at broadcaster
    side) that will cut the switcher and enable the broadcaster to
    connect directly to the client.
    Im not sure what exactly to change or add inthe current mains
    code.
    Please help. Thanks.
    (the switcher has only one button[cut_btn] that switches a
    stream in embedded video [prev_video] which is activated when a
    broadcaster USERID is selected from a datagrid[broadcasterList_dg])
    I want a single connect button in the broadcaster which will
    do what the switch button does but cut out the clicking of a
    datagrid and previewing basicly cut off the switcher
    altogether.

    Doesnt matter ive figured it out.

Maybe you are looking for

  • Can you please help me figure out my i phone and how to use the features

    i need some help on figuring out my phone can you please help me figure out how to use my i phone and the blue tooth features to listen to music or how can a friend or a relative send me songs for me to listen to.....                   

  • My site can be viewed in IE, but not Firefox. WHY!?

    I'm using Dreamweaver to develope my site. I've used the 'Check Compatibility' option to see if it is compatible with the different browsers out there. No errors returned. When I go to view it in Firefox, all that shows up is the code. What could be

  • IMac Audio-Out Noise

    If I plug headphones into my iMac's audio-out jack, a high pitched electric buzzing noise can be heard. It starts to give me a headache after a while, so I've been avoiding using headphones. I don't have AppleCare anymore, so taking it to Apple would

  • Address book deleted contacts re-appearing - sometimes more than once

    I'm having a real problem with .mac, leopard address book and my iphone. I've got four contacts in my address book that are first names only. Two of these used to be first name and last name. Once I do a sync, these contacts will appear twice - once

  • MissingResourceException: No localizer class found for message id

    I created a Java Portlet (JSR 168) and am adding it to my portal. For some reason I keep getting the exception below. Any clues why this happens? I added the portlet to the portal file by drag and drop. - vineet No such portlet with URI RSSPortlet_1.