adam-mcneilly
12/02/2018, 6:37 AMfor (firstIndex in (0..inputs.size - 2)) {
for (secondIndex in (firstIndex + 1..inputs.size - 1)) {
val firstInput = inputs[firstIndex]
val secondInput = inputs[secondIndex]
...
}
}
gabin
12/02/2018, 12:26 PMfebs
12/02/2018, 7:29 PMAdam Hurwitz
12/04/2018, 5:03 AMCamilleBC
12/05/2018, 10:32 AMNicolas Pittion-Rossillon
12/06/2018, 1:10 PMkarelpeeters
12/07/2018, 12:49 AM.asSequence()
poohbar
12/07/2018, 2:15 AMAndreas Sinz
12/07/2018, 4:26 PMfebs
12/09/2018, 6:59 AMSlackbot
12/09/2018, 3:31 PMfebs
12/09/2018, 9:06 PMShan
12/09/2018, 9:09 PManything that extends x
? For example I have a data class here (using tornadofx library, it provides the ViewModel class) which I would like for the lamda to take anything which extends a ViewModel. data class CustomMenuItem (val name: String, val action: (E ? extends ViewModel) -> Unit)
febs
12/10/2018, 7:34 AMWith Java, in-memory data “storage” comes in four shapes: variables, parameters, fields, and constants, in order of scope.
With Kotlin, parameters are similar with a few variations. They are final (so they cannot be assigned a new value), can have a default value (so we can omit > them when calling it) and their names matter (as we can use them when invoking).
Now, for the other three, things are more different. As in, they are all defined as properties.I understood that properties are related to objects/classes (and they might have a backing field), but if I declare a val or var in a function then that is a variable Am I correct? Or wrong? Thank you 🙏
febs
12/10/2018, 8:19 AMnestserau
12/10/2018, 10:25 AMenum Optional<T> {
case None
case Some(T)
}
itnoles
12/10/2018, 9:10 PMAndreas Sinz
12/10/2018, 9:18 PMRobert
12/10/2018, 9:24 PMcompanion object {
private val log = LoggerFactory.getLogger(MyClass::class) // TODO
Robert
12/10/2018, 10:49 PMjava.etc
java turns red and is unresolved. I'm using gradle in IntelliJ IDEA CE. This is my multiplatform gradle file: https://gist.github.com/RdeWilde/eee5e77880971f77ee61518a5b447d7d Is there anything that i am missing?dvlwj
12/11/2018, 3:30 AMcontext
in the presenter
, what i need to do?
i need to make http request
with the data
in shared preference
Robert
12/11/2018, 8:22 PMOlivier
12/12/2018, 8:59 AMdvlwj
12/13/2018, 2:23 AModay
12/13/2018, 4:40 PModay
12/13/2018, 5:44 PMMike
12/14/2018, 12:03 PMblogscot
12/14/2018, 3:07 PMGiulio
12/15/2018, 5:50 PMpoohbar
12/16/2018, 3:26 PMlist.map {
if (condition) {
42
}
0
}
I am used to not doing else branches in Java when not needed but it seems like here I get a list of zeros if I don't put the 0 into an else branch. 🤔 Has this bitten anyone before?