title
stringlengths
3
221
text
stringlengths
17
477k
parsed
listlengths
0
3.17k
volatile Keyword in Java
The volatile modifier is used to let the JVM know that a thread accessing the variable must always merge its own private copy of the variable with the master copy in the memory. Accessing a volatile variable synchronizes all the cached copied of the variables in the main memory. Volatile can only be applied to instance...
[ { "code": null, "e": 1240, "s": 1062, "text": "The volatile modifier is used to let the JVM know that a thread accessing the variable must always merge its own private copy of the variable with the master copy in the memory." }, { "code": null, "e": 1472, "s": 1240, "text": "Acce...
DataFrame Operations in R - GeeksforGeeks
01 Apr, 2022 DataFrames are generic data objects of R which are used to store the tabular data. Data frames are considered to be the most popular data objects in R programming because it is more comfortable to analyze the data in the tabular form. Data frames can also be taught as mattresses where each column of a matr...
[ { "code": null, "e": 24680, "s": 24652, "text": "\n01 Apr, 2022" }, { "code": null, "e": 25109, "s": 24680, "text": "DataFrames are generic data objects of R which are used to store the tabular data. Data frames are considered to be the most popular data objects in R programming ...
Python Pillow - Colors on an Image - GeeksforGeeks
12 Dec, 2021 In this article, we will learn Colors on an Image using the Pillow module in Python. Let’s discuss some concepts: A crucial class within the Python Imaging Library is that the Image class. It’s defined within the Image module and provides a PIL image on which manipulation operations are often administered....
[ { "code": null, "e": 25729, "s": 25701, "text": "\n12 Dec, 2021" }, { "code": null, "e": 25843, "s": 25729, "text": "In this article, we will learn Colors on an Image using the Pillow module in Python. Let’s discuss some concepts:" }, { "code": null, "e": 26229, "...
Count of elements not divisible by any other elements of Array - GeeksforGeeks
24 May, 2021 Given an array arr[], the task is to determine the number of elements of the array which are not divisible by any other element in the given array. Examples: Input: arr[] = {86, 45, 18, 4, 8, 28, 19, 33, 2} Output: 4 Explanation: The elements are {2, 19, 33, 45} are not divisible by any other array elemen...
[ { "code": null, "e": 24740, "s": 24712, "text": "\n24 May, 2021" }, { "code": null, "e": 24899, "s": 24740, "text": "Given an array arr[], the task is to determine the number of elements of the array which are not divisible by any other element in the given array. Examples: " }...
Transform to Sum Tree | Practice | GeeksforGeeks
Given a Binary Tree of size N , where each node can have positive or negative values. Convert this to a tree where each node contains the sum of the left and right sub trees of the original tree. The values of leaf nodes are changed to 0. Example 1: Input: 10 / \ -2 6 /...
[ { "code": null, "e": 477, "s": 238, "text": "Given a Binary Tree of size N , where each node can have positive or negative values. Convert this to a tree where each node contains the sum of the left and right sub trees of the original tree. The values of leaf nodes are changed to 0." }, { "c...
C++ String Library - rfind
It searches the string for the last occurrence of the sequence specified by its arguments. Following is the declaration for std::string::rfind. size_t rfind (const string& str, size_t pos = npos) const; size_t rfind (const string& str, size_t pos = npos) const noexcept; size_t rfind (const string& str, size_t pos = npo...
[ { "code": null, "e": 2694, "s": 2603, "text": "It searches the string for the last occurrence of the sequence specified by its arguments." }, { "code": null, "e": 2747, "s": 2694, "text": "Following is the declaration for std::string::rfind." }, { "code": null, "e": 2...
How to create canvas line using Fabric.js ? - GeeksforGeeks
16 Jul, 2021 In this article, we are going to see how to create a canvas line using FabricJS. The canvas line means the line is movable and can be stretched according to your requirements. Further, the line can be customized when it comes to initial stroke color and its starting and ending coordinates.Approach: To make...
[ { "code": null, "e": 24868, "s": 24840, "text": "\n16 Jul, 2021" }, { "code": null, "e": 25524, "s": 24868, "text": "In this article, we are going to see how to create a canvas line using FabricJS. The canvas line means the line is movable and can be stretched according to your r...
JSF - Custom Converter
We can create our own Custom convertor in JSF. Defining a custom converter in JSF is a three-step process. public class UrlConverter implements Converter { ... } Create a simple class to store data: UrlData. This class will store a URL string. public class UrlData { private String url; public UrlData(String url)...
[ { "code": null, "e": 1999, "s": 1952, "text": "We can create our own Custom convertor in JSF." }, { "code": null, "e": 2059, "s": 1999, "text": "Defining a custom converter in JSF is a three-step process." }, { "code": null, "e": 2114, "s": 2059, "text": "publ...
How to convert LinkedList to Array in Java? - GeeksforGeeks
11 Dec, 2018 Given a Linked List in Java, the task is to convert this LinkedList to Array. Examples: Input: LinkedList: ['G', 'e', 'e', 'k', 's'] Output: Array: ['G', 'e', 'e', 'k', 's'] Input: LinkedList: [1, 2, 3, 4, 5] Output: Array: [1, 2, 3, 4, 5] Approach: Get the LinkedListConvert the LinkedList to Object a...
[ { "code": null, "e": 23866, "s": 23838, "text": "\n11 Dec, 2018" }, { "code": null, "e": 23944, "s": 23866, "text": "Given a Linked List in Java, the task is to convert this LinkedList to Array." }, { "code": null, "e": 23954, "s": 23944, "text": "Examples:" ...
What are recursive stored procedures and why MySQL limits the recursion?
A stored procedure is called recursive if it calls itself. Basically, this concept is called recursion. MySQL limits the recursion so the errors will be less rigorous. We can check this limit with the help of the following query − mysql> Show variables LIKE '%recur%'; +------------------------+-------+ | Variable_name ...
[ { "code": null, "e": 1293, "s": 1062, "text": "A stored procedure is called recursive if it calls itself. Basically, this concept is called recursion. MySQL limits the recursion so the errors will be less rigorous. We can check this limit with the help of the following query −" }, { "code": ...
How to clear screen using C#?
Use the Console.Clear() method to clear screen and the console buffer. When the Clear method is called, the cursor automatically scrolls to the top-left corner of the window. Here, we have cleared the screen and then set the ForegroundColor and BackgroundColor − ConsoleColor newForeColor = ConsoleColor.Blue; ConsoleCol...
[ { "code": null, "e": 1362, "s": 1187, "text": "Use the Console.Clear() method to clear screen and the console buffer. When the Clear method is called, the cursor automatically scrolls to the top-left corner of the window." }, { "code": null, "e": 1450, "s": 1362, "text": "Here, w...
Python | Pandas Timestamp.now
14 Jan, 2019 Python is a great language for doing data analysis, primarily because of the fantastic ecosystem of data-centric python packages. Pandas is one of those packages and makes importing and analyzing data much easier. Pandas Timestamp.now() function return the current time in the local timezone. It is Equivale...
[ { "code": null, "e": 28, "s": 0, "text": "\n14 Jan, 2019" }, { "code": null, "e": 242, "s": 28, "text": "Python is a great language for doing data analysis, primarily because of the fantastic ecosystem of data-centric python packages. Pandas is one of those packages and makes imp...
How to scrape Comment using Beautifulsoup in Python?
29 Dec, 2020 Comments are provided by Beautiful Soup which is a web scraping framework for Python. Web scraping is the process of extracting data from the website using automated tools to make the process faster. The Comment object is just a special type of NavigableString and is used to make the codebase more readable...
[ { "code": null, "e": 28, "s": 0, "text": "\n29 Dec, 2020" }, { "code": null, "e": 337, "s": 28, "text": "Comments are provided by Beautiful Soup which is a web scraping framework for Python. Web scraping is the process of extracting data from the website using automated tools to ...
Minimum characters to be added at front to make string palindrome
16 Jun, 2022 Given a string str we need to tell minimum characters to be added at front of string to make string palindrome.Examples: Input : str = "ABC" Output : 2 We can make above string palindrome as "CBABC" by adding 'B' and 'C' at front. Input : str = "AACECAAAA"; Output : 2 We can make above string palindro...
[ { "code": null, "e": 52, "s": 24, "text": "\n16 Jun, 2022" }, { "code": null, "e": 175, "s": 52, "text": "Given a string str we need to tell minimum characters to be added at front of string to make string palindrome.Examples: " }, { "code": null, "e": 415, "s": ...
How to check which Button was clicked in Tkinter ?
25 Jan, 2022 Are you using various buttons in your app, and you are being confused about which button is being pressed? Don’t know how to get rid of this solution!! Don’t worry, just go through the article. In this article, we will explain in detail the procedure to know which button was pressed. Step 1: First, import ...
[ { "code": null, "e": 54, "s": 26, "text": "\n25 Jan, 2022" }, { "code": null, "e": 339, "s": 54, "text": "Are you using various buttons in your app, and you are being confused about which button is being pressed? Don’t know how to get rid of this solution!! Don’t worry, just go t...
How to Download and Install Spring Tool Suite (Spring Tools 4 for Eclipse) IDE?
02 Dec, 2021 Spring Tool Suite (STS) is a java IDE tailored for developing Spring-based enterprise applications. It is easier, faster, and more convenient. And most importantly it is based on Eclipse IDE. STS is free, open-source, and powered by VMware. Spring Tools 4 is the next generation of Spring tooling for the fa...
[ { "code": null, "e": 52, "s": 24, "text": "\n02 Dec, 2021" }, { "code": null, "e": 563, "s": 52, "text": "Spring Tool Suite (STS) is a java IDE tailored for developing Spring-based enterprise applications. It is easier, faster, and more convenient. And most importantly it is base...
Noiseless Channel Protocol
18 Feb, 2022 Introduction :A protocol is a set of rules used by two devices to communicate. These sets of rules are usually decided by headers (fixed headers determined by the protocol). These headers specify the content of the message and the way this message is processed. To detect the error, the header must be the a...
[ { "code": null, "e": 52, "s": 24, "text": "\n18 Feb, 2022" }, { "code": null, "e": 442, "s": 52, "text": "Introduction :A protocol is a set of rules used by two devices to communicate. These sets of rules are usually decided by headers (fixed headers determined by the protocol). ...
Flutter – Auto size text
11 Apr, 2022 An adaptive UI is an integral part of any application. As applications nowadays have to function on a wide range of devices ranging from tablets, PCs, and mobile with varying screen sizes. This is where the application needs to adjust itself according to the size of the screen irrespective of the size of t...
[ { "code": null, "e": 28, "s": 0, "text": "\n11 Apr, 2022" }, { "code": null, "e": 366, "s": 28, "text": "An adaptive UI is an integral part of any application. As applications nowadays have to function on a wide range of devices ranging from tablets, PCs, and mobile with varying ...
Matplotlib.axes.Axes.set_yscale() in Python
19 Apr, 2020 Matplotlib is a library in Python and it is numerical – mathematical extension for NumPy library. The Axes Class contains most of the figure elements: Axis, Tick, Line2D, Text, Polygon, etc., and sets the coordinate system. And the instances of Axes supports callbacks through a callbacks attribute. The Axe...
[ { "code": null, "e": 28, "s": 0, "text": "\n19 Apr, 2020" }, { "code": null, "e": 328, "s": 28, "text": "Matplotlib is a library in Python and it is numerical – mathematical extension for NumPy library. The Axes Class contains most of the figure elements: Axis, Tick, Line2D, Text...
SweetAlert Library Introduction and Installation with the Example
07 Jan, 2022 When building JavaScript-driven websites we often have the need to provide feedback to our users to let them know if the action they have performed has been successful or not. In the early days of the web, developers used to create messages using the window.alert() function. While alert() works in practice...
[ { "code": null, "e": 28, "s": 0, "text": "\n07 Jan, 2022" }, { "code": null, "e": 661, "s": 28, "text": "When building JavaScript-driven websites we often have the need to provide feedback to our users to let them know if the action they have performed has been successful or not....
Given number of matches played, find number of teams in tournament
22 Jun, 2022 Given an integer M which is the number of matches played in a tournament and each participating team has played a match with all the other teams. The task is to find how many teams are there in the tournament.Examples: Input: M = 3 Output: 3 If there are 3 teams A, B and C then A will play a match with B...
[ { "code": null, "e": 28, "s": 0, "text": "\n22 Jun, 2022" }, { "code": null, "e": 249, "s": 28, "text": "Given an integer M which is the number of matches played in a tournament and each participating team has played a match with all the other teams. The task is to find how many ...
pkg-config - Unix, Linux Command
pkg-config [--modversion] [--help] [--print-errors] [--silence-errors] [--cflags] [--libs] [--libs-only-L] [--libs-only-l] [--cflags-only-I] [--variable=VARIABLENAME] [--define-variable=VARIABLENAME=VARIABLEVALUE] [--uninstalled] [--exists] [--atleast-version=VERSION] [--exact-version=VERSION] [--max-version=VERSION] [...
[ { "code": null, "e": 11051, "s": 10715, "text": "\npkg-config [--modversion] [--help] [--print-errors] [--silence-errors]\n[--cflags] [--libs] [--libs-only-L]\n[--libs-only-l] [--cflags-only-I]\n[--variable=VARIABLENAME]\n[--define-variable=VARIABLENAME=VARIABLEVALUE]\n[--uninstalled]\n[--exists] [-...
Java String length() Method with Examples
22 Dec, 2021 Strings in Java are objects that are supported internally by a char array. Since arrays are immutable, and strings are also a type of exceptional array that holds characters, therefore, strings are immutable as well. The String class of Java comprises a lot of methods to execute various operations on stri...
[ { "code": null, "e": 53, "s": 25, "text": "\n22 Dec, 2021" }, { "code": null, "e": 271, "s": 53, "text": "Strings in Java are objects that are supported internally by a char array. Since arrays are immutable, and strings are also a type of exceptional array that holds characters,...
How to shuffle a dataframe in R by rows
14 Sep, 2021 In this article, we will discuss how to shuffle a dataframe by rows in the R programming language. Shuffling means reordering or rearranging the data. We can shuffle the rows in the dataframe by using sample() function. By providing indexing to the dataframe the required task can be easily achieved. Syntax...
[ { "code": null, "e": 28, "s": 0, "text": "\n14 Sep, 2021" }, { "code": null, "e": 127, "s": 28, "text": "In this article, we will discuss how to shuffle a dataframe by rows in the R programming language." }, { "code": null, "e": 329, "s": 127, "text": "Shuffli...
Sopra Steria Interview Experience
21 May, 2019 Today, I was called for interview in Sopra Steria. Approximate 100 persons were present during the interview process. First round as technical test which consists of 2 complex questions from hackersearth websites. Though I failed in first round itself. One question I tries to solve and I solved that 80% bu...
[ { "code": null, "e": 28, "s": 0, "text": "\n21 May, 2019" }, { "code": null, "e": 475, "s": 28, "text": "Today, I was called for interview in Sopra Steria. Approximate 100 persons were present during the interview process. First round as technical test which consists of 2 complex...
How to fetch single and multiple documents from MongoDb using Node.js ?
20 Nov, 2020 MongoDB, the most popular NoSQL database, is an open-source document-oriented database. The term ‘NoSQL’ means ‘non-relational’. It means that MongoDB isn’t based on the table-like relational database structure but provides an altogether different mechanism for storage and retrieval of data. This format of...
[ { "code": null, "e": 28, "s": 0, "text": "\n20 Nov, 2020" }, { "code": null, "e": 408, "s": 28, "text": "MongoDB, the most popular NoSQL database, is an open-source document-oriented database. The term ‘NoSQL’ means ‘non-relational’. It means that MongoDB isn’t based on the table...
Autosizing TextView in Android - GeeksforGeeks
18 Feb, 2021 If the user is giving the input and the input needs to be shown as TextView and if the user inputs the stuff which can go out of the screen, then in this case the font TextView should be decreased gradually. So, in this article its been discussed how the developer can reduce the size of TextView gradually ...
[ { "code": null, "e": 24725, "s": 24697, "text": "\n18 Feb, 2021" }, { "code": null, "e": 25255, "s": 24725, "text": "If the user is giving the input and the input needs to be shown as TextView and if the user inputs the stuff which can go out of the screen, then in this case the ...
C++ Program to Construct Transitive Closure Using Warshall’s Algorithm
If a directed graph is given, determine if a vertex j is reachable from another vertex i for all vertex pairs (i, j) in the given graph. Reachable mean that there is a path from vertex i to j. This reach-ability matrix is called transitive closure of a graph. Warshall algorithm is commonly used to find the Transitive C...
[ { "code": null, "e": 1460, "s": 1062, "text": "If a directed graph is given, determine if a vertex j is reachable from another vertex i for all vertex pairs (i, j) in the given graph. Reachable mean that there is a path from vertex i to j. This reach-ability matrix is called transitive closure of a ...
How to build a Deep Learning model in 10 lines | by Jordi TORRES.AI | Towards Data Science
This post will introduce the reader to the basics of neural networks through a case study that using only 10 lines of Python code creates and trains a neural network that recognises handwritten digits in 3 basic steps: 1- Load and Preprocess the Data 2- Define the Model 3- Train the Model To do this, we will use the Te...
[ { "code": null, "e": 390, "s": 171, "text": "This post will introduce the reader to the basics of neural networks through a case study that using only 10 lines of Python code creates and trains a neural network that recognises handwritten digits in 3 basic steps:" }, { "code": null, "e":...
Creating A Chess AI using Deep Learning | by Victor Sim | Towards Data Science
When Gary Kasparov was dethroned by IBM’s Deep Blue chess algorithm, the algorithm did not use Machine Learning, or at least in the way that we define Machine Learning today. This article aims to use Neural Networks to create a successful chess AI, by using Neural Networks, a newer form of machine learning algorithms. ...
[ { "code": null, "e": 347, "s": 172, "text": "When Gary Kasparov was dethroned by IBM’s Deep Blue chess algorithm, the algorithm did not use Machine Learning, or at least in the way that we define Machine Learning today." }, { "code": null, "e": 492, "s": 347, "text": "This articl...
Validate an IP Address | Practice | GeeksforGeeks
Write a program to Validate an IPv4 Address. According to Wikipedia, IPv4 addresses are canonically represented in dot-decimal notation, which consists of four decimal numbers, each ranging from 0 to 255, separated by dots, e.g., 172.16.254.1 . A valid IPv4 Address is of the form x1.x2.x3.x4 where 0 <= (x1, x2, x3, x4)...
[ { "code": null, "e": 781, "s": 238, "text": "Write a program to Validate an IPv4 Address.\nAccording to Wikipedia, IPv4 addresses are canonically represented in dot-decimal notation, which consists of four decimal numbers, each ranging from 0 to 255, separated by dots, e.g., 172.16.254.1 .\nA valid ...
PHP - json_decode() Function
The json_decode() function can decode a JSON string. mixed json_decode( string $json [, bool $assoc = false [, int $depth = 512 [, int $options = 0 ]]] ) The json_decode() function can take a JSON encoded string and convert into a PHP variable. The json_decode() function can return a value encoded in JSON in appropr...
[ { "code": null, "e": 2811, "s": 2757, "text": "The json_decode() function can decode a JSON string. " }, { "code": null, "e": 2913, "s": 2811, "text": "mixed json_decode( string $json [, bool $assoc = false [, int $depth = 512 [, int $options = 0 ]]] )\n" }, { "code": nul...
p5.js | loop() Function - GeeksforGeeks
17 Jan, 2020 The loop() function is an inbuilt function in p5.js library. This function is used to play the audio on the web in a loop. The loop function can call after or before the play() function, it does not matter. It will play that loaded sound again and again in a loop. Syntax: loop( startTime, rate, amp, cueSta...
[ { "code": null, "e": 24168, "s": 24140, "text": "\n17 Jan, 2020" }, { "code": null, "e": 24433, "s": 24168, "text": "The loop() function is an inbuilt function in p5.js library. This function is used to play the audio on the web in a loop. The loop function can call after or befo...
PHP switch Statement
The switch statement is used to perform different actions based on different conditions. Use the switch statement to select one of many blocks of code to be executed. This is how it works: First we have a single expression n (most often a variable), that is evaluated once. The value of the expression is then compared ...
[ { "code": null, "e": 89, "s": 0, "text": "The switch statement is used to perform different actions based on different conditions." }, { "code": null, "e": 168, "s": 89, "text": "Use the switch statement to select one of many blocks \nof code to be executed." }, { "code":...
Adding Array Elements | Practice | GeeksforGeeks
Given an array Arr[] of size N and an integer K, you have to add the first two minimum elements of the array until all the elements are greater than or equal to K and find the number of such operations required. Example 1: Input: N = 6, K = 6 Arr[] = {1, 10, 12, 9, 2, 3} Output: 2 Explanation: First we add (1 + 2), no...
[ { "code": null, "e": 450, "s": 238, "text": "Given an array Arr[] of size N and an integer K, you have to add the first two minimum elements of the array until all the elements are greater than or equal to K and find the number of such operations required." }, { "code": null, "e": 461, ...
Automatically Rescale ylim and xlim in Matplotlib
To rescale ylim and xlim automatically, we can take the following steps − To plot a line, use plot() method and data range from 0 to 10. To plot a line, use plot() method and data range from 0 to 10. To scale the xlim and ylim automatically, we can make the variable scale_factore=6. To scale the xlim and ylim automatic...
[ { "code": null, "e": 1136, "s": 1062, "text": "To rescale ylim and xlim automatically, we can take the following steps −" }, { "code": null, "e": 1199, "s": 1136, "text": "To plot a line, use plot() method and data range from 0 to 10." }, { "code": null, "e": 1262, ...
OCR of English alphabets in Python OpenCV - GeeksforGeeks
15 Sep, 2021 OCR which stands for Optical character recognition is a computer vision technique used to recognize characters such as digits, alphabets, signs, etc. These characters are common in day-to-day life and we can perform character recognition based on our requirements. We will implement optical character recogn...
[ { "code": null, "e": 24292, "s": 24264, "text": "\n15 Sep, 2021" }, { "code": null, "e": 24714, "s": 24292, "text": "OCR which stands for Optical character recognition is a computer vision technique used to recognize characters such as digits, alphabets, signs, etc. These charact...
How to Customize AlertDialog Dimensions in Android? - GeeksforGeeks
11 Aug, 2021 AlertDialog in Android is a kind of pop-up message that alerts the user about the activity usages. This is specifically developed by a developer to perform any operations or ask for any permissions and not an Android OS call. Alert Dialog in general has no fixed dimension values and rather varies from devi...
[ { "code": null, "e": 26381, "s": 26353, "text": "\n11 Aug, 2021" }, { "code": null, "e": 26745, "s": 26381, "text": "AlertDialog in Android is a kind of pop-up message that alerts the user about the activity usages. This is specifically developed by a developer to perform any ope...
Sum of the series 2 + (2+4) + (2+4+6) + (2+4+6+8) + ...... + (2+4+6+8+....+2n) - GeeksforGeeks
24 Dec, 2021 Given a positive integer n. The problem is to find the sum of the given series 2 + (2+4) + (2+4+6) + (2+4+6+8) + ...... + (2+4+6+8+....+2n), where i-th term in the series is the sum of first i even natural numbers.Examples: Input : n = 2 Output : 8 (2) + (2+4) = 8 Input : n = 5 Output : 70 (2) + (2+4) + ...
[ { "code": null, "e": 25961, "s": 25933, "text": "\n24 Dec, 2021" }, { "code": null, "e": 26186, "s": 25961, "text": "Given a positive integer n. The problem is to find the sum of the given series 2 + (2+4) + (2+4+6) + (2+4+6+8) + ...... + (2+4+6+8+....+2n), where i-th term in the...
Shortest Job First CPU Scheduling with predicted burst time - GeeksforGeeks
16 Aug, 2019 Prerequisite – CPU Scheduling, SJF – Set 1 (Non- preemptive), Set 2 (Preemptive) Shortest Job First (SJF) is an optimal scheduling algorithm as it gives maximum Throughput and minimum average waiting time(WT) and turn around time (TAT) but it is not practically implementable because Burst-Time of a process...
[ { "code": null, "e": 26135, "s": 26107, "text": "\n16 Aug, 2019" }, { "code": null, "e": 26216, "s": 26135, "text": "Prerequisite – CPU Scheduling, SJF – Set 1 (Non- preemptive), Set 2 (Preemptive)" }, { "code": null, "e": 26474, "s": 26216, "text": "Shortest ...
How to add text in a heatmap cell annotations using seaborn in Python ? - GeeksforGeeks
24 Jan, 2021 Prerequisite: Seaborn heatmap Heatmap is defined as a graphical representation of data using colors to visualize the value of the matrix. In this, to represent more common values or higher activities brighter colors basically reddish colors are used and to represent less common or activity values, darker c...
[ { "code": null, "e": 25537, "s": 25509, "text": "\n24 Jan, 2021" }, { "code": null, "e": 25567, "s": 25537, "text": "Prerequisite: Seaborn heatmap" }, { "code": null, "e": 26000, "s": 25567, "text": "Heatmap is defined as a graphical representation of data usi...
expandtabs() method in Python - GeeksforGeeks
13 Oct, 2020 expandtabs is a method specified in Strings in Python 3. Sometimes, there is a need of specifying the space in the string, but the amount of space to be left is uncertain and depending upon the environment and conditions. For these cases, the need to modify the string, again and again, is a tedious task. H...
[ { "code": null, "e": 25065, "s": 25037, "text": "\n13 Oct, 2020" }, { "code": null, "e": 25122, "s": 25065, "text": "expandtabs is a method specified in Strings in Python 3." }, { "code": null, "e": 25508, "s": 25122, "text": "Sometimes, there is a need of spe...
Tiling Problem using Divide and Conquer algorithm - GeeksforGeeks
25 Feb, 2022 Given a n by n board where n is of form 2k where k >= 1 (Basically n is a power of 2 with minimum value as 2). The board has one missing cell (of size 1 x 1). Fill the board using L shaped tiles. A L shaped tile is a 2 x 2 square with one cell of size 1×1 missing. Figure 1: An example inputThis problem can...
[ { "code": null, "e": 26159, "s": 26131, "text": "\n25 Feb, 2022" }, { "code": null, "e": 26424, "s": 26159, "text": "Given a n by n board where n is of form 2k where k >= 1 (Basically n is a power of 2 with minimum value as 2). The board has one missing cell (of size 1 x 1). Fill...
CSS box-sizing Property - GeeksforGeeks
21 Oct, 2021 The box-sizing property in CSS defines how the user should calculate the total width and height of an element i.e padding and borders, are to be included or not. Syntax: box-sizing: content-box|border-box; Property Values: All the properties are described well with the example below. content-box: This is t...
[ { "code": null, "e": 24958, "s": 24930, "text": "\n21 Oct, 2021" }, { "code": null, "e": 25120, "s": 24958, "text": "The box-sizing property in CSS defines how the user should calculate the total width and height of an element i.e padding and borders, are to be included or not." ...
LINQ | Partition Operator | Take - GeeksforGeeks
28 May, 2019 In LINQ, partition operators are used for separating the given sequence into two portions without sorting the elements and return one of the portions. The Standard Query Operators supports 4 different types of partition operators: SkipSkipWhileTakeTakeWhile Skip SkipWhile Take TakeWhile The Take operator i...
[ { "code": null, "e": 25685, "s": 25657, "text": "\n28 May, 2019" }, { "code": null, "e": 25916, "s": 25685, "text": "In LINQ, partition operators are used for separating the given sequence into two portions without sorting the elements and return one of the portions. The Standard...
Ruby | Array delete() operation - GeeksforGeeks
21 Aug, 2021 Array#delete() : delete() is a Array class method which returns the array after deleting the mentioned elements. It can also delete a particular element in the array. Syntax: Array.delete() Parameter: obj - specific element to delete Return: last deleted values from the array. Code #1 : Example for ...
[ { "code": null, "e": 25217, "s": 25189, "text": "\n21 Aug, 2021" }, { "code": null, "e": 25385, "s": 25217, "text": "Array#delete() : delete() is a Array class method which returns the array after deleting the mentioned elements. It can also delete a particular element in the arr...
How to extract frequency associated with fft values in Python? - GeeksforGeeks
26 Dec, 2020 In this article, we will find out the extract the values of frequency from an FFT. We can obtain the magnitude of frequency from a set of complex numbers obtained after performing FFT i.e Fast Fourier Transform in Python. The frequency can be obtained by calculating the magnitude of the complex number. So...
[ { "code": null, "e": 25537, "s": 25509, "text": "\n26 Dec, 2020" }, { "code": null, "e": 25920, "s": 25537, "text": "In this article, we will find out the extract the values of frequency from an FFT. We can obtain the magnitude of frequency from a set of complex numbers obtained...
Angular PrimeNG ScrollTop Component - GeeksforGeeks
24 Sep, 2021 Angular PrimeNG is an open-source framework with a rich set of native Angular UI components that are used for great styling and this framework is used to make responsive websites with very much ease. In this article, we will know how to use the ScrollTop component in Angular PrimeNG. ScrollTop component: I...
[ { "code": null, "e": 26464, "s": 26436, "text": "\n24 Sep, 2021" }, { "code": null, "e": 26749, "s": 26464, "text": "Angular PrimeNG is an open-source framework with a rich set of native Angular UI components that are used for great styling and this framework is used to make resp...
divmod() in Python and its application
The divmod() is part of python’s standard library which takes two numbers as parameters and gives the quotient and remainder of their division as a tuple. It is useful in many mathematical applications like checking for divisibility of numbers and establishing if a number is prime or not. Syntax: divmod(a, b) a and b :...
[ { "code": null, "e": 1352, "s": 1062, "text": "The divmod() is part of python’s standard library which takes two numbers as parameters and gives the quotient and remainder of their division as a tuple. It is useful in many mathematical applications like checking for divisibility of numbers and estab...
Check if a number is positive, negative or zero using bit operators in C++
Here we will check whether a number is positive, or negative or zero using bit operators. If we perform shifting like n >> 31, then it will convert every negative number to -1, every other number to 0. If we perform –n >> 31, then for positive number it will return -1. When we do for 0, then n >> 31, and –n >> 31, both...
[ { "code": null, "e": 1442, "s": 1062, "text": "Here we will check whether a number is positive, or negative or zero using bit operators. If we perform shifting like n >> 31, then it will convert every negative number to -1, every other number to 0. If we perform –n >> 31, then for positive number it...
Graph Coloring
Graph coloring problem is a special case of graph labeling. In this problem, each node is colored into some colors. But coloring has some constraints. We cannot use the same color for any adjacent vertices. For solving this problem, we need to use the greedy algorithm, but it does not guaranty to use minimum color. Inp...
[ { "code": null, "e": 1269, "s": 1062, "text": "Graph coloring problem is a special case of graph labeling. In this problem, each node is colored into some colors. But coloring has some constraints. We cannot use the same color for any adjacent vertices." }, { "code": null, "e": 1379, ...
Balance a Binary Search Tree in c++
Suppose we have a binary search tree, we have to find a balanced binary search tree with the same node values. A binary search tree is said to be balanced if and only if the depth of the two subtrees of every node never differ by more than 1. If there is more than one result, return any of them. So if the tree is like ...
[ { "code": null, "e": 1384, "s": 1062, "text": "Suppose we have a binary search tree, we have to find a balanced binary search tree with the same node values. A binary search tree is said to be balanced if and only if the depth of the two subtrees of every node never differ by more than 1. If there i...
Probability and Statistics explained in the context of deep learning | by laxman vijay | Towards Data Science
This article is intended for beginners in deep learning who wish to gain knowledge about probability and statistics and also as a reference for practitioners. In my previous article, I wrote about the concepts of linear algebra for deep learning in a top down approach ( link for the article ) (If you do not have enough...
[ { "code": null, "e": 330, "s": 171, "text": "This article is intended for beginners in deep learning who wish to gain knowledge about probability and statistics and also as a reference for practitioners." }, { "code": null, "e": 651, "s": 330, "text": "In my previous article, I w...
C# Linq Intersect Method
Find common elements between two arrays using the Intersect() method. The following are our arrays − int[] val1 = { 15, 20, 40, 60, 75, 90 }; int[] val2 = { 17, 25, 35, 55, 75, 90 }; To perform intersection. val1.AsQueryable().Intersect(val2); Let us see the entire example. Live Demo using System; using System.Collect...
[ { "code": null, "e": 1132, "s": 1062, "text": "Find common elements between two arrays using the Intersect() method." }, { "code": null, "e": 1163, "s": 1132, "text": "The following are our arrays −" }, { "code": null, "e": 1245, "s": 1163, "text": "int[] val1...
Check given matrix is magic square or not - GeeksforGeeks
10 Jun, 2021 Given a matrix, check whether it’s Magic Square or not. A Magic Square is a n x n matrix of the distinct elements from 1 to n2 where the sum of any row, column, or diagonal is always equal to the same number.Examples: Input : n = 3 2 7 6 9 5 1 4 3 8 Output : Magic matrix Explanation:In ...
[ { "code": null, "e": 24624, "s": 24596, "text": "\n10 Jun, 2021" }, { "code": null, "e": 24844, "s": 24624, "text": "Given a matrix, check whether it’s Magic Square or not. A Magic Square is a n x n matrix of the distinct elements from 1 to n2 where the sum of any row, column, or...
How to print date in a regular format in Python?
If you print the dates directly using a print function, you'd get regular dates, import datetime today = datetime.date.today() print(today) You will get the output − 2018-1-2 which is exactly what you want. But when you append this to a list and then try to print it, import datetime my_list = [] today = datetime.date...
[ { "code": null, "e": 1144, "s": 1062, "text": "If you print the dates directly using a print function, you'd get regular dates, " }, { "code": null, "e": 1203, "s": 1144, "text": "import datetime\ntoday = datetime.date.today()\nprint(today)" }, { "code": null, "e": 12...
Declaring a Fallback Color in CSS
Fallback color is used to specify the color for a situation when the browser doesn’t support RGBA colors. Some browsers that doesn’t support fallback colors are opera 9 and below, IE 8 and below etc. Specify a solid color before a RGBA color so the solid color can still work if the browser doesn’t support the RGBA colo...
[ { "code": null, "e": 1386, "s": 1062, "text": "Fallback color is used to specify the color for a situation when the browser doesn’t support RGBA colors. Some browsers that doesn’t support fallback colors are opera 9 and below, IE 8 and below etc. Specify a solid color before a RGBA color so the soli...
Boruvka's algorithm | Greedy Algo-9 - GeeksforGeeks
25 Feb, 2022 We have discussed following topics on Minimum Spanning Tree.Applications of Minimum Spanning Tree Problem Kruskal’s Minimum Spanning Tree Algorithm Prim’s Minimum Spanning Tree AlgorithmIn this post, Boruvka’s algorithm is discussed. Like Prim’s and Kruskal’s, Boruvka’s algorithm is also a Greedy algorithm...
[ { "code": null, "e": 25334, "s": 25306, "text": "\n25 Feb, 2022" }, { "code": null, "e": 25673, "s": 25334, "text": "We have discussed following topics on Minimum Spanning Tree.Applications of Minimum Spanning Tree Problem Kruskal’s Minimum Spanning Tree Algorithm Prim’s Minimum ...
Associative arrays in C++
In c++ programming language, an associative array is a special type of array in which the index value can be of any data type i.e. it can be char, float, string, etc. These associative arrays are also known as maps or dictionaries. Also, the indexes are given a different name which is key and the data that is stored at...
[ { "code": null, "e": 1417, "s": 1062, "text": "In c++ programming language, an associative array is a special type of array in which the index value can be of any data type i.e. it can be char, float, string, etc. These associative arrays are also known as maps or dictionaries. Also, the indexes are...
How to resolve "Expected BEGIN_OBJECT but was BEGIN_ARRAY" using Gson in Java?
While deserializing, a Gson can expect a JSON object but it can find a JSON array. Since it can't convert from one to the other, it can throw an error as "JsonSyntaxException: java.lang.IllegalStateException: Expected BEGIN_OBJECT but was BEGIN_ARRAY" at the runtime. import com.google.gson.Gson; public class GsonErrorT...
[ { "code": null, "e": 1330, "s": 1062, "text": "While deserializing, a Gson can expect a JSON object but it can find a JSON array. Since it can't convert from one to the other, it can throw an error as \"JsonSyntaxException: java.lang.IllegalStateException: Expected BEGIN_OBJECT but was BEGIN_ARRAY\"...
Introduction of Shared Memory Segment - GeeksforGeeks
14 Jun, 2021 Introduction of Shared Memory Segment :The quickest kind of IPC accessible is shared memory. There is no kernel participation in transmitting data between processes after the memory is mapped into the address space of the processes that are sharing the memory region. However, some type of synchronization b...
[ { "code": null, "e": 25659, "s": 25631, "text": "\n14 Jun, 2021" }, { "code": null, "e": 26329, "s": 25659, "text": "Introduction of Shared Memory Segment :The quickest kind of IPC accessible is shared memory. There is no kernel participation in transmitting data between processe...
Sum of two large numbers | Practice | GeeksforGeeks
Given two strings denoting non-negative numbers X and Y. Calculate the sum of X and Y. Example 1: Input: X = "25", Y = "23" Output: 48 Explanation: The sum of 25 and 23 is 48. Example 2: Input: X = "2500", Y = "23" Output: 2523 Explanation: The sum of 2500 and 23 is 2523. Your Task: Your task is to complete the func...
[ { "code": null, "e": 326, "s": 238, "text": "Given two strings denoting non-negative numbers X and Y. Calculate the sum of X and Y. " }, { "code": null, "e": 338, "s": 326, "text": "\nExample 1:" }, { "code": null, "e": 416, "s": 338, "text": "Input:\nX = \"25...
Static functions in C - GeeksforGeeks
24 Aug, 2020 Prerequisite : Static variables in C In C, functions are global by default. The “static” keyword before a function name makes it static. For example, below function fun() is static. static int fun(void){ printf("I am a static function ");} Unlike global functions in C, access to static functions is restri...
[ { "code": null, "e": 26220, "s": 26192, "text": "\n24 Aug, 2020" }, { "code": null, "e": 26257, "s": 26220, "text": "Prerequisite : Static variables in C" }, { "code": null, "e": 26402, "s": 26257, "text": "In C, functions are global by default. The “static” k...
Google Colab - Quick Guide
Google is quite aggressive in AI research. Over many years, Google developed AI framework called TensorFlow and a development tool called Colaboratory. Today TensorFlow is open-sourced and since 2017, Google made Colaboratory free for public use. Colaboratory is now known as Google Colab or simply Colab. Another attrac...
[ { "code": null, "e": 2347, "s": 2041, "text": "Google is quite aggressive in AI research. Over many years, Google developed AI framework called TensorFlow and a development tool called Colaboratory. Today TensorFlow is open-sourced and since 2017, Google made Colaboratory free for public use. Colabo...
Bootstrap 5 | Breadcrumb - GeeksforGeeks
29 Jul, 2020 Bootstrap 5 is the latest major release by Bootstrap in which they have revamped the UI and made various changes. Breadcrumbs are used to indicate the current page’s location within a navigational hierarchy. Syntax: <ol class="breadcrumb"> <li class="breadcrumb-item"> Content .. </li> </ol> Example 1: Th...
[ { "code": null, "e": 28440, "s": 28412, "text": "\n29 Jul, 2020" }, { "code": null, "e": 28648, "s": 28440, "text": "Bootstrap 5 is the latest major release by Bootstrap in which they have revamped the UI and made various changes. Breadcrumbs are used to indicate the current page...
Lodash - groupBy method
_.groupBy(collection, [iteratee=_.identity]) Creates an object composed of keys generated from the results of running each element of collection thru iteratee. The order of grouped values is determined by the order they occur in collection. The corresponding value of each key is an array of elements responsible for ge...
[ { "code": null, "e": 1873, "s": 1827, "text": "_.groupBy(collection, [iteratee=_.identity])\n" }, { "code": null, "e": 2217, "s": 1873, "text": "Creates an object composed of keys generated from the results of running each element of collection thru iteratee. The order of grouped...
Closest numbers from a list of unsorted integers - GeeksforGeeks
08 Apr, 2021 Given a list of distinct unsorted integers, find the pair of elements that have the smallest absolute difference between them? If there are multiple pairs, find them all.Examples: Input : arr[] = {10, 50, 12, 100} Output : (10, 12) The closest elements are 10 and 12 Input : arr[] = {5, 4, 3, 2} Output :...
[ { "code": null, "e": 24429, "s": 24401, "text": "\n08 Apr, 2021" }, { "code": null, "e": 24611, "s": 24429, "text": "Given a list of distinct unsorted integers, find the pair of elements that have the smallest absolute difference between them? If there are multiple pairs, find th...
Notes about saving data with Spark 3.0 | by David Vrba | Towards Data Science
Apache Spark is a computational engine frequently used in a big data environment for data processing but it doesn’t provide storage so in a typical scenario the output of the data processing has to be stored in an external storage system. Spark SQL provides a couple of connectors for datasources such as file format (CS...
[ { "code": null, "e": 775, "s": 171, "text": "Apache Spark is a computational engine frequently used in a big data environment for data processing but it doesn’t provide storage so in a typical scenario the output of the data processing has to be stored in an external storage system. Spark SQL provid...
Change string to a new character set - GeeksforGeeks
24 Feb, 2022 Given a 26 letter character set, which is equivalent to character set of English alphabet i.e. (abcd....xyz) and act as a relation. We are also given several sentences and we have to translate them with the help of given new character set. Examples: New character set : qwertyuiopasdfghjklzxcvbnm Input : "...
[ { "code": null, "e": 26391, "s": 26363, "text": "\n24 Feb, 2022" }, { "code": null, "e": 26631, "s": 26391, "text": "Given a 26 letter character set, which is equivalent to character set of English alphabet i.e. (abcd....xyz) and act as a relation. We are also given several sente...
Count of lines required to write the given String - GeeksforGeeks
29 Jul, 2021 Given a string str and an integer array width[] where: width[0] = width of character ‘a’ width[1] = width of character ‘b’ ... width[25] = width of character ‘z’ The task is to find the number of lines it’ll take to write the string str on a paper and the width of the last line upto which it is occupie...
[ { "code": null, "e": 26561, "s": 26533, "text": "\n29 Jul, 2021" }, { "code": null, "e": 26618, "s": 26561, "text": "Given a string str and an integer array width[] where: " }, { "code": null, "e": 26727, "s": 26618, "text": "width[0] = width of character ‘a’...
Autocorrelation plot using Matplotlib - GeeksforGeeks
06 Aug, 2021 Autocorrelation plots are a commonly used tool for checking randomness in a data set. This randomness is ascertained by computing autocorrelations for data values at varying time lags. Characteristics Of Autocorrelation Plot : It measures a set of current values against a set of past values and finds whet...
[ { "code": null, "e": 26039, "s": 26011, "text": "\n06 Aug, 2021" }, { "code": null, "e": 26224, "s": 26039, "text": "Autocorrelation plots are a commonly used tool for checking randomness in a data set. This randomness is ascertained by computing autocorrelations for data values ...
How to generate random number in given range using JavaScript? - GeeksforGeeks
23 Apr, 2019 A number generated by a process, whose outcome is unpredictable is called Random Number. In JavaScript, this can be achieved by using Math.random() function. This article describes how to generate a random number using JavaScript. Method 1: Using Math.random() function: The Math.random() function is used t...
[ { "code": null, "e": 26021, "s": 25993, "text": "\n23 Apr, 2019" }, { "code": null, "e": 26252, "s": 26021, "text": "A number generated by a process, whose outcome is unpredictable is called Random Number. In JavaScript, this can be achieved by using Math.random() function. This ...
How to use if, else and not statements in Ember.js ? - GeeksforGeeks
23 Nov, 2021 Ember.js is a framework for web development. It makes the process of development and prototyping faster with its tools. We can create dynamic web pages with it. Based on the dynamic data, we may or may not want to display some data or some UI or modify the UI. So we will learn to use If, Else and Not in an...
[ { "code": null, "e": 26545, "s": 26517, "text": "\n23 Nov, 2021" }, { "code": null, "e": 26875, "s": 26545, "text": "Ember.js is a framework for web development. It makes the process of development and prototyping faster with its tools. We can create dynamic web pages with it. Ba...
Program to find Nth term divisible by a or b - GeeksforGeeks
02 Jun, 2021 Given two integers and . The task is to find the Nth term which is divisible by either of or .Examples : Input : a = 2, b = 5, N = 10 Output : 16 Input : a = 3, b = 7, N = 25 Output : 57 Naive Approach: A simple approach is to traverse over all the terms starting from 1 until we find the desired Nth t...
[ { "code": null, "e": 26535, "s": 26507, "text": "\n02 Jun, 2021" }, { "code": null, "e": 26642, "s": 26535, "text": "Given two integers and . The task is to find the Nth term which is divisible by either of or .Examples : " }, { "code": null, "e": 26725, "s": 266...
Generate a permutation of first N natural numbers from an array of differences between adjacent elements - GeeksforGeeks
25 Feb, 2022 Given an array arr[] consisting of (N – 1), the task is to construct a permutation array P[] consisting of the first N Natural Numbers such that arr[i] = (P[i +1] – P[i]). If there exists no such permutation, then print “-1”. Examples: Input: arr[] = {-1, 2, -3, -1}Output: 4 3 5 2 1Explanation:For the arra...
[ { "code": null, "e": 26067, "s": 26039, "text": "\n25 Feb, 2022" }, { "code": null, "e": 26293, "s": 26067, "text": "Given an array arr[] consisting of (N – 1), the task is to construct a permutation array P[] consisting of the first N Natural Numbers such that arr[i] = (P[i +1] ...
DQL Full Form - GeeksforGeeks
30 Sep, 2021 Structured Query Language (SQL) is a nonprocedural language used for retrieving data from the queries. It was introduced by IBM as a part of the R project. It was declared as a standard language by ANSI and ISO. DQL statements are used for performing queries on the data within schema objects. The purpose o...
[ { "code": null, "e": 25575, "s": 25547, "text": "\n30 Sep, 2021" }, { "code": null, "e": 26586, "s": 25575, "text": "Structured Query Language (SQL) is a nonprocedural language used for retrieving data from the queries. It was introduced by IBM as a part of the R project. It was ...
Arithmetic Number - GeeksforGeeks
30 Nov, 2021 In number theory, an arithmetic number is an integer for which the average of its positive divisors is also an integer. Or in other words, a number N is arithmetic if the number of divisors divides the sum of divisors. Given a positive integer n. The task is to check whether n is Arithmetic number or not.E...
[ { "code": null, "e": 25961, "s": 25933, "text": "\n30 Nov, 2021" }, { "code": null, "e": 26279, "s": 25961, "text": "In number theory, an arithmetic number is an integer for which the average of its positive divisors is also an integer. Or in other words, a number N is arithmetic...
SIGN() Function in SQL Server - GeeksforGeeks
30 Dec, 2020 SIGN() function :This function in SQL Server is used to return the sign of the specified number. It returns 1 if the number is positive, -1 if the number is negative and 0 for zero number. Features : This function is used to find the sign of the given number i.e., that given number is positive or negative ...
[ { "code": null, "e": 25513, "s": 25485, "text": "\n30 Dec, 2020" }, { "code": null, "e": 25702, "s": 25513, "text": "SIGN() function :This function in SQL Server is used to return the sign of the specified number. It returns 1 if the number is positive, -1 if the number is negati...
PHP | mysqli_real_escape_string() Function - GeeksforGeeks
16 Oct, 2021 The mysqli_real_escape_string() function is an inbuilt function in PHP which is used to escape all special characters for use in an SQL query. It is used before inserting a string in a database, as it removes any special characters that may interfere with the query operations. When simple strings are used,...
[ { "code": null, "e": 42163, "s": 42135, "text": "\n16 Oct, 2021" }, { "code": null, "e": 42753, "s": 42163, "text": "The mysqli_real_escape_string() function is an inbuilt function in PHP which is used to escape all special characters for use in an SQL query. It is used before in...
How to store Data Triplet in a Vector in C++?
06 Jul, 2017 Given a vector, how can we store 3 elements in one cell of vector. Examples: Input : 2 5 10 3 6 15 Output : (2, 5, 10) // In first cell of vector (3, 6, 15) // In second cell of vector One solution is to create a user defined class or structure. We create a structure with three members,...
[ { "code": null, "e": 52, "s": 24, "text": "\n06 Jul, 2017" }, { "code": null, "e": 119, "s": 52, "text": "Given a vector, how can we store 3 elements in one cell of vector." }, { "code": null, "e": 129, "s": 119, "text": "Examples:" }, { "code": null, ...
SAP ABAP - If...Else Statement
In case of IF....ELSE statements, if the expression evaluates to true then the IF block of code will be executed. Otherwise, ELSE block of code will be executed. The following syntax is used for IF....ELSE statement. IF<condition_1>. <statement block 1>. ELSE. <statement block 2>. ENDIF. Report YH_SEP_1...
[ { "code": null, "e": 3194, "s": 3032, "text": "In case of IF....ELSE statements, if the expression evaluates to true then the IF block of code will be executed. Otherwise, ELSE block of code will be executed." }, { "code": null, "e": 3249, "s": 3194, "text": "The following syntax...
Recursive insertion and traversal linked list
03 Jul, 2022 We have discussed different methods of linked list insertion. How to recursively create a linked list? Recursively inserting at the end: To create a Linked list using recursion follow these steps. Below steps insert a new node recursively at the end of linked list. C++ Java Python3 C# Javascript // Funct...
[ { "code": null, "e": 54, "s": 26, "text": "\n03 Jul, 2022" }, { "code": null, "e": 157, "s": 54, "text": "We have discussed different methods of linked list insertion. How to recursively create a linked list?" }, { "code": null, "e": 322, "s": 157, "text": "Re...
Program to build a DFA that checks if a string ends with “01” or “10”
10 May, 2021 DFA or Deterministic Finite Automata is a finite state machine which accepts a string(under some specific condition) if it reaches a final state, otherwise rejects it.Problem: Given a string of ‘0’s and ‘1’s character by character, check for the last two characters to be “01” or “10” else reject the string...
[ { "code": null, "e": 28, "s": 0, "text": "\n10 May, 2021" }, { "code": null, "e": 926, "s": 28, "text": "DFA or Deterministic Finite Automata is a finite state machine which accepts a string(under some specific condition) if it reaches a final state, otherwise rejects it.Problem:...
Check whether the given character is in upper case, lower case or non alphabetic character
09 Jun, 2022 Given a character, the task is to check whether the given character is in upper case, lower case, or non-alphabetic character Examples: Input: ch = 'A' Output: A is an UpperCase character Input: ch = 'a' Output: a is an LowerCase character Input: ch = '0' Output: 0 is not an aplhabetic character Appr...
[ { "code": null, "e": 54, "s": 26, "text": "\n09 Jun, 2022" }, { "code": null, "e": 192, "s": 54, "text": "Given a character, the task is to check whether the given character is in upper case, lower case, or non-alphabetic character Examples: " }, { "code": null, "e":...
Python Interview Questions
Dear readers, these Python Programming Language Interview Questions have been designed specially to get you acquainted with the nature of questions you may encounter during your interview for the subject of Python Programming Language. As per my experience good interviewers hardly plan to ask any particular question du...
[ { "code": null, "e": 2857, "s": 2378, "text": "Dear readers, these Python Programming Language Interview Questions have been designed specially to get you acquainted with the nature of questions you may encounter during your interview for the subject of Python Programming Language. As per my experie...
Lodash _.hasIn() Method
09 Sep, 2020 The _.hasIn() method is used to check whether the path is a direct or inherited property of object or not. It returns true if path exists, else it returns false. Syntax: _.hasIn(object, path) Parameters: This method accepts two parameters as mentioned above and described below: object: This parameter hold...
[ { "code": null, "e": 28, "s": 0, "text": "\n09 Sep, 2020" }, { "code": null, "e": 190, "s": 28, "text": "The _.hasIn() method is used to check whether the path is a direct or inherited property of object or not. It returns true if path exists, else it returns false." }, { ...
Red Hat Interview Experience | Set 1 (For Internship)
30 Dec, 2014 I am doing my final year B.E CSE. I would like to thank geeksforgeeks. It helped a lot for cracking the interview. I applied online for the post of a Associate software Engineer Intern at Red hat, Bangalore. The first round was a written test round. We had nearly around 30 questions in aptitude as well as ...
[ { "code": null, "e": 52, "s": 24, "text": "\n30 Dec, 2014" }, { "code": null, "e": 260, "s": 52, "text": "I am doing my final year B.E CSE. I would like to thank geeksforgeeks. It helped a lot for cracking the interview. I applied online for the post of a Associate software Engin...
How do I plot Shapely polygons and objects using Matplotlib?
To plot shapely polygons and objects using matplotlib, the steps are as follows − Create a polygon object using (x, y) data points. Create a polygon object using (x, y) data points. Get x and y, the exterior data, and the array using polygon.exterior.xy. Get x and y, the exterior data, and the array using polygon.exter...
[ { "code": null, "e": 1269, "s": 1187, "text": "To plot shapely polygons and objects using matplotlib, the steps are as follows −" }, { "code": null, "e": 1319, "s": 1269, "text": "Create a polygon object using (x, y) data points." }, { "code": null, "e": 1369, "s"...
Count ways to build street under given constraints
20 Sep, 2021 There is a street of length n and as we know it has two sides. Therefore a total of 2 * n spots are available. In each of these spots either a house or an office can be built with following 2 restrictions: 1. No two offices on the same side of the street can be adjacent. 2. No two offices on different sid...
[ { "code": null, "e": 52, "s": 24, "text": "\n20 Sep, 2021" }, { "code": null, "e": 259, "s": 52, "text": "There is a street of length n and as we know it has two sides. Therefore a total of 2 * n spots are available. In each of these spots either a house or an office can be built...
Lock Variable Synchronization Mechanism
17 Dec, 2021 Prerequisites – Process SynchronizationA lock variable provides the simplest synchronization mechanism for processes. Some noteworthy points regarding Lock Variables are- Its a software mechanism implemented in user mode, i.e. no support required from the Operating System.Its a busy waiting solution (keep...
[ { "code": null, "e": 54, "s": 26, "text": "\n17 Dec, 2021" }, { "code": null, "e": 226, "s": 54, "text": "Prerequisites – Process SynchronizationA lock variable provides the simplest synchronization mechanism for processes. Some noteworthy points regarding Lock Variables are- " ...
How to Toggle an Element Class in JavaScript ?
16 Apr, 2020 Toggling the class means if there is no class name assigned to the element, then a class name can be assigned to it dynamically or if a certain class is already present, then it can be removed dynamically by just using the toggle() or by using contains(), add(), remove() methods of DOMTokenList object with...
[ { "code": null, "e": 52, "s": 24, "text": "\n16 Apr, 2020" }, { "code": null, "e": 374, "s": 52, "text": "Toggling the class means if there is no class name assigned to the element, then a class name can be assigned to it dynamically or if a certain class is already present, then...
Node.js - Path Module
Node.js path module is used for handling and transforming file paths. This module can be imported using the following syntax. var path = require("path") path.normalize(p) Normalize a string path, taking care of '..' and '.' parts. path.join([path1][, path2][, ...]) Join all the arguments together and normalize the res...
[ { "code": null, "e": 2278, "s": 2152, "text": "Node.js path module is used for handling and transforming file paths. This module can be imported using the following syntax." }, { "code": null, "e": 2306, "s": 2278, "text": "var path = require(\"path\")\n" }, { "code": nul...
Multiline Strings in Perl
If you want to introduce multiline strings into your programs, you can use the standard single quotes as below − Live Demo #!/usr/bin/perl $string = 'This is a multiline string'; print "$string\n"; This will produce the following result − This is a multiline string You can use "here" document syntax as well to store o...
[ { "code": null, "e": 1300, "s": 1187, "text": "If you want to introduce multiline strings into your programs, you can use the standard single quotes as below −" }, { "code": null, "e": 1311, "s": 1300, "text": " Live Demo" }, { "code": null, "e": 1386, "s": 1311, ...
Deploying models to production with TensorFlow model server | by Rishit Dagli | Towards Data Science
Model creation is definitely an important part of AI applications but it is very important to also know what after training. I will be showing how you could serve TensorFlow models over HTTP and HTTPS and do things like model versioning or model server maintenance easily with TF Model Server. You will also see the step...
[ { "code": null, "e": 625, "s": 172, "text": "Model creation is definitely an important part of AI applications but it is very important to also know what after training. I will be showing how you could serve TensorFlow models over HTTP and HTTPS and do things like model versioning or model server ma...
How to check if array contains a duplicate number using C#?
Firstly, set an array − int[] arr = { 87, 55, 23, 87, 45, 23, 98 }; Now declare a dictionary and loop through the array and get the count of all the elements. The value you get from the dictionary displays the occurrence of numbers − foreach(var count in arr) { if (dict.ContainsKey(count)) di...
[ { "code": null, "e": 1086, "s": 1062, "text": "Firstly, set an array −" }, { "code": null, "e": 1151, "s": 1086, "text": "int[] arr = {\n 87,\n 55,\n 23,\n 87,\n 45,\n 23,\n 98\n};" }, { "code": null, "e": 1317, "s": 1151, "text": "Now declare a ...
Java Program to Check If a Number is Spy number or not - GeeksforGeeks
04 Jan, 2021 A number is said to be a Spy number if the sum of all the digits is equal to the product of all digits. For performing the task we need to reverse through the number which will take log(N) time. Example: Input : 22 Output: Given number is a SPY number. Explanation: Sum of the number is 4 (2 + 2) ...
[ { "code": null, "e": 23629, "s": 23598, "text": " \n04 Jan, 2021\n" }, { "code": null, "e": 23824, "s": 23629, "text": "A number is said to be a Spy number if the sum of all the digits is equal to the product of all digits. For performing the task we need to reverse through the n...
How to iterate over dictionaries using 'for' loops in Python?
Even though dictionary itself is not an iterable object, the items(), keys() and values methods return iterable view objects which can be used to iterate through dictionary. The items() method returns a list of tuples, each tuple being key and value pair. >>> d1={'name': 'Ravi', 'age': 23, 'marks': 56} >>> for t in d1....
[ { "code": null, "e": 1236, "s": 1062, "text": "Even though dictionary itself is not an iterable object, the items(), keys() and values methods return iterable view objects which can be used to iterate through dictionary." }, { "code": null, "e": 1318, "s": 1236, "text": "The item...
Matplotlib.figure.Figure.colorbar() in Python
30 Apr, 2020 Matplotlib is a library in Python and it is numerical – mathematical extension for NumPy library. The figure module provides the top-level Artist, the Figure, which contains all the plot elements. This module is used to control the default spacing of the subplots and top level container for all plot elemen...
[ { "code": null, "e": 28, "s": 0, "text": "\n30 Apr, 2020" }, { "code": null, "e": 339, "s": 28, "text": "Matplotlib is a library in Python and it is numerical – mathematical extension for NumPy library. The figure module provides the top-level Artist, the Figure, which contains a...
numpy.sinh() in Python
04 Dec, 2020 The numpy.sinh() is a mathematical function that helps user to calculate hyperbolic sine for all x(being the array elements). Equivalent to 1/2 * (np.exp(x) – np.exp(-x)) or -1j * np.sin(1j*x). Syntax: numpy.sinh(x[, out]) = ufunc ‘sin’)Parameters : array : [array_like] elements are in radians.2pi Radians ...
[ { "code": null, "e": 28, "s": 0, "text": "\n04 Dec, 2020" }, { "code": null, "e": 154, "s": 28, "text": "The numpy.sinh() is a mathematical function that helps user to calculate hyperbolic sine for all x(being the array elements)." }, { "code": null, "e": 222, "s"...
How to validate email address using RegExp in JavaScript ?
20 Sep, 2019 Given an email id and the task is to validate the email id is valid or not. The validation of email is done with the help of Regular Expressions. Approach 1: RegExp – It checks for the valid characters in the Email-Id (like, numbers, alphabets, few special characters.) It is allowing every special symbol i...
[ { "code": null, "e": 28, "s": 0, "text": "\n20 Sep, 2019" }, { "code": null, "e": 174, "s": 28, "text": "Given an email id and the task is to validate the email id is valid or not. The validation of email is done with the help of Regular Expressions." }, { "code": null, ...