title stringlengths 3 221 | text stringlengths 17 477k | parsed listlengths 0 3.17k |
|---|---|---|
How to input a comma separated string in C++? | 23 Mar, 2021
Given an input string which is comma-separated instead of space, the task is to parse this input string in C++.First, let us understand what difference does it create if the input string is comma-separated. Taking input a whitespace-separated stringTaking input a whitespace-separated string in C++ is very ... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n23 Mar, 2021"
},
{
"code": null,
"e": 390,
"s": 52,
"text": "Given an input string which is comma-separated instead of space, the task is to parse this input string in C++.First, let us understand what difference does it create if the ... |
Quick Sort using Multi-threading | 23 Feb, 2022
QuickSort is a popular sorting technique based on divide and conquer algorithm. In this technique, an element is chosen as a pivot and the array is partitioned around it. The target of partition is, given an array and an element x of the array as a pivot, put x at its correct position in a sorted array and... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n23 Feb, 2022"
},
{
"code": null,
"e": 690,
"s": 52,
"text": "QuickSort is a popular sorting technique based on divide and conquer algorithm. In this technique, an element is chosen as a pivot and the array is partitioned around it. The... |
JavaScript Grouping operator | 08 Oct, 2021
Below is the example of the Grouping operator.
Example:
jscript
<script> function gfg() { // 3 * (2 + 3) let value1= 3 * (2 + 3); // (3 + 2) * 3 let value2= (3 + 2) * 3; document.write(value1 + "</br>" + value2); } gfg();</script>
Output:
15
15
The G... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n08 Oct, 2021"
},
{
"code": null,
"e": 77,
"s": 28,
"text": "Below is the example of the Grouping operator. "
},
{
"code": null,
"e": 88,
"s": 77,
"text": "Example: "
},
{
"code": null,
"e": 96,
"s":... |
Shell Script to Put File in a FTP Server | 09 Apr, 2021
The File Transfer Protocol also called FTP is used to transfer files from client to server and vice-versa. It mainly uses port 21 for communication.
Here we can simplify the process of uploading files using FTP. But, before we write a script, let’s look at how to get/put files onto an ftp server directly u... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n09 Apr, 2021"
},
{
"code": null,
"e": 177,
"s": 28,
"text": "The File Transfer Protocol also called FTP is used to transfer files from client to server and vice-versa. It mainly uses port 21 for communication."
},
{
"code": null... |
How to place two bootstrap cards next to each other ? | 14 May, 2020
Bootstrap is the most popular, free, and open-source HTML, CSS framework that is used to make a responsive website and make them beautiful. It provides various classes to work with that can be used to make a website beautiful. It also provides classes for creating cards.
Cards: A card is a flexible and ext... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n14 May, 2020"
},
{
"code": null,
"e": 324,
"s": 52,
"text": "Bootstrap is the most popular, free, and open-source HTML, CSS framework that is used to make a responsive website and make them beautiful. It provides various classes to wor... |
Python Programming Examples - GeeksforGeeks | 01 Jul, 2022
The following Python section contains a wide collection of Python programming examples. The examples are categorized based on the topics including List, strings, dictionary, tuple, sets, and many more. Each program example contains multiple approaches to solve the problem.
Python Programming TutorialRece... | [
{
"code": null,
"e": 43382,
"s": 43354,
"text": "\n01 Jul, 2022"
},
{
"code": null,
"e": 43658,
"s": 43384,
"text": "The following Python section contains a wide collection of Python programming examples. The examples are categorized based on the topics including List, strings, d... |
Node.js zlib.deflate() Method | 11 Oct, 2021
The zlib.deflate() method is an inbuilt application programming interface of the Zlib module which is used to compress a chunk of data.
Syntax:
zlib.deflate( buffer, options, callback )
Parameters: This method accept three parameters as mentioned above and described below:
buffer: It can be of type Buffer,... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n11 Oct, 2021"
},
{
"code": null,
"e": 164,
"s": 28,
"text": "The zlib.deflate() method is an inbuilt application programming interface of the Zlib module which is used to compress a chunk of data."
},
{
"code": null,
"e": 17... |
Throw Keyword in Scala | 23 May, 2022
The throw keyword in Scala is used to explicitly throw an exception from a method or any block of code.In scala, throw keyword is used to throw exception explicitly and catch it. It can also be used to throw custom exceptions. Exception handling in java and scala are very similar. Except that scala treats ... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n23 May, 2022"
},
{
"code": null,
"e": 641,
"s": 28,
"text": "The throw keyword in Scala is used to explicitly throw an exception from a method or any block of code.In scala, throw keyword is used to throw exception explicitly and catch ... |
How to Calculate Quantiles by Group in R? - GeeksforGeeks | 23 Dec, 2021
In this article, we will discuss how to calculate quantiles by the group in R programming language.
To obtain the required quartiles, quantile() function is used.
Syntax:
quantile( data, probs)
Parameters:
data: data whose percentiles are to be calculated
probs: percentile value
To group data, we use dplyr... | [
{
"code": null,
"e": 25242,
"s": 25214,
"text": "\n23 Dec, 2021"
},
{
"code": null,
"e": 25342,
"s": 25242,
"text": "In this article, we will discuss how to calculate quantiles by the group in R programming language."
},
{
"code": null,
"e": 25405,
"s": 25342,
... |
The Match-Case In Python 3.10 Is Not That Simple | by Christopher Tao | Towards Data Science | In my previous article, I have introduced all the major new features in Python 3.10, which has just been released 2 weeks ago. One of the most important features is the Match-Case syntax.
Some still argue that Python doesn’t need the “switch-case” syntax. Even Guido himself did not support adding this syntax in Python.... | [
{
"code": null,
"e": 360,
"s": 172,
"text": "In my previous article, I have introduced all the major new features in Python 3.10, which has just been released 2 weeks ago. One of the most important features is the Match-Case syntax."
},
{
"code": null,
"e": 688,
"s": 360,
"text":... |
Leaking Secrets in Web Applications | by Jason Ostrom | Towards Data Science | Information disclosure is a type of vulnerability in which a system inadvertently exposes confidential information. This post walks through an example of this flaw by looking at how environment variables can be misunderstood and misused in web applications. This post will revisit the best practices and conclude with ac... | [
{
"code": null,
"e": 524,
"s": 172,
"text": "Information disclosure is a type of vulnerability in which a system inadvertently exposes confidential information. This post walks through an example of this flaw by looking at how environment variables can be misunderstood and misused in web application... |
Major Kernel Functions in Support Vector Machine (SVM) - GeeksforGeeks | 07 Feb, 2022
Kernel Function is a method used to take data as input and transform it into the required form of processing data. “Kernel” is used due to a set of mathematical functions used in Support Vector Machine providing the window to manipulate the data. So, Kernel Function generally transforms the training set of... | [
{
"code": null,
"e": 24732,
"s": 24704,
"text": "\n07 Feb, 2022"
},
{
"code": null,
"e": 25452,
"s": 24732,
"text": "Kernel Function is a method used to take data as input and transform it into the required form of processing data. “Kernel” is used due to a set of mathematical fu... |
ES6 - Loops | At times, certain instructions require repeated execution. Loops are an ideal way to do the same. A loop represents a set of instructions that must be repeated. In a loop’s context, a repetition is termed as an iteration.
The following figure illustrates the classification of loops −
A loop whose number of iterations a... | [
{
"code": null,
"e": 2499,
"s": 2277,
"text": "At times, certain instructions require repeated execution. Loops are an ideal way to do the same. A loop represents a set of instructions that must be repeated. In a loop’s context, a repetition is termed as an iteration."
},
{
"code": null,
... |
How to sort a big array with many repetitions? - GeeksforGeeks | 02 Mar, 2022
Consider a big array where elements are from a small set and in any range, i.e. there are many repetitions. How to efficiently sort the array?
Example:
Input: arr[] = {100, 12, 100, 1, 1, 12, 100, 1, 12, 100, 1, 1}
Output: arr[] = {1, 1, 1, 1, 1, 12, 12, 12, 100, 100, 100, 100}
We strongly recommend yo... | [
{
"code": null,
"e": 24076,
"s": 24048,
"text": "\n02 Mar, 2022"
},
{
"code": null,
"e": 24221,
"s": 24076,
"text": "Consider a big array where elements are from a small set and in any range, i.e. there are many repetitions. How to efficiently sort the array? "
},
{
"cod... |
CSS - Paddings | The padding property allows you to specify how much space should appear between the content of an element and its border −
The value of this attribute should be either a length, a percentage, or the word inherit. If the value is inherit, it will have the same padding as its parent element. If a percentage is used, the ... | [
{
"code": null,
"e": 2749,
"s": 2626,
"text": "The padding property allows you to specify how much space should appear between the content of an element and its border −"
},
{
"code": null,
"e": 2983,
"s": 2749,
"text": "The value of this attribute should be either a length, a pe... |
Review: CRF-RNN — Conditional Random Fields as Recurrent Neural Networks (Semantic Segmentation) | by Sik-Ho Tsang | Towards Data Science | In this story, CRF-RNN, Conditional Random Fields as Recurrent Neural Networks, by University of Oxford, Stanford University, and Baidu, is reviewed. CRF is one of the most successful graphical models in computer vision. It is found that Fully Convolutional Network (FCN) outputs a very coarse segmentation results. Thus... | [
{
"code": null,
"e": 867,
"s": 171,
"text": "In this story, CRF-RNN, Conditional Random Fields as Recurrent Neural Networks, by University of Oxford, Stanford University, and Baidu, is reviewed. CRF is one of the most successful graphical models in computer vision. It is found that Fully Convolution... |
RESTful Web Services - Methods | As we have discussed so far that RESTful web service makes heavy uses of HTTP verbs to determine the operation to be carried out on the specified resource(s). Following table states the examples of common use of HTTP Verbs.
Here are important points to be considered:
GET operations are read only and are safe.
GET opera... | [
{
"code": null,
"e": 2079,
"s": 1855,
"text": "As we have discussed so far that RESTful web service makes heavy uses of HTTP verbs to determine the operation to be carried out on the specified resource(s). Following table states the examples of common use of HTTP Verbs."
},
{
"code": null,
... |
How can a particular group of test cases get executed in TestNG? | We can run a particular set of test cases by including a group of test cases
in the execution.
Testng xml files with groups.
<?xml version = "1.0" encoding = "UTF-8"?>
<!DOCTYPE suite SYSTEM "http://testng.org/testng-1.0.dtd" >
<suite name = "Tutorialspoint Test">
<test name = "Regression Cycle 1">
<groups>
... | [
{
"code": null,
"e": 1157,
"s": 1062,
"text": "We can run a particular set of test cases by including a group of test cases\nin the execution."
},
{
"code": null,
"e": 1187,
"s": 1157,
"text": "Testng xml files with groups."
},
{
"code": null,
"e": 1556,
"s": 1187... |
Organizing machine learning projects | by Jack Leitch | Towards Data Science | I just want to start with a brief disclaimer. This is how I personally organize my projects and it’s what works for me, that doesn't necessarily mean it will work for you. However, there is definitely something to be said about how good organization streamlines your workflow. Building my ML framework the way I do allow... | [
{
"code": null,
"e": 615,
"s": 172,
"text": "I just want to start with a brief disclaimer. This is how I personally organize my projects and it’s what works for me, that doesn't necessarily mean it will work for you. However, there is definitely something to be said about how good organization strea... |
Normalize A Column In Pandas - GeeksforGeeks | 11 Dec, 2020
In this article, we will learn how to normalize a column in Pandas. Let’s discuss some concepts first :
Pandas: Pandas is an open-source library that’s built on top of the NumPy library. It is a Python package that provides various data structures and operations for manipulating numerical data and statisti... | [
{
"code": null,
"e": 24874,
"s": 24846,
"text": "\n11 Dec, 2020"
},
{
"code": null,
"e": 24978,
"s": 24874,
"text": "In this article, we will learn how to normalize a column in Pandas. Let’s discuss some concepts first :"
},
{
"code": null,
"e": 25316,
"s": 24978,... |
Resolve java.sql.SQLException: No suitable driver found for localhost test? | You will get this type of exception whenever your JDBC URL is not accepted by any of the loaded JDBC drivers by the method acceptsURL. You need to mention the MySQL JDBC driver which is as follows −
The MySQL JDBC url is as follows −
jdbc:mysql://localhost:3306/test?useSSL=false
The prototype of acceptsURL is as follow... | [
{
"code": null,
"e": 1261,
"s": 1062,
"text": "You will get this type of exception whenever your JDBC URL is not accepted by any of the loaded JDBC drivers by the method acceptsURL. You need to mention the MySQL JDBC driver which is as follows −"
},
{
"code": null,
"e": 1296,
"s": 12... |
Search insert position of K in a sorted array | Practice | GeeksforGeeks | Given a sorted array Arr[](0-index based) consisting of N distinct integers and an integer k, the task is to find the index of k, if its present in the array Arr[]. Otherwise, find the index where k must be inserted to keep the array sorted.
Example 1:
Input:
N = 4
Arr = {1, 3, 5, 6}
k = 5
Output: 2
Explaination: Sinc... | [
{
"code": null,
"e": 480,
"s": 238,
"text": "Given a sorted array Arr[](0-index based) consisting of N distinct integers and an integer k, the task is to find the index of k, if its present in the array Arr[]. Otherwise, find the index where k must be inserted to keep the array sorted."
},
{
... |
C Program to count trailing and leading zeros in a binary number | To begin with, let us understand what are trailing zeros in a binary number.
The position of zeros after first one from the least significant bit (LSB) is called as trailing zeros in binary number.
104 is decimal number
Binary number of 104 is: (MSB) 1101000(LSB)
Here,
MSB refers to Most Significant Bit.
LSB refers to ... | [
{
"code": null,
"e": 1139,
"s": 1062,
"text": "To begin with, let us understand what are trailing zeros in a binary number."
},
{
"code": null,
"e": 1260,
"s": 1139,
"text": "The position of zeros after first one from the least significant bit (LSB) is called as trailing zeros in... |
Custom list split in Python | Data analytics throws complex scenarios where the data need to be wrangled to moved around. In this context let’s see how we can take a big list and split it into many sublists as per the requirement. In this article we will explore the approaches to achieve this.
In this approach we use list dicing to get the elements... | [
{
"code": null,
"e": 1327,
"s": 1062,
"text": "Data analytics throws complex scenarios where the data need to be wrangled to moved around. In this context let’s see how we can take a big list and split it into many sublists as per the requirement. In this article we will explore the approaches to ac... |
When to use yield instead of return in Python? | In short, whenever control reach the return statement in your program, the execution of the program is terminated and the remaining statements will not executed.
However, in case of yield, whenever control reach the yield statement in your program, the execution of your program is paused and later we can continue other... | [
{
"code": null,
"e": 1224,
"s": 1062,
"text": "In short, whenever control reach the return statement in your program, the execution of the program is terminated and the remaining statements will not executed."
},
{
"code": null,
"e": 1407,
"s": 1224,
"text": "However, in case of ... |
How to get the square root of 2 in JavaScript? | To get the square root of 2, use the JavaScript Math SQRT2 property. It returns the square root of 2 which is approximately 1.414.
You can try to run the following code to get the square root of 2 in JavaScript −
<html>
<head>
<title>JavaScript Math SQRT2 Property</title>
</head>
<body>
<script>
... | [
{
"code": null,
"e": 1193,
"s": 1062,
"text": "To get the square root of 2, use the JavaScript Math SQRT2 property. It returns the square root of 2 which is approximately 1.414."
},
{
"code": null,
"e": 1275,
"s": 1193,
"text": "You can try to run the following code to get the sq... |
GANs vs. Autoencoders: Comparison of Deep Generative Models | by Matthew Stewart, PhD Researcher | Towards Data Science | “Generative Adversarial Networks is the most interesting idea in the last 10 years in Machine Learning.” — Yann LeCun, Director of AI Research at Facebook AI
Part 1 of this tutorial can be found here:
towardsdatascience.com
Part 2of this tutorial can be found here:
towardsdatascience.com
These articles are based on lec... | [
{
"code": null,
"e": 330,
"s": 172,
"text": "“Generative Adversarial Networks is the most interesting idea in the last 10 years in Machine Learning.” — Yann LeCun, Director of AI Research at Facebook AI"
},
{
"code": null,
"e": 373,
"s": 330,
"text": "Part 1 of this tutorial can ... |
fread() function in C++ program | Given the task is to show the working of fread() in C++. In this article we will also look into the different parameters which are passed to fread() and what this function returns.
fread() is an inbuilt function of C++ which reads a block of data from the stream. This function counts the number of objects each with the... | [
{
"code": null,
"e": 1243,
"s": 1062,
"text": "Given the task is to show the working of fread() in C++. In this article we will also look into the different parameters which are passed to fread() and what this function returns."
},
{
"code": null,
"e": 1580,
"s": 1243,
"text": "f... |
MySQL new user access denied even after giving privileges? | After creating a user and giving all privileges to the user, you need to FLUSH PRIVILEGES to set up and want the new settings to work correctly.
The syntax is as follows −
FLUSH PRIVILEGES;
Here is the query to create a new user which has the name ‘Bob’ in my case. The query to create a new user is as follows −
mysql> ... | [
{
"code": null,
"e": 1207,
"s": 1062,
"text": "After creating a user and giving all privileges to the user, you need to FLUSH PRIVILEGES to set up and want the new settings to work correctly."
},
{
"code": null,
"e": 1234,
"s": 1207,
"text": "The syntax is as follows −"
},
{
... |
C program to print number series without using any loop | In this problem, we are given two numbers N and K. Our task is to create a program that will print number series without using any loop.
The series that is to be printed will start from n and will be subtracted by k till it becomes zero or negative. After that, we will start to add k to it till it becomes n again. If t... | [
{
"code": null,
"e": 1199,
"s": 1062,
"text": "In this problem, we are given two numbers N and K. Our task is to create a program that will print number series without using any loop."
},
{
"code": null,
"e": 1426,
"s": 1199,
"text": "The series that is to be printed will start f... |
border-info class in Bootstrap 4 | Use the border-info class in Bootstrap, to set a border that indicates information. Set the class as if you use any other class in Bootstrap:
<div class="one border border-info">
Details
</div>
Above, we added border-info class. Another class, “one” is used to give shape to the div element −
.one {
width: 180px;
... | [
{
"code": null,
"e": 1204,
"s": 1062,
"text": "Use the border-info class in Bootstrap, to set a border that indicates information. Set the class as if you use any other class in Bootstrap:"
},
{
"code": null,
"e": 1258,
"s": 1204,
"text": "<div class=\"one border border-info\">\n... |
MySQL - SHOW CREATE TABLE Statement | This query shows/displays the statement used to create the specified table. This displays the create statements along with the clauses.
Following is the syntax of the SHOW CREATE TABLE statement −
SHOW CREATE TABLE [IF NOT EXISTS] table_name
Where, table_name is the name of the table.
Suppose we have created a databas... | [
{
"code": null,
"e": 2469,
"s": 2333,
"text": "This query shows/displays the statement used to create the specified table. This displays the create statements along with the clauses."
},
{
"code": null,
"e": 2530,
"s": 2469,
"text": "Following is the syntax of the SHOW CREATE TAB... |
Matplotlib.pyplot.xticks() in Python - GeeksforGeeks | 12 Apr, 2020
Matplotlib is a library in Python and it is numerical – mathematical extension for NumPy library. Pyplot is a state-based interface to a Matplotlib module which provides a MATLAB-like interface.
The annotate() function in pyplot module of matplotlib library is used to get and set the current tick locations... | [
{
"code": null,
"e": 26181,
"s": 26153,
"text": "\n12 Apr, 2020"
},
{
"code": null,
"e": 26376,
"s": 26181,
"text": "Matplotlib is a library in Python and it is numerical – mathematical extension for NumPy library. Pyplot is a state-based interface to a Matplotlib module which pr... |
Rearrange and update array elements as specified by the given queries - GeeksforGeeks | 22 Jun, 2021
Given an array arr[] of size N and queries Q[][], the task is to perform the following types of queries on the given array. 0: Left shift the array by one position.
1: Right shift the array by one position.
2 X Y: Update the value of arr[X] = Y.
3 X: Print arr[X].
Example:
Input: arr[]={1, 2, 3, 4, 5}, Q[]... | [
{
"code": null,
"e": 26349,
"s": 26321,
"text": "\n22 Jun, 2021"
},
{
"code": null,
"e": 26514,
"s": 26349,
"text": "Given an array arr[] of size N and queries Q[][], the task is to perform the following types of queries on the given array. 0: Left shift the array by one position... |
SQL - SELECT from Multiple Tables with MS SQL Server - GeeksforGeeks | 14 Jun, 2021
In SQL we can retrieve data from multiple tables also by using SELECT with multiple tables which actually results in CROSS JOIN of all the tables. The resulting table occurring from CROSS JOIN of two contains all the row combinations of the 2nd table which is a Cartesian product of tables. If we consider t... | [
{
"code": null,
"e": 25513,
"s": 25485,
"text": "\n14 Jun, 2021"
},
{
"code": null,
"e": 25969,
"s": 25513,
"text": "In SQL we can retrieve data from multiple tables also by using SELECT with multiple tables which actually results in CROSS JOIN of all the tables. The resulting ta... |
How to Use Dist Function in R? - GeeksforGeeks | 24 Dec, 2021
In this article, we will see how to use dist() function in R programming language.
R provides an inbuilt dist() function using which we can calculate six different kinds of distances between each unique pair of vectors in a two-dimensional vector. dist() method accepts a numeric matrix as an argument and... | [
{
"code": null,
"e": 26487,
"s": 26459,
"text": "\n24 Dec, 2021"
},
{
"code": null,
"e": 26572,
"s": 26487,
"text": "In this article, we will see how to use dist() function in R programming language. "
},
{
"code": null,
"e": 27019,
"s": 26572,
"text": "R pro... |
Find the sum of all multiples of 2 and 5 below N - GeeksforGeeks | 09 Apr, 2021
Given a number N. The task is to find the sum of all multiples of 2 and 5 below N ( N may be up to 10^10).
Examples:
Input : N = 10
Output : 25
Explanation : 2 + 4 + 6 + 8 + 5
Input : N = 20
Output : 110
Approach : We know that multiples of 2 form an AP as:
2, 4, 6, 8, 10, 12, 14....(1)
Similarly, m... | [
{
"code": null,
"e": 26538,
"s": 26510,
"text": "\n09 Apr, 2021"
},
{
"code": null,
"e": 26646,
"s": 26538,
"text": "Given a number N. The task is to find the sum of all multiples of 2 and 5 below N ( N may be up to 10^10). "
},
{
"code": null,
"e": 26658,
"s": 26... |
BeautifulSoup - Modifying the tree - GeeksforGeeks | 07 Sep, 2021
Prerequisites: BeautifulSoup
Beautifulsoup is a Python library used for web scraping. This powerful python tool can also be used to modify html webpages. This article depicts how beautifulsoup can be employed to modify the parse tree. BeautifulSoup is used to search the parse tree and allow you to modify t... | [
{
"code": null,
"e": 25537,
"s": 25509,
"text": "\n07 Sep, 2021"
},
{
"code": null,
"e": 25566,
"s": 25537,
"text": "Prerequisites: BeautifulSoup"
},
{
"code": null,
"e": 25936,
"s": 25566,
"text": "Beautifulsoup is a Python library used for web scraping. This... |
Pretty print Linked List in Python - GeeksforGeeks | 09 May, 2022
Creating custom data types can be tricky, especially when you want to use it like any other data type. Linked List can be thought of as an example of a custom data type. In other languages, if you want to print the linked list, you would define a separate print function, something like pprint but it looks ... | [
{
"code": null,
"e": 25561,
"s": 25533,
"text": "\n09 May, 2022"
},
{
"code": null,
"e": 26058,
"s": 25561,
"text": "Creating custom data types can be tricky, especially when you want to use it like any other data type. Linked List can be thought of as an example of a custom data... |
PLSQL | RPAD Function - GeeksforGeeks | 25 Sep, 2019
The PLSQL RPAD function is used for padding the right-side of a string with a specific set of characters. a prerequisite for this is that string shouldn’t be NULL. The RPAD function in PLSQL is useful for formatting the output of a query. The RPAD function accepts three parameters which are input_string, p... | [
{
"code": null,
"e": 25513,
"s": 25485,
"text": "\n25 Sep, 2019"
},
{
"code": null,
"e": 25853,
"s": 25513,
"text": "The PLSQL RPAD function is used for padding the right-side of a string with a specific set of characters. a prerequisite for this is that string shouldn’t be NULL.... |
Python | Introduction to Matplotlib - GeeksforGeeks | 14 May, 2018
Matplotlib is an amazing visualization library in Python for 2D plots of arrays. Matplotlib is a multi-platform data visualization library built on NumPy arrays and designed to work with the broader SciPy stack. It was introduced by John Hunter in the year 2002.
One of the greatest benefits of visualizatio... | [
{
"code": null,
"e": 31571,
"s": 31543,
"text": "\n14 May, 2018"
},
{
"code": null,
"e": 31834,
"s": 31571,
"text": "Matplotlib is an amazing visualization library in Python for 2D plots of arrays. Matplotlib is a multi-platform data visualization library built on NumPy arrays an... |
Remove Vertical or Horizontal Gridlines in ggplot2 Plot in R - GeeksforGeeks | 14 Sep, 2021
In this article, we are going to learn how to remove Vertical or Horizontal Gridlines in the background of a ggplot2 Plot in R programming language.
To understand how to remove Vertical or Horizontal Gridlines, first import all the required libraries to the working space and create a dataframe. Let us firs... | [
{
"code": null,
"e": 26487,
"s": 26459,
"text": "\n14 Sep, 2021"
},
{
"code": null,
"e": 26636,
"s": 26487,
"text": "In this article, we are going to learn how to remove Vertical or Horizontal Gridlines in the background of a ggplot2 Plot in R programming language."
},
{
... |
java.util.Currency methods with example - GeeksforGeeks | 25 Nov, 2016
This class represents currency. Here, currency is identified by their ISO 4217 currency codes. The purpose of ISO 4217 is to establish internationally recognized codes for the representation of currencies. Currencies can be represented in the code in two ways: a three-letter alphabetic code and a three-dig... | [
{
"code": null,
"e": 25740,
"s": 25712,
"text": "\n25 Nov, 2016"
},
{
"code": null,
"e": 26064,
"s": 25740,
"text": "This class represents currency. Here, currency is identified by their ISO 4217 currency codes. The purpose of ISO 4217 is to establish internationally recognized c... |
Pure CSS Dropdown - GeeksforGeeks | 27 Sep, 2021
Pure CSS is a CSS framework. It is a free and open-source tool collection for creating responsive websites and web applications.
Pure CSS is developed by Yahoo and is used for creating faster, beautiful, and responsive websites. It can be used as an alternative to Bootstrap. Dropdowns are one of the most ... | [
{
"code": null,
"e": 26591,
"s": 26563,
"text": "\n27 Sep, 2021"
},
{
"code": null,
"e": 26721,
"s": 26591,
"text": "Pure CSS is a CSS framework. It is a free and open-source tool collection for creating responsive websites and web applications. "
},
{
"code": null,
"... |
Construct Complete Binary Tree from its Linked List Representation - GeeksforGeeks | 13 Apr, 2022
Given Linked List Representation of Complete Binary Tree, construct the Binary tree. A complete binary tree can be represented in an array in the following approach.If root node is stored at index i, its left, and right children are stored at indices 2*i+1, 2*i+2 respectively. Suppose tree is represented b... | [
{
"code": null,
"e": 39005,
"s": 38977,
"text": "\n13 Apr, 2022"
},
{
"code": null,
"e": 39589,
"s": 39005,
"text": "Given Linked List Representation of Complete Binary Tree, construct the Binary tree. A complete binary tree can be represented in an array in the following approac... |
Find the count of numbers that can be formed using digits 3, 4 only and having length at max N. - GeeksforGeeks | 25 Mar, 2021
Given a number N. Find the count of such numbers that can be formed using digits 3 and 4 only and having length at max N.Examples:
Input : N = 2
Output : 6
Explanation : 3, 4, 33, 34, 43, 44
are numbers having length 2 and digits 3 and 4 only.
Input : N = 1
Output : 2
Explanation : 3, 4 are the only su... | [
{
"code": null,
"e": 26571,
"s": 26543,
"text": "\n25 Mar, 2021"
},
{
"code": null,
"e": 26704,
"s": 26571,
"text": "Given a number N. Find the count of such numbers that can be formed using digits 3 and 4 only and having length at max N.Examples: "
},
{
"code": null,
... |
Logger throwing() method in Java with Examples - GeeksforGeeks | 28 Mar, 2019
throwing(String sourceClass, String sourceMethod, Throwable thrown) method is used to Log throwing an exception.In many scenario method is closed by throwing an exception then this is a very helpful method to log that a method is terminating by throwing an exception. The logging is done using the FINER lev... | [
{
"code": null,
"e": 25225,
"s": 25197,
"text": "\n28 Mar, 2019"
},
{
"code": null,
"e": 25732,
"s": 25225,
"text": "throwing(String sourceClass, String sourceMethod, Throwable thrown) method is used to Log throwing an exception.In many scenario method is closed by throwing an ex... |
Fabric.js easeInOutCubic() Method - GeeksforGeeks | 29 Jan, 2021
In games or animations, there are many moving objects which can move them from point A to B in a linear fashion, but after applying an easing, or easing function, it can make it look more natural. An easing function says an animation of how to progress. In this way, a straight motion can take an interestin... | [
{
"code": null,
"e": 26545,
"s": 26517,
"text": "\n29 Jan, 2021"
},
{
"code": null,
"e": 26861,
"s": 26545,
"text": "In games or animations, there are many moving objects which can move them from point A to B in a linear fashion, but after applying an easing, or easing function, ... |
Find the longest string that can be made up of other strings from the array - GeeksforGeeks | 16 Mar, 2022
Given an array of strings arr[], the task is to find the largest string in the array which is made up of the other strings from the array after concatenating one after another. If no such string exists then print -1.Examples:
Input: arr[] = {“geeks”, “for”, “geeksfor”, “geeksforgeeks”} Output: geeksforge... | [
{
"code": null,
"e": 26327,
"s": 26299,
"text": "\n16 Mar, 2022"
},
{
"code": null,
"e": 26555,
"s": 26327,
"text": "Given an array of strings arr[], the task is to find the largest string in the array which is made up of the other strings from the array after concatenating one a... |
What is currying in JavaScript? | Currying is a technique of evaluating function with multiple arguments, into sequence of functions with single argument.In other words, when a function, instead of taking all arguments at one time, takes the first one and return a new function that takes the second one and returns a new function which takes the third o... | [
{
"code": null,
"e": 1441,
"s": 1062,
"text": "Currying is a technique of evaluating function with multiple arguments, into sequence of functions with single argument.In other words, when a function, instead of taking all arguments at one time, takes the first one and return a new function that take... |
Entity Framework - Database Operations | In the previous chapters, you learned three different ways of defining an entity data model.
Two of them, Database First and Model First, depended on the Entity Framework designer combined with code generation.
Two of them, Database First and Model First, depended on the Entity Framework designer combined with code gen... | [
{
"code": null,
"e": 3125,
"s": 3032,
"text": "In the previous chapters, you learned three different ways of defining an entity data model."
},
{
"code": null,
"e": 3243,
"s": 3125,
"text": "Two of them, Database First and Model First, depended on the Entity Framework designer co... |
Python For Data Science —Bootstrap For Plotly Dash Interactive Visualizations | by Nicholas Leong | Towards Data Science | Greetings data practitioners.
Welcome to 2021, where the new trend is all around Machine Learning.Most employers, even data scientists themselves, are drowning in the thought of deploying that new Machine Learning model that predicts literally everything for them.
If you have ever been in the field, you would understan... | [
{
"code": null,
"e": 202,
"s": 172,
"text": "Greetings data practitioners."
},
{
"code": null,
"e": 437,
"s": 202,
"text": "Welcome to 2021, where the new trend is all around Machine Learning.Most employers, even data scientists themselves, are drowning in the thought of deployin... |
Scanner findInLine() method in Java with Examples - GeeksforGeeks | 10 Oct, 2018
The findInLine(Pattern pattern) method of java.util.Scanner class tries to find the next occurrence of the specified pattern ignoring delimiters. If the pattern is found before the next line separator, the scanner advances past the input that matched and returns the string that matched the pattern. If no s... | [
{
"code": null,
"e": 25347,
"s": 25319,
"text": "\n10 Oct, 2018"
},
{
"code": null,
"e": 25785,
"s": 25347,
"text": "The findInLine(Pattern pattern) method of java.util.Scanner class tries to find the next occurrence of the specified pattern ignoring delimiters. If the pattern is... |
Pattern compile() method in Java with Examples | The pattern class of the java.regex package is a compiled representation of a regular expression.
The compile() method of this class accepts a string value representing a regular expression and returns a Pattern object.
import java.util.Scanner;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
public cla... | [
{
"code": null,
"e": 1160,
"s": 1062,
"text": "The pattern class of the java.regex package is a compiled representation of a regular expression."
},
{
"code": null,
"e": 1282,
"s": 1160,
"text": "The compile() method of this class accepts a string value representing a regular exp... |
Angular PrimeNG Menubar Component - GeeksforGeeks | 08 Sep, 2021
Angular PrimeNG is an open-source framework with a rich set of native Angular UI components that are used for great styling and this framework is used to make responsive websites with very much ease. In this article, we will know how to use the Menubar component in Angular PrimeNG. We will also learn about... | [
{
"code": null,
"e": 26354,
"s": 26326,
"text": "\n08 Sep, 2021"
},
{
"code": null,
"e": 26743,
"s": 26354,
"text": "Angular PrimeNG is an open-source framework with a rich set of native Angular UI components that are used for great styling and this framework is used to make resp... |
Find whether it is possible to finish all tasks or not from given dependencies | 01 Jul, 2022
There are a total of n tasks you have to pick, labelled from 0 to n-1. Some tasks may have prerequisites, for example to pick task 0 you have to first pick task 1, which is expressed as a pair: [0, 1]Given the total number of tasks and a list of prerequisite pairs, is it possible for you to finish all task... | [
{
"code": null,
"e": 54,
"s": 26,
"text": "\n01 Jul, 2022"
},
{
"code": null,
"e": 374,
"s": 54,
"text": "There are a total of n tasks you have to pick, labelled from 0 to n-1. Some tasks may have prerequisites, for example to pick task 0 you have to first pick task 1, which is e... |
Matplotlib.figure.Figure.subplots() in Python | 03 May, 2020
Matplotlib is a library in Python and it is numerical – mathematical extension for NumPy library. The figure module provides the top-level Artist, the Figure, which contains all the plot elements. This module is used to control the default spacing of the subplots and top level container for all plot elemen... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n03 May, 2020"
},
{
"code": null,
"e": 339,
"s": 28,
"text": "Matplotlib is a library in Python and it is numerical – mathematical extension for NumPy library. The figure module provides the top-level Artist, the Figure, which contains a... |
JavaScript SyntaxError – Unexpected token | 31 Jul, 2020
This JavaScript exceptions unexpected token occur if a specific language construct was expected, but anything else is typed mistakenly. This could be a simple typing mistake.
Message:
SyntaxError: expected expression, got "x"
SyntaxError: expected property name, got "x"
SyntaxError: expected target, got "... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n31 Jul, 2020"
},
{
"code": null,
"e": 203,
"s": 28,
"text": "This JavaScript exceptions unexpected token occur if a specific language construct was expected, but anything else is typed mistakenly. This could be a simple typing mistake."... |
Python | Pandas Series.transpose() | 05 Feb, 2019
Pandas series is a One-dimensional ndarray with axis labels. The labels need not be unique but must be a hashable type. The object supports both integer- and label-based indexing and provides a host of methods for performing operations involving the index.
Pandas Series.transpose() function return the tran... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n05 Feb, 2019"
},
{
"code": null,
"e": 285,
"s": 28,
"text": "Pandas series is a One-dimensional ndarray with axis labels. The labels need not be unique but must be a hashable type. The object supports both integer- and label-based index... |
Indexing Multi-dimensional arrays in Python using NumPy | 05 Aug, 2021
NumPy is a general-purpose array-processing package. It provides a high-performance multidimensional array object and tools for working with these arrays. It is the fundamental package for scientific computing with Python. It contains various features.Note: For more information, refer to Python NumpyExampl... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n05 Aug, 2021"
},
{
"code": null,
"e": 364,
"s": 52,
"text": "NumPy is a general-purpose array-processing package. It provides a high-performance multidimensional array object and tools for working with these arrays. It is the fundament... |
Python | Pandas Index.intersection() | 17 Dec, 2018
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 Index.intersection() function form the intersection of two Index objects. This returns... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n17 Dec, 2018"
},
{
"code": null,
"e": 242,
"s": 28,
"text": "Python is a great language for doing data analysis, primarily because of the fantastic ecosystem of data-centric python packages. Pandas is one of those packages and makes imp... |
Unbounded Knapsack (Repetition of items allowed) | Set 2 | 21 Jul, 2021
Given an integer W, arrays val[] and wt[], where val[i] and wt[i] are the values and weights of the ith item, the task is to calculate the maximum value that can be obtained using weights not exceeding W.Note: Each weight can be included multiple times.
Examples:
Input: W = 4, val[] = {6, 18}, wt[] = {2, 3... | [
{
"code": null,
"e": 54,
"s": 26,
"text": "\n21 Jul, 2021"
},
{
"code": null,
"e": 308,
"s": 54,
"text": "Given an integer W, arrays val[] and wt[], where val[i] and wt[i] are the values and weights of the ith item, the task is to calculate the maximum value that can be obtained ... |
Enumeration vs Iterator vs ListIterator in Java | 02 Sep, 2020
Enumeration is an interface. It is used in the collection framework in java to retrieve the elements one by one. Enumeration is a legacy interface that is applicable only for legacy classes like Vector, HashTable, Stack, etc. It provides a single direction iteration. By using enumeration, we can perform on... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n02 Sep, 2020"
},
{
"code": null,
"e": 418,
"s": 52,
"text": "Enumeration is an interface. It is used in the collection framework in java to retrieve the elements one by one. Enumeration is a legacy interface that is applicable only for... |
Some useful C++ tricks for beginners in Competitive Programming | 25 May, 2022
Here are some of the basic C++ tricks that every beginner in Competitive Programming should follow for increased speed. However, competitive programming can only be mastered with time and lots of practice. These tricks will just help you to save a little time during the contests which sometimes matters a l... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n25 May, 2022"
},
{
"code": null,
"e": 364,
"s": 52,
"text": "Here are some of the basic C++ tricks that every beginner in Competitive Programming should follow for increased speed. However, competitive programming can only be mastered ... |
React-Bootstrap Modal Component | 30 Apr, 2021
React-Bootstrap is a front-end framework that was designed keeping react in mind. Modal Component provides a way to add dialogs to our website for user notifications, displaying information, or to display completely custom information to the user. We can use the following approach in ReactJS to use the rea... | [
{
"code": null,
"e": 53,
"s": 25,
"text": "\n30 Apr, 2021"
},
{
"code": null,
"e": 390,
"s": 53,
"text": "React-Bootstrap is a front-end framework that was designed keeping react in mind. Modal Component provides a way to add dialogs to our website for user notifications, display... |
Convert ArrayList to Vector in Java | 10 Feb, 2022
There are several ways to convert ArrayList to Vector. We can use a vector constructor for converting ArrayList to vector. We can read ArrayList elements one by one and add them in vector.
Approach 1: (Using Vector Constructor)
Create an ArrayList.
Add elements in ArrayList.
Create a vector and pass the Ar... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n10 Feb, 2022"
},
{
"code": null,
"e": 217,
"s": 28,
"text": "There are several ways to convert ArrayList to Vector. We can use a vector constructor for converting ArrayList to vector. We can read ArrayList elements one by one and add th... |
JavaScript | Adding days in milliseconds to Date object | 23 May, 2019
Given a date, the task is to add days in milliseconds to it. To add days in milliseconds to date object in JavaScript, some methods are used which are listed below:
JavaScript getMilliseconds() Method: This method returns the milliseconds (from 0 to 999) of the provided date and time.Syntax:Date.getMillise... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n23 May, 2019"
},
{
"code": null,
"e": 193,
"s": 28,
"text": "Given a date, the task is to add days in milliseconds to it. To add days in milliseconds to date object in JavaScript, some methods are used which are listed below:"
},
{
... |
Replace NaN with Blank or Empty String in Pandas? | 22 Nov, 2021
In this article, we will discuss how to replace NaN with Blank or Empty string in Pandas.
For this, we will create dataframe using pandas dataframe() object.
Python3
# import pandas moduleimport pandas as pd # import numpy moduleimport numpy as np # create dataframe with 3 columnsdata = pd.DataFrame({ ... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n22 Nov, 2021"
},
{
"code": null,
"e": 118,
"s": 28,
"text": "In this article, we will discuss how to replace NaN with Blank or Empty string in Pandas."
},
{
"code": null,
"e": 186,
"s": 118,
"text": "For this, we wil... |
Python | Indices list of matching element from other list | 10 Oct, 2019
Sometimes, while working with Python list, we have a problem in which we have to search for a element in list. But this can be extended to a list and need to find the exact places where elements occur in other list. Let’s discuss certain ways in which this task can be performed.
Method #1 : Using loop + co... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n10 Oct, 2019"
},
{
"code": null,
"e": 308,
"s": 28,
"text": "Sometimes, while working with Python list, we have a problem in which we have to search for a element in list. But this can be extended to a list and need to find the exact pl... |
How to Make Histograms with Density Plots with Seaborn histplot? | 29 Oct, 2021
Histograms are visualization tools that represent the distribution of a set of continuous data. In a histogram, the data is divided into a set of intervals or bins (usually on the x-axis) and the count of data points that fall into each bin corresponding to the height of the bar above that bin. These bins ... | [
{
"code": null,
"e": 54,
"s": 26,
"text": "\n29 Oct, 2021"
},
{
"code": null,
"e": 429,
"s": 54,
"text": "Histograms are visualization tools that represent the distribution of a set of continuous data. In a histogram, the data is divided into a set of intervals or bins (usually o... |
Sort list of tuples by specific ordering in Python | When it is required to sort the list of tuples in a specific order, the 'sorted' method can be used.
The 'sorted' method is used to sort the elements of a list.
A list can be used to store heterogeneous values (i.e data of any data type like integer, floating point, strings, and so on). A list of tuple basically contai... | [
{
"code": null,
"e": 1288,
"s": 1187,
"text": "When it is required to sort the list of tuples in a specific order, the 'sorted' method can be used."
},
{
"code": null,
"e": 1348,
"s": 1288,
"text": "The 'sorted' method is used to sort the elements of a list."
},
{
"code":... |
SAP Labs Interview Experience | 22 Oct, 2020
Online Assessment Round: 15 MCQ questions and 2 coding questions were asked. In MCQ, questions were from Aptitude, DS, CN, and DBMS.
Coding 1: Count the distinct pairs with a difference equal to k.
Coding 2: I don’t remember exactly this.
To solve coding 1, either use a sorting algorithm or just use two-lo... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n22 Oct, 2020"
},
{
"code": null,
"e": 161,
"s": 28,
"text": "Online Assessment Round: 15 MCQ questions and 2 coding questions were asked. In MCQ, questions were from Aptitude, DS, CN, and DBMS."
},
{
"code": null,
"e": 226,
... |
Readers-Writers Problem | Writers Preference Solution | 31 Jan, 2022
Prerequisites — Readers-Writers Problem | Set 1 (Introduction and Readers Preference Solution), Semaphores in Process Synchronization
In Process-synchronization, there is a very classical synchronization problem named as Readers-writers problem. The problem has several sub-problems or variations all involv... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n31 Jan, 2022"
},
{
"code": null,
"e": 186,
"s": 52,
"text": "Prerequisites — Readers-Writers Problem | Set 1 (Introduction and Readers Preference Solution), Semaphores in Process Synchronization"
},
{
"code": null,
"e": 500... |
Print a Formatted string in R Programming – sprintf() Function | 03 Jun, 2020
sprintf() function in R Language uses Format provided by the user to return the formatted string with the use of the values in the list.
Syntax: sprintf(format, values)
Parameter:format: Format of printing the valuesvalues: to be passed into format
Example 1:
# R program to illustrate # the use of sprintf(... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n03 Jun, 2020"
},
{
"code": null,
"e": 165,
"s": 28,
"text": "sprintf() function in R Language uses Format provided by the user to return the formatted string with the use of the values in the list."
},
{
"code": null,
"e": 1... |
Difference Between Single and Double Square Brackets in R - GeeksforGeeks | 18 Nov, 2021
The single and double square brackets are used as indexing operators in R Programming Language. Both of these operators are used for referencing the components of R storage objects either as a subset belonging to the same data type or as an element.
The table illustrates some key differences among both th... | [
{
"code": null,
"e": 24858,
"s": 24830,
"text": "\n18 Nov, 2021"
},
{
"code": null,
"e": 25109,
"s": 24858,
"text": "The single and double square brackets are used as indexing operators in R Programming Language. Both of these operators are used for referencing the components of ... |
How to filter two-dimensional NumPy array based on condition ? - GeeksforGeeks | 05 Apr, 2021
In this article, we are going to see how to apply the filter by the given condition in NumPy two-dimensional array. We have to obtain the output of required elements i.e., whatever we want to filter the elements from the existing array or new array.
Here we are going to create a two-dimensional array in nu... | [
{
"code": null,
"e": 24105,
"s": 24077,
"text": "\n05 Apr, 2021"
},
{
"code": null,
"e": 24355,
"s": 24105,
"text": "In this article, we are going to see how to apply the filter by the given condition in NumPy two-dimensional array. We have to obtain the output of required elemen... |
C++ Program to Implement Vector | A vector is a dynamic array that can resize itself if an element is inserted or deleted. The vector elements are contained in a contiguous storage and the container handles the storage automatically.
A program that implements vectors is given as follows −
#include <iostream>
#include <vector>
#include <string>
#include... | [
{
"code": null,
"e": 1262,
"s": 1062,
"text": "A vector is a dynamic array that can resize itself if an element is inserted or deleted. The vector elements are contained in a contiguous storage and the container handles the storage automatically."
},
{
"code": null,
"e": 1318,
"s": 1... |
Count items common to both the lists but with different prices - GeeksforGeeks | 07 Mar, 2022
Given two lists list1 and list2 containing m and n items respectively. Each item is associated with two fields: name and price. The problem is to count items that are in both the lists but with different prices.
Examples:
Input : list1[] = {{"apple", 60}, {"bread", 20},
{"wheat", 50}, ... | [
{
"code": null,
"e": 25420,
"s": 25392,
"text": "\n07 Mar, 2022"
},
{
"code": null,
"e": 25632,
"s": 25420,
"text": "Given two lists list1 and list2 containing m and n items respectively. Each item is associated with two fields: name and price. The problem is to count items that ... |
SentencePiece Tokenizer Demystified | by Jonathan Kernes | Towards Data Science | I’ll be the first to admit that learning about tokenization schemes can be boring, if not downright painful. Often, when training a natural language, choosing and implementing a tokenization scheme is just one more added layer of complexity. It can complicate your production pipelines, kill the mood with a poorly timed... | [
{
"code": null,
"e": 607,
"s": 171,
"text": "I’ll be the first to admit that learning about tokenization schemes can be boring, if not downright painful. Often, when training a natural language, choosing and implementing a tokenization scheme is just one more added layer of complexity. It can compli... |
Create variables in MySQL stored procedure with DECLARE keyword | Use MySQL DECLARE for variables in stored procedure −
DECLARE anyVariableName int DEFAULT anyValue;
Let us implement the above syntax in order to create variables in stored procedure −
mysql> DELIMITER //
mysql> CREATE PROCEDURE variable_Demo()
-> BEGIN
-> DECLARE lastInsertedId int DEFAULT -1;
-> select la... | [
{
"code": null,
"e": 1116,
"s": 1062,
"text": "Use MySQL DECLARE for variables in stored procedure −"
},
{
"code": null,
"e": 1162,
"s": 1116,
"text": "DECLARE anyVariableName int DEFAULT anyValue;"
},
{
"code": null,
"e": 1247,
"s": 1162,
"text": "Let us impl... |
Feature selection with Random Forest | by Gianluca Malato | Towards Data Science | Feature selection has always been a great problem in machine learning. According to my experience, I can say it’s the most important part of a data science project, because it helps us reduce the dimensions of a dataset and remove the useless variables. Fortunately, there are some models that help us calculate the impo... | [
{
"code": null,
"e": 592,
"s": 172,
"text": "Feature selection has always been a great problem in machine learning. According to my experience, I can say it’s the most important part of a data science project, because it helps us reduce the dimensions of a dataset and remove the useless variables. F... |
Tryit Editor v3.6 - Show Python | import matplotlib.pyplot as plt
numpy.random.seed(2)
x = numpy.random.normal(3, 1, 100)
y = numpy.random.normal(150, 40, 100) / x | [
{
"code": null,
"e": 45,
"s": 13,
"text": "import matplotlib.pyplot as plt"
},
{
"code": null,
"e": 66,
"s": 45,
"text": "numpy.random.seed(2)"
},
{
"code": null,
"e": 68,
"s": 66,
"text": ""
},
{
"code": null,
"e": 103,
"s": 68,
"text": "... |
How to create a data frame in R with list elements? | If a list has the same length of elements (not sub-elements) as the length of each vector for which we want to create the data frame then we first need to create the data frame of vectors then we can easily add the list into the data frame. But if we have a list and other vectors then data frame cannot be created as da... | [
{
"code": null,
"e": 1445,
"s": 1062,
"text": "If a list has the same length of elements (not sub-elements) as the length of each vector for which we want to create the data frame then we first need to create the data frame of vectors then we can easily add the list into the data frame. But if we ha... |
Levenshtein Distance in JavaScript | The Levenshtein distance is a string metric for measuring the difference between two sequences. It is the minimum number of single-character edits required to change one word into the other.
For example −
Consider, we have these two strings −
const str1 = 'hitting';
const str2 = 'kitten';
The Levenshtein distance betwe... | [
{
"code": null,
"e": 1253,
"s": 1062,
"text": "The Levenshtein distance is a string metric for measuring the difference between two sequences. It is the minimum number of single-character edits required to change one word into the other."
},
{
"code": null,
"e": 1267,
"s": 1253,
... |
D3.js axisBottom() Function - GeeksforGeeks | 28 Jul, 2020
Axes can be drawn using built-in D3 functions. This is made of Lines, Ticks and Labels. The d3.axisBottom() function in D3.js is used to create a bottom horizontal axis. This function will construct a new bottom-oriented axis generator for the given scale, with empty tick arguments, a tick size of 6 and pa... | [
{
"code": null,
"e": 24222,
"s": 24194,
"text": "\n28 Jul, 2020"
},
{
"code": null,
"e": 24541,
"s": 24222,
"text": "Axes can be drawn using built-in D3 functions. This is made of Lines, Ticks and Labels. The d3.axisBottom() function in D3.js is used to create a bottom horizontal... |
How to delete a column from a table in MySQL? | We can delete a column from a table with the help of ALTER command. Let’s say we have create a table and have a requirement to deleted some columns in it. We can achieve this using the ALTER and DRO[ command.
Let us see an example. First, we will create a table.
mysql> create table DeleteColumnNameDemo
-> (
-> Id... | [
{
"code": null,
"e": 1271,
"s": 1062,
"text": "We can delete a column from a table with the help of ALTER command. Let’s say we have create a table and have a requirement to deleted some columns in it. We can achieve this using the ALTER and DRO[ command."
},
{
"code": null,
"e": 1325,
... |
Heap Sort in C# | Heap Sort is a sorting algorithm that makes use of the heap data structure. Each time the root element of the heap i.e. the largest element is removed and stored in an array. It is replaced by the rightmost leaf element and then the heap is reestablished. This is done until there are no more elements left in the heap a... | [
{
"code": null,
"e": 1406,
"s": 1062,
"text": "Heap Sort is a sorting algorithm that makes use of the heap data structure. Each time the root element of the heap i.e. the largest element is removed and stored in an array. It is replaced by the rightmost leaf element and then the heap is reestablishe... |
How to Create Interactive Plots with Altair | by Khuyen Tran | Towards Data Science | Have you ever wanted to take a closer look at your data by zooming in, highlight points of interest, or see how the data change over time with a slider bar? By having more control over your static graph, you figure you might get much more insights into the data.
But you imagine it must be challenging to create an inter... | [
{
"code": null,
"e": 435,
"s": 172,
"text": "Have you ever wanted to take a closer look at your data by zooming in, highlight points of interest, or see how the data change over time with a slider bar? By having more control over your static graph, you figure you might get much more insights into th... |
An example of predicting ratings with SVD in a collaborative filtering recommendation system | by Xue Wang | Towards Data Science | We know that there are cons with SVD to make a prediction in reality, for example, it can’t predict if there is even a NaN in the dataset, but as this is the starting point of collaborative filtering and I want to reproduce the procedure with SVD to see how it works, with some compromisation of the dataset.
This story ... | [
{
"code": null,
"e": 481,
"s": 172,
"text": "We know that there are cons with SVD to make a prediction in reality, for example, it can’t predict if there is even a NaN in the dataset, but as this is the starting point of collaborative filtering and I want to reproduce the procedure with SVD to see h... |
NDArray — — a Java based N-Dim array toolkit | by Qing Lan | Towards Data Science | Within many development languages, there is a popular paradigm of using N-Dimensional arrays. They allow you to write numerical code that would otherwise require many levels of nested loops in only a few simple operations. Because of the ability to parallelize, it often runs even faster than the standard looping as wel... | [
{
"code": null,
"e": 1298,
"s": 47,
"text": "Within many development languages, there is a popular paradigm of using N-Dimensional arrays. They allow you to write numerical code that would otherwise require many levels of nested loops in only a few simple operations. Because of the ability to parall... |
How to save as PDF on Chrome using Selenium | We can save a pdf file on Chrome using the Selenium webdriver. To download the pdf file in a specific location we have to take the help of the Options class.
We shall create an object of this class and apply add_experimental_option on it. Then pass the values - prefs and the path where the pdf is to be downloaded as pa... | [
{
"code": null,
"e": 1220,
"s": 1062,
"text": "We can save a pdf file on Chrome using the Selenium webdriver. To download the pdf file in a specific location we have to take the help of the Options class."
},
{
"code": null,
"e": 1407,
"s": 1220,
"text": "We shall create an objec... |
Python program to convert ASCII to Binary - GeeksforGeeks | 31 Aug, 2021
In this article, we are going to discuss the conversion of ASCII to Binary in the Python programming language.
Binascii helps convert between binary and various ASCII-encoded binary representations.
a2b_uu() function: Here the “uu” stands for “UNIX-to-UNIX encoding” which takes care of the data conversion... | [
{
"code": null,
"e": 24317,
"s": 24289,
"text": "\n31 Aug, 2021"
},
{
"code": null,
"e": 24428,
"s": 24317,
"text": "In this article, we are going to discuss the conversion of ASCII to Binary in the Python programming language."
},
{
"code": null,
"e": 24516,
"s":... |
Password Matching using JavaScript | 21 Sep, 2018
Given two boxes i.e. password and confirm password. The task is to check the entered password is matched or not.
It is used in online application form or social sites to signup account to verify the entered password by user is correct or not. It is the simple method to verify the password matches. First pa... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n21 Sep, 2018"
},
{
"code": null,
"e": 165,
"s": 52,
"text": "Given two boxes i.e. password and confirm password. The task is to check the entered password is matched or not."
},
{
"code": null,
"e": 554,
"s": 165,
"... |
Year getValue() method in Java with Examples | 01 Nov, 2019
The getValue() method of Year class in Java is used to get the integral value of the current Year object.
Syntax:
public int getValue()
Parameter: This method does not accepts any parameter.
Return Value: It returns an integer denoting the value of the current year object.
Below programs illustrate the ge... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n01 Nov, 2019"
},
{
"code": null,
"e": 134,
"s": 28,
"text": "The getValue() method of Year class in Java is used to get the integral value of the current Year object."
},
{
"code": null,
"e": 142,
"s": 134,
"text": "... |
Memcached - Clear Data | Memcached flush_all command is used to delete all data (key-value pairs) from the Memcached server. It accepts an optional parameter called time that sets a time after which the Memcached data is to be cleared.
The basic syntax of Memcached flush_all command is as shown below −
flush_all [time] [noreply]
The above com... | [
{
"code": null,
"e": 2450,
"s": 2239,
"text": "Memcached flush_all command is used to delete all data (key-value pairs) from the Memcached server. It accepts an optional parameter called time that sets a time after which the Memcached data is to be cleared."
},
{
"code": null,
"e": 2518,... |
How to make table searchable and sortable with pagination using jQuery? | 26 May, 2022
The jQuery fancyTable plugin helps the developers to design HTML tables that are searchable and sortable with pagination feature. This plugin is totally based on JavaScript and HTML.
Official website for plugin: Please take care of file paths while implementing the codes.
https://github.com/myspace-nu/jque... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n26 May, 2022"
},
{
"code": null,
"e": 211,
"s": 28,
"text": "The jQuery fancyTable plugin helps the developers to design HTML tables that are searchable and sortable with pagination feature. This plugin is totally based on JavaScript an... |
How to change the background color of the options menu in Android? | This example demonstrates how to change the background color of the options menu 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... | [
{
"code": null,
"e": 1280,
"s": 1187,
"text": "This example demonstrates how to change the background color of the options menu in Android."
},
{
"code": null,
"e": 1409,
"s": 1280,
"text": "Step 1 − Create a new project in Android Studio, go to File ⇒ New Project and fill all re... |
Useful Date and Time Functions in PL/SQL | 11 Feb, 2019
Date and Time Function formats are different various database. we are going to discuss most common functions used in Oracle database.
The function SYSDATE returns 7 bytes of data, which includes:
Century
Year
Month
Day
Hour
Minute
Second
1. Extract():Oracle helps you to extract Year, Month and Day from a d... | [
{
"code": null,
"e": 53,
"s": 25,
"text": "\n11 Feb, 2019"
},
{
"code": null,
"e": 187,
"s": 53,
"text": "Date and Time Function formats are different various database. we are going to discuss most common functions used in Oracle database."
},
{
"code": null,
"e": 249... |
Python program to find IP Address | 09 Nov, 2017
An IP(Internet Protocol) address is an identifier assigned to each computer and other device(e.g., router, mobile, etc) connected to a TCP/IP network that is used to locate and identify the node in communication with other nodes on the network. IP addresses are usually written and displayed in human-readab... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n09 Nov, 2017"
},
{
"code": null,
"e": 519,
"s": 28,
"text": "An IP(Internet Protocol) address is an identifier assigned to each computer and other device(e.g., router, mobile, etc) connected to a TCP/IP network that is used to locate an... |
Role of keys in Cassandra | 27 Nov, 2019
In this article we are going to discuss why keys are important and how they are work and different from relational database. Basically, Keys are used for grouping and organizing data into columns and rows in the database, so let’s have a look.
There are many portioning keys are available in Cassandra.1. Si... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n27 Nov, 2019"
},
{
"code": null,
"e": 272,
"s": 28,
"text": "In this article we are going to discuss why keys are important and how they are work and different from relational database. Basically, Keys are used for grouping and organizi... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.