title stringlengths 3 221 | text stringlengths 17 477k | parsed listlengths 0 3.17k |
|---|---|---|
Coin game of two corners (Greedy Approach) - GeeksforGeeks | 07 Apr, 2021
Consider a two player coin game where each player gets turn one by one. There is a row of even number of coins, and a player on his/her turn can pick a coin from any of the two corners of the row. The player that collects coins with more value wins the game. Develop a strategy for the player making the fir... | [
{
"code": null,
"e": 26177,
"s": 26149,
"text": "\n07 Apr, 2021"
},
{
"code": null,
"e": 26529,
"s": 26177,
"text": "Consider a two player coin game where each player gets turn one by one. There is a row of even number of coins, and a player on his/her turn can pick a coin from a... |
Self-Balancing-Binary-Search-Trees (Comparisons) - GeeksforGeeks | 19 Jul, 2021
Self-Balancing Binary Search Trees are height-balanced binary search trees that automatically keeps height as small as possible when insertion and deletion operations are performed on tree. The height is typically maintained in order of Log n so that all operations take O(Log n) time on average.
Examples ... | [
{
"code": null,
"e": 26282,
"s": 26254,
"text": "\n19 Jul, 2021"
},
{
"code": null,
"e": 26580,
"s": 26282,
"text": "Self-Balancing Binary Search Trees are height-balanced binary search trees that automatically keeps height as small as possible when insertion and deletion operati... |
java.util.zip.ZipOutputStream.putNextEntry() Method Example | The java.util.zip.ZipOutputStream.putNextEntry(ZipEntry e) method begins writing a new ZIP file entry and positions the stream to the start of the entry data. Closes the current entry if still active. The default compression method will be used if no compression method was specified for the entry, and the current time ... | [
{
"code": null,
"e": 2568,
"s": 2192,
"text": "The java.util.zip.ZipOutputStream.putNextEntry(ZipEntry e) method begins writing a new ZIP file entry and positions the stream to the start of the entry data. Closes the current entry if still active. The default compression method will be used if no co... |
Mathematics | Introduction and types of Relations - GeeksforGeeks | 28 Jun, 2021
Relation or Binary relation R from set A to B is a subset of AxB which can be defined asaRb ↔ (a,b) € R ↔ R(a,b).A Binary relation R on a single set A is defined as a subset of AxA. For two distinct set, A and B with cardinalities m and n, the maximum cardinality of the relation R from A to B is mn.Domain ... | [
{
"code": null,
"e": 31387,
"s": 31359,
"text": "\n28 Jun, 2021"
},
{
"code": null,
"e": 31902,
"s": 31387,
"text": "Relation or Binary relation R from set A to B is a subset of AxB which can be defined asaRb ↔ (a,b) € R ↔ R(a,b).A Binary relation R on a single set A is defined a... |
All Features of ES2020 with Examples - GeeksforGeeks | 08 Jan, 2021
ES2020 is a continuation of ES’s (ECMAscript) JavaScript improvement. In the year 2020 ES’s important changes are the following:
BigInt is a new numeric primitive in JavaScript. In BigInt type You can store integers that are arbitrary precision. BigInt can store numbers that are greater than max_safe_integ... | [
{
"code": null,
"e": 26545,
"s": 26517,
"text": "\n08 Jan, 2021"
},
{
"code": null,
"e": 26674,
"s": 26545,
"text": "ES2020 is a continuation of ES’s (ECMAscript) JavaScript improvement. In the year 2020 ES’s important changes are the following:"
},
{
"code": null,
"e... |
Python | Imputation using the KNNimputer() - GeeksforGeeks | 05 Sep, 2020
KNNimputer is a scikit-learn class used to fill out or predict the missing values in a dataset. It is a more useful method which works on the basic approach of the KNN algorithm rather than the naive approach of filling all the values with mean or the median. In this approach, we specify a distance from th... | [
{
"code": null,
"e": 25659,
"s": 25631,
"text": "\n05 Sep, 2020"
},
{
"code": null,
"e": 26103,
"s": 25659,
"text": "KNNimputer is a scikit-learn class used to fill out or predict the missing values in a dataset. It is a more useful method which works on the basic approach of the... |
Wine data set: A Classification Problem | by Ali Faghihnejad | Towards Data Science | The wine data set consists of 13 different parameters of wine such as alcohol and ash content which was measured for 178 wine samples. These wines were grown in the same region in Italy but derived from three different cultivars; therefore there are three different classes of wine. The goal here is to find a model that... | [
{
"code": null,
"e": 852,
"s": 172,
"text": "The wine data set consists of 13 different parameters of wine such as alcohol and ash content which was measured for 178 wine samples. These wines were grown in the same region in Italy but derived from three different cultivars; therefore there are three... |
NumPy - Copies & Views | While executing the functions, some of them return a copy of the input array, while some return the view. When the contents are physically stored in another location, it is called Copy. If on the other hand, a different view of the same memory content is provided, we call it as View.
Simple assignments do not make the ... | [
{
"code": null,
"e": 2528,
"s": 2243,
"text": "While executing the functions, some of them return a copy of the input array, while some return the view. When the contents are physically stored in another location, it is called Copy. If on the other hand, a different view of the same memory content i... |
Stateful model serving: how we accelerate inference using ONNX Runtime | by Lester Solbakken | Towards Data Science | By Lester Solbakken from Verizon Media and Pranav Sharma from Microsoft.
There’s a difference between stateless and stateful machine-learned model serving.
Stateless model serving is what one usually thinks about when using a machine-learned model in production. For instance, a web application handling live traffic can... | [
{
"code": null,
"e": 245,
"s": 172,
"text": "By Lester Solbakken from Verizon Media and Pranav Sharma from Microsoft."
},
{
"code": null,
"e": 328,
"s": 245,
"text": "There’s a difference between stateless and stateful machine-learned model serving."
},
{
"code": null,
... |
Can I define more than one public class in a Java package? | No, while defining multiple classes in a single Java file you need to make sure that only one class among them is public. If you have more than one public classes a single file a compile-time error will be generated.
In the following example we have two classes Student and AccessData we are having both of them in the s... | [
{
"code": null,
"e": 1279,
"s": 1062,
"text": "No, while defining multiple classes in a single Java file you need to make sure that only one class among them is public. If you have more than one public classes a single file a compile-time error will be generated."
},
{
"code": null,
"e":... |
GPT-3 Explained. Understanding Transformer-Based... | by Rohan Jagtap | Towards Data Science | In this article, we’ll be discussing the renowned GPT-3 model proposed in the paper “Language Models are Few-Shot Learners” by OpenAI. It is the successor of GPT-2, which has a very similar architecture to that of GPT-3.
If you’re unaware of GPT-2, consider giving my article on GPT-2 a read, as most of GPT-3 is based o... | [
{
"code": null,
"e": 393,
"s": 172,
"text": "In this article, we’ll be discussing the renowned GPT-3 model proposed in the paper “Language Models are Few-Shot Learners” by OpenAI. It is the successor of GPT-2, which has a very similar architecture to that of GPT-3."
},
{
"code": null,
"e... |
The match Function in Python | This function attempts to match RE pattern to string with optional flags.
Here is the syntax for this function −
re.match(pattern, string, flags=0)
Here is the description of the parameters −
The re.match function returns a match object on success, None on failure. We usegroup(num) or groups() function of match object ... | [
{
"code": null,
"e": 1136,
"s": 1062,
"text": "This function attempts to match RE pattern to string with optional flags."
},
{
"code": null,
"e": 1175,
"s": 1136,
"text": "Here is the syntax for this function −"
},
{
"code": null,
"e": 1210,
"s": 1175,
"text":... |
Swap two variables in one line in using Python? | In this section, we are going to swap two variable in one line using python. The standard way to swap two variables in python is very simple and easy−
>>> a = 20;b=30
>>> a
20
>>> b
30
>>> #Swap two variable in one line
>>> a, b = b, a
>>> a
30
>>> b
20
Above code generate swapped values of a and b.
Python evaluates ex... | [
{
"code": null,
"e": 1213,
"s": 1062,
"text": "In this section, we are going to swap two variable in one line using python. The standard way to swap two variables in python is very simple and easy−"
},
{
"code": null,
"e": 1316,
"s": 1213,
"text": ">>> a = 20;b=30\n>>> a\n20\n>>>... |
Formatted Strings Using Template Strings in JavaScript | Following is the code for formatted strings using template strings in Javascript −
Live Demo
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Document</title>
<style>
body {
font-family: "Segoe UI", Tahoma, Geneva,... | [
{
"code": null,
"e": 1145,
"s": 1062,
"text": "Following is the code for formatted strings using template strings in Javascript −"
},
{
"code": null,
"e": 1156,
"s": 1145,
"text": " Live Demo"
},
{
"code": null,
"e": 2389,
"s": 1156,
"text": "<!DOCTYPE html>\n... |
How to open a file in read and write mode with Python? | To open files in read/write mode, specify 'w+' as the mode. For example,
f = open('my_file.txt', 'w+')
file_content = f.read()
f.write('Hello World')
f.close()
Above code opens my_file.txt in write mode, stores the file content in file_content variable and rewrites the file to contain "Hello World". You can also use r... | [
{
"code": null,
"e": 1135,
"s": 1062,
"text": "To open files in read/write mode, specify 'w+' as the mode. For example,"
},
{
"code": null,
"e": 1222,
"s": 1135,
"text": "f = open('my_file.txt', 'w+')\nfile_content = f.read()\nf.write('Hello World')\nf.close()"
},
{
"code... |
Big Data Analytics - Quick Guide | The volume of data that one has to deal has exploded to unimaginable levels in the past decade, and at the same time, the price of data storage has systematically reduced. Private companies and research institutions capture terabytes of data about their users’ interactions, business, social media, and also sensors from... | [
{
"code": null,
"e": 3039,
"s": 2554,
"text": "The volume of data that one has to deal has exploded to unimaginable levels in the past decade, and at the same time, the price of data storage has systematically reduced. Private companies and research institutions capture terabytes of data about their... |
TypeScript - Number toPrecision() | This method returns a string representing the number object to the specified precision.
number.toPrecision( [ precision ] )
precision − An integer specifying the number of significant digits.
Returns a string representing a Number object in fixed-point or exponential notation rounded to precision significant digits.
v... | [
{
"code": null,
"e": 2136,
"s": 2048,
"text": "This method returns a string representing the number object to the specified precision."
},
{
"code": null,
"e": 2173,
"s": 2136,
"text": "number.toPrecision( [ precision ] )\n"
},
{
"code": null,
"e": 2241,
"s": 2173... |
Java Program to Find Sum of the Series 1/1! + 2/2! + 3/3! + ......1/N! - GeeksforGeeks | 13 Jan, 2022
Factorial of a number simply returns out the multiplication of that number with all numbers lesser than the number up to 1 over which factorial is applied. Now the question arises whether the series is convergent or divergent. According to concepts of Infinite series and factorial in mathematics, the seri... | [
{
"code": null,
"e": 23948,
"s": 23920,
"text": "\n13 Jan, 2022"
},
{
"code": null,
"e": 24320,
"s": 23948,
"text": "Factorial of a number simply returns out the multiplication of that number with all numbers lesser than the number up to 1 over which factorial is applied. Now the... |
Find the number of islands | Practice | GeeksforGeeks | Given a grid of size n*m (n is number of rows and m is number of columns grid has) consisting of '0's(Water) and '1's(Land). Find the number of islands.
Note: An island is surrounded by water and is formed by connecting adjacent lands horizontally or vertically or diagonally i.e., in all 8 directions.
Example 1:
Inpu... | [
{
"code": null,
"e": 543,
"s": 238,
"text": "Given a grid of size n*m (n is number of rows and m is number of columns grid has) consisting of '0's(Water) and '1's(Land). Find the number of islands.\nNote: An island is surrounded by water and is formed by connecting adjacent lands horizontally or ver... |
How to create a JSON object in JavaScript? Explain with an example. | Following is the code to create a JSON object in JavaScript.
Live Demo
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Document</title>
<style>
body {
font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
... | [
{
"code": null,
"e": 1123,
"s": 1062,
"text": "Following is the code to create a JSON object in JavaScript."
},
{
"code": null,
"e": 1134,
"s": 1123,
"text": " Live Demo"
},
{
"code": null,
"e": 2065,
"s": 1134,
"text": "<!DOCTYPE html>\n<html lang=\"en\">\n<h... |
HTML5 Canvas - Drawing Paths | We require the following methods to draw paths on the canvas −
beginPath()
This method resets the current path.
moveTo(x, y)
This method creates a new subpath with the given point.
closePath()
This method marks the current subpath as closed, and starts a new subpath with a point the same as the start and end of the new... | [
{
"code": null,
"e": 2671,
"s": 2608,
"text": "We require the following methods to draw paths on the canvas −"
},
{
"code": null,
"e": 2683,
"s": 2671,
"text": "beginPath()"
},
{
"code": null,
"e": 2720,
"s": 2683,
"text": "This method resets the current path.... |
Minimum time required to schedule K processes | 13 Jul, 2021
Given a positive integer K and an array arr[] consisting of N positive integers, such that arr[i] is the number of processes ith processor can schedule in 1 second. The task is to minimize the total time required to schedule K processes such that after scheduling by the ith processor, arr[i] is reduced to ... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n13 Jul, 2021"
},
{
"code": null,
"e": 376,
"s": 52,
"text": "Given a positive integer K and an array arr[] consisting of N positive integers, such that arr[i] is the number of processes ith processor can schedule in 1 second. The task ... |
Stack indexOf() method in Java with Example | 24 Dec, 2018
The Java.util.Stack.indexOf(Object element) method is used to check and find the occurrence of a particular element in the Stack. If the element is present then the index of the first occurrence of the element is returned otherwise -1 is returned if the Stack does not contain the element.
Syntax:
Stack.ind... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n24 Dec, 2018"
},
{
"code": null,
"e": 318,
"s": 28,
"text": "The Java.util.Stack.indexOf(Object element) method is used to check and find the occurrence of a particular element in the Stack. If the element is present then the index of t... |
Java – Lambda Expression Variable Capturing with Examples | 28 Jul, 2021
Variable defined by the enclosing scope of a lambda expression are accessible within the lambda expression. For example, a lambda expression can use an instance or static variable defined by its enclosing class. A lambda expression also has access to (both explicitly and implicitly), which refers to the ... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n28 Jul, 2021"
},
{
"code": null,
"e": 559,
"s": 52,
"text": "Variable defined by the enclosing scope of a lambda expression are accessible within the lambda expression. For example, a lambda expression can use an instance or static va... |
Get parent of current directory using Python | 13 Jul, 2021
In Python, OS module is used to interact with the operating system. It comes under Python’s standard utility modules. This module provides a portable way of using operating system dependent functionality. The *os* and *os.path* modules include many functions to interact with the file system. OS module prov... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n13 Jul, 2021"
},
{
"code": null,
"e": 411,
"s": 28,
"text": "In Python, OS module is used to interact with the operating system. It comes under Python’s standard utility modules. This module provides a portable way of using operating sy... |
ReactJS | State in React | 08 Oct, 2021
In the previous article on ReactJS | Components, we got to know that React Components can be broadly classified into Functional and Class Components. It is also seen that Functional Components are faster and much simpler than Class Components. The primary difference between the two is the availability of t... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n08 Oct, 2021"
},
{
"code": null,
"e": 370,
"s": 52,
"text": "In the previous article on ReactJS | Components, we got to know that React Components can be broadly classified into Functional and Class Components. It is also seen that Fun... |
Kotlin Regex Patterns | 07 Feb, 2022
Regular expression is used to search for text and more advanced text manipulation. Regular Expressions are a fundamental part of almost every programming language and Kotlin is no exception to it. In Kotlin, the support for regular expression is provided through Regex class. An object of this class represe... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n07 Feb, 2022"
},
{
"code": null,
"e": 641,
"s": 52,
"text": "Regular expression is used to search for text and more advanced text manipulation. Regular Expressions are a fundamental part of almost every programming language and Kotlin ... |
How to Create a Range of Dates in R | 23 Aug, 2021
R programming language makes it extremely easy to generate range of integers as well as singular characters. It is also possible to store Date objects in R in different formats and increment the sequentially to produce a range using both base packages as well external ones.
This article discusses various ... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n23 Aug, 2021"
},
{
"code": null,
"e": 304,
"s": 28,
"text": "R programming language makes it extremely easy to generate range of integers as well as singular characters. It is also possible to store Date objects in R in different format... |
variable === undefined vs. typeof variable === “undefined” in JavaScript | 28 Oct, 2021
Undefined comes into a picture when any variable is defined already but not has been assigned any value. Undefined is not a keyword. A function can also be undefined when it doesn’t have the value returned. There are two ways to determine if a variable is not defined, Value and type.
javascript
var geeks... | [
{
"code": null,
"e": 53,
"s": 25,
"text": "\n28 Oct, 2021"
},
{
"code": null,
"e": 340,
"s": 53,
"text": "Undefined comes into a picture when any variable is defined already but not has been assigned any value. Undefined is not a keyword. A function can also be undefined when it ... |
Recommendation System in Python | 06 Sep, 2021
There are a lot of applications where websites collect data from their users and use that data to predict the likes and dislikes of their users. This allows them to recommend the content that they like. Recommender systems are a way of suggesting or similar items and ideas to a user’s specific way of think... | [
{
"code": null,
"e": 54,
"s": 26,
"text": "\n06 Sep, 2021"
},
{
"code": null,
"e": 366,
"s": 54,
"text": "There are a lot of applications where websites collect data from their users and use that data to predict the likes and dislikes of their users. This allows them to recommend... |
Red Hawk – Information Gathering and Vulnerability Scanning Tool in Kali Linux | 28 Mar, 2021
Red Hawk is a free and open-source tool available on GitHub. Red Hawk is used to scanning websites for information gathering and finding vulnerabilities. Red Hawk is written in PHP. It uses PHP script to do reconnaissance. Red Hawk is so powerful that it can detect content management system while scanning,... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n28 Mar, 2021"
},
{
"code": null,
"e": 916,
"s": 28,
"text": "Red Hawk is a free and open-source tool available on GitHub. Red Hawk is used to scanning websites for information gathering and finding vulnerabilities. Red Hawk is written i... |
Python Pyforest Library - GeeksforGeeks | 19 Feb, 2020
Sometimes, it happens that we spent a huge amount of time importing some common libraries like NumPy, pandas, matplotlib, seaborn, nltk and many more. To remove this headache of importing such libraries manually, we have pyforest library.
It is that library which helps you to work directly without importin... | [
{
"code": null,
"e": 26213,
"s": 26185,
"text": "\n19 Feb, 2020"
},
{
"code": null,
"e": 26452,
"s": 26213,
"text": "Sometimes, it happens that we spent a huge amount of time importing some common libraries like NumPy, pandas, matplotlib, seaborn, nltk and many more. To remove th... |
Data Viz using Python and Tableau: from API call to Hosted Dashboard | by Richard Peterson | Towards Data Science | Building an infographic often starts while you are first exploring the data. Matplotlib, Seaborn, and ggplot2 are the classic programming charts, while Plotly has also exploded in popularity. But for me, nothing matches the clean professional aesthetic of Tableau. In this article, we will leave behind the inline Jupyte... | [
{
"code": null,
"e": 581,
"s": 171,
"text": "Building an infographic often starts while you are first exploring the data. Matplotlib, Seaborn, and ggplot2 are the classic programming charts, while Plotly has also exploded in popularity. But for me, nothing matches the clean professional aesthetic of... |
Kotlin - Interface | In this chapter, we will learn about the interface in Kotlin. In Kotlin, the interface works exactly similar to Java 8, which means they can contain method implementation as well as abstract methods declaration. An interface can be implemented by a class in order to use its defined functionality. We have already introd... | [
{
"code": null,
"e": 2979,
"s": 2425,
"text": "In this chapter, we will learn about the interface in Kotlin. In Kotlin, the interface works exactly similar to Java 8, which means they can contain method implementation as well as abstract methods declaration. An interface can be implemented by a clas... |
Java Program to add integers and check for overflow | To check for Integer overflow, we need to check the Integer.MAX_VALUE with the added integers result, Here, Integer.MAX_VALUE is the maximum value of an integer in Java.
Let us see an example wherein integers are added and if the sum is more than the Integer.MAX_VALUE, then an exception is thrown.
Live Demo
public cla... | [
{
"code": null,
"e": 1232,
"s": 1062,
"text": "To check for Integer overflow, we need to check the Integer.MAX_VALUE with the added integers result, Here, Integer.MAX_VALUE is the maximum value of an integer in Java."
},
{
"code": null,
"e": 1361,
"s": 1232,
"text": "Let us see a... |
SQL Tryit Editor v1.6 | ALTER TABLE Employees
ALTER COLUMN BirthDate year;
Edit the SQL Statement, and click "Run SQL" to see the result.
This SQL-Statement is not supported in the WebSQL Database.
The example still works, because it uses a modified version of SQL.
Your browser does not support WebSQL.
Your are now using a light-version of ... | [
{
"code": null,
"e": 22,
"s": 0,
"text": "ALTER TABLE Employees"
},
{
"code": null,
"e": 51,
"s": 22,
"text": "ALTER COLUMN BirthDate year;"
},
{
"code": null,
"e": 53,
"s": 51,
"text": ""
},
{
"code": null,
"e": 116,
"s": 53,
"text": "Edi... |
Improving Performance of ML Model (Contdâ¦) | As we know that ML models are parameterized in such a way that their behavior can be adjusted for a specific problem. Algorithm tuning means finding the best combination of these parameters so that the performance of ML model can be improved. This process sometimes called hyperparameter optimization and the parameters ... | [
{
"code": null,
"e": 2733,
"s": 2304,
"text": "As we know that ML models are parameterized in such a way that their behavior can be adjusted for a specific problem. Algorithm tuning means finding the best combination of these parameters so that the performance of ML model can be improved. This proce... |
Protobuf - Map | Map is one of the composite datatypes of Protobuf. Protobuf translates this to a java.util.Map interface in Java.
Continuing with our theater example, following is the syntax that we need to have to instruct Protobuf that we will be creating a map −
syntax = "proto3";
package theater;
option java_package = "com.tutoria... | [
{
"code": null,
"e": 2159,
"s": 2045,
"text": "Map is one of the composite datatypes of Protobuf. Protobuf translates this to a java.util.Map interface in Java."
},
{
"code": null,
"e": 2295,
"s": 2159,
"text": "Continuing with our theater example, following is the syntax that we... |
Data Preprocessing with Python Pandas — Part 2 Data Formatting | by Angelica Lo Duca | Towards Data Science | This tutorial explains how to preprocess data using the Pandas library. Preprocessing is the process of doing a pre-analysis of data, in order to transform them into a standard and normalized format. Preprocessing involves the following aspects:
missing values
data formatting
data normalization
data standardization
dat... | [
{
"code": null,
"e": 418,
"s": 172,
"text": "This tutorial explains how to preprocess data using the Pandas library. Preprocessing is the process of doing a pre-analysis of data, in order to transform them into a standard and normalized format. Preprocessing involves the following aspects:"
},
{... |
How to iterate the values of an enum using a for loop in Java? | Enumerations in Java represents a group of named constants, you can create an enumeration using the following syntax −
enum Days {
SUNDAY, MONDAY, TUESDAY, WEDNESDAY, THURSDAY, FRIDAY, SATURDAY
}
You can retrieve the contents of an enum using the values() method. This method returns an array containing all the value... | [
{
"code": null,
"e": 1181,
"s": 1062,
"text": "Enumerations in Java represents a group of named constants, you can create an enumeration using the following syntax −"
},
{
"code": null,
"e": 1261,
"s": 1181,
"text": "enum Days {\n SUNDAY, MONDAY, TUESDAY, WEDNESDAY, THURSDAY, F... |
Console readPassword() method in Java with Examples - GeeksforGeeks | 12 Jun, 2020
The readPassword() method of Console class in Java is of two types:
1. The readPassword() method of Console class in Java is used to read a password or passphrase from the console with disabled echoing.
Syntax:
public char[] readPassword()
Parameters: This method does not accept any parameter.
Return valu... | [
{
"code": null,
"e": 23557,
"s": 23529,
"text": "\n12 Jun, 2020"
},
{
"code": null,
"e": 23625,
"s": 23557,
"text": "The readPassword() method of Console class in Java is of two types:"
},
{
"code": null,
"e": 23760,
"s": 23625,
"text": "1. The readPassword() ... |
Ionic - Footer | Ionic footer is placed at the bottom of the app screen. Working with footers is almost the same as working with headers.
The main class for Ionic footers is bar (the same as header). When you want to add footer to your screens, you need to add bar-footer class to your element after the main bar class. Since we want to ... | [
{
"code": null,
"e": 2584,
"s": 2463,
"text": "Ionic footer is placed at the bottom of the app screen. Working with footers is almost the same as working with headers."
},
{
"code": null,
"e": 2916,
"s": 2584,
"text": "The main class for Ionic footers is bar (the same as header).... |
Python Pandas DataFrame Join, Merge, and Concatenate | by Jiahui Wang | Towards Data Science | When using sql, we have join operation. In Python, pandas.DataFrame also provides the similar table operations. However, pandas.DataFrame has join, merge, and concat. What’s the difference among them? In this post, I will summarize the code and illustration of these operations.
Among the three DataFrame operations, joi... | [
{
"code": null,
"e": 450,
"s": 171,
"text": "When using sql, we have join operation. In Python, pandas.DataFrame also provides the similar table operations. However, pandas.DataFrame has join, merge, and concat. What’s the difference among them? In this post, I will summarize the code and illustrati... |
JavaFX Effects - MotionBlur | Just like Gaussian Effect, Motion Blur is an effect to blur the nodes in JavaFX. It also uses a Gaussian Convolution Kernel that helps in producing the blurring effect. The only difference between Gaussian Effect and Motion Blur is that the Gaussian Convolution Kernel is used with a specified angle.
As indicated by the... | [
{
"code": null,
"e": 2201,
"s": 1900,
"text": "Just like Gaussian Effect, Motion Blur is an effect to blur the nodes in JavaFX. It also uses a Gaussian Convolution Kernel that helps in producing the blurring effect. The only difference between Gaussian Effect and Motion Blur is that the Gaussian Con... |
C++ Program to Implement Affine Cipher | In the Affine cipher, each letter in an alphabet is mapped to its numeric equivalent, is a type of monoalphabetic substitution cipher. Encryption is done using a simple mathematical function and converted back to a letter.
The letters of an alphabet of size m are first mapped to the integers in the range 0 ... m-1, in ... | [
{
"code": null,
"e": 1285,
"s": 1062,
"text": "In the Affine cipher, each letter in an alphabet is mapped to its numeric equivalent, is a type of monoalphabetic substitution cipher. Encryption is done using a simple mathematical function and converted back to a letter."
},
{
"code": null,
... |
Insert Data into MySQL Database | Data can be entered into MySQL tables by executing SQL INSERT statement through PHP function mysql_query. Below a simple example to insert a record into employee table.
Try out following example to insert record into employee table.
<?php
$dbhost = 'localhost:3036';
$dbuser = 'root';
$dbpass = 'rootpassword';
... | [
{
"code": null,
"e": 2926,
"s": 2757,
"text": "Data can be entered into MySQL tables by executing SQL INSERT statement through PHP function mysql_query. Below a simple example to insert a record into employee table."
},
{
"code": null,
"e": 2990,
"s": 2926,
"text": "Try out follo... |
Koa.js - RESTful APIs | To create mobile applications, single page applications, use AJAX calls and provide data to clients, you'll need an API. A popular architectural style of how to structure and name these APIs and the endpoints is called REST(Representational Transfer State). HTTP 1.1 was designed keeping REST principles in mind. REST wa... | [
{
"code": null,
"e": 2500,
"s": 2106,
"text": "To create mobile applications, single page applications, use AJAX calls and provide data to clients, you'll need an API. A popular architectural style of how to structure and name these APIs and the endpoints is called REST(Representational Transfer Sta... |
MySQL - LOOP Statement | Stored procedures are sub routines, segment of SQL statements which are stored in SQL catalog. These procedures contain IN and OUT parameters, or both. They may return result sets in case you use SELECT statements; they can return multiple result-sets. You can also create functions in MYSQL.
Similar to other programmin... | [
{
"code": null,
"e": 2626,
"s": 2333,
"text": "Stored procedures are sub routines, segment of SQL statements which are stored in SQL catalog. These procedures contain IN and OUT parameters, or both. They may return result sets in case you use SELECT statements; they can return multiple result-sets. ... |
6 hidden SQL mistakes to avoid. They fly under the radar and get you in... | by Skyler Dale | Towards Data Science | SQL is great. It’s human readable and efficient. It’s fairly easy to pick up.
Unfortunately, it’s also easy to make nasty SQL mistakes. Ones that don’t stand out, don’t get caught by your editor, and cause headaches down the line.
In this post, I’ll highlight some hidden errors to be mindful of when you’re cruising thr... | [
{
"code": null,
"e": 250,
"s": 172,
"text": "SQL is great. It’s human readable and efficient. It’s fairly easy to pick up."
},
{
"code": null,
"e": 403,
"s": 250,
"text": "Unfortunately, it’s also easy to make nasty SQL mistakes. Ones that don’t stand out, don’t get caught by you... |
COBOL - Conditional Statements | Conditional statements are used to change the execution flow depending on certain conditions specified by the programmer. Conditional statements will always evaluate to true or false. Conditions are used in IF, Evaluate, and Perform statements. The different types of conditions are as follows −
IF Condition Statement
R... | [
{
"code": null,
"e": 2318,
"s": 2022,
"text": "Conditional statements are used to change the execution flow depending on certain conditions specified by the programmer. Conditional statements will always evaluate to true or false. Conditions are used in IF, Evaluate, and Perform statements. The diff... |
Java Program to Calculate the Difference Between the Sum of the Odd Level and the Even Level Nodes of a Binary Tree - GeeksforGeeks | 04 Jan, 2021
Graph Traversal using DFS is an obvious way to traverse a tree with recursion. Below is an algorithm for traversing binary tree using DFS.
Prerequisites
Graph Traversal using DFS
Java Basics(Array List)
Recursion Basics
Algorithm
Initialize the current node as root node and the parent as -1.Traverse the ... | [
{
"code": null,
"e": 23557,
"s": 23529,
"text": "\n04 Jan, 2021"
},
{
"code": null,
"e": 23697,
"s": 23557,
"text": "Graph Traversal using DFS is an obvious way to traverse a tree with recursion. Below is an algorithm for traversing binary tree using DFS. "
},
{
"code": n... |
GATE | GATE-CS-2001 | Question 29 - GeeksforGeeks | 28 Jun, 2021
Consider the following relations:
R1(a,b) iff (a+b) is even over the set of integers
R2(a,b) iff (a+b) is odd over the set of integers
R3(a,b) iff a.b > 0 over the set of non-zero rational numbers
R4(a,b) iff |a - b| <= 2 over the set of natural numbers
Which of the following statements is correct?(A) R1 a... | [
{
"code": null,
"e": 24171,
"s": 24143,
"text": "\n28 Jun, 2021"
},
{
"code": null,
"e": 24205,
"s": 24171,
"text": "Consider the following relations:"
},
{
"code": null,
"e": 24425,
"s": 24205,
"text": "R1(a,b) iff (a+b) is even over the set of integers\nR2(a... |
Add alpha to an existing Matplotlib colormap | To add apha to an existing matplotlib colormap, we can take the following steps −
Create data with a 4×4 dimension array using numpy.
Create data with a 4×4 dimension array using numpy.
Get the colormap using plt.cm.RdBU.
Get the colormap using plt.cm.RdBU.
Create a new colormap using numpy.
Create a new colormap using... | [
{
"code": null,
"e": 1144,
"s": 1062,
"text": "To add apha to an existing matplotlib colormap, we can take the following steps −"
},
{
"code": null,
"e": 1196,
"s": 1144,
"text": "Create data with a 4×4 dimension array using numpy."
},
{
"code": null,
"e": 1248,
"... |
How can we capitalize only first letter of a string with the help of MySQL function/s? | Actually, there is no single function in MySQL to capitalize only first letter of the string. We need to use nesting of functions and for this case, we can use UPPER() and LOWER() with SUBSTRING() functions. To understand it, we are using data, given as below, from ‘emp_tbl’.
mysql> Select * from emp_tbl;
+----+-------... | [
{
"code": null,
"e": 1339,
"s": 1062,
"text": "Actually, there is no single function in MySQL to capitalize only first letter of the string. We need to use nesting of functions and for this case, we can use UPPER() and LOWER() with SUBSTRING() functions. To understand it, we are using data, given as... |
Stock Market Data Collection & Feature Engineering Using Python | by Posey | Towards Data Science | Finding appropriate data and pre-processing that data is arguably the most important part of all modern machine learning problems. In an age of unlimited libraries, APIs, and guides for how to build and implement optimal models, the actual data is overlooked. The advice is usually as simple as, “just find some data” or... | [
{
"code": null,
"e": 1038,
"s": 172,
"text": "Finding appropriate data and pre-processing that data is arguably the most important part of all modern machine learning problems. In an age of unlimited libraries, APIs, and guides for how to build and implement optimal models, the actual data is overlo... |
What is boxing and unboxing in Java? | Wrapper classes are those whose objects wraps a primitive data type within them. In the java.lang package java provides a separate class for each of the primitive data type namely Byte, Character, Double, Integer, Float, Long, Short.
Converting primitive datatype to object is called boxing.
Integer obj = new Integer ("... | [
{
"code": null,
"e": 1296,
"s": 1062,
"text": "Wrapper classes are those whose objects wraps a primitive data type within them. In the java.lang package java provides a separate class for each of the primitive data type namely Byte, Character, Double, Integer, Float, Long, Short."
},
{
"code... |
Calendar function in Python | Python has an in built module called calendar which operation is related to calendar. There are some calendar functions in Python.
This function shows the year, width of characters, no. of lines per week and column separations.
print ("The calendar of 2014 is : ")
print (calendar.calendar(2014,3,1,4))
The calendar of ... | [
{
"code": null,
"e": 1193,
"s": 1062,
"text": "Python has an in built module called calendar which operation is related to calendar. There are some calendar functions in Python."
},
{
"code": null,
"e": 1290,
"s": 1193,
"text": "This function shows the year, width of characters, ... |
Unlocking the True Power of Support Vector Regression | by Ashwin Raj | Towards Data Science | SVMs or Support Vector Machines are one of the most popular and widely used algorithm for dealing with classification problems in machine learning. However, the use of SVMs in regression is not very well documented. This algorithm acknowledges the presence of non-linearity in the data and provides a proficient predicti... | [
{
"code": null,
"e": 501,
"s": 171,
"text": "SVMs or Support Vector Machines are one of the most popular and widely used algorithm for dealing with classification problems in machine learning. However, the use of SVMs in regression is not very well documented. This algorithm acknowledges the presenc... |
Amazon Interview Experience for SDE-II (Virtual Rounds) - GeeksforGeeks | 22 Aug, 2021
I got a call from an Amazon recruiter as I was referred by one of my friends for the role. She sent me the coding test link which I had to complete within a week. Once I completed the test, I got a call to schedule the interviews in two weeks. 3 interviews were held on Amazon Chime as per schedule. Post th... | [
{
"code": null,
"e": 24786,
"s": 24758,
"text": "\n22 Aug, 2021"
},
{
"code": null,
"e": 25277,
"s": 24786,
"text": "I got a call from an Amazon recruiter as I was referred by one of my friends for the role. She sent me the coding test link which I had to complete within a week. ... |
Elasticsearch - Analysis | When a query is processed during a search operation, the content in any index is analyzed by the analysis module. This module consists of analyzer, tokenizer, tokenfilters and charfilters. If no analyzer is defined, then by default the built in analyzers, token, filters and tokenizers get registered with analysis modul... | [
{
"code": null,
"e": 2904,
"s": 2581,
"text": "When a query is processed during a search operation, the content in any index is analyzed by the analysis module. This module consists of analyzer, tokenizer, tokenfilters and charfilters. If no analyzer is defined, then by default the built in analyzer... |
Introduction to Sequelize in NodeJS | Sequelize follows a promise-based Node.js ORM structure for different databases like – Postgres, MySQL, MariaDB, SQLite and Microsoft SQL Server. Sequelize have multiple features which makes it easy to implement and use.
Some of the main features of sequelize are as follows −
Sequelize is a third-party package.
Sequeli... | [
{
"code": null,
"e": 1283,
"s": 1062,
"text": "Sequelize follows a promise-based Node.js ORM structure for different databases like – Postgres, MySQL, MariaDB, SQLite and Microsoft SQL Server. Sequelize have multiple features which makes it easy to implement and use."
},
{
"code": null,
... |
CSS | writing-mode Property - GeeksforGeeks | 09 Nov, 2021
The writing-mode CSS property is used to signify whether the lines of text are laid out horizontally or vertically and also the direction in which the block progress.
Syntax:
writing-mode: horizontal-tb|vertical-rl|vertical-lr;
Default Value : Its default value is horizontal-tb.
Property values:
horizonta... | [
{
"code": null,
"e": 23666,
"s": 23638,
"text": "\n09 Nov, 2021"
},
{
"code": null,
"e": 23833,
"s": 23666,
"text": "The writing-mode CSS property is used to signify whether the lines of text are laid out horizontally or vertically and also the direction in which the block progre... |
Convert key-values list to flat dictionary in Python | When it is required to convert a dictionary, that contains pairs of key values into a flat list, dictionary comprehension can be used.
It iterates through the dictionary and zips them using the ‘zip’ method.
The zip method takes iterables, aggregates them into a tuple, and returns it as the result.
Below is a demonstra... | [
{
"code": null,
"e": 1197,
"s": 1062,
"text": "When it is required to convert a dictionary, that contains pairs of key values into a flat list, dictionary comprehension can be used."
},
{
"code": null,
"e": 1270,
"s": 1197,
"text": "It iterates through the dictionary and zips the... |
Ensemble learning: A case study from the 1994 US Census database | by Vinícius Campos | Towards Data Science | Before we start to understand what is ensemble learning and how is it works, we need to know the dataset used in this case study.
The dataset used is a subset of the 1994 US Census database, which was provided by Barry Becker and is available at UCI Machine Learning Repository. The prediction task of this repository is... | [
{
"code": null,
"e": 302,
"s": 172,
"text": "Before we start to understand what is ensemble learning and how is it works, we need to know the dataset used in this case study."
},
{
"code": null,
"e": 605,
"s": 302,
"text": "The dataset used is a subset of the 1994 US Census datab... |
Convert number to list of integers in Python | As part of data manipulation in Python we may sometimes need to convert a given number into a list which contains the digits from that number. In this article we'll see the approaches to achieve this.
In the below approach we apply the str function to the given number and then convert into integer through identity func... | [
{
"code": null,
"e": 1263,
"s": 1062,
"text": "As part of data manipulation in Python we may sometimes need to convert a given number into a list which contains the digits from that number. In this article we'll see the approaches to achieve this."
},
{
"code": null,
"e": 1428,
"s": ... |
Sentiment Analysis with Deep Learning of Netflix Reviews | by Artem Oppermann | Towards Data Science | In this article, I will cover the topic of Sentiment Analysis and how to implement a Deep Learning model that can recognize and classify human emotions in Netflix reviews.
One of the most important elements for businesses is being in touch with its customer base. It is vital for these firms to know exactly what consume... | [
{
"code": null,
"e": 344,
"s": 172,
"text": "In this article, I will cover the topic of Sentiment Analysis and how to implement a Deep Learning model that can recognize and classify human emotions in Netflix reviews."
},
{
"code": null,
"e": 609,
"s": 344,
"text": "One of the mos... |
Customizing Plots with Python Matplotlib | by Carolina Bento | Towards Data Science | A central part of Data Science and Data Analysis is how you visualize the data. How you make use of visualizations tools has an important role in defining how you communicate insights.
My language of choice to explore and visualize data is Python.
In this article, I want to walk you through my framework for going from ... | [
{
"code": null,
"e": 356,
"s": 171,
"text": "A central part of Data Science and Data Analysis is how you visualize the data. How you make use of visualizations tools has an important role in defining how you communicate insights."
},
{
"code": null,
"e": 419,
"s": 356,
"text": "M... |
HTTP - Caching | HTTP is typically used for distributed information systems, where performance can be improved by the use of response caches. The HTTP/1.1 protocol includes a number of elements intended to make caching work.
The goal of caching in HTTP/1.1 is to eliminate the need to send requests in many cases, and to eliminate the ne... | [
{
"code": null,
"e": 1987,
"s": 1779,
"text": "HTTP is typically used for distributed information systems, where performance can be improved by the use of response caches. The HTTP/1.1 protocol includes a number of elements intended to make caching work."
},
{
"code": null,
"e": 2147,
... |
Product of unique prime factors of a number - GeeksforGeeks | 04 May, 2021
Given a number n, we need to find the product of all of its unique prime factors. Prime factors: It is basically a factor of the number that is a prime number itself. Examples :
Input: num = 10
Output: Product is 10
Explanation:
Here, the input number is 10 having only 2 prime factors and they are 5 and ... | [
{
"code": null,
"e": 24510,
"s": 24482,
"text": "\n04 May, 2021"
},
{
"code": null,
"e": 24690,
"s": 24510,
"text": "Given a number n, we need to find the product of all of its unique prime factors. Prime factors: It is basically a factor of the number that is a prime number itse... |
LISP - Quick Guide | John McCarthy invented LISP in 1958, shortly after the development of FORTRAN. It was first implemented by Steve Russell on an IBM 704 computer.
It is particularly suitable for Artificial Intelligence programs, as it processes symbolic information effectively.
Common Lisp originated, during the 1980s and 1990s, in an a... | [
{
"code": null,
"e": 2205,
"s": 2060,
"text": "John McCarthy invented LISP in 1958, shortly after the development of FORTRAN. It was first implemented by Steve Russell on an IBM 704 computer."
},
{
"code": null,
"e": 2321,
"s": 2205,
"text": "It is particularly suitable for Artif... |
Bootstrap 4 - Code | It is used to display inline and multiline blocks of code in the document.
You can display the inline code snippet with help of <code> tag and to display the multiple lines of code, use the <pre> tag.
The following example specifies displaying of inline and multiline blocks of code in the document −
<html lang = "en">
... | [
{
"code": null,
"e": 1891,
"s": 1816,
"text": "It is used to display inline and multiline blocks of code in the document."
},
{
"code": null,
"e": 2017,
"s": 1891,
"text": "You can display the inline code snippet with help of <code> tag and to display the multiple lines of code, ... |
How to handle a python exception within a loop? | We can the exception in the code by rewriting it as follows
a=[]
foo = 'redbullz'
try:
for i in foo:
a.append(i)
print a[8]
except Exception as e:
print e
We get following output
list index out of range
Process finished with exit code 0 | [
{
"code": null,
"e": 1122,
"s": 1062,
"text": "We can the exception in the code by rewriting it as follows"
},
{
"code": null,
"e": 1217,
"s": 1122,
"text": "a=[]\nfoo = 'redbullz'\ntry:\nfor i in foo:\na.append(i)\nprint a[8]\nexcept Exception as e:\nprint e"
},
{
"code"... |
Find array whose elements are XOR of adjacent elements in given array - GeeksforGeeks | 14 Sep, 2021
Given an array arr[] consisting of N integers, the task is to re-construct an array arr[] such that the values in arr[] are obtained by doing XOR of the adjacent elements in the array. Print the array elements.
Examples:
Input: arr[ ] = {10, 11, 1, 2, 3} Output: 1 10 3 1 3 Explanation: At index 0, arr[0] x... | [
{
"code": null,
"e": 24716,
"s": 24688,
"text": "\n14 Sep, 2021"
},
{
"code": null,
"e": 24927,
"s": 24716,
"text": "Given an array arr[] consisting of N integers, the task is to re-construct an array arr[] such that the values in arr[] are obtained by doing XOR of the adjacent e... |
pthread_cancel() in C | The threa_cancel() is used to cancel one particular thread by the thread id. This function sends one cancellation request to the thread for termination. The syntax of the pthread_cancel() is like below −
int pthread_cancel(pthread_t th);
Now, let us see how to cancel threads using this function.
#include <stdio.h>
#inc... | [
{
"code": null,
"e": 1266,
"s": 1062,
"text": "The threa_cancel() is used to cancel one particular thread by the thread id. This function sends one cancellation request to the thread for termination. The syntax of the pthread_cancel() is like below −"
},
{
"code": null,
"e": 1300,
"s... |
Octal literals in C - GeeksforGeeks | 19 Aug, 2018
When we initialize a value by putting ‘0’ before a number, the number is treated as octal. For instance ’10’ is read as 10 but ‘010’ is read as 8.
Examples:
Input : 0101
Output : 65
Input : 01010
Output : 520
#include<iostream>using namespace std;int main(){ int x = 0101; cout << x; return 0... | [
{
"code": null,
"e": 23935,
"s": 23907,
"text": "\n19 Aug, 2018"
},
{
"code": null,
"e": 24082,
"s": 23935,
"text": "When we initialize a value by putting ‘0’ before a number, the number is treated as octal. For instance ’10’ is read as 10 but ‘010’ is read as 8."
},
{
"c... |
Matplotlib Animations in Jupyter Notebook | by B. Chen | Towards Data Science | Matplotlib is one of the most popular plotting libraries for exploratory data analysis. It’s the default plotting backend in Pandas and other popular plotting libraries are based on it, for instance, seaborn. Plotting a static graph should work well in most cases, but when you are running simulations or doing time-seri... | [
{
"code": null,
"e": 516,
"s": 47,
"text": "Matplotlib is one of the most popular plotting libraries for exploratory data analysis. It’s the default plotting backend in Pandas and other popular plotting libraries are based on it, for instance, seaborn. Plotting a static graph should work well in mos... |
Normal BST to Balanced BST | Practice | GeeksforGeeks | Given a Binary Search Tree, modify the given BST such that itis balanced and has minimum possible height.
Examples :
Input:
30
/
20
/
10
Output:
20
/ \
10 30
Input:
4
/
3
/
2
/
1
Output:
3 3 2
/ \ ... | [
{
"code": null,
"e": 344,
"s": 238,
"text": "Given a Binary Search Tree, modify the given BST such that itis balanced and has minimum possible height."
},
{
"code": null,
"e": 355,
"s": 344,
"text": "Examples :"
},
{
"code": null,
"e": 695,
"s": 355,
"text": "... |
org.json - JSONObject | JSONObject class is a unordered collection of key-value pairs. It provides methods to access values by key and to put values. Following types are supported −
Boolean
Boolean
JSONArray
JSONArray
JSONObject
JSONObject
Number
Number
String
String
JSONObject.NULL object
JSONObject.NULL object
import org.json.JSONArray;
imp... | [
{
"code": null,
"e": 2133,
"s": 1975,
"text": "JSONObject class is a unordered collection of key-value pairs. It provides methods to access values by key and to put values. Following types are supported −"
},
{
"code": null,
"e": 2141,
"s": 2133,
"text": "Boolean"
},
{
"c... |
Ethical Hacking - TCP/IP Hijacking | TCP/IP Hijacking is when an authorized user gains access to a genuine network connection of another user. It is done in order to bypass the password authentication which is normally the start of a session.
In theory, a TCP/IP connection is established as shown below −
To hijack this connection, there are two possibilit... | [
{
"code": null,
"e": 2685,
"s": 2479,
"text": "TCP/IP Hijacking is when an authorized user gains access to a genuine network connection of another user. It is done in order to bypass the password authentication which is normally the start of a session."
},
{
"code": null,
"e": 2748,
... |
How to plot a function with ggplot2 in R? | Plotting a function is very easy with curve function but we can do it with ggplot2 as well. Since ggplot2 provides a better-looking plot, it is common to use it for plotting instead of other plotting functions. To plot a function, we should specify the function under stat_function in ggplot.
Consider the below data fra... | [
{
"code": null,
"e": 1355,
"s": 1062,
"text": "Plotting a function is very easy with curve function but we can do it with ggplot2 as well. Since ggplot2 provides a better-looking plot, it is common to use it for plotting instead of other plotting functions. To plot a function, we should specify the ... |
C++ Program to Encode a Message Using Playfair Cipher | In this scheme, pairs of letters are encrypted, instead of single letters as in the case of simple substitution cipher.
In playfair cipher, initially a key table is created. The key table is a 5×5 grid of alphabets that acts as the key for encrypting the plaintext. Each of the 25 alphabets must be unique and one letter... | [
{
"code": null,
"e": 1182,
"s": 1062,
"text": "In this scheme, pairs of letters are encrypted, instead of single letters as in the case of simple substitution cipher."
},
{
"code": null,
"e": 1536,
"s": 1182,
"text": "In playfair cipher, initially a key table is created. The key ... |
Ruby | Array intersection operation - GeeksforGeeks | 07 Jan, 2020
Array#&() is a Array class method which performs set intersection operation on the arrays. And returns the common of the two arrays.
Syntax: Array.&()
Parameter: Arrays for performing the intersection operation.
Return: Common elements from both the arrays.
Example #1 :
# Ruby code for &() method# showing ... | [
{
"code": null,
"e": 23752,
"s": 23724,
"text": "\n07 Jan, 2020"
},
{
"code": null,
"e": 23885,
"s": 23752,
"text": "Array#&() is a Array class method which performs set intersection operation on the arrays. And returns the common of the two arrays."
},
{
"code": null,
... |
Java Examples - Merge two arrays | How to merge two arrays ?
This example shows how to merge two arrays into a single array by the use of list.Addall(array1.asList(array2) method of List class and Arrays.toString () method of Array class.
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
public class Main {
public static vo... | [
{
"code": null,
"e": 2094,
"s": 2068,
"text": "How to merge two arrays ?"
},
{
"code": null,
"e": 2272,
"s": 2094,
"text": "This example shows how to merge two arrays into a single array by the use of list.Addall(array1.asList(array2) method of List class and Arrays.toString () m... |
Create a sticky navbar with CSS | To create a sticky navbar, use the position: sticky; property. You can try to run the following code to create a sticky navbar,
Live Demo
<!DOCTYPE html>
<html>
<head>
<style>
ul {
list-style-type: none;
position: sticky;
overflow: hidden;
top: 0;
... | [
{
"code": null,
"e": 1190,
"s": 1062,
"text": "To create a sticky navbar, use the position: sticky; property. You can try to run the following code to create a sticky navbar,"
},
{
"code": null,
"e": 1200,
"s": 1190,
"text": "Live Demo"
},
{
"code": null,
"e": 2882,
... |
Fundamentals of Supervised Sentiment Analysis | by Eunjoo Byeon | Towards Data Science | In this post, I will explain a few basic machine learning approaches in classifying tweet sentiment and how to run them in Python.
Sentiment analysis is used to identify the affect or emotion (positive, negative, or neutral) of the data. For a business, it is a simple way to determine customers’ reactions towards the p... | [
{
"code": null,
"e": 302,
"s": 171,
"text": "In this post, I will explain a few basic machine learning approaches in classifying tweet sentiment and how to run them in Python."
},
{
"code": null,
"e": 918,
"s": 302,
"text": "Sentiment analysis is used to identify the affect or em... |
Perl Quote-like Operators Example | There are following Quote-like operators supported by Perl language. In the following table, a {} represents any pair of delimiters you choose.
q{ }
Encloses a string with-in single quotes
Example − q{abcd} gives 'abcd'
qq{ }
Encloses a string with-in double quotes
Example − qq{abcd} gives "abcd"
qx{ }
Encloses a strin... | [
{
"code": null,
"e": 2364,
"s": 2220,
"text": "There are following Quote-like operators supported by Perl language. In the following table, a {} represents any pair of delimiters you choose."
},
{
"code": null,
"e": 2369,
"s": 2364,
"text": "q{ }"
},
{
"code": null,
"... |
QlikView - Aggregate Functions | QlikView Aggregate functions are used to produce aggregate data from the rows of the table. The functions are applied to the columns when creating the load script. Given below is a sample list of Aggregate functions. We also need to apply the Group by clause appropriately when applying the aggregate functions.
SUM give... | [
{
"code": null,
"e": 3232,
"s": 2920,
"text": "QlikView Aggregate functions are used to produce aggregate data from the rows of the table. The functions are applied to the columns when creating the load script. Given below is a sample list of Aggregate functions. We also need to apply the Group by c... |
HTML DOM Input DatetimeLocal step Property | The HTML DOM Input DatetimeLocal step property determines the legal intervals for seconds or milliseconds.
Following is the syntax −
Returning number value
inputDatetimeLocalObject.step
Setting step attribute to a number value
inputDatetimeLocalObject.step = number
Parameter number values −
Let us see an example of Inp... | [
{
"code": null,
"e": 1169,
"s": 1062,
"text": "The HTML DOM Input DatetimeLocal step property determines the legal intervals for seconds or milliseconds."
},
{
"code": null,
"e": 1195,
"s": 1169,
"text": "Following is the syntax −"
},
{
"code": null,
"e": 1218,
"s... |
How to list all collections in the Mongo shell? | To list all collections in Mongo shell, you can use the function getCollectionNames().
The syntax is as follows −
db.getCollectionNames();
You can use another command which is collections. The syntax is as follows −
show collections;
To list all collections in Mongo, use the above two functions. The query is as follows... | [
{
"code": null,
"e": 1149,
"s": 1062,
"text": "To list all collections in Mongo shell, you can use the function getCollectionNames()."
},
{
"code": null,
"e": 1176,
"s": 1149,
"text": "The syntax is as follows −"
},
{
"code": null,
"e": 1201,
"s": 1176,
"text"... |
Swift - Properties | Swift 4 language provides properties for class, enumeration or structure to associate values. Properties can be further classified into Stored properties and Computed properties.
Difference between Stored Properties and Computed Properties
Both Stored and Computed properties are associated with instances type. When the... | [
{
"code": null,
"e": 2432,
"s": 2253,
"text": "Swift 4 language provides properties for class, enumeration or structure to associate values. Properties can be further classified into Stored properties and Computed properties."
},
{
"code": null,
"e": 2493,
"s": 2432,
"text": "Dif... |
Private and final methods in Java Programming | In Java private methods are the methods having private access modifier and are restricted to be access in the defining class only and are not visible in their child class due to which are not eligible for overridden. However, we can define a method with the same name in the child class and could access in parent class.... | [
{
"code": null,
"e": 1383,
"s": 1062,
"text": "In Java private methods are the methods having private access modifier and are restricted to be access in the defining class only and are not visible in their child class due to which are not eligible for overridden. However, we can define a method with... |
How to read a text file in Selenium with python? | We can read a text file in Selenium with python by first creating a txt file and having a content on it.
First of all, we need to open the file and mention the path of the location of the text file as an argument. There are multiple reading methods to perform these operations.
read() – It reads the entire content of th... | [
{
"code": null,
"e": 1167,
"s": 1062,
"text": "We can read a text file in Selenium with python by first creating a txt file and having a content on it."
},
{
"code": null,
"e": 1340,
"s": 1167,
"text": "First of all, we need to open the file and mention the path of the location o... |
How to Use int as long long int for Competitive Programming? - GeeksforGeeks | 28 Dec, 2021
Most of the time, input constraints in Competitive programming questions are bigger than the limits of int. Therefore, there is a need to use long int or even long long int. Here let us take two cases so that if a naive user writes correct logic still input is not getting accepted can get to know where the... | [
{
"code": null,
"e": 25367,
"s": 25339,
"text": "\n28 Dec, 2021"
},
{
"code": null,
"e": 25702,
"s": 25367,
"text": "Most of the time, input constraints in Competitive programming questions are bigger than the limits of int. Therefore, there is a need to use long int or even long... |
How to disable zoom on a mobile web page using CSS? - GeeksforGeeks | 23 Aug, 2021
To disable the zooming option with the multi-touch gesture we can use surefox browser but still, a user can zoom in or out by double tapping on the screen. We can use the <meta> tag to disable zoom in and out on a mobile web page.Syntax:
<meta name="viewport" content= "width=device-width, user-scalable=n... | [
{
"code": null,
"e": 26737,
"s": 26709,
"text": "\n23 Aug, 2021"
},
{
"code": null,
"e": 26977,
"s": 26737,
"text": "To disable the zooming option with the multi-touch gesture we can use surefox browser but still, a user can zoom in or out by double tapping on the screen. We can ... |
How useEffect works in ReactJS ? - GeeksforGeeks | 26 May, 2021
When we want to perform something after each render of component then we can use the useEffect() hook. By using this Hook, we tell React that our component needs to do something after render by passing a function. React remember the function we passed in useEffect() hook and call it later after performing ... | [
{
"code": null,
"e": 26071,
"s": 26043,
"text": "\n26 May, 2021"
},
{
"code": null,
"e": 26395,
"s": 26071,
"text": "When we want to perform something after each render of component then we can use the useEffect() hook. By using this Hook, we tell React that our component needs t... |
Node.js filehandle.writeFile() Method from class: FileHandle - GeeksforGeeks | 29 Jun, 2020
The filehandle.writeFile() method is used to defined in the File System module of Node.js. The File System module is basically to interact with the hard disk of the user’s computer. The fs.writeFile() method asynchronously writes data to a file, replacing the file if it already exists.
Syntax:
filehandle.w... | [
{
"code": null,
"e": 25865,
"s": 25837,
"text": "\n29 Jun, 2020"
},
{
"code": null,
"e": 26152,
"s": 25865,
"text": "The filehandle.writeFile() method is used to defined in the File System module of Node.js. The File System module is basically to interact with the hard disk of th... |
Array vs Matrix in R Programming - GeeksforGeeks | 11 Jun, 2021
The data structure is a particular way of organizing data in a computer so that it can be used effectively. The idea is to reduce the space and time complexities of different tasks. Data structures in R programming are tools for holding multiple values. The two most important data structures in R are Array... | [
{
"code": null,
"e": 26188,
"s": 26160,
"text": "\n11 Jun, 2021"
},
{
"code": null,
"e": 26513,
"s": 26188,
"text": "The data structure is a particular way of organizing data in a computer so that it can be used effectively. The idea is to reduce the space and time complexities o... |
How to Access <tr> element from Table using JavaScript ? - GeeksforGeeks | 11 May, 2020
Given an HTML table and the task is to access the table element from the Controller and highlight any row that we want.
Approach: We will use a basic DOM operation in JavaScript to access table row element. We will be adding highlight class to the row that we click, if the highlight class is already presen... | [
{
"code": null,
"e": 26621,
"s": 26593,
"text": "\n11 May, 2020"
},
{
"code": null,
"e": 26741,
"s": 26621,
"text": "Given an HTML table and the task is to access the table element from the Controller and highlight any row that we want."
},
{
"code": null,
"e": 26980,... |
Remove odd indexed characters from a given string - GeeksforGeeks | 07 Sep, 2020
Given string str of size N, the task is to remove the characters present at odd indices (0-based indexing) of a given string.
Examples :
Input: str = “abcdef”Output: aceExplanation:The characters ‘b’, ‘d’ and ‘f’ are present at odd indices, i.e. 1, 3 and 5 respectively. Therefore, they are removed from th... | [
{
"code": null,
"e": 25517,
"s": 25489,
"text": "\n07 Sep, 2020"
},
{
"code": null,
"e": 25643,
"s": 25517,
"text": "Given string str of size N, the task is to remove the characters present at odd indices (0-based indexing) of a given string."
},
{
"code": null,
"e": ... |
How to render as emphasized text using HTML ? - GeeksforGeeks | 31 Dec, 2020
The <em> tag in HTML is a phrase tag and used to emphasize the text content. It is similar to <italic> tag. The main difference between these two tag is the <em> tag semantically emphasizes on the important word or section of words while <i> tag is just offset text conventionally styled in italic to show a... | [
{
"code": null,
"e": 26621,
"s": 26593,
"text": "\n31 Dec, 2020"
},
{
"code": null,
"e": 26954,
"s": 26621,
"text": "The <em> tag in HTML is a phrase tag and used to emphasize the text content. It is similar to <italic> tag. The main difference between these two tag is the <em> t... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.