Welcome To Snipplr
Everyone's Recent Snippets Tagged c
- All /
- JavaScript /
- HTML /
- PHP /
- CSS /
- Ruby /
- Objective C
Usage:
formatDecimals(3.1415926, 3);
returns: 3.141.
Also adds zeros to end if needed.
0
1103
posted 16 years ago by Mijos
I was having the hardest time getting this to work. It's a collection of various items. For whatever reason, I needed to include the CASE statement due to NULL's coming back. If this helps you out... go for it.
0
1331
posted 16 years ago by gembry
[quote]$_SERVER['HTTP_REFERRER']'s problem is that can be spoofed, but it's better than nothing if you really want that.[/quote]
1
1768
posted 16 years ago by luizlopes
In this case I'm looking for image sources in html and placing them in array.
1
1741
posted 16 years ago by leonbda
Place javascrip refernce or complete javascript code in page header from ascx or aspx file.
0
1707
posted 16 years ago by leonbda
This is a simplified example for cut and paste use for command line parsing arguments with the use of an options hash
0
1623
posted 16 years ago by kfaulk1
Bash shell scripts to control wallpaper backgrounds when switching between Ubuntu workspaces. (Other distributions can use it too).
Take the below 2 scripts to make 2 separate files. Use gconf-editor to attach keybindings to run_command_1 and run...
0
1459
posted 16 years ago by webonomic
Create a random password using a Dictionary database table.
Selects a random word, and then appends two random numbers to the end, creating passwords in the form of: foozling98 or laicism11
1
1350
posted 16 years ago by mynameisharry