Welcome To Snipplr


Everyone's Recent Snippets



1 ... 476 477 478 479 480 ... 552
Useful when creating canonical forms of strings for indexing.
0 2067 posted 18 years ago by scarfboy
There is no standard for this at all - this just looks for the hooks that exist in IE and gecko-type browsers. See also http://msdn.microsoft.com/en-us/library/ms535926(VS.85).aspx and http://developer.mozilla.org/en/docs/DOM:window.sidebar
3 2093 posted 18 years ago by scarfboy
Exploits hash keys uniqueness, but in doing so effectively toString()s everything, meaning this should not be used for much beyond strings and perhaps integers. I used this when I wanted to do some client-side filtering of (integer) identifiers.
1 1856 posted 18 years ago by scarfboy
Adds commas to numbers. 1234567 becomes 1,234,567
1 2688 posted 18 years ago by jdstraughan
1 2358 posted 18 years ago by Juego
The GNULib is included in GTK+.
0 1870 posted 18 years ago by pckujawa
This is a collection of useful static initializers of Java arrays, lists and maps.
0 1603 posted 18 years ago by narkisr
Effbot's page on the os module: http://effbot.org/librarybook/os.htm The os module has lots of methods for dealing with files and directories: http://docs.python.org/lib/os-file-dir.html The shutil module: http://docs.python.org/lib/module-shut...
0 2576 posted 18 years ago by chombee
This is a simple base for an approximate search application. You can currently use this to do search's but it, is not very sophisticated, right now anything that is as difference in characters base on the threshold will show up in the result, so with...
3 2004 posted 18 years ago by Cory
A simple way to display a block-level-element over a flash document.
2 1961 posted 18 years ago by stil72
2 2030 posted 18 years ago by Freese
0 1747 posted 18 years ago by Juanje
0 1722 posted 18 years ago by zeman
Useful functions to get around browser incompatibilities when working with stylesheets. If you find any errors, please leave a comment.
0 1952 posted 18 years ago by wizard04
sample: var text = " string content "; text = text.trim();
2 1876 posted 18 years ago by donkeykong
Use sample: var inputTxt = getElementsByAttr('input', 'type', 'text');
1 1694 posted 18 years ago by kcmr
Useful for checking the status of individual bits.
0 2343 posted 18 years ago by pckujawa
See also: http://code.google.com/p/undolibrary/
2 2259 posted 18 years ago by gfazioli
1 1919 posted 18 years ago by gfazioli
Determines if a given element is visible, by checking a variety of things. Will work for CSS or inline style declarations of visible:hidden or display: none. Will check if it's inside of an invisible element, as well.
3 2629 posted 18 years ago by TALlama
'port install ruby' sometimes results in malloc errors near the final phase (just after destroot completes). It appears that macports may be out of memory while installing documentation.
0 1771 posted 18 years ago by cczona
Using a gcc predefined macro, __DATE__, the code can know for itself when it was compiled, and build in an expiration date based on that value. The former code (http://snipplr.com/view/3448/kill-app-after-expire-date/) was not internationalised an...
5 3885 posted 18 years ago by zingo
The “2>&1″ bit tells to pipe the standard error to the standard output. Otherwise the standard error may not be outputted by the system and you won’t have a way to troubleshoot your script.
2 2486 posted 18 years ago by jdstraughan
1 ... 476 477 478 479 480 ... 552