Welcome To Snipplr


Everyone's Recent Snippets Tagged c



1 ... 428 429 430 431 432 ... 553
6 1812 posted 17 years ago by joeydi
you have to collect the filenames from 'find' in an input file then open the input in this script
0 1817 posted 17 years ago by rowntreerob
Convert hexidecimal color codes (ie #C0C0C0) to decimal RGB (ie 255,255,255)
0 2085 posted 17 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 1690 posted 17 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 1871 posted 17 years ago by blackf0rk
2 6634 posted 17 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 1630 posted 17 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 2270 posted 17 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 1663 posted 17 years ago by blackf0rk
Assuming your DataSet (named, ds) is already populated with Data and contains only one table.
0 2536 posted 17 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 2773 posted 17 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 2222 posted 17 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 2143 posted 17 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 2768 posted 17 years ago by blackf0rk
0 1719 posted 17 years ago by smoover
Connects to a web page, reads in the content and strips whitespace.
2 2167 posted 17 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 2128 posted 17 years ago by narkisr
1 1611 posted 17 years ago by muhammet
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 2000 posted 17 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 1997 posted 17 years ago by 1man
jquery ui/tabs initiation ensures screenreaders can focus content when selecting tabs. Tested using Jaws 8.
3 1614 posted 17 years ago by terrencewood
0 1671 posted 17 years ago by timstepp
Just add this in script tags in your Affiliate Center footer:
0 1520 posted 17 years ago by kickjoel
3 2633 posted 17 years ago by jamesming
1 ... 428 429 430 431 432 ... 553