random prob
This WebDNA talk-list message is from 2003
It keeps the original formatting.
numero = 50393
interpreted = N
texte = i'm having a bit of trouble with this code -- for the life of me i can't getit to truly give me unique, random numbers, it always duplicates 2 valuesi've been working on it for quite a long time - please help./rc[ListFilespath=/testing/roundtable/swfs/homeImgs/][text]number=[index][/text][/ListFiles][text]unique_numbers=[/text][text]found=0[/text][loop start=1&end=500&advance=1][text]random_number=[math]ceil([random]/7)[/math][/text][hideif [unique_numbers]^[random_number]|][text show=f]unique_numbers=[unique_numbers][random_number]|[/text][text]found=[math][found]+1[/math][/text][/hideif][showif [found]=[number]][break][/showif][/loop][text]numbers=1~2~3~4~5~6~7~8~9~10~11~12~13[/text][listwords words=[numbers]&delimiters=~][showif[unique_numbers]![word]|][text]unique_numbers=[unique_numbers][word]|[/text][/showif][/listwords][text]theVars=[/text][text]theVarsURL=[/text][loop start=1&end=13&advance=1][text]theIndex=[index][/text][ListWords Words=[unique_numbers]&delimiters=|][showif [index]=[theIndex]][text]TheRandomNumber=[word][/text][/showif][/listwords][ListFiles path=/testing/roundtable/swfs/homeImgs/][showif [index]=[TheRandomNumber]][text]thevars=[theVars]&var_[theIndex]=swfs/homeImgs/[filename][/text][search db=mainframe.db&eqcompanynamedatarq=[MiddleStartAfter=&EndBefore=.swf][filename][/middle]&categorysumm=T&max=1][text]theVarsURL=[founditems][theVarsURL]&theVarsURL_[theIndex]=[listwordswords=[category]&delimiters= ][showif[index]=1][word][/showif][/listwords][/founditems][/text][/search][/showif][/ListFiles][/loop]-------------------------------------------------------------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://webdna.smithmicro.com/
Associated Messages, from the most recent to the oldest:
i'm having a bit of trouble with this code -- for the life of me i can't getit to truly give me unique, random numbers, it always duplicates 2 valuesi've been working on it for quite a long time - please help./rc[ListFilespath=/testing/roundtable/swfs/homeImgs/][text]number=[index][/text][/ListFiles][text]unique_numbers=[/text][text]found=0[/text][loop start=1&end=500&advance=1][text]random_number=[math]ceil([random]/7)[/math][/text][hideif [unique_numbers]^[random_number]|][text show=f]unique_numbers=[unique_numbers][random_number]|[/text][text]found=[math][found]+1[/math][/text][/hideif][showif [found]=[number]][break][/showif][/loop][text]numbers=1~2~3~4~5~6~7~8~9~10~11~12~13[/text][listwords words=[numbers]&delimiters=~][showif[unique_numbers]![word]|][text]unique_numbers=[unique_numbers][word]|[/text][/showif][/listwords][text]theVars=[/text][text]theVarsURL=[/text][loop start=1&end=13&advance=1][text]theIndex=[index][/text][ListWords Words=[unique_numbers]&delimiters=|][showif [index]=[theIndex]][text]TheRandomNumber=[word][/text][/showif][/listwords][ListFiles path=/testing/roundtable/swfs/homeImgs/][showif [index]=[TheRandomNumber]][text]thevars=[theVars]&var_[theIndex]=swfs/homeImgs/[filename][/text][search db=mainframe.db&eqcompanynamedatarq=[MiddleStartAfter=&EndBefore=.swf][filename][/middle]&categorysumm=T&max=1][text]theVarsURL=[founditems][theVarsURL]&theVarsURL_[theIndex]=[listwordswords=[category]&delimiters= ][showif[index]=1][word][/showif][/listwords][/founditems][/text][/search][/showif][/ListFiles][/loop]-------------------------------------------------------------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://webdna.smithmicro.com/
Ron Ceballos
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:
ShowNext (1997)
Referrer field to header field conversion (1997)
More on the email templates (1997)
[quantity] within formulas (1997)
Setting up shop (1997)
Frames and WebCat (1997)
Central Reservation System? (2003)
[WriteFile] problems (1997)
WEBCAT HIERARCHY (1999)
Firewalls - What's Good? (1999)
PROBLEM (1997)
Arrays (2000)
WC hosting services required (1998)
How do you hide [math]stuff[/math] (1997)
[WebDNA] bug with max and startat (2010)
Bug or syntax error on my part? (1997)
Here's how to kill a Butler Database. (1997)
WCf2 and nested tags (1997)
Re:mail list (1998)
webcat serving up 2+ versions of the same db? (2000)