Snipplr
http://snipplr.com/tags/calculate
Recent snippets posted on Snipplr.comen-usSun, 01 Mar 2015 23:47:09 GMT(ActionScript 3) Given Point Along Quadratic Bezier - choppingblock
http://snipplr.com/view/70077/given-point-along-quadratic-bezier/
Have a quadratic bezier curve, need to figure out a point along the way. This should work quite well, easy to convert to JavaScript. ]]>Sun, 24 Feb 2013 10:21:04 GMThttp://snipplr.com/view/70077/given-point-along-quadratic-bezier/(PHP) Calculate age - bsuichies
http://snipplr.com/view/63911/calculate-age/
Calculate age in years based on a timestamp and a reference timestamp (which defaults to the current time when left empty) ]]>Wed, 14 Mar 2012 01:32:43 GMThttp://snipplr.com/view/63911/calculate-age/(PHP) Calculate Age using PHP (mounth-day-year to age) - i0ni
http://snipplr.com/view/58370/calculate-age-using-php-mounthdayyear-to-age/
]]>Thu, 01 Sep 2011 17:58:55 GMThttp://snipplr.com/view/58370/calculate-age-using-php-mounthdayyear-to-age/(PHP) How to Find Tomorrow, Next Month, or Next Year using PHP - fackz
http://snipplr.com/view/50993/how-to-find-tomorrow-next-month-or-next-year-using-php/
]]>Wed, 23 Mar 2011 08:42:56 GMThttp://snipplr.com/view/50993/how-to-find-tomorrow-next-month-or-next-year-using-php/(PHP) Number of days between 2 dates - klovera
http://snipplr.com/view/47642/number-of-days-between-2-dates/
// example
$from = '2011-1-6';
$to = '2011-1-8';
dateDiff($from,$to); // returns 2 ]]>Fri, 21 Jan 2011 08:11:23 GMThttp://snipplr.com/view/47642/number-of-days-between-2-dates/(PHP) Calcular edad según fecha - arucordoba
http://snipplr.com/view/45300/calcular-edad-segn-fecha/
int strtotime ( string $time [, int $now ] )
Esta función espera que se proporcione una cadena que contenga un formato de fecha en Inglés US e intentará convertir ese formato a una fecha Unix (el número de segundos desde el 1 de Enero del 1970 00:00:00 UTC), relativa a la marca de tiempo dada en now, o la marca de tiempo actual si now no se proporciona. ]]>Sun, 05 Dec 2010 09:20:48 GMThttp://snipplr.com/view/45300/calcular-edad-segn-fecha/(C#) Calculate Total File Size - jx_boi
http://snipplr.com/view/39740/calculate-total-file-size/
]]>Tue, 31 Aug 2010 10:37:09 GMThttp://snipplr.com/view/39740/calculate-total-file-size/(jQuery) Calculate Width of Inner Divs - sherpa
http://snipplr.com/view/30266/calculate-width-of-inner-divs/
For overflow-x, helpful to have total width of inner divs and set the parent. This uses jQuery 1.3.2 ]]>Thu, 25 Mar 2010 11:44:28 GMThttp://snipplr.com/view/30266/calculate-width-of-inner-divs/(PHP) Calculate and return filesize of file in different units of measurement - MMDeveloper
http://snipplr.com/view/25681/calculate-and-return-filesize-of-file-in-different-units-of-measurement/
Simply pass the path to the file, the desired units of measurement, decimal rounding, and separator. For example, a 1024kb file (1mb)
$filesizeStats = getFilesize("path/to/file.jpg", "kb", 2, " ");
print_r($filesizeStats);
//will return
array (
"rawBytes" => 131072,
"convertedSize" => 1024.00,
"convertedSize_formatted" => "1,024.00",
"units" => "kb",
"formatted" => "1,024.00 kb"
) ]]>Tue, 29 Dec 2009 14:05:39 GMThttp://snipplr.com/view/25681/calculate-and-return-filesize-of-file-in-different-units-of-measurement/(PHP) Calculate percent - andreiabohner
http://snipplr.com/view/25524/calculate-percent/
]]>Sun, 27 Dec 2009 21:48:15 GMThttp://snipplr.com/view/25524/calculate-percent/(MySQL) Calculate Age from Date Of Birth - nkm
http://snipplr.com/view/19005/calculate-age-from-date-of-birth/
It's not 100% accurate, but works fine for people under 1.480. ]]>Sat, 29 Aug 2009 17:15:04 GMThttp://snipplr.com/view/19005/calculate-age-from-date-of-birth/(PHP) Calculate (convert) File Size - kirik
http://snipplr.com/view/18695/calculate-convert-file-size/
This function converts file size in bytes to the larger units.
You can add bigger values like exa-, zetta-, yotta- bytes. ]]>Fri, 21 Aug 2009 20:40:27 GMThttp://snipplr.com/view/18695/calculate-convert-file-size/(PHP) How To Calculate Interest Earned In A Bank Account - shaunchapman
http://snipplr.com/view/13919/how-to-calculate-interest-earned-in-a-bank-account/
The interest rate banks pay is usually a yearly percentage. So, if your bank tells you that you're getting *4%* interest and you start with *$20,000* in your account, you would earn an extra *$800* at the end of the year (*$20,000 x 0.04 = $800*).
However, it's not that simple. The interest you earn is usually compounded daily and paid monthly. This means the interest you earn on one day will be added to your original balance, which in turn earns interest the next day.
To calculate this, we take the *$800* from above and divide it by *365* to figure out how much interest you would earn the first day (*$800 / 365 = $2.19*). So, you would earn *$2.19* in interest on the first day. This *$2.19* is then added to your original balance (*$20,000 + $2.19 = $20,002.19*). Remember when I said the bank pays you monthly? This means that this new balance of *$20,002.19* is used in the calculation for tomorrow's interest however you won't actually get the money in your account until the end of the month. All this means is the bank doesn't have to put a couple dollars into your account every single day. You're still getting the same amount of money.
To calculate the interest earned the next day, you would do the same calculation but with the new balance (*$20,0002.19 x 0.04 / 365*). Can you see how your interest earned will increase each day? That's the beauty of compound interest.
In this case, the interest you would earn in 1 year is not *$800* like in our original calculation. The amount of interest you would actually earn is *$816.17*. ]]>Thu, 09 Apr 2009 19:01:17 GMThttp://snipplr.com/view/13919/how-to-calculate-interest-earned-in-a-bank-account/(JavaScript) getAge - nicolaspar
http://snipplr.com/view/5913/getage/
]]>Fri, 18 Apr 2008 23:59:41 GMThttp://snipplr.com/view/5913/getage/(PHP) Calculate Age - Abe
http://snipplr.com/view/4850/calculate-age/
]]>Wed, 30 Jan 2008 17:41:46 GMThttp://snipplr.com/view/4850/calculate-age/(JavaScript) Calculate Business Days between two dates - Bluebeard
http://snipplr.com/view/4086/calculate-business-days-between-two-dates/
This routine is loosely based on elightbo's "Calculate Business Days" snippet in ASP, with some process & logic modifications (most notably accounting for situations when both dates fall on a weekend) and a translation to JavaScript. ]]>Wed, 07 Nov 2007 22:44:33 GMThttp://snipplr.com/view/4086/calculate-business-days-between-two-dates/(HTML) Rock Value Calculating - zhernovoi
http://snipplr.com/view/2127/rock-value-calculating/
]]>Mon, 05 Feb 2007 11:46:51 GMThttp://snipplr.com/view/2127/rock-value-calculating/(Ruby) Find age of person - spider
http://snipplr.com/view/2111/find-age-of-person/
]]>Sat, 03 Feb 2007 16:13:16 GMThttp://snipplr.com/view/2111/find-age-of-person/