Welcome To Snipplr


Everyone's Recent Snippets



1 ... 428 429 430 431 432 ... 553
This is a little trick I've used a few times to emulate Folders on a site and drop the extensions. In this example I'm using a PHP site but could easily be ported for other file types. One caveat to look out for is files will not always want to be ca...
1 1067 posted 16 years ago by jackkeller
This is a CSS reset snippet for the default (yui-navset-top) style of YUI TabView 2.7.0. This snippet enables rapid TabView prototyping and makes it easy to overwrite the default style while still serving the main CSS from Yahoo!'s servers. Note:...
0 1429 posted 16 years ago by jlizarraga
The 'request' and 'response' objects are chock full of useful info. But console can't usually access them. Here's how: start the server with the -u option, insert a breakpoint where you would like to have access to the controllers/helpers/etc. Wh...
1 1705 posted 16 years ago by cczona
A very simple plug-in I wrote to make x number of columns equal height. Looks for the column with the biggest height then sets the rest to the same. I'm sure it can be made cleaner, will look into that later.
4 1707 posted 16 years ago by 1man
Instead of one element you can insert multiple at once: array($element1, $element2, $element3)
1 1702 posted 16 years ago by kurokikaze
6 1363 posted 16 years ago by joeydi
you have to collect the filenames from 'find' in an input file then open the input in this script
0 1340 posted 16 years ago by rowntreerob
Convert hexidecimal color codes (ie #C0C0C0) to decimal RGB (ie 255,255,255)
0 1607 posted 16 years ago by blackf0rk
If you have a component being bound from an ObjectDataSource (like a drop-down menu, or a grid view) and you wish to change the value's SelectParameters. Where # is which SelectParameter you'd like to change. If there's just one SelectParamter, defau...
0 1300 posted 16 years ago by blackf0rk
Dynamically change the content of meta tags from the code behind. This allows you to feed the meta tags with content from a database or other dynamic content.
0 1398 posted 16 years ago by blackf0rk
2 6063 posted 16 years ago by blackf0rk
Sometimes you want to return a bunch of data from a table, but you want it coming back in a random order. Maybe it's for keeping some content on a home page fresh. Here's how:
0 1215 posted 16 years ago by blackf0rk
If you're going to be using a common function throughout the Web site, you can include the function in your MasterPage and gain access to it from each aspx that inherits from this MasterPage; like so:
0 1843 posted 16 years ago by blackf0rk
Validating a decimal such as a measurement of time or currency (10.5 or 0.4). This function will return the correct number. If you feed in "10.5foo" the function will spit back 10.5. If you feed in "bar" the function will return nothing.
0 1208 posted 16 years ago by blackf0rk
Assuming your DataSet (named, ds) is already populated with Data and contains only one table.
0 2041 posted 16 years ago by blackf0rk
It's important that the newPn var that you pass into the Convert.ToInt64 function is in the xxxxxxxxxx format and that no characters are present.
1 2236 posted 16 years ago by blackf0rk
Passing in a seed and your string will return an encrypted string. Pass in the same seed and the encrypted string again and it will return the original unencrypted string.
1 1753 posted 16 years ago by blackf0rk
If you need to get the HTML from a Web page to rip it, process it, and/or display it in the way you want, the following function will work for you.
0 1708 posted 16 years ago by blackf0rk
This function will parse out the Google Maps coordinates from a Google Maps link url like this one: http://maps.google.com/?ie=UTF8&ll=43.068888,-87.978516&spn=23.565589,33.925781&t=h&z=5. The coordinates in this URL are 43.068888,-87.978516.
0 2275 posted 16 years ago by blackf0rk
0 1251 posted 16 years ago by smoover
Connects to a web page, reads in the content and strips whitespace.
2 1688 posted 16 years ago by gdvickery
A nice example of utilizing Groovy closures in order to create a when statement in Groovy (http://www.transentia.com.au/flatpress/?x=entry:entry090311-222726).
0 1611 posted 16 years ago by narkisr
1 1196 posted 16 years ago by muhammet
1 ... 428 429 430 431 432 ... 553