title
stringlengths
3
221
text
stringlengths
17
477k
parsed
listlengths
0
3.17k
Fetch random rows from a table with MySQL
For this, you can use a PREPARE statement. Let us first create a table − mysql> create table DemoTable( FirstName varchar(100), CountryName varchar(100) ); Query OK, 0 rows affected (0.53 sec) Insert some records in the table using insert command − mysql> insert into DemoTable values('Adam','US'); Query OK, 1 row...
[ { "code": null, "e": 1135, "s": 1062, "text": "For this, you can use a PREPARE statement. Let us first create a table −" }, { "code": null, "e": 1261, "s": 1135, "text": "mysql> create table DemoTable(\n FirstName varchar(100),\n CountryName varchar(100)\n);\nQuery OK, 0 rows...
Working with Numpy Arrays: Indexing | by Kurtis Pykes | Towards Data Science
PyTrix will now be a weekly series where I present cool things that can be done in Python that are useful for Data Scientist. The last PyTrix tutorial can be found in the link below... towardsdatascience.com Link for the Github Repository below: github.com First, let’s start by explaining Numpy. Numpy is the de-facto l...
[ { "code": null, "e": 357, "s": 172, "text": "PyTrix will now be a weekly series where I present cool things that can be done in Python that are useful for Data Scientist. The last PyTrix tutorial can be found in the link below..." }, { "code": null, "e": 380, "s": 357, "text": "t...
Prim's algorithm in Javascript
Prim's algorithm is a greedy algorithm that finds a minimum spanning tree for a weighted undirected graph. It finds a subset of the edges that forms a tree that includes every vertex, where the total weight of all the edges in the tree is minimized. The algorithm operates by building this tree one vertex at a time, fro...
[ { "code": null, "e": 1312, "s": 1062, "text": "Prim's algorithm is a greedy algorithm that finds a minimum spanning tree for a weighted undirected graph. It finds a subset of the edges that forms a tree that includes every vertex, where the total weight of all the edges in the tree is minimized." ...
Program to find length of longest strictly increasing then decreasing sublist in Python
Suppose we have a list of numbers called nums. We have to find the length of the longest sublist such that (minimum length 3) its values are strictly increasing and then decreasing. So, if the input is like nums = [7, 1, 3, 5, 2, 0], then the output will be 5, as the sublist is [2, 4, 6, 3, 1] is strictly increasing th...
[ { "code": null, "e": 1244, "s": 1062, "text": "Suppose we have a list of numbers called nums. We have to find the length of the longest sublist such that (minimum length 3) its values are strictly increasing and then decreasing." }, { "code": null, "e": 1397, "s": 1244, "text": "...
A modified game of Nim in C ?
Modified game of Nim is an optimisation games of arrays. This game predicts the winner based on the starting player and optimal moves. Game Logic − In this game, we are given an array{}, that contains elements. There are generally two players that play the game namly player1 and player2. The aim of both is to make sure...
[ { "code": null, "e": 1197, "s": 1062, "text": "Modified game of Nim is an optimisation games of arrays. This game predicts the winner based on the starting player and optimal moves." }, { "code": null, "e": 1670, "s": 1197, "text": "Game Logic − In this game, we are given an arra...
Sorting a Map by value in C++ STL - GeeksforGeeks
31 May, 2020 Maps are associative containers that store elements in a mapped fashion. Each element has a key value and a mapped value. No two mapped values can have equal key values. By default, a Map in C++ is sorted in increasing order based on its key. Below is the various method to achieve this: Method 1 – using th...
[ { "code": null, "e": 24297, "s": 24269, "text": "\n31 May, 2020" }, { "code": null, "e": 24585, "s": 24297, "text": "Maps are associative containers that store elements in a mapped fashion. Each element has a key value and a mapped value. No two mapped values can have equal key v...
Implementation of Lasso, Ridge and Elastic Net
15 May, 2021 In this article, we will look into the implementation of different regularization techniques. First, we will start with multiple linear regression. For that, we require the python3 environment with sci-kit learn and pandas preinstall. We can also use google collaboratory or any other jupyter notebook envir...
[ { "code": null, "e": 28, "s": 0, "text": "\n15 May, 2021" }, { "code": null, "e": 404, "s": 28, "text": "In this article, we will look into the implementation of different regularization techniques. First, we will start with multiple linear regression. For that, we require the py...
Program to calculate Kinetic Energy and Potential Energy
12 Jul, 2021 Given three float values M, H, and V representing the mass, velocity, and height of an object respectively the task is to calculate its Kinetic Energy as well as its Potential Energy, Note: The value of acceleration due to gravity (g) is 9.8 and ignore units. Examples: Input: M = 25, H = 10, V = 15Outpu...
[ { "code": null, "e": 53, "s": 25, "text": "\n12 Jul, 2021" }, { "code": null, "e": 316, "s": 53, "text": "Given three float values M, H, and V representing the mass, velocity, and height of an object respectively the task is to calculate its Kinetic Energy as well as its Potentia...
How to get the width and height of an image ?
24 Jun, 2019 Given an image and the task is to get the width and height of the image using JavaScript. The width and height property is used to display the image width and height. Syntax for width: var width = this.width; Syntax for height: var height = this.height; Example 1: This example selects the image and then us...
[ { "code": null, "e": 54, "s": 26, "text": "\n24 Jun, 2019" }, { "code": null, "e": 221, "s": 54, "text": "Given an image and the task is to get the width and height of the image using JavaScript. The width and height property is used to display the image width and height." }, ...
How to set the Size of the RadioButton in C#?
30 Jun, 2019 In Windows Forms, RadioButton control is used to select a single option among the group of the options. For example, select your gender from the given list, so you will choose only one option among three options like Male or Female or Transgender.In Windows Forms, you are allowed to adjust the size of the ...
[ { "code": null, "e": 28, "s": 0, "text": "\n30 Jun, 2019" }, { "code": null, "e": 521, "s": 28, "text": "In Windows Forms, RadioButton control is used to select a single option among the group of the options. For example, select your gender from the given list, so you will choose...
How to convert string to array of integers in java?
You can convert a String to integer using the parseInt() method of the Integer class. To convert a string array to an integer array, convert each element of it to integer and populate the integer array with them. Live Demo import java.util.Arrays; public class StringToIntegerArray { public static void main(String a...
[ { "code": null, "e": 1275, "s": 1062, "text": "You can convert a String to integer using the parseInt() method of the Integer class. To convert a string array to an integer array, convert each element of it to integer and populate the integer array with them." }, { "code": null, "e": 128...
Apache Camel - CamelContext
CamelContext provides access to all other services in Camel as shown in the following figure − Let us look at the various services. The Registry module by default is a JNDI registry, which holds the name of the various Javabeans that your application uses. If you use Camel with Spring, this will be the Spring Applicati...
[ { "code": null, "e": 1966, "s": 1871, "text": "CamelContext provides access to all other services in Camel as shown in the following figure −" }, { "code": null, "e": 2926, "s": 1966, "text": "Let us look at the various services. The Registry module by default is a JNDI registry,...
JupyterLab is Now Available as a Desktop App. Should You Care? | by Dario Radečić | Towards Data Science
The most popular data science IDE just got better. The days of launching JupyterLab through the terminal are thankfully over, as the desktop version was released weeks ago. Yes, you read that right — you can now install JupyterLab as a desktop application on any OS. And this article will show you how. Don’t feel like r...
[ { "code": null, "e": 474, "s": 171, "text": "The most popular data science IDE just got better. The days of launching JupyterLab through the terminal are thankfully over, as the desktop version was released weeks ago. Yes, you read that right — you can now install JupyterLab as a desktop application...
How should I enable LOAD DATA LOCAL INFILE in my.cnf in MySQL?
We can enable it with the help of the SET command with GLOBAL. The first time, local infile will be off. The following is the syntax. mysql> SHOW GLOBAL VARIABLES LIKE 'local_infile'; Here is the output. +---------------+-------+ | Variable_name | Value | +---------------+-------+ | local_infile | OFF | +----------...
[ { "code": null, "e": 1167, "s": 1062, "text": "We can enable it with the help of the SET command with GLOBAL. The first time, local infile will be off." }, { "code": null, "e": 1196, "s": 1167, "text": "The following is the syntax." }, { "code": null, "e": 1247, "...
Quantum Physics Visualization With Python | by Syed Sadat Nazrul | Towards Data Science
On this blog, I have decided to review some college level quantum chemistry for deriving electron orbitals. The additional fun part is that, we are going to visualize wave functions and electron probabilities.. using Python! In 1926, Erwin Schrodinger advanced the famous wave equation that relates the energy of a syste...
[ { "code": null, "e": 397, "s": 172, "text": "On this blog, I have decided to review some college level quantum chemistry for deriving electron orbitals. The additional fun part is that, we are going to visualize wave functions and electron probabilities.. using Python!" }, { "code": null, ...
Variational Autoencoders as Generative Models with Keras | by Kartik Chaudhary | Towards Data Science
This article focuses on giving the readers some basic understanding of the Variational Autoencoders and explaining how they are different from the ordinary autoencoders in Machine Learning and Artificial Intelligence. Unlike vanilla autoencoders(like-sparse autoencoders, de-noising autoencoders .etc), Variational Autoe...
[ { "code": null, "e": 731, "s": 172, "text": "This article focuses on giving the readers some basic understanding of the Variational Autoencoders and explaining how they are different from the ordinary autoencoders in Machine Learning and Artificial Intelligence. Unlike vanilla autoencoders(like-spar...
Removing an element from C++ std::vector<> by index?
Remove an element from C++ std::vector<> by index can be done by following way − Live Demo #include<iostream> #include<vector> using namespace std; int main() { vector<int> v; //declare vector //insert elements into vector v.push_back(-10); v.push_back(7); v.push_back(6); // Deletes the first element...
[ { "code": null, "e": 1143, "s": 1062, "text": "Remove an element from C++ std::vector<> by index can be done by following way −" }, { "code": null, "e": 1154, "s": 1143, "text": " Live Demo" }, { "code": null, "e": 1481, "s": 1154, "text": "#include<iostream>\...
How can I iterate through two lists in parallel in Python?
Assuming that two lists may be of unequal length, parallel traversal over common indices can be done using for loop over over range of minimum length >>> L1 ['a', 'b', 'c', 'd'] >>> L2 [4, 5, 6] >>> l=len(L1) if len(L1)<=len(L2)else len(L2) >>> l 3 >>> for i in range(l): print (L1[i], L2[i]) a 4 b 5 c 6 A more pyt...
[ { "code": null, "e": 1212, "s": 1062, "text": "Assuming that two lists may be of unequal length, parallel traversal over common indices can be done using for loop over over range of minimum length" }, { "code": null, "e": 1372, "s": 1212, "text": ">>> L1\n['a', 'b', 'c', 'd']\n>>...
Get ceiling value of a number using Math.ceil in Java
In order to get the ceiling value of a number in Java, we use the java.lang.Math.ceil() method. The Math.ceil() method returns the smallest (closest to negative infinity) double value which is greater than or equal to the parameter and has a value which is equal to a mathematical integer on the number line. If the para...
[ { "code": null, "e": 1595, "s": 1062, "text": "In order to get the ceiling value of a number in Java, we use the java.lang.Math.ceil() method. The Math.ceil() method returns the smallest (closest to negative infinity) double value which is greater than or equal to the parameter and has a value which...
Difference Between COMMIT and ROLLBACK in SQL
In this post, we will understand the difference between COMMIT and ROLLBACK in SQL. It validates the modifications that are made by the current transaction. It validates the modifications that are made by the current transaction. Once the COMMIT statement has been executed, the transaction can’t be rolled back using RO...
[ { "code": null, "e": 1146, "s": 1062, "text": "In this post, we will understand the difference between COMMIT and ROLLBACK in SQL." }, { "code": null, "e": 1219, "s": 1146, "text": "It validates the modifications that are made by the current transaction." }, { "code": nul...
C# Program to pass Parameter to a Thread
To work with threads, add the following namespace in your code − using System.Threading; Firstly, you need to create a new thread in C# − Thread thread = new Thread(threadDemo); Above, threadDemo is our thread function. Now pass a parameter to the thread − thread.Start(str); The parameter set above is − String str = "H...
[ { "code": null, "e": 1127, "s": 1062, "text": "To work with threads, add the following namespace in your code −" }, { "code": null, "e": 1151, "s": 1127, "text": "using System.Threading;" }, { "code": null, "e": 1200, "s": 1151, "text": "Firstly, you need to c...
What are factory functions in JavaScript ?
24 Jun, 2021 The Factory Function is similar to constructor functions/class functions, but instead of using new to create an object, factory functions simply creates an object and returns it. Factory Functions are a very useful tool in JavaScript. Factory Functions in JavaScript are similar to constructor functions/cla...
[ { "code": null, "e": 52, "s": 24, "text": "\n24 Jun, 2021" }, { "code": null, "e": 231, "s": 52, "text": "The Factory Function is similar to constructor functions/class functions, but instead of using new to create an object, factory functions simply creates an object and returns...
Longest Zig-Zag Subsequence
10 Jun, 2021 The longest Zig-Zag subsequence problem is to find length of the longest subsequence of given sequence such that all elements of this are alternating. If a sequence {x1, x2, .. xn} is alternating sequence then its element satisfy one of the following relation : x1 < x2 > x3 < x4 > x5 < .... xn or x1 ...
[ { "code": null, "e": 52, "s": 24, "text": "\n10 Jun, 2021" }, { "code": null, "e": 315, "s": 52, "text": "The longest Zig-Zag subsequence problem is to find length of the longest subsequence of given sequence such that all elements of this are alternating. If a sequence {x1, x2, ...
Converting string ‘yyyy-mm-dd’ into DateTime in Python
23 Aug, 2021 In this article, we are going to convert DateTime string of the format ‘yyyy-mm-dd’ into DateTime using Python. yyyy-mm-dd stands for year-month-day . We can convert string format to datetime by using the strptime() function. We will use the ‘%Y/%m/%d’ format to get the string to datetime. Syntax: datet...
[ { "code": null, "e": 53, "s": 25, "text": "\n23 Aug, 2021" }, { "code": null, "e": 166, "s": 53, "text": "In this article, we are going to convert DateTime string of the format ‘yyyy-mm-dd’ into DateTime using Python. " }, { "code": null, "e": 205, "s": 166, "...
Difference between NULL pointer, Null character (‘\0’) and ‘0’ in C with Examples
01 Jun, 2020 NULL Pointer:The integer constant zero(0) has different meanings depending upon it’s used. In all cases, it is an integer constant with the value 0, it is just described in different ways.If any pointer is being compared to 0, then this is a check to see if the pointer is a null pointer. This 0 is then ref...
[ { "code": null, "e": 54, "s": 26, "text": "\n01 Jun, 2020" }, { "code": null, "e": 561, "s": 54, "text": "NULL Pointer:The integer constant zero(0) has different meanings depending upon it’s used. In all cases, it is an integer constant with the value 0, it is just described in d...
Program to print the Alphabets of a Given Word using * pattern
15 Jun, 2021 Given a word str, the task is to print the alphabets of this word using * pattern.Examples: Input: GFG Output: ****** * * * * **** * * * * * * *** * ******* ** ** ****** ** ** ** ****** * * * ...
[ { "code": null, "e": 54, "s": 26, "text": "\n15 Jun, 2021" }, { "code": null, "e": 148, "s": 54, "text": "Given a word str, the task is to print the alphabets of this word using * pattern.Examples: " }, { "code": null, "e": 401, "s": 148, "text": "Input: GFG\...
How to Install Golang on MacOS?
06 Oct, 2021 Before, we start with the process of Installing Golang on our System. We must have first-hand knowledge of What the Go Language is and what it actually does? Go is an open-source and statically typed programming language developed in 2007 by Robert Griesemer, Rob Pike, and Ken Thompson at Google but launch...
[ { "code": null, "e": 28, "s": 0, "text": "\n06 Oct, 2021" }, { "code": null, "e": 1004, "s": 28, "text": "Before, we start with the process of Installing Golang on our System. We must have first-hand knowledge of What the Go Language is and what it actually does? Go is an open-so...
CSS | Combinators
30 Jun, 2021 CSS combinators are explaining the relationship between two selectors. CSS selectors are the patterns used to select the elements for style purpose. A CSS selector can be a simple selector or a complex selector consisting of more than one selector connected using combinators. There are four types of combin...
[ { "code": null, "e": 54, "s": 26, "text": "\n30 Jun, 2021" }, { "code": null, "e": 413, "s": 54, "text": "CSS combinators are explaining the relationship between two selectors. CSS selectors are the patterns used to select the elements for style purpose. A CSS selector can be a s...
Sum of all subsequences of length K
04 May, 2021 Given an array arr[]and an integer K, the task is to find the sum of all K length subsequences from the given array. Example: Input: arr[] = {2, 3, 4}, K = 2 Output: 18 Explanation: There are 3 possible subsequences of length 2 which are {2, 3}, {2, 4} and {3, 4} The sum of all 2 length subsequences is 5 ...
[ { "code": null, "e": 52, "s": 24, "text": "\n04 May, 2021" }, { "code": null, "e": 169, "s": 52, "text": "Given an array arr[]and an integer K, the task is to find the sum of all K length subsequences from the given array." }, { "code": null, "e": 179, "s": 169, ...
Regex - reusing patterns to capture groups in JavaScript?
For this, use regular expression with digit along with $. var groupValues1 = "10 10 10"; var groupValues2 = "10 10 10 10"; var groupValues3 = "10 10"; var regularExpression = /^(\d+)(\s)\1\2\1$/; var isValidGroup1 = regularExpression.test(groupValues1); var isValidGroup2 = regularExpression.test(groupValues2); var isVa...
[ { "code": null, "e": 1245, "s": 1187, "text": "For this, use regular expression with digit along with $." }, { "code": null, "e": 1986, "s": 1245, "text": "var groupValues1 = \"10 10 10\";\nvar groupValues2 = \"10 10 10 10\";\nvar groupValues3 = \"10 10\";\nvar regularExpression ...
LocalDate getMonth() method in Java
28 Nov, 2018 The getMonth() method of LocalDate class in Java gets the month-of-year field using the Month enum. Syntax: public Month getMonth() Parameter: This method does not accepts any parameter. Return Value: The function returns the month of the year. Below programs illustrate the getMonth() method of LocalDate ...
[ { "code": null, "e": 28, "s": 0, "text": "\n28 Nov, 2018" }, { "code": null, "e": 128, "s": 28, "text": "The getMonth() method of LocalDate class in Java gets the month-of-year field using the Month enum." }, { "code": null, "e": 136, "s": 128, "text": "Syntax...
C# | Data Types
18 Jun, 2020 Data types specify the type of data that a valid C# variable can hold. C# is a strongly typed programming language because in C#, each type of data (such as integer, character, float, and so forth) is predefined as part of the programming language and all constants or variables defined for a given program ...
[ { "code": null, "e": 53, "s": 25, "text": "\n18 Jun, 2020" }, { "code": null, "e": 406, "s": 53, "text": "Data types specify the type of data that a valid C# variable can hold. C# is a strongly typed programming language because in C#, each type of data (such as integer, characte...
Replace a character c1 with c2 and c2 with c1 in a string S
15 Jun, 2022 Given a string S, c1 and c2. Replace character c1 with c2 and c2 with c1. Examples: Input : grrksfoegrrks, c1 = e, c2 = r Output : geeksforgeeks Input : ratul, c1 = t, c2 = h Output : rahul Traverse through the string and check for the occurrences of c1 and c2. If c1 is found then r...
[ { "code": null, "e": 53, "s": 25, "text": "\n15 Jun, 2022" }, { "code": null, "e": 139, "s": 53, "text": "Given a string S, c1 and c2. Replace character c1 with c2 and c2 with c1. Examples: " }, { "code": null, "e": 265, "s": 139, "text": "Input : grrksfoegrr...
Program to calculate the Surface Area of a Triangular Prism
18 Mar, 2021 In mathematics, a triangular prism is a three-dimensional solid shape with two identical ends connected by equal parallel lines, and have 5 faces, 9 edges, and 6 vertices. where “b” is the length of the base, “h” is the height of the triangle, “s1, s2, s3” are the respective length of each side of the tri...
[ { "code": null, "e": 28, "s": 0, "text": "\n18 Mar, 2021" }, { "code": null, "e": 201, "s": 28, "text": "In mathematics, a triangular prism is a three-dimensional solid shape with two identical ends connected by equal parallel lines, and have 5 faces, 9 edges, and 6 vertices. " ...
Working With the TextView in Android
10 Jun, 2021 TextView in Android is one of the basic and important UI elements. This plays a very important role in the UI experience and depends on how the information is displayed to the user. This TextView widget in android can be dynamized in various contexts. For example, if the important part of the information i...
[ { "code": null, "e": 28, "s": 0, "text": "\n10 Jun, 2021" }, { "code": null, "e": 708, "s": 28, "text": "TextView in Android is one of the basic and important UI elements. This plays a very important role in the UI experience and depends on how the information is displayed to the...
Generate simple ASCII tables using prettytable in Python
29 Aug, 2020 Prettytable is a Python library used to print ASCII tables in an attractive form and to read data from CSV, HTML, or database cursor and output data in ASCII or HTML. We can control many aspects of a table, such as the width of the column padding, the alignment of text, or the table border. In order to be...
[ { "code": null, "e": 28, "s": 0, "text": "\n29 Aug, 2020" }, { "code": null, "e": 321, "s": 28, "text": "Prettytable is a Python library used to print ASCII tables in an attractive form and to read data from CSV, HTML, or database cursor and output data in ASCII or HTML. We can c...
Reader read() method in Java with Examples
07 Feb, 2019 The read() method of Reader Class in Java is used to read a single character from the stream. This method blocks the stream till: It has taken some input from the stream. Some IOException has occurred It has reached the end of the stream while reading. This method is declared as abstract method. It means t...
[ { "code": null, "e": 52, "s": 24, "text": "\n07 Feb, 2019" }, { "code": null, "e": 182, "s": 52, "text": "The read() method of Reader Class in Java is used to read a single character from the stream. This method blocks the stream till:" }, { "code": null, "e": 223, ...
Minimum swaps and K together | Practice | GeeksforGeeks
Given an array arr of n positive integers and a number k. One can apply a swap operation on the array any number of times, i.e choose any two index i and j (i < j) and swap arr[i] , arr[j] . Find the minimum number of swaps required to bring all the numbers less than or equal to k together, i.e. make them a contiguous ...
[ { "code": null, "e": 568, "s": 238, "text": "Given an array arr of n positive integers and a number k. One can apply a swap operation on the array any number of times, i.e choose any two index i and j (i < j) and swap arr[i] , arr[j] . Find the minimum number of swaps required to bring all the numbe...
Vertex Cover Problem | Set 1 (Introduction and Approximate Algorithm)
18 Aug, 2021 A vertex cover of an undirected graph is a subset of its vertices such that for every edge (u, v) of the graph, either ‘u’ or ‘v’ is in the vertex cover. Although the name is Vertex Cover, the set covers all edges of the given graph. Given an undirected graph, the vertex cover problem is to find minimum si...
[ { "code": null, "e": 54, "s": 26, "text": "\n18 Aug, 2021" }, { "code": null, "e": 413, "s": 54, "text": "A vertex cover of an undirected graph is a subset of its vertices such that for every edge (u, v) of the graph, either ‘u’ or ‘v’ is in the vertex cover. Although the name is...
Daemon Thread in Java - GeeksforGeeks
07 Dec, 2021 Daemon thread in Java is a low-priority thread that runs in the background to perform tasks such as garbage collection. Daemon thread in Java is also a service provider thread that provides services to the user thread. Its life depends on the mercy of user threads i.e. when all the user threads die, JVM te...
[ { "code": null, "e": 24050, "s": 24022, "text": "\n07 Dec, 2021" }, { "code": null, "e": 24393, "s": 24050, "text": "Daemon thread in Java is a low-priority thread that runs in the background to perform tasks such as garbage collection. Daemon thread in Java is also a service pro...
Python | Test if tuple is distinct - GeeksforGeeks
03 Nov, 2019 Sometimes, while working with records, we have a problem in which we need to find if all elements of tuple are different. This can have applications in many domains including web development. Let’s discuss certain ways in which this task can be performed. Method #1 : Using loopThis is a brute force way in ...
[ { "code": null, "e": 25647, "s": 25619, "text": "\n03 Nov, 2019" }, { "code": null, "e": 25903, "s": 25647, "text": "Sometimes, while working with records, we have a problem in which we need to find if all elements of tuple are different. This can have applications in many domain...
C# | How to insert the elements of a collection into the List at the specified index - GeeksforGeeks
18 Oct, 2019 List<T>.InsertRange(Int32, IEnumerable<T>) Method is used to insert the elements of a collection into the List<T> at the specified index. Properties of List: It is different from the arrays. A list can be resized dynamically but arrays cannot. List class can accept null as a valid value for reference types...
[ { "code": null, "e": 25882, "s": 25854, "text": "\n18 Oct, 2019" }, { "code": null, "e": 26020, "s": 25882, "text": "List<T>.InsertRange(Int32, IEnumerable<T>) Method is used to insert the elements of a collection into the List<T> at the specified index." }, { "code": nul...
Print Diagonally | Practice | GeeksforGeeks
Give a N * N square matrix, return all the elements of its anti-diagonals from top to bottom. Example 1: Input: N = 2 A = [[1, 2], [3, 4]] Output: 1 2 3 4 Explanation: Topmost anti-diagonal is [[1, ], [ , ]] Next anti-diagonal is [[ , 2], ​ [3, ]...
[ { "code": null, "e": 321, "s": 226, "text": "Give a N * N square matrix, return all the elements of its anti-diagonals from top to bottom. " }, { "code": null, "e": 332, "s": 321, "text": "Example 1:" }, { "code": null, "e": 693, "s": 332, "text": "Input: \nN ...
Python | Pandas PeriodIndex.freq - GeeksforGeeks
20 Aug, 2021 Python is a great language for doing data analysis, primarily because of the fantastic ecosystem of data-centric python packages. Pandas is one of those packages and makes importing and analyzing data much easier. Pandas PeriodIndex.freq attribute returns the time series frequency that is applied on the gi...
[ { "code": null, "e": 24942, "s": 24914, "text": "\n20 Aug, 2021" }, { "code": null, "e": 25156, "s": 24942, "text": "Python is a great language for doing data analysis, primarily because of the fantastic ecosystem of data-centric python packages. Pandas is one of those packages a...
Case Study 1: Customer satisfaction prediction on Olist Brazillian Dataset | by Ashwin Michael | Towards Data Science
Businesses have always tried to keep their customer base engaged and satisfied with the services provided by them. For remaining relevant in the industry, they need to incorporate the latest technological advances into their services. More than a decade back, it was the internet which was completely new and various ind...
[ { "code": null, "e": 994, "s": 172, "text": "Businesses have always tried to keep their customer base engaged and satisfied with the services provided by them. For remaining relevant in the industry, they need to incorporate the latest technological advances into their services. More than a decade b...
Add a vertical slider with matplotlib - GeeksforGeeks
17 May, 2021 Matplotlib not only allows static graphs, but we can also prepare plots that can be modified interactively. For this, we can use the Sliders widget present in the widgets submodule to control the visual properties of your plot. The only difference between horizontal and vertical Sliders being the presence...
[ { "code": null, "e": 25555, "s": 25527, "text": "\n17 May, 2021" }, { "code": null, "e": 25784, "s": 25555, "text": "Matplotlib not only allows static graphs, but we can also prepare plots that can be modified interactively. For this, we can use the Sliders widget present in the...
Compute the value of Quantile Function over F Distribution in R Programming - qf() Function - GeeksforGeeks
25 Jun, 2020 qf() function in R Language is used to compute the value of quantile function over F distribution for a sequence of numeric values. It also creates a density plot of quantile function over F Distribution. Syntax: qf(x, df1, df2) Parameters:x: Numeric Vectordf: Degree of Freedom Example 1: # R Program to co...
[ { "code": null, "e": 24972, "s": 24944, "text": "\n25 Jun, 2020" }, { "code": null, "e": 25177, "s": 24972, "text": "qf() function in R Language is used to compute the value of quantile function over F distribution for a sequence of numeric values. It also creates a density plot ...
Program to check if matrix is singular or not
05 Jul, 2021 A matrix is said to be singular if the determinant of the matrix is 0 otherwise it is non-singular .Examples: Input : 0 0 0 4 5 6 1 2 3 Output : Yes Determinant value of the matrix is 0 (Note first row is 0) Input : 1 0 0 4 5 6 1 2 3 Output : No Determinant value of...
[ { "code": null, "e": 52, "s": 24, "text": "\n05 Jul, 2021" }, { "code": null, "e": 164, "s": 52, "text": "A matrix is said to be singular if the determinant of the matrix is 0 otherwise it is non-singular .Examples: " }, { "code": null, "e": 397, "s": 164, "t...
How to select a drop-down menu option value with Selenium (Python)?
We can select a drop-down menu option value with Selenium webdriver. The Select class in Selenium is used to handle drop-down. In an html document, the drop-down is identified with the <select> tag. Let us see the html structure of a drop-down. For using the methods of Select class we have to import selenium.webdriver....
[ { "code": null, "e": 1386, "s": 1187, "text": "We can select a drop-down menu option value with Selenium webdriver.\nThe Select class in Selenium is used to handle drop-down. In an html document, the drop-down is identified with the <select> tag." }, { "code": null, "e": 1432, "s": 1...
Kotlin Ranges
29 Nov, 2019 In Kotlin, the range is a collection of finite values which is defined by endpoints. The range in Kotlin consists of a start, a stop, and the step. The start and stop are inclusive in the Range and the value of step is by default 1.The range is used with comparable types. There are three ways for creating ...
[ { "code": null, "e": 28, "s": 0, "text": "\n29 Nov, 2019" }, { "code": null, "e": 301, "s": 28, "text": "In Kotlin, the range is a collection of finite values which is defined by endpoints. The range in Kotlin consists of a start, a stop, and the step. The start and stop are incl...
What is the Application Cache and why it is used in HTML5 ?
18 Aug, 2021 The task is to learn about the application cache in HTML5. HTML stands for HyperText Markup Language and it is used to design web pages using a markup language. HTML5 is current or we can also say that it’s the 5th version of HTML. Application Cache in HTML5: The current version of HTML5 introduces applica...
[ { "code": null, "e": 28, "s": 0, "text": "\n18 Aug, 2021" }, { "code": null, "e": 260, "s": 28, "text": "The task is to learn about the application cache in HTML5. HTML stands for HyperText Markup Language and it is used to design web pages using a markup language. HTML5 is curre...
How to replace line breaks with <br> using JavaScript ?
19 Sep, 2021 Given a multiline string and the task is to replace line breaks with <br> tag. Example: Input: `Geeks for Geeks is a computer science portal where people study computer science`Output: “Geeks for Geeks is <br> a computer science portal <br> where people study computer science” To achieve this we have the f...
[ { "code": null, "e": 28, "s": 0, "text": "\n19 Sep, 2021" }, { "code": null, "e": 107, "s": 28, "text": "Given a multiline string and the task is to replace line breaks with <br> tag." }, { "code": null, "e": 116, "s": 107, "text": "Example:" }, { "cod...
Sparse Matrix and its representations | Set 1 (Using Arrays and Linked Lists)
07 Jul, 2022 A matrix is a two-dimensional data object made of m rows and n columns, therefore having total m x n values. If most of the elements of the matrix have 0 value, then it is called a sparse matrix. Why to use Sparse Matrix instead of simple matrix ? Storage: There are lesser non-zero elements than zeros and ...
[ { "code": null, "e": 52, "s": 24, "text": "\n07 Jul, 2022" }, { "code": null, "e": 248, "s": 52, "text": "A matrix is a two-dimensional data object made of m rows and n columns, therefore having total m x n values. If most of the elements of the matrix have 0 value, then it is ca...
matplotlib.pyplot.imshow() in Python
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 imshow() function in pyplot module of matplotlib library is used to display data as an image; i.e. on a 2D r...
[ { "code": null, "e": 52, "s": 24, "text": "\n22 Apr, 2020" }, { "code": null, "e": 247, "s": 52, "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 provides a MA...
Python | Working with .docx module
07 Jul, 2018 Word documents contain formatted text wrapped within three object levels. Lowest level- Run objects, Middle level- Paragraph objects and Highest level- Document object.So, we cannot work with these documents using normal text editors. But, we can manipulate these word documents in python using the python-d...
[ { "code": null, "e": 54, "s": 26, "text": "\n07 Jul, 2018" }, { "code": null, "e": 373, "s": 54, "text": "Word documents contain formatted text wrapped within three object levels. Lowest level- Run objects, Middle level- Paragraph objects and Highest level- Document object.So, we...
PHP | startsWith() and endsWith() Functions
31 Jul, 2021 startsWith() Function The StartsWith() function is used to test whether a string begins with the given string or not. This function is case insensitive and it returns boolean value. This function can be used with Filter function to search the data.Syntax bool startsWith( string, startString ) Parameters: T...
[ { "code": null, "e": 28, "s": 0, "text": "\n31 Jul, 2021" }, { "code": null, "e": 50, "s": 28, "text": "startsWith() Function" }, { "code": null, "e": 283, "s": 50, "text": "The StartsWith() function is used to test whether a string begins with the given strin...
Rock, Paper and Scissor Game using Javascript
06 Jan, 2022 Introduction : Rock, paper, and scissors game is a simple fun game in which both the players have to make a rock, paper, or scissors. It has only two possible outcomes a draw, or a win for one player and a loss for the other player. We will be designing the game using JavaScript where a player will be pla...
[ { "code": null, "e": 52, "s": 24, "text": "\n06 Jan, 2022" }, { "code": null, "e": 68, "s": 52, "text": "Introduction : " }, { "code": null, "e": 792, "s": 68, "text": "Rock, paper, and scissors game is a simple fun game in which both the players have to make ...
Java.util.Arrays.parallelSetAll(), Arrays.setAll() in Java
28 Apr, 2022 Prerequisites : Lambda Expression in Java 8 IntUnaryOperator Interface parallelSetAll and setAll are introduced in Arrays class in java 8. parallelSetAll(): It set all the element in the specified array in parallel by the function which compute each element. Syntax: public static void parallelSetAll(dou...
[ { "code": null, "e": 52, "s": 24, "text": "\n28 Apr, 2022" }, { "code": null, "e": 69, "s": 52, "text": "Prerequisites : " }, { "code": null, "e": 97, "s": 69, "text": "Lambda Expression in Java 8" }, { "code": null, "e": 124, "s": 97, "tex...
Wand save() method in Python
22 Apr, 2020 Whenever we manipulate an image and want to preserve image for further image, we use save() function. save() function saves the image into the file or filename. It saves the final manipulated image in your disk. Syntax : # image manipulation codewand.image.save(file = file_object or filenam...
[ { "code": null, "e": 28, "s": 0, "text": "\n22 Apr, 2020" }, { "code": null, "e": 240, "s": 28, "text": "Whenever we manipulate an image and want to preserve image for further image, we use save() function. save() function saves the image into the file or filename. It saves the f...
Static and Dynamic Memory Allocation in C
23 Apr, 2021 Memory is divided into smaller addressable units called bytes. Assume that these are small boxes as bytes. Each byte has its own address as per the below table.For example: 0, 1, 2, 3, 4, 5, 6, etc. How program uses memory? The Memory is divided into three sections. Heap Memory: It is a part of the main m...
[ { "code": null, "e": 52, "s": 24, "text": "\n23 Apr, 2021" }, { "code": null, "e": 251, "s": 52, "text": "Memory is divided into smaller addressable units called bytes. Assume that these are small boxes as bytes. Each byte has its own address as per the below table.For example: 0...
How to List All Tables in Oracle?
28 Oct, 2021 In this article, we will discuss all the methods to list all tables in the oracle SQL Database. We have three types of a subset of tables available to use as identifiers which in turn help us to sort the required table names. Here, are the following types of table identifiers in the Oracle SQL Database. 1....
[ { "code": null, "e": 28, "s": 0, "text": "\n28 Oct, 2021" }, { "code": null, "e": 124, "s": 28, "text": "In this article, we will discuss all the methods to list all tables in the oracle SQL Database." }, { "code": null, "e": 333, "s": 124, "text": "We have th...
p5.js | point() Function
17 Jan, 2020 The point() function is an inbuilt function in p5.js which is used to draw the point in a given coordinate position. Syntax: point( x, y, [z]) Parameters: This function accept three parameters which are described below x: It is used to set the x-coordinate of point. y: It is used to set the y-coordinate of...
[ { "code": null, "e": 28, "s": 0, "text": "\n17 Jan, 2020" }, { "code": null, "e": 145, "s": 28, "text": "The point() function is an inbuilt function in p5.js which is used to draw the point in a given coordinate position." }, { "code": null, "e": 153, "s": 145, ...
What is a pure functional component in ReactJS ?
02 Jul, 2021 What is a JavaScript function? A JavaScript function is a block of code designed to perform a particular task which is executed when it is called. How React functional components are similar to JavaScript functions? Conceptually, components are like JavaScript functions. A functional component is a JavaSc...
[ { "code": null, "e": 28, "s": 0, "text": "\n02 Jul, 2021" }, { "code": null, "e": 59, "s": 28, "text": "What is a JavaScript function?" }, { "code": null, "e": 175, "s": 59, "text": "A JavaScript function is a block of code designed to perform a particular tas...
Calculate sum of all nodes present in a level for each level of a Tree - GeeksforGeeks
29 Jun, 2021 Given a Generic Tree consisting of N nodes (rooted at 0) where each node is associated with a value, the task for each level of the Tree is to find the sum of all node values present at that level of the tree. Examples: Input: node_number = { 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 }, node_values = { 2, 3, 4, 4, 7, ...
[ { "code": null, "e": 24978, "s": 24950, "text": "\n29 Jun, 2021" }, { "code": null, "e": 25188, "s": 24978, "text": "Given a Generic Tree consisting of N nodes (rooted at 0) where each node is associated with a value, the task for each level of the Tree is to find the sum of all ...
jQuery - Quick Guide
jQuery is a fast and concise JavaScript Library created by John Resig in 2006 with a nice motto: Write less, do more. jQuery simplifies HTML document traversing, event handling, animating, and Ajax interactions for rapid web development. jQuery is a JavaScript toolkit designed to simplify various tasks by writing less ...
[ { "code": null, "e": 2714, "s": 2322, "text": "jQuery is a fast and concise JavaScript Library created by John Resig in 2006 with a nice motto: Write less, do more. jQuery simplifies HTML document traversing, event handling, animating, and Ajax interactions for rapid web development. jQuery is a Jav...
An Introduction to GPU Optimization | by Anuradha Wickramarachchi | Towards Data Science
Most of the tasks that involve heavy computations take time and it becomes further time consuming as the datasets get bigger and bigger. One way of addressing this problem is using threads. In this article, I will be introducing GPU acceleration, how it is done and a simple API for GPU tasks along with a code. To start...
[ { "code": null, "e": 555, "s": 172, "text": "Most of the tasks that involve heavy computations take time and it becomes further time consuming as the datasets get bigger and bigger. One way of addressing this problem is using threads. In this article, I will be introducing GPU acceleration, how it i...
Set JavaScript object values to null?
In order to set object values to null, you need to get all the keys from the object and need to set null. You can use for loop or forEach() loop. Following is the JavaScript code with name records. We will set the object value to null − const object=[ { FirstName:"John" }, { FirstName:"David" },...
[ { "code": null, "e": 1208, "s": 1062, "text": "In order to set object values to null, you need to get all the keys from the object and need to set\nnull. You can use for loop or forEach() loop." }, { "code": null, "e": 1299, "s": 1208, "text": "Following is the JavaScript code wi...
How to remove decimal in MATLAB? - GeeksforGeeks
29 Jul, 2021 In this article, we are going to discuss the “Removal of decimal point” in MATLAB which can be done using sprintf(), fix(), floor(), round() and num2str() functions which are illustrated below. The sprintf() function is used to write formatted data to a string. Syntax: sprintf(format, A) Here, sprintf(form...
[ { "code": null, "e": 24646, "s": 24618, "text": "\n29 Jul, 2021" }, { "code": null, "e": 24840, "s": 24646, "text": "In this article, we are going to discuss the “Removal of decimal point” in MATLAB which can be done using sprintf(), fix(), floor(), round() and num2str() function...
Normal Forms in DBMS - GeeksforGeeks
12 Nov, 2021 Prerequisite – Database normalization and functional dependency concept. Normalization is the process of minimizing redundancy from a relation or set of relations. Redundancy in relation may cause insertion, deletion, and update anomalies. So, it helps to minimize the redundancy in relations. Normal forms ...
[ { "code": null, "e": 30871, "s": 30843, "text": "\n12 Nov, 2021" }, { "code": null, "e": 30944, "s": 30871, "text": "Prerequisite – Database normalization and functional dependency concept." }, { "code": null, "e": 31241, "s": 30944, "text": "Normalization is ...
SortedMap comparator() method in Java with Examples - GeeksforGeeks
08 Jun, 2021 The comparator() method of java.util.SortedMap interface is used to return the comparator used to order the keys in this map, or null if this map uses the natural ordering of its keys.Syntax: public Comparator comparator() Return Value: This method returns the comparator used to order the keys in this ma...
[ { "code": null, "e": 24207, "s": 24179, "text": "\n08 Jun, 2021" }, { "code": null, "e": 24401, "s": 24207, "text": "The comparator() method of java.util.SortedMap interface is used to return the comparator used to order the keys in this map, or null if this map uses the natural ...
Minimum product pair an array of positive Integers - GeeksforGeeks
17 Mar, 2022 Given an array of positive integers. We are required to write a program to print the minimum product of any two numbers of the given array.Examples: Input : 11 8 5 7 5 100 Output : 25 Explanation : The minimum product of any two numbers will be 5 * 5 = 25. Input : 198 76 544 123 154 675 Output : 7448...
[ { "code": null, "e": 26065, "s": 26037, "text": "\n17 Mar, 2022" }, { "code": null, "e": 26216, "s": 26065, "text": "Given an array of positive integers. We are required to write a program to print the minimum product of any two numbers of the given array.Examples: " }, { ...
How to select a random element from array in JavaScript ? - GeeksforGeeks
14 Jan, 2022 The task is to select the random element from the array using JavaScript.Approach 1: Use Math.random() function to get the random number between(0-1, 1 exclusive). Multiply it by the array length to get the numbers between(0-arrayLength). Use Math.floor() to get the index ranging from(0 to arrayLength-1)....
[ { "code": null, "e": 31331, "s": 31303, "text": "\n14 Jan, 2022" }, { "code": null, "e": 31417, "s": 31331, "text": "The task is to select the random element from the array using JavaScript.Approach 1: " }, { "code": null, "e": 31496, "s": 31417, "text": "Use ...
Height of binary tree considering even level leaves only - GeeksforGeeks
27 Sep, 2021 Find the height of the binary tree given that only the nodes on the even levels are considered as the valid leaf nodes. The height of a binary tree is the number of edges between the tree’s root and its furthest leaf. But what if we bring a twist and change the definition of a leaf node. Let us define a va...
[ { "code": null, "e": 26185, "s": 26157, "text": "\n27 Sep, 2021" }, { "code": null, "e": 26611, "s": 26185, "text": "Find the height of the binary tree given that only the nodes on the even levels are considered as the valid leaf nodes. The height of a binary tree is the number o...
p5.js | square() Function - GeeksforGeeks
17 Jan, 2020 The square() function is an inbuilt function in p5.js which is used to draw the square on the screen. A square contains four equal sides and four angles each of 90 degrees. It is the special case of a rectangle where width and height are equal. Syntax: square( x, y, s, tl, tr, br, bl ) Parameters: This fun...
[ { "code": null, "e": 25947, "s": 25919, "text": "\n17 Jan, 2020" }, { "code": null, "e": 26192, "s": 25947, "text": "The square() function is an inbuilt function in p5.js which is used to draw the square on the screen. A square contains four equal sides and four angles each of 90...
Lodash _.entries() Method - GeeksforGeeks
13 Apr, 2021 The _.entries() method is used to create an array of keyed-value pairs for the specified object. If object is a map or set, its entries are returned. Syntax: _.entries(object) Parameters: This method accepts single parameter as mentioned above and described below: object: This parameter holds the object to...
[ { "code": null, "e": 38681, "s": 38653, "text": "\n13 Apr, 2021" }, { "code": null, "e": 38831, "s": 38681, "text": "The _.entries() method is used to create an array of keyed-value pairs for the specified object. If object is a map or set, its entries are returned." }, { ...
LinkedList remove() Method in Java - GeeksforGeeks
23 Nov, 2021 LinkedList as we all know is a way of storing data that contains sets of nodes where each node contains data and address part where address part is responsible for linking of nodes and hence forming a List over which now we can perform operations. Now here we want to remove a node/s using the remove() meth...
[ { "code": null, "e": 26305, "s": 26277, "text": "\n23 Nov, 2021" }, { "code": null, "e": 26641, "s": 26305, "text": "LinkedList as we all know is a way of storing data that contains sets of nodes where each node contains data and address part where address part is responsible for...
Sum of the series 1 + (1+3) + (1+3+5) + (1+3+5+7) + ...... + (1+3+5+7+...+(2n-1))
20 Apr, 2021 Given a positive integer n. The problem is to find the sum of the given series 1 + (1+2) + (1+2+3) + (1+2+3+4) + ...... + (1+2+3+4+...+n), where i-th term in the series is the sum of first i odd natural numbers.Examples: Input : n = 2 Output : 5 (1) + (1+3) = 5 Input : n = 5 Output : 55 (1) + (1+3) + (1...
[ { "code": null, "e": 52, "s": 24, "text": "\n20 Apr, 2021" }, { "code": null, "e": 275, "s": 52, "text": "Given a positive integer n. The problem is to find the sum of the given series 1 + (1+2) + (1+2+3) + (1+2+3+4) + ...... + (1+2+3+4+...+n), where i-th term in the series is th...
Maximum number of prime factors a number can have with exactly x factors
05 Nov, 2021 Given an integer X, denoting the number of factors of a positive integer N can have. The task is to find the maximum number of distinct prime factors the number N can have. Examples: Input: X = 9 Output: 2 Explanation: Some of the possible numbers having 9 factors are: 256: 1, 2, 4, 8, 16, 32, 64, 128, 2...
[ { "code": null, "e": 28, "s": 0, "text": "\n05 Nov, 2021" }, { "code": null, "e": 202, "s": 28, "text": "Given an integer X, denoting the number of factors of a positive integer N can have. The task is to find the maximum number of distinct prime factors the number N can have. " ...
Implementing of strtok() function in C++
12 Dec, 2021 The strtok() function is used in tokenizing a string based on a delimiter. It is present in the header file “string.h” and returns a pointer to the next token if present, if the next token is not present it returns NULL. To get all the tokens the idea is to call this function in a loop. Header File: #inclu...
[ { "code": null, "e": 54, "s": 26, "text": "\n12 Dec, 2021" }, { "code": null, "e": 342, "s": 54, "text": "The strtok() function is used in tokenizing a string based on a delimiter. It is present in the header file “string.h” and returns a pointer to the next token if present, if ...
Find a specific pair in Matrix
30 Jun, 2022 Given an n x n matrix mat[n][n] of integers, find the maximum value of mat(c, d) – mat(a, b) over all choices of indexes such that both c > a and d > b. Example: Input: mat[N][N] = {{ 1, 2, -1, -4, -20 }, { -8, -3, 4, 2, 1 }, { 3, 8, 6, 1, 3 }, { -4, -1, 1, 7, -6 },...
[ { "code": null, "e": 52, "s": 24, "text": "\n30 Jun, 2022" }, { "code": null, "e": 205, "s": 52, "text": "Given an n x n matrix mat[n][n] of integers, find the maximum value of mat(c, d) – mat(a, b) over all choices of indexes such that both c > a and d > b." }, { "code":...
Check if both halves of the string have same set of characters
26 May, 2022 Given a string of lowercase characters only, the task is to check if it is possible to split a string from the middle which will give two halves having the same characters and same frequency of each character. If the length of the given string is ODD then ignore the middle element and check for the rest. E...
[ { "code": null, "e": 52, "s": 24, "text": "\n26 May, 2022" }, { "code": null, "e": 358, "s": 52, "text": "Given a string of lowercase characters only, the task is to check if it is possible to split a string from the middle which will give two halves having the same characters an...
title driver method – Selenium Python
15 May, 2020 Selenium’s Python Module is built to perform automated testing with Python. Selenium Python bindings provides a simple API to write functional/acceptance tests using Selenium WebDriver. To open a webpage using Selenium Python, checkout – Navigating links using get method – Selenium Python. Just being able ...
[ { "code": null, "e": 28, "s": 0, "text": "\n15 May, 2020" }, { "code": null, "e": 767, "s": 28, "text": "Selenium’s Python Module is built to perform automated testing with Python. Selenium Python bindings provides a simple API to write functional/acceptance tests using Selenium ...
Multiple linear regression using ggplot2 in R
24 Jun, 2021 A regression line is basically used in statistical models which help to estimate the relationship between a dependent variable and at least one independent variable. There are two types of regression lines : Single Regression Line. Multiple Regression Lines. In this article, we are going to discuss how to ...
[ { "code": null, "e": 28, "s": 0, "text": "\n24 Jun, 2021" }, { "code": null, "e": 236, "s": 28, "text": "A regression line is basically used in statistical models which help to estimate the relationship between a dependent variable and at least one independent variable. There are...
Find Intersection of all Intervals
11 May, 2021 Given N intervals of the form of [l, r], the task is to find the intersection of all the intervals. An intersection is an interval that lies within all of the given intervals. If no such intersection exists then print -1.Examples: Input: arr[] = {{1, 6}, {2, 8}, {3, 10}, {5, 8}} Output: [5, 6] [5, 6] is ...
[ { "code": null, "e": 54, "s": 26, "text": "\n11 May, 2021" }, { "code": null, "e": 287, "s": 54, "text": "Given N intervals of the form of [l, r], the task is to find the intersection of all the intervals. An intersection is an interval that lies within all of the given intervals...
Reshape Wide DataFrame to Tidy with identifiers using Pandas Melt
02 Feb, 2021 Sometimes we need to reshape the Pandas data frame to perform analysis in a better way. Reshaping plays a crucial role in data analysis. Pandas provide functions like melt and unmelt for reshaping. In this article, we will see what is Pandas Melt and how to use it to reshape wide to Tidy with identifiers. ...
[ { "code": null, "e": 28, "s": 0, "text": "\n02 Feb, 2021" }, { "code": null, "e": 335, "s": 28, "text": "Sometimes we need to reshape the Pandas data frame to perform analysis in a better way. Reshaping plays a crucial role in data analysis. Pandas provide functions like melt and...
Flip Binary Tree
05 Jul, 2022 AGiven a binary tree, the task is to flip the binary tree towards the right direction that is clockwise. See the below examples to see the transformation. In the flip operation, the leftmost node becomes the root of the flipped tree and its parent becomes its right child and the right sibling becomes its l...
[ { "code": null, "e": 52, "s": 24, "text": "\n05 Jul, 2022" }, { "code": null, "e": 207, "s": 52, "text": "AGiven a binary tree, the task is to flip the binary tree towards the right direction that is clockwise. See the below examples to see the transformation." }, { "code...
ReactJS - JSX
As we learned earlier, React JSX is an extension to JavaScript. It enables developer to create virtual DOM using XML syntax. It compiles down to pure JavaScript (React.createElement function calls). Since it compiles to JavaScript, it can be used inside any valid JavaScript code. For example, below codes are perfectly ...
[ { "code": null, "e": 2360, "s": 2033, "text": "As we learned earlier, React JSX is an extension to JavaScript. It enables developer to create virtual DOM using XML syntax. It compiles down to pure JavaScript (React.createElement function calls). Since it compiles to JavaScript, it can be used inside...
Arden's Theorem
Theory of Computation Arden's Theorem is basically used to find out regular expression with properties of a Finite Automaton. The Arden's Theorem is also called Arden's Lemma. It is a mathematical statement. As we know, a language is a set of strings. These sets can be specified by the meaning of some language expressi...
[ { "code": null, "e": 112, "s": 90, "text": "Theory of Computation" }, { "code": null, "e": 585, "s": 112, "text": "Arden's Theorem is basically used to find out regular expression with properties of a Finite Automaton. The Arden's Theorem is also called Arden's Lemma. It is a mat...
VBScript LCase Function
The LCase Function returns the string after converting the entered string into lower case letters. Lcase(String) <!DOCTYPE html> <html> <body> <script language = "vbscript" type = "text/vbscript"> var = "Microsoft VBScript" document.write("Line 1 : " & LCase(var) & "<br />") ...
[ { "code": null, "e": 2179, "s": 2080, "text": "The LCase Function returns the string after converting the entered string into lower case letters." }, { "code": null, "e": 2194, "s": 2179, "text": "Lcase(String)\n" }, { "code": null, "e": 2617, "s": 2194, "text...
Copy Constructor in Java - GeeksforGeeks
17 May, 2021 Prerequisite – Constructors in Java Like C++, Java also supports copy constructor. But, unlike C++, Java doesn’t create a default copy constructor if you don’t write your own. Following is an example Java program that shows a simple use of copy constructor. Java // filename: Main.java class Complex { ...
[ { "code": null, "e": 28950, "s": 28922, "text": "\n17 May, 2021" }, { "code": null, "e": 29127, "s": 28950, "text": "Prerequisite – Constructors in Java Like C++, Java also supports copy constructor. But, unlike C++, Java doesn’t create a default copy constructor if you don’t wri...
Dart - String toUpperCase() Function with Examples - GeeksforGeeks
14 Jul, 2020 The string toUpperCase() method converts all characters of the string into an uppercase letter. The string toUpperCase() function returns the string after converting all characters of the string into the uppercase letter. Syntax: Str.toUpperCase() Parameter: The string toUpperCase() function doesn’t accep...
[ { "code": null, "e": 24010, "s": 23982, "text": "\n14 Jul, 2020" }, { "code": null, "e": 24233, "s": 24010, "text": "The string toUpperCase() method converts all characters of the string into an uppercase letter. The string toUpperCase() function returns the string after converti...
Doing and Reporting a Serial Mediation Model with Two Mediators in R with Lavaan | by Matthieu Renard | Towards Data Science
Doing serial mediation is exciting. Most of the time, it means you know how to run standard mediation or moderation models and are now ready to delve deeper into the world of process models. And an exciting world it is! One can find out so much more using mediation models! This tutorial shows you how to run, interpret,...
[ { "code": null, "e": 446, "s": 172, "text": "Doing serial mediation is exciting. Most of the time, it means you know how to run standard mediation or moderation models and are now ready to delve deeper into the world of process models. And an exciting world it is! One can find out so much more using...
Sorting Algorithm Visualization : Merge Sort - GeeksforGeeks
12 Jul, 2020 The human brain can easily process visuals instead of long codes to understand the algorithms. In this article, a program that program visualizes the Merge sort Algorithm has been implemented. The GUI(Graphical User Interface) is implemented using pygame package in python. Approach: An array of random valu...
[ { "code": null, "e": 24075, "s": 24047, "text": "\n12 Jul, 2020" }, { "code": null, "e": 24268, "s": 24075, "text": "The human brain can easily process visuals instead of long codes to understand the algorithms. In this article, a program that program visualizes the Merge sort Al...
HTML | DOM Input Month Object - GeeksforGeeks
14 Feb, 2022 The Input Month Object in HTML DOM is used to represent an HTML input element with type= “month” attribute. The input element with type= “month” attribute can be accessed by using getElementById() method. Syntax: It is used to access <input> element with type=”month” attribute. document.getElementById("i...
[ { "code": null, "e": 23928, "s": 23900, "text": "\n14 Feb, 2022" }, { "code": null, "e": 24133, "s": 23928, "text": "The Input Month Object in HTML DOM is used to represent an HTML input element with type= “month” attribute. The input element with type= “month” attribute can be a...
Program to check if the points are parallel to X axis or Y axis - GeeksforGeeks
22 Mar, 2022 Given n points, we need to check if these n points are parallel to X axis or Y axis or to No axis. Examples: Input : x[] = {0, 0, 0, 0, 0| y[] = {9, 2, 1, 3, 4} Output : Parallel to Y Axis Input : x[] = {1, 2, 3| y[] = {9, 2, 1} Output : Not Parallel to X or Y Axis Approach To find the p...
[ { "code": null, "e": 25380, "s": 25352, "text": "\n22 Mar, 2022" }, { "code": null, "e": 25479, "s": 25380, "text": "Given n points, we need to check if these n points are parallel to X axis or Y axis or to No axis." }, { "code": null, "e": 25491, "s": 25479, ...
Python | Cloning or Copying a list - GeeksforGeeks
06 Jan, 2022 In this article we will go through various ways of copying or cloning a list in Python. These various ways of copying takes different execution time, so we can compare them on the basis of time. 1. Using slicing technique This is the easiest and the fastest way to clone a list. This method is considered w...
[ { "code": null, "e": 24141, "s": 24113, "text": "\n06 Jan, 2022" }, { "code": null, "e": 24337, "s": 24141, "text": "In this article we will go through various ways of copying or cloning a list in Python. These various ways of copying takes different execution time, so we can com...
Reverse all the words of sentence JavaScript
We are required to write a JavaScript function that takes in a string and returns a new string which has all the words reversed from the original string. For example − If the original string is − "Hello World how is it outside" Then the output should be − "olleH dlroW woH si ti edistuo" Now, let's write the code for th...
[ { "code": null, "e": 1216, "s": 1062, "text": "We are required to write a JavaScript function that takes in a string and returns a new string\nwhich has all the words reversed from the original string." }, { "code": null, "e": 1230, "s": 1216, "text": "For example −" }, { ...
Unity - The Button
In this chapter, we will earn how to insert UI elements into our scene and go about working with them. Let us start off with a Button. To insert a button, right click in the Scene Hierarchy and go to Create → UI → Button. If you do not have an existing Canvas and an EventSystem, Unity will automatically create one for ...
[ { "code": null, "e": 2318, "s": 2215, "text": "In this chapter, we will earn how to insert UI elements into our scene and go about working with them." }, { "code": null, "e": 2588, "s": 2318, "text": "Let us start off with a Button. To insert a button, right click in the Scene Hi...
Get all the Documents of the Collection using PyMongo - GeeksforGeeks
10 Jul, 2020 To get all the Documents of the Collection use find() method. The find() method takes a query object as a parameter if we want to find all documents then pass none in the find() method. To include the field in the result the value of the parameter passed should be 1, if the value is 0 then it will be exclu...
[ { "code": null, "e": 25266, "s": 25238, "text": "\n10 Jul, 2020" }, { "code": null, "e": 25594, "s": 25266, "text": "To get all the Documents of the Collection use find() method. The find() method takes a query object as a parameter if we want to find all documents then pass none...
Skin cancer classification with machine learning | by Nyla Pirani | Towards Data Science
Skin cancer is the most common type of skin cancer is the US. More than 4 million cases of skin cancer are diagnosed in the US a year. This is huge! 4 million people possibly dying a year just from skin cancer. How crazy is that to think about. Now all those people are dying but guess what! About half of those people, ...
[ { "code": null, "e": 307, "s": 172, "text": "Skin cancer is the most common type of skin cancer is the US. More than 4 million cases of skin cancer are diagnosed in the US a year." }, { "code": null, "e": 417, "s": 307, "text": "This is huge! 4 million people possibly dying a yea...