Internet Speed Test From Terminal

Sometimes we need to test internet speed and we shall use websites like speedtest.net,fast.com etc but in this article, we will discuss a way to check internet speed from the terminal. We can use speedtest.net CLI(Command-line interface) tool to check the internet speed. Install speedtest CLI on Ubuntu/Debian Firstly, install curl using the below command. … Read more

How to install Redis on WSL

In this article, we will discuss how to install redis on WSL. Redis is an in-memory key-value data structure store, used as a memory key-value database, cache, and message broker. Officially, the redis is not supported on Windows. However, we can run it on WSL (Windows Subsystem for Linux). We will be using Windows 10 … Read more

Shortest C++ Program

shortest c++ program

Have you ever thought about the shortest C++ program? In this article, we’ll look into the shortest C++ program. C++ is a compiled language. Firstly, the compiler processes the source code files and produces object files. The linker will combine these object files to yield an executable program. Let’s look into the smallest C++ program … Read more

How to convert std string to int in C++

std string to int in c++

In this article, we will discuss various methods to convert std::string to int in C++. 1.Convert string to int using atoi function The atoi function parses C-style string (null-terminated) content as an integer. Syntax of atoi Defined in header <cstdlib> (stdlib.h) Arguments str – C- style null-terminated string Returns On success, returns the converted number … Read more

Maximum value of integers in Python

In this article, we discuss the maximum value of integers in python. We will consider python 2 and python 3 versions. Python 2 In python 2, integers are internally handled using int and long data types. If the number value is beyond int’s maximum value of int it automatically switches to a long data type. … Read more

Python Split String into List

In this tutorial, we will discuss the methods to split a string into a list. Python string has split() method it can be used to split the string into a list. Syntax Parameters seperator – seperator used to split the string, it can be a character or multiple characters (optional) maxsplit – Number of splits … Read more

randrange in python | randrange vs randint

In this tutorial, we will discuss the randrange function in python. The randrange() function Python random module contains all the random number generation functions. Thus, to use randrange function we should import random module. The randrange function returns an element from a range of numbers. Syntax Parameters start – An integer specifying at which position … Read more

What is len in python?

What is len in python

The len is a built-in function in python. The len function returns the length (the number of items) of an object. The syntax of len() function One argument is required for the length function. The argument may be a sequence or collection sequence – list, string, bytes, tuple, range collection – dictionary, set Raises error … Read more