title stringlengths 3 221 | text stringlengths 17 477k | parsed listlengths 0 3.17k |
|---|---|---|
Convert String float to float list in Python | 20 Jul, 2021
Sometimes, while working with data, we could be dealing with numbers, that are in decimal and not integers. This is general case in data science domain. Let’s discuss how to resolve a problem in which we may have a comma separated float numbers and we need to convert to float list.
Method #1 : Using list c... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n20 Jul, 2021"
},
{
"code": null,
"e": 311,
"s": 28,
"text": "Sometimes, while working with data, we could be dealing with numbers, that are in decimal and not integers. This is general case in data science domain. Let’s discuss how to r... |
Maximum and Minimum Product Subsets | 05 Jul, 2022
Given a set, we need to find maximum and minimum possible product among all subsets of the set.
Examples:
Input : arr[] = {4, -2, 5};
Output: Maximum product = 20
Minimum product = -40
Maximum product is obtained by multiplying
4 5
Minimum product is obtained by multiplying
4, -2, 5
Input : ar... | [
{
"code": null,
"e": 54,
"s": 26,
"text": "\n05 Jul, 2022"
},
{
"code": null,
"e": 151,
"s": 54,
"text": "Given a set, we need to find maximum and minimum possible product among all subsets of the set. "
},
{
"code": null,
"e": 162,
"s": 151,
"text": "Examples... |
React Suite DateRangePicker Component | 11 Apr, 2022
React Suite is a popular front-end library with a set of React components that are designed for the middle platform and back-end products. DateRangePicker component allows the user to quickly select a date range. We can use the following approach in ReactJS to use the React Suite DateRangePicker Component.... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n11 Apr, 2022"
},
{
"code": null,
"e": 336,
"s": 28,
"text": "React Suite is a popular front-end library with a set of React components that are designed for the middle platform and back-end products. DateRangePicker component allows the... |
How to detect Operating System through a C program | 19 Jul, 2020
One can find out the operating system on which the program is running with the help of C programming. This piece of information is very useful for the case where we want to build platform independent program. To find the OS (Operating System) we check out the macro defined by the compiler, for example wind... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n19 Jul, 2020"
},
{
"code": null,
"e": 580,
"s": 28,
"text": "One can find out the operating system on which the program is running with the help of C programming. This piece of information is very useful for the case where we want to bu... |
Python List index() | 21 Jun, 2022
Python index() is an inbuilt function in Python, which searches for a given element from the start of the list and returns the lowest index where the element appears.
In this article, we will cover different examples to find the index, such as:
Find the index of the element
Working of the index() With Sta... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n21 Jun, 2022"
},
{
"code": null,
"e": 220,
"s": 52,
"text": "Python index() is an inbuilt function in Python, which searches for a given element from the start of the list and returns the lowest index where the element appears. "
},
... |
Lodash _.delay() Method | 23 Sep, 2020
Lodash is a JavaScript library that works on the top of underscore.js. Lodash helps in working with arrays, strings, objects, numbers, etc.
The _.delay() method is used to call the given function as the parameter after the stated wait time is over, which is in milliseconds. Any further arguments are provid... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n23 Sep, 2020"
},
{
"code": null,
"e": 168,
"s": 28,
"text": "Lodash is a JavaScript library that works on the top of underscore.js. Lodash helps in working with arrays, strings, objects, numbers, etc."
},
{
"code": null,
"e"... |
Iterate Through Elements of LinkedHashSet in Java | 07 Jan, 2021
The LinkedHashSet is an ordered version of HashSet that maintains a doubly-linked List across all elements. When the iteration order is needed to be maintained this class is used.
Example:
Input:
["Geeks", "for", "Geeks"]
Output:
Geeks
for
Geeks
Input:
[9, 4, 6, 2, 8]
Output:
9
4
6
2
8
Different... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n07 Jan, 2021"
},
{
"code": null,
"e": 208,
"s": 28,
"text": "The LinkedHashSet is an ordered version of HashSet that maintains a doubly-linked List across all elements. When the iteration order is needed to be maintained this class is u... |
Spring Interview Questions | Dear readers, these Spring Interview Questions have been designed specially to get you acquainted with the nature of questions you may encounter during your interview for the subject of Spring. As per my experience good interviewers hardly plan to ask any particular question during your interview, normally questions st... | [
{
"code": null,
"e": 2862,
"s": 2426,
"text": "Dear readers, these Spring Interview Questions have been designed specially to get you acquainted with the nature of questions you may encounter during your interview for the subject of Spring. As per my experience good interviewers hardly plan to ask a... |
How to use Vision API from Google Cloud | 22 Oct, 2021
The Vision API from Google Cloud has multiple functionalities. In this article, we will see how to access them. Before using the API, you need to open a Google Developer account, create a Virtual Machine instance and set up an API. For that, refer to this article. We need to download the following packages... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n22 Oct, 2021"
},
{
"code": null,
"e": 340,
"s": 28,
"text": "The Vision API from Google Cloud has multiple functionalities. In this article, we will see how to access them. Before using the API, you need to open a Google Developer accou... |
How to create Neumorphism Effect using HTML and CSS ? | 14 Jan, 2021
Neumorphism (neomorphism) is a modern way of styling web-elements of any web-page and providing a 3D effect. This animation effect can be easily generated by using HTML and CSS. Box-shadow property of CSS can be used to implemented Neumorphism. It is used to add a dark shadow to one side and a light shadow... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n14 Jan, 2021"
},
{
"code": null,
"e": 401,
"s": 52,
"text": "Neumorphism (neomorphism) is a modern way of styling web-elements of any web-page and providing a 3D effect. This animation effect can be easily generated by using HTML and C... |
w command in Linux with Examples | 27 May, 2019
w command in Linux is used to show who is logged on and what they are doing. This command shows the information about the users currently on the machine and their processes. The header shows, in this order, the current time, how long the system has been running, how many users are currently logged on, and ... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n27 May, 2019"
},
{
"code": null,
"e": 815,
"s": 28,
"text": "w command in Linux is used to show who is logged on and what they are doing. This command shows the information about the users currently on the machine and their processes. T... |
PyQt5 | How to get the text of Push Button ? | 19 Aug, 2021
In this article, we will see how to get the text of push button. When we create push button we set some text to it which will be visible on main window, we can retrieve the text using text method.
Syntax : button.text()Argument : It takes no argument.Return : It returns string.
Code :
Python3
# importing... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n19 Aug, 2021"
},
{
"code": null,
"e": 225,
"s": 28,
"text": "In this article, we will see how to get the text of push button. When we create push button we set some text to it which will be visible on main window, we can retrieve the te... |
sum command in Linux with Examples | 27 May, 2019
sum command in Linux is used to find checksum and count the blocks in a file. Basically, this command is used to show the checksum and block count for each specified file. When no file is specified then it will read the standard input.
Syntax:
sum [OPTION]... [FILE]...
Example: It will ask for the input o... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n27 May, 2019"
},
{
"code": null,
"e": 288,
"s": 52,
"text": "sum command in Linux is used to find checksum and count the blocks in a file. Basically, this command is used to show the checksum and block count for each specified file. Wh... |
Splitting string into array of substrings in Julia – split() and rsplit() Method | 26 Mar, 2020
The split() is an inbuilt function in julia which is used to split a specified string into an array of substrings on occurrences of the specified delimiter(s).
Syntax:split(str::AbstractString, dlm; limit::Integer, keepempty::Bool)orsplit(str::AbstractString; limit::Integer, keepempty::Bool)
Parameters:
st... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n26 Mar, 2020"
},
{
"code": null,
"e": 188,
"s": 28,
"text": "The split() is an inbuilt function in julia which is used to split a specified string into an array of substrings on occurrences of the specified delimiter(s)."
},
{
"... |
Design a Loan Calculator using JavaScript | 23 Feb, 2021
The Loan Calculator can be used to calculate monthly EMI of the loan by taking the total amount, months to repay and the rate of interest.
Approach: The approach is very simple, we will take 3 inputs from user i.e. amount (total loan amount), rate (the rate of interest) and months (number o months to repay... | [
{
"code": null,
"e": 54,
"s": 26,
"text": "\n23 Feb, 2021"
},
{
"code": null,
"e": 193,
"s": 54,
"text": "The Loan Calculator can be used to calculate monthly EMI of the loan by taking the total amount, months to repay and the rate of interest."
},
{
"code": null,
"e"... |
Lodash _.chunk() Method | 28 Jun, 2022
Lodash is a JavaScript library that works on the top of underscore.js. Lodash helps in working with arrays, strings, objects, numbers etc. Lodash.chunk() function is used to break the array in to small chunks. Each chunk is an array of size as given.
Syntax:
chunk(array, size)
Parameters: This function acc... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n28 Jun, 2022"
},
{
"code": null,
"e": 279,
"s": 28,
"text": "Lodash is a JavaScript library that works on the top of underscore.js. Lodash helps in working with arrays, strings, objects, numbers etc. Lodash.chunk() function is used to b... |
Lodash _.sample() Method | 10 Sep, 2020
Lodash is a JavaScript library that works on the top of underscore.js. Lodash helps in working with arrays, collection, strings, objects, numbers etc.The _.sample() method will provide a random element from collection.
Syntax:
_.sample(collection)
Parameters: This method accepts single parameter as mention... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n10 Sep, 2020"
},
{
"code": null,
"e": 247,
"s": 28,
"text": "Lodash is a JavaScript library that works on the top of underscore.js. Lodash helps in working with arrays, collection, strings, objects, numbers etc.The _.sample() method wil... |
String Pairs | TCS Codevita 2020 | 15 Jan, 2021
One person hands over the list of digits to Mr. String, But Mr. String understands only strings. Within strings also he understands only vowels. Mr. String needs your help to find the total number of pairs which add up to a certain digit D.
The rules to calculate digit D are as follows:
Take all digits and... | [
{
"code": null,
"e": 54,
"s": 26,
"text": "\n15 Jan, 2021"
},
{
"code": null,
"e": 295,
"s": 54,
"text": "One person hands over the list of digits to Mr. String, But Mr. String understands only strings. Within strings also he understands only vowels. Mr. String needs your help to... |
Merging elements of two different arrays alternatively in third array | 07 May, 2021
Given two arrays arr1[] and arr2[], we need to combine two arrays in such a way that the combined array has alternate elements of both. If one array has extra element, then these elements are appended at the end of the combined array.
Input : arr1[] = {1, 2, 3, 4, 5, 6}
arr2[] = {11, 22, 33, 44}
O... | [
{
"code": null,
"e": 53,
"s": 25,
"text": "\n07 May, 2021"
},
{
"code": null,
"e": 289,
"s": 53,
"text": "Given two arrays arr1[] and arr2[], we need to combine two arrays in such a way that the combined array has alternate elements of both. If one array has extra element, then t... |
Material Design Components Chips in Android with Example | 25 Dec, 2020
Chips in android are one of the components which are used to make the choice filters, actions, and display the selectable options in the compact area of the Android Window. In this article, it’s been discussed how to implement the very basic selectable chips for the filtering of the options. Have a look at... | [
{
"code": null,
"e": 53,
"s": 25,
"text": "\n25 Dec, 2020"
},
{
"code": null,
"e": 505,
"s": 53,
"text": "Chips in android are one of the components which are used to make the choice filters, actions, and display the selectable options in the compact area of the Android Window. I... |
Replace all occurrences of pi with 3.14 in a given string | 11 Jun, 2021
Given a string, the task is to replace all occurrences of pi with 3.14 in the given string.Examples:
Input : str = "2 * pi + 3 * pi = 5 * pi"
Output : 2 * 3.14 + 3 * 3.14 = 5 * 3.14
Input : str = "pippppiiiipi"
Output : 3.14ppp3.14iii3.14
Input : str = "xpix"
Output : x3.14x
Approach 1:
Create an e... | [
{
"code": null,
"e": 54,
"s": 26,
"text": "\n11 Jun, 2021"
},
{
"code": null,
"e": 157,
"s": 54,
"text": "Given a string, the task is to replace all occurrences of pi with 3.14 in the given string.Examples: "
},
{
"code": null,
"e": 334,
"s": 157,
"text": "In... |
Proof that Independent Set in Graph theory is NP Complete | 26 Jun, 2020
Prerequisite: NP-Completeness, Independent set.
An Independent Set S of graph G = (V, E) is a set of vertices such that no two vertices in S are adjacent to each other. It consists of non- adjacent vertices.
Problem: Given a graph G(V, E) and an integer k, the problem is to determine if the graph contains ... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n26 Jun, 2020"
},
{
"code": null,
"e": 76,
"s": 28,
"text": "Prerequisite: NP-Completeness, Independent set."
},
{
"code": null,
"e": 236,
"s": 76,
"text": "An Independent Set S of graph G = (V, E) is a set of vertice... |
Return a Matrix with Upper Triangle as TRUE values in R Programming – upper.tri() Function | 16 Jun, 2020
upper.tri() function in R Language is used to return a matrix of logical values with upper triangle as TRUE.
Syntax: upper.tri(x, diag)
Parameters:x: Matrix objectdiag: Boolean value to include diagonal
Example 1:
# R program to print the # upper triangle of a matrix # Creating a matrixmat <- matrix(c(1:9... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n16 Jun, 2020"
},
{
"code": null,
"e": 137,
"s": 28,
"text": "upper.tri() function in R Language is used to return a matrix of logical values with upper triangle as TRUE."
},
{
"code": null,
"e": 164,
"s": 137,
"text"... |
When do we pass arguments by reference or pointer? | 04 Jan, 2022
In C++, variables are passed by reference due to following reasons:1) To modify local variables of the caller function: A reference (or pointer) allows called function to modify a local variable of the caller function. For example, consider the following example program where fun() is able to modify local ... | [
{
"code": null,
"e": 54,
"s": 26,
"text": "\n04 Jan, 2022"
},
{
"code": null,
"e": 384,
"s": 54,
"text": "In C++, variables are passed by reference due to following reasons:1) To modify local variables of the caller function: A reference (or pointer) allows called function to mod... |
Bool data type in C++ | 05 Jun, 2017
The ISO/ANSI C++ Standard has added certain new data types to the original C++ specifications.They are provided to provide better control in certain situations as well as for providing conveniences to C++ programmers.One of the new data type is: boolSyntax:
bool b1 = true; // declaring a boolean varia... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n05 Jun, 2017"
},
{
"code": null,
"e": 310,
"s": 52,
"text": "The ISO/ANSI C++ Standard has added certain new data types to the original C++ specifications.They are provided to provide better control in certain situations as well as for... |
How to Install FFmpeg on Windows? | 05 Oct, 2021
The ffmpeg is a cross-platform & open-source software utility to record, convert and stream video/audio files. It can be used to:
Change the format of a video/audio file
Extract audio from video file
Merge audio and video streams
Change the bitrate of a video/audio file
Create GIF from a video file
Extra... | [
{
"code": null,
"e": 54,
"s": 26,
"text": "\n05 Oct, 2021"
},
{
"code": null,
"e": 185,
"s": 54,
"text": "The ffmpeg is a cross-platform & open-source software utility to record, convert and stream video/audio files. It can be used to:"
},
{
"code": null,
"e": 226,
... |
Angular Material 7 - Slide Toggle | The <mat-slide-toggle>, an Angular Directive, is used as a on/off switch with material design styling and animation capabilities.
In this chapter, we will showcase the configuration required to draw a slide toggle control using Angular Material.
Follow the following steps to update the Angular application we created in... | [
{
"code": null,
"e": 3019,
"s": 2889,
"text": "The <mat-slide-toggle>, an Angular Directive, is used as a on/off switch with material design styling and animation capabilities."
},
{
"code": null,
"e": 3135,
"s": 3019,
"text": "In this chapter, we will showcase the configuration ... |
Find an N x N grid whose xor of every row and column is equal | 17 Nov, 2021
Given an integer N which is a multiple of 4, the task is to find an N x N grid for which the bitwise xor of every row and column is the same.Examples:
Input: N = 4 Output: 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 Input: N = 8 Output: 0 1 2 3 16 17 18 19 4 5 6 7 20 21 22 23 8 9 10 11 24 25 26 27 12 13 14 15 ... | [
{
"code": null,
"e": 54,
"s": 26,
"text": "\n17 Nov, 2021"
},
{
"code": null,
"e": 207,
"s": 54,
"text": "Given an integer N which is a multiple of 4, the task is to find an N x N grid for which the bitwise xor of every row and column is the same.Examples: "
},
{
"code":... |
Number of ways to place two queens on a N*N chess-board | 23 Jun, 2022
Given an integer N denoting a N * N chess-board, the task is to count the number of ways to place two queens on the board such that, they do no attack each other.Examples:
Input: N = 9 Output: 2184 Explanation: There are 2184 ways to place two queens on 9 * 9 chess-board.Input: N = 3 Output: 8 Explanation:... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n23 Jun, 2022"
},
{
"code": null,
"e": 200,
"s": 28,
"text": "Given an integer N denoting a N * N chess-board, the task is to count the number of ways to place two queens on the board such that, they do no attack each other.Examples:"
... |
MariaDB - Useful Functions | This chapter contains a list of the most frequently used functions, offering definitions, explanations, and examples.
Most frequently used aggregate functions are given below −
COUNT
It counts the number of records.
Example − SELECT COUNT(*) FROM customer_table;
MIN
It reveals the minimum value of a set of records.
Exa... | [
{
"code": null,
"e": 2614,
"s": 2496,
"text": "This chapter contains a list of the most frequently used functions, offering definitions, explanations, and examples."
},
{
"code": null,
"e": 2673,
"s": 2614,
"text": "Most frequently used aggregate functions are given below −"
},... |
Scientific Calculator Using awk Command in Linux | 19 Feb, 2020
The awk command in Linux allows the user to use the numeric functions, variables, logical operators and string functions. Basically, it is a utility that allows the user to write small and effective programs in the form the statements. It is mostly used in pattern scanning and processing. Here, we are usin... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n19 Feb, 2020"
},
{
"code": null,
"e": 390,
"s": 28,
"text": "The awk command in Linux allows the user to use the numeric functions, variables, logical operators and string functions. Basically, it is a utility that allows the user to wr... |
Python | Pandas Series.dt.to_period | 11 Mar, 2022
Series.dt can be used to access the values of the series as datetimelike and return several properties. Pandas Series.dt.to_period() function cast the underlying data of the given Series object to PeriodArray/Index at a particular frequency.
Syntax: Series.dt.to_period(*args, **kwargs)Parameter : freq : s... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n11 Mar, 2022"
},
{
"code": null,
"e": 271,
"s": 28,
"text": "Series.dt can be used to access the values of the series as datetimelike and return several properties. Pandas Series.dt.to_period() function cast the underlying data of the g... |
Naming Rows and Columns of a Matrix in R Programming – rownames() and colnames() Function | 05 Jun, 2020
rownames() function in R Language is used to set the names to rows of a matrix.
Syntax:rownames(x) <- value
Parameters:x: Matrixvalue: Vector of names to be set
Example:
# R program to provide a name# to rows of a Matrix # Creating a 3X3 MatrixA = matrix(c(1, 2, 3, 4, 5, 6, 7, 8, 9), 3, 3, byrow = TRUE... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n05 Jun, 2020"
},
{
"code": null,
"e": 108,
"s": 28,
"text": "rownames() function in R Language is used to set the names to rows of a matrix."
},
{
"code": null,
"e": 136,
"s": 108,
"text": "Syntax:rownames(x) <- valu... |
Thompson Sampling For Multi-Armed Bandit Problems (Part 1) | by Guido Vivaldi | Towards Data Science | “Multi-armed bandit” is perhaps the coolest term in data science, excluding financial applications to “naked European call options” or “short iron butterflies”. They are also among the most commonly encountered practical applications.
The term has a helpful motivating story: a “one armed bandit” refers to a slot machin... | [
{
"code": null,
"e": 407,
"s": 172,
"text": "“Multi-armed bandit” is perhaps the coolest term in data science, excluding financial applications to “naked European call options” or “short iron butterflies”. They are also among the most commonly encountered practical applications."
},
{
"code"... |
ByteBuffer get() method in Java with Examples - GeeksforGeeks | 24 May, 2019
The get() method of java.nio.ByteBuffer class is used to read the byte at the buffer’s current position, and then increments the position.
Syntax :
public abstract byte get()
Return Value: This method returns the byte at the buffer’s current position.
Throws: This method throws BufferUnderflowException – I... | [
{
"code": null,
"e": 24514,
"s": 24486,
"text": "\n24 May, 2019"
},
{
"code": null,
"e": 24653,
"s": 24514,
"text": "The get() method of java.nio.ByteBuffer class is used to read the byte at the buffer’s current position, and then increments the position."
},
{
"code": nu... |
How to reverse a vector in R? | Sometimes the vector values are recorded in the reverse order in R, therefore, we need to again reverse those vectors to get the actual order we want. For example, a sequence of numbers might be recorded as 1 to 20 but we wanted it to be from 20 to 1. The reversing of order of the vector values can be easily done with ... | [
{
"code": null,
"e": 1408,
"s": 1062,
"text": "Sometimes the vector values are recorded in the reverse order in R, therefore, we need to again reverse those vectors to get the actual order we want. For example, a sequence of numbers might be recorded as 1 to 20 but we wanted it to be from 20 to 1. T... |
Strong Numbers | Practice | GeeksforGeeks | Strong Numbers are the numbers whose sum of factorial of digits is equal to the original number. Given a number N, the task is to check if it is a Strong Number or not. Print 1 if the Number is Strong, else Print 0.
Example 1:
Input:
N = 145
Output:
1
Explanation:
1! + 4! + 5! = 145 So, 145 is a Strong
Number and th... | [
{
"code": null,
"e": 454,
"s": 238,
"text": "Strong Numbers are the numbers whose sum of factorial of digits is equal to the original number. Given a number N, the task is to check if it is a Strong Number or not. Print 1 if the Number is Strong, else Print 0."
},
{
"code": null,
"e": 46... |
Perl use Function | This function imports all the functions exported by MODULE, or only those referred to by LIST, into the name space of the current package. Effectively equivalent to −
BEGIN {
require "Module.pm";
Module->import();
}
Also used to impose compiler directives (pragmas) on the current script, although essentially these are... | [
{
"code": null,
"e": 2387,
"s": 2220,
"text": "This function imports all the functions exported by MODULE, or only those referred to by LIST, into the name space of the current package. Effectively equivalent to −"
},
{
"code": null,
"e": 2437,
"s": 2387,
"text": "BEGIN {\nrequir... |
Java Program For Binary Addition - onlinetutorialspoint | PROGRAMMINGJava ExamplesC Examples
Java Examples
C Examples
C Tutorials
aws
JAVAEXCEPTIONSCOLLECTIONSSWINGJDBC
EXCEPTIONS
COLLECTIONS
SWING
JDBC
JAVA 8
SPRING
SPRING BOOT
HIBERNATE
PYTHON
PHP
JQUERY
PROGRAMMINGJava ExamplesC Examples
Java Examples
C Examples
C Tutorials
aws
Here we are going to write a Java program for... | [
{
"code": null,
"e": 158,
"s": 123,
"text": "PROGRAMMINGJava ExamplesC Examples"
},
{
"code": null,
"e": 172,
"s": 158,
"text": "Java Examples"
},
{
"code": null,
"e": 183,
"s": 172,
"text": "C Examples"
},
{
"code": null,
"e": 195,
"s": 183,
... |
In how many ways you can retrieve the elements of a collection in Java? | You can retrieve the contents of a collection object in three ways −
The foreach loop or enhanced for loop, which enables you to traverse the complete collection object sequentially.
Live Demo
import java.util.ArrayList;
public class RetrievingData {
public static void main(String[] args) {
ArrayList <String>... | [
{
"code": null,
"e": 1131,
"s": 1062,
"text": "You can retrieve the contents of a collection object in three ways −"
},
{
"code": null,
"e": 1245,
"s": 1131,
"text": "The foreach loop or enhanced for loop, which enables you to traverse the complete collection object sequentially.... |
How to add a base URL for all the links in a page in HTML? | To add a base URL, use the <base> tag in HTML. For example, you can set the base URL once at the top of your page in the header section, then all subsequent relative links will use that URL as a starting point.
You can try to run the following code to learn how to add a base URL for all the links in a page in HTML −
<!... | [
{
"code": null,
"e": 1273,
"s": 1062,
"text": "To add a base URL, use the <base> tag in HTML. For example, you can set the base URL once at the top of your page in the header section, then all subsequent relative links will use that URL as a starting point."
},
{
"code": null,
"e": 1380,... |
printf(), sprintf() and fprintf() in C | The function printf() is used to print the message along with the values of variables.
Here is the syntax of printf() in C language,
printf(const char *str, ...);
Here is an example of printf() in C language,
Live Demo
#include<stdio.h>
int main() {
int a = 24;
printf("Welcome! \n");
printf("The value of a : ... | [
{
"code": null,
"e": 1149,
"s": 1062,
"text": "The function printf() is used to print the message along with the values of variables."
},
{
"code": null,
"e": 1195,
"s": 1149,
"text": "Here is the syntax of printf() in C language,"
},
{
"code": null,
"e": 1225,
"s... |
C | File Handling | Question 1 - GeeksforGeeks | 28 Jun, 2021
Which of the following true about FILE *fp
(A) FILE is a keyword in C for representing files and fp is a variable of FILE type.
(B) FILE is a structure and fp is a pointer to the structure of FILE type
(C) FILE is a stream
(D) FILE is a buffered stream
Answer: (B) Explanation: fp is a pointer of FILE typ... | [
{
"code": null,
"e": 24227,
"s": 24196,
"text": " \n28 Jun, 2021\n"
},
{
"code": null,
"e": 24613,
"s": 24227,
"text": "Which of the following true about FILE *fp\n(A) FILE is a keyword in C for representing files and fp is a variable of FILE type.\n(B) FILE is a structure and fp... |
How to Invert the color of an image using JavaFX? | JavaFX provides two interface namely PixelReader and PixelWriter in the javafx.scene.image. Using the methods provided by them you can read and write the contents of an image such as pixels, color values, etc.
You can get the objects of these interfaces using the getPixelReader() and getPixelWriter() methods respective... | [
{
"code": null,
"e": 1272,
"s": 1062,
"text": "JavaFX provides two interface namely PixelReader and PixelWriter in the javafx.scene.image. Using the methods provided by them you can read and write the contents of an image such as pixels, color values, etc."
},
{
"code": null,
"e": 1386,
... |
Best Practices to Write Clean Python Code - GeeksforGeeks | 06 May, 2021
Python is one of the most loved programming languages today. Shockingly, Python has overtaken Java in the list of top programming languages and is now the most studied language! It is the second most used language after JavaScript and is slowly beating the competition to be on the top. It is used extensive... | [
{
"code": null,
"e": 24034,
"s": 24006,
"text": "\n06 May, 2021"
},
{
"code": null,
"e": 24716,
"s": 24034,
"text": "Python is one of the most loved programming languages today. Shockingly, Python has overtaken Java in the list of top programming languages and is now the most stu... |
Linux Admin - Quota Management | CentOS disk quotas can be enabled both; alerting the system administrator and denying further disk-storage-access to a user before disk capacity is exceeded. When a disk is full, depending on what resides on the disk, an entire system can come to a screeching halt until recovered.
Enabling Quota Management in CentOS Li... | [
{
"code": null,
"e": 2539,
"s": 2257,
"text": "CentOS disk quotas can be enabled both; alerting the system administrator and denying further disk-storage-access to a user before disk capacity is exceeded. When a disk is full, depending on what resides on the disk, an entire system can come to a scre... |
Remove an element from a Queue in Java | To remove an element from a Queue, use the remove() method.
First, set a Queue and insert some elements −
Queue<String> q = new LinkedList<String>();
q.offer("abc");
q.offer("def");
q.offer("ghi");
q.offer("jkl");
q.offer("mno");
q.offer("pqr");
q.offer("stu");
q.offer("vwx");
Remove the first element −
System.out.prin... | [
{
"code": null,
"e": 1122,
"s": 1062,
"text": "To remove an element from a Queue, use the remove() method."
},
{
"code": null,
"e": 1168,
"s": 1122,
"text": "First, set a Queue and insert some elements −"
},
{
"code": null,
"e": 1340,
"s": 1168,
"text": "Queue... |
Multi-Class Classification in Text using R | by Shubhanshu Gupta | Towards Data Science | This blog is in continuation to my NLP blog series. In the previous blogs, I discussed data pre-processing steps in R and recognizing emotions present in ted talks. In this blog, I am going to predict the ratings of the ted talks given by viewers. This would require a multi-class classification and quite a bit of data ... | [
{
"code": null,
"e": 563,
"s": 172,
"text": "This blog is in continuation to my NLP blog series. In the previous blogs, I discussed data pre-processing steps in R and recognizing emotions present in ted talks. In this blog, I am going to predict the ratings of the ted talks given by viewers. This wo... |
Action Chains in Selenium Python - GeeksforGeeks | 19 May, 2020
Selenium’s Python Module is built to perform automated testing with Python. ActionChains are a way to automate low-level interactions such as mouse movements, mouse button actions, keypress, and context menu interactions. This is useful for doing more complex actions like hover over and drag and drop. Acti... | [
{
"code": null,
"e": 41528,
"s": 41500,
"text": "\n19 May, 2020"
},
{
"code": null,
"e": 42075,
"s": 41528,
"text": "Selenium’s Python Module is built to perform automated testing with Python. ActionChains are a way to automate low-level interactions such as mouse movements, mous... |
Python | Numpy ndarray.item() - GeeksforGeeks | 27 Mar, 2019
With the help of numpy.ndarray.item() method, we can fetch the data elements that is found at the given index on numpy array. Remember we can give index as one dimensional parameter or can be two dimensional.
Parameters:*args : Arguments (variable number and type)-> none: This argument only works when size... | [
{
"code": null,
"e": 24292,
"s": 24264,
"text": "\n27 Mar, 2019"
},
{
"code": null,
"e": 24501,
"s": 24292,
"text": "With the help of numpy.ndarray.item() method, we can fetch the data elements that is found at the given index on numpy array. Remember we can give index as one dim... |
How to fetch fields with multiple values set using MySQL LIKE? | To fetch fields with multiple values, use LIKE with OR in MySQL −
select *from yourTableName where yourColumnName like ‘%AnyStringValue’ or yourColumnName like ‘%AnyStringValue’ or yourColumnName like ‘%AnyStringValue’ .........N;
You can understand with the help of a table −
mysql> create table LikeDemo
−> (
... | [
{
"code": null,
"e": 1128,
"s": 1062,
"text": "To fetch fields with multiple values, use LIKE with OR in MySQL −"
},
{
"code": null,
"e": 1293,
"s": 1128,
"text": "select *from yourTableName where yourColumnName like ‘%AnyStringValue’ or yourColumnName like ‘%AnyStringValue’ or y... |
C++ Library - <unordered_map> | Unordered map is dictionary like data structure. It is a sequence of (key, value) pair, where only single value is associated with each unique key. It is often referred as associative array. It enables fast retrieval of individual elements based on their keys. It also implements the direct access operator(subscript ope... | [
{
"code": null,
"e": 3016,
"s": 2603,
"text": "Unordered map is dictionary like data structure. It is a sequence of (key, value) pair, where only single value is associated with each unique key. It is often referred as associative array. It enables fast retrieval of individual elements based on thei... |
How to Convert Pandas DataFrame into a List? - GeeksforGeeks | 03 May, 2021
Let’s discuss how to convert Pandas dataframe to List. First, let’s create a Basic DataFrame:
Python3
import pandas as pd # Creating a dictionary to store datadata = {'Name':['Tony', 'Steve', 'Bruce', 'Peter' ], 'Age': [35, 70, 45, 20] } # Creating DataFrame df = pd.DataFrame(data) # Print the da... | [
{
"code": null,
"e": 25580,
"s": 25552,
"text": "\n03 May, 2021"
},
{
"code": null,
"e": 25674,
"s": 25580,
"text": "Let’s discuss how to convert Pandas dataframe to List. First, let’s create a Basic DataFrame:"
},
{
"code": null,
"e": 25682,
"s": 25674,
"text... |
Select Drop-down list using select_by_index() in Selenium - Python - GeeksforGeeks | 11 Oct, 2020
Prerequisite: Browser Automation Using Selenium
Selenium is an effective device for controlling an internet browser through the program. It is purposeful for all browsers, works on all fundamental OS and its scripts are written in numerous languages i.e Python, Java, C#, etc, we will be using Python.
Requi... | [
{
"code": null,
"e": 25537,
"s": 25509,
"text": "\n11 Oct, 2020"
},
{
"code": null,
"e": 25585,
"s": 25537,
"text": "Prerequisite: Browser Automation Using Selenium"
},
{
"code": null,
"e": 25839,
"s": 25585,
"text": "Selenium is an effective device for contro... |
Kotlin mutableMapOf() - GeeksforGeeks | 17 May, 2021
Kotlin MutableMap is an interface of collection frameworks which contains objects in the form of keys and values. It allows the user to efficiently retrieve the values corresponding to each key. The key and values can be of the different pairs like <Int, String>, < Char, String>, etc.For using the MutableM... | [
{
"code": null,
"e": 25172,
"s": 25144,
"text": "\n17 May, 2021"
},
{
"code": null,
"e": 25534,
"s": 25172,
"text": "Kotlin MutableMap is an interface of collection frameworks which contains objects in the form of keys and values. It allows the user to efficiently retrieve the va... |
Merge K sorted linked lists | Set 1 - GeeksforGeeks | 23 Feb, 2022
Given K sorted linked lists of size N each, merge them and print the sorted output.
Examples:
Input: k = 3, n = 4
list1 = 1->3->5->7->NULL
list2 = 2->4->6->8->NULL
list3 = 0->9->10->11->NULL
Output: 0->1->2->3->4->5->6->7->8->9->10->11
Merged lists in a sorted order
where every element is greater
than... | [
{
"code": null,
"e": 25837,
"s": 25809,
"text": "\n23 Feb, 2022"
},
{
"code": null,
"e": 25921,
"s": 25837,
"text": "Given K sorted linked lists of size N each, merge them and print the sorted output."
},
{
"code": null,
"e": 25932,
"s": 25921,
"text": "Exampl... |
How to find duplicate elements in a Stream in Java - GeeksforGeeks | 12 May, 2022
Given a stream containing some elements, the task is to find the duplicate elements in this stream in Java.
Examples:
Input: Stream = {5, 13, 4, 21, 13, 27, 2, 59, 59, 34}Output: [59, 13]Explanation:The only duplicate elements in the given stream are 59 and 13.
Input: Stream = {5, 13, 4, 21, 27, 2, 59, 34}... | [
{
"code": null,
"e": 25691,
"s": 25663,
"text": "\n12 May, 2022"
},
{
"code": null,
"e": 25799,
"s": 25691,
"text": "Given a stream containing some elements, the task is to find the duplicate elements in this stream in Java."
},
{
"code": null,
"e": 25809,
"s": 25... |
React.js Render Props - GeeksforGeeks | 16 Mar, 2021
The Render Props is a technique in ReactJS for sharing code between React components using a prop whose value is a function. Child component takes render props as a function and calls it instead of implementing its own render logic. In brief, we pass a function from the parent component to the child compo... | [
{
"code": null,
"e": 26071,
"s": 26043,
"text": "\n16 Mar, 2021"
},
{
"code": null,
"e": 26485,
"s": 26071,
"text": "The Render Props is a technique in ReactJS for sharing code between React components using a prop whose value is a function. Child component takes render props as... |
JavaScript Date parse() Method - GeeksforGeeks | 22 Nov, 2021
Below is the example of Date parse() method.
Example:
javascript
<script> // Taking a date string as input. var date = "February 18, 2018 12:30 PM"; // Calling parse function on input date string. var msec = Date.parse(date); document.write(msec);</script>
Output... | [
{
"code": null,
"e": 31305,
"s": 31277,
"text": "\n22 Nov, 2021"
},
{
"code": null,
"e": 31352,
"s": 31305,
"text": "Below is the example of Date parse() method. "
},
{
"code": null,
"e": 31363,
"s": 31352,
"text": "Example: "
},
{
"code": null,
... |
Integer.numberOfTrailingZeros() Method in Java with Example - GeeksforGeeks | 05 Dec, 2018
The Java.lang.Integer.numberOfTrailingZeros() is the method which returns the total number of zero(0) bits following the lowest-order (ie.Rightmost or least significant “1” bit)one-bit in the two’s complement binary representation of the specified integer value or we can say that it is the function which c... | [
{
"code": null,
"e": 25225,
"s": 25197,
"text": "\n05 Dec, 2018"
},
{
"code": null,
"e": 25786,
"s": 25225,
"text": "The Java.lang.Integer.numberOfTrailingZeros() is the method which returns the total number of zero(0) bits following the lowest-order (ie.Rightmost or least signif... |
How to Copy One HashMap to Another HashMap in Java? - GeeksforGeeks | 22 Dec, 2021
HashMap is similar to the HashTable, but it is unsynchronized. It allows to store the null keys as well, but there should be only one null key object and there can be any number of null values. This class makes no guarantees as to the order of the map. To use this class and its methods, you need to import... | [
{
"code": null,
"e": 25469,
"s": 25441,
"text": "\n22 Dec, 2021"
},
{
"code": null,
"e": 25822,
"s": 25469,
"text": "HashMap is similar to the HashTable, but it is unsynchronized. It allows to store the null keys as well, but there should be only one null key object and there can... |
Check whether four points make a parallelogram - GeeksforGeeks | 14 Oct, 2017
Given four points in a 2-dimensional space we need to find out whether they make a parallelogram or not.
A parallelogram has four sides. Two opposite sides are parallel and are of same lengths.
Examples:
Points = [(0, 0), (4, 0), (1, 3), (5, 3)]
Above points make a parallelogram.
Points = [(0, 0), (2, ... | [
{
"code": null,
"e": 26508,
"s": 26480,
"text": "\n14 Oct, 2017"
},
{
"code": null,
"e": 26613,
"s": 26508,
"text": "Given four points in a 2-dimensional space we need to find out whether they make a parallelogram or not."
},
{
"code": null,
"e": 26702,
"s": 26613... |
How to Delete a Specific Row from SQLite Table using Python ? - GeeksforGeeks | 28 Apr, 2021
In this article, we will discuss how to delete of a specific row from the SQLite table using Python.
In order to delete a particular row from a table in SQL, we use the DELETE query, The DELETE Statement in SQL is used to delete existing records from a table. We can delete a single record or multiple recor... | [
{
"code": null,
"e": 25799,
"s": 25771,
"text": "\n28 Apr, 2021"
},
{
"code": null,
"e": 25900,
"s": 25799,
"text": "In this article, we will discuss how to delete of a specific row from the SQLite table using Python."
},
{
"code": null,
"e": 26168,
"s": 25900,
... |
C# | How to get the Standard Input Stream through Console - GeeksforGeeks | 28 Jan, 2019
Given a normal console, the task is to get the Standard Input Stream through this Console in C#.
Approach: This can be done using the In property in the Console class of the System package in C#.
Program: Getting the Standard Input Stream
// C# program to illustrate the// Console.In Propertyusing System;us... | [
{
"code": null,
"e": 25355,
"s": 25327,
"text": "\n28 Jan, 2019"
},
{
"code": null,
"e": 25452,
"s": 25355,
"text": "Given a normal console, the task is to get the Standard Input Stream through this Console in C#."
},
{
"code": null,
"e": 25551,
"s": 25452,
"t... |
CSS | margin-inline Property - GeeksforGeeks | 19 Feb, 2021
The margin-inline property is used to define the logical inline start and end margin of an element. This property helps to place margin depending on the element’s writing mode, directionality, and text orientation.Syntax:
margin-inline: length | auto | initial | inherit | unset;
Property values:
length... | [
{
"code": null,
"e": 26621,
"s": 26593,
"text": "\n19 Feb, 2021"
},
{
"code": null,
"e": 26845,
"s": 26621,
"text": "The margin-inline property is used to define the logical inline start and end margin of an element. This property helps to place margin depending on the element’s ... |
get_log driver method - Selenium Python - GeeksforGeeks | 03 Dec, 2020
Selenium’s Python Module is built to perform automated testing with Python. Selenium Python bindings provides a simple API to write functional/acceptance tests using Selenium WebDriver. To open a webpage using Selenium Python, checkout – Navigating links using get method – Selenium Python. Just being able ... | [
{
"code": null,
"e": 25537,
"s": 25509,
"text": "\n03 Dec, 2020"
},
{
"code": null,
"e": 26277,
"s": 25537,
"text": "Selenium’s Python Module is built to perform automated testing with Python. Selenium Python bindings provides a simple API to write functional/acceptance tests usi... |
wcsncpy() function in C++ with example - GeeksforGeeks | 05 Oct, 2018
The wcsncpy() function is defined in cwchar.h header file. The wcsncpy() function copies a specified number of wide characters from source to destination.
Syntax:
wchar_t *wcsncpy(wchar_t *dest,
const wchar_t *src,
size_t n);
Parameters: This method accepts the followin... | [
{
"code": null,
"e": 25343,
"s": 25315,
"text": "\n05 Oct, 2018"
},
{
"code": null,
"e": 25498,
"s": 25343,
"text": "The wcsncpy() function is defined in cwchar.h header file. The wcsncpy() function copies a specified number of wide characters from source to destination."
},
... |
MoviePy – Iterating frames of Video File Clip - GeeksforGeeks | 18 Oct, 2021
In this article we will see how we can iterate frames of the video file clip in MoviePy. MoviePy is a Python module for video editing, which can be used for basic operations on videos and GIF’s. A video is basically combination of lots of frame for each time there is a specific frame, in order to get the f... | [
{
"code": null,
"e": 25537,
"s": 25509,
"text": "\n18 Oct, 2021"
},
{
"code": null,
"e": 25989,
"s": 25537,
"text": "In this article we will see how we can iterate frames of the video file clip in MoviePy. MoviePy is a Python module for video editing, which can be used for basic ... |
Distance Vector Routing (DVR) Protocol - GeeksforGeeks | 06 Nov, 2019
A distance-vector routing (DVR) protocol requires that a router inform its neighbors of topology changes periodically. Historically known as the old ARPANET routing algorithm (or known as Bellman-Ford algorithm).
Bellman Ford Basics – Each router maintains a Distance Vector table containing the distance be... | [
{
"code": null,
"e": 37839,
"s": 37811,
"text": "\n06 Nov, 2019"
},
{
"code": null,
"e": 38052,
"s": 37839,
"text": "A distance-vector routing (DVR) protocol requires that a router inform its neighbors of topology changes periodically. Historically known as the old ARPANET routin... |
How to make transparent web page using CSS ? - GeeksforGeeks | 02 Sep, 2021
You can easily make a transparent web page using the opacity property in HTML. You simply need to adjust the opacity value between 0.0 to 1.0 where a low value represents high transparency and a high value represents low transparency.
In order to make any element transparent, you need to add CSS opacity p... | [
{
"code": null,
"e": 26645,
"s": 26617,
"text": "\n02 Sep, 2021"
},
{
"code": null,
"e": 26881,
"s": 26645,
"text": "You can easily make a transparent web page using the opacity property in HTML. You simply need to adjust the opacity value between 0.0 to 1.0 where a low value rep... |
numpy.real() function - Python - GeeksforGeeks | 11 Jun, 2020
numpy.real() function return the real part of the complex argument.
Syntax : numpy.real(arr)
Parameters :arr : [array_like] Input array.
Return : [ndarray or scalar] The real component of the complex argument. If val is real, the type of val is used for the output. If val has complex elements, the returned... | [
{
"code": null,
"e": 25537,
"s": 25509,
"text": "\n11 Jun, 2020"
},
{
"code": null,
"e": 25605,
"s": 25537,
"text": "numpy.real() function return the real part of the complex argument."
},
{
"code": null,
"e": 25630,
"s": 25605,
"text": "Syntax : numpy.real(ar... |
Product of all the pairs from the given array - GeeksforGeeks | 14 May, 2021
Given an array arr[] of N integers, the task is to find the product of all the pairs possible from the given array such as:
(arr[i], arr[i]) is also considered as a valid pair.
(arr[i], arr[j]) and (arr[j], arr[i]) are considered as two different pairs.
Print the resultant answer modulus 10^9+7.
Examples:... | [
{
"code": null,
"e": 26103,
"s": 26075,
"text": "\n14 May, 2021"
},
{
"code": null,
"e": 26228,
"s": 26103,
"text": "Given an array arr[] of N integers, the task is to find the product of all the pairs possible from the given array such as: "
},
{
"code": null,
"e": 2... |
PHP | Basic Syntax - GeeksforGeeks | 25 Jun, 2021
The structure which defines PHP computer language is called PHP syntax.
The PHP script is executed on the server and the HTML result is sent to the browser. It can normally have HTML and PHP tags. PHP or Hypertext Preprocessor is a widely used open-source general-purpose scripting language and can be embed... | [
{
"code": null,
"e": 42163,
"s": 42135,
"text": "\n25 Jun, 2021"
},
{
"code": null,
"e": 42235,
"s": 42163,
"text": "The structure which defines PHP computer language is called PHP syntax."
},
{
"code": null,
"e": 42626,
"s": 42235,
"text": "The PHP script is ... |
Dynamic TextView in Kotlin - GeeksforGeeks | 18 Feb, 2021
Android TextView is an user interface that is used to display some text to the user.
In this article we will be discussing how to programmatically create a TextView in Kotlin .
Let’s start by first creating a project in Android Studio. To do so, follow these instructions:
Click on File, then New and then N... | [
{
"code": null,
"e": 25237,
"s": 25209,
"text": "\n18 Feb, 2021"
},
{
"code": null,
"e": 25322,
"s": 25237,
"text": "Android TextView is an user interface that is used to display some text to the user."
},
{
"code": null,
"e": 25414,
"s": 25322,
"text": "In th... |
What is the use of next() function in Express.js ? - GeeksforGeeks | 18 Dec, 2021
Express.js is a powerful framework for node.js. One of the main advantages of this framework is defining different routes or middleware to handle the client’s different incoming requests. In this article, we will discuss, the use of the next() function in every middleware of the express.js.
There are lots ... | [
{
"code": null,
"e": 26267,
"s": 26239,
"text": "\n18 Dec, 2021"
},
{
"code": null,
"e": 26559,
"s": 26267,
"text": "Express.js is a powerful framework for node.js. One of the main advantages of this framework is defining different routes or middleware to handle the client’s diff... |
Perl | Creating Excel Files - GeeksforGeeks | 07 May, 2019
Excel files are the most commonly used office application to communicate between computers. It is used to create rows and columns of text, numbers, and formulas for calculations. It is a good way to send reports. This demonstration works on Linux, Windows and other platforms as well. In excel, rows are num... | [
{
"code": null,
"e": 25227,
"s": 25199,
"text": "\n07 May, 2019"
},
{
"code": null,
"e": 25818,
"s": 25227,
"text": "Excel files are the most commonly used office application to communicate between computers. It is used to create rows and columns of text, numbers, and formulas fo... |
Python - Convert Delimiter separated list to Number - GeeksforGeeks | 05 Jul, 2021
Given a String with delimiter separated numbers, concatenate to form integer after removing delimiter.
Input : test_str = “1@6@7@8”, delim = ‘@’ Output : 1678 Explanation : Joined elements after removing delim “@”Input : test_str = “1!6!7!8”, delim = ‘!’ Output : 1678 Explanation : Joined elements after re... | [
{
"code": null,
"e": 25537,
"s": 25509,
"text": "\n05 Jul, 2021"
},
{
"code": null,
"e": 25640,
"s": 25537,
"text": "Given a String with delimiter separated numbers, concatenate to form integer after removing delimiter."
},
{
"code": null,
"e": 25863,
"s": 25640,
... |
SQL | SELECT TOP Clause - GeeksforGeeks | 09 Jan, 2019
SELECT TOP clause is used to fetch limited number of rows from a database. This clause is very useful while dealing with large databases.
Basic Syntax:SELECT TOP value column1,column2 FROM table_name;
value: number of rows to return from top
column1 , column2: fields in the table
table_name: name of table
... | [
{
"code": null,
"e": 25665,
"s": 25637,
"text": "\n09 Jan, 2019"
},
{
"code": null,
"e": 25803,
"s": 25665,
"text": "SELECT TOP clause is used to fetch limited number of rows from a database. This clause is very useful while dealing with large databases."
},
{
"code": nul... |
PostgreSQL - Autovacuum - GeeksforGeeks | 29 Jun, 2021
Sometime in the 2000s the developers of PostgreSQL found a major loophole in the design of their relational database management system with respect to storage space and transaction speed. It turned out that the UPDATE query was becoming an expensive routine. UPDATE was duplicating the old row and rewriting... | [
{
"code": null,
"e": 25549,
"s": 25521,
"text": "\n29 Jun, 2021"
},
{
"code": null,
"e": 26087,
"s": 25549,
"text": "Sometime in the 2000s the developers of PostgreSQL found a major loophole in the design of their relational database management system with respect to storage spac... |
Collecting data with Google forms and Pandas - GeeksforGeeks | 08 May, 2021
In this article, we will discuss how to collect data from Google forms using Pandas.
pydrive: This is used to simplify many common Google Drive API tasks. To install this type the below command in the terminal.
pip install pydrive
xlrd: This module is used to extract data from a spreadsheet. To install th... | [
{
"code": null,
"e": 25563,
"s": 25535,
"text": "\n08 May, 2021"
},
{
"code": null,
"e": 25649,
"s": 25563,
"text": "In this article, we will discuss how to collect data from Google forms using Pandas. "
},
{
"code": null,
"e": 25775,
"s": 25649,
"text": "pydr... |
How to store a very large number of more than 100 digits in C++ - GeeksforGeeks | 06 Oct, 2021
Given an integer N in form of string str consisting of more than 100 digits, the task is to store the value for performing an arithmetic operation and print the given integer.Examples:
Input: str = “54326789013892014531903492543267890138920145319034925432678901389201” Output: 5432678901389201453190349254... | [
{
"code": null,
"e": 26067,
"s": 26039,
"text": "\n06 Oct, 2021"
},
{
"code": null,
"e": 26254,
"s": 26067,
"text": "Given an integer N in form of string str consisting of more than 100 digits, the task is to store the value for performing an arithmetic operation and print the gi... |
Return by reference in C++ with Examples | 01 Aug, 2020
Pointers and References in C++ held close relation with one another. The major difference is that the pointers can be operated on like adding values whereas references are just an alias for another variable.
Functions in C++ can return a reference as it’s returns a pointer.
When function returns a referenc... | [
{
"code": null,
"e": 54,
"s": 26,
"text": "\n01 Aug, 2020"
},
{
"code": null,
"e": 262,
"s": 54,
"text": "Pointers and References in C++ held close relation with one another. The major difference is that the pointers can be operated on like adding values whereas references are ju... |
Epsilon-Greedy Algorithm in Reinforcement Learning | 04 May, 2020
In Reinforcement Learning, the agent or decision-maker learns what to do—how to map situations to actions—so as to maximize a numerical reward signal. The agent is not explicitly told which actions to take, but instead must discover which action yields the most reward through trial and error.
Multi-Armed B... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n04 May, 2020"
},
{
"code": null,
"e": 322,
"s": 28,
"text": "In Reinforcement Learning, the agent or decision-maker learns what to do—how to map situations to actions—so as to maximize a numerical reward signal. The agent is not explici... |
Public vs Private Access Modifiers in Java | 22 Feb, 2021
Whenever we are writing our classes we have to provide some information about our classes to the JVM like whether this class can be accessible from anywhere or not, whether child class creation is possible or not, whether object creation is possible or not etc. we can specify this information by using an a... | [
{
"code": null,
"e": 53,
"s": 25,
"text": "\n22 Feb, 2021"
},
{
"code": null,
"e": 502,
"s": 53,
"text": "Whenever we are writing our classes we have to provide some information about our classes to the JVM like whether this class can be accessible from anywhere or not, whether c... |
Perl | Useful String functions | 30 Jun, 2019
A string in Perl is a scalar variable and start with a ($) sign and it can contain alphabets, numbers, special characters. The string can consist of a single word, a group of words or a multi-line paragraph. The String is defined by the user within a single quote (‘) or double quote (“).
Perl provides vari... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n30 Jun, 2019"
},
{
"code": null,
"e": 317,
"s": 28,
"text": "A string in Perl is a scalar variable and start with a ($) sign and it can contain alphabets, numbers, special characters. The string can consist of a single word, a group of ... |
How can we implement cut, copy and paste functionality of JTextField in Java? | A JTextField is a subclass of JTextComponent class that allows the editing of a single line of text. We can implement the functionality of cut, copy and paste in a JTextField component by using cut(), copy() and paste() methods. These are pre-defined methods in a JTextFeild class.
public void cut()
public void copy()
p... | [
{
"code": null,
"e": 1469,
"s": 1187,
"text": "A JTextField is a subclass of JTextComponent class that allows the editing of a single line of text. We can implement the functionality of cut, copy and paste in a JTextField component by using cut(), copy() and paste() methods. These are pre-defined me... |
Python | Convert a list of characters into a string | 28 Jun, 2022
Given a list of characters, merge all of them into a string. Examples:
Input : ['g', 'e', 'e', 'k', 's', 'f', 'o',
'r', 'g', 'e', 'e', 'k', 's']
Output : geeksforgeeks
Input : ['p', 'r', 'o', 'g', 'r', 'a', 'm',
'm', 'i', 'n', 'g']
Output : programming
Method 1 : T... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n28 Jun, 2022"
},
{
"code": null,
"e": 123,
"s": 52,
"text": "Given a list of characters, merge all of them into a string. Examples:"
},
{
"code": null,
"e": 347,
"s": 123,
"text": "Input : ['g', 'e', 'e', 'k', 's', ... |
Node.js fs.stat() Method | 12 Oct, 2021
The fs.stat() method is used to return information about the given file or directory. It returns an fs.Stat object which has several properties and methods to get details about the file or directory.
Syntax:
fs.stat( path, options, callback )
Parameters: This method accept three parameters as mentioned abo... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n12 Oct, 2021"
},
{
"code": null,
"e": 228,
"s": 28,
"text": "The fs.stat() method is used to return information about the given file or directory. It returns an fs.Stat object which has several properties and methods to get details abou... |
Python – Generate k random dates between two other dates | 03 Aug, 2021
Given two dates, the task is to write a Python program to get K dates randomly.
Input : test_date1, test_date2 = date(2015, 6, 3), date(2015, 7, 1), K = 7
Output : [datetime.date(2015, 6, 18), datetime.date(2015, 6, 25), datetime.date(2015, 6, 29), datetime.date(2015, 6, 11), datetime.date(2015, 6, 11), da... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n03 Aug, 2021"
},
{
"code": null,
"e": 108,
"s": 28,
"text": "Given two dates, the task is to write a Python program to get K dates randomly."
},
{
"code": null,
"e": 183,
"s": 108,
"text": "Input : test_date1, test_d... |
Runtime Type Identification in Java | 22 Feb, 2021
Runtime Type Identification in Java can be defined as determining the type of an object at runtime. It is extremely essential to determine the type for a method that accepts the parameter of type java.lang. Unlike C++ Java does not support Runtime Type Identification (RTTI) but it provides few methods to f... | [
{
"code": null,
"e": 54,
"s": 26,
"text": "\n22 Feb, 2021"
},
{
"code": null,
"e": 385,
"s": 54,
"text": "Runtime Type Identification in Java can be defined as determining the type of an object at runtime. It is extremely essential to determine the type for a method that accepts ... |
Java Program to Increment by 1 to all the Digits of a given Integer | 24 Nov, 2020
Given an integer, the task is to generate a Java Program to Increment by 1 All the Digits of a given Integer.
Examples:
Input: 12345
Output: 23456
Input: 110102
Output: 221213
Approach 1:
In this approach, we will create a number which will be of the same length as the input and will contain only 1 in it... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n24 Nov, 2020"
},
{
"code": null,
"e": 138,
"s": 28,
"text": "Given an integer, the task is to generate a Java Program to Increment by 1 All the Digits of a given Integer."
},
{
"code": null,
"e": 148,
"s": 138,
"text... |
Python Modules | 07 Jun, 2022
A Python module is a file containing Python definitions and statements. A module can define functions, classes, and variables. A module can also include runnable code. Grouping related code into a module makes the code easier to understand and use. It also makes the code logically organized.
Python3
# A si... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n07 Jun, 2022"
},
{
"code": null,
"e": 345,
"s": 52,
"text": "A Python module is a file containing Python definitions and statements. A module can define functions, classes, and variables. A module can also include runnable code. Groupi... |
Maximize the sum of selected numbers from an array to make it empty | 28 Mar, 2022
Given an array A[] of N numbers, we need to maximize the sum of selected numbers following the given operation:
At each step, you need to select a number Ai, delete one occurrence and add it to the sum.
Delete one occurrence of Ai-1 and Ai+1 (if they exist in the array).
Repeat these steps until the array... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n28 Mar, 2022"
},
{
"code": null,
"e": 164,
"s": 52,
"text": "Given an array A[] of N numbers, we need to maximize the sum of selected numbers following the given operation:"
},
{
"code": null,
"e": 255,
"s": 164,
"t... |
Python Program for Range sum queries without updates | 12 Jun, 2022
Given an array arr of integers of size n. We need to compute sum of elements from index i to index j. The queries consisting of i and j index values will be executed multiple times. Examples:
Input : arr[] = {1, 2, 3, 4, 5}
i = 1, j = 3
i = 2, j = 4
Output : 9
12
Input :... | [
{
"code": null,
"e": 53,
"s": 25,
"text": "\n12 Jun, 2022"
},
{
"code": null,
"e": 245,
"s": 53,
"text": "Given an array arr of integers of size n. We need to compute sum of elements from index i to index j. The queries consisting of i and j index values will be executed multiple... |
Tcl - Special Variables | In Tcl, we classify some of the variables as special variables and they have a predefined usage/functionality. The list of specials variables is listed below.
argc
Refers to a number of command-line arguments.
argv
Refers to the list containing the command-line arguments.
argv0
Refers to the file name of the file being... | [
{
"code": null,
"e": 2494,
"s": 2335,
"text": "In Tcl, we classify some of the variables as special variables and they have a predefined usage/functionality. The list of specials variables is listed below."
},
{
"code": null,
"e": 2499,
"s": 2494,
"text": "argc"
},
{
"cod... |
Linux Virtualization – Chroot Jail | 21 Jul, 2021
What is a chroot Jail?
A chroot on Unix operating systems is an operation that changes the apparent root directory for the current running process and its children. The programs that run in this modified environment cannot access the files outside the designated directory tree. This essentially limits thei... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n21 Jul, 2021"
},
{
"code": null,
"e": 75,
"s": 52,
"text": "What is a chroot Jail?"
},
{
"code": null,
"e": 430,
"s": 75,
"text": "A chroot on Unix operating systems is an operation that changes the apparent root di... |
Hibernate Architecture | 02 Aug, 2018
Prerequisites: Introduction of Hibernate
Hibernate: Hibernate is a framework which is used to develop persistence logic which is independent of Database software. In JDBC to develop persistence logic we deal with primitive types. Whereas Hibernate framework we use Objects to develop persistence logic which... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n02 Aug, 2018"
},
{
"code": null,
"e": 93,
"s": 52,
"text": "Prerequisites: Introduction of Hibernate"
},
{
"code": null,
"e": 398,
"s": 93,
"text": "Hibernate: Hibernate is a framework which is used to develop persi... |
LinkedList clone() Method in Java | 10 Dec, 2018
The Java.util.LinkedList.clone() method is used to create a shallow copy of the mentioned linked list. It just creates a copy of the list.
Syntax:
LinkedList.clone()
Parameters: This method does not take any parameters.
Return Value: This function returns a copy of the instance of Linked list.
Below progra... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n10 Dec, 2018"
},
{
"code": null,
"e": 167,
"s": 28,
"text": "The Java.util.LinkedList.clone() method is used to create a shallow copy of the mentioned linked list. It just creates a copy of the list."
},
{
"code": null,
"e":... |
JODA-Time | 07 Aug, 2018
Joda-Time is an API created by joda.org which offers better classes and having efficient methods to handle date and time than classes from java.util package like Calendar, Gregorian Calendar, Date, etc. This API is included in Java 8.0 with the java.time package.
To include we need to import following :
im... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n07 Aug, 2018"
},
{
"code": null,
"e": 292,
"s": 28,
"text": "Joda-Time is an API created by joda.org which offers better classes and having efficient methods to handle date and time than classes from java.util package like Calendar, Gre... |
C++ Program for Sum of squares of first n natural numbers | 16 Dec, 2021
Given a positive integer N. The task is to find 12 + 22 + 32 + ..... + N2.
Examples:
Input : N = 4
Output : 30
12 + 22 + 32 + 42
= 1 + 4 + 9 + 16
= 30
Input : N = 5
Output : 55
Method 1: O(N) The idea is to run a loop from 1 to n and for each i, 1 <= i <= n, find i2 to sum.
CPP
// CPP Program to find sum... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n16 Dec, 2021"
},
{
"code": null,
"e": 103,
"s": 28,
"text": "Given a positive integer N. The task is to find 12 + 22 + 32 + ..... + N2."
},
{
"code": null,
"e": 113,
"s": 103,
"text": "Examples:"
},
{
"code":... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.