Random Numbers not playing fair!

Hi All.
Can anyone explain why I keep getting the same number out of the Random class? Each time I run my program, I get a different number, but it then repeats that same 'random' number. I've tried using the Math.random and that didn't seem to work either.
Thanks
Dr Nick

This "repeating the same number" problem of Random is
usually because it's instantiated many times in a
loop. Random takes its seed from the system clock with
a resolution of 1 millisecond. If random is
instantiated many times during 1 millisecond it will
use the same seed and thus deliver the same random
numbers.That's all true, but he said he experienced this with java.lang.Math.random() which reuses the same random number generator. Here's the source for it:
    public static double random() {
        if (randomNumberGenerator == null) initRNG();
        return randomNumberGenerator.nextDouble();
    }"randomNumberGenerator" is static.

Similar Messages

  • Captivate 7 saved project randomly does not play slide audio in preview project.

    I created a training project with over 100 slides. Each slide has an audio track that I recorded, When I preview each slide it sounds fine. When you preview the entire project, some slides randomly do not play the audio track. Try it again and other slides randomly don't play. How can I fix this and prevent it from happening?

    I concur, but do not have the device with me today, and was wondering if this is a common discrepancy. Has anyone tested Captivate output with slide audio into DPS? Does it work?

  • Hi, I have an iPhone 4 which rings people when it is locked, whether or not in my pocket.  I always lock it when not using it.  Can anyone help? It is calling random numbers, not the last person or anyone even recently called on my recents list. Thanks

    Hi, I have an iPhone 4 which rings people when it is locked, whether or not in my pocket.  I always lock it when not using it.  Can anyone help? It is calling random numbers, not the last person or anyone even recently called on my recents list. Thanks

    Pay no attention to iinami, the amount of replies to people saying their handsets must have been jailbroken everytime iTunes throws out an error is tremendous. (Clearly you don't need to have any real knowledge to get to level 3 on these forums, let's hope apple's geniuses know a lot more than some of their customers.)
    http://support.apple.com/kb/TS3694
    Solution below.
    Error 9
    This error occurs when the device unexpectedly loses its USB connection with iTunes. This can occur if the device is manually disconnected during the restore process. This issue can be resolved by performing USB troubleshooting, using a different USB dock-connector cable, trying another USB port, restoring on another computer, or by eliminating conflicts from third-party security software.

  • Phone is malfunctioning, voice command comes on and calls random numbers or plays Ipod

    Phone is malfunctioning, voice command comes on and calls random numbers or plays Ipod

    Have you tried the standard fixes:
    - Reset
    Reset iPod touch:  Press and hold the On/Off Sleep/Wake button and the Home
    button at the same time for at least ten seconds, until the Apple logo appears.
    - Restoring from backup
    - Restoring to factory defaults/new iPod
    Are you using the headphone/mic?  If so sometimes sweat/moisture in the controls can make the iPod do strange things.
    What number are you looking for?
    If les than a year old, the Apple warranty still covers it.

  • Random songs NOT PLAYING!

    is this just something iPod gen 4 users have to put up with? is there really no 'fix' out there? we paid too much money to have to be dealing with this...
    i upload songs to my iTunes and they play just fine on there - once they are on my iPod (gen 4) they do not play. the title will show up, it hovers on the title for a while, but never plays and just skips on to the next song. WHY??!!
    i've seen older posts on this, but no one seems to have a solution. who can i talk to??

    I'm having the exact same problem, and I see since your post was in May, apparently no one knows how to correct it. I have a few songs that play fine on my computer, and in iTunes, and even when I have my iPod connected and play from my iPod music list. But when I disconnect my iPod, the songs will not play. It hovers over the song for a few seconds, then skips to the next one.
    Does ANYONE know how to fix this issue? I've been an iPod user for 7 years and love my nano, but I will replace it in a heartbeat if it doesn't work 100%.

  • Premiere Pro CC not playing fair with .mov files

    I have a CC account and use Premiere Pro on my PC with no issues so far except that the RAM and Graphics card suck. So I decided to run on my laptop running windows 8 rather than 7.
    AE runs with no issues (so far), but when I use Premiere Pro it does not like .mov files for some reason.
    I imported files from my iPad and it gives me this message:
    Error Message
    "The FIle Has no Audio or Video Streams"
    To work around it for now, I converted the file into mp4 and imported to edit from there. Now issue is that we need to place a lower third. I have an AE project as the .mov file imports into that no problem, but when I then export as quicktime file for the alpha channel it still will not import into Premiere Pro, same error message.
    I can export as .avi but then the file screams 'MASSIVE' as it is over 1.5gb cpmpared to the 32mb as a .mov file.
    Bottom line, cannot get any .mov to import into PP on my laptop even though it works fine on my PC. Also, .mov files play fine in AE??
    Please HELP
    Martin

    Hi MartinSalteruk,
    Thanks for contacting Adobe Forums,
    As I understood you are only getting issues with .mov files, Please check if you Quicktime player installed on the system.
    if not click here to download the Quicktime player
    Regards,
    Sandeep

  • Random midi notes playing and midi playback transposing on it's own.

    hi,
    i wonder if anybody can help with this..... i am using 10.5.5 and logic 8. when i play something using midi, after a few playbacks normal it suddenly pushes all the notes so that they play back different, its like it transposes all the notes up a tone or down a tone when i hit record it often records long notes very high up in the scale that i never played. it's driving me crazy.
    hope you can help

    This will better explain the scrubber bar, sorry, sometimes I think too quick without realizing it. In the 3.0 version, from the playback display for a podcast, tapping the screen brings up a set of expert controls: a button to email a link to the podcast's page on iTunes; a 30-second "What's that, now?" instant rewind button; and a playback speed control to give you 1/2 speed, normal or 2x "FedEx mode" playback. The scrubber bar itself has been given a charge, even though it doesn't look any different until you tap it; it displays the relative playback position within the episode being played. Dragging horizontally gives you high-speed scrubbing (previously known as "just plain old scrubbing"), but if you keep your finger on the screen and drag down, your scrub rate lowers step by step through half-speed, quarter-speed and 'fine scrubbing.' This detail control makes it a lot easier to cue up a particular spot in a long show or book chapter.
    Check & see where yours"might be set".
    If its not this, then try & restore from backup & see if that fixes the problem.

  • Internet explorer 6 not playing fair

    Hi I have just made this site live and thought everything was ok but have tested in adobe lab browser and everything not ok and I am not sure how to fix it.  If I fix it for internet explorer, it doesnt render properly in firefox and other compliant browsers.
    Site is http://http://kimberleypropertysettlements.com.au/index.html
    On the home page the h2 tags are a different font and size and the bottom paragraph does not centre across the page.
    On the links page the links do not line up under the h2 headings and there seems to be some odd letters above the links .. god knows where they came from.
    For some reason probably my internet connection .. as I am away .. browser lab wont load the rest of the pages on this site so I cant see what mess they are in.
    If anyone can suggest some solutions, I would be eternally grateful.  Thanks

    Hello,
    in order to underline osgood_'s argument, I'll point to the descriptive analyzes for the current use of the various browsers worldwide. This may show you why you don't need to "mourn about" a possible bad presentation in this old IE6 Browser. This browser - you can say - is no longer in use. The spread is, the statistics shows it, very very low (or better disguised in "Other"). The attached analysis from
    http://gs.statcounter.com/#browser_version-ww-monthly-201201-201208-ba-bar
    shows this clearly.
    Hans-Günter

  • CSS layout not playing fair!

    Hello all
    I need this website ploughing out by the end of
    tonight....not a problem normally but I am having huge problems
    with the middle div content being pushed down below the side div's
    as soon as the images are placed within them. Now this all appears
    fine in FF its IE that I see the problem so I must be doing
    something wrong but for the life of me I cannot see it.
    The web page is
    http://www.tms-yorkshire.com
    if anyone could pass their master eye over it I would be very
    grateful!
    Cheers
    Andy Forbes

    <div id="divBottomAd"><img name="" src=""
    width="180" height="150"
    alt="Lime" style="background-color: #CCCCCC"></div>
    You have no image here (img name="" ) but you specify a
    height of 150. EI
    will read it and render it. FF does not
    Remove the height should fix the problem.
    Sorry about the previous post all bunched together...
    Michael Hager
    "andy_forbes" <[email protected]> wrote in
    message
    news:ei9pce$rt3$[email protected]..
    > Hello all
    > I need this website ploughing out by the end of
    tonight....not a problem
    > normally but I am having huge problems with the middle
    div content being
    > pushed
    > down below the side div's as soon as the images are
    placed within them.
    > Now
    > this all appears fine in FF its IE that I see the
    problem so I must be
    > doing
    > something wrong but for the life of me I cannot see it.
    > The web page is
    http://www.tms-yorkshire.com
    if anyone could pass their
    > master
    > eye over it I would be very grateful!
    > Cheers
    > Andy Forbes
    >

  • Files given random numbers (not by me)

    On some of my documents, after saving, there is a number at the top (like this BUSINES#4042A7)- I didn't put it there and it replaces some of the text I DID save it under. It also sometimes happens that those files that have been given numbers (from wherever) get wiped. I lost a load of research work this way.
    What is going on?

    #1 It would help us greatly if we knew what program you are using!
    Whenever something starts going wrong with the computer I suggest you first boot from the installer disk, run Disk Utility and verify (and repair if necessary) the drive. Then repair the preferences on your computer. You can also repair preferences from DU on your main drive while booted, but to properly verify and repair your drive you have to run it from a drive other than the boot drive.
    [Resolve startup issues and perform disk maintenance with Disk Utility and fsck|http://docs.info.apple.com/article.html?artnum=106214]
    [Using Disk Utility in Mac OS X 10.4.3 or later|http://docs.info.apple.com/article.html?artnum=302672]
    [Disk Utility's Repair Disk Permissions|http://docs.info.apple.com/article.html?artnum=25751]
    The procedures I suggested above might help if it is your operating system having problems. You can also try trashing the program's preferences, but we can't tell you what those might be named without knowing the program. If it is the software you are using then it might help to refer the question to the software writer's own help forum (if such exists).

  • External SATA USB drive not playing fair...

    I have a 1TB Samsung SATA drive, that was installed in my PC.  The PC is going, and I've now put the SATA into an external USB enclosure.  Everything was installed, wired up, connected and plugged in.  The drive was found OK.
    It showed up as a removable drive, with the safe to remove icon in systray, and appeared in explorer.  I was able to access it, no problems.  It's partitioned into three drives, and I copied data from two of the partitions onto a NAS drive.  However,
    after powering down the laptop and the drive I can no longer get it to be recognised in Vista.
    The lights come on on the front of the drive enclosure, so there's power getting to it.  But, it doesn't show up.
    It doesn't show up in the 'Disk drives' section of Device Manager.  I can't see it anywhere else in device manager.  I can't see it in explorer.  As far as I know, from what Vista is telling me...it doesn't exist.  However, I'm sitting
    looking at the drive just now.  It's connected and plugged in.  But nothing.
    So, has anyone any ideas why this is happening?  What can I do to get the drive to show?  Where should I be looking?

    You may want to reach out to a data recovery service/company. Expect to spend few hundred bucks
    Sam Boutros, Senior Consultant, Software Logic, KOP, PA http://superwidgets.wordpress.com (Please take a moment to Vote as Helpful and/or Mark as Answer, where applicable)

  • Fairplay Version 2 protected files not playing

    Recently got a 32gig 3rd generation Touch and noticed some older music and videos I bought through iTunes won't play. Videos say they cannot be played. Music just refuses to start, if I press play it pauses itself. Newer music and videos bought through iTunes store and my own recordings work fine.
    The only thing that everything that won't play has in common is that under info they list "Fairplay Version: 2" Everything that does not list a Fairplay version will play. Wikipedia says that Fairplay is the old protection Apple used to use. I can upgrade the songs through iTunes to the non protected version (for $.30 each), but I can't seem to fix the videos.
    3rd gen Touches don't recognize Apples old DRM? Can this be fixed? Anyone else notice this?

    I am having the same problem with AppleTV and Itunes not playing Fair Play version 2 content after upgrading to Windows 7 So far Support for the ITunes store has not come up with a solution. I am very concerned since I have a significant amount of content that is affected by this problem. I haven't checked yet whether my Ipod's will play this content but will now. However, rebuying the content as the earlier post suggests is not an option since the content affected - TV seasons - equates to roughly $500 in purchases.

  • ITunes has recently began corrupting my music library and my Podcasts. An exclamation mark has appeared at the beginning of a random number of songs and against some Podcasts with the result that they will not play on iTunes. Message is that iTunes cannot

    iTunes has recently began corrupting my Music  and some of the Podcasts.  An exclamation mark appears at a random selection of songs - about a thoussanad of them - and they will not play as iTunes says that it cannot locate the file.  This also has happened on a number of Podcasts.  Any one else encountered this?

    This happens if the file is no longer where iTunes expects to find it. Possible causes are that you or some third party tool has moved, renamed or deleted the file, or that the drive it lives on has had a change of drive letter. It is also possible that iTunes has changed from expecting the files to be in the pre-iTunes 9 layout to post-iTunes 9 layout,or vice-versa, and so is looking in slightly the wrong place.
    Select a track with an exclamation mark, use Ctrl-I to get info, then cancel when asked to try to locate the track. Look on the summary tab for the location that iTunes thinks the file should be. Now take a look around your hard drive(s). Hopefully you can locate the track in question. If a section of your library has simply been moved, or a drive letter has changed, it should be possible to reverse the actions.
    Alternatively, if you are running Windows (you've posted in iTunes for Windows, but your sig mentions Mac OS X...), and as long as you can find a location holding the missing files, then you should be able to use my FindTracks script to reconnect them to iTunes.
    tt2

  • ITunes 11 is not playing my Playlists in the order specified; it's more random play order

    iTunes 11 is not playing my Playlists in specified order (songs 1,2,3, etc); it seems to be plaing in random order

    See my article on Grouping tracks into albums, in particular the topic One cover for multi-disc album.
    tt2

  • After loading the new OS now my songs do not play correctly. Titles are wrong on songs and it just doesn't play certain songs in random play or even if you select them individually. What's up? Kind of frustrating!!!

    After loading the new OS my songs do not play correctly, is anyone else having this issue? Titles are wrong on songs and it just doesn’t play certain songs in random play or even if you select them individually. What’s up? Kind of frustrating!!!

    I had the same issue.  In fact I posted it yesterday, but didn't get any replies.  I physically synched my phone to PC iTunes.  on the PC, under the phone/music tab, I unchecked the synch music box and then the apply button to remove all of the music from my phone.  Then once that synch finished, I went back and selected all music, and synch music and apply to put it back on to the phone.  So far, I haven't had an issue again, but I also haven't listened very long.  Hope this helps!

Maybe you are looking for

  • Problems with a car adapter?

    I have an ipod nano along with 3 other members of my family who also have ipod nanos. We purchased an adapter for the car to listen to the music through the radio. The adapter we bought wasn't apple brand, but 3 of the ipods work fine with it. When I

  • Help - wifi connection to a closed network

    I have a blackberry 8900. How do you connect to a closed network via ADSL? The wifi does connect to the router, and I am able to browse the net. The ADSL also allows access to a closed network, but I am unable to access the closed network. why? if i

  • Who is DonGilli and how did he get in my "Source List"?

    This is really wierd! I just opened iTunes from my Applications folder and I saw a file that is titled "DonGilli's Music" and it has a little padlock on it. I clicked on it and it asked for my password, but it won't accept my password! DonGilli's Mus

  • Importing iWeb site to my computer

    Our website was created with iWeb '09 and published to our site via FTP. I need to be able to collaborate and edit the site also. Is it possible to download the site to my computer and import it into my iWeb '09 on my Macbook Pro? Or, is it possible

  • Macbook pro won't reboot after installing lion

    After installing Lion on a 2007 MacBook pro, it won't reboot.  Just gets to the gray screen with the spinning wheel.  Have tried re-installing and disk repair to no avail.  Anyone else figured out how to fix?