Re: Non-repeating Random Numbers - CORRECTION
This WebDNA talk-list message is from 2002
It keeps the original formatting.
numero = 43049
interpreted = N
texte = Boiled Owl RecipeTake one owl, one house brick and a large pot of water.Boil steadily until the brick softens.Throw away the owl and eat the brick.Enjoy!-- Stuart Tremainidfk web developments - AustraliaOn Monday, 2 September 2002, Dan Strong
wrote:>no prob, i'm tougher than a boiled owl. :)>>On Mon, 2 Sep 2002 11:26:03> Andrew Simpson >wrote:>>I wrote similar code to generate a database of 1000 >>random 7 character>>encryptions seeds.>>>>The reason i used a database was that i wanted random >>alpha-numeric>>characters not just numbers which is not 100% what your >>doing - sorry.>>>>Anyway - i'm a bit shorty this morning. sick as a dog and >>stuff that was>>working has stopped working and theres no apparent reason >>and thats about>>the fastest way to piss me off. didn't mean to take it >>out on you.>>>>I do want to throw my copy of webcat out the friggin >>window however and a>>more stable development platform with real code and real >>databases is>>looking more and more enticing.>>>>aaarrrrrgggh!>>>>>>----- Original Message ----->>From: Dan Strong >>To: WebCatalog Talk >>Sent: Monday, September 02, 2002 10:57 AM>>Subject: Re: Non-repeating Random Numbers - CORRECTION>>>>>>> Andrew,>>>>>> I don't really want to search a .db that's why I went >>>the>>> route I did...but I'm sure your code works fine...>>>>>> Seems I spoke too soon..previous code was showing>>> duplicate #s (read: not working as intended) so I >>>altered>>> the code slightly from before, and it appears to work. >>>For>>> anyone who's interested here is working code (Andrew >>>(and>>> any 'grown-ups')can ignore this... ;)>>>>>> [!] -- Randomly generate 6 unique numbers between 1 and >>>54>>> -- [/!]>>> [text show=f]unique_numbers=[/text]>>> [math show=f]found=0[/math]>>> [loop start=1&end=20]>>> [text show=f]random_number=[math]ceil([RANDOM>>> format=float]*(54))[/math][/text]>>> [hideif [unique_numbers]^[random_number]]>>> [text>>> show=f]unique_numbers=[unique_numbers][random_number]>>> [/text]>>> [math show=f]found=[found]+1[/math]>>> [/hideif]>>> [showif [found]=6][break][/showif]>>> [/loop]>>> [unique_numbers]>>>>>> -Dan>>> ------------------------------------------->>> http://www.StrongGraphicDesign.com>>> (208) 319-0137 | Toll-free p/f 877-561-1656>>>>>>>>>>>> On Mon, 2 Sep 2002 11:08:32>>> Andrew Simpson >>> wrote:>>> >whats wrong with :>>> >>>> >[search>>>>>>db=/db/54numbersfrom1-54.db&neNUMBERdatarq=[BLANK]&raNUMBERsort=1&NUMBERtyp>>e>>> >=NUM&max=6]>>> > [founditems][number]
[/founditems]>>> >[/search]>>> >>>> >>>> >----- Original Message ----->>> >From: Dan Strong >>> >To: WebCatalog Talk >>> >Sent: Monday, September 02, 2002 10:46 AM>>> >Subject: Re: Non-repeating Random Numbers - CORRECTION>>> >>>> >>>> >> whoops...>>> >> [showif [found]=5][break][/showif]>>> >> should say 6, not 5... corrected code below:>>> >>>>> >> [!] --- Generate 6 unique numbers between 1 and 54 >>>--->>> >> [/!]>>> >> [text show=f]unique_numbers= [/text]>>> >> [math show=f]found=0[/math]>>> >> [loop start=1&end=20]>>> >> [text show=f]random_number=[math]ceil([RANDOM>>> >> format=float]*(54))[/math][/text]>>> >> [showif [unique_numbers]! [random_number] ]>>> >> [text>>> >> show=f]unique_numbers=[unique_numbers][random_number]>>> >> [/text]>>> >> [math show=f]found=[found]+1[/math]>>> >> [/showif]>>> >> [showif [found]=6][break][/showif]>>> >> [/loop]>>> >> [unique_numbers]>>> >>>>> >> -Dan>>> >> ------------------------------------------->>> >> http://www.StrongGraphicDesign.com>>> >> (208) 319-0137 | Toll-free p/f 877-561-1656>>> >>>>> >>>>> >> >>>------------------------------------------------------------->>> >> This message is sent to you because you are >>>subscribed>>> >>to>>> >> the mailing list .>>> >> To unsubscribe, E-mail to:>>> >>>>> >> To switch to the DIGEST mode, E-mail to>>> >>>> >> Web Archive of this list is at:>>> >>http://search.smithmicro.com/>>> >>>> >>>> >------------------------------------------------------------->>> >This message is sent to you because you are subscribed >>>to>>> > the mailing list .>>> >To unsubscribe, E-mail to:>>> >>>> >To switch to the DIGEST mode, E-mail to>>> >>>> >Web Archive of this list is at:>>> >http://search.smithmicro.com/>>>>>>>>> ------------------------------------------------------------->>> This message is sent to you because you are subscribed >>>to>>> the mailing list .>>> To unsubscribe, E-mail to: >>>>>> To switch to the DIGEST mode, E-mail to>>>>> Web Archive of this list is at: >>>http://search.smithmicro.com/>>>>>>------------------------------------------------------------->>This message is sent to you because you are subscribed to>> the mailing list .>>To unsubscribe, E-mail to: >>>>To switch to the DIGEST mode, E-mail to >>>>Web Archive of this list is at: >>http://search.smithmicro.com/>>------------------------------------------->http://www.StrongGraphicDesign.com>(208) 319-0137 | Toll-free p/f 877-561-1656>>------------------------------------------------------------->This message is sent to you because you are subscribed to> the mailing list .>To unsubscribe, E-mail to: >To switch to the DIGEST mode, E-mail to >Web Archive of this list is at: http://search.smithmicro.com/>-------------------------------------------------------------This message is sent to you because you are subscribed to the mailing list .To unsubscribe, E-mail to: To switch to the DIGEST mode, E-mail to Web Archive of this list is at: http://search.smithmicro.com/
Associated Messages, from the most recent to the oldest:
Boiled Owl RecipeTake one owl, one house brick and a large pot of water.Boil steadily until the brick softens.Throw away the owl and eat the brick.Enjoy!-- Stuart Tremainidfk web developments - AustraliaOn Monday, 2 September 2002, Dan Strong wrote:>no prob, i'm tougher than a boiled owl. :)>>On Mon, 2 Sep 2002 11:26:03> Andrew Simpson >wrote:>>I wrote similar code to generate a database of 1000 >>random 7 character>>encryptions seeds.>>>>The reason i used a database was that i wanted random >>alpha-numeric>>characters not just numbers which is not 100% what your >>doing - sorry.>>>>Anyway - i'm a bit shorty this morning. sick as a dog and >>stuff that was>>working has stopped working and theres no apparent reason >>and thats about>>the fastest way to piss me off. didn't mean to take it >>out on you.>>>>I do want to throw my copy of webcat out the friggin >>window however and a>>more stable development platform with real code and real >>databases is>>looking more and more enticing.>>>>aaarrrrrgggh!>>>>>>----- Original Message ----->>From: Dan Strong >>To: WebCatalog Talk >>Sent: Monday, September 02, 2002 10:57 AM>>Subject: Re: Non-repeating Random Numbers - CORRECTION>>>>>>> Andrew,>>>>>> I don't really want to search a .db that's why I went >>>the>>> route I did...but I'm sure your code works fine...>>>>>> Seems I spoke too soon..previous code was showing>>> duplicate #s (read: not working as intended) so I >>>altered>>> the code slightly from before, and it appears to work. >>>For>>> anyone who's interested here is working code (Andrew >>>(and>>> any 'grown-ups')can ignore this... ;)>>>>>> [!] -- Randomly generate 6 unique numbers between 1 and >>>54>>> -- [/!]>>> [text show=f]unique_numbers=[/text]>>> [math show=f]found=0[/math]>>> [loop start=1&end=20]>>> [text show=f]random_number=[math]ceil([RANDOM>>> format=float]*(54))[/math][/text]>>> [hideif [unique_numbers]^[random_number]]>>> [text>>> show=f]unique_numbers=[unique_numbers][random_number]>>> [/text]>>> [math show=f]found=[found]+1[/math]>>> [/hideif]>>> [showif [found]=6][break][/showif]>>> [/loop]>>> [unique_numbers]>>>>>> -Dan>>> ------------------------------------------->>> http://www.StrongGraphicDesign.com>>> (208) 319-0137 | Toll-free p/f 877-561-1656>>>>>>>>>>>> On Mon, 2 Sep 2002 11:08:32>>> Andrew Simpson >>> wrote:>>> >whats wrong with :>>> >>>> >[search>>>>>>db=/db/54numbersfrom1-54.db&neNUMBERdatarq=[BLANK]&raNUMBERsort=1&NUMBERtyp>>e>>> >=NUM&max=6]>>> > [founditems][number]
[/founditems]>>> >[/search]>>> >>>> >>>> >----- Original Message ----->>> >From: Dan Strong >>> >To: WebCatalog Talk >>> >Sent: Monday, September 02, 2002 10:46 AM>>> >Subject: Re: Non-repeating Random Numbers - CORRECTION>>> >>>> >>>> >> whoops...>>> >> [showif [found]=5][break][/showif]>>> >> should say 6, not 5... corrected code below:>>> >>>>> >> [!] --- Generate 6 unique numbers between 1 and 54 >>>--->>> >> [/!]>>> >> [text show=f]unique_numbers= [/text]>>> >> [math show=f]found=0[/math]>>> >> [loop start=1&end=20]>>> >> [text show=f]random_number=[math]ceil([RANDOM>>> >> format=float]*(54))[/math][/text]>>> >> [showif [unique_numbers]! [random_number] ]>>> >> [text>>> >> show=f]unique_numbers=[unique_numbers][random_number]>>> >> [/text]>>> >> [math show=f]found=[found]+1[/math]>>> >> [/showif]>>> >> [showif [found]=6][break][/showif]>>> >> [/loop]>>> >> [unique_numbers]>>> >>>>> >> -Dan>>> >> ------------------------------------------->>> >> http://www.StrongGraphicDesign.com>>> >> (208) 319-0137 | Toll-free p/f 877-561-1656>>> >>>>> >>>>> >> >>>------------------------------------------------------------->>> >> This message is sent to you because you are >>>subscribed>>> >>to>>> >> the mailing list .>>> >> To unsubscribe, E-mail to:>>> >>>>> >> To switch to the DIGEST mode, E-mail to>>> >>>> >> Web Archive of this list is at:>>> >>http://search.smithmicro.com/>>> >>>> >>>> >------------------------------------------------------------->>> >This message is sent to you because you are subscribed >>>to>>> > the mailing list .>>> >To unsubscribe, E-mail to:>>> >>>> >To switch to the DIGEST mode, E-mail to>>> >>>> >Web Archive of this list is at:>>> >http://search.smithmicro.com/>>>>>>>>> ------------------------------------------------------------->>> This message is sent to you because you are subscribed >>>to>>> the mailing list .>>> To unsubscribe, E-mail to: >>>>>> To switch to the DIGEST mode, E-mail to>>>>> Web Archive of this list is at: >>>http://search.smithmicro.com/>>>>>>------------------------------------------------------------->>This message is sent to you because you are subscribed to>> the mailing list .>>To unsubscribe, E-mail to: >>>>To switch to the DIGEST mode, E-mail to >>>>Web Archive of this list is at: >>http://search.smithmicro.com/>>------------------------------------------->http://www.StrongGraphicDesign.com>(208) 319-0137 | Toll-free p/f 877-561-1656>>------------------------------------------------------------->This message is sent to you because you are subscribed to> the mailing list .>To unsubscribe, E-mail to: >To switch to the DIGEST mode, E-mail to >Web Archive of this list is at: http://search.smithmicro.com/>-------------------------------------------------------------This message is sent to you because you are subscribed to the mailing list .To unsubscribe, E-mail to: To switch to the DIGEST mode, E-mail to Web Archive of this list is at: http://search.smithmicro.com/
Stuart Tremain
DOWNLOAD WEBDNA NOW!
Top Articles:
Talk List
The WebDNA community talk-list is the best place to get some help: several hundred extremely proficient programmers with an excellent knowledge of WebDNA and an excellent spirit will deliver all the tips and tricks you can imagine...
Related Readings:
webcat plugin issue (2001)
'does not contain' operator needed ... (1997)
WebCat & WebTen (1997)
WebCommerce: Folder organization ? (1997)
multiple prices (1998)
problems with WebCat-Plugin ()
Zip Code Search (2000)
duplicate cart numbers (2002)
[TaxableTotal] - not working with AOL and IE (1997)
Setting up shop (1997)
WebCat2b13MacPlugIn - syntax to convert date (1997)
Database Program (1997)
Multi Actions (1999)
4.0 Plugin under Webten (2000)
Cart -> Date and Time (2004)
webmerchant/ Mac Auth. and CC refunds (1998)
Upgrading from version (1998)
ShowCart Errors (2000)
WebDNA version? (2007)
5.0 Pricing (2003)