title stringlengths 3 221 | text stringlengths 17 477k | parsed listlengths 0 3.17k |
|---|---|---|
Distance between two parallel lines - GeeksforGeeks | 18 Mar, 2021
Given are two parallel straight lines with slope m, and different y-intercepts b1 & b2.The task is to find the distance between these two parallel lines.Examples:
Input: m = 2, b1 = 4, b2 = 3
Output: 0.333333
Input: m = -4, b1 = 11, b2 = 23
Output: 0.8
Approach:
Let PQ and RS be the parallel lines, w... | [
{
"code": null,
"e": 25354,
"s": 25326,
"text": "\n18 Mar, 2021"
},
{
"code": null,
"e": 25519,
"s": 25354,
"text": "Given are two parallel straight lines with slope m, and different y-intercepts b1 & b2.The task is to find the distance between these two parallel lines.Examples: ... |
Count number of Object using Python-OpenCV - GeeksforGeeks | 26 Oct, 2021
In this article, we will use image processing to count the number of Objects using OpenCV in Python.
OpenCv: OpenCv is an open-source library that is useful for computer vision applications such as image processing, video processing, facial recognition, and detection, etc.
Numpy: Numpy is a python package ... | [
{
"code": null,
"e": 24292,
"s": 24264,
"text": "\n26 Oct, 2021"
},
{
"code": null,
"e": 24393,
"s": 24292,
"text": "In this article, we will use image processing to count the number of Objects using OpenCV in Python."
},
{
"code": null,
"e": 24566,
"s": 24393,
... |
How to locate the median in a (Seaborn) KDE plot? | To locate the median in a seaborn KDE plot, we can take the following steps
Set the figure size and adjust the padding between and around the subplots.
Create random data using numpy.
Find the median of data (Step 2).
Use kdeplot() to plot the shaded region.
Use axvline() method to plot the vertical line.
To display th... | [
{
"code": null,
"e": 1138,
"s": 1062,
"text": "To locate the median in a seaborn KDE plot, we can take the following steps"
},
{
"code": null,
"e": 1214,
"s": 1138,
"text": "Set the figure size and adjust the padding between and around the subplots."
},
{
"code": null,
... |
PHP if else elseif | Conditional execution of one or more statements is a most important feature of any programming language. PHP provides this ability with its if, else and elseif statements. Primary usage of if statement is as follows −
if (expression)
statement;
The expression in front of if keyword is a logical expression, evaluated... | [
{
"code": null,
"e": 1280,
"s": 1062,
"text": "Conditional execution of one or more statements is a most important feature of any programming language. PHP provides this ability with its if, else and elseif statements. Primary usage of if statement is as follows −"
},
{
"code": null,
"e"... |
How to change the orientation of a slider in JavaFX? | JavaFX provides a class known as Slider, this represents a slider component that displays a continuous range of values. This contains a track on which the number values are displayed. Along the track, there is a thumb pointing to the numbers. You can provide the maximum, minimum, and initial values of the slider.
In Ja... | [
{
"code": null,
"e": 1377,
"s": 1062,
"text": "JavaFX provides a class known as Slider, this represents a slider component that displays a continuous range of values. This contains a track on which the number values are displayed. Along the track, there is a thumb pointing to the numbers. You can pr... |
Deep Learning for Detecting Pneumonia from X-ray Images | by Abhinav Sagar | Towards Data Science | Stuck behind the paywall? Click here to read the full story with my Friend Link!
The risk of pneumonia is immense for many, especially in developing nations where billions face energy poverty and rely on polluting forms of energy. The WHO estimates that over 4 million premature deaths occur annually from household air ... | [
{
"code": null,
"e": 253,
"s": 172,
"text": "Stuck behind the paywall? Click here to read the full story with my Friend Link!"
},
{
"code": null,
"e": 1033,
"s": 253,
"text": "The risk of pneumonia is immense for many, especially in developing nations where billions face energy p... |
Find minimum and maximum element in an array | Practice | GeeksforGeeks | Given an array A of size N of integers. Your task is to find the minimum and maximum elements in the array.
Example 1:
Input:
N = 6
A[] = {3, 2, 1, 56, 10000, 167}
Output:
min = 1, max = 10000
Example 2:
Input:
N = 5
A[] = {1, 345, 234, 21, 56789}
Output:
min = 1, max = 56789
Your Task:
You don't need to read... | [
{
"code": null,
"e": 346,
"s": 238,
"text": "Given an array A of size N of integers. Your task is to find the minimum and maximum elements in the array."
},
{
"code": null,
"e": 359,
"s": 348,
"text": "Example 1:"
},
{
"code": null,
"e": 434,
"s": 359,
"text":... |
Pseudo-Labeling to deal with small datasets — What, Why & How? | by Anirudh Shenoy | Towards Data Science | A few days ago I came across Yoshua Bengio’s reply to a Quora question — “Why is Unsupervised Learning important?”. Here’s an excerpt of his reply:
To climb the AI ladder with supervised learning may require “teaching” the computer all the concepts that matter to us by showing tons of examples where these concepts occu... | [
{
"code": null,
"e": 319,
"s": 171,
"text": "A few days ago I came across Yoshua Bengio’s reply to a Quora question — “Why is Unsupervised Learning important?”. Here’s an excerpt of his reply:"
},
{
"code": null,
"e": 698,
"s": 319,
"text": "To climb the AI ladder with supervised... |
Python | sympy.Matrix().col_insert() - GeeksforGeeks | 25 Jun, 2019
With the help of Matrix().col_insert() method, we can insert a column in a matrix having dimension nxm, where dimension of inserted column is nx1.
Syntax : Matrix().col_insert()Return : Return a new matrix.
Example #1 :In this example, we are able to insert a column in a matrix by using Matrix().col_insert... | [
{
"code": null,
"e": 23901,
"s": 23873,
"text": "\n25 Jun, 2019"
},
{
"code": null,
"e": 24048,
"s": 23901,
"text": "With the help of Matrix().col_insert() method, we can insert a column in a matrix having dimension nxm, where dimension of inserted column is nx1."
},
{
"c... |
GCD and Fibonacci Numbers - GeeksforGeeks | 06 Apr, 2021
You are given two positive numbers M and N. The task is to print greatest common divisor of M’th and N’th Fibonacci Numbers.The first few Fibonacci Numbers are 0, 1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89, 144, .... Note that 0 is considered as 0’th Fibonacci Number.Examples:
Input : M = 3, N = 6
Output : 2... | [
{
"code": null,
"e": 24205,
"s": 24177,
"text": "\n06 Apr, 2021"
},
{
"code": null,
"e": 24479,
"s": 24205,
"text": "You are given two positive numbers M and N. The task is to print greatest common divisor of M’th and N’th Fibonacci Numbers.The first few Fibonacci Numbers are 0, ... |
How to start the Azure VM using Azure CLI in PowerShell? | To start the stopped Azure VM using Az CLI, we can use the az vm start command. Before starting the azure VM, make sure that you are connected to the desired subscription and the Azure cloud account.
To start the specific VM, we will use the command below.
PS C:\> az vm start -n vmname -g RGname --verbose
Or you can us... | [
{
"code": null,
"e": 1262,
"s": 1062,
"text": "To start the stopped Azure VM using Az CLI, we can use the az vm start command. Before starting the azure VM, make sure that you are connected to the desired subscription and the Azure cloud account."
},
{
"code": null,
"e": 1319,
"s": 1... |
How can we retrieve a blob datatype from a table using the getBinaryStream() method in JDBC? | The ResultSet interface provides the method named getBlob() to retrieve blob datatype from a table in the database. In addition to this, it also provides a method named getBinaryStream()
Like getBlob() this method also accepts an integer representing the index of the column (or, a String value representing the name of ... | [
{
"code": null,
"e": 1249,
"s": 1062,
"text": "The ResultSet interface provides the method named getBlob() to retrieve blob datatype from a table in the database. In addition to this, it also provides a method named getBinaryStream()"
},
{
"code": null,
"e": 1644,
"s": 1249,
"tex... |
How to capture the text from Alert Message in Selenium Webdriver? | We can capture the text from the alert message in Selenium webdriverwith the help of the Alert interface. By default, the webdriver object has control over the main page, once an alert pop-up gets generated, we have to shift the webdriver focus from the main page to the alert.
This is done with the help of the switchTo... | [
{
"code": null,
"e": 1340,
"s": 1062,
"text": "We can capture the text from the alert message in Selenium webdriverwith the help of the Alert interface. By default, the webdriver object has control over the main page, once an alert pop-up gets generated, we have to shift the webdriver focus from the... |
Difference between fork() and exec() - GeeksforGeeks | 26 Apr, 2022
Every application(program) comes into execution through means of process, process is a running instance of a program. Processes are created through different system calls, most popular are fork() and exec()
fork()
pid_t pid = fork();
fork() creates a new process by duplicating the calling process, The new ... | [
{
"code": null,
"e": 24422,
"s": 24394,
"text": "\n26 Apr, 2022"
},
{
"code": null,
"e": 24629,
"s": 24422,
"text": "Every application(program) comes into execution through means of process, process is a running instance of a program. Processes are created through different syste... |
JavaScript - if...else Statement | While writing a program, there may be a situation when you need to adopt one out of a given set of paths. In such cases, you need to use conditional statements that allow your program to make correct decisions and perform right actions.
JavaScript supports conditional statements which are used to perform different acti... | [
{
"code": null,
"e": 2703,
"s": 2466,
"text": "While writing a program, there may be a situation when you need to adopt one out of a given set of paths. In such cases, you need to use conditional statements that allow your program to make correct decisions and perform right actions."
},
{
"c... |
What are the rules for naming classes in C#? | A class definition starts with the keyword class followed by the class name; and the class body enclosed by a pair of curly braces.
The following is the syntax −
<access specifier> class class_name {
// member variables
<access specifier> <data type> variable1;
<access specifier> <data type> variable2;
...
... | [
{
"code": null,
"e": 1194,
"s": 1062,
"text": "A class definition starts with the keyword class followed by the class name; and the class body enclosed by a pair of curly braces."
},
{
"code": null,
"e": 1224,
"s": 1194,
"text": "The following is the syntax −"
},
{
"code"... |
Advanced Time Series Analysis with ARMA and ARIMA | by Marco Peixeiro | Towards Data Science | In previous articles, we introduced moving average processes MA(q), and autoregressive processes AR(p) as two ways to model time series. Now, we will combine both methods and explore how ARMA(p,q) and ARIMA(p,d,q) models can help us to model and forecast more complex time series.
This article will cover the following t... | [
{
"code": null,
"e": 453,
"s": 172,
"text": "In previous articles, we introduced moving average processes MA(q), and autoregressive processes AR(p) as two ways to model time series. Now, we will combine both methods and explore how ARMA(p,q) and ARIMA(p,d,q) models can help us to model and forecast ... |
How do you improve Matplotlib image quality? | To improve matplotlib image quality we can use greater dot per inch i.e dpi value (greater than 600) and pdf or .eps format can be recommended.
Set the figure size and adjust the padding between and around the subplots.
Make a 2D data raster using a np.array.
Display data as an image, i.e., on a 2D regular raster.
Save... | [
{
"code": null,
"e": 1206,
"s": 1062,
"text": "To improve matplotlib image quality we can use greater dot per inch i.e dpi value (greater than 600) and pdf or .eps format can be recommended."
},
{
"code": null,
"e": 1282,
"s": 1206,
"text": "Set the figure size and adjust the pad... |
Decision Tree In Python. An example of how to implement a... | by Cory Maklin | Towards Data Science | In my opinion, Decision Tree models help highlight how we can use machine learning to enhance our decision making abilities. We’ve all encountered Decision Trees at one point or another. However, where Decision Tree machine learning models differ is in the fact that they use logic and math to generate rules, rather tha... | [
{
"code": null,
"e": 553,
"s": 172,
"text": "In my opinion, Decision Tree models help highlight how we can use machine learning to enhance our decision making abilities. We’ve all encountered Decision Trees at one point or another. However, where Decision Tree machine learning models differ is in th... |
Python | Extract substrings between brackets | 07 Feb, 2022
Sometimes, while working with Python strings, we can have a problem in which we need to extract the substrings between certain characters and can be brackets. This can have application in cases we have tuples embedded in string. Lets discuss certain ways in which this task can be performed.Method #1 : Usin... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n07 Feb, 2022"
},
{
"code": null,
"e": 484,
"s": 28,
"text": "Sometimes, while working with Python strings, we can have a problem in which we need to extract the substrings between certain characters and can be brackets. This can have ap... |
Maryam – Perfect OSINT Framework | 15 Dec, 2021
OSINT techniques are used to collect the data from publicly possible sources like Social Media Platforms etc. There are various ways to collect information. There are some automated tools that make the task easier. Maryam tool is one of the best tools which is been designed by the OWASP team and has the po... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n15 Dec, 2021"
},
{
"code": null,
"e": 650,
"s": 28,
"text": "OSINT techniques are used to collect the data from publicly possible sources like Social Media Platforms etc. There are various ways to collect information. There are some aut... |
Python | os.read() method | 18 Jun, 2019
OS module in Python provides functions for interacting with the operating system. OS comes under Python’s standard utility modules. This module provides a portable way of using operating system dependent functionality.
os.read() method in Python is used to read at most n bytes from the file associated with... | [
{
"code": null,
"e": 54,
"s": 26,
"text": "\n18 Jun, 2019"
},
{
"code": null,
"e": 273,
"s": 54,
"text": "OS module in Python provides functions for interacting with the operating system. OS comes under Python’s standard utility modules. This module provides a portable way of usi... |
Modulo power for large numbers represented as strings | 03 May, 2021
Given two numbers sa and sb represented as strings, find ab % MOD where MOD is 1e9 + 7. The numbers a and b can contain upto 106 digits.Examples:
Input : sa = 2, sb = 3 Output : 8Input : sa = 10000000000000000000000000000000000000000000 sb = 10000000000000000000000000000000000000000000 Output : 494234546... | [
{
"code": null,
"e": 54,
"s": 26,
"text": "\n03 May, 2021"
},
{
"code": null,
"e": 202,
"s": 54,
"text": "Given two numbers sa and sb represented as strings, find ab % MOD where MOD is 1e9 + 7. The numbers a and b can contain upto 106 digits.Examples: "
},
{
"code": null... |
PHP | Arrays | 05 Aug, 2021
Arrays in PHP is a type of data structure that allows us to store multiple elements of similar data type under a single variable thereby saving us the effort of creating a different variable for every data. The arrays are helpful to create a list of elements of similar types, which can be accessed using th... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n05 Aug, 2021"
},
{
"code": null,
"e": 861,
"s": 52,
"text": "Arrays in PHP is a type of data structure that allows us to store multiple elements of similar data type under a single variable thereby saving us the effort of creating a di... |
ML | Fuzzy Clustering | 17 Sep, 2019
Prerequisite: Clustering in Machine Learning
What is clustering?Clustering is an unsupervised machine learning technique which divides the given data into different clusters based on their distances (similarity) from each other.
The unsupervised k-means clustering algorithm gives the values of any point ly... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n17 Sep, 2019"
},
{
"code": null,
"e": 97,
"s": 52,
"text": "Prerequisite: Clustering in Machine Learning"
},
{
"code": null,
"e": 281,
"s": 97,
"text": "What is clustering?Clustering is an unsupervised machine learn... |
How to use react-dropzone module in ReactJS ? | 21 May, 2021
React-Dropzone module is a simple React hook that is used to create an HTML5-compliant drag-drop zone for n number of files. We can use this module to provide a way for users to drop and drop their multiple files, and then we can handle these files as per the business requirement. We can use the following ... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n21 May, 2021"
},
{
"code": null,
"e": 389,
"s": 28,
"text": "React-Dropzone module is a simple React hook that is used to create an HTML5-compliant drag-drop zone for n number of files. We can use this module to provide a way for users ... |
lseek() in C/C++ to read the alternate nth byte and write it in another file | 07 Feb, 2018
From a given file (e.g. input.txt) read the alternate nth byte and write it on another file with the help of “lseek”.lseek (C System Call): lseek is a system call that is used to change the location of the read/write pointer of a file descriptor. The location can be set either in absolute or relative terms... | [
{
"code": null,
"e": 54,
"s": 26,
"text": "\n07 Feb, 2018"
},
{
"code": null,
"e": 382,
"s": 54,
"text": "From a given file (e.g. input.txt) read the alternate nth byte and write it on another file with the help of “lseek”.lseek (C System Call): lseek is a system call that is use... |
Natural Cubic spline | 18 Jul, 2021
The cubic spline is a spline that uses the third-degree polynomial which satisfied the given m control points. To derive the solutions for the cubic spline, we assume the second derivation 0 at endpoints, which in turn provides a boundary condition that adds two equations to m-2 equations to make them solv... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n18 Jul, 2021"
},
{
"code": null,
"e": 419,
"s": 28,
"text": "The cubic spline is a spline that uses the third-degree polynomial which satisfied the given m control points. To derive the solutions for the cubic spline, we assume the seco... |
StringBuffer setLength() in Java with Examples | 19 Aug, 2019
The setLength(int newLength) method of StringBuffer class is the inbuilt method used to set the length of the character sequence equal to newLength. If the newLength passed as argument is less than the old length, the old length is changed to the newLength. If the newLength passed as argument is greater th... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n19 Aug, 2019"
},
{
"code": null,
"e": 480,
"s": 28,
"text": "The setLength(int newLength) method of StringBuffer class is the inbuilt method used to set the length of the character sequence equal to newLength. If the newLength passed as... |
Inbuilt function for calculating LCM in C++ | 24 Jul, 2017
Many times while we do programming, we need to calculate the Least Common Multiple (LCM) between two numbers. We have already discussed how to find LCM in this post.In place of defining and then using a function for calculating lcm , we can simply use an inbuilt function of boost library of C++ , boost::ma... | [
{
"code": null,
"e": 54,
"s": 26,
"text": "\n24 Jul, 2017"
},
{
"code": null,
"e": 373,
"s": 54,
"text": "Many times while we do programming, we need to calculate the Least Common Multiple (LCM) between two numbers. We have already discussed how to find LCM in this post.In place ... |
Two elements whose sum is closest to zero | 16 Jun, 2022
Question: An Array of integers is given, both +ve and -ve. You need to find the two elements such that their sum is closest to zero.For the below array, program should print -80 and 85.
METHOD 1 (Simple) For each element, find the sum of it with every other element in the array and compare sums. Finally, r... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n16 Jun, 2022"
},
{
"code": null,
"e": 238,
"s": 52,
"text": "Question: An Array of integers is given, both +ve and -ve. You need to find the two elements such that their sum is closest to zero.For the below array, program should print ... |
Implementation of 0/1 Knapsack using Branch and Bound | 26 Nov, 2019
We strongly recommend to refer below post as a prerequisite for this.
Branch and Bound | Set 1 (Introduction with 0/1 Knapsack)
We discussed different approaches to solve above problem and saw that the Branch and Bound solution is the best suited method when item weights are not integers.
In this post impl... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n26 Nov, 2019"
},
{
"code": null,
"e": 122,
"s": 52,
"text": "We strongly recommend to refer below post as a prerequisite for this."
},
{
"code": null,
"e": 180,
"s": 122,
"text": "Branch and Bound | Set 1 (Introduct... |
Python Program for Sum of squares of first n natural numbers | 03 Dec, 2018
Given a positive integer N. The task is to find 12 + 22 + 32 + ..... + N2.
Examples:
Input : N = 4
Output : 30
12 + 22 + 32 + 42
= 1 + 4 + 9 + 16
= 30
Input : N = 5
Output : 55
Method 1: O(N) The idea is to run a loop from 1 to n and for each i, 1 <= i <= n, find i2 to sum.
# Python3 Program to# find sum... | [
{
"code": null,
"e": 54,
"s": 26,
"text": "\n03 Dec, 2018"
},
{
"code": null,
"e": 129,
"s": 54,
"text": "Given a positive integer N. The task is to find 12 + 22 + 32 + ..... + N2."
},
{
"code": null,
"e": 139,
"s": 129,
"text": "Examples:"
},
{
"code"... |
R – Factors | 27 Oct, 2021
Factors in R Programming Language are data structures that are implemented to categorize the data or represent categorical data and store it on multiple levels.
They can be stored as integers with a corresponding label to every unique integer. Though factors may look similar to character vectors, they are... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n27 Oct, 2021"
},
{
"code": null,
"e": 190,
"s": 28,
"text": "Factors in R Programming Language are data structures that are implemented to categorize the data or represent categorical data and store it on multiple levels. "
},
{
... |
Nested Structure in Golang | 13 Aug, 2019
A structure or struct in Golang is a user-defined type, which allows us to create a group of elements of different types into a single unit. Any real-world entity which has some set of properties or fields can be represented as a struct. Go language allows nested structure. A structure which is the field o... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n13 Aug, 2019"
},
{
"code": null,
"e": 473,
"s": 28,
"text": "A structure or struct in Golang is a user-defined type, which allows us to create a group of elements of different types into a single unit. Any real-world entity which has so... |
HTML5 | MathML <math> tag | 19 Aug, 2021
The MathML <math> tag in HTML5 is the most prioritize element. Whatever MathML element you want to use they should wrapped inside of the <math> tag.Syntax:
<math> child elements </math>
Attributes: The tag accepts some attributes which are listed below:
class|id|style: This attribute is used to hold th... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n19 Aug, 2021"
},
{
"code": null,
"e": 186,
"s": 28,
"text": "The MathML <math> tag in HTML5 is the most prioritize element. Whatever MathML element you want to use they should wrapped inside of the <math> tag.Syntax: "
},
{
"co... |
Difference between Thread.start() and Thread.run() in Java | 23 Jan, 2019
In Java’s multi-threading concept, start() and run() are the two most important methods. Below are some of the differences between the Thread.start() and Thread.run() methods:
New Thread creation: When a program calls the start() method, a new thread is created and then the run() method is executed. But if... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n23 Jan, 2019"
},
{
"code": null,
"e": 228,
"s": 52,
"text": "In Java’s multi-threading concept, start() and run() are the two most important methods. Below are some of the differences between the Thread.start() and Thread.run() methods... |
Top 10 Highest Paying IT Certifications in 2020 | 18 Jul, 2020
What is the best way to prove that you know something? That’s easy, obtain a certification on your specialty from a reputed source so that you have a credential to prove what you say. Certifications are very useful as they can boost your value in the market, lead to higher salary offers and provide a tangi... | [
{
"code": null,
"e": 54,
"s": 26,
"text": "\n18 Jul, 2020"
},
{
"code": null,
"e": 418,
"s": 54,
"text": "What is the best way to prove that you know something? That’s easy, obtain a certification on your specialty from a reputed source so that you have a credential to prove what... |
MVC Framework - Exception Handling | In ASP.NET, error handling is done using the standard try catch approach or using application events. ASP.NET MVC comes with built-in support for exception handling using a feature known as exception filters. We are going to learn two approaches here: one with overriding the onException method and another by defining t... | [
{
"code": null,
"e": 2503,
"s": 2159,
"text": "In ASP.NET, error handling is done using the standard try catch approach or using application events. ASP.NET MVC comes with built-in support for exception handling using a feature known as exception filters. We are going to learn two approaches here: o... |
How to scroll to a particular element or skip the content in CSS ? | 16 Jun, 2022
Sometimes we need the user to click on a button or link and take them to an element present on the same HTML page. Also, this needs to take the user to the element without any reload. Lots of times, users tend to skip to the main content, like on a gaming Website. They might want to skip the instructions a... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n16 Jun, 2022"
},
{
"code": null,
"e": 447,
"s": 28,
"text": "Sometimes we need the user to click on a button or link and take them to an element present on the same HTML page. Also, this needs to take the user to the element without any... |
ReactJS checked Attribute | 25 May, 2021
React.js library is all about splitting the app into several components. Each Component has its own lifecycle. React provides us some in-built methods that we can override at particular stages in the life-cycle of the component.
In this article, we will know how to use checked or defaultChecked attribute i... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n25 May, 2021"
},
{
"code": null,
"e": 257,
"s": 28,
"text": "React.js library is all about splitting the app into several components. Each Component has its own lifecycle. React provides us some in-built methods that we can override at ... |
Print Postorder traversal from given Inorder and Preorder traversals | 21 Jun, 2022
Given Inorder and Preorder traversals of a binary tree, print Postorder traversal.
Example:
Input:
Inorder traversal in[] = {4, 2, 5, 1, 3, 6}
Preorder traversal pre[] = {1, 2, 4, 5, 3, 6}
Output:
Postorder traversal is {4, 5, 2, 6, 3, 1}
Traversals in the above example represents following tree
... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n21 Jun, 2022"
},
{
"code": null,
"e": 135,
"s": 52,
"text": "Given Inorder and Preorder traversals of a binary tree, print Postorder traversal."
},
{
"code": null,
"e": 144,
"s": 135,
"text": "Example:"
},
{
... |
How to Download and Install Shotcut Video Editor on Windows? | 15 May, 2022
Shotcut is an open-source and cross-platform video editing software. It is developed by MLT Multimedia Framework. It is easy to use especially for the beginner who wants to learn video editing because it is free to use, provides a simple interface, and can work with any format of video, audio, or photo med... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n15 May, 2022"
},
{
"code": null,
"e": 676,
"s": 28,
"text": "Shotcut is an open-source and cross-platform video editing software. It is developed by MLT Multimedia Framework. It is easy to use especially for the beginner who wants to le... |
Log Injection | 01 Jul, 2022
Log Injection is a very simple to carry out attack aimed at web applications. For the attacker its very simple to perform the attack. However, for the target web application or its administrator its very difficult to identify the scope of the attack performed and its impact.
Web applications or any applica... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n01 Jul, 2022"
},
{
"code": null,
"e": 304,
"s": 28,
"text": "Log Injection is a very simple to carry out attack aimed at web applications. For the attacker its very simple to perform the attack. However, for the target web application o... |
Types of Server Virtualization in Computer Network | 17 Mar, 2022
Server Virtualization is the partitioning of a physical server into a number of small virtual servers, each running its own operating system. These operating systems are known as guest operating systems. These are running on another operating system known as the host operating system. Each guest running in... | [
{
"code": null,
"e": 54,
"s": 26,
"text": "\n17 Mar, 2022"
},
{
"code": null,
"e": 511,
"s": 54,
"text": "Server Virtualization is the partitioning of a physical server into a number of small virtual servers, each running its own operating system. These operating systems are know... |
GATE | GATE-CS-2017 (Set 1) | Question 34 | 01 Oct, 2021
Consider the following context-free grammar over the alphabet ∑ = {a, b, c} with S as the start symbol:
S → abScT | abcT
T → bT | b
Which of the following represents the language generated by the above grammar?(A) {(ab)n(cb)n | n >= 1 }(B) {(abncbm1cbm2...cbmn | n, m1, m2, ....., mn >= 1 }(C) {(ab)n(cbm)n... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n01 Oct, 2021"
},
{
"code": null,
"e": 132,
"s": 28,
"text": "Consider the following context-free grammar over the alphabet ∑ = {a, b, c} with S as the start symbol:"
},
{
"code": null,
"e": 161,
"s": 132,
"text": "S ... |
Convert CSV to Excel using Pandas in Python | 22 Feb, 2022
Pandas can read, filter, and re-arrange small and large datasets and output them in a range of formats including Excel. In this article, we will be dealing with the conversion of .csv file into excel (.xlsx). Pandas provide the ExcelWriter class for writing data frame objects to excel sheets. Syntax:
fin... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n22 Feb, 2022"
},
{
"code": null,
"e": 356,
"s": 52,
"text": "Pandas can read, filter, and re-arrange small and large datasets and output them in a range of formats including Excel. In this article, we will be dealing with the conversio... |
Python – Itertools.takewhile() | 19 Feb, 2020
The itertools is a module in Python having a collection of functions that are used for handling iterators. They make iterating through the iterables like lists and strings very easy. One such itertools function is takewhile().
Note: For more information, refer to Python Itertools
This allows considering an... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n19 Feb, 2020"
},
{
"code": null,
"e": 255,
"s": 28,
"text": "The itertools is a module in Python having a collection of functions that are used for handling iterators. They make iterating through the iterables like lists and strings ver... |
Shell Script To Count Number of Words, Characters, White Spaces, and Special Symbols | 20 Apr, 2021
In this article, we are going to see how to count the number of words, characters, whitespace and special symbol in a text file/ input string. Given a text file and tour task is to count the number of words, characters, whitespace and special symbol. So there are many methods and tool that we can use to ac... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n20 Apr, 2021"
},
{
"code": null,
"e": 402,
"s": 28,
"text": "In this article, we are going to see how to count the number of words, characters, whitespace and special symbol in a text file/ input string. Given a text file and tour task ... |
Python – Filter rows with only Alphabets from List of Lists | 02 Dec, 2020
Given Matrix, write a Python program to extract rows which only contains alphabets in its strings.
Examples:
Input : test_list = [[“gfg”, “is”, “best”], [“Geeks4Geeks”, “good”], [“Gfg is good”], [“love”, “gfg”]] Output : [[‘gfg’, ‘is’, ‘best’], [‘love’, ‘gfg’]] Explanation : All strings with just alphabets... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n02 Dec, 2020"
},
{
"code": null,
"e": 127,
"s": 28,
"text": "Given Matrix, write a Python program to extract rows which only contains alphabets in its strings."
},
{
"code": null,
"e": 137,
"s": 127,
"text": "Example... |
Output of Java program | Set 5 | 11 Oct, 2021
Predict the output of following Java Programs.Program 1:
Java
// Main.javapublic class Main{ public static void gfg(String s) { System.out.println("String"); } public static void gfg(Object o) { System.out.println("Object"); } public static void main(String args[]... | [
{
"code": null,
"e": 54,
"s": 26,
"text": "\n11 Oct, 2021"
},
{
"code": null,
"e": 113,
"s": 54,
"text": "Predict the output of following Java Programs.Program 1: "
},
{
"code": null,
"e": 118,
"s": 113,
"text": "Java"
},
{
"code": "// Main.javapublic... |
How To Make Density Plot in Python with Altair? | 17 May, 2021
Density plots are a variation of Histograms that are used to observe the distribution of a variable in data set over a continuous interval or a time period. The peaks of a Density Plot indicate where values are concentrated over an interval.
Compared to Histograms, Density Plots are better at determining t... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n17 May, 2021"
},
{
"code": null,
"e": 270,
"s": 28,
"text": "Density plots are a variation of Histograms that are used to observe the distribution of a variable in data set over a continuous interval or a time period. The peaks of a Den... |
How to use ThreadPoolExecutor in Python3 ? | 08 Oct, 2021
Prerequisite: Multithreading
Threading allows parallelism of code and Python language has two ways to achieve its 1st is via multiprocessing module and 2nd is via multithreading module. Multithreading is well suited to speed up I/O bound tasks like making a web request, or database operations, or reading/w... | [
{
"code": null,
"e": 53,
"s": 25,
"text": "\n08 Oct, 2021"
},
{
"code": null,
"e": 82,
"s": 53,
"text": "Prerequisite: Multithreading"
},
{
"code": null,
"e": 553,
"s": 82,
"text": "Threading allows parallelism of code and Python language has two ways to achie... |
JavaScript String startsWith() Method | 06 Oct, 2021
Below is the example of the String startsWith() Method.
Example:
JavaScript
<script>function func() { var str = 'Geeks for Geeks'; var value = str.startsWith('Gee'); document.write(value);}func();</script>
Output:
true
The str.startsWith() method is used to check whether the given string sta... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n06 Oct, 2021"
},
{
"code": null,
"e": 86,
"s": 28,
"text": "Below is the example of the String startsWith() Method. "
},
{
"code": null,
"e": 97,
"s": 86,
"text": "Example: "
},
{
"code": null,
"e": 108... |
Java Program for Subset Sum Problem | DP-25 | 09 Jun, 2022
Given a set of non-negative integers, and a value sum, determine if there is a subset of the given set with sum equal to given sum.Example:
Input: set[] = {3, 34, 4, 12, 5, 2}, sum = 9
Output: True //There is a subset (4, 5) with sum 9.
Following is naive recursive implementation that simply follows th... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n09 Jun, 2022"
},
{
"code": null,
"e": 168,
"s": 28,
"text": "Given a set of non-negative integers, and a value sum, determine if there is a subset of the given set with sum equal to given sum.Example:"
},
{
"code": null,
"e"... |
Samsung Software – Competency Test (Samsung R&D Bangalore) Experience > 1 yrs | 13 Feb, 2020
Round 1: If your body Temperature is above 36 degree, You have to go back .(I don’t know why?)
Round 2: we have to complete One Question within 4 hrs. There were 50 test cases, 5 test cases are visible and other 45 are in backend.
Yor are not allowed to use any library functions such as Array List, St... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n13 Feb, 2020"
},
{
"code": null,
"e": 125,
"s": 28,
"text": "Round 1: If your body Temperature is above 36 degree, You have to go back .(I don’t know why?)"
},
{
"code": null,
"e": 264,
"s": 127,
"text": "Round 2: ... |
wcslen() function in C++ with Examples | 03 Oct, 2018
The wcslen() function is defined in cwchar.h header file. The function wcslen() function returns the length of the given wide string.
Syntax:
size_t wcslen(const wchar_t* str);
Parameter: This method takes a single parameter str which represents the pointer to the wide string whose length is to be calculat... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n03 Oct, 2018"
},
{
"code": null,
"e": 162,
"s": 28,
"text": "The wcslen() function is defined in cwchar.h header file. The function wcslen() function returns the length of the given wide string."
},
{
"code": null,
"e": 170,... |
Count Palindromic Subsequences | Practice | GeeksforGeeks | Given a string str of length N, you have to find number of palindromic subsequence (need not necessarily be distinct) which could be formed from the string str.
Note: You have to return the answer module 109+7;
Example 1:
Input:
Str = "abcd"
Output:
4
Explanation:
palindromic subsequence are : "a" ,"b", "c" ,"d"
... | [
{
"code": null,
"e": 451,
"s": 238,
"text": "Given a string str of length N, you have to find number of palindromic subsequence (need not necessarily be distinct) which could be formed from the string str.\nNote: You have to return the answer module 109+7;\n "
},
{
"code": null,
"e": 462... |
Can we insert values without mentioning the column name in MySQL? | Yes, we can insert values without mentioning the column name using the following syntax −
insert into yourTableName values(yourValue1,yourValue2,yourValue3,.....N);
Let us first create a table. Here, we have set Id as NOT NULL −
mysql> create table DemoTable862(
Id int NOT NULL AUTO_INCREMENT PRIMARY KEY,
FirstNa... | [
{
"code": null,
"e": 1152,
"s": 1062,
"text": "Yes, we can insert values without mentioning the column name using the following syntax −"
},
{
"code": null,
"e": 1227,
"s": 1152,
"text": "insert into yourTableName values(yourValue1,yourValue2,yourValue3,.....N);"
},
{
"co... |
From Scikit-learn to TensorFlow: Part 2 | by Karthik M Swamy | Towards Data Science | Continuing from where we left, we delve deeper into how to develop machine learning (ML) algorithms using TensorFlow from a scikit-learn developer’s perspective. If you’d like to know the reasons to move to TensorFlow, motivations, do read my earlier post for Reasons to move to TensorFlow and a simple classification pr... | [
{
"code": null,
"e": 573,
"s": 171,
"text": "Continuing from where we left, we delve deeper into how to develop machine learning (ML) algorithms using TensorFlow from a scikit-learn developer’s perspective. If you’d like to know the reasons to move to TensorFlow, motivations, do read my earlier post... |
Minimize deviation of an array by given operations - GeeksforGeeks | 09 Jun, 2021
Given an array A[] consisting of positive integers, the task is to calculate the minimum possible deviation of the given arrayA[] after performing the following operations any number of times:
Operation 1: If the array element is even, divide it by 2.
Operation 2: If the array element is odd, multiply it b... | [
{
"code": null,
"e": 25687,
"s": 25659,
"text": "\n09 Jun, 2021"
},
{
"code": null,
"e": 25880,
"s": 25687,
"text": "Given an array A[] consisting of positive integers, the task is to calculate the minimum possible deviation of the given arrayA[] after performing the following op... |
Cubic spline Interpolation - GeeksforGeeks | 18 Jul, 2021
We estimate f(x) for arbitrary x, by drawing a smooth curve through the xi. If the desired x is between the largest and smallest of the xi then it is called interpolation, otherwise, it is called Extrapolation.
Random points
Linear Interpolation is a way of curve fitting the points by using linear polynomi... | [
{
"code": null,
"e": 24264,
"s": 24236,
"text": "\n18 Jul, 2021"
},
{
"code": null,
"e": 24475,
"s": 24264,
"text": "We estimate f(x) for arbitrary x, by drawing a smooth curve through the xi. If the desired x is between the largest and smallest of the xi then it is called interp... |
ArrayDeque removeFirst() Method in Java - GeeksforGeeks | 10 Dec, 2018
The Java.util.ArrayDeque.removeFirst() method is used to remove the first element of the Deque.
Syntax:
Array_Deque.removeFirst()
Parameters: The method does not take any parameters.
Return Value: This method returns the first element of the Deque after removing it.
Exceptions: The method throws NoSuchElem... | [
{
"code": null,
"e": 23497,
"s": 23469,
"text": "\n10 Dec, 2018"
},
{
"code": null,
"e": 23593,
"s": 23497,
"text": "The Java.util.ArrayDeque.removeFirst() method is used to remove the first element of the Deque."
},
{
"code": null,
"e": 23601,
"s": 23593,
"te... |
Where do we use $.extend() method in jQuery? | The jQuery.extend() method is used to merge contents of two or more objects together. The object is merged into the first object.
You can try to run the following code to learn how to use extend() method −
Live Demo
<!DOCTYPE html>
<html>
<head>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.m... | [
{
"code": null,
"e": 1193,
"s": 1062,
"text": "The jQuery.extend() method is used to merge contents of two or more objects together. The object is merged into the first object. "
},
{
"code": null,
"e": 1269,
"s": 1193,
"text": "You can try to run the following code to learn how ... |
Find median in row wise sorted matrix - GeeksforGeeks | 21 Feb, 2022
We are given a row-wise sorted matrix of size r*c, we need to find the median of the matrix given. It is assumed that r*c is always odd.Examples:
Input : 1 3 5
2 6 9
3 6 9
Output : Median is 5
If we put all the values in a sorted
array A[] = 1 2 3 3 5 6 6 9 9)
Input: 1 3 4
2 5 6
... | [
{
"code": null,
"e": 37678,
"s": 37650,
"text": "\n21 Feb, 2022"
},
{
"code": null,
"e": 37825,
"s": 37678,
"text": "We are given a row-wise sorted matrix of size r*c, we need to find the median of the matrix given. It is assumed that r*c is always odd.Examples: "
},
{
"c... |
C# | How to change BufferHeight of the Console - GeeksforGeeks | 28 Jan, 2019
Given the normal Console in C#, the task is to find the default value of Buffer Height and change it to something else.
Buffer Height refers to the current height of the buffer area of the console in rows.
Approach: This can be done using the BufferHeight property in the Console class of the System package... | [
{
"code": null,
"e": 23911,
"s": 23883,
"text": "\n28 Jan, 2019"
},
{
"code": null,
"e": 24031,
"s": 23911,
"text": "Given the normal Console in C#, the task is to find the default value of Buffer Height and change it to something else."
},
{
"code": null,
"e": 24117,... |
Create a web server and run PHP script on it using Raspberry Pi - GeeksforGeeks | 23 Jul, 2018
In this post, creating a web server and running PHP script on it using Raspberry Pi will be discussed.
Web Servers are basically simple computer programs that dispense the web page when they are requested using the web client. The machines on which this program run are usually called as a server, with both... | [
{
"code": null,
"e": 24677,
"s": 24649,
"text": "\n23 Jul, 2018"
},
{
"code": null,
"e": 24780,
"s": 24677,
"text": "In this post, creating a web server and running PHP script on it using Raspberry Pi will be discussed."
},
{
"code": null,
"e": 25046,
"s": 24780,
... |
How can I get last 4 characters of a string in Python? | The slice operator in Python takes two operands. First operand is the beginning of slice. The index is counted from left by default. A negative operand starts counting from end. Second operand is the index of last character in slice. If omitted, slice goes upto end.
We want last four characters. Hence we count beginnin... | [
{
"code": null,
"e": 1329,
"s": 1062,
"text": "The slice operator in Python takes two operands. First operand is the beginning of slice. The index is counted from left by default. A negative operand starts counting from end. Second operand is the index of last character in slice. If omitted, slice g... |
Concatenate 2 strings in ABAP without using CONCATENATE function | In ABAP you can use && sign to concatenate variables as below
hello TYPE string,
world TYPE string,
helloworld TYPE string.
hello = 'hello'.
world = 'world'.
helloworld = hello && world.
If you want to concatenate strings directly, you can use
helloworld = 'hello' && 'world'.
If you want to keep space in between, you w... | [
{
"code": null,
"e": 1124,
"s": 1062,
"text": "In ABAP you can use && sign to concatenate variables as below"
},
{
"code": null,
"e": 1249,
"s": 1124,
"text": "hello TYPE string,\nworld TYPE string,\nhelloworld TYPE string.\nhello = 'hello'.\nworld = 'world'.\nhelloworld = hello ... |
Lodash _.forOwn() Method - GeeksforGeeks | 14 Sep, 2020
The Lodash _.forOwn() Method Iterates over the own keys of the given object and invoke iteratee for each property. The iteratee function is invoked with three arguments: (value, key, object). Iteratee function may exit iteration early by explicitly returning false.
Syntax:
_.forOwn( object, iteratee_functi... | [
{
"code": null,
"e": 25220,
"s": 25192,
"text": "\n14 Sep, 2020"
},
{
"code": null,
"e": 25486,
"s": 25220,
"text": "The Lodash _.forOwn() Method Iterates over the own keys of the given object and invoke iteratee for each property. The iteratee function is invoked with three argu... |
Subset with sum divisible by m - GeeksforGeeks | 22 Apr, 2022
Given a set of non-negative distinct integers, and a value m, determine if there is a subset of the given set with sum divisible by m. Input Constraints Size of set i.e., n <= 1000000, m <= 1000Examples:
Input : arr[] = {3, 1, 7, 5};
m = 6;
Output : YES
Input : arr[] = {1, 6};
m = 5;
Out... | [
{
"code": null,
"e": 24852,
"s": 24824,
"text": "\n22 Apr, 2022"
},
{
"code": null,
"e": 25058,
"s": 24852,
"text": "Given a set of non-negative distinct integers, and a value m, determine if there is a subset of the given set with sum divisible by m. Input Constraints Size of se... |
How to move the x-axis to top in a JavaFX line chart? | Inline chart, the data values have represented a series of points connected by a line. In JavaFX, you can create a line chart by instantiating the javafx.scene.chart.LineChart class.
By default,
A JavaFX Line chart contains symbols pointing out the values in the series
along the x-axis. Typically, these are small circl... | [
{
"code": null,
"e": 1245,
"s": 1062,
"text": "Inline chart, the data values have represented a series of points connected by a line. In JavaFX, you can create a line chart by instantiating the javafx.scene.chart.LineChart class."
},
{
"code": null,
"e": 1257,
"s": 1245,
"text": ... |
Implementation Differences in LSTM Layers: TensorFlow vs PyTorch | by Madhushan Buwaneswaran | Towards Data Science | Tensorflow and Pytorch are the two most widely used libraries in deep learning. Both these libraries have different approaches when it comes to implementing neural networks. Both these libraries started with major differences. Usually, TF was more preferred for developing production-ready models due to its better optim... | [
{
"code": null,
"e": 681,
"s": 172,
"text": "Tensorflow and Pytorch are the two most widely used libraries in deep learning. Both these libraries have different approaches when it comes to implementing neural networks. Both these libraries started with major differences. Usually, TF was more preferr... |
Python | Counting sign change in list containing Positive and Negative Integers - GeeksforGeeks | 21 Jun, 2019
Given a list containing Positive and Negative integers, We have to find number of times the sign(Positive or Negative) changes in the list.
Input: [-1, 2, 3, -4, 5, -6, 7, 8, -9, 10, -11, 12]
Output:9
Explanation :
Sign change from -1 to 2, ans = 1
Sign change from 3 to -4, ans = 2
Sign change from -4 to... | [
{
"code": null,
"e": 24212,
"s": 24184,
"text": "\n21 Jun, 2019"
},
{
"code": null,
"e": 24352,
"s": 24212,
"text": "Given a list containing Positive and Negative integers, We have to find number of times the sign(Positive or Negative) changes in the list."
},
{
"code": n... |
How to set text direction in HTML? | To set text direction in HTML, use the style attribute. The style attribute specifies an inline style for an element. The style attribute is used with the CSS property direction to set direction. Just keep in mind, the usage of style attribute overrides any style set globally. It will override any style set in the HTML... | [
{
"code": null,
"e": 1420,
"s": 1062,
"text": "To set text direction in HTML, use the style attribute. The style attribute specifies an inline style for an element. The style attribute is used with the CSS property direction to set direction. Just keep in mind, the usage of style attribute overrides... |
Converting days into years months and weeks - JavaScript | We are required to write a JavaScript function that takes in a number (representing the number of days) and returns an object with three properties, namely −
weeks, months, years, days
And the properties should have proper values of these four properties that can be made from the number of days. We should not consider ... | [
{
"code": null,
"e": 1220,
"s": 1062,
"text": "We are required to write a JavaScript function that takes in a number (representing the number of days) and returns an object with three properties, namely −"
},
{
"code": null,
"e": 1247,
"s": 1220,
"text": "weeks, months, years, da... |
Python Program to Determine How Many Times a Given Letter Occurs in a String Recursively | When it is required to check the number of times a given letter occurs in a string using recursion, a method can be defined, and an ‘if’ condition can be used.
The recursion computes output of small bits of the bigger problem, and combines these bits to give the solution to the bigger problem.
Below is a demonstration ... | [
{
"code": null,
"e": 1222,
"s": 1062,
"text": "When it is required to check the number of times a given letter occurs in a string using recursion, a method can be defined, and an ‘if’ condition can be used."
},
{
"code": null,
"e": 1357,
"s": 1222,
"text": "The recursion computes... |
Channel Allocation Problem in Computer Network - GeeksforGeeks | 26 Jul, 2021
Channel allocation is a process in which a single channel is divided and allotted to multiple users in order to carry user specific tasks. There are user’s quantity may vary every time the process takes place. If there are N number of users and channel is divided into N equal-sized sub channels, Each user ... | [
{
"code": null,
"e": 24500,
"s": 24472,
"text": "\n26 Jul, 2021"
},
{
"code": null,
"e": 25012,
"s": 24500,
"text": "Channel allocation is a process in which a single channel is divided and allotted to multiple users in order to carry user specific tasks. There are user’s quantit... |
Algorithms | Analysis of Algorithms | Question 2 - GeeksforGeeks | 16 May, 2019
What is the time complexity of fun()?
int fun(int n){ int count = 0; for (int i = 0; i < n; i++) for (int j = i; j > 0; j--) count = count + 1; return count;}
(A) Theta (n)(B) Theta (n^2)(C) Theta (n*Logn)(D) Theta (nLognLogn)Answer: (B)Explanation: The time complexity can be calculated by c... | [
{
"code": null,
"e": 25036,
"s": 25008,
"text": "\n16 May, 2019"
},
{
"code": null,
"e": 25074,
"s": 25036,
"text": "What is the time complexity of fun()?"
},
{
"code": "int fun(int n){ int count = 0; for (int i = 0; i < n; i++) for (int j = i; j > 0; j--) co... |
PHP Variable functions | If name of a variable has parentheses (with or without parameters in it) in front of it, PHP parser tries to find a function whose name corresponds to value of the variable and executes it. Such a function is called variable function. This feature is useful in implementing callbacks, function tables etc.
Variable funct... | [
{
"code": null,
"e": 1368,
"s": 1062,
"text": "If name of a variable has parentheses (with or without parameters in it) in front of it, PHP parser tries to find a function whose name corresponds to value of the variable and executes it. Such a function is called variable function. This feature is us... |
Tableau your Time Series Forecast with TabPy! | by Jerry Paul | Towards Data Science | Welcome to a quick and short (hopefully) illustration of how one can integrate data science models with Tableau using TabPy. We will specifically look at time series forecasting in this story.
We will use three time series models which are built in python using the superstore dataset ( retail industry data ). We will u... | [
{
"code": null,
"e": 365,
"s": 172,
"text": "Welcome to a quick and short (hopefully) illustration of how one can integrate data science models with Tableau using TabPy. We will specifically look at time series forecasting in this story."
},
{
"code": null,
"e": 567,
"s": 365,
"t... |
shmctl() - Unix, Linux System Call | Unix - Home
Unix - Getting Started
Unix - File Management
Unix - Directories
Unix - File Permission
Unix - Environment
Unix - Basic Utilities
Unix - Pipes & Filters
Unix - Processes
Unix - Communication
Unix - The vi Editor
Unix - What is Shell?
Unix - Using Variables
Unix - Special Variables
Unix - Using Arrays
Unix -... | [
{
"code": null,
"e": 1466,
"s": 1454,
"text": "Unix - Home"
},
{
"code": null,
"e": 1489,
"s": 1466,
"text": "Unix - Getting Started"
},
{
"code": null,
"e": 1512,
"s": 1489,
"text": "Unix - File Management"
},
{
"code": null,
"e": 1531,
"s": 1... |
mysql_fetch_array vs mysql_fetch_assoc vs mysql_fetch_object? | These mysql_* functions are deprecated and other functions are available that gives better security and functionality.
Note: As an alternative, use either _assoc or _row though.
The function returns an associative array of strings that corresponds to the fetched row, or FALSE if there are no more rows. The associativit... | [
{
"code": null,
"e": 1181,
"s": 1062,
"text": "These mysql_* functions are deprecated and other functions are available that gives better security and functionality."
},
{
"code": null,
"e": 1240,
"s": 1181,
"text": "Note: As an alternative, use either _assoc or _row though."
}... |
Batch Script - LABEL | This batch command adds, sets or removes a disk label.
Label
@echo off
label
The above command will prompt the user to enter a new label for the current drive.
Print
Add Notes
Bookmark this page | [
{
"code": null,
"e": 2224,
"s": 2169,
"text": "This batch command adds, sets or removes a disk label."
},
{
"code": null,
"e": 2231,
"s": 2224,
"text": "Label\n"
},
{
"code": null,
"e": 2249,
"s": 2231,
"text": "@echo off \nlabel\n"
},
{
"code": null,
... |
A shorthand array notation in C for repeated values - GeeksforGeeks | 18 Sep, 2017
In C, when there are many repeated values, we can use a shorthand array notation to define array. Below program demonstrates same.
// C program to demonstrate working of shorthand// array rotation.#include <stdio.h> int main(){ // This line is same as // int array[10] = {1, 1, 1, 1, 0, 0, 2, 2, 2, 2... | [
{
"code": null,
"e": 23975,
"s": 23947,
"text": "\n18 Sep, 2017"
},
{
"code": null,
"e": 24106,
"s": 23975,
"text": "In C, when there are many repeated values, we can use a shorthand array notation to define array. Below program demonstrates same."
},
{
"code": "// C prog... |
9 Magic Command to Enhance Your Jupyter Notebook Experience | by Cornellius Yudha Wijaya | Towards Data Science | Do you believe in magic? If you are not, then you should definitely believe in the Jupyter Notebook magic command. The name sounds absurd, but Jupyter Notebook contains a special command we called Magic Command.
True to its name, Magic Command or Line Magic is a special command we execute to achieve some result within ... | [
{
"code": null,
"e": 383,
"s": 171,
"text": "Do you believe in magic? If you are not, then you should definitely believe in the Jupyter Notebook magic command. The name sounds absurd, but Jupyter Notebook contains a special command we called Magic Command."
},
{
"code": null,
"e": 593,
... |
Conditional Probability with a Python Example | by GreekDataGuy | Towards Data Science | This article has 2 parts:1. Theory behind conditional probability2. Example with python
For once, wikipedia has an approachable definition,
In probability theory, conditional probability is a measure of the probability of an event occurring given that another event has (by assumption, presumption, assertion or evidence... | [
{
"code": null,
"e": 259,
"s": 171,
"text": "This article has 2 parts:1. Theory behind conditional probability2. Example with python"
},
{
"code": null,
"e": 311,
"s": 259,
"text": "For once, wikipedia has an approachable definition,"
},
{
"code": null,
"e": 503,
... |
Tryit Editor v3.7 | Tryit: HTML form element | [] |
Jupyter Notebook to PDF in a few lines | by Cornellius Yudha Wijaya | Towards Data Science | If you enjoy my content and want to get more in-depth knowledge regarding data or just daily life as a Data Scientist, please consider subscribing to my newsletter here.
While working on our Jupyter Notebook, sometimes we want to share our processed dataset complete with the created plot and the markdown explanation we... | [
{
"code": null,
"e": 342,
"s": 172,
"text": "If you enjoy my content and want to get more in-depth knowledge regarding data or just daily life as a Data Scientist, please consider subscribing to my newsletter here."
},
{
"code": null,
"e": 660,
"s": 342,
"text": "While working on... |
Build a GUI Application to ping the host using Python - GeeksforGeeks | 04 Dec, 2021
Prerequisite: Python GUI – Tkinter
In this article, we are going to see how to ping the host with a URL or IP using the python ping module in Python. This module provides a simple way to ping in python. And It checks the host is available or not and measures how long the response takes.
“Before” starting w... | [
{
"code": null,
"e": 23901,
"s": 23873,
"text": "\n04 Dec, 2021"
},
{
"code": null,
"e": 23936,
"s": 23901,
"text": "Prerequisite: Python GUI – Tkinter"
},
{
"code": null,
"e": 24189,
"s": 23936,
"text": "In this article, we are going to see how to ping the ho... |
How to verify action bar tittle is truncating or not in android? | This example demonstrates How to verify action bar tittle is truncating or not 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 = "u... | [
{
"code": null,
"e": 1153,
"s": 1062,
"text": "This example demonstrates How to verify action bar tittle is truncating or not in android."
},
{
"code": null,
"e": 1282,
"s": 1153,
"text": "Step 1 − Create a new project in Android Studio, go to File ⇒ New Project and fill all requ... |
Solve System of Equations in R | 23 Aug, 2021
In this article, we will discuss how to solve a system of equations in R Programming Language.
solve() function in R Language is used to solve the equation. Here equation is like a*x = b, where b is a vector or matrix and x is a variable whose value is going to be calculated.
Syntax: solve(a, b)
Parameter... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n23 Aug, 2021"
},
{
"code": null,
"e": 124,
"s": 28,
"text": "In this article, we will discuss how to solve a system of equations in R Programming Language. "
},
{
"code": null,
"e": 306,
"s": 124,
"text": "solve() fu... |
How to use GIT in Ubuntu ? (Part -2) | 15 Nov, 2021
In the previous article, we learnt how to use basic GIT. In this article we would try to learn some more basic concepts like branching and merging.
SOME MORE BASIC COMMANDS:
Some of the very helpful commands while using git are:
git
Type this in the terminal and you’ll see a bunch of commonly used GIT... | [
{
"code": null,
"e": 54,
"s": 26,
"text": "\n15 Nov, 2021"
},
{
"code": null,
"e": 203,
"s": 54,
"text": "In the previous article, we learnt how to use basic GIT. In this article we would try to learn some more basic concepts like branching and merging. "
},
{
"code": nul... |
Copy the entire contents of a directory to another directory in PHP | 09 May, 2019
Given a directory and the task is to copy the content of the directory to another directory using PHP functions. There are many functions used to copy the content of one directory to another.
Used Functions:
copy() Function: The copy() function is used to make a copy of a specified file. It makes a copy of... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n09 May, 2019"
},
{
"code": null,
"e": 220,
"s": 28,
"text": "Given a directory and the task is to copy the content of the directory to another directory using PHP functions. There are many functions used to copy the content of one direc... |
HTML | DOM Input Checkbox defaultChecked Property | 30 May, 2022
The Input Checkbox defaultChecked property in HTML is used to return the default value of checked attribute. It has a boolean value which returns true if the checkbox is checked by default, otherwise returns false.
Syntax:
checkboxObject.defaultChecked
Return Values: It returns a Boolean value that return... | [
{
"code": null,
"e": 53,
"s": 25,
"text": "\n30 May, 2022"
},
{
"code": null,
"e": 268,
"s": 53,
"text": "The Input Checkbox defaultChecked property in HTML is used to return the default value of checked attribute. It has a boolean value which returns true if the checkbox is chec... |
Draw a moving cycle using computer graphics programming in C/C++ | 04 Aug, 2021
In C graphics, the graphics.h functions are used to draw different shapes like circles, rectangles, etc, display text(any message) in a different format (different fonts and colors). By using the functions in the header graphics.h, programs, animations, and different games can also be made. In this article... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n04 Aug, 2021"
},
{
"code": null,
"e": 399,
"s": 28,
"text": "In C graphics, the graphics.h functions are used to draw different shapes like circles, rectangles, etc, display text(any message) in a different format (different fonts and c... |
Creating a simple machine learning model | 13 Jun, 2018
Create a Linear Regression Model in Python using a randomly created data set.
Linear Regression ModelLinear regression geeks for geeks
Generating the Training Set
# python library to generate random numbersfrom random import randint # the limit within which random numbers are generatedTRAIN_SET_LIMIT = 10... | [
{
"code": null,
"e": 54,
"s": 26,
"text": "\n13 Jun, 2018"
},
{
"code": null,
"e": 132,
"s": 54,
"text": "Create a Linear Regression Model in Python using a randomly created data set."
},
{
"code": null,
"e": 189,
"s": 132,
"text": "Linear Regression ModelLine... |
Warnings in Python | 23 Jan, 2020
Warnings are provided to warn the developer of situations that aren’t necessarily exceptions. Usually, a warning occurs when there is some obsolete of certain programming elements, such as keyword, function or class, etc. A warning in a program is distinct from an error. Python program terminates immediate... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n23 Jan, 2020"
},
{
"code": null,
"e": 620,
"s": 28,
"text": "Warnings are provided to warn the developer of situations that aren’t necessarily exceptions. Usually, a warning occurs when there is some obsolete of certain programming elem... |
type() function in Python | 13 Oct, 2020
type() method returns class type of the argument(object) passed as parameter. type() function is mostly used for debugging purposes.
Two different types of arguments can be passed to type() function, single and three argument. If single argument type(obj) is passed, it returns the type of given object. If ... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n13 Oct, 2020"
},
{
"code": null,
"e": 185,
"s": 52,
"text": "type() method returns class type of the argument(object) passed as parameter. type() function is mostly used for debugging purposes."
},
{
"code": null,
"e": 440,... |
Convert an Array into Collection in Java | 09 Jun, 2022
Java Collection provides an architecture to store and manipulate a group of objects. The datatype of data can be changed to a general data type like array into Collection. To convert array-based data into Collection based we can use java. util. Arrays class. This class provides a static method asList(T... ... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n09 Jun, 2022"
},
{
"code": null,
"e": 381,
"s": 28,
"text": "Java Collection provides an architecture to store and manipulate a group of objects. The datatype of data can be changed to a general data type like array into Collection. To ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.