This file contains hidden or 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 CursorLooper<K>{ | |
public interface Extract<K>{ | |
public K extract(Cursor cursor); | |
} | |
private Extract<K> extract; | |
public CursorLooper(Extract<K> extract) { | |
this.extract = extract; | |
} |
This file contains hidden or 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.content.Context; | |
import android.content.Intent; | |
import android.os.Bundle; | |
import android.support.v4.content.WakefulBroadcastReceiver; | |
import android.util.Log; | |
/** | |
* Created by lhtan on 20/8/15. | |
* Refer from: https://randling.wordpress.com/2013/12/29/wakeful-and-repeatable-background-service-on-android/#comment-690 | |
*/ |
This file contains hidden or 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.graphics.Color; | |
/** | |
* Created by lhtan on 24/8/15. | |
* Based on How to decide font color in white or black depending on background color? | |
* http://stackoverflow.com/questions/3942878/how-to-decide-font-color-in-white-or-black-depending-on-background-color | |
*/ | |
public class ColorUtil { | |
/** | |
* compute text color, either white or black based on colorString |
This file contains hidden or 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.graphics.Color; | |
/** | |
* Created by lhtan on 24/8/15. | |
* Based on How to decide font color in white or black depending on background color? | |
* http://stackoverflow.com/questions/3942878/how-to-decide-font-color-in-white-or-black-depending-on-background-color | |
*/ | |
public class ColorUtil { | |
/** | |
* compute text color, either white or black based on colorString |
This file contains hidden or 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
tell application "iTunes" | |
set vol to sound volume | |
set vol to vol - 10 | |
if vol is less than 0 then | |
set vol to 0 | |
end if | |
set the sound volume to vol | |
end tell |
This file contains hidden or 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
Combination of | |
1. ionic-image-lazy-load (https://github.com/paveisistemas/ionic-image-lazy-load) | |
2. imgCache (https://github.com/chrisben/imgcache.js/) | |
Usage: | |
<image-lazy-cached image-lazy-src="{{image}}" image-lazy-loader="dots"></image-lazy-cached> | |
Installation: | |
1. Cordova File and Cordova File Transfer plugin |
This file contains hidden or 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
language: node_js | |
node_js: | |
- 4.2 | |
before_script: | |
- npm install -g bower | |
- bower install |
This file contains hidden or 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
language: node_js | |
node_js: | |
- 4.2 |
This file contains hidden or 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
curl https://gist.githubusercontent.com/tanhauhau/405e39884e80288615a7b51181fd5228/raw/9045c2e219547f0a228da630abff345d8add0c47/.travis.yml > .travis.yml | |
This file contains hidden or 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
curl https://gist.githubusercontent.com/tanhauhau/71998bf221810186f046db94cda10c4e/raw/d1e8aee0981a96c20f94de6db386da048face423/.travis.yml > .travis.yml |
OlderNewer