jonathan
02/15/2018, 9:53 PMkotlin2js
plugin using Gradle's plugins DSL? e.g.
plugins {
id 'org.jetbrains.kotlin.js' version '1.2.21' // (doesn't work)
}
or similar?Martin Weigel
02/16/2018, 8:31 AModay
02/16/2018, 2:26 PModay
02/16/2018, 3:01 PMpaulblessing
02/16/2018, 3:07 PM?.let { ... } ?: ...
is exactly equivalent to if (not null) ... else ...
but that's just not true in a general case.rootandy
02/16/2018, 3:15 PMval notNullable = someNullable ?: return
jesjos
02/17/2018, 4:54 PMwineluis
02/19/2018, 10:52 AMkatien
02/20/2018, 6:14 AMkatien
02/20/2018, 6:22 AMelf
02/20/2018, 10:22 AMspand
02/20/2018, 12:41 PM540grunkspin
02/20/2018, 1:02 PModay
02/20/2018, 3:37 PMkatien
02/23/2018, 5:05 PMkatien
02/23/2018, 5:06 PMJeremy Rempel
02/23/2018, 5:23 PMIshan Khare
02/25/2018, 11:32 AMbuildscript {
ext.kotlin_version = '1.2.21'
repositories {
jcenter()
mavenCentral()
}
dependencies {
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
classpath "org.jetbrains.kotlin:kotlin-stdlib"
}
}
plugins {
id "org.jetbrains.kotlin.jvm" version "1.2.21"
}
sourceSets {
main.kotlin.srcDirs += "./"
}
I'm getting errors related to kotlin-stdlib
like
e: /home/ishan/code/kotlin-server/server/HttpRequest.kt: (8, 19): Unresolved reference: HashMap
e: /home/ishan/code/kotlin-server/server/HttpRequest.kt: (16, 38): Unresolved reference: split
e: /home/ishan/code/kotlin-server/server/HttpResponse.kt: (22, 31): Unresolved reference: toByteArray
e: /home/ishan/code/kotlin-server/server/HttpStatusCodes.kt: (3, 22): Unresolved reference: HashMap
e: /home/ishan/code/kotlin-server/server/HttpStatusCodes.kt: (3, 45): Unresolved reference: hashMapOf
oday
02/25/2018, 12:27 PMCodecriticon
02/26/2018, 8:54 AMdd
02/27/2018, 3:55 PMRuckus
02/28/2018, 4:34 AMwweofnowifmnwnkef
02/28/2018, 5:09 AModay
03/01/2018, 6:25 PModay
03/02/2018, 9:28 AMcreated_at
where created_at
is like "Fri, 16 Feb 2018 10:24:59 GMT"
oday
03/02/2018, 9:35 AMTristan Caron
03/02/2018, 11:10 AMassociateBy
on multiple level? Maybe not clear..
So I have something like
val list = listOf(listOf("value1", "value2", "value3"))
If I do use the method associateBy
, I will get the fellowing output
println(list.associateBy { it[0] })
// {value1=[value1, value2, value3]}
And I would like something like:
{value1={value2=[value1, value2, value3]}}
Is it possible?karelpeeters
03/02/2018, 11:15 AMlist.associateBy { it.first }.mapValues { k,v -> v.associateBy { it.second }}
Ishan Khare
03/02/2018, 5:29 PMvar a = "\d+"
i get the correct output \d+
(that i can further use to create a regex Patter)
is this due to the way String::replace
works?
if so, isn't this a bug, why is it removing my escape sequences?Rich Gabrielli
03/02/2018, 9:19 PMRich Gabrielli
03/02/2018, 9:19 PMdgngulcan
03/02/2018, 11:01 PMRich Gabrielli
03/02/2018, 11:19 PM