title stringlengths 3 221 | text stringlengths 17 477k | parsed listlengths 0 3.17k |
|---|---|---|
Gnome Sort | 14 Jun, 2022
Gnome Sort also called Stupid sort is based on the concept of a Garden Gnome sorting his flower pots. A garden gnome sorts the flower pots by the following method-
He looks at the flower pot next to him and the previous one; if they are in the right order he steps one pot forward, otherwise he swaps them... | [
{
"code": null,
"e": 53,
"s": 25,
"text": "\n14 Jun, 2022"
},
{
"code": null,
"e": 219,
"s": 53,
"text": "Gnome Sort also called Stupid sort is based on the concept of a Garden Gnome sorting his flower pots. A garden gnome sorts the flower pots by the following method- "
},
... |
Figuring out a Fair Price of a Used Car in a Data Science Way | by Kirill Lepchenkov | Towards Data Science | What is an ordinary way of figuring out the price for a used car? You search for similar vehicles, estimate the rough baseline price and then fine-tune it depending on the current mileage, color, number of options, etc. You use both domain knowledge and current market state analysis.
If you go deeper, you may consider ... | [
{
"code": null,
"e": 457,
"s": 172,
"text": "What is an ordinary way of figuring out the price for a used car? You search for similar vehicles, estimate the rough baseline price and then fine-tune it depending on the current mileage, color, number of options, etc. You use both domain knowledge and c... |
Diagonal Sum In Binary Tree | Practice | GeeksforGeeks | Consider Red lines of slope -1 passing between nodes (in following diagram). The diagonal sum in a binary tree is the sum of all node’s data lying between these lines. Given a Binary Tree of size N, print all diagonal sums.
For the following input tree, output should be 9, 19, 42.
9 is sum of 1, 3 and 5.
19 is sum of 2... | [
{
"code": null,
"e": 462,
"s": 238,
"text": "Consider Red lines of slope -1 passing between nodes (in following diagram). The diagonal sum in a binary tree is the sum of all node’s data lying between these lines. Given a Binary Tree of size N, print all diagonal sums."
},
{
"code": null,
... |
Understand Local Receptive Fields In Convolutional Neural Networks | by Richmond Alake | Towards Data Science | Learn the basics of AI and Deep Learning with TensorFlow and Keras in this Live Training Session hosted by Me.
This article is aimed at all levels of individuals that practice machine learning or more specifically deep learning.
Convolutional Neural Networks (CNN) have characteristics that enable invariance to the affi... | [
{
"code": null,
"e": 283,
"s": 172,
"text": "Learn the basics of AI and Deep Learning with TensorFlow and Keras in this Live Training Session hosted by Me."
},
{
"code": null,
"e": 401,
"s": 283,
"text": "This article is aimed at all levels of individuals that practice machine le... |
Using Azure Log Analytics Workspaces to collect Custom Logs from your VM | by Sulabh Shrestha | Towards Data Science | We all have seen the Monitoring Tab Key Metrics on the VM Page. Yes, it is useful to see whether the CPU has been running or not through the CPU metrics, to check when the VM is getting the data from the outside world through Network In metrics and if the VM is doing any kind of write operation using Disk Operations/Se... | [
{
"code": null,
"e": 816,
"s": 172,
"text": "We all have seen the Monitoring Tab Key Metrics on the VM Page. Yes, it is useful to see whether the CPU has been running or not through the CPU metrics, to check when the VM is getting the data from the outside world through Network In metrics and if the... |
Program to check whether two sentences are similar or not in Python | Suppose we have two sentences s and t. We have to check whether they are similar or not. Here sentence has only English letters. Two sentences are said to be similar when it is possible to add an arbitrary sentence (possibly empty) inside one of these given sentences such that the two sentences become equal.
So, if the... | [
{
"code": null,
"e": 1372,
"s": 1062,
"text": "Suppose we have two sentences s and t. We have to check whether they are similar or not. Here sentence has only English letters. Two sentences are said to be similar when it is possible to add an arbitrary sentence (possibly empty) inside one of these g... |
Explain narrowing with object in Java. | Java provides various datatypes to store various data values. It provides 7 primitive datatypes (stores single values) namely, boolean, byte, char, short, int, long, float, double and, reference datatypes (arrays and objects).
Type Casting/type conversion −Converting one primitive datatype into another is known as type... | [
{
"code": null,
"e": 1289,
"s": 1062,
"text": "Java provides various datatypes to store various data values. It provides 7 primitive datatypes (stores single values) namely, boolean, byte, char, short, int, long, float, double and, reference datatypes (arrays and objects)."
},
{
"code": null... |
How to create a default constructor in Java? | A no-arg constructor doesn’t accepts any parameters, it instantiates the class variables with their respective default values (i.e. null for objects, 0.0 for float and double, false for Boolean, 0 for byte, short, int and, long).
There is no need to invoke constructors explicitly these are automatically invoked at the ... | [
{
"code": null,
"e": 1292,
"s": 1062,
"text": "A no-arg constructor doesn’t accepts any parameters, it instantiates the class variables with their respective default values (i.e. null for objects, 0.0 for float and double, false for Boolean, 0 for byte, short, int and, long)."
},
{
"code": n... |
How to use SearchView in Android? | This example demonstrates how do I use SearchView in android.
Step 1 − Create a new project in Android Studio, go to File ⇒ New Project and fill all required details to create a new project
Step 2 − Add the following code to res/layout/activity_main.xml.
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout
xmlns:a... | [
{
"code": null,
"e": 1124,
"s": 1062,
"text": "This example demonstrates how do I use SearchView in android."
},
{
"code": null,
"e": 1252,
"s": 1124,
"text": "Step 1 − Create a new project in Android Studio, go to File ⇒ New Project and fill all required details to create a new ... |
New in Hadoop: You should know the Various File Format in Hadoop. | by Sahil Dhankhad | Towards Data Science | A few weeks ago, I wrote an article about Hadoop and talked about the different parts of it. And how it plays an essential role in data engineering. In this article, I’m going to give a summary of the different file format in Hadoop. This topic is going to be a short and quick one. If you are trying to understand, how’... | [
{
"code": null,
"e": 606,
"s": 172,
"text": "A few weeks ago, I wrote an article about Hadoop and talked about the different parts of it. And how it plays an essential role in data engineering. In this article, I’m going to give a summary of the different file format in Hadoop. This topic is going t... |
Conversational AI Chatbot with Pretrained Transformers Using Pytorch | by Raymond Cheng | Towards Data Science | Conversational systems, or dialogue systems, have garnered huge interest in the modern Natural Language Processing (NLP) community. It is simply exciting to see how closely bots can mimic our thoughts, logic, and emotions as shown from their language. Today, we know that there are digital assistants right at the palm o... | [
{
"code": null,
"e": 670,
"s": 172,
"text": "Conversational systems, or dialogue systems, have garnered huge interest in the modern Natural Language Processing (NLP) community. It is simply exciting to see how closely bots can mimic our thoughts, logic, and emotions as shown from their language. Tod... |
Walrus Operator in Python 3.8 - GeeksforGeeks | 26 Aug, 2019
Python 3.8 is still in development. But many alpha versions have been released. One of the latest features in Python 3.8 is the Walrus Operator. In this article, we’re going to discuss the Walrus operator and explain it with an example.
Introduction
Walrus-operator is another name for assignment expression... | [
{
"code": null,
"e": 24617,
"s": 24589,
"text": "\n26 Aug, 2019"
},
{
"code": null,
"e": 24854,
"s": 24617,
"text": "Python 3.8 is still in development. But many alpha versions have been released. One of the latest features in Python 3.8 is the Walrus Operator. In this article, w... |
3D Mesh Plots using Plotly in Python - GeeksforGeeks | 01 Oct, 2020
Plotly is a Python library that is used to design graphs, especially interactive graphs. It can plot various graphs and charts like histogram, barplot, boxplot, spreadplot, and many more. It is mainly used in data analysis as well as financial analysis. plotly is an interactive visualization library
A Mesh... | [
{
"code": null,
"e": 23834,
"s": 23806,
"text": "\n01 Oct, 2020"
},
{
"code": null,
"e": 24135,
"s": 23834,
"text": "Plotly is a Python library that is used to design graphs, especially interactive graphs. It can plot various graphs and charts like histogram, barplot, boxplot, sp... |
How to use singleton class in android? | Before getting into example, we should know what singleton design pattern is. A singleton is a design pattern that restricts the instantiation of a class to only one instance. Notable uses include controlling concurrency and creating a central point of access for an application to access its data store.
This example de... | [
{
"code": null,
"e": 1367,
"s": 1062,
"text": "Before getting into example, we should know what singleton design pattern is. A singleton is a design pattern that restricts the instantiation of a class to only one instance. Notable uses include controlling concurrency and creating a central point of ... |
Hotel Housekeeping - Quick Guide | I consider housekeeping to be the heart of hotels and it is only when something goes wrong that it is recognized – just like our hearts.
− Sheila Perera FIH Glenmor Manager, Gleneagles Hotel.
The housekeeping department, in any hotel business, contributes to major amount of profit though it is considered as an ancillar... | [
{
"code": null,
"e": 2094,
"s": 1957,
"text": "I consider housekeeping to be the heart of hotels and it is only when something goes wrong that it is recognized – just like our hearts."
},
{
"code": null,
"e": 2149,
"s": 2094,
"text": "− Sheila Perera FIH Glenmor Manager, Gleneagl... |
Writing code faster in C++ STL - GeeksforGeeks | 20 Jul, 2017
You are wondering some time coder write his code in 2 min or less how? No kidding! Although this tip may not be very useful for competitions such as ICPC or IOI. But there are recent ICPCs ranks where rank i and rank i + 1 are just separated by few minutes. When you can solve the same number of problems as... | [
{
"code": null,
"e": 26279,
"s": 26251,
"text": "\n20 Jul, 2017"
},
{
"code": null,
"e": 26657,
"s": 26279,
"text": "You are wondering some time coder write his code in 2 min or less how? No kidding! Although this tip may not be very useful for competitions such as ICPC or IOI. B... |
Program to calculate the Round Trip Time (RTT) - GeeksforGeeks | 27 Sep, 2021
Round trip time(RTT) is the length of time it takes for a signal to be sent plus the length of time it takes for an acknowledgment of that signal to be received. This time, therefore, consists of the propagation times between the two-point of the signal.
On the Internet, an end-user can determine the RTT ... | [
{
"code": null,
"e": 37839,
"s": 37811,
"text": "\n27 Sep, 2021"
},
{
"code": null,
"e": 38095,
"s": 37839,
"text": "Round trip time(RTT) is the length of time it takes for a signal to be sent plus the length of time it takes for an acknowledgment of that signal to be received. T... |
Processes in Linux/Unix - GeeksforGeeks | 29 Jun, 2021
A program/command when executed, a special instance is provided by the system to the process. This instance consists of all the services/resources that may be utilized by the process under execution.
Whenever a command is issued in Unix/Linux, it creates/starts a new process. For example, pwd when issued ... | [
{
"code": null,
"e": 25253,
"s": 25225,
"text": "\n29 Jun, 2021"
},
{
"code": null,
"e": 25454,
"s": 25253,
"text": "A program/command when executed, a special instance is provided by the system to the process. This instance consists of all the services/resources that may be util... |
Compute average of two numbers without overflow - GeeksforGeeks | 28 Apr, 2021
Given two numbers, a and b. Compute the average of the two numbers.The well know formula (a + b) / 2 may fail at the following case : If, a = b = (2^31) – 1; i.e. INT_MAX. Now, (a+b) will cause overflow and hence formula (a + b) / 2 wont work Below is the implementation :
C++
Java
Python3
C#
Javascript
/... | [
{
"code": null,
"e": 25881,
"s": 25853,
"text": "\n28 Apr, 2021"
},
{
"code": null,
"e": 26156,
"s": 25881,
"text": "Given two numbers, a and b. Compute the average of the two numbers.The well know formula (a + b) / 2 may fail at the following case : If, a = b = (2^31) – 1; i.e. ... |
Python Program to Check Whether a Number is Positive or Negative or zero - GeeksforGeeks | 29 Aug, 2020
Given a number. The task is to check whether the number is positive or negative or zero.
Examples:
Input: 5
Output: Positive
Input: -5
Output: Negative
Approach:
We will use the if-elif statements in Python. We will check whether the number is greater than zero or smaller than zero or equal to zero.
Belo... | [
{
"code": null,
"e": 26663,
"s": 26635,
"text": "\n29 Aug, 2020"
},
{
"code": null,
"e": 26752,
"s": 26663,
"text": "Given a number. The task is to check whether the number is positive or negative or zero."
},
{
"code": null,
"e": 26762,
"s": 26752,
"text": "E... |
Netcat - Basic Usage and Overview - GeeksforGeeks | 13 Aug, 2020
Netcat is a Unix utility which reads and writes data across network connections using TCP or UDP protocol. Following tasks can be done easily with Netcat:
Connect to a port of a target host.
Listen to a certain port for any inbound connections.
Send data across client and server once the connection is esta... | [
{
"code": null,
"e": 26109,
"s": 26081,
"text": "\n13 Aug, 2020"
},
{
"code": null,
"e": 26264,
"s": 26109,
"text": "Netcat is a Unix utility which reads and writes data across network connections using TCP or UDP protocol. Following tasks can be done easily with Netcat:"
},
... |
Count number of unique ways to paint a N x 3 grid - GeeksforGeeks | 13 Jul, 2021
Given an integer N, the task is to paint a grid of size N x 3 using colors Red, Yellow, or Green while making such that no pair of adjacent cells has the same color. Print the number of distinct ways in which it is possible
Examples:
Input: N = 1Output: 12Explanation: Following 12 possible ways to paint th... | [
{
"code": null,
"e": 26349,
"s": 26321,
"text": "\n13 Jul, 2021"
},
{
"code": null,
"e": 26573,
"s": 26349,
"text": "Given an integer N, the task is to paint a grid of size N x 3 using colors Red, Yellow, or Green while making such that no pair of adjacent cells has the same colo... |
Weibull Hazard Plot - GeeksforGeeks | 16 Mar, 2021
Before getting into the Weibull Hazard plot, let us first understand what a hazard function is.
Hazard function (h(t)): It tells us about the measure of risk of failure. It gives us information on the probability of failure of the object in a study in (t+1) time, assuming it has survived till time t. So t... | [
{
"code": null,
"e": 25589,
"s": 25561,
"text": "\n16 Mar, 2021"
},
{
"code": null,
"e": 25686,
"s": 25589,
"text": "Before getting into the Weibull Hazard plot, let us first understand what a hazard function is. "
},
{
"code": null,
"e": 26041,
"s": 25686,
"t... |
Printing Longest Common Subsequence - GeeksforGeeks | 12 Apr, 2022
Given two sequences, print the longest subsequence present in both of them. Examples: LCS for input Sequences “ABCDGH” and “AEDFHR” is “ADH” of length 3. LCS for input Sequences “AGGTAB” and “GXTXAYB” is “GTAB” of length 4.We have discussed Longest Common Subsequence (LCS) problem in a previous post. The f... | [
{
"code": null,
"e": 26403,
"s": 26375,
"text": "\n12 Apr, 2022"
},
{
"code": null,
"e": 27600,
"s": 26403,
"text": "Given two sequences, print the longest subsequence present in both of them. Examples: LCS for input Sequences “ABCDGH” and “AEDFHR” is “ADH” of length 3. LCS for i... |
LocalDateTime minus() method in Java with Examples - GeeksforGeeks | 28 Jan, 2022
In LocalDateTime class, there are two types of minus() method depending upon the parameters passed to it.
minus() method of a LocalDateTime class used to returns a copy of this LocalDateTime with the specified amount of unit subtracted.If it is not possible to subtract the amount, because the unit is not ... | [
{
"code": null,
"e": 25605,
"s": 25577,
"text": "\n28 Jan, 2022"
},
{
"code": null,
"e": 25712,
"s": 25605,
"text": "In LocalDateTime class, there are two types of minus() method depending upon the parameters passed to it. "
},
{
"code": null,
"e": 25981,
"s": 257... |
How DORA Works? - GeeksforGeeks | 16 Dec, 2021
Dynamic Host Configuration Protocol(DHCP) uses the DORA. Dynamic Host Configuration Protocol is the protocol of the application layer. It is used to provide Subnet Mask, Router Address, DNS Address, and Vendor Class Identifier. In fact, DHCP provides an automatic IP address to Hosts which want to connect t... | [
{
"code": null,
"e": 25755,
"s": 25727,
"text": "\n16 Dec, 2021"
},
{
"code": null,
"e": 26075,
"s": 25755,
"text": "Dynamic Host Configuration Protocol(DHCP) uses the DORA. Dynamic Host Configuration Protocol is the protocol of the application layer. It is used to provide Subnet... |
How to check whether an image is loaded or not ? - GeeksforGeeks | 12 May, 2022
While inserting images in HTML pages sometimes the image may fail to load due to:
Getting the image URL wrong
poor internet connection
So we may want to check if the image is not loading due to these reasons. To check we can use the below methods
Method 1:
Using attributes of <img> to check whether an ima... | [
{
"code": null,
"e": 33003,
"s": 32975,
"text": "\n12 May, 2022"
},
{
"code": null,
"e": 33085,
"s": 33003,
"text": "While inserting images in HTML pages sometimes the image may fail to load due to:"
},
{
"code": null,
"e": 33113,
"s": 33085,
"text": "Getting ... |
Python super() - GeeksforGeeks | 07 Feb, 2022
One of the important OOP features is Inheritance in Python. When a class inherits some or all of the behaviors from another class is known as Inheritance. In such a case, the inherited class is the subclass and the latter class is the parent class. In an inherited subclass, a parent class can be referred t... | [
{
"code": null,
"e": 25561,
"s": 25533,
"text": "\n07 Feb, 2022"
},
{
"code": null,
"e": 26033,
"s": 25561,
"text": "One of the important OOP features is Inheritance in Python. When a class inherits some or all of the behaviors from another class is known as Inheritance. In such ... |
Find a N-digit number such that it is not divisible by any of its digits - GeeksforGeeks | 15 Nov, 2021
Given an integer N, the task is to find any N-digit positive number (except for zeros) such that it is not divisible by any of its digits. If it is not possible to find any such number then print -1.Note: There can be more than one such number for the same N-digit.Examples:
Input: N = 2
Output: 23
23 i... | [
{
"code": null,
"e": 26799,
"s": 26771,
"text": "\n15 Nov, 2021"
},
{
"code": null,
"e": 27076,
"s": 26799,
"text": "Given an integer N, the task is to find any N-digit positive number (except for zeros) such that it is not divisible by any of its digits. If it is not possible to... |
Number of rows and columns in a Matrix that contain repeated values - GeeksforGeeks | 17 May, 2020
Given a N x N square matrix arr[][] which contains only integers between 1 and N, the task is to compute the number of rows and the number of columns in the matrix that contain repeated values.
Examples:
Input: N = 4, arr[][] = {{1, 2, 3, 4}, {2, 1, 4, 3}, {3, 4, 1, 2}, {4, 3, 2, 1}}Output: 0 0Explanation:... | [
{
"code": null,
"e": 26141,
"s": 26113,
"text": "\n17 May, 2020"
},
{
"code": null,
"e": 26335,
"s": 26141,
"text": "Given a N x N square matrix arr[][] which contains only integers between 1 and N, the task is to compute the number of rows and the number of columns in the matrix... |
Python String splitlines() Method - GeeksforGeeks | 19 Aug, 2021
Python String splitlines() method is used to split the lines at line boundaries. The function returns a list of lines in the string, including the line break(optional).
Syntax:
string.splitlines([keepends])
Parameters:
keepends (optional): When set to True line breaks are included in the resulting list. T... | [
{
"code": null,
"e": 24719,
"s": 24691,
"text": "\n19 Aug, 2021"
},
{
"code": null,
"e": 24888,
"s": 24719,
"text": "Python String splitlines() method is used to split the lines at line boundaries. The function returns a list of lines in the string, including the line break(optio... |
DoubleConsumer Interface in Java with Examples - GeeksforGeeks | 09 Oct, 2018
The DoubleConsumer Interface is a part of the java.util.function package which has been introduced since Java 8, to implement functional programming in Java. It represents a function which takes in one double-valued argument but does not return any value.
The lambda expression assigned to an object of Doub... | [
{
"code": null,
"e": 23557,
"s": 23529,
"text": "\n09 Oct, 2018"
},
{
"code": null,
"e": 23813,
"s": 23557,
"text": "The DoubleConsumer Interface is a part of the java.util.function package which has been introduced since Java 8, to implement functional programming in Java. It re... |
SQL UPDATE Statement | The UPDATE statement is used to modify the existing records in a table.
Note: Be careful when updating records in a table! Notice the
WHERE clause in the UPDATE statement.
The WHERE clause specifies which record(s) that should be updated. If
you omit the WHERE clause, all records in the table will be updated!
Below i... | [
{
"code": null,
"e": 72,
"s": 0,
"text": "The UPDATE statement is used to modify the existing records in a table."
},
{
"code": null,
"e": 313,
"s": 72,
"text": "Note: Be careful when updating records in a table! Notice the \nWHERE clause in the UPDATE statement.\nThe WHERE claus... |
How to build an MP3 Music Player with Python | by Papa Moryba Kouate | Towards Data Science | In this article, I will show you how you can create your own music player using python.
Yes, I know I am a data analyst, but sometimes when I work with data I like listening to music. Data Analysis with music can be a very interesting mix of inspiration and concentration for a data analyst or a data scientist. And buil... | [
{
"code": null,
"e": 260,
"s": 172,
"text": "In this article, I will show you how you can create your own music player using python."
},
{
"code": null,
"e": 706,
"s": 260,
"text": "Yes, I know I am a data analyst, but sometimes when I work with data I like listening to music. Da... |
How to create random sample based on group columns of a data.table in R? | Random sampling helps us to reduce the biasedness in the analysis. If we have data in groups then we might want to find a random sample based on groups. For example, if we have a data frame with a group variable and each group contains ten values then we might want to create a random sample where we will have two value... | [
{
"code": null,
"e": 1472,
"s": 1062,
"text": "Random sampling helps us to reduce the biasedness in the analysis. If we have data in groups then we might want to find a random sample based on groups. For example, if we have a data frame with a group variable and each group contains ten values then w... |
Waterfall Charts with Plotly. Why & How | by Darío Weitz | Towards Data Science | AKA: Flying Bricks Charts, Floating Bricks Charts, Mario Charts
Why: is a 2D plot used to represent the cumulative effects of sequentially added positive or negative values over time or over multiple categorical steps. Over time or time-based waterfall charts represent additions and subtractions over a time period. Cat... | [
{
"code": null,
"e": 236,
"s": 172,
"text": "AKA: Flying Bricks Charts, Floating Bricks Charts, Mario Charts"
},
{
"code": null,
"e": 676,
"s": 236,
"text": "Why: is a 2D plot used to represent the cumulative effects of sequentially added positive or negative values over time or ... |
JK Flip Flop and SR Flip Flop - GeeksforGeeks | 06 Jul, 2020
Flip-Flop is popularly known as the basic digital memory circuit. It has two states as logic 1(High) and logic 0(low) states. A flip flop is a sequential circuit which consists of a single binary state of information or data. The digital circuit is a flip flop which has two outputs and are of opposite stat... | [
{
"code": null,
"e": 24380,
"s": 24352,
"text": "\n06 Jul, 2020"
},
{
"code": null,
"e": 24737,
"s": 24380,
"text": "Flip-Flop is popularly known as the basic digital memory circuit. It has two states as logic 1(High) and logic 0(low) states. A flip flop is a sequential circuit w... |
Tryit Editor v3.6 - Show Python | f = open("demofile2.txt", "a")
f.write("Now the file has more content!")
f.close()
#open and read the file after the appending:
f = open("demofile2.txt", "r") | [
{
"code": null,
"e": 31,
"s": 0,
"text": "f = open(\"demofile2.txt\", \"a\")"
},
{
"code": null,
"e": 73,
"s": 31,
"text": "f.write(\"Now the file has more content!\")"
},
{
"code": null,
"e": 83,
"s": 73,
"text": "f.close()"
},
{
"code": null,
"e"... |
How to install Python modules in Cygwin? | While installing cygwin, make sure you install the python/python-setuptools from the list. This will install "easy_install" package. Once you have easy_install, you can use it to install pip. Type the following command:
$ easy_install-a.b pip
You must replace a.b with your python version which can be 2.7 or 3.4 or what... | [
{
"code": null,
"e": 1282,
"s": 1062,
"text": "While installing cygwin, make sure you install the python/python-setuptools from the list. This will install \"easy_install\" package. Once you have easy_install, you can use it to install pip. Type the following command:"
},
{
"code": null,
... |
Behavior Driven Development - Gherkin | Gherkin is a language, which is used to write Features, Scenarios, and Steps. The purpose of Gherkin is to help us write concrete requirements.
To understand what we mean by concrete requirements, consider the following example −
Customers should be prevented from entering invalid credit card details.
If a customer ent... | [
{
"code": null,
"e": 1876,
"s": 1732,
"text": "Gherkin is a language, which is used to write Features, Scenarios, and Steps. The purpose of Gherkin is to help us write concrete requirements."
},
{
"code": null,
"e": 1962,
"s": 1876,
"text": "To understand what we mean by concrete... |
pthread_equal() in C | The pthread_equal() function is used to check whether two threads are equal or not. This returns 0 or non-zero value. For equal threads, it will return non-zero, otherwise it returns 0. The syntax of this function is like below −
int pthread_equal (pthread_t th1, pthread_t th2);
Now let us see the pthread_equal() in ac... | [
{
"code": null,
"e": 1292,
"s": 1062,
"text": "The pthread_equal() function is used to check whether two threads are equal or not. This returns 0 or non-zero value. For equal threads, it will return non-zero, otherwise it returns 0. The syntax of this function is like below −"
},
{
"code": n... |
Deep Learning with CIFAR-10. Neural Networks are the programmable... | by Aarya Brahmane | Towards Data Science | Neural Networks are the programmable patterns that helps to solve complex problems and bring the best achievable output. Deep Learning as we all know is a step ahead of Machine Learning, and it helps to train the Neural Networks for getting the solution of questions unanswered and or improving the solution!
In this art... | [
{
"code": null,
"e": 481,
"s": 172,
"text": "Neural Networks are the programmable patterns that helps to solve complex problems and bring the best achievable output. Deep Learning as we all know is a step ahead of Machine Learning, and it helps to train the Neural Networks for getting the solution o... |
Zero-Inflated Regression. Teach your regressor how to output... | by Dr. Robert Kübler | Towards Data Science | When working on regression problems, often you have target values that are continuously and evenly distributed in some range. Let me illustrate what I mean by this. Consider the following dataset 2-dimensional dataset:
In this case, the target values are all scattered in the range from about -300 to 400. Applying linea... | [
{
"code": null,
"e": 391,
"s": 172,
"text": "When working on regression problems, often you have target values that are continuously and evenly distributed in some range. Let me illustrate what I mean by this. Consider the following dataset 2-dimensional dataset:"
},
{
"code": null,
"e":... |
How to iterate through all selected elements into an array ? - GeeksforGeeks | 19 Feb, 2020
The task is to add all the selected HTML elements into an array and iterate through the array. To achieve this, the first step is to select all the desired elements. There are several ways to do this.
Finding HTML elements by id:var myElement = document.getElementById("element-id");
var myElement = documen... | [
{
"code": null,
"e": 24434,
"s": 24406,
"text": "\n19 Feb, 2020"
},
{
"code": null,
"e": 24635,
"s": 24434,
"text": "The task is to add all the selected HTML elements into an array and iterate through the array. To achieve this, the first step is to select all the desired element... |
VBScript - Error Handling | There are three types of errors in programming: (a) Syntax Errors, (b) Runtime Errors, and (c) Logical Errors.
Syntax errors, also called parsing errors, occur at interpretation time for VBScript. For example, the following line causes a syntax error because it is missing a closing parenthesis −
<script type = "text/vb... | [
{
"code": null,
"e": 2191,
"s": 2080,
"text": "There are three types of errors in programming: (a) Syntax Errors, (b) Runtime Errors, and (c) Logical Errors."
},
{
"code": null,
"e": 2377,
"s": 2191,
"text": "Syntax errors, also called parsing errors, occur at interpretation time... |
Android - Location Based Services | Android location APIs make it easy for you to build location-aware applications, without needing to focus on the details of the underlying location technology.
This becomes possible with the help of Google Play services, which facilitates adding location awareness to your app with automated location tracking, geofencin... | [
{
"code": null,
"e": 3767,
"s": 3607,
"text": "Android location APIs make it easy for you to build location-aware applications, without needing to focus on the details of the underlying location technology."
},
{
"code": null,
"e": 3956,
"s": 3767,
"text": "This becomes possible ... |
How to design a dropdown menu using pure CSS ? - GeeksforGeeks | 23 Feb, 2021
The Dropdown Menu is a common UI pattern that we have seen on the web nowadays. It is useful in displaying related information in pieces without overwhelming the user with buttons, texts, and options. Most of the time it is seen inside the navigation bar or headers of websites.
With the help of Pure CSS, w... | [
{
"code": null,
"e": 24708,
"s": 24680,
"text": "\n23 Feb, 2021"
},
{
"code": null,
"e": 24987,
"s": 24708,
"text": "The Dropdown Menu is a common UI pattern that we have seen on the web nowadays. It is useful in displaying related information in pieces without overwhelming the u... |
CSS | ellipse () Function - GeeksforGeeks | 17 Jun, 2021
The ellipse() function is an inbuilt function in CSS which is used to create floating text around the ellipse shape picture or anything else. Syntax:
circle(100px 10 px at 10px 150px);
or
ellipse( percentage percentage );
Parameter: This function accepts single parameter length or percentage which is use... | [
{
"code": null,
"e": 23986,
"s": 23958,
"text": "\n17 Jun, 2021"
},
{
"code": null,
"e": 24137,
"s": 23986,
"text": "The ellipse() function is an inbuilt function in CSS which is used to create floating text around the ellipse shape picture or anything else. Syntax: "
},
{
... |
Python — Print colored text with ease | by Mike Huls | Towards Data Science | Which of the two screenshot in the image above looks better? I’d definitely choose the right one! The colors immediately draw your eye to important things and give you extra information that you can see at a glance.
This article touches two subjects: first we’ll get into how printing color in the terminal works on a
ho... | [
{
"code": null,
"e": 388,
"s": 172,
"text": "Which of the two screenshot in the image above looks better? I’d definitely choose the right one! The colors immediately draw your eye to important things and give you extra information that you can see at a glance."
},
{
"code": null,
"e": 49... |
Integers have sum of squared divisors as perfect square in JavaScript | We are required to write a JavaScript function that takes in a range specified by an array of two numbers m and n.
Our function is supposed to find all integers between m and n (m and n integers such as 1 <= m <= n) such that the sum of their squared divisors is itself a square.
It should return an array of subarrays. ... | [
{
"code": null,
"e": 1177,
"s": 1062,
"text": "We are required to write a JavaScript function that takes in a range specified by an array of two numbers m and n."
},
{
"code": null,
"e": 1342,
"s": 1177,
"text": "Our function is supposed to find all integers between m and n (m an... |
Unix / Linux Basic Utilities - Printing, Email | In this chapter, we will discuss in detail about Printing and Email as the basic utilities of Unix. So far, we have tried to understand the Unix OS and the nature of its basic commands. In this chapter, we will learn some important Unix utilities that can be used in our day-to-day life.
Before you print a file on a Uni... | [
{
"code": null,
"e": 3035,
"s": 2747,
"text": "In this chapter, we will discuss in detail about Printing and Email as the basic utilities of Unix. So far, we have tried to understand the Unix OS and the nature of its basic commands. In this chapter, we will learn some important Unix utilities that c... |
Dot notation vs Bracket notation in JavaScript | The dot notation and bracket notation both are used to access the object properties in JavaScript. The dot notation is used mostly as it is easier to read and comprehend and also
less verbose. The main difference between dot notation and bracket notation is that the bracket notation allows us to access object propertie... | [
{
"code": null,
"e": 1400,
"s": 1062,
"text": "The dot notation and bracket notation both are used to access the object properties in JavaScript. The dot notation is used mostly as it is easier to read and comprehend and also\nless verbose. The main difference between dot notation and bracket notati... |
fmt.print() Function in Golang With Examples - GeeksforGeeks | 05 May, 2020
In Go language, fmt package implements formatted I/O with functions analogous to C’s printf() and scanf() function. The fmt.print() function in Go language formats using the default formats for its operands and writes to standard output. Here Spaces are added between operands when any string is not used as... | [
{
"code": null,
"e": 24460,
"s": 24432,
"text": "\n05 May, 2020"
},
{
"code": null,
"e": 24915,
"s": 24460,
"text": "In Go language, fmt package implements formatted I/O with functions analogous to C’s printf() and scanf() function. The fmt.print() function in Go language formats... |
How to add a JSON string to an existing JSON file in Java? | A Gson is a json library for Java and it can be used to generate a JSON. In the initial step, we can read a JSON file and parsing to a Java object then need to typecast the Java object to a JSonObject and parsing to a JsonArray. Then iterating this JSON array to print the JsonElement. We can create a JsonWriter class t... | [
{
"code": null,
"e": 1514,
"s": 1062,
"text": "A Gson is a json library for Java and it can be used to generate a JSON. In the initial step, we can read a JSON file and parsing to a Java object then need to typecast the Java object to a JSonObject and parsing to a JsonArray. Then iterating this JSON... |
Count Odd Even - Java | Practice | GeeksforGeeks | Congrats on completing Module 1.
In the previous module we learnt about the basics of Java. Now, we'll move to more complex stuff. Here, we'll learn about arrays.
Given an array A of N elements. The task is to count number of even and odd elements in the array.
Example 1:
Input:
5
1 2 3 4 5
Output:
3 2
Explanation:
... | [
{
"code": null,
"e": 259,
"s": 226,
"text": "Congrats on completing Module 1."
},
{
"code": null,
"e": 390,
"s": 259,
"text": "In the previous module we learnt about the basics of Java. Now, we'll move to more complex stuff. Here, we'll learn about arrays."
},
{
"code": ... |
Summarization of COVID research papers using BART model | by Priya Dwivedi | Towards Data Science | In collaboration with Allen AI, White House and several other institutions, Kaggle has open sourced COVID-19 open research data set (CORD-19) . CORD-19 is a resource of over 52,000 scholarly articles, including over 41,000 with full text, about COVID-19, SARS-CoV-2, and related coronaviruses. This freely available data... | [
{
"code": null,
"e": 891,
"s": 172,
"text": "In collaboration with Allen AI, White House and several other institutions, Kaggle has open sourced COVID-19 open research data set (CORD-19) . CORD-19 is a resource of over 52,000 scholarly articles, including over 41,000 with full text, about COVID-19, ... |
Count of Double Prime numbers in a given range L to R - GeeksforGeeks | 16 Apr, 2021
Given two integers L and R, the task to find the number of Double Prime numbers in the range.
A number N is called double prime when the count of prime numbers in the range 1 to N (excluding 1 and including N) is also prime.
Examples:
Input: L = 3, R = 10 Output: 4 Explanation: For 3, we have the range ... | [
{
"code": null,
"e": 25020,
"s": 24992,
"text": "\n16 Apr, 2021"
},
{
"code": null,
"e": 25115,
"s": 25020,
"text": "Given two integers L and R, the task to find the number of Double Prime numbers in the range. "
},
{
"code": null,
"e": 25246,
"s": 25115,
"tex... |
Graph Theory - Isomorphism | A graph can exist in different forms having the same number of vertices, edges, and also the same edge connectivity. Such graphs are called isomorphic graphs. Note that we label the graphs in this chapter mainly for the purpose of referring to them and recognizing them from one another.
Two graphs G1 and G2 are said to... | [
{
"code": null,
"e": 2254,
"s": 1966,
"text": "A graph can exist in different forms having the same number of vertices, edges, and also the same edge connectivity. Such graphs are called isomorphic graphs. Note that we label the graphs in this chapter mainly for the purpose of referring to them and ... |
C# Program to Check the Length of Courses is More than 2 Characters Using LINQ - GeeksforGeeks | 28 Nov, 2021
Given an array that contains a list of different courses like “DSA”, “OS”, “JavaScript”, etc., now our task is to check the length of all the courses present in the given array is more than 2 characters or not with the help of LINQ. So to do our task we use the All() method of LINQ. This method returns tru... | [
{
"code": null,
"e": 24302,
"s": 24274,
"text": "\n28 Nov, 2021"
},
{
"code": null,
"e": 24727,
"s": 24302,
"text": "Given an array that contains a list of different courses like “DSA”, “OS”, “JavaScript”, etc., now our task is to check the length of all the courses present in th... |
Big Data Analytics - Introduction to SQL | SQL stands for structured query language. It is one of the most widely used languages for extracting data from databases in traditional data warehouses and big data technologies. In order to demonstrate the basics of SQL we will be working with examples. In order to focus on the language itself, we will be using SQL in... | [
{
"code": null,
"e": 2959,
"s": 2554,
"text": "SQL stands for structured query language. It is one of the most widely used languages for extracting data from databases in traditional data warehouses and big data technologies. In order to demonstrate the basics of SQL we will be working with examples... |
How to generate standard normal random numbers in R? | A standard normal distribution is the type of distribution that has mean equals to zero with standard deviation 1. If we want to generate standard normal random numbers then rnorm function of R can be used but need to pass the mean = 0 and standard deviation = 1 inside this function.
Live Demo
rnorm(10,0,1)
[1] 0.6936... | [
{
"code": null,
"e": 1347,
"s": 1062,
"text": "A standard normal distribution is the type of distribution that has mean equals to zero with standard deviation 1. If we want to generate standard normal random numbers then rnorm function of R can be used but need to pass the mean = 0 and standard devi... |
Node.js – Chalk Module | The chalk module is a third-party library that can be used for styling of texts. It allows the users to create their own themes in a Node.js project.
This module helps the users to customize the response messages with
different colors as per the preferences.
This module helps the users to customize the response message... | [
{
"code": null,
"e": 1212,
"s": 1062,
"text": "The chalk module is a third-party library that can be used for styling of texts. It allows the users to create their own themes in a Node.js project."
},
{
"code": null,
"e": 1321,
"s": 1212,
"text": "This module helps the users to c... |
MongoDB - Database, Collection, and Document - GeeksforGeeks | 13 Aug, 2021
Databases, collections, documents are important parts of MongoDB without them you are not able to store data on the MongoDB server. A Database contains a collection, and a collection contains documents and the documents contain data, they are related to each other.
In MongoDB, a database contains the coll... | [
{
"code": null,
"e": 25400,
"s": 25372,
"text": "\n13 Aug, 2021"
},
{
"code": null,
"e": 25667,
"s": 25400,
"text": "Databases, collections, documents are important parts of MongoDB without them you are not able to store data on the MongoDB server. A Database contains a collectio... |
Python | Get match indices - GeeksforGeeks | 19 Mar, 2019
Sometimes, while working with lists we need to handle two lists and search for the matches, and return just the indices of the match. Querying the whole list for this process is not feasible when the size of master list is very large, hence having just the match indices helps in this cause. Let’s discuss c... | [
{
"code": null,
"e": 26257,
"s": 26229,
"text": "\n19 Mar, 2019"
},
{
"code": null,
"e": 26607,
"s": 26257,
"text": "Sometimes, while working with lists we need to handle two lists and search for the matches, and return just the indices of the match. Querying the whole list for t... |
How to debug lambda expressions in Java? | The lambda expression composed of two parts, one is an argument and another one is code or expression. These two parts have separated by an arrow operator "->". We can use different IDE's like Netbeans, IntelliJ, and Eclipse to debug the lambda expressions in Java. It is always possible to create multi-line lambda expr... | [
{
"code": null,
"e": 1613,
"s": 1062,
"text": "The lambda expression composed of two parts, one is an argument and another one is code or expression. These two parts have separated by an arrow operator \"->\". We can use different IDE's like Netbeans, IntelliJ, and Eclipse to debug the lambda expres... |
Apply Glowing Effect to the Image using HTML and CSS - GeeksforGeeks | 16 Feb, 2021
While surfing most of the websites you have seen some special effects which can be seen on various images while putting your cursor over them. So, in this article we are going to implement the same. We can use such images as a card for our website.
In this article, you’re going to learn how to apply glowi... | [
{
"code": null,
"e": 26647,
"s": 26619,
"text": "\n16 Feb, 2021"
},
{
"code": null,
"e": 26897,
"s": 26647,
"text": "While surfing most of the websites you have seen some special effects which can be seen on various images while putting your cursor over them. So, in this article ... |
Check if a number is Bleak - GeeksforGeeks | 17 Nov, 2021
A number ‘n’ is called Bleak if it cannot be represented as sum of a positive number x and set bit count in x, i.e., x + countSetBits(x) is not equal to n for any non-negative number x.Examples :
Input : n = 3
Output : false
3 is not Bleak as it can be represented
as 2 + countSetBits(2).
Input : n = 4
Ou... | [
{
"code": null,
"e": 26615,
"s": 26587,
"text": "\n17 Nov, 2021"
},
{
"code": null,
"e": 26812,
"s": 26615,
"text": "A number ‘n’ is called Bleak if it cannot be represented as sum of a positive number x and set bit count in x, i.e., x + countSetBits(x) is not equal to n for any ... |
How to create a triangle using Python for loop? | There are multiple variations of generating triangle using numbers in Python. Let's look at the 2 simplest forms:
for i in range(5):
for j in range(i + 1):
print(j + 1, end="")
print("")
This will give the output:
1
12
123
1234
12345
You can also print numbers continuously using:
start = 1
for i in range(5)... | [
{
"code": null,
"e": 1176,
"s": 1062,
"text": "There are multiple variations of generating triangle using numbers in Python. Let's look at the 2 simplest forms:"
},
{
"code": null,
"e": 1261,
"s": 1176,
"text": "for i in range(5):\n for j in range(i + 1):\n print(j + 1, en... |
Circumradius of the rectangle - GeeksforGeeks | 08 Mar, 2022
Here we have a rectangle of length l & breadth b. We have to find the circumradius of the rectangle.
Examples:
Input : l = 3, b = 4
Output :2.5
Input :l = 10, b = 12
Output :3.95227774224
Approach: From the diagram, we can clearly understand the circumradius r is half of the diagonal of the rectangle.
... | [
{
"code": null,
"e": 25276,
"s": 25248,
"text": "\n08 Mar, 2022"
},
{
"code": null,
"e": 25377,
"s": 25276,
"text": "Here we have a rectangle of length l & breadth b. We have to find the circumradius of the rectangle."
},
{
"code": null,
"e": 25388,
"s": 25377,
... |
How do you check if a widget has a focus in Tkinter? | Let us assume that we want to check if a particular widget has a focused set or not. The only way to check the widget focus is to use the utility method focus_get(). It returns the object containing the widget’s information which is currently focused on, during the program’s execution. We will use the focus_get() metho... | [
{
"code": null,
"e": 1442,
"s": 1062,
"text": "Let us assume that we want to check if a particular widget has a focused set or not. The only way to check the widget focus is to use the utility method focus_get(). It returns the object containing the widget’s information which is currently focused on... |
Cucumber - Scenarios | Scenario is one of the core Gherkin structures. Every scenario starts with the keyword “Scenario:” (or localized one) and is followed by an optional scenario title. Each feature can have one or more scenarios and every scenario consists of one or more steps. A very simple example of scenario can be −
Scenario − Verify ... | [
{
"code": null,
"e": 2264,
"s": 1962,
"text": "Scenario is one of the core Gherkin structures. Every scenario starts with the keyword “Scenario:” (or localized one) and is followed by an optional scenario title. Each feature can have one or more scenarios and every scenario consists of one or more s... |
Minimum number of jumps | Practice | GeeksforGeeks | Given an array of N integers arr[] where each element represents the max number of steps that can be made forward from that element. Find the minimum number of jumps to reach the end of the array (starting from the first element). If an element is 0, then you cannot move through that element.
Note: Return -1 if you can... | [
{
"code": null,
"e": 589,
"s": 238,
"text": "Given an array of N integers arr[] where each element represents the max number of steps that can be made forward from that element. Find the minimum number of jumps to reach the end of the array (starting from the first element). If an element is 0, then... |
Object Oriented Python - Building Blocks | In this chapter, we will discuss object oriented terms and programming concepts in detail.Class is a just a factory for an instance. This factory contains the blueprint which describes
how to make the instances. An instances or object are constructed from the class. In most cases, we can have more than one instances of... | [
{
"code": null,
"e": 2304,
"s": 1810,
"text": "In this chapter, we will discuss object oriented terms and programming concepts in detail.Class is a just a factory for an instance. This factory contains the blueprint which describes\nhow to make the instances. An instances or object are constructed f... |
EJB - Entity Relationships | EJB 3.0 provides option to define database entity relationships/mappings like one-to-one, one-to-many, many-to-one, and many-to-many relationships.
Following are the relevant annotations −
One-to-One − Objects have one-to-one relationship. For example, a passenger can travel using a single ticket at a time.
One-to-One ... | [
{
"code": null,
"e": 2195,
"s": 2047,
"text": "EJB 3.0 provides option to define database entity relationships/mappings like one-to-one, one-to-many, many-to-one, and many-to-many relationships."
},
{
"code": null,
"e": 2236,
"s": 2195,
"text": "Following are the relevant annotat... |
Box Stacking | Practice | GeeksforGeeks | You are given a set of N types of rectangular 3-D boxes, where the ith box has height h, width w and length l. You task is to create a stack of boxes which is as tall as possible, but you can only stack a box on top of another box if the dimensions of the 2-D base of the lower box are each strictly larger than those of... | [
{
"code": null,
"e": 849,
"s": 238,
"text": "You are given a set of N types of rectangular 3-D boxes, where the ith box has height h, width w and length l. You task is to create a stack of boxes which is as tall as possible, but you can only stack a box on top of another box if the dimensions of the... |
XSLT <value-of> | <xsl:value-of> tag puts the value of the selected node as per XPath expression, as text.
Following is the syntax declaration of <xsl:value-of> element.
<xsl:value-of
select = Expression
disable-output-escaping = "yes" | "no" >
</xsl:value-of>
Select
XPath Expression to be evaluated in current context.
disable-ou... | [
{
"code": null,
"e": 1848,
"s": 1759,
"text": "<xsl:value-of> tag puts the value of the selected node as per XPath expression, as text."
},
{
"code": null,
"e": 1911,
"s": 1848,
"text": "Following is the syntax declaration of <xsl:value-of> element."
},
{
"code": null,
... |
How to Zoom an Image on Mouse Hover using CSS ? - GeeksforGeeks | 30 Jul, 2021
The image zoom effect is used to apply zoom over an image on mouse hover or click. This type of effect is mostly used in portfolio sites. It is useful in situations where we want to show the user details on the image.
There are two possible ways to create a mouse hover effect.
Using JavaScript
Using CSS
In... | [
{
"code": null,
"e": 24943,
"s": 24915,
"text": "\n30 Jul, 2021"
},
{
"code": null,
"e": 25161,
"s": 24943,
"text": "The image zoom effect is used to apply zoom over an image on mouse hover or click. This type of effect is mostly used in portfolio sites. It is useful in situation... |
XAML - Window | It is the root window of an XAML application which provides minimize/maximize option, Title bar, border, and close button. It also provides the ability to create, configure, show, and manage the lifetime of windows and dialog boxes. The hierarchical inheritance of Window class is as follows −
AllowsTransparency
Gets or... | [
{
"code": null,
"e": 2217,
"s": 1923,
"text": "It is the root window of an XAML application which provides minimize/maximize option, Title bar, border, and close button. It also provides the ability to create, configure, show, and manage the lifetime of windows and dialog boxes. The hierarchical inh... |
C library function - abs() | The C library function int abs(int x) returns the absolute value of int x.
Following is the declaration for abs() function.
int abs(int x)
x − This is the integral value.
x − This is the integral value.
This function returns the absolute value of x.
The following example shows the usage of abs() function.
#include <std... | [
{
"code": null,
"e": 2082,
"s": 2007,
"text": "The C library function int abs(int x) returns the absolute value of int x."
},
{
"code": null,
"e": 2131,
"s": 2082,
"text": "Following is the declaration for abs() function."
},
{
"code": null,
"e": 2146,
"s": 2131,
... |
Generating random number list in Python | There is a need to generate random numbers when studying a model or behavior of a program for different range of values. Python can generate such random numbers by using the random module. In the below examples we will first see how to generate a single random number and then extend it to generate a list of random numb... | [
{
"code": null,
"e": 1387,
"s": 1062,
"text": "There is a need to generate random numbers when studying a model or behavior of a program for different range of values. Python can generate such random numbers by using the random module. In the below examples we will first see how to generate a single... |
Spring Boot - Actuator | Spring Boot Actuator provides secured endpoints for monitoring and managing your Spring Boot application. By default, all actuator endpoints are secured. In this chapter, you will learn in detail about how to enable Spring Boot actuator to your application.
To enable Spring Boot actuator endpoints to your Spring Boot a... | [
{
"code": null,
"e": 3283,
"s": 3025,
"text": "Spring Boot Actuator provides secured endpoints for monitoring and managing your Spring Boot application. By default, all actuator endpoints are secured. In this chapter, you will learn in detail about how to enable Spring Boot actuator to your applicat... |
How to validate whether a string is a number in C#? | A string having number can be validated using int.TryParse or int.Parse.
Int.Parse throws an exception if it cannot parse the string to an integer, whereas Int.TryParse returns a bool indicating whether it succeeded. Also, Int.TryParse has an out parameter which has the value of the parsed string.
Live Demo
using Syst... | [
{
"code": null,
"e": 1135,
"s": 1062,
"text": "A string having number can be validated using int.TryParse or int.Parse."
},
{
"code": null,
"e": 1361,
"s": 1135,
"text": "Int.Parse throws an exception if it cannot parse the string to an integer, whereas Int.TryParse returns a boo... |
Python 3 - Tuple max() Method | The max() method returns the elements from the tuple with maximum value.
Following is the syntax for max() method −
max(tuple)
tuple − This is a tuple from which max valued element to be returned.
This method returns the elements from the tuple with maximum value.
The following example shows the usage of max() method.... | [
{
"code": null,
"e": 2413,
"s": 2340,
"text": "The max() method returns the elements from the tuple with maximum value."
},
{
"code": null,
"e": 2456,
"s": 2413,
"text": "Following is the syntax for max() method −"
},
{
"code": null,
"e": 2468,
"s": 2456,
"tex... |
NumPy - Array Attributes | In this chapter, we will discuss the various array attributes of NumPy.
This array attribute returns a tuple consisting of array dimensions. It can also be used to resize the array.
import numpy as np
a = np.array([[1,2,3],[4,5,6]])
print a.shape
The output is as follows −
(2, 3)
# this resizes the ndarray
import n... | [
{
"code": null,
"e": 2315,
"s": 2243,
"text": "In this chapter, we will discuss the various array attributes of NumPy."
},
{
"code": null,
"e": 2425,
"s": 2315,
"text": "This array attribute returns a tuple consisting of array dimensions. It can also be used to resize the array."... |
Recursively loop through an array and return number of items with JavaScript? | We have to write a function, say searchRecursively() that takes in an array and a search query
and returns the count of that search query in the nested array.
For example, if the array is given by −
const names = ["rakesh", ["kalicharan", "krishna", "rakesh", "james", ["michael", "nathan", "rakesh", "george"]]];
Then −... | [
{
"code": null,
"e": 1221,
"s": 1062,
"text": "We have to write a function, say searchRecursively() that takes in an array and a search query\nand returns the count of that search query in the nested array."
},
{
"code": null,
"e": 1261,
"s": 1221,
"text": "For example, if the ar... |
Java Examples - create a banner using Applet | How to create a banner using Applet?
Following example demonstrates how to play a sound using an applet image using Thread class. It also uses drawRect(), fillRect(), drawString() methods of Graphics class.
import java.awt.*;
import java.applet.*;
public class SampleBanner extends Applet implements Runnable {
Strin... | [
{
"code": null,
"e": 2105,
"s": 2068,
"text": "How to create a banner using Applet?"
},
{
"code": null,
"e": 2275,
"s": 2105,
"text": "Following example demonstrates how to play a sound using an applet image using Thread class. It also uses drawRect(), fillRect(), drawString() me... |
Explain deleting an element in a queue by using C language | Data structure is collection of data organized in a structured way. It is divided into two types as explained below −
Linear data structure − Data is organized in a linear fashion. For example, arrays, structures, stacks, queues, linked lists.
Linear data structure − Data is organized in a linear fashion. For example, ... | [
{
"code": null,
"e": 1180,
"s": 1062,
"text": "Data structure is collection of data organized in a structured way. It is divided into two types as explained below −"
},
{
"code": null,
"e": 1306,
"s": 1180,
"text": "Linear data structure − Data is organized in a linear fashion. F... |
Check whether a subsequence exists with sum equal to k if arr[i]> 2*arr[i-1] - GeeksforGeeks | 29 Apr, 2021
Given a sorted array of positive integers where arr[i] > 2*arr[i-1], check whether a sub sequence exists whose sum is equal to k.Examples:
Input : arr[]={ 1, 3, 7, 15, 31}, K=18 Output :True A[1] + A[3] = 3 + 15 = 18 We found a subsequence whose sum is 18 Input :arr[]={ 1, 3, 7, 15, 31}, K=20 Output :Fal... | [
{
"code": null,
"e": 25382,
"s": 25354,
"text": "\n29 Apr, 2021"
},
{
"code": null,
"e": 25523,
"s": 25382,
"text": "Given a sorted array of positive integers where arr[i] > 2*arr[i-1], check whether a sub sequence exists whose sum is equal to k.Examples: "
},
{
"code": ... |
numpy.insert() in Python | 28 Mar, 2022
The numpy.insert() function inserts values along the mentioned axis before the given indices. Syntax :
numpy.insert(array, object, values, axis = None)
Parameters :
array : [array_like]Input array.
object : [int, array of ints]Sub-array with the index or indices before
which values is inserted
... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n28 Mar, 2022"
},
{
"code": null,
"e": 132,
"s": 28,
"text": "The numpy.insert() function inserts values along the mentioned axis before the given indices. Syntax : "
},
{
"code": null,
"e": 181,
"s": 132,
"text": "nu... |
Java String toUpperCase() Method With Examples | 04 Oct, 2021
The java string toUpperCase() method of String class has converted all characters of the string into an uppercase letter. There is two variant of toUpperCase() method. The key thing that is to be taken into consideration is toUpperCase() method worked same as to UpperCase(Locale.getDefault()) method as int... | [
{
"code": null,
"e": 53,
"s": 25,
"text": "\n04 Oct, 2021"
},
{
"code": null,
"e": 393,
"s": 53,
"text": "The java string toUpperCase() method of String class has converted all characters of the string into an uppercase letter. There is two variant of toUpperCase() method. The ke... |
Matplotlib.colors.DivergingNorm class in Python | 06 Oct, 2021
Matplotlib is an amazing 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.
The matplotlib.colors.DivergingNorm class belongs to the matplotlib.colors module. The matplo... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n06 Oct, 2021"
},
{
"code": null,
"e": 242,
"s": 28,
"text": "Matplotlib is an amazing visualization library in Python for 2D plots of arrays. Matplotlib is a multi-platform data visualization library built on NumPy arrays and designed t... |
Python List list() Method | Python list method list() takes sequence types and converts them to lists. This is used to convert a given tuple into list.
Note − Tuple are very similar to lists with only difference that element values of a tuple can not be changed and tuple elements are put between parentheses instead of square bracket.
Following is... | [
{
"code": null,
"e": 2502,
"s": 2378,
"text": "Python list method list() takes sequence types and converts them to lists. This is used to convert a given tuple into list."
},
{
"code": null,
"e": 2686,
"s": 2502,
"text": "Note − Tuple are very similar to lists with only differenc... |
Encrypt and Decrypt Image using Java | 04 Aug, 2021
Encryption is the process of converting information or data into a secrete code, especially to prevent unauthorized access. In these cases also we will do the same, For encryption, we will convert the image into a byte array and after converting it we will apply XOR operation on each value of the byte arra... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n04 Aug, 2021"
},
{
"code": null,
"e": 645,
"s": 52,
"text": "Encryption is the process of converting information or data into a secrete code, especially to prevent unauthorized access. In these cases also we will do the same, For encry... |
LOCATE() function in MySQL | 17 Dec, 2020
LOCATE() function in MySQL is used for finding the location of a substring in a string. It will return the location of the first occurrence of the substring in the string. If the substring is not present in the string then it will return 0. When searching for the location of a substring in a string it does... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n17 Dec, 2020"
},
{
"code": null,
"e": 373,
"s": 28,
"text": "LOCATE() function in MySQL is used for finding the location of a substring in a string. It will return the location of the first occurrence of the substring in the string. If ... |
Pythagorean Quadruple | 22 Jun, 2022
Given four points, check whether they form Pythagorean Quadruple. It is defined as a tuple of integers a, b, c, d such that . They are basically the solutions of Diophantine Equations. In the geometric interpretation it represents a cuboid with integer side lengths |a|, |b|, |c| and whose space diagonal is... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n22 Jun, 2022"
},
{
"code": null,
"e": 368,
"s": 52,
"text": "Given four points, check whether they form Pythagorean Quadruple. It is defined as a tuple of integers a, b, c, d such that . They are basically the solutions of Diophantine ... |
Lexicographic rank of a string | 17 Jun, 2022
Given a string, find its rank among all its permutations sorted lexicographically. For example, rank of “abc” is 1, rank of “acb” is 2, and rank of “cba” is 6.
Examples:
Input : str[] = "acb"
Output : Rank = 2
Input : str[] = "string"
Output : Rank = 598
Input : str[] = "cba"
Output : Rank = 6
For sim... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n17 Jun, 2022"
},
{
"code": null,
"e": 213,
"s": 52,
"text": "Given a string, find its rank among all its permutations sorted lexicographically. For example, rank of “abc” is 1, rank of “acb” is 2, and rank of “cba” is 6. "
},
{
... |
Redis - Strings | Redis strings commands are used for managing string values in Redis. Following is the syntax for using Redis string commands.
redis 127.0.0.1:6379> COMMAND KEY_NAME
redis 127.0.0.1:6379> SET tutorialspoint redis
OK
redis 127.0.0.1:6379> GET tutorialspoint
"redis"
In the above example, SET and GET are the command... | [
{
"code": null,
"e": 2305,
"s": 2179,
"text": "Redis strings commands are used for managing string values in Redis. Following is the syntax for using Redis string commands."
},
{
"code": null,
"e": 2346,
"s": 2305,
"text": "redis 127.0.0.1:6379> COMMAND KEY_NAME \n"
},
{
... |
Python & MySQL - Connect Database Example | Python MySQLdb provides MySQLdb.connect() function to open a database connection. This function takes multiple parameters and returns a connection object to do database operations.
db = MySQLdb.connect(host, username, passwd, dbName, port, socket);
host
Optional − The host name running the database server. If not spec... | [
{
"code": null,
"e": 2534,
"s": 2353,
"text": "Python MySQLdb provides MySQLdb.connect() function to open a database connection. This function takes multiple parameters and returns a connection object to do database operations."
},
{
"code": null,
"e": 2603,
"s": 2534,
"text": "d... |
MongoDB – getIndexes() Method | 05 Feb, 2021
In MongoDB, the getIndexes() method returns an array that contains a list of documents that identify and describe the existing indexes on the specified collection. It also includes hidden indexes as well.
This method does not take any parameters.
The index information return by this method contains the ke... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n05 Feb, 2021"
},
{
"code": null,
"e": 234,
"s": 28,
"text": "In MongoDB, the getIndexes() method returns an array that contains a list of documents that identify and describe the existing indexes on the specified collection. It also inc... |
How to remove all white spaces from a String in Java? | 07 Nov, 2018
Given a String with white spaces, the task is to remove all white spaces from a string using Java built-in methods.
Examples:
Input: str = " Geeks for Geeks "
Output: GeeksforGeeks
Input: str = " A Computer Science Portal"
Output: AComputerSciencePortal
To remove all wh... | [
{
"code": null,
"e": 53,
"s": 25,
"text": "\n07 Nov, 2018"
},
{
"code": null,
"e": 169,
"s": 53,
"text": "Given a String with white spaces, the task is to remove all white spaces from a string using Java built-in methods."
},
{
"code": null,
"e": 179,
"s": 169,
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.