wollnyst
01/29/2019, 2:20 PMkotlinx.io.core.ByteReadChannel
to a kotlinx.io.core.BytePacketBuilder
? From reading the code the both do similar things.Nicholas Bilyk
01/29/2019, 3:45 PMhalirutan
01/29/2019, 5:40 PMbuild.gradle
to build.gradle.kts
. If I use the official release version of the gradle-intellij-plugin, everything works out and I can simply include it by using
plugins {
id("org.jetbrains.intellij") version "0.4.2"
id("java")
}
However, I need to use the latest snapshot version of this for Gradle 5.1.1, so I re-wrote this Groovy code
buildscript {
repositories {
mavenCentral()
maven {
url "<https://oss.sonatype.org/content/repositories/snapshots/>"
}
maven {
url '<http://dl.bintray.com/jetbrains/intellij-plugin-service>'
}
}
dependencies {
classpath "org.jetbrains.intellij.plugins:gradle-intellij-plugin:0.5.0-SNAPSHOT"
}
}
apply plugin: 'org.jetbrains.intellij'
to
buildscript {
repositories {
mavenCentral()
maven("<https://oss.sonatype.org/content/repositories/snapshots/>")
maven("<http://dl.bintray.com/jetbrains/intellij-plugin-service>")
}
dependencies {
classpath("org.jetbrains.intellij.plugins:gradle-intellij-plugin:0.5.0-SNAPSHOT")
}
}
plugins {
id("org.jetbrains.intellij") version "0.5.0-SNAPSHOT"
id("java")
}
neil
01/29/2019, 6:18 PMDavide Giuseppe Farella
01/29/2019, 10:20 PMclass MyClass {
fun CoroutineScope.run()
}
MyClass
become the context of run()
, while CoroutineScope
become the "owner".
That makes sense... But what I want the opposite effect?
Sometimes I use this pattern
class Mapper<E, P> {
fun <T> invoke( block: Mapper.() -> T ): T
fun E.toPojo(): P
fun P.toEntity(): E
}
And makes sense that Mapper
is the context for call mapper { entity.toPojo() }
But back to the first example, doesn't make sense to call
launch {
with( myObj ) { run() }
}
I would simply call
launch {
myObj.run()
}
Is that possibile?Jeff Thomas
01/29/2019, 10:36 PMDmytro Danylyk
01/30/2019, 5:24 AMBernhard
01/30/2019, 8:54 AMbodiam
01/30/2019, 9:15 AMNarek Mailian
01/30/2019, 2:55 PMxenoterracide
01/30/2019, 6:42 PMJoe
01/30/2019, 11:10 PMeq()
method -- i need the same cast if i change it to <out Any>, and if i change it to <in Any> the createCondition()
function works but I can't invoke it in `main()`:
data class ConditionData<T>(
val field: Field<T>,
val value: String,
val transform: (String) -> T
)
fun createCondition(vararg things: ConditionData<*>): Condition {
return things
.map {
val value = it.transform.invoke(it.value)
(it.field as Field<Any>).eq(value)
}
.reduce { a, b -> a.and(b) }
}
fun main() {
print(
createCondition(
ConditionData(DSL.sum(Tables.DATA.WATCH_TIME), "1234567.234") { s -> BigDecimal(s) },
ConditionData(Tables.DATA.MONTH, "2018-07-01") { s -> LocalDate.parse(s) },
ConditionData(Tables.DATA.CHANNEL, "HBO") { s -> s }
)
)
}
output of the main is correct:
(
sum("data"."watch_time") < 1234567.234
and "data"."month" < date '2018-07-01'
and "data"."channel" < 'HBO'
)
4ntoine
01/31/2019, 5:50 AMpatterns.ini
file is in resources (jvmTest) but i can't load it - getResourceAsStream()
returns null
4ntoine
01/31/2019, 6:03 AMthis.javaClass.classLoader.getResourceAsStream("patterns.ini")
and put patterns.ini
in the package of class in resources
- nothing helpsAlexey Pushkarev
01/31/2019, 9:42 AMGarouDan
01/31/2019, 1:45 PMVue.js
official plugin is not supported anymore in IntelliJ 2018.3.3?Dalinar
01/31/2019, 2:16 PMTsvetozar Bonev
01/31/2019, 3:33 PMBenoît
01/31/2019, 4:31 PMxenoterracide
01/31/2019, 10:07 PMgeekGuy
02/01/2019, 1:16 AMNikky
02/01/2019, 3:04 AMmuralimohan962
02/01/2019, 5:37 AMedwardwongtl
02/01/2019, 8:26 AMList
method in stdlib which converts [1, 2, 3, 4]
into [[1, 2], [2, 3], [3, 4]]
?Marc Knaup
02/01/2019, 10:48 AMkotlinp
library? 😄guppyfaced
02/01/2019, 11:40 AMdata class
using parameters? I'm thinking of doing it with a map of values, but if there's a constructor method I could call, that would be great.Benoît
02/01/2019, 2:12 PMsnowe
02/01/2019, 9:43 PMjameskleeh
02/02/2019, 7:01 AMsuper.method()
, but I keep getting unresolved reference. Any tips are appreciated