Re: Bug in random search - MacOS v4.5 plugin ...
This WebDNA talk-list message is from 2002
It keeps the original formatting.
numero = 45462
interpreted = N
texte = Ken -I ran your test on my dev server - OSX 10.1.5 / WebDNA 4.5.0 - and it worked fine for me. In 30+ attempts, I never saw the repeating result problem. It could be a bug in the particular version you're running.As another test, I wrote code to pull characters at random from a text variable instead of a DB. The results appeared equally well distributed (though I didn't run a full statistical analysis) and it ran about 30% faster than the DB method - generally 25-30 ticks vs. 35-40 per execution. You might try this version instead...[text]abc=abcdefghijklmnopqrstuvwxyz[/text][loop start=1&end=200][math show=F]x=ceil([random format=float]*26)[/math][text]firstLetter=[getchars start=[x]&end=[x]][abc][/getchars][/text][math show=F]x=ceil([random format=float]*26)[/math][text]secondLetter=[getchars start=[x]&end=[x]][abc][/getchars][/text][showif [url][twoletterlist][/url]^[url][firstLetter][secondLetter][/url]][text]twoletterlist=[twoletterlist]
[firstLetter][secondLetter] [/text][/showif][hideif [url][twoletterlist][/url]^[url][firstLetter][secondLetter][/url]][text]twoletterlist=[twoletterlist][firstLetter][secondLetter] [/text][/hideif][/loop]... Note: The only flaw I see in your logic is that you could get false matches on your [showif]... if you get a character combination of fo, for example, that would match from the word font if there had already been a duplicate in your twoletterlist- brianAt 6:41 PM 11/19/02, Kenneth Grome wrote:>Here's some more test results. After 30 tests of my code, I found >that webdna got stuck repeating the following strings of >two-character results. Some of these strings appeared in as many as >seven different tests (with only 30 attemtps), so obviously the >results are *repeatable*.>>In fact, only half of my tests gave me the results they should have: >no repeating strings in the results.>>I think this is strong evidence that there is a definite bug in the >ra sort capability of the webdna software.>>:(>>>ys bi li - repeated in 7 different tests>>iy sb il - repeated in 3 different tests>>jp xj ui lx gz bi ys ve kp tq qp dz od gg yq ms wh xl nz bv ez qe sz >kh ql uq jr jj it wh lu xs dg mm th pv ti pc hs oq in zd - repeated >in 2 different tests>>pc hs oq in zd jp xj ui lx gz bi ys ve kp tq qp dz od gg yq ms wh xl >nz bv ez qe sz kh ql uq jr jj it wh lu xs dg mm th pv ti - repeated >in 1 test>>ly te ih ki ss ix sl yt ei hk is si xs - repeated in 1 test>>dj px ju il xg zb iy sv ek pt qq pd zo dg gy qm sw hx ln zb ve zq es >zk hq lu qj rj ji tw hl ux sd gm mt hp vt ip ch so qi nz - repeated >in 1 test>>pt qq pd zo dg gy qm sw hx ln zb ve zq es zk hq lu qj rj ji tw hl ux >sd gm mt hp vt ip ch so qi nz dj px ju il xg zb iy sv ek - repeated >in 1 test>>tq qp dz od gg yq ms wh xl nz bv ez qe sz kh ql uq jr jj it wh lu xs >dg mm th pv ti pc hs oq in zd jp xj ui lx gz bi ys ve kp - repeated >in 1 test>>>Sincerely,>Kenneth Grome-------------------------------------------------------------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:
Ken -I ran your test on my dev server - OSX 10.1.5 / WebDNA 4.5.0 - and it worked fine for me. In 30+ attempts, I never saw the repeating result problem. It could be a bug in the particular version you're running.As another test, I wrote code to pull characters at random from a text variable instead of a DB. The results appeared equally well distributed (though I didn't run a full statistical analysis) and it ran about 30% faster than the DB method - generally 25-30 ticks vs. 35-40 per execution. You might try this version instead...[text]abc=abcdefghijklmnopqrstuvwxyz[/text][loop start=1&end=200][math show=F]x=ceil([random format=float]*26)[/math][text]firstLetter=[getchars start=[x]&end=[x]][abc][/getchars][/text][math show=F]x=ceil([random format=float]*26)[/math][text]secondLetter=[getchars start=[x]&end=[x]][abc][/getchars][/text][showif [url][twoletterlist][/url]^[url][firstLetter][secondLetter][/url]][text]twoletterlist=[twoletterlist][firstLetter][secondLetter] [/text][/showif][hideif [url][twoletterlist][/url]^[url][firstLetter][secondLetter][/url]][text]twoletterlist=[twoletterlist][firstLetter][secondLetter] [/text][/hideif][/loop]... Note: The only flaw I see in your logic is that you could get false matches on your [showif]... if you get a character combination of fo, for example, that would match from the word font if there had already been a duplicate in your twoletterlist- brianAt 6:41 PM 11/19/02, Kenneth Grome wrote:>Here's some more test results. After 30 tests of my code, I found >that webdna got stuck repeating the following strings of >two-character results. Some of these strings appeared in as many as >seven different tests (with only 30 attemtps), so obviously the >results are *repeatable*.>>In fact, only half of my tests gave me the results they should have: >no repeating strings in the results.>>I think this is strong evidence that there is a definite bug in the >ra sort capability of the webdna software.>>:(>>>ys bi li - repeated in 7 different tests>>iy sb il - repeated in 3 different tests>>jp xj ui lx gz bi ys ve kp tq qp dz od gg yq ms wh xl nz bv ez qe sz >kh ql uq jr jj it wh lu xs dg mm th pv ti pc hs oq in zd - repeated >in 2 different tests>>pc hs oq in zd jp xj ui lx gz bi ys ve kp tq qp dz od gg yq ms wh xl >nz bv ez qe sz kh ql uq jr jj it wh lu xs dg mm th pv ti - repeated >in 1 test>>ly te ih ki ss ix sl yt ei hk is si xs - repeated in 1 test>>dj px ju il xg zb iy sv ek pt qq pd zo dg gy qm sw hx ln zb ve zq es >zk hq lu qj rj ji tw hl ux sd gm mt hp vt ip ch so qi nz - repeated >in 1 test>>pt qq pd zo dg gy qm sw hx ln zb ve zq es zk hq lu qj rj ji tw hl ux >sd gm mt hp vt ip ch so qi nz dj px ju il xg zb iy sv ek - repeated >in 1 test>>tq qp dz od gg yq ms wh xl nz bv ez qe sz kh ql uq jr jj it wh lu xs >dg mm th pv ti pc hs oq in zd jp xj ui lx gz bi ys ve kp - repeated >in 1 test>>>Sincerely,>Kenneth Grome-------------------------------------------------------------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/
Brian Fries
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:
forms and variables (1998)
WebCatalog can't find database (1997)
Mail Integration (1999)
Cancel Subscription (1996)
A Global Variable (1997)
Not really WebCat (1997)
[SearchString] usage (1997)
Email problem (1998)
PSC recommends what date format yr 2000??? (1997)
Semi-OT SSL IE problem solved (2005)
Field names beginning with Reg.. (2002)
Why does 0 divided by 1=1? (2003)
[ConvertChars] problem (1997)
[WebDNA] Talklist Archive & Twitter (2009)
access denied problem (1997)
SERIAL NUMBER PROBLEM *AGAIN*!!! (1998)
WebCat2b13MacPlugIn - syntax to convert date (1997)
multi-paragraph fields (1997)
[WebDNA] Quick grep... Govinda?? (2010)
[WebDNA] Google Maps (2019)