How to use Coroutines in Kotlin
Coroutines are a way to handle multithreading in Kotlin, read more about it from the official docs: …
Read Article →In-depth guides, insights, and best practices for modern software engineering
Coroutines are a way to handle multithreading in Kotlin, read more about it from the official docs: …
Read Article →val pair: Pair<String, Int> = "myKey" to 2
A utility class when you want to return 2 values that are not related …
Read Article →Given a month as an integer from 1 to 12, return to which quarter of the year it belongs as an integer number.
For example: month 2 …
Read Article →Create a function that takes 2 nonnegative integers in form of a string as an input, and outputs the sum (also as a string):
Example: ( …
Read Article →If you have gotten this error before, then you have been trying to implement a rowData mapping onto Ag-Grid.. and failed!
ImmutableService requires …
If you have accidentally committed the wrong files into Git, but haven’t yet pushed it to the server, you can recover, or undo your commit as …
Read Article →There are times when you need to extract an object into a number of variables.
Let’s take the example below:
val (id, name, position, …
Read Article →
Everyone knows passphrases. One can choose passphrases from poems, songs, movies names and so on but frequently they can be guessed due …
Read Article →Unit corresponds to the void keyword in Java.
Unit in Kotlin?If you have a function that does not return a value, you can return a Unit …
Functions are reusable pieces of code, often called Blocks, that as the name suggests, act as building blocks to piece together a program.
Each …
Read Article →Among all the many keywords that Kotlin comes with, there exists val and var. What are they used for? What are the differences, and why would you use …
If you have an Ag-Grid, and want to automatically resize all the columns to fit the width of the viewport, you can use this hack.