Python docstrings, format and examples

In this tutorial, we will discuss python docstrings, and learn about docstring format with examples. What is docstring in Python? Docstring is a string literal appears after the definition of modules, functions or classes. In other words, it is a description of the function, class or module. Lets define a small function to calculate the … Read more

How To Install Docker on Ubuntu? – All About Docker Installation

how to install docker on ubuntu feature image

Docker is a software platform that allows us to build, test and deploy applications easily. In this tutorial, we will discuss step by step guide to install docker on the Ubuntu machine. Installation prerequisites Before installing docker on Ubuntu we need to ensure the following prerequisites. We need a 64 bit version any one of … Read more

FFmpeg Audio Extraction

The FFmpeg is a cross-platform media file conversion tool. FFmpeg can be used for the audio extraction from video files. In this tutorial, we will discuss different ways to extract audio from video files using FFmpeg. FFmpeg audio extraction using command line For this, we need to install FFmpeg as the command line. Windows users … Read more

How To Use Lambda Function in Python

In this article, we will discuss lambda function definition and usages in Python. Lambda functions are also known as anonymous function or lambda expression. Lambda function definition A lambda function/expression is a notation used in the lambda calculus. A normal function is , where x is a variable but a lambda function as shown below … Read more

Class Variables and Instance Variables in Python

Class variables and instance variables are two important concepts related to classes in Python. In this article, we will discuss class variable and instance variables with examples. We can define empty class in Python as shown below Two types of variables associated with a Python class – instance variables and class variables. Instance variables Instance … Read more

How to Concatenate Strings in Python

String concatenation is a common task in most applications. In this article, we will look into different ways to concatenate strings in Python. 1.Using the + operator To concatenate strings we can use the + operator. Output Here string str1 and str2 are joined using the + operator. We can add space between str1 and … Read more

Split Strings in C++

Splitting string into sub-strings is a common task in many applications. In this article, we will discuss various ways to split strings in C++. 1.Using the getline function The getline function can be used to split strings in C++. is : Extact string from istream object str : extracted line string delim : delimiter character … Read more

What is string::npos in C++?

In this article, we will discuss string::npos in C++. The std::string::npos is a static member constant. It is defined in the string (basic_string.h) header file. It is a static member constant with the maximum value representable by the type size_type. The type of size_type is unsigned integer however it is initialized as -1 but due … Read more

All About Pure Virtual Functions in C++

In this article, we will discuss pure virtual functions in C++ and usage with examples. Let’s dive into the definition of pure virtual function. So what is pure virtual function? A pure virtual function is a function, that must be overriden in the derived class need not to be defined A virtual function can be … Read more