This file contains hidden or 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 kotlin.math.min | |
fun levenshtein(lhs : CharSequence, rhs : CharSequence) : Int { | |
if(lhs == rhs) { return 0 } | |
if(lhs.isEmpty()) { return rhs.length } | |
if(rhs.isEmpty()) { return lhs.length } | |
val lhsLength = lhs.length + 1 | |
val rhsLength = rhs.length + 1 |
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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); |
NewerOlder