Welcome To Snipplr


Everyone's Recent Snippets



1 ... 398 399 400 401 402 ... 553
A javscript snipped which will mark each table cell with a CSS class containing the cell's column number. This allows you to set the table column widths using just one CSS rule and without hand editing the table HTML code. This is to workaround the l...
0 2636 posted 16 years ago by miohtama
This is for creating an annotated tag in Git.
0 1715 posted 16 years ago by jturmel
Need a function to clean your _POST array before inserting into a database? Just pass $_POST to this function.
1 3020 posted 16 years ago by the_dev
It's easy to print out an array that is readable and with only one line of code. This can easily be turned into a nifty function.
1 1440 posted 16 years ago by the_dev
Here is the correct way to turn your mysql results into an array. Forget the other nonsense of useless code. Why type out this long code: "for($i = 0; $array[$i] = mysqli_fetch_assoc($result); $i++) ;" when you can accomplish the same thing with m...
1 1930 posted 16 years ago by the_dev
Like python's os.listdir
1 2057 posted 16 years ago by iloveitaly
0 1082 posted 16 years ago by iloveitaly
More for me than anything else
2 1376 posted 16 years ago by iloveitaly
This is a great way to save complex objects as cookie values. You can't just json_encode because commas are not legal in cookie values. Remember not to use this for anything too big because cookies have a 4KB limit.
1 1501 posted 16 years ago by segdeha
0 1630 posted 16 years ago by d020
0 1415 posted 16 years ago by sebastian_bergmann
Gets the absolute path of the script itself even when it's executing, not just a simple "pwd".
1 2094 posted 16 years ago by loungerdork
0 1503 posted 16 years ago by hlubek
1 1510 posted 16 years ago by nico65
1 1589 posted 16 years ago by nico65
1 3842 posted 16 years ago by traeregan
From: Roberto Ierusalimschy Parses the "main" part of an XML string. It does not handle meta-data. Outputs to a table. Example: myVar = collect( myXml ) -- myVar would be a table/array of myXml
2 4358 posted 16 years ago by traeregan
* checkout : June 08, 2009 * commit : [34864f01741b1b2bb74072ba404e8b4436c18fe6](http://github.com/AndyA/htop-osx/commit/34864f01741b1b2bb74072ba404e8b4436c18fe6)
0 1796 posted 16 years ago by kmartiin
This requires the user to enter his/her google gmail information but still useful if you can't use the normal Email/Gmail apps via their intents.
1 7537 posted 16 years ago by abwaters
0 1510 posted 16 years ago by davebowker
A way to time how long it takes to get through a certain block of code. Good way to measure performance on the page. You could also use the built in logging functions in firebug. Not sure how they would tally up in a test.
1 1967 posted 16 years ago by 1man
1 ... 398 399 400 401 402 ... 553