Below are the top ranked snippets.
3
A simple, flexible formula for generating diminishing returns out of input numbers. Full explanation and home, with sample calculators and versions of the code in other languages, on the Lost Souls MUD Grimoire.
6
A wrapper on top of createElement for getting around IE problems with manipulating the name attribute. Unlike most solutions for this, it tests for which method to use once when the page loads rather than every time an element is created. By Chaos of Lost Souls MUD (a text-based fantasy RPG).
10
Transform any basic type to string. Very handy for log messages
Usage:
int i(12);
float j(3.14);
cout
Usage:
int i(12);
float j(3.14);
cout
5
This module is used to generate the unique number and self check the numbers in social security, band accounts and etc.
Here you can find detailed explanation:
http://www.eclectica.ca/howto/modulus-11-self-check.php?start=1&count=5&generate=Generate#calculator
I have made this scirpt generate numbers in drop down list and write brojevi.txt file that you can download with numbers you have generated...
Here you can find detailed explanation:
http://www.eclectica.ca/howto/modulus-11-self-check.php?start=1&count=5&generate=Generate#calculator
I have made this scirpt generate numbers in drop down list and write brojevi.txt file that you can download with numbers you have generated...
4
Very useful function that you can use to debug/show your array and it's contents.
Sometimes when you have problems with arrays and print_r() isn't very nice way to show array values because it shows everything in one line and then it is very hard to debug... this way I think it's much much easier.
Sometimes when you have problems with arrays and print_r() isn't very nice way to show array values because it shows everything in one line and then it is very hard to debug... this way I think it's much much easier.
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
5
AJAX based submit form and use PHP to get results...
Very easy to use and understand, hope you will find it useful and easily edit it to fit your needs.
Very easy to use and understand, hope you will find it useful and easily edit it to fit your needs.
5
Simple function to check for a valid email address. Makes sure the @ and a . are in the right place. There is most likely a perl package on CPAN that would be more extensive, but this happens to work for my uses.
12
A little function that returns a greeting based on the local time.
6
A database API written in Perl for a MySQL.
You will need to edit the settings for your server.
Enojy
You will need to edit the settings for your server.
Enojy









