Welcome To Snipplr


Everyone's Recent Snippets



1 ... 373 374 375 376 377 ... 553
1 1058 posted 16 years ago by benpjohnson
. must be escaped using \ . It means something in regexp
0 1654 posted 16 years ago by godstroke
0 1387 posted 16 years ago by arpit
I have not tried this out yet, but I hope it can convert IronPython types to and from json.
0 1377 posted 16 years ago by laurenceosx
0 1481 posted 16 years ago by tandouri
Variables that are submitted via web forms always need to be cleaned/sanitized before use in any way, to prevent against all kinds of different malicious intent.
0 1250 posted 16 years ago by paulgrenwood
Just include this script on the site and you’ll get a Firebug console that pops up for debugging in any browser. Not quite as full featured but it’s still pretty helpful! Remember to remove it when you are done.
1 1604 posted 16 years ago by paulgrenwood
this comes from YAPB plugin for WordPress. kudos to the author. (there are some functions that are deprecated in PHP 5.2+ - you'll need to replace eregi with the mb_ version). This should be quite failsafe, regardless if curl is installed or the set...
1 1784 posted 16 years ago by iroybot
svn log | sed -n '/username/,/-----$/ p'
0 1114 posted 16 years ago by sonnyg
1 1214 posted 16 years ago by gn66
note t0 self - place inside class declaration with vars - include Flex SDK swc (flash CS4)
2 1624 posted 16 years ago by obsessivejosh
note to self - Basic settings for clean text in as3 flash project assuming fonts are embedded.
0 1209 posted 16 years ago by obsessivejosh
Sometime it is convenient to get recursive directory listing as array of items directory => (file array) Such as: Array ( [./a2temple] => Array ( [0] => example13.zip )...
2 1312 posted 16 years ago by artoodetoo
0 1025 posted 16 years ago by snipleritesteri
Read in a remote XML file, change the pubDate date format, and output to specific local file.
0 1408 posted 16 years ago by karlhorky
The "Definitive CSS Font Stacks"
6 1826 posted 16 years ago by ZGX
If you want to set the active menu trail in a node, simply add this to your template.php in the 'template preprocess node' function.
0 1125 posted 16 years ago by ccalnan
MySQL Insert Unique Reference using MAX() to obtain latest value Alternate solution to using Composite Primary Keys which INNODB engine does not support.
0 1390 posted 16 years ago by cherbert
To make an image browser, add these lines: $ext = strtolower(substr("$dirArray[$index]", strrpos("$dirArray[$index]", '.') + 1)); //get file extensions if ("$ext" == "jpg") { // if file is a jpg print("<TR><TD>$dirArray[$index]<br/><a href=\...
1 1453 posted 16 years ago by beneberle
will split the string "I am" search words into [0] => I am [1] => searching [2] => words
1 1547 posted 16 years ago by svenito
Shortens all strings in an array to a maximum length. Inserts '...' in between the first and last 6 letters
0 1956 posted 16 years ago by svenito
Given a start path will return an array of all subdirectories excluding files
0 1708 posted 16 years ago by svenito
Remove $value from $array
0 1190 posted 16 years ago by svenito
Ensures all elements in an array are unique newArray = myArray.unique();
0 1149 posted 16 years ago by svenito
This extends arrays withe a removeItems operation to remove all occurances of <item> from <array> usage: myArray.removeItems("words");
0 1191 posted 16 years ago by svenito
1 ... 373 374 375 376 377 ... 553