tschuchort
12/22/2018, 6:23 PMghedeon
12/22/2018, 11:07 PMSrSouza
12/22/2018, 11:40 PMotakusenpai
12/23/2018, 7:29 AMvar board = Array(row,{IntArray(col)})
Rohan Maity
12/23/2018, 12:48 PMjdemeulenaere
12/23/2018, 4:24 PMJoris PZ
12/23/2018, 8:15 PMdave08
12/24/2018, 11:59 AMAn exception occurs during Evaluate Expression Action : com.sun.tools.jdi.ClassTypeImpl cannot be cast to com.sun.jdi.ArrayType
?rrader
12/24/2018, 1:08 PMrobinchew
12/24/2018, 8:17 PMval f: (Context) -> View = ::TextView
val text = f(activity)
how do I check that text
is an 'instance' of f
?octylFractal
12/25/2018, 12:15 AMabstract var
properties? I have this:
sealed class Tag<T> { // note: TagId/SongId classes are inline
abstract var id: TagId
abstract var songId: SongId
abstract var data: T
}
but it only generates a setter for data
. the other two only have gettersking_marquant
12/25/2018, 3:09 AMkarelpeeters
12/25/2018, 11:06 AMDico
12/25/2018, 11:43 AMCzar
12/25/2018, 12:41 PM@Entity class MyEntity(val id: Long?, ...)
val myEntity = myEntityRepository.getById(1L)
// fun useMyEntityId(id: Long) {...}
useMyEntityId(checkNotNull(myEntity.id)) // check here is logically unnecessary, since entity retrieved from database will always have id
I'm asking in general, but if there is anything specific for Spring Boot and Hibernate, that would be also interesting.karelpeeters
12/25/2018, 12:58 PMclass Entity<D: Int?>(val id: D)
and then keep the nullability in the type throughout the code.Czar
12/25/2018, 12:59 PM@Entity
class MyEntity {
@Id
private val _id: Long? = null
@Transient
val id: Long
get () = checkNotNull(_id) { "Should not try to retrieve ID of an entity before it is persisted" }
}
Czar
12/25/2018, 1:05 PMlateinit
doesn't work with primitive types anywayDico
12/25/2018, 4:13 PMvar hasId: Boolean = false
var id: Long = 0L
get() = TODO()
octylFractal
12/25/2018, 7:07 PMCzar
12/26/2018, 8:26 AM// hibernate is used for illustration, because it recommends to use nullable IDs for entities
val entity: MyEntity = hibernateRepository.requireEntityById("some-id")
private fun String.doSomethingWithId()
// 1
checkNotNull(entity.id).doSomethingWithId()
// 2
entity.id!!.doSomethingWithId()
gildor
12/26/2018, 8:27 AMval entity = hibernateRepository.getEntityById("some-id") ?: error("some-id is null")
marcinmoskala
12/26/2018, 8:36 AMKClass
from KType
?jgodort
12/26/2018, 12:27 PMMatt Spain
12/26/2018, 3:15 PMAndrew Gazelka
12/26/2018, 6:00 PMgetMemoryUsed()
outside the class as it functions as a util fun?Andrew Gazelka
12/27/2018, 3:01 AMotakusenpai
12/27/2018, 4:25 AMfor(m in 0..(8-x))
for(n in 0..(8-y)) {
if(board.board[m][n].group != this.group) {
}
}
All I want is that the 2d array should have the ability to increase or decrease its row and column....without a for loop. Thnxhhariri
12/27/2018, 10:46 AMxenoterracide
12/27/2018, 6:20 PMrepositories = modules.map { it to "<mailto:git@bitbucket.org|git@bitbucket.org>:my/${it}.git" } .toMap()
xenoterracide
12/27/2018, 6:20 PMrepositories = modules.map { it to "<mailto:git@bitbucket.org|git@bitbucket.org>:my/${it}.git" } .toMap()
mkobit
12/27/2018, 6:26 PMtodd.ginsberg
12/27/2018, 6:36 PMassociateWith
that makes this nicer...
repositories = modules.associateWith { "<mailto:git@bitbucket.org|git@bitbucket.org>:/my$it.git"}
Steven McLaughlin
12/27/2018, 6:36 PMit
with whatever is in that lambda?todd.ginsberg
12/27/2018, 6:45 PM