arve
01/17/2019, 2:04 PMBernhard
01/17/2019, 2:04 PMarve
01/17/2019, 2:04 PMBernhard
01/17/2019, 2:05 PMBernhard
01/17/2019, 2:05 PMuser
04/21/2020, 9:31 AMLeoColman
04/21/2020, 7:27 PMJitesh Dedhiya
04/22/2020, 1:40 PMcrummy
04/22/2020, 10:03 PMuser
04/23/2020, 3:30 PMwilliam
04/24/2020, 12:41 PMponzii
04/24/2020, 2:10 PMponzii
04/24/2020, 2:20 PMKrish
04/24/2020, 6:36 PMcom.apurebase:kgraphql:0.12.4
. I have added implementation "com.apurebase:kgraphql:0.12.4"
to my build.gradle in the same dependencies block as with my default ktor libraries.Krish
04/24/2020, 6:37 PMimport com.apurebase
doesn't resolve. I don't see it in my external libraries folder either. Aside from downloading the JAR myself and tossing it in there, how do I do this with Gradle?Krish
04/24/2020, 6:41 PMleandro
04/26/2020, 1:19 PMkotlin-css
?
style {
backgroundImage = Image("url(static/main.jpeg)")
}
I already have the following route defined:
static("static") {
resources("img")
}
(img being the directory inside my resources where main.jpeg
is)Brian Dilley
04/27/2020, 6:26 PMdata class GetCategoryAttributeResponse : CommonResponseParams
Brian Dilley
04/27/2020, 6:27 PMBrian Dilley
04/27/2020, 6:27 PMCommonResponseParams
needs to be an abstract data class
or not, or if that’s even possible.Brian Dilley
04/27/2020, 6:29 PMBrian Dilley
04/27/2020, 6:29 PMval / var
properties in it’s constructor, so you can’t pass values down into the parent’s constructor.Brian Dilley
04/27/2020, 6:30 PMabstract class Whatever(val length: Int)
data class SomeOther(val name: String, _len: Int) : Whatever(length = _len)
ie: that doesn’t workBrian Dilley
04/27/2020, 6:30 PMmuliyul
04/28/2020, 8:44 AMmelatonina
04/29/2020, 2:47 PMJoe
04/29/2020, 4:07 PMinline fun <reified T> lookupStringParser(): (String) -> T {
return when (T::class) {
String::class -> { x: String -> x }
Int::class -> { x: String -> String.toInt(x) }
// etc
} as (String) -> T // how to get rid of this cast?
}
usually on things like this i've had luck trying to "push down" the connection into something like a ClassParser<T>(val klass: KClass<T>, val parser: (String) -> T) but i can't quite figure out how to look one up without losing the exposed <T> (It is possible to create them at the use site, but that results in a lot of duplicated parameters where every instance that needs a specific class has to reference the parser instance directly instead of being able to infer it from the type paramter). In case I'm approaching this wrong and a different approach would be better, the context is that I have a String and a handle to a parametrized type (a jooq Field<T>), and want to parse/convert the string into the proper class so that typesafe things like field.eq(parsedValue)
(Field<T>.eq(value: T) work and are typesafe.sannysanoff
04/29/2020, 7:09 PM