Welcome To Snipplr


Everyone's Recent Snippets



1 ... 527 528 529 530 531 ... 552
2 2128 posted 19 years ago by 1man
1 1688 posted 19 years ago by abhiomkar
This functions allows you to create a new XMLHTTPRequest, it checks to see if the browser supports each method, if not it returns false.
4 2653 posted 19 years ago by 1man
0 1702 posted 19 years ago by jugyo
Requires wget and curl.
2 2260 posted 19 years ago by gtcaz
This function allows you to open a new window, without using any inline Javascript. Simply add rel="external" to the link you wish to open in a new window.
3 3621 posted 19 years ago by 1man
This function extracts a value from a url. Very useful for tracking codes. For example, you have a url http://your.url/?source=666999, and you need the source number to be placed into a variable. Use the code below.
2 2234 posted 19 years ago by 1man
This is an excellent solution for fixing IE 6's inability to display transparent PNGs correctly. Step 1: Include the following conditional comment the HEAD area of your document. You will need to update the CSS selector and also the path to wheree...
13 4148 posted 19 years ago by jonhenshaw
0 2672 posted 19 years ago by netjackal
This code uses the new Java 5 foreach loop to iterate through every element of a list. It avoids the need to declare an iterator.
0 2089 posted 19 years ago by cpjobling
13 3808 posted 19 years ago by johnself
2 2422 posted 19 years ago by juno
reference for create own ajax helper in CakePHP
1 1971 posted 19 years ago by juno
In IE5 and IE6 the transparancy in PNG images won't happen at all, so this would fix it. This might come really useful while we are in the era of switching to better standard-friendly browsers.
7 2944 posted 19 years ago by iTony
Returns an array of values specified for an enumerated MySQL field
2 2655 posted 19 years ago by johnself
Renders the partial template called 'cart', sends along local variable @cart, this will be known locally using the same name as the partial, 'cart'.
1 1857 posted 19 years ago by wackimonki
The code tests if session[:counter] exists. If you leave out the all important '?', it will fail with an error.
1 2133 posted 19 years ago by wackimonki
This will add up all the prices and return it? What does |item| mean exactly?
2 2175 posted 19 years ago by wackimonki
1 1724 posted 19 years ago by jordanbrock
Redirects from one method to another in a controller. This is handy when there's an error, and you need to go back to index page, or for other purposes.
1 1929 posted 19 years ago by wackimonki
Adds a button in view, which triggers a method. "Empty cart" is the button name empty_cart is the method name
1 2039 posted 19 years ago by wackimonki
Catches an exception error, uses a technique called flash to display error on another page. The Ruby on Rails code needs to be in a controller. The rhtml code needs to be in the index layout.
1 1928 posted 19 years ago by wackimonki
0 1645 posted 19 years ago by jonathanbp
2 things here. currency (euro) with in a 2.00 format and select entries older than 4 weeks = 28 days
2 2369 posted 19 years ago by assbach
This example demonstrates usage of Scriptella ETL Tool to load CSV data into a database table.
3 3024 posted 19 years ago by ejboy
This Scriptella ETL script copies all rows from Src_Table to Dest_Table. Src_Table contains the following columns: id, first_name, last_name Dest_Table contains the following columns: id, name The name column of the Dest_Table is produced by a con...
1 2718 posted 19 years ago by ejboy
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 2771 posted 19 years ago by ejboy
1 ... 527 528 529 530 531 ... 552