Exiting more than one loop at a time?

I have craeted a Simulated Annealing program. The pseudo code is this:
int          temperature = x;
double  coolingFactor = y;
int          iterationsAtTemperature = z;
int          currentChromosomeFitness = a;
do{
    for(int counter=0; counter<iterationsAtTemperature; counter++){
        ...... generate new solution ......
        ...... evaluate new solution ......
        ...... swap with old solution if fitter ......
        // ESCAPE IF A SOLUTION OVER A CERTAIN FITNESS IS FOUND
    iterationsAtTemperature++;
    temperature = temperature * coolingFactor;
)while(temperature > 0);I would like to know how to escape all of the loops when a solution over a certain fitness is found. Any ideas in how to escape not only the inner for loop but also the do-while loop in one.
Cheers

One way:
        int x = 0,y = 0;
        done: for (int i = 0; i < 100; i++) {
            for (int j = 0; j < 100; j++) {
                if (i == 50 && j == 50) {
                    x = i;
                    y = j;
                    break done;
        System.out.println(x + "," + y);

Similar Messages

  • ITunes 8.1 Can't Seem to do More Than One Thing at a Time

    I upgraded to 8.1 and now, rather than a "faster" iTunes experience as was advertised on Apple's website, iTunes can't seem to do more than one thing at a time without locking up the application completely. For instance, when trying to download podcasts if I choose to hit more than one "Get" button at a time iTunes will freeze up until the first podcast has completely downloaded. During this time I cannot access any other screen in iTunes at all.
    This freezing of iTunes also occurred while I was trying to sync my iPhone 3G. I received the Calendar sync error that a few other people have mentioned on the forum and wanted to turn off Calendar sync (since I don't use it and don't understand why iTunes turned it on by default, apparently, after the upgrade) but I had to wait for my iPhone 3G to completely sync before I could gain access to any of the tabs in the iPhone sync window.
    So, basically it seems like the new version of iTunes (8.1) really doesn't like to be bothered while it is trying to copy data from one place to another.
    Any ideas?

    I'm using Vista Ultimate 64-bit and iTunes 8.1 installed OK, but required a restart of the entire OS after upgrading. It takes forever to launch, clicking on certain items (like applications) causes itunes to freeze for about 15-30 seconds before it continues (this is actually something that's been there since the introduction of the app store), I've had to switch my library view to LIST and avoid any sort of album art. Using album art to view my library causes iTunes to be extremely, obnoxiously unresponsive.
    The best part - plugging in my iPhone to sync it... iTunes simply sits there dumbly - doesn't even recognize that I've plugged my iPhone in. So now I can't even sync. QUALITY product, quality. So the app I'm FORCED to use to manage my phone doesn't even work after upgrading. Outstanding.
    I'm terrified of uninstalling and reinstalling... the last time I did that with iTunes it jacked my library up... it "lost" all of my music... basically it disassociated all of the music (even the stuff purchased through the itunes store) with the index file so I had to re-import EVERY song and delete the duplicate entry.
    I searched a ton of forums looking for any clues as to how I could improve performance... All I run into is apple fan boys flaming any and all forums to the point of PC *****, no Apple *****, and so forth. Extremely unhelpful.
    The fact is this - if I wasn't forced to use iTunes to manage my non-jailbroken iPhone 3G, then I'd dump it completely. It is a horrible app. Why punish the customers that haven't gone the route of "jail breaking" their iPhones?
    One individual on one of the forums suggested that blue screens, and all the other random errors, including slow performance were due to a lack of RAM. I have 4GB of RAM on my machine I can run a virtual Fedora core 9 machine and a virtual WinXP machine on my Vista x64 box and still not have any performance issues with those two virtuals in the background sucking up system resources, yet with nothing open and less than 50% of my 4GB of RAM in use iTunes performance is abysmal. I have not run into any other application on my Vista machine that performs as badly as iTunes.
    And Apple is touting a "64-bit" version of iTunes - it isn't. The applications the 64-bit installer installs are all 32-bit.
    So, I'm searching as the two of you are for an answer to horrible performance of iTunes.
    Even exiting out of iTunes takes a day and a half... "saving itunes library".... And my "library" isn't that big.

  • Firefox won't let me open more than one window at a time. how do i fix the problem

    Firefox won't let me open more than one window at a time. It use to allow me to open multiple windows before but for no apparent reason it stopped. I uninstalled it and re-installed but I'm having the same problem. How do I fix the problem
    == This happened ==
    Every time Firefox opened
    == several days ago

    Start Firefox in [[Safe Mode]] to check if one of your add-ons is causing your problem (switch to the DEFAULT theme: Tools > Add-ons > Themes).
    See [[Troubleshooting extensions and themes]] and [[Troubleshooting plugins]]
    If it does work in Safe-mode then disable all your extensions and then try to find which is causing it by enabling one at a time until the problem reappears.
    You can use "Disable all add-ons" on the [[Safe mode]] start window to disable all extensions.
    You have to close and restart Firefox after each change via "File > Exit" (on Mac: "Firefox > Quit")

  • Way to acquire more than one sample at a time into Labview from cFP?

    In reading data from my cFP into Labview I see that I can use the FP Read.vi but it only grabs one sample per call (loop iteration).  In other devices, I could just use the AI Acquire Waveform.vi to grab multiple samples per call.  Can I use this for cFP?  Is there another way to grab more than one sample per call from my cFP?  I'm just running it from a host computer, not using RT.
    My specific problem is that I have two things I want to do with the same signal, one slow (PID control loop) and one fast (data logging).  If I put the FP Read.vi in the same loop as the PID control, I can only get one sample in the time it takes the PID loop to run which is too slow.  I'm trying to think of ways around this problem.
    Thanks,
    Hosehead

    Hello Hosehead,
    With FieldPoint there is no way to acquire more than one same at a time like
    you can with NI-DAQ.  With the FieldPoint read and write VIs
    you can only read or write a single point at a time.
    Please see the Sampling
    Speed of FieldPoint Modules document for more information on cFP
    acquisition rates.  This document explains how channels are updated, how
    often the data is updated, and what happens if you miss samples.  Please
    note that you will be able to acquire more samples if you are running your
    application on the RT controller and not on your host computer.
    If this does not answer your question, can you please post more data about the rate
    you want your PID loop and your data logging loop to run at.
    Regards,
    Jesse O.
    Applications Engineering
    National Instruments
    Jesse O. | National Instruments R&D

  • HT201301 How do I "Select All" in a Pages document? I would like to copy and past more than one paragraph at a time.

    How do I "Select All" in a Pages document. I would like to copy and paste more than one paragraph at a time.

    I just tab and hold untill the loop shows then let go and I get the menu with select all in it

  • Executing more than one procedures at a time

    Hi,
    Can any one tell how to execute more than one procedure at a time..
    I am trying to run like this..but its throwing an error...can anyone please suggest?
    CREATE OR REPLACE PROCEDURE HYSXM.QA_AUTO_RETURN_FINAL IS
    i EVENTS_TEST_DATA%ROWTYPE;
    BEGIN
    DELETE FROM TEST_EVENTS;
    COMMIT;
    for i in ( SELECT RADIO_ID,EVENT_TYPE FROM EVENTS_TEST_DATA )
    LOOP
    QA_AUTO_INSTALL(i.radio_id,i.event_type);
    QA_AUTO_RESOLD(i.radio_id,i.event_type);
    QA_AUTO_RETURN(i.radio_id,i.event_type);
    END LOOP;
    END QA_AUTO_RETURN_FINAL;
    /

    what error message is being returned??

  • Is there a stereo bluetooth headset that can pair with more than one device at a time?

    Is there a stereo bluetooth headset that can pair, i.e. multipoint, with more than one device at a time?
    Are the MacBook and iPhone 4 capable of multipoint bluetooth technoloagy?
    The goal is for my wife to be able to watch her Korean TV soap operas on her MacBook and still receive a call on her iPhone 4 via a stereo bluetooth headset.
    I was looking at the Motorola S10-HD but after further review saw that it only pairs with one device at a time.
    Appreciate any and all input. My Googling has returned no results.
    Rick

    TeslasBB wrote:
    pairing my BB8330 with my blue tooth earphone(TM:jawbone) and my microsoft sync thats in my car simultaneously? if i pair with the car, will i have to pair my jawbone all over again?
    You can only pair one device at a time to your 8330, or any other phone for that matter.  The "pairings" are saved to the phone, you can use one or the other and you won't have to pair it again.  Once you turn your bluetooth device on and the phone is on, they will find each other again.
    Hope this helps,
    John
    Stevie Ray! 1954-1990
    ** Don't forget to resolve your post with the accepted solution.

  • App that can send more than one attachment at a time....

    Does anyone know of a app that I can send more than one attachment at a time like resumes + cover letters. Not having any luck with gmail or pages for the Ipad.
    Please help

    The MPEG Streamclip app can batch process videos. It can even convert up to  4 videos at the same time.
    http://www.squared5.com/
    It's free...
    Just drop as many videos as you like into the batch window.

  • How can I highlight more than one pic at a time?

    First of all, THANKS for anyone that may answer since APPLE obviously has no desire to get off their ***** and help their customers.
    About ten days ago I was prompted to install apples new operating system. So of course I clicked OK, idiot that I am!
    Now I'm stuck with this new piece of **** operating system that I wish I could uninstall.
    ANYWAY,
    I upload a lot of pix for stuff I sell on EBay, sometimes 3-400 at a time. When I delete photos it's usually 1,000 at a time, and I assure you I'm not exaggerating. Up until now I was able to touch the END pic and swipe the whole horizontal row with two fingertips and the whole row of 7 would get checked. With the new ios7 I am unable to do it anymore (yet ANOTHER reason I don't want this 'improved' OS).
    Does ANYONE know of a way to highlight more than one pic at a time?? Remember the old windows system where you could click one pic, then hit SHIFT and click a lower one and it would highlight them all, in between, for a quick delete?
    There MUST be a way to delete, or rather highlight (or CHECK) more than one pic at a time? Anyone?
    THANKS, Rich

    Yes, I know the photos stored on the device... But which app are you accessing the photos with? Which app do you want to be able to highlight more than one pic at a time in?
    There are literally thosands of apps that access the iOS Photo Library - which one(s) are you using?

  • How can I buy more than one item at a time?

    How can I buy more than one item at a time i iPhote fx a book and a calander? It would be nice to place one order and only pay for the shipping once!

    You can't.
    Regards
    TD

  • How do i get my ipod touch to download more than one app at a time, can i make it toware i dont have to wait for one app to download before it starts downloading another,

    my ipod will only download one app at a time and runs extremely slow. i was wondering if there is some way that i can make it download more than one app at a time and how can i make the app start downloading again after i have left my wi-fi zone and then went back in. im really confused.

    Download everything on your computer in iTunes, then sync your iPod to iTunes.
    You should be syncing (backing up) to iTunes and your photo app regurally, anyway.

  • Can not color label more than one file at a time

    Hi,
    I've had this problem since 10.6.6-ish, i can not color label more than one file at a time in the Finder.
    Wether i select two, twenty or twohundred only one file gets color labeled.
    It doesn't seem to matter if i assign a color label through the File menu or right click > label.
    Figured a re-install might fix this but it hasn't (even a clean install without restoring any kind of backup).
    Does anyone else have this issue and/or a fix for it?
    Thanks,
    Jay

    Aaaaanyone ?

  • Can we open more than one  "folder" at a time in Bridge?

    When I click on a folder icon, the images appear in the Bridge workspace. Then when I click on another, different, folder icon, the previously displayed images are gone, and only the second folder's images appear. A priori, this seems to be an unnecessary limitation on functionality, and therefore I presume that I just do not know how to do what is called for: To use the functionality of Bridge for more than the contents of only one folder at a time.
    Yes, I know that I could, using, say, Windows Explorer, create a sort of "megafolder" into which I copied the contents of several folders, but this seems to be a kludge which should not be necessary.
    Did the designers of Bridge not contemplate that users would want to operate on the contents of more than one folder at a time? I presume that I am just ignorant of how to achieve what should be a normal functionality; seeing more than the contents of just one folder at a time.
    Please alleviate my ignorance.

    Quick way: Press Ctrl+N (Cmd-N mac) to open a new Bridge window. Open the second folder there.
    Not so quick way: Select menu File => New Window. Open the second folder there.
    If you MUST view all of the files in one window, all of your files MUST be in folders nested within the same parent folder. In that case:
    1) View the parent folder in bridge.
    2) Open the Filter palette.
    3) Click the microscopic button in the top left corner of the Filter palette, which looks like a folder with a "No" symbol on it. The tooltip label for that button is, "Click to view all items...".

  • Can't gift more than one song at a time

    Does anyone know how to gift more than one song at a time (not an album, but non-contiguous songs off one or multiple albums)?
    I tried adding them to my wishlist so I could add in several, but I already own several of the songs and you can't add songs you already own.
    Of course, this would be resolved if they would just bring back the shopping cart, but for now, I have no idea how to accomplish what should be a very simple task.

    It is, indeed, frustrating, and seems short-sighted on Apple's part. Imagine a shop owner saying, "You can buy anything you want for yourself, as many as you like, but if it's a gift, you can only buy one."
    I did receive a nice response from Apple confirming that this is, in fact, impossible to accomplish:
    Dear Michael,
    Welcome to iTunes Store Customer Support. I am Animesh and I will be assisting you today.
    Thank you for your interest in giving an iTunes Store or App Store gift. I understand that you would like to gift multiple songs from different albums. I understand that this is important for you.
    Michael, please note that you can buy a song, an album, a video, an audiobook, a TV episode or season, a movie, or an application for anyone who has a valid email address. However, there is no such option to gift multiple songs at a time from different albums. You are required to gift them individually, also the Wishlist feature is for personal usage and not gifting.
    I can realize that it must be difficult for you. I have felt the same way in the past when I've found myself in similar circumstances. I have found in situations like this that voicing your opinion is a good way to get the "ball rolling".
    Please know that Apple takes the feedback from our customers very seriously. This is the reason for our feedback page - to create a forum where our users can vent, praise or share whatever feelings they have to allow us to meet your needs, and grow as a company.
    I took the liberty of submitting your feedback to Apple on your behalf. I would also encourage you to share this link with all of your friends and family who wish to submit the feedback, and have them all submit the same request.
    Here is the link for you.
    http://www.apple.com/feedback/itunesapp.html
    I know sometimes it feels as though submitting feedback will not yield results, so I will also invite you to check out the following link. This is a letter from Apple's CEO addressing customers who purchased an iPhone very early on at $599, then the price went down to $399 shortly after. Mr. Jobs heard our customers and Apple responded accordingly.
    http://www.apple.com/hotnews/openiphoneletter/
    I hope that you will consider sharing your thoughts on the feedback page.
    Michael, we very much appreciate your concerns, and if there's anything else I can do for you, just respond to this email and let me know. Thank you for supporting the iTunes Store.
    Sincerely,
    Animesh
    iTunes Store Customer Service

  • Can't print more than one job at a time.

    I am trying to print to either a HP DesignJet 1055cm plotter or a HP LaserJet 5000N. I can't send more than one file at a time. If i don't wait until the current job starts printing, the next one won't print. For example if I sent five files one right after the other, I might get 1, 4 and 5. I don't think it's a printer problem because it happens on two different printers, and it doesn't happen when I print from my PC. Any idea what could cause this?

    My work around is to put all the jobs "on hold" in the print settings or just "stop jobs" on the printer window.
    Then I click on each print job in the que and let them print one at a time. This way I can at least quit the program and move onto the next thing.

Maybe you are looking for