Welcome To Snipplr
Everyone's Recent Snippets
- All /
- JavaScript /
- HTML /
- PHP /
- CSS /
- Ruby /
- Objective C
This code snippet is used to add data to an existing xml file
0
1329
posted 13 years ago by tabook22
Use in the WP loop.
User's registered email account on WP must also be assigned to Gravatar.
0
717
posted 13 years ago by jacksaidwhat
Cocoa provides NSTask to run subprocesses. It can be used to run shell scripts, but all this manual pipe and file handling is a bit cumbersome. Fortunately, for a simple script, we can use the trusty old system and redirect its result to a file.
0
1064
posted 13 years ago by zingo
JavaScript
Set links with href to current page as active (or if in subnav set their parent to active)
look through the list items in your main nav and based on href of anchor tags this will set the top level link to have an 'active' class.
0
1147
posted 13 years ago by iammikecohen
This sql statement enables to detect duplicates entries over a key and creates a seq column which says which one is the sequence of the duplicates. This way you can take only the seq = 1 and still be able to identify all duplicates
0
1075
posted 13 years ago by xavsio4
I was working on a project where the timestamp string I was getting from the backend developer was pretty dirty in the way it was formatted. For example, it looked like "/Date(1310127448000+0100)/". I needed to get a nicely formatted time from it in...
0
1193
posted 13 years ago by adrianparr
Artificial intelligence basics : This is a backward chaining implementation which works with horn form knowledge bases. Had some trouble finding any simple and easy to understand examples online - so here's my version!!! http://en.wikipedia.org/wiki/...
0
1663
posted 13 years ago by bjornredemption
Artificial intelligence basics : This is a forward chaining implementation which works with horn form knowledge bases. Had some trouble finding any simple and easy to understand examples online - so here's my version!!!
http://en.wikipedia.org/wiki/...
0
2046
posted 13 years ago by bjornredemption
For this to work you need the as3corelib classes from here ... https://github.com/mikechambers/as3corelib
0
2755
posted 13 years ago by adrianparr
Enables you to easily select older version of CSS by class rather than having a seperate CSS file for each version of IE.
0
843
posted 13 years ago by plesh
If you want to use PHP as a command line program, this code can serve s a reference to read the arguments passed to the program.
0
762
posted 13 years ago by tcam27
Bei vielen Applikationen fällt auf, dass beim Start ganz kurz ein komplett schwarzer Screen auf dem Display erscheint, der jedoch gleich wieder verschwindet. Über diesem Screen ist dann ein schmaler grauer Balken, in dem der Name der Applikation st...
0
763
posted 13 years ago by UTA2000
See https://github.com/clemens/i18n_demo_app/blob/master/config/locales/de.yml for the source of the month names etc.
1
795
posted 13 years ago by riddla
1. Open lib/zend/locale/data/en.xml
2. Locate territories tag in this file
3. copy one of territory tags for the syntax and paste it within the territories tag
4. hard part here is to add country code in this file as might not be able to fin...
0
985
posted 13 years ago by JustMadMike
Connect to three sites using threads and without using them. Fetch the response. Measure the benchmark.
0
675
posted 13 years ago by Shamaoke