Asynchronous programming in Dart with examples

Asynchronous programming runs in a separate thread. It can execute without blocking the main thread i.e. the application can keep working while the asynchronous code runs in the background. For example, if the application is downloading some data over the network, that part we can put in a asynchronous block.

Read

lgamma function of Python math

lgamma function is defined in python math module. It is used to find the natural logarithm of the absolute value of the gamma function for an argument. This function is available for python 3.2 and above.

Read

Get the versions info in Kotlin runtime

Kotlin stdlib comes with one class called KotlinVersion, that provides different properties to check the current Kotlin version runtime.

Read

Visibility modifiers: Private, protected, internal, and public

In Kotlin, we can define a class member as private, internal, public or protected. These are also called visibility modifiers. It defines the scope from where we can access a member.

Read

Different ways to read the content of a file in Kotlin

We have a couple of different ways to read the file content in Kotlin. For these examples, we have created one readme.md file with the below content :.

Read

Python program to calculate compound interest

Compound interest is an interest calculation process that calculates the interest based on the initial principal and accumulated interests on a compounding period. Interest is added to the principal and for the next period, interest is gained on the accumulated interest.

Read

Difference between double and triple equal in Kotlin

Double equal "==" and triple equal "===" are used for equality check in Kotlin. Both are different and not exactly same as like Java. In this post, we will see how these equal check works.

Read

Different ways to convert a string to number in Kotlin

In this post, I will show you different ways to convert a string to number in Kotlin. This problem has a lot of use cases like your application is getting string values from the server and you want to convert it to number safely before processing. Or you want to convert the user input value to number before sending to the server. Let's check the programs :.

Read

C++ program to find the smallest and the largest elements in an array

In this program, we will find the smallest and largest elements in an array using C++. We will take the array elements as inputs from the user and find out the smallest and largest.

Read

Finding out random numbers in Kotlin

We have a couple of different ways to generate random numbers in Java. Starting from Kotlin 1.3, one new package kotlin.random was introduced for a pseudo-random generation. So, if your project is using 1.3 or later Kotlin version, you can use this package.

Read