Generate Random Alphanumeric ID
5
Random String
6
Function that you can use to extract the ID from YouTube links that
look like this:
http://www.youtube.com/watch?v=Fv2aS8YtpmU
http://www.youtube.com/vi/Fv2aS8YtpmU
http://www.youtube.com/?v=Fv2aS8YtpmU
and you can extract this "Fv2aS8YtpmU" so you can use it to get thumbnails that look like : http://img.youtube.com/vi/[videoid]/default.jpg
look like this:
http://www.youtube.com/watch?v=Fv2aS8YtpmU
http://www.youtube.com/vi/Fv2aS8YtpmU
http://www.youtube.com/?v=Fv2aS8YtpmU
and you can extract this "Fv2aS8YtpmU" so you can use it to get thumbnails that look like : http://img.youtube.com/vi/[videoid]/default.jpg
6
Method for get n random number's
6
Another way to generate a unique ID.
7
Weighted random selection from the list.
Don't forget to call itemsChanged after updating list content.
Don't forget to call itemsChanged after updating list content.
7
This snippet illustrates using Genetic Algorithm for the hardware optimization.
8
Genetic Algorithm implementation.
See also "Weighted random selection" for RandomItemSelector class source.
See also "Weighted random selection" for RandomItemSelector class source.
8
Return a random number within a gived range
11
Creates a random string, usefull for passwords etc.
Use: $password = makeRandomPassword($Length);
If $Length is not specified (ie $password = makeRandomPassword();) then it will default to 8 characters
Use: $password = makeRandomPassword($Length);
If $Length is not specified (ie $password = makeRandomPassword();) then it will default to 8 characters
13
It works with Array types. The example is a simple list of numbers, but the array could contain anything; lists of strings, functions, DOM nodes, whatever. Unfortunately, a lot of things that seem like arrays in the DOM aren't really, so you can't shuffle the images on a page with just document.images.shuffle() all by itself.









