Tag: only
Python : How to remove files by matching pattern | wildcards | certain extensions only ?
In this article we will discuss how to delete few files from a directory based on matching pattern or wildcard. Suppose we have a directory that contains some log files and some text files and we want to delete all .txt files from that directory i.e. files that ends with string “.txt”. Let’s discuss how …
Python : How to remove files by matching pattern | wildcards | certain extensions only ?Read More
Pandas : count rows in a dataframe | all or those only that satisfy a condition
In this article we will discuss different ways to count number of all rows in a Dataframe or rows that satisfy a condition. Let’s create a Dataframe, Advertisements # List of Tuples empoyees = [(‘jack’, 34, ‘Sydney’, 5) , (‘Riti’, 31, ‘Delhi’ , 7) , (‘Aadi’, 16, np.NaN, 11) , (‘Mohit’, np.NaN,’Delhi’ , 15) , …
Pandas : count rows in a dataframe | all or those only that satisfy a conditionRead More
Python: Check if string is empty or blank or contain spaces only
In this article we will discuss different ways to check if a given string is either empty or contains only spaces. Check if a string is empty using len() len() function in python accepts a sequence as an argument and returns the number of elements in that sequence. So, if we pass a string as …
Python: Check if string is empty or blank or contain spaces onlyRead More
Git: Add only modified / deleted files and ignore new files ( i.e. Untracked files ) using “git add -u”
In this article we will discuss how to add only modified & deleted files to the git and ignore all new files and folders. Sometimes we encounter a situation where we add, modify, and delete some files locally in the project. But we want to update the git index by adding only modified & deleted …
Javascript: Check if string contains only digits
While developing something in javascript, we often come across a general requirement to check if a string contains only digits. This article will check if a javascript string has only numbers using different methods and illustrations. Also, this article will cover how to check if a string contains only numbers and decimals including integer, float and …
Check if a string contains only digits in C++
This tutorial will discuss about unique ways to check if a string contains only digits in C++. Technique 1: Using STL Algorithm std::all_of() To check if string has only digits we can use the STL algorithm all_of(). t accepts three arguments, Iterator pointing to the first character of string. Iterator pointing to the end of …
Check if NumPy Array contains only empty strings – Python
This tutorial will discuss about unique ways to check if numpy array contains only empty strings. Table Of Contents Method 1: using numpy.char.str_len() Method 2: using all() method Summary Method 1: using numpy.char.str_len() The numpy module in Python provides a function numpy.char.str_len(). It accepts a string array as an argument, and returns an array of …
Check if NumPy Array contains only empty strings – PythonRead More
Check if Array Contains Only Empty Strings in C++
This tutorial will discuss about a unique way to check if array contains only empty strings in C++. Suppose we have a string array. Like this, const char* arr[] = {“”, “”, “”, “”, “”, “”, “”}; Now, we want to check if all the strings in this array are empty or not. Advertisements For …
11 World Difficult Video Games Now (Win With Cheat Only)
Video games have never been easy to play. Even when they are entertaining, each game has a unique set of difficulties that players face. These challenges can range from various factors. Some games can be more accessible, while others can be difficult, leaving memories for players to overcome. Most people like playing hard video games …
11 World Difficult Video Games Now (Win With Cheat Only)Read More
NIN becomes the only proof of identity on the CAC platform
The Corporate Affairs Commission (CAC) has recently announced that it will require National Identification Numbers (NIN) from all shareholders, directors, secretaries, proprietors, trustees and relevant persons for Companies, Business Name and Incorporated Trustee registrations. This policy, which took effect on the 1st of January 2023, aims to promote transparency and curb illegal activities such as …
NIN becomes the only proof of identity on the CAC platformRead More