Tag: find
Learn how to – How To Use Linux find Command To Locate files
Learn how to – How To Use Linux find Command To Locate files. Introduction Searching for a particular file in your system can be such a hassle if you do not have the knowledge of the right tools to use to ease your work. Maybe there is that config file you are not sure where …
Learn how to – How To Use Linux find Command To Locate filesRead More
Find & Replace using Regular Expressions in Eclipse & Visual Studio
Find & Replace is a life saver feature for any programmer. In this article we will discuss how to use Find and Replace in complex situations with Regular Expressions. Find using Regular expressions Many times we need to find some text in source code using Regular Expression and that’s not much difficult i.e. Advertisements Suppose …
Find & Replace using Regular Expressions in Eclipse & Visual StudioRead More
How to find an element in unordered_map
In this article we will discuss how to find an element in an unordered_map. An unordered_map store elements in key – value pair. Hence to search an element we need to search if the key exists in an unordered_map or not. For this unordered_map provides a member function find() i.e. Advertisements iterator find ( const …
Find all occurrences of a sub string in a string | C++ | Both Case Sensitive & InSensitive
In this article we will discuss how to find all occurrences / Positions of a sub string in a given string in both case sensitive & case insensitive manner. Find All Case Sensitive Occurrences of a Sub String in a given String Logic: Use std::string::find to search the first occurrence and then go on searching using …
Find all occurrences of a sub string in a string | C++ | Both Case Sensitive & InSensitiveRead More
Find and Replace all occurrences of a sub string in C++
In this article we will discuss how to replace all occurrences of a sub string with new string in C++. For example, we have a string i.e. Advertisements “Boost Library is simple C++ Library” And we want replace all occurrences of ‘Lib’ with XXX. Let’s see the different methods to do it, Frequently Asked: Implementing …
Find and Replace all occurrences of a sub string in C++Read More
C++ List – Find | Contains : How to search an element in std::list ?
In this article we will discuss different ways to find or search a given element in the list. std::list does not provide ant find() or contains() method. So, if we want to search for an element in list or check if an element exists in std::list, then we not to write some code for it i.e. …
C++ List – Find | Contains : How to search an element in std::list ?Read More
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 : How to find keys by value in dictionary ?
In this article we will discuss how to find all keys associated with a given single value or multiple values. Suppose we have a dictionary of words and thier frequency i.e. Advertisements # Dictionary of strings and int dictOfWords = { “hello”: 56, “at” : 23 , “test” : 43, “this” : 97, “here” : …
C++ : How to find duplicates in a vector ?
In this article we will discuss how to find duplicate elements in vector and their repetition count. Suppose we have a vector of strings i.e. Advertisements // Vector of strings std::vector<std::string> vecOfStings{ “at” , “hello”, “hi”, “there”, “where”, “now”, “is”, “that” , “hi” , “where”, “at”, “no”, “yes”, “at”}; Let’s find duplicate elements from this …
Python : How to find an element in Tuple by value
In this article we will discuss different ways to check if an element exists in tuple or not. If yes then also find its index and occurrence count. Find an element in tuple by value using ‘in’ & ‘not in’ Python provides operator in and not in to check if an element exists in tuple. …