Andell Marsh
03/02/2020, 7:44 PMAndell Marsh
03/03/2020, 5:01 PMAjeet Pratap
04/03/2020, 6:12 PMMgkaki
06/02/2020, 7:12 AMdependencies {
val swaggerVersion = "2.9.2"
val hikaricpVersion = "3.3.1"
val typesafeVersion = "1.4.0"
val kotlinloggingVersion = "1.7.9"
val modelMapperVersion = "2.3.7"
subprojects.forEach {
if( it.name != "common" ) {
implementation(project(it.path)) {
dependencies {
implementation(project(":common"))
}
}
} else {
implementation(project(":common"))
}
}
implementation("com.zaxxer:HikariCP:${hikaricpVersion}")
implementation("org.springframework.boot:spring-boot-starter-web")
::::
}
I trid this but it(internal) don't import common modules as a dependency.
settings.gradle.kts
rootProject.name = "gia"
include("common", "internal")
blue
07/26/2020, 9:10 PMvar
) property during declaration?
*T*he study material says -
full syntax for any property in Kotlin:
var <propertyName>[: <PropertyType>] [= <property_initializer>]
[<getter>]
[<setter>]
Initializer, getter, and setter are optional here, but you need to initialize your variable if you don’t want to specify its type. Otherwise, the compiler will warn you.But my code snippet is throwing compile error. Did I miss something?
class User {
var firstName: String
var lastName: String
}
Remon Shehata
08/24/2020, 1:56 PMsealed class ParentClass
data class ClassA(fieldInClassType: Int) : ParentClass()
data class ClassB(fieldInClassType: Int) : ParentClass()
I have list of ClassA and ClassB and I want to create a generic method to sort them. This is what I have now
private fun <T: ParentClass>foo(data: List<T>, classType: Class<T>){
val list = data as classType
list.sortedBy{it.fieldInClassType}
}
bjonnh
10/22/2020, 8:12 PMSaul Wiggin
10/29/2020, 12:22 PMauth.signInWithEmailAndPassword(email, password)
.addOnCompleteListener(this) { task ->
if (task.isSuccessful) {
// Sign in success, update UI with the signed-in user's information
Log.d(TAG, "signInWithEmail:success")
val user = auth.currentUser
updateUI(user)
} else {
// If sign in fails, display a message to the user.
Log.w(TAG, "signInWithEmail:failure", task.exception)
Toast.makeText(baseContext, "Authentication failed.",
Toast.LENGTH_SHORT).show()
updateUI(null)
// ...
}
// ...
}
Saul Wiggin
10/29/2020, 12:22 PMrtsketo
11/09/2021, 10:28 AMpew()
in class A
(not as a companion object) and still be able to type b.pew().pew2()
(not b.apply { pew().pew2() }
)?Magda Miu [MOD]
02/04/2022, 9:13 AMdannykivoto
10/06/2022, 3:20 PMjamescodingnow
11/12/2022, 12:36 AMAbidin Burak Şahin
04/02/2024, 11:49 AMAbidin Burak Şahin
05/21/2024, 10:27 AMMelchior Grutzmann
01/10/2025, 1:38 PMMelchior Grutzmann
03/16/2025, 5:16 PMwalid
04/01/2025, 4:38 PMMelchior Grutzmann
04/06/2025, 10:18 AM