Welcome To Snipplr
Everyone's Recent Snippets Tagged convert
- All /
- JavaScript /
- HTML /
- PHP /
- CSS /
- Ruby /
- Objective C
This code is applied from http://www.ultramegatech.com/blog/2009/06/snippet-converting-seconds-to-readable-time/
0
796
posted 12 years ago by zierocode
This function accept one parameter (integer or float) and returns the same number writed with words. Useful for currencies and invoices.
0
1010
posted 13 years ago by stz184
It's very useful if you build a FLV player for example, and want to convert the time into minutes:seconds (example: 6:13)
//apply it to your project like this (and don't forget to import the class):
time.text = TimeUtil.getTimecode(timeValue);
0
1027
posted 13 years ago by vamapaull
A pair of handy terminal commands for converting Apple .plist preference files from binary to XML format [allowing for easy editing with a text editor] and then back to binary again, afterwards.
0
1386
posted 13 years ago by stiobhart
This is a very rudimentary function used to convert a Datetime delivered by the Twitter API to a format you can store in MySQL's datetime field.
0
1522
posted 13 years ago by aristoworks
must install flac and lame
apt-get install flac
apt-get install lame
0
714
posted 13 years ago by pbreah
Sometimes a legacy database will have HTML entities stored in it.
This function converts them. Note that this function assumes you have a database abstraction layer, and may need to be modified to connect to YOUR database.
0
2289
posted 13 years ago by f6design
Takes a number (no decimal) and converts it to written words.Why'd i write it to be able to do such big numbers? Why not?
Note: The numbers next to the 'thousandfoldnums' are for your reference (thats how many zeros/places there are in that numbe...
0
1015
posted 13 years ago by lasavior
Con estas instrucciones se pueden corregir los caracteres latinos que hayan sido almacenados erróneamente en una base de datos MySQL
1
1918
posted 13 years ago by n19ht
This simply takes an array and coverts it to variables. E.g. If you had an array, $array = array("key" => "value"), after running this script, $key would be "value".
0
772
posted 13 years ago by mloberg
Stolen from stetho -- All thanks to AppleScript to convert CMYK to RGB values http://bit.ly/eP2mXS
0
1042
posted 13 years ago by brandonjp
Full credit for this goes to Deva Raj (@nsdevaraj). This is also a good function for doing a similar thing, http://snipplr.com/view/27954/as3-convert-a-number-to-a-string/
2
1195
posted 13 years ago by adrianparr
ActionScript 3
AS3 ColorUtil Class (inc. RGBtoCMYK, CMYKtoRGB, subtractive colour & addative colour)
Full credit for this class goes to Deva Raj (@nsdevaraj). Many thanks.
1
1079
posted 13 years ago by adrianparr