Welcome To Snipplr
Everyone's Recent Snippets Tagged number
- All /
- JavaScript /
- HTML /
- PHP /
- CSS /
- Ruby /
- Objective C
I am tired of having to go through text and adding quotation marks and commas to strings or just commas after numbers... f-that. Fixed.
0
995
posted 9 years ago by joshuaherman
Write a code that will find the sum of any pairs of numbers
0
1021
posted 10 years ago by rikesh_kisnah
Add / Remove comma for number in the thousands. Ex: 1,000
Useful for grabbing input values to format then display, remove the comma and convert back to number to do math.
0
1685
posted 10 years ago by supawaza
Avoid history back when is pressed backspace key in number imput
0
728
posted 11 years ago by porquero
A quick function that makes it easy to convert an integer into a number string with commas inserted.
0
815
posted 11 years ago by uberdragon
A simple utility class that will help you convert a color value (from numbers) to hexadecimal color value.
0
1106
posted 11 years ago by vamapaull
Example to manipulate only numbers (and tab key) in a web control (textbox example)
0
833
posted 11 years ago by keidash
Generic function - Pass the context to the function for use with any field
0
818
posted 11 years ago by chetkloss
Return a pure 10-digit phone number if the number given is 10 digits or 11 digits.
0
1426
posted 11 years ago by chrisvogt
Create navigation links without the need of a plugin, using paginate_links function of wordpress core.
0
1977
posted 11 years ago by rudwolf
Algunas veces se quiere comprobar si un numero esta entre un rango de otro número menor y otro mayor.
0
814
posted 12 years ago by fenixkim
Write a given number in words - Escreve um número por extenso. Write in Brazilian Portuguese, sorry for english or other language guys but it can be adapted.
Write from 1 to 9999
Based on a forum in http://scriptbrasil.com.br/forum/index.php?...
0
1232
posted 12 years ago by glauberportella
Straatnamen en huisnummer splitsen, hieronder diverse types straatnamen
Bron: http://www.pfz.nl/archief/965267-adres-splitsen-in-straatnaam-en-huisnr/
0
1087
posted 12 years ago by MGHollander
I’m sharing with you a little utility that I find myself using a lot lately. This utility is a value convertor that you can use in those times when you need to make a volume slider or something similar where you’ll need to change a value and a va...
0
1219
posted 12 years ago by vamapaull
By not being limited to provide certain arguments/parameters in right order when calling a function, makes the function more versatile and easier to extend without breaking old code (e.g. calls to the function).
One solution is to pass an associati...
0
986
posted 12 years ago by coprolit
Example of some random number generation mechanisms built-in Python. More details in the following link: http://docs.python.org/library/random.html
0
793
posted 13 years ago by denakitan
Thanks to http://www.mredkj.com/javascript/numberFormat.html#addcommas
0
691
posted 13 years ago by fengelz
Find how many factors there is in N! for a prime P
Ex: 5! = (2^3)*(3^1)*(5^1)
mult(5,2) = 3
mult(5,3) = 1
mult(5,5) = 1
all else = 0
0
694
posted 13 years ago by FMalk
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
974
posted 13 years ago by lasavior
Examples of different ways to truncate/round a decimal number.
0
1219
posted 13 years ago by adrianparr