Andreas Sinz
10/13/2017, 12:50 PMA
and not an Integerfstn
10/13/2017, 1:39 PMassociateBy(keySelector = { it.getAttributeValue(“name”) }, valueTransform = { it.getAttributeValue(“value”) ?: “” })
ramonsgds
10/13/2017, 6:08 PMjormendez
10/14/2017, 9:14 PMfstn
10/15/2017, 11:22 AMMarkus Bergkvist
10/17/2017, 9:01 AModay
10/17/2017, 9:33 AMthis
, do I just cast this
to that View when I need to use the view, and use this
as is when I want to refer to the context?oday
10/17/2017, 12:07 PModay
10/17/2017, 12:07 PMlclc
10/17/2017, 12:21 PMAndroid75
10/17/2017, 3:53 PMferbeb
10/17/2017, 4:23 PMfstn
10/17/2017, 4:40 PMval validConditions = mutableListOf<ConditionalLink>()
val conditionalNextLink = node.nextLinks.map { it as ConditionalLink }
validConditions.addAll(
conditionalNextLink
.filter { it.condition.condition.isNotEmpty() && checker.check(it.condition, message.body()) }
)
if (validConditions.isEmpty()) {
validConditions.addAll(
conditionalNextLink
.filter { it.condition == Condition.ELSE }
)
}
val validConditionsAsResponse = validConditions
.onEach { eventBus.send(it.eventName, message) }
.map { it.condition }
message.reply(JsonObject().put("validConditions", validConditionsAsResponse))`
darych
10/17/2017, 7:31 PMfstn
10/18/2017, 6:45 AMMockito.`when`(flowNode.getInputParameter(“response”)).thenReturn(“re”)
fstn
10/18/2017, 9:24 AMval regex = Regex("""\bfuck\b""")
assertTrue(regex matches "ok fuck you")
there is no matchitsJoseph
10/20/2017, 8:52 AMSean Corfield
10/23/2017, 4:46 PMmiha-x64
10/23/2017, 7:14 PMUNUSED_VARIABLE
and UNUSED_PARAMETER
not worked.fstn
10/24/2017, 8:26 PMfred.deschenes
10/25/2017, 7:29 PMtrevjones
10/25/2017, 8:19 PMelect
10/26/2017, 3:01 PMinfix fun ArrayList<*>.resize(newSize: Int) {
when {
size > newSize -> for (i in newSize until size) pop()
newSize > size -> when(get(0)){
is Dbvt.StkNN -> for (i in size until newSize) add(Dbvt.StkNN())
is DbvtNode -> for (i in size until newSize) add(DbvtNode())
}
}
}
complains at add
Out-projected type 'kotlin.collections.ArrayList<*> /* = java.util.ArrayList<*> */' prohibits the use of 'public open fun add(element: E): Boolean defined in java.util.ArrayList```
bdawg.io
10/26/2017, 11:21 PMfilters[property]
if merging two nullable sets yields a non-empty set
1️⃣
val additional: Set<T>? = filterStates[requested]
if (additional is Set<*> && additional.isNotEmpty()) {
val current: Set<T>? = filters[property]
if (current is Set<*> && current.isNotEmpty()) {
filters[property] = current.plus(additional)
} else {
filters[property] = additional
}
}
2️⃣ filters[property].plusMaybe(filterStates[requested.value])?.let {
filters[property] = it
}
fun <T : Any> Set<T>?.plusMaybe(other: Set<T>?): Set<T>? = (this ?: emptySet()).plus(other ?: emptySet()).takeIf { it.isNotEmpty() }
karelpeeters
10/26/2017, 11:24 PMif (current is Set<*> && ...)
even do? Check whether it isn't null?Sean Corfield
10/27/2017, 6:09 PMkarelpeeters
10/29/2017, 3:26 PMmap
, filter
, ... operations on Sequence are lazy, while the same operations on Prateek
10/30/2017, 3:52 AMHexa
10/31/2017, 10:39 AMSean Corfield
11/02/2017, 4:09 AM