Code Snippets



Programming Languages

ActionScript(107)Linux & UNIX(12)
ASP(20)Bash(17)
ASP.NET(9)Python(201)
Assembly(58)Lisp(43)
C(316)Lua(55)
C#(569)mySQL(51)
C++(935)Other Languages(108)
CGI/Perl(62)PHP(346)
ColdFusion(17)Regular Expressions(28)
HTML/CSS(66)Ruby(78)
Java(640)Scheme(46)
JavaScript(223)VB.NET(441)
jQuery(23)Visual Basic(248)

10 Newest Snippets

Submitted: January 17, 2012        Views: 15
Super simple 'option' data management for your Wordpress plugins. Allows name-spaced storage & retrieval of any key/value pair (including objects & arrays!) through a single, simple function.
Submitted: October 19, 2011        Views: 8
This Snippet is used to Check and Uncheck the Check boxes of the grid view.Some times we find a requirement to check the Check box which is in the header and to check the each row check box.
Submitted: February 5, 2012        Views: 38
Submitted: February 5, 2012        Views: 57
Scrambles a word (changes the order of letters in a random manner).
Submitted: February 4, 2012        Views: 84
The snippet at http://www.dreamincode.net/code/snippet5320.htm calculates the binomial coefficient by the most common definition. n!/k!(n-k)!. This is however a very unstable way to calculate binomial coefficients as the factorials will overflow long before the binomial coefficients. This method uses the multiplicative formula, see http://en.wikipedia.org/wiki/Binomial_coefficient#Computing_the_value_of_binomial_coefficients.
Submitted: February 4, 2012        Views: 103
There are snippets here to calculate the nth Fibonacci number using recursion, iteration. But the Fibonacci sequence also has a closed form. See http://en.wikipedia.org/wiki/Fibonacci_number.
Submitted: January 18, 2012        Views: 168
This is a HexDump -- a very clean, approximately 175 line implementation. It only utilizes one 16-byte buffer, so it is memory efficient. Written in pure C.
Factor Finder in Python by Vblaster
Submitted: January 16, 2012        Views: 162
Finds factors of an int and returns list.
Submitted: January 9, 2012        Views: 45
a function that reads a string containing space, enter or some other stuff which normally terminate std::cin
Submitted: December 31, 2011        Views: 44
A more thorough explanation is provided in the comment section above the snippet.

Top 5 Snippets

Submitted: November 11, 2005        Views: 436548
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: 239564
Reads and puts value in a textbox in its original text format.
Submitted: March 2, 2005        Views: 226843
Implements the Linked List Data Structure.
Scrollable Div in HTML/CSS by deadlypetal
Submitted: April 13, 2007        Views: 225249
Div layer with a scroll bar
Open & Saving .txt files in Visual Basic by pal121
Submitted: February 10, 2006        Views: 148580
how to open and save text files



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