title stringlengths 3 221 | text stringlengths 17 477k | parsed listlengths 0 3.17k |
|---|---|---|
Introduction to Python for Absolute Beginners - GeeksforGeeks | 16 Jul, 2021
Are you a beginner planning to start your career in the competitive world of Programming? Looking resources for Python as an Absolute Beginner? You are at the perfect place. This Python for Beginners page revolves around Step by Step tutorial for learning Python Programming language from very basics to adv... | [
{
"code": null,
"e": 25537,
"s": 25509,
"text": "\n16 Jul, 2021"
},
{
"code": null,
"e": 26199,
"s": 25537,
"text": "Are you a beginner planning to start your career in the competitive world of Programming? Looking resources for Python as an Absolute Beginner? You are at the perf... |
LINQ | Let Keyword - GeeksforGeeks | 29 Nov, 2019
Sometimes when we are working with a query expression, we require a variable that can store the result of the sub-expression in order to reuse it in the upcoming clause. This type of facility is provided by the Let keyword. The Let keyword allows you to create a range variable and initialized with the resu... | [
{
"code": null,
"e": 25547,
"s": 25519,
"text": "\n29 Nov, 2019"
},
{
"code": null,
"e": 26100,
"s": 25547,
"text": "Sometimes when we are working with a query expression, we require a variable that can store the result of the sub-expression in order to reuse it in the upcoming c... |
Assigning values to static final variables in Java | 14 Sep, 2021
Assigning values to static final variables in Java: In Java, non-static final variables can be assigned a value either in constructor or with the declaration. But, static final variables cannot be assigned value in constructor; they must be assigned a value with their declaration.For example, following pro... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n14 Sep, 2021"
},
{
"code": null,
"e": 378,
"s": 52,
"text": "Assigning values to static final variables in Java: In Java, non-static final variables can be assigned a value either in constructor or with the declaration. But, static fin... |
What is the difference between parseInt() and Number()? | 16 Jul, 2019
The parseInt() function:The parseInt() function is used to parse a string and convert it to an integer of a specified radix. It takes two parameters, the string to be parsed and the radix to be used. The radix is an integer between 2 and 36 which represents the base of the number.If parseInt() encounters a... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n16 Jul, 2019"
},
{
"code": null,
"e": 856,
"s": 28,
"text": "The parseInt() function:The parseInt() function is used to parse a string and convert it to an integer of a specified radix. It takes two parameters, the string to be parsed a... |
Sum of all nodes in a binary tree
| 06 Jul, 2022
Give an algorithm for finding the sum of all elements in a binary tree.
In the above binary tree sum = 106.
The idea is to recursively, call left subtree sum, right subtree sum and add their values to current node’s data.
C++
Java
Python3
C#
Javascript
/* Program to print sum of all ... | [
{
"code": null,
"e": 57,
"s": 26,
"text": " \n06 Jul, 2022\n"
},
{
"code": null,
"e": 130,
"s": 57,
"text": "Give an algorithm for finding the sum of all elements in a binary tree. "
},
{
"code": null,
"e": 168,
"s": 130,
"text": "In the above binary tree sum ... |
String slicing in Python to rotate a string | 16 Jun, 2022
Given a string of size n, write functions to perform following operations on string.
Left (Or anticlockwise) rotate the given string by d elements (where d <= n).Right (Or clockwise) rotate the given string by d elements (where d <= n).
Left (Or anticlockwise) rotate the given string by d elements (where d... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n16 Jun, 2022"
},
{
"code": null,
"e": 137,
"s": 52,
"text": "Given a string of size n, write functions to perform following operations on string."
},
{
"code": null,
"e": 289,
"s": 137,
"text": "Left (Or anticlockwi... |
Python | Distance-time GUI calculator using Tkinter | 21 Nov, 2019
Prerequisites : Introduction to Tkinter | Using google distance matrix API
Python offers multiple options for developing GUI (Graphical User Interface). Out of all the GUI methods, tkinter is most commonly used method. It is a standard Python interface to the Tk GUI toolkit shipped with Python. Python with... | [
{
"code": null,
"e": 54,
"s": 26,
"text": "\n21 Nov, 2019"
},
{
"code": null,
"e": 129,
"s": 54,
"text": "Prerequisites : Introduction to Tkinter | Using google distance matrix API"
},
{
"code": null,
"e": 484,
"s": 129,
"text": "Python offers multiple options... |
std::next_permutation and prev_permutation in C++ | 09 Jun, 2022
std::next_permutation
It is used to rearrange the elements in the range [first, last) into the next lexicographically greater permutation. A permutation is each one of the N! possible arrangements the elements can take (where N is the number of elements in the range). Different permutations can be ordered ... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n09 Jun, 2022"
},
{
"code": null,
"e": 74,
"s": 52,
"text": "std::next_permutation"
},
{
"code": null,
"e": 511,
"s": 74,
"text": "It is used to rearrange the elements in the range [first, last) into the next lexicog... |
Operator Overloading ‘<<‘ and ‘>>’ operator in a linked list class | 26 Jul, 2021
Prerequisite: Operator Overloading in C++, Linked List in C++
C++ comes with libraries that provide ways for performing Input and Output. In C++, Input and Output are performed as a sequence of bytes, also known as streams. Input and Output stream are managed by the iostream library. cin and cout are the s... | [
{
"code": null,
"e": 54,
"s": 26,
"text": "\n26 Jul, 2021"
},
{
"code": null,
"e": 116,
"s": 54,
"text": "Prerequisite: Operator Overloading in C++, Linked List in C++"
},
{
"code": null,
"e": 418,
"s": 116,
"text": "C++ comes with libraries that provide ways ... |
Python | Numpy nanmedian() function | 20 Jun, 2022
numpy.nanmedian() function can be used to calculate the median of array ignoring the NaN value. If array have NaN value and we can find out the median without effect of NaN value. Let’s see different type of examples about numpy.nanmedian() method.
Syntax: numpy.nanmedian(a, axis=None, out=None, overwrite... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n20 Jun, 2022"
},
{
"code": null,
"e": 278,
"s": 28,
"text": "numpy.nanmedian() function can be used to calculate the median of array ignoring the NaN value. If array have NaN value and we can find out the median without effect of NaN va... |
TypeScript | String indexOf() Method | 18 Jun, 2020
The indexOf() is an inbuilt function in TypeScript which is used to get the index within the calling String object of the first occurrence of the specified value. Syntax:
string.indexOf(searchValue[, fromIndex])
Parameter: This method accepts two parameter as mentioned above and described below .
searchV... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n18 Jun, 2020"
},
{
"code": null,
"e": 199,
"s": 28,
"text": "The indexOf() is an inbuilt function in TypeScript which is used to get the index within the calling String object of the first occurrence of the specified value. Syntax:"
}... |
PyQt5 – Change color of Push Button | 22 Apr, 2020
In this article we will see how to change the color of button. By default, when we create a button it is of grey color although PyQt5 allows us to change this color. Below is the difference in default button and colored button.
In order to do this we will use setStyleSheet method.
Syntax : button.setStyl... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n22 Apr, 2020"
},
{
"code": null,
"e": 256,
"s": 28,
"text": "In this article we will see how to change the color of button. By default, when we create a button it is of grey color although PyQt5 allows us to change this color. Below is ... |
HTML | DOM cloneNode() Method | 16 Jun, 2022
The DOM cloneNode() Method is used to copy or clone a node on which cloneNode() method is called. For example, a list item can be copied from one list to another using this method.Syntax:
yourNode.cloneNode([deep])
The [deep] is an optional argument. We can set its value to “true” if we want to copy the ... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n16 Jun, 2022"
},
{
"code": null,
"e": 218,
"s": 28,
"text": "The DOM cloneNode() Method is used to copy or clone a node on which cloneNode() method is called. For example, a list item can be copied from one list to another using this me... |
Software Engineering | Object-oriented Life Cycle Model - GeeksforGeeks | 24 May, 2019
The Object-Oriented approach of Building Systems takes the objects as the basis. For this, first the system to be developed is observed and analyzed and the requirements are defined as in any other method of system development. Once this is often done, the objects in the required system are identified. For... | [
{
"code": null,
"e": 24581,
"s": 24553,
"text": "\n24 May, 2019"
},
{
"code": null,
"e": 25017,
"s": 24581,
"text": "The Object-Oriented approach of Building Systems takes the objects as the basis. For this, first the system to be developed is observed and analyzed and the requir... |
C++ Program to Count Primes in Ranges - GeeksforGeeks | 13 Jan, 2022
Given a range [L, R], we need to find the count of total numbers of prime numbers in the range [L, R] where 0 <= L <= R < 10000. Consider that there are a large number of queries for different ranges.Examples:
Input : Query 1 : L = 1, R = 10
Query 2 : L = 5, R = 10
Output : 4
2
Explanati... | [
{
"code": null,
"e": 24176,
"s": 24148,
"text": "\n13 Jan, 2022"
},
{
"code": null,
"e": 24388,
"s": 24176,
"text": "Given a range [L, R], we need to find the count of total numbers of prime numbers in the range [L, R] where 0 <= L <= R < 10000. Consider that there are a large nu... |
PyQt5 – Get geometry of the Push button - GeeksforGeeks | 22 Apr, 2020
We know we can set geometry of button using setGeometry method, geometry in PyQt5 refer to the location and size of the push button.
In order to get the geometry of any push button we will usegeometry method. This method will return the QRect object which tells the location and the size of push button also... | [
{
"code": null,
"e": 23901,
"s": 23873,
"text": "\n22 Apr, 2020"
},
{
"code": null,
"e": 24034,
"s": 23901,
"text": "We know we can set geometry of button using setGeometry method, geometry in PyQt5 refer to the location and size of the push button."
},
{
"code": null,
... |
Tryit Editor v3.7 | Tryit: Using letter-spacing | [] |
A Complete Sentiment Analysis Algorithm in Python with Amazon Product Review Data: Step by Step | by Rashida Nasrin Sucky | Towards Data Science | In today’s world sentiment analysis can play a vital role in any industry. Classifying tweets, Facebook comments or product reviews using an automated system can save a lot of time and money. At the same time, the probability of error is lower. In this article, I will explain a sentiment analysis task using the amazon ... | [
{
"code": null,
"e": 391,
"s": 47,
"text": "In today’s world sentiment analysis can play a vital role in any industry. Classifying tweets, Facebook comments or product reviews using an automated system can save a lot of time and money. At the same time, the probability of error is lower. In this art... |
Non-Repeating Element | Practice | GeeksforGeeks | Find the first non-repeating element in a given array arr of N integers.
Note: Array consists of only positive and negative integers and not zero.
Example 1:
Input : arr[] = {-1, 2, -1, 3, 2}
Output : 3
Explanation:
-1 and 2 are repeating whereas 3 is
the only number occuring once.
Hence, the output is 3.
Example 2... | [
{
"code": null,
"e": 385,
"s": 238,
"text": "Find the first non-repeating element in a given array arr of N integers.\nNote: Array consists of only positive and negative integers and not zero."
},
{
"code": null,
"e": 396,
"s": 385,
"text": "Example 1:"
},
{
"code": null,... |
Dart - Builder Class - GeeksforGeeks | 01 Feb, 2021
Whenever we create a new widget in a flutter there is always a build Widget associated with it and the BuildContext parameter is passed by the framework.
Widget build ( BuildContext context )
Flutter takes care that there need not be any Widget apart from the build that needs the context parameter in their... | [
{
"code": null,
"e": 24010,
"s": 23982,
"text": "\n01 Feb, 2021"
},
{
"code": null,
"e": 24164,
"s": 24010,
"text": "Whenever we create a new widget in a flutter there is always a build Widget associated with it and the BuildContext parameter is passed by the framework."
},
{... |
Machine Learning: Word Embedding and Predicting | by Anuradha Wickramarachchi | Towards Data Science | Word embedding is a popular technique of converting sparse representation vectors into dense smaller vectors. This increases computation times by a significant factor and saves resources. In this article let’s see how we can develop a prediction engine and utilize the knowledge of word embedding in the workflow.
This i... | [
{
"code": null,
"e": 360,
"s": 46,
"text": "Word embedding is a popular technique of converting sparse representation vectors into dense smaller vectors. This increases computation times by a significant factor and saves resources. In this article let’s see how we can develop a prediction engine and... |
C# | Variables - GeeksforGeeks | 11 Feb, 2022
A typical program uses various values that may change during its execution. For example, a program that performs some operations on the values entered by the user. The values entered by one user may differ from those entered by another user. Hence this makes it necessary to use variables as another user ma... | [
{
"code": null,
"e": 24914,
"s": 24886,
"text": "\n11 Feb, 2022"
},
{
"code": null,
"e": 25690,
"s": 24914,
"text": "A typical program uses various values that may change during its execution. For example, a program that performs some operations on the values entered by the user.... |
Keith Number | 21 Jun, 2022
A n digit number x is called Keith number if it appears in a special sequence (defined below) generated using its digits. The special sequence has first n terms as digits of x and other terms are recursively evaluated as sum of previous n terms.The task is to find if a given number is Keith Number or not.E... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n21 Jun, 2022"
},
{
"code": null,
"e": 370,
"s": 52,
"text": "A n digit number x is called Keith number if it appears in a special sequence (defined below) generated using its digits. The special sequence has first n terms as digits of ... |
MySQL | PARTITION BY Clause | 06 Mar, 2019
A PARTITION BY clause is used to partition rows of table into groups. It is useful when we have to perform a calculation on individual rows of a group using other rows of that group.
It is always used inside OVER() clause.
The partition formed by partition clause are also known as Window.
This clause works... | [
{
"code": null,
"e": 54,
"s": 26,
"text": "\n06 Mar, 2019"
},
{
"code": null,
"e": 237,
"s": 54,
"text": "A PARTITION BY clause is used to partition rows of table into groups. It is useful when we have to perform a calculation on individual rows of a group using other rows of tha... |
Program to implement Hash Table using Open Addressing | 10 Jun, 2022
The task is to design a general Hash Table data structure with Collision case handled and that supports the Insert(), Find(), and Delete() functions.
Examples:
Suppose the operations are performed on an array of pairs, {{1, 5}, {2, 15}, {3, 20}, {4, 7}}. And an array of capacity 20 is used as a Hash Table:... | [
{
"code": null,
"e": 54,
"s": 26,
"text": "\n10 Jun, 2022"
},
{
"code": null,
"e": 204,
"s": 54,
"text": "The task is to design a general Hash Table data structure with Collision case handled and that supports the Insert(), Find(), and Delete() functions."
},
{
"code": nu... |
Program to reverse columns in given 2D Array (Matrix) | 27 Dec, 2021
Given a 2D array arr[][]of integers of size M x N, where N is the number of columns and M is the number of rows in the array. The task is to reverse every column of the given 2D array.
Input: arr[][] =
{{3, 2, 1}
{4, 5, 6},
{9, 8, 7}}
Output:
9 8 7
4 5 6
3 2 1
Input: arr[][] =
{{7, 9},
{1, 5},
{... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n27 Dec, 2021"
},
{
"code": null,
"e": 237,
"s": 52,
"text": "Given a 2D array arr[][]of integers of size M x N, where N is the number of columns and M is the number of rows in the array. The task is to reverse every column of the given... |
PostgreSQL – Show Tables | 28 Aug, 2020
PostgreSQL does not support the SHOW TABLES statement directly like MySQL does but provides users with an alternative. In this article, we will explore them in detail.
One way to list all the tables in a database is to use the below command after logging into the database:
Syntax: \dt
Example:
In this exam... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n28 Aug, 2020"
},
{
"code": null,
"e": 196,
"s": 28,
"text": "PostgreSQL does not support the SHOW TABLES statement directly like MySQL does but provides users with an alternative. In this article, we will explore them in detail."
},
... |
Argument vs Parameter in Java | 23 Feb, 2022
Argument
An argument is a value passed to a function when the function is called. Whenever any function is called during the execution of the program there are some values passed with the function. These values are called arguments. An argument when passed with a function replaces with those variables whic... | [
{
"code": null,
"e": 53,
"s": 25,
"text": "\n23 Feb, 2022"
},
{
"code": null,
"e": 62,
"s": 53,
"text": "Argument"
},
{
"code": null,
"e": 517,
"s": 62,
"text": "An argument is a value passed to a function when the function is called. Whenever any function is ... |
Non-binary Counter in Digital Logic | 23 Apr, 2020
A counter is a circuit that counts the number of occurrences of an input. The circuit consists of flip-flops which along with combinational elements are used for generation of control signals.
If M = Total number of states, and
n = Total number of flip-flop
Then, M <= 2n
If M = 2n ; Bina... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n23 Apr, 2020"
},
{
"code": null,
"e": 221,
"s": 28,
"text": "A counter is a circuit that counts the number of occurrences of an input. The circuit consists of flip-flops which along with combinational elements are used for generation of... |
Print the longest path from root to leaf in a Binary tree | 17 Jun, 2021
Given a binary tree, the task is to print the longest path from the root node to the leaf node. If there are multiple answers print any one of them.
Examples:
Input:
4
/ \
3 6
/ \
5 7
Output:
4 -> 6 -> 7
Explanation:
Longest paths from root to leaf
are (4 -> 6 -> 5)
and... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n17 Jun, 2021"
},
{
"code": null,
"e": 202,
"s": 52,
"text": "Given a binary tree, the task is to print the longest path from the root node to the leaf node. If there are multiple answers print any one of them. "
},
{
"code": nu... |
Double.GetHashCode() Method in C# - GeeksforGeeks | 17 Mar, 2019
Double.GetHashCode() Method is used to return the hash code for this instance.
Syntax: public override int GetHashCode ();
Return Value: This method returns a 32-bit signed integer hash code.
Below programs illustrate the use of Double.GetHashCode() Method:
Example 1:
// C# program to demonstrate the// Dou... | [
{
"code": null,
"e": 25515,
"s": 25487,
"text": "\n17 Mar, 2019"
},
{
"code": null,
"e": 25594,
"s": 25515,
"text": "Double.GetHashCode() Method is used to return the hash code for this instance."
},
{
"code": null,
"e": 25638,
"s": 25594,
"text": "Syntax: pub... |
Android - RenderScript | In this chapter, we will learn about Android RenderScript. Usually the apps on android are designed as to consume as minimum resources as possible. But some applications like some 3D games need high level processing on android.
To provide these applications high performance android introduced the RenderScript. It is an... | [
{
"code": null,
"e": 3835,
"s": 3607,
"text": "In this chapter, we will learn about Android RenderScript. Usually the apps on android are designed as to consume as minimum resources as possible. But some applications like some 3D games need high level processing on android."
},
{
"code": nul... |
Reach a given score | Practice | GeeksforGeeks | Consider a game where a player can score 3 or 5 or 10 points in a move. Given a total score n, find number of distinct combinations to reach the given score.
Example:
Input
3
8
20
13
Output
1
4
2
Explanation
For 1st example when n = 8
{ 3, 5 } and {5, 3} are the
two possible permutations but
these represent the same ... | [
{
"code": null,
"e": 396,
"s": 238,
"text": "Consider a game where a player can score 3 or 5 or 10 points in a move. Given a total score n, find number of distinct combinations to reach the given score."
},
{
"code": null,
"e": 591,
"s": 396,
"text": "Example:\nInput\n3\n8\n20\n1... |
PostgreSQL - CREATE TRIGGER - GeeksforGeeks | 28 Aug, 2020
To create a new trigger in PostgreSQL, you follow these steps:
First, create a trigger function using CREATE FUNCTION statement.
Second, bind the trigger function to a table by using the CREATE TRIGGER statement.
A trigger function is similar to an ordinary function. However, a trigger function does not ta... | [
{
"code": null,
"e": 27920,
"s": 27892,
"text": "\n28 Aug, 2020"
},
{
"code": null,
"e": 27983,
"s": 27920,
"text": "To create a new trigger in PostgreSQL, you follow these steps:"
},
{
"code": null,
"e": 28049,
"s": 27983,
"text": "First, create a trigger fun... |
MongoEngine - Atomic Updates | Atomicity is one of the ACID transaction properties. A database transaction has to be indivisible and irreducible so that it either occurs completely or doesn’t occur at all. This property is called Atomicity. MongoDB supports Atomicity only on single documents and not on multi-document transactions.
MongoEngine provid... | [
{
"code": null,
"e": 2612,
"s": 2310,
"text": "Atomicity is one of the ACID transaction properties. A database transaction has to be indivisible and irreducible so that it either occurs completely or doesn’t occur at all. This property is called Atomicity. MongoDB supports Atomicity only on single d... |
How to use an update function to animate a NetworkX graph in Matplotlib? | To use an update function to animate a NetworkX graph in Matplotlib, we can take the following steps −
Set the figure size and adjust the padding between and around the subplots.
Create a new figure or activate an existing figure using figure() method.
Initialize a graph with edges, name, and graph attributes.
Add node... | [
{
"code": null,
"e": 1165,
"s": 1062,
"text": "To use an update function to animate a NetworkX graph in Matplotlib, we can take the following steps −"
},
{
"code": null,
"e": 1241,
"s": 1165,
"text": "Set the figure size and adjust the padding between and around the subplots."
... |
Algorithms | Analysis of Algorithms (Recurrences) | Question 3 - GeeksforGeeks | 28 Jun, 2021
What is the worst case time complexity of following implementation of subset sum problem.
// Returns true if there is a subset of set[] with sun equal to given sumbool isSubsetSum(int set[], int n, int sum){ // Base Cases if (sum == 0) return true; if (n == 0 && sum != 0) return false; /... | [
{
"code": null,
"e": 26391,
"s": 26363,
"text": "\n28 Jun, 2021"
},
{
"code": null,
"e": 26481,
"s": 26391,
"text": "What is the worst case time complexity of following implementation of subset sum problem."
},
{
"code": "// Returns true if there is a subset of set[] with... |
How to extract data from MS Word Documents using Python | by Natalie Olivo | Towards Data Science | This blog will go into detail on extracting information from Word Documents locally. Since many companies and roles are inseparable from the Microsoft Office Suite, this is a useful blog for anyone faced with data transferred through .doc or .docx formats.
As a prerequisite, you will need Python installed on your compu... | [
{
"code": null,
"e": 429,
"s": 172,
"text": "This blog will go into detail on extracting information from Word Documents locally. Since many companies and roles are inseparable from the Microsoft Office Suite, this is a useful blog for anyone faced with data transferred through .doc or .docx formats... |
Boggle (Find all possible words in a board of characters) | Set 1 - GeeksforGeeks | 27 Sep, 2021
Given a dictionary, a method to do lookup in dictionary and a M x N board where every cell has one character. Find all possible words that can be formed by a sequence of adjacent characters. Note that we can move to any of 8 adjacent characters, but a word should not have multiple instances of same cell.Ex... | [
{
"code": null,
"e": 24783,
"s": 24755,
"text": "\n27 Sep, 2021"
},
{
"code": null,
"e": 25099,
"s": 24783,
"text": "Given a dictionary, a method to do lookup in dictionary and a M x N board where every cell has one character. Find all possible words that can be formed by a seque... |
Why ANOVA is Essential to Data Science with a Practical Example | by Betty LD | Towards Data Science | What you will learn from this article:
Why you should care about fundamental statistics.
Why ANOVA and not another method.
How to easily run ANOVA on your data with python (repo here).
Have you already had an uncomfortable feeling about the conclusion you reach from the data you collect? I did.
Even after cleaning, pro... | [
{
"code": null,
"e": 210,
"s": 171,
"text": "What you will learn from this article:"
},
{
"code": null,
"e": 260,
"s": 210,
"text": "Why you should care about fundamental statistics."
},
{
"code": null,
"e": 294,
"s": 260,
"text": "Why ANOVA and not another me... |
Bipartite Graph | Practice | GeeksforGeeks | Given an adjacency list of a graph adj of V no. of vertices having 0 based index. Check whether the graph is bipartite or not.
Example 1:
Input:
Output: 1
Explanation: The given graph can be colored
in two colors so, it is a bipartite graph.
Example 2:
Input:
Output: 0
Explanation: The given graph cannot be col... | [
{
"code": null,
"e": 368,
"s": 238,
"text": "Given an adjacency list of a graph adj of V no. of vertices having 0 based index. Check whether the graph is bipartite or not.\n "
},
{
"code": null,
"e": 379,
"s": 368,
"text": "Example 1:"
},
{
"code": null,
"e": 487,
... |
Sum of permutations | Practice | GeeksforGeeks | Given N distinct digits in an array A (from 1 to 9), Your task is to complete the function getSum which finds sum of all n digit numbers that can be formed using these digits.
Note: Since the output can be large take modulo 1000000007
Input:
The first line of input contains an integer T denoting the no of test cases... | [
{
"code": null,
"e": 1151,
"s": 238,
"text": "Given N distinct digits in an array A (from 1 to 9), Your task is to complete the function getSum which finds sum of all n digit numbers that can be formed using these digits. \n\nNote: Since the output can be large take modulo 1000000007\n\nInput:\nThe ... |
How to build a data extraction pipeline with Apache Airflow | by Déborah Mesquita | Towards Data Science | Data extraction pipelines might be hard to build and manage, so it’s a good idea to use a tool that can help you with these tasks. Apache Airflow is a popular open-source management workflow platform and in this article you’ll learn how to use it to automate your first workflow.
To follow along I’m assuming you already... | [
{
"code": null,
"e": 327,
"s": 47,
"text": "Data extraction pipelines might be hard to build and manage, so it’s a good idea to use a tool that can help you with these tasks. Apache Airflow is a popular open-source management workflow platform and in this article you’ll learn how to use it to automa... |
Sentiment Analysis of a book through Unsupervised Learning | by Angelica Lo Duca | Towards Data Science | A simple tutorial to analyse the sentiment of a book in Python
In this tutorial, I will show you how to apply sentiment analysis to the text contained into a book through an Unsupervised Learning (UL) technique, based on the AFINN lexicon. This tutorial exploits the afinn Python package, which is available only for Eng... | [
{
"code": null,
"e": 234,
"s": 171,
"text": "A simple tutorial to analyse the sentiment of a book in Python"
},
{
"code": null,
"e": 627,
"s": 234,
"text": "In this tutorial, I will show you how to apply sentiment analysis to the text contained into a book through an Unsupervised... |
C library Macro - ERANGE | As mentioned above, the C library macro ERANGE represents a range error, which occurs if an input argument is outside the range, over which the mathematical function is defined and errno is set to ERANGE.
Following is the declaration for ERANGE Macro.
#define ERANGE some_value
NA
NA
NA
NA
The following example shows th... | [
{
"code": null,
"e": 2212,
"s": 2007,
"text": "As mentioned above, the C library macro ERANGE represents a range error, which occurs if an input argument is outside the range, over which the mathematical function is defined and errno is set to ERANGE."
},
{
"code": null,
"e": 2259,
"... |
LISP - When Construct | The when macro is followed by a test clause that evaluates to t or nil. If the test clause is evaluated to nil, then no form is evaluated and nil is returned, however the test result is t, then the action following the test clause is executed.
Syntax for when macro −
(when (test-clause) (<action1) )
Create a new sourc... | [
{
"code": null,
"e": 2304,
"s": 2060,
"text": "The when macro is followed by a test clause that evaluates to t or nil. If the test clause is evaluated to nil, then no form is evaluated and nil is returned, however the test result is t, then the action following the test clause is executed."
},
{... |
Find the number of rows and columns of a given matrix using NumPy - GeeksforGeeks | 29 Aug, 2020
In the NumPy with the help of shape() function, we can find the number of rows and columns. In this function, we pass a matrix and it will return row and column number of the matrix.
Syntax:
shape()
Return: The number of rows and columns.
Example:
Python
import numpy as np matrix= np.arange(1,9).reshape... | [
{
"code": null,
"e": 24292,
"s": 24264,
"text": "\n29 Aug, 2020"
},
{
"code": null,
"e": 24475,
"s": 24292,
"text": "In the NumPy with the help of shape() function, we can find the number of rows and columns. In this function, we pass a matrix and it will return row and column nu... |
MongoEngine - Indexes | An indexed collection results in faster processing of queries. By default, every collection is automatically indexed on _id field. In addition, you can create index on one or more fields.
Using Compass, we can build index very easily. Click on CREATE INDEX button on Indexes tab as shown in figure below−
A dialog box ap... | [
{
"code": null,
"e": 2498,
"s": 2310,
"text": "An indexed collection results in faster processing of queries. By default, every collection is automatically indexed on _id field. In addition, you can create index on one or more fields."
},
{
"code": null,
"e": 2615,
"s": 2498,
"te... |
Count zeros in a sorted matrix | Practice | GeeksforGeeks | Given a N X N binary Square Matrix where each row and column of the matrix is sorted in ascending order. Find the total number of zeros present in the matrix.
Example 1:
Input:
N = 3
A = {{0, 0, 0},
{0, 0, 1},
{0, 1, 1}}
Output: 6
Explanation:
The first, second and third row contains 3, 2 and 1
zeroes respec... | [
{
"code": null,
"e": 397,
"s": 238,
"text": "Given a N X N binary Square Matrix where each row and column of the matrix is sorted in ascending order. Find the total number of zeros present in the matrix."
},
{
"code": null,
"e": 408,
"s": 397,
"text": "Example 1:"
},
{
"c... |
Difference between Inheritance and Composition in Java - GeeksforGeeks | 22 Jul, 2021
Inheritance: When we want to create a new class and there is already a class that includes some of the code that we want, we can derive our new class from the existing class. In doing this, we can reuse the fields and methods of the existing class without having to write them ourself.
A subclass inherits a... | [
{
"code": null,
"e": 23894,
"s": 23866,
"text": "\n22 Jul, 2021"
},
{
"code": null,
"e": 24180,
"s": 23894,
"text": "Inheritance: When we want to create a new class and there is already a class that includes some of the code that we want, we can derive our new class from the exis... |
Program to reverse the rows in a 2d Array - GeeksforGeeks | 16 Jul, 2021
Given a 2D array arr[][] of size M x N integers where M is the number of rows and N is the number of columns. The task is to reverse every row of the given 2D array.Example:
Input: arr[][] =
{ {1, 2, 3},
{4, 5, 6},
{7, 8, 9} }
Output:
3 2 1
6 5 4
9 8 7
Input: arr[][] =
{ {1, 2},
{4, 5},
{7, ... | [
{
"code": null,
"e": 26067,
"s": 26039,
"text": "\n16 Jul, 2021"
},
{
"code": null,
"e": 26243,
"s": 26067,
"text": "Given a 2D array arr[][] of size M x N integers where M is the number of rows and N is the number of columns. The task is to reverse every row of the given 2D arra... |
CSS | Percentage Value - GeeksforGeeks | 03 Jun, 2020
It represents by <percentage > takes a number as a parameter. It is used to define the relative size to the parent size. With the help of this, you can adjust all the HTML-CSS elements. In CSS, many properties that take a percentage as parameters such as padding, width, height, margin, and font-size.
Synta... | [
{
"code": null,
"e": 26621,
"s": 26593,
"text": "\n03 Jun, 2020"
},
{
"code": null,
"e": 26923,
"s": 26621,
"text": "It represents by <percentage > takes a number as a parameter. It is used to define the relative size to the parent size. With the help of this, you can adjust all ... |
Parallelization caveats in R #1: performance issues | by Imre Gera | Towards Data Science | About this work. I started this as an individual article to sum up parallel processing problems I came across while working on a research project. After seeing that the article had become fairly long, I decided to split it up into multiple parts, each covering a specific kind of pitfalls that can, in the best cases, le... | [
{
"code": null,
"e": 800,
"s": 172,
"text": "About this work. I started this as an individual article to sum up parallel processing problems I came across while working on a research project. After seeing that the article had become fairly long, I decided to split it up into multiple parts, each cov... |
DataTables scrollY Option - GeeksforGeeks | 31 May, 2021
DataTables is jQuery plugin that can be used for adding interactive and advanced controls to HTML tables for the webpage. This also allows the data in the table to be searched, sorted, and filtered according to the needs of the user. The DataTable also exposes a powerful API that can be further used to mod... | [
{
"code": null,
"e": 24378,
"s": 24350,
"text": "\n31 May, 2021"
},
{
"code": null,
"e": 24716,
"s": 24378,
"text": "DataTables is jQuery plugin that can be used for adding interactive and advanced controls to HTML tables for the webpage. This also allows the data in the table to... |
How to increase the size of the annotations of a seaborn heatmap in Python? - GeeksforGeeks | 30 Jul, 2021
Prerequisites: Seaborn
Seaborn is a Python library that is based on matplotlib and is used for data visualization. It provides a medium to present data in a statistical graph format as an informative and attractive medium to impart some information. A heatmap is one of the components supported by seaborn w... | [
{
"code": null,
"e": 26736,
"s": 26708,
"text": "\n30 Jul, 2021"
},
{
"code": null,
"e": 26759,
"s": 26736,
"text": "Prerequisites: Seaborn"
},
{
"code": null,
"e": 27111,
"s": 26759,
"text": "Seaborn is a Python library that is based on matplotlib and is used... |
What are implicit and explicit type conversions in C language? | Converting one data type into another data type is called type conversions.
Implicit type conversion
Explicit type conversion
The compiler provides implicit type conversions when operands are of different data types.
The compiler provides implicit type conversions when operands are of different data types.
It is automa... | [
{
"code": null,
"e": 1138,
"s": 1062,
"text": "Converting one data type into another data type is called type conversions."
},
{
"code": null,
"e": 1163,
"s": 1138,
"text": "Implicit type conversion"
},
{
"code": null,
"e": 1188,
"s": 1163,
"text": "Explicit t... |
Common characters in n strings - GeeksforGeeks | 02 Mar, 2022
Given n strings, find the common characters in all the strings. In simple words, find characters that appear in all the strings and display them in alphabetical order or lexicographical order.Note* we’ll be considering that the strings contain lower case letters only.Examples:
Input : geeksforgeeks
... | [
{
"code": null,
"e": 24872,
"s": 24844,
"text": "\n02 Mar, 2022"
},
{
"code": null,
"e": 25152,
"s": 24872,
"text": "Given n strings, find the common characters in all the strings. In simple words, find characters that appear in all the strings and display them in alphabetical or... |
VB.Net - DateTimePicker Control | The DateTimePicker control allows selecting a date and time by editing the displayed values in the control. If you click the arrow in the DateTimePicker control, it displays a month calendar, like a combo box control. The user can make selection by clicking the required date. The new selected value appears in the text ... | [
{
"code": null,
"e": 2645,
"s": 2300,
"text": "The DateTimePicker control allows selecting a date and time by editing the displayed values in the control. If you click the arrow in the DateTimePicker control, it displays a month calendar, like a combo box control. The user can make selection by clic... |
What are batch updates in JDBC? Explain? | Grouping a set of INSERT or, UPDATE or, DELETE commands (those produce update count value) and execute them at once this mechanism is known as a batch update.
The statement, PreparedStatement, and CallableStatement objects hold a list (of commands) to which you can add related statements (those return update count valu... | [
{
"code": null,
"e": 1221,
"s": 1062,
"text": "Grouping a set of INSERT or, UPDATE or, DELETE commands (those produce update count value) and execute them at once this mechanism is known as a batch update."
},
{
"code": null,
"e": 1414,
"s": 1221,
"text": "The statement, Prepared... |
Express.js | app.all() Function - GeeksforGeeks | 18 Jun, 2020
The app.all() function is used to routing all types of HTTP request. Like if we have POST, GET, PUT, DELETE, etc, request made to any specific route, let say /user, so instead to defining different API’s like app.post(‘/user’), app.get(‘/user’), etc, we can define single API app.all(‘/user’) which will acc... | [
{
"code": null,
"e": 29590,
"s": 29562,
"text": "\n18 Jun, 2020"
},
{
"code": null,
"e": 29927,
"s": 29590,
"text": "The app.all() function is used to routing all types of HTTP request. Like if we have POST, GET, PUT, DELETE, etc, request made to any specific route, let say /user... |
gs - Unix, Linux Command | The interpreter recognizes many option switches, some of which are described
below. Please see the usage documenation for complete information. Switches
may appear anywhere in the command line and apply to all files thereafter.
Invoking Ghostscript with the -h or -? switch produces a
message which shows several useful ... | [
{
"code": null,
"e": 11044,
"s": 10577,
"text": "\nThe interpreter recognizes many option switches, some of which are described\nbelow. Please see the usage documenation for complete information. Switches\nmay appear anywhere in the command line and apply to all files thereafter.\nInvoking Ghostscri... |
Algorithms | Analysis of Algorithms | Question 19 - GeeksforGeeks | 28 Jun, 2021
Which of the given options provides the increasing order of asymptotic complexity of functions f1, f2, f3 and f4?
f1(n) = 2^n
f2(n) = n^(3/2)
f3(n) = nLogn
f4(n) = n^(Logn)
(A) f3, f2, f4, f1(B) f3, f2, f1, f4(C) f2, f3, f1, f4(D) f2, f3, f4, f1Answer: (A)Explanation:
f1(n) = 2^n
f2(n) = n^(3/2... | [
{
"code": null,
"e": 25036,
"s": 25008,
"text": "\n28 Jun, 2021"
},
{
"code": null,
"e": 25150,
"s": 25036,
"text": "Which of the given options provides the increasing order of asymptotic complexity of functions f1, f2, f3 and f4?"
},
{
"code": null,
"e": 25217,
"... |
Unsupervised Feature Learning. The Exemplar-CNN model uses extreme... | by Connor Shorten | Towards Data Science | Deep Convolutional Networks on Image tasks take in Image Matrices of the form (height x width x channels) and process them into low-dimensional features through a series of parametric functions. Supervised and Unsupervised Learning tasks both aim to learn a semantically meaningful representation of features from raw da... | [
{
"code": null,
"e": 495,
"s": 171,
"text": "Deep Convolutional Networks on Image tasks take in Image Matrices of the form (height x width x channels) and process them into low-dimensional features through a series of parametric functions. Supervised and Unsupervised Learning tasks both aim to learn... |
Deploying a Custom Docker Model with SageMaker to a Serverless Front-end with S3 | by Max Brenner | Towards Data Science | Deploying a model with AWS SageMaker is a great way to allow users or customers to interact with it. While you can use the many algorithms and models that come with SageMaker’s Python SDK, there are also many cases where you might want to create your own algorithm. This requires the use of Docker.
The easiest way to le... | [
{
"code": null,
"e": 471,
"s": 172,
"text": "Deploying a model with AWS SageMaker is a great way to allow users or customers to interact with it. While you can use the many algorithms and models that come with SageMaker’s Python SDK, there are also many cases where you might want to create your own ... |
Download Instagram Reel using Python - GeeksforGeeks | 19 Nov, 2021
In this article, we will discuss how to download Instagram reel using Python.
Instagram is a social networking platform owned by Facebook. In Python, there are numbers of libraries available by which we can solve some real-life problems and it also provides some tools to scrape information from Instagram. ... | [
{
"code": null,
"e": 24292,
"s": 24264,
"text": "\n19 Nov, 2021"
},
{
"code": null,
"e": 24370,
"s": 24292,
"text": "In this article, we will discuss how to download Instagram reel using Python."
},
{
"code": null,
"e": 24711,
"s": 24370,
"text": "Instagram is... |
Data Modeling for a Music Streaming App | by Joshua Yeung | Towards Data Science | I have joined Udacity Data Engineer Nanodegree. The program consists of many real-world projects. In the project, I have the role of a Data Engineer at a fabricated data streaming company called “Sparkify”. It is a startup and wants to analyze the data they’ve been collecting on songs and user activity on their new mus... | [
{
"code": null,
"e": 808,
"s": 172,
"text": "I have joined Udacity Data Engineer Nanodegree. The program consists of many real-world projects. In the project, I have the role of a Data Engineer at a fabricated data streaming company called “Sparkify”. It is a startup and wants to analyze the data th... |
Add a key:value pair to dictionary in Python - GeeksforGeeks | 14 Jan, 2019
Dictionary in Python is an unordered collection of data values, used to store data values like a map, which unlike other Data Types that hold only single value as an element, Dictionary holds key:value pair.
While using Dictionary, sometimes, we need to add or modify the key/value inside the dictionary. Le... | [
{
"code": null,
"e": 24412,
"s": 24384,
"text": "\n14 Jan, 2019"
},
{
"code": null,
"e": 24620,
"s": 24412,
"text": "Dictionary in Python is an unordered collection of data values, used to store data values like a map, which unlike other Data Types that hold only single value as ... |
C program to find sum and difference of two numbers | Suppose we have two integer numbers a, b and two floating point numbers c, d. We shall have to find the sum of a and b as well as c and d. We also have to find the sum of a and c as well. So depending on the printf function style, output may differ.
So, if the input is like a = 5, b = 58 c = 6.32, d = 8.64, then the ou... | [
{
"code": null,
"e": 1312,
"s": 1062,
"text": "Suppose we have two integer numbers a, b and two floating point numbers c, d. We shall have to find the sum of a and b as well as c and d. We also have to find the sum of a and c as well. So depending on the printf function style, output may differ."
... |
How to Code Your Own Port Scanner Using BASH Script and netcat Tool in Linux? - GeeksforGeeks | 06 Jan, 2021
The first step of penetration testing is reconnaissance (information gathering) which involves scanning for open ports in the machine. There are various tools available on the internet to perform port scanning but, the ability to make your own port scanner is just felt amazing. So here are the steps to fol... | [
{
"code": null,
"e": 24406,
"s": 24378,
"text": "\n06 Jan, 2021"
},
{
"code": null,
"e": 24869,
"s": 24406,
"text": "The first step of penetration testing is reconnaissance (information gathering) which involves scanning for open ports in the machine. There are various tools avai... |
How to SELECT * and rename a column in MySQL? | Let us first create a table −
mysql> create table DemoTable
(
Id int NOT NULL AUTO_INCREMENT PRIMARY KEY,
Name varchar(20),
Age int
);
Query OK, 0 rows affected (1.15 sec)
Insert records in the table using insert command −
mysql> insert into DemoTable(Name,Age) values('John',21);
Query OK, 1 row affected... | [
{
"code": null,
"e": 1092,
"s": 1062,
"text": "Let us first create a table −"
},
{
"code": null,
"e": 1249,
"s": 1092,
"text": "mysql> create table DemoTable\n (\n Id int NOT NULL AUTO_INCREMENT PRIMARY KEY,\n Name varchar(20),\n Age int\n );\nQuery OK, 0 rows affected ... |
Character Class in Java | The Character class wraps a value of the primitive type char in an object. An object of class Character contains a single field whose type is char.
Following are some of the methods of the Character class −
Let us see an example −
Live Demo
import java.lang.*;
public class Demo {
public static void main(String[] ar... | [
{
"code": null,
"e": 1210,
"s": 1062,
"text": "The Character class wraps a value of the primitive type char in an object. An object of class Character contains a single field whose type is char."
},
{
"code": null,
"e": 1269,
"s": 1210,
"text": "Following are some of the methods ... |
Java Syntax | In the previous chapter, we created a Java file called Main.java, and we used the following code to print "Hello World" to the screen:
Main.java
public class Main {
public static void main(String[] args) {
System.out.println("Hello World");
}
}
Try it Yourself »
Every line of code that runs in Java must be i... | [
{
"code": null,
"e": 135,
"s": 0,
"text": "In the previous chapter, we created a Java file called Main.java, and we used the following code to print \"Hello World\" to the screen:"
},
{
"code": null,
"e": 145,
"s": 135,
"text": "Main.java"
},
{
"code": null,
"e": 254,... |
NPDA for accepting the language L = {anb(2n) | n>=1} U {anbn | n>=1} - GeeksforGeeks | 25 Jan, 2019
Prerequisite – Pushdown automata, Pushdown automata acceptance by final stateProblem – Design a non deterministic PDA for accepting the language L = { : n>=1} U { : n>=1}, i.e.,
L = {abb, aabbbb, aaabbbbbb, aaaabbbbbbbb, ......}
U {ab, aabb, aaabbb, aaaabbbb, ......}
In each string, the numbe... | [
{
"code": null,
"e": 24377,
"s": 24349,
"text": "\n25 Jan, 2019"
},
{
"code": null,
"e": 24557,
"s": 24377,
"text": "Prerequisite – Pushdown automata, Pushdown automata acceptance by final stateProblem – Design a non deterministic PDA for accepting the language L = { : n>=1} U {... |
Adversarial Attack and Defense on Neural Networks in PyTorch | by Ta-Ying Cheng | Towards Data Science | The rise of deep learning and neural networks brought various opportunities and applications such as object detection and text-to-speech into the modern society. Yet, despite the seemingly high accuracy, neural networks (and almost all machine learning models) could actually suffer from data, namely adversarial example... | [
{
"code": null,
"e": 989,
"s": 171,
"text": "The rise of deep learning and neural networks brought various opportunities and applications such as object detection and text-to-speech into the modern society. Yet, despite the seemingly high accuracy, neural networks (and almost all machine learning mo... |
Semantic Similarity Using Transformers | by Raymond Cheng | Towards Data Science | Semantic Similarity, or Semantic Textual Similarity, is a task in the area of Natural Language Processing (NLP) that scores the relationship between texts or documents using a defined metric. Semantic Similarity has various applications, such as information retrieval, text summarization, sentiment analysis, etc.
There ... | [
{
"code": null,
"e": 486,
"s": 172,
"text": "Semantic Similarity, or Semantic Textual Similarity, is a task in the area of Natural Language Processing (NLP) that scores the relationship between texts or documents using a defined metric. Semantic Similarity has various applications, such as informati... |
basic_istream::operator>> in C++ - GeeksforGeeks | 22 Jul, 2021
The basic_istream::operator>> is known as the extraction operator. This operator is used to apply on the input string. Header File:
<iostream>
Syntax:
basic_istream& operator>>( int& a );
basic_istream& operator>>( unsigned int& a );
Parameters:
a : This represents the value where the extracted chara... | [
{
"code": null,
"e": 24098,
"s": 24070,
"text": "\n22 Jul, 2021"
},
{
"code": null,
"e": 24232,
"s": 24098,
"text": "The basic_istream::operator>> is known as the extraction operator. This operator is used to apply on the input string. Header File: "
},
{
"code": null,
... |
What is the best way to handle list empty exception in Python? | List is an ordered sequence of elements. Individual element in list is accessed using index starting with 0 and goes up to length-1. If index goes beyond this range, IndexError exception is encountered.
In following example, an infinite loop is used to pop one element at a time. As loop tries to go even after last elem... | [
{
"code": null,
"e": 1265,
"s": 1062,
"text": "List is an ordered sequence of elements. Individual element in list is accessed using index starting with 0 and goes up to length-1. If index goes beyond this range, IndexError exception is encountered."
},
{
"code": null,
"e": 1480,
"s"... |
Automating the Machine Learning Pipeline for Credit card fraud detection - GeeksforGeeks | 03 May, 2020
Before going to the code it is requested to work on a Jupyter notebook or ipython notebook. If not installed on your machine you can use Google Collab.This is one of the best and my personal favorite way of working on a python script to work on a Machine Learning problemDataset link:You can download the da... | [
{
"code": null,
"e": 24764,
"s": 24736,
"text": "\n03 May, 2020"
},
{
"code": null,
"e": 25186,
"s": 24764,
"text": "Before going to the code it is requested to work on a Jupyter notebook or ipython notebook. If not installed on your machine you can use Google Collab.This is one ... |
GATE | GATE-CS-2004 | Question 90 - GeeksforGeeks | 15 Oct, 2019
The relation scheme Student Performance (name, courseNo, rollNo, grade) has the following functional dependencies:
name, courseNo → grade
rollNo, courseNo → grade
name → rollNo
rollNo → name
The highest normal form of this relation scheme is(A) 2 NF(B) 3 NF(C) BCNF(D) 4NFAnswer: (B)Explanation: For easy u... | [
{
"code": null,
"e": 24508,
"s": 24480,
"text": "\n15 Oct, 2019"
},
{
"code": null,
"e": 24623,
"s": 24508,
"text": "The relation scheme Student Performance (name, courseNo, rollNo, grade) has the following functional dependencies:"
},
{
"code": null,
"e": 24700,
... |
ES6 - Error Handling | There are three types of errors in programming: Syntax Errors, Runtime Errors, and Logical Errors.
Syntax errors, also called parsing errors, occur at compile time in traditional programming languages and at interpret time in JavaScript. When a syntax error occurs in JavaScript, only the code contained within the same ... | [
{
"code": null,
"e": 2376,
"s": 2277,
"text": "There are three types of errors in programming: Syntax Errors, Runtime Errors, and Logical Errors."
},
{
"code": null,
"e": 2758,
"s": 2376,
"text": "Syntax errors, also called parsing errors, occur at compile time in traditional pro... |
Java Program to access character of a string | To access character of a string in Java, use the charAt() method. The position is to be added as the parameter.
Let’s say we have the following string −
String str = "laptop";
Let’s find the character at the 4th position using charAt() method.
str.charAt(3));
The following is the final example.
Live Demo
public class ... | [
{
"code": null,
"e": 1174,
"s": 1062,
"text": "To access character of a string in Java, use the charAt() method. The position is to be added as the parameter."
},
{
"code": null,
"e": 1215,
"s": 1174,
"text": "Let’s say we have the following string −"
},
{
"code": null,
... |
Check if Two Integers are Equal or Not in Java - GeeksforGeeks | 21 Jun, 2021
Checking two integers equal or not in Java is done by various approaches.
Arithmetic operatorComparison OperatorsString functionsXOR operatorComplement (~) and bit-wise (&) operator
Arithmetic operator
Comparison Operators
String functions
XOR operator
Complement (~) and bit-wise (&) operator
Example
Input... | [
{
"code": null,
"e": 23948,
"s": 23920,
"text": "\n21 Jun, 2021"
},
{
"code": null,
"e": 24022,
"s": 23948,
"text": "Checking two integers equal or not in Java is done by various approaches."
},
{
"code": null,
"e": 24130,
"s": 24022,
"text": "Arithmetic opera... |
UUID hashCode() Method in Java with Examples - GeeksforGeeks | 27 Dec, 2018
The hashCode() method of UUID class in Java is generally used to get the hash code value of the UUID.
Syntax:
public int hashCode()
Parameters: This method does not take any parameter.
Return Value: This method returns an integer value which is the hashCode value for this UUID instance.
Below programs illu... | [
{
"code": null,
"e": 25237,
"s": 25209,
"text": "\n27 Dec, 2018"
},
{
"code": null,
"e": 25339,
"s": 25237,
"text": "The hashCode() method of UUID class in Java is generally used to get the hash code value of the UUID."
},
{
"code": null,
"e": 25347,
"s": 25339,
... |
Find Two Missing Numbers | Set 2 (XOR based solution) - GeeksforGeeks | 03 May, 2021
Given an array of n unique integers where each element in the array is in range [1, n]. The array has all distinct elements and size of an array is (n-2). Hence Two numbers from the range are missing from this array. Find the two missing numbers.Examples:
Input : arr[] = {1, 3, 5, 6}, n = 6
Output : 2 4... | [
{
"code": null,
"e": 26925,
"s": 26897,
"text": "\n03 May, 2021"
},
{
"code": null,
"e": 27183,
"s": 26925,
"text": "Given an array of n unique integers where each element in the array is in range [1, n]. The array has all distinct elements and size of an array is (n-2). Hence Tw... |
How to disable button element dynamically using JavaScript ? - GeeksforGeeks | 25 Dec, 2020
The Button disabled property in HTML DOM is used to set or return whether a Button element would be disabled or not. A disabled element is un-clickable and unusable. It contains a boolean value.
Syntax: It is used to set the button disabled property.
buttonObject.disabled = "value"
Property Values:
true: I... | [
{
"code": null,
"e": 26645,
"s": 26617,
"text": "\n25 Dec, 2020"
},
{
"code": null,
"e": 26840,
"s": 26645,
"text": "The Button disabled property in HTML DOM is used to set or return whether a Button element would be disabled or not. A disabled element is un-clickable and unusabl... |
Leaf starting point in a Binary Heap data structure - GeeksforGeeks | 07 Feb, 2018
Binary Heap is a complete tree (All levels are completely filled except possibly the last level and the last level has all keys as left as possible). In other words, we can say that it’s an almost complete binary tree.
A Binary heap is typically represented as array. If we take a closer look, we can notice... | [
{
"code": null,
"e": 25363,
"s": 25335,
"text": "\n07 Feb, 2018"
},
{
"code": null,
"e": 25582,
"s": 25363,
"text": "Binary Heap is a complete tree (All levels are completely filled except possibly the last level and the last level has all keys as left as possible). In other word... |
Print all the paths from root to leaf, with a specified sum in Binary tree - GeeksforGeeks | 03 Feb, 2022
Given a Binary tree, and target sum as K, the task is to print all the possible paths from root to leaf that has the sum equal to K.
Examples:
Input: K = 22
5
/ \
4 8
/ / \
11 13 4
/ \ / \
7 2... | [
{
"code": null,
"e": 26249,
"s": 26221,
"text": "\n03 Feb, 2022"
},
{
"code": null,
"e": 26382,
"s": 26249,
"text": "Given a Binary tree, and target sum as K, the task is to print all the possible paths from root to leaf that has the sum equal to K."
},
{
"code": null,
... |
Arcesium Interview Experience for Senior Software Engineer - GeeksforGeeks | 09 Sep, 2020
Online Coding Round (HackerRank): 3 Coding Questions with 1-hour time limit.
Given a binary string, find the minimum number of replacements to make the binary string alternatingThere are N product numbers from 1 to N. There are two numbers X and Y. There are two types of discounts $A and $B. A discount of ... | [
{
"code": null,
"e": 26345,
"s": 26317,
"text": "\n09 Sep, 2020"
},
{
"code": null,
"e": 26422,
"s": 26345,
"text": "Online Coding Round (HackerRank): 3 Coding Questions with 1-hour time limit."
},
{
"code": null,
"e": 27251,
"s": 26422,
"text": "Given a binar... |
C Language | Set 5 - GeeksforGeeks | 27 Mar, 2017
Following questions have been asked in GATE CS 2008 exam.
1. What is printed by the following C program?
int f(int x, int *py, int **ppz){ int y, z; **ppz += 1; z = **ppz; *py += 2; y = *py; x += 3; return x + y + z;} void main(){ int c, *b, **a; c = 4; b = &c; a = &b; print... | [
{
"code": null,
"e": 25205,
"s": 25177,
"text": "\n27 Mar, 2017"
},
{
"code": null,
"e": 25263,
"s": 25205,
"text": "Following questions have been asked in GATE CS 2008 exam."
},
{
"code": null,
"e": 25310,
"s": 25263,
"text": "1. What is printed by the follow... |
ArrayDeque push() Method in Java - GeeksforGeeks | 10 Dec, 2018
The Java.util.ArrayDeque.push(E element) method is used to push an element into the Deque. The operation is similar to the operation in the stack. The element gets pushed onto the top of the deque.
Syntax:
Array_Deque.push(E element)
Parameters: The parameter element is of the type ArrayDeque and refers to... | [
{
"code": null,
"e": 24941,
"s": 24913,
"text": "\n10 Dec, 2018"
},
{
"code": null,
"e": 25139,
"s": 24941,
"text": "The Java.util.ArrayDeque.push(E element) method is used to push an element into the Deque. The operation is similar to the operation in the stack. The element gets... |
How to Build your First Machine Learning Model in Python | by Chanin Nantasenamat | Towards Data Science | A while back I wrote a blog on How to Build a Machine Learning Model(A Visual Guide to Learning Data Science) which takes you on a visual and conceptual journey on how a machine learning model is built. What the article did not show was how to implement the actual building of the model.
In this article, you will learn ... | [
{
"code": null,
"e": 460,
"s": 172,
"text": "A while back I wrote a blog on How to Build a Machine Learning Model(A Visual Guide to Learning Data Science) which takes you on a visual and conceptual journey on how a machine learning model is built. What the article did not show was how to implement t... |
Automating Text Extraction and Data Preprocessing using AWS Textract, Lambda & DynamoDB | by Saleh Alkhalifa | Towards Data Science | One of the most important parts of a data scientists job is automating processes — this can reduce the burden of time-consuming tasks and free you up for more important matters. In this tutorial, we will cover an end-to-end AWS solution for automating document text extraction. We will take raw and unstructured document... | [
{
"code": null,
"e": 525,
"s": 172,
"text": "One of the most important parts of a data scientists job is automating processes — this can reduce the burden of time-consuming tasks and free you up for more important matters. In this tutorial, we will cover an end-to-end AWS solution for automating doc... |
Check whether K-th bit is set or not | Practice | GeeksforGeeks | Given a number N and a bit number K, check if Kth bit of N is set or not. A bit is called set if it is 1. Position of set bit '1' should be indexed starting with 0 from LSB side in binary representation of the number.
Example 1:
Input: N = 4, K = 0
Output: No
Explanation: Binary representation of 4 is 100,
in which 0... | [
{
"code": null,
"e": 468,
"s": 238,
"text": "Given a number N and a bit number K, check if Kth bit of N is set or not. A bit is called set if it is 1. Position of set bit '1' should be indexed starting with 0 from LSB side in binary representation of the number.\n\nExample 1:"
},
{
"code": n... |
Batch Script - Comments | It’s always a good practice to add comments or documentation for the scripts which are created. This is required for maintenance of the scripts to understand what the script actually does.
For example, consider the following piece of code which has no form of comments. If any average person who has not developed the fo... | [
{
"code": null,
"e": 2358,
"s": 2169,
"text": "It’s always a good practice to add comments or documentation for the scripts which are created. This is required for maintenance of the scripts to understand what the script actually does."
},
{
"code": null,
"e": 2625,
"s": 2358,
"t... |
How to create your own Deep Learning Project in Azure | by René Bremer | Towards Data Science | Deep learning has a lot of practical applications for companies such as image recognition, video indexing and speech to text transcription. However, it can be daunting for companies to start with deep learning projects. Common issues are sensitivity of data used and the complexity of deep learning, which can be seen as... | [
{
"code": null,
"e": 530,
"s": 172,
"text": "Deep learning has a lot of practical applications for companies such as image recognition, video indexing and speech to text transcription. However, it can be daunting for companies to start with deep learning projects. Common issues are sensitivity of da... |
FileExtensionValidator - Validate File Extensions in Django - GeeksforGeeks | 16 Mar, 2021
Django is a high-level Python Web framework that encourages rapid development and clean, pragmatic design. Built by experienced developers, it takes care of much of the hassle of Web development, so you can focus on writing your app without needing to reinvent the wheel. It’s free and open source.
To demon... | [
{
"code": null,
"e": 24212,
"s": 24184,
"text": "\n16 Mar, 2021"
},
{
"code": null,
"e": 24511,
"s": 24212,
"text": "Django is a high-level Python Web framework that encourages rapid development and clean, pragmatic design. Built by experienced developers, it takes care of much o... |
Add Common Legend to Combined ggplot2 Plots in R - GeeksforGeeks | 28 Nov, 2021
In this article, we will discuss how to create a combined plot with a shared legend in R Language using the ggplot2 package.
To join multiple ggplot2 plots, we use the grid.arrange() function of the gridExtra package in the R Language. The grid.arrange() function converts the frame into a grid of the desir... | [
{
"code": null,
"e": 24851,
"s": 24823,
"text": "\n28 Nov, 2021"
},
{
"code": null,
"e": 24976,
"s": 24851,
"text": "In this article, we will discuss how to create a combined plot with a shared legend in R Language using the ggplot2 package."
},
{
"code": null,
"e": 2... |
CoffeeScript - Functions | A function is a block of reusable code that can be called anywhere in your program. This eliminates the need of writing the same code again and again. It helps programmers in writing modular codes.
Functions allow a programmer to divide a big program into a number of small and manageable functions.
In general, using Ja... | [
{
"code": null,
"e": 2507,
"s": 2309,
"text": "A function is a block of reusable code that can be called anywhere in your program. This eliminates the need of writing the same code again and again. It helps programmers in writing modular codes."
},
{
"code": null,
"e": 2609,
"s": 250... |
Python Pandas - Date Functionality | Extending the Time series, Date functionalities play major role in financial data analysis. While working with Date data, we will frequently come across the following −
Generating sequence of dates
Convert the date series to different frequencies
Using the date.range() function by specifying the periods and the frequen... | [
{
"code": null,
"e": 2612,
"s": 2443,
"text": "Extending the Time series, Date functionalities play major role in financial data analysis. While working with Date data, we will frequently come across the following −"
},
{
"code": null,
"e": 2641,
"s": 2612,
"text": "Generating se... |
Minimum Number of Platforms Required for a Railway/Bus Station | Set 2 (Set based approach) - GeeksforGeeks | 18 Apr, 2022
Given arrival and departure times of all trains that reach a railway station, find the minimum number of platforms required for the railway station so that no train waits. We are given two arrays which represent arrival and departure times of trains that stop.
Examples:
Input: arr[] = {9:00, 9:40, 9:5... | [
{
"code": null,
"e": 24570,
"s": 24542,
"text": "\n18 Apr, 2022"
},
{
"code": null,
"e": 24831,
"s": 24570,
"text": "Given arrival and departure times of all trains that reach a railway station, find the minimum number of platforms required for the railway station so that no trai... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.