Welcome To Snipplr
Everyone's Recent Snippets
- All /
- JavaScript /
- HTML /
- PHP /
- CSS /
- Ruby /
- Objective C
At line 220 you should see the the start if an if block. This is the section that needs to be edited. I added the foreach block to itterate over the data array and create links in the table cells.
0
900
posted 12 years ago by jdhall75
Template for for Codeigniter calendar class. Modified from default for css styling and multiple events per table cell.
0
861
posted 12 years ago by jdhall75
Returns the version of Windows Internet Explorer or a -1 (indicating the use of another browser).
0
855
posted 12 years ago by satie83
This function checks if the $stringComplete variable ends with the string $endString.
0
786
posted 12 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
745
posted 12 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
4753
posted 12 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
1042
posted 12 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
780
posted 12 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
771
posted 12 years ago by kynatro
A simple utility method to validate an Inputted Email Address.
0
804
posted 12 years ago by ryanfiorini
A nice way to do sorting of a key on a multi-dimensional array - DavidG
0
1067
posted 12 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
877
posted 12 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
1150
posted 12 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
937
posted 12 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
1328
posted 12 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
1411
posted 12 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
838
posted 12 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
1159
posted 12 years ago by felicemente
VS.NET Macro to list all projects in current solution that have TreatWarningsAsErrors=false.
0
812
posted 12 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
820
posted 12 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
964
posted 12 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
780
posted 12 years ago by jgomez
Valida por medio del metodo onkeypress de un campo input, que solo se ingresen string /[a-zA-Z]/
0
970
posted 12 years ago by serialk89