I need help fixing this asap

I'm just new to java so this code is not be the best way to do it but anyways I need to fix the repainting in this asap since its due in about 1 1/2 hrs I tried every thing I know but so far none has worked. I really don't care much about efficiency now. What's wrong with this and how do I fix this?
     public void moveDisc(int n, int s, int d, int x)
          if(s != d) {
               if(n == 1)
                    transferDisc(s,d);
               if (n > 1)
                    moveDisc(n-1,s,x,d);
                    transferDisc(s,d);
                    moveDisc(n-1,x,d,s);
     public void transferDisc(int s, int d) {
          cntnt[d][cntnt[d][0]+1] = cntnt[s][cntnt[s][0]];
          cntnt[s][cntnt[s][0]] = 0;
          cntnt[s][0]--;
          cntnt[d][0]++;
          peg[1].removeAll();
          peg[2].removeAll();
          peg[3].removeAll();
          for(int y = 1; y < 4; y++) {
               peg[y].add(Box.createVerticalGlue());
               for(int x = 7; x > 0; x--) {
                    if(cntnt[y][x] != 0)
                         peg[y].add(discs[cntnt[y][x]]);
          peg[1].repaint();
          peg[2].repaint();
          peg[3].repaint();
          movDisplay.setText(Integer.toString(++ctr));
          try {
               Thread.sleep(1000);
          } catch(InterruptedException ie) {}
     }

the peg[] are JPanels.
I think it's probably in the repaint since the
program waits for the sum total of the sleeptime and
does nothing until the time is over then it displays
the final position after the time is up.Very much possible. You tell the AWT thread to repaint, but right after you tell it to do nothing for a second. It's be easier if there were a correct view-model separation, you could time the changes to the model and the view would paint whatever state the model is in, without the need to wait for anything.

Similar Messages

  • I need help fixing this... i can't get PDF to open

    [2011-08-07:20:00:49] Launching subprocess with commandline c:\Program Files (x86)\Common Files\Adobe AIR\Versions\1.0\Resources\Adobe AIR Updater -installupdatecheck
    [2011-08-07:20:00:49] Runtime Installer end with exit code 0
    [2011-08-07:20:00:49] Runtime Installer begin with version 2.7.0.19530 on Windows 7 x86
    [2011-08-07:20:00:49] Commandline is: -installupdatecheck
    [2011-08-07:20:00:49] Installed runtime (2.7.0.19530) located at c:\Program Files (x86)\Common Files\Adobe AIR
    [2011-08-07:20:00:49] Performing pingback request
    [2011-08-07:20:00:50] Pingback request completed with HTTP status 200
    [2011-08-07:20:00:50] Starting runtime background update check
    [2011-08-07:20:00:50] Begin Background update download from http://airdownload.adobe.com/air/3/background/windows/x86/patch/2.7.0.19530/update
    [2011-08-07:20:00:50] Unpackaging http://airdownload.adobe.com/air/3/background/windows/x86/patch/2.7.0.19530/update to C:\Users\Troy M\AppData\Roaming\Adobe\AIR\Updater\Background
    [2011-08-07:20:00:50] Runtime update not available
    [2011-08-07:20:00:50] Unpackaging cancelled
    [2011-08-07:20:00:50] Runtime Installer end with exit code 0
    [2011-08-07:20:01:23] Application Installer begin with version 2.7.0.19530 on Windows 7 x86
    [2011-08-07:20:01:23] Commandline is: "C:\Users\Troy M\PamperedPartnerPlus\workspace\.report\SalesReceiptReport_08082011_010122AM.pdf"
    [2011-08-07:20:01:23] Installed runtime (2.7.0.19530) located at c:\Program Files (x86)\Common Files\Adobe AIR
    [2011-08-07:20:01:24] Unpackaging file:///C:/Users/Troy%20M/PamperedPartnerPlus/workspace/.report/SalesReceiptReport_080820 11_010122AM.pdf to C:\Users\Troy M\AppData\Local\Temp\fla54C3.tmp
    [2011-08-07:20:01:24] Got an unexpected fatal error while unpackaging: [ErrorEvent type="error" bubbles=false cancelable=false eventPhase=2 text="not an AIR file" errorID=0]
    [2011-08-07:20:01:29] Application Installer end with exit code 7
    [2011-08-07:20:01:33] Runtime Installer begin with version 2.7.0.19530 on Windows 7 x86
    [2011-08-07:20:01:33] Commandline is: -arp:uninstall
    [2011-08-07:20:01:33] Installed runtime (2.7.0.19530) located at c:\Program Files (x86)\Common Files\Adobe AIR
    [2011-08-07:20:01:37] Relaunching with elevation
    [2011-08-07:20:01:37] Launching subprocess with commandline c:\program files (x86)\common files\adobe air\versions\1.0\resources\adobe air updater.exe -eu
    [2011-08-07:20:01:37] Runtime Installer begin with version 2.7.0.19530 on Windows 7 x86
    [2011-08-07:20:01:37] Commandline is: -stdio \\.\pipe\AIR_2996_0 -eu
    [2011-08-07:20:01:37] Installed runtime (2.7.0.19530) located at c:\Program Files (x86)\Common Files\Adobe AIR
    [2011-08-07:20:01:37] Starting runtime uninstall. Uninstalling runtime version 2.7.0.19530
    [2011-08-07:20:01:37] Uninstalling product with GUID {FDB3B167-F4FA-461D-976F-286304A57B2A}
    [2011-08-07:20:01:39] Runtime Installer end with exit code 0
    [2011-08-07:20:01:39] Elevated install completed
    [2011-08-07:20:01:39] Runtime Installer end with exit code 0
    [2011-08-08:05:12:23] Runtime Installer begin with version 2.7.0.19530 on Windows 7 x86
    [2011-08-08:05:12:23] Commandline is: -silent
    [2011-08-08:05:12:23] No installed runtime detected
    [2011-08-08:05:12:23] Starting silent runtime install. Installing runtime version 2.7.0.19530
    [2011-08-08:05:12:24] Installing msi at c:\users\troym~1\appdata\local\temp\airb8a4.tmp\setup.msi with guid {FDB3B167-F4FA-461D-976F-286304A57B2A}
    [2011-08-08:05:12:43] Runtime Installer end with exit code 0
    [2011-08-08:05:14:53] Application Installer begin with version 2.7.0.19530 on Windows 7 x86
    [2011-08-08:05:14:53] Commandline is: "C:\Users\Troy M\PamperedPartnerPlus\workspace\.report\SalesReceiptReport_08082011_101451AM.pdf"
    [2011-08-08:05:14:53] Installed runtime (2.7.0.19530) located at c:\Program Files (x86)\Common Files\Adobe AIR
    [2011-08-08:05:14:54] Unpackaging file:///C:/Users/Troy%20M/PamperedPartnerPlus/workspace/.report/SalesReceiptReport_080820 11_101451AM.pdf to C:\Users\Troy M\AppData\Local\Temp\fla1120.tmp
    [2011-08-08:05:14:54] Got an unexpected fatal error while unpackaging: [ErrorEvent type="error" bubbles=false cancelable=false eventPhase=2 text="not an AIR file" errorID=0]
    [2011-08-08:05:15:01] Application Installer end with exit code 7
    [2011-08-08:05:16:11] Application Installer begin with version 2.7.0.19530 on Windows 7 x86
    [2011-08-08:05:16:11] Commandline is: "C:\Users\Troy M\PamperedPartnerPlus\workspace\.report\ShowSummaryReport_08082011_101610AM.pdf"
    [2011-08-08:05:16:11] Installed runtime (2.7.0.19530) located at c:\Program Files (x86)\Common Files\Adobe AIR
    [2011-08-08:05:16:11] Unpackaging file:///C:/Users/Troy%20M/PamperedPartnerPlus/workspace/.report/ShowSummaryReport_0808201 1_101610AM.pdf to C:\Users\Troy M\AppData\Local\Temp\fla3F41.tmp
    [2011-08-08:05:16:11] Got an unexpected fatal error while unpackaging: [ErrorEvent type="error" bubbles=false cancelable=false eventPhase=2 text="not an AIR file" errorID=0]
    [2011-08-08:05:16:16] Application Installer end with exit code 7
    [2011-08-08:06:29:43] Application Installer begin with version 2.7.0.19530 on Windows 7 x86
    [2011-08-08:06:29:43] Commandline is: "C:\Users\Troy M\Documents\hs_11jul.pdf"
    [2011-08-08:06:29:43] Installed runtime (2.7.0.19530) located at c:\Program Files (x86)\Common Files\Adobe AIR
    [2011-08-08:06:29:44] Unpackaging file:///C:/Users/Troy%20M/Documents/hs_11jul.pdf to C:\Users\Troy M\AppData\Local\Temp\fla13FC.tmp
    [2011-08-08:06:29:45] Got an unexpected fatal error while unpackaging: [ErrorEvent type="error" bubbles=false cancelable=false eventPhase=2 text="not an AIR file" errorID=0]
    [2011-08-08:06:29:46] Application Installer end with exit code 7
    [2011-08-08:06:30:25] Runtime Installer begin with version 2.7.0.19530 on Windows 7 x86
    [2011-08-08:06:30:25] Commandline is:
    [2011-08-08:06:30:25] Installed runtime (2.7.0.19530) located at c:\Program Files (x86)\Common Files\Adobe AIR
    [2011-08-08:06:30:28] Launching subprocess with commandline c:\Program Files (x86)\Common Files\Adobe AIR\Versions\1.0\Resources\Adobe AIR Updater -installupdatecheck
    [2011-08-08:06:30:28] Runtime Installer end with exit code 0
    [2011-08-08:06:30:29] Runtime Installer begin with version 2.7.0.19530 on Windows 7 x86
    [2011-08-08:06:30:29] Commandline is: -installupdatecheck
    [2011-08-08:06:30:29] Installed runtime (2.7.0.19530) located at c:\Program Files (x86)\Common Files\Adobe AIR
    [2011-08-08:06:30:29] Performing pingback request
    [2011-08-08:06:30:29] Pingback request completed with HTTP status 200
    [2011-08-08:06:30:29] Starting runtime background update check
    [2011-08-08:06:30:29] Begin Background update download from http://airdownload.adobe.com/air/3/background/windows/x86/patch/2.7.0.19530/update
    [2011-08-08:06:30:29] Unpackaging http://airdownload.adobe.com/air/3/background/windows/x86/patch/2.7.0.19530/update to C:\Users\Troy M\AppData\Roaming\Adobe\AIR\Updater\Background
    [2011-08-08:06:30:30] Runtime update not available
    [2011-08-08:06:30:30] Unpackaging cancelled
    [2011-08-08:06:30:30] Runtime Installer end with exit code 0
    [2011-08-08:06:31:02] Application Installer begin with version 2.7.0.19530 on Windows 7 x86
    [2011-08-08:06:31:02] Commandline is: "C:\Users\Troy M\Documents\hs_11jul.pdf"
    [2011-08-08:06:31:02] Installed runtime (2.7.0.19530) located at c:\Program Files (x86)\Common Files\Adobe AIR
    [2011-08-08:06:31:02] Unpackaging file:///C:/Users/Troy%20M/Documents/hs_11jul.pdf to C:\Users\Troy M\AppData\Local\Temp\fla43F2.tmp
    [2011-08-08:06:31:02] Got an unexpected fatal error while unpackaging: [ErrorEvent type="error" bubbles=false cancelable=false eventPhase=2 text="not an AIR file" errorID=0]
    [2011-08-08:06:31:05] Application Installer end with exit code 7
    [2011-08-08:06:31:08] Application Installer begin with version 2.7.0.19530 on Windows 7 x86
    [2011-08-08:06:31:08] Commandline is: "C:\Users\Troy M\Documents\hs_11jul.pdf"
    [2011-08-08:06:31:08] Installed runtime (2.7.0.19530) located at c:\Program Files (x86)\Common Files\Adobe AIR
    [2011-08-08:06:31:08] Unpackaging file:///C:/Users/Troy%20M/Documents/hs_11jul.pdf to C:\Users\Troy M\AppData\Local\Temp\fla5C13.tmp
    [2011-08-08:06:31:08] Got an unexpected fatal error while unpackaging: [ErrorEvent type="error" bubbles=false cancelable=false eventPhase=2 text="not an AIR file" errorID=0]
    [2011-08-08:06:31:10] Application Installer end with exit code 7
    [2011-08-08:06:31:25] Runtime Installer begin with version 2.7.0.19530 on Windows 7 x86
    [2011-08-08:06:31:25] Commandline is: -arp:uninstall
    [2011-08-08:06:31:25] Installed runtime (2.7.0.19530) located at c:\Program Files (x86)\Common Files\Adobe AIR
    [2011-08-08:06:31:27] Runtime Installer end with exit code 6
    [2011-08-08:06:32:54] Application Installer begin with version 2.7.0.19530 on Windows 7 x86
    [2011-08-08:06:32:54] Commandline is: "C:\Users\Troy M\PamperedPartnerPlus\workspace\.report\ShowSummaryReport_08082011_113253AM.pdf"
    [2011-08-08:06:32:54] Installed runtime (2.7.0.19530) located at c:\Program Files (x86)\Common Files\Adobe AIR
    [2011-08-08:06:32:55] Unpackaging file:///C:/Users/Troy%20M/PamperedPartnerPlus/workspace/.report/ShowSummaryReport_0808201 1_113253AM.pdf to C:\Users\Troy M\AppData\Local\Temp\flaFB7D.tmp
    [2011-08-08:06:32:55] Got an unexpected fatal error while unpackaging: [ErrorEvent type="error" bubbles=false cancelable=false eventPhase=2 text="not an AIR file" errorID=0]
    [2011-08-08:06:34:32] Application Installer end with exit code 7
    [2011-08-08:06:36:06] Application Installer begin with version 2.7.0.19530 on Windows 7 x86
    [2011-08-08:06:36:06] Commandline is: "C:\Users\Troy M\PamperedPartnerPlus\workspace\.report\ShowSummaryReport_08082011_113606AM.pdf"
    [2011-08-08:06:36:06] Installed runtime (2.7.0.19530) located at c:\Program Files (x86)\Common Files\Adobe AIR
    [2011-08-08:06:36:06] Unpackaging file:///C:/Users/Troy%20M/PamperedPartnerPlus/workspace/.report/ShowSummaryReport_0808201 1_113606AM.pdf to C:\Users\Troy M\AppData\Local\Temp\flaE83C.tmp
    [2011-08-08:06:36:06] Got an unexpected fatal error while unpackaging: [ErrorEvent type="error" bubbles=false cancelable=false eventPhase=2 text="not an AIR file" errorID=0]
    [2011-08-08:06:36:08] Application Installer end with exit code 7
    [2011-08-08:06:40:11] Application Installer begin with version 2.7.0.19530 on Windows 7 x86
    [2011-08-08:06:40:11] Commandline is: "C:\Users\Troy M\PamperedPartnerPlus\workspace\.report\ShowSummaryReport_08082011_114010AM.pdf"
    [2011-08-08:06:40:11] Installed runtime (2.7.0.19530) located at c:\Program Files (x86)\Common Files\Adobe AIR
    [2011-08-08:06:40:11] Unpackaging file:///C:/Users/Troy%20M/PamperedPartnerPlus/workspace/.report/ShowSummaryReport_0808201 1_114010AM.pdf to C:\Users\Troy M\AppData\Local\Temp\flaA488.tmp
    [2011-08-08:06:40:11] Got an unexpected fatal error while unpackaging: [ErrorEvent type="error" bubbles=false cancelable=false eventPhase=2 text="not an AIR file" errorID=0]
    [2011-08-08:06:40:17] Application Installer end with exit code 7
    [2011-08-08:06:41:40] Application Installer begin with version 2.7.0.19530 on Windows 7 x86
    [2011-08-08:06:41:40] Commandline is: "C:\Users\Troy M\PamperedPartnerPlus\workspace\.report\SalesReceiptReport_08082011_114140AM.pdf"
    [2011-08-08:06:41:40] Installed runtime (2.7.0.19530) located at c:\Program Files (x86)\Common Files\Adobe AIR
    [2011-08-08:06:41:40] Unpackaging file:///C:/Users/Troy%20M/PamperedPartnerPlus/workspace/.report/SalesReceiptReport_080820 11_114140AM.pdf to C:\Users\Troy M\AppData\Local\Temp\fla138.tmp
    [2011-08-08:06:41:41] Got an unexpected fatal error while unpackaging: [ErrorEvent type="error" bubbles=false cancelable=false eventPhase=2 text="not an AIR file" errorID=0]
    [2011-08-08:06:42:57] Application Installer begin with version 2.7.0.19530 on Windows 7 x86
    [2011-08-08:06:42:57] Commandline is: "C:\Users\Troy M\PamperedPartnerPlus\workspace\.report\SalesReceiptReport_08082011_114257AM.pdf"
    [2011-08-08:06:42:57] Installed runtime (2.7.0.19530) located at c:\Program Files (x86)\Common Files\Adobe AIR
    [2011-08-08:06:42:57] Unpackaging file:///C:/Users/Troy%20M/PamperedPartnerPlus/workspace/.report/SalesReceiptReport_080820 11_114257AM.pdf to C:\Users\Troy M\AppData\Local\Temp\fla2E11.tmp
    [2011-08-08:06:42:58] Got an unexpected fatal error while unpackaging: [ErrorEvent type="error" bubbles=false cancelable=false eventPhase=2 text="not an AIR file" errorID=0]
    [2011-08-08:06:43:02] Application Installer end with exit code 7
    [2011-08-08:06:44:48] Application Installer end with exit code 7

    i have reader... and this is the error message i get when i attempt to open one
    sorry, an error has occured.
    The application could not be installed because the installer file is damaged.  Try obtaining a new installer file from the application author.
    Date: Mon, 8 Aug 2011 11:19:37 -0600
    From: [email protected]
    To: [email protected]
    Subject: I need help fixing this... i can't get PDF to open
    To open files with the .pdf extension, please use http://get.adobe.com/reader/.
    Thanks,
    Chris
    >

  • FormsCentral retiring in July???!!!  Are you freaking kidding me?  My clients use this feature all the time.  What do you suggest I do now?  What service do I go with that is comparable to it?  I need help with this asap!

    FormsCentral retiring in July???!!!  Are you freaking kidding me?  My clients use this feature all the time.  What do you suggest I do now?  What service do I go with that is comparable to it?  I need help with this asap!

    I would suggest checking out http://www.logiforms.com. They have really good PDF support for both hosted PDF's and generating PDFs. You can:
    populate PDF forms from a web form submission
    Merge multiple PDF's together using conditional logic
    Include uploaded images in the generated PDF
    Get Electronic signatures on PDF's
    Use conditional logic when creating PDF's
    Convert HTML to PDF. You design in HTML and CSS and use form field wildcards and generate the PDF
    More of the PDF features are explained here:
    PDF Form Creator | PDF Form Maker | V3.Logiforms.com
    They are also offering a 25% discount to anyone coming from Forms Central...

  • Well my ipod 4th gen was updated it shut off and now when i try to turn it on it stays on the apple logo for abit then gets stuck on a white screen od blue or mixed colores i really need help fixing this plzz help :(

    Well my ipod 4th gen was updated it shut off and now when i try to turn it on it stays on the apple logo for abit then gets stuck on a white screen od blue or mixed colores i really need help fixing this plzz help

    Try:
    - iOS: Not responding or does not turn on
    - Also try DFU mode after try recovery mode
    How to put iPod touch / iPhone into DFU mode « Karthik's scribblings
    - If not successful and you can't fully turn the iOS device fully off, let the battery fully drain. After charging for an least an hour try the above again.
    - Try on another computer
    - If still not successful that usually indicates a hardware problem and an appointment at the Genius Bar of an Apple store is in order.
    Apple Retail Store - Genius Bar       

  • I need help none of my notifications are coming to my iphone 4 and in the notification center everything is turned on i reset and restored my phone but it's still not working i need help with this asap

    My iphone 4 will not push my notifications to my phone. I reset and restored it and still nothing. I even set it up as a new phone in still nothin can anybody help me.

    Hi R. Weav27,
    Thanks for using Apple Support Communities.  This article has some troubleshooting steps for issues with push notifications:
    iOS: Understanding notifications
    http://support.apple.com/kb/ht3576
    Troubleshooting notifications
    Push notifications require an active Wi-Fi or cellular connection.
    Note: Notifications use Wi-Fi only when a cellular connection is unavailable. Firewalls and proxy servers may affect your ability to receive notifications. For more information, see Unable to use Apple Push Notification service (APNs).
    If you're not receiving notifications for a specific app, try these steps:
    Verify that the app supports notifications.
    After installing an app or restoring a backup to a different iOS device, open the app to begin receiving notifications. If the app requires entering or logging in to an account, you will need to do this before receiving notifications.
    Check Settings > Notification Center to ensure that the app is configured for notifications. If notifications do not appear in the Notification Center, verify that the Notification Center setting for the app is enabled.
    Cheers,
    - Ari

  • I used to be able to open .pdf documents on my MacBook Pro using FireFox with NO problems, all of a sudden NOW they won't open and i get "unsupported" error messages. What the ****? I need to fix this ASAP! Can anyone help in simple non geek language?

    THANKS.

    Depending on which version of Firefox you're using, it no longer currently supports the plug-in provided with Adobe Reader. You have to use PDF Plugin 2.4.4. Just disable the Adobe plugin and use the Schubert plugin.
    Clinton

  • "a copy of firefox is already open." alert, however firefox is not open on my macbook. I have to take midterms, I need help with this ASAP!

    I keep getting the "a copy of firefox is already open" alert and it's not opened. I have researched it and nothing is working. I have a macbook pro version 10.9

    Try restarting the computer. If the problem continues, post back with more information about the specific error. Creating a screenshot of the error and posting it here using [[How do I create a screenshot of my problem?|these instructions]] might help (you could also use the Mac [http://en.wikipedia.org/wiki/Grab_%28software%29 Grab application] to create a screenshot in TIFF format, then resave it as a PNG to post here).
    You could also look through this article:
    [["Firefox is already running but is not responding" error message - How to fix it]]

  • I need help with this script please ASAP

    So I need this to work properly, but when ran and the correct answer is chosen the app quits but when the wrong answer is chosen the app goes on to the next question. I need help with this ASAP, it is due tommorow. Thank you so much for the help if you can.
    The script (Sorry if it's a bit long):
    #------------Startup-------------
    display dialog "Social Studies Exchange Trviva Game by Justin Parzik" buttons {"Take the Quiz", "Cyaaaa"} default button 1
    set Lolz to (button returned of the result)
    if Lolz is "Cyaaaa" then
    killapp()
    else if Lolz is "Take the Quiz" then
              do shell script "say -v samantha Ok starting in 3…2…1…GO!"
    #------------Question 1-----------
              display dialog "Around age 11, many boys left their fathers to become…" buttons {"Scholars", "Warriors", "Apprentices"}
              set A1 to (button returned of the result)
              if A1 is "Apprentices" then
                        do shell script "say -v samantha Correct Answer"
              else
                        do shell script "say -v samantha Wrong Answer"
      #----------Question 2--------
                        display dialog "Most children were taught
    to read so that they could understand the…" buttons {"Music of Mozart", "Bible", "art of cooking"}
                        set A2 to (button returned of the result)
                        if A2 is "Bible" then
                                  do shell script "say -v samantha Correct Answer"
                        else
                                  do shell script "say -v samantha Wrong Answer"
      #------------Question 3---------
                                  display dialog "In the 1730s and 1740s, a religious movement called the_______swept through the colonies." buttons {"Glorius Revolution", "Great Awakening", "The Enlightenment"}
                                  set A3 to (button returned of the result)
                                  if A3 is "Great Awakening" then
                                            do shell script "say -v samantha Correct Answer"
                                  else
                                            do shell script "say -v samantha Wrong Answer"
      #-----------Question 4--------
                                            display dialog "_______ was
    a famous American Enlightenment figure." buttons {"Ben Franklin", "George Washington", "Jesus"}
                                            set A4 to (button returned of the result)
                                            if A4 is "Ben Franklin" then
                                                      do shell script "say -v samantha Correct Answer"
                                            else
                                                      do shell script "say -v samantha Wrong Answer"
      #----------Question 5-------
                                                      display dialog "______ ownership gave colonists political rights as well as prosperity." buttons {"Land", "Dog", "Slave"}
                                                      set A5 to (button returned of the result)
                                                      if A5 is "Land" then
                                                                do shell script "say -v samantha Correct Answer"
                                                      else
                                                                do shell script "say -v samantha Wrong Answer"
      #---------Question 6--------
                                                                display dialog "The first step toward guaranteeing these rights came in 1215. That
    year, a group of English noblemen forced King John to accept the…" buttons {"Declaration of Independence", "Magna Carta", "Constitution"}
                                                                set A6 to (button returned of the result)
                                                                if A6 is "Magna Carta" then
                                                                          do shell script "say -v samantha Correct Answer"
                                                                else
                                                                          do shell script "say -v samantha Wrong Answer"
      #----------Question 7--------
                                                                          display dialog "England's cheif lawmaking body was" buttons {"the Senate", "Parliament", "King George"}
                                                                          set A7 to (button returned of the result)
                                                                          if A7 is "Parliament" then
                                                                                    do shell script "say -v samantha Correct Answer"
                                                                          else
                                                                                    do shell script "say -v samantha Wrong Answer"
      #--------Question 8-----
                                                                                    display dialog "Pariliament decided to overthrow _______ for not respecting their rights" buttons {"King James II", "King George", "King Elizabeth"}
                                                                                    set A8 to (button returned of the result)
                                                                                    if A8 is "King James II" then
                                                                                              do shell script "say -v samantha Correct Answer"
                                                                                    else
                                                                                              do shell script "say -v samantha Wrong Answer"
      #--------Question 9------
                                                                                              display dialog "Parliament named ___ and ___ as England's new monarchs in something called ____." buttons {"William/Mary/Glorius Revolution", "Adam/Eve/Great Awakening", "Johhny/Mr.Laphalm/Burning of the hand ceremony"}
                                                                                              set A9 to (button returned of the result)
                                                                                              if A9 is "William/Mary/Glorius Revolution" then
                                                                                                        do shell script "say -v samantha Correct Answer"
                                                                                              else
                                                                                                        do shell script "say -v samantha Wrong Answer"
      #---------Question 10-----
                                                                                                        display dialog "After accepting the throne William and Mary agreed in 1689 to uphold the English Bill of _____." buttons {"Money", "Colonies", "Rights"}
                                                                                                        set A10 to (button returned of the result)
                                                                                                        if A10 is "Rights" then
                                                                                                                  do shell script "say -v samantha Correct Answer"
                                                                                                        else
                                                                                                                  do shell script "say -v samantha Wrong Answer"
      #---------Question 11------
                                                                                                                  display dialog "By the late 1600s French explorers had claimed the ___ River Valey" buttons {"Mississippi", "Ohio", "Hudson"}
                                                                                                                  set A11 to (button returned of the result)
                                                                                                                  if A11 is "Ohio" then
                                                                                                                            do shell script "say -v samantha Correct Answer"
                                                                                                                  else
                                                                                                                            do shell script "say -v samantha Wrong Answer"
      #------Question 12---------
                                                                                                                            display dialog "______ was sent to ask the French to leave 'English Land'." buttons {"Johhny Tremain", "George Washington", "Paul Revere"}
                                                                                                                            set A12 to (button returned of the result)
                                                                                                                            if A12 is "George Washington" then
                                                                                                                                      do shell script "say -v samantha Correct Answer"
                                                                                                                            else
                                                                                                                                      do shell script "say -v samantha Wrong Answer"
      #---------Question 13-------
                                                                                                                                      display dialog "_____ proposed the Albany Plan of Union" buttons {"George Washingon", "Ben Franklin", "John Hancock"}
                                                                                                                                      set A13 to (button returned of the result)
                                                                                                                                      if A13 is "Ben Franklin" then
                                                                                                                                                do shell script "say -v samantha Correct Answer"
                                                                                                                                      else
                                                                                                                                                do shell script "say -v samantha Wrong Answer"
      #--------Question 14------
                                                                                                                                                display dialog "The __________ declared that England owned all of North America east of the Mississippi" buttons {"Proclomation of England", "Treaty of Paris", "Pontiac Treaty"}
                                                                                                                                                set A14 to (button returned of the result)
                                                                                                                                                if A14 is "" then
                                                                                                                                                          do shell script "say -v samantha Correct Answer"
                                                                                                                                                else
                                                                                                                                                          do shell script "say -v samantha Wrong Answer"
      #-------Question 15-------
                                                                                                                                                          display dialog "Braddock was sent to New England so he could ______" buttons {"Command an attack against French", "Scalp the French", "Kill the colonists"}
                                                                                                                                                          set A15 to (button returned of the result)
                                                                                                                                                          if A15 is "Command an attack against French" then
                                                                                                                                                                    do shell script "say -v samantha Correct Answer"
                                                                                                                                                          else
                                                                                                                                                                    do shell script "say -v samantha Wrong Answer"
      #------TheLolQuestion-----
                                                                                                                                                                    display dialog "____ is the name of the teacher who runs this class." buttons {"Mr.White", "Mr.John", "Paul Revere"} default button 1
                                                                                                                                                                    set LOOL to (button returned of the result)
                                                                                                                                                                    if LOOL is "Mr.White" then
                                                                                                                                                                              do shell script "say -v samantha Congratulations…you…have…common…sense"
                                                                                                                                                                    else
                                                                                                                                                                              do shell script "say -v alex Do…you…have…eyes?"
                                                                                                                                                                              #------END------
                                                                                                                                                                              display dialog "I hope you enjoyed the quiz!" buttons {"I did!", "It was horrible"}
                                                                                                                                                                              set endmenu to (button returned of the result)
                                                                                                                                                                              if endmenu is "I did!" then
                                                                                                                                                                                        do shell script "say -v samantha Your awesome"
                                                                                                                                                                              else
                                                                                                                                                                                        do shell script "say -v alex Go outside and run a lap"
                                                                                                                                                                              end if
                                                                                                                                                                    end if
                                                                                                                                                          end if
                                                                                                                                                end if
                                                                                                                                      end if
                                                                                                                            end if
                                                                                                                  end if
                                                                                                        end if
                                                                                              end if
                                                                                    end if
                                                                          end if
                                                                end if
                                                      end if
                                            end if
                                  end if
                        end if
              end if
    end if

    Use code such as:
    display dialog "Around age 11, many boys left their fathers to become…" buttons {"Scholars", "Warriors", "Apprentices"}
    set A1 to (button returned of the result)
    if A1 is "Apprentices" then
    do shell script "say -v samantha Correct Answer"
    else
    do shell script "say -v samantha Wrong Answer"
    return
    end if
    #----------Question 2--------
    display dialog "Most children were taught to read so that they could understand the…" buttons {"Music of Mozart", "Bible", "art of cooking"}
    set A2 to (button returned of the result)
    if A2 is "Bible" then
    do shell script "say -v samantha Correct Answer"
    else
    do shell script "say -v samantha Wrong Answer"
    return
    end if
    (90444)

  • I need help on This SQL problem ASAP :)

    Hi All,
    I need help on this....
    I have a table...
    Say table name: one
    with these values
    premnum status
    1234 C
    1234 F
    1234 P
    1234 F
    5678 C
    5678 F
    5678 P
    9112 C
    9112 F
    9112 P
    9112 F
    3456 C
    3456 F
    3456 P
    7890 C
    7890 P
    7890 F
    Now, I want to output only those premnum with status = 'C' and those premnum with Status 'F' having a count > 1 (with two status = 'F')
    So the output would be something like this
    premnum status
    1234 C
    1234 F
    1234 F
    5678 C
    9112 C
    9112 F
    9112 F
    3456 C
    7890 C
    I really need help on this asap...
    I need the SQL statement on this....
    Thank you in advance. :)
    Edited by: 804697 on Oct 23, 2010 9:45 PM

    Hi,
    you can use the following query.
    CREATE TABLE PREM_TEST ( premnum NUMBER , STATUS VARCHAR2(1));
    INSERT INTO PREM_TEST VALUES(1234 ,'C');
    INSERT INTO PREM_TEST VALUES(1234 ,'F');
    INSERT INTO PREM_TEST VALUES(1234 ,'P');
    INSERT INTO PREM_TEST VALUES(1234 ,'F');
    INSERT INTO PREM_TEST VALUES(5678 ,'C');
    INSERT INTO PREM_TEST VALUES(5678 ,'F');
    INSERT INTO PREM_TEST VALUES(5678 ,'P');
    INSERT INTO PREM_TEST VALUES(9112 ,'C');
    INSERT INTO PREM_TEST VALUES(9112 ,'F');
    INSERT INTO PREM_TEST VALUES(9112 ,'P');
    INSERT INTO PREM_TEST VALUES(9112 ,'F');
    INSERT INTO PREM_TEST VALUES(3456 ,'C');
    INSERT INTO PREM_TEST VALUES(3456 ,'F');
    INSERT INTO PREM_TEST VALUES(3456 ,'P');
    INSERT INTO PREM_TEST VALUES(7890 ,'C');
    INSERT INTO PREM_TEST VALUES(7890 ,'P');
    INSERT INTO PREM_TEST VALUES(7890 ,'F');
    SELECT     PREMNUM , STATUS
    FROM     PREM_TEST
    WHERE     STATUS = 'C'
    OR          (PREMNUM , STATUS ) IN (     SELECT PREMNUM , STATUS
                                                 FROM     PREM_TEST
                                                 WHERE     STATUS = 'F'
                                                 GROUP BY PREMNUM , STATUS
                                                 HAVING COUNT(*) > 1
    PREMNUM S
    1234 C
    1234 F
    1234 F
    5678 C
    9112 C
    9112 F
    9112 F
    3456 C
    7890 C
    9 rows selected.

  • There is no list view in Search Menu in the iOS 6 AppStore. Please fix this ASAP as it is hurting App Sales.

    There is no list view in Search Menu in the iOS 6 AppStore. They need to fix this ASAP as not being able to view the search results in list format make searching for new apps slow, painful after so many swipes, and nearly impossible. Because after so many swipes it starts to lag and eventually crashes. But most of all it makes finding the apps you want extremely time consuming and hard, as you have to swipe through apps that have nothing to do with what you are searching for. Here's an example...
    Say you want to find an app that can mark where you park your car.
    On the iPhone using iOS 6. Go to the AppStore > Search (you know the little icon at the bottom that says search.) Now type in "Parking" and search for that.
    It brings up games... Ok this would not be an issues except, you have to swipe through each game as opposed to looking at a list of apps and tapping on one that has a name that doesn't indicate it is a game. So now this causes you to end up swiping through 10 or 20 apps before finding even one app that has to do with what you are looking for.
    I'm telling Apple now. If I was a developer I would sue. This has made it very difficult and even discourages some people from searching for Apps. I personally gave up searching after swiping 200 times only to find 4 apps that had anything to do with what I actually was searching for. The old list view worked much better and was drastically more user-friendly. Now I don't even like to look for new Apps because I spend more time swiping through Apps that have nothing to do with what I want and less time reading about the ones I do. All because AppStore search menu doesn't have a List View.
    Fix this so it's more user friendly please and I can actually enjoy searching for new or random Apps in the search menu.

    Radeon,
    Before you make yourself look more ridiculous, please know that this forum is comprised of users, just like you.  Apple's not here.  Imploring Apple to "fix this Apple Clowns" just makes you look stupid and proves that you didn't read the Terms of Use of this forum that YOU agreed to by signing up to post here.
    Feedback goes here:  http://www.apple.com/feedback

  • I need help fixing kernel panic asap please help

    i need help fixing kernel panic asap please help

    OS X- About kernel panics
    Mac OS X- How to log a kernel panic
    Post a copy of your most recent complete panic log.

  • My battery on my iphone theree is growning and it turns off around 80% then in order for it to turn back on i need to put it on the charger , somebody please help me i need to fix this is there anyway  ican??

    my battery on my iphone three is growning and it turns off around 80% then in order for it to turn back on i need to put it on the charger , somebody please help me i need to fix this is there anyway  ican?

    Basic troubleshooting from the User's Guide is reset, restart, restore (first from backup then as new).  Try each of these in order until the issue is resolved.
    If the issue persists, then take the device to Apple for evaluation.
    FYI, Apple will not replace the battery without first doing basic troubleshooting or testing the battery.

  • Urgently need help with this

    Hi!!
    I urgently need help with this:
    When I compile this in Flex Builder 3 it says: The element type 'mx:Application' must be terminated by the matching end-tag '</mx:Application>'.
    but I have this end tag in my file, but when I try to switch from source view to desgin view it says, that: >/mx:Script> expected to terminate element at line 71, this is right at the end of the .mxml file. I have actionscript(.as) file for scripting data.
    This is the mxml code to terminate apllication tag which I did as you can see:
    MXML code:
    <?xml version="1.0" encoding="utf-8"?>
    <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute" backgroundGradientAlphas="[1.0, 1.0]" backgroundGradientColors="[#007200, #000200]" width="1024" height="768" applicationComplete="popolni_vse()">
    <mx:HTTPService id="bazaMME" url="lokalnabaza/baza_MME_svn.xml" showBusyCursor="true" resultFormat="e4x"/>
    <mx:Script source="dajzaj.as"/>
    <mx:states>
    <mx:State name="Galerije">
        <mx:SetProperty target="{panel1}" name="title" value="Galerije MME"/>
        <mx:SetProperty target="{panel2}" name="title" value="opis slik"/>
        <mx:SetProperty target="{panel3}" name="title" value="Opis Galerije"/>   
        <mx:AddChild relativeTo="{panel1}" position="lastChild">
        <mx:HorizontalList x="0" y="22" width="713.09863" height="157.39436" id="ListaslikGalerije"></mx:HorizontalList>
                </mx:AddChild>
                <mx:SetProperty target="{text1}" name="text" value="MME opisi galerij "/>
                <mx:AddChild relativeTo="{panel1}" position="lastChild">
                    <mx:Label x="217" y="346" text="labela za test" id="izbr"/>
                </mx:AddChild>
                <mx:SetProperty target="{label1}" name="text" value="26. November 2009@08:06"/>
                <mx:SetProperty target="{label1}" name="x" value="845"/>
                <mx:SetProperty target="{label1}" name="width" value="169"/>
                <mx:SetProperty target="{Gale}" name="text" value="plac za Galerije"/>
            </mx:State>
            <mx:State name="Projekti"/>
        </mx:states>
    <mx:MenuBar id="MMEMenu" labelField="@label" showRoot="true" fillAlphas="[1.0, 1.0]" fillColors="[#043D01, #000000]" color="#9EE499" x="8" y="24"
             itemClick="dajVsebino(event)" width="1006.1268" height="21.90141">
           <mx:XMLList id="MMEmenuModel">
                 <menuitem label="O nas">
                     <menuitem label="reference podjetja" name="refMME" type="check" groupName="one"/>
                     <menuitem label="reference direktor" name="refdir" type="check" groupName="one"/>
                  <menuitem label="Kontakt" name="podatMME" groupName="one" />
                  <menuitem label="Kje smo" name="lokaMME" type="check" groupName="one" />
                 </menuitem>           
                 <menuitem type="separator"/>
                 <menuitem label="Galerija">
                     <menuitem label="Slovenija" name="galSvn" type="check" groupName="one"/>
                     <menuitem label="Nemčija" name="galDeu" type="check" groupName="one" />
                 </menuitem>
                 <menuitem type="separator"/>
                 <menuitem label="projekti">
                     <menuitem label="Slovenija" name="projSvn" type="check" groupName="one"/>
                     <menuitem label="Nemčija" name="projDeu" type="check" groupName="one" />
                     <menuitem label="Madžarska" name="projHun" type="check" groupName="one"/>
                 </menuitem>
             </mx:XMLList>                       
             </mx:MenuBar>
        <mx:Label x="845" y="10" text="25. November 2009@08:21" color="#FFFFFF" width="169" height="18.02817" id="label1"/>
        <mx:Label x="746" y="10" text="zadnja posodobitev:" color="#FFFFFF"/>
        <mx:Panel x="9" y="57" width="743.02814" height="688.4507" layout="absolute" title="Plac za Vsebino" id="panel1">
            <mx:Text x="0" y="-0.1" text="MME vsebina" width="722.95776" height="648.4507" id="Gale"/>
        </mx:Panel>
        <mx:Label x="197.25" y="748.45" color="#FFFFFF" text="Copyright © 2009 MME d.o.o." fontSize="12" width="228.73239" height="20"/>
        <mx:Label x="463.35" y="748.45" text="izdelava spletnih strani: FACTUM d.o.o." color="#FBFDFD" fontSize="12" width="287.60565" height="20"/>
        <mx:Panel x="759" y="53" width="250" height="705.07043" layout="absolute" title="Plac za hitre novice" id="panel3">
            <mx:Text x="0" y="0" text="MME novice" width="230" height="665.07043" id="text1"/>
            <mx:Panel x="-10" y="325.35" width="250" height="336.61972" layout="absolute" title="začasna panela" color="#000203" themeColor="#4BA247" cornerRadius="10" backgroundColor="#4B9539" id="panel2">
                <mx:Label x="145" y="53" text="vrednost" id="spremmen"/>
                <mx:Label x="125" y="78" text="Label"/>
                <mx:Label x="125" y="103" text="Label"/>
                <mx:Label x="0" y="53" text="spremenljivka iz Menuja:"/>
                <mx:Label x="45" y="78" text="Label"/>
                <mx:Label x="45" y="103" text="Label"/>
            </mx:Panel>
        </mx:Panel>
        <mx:Label x="9.9" y="10" text="plac za naslov MME vsebine" id="MMEnaslov" color="#040000"/>
         </mx:states></mx:Application>

    I know it's been a while but… did you fix this?
    It looks to me like you are terminating the <mx:Application> tag at the top. The opening tag should end like this: resultFormat="e4x">, not resultFormat="e4x"/> (Remove the /).
    Carlos

  • "Skype can't connect. Get help fixing this problem...

    Well, I downloaded Skype. Then, i sign in to my account. And an error pops up on my computer screen that said "Skype can't connect. Get help fixing this problem". Someone help me fix this?
    Solved!
    Go to Solution.

    Make sure you are running the latest updates both for Windows and Skype. See here for help on getting those: https://support.skype.com/en/faq/FA34438/why-should-i-update-my-skype-version-what-do-i-need-to-do-t...
    Follow the latest Skype Community News
    ↓ Did my reply answer your question? Accept it as a solution to help others, Thanks. ↓

  • I deleted aperture and now my sistem is acting crazy. I desperately need help fixing it.Can anyone help me please?

    I deleted aperture and now my sistem is acting crazy.The dock disappeared and almost all icons are gone except for their names.I have an important project for tomorrow and I desperately need help fixing it.Can anyone help me please?

    Well it all started with Aperture 3 trying to import some photos from my iphone.It took ages to import those photos and like I was in a hurry to finish my work in Illustrator so I tryied to force quit on A3 and it didn´t, so I shut down the computer and started over.it was all ok but I uninstalled the A3 and the I realized the icons were back to original form and a few fonts changed.so I Installed the trial version of A3.I did a restart of the system and then there was.aperture lauching but no dock and a 80% of the icons disappeared, but the names of the files and folder remained.and I cand acces the apps from the apple sign on the left corner.I tried also restarting a few time but it´s always the same.I am a recent user of a mac , and please excuse my bad english.If this is in any way useful please help me!

Maybe you are looking for

  • How can I match tempo & sync of old audio files to Garageband?

    HI all, Final question and it's a doozy. While I know the "general concepts" for trying to accomplish the following, acutally trying to get it to work is frustrating. At first thought that the new Garageband tempo/playing thing would work but I'm not

  • Connecting a tv as an extra monitor - 2009 iMac variation

    I have a 2009 IMac and I too want to export a video signal to my analog TV auxiliary input. Any suggestions? My TV accepts RCA plug and S-video. Also, any comments about the picture quality would be appreciated. Thanks.

  • How to detect an AUTO_INCREMENT column in a table of PostgreSQL DB?

    Hello, I need to detect an AUTO_INCREMENT column in a table of PostgreSQL DB. Note : PostgreSQL uses sequence number to create an AUTO_INCREMENT column. From a ResultSetMetaData, I call the methode isAutoIncrement(int index) which returns true if the

  • How to delete contact groups from iPhone

    I have a peculiar problem. While buying iPhone 4 - the vendor helped me transferrng my contacts from Nokia to iPhone 4. I have noticed that some unwanted groups exist without any contact nos. I am unable to delete them now. I have transferred all the

  • Time before unlocking locked tables

    Hello, i have a problem once again: I execute several SQLs in a database (p.e. insert, update and so on). Before i can execute the transaction commit, the connection to the database breaks. So i can do neither the commit less the rollback. In the dat