Signatures of functions, methods and class constructors can be given like they would be written in Python.
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
using Newtonsoft.Json; | |
using System.Collections.Generic; | |
using System.Linq; | |
using System.Threading.Tasks; | |
using Unity.Services.CloudSave; | |
using UnityEngine; | |
public class CloudSaveClient : ISaveClient | |
{ | |
private readonly ICloudSaveDataClient _client = CloudSaveService.Instance.Data; |
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
wget http://archive.ubuntu.com/ubuntu/pool/main/o/openssl/libssl1.1_1.1.0g-2ubuntu4_amd64.deb | |
sudo dpkg -i libssl1.1_1.1.0g-2ubuntu4_amd64.deb |
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
[DebuggerDisplay("Count = {" + nameof(Count) + "}")] | |
public sealed class TaskCompletionSourceDictionary | |
{ | |
private readonly TaskCompletionSourceDictionary<Type> _dictionary = new TaskCompletionSourceDictionary<Type>(); | |
public int Count => _dictionary.Count; | |
public bool TryGetValue<T>(out TaskCompletionSource<T> taskCompletionSource) => | |
_dictionary.TryGetValue(typeof(T), out taskCompletionSource); |
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/bash | |
project_name= com.jenkyncorp.bestapp | |
reinstall= | |
# Takes the most recent .apk and .obb (If you have multiple files) | |
OBB=$(ls -t *.obb | head -n1) | |
APK=$(ls -t *.apk | head -n1) | |
while [ "$1" != "" ]; do |
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
#!bash | |
# | |
# git-flow-completion | |
# =================== | |
# | |
# Bash completion support for [git-flow](http://github.com/nvie/gitflow) | |
# | |
# The contained completion routines provide support for completing: | |
# | |
# * git-flow init and version |
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
fun ViewPropertyAnimator.setListener(init: ViewPropertyAnimator.() -> Unit) { | |
this.init() | |
} | |
inline fun ViewPropertyAnimator.onAnimationEnd(crossinline continuation: (Animator) -> Unit) { | |
setListener(object : AnimatorListenerAdapter() { | |
override fun onAnimationEnd(animation: Animator) { | |
continuation(animation) | |
} |
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
'use strict'; | |
const chrome = require('chrome-remote-interface'); | |
const ChromeLauncher = require('chrome-launcher').Launcher; | |
function launchChrome() { | |
const launcher = new ChromeLauncher(); | |
return Promise.resolve(launcher); | |
} |
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.nileshdeokar.simplevibratedemo; | |
import android.os.Build; | |
import android.os.VibrationEffect; | |
import android.os.Vibrator; | |
import android.support.annotation.RequiresApi; | |
import android.support.v7.app.AppCompatActivity; | |
import android.os.Bundle; | |
import android.widget.Toast; | |
/* |
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
[url]https://newfivefour.com/android-rxjava-wait-for-network-calls-finish.html[/url] | |
Android, RxJava and Retrofit: Wait for multiple network calls to finish | |
Say you have multiple network calls you need to make–cals to get Github user information and Github user events for example. | |
And you want to wait for each to return before updating the UI. RxJava can help you here. | |
Let’s first define our Retrofit object to access Github’s API, then setup two observables for the two network requests above: |
NewerOlder