title stringlengths 3 221 | text stringlengths 17 477k | parsed listlengths 0 3.17k |
|---|---|---|
Python - tensorflow.expand_dims() - GeeksforGeeks | 21 Aug, 2021
TensorFlow is open-source Python library designed by Google to develop Machine Learning models and deep learning neural networks.
expand_dims() is used to insert an addition dimension in input Tensor.
Syntax: tensorflow.expand_dims( input, axis, name)
Parameters:
input: It is the input Tensor.
axis: It d... | [
{
"code": null,
"e": 25537,
"s": 25509,
"text": "\n21 Aug, 2021"
},
{
"code": null,
"e": 25669,
"s": 25537,
"text": "TensorFlow is open-source Python library designed by Google to develop Machine Learning models and deep learning neural networks. "
},
{
"code": null,
... |
Matplotlib legend in subplot - GeeksforGeeks | 28 Nov, 2021
In this article, we will discuss how Matplotlib can be employed to add legends in subplots. We can add the legend after making the plot by using legend() function
Syntax:
axes[position].legend(loc='best')
where, loc is the location and the ‘best’ places the legend at the location
Approach:
Use subplots()... | [
{
"code": null,
"e": 25537,
"s": 25509,
"text": "\n28 Nov, 2021"
},
{
"code": null,
"e": 25701,
"s": 25537,
"text": "In this article, we will discuss how Matplotlib can be employed to add legends in subplots. We can add the legend after making the plot by using legend() function... |
Lodash _.matches() Method - GeeksforGeeks | 14 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 _.matches method creates a function that performs a partial deep comparison between a given object and source, returning true if the given object has equivalent pr... | [
{
"code": null,
"e": 38679,
"s": 38651,
"text": "\n14 Sep, 2020"
},
{
"code": null,
"e": 39013,
"s": 38679,
"text": "Lodash is a JavaScript library that works on the top of underscore.js. Lodash helps in working with arrays, strings, objects, numbers, etc. The _.matches method cr... |
Error handling during file operations in C/C++ - GeeksforGeeks | 10 Jan, 2022
It is quite common that errors may occur while reading data from a file in C++ or writing data to a file. For example, an error may arise due to the following:
When trying to read a file beyond indicator.
When trying to read a file that does not exist.
When trying to use a file that has not been opened.
Wh... | [
{
"code": null,
"e": 25478,
"s": 25450,
"text": "\n10 Jan, 2022"
},
{
"code": null,
"e": 25638,
"s": 25478,
"text": "It is quite common that errors may occur while reading data from a file in C++ or writing data to a file. For example, an error may arise due to the following:"
... |
Scala String matches() method with example - GeeksforGeeks | 03 Oct, 2019
The matches() method is used to check if the string stated matches the specified regular expression in the argument or not.
Method Definition: Boolean matches(String regex)Return Type: It returns true if the string matches the regular expression else it returns false.
Example #1:
// Scala program of int ma... | [
{
"code": null,
"e": 25285,
"s": 25257,
"text": "\n03 Oct, 2019"
},
{
"code": null,
"e": 25409,
"s": 25285,
"text": "The matches() method is used to check if the string stated matches the specified regular expression in the argument or not."
},
{
"code": null,
"e": 25... |
Autocomplete input suggestion using Python and Flask - GeeksforGeeks | 09 Apr, 2021
In this article, we will learn how to give features like auto-completion to the data that is passed from Flask. Autocomplete basically means predicting the rest of the word when the user types something. This way human interaction also increases with every correct prediction. Let’s see how to do the same.
... | [
{
"code": null,
"e": 25863,
"s": 25835,
"text": "\n09 Apr, 2021"
},
{
"code": null,
"e": 26170,
"s": 25863,
"text": "In this article, we will learn how to give features like auto-completion to the data that is passed from Flask. Autocomplete basically means predicting the rest of... |
Double Layered Text Effect using CSS - GeeksforGeeks | 18 Jun, 2020
The double-layered text effect feature is very new in the world of text-animation targeting animated websites and its users as the audience. The feature basically has two layers for every word and the upper layer can be manipulated by various events such as hover events. The rotation of the upper layer is ... | [
{
"code": null,
"e": 25981,
"s": 25953,
"text": "\n18 Jun, 2020"
},
{
"code": null,
"e": 26436,
"s": 25981,
"text": "The double-layered text effect feature is very new in the world of text-animation targeting animated websites and its users as the audience. The feature basically ... |
Python | Sort list according to other list order - GeeksforGeeks | 11 Jun, 2021
Sorting is an essential utility used in majority of programming, be it for competitive programming or development. Conventional sorting has been dealt earlier many times. This particular article deals with sorting with respect to some other list elements. Let’s discuss certain ways to sort list according t... | [
{
"code": null,
"e": 26141,
"s": 26113,
"text": "\n11 Jun, 2021"
},
{
"code": null,
"e": 26695,
"s": 26141,
"text": "Sorting is an essential utility used in majority of programming, be it for competitive programming or development. Conventional sorting has been dealt earlier many... |
Python | Pandas Index.contains() - GeeksforGeeks | 16 Oct, 2019
Python is a great language for doing data analysis, primarily because of the fantastic ecosystem of data-centric python packages. Pandas is one of those packages and makes importing and analyzing data much easier.
Pandas Index.contains() function return a boolean indicating whether the provided key is in t... | [
{
"code": null,
"e": 25537,
"s": 25509,
"text": "\n16 Oct, 2019"
},
{
"code": null,
"e": 25751,
"s": 25537,
"text": "Python is a great language for doing data analysis, primarily because of the fantastic ecosystem of data-centric python packages. Pandas is one of those packages a... |
Transform the Scaled Matrix to its Original Form in R Programming - Using Matrix Computations - GeeksforGeeks | 18 Jan, 2022
In R programming, a matrix can be scaled and centered using scale() function. But, there is no in-built function to transform the scaled matrix back to the original matrix. In this article, we’ll learn to transform the scaled matrix back to the original matrix using some simple computations.
Attributes of ... | [
{
"code": null,
"e": 26487,
"s": 26459,
"text": "\n18 Jan, 2022"
},
{
"code": null,
"e": 26780,
"s": 26487,
"text": "In R programming, a matrix can be scaled and centered using scale() function. But, there is no in-built function to transform the scaled matrix back to the origina... |
Java Program for Sum of squares of first n natural numbers - GeeksforGeeks | 11 May, 2022
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.
Java
// Java Program to find s... | [
{
"code": null,
"e": 26223,
"s": 26195,
"text": "\n11 May, 2022"
},
{
"code": null,
"e": 26308,
"s": 26223,
"text": "Given a positive integer N. The task is to find 12 + 22 + 32 + ..... + N2.Examples: "
},
{
"code": null,
"e": 26401,
"s": 26308,
"text": "Input... |
Write a program to Calculate Size of a tree | Recursion - GeeksforGeeks | 13 Jan, 2022
Size of a tree is the number of elements present in the tree. Size of the below tree is 5.
Size() function recursively calculates the size of a tree. It works as follows:Size of a tree = Size of left subtree + 1 + Size of right subtree.
Algorithm:
size(tree)
1. If tree is empty then return 0
2. Else
... | [
{
"code": null,
"e": 26201,
"s": 26173,
"text": "\n13 Jan, 2022"
},
{
"code": null,
"e": 26294,
"s": 26201,
"text": "Size of a tree is the number of elements present in the tree. Size of the below tree is 5. "
},
{
"code": null,
"e": 26441,
"s": 26294,
"text"... |
Given an array A[] and a number x, check for pair in A[] with sum as x (aka Two Sum) - GeeksforGeeks | 10 May, 2022
Write a program that, given an array A[] of n numbers and another number x, determines whether or not there exist two elements in A[] whose sum is exactly x.
Examples:
Input: arr[] = {0, -1, 2, -3, 1} x= -2Output: Pair with a given sum -2 is (-3, 1) Valid pair existsExplanation: If w... | [
{
"code": null,
"e": 39003,
"s": 38975,
"text": "\n10 May, 2022"
},
{
"code": null,
"e": 39162,
"s": 39003,
"text": "Write a program that, given an array A[] of n numbers and another number x, determines whether or not there exist two elements in A[] whose sum is exactly x. "
}... |
Aptitude | JavaScript Course Quiz 3 | Question 10 - GeeksforGeeks | 10 May, 2019
What will be the output of the following code?
<script> document.write(NaN == NaN);</script>
(A) true(B) false(C) 1(D) 0Answer: (B)Explanation: Equality operator (== and ===) cannot be used to test a value against NaN. Use Number.isNaN() or isNaN() instead.Hence, it is not equal.Quiz of this Question
Aptit... | [
{
"code": null,
"e": 26013,
"s": 25985,
"text": "\n10 May, 2019"
},
{
"code": null,
"e": 26060,
"s": 26013,
"text": "What will be the output of the following code?"
},
{
"code": "<script> document.write(NaN == NaN);</script>",
"e": 26106,
"s": 26060,
"text": n... |
Distance of chord from center when distance between center and another equal length chord is given - GeeksforGeeks | 09 Mar, 2021
Given two equal length chords of a circle and Distance between the centre and one chord. The task is here to find the distance between the centre and the other chord. Examples:
Input: 48
Output: 48
Input: 82
Output: 82
Below is the implementation of the above approach:Approach: Let AB & CD be the two... | [
{
"code": null,
"e": 26561,
"s": 26533,
"text": "\n09 Mar, 2021"
},
{
"code": null,
"e": 26740,
"s": 26561,
"text": "Given two equal length chords of a circle and Distance between the centre and one chord. The task is here to find the distance between the centre and the other cho... |
4 Dimensional Array in C/C++ - GeeksforGeeks | 18 Feb, 2022
Prerequisite :Array in C/C++, More on array
A four-dimensional (4D) array is an array of array of arrays of arrays or in other words 4D array is a array of 3D array.More dimensions in an array means more data be held, but also means greater difficulty in managing and understanding arrays.
Declaration of a ... | [
{
"code": null,
"e": 25477,
"s": 25449,
"text": "\n18 Feb, 2022"
},
{
"code": null,
"e": 25521,
"s": 25477,
"text": "Prerequisite :Array in C/C++, More on array"
},
{
"code": null,
"e": 25767,
"s": 25521,
"text": "A four-dimensional (4D) array is an array of a... |
Perl | 'e' modifier in Regular Expression - GeeksforGeeks | 07 Jun, 2019
In Perl, the regular expression allows performing various operations on a given string with the use of suitable operators. These operators can perform operations like modification of string, substitution of other substrings, etc. Substitution of a substring in the given string is done with the use of ‘s'(s... | [
{
"code": null,
"e": 25355,
"s": 25327,
"text": "\n07 Jun, 2019"
},
{
"code": null,
"e": 25791,
"s": 25355,
"text": "In Perl, the regular expression allows performing various operations on a given string with the use of suitable operators. These operators can perform operations l... |
How to read value from string.xml in Android? | This example demonstrates how to read value from string.xml in Android.
Step 1 − Create a new project in Android Studio, go to File ⇒ New Project and fill all required details to create a new project.
Step 2 − Add the following code to res/values/strings.xml
<resources>
<string name="app_name">Sample</string>
<... | [
{
"code": null,
"e": 1134,
"s": 1062,
"text": "This example demonstrates how to read value from string.xml in Android."
},
{
"code": null,
"e": 1264,
"s": 1134,
"text": "Step 1 − Create a new project in Android Studio, go to File ⇒ New Project and fill all required details to cr... |
Check whether the number has only first and last bits set | Set 2 - GeeksforGeeks | 08 Apr, 2021
Given a positive integer n, check whether only the first and last bits are set in the binary representation of n. Print ‘Yes’ or ‘No’.Examples:
Input: 9 Output: Yes (9)10 = (1001)2, only the first and last bits are set.Input: 15 Output: No (15)10 = (1111)2, except first and last there are other bits also... | [
{
"code": null,
"e": 24727,
"s": 24699,
"text": "\n08 Apr, 2021"
},
{
"code": null,
"e": 24873,
"s": 24727,
"text": "Given a positive integer n, check whether only the first and last bits are set in the binary representation of n. Print ‘Yes’ or ‘No’.Examples: "
},
{
"co... |
Bootstrap Navigation Bar | A navigation bar is a navigation header that is placed at the top of the
page:
Home
Page 1
Page 2
Page 3
With Bootstrap, a navigation bar can extend or collapse, depending on the
screen size.
A standard navigation bar is created with <nav class="navbar navbar-default">.
The following example shows how to add a naviga... | [
{
"code": null,
"e": 80,
"s": 0,
"text": "A navigation bar is a navigation header that is placed at the top of the \npage:"
},
{
"code": null,
"e": 85,
"s": 80,
"text": "Home"
},
{
"code": null,
"e": 92,
"s": 85,
"text": "Page 1"
},
{
"code": null,
... |
Filter Pattern in Java - GeeksforGeeks | 17 Mar, 2021
Filter pattern or Criteria pattern is a design pattern that enables developers to filter a set of objects using different criteria and chaining them in a decoupled way through logical operations.
Procedure:
Create a class on which Criteria is to be applied.Create an interface for Criteria.Create concrete c... | [
{
"code": null,
"e": 23973,
"s": 23945,
"text": "\n17 Mar, 2021"
},
{
"code": null,
"e": 24169,
"s": 23973,
"text": "Filter pattern or Criteria pattern is a design pattern that enables developers to filter a set of objects using different criteria and chaining them in a decoupled... |
How to Send Spring Boot Kafka JSON Message to Kafka Topic ? | 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 will see how to send Spring Boot Kafk... | [
{
"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,
... |
Java Generics - Bounded Type Parameters | There may be times when you'll want to restrict the kinds of types that are allowed to be passed to a type parameter. For example, a method that operates on numbers might only want to accept instances of Number or its subclasses. This is what bounded type parameters are for.
To declare a bounded type parameter, list th... | [
{
"code": null,
"e": 2916,
"s": 2640,
"text": "There may be times when you'll want to restrict the kinds of types that are allowed to be passed to a type parameter. For example, a method that operates on numbers might only want to accept instances of Number or its subclasses. This is what bounded ty... |
C/C++ Tricky Programs | Here are 10 tricky programs that will test your programming basics.
In C++ programming language, we use quotes to denote the start and end of the text is to be printed. So, printing quotes “ needs a special escape sequence. So, we will use the \” to print quotes in c++.
Live Demo
#include<iostream>
using namespace std... | [
{
"code": null,
"e": 1130,
"s": 1062,
"text": "Here are 10 tricky programs that will test your programming basics."
},
{
"code": null,
"e": 1333,
"s": 1130,
"text": "In C++ programming language, we use quotes to denote the start and end of the text is to be printed. So, printing ... |
Browsable API in Django REST Framework - GeeksforGeeks | 16 Mar, 2021
The browsable API feature in the Django REST framework generates HTML output for different resources. It facilitates interaction with RESTful web service through any web browser. To enable this feature, we should specify text/html for the Content-Type key in the request header. It helps us to use web brows... | [
{
"code": null,
"e": 24346,
"s": 24318,
"text": "\n16 Mar, 2021"
},
{
"code": null,
"e": 24816,
"s": 24346,
"text": "The browsable API feature in the Django REST framework generates HTML output for different resources. It facilitates interaction with RESTful web service through a... |
Lucky number and a sum | Practice | GeeksforGeeks | Given a number N.Find the minimum Lucky number, the sum of whose digits is equal to N.
Note:-Lucky numbers are the positive integers whose decimal representations contain only the lucky digits 4 and 7.
Example 1:
Input:
N=29
Output:
44777
Explanation:
44777 is the smallest number whose
digit-sum(4+4+7+7+7) is equal ... | [
{
"code": null,
"e": 441,
"s": 238,
"text": "Given a number N.Find the minimum Lucky number, the sum of whose digits is equal to N.\nNote:-Lucky numbers are the positive integers whose decimal representations contain only the lucky digits 4 and 7. "
},
{
"code": null,
"e": 453,
"s": ... |
Windows 10 Development - Live Tiles | In this chapter, we will talk about the interaction with a user through tiles. It is the iconic part of Windows 10. Tiles are displayed on the Start Screen as well as on the Start Menu. In other words, it is an application icon asset, which appears in a variety of forms throughout the Windows 10 operating system. They ... | [
{
"code": null,
"e": 2673,
"s": 2284,
"text": "In this chapter, we will talk about the interaction with a user through tiles. It is the iconic part of Windows 10. Tiles are displayed on the Start Screen as well as on the Start Menu. In other words, it is an application icon asset, which appears in a... |
Bitwise Operators | Practice | GeeksforGeeks | Bitwise operators are useful when we want to work with bits. Here, we'll take a look at them.
Given three positive integers a, b and c. Your task is to perform some bitwise operations on them as given below:1. d = a ^ a2. e = c ^ b3. f = a & b4. g = c | (a ^ a)5. e = ~eNote: ^ is for xor. The working of bitwise operato... | [
{
"code": null,
"e": 372,
"s": 278,
"text": "Bitwise operators are useful when we want to work with bits. Here, we'll take a look at them."
},
{
"code": null,
"e": 620,
"s": 372,
"text": "Given three positive integers a, b and c. Your task is to perform some bitwise operations on... |
From Novice to Expert: How to Write a Configuration file in Python | by Xiaoxu Gao | Towards Data Science | When we design software, we normally put a lot of effort into writing high-quality code. But that’s not enough. A good software should also take care of its eco-system, like testing, deployment, network, etc. One of the most important aspects is configuration management.
Good configuration management should allow the s... | [
{
"code": null,
"e": 444,
"s": 172,
"text": "When we design software, we normally put a lot of effort into writing high-quality code. But that’s not enough. A good software should also take care of its eco-system, like testing, deployment, network, etc. One of the most important aspects is configura... |
Twitter Trends Analysis using Python | by Saiteja Kura | Towards Data Science | Twitter, launched in 2006 is one of the most popular social media platforms available today. It helps by providing insights into popular trends and important cultural and political moments. In the Data Science industry twitter analysis can be used for tasks like marketing or product analysis. Twitter data has been used... | [
{
"code": null,
"e": 783,
"s": 172,
"text": "Twitter, launched in 2006 is one of the most popular social media platforms available today. It helps by providing insights into popular trends and important cultural and political moments. In the Data Science industry twitter analysis can be used for tas... |
Plotting Maps with GeoPandas. Beginners Guide to Geospatial Data... | by Ryan Lewis | Towards Data Science | Recently, in my data science program, we were given a project where we needed create a model to predict house prices. The training data set we received included property data relating to square feet, bathroom count, construction grade, etc. The data I was most excited to begin my analysis with was the location data. We... | [
{
"code": null,
"e": 681,
"s": 172,
"text": "Recently, in my data science program, we were given a project where we needed create a model to predict house prices. The training data set we received included property data relating to square feet, bathroom count, construction grade, etc. The data I was... |
Declare syntax error in MySQL Workbench? | The DECLARE syntax must between BEGIN and END. The syntax is as follows −
BEGIN
DECLARE yourVariableName1 dataType,
DECLARE yourVariableName2 dataType,
.
.
.
.
END
Here is the query to avoid DECLARE syntax error in MySQL −
mysql> DELIMITER //
mysql> create procedure declare_Demo()
-> BEGIN
-> DECLARE Name varchar... | [
{
"code": null,
"e": 1136,
"s": 1062,
"text": "The DECLARE syntax must between BEGIN and END. The syntax is as follows −"
},
{
"code": null,
"e": 1226,
"s": 1136,
"text": "BEGIN\nDECLARE yourVariableName1 dataType,\nDECLARE yourVariableName2 dataType,\n.\n.\n.\n.\nEND"
},
{
... |
ZonedDateTime equals() method in Java with Examples - GeeksforGeeks | 10 May, 2019
The equals() method of ZonedDateTime class in Java is used to compare this ZonedDateTime to the another date-time object passed as parameter. The comparison is based on the offset date-time and the zone. Only objects of type ZonedDateTime are compared with each other and other types return false. The value... | [
{
"code": null,
"e": 23868,
"s": 23840,
"text": "\n10 May, 2019"
},
{
"code": null,
"e": 24232,
"s": 23868,
"text": "The equals() method of ZonedDateTime class in Java is used to compare this ZonedDateTime to the another date-time object passed as parameter. The comparison is bas... |
C++ Program to Implement Queue using Linked List | A queue is an abstract data structure that contains a collection of elements. Queue implements the FIFO mechanism i.e the element that is inserted first is also deleted first. In other words, the least recently added element is removed first in a queue.
A program that implements the queue using linked list is given as ... | [
{
"code": null,
"e": 1316,
"s": 1062,
"text": "A queue is an abstract data structure that contains a collection of elements. Queue implements the FIFO mechanism i.e the element that is inserted first is also deleted first. In other words, the least recently added element is removed first in a queue.... |
Beyond Single Point Estimations using Neural Networks | by Elliott Zhu | Towards Data Science | Machine learning algorithms often estimate the first moment (i.e., the mean) of an unknown data generating process. However, applications that go beyond the first moment of distribution fitting can be found in a wide variety of different fields, such as economy [2], engineering [3] and natural sciences [4]. For example... | [
{
"code": null,
"e": 841,
"s": 172,
"text": "Machine learning algorithms often estimate the first moment (i.e., the mean) of an unknown data generating process. However, applications that go beyond the first moment of distribution fitting can be found in a wide variety of different fields, such as e... |
numpy.insert | This function inserts values in the input array along the given axis and before the given index. If the type of values is converted to be inserted, it is different from the input array. Insertion is not done in place and the function returns a new array. Also, if the axis is not mentioned, the input array is flattened.... | [
{
"code": null,
"e": 2564,
"s": 2243,
"text": "This function inserts values in the input array along the given axis and before the given index. If the type of values is converted to be inserted, it is different from the input array. Insertion is not done in place and the function returns a new array... |
How to align pagination in Bootstrap 4 ? - GeeksforGeeks | 10 Nov, 2021
In this article, we will learn how to align pagination on the website using the Bootstrap classes. The Pagination is a very useful component present in the Bootstrap. Pagination is used to enable navigation between pages in a website as it divides the document into different pages and provides them with nu... | [
{
"code": null,
"e": 26863,
"s": 26835,
"text": "\n10 Nov, 2021"
},
{
"code": null,
"e": 27321,
"s": 26863,
"text": "In this article, we will learn how to align pagination on the website using the Bootstrap classes. The Pagination is a very useful component present in the Bootstr... |
Pair with minimum absolute difference | BST - GeeksforGeeks | 09 May, 2022
Given a binary search tree of size N > 1, the task is to find the minimum absolute difference between any two nodes.
Examples:
Input:
5
/ \
3 7
/ \ / \
2 4 6 8
Output: 1
Difference between all the consecutive nodes if sorted is 1.
Thus, the answer is 1.... | [
{
"code": null,
"e": 26225,
"s": 26197,
"text": "\n09 May, 2022"
},
{
"code": null,
"e": 26342,
"s": 26225,
"text": "Given a binary search tree of size N > 1, the task is to find the minimum absolute difference between any two nodes."
},
{
"code": null,
"e": 26353,
... |
Reverse substrings of given string according to specified array indices - GeeksforGeeks | 18 Jun, 2021
Given string str of length N and an array arr[] of integers, for array element arr[i](1-based indexing), reverse the substring in indices [arr[i], N – arr[i] + 1]. The task is to print the string after every reversal.
Examples:
Input: str = “GeeksforGeeks”, arr[] = {2}Output: GkeeGrofskeesExplanation:For f... | [
{
"code": null,
"e": 26403,
"s": 26375,
"text": "\n18 Jun, 2021"
},
{
"code": null,
"e": 26621,
"s": 26403,
"text": "Given string str of length N and an array arr[] of integers, for array element arr[i](1-based indexing), reverse the substring in indices [arr[i], N – arr[i] + 1].... |
Scala Map exists() method with example - GeeksforGeeks | 13 Aug, 2019
The exists() method is utilized to check if the given predicate satisfy the elements of the map or not.
Method Definition: def exists(p: ((A, B)) => Boolean): Boolean
Return Type: It returns true if the stated predicate holds true for some elements of the map else it returns false.
Example #1:
// Scala pro... | [
{
"code": null,
"e": 25301,
"s": 25273,
"text": "\n13 Aug, 2019"
},
{
"code": null,
"e": 25405,
"s": 25301,
"text": "The exists() method is utilized to check if the given predicate satisfy the elements of the map or not."
},
{
"code": null,
"e": 25468,
"s": 25405,... |
CSS @keyframes Rule - GeeksforGeeks | 05 Nov, 2021
The @keyframes rule in CSS is used to specify the animation rule. An animation is created by using changeable CSS styles. During the animation CSS property can change many times.
We need to specify when there is a change in style that takes place in percent, or contains the keywords “from” and “to”, which ... | [
{
"code": null,
"e": 24979,
"s": 24951,
"text": "\n05 Nov, 2021"
},
{
"code": null,
"e": 25158,
"s": 24979,
"text": "The @keyframes rule in CSS is used to specify the animation rule. An animation is created by using changeable CSS styles. During the animation CSS property can cha... |
final Keyword in Java - GeeksforGeeks | 24 Apr, 2022
final keyword is used in different contexts. First of all, final is a non-access modifier applicable only to a variable, a method, or a class. The following are different contexts where final is used.
When a variable is declared with the final keyword, its value can’t be modified, essentially, a constant. ... | [
{
"code": null,
"e": 30195,
"s": 30167,
"text": "\n24 Apr, 2022"
},
{
"code": null,
"e": 30396,
"s": 30195,
"text": "final keyword is used in different contexts. First of all, final is a non-access modifier applicable only to a variable, a method, or a class. The following are di... |
Difference between Cost Variance and Schedule Variance - GeeksforGeeks | 16 May, 2019
Prerequisite – Cost Variance (CV) and Schedule Variance (SV)Cost Variance (CV):Cost variance is basically related with the budget of the project. Cost variance is the difference of the actual cost and the expected cost. Cost Variance is calculated by taking the difference of the Earned Value and the Actual... | [
{
"code": null,
"e": 26067,
"s": 26039,
"text": "\n16 May, 2019"
},
{
"code": null,
"e": 26381,
"s": 26067,
"text": "Prerequisite – Cost Variance (CV) and Schedule Variance (SV)Cost Variance (CV):Cost variance is basically related with the budget of the project. Cost variance is ... |
Quickselect Algorithm - GeeksforGeeks | 10 Aug, 2021
Quickselect is a selection algorithm to find the k-th smallest element in an unordered list. It is related to the quick sort sorting algorithm.Examples:
Input: arr[] = {7, 10, 4, 3, 20, 15}
k = 3
Output: 7
Input: arr[] = {7, 10, 4, 3, 20, 15}
k = 4
Output: 10
The algorithm is simila... | [
{
"code": null,
"e": 25393,
"s": 25365,
"text": "\n10 Aug, 2021"
},
{
"code": null,
"e": 25547,
"s": 25393,
"text": "Quickselect is a selection algorithm to find the k-th smallest element in an unordered list. It is related to the quick sort sorting algorithm.Examples: "
},
{... |
Stack Data Structure (Introduction and Program) - GeeksforGeeks | 24 Apr, 2022
Stack is a linear data structure that follows a particular order in which the operations are performed. The order may be LIFO(Last In First Out) or FILO(First In Last Out).
Mainly the following four basic operations are performed in the stack:
Push: Adds an item to the stack. If the stack is full, then it ... | [
{
"code": null,
"e": 39003,
"s": 38975,
"text": "\n24 Apr, 2022"
},
{
"code": null,
"e": 39176,
"s": 39003,
"text": "Stack is a linear data structure that follows a particular order in which the operations are performed. The order may be LIFO(Last In First Out) or FILO(First In L... |
How to set the input field value dynamically in AngularJS ? - GeeksforGeeks | 29 Sep, 2020
Given an input field and the task is to set the input field value dynamically with the help of AngularJS.
Approach:
A value is being set to the input field despite the user enter something or not.
ng-click event is used to call a function that sets the value to ‘This is GeeksForGeeks’ with the help of ng... | [
{
"code": null,
"e": 26254,
"s": 26226,
"text": "\n29 Sep, 2020"
},
{
"code": null,
"e": 26360,
"s": 26254,
"text": "Given an input field and the task is to set the input field value dynamically with the help of AngularJS."
},
{
"code": null,
"e": 26371,
"s": 2636... |
Kotlin Reflection - GeeksforGeeks | 09 Sep, 2021
Reflection is a set of language and library features that provides the feature of introspecting a given program at runtime. Kotlin reflection is used to utilize class and its members like properties, functions, constructors, etc. at runtime. Along with Java reflection API, Kotlin also provides its own set ... | [
{
"code": null,
"e": 25161,
"s": 25133,
"text": "\n09 Sep, 2021"
},
{
"code": null,
"e": 25658,
"s": 25161,
"text": "Reflection is a set of language and library features that provides the feature of introspecting a given program at runtime. Kotlin reflection is used to utilize cl... |
How to Write DSA Articles on GeeksforGeeks? - GeeksforGeeks | 03 Jan, 2022
GeeksforGeeks provides all the coding enthusiasts an opportunity to showcase their programming and Data Structures & Algorithms skills by writing coding or DSA-based articles. However, a lot of individuals (especially college students or beginners) find it difficult to articulate their learnings & skills a... | [
{
"code": null,
"e": 26273,
"s": 26245,
"text": "\n03 Jan, 2022"
},
{
"code": null,
"e": 26774,
"s": 26273,
"text": "GeeksforGeeks provides all the coding enthusiasts an opportunity to showcase their programming and Data Structures & Algorithms skills by writing coding or DSA-bas... |
Print numbers 1 to N using Indirect recursion - GeeksforGeeks | 13 May, 2022
Given a number N, we need to print numbers from 1 to N with out direct recursion, loops, labels. Basically we need to insert in above code snippet so that it can be able to print numbers from 1 to N?
C
#include <stdio.h>#define N 20;int main(){ // Your code goes Here.}
Examples :
Input : 10
Output : ... | [
{
"code": null,
"e": 25943,
"s": 25915,
"text": "\n13 May, 2022"
},
{
"code": null,
"e": 26144,
"s": 25943,
"text": "Given a number N, we need to print numbers from 1 to N with out direct recursion, loops, labels. Basically we need to insert in above code snippet so that it can b... |
TCS Placement Paper | MCQ 10 - GeeksforGeeks | 21 May, 2019
This is a TCS model placement paper for aptitude preparation. This placement paper will cover aptitude questions that are asked in TCS recruitment drives and also strictly follows the pattern of questions asked in TCS interviews. It is recommended to solve each one of the following questions to increase yo... | [
{
"code": null,
"e": 25539,
"s": 25511,
"text": "\n21 May, 2019"
},
{
"code": null,
"e": 25888,
"s": 25539,
"text": "This is a TCS model placement paper for aptitude preparation. This placement paper will cover aptitude questions that are asked in TCS recruitment drives and also ... |
Python | Output Formatting - GeeksforGeeks | 19 Feb, 2022
There are several ways to present the output of a program. Data can be printed in a human-readable form, or written to a file for future use, or even in some other specified form. Users often want more control over the formatting of output than simply printing space-separated values. There are several ways... | [
{
"code": null,
"e": 42675,
"s": 42647,
"text": "\n19 Feb, 2022"
},
{
"code": null,
"e": 43002,
"s": 42675,
"text": "There are several ways to present the output of a program. Data can be printed in a human-readable form, or written to a file for future use, or even in some other... |
How to display specific properties from Get-Service output in PowerShell? | To display the other properties of the services than the default ones (which are supported by Get-Member), you need to pipeline the Select-Object (alias Select) command. For example, in the below command we will display theService name, start type and status of the service.
Get-Service | Select-Object Name, StartType, ... | [
{
"code": null,
"e": 1337,
"s": 1062,
"text": "To display the other properties of the services than the default ones (which are supported by Get-Member), you need to pipeline the Select-Object (alias Select) command. For example, in the below command we will display theService name, start type and s... |
How to prevent modification of object in JavaScript ?. | ECMAScript 5 has introduced several methods to prevent modification of object. Those preventive measures ensures that no one, accidentally or otherwise change functionality of object.
In this level, one cannot add any new properties or methods but can access existing properties or methods. Here there is an ability to d... | [
{
"code": null,
"e": 1246,
"s": 1062,
"text": "ECMAScript 5 has introduced several methods to prevent modification of object. Those preventive measures ensures that no one, accidentally or otherwise change functionality of object."
},
{
"code": null,
"e": 1550,
"s": 1246,
"text":... |
How to Use FFmpeg in Android with Example? - GeeksforGeeks | 08 Oct, 2021
FFmpeg, short for Fast-forward MPEG, is a free and open-source multimedia framework, which is able to decode, encode, transcode, mux, demux, stream, filter and play fairly all kinds of multimedia files that have been created to date. It also supports some of the eldest formats. FFmpeg compiles and runs, ac... | [
{
"code": null,
"e": 25470,
"s": 25442,
"text": "\n08 Oct, 2021"
},
{
"code": null,
"e": 26887,
"s": 25470,
"text": "FFmpeg, short for Fast-forward MPEG, is a free and open-source multimedia framework, which is able to decode, encode, transcode, mux, demux, stream, filter and pla... |
How to pass data from Parent to Child component in Angular ? - GeeksforGeeks | 12 Mar, 2021
We can use the @Input directive for passing the data from the Parent to Child component in Angular
Using Input Binding: @Input – We can use this directive inside the child component to access the data sent by the parent component. Here app.component is the Parent component and cdetail.component is the chil... | [
{
"code": null,
"e": 25109,
"s": 25081,
"text": "\n12 Mar, 2021"
},
{
"code": null,
"e": 25208,
"s": 25109,
"text": "We can use the @Input directive for passing the data from the Parent to Child component in Angular"
},
{
"code": null,
"e": 25429,
"s": 25208,
... |
How can I get the list of files in a directory using C/C++? | Standard C++ doesn't provide a way to do this. You could use the system command to initialize the ls command as follows −
#include<iostream>
int main () {
char command[50] = "ls -l";
system(command);
return 0;
}
This will give the output −
-rwxrwxrwx 1 root root 9728 Feb 25 20:51 a.out
-rwxrwxrwx 1 root root ... | [
{
"code": null,
"e": 1184,
"s": 1062,
"text": "Standard C++ doesn't provide a way to do this. You could use the system command to initialize the ls command as follows −"
},
{
"code": null,
"e": 1283,
"s": 1184,
"text": "#include<iostream>\nint main () {\n char command[50] = \"l... |
Tryit Editor v3.7 | CSS Text Effects
Tryit: The word-break property | [
{
"code": null,
"e": 26,
"s": 9,
"text": "CSS Text Effects"
}
] |
Sorting a VARCHAR column as FLOAT using the CAST operator isn’t working in MySQL ? | If your cast does not work, then you can use yourColumnName*1 with ORDER BY clause.
Using yourColumnName*1. The syntax is as follows:
SELECT yourColumnName1,yourColumnName2,...N FROM yourTableName ORDER BY yourColumnName*1 DESC;
You can also use CAST() operator. The syntax is as follows:
SELECT yourColumnName1,yourColu... | [
{
"code": null,
"e": 1146,
"s": 1062,
"text": "If your cast does not work, then you can use yourColumnName*1 with ORDER BY clause."
},
{
"code": null,
"e": 1196,
"s": 1146,
"text": "Using yourColumnName*1. The syntax is as follows:"
},
{
"code": null,
"e": 1291,
"... |
HTML DOM Marquee Object - GeeksforGeeks | 10 Mar, 2022
The HTML DOM Marquee Object is used to to represent the HTML <marquee> tag. We know that the <marquee> tag is used to move the content from horizontal to vertical or left to right or right to left.
Syntax
It is used to access the marquee tag.document.getElementById("id");
It is used to access the marque... | [
{
"code": null,
"e": 24919,
"s": 24891,
"text": "\n10 Mar, 2022"
},
{
"code": null,
"e": 25118,
"s": 24919,
"text": "The HTML DOM Marquee Object is used to to represent the HTML <marquee> tag. We know that the <marquee> tag is used to move the content from horizontal to vertical ... |
Can we cast a double value to a byte in java? | Java provides various datatypes to store various data values. It provides 7 primitive datatypes (stores single values) namely, boolean, byte, char, short, int, long, float, double and, reference datatypes (arrays and objects).
Converting one primitive data type into another is known as type casting. There are two types... | [
{
"code": null,
"e": 1289,
"s": 1062,
"text": "Java provides various datatypes to store various data values. It provides 7 primitive datatypes (stores single values) namely, boolean, byte, char, short, int, long, float, double and, reference datatypes (arrays and objects)."
},
{
"code": null... |
R Statistics Data Set | A data set is a collection of data, often presented in a table.
There is a popular built-in data set in R called "mtcars" (Motor Trend Car Road Tests), which is
retrieved from the 1974 Motor Trend US Magazine.
In the examples below (and for the next chapters), we will use the mtcars
data set, for statistical purposes... | [
{
"code": null,
"e": 64,
"s": 0,
"text": "A data set is a collection of data, often presented in a table."
},
{
"code": null,
"e": 211,
"s": 64,
"text": "There is a popular built-in data set in R called \"mtcars\" (Motor Trend Car Road Tests), which is \nretrieved from the 1974 M... |
How to handle the error “Text strings must be rendered within a <Text> component” in ReactNative? | While developing your app you can come across the error as stated above. Here is the
code that gives the error −
import React from "react";
import { Image , Text, View, StyleSheet } from "react-native";
export default class App extends React.Component {
render() {
return (
<View style={styles.containe... | [
{
"code": null,
"e": 1175,
"s": 1062,
"text": "While developing your app you can come across the error as stated above. Here is the\ncode that gives the error −"
},
{
"code": null,
"e": 1845,
"s": 1175,
"text": "import React from \"react\";\nimport { Image , Text, View, StyleShee... |
Discounts - Solved Examples | Q 1 - Find the P.W. of Rs. 9920 due 3 years at 8% p.a.
A - Rs 7000
B - Rs 8000
C - Rs 6000
D - Rs 7000
Answer - B
Explanation
P.W.= ((100 x Amount))/(100+(R x T))
= Rs {(100 x 9920)/(100 (3 x 8))}
= Rs (100 x 9920)/124
= Rs 8000
Q 2 - The genuine rebate on a bill due 9 months consequently at 6% for each annum is Rs.... | [
{
"code": null,
"e": 3947,
"s": 3892,
"text": "Q 1 - Find the P.W. of Rs. 9920 due 3 years at 8% p.a."
},
{
"code": null,
"e": 3959,
"s": 3947,
"text": "A - Rs 7000"
},
{
"code": null,
"e": 3971,
"s": 3959,
"text": "B - Rs 8000"
},
{
"code": null,
... |
10 CSS Selectors Every Developer Should Know - GeeksforGeeks | 02 Sep, 2021
What’s the first thing for any website to create a good impression on a user? ...
Yes...it’s the user interface for any website. Every developer knows how important it is to create a beautiful design for users to interact with any website. Giving styling to the web pages smartly in a minimal amount of tim... | [
{
"code": null,
"e": 28070,
"s": 28042,
"text": "\n02 Sep, 2021"
},
{
"code": null,
"e": 28153,
"s": 28070,
"text": "What’s the first thing for any website to create a good impression on a user? ... "
},
{
"code": null,
"e": 28847,
"s": 28153,
"text": "Yes...i... |
Creating NotePad using PyQt5 - Python - GeeksforGeeks | 15 Dec, 2021
In this article we will see how we can create notepad using PyQt5.Notepad is a generic text editor that allows you to create, open, edit, and read plaintext files.PyQt5 is cross-platform GUI toolkit, a set of python bindings for Qt v5. One can develop an interactive desktop application with so much ease be... | [
{
"code": null,
"e": 24480,
"s": 24452,
"text": "\n15 Dec, 2021"
},
{
"code": null,
"e": 24883,
"s": 24480,
"text": "In this article we will see how we can create notepad using PyQt5.Notepad is a generic text editor that allows you to create, open, edit, and read plaintext files.... |
How to check if a Python variable exists? - GeeksforGeeks | 29 Dec, 2020
Variables in Python can be defined locally or globally. There are two types of variable first one is local variable that is defined inside the function and the second one are global variable that is defined outside the function.
To check the existence of variable locally we are going to use locals() functi... | [
{
"code": null,
"e": 24212,
"s": 24184,
"text": "\n29 Dec, 2020"
},
{
"code": null,
"e": 24441,
"s": 24212,
"text": "Variables in Python can be defined locally or globally. There are two types of variable first one is local variable that is defined inside the function and the sec... |
PyQt5 – Set minimum window size | setMinimumWidth and setMinimumHeight method - GeeksforGeeks | 26 Mar, 2020
When we create a window, by default the window size is resizable although, we can use setMinimumSize() method to set the minimum size of the window. But what if we want to set minimum length only for width or height only, in order to do so we use setMinimumWidth() method to set minimum width and setMinimum... | [
{
"code": null,
"e": 23901,
"s": 23873,
"text": "\n26 Mar, 2020"
},
{
"code": null,
"e": 24376,
"s": 23901,
"text": "When we create a window, by default the window size is resizable although, we can use setMinimumSize() method to set the minimum size of the window. But what if we... |
How do I get the parent directory in Python? | In Python 3.4+ you can use the pathlib module to get the parent directory.
from pathlib import Path
print(Path('/home/username').parent)
This will give the output:
/home
In older versions, you can call the os.path.join on your path and '..'(represents parent directory) and then find its absolute path using os.path.absp... | [
{
"code": null,
"e": 1137,
"s": 1062,
"text": "In Python 3.4+ you can use the pathlib module to get the parent directory."
},
{
"code": null,
"e": 1199,
"s": 1137,
"text": "from pathlib import Path\nprint(Path('/home/username').parent)"
},
{
"code": null,
"e": 1226,
... |
Difference between Thread and Runnable in Java | There are two ways to create a new thread of execution. One is to declare a class to be a subclass of the Thread class. This subclass should override the run method of the Thread class. An instance of the subclass can then be allocated and started.
The other way to create a thread is to declare a class that implements ... | [
{
"code": null,
"e": 1311,
"s": 1062,
"text": "There are two ways to create a new thread of execution. One is to declare a class to be a subclass of the Thread class. This subclass should override the run method of the Thread class. An instance of the subclass can then be allocated and started."
}... |
tf.keras and TensorFlow: Batch Normalization to train deep neural networks faster | by Chris Rawles | Towards Data Science | Training deep neural networks can be time consuming. In particular, training can be significantly impeded by vanishing gradients, which occurs when a network stops updating because the gradients, particularly in earlier layers, have approached zero values. Incorporating Xavier weight-initialization and ReLu activation ... | [
{
"code": null,
"e": 723,
"s": 172,
"text": "Training deep neural networks can be time consuming. In particular, training can be significantly impeded by vanishing gradients, which occurs when a network stops updating because the gradients, particularly in earlier layers, have approached zero values... |
Conjugate Prior Explained. With examples & proofs | by Aerin Kim | Towards Data Science | Prior probability is the probability of an event before we see the data.In Bayesian Inference, the prior is our guess about the probability based on what we know now, before new data becomes available.
Conjugate prior just can not be understood without knowing Bayesian inference.
For the rest of the blog, I’ll assume y... | [
{
"code": null,
"e": 373,
"s": 171,
"text": "Prior probability is the probability of an event before we see the data.In Bayesian Inference, the prior is our guess about the probability based on what we know now, before new data becomes available."
},
{
"code": null,
"e": 452,
"s": 37... |
A new plot theme for Matplotlib — Gadfly | by Jonny Brooks-Bartlett | Towards Data Science | I’ve made a plotting theme for Matplotlib that’s inspired by the default plotting theme used in Gadfly for the Julia programming language. Typically I’d just write the code in Julia, which is what I’ve done for many of my previous blog posts. However, since upgrading to Julia v1.0, I’ve been unable to import Gadfly, wh... | [
{
"code": null,
"e": 616,
"s": 172,
"text": "I’ve made a plotting theme for Matplotlib that’s inspired by the default plotting theme used in Gadfly for the Julia programming language. Typically I’d just write the code in Julia, which is what I’ve done for many of my previous blog posts. However, sin... |
New Features in ECMAScript 2021 Update - GeeksforGeeks | 14 Jul, 2021
ECMAScript is a part of JavaScript language which is mostly used in web technology, building websites, or web apps. ECMAScript is growing as one of the world’s most widely used general-purpose programming languages. It is majorly used in embedding with web browsers and also adopted for server and embedded ... | [
{
"code": null,
"e": 24934,
"s": 24906,
"text": "\n14 Jul, 2021"
},
{
"code": null,
"e": 25255,
"s": 24934,
"text": "ECMAScript is a part of JavaScript language which is mostly used in web technology, building websites, or web apps. ECMAScript is growing as one of the world’s mos... |
EJB - Callbacks | Callback is a mechanism by which the life cycle of an enterprise bean can be intercepted. EJB 3.0 specification has specified callbacks for which callback handler methods are created. EJB Container calls these callbacks. We can define callback methods in the EJB class itself or in a separate class. EJB 3.0 has provided... | [
{
"code": null,
"e": 2400,
"s": 2047,
"text": "Callback is a mechanism by which the life cycle of an enterprise bean can be intercepted. EJB 3.0 specification has specified callbacks for which callback handler methods are created. EJB Container calls these callbacks. We can define callback methods i... |
OpenNLP - Sentence Detection | While processing a natural language, deciding the beginning and end of the sentences is one of the problems to be addressed. This process is known as Sentence Boundary Disambiguation (SBD) or simply sentence breaking.
The techniques we use to detect the sentences in the given text, depends on the language of the text.
... | [
{
"code": null,
"e": 2070,
"s": 1852,
"text": "While processing a natural language, deciding the beginning and end of the sentences is one of the problems to be addressed. This process is known as Sentence Boundary Disambiguation (SBD) or simply sentence breaking."
},
{
"code": null,
"e"... |
Express.js | app.post() Function - GeeksforGeeks | 10 Jun, 2020
The app.post() function routes the HTTP POST requests to the specified path with the specified callback functions.
Syntax:
app.post(path, callback [, callback ...])
Arguments:
Path: The path for which the middleware function is invoked and can be any of:A string representing a path.A path pattern.A regular... | [
{
"code": null,
"e": 24310,
"s": 24282,
"text": "\n10 Jun, 2020"
},
{
"code": null,
"e": 24425,
"s": 24310,
"text": "The app.post() function routes the HTTP POST requests to the specified path with the specified callback functions."
},
{
"code": null,
"e": 24433,
... |
Sales vs. Profit (Quadrant) Analysis in Tableau | by Sree | Towards Data Science | To quickly identify the best performing categories in any sales dataset using quadrant analysis in Tableau.
Details: A quadrant chart is nothing but a scatter plot that has four equal components. Each quadrant upholds data points that have similar characteristics. Here is a step-by-step approach on how to do a quadrant... | [
{
"code": null,
"e": 279,
"s": 171,
"text": "To quickly identify the best performing categories in any sales dataset using quadrant analysis in Tableau."
},
{
"code": null,
"e": 631,
"s": 279,
"text": "Details: A quadrant chart is nothing but a scatter plot that has four equal co... |
OpenShift - CLI Operations | OpenShift CLI is capable of performing all basic and advance configuration, management, addition, and deployment of applications.
We can perform different kinds of operations using OC commands. This client helps you develop, build, deploy, and run your applications on any OpenShift or Kubernetes compatible platform. It... | [
{
"code": null,
"e": 2078,
"s": 1948,
"text": "OpenShift CLI is capable of performing all basic and advance configuration, management, addition, and deployment of applications."
},
{
"code": null,
"e": 2362,
"s": 2078,
"text": "We can perform different kinds of operations using O... |
jQuery - DOM Traversing | jQuery is a very powerful tool which provides a variety of DOM traversal methods to help us select elements in a document randomly as well as in sequential method. Most of the DOM Traversal Methods do not modify the jQuery object and they are used to filter out elements from a document based on given conditions.
Consid... | [
{
"code": null,
"e": 2636,
"s": 2322,
"text": "jQuery is a very powerful tool which provides a variety of DOM traversal methods to help us select elements in a document randomly as well as in sequential method. Most of the DOM Traversal Methods do not modify the jQuery object and they are used to fi... |
Print array of strings in sorted order without copying one string into another - GeeksforGeeks | 26 Apr, 2021
Given an array of n strings. The task is to print the strings in sorted order. The approach should be such that no string should be copied to another string during the sorting process.
Examples:
Input : {"geeks", "for", "geeks", "quiz")
Output : for geeks geeks quiz
Input : {"ball", "pen", "apple", "kite"... | [
{
"code": null,
"e": 26323,
"s": 26295,
"text": "\n26 Apr, 2021"
},
{
"code": null,
"e": 26508,
"s": 26323,
"text": "Given an array of n strings. The task is to print the strings in sorted order. The approach should be such that no string should be copied to another string during... |
Python | Pandas Series.dt.date - GeeksforGeeks | 20 Mar, 2019
Series.dt can be used to access the values of the series as datetimelike and return several properties. Pandas Series.dt.date attribute return a numpy array of python datetime.date objects.
Syntax: Series.dt.date
Parameter : None
Returns : numpy array
Example #1: Use Series.dt.date attribute to return the ... | [
{
"code": null,
"e": 26093,
"s": 26065,
"text": "\n20 Mar, 2019"
},
{
"code": null,
"e": 26283,
"s": 26093,
"text": "Series.dt can be used to access the values of the series as datetimelike and return several properties. Pandas Series.dt.date attribute return a numpy array of pyt... |
jQuery | ajaxError() Method - GeeksforGeeks | 01 Mar, 2019
The ajaxError() method in jQuery is used to specify function to be run when an AJAX request fails.
Syntax:
$(document).ajaxError( function(event, xhr, options, exc) )
Parameter:: This method accepts single parameter function which is mandatory. This function accepts four parameters which are listed below:
... | [
{
"code": null,
"e": 41968,
"s": 41940,
"text": "\n01 Mar, 2019"
},
{
"code": null,
"e": 42067,
"s": 41968,
"text": "The ajaxError() method in jQuery is used to specify function to be run when an AJAX request fails."
},
{
"code": null,
"e": 42075,
"s": 42067,
... |
Types of Threads in C# - GeeksforGeeks | 15 Sep, 2021
Multi-threading is the most useful feature of C# which allows concurrent programming of two or more parts of the program for maximizing the utilization of the CPU. Each part of a program is called Thread. So, in other words, threads are lightweight processes within a process. C# supports two types of threa... | [
{
"code": null,
"e": 25993,
"s": 25965,
"text": "\n15 Sep, 2021"
},
{
"code": null,
"e": 26320,
"s": 25993,
"text": "Multi-threading is the most useful feature of C# which allows concurrent programming of two or more parts of the program for maximizing the utilization of the CPU.... |
Search insert position of K in a sorted array - GeeksforGeeks | 27 Apr, 2022
Given a sorted array arr[] consisting of N distinct integers and an integer K, the task is to find the index of K, if it’s present in the array arr[]. Otherwise, find the index where K must be inserted to keep the array sorted.
Examples:
Input: arr[] = {1, 3, 5, 6}, K = 5Output: 2Explanation: Since 5 is f... | [
{
"code": null,
"e": 26373,
"s": 26345,
"text": "\n27 Apr, 2022"
},
{
"code": null,
"e": 26601,
"s": 26373,
"text": "Given a sorted array arr[] consisting of N distinct integers and an integer K, the task is to find the index of K, if it’s present in the array arr[]. Otherwise, f... |
Minimum time required to fill a cistern using N pipes - GeeksforGeeks | 13 Apr, 2021
Given the time required by a total of N+1 pipes where N pipes are used to fill the Cistern and a single pipe is used to empty the Cistern. The task is to Calculate the amount of time in which the Cistern will get filled if all the N+1 pipes are opened together.
Examples:
Input: n = 2,
pipe1 = 12 hours, p... | [
{
"code": null,
"e": 25937,
"s": 25909,
"text": "\n13 Apr, 2021"
},
{
"code": null,
"e": 26199,
"s": 25937,
"text": "Given the time required by a total of N+1 pipes where N pipes are used to fill the Cistern and a single pipe is used to empty the Cistern. The task is to Calculate... |
Optimal partition of an array into four parts - GeeksforGeeks | 21 Jun, 2021
Given an array of n non-negative integers. Choose three indices i.e. (0 <= index_1 <= index_ 2<= index_3 <= n) from the array to make four subsets such that the term sum(0, index_1) – sum(index_1, index_2) + sum(index_2, index_3) – sum(index_3, n) is maximum possible. Here, two indices say l and r means, t... | [
{
"code": null,
"e": 26273,
"s": 26245,
"text": "\n21 Jun, 2021"
},
{
"code": null,
"e": 26953,
"s": 26273,
"text": "Given an array of n non-negative integers. Choose three indices i.e. (0 <= index_1 <= index_ 2<= index_3 <= n) from the array to make four subsets such that the te... |
Fermat's Factorization method for large numbers - GeeksforGeeks | 17 Apr, 2020
Given a large number N, the task is to divide this number into a product of two factors, using Fermat’s Factorisation method.
Examples
Input: N = 105327569Output: 10223, 10303
Input: N = 249803Output: 23, 10861
Fermat Factorization: Fermat’s Factorization method is based on the representation of an odd int... | [
{
"code": null,
"e": 25985,
"s": 25957,
"text": "\n17 Apr, 2020"
},
{
"code": null,
"e": 26111,
"s": 25985,
"text": "Given a large number N, the task is to divide this number into a product of two factors, using Fermat’s Factorisation method."
},
{
"code": null,
"e": ... |
Largest Even and Odd N-digit numbers - GeeksforGeeks | 25 Mar, 2021
Given an integer N, the task is to find the largest even and odd N-digit numbers.Examples:
Input: N = 4 Output: Even = 9998 Odd = 9999Input: N = 2 Output: Even = 98 Odd = 99
Approach:
Largest N-digit even number will be (10n) – 2 because the series for different values of N will be 8, 98, 998, 9998... | [
{
"code": null,
"e": 25961,
"s": 25933,
"text": "\n25 Mar, 2021"
},
{
"code": null,
"e": 26054,
"s": 25961,
"text": "Given an integer N, the task is to find the largest even and odd N-digit numbers.Examples: "
},
{
"code": null,
"e": 26139,
"s": 26054,
"text"... |
Page Faults in LFU | Implementation - GeeksforGeeks | 02 Jun, 2021
Overview :
In this, it is using the concept of paging for memory management, a page replacement algorithm is needed to decide which page needs to be replaced when the new page comes in. Whenever a new page is referred to and is not present in memory, the page fault occurs and the Operating System replaces ... | [
{
"code": null,
"e": 25651,
"s": 25623,
"text": "\n02 Jun, 2021"
},
{
"code": null,
"e": 25662,
"s": 25651,
"text": "Overview :"
},
{
"code": null,
"e": 26200,
"s": 25662,
"text": "In this, it is using the concept of paging for memory management, a page replac... |
MongoDB - $slice Modifier - GeeksforGeeks | 10 May, 2020
MongoDB provides different types of array update operators to update the values of the array fields in the documents and $slice modifier is one of them. This modifier is used to limit the number of array items during a $push operation.
Syntax:
{
$push: {
<field>: {
$each: [ <value1>, <value2>... | [
{
"code": null,
"e": 25517,
"s": 25489,
"text": "\n10 May, 2020"
},
{
"code": null,
"e": 25753,
"s": 25517,
"text": "MongoDB provides different types of array update operators to update the values of the array fields in the documents and $slice modifier is one of them. This modif... |
Python | Numpy matrix.std() - GeeksforGeeks | 20 May, 2019
With the help of matrix.std() method, we are able to find the standard deviation a matrix by using the same method.
Syntax : matrix.std()Return : Return standard deviation of a matrix
Example #1 :In this example we are able to find the standard deviation of a matrix by using matrix.std() method.
# import t... | [
{
"code": null,
"e": 26139,
"s": 26111,
"text": "\n20 May, 2019"
},
{
"code": null,
"e": 26255,
"s": 26139,
"text": "With the help of matrix.std() method, we are able to find the standard deviation a matrix by using the same method."
},
{
"code": null,
"e": 26323,
... |
HTML | <option> label Attribute - GeeksforGeeks | 07 Aug, 2019
The HTML option label Attribute is used to specify the text value which represents the shorted label for option. The shortest version will be displayed in the drop-down list.
Syntax:
<option label="text">
Attribute Values: It contains single value text which specify the shorter version for an option.
Below... | [
{
"code": null,
"e": 27179,
"s": 27151,
"text": "\n07 Aug, 2019"
},
{
"code": null,
"e": 27354,
"s": 27179,
"text": "The HTML option label Attribute is used to specify the text value which represents the shorted label for option. The shortest version will be displayed in the drop... |
Pandas.set_option() function in Python - GeeksforGeeks | 28 Jul, 2020
Pandas have an options system that lets you customize some aspects of its behavior, display-related options being those the user is most likely to adjust. Let us see how to set the value of a specified option.
Syntax : pandas.set_option(pat, value)
Parameters :
pat : Regexp which should match a single opti... | [
{
"code": null,
"e": 25389,
"s": 25361,
"text": "\n28 Jul, 2020"
},
{
"code": null,
"e": 25599,
"s": 25389,
"text": "Pandas have an options system that lets you customize some aspects of its behavior, display-related options being those the user is most likely to adjust. Let us s... |
Implementing Non-contiguous Memory Management Techniques - GeeksforGeeks | 14 Apr, 2020
Memory Management Techniques are basic techniques that are used in managing the memory in operating system. Memory Management Techniques are basically classified into two categories:
(i) Contiguous
(ii) Non-contiguous
We have already discussed the implementation of contiguous in the article Implementation... | [
{
"code": null,
"e": 25627,
"s": 25599,
"text": "\n14 Apr, 2020"
},
{
"code": null,
"e": 25810,
"s": 25627,
"text": "Memory Management Techniques are basic techniques that are used in managing the memory in operating system. Memory Management Techniques are basically classified i... |
Python Program to Compute Life Path Number - GeeksforGeeks | 24 Jan, 2021
Given a String of date of format YYYYMMDD, our task is to compute the life path number. Life Path Number is the number obtained by summation of individual digits of each element repeatedly till single digit, of datestring. Used in Numerology Predictions.
Examples:
Input : test_str = “19970314”
Output : 7
... | [
{
"code": null,
"e": 26077,
"s": 26049,
"text": "\n24 Jan, 2021"
},
{
"code": null,
"e": 26333,
"s": 26077,
"text": "Given a String of date of format YYYYMMDD, our task is to compute the life path number. Life Path Number is the number obtained by summation of individual digits ... |
wxPython - Change Button Label Font - GeeksforGeeks | 06 Jan, 2022
In this article we are going to learn that how can we change the font of the label text present on the button present in the frame. We need to follow some steps as follows:
Step 1: Create a wx.Font object. Step 2: Add different attributes of font in parameters like: family, style etc. Step 3: Set font by ... | [
{
"code": null,
"e": 25903,
"s": 25875,
"text": "\n06 Jan, 2022"
},
{
"code": null,
"e": 26077,
"s": 25903,
"text": "In this article we are going to learn that how can we change the font of the label text present on the button present in the frame. We need to follow some steps as... |
Java IO : Input-output in Java with Examples - GeeksforGeeks | 01 Sep, 2021
Java brings various Streams with its I/O package that helps the user to perform all the input-output operations. These streams support all the types of objects, data-types, characters, files etc to fully execute the I/O operations.
Before exploring various input and output streams lets look at 3 standard o... | [
{
"code": null,
"e": 25607,
"s": 25579,
"text": "\n01 Sep, 2021"
},
{
"code": null,
"e": 25839,
"s": 25607,
"text": "Java brings various Streams with its I/O package that helps the user to perform all the input-output operations. These streams support all the types of objects, da... |
Overview of WorkManager in Android Architecture Components - GeeksforGeeks | 30 Dec, 2021
Android WorkManager could be thought of as a backgrounding library that is employed to execute background tasks that should run in a guaranteed way but not necessarily immediately. With WorkManager we’ll enqueue our backgrounding even when the app isn’t running and even when the device is rebooted for a c... | [
{
"code": null,
"e": 26381,
"s": 26353,
"text": "\n30 Dec, 2021"
},
{
"code": null,
"e": 26850,
"s": 26381,
"text": "Android WorkManager could be thought of as a backgrounding library that is employed to execute background tasks that should run in a guaranteed way but not necess... |
How to apply multiple CSS properties using jQuery? | Apply multiple CSS properties using a single JQuery method CSS( {key1:val1, key2:val2....). You can apply as many properties as you like in a single call.
Here is the syntax for the method −
selector.css( {key1:val1, key2:val2....keyN:valN})
Here you can pass key as property and val as its value as described above.
You... | [
{
"code": null,
"e": 1217,
"s": 1062,
"text": "Apply multiple CSS properties using a single JQuery method CSS( {key1:val1, key2:val2....). You can apply as many properties as you like in a single call."
},
{
"code": null,
"e": 1253,
"s": 1217,
"text": "Here is the syntax for the ... |
Sort a stack | Practice | GeeksforGeeks | Given a stack, the task is to sort it such that the top of the stack has the greatest element.
Example 1:
Input:
Stack: 3 2 1
Output: 3 2 1
Example 2:
Input:
Stack: 11 2 32 3 41
Output: 41 32 11 3 2
Your Task:
You don't have to read input or print anything. Your task is to complete the function sort() which sorts the... | [
{
"code": null,
"e": 333,
"s": 238,
"text": "Given a stack, the task is to sort it such that the top of the stack has the greatest element."
},
{
"code": null,
"e": 344,
"s": 333,
"text": "Example 1:"
},
{
"code": null,
"e": 379,
"s": 344,
"text": "Input:\nSta... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.