xenoterracide
12/31/2018, 9:52 AMxenoterracide
12/31/2018, 10:27 AM@SpringBootApplication
class BlogApplication
fun main(args: Array<String>) {
runApplication<BlogApplication>(*args)
}
what does the *
do?user
12/31/2018, 11:50 AMs1m0nw1
12/31/2018, 1:06 PMmikehearn
12/31/2018, 4:41 PMdave08
12/31/2018, 4:57 PMArray<String>::class.java
? Is that the same as String[].class
?Ivan
01/01/2019, 5:02 AMList<List<T> slideBy(Function<T, ?> classifier) {...
How do I do this in Kotlin. I tried fun <T> slideBy(list: List<T>, function: (T) -> *): List<List<T>> = TODO()
but apparently that’s not legal. Should I do fun <T> slideBy(list: List<T>, function: (T) -> Any?): List<List<T>> = TODO()
Kotlinger
01/02/2019, 4:00 PMgaspard
01/02/2019, 4:01 PMScott Dillender
01/02/2019, 6:41 PMnewFixedThreadPoolContext
but that's deprecated. I've also tried a fixed sized channel, but I have to create the coroutines as async(start=LAZY) and then await them one by one if I do a fold or a map.jlleitschuh
01/02/2019, 8:34 PM.gradle.kts
file.
https://github.com/gradle/kotlin-dsl/issues/1305Nikky
01/02/2019, 11:12 PMNikky
01/02/2019, 11:25 PMvngantk
01/03/2019, 2:37 AMnkiesel
01/03/2019, 7:03 AMtry/catch
in init blocks to initialize immutable (i.e. val
) class properties? Right now I use
class Foo(val a: Int) {
val b: Int
init {
var bb: Int
try {
bb = complicated(a)
catch (e: Excepetion) {
bb = fallback()
}
b = bb!!
}
Saiedmomen
01/03/2019, 4:44 PMghedeon
01/03/2019, 11:39 PMtipsy
01/04/2019, 8:47 AM(Something) -> Unit
?ghedeon
01/04/2019, 11:36 AMinternal
? I really believe it was a mistake not having it.hallvard
01/04/2019, 1:18 PMvar f: Long = 5
, and in the course of my program, the value changes. And then I would like this check: if (f == 10000) { ... }
. Why is it that it doesn't compile? Why do I need to supply an L to the hard-coded constant 10000
here? Shouldn't it be possible for the compiler to detect that 10000
is valid as a Long value?lupajz
01/04/2019, 1:26 PMDan24
01/04/2019, 1:42 PMtjb
01/04/2019, 3:26 PMcleishm
01/04/2019, 6:22 PMDalinar
01/04/2019, 6:59 PMbreandan
01/04/2019, 11:26 PM()
operator seems straightforward, but the more I think about it, the more confused I am: https://stackoverflow.com/q/54045644/1772342Paul N
01/04/2019, 11:41 PMFrancesco megna
01/05/2019, 1:03 PMPaul N
01/06/2019, 9:34 PMjkbbwr
01/06/2019, 11:41 PMjkbbwr
01/06/2019, 11:41 PMDominaezzz
01/06/2019, 11:41 PMjkbbwr
01/06/2019, 11:41 PMDominaezzz
01/06/2019, 11:42 PM