• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Best way to get a non-repeating random number?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Best way to get a non-repeating random number?


  • Subject: Re: Best way to get a non-repeating random number?
  • From: "Eric E. Dolecki" <email@hidden>
  • Date: Mon, 13 Apr 2009 20:58:26 -0400

For an example I might want to generate numbers from 1 to 10 over and over.
All I want to do is when I generate a new number is not allow it to equal
the previously held value. I can imagine a few approaches but I just wanted
to make sure I was using the most accepted way of doing it.
E.

On Mon, Apr 13, 2009 at 8:46 PM, Uli Kusterer
<email@hidden>wrote:

> On 14.04.2009, at 02:36, Michael Ash wrote:
>
>> Note that writing a
>> proper shuffling algorithm is harder than it sounds. More properly,
>> it's easy, but figuring out whether you got the correct one or one of
>> the zillions of ones that look correct but aren't is difficult.
>>
>
>
>  Curious which ones look correct but aren't. Have any examples or a link to
> an article?
>
> Cheers,
> -- Uli Kusterer
> "The Witnesses of TeachText are everywhere..."
> http://www.zathras.de
>
>
>
>
>
> _______________________________________________
>
> Cocoa-dev mailing list (email@hidden)
>
> Please do not post admin requests or moderator comments to the list.
> Contact the moderators at cocoa-dev-admins(at)lists.apple.com
>
> Help/Unsubscribe/Update your Subscription:
>
> This email sent to email@hidden
>



--
http://ericd.net
Interactive design and development
_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Follow-Ups:
    • Re: Best way to get a non-repeating random number?
      • From: Ricky Sharp <email@hidden>
References: 
 >Best way to get a non-repeating random number? (From: "Eric E. Dolecki" <email@hidden>)
 >Re: Best way to get a non-repeating random number? (From: "Luca C." <email@hidden>)
 >Re: Best way to get a non-repeating random number? (From: Uli Kusterer <email@hidden>)
 >Re: Best way to get a non-repeating random number? (From: Michael Ash <email@hidden>)
 >Re: Best way to get a non-repeating random number? (From: Uli Kusterer <email@hidden>)

  • Prev by Date: Re: typeFromFileExtension in Leopard SDK
  • Next by Date: Re: Best way to get a non-repeating random number?
  • Previous by thread: Re: Best way to get a non-repeating random number?
  • Next by thread: Re: Best way to get a non-repeating random number?
  • Index(es):
    • Date
    • Thread