title stringlengths 3 221 | text stringlengths 17 477k | parsed listlengths 0 3.17k |
|---|---|---|
KNN Algorithm - Finding Nearest Neighbors | K-nearest neighbors (KNN) algorithm is a type of supervised ML algorithm which can be used for both classification as well as regression predictive problems. However, it is mainly used for classification predictive problems in industry. The following two properties would define KNN well −
Lazy learning algorithm − KNN ... | [
{
"code": null,
"e": 2594,
"s": 2304,
"text": "K-nearest neighbors (KNN) algorithm is a type of supervised ML algorithm which can be used for both classification as well as regression predictive problems. However, it is mainly used for classification predictive problems in industry. The following tw... |
Discrete Colour Scale in Plotly Python | by Kyle Pastor | Towards Data Science | I like to use the python library for Plotly, however I noticed that when I am trying to use the Graph Object to do things like make Choropleth maps I was having trouble getting discrete colour ranges for my data.
I like to segment my data into regions based on category. For example if I am trying to show three categori... | [
{
"code": null,
"e": 384,
"s": 171,
"text": "I like to use the python library for Plotly, however I noticed that when I am trying to use the Graph Object to do things like make Choropleth maps I was having trouble getting discrete colour ranges for my data."
},
{
"code": null,
"e": 812,
... |
Creating a Page with Sidebar and Main Content Area using HTML & CSS | A webpage with fluid sidebar and main content area is created by setting the size of html and body to 100%.
The following example illustrates this.
Live Demo
<!DOCTYPE html>
<html>
<head>
<style>
html,body {
height: 100%;
color: white;
font-size: 2em;
line-height: 200px;
}
#parent {
display: table;
w... | [
{
"code": null,
"e": 1170,
"s": 1062,
"text": "A webpage with fluid sidebar and main content area is created by setting the size of html and body to 100%."
},
{
"code": null,
"e": 1210,
"s": 1170,
"text": "The following example illustrates this."
},
{
"code": null,
"e... |
How to Use Unsupervised Clustering on Well Log Data with Python | by Andy McDonald | Towards Data Science | Understanding the subsurface lithology is an important task in geoscience and petrophysics. Using a variety of electrical measurements generated from well logging technology we are able to make inferences about the underlying geology, such as the lithology, facies, porosity, and permeability.
Machine Learning algorithm... | [
{
"code": null,
"e": 465,
"s": 171,
"text": "Understanding the subsurface lithology is an important task in geoscience and petrophysics. Using a variety of electrical measurements generated from well logging technology we are able to make inferences about the underlying geology, such as the litholog... |
Bootstrap 4 .d-inline-flex class | Use the d-inline-flex class in Bootstrap to create an inline flexbox container −
<div class="d-inline-flex p-3 bg-primary">
Now add the flex-items inside it as in the following code snippet −
<div class="d-inline-flex p-3 bg-primary">
<div class="p-2 bg-danger">
One
</div>
<div class="p-2 bg-warning">
T... | [
{
"code": null,
"e": 1143,
"s": 1062,
"text": "Use the d-inline-flex class in Bootstrap to create an inline flexbox container −"
},
{
"code": null,
"e": 1186,
"s": 1143,
"text": "<div class=\"d-inline-flex p-3 bg-primary\">"
},
{
"code": null,
"e": 1254,
"s": 1186... |
How to Enable Spring Boot CORS Example - Spring Boot @CrossOrigin | PROGRAMMINGJava ExamplesC Examples
Java Examples
C Examples
C Tutorials
aws
JAVAEXCEPTIONSCOLLECTIONSSWINGJDBC
EXCEPTIONS
COLLECTIONS
SWING
JDBC
JAVA 8
SPRING
SPRING BOOT
HIBERNATE
PYTHON
PHP
JQUERY
PROGRAMMINGJava ExamplesC Examples
Java Examples
C Examples
C Tutorials
aws
In this tutorial, we are going to see How to ... | [
{
"code": null,
"e": 158,
"s": 123,
"text": "PROGRAMMINGJava ExamplesC Examples"
},
{
"code": null,
"e": 172,
"s": 158,
"text": "Java Examples"
},
{
"code": null,
"e": 183,
"s": 172,
"text": "C Examples"
},
{
"code": null,
"e": 195,
"s": 183,
... |
Adding Water Marks to the Images in a PDF using Java - GeeksforGeeks | 17 Jun, 2021
In this article, we will learn how to add watermarks to the images in a PDF document using Java. Adding watermarks to the images in a PDF, we will use the iText library. These are the steps that should be followed to add watermarks to the images in a PDF using java.
1. Creating a PdfWriter object
The PdfWr... | [
{
"code": null,
"e": 23557,
"s": 23529,
"text": "\n17 Jun, 2021"
},
{
"code": null,
"e": 23824,
"s": 23557,
"text": "In this article, we will learn how to add watermarks to the images in a PDF document using Java. Adding watermarks to the images in a PDF, we will use the iText li... |
Retrieving OpenStreetMap data in Python | by Abdishakur | Towards Data Science | If you want to retrieve Geospatial data from OpenStreetMap (OSM), you can download it, but that takes time and storage. Without leaving your development environment (Jupyter Notebooks), you can access and retrieve OpenStreetMap data. Imagine you are doing analysis and want to find out how many recreational facility or ... | [
{
"code": null,
"e": 532,
"s": 171,
"text": "If you want to retrieve Geospatial data from OpenStreetMap (OSM), you can download it, but that takes time and storage. Without leaving your development environment (Jupyter Notebooks), you can access and retrieve OpenStreetMap data. Imagine you are doing... |
Reduce Binary Array by replacing both 0s or both 1s pair with 0 and 10 or 01 pair with 1 | 20 Dec, 2021
Given a binary array arr[] of size N, the task is to find the last number remaining in the array after performing a set of operations. In each operation, select any two numbers and perform the following:
If both numbers are the same, remove them from the array and insert a 0.
If both numbers are different,... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n20 Dec, 2021"
},
{
"code": null,
"e": 232,
"s": 28,
"text": "Given a binary array arr[] of size N, the task is to find the last number remaining in the array after performing a set of operations. In each operation, select any two number... |
Common Bus System using multiplexers | 20 May, 2020
A typical computer has many registers and we need to transfer the information between these registers. A way to transfer the information is using the common bus system. In this article we shall discuss the common bus system using multiplexers.
Let’s discuss the common bus system with multiplexers.
The cons... | [
{
"code": null,
"e": 54,
"s": 26,
"text": "\n20 May, 2020"
},
{
"code": null,
"e": 298,
"s": 54,
"text": "A typical computer has many registers and we need to transfer the information between these registers. A way to transfer the information is using the common bus system. In th... |
Get the second last row of a table in MySQL? | You need to use ORDER BY clause to get the second last row of a table in MySQL.
The syntax is as follows.
select *from yourTableName order by yourColumnName DESC LIMIT 1,1;
To understand the above syntax, let us create a table. The query to create a table is as follows.
mysql> create table secondLastDemo
-> (
-> ... | [
{
"code": null,
"e": 1267,
"s": 1187,
"text": "You need to use ORDER BY clause to get the second last row of a table in MySQL."
},
{
"code": null,
"e": 1293,
"s": 1267,
"text": "The syntax is as follows."
},
{
"code": null,
"e": 1360,
"s": 1293,
"text": "selec... |
TypeScript | Array pop() Method | 18 Jun, 2020
The Array.pop() is an inbuilt TypeScript function which is used to removes the last element from an array and returns that element. Syntax:
array.pop();
Parameter: This methods does not accept any parameter. Return Value: This method returns the removed element from the array. Below examples illustrate Ar... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n18 Jun, 2020"
},
{
"code": null,
"e": 168,
"s": 28,
"text": "The Array.pop() is an inbuilt TypeScript function which is used to removes the last element from an array and returns that element. Syntax:"
},
{
"code": null,
"e"... |
SVN - Checkout Process | Subversion provides the checkout command to check out a working copy from a repository. Below command will create a new directory in the current working directory with the name project_repo. Don't bother about the repository URL, as most of the time, it is already provided by the subversion administrator with appropria... | [
{
"code": null,
"e": 2241,
"s": 1910,
"text": "Subversion provides the checkout command to check out a working copy from a repository. Below command will create a new directory in the current working directory with the name project_repo. Don't bother about the repository URL, as most of the time, it... |
Preview an image before uploading using jQuery | 13 Jun, 2022
In this article, we are going to discuss two methods to preview an image that is taken as input through a form. We are going to use the JavaScript constructor FileReader() to read the image provided and then we shall display it.
Example: Let us see the HTML structure with the CSS styling.
html
<!DOCTYPE... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n13 Jun, 2022"
},
{
"code": null,
"e": 258,
"s": 28,
"text": "In this article, we are going to discuss two methods to preview an image that is taken as input through a form. We are going to use the JavaScript constructor FileReader() to ... |
Alert Dialog with MultipleItemSelection in Android | 27 Oct, 2021
In the previous article Alert Dialog with SingleItemSelection in Android, we have seen that how the alert dialog is built for single item selection. In this article, it’s been discussed how to build an alert dialog with multiple item selection. Multiple Item selection dialogs are used when the user wants t... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n27 Oct, 2021"
},
{
"code": null,
"e": 495,
"s": 28,
"text": "In the previous article Alert Dialog with SingleItemSelection in Android, we have seen that how the alert dialog is built for single item selection. In this article, it’s been... |
Python | Queue using Doubly Linked List | 19 May, 2022
A Queue is a collection of objects that are inserted and removed using First in First out Principle(FIFO). Insertion is done at the back(Rear) of the Queue and elements are accessed and deleted from first(Front) location in the queue.
1. enqueue() : Adds element to the back of Queue.
2. dequeue() :... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n19 May, 2022"
},
{
"code": null,
"e": 263,
"s": 28,
"text": "A Queue is a collection of objects that are inserted and removed using First in First out Principle(FIFO). Insertion is done at the back(Rear) of the Queue and elements are ac... |
Python Program For Checking Linked List With A Loop Is Palindrome Or Not | 06 Jan, 2022
Given a linked list with a loop, the task is to find whether it is palindrome or not. You are not allowed to remove the loop.
Examples:
Input: 1 -> 2 -> 3 -> 2
/| |/
------- 1
Output: Palindrome
Linked list is 1 2 3 2 1 which is a
palindrome.
Input: 1 -> 2 -> 3 -> 4... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n06 Jan, 2022"
},
{
"code": null,
"e": 156,
"s": 28,
"text": "Given a linked list with a loop, the task is to find whether it is palindrome or not. You are not allowed to remove the loop. "
},
{
"code": null,
"e": 168,
"... |
Pigeonhole Sort | 14 Jun, 2022
Pigeonhole sorting is a sorting algorithm that is suitable for sorting lists of elements where the number of elements and the number of possible key values are approximately the same. It requires O(n + Range) time where n is number of elements in input array and ‘Range’ is number of possible values in arra... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n14 Jun, 2022"
},
{
"code": null,
"e": 387,
"s": 52,
"text": "Pigeonhole sorting is a sorting algorithm that is suitable for sorting lists of elements where the number of elements and the number of possible key values are approximately ... |
GATE | GATE CS 2021 | Set 2 | Question 63 | 23 May, 2021
Consider a pipelined processor with 5 stages, Instruction Fetch(IF), Instruction Decode(ID), Execute (EX), Memory Access (MEM), and Write Back (WB). Each stage of the pipeline, except the EX stage, takes one cycle. Assume that the ID stage merely decodes the instruction and the register read is performed i... | [
{
"code": null,
"e": 54,
"s": 26,
"text": "\n23 May, 2021"
},
{
"code": null,
"e": 599,
"s": 54,
"text": "Consider a pipelined processor with 5 stages, Instruction Fetch(IF), Instruction Decode(ID), Execute (EX), Memory Access (MEM), and Write Back (WB). Each stage of the pipelin... |
String.Split() Method in C# with Examples | 23 Jul, 2019
In C#, Split() is a string class method. The Split() method returns an array of strings generated by splitting of original string separated by the delimiters passed as a parameter in Split() method. The delimiters can be a character or an array of characters or an array of strings. Or you can also say that... | [
{
"code": null,
"e": 53,
"s": 25,
"text": "\n23 Jul, 2019"
},
{
"code": null,
"e": 589,
"s": 53,
"text": "In C#, Split() is a string class method. The Split() method returns an array of strings generated by splitting of original string separated by the delimiters passed as a para... |
Node.js process.stdin Property | 16 Mar, 2021
The process.stdin property is an inbuilt application programming interface of the process module which listens for the user input. The stdin property of the process object is a Readable Stream. It uses on() function to listen for the event.
Syntax:
process.stdin.on();
Return Value: It doesn’t return any va... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n16 Mar, 2021"
},
{
"code": null,
"e": 269,
"s": 28,
"text": "The process.stdin property is an inbuilt application programming interface of the process module which listens for the user input. The stdin property of the process object is ... |
Batch Script - Deleting Files | For deleting files, Batch Script provides the DEL command.
DEL [/P] [/F] [/S] [/Q] [/A[[:]attributes]] names
Following are the description of the options which can be presented to the DEL command.
Names
Specifies a list of one or more files or directories. Wildcards may be used to delete multiple files. If a directory... | [
{
"code": null,
"e": 2228,
"s": 2169,
"text": "For deleting files, Batch Script provides the DEL command."
},
{
"code": null,
"e": 2279,
"s": 2228,
"text": "DEL [/P] [/F] [/S] [/Q] [/A[[:]attributes]] names\n"
},
{
"code": null,
"e": 2367,
"s": 2279,
"text": "... |
\hspace - Tex Command | \hspace - Used to create horizontal space.
{ \hspace }
\hspace command draws horizontal space.
s\hspace7ex k\hspace6ex i\hspace5ex n\hspace4ex n\hspace3ex i\hspace2ex e\hspace1ex r
skinnier
s\hspace7ex k\hspace6ex i\hspace5ex n\hspace4ex n\hspace3ex i\hspace2ex e\hspace1ex r
skinnier
s\hspace7ex k\hspace6ex i\h... | [
{
"code": null,
"e": 8029,
"s": 7986,
"text": "\\hspace - Used to create horizontal space."
},
{
"code": null,
"e": 8041,
"s": 8029,
"text": "{ \\hspace }"
},
{
"code": null,
"e": 8081,
"s": 8041,
"text": "\\hspace command draws horizontal space."
},
{
... |
Bootstrap - Labels | This chapter covers Bootstrap labels. Labels are great for offering counts, tips, or other markup for pages. Use class .label to display labels as shown in the following example −
<h1>Example Heading <span class = "label label-default">Label</span></h1>
<h2>Example Heading <span class =" label label-default">Label</sp... | [
{
"code": null,
"e": 3511,
"s": 3331,
"text": "This chapter covers Bootstrap labels. Labels are great for offering counts, tips, or other markup for pages. Use class .label to display labels as shown in the following example −"
},
{
"code": null,
"e": 3808,
"s": 3511,
"text": "\n... |
Ngx-Bootstrap - TimePicker | ngx-bootstrap timepicker component provides a easy to use and highly configurable Time Picker component.
timepicker
timepicker
arrowkeys − boolean, if true the values of hours and minutes can be changed using the up/down arrow keys on the keyboard.
arrowkeys − boolean, if true the values of hours and minutes can be cha... | [
{
"code": null,
"e": 2205,
"s": 2100,
"text": "ngx-bootstrap timepicker component provides a easy to use and highly configurable Time Picker component."
},
{
"code": null,
"e": 2216,
"s": 2205,
"text": "timepicker"
},
{
"code": null,
"e": 2227,
"s": 2216,
"tex... |
C# program to check password validity | While creating a password, you may have seen the validation requirements on a website like a password should be strong and have −
Min 8 char and max 14 char
One lower case
No white space
One upper case
One special char
Let us see how to check the conditions one by one −
if (passwd.Length < 8 || passwd.Length > 14)
retu... | [
{
"code": null,
"e": 1192,
"s": 1062,
"text": "While creating a password, you may have seen the validation requirements on a website like a password should be strong and have −"
},
{
"code": null,
"e": 1219,
"s": 1192,
"text": "Min 8 char and max 14 char"
},
{
"code": nul... |
Java Program to generate random numbers with no duplicates | For random numbers in Java, create a Random class object −
Random randNum = new Random();
Now, create a HashSet to get only the unique elements i.e. no duplicates −
Set<Integer>set = new LinkedHashSet<Integer>();
Generate random numbers with Random class nextInt −
while (set.size() < 5) {
set.add(randNum.nextInt(5)+... | [
{
"code": null,
"e": 1121,
"s": 1062,
"text": "For random numbers in Java, create a Random class object −"
},
{
"code": null,
"e": 1152,
"s": 1121,
"text": "Random randNum = new Random();"
},
{
"code": null,
"e": 1227,
"s": 1152,
"text": "Now, create a HashSet... |
Getting Started with Apache Zeppelin on Amazon EMR, using AWS Glue, RDS, and S3 | by Gary A. Stafford | Towards Data Science | There is little question big data analytics, data science, artificial intelligence (AI), and machine learning (ML), a subcategory of AI, have all experienced a tremendous surge in popularity over the last 3–5 years. Behind the hype cycles and marketing buzz, these technologies are having a significant influence on all ... | [
{
"code": null,
"e": 774,
"s": 172,
"text": "There is little question big data analytics, data science, artificial intelligence (AI), and machine learning (ML), a subcategory of AI, have all experienced a tremendous surge in popularity over the last 3–5 years. Behind the hype cycles and marketing bu... |
Add 1 to number represented as array | Recursive Approach - GeeksforGeeks | 25 Mar, 2021
Given an array which represents a number, add 1 to the array. Suppose an array contain elements [1, 2, 3, 4] then the array represents decimal number 1234 and hence adding 1 to this would result 1235. So new array will be [1, 2, 3, 5].Examples:
Input : [1, 2, 3, 4]
Output : [1, 2, 3, 5]
Input : [1, 2,... | [
{
"code": null,
"e": 25056,
"s": 25028,
"text": "\n25 Mar, 2021"
},
{
"code": null,
"e": 25303,
"s": 25056,
"text": "Given an array which represents a number, add 1 to the array. Suppose an array contain elements [1, 2, 3, 4] then the array represents decimal number 1234 and henc... |
Querying Microsoft Graph API with Python | by Ephraim Mwai | Towards Data Science | In order to deliver a rich data-driven experience to your users, you are likely to integrate custom-built applications with your organization’s data. Microsoft Graph, a REST API, offers the ability to interact with data in Office 365. In this post, I will illustrate connecting to your Azure Active Directory (Azure AD) ... | [
{
"code": null,
"e": 607,
"s": 171,
"text": "In order to deliver a rich data-driven experience to your users, you are likely to integrate custom-built applications with your organization’s data. Microsoft Graph, a REST API, offers the ability to interact with data in Office 365. In this post, I will... |
How to match a non-white space equivalent using Java RegEx? | You can match the non-white space characters using the meta character "\\S".
import java.util.Scanner;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
public class Example {
public static void main(String args[]) {
//Reading String from user
System.out.println("Enter a String");
Sca... | [
{
"code": null,
"e": 1139,
"s": 1062,
"text": "You can match the non-white space characters using the meta character \"\\\\S\"."
},
{
"code": null,
"e": 1810,
"s": 1139,
"text": "import java.util.Scanner;\nimport java.util.regex.Matcher;\nimport java.util.regex.Pattern;\npublic c... |
ES6 - Date | The Date object is a datatype built into the JavaScript language. Date objects are created with the new Date () as shown in the following syntax.
Once a Date object is created, a number of methods allow you to operate on it. Most methods simply allow you to get and set the year, month, day, hour, minute, second, and mi... | [
{
"code": null,
"e": 2423,
"s": 2277,
"text": "The Date object is a datatype built into the JavaScript language. Date objects are created with the new Date () as shown in the following syntax."
},
{
"code": null,
"e": 2686,
"s": 2423,
"text": "Once a Date object is created, a num... |
C# | Remove from the specified index of a SortedList - GeeksforGeeks | 11 Oct, 2018
SortedList class is a collection of (key, value) pairs which are sorted according to keys. Those pairs can be accessible by key and as well as by index(zero-based indexing). This comes under System.Collections namespace. SortedList.RemoveAt(Int32) method is used to remove the element at the specified index... | [
{
"code": null,
"e": 25657,
"s": 25629,
"text": "\n11 Oct, 2018"
},
{
"code": null,
"e": 25989,
"s": 25657,
"text": "SortedList class is a collection of (key, value) pairs which are sorted according to keys. Those pairs can be accessible by key and as well as by index(zero-based ... |
Text Classification with BERT and Tensorflow in Ten Lines of Code | by Shuyi Wang | Towards Data Science | We all know BERT is a compelling language model which has already been applied to various kinds of downstream tasks, such as Sentiment Analysis and Question answering (QA). In some of them, it over-performed human beings!
Have you ever tried it on text binary classification?
Honestly, till recently, my answer was still... | [
{
"code": null,
"e": 393,
"s": 171,
"text": "We all know BERT is a compelling language model which has already been applied to various kinds of downstream tasks, such as Sentiment Analysis and Question answering (QA). In some of them, it over-performed human beings!"
},
{
"code": null,
"... |
How to Create Your Own Annotations in Java? - GeeksforGeeks | 24 Sep, 2021
Annotations are a form of metadata that provide information about the program but are not a part of the program itself. An Annotation does not affect the operation of the code they Annotate.
Now let us go through different types of java annotations present that are listed as follows:
Predefined annotation... | [
{
"code": null,
"e": 25715,
"s": 25687,
"text": "\n24 Sep, 2021"
},
{
"code": null,
"e": 25907,
"s": 25715,
"text": "Annotations are a form of metadata that provide information about the program but are not a part of the program itself. An Annotation does not affect the operation... |
NodeJS process.nextTick() Method | 08 Mar, 2021
The process object is one of the few global objects provided by the NodeJS core API. It can be accessed from anywhere, thus its methods can also be accessed. Such is a method called process.nextTick() which is used by developers in real-time applications every day to defer the execution of a function until... | [
{
"code": null,
"e": 53,
"s": 25,
"text": "\n08 Mar, 2021"
},
{
"code": null,
"e": 392,
"s": 53,
"text": "The process object is one of the few global objects provided by the NodeJS core API. It can be accessed from anywhere, thus its methods can also be accessed. Such is a method... |
XML Parsing in Android using DOM Parser | 23 Feb, 2021
Android DOM(Document Object Model) parser is a program that parses an XML document and extracts the required information from it. This parser uses an object-based approach for creating and parsing the XML files. In General, a DOM parser loads the XML file into the Android memory to parse the XML document. ... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n23 Feb, 2021"
},
{
"code": null,
"e": 551,
"s": 28,
"text": "Android DOM(Document Object Model) parser is a program that parses an XML document and extracts the required information from it. This parser uses an object-based approach for... |
How to Build Portfolio Website And Host It on GitHub Pages? | 11 Mar, 2022
In this article, you will learn
How to build your own portfolio website?
How to host your website on GitHub Pages for FREE?
You can showcase this portfolio on your resume. So let’s get started!!
We’ll look for some awesome, responsive portfolio design templates online which are free of cost. The site HTML5... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n11 Mar, 2022"
},
{
"code": null,
"e": 84,
"s": 52,
"text": "In this article, you will learn"
},
{
"code": null,
"e": 125,
"s": 84,
"text": "How to build your own portfolio website?"
},
{
"code": null,
"e... |
Minimum number of points to be removed to get remaining points on one side of axis | 22 Jun, 2022
We are given n points in a Cartesian plane. Our task is to find the minimum number of points that should be removed in order to get the remaining points on one side of any axis.
Examples :
Input : 4
1 1
2 2
-1 -1
-2 2
Output : 1
Explanation :
If we remove (-1, -1) then all t... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n22 Jun, 2022"
},
{
"code": null,
"e": 231,
"s": 52,
"text": "We are given n points in a Cartesian plane. Our task is to find the minimum number of points that should be removed in order to get the remaining points on one side of any ax... |
Number of cells a queen can move with obstacles on the chessboard | 14 Jun, 2022
Consider a N X N chessboard with a Queen and K obstacles. The Queen cannot pass through obstacles. Given the position (x, y) of Queen, the task is to find the number of cells the queen can move.
Examples:
Input : N = 8, x = 4, y = 4,
K = 0
Output : 27
Input : N = 8, x = 4, y = 4,
K = 1, ... | [
{
"code": null,
"e": 54,
"s": 26,
"text": "\n14 Jun, 2022"
},
{
"code": null,
"e": 249,
"s": 54,
"text": "Consider a N X N chessboard with a Queen and K obstacles. The Queen cannot pass through obstacles. Given the position (x, y) of Queen, the task is to find the number of cells... |
JSP - Server Response | In this chapter, we will discuss the Server Response in JSP. When a Web server responds to a HTTP request, the response typically consists of a status line, some response headers, a blank line, and the document. A typical response looks like this −
HTTP/1.1 200 OK
Content-Type: text/html
Header2: ...
...
HeaderN: ...
... | [
{
"code": null,
"e": 2622,
"s": 2373,
"text": "In this chapter, we will discuss the Server Response in JSP. When a Web server responds to a HTTP request, the response typically consists of a status line, some response headers, a blank line, and the document. A typical response looks like this −"
}... |
Maltego Tool in Kali Linux | 06 Jan, 2021
Maltego is an open-source intelligence forensic application. Which will help you to get more accurate information and in a smarter way. In simple words, it is an information-gathering tool.
Features of Maltego:
It is used for gathering information for security related work. It will save your time and mak... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n06 Jan, 2021"
},
{
"code": null,
"e": 219,
"s": 28,
"text": "Maltego is an open-source intelligence forensic application. Which will help you to get more accurate information and in a smarter way. In simple words, it is an information-g... |
Vector toString() method in Java with Example | 29 Jul, 2021
The java.util.Vector.toString() is an inbuilt method of Vector that is used to get a string representation of the objects of Vector in the form of a String representation of entries separated by “, “. So basically the toString() method is used to convert all the elements of Vector into String.Syntax:
Vect... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n29 Jul, 2021"
},
{
"code": null,
"e": 331,
"s": 28,
"text": "The java.util.Vector.toString() is an inbuilt method of Vector that is used to get a string representation of the objects of Vector in the form of a String representation of e... |
Friends Pairing Problem | 04 Apr, 2022
Given n friends, each one can remain single or can be paired up with some other friend. Each friend can be paired only once. Find out the total number of ways in which friends can remain single or can be paired up.
Examples:
Input : n = 3
Output : 4
Explanation:
{1}, {2}, {3} : all single
{1}, {2, 3} : ... | [
{
"code": null,
"e": 54,
"s": 26,
"text": "\n04 Apr, 2022"
},
{
"code": null,
"e": 270,
"s": 54,
"text": "Given n friends, each one can remain single or can be paired up with some other friend. Each friend can be paired only once. Find out the total number of ways in which friend... |
MATLAB – Image Edge Detection using Prewitt Operator from Scratch | 17 May, 2020
Prewitt Operator: It is a gradient-based operator. It is one of the best ways to detect the orientation and magnitude of an image. It computes the gradient approximation of image intensity function for image edge detection. At the pixels of an image, the Prewitt operator produces either the normal to a vec... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n17 May, 2020"
},
{
"code": null,
"e": 553,
"s": 28,
"text": "Prewitt Operator: It is a gradient-based operator. It is one of the best ways to detect the orientation and magnitude of an image. It computes the gradient approximation of im... |
WPF - Combobox | A combobox is a selection control that combines a non-editable textbox and a drop-down listbox that allows users to select an item from a list. It either displays the current selection or is empty if there is no selected item. The hierarchical inheritance of ComboBox class is as follows −
Background
Gets or sets a brus... | [
{
"code": null,
"e": 2310,
"s": 2020,
"text": "A combobox is a selection control that combines a non-editable textbox and a drop-down listbox that allows users to select an item from a list. It either displays the current selection or is empty if there is no selected item. The hierarchical inheritan... |
I want to call JButton doClick() method to simulate a click action in Java | Let us first set a JButton:
JButton btn = new JButton("DemoButton");
Now, attach action listener:
btn.addActionListener(new ClickListener());
If you have an ActionListener attached to your button it'll fire when you call the method doClick():
btn.doClick();
The following is an example to call JButton doClick() method t... | [
{
"code": null,
"e": 1090,
"s": 1062,
"text": "Let us first set a JButton:"
},
{
"code": null,
"e": 1131,
"s": 1090,
"text": "JButton btn = new JButton(\"DemoButton\");"
},
{
"code": null,
"e": 1160,
"s": 1131,
"text": "Now, attach action listener:"
},
{
... |
Tryit Editor v3.7 | Tryit: transition properties | [] |
How do I close a tkinter window? | Creating an application using tkinter is easy but sometimes, it becomes difficult to close the window or the frame without closing it through the button on the title bar. In such cases, we can use the .destroy() method to close the window.
As tkinter attributes are independent of each other, we can create a separate
me... | [
{
"code": null,
"e": 1302,
"s": 1062,
"text": "Creating an application using tkinter is easy but sometimes, it becomes difficult to close the window or the frame without closing it through the button on the title bar. In such cases, we can use the .destroy() method to close the window."
},
{
... |
Sockets | Python | 04 Oct, 2021
What is socket? Sockets act as bidirectional communications channel where they are endpoints of it.sockets may communicate within the process, between different process and also process on different places.Socket Module- s.socket.socket(socket_family, socket_type, protocol=0)
socket_family-AF_UNIX or AF_I... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n04 Oct, 2021"
},
{
"code": null,
"e": 306,
"s": 28,
"text": "What is socket? Sockets act as bidirectional communications channel where they are endpoints of it.sockets may communicate within the process, between different process and al... |
HashMap put() Method in Java | 07 Jul, 2022
The java.util.HashMap.put() method of HashMap is used to insert a mapping into a map. This means we can insert a specific key and the value it is mapping to into a particular map. If an existing key is passed then the previous value gets replaced by the new value. If a new pair is passed, then the pair get... | [
{
"code": null,
"e": 53,
"s": 25,
"text": "\n07 Jul, 2022"
},
{
"code": null,
"e": 383,
"s": 53,
"text": "The java.util.HashMap.put() method of HashMap is used to insert a mapping into a map. This means we can insert a specific key and the value it is mapping to into a particular... |
Python While Loop | 25 Aug, 2021
Python While Loop is used to execute a block of statements repeatedly until a given condition is satisfied. And when the condition becomes false, the line immediately after the loop in the program is executed. While loop falls under the category of indefinite iteration. Indefinite iteration means that the ... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n25 Aug, 2021"
},
{
"code": null,
"e": 436,
"s": 52,
"text": "Python While Loop is used to execute a block of statements repeatedly until a given condition is satisfied. And when the condition becomes false, the line immediately after t... |
Copy a directory recursively using Python (with examples) | 20 Jul, 2021
Shutil module in Python provides many functions of high-level operations on files and collections of files. It comes under Python’s standard utility modules. This module helps in automating process of copying and removal of files and directories.shutil.copytree() method recursively copies an entire directo... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n20 Jul, 2021"
},
{
"code": null,
"e": 615,
"s": 28,
"text": "Shutil module in Python provides many functions of high-level operations on files and collections of files. It comes under Python’s standard utility modules. This module helps... |
Maximum score possible from an array with jumps of at most length K | 09 Jun, 2022
Given an array arr[] and an integer K, the 0th index, the task is to collect the maximum score possible by performing the following operations:
Start from the 0th index of the array.
Reach the last index of the array by jumping at most K indices in each move.
Add the value of every index reached after ea... | [
{
"code": null,
"e": 53,
"s": 25,
"text": "\n09 Jun, 2022"
},
{
"code": null,
"e": 199,
"s": 53,
"text": "Given an array arr[] and an integer K, the 0th index, the task is to collect the maximum score possible by performing the following operations: "
},
{
"code": null,
... |
Java 8 Clock instant() method with Examples | 19 Jun, 2019
Java Clock class is part of Date Time API, java.time.Clock, of Java. The Java Date Time API was added from Java version 8.
instant() method of Clock class returns a current instant of Clock object as Instant Class Object. Instant generates a timestamp to represent machine time. So this method generates a t... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n19 Jun, 2019"
},
{
"code": null,
"e": 151,
"s": 28,
"text": "Java Clock class is part of Date Time API, java.time.Clock, of Java. The Java Date Time API was added from Java version 8."
},
{
"code": null,
"e": 695,
"s": 1... |
Shadowing in Java | 30 Aug, 2021
Inner class means one class that is a member of another class. There are basically four types of inner classes in java. Nested Inner class can access any private instance variable of the outer class. Like any other instance variable, we can have access modifier private, protected, public, and default modif... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n30 Aug, 2021"
},
{
"code": null,
"e": 364,
"s": 52,
"text": "Inner class means one class that is a member of another class. There are basically four types of inner classes in java. Nested Inner class can access any private instance var... |
Matplotlib.axes.Axes.scatter() in Python | 13 Apr, 2020
Matplotlib is a library in Python and it is numerical – mathematical extension for NumPy library. The Axes Class contains most of the figure elements: Axis, Tick, Line2D, Text, Polygon, etc., and sets the coordinate system. And the instances of Axes supports callbacks through a callbacks attribute.
The Axe... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n13 Apr, 2020"
},
{
"code": null,
"e": 328,
"s": 28,
"text": "Matplotlib is a library in Python and it is numerical – mathematical extension for NumPy library. The Axes Class contains most of the figure elements: Axis, Tick, Line2D, Text... |
HTTP/2 Client feature of Java 9 with Example | 22 Jan, 2020
HTTP/2 Client: HTTP/2 client is one of the feature of JDK 9. HTTP/2 is the newest version of the HTTP Protocol. By the help of HTTP/2 client, from the Java application, we can send the HTTP request and we can process the HTTP response. Before JDK 9, To send HTTP request and to process the HTTP response we ... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n22 Jan, 2020"
},
{
"code": null,
"e": 574,
"s": 28,
"text": "HTTP/2 Client: HTTP/2 client is one of the feature of JDK 9. HTTP/2 is the newest version of the HTTP Protocol. By the help of HTTP/2 client, from the Java application, we can... |
Tailwind CSS Space Between | 23 Mar, 2022
This class accepts lots of values in tailwind CSS in which all the properties are covered as in class form. It is the alternative to the CSS Space Between property. This class is used for controlling the space between child elements.
Space Between classes:
space-y-0
space-y-reverse
-space-y-0
space-x-0
spa... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n23 Mar, 2022"
},
{
"code": null,
"e": 262,
"s": 28,
"text": "This class accepts lots of values in tailwind CSS in which all the properties are covered as in class form. It is the alternative to the CSS Space Between property. This class... |
LocalDate get() method in Java with Examples | 28 Nov, 2018
The get() method of LocalDate class in Java method gets the value of the specified field from this Date as an int.
Syntax:
public int get(TemporalField field)
Parameter: This method accepts a parameter field which is the field to get and not necessary null.
Return Value: It returns the value for the field... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n28 Nov, 2018"
},
{
"code": null,
"e": 143,
"s": 28,
"text": "The get() method of LocalDate class in Java method gets the value of the specified field from this Date as an int."
},
{
"code": null,
"e": 151,
"s": 143,
... |
Python | Sorting string using order defined by another string | 11 May, 2020
Given two strings (of lowercase letters), a pattern and a string. The task is to sort string according to the order defined by pattern and return the reverse of it. It may be assumed that pattern has all characters of the string and all characters in pattern appear only once.
Examples:
Input : pat = "asbck... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n11 May, 2020"
},
{
"code": null,
"e": 305,
"s": 28,
"text": "Given two strings (of lowercase letters), a pattern and a string. The task is to sort string according to the order defined by pattern and return the reverse of it. It may be ... |
How to Iterate Through HashTable in Java? | 24 Oct, 2021
HashTable is an underlying data structure where the insertion order in HashTable is not preserved, and it is based on the hashcode of keys. Duplicates keys are not allowed, but values can be duplicated. Heterogeneous objects are allowed for both keys and values. Value null is not allowed for both key and v... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n24 Oct, 2021"
},
{
"code": null,
"e": 642,
"s": 28,
"text": "HashTable is an underlying data structure where the insertion order in HashTable is not preserved, and it is based on the hashcode of keys. Duplicates keys are not allowed, bu... |
Length of the longest alternating even odd subarray | 11 Jul, 2022
Given an array a[] of N integers, the task is to find the length of the longest Alternating Even Odd subarray present in the array. Examples:
Input: a[] = {1, 2, 3, 4, 5, 7, 9} Output: 5 Explanation: The subarray {1, 2, 3, 4, 5} has alternating even and odd elements.Input: a[] = {1, 3, 5} Output: 0 Expla... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n11 Jul, 2022"
},
{
"code": null,
"e": 196,
"s": 52,
"text": "Given an array a[] of N integers, the task is to find the length of the longest Alternating Even Odd subarray present in the array. Examples: "
},
{
"code": null,
... |
BigDecimal valueOf() Method in Java | 14 Apr, 2022
java.math.BigDecimal.valueOf(long val) is an inbuilt method in Java that translates a long value into a BigDecimal value with a scale of zero. It allows us, the reuse of frequently used BigDecimal values and hence this “static factory method” is provided in preference to a (long) constructor. Package view ... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n14 Apr, 2022"
},
{
"code": null,
"e": 351,
"s": 28,
"text": "java.math.BigDecimal.valueOf(long val) is an inbuilt method in Java that translates a long value into a BigDecimal value with a scale of zero. It allows us, the reuse of frequ... |
SQLite Data Types | 04 Nov, 2020
SQLite Data Type is a quality that defines the type of data of any object. SQLite is different from other database systems, it uses dynamic type system. In another way a value stored in any column defines its data type, not the column’s data type.
Storage Classes could be used to define the format that SQL... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n04 Nov, 2020"
},
{
"code": null,
"e": 276,
"s": 28,
"text": "SQLite Data Type is a quality that defines the type of data of any object. SQLite is different from other database systems, it uses dynamic type system. In another way a value... |
How to display div elements using Dropdown Menu in jQuery? | 20 Sep, 2019
In order to display data/content of a specific element by selecting the particular dropdown menu in jQuery, we can use the with following ways:
Using hide() and show() methods:hide() methods : This method is used to hiding the syntax or the element of html that you want to hide.Syntax:$(selector).hide(spee... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n20 Sep, 2019"
},
{
"code": null,
"e": 172,
"s": 28,
"text": "In order to display data/content of a specific element by selecting the particular dropdown menu in jQuery, we can use the with following ways:"
},
{
"code": null,
... |
Python | Remove last K elements of list | 08 Jun, 2022
We often come to situations in which we need to decrease the size of the list by truncating the k last elements of the list. This particular problem occurs when we need to optimize memory. This has its application in the day-day programming when sometimes we require to get all the lists of similar size. Le... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n08 Jun, 2022"
},
{
"code": null,
"e": 398,
"s": 28,
"text": "We often come to situations in which we need to decrease the size of the list by truncating the k last elements of the list. This particular problem occurs when we need to opt... |
How to create a table with auto-increment column in MySQL using JDBC? | While creating a table, in certain scenarios, we need values to column such as ID, to be generated/incremented automatically. Various databases support this feature in different ways.
In MySQL database you can declare a column auto increment using the following syntax.
CREATE TABLE table_name(
ID INT PRIMARY KEY AUT... | [
{
"code": null,
"e": 1246,
"s": 1062,
"text": "While creating a table, in certain scenarios, we need values to column such as ID, to be generated/incremented automatically. Various databases support this feature in different ways."
},
{
"code": null,
"e": 1332,
"s": 1246,
"text":... |
How to change file permissions in Python? | To change the permission of a file, you can use the os.chmod(file, mode) call. Note that the mode should be specified in octal representation and therefore must begin with a 0o. For example, to make a file readonly, you can set the permission to 0o777, you can use:
>>> import os
>>> os.chmod('my_file', 0o777)
You can a... | [
{
"code": null,
"e": 1328,
"s": 1062,
"text": "To change the permission of a file, you can use the os.chmod(file, mode) call. Note that the mode should be specified in octal representation and therefore must begin with a 0o. For example, to make a file readonly, you can set the permission to 0o777, ... |
How to handle popup windows in Selenium? | Selenium has getWindowHandles() method , which returns all the window handle ids for all the open windows. This is stored in Set data structure in String data types.
In order to navigate to a specific window, we need to traverse to the window we want to access with the iterator() method then switch to that window.
getW... | [
{
"code": null,
"e": 1228,
"s": 1062,
"text": "Selenium has getWindowHandles() method , which returns all the window handle ids for all the open windows. This is stored in Set data structure in String data types."
},
{
"code": null,
"e": 1378,
"s": 1228,
"text": "In order to navi... |
SQL Tryit Editor v1.6 | TRUNCATE TABLE Categories;
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 the Try-SQL Editor, with... | [
{
"code": null,
"e": 27,
"s": 0,
"text": "TRUNCATE TABLE Categories;"
},
{
"code": null,
"e": 29,
"s": 27,
"text": ""
},
{
"code": null,
"e": 92,
"s": 29,
"text": "Edit the SQL Statement, and click \"Run SQL\" to see the result."
},
{
"code": null,
... |
Array setBoolean() Method in Java with Examples - GeeksforGeeks | 30 Nov, 2018
The java.lang.reflect.Array.setBoolean() method is an inbuilt method used to set a specified Boolean value to a specified index of a given object array.
Syntax:
Array.setBoolean(Object []array, int index, boolean value)
Parameter: This method takes three parameters:
array: array of type Object which is to ... | [
{
"code": null,
"e": 23868,
"s": 23840,
"text": "\n30 Nov, 2018"
},
{
"code": null,
"e": 24021,
"s": 23868,
"text": "The java.lang.reflect.Array.setBoolean() method is an inbuilt method used to set a specified Boolean value to a specified index of a given object array."
},
{
... |
Merge two sorted linked lists | Practice | GeeksforGeeks | Given two sorted linked lists consisting of N and M nodes respectively. The task is to merge both of the list (in-place) and return head of the merged list.
Example 1:
Input:
N = 4, M = 3
valueN[] = {5,10,15,40}
valueM[] = {2,3,20}
Output: 2 3 5 10 15 20 40
Explanation: After merging the two linked
lists, we have me... | [
{
"code": null,
"e": 397,
"s": 238,
"text": "Given two sorted linked lists consisting of N and M nodes respectively. The task is to merge both of the list (in-place) and return head of the merged list.\n "
},
{
"code": null,
"e": 408,
"s": 397,
"text": "Example 1:"
},
{
"... |
Bayesian Neural Networks: 2 Fully Connected in TensorFlow and Pytorch | by Adam Woolf | Towards Data Science | This chapter continues the series on Bayesian deep learning. The previous chapter is available here and the next chapter here. In this chapter we’ll explore alternative solutions to conventional dense neural networks. These alternatives will invoke probability distributions over each weight in the neural network result... | [
{
"code": null,
"e": 697,
"s": 171,
"text": "This chapter continues the series on Bayesian deep learning. The previous chapter is available here and the next chapter here. In this chapter we’ll explore alternative solutions to conventional dense neural networks. These alternatives will invoke probab... |
Build your own Grammarly in Python | by Satyam Kumar | Towards Data Science | Usage of good grammar and correctly spelled words helps you to write and communicate clearly and get what you want. Whether you are working on an article, essay, or email, presenting your ideas with clear and correct language makes a good impression on your readers. Often while typing emails, essays, articles, etc one ... | [
{
"code": null,
"e": 542,
"s": 172,
"text": "Usage of good grammar and correctly spelled words helps you to write and communicate clearly and get what you want. Whether you are working on an article, essay, or email, presenting your ideas with clear and correct language makes a good impression on yo... |
How to detect vowels vs consonants in Python? | First you should check if the character is an alphabet or not. Then you can create a list of vowels and check if the character is a vowel using this. If not then it must be a consonant. For example,
def vowel_or_consonant(c):
if not c.isalpha():
return 'Neither'
vowels = 'aeiou'
if c.lower() in vowe... | [
{
"code": null,
"e": 1261,
"s": 1062,
"text": "First you should check if the character is an alphabet or not. Then you can create a list of vowels and check if the character is a vowel using this. If not then it must be a consonant. For example,"
},
{
"code": null,
"e": 1506,
"s": 12... |
CSS | word-break Property - GeeksforGeeks | 24 Aug, 2021
This word-break property is used to specify how to break the word when the word reached at end of the line. The line breaks in the text can occur in certain spaces, like when there is a space or a hyphen.
Syntax:
word-break: normal|break-all|keep-all|break-word|initial|inherit;
Default Value: Normal
P... | [
{
"code": null,
"e": 24905,
"s": 24877,
"text": "\n24 Aug, 2021"
},
{
"code": null,
"e": 25111,
"s": 24905,
"text": "This word-break property is used to specify how to break the word when the word reached at end of the line. The line breaks in the text can occur in certain spaces... |
HTML SVG-Basics - GeeksforGeeks | 10 Dec, 2021
In this article, we will know HTML SVG Basics, & their implementation through the examples. SVG stands for Scalable Vector Graphics. It basically defines vector-based graphics in XML format. SVG graphics do NOT lose any quality if they are zoomed or resized. Every element and every attribute in SVG files c... | [
{
"code": null,
"e": 31647,
"s": 31619,
"text": "\n10 Dec, 2021"
},
{
"code": null,
"e": 31970,
"s": 31647,
"text": "In this article, we will know HTML SVG Basics, & their implementation through the examples. SVG stands for Scalable Vector Graphics. It basically defines vector-ba... |
Find the overlapping sum of two arrays - GeeksforGeeks | 14 May, 2021
Given two arrays A[] and B[] having n unique elements each. The task is to find the overlapping sum of the two arrays. That is the sum of elements which is common in both of the arrays.
Note: Elements in the arrays are unique. That is the array does not contains duplicates.
Examples:
Input : A[] = {1, 5,... | [
{
"code": null,
"e": 26065,
"s": 26037,
"text": "\n14 May, 2021"
},
{
"code": null,
"e": 26251,
"s": 26065,
"text": "Given two arrays A[] and B[] having n unique elements each. The task is to find the overlapping sum of the two arrays. That is the sum of elements which is common ... |
Insertion Sort for Singly Linked List - GeeksforGeeks | 25 Feb, 2022
We have discussed Insertion Sort for arrays. In this article, we are going to discuss Insertion Sort for a linked list. Below is a simple insertion sort algorithm for a linked list.
1) Create an empty sorted (or result) list
2) Traverse the given list, do following for every node.
......a) Insert current ... | [
{
"code": null,
"e": 25905,
"s": 25877,
"text": "\n25 Feb, 2022"
},
{
"code": null,
"e": 26088,
"s": 25905,
"text": "We have discussed Insertion Sort for arrays. In this article, we are going to discuss Insertion Sort for a linked list. Below is a simple insertion sort algorithm ... |
Draw Multiple ggplot2 plots Side-by-Side - GeeksforGeeks | 17 Jun, 2021
In the R programming language, we can analyze data by creating different graphs or plot out of them. Sometimes for the analysis, we need to see two or more plots at the same time side by side. In that case, we use gridExtra package of R language that divides the frame into grids, and you can add multiple p... | [
{
"code": null,
"e": 26513,
"s": 26485,
"text": "\n17 Jun, 2021"
},
{
"code": null,
"e": 26841,
"s": 26513,
"text": "In the R programming language, we can analyze data by creating different graphs or plot out of them. Sometimes for the analysis, we need to see two or more plots a... |
How to Install PIL on Windows? - GeeksforGeeks | 09 Sep, 2021
In this article, we will look into the various methods of installing the PIL package on a Windows machine.
Python
PIP or Ananconda (Depending upon your preference)
Open up the command prompt and use the below command to install the PIL package:
pip install Pillow
The following message will be displayed on... | [
{
"code": null,
"e": 25747,
"s": 25719,
"text": "\n09 Sep, 2021"
},
{
"code": null,
"e": 25854,
"s": 25747,
"text": "In this article, we will look into the various methods of installing the PIL package on a Windows machine."
},
{
"code": null,
"e": 25862,
"s": 258... |
Queries to increment array elements in a given range by a given value for a given number of times - GeeksforGeeks | 29 May, 2021
Given an array, arr[] of N positive integers and M queries of the form {a, b, val, f}. The task is to print the array after performing each query to increment array elements in the range [a, b] by a value val f number of times.
Examples:
Input: arr[] = {1, 2, 3}, M=3, Q[][] = {{1, 2, 1, 4}, {1, 3, 2, 3}, {... | [
{
"code": null,
"e": 26713,
"s": 26685,
"text": "\n29 May, 2021"
},
{
"code": null,
"e": 26941,
"s": 26713,
"text": "Given an array, arr[] of N positive integers and M queries of the form {a, b, val, f}. The task is to print the array after performing each query to increment arra... |
list emplace() function in C++ STL - GeeksforGeeks | 19 Jul, 2018
The list::emplace() is a built-in function in C++ STL which extends list by inserting new element at a given position.
Syntax:
list_name.emplace(position, element)
Parameters: The function accepts two mandatory parameters which are described below:
position – it specifies the iterator which points to the p... | [
{
"code": null,
"e": 25680,
"s": 25652,
"text": "\n19 Jul, 2018"
},
{
"code": null,
"e": 25799,
"s": 25680,
"text": "The list::emplace() is a built-in function in C++ STL which extends list by inserting new element at a given position."
},
{
"code": null,
"e": 25807,
... |
Python - max() function - GeeksforGeeks | 07 Mar, 2022
Python max() function returns the largest item in an iterable or the largest of two or more arguments.
It has two forms.
max() function with objects
max() function with iterable
Unlike the max() function of C/C++, the max() function in Python can take any type of object and returns the largest among them. ... | [
{
"code": null,
"e": 25563,
"s": 25535,
"text": "\n07 Mar, 2022"
},
{
"code": null,
"e": 25666,
"s": 25563,
"text": "Python max() function returns the largest item in an iterable or the largest of two or more arguments."
},
{
"code": null,
"e": 25684,
"s": 25666,
... |
Java Program to Convert English Text to Morse Code and Vice-Versa - GeeksforGeeks | 10 May, 2021
Morse code is a method used in telecommunication to encode text characters as standardized sequences of two different signal durations, called dots and dashes. Morse Code defines a standard encoding where each letter is mapped to a series of dots and dashes, as follows: “a” maps to “.-“, “b” maps to “-...”... | [
{
"code": null,
"e": 25251,
"s": 25223,
"text": "\n10 May, 2021"
},
{
"code": null,
"e": 25591,
"s": 25251,
"text": "Morse code is a method used in telecommunication to encode text characters as standardized sequences of two different signal durations, called dots and dashes. Mor... |
map rbegin() function in C++ STL - GeeksforGeeks | 23 Oct, 2018
The rbegin() is a function in C++ STL. It returns a reverse iterator which points to the last element of the map. The reverse iterator iterates in reverse order and incrementing it means moving towards beginning of map.
SYNTAX:
r_i rbegin();
const_r_i rbegin() const;
Parameters:It does not except any para... | [
{
"code": null,
"e": 25367,
"s": 25339,
"text": "\n23 Oct, 2018"
},
{
"code": null,
"e": 25587,
"s": 25367,
"text": "The rbegin() is a function in C++ STL. It returns a reverse iterator which points to the last element of the map. The reverse iterator iterates in reverse order an... |
GATE | GATE-CS-2014-(Set-3) | Question 65 - GeeksforGeeks | 30 Sep, 2021
Consider the following processors (ns stands for nanoseconds). Assume that the pipeline registers have zero latency.
P1: Four-stage pipeline with stage
latencies 1 ns, 2 ns, 2 ns, 1 ns.
P2: Four-stage pipeline with stage
latencies 1 ns, 1.5 ns, 1.5 ns, 1.5 ns.
P3: Five-stage pipeline with stage
... | [
{
"code": null,
"e": 25695,
"s": 25667,
"text": "\n30 Sep, 2021"
},
{
"code": null,
"e": 25812,
"s": 25695,
"text": "Consider the following processors (ns stands for nanoseconds). Assume that the pipeline registers have zero latency."
},
{
"code": null,
"e": 26137,
... |
Node.js new Error() Method - GeeksforGeeks | 21 Aug, 2020
For generating and handling errors, Node.js supports so many mechanisms that occur during the running application and it is an inbuilt application, so we don’t import any libraries. All the system errors that are raised by Node.js are inherited from the JavaScript’s <Error> class and provide the least prop... | [
{
"code": null,
"e": 24531,
"s": 24503,
"text": "\n21 Aug, 2020"
},
{
"code": null,
"e": 24871,
"s": 24531,
"text": "For generating and handling errors, Node.js supports so many mechanisms that occur during the running application and it is an inbuilt application, so we don’t imp... |
Learn How to Use KMeans in 6 Minutes | by Robert Wood | Towards Data Science | Clustering is a machine learning technique that falls into the unsupervised learning category. Without going into a ton of detail on different machine learning categories, I’ll give a high level description of unsupervised learning.
To put it simply, rather than pre-determining what we want our algorithm to find, we pr... | [
{
"code": null,
"e": 405,
"s": 172,
"text": "Clustering is a machine learning technique that falls into the unsupervised learning category. Without going into a ton of detail on different machine learning categories, I’ll give a high level description of unsupervised learning."
},
{
"code": ... |
Count pairs from a given array whose sum lies from a given range - GeeksforGeeks | 23 Nov, 2021
Given an array arr[] consisting of N integers and two integers L and R, the task is to count the number of pairs whose sum lies in the range [L, R].
Examples:
Input: arr[] = {5, 1, 2}, L = 4, R = 7Output: 2Explanation:The pairs satisfying the necessary conditions are as follows:
(5, 1): Sum = 5 + 1 = 6, wh... | [
{
"code": null,
"e": 24822,
"s": 24794,
"text": "\n23 Nov, 2021"
},
{
"code": null,
"e": 24971,
"s": 24822,
"text": "Given an array arr[] consisting of N integers and two integers L and R, the task is to count the number of pairs whose sum lies in the range [L, R]."
},
{
... |
Find Harmonic mean using Arithmetic mean and Geometric mean - GeeksforGeeks | 15 Apr, 2021
Given two numbers, first calculate arithmetic mean and geometric mean of these two numbers. Using the arithmetic mean and geometric mean so calculated, find the harmonic mean between the two numbers.
Examples:
Input : a = 2
b = 4
Output : 2.666
Input : a = 5
b = 15
Output : 7.500
Arithmet... | [
{
"code": null,
"e": 25066,
"s": 25038,
"text": "\n15 Apr, 2021"
},
{
"code": null,
"e": 25266,
"s": 25066,
"text": "Given two numbers, first calculate arithmetic mean and geometric mean of these two numbers. Using the arithmetic mean and geometric mean so calculated, find the ha... |
How to delete cookies with JSP? | To delete cookies is very simple. If you want to delete a cookie, then you simply need to follow these three steps −
Read an already existing cookie and store it in Cookie object.
Read an already existing cookie and store it in Cookie object.
Set cookie age as zero using the setMaxAge() method to delete an existing coo... | [
{
"code": null,
"e": 1179,
"s": 1062,
"text": "To delete cookies is very simple. If you want to delete a cookie, then you simply need to follow these three steps −"
},
{
"code": null,
"e": 1242,
"s": 1179,
"text": "Read an already existing cookie and store it in Cookie object."
... |
Tryit Editor v3.7 | Web Safe Fonts
Tryit: The arial font | [
{
"code": null,
"e": 34,
"s": 19,
"text": "Web Safe Fonts"
}
] |
GAN — Introduction and Implementation — PART1: Implement a simple GAN in TF for MNIST handwritten digit generation | by Manish Chablani | Towards Data Science | The idea behind GANs is that you have two networks, a generator GG and a discriminator DD, competing against each other. The generator makes fake data to pass to the discriminator. The discriminator also sees real data and predicts if the data it’s received is real or fake. The generator is trained to fool the discrimi... | [
{
"code": null,
"e": 782,
"s": 172,
"text": "The idea behind GANs is that you have two networks, a generator GG and a discriminator DD, competing against each other. The generator makes fake data to pass to the discriminator. The discriminator also sees real data and predicts if the data it’s receiv... |
How to sort an R data frame column without losing row names? | When we sort a data frame column in R, the row names are lost but we might need them. Therefore, sorting without losing row names is required and it can be done with the help of order function. For example, if we have a data frame called df that has a column x then sorting of x without losing row names can be done by u... | [
{
"code": null,
"e": 1407,
"s": 1062,
"text": "When we sort a data frame column in R, the row names are lost but we might need them. Therefore, sorting without losing row names is required and it can be done with the help of order function. For example, if we have a data frame called df that has a c... |
How to Convert Text to Speech in Android? - GeeksforGeeks | 10 Sep, 2020
Text to Speech App converts the text written on the screen to speech like you have written “Hello World” on the screen and when you press the button it will speak “Hello World”. Text-to-speech is commonly used as an accessibility feature to help people who have trouble reading on-screen text, but it’s also... | [
{
"code": null,
"e": 25061,
"s": 25033,
"text": "\n10 Sep, 2020"
},
{
"code": null,
"e": 25495,
"s": 25061,
"text": "Text to Speech App converts the text written on the screen to speech like you have written “Hello World” on the screen and when you press the button it will speak ... |
Android - Component in Dagger - GeeksforGeeks | 26 May, 2021
In order to fully understand the concept of Component in Dagger, we have to first go through a brief about Dagger itself. Now according to the documentation Dagger is defined as follows :
‘Manual dependency injection or service locators in an Android app can be problematic depending on the size of your p... | [
{
"code": null,
"e": 25060,
"s": 25032,
"text": "\n26 May, 2021"
},
{
"code": null,
"e": 25250,
"s": 25060,
"text": "In order to fully understand the concept of Component in Dagger, we have to first go through a brief about Dagger itself. Now according to the documentation Dagge... |
Box plot and Histogram exploration on Iris data - GeeksforGeeks | 20 May, 2019
Attribute Information about data set:
Attribute Information:
-> sepal length in cm
-> sepal width in cm
-> petal length in cm
-> petal width in cm
-> class:
Iris Setosa
Iris Versicolour
Iris Virginica
Number of Instances: 150
Summary Statistics:
... | [
{
"code": null,
"e": 26623,
"s": 26595,
"text": "\n20 May, 2019"
},
{
"code": null,
"e": 26661,
"s": 26623,
"text": "Attribute Information about data set:"
},
{
"code": null,
"e": 27253,
"s": 26661,
"text": "Attribute Information:\n -> sepal length in cm\n ... |
ActionBar in Android with Example - GeeksforGeeks | 23 Feb, 2021
In Android applications, ActionBar is the element present at the top of the activity screen. It is a salient feature of a mobile application that has a consistent presence over all its activities. It provides a visual structure to the app and contains some of the frequently used elements for the users. And... | [
{
"code": null,
"e": 25741,
"s": 25713,
"text": "\n23 Feb, 2021"
},
{
"code": null,
"e": 26374,
"s": 25741,
"text": "In Android applications, ActionBar is the element present at the top of the activity screen. It is a salient feature of a mobile application that has a consistent ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.