Tag: [6
C++11 Multithreading – Part 6: Need of Event Handling
In this article we will discuss the need of Event Handling in Multi-threading. Sometimes a thread needs to wait for an event to happen like a condition to become true or a task to be completed by another thread. Advertisements For example, Suppose we are building a network based application. This application does following tasks, …
C++11 Multithreading – Part 6: Need of Event HandlingRead More
C++11 Smart Pointer – Part 6 : unique_ptr Tutorial and Examples
In this article we will discuss a Smart Pointer implementationstd::unique_ptr<> provided by c++11. what is std::unique_ptr ? unique_ptr<> is one of the Smart pointer implementation provided by c++11 to prevent memory leaks. A unique_ptr object wraps around a raw pointer and its responsible for its lifetime. When this object is destructed then in its destructor it deletes …
C++11 Smart Pointer – Part 6 : unique_ptr Tutorial and ExamplesRead More
Python : 6 Different ways to create Dictionaries
In this article, we will discuss different ways to create dictionary objects in python. What is a dictionary? dictionary is an associative container that contains the items in key/value pairs. For example, we if want to track the words and their frequency count in an article like, Advertisements “Hello” occurs 7 times “hi” occurs 10 times …
6 ways to get the last element of a list in Python
In this article, we will discuss six different ways to get the last element of a list in python. Get last item of a list using negative indexing List in python supports negative indexing. So, if we have a list of size “S”, then to access the Nth element from last we can use the …
6 Ways to check if all values in Numpy Array are zero (in both 1D & 2D arrays) – Python
In this article we will discuss seven different ways to check if all values in a numpy array are 0. Then we will look how to find rows or columns with only zeros in a 2D array or matrix. Check if all values in a 1D Numpy Array are Zero First of all, we will …
6 Ways to check if all values in Numpy Array are zero (in both 1D & 2D arrays) – PythonRead More
Creating Vectors in R Programming (6 ways)
Vectors are fundamental data structures in R with logical, integer, double, character, and raw data types. Vectors are somewhat similar to what is arrays in C. In this article, we will be learning how to create vectors in R using some primary ways: using c() function. using ‘:’ using rep() function using vector() function using …
Javascript: Check if string is empty (6 ways)
This article will see how to check if a string is empty using different methods and various examples. Table of Contents:- Javascript check if string is empty using === operator Javascript check if string is empty using length and ! operator Javascript check if string is empty or has only white spaces Javascript check if …
Javascript: Loop through array (6 ways)
There is a general requirement when developing in javascript that is to loop through an array. This article will discuss how to iterate through an array in javascript using six different methods and example illustrations. Table of Contents:- Loop through array in javascript using for loop Loop through array in javascript using for each loop Loop through …
Javascript: Get first element of an array (6 ways)
While working in javascript, often there is a requirement to get the first element from an array. This article will discuss accessing the first element of a javascript array. Table of Contents:- Get first element of an array using [ ] Get first element of an array using shift() Get first element of an array …
Javascript: check if an array includes a value (6 ways)
While working in javascript arrays, there is often a requirement to determine if a value exists in an array. This article demonstrates easy ways to check if an array includes a particular value in a javascript using different methods and example illustrations. Table of Contents: Check if a value exists in javascript array using includes() …
Javascript: check if an array includes a value (6 ways)Read More