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
package com.vinaysshenoy.matrixviewtest; | |
import android.annotation.TargetApi; | |
import android.content.Context; | |
import android.content.res.Resources; | |
import android.graphics.Canvas; | |
import android.graphics.Color; | |
import android.graphics.Matrix; | |
import android.graphics.Paint; | |
import android.graphics.PointF; |
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
using UnityEngine; | |
using UnityEditor; | |
using System; | |
using System.Reflection; | |
public class WebWindow : EditorWindow { | |
static Rect windowRect = new Rect(100,100,800,600); | |
static BindingFlags fullBinding = BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.Static; | |
static StringComparison ignoreCase = StringComparison.CurrentCultureIgnoreCase; |
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 static <T> Observable<T> delayEmissions(Observable<T> observable, final long period, final TimeUnit timeUnit) { | |
return observable.compose(new Observable.Transformer<T, T>() { | |
@Override | |
public Observable<T> call(Observable<T> observable) { | |
return Observable.zip(observable, Observable.interval(period, timeUnit), new Func2<T, Long, T>() { | |
@Override | |
public T call(T value, Long tick) { | |
return value; | |
} |
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 static float spToPx(float sp) { | |
return TypedValue.applyDimension(TypedValue.COMPLEX_UNIT_SP, sp, Resources.getSystem().getDisplayMetrics()); | |
} |
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
package com.vinaysshenoy.sieve; | |
import java.util.List; | |
/** | |
* Created by vinaysshenoy on 03/05/17. | |
*/ | |
public interface Filter<T> { |
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
@Override | |
protected void attachBaseContext(Context newBase) { | |
final Resources resources = newBase.getResources(); | |
final DisplayMetrics displayMetrics = resources.getDisplayMetrics(); | |
if (displayMetrics.densityDpi != (int) displayMetrics.xdpi) { | |
Logger.debug(TAG, "Override configuration!"); | |
final Configuration configuration = resources.getConfiguration(); | |
configuration.densityDpi = (int) displayMetrics.xdpi; |
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 appleseed as asr | |
mesh = asr.MeshObject("my_mesh", {}) | |
print mesh | |
# Vertices | |
v0 = asr.Vector3f([0.0, 0.0, 0.0]) | |
v1 = asr.Vector3f([1.0, 0.0, 0.0]) | |
v2 = asr.Vector3f([0.0, 0.0, 1.0]) |
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
package com.vinaysshenoy.multitouch.widget.matrixtest; | |
import android.content.Context; | |
import android.graphics.Canvas; | |
import android.graphics.Color; | |
import android.graphics.Matrix; | |
import android.graphics.Paint; | |
import android.graphics.RectF; | |
import android.support.annotation.Nullable; | |
import android.util.AttributeSet; |
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
package com.vinaysshenoy.multitouch.widget.matrixtest; | |
import android.content.Context; | |
import android.graphics.Canvas; | |
import android.graphics.Color; | |
import android.graphics.Matrix; | |
import android.graphics.Paint; | |
import android.graphics.Path; | |
import android.graphics.RectF; | |
import android.support.annotation.Nullable; |
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
# Add Android SDK Emulator binary to path | |
export PATH=:<Path To Android SDK>/emulator | |
# Add alias for running any emulator | |
alias run_avd='function _run_avd(){ emulator -avd $1 -dns-server 8.8.8.8; };_run_avd' | |
# To run emulator via command line, there are 2 steps | |
# $emulator -list-avds | |
# Above command will list al AVDS available, copy the one you want to launch |