Menu
Menu
DaniWeb
Log In
Sign Up
Read
Contribute
Meet
Search
Search
About 77 results for
kotlin
- Page 1
Kotlin equivalence of Java try-with-resource statement
Programming
Software Development
3 Years Ago
by dimitrilc
…; repositories { mavenCentral() } dependencies { testImplementation(
kotlin
("test")) } tasks.test { useJUnitPlatform…for us. ##
Kotlin
`use()` function ##
Kotlin
actually does not … the same thing in
Kotlin
? Unfortunately,
Kotlin
does not provide such …
Kotlin - How to create property delegates
Programming
Software Development
3 Years Ago
by dimitrilc
… file. ## Solution Code ## **Main.kt** import
kotlin
.reflect.KProperty fun main() { // println(topLevelFinalProp) //… } dependencies { implementation("org.jetbrains.
kotlin
:
kotlin
-reflect:1.6.10") testImplementation(
kotlin
("test")) } tasks.test …
Kotlin - Lists of Lists
Programming
Software Development
3 Years Ago
by EmiLynn
First, my apologies, I couldn't tag this as
kotlin
and I figured Java was the next closest thing. This …
Re: Kotlin - Lists of Lists
Programming
Software Development
3 Years Ago
by dimitrilc
… confuse you. 3. The equivalence of Java Stream `peek()` in
Kotlin
would be `onEach()`. You can add `onEach()` after each *intermediate…
How to use coroutine Dispatchers in Kotlin
Programming
Software Development
3 Years Ago
by dimitrilc
…kotlinx:kotlinx-coroutines-core:1.5.2") testImplementation(
kotlin
("test")) } tasks.test { useJUnitPlatform()…Entry.kt`. package com.example import kotlinx.coroutines.* import
kotlin
.coroutines.* fun main() = runBlocking { //1 println(…
Dagger 2 - Constructor Dependency Injection in Kotlin
Programming
Mobile Development
3 Years Ago
by dimitrilc
…/software-development/tutorials/538278/java-basics-dependency-injection) 2. Basic
Kotlin
. ## Tools Required ## 1. IntelliJ Community Edition. ## Project Setup….dagger:dagger:2.38.1") testImplementation("org.jetbrains.
kotlin
:
kotlin
-test:1.5.21") } tasks.test { useJUnitPlatform()…
How to Implement the Type-safe Builder Pattern in Kotlin
Programming
Software Development
3 Years Ago
by dimitrilc
…/programming/software-development/tutorials/536438/extension-functions-and-properties-in-
kotlin
#post2281701), higher-order functions, [function types](https://www.daniweb.….daniweb.com/programming/software-development/tutorials/538410/how-to-use-
kotlin
-function-literals#post2287041) expressions, passing trailing lambdas. ## Tools Required ## An…
How to the async() coroutine builder in Kotlin
Programming
Software Development
3 Years Ago
by dimitrilc
…-coroutines-core:1.5.2") testImplementation("org.jetbrains.
kotlin
:
kotlin
-test:1.5.31") } tasks.test { useJUnitPlatform()….EntryKt$asyncNoWait$2.invokeSuspend(Entry.kt:33) at
kotlin
.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33) …
Extension Functions and Properties in Kotlin
Programming
Software Development
3 Years Ago
by dimitrilc
…; version = "1.0-SNAPSHOT" repositories { mavenCentral() } dependencies { testImplementation(
kotlin
("test")) } tasks.test { useJUnitPlatform() } tasks.withType<KotlinCompile…
How To Use Kotlin Function Types
Programming
Software Development
2 Years Ago
by dimitrilc
…this tutorial is `1.7.10`. ## Prerequisite Knowledge ## 1. Basic
Kotlin
. 2. Java Functional Interfaces (optional). ## Project Setup ## To follow …Integer,Integer> timesTwo){ timesTwo.apply(1); } This is the
Kotlin
equivalence. fun functionalParams(timesTwo: Function<Int, Int>){ timesTwo…
How To Use Kotlin Function Literals
Programming
Software Development
2 Years Ago
by dimitrilc
…7.10`. ## Prerequisite Knowledge ## 1. Basic
Kotlin
2. [Function Types](https://www.daniweb.com/programming…/software-development/tutorials/538409/how-to-use-
kotlin
-function-types) ## Project Setup ## To …fun(any){}) ## Summary ## We have learned
Kotlin
’s lambda expressions and anonymous functions in this …
How to Consume RabbitMQ Messages in Kotlin
Programming
Web Development
2 Years Ago
by dimitrilc
… Client library to consume messages In
Kotlin
. ## Tools Required ## 1. A
Kotlin
IDE such as **IntelliJ IDEA** … How to publish messages to RabbitMQ exchanges. 2. Basic
Kotlin
## Project Setup ## To follow along with the tutorial,…steps below: 1. In IntelliJ, create a new
Kotlin
project using Gradle as the build system. . The database used in this …, `name` and `age`. Let us create a
Kotlin
Object called `StudentContract` from the code below (you …will need to a create new
Kotlin
file). package com.example.daniwedblivedebug object StudentContract { } …
Android Native - How to use Navigation Component
Programming
Mobile Development
3 Years Ago
by dimitrilc
…nav_version = "2.3.5" //
Kotlin
implementation("androidx.navigation:navigation-fragment-ktx:$nav_version"…**build.gradle** plugins { id 'com.android.application' id '
kotlin
-android' } android { compileSdk 31 defaultConfig { applicationId "com…
Android Native - sync MediaPlayer progress to Seekbar
Programming
Mobile Development
3 Years Ago
by dimitrilc
…plugins { id 'com.android.application' id 'org.jetbrains.
kotlin
.android' } android { compileSdk 31 defaultConfig { applicationId &…kotlinx.coroutines.delay import kotlinx.coroutines.launch import
kotlin
.time.Duration.Companion.milliseconds class MainActivity : …
Android Native - How to Inject Hilt ViewModels
Programming
Mobile Development
3 Years Ago
by dimitrilc
…' version '7.1.1' apply false id 'org.jetbrains.
kotlin
.android' version '1.6.10' apply false } task clean…gradle** plugins { id 'com.android.application' id 'org.jetbrains.
kotlin
.android' id '
kotlin
-kapt' id 'dagger.hilt.android.plugin' } android { compileSdk…
Android Native - How to prepopulate a Room database
Programming
Mobile Development
3 Years Ago
by dimitrilc
…, add the **kapt** plugin under **plugins**. id '
kotlin
-kapt' 4. Add a new Person Entity with the …** plugins { id 'com.android.application' id 'org.jetbrains.
kotlin
.android' id '
kotlin
-kapt' } android { compileSdk 32 defaultConfig { applicationId "…
Android Native - How to implement LifecycleOwner in a Service
Programming
Mobile Development
3 Years Ago
by dimitrilc
…2**. ## Prerequisite Knowledge ## 1. Intermediate Android. 2.
Kotlin
. 3. Android Services. ## Project Setup ## To follow… plugins { id 'com.android.application' id 'org.jetbrains.
kotlin
.android' } android { compileSdk 32 defaultConfig { applicationId "…
Android Native - How to provide input data to Workers
Programming
Mobile Development
3 Years Ago
by dimitrilc
… { id 'com.android.application' id 'org.jetbrains.
kotlin
.android' } android { compileSdk 32 defaultConfig { applicationId …{ jvmTarget = '1.8' } } dependencies { //
Kotlin
Worker implementation "androidx.work:work-runtime-ktx:2.7…
1
2
3
Next
Search
Search
Forums
Forum Index
Hardware/Software
Recommended Topics
Programming
Recommended Topics
Digital Media
Recommended Topics
Community Center
Recommended Topics
Latest Content
Newest Topics
Latest Topics
Latest Posts
Latest Comments
Top Tags
Topics Feed
Social
Top Members
Meet People
Community Functions
DaniWeb Premium
Newsletter Archive
Markdown Syntax
Community Rules
Developer APIs
Connect API
Forum API Docs
Tools
SEO Backlink Checker
Legal
Terms of Service
Privacy Policy
FAQ
About Us
Advertise
Contact Us
© 2025 DaniWeb® LLC