Welcome To Snipplr


Everyone's Recent Snippets Tagged c



1 ... 480 481 482 483 484 ... 552
6 1680 posted 18 years ago by blackabee
Test-first programming, in which you write the unit tests first with the unittest module and then work on the code until it passes all the tests, seems like a good substitute for writing interfaces or documentation first. The unit tests are like an A...
0 1900 posted 18 years ago by chombee
0 1764 posted 18 years ago by JustinCrossman
This example shows how to compile the hello.c file out of the fuse source tar.
0 1625 posted 18 years ago by narkisr
2 1867 posted 18 years ago by cr4zyguy
By the legendary abigail. Fails to match if and only if it is matched against a prime number of 1's. That is, '11' fails, but '1111' does not. I once heard him talk why this works, but I forgot most of it.
3 2322 posted 18 years ago by banzaiman
I made this simple JavaScript to save me time. I was sick of having to thumb-bash on a tiny keypad or login to the slow Clickatell site and use their clunky interface (nothing it simpler than 2 text boxes and an OK button). You will need an HTTP A...
1 1891 posted 18 years ago by mountainash
Loads the contens of a dir an sorts them by the date of creation.
2 2634 posted 18 years ago by romanos
0 1586 posted 18 years ago by cczona
Using this convention, you can override any system table setting.
1 1806 posted 18 years ago by shrop
0 1467 posted 18 years ago by Meestercor
1 1714 posted 18 years ago by Juanje
https://www.chrisjmendez.com/2008/06/11/show-hidden-folders-and-files-in-os-x-leopard/
2 2147 posted 18 years ago by chrisaiv
https://www.chrisjmendez.com/2008/06/11/how-to-use-ems-when-youre-already-comfortable-with-pixels/
2 1845 posted 18 years ago by chrisaiv
This is my implementation of the messager pattern used by Panda3D for event handling. It's a really nice idea but I think Panda's version is implemented weirdly, it uses the subscribe objects as keys in the dictionary. That means that if you want...
0 1623 posted 18 years ago by chombee
Use this function to create a unique class name based on the page's url. It makes for a great way to drill down with specificity in CSS later by placing this on the ID or as a Class on the body tag.
1 2328 posted 18 years ago by neal_grosskopf
When there's a value in a textbox, like 'search', it disappears when you click on it, and reappears when you leave (blur) it. But only if you haven't filled in anything ofcourse. Use it like this:
1 1550 posted 18 years ago by jeppeb
Applications: 1. Centered block with unknown width 2. Simple block which can have float style (f.e. horizontal menu)
1 1856 posted 18 years ago by kossmoss
This will create and then populate a MySQL table with a list of the names and USPS abbreviations for US states and possessions in existence.
3 4639 posted 18 years ago by cbrant
This will create and then populate a MySQL table with a list of the names and ISO 3166 codes for countries in existence.
5 4046 posted 18 years ago by cbrant
The code for my wordpress Archives page, there have been a few people who asked how I did it.
0 1995 posted 18 years ago by kristin
在UTF-8的編碼下縮減字串並避免中文字串最後一個字變亂碼
0 3558 posted 18 years ago by multani
Using CSS3 selectors, highlight links to deleted pages and 404 pages. Also highlight function calls to deleted javascript using this CSS technique.
4 2174 posted 18 years ago by neal_grosskopf
A paste from a blog (http://lenkite.blogspot.com/2008/05/access-windows-registry-using-java.html) entry which demonstrates how to access windows registry in Java.
0 2201 posted 18 years ago by narkisr
1 ... 480 481 482 483 484 ... 552