title stringlengths 3 221 | text stringlengths 17 477k | parsed listlengths 0 3.17k |
|---|---|---|
Newman-Conway Sequence - GeeksforGeeks | 16 Apr, 2021
Newman-Conway Sequence is the one which generates the following integer sequence. 1 1 2 2 3 4 4 4 5 6 7 7...In mathematical terms, the sequence P(n) of Newman-Conway numbers is defined by recurrence relation
P(n) = P(P(n - 1)) + P(n - P(n - 1))
with seed values P(1) = 1 and P(2) = 1Given a number n, prin... | [
{
"code": null,
"e": 24966,
"s": 24938,
"text": "\n16 Apr, 2021"
},
{
"code": null,
"e": 25175,
"s": 24966,
"text": "Newman-Conway Sequence is the one which generates the following integer sequence. 1 1 2 2 3 4 4 4 5 6 7 7...In mathematical terms, the sequence P(n) of Newman-Conw... |
Passing By Pointer Vs Passing By Reference in C++ - GeeksforGeeks | 13 Jan, 2022
In C++, we can pass parameters to a function either by pointers or by reference. In both cases, we get the same result. So, what is the difference between Passing by Pointer and Passing by Reference in C++?
Lets first understand what Passing by Pointer and Passing by Reference in C++ mean:1) Passing by Poi... | [
{
"code": null,
"e": 24308,
"s": 24280,
"text": "\n13 Jan, 2022"
},
{
"code": null,
"e": 24515,
"s": 24308,
"text": "In C++, we can pass parameters to a function either by pointers or by reference. In both cases, we get the same result. So, what is the difference between Passing ... |
C# | String class - GeeksforGeeks | 23 Jan, 2019
In C#, a string is a sequence of Unicode characters or array of characters.
The range of Unicode characters will be U+0000 to U+FFFF. The array of characters is also termed as the text. So the string is the representation of the text. A string is represented by a class System.String.The String class is def... | [
{
"code": null,
"e": 25378,
"s": 25350,
"text": "\n23 Jan, 2019"
},
{
"code": null,
"e": 25454,
"s": 25378,
"text": "In C#, a string is a sequence of Unicode characters or array of characters."
},
{
"code": null,
"e": 25920,
"s": 25454,
"text": "The range of U... |
How to call a method of a class in C# | To call a method, use the name of the method after the object name, for example, −
obj1. Display();
Let’s say the class name is ApplicationOne, so to call the method −
ApplicationOne one = new ApplicationOne();
//calling the displayMax method
ret = one.displayMax(a, b);
The following is the example showing how to call... | [
{
"code": null,
"e": 1145,
"s": 1062,
"text": "To call a method, use the name of the method after the object name, for example, −"
},
{
"code": null,
"e": 1162,
"s": 1145,
"text": "obj1. Display();"
},
{
"code": null,
"e": 1230,
"s": 1162,
"text": "Let’s say t... |
Angular ng Bootstrap Alert Component - GeeksforGeeks | 06 Jul, 2021
Angular ng bootstrap is a bootstrap framework used with angular to create components with great styling and this framework is very easy to use and is used to make responsive websites.
In this article, we will see how to use Alert in angular ng bootstrap. Alert is used to provide contextual feedback message... | [
{
"code": null,
"e": 26354,
"s": 26326,
"text": "\n06 Jul, 2021"
},
{
"code": null,
"e": 26538,
"s": 26354,
"text": "Angular ng bootstrap is a bootstrap framework used with angular to create components with great styling and this framework is very easy to use and is used to make ... |
Count ways to reach the n'th stair | Practice | GeeksforGeeks | There are n stairs, a person standing at the bottom wants to reach the top. The person can climb either 1 stair or 2 stairs at a time. Count the number of ways, the person can reach the top (order does matter).
Example 1:
Input:
n = 4
Output: 5
Explanation:
You can reach 4th stair in 5 ways.
Way 1: Climb 2 stairs at a... | [
{
"code": null,
"e": 449,
"s": 238,
"text": "There are n stairs, a person standing at the bottom wants to reach the top. The person can climb either 1 stair or 2 stairs at a time. Count the number of ways, the person can reach the top (order does matter)."
},
{
"code": null,
"e": 460,
... |
Java Program to evaluate mathematical expressions in String | To evaluate mathematical expression in String, use Nashorn JavaScript in Java i.e. scripting. Nashorn invoke dynamics feature, introduced in Java 7 to improve performance.
For scripting, use the ScriptEngineManager class for the engine −
ScriptEngineManager scriptEngineManager = new ScriptEngineManager();
ScriptEngine ... | [
{
"code": null,
"e": 1234,
"s": 1062,
"text": "To evaluate mathematical expression in String, use Nashorn JavaScript in Java i.e. scripting. Nashorn invoke dynamics feature, introduced in Java 7 to improve performance."
},
{
"code": null,
"e": 1300,
"s": 1234,
"text": "For script... |
A Quick Introduction to the “Pandas” Python Library | by Adi Bronshtein | Towards Data Science | Hello everyone! Today I want to write about the Pandas library (link to the website). Pandas stands for “Python Data Analysis Library”. According to the Wikipedia page on Pandas, “the name is derived from the term “panel data”, an econometrics term for multidimensional structured data sets.” But I think it’s just a cut... | [
{
"code": null,
"e": 533,
"s": 172,
"text": "Hello everyone! Today I want to write about the Pandas library (link to the website). Pandas stands for “Python Data Analysis Library”. According to the Wikipedia page on Pandas, “the name is derived from the term “panel data”, an econometrics term for mu... |
Logistic Regression Explained from Scratch (Visually, Mathematically and Programmatically) | by Abhibhav Sharma | Towards Data Science | A plethora of results appear on a small google search “Logistic Regression”. Sometimes it gets very confusing for beginners in data science, to get around the main idea behind logistic regression. And why wouldn't they be confused!!? Every different tutorial, article, or forum has a different narration on Logistic Regr... | [
{
"code": null,
"e": 998,
"s": 172,
"text": "A plethora of results appear on a small google search “Logistic Regression”. Sometimes it gets very confusing for beginners in data science, to get around the main idea behind logistic regression. And why wouldn't they be confused!!? Every different tutor... |
Analysis of Algorithms | Set 2 (Worst, Average and Best Cases) - GeeksforGeeks | 26 Jan, 2022
In the previous post, we discussed how Asymptotic analysis overcomes the problems of the naive way of analyzing algorithms. In this post, we will take an example of Linear Search and analyze it using Asymptotic analysis.We can have three cases to analyze an algorithm: 1) The Worst Case 2) Average Case 3) B... | [
{
"code": null,
"e": 34514,
"s": 34486,
"text": "\n26 Jan, 2022"
},
{
"code": null,
"e": 34894,
"s": 34514,
"text": "In the previous post, we discussed how Asymptotic analysis overcomes the problems of the naive way of analyzing algorithms. In this post, we will take an example o... |
Minimum Remove to Make Valid Parentheses in C++ | Suppose we have a string s of '(' , ')' and lowercase English characters. We have to remove the minimum number of parentheses ( '(' or ')', in any positions ) so that the resulting parenthese string is valid and return any valid string. A parentheses string is valid when all of these criteria are fulfilled −
It is the ... | [
{
"code": null,
"e": 1372,
"s": 1062,
"text": "Suppose we have a string s of '(' , ')' and lowercase English characters. We have to remove the minimum number of parentheses ( '(' or ')', in any positions ) so that the resulting parenthese string is valid and return any valid string. A parentheses st... |
Minimum Depth of a Binary Tree | Practice | GeeksforGeeks | Given a binary tree, find its minimum depth.
Example 1:
Input:
1
/ \
3 2
/
4
Output: 2
Explanation:
Minimum depth is between nodes 1 and 2 since
minimum depth is defined as the number of
nodes along the shortest path from the root
node down to the near... | [
{
"code": null,
"e": 283,
"s": 238,
"text": "Given a binary tree, find its minimum depth."
},
{
"code": null,
"e": 294,
"s": 283,
"text": "Example 1:"
},
{
"code": null,
"e": 573,
"s": 294,
"text": "Input:\n 1\n / \\\n 3 2\n ... |
Draw Dot Patterns Using Turtle in Python - GeeksforGeeks | 10 Jul, 2020
Prerequisite: Turtle Programming Basics
Turtle is an inbuilt module in Python. It provides drawing using a screen (cardboard) and turtle (pen). To draw something on the screen, we need to move the turtle (pen). To move turtle, there are some functions i.e forward(), backward(), etc.
Following steps are use... | [
{
"code": null,
"e": 23901,
"s": 23873,
"text": "\n10 Jul, 2020"
},
{
"code": null,
"e": 23941,
"s": 23901,
"text": "Prerequisite: Turtle Programming Basics"
},
{
"code": null,
"e": 24185,
"s": 23941,
"text": "Turtle is an inbuilt module in Python. It provides... |
Building a Sentiment Classifier using Scikit-Learn | by Dorian Lazar | Towards Data Science | Sentiment analysis, an important area in Natural Language Processing, is the process of automatically detecting affective states of text. Sentiment analysis is widely applied to voice-of-customer materials such as product reviews in online shopping websites like Amazon, movie reviews or social media. It can be just a b... | [
{
"code": null,
"e": 655,
"s": 171,
"text": "Sentiment analysis, an important area in Natural Language Processing, is the process of automatically detecting affective states of text. Sentiment analysis is widely applied to voice-of-customer materials such as product reviews in online shopping websit... |
Python 3 - dictionary copy() Method | The method copy() returns a shallow copy of the dictionary.
Following is the syntax for copy() method −
dict.copy()
NA
This method returns a shallow copy of the dictionary.
The following example shows the usage of copy() method.
#!/usr/bin/python3
dict1 = {'Name': 'Manni', 'Age': 7, 'Class': 'First'}
dict2 = dict1.co... | [
{
"code": null,
"e": 2400,
"s": 2340,
"text": "The method copy() returns a shallow copy of the dictionary."
},
{
"code": null,
"e": 2444,
"s": 2400,
"text": "Following is the syntax for copy() method −"
},
{
"code": null,
"e": 2457,
"s": 2444,
"text": "dict.co... |
Deriving a Class in Java | A class can be derived from the base class in Java by using the extends keyword. This keyword is basically used to indicate that a new class is derived from the base class using inheritance. It can also be said that it is used to extend the functionality of the class.
A program that demonstrates this is given as follow... | [
{
"code": null,
"e": 1331,
"s": 1062,
"text": "A class can be derived from the base class in Java by using the extends keyword. This keyword is basically used to indicate that a new class is derived from the base class using inheritance. It can also be said that it is used to extend the functionalit... |
String format for Double in C# | Use the static method String.Format for form double string format in C#.
For three decimal places −
String.Format("{0:0.000}", 987.383);
String.Format("{0:0.000}", 987.38);
String.Format("{0:0.000}", 987.7899);
For thousands separator −
String.Format("{0:0,0.0}", 54567.46);
String.Format("{0:0,0}", 54567.46);
To format... | [
{
"code": null,
"e": 1135,
"s": 1062,
"text": "Use the static method String.Format for form double string format in C#."
},
{
"code": null,
"e": 1162,
"s": 1135,
"text": "For three decimal places −"
},
{
"code": null,
"e": 1273,
"s": 1162,
"text": "String.Form... |
Lodash _.dictionary() Method - GeeksforGeeks | 30 Sep, 2020
The Lodash _.dictionary() method returns a function that will attempt to look up a field that it is given.
Syntax:
funct = _.dictionary( object );
Parameters: This method accepts single parameter as mentioned above and described below:
object: This method takes the object from which the field is to be se... | [
{
"code": null,
"e": 25372,
"s": 25341,
"text": " \n30 Sep, 2020\n"
},
{
"code": null,
"e": 25479,
"s": 25372,
"text": "The Lodash _.dictionary() method returns a function that will attempt to look up a field that it is given."
},
{
"code": null,
"e": 25487,
"s": ... |
BigInt (BIG INTEGERS) in C++ with Example - GeeksforGeeks | 17 Feb, 2022
In C/C++ the number of digits a long long int can have is a maximum of 20. And the question is to store the 22 digit number which is not easy to store in any kind of primitive type. So to deal with this type of problem let’s design a new data type which is going to be called BigInt In this article, a few b... | [
{
"code": null,
"e": 24220,
"s": 24192,
"text": "\n17 Feb, 2022"
},
{
"code": null,
"e": 24587,
"s": 24220,
"text": "In C/C++ the number of digits a long long int can have is a maximum of 20. And the question is to store the 22 digit number which is not easy to store in any kind ... |
How to convert MySQL null to 0 using COALESCE() function? | You can use the COALESCE() function to convert MySQL null to 0
SELECT COALESCE(yourColumnName,0) AS anyAliasName FROM yourTableName;
Let us first create a table. The query to create a table is as follows
mysql> create table convertNullToZeroDemo
-> (
-> Id int NOT NULL AUTO_INCREMENT PRIMARY KEY,
-> Name varch... | [
{
"code": null,
"e": 1125,
"s": 1062,
"text": "You can use the COALESCE() function to convert MySQL null to 0"
},
{
"code": null,
"e": 1195,
"s": 1125,
"text": "SELECT COALESCE(yourColumnName,0) AS anyAliasName FROM yourTableName;"
},
{
"code": null,
"e": 1266,
"s... |
How to check if Pandas column has value from list of string? - GeeksforGeeks | 28 Nov, 2021
In this article, we are going to see how to check if the pandas column has a value from a list of strings in Python.
List of strings means a list contains strings as elements, we will check if the pandas dataframe has values from a list of strings and display them when they are present. We will get the dat... | [
{
"code": null,
"e": 24212,
"s": 24184,
"text": "\n28 Nov, 2021"
},
{
"code": null,
"e": 24329,
"s": 24212,
"text": "In this article, we are going to see how to check if the pandas column has a value from a list of strings in Python."
},
{
"code": null,
"e": 24573,
... |
How to Scrape Dynamic Web pages with Selenium and Beautiful Soup | by Alan Jones | Towards Data Science | Beautiful Soup is an excellent library for scraping data from the web but it doesn’t deal with dynamically created content. That’s not in any way a criticism — Beautiful Soup does precisely the job it is supposed to do and that does not include rendering the webpage as a browser would.
In order to get that dynamic cont... | [
{
"code": null,
"e": 459,
"s": 172,
"text": "Beautiful Soup is an excellent library for scraping data from the web but it doesn’t deal with dynamically created content. That’s not in any way a criticism — Beautiful Soup does precisely the job it is supposed to do and that does not include rendering ... |
Minimum steps for increasing and decreasing Array to reach either 0 or N - GeeksforGeeks | 28 Feb, 2022
Given an integer N and two arrays increasing[] and decreasing[], such that they have elements from 1 to N only. The task is to find the minimum number of steps for each element of the two arrays to reach either 0 or N. A step is defined as follows:
In one step, all the elements of the increasing[] array in... | [
{
"code": null,
"e": 26067,
"s": 26039,
"text": "\n28 Feb, 2022"
},
{
"code": null,
"e": 26316,
"s": 26067,
"text": "Given an integer N and two arrays increasing[] and decreasing[], such that they have elements from 1 to N only. The task is to find the minimum number of steps for... |
Split the given string into Primes : Digit DP - GeeksforGeeks | 02 Jun, 2021
Given a string str that represents a large number, the task is to find the minimum number of segments the given string can be divided such that each segment is a prime number in the range of 1 to 106.
Examples:
Input: str = “13499315” Output: 3 Explanation: The number can be segmented as [13499, 31, 5]
In... | [
{
"code": null,
"e": 26089,
"s": 26061,
"text": "\n02 Jun, 2021"
},
{
"code": null,
"e": 26290,
"s": 26089,
"text": "Given a string str that represents a large number, the task is to find the minimum number of segments the given string can be divided such that each segment is a p... |
Creating a table in Cassandra - GeeksforGeeks | 28 Apr, 2020
In this article, we are going to discuss how we can create a table in Cassandra and also discuss column definitions, keys role, Table options (compact storage and clustering order), etc.
In Cassandra, the CQL table has a name and it stores rows. when you create a table, you define the columns for the rows,... | [
{
"code": null,
"e": 25889,
"s": 25861,
"text": "\n28 Apr, 2020"
},
{
"code": null,
"e": 26076,
"s": 25889,
"text": "In this article, we are going to discuss how we can create a table in Cassandra and also discuss column definitions, keys role, Table options (compact storage and ... |
Replace every vowels with lexicographically next vowel in a String - GeeksforGeeks | 06 May, 2022
Given string str of size N, which contains lowercase English alphabets. The task is to replace each vowel with the next immediate vowel lexicographically, i.e.,
‘a’ will be replaced by ‘e’, ‘e’ will be replaced by ‘i’, ‘i’ will be replaced by ‘o’, ‘o’ will be replaced by ‘u’, ‘u’ will be replaced by ‘a’.
... | [
{
"code": null,
"e": 26066,
"s": 26038,
"text": "\n06 May, 2022"
},
{
"code": null,
"e": 26228,
"s": 26066,
"text": "Given string str of size N, which contains lowercase English alphabets. The task is to replace each vowel with the next immediate vowel lexicographically, i.e., "
... |
Java 8 | Arrays parallelSort() method with Examples - GeeksforGeeks | 11 Dec, 2018
Java 8 introduced a new method called as parallelSort() in java.util.Arrays Class. It uses Parallel Sorting of array elements
Algorithm of parallelSort()
1. The array is divided into sub-arrays and that
sub-arrays is again divided into their sub-arrays,
until the minimum level of detail in a set of... | [
{
"code": null,
"e": 25357,
"s": 25329,
"text": "\n11 Dec, 2018"
},
{
"code": null,
"e": 25483,
"s": 25357,
"text": "Java 8 introduced a new method called as parallelSort() in java.util.Arrays Class. It uses Parallel Sorting of array elements"
},
{
"code": null,
"e": ... |
How to find length of dictionary values? - GeeksforGeeks | 10 May, 2020
In Python, Dictionary is a collection of unordered data values. Dictionaries are also changeable and indexed. Dictionary holds key:value pair and they are written inside curly brackets. Each key:value pair maps the key to its associated value.
Here we use isinstance() method to check the type of the value ... | [
{
"code": null,
"e": 26057,
"s": 26029,
"text": "\n10 May, 2020"
},
{
"code": null,
"e": 26301,
"s": 26057,
"text": "In Python, Dictionary is a collection of unordered data values. Dictionaries are also changeable and indexed. Dictionary holds key:value pair and they are written ... |
Reservoir Sampling - GeeksforGeeks | 21 Oct, 2021
Reservoir sampling is a family of randomized algorithms for randomly choosing k samples from a list of n items, where n is either a very large or unknown number. Typically n is large enough that the list doesn’t fit into main memory. For example, a list of search queries in Google and Facebook.So we are gi... | [
{
"code": null,
"e": 35839,
"s": 35811,
"text": "\n21 Oct, 2021"
},
{
"code": null,
"e": 36325,
"s": 35839,
"text": "Reservoir sampling is a family of randomized algorithms for randomly choosing k samples from a list of n items, where n is either a very large or unknown number. T... |
Calendar getTimeInMillis() Method in Java with Examples - GeeksforGeeks | 26 Jul, 2021
The getTimeInMillis() method in Calendar class is used to return the current time of this Calendar in Milliseconds.Syntax:
public long getTimeInMillis()
Parameters: The method does not take any parameters.Return Value: The method returns the current time of this Calendar in millisecond.Below programs ill... | [
{
"code": null,
"e": 26251,
"s": 26223,
"text": "\n26 Jul, 2021"
},
{
"code": null,
"e": 26376,
"s": 26251,
"text": "The getTimeInMillis() method in Calendar class is used to return the current time of this Calendar in Milliseconds.Syntax: "
},
{
"code": null,
"e": 2... |
Python | Extract digits from given string - GeeksforGeeks | 08 Feb, 2022
While programming, sometimes, we just require a certain type of data and need to discard other. This type of problem is quite common in Data Science domain, and since Data Science uses Python worldwide, its important to know how to extract specific elements. This article discusses certain ways in which onl... | [
{
"code": null,
"e": 26139,
"s": 26111,
"text": "\n08 Feb, 2022"
},
{
"code": null,
"e": 26757,
"s": 26139,
"text": "While programming, sometimes, we just require a certain type of data and need to discard other. This type of problem is quite common in Data Science domain, and si... |
Month getValue() method in Java - GeeksforGeeks | 22 Mar, 2019
The getValue() method is a built-in method of the Month ENUM which is used to get the value of the month-of-year from this Month instance as an integer.
The value returned by this method is in the range of 1-12, representing months from January to December.
Syntax:
public int getValue()
Parameters: This m... | [
{
"code": null,
"e": 25429,
"s": 25401,
"text": "\n22 Mar, 2019"
},
{
"code": null,
"e": 25582,
"s": 25429,
"text": "The getValue() method is a built-in method of the Month ENUM which is used to get the value of the month-of-year from this Month instance as an integer."
},
{
... |
Reading an image in OpenCV using Python - GeeksforGeeks | 15 Dec, 2020
Prerequisite: Basics of OpenCV
In this article, we’ll try to open an image by using OpenCV (Open Source Computer Vision). To use the OpenCV library in python, we need to install these libraries as a prerequisite:
Numpy Library (Necessary, because OpenCV uses it in the background).OpenCV python
Numpy Libra... | [
{
"code": null,
"e": 42676,
"s": 42648,
"text": "\n15 Dec, 2020"
},
{
"code": null,
"e": 42707,
"s": 42676,
"text": "Prerequisite: Basics of OpenCV"
},
{
"code": null,
"e": 42889,
"s": 42707,
"text": "In this article, we’ll try to open an image by using OpenCV... |
How to delete a property of an object in JavaScript? | To delete a property of an object, delete key word should be used. Delete key word can be used with both the methods such as Dot method and Bracket method.
delete object.property;
In the following example initially when the property "country" is executed its value "England" is displayed in the output. But when that pro... | [
{
"code": null,
"e": 1218,
"s": 1062,
"text": "To delete a property of an object, delete key word should be used. Delete key word can be used with both the methods such as Dot method and Bracket method."
},
{
"code": null,
"e": 1242,
"s": 1218,
"text": "delete object.property;"
... |
C# | Performing Specified action on each element of Array - GeeksforGeeks | 06 Oct, 2021
Array.ForEach(T[], Action<T>) Method is used to perform the specified action on each element of the specified array.
Syntax:
public static void ForEach<T> (T[] array, Action<T> action);
Parameters:
array: The one-dimensional, zero-based Array on whose elements the action is to be performed. action: The... | [
{
"code": null,
"e": 23911,
"s": 23883,
"text": "\n06 Oct, 2021"
},
{
"code": null,
"e": 24029,
"s": 23911,
"text": "Array.ForEach(T[], Action<T>) Method is used to perform the specified action on each element of the specified array. "
},
{
"code": null,
"e": 24039,
... |
Node.js - Response Object | The res object represents the HTTP response that an Express app sends when it gets an HTTP request.
Following is the list of few properties associated with response object.
res.app
This property holds a reference to the instance of the express application that is using the middleware.
res.headersSent
Boolean property t... | [
{
"code": null,
"e": 2118,
"s": 2018,
"text": "The res object represents the HTTP response that an Express app sends when it gets an HTTP request."
},
{
"code": null,
"e": 2191,
"s": 2118,
"text": "Following is the list of few properties associated with response object."
},
{... |
Java Program to sort Integer list in reversed order | Following is our integer array:
Integer[] arr = {20, 50, 100, 150, 200, 250, 300, 350, 400, 500};
Now convert the above Integer array to List:
List<Integer> list = new ArrayList<>(Arrays.asList(arr));
Now, to sort the above Integer list in reversed order:
Comparator<Integer> initialComp = Integer::compare;
Comparator<I... | [
{
"code": null,
"e": 1094,
"s": 1062,
"text": "Following is our integer array:"
},
{
"code": null,
"e": 1160,
"s": 1094,
"text": "Integer[] arr = {20, 50, 100, 150, 200, 250, 300, 350, 400, 500};"
},
{
"code": null,
"e": 1205,
"s": 1160,
"text": "Now convert t... |
Matplotlib and Custom Fonts. A More Definitive Guide | by Ryan Louis Stevens | Towards Data Science | There’s two scenarios I’ve needed to use custom fonts. First, I’m on an OS with a limited number of pre-installed fonts (*cough* Microsoft *cough*). Second, I need to match the design aesthetic for a specific company I’m working for, or a project I’m working on.
To install a custom font to matplotlib requires two steps... | [
{
"code": null,
"e": 435,
"s": 172,
"text": "There’s two scenarios I’ve needed to use custom fonts. First, I’m on an OS with a limited number of pre-installed fonts (*cough* Microsoft *cough*). Second, I need to match the design aesthetic for a specific company I’m working for, or a project I’m work... |
Delete alternate nodes of a Linked List in C++ | In this tutorial, we are going to learn how to delete all prime nodes from a singly linked list.
Let's see the steps to solve the problem.
Write struct with data and next pointer.
Write struct with data and next pointer.
Write a function to insert the node into the singly linked list.
Write a function to insert the nod... | [
{
"code": null,
"e": 1159,
"s": 1062,
"text": "In this tutorial, we are going to learn how to delete all prime nodes from a singly linked list."
},
{
"code": null,
"e": 1201,
"s": 1159,
"text": "Let's see the steps to solve the problem."
},
{
"code": null,
"e": 1242,
... |
Drools - Sample Drools Program | In this chapter, we will create a Drools project for the following problem statement −
We will have two DRL files for our Drools project. The two DRL files will signify two cities in consideration (Pune and Nagpur) and four types of products (groceries, medicines, watches, and luxury goods).
The tax on medicines in bot... | [
{
"code": null,
"e": 1884,
"s": 1797,
"text": "In this chapter, we will create a Drools project for the following problem statement −"
},
{
"code": null,
"e": 2090,
"s": 1884,
"text": "We will have two DRL files for our Drools project. The two DRL files will signify two cities in... |
Goto in Arduino | goto is a control structure in Arduino, like in C, and it is used to transfer the program flow to another point in the program. It is highly discouraged, as many programmers agree that you can write every algorithm you want without the use of goto.
Excessive use of goto makes it very difficult to debug programs, or, in... | [
{
"code": null,
"e": 1311,
"s": 1062,
"text": "goto is a control structure in Arduino, like in C, and it is used to transfer the program flow to another point in the program. It is highly discouraged, as many programmers agree that you can write every algorithm you want without the use of goto."
}... |
Convert Text to Speech in Python - GeeksforGeeks | 15 Aug, 2021
There are several APIs available to convert text to speech in Python. One of such APIs is the Google Text to Speech API commonly known as the gTTS API. gTTS is a very easy to use tool which converts the text entered, into audio which can be saved as a mp3 file.
The gTTS API supports several languages inclu... | [
{
"code": null,
"e": 24772,
"s": 24744,
"text": "\n15 Aug, 2021"
},
{
"code": null,
"e": 25034,
"s": 24772,
"text": "There are several APIs available to convert text to speech in Python. One of such APIs is the Google Text to Speech API commonly known as the gTTS API. gTTS is a v... |
How to calculate the difference between neighboring elements in an array using NumPy - GeeksforGeeks | 02 Sep, 2020
Let’s see how to calculate the difference between neighboring elements in an array using NumPy library.
So, We can find out the difference between neighboring elements using numpy.diff() function of NumPy library.
Syntax: numpy.diff(arr, n, axis)
Now, let’s see an example:
Example 1:
Python3
# import libra... | [
{
"code": null,
"e": 24368,
"s": 24340,
"text": "\n02 Sep, 2020"
},
{
"code": null,
"e": 24472,
"s": 24368,
"text": "Let’s see how to calculate the difference between neighboring elements in an array using NumPy library."
},
{
"code": null,
"e": 24582,
"s": 24472,... |
Hamming distance between two Integers - GeeksforGeeks | 16 Mar, 2022
Given two integers, the task is to find the hamming distance between two integers. Hamming Distance between two integers is the number of bits that are different at the same position in both numbers. Examples:
Input: n1 = 9, n2 = 14
Output: 3
9 = 1001, 14 = 1110
No. of Different bits = 3
Input: n1 = 4, ... | [
{
"code": null,
"e": 25012,
"s": 24984,
"text": "\n16 Mar, 2022"
},
{
"code": null,
"e": 25224,
"s": 25012,
"text": "Given two integers, the task is to find the hamming distance between two integers. Hamming Distance between two integers is the number of bits that are different a... |
How to use Indexing for SQL Query Optimization | Towards Data Science | I assume that you like SQL and want to refine your querying skills to up your querying game. And you have probably heard that indexing is great for query optimization, but you are not sure about what exactly it is, why is it used, and how to use it.
Welcome! You are at the exact place where you should be. I’ll explain ... | [
{
"code": null,
"e": 421,
"s": 171,
"text": "I assume that you like SQL and want to refine your querying skills to up your querying game. And you have probably heard that indexing is great for query optimization, but you are not sure about what exactly it is, why is it used, and how to use it."
},... |
Simple Stock Price Prediction with ML in Python — Learner’s Guide to ML | by Alec Cunningham | Towards Data Science | One of the most prominent use cases of machine learning is “Fintech” (Financial Technology for those who aren't buzz-word aficionados); a large subset of which is in the stock market. Financial theorists, and data scientists for the better part of the last 50 years, have been employed to make sense of the marketplace i... | [
{
"code": null,
"e": 1003,
"s": 171,
"text": "One of the most prominent use cases of machine learning is “Fintech” (Financial Technology for those who aren't buzz-word aficionados); a large subset of which is in the stock market. Financial theorists, and data scientists for the better part of the la... |
char* vs std:string vs char[] in C++ - GeeksforGeeks | 30 Mar, 2022
In this article, we are going to inspect three different ways of initializing strings in C++ and discuss differences between them.
1. Using char*
Here, str is basically a pointer to the (const)string literal.Syntax:
char* str = "This is GeeksForGeeks";
Pros:
Only one pointer is required to refer to whole s... | [
{
"code": null,
"e": 24674,
"s": 24646,
"text": "\n30 Mar, 2022"
},
{
"code": null,
"e": 24805,
"s": 24674,
"text": "In this article, we are going to inspect three different ways of initializing strings in C++ and discuss differences between them."
},
{
"code": null,
... |
Why start using sktime for forecasting? | by Joanna Lenczuk | Towards Data Science | One of the challenges faced by business owners is predicting future market conditions. Forecasts help to make informed decisions and form realistic expectations of results. This demand for predictions leads to the ongoing development of forecasting tools. They enable predicting future events by grasping useful informat... | [
{
"code": null,
"e": 824,
"s": 172,
"text": "One of the challenges faced by business owners is predicting future market conditions. Forecasts help to make informed decisions and form realistic expectations of results. This demand for predictions leads to the ongoing development of forecasting tools.... |
Checkbox/Table cell detection using OpenCV-Python | by Sreekiran A R | Towards Data Science | In this age of Digital Transformation, Information Extraction is one of the key areas of Business interest, where we need to extract relevant information from unstructured data sources like scanned invoices, bills, etc into structured data, using Computer Vision and Natural Language Processing. Here, the primary steps ... | [
{
"code": null,
"e": 576,
"s": 172,
"text": "In this age of Digital Transformation, Information Extraction is one of the key areas of Business interest, where we need to extract relevant information from unstructured data sources like scanned invoices, bills, etc into structured data, using Computer... |
Transforming Skewed Data | by Corey Wade | Towards Data Science | Note: The following code is written in Python and excerpted from various Jupyter Notebook. Inline comments have been eliminated to make the article more readable.
Skewed data is cumbersome and common. It’s often desirable to transform skewed data and to convert it into values between 0 and 1.
Standard functions used fo... | [
{
"code": null,
"e": 335,
"s": 172,
"text": "Note: The following code is written in Python and excerpted from various Jupyter Notebook. Inline comments have been eliminated to make the article more readable."
},
{
"code": null,
"e": 466,
"s": 335,
"text": "Skewed data is cumberso... |
Bootstrap 4 - Jumbotron | Jumbotron component increases the size of headings and add a lot of margin for landing page content. By default, jumbotron display with light grey box to show the important information.
Create a jumbotron by adding .jumbotron class to <div> element as shown in the example below −
<html lang = "en">
<head>
<!--... | [
{
"code": null,
"e": 2002,
"s": 1816,
"text": "Jumbotron component increases the size of headings and add a lot of margin for landing page content. By default, jumbotron display with light grey box to show the important information."
},
{
"code": null,
"e": 2097,
"s": 2002,
"text... |
std::basic_istream::getline in C++ with Examples - GeeksforGeeks | 06 Jan, 2022
The std::basic_istream::getline is used to extract the characters from stream until end of line or the extracted character is the delimiting character. The delimiting character is the new line character i.e ‘\n’. This function will also stop extracting characters if the end-of-file is reached if input is t... | [
{
"code": null,
"e": 24018,
"s": 23990,
"text": "\n06 Jan, 2022"
},
{
"code": null,
"e": 24355,
"s": 24018,
"text": "The std::basic_istream::getline is used to extract the characters from stream until end of line or the extracted character is the delimiting character. The delimit... |
How to store a 2d Array in another 2d Array in java? | Create an array to which you want to store the existing array with the same length. A 2d array is an array of one dimensional arrays therefore, to copy (or, to perform any operation on) the elements of the 2d array you need two loops one nested within the other. Where, the outer loop is to traverse through the array of... | [
{
"code": null,
"e": 1501,
"s": 1062,
"text": "Create an array to which you want to store the existing array with the same length. A 2d array is an array of one dimensional arrays therefore, to copy (or, to perform any operation on) the elements of the 2d array you need two loops one nested within t... |
PyQt5 QSpinBox - Checking if the character is UTF-32 format - GeeksforGeeks | 26 May, 2020
In this article we will see how we can check if the given character in the font of the spin box is in UTF-32 format. UTF-32 is a fixed-length encoding used to encode Unicode code points that uses exactly 32 bits per code point. UTF-32 is a fixed-length encoding, in contrast to all other Unicode transformat... | [
{
"code": null,
"e": 24966,
"s": 24938,
"text": "\n26 May, 2020"
},
{
"code": null,
"e": 25323,
"s": 24966,
"text": "In this article we will see how we can check if the given character in the font of the spin box is in UTF-32 format. UTF-32 is a fixed-length encoding used to enco... |
Convert string to a number in Java | To convert a string to a number in Java, use the Integer.parseInt() method. First, let use create a String and set value.
String str = "45";
Now, take an Integer and use the Integer.parseInt() method.
Integer i = Integer.parseInt(str);
Let us see the complete example.
Live Demo
public class Demo {
public static voi... | [
{
"code": null,
"e": 1184,
"s": 1062,
"text": "To convert a string to a number in Java, use the Integer.parseInt() method. First, let use create a String and set value."
},
{
"code": null,
"e": 1203,
"s": 1184,
"text": "String str = \"45\";"
},
{
"code": null,
"e": 12... |
File.WriteAllLines(String, IEnumerable<String>, Encoding) Method in C# with Examples - GeeksforGeeks | 01 Jun, 2020
File.WriteAllLines(String, IEnumerable<String>, Encoding) is an inbuilt File class method that is used to create a new file by using the specified encoding, writes a collection of strings to the file, and then closes the file.
Syntax:
public static void WriteAllLines (string path, System.Collections.Generi... | [
{
"code": null,
"e": 23911,
"s": 23883,
"text": "\n01 Jun, 2020"
},
{
"code": null,
"e": 24138,
"s": 23911,
"text": "File.WriteAllLines(String, IEnumerable<String>, Encoding) is an inbuilt File class method that is used to create a new file by using the specified encoding, writes... |
Largest subsequence such that its prefix sum never gets negative - GeeksforGeeks | 27 Jan, 2022
Given an array arr[] containing integers. The task is to find the largest subsequence such that at any point in time prefix sum of that subsequence is not negative.
Examples:
Input: arr[] = {-3, -3, -7, -7, -1, -7, 3, 3, -2, -1, 0, -7}Output: 3 3 -2 -1 0Explanation: Adding -3 makes sum negative so it can’t... | [
{
"code": null,
"e": 24405,
"s": 24377,
"text": "\n27 Jan, 2022"
},
{
"code": null,
"e": 24570,
"s": 24405,
"text": "Given an array arr[] containing integers. The task is to find the largest subsequence such that at any point in time prefix sum of that subsequence is not negative... |
cout in C++ - GeeksforGeeks | 27 Aug, 2021
The cout object in C++ is an object of class ostream. It is defined in iostream header file. It is used to display the output to the standard output device i.e. monitor. It is associated with the standard C output stream stdout. The data needed to be displayed on the screen is inserted in the standard outp... | [
{
"code": null,
"e": 24328,
"s": 24300,
"text": "\n27 Aug, 2021"
},
{
"code": null,
"e": 24686,
"s": 24328,
"text": "The cout object in C++ is an object of class ostream. It is defined in iostream header file. It is used to display the output to the standard output device i.e. mo... |
Is finally block always get executed in Java? | Yes, the finally block is always get executed unless there is an abnormal program termination either resulting from a JVM crash or from a call to System.exit().
A finally block is always get executed whether the exception has occurred or not.
If an exception occurs like closing a file or DB connection, then the finally... | [
{
"code": null,
"e": 1223,
"s": 1062,
"text": "Yes, the finally block is always get executed unless there is an abnormal program termination either resulting from a JVM crash or from a call to System.exit()."
},
{
"code": null,
"e": 1305,
"s": 1223,
"text": "A finally block is al... |
How to print a one-month calendar of user choice using for loop in C? | The logic to print a one-month calendar is as follows −
for(i=1;i<first;i++)
printf(" ");
for(i=1;i<=noofdays;i++){
printf("%3d",i);
if((first+i-1)%7==0)
printf("\n");
}
Live Demo
Following example accepts number of days and first day in a month from the user and prints the calendar of a month according... | [
{
"code": null,
"e": 1118,
"s": 1062,
"text": "The logic to print a one-month calendar is as follows −"
},
{
"code": null,
"e": 1247,
"s": 1118,
"text": "for(i=1;i<first;i++)\n printf(\" \");\nfor(i=1;i<=noofdays;i++){\n printf(\"%3d\",i);\n if((first+i-1)%7==0)\n prin... |
Converting string to MORSE code in JavaScript | Morse code is a method used in telecommunications to encode text characters as standardized sequences of two different signal durations, called dots and dashes.
To have a function that converts a particular string to Morse code, we will need an object that
maps all the characters (English alphabets) to Morse code equiv... | [
{
"code": null,
"e": 1223,
"s": 1062,
"text": "Morse code is a method used in telecommunications to encode text characters as standardized sequences of two different signal durations, called dots and dashes."
},
{
"code": null,
"e": 1474,
"s": 1223,
"text": "To have a function th... |
MODIS Vegetation Indices: a GEE Approach | by Willy Hagi | Towards Data Science | The Moderate Resolution Imaging Spectroradiometer (MODIS) is one of the key sensors used in Earth Observation ever since it was first launched into orbit in 1999. Several reasons can be appointed for its success: the high revisit-time of 1 to 2 days, the global coverage, the wide range of applicability and its derived ... | [
{
"code": null,
"e": 522,
"s": 172,
"text": "The Moderate Resolution Imaging Spectroradiometer (MODIS) is one of the key sensors used in Earth Observation ever since it was first launched into orbit in 1999. Several reasons can be appointed for its success: the high revisit-time of 1 to 2 days, the ... |
Classic Probability Problem #2: The Coupon Problem | by Andrew Rothman | Towards Data Science | This is my second entry on classic toy problems in probability theory. “The Coupon Problem” is great problem to be aware of; it shows up in a number of applied situations. From a technical interviewing perspective, by adding a small computational component at the end it can serve as a solid test of general probability ... | [
{
"code": null,
"e": 540,
"s": 172,
"text": "This is my second entry on classic toy problems in probability theory. “The Coupon Problem” is great problem to be aware of; it shows up in a number of applied situations. From a technical interviewing perspective, by adding a small computational componen... |
How to compare two text files in python? - GeeksforGeeks | 24 Jan, 2021
Python has provided the methods to manipulate files that too in a very concise manner. In this article we are going to discuss one of the applications of the Python’s file handling features i.e. the comparison of files.
Files in use:
Text File 1
Text File 2
Python supports a module called filecmp with a me... | [
{
"code": null,
"e": 24641,
"s": 24613,
"text": "\n24 Jan, 2021"
},
{
"code": null,
"e": 24861,
"s": 24641,
"text": "Python has provided the methods to manipulate files that too in a very concise manner. In this article we are going to discuss one of the applications of the Pytho... |
Windows Server 2012 R2 Stuck at "Updating Your System” - GeeksforGeeks | 11 Dec, 2018
This tutorial describes an unusual problem that may occur during Windows Server 2012 R2 Updates. This issue generally occurs while performing scheduled Windows Updates. Failure of one single update may keep you stuck you at the screen that says Updating your system, but will not move a single inch, even af... | [
{
"code": null,
"e": 25150,
"s": 25122,
"text": "\n11 Dec, 2018"
},
{
"code": null,
"e": 25629,
"s": 25150,
"text": "This tutorial describes an unusual problem that may occur during Windows Server 2012 R2 Updates. This issue generally occurs while performing scheduled Windows Upd... |
Using Python to find new books to read | Towards Data Science | There are tons of books out there, but not all are worth reading. To quote the old Faber in Fahrenheit 451, the best books are the ones that “show the pores in the face of life.”
So, with an overwhelming number of books out there, how can you find the best ones?
One way is to go to a dedicated book website (such as Ama... | [
{
"code": null,
"e": 351,
"s": 172,
"text": "There are tons of books out there, but not all are worth reading. To quote the old Faber in Fahrenheit 451, the best books are the ones that “show the pores in the face of life.”"
},
{
"code": null,
"e": 435,
"s": 351,
"text": "So, wit... |
The HttpSession Interface in Servlet - GeeksforGeeks | 25 Apr, 2022
What is a session?
In web terminology, a session is simply the limited interval of time in which two systems communicate with each other. The two systems can share a client-server or a peer-to-peer relationship. However, in Http protocol, the state of the communication is not maintained. Hence, the web app... | [
{
"code": null,
"e": 25624,
"s": 25596,
"text": "\n25 Apr, 2022"
},
{
"code": null,
"e": 25643,
"s": 25624,
"text": "What is a session?"
},
{
"code": null,
"e": 26120,
"s": 25643,
"text": "In web terminology, a session is simply the limited interval of time in... |
How to merge data frames by row names in R? | Mostly, we merge the data frames by columns because column names are considered prominent in data sets but it is also possible to merge two data frames by using rows. Merging by rows is likely to result in more uncleaned data as compared to the merging by columns. This can be done with the help of merge function and it... | [
{
"code": null,
"e": 1397,
"s": 1062,
"text": "Mostly, we merge the data frames by columns because column names are considered prominent in data sets but it is also possible to merge two data frames by using rows. Merging by rows is likely to result in more uncleaned data as compared to the merging ... |
Check if two strings have a common substring - GeeksforGeeks | 19 Apr, 2022
You are given two strings str1 and str2. You have to check if the two strings share a common substring.Examples :
Input : str1 = "HELLO"
str2 = "WORLD"
Output : YES
Explanation : The substrings "O" and
"L" are common to both str1 and str2
Input : str1 = "HI"
str2 = "ALL"
Output : NO
Exp... | [
{
"code": null,
"e": 26150,
"s": 26122,
"text": "\n19 Apr, 2022"
},
{
"code": null,
"e": 26266,
"s": 26150,
"text": "You are given two strings str1 and str2. You have to check if the two strings share a common substring.Examples : "
},
{
"code": null,
"e": 26517,
... |
which() Function in R - GeeksforGeeks | 23 Aug, 2021
which() function in R Programming Language is used to return the position of the specified values in the logical vector.
Syntax: which(x, arr.ind, useNames)
Parameters: This function accepts some parameters which are illustrated below:
X: This is the specified input logical vector
Arr.ind: This parameter r... | [
{
"code": null,
"e": 26597,
"s": 26569,
"text": "\n23 Aug, 2021"
},
{
"code": null,
"e": 26718,
"s": 26597,
"text": "which() function in R Programming Language is used to return the position of the specified values in the logical vector."
},
{
"code": null,
"e": 26754... |
Display three letter-month value with SimpleDateFormat('MMM') in Java | Using the SimpleDateFormat(“MMM”) to display three-letter month −
Format f = new SimpleDateFormat("MMM");
String strMonth = f.format(new Date());
System.out.println("Month (Three-letter format) = "+strMonth);
Since, we have used the Format and SimpleDateFormat class above, therefore import the following packages. With ... | [
{
"code": null,
"e": 1128,
"s": 1062,
"text": "Using the SimpleDateFormat(“MMM”) to display three-letter month −"
},
{
"code": null,
"e": 1271,
"s": 1128,
"text": "Format f = new SimpleDateFormat(\"MMM\");\nString strMonth = f.format(new Date());\nSystem.out.println(\"Month (Thre... |
Why is NullPointerException in Java? | NullPointerException is a runtime exception and it is thrown when the application try to use an object reference which has a null value.
For example, using a method on a null reference.
Object ref = null;
ref.toString(); // this will throw a NullPointerException | [
{
"code": null,
"e": 1199,
"s": 1062,
"text": "NullPointerException is a runtime exception and it is thrown when the application try to use an object reference which has a null value."
},
{
"code": null,
"e": 1248,
"s": 1199,
"text": "For example, using a method on a null referen... |
Z algorithm (Linear time pattern searching Algorithm) | 15 Jun, 2022
This algorithm finds all occurrences of a pattern in a text in linear time. Let length of text be n and of pattern be m, then total time taken is O(m + n) with linear space complexity. Now we can see that both time and space complexity is same as KMP algorithm but this algorithm is Simpler to understand.In... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n15 Jun, 2022"
},
{
"code": null,
"e": 400,
"s": 52,
"text": "This algorithm finds all occurrences of a pattern in a text in linear time. Let length of text be n and of pattern be m, then total time taken is O(m + n) with linear space c... |
How to scroll automatically to the Bottom of the Page using jQuery? | 03 Aug, 2021
To auto scroll a page from top to bottom we can use scrollTop() and height() method in jquery.In this method pass the document’s height in scrollTop method to scroll.
Example-1: Scroll without animation.
<!DOCTYPE html><html> <head> <title>Scroll Automatically</title> <script src="https://ajax.googl... | [
{
"code": null,
"e": 54,
"s": 26,
"text": "\n03 Aug, 2021"
},
{
"code": null,
"e": 221,
"s": 54,
"text": "To auto scroll a page from top to bottom we can use scrollTop() and height() method in jquery.In this method pass the document’s height in scrollTop method to scroll."
},
... |
Template Method – Python Design Patterns | 21 Jul, 2021
The Template method is a Behavioral Design Pattern that defines the skeleton of the operation and leaves the details to be implemented by the child class. Its subclasses can override the method implementations as per need but the invocation is to be in the same way as defined by an abstract class. It is on... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n21 Jul, 2021"
},
{
"code": null,
"e": 617,
"s": 28,
"text": "The Template method is a Behavioral Design Pattern that defines the skeleton of the operation and leaves the details to be implemented by the child class. Its subclasses can o... |
How to get multiple rows in a single MySQL query? | Let us first create a table −
mysql> create table DemoTable
(
Id int,
Name varchar(100)
);
Query OK, 0 rows affected (0.60 sec)
Insert some records in the table using insert command −
mysql> insert into DemoTable values(100,'Chris');
Query OK, 1 row affected (0.16 sec)
mysql> insert into DemoTable values(110,'Dav... | [
{
"code": null,
"e": 1217,
"s": 1187,
"text": "Let us first create a table −"
},
{
"code": null,
"e": 1321,
"s": 1217,
"text": "mysql> create table DemoTable\n(\n Id int,\n Name varchar(100)\n);\nQuery OK, 0 rows affected (0.60 sec)"
},
{
"code": null,
"e": 1377,
... |
Python - Multithreaded Programming | Running several threads is similar to running several different programs concurrently, but with the following benefits −
Multiple threads within a process share the same data space with the main thread and can therefore share information or communicate with each other more easily than if they were separate processes.
M... | [
{
"code": null,
"e": 2499,
"s": 2378,
"text": "Running several threads is similar to running several different programs concurrently, but with the following benefits −"
},
{
"code": null,
"e": 2697,
"s": 2499,
"text": "Multiple threads within a process share the same data space w... |
How to Prevent Screenshot Or Screen Recorder in Android? | 23 Sep, 2021
In some situations, we don’t want to allow to take screenshots or screen recordings of our android application. Here we are going to explain how to prevent Android from taking a screenshot or screen recording when the app goes to the background. Generally, when we take a screenshot, we will see a Screen Ca... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n23 Sep, 2021"
},
{
"code": null,
"e": 1055,
"s": 52,
"text": "In some situations, we don’t want to allow to take screenshots or screen recordings of our android application. Here we are going to explain how to prevent Android from taki... |
Count the frequency of a variable per column in R Dataframe | 30 May, 2021
A data frame may contain repeated or missing values. Each column may contain any number of duplicate or repeated instances of the same variable. Data statistics and analysis mostly rely on the task of computing the frequency or count of the number of instances a particular variable contains within each col... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n30 May, 2021"
},
{
"code": null,
"e": 468,
"s": 28,
"text": "A data frame may contain repeated or missing values. Each column may contain any number of duplicate or repeated instances of the same variable. Data statistics and analysis m... |
Shor’s Factorization Algorithm | 05 Feb, 2021
Shor’s Factorization Algorithm:
Shor’s Factorization Algorithm is proposed by Peter Shor.
It suggests that quantum mechanics allows the factorization to be performed in polynomial time, rather than exponential time achieved after using classical algorithms.
This could have a drastic impact on the field of ... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n05 Feb, 2021"
},
{
"code": null,
"e": 84,
"s": 52,
"text": "Shor’s Factorization Algorithm:"
},
{
"code": null,
"e": 142,
"s": 84,
"text": "Shor’s Factorization Algorithm is proposed by Peter Shor."
},
{
"co... |
Difference Between Forward List and List in C++ | 08 Dec, 2021
Forward List is a sequence container that allows unidirectional sequential access to its data. It contains data of the same type. In STL, it has been implemented using Singly Linked List, which requires constant time for insertion and deletion. Elements of the forward list are scattered in the memory and t... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n08 Dec, 2021"
},
{
"code": null,
"e": 557,
"s": 52,
"text": "Forward List is a sequence container that allows unidirectional sequential access to its data. It contains data of the same type. In STL, it has been implemented using Singly... |
How to Upload Excel Sheet Data to Firebase Realtime Database in Android? | 10 Feb, 2022
Firebase Realtime Database is the backend service which is provided by Google for handling backend tasks for your Android apps, IOS apps as well as your websites. It provides so many services such as storage, database, and many more. The feature for which Firebase is famous for its Firebase Realtime Databa... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n10 Feb, 2022"
},
{
"code": null,
"e": 744,
"s": 52,
"text": "Firebase Realtime Database is the backend service which is provided by Google for handling backend tasks for your Android apps, IOS apps as well as your websites. It provides... |
Shell Script to Display the Exit Status Using Grep Command | 27 Dec, 2021
Linux provides users a great cool feature of the command-line tool along with a graphical user interface where they can perform tasks via ruining command. All of this command returns a status according to their execution. Its execution value can be used for showing errors or take some other action in a she... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n27 Dec, 2021"
},
{
"code": null,
"e": 347,
"s": 28,
"text": "Linux provides users a great cool feature of the command-line tool along with a graphical user interface where they can perform tasks via ruining command. All of this command ... |
Find all possible ways to Split the given string into Primes | 17 May, 2021
Given string str that represents a number. The task is to find all possible ways to split the given string such that each segment is a prime number in the range of 1 to 106.Examples:
Input: str = “3175” Output: [317, 5] [31, 7, 5] [3, 17, 5]Explanation: There can be 8 possible ways to split: [3175] [317, 5... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n17 May, 2021"
},
{
"code": null,
"e": 235,
"s": 52,
"text": "Given string str that represents a number. The task is to find all possible ways to split the given string such that each segment is a prime number in the range of 1 to 106.E... |
Python PIL | Image.thumbnail() Method | 19 Jul, 2019
PIL is the Python Imaging Library which provides the python interpreter with image editing capabilities. The Image module provides a class with the same name which is used to represent a PIL image. The module also provides a number of factory functions, including functions to load images from files, and to... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n19 Jul, 2019"
},
{
"code": null,
"e": 355,
"s": 28,
"text": "PIL is the Python Imaging Library which provides the python interpreter with image editing capabilities. The Image module provides a class with the same name which is used to ... |
Python 3 - Tkinter Entry | The Entry widget is used to accept single-line text strings from a user.
If you want to display multiple lines of text that can be edited, then you should use the Text widget.
If you want to display multiple lines of text that can be edited, then you should use the Text widget.
If you want to display one or more lines ... | [
{
"code": null,
"e": 2547,
"s": 2474,
"text": "The Entry widget is used to accept single-line text strings from a user."
},
{
"code": null,
"e": 2650,
"s": 2547,
"text": "If you want to display multiple lines of text that can be edited, then you should use the Text widget."
},
... |
How to Export SQL Server Data to a CSV File? | 18 Oct, 2021
Here we will see, how to export SQL Server Data to CSV file by using the ‘Import and Export wizard’ of SQL Server Management Studio (SSMS).
CSV (Comma-separated values): It is a file that consists of plain text data in which data is separated using comma(,). It is also known as Comma Delimited Files becaus... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n18 Oct, 2021"
},
{
"code": null,
"e": 168,
"s": 28,
"text": "Here we will see, how to export SQL Server Data to CSV file by using the ‘Import and Export wizard’ of SQL Server Management Studio (SSMS)."
},
{
"code": null,
"e"... |
PHP | uniqid( ) Function | 29 Aug, 2021
The uniqid() function in PHP is an inbuilt function which is used to generate a unique ID based on the current time in microseconds (micro time). The ID generated from the uniqid() function is not optimal since it is based on the system time and is not cryptographically secured. Thus it should not be for c... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n29 Aug, 2021"
},
{
"code": null,
"e": 488,
"s": 28,
"text": "The uniqid() function in PHP is an inbuilt function which is used to generate a unique ID based on the current time in microseconds (micro time). The ID generated from the uni... |
Python – Merge Dictionaries List with duplicate Keys | 02 Dec, 2020
Given two List of dictionaries with possible duplicate keys, write a Python program to perform merge.
Examples:
Input : test_list1 = [{“gfg” : 1, “best” : 4}, {“geeks” : 10, “good” : 15}, {“love” : “gfg”}], test_list2 = [{“gfg” : 6}, {“better” : 3, “for” : 10, “geeks” : 1}, {“gfg” : 10}] Output : [{‘gfg’: ... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n02 Dec, 2020"
},
{
"code": null,
"e": 130,
"s": 28,
"text": "Given two List of dictionaries with possible duplicate keys, write a Python program to perform merge."
},
{
"code": null,
"e": 140,
"s": 130,
"text": "Exam... |
How to fix SSL_ERROR_RX_RECORD_TOO_LONG on Mozilla Firefox ? | 05 Nov, 2020
What Is the Mozilla Firefox Error Message SSL_ERROR_RX_RECORD_TOO_LONG ?
Firefox SSL_ERROR_RX_RECORD_TOO_LONG message is displayed because a certain mis-configuration has been occurred on the server. Most of the time, because of the following two reasons, the SSL_ERROR_RX_RECORD_TOO_LONG error message is d... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n05 Nov, 2020"
},
{
"code": null,
"e": 101,
"s": 28,
"text": "What Is the Mozilla Firefox Error Message SSL_ERROR_RX_RECORD_TOO_LONG ?"
},
{
"code": null,
"e": 366,
"s": 101,
"text": "Firefox SSL_ERROR_RX_RECORD_TOO_L... |
Matplotlib.pyplot.stem() in Python | 21 Apr, 2020
Matplotlib is a visualization library in Python for 2D plots of arrays. Matplotlib is a multi-platform data visualization library built on NumPy arrays and designed to work with the broader SciPy stack.
matplotlib.pyplot.stem() creates stem plots. A Stem plot plots vertical lines at each x position covered... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n21 Apr, 2020"
},
{
"code": null,
"e": 231,
"s": 28,
"text": "Matplotlib is a visualization library in Python for 2D plots of arrays. Matplotlib is a multi-platform data visualization library built on NumPy arrays and designed to work wi... |
Numpy | Binary Operations - GeeksforGeeks | 15 Nov, 2018
Binary operators acts on bits and performs bit by bit operation. Binary operation is simply a rule for combining two values to create a new value.
numpy.bitwise_and() : This function is used to Compute the bit-wise AND of two array element-wise. This function computes the bit-wise AND of the underlying bin... | [
{
"code": null,
"e": 43445,
"s": 43417,
"text": "\n15 Nov, 2018"
},
{
"code": null,
"e": 43592,
"s": 43445,
"text": "Binary operators acts on bits and performs bit by bit operation. Binary operation is simply a rule for combining two values to create a new value."
},
{
"c... |
How to add elements to an existing array dynamically in JavaScript ? | 16 Jul, 2020
An array is a JavaScript object that can hold multiple values at a time, irrespective of the data type.
Example:
var a = ['Geeks', 'For', 'Geeks', 1];
In the above example, “Geeks” is of type “string” while 1 is of “integer” type. An array can also store JavaScript objects. JavaScript arrays are dynamic i... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n16 Jul, 2020"
},
{
"code": null,
"e": 132,
"s": 28,
"text": "An array is a JavaScript object that can hold multiple values at a time, irrespective of the data type."
},
{
"code": null,
"e": 141,
"s": 132,
"text": "Ex... |
Ngx-Bootstrap - Dropdowns | ngx-bootstrap dropdown component is toggleable and provides contextual overlay to display list of links etc. With dropdown directives we can make dropdowns interactive.
[bsDropdown],[dropdown]
[bsDropdown],[dropdown]
autoClose − boolean, Indicates that dropdown will be closed on item or document click, and after pressi... | [
{
"code": null,
"e": 2403,
"s": 2234,
"text": "ngx-bootstrap dropdown component is toggleable and provides contextual overlay to display list of links etc. With dropdown directives we can make dropdowns interactive."
},
{
"code": null,
"e": 2427,
"s": 2403,
"text": "[bsDropdown],... |
Largest number less than N with digit sum greater than the digit sum of N | 08 Jul, 2022
Given an integer N, the task is to find the greatest number less than N such that the sum of its digits is greater than the sum of the digits of N. If the condition isn’t satisfied for any number then print -1.Examples:
Input: N = 100 Output: 99 99 is the largest number less than 100 sum of whose digits ... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n08 Jul, 2022"
},
{
"code": null,
"e": 250,
"s": 28,
"text": "Given an integer N, the task is to find the greatest number less than N such that the sum of its digits is greater than the sum of the digits of N. If the condition isn’t sati... |
PyQt5 – Capsule shaped Progress Bar | 22 Apr, 2020
In this article we will see how to create capsule shaped progress bar. By default when we create progress bar, it is in rectangular shape although we can change the shape with the help of resize method. But this will only allows to change the shape from rectangle to square. Below is representation of norma... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n22 Apr, 2020"
},
{
"code": null,
"e": 410,
"s": 52,
"text": "In this article we will see how to create capsule shaped progress bar. By default when we create progress bar, it is in rectangular shape although we can change the shape wit... |
8086 program to transfer a block of bytes by using string instruction | 09 Jun, 2022
Problem: Write an assembly language program to transfer a block of bytes from one memory location to another memory location by using string instruction.
Example: Example:
In this example, the counter value stored in CX register is 4.The block of data which is stored from memory location starting from 501... | [
{
"code": null,
"e": 54,
"s": 26,
"text": "\n09 Jun, 2022"
},
{
"code": null,
"e": 209,
"s": 54,
"text": "Problem: Write an assembly language program to transfer a block of bytes from one memory location to another memory location by using string instruction. "
},
{
"code... |
Minimum steps to reach a destination | 28 Jun, 2022
Given a number line from -infinity to +infinity. You start at 0 and can go either to the left or to the right. The condition is that in i’th move, you take i steps.
Find if you can reach a given number x Find the most optimal way to reach a given number x, if we can indeed reach it. For example, 3 can be ... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n28 Jun, 2022"
},
{
"code": null,
"e": 218,
"s": 52,
"text": "Given a number line from -infinity to +infinity. You start at 0 and can go either to the left or to the right. The condition is that in i’th move, you take i steps. "
},
... |
SED command in Linux | Set 2 | 23 Dec, 2021
We have discussed some of the SED command options in Sed Command in Linux/Unix with examples
SED is used for finding, filtering, text substitution, replacement and text manipulations like insertion, deletion search, etc. It’s a one of the powerful utilities offered by Linux/Unix systems. We can use sed wi... | [
{
"code": null,
"e": 54,
"s": 26,
"text": "\n23 Dec, 2021"
},
{
"code": null,
"e": 148,
"s": 54,
"text": "We have discussed some of the SED command options in Sed Command in Linux/Unix with examples "
},
{
"code": null,
"e": 463,
"s": 148,
"text": "SED is used... |
Tryit Editor v3.6 - Show React | import React from 'react';
import ReactDOM from 'react-dom/client';
ReactDOM.render(<p>Hello</p>, document.getElementById('root'));
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<meta name="viewport"
content="width=device-width, initial-scale=1" /> | [
{
"code": null,
"e": 136,
"s": 0,
"text": "\nimport React from 'react';\nimport ReactDOM from 'react-dom/client';\n\nReactDOM.render(<p>Hello</p>, document.getElementById('root'));\n\n"
}
] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.