Skip to content

Instantly share code, notes, and snippets.

Avatar

Luke Meyer lukemeyer

  • Young & Laramore
  • Indianapolis, Indiana
View GitHub Profile
View keybase.md

Keybase proof

I hereby claim:

  • I am lukemeyer on github.
  • I am lukeme (https://keybase.io/lukeme) on keybase.
  • I have a public key ASCQ2MGgIuMy2pC6B6NReerb8WKHz1v6JC_JQsU2aHjKrgo

To claim this, I am signing this object:

View Animate Number
function animateNumber(element, endValue, endTime){
var now = new Date().getTime(),
timeLeft = endTime - now;
if ( timeLeft > 0 ){
//element must be a jQuery object
var isInput = element.is('input'),
currentValue = isInput ? parseInt(element.val().replace(',','')) : parseInt(element.html().replace(',','')),
newValue = currentValue,
done = false,
@lukemeyer
lukemeyer / gist:3713450
Created Sep 13, 2012
Calculate average Color in a bitmap
View gist:3713450
public static Color getAverageColor(Bitmap bmp)
{
//Used for tally
int r = 0;
int g = 0;
int b = 0;
int total = 0;