evkaky
05/31/2017, 8:08 AMval listOfNumbers = "text 123 and more text 456".someKindOfMap { Regex("\\d+") }
dmitry.kankalovich
05/31/2017, 1:16 PMkagomez
06/01/2017, 4:59 AMtipsy
06/01/2017, 6:26 PMorangy
06/01/2017, 6:50 PMbjornicus
06/02/2017, 3:58 AMalvico
06/02/2017, 9:37 AMtipsy
06/02/2017, 7:05 PMkingsley
06/03/2017, 7:43 AMval handler: Handler = { req, res -> res.body("Hello") }
Is it bad practice? To declare lambdas? No, it's perfectly fine.suresh
06/03/2017, 6:28 PMval tuple = "key=value".split("=")
val pair = when {
tuple.size > 1 -> tuple[0] to tuple[1]
else -> tuple[0] to ""
}
abanoub.wagdy91
06/03/2017, 10:36 PMtipsy
06/04/2017, 8:24 AMtipsy
06/04/2017, 10:54 AM@FunctionalInterface
public interface ErrorHandler {
void handle(Request request, Response response);
}
i have typealias ErrorHandler = (request : Request, response : Response) -> Unit
which seems to work fine, except for when i try to call it in java
error(500, (req, res) -> {
// return type expected
});
can i make this work in both languages somehow? (it used to work fine when the project was all java)bachhuberdesign
06/04/2017, 3:45 PMprivate var disposable: CompositeDisposable = CompositeDisposable()
any different than private lateinit var disposable: CompositeDisposable
init {
disposable = CompositeDisposable()
}
kagomez
06/06/2017, 3:09 AM\d
tipsy
06/06/2017, 4:03 PMDo you have incremental builds enabled?i can't find that setting
menegatti
06/07/2017, 9:49 AMfun <T1 : Any, T2 : Any, T3 : Any, T4: Any, T5: Any, R: Any> safeLet(p1: T1?, p2: T2?, p3: T3, p4: T4, p5:T5, block: (T1, T2, T3, T4, T5) -> R?): R? {
return if (p1 != null && p2 != null && p3 != null && p4 != null && p5 != null) block(p1, p2, p3, p4, p5) else null
}
kirillrakhman
06/07/2017, 1:24 PMevkaky
06/07/2017, 1:25 PMORDER BY name ASC, age DESC
?
I tried something like this, but second sort function completely override previous order
persons.sortedBy { it.name }.sortedByDescending { it.age }
elect
06/07/2017, 2:32 PMrects.sortWith(Comparator { a, b -> ... })
and I'd like to declare Comparator
somewhere elsewitoldsz
06/07/2017, 7:44 PMKotlin = everyone must switch to Idea
, I mean every team member.juan.hurtado
06/07/2017, 10:06 PMmiha-x64
06/08/2017, 9:54 AMinvoke()
? e. g.
class SomeAction : ()->?!?!? {
override fun invoke <T> (): T {
return ...
}
}
elect
06/08/2017, 4:40 PMnull as Node?
did the trickwitoldsz
06/08/2017, 8:37 PMakperkins1
06/08/2017, 8:38 PMiurysouza
06/09/2017, 1:00 AMvmichalak
06/09/2017, 6:02 AMdragas
06/09/2017, 10:33 AMs952163
06/09/2017, 12:41 PMs952163
06/09/2017, 12:41 PMpoohbar
06/09/2017, 2:06 PMs952163
06/09/2017, 2:24 PMkirillrakhman
06/09/2017, 2:26 PMdalexander
06/09/2017, 2:31 PMelizarov
06/09/2017, 2:39 PMpoohbar
06/09/2017, 5:55 PMdata class
is not magic? If you don't know Java it makes no sense what it actually does.elizarov
06/09/2017, 6:34 PM