basher
02/10/2019, 5:37 PMreik.schatz
02/11/2019, 1:00 PMval items = Arrays.asList("a", "b", "c")
// doesn't compile because it is Stream<String?>!
val stream: Stream<String> = items
.stream()
.map { item ->
// call that returns nullable, i.e. String?
}
.filter(Objects::nonNull)
utikeev
02/11/2019, 1:20 PMname
and age
variables?thana
02/11/2019, 4:04 PMTarget Platform
from the Kotlin facet in my intellij instance which results in annoying reports from kotlin that somthing isn't availble on platform 1.6tekjar
02/11/2019, 5:50 PMdumptruckman
02/11/2019, 8:08 PMvar talentName: String = NameDisplayFormatterFactory.getNameFormatterInstance(SPACE_DELIMITED_FORMATTER, locale)
.formatName(talent.firstName, talent.middleName, talent.lastName, talent.nameTitle, talent.nameSuffix)
talentName = if (order.w2Order.orElse(false)) order.icName.orElse(talentName) else talentName
xenoterracide
02/11/2019, 8:55 PM@Value("${spring.artemis.host}:${spring.artemis.port}"
kotlin says string must be a compile time constant, this should be valid in java, how do I write it in kotlin?Viet Hoang
02/12/2019, 1:46 AM::class
and .javaClass.kotlin
? And why is that in below example, the later declaration works but the prior doesn’t ?
class Test {
fun testMethod() {
this::class.memberProperties.forEach { println(it.get(this)) } // compile error
this.javaClass.kotlin.memberProperties.forEach { println(it.get(this)) }
}
Kulwinder Singh
02/12/2019, 7:09 AMinline
classes in production android app ?,because its in experimentallandoulsi
02/12/2019, 7:59 AMMockk
library on the common module test: MyTest.kt: (74, 9): Unresolved reference: every
, does any one can help with this ?karelpeeters
02/12/2019, 9:56 AMInt
as the first argument that's basically a bitset of parameters that were actually passed.arve
02/12/2019, 10:04 AMfun getFilm(title: String): Film {
val data = db.getFilm(title)
return data.copy(actors = data.actors.filterNot { it.isDead) })
}
Is there a way to avoid the temp variable without hitting the db twice? Or put differently, is there a way of referencing the source object in a copy operation somehow?
Ideally I'm looking for something like fun getFilm(t: String) = db.getFilm(t).copy(actors = actors.filterNot { it.isDead })
I'm aware of with
, but in cases like this, with
feels even more convoluted.gildor
02/12/2019, 10:09 AMelect
02/12/2019, 10:09 AMlateinit
on inline classes (which is forbidden) which workarounds exist other than nullability?Davide Giuseppe Farella
02/12/2019, 10:20 AMdrawer = Panel()
2 I don’t wanna leave Panel
open only for class Drawer(): Panel()
thana
02/12/2019, 10:39 AM(String) -> Any
. Shouldnt it be possible then, to pass this::someMethod
if it takes a string and returns something?jw
02/12/2019, 4:18 PMval sPayload = payload?.let(::String)
Andrew Gazelka
02/12/2019, 5:48 PMGarouDan
02/12/2019, 6:43 PM.circleci/config.yml
file to put it to work?
version: 2
jobs:
build:
docker:
- image: circleci/<language>:<version TAG>
steps:
- checkout
- run: ./gradlew clean build
Specially I don’t know what I could use in the place of:
docker:
- image: circleci/<language>:<version TAG>
Does anyone have a suggestion of a pre-build docker image or some other configuration?SOFe
02/13/2019, 6:47 AMHexa
02/13/2019, 5:23 PMdata class Message(val message: String? = null)
M Jones
02/13/2019, 9:51 PMjw
02/13/2019, 9:55 PMM Jones
02/13/2019, 9:57 PMpavel
02/13/2019, 11:58 PMJoe
02/14/2019, 1:15 AMlistOf(listOf(newElement), existingList).flatten()
but that's a bit cumbersome. realized I can do listOf(newElement).union(existingList)
, but that gives a Set
instead of a List
, which isn't always desired.PHondogo
02/14/2019, 5:13 AMsitepodmatt
02/14/2019, 5:18 AMsafa
02/14/2019, 12:09 PMcarlos cdmp
02/14/2019, 12:39 PMclass A{
private object O{
const val someConstant = 1
}
}
The object has some kind of lifecycle attached to the A class or is it created at the beggining no matter if A will be created or not?carlos cdmp
02/14/2019, 12:39 PMclass A{
private object O{
const val someConstant = 1
}
}
The object has some kind of lifecycle attached to the A class or is it created at the beggining no matter if A will be created or not?gildor
02/14/2019, 1:24 PMcarlos cdmp
02/14/2019, 2:43 PMkarelpeeters
02/14/2019, 3:20 PMinit
of course it runs at some point and so there's a lifecycle.