title
stringlengths
3
221
text
stringlengths
17
477k
parsed
listlengths
0
3.17k
How to Build a Sticky Notes Application in Android Studio? - GeeksforGeeks
15 Jun, 2021 We as humans tend to forget some small but important things, and to resolve this we try to write those things up and paste them somewhere, we often have eyes on. And in this digital era, the things we are most likely to see are laptop, computer, or mobile phone screens. For this, we all have once used the ...
[ { "code": null, "e": 25142, "s": 25114, "text": "\n15 Jun, 2021" }, { "code": null, "e": 25589, "s": 25142, "text": "We as humans tend to forget some small but important things, and to resolve this we try to write those things up and paste them somewhere, we often have eyes on. A...
MySQL Client Programs
There are 7 client programs, which are listed below − mysql mysql mysqladmin mysqladmin mysqlcheck mysqlcheck mysqldump mysqldump mysqlimportmysqlpump mysqlimportmysqlpump mysqlshow mysqlshow mysqlslap mysqlslap Let us understand the MySQL client programs in brief − The mysql is a simple SQL shell that has input line e...
[ { "code": null, "e": 1116, "s": 1062, "text": "There are 7 client programs, which are listed below −" }, { "code": null, "e": 1122, "s": 1116, "text": "mysql" }, { "code": null, "e": 1128, "s": 1122, "text": "mysql" }, { "code": null, "e": 1139, ...
PostgreSQL – DATE_TRUNC Function
01 Feb, 2021 In PostgreSQL, DATE_TRUNC Function is used to truncate a timestamp type or interval type with specific and high level of precision. Syntax: date_trunc('datepart', field) The datepart argument in the above syntax is used to truncate one of the field,below listed field type: millennium century decade year q...
[ { "code": null, "e": 28, "s": 0, "text": "\n01 Feb, 2021" }, { "code": null, "e": 160, "s": 28, "text": "In PostgreSQL, DATE_TRUNC Function is used to truncate a timestamp type or interval type with specific and high level of precision." }, { "code": null, "e": 199, ...
Python | Remove punctuation from string
30 Jun, 2021 Many times while working with Python strings, we have a problem in which we need to remove certain characters from strings. This can have application in data preprocessing in the Data Science domain and also in day-day programming. Let’s discuss certain ways in which we can perform this task. Method #1 : ...
[ { "code": null, "e": 53, "s": 25, "text": "\n30 Jun, 2021" }, { "code": null, "e": 348, "s": 53, "text": "Many times while working with Python strings, we have a problem in which we need to remove certain characters from strings. This can have application in data preprocessing in...
How to count unique values inside a list
25 Jan, 2022 There are several methods for finding or counting unique items inside a list in Python. Here we’ll discuss 3 methods. Method 1: The first method is the brute force approach. This method is not very much efficient as it takes more time and space. In this method, we take an empty array and a count variable(...
[ { "code": null, "e": 53, "s": 25, "text": "\n25 Jan, 2022" }, { "code": null, "e": 171, "s": 53, "text": "There are several methods for finding or counting unique items inside a list in Python. Here we’ll discuss 3 methods." }, { "code": null, "e": 182, "s": 171, ...
Random Walk (Implementation in Python)
06 Nov, 2021 Introduction A random walk is a mathematical object, known as a stochastic or random process, that describes a path that consists of a succession of random steps on some mathematical space such as the integers. An elementary example of a random walk is the random walk on the integer number line, which star...
[ { "code": null, "e": 54, "s": 26, "text": "\n06 Nov, 2021" }, { "code": null, "e": 1208, "s": 54, "text": "Introduction A random walk is a mathematical object, known as a stochastic or random process, that describes a path that consists of a succession of random steps on some mat...
Search for an element in a Mountain Array
31 May, 2021 Given a mountain array arr[] and an integer X, the task is to find the smallest index of X in the given array. If no such index is found, print -1. Examples: Input: arr = {1, 2, 3, 4, 5, 3, 1}, X = 3Output: 2Explanation: The smallest index of X(= 3) in the array is 2. Therefore, the required output is 2. I...
[ { "code": null, "e": 52, "s": 24, "text": "\n31 May, 2021" }, { "code": null, "e": 200, "s": 52, "text": "Given a mountain array arr[] and an integer X, the task is to find the smallest index of X in the given array. If no such index is found, print -1." }, { "code": null...
Maximum difference of zeros and ones in binary string
04 Jul, 2022 Given a binary string of 0s and 1s. The task is to find the length of the substring which is having a maximum difference between the number of 0s and the number of 1s (number of 0s – number of 1s). In case of all 1s print -1. Examples: Input : S = "11000010001" Output : 6 From index 2 to index 9, there ar...
[ { "code": null, "e": 54, "s": 26, "text": "\n04 Jul, 2022" }, { "code": null, "e": 280, "s": 54, "text": "Given a binary string of 0s and 1s. The task is to find the length of the substring which is having a maximum difference between the number of 0s and the number of 1s (number...
Practice Questions for Recursion | Set 7 - GeeksforGeeks
13 May, 2022 Question 1 Predict the output of the following program. What does the following fun() do in general? C++ C Java Python3 C# Javascript #include <iostream>using namespace std; int fun(int n, int* fp){ int t, f; if (n <= 2) { *fp = 1; return 1; } t = fun(n - 1, fp); f = t + *fp;...
[ { "code": null, "e": 26303, "s": 26275, "text": "\n13 May, 2022" }, { "code": null, "e": 26405, "s": 26303, "text": "Question 1 Predict the output of the following program. What does the following fun() do in general? " }, { "code": null, "e": 26409, "s": 26405, ...
MongoDB Python | Insert and Update Data - GeeksforGeeks
20 Mar, 2020 Prerequisites : MongoDB Python BasicsWe would first understand how to insert a document/entry in a collection of a database. Then we would work on how to update an existing document in MongoDB using pymongo library in python. The update commands helps us to update the query data inserted already in MongoDB...
[ { "code": null, "e": 25395, "s": 25367, "text": "\n20 Mar, 2020" }, { "code": null, "e": 25724, "s": 25395, "text": "Prerequisites : MongoDB Python BasicsWe would first understand how to insert a document/entry in a collection of a database. Then we would work on how to update an...
How to add Matplotlib graph in Kivy ? - GeeksforGeeks
05 Apr, 2021 In this article, we will discuss how to add matplotlib graph in the kivy app. Import matplotlib pyplot Import numpy Import FigureCanvas KivyAgg Import kivy app Import kivy builder Create App class Return builder string Run an instance of the class Below is the Implementation. Python3 # importing pyplot for...
[ { "code": null, "e": 25561, "s": 25533, "text": "\n05 Apr, 2021" }, { "code": null, "e": 25639, "s": 25561, "text": "In this article, we will discuss how to add matplotlib graph in the kivy app." }, { "code": null, "e": 25664, "s": 25639, "text": "Import matpl...
Minimum number of elements to add to make median equals x - GeeksforGeeks
26 Mar, 2021 A median in an array with the length of n is an element which occupies position number (n+1)/2 after we sort the elements in the non-decreasing order (the array elements are numbered starting with 1). A median of an array (2, 6, 1, 2, 3) is the number 2, and a median of array (0, 96, 17, 23) — the number 1...
[ { "code": null, "e": 26523, "s": 26495, "text": "\n26 Mar, 2021" }, { "code": null, "e": 26833, "s": 26523, "text": "A median in an array with the length of n is an element which occupies position number (n+1)/2 after we sort the elements in the non-decreasing order (the array el...
How to find width and height of an image using Python? - GeeksforGeeks
13 Jan, 2021 In this article, we are going to discuss how to get the height and width of a particular image. In order to find the height and width of an image, there are two approaches. The first approach is by using the PIL(Pillow) library and the second approach is by using the Open-CV library. Approach 1: PIL is the...
[ { "code": null, "e": 25555, "s": 25527, "text": "\n13 Jan, 2021" }, { "code": null, "e": 25651, "s": 25555, "text": "In this article, we are going to discuss how to get the height and width of a particular image." }, { "code": null, "e": 25840, "s": 25651, "te...
RIPEMD Hash Function - GeeksforGeeks
10 Feb, 2020 Hash Function is a function that has a huge role in making a System Secure as it converts normal data given to it as an irregular value of fixed length. We can imagine it to be a Shaker in our homes. When we put data into this function it outputs an irregular value. The Irregular value it outputs is known ...
[ { "code": null, "e": 25771, "s": 25743, "text": "\n10 Feb, 2020" }, { "code": null, "e": 26262, "s": 25771, "text": "Hash Function is a function that has a huge role in making a System Secure as it converts normal data given to it as an irregular value of fixed length. We can ima...
Permutation Hypothesis Test in R Programming - GeeksforGeeks
24 Nov, 2020 In simple words, the permutation hypothesis test in R is a way of comparing a numerical value of 2 groups. The permutation Hypothesis test is an alternative to: Independent two-sample t-test Mann-Whitney U aka Wilcoxon Rank-Sum Test Let’s implement this test in R programming. Small Sample Size. Assumpti...
[ { "code": null, "e": 26487, "s": 26459, "text": "\n24 Nov, 2020" }, { "code": null, "e": 26649, "s": 26487, "text": "In simple words, the permutation hypothesis test in R is a way of comparing a numerical value of 2 groups. The permutation Hypothesis test is an alternative to: " ...
BigDecimal compareTo() Function in Java - GeeksforGeeks
04 Dec, 2018 The java.math.BigDecimal.compareTo(BigDecimal bg) method checks for equality of this BigDecimal and BigDecimal object bg passed as parameter. The method considers two equal BigDecimal objects even if they are equal in value irrespective of the scale. Syntax: public int compareTo(BigDecimal bg) Parameters:T...
[ { "code": null, "e": 25688, "s": 25660, "text": "\n04 Dec, 2018" }, { "code": null, "e": 25939, "s": 25688, "text": "The java.math.BigDecimal.compareTo(BigDecimal bg) method checks for equality of this BigDecimal and BigDecimal object bg passed as parameter. The method considers ...
ex command in Linux with examples - GeeksforGeeks
15 May, 2019 ex(stands for extended) is a text editor in Linux which is also termed as the line editor mode of the vi editor. This editor simply provided some editing commands which has greater mobility. With the help of this editor, a user can easily move between files. Also, he/she has a lot of ways to transfer the t...
[ { "code": null, "e": 25651, "s": 25623, "text": "\n15 May, 2019" }, { "code": null, "e": 26158, "s": 25651, "text": "ex(stands for extended) is a text editor in Linux which is also termed as the line editor mode of the vi editor. This editor simply provided some editing commands ...
Class template with multiple parameters - GeeksforGeeks
27 Jun, 2017 Prerequisite: Templates in C++ While creating templates, it is possible to specify more than one type. We can use more than one generic data type in a class template. They are declared as a comma-separated list within the template as below:Syntax: template<class T1, class T2, ...> class classname { ....
[ { "code": null, "e": 25369, "s": 25341, "text": "\n27 Jun, 2017" }, { "code": null, "e": 25400, "s": 25369, "text": "Prerequisite: Templates in C++" }, { "code": null, "e": 25617, "s": 25400, "text": "While creating templates, it is possible to specify more th...
React-Bootstrap Toasts Component - GeeksforGeeks
30 Apr, 2021 React-Bootstrap is a front-end framework that was designed keeping react in mind. Toasts Component is a lightweight notification that is designed to provide a way to mimic push notifications from desktop OS or mobile. We can use the following approach in ReactJS to use the react-bootstrap Toasts Component....
[ { "code": null, "e": 25545, "s": 25517, "text": "\n30 Apr, 2021" }, { "code": null, "e": 25853, "s": 25545, "text": "React-Bootstrap is a front-end framework that was designed keeping react in mind. Toasts Component is a lightweight notification that is designed to provide a way ...
Getting attributes of Objects in R Language - attributes() and attr() Function - GeeksforGeeks
23 Nov, 2021 attribute() function in R Programming Language is used to get all the attributes of data. This function is also used to set new attributes to data. Syntax: attributes(x) Parameters: x: object whose attributes to be accessed. R # R program to illustrate# attributes functioninfo = data.frame(iris) # Load in...
[ { "code": null, "e": 25957, "s": 25929, "text": "\n23 Nov, 2021" }, { "code": null, "e": 26105, "s": 25957, "text": "attribute() function in R Programming Language is used to get all the attributes of data. This function is also used to set new attributes to data." }, { "...
How To Remove facet_wrap Title Box in ggplot2 in R ? - GeeksforGeeks
11 Nov, 2021 Facet plots, where one subsets the data based on a categorical variable and makes a series of similar plots with the same scale. Facetting helps us to show the relationship between more than two categories of data. When you have multiple variables, with faceting it can be plotted in a single plot into smal...
[ { "code": null, "e": 26487, "s": 26459, "text": "\n11 Nov, 2021" }, { "code": null, "e": 26805, "s": 26487, "text": "Facet plots, where one subsets the data based on a categorical variable and makes a series of similar plots with the same scale. Facetting helps us to show the rel...
numpy.log10() in Python - GeeksforGeeks
29 Nov, 2018 About :numpy.log10(arr, out = None, *, where = True, casting = ‘same_kind’, order = ‘K’, dtype = None, ufunc ‘log10’) : This mathematical function helps user to calculate Base-10 logarithm of x where x belongs to all the input array elements. Parameters : array : [array_like]Input array or object. out ...
[ { "code": null, "e": 25337, "s": 25309, "text": "\n29 Nov, 2018" }, { "code": null, "e": 25580, "s": 25337, "text": "About :numpy.log10(arr, out = None, *, where = True, casting = ‘same_kind’, order = ‘K’, dtype = None, ufunc ‘log10’) : This mathematical function helps user to ca...
Print array after it is right rotated K times | Set 2 - GeeksforGeeks
26 Nov, 2021 Given an array arr[] of size N and a value K, the task is to print the array rotated by K times to the right. Examples: Input: arr = {1, 3, 5, 7, 9}, K = 2Output: 7 9 1 3 5 Input: arr = {1, 2, 3, 4, 5}, K = 4Output: 2 3 4 5 1 Algorithm: The given problem can be solved by reversing subarrays. Below steps c...
[ { "code": null, "e": 26067, "s": 26039, "text": "\n26 Nov, 2021" }, { "code": null, "e": 26177, "s": 26067, "text": "Given an array arr[] of size N and a value K, the task is to print the array rotated by K times to the right." }, { "code": null, "e": 26187, "s": ...
Find a triplet in an array such that arr[i] arr[k] and i < j < k - GeeksforGeeks
28 Feb, 2022 Given an array arr[] consisting of a permutation of first N natural numbers, the task is to find a triplet (i, j, k) from the given array such that arr[i] < arr[j] > arr[k], where (i < j < k). If multiple triplets exist, then print any valid triplet of indices. Otherwise, print -1. Examples: Input: arr[] =...
[ { "code": null, "e": 26041, "s": 26013, "text": "\n28 Feb, 2022" }, { "code": null, "e": 26324, "s": 26041, "text": "Given an array arr[] consisting of a permutation of first N natural numbers, the task is to find a triplet (i, j, k) from the given array such that arr[i] < arr[j]...
CSS - azimuth
The azimuth property describes the position of a sound source along the horizontal axis of the listener's environment. angle left-side far-left left center-left center center-right right far-right right-side far-right behind center Azimuth values should be shown as follows All the HTML elements. object.style.azimuth = ...
[ { "code": null, "e": 2745, "s": 2626, "text": "The azimuth property describes the position of a sound source along the horizontal axis of the listener's environment." }, { "code": null, "e": 2751, "s": 2745, "text": "angle" }, { "code": null, "e": 2761, "s": 2751,...
How to plot an animated image matrix in matplotlib?
To plot an animated image matrix in matplotlib, we can take the following steps Set the figure size and adjust the padding between and around the subplots. Set the figure size and adjust the padding between and around the subplots. Create a figure and a set of subplots. Create a figure and a set of subplots. Make an an...
[ { "code": null, "e": 1142, "s": 1062, "text": "To plot an animated image matrix in matplotlib, we can take the following steps" }, { "code": null, "e": 1218, "s": 1142, "text": "Set the figure size and adjust the padding between and around the subplots." }, { "code": null...
How to initialize variables in C#?
A variable is a name given to a storage area that our programs can manipulate. Each variable in C# has a specific type, which determines the size and layout of the variable's memory the range of values that can be stored within that memory and the set of operations that can be applied to the variable. To initialize a v...
[ { "code": null, "e": 1141, "s": 1062, "text": "A variable is a name given to a storage area that our programs can manipulate." }, { "code": null, "e": 1365, "s": 1141, "text": "Each variable in C# has a specific type, which determines the size and layout of the variable's memory ...
Linear Regression Using Gradient Descent in 10 Lines of Code | by Joseph J. Bautista | Towards Data Science
My goal is to eventually write out articles like this for other optimization techniques. Let’s start with gradient descent. Note: This isn’t a comprehensive guide as I skim through a lot of things. In our journey to study machine learning and artificial intelligence, it is important to know the basics before going deep...
[ { "code": null, "e": 369, "s": 171, "text": "My goal is to eventually write out articles like this for other optimization techniques. Let’s start with gradient descent. Note: This isn’t a comprehensive guide as I skim through a lot of things." }, { "code": null, "e": 934, "s": 369, ...
Arrays Data Structure in Javascript
The array is a container which can hold a fixed number of items and these items should be of the same type. It stores a fixed-size sequential collection of elements of the same type. An array is used to store a collection of data, but it is often more useful to think of an array as a collection of variables of the same...
[ { "code": null, "e": 1389, "s": 1062, "text": "The array is a container which can hold a fixed number of items and these items should be of the same type. It stores a fixed-size sequential collection of elements of the same type. An array is used to store a collection of data, but it is often more u...
Create a QR code generator app using ReactJS - GeeksforGeeks
27 Aug, 2021 Introduction: In this article, we are going to make a simple QR Code generator app. QR code is a two-dimensional barcode readable on smartphones. Allows coding of more than 4000 characters in a double-barcode bar. QR codes can be used to show text to a user, to open a URL, to keep contact in an address bo...
[ { "code": null, "e": 26739, "s": 26708, "text": " \n27 Aug, 2021\n" }, { "code": null, "e": 27070, "s": 26739, "text": "Introduction: In this article, we are going to make a simple QR Code generator app. QR code is a two-dimensional barcode readable on smartphones. Allows coding ...
How to match any non-digit character in Python using Regular Expression?
The following code matches and prints all non-digit characters in the given string using python regex as follows. import re foo = 'Mo4zam5Bi6QuE7' match = re.findall(r'\D', foo) print match This gives the output ['M', 'o', 'z', 'a', 'm', 'B', 'i', 'Q', 'u', 'E']
[ { "code": null, "e": 1176, "s": 1062, "text": "The following code matches and prints all non-digit characters in the given string using python regex as follows." }, { "code": null, "e": 1252, "s": 1176, "text": "import re\nfoo = 'Mo4zam5Bi6QuE7'\nmatch = re.findall(r'\\D', foo)\n...
Minimum characters required to be removed to make frequency of each character unique - GeeksforGeeks
24 Jun, 2021 Given string str, the task is to find the minimum count of characters that need to be deleted from the string such that the frequency of each character of the string is unique. Examples: Input: str = “ceabaacb” Output: 2 Explanation: The frequencies of each distinct character are as follows: c —> 2 e —> 1 ...
[ { "code": null, "e": 26413, "s": 26385, "text": "\n24 Jun, 2021" }, { "code": null, "e": 26590, "s": 26413, "text": "Given string str, the task is to find the minimum count of characters that need to be deleted from the string such that the frequency of each character of the stri...
How to create a PySpark dataframe from multiple lists ? - GeeksforGeeks
30 May, 2021 In this article, we will discuss how to create Pyspark dataframe from multiple lists. Create data from multiple lists and give column names in another list. So, to do our task we will use the zip method. zip(list1,list2,., list n) Pass this zipped data to spark.createDataFrame() method dataframe = spark.c...
[ { "code": null, "e": 23901, "s": 23873, "text": "\n30 May, 2021" }, { "code": null, "e": 23988, "s": 23901, "text": "In this article, we will discuss how to create Pyspark dataframe from multiple lists. " }, { "code": null, "e": 24106, "s": 23988, "text": "Cre...
Linear Regression
From a given set of data points, the linear regression finds an equation of straight line. The given points will follow the straight line. Using this formula, we can predict what will be the value for some other specific point, which is not present in the set currently. For solving linear regression problems using some...
[ { "code": null, "e": 1333, "s": 1062, "text": "From a given set of data points, the linear regression finds an equation of straight line. The given points will follow the straight line. Using this formula, we can predict what will be the value for some other specific point, which is not present in t...
Jackson - Data Binding
Data Binding API is used to convert JSON to and from POJO (Plain Old Java Object) using property accessor or using annotations. It is of two type. Simple Data Binding - Converts JSON to and from Java Maps, Lists, Strings, Numbers, Booleans and null objects. Simple Data Binding - Converts JSON to and from Java Maps, Li...
[ { "code": null, "e": 1901, "s": 1753, "text": "Data Binding API is used to convert JSON to and from POJO (Plain Old Java Object) using property accessor or using annotations. It is of two type.\n" }, { "code": null, "e": 2012, "s": 1901, "text": "Simple Data Binding - Converts JS...
How to convert Bitmap to drawable in Android?
This example demonstrates how do I convert Bitmap to drawable 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/layout/activity_main.xml. <?xml version="1.0" encoding="utf-8"?> <RelativeLayo...
[ { "code": null, "e": 1136, "s": 1062, "text": "This example demonstrates how do I convert Bitmap to drawable in android." }, { "code": null, "e": 1265, "s": 1136, "text": "Step 1 − Create a new project in Android Studio, go to File ⇒ New Project and fill all required details to c...
How to remove items from a select box ? - GeeksforGeeks
21 Jun, 2019 An option can be removed from a select box using 2 approaches in jQuery: Method 1: Removing the option in the box directly The option to be removed is selected by getting the select box. The value to be removed is specified on the value selector (value=’optionValue’) on the select box. The remove() method ...
[ { "code": null, "e": 25675, "s": 25647, "text": "\n21 Jun, 2019" }, { "code": null, "e": 25748, "s": 25675, "text": "An option can be removed from a select box using 2 approaches in jQuery:" }, { "code": null, "e": 25798, "s": 25748, "text": "Method 1: Removin...
A Gentle Introduction to IoT/GPS Trajectory Clustering and Geospatial Clustering | by William Yee | Towards Data Science
Internet of things, connected devices, and geospatial data are all hot topics when it comes to developing value-added propositions. In this article, I will provide a gentle introduction to unsupervised learning techniques applied to GPS Trajectories. The data comes from Microsoft Research Asia, containing data from 182...
[ { "code": null, "e": 423, "s": 172, "text": "Internet of things, connected devices, and geospatial data are all hot topics when it comes to developing value-added propositions. In this article, I will provide a gentle introduction to unsupervised learning techniques applied to GPS Trajectories." }...
The kill() Function in Perl
Perl kill('KILL', (Process List)) function can be used to terminate a pseudo-process by passing it the ID returned by fork(). Note that using kill('KILL', (Process List)) on a pseudo-process() may typically cause memory leaks, because the thread that implements the pseudo-process does not get a chance to clean up its r...
[ { "code": null, "e": 1188, "s": 1062, "text": "Perl kill('KILL', (Process List)) function can be used to terminate a pseudo-process by passing it the ID returned by fork()." }, { "code": null, "e": 1392, "s": 1188, "text": "Note that using kill('KILL', (Process List)) on a pseudo...
Check a number is odd or even without modulus operator - GeeksforGeeks
11 May, 2021 Given a number, check whether it is even or odd. Examples : Input: n = 11 Output: Odd Input: n = 10 Output: Even Method 1: Using Loop. The idea is to start with a boolean flag variable as true and switch it n times. If flag variable gets original value (which is true) back, then n is even. Else n is fa...
[ { "code": null, "e": 24909, "s": 24881, "text": "\n11 May, 2021" }, { "code": null, "e": 24958, "s": 24909, "text": "Given a number, check whether it is even or odd." }, { "code": null, "e": 24970, "s": 24958, "text": "Examples : " }, { "code": null, ...
Different types of recurrence relations and their solutions - GeeksforGeeks
09 Oct, 2019 In this article, we will see how we can solve different types of recurrence relations using different approaches. Before understanding this article, you should have idea about recurrence relations and different method to solve them (See : Worst, Average and Best Cases, Asymptotic Notations, Analysis of Loo...
[ { "code": null, "e": 25667, "s": 25639, "text": "\n09 Oct, 2019" }, { "code": null, "e": 25979, "s": 25667, "text": "In this article, we will see how we can solve different types of recurrence relations using different approaches. Before understanding this article, you should hav...
Print all possible combinations of r elements in a given array of size n - GeeksforGeeks
19 Jan, 2022 Given an array of size n, generate and print all possible combinations of r elements in array. For example, if input array is {1, 2, 3, 4} and r is 2, then output should be {1, 2}, {1, 3}, {1, 4}, {2, 3}, {2, 4} and {3, 4}.Following are two methods to do this. Method 1 (Fix Elements and Recur) We create a ...
[ { "code": null, "e": 26063, "s": 26035, "text": "\n19 Jan, 2022" }, { "code": null, "e": 26924, "s": 26063, "text": "Given an array of size n, generate and print all possible combinations of r elements in array. For example, if input array is {1, 2, 3, 4} and r is 2, then output ...
Stack remove(Object) method in Java with Example - GeeksforGeeks
24 Dec, 2018 The Java.util.Stack.remove(Object o) method is used to remove any particular element from the Stack. Syntax: Stack.remove(Object o) Parameters: This method accepts a mandatory parameter o is of the object type of Stack and specifies the element to be removed from the Stack. Return Value: Returns True if th...
[ { "code": null, "e": 25695, "s": 25667, "text": "\n24 Dec, 2018" }, { "code": null, "e": 25796, "s": 25695, "text": "The Java.util.Stack.remove(Object o) method is used to remove any particular element from the Stack." }, { "code": null, "e": 25804, "s": 25796, ...
How to make a leaderboard using PHP ? - GeeksforGeeks
28 Dec, 2020 The purpose of this article is to make a simple program to create a leaderboard using PHP. Below is the implementation for the same using PHP. The prerequisites of this topic are PHP/MySQL and the installment of Apache Server on your computer. Approach: Step 1: First we will create a HTML table using <tab...
[ { "code": null, "e": 26375, "s": 26347, "text": "\n28 Dec, 2020" }, { "code": null, "e": 26620, "s": 26375, "text": "The purpose of this article is to make a simple program to create a leaderboard using PHP. Below is the implementation for the same using PHP. The prerequisites o...
C# | Getting the list of keys of a SortedList object - GeeksforGeeks
01 Feb, 2019 SortedList.GetKeyList Method is used to get the list of keys in a SortedList object. Syntax: public virtual System.Collections.IList GetKeyList (); Return Value: It returns an IList object containing the keys in the SortedList object. Below programs illustrate the use of above-discussed method: Example 1: ...
[ { "code": null, "e": 25547, "s": 25519, "text": "\n01 Feb, 2019" }, { "code": null, "e": 25632, "s": 25547, "text": "SortedList.GetKeyList Method is used to get the list of keys in a SortedList object." }, { "code": null, "e": 25640, "s": 25632, "text": "Synta...
Python Bokeh - Plotting Multiple Polygons on a Graph - GeeksforGeeks
08 Feb, 2022 Bokeh is a Python interactive data visualization. It renders its plots using HTML and JavaScript. It targets modern web browsers for presentation providing elegant, concise construction of novel graphics with high-performance interactivity.Bokeh can be used to plot multiple polygons on a graph. Plotting mu...
[ { "code": null, "e": 25565, "s": 25537, "text": "\n08 Feb, 2022" }, { "code": null, "e": 25970, "s": 25565, "text": "Bokeh is a Python interactive data visualization. It renders its plots using HTML and JavaScript. It targets modern web browsers for presentation providing elegant...
PyQt5 – How to add image in Label background ? - GeeksforGeeks
26 Mar, 2020 In this article, we will see how to add background image to a label, By default, when we create a label there is no background image although we can set background color to it. Sometimes background image is necessary. In order to set a background image we will use setStyleSheet() method. Syntax : label.set...
[ { "code": null, "e": 26217, "s": 26189, "text": "\n26 Mar, 2020" }, { "code": null, "e": 26394, "s": 26217, "text": "In this article, we will see how to add background image to a label, By default, when we create a label there is no background image although we can set background...
Working with Text Files in Julia - GeeksforGeeks
25 Aug, 2020 Julia is Programming Language that is fast and dynamic in nature (most suitable for performing numerical and scientific applications) and it is optionally typed (the rich language of descriptive type and type declarations which is used to solidify our program) and general-purpose and open-sourced. Julia su...
[ { "code": null, "e": 25789, "s": 25761, "text": "\n25 Aug, 2020" }, { "code": null, "e": 26327, "s": 25789, "text": "Julia is Programming Language that is fast and dynamic in nature (most suitable for performing numerical and scientific applications) and it is optionally typed (t...
HTML | muted Attribute - GeeksforGeeks
08 Dec, 2021 The HTML muted Attribute is used to specify the audio output of the video is muted, it is a Boolean attribute.Applicable: <video muted Attribute> Syntax <video muted> Example: html <!DOCTYPE html><html> <head> <title> HTML muted Attribute </title></head> <body style="text-align: center">...
[ { "code": null, "e": 26061, "s": 26033, "text": "\n08 Dec, 2021" }, { "code": null, "e": 26185, "s": 26061, "text": "The HTML muted Attribute is used to specify the audio output of the video is muted, it is a Boolean attribute.Applicable: " }, { "code": null, "e": 26...
Output of C++ programs | Set 28 (Access Modifiers) - GeeksforGeeks
22 Apr, 2022 Prerequisite: Access modifiers in c, Inheritance 1. What is the output? C++ #include <iostream>using namespace std; class access{ int a = 10; void disp() { cout<< "a: "<< a; } }; int main(){ access a; a.disp(); return 0;} Output: Error Description: When the access specifie...
[ { "code": null, "e": 25606, "s": 25578, "text": "\n22 Apr, 2022" }, { "code": null, "e": 25655, "s": 25606, "text": "Prerequisite: Access modifiers in c, Inheritance" }, { "code": null, "e": 25679, "s": 25655, "text": "1. What is the output? " }, { "co...
HTTP Patch - GeeksforGeeks
14 Jul, 2020 The HTTP Patch method is used to request a set of modifications in the request entity to be applied for the resource recognized by the Request-URI. This method plays a vital role in improving interoperability and preventing errors by making partial changes in the resource. The described set of changes are ...
[ { "code": null, "e": 26187, "s": 26159, "text": "\n14 Jul, 2020" }, { "code": null, "e": 26563, "s": 26187, "text": "The HTTP Patch method is used to request a set of modifications in the request entity to be applied for the resource recognized by the Request-URI. This method pla...
Include and Merge Tags in Android with Example - GeeksforGeeks
05 Jul, 2021 Android apps are growing and one important aspect of it is reusability. Sometimes, the complexity of app design will be more and during that time, Android providing very efficient reusable features by means of the <include/> and <merge/> tags. Under <merge/> tags, we can specify a part of the layout that h...
[ { "code": null, "e": 26381, "s": 26353, "text": "\n05 Jul, 2021" }, { "code": null, "e": 27325, "s": 26381, "text": "Android apps are growing and one important aspect of it is reusability. Sometimes, the complexity of app design will be more and during that time, Android providin...
How to add days to $Date in PHP? - GeeksforGeeks
03 Jun, 2021 Adding days to $Date can be done in many ways. It is very easy to do by using built-in functions like strtotime(), date_add() in PHP.Method 1: Using strtotime() Function: The strtotime() Function is used to convert an English textual date-time description to a UNIX timestamp. Syntax: strtotime( $EnglishD...
[ { "code": null, "e": 25737, "s": 25709, "text": "\n03 Jun, 2021" }, { "code": null, "e": 26024, "s": 25737, "text": "Adding days to $Date can be done in many ways. It is very easy to do by using built-in functions like strtotime(), date_add() in PHP.Method 1: Using strtotime() Fu...
HTML | <audio> controls Attribute - GeeksforGeeks
08 Jul, 2019 The HTML <audio> controls attribute is used to specify the control to play audio. It is the Boolean value. This attribute is new in HTML5. The audio control attribute contains the following property: Play Pause Seeking Volume Syntax: <audio controls> Example: <!DOCTYPE html><html> <head> <title> ...
[ { "code": null, "e": 26331, "s": 26303, "text": "\n08 Jul, 2019" }, { "code": null, "e": 26470, "s": 26331, "text": "The HTML <audio> controls attribute is used to specify the control to play audio. It is the Boolean value. This attribute is new in HTML5." }, { "code": nu...
Python | C++ | Remove leading zeros from an IP address - GeeksforGeeks
18 Feb, 2022 Given an IP address, remove leading zeros from the IP address.Examples: Input : 100.020.003.400 Output : 100.20.3.400 Input :001.200.001.004 Output : 1.200.1.4 Method 1 : Traversal and join The approach is to split the given string by “.” and then convert it to an integer which removes the leadin...
[ { "code": null, "e": 25780, "s": 25752, "text": "\n18 Feb, 2022" }, { "code": null, "e": 25854, "s": 25780, "text": "Given an IP address, remove leading zeros from the IP address.Examples: " }, { "code": null, "e": 25946, "s": 25854, "text": "Input : 100.020....
Length of the longest subsequence such that XOR of adjacent elements is equal to K - GeeksforGeeks
15 Nov, 2021 Given an array arr[] of N non-negative integers and an integer K, the idea is to find the length of the longest subsequence having Xor of adjacent elements equal to K. Examples: Input: N = 5, arr[] = {3, 2, 4, 3, 5}, K = 1Output: 3Explanation:All the subsequences having Xor of adjacent element equal to K a...
[ { "code": null, "e": 26066, "s": 26038, "text": "\n15 Nov, 2021" }, { "code": null, "e": 26234, "s": 26066, "text": "Given an array arr[] of N non-negative integers and an integer K, the idea is to find the length of the longest subsequence having Xor of adjacent elements equal t...
strlen() function in c - GeeksforGeeks
28 Sep, 2018 The strlen() function calculates the length of a given string.The strlen() function is defined in string.h header file. It doesn’t count null character ‘\0’. Syntax: int strlen(const char *str); Parameter: str: It represents the string variable whose length we have to find. Return: This function returns t...
[ { "code": null, "e": 25657, "s": 25629, "text": "\n28 Sep, 2018" }, { "code": null, "e": 25815, "s": 25657, "text": "The strlen() function calculates the length of a given string.The strlen() function is defined in string.h header file. It doesn’t count null character ‘\\0’." }...
HashMap putIfAbsent(key, value) method in Java with Examples - GeeksforGeeks
19 Feb, 2021 The putIfAbsent(K key, V value) method of HashMap class is used to map the specified key with the specified value, only if no such key exists (or is mapped to null) in this HashMap instance. Syntax: public V putIfAbsent(K key, V value) Parameters: This method accepts two parameters: key: which is the ke...
[ { "code": null, "e": 25967, "s": 25939, "text": "\n19 Feb, 2021" }, { "code": null, "e": 26159, "s": 25967, "text": "The putIfAbsent(K key, V value) method of HashMap class is used to map the specified key with the specified value, only if no such key exists (or is mapped to null...
Format Specifiers in Java
06 Jul, 2020 Format specifiers begin with a percent character (%) and terminate with a “type character, ” which indicates the type of data (int, float, etc.) that will be converted the basic manner in which the data will be represented (decimal, hexadecimal, etc.)The general syntax of a format specifier is % [flags] [w...
[ { "code": null, "e": 52, "s": 24, "text": "\n06 Jul, 2020" }, { "code": null, "e": 347, "s": 52, "text": "Format specifiers begin with a percent character (%) and terminate with a “type character, ” which indicates the type of data (int, float, etc.) that will be converted the ba...
Implement your own itoa()
21 Jun, 2022 itoa function converts integer into null-terminated string. It can convert negative numbers too. The standard definition of itoa function is give below:- C char* itoa(int num, char* buffer, int base) The third parameter base specify the conversion base. For example:- if base is 2, then it will convert th...
[ { "code": null, "e": 52, "s": 24, "text": "\n21 Jun, 2022" }, { "code": null, "e": 208, "s": 52, "text": "itoa function converts integer into null-terminated string. It can convert negative numbers too. The standard definition of itoa function is give below:- " }, { "cod...
Strong and Weak Bases
03 Sep, 2021 The citric acid in fruits like oranges and lemons, tartaric acid in tamarind, malic acid in apples, lactic acid in milk and milk products, and hydrochloric acid in gastric juices are just a few examples of acids and bases found in nature. Many bases, such as lime water, can also be found. Many of these aci...
[ { "code": null, "e": 28, "s": 0, "text": "\n03 Sep, 2021" }, { "code": null, "e": 498, "s": 28, "text": "The citric acid in fruits like oranges and lemons, tartaric acid in tamarind, malic acid in apples, lactic acid in milk and milk products, and hydrochloric acid in gastric jui...
Convert CSV to HTML Table using Python Pandas and Flask Framework
26 May, 2022 In this article, we are going to convert a CSV file into an HTML table using Python Pandas and Flask Framework. Sample CSV file : USERNAME,IDENTIFIER,FIRST_NAME,LAST_NAME booker12,9012,Rachel,Booker grey07,2070,Laura,Grey johnson81,4081,Craig,Johnson jenkins46,9346,Mary,Jenkins smith79,5079,Jamie,Smith Ste...
[ { "code": null, "e": 28, "s": 0, "text": "\n26 May, 2022" }, { "code": null, "e": 140, "s": 28, "text": "In this article, we are going to convert a CSV file into an HTML table using Python Pandas and Flask Framework." }, { "code": null, "e": 158, "s": 140, "te...
HTTP headers | If-None-Match
18 Nov, 2019 The HTTP Header If-None-Match is a request-type header. Generally, it is used to update the entity tags on the server. Firstly, the Client provides the Server with a set of entity tags (E-tags). The Server compares the given tags with those it already has for the resource. Then, the Server will provide the...
[ { "code": null, "e": 28, "s": 0, "text": "\n18 Nov, 2019" }, { "code": null, "e": 491, "s": 28, "text": "The HTTP Header If-None-Match is a request-type header. Generally, it is used to update the entity tags on the server. Firstly, the Client provides the Server with a set of en...
Renaming columns for PySpark DataFrames Aggregates
19 Dec, 2021 In this article, we will discuss how to rename columns for PySpark dataframe aggregates using Pyspark. Dataframe in use: In PySpark, groupBy() is used to collect the identical data into groups on the PySpark DataFrame and perform aggregate functions on the grouped data. These are available in functions mo...
[ { "code": null, "e": 28, "s": 0, "text": "\n19 Dec, 2021" }, { "code": null, "e": 131, "s": 28, "text": "In this article, we will discuss how to rename columns for PySpark dataframe aggregates using Pyspark." }, { "code": null, "e": 149, "s": 131, "text": "Dat...
Cropping an Image in a circular way using Python
24 Feb, 2021 In this article, we will learn to crop an image circularly using a pillow library. Cropping an image circularly means selecting a circular region inside an image and removing everything outside the circle. Approach: If you have an L mode image, the image becomes grayscale. So we create a new image with mo...
[ { "code": null, "e": 54, "s": 26, "text": "\n24 Feb, 2021" }, { "code": null, "e": 261, "s": 54, "text": "In this article, we will learn to crop an image circularly using a pillow library. Cropping an image circularly means selecting a circular region inside an image and removing...
How to validate mobile number length in ReactJS ?
12 Feb, 2021 Validating mobile number length is an important step to check whether the number entered by the user is genuine or not. Material UI for React has this component available for us and it is very easy to integrate. We can use the error Property for TextField Component in ReactJS using the following approach. ...
[ { "code": null, "e": 28, "s": 0, "text": "\n12 Feb, 2021" }, { "code": null, "e": 335, "s": 28, "text": "Validating mobile number length is an important step to check whether the number entered by the user is genuine or not. Material UI for React has this component available for ...
Python IF Statement
It is similar to that of other languages. The if statement contains a logical expression using which data is compared and a decision is made based on the result of the comparison. if expression: statement(s) If the boolean expression evaluates to TRUE, then the block of statement(s) inside the if statement is execu...
[ { "code": null, "e": 2558, "s": 2378, "text": "It is similar to that of other languages. The if statement contains a logical expression using which data is compared and a decision is made based on the result of the comparison." }, { "code": null, "e": 2590, "s": 2558, "text": "if...
Python | Pandas Series.dt.second
20 Mar, 2019 Series.dt can be used to access the values of the series as datetimelike and return several properties. Pandas Series.dt.second attribute return a numpy array containing the second of the datetime in the underlying data of the given series object. Syntax: Series.dt.second Parameter : None Returns : numpy a...
[ { "code": null, "e": 28, "s": 0, "text": "\n20 Mar, 2019" }, { "code": null, "e": 276, "s": 28, "text": "Series.dt can be used to access the values of the series as datetimelike and return several properties. Pandas Series.dt.second attribute return a numpy array containing the s...
#pragma Directive in C/C++
03 Feb, 2022 This directive is a special purpose directive and is used to turn on or off some features. These types of directives are compiler-specific i.e., they vary from compiler to compiler. Some of the #pragma directives are discussed below: #pragma startup and #pragma exit: These directives helps us to specify th...
[ { "code": null, "e": 52, "s": 24, "text": "\n03 Feb, 2022" }, { "code": null, "e": 286, "s": 52, "text": "This directive is a special purpose directive and is used to turn on or off some features. These types of directives are compiler-specific i.e., they vary from compiler to co...
elinks - Unix, Linux Command
elinks [OPTION]... [URL]... ELinks is a text mode WWW browser, supporting colors, table rendering, background downloading, menu driven configuration interface, tabbed browsing and slim code. Frames are supported. You can have different file formats associated with external viewers. mailto: and telnet: are sup...
[ { "code": null, "e": 10743, "s": 10713, "text": "\nelinks [OPTION]... [URL]...\n" }, { "code": null, "e": 10912, "s": 10747, "text": "\nELinks is a text mode WWW browser, supporting colors, table rendering, background downloading, menu driven configuration interface, tabbed brows...
Difference between ++*p, *p++ and *++p
11 Oct, 2021 Predict the output of following C programs. C // PROGRAM 1#include <stdio.h>int main(void){ int arr[] = {10, 20}; int *p = arr; ++*p; printf("arr[0] = %d, arr[1] = %d, *p = %d", arr[0], arr[1], *p); return 0;} C // PROGRAM 2#include <stdio.h>int main(void){ int a...
[ { "code": null, "e": 54, "s": 26, "text": "\n11 Oct, 2021" }, { "code": null, "e": 99, "s": 54, "text": "Predict the output of following C programs. " }, { "code": null, "e": 101, "s": 99, "text": "C" }, { "code": "// PROGRAM 1#include <stdio.h>int mai...
How to Use Spell Checker in MS Word?
05 Aug, 2021 Everyday in business or in other fields there are lots of information or documentation files are there that are required to store for future use. For anyone, it is very difficult to store that information for a long time. Earlier letters, office files, documents, projects, and information are stored in a f...
[ { "code": null, "e": 28, "s": 0, "text": "\n05 Aug, 2021" }, { "code": null, "e": 503, "s": 28, "text": "Everyday in business or in other fields there are lots of information or documentation files are there that are required to store for future use. For anyone, it is very diffic...
Perl | sleep() Function
07 May, 2019 sleep() function in Perl is an inbuilt function which is used to delay the execution of the current script for a specified number of seconds or forever if parameter is not specified. The sleep( ) function accepts seconds as a parameter and returns the same on success. Syntax: sleep(seconds) Returns: second...
[ { "code": null, "e": 53, "s": 25, "text": "\n07 May, 2019" }, { "code": null, "e": 322, "s": 53, "text": "sleep() function in Perl is an inbuilt function which is used to delay the execution of the current script for a specified number of seconds or forever if parameter is not sp...
Working with Geospatial Data in Python
23 Aug, 2021 Spatial data, also known as geospatial data, GIS data, or geodata, is a type of numeric data that defines the geographic location of a physical object, such as a building, a street, a town, a city, a country, or other physical objects, using a geographic coordinate system. You may determine not just the po...
[ { "code": null, "e": 54, "s": 26, "text": "\n23 Aug, 2021" }, { "code": null, "e": 445, "s": 54, "text": "Spatial data, also known as geospatial data, GIS data, or geodata, is a type of numeric data that defines the geographic location of a physical object, such as a building, a ...
Program to print the series 2, 1, 4, 3, 6, 5, .... up to N terms
18 Mar, 2021 Given a number N, the task is to print the below pattern upto N terms: 2, 1, 4, 3, 6, 5, .... N terms Examples: Input: N = 4 Output: 2, 1, 4, 3 Explanation: Nth Term = (N % 2 == 0) ? (N - 1) : (N + 1) 1st term = (1 % 2 == 0) ? (1 - 1) : (1 + 1) = (1 + 1) = 2 2nd term = (2 % 2 == 0)...
[ { "code": null, "e": 28, "s": 0, "text": "\n18 Mar, 2021" }, { "code": null, "e": 101, "s": 28, "text": "Given a number N, the task is to print the below pattern upto N terms: " }, { "code": null, "e": 134, "s": 101, "text": "2, 1, 4, 3, 6, 5, .... N terms "...
RxJS - Join Operator forkJoin
This operator will take in an array or dict object as an input and will wait for the observable to complete and return the last values emitted from the given observable. forkJoin(value: array or dict object): Observable value − The value is the input which can be an array or dict object. An observable is returned with...
[ { "code": null, "e": 1994, "s": 1824, "text": "This operator will take in an array or dict object as an input and will wait for the observable to complete and return the last values emitted from the given observable." }, { "code": null, "e": 2045, "s": 1994, "text": "forkJoin(val...
Kotlin - Data Types
Kotlin data type is a classification of data which tells the compiler how the programmer intends to use the data. For example, Kotlin data could be numeric, string, boolean etc. Kotlin treats everything as an object which means that we can call member functions and properties on any variable. Kotlin is a statically typ...
[ { "code": null, "e": 2603, "s": 2425, "text": "Kotlin data type is a classification of data which tells the compiler how the programmer intends to use the data. For example, Kotlin data could be numeric, string, boolean etc." }, { "code": null, "e": 2719, "s": 2603, "text": "Kotl...
Python | Split and Pass list as separate parameter - GeeksforGeeks
05 Sep, 2019 With the advent of programming paradigms, there has been need to modify the way one codes. One such paradigm is OOPS. In this, we have a technique called modularity, which stands for making different modules/functions which perform independent tasks in program. In this, we need to pass more than just varia...
[ { "code": null, "e": 24296, "s": 24268, "text": "\n05 Sep, 2019" }, { "code": null, "e": 24692, "s": 24296, "text": "With the advent of programming paradigms, there has been need to modify the way one codes. One such paradigm is OOPS. In this, we have a technique called modularit...
Setting the same axis limits for all subplots in Matplotlib
To set the same axis limits for all subplots in matplotlib we can use subplot() method to create 4 subplots where nrows=2, ncols=2 having share of x and y axes. Set the figure size and adjust the padding between and around the subplots. Set the figure size and adjust the padding between and around the subplots. Add a s...
[ { "code": null, "e": 1223, "s": 1062, "text": "To set the same axis limits for all subplots in matplotlib we can use subplot() method to create 4 subplots where nrows=2, ncols=2 having share of x and y axes." }, { "code": null, "e": 1299, "s": 1223, "text": "Set the figure size a...
pthread_self() in C
Here we will see what will be the effect of pthread_self() in C. The pthread_self() function is used to get the ID of the current thread. This function can uniquely identify the existing threads. But if there are multiple threads, and one thread is completed, then that id can be reused. So for all running threads, the ...
[ { "code": null, "e": 1398, "s": 1062, "text": "Here we will see what will be the effect of pthread_self() in C. The pthread_self() function is used to get the ID of the current thread. This function can uniquely identify the existing threads. But if there are multiple threads, and one thread is comp...
Installing Docker on Linux
To start the installation of Docker, we are going to use an Ubuntu instance. You can use Oracle Virtual Box to setup a virtual Linux instance, in case you don’t have it already. The following screenshot shows a simple Ubuntu server which has been installed on Oracle Virtual Box. There is an OS user named demo which has...
[ { "code": null, "e": 2518, "s": 2340, "text": "To start the installation of Docker, we are going to use an Ubuntu instance. You can use Oracle Virtual Box to setup a virtual Linux instance, in case you don’t have it already." }, { "code": null, "e": 2728, "s": 2518, "text": "The ...
C# | IsNullOrEmpty() Method - GeeksforGeeks
01 Apr, 2019 In C#, IsNullOrEmpty() is a string method. It is used to check whether the specified string is null or an Empty string. A string will be null if it has not been assigned a value. A string will be empty if it is assigned “” or String.Empty (A constant for empty strings). Syntax: public static bool IsNullOrE...
[ { "code": null, "e": 24371, "s": 24343, "text": "\n01 Apr, 2019" }, { "code": null, "e": 24642, "s": 24371, "text": "In C#, IsNullOrEmpty() is a string method. It is used to check whether the specified string is null or an Empty string. A string will be null if it has not been as...
Finding 'k' such that its modulus with each array element is same - GeeksforGeeks
23 Jun, 2021 Given an array of n integers .We need to find all ‘k’ such that arr[0] % k = arr[1] % k = ....... = arr[n-1] % k Examples: Input : arr[] = {6, 38, 34} Output : 1 2 4 6%1 = 38%1 = 34%1 = 0 6%2 = 38%2 = 34%2 = 0 6%4 = 38%4 = 34%2 = 2 Input : arr[] = {3, 2} Output : 1 Suppose ...
[ { "code": null, "e": 25342, "s": 25314, "text": "\n23 Jun, 2021" }, { "code": null, "e": 25407, "s": 25342, "text": "Given an array of n integers .We need to find all ‘k’ such that " }, { "code": null, "e": 25457, "s": 25407, "text": "arr[0] % k = arr[1] % k =...
Alternative to Multiple OR Operators in JavaScript - GeeksforGeeks
20 Oct, 2021 In this article, we will learn the alternatives to the use of multiple || (OR operator) in conditional statements. Multiple OR operators in conditional statements might cause poor readability of code and are often limited in functionality. The below JavaScript code could be rewritten to perform the same ta...
[ { "code": null, "e": 25827, "s": 25799, "text": "\n20 Oct, 2021" }, { "code": null, "e": 26067, "s": 25827, "text": "In this article, we will learn the alternatives to the use of multiple || (OR operator) in conditional statements. Multiple OR operators in conditional statements ...
SourceWolf – A CLI Web Crawler Tool in Linux - GeeksforGeeks
14 Sep, 2021 Web crawling is the process of indexing data on web pages by using a program or automated script and these automated scripts or programs are known by multiple names, that includes web crawler, spider, spider bot, and often shortened to the crawler. Manual crawling consumes a lot of time if the scope of the...
[ { "code": null, "e": 25651, "s": 25623, "text": "\n14 Sep, 2021" }, { "code": null, "e": 26494, "s": 25651, "text": "Web crawling is the process of indexing data on web pages by using a program or automated script and these automated scripts or programs are known by multiple name...
C# Program to Check a Specified City Exists in the List Collection using LINQ - GeeksforGeeks
09 Dec, 2021 Given a list, we need to check if a specified city exists in the given list using LINQ. So we can do this task using contains() method. This method is used to check whether a sequence contains a specified element or not. The method overloads in the following ways: Contains<TSource>(IEnumerable<TSource>, TS...
[ { "code": null, "e": 25547, "s": 25519, "text": "\n09 Dec, 2021" }, { "code": null, "e": 25812, "s": 25547, "text": "Given a list, we need to check if a specified city exists in the given list using LINQ. So we can do this task using contains() method. This method is used to chec...
tac command in Linux with Examples - GeeksforGeeks
27 May, 2019 tac command in Linux is used to concatenate and print files in reverse. This command will write each FILE to standard output, the last line first. When no file is specified then this command will read the standard input. Syntax: tac [OPTION]... [FILE]... Example: It will print files in reverse. Options: t...
[ { "code": null, "e": 25651, "s": 25623, "text": "\n27 May, 2019" }, { "code": null, "e": 25872, "s": 25651, "text": "tac command in Linux is used to concatenate and print files in reverse. This command will write each FILE to standard output, the last line first. When no file is ...
Score of Parentheses using Tree - GeeksforGeeks
13 Oct, 2021 Given a string str which contains pairs of balanced parentheses, the task is to calculate the score of the given string based on the given rules: “()” has a score of 1.“x y” has a score of x + y where x and y are individual pairs of balanced parentheses.“(x)” has a score twice of x (i.e), the score is 2 *...
[ { "code": null, "e": 25733, "s": 25705, "text": "\n13 Oct, 2021" }, { "code": null, "e": 25880, "s": 25733, "text": "Given a string str which contains pairs of balanced parentheses, the task is to calculate the score of the given string based on the given rules: " }, { "c...
What are inline conditional expressions in ReactJS ? - GeeksforGeeks
19 Jan, 2022 In the react, conditional rendering is the process to show components based on a particular condition. For example, While building the to-do list app, developers should show a task only if any pending task is available otherwise they can show a message like “There is no pending task available.” In this tut...
[ { "code": null, "e": 26071, "s": 26043, "text": "\n19 Jan, 2022" }, { "code": null, "e": 26367, "s": 26071, "text": "In the react, conditional rendering is the process to show components based on a particular condition. For example, While building the to-do list app, developers s...
Matplotlib.figure.Figure.get_edgecolor() in Python - GeeksforGeeks
30 Apr, 2020 Matplotlib is a library in Python and it is numerical – mathematical extension for NumPy library. The figure module provides the top-level Artist, the Figure, which contains all the plot elements. This module is used to control the default spacing of the subplots and top level container for all plot elemen...
[ { "code": null, "e": 25537, "s": 25509, "text": "\n30 Apr, 2020" }, { "code": null, "e": 25848, "s": 25537, "text": "Matplotlib is a library in Python and it is numerical – mathematical extension for NumPy library. The figure module provides the top-level Artist, the Figure, whic...
How to add Mean and Median to Histogram in R ? - GeeksforGeeks
21 Apr, 2021 Visualizing data can help gather insights from it that descriptive statistics can’t. Anscombe’s Quartet shows us how those statistics could be misleading, hence it becomes to analyze the data visually. Histograms are a way to visualize the data distribution of a continuous variable. Histograms are similar ...
[ { "code": null, "e": 26512, "s": 26484, "text": "\n21 Apr, 2021" }, { "code": null, "e": 27044, "s": 26512, "text": "Visualizing data can help gather insights from it that descriptive statistics can’t. Anscombe’s Quartet shows us how those statistics could be misleading, hence it...
Python Plotly: How to set the range of the y axis? - GeeksforGeeks
30 Nov, 2021 In this article, we will learn how to set the range of the y-axis of a graph using plotly in Python. To install this module type the below command in the terminal: pip install plotly Example 1: Using layout_yaxis_range as a parameter In this example, we have first import the required libraries i.e pandas,...
[ { "code": null, "e": 25537, "s": 25509, "text": "\n30 Nov, 2021" }, { "code": null, "e": 25638, "s": 25537, "text": "In this article, we will learn how to set the range of the y-axis of a graph using plotly in Python." }, { "code": null, "e": 25701, "s": 25638, ...
Lex program to take input from file and remove multiple spaces, lines and tabs - GeeksforGeeks
30 Apr, 2019 FLEX (Fast Lexical Analyzer Generator) is a tool/computer program for generating lexical analyzers (scanners or lexers) written by Vern Paxson in C around 1987. Lex reads an input stream specifying the lexical analyzer and outputs source code implementing the lexer in the C programming language. The functi...
[ { "code": null, "e": 26063, "s": 26035, "text": "\n30 Apr, 2019" }, { "code": null, "e": 26436, "s": 26063, "text": "FLEX (Fast Lexical Analyzer Generator) is a tool/computer program for generating lexical analyzers (scanners or lexers) written by Vern Paxson in C around 1987. Le...
Python - Conditional String Append - GeeksforGeeks
01 Mar, 2020 Sometimes, while working with data, we have a problem in which we need to perform append operation in string on a particular condition. This kind of problem is common in web development and day-day programming. Let’s discuss certain ways in which this task can be performed. Method #1 : Using loopThis is br...
[ { "code": null, "e": 25537, "s": 25509, "text": "\n01 Mar, 2020" }, { "code": null, "e": 25812, "s": 25537, "text": "Sometimes, while working with data, we have a problem in which we need to perform append operation in string on a particular condition. This kind of problem is com...
How to wrap text around circular carousel in Bootstrap 4 ? - GeeksforGeeks
28 Apr, 2021 Wrapping up a circular carousel is quite hectic compare to wrapping up a circular image or any shape of the image. In this article first, we have to create a carousel to make that circular, then we can use the text to wrap the carousel. First, you have to create Bootstrap Carousel. To make that carousel ci...
[ { "code": null, "e": 26179, "s": 26151, "text": "\n28 Apr, 2021" }, { "code": null, "e": 26728, "s": 26179, "text": "Wrapping up a circular carousel is quite hectic compare to wrapping up a circular image or any shape of the image. In this article first, we have to create a carou...
Python | Pandas DataFrame.nlargest() - GeeksforGeeks
17 Sep, 2018 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 nlargest() method is used to get n largest values from a data frame or a series. Synta...
[ { "code": null, "e": 25751, "s": 25723, "text": "\n17 Sep, 2018" }, { "code": null, "e": 25965, "s": 25751, "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...
PyQt5 - Setting current index in ComboBox - GeeksforGeeks
22 Apr, 2020 In this article we will see how we can select the item at the specific index. By default when we create a combo box it shows the first item to be selected but we can change the index, in order to do this we will use setCurrentIndex method. Syntax : combo_box.setCurrentIndex(index) Argument : It takes integ...
[ { "code": null, "e": 26071, "s": 26043, "text": "\n22 Apr, 2020" }, { "code": null, "e": 26311, "s": 26071, "text": "In this article we will see how we can select the item at the specific index. By default when we create a combo box it shows the first item to be selected but we c...
Deprecated Linux Networking Commands and Their Replacements - GeeksforGeeks
09 May, 2022 In this article, let us have a close look at some networking commands that are deprecated. That means they are not provided by default and replaced by other commands that serve the same purpose. But please note that these commands can still be executed by first downloading the net-tools package onto the ma...
[ { "code": null, "e": 25651, "s": 25623, "text": "\n09 May, 2022" }, { "code": null, "e": 25846, "s": 25651, "text": "In this article, let us have a close look at some networking commands that are deprecated. That means they are not provided by default and replaced by other comman...
How to Create Expandable RecyclerView items in Android using Kotlin? - GeeksforGeeks
24 Mar, 2021 RecyclerView is a ViewGroup added to the android studio as a successor of the GridView and ListView. It is an improvement on both of them and can be found in the latest v-7 support packages. It has been created to make possible construction of any lists with XML layouts as an item that can be customized va...
[ { "code": null, "e": 26381, "s": 26353, "text": "\n24 Mar, 2021" }, { "code": null, "e": 27243, "s": 26381, "text": "RecyclerView is a ViewGroup added to the android studio as a successor of the GridView and ListView. It is an improvement on both of them and can be found in the l...
Python | Pandas dataframe.cummax() - GeeksforGeeks
16 Nov, 2018 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 dataframe.cummax() is used to find the cumulative maximum value over any axis. Each ce...
[ { "code": null, "e": 26135, "s": 26107, "text": "\n16 Nov, 2018" }, { "code": null, "e": 26349, "s": 26135, "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...