Tag: its
C++ : Get the list of all files in a given directory and its sub-directories using Boost & C++17
In this article we will discuss how to fetch the recursive list of all files in a given directory using Boost and C++17 FileSystem Library. Suppose we have a directory i.e. Advertisements /home/user/study/tutorials and I want list of all files in this directory and its sub directories, but also want to skip certain directory like …
C++ : How to find an element in vector and get its index ?
In this article we will different ways to find an element in vector and get its index. Suppose we have a vector of int i.e. Advertisements std::vector<int> vecOfNums = { 12, 45, 54, 33, 2, 7, 8, 22, 43, 19 }; Now we want to find if number 22 exists in vector ? If yes …
C++ : How to find an element in vector and get its index ?Read More
Python : Check if a process is running by name and find it’s Process ID (PID)
In this article we will discuss a cross platform way to find a running process PIDs by name using psutil. To install python’s psutil library use, Advertisements pip install psutil Check if a process is running To check if process is running or not, let’s iterate over all the running process using psutil.process_iter() and match …
Python : Check if a process is running by name and find it’s Process ID (PID)Read More
Find max value & its index in Numpy Array | numpy.amax()
In this article we will discuss how to get the maximum / largest value in a Numpy array and its indices using numpy.amax(). numpy.amax() Python’s numpy module provides a function to get the maximum value from a Numpy array i.e. Advertisements numpy.amax(a, axis=None, out=None, keepdims=<no value>, initial=<no value>) Arguments : a : numpy array from …
Find max value & its index in Numpy Array | numpy.amax()Read More
numpy.amin() | Find minimum value in Numpy Array and it’s index
In this article we will discuss how to find the minimum or smallest value in a Numpy array and it’s indices using numpy.amin(). numpy.amin() Python’s numpy module provides a function to get the minimum value from a Numpy array i.e. Advertisements numpy.amin(a, axis=None, out=None, keepdims=<no value>, initial=<no value>) Arguments : a : numpy array from …
numpy.amin() | Find minimum value in Numpy Array and it’s indexRead More
Python : Check if a String contains a sub string & find it’s index | case insensitive
In this article we will discuss different ways to check if a sub-string exists in another string and if yes then find it’s index. Will also explore ways to check the existence of sub-string in case in-sensitive manner by ignoring case. Check if a String contains another string or character using “in” and “not in” …
Python : Check if a String contains a sub string & find it’s index | case insensitiveRead More
Pandas : Get frequency of a value in dataframe column/index & find its positions in Python
In this article we will discuss how to get the frequency count of unique values in a dataframe column or in dataframe index. Also either count values by grouping them in to categories / range or get percentages instead of exact counts. Suppose we have a Dataframe i.e. Advertisements # List of Tuples empoyees = …
Pandas : Get frequency of a value in dataframe column/index & find its positions in PythonRead More
Every derived table must have its own alias[Solved]
In this article, we will be discussing the below points HOW TO FIX THE ERROR in MySQL : Every derived table must have its own alias Every derived table must have its own alias : JOIN Let’s get started, but first, we will look into the data we will be using in our examples. Assume …
Every derived table must have its own alias[Solved]Read More
Find maximum value and its index in an Array in C++
In this article, we will discuss different ways to find the maximum value in an array and also its index position. Table Of Contents Find Maximum value in Array using Linear traversal : Iterative Method Find Maximum value in Array using STL function max_element() and find() Find Maximum value in Array using max() & find() …
Find maximum value and its index in an Array in C++Read More
Find minimum value and its index in an Array in C++
In this article, we will discuss different ways to find the minimum value in an array and also its index position. Table Of Contents Problem Description Find Min value in Array using Linear traversal -(Iterative Method) Find Min value in Array using STL function Find Min value in Array using min() and find() Summary Problem …
Find minimum value and its index in an Array in C++Read More