Welcome To Snipplr
Everyone's Recent Snippets
- All /
- JavaScript /
- HTML /
- PHP /
- CSS /
- Ruby /
- Objective C
Template for for Codeigniter calendar class. Modified from default for css styling and multiple events per table cell.
0
1673
posted 13 years ago by jdhall75
Returns the version of Windows Internet Explorer or a -1 (indicating the use of another browser).
0
2467
posted 13 years ago by satie83
This function checks if the $stringComplete variable ends with the string $endString.
0
1452
posted 13 years ago by satie83
This little Gem allows me to click a link on the page automatically a few seconds after the page loads.
1
1389
posted 13 years ago by gera3d
Very cool example of copying a frame from an MP4 and displaying it on the canvas or image. In order for images to be saved, the video must come from the same domain
0
6483
posted 13 years ago by chrisaiv
If you have a Table which has a Column of type char or varchar or even text, and you want to change a portion of text in it for example a path. In this case you need to change the same text with new one in every records.
0
2054
posted 13 years ago by klovera
This script was written to allow transposing of utm_campaign, utm_source and utm_medium query parameters from the URL of a landing page link to all of the links on that page that re-directed to the primary domain where users would actually convert. T...
0
1531
posted 13 years ago by kynatro
This script was written to allow transposing of utm_campaign, utm_source and utm_medium query parameters from the URL of a landing page link to all of the links on that page that re-directed to the primary domain where users would actually convert. T...
0
1513
posted 13 years ago by kynatro
A simple utility method to validate an Inputted Email Address.
0
2384
posted 13 years ago by ryanfiorini
A nice way to do sorting of a key on a multi-dimensional array - DavidG
0
1886
posted 13 years ago by satie83
I want to get a list of all the branches in a Git repository with the "freshest" branches at the top, where the "freshest" branch is the one that's been committed to most recently (and is, therefore, more likely to be one I want to pay attention to).
0
2431
posted 13 years ago by satie83
We are setting up two variables. The assignment in the middle part of the for loop is also tested for truthfulness — if it succeeds, the loop continues. Since i is incremented each time, items from the array will be assigned to item in sequential o...
0
1954
posted 13 years ago by hellowouter
In this purely constructed example, we create anonymous function and use call to invoke it on every object in an array. The main purpose of the anonymous function here is to add a print function to every object, which is able to print the right index...
0
2719
posted 13 years ago by hellowouter
Clever usage of apply allows you to use built-ins functions for some tasks that otherwise probably would have been written by looping over the array values. As an example here we are going to use Math.max/Math.min to find out the maximum/minimum valu...
0
2405
posted 13 years ago by hellowouter
Add the below commented sections into the appropriate functions in your /app/code/core/Mage/Adminhtml/Block/Sales/Order/Grid.php and you'll be good to go! This has been (personally) tested with 1.6.1.0
1
2208
posted 13 years ago by ddavidd
Here's a simple way to get your div always on center in any screen size.
margins should be half of width and height.
2
1615
posted 13 years ago by fackz
rather annoying issue that I encountered and spent too much time researching - the relevant IE fix is in all caps
1
2993
posted 13 years ago by felicemente
VS.NET Macro to list all projects in current solution that have TreatWarningsAsErrors=false.
0
3252
posted 13 years ago by slolife
Place startTime() at beginning where timing is to start. Get the return value and set the start time variable. At end of script to time call execTime($start) passing the start time and this will calculate elapsed time of execution.
1
1452
posted 13 years ago by anagaiyahoocom
Example: There is a table, 'user', with a column, 'clear', containing values such as:
`clear
--------
\'animal\'
\'pass'\
`
and we would like to retrieve 'animal' and 'pass' ( without the pre & post \' )
0
1843
posted 13 years ago by jgomez
If you want to use this in a class, change the last line to:
` return array_map(array($this, __FUNCTION__), $object ); `
0
1410
posted 13 years ago by jgomez
Valida por medio del metodo onkeypress de un campo input, que solo se ingresen string /[a-zA-Z]/
0
2775
posted 13 years ago by serialk89
Obtiene un identificador usando el nombre del host, id del proceso PHP y usando uniqid.
Además se agrega una ruta para ver cómo quedarÃa almacenada en disco la información.
0
1118
posted 13 years ago by porquero