title stringlengths 3 221 | text stringlengths 17 477k | parsed listlengths 0 3.17k |
|---|---|---|
Merge K sorted arrays | Set 3 ( Using Divide and Conquer Approach ) | 01 Nov, 2021
Giving k sorted arrays, each of size N, the task is to merge them into a single sorted array.
Examples:
Input: arr[][] = {{5, 7, 15, 18},
{1, 8, 9, 17},
{1, 4, 7, 7}}
Output: {1, 1, 4, 5, 7, 7, 7, 8, 9, 15, 17, 18}
Input: arr[][] = {{3, 2, 1}
{6, 5... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n01 Nov, 2021"
},
{
"code": null,
"e": 146,
"s": 52,
"text": "Giving k sorted arrays, each of size N, the task is to merge them into a single sorted array."
},
{
"code": null,
"e": 157,
"s": 146,
"text": "Examples: "... |
Sorting objects using In-Place sorting algorithm | 15 Jun, 2022
Given an array of red, blue and yellow objects, the task is to use an in-place sorting algorithm to sort the array in such a way that all the blue objects appear before all the red objects and all the red objects appear before all the yellow objects.Examples:
Input: arr[] = {“blue”, “red”, “yellow”, “blu... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n15 Jun, 2022"
},
{
"code": null,
"e": 290,
"s": 28,
"text": "Given an array of red, blue and yellow objects, the task is to use an in-place sorting algorithm to sort the array in such a way that all the blue objects appear before all th... |
Python | Convert list of strings and characters to list of characters | 23 Jan, 2019
Sometimes we come forward to the problem in which we receive a list that consists of strings and characters mixed and the task we need to perform is converting that mixed list to a list consisting entirely of characters. Let’s discuss certain ways in which this is achieved.
Method #1 : Using List comprehen... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n23 Jan, 2019"
},
{
"code": null,
"e": 303,
"s": 28,
"text": "Sometimes we come forward to the problem in which we receive a list that consists of strings and characters mixed and the task we need to perform is converting that mixed list... |
How to share a captured Image to another App in Android | 04 Mar, 2020
Pre-requisite: How to open Camera through Intent and capture an image
In this article, we will try to send the captured image (from this article) to other apps using Android Studio.
Approach:
The image captured gets stored on the external storage. Hence we need to request permission to access the files fro... | [
{
"code": null,
"e": 54,
"s": 26,
"text": "\n04 Mar, 2020"
},
{
"code": null,
"e": 124,
"s": 54,
"text": "Pre-requisite: How to open Camera through Intent and capture an image"
},
{
"code": null,
"e": 236,
"s": 124,
"text": "In this article, we will try to sen... |
LEN() Function in SQL Server | 27 Nov, 2020
LEN() function calculates the number of characters of an input string, excluding the trailing spaces.
Syntax :
LEN(input_string)
Parameter –This method accepts a single-parameter as mentioned above and described below :
input_string –It is an expression that can be a constant, variable, or column of eith... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n27 Nov, 2020"
},
{
"code": null,
"e": 130,
"s": 28,
"text": "LEN() function calculates the number of characters of an input string, excluding the trailing spaces."
},
{
"code": null,
"e": 139,
"s": 130,
"text": "Synt... |
Print alternate nodes of a linked list using recursion | 17 Feb, 2022
Given a linked list, print alternate nodes of this linked list.Examples :
Input : 1 -> 2 -> 3 -> 4 -> 5 -> 6 -> 7 -> 8 -> 9 -> 10
Output : 1 -> 3 -> 5 -> 7 -> 9
Input : 10 -> 9
Output : 10
Recursive Approach : 1. Initialize a static variable(say flag) 2. If flag is odd print the node 3. increase head... | [
{
"code": null,
"e": 53,
"s": 25,
"text": "\n17 Feb, 2022"
},
{
"code": null,
"e": 129,
"s": 53,
"text": "Given a linked list, print alternate nodes of this linked list.Examples : "
},
{
"code": null,
"e": 246,
"s": 129,
"text": "Input : 1 -> 2 -> 3 -> 4 -> 5... |
Angular Material 7 - Card | The <mat-card>, an Angular Directive, is used to create a card with material design styling and animation capabilities. It provides preset styles for the common card sections.
<mat-card-title> − Represents the section for title.
<mat-card-title> − Represents the section for title.
<mat-card-subtitle> − Represents the s... | [
{
"code": null,
"e": 3065,
"s": 2889,
"text": "The <mat-card>, an Angular Directive, is used to create a card with material design styling and animation capabilities. It provides preset styles for the common card sections."
},
{
"code": null,
"e": 3118,
"s": 3065,
"text": "<mat-c... |
JDBC - Database Connections | After you've installed the appropriate driver, it is time to establish a database connection using JDBC.
The programming involved to establish a JDBC connection is fairly simple. Here are these simple four steps −
Import JDBC Packages − Add import statements to your Java program to import required classes in your Java ... | [
{
"code": null,
"e": 2401,
"s": 2296,
"text": "After you've installed the appropriate driver, it is time to establish a database connection using JDBC."
},
{
"code": null,
"e": 2510,
"s": 2401,
"text": "The programming involved to establish a JDBC connection is fairly simple. Her... |
Matrix Chain Multiplication (A O(N^2) Solution) | 24 May, 2021
Given a sequence of matrices, find the most efficient way to multiply these matrices together. The problem is not actually to perform the multiplications, but merely to decide in which order to perform the multiplications.We have many options to multiply a chain of matrices because matrix multiplication is... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n24 May, 2021"
},
{
"code": null,
"e": 531,
"s": 52,
"text": "Given a sequence of matrices, find the most efficient way to multiply these matrices together. The problem is not actually to perform the multiplications, but merely to decid... |
How to take column-slices of DataFrame in Pandas? | 15 Mar, 2021
In this article, we will learn how to slice a DataFrame column-wise in Python. DataFrame is a two-dimensional tabular data structure with labeled axes .i.e. rows and columns. Slicing of a DataFrame can be done using the following two methods:
Using loc, the loc is present in the pandas package loc can be u... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n15 Mar, 2021"
},
{
"code": null,
"e": 271,
"s": 28,
"text": "In this article, we will learn how to slice a DataFrame column-wise in Python. DataFrame is a two-dimensional tabular data structure with labeled axes .i.e. rows and columns. ... |
What is the use of scope resolution operator in C++? | The :: (scope resolution) operator is used to get hidden names due to variable scopes so that you can still use them. The scope resolution operator can be used as both unary and binary
You can use the single scope operator if a namespace scope or global scope name is hidden by a certain declaration of a similar name du... | [
{
"code": null,
"e": 1247,
"s": 1062,
"text": "The :: (scope resolution) operator is used to get hidden names due to variable scopes so that you can still use them. The scope resolution operator can be used as both unary and binary"
},
{
"code": null,
"e": 1588,
"s": 1247,
"text"... |
C# | Type.IsAssignableFrom(Type) Method - GeeksforGeeks | 19 Dec, 2019
Type.IsAssignableFrom(Type) Method is used determine whether an instance of a specified type can be assigned to a variable of the current type.
Syntax: public virtual bool IsAssignableFrom (Type c);Here, it takes the type to compare with the current type.
Return Value: This method returns true if any of th... | [
{
"code": null,
"e": 24302,
"s": 24274,
"text": "\n19 Dec, 2019"
},
{
"code": null,
"e": 24446,
"s": 24302,
"text": "Type.IsAssignableFrom(Type) Method is used determine whether an instance of a specified type can be assigned to a variable of the current type."
},
{
"code... |
How to stop C++ console application from exiting immediately? | Sometimes we have noticed that the console is being closed immediately after displaying the result. So we cannot see the result properly. Here we will see how we can stop the console from closing.
The idea is very simple. We can use the getchar() function at the end. This will wait for one character. If one character i... | [
{
"code": null,
"e": 1259,
"s": 1062,
"text": "Sometimes we have noticed that the console is being closed immediately after displaying the result. So we cannot see the result properly. Here we will see how we can stop the console from closing."
},
{
"code": null,
"e": 1416,
"s": 1259... |
Approaching Time-Series with a Tree-based Model | by Agnis Liukis | Towards Data Science | In this article, I’m going to show a generic way how to approach a time-series prediction problem with a machine learning model. I’m using a tree-based model LightGBM as an example here, but practically it could be almost any classical machine learning model, including linear regression or some other. I’ll cover needed... | [
{
"code": null,
"e": 562,
"s": 172,
"text": "In this article, I’m going to show a generic way how to approach a time-series prediction problem with a machine learning model. I’m using a tree-based model LightGBM as an example here, but practically it could be almost any classical machine learning mo... |
Python: Decorators in OOP. A guide on classmethods, staticmethods... | by Aniruddha Karajgi | Towards Data Science | The Object Oriented Programming paradigm became popular in the ’60s and ‘70s, in languages like Lisp and Smalltalk. Such features were also added to existing languages like Ada, Fortran and Pascal.
Python is an object oriented programming language, though it doesn’t support strong encapsulation.
Introductory topics in ... | [
{
"code": null,
"e": 370,
"s": 172,
"text": "The Object Oriented Programming paradigm became popular in the ’60s and ‘70s, in languages like Lisp and Smalltalk. Such features were also added to existing languages like Ada, Fortran and Pascal."
},
{
"code": null,
"e": 469,
"s": 370,
... |
Python 3 - Number tan() Method | The tan() method returns the tangent of x radians.
Following is the syntax for tan() method −
tan(x)
Note − This function is not accessible directly, so we need to import math module and then we need to call this function using math static object.
x − This must be a numeric value.
This method returns a numeric value b... | [
{
"code": null,
"e": 2391,
"s": 2340,
"text": "The tan() method returns the tangent of x radians."
},
{
"code": null,
"e": 2434,
"s": 2391,
"text": "Following is the syntax for tan() method −"
},
{
"code": null,
"e": 2442,
"s": 2434,
"text": "tan(x)\n"
},
... |
Flutter - LayoutBuilder Widget - GeeksforGeeks | 24 Jan, 2021
In Flutter, LayoutBuilder Widget is similar to the Builder widget except that the framework calls the builder function at layout time and provides the parent widget’s constraints. This is useful when the parent constrains the child’s size and doesn’t depend on the child’s intrinsic size. The LayoutBuilder’... | [
{
"code": null,
"e": 23619,
"s": 23591,
"text": "\n24 Jan, 2021"
},
{
"code": null,
"e": 23968,
"s": 23619,
"text": "In Flutter, LayoutBuilder Widget is similar to the Builder widget except that the framework calls the builder function at layout time and provides the parent widge... |
How to initialize const member variable in a C++ class? | Here we will see how to initialize the const type member variable using constructor?
To initialize the const value using constructor, we have to use the initialize list. This initializer list is used to initialize the data member of a class. The list of members, that will be initialized, will be present after the const... | [
{
"code": null,
"e": 1147,
"s": 1062,
"text": "Here we will see how to initialize the const type member variable using constructor?"
},
{
"code": null,
"e": 1441,
"s": 1147,
"text": "To initialize the const value using constructor, we have to use the initialize list. This initial... |
JavaScript algorithm for converting integers to roman numbers | Let’s say, we are required to write a function, say intToRoman(), which, as the name suggests,
returns a Roman equivalent of the number passed in it as an argument.
Let’s write the code for this function −
const intToRoman = (num) => {
let result = "";
while(num){
if(num>=1000){
result += "M";
... | [
{
"code": null,
"e": 1227,
"s": 1062,
"text": "Let’s say, we are required to write a function, say intToRoman(), which, as the name suggests,\nreturns a Roman equivalent of the number passed in it as an argument."
},
{
"code": null,
"e": 1268,
"s": 1227,
"text": "Let’s write the ... |
Read file line by line using C++ | This is a C++ program to read file line by line.
tpoint.txt is having initial content as
“Tutorials point.”
Tutorials point.
Begin
Create an object newfile against the class fstream.
Call open() method to open a file “tpoint.txt” to perform write operation using object newfile.
If file is open then
Input... | [
{
"code": null,
"e": 1111,
"s": 1062,
"text": "This is a C++ program to read file line by line."
},
{
"code": null,
"e": 1170,
"s": 1111,
"text": "tpoint.txt is having initial content as\n“Tutorials point.”"
},
{
"code": null,
"e": 1187,
"s": 1170,
"text": "Tu... |
Program to determine color of a chessboard square using Python | Suppose we have a chessboard coordinate, that is a string that represents the coordinates of row and column of the chessboard. Below is a chessboard for your reference.
We have to check whether given cell is white or not, if white return true, otherwise return false.
So, if the input is like coordinate = "f5", then the... | [
{
"code": null,
"e": 1231,
"s": 1062,
"text": "Suppose we have a chessboard coordinate, that is a string that represents the coordinates of row and column of the chessboard. Below is a chessboard for your reference."
},
{
"code": null,
"e": 1330,
"s": 1231,
"text": "We have to ch... |
Getting Started with NLP for Indic Languages | by Sundar V | Towards Data Science | Want to go beyond English and use the real power of Natural Language Processing (NLP) to serve the second-most populous country in the world? Everyone knows India is a very diverse country and a home for lots of languages but do you know India speaks 780 languages [1]. It’s time to go beyond English when it comes to NL... | [
{
"code": null,
"e": 598,
"s": 172,
"text": "Want to go beyond English and use the real power of Natural Language Processing (NLP) to serve the second-most populous country in the world? Everyone knows India is a very diverse country and a home for lots of languages but do you know India speaks 780 ... |
How can we initialize a boolean array in Java?
| The boolean array can be used to store boolean datatype values only and the default value of the boolean array is false. An array of booleans are initialized to false and arrays of reference types are initialized to null. In some cases, we need to initialize all values of the boolean array with true or false. We can us... | [
{
"code": null,
"e": 1424,
"s": 1062,
"text": "The boolean array can be used to store boolean datatype values only and the default value of the boolean array is false. An array of booleans are initialized to false and arrays of reference types are initialized to null. In some cases, we need to initi... |
SymPy - Derivative | The derivative of a function is its instantaneous rate of change with respect to one of its variables. This is equivalent to finding the slope of the tangent line to the function at a point.we can find the differentiation of mathematical expressions in the form of variables by using diff() function in SymPy package.
di... | [
{
"code": null,
"e": 2337,
"s": 2019,
"text": "The derivative of a function is its instantaneous rate of change with respect to one of its variables. This is equivalent to finding the slope of the tangent line to the function at a point.we can find the differentiation of mathematical expressions in ... |
Working with Display Block in CSS | The CSS Display property with value block renders an element with parent’s full width available, it also forces a line break. An element with display as block renders as a <div> or <p> element.
Following is the syntax of CSS display block −
Selector {
display: block;
}
Let’s see an example of CSS display block −
Li... | [
{
"code": null,
"e": 1256,
"s": 1062,
"text": "The CSS Display property with value block renders an element with parent’s full width available, it also forces a line break. An element with display as block renders as a <div> or <p> element."
},
{
"code": null,
"e": 1303,
"s": 1256,
... |
How to map keys to values for an individual field in a MySQL select query? | You can use CASE statement in MySQL to map keys to values for an individual field in select query. The syntax is as follows −
SELECT yourColumnName1,yourColumnName2,yourColumnName3,.........N
(
CASE WHEN yourColumnName = 1 THEN 'ENABLED'
ELSE 'DISABLED'
END
) AS anyVariableName
FROM yourTableName;
You can use ... | [
{
"code": null,
"e": 1188,
"s": 1062,
"text": "You can use CASE statement in MySQL to map keys to values for an individual field in select query. The syntax is as follows −"
},
{
"code": null,
"e": 1370,
"s": 1188,
"text": "SELECT yourColumnName1,yourColumnName2,yourColumnName3,.... |
Why the t.test returns a smallest p-value of 2.2e – 16 in R? | When we perform a t test in R and the difference between two groups is very large then the p-value of the test is printed as 2.2e – 16 which is a printing behaviour of R for hypothesis testing procedures. The actual p-value can be extracted by using the t test function as t.test(“Var1”,”Var2”,var.equal=FALSE)$p.value. ... | [
{
"code": null,
"e": 1438,
"s": 1062,
"text": "When we perform a t test in R and the difference between two groups is very large then the p-value of the test is printed as 2.2e – 16 which is a printing behaviour of R for hypothesis testing procedures. The actual p-value can be extracted by using the... |
std::fixed, std::scientific, std::hexfloat, std::defaultfloat in C++ | 06 Jul, 2017
Formatting in the standard C++ libraries is done through the use of manipulators, special variables or objects that are placed on the output stream. There are two types of floating point manipulators namely, fixed floating point and scientific floating point. These all are defined in header <iostream>.
std... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n06 Jul, 2017"
},
{
"code": null,
"e": 356,
"s": 52,
"text": "Formatting in the standard C++ libraries is done through the use of manipulators, special variables or objects that are placed on the output stream. There are two types of fl... |
SQL - WHERE Clause | The SQL WHERE clause is used to specify a condition while fetching the data from a single table or by joining with multiple tables. If the given condition is satisfied, then only it returns a specific value from the table. You should use the WHERE clause to filter the records and fetching only the necessary records.
Th... | [
{
"code": null,
"e": 2905,
"s": 2587,
"text": "The SQL WHERE clause is used to specify a condition while fetching the data from a single table or by joining with multiple tables. If the given condition is satisfied, then only it returns a specific value from the table. You should use the WHERE claus... |
How to dynamically update SCSS variables using ReactJS? | 22 Feb, 2021
We can dynamically update SCSS variables using ReactJS with the help of a project by achieving theme switching of the card component between light and dark theme.
Prerequisite:
Basic knowledge of npm & create-react-app command.
Basic knowledge of HTML/CSS.
Basic Knowledge of react components & ES6.
Basic ... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n22 Feb, 2021"
},
{
"code": null,
"e": 192,
"s": 28,
"text": "We can dynamically update SCSS variables using ReactJS with the help of a project by achieving theme switching of the card component between light and dark theme. "
},
{
... |
Suffix Tree Application 4 – Build Linear Time Suffix Array | 25 Feb, 2022
Given a string, build it’s Suffix Array We have already discussed following two ways of building suffix array:
Naive O(n2Logn) algorithm
Enhanced O(nLogn) algorithm
Please go through these to have the basic understanding. Here we will see how to build suffix array in linear time using suffix tree.As a pr... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n25 Feb, 2022"
},
{
"code": null,
"e": 165,
"s": 52,
"text": "Given a string, build it’s Suffix Array We have already discussed following two ways of building suffix array: "
},
{
"code": null,
"e": 191,
"s": 165,
"... |
Recover password of password protected zip file | 01 Jun, 2022
In this article, we will get to know about how to get the password of a zip file. I’m using Linux I went with a quick search and came across fcrackzip. This is a free program that allows for both dictionary and brute force cracking of zip file passwords. It is not difficult to use and offers a wide range o... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n01 Jun, 2022"
},
{
"code": null,
"e": 551,
"s": 52,
"text": "In this article, we will get to know about how to get the password of a zip file. I’m using Linux I went with a quick search and came across fcrackzip. This is a free program... |
Lex program to check whether given string is Palindrome or Not | 01 May, 2019
Problem: Write a Lex program to check whether given string is Palindrome or Not.
Explanation:Lex is a computer program that generates lexical analyzers and was written by Mike Lesk and Eric Schmidt. Lex reads an input stream specifying the lexical analyzer and outputs source code implementing the lexer in ... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n01 May, 2019"
},
{
"code": null,
"e": 109,
"s": 28,
"text": "Problem: Write a Lex program to check whether given string is Palindrome or Not."
},
{
"code": null,
"e": 363,
"s": 109,
"text": "Explanation:Lex is a comp... |
Perl | Data Types | 22 Jun, 2022
Data types specify the type of data that a valid Perl variable can hold. Perl is a loosely typed language. There is no need to specify a type for the data while using in the Perl program. The Perl interpreter will choose the type based on the context of the data itself.
There are 3 data types in Perl as f... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n22 Jun, 2022"
},
{
"code": null,
"e": 324,
"s": 52,
"text": "Data types specify the type of data that a valid Perl variable can hold. Perl is a loosely typed language. There is no need to specify a type for the data while using in the ... |
Graph implementation using STL for competitive programming | Set 1 (DFS of Unweighted and Undirected) | 06 Jul, 2022
We have introduced Graph basics in Graph and its representations.
In this post, a different STL-based representation is used that can be helpful to quickly implement graphs using vectors. The implementation is for the adjacency list representation of the graph.
Following is an example undirected and unwe... | [
{
"code": null,
"e": 54,
"s": 26,
"text": "\n06 Jul, 2022"
},
{
"code": null,
"e": 121,
"s": 54,
"text": "We have introduced Graph basics in Graph and its representations. "
},
{
"code": null,
"e": 318,
"s": 121,
"text": "In this post, a different STL-based re... |
Defining DataFrame Schema with StructField and StructType | 17 Jun, 2021
In this article, we will learn how to define DataFrame Schema with StructField and StructType.
The StructType and StructFields are used to define a schema or its part for the Dataframe. This defines the name, datatype, and nullable flag for each column.
StructType object is the collection of StructFields ... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n17 Jun, 2021"
},
{
"code": null,
"e": 124,
"s": 28,
"text": "In this article, we will learn how to define DataFrame Schema with StructField and StructType. "
},
{
"code": null,
"e": 283,
"s": 124,
"text": "The Struct... |
Python OpenCV: Optical Flow with Lucas-Kanade method | 09 Mar, 2020
Prerequisites: OpenCV
OpenCV is a huge open-source library for computer vision, machine learning, and image processing. OpenCV supports a wide variety of programming languages like Python, C++, Java, etc. It can process images and videos to identify objects, faces, or even the handwriting of a human. When ... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n09 Mar, 2020"
},
{
"code": null,
"e": 50,
"s": 28,
"text": "Prerequisites: OpenCV"
},
{
"code": null,
"e": 578,
"s": 50,
"text": "OpenCV is a huge open-source library for computer vision, machine learning, and image ... |
Autoboxing and Unboxing in Java | 20 Apr, 2022
In Java, primitive data types are treated differently so do there comes the introduction of wrapper classes where two components play a role namely Autoboxing and Unboxing. Autoboxing refers to the conversion of a primitive value into an object of the corresponding wrapper class is called autoboxing. For e... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n20 Apr, 2022"
},
{
"code": null,
"e": 465,
"s": 52,
"text": "In Java, primitive data types are treated differently so do there comes the introduction of wrapper classes where two components play a role namely Autoboxing and Unboxing. A... |
reflect.Indirect() Function in Golang with Examples | 28 Apr, 2020
Go language provides inbuilt support implementation of run-time reflection and allowing a program to manipulate objects with arbitrary types with the help of reflect package. The reflect.Indirect() Function in Golang is used to get the value that v points to, i.e., If v is a nil pointer, Indirect returns a... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n28 Apr, 2020"
},
{
"code": null,
"e": 473,
"s": 28,
"text": "Go language provides inbuilt support implementation of run-time reflection and allowing a program to manipulate objects with arbitrary types with the help of reflect package. ... |
Excel Dynamic Chart Linked with a Drop-down List | 27 Dec, 2021
Dynamic Chart using drop-down list is very helpful when we deal with tons of grouped data and perform comparative analysis. For example, an E-commerce site sells different types of products. They can create a drop-down list for every product and in the chart, they can see the sales details in the last ten ... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n27 Dec, 2021"
},
{
"code": null,
"e": 367,
"s": 52,
"text": "Dynamic Chart using drop-down list is very helpful when we deal with tons of grouped data and perform comparative analysis. For example, an E-commerce site sells different ty... |
TreeMap entrySet() Method in Java | 09 Jul, 2018
The java.util.TreeMap.entrySet() method in Java is used to create a set out of the same elements contained in the treemap. It basically returns a set view of the treemap or we can create a new set and store the map elements into them.
Syntax:
tree_map.entrySet()
Parameters: The method does not take any par... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n09 Jul, 2018"
},
{
"code": null,
"e": 263,
"s": 28,
"text": "The java.util.TreeMap.entrySet() method in Java is used to create a set out of the same elements contained in the treemap. It basically returns a set view of the treemap or we... |
Docker – WORKDIR Instruction | 28 Oct, 2020
WORKDIR instruction is used to set the working directory for all the subsequent Dockerfile instructions. Some frequently used instructions in a Dockerfile are RUN, ADD, CMD, ENTRYPOINT, and COPY. If the WORKDIR is not manually created, it gets created automatically during the processing of the instruction... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n28 Oct, 2020"
},
{
"code": null,
"e": 414,
"s": 28,
"text": "WORKDIR instruction is used to set the working directory for all the subsequent Dockerfile instructions. Some frequently used instructions in a Dockerfile are RUN, ADD, CMD, ... |
How to pass express errors message to Angular view ? | 19 Jul, 2021
There are mainly two parts of a web application, one is front-end and another is the backend. We will start with the backend first. The express catches all errors that occur while running route handlers and middleware. We have to just send them properly to the frontend for user knowledge.
Express catches a... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n19 Jul, 2021"
},
{
"code": null,
"e": 318,
"s": 28,
"text": "There are mainly two parts of a web application, one is front-end and another is the backend. We will start with the backend first. The express catches all errors that occur w... |
Find ceil of a/b without using ceil() function | 14 Jun, 2022
Given a and b, find the ceiling value of a/b without using ceiling function. Examples:
Input : a = 5, b = 4
Output : 2
Explanation: a/b = ceil(5/4) = 2
Input : a = 10, b = 2
Output : 5
Explanation: a/b = ceil(10/2) = 5
The problem can be solved using ceiling function, but the ceiling function doe... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n14 Jun, 2022"
},
{
"code": null,
"e": 141,
"s": 52,
"text": "Given a and b, find the ceiling value of a/b without using ceiling function. Examples: "
},
{
"code": null,
"e": 279,
"s": 141,
"text": "Input : a = 5, b... |
Kotlin Visibility Modifiers | 28 Apr, 2022
In Kotlin, visibility modifiers are used to restrict the accessibility of classes, objects, interfaces, constructors, functions, properties, and their setters to a certain level. No need to set the visibility of getters because they have the same visibility as the property.There are four visibility modifie... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n28 Apr, 2022"
},
{
"code": null,
"e": 350,
"s": 28,
"text": "In Kotlin, visibility modifiers are used to restrict the accessibility of classes, objects, interfaces, constructors, functions, properties, and their setters to a certain lev... |
Types of inheritance Python | 07 Jul, 2022
Inheritance is defined as the mechanism of inheriting the properties of the base class to the child class. Here we a going to see the types of inheritance in Python.
Types of Inheritance depend upon the number of child and parent classes involved. There are four types of inheritance in Python:
Single inh... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n07 Jul, 2022"
},
{
"code": null,
"e": 218,
"s": 52,
"text": "Inheritance is defined as the mechanism of inheriting the properties of the base class to the child class. Here we a going to see the types of inheritance in Python."
},
... |
Survival analysis in clinical trials — Log-rank test | by Tereza Burgetova | Towards Data Science | In Part 1 of the series, I explained the reasoning behind the Kaplan-Meier estimator of the survival curve. While it is a ubiquitous tool for visualizing the results of a clinical trial that involves a time-to-event analysis, it is only descriptive. To be able to draw conclusions and show the benefits of a new treatmen... | [
{
"code": null,
"e": 572,
"s": 172,
"text": "In Part 1 of the series, I explained the reasoning behind the Kaplan-Meier estimator of the survival curve. While it is a ubiquitous tool for visualizing the results of a clinical trial that involves a time-to-event analysis, it is only descriptive. To be... |
Java Program to get duration between two time instants | Create two time instants:
Instant time1 = Instant.now();
Instant time2 = Instant.now().plusSeconds(50);
Use between() to get the duration between two time instants:
long resMilli = Duration.between(time1, time2).toMillis();
import java.time.Duration;
import java.time.Instant;
public class Demo {
public static void m... | [
{
"code": null,
"e": 1088,
"s": 1062,
"text": "Create two time instants:"
},
{
"code": null,
"e": 1166,
"s": 1088,
"text": "Instant time1 = Instant.now();\nInstant time2 = Instant.now().plusSeconds(50);"
},
{
"code": null,
"e": 1227,
"s": 1166,
"text": "Use be... |
How do I get the current AUTO_INCREMENT value for a table in MySQL? | To know the current auto_increment value, we can use the last_insert_id() function. Firstly, we will create a table with the help of INSERT command.
Creating a table −
mysql> CREATE table AutoIncrement
-> (
-> IdAuto int auto_increment,
-> primary key(IdAuto)
-> );
Query OK, 0 rows affected (0.59 sec)
After creating a ... | [
{
"code": null,
"e": 1211,
"s": 1062,
"text": "To know the current auto_increment value, we can use the last_insert_id() function. Firstly, we will create a table with the help of INSERT command."
},
{
"code": null,
"e": 1230,
"s": 1211,
"text": "Creating a table −"
},
{
... |
How to write a switch statement in a JSP page? | Following is the example of using a switch statement within a JSP page.
Live Demo
<%! int day = 3; %>
<html>
<head>
<title>SWITCH...CASE Example</title>
</head>
<body>
<%
switch(day) {
case 0:
out.println("It\'s Sunday.");
break;
case ... | [
{
"code": null,
"e": 1134,
"s": 1062,
"text": "Following is the example of using a switch statement within a JSP page."
},
{
"code": null,
"e": 1145,
"s": 1134,
"text": " Live Demo"
},
{
"code": null,
"e": 1912,
"s": 1145,
"text": "<%! int day = 3; %>\n<html>\... |
Add a row at top in pandas DataFrame - GeeksforGeeks | 29 Jul, 2021
Pandas DataFrame is two-dimensional size-mutable, potentially heterogeneous tabular data structure with labeled axes (rows and columns). Let’s see how can we can add a row at top in pandas DataFrame.Observe this dataset first.
Python3
# importing pandas moduleimport pandas as pd # making data framedf = ... | [
{
"code": null,
"e": 24212,
"s": 24184,
"text": "\n29 Jul, 2021"
},
{
"code": null,
"e": 24440,
"s": 24212,
"text": "Pandas DataFrame is two-dimensional size-mutable, potentially heterogeneous tabular data structure with labeled axes (rows and columns). Let’s see how can we can a... |
PHP | md5(), sha1(), hash() Functions - GeeksforGeeks | 08 Mar, 2018
PHP is a server-side scripting language which implies that PHP is responsible for all the back-end functionalities required by the website. The authentication system is one of the most important parts of a website and it is one of the most commonplace where developers commit mistakes leaving out vulnerabil... | [
{
"code": null,
"e": 26327,
"s": 26299,
"text": "\n08 Mar, 2018"
},
{
"code": null,
"e": 26863,
"s": 26327,
"text": "PHP is a server-side scripting language which implies that PHP is responsible for all the back-end functionalities required by the website. The authentication syst... |
BooleanField - Django Forms - GeeksforGeeks | 13 Feb, 2020
BooleanField in Django Forms is a checkbox field which stores either True or False. It is used for taking boolean inputs from the user. The default widget for this input is CheckboxInput. It normalizes to: A Python True or False value.
Syntax
field_name = forms.BooleanField(**options)
Illustration of Boole... | [
{
"code": null,
"e": 25421,
"s": 25393,
"text": "\n13 Feb, 2020"
},
{
"code": null,
"e": 25657,
"s": 25421,
"text": "BooleanField in Django Forms is a checkbox field which stores either True or False. It is used for taking boolean inputs from the user. The default widget for this... |
C Quiz - 108 - GeeksforGeeks | 31 May, 2021
#include <stdio.h>
void wrt_it (void);
int main (void)
{
printf("Enter Text");
printf ("n");
wrt_ it();
printf ("n");
return 0;
}
void wrt_it (void)
{
int c;
if (?1)
wrt_it();
?2
}
Writing code in comment? Please use ide.geeksforgeeks.org, generate link and share t... | [
{
"code": null,
"e": 28855,
"s": 28827,
"text": "\n31 May, 2021"
},
{
"code": null,
"e": 29078,
"s": 28855,
"text": "#include <stdio.h>\nvoid wrt_it (void);\nint main (void)\n{\n printf(\"Enter Text\"); \n printf (\"n\");\n wrt_ it();\n printf (\"n\");\n return 0;\... |
Introduction to Linear Bounded Automata (LBA) - GeeksforGeeks | 02 Mar, 2021
History :In 1960, associate degree automaton model was introduced by Myhill and these days this automation model is understood as deterministic linear bounded automaton. After this, another scientist named Landweber worked on this and proposed that the languages accepted by a deterministic LBA are continua... | [
{
"code": null,
"e": 26129,
"s": 26101,
"text": "\n02 Mar, 2021"
},
{
"code": null,
"e": 26469,
"s": 26129,
"text": "History :In 1960, associate degree automaton model was introduced by Myhill and these days this automation model is understood as deterministic linear bounded auto... |
Check for BST | Practice | GeeksforGeeks | Given the root of a binary tree. Check whether it is a BST or not.
Note: We are considering that BSTs can not contain duplicate Nodes.
A BST is defined as follows:
The left subtree of a node contains only nodes with keys less than the node's key.
The right subtree of a node contains only nodes with keys greater than... | [
{
"code": null,
"e": 402,
"s": 238,
"text": "Given the root of a binary tree. Check whether it is a BST or not.\nNote: We are considering that BSTs can not contain duplicate Nodes.\nA BST is defined as follows:"
},
{
"code": null,
"e": 487,
"s": 402,
"text": "\nThe left subtree o... |
Taking Input from User in R Programming - GeeksforGeeks | 07 Jul, 2021
Developers often have a need to interact with users, either to get data or to provide some sort of result. Most programs today use a dialog box as a way of asking the user to provide some type of input. Like other programming languages in R it’s also possible to take input from the user. For doing so, ther... | [
{
"code": null,
"e": 30289,
"s": 30261,
"text": "\n07 Jul, 2021"
},
{
"code": null,
"e": 30622,
"s": 30289,
"text": "Developers often have a need to interact with users, either to get data or to provide some sort of result. Most programs today use a dialog box as a way of asking ... |
PHP echo and print - GeeksforGeeks | 06 Dec, 2021
In this article, we will see what is echo & print statements in PHP, along with understanding their basic implementation through the examples. The echo is used to display the output of parameters that are passed to it. It displays the outputs of one or more strings separated by commas. The print accepts on... | [
{
"code": null,
"e": 42163,
"s": 42135,
"text": "\n06 Dec, 2021"
},
{
"code": null,
"e": 42575,
"s": 42163,
"text": "In this article, we will see what is echo & print statements in PHP, along with understanding their basic implementation through the examples. The echo is used to ... |
Flutter - Rotate Transition - GeeksforGeeks | 21 Jan, 2022
In Flutter, the page_transition package is used to create beautiful page transitions. It provides a wide range of effects that can be used from moving from one route to another. It is very convenient to use. In this article, we will explore the same by building a simple application.
To build a simple appli... | [
{
"code": null,
"e": 25261,
"s": 25233,
"text": "\n21 Jan, 2022"
},
{
"code": null,
"e": 25545,
"s": 25261,
"text": "In Flutter, the page_transition package is used to create beautiful page transitions. It provides a wide range of effects that can be used from moving from one rou... |
Program to find the Sum of each Row and each Column of a Matrix - GeeksforGeeks | 13 May, 2021
Given a matrix of order m×n, the task is to find out the sum of each row and each column of a matrix.
Examples:
Input: array[4][4] = { {1, 1, 1, 1},
{2, 2, 2, 2},
{3, 3, 3, 3},
{4, 4, 4, 4}};
Output: Sum of the 0 row is = 4
Su... | [
{
"code": null,
"e": 26492,
"s": 26464,
"text": "\n13 May, 2021"
},
{
"code": null,
"e": 26594,
"s": 26492,
"text": "Given a matrix of order m×n, the task is to find out the sum of each row and each column of a matrix."
},
{
"code": null,
"e": 26605,
"s": 26594,
... |
How to convert a Stream into a Map in Java - GeeksforGeeks | 21 Jun, 2020
Introduced in Java 8, the Stream API is used to process collections of objects. A stream is a sequence of objects that supports various methods which can be pipelined to produce the desired result.
In this article, the methods to convert a stream into a map is discussed.
Method 1: Using Collectors.toMap() ... | [
{
"code": null,
"e": 25497,
"s": 25469,
"text": "\n21 Jun, 2020"
},
{
"code": null,
"e": 25695,
"s": 25497,
"text": "Introduced in Java 8, the Stream API is used to process collections of objects. A stream is a sequence of objects that supports various methods which can be pipeli... |
PyQt5 - How to set the maximum value of progress bar ? - GeeksforGeeks | 22 Apr, 2020
In this article we will see how to set the maximum value of progress bar. By default the maximum value of progress bar is 100, but we can change it to our need. In order to do this we will use setMaximum method, this will change the maximum value of progress bar.
Note : When we will set the value to progre... | [
{
"code": null,
"e": 25951,
"s": 25923,
"text": "\n22 Apr, 2020"
},
{
"code": null,
"e": 26215,
"s": 25951,
"text": "In this article we will see how to set the maximum value of progress bar. By default the maximum value of progress bar is 100, but we can change it to our need. In... |
How to parse a CSV File in PHP ? - GeeksforGeeks | 21 May, 2021
In this article, we learn to parse a CSV file using PHP code.
Approach:
Step 1. Add data to an excel file. The following example is given for a sample data having Name and Coding Score as their column headers.
Step 2. Convert to CSV file by following the path. Go to File>Export>Change File Type> CSV Type. ... | [
{
"code": null,
"e": 32677,
"s": 32649,
"text": "\n21 May, 2021"
},
{
"code": null,
"e": 32739,
"s": 32677,
"text": "In this article, we learn to parse a CSV file using PHP code."
},
{
"code": null,
"e": 32749,
"s": 32739,
"text": "Approach:"
},
{
"cod... |
Draw moving object using Turtle in Python - GeeksforGeeks | 13 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. To move turtle, there are some functions i.e forward(), backward(), etc.
Following steps are used:
Import Turtle package.
Set screen with dime... | [
{
"code": null,
"e": 25777,
"s": 25749,
"text": "\n13 Oct, 2020"
},
{
"code": null,
"e": 26015,
"s": 25777,
"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... |
Modify Linked List by replacing each node by nearest multiple of K - GeeksforGeeks | 08 Dec, 2021
Given a singly Linked List L consisting of N nodes and an integer K, the task is to modify the value of each node of the given Linked List to its nearest multiple of K, not exceeding the value of the node.
Examples:
Input: LL: 1 -> 2 -> 3 -> 5, K = 2 Output: 0 -> 2 -> 2 -> 4Explanation:The resultant LL has... | [
{
"code": null,
"e": 26179,
"s": 26151,
"text": "\n08 Dec, 2021"
},
{
"code": null,
"e": 26385,
"s": 26179,
"text": "Given a singly Linked List L consisting of N nodes and an integer K, the task is to modify the value of each node of the given Linked List to its nearest multiple ... |
How to get data of any size from the EEPROM with Arduino? | Arduino Uno has 1 kB of EEPROM storage. EEPROM is a type of non-volatile memory, i.e., its contents are preserved even after power-down. Therefore, it can be used to store data that you want to be unchanged across power cycles. Configurations or settings are examples of such data.
In this article, we will see how to ge... | [
{
"code": null,
"e": 1344,
"s": 1062,
"text": "Arduino Uno has 1 kB of EEPROM storage. EEPROM is a type of non-volatile memory, i.e., its contents are preserved even after power-down. Therefore, it can be used to store data that you want to be unchanged across power cycles. Configurations or setting... |
How to visualize high frequency financial data using Plotly and R | by Pedro Lealdino Filho | Towards Data Science | In this article I show how to use the Plotly package to visualize financial data in high frequency using R. To perform analysis and develop trading algorithms, it is necessary to obtain data in very high frequencies to be able to take quick and accurate actions to maximize the profits earned in the trades.
Today, more ... | [
{
"code": null,
"e": 480,
"s": 172,
"text": "In this article I show how to use the Plotly package to visualize financial data in high frequency using R. To perform analysis and develop trading algorithms, it is necessary to obtain data in very high frequencies to be able to take quick and accurate a... |
Order by last 3 chars in MySQL? | You can use ORDER BY RIGHT() function to order by last 3 chars in MySQL. The syntax is as follows −
SELECT *FROM yourTableName
ORDER BY RIGHT(yourColumnName,3) yourSortingOrder;
Just replace the ‘yourSortingOrder’ to ASC or DESC to set the ascending or descending order respectively.
To understand the above syntax, let ... | [
{
"code": null,
"e": 1162,
"s": 1062,
"text": "You can use ORDER BY RIGHT() function to order by last 3 chars in MySQL. The syntax is as follows −"
},
{
"code": null,
"e": 1240,
"s": 1162,
"text": "SELECT *FROM yourTableName\nORDER BY RIGHT(yourColumnName,3) yourSortingOrder;"
... |
Euphoria - Data Types | The data stored in memory can be of many types. For example, a person's age is stored as a numeric value and his or her address is stored as alphanumeric characters.
Euphoria has some standard types that are used to define the operations possible on them and the storage method for each of them.
Euphoria has following f... | [
{
"code": null,
"e": 2133,
"s": 1967,
"text": "The data stored in memory can be of many types. For example, a person's age is stored as a numeric value and his or her address is stored as alphanumeric characters."
},
{
"code": null,
"e": 2263,
"s": 2133,
"text": "Euphoria has som... |
Change Axis Labels of Boxplot in R - GeeksforGeeks | 06 Jun, 2021
A box graph is a chart that is used to display information in the form of distribution by drawing boxplots for each of them. Boxplots help us to visualize the distribution of the data by quartile and detect the presence of outliers. Adding axis labels for Boxplot will help the readability of the boxplot.
I... | [
{
"code": null,
"e": 24877,
"s": 24849,
"text": "\n06 Jun, 2021"
},
{
"code": null,
"e": 25183,
"s": 24877,
"text": "A box graph is a chart that is used to display information in the form of distribution by drawing boxplots for each of them. Boxplots help us to visualize the dist... |
Python - Move() function in wxPython - GeeksforGeeks | 10 May, 2020
In this particular article we will learn, how can we move our window to a particular point. This can be achieved using Move() function in wx.Window class of wxPython.Move() takes x and y points to move window to a particularx, y point.
Syntax :
wx.Move(self, x, y, flags=SIZE_USE_EXISTING)
Parameters :
Cod... | [
{
"code": null,
"e": 24212,
"s": 24184,
"text": "\n10 May, 2020"
},
{
"code": null,
"e": 24448,
"s": 24212,
"text": "In this particular article we will learn, how can we move our window to a particular point. This can be achieved using Move() function in wx.Window class of wxPyth... |
Python - Extract Dictionary values list to List - GeeksforGeeks | 22 Apr, 2020
Sometimes, while working with dictionary records, we can have problems in which we need to extract all the dictionary values into a single separate list. This can have possible application in data domains and web-development. Lets discuss certain ways in which this task can be performed.
Method #1 : Using ... | [
{
"code": null,
"e": 26119,
"s": 26091,
"text": "\n22 Apr, 2020"
},
{
"code": null,
"e": 26408,
"s": 26119,
"text": "Sometimes, while working with dictionary records, we can have problems in which we need to extract all the dictionary values into a single separate list. This can ... |
Python - Create a Dictionary with Key as First Character and Value as Words Starting with that Character - GeeksforGeeks | 26 Nov, 2020
In this article, we will code a python program to create a dictionary with the key as the first character and value as words starting with that character.
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 a sin... | [
{
"code": null,
"e": 25537,
"s": 25509,
"text": "\n26 Nov, 2020"
},
{
"code": null,
"e": 25692,
"s": 25537,
"text": "In this article, we will code a python program to create a dictionary with the key as the first character and value as words starting with that character."
},
... |
Python - All possible pairs in List - GeeksforGeeks | 03 Jul, 2020
Sometimes, while working with Python list, we can have a problem in which we need to extract all the possible pairs that can be performed from integers from list. This kind of problem can occur in many domains such as day-day programming and web development. Let’s discuss certain ways in which this task ca... | [
{
"code": null,
"e": 25555,
"s": 25527,
"text": "\n03 Jul, 2020"
},
{
"code": null,
"e": 25878,
"s": 25555,
"text": "Sometimes, while working with Python list, we can have a problem in which we need to extract all the possible pairs that can be performed from integers from list. ... |
LEX program to print the longest string and to find average of given numbers - GeeksforGeeks | 03 Aug, 2021
Lex :The Lex program has purpose of generating lexical analyzer. Lex analyzers are a program that transform input streams into sequence of tokens. A C program implements the lexical analyzer to read input stream and produce output as the source code.
Commands to be used –
lex file_name.l // To produce a... | [
{
"code": null,
"e": 26105,
"s": 26077,
"text": "\n03 Aug, 2021"
},
{
"code": null,
"e": 26356,
"s": 26105,
"text": "Lex :The Lex program has purpose of generating lexical analyzer. Lex analyzers are a program that transform input streams into sequence of tokens. A C program impl... |
Network Security - GeeksforGeeks | 22 Oct, 2021
Network Security refers to the measures taken by any enterprise or organisation to secure its computer network and data using both hardware and software systems. This aims at securing the confidentiality and accessibility of the data and network. Every company or organisation that handles large amount of d... | [
{
"code": null,
"e": 25583,
"s": 25555,
"text": "\n22 Oct, 2021"
},
{
"code": null,
"e": 25950,
"s": 25583,
"text": "Network Security refers to the measures taken by any enterprise or organisation to secure its computer network and data using both hardware and software systems. T... |
How to get a variable name as a string in PHP? - GeeksforGeeks | 15 May, 2019
Use variable name as a string to get the variable name. There are many ways to solve this problem some of them are discussed below:
Method 1: Using $GLOBALS: It is used to reference all variables available in global scope. It is an associative array which contains the reference of all variables which are c... | [
{
"code": null,
"e": 26137,
"s": 26109,
"text": "\n15 May, 2019"
},
{
"code": null,
"e": 26269,
"s": 26137,
"text": "Use variable name as a string to get the variable name. There are many ways to solve this problem some of them are discussed below:"
},
{
"code": null,
... |
Haversine formula to find distance between two points on a sphere - GeeksforGeeks | 12 May, 2021
The Haversine formula calculates the shortest distance between two points on a sphere using their latitudes and longitudes measured along the surface. It is important for use in navigation. The haversine can be expressed in trigonometric function as: The haversine of the central angle (which is d/r) is cal... | [
{
"code": null,
"e": 26352,
"s": 26324,
"text": "\n12 May, 2021"
},
{
"code": null,
"e": 26955,
"s": 26352,
"text": "The Haversine formula calculates the shortest distance between two points on a sphere using their latitudes and longitudes measured along the surface. It is import... |
C# | ListBox Class - GeeksforGeeks | 05 Sep, 2019
In Windows Forms, ListBox control is used to show multiple elements in a list, from which a user can select one or more elements and the elements are generally displayed in multiple columns. The ListBox class is used to represent the windows list box and also provide different types of properties, methods,... | [
{
"code": null,
"e": 25331,
"s": 25303,
"text": "\n05 Sep, 2019"
},
{
"code": null,
"e": 25780,
"s": 25331,
"text": "In Windows Forms, ListBox control is used to show multiple elements in a list, from which a user can select one or more elements and the elements are generally dis... |
C# | How to change the CursorSize of the Console - GeeksforGeeks | 28 Jan, 2019
Given the normal Console in C#, the task is to change the CursorSize of the Console.
Approach: This can be done using the CursorSize property in the Console class of the System package in C#. It gets or sets the height of the cursor within a character cell in percentage.
Program 1: Getting the value of Cur... | [
{
"code": null,
"e": 26319,
"s": 26291,
"text": "\n28 Jan, 2019"
},
{
"code": null,
"e": 26404,
"s": 26319,
"text": "Given the normal Console in C#, the task is to change the CursorSize of the Console."
},
{
"code": null,
"e": 26591,
"s": 26404,
"text": "Appro... |
JavaTuples getValue() method - GeeksforGeeks | 27 Aug, 2018
The getValue() method in org.javatuples is used to fetch the value of the TupleClassObject from the index passed as the parameter. This method can be used to any tuple class object of javatuples library. It returns a Object value which is the element present at the index, passed as parameter, of the TupleC... | [
{
"code": null,
"e": 25559,
"s": 25531,
"text": "\n27 Aug, 2018"
},
{
"code": null,
"e": 25968,
"s": 25559,
"text": "The getValue() method in org.javatuples is used to fetch the value of the TupleClassObject from the index passed as the parameter. This method can be used to any t... |
Summation of GCD of all the pairs up to N - GeeksforGeeks | 27 Dec, 2018
Given a number N, find sum of all GCDs that can be formed by selecting all the pairs from 1 to N.Examples:
Input : 4
Output : 7
Explanation:
Numbers from 1 to 4 are: 1, 2, 3, 4
Result = gcd(1,2) + gcd(1,3) + gcd(1,4) +
gcd(2,3) + gcd(2,4) + gcd(3,4)
= 1 + 1 + 1 + 1 + 2 + 1
= 7
In... | [
{
"code": null,
"e": 25907,
"s": 25879,
"text": "\n27 Dec, 2018"
},
{
"code": null,
"e": 26014,
"s": 25907,
"text": "Given a number N, find sum of all GCDs that can be formed by selecting all the pairs from 1 to N.Examples:"
},
{
"code": null,
"e": 26284,
"s": 260... |
How to write multi-line strings in template literals ? - GeeksforGeeks | 03 Dec, 2021
Template literals are introduced in ES6 and by this, we use strings in a modern way. Normally for defining string, we use double/single quotes ( ” ” or ‘ ‘ ) in JavaScript. But in template literals, we use backtick ( ` ` ).
Let us see how to write multiline strings in template literals.
Example 1: We write... | [
{
"code": null,
"e": 26569,
"s": 26541,
"text": "\n03 Dec, 2021"
},
{
"code": null,
"e": 26793,
"s": 26569,
"text": "Template literals are introduced in ES6 and by this, we use strings in a modern way. Normally for defining string, we use double/single quotes ( ” ” or ‘ ‘ ) in Ja... |
Python - tensorflow.math.sqrt() - GeeksforGeeks | 16 Jun, 2020
TensorFlow is open-source Python library designed by Google to develop Machine Learning models and deep learning neural networks.
sqrt() is used to compute element wise square root.
Syntax: tensorflow.math.sqrt(x, name)
Parameters:
x: It’s a tensor. Allowed dtypes are bfloat16, half, float32, float64, com... | [
{
"code": null,
"e": 25537,
"s": 25509,
"text": "\n16 Jun, 2020"
},
{
"code": null,
"e": 25668,
"s": 25537,
"text": "TensorFlow is open-source Python library designed by Google to develop Machine Learning models and deep learning neural networks."
},
{
"code": null,
... |
How to Extract time from timestamp in R ? - GeeksforGeeks | 21 Apr, 2021
In this article, we are going to see how to extract time from timestamp in the R Programming language.
Method 1: Using POSIXct class in R
We can store a date variable in the form of a string variable, and then convert it to a general format timestamp. POSIXct method can be used which converts a date-time ... | [
{
"code": null,
"e": 26487,
"s": 26459,
"text": "\n21 Apr, 2021"
},
{
"code": null,
"e": 26591,
"s": 26487,
"text": "In this article, we are going to see how to extract time from timestamp in the R Programming language. "
},
{
"code": null,
"e": 26626,
"s": 26591,... |
Find Corners of Rectangle using mid points - GeeksforGeeks | 11 Mar, 2022
Consider a rectangle ABCD, we’re given the co-ordinates of the mid points of side AD and BC (p and q respectively) along with their length L (AD = BC = L). Now given the parameters, we need to print the co-ordinates of the 4 points A, B, C and D.
Examples:
Input : p = (1, 0)
q = (1, 2)
L ... | [
{
"code": null,
"e": 26507,
"s": 26479,
"text": "\n11 Mar, 2022"
},
{
"code": null,
"e": 26755,
"s": 26507,
"text": "Consider a rectangle ABCD, we’re given the co-ordinates of the mid points of side AD and BC (p and q respectively) along with their length L (AD = BC = L). Now giv... |
Java Program to Find the Largest of three Numbers - GeeksforGeeks | 23 Aug, 2021
Problem Statement: Given three numbers x, y, and z of which aim is to get the largest among these three numbers.
Example:
Input: x = 7, y = 20, z = 56
Output: 56 // value stored in variable z
Flowchart For Largest of 3 numbers:
Algorithm to find the largest of three numbers:
1. Start
2.... | [
{
"code": null,
"e": 25249,
"s": 25221,
"text": "\n23 Aug, 2021"
},
{
"code": null,
"e": 25362,
"s": 25249,
"text": "Problem Statement: Given three numbers x, y, and z of which aim is to get the largest among these three numbers."
},
{
"code": null,
"e": 25372,
"s... |
Median of sliding window in an array | Set 2 - GeeksforGeeks | 07 Jul, 2021
Prerequisites: Policy based data structure, Sliding window technique.Given an array of integer arr[] and an integer K, the task is to find the median of each window of size K starting from the left and moving towards the right by one position each time.Examples:
Input: arr[] = {-1, 5, 13, 8, 2, 3, 3, 1},... | [
{
"code": null,
"e": 26167,
"s": 26139,
"text": "\n07 Jul, 2021"
},
{
"code": null,
"e": 26432,
"s": 26167,
"text": "Prerequisites: Policy based data structure, Sliding window technique.Given an array of integer arr[] and an integer K, the task is to find the median of each windo... |
Output of Java Program | Set 6 - GeeksforGeeks | 27 Dec, 2016
Difficulty level : Intermediate
Predict the output of following Java Programs.
Program 1:
class First{ public First() { System.out.println("a"); }} class Second extends First{ public Second() { System.out.println("b"); }} class Third extends Second{ public Third() { System.out.println("c... | [
{
"code": null,
"e": 25695,
"s": 25667,
"text": "\n27 Dec, 2016"
},
{
"code": null,
"e": 25727,
"s": 25695,
"text": "Difficulty level : Intermediate"
},
{
"code": null,
"e": 25774,
"s": 25727,
"text": "Predict the output of following Java Programs."
},
{
... |
list splice() function in C++ STL | 14 Jun, 2022
The list::splice() is a built-in function in C++ STL which is used to transfer elements from one list to another. The splice() function can be used in three ways:
Transfer all the elements of list x into another list at some position.Transfer only the element pointed by i from list x into the list at som... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n14 Jun, 2022"
},
{
"code": null,
"e": 217,
"s": 52,
"text": "The list::splice() is a built-in function in C++ STL which is used to transfer elements from one list to another. The splice() function can be used in three ways: "
},
{... |
numpy.angle() in Python | 28 Nov, 2018
numpy.angle() function is used when we want to compute the angle of the complex argument. A complex number is represented by “ x + yi ” where x and y are real number and i= (-1)^1/2. The angle is calculated by the formula tan-1(x/y).
Syntax : numpy.angle(z, deg=0)
Parameters :z : [array_like] A complex num... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n28 Nov, 2018"
},
{
"code": null,
"e": 262,
"s": 28,
"text": "numpy.angle() function is used when we want to compute the angle of the complex argument. A complex number is represented by “ x + yi ” where x and y are real number and i= (-... |
Difference between COMP and COMP3 | 27 Sep, 2021
Internally the computer stores the data in more than one form. The Cobol language facilitates the programmer to specify the internal representation of the data according to the need. There are two internal forms available in the Cobol:
DISPLAY –It is the default internal representation of the data. Any ty... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n27 Sep, 2021"
},
{
"code": null,
"e": 265,
"s": 28,
"text": "Internally the computer stores the data in more than one form. The Cobol language facilitates the programmer to specify the internal representation of the data according to t... |
Java Program to Write into a File | 12 Apr, 2022
In this article, we will see different ways of writing into a File using Java Programming language. Java FileWriter class in java is used to write character-oriented data to a file as this class is character-oriented class because of what it is used in file handling in java.
There are many ways to write i... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n12 Apr, 2022"
},
{
"code": null,
"e": 329,
"s": 52,
"text": "In this article, we will see different ways of writing into a File using Java Programming language. Java FileWriter class in java is used to write character-oriented data to ... |
How to use AutoCheck property of CheckBox in C#? | 30 Sep, 2021
The CheckBox control is the part of the windows form that is used to take input from the user. Or in other words, CheckBox control allows us to select single or multiple elements from the given list. You are allowed to set a value that determines the Checked or CheckedStates values and also the appearance ... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n30 Sep, 2021"
},
{
"code": null,
"e": 781,
"s": 28,
"text": "The CheckBox control is the part of the windows form that is used to take input from the user. Or in other words, CheckBox control allows us to select single or multiple eleme... |
numpy.mask_indices() function | Python | 22 Apr, 2020
numpy.mask_indices() function return the indices to access (n, n) arrays, given a masking function.
Syntax : numpy.mask_indices(n, mask_func, k = 0)Parameters :n : [int] The returned indices will be valid to access arrays of shape (n, n).mask_func : [callable] A function whose call signature is similar to ... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n22 Apr, 2020"
},
{
"code": null,
"e": 128,
"s": 28,
"text": "numpy.mask_indices() function return the indices to access (n, n) arrays, given a masking function."
},
{
"code": null,
"e": 552,
"s": 128,
"text": "Syntax... |
Python – Consecutive Pairs comma removal | 28 Jun, 2022
Sometimes, while working amongst lists, we can have a problem in which we need to pair up elements from two lists. In this, we can have pairs in which we find that there is comma that is printed in tuple and we wish to avoid it usually. Lets discuss certain ways in which this task can be performed. Method ... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n28 Jun, 2022"
},
{
"code": null,
"e": 567,
"s": 28,
"text": "Sometimes, while working amongst lists, we can have a problem in which we need to pair up elements from two lists. In this, we can have pairs in which we find that there is co... |
Python | Split list of strings into sublists based on length | 09 Mar, 2022
Given a list of strings, write a Python program to split the list into sublists based on string length.Examples:
Input : ['The', 'art', 'of', 'programming']
Output : [['of'], ['The', 'art'], ['programming']]
Input : ['Welcome', 'to', 'geeksforgeeks']
Output : [['to'], ['Welcome'], ['geeksforgeeks']]
App... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n09 Mar, 2022"
},
{
"code": null,
"e": 143,
"s": 28,
"text": "Given a list of strings, write a Python program to split the list into sublists based on string length.Examples: "
},
{
"code": null,
"e": 332,
"s": 143,
... |
How .js file executed on the browser ? | 29 Jul, 2021
In this article, we will learn how a .js file is executed on the browser by using following multiple approaches. Refer to Server side and Client side Programming, for in-depth knowledge about Javascript.
How is .js is executed by the browser?
Every Web browser comes with a JavaScript engine that provides a... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n29 Jul, 2021"
},
{
"code": null,
"e": 232,
"s": 28,
"text": "In this article, we will learn how a .js file is executed on the browser by using following multiple approaches. Refer to Server side and Client side Programming, for in-depth... |
Set to Array in Java | Difficulty Level :
Easy
Given a set (HashSet or TreeSet) of strings in Java, convert it into an array of strings.
Input : Set hash_Set = new HashSet();
hash_Set.add("Geeks");
hash_Set.add("For");
Output : String arr[] = {"Geeks", "for"}
Method 1 (Simple)We simply create an empty array. We traverse the ... | [
{
"code": null,
"e": 24,
"s": 0,
"text": "Difficulty Level :\nEasy"
},
{
"code": null,
"e": 114,
"s": 24,
"text": "Given a set (HashSet or TreeSet) of strings in Java, convert it into an array of strings."
},
{
"code": null,
"e": 254,
"s": 114,
"text": "Input ... |
React Native Configuring Header Bar | 14 Jul, 2021
To configure the header bar of a React Native application, the navigation options are used. The navigation options are a static property of the screen component which is either an object or a function.
Header Bar Props
headerTitle: It is used to set the title of the active screen.
headerStyle: It is used t... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n14 Jul, 2021"
},
{
"code": null,
"e": 230,
"s": 28,
"text": "To configure the header bar of a React Native application, the navigation options are used. The navigation options are a static property of the screen component which is eithe... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.