Welcome To Snipplr


Everyone's Recent Snippets Tagged c



1 ... 505 506 507 508 509 ... 553
Large factorials are easy to do in LISP, although a number above (2000!) may crash it. I designed this because of an online post from a mathematician talking about the number 1000! . Code like this is difficult to write in C-like languages, but a s...
0 3656 posted 18 years ago by darkphotn
This demonstrates how to make your own console "scripts" using C -- for example, you could capitalize every character that comes in. Tweak the line labelled "TWEAK THIS LINE" in order to get it to do what you want. This particular example will add...
1 1502 posted 18 years ago by darkphotn
This demonstrates a simple "Hello World" style program for 16-bit (DOS) x86 assembly using Microsoft's free MASM assembler.
0 6507 posted 18 years ago by darkphotn
0 1214 posted 18 years ago by imhugo
This requires ImageMagick installed. Resize, as well as convert the image format. (Note: either of WIDTH or HEIGHT can be left blank, e.g. WIDTHx and the image will be resized proportionally)
1 1778 posted 18 years ago by soroush
0 3554 posted 18 years ago by usharf
0 1857 posted 18 years ago by d3f0
2 1612 posted 18 years ago by ajbatac
3 2652 posted 18 years ago by smurf
0 1326 posted 18 years ago by todbertuzzi
Very simple style switcher using jquery. Takes 3 links with id's on each. When one is clicked various styles are removed, then a new one is added.
3 2079 posted 18 years ago by 1man
This is a handy little function that takes the htmlText value of a TextField and ads a specified tag at the beginning and end of the string. Handy for quick formatting tags such as bold, italic, underline, but could be used to add complex style data...
0 1518 posted 18 years ago by discorax
0 1236 posted 18 years ago by kristin
0 1368 posted 18 years ago by kristin
1 1609 posted 18 years ago by vanne
Run this command when you are in the directory where you want to changes the files that get ignored.
1 1734 posted 18 years ago by jachin
test with echo instead of mv example removes spaces after dots, replaces spaces with _, removes ' , and -, and finally lowercases filenames
1 1948 posted 18 years ago by iblis
3 1635 posted 18 years ago by iblis
Execute multiple commands in background, wait for each to be finished and evaluate their return codes.
0 1650 posted 18 years ago by nohn
1 1335 posted 18 years ago by vanne
Sets a module's weight to the lowest number. This assures that your module is ran before all other modules. Userfull if you want your implementation of a hook to be ran first. Add this to your .install file. Replace your_modulename with the name of...
2 1574 posted 18 years ago by berkes
add "void Init_client(){}" to the bottom of Client.m
0 1646 posted 18 years ago by sou
1 19409 posted 18 years ago by johnself
Adobe Air has a few security settings that stops you executing certain AIR methods when inside the sandbox. The code below bridges between the root document and the security sandbox, allowing you to open a URL in AIR in a default browser.
1 1818 posted 18 years ago by 1man
Add these lines to Drupals settings.php. Probably works on other systems, then Drupal too.
1 1978 posted 18 years ago by berkes
0 1640 posted 18 years ago by realgeeky
Just a test
0 1401 posted 18 years ago by realgeeky
The -P handles partial transfers, I'm using this for big audio/video files.
2 1800 posted 18 years ago by mandric
1 ... 505 506 507 508 509 ... 553