Welcome To Snipplr
Everyone's Recent Snippets Tagged c
- All /
- JavaScript /
- HTML /
- PHP /
- CSS /
- Ruby /
- Objective C
Instead of one element you can insert multiple at once:
array($element1, $element2, $element3)
1
1755
posted 16 years ago by kurokikaze
you have to collect the filenames from 'find' in an input file then open the input in this script
0
1386
posted 16 years ago by rowntreerob
Convert hexidecimal color codes (ie #C0C0C0) to decimal RGB (ie 255,255,255)
0
1649
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
1340
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
1436
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
1262
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
1875
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
1266
posted 16 years ago by blackf0rk
Assuming your DataSet (named, ds) is already populated with Data and contains only one table.
0
2085
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
2290
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
1798
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
1755
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
2352
posted 16 years ago by blackf0rk
Connects to a web page, reads in the content and strips whitespace.
2
1724
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
1674
posted 16 years ago by narkisr
Adding a namespace to an event can make it easier to unbind. It is very easy to unbind all events with the same namespace.
1
1530
posted 16 years ago by 1man
Never used the index() method in jQuery but could be useful to know. Find a selected elements index when you click on it. Note the $('ul#mylist') inside the index method, gives the search some context of where to look for .selected, saves looking thr...
1
1512
posted 16 years ago by 1man
jquery ui/tabs initiation ensures screenreaders can focus content when selecting tabs. Tested using Jaws 8.
3
1217
posted 16 years ago by terrencewood
Just add this in script tags in your Affiliate Center footer:
0
1121
posted 16 years ago by kickjoel