|
 |
|
|
Submitted: November 1, 2007
Views: 1461
The snippet will let you retrieve your connection string(or strings) from your web.config file(instead of putting them into each one of your scripts). I found it at http://weblogs.asp.net/owscott/archive/2005/08/26/Using-connection-strings-from-web.config-in-ASP.NET-v2.0.aspx
|
|
|
 |
|
|
Submitted: November 2, 2007
Views: 1338
This piece of Applescript will figure out if an application is open or not.
|
|
|
 |
|
|
Submitted: October 31, 2007
Views: 863
If you use Applescript's "delay" function, it stops everything. If all you want to do is make sure that something gets called after a specific interval, this is the function you'd use to make sure that the program waits for that interval(but still continues to run normally).
|
|
|
 |
|
|
Submitted: January 11, 2009
Views: 288
This snippet auto-focuses on the first on the page, when the document is loaded.
|
|
|
 |
|
|
Submitted: January 27, 2009
Views: 321
This snippet allows you to put hints into your elements, and have them automatically clear when the user focuses on them. It uses the data() method to make sure that it only clears the input when it is still displaying a hint to the user.
|
|
|
 |
|
|
Submitted: December 21, 2007
Views: 8869
This function will return true if a date is between two other dates, or false if it isn't.
|
|
|
 |
|
|
Submitted: April 4, 2007
Views: 3163
This is a piece of CSS that will let you place borders around <tr>s.
|
|
|
 |
|
|
Submitted: January 6, 2009
Views: 1449
This snippet will test whether an element(or group of elements) is empty.
|
|
|
 |
|
|
Submitted: January 5, 2009
Views: 326
If you have a filled with , and you only want certain options to show up, you can use this to remove any that you don't want.
|
|
|
 |
|
|
Submitted: November 22, 2007
Views: 1334
This snippet takes a ten-digit phone number and formats it, in the form (xxx) xxx.xxxx.
|
|
|
 |
|
|
Submitted: November 23, 2007
Views: 1935
This snippet takes a ten-digit phone number and formats it, in the form (xxx) xxx-xxxx.
|
|
|
 |
|
|
Submitted: November 23, 2007
Views: 6615
This snippet takes a ten-digit phone number and formats it, in the form (xxx) xxx-xxxx.
|
|
|
 |
|
|
Submitted: October 17, 2007
Views: 1209
This snippet will retrieve the name of the file that it's inside of for you. I found it at http://www.jeremywadsworth.com/Default.aspx?blogentryid=51
|
|
|
 |
|
|
Submitted: September 7, 2007
Views: 6880
This snippet will allow you to retrieve the number of days in a particular month.
|
|
|
 |
|
|
Submitted: July 26, 2007
Views: 8525
This snippet can be used to make sure that input only contains numbers. It is a simpler version of William_Wilson's "validate number only input" snippet. (http://www.dreamincode.net/code/snippet945.htm)
|
|
|
 |
|
|
Submitted: May 5, 2009
Views: 422
This plugin lets a field auto-populate itself with the slugified value of another field. You call it on the object you want to slugify(something with val()), and pass in the item(or items) where you want the slug to get stored.
|
|
|
 |
|
|
Submitted: June 16, 2007
Views: 726
This snippet can be used to dynamically attach more Javascript files to a page - this lets you make sure that for users with Javascript enabled, they don't have to download any extra Javascript.
|
|
|
 |
|
|
Submitted: June 16, 2007
Views: 812
This function can be used to attach a new stylesheet to a page. This is useful for Javascripted hiding of elements; users with Javascript disabled will only download the main stylesheet with unhidden elements, and users with Javascript enabled will have the stylesheet hiding the elements attached, thus hiding the elements.
|
|
|
 |
|
|
Submitted: November 4, 2007
Views: 12666
MSSQL doesn't support the "DROP TABLE IF EXISTS [table]" syntax. Here's how to do the same thing under MSSQL.
|
|
|
 |
|
|
Submitted: October 19, 2007
Views: 1058
Want to check if something is a palindrome? Use this function.
|
|
|
 |
|
|
Submitted: December 11, 2008
Views: 608
This script will generate a random, 21-character long password.
|
|
|
 |
|
|
Submitted: October 2, 2008
Views: 1073
This snippet will echo the total linecount for a directory.
|
|
|
 |
|
|
Submitted: July 26, 2007
Views: 801
This snippet will reverse a string input by the user. It is a smaller improvement on the snippet "Reverse a given string" submitted by no2pencil. The script uses the reverse command in a scalar context to affect the inputted string.
|
|
|
 |
|
|
Submitted: May 17, 2007
Views: 1025
This snippet can be used to create a short summary of a string based on the value of a text column. It will take the first 300 characters and then append a "..." to the end of what it reutrns.
|
|
|
 |
|
|
Submitted: October 3, 2006
Views: 9221
Checks whether a passed argument is negative or not.
|
|
|
 |
|
|
Submitted: November 21, 2007
Views: 2560
This is a function I use for validating phone numbers using Regular Expressions.
|
|
|
 |
|
|
Submitted: January 5, 2009
Views: 541
This snippet will give every second row in a table the class 'alt' - allowing you to apply different styles to it using CSS.
|
|