title stringlengths 3 221 | text stringlengths 17 477k | parsed listlengths 0 3.17k |
|---|---|---|
ReactJS | Calculator App ( Building UI ) | 08 Oct, 2020
In the previous article, we created our first app and deleted all those files we did not need and created some of the files that we will need in the future. Now as we stand in our current situation we have a blank canvas before us where we will have to create our calculator app.
Before moving on to actuall... | [
{
"code": null,
"e": 54,
"s": 26,
"text": "\n08 Oct, 2020"
},
{
"code": null,
"e": 334,
"s": 54,
"text": "In the previous article, we created our first app and deleted all those files we did not need and created some of the files that we will need in the future. Now as we stand i... |
Game of N stones where each player can remove 1, 3 or 4 - GeeksforGeeks | 26 Apr, 2021
Two players are playing a game with n stones where player 1 always plays first. The two players move in alternating turns and plays optimally. In a single move a player can remove either 1, 3 or 4 stones from the pile of stones. If a player is unable to make a move then that player loses the game. Given th... | [
{
"code": null,
"e": 25853,
"s": 25825,
"text": "\n26 Apr, 2021"
},
{
"code": null,
"e": 26264,
"s": 25853,
"text": "Two players are playing a game with n stones where player 1 always plays first. The two players move in alternating turns and plays optimally. In a single move a p... |
Slow Start Backoff Algorithm for Ad-Hoc - GeeksforGeeks | 17 Jan, 2022
If the receiver proclaims a large window-size, larger than what the network en-route can manage, then there will always be packet losses. So there will be re-transmissions as well. However, the sender can’t send all the packets for which ACK (Acknowledgement) has not been received. Because of this way, eve... | [
{
"code": null,
"e": 25661,
"s": 25633,
"text": "\n17 Jan, 2022"
},
{
"code": null,
"e": 26811,
"s": 25661,
"text": "If the receiver proclaims a large window-size, larger than what the network en-route can manage, then there will always be packet losses. So there will be re-trans... |
Program to find size of Doubly Linked List - GeeksforGeeks | 23 May, 2021
Given a doubly linked list, the task is to find the size of that doubly linked list. For example, size of below linked list is 4.
A doubly linked list is a linked data structure that consists of a set of sequentially linked records called nodes. Each node contains two fields, called links, that are re... | [
{
"code": null,
"e": 32366,
"s": 32338,
"text": "\n23 May, 2021"
},
{
"code": null,
"e": 32497,
"s": 32366,
"text": "Given a doubly linked list, the task is to find the size of that doubly linked list. For example, size of below linked list is 4. "
},
{
"code": null,
... |
Rust-Powered Command-Line Utilities to Increase Your Productivity | by Shinichi Okada | Towards Data Science | Table of ContentsIntroduction1. du alternatives: dust and dutree ∘ dust ∘ dutree2. time alternative: hyperfine3. A fuzzy finder: skim4. sed alternative: sd5. top/htop alternatives: ytop and bottom6. A Bonus TipConclusion
Last month, I wrote an article sharing seven Rust-powered command-line utilities.
Those are moder... | [
{
"code": null,
"e": 394,
"s": 171,
"text": "Table of ContentsIntroduction1. du alternatives: dust and dutree ∘ dust ∘ dutree2. time alternative: hyperfine3. A fuzzy finder: skim4. sed alternative: sd5. top/htop alternatives: ytop and bottom6. A Bonus TipConclusion"
},
{
"code": null,
... |
Arithmetic Expression Evaluation - GeeksforGeeks | 03 May, 2021
The stack organization is very effective in evaluating arithmetic expressions. Expressions are usually represented in what is known as Infix notation, in which each operator is written between two operands (i.e., A + B). With this notation, we must distinguish between ( A + B )*C and A + ( B * C ) by using... | [
{
"code": null,
"e": 24686,
"s": 24658,
"text": "\n03 May, 2021"
},
{
"code": null,
"e": 25207,
"s": 24686,
"text": "The stack organization is very effective in evaluating arithmetic expressions. Expressions are usually represented in what is known as Infix notation, in which eac... |
CSS | border-left-style Property - GeeksforGeeks | 22 Aug, 2021
The CSS border-left-style property is used to set the style of the left border of an element.
Default Value
none
Syntax:
border-left-style: none| hidden| dotted| dashed| solid| double |
groove| ridge| inset| outset| initial| inherit;
Properties Value:
Return Value: It returns the style of left border ... | [
{
"code": null,
"e": 26731,
"s": 26703,
"text": "\n22 Aug, 2021"
},
{
"code": null,
"e": 26825,
"s": 26731,
"text": "The CSS border-left-style property is used to set the style of the left border of an element."
},
{
"code": null,
"e": 26839,
"s": 26825,
"text... |
GeeksforGeeks | A computer science portal for geeks | Events at GeeksforGeeks
Courses at GeeksforGeeks
Write an Article
Java Tutorial
Python Tutorial
Data Structures Tutorial
Coding Practice
Events at GeeksforGeeks
Courses at GeeksforGeeks
Write an Article
Java Tutorial
Python Tutorial
Data Structures Tutorial
Coding Practice
Get Hired With Geek... | [
{
"code": null,
"e": 21877,
"s": 21851,
"text": "\nEvents at GeeksforGeeks\n"
},
{
"code": null,
"e": 21904,
"s": 21877,
"text": "\nCourses at GeeksforGeeks\n"
},
{
"code": null,
"e": 21923,
"s": 21904,
"text": "\nWrite an Article\n"
},
{
"code": null,... |
Maximum Sum Path in Two Arrays - GeeksforGeeks | 14 Jan, 2022
Given two sorted arrays, such that the arrays may have some common elements. Find the sum of the maximum sum path to reach from the beginning of any array to end of any of the two arrays. We can switch from one array to another array only at common elements. Note: The common elements do not have to be at t... | [
{
"code": null,
"e": 24793,
"s": 24765,
"text": "\n14 Jan, 2022"
},
{
"code": null,
"e": 25117,
"s": 24793,
"text": "Given two sorted arrays, such that the arrays may have some common elements. Find the sum of the maximum sum path to reach from the beginning of any array to end o... |
Material Design Lite - Footers | An MDL footer component comes in two primary forms: mega-footer and mini-footer. mega-footer contains more complex content than mini-footer. A mega-footer can represent multiple sections of content which are separated by horizontal rules, whereas a mini-footer presents a single section of content. The footers typically... | [
{
"code": null,
"e": 2272,
"s": 1886,
"text": "An MDL footer component comes in two primary forms: mega-footer and mini-footer. mega-footer contains more complex content than mini-footer. A mega-footer can represent multiple sections of content which are separated by horizontal rules, whereas a mini... |
Pass long parameter to an overloaded method in Java | Method overloading in a class contains multiple methods with the same name but the parameter list of the methods should not be the same. One of these methods can have a long parameter in their parameter list.
A program that demonstrates this is given as follows −
Live Demo
class PrintValues {
public void print(int ... | [
{
"code": null,
"e": 1271,
"s": 1062,
"text": "Method overloading in a class contains multiple methods with the same name but the parameter list of the methods should not be the same. One of these methods can have a long parameter in their parameter list."
},
{
"code": null,
"e": 1326,
... |
How to increment all the rows of a particular column by 1 in a single MySQL query (ID column +1)? | To increment all the rows of a particular ID column by 1, you need to use UPDATE command and update the table. The syntax of the query is as follows. We have also used ORDER BY here
UPDATE yourTableName SET yourIdColumnName=yourIdColumnName+1 ORDER BY yourIdColumnName DESC;
To understand the above syntax, let us create... | [
{
"code": null,
"e": 1244,
"s": 1062,
"text": "To increment all the rows of a particular ID column by 1, you need to use UPDATE command and update the table. The syntax of the query is as follows. We have also used ORDER BY here"
},
{
"code": null,
"e": 1337,
"s": 1244,
"text": "... |
How to Build a Real-time SCADA System Using Python and Arduino | by M Khorasani | Towards Data Science | Those of us who have worked with SCADA (supervisory control and data acquisition) systems the likes of OSIsoft and Oracle know how invaluable the data they provide can be. Especially for many in the business of data and natural sciences, SCADA is a rich source of real-world data on demand. Yet such systems do not come ... | [
{
"code": null,
"e": 858,
"s": 171,
"text": "Those of us who have worked with SCADA (supervisory control and data acquisition) systems the likes of OSIsoft and Oracle know how invaluable the data they provide can be. Especially for many in the business of data and natural sciences, SCADA is a rich s... |
JavaScript - Image Map | You can use JavaScript to create client-side image map. Client-side image maps are enabled by the usemap attribute for the <img /> tag and defined by special <map> and <area> extension tags.
The image that is going to form the map is inserted into the page using the <img /> element as normal, except that it carries an ... | [
{
"code": null,
"e": 2657,
"s": 2466,
"text": "You can use JavaScript to create client-side image map. Client-side image maps are enabled by the usemap attribute for the <img /> tag and defined by special <map> and <area> extension tags."
},
{
"code": null,
"e": 2971,
"s": 2657,
... |
Change string based on a condition - JavaScript | We are required to write a JavaScript function that takes in a string. The task of our function is to change the string according to the following condition −
If the first letter in the string is a capital letter then we should change the full string to capital letters.
Otherwise, we should change the full string to sm... | [
{
"code": null,
"e": 1221,
"s": 1062,
"text": "We are required to write a JavaScript function that takes in a string. The task of our function is to change the string according to the following condition −"
},
{
"code": null,
"e": 1333,
"s": 1221,
"text": "If the first letter in ... |
A nested loop puzzle - GeeksforGeeks | 13 Jan, 2022
Which of the following two code segments is faster? Assume that compiler makes no optimizations.
C++
C
Python3
/* FIRST */for(i = 0; i < 10; i++) for(j = 0; j < 100; j++) //do something // This code is contributed by Shubham Singh
/* FIRST */for(i=0;i<10;i++) for(j=0;j<100;j++) //do something
# F... | [
{
"code": null,
"e": 24408,
"s": 24380,
"text": "\n13 Jan, 2022"
},
{
"code": null,
"e": 24507,
"s": 24408,
"text": "Which of the following two code segments is faster? Assume that compiler makes no optimizations. "
},
{
"code": null,
"e": 24511,
"s": 24507,
... |
Evine - Interactive Web Crawler in Kali Linux - GeeksforGeeks | 14 Sep, 2021
Web Crawling is the technique of finding the hidden files and directories from the target server which can consist of some sensitive data about the architecture of the target domain. Manual crawling can be difficult if the scope of the target is vast. So we should approach Automated Crawling. There are var... | [
{
"code": null,
"e": 24406,
"s": 24378,
"text": "\n14 Sep, 2021"
},
{
"code": null,
"e": 25072,
"s": 24406,
"text": "Web Crawling is the technique of finding the hidden files and directories from the target server which can consist of some sensitive data about the architecture of... |
C++ | References | Question 1 - GeeksforGeeks | 28 Jun, 2021
What is the return value of f(p, p) if the value of p is initialized to 5 before the call? Note that the first parameter is passed by reference, whereas the second parameter is passed by value.
int f(int &x, int c) {
c = c - 1;
if (c == 0) return 1;
x = x + 1;
return f(x, c) * x;
}
(A) 3024(B... | [
{
"code": null,
"e": 24234,
"s": 24206,
"text": "\n28 Jun, 2021"
},
{
"code": null,
"e": 24428,
"s": 24234,
"text": "What is the return value of f(p, p) if the value of p is initialized to 5 before the call? Note that the first parameter is passed by reference, whereas the second... |
4 Easy Steps for Implementing CatBoost | Towards Data Science | IntroductionInstallation and ImportsDefine DatasetApply ModelPredictSummaryReferences
Introduction
Installation and Imports
Define Dataset
Apply Model
Predict
Summary
References
CatBoost [2] has beaten many other popular machine learning algorithms on benchmark datasets where logloss was the error metric. It beat mainl... | [
{
"code": null,
"e": 133,
"s": 47,
"text": "IntroductionInstallation and ImportsDefine DatasetApply ModelPredictSummaryReferences"
},
{
"code": null,
"e": 146,
"s": 133,
"text": "Introduction"
},
{
"code": null,
"e": 171,
"s": 146,
"text": "Installation and Im... |
Neo4j Delete Node - GeeksforGeeks | 23 Aug, 2019
In Neo4j to delete a node or relations between nodes you have to use DELETE clause. To delete any node you need DELETE clause with the MATCH statement, the MATCH statement data will find the specific node and whichever node is matched with the statement that node will be vanished. Similar to the CREATE and... | [
{
"code": null,
"e": 24276,
"s": 24248,
"text": "\n23 Aug, 2019"
},
{
"code": null,
"e": 24717,
"s": 24276,
"text": "In Neo4j to delete a node or relations between nodes you have to use DELETE clause. To delete any node you need DELETE clause with the MATCH statement, the MATCH s... |
5 Highly Practical NumPy Operations | by Soner Yıldırım | Towards Data Science | NumPy is the most widely-used scientific computing library for Python. It serves as a basis for many other libraries such as Pandas.
NumPy makes it very simple and fast to operate on large arrays of numbers. Since we are likely to have lots of data, having a super efficient tools like NumPy is of great importance.
In t... | [
{
"code": null,
"e": 305,
"s": 172,
"text": "NumPy is the most widely-used scientific computing library for Python. It serves as a basis for many other libraries such as Pandas."
},
{
"code": null,
"e": 488,
"s": 305,
"text": "NumPy makes it very simple and fast to operate on lar... |
Count of triplets in an Array (i, j, k) such that i < j < k and a[k] < a[i] < a[j] - GeeksforGeeks | 13 Apr, 2021
Given an array arr[] of N integers, the task is to count number of triplets (i, j, k) in the array such that a[k] < a[i] < a[j] and i < j < k.Examples:
Input: arr[] = {2, 5, 1, 3, 0} Output: 4 Explanation: Below are the triplets (i, j, k) such that i < j < k and a[k] < a[i] < a[j]: 1. (0, 1, 2) and arr[2]... | [
{
"code": null,
"e": 25174,
"s": 25146,
"text": "\n13 Apr, 2021"
},
{
"code": null,
"e": 25327,
"s": 25174,
"text": "Given an array arr[] of N integers, the task is to count number of triplets (i, j, k) in the array such that a[k] < a[i] < a[j] and i < j < k.Examples: "
},
{
... |
Filter sub documents by sub document in MongoDB? | For this, use aggregate() along with $unwind. Let us create a collection with documents −
> db.demo583.insert([
... {
... "details1" : [
... {
... "details2" : [
... {
... "isMarried" : true,
... "Name" : "Chris"
... },
... ... | [
{
"code": null,
"e": 1152,
"s": 1062,
"text": "For this, use aggregate() along with $unwind. Let us create a collection with documents −"
},
{
"code": null,
"e": 2082,
"s": 1152,
"text": "> db.demo583.insert([\n... {\n... \"details1\" : [\n... {\n... ... |
C++ program to find sum of digits of a number until sum becomes single digit | In this article, we will be discussing a program to find the sum of digits of a number until the sum itself becomes a single digit and cannot be done summation of further.
For example, take the case of a number 14520. Adding the digits of this number we get 1 + 4 + 5 + 2 + 0 = 12. Since this is not a single digit numbe... | [
{
"code": null,
"e": 1234,
"s": 1062,
"text": "In this article, we will be discussing a program to find the sum of digits of a number until the sum itself becomes a single digit and cannot be done summation of further."
},
{
"code": null,
"e": 1472,
"s": 1234,
"text": "For exampl... |
Bring your Telegram Chatbot to the next level | by Beppe Catanese | Towards Data Science | Telegram is a popular platform to develop chatbots: excellent documentation, vibrant community, various libraries and tons of examples.
If you are getting started there are plenty of tutorials around, especially on Medium. And Stackoverflow is also a great resource for answering questions and understanding issues (your... | [
{
"code": null,
"e": 308,
"s": 172,
"text": "Telegram is a popular platform to develop chatbots: excellent documentation, vibrant community, various libraries and tons of examples."
},
{
"code": null,
"e": 564,
"s": 308,
"text": "If you are getting started there are plenty of tut... |
Java Examples - Retrieve Contents from many Tables | How to join contents of more than one table & display?
Following example uses inner join sql command to combine data from two tables. To display the contents of the table getString() method of resultset is used.
import java.sql.*;
public class jdbcConn {
public static void main(String[] args) throws Exception {
... | [
{
"code": null,
"e": 2123,
"s": 2068,
"text": "How to join contents of more than one table & display?"
},
{
"code": null,
"e": 2280,
"s": 2123,
"text": "Following example uses inner join sql command to combine data from two tables. To display the contents of the table getString()... |
Python program to get all unique combinations of two Lists | 16 Jun, 2021
The combination is a mathematical technique which calculates the number of possible arrangements in a collection of items or list. In combination order of selection doesn’t matter. The unique combination of two lists in Python can be formed by pairing each element of the first list with the elements of the... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n16 Jun, 2021"
},
{
"code": null,
"e": 350,
"s": 28,
"text": "The combination is a mathematical technique which calculates the number of possible arrangements in a collection of items or list. In combination order of selection doesn’t ma... |
How to get the entire HTML document as a string in JavaScript ? | 13 Apr, 2021
Given an HTML document, the task is to get the entire document as a string using JavaScript. Here few methods are discussed:
getElementsByTagName() Method This method returns a set of all elements in the document with the defined tag name, as a NodeList object. This object represents a collection of node... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n13 Apr, 2021"
},
{
"code": null,
"e": 155,
"s": 28,
"text": "Given an HTML document, the task is to get the entire document as a string using JavaScript. Here few methods are discussed: "
},
{
"code": null,
"e": 408,
"s... |
How to check if an instance of 15 puzzle is solvable? | 30 Nov, 2021
Given a 4×4 board with 15 tiles (every tile has one number from 1 to 15) and one empty space. The objective is to place the numbers on tiles in order using the empty space. We can slide four adjacent (left, right, above and below) tiles into the empty space. For example,
Here X marks the spot to where the... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n30 Nov, 2021"
},
{
"code": null,
"e": 325,
"s": 52,
"text": "Given a 4×4 board with 15 tiles (every tile has one number from 1 to 15) and one empty space. The objective is to place the numbers on tiles in order using the empty space. W... |
Look-and-Say Sequence | 28 Jun, 2022
Find the n’th term in Look-and-say (Or Count and Say) Sequence. The look-and-say sequence is the sequence of the below integers: 1, 11, 21, 1211, 111221, 312211, 13112221, 1113213211, ...
How is the above sequence generated? n’th term is generated by reading (n-1)’th term.
The first term is "1"
Second te... | [
{
"code": null,
"e": 54,
"s": 26,
"text": "\n28 Jun, 2022"
},
{
"code": null,
"e": 243,
"s": 54,
"text": "Find the n’th term in Look-and-say (Or Count and Say) Sequence. The look-and-say sequence is the sequence of the below integers: 1, 11, 21, 1211, 111221, 312211, 13112221, 11... |
Number of ways in which N can be represented as the sum of two positive integers | 19 Mar, 2022
Given a number N, the task is to find the number of unique ways in which N can be represented as a sum of two positive integers.Examples:
Input: N = 7 Output: 3 (1 + 6), (2 + 5) and (3 + 4).Input: N = 200 Output: 100
Approach: The number of ways in which the number can be expressed as the sum of two ... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n19 Mar, 2022"
},
{
"code": null,
"e": 168,
"s": 28,
"text": "Given a number N, the task is to find the number of unique ways in which N can be represented as a sum of two positive integers.Examples: "
},
{
"code": null,
"e"... |
How to Insert Image in SQLite using Python? | 16 May, 2021
In this article, we will discuss how to insert images in SQLite using sqlite3 module in Python.
1. Set the connection to the SQLite database using Python code.
sqliteConnection = sqlite3.connect('SQLite_Retrieving_data.db')
cursor = sqliteConnection.cursor()
2. We need to define an INSERT query for inserti... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n16 May, 2021"
},
{
"code": null,
"e": 124,
"s": 28,
"text": "In this article, we will discuss how to insert images in SQLite using sqlite3 module in Python."
},
{
"code": null,
"e": 188,
"s": 124,
"text": "1. Set the... |
Flip all K-bits of a given number | 04 May, 2021
Given two integers N and K, the task is to represent N in K bits and print the number obtained after flipping all the bits.
Examples:
Input:N = 1, K = 32Output: 4294967294Explanation:1 in K(= 32) bit representation is (00000000000000000000000000000001)2.Flipping all the bits modifies N to (1111111111111111... | [
{
"code": null,
"e": 54,
"s": 26,
"text": "\n04 May, 2021"
},
{
"code": null,
"e": 178,
"s": 54,
"text": "Given two integers N and K, the task is to represent N in K bits and print the number obtained after flipping all the bits."
},
{
"code": null,
"e": 188,
"s":... |
PyQt5 – Multi line label | 06 May, 2020
In this article we will see how we can create a multi-line label, when we create a label and set text to it and if the text length is greater then the length of the label extra text did not show, multi-line label make that extra text go into the other line. Below is the representation of how normal and mul... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n06 May, 2020"
},
{
"code": null,
"e": 360,
"s": 28,
"text": "In this article we will see how we can create a multi-line label, when we create a label and set text to it and if the text length is greater then the length of the label extr... |
Manipulators in C++ with Examples | 12 Jun, 2022
Manipulators are helping functions that can modify the input/output stream. It does not mean that we change the value of a variable, it only modifies the I/O stream using insertion (<<) and extraction (>>) operators.
Manipulators are special functions that can be included in the I/O statement to alter the... | [
{
"code": null,
"e": 54,
"s": 26,
"text": "\n12 Jun, 2022"
},
{
"code": null,
"e": 272,
"s": 54,
"text": "Manipulators are helping functions that can modify the input/output stream. It does not mean that we change the value of a variable, it only modifies the I/O stream using ins... |
Vectors in Octave GNU | 18 Aug, 2020
Vector in Octave is similar to the array in every aspect except the vector size is dynamic, which means its size can be increased however array does not allow such type of increment in its size.
Types of Vectors
Row Vector
Column Vector
Row vectors are created by enclosing the set of elements in square bra... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n18 Aug, 2020"
},
{
"code": null,
"e": 223,
"s": 28,
"text": "Vector in Octave is similar to the array in every aspect except the vector size is dynamic, which means its size can be increased however array does not allow such type of inc... |
Python | numpy.putmask() method | 03 Oct, 2019
With the help of numpy.putmask() method, we can change the elements in an array with the help of condition and given value by using numpy.putmask() method.
Syntax : numpy.putmask(array, condition, value)Return : Return the array having new elements according to value.
Example #1 :In this example we can see... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n03 Oct, 2019"
},
{
"code": null,
"e": 184,
"s": 28,
"text": "With the help of numpy.putmask() method, we can change the elements in an array with the help of condition and given value by using numpy.putmask() method."
},
{
"code... |
Get the Hour from timestamp in Pandas | 24 Jul, 2020
Let’s see how to extract the hour from a timestamp in Pandas, with the help of multiple examples.
Example 1 : pandas.timestamp.now() takes timezone as input and returns current timestamp object of that timezone.
# importing the moduleimport pandas as pd # input current timestampdate = pd.Timestamp.now()pr... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n24 Jul, 2020"
},
{
"code": null,
"e": 126,
"s": 28,
"text": "Let’s see how to extract the hour from a timestamp in Pandas, with the help of multiple examples."
},
{
"code": null,
"e": 240,
"s": 126,
"text": "Example ... |
Big Data Engineering — Best Practices | by Kaya Kupferschmidt | Towards Data Science | This is part 1 of a series on data engineering in a big data environment. It will reflect my personal journey of lessons learnt and culminate in the open source tool Flowman I created to take the burden of reimplementing all the boiler plate code over and over again in a couple of projects.
Part 1: Big Data Engineering... | [
{
"code": null,
"e": 339,
"s": 47,
"text": "This is part 1 of a series on data engineering in a big data environment. It will reflect my personal journey of lessons learnt and culminate in the open source tool Flowman I created to take the burden of reimplementing all the boiler plate code over and ... |
How to remove duplicate values inside a list in MongoDB? | You can use aggregate framework along with $setUnion operator. Let us first create a collection with documents −
> db.removeDuplicatesDemo.insertOne({"InstructorName":"Chris","InstructorAge":34,"InstructorSubject":
["Java","C","Java","C++","MongoDB","MySQL","MongoDB"]});
{
"acknowledged" : true,
"insertedId" :... | [
{
"code": null,
"e": 1175,
"s": 1062,
"text": "You can use aggregate framework along with $setUnion operator. Let us first create a collection with documents −"
},
{
"code": null,
"e": 1422,
"s": 1175,
"text": "> db.removeDuplicatesDemo.insertOne({\"InstructorName\":\"Chris\",\"I... |
Maximum Likelihood Estimation (MLE) and the Fisher Information | by Xichu Zhang | Towards Data Science | The number of articles on Medium about MLE is enormous, from theory to implementation in different languages. About the Fisher information, there are also quite a few tutorials. However, the connection between the Fisher information and MLE is rarely mentioned. Therefore, I’d like to contribute one post on this topic.
... | [
{
"code": null,
"e": 366,
"s": 46,
"text": "The number of articles on Medium about MLE is enormous, from theory to implementation in different languages. About the Fisher information, there are also quite a few tutorials. However, the connection between the Fisher information and MLE is rarely menti... |
Processing large data files with Python multithreading | by Miguel Albrecht | Towards Data Science | We spend a lot of time waiting for some data preparation task to finish —the destiny of data scientists, you would say. Well, we can speed things up. Here are two techniques that will come handy: memory mapped files and multithreading.
I had recently to extract terms and term frequencies from the Google Books Ngram cor... | [
{
"code": null,
"e": 283,
"s": 47,
"text": "We spend a lot of time waiting for some data preparation task to finish —the destiny of data scientists, you would say. Well, we can speed things up. Here are two techniques that will come handy: memory mapped files and multithreading."
},
{
"code"... |
SQL - Quick Guide | SQL is a language to operate databases; it includes database creation, deletion, fetching rows, modifying rows, etc. SQL is an ANSI (American National Standards Institute) standard language, but there are many different versions of the SQL language.
SQL is Structured Query Language, which is a computer language for sto... | [
{
"code": null,
"e": 2703,
"s": 2453,
"text": "SQL is a language to operate databases; it includes database creation, deletion, fetching rows, modifying rows, etc. SQL is an ANSI (American National Standards Institute) standard language, but there are many different versions of the SQL language."
... |
Count of distinct graphs that can be formed with N vertices - GeeksforGeeks | 28 Mar, 2022
Given an integer N which is the number of vertices. The task is to find the number of distinct graphs that can be formed. Since the answer can be very large, print the answer % 1000000007.Examples:
Input: N = 3 Output: 8Input: N = 4 Output: 64
Approach:
The maximum number of edges a graph with N ve... | [
{
"code": null,
"e": 25219,
"s": 25191,
"text": "\n28 Mar, 2022"
},
{
"code": null,
"e": 25419,
"s": 25219,
"text": "Given an integer N which is the number of vertices. The task is to find the number of distinct graphs that can be formed. Since the answer can be very large, print... |
Pair Sum Existence- Revisited | Practice | GeeksforGeeks | You are given an array A of size N, and you are also given a sum. You need to find if two numbers in A exists that have sum equal to the given sum.
Input Format:
The first line of input contains T denoting the number of testcases. T testcases follow. Each testcase contains three lines of input. The first line contains ... | [
{
"code": null,
"e": 374,
"s": 226,
"text": "You are given an array A of size N, and you are also given a sum. You need to find if two numbers in A exists that have sum equal to the given sum."
},
{
"code": null,
"e": 669,
"s": 374,
"text": "Input Format:\nThe first line of input... |
Predicting Diabetes using Logistic Regression with TensorFlow.js | by Venelin Valkov | Towards Data Science | TL;DR Build a Logistic Regression model in TensorFlow.js using the high-level layers API, and predict whether or not a patient has Diabetes. Learn how to visualize the data, create a Dataset, train and evaluate multiple models.
You’ve been living in this forgotten city for the past 8+ months. You never felt comfortable... | [
{
"code": null,
"e": 274,
"s": 46,
"text": "TL;DR Build a Logistic Regression model in TensorFlow.js using the high-level layers API, and predict whether or not a patient has Diabetes. Learn how to visualize the data, create a Dataset, train and evaluate multiple models."
},
{
"code": null,
... |
Database Backup from MySQL - GeeksforGeeks | 19 Nov, 2019
Here, The database creating now a day is very important for daily work. The database creates from the MySQL that can be transferred from one system to another and also make it secure from the destroy. Sometimes the system gets corrupted by some faults, so the created database is clear. So there is an optio... | [
{
"code": null,
"e": 23974,
"s": 23946,
"text": "\n19 Nov, 2019"
},
{
"code": null,
"e": 24344,
"s": 23974,
"text": "Here, The database creating now a day is very important for daily work. The database creates from the MySQL that can be transferred from one system to another and ... |
How to Deploy a FastAPI App on Heroku for Free | by Shinichi Okada | Towards Data Science | Heroku is a cloud Platform As A Service (PaaS) supporting Ruby on Rails, Java, Node.js, Scala, Clojure, Python, PHP, and Go. Heroku’s free version offers 550–1000 dyno hours per month. Your apps sleep after 30 mins if no one is using your app. Your apps will be always free if your monthly dyno hours is within the limit... | [
{
"code": null,
"e": 493,
"s": 171,
"text": "Heroku is a cloud Platform As A Service (PaaS) supporting Ruby on Rails, Java, Node.js, Scala, Clojure, Python, PHP, and Go. Heroku’s free version offers 550–1000 dyno hours per month. Your apps sleep after 30 mins if no one is using your app. Your apps w... |
JavaScript Remainder(%) Operator - GeeksforGeeks | 22 Apr, 2021
Remainder operator is JavaScript is used to get the remaining value when an operand is divided by another operand. In some languages, % is considered as modulo. Modulo and Remainder work differently when the sign of both the operand is different.
In JavaScript remainder takes the sign of the dividend and t... | [
{
"code": null,
"e": 26655,
"s": 26627,
"text": "\n22 Apr, 2021"
},
{
"code": null,
"e": 26902,
"s": 26655,
"text": "Remainder operator is JavaScript is used to get the remaining value when an operand is divided by another operand. In some languages, % is considered as modulo. Mo... |
Find the maximum value permutation of a graph - GeeksforGeeks | 07 Jun, 2021
Given a graph containing N nodes. For any permutation of nodes P1, P2, P3, ..., PN the value of the permutation is defined as the number of indices which have at least 1 node on the left of it that has an edge to it. Find the maximum value across all permutations.Examples:
Input: N = 3, edges[] = {{1, 2}... | [
{
"code": null,
"e": 24666,
"s": 24638,
"text": "\n07 Jun, 2021"
},
{
"code": null,
"e": 24942,
"s": 24666,
"text": "Given a graph containing N nodes. For any permutation of nodes P1, P2, P3, ..., PN the value of the permutation is defined as the number of indices which have at l... |
Python PIL | ImageOps.expand() method | 16 Sep, 2021
PIL is the Python Imaging Library which provides the python interpreter with image editing capabilities. the ImageOps module contains a number of ‘ready-made’ image processing operations. This module is somewhat experimental, and most operators only work on L and RGB images.ImageOps.expand() adds a border ... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n16 Sep, 2021"
},
{
"code": null,
"e": 393,
"s": 28,
"text": "PIL is the Python Imaging Library which provides the python interpreter with image editing capabilities. the ImageOps module contains a number of ‘ready-made’ image processing... |
Number of pairs with maximum sum | 14 Jun, 2022
Given an array arr[], count number of pairs arr[i], arr[j] such that arr[i] + arr[j] is maximum and i < j.
Example :
Input : arr[] = {1, 1, 1, 2, 2, 2}
Output : 3
Explanation: The maximum possible pair
sum where i<j is 4, which is given
by 3 pairs, so the answer is 3
the pairs are (2, 2), (2, 2) and (2... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n14 Jun, 2022"
},
{
"code": null,
"e": 159,
"s": 52,
"text": "Given an array arr[], count number of pairs arr[i], arr[j] such that arr[i] + arr[j] is maximum and i < j."
},
{
"code": null,
"e": 500,
"s": 159,
"text":... |
HTML <label> for Attribute | 21 Jun, 2022
The HTML <label> for Attribute is used to specify the type of form element a label is bound to.
Syntax:
<label for="element_id">
Attribute Values: It contains the value i.e element_id which specify the id of the element that the label is bound to.
Example: This Example that illustrates the use of for att... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n21 Jun, 2022"
},
{
"code": null,
"e": 125,
"s": 28,
"text": "The HTML <label> for Attribute is used to specify the type of form element a label is bound to. "
},
{
"code": null,
"e": 133,
"s": 125,
"text": "Syntax:"
... |
Waybackurls – Fetch all the URLs that the Wayback Machine knows about for a domain | 23 Aug, 2021
Web crawling in security testing is an important aspect as this is the process of indexing data on web pages by using automated scripts or crawling programs. These scripts pr crawling programs are known as web crawler, spider, spider bot, and a crawler. Waybackurls is also a Golang based script or tool us... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n23 Aug, 2021"
},
{
"code": null,
"e": 475,
"s": 28,
"text": "Web crawling in security testing is an important aspect as this is the process of indexing data on web pages by using automated scripts or crawling programs. These scripts pr ... |
How to Automate VPN to change IP location on Ubuntu using Python? | 04 Jul, 2021
To Protect Our system from unauthorized users Access you can spoof our system’s IP Address using VPN service provided by different organizations. You can set up a VPN on your system for free.
After you set up and log in to the VPN over the Ubuntu system you need to manually connect with different VPN ser... | [
{
"code": null,
"e": 54,
"s": 26,
"text": "\n04 Jul, 2021"
},
{
"code": null,
"e": 248,
"s": 54,
"text": "To Protect Our system from unauthorized users Access you can spoof our system’s IP Address using VPN service provided by different organizations. You can set up a VPN on your... |
Cyclomatic Complexity | 21 Jun, 2021
Cyclomatic complexity of a code section is the quantitative measure of the number of linearly independent paths in it. It is a software metric used to indicate the complexity of a program. It is computed using the Control Flow Graph of the program. The nodes in the graph indicate the smallest group of comm... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n21 Jun, 2021"
},
{
"code": null,
"e": 495,
"s": 52,
"text": "Cyclomatic complexity of a code section is the quantitative measure of the number of linearly independent paths in it. It is a software metric used to indicate the complexity... |
When to use the readAllBytes() method of InputStream in Java 9? | Since Java 9, we can use the readAllBytes() method from InputStream class to read all bytes into a byte array. This method reads all bytes from an InputStream object at once and blocks until all remaining bytes have read and end of a stream is detected, or an exception is thrown.
The reallAllBytes() method can't automa... | [
{
"code": null,
"e": 1468,
"s": 1187,
"text": "Since Java 9, we can use the readAllBytes() method from InputStream class to read all bytes into a byte array. This method reads all bytes from an InputStream object at once and blocks until all remaining bytes have read and end of a stream is detected,... |
Automated Trading using Python | 16 Jul, 2020
Using Python speeds up the trading process, and hence it is also called automated trading/ quantitative trading. The use of Python is credited to its highly functional libraries like TA-Lib, Zipline, Scipy, Pyplot, Matplotlib, NumPy, Pandas etc. Exploring the data at hand is called data analysis. Starting... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n16 Jul, 2020"
},
{
"code": null,
"e": 409,
"s": 28,
"text": "Using Python speeds up the trading process, and hence it is also called automated trading/ quantitative trading. The use of Python is credited to its highly functional librari... |
Java Program to Handle Unchecked Exception | 27 Apr, 2022
Exceptions are the issues arising at the runtime resulting in an abrupt flow of working of the program. Remember exceptions are never thrown at the compile-time rather always at runtime be it of any type. No exception is thrown at compile time. Throwable Is super-class of all exceptions and errors too. Now... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n27 Apr, 2022"
},
{
"code": null,
"e": 463,
"s": 28,
"text": "Exceptions are the issues arising at the runtime resulting in an abrupt flow of working of the program. Remember exceptions are never thrown at the compile-time rather always ... |
Draw Concentric Circles with VIBGYOR Using Turtle in Python | 20 Oct, 2020
Turtle is an inbuilt module in Python. It provides drawing using a screen (cardboard) and turtle (pen). To draw something on the screen, we need to move the turtle (pen). To move turtle, there are some functions i.e forward(), backward(), etc.
Following steps are used :
Importing turtle module
Set a screen... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n20 Oct, 2020"
},
{
"code": null,
"e": 272,
"s": 28,
"text": "Turtle is an inbuilt module in Python. It provides drawing using a screen (cardboard) and turtle (pen). To draw something on the screen, we need to move the turtle (pen). To m... |
How to generate a random phone number using Python? | 27 Mar, 2021
In this article, we will learn how to generate a random phone number using Python. In general, Indian phone numbers are of 10 digits and start with 9, 8, 7, or 6.
Approach:
We will use the random library to generate random numbers.
The number should contain 10 digits.
The first digit should start with 9 or... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n27 Mar, 2021"
},
{
"code": null,
"e": 191,
"s": 28,
"text": "In this article, we will learn how to generate a random phone number using Python. In general, Indian phone numbers are of 10 digits and start with 9, 8, 7, or 6."
},
{
... |
Java - The LinkedHashSet Class | This class extends HashSet, but adds no members of its own.
LinkedHashSet maintains a linked list of the entries in the set, in the order in which they were inserted. This allows insertion-order iteration over the set.
That is, when cycling through a LinkedHashSet using an iterator, the elements will be returned in the... | [
{
"code": null,
"e": 2571,
"s": 2511,
"text": "This class extends HashSet, but adds no members of its own."
},
{
"code": null,
"e": 2730,
"s": 2571,
"text": "LinkedHashSet maintains a linked list of the entries in the set, in the order in which they were inserted. This allows ins... |
How to build a Horizontal ListView with RecyclerView in Android? | Before getting into example, we should know what is Recycler view in android. Recycler view is more advanced version of list view and it works based on View holder design pattern. Using recycler view we can show grids and list of items.
This example demonstrate about how to build a horizontal list view with Recycler Vi... | [
{
"code": null,
"e": 1424,
"s": 1187,
"text": "Before getting into example, we should know what is Recycler view in android. Recycler view is more advanced version of list view and it works based on View holder design pattern. Using recycler view we can show grids and list of items."
},
{
"c... |
Compute the parity of a number using XOR and table look-up | 27 Jun, 2022
Parity of a number refers to whether it contains an odd or even number of 1-bits. The number has “odd parity”, if it contains odd number of 1-bits and is “even parity” if it contains even number of 1-bits.
1 --> parity of the set is odd
0 --> parity of the set is even
Examples:
Input : 254
Output : Odd Par... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n27 Jun, 2022"
},
{
"code": null,
"e": 258,
"s": 52,
"text": "Parity of a number refers to whether it contains an odd or even number of 1-bits. The number has “odd parity”, if it contains odd number of 1-bits and is “even parity” if it ... |
Java Program to Display Current Hour and Current Minute | 06 Jul, 2022
The difference between Date and Calendar is that the Date class operates with a specific instant in time and Calendar operates with a difference between two dates. The Calendar class gives you the possibility for converting between a specific instant in time and a set of calendar fields such as HOUR, YEAR,... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n06 Jul, 2022"
},
{
"code": null,
"e": 478,
"s": 28,
"text": "The difference between Date and Calendar is that the Date class operates with a specific instant in time and Calendar operates with a difference between two dates. The Calenda... |
Loading Images in Tkinter using PIL | 04 Dec, 2021
In this article, we will learn how to load images from user system to Tkinter window using PIL module. This program will open a dialogue box to select the required file from any directory and display it in the tkinter window.Install the requirements – Use this command to install Tkinter :
pip install pyth... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n04 Dec, 2021"
},
{
"code": null,
"e": 343,
"s": 52,
"text": "In this article, we will learn how to load images from user system to Tkinter window using PIL module. This program will open a dialogue box to select the required file from ... |
Python | Add one string to another | 22 May, 2019
Concatenation of two strings have been discussed multiple times over various languages. But the task of adding one string to other is quite easy task in Python. Knowledge of performing this task has many application. Let’s discuss certain ways in which this can be performed.
Method #1 : Using += operator
T... | [
{
"code": null,
"e": 53,
"s": 25,
"text": "\n22 May, 2019"
},
{
"code": null,
"e": 329,
"s": 53,
"text": "Concatenation of two strings have been discussed multiple times over various languages. But the task of adding one string to other is quite easy task in Python. Knowledge of ... |
ReactJS - Props Overview | The main difference between state and props is that props are immutable. This is why the container component should define the state that can be updated and changed, while the child components should only pass data from the state using props.
When we need immutable data in our component, we can just add props to reactD... | [
{
"code": null,
"e": 2410,
"s": 2167,
"text": "The main difference between state and props is that props are immutable. This is why the container component should define the state that can be updated and changed, while the child components should only pass data from the state using props."
},
{
... |
Sum of all subsequences of an array | 02 Feb, 2022
Given an array of n integers. Find the sum of all possible subsequences of an array.
Examples :
Input : arr[] = { 1, 2 }
Output : 6
All possible subsequences are {}, {1}, {2}
and { 1, 2 }
Input : arr[] = { 1, 2, 3 }
Output : 24
We have already discussed two different solutions in below post. Sum of all... | [
{
"code": null,
"e": 54,
"s": 26,
"text": "\n02 Feb, 2022"
},
{
"code": null,
"e": 140,
"s": 54,
"text": "Given an array of n integers. Find the sum of all possible subsequences of an array. "
},
{
"code": null,
"e": 152,
"s": 140,
"text": "Examples : "
},
... |
Getting cosine and hyperbolic cosine in Julia – cos(), cosh() and cosd() Methods | 26 Mar, 2020
The cos() is an inbuilt function in julia which is used to calculate cosine of the specified radian values.
Syntax: cos(x)
Parameters:
x: Specified radian values.
Returns: It returns the calculated cosine of the specified radian values.
Example:
# Julia program to illustrate # the use of cos() method # Ge... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n26 Mar, 2020"
},
{
"code": null,
"e": 136,
"s": 28,
"text": "The cos() is an inbuilt function in julia which is used to calculate cosine of the specified radian values."
},
{
"code": null,
"e": 151,
"s": 136,
"text":... |
Difference between 2NF and 3NF in DBMS | 02 Aug, 2021
1. Second Normal Form (2NF) : A relation is said to be in second normal form when it is already in first normal form and there is no partial functional dependency that is no non-prime attribute should be functionally dependent on prime attribute. It was given by E.F Codd in 1971. If the candidate key compr... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n02 Aug, 2021"
},
{
"code": null,
"e": 587,
"s": 52,
"text": "1. Second Normal Form (2NF) : A relation is said to be in second normal form when it is already in first normal form and there is no partial functional dependency that is no ... |
An Easy Way to Divide Your Dataset Based on Data Types with Pandas | by Byron Dolon | Towards Data Science | Before you can get into pre-processing data for a machine learning model to use, you’ll usually need to separate your numerical and non-numerical columns. In this piece, we’ll go over an easy way to do just that!
One way to do it is to manually check which columns contain just numbers and which columns contain text. Ho... | [
{
"code": null,
"e": 385,
"s": 172,
"text": "Before you can get into pre-processing data for a machine learning model to use, you’ll usually need to separate your numerical and non-numerical columns. In this piece, we’ll go over an easy way to do just that!"
},
{
"code": null,
"e": 645,
... |
Count of strings where adjacent characters are of difference one in C++ | We are given a num number as input. The goal is to count the number of possible strings of length num such that all adjacent characters have difference between ascii values as 1.
If num is 2 then strings will be “ab”, “ba”, “bc”, “cb”, ........”yz”, “zy”.
Let us understand with examples
Input − num=3
Output − Count of ... | [
{
"code": null,
"e": 1241,
"s": 1062,
"text": "We are given a num number as input. The goal is to count the number of possible strings of length num such that all adjacent characters have difference between ascii values as 1."
},
{
"code": null,
"e": 1318,
"s": 1241,
"text": "If ... |
Class getCanonicalName() method in Java with Examples | 25 Jan, 2022
The getCanonicalName() method of java.lang.Class class is used to get the canonical name of this class, which is the canonical name as defined by the Java Language Specification. The method returns the canonical name of this class in the form of String. Syntax:
public String getCanonicalName()
Parameter:... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n25 Jan, 2022"
},
{
"code": null,
"e": 292,
"s": 28,
"text": "The getCanonicalName() method of java.lang.Class class is used to get the canonical name of this class, which is the canonical name as defined by the Java Language Specificati... |
What do these three dots (...) in React do ? | 24 Jun, 2021
The three dots (...) notation referred to as the Spread syntax has been part of React for a long time when it could be used via transpilation, although, it has been made a part of JavaScript as part of the ES2015 syntax.
The Spread syntax is used to deconstruct an array or object into separate variables wh... | [
{
"code": null,
"e": 54,
"s": 26,
"text": "\n24 Jun, 2021"
},
{
"code": null,
"e": 275,
"s": 54,
"text": "The three dots (...) notation referred to as the Spread syntax has been part of React for a long time when it could be used via transpilation, although, it has been made a pa... |
URLs in Flutter | 14 Jun, 2022
While surfing the net, every user will come across many buttons, text, etc., that would redirect the user to a different webpage in the same tab or in a different tab when clicked. In the same way, when a developer links a URL to a button or text in an app, the app will open the website when clicked in the... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n14 Jun, 2022"
},
{
"code": null,
"e": 352,
"s": 28,
"text": "While surfing the net, every user will come across many buttons, text, etc., that would redirect the user to a different webpage in the same tab or in a different tab when cli... |
Length Of Last Word in a String | 09 Jun, 2021
Given a string s consisting of upper/lower-case alphabets and empty space characters ‘ ‘, return the length of the last word in the string. If the last word does not exist, return 0.
Examples:
Input : str = "Geeks For Geeks"
Output : 5
length(Geeks)= 5
Input : str = "Start Coding Here"
Output : 4
lengt... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n09 Jun, 2021"
},
{
"code": null,
"e": 235,
"s": 52,
"text": "Given a string s consisting of upper/lower-case alphabets and empty space characters ‘ ‘, return the length of the last word in the string. If the last word does not exist, r... |
Try, Except, else and Finally in Python | 04 Jul, 2022
An Exception is an Event, which occurs during the execution of the program. It is also known as a run time error. When that error occurs, Python generates an exception during the execution and that can be handled, which avoids your program to interrupt.
Example:
Python3
a = 5b = 0print(a/b)
Output:
Traceba... | [
{
"code": null,
"e": 54,
"s": 26,
"text": "\n04 Jul, 2022"
},
{
"code": null,
"e": 308,
"s": 54,
"text": "An Exception is an Event, which occurs during the execution of the program. It is also known as a run time error. When that error occurs, Python generates an exception during... |
How to Resize a SVG image ? | 02 Mar, 2021
Resizing an SVG image cannot be done by simply using CSS height and width property to the img tag. To resize the SVG image, follow these steps:
Method1: The SVG image will be taking 100% of all the width and height available to it. To make the image of the desired size set the CSS height and width property... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n02 Mar, 2021"
},
{
"code": null,
"e": 172,
"s": 28,
"text": "Resizing an SVG image cannot be done by simply using CSS height and width property to the img tag. To resize the SVG image, follow these steps:"
},
{
"code": null,
... |
Difference between sums of odd level and even level nodes of a Binary Tree | 05 Jul, 2022
Given a Binary Tree, find the difference between the sum of nodes at odd level and the sum of nodes at even level. Consider root as level 1, left and right children of root as level 2 and so on. For example, in the following tree, sum of nodes at odd level is (5 + 1 + 4 + 8) which is 18. And sum of nodes a... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n05 Jul, 2022"
},
{
"code": null,
"e": 470,
"s": 52,
"text": "Given a Binary Tree, find the difference between the sum of nodes at odd level and the sum of nodes at even level. Consider root as level 1, left and right children of root a... |
WordPress Introduction | 24 Dec, 2021
WordPress is a free and open source Content Management System(CMS) framework. It is the most widely used CMS framework of recent time. Let us now have a brief discussion on what is CMS and what is wordpress!
What is Content Management System?
A content management system (CMS) is an application used to crea... | [
{
"code": null,
"e": 53,
"s": 25,
"text": "\n24 Dec, 2021"
},
{
"code": null,
"e": 261,
"s": 53,
"text": "WordPress is a free and open source Content Management System(CMS) framework. It is the most widely used CMS framework of recent time. Let us now have a brief discussion on w... |
p5.js | createSlider() Function | 09 Jul, 2019
The createSlider() function in p5.js is used to create a slider (input) element in the DOM (Document Object Model). This function includes the p5.dom library. Add the following syntax in the head section.
<script src="https://cdnjs.cloudflare.com/ajax/libs/p5.js/0.5.11/addons/p5.dom.min.js"></script>
Synta... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n09 Jul, 2019"
},
{
"code": null,
"e": 233,
"s": 28,
"text": "The createSlider() function in p5.js is used to create a slider (input) element in the DOM (Document Object Model). This function includes the p5.dom library. Add the followin... |
How to copy elements of an Array in a Vector in C++ - GeeksforGeeks | 27 Jan, 2022
An Array is a collection of items stored at contiguous memory locations. The idea is to store multiple items of the same type together.
Vectors are the same as dynamic arrays with the ability to resize themselves automatically when an element is inserted or deleted, with their storage being handled automat... | [
{
"code": null,
"e": 24445,
"s": 24417,
"text": "\n27 Jan, 2022"
},
{
"code": null,
"e": 24581,
"s": 24445,
"text": "An Array is a collection of items stored at contiguous memory locations. The idea is to store multiple items of the same type together."
},
{
"code": null,... |
Customizing Filters in Django REST Framework - GeeksforGeeks | 05 Jul, 2021
Prerequisite: Adding Filtering in APIs – Django REST Framework [lin needed article on published yet]
Django filters facilitate filtering the queryset to retrieve the relevant results based on the values assigned to the filter fields. But, what if the user wants to retrieve details within a given range. Say... | [
{
"code": null,
"e": 24212,
"s": 24184,
"text": "\n05 Jul, 2021"
},
{
"code": null,
"e": 24313,
"s": 24212,
"text": "Prerequisite: Adding Filtering in APIs – Django REST Framework [lin needed article on published yet]"
},
{
"code": null,
"e": 24867,
"s": 24313,
... |
How to specify an index while creating a Series in Pandas? | Pandas series is 1-Dimensional ndarray with labeled data, which means every value present in a series is having a label representation which is nothing but each data have thor on index values.
The index can be label names (object data) or it can be values. By default, it will assign an index value from 0 - n-1 (n is th... | [
{
"code": null,
"e": 1255,
"s": 1062,
"text": "Pandas series is 1-Dimensional ndarray with labeled data, which means every value present in a series is having a label representation which is nothing but each data have thor on index values."
},
{
"code": null,
"e": 1457,
"s": 1255,
... |
C Program to check whether the triangle is equilateral, isosceles or scalene | Triangle consists of three sides and three angles. Based on the three sides, there are three types of triangle −
Equilateral triangle: All three sides are equal.
Isosceles triangle: All two sides are equal.
Scalene triangle: No sides are equal.
Follow the algorithm given below for writing the respective program.
Step 1... | [
{
"code": null,
"e": 1175,
"s": 1062,
"text": "Triangle consists of three sides and three angles. Based on the three sides, there are three types of triangle −"
},
{
"code": null,
"e": 1224,
"s": 1175,
"text": "Equilateral triangle: All three sides are equal."
},
{
"code"... |
Transmission Impairment in Data Communication - GeeksforGeeks | 06 Oct, 2020
In communication system, analog signals travel through transmission media, which tends to deteriorate the quality of analog signal, which means that the signal at the beginning of the medium is not the same as the signal at the end of the medium. The imperfection causes signal impairment. Below are the ca... | [
{
"code": null,
"e": 25723,
"s": 25695,
"text": "\n06 Oct, 2020"
},
{
"code": null,
"e": 26054,
"s": 25723,
"text": "In communication system, analog signals travel through transmission media, which tends to deteriorate the quality of analog signal, which means that the signal at ... |
Robot Class in Java AWT - GeeksforGeeks | 12 May, 2022
The Robot class in the Java AWT package is used to generate native system input events for the purposes of test automation, self-running demos, and other applications where control of the mouse and keyboard is needed. The primary purpose of Robot is to facilitate automated testing of Java platform implemen... | [
{
"code": null,
"e": 25779,
"s": 25751,
"text": "\n12 May, 2022"
},
{
"code": null,
"e": 26176,
"s": 25779,
"text": "The Robot class in the Java AWT package is used to generate native system input events for the purposes of test automation, self-running demos, and other applicati... |
Sorting Algorithms Visualization | Selection Sort - GeeksforGeeks | 09 Sep, 2019
Pre-requisite: Selection Sort
The human brain can easily process visuals in spite of long codes to understand the algorithms. In this article, Selection Sort visualization has been implemented using graphics.h library. As we all know selection sort first finds the minimum element from the unsorted array an... | [
{
"code": null,
"e": 25917,
"s": 25889,
"text": "\n09 Sep, 2019"
},
{
"code": null,
"e": 25947,
"s": 25917,
"text": "Pre-requisite: Selection Sort"
},
{
"code": null,
"e": 26440,
"s": 25947,
"text": "The human brain can easily process visuals in spite of long ... |
GATE | GATE CS 2020 | Question 27 - GeeksforGeeks | 26 May, 2021
Let R be the set of all binary relations on the set {1, 2, 3}. Suppose a relation is chosen from R at random. The probability that the chosen relation is reflexive (round off to 3 decimal places) is ________ .
Note – This question was Numerical Type.(A) 0.125(B) 0.25(C) 0.50(D) 0.625Answer: (A)Explanation:... | [
{
"code": null,
"e": 25743,
"s": 25715,
"text": "\n26 May, 2021"
},
{
"code": null,
"e": 25953,
"s": 25743,
"text": "Let R be the set of all binary relations on the set {1, 2, 3}. Suppose a relation is chosen from R at random. The probability that the chosen relation is reflexive... |
Flutter - Slidable - GeeksforGeeks | 15 Feb, 2021
Slidable in an application can be used to perform a wide range of tasks with just a simple swipe to either right or left on the tile. It not only makes the UI very user-friendly but also saves a lot of time in doing trivial tasks which if done in other ways can be hectic and redundant to design. In this ar... | [
{
"code": null,
"e": 25285,
"s": 25257,
"text": "\n15 Feb, 2021"
},
{
"code": null,
"e": 25675,
"s": 25285,
"text": "Slidable in an application can be used to perform a wide range of tasks with just a simple swipe to either right or left on the tile. It not only makes the UI very... |
Mongoose | insertMany() Function - GeeksforGeeks | 20 May, 2020
The insertMany() function is used to insert multiple documents into a collection. It accepts an array of documents to insert into the collection.
Installation of mongoose module:
You can visit the link Install mongoose module. You can install this package by using this command.npm install mongooseAfter ins... | [
{
"code": null,
"e": 25377,
"s": 25349,
"text": "\n20 May, 2020"
},
{
"code": null,
"e": 25523,
"s": 25377,
"text": "The insertMany() function is used to insert multiple documents into a collection. It accepts an array of documents to insert into the collection."
},
{
"co... |
ZigZag Tree Traversal - GeeksforGeeks | 04 Mar, 2022
Write a function to print ZigZag order traversal of a binary tree. For the below binary tree the zigzag order traversal will be 1 3 2 7 6 5 4.
This problem can be solved using two stacks. Assume the two stacks are current: currentlevel and nextlevel. We would also need a variable to keep track of the cur... | [
{
"code": null,
"e": 26361,
"s": 26333,
"text": "\n04 Mar, 2022"
},
{
"code": null,
"e": 26504,
"s": 26361,
"text": "Write a function to print ZigZag order traversal of a binary tree. For the below binary tree the zigzag order traversal will be 1 3 2 7 6 5 4."
},
{
"code"... |
How to remove n elements from the end of a given array in JavaScript ? - GeeksforGeeks | 01 Apr, 2021
In this article, we will learn how to remove the last n elements from the end of the given array in JavaScript. This can be achieved using two approaches:
The splice() method in JavaScript is used to modify an array by adding or removing elements from it. This method accepts the index from which the modifi... | [
{
"code": null,
"e": 26545,
"s": 26517,
"text": "\n01 Apr, 2021"
},
{
"code": null,
"e": 26700,
"s": 26545,
"text": "In this article, we will learn how to remove the last n elements from the end of the given array in JavaScript. This can be achieved using two approaches:"
},
... |
Program to Iterate over a Stream with Indices in Java 8 - GeeksforGeeks | 11 Dec, 2018
Given a Stream in Java, the task is to iterate over it with the help of indices.
Examples:
Input: Stream = [G, e, e, k, s]Output: [0 -> G, 1 -> e, 2 -> e, 3 -> k, 4 -> s]
Input: Stream = [G, e, e, k, s, F, o, r, G, e, e, k, s]Output: [0 -> G, 1 -> e, 2 -> e, 3 -> k, 4 -> s, 5 -> F, 6 -> o, 7 -> r, 8 -> G, ... | [
{
"code": null,
"e": 25519,
"s": 25491,
"text": "\n11 Dec, 2018"
},
{
"code": null,
"e": 25600,
"s": 25519,
"text": "Given a Stream in Java, the task is to iterate over it with the help of indices."
},
{
"code": null,
"e": 25610,
"s": 25600,
"text": "Examples:... |
Servlet - Sending Email - GeeksforGeeks | 31 Mar, 2022
E-mail is considered the most secure, reliable, fast, and cheapest way of official communication over the internet. That’s the reason every second almost 2.7M emails are being sent. Therefore, your Web-Application may need an email service for many needs like – communication, Multi-Factor Authentication, e... | [
{
"code": null,
"e": 25225,
"s": 25197,
"text": "\n31 Mar, 2022"
},
{
"code": null,
"e": 25646,
"s": 25225,
"text": "E-mail is considered the most secure, reliable, fast, and cheapest way of official communication over the internet. That’s the reason every second almost 2.7M emai... |
Minimum distance between the maximum and minimum element of a given Array - GeeksforGeeks | 14 Jan, 2022
Given an array A[] consisting of N elements, the task is to find the minimum distance between the minimum and the maximum element of the array.Examples:
Input: arr[] = {3, 2, 1, 2, 1, 4, 5, 8, 6, 7, 8, 2} Output: 3 Explanation: The minimum element(= 1) is present at indices {2, 4} The maximum element(= 8... | [
{
"code": null,
"e": 26067,
"s": 26039,
"text": "\n14 Jan, 2022"
},
{
"code": null,
"e": 26222,
"s": 26067,
"text": "Given an array A[] consisting of N elements, the task is to find the minimum distance between the minimum and the maximum element of the array.Examples: "
},
... |
How to return a JSON response form a Flask API ? - GeeksforGeeks | 21 Oct, 2021
Flask is one of the most widely used python micro-frameworks to design a REST API. In this article, we are going to learn how to create a simple REST API that returns a simple JSON object, with the help of a flask.
Prerequisites: Introduction to REST API
What is a REST API?
REST stands for Representational... | [
{
"code": null,
"e": 25512,
"s": 25484,
"text": "\n21 Oct, 2021"
},
{
"code": null,
"e": 25727,
"s": 25512,
"text": "Flask is one of the most widely used python micro-frameworks to design a REST API. In this article, we are going to learn how to create a simple REST API that retu... |
Longest subsequence such that difference between adjacents is one - GeeksforGeeks | 25 Mar, 2022
Given an array of n size, the task is to find the longest subsequence such that difference between adjacents is one.
Examples:
Input : arr[] = {10, 9, 4, 5, 4, 8, 6}
Output : 3
As longest subsequences with difference 1 are, "10, 9, 8",
"4, 5, 4" and "4, 5, 6"
Input : arr[] = {1, 2, 3, 2, 3, 7, 2, 1}... | [
{
"code": null,
"e": 26627,
"s": 26599,
"text": "\n25 Mar, 2022"
},
{
"code": null,
"e": 26745,
"s": 26627,
"text": "Given an array of n size, the task is to find the longest subsequence such that difference between adjacents is one. "
},
{
"code": null,
"e": 26756,
... |
Note : Range VS Xrange - GeeksforGeeks | 13 May, 2022
The range() and xrange() are two functions that could be used to iterate a certain number of times in for loops in Python. In Python 3, there is no xrange, but the range function behaves like xrange in Python 2. If you want to write code that will run on both Python 2 and Python 3, you should use range().
... | [
{
"code": null,
"e": 24977,
"s": 24949,
"text": "\n13 May, 2022"
},
{
"code": null,
"e": 25284,
"s": 24977,
"text": "The range() and xrange() are two functions that could be used to iterate a certain number of times in for loops in Python. In Python 3, there is no xrange, but the... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.