title stringlengths 3 221 | text stringlengths 17 477k | parsed listlengths 0 3.17k |
|---|---|---|
Active and Inactive cells after k Days - GeeksforGeeks | 07 Apr, 2021
Given a binary array of size n where n > 3. A true (or 1) value in the array means active and false (or 0) means inactive. Given a number k, the task is to find count of active and inactive cells after k days. After every day, status of i’th cell becomes active if left and right cells are not same and inac... | [
{
"code": null,
"e": 26175,
"s": 26147,
"text": "\n07 Apr, 2021"
},
{
"code": null,
"e": 26707,
"s": 26175,
"text": "Given a binary array of size n where n > 3. A true (or 1) value in the array means active and false (or 0) means inactive. Given a number k, the task is to find co... |
Capitalize first letter of a column in Pandas dataframe | A pandas dataframe is similar to a table with rows and columns. Sometimes we may have a need of capitalizing the first letters of one column in the dataframe which can be achieved by the following methods.
In the below example we first create a dataframe with column names as Day and Subject.
import pandas as pd
# A dat... | [
{
"code": null,
"e": 1268,
"s": 1062,
"text": "A pandas dataframe is similar to a table with rows and columns. Sometimes we may have a need of capitalizing the first letters of one column in the dataframe which can be achieved by the following methods."
},
{
"code": null,
"e": 1355,
... |
Logger setUseParentHandlers() method in Java with Examples - GeeksforGeeks | 26 Mar, 2019
setUseParentHandlers() method of a Logger class used to set the configuration which defines whether or not this logger should send its output to its parent Logger. if we want to send the output to its parent Logger then we have to set the parameter to this method equal to true. This means that any log reco... | [
{
"code": null,
"e": 25347,
"s": 25319,
"text": "\n26 Mar, 2019"
},
{
"code": null,
"e": 25766,
"s": 25347,
"text": "setUseParentHandlers() method of a Logger class used to set the configuration which defines whether or not this logger should send its output to its parent Logger.... |
C++ Program for Range Queries for Frequencies of array elements - GeeksforGeeks | 06 Jan, 2022
Given an array of n non-negative integers. The task is to find frequency of a particular element in the arbitrary range of array[]. The range is given as positions (not 0 based indexes) in array. There can be multiple queries of given type. Examples:
Input : arr[] = {2, 8, 6, 9, 8, 6, 8, 2, 11};
... | [
{
"code": null,
"e": 26041,
"s": 26013,
"text": "\n06 Jan, 2022"
},
{
"code": null,
"e": 26294,
"s": 26041,
"text": "Given an array of n non-negative integers. The task is to find frequency of a particular element in the arbitrary range of array[]. The range is given as positions... |
Fast Fourier Transformation for polynomial multiplication - GeeksforGeeks | 01 Dec, 2021
Given two polynomial A(x) and B(x), find the product C(x) = A(x)*B(x). There is already an O() naive approach to solve this problem. here. This approach uses the coefficient form of the polynomial to calculate the product.A coefficient representation of a polynomial is a = a0, a1, ..., an-1.
Example-Coeffi... | [
{
"code": null,
"e": 26623,
"s": 26595,
"text": "\n01 Dec, 2021"
},
{
"code": null,
"e": 26916,
"s": 26623,
"text": "Given two polynomial A(x) and B(x), find the product C(x) = A(x)*B(x). There is already an O() naive approach to solve this problem. here. This approach uses the c... |
Apache Drill - Querying Parquet Files | Parquet is a columnar storage format. Apache Drill uses Parquet format for easy, fast and efficient access.
Before moving to create a table in parquet, you must change the Drill storage format using the following command.
0: jdbc:drill:zk = local> alter session set `store.format`= 'parquet';
+-------+------------------... | [
{
"code": null,
"e": 2177,
"s": 2069,
"text": "Parquet is a columnar storage format. Apache Drill uses Parquet format for easy, fast and efficient access."
},
{
"code": null,
"e": 2291,
"s": 2177,
"text": "Before moving to create a table in parquet, you must change the Drill stor... |
Music artist Recommender System using Stochastic Gradient Descent | Machine Learning from Scratch (Part VII) | by Venelin Valkov | Towards Data Science | TL;DR Build a Recommender System in Python from scratch. Create a ratings matrix from last.fm dataset and preprocess the data. Train the model using Stochastic Gradient Descent (SGD) and use it to recommend music artists.
Recommender Systems are becoming more and more relevant as the amount of information on “The Inter... | [
{
"code": null,
"e": 394,
"s": 172,
"text": "TL;DR Build a Recommender System in Python from scratch. Create a ratings matrix from last.fm dataset and preprocess the data. Train the model using Stochastic Gradient Descent (SGD) and use it to recommend music artists."
},
{
"code": null,
"... |
Why Scientific Computing Is So Great With Julia | by Emmett Boudreau | Towards Data Science | Over the past ten years, the scientific computing craze has escalated further and further, and with that so have the great options available to programmers for mathematical computation and data manipulation. One of the languages that might not be as popular as other languages in the field, like Python and R, is an open... | [
{
"code": null,
"e": 563,
"s": 172,
"text": "Over the past ten years, the scientific computing craze has escalated further and further, and with that so have the great options available to programmers for mathematical computation and data manipulation. One of the languages that might not be as popul... |
fillpoly() function in C - GeeksforGeeks | 23 Jan, 2018
The header file graphics.h contains fillpoly() function which is used to draw and fill a polygon i.e. triangle, rectangle, pentagon, hexagon etc. It require same arguments as drawpoly().
Syntax :
void fillpoly( int number, int *polypoints );
where,
number indicates (n + 1) number of points
where, n is th... | [
{
"code": null,
"e": 25939,
"s": 25911,
"text": "\n23 Jan, 2018"
},
{
"code": null,
"e": 26126,
"s": 25939,
"text": "The header file graphics.h contains fillpoly() function which is used to draw and fill a polygon i.e. triangle, rectangle, pentagon, hexagon etc. It require same a... |
Python Program To Check Whether Two Strings Are Anagram Of Each Other - GeeksforGeeks | 20 Dec, 2021
Write a function to check whether two given strings are anagram of each other or not. An anagram of a string is another string that contains the same characters, only the order of characters can be different. For example, “abcd” and “dabc” are an anagram of each other.
Method 1 (Use Sorting):
Sort both str... | [
{
"code": null,
"e": 26207,
"s": 26179,
"text": "\n20 Dec, 2021"
},
{
"code": null,
"e": 26477,
"s": 26207,
"text": "Write a function to check whether two given strings are anagram of each other or not. An anagram of a string is another string that contains the same characters, o... |
AutoCorrelation - GeeksforGeeks | 26 Nov, 2020
Autocorrelation is the measure of the degree of similarity between a given time series and the lagged version of that time series over successive time periods. It is similar to calculating the correlation between two different variables except in Autocorrelation we calculate the correlation between two dif... | [
{
"code": null,
"e": 24644,
"s": 24616,
"text": "\n26 Nov, 2020"
},
{
"code": null,
"e": 25004,
"s": 24644,
"text": "Autocorrelation is the measure of the degree of similarity between a given time series and the lagged version of that time series over successive time periods. It ... |
list rbegin() and rend() function in C++ STL - GeeksforGeeks | 17 Jul, 2018
list::rbegin() is an inbuilt function in C++ STL that returns a reverse iterator which points to the last element of the list.Syntax:list_name.rbegin()Parameter: This function does not accept any parameters.Return value: It returns a reverse iterator which points to the last element of the list.Below progr... | [
{
"code": null,
"e": 25343,
"s": 25315,
"text": "\n17 Jul, 2018"
},
{
"code": null,
"e": 26759,
"s": 25343,
"text": "list::rbegin() is an inbuilt function in C++ STL that returns a reverse iterator which points to the last element of the list.Syntax:list_name.rbegin()Parameter: T... |
MapReduce - Combiners - GeeksforGeeks | 10 Sep, 2020
Map-Reduce is a programming model that is used for processing large-size data-sets over distributed systems in Hadoop. Map phase and Reduce Phase are the main two important parts of any Map-Reduce job. Map-Reduce applications are limited by the bandwidth available on the cluster because there is a movement... | [
{
"code": null,
"e": 25347,
"s": 25319,
"text": "\n10 Sep, 2020"
},
{
"code": null,
"e": 25688,
"s": 25347,
"text": "Map-Reduce is a programming model that is used for processing large-size data-sets over distributed systems in Hadoop. Map phase and Reduce Phase are the main two ... |
Check if minimum element in array is less than or equals half of every other element - GeeksforGeeks | 09 Aug, 2021
Given an array arr[], the task is to check if the minimum element in the array is less than or equal to half of every other element. If it is then print “yes” otherwise print “no”.Note: The minimum number in the given array is always unique.
Examples:
Input: arr = {2, 1, 4, 5} Output: Yes Explanation: 1 is... | [
{
"code": null,
"e": 25941,
"s": 25913,
"text": "\n09 Aug, 2021"
},
{
"code": null,
"e": 26183,
"s": 25941,
"text": "Given an array arr[], the task is to check if the minimum element in the array is less than or equal to half of every other element. If it is then print “yes” othe... |
Python | Add substring at specific index - GeeksforGeeks | 07 Jun, 2019
In Python, String is immutable datatype, what this means is, that there are lot many restrictions when one handles its manipulation. The problem of adding something at a position at string is not possible, without the list reconstruction. Let’s discuss certain ways in which this task can be performed.
Meth... | [
{
"code": null,
"e": 25751,
"s": 25723,
"text": "\n07 Jun, 2019"
},
{
"code": null,
"e": 26054,
"s": 25751,
"text": "In Python, String is immutable datatype, what this means is, that there are lot many restrictions when one handles its manipulation. The problem of adding somethin... |
Python | Concatenate dictionary value lists - GeeksforGeeks | 27 Aug, 2019
Sometimes, while working with dictionaries, we might have a problem in which we have lists as it’s value and wish to have it cumulatively in single list by concatenation. This problem can occur in web development domain. Let’s discuss certain ways in which this task can be performed.
Method #1 : Using sum(... | [
{
"code": null,
"e": 26165,
"s": 26137,
"text": "\n27 Aug, 2019"
},
{
"code": null,
"e": 26450,
"s": 26165,
"text": "Sometimes, while working with dictionaries, we might have a problem in which we have lists as it’s value and wish to have it cumulatively in single list by concate... |
Mini Banking Application in Java - GeeksforGeeks | 15 Dec, 2021
In any Bank Transaction, there are several parties involved to process transaction like a merchant, bank, receiver, etc. so there are several numbers reasons that transaction may get failed, declined, so to handle a transaction in Java, there is a JDBC (Java Database Connectivity) which provides us an API ... | [
{
"code": null,
"e": 25249,
"s": 25221,
"text": "\n15 Dec, 2021"
},
{
"code": null,
"e": 25730,
"s": 25249,
"text": "In any Bank Transaction, there are several parties involved to process transaction like a merchant, bank, receiver, etc. so there are several numbers reasons that ... |
Count Possible Decodings of a given Digit Sequence - GeeksforGeeks | 28 Feb, 2022
Let 1 represent ‘A’, 2 represents ‘B’, etc. Given a digit sequence, count the number of possible decodings of the given digit sequence.
Examples:
Input: digits[] = "121"
Output: 3
// The possible decodings are "ABA", "AU", "LA"
Input: digits[] = "1234"
Output: 3
// The possible decodings are "ABCD", "L... | [
{
"code": null,
"e": 25857,
"s": 25829,
"text": "\n28 Feb, 2022"
},
{
"code": null,
"e": 25994,
"s": 25857,
"text": "Let 1 represent ‘A’, 2 represents ‘B’, etc. Given a digit sequence, count the number of possible decodings of the given digit sequence. "
},
{
"code": null... |
Program for average of an array without running into overflow - GeeksforGeeks | 15 Jun, 2021
Given an array arr[] of size N, the task is to find the average of the array elements without running into overflow.
Examples:
Input: arr[] = { INT_MAX, INT_MAX }Output:Average by Standard method: -1.0000000000Average by Efficient method: 2147483647.0000000000Explanation: The average of the two numbers by ... | [
{
"code": null,
"e": 26305,
"s": 26277,
"text": "\n15 Jun, 2021"
},
{
"code": null,
"e": 26422,
"s": 26305,
"text": "Given an array arr[] of size N, the task is to find the average of the array elements without running into overflow."
},
{
"code": null,
"e": 26432,
... |
Web crawling using Breadth First Search at a specified depth - GeeksforGeeks | 16 Oct, 2020
Web scraping is extensively being used in many industrial applications today. Be it in the field of natural language understanding or data analytics, scraping data from websites is one of the main aspects of many such applications. Scraping of data from websites is extracting large amount of contextual tex... | [
{
"code": null,
"e": 25723,
"s": 25695,
"text": "\n16 Oct, 2020"
},
{
"code": null,
"e": 26254,
"s": 25723,
"text": "Web scraping is extensively being used in many industrial applications today. Be it in the field of natural language understanding or data analytics, scraping data... |
Left-Child Right-Sibling Representation of Tree - GeeksforGeeks | 27 Apr, 2022
An n-ary tree in computer science is a collection of nodes normally represented hierarchically in the following fashion.
The tree starts at the root node.Each node of the tree holds a list of references to its child nodes.The number of children a node has is less than or equal to n.
The tree starts at th... | [
{
"code": null,
"e": 26355,
"s": 26327,
"text": "\n27 Apr, 2022"
},
{
"code": null,
"e": 26478,
"s": 26355,
"text": "An n-ary tree in computer science is a collection of nodes normally represented hierarchically in the following fashion. "
},
{
"code": null,
"e": 266... |
Why we should avoid using std::endl - GeeksforGeeks | 12 Jan, 2018
It is a common practice to use std::endl to print newlines while using cout. For small programs with very little I/O operations this practice is acceptable, but if the bulk of I/O operations increase, then the efficiency of the program is compromised.
std::endl not only adds newlines to the stream, it also... | [
{
"code": null,
"e": 25369,
"s": 25341,
"text": "\n12 Jan, 2018"
},
{
"code": null,
"e": 25621,
"s": 25369,
"text": "It is a common practice to use std::endl to print newlines while using cout. For small programs with very little I/O operations this practice is acceptable, but if... |
Python - Keys associated with Values in Dictionary - GeeksforGeeks | 28 Apr, 2020
Sometimes, while working with Python dictionaries, we can have problem in which we need to reform the dictionary, in the form in which all the values point to the keys that they belong to. This kind of problem can occur in many domains including web development and data domains. Lets discuss certain way in... | [
{
"code": null,
"e": 25561,
"s": 25533,
"text": "\n28 Apr, 2020"
},
{
"code": null,
"e": 25903,
"s": 25561,
"text": "Sometimes, while working with Python dictionaries, we can have problem in which we need to reform the dictionary, in the form in which all the values point to the ... |
Display div element on hovering over <a> tag using CSS - GeeksforGeeks | 05 Nov, 2021
In this article, we will know how to render the div element by hovering over the <a> tag using CSS, & will understand its implementation through the example. We can apply an adjacent sibling CSS selector property to the <a> tag that will display the hidden div element’s content while hovering over it. The ... | [
{
"code": null,
"e": 26641,
"s": 26613,
"text": "\n05 Nov, 2021"
},
{
"code": null,
"e": 27393,
"s": 26641,
"text": "In this article, we will know how to render the div element by hovering over the <a> tag using CSS, & will understand its implementation through the example. We ca... |
Python | Check if list is strictly increasing - GeeksforGeeks | 30 Dec, 2018
The test for monotonic sequence is a utility that has manifold applications in mathematics and hence every sphere related to mathematics. As mathematics and Computer Science generally go parallel, mathematical operations such as checking for strictly increasing sequence can be useful to gather knowledge of... | [
{
"code": null,
"e": 25413,
"s": 25385,
"text": "\n30 Dec, 2018"
},
{
"code": null,
"e": 25836,
"s": 25413,
"text": "The test for monotonic sequence is a utility that has manifold applications in mathematics and hence every sphere related to mathematics. As mathematics and Comput... |
How to Resize Images Programmatically in Android? - GeeksforGeeks | 17 Sep, 2021
There are many applications available on the net for performing image operations such as cropping, reducing image file size, or resizing the images to particular dimensions. Most of these applications are API based where the image is uploaded to anonymous servers, various functions are performed and then d... | [
{
"code": null,
"e": 26381,
"s": 26353,
"text": "\n17 Sep, 2021"
},
{
"code": null,
"e": 26880,
"s": 26381,
"text": "There are many applications available on the net for performing image operations such as cropping, reducing image file size, or resizing the images to particular d... |
C++ Program to Find the Longest Prefix Matching of a Given Sequence | Here we shall discuss a C++ program to find the Longest Subsequence Common to All Sequences in a Set of Sequences.
Begin
Take the array of strings as input.
function matchedPrefixtill(): find the matched prefix between string s1 and s2 :
n1 = store length of string s1.
n2 = store length of string s2.
for i = 0... | [
{
"code": null,
"e": 1177,
"s": 1062,
"text": "Here we shall discuss a C++ program to find the Longest Subsequence Common to All Sequences in a Set of Sequences."
},
{
"code": null,
"e": 1690,
"s": 1177,
"text": "Begin\nTake the array of strings as input.\nfunction matchedPrefixt... |
Find the type of triangle from the given sides - GeeksforGeeks | 13 Sep, 2021
Given three integers A, B, and C which denote the sides of a triangle, the task is to check that the triangle is a right-angled, acute-angled, or obtuse-angled triangle.Examples:
Input: A = 1, B = 4, C = 3 Output: Obtuse-angled Triangle Explanation: Triangle with the sides 1, 2 and 3 is an obtuse-angled ... | [
{
"code": null,
"e": 26537,
"s": 26509,
"text": "\n13 Sep, 2021"
},
{
"code": null,
"e": 26718,
"s": 26537,
"text": "Given three integers A, B, and C which denote the sides of a triangle, the task is to check that the triangle is a right-angled, acute-angled, or obtuse-angled tri... |
Largest number less than or equal to Z that leaves a remainder X when divided by Y - GeeksforGeeks | 01 Oct, 2021
Given three integers x, y, z, the task is to find the largest non-negative number less than or equal to z that leaves a remainder x when divided by y (Given x < y). If no such number exists then the output will be -1.
Examples:
Input: x = 1, y = 5, z = 8
Output: 6
Explanation:
6 is the largest number less... | [
{
"code": null,
"e": 26365,
"s": 26337,
"text": "\n01 Oct, 2021"
},
{
"code": null,
"e": 26583,
"s": 26365,
"text": "Given three integers x, y, z, the task is to find the largest non-negative number less than or equal to z that leaves a remainder x when divided by y (Given x < y)... |
How to select all elements that contains some specific CSS property using jQuery ? - GeeksforGeeks | 29 Jan, 2020
Given a HTML document containing elements and some elements have specific CSS properties. The task is to select all elements having the same property value pair in them. There are two approaches that are discussed below:
Approach 1: First select the elements in which we want to check for the same propertie... | [
{
"code": null,
"e": 26944,
"s": 26916,
"text": "\n29 Jan, 2020"
},
{
"code": null,
"e": 27165,
"s": 26944,
"text": "Given a HTML document containing elements and some elements have specific CSS properties. The task is to select all elements having the same property value pair in... |
How to set Text in ComboBox in C#? - GeeksforGeeks | 30 Jun, 2019
In Windows Forms, ComboBox provides two different features in a single control, it means ComboBox works as both TextBox and ListBox. In ComboBox, only one item is displayed at a time and the rest of the items are present in the drop-down menu. You are allowed to add text in your ComboBox by using the Text ... | [
{
"code": null,
"e": 25221,
"s": 25193,
"text": "\n30 Jun, 2019"
},
{
"code": null,
"e": 25593,
"s": 25221,
"text": "In Windows Forms, ComboBox provides two different features in a single control, it means ComboBox works as both TextBox and ListBox. In ComboBox, only one item is ... |
Python - Longest Substring Length of K - GeeksforGeeks | 02 Sep, 2020
Given a String and a character K, find longest substring length of K.
Input : test_str = ‘abcaaaacbbaa’, K = bOutput : 2Explanation : b occurs twice, 2 > 1.
Input : test_str = ‘abcaacccbbaa’, K = cOutput : 3Explanation : Maximum times c occurs is 3.
Method #1 : Using loop
This is brute way to solve this pr... | [
{
"code": null,
"e": 25537,
"s": 25509,
"text": "\n02 Sep, 2020"
},
{
"code": null,
"e": 25607,
"s": 25537,
"text": "Given a String and a character K, find longest substring length of K."
},
{
"code": null,
"e": 25694,
"s": 25607,
"text": "Input : test_str = ‘... |
Reading and Writing JSON to a File in Python - GeeksforGeeks | 29 Dec, 2019
The full-form of JSON is JavaScript Object Notation. It means that a script (executable) file which is made of text in a programming language, is used to store and transfer the data. Python supports JSON through a built-in package called json. To use this feature, we import the json package in Python scrip... | [
{
"code": null,
"e": 25402,
"s": 25374,
"text": "\n29 Dec, 2019"
},
{
"code": null,
"e": 25860,
"s": 25402,
"text": "The full-form of JSON is JavaScript Object Notation. It means that a script (executable) file which is made of text in a programming language, is used to store and... |
Gradient in Flutter Applications - GeeksforGeeks | 20 Jan, 2022
Gradients are considered to be eye-catching elements in UI/UX and graphic design. Having gradient elements in your apps can really elate your app in terms of user experience and feel.
In this tutorial, we will be looking at how we can implement gradients in flutter.
Flutter offers 3 types of gradients:
Lin... | [
{
"code": null,
"e": 25261,
"s": 25233,
"text": "\n20 Jan, 2022"
},
{
"code": null,
"e": 25445,
"s": 25261,
"text": "Gradients are considered to be eye-catching elements in UI/UX and graphic design. Having gradient elements in your apps can really elate your app in terms of user ... |
map::at() and map::swap() in C++ STL - GeeksforGeeks | 30 Jan, 2018
Maps are the container in STL which is used to store the elements in the form of key-value pair. Internally, the elements in a map are always sorted by its key. Maps are mainly implemented as binary search trees.
map::at()at() function is used to return the reference to the element associated with the key ... | [
{
"code": null,
"e": 25793,
"s": 25765,
"text": "\n30 Jan, 2018"
},
{
"code": null,
"e": 26006,
"s": 25793,
"text": "Maps are the container in STL which is used to store the elements in the form of key-value pair. Internally, the elements in a map are always sorted by its key. Ma... |
Create Matrix and Data Frame from Lists in R Programming - GeeksforGeeks | 01 Jun, 2020
In R programming, there 5 basic objects. Lists are the objects that can contain heterogeneous types of elements, unlike vectors. Matrices can contain the same type of elements or homogeneous elements. On the other hand, data frames are similar to matrices but have an advantage over matrices to keep heterog... | [
{
"code": null,
"e": 25949,
"s": 25921,
"text": "\n01 Jun, 2020"
},
{
"code": null,
"e": 26347,
"s": 25949,
"text": "In R programming, there 5 basic objects. Lists are the objects that can contain heterogeneous types of elements, unlike vectors. Matrices can contain the same type... |
Program to find last digit of n'th Fibonacci Number - GeeksforGeeks | 09 Dec, 2021
Given a number ‘n’, write a function that prints the last digit of n’th (‘n’ can also be a large number) Fibonacci number. Examples :
Input : n = 0
Output : 0
Input: n = 2
Output : 1
Input : n = 7
Output : 3
Method 1 : (Naive Method) Simple approach is to calculate the n’th Fibonacci number and print... | [
{
"code": null,
"e": 25893,
"s": 25865,
"text": "\n09 Dec, 2021"
},
{
"code": null,
"e": 26029,
"s": 25893,
"text": "Given a number ‘n’, write a function that prints the last digit of n’th (‘n’ can also be a large number) Fibonacci number. Examples : "
},
{
"code": null,... |
How to iterate through child elements of a div using jQuery ? - GeeksforGeeks | 03 Aug, 2021
jQuery Selector can be used to find (select) HTML elements from the DOM. Once an element is selected, the jQuery children() method is called to find all the child elements of the selected element. To loop through the child elements, the jQuery each() method is used as demonstrated in the following example.... | [
{
"code": null,
"e": 25816,
"s": 25788,
"text": "\n03 Aug, 2021"
},
{
"code": null,
"e": 26124,
"s": 25816,
"text": "jQuery Selector can be used to find (select) HTML elements from the DOM. Once an element is selected, the jQuery children() method is called to find all the child ... |
Python | Merge list of tuple into list by joining the strings - GeeksforGeeks | 02 Aug, 2019
Sometimes, we are required to convert list of tuples into a list by joining two element of tuple by a special character. This is usually with the cases with character to string conversion. This type of task is usually required in the development domain to merge the names into one element. Let’s discuss cer... | [
{
"code": null,
"e": 25537,
"s": 25509,
"text": "\n02 Aug, 2019"
},
{
"code": null,
"e": 25886,
"s": 25537,
"text": "Sometimes, we are required to convert list of tuples into a list by joining two element of tuple by a special character. This is usually with the cases with charac... |
matplotlib.pyplot.pcolormesh() in Python - GeeksforGeeks | 22 Apr, 2020
Matplotlib is a library in Python and it is numerical – mathematical extension for NumPy library. Pyplot is a state-based interface to a Matplotlib module which provides a MATLAB-like interface.
The pcolormesh() function in pyplot module of matplotlib library is used to create a pseudocolor plot with a non... | [
{
"code": null,
"e": 25429,
"s": 25401,
"text": "\n22 Apr, 2020"
},
{
"code": null,
"e": 25624,
"s": 25429,
"text": "Matplotlib is a library in Python and it is numerical – mathematical extension for NumPy library. Pyplot is a state-based interface to a Matplotlib module which pr... |
How to Create Subplots in Seaborn? - GeeksforGeeks | 19 Dec, 2021
Prerequisites: Matplotlib, Seaborn
In this article, we will explore how to create a subplot or multi-dimensional plot in seaborn, It is a useful approach to draw subplot instances of the same plot on different subsets of your dataset. It allows a viewer to quickly extract a large amount of data about compl... | [
{
"code": null,
"e": 25537,
"s": 25509,
"text": "\n19 Dec, 2021"
},
{
"code": null,
"e": 25572,
"s": 25537,
"text": "Prerequisites: Matplotlib, Seaborn"
},
{
"code": null,
"e": 25861,
"s": 25572,
"text": "In this article, we will explore how to create a subplo... |
JavaScript Quiz | Set-3 - GeeksforGeeks | 06 Dec, 2021
Prerequisite: Basic understanding of JavaScript concepts1. In JavaScript, we do not have data types like integer and float. What is the function that can be used to check if the number is an integer or not?A) Integer(value) B) ifInteger(value) C) isInteger(value) D) ifinteger(value)Ans: Option C Explanatio... | [
{
"code": null,
"e": 26235,
"s": 26207,
"text": "\n06 Dec, 2021"
},
{
"code": null,
"e": 26775,
"s": 26235,
"text": "Prerequisite: Basic understanding of JavaScript concepts1. In JavaScript, we do not have data types like integer and float. What is the function that can be used t... |
Python | Bitwise OR among List elements - GeeksforGeeks | 27 Aug, 2019
Sometimes, while programming, we have a problem in which we might need to perform certain bitwise operations among list elements. This is an essential utility as we come across bitwise operations many times. Let’s discuss certain ways in which this task can be performed.
Method #1 : Using reduce() + lambda... | [
{
"code": null,
"e": 25353,
"s": 25325,
"text": "\n27 Aug, 2019"
},
{
"code": null,
"e": 25625,
"s": 25353,
"text": "Sometimes, while programming, we have a problem in which we might need to perform certain bitwise operations among list elements. This is an essential utility as w... |
NPDA for accepting the language L = {an bn cm | m,n>=1} - GeeksforGeeks | 28 Aug, 2019
Prerequisite – Pushdown automata, Pushdown automata acceptance by final state
Problem – Design a non deterministic PDA for accepting the language L = { | m, n>=1}, i.e.,
L = { abc, abcc, abccc, aabbc, aaabbbcc, aaaabbbbccccc, ...... }
In each of the string, the number of a’s is equal to number of b’s. ... | [
{
"code": null,
"e": 31079,
"s": 31051,
"text": "\n28 Aug, 2019"
},
{
"code": null,
"e": 31157,
"s": 31079,
"text": "Prerequisite – Pushdown automata, Pushdown automata acceptance by final state"
},
{
"code": null,
"e": 31251,
"s": 31157,
"text": "Problem – De... |
Weak References in Python - GeeksforGeeks | 27 Apr, 2022
Python’s memory management algorithm uses a reference counting mechanism for garbage collection, which tracks all reachable objects. All Python objects include a reference count field, which counts how many objects are referencing it. If an object is referenced by another object, then its counter is set to... | [
{
"code": null,
"e": 25537,
"s": 25509,
"text": "\n27 Apr, 2022"
},
{
"code": null,
"e": 25981,
"s": 25537,
"text": "Python’s memory management algorithm uses a reference counting mechanism for garbage collection, which tracks all reachable objects. All Python objects include a r... |
Labeling Algorithm in Compiler Design - GeeksforGeeks | 08 Feb, 2019
Labeling algorithm is used by compiler during code generation phase. Basically, this algorithm is used to find out how many registers will be required by a program to complete its execution. Labeling algorithm works in bottom-up fashion. We will start labeling firstly child nodes and then interior nodes. R... | [
{
"code": null,
"e": 25665,
"s": 25637,
"text": "\n08 Feb, 2019"
},
{
"code": null,
"e": 26004,
"s": 25665,
"text": "Labeling algorithm is used by compiler during code generation phase. Basically, this algorithm is used to find out how many registers will be required by a program... |
JavaScript SyntaxError: Unterminated string literal - GeeksforGeeks | 23 Jul, 2020
This JavaScript error unterminated string literal occurs if there is string which is not terminated properly. String literals must be enclosed by single (‘) or double (“) quotes.
Message:
SyntaxError: Unterminated string constant (Edge)
SyntaxError: unterminated string literal (Firefox)
Error Type:
Syntax... | [
{
"code": null,
"e": 26545,
"s": 26517,
"text": "\n23 Jul, 2020"
},
{
"code": null,
"e": 26724,
"s": 26545,
"text": "This JavaScript error unterminated string literal occurs if there is string which is not terminated properly. String literals must be enclosed by single (‘) or dou... |
W3.CSS Badges - GeeksforGeeks | 02 Mar, 2021
The .w3-badge class is used to add additional information to the content. For example, some websites associate some number of notifications to the link. The notification number is seen when logged in to a particular website which tells the numbers of news or notifications to see by clicking it. This class ... | [
{
"code": null,
"e": 26645,
"s": 26617,
"text": "\n02 Mar, 2021"
},
{
"code": null,
"e": 27049,
"s": 26645,
"text": "The .w3-badge class is used to add additional information to the content. For example, some websites associate some number of notifications to the link. The notifi... |
Data Structures | Linked List | Question 8 - GeeksforGeeks | 28 Jun, 2021
The following C function takes a single-linked list of integers as a parameter and rearranges the elements of the list. The function is called with the list containing the integers 1, 2, 3, 4, 5, 6, 7 in the given order. What will be the contents of the list after the function completes execution?
struct n... | [
{
"code": null,
"e": 26089,
"s": 26061,
"text": "\n28 Jun, 2021"
},
{
"code": null,
"e": 26388,
"s": 26089,
"text": "The following C function takes a single-linked list of integers as a parameter and rearranges the elements of the list. The function is called with the list contai... |
Isoformat to datetime - Python - GeeksforGeeks | 14 Sep, 2021
In this article, we are going to see how to convert Isoformat to datetime in Python.
In this method, we are going to use fromisoformat() which converts the string into DateTime object.
Syntax:
datetime.fromisoformatc(date)
Example: Converting isoformat to datetime
Python3
# importing datetime modulefrom d... | [
{
"code": null,
"e": 25537,
"s": 25509,
"text": "\n14 Sep, 2021"
},
{
"code": null,
"e": 25622,
"s": 25537,
"text": "In this article, we are going to see how to convert Isoformat to datetime in Python."
},
{
"code": null,
"e": 25722,
"s": 25622,
"text": "In th... |
Taxicab Numbers - GeeksforGeeks | 20 Apr, 2021
The nth Taxicab number Taxicab(n), also called the n-th Hardy-Ramanujan number, is defined as the smallest number that can be expressed as a sum of two positive cube numbers in n distinct ways. The most famous taxicab number is 1729 = Taxicab(2) = (1 ^ 3) + (12 ^ 3) = (9 ^ 3) + (10 ^ 3).Given a number N, p... | [
{
"code": null,
"e": 25963,
"s": 25935,
"text": "\n20 Apr, 2021"
},
{
"code": null,
"e": 26313,
"s": 25963,
"text": "The nth Taxicab number Taxicab(n), also called the n-th Hardy-Ramanujan number, is defined as the smallest number that can be expressed as a sum of two positive cu... |
Make PWA of a Django Project - GeeksforGeeks | 06 Nov, 2020
Progressive Web Apps or PWA are a type of application that is developed using web technologies and can be installed on any device like a normal application.
Prerequisites: A django project that is ready to be deployed. For Django tutorial you can refer the following link https://www.geeksforgeeks.org/djan... | [
{
"code": null,
"e": 25561,
"s": 25533,
"text": "\n06 Nov, 2020"
},
{
"code": null,
"e": 25719,
"s": 25561,
"text": "Progressive Web Apps or PWA are a type of application that is developed using web technologies and can be installed on any device like a normal application. "
},... |
What are file operations in C#? | C# has the following file operations −
Create, open, read and write a file.
Append,
Delete, etc.
The FileStream class in the System.IO namespace helps in reading from, writing to and closing files. This class derives from the abstract class Stream.
You need to create a FileStream object to create a new file or open an ... | [
{
"code": null,
"e": 1101,
"s": 1062,
"text": "C# has the following file operations −"
},
{
"code": null,
"e": 1138,
"s": 1101,
"text": "Create, open, read and write a file."
},
{
"code": null,
"e": 1146,
"s": 1138,
"text": "Append,"
},
{
"code": null,... |
How to find the index of an element in a vector in R? | There are three ways to find the index of an element in a vector.
> x <- sample(1:10)
> x
[1] 8 10 9 6 2 1 4 7 5 3
Using which
> which(x == 6)[[1]]
[1] 4
Here we found the index of 6 in vector x.
Using match
> match(c(4,8),x)
[1] 7 1
Here we found the index of 4 and 8 in vector x.
Using which with %in%
> which(x %in% c... | [
{
"code": null,
"e": 1128,
"s": 1062,
"text": "There are three ways to find the index of an element in a vector."
},
{
"code": null,
"e": 1177,
"s": 1128,
"text": "> x <- sample(1:10)\n> x\n[1] 8 10 9 6 2 1 4 7 5 3"
},
{
"code": null,
"e": 1189,
"s": 1177,
"te... |
To weigh or not to weigh — this is the Average question | by Salvatore Cagliari | Towards Data Science | I learned how to calculate an Average at school: Take a bunch of numbers, create a sum over them, then divide the result by the count of numbers, and you’re done.
This calculation sounds very easy.
I discovered a few days ago that there could be much more in an average calculation than expected.
In this article, I’ll s... | [
{
"code": null,
"e": 335,
"s": 172,
"text": "I learned how to calculate an Average at school: Take a bunch of numbers, create a sum over them, then divide the result by the count of numbers, and you’re done."
},
{
"code": null,
"e": 370,
"s": 335,
"text": "This calculation sounds... |
Print all increasing sequences of length k from first n natural numbers - GeeksforGeeks | 15 Apr, 2021
Given two positive integers n and k, print all increasing sequences of length k such that the elements in every sequence are from first n natural numbers.
Examples:
Input: k = 2, n = 3
Output: 1 2
1 3
2 3
Input: k = 5, n = 5
Output: 1 2 3 4 5
Input: k = 3, n = 5
Output: 1 2 3
1 ... | [
{
"code": null,
"e": 26071,
"s": 26043,
"text": "\n15 Apr, 2021"
},
{
"code": null,
"e": 26226,
"s": 26071,
"text": "Given two positive integers n and k, print all increasing sequences of length k such that the elements in every sequence are from first n natural numbers."
},
... |
How to convert NFA with epsilon to DFA in TOC? | In this method, we first convert Non-deterministic finite automata (NFA) with ε to NFA without ε.
Then, NFA without ε- can be converted to its equivalent Deterministic Finite Automata (DFA).
The method for converting the NFA with ε to DFA is explained below −
Step 1 − Consider M={Q, Σ, δ,q0,F) is NFA with ε. We have to... | [
{
"code": null,
"e": 1160,
"s": 1062,
"text": "In this method, we first convert Non-deterministic finite automata (NFA) with ε to NFA without ε."
},
{
"code": null,
"e": 1253,
"s": 1160,
"text": "Then, NFA without ε- can be converted to its equivalent Deterministic Finite Automat... |
Delete nodes having greater value on right | Practice | GeeksforGeeks | Given a singly linked list, remove all the nodes which have a greater value on their right side.
Example 1:
Input:
LinkedList = 12->15->10->11->5->6->2->3
Output: 15 11 6 3
Explanation: Since, 12, 10, 5 and 2 are
the elements which have greater elements
on the following nodes. So, after deleting
them, the linked list w... | [
{
"code": null,
"e": 335,
"s": 238,
"text": "Given a singly linked list, remove all the nodes which have a greater value on their right side."
},
{
"code": null,
"e": 346,
"s": 335,
"text": "Example 1:"
},
{
"code": null,
"e": 586,
"s": 346,
"text": "Input:\nL... |
Concurrent Program with Precedence Graph - GeeksforGeeks | 26 Oct, 2020
In this article, we are going to cover the Concurrent Program in the Operating System and will make a Precedence Graph for the program, and will cover the program execution for the same.
In concurrent programming, the Real concurrent program is possible on the multiprocessor system. Any two statements Si a... | [
{
"code": null,
"e": 25847,
"s": 25819,
"text": "\n26 Oct, 2020"
},
{
"code": null,
"e": 26034,
"s": 25847,
"text": "In this article, we are going to cover the Concurrent Program in the Operating System and will make a Precedence Graph for the program, and will cover the program ... |
MATLAB - if... end Statement | An if ... end statement consists of an if statement and a boolean expression followed by one or more statements. It is delimited by the end statement.
The syntax of an if statement in MATLAB is −
if <expression>
% statement(s) will execute if the boolean expression is true
<statements>
end
If the expression eva... | [
{
"code": null,
"e": 2292,
"s": 2141,
"text": "An if ... end statement consists of an if statement and a boolean expression followed by one or more statements. It is delimited by the end statement."
},
{
"code": null,
"e": 2337,
"s": 2292,
"text": "The syntax of an if statement i... |
F-Test - GeeksforGeeks | 26 Nov, 2020
F-Test is any test that utilizes the F-Distribution table to fulfil its purpose (for eg: ANOVA). It compares the ratio of the variances of two populations and determines if they are statistically similar or not.
We can use this test when :
The population is normally distributed.
The samples are taken at r... | [
{
"code": null,
"e": 24344,
"s": 24316,
"text": "\n26 Nov, 2020"
},
{
"code": null,
"e": 24557,
"s": 24344,
"text": "F-Test is any test that utilizes the F-Distribution table to fulfil its purpose (for eg: ANOVA). It compares the ratio of the variances of two populations and dete... |
Erlang - self | One of the most commonly used BIF, returns the pid of the calling processes.
self()
None
Returns the pid of the calling processes.
-module(helloworld).
-export([start/0]).
start() ->
io:fwrite("~p~n",[self()]).
When we run the above program, we will get the following result.
<0.2.0>
Print
Add Notes
Bookmark... | [
{
"code": null,
"e": 2378,
"s": 2301,
"text": "One of the most commonly used BIF, returns the pid of the calling processes."
},
{
"code": null,
"e": 2386,
"s": 2378,
"text": "self()\n"
},
{
"code": null,
"e": 2391,
"s": 2386,
"text": "None"
},
{
"code"... |
How to find duplicate values in a JavaScript array? | To find duplicate values in JavaScript, you can try to run the following code −
Live Demo
<html>
<body>
<script>
function removeDuplicate(arr) {
var c;
var len = arr.length;
var result = [];
var obj = {... | [
{
"code": null,
"e": 1142,
"s": 1062,
"text": "To find duplicate values in JavaScript, you can try to run the following code −"
},
{
"code": null,
"e": 1152,
"s": 1142,
"text": "Live Demo"
},
{
"code": null,
"e": 1837,
"s": 1152,
"text": "<html> \n <body>... |
How to create an object from class in Java? | An object is created from a class using the new keyword. There are three steps when creating an object from a class −
Declaration − A variable declaration with a variable name with an object type.
Instantiation − The 'new' keyword is used to create the object.
Initialization − The 'new' keyword is followed by a call to... | [
{
"code": null,
"e": 1180,
"s": 1062,
"text": "An object is created from a class using the new keyword. There are three steps when creating an object from a class −"
},
{
"code": null,
"e": 1259,
"s": 1180,
"text": "Declaration − A variable declaration with a variable name with a... |
Check if the String contains only unicode letters in Java | In order to check if a String has only Unicode letters in Java, we use the isDigit() and charAt() methods with decision-making statements.
The isLetter(int codePoint) method determines whether the specific character (Unicode codePoint) is a letter. It returns a boolean value, either true or false.
Declaration −The java... | [
{
"code": null,
"e": 1201,
"s": 1062,
"text": "In order to check if a String has only Unicode letters in Java, we use the isDigit() and charAt() methods with decision-making statements."
},
{
"code": null,
"e": 1361,
"s": 1201,
"text": "The isLetter(int codePoint) method determin... |
HTML DOM getElementsByClassName() method | The HTML DOM getElementsByClassName() method is used for getting the collection of all the elements in the document having a given class name. It returns all the given elements as a NodeList object. You can access any element in the returned object using the index number. This method can be called on any individual ele... | [
{
"code": null,
"e": 1454,
"s": 1062,
"text": "The HTML DOM getElementsByClassName() method is used for getting the collection of all the elements in the document having a given class name. It returns all the given elements as a NodeList object. You can access any element in the returned object usin... |
snmptrapd - Unix, Linux Command | Note: the default is to listen on UDP port 162 on all IPv4 interfaces.
Since 162 is a privileged port,
snmptrapd must typically be run as root.
Note that this needs to come before any -Lf options
that it should apply to.
To get a list of compiled modules, run the agent with the arguments
-Dmib_init -H (assuming deb... | [
{
"code": null,
"e": 10723,
"s": 10577,
"text": "\nNote: the default is to listen on UDP port 162 on all IPv4 interfaces.\nSince 162 is a privileged port,\nsnmptrapd must typically be run as root.\n"
},
{
"code": null,
"e": 10802,
"s": 10723,
"text": "\nNote that this needs to co... |
How can I get the number of times a specific word appears in a column with MySQL? | For this, you can use COUNT() function. Let us first create a table −
mysql> create table DemoTable
-> (
-> EmployeeId int NOT NULL AUTO_INCREMENT PRIMARY KEY,
-> EmployeeName varchar(100)
-> );
Query OK, 0 rows affected (0.62 sec)
Insert some records in the table using insert command −
mysql> insert into D... | [
{
"code": null,
"e": 1132,
"s": 1062,
"text": "For this, you can use COUNT() function. Let us first create a table −"
},
{
"code": null,
"e": 1306,
"s": 1132,
"text": "mysql> create table DemoTable\n -> (\n -> EmployeeId int NOT NULL AUTO_INCREMENT PRIMARY KEY,\n -> Employe... |
Difference between an id and class in HTML | In Html DOM both id and class are the element selector and are used to identify an element based on the name assign to these parameters.
The following are the important differences between Id and Class.
Id.html
<!DOCTYPE html>
<html>
<head>
<title>
Id demo
</title>
<style>
#idDemo{
color:green;
font-size... | [
{
"code": null,
"e": 1199,
"s": 1062,
"text": "In Html DOM both id and class are the element selector and are used to identify an element based on the name assign to these parameters."
},
{
"code": null,
"e": 1265,
"s": 1199,
"text": "The following are the important differences b... |
How to read the pixel value of a single channel image in OpenCV using C++? | Digital images are made of pixels. Using OpenCV, it is easy to read the value of pixels. However, if we want to get the pixel values, we have to handle a single channel separately.
Here we are loading an image in the matrix named 'cimage', and then it converts the image using 'cvtColor(cimage, img, COLOR_BGR2GRAY); ' a... | [
{
"code": null,
"e": 1243,
"s": 1062,
"text": "Digital images are made of pixels. Using OpenCV, it is easy to read the value of pixels. However, if we want to get the pixel values, we have to handle a single channel separately."
},
{
"code": null,
"e": 1421,
"s": 1243,
"text": "H... |
How to executes an SQL SELECT statement in a JSP? | The <sql:query> tag executes an SQL SELECT statement and saves the result in a scoped variable.
The <sql:query> tag has the following attributes −
To start with the basic concept, let us create an Employees table in the TEST database and create few records in that table as follows −
Follow these steps to create the Emp... | [
{
"code": null,
"e": 1158,
"s": 1062,
"text": "The <sql:query> tag executes an SQL SELECT statement and saves the result in a scoped variable."
},
{
"code": null,
"e": 1209,
"s": 1158,
"text": "The <sql:query> tag has the following attributes −"
},
{
"code": null,
"e"... |
Rexx - Update Operation | The UPDATE Operation on any database means to update one or more records, which are already available in the database. The following procedure updates all the records having SEX as 'M'.
in the following example, we increase the AGE of all the males by one year.
/* Main program */
Call RxFuncAdd 'SQLLoadFuncs', 'rexxsq... | [
{
"code": null,
"e": 2525,
"s": 2339,
"text": "The UPDATE Operation on any database means to update one or more records, which are already available in the database. The following procedure updates all the records having SEX as 'M'."
},
{
"code": null,
"e": 2601,
"s": 2525,
"text... |
Building Models with Keras. Introduction to the Python Neural... | by Sadrach Pierre, Ph.D. | Towards Data Science | Keras is a high-level API for building neural networks in python. The API supports sequential neural networks, recurrent neural networks, and convolutional neural networks. It also allows for easy and fast prototyping due to its modularity, user-friendliness, and extensibility. In this post, we will walk through the pr... | [
{
"code": null,
"e": 637,
"s": 172,
"text": "Keras is a high-level API for building neural networks in python. The API supports sequential neural networks, recurrent neural networks, and convolutional neural networks. It also allows for easy and fast prototyping due to its modularity, user-friendlin... |
Add class (odd and even) in HTML via JavaScript? | To add class, use nth-child(odd) and nth-child(even). Following is the code −
Live Demo
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
<link rel="stylesheet" href="//code.jquery.com/ui/1.12.1/themes/base/jque... | [
{
"code": null,
"e": 1140,
"s": 1062,
"text": "To add class, use nth-child(odd) and nth-child(even). Following is the code −"
},
{
"code": null,
"e": 1151,
"s": 1140,
"text": " Live Demo"
},
{
"code": null,
"e": 1923,
"s": 1151,
"text": "<!DOCTYPE html>\n<html... |
Interactive Geographical maps with GeoPandas | by Parul Pandey | Towards Data Science | If geography is prose, maps are iconography : Lennart Meri
The word geospatial is composed of two distinct terms. Geo means Earth, and Spatial means relating to or occupying space. Together it refers to the time-based data pertaining to a specific location on the Earth’s surface. GeoPandas is a popular library used to ... | [
{
"code": null,
"e": 231,
"s": 172,
"text": "If geography is prose, maps are iconography : Lennart Meri"
},
{
"code": null,
"e": 707,
"s": 231,
"text": "The word geospatial is composed of two distinct terms. Geo means Earth, and Spatial means relating to or occupying space. Toget... |
Hive Interview Questions | Dear readers, these Hive Interview Questions have been designed specially to get you acquainted with the nature of questions you may encounter during your interview for the subject of Hive. As per my experience good interviewers hardly plan to ask any particular question during your interview, normally questions start ... | [
{
"code": null,
"e": 2383,
"s": 1950,
"text": "Dear readers, these Hive Interview Questions have been designed specially to get you acquainted with the nature of questions you may encounter during your interview for the subject of Hive. As per my experience good interviewers hardly plan to ask any p... |
5 Easy Ways To Speed Up Python | by Emmett Boudreau | Towards Data Science | Python has quickly found itself to be one of the most popular programming languages in the world, bouncing between position one and two on the TIOBE Index. Across the globe, Python is used for Data Science and machine learning, scripting, software engineering, and even web development. There are many reasons that this ... | [
{
"code": null,
"e": 625,
"s": 172,
"text": "Python has quickly found itself to be one of the most popular programming languages in the world, bouncing between position one and two on the TIOBE Index. Across the globe, Python is used for Data Science and machine learning, scripting, software enginee... |
Difference Between System.out.println() and System.err.println() in Java - GeeksforGeeks | 03 Nov, 2021
System.out is a PrintStream to which we can write characters. It outputs the data we write to it on the Command Line Interface console/terminal. It is mostly used for console applications/programs to display the result to the user. It can be also useful in debugging small programs.
Syntax:
System.out.prin... | [
{
"code": null,
"e": 26103,
"s": 26075,
"text": "\n03 Nov, 2021"
},
{
"code": null,
"e": 26387,
"s": 26103,
"text": "System.out is a PrintStream to which we can write characters. It outputs the data we write to it on the Command Line Interface console/terminal. It is mostly used... |
Arithmetic Progression – Sum of First n Terms | Class 10 Maths - GeeksforGeeks | 05 Nov, 2020
In Algebra a term is either a single number or variable or numbers and variables multiplied together. Terms are separated by + or − signs, or sometimes by the divide. Examples: In expression 5x – 10 = 1, 5x, 10 and 1 are the terms.
An Arithmetic Progression (AP) or arithmetic series is a sequence of number... | [
{
"code": null,
"e": 24612,
"s": 24584,
"text": "\n05 Nov, 2020"
},
{
"code": null,
"e": 24844,
"s": 24612,
"text": "In Algebra a term is either a single number or variable or numbers and variables multiplied together. Terms are separated by + or − signs, or sometimes by the divi... |
Count numbers that don't contain 3 - GeeksforGeeks | 04 Feb, 2022
Given a number n, write a function that returns count of numbers from 1 to n that don’t contain digit 3 in their decimal representation. Examples:
Input: n = 10
Output: 9
Input: n = 45
Output: 31
// Numbers 3, 13, 23, 30, 31, 32, 33, 34,
// 35, 36, 37, 38, 39, 43 contain digit 3.
Input: n = 578
Out... | [
{
"code": null,
"e": 24554,
"s": 24526,
"text": "\n04 Feb, 2022"
},
{
"code": null,
"e": 24703,
"s": 24554,
"text": "Given a number n, write a function that returns count of numbers from 1 to n that don’t contain digit 3 in their decimal representation. Examples: "
},
{
... |
Announcing PyCaret 1.0.0. An open source low-code machine... | by Moez Ali | Towards Data Science | We are excited to announce PyCaret, an open source machine learning library in Python to train and deploy supervised and unsupervised machine learning models in a low-code environment. PyCaret allows you to go from preparing data to deploying models within seconds from your choice of notebook environment.
In comparison... | [
{
"code": null,
"e": 479,
"s": 172,
"text": "We are excited to announce PyCaret, an open source machine learning library in Python to train and deploy supervised and unsupervised machine learning models in a low-code environment. PyCaret allows you to go from preparing data to deploying models withi... |
PrintWriter flush() method in Java with Examples - GeeksforGeeks | 29 Jan, 2019
The flush() method of PrintWriter Class in Java is used to flush the stream. By flushing the stream, it means to clear the stream of any element that may be or maybe not inside the stream. It neither accepts any parameter nor returns any value.
Syntax:
public void flush()
Parameters: This method do not acc... | [
{
"code": null,
"e": 24275,
"s": 24247,
"text": "\n29 Jan, 2019"
},
{
"code": null,
"e": 24520,
"s": 24275,
"text": "The flush() method of PrintWriter Class in Java is used to flush the stream. By flushing the stream, it means to clear the stream of any element that may be or may... |
How to create a scatterplot with colors of the group of points in R? | A scatterplot is the plot that has one dependent variable plotted on Y-axis and one independent variable plotted on X-axis. Sometimes the pair of dependent and independent variable are grouped with some characteristics, thus, we might want to create the scatterplot with different colors of the group based on characteri... | [
{
"code": null,
"e": 1454,
"s": 1062,
"text": "A scatterplot is the plot that has one dependent variable plotted on Y-axis and one independent variable plotted on X-axis. Sometimes the pair of dependent and independent variable are grouped with some characteristics, thus, we might want to create the... |
Python Program for Gnome Sort | In this article, we will learn about the solution to the problem statement given below.
Problem statement − We are given an array, we need to sort it using gnome sort.
1. Firstly we traverse the array from left to right.
2. Now,if the current element is larger or equal to the previous element then we traverse one step ... | [
{
"code": null,
"e": 1150,
"s": 1062,
"text": "In this article, we will learn about the solution to the problem statement given below."
},
{
"code": null,
"e": 1230,
"s": 1150,
"text": "Problem statement − We are given an array, we need to sort it using gnome sort."
},
{
... |
How to select data.table object columns based on their class in R? | To select data.table object columns based on their class in R, we can follow the below steps −
First of all, create a data.table object.
First of all, create a data.table object.
Then, use str function to check the structure of the object.
Then, use str function to check the structure of the object.
After that, use sel... | [
{
"code": null,
"e": 1157,
"s": 1062,
"text": "To select data.table object columns based on their class in R, we can follow the below steps −"
},
{
"code": null,
"e": 1199,
"s": 1157,
"text": "First of all, create a data.table object."
},
{
"code": null,
"e": 1241,
... |
numpy.tril() in Python | 09 Mar, 2022
numpy.tril(a, k=0) : Returns copy of array with lower part of the triangle w.r.t kParameters :
a : input array
k : [int, optional, 0 by default]
Diagonal we require; k>0 means diagonal above main diagonal or vice versa.
Returns :
Lower triangle of a, having same shape and data-type as a.
# Pytho... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n09 Mar, 2022"
},
{
"code": null,
"e": 123,
"s": 28,
"text": "numpy.tril(a, k=0) : Returns copy of array with lower part of the triangle w.r.t kParameters :"
},
{
"code": null,
"e": 259,
"s": 123,
"text": "a : input a... |
Inter VLAN Routing by Layer 3 Switch | 31 Jul, 2021
Prerequisite – Access and trunk ports Normally, Routers are used to divide broadcast domain and switches (at layer 2) Operates in a single broadcast domain but Switches can also divide broadcast domain by using the concept of VLAN (Virtual LAN).
VLAN is the logical grouping of devices in the same or diffe... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n31 Jul, 2021"
},
{
"code": null,
"e": 275,
"s": 28,
"text": "Prerequisite – Access and trunk ports Normally, Routers are used to divide broadcast domain and switches (at layer 2) Operates in a single broadcast domain but Switches can al... |
ML | Handling Missing Values | 16 Oct, 2019
With this article be ready to get your hands dirty with ML algorithms, concepts, Maths and coding.
To work with ML code, libraries play a very important role in Python which we will study in details but let see a very brief description of the most important ones :
NumPy (Numerical Python) : It is one of th... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n16 Oct, 2019"
},
{
"code": null,
"e": 127,
"s": 28,
"text": "With this article be ready to get your hands dirty with ML algorithms, concepts, Maths and coding."
},
{
"code": null,
"e": 293,
"s": 127,
"text": "To work... |
Creating Tables with PrettyTable Library – Python | 18 Aug, 2020
PrettyTable class inside the prettytable library is used to create relational tables in Python. For example, the table below has been created using this library, in Command Prompt on Windows.
Installing the Library:
pip install prettytable
Let’s create the sample table using the prettytable library in Py... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n18 Aug, 2020"
},
{
"code": null,
"e": 220,
"s": 28,
"text": "PrettyTable class inside the prettytable library is used to create relational tables in Python. For example, the table below has been created using this library, in Command Pr... |
How to convert string to boolean in PHP? | 08 Jan, 2019
Given a string and the task is to convert given string to its boolean. Use filter_var() function to convert string to boolean value.
Examples:
Input : $boolStrVar1 = filter_var('true', FILTER_VALIDATE_BOOLEAN);
Output : true
Input : $boolStrVar5 = filter_var('false', FILTER_VALIDATE_BOOLEAN);
Output : ... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n08 Jan, 2019"
},
{
"code": null,
"e": 161,
"s": 28,
"text": "Given a string and the task is to convert given string to its boolean. Use filter_var() function to convert string to boolean value."
},
{
"code": null,
"e": 171,
... |
C program to print employee details using Structure | 21 Dec, 2017
In this program, we will read and display details of n employees using Structure. Employee details like Name, age, phone number, salary will be printed.
Method :
Declare variables using Structure
Read details of all employees like employee name,
age, phone number and salary.
Display all the details of e... | [
{
"code": null,
"e": 54,
"s": 26,
"text": "\n21 Dec, 2017"
},
{
"code": null,
"e": 207,
"s": 54,
"text": "In this program, we will read and display details of n employees using Structure. Employee details like Name, age, phone number, salary will be printed."
},
{
"code":... |
Matplotlib.axes.Axes.pcolormesh() in Python | 13 Apr, 2020
Matplotlib is a library in Python and it is numerical – mathematical extension for NumPy library. The Axes Class contains most of the figure elements: Axis, Tick, Line2D, Text, Polygon, etc., and sets the coordinate system. And the instances of Axes supports callbacks through a callbacks attribute.
The Axe... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n13 Apr, 2020"
},
{
"code": null,
"e": 328,
"s": 28,
"text": "Matplotlib is a library in Python and it is numerical – mathematical extension for NumPy library. The Axes Class contains most of the figure elements: Axis, Tick, Line2D, Text... |
Print all nodes at distance k from a given node | 06 Jun, 2022
Given a binary tree, a target node in the binary tree, and an integer value k, print all the nodes that are at distance k from the given target node. No parent pointers are available.
Consider the tree shown in diagramInput: target = pointer to node with data 8. root = pointer to node with data 20. k = 2. ... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n06 Jun, 2022"
},
{
"code": null,
"e": 236,
"s": 52,
"text": "Given a binary tree, a target node in the binary tree, and an integer value k, print all the nodes that are at distance k from the given target node. No parent pointers are a... |
How to use Modal Component in ReactJS ? | 22 Feb, 2021
The modal component provides a solid foundation for creating dialogs, lightboxes, popovers, etc. Material UI for React has this component available for us, and it is very easy to integrate. We can use the Modal Component in ReactJS using the following approach.
Creating React Application And Installing Mod... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n22 Feb, 2021"
},
{
"code": null,
"e": 290,
"s": 28,
"text": "The modal component provides a solid foundation for creating dialogs, lightboxes, popovers, etc. Material UI for React has this component available for us, and it is very easy... |
Accept system call - GeeksforGeeks | 14 Jun, 2017
The accept() system call with the connection-based socket types(SOCK_STREAM, SOCK_SEQPACKET). It extracts the first connection request on queue of pending connections for the listening socket, sockfd, creates a new connected socket, and returns a new file descriptor referring to that socket. The newly crea... | [
{
"code": null,
"e": 24232,
"s": 24204,
"text": "\n14 Jun, 2017"
},
{
"code": null,
"e": 24643,
"s": 24232,
"text": "The accept() system call with the connection-based socket types(SOCK_STREAM, SOCK_SEQPACKET). It extracts the first connection request on queue of pending connecti... |
Create temporary files and directories using Python-tempfile - GeeksforGeeks | 02 Jul, 2020
Tempfile is a Python module used for working with temporary files. Temporary files may be required when we need to store data temporarily during the program’s execution or when we are working with a large amount of data. These files are created with unique names and stored in a default location which is pl... | [
{
"code": null,
"e": 24918,
"s": 24890,
"text": "\n02 Jul, 2020"
},
{
"code": null,
"e": 25317,
"s": 24918,
"text": "Tempfile is a Python module used for working with temporary files. Temporary files may be required when we need to store data temporarily during the program’s exec... |
C++ Program to Find Fibonacci Numbers using Recursion | The following is an example of fibonacci series using recursion.
Live Demo
#include <iostream>
using namespace std;
int fib(int x) {
if((x==1)||(x==0)) {
return(x);
}else {
return(fib(x-1)+fib(x-2));
}
}
int main() {
int x , i=0;
cout << "Enter the number of terms of series : ";
cin >> x;... | [
{
"code": null,
"e": 1127,
"s": 1062,
"text": "The following is an example of fibonacci series using recursion."
},
{
"code": null,
"e": 1138,
"s": 1127,
"text": " Live Demo"
},
{
"code": null,
"e": 1497,
"s": 1138,
"text": "#include <iostream>\nusing namespac... |
Ultimate Pandas Guide — Inspecting Data Like a Pro | by Skyler Dale | Towards Data Science | Whether you’re working on a simple analysis or a complex machine learning model, there’s a lot of value in being able to answer quick, exploratory questions about the nature of your data.
Fortunately, Pandas makes this easy. In this post, I’ll walk through several DataFrame attributes and methods that make data inspect... | [
{
"code": null,
"e": 360,
"s": 172,
"text": "Whether you’re working on a simple analysis or a complex machine learning model, there’s a lot of value in being able to answer quick, exploratory questions about the nature of your data."
},
{
"code": null,
"e": 521,
"s": 360,
"text":... |
Programs for printing pyramid patterns in Python | Taking advantage of the for loop and range function in python, we can draw a variety of for pyramid structures. The key to the approach is designing the appropriate for loop which will leave both vertical and horizontal space for the position of the symbol we choose for drawing the pyramid structure.
We draw a right an... | [
{
"code": null,
"e": 1364,
"s": 1062,
"text": "Taking advantage of the for loop and range function in python, we can draw a variety of for pyramid structures. The key to the approach is designing the appropriate for loop which will leave both vertical and horizontal space for the position of the sym... |
10 Git Commands You Should Know. Plus tips to save time with Git | by Jeff Hale | Towards Data Science | In this article, we’re going to discuss the miscellaneous Git commands you should know as a developer, data scientist, or product manager. We’ll look at inspecting, removing, and tidying with Git. We’ll also cover ways to escape Vim and save time with Bash aliases and Git editor configuration.
If you aren’t comfortable... | [
{
"code": null,
"e": 467,
"s": 172,
"text": "In this article, we’re going to discuss the miscellaneous Git commands you should know as a developer, data scientist, or product manager. We’ll look at inspecting, removing, and tidying with Git. We’ll also cover ways to escape Vim and save time with Bas... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.