Available Packages:
| Path | Version | Description |
|---|---|---|
| add-ons;addon-google_apis-google-15 | 3 | Google APIs |
| add-ons;addon-google_apis-google-16 | 4 | Google APIs |
| add-ons;addon-google_apis-google-17 | 4 | Google APIs |
| add-ons;addon-google_apis-google-18 | 4 | Googl |
Available Packages:
| Path | Version | Description |
|---|---|---|
| add-ons;addon-google_apis-google-15 | 3 | Google APIs |
| add-ons;addon-google_apis-google-16 | 4 | Google APIs |
| add-ons;addon-google_apis-google-17 | 4 | Google APIs |
| add-ons;addon-google_apis-google-18 | 4 | Googl |
/!\ Be very carrefull in your setup : any misconfiguration make all the git config to fail silently ! Go trought this guide step by step and it should be fine 😉
~/.ssh/config, set each ssh key for each repository as in this exemple:| open class ScopedViewModel : ViewModel() { | |
| private val job = Job() | |
| protected val scope: CoroutineScope = job + Dispatchers.Main | |
| override fun onCleared() { | |
| super.onCleared() | |
| job.cancel() | |
| } | |
| } |
| /** | |
| * (C) Copyright 2018 Paulo Vitor Sato Open Source Project | |
| * | |
| * Licensed under the Apache License, Version 2.0 (the "License"); | |
| * you may not use this file except in compliance with the License. | |
| * You may obtain a copy of the License at | |
| * | |
| * http://www.apache.org/licenses/LICENSE-2.0 | |
| * | |
| * Unless required by applicable law or agreed to in writing, software |
| import android.util.Log | |
| import com.paolo | |
| import kotlin.reflect.KClass | |
| /* Convenient wrappers over Android Log.* static methods */ | |
| /** Wrapper over [Log.i] */ | |
| inline fun <reified T> T.logi(message: String, onlyInDebugMode: Boolean = true, enclosingClass: KClass<*>? = null) = |
| public class ViewStubExt { | |
| /** | |
| * Deflates the view inflated by {@link ViewStub#inflate()} | |
| * and replace it with a new {@link ViewStub} in its parent. | |
| * | |
| * @param view the view lazily inflated previously | |
| * @return the new ViewStub with backed parameters | |
| * | |
| */ |
| inline fun <A> A.logWith(logger: Logger, block: Logger.(A) -> Unit) : A = | |
| this.also { logger.block(it) } | |
| // With interface injection | |
| interface HasLog { | |
| val log: Logger | |
| fun <A> A.log(block: Logger.(A) -> Unit) : A = | |
| logWith(logger, block) | |
| } |
| //Copy using arraycopy | |
| fun catTwoIntArrays1(array1 :IntArray, array2 :IntArray) : IntArray { | |
| val newArray = IntArray(array1.size + array2.size) | |
| System.arraycopy(array1, 0, newArray, 0 , array1.size) | |
| System.arraycopy(array2, 0, newArray, array1.size , array2.size) | |
| return newArray | |
| } | |
| //Copy using for loops | |
| fun catTwoIntArrays2(array1 :IntArray, array2 :IntArray) : IntArray { |
| import java.util.* | |
| @DslMarker | |
| annotation class CalendarDsl | |
| @CalendarDsl | |
| class CalendarBuilder(val calendar: Calendar) { | |
| fun dayOfMonth(function: () -> Int) = calendar.apply { set(Calendar.DAY_OF_MONTH, function()) } | |
| fun dayOfMonth(value: Int) = calendar.apply { set(Calendar.DAY_OF_MONTH, value) } |
| fun String.encodeBase64ToString(): String = String(this.toByteArray().encodeBase64()) | |
| fun String.encodeBase64ToByteArray(): ByteArray = this.toByteArray().encodeBase64() | |
| fun ByteArray.encodeBase64ToString(): String = String(this.encodeBase64()) | |
| fun String.decodeBase64(): String = String(this.toByteArray().decodeBase64()) | |
| fun String.decodeBase64ToByteArray(): ByteArray = this.toByteArray().decodeBase64() | |
| fun ByteArray.decodeBase64ToString(): String = String(this.decodeBase64()) | |
| fun ByteArray.encodeBase64(): ByteArray { | |
| val table = (CharRange('A', 'Z') + CharRange('a', 'z') + CharRange('0', '9') + '+' + '/').toCharArray() |