Weighted random selection
-12
This is a quick and easy method to generate a somewhat random password. This simply generates the MD5 hash for the integer returned by the time() function and then truncates it to the specific length.
-6
Random Numbe
-5
This multiple-use PHP script will randomly generate content based on a randomly generated number.
-1
The method 'removeDoubles' uses a HashSet to remove double elements from a list without creating another list. The first occurrences of the multiple elements are kept, others will be removed. The order of the list will be preserved. The parameter list's iterator must support remove. Example of use is given in the main-method.
1
This little function does great for passwords, usernames, files, and anything else you need a random string for.
1
From time to time you may have reasons to override the default find method that ActiveRecord provides. In this example, we'll store a side-copy of the record attributes so that we have some basis for discovering changes to the data.
note: this will not override dynamic finders such as find_by_id
note: this will not override dynamic finders such as find_by_id
1
A quick implementation of an encrypter which can't be cracked by frequency analysis.
1
The decrypter for the simple encrypter I posted earlier - Takes the encrypted text from a text file - "encrypt.txt" which the encrypter automatically writes to.
1
A simple algorithm to convert decimal numbers to binary; pointless since most languages have an inbuilt function but was used for learning about algorithm design.
1
This php script provides a unique random key with 32 characters and can be used to avoid the system to pass some primary keys across the url, by example.









