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 get it 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 [ListFiles path=/testing/roundtable/swfs/homeImgs/][text]number=[index][/text][/ListFil es] [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=[Middle StartAfter=&EndBefore=.swf][filename][/middle]&categorysumm=T&max=1] [text]theVarsURL=[founditems][theVarsURL]&theVarsURL_[theIndex]=[listwords words=[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:

    
  1. Re: random prob (Ron Ceballos 2003)
  2. Re: random prob (Glenn Busbin 2003)
  3. Re: random prob (Rob Marquardt 2003)
  4. Re: random prob (Ron Ceballos 2003)
  5. Re: random prob (Glenn Busbin 2003)
  6. Re: random prob (Beljaeff, Gene 2003)
  7. Re: random prob (Rob Marquardt 2003)
  8. Re: random prob (Ron Ceballos 2003)
  9. Re: random prob (Rob Marquardt 2003)
  10. Re: random prob (Ron Ceballos 2003)
  11. Re: random prob (Rob Marquardt 2003)
  12. Re: random prob (John Peacock 2003)
  13. Re: random prob (Glenn Busbin 2003)
  14. Re: random prob (Ron Ceballos 2003)
  15. Re: random prob (Rob Marquardt 2003)
  16. random prob (Ron Ceballos 2003)
i'm having a bit of trouble with this code -- for the life of me i can't get it 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 [ListFiles path=/testing/roundtable/swfs/homeImgs/][text]number=[index][/text][/ListFil es] [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=[Middle StartAfter=&EndBefore=.swf][filename][/middle]&categorysumm=T&max=1] [text]theVarsURL=[founditems][theVarsURL]&theVarsURL_[theIndex]=[listwords words=[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:

looking for developers with solutions (2000) Strange error (2000) EIMS Problems (1997) textA and Title? (1997) [OT] HTML EMAIL program wanted (1999) SERIAL NUMBER PROBLEM *AGAIN*!!! (1998) Unknown error: OrderNotCreated (1997) WebCat2: Formulas.db question (1997) really wierd browser truncating (1997) Listfiles on network with NT (2000) WebTen? (1997) Error with [applescript] (1999) refreshing IE with posted .tmpl (1997) too many nested tags ... (1997) webcat2b12 CGI -- Date comparisons (1997) Great product and great job ! (1997) Sorting error (1997) WebCatalog Use Question (1997) MATH PROBLEM (1997) Options for http uploading of files (1999)