Welcome To Snipplr


Everyone's Recent Snippets Tagged c



1 ... 529 530 531 532 533 ... 554
Scriptella ETL allows inserting files into a database. This is achieved by a simple bind variables extension syntax ?{file ...}. The following sample initializes table of music tracks. Each track has a DATA field containing a file loaded from an ext...
1 1345 posted 18 years ago by ejboy
A CountEvent class’s instance counts up from 0 to 50, then dispatches "countComplete" event. Here’s a result below. 1 2 3 . . . 48 49 50 Count Complete
0 6935 posted 18 years ago by garamond
Needed a way to mix up the order of questions and answers for a Flash quiz. https://www.chrisjmendez.com/2007/02/21/as1-swap-numbers/
0 799 posted 18 years ago by chrisaiv
useful if a "valid until" should have an exact ( in this case far future ) value.
0 856 posted 18 years ago by assbach
Based on the linked SitePoint article but with options to limit the container (eg body copy) and set the target. Use '_blank' for a new window for each link. Also adds a class (based on the rel value) for styling. Call the 'relWindow' on window load.
2 1026 posted 18 years ago by mountainash
0 893 posted 18 years ago by ryanprel
Function to look if an element has a class, if it doesn't simply add it to the element. If it does have a class add it to the class that is already there. Function expects 2 values, the element to add the class to, and the new class name (value).
3 1298 posted 18 years ago by 1man
3 1332 posted 18 years ago by gtcaz
3 1123 posted 18 years ago by soxiam
2 994 posted 18 years ago by gtcaz
This function looks for tables in a web page, then loops through the rows and sets the backgroundColor for ever other row.This creates a striped table which is easier to read.
2 1185 posted 18 years ago by 1man
Use this function to queue functions you wish to load on window onload. Very useful when code becomes complex.
3 1321 posted 18 years ago by 1man
Usage of the getNextElement function. Very basic usage to pick out the h1 tags, then change the properties of the next element(not node).
1 1038 posted 18 years ago by 1man
Useful function for CSS DOM, returns the next element after the selected node. So you could style the element directly after a h1 element for example.
2 904 posted 18 years ago by 1man
Use this to display a file properly if you are reading it from another location and wish to direct it to the user's browser
0 969 posted 18 years ago by wolfie
This is just a collection of shortened SVN commands (may take a split-second of time less than normal)
0 811 posted 18 years ago by mountainash
Add this inside your .irbrc file to call "show Model" in your console instead of "y Model.column_names"
1 894 posted 18 years ago by vanne
Displays a image inside link_to instead of text.
2 1008 posted 18 years ago by ryanprel
7 870 posted 18 years ago by frankyfish
0 754 posted 18 years ago by drwitt
1 778 posted 18 years ago by drwitt
1 958 posted 18 years ago by rengber
1 918 posted 18 years ago by andyh
1 ... 529 530 531 532 533 ... 554