title stringlengths 3 221 | text stringlengths 17 477k | parsed listlengths 0 3.17k |
|---|---|---|
Parallel Neural Networks and Transfer Learning | by Himanshu Aswani | Towards Data Science | Hey there! This is my first ever article on medium. I have been planning to write this article for a while now. My main motivation is to help simplify and even maybe provide a template for taking the next step in building complex neural networks that involve parallel neurons in addition to those in a certain architectu... | [
{
"code": null,
"e": 965,
"s": 171,
"text": "Hey there! This is my first ever article on medium. I have been planning to write this article for a while now. My main motivation is to help simplify and even maybe provide a template for taking the next step in building complex neural networks that invo... |
AVG() Function in MySQL - GeeksforGeeks | 21 Jan, 2021
AVG() function :
This function in MySQL is used to return the average value of the specified expression.
Features :
This function is used to find the average value of the specified expression.
This function comes under Numeric Functions.
This function accepts only one parameter namely expression.
This func... | [
{
"code": null,
"e": 24188,
"s": 24160,
"text": "\n21 Jan, 2021"
},
{
"code": null,
"e": 24205,
"s": 24188,
"text": "AVG() function :"
},
{
"code": null,
"e": 24293,
"s": 24205,
"text": "This function in MySQL is used to return the average value of the specifi... |
Python Trading Toolbox: Weighted and Exponential Moving Averages | by Stefano Basurto | Towards Data Science | In the first post of the Financial Trading Toolbox series (Building a Financial Trading Toolbox in Python: Simple Moving Average), we discussed how to calculate a simple moving average, add it to a price series chart, and use it for investment and trading decisions. The Simple Moving Average is only one of several movi... | [
{
"code": null,
"e": 567,
"s": 47,
"text": "In the first post of the Financial Trading Toolbox series (Building a Financial Trading Toolbox in Python: Simple Moving Average), we discussed how to calculate a simple moving average, add it to a price series chart, and use it for investment and trading ... |
Count of different groups using Graph - GeeksforGeeks | 18 Oct, 2021
Given a graph with N nodes having values either P or M. Also given K pairs of integers as (x, y) representing the edges in the graph such that if a is connected to b and b is connected to c then a and c will also be connected.
A single connected component is called a group. The group can have both P and M... | [
{
"code": null,
"e": 25707,
"s": 25679,
"text": "\n18 Oct, 2021"
},
{
"code": null,
"e": 25935,
"s": 25707,
"text": "Given a graph with N nodes having values either P or M. Also given K pairs of integers as (x, y) representing the edges in the graph such that if a is connected to... |
Minimum operations to convert array A to B | Practice | GeeksforGeeks | Given two Arrays A[] and B[] of length N and M respectively. Find the minimum number of insertions and deletions on the array A[], required to make both the arrays identical.
Note: Array B[] is sorted and all its elements are distinct, operations can be performed at any index not necessarily at end.
Example 1:
Input:... | [
{
"code": null,
"e": 527,
"s": 226,
"text": "Given two Arrays A[] and B[] of length N and M respectively. Find the minimum number of insertions and deletions on the array A[], required to make both the arrays identical.\nNote: Array B[] is sorted and all its elements are distinct, operations can be ... |
Get all array elements with true values in Julia | Array findall() Method - GeeksforGeeks | 23 Mar, 2020
The findall() is an inbuilt function in julia which is used to return a vector of indices or keys of the all true values from the specified array A. If such true values are not present in the array, return an empty array. Here values of index or key start from 1 i.e, for index of 1st element is 1, index of... | [
{
"code": null,
"e": 24266,
"s": 24238,
"text": "\n23 Mar, 2020"
},
{
"code": null,
"e": 24602,
"s": 24266,
"text": "The findall() is an inbuilt function in julia which is used to return a vector of indices or keys of the all true values from the specified array A. If such true v... |
Implement Canny Edge Detector in Python using OpenCV - GeeksforGeeks | 22 Feb, 2022
In this article, we will learn the working of the popular Canny edge detection algorithm developed by John F. Canny in 1986. Usually, in Matlab and OpenCV we use the canny edge detection for many popular tasks in edge detection such as lane detection, sketching, border removal, now we will learn the intern... | [
{
"code": null,
"e": 24720,
"s": 24692,
"text": "\n22 Feb, 2022"
},
{
"code": null,
"e": 25090,
"s": 24720,
"text": "In this article, we will learn the working of the popular Canny edge detection algorithm developed by John F. Canny in 1986. Usually, in Matlab and OpenCV we use t... |
MySQL search if more than one string contains special characters?
| To search if strings contain special characters, you can use REGEXP. Following is the syntax −
select * from yourTableName
where yourColumnName REGEXP '[^a-zA-Z0-9]';
Let us first create a table −
mysql> create table specialCharactersDemo
-> (
-> StudentId varchar(100)
-> );
Query OK, 0 rows affected (0.58 sec... | [
{
"code": null,
"e": 1157,
"s": 1062,
"text": "To search if strings contain special characters, you can use REGEXP. Following is the syntax −"
},
{
"code": null,
"e": 1229,
"s": 1157,
"text": "select * from yourTableName\nwhere yourColumnName REGEXP '[^a-zA-Z0-9]';"
},
{
... |
finally keyword in Python - GeeksforGeeks | 29 Apr, 2019
Prerequisites: Exception Handling, try and except in Python
In programming, there may be some situation in which the current method ends up while handling some exceptions. But the method may require some additional steps before its termination, like closing a file or a network and so on.So, in order to han... | [
{
"code": null,
"e": 24313,
"s": 24285,
"text": "\n29 Apr, 2019"
},
{
"code": null,
"e": 24373,
"s": 24313,
"text": "Prerequisites: Exception Handling, try and except in Python"
},
{
"code": null,
"e": 24856,
"s": 24373,
"text": "In programming, there may be s... |
String Similarity Matching for Big Data using Distributed Cloud Computations | by Georgios Ntanakas | Towards Data Science | Our story — like most stories — starts with an ambitious undertaking! We are offered two large data-sets (coming from two tables in BigQuery). One consists of all the app names from the Google Play and iOS App Stores — about 14 million entries— which we shall call the “clean” app names. The other contains about 5K “dir... | [
{
"code": null,
"e": 721,
"s": 171,
"text": "Our story — like most stories — starts with an ambitious undertaking! We are offered two large data-sets (coming from two tables in BigQuery). One consists of all the app names from the Google Play and iOS App Stores — about 14 million entries— which we s... |
Getting an HTML H1 value to JavaScript variable? | To get the value of H1 to JavaScript variable, you can use −
document.getElementById().innerHTML.
Let’s say the following is our H1 heading −
<h1 id="demo"> This is the demo program of JavaScript ........</h1>
Now, let’s get the H1 value using the below code −
Live Demo
<!DOCTYPE html>
<html lang="en">
<head>
<meta ch... | [
{
"code": null,
"e": 1123,
"s": 1062,
"text": "To get the value of H1 to JavaScript variable, you can use −"
},
{
"code": null,
"e": 1160,
"s": 1123,
"text": "document.getElementById().innerHTML."
},
{
"code": null,
"e": 1204,
"s": 1160,
"text": "Let’s say the... |
What is the difference between $ErrorActionPreference and $ErrorAction cmdlet in PowerShell ? | As we know $ErrorActionPreference and $ErrorAction both have the same functionality and both are used to handle terminating errors by converting Non-Terminating errors to Terminating errors. But when both the variables are used, we need to know which takes precedence.
$ErrorActionPreference variable is used at the star... | [
{
"code": null,
"e": 1331,
"s": 1062,
"text": "As we know $ErrorActionPreference and $ErrorAction both have the same functionality and both are used to handle terminating errors by converting Non-Terminating errors to Terminating errors. But when both the variables are used, we need to know which ta... |
How to get current Wi-Fi IP address in android? | This example demonstrate about How to get current Wi-Fi IP address 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"?>
<Lin... | [
{
"code": null,
"e": 1141,
"s": 1062,
"text": "This example demonstrate about How to get current Wi-Fi IP address in android."
},
{
"code": null,
"e": 1270,
"s": 1141,
"text": "Step 1 − Create a new project in Android Studio, go to File ⇒ New Project and fill all required details... |
numpy.polyder() in Python - GeeksforGeeks | 04 Dec, 2020
The numpy.polyder() method evaluates the derivative of a polynomial with specified order.
Syntax :numpy.polyder(p, m)Parameters :p : [array_like or poly1D]the polynomial coefficients are given in decreasing order of powers. If the second parameter (root) is set to True then array values are the roots of th... | [
{
"code": null,
"e": 25537,
"s": 25509,
"text": "\n04 Dec, 2020"
},
{
"code": null,
"e": 25627,
"s": 25537,
"text": "The numpy.polyder() method evaluates the derivative of a polynomial with specified order."
},
{
"code": null,
"e": 25911,
"s": 25627,
"text": "... |
Advance CSS layout with flexbox - GeeksforGeeks | 21 Aug, 2019
It is also called a flexible box model. It is basically a layout model that provides an easy and clean way to arrange items within container. Flexbox is different from the block model which is vertically bias and the inline which is horizontally bias. Flexbox was created for small-scales layouts and there’... | [
{
"code": null,
"e": 29315,
"s": 29287,
"text": "\n21 Aug, 2019"
},
{
"code": null,
"e": 29932,
"s": 29315,
"text": "It is also called a flexible box model. It is basically a layout model that provides an easy and clean way to arrange items within container. Flexbox is different ... |
Python | Pandas Timestamp.timetuple - GeeksforGeeks | 17 Jan, 2019
Python is a great language for doing data analysis, primarily because of the fantastic ecosystem of data-centric python packages. Pandas is one of those packages and makes importing and analyzing data much easier.
Pandas Timestamp.timetuple() function return a time tuple for the given Timestamp object. The... | [
{
"code": null,
"e": 25537,
"s": 25509,
"text": "\n17 Jan, 2019"
},
{
"code": null,
"e": 25751,
"s": 25537,
"text": "Python is a great language for doing data analysis, primarily because of the fantastic ecosystem of data-centric python packages. Pandas is one of those packages a... |
Introduction to JavaScript - GeeksforGeeks | 26 Oct, 2021
JavaScript is a lightweight, cross-platform, and interpreted scripting language. It is well-known for the development of web pages, many non-browser environments also use it. JavaScript can be used for Client-side developments as well as Server-side developments. JavaScript contains a standard library of o... | [
{
"code": null,
"e": 31329,
"s": 31301,
"text": "\n26 Oct, 2021"
},
{
"code": null,
"e": 31761,
"s": 31329,
"text": "JavaScript is a lightweight, cross-platform, and interpreted scripting language. It is well-known for the development of web pages, many non-browser environments a... |
Graph Plotting in R Programming - GeeksforGeeks | 03 Dec, 2021
When it comes to interpreting the world and the enormous amount of data it is producing on a daily basis, Data Visualization becomes the most desirable way. Rather than screening huge Excel sheets, it is always better to visualize that data through charts and graphs, to gain meaningful insights.
The R Pro... | [
{
"code": null,
"e": 26117,
"s": 26089,
"text": "\n03 Dec, 2021"
},
{
"code": null,
"e": 26415,
"s": 26117,
"text": "When it comes to interpreting the world and the enormous amount of data it is producing on a daily basis, Data Visualization becomes the most desirable way. Rather... |
numpy.conj() in Python - GeeksforGeeks | 04 Dec, 2020
The numpy.conj() function helps the user to conjugate any complex number.
The conjugate of a complex number is obtained by changing the sign of its imaginary part. If the complex number is 2+5j then its conjugate is 2-5j.
Syntax:numpy.conj(x[, out] = ufunc ‘conjugate’)Parameters :x [array_like]: Input valu... | [
{
"code": null,
"e": 26375,
"s": 26347,
"text": "\n04 Dec, 2020"
},
{
"code": null,
"e": 26449,
"s": 26375,
"text": "The numpy.conj() function helps the user to conjugate any complex number."
},
{
"code": null,
"e": 26597,
"s": 26449,
"text": "The conjugate of... |
Semantic-UI | Segment - GeeksforGeeks | 13 Sep, 2021
A semantic UI open-source framework provides a segment or portion on a webpage that is used to create a group of related content. It is very similar to bootstrap usage and has different elements to make your website more amazing using jQuery and CSS for interfaces. For styling of elements, it uses classes.... | [
{
"code": null,
"e": 40451,
"s": 40423,
"text": "\n13 Sep, 2021"
},
{
"code": null,
"e": 40759,
"s": 40451,
"text": "A semantic UI open-source framework provides a segment or portion on a webpage that is used to create a group of related content. It is very similar to bootstrap u... |
How to calculate the Fibonacci series in JavaScript ? - GeeksforGeeks | 13 Dec, 2021
Fibonacci series is a number series that contains integers in the following pattern.
0, 1, 1, 2, 3, 5, 8, 13, 21, 34, 55, ..
In terms of mathematics, the general formula for calculating the Fibonacci series is
fn = fn-1 + fn-2 , where n ≥ 2
Here, f0 = 0 and f1 = 1.
We need to calculate n Fibonacci numbers ... | [
{
"code": null,
"e": 26545,
"s": 26517,
"text": "\n13 Dec, 2021"
},
{
"code": null,
"e": 26630,
"s": 26545,
"text": "Fibonacci series is a number series that contains integers in the following pattern."
},
{
"code": null,
"e": 26670,
"s": 26630,
"text": "0, 1,... |
Python - Itertools.tee() - GeeksforGeeks | 11 Jun, 2020
In Python, Itertools is the inbuilt module that allows us to handle the iterators in an efficient way. They make iterating through the iterables like lists and strings very easily. One such itertools function is filterfalse().
Note: For more information, refer to Python Itertools
This iterator splits the c... | [
{
"code": null,
"e": 25537,
"s": 25509,
"text": "\n11 Jun, 2020"
},
{
"code": null,
"e": 25764,
"s": 25537,
"text": "In Python, Itertools is the inbuilt module that allows us to handle the iterators in an efficient way. They make iterating through the iterables like lists and str... |
Program to add two polynomials - GeeksforGeeks | 03 Nov, 2021
Given two polynomials represented by two arrays, write a function that adds given two polynomials. Example:
Input: A[] = {5, 0, 10, 6}
B[] = {1, 2, 4}
Output: sum[] = {6, 2, 14, 6}
The first input array represents "5 + 0x^1 + 10x^2 + 6x^3"
The second array represents "1 + 2x^1 + 4x^2"
And Ou... | [
{
"code": null,
"e": 26439,
"s": 26411,
"text": "\n03 Nov, 2021"
},
{
"code": null,
"e": 26549,
"s": 26439,
"text": "Given two polynomials represented by two arrays, write a function that adds given two polynomials. Example: "
},
{
"code": null,
"e": 26780,
"s": ... |
SimpleDateFormat applyPattern() Method in Java with Examples - GeeksforGeeks | 08 Jul, 2021
The applyPattern() Method of SimpleDateFormat class is used to set a given defined pattern to the Date Format. It simply converts a particular date and time to a specific format as defined by the user for eg., dd/ MM/ yyyy HH:mm Z or MM/ dd/ yyyy HH:mm Z.Syntax:
public void applyPattern(String pattern)
P... | [
{
"code": null,
"e": 25225,
"s": 25197,
"text": "\n08 Jul, 2021"
},
{
"code": null,
"e": 25490,
"s": 25225,
"text": "The applyPattern() Method of SimpleDateFormat class is used to set a given defined pattern to the Date Format. It simply converts a particular date and time to a s... |
Program to print 'N' alphabet using the number pattern from 1 to n - GeeksforGeeks | 15 Apr, 2021
Given an integer N, the task is to print the Alphabet N Pattern as given below:
1 1
2 2 2
3 3 3
* * *
* * *
* * *
N N
Examples:
Input: N = 6
Output:
1 1
2 2 2
3 3 3
4 4 4
5 5 5
6 6
Input: N =... | [
{
"code": null,
"e": 25721,
"s": 25693,
"text": "\n15 Apr, 2021"
},
{
"code": null,
"e": 25802,
"s": 25721,
"text": "Given an integer N, the task is to print the Alphabet N Pattern as given below: "
},
{
"code": null,
"e": 25900,
"s": 25802,
"text": "1 ... |
JavaScript Date toLocaleTimeString() Method - GeeksforGeeks | 22 Oct, 2021
Below is the example of Date toLocaleTimeString() method.
Example:<script> // Here a date has been assigned // while creating Date object var dateobj = new Date('July 16, 2018 05:35:32'); // time from above date object is // being extracted using toLocaleTimeString() var B = dateobj.toLocaleTimeSt... | [
{
"code": null,
"e": 26545,
"s": 26517,
"text": "\n22 Oct, 2021"
},
{
"code": null,
"e": 26603,
"s": 26545,
"text": "Below is the example of Date toLocaleTimeString() method."
},
{
"code": null,
"e": 26913,
"s": 26603,
"text": "Example:<script> // Here a date... |
PL/SQL - EXIT Statement | The EXIT statement in PL/SQL programming language has the following two usages −
When the EXIT statement is encountered inside a loop, the loop is immediately terminated and the program control resumes at the next statement following the loop.
When the EXIT statement is encountered inside a loop, the loop is immediatel... | [
{
"code": null,
"e": 2146,
"s": 2065,
"text": "The EXIT statement in PL/SQL programming language has the following two usages −"
},
{
"code": null,
"e": 2309,
"s": 2146,
"text": "When the EXIT statement is encountered inside a loop, the loop is immediately terminated and the prog... |
PL/SQL - Cursors | In this chapter, we will discuss the cursors in PL/SQL. Oracle creates a memory area, known as the context area, for processing an SQL statement, which contains all the information needed for processing the statement; for example, the number of rows processed, etc.
A cursor is a pointer to this context area. PL/SQL con... | [
{
"code": null,
"e": 2331,
"s": 2065,
"text": "In this chapter, we will discuss the cursors in PL/SQL. Oracle creates a memory area, known as the context area, for processing an SQL statement, which contains all the information needed for processing the statement; for example, the number of rows pro... |
DirectX - Pixel Shader | The Pixel Shader is called once per pixel in comparison to vertex shader which it calls as per vertex and gets its data from the preceding pipeline station respectively from the preceding Shader. It calculates the required pixel color (pixel depth or any other values are possible) and returns them to the required pipel... | [
{
"code": null,
"e": 2623,
"s": 2298,
"text": "The Pixel Shader is called once per pixel in comparison to vertex shader which it calls as per vertex and gets its data from the preceding pipeline station respectively from the preceding Shader. It calculates the required pixel color (pixel depth or an... |
Pad the values of the column with zeros in MySQL | For this, use the concept of ZEROFILL. It pads the displayed value of the field with zeros up to the display width set in the column definition
Let us first create a table −
mysql> create table DemoTable626 (Value int(5) zerofill);
Query OK, 0 rows affected (0.71 sec)
Insert some records in the table using insert comma... | [
{
"code": null,
"e": 1206,
"s": 1062,
"text": "For this, use the concept of ZEROFILL. It pads the displayed value of the field with zeros up to the display width set in the column definition"
},
{
"code": null,
"e": 1236,
"s": 1206,
"text": "Let us first create a table −"
},
... |
Exploring confusion matrix evolution on tensorboard | by Sushrut Ashtikar | Towards Data Science | Tensorboard is the best tool for visualizing many metrics while training and validating a neural network. In most of the case, we need to look for more details like how a model is performing on validation data. Sometimes training and validation loss and accuracy are not enough, we need to figure out the performance of ... | [
{
"code": null,
"e": 567,
"s": 172,
"text": "Tensorboard is the best tool for visualizing many metrics while training and validating a neural network. In most of the case, we need to look for more details like how a model is performing on validation data. Sometimes training and validation loss and a... |
Fetch specific multiple documents in MongoDB | To fetch specific multiple documents in MongoDB, use $in. Let us create a collection with documents −
> db.demo593.insertOne({id:1,"Name":"Chris"});{
"acknowledged" : true, "insertedId" : ObjectId("5e93177dfd2d90c177b5bcd9")
}
> db.demo593.insertOne({id:2,"Name":"John"});{
"acknowledged" : true, "insertedId" : Ob... | [
{
"code": null,
"e": 1164,
"s": 1062,
"text": "To fetch specific multiple documents in MongoDB, use $in. Let us create a collection with documents −"
},
{
"code": null,
"e": 1671,
"s": 1164,
"text": "> db.demo593.insertOne({id:1,\"Name\":\"Chris\"});{\n \"acknowledged\" : true,... |
Interpreting Image Classification Model with LIME | by Ruben Winastwan | Towards Data Science | The advancement rate and growth in the area of machine learning are insane. Nowadays, we can choose a variety of machine learning models to solve our problems. Let’s say we want to solve a classification task, now we don’t only have logistic regression to choose from. We also have decision tree, random forest, SVM, Gra... | [
{
"code": null,
"e": 559,
"s": 172,
"text": "The advancement rate and growth in the area of machine learning are insane. Nowadays, we can choose a variety of machine learning models to solve our problems. Let’s say we want to solve a classification task, now we don’t only have logistic regression to... |
GATE | GATE-CS-2004 | Question 45 - GeeksforGeeks | 15 Sep, 2021
Consider the grammar with the following translation rules and E as the start symbol.
E → E1 # T { E.value = E1.value * T.value }
| T{ E.value = T.value }
T → T1 & F { T.value = T1.value + F.value }
| F{ T.value = F.value }
F → num { F.value = num.value }
Compute E.value for the root of ... | [
{
"code": null,
"e": 24560,
"s": 24532,
"text": "\n15 Sep, 2021"
},
{
"code": null,
"e": 24645,
"s": 24560,
"text": "Consider the grammar with the following translation rules and E as the start symbol."
},
{
"code": null,
"e": 24835,
"s": 24645,
"text": "E → E... |
Mastering Package Management system with Dpkg | Dpkg is a device to install, build, dispose of and manage Debian programs and is managed utterly through command line parameters, which consists of precisely one action and zero or extra options. The action parameter tells to dpkg, what to do and options to manipulate the conduct of the action is some way. This article... | [
{
"code": null,
"e": 1448,
"s": 1062,
"text": "Dpkg is a device to install, build, dispose of and manage Debian programs and is managed utterly through command line parameters, which consists of precisely one action and zero or extra options. The action parameter tells to dpkg, what to do and option... |
Java program to Get IP address of the system | The InetAddress class This class represents an Internet Protocol (IP) address. You can get the local IP Address & Hostname of the system using getLocalAddress() method of this class
Live Demo
import java.net.InetAddress;
public class GetIpAddress {
public static void main(String args[]) throws Exception{
I... | [
{
"code": null,
"e": 1248,
"s": 1062,
"text": "The InetAddress class This class represents an Internet Protocol (IP) address. You can get the local IP Address & Hostname of the system using getLocalAddress() method of this class"
},
{
"code": null,
"e": 1258,
"s": 1248,
"text... |
Convert type of data object in R Programming - type.convert() Function - GeeksforGeeks | 26 May, 2020
type.convert() function in R Language is used to compute the data type of a particular data object.It can convert data object to logical, integer, numeric, or factor.
Syntax: type.convert(x)
Parameter:x: It can be a vector matrix or an array
Example 1: Apply type.convert to vector of numbers
# R program to... | [
{
"code": null,
"e": 24788,
"s": 24760,
"text": "\n26 May, 2020"
},
{
"code": null,
"e": 24955,
"s": 24788,
"text": "type.convert() function in R Language is used to compute the data type of a particular data object.It can convert data object to logical, integer, numeric, or fact... |
OptionalInt getAsInt() method in Java with examples - GeeksforGeeks | 30 Jul, 2019
OptionalInt help us to create an object which may or may not contain a int value. The getAsInt() method returns value If a value is present in OptionalInt object, otherwise throws NoSuchElementException.
Syntax:
public int getAsInt()
Parameters: This method accepts nothing.
Return value: This method retur... | [
{
"code": null,
"e": 23583,
"s": 23555,
"text": "\n30 Jul, 2019"
},
{
"code": null,
"e": 23787,
"s": 23583,
"text": "OptionalInt help us to create an object which may or may not contain a int value. The getAsInt() method returns value If a value is present in OptionalInt object, ... |
Artifact Report | Now that you are comfortable with installation and running Python commands on your local system, let us move into the concepts of forensics in detail. This chapter will explain various concepts involved in dealing with artifacts in Python digital forensics.
The process of digital forensics includes reporting as the thi... | [
{
"code": null,
"e": 2211,
"s": 1953,
"text": "Now that you are comfortable with installation and running Python commands on your local system, let us move into the concepts of forensics in detail. This chapter will explain various concepts involved in dealing with artifacts in Python digital forens... |
How to substring value in a MySQL table column? | To substring a MySQL table column, use the in-built SUBSTR() function from MySQL. The syntax is as follows −
select substr(yourColumnName,AnyValue) as anyVariableName from yourTableName;
To understand the function substr(), let us create a table. The query to create a table is as follows −
mysql> create table SubString... | [
{
"code": null,
"e": 1171,
"s": 1062,
"text": "To substring a MySQL table column, use the in-built SUBSTR() function from MySQL. The syntax is as follows −"
},
{
"code": null,
"e": 1249,
"s": 1171,
"text": "select substr(yourColumnName,AnyValue) as anyVariableName from yourTableN... |
Deep Learning with Keras - Importing Libraries | We first import the various libraries required by the code in our project.
As typical, we use numpy for array handling and matplotlib for plotting. These libraries are imported in our project using the following import statements
import numpy as np
import matplotlib
import matplotlib.pyplot as plot
As both Tensorflow ... | [
{
"code": null,
"e": 2034,
"s": 1959,
"text": "We first import the various libraries required by the code in our project."
},
{
"code": null,
"e": 2189,
"s": 2034,
"text": "As typical, we use numpy for array handling and matplotlib for plotting. These libraries are imported in ou... |
Generating n random numbers between a range - JavaScript | We are required to write a JavaScript function that takes in a number, say n, and an array of two numbers that represents a range. The function should return an array of n random elements all lying between the range provided by the second argument.
Following is the code −
const num = 10;
const range = [5, 15];
const ra... | [
{
"code": null,
"e": 1311,
"s": 1062,
"text": "We are required to write a JavaScript function that takes in a number, say n, and an array of two numbers that represents a range. The function should return an array of n random elements all lying between the range provided by the second argument."
}... |
Design Background color changer using HTML CSS and JavaScript - GeeksforGeeks | 12 Jan, 2021
Background color changer is a project which enables to change background color of web pages with an ease. There are color boxes on a web page when user click on any one of them, then the resultant color will appear in the background of the web page. It makes web pages look attractive.
File structure:
index... | [
{
"code": null,
"e": 25400,
"s": 25372,
"text": "\n12 Jan, 2021"
},
{
"code": null,
"e": 25686,
"s": 25400,
"text": "Background color changer is a project which enables to change background color of web pages with an ease. There are color boxes on a web page when user click on an... |
Predicting UFC Fights With Machine Learning | by Charles Pierse | Towards Data Science | TL;DR: check out the predictor for yourself and see how it performs for an upcoming UFC fight card or check out the code on github
As a fan of MMA I often find myself trying to predict the outcome of fights on an upcoming fight card. The problem is that fighting by its nature can be very unpredictable. More so than eve... | [
{
"code": null,
"e": 303,
"s": 172,
"text": "TL;DR: check out the predictor for yourself and see how it performs for an upcoming UFC fight card or check out the code on github"
},
{
"code": null,
"e": 611,
"s": 303,
"text": "As a fan of MMA I often find myself trying to predict t... |
Tryit Editor v3.7 | Tryit: HTML image as an object | [] |
What are the differences in die() and exit() in PHP? | There is no difference between die and exit, they are the same.
The PHP Manual for exit states −
"This language construct is equivalent to die()."
The PHP Manual for die states −
"This language construct is equivalent to exit()."
However, there is a small difference, i.e the amount of time it takes for the parser to re... | [
{
"code": null,
"e": 1126,
"s": 1062,
"text": "There is no difference between die and exit, they are the same."
},
{
"code": null,
"e": 1159,
"s": 1126,
"text": "The PHP Manual for exit states −"
},
{
"code": null,
"e": 1209,
"s": 1159,
"text": "\"This languag... |
How to remove the last digit of a number and execute the remaining digits in JavaScript? | Before the introduction of Bitwise operators, a number is first converted into a string and later on, using string methods, some part of that number is sliced and the remaining part is executed. Here type-conversion i.e a number into a string is necessary. But the introduction of Bitwise or has made the task very easy.... | [
{
"code": null,
"e": 1550,
"s": 1062,
"text": "Before the introduction of Bitwise operators, a number is first converted into a string and later on, using string methods, some part of that number is sliced and the remaining part is executed. Here type-conversion i.e a number into a string is necessa... |
Bootstrap | Carousel - GeeksforGeeks | 05 Aug, 2021
In this article, we will see how to create an image slide show for your webpage to make it look more attractive. For this we will use bootstrap Carousel.It can be included into your webpage using “bootstrap.js” or “bootstrap.min.js”. Carousels are not supported properly in Internet Explorer, this is becaus... | [
{
"code": null,
"e": 28075,
"s": 28047,
"text": "\n05 Aug, 2021"
},
{
"code": null,
"e": 28522,
"s": 28075,
"text": "In this article, we will see how to create an image slide show for your webpage to make it look more attractive. For this we will use bootstrap Carousel.It can be ... |
How to determine if date is weekend in JavaScript? | As we know the value 0 is for day Sunday and 6 for Saturday. First of all, you need to get day with the help of getDay().
Let’s set a date −
var givenDate=new Date("2020-07-18");
Now, we will get the day −
var currentDay = givenDate.getDay();
Following is the code to determine if date is weekend −
var givenDate=new Dat... | [
{
"code": null,
"e": 1184,
"s": 1062,
"text": "As we know the value 0 is for day Sunday and 6 for Saturday. First of all, you need to get day with the help of getDay()."
},
{
"code": null,
"e": 1203,
"s": 1184,
"text": "Let’s set a date −"
},
{
"code": null,
"e": 1241... |
How to write "Hello, World!" program in JavaScript? | JavaScript can be implemented using JavaScript statements that are placed within the <script>... </script>.
You can place the <script> tags, containing your JavaScript, anywhere within your web page, but it is normally recommended that you should keep it within the <head> tags.
Let us take a simple example to print out... | [
{
"code": null,
"e": 1170,
"s": 1062,
"text": "JavaScript can be implemented using JavaScript statements that are placed within the <script>... </script>."
},
{
"code": null,
"e": 1341,
"s": 1170,
"text": "You can place the <script> tags, containing your JavaScript, anywhere with... |
A complete NLP classification pipeline in scikit-learn | by Louis de Bruijn | Towards Data Science | What we’ll cover in this story:
Reading a corpus
Basic script structure including logging, argparse and ifmain.
Train/test split
Prior and posterior class probabilities
Baseline classification
Chain multiple features with FeatureUnion
Show the results in a Pandas DataFrame and a confusion matrix
The most important take... | [
{
"code": null,
"e": 204,
"s": 172,
"text": "What we’ll cover in this story:"
},
{
"code": null,
"e": 221,
"s": 204,
"text": "Reading a corpus"
},
{
"code": null,
"e": 284,
"s": 221,
"text": "Basic script structure including logging, argparse and ifmain."
},... |
Cheat Sheet for NLP: A Summary of My NLP Learning Journey So Far | by Jin Pu | Towards Data Science | To be honest, I didn’t expect to learn NLP in the first place. But with its wide and intriguing applications, NLP allures me all the time to dig deeper and explore more fun with it. Unlike many machine learning algorithms, NLP is especially rich in visualization and thus is easy to understand, interpret, and apply to r... | [
{
"code": null,
"e": 667,
"s": 171,
"text": "To be honest, I didn’t expect to learn NLP in the first place. But with its wide and intriguing applications, NLP allures me all the time to dig deeper and explore more fun with it. Unlike many machine learning algorithms, NLP is especially rich in visual... |
PHP - Map Functions | The Map is a sequential collection of key-value pairs, almost identical to an array used in a similar context. The keys can be of any type but must be unique, and the values are replaced if added to the map by using the same key.
Keys and values can be any type, including objects.
Supports array syntax (square brackets... | [
{
"code": null,
"e": 2987,
"s": 2757,
"text": "The Map is a sequential collection of key-value pairs, almost identical to an array used in a similar context. The keys can be of any type but must be unique, and the values are replaced if added to the map by using the same key."
},
{
"code": n... |
Sorting a JSON object in JavaScript | Suppose we have an object like this −
const obj = {
key1: 56,
key2: 67,
key3: 23,
key4: 11,
key5: 88
};
We are required to write a JavaScript function that takes in this object and returns a sorted array like this −
const arr = [11, 23, 56, 67, 88];
Here, we sorted the object values and placed them in an... | [
{
"code": null,
"e": 1100,
"s": 1062,
"text": "Suppose we have an object like this −"
},
{
"code": null,
"e": 1181,
"s": 1100,
"text": "const obj = {\n key1: 56,\n key2: 67,\n key3: 23,\n key4: 11,\n key5: 88\n};"
},
{
"code": null,
"e": 1293,
"s": 1181,... |
How to get the current date and time in Java? | You can get the current date and time in Java in various ways. Following are some of them −
The no-arg constructor of the java.util.Date class returns the Date object representing the current date and time.
Live Demo
import java.util.Date;
public class CreateDate {
public static void main(String args[]) {
... | [
{
"code": null,
"e": 1154,
"s": 1062,
"text": "You can get the current date and time in Java in various ways. Following are some of them −"
},
{
"code": null,
"e": 1269,
"s": 1154,
"text": "The no-arg constructor of the java.util.Date class returns the Date object representing th... |
How to Drop rows in DataFrame by conditions on column values? - GeeksforGeeks | 02 Jul, 2020
In this article, we are going to see several examples of how to drop rows from the dataframe based on certain conditions applied on a column.
Pandas provide data analysts a way to delete and filter data frame using dataframe.drop() method. We can use this method to drop such rows that do not satisfy the gi... | [
{
"code": null,
"e": 24709,
"s": 24681,
"text": "\n02 Jul, 2020"
},
{
"code": null,
"e": 24851,
"s": 24709,
"text": "In this article, we are going to see several examples of how to drop rows from the dataframe based on certain conditions applied on a column."
},
{
"code":... |
how to convert Object array to String array in java | As list.toArray() returns an Object[], it can be converted to String array by passing the String[] as parameter. See the example below.
import java.util.ArrayList;
import java.util.List;
public class Tester {
public static void main(String[] args) {
List<String> data = new ArrayList<String>();
data.add("... | [
{
"code": null,
"e": 1198,
"s": 1062,
"text": "As list.toArray() returns an Object[], it can be converted to String array by passing the String[] as parameter. See the example below."
},
{
"code": null,
"e": 1614,
"s": 1198,
"text": "import java.util.ArrayList;\nimport java.util.... |
cat - Unix, Linux Command | cat - Concatenate and print the content of files.
cat [Options] [File]...
Cat command concatenate FILE(s), or standard input, to standard output. With no FILE, or when FILE is -, it reads standard input.
Create two sample files
#sample.txt
This is a sample text file
#sample1.txt
This is a another sample text file
To ... | [
{
"code": null,
"e": 10627,
"s": 10577,
"text": "cat - Concatenate and print the content of files."
},
{
"code": null,
"e": 10651,
"s": 10627,
"text": "cat [Options] [File]..."
},
{
"code": null,
"e": 10781,
"s": 10651,
"text": "Cat command concatenate FILE(s)... |
How to create a SplitPane in JavaFX? | A SplitPane is a UI component that contains two or more sides with a separator in between. This separator is movable; you can reduce/increase the area of a side using it. You can create a split pane by instantiating the javafx.scene.control.SplitPane class.
The sides of the SplitPane can be arranged either horizontally... | [
{
"code": null,
"e": 1320,
"s": 1062,
"text": "A SplitPane is a UI component that contains two or more sides with a separator in between. This separator is movable; you can reduce/increase the area of a side using it. You can create a split pane by instantiating the javafx.scene.control.SplitPane cl... |
C++ Program To Remove Duplicates From A Given String - GeeksforGeeks | 11 Dec, 2021
Given a string S, the task is to remove all the duplicates in the given string. Below are the different methods to remove duplicates in a string.
METHOD 1 (Simple)
C++
// CPP program to remove duplicate character// from character array and print in sorted// order#include <bits/stdc++.h>using namespace std... | [
{
"code": null,
"e": 24528,
"s": 24500,
"text": "\n11 Dec, 2021"
},
{
"code": null,
"e": 24674,
"s": 24528,
"text": "Given a string S, the task is to remove all the duplicates in the given string. Below are the different methods to remove duplicates in a string."
},
{
"co... |
Sum of list with stream filter in Java | To get sum of list with stream filter in Java, the code is as follows −
Live Demo
import java.util.*;
public class Demo
{
public static void main(String[] args)
{
List<Integer> my_list = new ArrayList<Integer>();
my_list.add(11);
my_list.add(35);
my_list.add(56);
my_list.add(78);
... | [
{
"code": null,
"e": 1134,
"s": 1062,
"text": "To get sum of list with stream filter in Java, the code is as follows −"
},
{
"code": null,
"e": 1145,
"s": 1134,
"text": " Live Demo"
},
{
"code": null,
"e": 1664,
"s": 1145,
"text": "import java.util.*;\npublic ... |
Why are global and static variables initialized to their default values in C/C++? | Global and static variables are initialized to their default values because it is in the C or C++ standards and it is free to assign a value by zero at compile time. Both static and global variable behave same to the generated object code. These variables are allocated in .bss file and at the time of loading it allocat... | [
{
"code": null,
"e": 1447,
"s": 1062,
"text": "Global and static variables are initialized to their default values because it is in the C or C++ standards and it is free to assign a value by zero at compile time. Both static and global variable behave same to the generated object code. These variabl... |
Python – Check if list contain particular digits | 02 Feb, 2021
Given a List and some digits, the task is to write a python program to check if the list contains only certain digits.
Input : test_list = [435, 133, 113, 451, 134], digs = [1, 4, 5, 3]
Output : True
Explanation : All elements are made out of 1, 4, 5 or 3 only.
Input : test_list = [435, 133, 113, 451, 134... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n02 Feb, 2021"
},
{
"code": null,
"e": 147,
"s": 28,
"text": "Given a List and some digits, the task is to write a python program to check if the list contains only certain digits."
},
{
"code": null,
"e": 428,
"s": 147,
... |
Data Structures and Algorithms | Set 38 | 21 Feb, 2019
This topic contains basic questions of Algorithm which can be helpful for GATE CS Preparation. So, it is recommended to solve each of these questions if you are preparing for GATE.
Ques-1: Which one of the following correctly determines the solution of the recurrence relation given below with T(1) = 1 ?
T(... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n21 Feb, 2019"
},
{
"code": null,
"e": 209,
"s": 28,
"text": "This topic contains basic questions of Algorithm which can be helpful for GATE CS Preparation. So, it is recommended to solve each of these questions if you are preparing for ... |
GroupBy and filter data in PySpark | 19 Dec, 2021
In this article, we will Group and filter the data in PySpark using Python.
Python3
# importing moduleimport pyspark # importing sparksession from pyspark.sql modulefrom pyspark.sql import SparkSession # creating sparksession and giving an app namespark = SparkSession.builder.appName('sparkdf').getOrCrea... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n19 Dec, 2021"
},
{
"code": null,
"e": 104,
"s": 28,
"text": "In this article, we will Group and filter the data in PySpark using Python."
},
{
"code": null,
"e": 112,
"s": 104,
"text": "Python3"
},
{
"code": ... |
Logistic Regression using Statsmodels | 18 May, 2022
Prerequisite: Understanding Logistic RegressionLogistic regression is the type of regression analysis used to find the probability of a certain event occurring. It is the best suited type of regression for cases where we have a categorical dependent variable which can take only discrete values.
The datase... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n18 May, 2022"
},
{
"code": null,
"e": 325,
"s": 28,
"text": "Prerequisite: Understanding Logistic RegressionLogistic regression is the type of regression analysis used to find the probability of a certain event occurring. It is the best... |
How to remove an HTML element using JavaScript ? | 21 Jul, 2021
Given an HTML element and the task is to remove the HTML element from the document using JavaScript.
Approach:
Select the HTML element which need to remove.
Use JavaScript remove() and removeChild() method to remove the element from the HTML document.
Example 1: This example uses removeChild() method to re... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n21 Jul, 2021"
},
{
"code": null,
"e": 129,
"s": 28,
"text": "Given an HTML element and the task is to remove the HTML element from the document using JavaScript."
},
{
"code": null,
"e": 139,
"s": 129,
"text": "Appro... |
Depth First Search or DFS for a Graph | 14 Jul, 2022
Depth First Traversal (or Search) for a graph is similar to Depth First Traversal of a tree. The only catch here is, unlike trees, graphs may contain cycles (a node may be visited twice). To avoid processing a node more than once, use a boolean visited array.
Example:
Input: n = 4, e = 6 0 -> 1, 0 -> 2, ... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n14 Jul, 2022"
},
{
"code": null,
"e": 313,
"s": 52,
"text": "Depth First Traversal (or Search) for a graph is similar to Depth First Traversal of a tree. The only catch here is, unlike trees, graphs may contain cycles (a node may be vi... |
itertools.combinations() module in Python to print all possible combinations | 23 Nov, 2020
Given an array of size n, generate and print all possible combinations of r elements in array.
Examples:
Input : arr[] = [1, 2, 3, 4],
r = 2
Output : [[1, 2], [1, 3], [1, 4], [2, 3], [2, 4], [3, 4]]
This problem has existing recursive solution please refer Print all possible combinations of ... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n23 Nov, 2020"
},
{
"code": null,
"e": 147,
"s": 52,
"text": "Given an array of size n, generate and print all possible combinations of r elements in array."
},
{
"code": null,
"e": 157,
"s": 147,
"text": "Examples:"... |
Iterative Method To Print Left View of a Binary Tree | 06 Aug, 2021
Given a Binary Tree, print it’s left view. Left view of a Binary Tree is a set of nodes visible when tree is seen from the left side .
Examples:
Input : 1
/ \
2 3
/ \ / \
4 5 6 7
Output : 1 2 4
Input : 1
/ \
... | [
{
"code": null,
"e": 54,
"s": 26,
"text": "\n06 Aug, 2021"
},
{
"code": null,
"e": 190,
"s": 54,
"text": "Given a Binary Tree, print it’s left view. Left view of a Binary Tree is a set of nodes visible when tree is seen from the left side . "
},
{
"code": null,
"e": 2... |
Subarray with XOR less than k | 23 May, 2022
Given an array of n numbers and a number k. You have to write a program to find the number of subarrays with xor less than k.Examples:
Input: arr[] = {8, 9, 10, 11, 12}, k=3Output: 4Explaination: Sub-arrays [1:3], [2:3], [2:5], [4:5] have xor values 2, 1, 0, 1 respectively.
Input: arr[] = {12, 4, 6, 8, ... | [
{
"code": null,
"e": 54,
"s": 26,
"text": "\n23 May, 2022"
},
{
"code": null,
"e": 190,
"s": 54,
"text": "Given an array of n numbers and a number k. You have to write a program to find the number of subarrays with xor less than k.Examples: "
},
{
"code": null,
"e": 3... |
Read integers from console in Java | To read integers from console, use Scanner class.
Scanner myInput = new Scanner( System.in );
Allow a use to add an integer using the nextInt() method.
System.out.print( "Enter first integer: " );
int a = myInput.nextInt();
In the same way, take another input in a new variable.
System.out.print( "Enter second integer: ... | [
{
"code": null,
"e": 1112,
"s": 1062,
"text": "To read integers from console, use Scanner class."
},
{
"code": null,
"e": 1156,
"s": 1112,
"text": "Scanner myInput = new Scanner( System.in );"
},
{
"code": null,
"e": 1214,
"s": 1156,
"text": "Allow a use to ad... |
Full Stack Development Tutorial: Serving Trading Data with Serverless REST API running on AWS Lambda | by J Li | Towards Data Science | Serverless computing is a cloud-computing execution model in which the cloud provider runs the server, and dynamically manages the allocation of machine resources. Pricing is based on the actual amount of resources consumed by an application, rather than on pre-purchased units of capacity. — Wikipedia
(this post is als... | [
{
"code": null,
"e": 475,
"s": 172,
"text": "Serverless computing is a cloud-computing execution model in which the cloud provider runs the server, and dynamically manages the allocation of machine resources. Pricing is based on the actual amount of resources consumed by an application, rather than ... |
Try-Catch-Finally in C# | C# exception is a response to an exceptional circumstance that arises while a program is running, such as an attempt to divide by zero.
C# exception handling is performed using the following keywords −
try − A try block identifies a block of code for which particular exceptions is activated. It is followed by one or mo... | [
{
"code": null,
"e": 1198,
"s": 1062,
"text": "C# exception is a response to an exceptional circumstance that arises while a program is running, such as an attempt to divide by zero."
},
{
"code": null,
"e": 1264,
"s": 1198,
"text": "C# exception handling is performed using the f... |
Count frequencies of all elements in array in Python using collections module | As python allows duplicate elements in a list we can have one element present multiple Times. The frequency of elements in a list indicates how many times an element occurs in a list. In this article we use the Counter function of the collections module to find out the frequency of each item in a list.
Syntax: Counter(... | [
{
"code": null,
"e": 1366,
"s": 1062,
"text": "As python allows duplicate elements in a list we can have one element present multiple Times. The frequency of elements in a list indicates how many times an element occurs in a list. In this article we use the Counter function of the collections module... |
Important instructions used in dockerfile | We all know the importance of dockerfile in creating an efficient and flexible Docker Image. A dockerfile contains a set of instructions that are executed step by step when you use the docker build command to build the docker image. It contains certain instructions and commands that decides the structure of your image,... | [
{
"code": null,
"e": 1737,
"s": 1062,
"text": "We all know the importance of dockerfile in creating an efficient and flexible Docker Image. A dockerfile contains a set of instructions that are executed step by step when you use the docker build command to build the docker image. It contains certain ... |
How to install modules without npm in node.js ? - GeeksforGeeks | 05 Oct, 2021
We can install modules required for a particular project in node.js without npm, the recommended node package manager using yarn. Yarn is a wonderful package manager. Like npm, if you have a project folder with package.json containing all the required dependencies mentioned for the project, you can use yar... | [
{
"code": null,
"e": 25068,
"s": 25040,
"text": "\n05 Oct, 2021"
},
{
"code": null,
"e": 25410,
"s": 25068,
"text": "We can install modules required for a particular project in node.js without npm, the recommended node package manager using yarn. Yarn is a wonderful package manag... |
ArrayDeque iterator() Method in Java - GeeksforGeeks | 10 Dec, 2018
The Java.util.ArrayDeque.iterator() method is used to return an iterator of the elements of the ArrayDeque.
Syntax:
Iterator iterate_value = Array_Deque.iterator();
Parameters: The method does not take any parameter.
Return Value: The method iterates over the elements of the deque and returns the values(it... | [
{
"code": null,
"e": 24042,
"s": 24014,
"text": "\n10 Dec, 2018"
},
{
"code": null,
"e": 24150,
"s": 24042,
"text": "The Java.util.ArrayDeque.iterator() method is used to return an iterator of the elements of the ArrayDeque."
},
{
"code": null,
"e": 24158,
"s": 24... |
C# | How to play user modified Beep sound through Console - GeeksforGeeks | 29 Jan, 2019
Given a normal Console in C#, the task is to play a user modified Beep sound through the Console. User modified beep sound refers to the Beep sound played at a specific frequency for a specific duration of time.
Approach: This can be achieved with the help of Beep(Int32, Int32) method of Console Class in S... | [
{
"code": null,
"e": 25108,
"s": 25080,
"text": "\n29 Jan, 2019"
},
{
"code": null,
"e": 25320,
"s": 25108,
"text": "Given a normal Console in C#, the task is to play a user modified Beep sound through the Console. User modified beep sound refers to the Beep sound played at a spe... |
Python - Stacking a multi-level column in a Pandas DataFrame | To stack a multi-level column, use the stack() method. At first, import the required library −
import pandas as pd
Create a multi-level column −
items = pd.MultiIndex.from_tuples([('Maths', 'Mental Maths'),('Maths', 'Discrete Mathematics'),('Maths', 'Applied Mathematics')])
Now, create a DataFrame and set multi-level... | [
{
"code": null,
"e": 1157,
"s": 1062,
"text": "To stack a multi-level column, use the stack() method. At first, import the required library −"
},
{
"code": null,
"e": 1177,
"s": 1157,
"text": "import pandas as pd"
},
{
"code": null,
"e": 1207,
"s": 1177,
"text... |
Tryit Editor v3.7 | Tryit: link to stylesheet | [] |
Demonstrate nested loops with return statements in JavaScript? | Here’s an example with two loops, outer and inner −
let demoForLoop = ()=>{
for(var outer=1;outer<100;outer++){
for(var inner=1;inner<=5;inner++){
if(outer==3){
return 'THE OUTER VALUE IS EQUAL TO 3 INSIDE THE LOOP';
}
}
}
return 'OUT OF THE LOOP';
}
console.log(demoFo... | [
{
"code": null,
"e": 1114,
"s": 1062,
"text": "Here’s an example with two loops, outer and inner −"
},
{
"code": null,
"e": 1392,
"s": 1114,
"text": "let demoForLoop = ()=>{\n for(var outer=1;outer<100;outer++){\n for(var inner=1;inner<=5;inner++){\n if(outer==3){\... |
Boundary Testing | Boundary value analysis is a type of black box or specification based testing technique in which tests are performed using the boundary values.
An exam has a pass boundary at 50 percent, merit at 75 percent and distinction at 85 percent. The Valid Boundary values for this scenario will be as follows:
49, 50 - for pass
... | [
{
"code": null,
"e": 5889,
"s": 5745,
"text": "Boundary value analysis is a type of black box or specification based testing technique in which tests are performed using the boundary values."
},
{
"code": null,
"e": 6047,
"s": 5889,
"text": "An exam has a pass boundary at 50 perc... |
Advantage Actor Critic Tutorial: minA2C | by Mike Wang | Towards Data Science | In the field of Reinforcement Learning, the Advantage Actor Critic (A2C) algorithm combines two types of Reinforcement Learning algorithms (Policy Based and Value Based) together. Policy Based agents directly learn a policy (a probability distribution of actions) mapping input states to output actions. Value Based algo... | [
{
"code": null,
"e": 970,
"s": 172,
"text": "In the field of Reinforcement Learning, the Advantage Actor Critic (A2C) algorithm combines two types of Reinforcement Learning algorithms (Policy Based and Value Based) together. Policy Based agents directly learn a policy (a probability distribution of ... |
Entity Framework - Lazy Loading | Lazy loading is the process whereby an entity or collection of entities is automatically loaded from the database the first time that a property referring to the entity/entities is accessed. Lazy loading means delaying the loading of related data, until you specifically request for it.
When using POCO entity types, laz... | [
{
"code": null,
"e": 3319,
"s": 3032,
"text": "Lazy loading is the process whereby an entity or collection of entities is automatically loaded from the database the first time that a property referring to the entity/entities is accessed. Lazy loading means delaying the loading of related data, until... |
Convert a String into a square matrix grid of characters - GeeksforGeeks | 07 Oct, 2021
Given a string of length L. The task is to convert the string into a grid.Examples:
Input : str = "haveaniceday"
Output : have
anic
eday
Explanation: k is the separator. If k is 4 then the output will be "have
anic
eday"
Input :str = "geeksforgeeks"
Output :... | [
{
"code": null,
"e": 24921,
"s": 24893,
"text": "\n07 Oct, 2021"
},
{
"code": null,
"e": 25007,
"s": 24921,
"text": "Given a string of length L. The task is to convert the string into a grid.Examples: "
},
{
"code": null,
"e": 25273,
"s": 25007,
"text": "Inpu... |
Exploratory Data Analysis in R of Global Data from GapMinder | by Hamza Bendemra, Ph.D. | Towards Data Science | In this post, I perform an Exploratory Data Analysis (EDA) on two data sets from GapMinder. This post includes the R code used (also found in this GitHub repo). In summary:
Method: Exploratory Data Analysis (EDA), Correlation, Linear Regression
Program/Platform: R/RStudio
Sources: World Health Organization, World Bank
... | [
{
"code": null,
"e": 344,
"s": 171,
"text": "In this post, I perform an Exploratory Data Analysis (EDA) on two data sets from GapMinder. This post includes the R code used (also found in this GitHub repo). In summary:"
},
{
"code": null,
"e": 416,
"s": 344,
"text": "Method: Explo... |
Container and Empty Tags in HTML - GeeksforGeeks | 06 Jun, 2021
HTML uses predefined tags that tell the browser how to display the content. Tags are nothing but some instructions that are enclosed in angle braces(i.e., <>). Tags are used in many places of the webpage but many users are often confused about some tags whether it is a container or an empty tag. They get t... | [
{
"code": null,
"e": 33113,
"s": 33085,
"text": "\n06 Jun, 2021"
},
{
"code": null,
"e": 33573,
"s": 33113,
"text": "HTML uses predefined tags that tell the browser how to display the content. Tags are nothing but some instructions that are enclosed in angle braces(i.e., <>). Tag... |
The Simplest Way to Scrape Tabular Data with Python | by Joe T. Santhanavanich | Towards Data Science | Many of you might have already read several articles about data scraping from the websites. Most of them suggested using Node.js with Cheerio library or Python with Beautiful Soup. Although it is very effective when you master the techniques, it takes your time and effort until you finish all the coding for finding an ... | [
{
"code": null,
"e": 679,
"s": 172,
"text": "Many of you might have already read several articles about data scraping from the websites. Most of them suggested using Node.js with Cheerio library or Python with Beautiful Soup. Although it is very effective when you master the techniques, it takes you... |
Number of subarrays having sum exactly equal to k - GeeksforGeeks | 23 Mar, 2022
Given an unsorted array of integers, find the number of subarrays having sum exactly equal to a given number k.
Examples:
Input : arr[] = {10, 2, -2, -20, 10},
k = -10
Output : 3
Subarrays: arr[0...3], arr[1...4], arr[3..4]
have sum exactly equal to -10.
Input : arr[] = {9, 4, 20, 3, 10, 5},
... | [
{
"code": null,
"e": 24867,
"s": 24839,
"text": "\n23 Mar, 2022"
},
{
"code": null,
"e": 24979,
"s": 24867,
"text": "Given an unsorted array of integers, find the number of subarrays having sum exactly equal to a given number k."
},
{
"code": null,
"e": 24990,
"s"... |
23 Efficient Ways of Subsetting a Pandas DataFrame | by Rukshan Pramoditha | Towards Data Science | In part 1 and part 2, we’ve learned how to inspect, describe and summarize a Pandas DataFrame. Today, we’ll learn how to extract a subset of a Pandas DataFrame. This is very useful because we often want to perform operations on subsets of our data. There are many different ways of subsetting a Pandas DataFrame. You may... | [
{
"code": null,
"e": 664,
"s": 171,
"text": "In part 1 and part 2, we’ve learned how to inspect, describe and summarize a Pandas DataFrame. Today, we’ll learn how to extract a subset of a Pandas DataFrame. This is very useful because we often want to perform operations on subsets of our data. There ... |
Difference between Batch Gradient Descent and Stochastic Gradient Descent | by Aerin Kim | Towards Data Science | Let’s take the simplest example, which is Linear Regression.
As always, we start with the cost function.
Linear Regression Recap done.
Now, what was the Gradient Descent algorithm?
In the above algorithm says, to perform the GD, we need to calculate the gradient of the cost function J. And to calculate the gradient of ... | [
{
"code": null,
"e": 233,
"s": 172,
"text": "Let’s take the simplest example, which is Linear Regression."
},
{
"code": null,
"e": 277,
"s": 233,
"text": "As always, we start with the cost function."
},
{
"code": null,
"e": 307,
"s": 277,
"text": "Linear Regre... |
Doubly linked list Insertion at given position | Practice | GeeksforGeeks | Given a doubly-linked list, a position p, and an integer x. The task is to add a new node with value x at the position just after pth node in the doubly linked list.
Example 1:
Input:
LinkedList: 2<->4<->5
p = 2, x = 6
Output: 2 4 5 6
Explanation: p = 2, and x = 6. So, 6 is
inserted after p, i.e, at position 3
(0-base... | [
{
"code": null,
"e": 404,
"s": 238,
"text": "Given a doubly-linked list, a position p, and an integer x. The task is to add a new node with value x at the position just after pth node in the doubly linked list."
},
{
"code": null,
"e": 415,
"s": 404,
"text": "Example 1:"
},
{... |
Find the unique pair combinations of an R data frame column values. | To find the unique pair combinations of an R data frame column values, we can use combn function along with unique function.
For Example, if we have a data frame called df that contains a column say x then we can find the unique pair combinations of all column values by using the command given below −
combn(unique(df$x... | [
{
"code": null,
"e": 1187,
"s": 1062,
"text": "To find the unique pair combinations of an R data frame column values, we can use combn function along with unique function."
},
{
"code": null,
"e": 1365,
"s": 1187,
"text": "For Example, if we have a data frame called df that conta... |
Java Program to display date with day name in short format | Firstly, set the format with SimpleDateFormat class
Format dateFormat = new SimpleDateFormat("EEE, dd/MM/yyyy");
Above, the “EEE” is set to display the name of the day i.e. Monday, Tuesday, Wednesday, etc.
Now, to display the date −
String res = dateFormat.format(new Date());
The following is an example −
Live Demo
im... | [
{
"code": null,
"e": 1114,
"s": 1062,
"text": "Firstly, set the format with SimpleDateFormat class"
},
{
"code": null,
"e": 1175,
"s": 1114,
"text": "Format dateFormat = new SimpleDateFormat(\"EEE, dd/MM/yyyy\");"
},
{
"code": null,
"e": 1268,
"s": 1175,
"text... |
Mid-Square hashing in C++. | The mid-square method is a method of generating pseudorandom numbers. This method was invented by John von Neumann and was described at a conference in 1949
In this technique, an initial seed value is taken and it is squared.
In this technique, an initial seed value is taken and it is squared.
Some digits from the midd... | [
{
"code": null,
"e": 1219,
"s": 1062,
"text": "The mid-square method is a method of generating pseudorandom numbers. This method was invented by John von Neumann and was described at a conference in 1949"
},
{
"code": null,
"e": 1288,
"s": 1219,
"text": "In this technique, an ini... |
PyQt5 - Quick Guide | PyQt is a GUI widgets toolkit. It is a Python interface for Qt, one of the most powerful, and popular cross-platform GUI library. PyQt was developed by RiverBank Computing Ltd. The latest version of PyQt can be downloaded from its official website − riverbankcomputing.com
PyQt API is a set of modules containing a large... | [
{
"code": null,
"e": 2236,
"s": 1963,
"text": "PyQt is a GUI widgets toolkit. It is a Python interface for Qt, one of the most powerful, and popular cross-platform GUI library. PyQt was developed by RiverBank Computing Ltd. The latest version of PyQt can be downloaded from its official website − riv... |
Could Neptune Really Replace Jupyter? | by Emmett Boudreau | Towards Data Science | Last year in October, I took a look at a Julia package called Pluto.jl. Pluto.jl is a notebook server for the Julia programming language that has a lot of unique features that set it apart from its competition. As I am an IJulia user primarily, I of course ended up comparing this solution to Jupyter Notebooks. In a lot... | [
{
"code": null,
"e": 675,
"s": 46,
"text": "Last year in October, I took a look at a Julia package called Pluto.jl. Pluto.jl is a notebook server for the Julia programming language that has a lot of unique features that set it apart from its competition. As I am an IJulia user primarily, I of course... |
Python Program to Create a class performing Calculator Operations | When it is required to create a class that performs calculator operations, object oriented method is used. Here, a class is defined, and attributes are defined. Functions are defined within the class that perform certain operations. An instance of the class is created, and the functions are used to perform calculator o... | [
{
"code": null,
"e": 1393,
"s": 1062,
"text": "When it is required to create a class that performs calculator operations, object oriented method is used. Here, a class is defined, and attributes are defined. Functions are defined within the class that perform certain operations. An instance of the c... |
iText - Drawing a Line | In this chapter, we will see how to draw a line on a PDF document using iText library.
You can create an empty PDF Document by instantiating the Document class. While instantiating this class, you need to pass a PdfDocument object as a parameter, to its constructor.
To draw a line on a PdfDocument Instantiate the PdfCa... | [
{
"code": null,
"e": 2455,
"s": 2368,
"text": "In this chapter, we will see how to draw a line on a PDF document using iText library."
},
{
"code": null,
"e": 2635,
"s": 2455,
"text": "You can create an empty PDF Document by instantiating the Document class. While instantiating t... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.