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
/** | |
* storage.js - Simple namespaced browser storage. | |
* | |
* Creates a window.Storage function that gives you an easy API to access localStorage, | |
* with fallback to cookie storage. Each Storage object is namespaced: | |
* | |
* var foo = Storage('foo'), bar = Storage('bar'); | |
* foo.set('test', 'A'); bar.set('test', 'B'); | |
* foo.get('test'); // 'A' | |
* bar.remove('test'); |
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
@ECHO OFF | |
IF "%1"=="" GOTO MissingFileNameError | |
IF EXIST "%1" (GOTO ContinueProcessing) ELSE (GOTO FileDoesntExist) | |
:ContinueProcessing | |
set FileNameToProcess=%1 | |
set FileNameForDx=%~n1.dex | |
IF "%~x1"==".dex" GOTO ProcessWithPowerShell | |
REM preprocess Jar with dx |
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 ClickToSelectEditText <T> extends AppCompatEditText { | |
CharSequence mHint; | |
OnItemSelectedListener<T> onItemSelectedListener; | |
ListAdapter mSpinnerAdapter; | |
public ClickToSelectEditText(Context context) { | |
super(context); | |
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 DataBinding { | |
@android.databinding.BindingAdapter("bind") | |
public static void addTextChangedListener(EditText view, final int variable) { | |
final ViewDataBinding binding = DataBindingUtil.findBinding(view); | |
view.addTextChangedListener(new TextWatcher() { | |
@Override public void beforeTextChanged(CharSequence s, int start, int count, int after) { | |
} |
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
#include <SoftwareSerial.h> | |
#include <ESP8266WiFi.h> | |
#include <ESP8266mDNS.h> | |
#include <ArduinoOTA.h> | |
#include <SoftwareSerial.h> | |
#include <Ticker.h> | |
const char* ssid = "Bembun"; | |
const char* password = "ananasakaama"; |
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
1. Download https://github.com/dz0ny/leapcast/archive/master.zip | |
2. Extract zip to C:\leapcast | |
3.1 Download Python 2.7: | |
x86: http://www.python.org/ftp/python/2.7.5/python-2.7.5.msi | |
x64: http://www.python.org/ftp/python/2.7.5/python-2.7.5.amd64.msi | |
3.2 Install Python to C:\Python27 | |
NOTE: If you have a newer version, install 2.7.5 and edit the environment variable and change for example "C:\Python33" to "C:\Python27". | |
4.1 Download Setuptools here: http://www.lfd.uci.edu/~gohlke/pythonlibs/#setuptools |
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
/** | |
* This is simple HTTP local server for streaming InputStream to apps which are capable to read data from url. | |
* Random access input stream is optionally supported, depending if file can be opened in this mode. | |
* | |
* from: http://stackoverflow.com/a/9096241 | |
*/ | |
public class StreamOverHttp{ | |
private static final boolean debug = false; | |
private final Browser.FileEntry file; |
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
class LiveEvent<T> : MediatorLiveData<T>() { | |
private val observers = ConcurrentHashMap<LifecycleOwner, MutableSet<ObserverWrapper<T>>>() | |
@MainThread | |
override fun observe(owner: LifecycleOwner, observer: Observer<T>) { | |
val wrapper = ObserverWrapper(observer) | |
val set = observers[owner] | |
set?.apply { | |
add(wrapper) |
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 com.example.remotecontrolclient; | |
import android.app.Service; | |
import android.content.ComponentName; | |
import android.content.Context; | |
import android.content.Intent; | |
import android.graphics.BitmapFactory; | |
import android.media.AudioManager; | |
import android.os.IBinder; | |
import android.support.v4.media.MediaMetadataCompat; |
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 com.google.auto.value.AutoValue; | |
import java.lang.annotation.Retention; | |
import java.lang.annotation.Target; | |
import static java.lang.annotation.ElementType.TYPE; | |
import static java.lang.annotation.RetentionPolicy.RUNTIME; | |
/** | |
* Marks an {@link AutoValue @AutoValue}-annotated type for proper Gson serialization. | |
* <p> |
OlderNewer