Skip to content

Instantly share code, notes, and snippets.


Mohammed Audhil Audhil

Block or report user

Report or block Audhil

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
Audhil / LifecycleCoroutines.kt
Created Oct 16, 2018 — forked from LouisCAD/LifecycleCoroutines.kt
CoroutineScope and Job integration with Lifecycle for Android. Meant to be used for your coroutines in lifecycle aware components. Ongoing PR:
View LifecycleCoroutines.kt
import android.arch.lifecycle.GenericLifecycleObserver
import android.arch.lifecycle.Lifecycle
import android.arch.lifecycle.Lifecycle.Event.ON_DESTROY
import android.arch.lifecycle.LifecycleOwner
import kotlinx.coroutines.experimental.CoroutineScope
import kotlinx.coroutines.experimental.Dispatchers
import kotlinx.coroutines.experimental.Job
fun Lifecycle.createJob(cancelEvent: Lifecycle.Event = ON_DESTROY): Job {
View gist:a4d49d3cbc32d3c0a17ab1c85057720c

1. Clone your fork:

git clone

2. Add remote from original repository in your forked repository:

cd into/cloned/fork-repo
git remote add upstream git://
git fetch upstream
import java.util.LinkedHashMap;
import java.util.Map;
import java.util.Set;
public class LinkedHashMapValueByIndexArray {
public static void main(String []args){
LinkedHashMap<String, Integer> map = new LinkedHashMap<String, Integer>();
map.put("Qatar", 98814);
You can’t perform that action at this time.