Re: Generating a random image, but avoiding repeated images.
This WebDNA talk-list message is from 1999
It keeps the original formatting.
numero = 25285
interpreted = N
texte = You could choose a random starting point and then just add 1 to the number each time withthe database wrapping around if say the last one was 100.jpg back to 1.jpgChristopher Feyrer wrote:> We have a database of several hundred images from which I would like to> pull a random image. This is pretty easily accomplished using the Search> feature and its random function.>> My question is this: How can I make sure that each image gets displayed at> least once, and that there aren't repeating images?>> My first solution is to implement a secondary database which records the> number of the image, say 3 of 200, and if 3 of 200 was previously> displayed, it would automatically do another random search until it found> an unused number graphic.>> Does this make sense? Is there a shortcut in webcatalog so I can have the> search be sure to generate non-repeating random results?>> Thanks for any assistance.>> Christopher Feyrer> System Administrator> FoodSpot.com> chris@foodspot.com> -------------------> PGP 6.x key available.>> -------------------------------------------------------------> Brought to you by CommuniGate Pro - The Buzz Word Compliant Messaging Server.> To end your Mail problems go to
.>> 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 --Conrad Hubbard - White WolfComputer Projects Assistanthttp://www.white-wolf.comThe Howl heard 'round the World-------------------------------------------------------------Brought to you by CommuniGate Pro - The Buzz Word Compliant Messaging Server.To end your Mail problems go to .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
Associated Messages, from the most recent to the oldest:
You could choose a random starting point and then just add 1 to the number each time withthe database wrapping around if say the last one was 100.jpg back to 1.jpgChristopher Feyrer wrote:> We have a database of several hundred images from which I would like to> pull a random image. This is pretty easily accomplished using the Search> feature and its random function.>> My question is this: How can I make sure that each image gets displayed at> least once, and that there aren't repeating images?>> My first solution is to implement a secondary database which records the> number of the image, say 3 of 200, and if 3 of 200 was previously> displayed, it would automatically do another random search until it found> an unused number graphic.>> Does this make sense? Is there a shortcut in webcatalog so I can have the> search be sure to generate non-repeating random results?>> Thanks for any assistance.>> Christopher Feyrer> System Administrator> FoodSpot.com> chris@foodspot.com> -------------------> PGP 6.x key available.>> -------------------------------------------------------------> Brought to you by CommuniGate Pro - The Buzz Word Compliant Messaging Server.> To end your Mail problems go to .>> 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 --Conrad Hubbard - White WolfComputer Projects Assistanthttp://www.white-wolf.comThe Howl heard 'round the World-------------------------------------------------------------Brought to you by CommuniGate Pro - The Buzz Word Compliant Messaging Server.To end your Mail problems go to .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
Conrad Hubbard
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:
My solution... (1996)
Make sure I understand this??? (1997)
Who is doing sign-ups-got it (1998)
Why does setheader provide a db= parameter? (2005)
Frames and WebCat (1997)
[WebDNA] v7 Stress Test and Strange Behaviour (2012)
automatic reload of frameset (1997)
adding second sku (2000)
NT - Thanks and Taxes (1997)
Setting vars in a text file..... (2004)
Modifying databases manually (was Banner DNA) (1997)
Three new problems ... (1997)
[SMSI]Price and Formula.db (2002)
WebCat2 - Getting to the browser's username/password data (1997)
X etc.... (1999)
WebCat2: Master Counter snippet (1997)
problems with 2 tags (1997)
WebCat2b13MacPlugIn - [include] (1997)
WC2f3 (1997)
[WebDNA] [BULK] strange triggers.db occurrence??? (2012)