Get Homebrew installed on your mac if you don't already have it
Install highlight. "brew install highlight". (This brings down Lua and Boost as well)
<!-- You can change the parent around to whatever you normally use --> | |
<style name="DebugColors" parent="Theme.AppCompat"> | |
<!-- System colors --> | |
<item name="android:windowBackground">@color/__debugWindowBackground</item> | |
<item name="android:colorPressedHighlight">#FF4400</item> | |
<item name="android:colorLongPressedHighlight">#FF0044</item> | |
<item name="android:colorFocusedHighlight">#44FF00</item> | |
<item name="android:colorActivatedHighlight">#00FF44</item> |
/** | |
* This class allows a single click and prevents multiple clicks on | |
* the same button in rapid succession. Setting unclickable is not enough | |
* because click events may still be queued up. | |
* | |
* Override onOneClick() to handle single clicks. Call reset() when you want to | |
* accept another click. | |
*/ | |
public abstract class OnOneClickListener implements View.OnClickListener { |
日期 | 值日生 | |
---|---|---|
2014/07/04 | Arc | |
2014/07/11 | Clark | |
2014/07/18 | Jack | |
2014/07/25 | William | |
2014/08/01 | kiki | |
2014/08/08 | Cloud | |
2014/08/15 | Isaac | |
2014/08/22 | Haru | |
2014/08/29 | Jimmy |
package com.cloudchen; | |
import java.io.IOException; | |
import java.nio.file.Files; | |
import java.nio.file.LinkOption; | |
import java.nio.file.Path; | |
import java.nio.file.Paths; | |
import java.nio.file.attribute.FileAttribute; | |
import java.nio.file.attribute.PosixFilePermission; | |
import java.nio.file.attribute.PosixFilePermissions; |
import android.content.Context; | |
import android.content.res.TypedArray; | |
import android.graphics.Canvas; | |
import android.graphics.Rect; | |
import android.graphics.drawable.Drawable; | |
import android.support.v7.widget.LinearLayoutManager; | |
import android.support.v7.widget.RecyclerView; | |
import android.util.AttributeSet; | |
import android.view.View; |
apply plugin: 'findbugs' | |
afterEvaluate { | |
def variants = plugins.hasPlugin('com.android.application') ? | |
android.applicationVariants : android.libraryVariants | |
variants.each { variant -> | |
def task = tasks.create("findBugs${variant.name.capitalize()}", FindBugs) | |
task.group = 'verification' |
@include keyframe(fadeout) { | |
0% { | |
opacity: 1; | |
} | |
100% { | |
opacity: 0; | |
} | |
} |
Get Homebrew installed on your mac if you don't already have it
Install highlight. "brew install highlight". (This brings down Lua and Boost as well)
/** | |
* @param interval The base interval to start backing off from. The function is: attemptNum^2 * intervalTime | |
* @param units The units for interval | |
* @param retryAttempts The max number of attempts to retry this task or -1 to try MAX_INT times, | |
*/ | |
public static <T> Observable.Transformer<T, T> backoff(final long interval, final TimeUnit units, final int retryAttempts) { | |
return new Observable.Transformer<T, T>() { | |
@Override | |
public Observable<T> call(final Observable<T> observable) { | |
return observable.retryWhen( |
gifify() { | |
if [[ -n "$1" ]]; then | |
if [[ $2 == '--good' ]]; then | |
ffmpeg -i $1 -r 10 -vcodec png out-static-%05d.png | |
time convert -verbose +dither -layers Optimize -resize 600x600\> out-static*.png GIF:- | gifsicle --colors 128 --delay=5 --loop --optimize=3 --multifile - > $1.gif | |
rm out-static*.png | |
else | |
ffmpeg -i $1 -s 600x400 -pix_fmt rgb24 -r 10 -f gif - | gifsicle --optimize=3 --delay=3 > $1.gif | |
fi | |
else |