title
stringlengths
3
221
text
stringlengths
17
477k
parsed
listlengths
0
3.17k
Find the sum of all possible pairs in an array of N elements
19 Mar, 2022 Given an array arr[] of N integers, the task is to find the sum of all the pairs possible from the given array. Note that, (arr[i], arr[i]) is also considered as a valid pair.(arr[i], arr[j]) and (arr[j], arr[i]) are considered as two different pairs. (arr[i], arr[i]) is also considered as a valid pair. (...
[ { "code": null, "e": 52, "s": 24, "text": "\n19 Mar, 2022" }, { "code": null, "e": 176, "s": 52, "text": "Given an array arr[] of N integers, the task is to find the sum of all the pairs possible from the given array. Note that, " }, { "code": null, "e": 305, "s":...
Python | os.path.relpath() method
18 Jun, 2019 OS module in Python provides functions for interacting with the operating system. OS comes under Python’s standard utility modules. This module provides a portable way of using operating system dependent functionality. os.path module is sub module of OS module in Python used for common path name manipulati...
[ { "code": null, "e": 53, "s": 25, "text": "\n18 Jun, 2019" }, { "code": null, "e": 364, "s": 53, "text": "OS module in Python provides functions for interacting with the operating system. OS comes under Python’s standard utility modules. This module provides a portable way of usi...
HashMap keySet() Method in Java
26 Nov, 2018 The java.util.HashMap.keySet() method in Java is used to create a set out of the key elements contained in the hash map. It basically returns a set view of the keys or we can create a new set and store the key elements in them. Syntax: hash_map.keySet() Parameters: The method does not take any parameter. R...
[ { "code": null, "e": 53, "s": 25, "text": "\n26 Nov, 2018" }, { "code": null, "e": 281, "s": 53, "text": "The java.util.HashMap.keySet() method in Java is used to create a set out of the key elements contained in the hash map. It basically returns a set view of the keys or we can...
Count of repeating digits in a given Number
23 Apr, 2021 Given a number N, the task is to count the total number of repeating digits in the given number. Examples: Input: N = 99677 Output: 2Explanation:In the given number only 9 and 7 are repeating, hence the answer is 2. Input: N = 12Output: 0Explanation:In the given number no digits are repeating, hence the a...
[ { "code": null, "e": 28, "s": 0, "text": "\n23 Apr, 2021" }, { "code": null, "e": 125, "s": 28, "text": "Given a number N, the task is to count the total number of repeating digits in the given number." }, { "code": null, "e": 135, "s": 125, "text": "Examples:...
Sort a k sorted doubly linked list
03 Jul, 2022 Given a doubly linked list containing n nodes, where each node is at most k away from its target position in the list. The problem is to sort the given doubly linked list. For example, let us consider k is 2, a node at position 7 in the sorted doubly linked list, can be at positions 5, 6, 7, 8, 9 in the gi...
[ { "code": null, "e": 52, "s": 24, "text": "\n03 Jul, 2022" }, { "code": null, "e": 393, "s": 52, "text": "Given a doubly linked list containing n nodes, where each node is at most k away from its target position in the list. The problem is to sort the given doubly linked list. Fo...
Java Program to Read Content From One File and Write it into Another File
16 Jun, 2022 File handling plays a major role in doing so as the first essential step is writing content to a file. For this is one must know how to write content in a file using the FileWriter class. The secondary step is reading content from a file and print the same. For this, one must have good hands on File Read...
[ { "code": null, "e": 52, "s": 24, "text": "\n16 Jun, 2022" }, { "code": null, "e": 379, "s": 52, "text": " File handling plays a major role in doing so as the first essential step is writing content to a file. For this is one must know how to write content in a file using the Fi...
PHP make sure string has no whitespace?
To check whether a string has no whitespace, use the preg_match() in PHP. The syntax is as follows preg_match('/\s/',$yourVariableName); The PHP code is as follows Live Demo <!DOCTYPE html> <html> <body> <?php $name="John Smith"; if ( preg_match('/\s/',$name) ){ echo "The name (",$name,") has the space"; } else { ...
[ { "code": null, "e": 1261, "s": 1187, "text": "To check whether a string has no whitespace, use the preg_match() in PHP." }, { "code": null, "e": 1287, "s": 1261, "text": "The syntax is as follows " }, { "code": null, "e": 1325, "s": 1287, "text": "preg_match(...
Explain Bootstrap’s collapsing elements
31 Oct, 2021 In this article, we will see how can we create a collapsing element using Bootstrap classes and also see their different properties, along with understanding their implementation through the example. Bootstrap Collapsing Element: Collapsing elements are those elements that show data to the user when the us...
[ { "code": null, "e": 28, "s": 0, "text": "\n31 Oct, 2021" }, { "code": null, "e": 228, "s": 28, "text": "In this article, we will see how can we create a collapsing element using Bootstrap classes and also see their different properties, along with understanding their implementat...
Lodash _.findKey() Method - GeeksforGeeks
10 Sep, 2020 Lodash is a JavaScript library that works on the top of underscore.js. Lodash helps in working with arrays, collection, strings, lang, function, objects, numbers etc. The _.findKey() method is similar to _.find() method except that it returns the key of the first element, predicate returns true for instead...
[ { "code": null, "e": 37045, "s": 37017, "text": "\n10 Sep, 2020" }, { "code": null, "e": 37212, "s": 37045, "text": "Lodash is a JavaScript library that works on the top of underscore.js. Lodash helps in working with arrays, collection, strings, lang, function, objects, numbers e...
HTML - Formatting
If you use a word processor, you must be familiar with the ability to make text bold, italicized, or underlined; these are just three of the ten options available to indicate how text can appear in HTML and XHTML. Anything that appears within <b>...</b> element, is displayed in bold as shown below − <!DOCTYPE html> <ht...
[ { "code": null, "e": 2588, "s": 2374, "text": "If you use a word processor, you must be familiar with the ability to make text bold, italicized, or underlined; these are just three of the ten options available to indicate how text can appear in HTML and XHTML." }, { "code": null, "e": 26...
Servlets - Session Tracking
HTTP is a "stateless" protocol which means each time a client retrieves a Web page, the client opens a separate connection to the Web server and the server automatically does not keep any record of previous client request. Still there are following three ways to maintain session between web client and web server − A we...
[ { "code": null, "e": 2408, "s": 2185, "text": "HTTP is a \"stateless\" protocol which means each time a client retrieves a Web page, the client opens a separate connection to the Web server and the server automatically does not keep any record of previous client request." }, { "code": null, ...
How to plot the confidence interval of the regression model using ggplot2 with transparency in R?
To plot the confidence interval of the regression model, we can use geom_ribbon function of ggplot2 package but by default it will have dark grey color. It can become transparent with the help of alpha argument inside the same function, the alpha argument can be adjusted as per our requirement but the most recommended ...
[ { "code": null, "e": 1402, "s": 1062, "text": "To plot the confidence interval of the regression model, we can use geom_ribbon function of ggplot2 package but by default it will have dark grey color. It can become transparent with the help of alpha argument inside the same function, the alpha argume...
Inorder Traversal and BST | Practice | GeeksforGeeks
Given an array arr of size N, write a program that returns 1 if array represents Inorder traversal of a BST, else returns 0. Note: All keys in BST must be unique. Example 1: Input: N = 3 arr = {2, 4, 5} Output: 1 Explaination: Given arr representing inorder traversal of a BST. Example 2: Input: N = 3 arr = {2, 4, 1}...
[ { "code": null, "e": 401, "s": 238, "text": "Given an array arr of size N, write a program that returns 1 if array represents Inorder traversal of a BST, else returns 0.\nNote: All keys in BST must be unique." }, { "code": null, "e": 413, "s": 401, "text": "\nExample 1:" }, {...
Creating and using packages in Java
While creating a package, you should choose a name for the package and include a package statement along with that name at the top of every source file that contains the classes, interfaces, enumerations, and annotation types that you want to include in the package. The package statement should be the first line in th...
[ { "code": null, "e": 1330, "s": 1062, "text": "While creating a package, you should choose a name for the package and include a package statement along with that name at the top of every source file that contains the classes, interfaces, enumerations, and annotation types that you want to include in...
How to get the value of div content using jQuery?
To get the value of div content in jQuery, use the text() method. The text( ) method gets the combined text contents of all matched elements. This method works for both on XML and XHTML documents. You can try to run the following code to get the value of div content using jQuery: Live Demo <!DOCTYPE html> <html> <head>...
[ { "code": null, "e": 1259, "s": 1062, "text": "To get the value of div content in jQuery, use the text() method. The text( ) method gets the combined text contents of all matched elements. This method works for both on XML and XHTML documents." }, { "code": null, "e": 1343, "s": 1259...
Tryit Editor v3.7
Tryit: CSS borders
[]
What’s the difference between “is” and “==” in Python? | by Ahmed Besbes | Towards Data Science
When we compare objects in Python, we usually use the ==operator. We may sometimes be tempted to use the is operator as well to perform the same task. Are these two operators any different? This is a short post to explain the nuances between the two and provide a recommendation as to when to use which. I personally nev...
[ { "code": null, "e": 322, "s": 171, "text": "When we compare objects in Python, we usually use the ==operator. We may sometimes be tempted to use the is operator as well to perform the same task." }, { "code": null, "e": 361, "s": 322, "text": "Are these two operators any differe...
While working with Java in eclipse I got a warning saying "dead code". What does it mean?
A code block/statement in Java to which the control never reaches and never gets executed during the lifetime of the program is known as unreachable block/statement. public class UnreachableCodeExample { public String greet() { System.out.println("This is a greet method "); return "Hello"; System.o...
[ { "code": null, "e": 1228, "s": 1062, "text": "A code block/statement in Java to which the control never reaches and never gets executed during the lifetime of the program is known as unreachable block/statement." }, { "code": null, "e": 1526, "s": 1228, "text": "public class Unr...
Remove Invalid Parentheses in C++
Suppose we have a string of parentheses. We have to remove minimum number of invalid parentheses and return the well formed parentheses strings, So if the input is like “()(()()”, so the result will be [“()()()”, “()(())”] To solve this, we will follow these steps − Define a method called solve(), this will take pos, l...
[ { "code": null, "e": 1285, "s": 1062, "text": "Suppose we have a string of parentheses. We have to remove minimum number of invalid parentheses and return the well formed parentheses strings, So if the input is like “()(()()”, so the result will be [“()()()”, “()(())”]" }, { "code": null, ...
Python’s Collections Module — High-performance container data types. | by Parul Pandey | Towards Data Science
If the implementation is hard to explain, it’s a bad idea :The Zen of Python Python is a pretty powerful language and a large part of this power comes from the fact that it supports modular programming. Modular programming is essentially the process of breaking down a large and complex programming task into smaller and...
[ { "code": null, "e": 249, "s": 172, "text": "If the implementation is hard to explain, it’s a bad idea :The Zen of Python" }, { "code": null, "e": 612, "s": 249, "text": "Python is a pretty powerful language and a large part of this power comes from the fact that it supports modu...
Print all combinations of factors in C++
In this problem, we are given a number n. Our task is to print all combinations of factors of n. Let’s take an example to understand the topic better − Input: 24 Output: 2 2 2 3 2 4 3 8 3 4 6 2 12 For this, we will use recursion function which will find a combination of factors of the number. And we will store all our ...
[ { "code": null, "e": 1159, "s": 1062, "text": "In this problem, we are given a number n. Our task is to print all combinations of factors of n." }, { "code": null, "e": 1214, "s": 1159, "text": "Let’s take an example to understand the topic better −" }, { "code": null, ...
How to build and apply Naive Bayes classification for spam filtering | by Pavlo Horbonos | Towards Data Science
I believe, that today almost everyone has a smartphone and a lot of people keep an email or two. This means that you have to be familiar with tons of messages proposing a lot of money, fantastic lottery wins, great presents and secrets of life. We get dozens of spam messages every day unless you use well-trained filter...
[ { "code": null, "e": 714, "s": 172, "text": "I believe, that today almost everyone has a smartphone and a lot of people keep an email or two. This means that you have to be familiar with tons of messages proposing a lot of money, fantastic lottery wins, great presents and secrets of life. We get doz...
How to change color of Button in Android when Clicked?
This example demonstrates about How do I change the color of Button in Android when clicked. Step 1 − Create a new project in Android Studio, go to File ⇒ New Project and fill all required details to create a new project. Step 2 − Add the following code to res/layout/activity_main.xml. <?xml version="1.0" encoding="utf...
[ { "code": null, "e": 1155, "s": 1062, "text": "This example demonstrates about How do I change the color of Button in Android when clicked." }, { "code": null, "e": 1284, "s": 1155, "text": "Step 1 − Create a new project in Android Studio, go to File ⇒ New Project and fill all re...
Estimating Causal Effects on Financial Time-Series with Causal Impact BSTS | by Chris Price | Towards Data Science
Note from Towards Data Science’s editors: While we allow independent authors to publish articles in accordance with our rules and guidelines, we do not endorse each author’s contribution. You should not rely on an author’s works without seeking professional advice. See our Reader Terms for details. The ability to quant...
[ { "code": null, "e": 471, "s": 171, "text": "Note from Towards Data Science’s editors: While we allow independent authors to publish articles in accordance with our rules and guidelines, we do not endorse each author’s contribution. You should not rely on an author’s works without seeking profession...
How to identify the right independent variables for Machine Learning Supervised Algorithms? | by Kaushik Choudhury | Towards Data Science
There is a very famous acronym GIGO in the field of computer science which I have learnt in my school days. GIGO stands for garbage in and garbages out. Essentially it means that if we feed inappropriate and junk data to computer programs and algorithms, then it will result in junk and incorrect results. Machine learni...
[ { "code": null, "e": 477, "s": 171, "text": "There is a very famous acronym GIGO in the field of computer science which I have learnt in my school days. GIGO stands for garbage in and garbages out. Essentially it means that if we feed inappropriate and junk data to computer programs and algorithms, ...
Aggregate Functions in Tableau - GeeksforGeeks
24 Oct, 2020 In this article, we will learn about aggregate functions, their types and uses in Tableau. Tableau: Tableau is a very powerful data visualization tool that can be used by data analysts, scientists, statisticians, etc. to visualize the data and get a clear opinion based on the data analysis. Tableau is ver...
[ { "code": null, "e": 23848, "s": 23820, "text": "\n24 Oct, 2020" }, { "code": null, "e": 23940, "s": 23848, "text": "In this article, we will learn about aggregate functions, their types and uses in Tableau. " }, { "code": null, "e": 24260, "s": 23940, "text":...
How to copy files with the specific extension in PowerShell?
To copy the files with the specific extension, you need to use the Get-ChildItem command. Through the Get-ChildItem you first need to retrieve the files with the specific extension(s) and then you need to pipeline Copy-Item command. Here, we need to copy *.txt files from the source to the destination location. First, w...
[ { "code": null, "e": 1295, "s": 1062, "text": "To copy the files with the specific extension, you need to use the Get-ChildItem command. Through the Get-ChildItem you first need to retrieve the files with the specific extension(s) and then you need to pipeline Copy-Item command." }, { "code"...
trunc() , truncf() , truncl() in C language
Here we will see three functions. These functions are trunc(), truncf() and the truncl(). These functions are used to convert floating point values into truncated form. This function is used to truncate double type value. And return only the integer part. The syntax is like below. double trunc(double argument) #include...
[ { "code": null, "e": 1231, "s": 1062, "text": "Here we will see three functions. These functions are trunc(), truncf() and the truncl(). These functions are used to convert floating point values into truncated form." }, { "code": null, "e": 1344, "s": 1231, "text": "This function...
Nested Classes in C#
Nested class is a class declared in another enclosing class. It is a member of its enclosing class and the members of an enclosing class have no access to members of a nested class. Let us see an example code snippet of nested classes in C# − class One { public int val1; public class Two { public int val1;...
[ { "code": null, "e": 1244, "s": 1062, "text": "Nested class is a class declared in another enclosing class. It is a member of its enclosing class and the members of an enclosing class have no access to members of a nested class." }, { "code": null, "e": 1305, "s": 1244, "text": "...
Chi-Square Distribution in R - GeeksforGeeks
18 Jul, 2021 The chi-squared distribution with df degrees of freedom is the distribution computed over the sums of the squares of df independent standard normal random variables. This distribution is used for the categorical analysis of the data. Let us consider X1, X2,..., Xm to be the m independent random variables w...
[ { "code": null, "e": 26487, "s": 26459, "text": "\n18 Jul, 2021" }, { "code": null, "e": 26721, "s": 26487, "text": "The chi-squared distribution with df degrees of freedom is the distribution computed over the sums of the squares of df independent standard normal random variable...
How to Install WordPress on the Linux Apache MySQL and PHP stack ? - GeeksforGeeks
06 Jul, 2021 WordPress is one of the commonly used Content Management systems on the web. It is written in PHP web servers like Apache are enough to run it. WordPress supports MySQL and MariaDB, but MySQL is widely used. This tutorial will help you to run WordPress using the LAMP(Linux, Apache, MySQL, PHP) stack on you...
[ { "code": null, "e": 24892, "s": 24864, "text": "\n06 Jul, 2021" }, { "code": null, "e": 25232, "s": 24892, "text": "WordPress is one of the commonly used Content Management systems on the web. It is written in PHP web servers like Apache are enough to run it. WordPress supports ...
Logistic Regression on MNIST with PyTorch | by Asad Mahmood | Towards Data Science
Logistic regression is used to describe data and to explain the relationship between one dependent binary variable and one or more nominal, ordinal, interval or ratio-level independent variables[1]. The figure below shows the difference between Logistic and Linear regression. In this post, I’ll show how to code a Logis...
[ { "code": null, "e": 324, "s": 47, "text": "Logistic regression is used to describe data and to explain the relationship between one dependent binary variable and one or more nominal, ordinal, interval or ratio-level independent variables[1]. The figure below shows the difference between Logistic an...
Bidirectional Iterators in C++ - GeeksforGeeks
25 Apr, 2019 After going through the template definition of various STL algorithms like std::reverse, std::next_permutation and std::reverse_copy you must have found their template definition consisting of objects of type Bidirectional Iterator. So what are they and why are they used ? Bidirectional iterators are one o...
[ { "code": null, "e": 24044, "s": 24016, "text": "\n25 Apr, 2019" }, { "code": null, "e": 24318, "s": 24044, "text": "After going through the template definition of various STL algorithms like std::reverse, std::next_permutation and std::reverse_copy you must have found their temp...
How to Fix: TypeError: ‘numpy.float’ object is not callable? - GeeksforGeeks
28 Nov, 2021 In this article, we are going to see how to fix TypeError: ‘numpy.float’ object is not callable in Python. There is only one case in which we can see this error: If we try to call a NumPy array as a function, we are most likely to get such an error. Example: Python3 import numpy as np a = np.array([1,2,...
[ { "code": null, "e": 25537, "s": 25509, "text": "\n28 Nov, 2021" }, { "code": null, "e": 25700, "s": 25537, "text": "In this article, we are going to see how to fix TypeError: ‘numpy.float’ object is not callable in Python. There is only one case in which we can see this error: "...
pow() in Python - GeeksforGeeks
22 Sep, 2021 Python pow() function returns the power of the given numbers. This function computes x**y. This function first converts its arguments into float and then computes the power. Syntax: pow(x,y) Parameters : x : Number whose power has to be calculated. y : Value raised to compute power. Return Value : Retur...
[ { "code": null, "e": 25298, "s": 25270, "text": "\n22 Sep, 2021" }, { "code": null, "e": 25473, "s": 25298, "text": "Python pow() function returns the power of the given numbers. This function computes x**y. This function first converts its arguments into float and then computes ...
Lodash _.concat() Function - GeeksforGeeks
05 May, 2021 Lodash proves to be much useful when working with arrays, strings, objects etc. It makes math operations and function paradigm much easier, concise. The _.concat() function is used to concatenating the arrays in JavaScript. Syntax: _.concat(array, [values]) Parameters: This function accept two parameters a...
[ { "code": null, "e": 38681, "s": 38653, "text": "\n05 May, 2021" }, { "code": null, "e": 38905, "s": 38681, "text": "Lodash proves to be much useful when working with arrays, strings, objects etc. It makes math operations and function paradigm much easier, concise. The _.concat()...
Java Applet | Digital Stopwatch - GeeksforGeeks
29 Aug, 2018 This article will provide an instance of creating one type of stopwatch with Java Applet, AWT and Thread. We shall be using all these library to make a working model of a stopwatch. The GUI shall have 3 buttons for interaction, namely, start (to start the time), reset (to reset the time to default value) a...
[ { "code": null, "e": 25225, "s": 25197, "text": "\n29 Aug, 2018" }, { "code": null, "e": 25331, "s": 25225, "text": "This article will provide an instance of creating one type of stopwatch with Java Applet, AWT and Thread." }, { "code": null, "e": 25561, "s": 2533...
How to wrap the text around an image using HTML and CSS ? - GeeksforGeeks
30 Jul, 2021 Wrapping the text around an image is quite attractive for any kind of website. Now the image can be in different shapes or the basic square shape. We have to wrap that image with the text. By using HTML and CSS wrapping an image with the text is possible and there are many ways to do so because the shape o...
[ { "code": null, "e": 26527, "s": 26499, "text": "\n30 Jul, 2021" }, { "code": null, "e": 27481, "s": 26527, "text": "Wrapping the text around an image is quite attractive for any kind of website. Now the image can be in different shapes or the basic square shape. We have to wrap ...
Bootstrap Buttons, Glyphicons, Tables - GeeksforGeeks
12 Jan, 2022 Introduction and InstallationGrid SystemVertical Forms, Horizontal Forms, Inline FormsDropDowns and Responsive TabsProgress Bar and Jumbotron Introduction and Installation Grid System Vertical Forms, Horizontal Forms, Inline Forms DropDowns and Responsive Tabs Progress Bar and Jumbotron After the previous ...
[ { "code": null, "e": 29725, "s": 29697, "text": "\n12 Jan, 2022" }, { "code": null, "e": 29867, "s": 29725, "text": "Introduction and InstallationGrid SystemVertical Forms, Horizontal Forms, Inline FormsDropDowns and Responsive TabsProgress Bar and Jumbotron" }, { "code":...
Print a given matrix in spiral form - GeeksforGeeks
27 Apr, 2022 Given a 2D array, print it in spiral form. See the following examples. Examples: Input: {{1, 2, 3, 4}, {5, 6, 7, 8}, {9, 10, 11, 12}, {13, 14, 15, 16 }}Output: 1 2 3 4 8 12 16 15 14 13 9 5 6 7 11 10 Explanation: The output is matrix in spiral forma...
[ { "code": null, "e": 42521, "s": 42493, "text": "\n27 Apr, 2022" }, { "code": null, "e": 42592, "s": 42521, "text": "Given a 2D array, print it in spiral form. See the following examples." }, { "code": null, "e": 42603, "s": 42592, "text": "Examples: " }, ...
Java Signature sign() method with Examples - GeeksforGeeks
11 May, 2021 The sign() method of java.security.Provider class is used to finish the signature operation and stores the resulting signature bytes in the provided buffer dataBuffer, starting at offset. The format of the signature depends on the underlying signature scheme.This signature object is reset to its initial st...
[ { "code": null, "e": 25981, "s": 25953, "text": "\n11 May, 2021" }, { "code": null, "e": 26442, "s": 25981, "text": "The sign() method of java.security.Provider class is used to finish the signature operation and stores the resulting signature bytes in the provided buffer dataBuf...
Matcher lookingAt() method in Java with Examples - GeeksforGeeks
26 Nov, 2018 The lookingAt() method of Matcher Class attempts to match the pattern partially or fully in the matcher. It returns a boolean value showing if the pattern was matched even partially or fully starting from the start of the pattern. Syntax: public boolean lookingAt() Parameters: This method do not takes any...
[ { "code": null, "e": 25225, "s": 25197, "text": "\n26 Nov, 2018" }, { "code": null, "e": 25456, "s": 25225, "text": "The lookingAt() method of Matcher Class attempts to match the pattern partially or fully in the matcher. It returns a boolean value showing if the pattern was matc...
HTML DOM revokeObjectURL() method - GeeksforGeeks
14 Jul, 2020 The URL revokeObjectURL() method releases an existing object URL which was created by using URL createObjectURL(). This method is called when you are finished using an object URL and don’t want the browser to keep the reference to that file any longer. Syntax: URL.revokeObjectURL(objectURL); Parameters: ob...
[ { "code": null, "e": 26033, "s": 26005, "text": "\n14 Jul, 2020" }, { "code": null, "e": 26286, "s": 26033, "text": "The URL revokeObjectURL() method releases an existing object URL which was created by using URL createObjectURL(). This method is called when you are finished usin...
GATE | GATE-CS-2009 | Question 17 - GeeksforGeeks
17 Sep, 2017 Match all items in Group 1 with correct options from those given in Group 2. Group 1 Group 2 P. Regular expression 1. Syntax analysis Q. Pushdown automata 2. Code generation R. Dataflow analysis 3. Lexical analysis S. Register allocation 4. Code optimiz...
[ { "code": null, "e": 25605, "s": 25577, "text": "\n17 Sep, 2017" }, { "code": null, "e": 25682, "s": 25605, "text": "Match all items in Group 1 with correct options from those given in Group 2." }, { "code": null, "e": 25918, "s": 25682, "text": "Group 1 ...
How to Calculate Cumulative Product in MATLAB - GeeksforGeeks
18 Oct, 2021 The cumulative product of a sequence is a running products or partial products of a sequence The cumulative products of the sequence {a,b,c,...}, are a, a*b, a*b*c, .... Matlab allows us to calculate the cumulative product of a vector, matrix using cumprod() method. Differenct syntaxes of cumprod() method ...
[ { "code": null, "e": 25861, "s": 25833, "text": "\n18 Oct, 2021" }, { "code": null, "e": 25954, "s": 25861, "text": "The cumulative product of a sequence is a running products or partial products of a sequence" }, { "code": null, "e": 26031, "s": 25954, "text"...
ML | Getting Started With AlexNet - GeeksforGeeks
26 Mar, 2020 This article is focused on providing an introduction to the AlexNet architecture. Its name comes from one of the leading authors of the AlexNet paper– Alex Krizhevsky. It won the ImageNet Large Scale Visual Recognition Challenge (ILSVRC) 2012 with a top-5 error rate of 15.3% (beating the runner up which ha...
[ { "code": null, "e": 25589, "s": 25561, "text": "\n26 Mar, 2020" }, { "code": null, "e": 25928, "s": 25589, "text": "This article is focused on providing an introduction to the AlexNet architecture. Its name comes from one of the leading authors of the AlexNet paper– Alex Krizhev...
XOR of a subarray in C++
In this problem, we are given an arr[] and some queries that are range between L to R in the array. Our task is to print the XOR of the subarray between L to R. Let’s take an example to understand the problem, Input − array = {1, 4, 5, 7, 2, 9} L = 1 , R = 5 Output − Explanation − 4^5^7^2^9 To solve this problem, we wi...
[ { "code": null, "e": 1223, "s": 1062, "text": "In this problem, we are given an arr[] and some queries that are range between L to R in the array. Our task is to print the XOR of the subarray between L to R." }, { "code": null, "e": 1272, "s": 1223, "text": "Let’s take an example...
Rexx - Debugging
Debugging is an important feature in any programming language. It helps the developer to diagnose errors, find the root cause and then resolve them accordingly. In Rexx, the trace utility is used for debugging. The trace instruction can be implemented in 2 ways, one is the batch mode and the other is the interactive mo...
[ { "code": null, "e": 2708, "s": 2339, "text": "Debugging is an important feature in any programming language. It helps the developer to diagnose errors, find the root cause and then resolve them accordingly. In Rexx, the trace utility is used for debugging. The trace instruction can be implemented i...
XSD - Validation
We'll use Java based XSD validator to validate students.xml against the students.xsd. <?xml version = "1.0"?> <class> <student rollno = "393"> <firstname>Dinkar</firstname> <lastname>Kad</lastname> <nickname>Dinkar</nickname> <marks>85</marks> </student> <student rollno = "...
[ { "code": null, "e": 1790, "s": 1704, "text": "We'll use Java based XSD validator to validate students.xml against the students.xsd." }, { "code": null, "e": 2356, "s": 1790, "text": "<?xml version = \"1.0\"?>\n\n<class> \n <student rollno = \"393\">\n <firstname>Dinkar</...
Offsetting the Model — Logic to Implementation | by Ajay Tiwari | Towards Data Science
In our property and casualty insurance world very often we use a term called ‘offset’ which is widely used for modeling rate (count/exposure) such as the number of claims per exposure unit. This helps the model to transform the response variable from rate to count keeping coefficient as 1 by using simple algebra. This ...
[ { "code": null, "e": 486, "s": 171, "text": "In our property and casualty insurance world very often we use a term called ‘offset’ which is widely used for modeling rate (count/exposure) such as the number of claims per exposure unit. This helps the model to transform the response variable from rate...
Design a Turing Machine for equal number of a's and b's - GeeksforGeeks
03 Dec, 2020 Prerequisite – Turing Machine Task :Our task is to design a Turing Machine for an equal number of a’s and b’s. Analysis :Here the main thing to analyze that string consist of equal numbers of a’s and b’s can be of 4 types – Here ‘n’ is the count of a’s or b’s. a) a^n b^n like aabb b) b^n a^n like bbaa c)...
[ { "code": null, "e": 24131, "s": 24103, "text": "\n03 Dec, 2020" }, { "code": null, "e": 24161, "s": 24131, "text": "Prerequisite – Turing Machine" }, { "code": null, "e": 24242, "s": 24161, "text": "Task :Our task is to design a Turing Machine for an equal nu...
For and While loops in Arduino
The for and while loops in Arduino follow the C language syntax. The syntax for the for loop is − for(iterator initialization; stop condition; increment instruction){ //Do something } for(int i = 0; i< 50; i++){ //Do something } Similarly, the syntax for the while loop is − while(condition){ //Do something } i...
[ { "code": null, "e": 1127, "s": 1062, "text": "The for and while loops in Arduino follow the C language syntax." }, { "code": null, "e": 1160, "s": 1127, "text": "The syntax for the for loop is −" }, { "code": null, "e": 1249, "s": 1160, "text": "for(iterator ...
How do I get interactive plots again in Spyder/Ipython/matplotlib?
To get interactive plots, we need to activate the figure. Using plt.ioff() and plt.ion(), we can perform interactive actions with plot. Create fig and ax variables using subplots method, where default nrows and ncols are 1. Create fig and ax variables using subplots method, where default nrows and ncols are 1. Draw a l...
[ { "code": null, "e": 1198, "s": 1062, "text": "To get interactive plots, we need to activate the figure. Using plt.ioff() and plt.ion(), we can perform interactive actions with plot." }, { "code": null, "e": 1286, "s": 1198, "text": "Create fig and ax variables using subplots met...
How to filter datasets using SQL. How use SQL to filter data from a table... | by Kate Marie Lewis | Towards Data Science
For the last few weeks I have been helping a small group of my friends learn SQL. They wanted to learn data science since they are stuck inside social distancing and have a lot more free time on their hands. I thought it was a great idea and offered to help guide them through it. This is our third lesson using SQL. If ...
[ { "code": null, "e": 452, "s": 171, "text": "For the last few weeks I have been helping a small group of my friends learn SQL. They wanted to learn data science since they are stuck inside social distancing and have a lot more free time on their hands. I thought it was a great idea and offered to he...
An introduction to Flowcharts - GeeksforGeeks
18 Apr, 2022 What is a Flowchart? Flowchart is a graphical representation of an algorithm. Programmers often use it as a program-planning tool to solve a problem. It makes use of symbols which are connected among them to indicate the flow of information and processing. The process of drawing a flowchart for an algorith...
[ { "code": null, "e": 25934, "s": 25906, "text": "\n18 Apr, 2022" }, { "code": null, "e": 26272, "s": 25934, "text": "What is a Flowchart? Flowchart is a graphical representation of an algorithm. Programmers often use it as a program-planning tool to solve a problem. It makes use ...
Foldable Binary Trees - GeeksforGeeks
13 Aug, 2021 Question: Given a binary tree, find out if the tree can be folded or not.A tree can be folded if left and right subtrees of the tree are structure wise mirror image of each other. An empty tree is considered as foldable. Consider the below trees: (a) and (b) can be folded. (c) and (d) cannot be folded. (...
[ { "code": null, "e": 35768, "s": 35740, "text": "\n13 Aug, 2021" }, { "code": null, "e": 35990, "s": 35768, "text": "Question: Given a binary tree, find out if the tree can be folded or not.A tree can be folded if left and right subtrees of the tree are structure wise mirror imag...
Python - Every Kth Strings Uppercase - GeeksforGeeks
05 Sep, 2020 Given a String list, change every Kth string to uppercase. Input : test_list = [“gfg”, “is”, “best”, “for”, “geeks”], K = 3Output : [‘GFG’, ‘is’, ‘best’, ‘FOR’, ‘geeks’]Explanation : All Kth strings are uppercased. Input : test_list = [“gfg”, “is”, “best”, “for”, “geeks”], K = 4Output : [‘GFG’, ‘is’, ‘best...
[ { "code": null, "e": 25647, "s": 25619, "text": "\n05 Sep, 2020" }, { "code": null, "e": 25706, "s": 25647, "text": "Given a String list, change every Kth string to uppercase." }, { "code": null, "e": 25862, "s": 25706, "text": "Input : test_list = [“gfg”, “is...
How to set priority to the test cases in TestNG?
We can set priority for test cases in order of their execution, by giving priority to each test method. A test method having lower priority runs first then the test methods with higher priority are executed. @Test (priority = 1) public void verifyTravel(){ System.out.println("Travel history successful "); } @Test (p...
[ { "code": null, "e": 1270, "s": 1062, "text": "We can set priority for test cases in order of their execution, by giving priority to each test method. A test method having lower priority runs first then the test methods with higher priority are executed." }, { "code": null, "e": 1473, ...
How to extract part of a URL in MySQL?
You need to use SUBSTRING_INDEX() function from MySQL to extract part of a URL. Let us first create a table − mysql> create table DemoTable ( Id int NOT NULL AUTO_INCREMENT PRIMARY KEY, URL text ); Query OK, 0 rows affected (0.53 sec) Insert some records in the table using insert command − mysql> insert into Dem...
[ { "code": null, "e": 1142, "s": 1062, "text": "You need to use SUBSTRING_INDEX() function from MySQL to extract part of a URL." }, { "code": null, "e": 1173, "s": 1142, "text": " Let us first create a table −" }, { "code": null, "e": 1304, "s": 1173, "text": "...
Python | Number to Words using num2words - GeeksforGeeks
19 Jul, 2019 num2words module in Python, which converts number (like 34) to words (like thirty-four). Also, this library has support for multiple languages. In this article, we will see how to convert number to words using num2words module. InstallationOne can easily install num2words using pip. pip install num2words ...
[ { "code": null, "e": 24278, "s": 24250, "text": "\n19 Jul, 2019" }, { "code": null, "e": 24506, "s": 24278, "text": "num2words module in Python, which converts number (like 34) to words (like thirty-four). Also, this library has support for multiple languages. In this article, we...
numpy.remainder() in Python - GeeksforGeeks
10 Feb, 2019 numpy.remainder() is another function for doing mathematical operations in numpy.It returns element-wise remainder of division between two array arr1 and arr2 i.e. arr1 % arr2 .It returns 0 when arr2 is 0 and both arr1 and arr2 are (arrays of) integers. Syntax : numpy.remainder(arr1, arr2, /, out=None, *, ...
[ { "code": null, "e": 23901, "s": 23873, "text": "\n10 Feb, 2019" }, { "code": null, "e": 24155, "s": 23901, "text": "numpy.remainder() is another function for doing mathematical operations in numpy.It returns element-wise remainder of division between two array arr1 and arr2 i.e....
Image Segmentation with Clustering | by Yağmur Çiğdem Aktaş | Towards Data Science
We overviewed Classical Image Segmentation methods in my previous post. Now it is time to examine AI-based Image Segmentation methods and we will start with Clustering. Before diving into Image Segmentation with Clustering, let’s go over the topics like “What is Clustering?” “How to implement a basic Clustering method ...
[ { "code": null, "e": 341, "s": 172, "text": "We overviewed Classical Image Segmentation methods in my previous post. Now it is time to examine AI-based Image Segmentation methods and we will start with Clustering." }, { "code": null, "e": 506, "s": 341, "text": "Before diving int...
Case sensitive string comparison in Java.
You can compare two strings using either equals() method or compareTo() method. Where, The equals() method compares this string to the specified object. The compareTo() method compares two strings lexicographically. The comparison is based on the Unicode value of each character in the strings. These two methods compare...
[ { "code": null, "e": 1142, "s": 1062, "text": "You can compare two strings using either equals() method or compareTo() method." }, { "code": null, "e": 1149, "s": 1142, "text": "Where," }, { "code": null, "e": 1215, "s": 1149, "text": "The equals() method comp...
Check if given number is perfect square in Python
Suppose we have a number n. We have to check whether the number n is perfect square or not. A number is said to be a perfect square number when its square root is an integer. So, if the input is like n = 36, then the output will be True as 36 = 6*6. To solve this, we will follow these steps − sq_root := integer part of...
[ { "code": null, "e": 1237, "s": 1062, "text": "Suppose we have a number n. We have to check whether the number n is perfect square or not. A number is said to be a perfect square number when its square root is an integer." }, { "code": null, "e": 1312, "s": 1237, "text": "So, if ...
Python - Filter dictionary key based on the values in selective list
Sometimes in a Python dictionary we may need to to filter out certain keys of the dictionary based on certain criteria. In this article we will see how to filter out keys from Python dictionary. In this approach we put the values of the keys to be filtered in a list. Then iterate through each element of the list and ch...
[ { "code": null, "e": 1257, "s": 1062, "text": "Sometimes in a Python dictionary we may need to to filter out certain keys of the dictionary based on certain criteria. In this article we will see how to filter out keys from Python dictionary." }, { "code": null, "e": 1520, "s": 1257, ...
How to move the ResultSet cursor to the first row in JDBC?
Whenever we execute SQL statements using the executeQuery() method, it returns a ResultSet object which holds the tabular data returned by the SELECT queries(in general). The ResultSet object contains a cursor/pointer which points to the current row. Initially this cursor is positioned before first row (default positio...
[ { "code": null, "e": 1233, "s": 1062, "text": "Whenever we execute SQL statements using the executeQuery() method, it returns a ResultSet object which holds the tabular data returned by the SELECT queries(in general)." }, { "code": null, "e": 1386, "s": 1233, "text": "The ResultS...
Unary Operators Overloading in C++
The unary operators operate on a single operand and following are the examples of Unary operators − The increment (++) and decrement (--) operators. The unary minus (-) operator. The logical not (!) operator. The unary operators operate on the object for which they were called and normally, this operator appears on the...
[ { "code": null, "e": 2418, "s": 2318, "text": "The unary operators operate on a single operand and following are the examples of Unary operators −" }, { "code": null, "e": 2467, "s": 2418, "text": "The increment (++) and decrement (--) operators." }, { "code": null, "...
Unique BST's | Practice | GeeksforGeeks
Given an integer. Find how many structurally unique binary search trees are there that stores the values from 1 to that integer (inclusive). Example 1: Input: N = 2 Output: 2 Explanation:for N = 2, there are 2 unique BSTs 1 2 \ / 2 1 Example 2: Input: N = 3 Output:...
[ { "code": null, "e": 380, "s": 238, "text": "Given an integer. Find how many structurally unique binary search trees are there that stores the values from 1 to that integer (inclusive). " }, { "code": null, "e": 391, "s": 380, "text": "Example 1:" }, { "code": null, "...
Java Program to center a JLabel in a JPanel with LayoutManager
Here, we are using the LayoutManager GridBagLayout to center the components. We have two components here including a label and we have set the layout as GridBagLayout − JLabel label = new JLabel("Name (Centered Label): "); JTextArea text = new JTextArea(); text.setText("Add name here..."); panel.setLayout(new GridBagLa...
[ { "code": null, "e": 1231, "s": 1062, "text": "Here, we are using the LayoutManager GridBagLayout to center the components. We have two components here including a label and we have set the layout as GridBagLayout −" }, { "code": null, "e": 1391, "s": 1231, "text": "JLabel label ...
Every Complex DataFrame Manipulation, Explained and Visualized Intuitively | by Andre Ye | Towards Data Science
Pandas offers a wide range of DataFrame manipulations, but many of them are complex and may not seem approachable. This article will present 8 essential DataFrame manipulation methods which cover almost all of the manipulation functions a data scientist would need to know. Each method will include an explanation, visua...
[ { "code": null, "e": 535, "s": 172, "text": "Pandas offers a wide range of DataFrame manipulations, but many of them are complex and may not seem approachable. This article will present 8 essential DataFrame manipulation methods which cover almost all of the manipulation functions a data scientist w...
Delegates in C#
A delegate in C# is a reference to the method. A delegate is a reference type variable that holds the reference to a method. The reference can be changed at runtime. Delegates are especially used for implementing events and the call-back methods. All delegates are implicitly derived from the System.Delegate class. Let ...
[ { "code": null, "e": 1228, "s": 1062, "text": "A delegate in C# is a reference to the method. A delegate is a reference type variable that holds the reference to a method. The reference can be changed at runtime." }, { "code": null, "e": 1378, "s": 1228, "text": "Delegates are es...
Time series classification using Dynamic Time Warping | by Nikos Kafritsas | Towards Data Science
Time series classification is a common task, having many applications in numerous domains like IOT (Internet of things), signal processing, human activity recognition and so on. The goal is to train a model that can accurately predict the class of a time series, given a dataset with labeled time sequences. A popular ap...
[ { "code": null, "e": 480, "s": 172, "text": "Time series classification is a common task, having many applications in numerous domains like IOT (Internet of things), signal processing, human activity recognition and so on. The goal is to train a model that can accurately predict the class of a time ...
Machine learning and recommender systems using your own Spotify data | by Anthony Li | Towards Data Science
As someone who uses Spotify on the daily I was interested in what analysis I could do with my own music data. Spotify does a great job of recommending tracks via both daily mixes and track radios, but how do we build something like this ourselves? The aim here was to use machine learning and recommender system techniqu...
[ { "code": null, "e": 562, "s": 172, "text": "As someone who uses Spotify on the daily I was interested in what analysis I could do with my own music data. Spotify does a great job of recommending tracks via both daily mixes and track radios, but how do we build something like this ourselves? The aim...
Model-Based Recommendation System | Towards Data Science
This post is the last piece of my Python Surprise recommendation series in which I present the techniques I used in my boardgame recommendation engine project. (See my GitHub repo for the whole project.) Previous posts in the series: Part 1: How to Build a Memory-Based Recommendation System using Python Surprise: I rec...
[ { "code": null, "e": 376, "s": 172, "text": "This post is the last piece of my Python Surprise recommendation series in which I present the techniques I used in my boardgame recommendation engine project. (See my GitHub repo for the whole project.)" }, { "code": null, "e": 406, "s": ...
DAX Logical - IF function
Checks a condition given as the first argument of the function and returns one value if the condition is TRUE and returns another value if the condition is FALSE. IF (<logical_test>, <value_if_true>, [<value_if_false>]) logical_test Any value or expression that can be evaluated to TRUE or FALSE. value_if_true The valu...
[ { "code": null, "e": 2164, "s": 2001, "text": "Checks a condition given as the first argument of the function and returns one value if the condition is TRUE and returns another value if the condition is FALSE." }, { "code": null, "e": 2222, "s": 2164, "text": "IF (<logical_test>,...
C++ program to implement Inverse Interpolation using Lagrange Formula
In this tutorial, we will be discussing a program to implement Inverse Interpolation using Lagrange formula. Inverse Interpolation is defined as the method of finding the value of an independent variable from the given value of dependent value lying between two tabulated set of values for an unknown function. #include ...
[ { "code": null, "e": 1171, "s": 1062, "text": "In this tutorial, we will be discussing a program to implement Inverse Interpolation using Lagrange formula." }, { "code": null, "e": 1373, "s": 1171, "text": "Inverse Interpolation is defined as the method of finding the value of an...
Fortran - Procedures
A procedure is a group of statements that perform a well-defined task and can be invoked from your program. Information (or data) is passed to the calling program, to the procedure as arguments. There are two types of procedures − Functions Subroutines A function is a procedure that returns a single quantity. A functio...
[ { "code": null, "e": 2341, "s": 2146, "text": "A procedure is a group of statements that perform a well-defined task and can be invoked from your program. Information (or data) is passed to the calling program, to the procedure as arguments." }, { "code": null, "e": 2377, "s": 2341, ...
Python Program for cube sum of first n natural numbers
In this article, we will learn about the solution and approach to solve the given problem statement. Problem statement −Given an input n, we need to print the sum of series 13 + 23 + 33 + 43 + .......+ n3 till n-th term. Here we will discuss two approach to reach the solution of the problem statement − Brute-force appr...
[ { "code": null, "e": 1163, "s": 1062, "text": "In this article, we will learn about the solution and approach to solve the given problem statement." }, { "code": null, "e": 1283, "s": 1163, "text": "Problem statement −Given an input n, we need to print the sum of series 13 + 23 +...
How to invoke the Firefox browser in Selenium with python?
We can invoke any browsers with the help of the webdriver package. From this package we get access to numerous classes. Next we have to import the selenium.webdriver package. Then we shall be exposed to all the browsers belonging to that package. For invoking the Firefox browser, we have to select the Firefox class. Th...
[ { "code": null, "e": 1309, "s": 1062, "text": "We can invoke any browsers with the help of the webdriver package. From this package we get access to numerous classes. Next we have to import the selenium.webdriver package. Then we shall be exposed to all the browsers belonging to that package." }, ...
How to center an image in canvas Python Tkinter
Let us consider that we are creating a GUI-based application using Tkinter and we want to load an image in the Tkinter canvas. By default, the canvas loads the images according to its width and height. However, we can manipulate the position of an image in any direction (N,S,E,W,NS, EW, etc.) by passing the ‘Direction’...
[ { "code": null, "e": 1189, "s": 1062, "text": "Let us consider that we are creating a GUI-based application using Tkinter and we\nwant to load an image in the Tkinter canvas." }, { "code": null, "e": 1552, "s": 1189, "text": "By default, the canvas loads the images according to i...
C program to demonstrate fork() and pipe()
In this problem, we will demonstrate fork() and pipe(). Here we will create a C program for Linux that will concatenate two string, using 2 processes one will take input and send it to others which will concatenate the string with a predefined string and return the concatenated string. First lets recap fork() and pipe(...
[ { "code": null, "e": 1349, "s": 1062, "text": "In this problem, we will demonstrate fork() and pipe(). Here we will create a C program for Linux that will concatenate two string, using 2 processes one will take input and send it to others which will concatenate the string with a predefined string an...
How to set the height of an element with JavaScript?
Use the height property to set the height of an element. You can try to run the following code to set the height of a button with JavaScript − Live Demo <!DOCTYPE html> <html> <body> <h1>Heading 1</h1> <p>This is Demo Text.</p> <button type="button" id="myID" onclick="display()">Update Height</butt...
[ { "code": null, "e": 1205, "s": 1062, "text": "Use the height property to set the height of an element. You can try to run the following code to set the height of a button with JavaScript −" }, { "code": null, "e": 1215, "s": 1205, "text": "Live Demo" }, { "code": null, ...
How to loop through arrays in JavaScript objects?
Looping through arrays inside objects is the same as looping through objects. We have to use 'for...in' loop to loop through arrays inside objects. In the following example, an object "obj" is defined. This object has an array in it. Using 'for...in' loop, the elements in that array are displayed as shown in the output...
[ { "code": null, "e": 1210, "s": 1062, "text": "Looping through arrays inside objects is the same as looping through objects. We have to use 'for...in' loop to loop through arrays inside objects." }, { "code": null, "e": 1385, "s": 1210, "text": "In the following example, an objec...
How is Session Management done in JSP?
JSP makes use of the servlet provided HttpSession Interface. This interface provides a way to identify a user across. a one-page request or visit to a website or store information about that user By default, JSPs have session tracking enabled and a new HttpSession object is instantiated for each new client automaticall...
[ { "code": null, "e": 1180, "s": 1062, "text": "JSP makes use of the servlet provided HttpSession Interface. This interface provides a way to identify a user across." }, { "code": null, "e": 1202, "s": 1180, "text": "a one-page request or" }, { "code": null, "e": 1224,...
DurationField - Django forms - GeeksforGeeks
13 Feb, 2020 DurationField in Django Forms is used for input of particular durations for example from 12 am to 1 pm. The default widget for this input is TextInput. It Normalizes to: A Python datetime.date object. It validates that the given value is a string which can be converted into a timedelta. DurationField has o...
[ { "code": null, "e": 23992, "s": 23964, "text": "\n13 Feb, 2020" }, { "code": null, "e": 24280, "s": 23992, "text": "DurationField in Django Forms is used for input of particular durations for example from 12 am to 1 pm. The default widget for this input is TextInput. It Normaliz...
Node.js Buffer.subarray() Method
17 Feb, 2022 The buffer.subarray() method is an inbuilt application programming interface of the buffer module which is used to crop a part of array i.e. create sub-array from an array.Syntax: Buffer.subarray( starting_index, ending_index ) Parameters: This method has two parameters as mentioned above and described b...
[ { "code": null, "e": 28, "s": 0, "text": "\n17 Feb, 2022" }, { "code": null, "e": 210, "s": 28, "text": "The buffer.subarray() method is an inbuilt application programming interface of the buffer module which is used to crop a part of array i.e. create sub-array from an array.Syn...
Python – Spelling checker using Enchant
23 Jun, 2021 Enchant is a module in Python, which is used to check the spelling of a word, gives suggestions to correct words. Also, gives antonym and synonym of words. It checks whether a word exists in the dictionary or not. Enchant can also be used to check the spelling of words. The check() method returns True if t...
[ { "code": null, "e": 28, "s": 0, "text": "\n23 Jun, 2021" }, { "code": null, "e": 242, "s": 28, "text": "Enchant is a module in Python, which is used to check the spelling of a word, gives suggestions to correct words. Also, gives antonym and synonym of words. It checks whether a...
std::min_element in C++
24 Jul, 2017 For calculating the smallest of all the elements in a given list, we have std::min, but what if we want to find the smallest not in the whole list, but in a sub-section of the list. To serve this purpose, we have std::min_element in C++. std::min_element is defined inside the header file <algorithm> and it...
[ { "code": null, "e": 54, "s": 26, "text": "\n24 Jul, 2017" }, { "code": null, "e": 292, "s": 54, "text": "For calculating the smallest of all the elements in a given list, we have std::min, but what if we want to find the smallest not in the whole list, but in a sub-section of th...
Program for Simpson’s 1/3 Rule
18 Aug, 2021 In numerical analysis, Simpson’s 1/3 rule is a method for numerical approximation of definite integrals. Specifically, it is the following approximation: In Simpson’s 1/3 Rule, we use parabolas to approximate each part of the curve.We divide the area into n equal segments of width Δx. Simpson’s rule ...
[ { "code": null, "e": 52, "s": 24, "text": "\n18 Aug, 2021" }, { "code": null, "e": 207, "s": 52, "text": "In numerical analysis, Simpson’s 1/3 rule is a method for numerical approximation of definite integrals. Specifically, it is the following approximation: " }, { "code...
What is the max size of localStorage values?
28 Jan, 2022 Currently localStorage only supports strings as values, and the objects need to be converted to JSON strings before they are stored in the localStorage. Data stored using local storage isn’t sent back to the server (unlike cookies, ). All the data stays on the client-side, thus there is a defined limitatio...
[ { "code": null, "e": 28, "s": 0, "text": "\n28 Jan, 2022" }, { "code": null, "e": 467, "s": 28, "text": "Currently localStorage only supports strings as values, and the objects need to be converted to JSON strings before they are stored in the localStorage. Data stored using loca...
Python PIL | Kernel() method
14 Jul, 2019 PIL is the Python Imaging Library which provides the python interpreter with image editing capabilities. The ImageFilter module contains definitions for a pre-defined set of filters, which can be used with the Image.filter() method. PIL.ImageFilter.Kernel() Create a convolution kernel. The current version ...
[ { "code": null, "e": 28, "s": 0, "text": "\n14 Jul, 2019" }, { "code": null, "e": 261, "s": 28, "text": "PIL is the Python Imaging Library which provides the python interpreter with image editing capabilities. The ImageFilter module contains definitions for a pre-defined set of f...
How to Change Password of User in Android using Firebase?
15 Jun, 2022 In many apps, we got a feature to login using our email and password. Sometimes it happens that we forget the password and most of the time there reset our password. Here we are going to implement the same feature to Reset our password using Firebase Authentication. You may refer to the following article U...
[ { "code": null, "e": 52, "s": 24, "text": "\n15 Jun, 2022" }, { "code": null, "e": 572, "s": 52, "text": "In many apps, we got a feature to login using our email and password. Sometimes it happens that we forget the password and most of the time there reset our password. Here we ...
XSLT <if>
<xsl:if> tag specifies a conditional test against the content of nodes. Following is the syntax declaration of <xsl:if> element. <xsl:if test = boolean-expression > </xsl:if> test The condition in the xml data to test. Parent elements xsl:attribute, xsl:comment, xsl:copy, xsl:element, xsl:fallback, xsl:for-each, ...
[ { "code": null, "e": 1965, "s": 1893, "text": "<xsl:if> tag specifies a conditional test against the content of nodes." }, { "code": null, "e": 2022, "s": 1965, "text": "Following is the syntax declaration of <xsl:if> element." }, { "code": null, "e": 2074, "s": 2...
Find the character in first string that is present at minimum index in second string
01 May, 2021 Given a string str and another string patt. Find the character in patt that is present at the minimum index in str. If no character of patt is present in str then print ‘No character present’. Examples: Input: str = “geeksforgeeks”, patt = “set” Output: e Both e and s of patt are present in str, but e is ...
[ { "code": null, "e": 52, "s": 24, "text": "\n01 May, 2021" }, { "code": null, "e": 245, "s": 52, "text": "Given a string str and another string patt. Find the character in patt that is present at the minimum index in str. If no character of patt is present in str then print ‘No c...
LocalTime format() method in Java with Examples
03 Dec, 2018 The format() method of a LocalTime class is used to format this time using the specified formatter passed as a parameter. This method formats this time based on passed formatter to a string. Syntax: public String format(DateTimeFormatter formatter) Parameters: This method accepts a single parameter format...
[ { "code": null, "e": 28, "s": 0, "text": "\n03 Dec, 2018" }, { "code": null, "e": 219, "s": 28, "text": "The format() method of a LocalTime class is used to format this time using the specified formatter passed as a parameter. This method formats this time based on passed formatt...
Find a pair with given sum in BST
20 Jun, 2022 Given a BST and a sum, find if there is a pair with given sum. Example: Input : sum = 28 Root of below tree Output : Pair is found (16, 12) We have discussed different approaches to find a pair with given sum in below post.Find a pair with given sum in a Balanced BSTIn this post, hashing based solu...
[ { "code": null, "e": 54, "s": 26, "text": "\n20 Jun, 2022" }, { "code": null, "e": 117, "s": 54, "text": "Given a BST and a sum, find if there is a pair with given sum." }, { "code": null, "e": 126, "s": 117, "text": "Example:" }, { "code": null, "...
Replace all occurrences of string AB with C without using extra space
08 Jul, 2022 Given a string str that may contain one more occurrences of “AB”. Replace all occurrences of “AB” with “C” in str. Examples: Input : str = "helloABworld" Output : str = "helloCworld" Input : str = "fghABsdfABysu" Output : str = "fghCsdfCysu" A simple solution is to find all occurrences of “AB”. For eve...
[ { "code": null, "e": 52, "s": 24, "text": "\n08 Jul, 2022" }, { "code": null, "e": 167, "s": 52, "text": "Given a string str that may contain one more occurrences of “AB”. Replace all occurrences of “AB” with “C” in str." }, { "code": null, "e": 178, "s": 167, ...
Maximize count of distinct elements in a subsequence of size K in given array
14 Dec, 2021 Given an array arr[] of N integers and an integer K, the task is to find the maximum count of distinct elements over all the subsequences of K integers. Example: Input: arr[]={1, 1, 2, 2}, K=3Output: 2Explanation: The subsequence {1, 1, 2} has 3 integers and the number of distinct integers in it are 2 whic...
[ { "code": null, "e": 54, "s": 26, "text": "\n14 Dec, 2021" }, { "code": null, "e": 207, "s": 54, "text": "Given an array arr[] of N integers and an integer K, the task is to find the maximum count of distinct elements over all the subsequences of K integers." }, { "code":...
std::clamp in C++ 17
07 Aug, 2017 Clamps a variable to a given range[high – low]. If num > high, num is assigned high. If num < low, num is assigned low. If num is already clamped, no modifications. Note : This function is defined in header from C++17 onwards. Examples: Input : num = 100, Range : 10 - 90 Output : num = 90 Input : num = 5,...
[ { "code": null, "e": 52, "s": 24, "text": "\n07 Aug, 2017" }, { "code": null, "e": 100, "s": 52, "text": "Clamps a variable to a given range[high – low]." }, { "code": null, "e": 217, "s": 100, "text": "If num > high, num is assigned high.\nIf num < low, num i...
Java Program to Find the Volume and Surface Area of Cuboid
01 Dec, 2020 A Cuboid is a 3-dimensional box-like figure represented in the 3-dimensional plane. A cuboid has 6 rectangle-shaped faces. Each face meets another face at 90 degrees each. Three sides of cuboid meet at the same vertex. Since it is made up of 6 rectangle faces, it has length, width and height of different d...
[ { "code": null, "e": 53, "s": 25, "text": "\n01 Dec, 2020" }, { "code": null, "e": 516, "s": 53, "text": "A Cuboid is a 3-dimensional box-like figure represented in the 3-dimensional plane. A cuboid has 6 rectangle-shaped faces. Each face meets another face at 90 degrees each. Th...