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
data class Group(val matches: Boolean, val testedVersions: MutableList<String>) { | |
val range: String get() = "[${testedVersions.first()} - ${testedVersions.last()}]" | |
} | |
fun main() { | |
val major = 2 | |
val minor = 62 | |
val patch = 103 | |
println("Input version: $major.$minor.$patch") |
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
@file:OptIn(ExperimentalSerializationApi::class) // buildSerialDescriptor requires this annotation | |
package com.sumup.oms.pos.configuration | |
import kotlinx.serialization.Contextual | |
import kotlinx.serialization.ExperimentalSerializationApi | |
import kotlinx.serialization.InternalSerializationApi | |
import kotlinx.serialization.Polymorphic | |
import kotlinx.serialization.Serializable | |
import kotlinx.serialization.builtins.serializer |
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
document$.subscribe(() => { | |
// this executes after each navigation | |
alert(25) | |
}) | |
function greg(){ | |
alert(33); | |
} |
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 android.database.sqlite.SQLiteAbortException | |
import android.database.sqlite.SQLiteAccessPermException | |
import android.database.sqlite.SQLiteBindOrColumnIndexOutOfRangeException | |
import android.database.sqlite.SQLiteBlobTooBigException | |
import android.database.sqlite.SQLiteCantOpenDatabaseException | |
import android.database.sqlite.SQLiteConstraintException | |
import android.database.sqlite.SQLiteDatabaseCorruptException | |
import android.database.sqlite.SQLiteDatabaseLockedException | |
import android.database.sqlite.SQLiteDatatypeMismatchException |
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 ExportCompilerTest { | |
@Test | |
fun classWithOneVal() { | |
assertCompilationOutput( | |
""" | |
package foo.bar | |
import deezer.kmp.Export | |
@Export | |
class BasicClass(val id: String) |
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.glureau | |
import android.content.res.Configuration.UI_MODE_NIGHT_NO | |
import android.content.res.Configuration.UI_MODE_NIGHT_YES | |
import androidx.compose.foundation.ExperimentalFoundationApi | |
import androidx.compose.foundation.background | |
import androidx.compose.foundation.layout.aspectRatio | |
import androidx.compose.foundation.lazy.GridCells | |
import androidx.compose.foundation.lazy.LazyVerticalGrid | |
import androidx.compose.material.MaterialTheme |
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 glureau.frameradar | |
import android.content.Context | |
import android.graphics.Canvas | |
import android.graphics.Color | |
import android.graphics.Paint | |
import android.util.AttributeSet | |
import android.view.View | |
import java.util.* |
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
/** | |
* Returns the URL of a hyperlinked cell, if it's entered with hyperlink command. | |
* Supports ranges | |
* @param {A1} reference Cell reference | |
* @customfunction | |
*/ | |
function linkURL(reference) { | |
var sheet = SpreadsheetApp.getActiveSheet(); | |
var formula = SpreadsheetApp.getActiveRange().getFormula(); | |
var args = formula.match(/=\w+\((.*)\)/i); |
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 of AutoSizeConfiguration | |
* | |
* 1 - We cannot setTextSize without disabling autosize (or use Reflection but way more fragile...) | |
* 2 - Disabling autosize reset all values and attrs is not re-parsed so data is lost. | |
* Due to these 2 reasons, we need a way to keep track of the previous values to restore them when required. | |
* | |
* The solution is to store in a static map a weak reference of the view and an AutoSizeConfiguration data class. | |
* So if there is no data available (first usage or first view destroyed and recreated), | |
* we store the attributes in our data class, and if there is already a data class, we re-use them. |
NewerOlder