Hullaballoonatic
09/20/2018, 3:21 PMHullaballoonatic
09/20/2018, 6:41 PMkarelpeeters
09/20/2018, 6:58 PMrepeat
when you actually use the index, it reads wrong to me. So I'd replace that with a for loop instead. I always like the StringBuilder
/ apply
combo, so that's fine IMO.Hullaballoonatic
09/21/2018, 2:13 AMMarkchous
09/21/2018, 2:57 PM1.3-M2
so I can mess around with Coroutines 0.26.0
, but I'm getting this error:
Could not find org.jetbrains.kotlin:kotlin-gradle-plugin:1.3-M2.
Searched in the following locations:
<https://dl.google.com/dl/android/maven2/org/jetbrains/kotlin/kotlin-gradle-plugin/1.3-M2/kotlin-gradle-plugin-1.3-M2.pom>
<https://dl.google.com/dl/android/maven2/org/jetbrains/kotlin/kotlin-gradle-plugin/1.3-M2/kotlin-gradle-plugin-1.3-M2.jar>
<https://jcenter.bintray.com/org/jetbrains/kotlin/kotlin-gradle-plugin/1.3-M2/kotlin-gradle-plugin-1.3-M2.pom>
<https://jcenter.bintray.com/org/jetbrains/kotlin/kotlin-gradle-plugin/1.3-M2/kotlin-gradle-plugin-1.3-M2.jar>
Required by:
project :
am
09/22/2018, 6:36 AMNikky
09/22/2018, 7:47 PMHullaballoonatic
09/22/2018, 8:37 PMShawn
09/23/2018, 12:03 AMursus
09/23/2018, 12:04 AMShawn
09/23/2018, 10:01 PMotakusenpai
09/24/2018, 2:22 AMHullaballoonatic
09/24/2018, 8:04 PMkarelpeeters
09/25/2018, 7:17 AM3, else
is just else
right?poohbar
09/25/2018, 8:00 PMjacksonObjectMapper().convertValue("{\"name\":\"Jack\",\"age\":7}", Dog.class)
data class Dog(
val name: String,
val age: Int
)
doing:
objectMapper.convertValue<Dog>("{\"name\":\"Jack\",\"age\":7}")
throws:
Cannot construct instance of `com.example.Dog` (although at least one Creator exists): no String-argument constructor/factory method to deserialize from String value ('{"name":"Jack","age":7}')
at [Source: UNKNOWN; line: -1, column: -1]
ValV
09/25/2018, 11:28 PMCannot use 'CapturedTypeConstructor(out ObjectProperty<Any>)' as reified type parameter
?ValV
09/26/2018, 4:18 PMStringConverter<T>
with another parametric classValV
09/26/2018, 6:26 PMout Any
cannot be passed as reified
, can it? When my code passes <SomeType, out Any>
as <S, reified T>
matt tighe
09/26/2018, 7:41 PMHashMap
and sort it by its keys, but i only really care about having a specific key at the beginning, the rest of them don’t matter. something like
val myHashMap = HashMap<String, Int>
myHashMap.put("hello", 0)
myHashMap.put("world", 1)
val sorted = myHashMap.toSortedMap(compareBy { it == "world" })
can anyone help me figure out how to do that?Nikky
09/26/2018, 9:30 PMSam
09/26/2018, 10:28 PMgetFilteredList<Int>( list, List<Any?>::testFilterType )
private fun <T> List<Any?>.testFilterType() : List<Any?> {
val filteredList = mutableListOf<Any?>()
forEach {
filteredList.add( it )
}
return filteredList
}
private fun <T> getFilteredList( list : List<Any?>, filter : List<Any?>.() -> List<Any?> ) : List<Any?> {
return list.filter()
}
Pat
09/27/2018, 7:28 AMCamilleBC
09/27/2018, 10:22 AMSam
09/27/2018, 3:34 PMkarelpeeters
09/27/2018, 3:36 PMValV
09/28/2018, 1:08 AMCamilleBC
09/28/2018, 1:36 PMval boolToString = if (boolean) "1" else "0"
kaizo
09/28/2018, 2:43 PMkaizo
09/28/2018, 2:47 PMJukka Siivonen
09/28/2018, 3:36 PMJukka Siivonen
09/28/2018, 3:36 PMAlowaniak
09/28/2018, 3:47 PM