Results for kotlin
The error is produced when I called the element, it seems that the first argument is of a different type than expected, but I don't understand why, I'...
I am trying to read a file in via Android assets folder. For this I made a assets folder like here. I made a file and it is shows in the explore: Whe...
My application makes API calls and receives data in a single string. The data looks something like this: [{"city_mpg": 16, "cylinders": 6, "displaceme...
I'm migrating some code from Scala to Kotlin, I observe different behaviour: Scala: var i = 0 Iterator.continually{ println(s"i=$i") i += 1 i }...
I want to create an interactive column. For that, it's necessary to observeto state. But the lazy column doesn't display change. State: data class To...
I'm having difficulties setting up my kotlin multiproject project. I've already spent hours of reading the documentation, but I get the feeling that I...
I am currently trying to get my android app to give me a variable based on which button in a radio group I have clicked. As of right now it is only re...
I'm building a backend app with spring boot and kotlin. I wanna implement a parallel execution for a specific method. I tried to use coroutines but th...
I'm currently working on designing a neat data class (model) for an AlarmTime instance, which will play the role of a variable in the Alarm class. I'v...
I want to develop a Plugin for IntelliJ. My version is 2023.2.5. For that I used the New Project wizard with JDK 17. The build.gradle.kts looks like t...
After finally implementing icons for device types in my server, I replaced the temporary drawables I previously used with the icons from the server an...
I'd like to group items on a list with a same type preserving and order. But only if they following each other. Is there any smarter way than simple f...
I'm working on a Kotlin project that needs to work with 'rational' numbers. To do that I have a class that stores a rational number as two integers (n...
So I am planning to create the following JSON file in Kotlin: {"Basket A": {"Row 1":"Apple", "Row 2":"Orange", "Row 3":"Pear", "Row 4":"Grapes"}} ...
In my app I have 2 dimensions "app" and "server" and in that I have 4 flavors. Now I want to have different versionCode for different flavor combinati...
I'm running a simple Ktor server on a Kotlin Native target. The server should only serve a static html page. I checked the Ktor sample on delivering s...
I am new to Jetbrains IDEA editor. I have a console application project. How can I add Let's Plot library/package/what-do-you-call-it so I can plot so...
The Below code gives me the "Incompatible types:Boolean and Int". Not sure what might be the issue. var votersAge = 17 var cardEligibility = when(vot...
I have developed a KMP project that successfully builds in iOS and Android. I noticed that I am unable to background the Android app and resume the ac...
I have the same problem described here: Get a guest user by userPrincipalName with Microsoft Graph. I want to get a guest user from Graph but I do it ...
Stack traces are not very useful in a coroutine environment, which makes the exception type and message extremely important. Exceptions thrown by thir...
I'm migrating some Scala code to Kotlin, that uses method linearization in a hierarchy of clasess and interfaces (traits in Scala jargon). Does Kotlin...
I am learning Kotlin and for the love of it, I cannot get the yield/sequence straight. Could someone please correct my code? fun Sequence.mapIterable(...
I'm using the io.freefair.aspectj.post-compile-weaving plugin in my Kotlin-Gradle multi-module project to enable aspects in my springboot application....
I'm having trouble configuring AspectJ in my kotlin project. I'm using freefair plugin but it doens't seem to be working. I start my application with ...
How do I undo the most recent local commits in Git?
How can I remove a specific item from an array in JavaScript?
How do I delete a Git branch locally and remotely?
How can I find all files containing a specific text (string) on Linux?
How to find all files containing specific text (string) on Linux?
How do I revert a Git repository to a previous commit?
How do I create an HTML button that acts like a link?
How do I check out a remote Git branch?