Welcome To Snipplr


Everyone's Recent Snippets Tagged convert



Quick and dirty lowercase / uppercase conversion.
2 1701 posted 15 years ago by vagrantradio
// Example usage ... trace(fNumToWord(56345)); // Output ... // Fifty-Six Thousand and Three Hundred and Forty-Five
0 2172 posted 15 years ago by adrianparr
0 1665 posted 15 years ago by loric
0 1366 posted 15 years ago by yazu
These statements convert a date/time field into just a date or a time field
2 1713 posted 16 years ago by highlyevolved
Takes a number in bytes and returns the number in (KB,MB,GB) for human-readable format.
1 1212 posted 16 years ago by stancox
0 1378 posted 16 years ago by enchance
convert a string to it's hex representation and back
0 1112 posted 16 years ago by dygor
Ever needed to convert rgb to hex on your website, maybe you have a slider that handles rgb but your backend uses hex, this issue can be resolved easily be using the following code. Remember to keep in mind that php and html primarily uses hex colo...
1 1439 posted 16 years ago by scopefragger
This function converts file size in bytes to the larger units. You can add bigger values like exa-, zetta-, yotta- bytes.
0 1257 posted 16 years ago by kirik
0 1050 posted 16 years ago by sixmedia
Slightly more efficient than "as.numeric(as.character(f))"
0 3367 posted 16 years ago by fonnesbeck
A simple one-liner to resize images from commandline
1 1836 posted 16 years ago by ping_ch
0 1367 posted 16 years ago by pashky
Turns the list [1,2,3] to ['1','2','3']
0 1250 posted 16 years ago by fnurl
Recently moved my Wordpress blog to a tumblr account while I was removing a hosting account, wrote this script to do the transfer for me using Wordpress' Export feature and Tumblr's API. It's rough around the edges but gets the job done!
2 2257 posted 16 years ago by shakefon
To convert links on a twitter status to a clickable url. Also convert @ to follow link, and # to search
3 1847 posted 16 years ago by mardix
When you forget to "SET NAMES utf8", you'll probably end up with a bunch of latin1 data in your utf8 column. This query fixes that, CONVERTing the existing data to its correct collation.
4 1682 posted 16 years ago by jdbartlett
* Resized images are generated into TARGET_DIR. * Change the resolution (800x800 in my example) and quality (80) as you want. * The command keeps the image's proportion. 1600x1200 will be converted into 800x600, 1200x1600 into 600x800. _Notice_:...
2 1949 posted 16 years ago by Dorgendubal
1. Save under .gnome2/nautilus-scripts/ 2. Right click some video file 3. Select Scripts->toFlv Works with multiple files.
1 1846 posted 16 years ago by ping_ch
0 1343 posted 16 years ago by ping_ch