Welcome To Snipplr
Everyone's Recent Snippets Tagged function
- All /
- JavaScript /
- HTML /
- PHP /
- CSS /
- Ruby /
- Objective C
<p>This function returns a random number within a range.</p><p>For example:</p><p>// assigns low and high values for range</p><p><code>int rangeLow = 34, rangeHigh = 78;</code></p><p>// computes a random number between 34 and 78</p><p><code>myRandomN...
0
466
posted 12 years ago by dblandin
This custom function is useful if you want to get the ID of a page.
1
521
posted 12 years ago by simonbouchard
jQuery
js javascript browser language detection, get the user\'s browser\'s language preference setting using jquery to detect users br
JQ - detect users browser language using http headers via ajax jsonp ajaxhttpheaders
1
899
posted 12 years ago by brandonjp
Simple function to return a decimal value between the minValue and the maxValue.
0
1129
posted 12 years ago by Jamie
Simple function to return a value between the minValue and the maxValue.
0
493
posted 12 years ago by Jamie
You can use this script in your projects when you need an image upload function. It checks file type, file size and error report. I also want you to check [giochi di spongebob](http://www.giochidispongebob.net) and [gratis mahjong](http://www.gratism...
1
557
posted 12 years ago by jackoder
jQuery
JS, JQUERY : mettre une fonction en queue et annuler l'exécution d'une fonction en queue avec queue(), dequeue(), clearQueue()
ici on souhaite qu'une info s'affiche aux survole d'un <li> mais seulement une fois qu'un délai de 650 millisecondes est passé. Cependant si l'user ne survole plus la zone avant la fin du délai, il faut interrompre l'affichage de l'info. Voilà un...
0
669
posted 12 years ago by alexandrepayet
Many scripts rely on `$_SERVER[SCRIPT_URL]` which is sometimes missing. This function detects it from other server variables and fixes the missing field.
1
900
posted 13 years ago by drwitt
Using contrib's trace ns in order to debug functions in the REPL
0
576
posted 13 years ago by narkisr
This is a simple function that will return an array of all the dates corresponding to the day 'Monday' for a given year. It's pretty simple and may not be the cleanest way but it works for my purpose.
0
552
posted 13 years ago by aristoworks
Place in your functions.php file and call it in your theme like this:
<?php>
1
715
posted 13 years ago by afj176