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
package jp.seesaa.example.util; | |
import org.junit.Test; | |
import java.util.Arrays; | |
import java.util.concurrent.TimeUnit; | |
import rx.Observable; | |
import rx.functions.Action0; | |
import rx.functions.Action1; |
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
javascript:var $svg=$("svg.js-calendar-graph-svg > g");$svg.children("g").map(function(){$(this).children().map(function(){$(this).attr("fill","#1e6823")})}); |
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.content.ContentResolver; | |
import android.content.Context; | |
import android.os.Build; | |
import android.provider.Settings; | |
import android.util.Log; | |
import com.google.android.gms.ads.AdRequest; | |
import java.math.BigInteger; | |
import java.security.MessageDigest; |
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
#!/bin/sh | |
CNT=1 | |
for url in `cat images.txt` | |
do | |
curl -o `printf %03d $CNT`.jpg $url | |
CNT=$(( CNT + 1 )) | |
done |
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
TestSubscriber<List<String>> testSubscriber = new TestSubscriber<>(); | |
long startTime = new Date().getTime(), endTime = 0; | |
System.out.println("Start."); | |
Observable.merge( | |
asyncObservable("uno", 4).map(new Func1<String, Pair<Integer, String>>() { | |
@Override | |
public Pair<Integer, String> call(String s) { | |
return Pair.create(0, s); |
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
#!/bin/sh | |
if [ $# -ne 3 ]; then | |
echo "How to use:" 1>&2 | |
echo "$0 keyfile.key "iv_hex_32_length" encripted.ts" 1>&2 | |
exit 1 | |
fi | |
openssl aes-128-cbc -d -in $3 -out decripted_$3 -p -nosalt -iv $2 -K $(cat $1 | hexdump -e '16/1 "%02x"') |
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
package net.pside.android.example.sunaba.livedata; | |
import android.arch.lifecycle.LiveData; | |
import android.os.CountDownTimer; | |
import android.util.Log; | |
import java.util.concurrent.atomic.AtomicBoolean; | |
public class CountDownTimerLiveData extends LiveData<Long> { |
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
// libraries/cameraview and libraries/transcoder are submodule project | |
include ':CameraView' | |
project(':CameraView').projectDir = new File(rootDir, 'libraries/cameraview/library') | |
include ':Transcoder' | |
project(':Transcoder').projectDir = new File(rootDir, 'libraries/transcoder/lib') | |
include ':app' |
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
// Package X | |
class Foo { | |
interface FooInterface { | |
void fnFoo(); | |
} | |
} | |
public class Bar { | |
public void prepareFoo(VisibleFooInterface foo) { | |
foo.fnFoo(); |
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.content.Context | |
import android.graphics.Matrix | |
import android.util.AttributeSet | |
import com.google.android.apps.muzei.render.GLTextureView | |
import com.google.android.exoplayer2.SimpleExoPlayer | |
import timber.log.Timber | |
class GLVideoTextureView @JvmOverloads constructor( | |
context: Context, attrs: AttributeSet? = null | |
) : GLTextureView(context, attrs), SimpleExoPlayer.VideoListener { |