Below are the top ranked snippets.

ranking Sort Sort   |   date Sort Sort   |   member Sort Sort
Syndication

« Previous 1 2 3 4 5 6 7 8 9  ...  62 63 Next »
14
Date Submitted Sun. Sep. 24th, 2006 5:43 PM
Revision 1
Helper kahotep
Tags HTML | PHP
Comments 6 comments
Generates select boxes, text boxes, check boxes and radio buttons. Via a handful of functions.
14
Date Submitted Thu. Oct. 5th, 2006 5:53 AM
Revision 1
Helper Thomas
Tags HTML | IE | images
Comments 0 comments
If you're an IE user you may have noticed that when you hover on a medium to large sized image, a toolbar appears in the corner of the image. It's basically useless as it accomplishes nothing that can't be done with a right-click.

Luckily, Microsoft has included a way for webmasters to disable this function.
14
Date Submitted Mon. Oct. 9th, 2006 7:04 AM
Revision 1
Helper serpentskiss
Tags PHP
Comments 2 comments
Here's a little snippet I got from SitePoint that I now use all the time. Add the code below to the start of each script.

Basically, what this does is checks to see if magic_quotes_gpc() is enabled on the server, and if it is, then it gets rid of all the slashes that magic_quotes_gpc() adds to input from $_GET, $_POST and $_COOKIES globals.

It's a good snippet to use, because it negates the bad programming practices that having magic_quotes_gpc() lets you get away with, and means that you don't really on PHP to validate your input; you get to do it all yourself ;-)
14
Date Submitted Mon. Oct. 9th, 2006 8:18 AM
Revision 1
Helper shell
Tags PHP
Comments 1 comments
Over the summer, I worked on a project in which I needed to parse logfiles which were in the following format:

IP|USE|TIME>IP2|USE2|TIME2>

and so on.

When I parsed them to display the log file in a user-friendly fashion, I used the following code:
14
Date Submitted Mon. Oct. 23rd, 2006 10:19 PM
Revision 1
Helper jdenton
Tags Calendar | Date | days | PHP
Comments 0 comments
daysBeteenDates will calculate the number of days between 2 dates in the form of 'YYYY-MM-DD'.
14
Date Submitted Sat. Mar. 10th, 2007 7:13 PM
Revision 1
Helper albud
Tags CSS | PHP | processor
Comments 1 comments
Don't know if anyone will find this handly, but here's a CSS processor that I wrote that allows me to nest CSS Blocks, and various other things, making for an easier to maintain CSS file.

Warning: I'd recommend caching the results since I didn't have a need to optomize it for speed.

Things that it includes:
*Nested CSS Rules
*Removes Whitespace
*Allows for // comments
*Removes comments (so put them in at no cost)

Please let me know what you think
14
Date Submitted Thu. Jul. 20th, 2006 11:57 AM
Revision 1
Beginner toddersbud
Tags cascade | CSS | firefox | HTML | JavaScript | Styles
Comments 0 comments
This shows how the computed style of each node differs from the computed style of its parent. The root element, which has no parent, is instead compared against the root of a blank HTML document.

* create a new bookmark called "compute styles" in your firefox toolbar. Place the snippet code in the location field of your "compute styles". click the compute styles bookmark, then click an element on the page with the crosshairs.
14
Date Submitted Tue. Sep. 12th, 2006 1:34 AM
Revision 1
Beginner Headzoo
Tags Array | JavaScript | PHP
Comments 3 comments
Given a PHP array (even a deep nested array), returns a string representation of that array as JavaScript array. Useful when using PHP to output JavaScript.
14
Date Submitted Thu. Sep. 14th, 2006 4:58 PM
Revision 1
Beginner ecliptic
Tags CSharp
Comments 0 comments
This snippet effectively reads an XML document using XPathDocument (read-only) instead of using the DOM. This snippet returns the full element values in between elements. For example:

root element
code element
This is a test.
/code element
/root element

GetXmlString("/root/code"); //returns 'This is a test.'
14
Date Submitted Mon. Oct. 2nd, 2006 1:05 PM
Revision 1
Beginner drench
Tags Array | JavaScript | List | Random | shuffle
Comments 3 comments
It works with Array types. The example is a simple list of numbers, but the array could contain anything; lists of strings, functions, DOM nodes, whatever. Unfortunately, a lot of things that seem like arrays in the DOM aren't really, so you can't shuffle the images on a page with just document.images.shuffle() all by itself.
« Previous 1 2 3 4 5 6 7 8 9  ...  62 63 Next »