title stringlengths 3 221 | text stringlengths 17 477k | parsed listlengths 0 3.17k |
|---|---|---|
InfyTQ Interview Experience Upgradation Test 2020 - GeeksforGeeks | 18 Jan, 2021
Hello Everyone, I am here to share my experience with my InfyTQ journey. InfyTQ is a certification exam which also offers placement opportunity.
I was a zero to programming, and I was wondering how I am going to clear this round. I have only practiced 15 days on hackerearth algorithm section especially str... | [
{
"code": null,
"e": 26261,
"s": 26233,
"text": "\n18 Jan, 2021"
},
{
"code": null,
"e": 26406,
"s": 26261,
"text": "Hello Everyone, I am here to share my experience with my InfyTQ journey. InfyTQ is a certification exam which also offers placement opportunity."
},
{
"cod... |
GATE | GATE-CS-2015 (Set 1) | Question 47 - GeeksforGeeks | 29 Sep, 2021
A positive edge-triggered D flip-flop is connected to a positive edge-triggered JK flipflop as follows. The Q output of the D flip-flop is connected to both the J and K inputs of the JK flip-flop, while the Q output of the JK flip-flop is connected to the input of the D flip-flop. Initially, the output of ... | [
{
"code": null,
"e": 25869,
"s": 25841,
"text": "\n29 Sep, 2021"
},
{
"code": null,
"e": 26688,
"s": 25869,
"text": "A positive edge-triggered D flip-flop is connected to a positive edge-triggered JK flipflop as follows. The Q output of the D flip-flop is connected to both the J ... |
Inverting the Burrows - Wheeler Transform - GeeksforGeeks | 26 Oct, 2017
Prerequisite: Burrows – Wheeler Data Transform Algorithm
Why inverse of BWT? The main idea behind it:
1. The remarkable thing about BWT algorithm is that this particular transform is invertible with minimal data overhead.
2. To compute inverse of BWT is to undo the BWT and recover the original string. The ... | [
{
"code": null,
"e": 26215,
"s": 26187,
"text": "\n26 Oct, 2017"
},
{
"code": null,
"e": 26272,
"s": 26215,
"text": "Prerequisite: Burrows – Wheeler Data Transform Algorithm"
},
{
"code": null,
"e": 26317,
"s": 26272,
"text": "Why inverse of BWT? The main idea... |
Find Unique Combinations of All Elements from Two Vectors in R - GeeksforGeeks | 18 Apr, 2022
The number of possible combinations of two vectors can be computed by multiplying all the successive elements of the first vector with the corresponding elements of the second vector. In case, the two vectors have unique elements, the resultant table or data frame formed has m * n elements, where m is the ... | [
{
"code": null,
"e": 26487,
"s": 26459,
"text": "\n18 Apr, 2022"
},
{
"code": null,
"e": 26997,
"s": 26487,
"text": "The number of possible combinations of two vectors can be computed by multiplying all the successive elements of the first vector with the corresponding elements o... |
Find N Arithmetic Means between A and B - GeeksforGeeks | 04 May, 2022
Given three integers A, B and N the task is to find N Arithmetic means between A and B. We basically need to insert N terms in an Arithmetic progression. where A and B are first and last terms. Examples:
Input : A = 20 B = 32 N = 5
Output : 22 24 26 28 30
The Arithmetic progression series as
20 22 24 26 2... | [
{
"code": null,
"e": 26337,
"s": 26309,
"text": "\n04 May, 2022"
},
{
"code": null,
"e": 26541,
"s": 26337,
"text": "Given three integers A, B and N the task is to find N Arithmetic means between A and B. We basically need to insert N terms in an Arithmetic progression. where A a... |
Facebook Transcoder - GeeksforGeeks | 02 Dec, 2020
Transcoder was proposed by researchers at Facebook in September 2020 in the paper titled “Unsupervised Translation of Programming Languages”. The goal of the project was to train AI to understand the code in a different language and able to convert the code from one language to another. Many of the compani... | [
{
"code": null,
"e": 25589,
"s": 25561,
"text": "\n02 Dec, 2020"
},
{
"code": null,
"e": 26160,
"s": 25589,
"text": "Transcoder was proposed by researchers at Facebook in September 2020 in the paper titled “Unsupervised Translation of Programming Languages”. The goal of the proje... |
Program to check congruency of two triangles - GeeksforGeeks | 18 Jul, 2018
Given four arrays of 3 numbers each which represents sides and angles of two triangles. The task is to check if the two triangles are Congruent or not. Also print the theorem by which they are congruent.
Note: All sides and angles given as input are for valid triangles.
Examples:
Input : side1 = [3, 4, 5] ... | [
{
"code": null,
"e": 26141,
"s": 26113,
"text": "\n18 Jul, 2018"
},
{
"code": null,
"e": 26345,
"s": 26141,
"text": "Given four arrays of 3 numbers each which represents sides and angles of two triangles. The task is to check if the two triangles are Congruent or not. Also print ... |
Java Program to Blur Images using OpenCV - GeeksforGeeks | 17 May, 2021
Blurring is a simple and frequently used image processing operation. It is also called as Smoothing. OpenCV library provides many functions to apply diverse linear filters to smooth images or blur images.
Smoothing of an image removes noisy pixels from the image and applying a low-pass filter to an image. ... | [
{
"code": null,
"e": 25225,
"s": 25197,
"text": "\n17 May, 2021"
},
{
"code": null,
"e": 25430,
"s": 25225,
"text": "Blurring is a simple and frequently used image processing operation. It is also called as Smoothing. OpenCV library provides many functions to apply diverse linear... |
Median of two sorted arrays of different sizes - GeeksforGeeks | 19 Feb, 2022
Given two sorted arrays, a[] and b[], the task is to find the median of these sorted arrays, in O(log n + log m) time complexity, when n is the number of elements in the first array, and m is the number of elements in the second array. This is an extension of median of two sorted arrays of equal size probl... | [
{
"code": null,
"e": 26555,
"s": 26527,
"text": "\n19 Feb, 2022"
},
{
"code": null,
"e": 26910,
"s": 26555,
"text": "Given two sorted arrays, a[] and b[], the task is to find the median of these sorted arrays, in O(log n + log m) time complexity, when n is the number of elements ... |
Extract images from video in Python - GeeksforGeeks | 29 Aug, 2018
OpenCV comes with many powerful video editing functions. In current scenario, techniques such as image scanning, face recognition can be accomplished using OpenCV.
Image Analysis is a very common field in the area of Computer Vision. It is the extraction of meaningful information from videos or images. Ope... | [
{
"code": null,
"e": 42714,
"s": 42686,
"text": "\n29 Aug, 2018"
},
{
"code": null,
"e": 42878,
"s": 42714,
"text": "OpenCV comes with many powerful video editing functions. In current scenario, techniques such as image scanning, face recognition can be accomplished using OpenCV.... |
Check if an Object is of Type Integer in R Programming - is.integer() Function - GeeksforGeeks | 16 Jun, 2020
is.integer() function in R Language is used to check if the object passed to it as argument is of integer type.
Syntax: is.integer(x)
Parameters:x: Object to be checked
Example 1:
# R program to check if # object is an integer # Creating a vectorx1 <- 4Lx2 <- c(1:6)x3 <- c("a", "b", "c", "d")x4 <- c(1, 2,... | [
{
"code": null,
"e": 26487,
"s": 26459,
"text": "\n16 Jun, 2020"
},
{
"code": null,
"e": 26599,
"s": 26487,
"text": "is.integer() function in R Language is used to check if the object passed to it as argument is of integer type."
},
{
"code": null,
"e": 26621,
"s"... |
Image Classification of PCBs and its Web Application (Flask) | by Utkarsh Ankit | Towards Data Science | Hello, This blog is about creating an Image Classification model for PCBs(Printed Circuit boards) to detect defective PCBs and classify them as Good or Bad. So for that, we will create a Deep Learning Model and try to get the best possible results along with proper visualisation of each step. After creating the working... | [
{
"code": null,
"e": 684,
"s": 171,
"text": "Hello, This blog is about creating an Image Classification model for PCBs(Printed Circuit boards) to detect defective PCBs and classify them as Good or Bad. So for that, we will create a Deep Learning Model and try to get the best possible results along w... |
Restricted cubic splines. A spline is a drafting tool for drawing... | by Peter Flom | Towards Data Science | A spline is a drafting tool for drawing curves. In statistics, splines are a broad class of methods for transforming variables. I first introduce the concept via linear splines and work my way to restricted cubic splines which is what I (and many others) recommend. You should be aware that there are a huge variety of s... | [
{
"code": null,
"e": 554,
"s": 171,
"text": "A spline is a drafting tool for drawing curves. In statistics, splines are a broad class of methods for transforming variables. I first introduce the concept via linear splines and work my way to restricted cubic splines which is what I (and many others) ... |
NER For Stock Mentions on Reddit | Towards Data Science | Reddit has been at the epicenter of one of the biggest movements in the world of finance, and although it seemed like an unlikely source of such a movement — it’s hardly surprising in hindsight.
The trading-focused subreddits of Reddit are the backdrop for a huge amount of discussion about what is happening in the mark... | [
{
"code": null,
"e": 366,
"s": 171,
"text": "Reddit has been at the epicenter of one of the biggest movements in the world of finance, and although it seemed like an unlikely source of such a movement — it’s hardly surprising in hindsight."
},
{
"code": null,
"e": 554,
"s": 366,
... |
HTML | DOM oncontextmenu Event - GeeksforGeeks | 22 Jul, 2019
The HTML DOM oncontextmenu event occurs when an element is right-clicked to open the context menu.
Note: The oncontextmenu event is supported in all browsers but the contextmenu attribute is currently only supported in Firefox.
Syntax:
HTML:
<element oncontextmenu="myScript">
JavaScript:
object.oncontextme... | [
{
"code": null,
"e": 24709,
"s": 24681,
"text": "\n22 Jul, 2019"
},
{
"code": null,
"e": 24808,
"s": 24709,
"text": "The HTML DOM oncontextmenu event occurs when an element is right-clicked to open the context menu."
},
{
"code": null,
"e": 24937,
"s": 24808,
... |
Simulate Images for ML in PyBullet — The Quick & Easy Way | by Mason McGough | Towards Data Science | When applying deep Reinforcement Learning (RL) to robotics, we are faced with a conundrum: how do we train a robot to do a task when deep learning requires hundreds of thousands, even millions, of examples? To achieve 96% grasp success on never-before-seen objects, researchers at Google and Berkeley trained a robotic a... | [
{
"code": null,
"e": 1015,
"s": 172,
"text": "When applying deep Reinforcement Learning (RL) to robotics, we are faced with a conundrum: how do we train a robot to do a task when deep learning requires hundreds of thousands, even millions, of examples? To achieve 96% grasp success on never-before-se... |
Insert values in a table by MySQL SELECT from another table in MySQL? | Fir this, use INSERT INTO SELECT statement. Let us first create a table −
mysql> create table DemoTable1
-> (
-> Id int,
-> Name varchar(20),
-> Age int
-> );
Query OK, 0 rows affected (1.72 sec)
Insert some records in the table using insert command −
mysql> insert into DemoTable1 values(100,'Chris',24);... | [
{
"code": null,
"e": 1136,
"s": 1062,
"text": "Fir this, use INSERT INTO SELECT statement. Let us first create a table −"
},
{
"code": null,
"e": 1273,
"s": 1136,
"text": "mysql> create table DemoTable1\n -> (\n -> Id int,\n -> Name varchar(20),\n -> Age int\n -> );\nQu... |
A Deep Dive into Neo4j Link Prediction Pipeline and FastRP Embedding Algorithm | by Tomaz Bratanic | Towards Data Science | In my previous blog post, I introduced the newly available Link Prediction pipeline in the Neo4j Graph Data Science library. Since the post, I took more time to dig deeper and learn the inner workings of the pipeline. I’ve learned a couple of things along the way that I want to share with you. At first, I intended to s... | [
{
"code": null,
"e": 922,
"s": 171,
"text": "In my previous blog post, I introduced the newly available Link Prediction pipeline in the Neo4j Graph Data Science library. Since the post, I took more time to dig deeper and learn the inner workings of the pipeline. I’ve learned a couple of things along... |
How do we create a string from the contents of a file in java? | In Java you can read the contents of a file in several ways one way is to read it to a string using the java.util.Scanner class, to do so,
Instantiate the Scanner class, with the path of the file to be read, as a parameter to its constructor.
Instantiate the Scanner class, with the path of the file to be read, as a par... | [
{
"code": null,
"e": 1201,
"s": 1062,
"text": "In Java you can read the contents of a file in several ways one way is to read it to a string using the java.util.Scanner class, to do so,"
},
{
"code": null,
"e": 1305,
"s": 1201,
"text": "Instantiate the Scanner class, with the pat... |
Java Generics - Raw Types | A raw type is an object of a generic class or interface if its type arguments are not passed during its creation. Following example will showcase above mentioned concept.
Create the following java program using any editor of your choice.
GenericsTester.java
package com.tutorialspoint;
public class GenericsTester {
... | [
{
"code": null,
"e": 2811,
"s": 2640,
"text": "A raw type is an object of a generic class or interface if its type arguments are not passed during its creation. Following example will showcase above mentioned concept."
},
{
"code": null,
"e": 2878,
"s": 2811,
"text": "Create the ... |
Sum of cubes of first n odd natural numbers - GeeksforGeeks | 24 Mar, 2021
Given a number n, find sum of first n odd natural numbers.
Input : 2
Output : 28
1^3 + 3^3 = 28
Input : 4
Output : 496
1^3 + 3^3 + 5^3 + 7^3 = 496
A simple solution is to traverse through n odd numbers and find the sum of cubes.
C++
Java
Python3
C#
PHP
Javascript
// Simple C++ method to find sum of... | [
{
"code": null,
"e": 24695,
"s": 24667,
"text": "\n24 Mar, 2021"
},
{
"code": null,
"e": 24755,
"s": 24695,
"text": "Given a number n, find sum of first n odd natural numbers. "
},
{
"code": null,
"e": 24846,
"s": 24755,
"text": "Input : 2\nOutput : 28\n1^3 +... |
Intuition Behind Transformers Architecture in NLP. | by Oleg Borisov | Towards Data Science | One of the most impactful breakthroughs in NLP happened just couple of years ago, when Ashish Vaswani and his team introduced Transformers architecture in 2017. Simplicity and efficiency of the presented architecture, allowed other researchers to create very big and very impressive Language Models like BERT and GPT.
Su... | [
{
"code": null,
"e": 490,
"s": 172,
"text": "One of the most impactful breakthroughs in NLP happened just couple of years ago, when Ashish Vaswani and his team introduced Transformers architecture in 2017. Simplicity and efficiency of the presented architecture, allowed other researchers to create v... |
Draw a Quantile-Quantile Plot in R Programming - qqline() Function - GeeksforGeeks | 16 Dec, 2021
The Quantile-Quantile Plot in Programming Language, or (Q-Q Plot) is defined as a value of two variables that are plotted corresponding to each other and check whether the distributions of two variables are similar or not with respect to the locations. qqline() function in R Language is used to draw a Q-Q ... | [
{
"code": null,
"e": 26069,
"s": 26041,
"text": "\n16 Dec, 2021"
},
{
"code": null,
"e": 26387,
"s": 26069,
"text": "The Quantile-Quantile Plot in Programming Language, or (Q-Q Plot) is defined as a value of two variables that are plotted corresponding to each other and check whe... |
How to implement Dark (Night) mode in Android app - GeeksforGeeks | 16 Apr, 2020
Light-on-dark colour scheme, also called dark mode, is a supplemental mode that uses a color scheme in which content of a webpage is displayed on a dark background. Such a color scheme reduces the light emitted by screens and enhances readability. Switching to dark mode allows website users to move to an e... | [
{
"code": null,
"e": 25249,
"s": 25221,
"text": "\n16 Apr, 2020"
},
{
"code": null,
"e": 25615,
"s": 25249,
"text": "Light-on-dark colour scheme, also called dark mode, is a supplemental mode that uses a color scheme in which content of a webpage is displayed on a dark background... |
How to Change Image Source URL using AngularJS ? - GeeksforGeeks | 14 Oct, 2020
Here the task is to change the source URL of the image with the help of AngularJS.
Approach: The approach is to change the URL of the image when the user click on button. When a user clicks on a button then a method is called along with the new URL, that method replaces the new URL with the old one in cont... | [
{
"code": null,
"e": 26354,
"s": 26326,
"text": "\n14 Oct, 2020"
},
{
"code": null,
"e": 26437,
"s": 26354,
"text": "Here the task is to change the source URL of the image with the help of AngularJS."
},
{
"code": null,
"e": 26669,
"s": 26437,
"text": "Approac... |
Minimize cost of painting N houses such that adjacent houses have different colors - GeeksforGeeks | 04 Oct, 2021
Given an integer N and a 2D array cost[][3], where cost[i][0], cost[i][1], and cost[i][2] is the cost of painting ith house with colors red, blue, and green respectively, the task is to find the minimum cost to paint all the houses such that no two adjacent houses have the same color.
Examples:
Input: N = ... | [
{
"code": null,
"e": 26067,
"s": 26039,
"text": "\n04 Oct, 2021"
},
{
"code": null,
"e": 26353,
"s": 26067,
"text": "Given an integer N and a 2D array cost[][3], where cost[i][0], cost[i][1], and cost[i][2] is the cost of painting ith house with colors red, blue, and green respec... |
HTML | <input> name Attribute - GeeksforGeeks | 19 Oct, 2020
The HTML <input> name Attribute is used to specify a name for an <input> element. It is used to reference the form-data after submitting the form or to reference the element in a JavaScript.
Syntax:
<input name="name">
Attribute Values: It contains a single value name which describes the name of the <inpu... | [
{
"code": null,
"e": 25791,
"s": 25763,
"text": "\n19 Oct, 2020"
},
{
"code": null,
"e": 25982,
"s": 25791,
"text": "The HTML <input> name Attribute is used to specify a name for an <input> element. It is used to reference the form-data after submitting the form or to reference t... |
Dummy Variables in R Programming - GeeksforGeeks | 05 Aug, 2020
R programming is one of the most used languages for data mining and visualization of the data. Using this language, any type of machine learning algorithm can be processed like regression, classification, etc. Dummy coding is used in regression analysis for categorizing the variable. Dummy variable in R pr... | [
{
"code": null,
"e": 26487,
"s": 26459,
"text": "\n05 Aug, 2020"
},
{
"code": null,
"e": 27431,
"s": 26487,
"text": "R programming is one of the most used languages for data mining and visualization of the data. Using this language, any type of machine learning algorithm can be p... |
JavaScript Regular Expressions - GeeksforGeeks | 13 Jan, 2022
Below is the example of the JavaScript Regular Expressions.
Example:
JAVASCRIPT
<script>function GFGFun() { var str = "Visit geeksforGeeks"; var n = str.search(/GeeksforGeeks/i); document.write(n);}GFGFun();</script>
Output:
6
A regular expression is a sequence of characters that forms a sea... | [
{
"code": null,
"e": 31329,
"s": 31301,
"text": "\n13 Jan, 2022"
},
{
"code": null,
"e": 31391,
"s": 31329,
"text": "Below is the example of the JavaScript Regular Expressions. "
},
{
"code": null,
"e": 31402,
"s": 31391,
"text": "Example: "
},
{
"co... |
Implementation of a Falling Matrix - GeeksforGeeks | 29 May, 2017
Since the dawn of computers, Hollywood has greatly demonstrated a Hacker or a Programmer as someone sitting on a computer typing random keys on computer which ultimately compiles to a Falling matrix like simulation. Here, we will try to implement a similar falling matrix simulation on the console using C++... | [
{
"code": null,
"e": 26209,
"s": 26181,
"text": "\n29 May, 2017"
},
{
"code": null,
"e": 26518,
"s": 26209,
"text": "Since the dawn of computers, Hollywood has greatly demonstrated a Hacker or a Programmer as someone sitting on a computer typing random keys on computer which ulti... |
Pandas remove rows with special characters - GeeksforGeeks | 19 Oct, 2020
In this article we will learn how to remove the rows with special characters i.e; if a row contains any value which contains special characters like @, %, &, $, #, +, -, *, /, etc. then drop such row and modify the data. To drop such types of rows, first, we have to search rows having special characters pe... | [
{
"code": null,
"e": 25537,
"s": 25509,
"text": "\n19 Oct, 2020"
},
{
"code": null,
"e": 25995,
"s": 25537,
"text": "In this article we will learn how to remove the rows with special characters i.e; if a row contains any value which contains special characters like @, %, &, $, #,... |
Create a two-dimensional array of sequence of even integers in R - GeeksforGeeks | 30 May, 2021
In this article, we will discuss how to create a 2D array of sequences of even integers in R Programming Language.
The array() method can be used to create an array with >=1 dimensions. This method returns an array with the extents specified in the dim attribute. For a two-dimensional array, the dim attrib... | [
{
"code": null,
"e": 26511,
"s": 26483,
"text": "\n30 May, 2021"
},
{
"code": null,
"e": 26626,
"s": 26511,
"text": "In this article, we will discuss how to create a 2D array of sequences of even integers in R Programming Language."
},
{
"code": null,
"e": 26939,
... |
Python | Pandas dataframe.round() - GeeksforGeeks | 30 Aug, 2021
Python is a great language for doing data analysis, primarily because of the fantastic ecosystem of data-centric python packages. Pandas is one of those packages and makes importing and analyzing data much easier.
Pandas dataframe.round() function is used to round a DataFrame to a variable number of decima... | [
{
"code": null,
"e": 26115,
"s": 26087,
"text": "\n30 Aug, 2021"
},
{
"code": null,
"e": 26329,
"s": 26115,
"text": "Python is a great language for doing data analysis, primarily because of the fantastic ecosystem of data-centric python packages. Pandas is one of those packages a... |
Django Request and Response cycle - HttpRequest and HttpResponse Objects - GeeksforGeeks | 27 May, 2021
Prerequisite – Views In Django | PythonBefore we jump into using convenience methods that views come with, Let’s talk about the Request and Response cycle. So, when a Request happens to a Django server, a couple of things go on. One of them is Middleware.
Middleware Middleware is like a middle ground betw... | [
{
"code": null,
"e": 25562,
"s": 25534,
"text": "\n27 May, 2021"
},
{
"code": null,
"e": 25819,
"s": 25562,
"text": "Prerequisite – Views In Django | PythonBefore we jump into using convenience methods that views come with, Let’s talk about the Request and Response cycle. So, whe... |
C# | Finding the index of first element in the array - GeeksforGeeks | 01 Feb, 2019
GetLowerBound() Method is used to find the index of the first element of the specified dimension in the array.
Syntax:
public int GetLowerBound (int dimension);
Here, dimension is a zero-based dimension of the array whose lower bound needs to be determined.
Return Value: The return type of this method is S... | [
{
"code": null,
"e": 25787,
"s": 25759,
"text": "\n01 Feb, 2019"
},
{
"code": null,
"e": 25898,
"s": 25787,
"text": "GetLowerBound() Method is used to find the index of the first element of the specified dimension in the array."
},
{
"code": null,
"e": 25906,
"s":... |
Python - Truncated Normal Distribution in Statistics - GeeksforGeeks | 10 Jan, 2020
scipy.stats.truncnorm() is a Truncated Normal continuous random variable. It is inherited from the of generic methods as an instance of the rv_continuous class. It completes the methods with details specific for this particular distribution.
Parameters :
q : lower and upper tail probabilityx : quantilesloc... | [
{
"code": null,
"e": 25509,
"s": 25481,
"text": "\n10 Jan, 2020"
},
{
"code": null,
"e": 25751,
"s": 25509,
"text": "scipy.stats.truncnorm() is a Truncated Normal continuous random variable. It is inherited from the of generic methods as an instance of the rv_continuous class. It... |
Express.js req.xhr Property - GeeksforGeeks | 07 Jul, 2020
The req.xhr property returns a true value if the request’s X-Requested-With header field is XMLHttpRequest which indicates that the request was issued by a client library such as jQuery.
Syntax:
req.xhr
Parameter: No parameters.
Returns: True or False.
Installation of express module:
You can visit the link... | [
{
"code": null,
"e": 26267,
"s": 26239,
"text": "\n07 Jul, 2020"
},
{
"code": null,
"e": 26454,
"s": 26267,
"text": "The req.xhr property returns a true value if the request’s X-Requested-With header field is XMLHttpRequest which indicates that the request was issued by a client ... |
Python OpenCV | cv2.imwrite() method | 07 Aug, 2019
OpenCV-Python is a library of Python bindings designed to solve computer vision problems. cv2.imwrite() method is used to save an image to any storage device. This will save the image according to the specified format in current working directory.
Syntax: cv2.imwrite(filename, image)
Parameters:filename: A... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n07 Aug, 2019"
},
{
"code": null,
"e": 300,
"s": 52,
"text": "OpenCV-Python is a library of Python bindings designed to solve computer vision problems. cv2.imwrite() method is used to save an image to any storage device. This will save ... |
How to install Jupyter Notebook in Linux? | 06 Oct, 2021
Jupyter Notebook is an open-source web application that allows you to create and share documents that contain live code, equations, visualizations, and narrative text. Uses include data cleaning and transformation, numerical simulation, statistical modeling, data visualization, machine learning, and much m... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n06 Oct, 2021"
},
{
"code": null,
"e": 340,
"s": 28,
"text": "Jupyter Notebook is an open-source web application that allows you to create and share documents that contain live code, equations, visualizations, and narrative text. Uses in... |
Python Program for Bubble Sort | 13 Jun, 2022
Bubble Sort is the simplest sorting algorithm that works by repeatedly swapping the adjacent elements if they are in the wrong order.
Python3
# Python program for implementation of Bubble Sort def bubbleSort(arr): n = len(arr) # optimize code, so if the array is already sorted, it doesn't need # ... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n13 Jun, 2022"
},
{
"code": null,
"e": 187,
"s": 52,
"text": "Bubble Sort is the simplest sorting algorithm that works by repeatedly swapping the adjacent elements if they are in the wrong order. "
},
{
"code": null,
"e": 19... |
HTML | rowspan Attribute | 30 Nov, 2021
The rowspan attribute in HTML specifies the number of rows a cell should span. That is if a row spans two rows, it means it will take up the space of two rows in that table. It allows the single table cell to span the height of more than one cell or row. It provides the same functionality as “merge cell” i... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n30 Nov, 2021"
},
{
"code": null,
"e": 464,
"s": 52,
"text": "The rowspan attribute in HTML specifies the number of rows a cell should span. That is if a row spans two rows, it means it will take up the space of two rows in that table. ... |
ln command in Linux with Examples | 23 May, 2019
The ln command is used to create links between files. Before going into the application of the ln command in detail, please refer the below link for a clear understanding of the hard link and soft link in Linux. Hard and Soft Links in Linux
Syntax:
ln [OPTION]... [-T] TARGET LINK_NAME (1st form)
ln [OPTI... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n23 May, 2019"
},
{
"code": null,
"e": 269,
"s": 28,
"text": "The ln command is used to create links between files. Before going into the application of the ln command in detail, please refer the below link for a clear understanding of t... |
How to display array structure and values in PHP ? | 07 Oct, 2021
In this article, we will discuss how to display the array structure and values in PHP. To display the array structure and its values, we can use var_dump() and print_r() functions.
It includes
Array size
Array values
Array value with Index
Each value data type
We will display the array structure using var... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n07 Oct, 2021"
},
{
"code": null,
"e": 209,
"s": 28,
"text": "In this article, we will discuss how to display the array structure and values in PHP. To display the array structure and its values, we can use var_dump() and print_r() funct... |
Extend Contingency Table with Proportions and Percentages in R | 06 Jun, 2021
The data.table in R programming language can be used to store different cells containing values each belonging to a similar set of groups or mutually exclusive groups. The counts of the variables w.r.t their groups can be computed using base methods as well as external packages in R.
The table() method in ... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n06 Jun, 2021"
},
{
"code": null,
"e": 313,
"s": 28,
"text": "The data.table in R programming language can be used to store different cells containing values each belonging to a similar set of groups or mutually exclusive groups. The cou... |
HTML Hex Color Codes | 21 Feb, 2022
Example: In this example, we simply print the different hex color codes by using the background-color style in HTML heading tag.
HTML
<!DOCTYPE html><html> <head> <title>HTML Hex Color Codes</title></head> <body> <h1>Welcome To GeeksforGeeks</h1> <h2 style="background-color:#808000;">#808000</h2> <h2 s... | [
{
"code": null,
"e": 53,
"s": 25,
"text": "\n21 Feb, 2022"
},
{
"code": null,
"e": 182,
"s": 53,
"text": "Example: In this example, we simply print the different hex color codes by using the background-color style in HTML heading tag."
},
{
"code": null,
"e": 187,
... |
HTML | <img> src Attribute | 27 May, 2019
The <img> src attribute is used to specify the URL of the source image.
Syntax:
<img src="URL">
Attribute Values: It contains single value URL which specifies the link of source image. There are two types of URL link which are listed below:
Absolute URL: It points to another webpage.
Relative URL: It point... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n27 May, 2019"
},
{
"code": null,
"e": 100,
"s": 28,
"text": "The <img> src attribute is used to specify the URL of the source image."
},
{
"code": null,
"e": 108,
"s": 100,
"text": "Syntax:"
},
{
"code": null... |
How to Remove tags using BeautifulSoup in Python? | 08 Sep, 2021
Prerequisite- Beautifulsoup module
In this article, we are going to draft a python script that removes a tag from the tree and then completely destroys it and its contents. For this, decompose() method is used which comes built into the module.
Syntax:
Beautifulsoup.Tag.decompose()
Tag.decompose() remove... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n08 Sep, 2021"
},
{
"code": null,
"e": 63,
"s": 28,
"text": "Prerequisite- Beautifulsoup module"
},
{
"code": null,
"e": 273,
"s": 63,
"text": "In this article, we are going to draft a python script that removes a tag... |
How to set Value in the NumericUpDown in C#? | 26 Jul, 2019
In Windows Forms, NumericUpDown control is used to provide a Windows spin box or an up-down control which displays the numeric values. Or in other words, NumericUpDown control provides an interface which moves using up and down arrow and holds some pre-defined numeric value. In NumericUpDown control, you c... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n26 Jul, 2019"
},
{
"code": null,
"e": 555,
"s": 28,
"text": "In Windows Forms, NumericUpDown control is used to provide a Windows spin box or an up-down control which displays the numeric values. Or in other words, NumericUpDown control... |
PLSQL | SQRT Function | 18 Oct, 2019
The SQRT function is an inbuilt function in PLSQL which is used to return the square root of the given input number.
Syntax:
SQRT( number )
Parameters Used:This function accepts a parameters which are illustrated below:
number – This is the input number whose square root is going to be calculated.
Return V... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n18 Oct, 2019"
},
{
"code": null,
"e": 145,
"s": 28,
"text": "The SQRT function is an inbuilt function in PLSQL which is used to return the square root of the given input number."
},
{
"code": null,
"e": 153,
"s": 145,
... |
Sequence to sequence tutorial | by Sachin Abeywardana | Towards Data Science | This is one of the most powerful concepts in deep learning that started off in translation but has since moved on to question answering systems (Siri, Cortana etc.), audio transcribing etc. As the name suggests it’s useful for converting from one sequence to another.
The main idea behind this is that it contains an enc... | [
{
"code": null,
"e": 314,
"s": 46,
"text": "This is one of the most powerful concepts in deep learning that started off in translation but has since moved on to question answering systems (Siri, Cortana etc.), audio transcribing etc. As the name suggests it’s useful for converting from one sequence ... |
Cleaner R Code with Functional Programming | by Tim Book | Towards Data Science | Due to a job switch, I am a recent R-to-Python convert. However, a few side-projects keep me switching between the two languages daily. In addition to giving me a headache, this daily back-and-forth has given me a lot of thought about programming paradigms. Specifically, I’ve really become an evangelist for the functio... | [
{
"code": null,
"e": 644,
"s": 172,
"text": "Due to a job switch, I am a recent R-to-Python convert. However, a few side-projects keep me switching between the two languages daily. In addition to giving me a headache, this daily back-and-forth has given me a lot of thought about programming paradigm... |
C# - Interfaces | An interface is defined as a syntactical contract that all the classes inheriting the interface should follow. The interface defines the 'what' part of the syntactical contract and the deriving classes define the 'how' part of the syntactical contract.
Interfaces define properties, methods, and events, which are the me... | [
{
"code": null,
"e": 2523,
"s": 2270,
"text": "An interface is defined as a syntactical contract that all the classes inheriting the interface should follow. The interface defines the 'what' part of the syntactical contract and the deriving classes define the 'how' part of the syntactical contract."... |
World Map on HTML5 Canvas or SVG | You can use SVG to create a World Map and work with raphaeljs.
Firstly, learn how to add Raphael.js, and create a circle,
var paper = Raphael(10, 50, 320, 200);
// drawing circls
var circle = paper.circle(50, 40, 10);
circle.attr("fill", "#f00");
circle.attr("stroke", "#fff");
Then refer the following to create a Wor... | [
{
"code": null,
"e": 1125,
"s": 1062,
"text": "You can use SVG to create a World Map and work with raphaeljs."
},
{
"code": null,
"e": 1184,
"s": 1125,
"text": "Firstly, learn how to add Raphael.js, and create a circle,"
},
{
"code": null,
"e": 1342,
"s": 1184,
... |
C++ Algorithm Library - find_if_not() Function | The C++ function std::algorithm::find_if_not() finds the last occurrence of the element that satisfies the condition. It uses unary predicate to specify condition.
Following is the declaration for std::algorithm::find_if_not() function form std::algorithm header.
template <class InputIterator, class UnaryPredicate>
Inp... | [
{
"code": null,
"e": 2767,
"s": 2603,
"text": "The C++ function std::algorithm::find_if_not() finds the last occurrence of the element that satisfies the condition. It uses unary predicate to specify condition."
},
{
"code": null,
"e": 2867,
"s": 2767,
"text": "Following is the d... |
Count of integers of the form (2^x * 3^y) in the range [L, R] - GeeksforGeeks | 15 Dec, 2021
Given a range [L, R] where 0 ≤ L ≤ R ≤ 108. The task is to find the count of integers from the given range that can be represented as (2x) * (3y).Examples:
Input: L = 1, R = 10 Output: 7 The numbers are 1, 2, 3, 4, 6, 8 and 9Input: L = 100, R = 200 Output: 5 The numbers are 108, 128, 144, 162 and 192
... | [
{
"code": null,
"e": 25290,
"s": 25262,
"text": "\n15 Dec, 2021"
},
{
"code": null,
"e": 25448,
"s": 25290,
"text": "Given a range [L, R] where 0 ≤ L ≤ R ≤ 108. The task is to find the count of integers from the given range that can be represented as (2x) * (3y).Examples: "
},... |
Unsupervised Machine Learning Example in Keras | by Andrej Baranovskij | Towards Data Science | This post is about unsupervised learning and about my research related to the topic of fraudulent claims detection in health insurance.
There are several challenges related to fraudulent claims detection in health insurance. First, of them — there is no public data related to health insurance claims fraud, this is rela... | [
{
"code": null,
"e": 308,
"s": 172,
"text": "This post is about unsupervised learning and about my research related to the topic of fraudulent claims detection in health insurance."
},
{
"code": null,
"e": 1130,
"s": 308,
"text": "There are several challenges related to fraudulen... |
Count the number of elements in an array which are divisible by k in C++ | We are given with an array of positive integer numbers and an integer variable k. The task is to calculate the count of the number of elements in an array which is divisible by the given value k.
Input − int arr[] = {4, 2, 6, 1, 3, 8, 10, 9}, k = 2
Output − Count the number of elements in an array which are divisible b... | [
{
"code": null,
"e": 1258,
"s": 1062,
"text": "We are given with an array of positive integer numbers and an integer variable k. The task is to calculate the count of the number of elements in an array which is divisible by the given value k."
},
{
"code": null,
"e": 1311,
"s": 1258,... |
Reading from and Writing to Text Files | The StreamReader and StreamWriter classes are used for reading from and writing data to text files. These classes inherit from the abstract base class Stream, which supports reading and writing bytes into a file stream.
The StreamReader class also inherits from the abstract base class TextReader that represents a reade... | [
{
"code": null,
"e": 2520,
"s": 2300,
"text": "The StreamReader and StreamWriter classes are used for reading from and writing data to text files. These classes inherit from the abstract base class Stream, which supports reading and writing bytes into a file stream."
},
{
"code": null,
"... |
Compare two arrays of single characters and return the difference? JavaScript | We are required to compare, and get the difference, between two arrays containing single character strings appearing multiple times in each array.
Example of two such arrays are −
const arr1 = ['A', 'C', 'A', 'D'];
const arr2 = ['F', 'A', 'T', 'T'];
We will check each character at the same position and return only the ... | [
{
"code": null,
"e": 1209,
"s": 1062,
"text": "We are required to compare, and get the difference, between two arrays containing single character strings appearing multiple times in each array."
},
{
"code": null,
"e": 1242,
"s": 1209,
"text": "Example of two such arrays are −"
... |
How to only get the data of the nested JSON object in MongoDB? | To get the data of the nested JSON object in MongoDB, use findOne(). Let us create a collection with documents −
> db.demo109.insertOne(
... {
... "Name" : "Chris",
... "Subjects" : [
... {
... "Id" : "100",
... "Name":"MySQL",
... "InstructorDetails" : [
... ... | [
{
"code": null,
"e": 1175,
"s": 1062,
"text": "To get the data of the nested JSON object in MongoDB, use findOne(). Let us create a collection with documents −"
},
{
"code": null,
"e": 1837,
"s": 1175,
"text": "> db.demo109.insertOne(\n... {\n... \"Name\" : \"Chris\",\n.... |
JavaScript to check consecutive numbers in array? | To check for consecutive numbers like 100, 101, 102, etc., use the concept of reduce(). TRUE
would be returned for consecutive numbers, else false is the return value.
const sequceIsConsecutive = (obj) =>
Boolean(obj.reduce((output, lastest) => (output ?
(Number(output.number) + 1=== Number(lastest.number) ? lastest : ... | [
{
"code": null,
"e": 1230,
"s": 1062,
"text": "To check for consecutive numbers like 100, 101, 102, etc., use the concept of reduce(). TRUE\nwould be returned for consecutive numbers, else false is the return value."
},
{
"code": null,
"e": 1617,
"s": 1230,
"text": "const sequceI... |
How to disable copy/paste from/to EditText in Android App? | This example demonstrates how do I disable copy/paste from/to editText in android.
Step 1 − Create a new project in Android Studio, go to File ⇒ New Project and fill all required details to create a new project.
Step 2 − Add the following code to res/layout/activity_main.xml.
<?xml version="1.0" encoding="utf-8"?>
<Rel... | [
{
"code": null,
"e": 1145,
"s": 1062,
"text": "This example demonstrates how do I disable copy/paste from/to editText in android."
},
{
"code": null,
"e": 1274,
"s": 1145,
"text": "Step 1 − Create a new project in Android Studio, go to File ⇒ New Project and fill all required det... |
Longest Increasing Subsequence in Python | Suppose we have an unsorted list of integers. We have to find the longest increasing subsequence. So if the input is [10,9,2,5,3,7,101,18], then the output will be 4, as the increasing subsequence is [2,3,7,101]
To solve this, we will follow these steps −
trail := an array of length 0 to length of nums – 1, and fill th... | [
{
"code": null,
"e": 1274,
"s": 1062,
"text": "Suppose we have an unsorted list of integers. We have to find the longest increasing subsequence. So if the input is [10,9,2,5,3,7,101,18], then the output will be 4, as the increasing subsequence is [2,3,7,101]"
},
{
"code": null,
"e": 1318... |
MySQL stored-procedure: out parameter? | Here is a stored procedure that takes one parameter for input (IN) and second parameter for output (OUT)
mysql> delimiter //
mysql> create procedure Sp_SQRT(IN Number1 INT, OUT Number2 FLOAT)
-> Begin
-> set Number2=sqrt(Number1);
-> end;
-> //
Query OK, 0 rows affected (0.24 sec)
mysql> delimiter ;
Call th... | [
{
"code": null,
"e": 1167,
"s": 1062,
"text": "Here is a stored procedure that takes one parameter for input (IN) and second parameter for output (OUT)"
},
{
"code": null,
"e": 1375,
"s": 1167,
"text": "mysql> delimiter //\nmysql> create procedure Sp_SQRT(IN Number1 INT, OUT Numb... |
Reshaping DataFrames in Pandas. Your ultimate guide to reshaping... | by Anirudh Nanduri | Towards Data Science | Your ultimate guide to reshaping DataFrames in python
Pandas is easily one of the most used packages in python. This might not come as surprise to most of the folks reading this article. Many people use pandas to do different kinds on analysis on their data and much more. However, in certain situations we would want to... | [
{
"code": null,
"e": 226,
"s": 172,
"text": "Your ultimate guide to reshaping DataFrames in python"
},
{
"code": null,
"e": 1035,
"s": 226,
"text": "Pandas is easily one of the most used packages in python. This might not come as surprise to most of the folks reading this article... |
Swing Examples - Show Save File Dialog | Following example showcase how to create and show a save as file dialog in swing based application.
We are using the following APIs.
JFileChooser − To create a standard File chooser which allows user to save file/Folders.
JFileChooser − To create a standard File chooser which allows user to save file/Folders.
JFileChoo... | [
{
"code": null,
"e": 2139,
"s": 2039,
"text": "Following example showcase how to create and show a save as file dialog in swing based application."
},
{
"code": null,
"e": 2172,
"s": 2139,
"text": "We are using the following APIs."
},
{
"code": null,
"e": 2261,
"s... |
Visualizing Bike Mobility in London using Interactive Maps and Animations | by Eden Au | Towards Data Science | Bike sharing systems have become popular means of travel in recent years, providing a green and flexible transportation scheme to citizens in metropolitan areas. Many governments in the world have seen this as an innovative strategy that could potentially bring a number of societal benefits. For instance, it could redu... | [
{
"code": null,
"e": 483,
"s": 46,
"text": "Bike sharing systems have become popular means of travel in recent years, providing a green and flexible transportation scheme to citizens in metropolitan areas. Many governments in the world have seen this as an innovative strategy that could potentially ... |
Intro to DeepMind’s Reinforcement Learning Framework “Acme” | by Andreas Stöffelbauer | Jun, 2021 | Towards Data Science | Towards Data Science | Acme is a Python-based research framework for reinforcement learning, open sourced by Google’s DeepMind in 2020. It was designed to simplify the development of novel RL agents and accelerate RL research. According to their own statement, Acme is used on a daily basis at DeepMind, which is spearheading research in reinf... | [
{
"code": null,
"e": 539,
"s": 172,
"text": "Acme is a Python-based research framework for reinforcement learning, open sourced by Google’s DeepMind in 2020. It was designed to simplify the development of novel RL agents and accelerate RL research. According to their own statement, Acme is used on a... |
Addition and Blending of images using OpenCV in Python - GeeksforGeeks | 06 Feb, 2018
When we talk about images, we know its all about the matrix either binary image(0, 1), gray scale image(0-255) or RGB image(255 255 255). So additions of the image is adding the numbers of two matrices. In OpenCV, we have a command cv2.add() to add the images.
Below is code for Addition of two images using... | [
{
"code": null,
"e": 25174,
"s": 25146,
"text": "\n06 Feb, 2018"
},
{
"code": null,
"e": 25435,
"s": 25174,
"text": "When we talk about images, we know its all about the matrix either binary image(0, 1), gray scale image(0-255) or RGB image(255 255 255). So additions of the image... |
Arrange array elements such that last digit of an element is equal to first digit of the next element - GeeksforGeeks | 05 Feb, 2021
Given an array arr[] of integers, the task is to arrange the array elements such that the last digit of an element is equal to first digit of the next element.
Examples:
Input: arr[] = {123, 321} Output: 123 321
Input: arr[] = {451, 378, 123, 1254} Output: 1254 451 123 378
Naive approach: Find all the p... | [
{
"code": null,
"e": 24462,
"s": 24434,
"text": "\n05 Feb, 2021"
},
{
"code": null,
"e": 24622,
"s": 24462,
"text": "Given an array arr[] of integers, the task is to arrange the array elements such that the last digit of an element is equal to first digit of the next element."
... |
How to compare two dates in Java? | In Java, two dates can be compared using the compareTo() method of Comparable interface. This method returns '0' if both the dates are equal, it returns a value "greater than 0" if date1 is after date2 and it returns a value "less than 0" if date1 is before date2.
int compareTo(T o)
import java.text.*;
import java.util... | [
{
"code": null,
"e": 1327,
"s": 1062,
"text": "In Java, two dates can be compared using the compareTo() method of Comparable interface. This method returns '0' if both the dates are equal, it returns a value \"greater than 0\" if date1 is after date2 and it returns a value \"less than 0\" if date1 i... |
Saving multiple figures to one PDF file in matplotlib | To save multiple figures in one PDF file at once, we can take follwong steps
Set the figure size and adjust the padding between and around the subplots.
Set the figure size and adjust the padding between and around the subplots.
Create a new figure (fig1) or activate and existing figure using figure() method.
Create a ... | [
{
"code": null,
"e": 1139,
"s": 1062,
"text": "To save multiple figures in one PDF file at once, we can take follwong steps"
},
{
"code": null,
"e": 1215,
"s": 1139,
"text": "Set the figure size and adjust the padding between and around the subplots."
},
{
"code": null,
... |
Spring Cloud - Streams with Apache Kafka | In a distributed environment, services need to communicate with each other. The communication can either happen synchronously or asynchronously. In this section, we will look at how services can communicate by asynchronously using message brokers.
Two major benefits of performing asynchronous communication −
Producer a... | [
{
"code": null,
"e": 2126,
"s": 1878,
"text": "In a distributed environment, services need to communicate with each other. The communication can either happen synchronously or asynchronously. In this section, we will look at how services can communicate by asynchronously using message brokers."
},... |
How to check whether a String is a Balanced String or not ? | 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 example, we are going to see how to c... | [
{
"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,
... |
How to create a SplitMenuButton in JavaFX? | A menu is a list of options or commands presented to the user, typically menus contain items that perform some action. The contents of a menu are known as menu items and a menu bar holds multiple menus.
A button controls in user interface applications, in general, on clicking the button it performs the respective actio... | [
{
"code": null,
"e": 1265,
"s": 1062,
"text": "A menu is a list of options or commands presented to the user, typically menus contain items that perform some action. The contents of a menu are known as menu items and a menu bar holds multiple menus."
},
{
"code": null,
"e": 1385,
"s"... |
Estimating Non-linear Correlation in R | by Chitta Ranjan | Towards Data Science | In this post, we will learn about using a nonlinear correlation estimation function in R. We will also look at a few examples.
Correlation estimations are commonly used in various data mining applications. In my experience, nonlinear correlations are quite common in various processes. Due to this, nonlinear models, suc... | [
{
"code": null,
"e": 299,
"s": 172,
"text": "In this post, we will learn about using a nonlinear correlation estimation function in R. We will also look at a few examples."
},
{
"code": null,
"e": 649,
"s": 299,
"text": "Correlation estimations are commonly used in various data m... |
C++ if-else (Decision Making) | Practice | GeeksforGeeks | Given an integer N. Your task is to check if the integer is greater than, less than or equal to 5.
If the integer is greater than 5, then print "Greater than 5" (without quotes).
If the integer is less than 5, then print "Less than 5".
If the integer is equal to 5, then print "Equal to 5".
Example 1:
Input:
N = 8
Out... | [
{
"code": null,
"e": 529,
"s": 238,
"text": "Given an integer N. Your task is to check if the integer is greater than, less than or equal to 5.\nIf the integer is greater than 5, then print \"Greater than 5\" (without quotes).\nIf the integer is less than 5, then print \"Less than 5\".\nIf the integ... |
Clone a linked list with next and random pointer | Practice | GeeksforGeeks | You are given a special linked list with N nodes where each node has a next pointer pointing to its next node. You are also given M random pointers, where you will be given M number of pairs denoting two nodes a and b i.e. a->arb = b.
Construct a copy of the given list. The copy should consist of exactly N new nodes, ... | [
{
"code": null,
"e": 474,
"s": 238,
"text": "You are given a special linked list with N nodes where each node has a next pointer pointing to its next node. You are also given M random pointers, where you will be given M number of pairs denoting two nodes a and b i.e. a->arb = b."
},
{
"code... |
Comparing dates in MySQL ignoring time portion of a DateTime field? | To compare dates in MySQL except time portion of a datetime field, you can use DATE() function. The syntax is as follows −
select *from yourTableName where date(yourColumName) = yourDate;
To understand the above concept, let us create a table. The query to create a table is as follows −
mysql> create table ComparingDat... | [
{
"code": null,
"e": 1185,
"s": 1062,
"text": "To compare dates in MySQL except time portion of a datetime field, you can use DATE() function. The syntax is as follows −"
},
{
"code": null,
"e": 1250,
"s": 1185,
"text": "select *from yourTableName where date(yourColumName) = your... |
Find all reachable nodes from every node present in a given set in C++ | Suppose we have one undirected graph and a set of vertices; we have to find all reachable nodes from every vertex present in the given set.
So, if the input is like
then the output will be [1,2,3] and [4,5] as these are two connected components.
To solve this, we will follow these steps −
nodes := number of nodes in th... | [
{
"code": null,
"e": 1202,
"s": 1062,
"text": "Suppose we have one undirected graph and a set of vertices; we have to find all reachable nodes from every vertex present in the given set."
},
{
"code": null,
"e": 1227,
"s": 1202,
"text": "So, if the input is like"
},
{
"co... |
Generate table DDL via a query on MySQL and SQL Server? | The DDL stands for Data Definition Language. To generate the table DDL via query, you can
use show create command.
The syntax is as follows
SHOW CREATE TABLE yourTableName;
The above syntax is MySQL specific. Suppose, we have a table with the name
‘DDLOfTableStudent’.
First, create a table with the name ‘DDLOfTableStud... | [
{
"code": null,
"e": 1177,
"s": 1062,
"text": "The DDL stands for Data Definition Language. To generate the table DDL via query, you can\nuse show create command."
},
{
"code": null,
"e": 1202,
"s": 1177,
"text": "The syntax is as follows"
},
{
"code": null,
"e": 1235... |
How do I get email-id from a MongoDB document and display with print() | For this, use forEach() along with print() to display the email-id values. Let us create a collection with documents −
> db.demo690.insertOne({"UserName":"John","UserEmailId":"John@gmail.com"});
{
"acknowledged" : true,
"insertedId" : ObjectId("5ea6db31551299a9f98c939c")
}
> db.demo690.insertOne({"UserName":"Bob"... | [
{
"code": null,
"e": 1181,
"s": 1062,
"text": "For this, use forEach() along with print() to display the email-id values. Let us create a collection with documents −"
},
{
"code": null,
"e": 1664,
"s": 1181,
"text": "> db.demo690.insertOne({\"UserName\":\"John\",\"UserEmailId\":\... |
std::iota in C++ - GeeksforGeeks | 01 Sep, 2021
Store increasing sequence Assigns to every element in the range [first, last] successive values of val, as if incremented with ++val after each element is written.
Template :
void iota (ForwardIterator first, ForwardIterator last, T val);
Parameters :
first, last
Forward iterators to the initial and fin... | [
{
"code": null,
"e": 23732,
"s": 23704,
"text": "\n01 Sep, 2021"
},
{
"code": null,
"e": 23896,
"s": 23732,
"text": "Store increasing sequence Assigns to every element in the range [first, last] successive values of val, as if incremented with ++val after each element is written.... |
JavaScript TypeError - 'X' is not iterable - GeeksforGeeks | 29 Jul, 2020
This JavaScript exception is not iterable occurs if the value present at the right-hand-side of for...of or as argument of a function such as Promise.all or TypedArray.from, can not be iterated or is not an iterable object.
Message:
TypeError: 'x' is not iterable (Firefox, Chrome)
TypeError: 'x' is not a f... | [
{
"code": null,
"e": 24909,
"s": 24881,
"text": "\n29 Jul, 2020"
},
{
"code": null,
"e": 25133,
"s": 24909,
"text": "This JavaScript exception is not iterable occurs if the value present at the right-hand-side of for...of or as argument of a function such as Promise.all or TypedA... |
Ints contains() function in Java | The contains() function of the Ints class is used to check whether an element is present in the array or not.
Following is the syntax −
public static boolean
contains(int[] arr, int target)
Here, arr is the array wherein the element is to be checked. The target is the element to be checked.
Following is an example to i... | [
{
"code": null,
"e": 1172,
"s": 1062,
"text": "The contains() function of the Ints class is used to check whether an element is present in the array or not."
},
{
"code": null,
"e": 1198,
"s": 1172,
"text": "Following is the syntax −"
},
{
"code": null,
"e": 1252,
... |
Break Statement in Dart Programming | The break statement is used to take the control out of a construct. Using break in a loop causes the program to exit the loop. Following is an example of the break statement.
void main() {
var i = 1;
while(i<=10) {
if (i % 5 == 0) {
print("The first multiple of 5 between 1 and 10 is : ${i}"); ... | [
{
"code": null,
"e": 2700,
"s": 2525,
"text": "The break statement is used to take the control out of a construct. Using break in a loop causes the program to exit the loop. Following is an example of the break statement."
},
{
"code": null,
"e": 2954,
"s": 2700,
"text": "void ma... |
Node.js - Introduction | Node.js is a server-side platform built on Google Chrome's JavaScript Engine (V8 Engine). Node.js was developed by Ryan Dahl in 2009 and its latest version is v0.10.36. The definition of Node.js as supplied by its official documentation is as follows −
Node.js is a platform built on Chrome's JavaScript runtime for easi... | [
{
"code": null,
"e": 2271,
"s": 2018,
"text": "Node.js is a server-side platform built on Google Chrome's JavaScript Engine (V8 Engine). Node.js was developed by Ryan Dahl in 2009 and its latest version is v0.10.36. The definition of Node.js as supplied by its official documentation is as follows −"... |
Convert a list of objects to JSON using the Gson library in Java? | A Gson is a library that can be used to convert Java Objects to JSON representation. It can also be used to convert a JSON string to an equivalent Java object. The primary class to use is Gson which we can create by calling the new Gson() and the GsonBuilder class can be used to create a Gson instance.
We can convert a... | [
{
"code": null,
"e": 1366,
"s": 1062,
"text": "A Gson is a library that can be used to convert Java Objects to JSON representation. It can also be used to convert a JSON string to an equivalent Java object. The primary class to use is Gson which we can create by calling the new Gson() and the GsonBu... |
TypeORM - Relations | Relations are used to refer the relationship between table in database. In general, a relationship exists between two tables when one of them has a foreign key that references the primary key of the other table. This feature makes relational database more powerful and efficiently store information.
TypeORM allows the e... | [
{
"code": null,
"e": 2351,
"s": 2051,
"text": "Relations are used to refer the relationship between table in database. In general, a relationship exists between two tables when one of them has a foreign key that references the primary key of the other table. This feature makes relational database mo... |
PHP mysqli_connect() Function | The mysqli_connect() function establishes a connection with MySQL server and returns the connection as an object.
mysqli_connect([$host, $username, $passwd, $dname, $port, $socket] )
host(Optional)
This represents a host name or an IP address. If you pass Null or localhost as a value to this parameter, the local host ... | [
{
"code": null,
"e": 2871,
"s": 2757,
"text": "The mysqli_connect() function establishes a connection with MySQL server and returns the connection as an object."
},
{
"code": null,
"e": 2941,
"s": 2871,
"text": "mysqli_connect([$host, $username, $passwd, $dname, $port, $socket] )... |
Longest Common Prefix in Python | Suppose we have a set of strings in an array. We have to find the Longest Common Prefix amongst the string in the array. Here we will assume that all strings are lower case strings. And if there is no common prefix, then return “”.
So if the array of a string is like ["school", "schedule","Scotland"], then the Longest ... | [
{
"code": null,
"e": 1294,
"s": 1062,
"text": "Suppose we have a set of strings in an array. We have to find the Longest Common Prefix amongst the string in the array. Here we will assume that all strings are lower case strings. And if there is no common prefix, then return “”."
},
{
"code":... |
Python Number sin() Method | Python number method sin() returns the sine of x, in radians.
Following is the syntax for sin() method −
sin(x)
Note − This function is not accessible directly, so we need to import math module and then we need to call this function using math static object.
x − This must be a numeric value.
x − This must be a numeric... | [
{
"code": null,
"e": 2306,
"s": 2244,
"text": "Python number method sin() returns the sine of x, in radians."
},
{
"code": null,
"e": 2349,
"s": 2306,
"text": "Following is the syntax for sin() method −"
},
{
"code": null,
"e": 2357,
"s": 2349,
"text": "sin(x)... |
How to Create Liquid Filling Effect on Text using HTML and CSS ? - GeeksforGeeks | 28 Mar, 2022
The liquid fill text animation can be done using CSS | ::before selector. We will use key frames to set height for each frame of animation. Please make sure you know about both CSS | ::before selector and CSS | @keyframes Rule before try this code.The basic styling of the text can be done differently that ... | [
{
"code": null,
"e": 26057,
"s": 26029,
"text": "\n28 Mar, 2022"
},
{
"code": null,
"e": 26775,
"s": 26057,
"text": "The liquid fill text animation can be done using CSS | ::before selector. We will use key frames to set height for each frame of animation. Please make sure you kn... |
Factorial of a number using JavaScript - GeeksforGeeks | 11 Oct, 2019
Given a positive integer n and the task is to find the factorial of that number with the help of javaScript.
Examples:
Input : 4
Output : 24
Input : 5
Output : 120
Approach 1: Iterative Method In this approach, we are using a for loop to iterate over the sequence of numbers and get the factorial.
Example... | [
{
"code": null,
"e": 25759,
"s": 25731,
"text": "\n11 Oct, 2019"
},
{
"code": null,
"e": 25868,
"s": 25759,
"text": "Given a positive integer n and the task is to find the factorial of that number with the help of javaScript."
},
{
"code": null,
"e": 25878,
"s": 2... |
Maximum Sum Increasing Subsequence | DP-14 - GeeksforGeeks | 21 Feb, 2022
Given an array of n positive integers. Write a program to find the sum of maximum sum subsequence of the given array such that the integers in the subsequence are sorted in increasing order. For example, if input is {1, 101, 2, 3, 100, 4, 5}, then output should be 106 (1 + 2 + 3 + 100), if the input array ... | [
{
"code": null,
"e": 26581,
"s": 26553,
"text": "\n21 Feb, 2022"
},
{
"code": null,
"e": 27014,
"s": 26581,
"text": "Given an array of n positive integers. Write a program to find the sum of maximum sum subsequence of the given array such that the integers in the subsequence are ... |
Number of flips to make binary string alternate | Set 1 - GeeksforGeeks | 11 Aug, 2021
Given a binary string, that is it contains only 0s and 1s. We need to make this string a sequence of alternate characters by flipping some of the bits, our goal is to minimize the number of bits to be flipped. Examples :
Input : str = “001”
Output : 1
Minimum number of flips required = 1
We can flip 1st ... | [
{
"code": null,
"e": 26239,
"s": 26211,
"text": "\n11 Aug, 2021"
},
{
"code": null,
"e": 26462,
"s": 26239,
"text": "Given a binary string, that is it contains only 0s and 1s. We need to make this string a sequence of alternate characters by flipping some of the bits, our goal is... |
Python | Multiply Dictionary Value by Constant - GeeksforGeeks | 29 Dec, 2019
Sometimes, while working with dictionaries, we can have a use-case in which we require to multiply a particular key’s value by K in dictionary. It may seem a quite straight forward problem, but catch comes when the existence of a key is not known, hence becomes a 2 step process at times. Let’s discuss cert... | [
{
"code": null,
"e": 25739,
"s": 25711,
"text": "\n29 Dec, 2019"
},
{
"code": null,
"e": 26092,
"s": 25739,
"text": "Sometimes, while working with dictionaries, we can have a use-case in which we require to multiply a particular key’s value by K in dictionary. It may seem a quite... |
How to swap or exchange objects in Java? - GeeksforGeeks | 19 Nov, 2021
In order to understand how to swap objects in Java, let us consider an illustration below as follows:
Illustration:
Let’s say we have a class called “Car” with some attributes. And we create two objects of Car, say car1 and car2, how to exchange the data of car1 and car2?
Methods:
Using concepts of OOPSU... | [
{
"code": null,
"e": 25517,
"s": 25489,
"text": "\n19 Nov, 2021"
},
{
"code": null,
"e": 25619,
"s": 25517,
"text": "In order to understand how to swap objects in Java, let us consider an illustration below as follows:"
},
{
"code": null,
"e": 25634,
"s": 25619,
... |
Minimum pair sum operations to make array each element divisible by 4 - GeeksforGeeks | 03 May, 2021
Given an array of positive integers of length n. Our task is to find minimum number of operations to convert an array so that arr[i] % 4 is zero for each i. In each operation, we can take any two elements from the array, remove both of them and put back their sum in the array.Examples:
Input : arr = {2 ,... | [
{
"code": null,
"e": 26309,
"s": 26281,
"text": "\n03 May, 2021"
},
{
"code": null,
"e": 26598,
"s": 26309,
"text": "Given an array of positive integers of length n. Our task is to find minimum number of operations to convert an array so that arr[i] % 4 is zero for each i. In eac... |
How to implement Swipe to Refresh in React Native ? - GeeksforGeeks | 19 Jul, 2021
In this article, we will look at how we can use the Swipe Down to Refresh feature in React Native. In applications that show real-time data to the users such as crypto values or availability of a food item in a Food Ordering app, users can do a vertical swipe down on the app to manually refresh the data fr... | [
{
"code": null,
"e": 26169,
"s": 26141,
"text": "\n19 Jul, 2021"
},
{
"code": null,
"e": 26492,
"s": 26169,
"text": "In this article, we will look at how we can use the Swipe Down to Refresh feature in React Native. In applications that show real-time data to the users such as cr... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.