title
stringlengths
3
221
text
stringlengths
17
477k
parsed
listlengths
0
3.17k
How can I draw inline line labels in Matplotlib?
To draw inline labels in Matplotlib, we can use labelLines() method. − Set the figure size and adjust the padding between and around the subplots. Create random data points x using numpy and a list of data points, A. Iterate the list of A, and plot X and a (iterated item) with label. Label all the lines with their resp...
[ { "code": null, "e": 1133, "s": 1062, "text": "To draw inline labels in Matplotlib, we can use labelLines() method. −" }, { "code": null, "e": 1209, "s": 1133, "text": "Set the figure size and adjust the padding between and around the subplots." }, { "code": null, "e"...
PandasGUI: Analyzing Pandas dataframes with a Graphical User Interface | by Parul Pandey | Towards Data Science
Today the pandas library has become the defacto tool for doing any exploratory data analysis in Python. Its versatility, flexibility, and ease of use makes it the library of choice for many data scientists today. The pandas' library also enjoys excellent community support and thus is always under active development and...
[ { "code": null, "e": 735, "s": 172, "text": "Today the pandas library has become the defacto tool for doing any exploratory data analysis in Python. Its versatility, flexibility, and ease of use makes it the library of choice for many data scientists today. The pandas' library also enjoys excellent ...
Let’s make a map! Using Geopandas, Pandas and Matplotlib to make a Choropleth map | by Ben Dexter Cooley | Towards Data Science
So you want to make a map using Python. Let’s get started! If you’ve started doing some data visualisation with Matplotlib and Pandas, but are looking for the next simple step to getting started with geographical data, I got you. I’ve been there. In fact, I spent hours trawling through online tutorials looking for the ...
[ { "code": null, "e": 231, "s": 172, "text": "So you want to make a map using Python. Let’s get started!" }, { "code": null, "e": 685, "s": 231, "text": "If you’ve started doing some data visualisation with Matplotlib and Pandas, but are looking for the next simple step to getting...
How to implement the IntPredicate interface using lambda and method reference in Java?
IntPredicate interface is a built-in functional interface defined in java.util.function package. This functional interface accepts one int-valued argument as input and produces a boolean value as an output. This interface is a specialization of the Predicate interface and used as an assignment target for a lambda expre...
[ { "code": null, "e": 1456, "s": 1062, "text": "IntPredicate interface is a built-in functional interface defined in java.util.function package. This functional interface accepts one int-valued argument as input and produces a boolean value as an output. This interface is a specialization of the Pred...
How to create a PUT request in Postman?
A Postman PUT request is used to pass data to the server for the creation or modification of a resource. The difference between POST and PUT is that POST request is not idempotent. This means invoking the same PUT request numerous times will always yield the same output. But invoking the same POST request numerous time...
[ { "code": null, "e": 1243, "s": 1062, "text": "A Postman PUT request is used to pass data to the server for the creation or modification of a resource. The difference between POST and PUT is that POST request is not idempotent." }, { "code": null, "e": 1435, "s": 1243, "text": "T...
Redis - Pipelining
Redis is a TCP server and supports request/response protocol. In Redis, a request is accomplished with the following steps − The client sends a query to the server, and reads from the socket, usually in a blocking way, for the server response. The client sends a query to the server, and reads from the socket, usually i...
[ { "code": null, "e": 2170, "s": 2045, "text": "Redis is a TCP server and supports request/response protocol. In Redis, a request is accomplished with the following steps −" }, { "code": null, "e": 2289, "s": 2170, "text": "The client sends a query to the server, and reads from th...
What is the difference between jQuery and JavaScript?
The following is the difference between jQuery and JavaScript: jQuery is a fast and concise JavaScript library created by John Resig in 2006. jQuery simplifies HTML document traversing, event handling, animating, and Ajax interactions for Rapid Web Development. JavaScript is a lightweight, interpreted programming langu...
[ { "code": null, "e": 1125, "s": 1062, "text": "The following is the difference between jQuery and JavaScript:" }, { "code": null, "e": 1324, "s": 1125, "text": "jQuery is a fast and concise JavaScript library created by John Resig in 2006. jQuery simplifies HTML document traversi...
Minimum number of operations to convert array A to array B by adding an integer into a subarray - GeeksforGeeks
01 Nov, 2021 Given two arrays A[] and B[] of length N, the task is to find the minimum number of operations in which the array A can be converted into array B where each operation consists of adding an integer K into a subarray from L to R. Examples: Input: A[] = {3, 7, 1, 4, 1, 2}, B[] = {3, 7, 3, 6, 3, 2} Output: 1 ...
[ { "code": null, "e": 25308, "s": 25280, "text": "\n01 Nov, 2021" }, { "code": null, "e": 25536, "s": 25308, "text": "Given two arrays A[] and B[] of length N, the task is to find the minimum number of operations in which the array A can be converted into array B where each operat...
Circumradius of a Cyclic Quadrilateral using the length of Sides - GeeksforGeeks
21 Apr, 2021 Given integers A, B, C, and D denoting the length of sides of a Cyclic Quadrilateral, the task is to find the circumradius i.e., the radius of circumcircle of the given cyclic quadrilateral. Examples: Input: A = 3, B = 4, C = 5, D= 6Output: 3.29 Input: A = 10, B = 30, C = 50, D = 20Output: 27.78 Approach: ...
[ { "code": null, "e": 26561, "s": 26533, "text": "\n21 Apr, 2021" }, { "code": null, "e": 26752, "s": 26561, "text": "Given integers A, B, C, and D denoting the length of sides of a Cyclic Quadrilateral, the task is to find the circumradius i.e., the radius of circumcircle of the ...
D3.js | d3.min() function - GeeksforGeeks
28 Jun, 2019 The d3.min() function in D3.js is used to returns the minimum value in the given array using natural order. If an array is empty then it returns undefined as output. Syntax: d3.min(Array) Parameters: This function accepts a parameters Array which is an array of elements whose minimum value is to be calcula...
[ { "code": null, "e": 25461, "s": 25433, "text": "\n28 Jun, 2019" }, { "code": null, "e": 25627, "s": 25461, "text": "The d3.min() function in D3.js is used to returns the minimum value in the given array using natural order. If an array is empty then it returns undefined as outpu...
How to Draw Over Other Apps in Android? - GeeksforGeeks
06 Jun, 2021 Sometimes we require our app to show some content on the main screen irrespective of the app running in the foreground, this process is known as drawing over other apps. There are many apps that use this functionality to provide maximum features with minimum screen coverage. This also enables the user to d...
[ { "code": null, "e": 26407, "s": 26379, "text": "\n06 Jun, 2021" }, { "code": null, "e": 26959, "s": 26407, "text": "Sometimes we require our app to show some content on the main screen irrespective of the app running in the foreground, this process is known as drawing over other...
HTML <br> Tag - GeeksforGeeks
17 Mar, 2022 In this article, we will know how to add line-break using HTML <br> tag. The browser does not recognize new line and paragraph formatting in the text. If you want to start a new line, you need to insert a line break with the help of the <br>. The <br> tag inserts a single carriage return or breaks in the d...
[ { "code": null, "e": 24306, "s": 24278, "text": "\n17 Mar, 2022" }, { "code": null, "e": 24651, "s": 24306, "text": "In this article, we will know how to add line-break using HTML <br> tag. The browser does not recognize new line and paragraph formatting in the text. If you want ...
Find all possible subarrays having product less than or equal to K - GeeksforGeeks
23 May, 2021 Given an array arr[], the task is to print all possible subarrays having a product of its elements less than or equal to K. Input: arr[] = {2, 1, 3, 4, 5, 6, 2}, K = 10 Output: [[2], [1], [2, 1], [3], [1, 3], [2, 1, 3], [4], [5], [6], [2]] Explanation: All possible subarrays having product ≤ K are {2}, {1}...
[ { "code": null, "e": 26041, "s": 26013, "text": "\n23 May, 2021" }, { "code": null, "e": 26165, "s": 26041, "text": "Given an array arr[], the task is to print all possible subarrays having a product of its elements less than or equal to K." }, { "code": null, "e": 26...
HTTP headers | expires - GeeksforGeeks
19 Nov, 2019 The HTTP Expires header is a response-type header, the fundamental way of controlling the caches present. The expire header contains the date and time which denotes the period where the object can stay alive. Once the period expires, the object becomes stale. Almost every client support expire headers. The...
[ { "code": null, "e": 25943, "s": 25915, "text": "\n19 Nov, 2019" }, { "code": null, "e": 26593, "s": 25943, "text": "The HTTP Expires header is a response-type header, the fundamental way of controlling the caches present. The expire header contains the date and time which denote...
str() vs repr() in Python - GeeksforGeeks
25 Nov, 2020 str() and repr() both are used to get a string representation of object. Example of str():s = 'Hello, Geeks.'print (str(s))print (str(2.0/11.0))Output:Hello, Geeks. 0.181818181818.Example of repr():s = 'Hello, Geeks.'print (repr(s))print (repr(2.0/11.0))Output:'Hello, Geeks.' 0.18181818181818182 Example of...
[ { "code": null, "e": 25465, "s": 25437, "text": "\n25 Nov, 2020" }, { "code": null, "e": 25538, "s": 25465, "text": "str() and repr() both are used to get a string representation of object." }, { "code": null, "e": 25762, "s": 25538, "text": "Example of str():...
Append digits to the end of duplicate strings to make all strings in an array unique - GeeksforGeeks
04 Aug, 2021 Given an array arr[] consisting of N strings, the task is to modify the array by replacing the duplicate strings by appending ay number such that all the strings in the array are unique. Examples: Input: S = {“aa”, “bb”, “cc”, “bb”, “aa”, “aa”, “aa”}Output: {“aa”, “bb”, “cc”, “bb1”, “aa1”, “aa2”, “aa3”}Exp...
[ { "code": null, "e": 26033, "s": 26005, "text": "\n04 Aug, 2021" }, { "code": null, "e": 26220, "s": 26033, "text": "Given an array arr[] consisting of N strings, the task is to modify the array by replacing the duplicate strings by appending ay number such that all the strings i...
Bash Script to get Low Battery Alert in Linux - GeeksforGeeks
31 Jan, 2021 We are going to write a bash script that will speak “Battery Low” when the battery’s charging percentage will go below some specified threshold value. Before starting this, first, we need to understand some basic commands and terminology which are described below:Some Bash Commands: acpi: This command re...
[ { "code": null, "e": 25677, "s": 25649, "text": "\n31 Jan, 2021" }, { "code": null, "e": 25963, "s": 25677, "text": "We are going to write a bash script that will speak “Battery Low” when the battery’s charging percentage will go below some specified threshold value. Before start...
Find the largest number that can be formed by changing at most K digits - GeeksforGeeks
13 Mar, 2022 Given string str representing a number and an integer K, the task is to find the largest number that can be formed by changing at most K digits in the given number. Examples: Input: str = “569431”, K = 3 Output: 999931 Replace first, second and fourth digits with 9.Input: str = “5687”, K = 2 Output: 9987 ...
[ { "code": null, "e": 26285, "s": 26257, "text": "\n13 Mar, 2022" }, { "code": null, "e": 26450, "s": 26285, "text": "Given string str representing a number and an integer K, the task is to find the largest number that can be formed by changing at most K digits in the given number...
p5.js | constrain() Function - GeeksforGeeks
25 Mar, 2020 The constrain() function in p5.js is used to constrain a number between a given minimum and maximum limit. Syntax: constrain( n, low, high ) Parameters: This function accept three parameters as mentioned above and described below: n: It is a number which denotes the value that has to be constrained. low: I...
[ { "code": null, "e": 44937, "s": 44909, "text": "\n25 Mar, 2020" }, { "code": null, "e": 45044, "s": 44937, "text": "The constrain() function in p5.js is used to constrain a number between a given minimum and maximum limit." }, { "code": null, "e": 45052, "s": 450...
Type Casting in Scala - GeeksforGeeks
26 Jul, 2021 A Type casting is basically a conversion from one type to another. In Dynamic Programming Languages like Scala, it often becomes necessary to cast from type to another.Type Casting in Scala is done using the asInstanceOf[] method. This perspective is required in manifesting beans from an application conte...
[ { "code": null, "e": 25081, "s": 25053, "text": "\n26 Jul, 2021" }, { "code": null, "e": 25313, "s": 25081, "text": "A Type casting is basically a conversion from one type to another. In Dynamic Programming Languages like Scala, it often becomes necessary to cast from type to ano...
Print all funny words in a string - GeeksforGeeks
31 May, 2021 We are given a sentence. Our task is to print all funny words/strings in that sentence. Reverse the given string. Iterate through each character of that string, compare the absolute difference in the ASCII values of the characters at positions 0 and 1, 1 and 2, 2 and 3 and so on to the end. If the list o...
[ { "code": null, "e": 26098, "s": 26070, "text": "\n31 May, 2021" }, { "code": null, "e": 26188, "s": 26098, "text": "We are given a sentence. Our task is to print all funny words/strings in that sentence. " }, { "code": null, "e": 26489, "s": 26188, "text": "...
Generate 0 and 1 with 25% and 75% probability - GeeksforGeeks
06 Nov, 2021 Given a function rand50() that returns 0 or 1 with equal probability, write a function that returns 1 with 75% probability and 0 with 25% probability using rand50() only. Minimize the number of calls to rand50() method. Also, use of any other library function and floating point arithmetic are not allowed. ...
[ { "code": null, "e": 26619, "s": 26591, "text": "\n06 Nov, 2021" }, { "code": null, "e": 26927, "s": 26619, "text": "Given a function rand50() that returns 0 or 1 with equal probability, write a function that returns 1 with 75% probability and 0 with 25% probability using rand50(...
Absolute Difference of even and odd indexed elements in an Array - GeeksforGeeks
28 May, 2021 Given an array of integers arr, the task is to find the running absolute difference of elements at even and odd index positions separately. Note: 0-based indexing is considered for the array. That is the index of the first element in the array is zero. Examples: Input: arr[] = {1, 2, 3, 4, 5, 6} Output: ...
[ { "code": null, "e": 26175, "s": 26147, "text": "\n28 May, 2021" }, { "code": null, "e": 26440, "s": 26175, "text": "Given an array of integers arr, the task is to find the running absolute difference of elements at even and odd index positions separately. Note: 0-based indexing ...
Recursive program to check if number is palindrome or not in C++
We are given an integer as input. The goal is to find whether the input number Num is a palindrome or not using recursion. To check if a number is palindrome, reverse that number and check if both numbers are the same or not. If the reversed number is equal to the original number, then it is palindrome. Input − Num = 3...
[ { "code": null, "e": 1185, "s": 1062, "text": "We are given an integer as input. The goal is to find whether the input number Num is a palindrome or not using recursion." }, { "code": null, "e": 1367, "s": 1185, "text": "To check if a number is palindrome, reverse that number and...
Serving Prophet Model with Flask — Predicting Future | by Andrej Baranovskij | Towards Data Science
An accurate forecast and future prediction are crucial almost for any business. This is an obvious thing and it doesn’t need explanation. There is a concept of time series data, this data is ordered by date and typically each date is assigned with one or more values specific to that date. Machine Learning powered model...
[ { "code": null, "e": 628, "s": 171, "text": "An accurate forecast and future prediction are crucial almost for any business. This is an obvious thing and it doesn’t need explanation. There is a concept of time series data, this data is ordered by date and typically each date is assigned with one or ...
XPath - Relative Path
Location path specifies the location of node in XML document. This path can be absolute or relative. If location path starts with the node that we've selected then it is a relative path. Following are few examples locating the elements using relative path. firstname − select firstname related to student nodes. <p><xsl:...
[ { "code": null, "e": 1916, "s": 1729, "text": "Location path specifies the location of node in XML document. This path can be absolute or relative. If location path starts with the node that we've selected then it is a relative path." }, { "code": null, "e": 1986, "s": 1916, "tex...
Scikit Learn - Logistic Regression
Logistic regression, despite its name, is a classification algorithm rather than regression algorithm. Based on a given set of independent variables, it is used to estimate discrete value (0 or 1, yes/no, true/false). It is also called logit or MaxEnt Classifier. Basically, it measures the relationship between the cate...
[ { "code": null, "e": 2485, "s": 2221, "text": "Logistic regression, despite its name, is a classification algorithm rather than regression algorithm. Based on a given set of independent variables, it is used to estimate discrete value (0 or 1, yes/no, true/false). It is also called logit or MaxEnt C...
Running COBOL Programs using JCL
In order to execute a COBOL program in batch mode using JCL, the program needs to be compiled and a load module is created with all the sub-programs. The JCL uses the load module and not the actual program at the time of execution. The load libraries are concatenated and given to the JCL at the time of execution using ...
[ { "code": null, "e": 2203, "s": 1864, "text": "In order to execute a COBOL program in batch mode using JCL, the program needs to be compiled and a load module is created with all the sub-programs. The JCL uses the load module and not the actual program at the time of execution. The load libraries ar...
Multithreaded using the Pthreads API
Pthreads refers to the POSIX standard (IEEE 1003.1c) defining an API for thread creation and synchronization, which is a specification for thread behavior, not an implementation. This specification may be implemented by Operating-system designers in any way they wish. The C program shown in below, demonstrates the basi...
[ { "code": null, "e": 3160, "s": 1062, "text": "Pthreads refers to the POSIX standard (IEEE 1003.1c) defining an API for thread creation and synchronization, which is a specification for thread behavior, not an implementation. This specification may be implemented by Operating-system designers in any...
Batch Script - ASSOC
This is a batch command that associates an extension with a file type (FTYPE), displays existing associations, or deletes an association. assoc – Displays all the file extensions assoc | find “.ext” – Displays only those file extensions which have the extension ext. @echo off assoc > C:\lists.txt assoc | find “.doc...
[ { "code": null, "e": 2307, "s": 2169, "text": "This is a batch command that associates an extension with a file type (FTYPE), displays existing associations, or deletes an association." }, { "code": null, "e": 2438, "s": 2307, "text": "assoc – Displays all the file extensions \na...
Real Time Edge Detection in Browser | by Andrew Udell | Towards Data Science
Edge detection is a fundamental tool in computer vision. By using sharp contrasts in brightness, general outlines and shapes can be found in an image. Often used as a filter to find distinctions between items in a photo, edge detection offers a first stepping stone into object recognition. OpenCV offers a wide range of...
[ { "code": null, "e": 338, "s": 47, "text": "Edge detection is a fundamental tool in computer vision. By using sharp contrasts in brightness, general outlines and shapes can be found in an image. Often used as a filter to find distinctions between items in a photo, edge detection offers a first stepp...
NLP in the Financial Market — Sentiment Analysis | by Yuki Takahashi | Towards Data Science
Deep learning in Computer Vision has been successfully adopted in a variety of applications since a pioneer CNN called AlexNet on ImageNet in 2012. On the contrary, NLP has been behind in terms of the deep neural network utilisation. A lot of applications which claim the use of AI often use some sort of rule-based algo...
[ { "code": null, "e": 850, "s": 171, "text": "Deep learning in Computer Vision has been successfully adopted in a variety of applications since a pioneer CNN called AlexNet on ImageNet in 2012. On the contrary, NLP has been behind in terms of the deep neural network utilisation. A lot of applications...
How to add items/elements to an existing jagged array in C#?
To add an element to existing jagged array, just set the value of the element with a new value. Let’s say you need to add an element at the following location − a[3][1] Just set the value − a[3][1] = 500; Above, we accessed the first element of the 3rd array in a jagged array. Let us see the complete code − using Syste...
[ { "code": null, "e": 1158, "s": 1062, "text": "To add an element to existing jagged array, just set the value of the element with a new value." }, { "code": null, "e": 1223, "s": 1158, "text": "Let’s say you need to add an element at the following location −" }, { "code":...
PHP - Cookies
Cookies are text files stored on the client computer and they are kept of use tracking purpose. PHP transparently supports HTTP cookies. There are three steps involved in identifying returning users − Server script sends a set of cookies to the browser. For example name, age, or identification number etc. Server script...
[ { "code": null, "e": 2894, "s": 2757, "text": "Cookies are text files stored on the client computer and they are kept of use tracking purpose. PHP transparently supports HTTP cookies." }, { "code": null, "e": 2958, "s": 2894, "text": "There are three steps involved in identifying...
Understanding bias and variance. Anyone learning a data science 101... | by Vinodh Kumar Ravindranath | Towards Data Science
Anyone learning a data science 101 course is confronted with these terms bias and variance that define the accuracy of the machine learning model. I found some of the material around it confusing, so I thought I will try to explain with some illustration and code. Before I get to the code, basically bias is nothing but...
[ { "code": null, "e": 437, "s": 172, "text": "Anyone learning a data science 101 course is confronted with these terms bias and variance that define the accuracy of the machine learning model. I found some of the material around it confusing, so I thought I will try to explain with some illustration ...
Program to count number of palindromes of size k can be formed from the given string characters in Python
Suppose we have a string s that is representing alphabet characters and a number k. We have to find the number of palindromes where we can construct of length k using only letters in s. And we can use these letters more than once if we want. So, if the input is like s = "xy", k = 4, then the output will be 4 as the pal...
[ { "code": null, "e": 1304, "s": 1062, "text": "Suppose we have a string s that is representing alphabet characters and a number k. We have\nto find the number of palindromes where we can construct of length k using only letters in s.\nAnd we can use these letters more than once if we want." }, {...
How to set the Foreground Color of the RadioButton in C#?
30 Jun, 2019 In Windows Forms, RadioButton control is used to select a single option among the group of the options. For example, select your gender from the given list, so you will choose only one option among three options like Male or Female or Transgender. In Windows Forms, you are allowed to adjust the foreground ...
[ { "code": null, "e": 28, "s": 0, "text": "\n30 Jun, 2019" }, { "code": null, "e": 541, "s": 28, "text": "In Windows Forms, RadioButton control is used to select a single option among the group of the options. For example, select your gender from the given list, so you will choose...
HTML | <hr> width Attribute
28 May, 2019 The HTML <hr> width attribute is used to specify the width of the horizontal line in terms of pixels or percent. Syntax: <hr width="pixels|%"> Attribute Values: pixels: It sets the width of <hr> attribute in terms of pixels. %: It sets the width of <hr> attribute in terms of percentage (%). Note: The <hr> ...
[ { "code": null, "e": 28, "s": 0, "text": "\n28 May, 2019" }, { "code": null, "e": 141, "s": 28, "text": "The HTML <hr> width attribute is used to specify the width of the horizontal line in terms of pixels or percent." }, { "code": null, "e": 149, "s": 141, "t...
Print ancestors of a given binary tree node without recursion
21 Jun, 2022 Given a Binary Tree and a key, write a function that prints all the ancestors of the key in the given binary tree.For example, consider the following Binary Tree 1 / \ 2 3 / \ / \ 4 5 6 7 / \ / 8 9 10 Follo...
[ { "code": null, "e": 52, "s": 24, "text": "\n21 Jun, 2022" }, { "code": null, "e": 215, "s": 52, "text": "Given a Binary Tree and a key, write a function that prints all the ancestors of the key in the given binary tree.For example, consider the following Binary Tree " }, { ...
time.Since() Function in Golang With Examples
21 Apr, 2020 In Go language, time packages supplies functionality for determining as well as viewing time. The Since() function in Go language holds time value and is used to evaluate the difference with the actual time. Moreover, this function is defined under the time package. Here, you need to import the “time” pack...
[ { "code": null, "e": 28, "s": 0, "text": "\n21 Apr, 2020" }, { "code": null, "e": 372, "s": 28, "text": "In Go language, time packages supplies functionality for determining as well as viewing time. The Since() function in Go language holds time value and is used to evaluate the ...
How to select an element by name with jQuery ?
24 Nov, 2021 In this article, we will learn to get the selected element by name in jQuery. An element can be selected by the name attribute using 2 methods: By using the name selector method By using JavaScript to get the element by name and passing it on to jQuery We will understand both methods with the help of examp...
[ { "code": null, "e": 28, "s": 0, "text": "\n24 Nov, 2021" }, { "code": null, "e": 172, "s": 28, "text": "In this article, we will learn to get the selected element by name in jQuery. An element can be selected by the name attribute using 2 methods:" }, { "code": null, ...
Length of longest rod that can fit into a cuboid
09 Nov, 2021 Given the length, breadth, and height of a cuboid, the task is to find the length of the longest rod that can fit in a cuboid.Examples: Input: length = 12, breadth = 9, height = 8 Output: 17 Input: length = 22, breadth = 19, height = 8 Output: 30.1496 Explanation: In the figure GH = length, GF = b...
[ { "code": null, "e": 28, "s": 0, "text": "\n09 Nov, 2021" }, { "code": null, "e": 166, "s": 28, "text": "Given the length, breadth, and height of a cuboid, the task is to find the length of the longest rod that can fit in a cuboid.Examples: " }, { "code": null, "e": ...
How to Obtain the Phone Number of the Android Phone Programmatically?
06 Jun, 2021 While creating an android app, many times we need authentication by mobile number. To enhance the user experience, we can auto-detect the mobile number in a mobile system. So let’s start an android project! We will create a button, when clicked it will get a mobile number and display it in TextView. Step ...
[ { "code": null, "e": 28, "s": 0, "text": "\n06 Jun, 2021" }, { "code": null, "e": 330, "s": 28, "text": "While creating an android app, many times we need authentication by mobile number. To enhance the user experience, we can auto-detect the mobile number in a mobile system. So ...
What is chunk in Node.js ?
25 Apr, 2022 The data is a transfer from server to client for a particular request in the form of a stream. The stream contains chunks. A chunk is a fragment of the data that is sent by the client to server all chunks concepts to each other to make a buffer of the stream then the buffer is converted into meaningful dat...
[ { "code": null, "e": 53, "s": 25, "text": "\n25 Apr, 2022" }, { "code": null, "e": 512, "s": 53, "text": "The data is a transfer from server to client for a particular request in the form of a stream. The stream contains chunks. A chunk is a fragment of the data that is sent by t...
How to sort HashSet in Java
11 Dec, 2018 Given a HashSet in Java, the task is to sort this HashSet. Examples: Input: HashSet: [Geeks, For, ForGeeks, GeeksforGeeks] Output: [For, ForGeeks, Geeks, GeeksforGeeks] Input: HashSet: [2, 5, 3, 1, 4] Output: [1, 2, 3, 4, 5] The HashSet class implements the Set interface, backed by a hash table which is...
[ { "code": null, "e": 54, "s": 26, "text": "\n11 Dec, 2018" }, { "code": null, "e": 113, "s": 54, "text": "Given a HashSet in Java, the task is to sort this HashSet." }, { "code": null, "e": 123, "s": 113, "text": "Examples:" }, { "code": null, "e":...
Sum of first n term of Series 3, 5, 9, 17, 33....
27 Apr, 2021 Given n, we need to find sum of first n terms of the series represented as Sn = 3 + 5 + 9 + 17 + 33 ... upto nExamples: Input : 2 Output : 8 3 + 5 = 8 Input : 5 Output : 67 3 + 5 + 9 + 17 + 33 = 67 Let, the nth term be denoted by tn. This problem can easily be solved by splitting each term as follows ...
[ { "code": null, "e": 52, "s": 24, "text": "\n27 Apr, 2021" }, { "code": null, "e": 174, "s": 52, "text": "Given n, we need to find sum of first n terms of the series represented as Sn = 3 + 5 + 9 + 17 + 33 ... upto nExamples: " }, { "code": null, "e": 253, "s": 1...
PostgreSQL – Record type variable
01 Feb, 2021 PostgreSQL uses record type variables which simply act as placeholders for rows of a result set, similar to a row type variable. However, unlike row type variables, they do not have a predefined structure. Their structure is only determined after assigning a row to them. A record type variable also can cha...
[ { "code": null, "e": 28, "s": 0, "text": "\n01 Feb, 2021" }, { "code": null, "e": 392, "s": 28, "text": "PostgreSQL uses record type variables which simply act as placeholders for rows of a result set, similar to a row type variable. However, unlike row type variables, they do no...
Group Factor Levels in R
14 Sep, 2021 In this article, we will be looking at the approach to group factor level using the base functions of the R Programming language. In this approach to group factor levels, the user has to simply call the levels() functions with the required parameters as required by the user, and then it will be leading to ...
[ { "code": null, "e": 28, "s": 0, "text": "\n14 Sep, 2021" }, { "code": null, "e": 158, "s": 28, "text": "In this article, we will be looking at the approach to group factor level using the base functions of the R Programming language." }, { "code": null, "e": 482, ...
Unix / Linux - Useful Commands
This quick guide lists commands, including a syntax and a brief description. For more detail, use − $man command These commands allow you to create directories and handle files. cat Displays File Contents cd Changes Directory to dirname chgrp Changes file group chmod Changes permissions cp Copies source file into dest...
[ { "code": null, "e": 2981, "s": 2881, "text": "This quick guide lists commands, including a syntax and a brief description. For more detail, use −" }, { "code": null, "e": 2995, "s": 2981, "text": "$man command\n" }, { "code": null, "e": 3060, "s": 2995, "text...
Remove a cookie using PHP
31 Jul, 2021 Cookie: A Cookie is a small file sent by the server to preserve stateful information for a user. It is stored on the client’s computer and sent to the server every time the user makes a request for the same page. To create cookies you can set the cookie by using the setcookie() function of the PHP. Syntax:...
[ { "code": null, "e": 28, "s": 0, "text": "\n31 Jul, 2021" }, { "code": null, "e": 241, "s": 28, "text": "Cookie: A Cookie is a small file sent by the server to preserve stateful information for a user. It is stored on the client’s computer and sent to the server every time the us...
Running Docker Containers as Non-Root User
05 Nov, 2020 By default, Docker Containers run as Root Users. Now, if you are running applications inside Docker Containers, you have access to all the root privileges. This poses a great security threat when you deploy applications on large scale inside Docker Containers. Because if somehow your application gets hacke...
[ { "code": null, "e": 28, "s": 0, "text": "\n05 Nov, 2020" }, { "code": null, "e": 635, "s": 28, "text": "By default, Docker Containers run as Root Users. Now, if you are running applications inside Docker Containers, you have access to all the root privileges. This poses a great ...
How to place background image using ::before pseudo selectors in CSS ?
14 Dec, 2020 Given a web page and the task is to place the background image on web page using ::before pseudo selector. The ::before pseudo selector is used to place something before the content of the selected items. Syntax: .container::before{ content: ''; background: url(image file); position:absolute; ...
[ { "code": null, "e": 54, "s": 26, "text": "\n14 Dec, 2020" }, { "code": null, "e": 161, "s": 54, "text": "Given a web page and the task is to place the background image on web page using ::before pseudo selector." }, { "code": null, "e": 260, "s": 161, "text":...
Tensorflow.js tf.data.Dataset class .prefetch() Method
22 Apr, 2022 Tensorflow.js is an open-source library developed by Google for running machine learning models and deep learning neural networks in the browser or node environment. The tf.data.Dataset class .prefetch() function is used to produce a dataset that prefetches the specified elements from this given dataset. S...
[ { "code": null, "e": 28, "s": 0, "text": "\n22 Apr, 2022" }, { "code": null, "e": 194, "s": 28, "text": "Tensorflow.js is an open-source library developed by Google for running machine learning models and deep learning neural networks in the browser or node environment." }, {...
Prime Implicant chart for minimizing Cyclic Boolean functions
10 Jun, 2021 Prerequisite – K-Map (Karnaugh Map), Implicants in K-Map A functions is said to be a Cyclic Boolean Function if there is no Essential prime Implicant in its respective K-Map. Properties of Cyclic functions: Every prime Implicant is of same size. Every minterm is covered by at least two prime Implicants ...
[ { "code": null, "e": 52, "s": 24, "text": "\n10 Jun, 2021" }, { "code": null, "e": 228, "s": 52, "text": "Prerequisite – K-Map (Karnaugh Map), Implicants in K-Map A functions is said to be a Cyclic Boolean Function if there is no Essential prime Implicant in its respective K-Map....
Nagarro Interview Experience for Software Engineer
29 Apr, 2021 I have 2-3 years of Experience in Java/Spring MVC/REST. I participated in Nagarro’s drive-in in March 2021 via referral from a friend. It was a tremendous experience I got from some series of coding tests and interviews. Nagarro is one of the leading industries of today’s era. It is a CMMI level 5 company ...
[ { "code": null, "e": 54, "s": 26, "text": "\n29 Apr, 2021" }, { "code": null, "e": 405, "s": 54, "text": "I have 2-3 years of Experience in Java/Spring MVC/REST. I participated in Nagarro’s drive-in in March 2021 via referral from a friend. It was a tremendous experience I got fr...
C# | Check if OrderedDictionary collection contains a specific key - GeeksforGeeks
01 Feb, 2019 OrderedDictionary.Contains(Object) method is used to check whether the OrderedDictionary collection contains a specific key or not. Syntax: public bool Contains (object key); Here, key is the key to locate in the OrderedDictionary collection. Return Value: This method returns True if the OrderedDictionary...
[ { "code": null, "e": 24680, "s": 24652, "text": "\n01 Feb, 2019" }, { "code": null, "e": 24812, "s": 24680, "text": "OrderedDictionary.Contains(Object) method is used to check whether the OrderedDictionary collection contains a specific key or not." }, { "code": null, ...
journalctl Command in Linux with Examples - GeeksforGeeks
10 Feb, 2022 journalctl command in Linux is used to view systemd, kernel and journal logs. The logs are presented in the following way: -- Logs begin at [date_time_stamp], end at [dat_time_stamp] [date_time_stamp] [host_name] kernel: It displays the paginated output, hence it is a bit easy to navigate through a lot o...
[ { "code": null, "e": 24089, "s": 24058, "text": " \n10 Feb, 2022\n" }, { "code": null, "e": 24212, "s": 24089, "text": "journalctl command in Linux is used to view systemd, kernel and journal logs. The logs are presented in the following way:" }, { "code": null, "e": ...
Get first and last elements of a list in Python
There may be situation when you need to get the first and last element of the list. The tricky part here is you have to keep track of the length of the list while finding out these elements from the lists. Below are the approaches which we can use to achieve this. But of course all the approaches involve using the inde...
[ { "code": null, "e": 1413, "s": 1062, "text": "There may be situation when you need to get the first and last element of the list. The tricky part here is you have to keep track of the length of the list while finding out these elements from the lists. Below are the approaches which we can use to ac...
PHPunit | assertNotEquals() Function - GeeksforGeeks
31 Jul, 2019 The assertNotEquals() function is a builtin function in PHPUnit and is used to assert the actual obtained value to be not-equals to expected value. This assertion will return true in the case if the expected value is not-equals to actual value else returns false. In case of true the asserted test case got ...
[ { "code": null, "e": 24334, "s": 24306, "text": "\n31 Jul, 2019" }, { "code": null, "e": 24675, "s": 24334, "text": "The assertNotEquals() function is a builtin function in PHPUnit and is used to assert the actual obtained value to be not-equals to expected value. This assertion ...
AWK - User Defined Functions
Functions are basic building blocks of a program. AWK allows us to define our own functions. A large program can be divided into functions and each function can be written/tested independently. It provides re-usability of code. Given below is the general format of a user-defined function − function function_name(argume...
[ { "code": null, "e": 2085, "s": 1857, "text": "Functions are basic building blocks of a program. AWK allows us to define our own functions. A large program can be divided into functions and each function can be written/tested independently. It provides re-usability of code." }, { "code": nul...
How to Use the Reddit API in Python | Towards Data Science
Reddit is a huge ecosystem brimming with data that is readily available at our very fingertips. As a data-minded person, I wanted to take advantage of this and perform some analysis using this vast repository of open-source data. Initially, it turned out that getting to grip with Reddit’s API wasn’t as clear-cut as exp...
[ { "code": null, "e": 402, "s": 172, "text": "Reddit is a huge ecosystem brimming with data that is readily available at our very fingertips. As a data-minded person, I wanted to take advantage of this and perform some analysis using this vast repository of open-source data." }, { "code": nul...
LCASE() or LOWER() Functions in MySQL - GeeksforGeeks
03 Sep, 2020 1. LCASE() :The LCASE() function used to convert a text to lower-case. This function is a similar to the LOWER() function. Syntax : SELECT LCASE(text) Example : SELECT LCASE("Reading on GEEKSFORGEEKS is FUN") AS LowerText; Output – 2. LOWER() :Syntax : SELECT LOWER(text) Example : SELECT LOWER("Studying o...
[ { "code": null, "e": 23609, "s": 23581, "text": "\n03 Sep, 2020" }, { "code": null, "e": 23732, "s": 23609, "text": "1. LCASE() :The LCASE() function used to convert a text to lower-case. This function is a similar to the LOWER() function." }, { "code": null, "e": 237...
How to display message from a stored procedure?
To display message from stored procedure on the basis of conditions, let us use IF-ELSE condition − mysql> DELIMITER // mysql> CREATE PROCEDURE showMessage(value int,Name varchar(20)) BEGIN IF(value > 100) then SELECT CONCAT("HELLO"," ",Name); ELSE SELECT CONCAT("BYE"," ",Name); E...
[ { "code": null, "e": 1162, "s": 1062, "text": "To display message from stored procedure on the basis of conditions, let us use IF-ELSE condition −" }, { "code": null, "e": 1464, "s": 1162, "text": "mysql> DELIMITER //\nmysql> CREATE PROCEDURE showMessage(value int,Name varchar(20...
C program to find Fibonacci series for a given number
Fibonacci Series is a sequence of numbers obtained by adding the two previous numbers. Fibonacci series starts from two numbers f0 & f1. The initial values of fo & f1 can be taken 0, 1 or 1, 1 Fibonacci series satisfies the following conditions − fn = fn-1 + fn-2 Refer to the algorithm for the Fibonacci series. START S...
[ { "code": null, "e": 1149, "s": 1062, "text": "Fibonacci Series is a sequence of numbers obtained by adding the two previous numbers." }, { "code": null, "e": 1199, "s": 1149, "text": "Fibonacci series starts from two numbers f0 & f1." }, { "code": null, "e": 1309, ...
JavaScript - Date getDate() Method
Javascript date getDate() method returns the day of the month for the specified date according to local time. The value returned by getDate() is an integer between 1 and 31. Its syntax is as follows − Date.getDate() Returns today's date and time. <html> <head> <title>JavaScript getDate Method</title> </hea...
[ { "code": null, "e": 2640, "s": 2466, "text": "Javascript date getDate() method returns the day of the month for the specified date according to local time. The value returned by getDate() is an integer between 1 and 31." }, { "code": null, "e": 2667, "s": 2640, "text": "Its synt...
How to insert new row at a certain index in a table in jQuery ? - GeeksforGeeks
28 Jun, 2019 Given an HTML document containing a table. The task is to insert a new row in that table at a certain index using JQuery. Approach: Store the table column value <td> element into the variable. Then use eq() and after() method to insert the row in a table. Example 1: In this example, the row is inserted at ...
[ { "code": null, "e": 24369, "s": 24341, "text": "\n28 Jun, 2019" }, { "code": null, "e": 24491, "s": 24369, "text": "Given an HTML document containing a table. The task is to insert a new row in that table at a certain index using JQuery." }, { "code": null, "e": 2450...
Sum of the mirror image nodes of a complete binary tree in an inorder way - GeeksforGeeks
05 Aug, 2021 Given a complete binary tree, the task is to find the sum of mirror image nodes in an inorder way i.e. find the inorder traversal of the left sub-tree and for every node traversed, add the value of its mirror node to the current node’s value. Examples: Input: Output: 20 51 19 10 Inorder traversal of the...
[ { "code": null, "e": 24661, "s": 24633, "text": "\n05 Aug, 2021" }, { "code": null, "e": 24904, "s": 24661, "text": "Given a complete binary tree, the task is to find the sum of mirror image nodes in an inorder way i.e. find the inorder traversal of the left sub-tree and for ever...
Maximum subarray size, such that all subarrays of that size have sum less than k - GeeksforGeeks
07 Sep, 2021 Given an array of n positive integers and a positive integer k, the task is to find the maximum subarray size such that all subarrays of that size have the sum of elements less than or equals to k. Examples : Input : arr[] = {1, 2, 3, 4} and k = 8. Output : 2 Sum of subarrays of size 1: 1, 2, 3, 4. Sum o...
[ { "code": null, "e": 26701, "s": 26673, "text": "\n07 Sep, 2021" }, { "code": null, "e": 26899, "s": 26701, "text": "Given an array of n positive integers and a positive integer k, the task is to find the maximum subarray size such that all subarrays of that size have the sum of ...
Executing functions with multiple arguments at a terminal in Python - GeeksforGeeks
02 Sep, 2020 Commandline arguments are arguments provided by the user at runtime and gets executed by the functions or methods in the program. Python provides multiple ways to deal with these types of arguments. The three most common are: Using sys.argv Using getopt module/li> Using argparse module The Python sys modul...
[ { "code": null, "e": 25537, "s": 25509, "text": "\n02 Sep, 2020" }, { "code": null, "e": 25763, "s": 25537, "text": "Commandline arguments are arguments provided by the user at runtime and gets executed by the functions or methods in the program. Python provides multiple ways to ...
C-LOOK Disk Scheduling Algorithm - GeeksforGeeks
22 Jun, 2021 Prerequisite: Disk Scheduling Algorithms Given an array of disk track numbers and initial head position, our task is to find the total number of seek operations done to access all the requested tracks if C-LOOK disk scheduling algorithm is used. Also, write a program to find the seek sequence using C-LOOK ...
[ { "code": null, "e": 29429, "s": 29401, "text": "\n22 Jun, 2021" }, { "code": null, "e": 29470, "s": 29429, "text": "Prerequisite: Disk Scheduling Algorithms" }, { "code": null, "e": 29763, "s": 29470, "text": "Given an array of disk track numbers and initial ...
Find the second last node of a linked list in single traversal - GeeksforGeeks
09 Jun, 2021 Given a linked list. The task is to find the second last node of the linked list using a single traversal only.Examples: Input : List = 1 -> 2 -> 3 -> 4 -> 5 -> NULL Output : 4Input : List = 2 -> 4 -> 6 -> 8 -> 33 -> 67 -> NULL Output : 33 The idea is to traverse the linked list following the below a...
[ { "code": null, "e": 26179, "s": 26151, "text": "\n09 Jun, 2021" }, { "code": null, "e": 26302, "s": 26179, "text": "Given a linked list. The task is to find the second last node of the linked list using a single traversal only.Examples: " }, { "code": null, "e": 264...
response.is_redirect - Python requests - GeeksforGeeks
01 Mar, 2020 Python requests are generally used to fetch the content from a particular resource URI. Whenever we make a request to a specified URI through Python, it returns a response object. Now, this response object would be used to access certain features such as content, headers, etc. This article revolves around ...
[ { "code": null, "e": 25537, "s": 25509, "text": "\n01 Mar, 2020" }, { "code": null, "e": 25991, "s": 25537, "text": "Python requests are generally used to fetch the content from a particular resource URI. Whenever we make a request to a specified URI through Python, it returns a ...
base64.b32decode() in Python - GeeksforGeeks
26 Mar, 2020 With the help of base64.b32decode() method, we can decode the binary string using base32 alphabets into normal form. Syntax : base64.b32decode(b_string) Return : Return the decoded string. Example #1 :In this example we can see that by using base64.b32decode() method, we are able to get the decoded string ...
[ { "code": null, "e": 25537, "s": 25509, "text": "\n26 Mar, 2020" }, { "code": null, "e": 25654, "s": 25537, "text": "With the help of base64.b32decode() method, we can decode the binary string using base32 alphabets into normal form." }, { "code": null, "e": 25690, ...
MongoDB - Embedded Documents - GeeksforGeeks
14 Sep, 2021 MongoDB provides you a cool feature which is known as Embedded or Nested Document. Embedded document or nested documents are those types of documents which contain a document inside another document. Or in other words, when a collection has a document, this document contains another document, another docum...
[ { "code": null, "e": 25893, "s": 25865, "text": "\n14 Sep, 2021" }, { "code": null, "e": 26317, "s": 25893, "text": "MongoDB provides you a cool feature which is known as Embedded or Nested Document. Embedded document or nested documents are those types of documents which contain...
Difference between __sizeof__() and getsizeof() method - Python - GeeksforGeeks
06 May, 2021 Memory management is of utmost priority when we write large chunks of code. So in addition to good coding knowledge, it is important to be able to write programs, so as to handle memory efficiently. So let us look at the two ways of getting the size of a particular object in Python. These are getsizeof() ...
[ { "code": null, "e": 25563, "s": 25535, "text": "\n06 May, 2021" }, { "code": null, "e": 25763, "s": 25563, "text": "Memory management is of utmost priority when we write large chunks of code. So in addition to good coding knowledge, it is important to be able to write programs, ...
C++ Program For Finding Subarray With Given Sum - Set 1 (Nonnegative Numbers) - GeeksforGeeks
21 Dec, 2021 Given an unsorted array of nonnegative integers, find a continuous subarray which adds to a given number. Examples : Input: arr[] = {1, 4, 20, 3, 10, 5}, sum = 33 Output: Sum found between indexes 2 and 4 Sum of elements between indices 2 and 4 is 20 + 3 + 10 = 33 Input: arr[] = {1, 4, 0, 0, 3, 10, 5}, s...
[ { "code": null, "e": 26041, "s": 26013, "text": "\n21 Dec, 2021" }, { "code": null, "e": 26159, "s": 26041, "text": "Given an unsorted array of nonnegative integers, find a continuous subarray which adds to a given number. Examples : " }, { "code": null, "e": 26548, ...
Python | Find Symmetric Pairs in dictionary - GeeksforGeeks
15 Oct, 2019 Sometimes, while working with Python dictionary, one can have a problem in which one desires to get key-value pairs that are symmetrical, i.e that has key-value pair of same value irrespective of the fact value is a key or value. Let’s discuss certain ways in which this task can be performed. Method #1 : U...
[ { "code": null, "e": 25681, "s": 25653, "text": "\n15 Oct, 2019" }, { "code": null, "e": 25975, "s": 25681, "text": "Sometimes, while working with Python dictionary, one can have a problem in which one desires to get key-value pairs that are symmetrical, i.e that has key-value pa...
How to use onKeyPress event in ReactJS? - GeeksforGeeks
25 Jan, 2021 The onKeyPress event in ReactJS occurs when the user presses a key on the keyboard but it is not fired for all keys e.g. ALT, CTRL, SHIFT, ESC in all browsers. To use the onKeyPress event in ReactJS we will use the predefined onKeyPress method. Creating React Application: Step 1: Create a React application...
[ { "code": null, "e": 25667, "s": 25639, "text": "\n25 Jan, 2021" }, { "code": null, "e": 25827, "s": 25667, "text": "The onKeyPress event in ReactJS occurs when the user presses a key on the keyboard but it is not fired for all keys e.g. ALT, CTRL, SHIFT, ESC in all browsers." ...
Kotlin Inline Functions - GeeksforGeeks
29 Jan, 2021 In Kotlin, the higher-order functions or lambda expressions, all stored as an object so memory allocation, for both function objects and classes, and virtual calls might introduce runtime overhead. Sometimes we can eliminate the memory overhead by inlining the lambda expression. In order to reduce the memo...
[ { "code": null, "e": 25415, "s": 25387, "text": "\n29 Jan, 2021" }, { "code": null, "e": 25961, "s": 25415, "text": "In Kotlin, the higher-order functions or lambda expressions, all stored as an object so memory allocation, for both function objects and classes, and virtual calls...
How to Open URL in New Tab using JavaScript ? - GeeksforGeeks
20 Jul, 2021 In HTML, the anchor tag is used to open URLs in a new tab in an elementary and straightforward manner. More about this tag can be learnt from this article. However, sometimes there’s a need to do the same using Javascript. In this case window.open() method proves to be helpful. The window.open() method is ...
[ { "code": null, "e": 26191, "s": 26163, "text": "\n20 Jul, 2021" }, { "code": null, "e": 26604, "s": 26191, "text": "In HTML, the anchor tag is used to open URLs in a new tab in an elementary and straightforward manner. More about this tag can be learnt from this article. However...
Reduce a number to 1 by performing given operations - GeeksforGeeks
17 May, 2021 Given a number N. The task is to reduce the given number N to 1 in the minimum number of steps. You can perform any one of the below operations in each step. Operation 1: If the number is even then you can divide the number by 2. Operation 2: If the number is odd then you are allowed to perform either (n+1...
[ { "code": null, "e": 26655, "s": 26627, "text": "\n17 May, 2021" }, { "code": null, "e": 26813, "s": 26655, "text": "Given a number N. The task is to reduce the given number N to 1 in the minimum number of steps. You can perform any one of the below operations in each step." },...
bad_alloc in C++ - GeeksforGeeks
27 Feb, 2018 Prerequisite : Exceptions in C++ Standard C++ contains several built-in exception classes. The most commonly used is bad_alloc, which is thrown if an error occurs when attempting to allocate memory with new. This class is derived from exception. To make use of bad_alloc, one should set up the appropriate t...
[ { "code": null, "e": 25369, "s": 25341, "text": "\n27 Feb, 2018" }, { "code": null, "e": 25402, "s": 25369, "text": "Prerequisite : Exceptions in C++" }, { "code": null, "e": 25577, "s": 25402, "text": "Standard C++ contains several built-in exception classes....
Extract title from a webpage using Python - GeeksforGeeks
04 Apr, 2022 Prerequisite Implementing Web Scraping in Python with BeautifulSoup, Python Urllib Module, Tools for Web Scraping In this article, we are going to write python scripts to extract the title form the webpage from the given webpage URL. Method 1: bs4 Beautiful Soup(bs4) is a Python library for pulling data ou...
[ { "code": null, "e": 26135, "s": 26107, "text": "\n04 Apr, 2022" }, { "code": null, "e": 26249, "s": 26135, "text": "Prerequisite Implementing Web Scraping in Python with BeautifulSoup, Python Urllib Module, Tools for Web Scraping" }, { "code": null, "e": 26369, "...
XOR Encryption by Shifting Plaintext - GeeksforGeeks
28 Nov, 2021 Here is a cipher algorithm, based on hexadecimal strings that is implemented by XORing the given plaintext, N number of times where N is its length. But, the catch is that every next XOR operation is done after shifting the consecutive plain text entry to the right. A sample operation is shown below : Supp...
[ { "code": null, "e": 26061, "s": 26033, "text": "\n28 Nov, 2021" }, { "code": null, "e": 26364, "s": 26061, "text": "Here is a cipher algorithm, based on hexadecimal strings that is implemented by XORing the given plaintext, N number of times where N is its length. But, the catch...
C program to create a pendulum clock using graphics - GeeksforGeeks
23 Apr, 2021 In this article, it is discussed how to design a Pendulum Clock in the C programming language using Graphics. Approach: Create two rectangles, one inside the other, using the rectangle() function to act as the outer outline of the clock & the other is the inner outline of the clock. Color the space between...
[ { "code": null, "e": 25453, "s": 25425, "text": "\n23 Apr, 2021" }, { "code": null, "e": 25563, "s": 25453, "text": "In this article, it is discussed how to design a Pendulum Clock in the C programming language using Graphics." }, { "code": null, "e": 25573, "s": ...
Python | Count occurrences of an element in a Tuple - GeeksforGeeks
17 Jul, 2020 In this program, we need to accept a tuple and then find the number of times an item is present in the tuple. This can be done in various ways, but in this article, we will see how this can be done using simple approach and how inbuilt functions can be used to solve this problem. Examples: Tuple: (10, 8, 5...
[ { "code": null, "e": 26217, "s": 26189, "text": "\n17 Jul, 2020" }, { "code": null, "e": 26498, "s": 26217, "text": "In this program, we need to accept a tuple and then find the number of times an item is present in the tuple. This can be done in various ways, but in this article...
HTML | <textarea> required Attribute - GeeksforGeeks
06 May, 2019 The HTML <textarea> required Attribute is a Boolean attribute which is used to specify that the <textarea> element must be filled out before submitting the Form. Syntax: <textarea required> Example: This Example illustrates the use of required attribute in Textarea Element. <!DOCTYPE html><html> <head> ...
[ { "code": null, "e": 25755, "s": 25727, "text": "\n06 May, 2019" }, { "code": null, "e": 25917, "s": 25755, "text": "The HTML <textarea> required Attribute is a Boolean attribute which is used to specify that the <textarea> element must be filled out before submitting the Form." ...
Export and Import data in Cassandra - GeeksforGeeks
02 Jan, 2020 Prerequisite – CassandraIn this article, we are going to discuss how we can export and import data through cqlsh query.Let’s discuss one by one. First, we are going to create table namely as Data in which id, firstname, lastname are the fields for sample exercise.Let’s have a look. Table name: Data CREATE ...
[ { "code": null, "e": 25325, "s": 25297, "text": "\n02 Jan, 2020" }, { "code": null, "e": 25470, "s": 25325, "text": "Prerequisite – CassandraIn this article, we are going to discuss how we can export and import data through cqlsh query.Let’s discuss one by one." }, { "cod...
scipy stats.gamma() | Python - GeeksforGeeks
27 Mar, 2019 scipy.stats.gamma() is an gamma continuous random variable that is defined with a standard format and some shape parameters to complete its specification. Parameters :-> q : lower and upper tail probability-> x : quantiles-> loc : [optional]location parameter. Default = 0-> scale : [optional]scale paramete...
[ { "code": null, "e": 25489, "s": 25461, "text": "\n27 Mar, 2019" }, { "code": null, "e": 25644, "s": 25489, "text": "scipy.stats.gamma() is an gamma continuous random variable that is defined with a standard format and some shape parameters to complete its specification." }, ...
Python - Concatenate Dictionary string values - GeeksforGeeks
23 Jan, 2020 Sometimes, while working with dictionaries, we might have utility problem in which we need to perform elementary operation among the common keys of dictionaries. This can be extended to any operation to be performed. Let’s discuss string concatenation of like key values and ways to solve it in this article...
[ { "code": null, "e": 26165, "s": 26137, "text": "\n23 Jan, 2020" }, { "code": null, "e": 26474, "s": 26165, "text": "Sometimes, while working with dictionaries, we might have utility problem in which we need to perform elementary operation among the common keys of dictionaries. T...
Java Program for Linear Search - GeeksforGeeks
04 Dec, 2018 Problem: Given an array arr[] of n elements, write a function to search a given element x in arr[]. Java // Java code for linearly search x in arr[]. If x// is present then return its location, otherwise// return -1class LinearSearch { // This function returns index of element x in arr[] static int s...
[ { "code": null, "e": 26211, "s": 26183, "text": "\n04 Dec, 2018" }, { "code": null, "e": 26311, "s": 26211, "text": "Problem: Given an array arr[] of n elements, write a function to search a given element x in arr[]." }, { "code": null, "e": 26316, "s": 26311, ...
PyQt5 Label – Accessing opacity level of the Opacity effect - GeeksforGeeks
10 May, 2020 In this article we will see how we can access the opacity level of the opacity effect of the label, the more the value of opacity the label will be clearly the visible and if opacity value is lesser more transparent it will become. By default opacity level is 0.7 and in order to set the opacity we use setO...
[ { "code": null, "e": 26277, "s": 26249, "text": "\n10 May, 2020" }, { "code": null, "e": 26599, "s": 26277, "text": "In this article we will see how we can access the opacity level of the opacity effect of the label, the more the value of opacity the label will be clearly the vis...
Generate all possible combinations of at most X characters from a given array - GeeksforGeeks
22 Apr, 2021 Given an array arr[] consisting of N characters, the task is to generate all possible combinations of at most X elements ( 1 ≤ X ≤ N). Examples: Input: N = 3, X = 2, arr[] = {‘a’, ‘b’, ‘a’}Output: a b c bc ca ab cb ac baExplanation: All possible combinations using 1 character is 3 {‘a’, ‘b’, ‘c’}. All poss...
[ { "code": null, "e": 26413, "s": 26385, "text": "\n22 Apr, 2021" }, { "code": null, "e": 26548, "s": 26413, "text": "Given an array arr[] consisting of N characters, the task is to generate all possible combinations of at most X elements ( 1 ≤ X ≤ N)." }, { "code": null, ...
Detecting objects of similar color in Python using OpenCV - GeeksforGeeks
23 Jun, 2021 OpenCV is a library of programming functions mainly aimed at real-time computer vision. In this article, we will see how to get the objects of the same color in an image. We can select a color by slide bar which is created by the cv2 command cv2.createTrackbar. OpenCV Numpy First of all, we need to read th...
[ { "code": null, "e": 25563, "s": 25535, "text": "\n23 Jun, 2021" }, { "code": null, "e": 25651, "s": 25563, "text": "OpenCV is a library of programming functions mainly aimed at real-time computer vision." }, { "code": null, "e": 25825, "s": 25651, "text": "In...
Generate N integers satisfying the given conditions - GeeksforGeeks
27 Mar, 2022 Given an integer N, the task is to generate an array of size N with the following properties: No two elements divide each other.Every odd subset has an odd sum and every even subset has an even sum. No two elements divide each other. Every odd subset has an odd sum and every even subset has an even sum. ...
[ { "code": null, "e": 25963, "s": 25935, "text": "\n27 Mar, 2022" }, { "code": null, "e": 26059, "s": 25963, "text": "Given an integer N, the task is to generate an array of size N with the following properties: " }, { "code": null, "e": 26164, "s": 26059, "te...
SAP Labs Interview Experience (On-Campus) - GeeksforGeeks
09 Aug, 2021 SAP Labs visited our college for hiring students for the Scholar@SAP profile. It is a WILP(Work Integrated Learning Program) course that aims to provide 2 years of work experience on industrial SAP projects as well as an M-Tech degree in Software Engineering from BITS Pilani. In the given program, weekdays...
[ { "code": null, "e": 26287, "s": 26259, "text": "\n09 Aug, 2021" }, { "code": null, "e": 26685, "s": 26287, "text": "SAP Labs visited our college for hiring students for the Scholar@SAP profile. It is a WILP(Work Integrated Learning Program) course that aims to provide 2 years of...
ArrayBlockingQueue Class in Java - GeeksforGeeks
03 Jan, 2022 ArrayBlockingQueue class is a bounded blocking queue backed by an array. By bounded, it means that the size of the Queue is fixed. Once created, the capacity cannot be changed. Attempts to put an element into a full queue will result in the operation blocking. Similarly attempts to take an element from an ...
[ { "code": null, "e": 24999, "s": 24971, "text": "\n03 Jan, 2022" }, { "code": null, "e": 25633, "s": 24999, "text": "ArrayBlockingQueue class is a bounded blocking queue backed by an array. By bounded, it means that the size of the Queue is fixed. Once created, the capacity canno...
C function to Swap strings - GeeksforGeeks
06 Jul, 2018 Let us consider the below program. #include<stdio.h>void swap(char *str1, char *str2){ char *temp = str1; str1 = str2; str2 = temp;} int main(){ char *str1 = "geeks"; char *str2 = "forgeeks"; swap(str1, str2); printf("str1 is %s, str2 is %s", str1, str2); getchar(); return 0;} Output of the pr...
[ { "code": null, "e": 25633, "s": 25605, "text": "\n06 Jul, 2018" }, { "code": null, "e": 25668, "s": 25633, "text": "Let us consider the below program." }, { "code": "#include<stdio.h>void swap(char *str1, char *str2){ char *temp = str1; str1 = str2; str2 = temp;} ...
GATE | GATE-CS-2005 | Question 87 - GeeksforGeeks
28 Jun, 2021 We are given 9 tasks T1, T2.... T9. The execution of each task requires one unit of time. We can execute one task at a time. Each task Ti has a profit Pi and a deadline di Profit Pi is earned if the task is completed before the end of the dith unit of time. Task T1 T2 T3 T4 T5 T6 T7 T8 T9 ...
[ { "code": null, "e": 25695, "s": 25667, "text": "\n28 Jun, 2021" }, { "code": null, "e": 25953, "s": 25695, "text": "We are given 9 tasks T1, T2.... T9. The execution of each task requires one unit of time. We can execute one task at a time. Each task Ti has a profit Pi and a dea...
Distributing all balls without repetition - GeeksforGeeks
29 Apr, 2022 Given N balls. For convenience, we denote the color of each ball as — lowercase letters. We have to distribute N balls among K people. They will be upset if they get two balls of the same color. We can give any number of balls to people and they won’t be upset even if they do not get any balls, but, we hav...
[ { "code": null, "e": 26270, "s": 26242, "text": "\n29 Apr, 2022" }, { "code": null, "e": 26690, "s": 26270, "text": "Given N balls. For convenience, we denote the color of each ball as — lowercase letters. We have to distribute N balls among K people. They will be upset if they g...