Inspired by article How to Handle Multiple Git Accounts
Work with multiple SSH keys for authorization and commit signing.
ssh-keygen -t ed25519 -C "firstname@work-email.com"
Inspired by article How to Handle Multiple Git Accounts
Work with multiple SSH keys for authorization and commit signing.
ssh-keygen -t ed25519 -C "firstname@work-email.com"
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) |
import android.app.Activity; | |
import android.app.Dialog; | |
import android.content.DialogInterface; | |
import android.os.Bundle; | |
import android.support.annotation.NonNull; | |
import android.support.v4.app.DialogFragment; | |
import android.support.v7.app.AlertDialog; | |
import android.view.LayoutInflater; | |
import android.view.View; | |
import android.widget.Button; |
/* | |
Xively MQTT example | |
-Subscribes to Xively feed | |
-publishes current value to serial monitor | |
Based on Basic MQTT Example by knolleary | |
By Calum Barnes, Xively (c) 2013 |