Welcome To Snipplr


Everyone's Recent Snippets Tagged number



0 611 posted 12 years ago by dubogii
An example of Karatsuba algorithm for multiplication of n digit numbers.
0 707 posted 12 years ago by josepino
This simple function allows you to find a weeks position in the month based on a given date. For instance I needed to alert the user their date was the "Second Week Of January" during a given month. I may never use it again but it came in very hand...
0 2835 posted 12 years ago by aristoworks
converts numbers to their english style
0 352 posted 13 years ago by god_of_nothing
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 945 posted 13 years ago by adrianparr
I needed to split a decimal number into the integer part and the fraction part and save both of them in different variables
0 1162 posted 13 years ago by bwangila
From the tutorial, Validating Various Input Data in Flash (http://active.tutsplus.com/tutorials/actionscript/validating-various-input-data-in-flash/)
1 893 posted 13 years ago by Activetuts
This seems to be a bug.. or not.. But explains how to fix it anyway.
0 644 posted 13 years ago by godstroke
Sometimes you need to tween a number (for example from 1-100) and to get the number
1 599 posted 13 years ago by burnandbass
0 535 posted 13 years ago by metoikos
Add this in search.php
0 550 posted 13 years ago by laurentzziu
it parses given string and returns 1st number it encounters ( it will replace comas with dots so floats formatted as 12,345 could be 12.345 ( some countries use that ) ) then u can parse returned value as a number / float / int - do what You need...
0 700 posted 13 years ago by stryju
Will help convert string to number OR get number in a selected string.
0 652 posted 13 years ago by carbonr
<p>This function returns a random number within a range.</p><p>For example:</p><p>// assigns low and high values for range</p><p><code>int rangeLow = 34, rangeHigh = 78;</code></p><p>// computes a random number between 34 and 78</p><p><code>myRandomN...
0 585 posted 13 years ago by dblandin
30 minutes spent on this :)
4 632 posted 13 years ago by TEHEK
0 586 posted 13 years ago by Groove
The player selects a range from 0 to n, remembers a number in this range and then the script asks the player a question trying to guess the number. The PC will always guess the correct number.\r\n\r\nI could have added more varied questions, but the...
0 480 posted 13 years ago by Sverri
A simple PHP application for counting how many views a page gets.
0 552 posted 13 years ago by FelixT
Format number using a comma as a separator
3 707 posted 13 years ago by Tmeister
Simple function to return a decimal value between the minValue and the maxValue.
0 1391 posted 13 years ago by Jamie
Simple function to return a value between the minValue and the maxValue.
0 612 posted 13 years ago by Jamie
Always need one of these on hand. Feed it a minimum number and a maximum number and it returns a random within that range. Super useful.
1 684 posted 13 years ago by IsoJon
This returns a string with a single space after the fifth character. Useful for displaying a UK mobile number which is easy to read.
0 781 posted 13 years ago by adrianparr
0 519 posted 13 years ago by jodm