Code Snippets



Programming Languages

ActionScript(107)Linux & UNIX(12)
ASP(20)Bash(17)
ASP.NET(11)Python(214)
Assembly(58)Lisp(43)
C(320)Lua(55)
C#(573)mySQL(51)
C++(949)Other Languages(114)
CGI/Perl(62)PHP(348)
ColdFusion(17)Regular Expressions(28)
HTML/CSS(65)Ruby(78)
Java(653)Scheme(46)
JavaScript(226)VB.NET(443)
jQuery(23)Visual Basic(248)

10 Newest Snippets

Submitted: May 2, 2012        Views: 25
Code demonstrates how to create ASCII Word Art from a given word. It also allows you to specify the font size. In this example, only words that contain the characters 'A', 'F' & 'Z' are valid. You can add more! ;)
Submitted: May 10, 2012        Views: 43
This object implements LZW compression and decompression. It's based off the explanation of the algorithm found here http://www.cs.duke.edu/csed/curious/compression/lzw.html
Submitted: May 10, 2012        Views: 192
This simple function creates a generator that will yield fibonacci values!
Queue Class in Python by atraub
Submitted: May 9, 2012        Views: 153
This is a full featured Queue class that uses proper naming conventions in accordance with the abstract data type "Stack". It also utilizes proper error handling.
Submitted: May 5, 2012        Views: 146
Enter the supply voltage Enter the number of resistors in the circuit Enter values for those resistors Calculate the equivalent resistance, total current and branch currents
Submitted: May 5, 2012        Views: 222
This little snippet is a function that will prompt the user to enter a value of a specific type such as int, float, etc. If the value the user types in cannot be cast to that type, the function will either print a supplied error string or the default error string created by python, it will then prompt the user to try again until the user enters a proper value. This is particularly useful with making sure the user actually submitted an int.
Stack Class in Python by atraub
Submitted: May 5, 2012        Views: 165
This is a full featured stack class that also uses proper naming conventions in accordance with the abstract data type "Stack" as well as proper error reporting.
Timing a function in Python by atraub
Submitted: May 6, 2012        Views: 170
This is a generic function used to time another function in Python. It returns the time it took for the function to run and the results of the function if there are any.
Submitted: April 11, 2012        Views: 288
Uses recursion to copy a directory and its contents (including subdirectories) to a specified location. EDIT: 5/2/12 - I've added functionality to copy ACLs for files and directories.
Crazy Text in PHP by huzi8t9
Submitted: April 26, 2012        Views: 270
This might not be a useful function to you, but someone might be able to implement it somewhere - it's a fun script! :) Changes "Message" to either "MeSsAgE" or "mEsSaGe" - which ever you like.

Top 5 Snippets

Submitted: November 11, 2005        Views: 445217
Ever wonder how you could get partially transparent backgrounds for div boxes with only HTML/CSS? Well here's how.
Submitted: January 4, 2006        Views: 250551
Reads and puts value in a textbox in its original text format.
Submitted: March 2, 2005        Views: 240439
Implements the Linked List Data Structure.
Scrollable Div in HTML/CSS by deadlypetal
Submitted: April 13, 2007        Views: 232217
Div layer with a scroll bar
Submitted: October 29, 2005        Views: 155578
Simply demonstrates how Insertion Sort works.



Submit a Code Snippet and get a chance to win a </dream.in.code> 1GB Thumb Drive!