Welcome To Snipplr


Everyone's Recent Snippets



1 ... 384 385 386 387 388 ... 553
The code below will loop through the properties in an object and alert a string. myObject is in JSON notation. The "for ( x in y)" construct does not work if the Prototype.js library is included on the page
0 3087 posted 16 years ago by elugardo
2 1412 posted 16 years ago by simmering
Below are two functions I've been using to make event tracking a little easier in CodeIgniter. Two functions are available, google_analytics() & track_event(). google_analytics() takes one argument and uses it as the UA code for your tracking p...
5 2058 posted 16 years ago by brettbergeron
The below code helps you move your site assets (images, css, javascript) to a public folder inside the application directory of CodeIgniter. One thing you'll need to do is define ASSETPATH to be the path to the location of your public items. For m...
1 1373 posted 16 years ago by brettbergeron
0 1349 posted 16 years ago by chrisaiv
1 1752 posted 16 years ago by joet3ch
A simple class layout template that I always use to get me started. Nothing fancy. Just your basic structure.
1 1577 posted 16 years ago by StrawMan
Useful in cases where the object author has specified their own serialization that doesn't work for you.
1 1718 posted 16 years ago by rengber
How to concatenate lists, add an item to a list, slice an item from a list.
0 1242 posted 16 years ago by chrisaiv
This piece of code will store each line of a txt file into a mysql database
2 2160 posted 16 years ago by fackz
0 3500 posted 16 years ago by stephen
This approach allows an application to be embedded in a DLL. This is handy for diagnostic/maintenance utilities that are used with the DLL. Steps to create: * Create a MFC DLL project * Add a dialog * Add an entry point function such as void CA...
0 3106 posted 16 years ago by jimfred
Code for a Rake task that allows compiles all LESS stylesheets (.less) contained within a single directory.
0 1430 posted 16 years ago by brettbergeron
1 1060 posted 16 years ago by radarseven
0 1217 posted 16 years ago by radarseven
// How to use variables // within jQuery selectors
1 1067 posted 16 years ago by radarseven
En este ejemplo, las uri apuntan hacia los dos working copy's pero pueden apuntar también hacia URL's de repositorio.
0 3252 posted 16 years ago by delm
0 3473 posted 16 years ago by ttr738
0 3511 posted 16 years ago by ttr738
This example demonstrates a way to control Adobe InDesign from Perl. Tested on MacOS X 10.5.7 and INDD.
0 1424 posted 16 years ago by myhd
From Liviu HolhoÅŸ - Blog http://blog.liviuholhos.com/javascript/add-a-favicon-near-external-links-with-jquery
4 1952 posted 16 years ago by batamire
remove multiple spaces and replace with underscore
0 1252 posted 16 years ago by rombob
0 1275 posted 16 years ago by gerhardsletten
This function converts file size in bytes to the larger units. You can add bigger values like exa-, zetta-, yotta- bytes.
0 1331 posted 16 years ago by kirik
I made this script to count the days until a birthday, the birthdays are stored in mysql with the year intact YYYY-MM-DD, so this function strips the first 4 chars, and adds the current year, if the date has already passed it adds the next year and c...
9 2882 posted 16 years ago by jcroom
An example solution for the 'insert-checkin-template exercise listed here: http://stackoverflow.com/questions/41522/tips-for-learning-elisp/59589#59589 It generates a "pretty" check in notice to be emailed, and also generates a line you can cut/pa...
0 3434 posted 16 years ago by bigfaceworm
An example solution for the 'insert-code-template exercise listed here: http://stackoverflow.com/questions/41522/tips-for-learning-elisp/59589#59589
1 3400 posted 16 years ago by bigfaceworm
1 ... 384 385 386 387 388 ... 553