This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import android.view.View; | |
import android.view.ViewTreeObserver.OnGlobalLayoutListener; | |
import android.view.animation.Animation; | |
import android.view.animation.AnimationUtils; | |
import android.view.animation.Animation.AnimationListener; | |
public class AnimationLooper{ | |
public static void start(final View v, final int animationResId){ | |
v.getViewTreeObserver().addOnGlobalLayoutListener(new OnGlobalLayoutListener() { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class Typefaces{ | |
private static final Hashtable cache = new Hashtable(); | |
public static Typeface get(Context c, String name){ | |
synchronized(cache){ | |
if(!cache.containsKey(name)){ | |
Typeface t = Typeface.createFromAsset( | |
c.getAssets(), | |
String.format("fonts/%s.ttf", name) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public abstract class ListenableAsyncTask<Params, Progress, Result> extends AsyncTask<Params, Progress, Result>{ | |
@Override | |
protected final void onPostExecute(Result result) { | |
notifyListenerOnPostExecute(result); | |
} | |
private AsyncTaskListener<Result> mListener; | |
public interface AsyncTaskListener<Result>{ | |
public void onPostExecute(Result result); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$(document).ready(function () { | |
$('div#ticker').googlefinanceticker({ tickers: 'goog,aapl,msft,csco,intc,ibm,att,bidu' }); | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
bcrypt = require 'bcrypt' | |
class password | |
text = null | |
salt = null | |
hash = null | |
@saltAndHash = (text, done) -> | |
bcrypt.genSalt (err, salt) -> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(function($) { | |
function getIdentifier($obj) { | |
return $obj.attr('id').length ? | |
$obj.attr('id') : | |
$obj.attr('name'); | |
} | |
$.validity.outputs.labellocal = { | |
cssClass:"error", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<link rel="import" href="../components/polymer/polymer.html"> | |
<polymer-element name="my-element"> | |
<template> | |
<style> | |
:host { | |
position: absolute; | |
width: 100%; | |
height: 100%; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Verifying that +newbyca is my Bitcoin username. You can send me #bitcoin here: https://onename.io/newbyca |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import os | |
import fnmatch | |
import unittest | |
import webapp2 | |
import importlib | |
from time import clock | |
class RunUnitTests(webapp2.RequestHandler): | |
def get(self): |
OlderNewer