- 1,233 categories
- 40,341 scripts
Updated: 02/28/2007
- Weighted random is a CFC that I created to use for the CFSudoku project. The main function of this CFC is to allow a developer to pass in an structure of values and their &"weight&".
The weight structure is then used to build a weight array. The length of the array is equal to the sum of weights and the corresponding value is stored in each array element. RandRange() is then used to get a random array key and the corresponding value is returned as the weighted random value.
- Categories
- Tags
- Platforms
- Licenses
- Author
- created with Adult Webmasters in mind: Thumbnail gallery generator (for TGP''s), generates random thumb gallerys. Every photo is randomly chosen and outputted to html (15 thumbs per page) as well as TGP links and Paysite banners. banners and tgp...
- A random script that ensures to pick only out of the entires that exist in the table. This script compiles an array of the entries currently in the table, then selects a random entry from that array. The script is very fast, and works with anything...
- This JavaScript, based on Unique Random Numbers II, picks Unique Random Sets. Here, there are more than one arrays (need not be of same length). First, we pick a number of unique random elements from the first array, numArr1 to form the array pickArr...
- This JavaScript picks up a number of unique random elements from an array. For example; if you have an array myArray consisting of 10 elements and want to pick 5 unique random elements. Suppose initially myArray[3] is picked randomly, then myArray[3]...
- This PHP script generates a random name based of an adjective and a noun. The PHP script uses two plain text files, one that holds all of the adjectives and the other all of the nouns. The script reads these files into two arrays. The PHP function fi...