title
stringlengths
3
221
text
stringlengths
17
477k
parsed
listlengths
0
3.17k
How to setup a Web server like Tomcat to test JSP pages?
Apache Tomcat is an open source software implementation of the JavaServer Pages and Servlet technologies and can act as a standalone server for testing JSP and Servlets, and can be integrated with the Apache Web Server. Here are the steps to set up Tomcat on your machine − Download the latest version of Tomcat from htt...
[ { "code": null, "e": 1336, "s": 1062, "text": "Apache Tomcat is an open source software implementation of the JavaServer Pages and Servlet technologies and can act as a standalone server for testing JSP and Servlets, and can be integrated with the Apache Web Server. Here are the steps to set up Tomc...
How to enable Bootstrap tooltip on disabled button ? - GeeksforGeeks
19 Jan, 2022 Button or link elements with disabled class and attribute is not interactive. It means users cannot focus, hover, or click them to trigger a tooltip (or popover) or any functions. Use the following approaches to enable a tooltip on disabled-buttons. Using jQuery Using HTML Using CSS Initializing tooltip: B...
[ { "code": null, "e": 26279, "s": 26251, "text": "\n19 Jan, 2022" }, { "code": null, "e": 26529, "s": 26279, "text": "Button or link elements with disabled class and attribute is not interactive. It means users cannot focus, hover, or click them to trigger a tooltip (or popover) o...
How to create a list of object in Python class - GeeksforGeeks
29 Dec, 2020 We can create list of object in Python by appending class instances to list. By this, every index in the list can point to instance attributes and methods of the class and can access them. If you observe it closely, a list of objects behaves like an array of structures in C. Let’s try to understand it bett...
[ { "code": null, "e": 24550, "s": 24522, "text": "\n29 Dec, 2020" }, { "code": null, "e": 24887, "s": 24550, "text": "We can create list of object in Python by appending class instances to list. By this, every index in the list can point to instance attributes and methods of the c...
Find one extra character in a string - GeeksforGeeks
21 Jul, 2021 Given two strings which are of lengths n and n+1. The second string contains all the character of the first string, but there is one extra character. Your task to find the extra character in the second string.Examples : Input : string strA = "abcd"; string strB = "cbdae"; Output : e string B cont...
[ { "code": null, "e": 26367, "s": 26339, "text": "\n21 Jul, 2021" }, { "code": null, "e": 26589, "s": 26367, "text": "Given two strings which are of lengths n and n+1. The second string contains all the character of the first string, but there is one extra character. Your task to ...
Dictionary Methods in C#
Dictionary is a collection of keys and values in C#. Dictionary<TKey, TValue> is included in the System.Collection.Generics namespace. The following are the methods − Let us see how to add elements into a Dictionary and display the count. Live Demo using System; using System.Collections.Generic; public class Demo { ...
[ { "code": null, "e": 1197, "s": 1062, "text": "Dictionary is a collection of keys and values in C#. Dictionary<TKey, TValue> is included in the System.Collection.Generics namespace." }, { "code": null, "e": 1229, "s": 1197, "text": "The following are the methods −" }, { "...
RxJS - Environment Setup
In this chapter, we are going to install RxJS. To work with RxJS, we need the following setup − NodeJS Npm RxJS package installation It is very easy to install RxJS using npm. You need to have nodejs and npm installed on your system. To verify if NodeJS and npm is installed on your system, try to execute the following ...
[ { "code": null, "e": 1920, "s": 1824, "text": "In this chapter, we are going to install RxJS. To work with RxJS, we need the following setup −" }, { "code": null, "e": 1927, "s": 1920, "text": "NodeJS" }, { "code": null, "e": 1931, "s": 1927, "text": "Npm" }...
Shell Script to Take a Screenshot - GeeksforGeeks
15 Apr, 2021 Sometimes we need to capture the screen for later. There are various ways to perform this task: one is achieved by using the shortcut key present in the system, and the other is by using some command-line tools. Here we are going to understand those command-line tools. Before starting the command line tool...
[ { "code": null, "e": 24015, "s": 23987, "text": "\n15 Apr, 2021" }, { "code": null, "e": 24285, "s": 24015, "text": "Sometimes we need to capture the screen for later. There are various ways to perform this task: one is achieved by using the shortcut key present in the system, an...
Count Binary Substrings in C++
Suppose we have a string s, we have to find the count of contiguous substrings that have the same number of 0's and 1's, and all the 0's and all the 1's in these substrings are grouped consecutively. If substrings occur multiple times are counted the number of times they occur. So, if the input is like "11001100", then...
[ { "code": null, "e": 1341, "s": 1062, "text": "Suppose we have a string s, we have to find the count of contiguous substrings that have the same number of 0's and 1's, and all the 0's and all the 1's in these substrings are grouped consecutively. If substrings occur multiple times are counted the nu...
OpenCV - Face Detection using Camera
The following program demonstrates how to detect faces using system camera and display it using JavaFX window. import java.awt.image.BufferedImage; import java.awt.image.DataBufferByte; import java.awt.image.WritableRaster; import java.io.FileNotFoundException; import java.io.IOException; import javafx.application.Ap...
[ { "code": null, "e": 3115, "s": 3004, "text": "The following program demonstrates how to detect faces using system camera and display it using JavaFX window." }, { "code": null, "e": 7429, "s": 3115, "text": "import java.awt.image.BufferedImage;\nimport java.awt.image.DataBufferB...
Kibana - Timelion
Timelion, also called as timeline is yet another visualization tool which is mainly used for time based data analysis. To work with timeline, we need to use simple expression language which will help us connect to the index and also perform calculations on the data to get the results we need. Timelion is used when you ...
[ { "code": null, "e": 2399, "s": 2105, "text": "Timelion, also called as timeline is yet another visualization tool which is mainly used for time based data analysis. To work with timeline, we need to use simple expression language which will help us connect to the index and also perform calculations...
Bash program to check if the Number is a Prime or not
Bash also known as GNU bash is a command language and unix shell script is a command line interpreter for operating system. It was designed by Brian Fox and was a free software which replaced Bourne shell. It first released in 1989 and some became go to for login shell for linux based operating systems like macOS, Linu...
[ { "code": null, "e": 1406, "s": 1062, "text": "Bash also known as GNU bash is a command language and unix shell script is a command line interpreter for operating system. It was designed by Brian Fox and was a free software which replaced Bourne shell. It first released in 1989 and some became go to...
Python | Get sum of tuples having same first value - GeeksforGeeks
14 Feb, 2019 Given a list of tuple, the task is to sum the tuples having same first value. Examples: Input: [(1, 13), (2, 190), (3, 82), (1, 12)] Output: [(1, 25), (2, 190), (3, 82)] Input: [(1, 13), (1, 190), (3, 25), (1, 12)] Output: [(1, 215), (3, 25)] Let’s discuss the different ways we can do this task. Method ...
[ { "code": null, "e": 24212, "s": 24184, "text": "\n14 Feb, 2019" }, { "code": null, "e": 24290, "s": 24212, "text": "Given a list of tuple, the task is to sum the tuples having same first value." }, { "code": null, "e": 24300, "s": 24290, "text": "Examples:" ...
Python | Pandas Index.shape - GeeksforGeeks
20 Feb, 2019 Pandas Index is an immutable ndarray implementing an ordered, sliceable set. It is the basic object which stores the axis labels for all pandas objects. Pandas Index.shape attribute return a tuple of the shape of the underlying data in the given Index object. Syntax: Index.shape Parameter : None Returns : ...
[ { "code": null, "e": 24212, "s": 24184, "text": "\n20 Feb, 2019" }, { "code": null, "e": 24365, "s": 24212, "text": "Pandas Index is an immutable ndarray implementing an ordered, sliceable set. It is the basic object which stores the axis labels for all pandas objects." }, { ...
Python - How to convert this while loop to for loop?
Usin count() function in itertools module gives an iterator of evenly spaced values. The function takes two parameters. start is by default 0 and step is by default 1. Using defaults will generate infinite iterator. Use break to terminate loop. import itertools percentNumbers = [ ] finish = "n" num = "0" for x in itert...
[ { "code": null, "e": 1307, "s": 1062, "text": "Usin count() function in itertools module gives an iterator of evenly spaced values. The function takes two parameters. start is by default 0 and step is by default 1. Using defaults will generate infinite iterator. Use break to terminate loop." }, ...
VBA - Programming Charts
Using VBA, you can generate charts based on certain criteria. Let us take a look at it using an example. Step 1 − Enter the data against which the graph has to be generated. Step 2 − Create 3 buttons - one to generate a bar graph, another to generate a pie chart, and another to generate a column chart. Step 3 − Develop...
[ { "code": null, "e": 2040, "s": 1935, "text": "Using VBA, you can generate charts based on certain criteria. Let us take a look at it using an example." }, { "code": null, "e": 2109, "s": 2040, "text": "Step 1 − Enter the data against which the graph has to be generated." }, ...
Ansible - Playbooks
In this chapter, we will learn about Playbooks in Ansible. Playbooks are the files where Ansible code is written. Playbooks are written in YAML format. YAML stands for Yet Another Markup Language. Playbooks are one of the core features of Ansible and tell Ansible what to execute. They are like a to-do list for Ansible ...
[ { "code": null, "e": 1850, "s": 1791, "text": "In this chapter, we will learn about Playbooks in Ansible." }, { "code": null, "e": 2142, "s": 1850, "text": "Playbooks are the files where Ansible code is written. Playbooks are written in YAML format. YAML stands for Yet Another Ma...
Customer Case Study: Building an end-to-end Speech Recognition model in PyTorch with AssemblyAI | by Ashley Binford | Towards Data Science
This post was written by Michael Nguyen, Machine Learning Research Engineer at AssemblyAI, and Niko Laskaris at Comet.ml. AssemblyAI uses Comet to log, visualize, and understand their model development pipeline. Deep Learning has changed the game in speech recognition with the introduction of end-to-end models. These m...
[ { "code": null, "e": 384, "s": 172, "text": "This post was written by Michael Nguyen, Machine Learning Research Engineer at AssemblyAI, and Niko Laskaris at Comet.ml. AssemblyAI uses Comet to log, visualize, and understand their model development pipeline." }, { "code": null, "e": 990, ...
How to search for element in a List in Java?
Let us first create a String array: String arr[] = { "One", "Two", "Three", "Four", "Five" }; Now convert the above array to List: ArrayList<String> arrList = new ArrayList<String>(Arrays.asList(arr)); Sort the collection: Collections.sort(arrList); Now, find the elements “Four” in the list. We will get the index at wh...
[ { "code": null, "e": 1098, "s": 1062, "text": "Let us first create a String array:" }, { "code": null, "e": 1156, "s": 1098, "text": "String arr[] = { \"One\", \"Two\", \"Three\", \"Four\", \"Five\" };" }, { "code": null, "e": 1193, "s": 1156, "text": "Now con...
JavaScript Array.isArray()
The Array.isArray() method of JavaScript is used to determine whether an object is an array or not. The syntax is as follows − Array.isArray(ob) Above, the ob parameter is the object to be tested. Let us now implement the Array.isArray() method in JavaScript − Live Demo <!DOCTYPE html> <html> <body> <h2>Ranking Poi...
[ { "code": null, "e": 1162, "s": 1062, "text": "The Array.isArray() method of JavaScript is used to determine whether an object is an array or not." }, { "code": null, "e": 1189, "s": 1162, "text": "The syntax is as follows −" }, { "code": null, "e": 1207, "s": 118...
How to hide legend with Plotly Express and Plotly in Python? - GeeksforGeeks
19 Dec, 2021 In this article, we will learn How to hide legend with Plotly Express and Plotly. Here we will discuss two different methods for hiding legend in plotly and plotly express, using two different examples for each to make it more clear. Syntax: For legend: fig.update_traces(showlegend=False) fig.update(layout...
[ { "code": null, "e": 25555, "s": 25527, "text": "\n19 Dec, 2021" }, { "code": null, "e": 25789, "s": 25555, "text": "In this article, we will learn How to hide legend with Plotly Express and Plotly. Here we will discuss two different methods for hiding legend in plotly and plotly...
Check if given number is perfect square - GeeksforGeeks
12 Feb, 2022 Given a number, check if it is a perfect square or not. Examples : Input : 2500 Output : Yes Explanation: 2500 is a perfect square. 50 * 50 = 2500 Input : 2555 Output : No Approach: Take the floor()ed square root of the number.Multiply the square root twice.Use boolean equal operator to verify if the p...
[ { "code": null, "e": 26610, "s": 26582, "text": "\n12 Feb, 2022" }, { "code": null, "e": 26667, "s": 26610, "text": "Given a number, check if it is a perfect square or not. " }, { "code": null, "e": 26679, "s": 26667, "text": "Examples : " }, { "code":...
Data pretty printer (pprint) in Python
Python has the ability to properly format the content of a print method using a special method called pretty print or pprint. For example when we read a content of an url which is in the form of json, the content will be printed as single line which is hard to read or comprehend. But if we apply pretty print, python gi...
[ { "code": null, "e": 1427, "s": 1062, "text": "Python has the ability to properly format the content of a print method using a special method called pretty print or pprint. For example when we read a content of an url which is in the form of json, the content will be printed as single line which is ...
Creating Choropleth Map Using GeoPandas — Irish Wind Energy Dataset | by Saeed Misaghian | Towards Data Science
In my previous article [1] I discussed Irish wind energy penetration within the electricity network . In that article, I reported figures representing the change in the number of wind turbines in each country over the past few years. Below, I will go through the steps involved in creating your own choropleth map for vi...
[ { "code": null, "e": 527, "s": 172, "text": "In my previous article [1] I discussed Irish wind energy penetration within the electricity network . In that article, I reported figures representing the change in the number of wind turbines in each country over the past few years. Below, I will go thro...
Find current weather of any city using OpenWeathermap API in Python - GeeksforGeeks
09 Aug, 2021 The OpenWeatherMap is a service that provides weather data, including current weather data, forecasts, and historical data to the developers of web services and mobile applications. It provides an API with JSON, XML, and HTML endpoints and a limited free usage tier. Making more than 60 calls per minute req...
[ { "code": null, "e": 25923, "s": 25895, "text": "\n09 Aug, 2021" }, { "code": null, "e": 26105, "s": 25923, "text": "The OpenWeatherMap is a service that provides weather data, including current weather data, forecasts, and historical data to the developers of web services and mo...
Difference between Compile Time Errors and Runtime Errors in C Program
Error or exception is something that refers to the interruption of code execution due to which the expected outcome could not be attained to the end-user.On the basis of the event when an error is generated or identified we can classify them as Compile time error and runtime error. The following are the important diffe...
[ { "code": null, "e": 1345, "s": 1062, "text": "Error or exception is something that refers to the interruption of code execution due to which the expected outcome could not be attained to the end-user.On the basis of the event when an error is generated or identified we can classify them as Compile ...
How to inverse a matrix using NumPy - GeeksforGeeks
18 Aug, 2020 The inverse of a matrix is just a reciprocal of the matrix as we do in normal arithmetic for a single number which is used to solve the equations to find the value of unknown variables. The inverse of a matrix is that matrix which when multiplied with the original matrix will give as an identity matrix. Th...
[ { "code": null, "e": 25178, "s": 25150, "text": "\n18 Aug, 2020" }, { "code": null, "e": 25686, "s": 25178, "text": "The inverse of a matrix is just a reciprocal of the matrix as we do in normal arithmetic for a single number which is used to solve the equations to find the value...
How to replace an element of an ArrayList in Java?
You can replace an element of an ArrayList using the set() method of the Collections class. This method accepts two parameters an integer parameter indicating the index of the element to be replaced and an element to replace with. Live Demo import java.util.ArrayList; public class ArrayListSample { public static v...
[ { "code": null, "e": 1293, "s": 1062, "text": "You can replace an element of an ArrayList using the set() method of the Collections class. This method accepts two parameters an integer parameter indicating the index of the element to be replaced and an element to replace with." }, { "code": ...
Bootstrap - Wells
A well is a container in <div> that causes the content to appear sunken or an inset effect on the page. To create a well, simply wrap the content that you would like to appear in the well with a <div> containing the class of .well. The following example shows a default well − <div class = "well">Hi, am in well !!</div>...
[ { "code": null, "e": 3608, "s": 3331, "text": "A well is a container in <div> that causes the content to appear sunken or an inset effect on the page. To create a well, simply wrap the content that you would like to appear in the well with a <div> containing the class of .well. The following example...
Find parent of given node in a Binary Tree with given postorder traversal - GeeksforGeeks
22 Jun, 2021 Given two integers N and K where N denotes the height of a binary tree, the task is to find the parent of the node with value K in a binary tree whose postorder traversal is first natural numbers For N = 3, the Tree will be - 7 / \ 3 6 / \ / \ 1 2 4 5 Examples: Input...
[ { "code": null, "e": 25368, "s": 25340, "text": "\n22 Jun, 2021" }, { "code": null, "e": 25549, "s": 25368, "text": "Given two integers N and K where N denotes the height of a binary tree, the task is to find the parent of the node with value K in a binary tree whose postorder tr...
Nested collection filter with JavaScript
Suppose, we have an array of nested objects like this − const arr = [{ id: 1, legs:[{ carrierName:'Pegasus' }] }, { id: 2, legs:[{ carrierName: 'SunExpress' }, { carrierName: 'SunExpress' }] }, { id: 3, legs:[{ carrierName: 'Pegasus' }, { carrierName: 'S...
[ { "code": null, "e": 1118, "s": 1062, "text": "Suppose, we have an array of nested objects like this −" }, { "code": null, "e": 1403, "s": 1118, "text": "const arr = [{\n id: 1,\n legs:[{\n carrierName:'Pegasus'\n }]\n},\n{\n id: 2,\n legs:[{\n carrierName: 'S...
Assembly program to transfer the status of switches - GeeksforGeeks
30 Sep, 2019 Problem – Write an assembly language program in 8085 of interfacing between 8085 and 8255. 8 switches are connected at port A. Transfer the status of these switches into port B where LEDs are connected. Example – Input port is A and output port is B. Algorithm – Construct the control word registerInput the...
[ { "code": null, "e": 24780, "s": 24752, "text": "\n30 Sep, 2019" }, { "code": null, "e": 24983, "s": 24780, "text": "Problem – Write an assembly language program in 8085 of interfacing between 8085 and 8255. 8 switches are connected at port A. Transfer the status of these switche...
How to remove all objects except one or few in R?
We can use rm remove all or few objects. < x>-rnorm(100,0.5) < y>-1:100 < z>-rpois(100,5) < a>-rep(1:5,20) To remove all objects > rm(list=ls()) ls() character(0) To remove all except a > rm(list=setdiff(ls(), "a")) > ls() [1] "a" To remove all except x and a > rm(list=ls()[! ls() %in% c("x","a")]) ls() [1] "a" "x"
[ { "code": null, "e": 1103, "s": 1062, "text": "We can use rm remove all or few objects." }, { "code": null, "e": 1169, "s": 1103, "text": "< x>-rnorm(100,0.5)\n< y>-1:100\n< z>-rpois(100,5)\n< a>-rep(1:5,20)" }, { "code": null, "e": 1191, "s": 1169, "text": "T...
Calculate the Floor and Ceiling values in R Programming - floor() and ceiling() Function - GeeksforGeeks
03 Jun, 2020 floor() function in R Language returns the largest integer that is smaller than or equal to value passed to it as argument(i.e : rounds downs to the nearest integer). Syntax: floor(x) Parameter:x: Value to be rounded off Example 1: # R program to calculate floor value # Using floor() method answer1 <- ...
[ { "code": null, "e": 25496, "s": 25468, "text": "\n03 Jun, 2020" }, { "code": null, "e": 25663, "s": 25496, "text": "floor() function in R Language returns the largest integer that is smaller than or equal to value passed to it as argument(i.e : rounds downs to the nearest intege...
Bash Scripting - Else If Statement - GeeksforGeeks
19 Dec, 2021 In this article, we will discuss how to write a bash script for the Else If statement. Conditional statements: The statements that perform specific functions based on certain conditions are called conditional statements. In bash scripting, we have several conditional statements like IF, IF-ELSE, IF-ELSE-IF...
[ { "code": null, "e": 24632, "s": 24604, "text": "\n19 Dec, 2021" }, { "code": null, "e": 24719, "s": 24632, "text": "In this article, we will discuss how to write a bash script for the Else If statement." }, { "code": null, "e": 25025, "s": 24719, "text": "Con...
How to pass a 2D array as a parameter in C?
A 2-D array can be easily passed as a parameter to a function in C. A program that demonstrates this when both the array dimensions are specified globally is given as follows. Live Demo #include <stdio.h> const int R = 4; const int C = 3; void func(int a[R][C]) { int i, j; for (i = 0; i < R; i++) for (j = 0; ...
[ { "code": null, "e": 1238, "s": 1062, "text": "A 2-D array can be easily passed as a parameter to a function in C. A program that demonstrates this when both the array dimensions are specified globally is given as follows." }, { "code": null, "e": 1249, "s": 1238, "text": " Live ...
A Deep Learning Approach in Predicting the Next Word(s) | by Kamil Mysiak | Towards Data Science
In this tutorial, we will walk through the process of building a deep learning model used to predict the next word(s) following a seed phrase. For example, we’ll ask the computer to predict the next 10 words after we have typed “The candidates are”. Although cutting-edge models used in your smartphones to assist with s...
[ { "code": null, "e": 421, "s": 171, "text": "In this tutorial, we will walk through the process of building a deep learning model used to predict the next word(s) following a seed phrase. For example, we’ll ask the computer to predict the next 10 words after we have typed “The candidates are”." },...
How to check if two given line segments intersect? - GeeksforGeeks
21 Oct, 2021 Given two line segments (p1, q1) and (p2, q2), find if the given line segments intersect with each other.Before we discuss solution, let us define notion of orientation. Orientation of an ordered triplet of points in the plane can be –counterclockwise –clockwise –collinear The following diagram shows diff...
[ { "code": null, "e": 34203, "s": 34175, "text": "\n21 Oct, 2021" }, { "code": null, "e": 34478, "s": 34203, "text": "Given two line segments (p1, q1) and (p2, q2), find if the given line segments intersect with each other.Before we discuss solution, let us define notion of orient...
Neural Net from scratch (using Numpy) | by Sanjay.M | Towards Data Science
This post is about building a shallow NeuralNetowrk(nn) from scratch (with just 1 hidden layer) for a classification problem using numpy library in Python and also compare the performance against the LogisticRegression (using scikit learn). Building a nn from scratch helps in understanding how nn works in the back-end ...
[ { "code": null, "e": 413, "s": 172, "text": "This post is about building a shallow NeuralNetowrk(nn) from scratch (with just 1 hidden layer) for a classification problem using numpy library in Python and also compare the performance against the LogisticRegression (using scikit learn)." }, { ...
Check if two Nodes are Cousins | Practice | GeeksforGeeks
Given the binary Tree of and two-node values. Check whether the two-node values are cousins of each other or not. Example 1: Input: 1 / \ 2 3 a = 2, b = 3 Output: 0 Example 2: Input: 1 / \ 2 3 / \ 5 4 a = 5, b = 4 Output: 1 Explanation: Here, nodes 5 and 4...
[ { "code": null, "e": 352, "s": 238, "text": "Given the binary Tree of and two-node values. Check whether the two-node values are cousins of each other or not." }, { "code": null, "e": 363, "s": 352, "text": "Example 1:" }, { "code": null, "e": 424, "s": 363, "...
Prototype - escapeHTML() Method
This method converts HTML special characters to their entity equivalents. string.escapeHTML(); Returns a string. <html> <head> <title>Prototype examples</title> <script type = "text/javascript" src = "/javascript/prototype.js"></script> <script> function showResult() { ...
[ { "code": null, "e": 2135, "s": 2061, "text": "This method converts HTML special characters to their entity equivalents." }, { "code": null, "e": 2157, "s": 2135, "text": "string.escapeHTML();\n" }, { "code": null, "e": 2175, "s": 2157, "text": "Returns a stri...
Create a Horizontal Navigation Bar with CSS
To create a horizontal navigation bar, set the <li> elements as inline. You can try to run the following code to create horizontal navigation bar Live Demo <!DOCTYPE html> <html> <head> <style> ul { list-style-type: none; margin: 0; padding: 0; } ....
[ { "code": null, "e": 1134, "s": 1062, "text": "To create a horizontal navigation bar, set the <li> elements as inline." }, { "code": null, "e": 1208, "s": 1134, "text": "You can try to run the following code to create horizontal navigation bar" }, { "code": null, "e":...
ASP.NET WP - Delete Database Data
In this chapter, we will be covering how to delete an existing database record. This topic is similar to the previous chapter except that − instead of updating the record, we will delete it. Both deleting and updating processes are almost the same, except that deleting is simpler. This example will also contain two web...
[ { "code": null, "e": 2613, "s": 2285, "text": "In this chapter, we will be covering how to delete an existing database record. This topic is similar to the previous chapter except that − instead of updating the record, we will delete it. Both deleting and updating processes are almost the same, exce...
PyQt5 - QFormLayout Class
QFormLayout is a convenient way to create two column form, where each row consists of an input field associated with a label. As a convention, the left column contains the label and the right column contains an input field. Mainly three overloads of addRow() method addLayout() are commonly used. addRow(QLabel, QWidget)...
[ { "code": null, "e": 2260, "s": 1963, "text": "QFormLayout is a convenient way to create two column form, where each row consists of an input field associated with a label. As a convention, the left column contains the label and the right column contains an input field. Mainly three overloads of add...
ConvertDecimal to equivalent 32-bit unsigned integer in C#
To convert the value of the specified Decimal to the equivalent 32-bit unsigned integer, the code is as follows − Live Demo using System; public class Demo { public static void Main() { Decimal val = 0.001m; Console.WriteLine("Decimal value = "+val); uint res = Decimal.ToUInt32(val); Console...
[ { "code": null, "e": 1176, "s": 1062, "text": "To convert the value of the specified Decimal to the equivalent 32-bit unsigned integer, the code is as follows −" }, { "code": null, "e": 1187, "s": 1176, "text": " Live Demo" }, { "code": null, "e": 1435, "s": 1187,...
Import module in Python
In this article, we will learn about all the methods by which we can import modules in Python 3.x. Or earlier. The import statement is used to include all the dependencies/modules needed to execute the code. import < module name > import math print(math.log10(100)) 2.0 from <module name> import <function name> from mat...
[ { "code": null, "e": 1270, "s": 1062, "text": "In this article, we will learn about all the methods by which we can import modules in Python 3.x. Or earlier. The import statement is used to include all the dependencies/modules needed to execute the code." }, { "code": null, "e": 1293, ...
How to pass an image from one activity another activity in Android?
This example demonstrates how to do I pass an image from one Activity in android. Step 1 − Create a new project in Android Studio, go to File ⇒ New Project and fill all required details to create a new project. Step 2 − Add the following code to res/layout/activity_main.xml. <?xml version="1.0" encoding="utf-8"?> <Rela...
[ { "code": null, "e": 1144, "s": 1062, "text": "This example demonstrates how to do I pass an image from one Activity in android." }, { "code": null, "e": 1273, "s": 1144, "text": "Step 1 − Create a new project in Android Studio, go to File ⇒ New Project and fill all required deta...
Array Copy in Java
Array in java can be copied to another array using the following ways. Using variable assignment. This method has side effects as changes to the element of an array reflects on both the places. To prevent this side effect following are the better ways to copy the array elements. Using variable assignment. This method h...
[ { "code": null, "e": 1133, "s": 1062, "text": "Array in java can be copied to another array using the following ways." }, { "code": null, "e": 1342, "s": 1133, "text": "Using variable assignment. This method has side effects as changes to the element of an array reflects on both ...
Apache Presto - contains(x,element)
presto:default> select contains(array[1,2],5) as array_contains; array_contains ---------------- false 46 Lectures 3.5 hours Arnab Chakraborty 23 Lectures 1.5 hours Mukund Kumar Mishra 16 Lectures 1 hours Nilay Mehta 52 Lectures 1.5 hours Bigdata Enginee...
[ { "code": null, "e": 2072, "s": 2006, "text": "presto:default> select contains(array[1,2],5) as array_contains; " }, { "code": null, "e": 2119, "s": 2072, "text": " array_contains \n---------------- \n false \n" }, { "code": null, "e": 2154, "s": 2119, "tex...
Read and Write to an excel file using Python openpyxl module
Python provides openpyxl module for operating with Excel files. How to create Excel files, how to write, read etc. can be implemented by this module. For installing openpyxl module, we can write this command in command prompt pip install openpyxl import openpyxl my_wb = openpyxl.Workbook() my_sheet = my_wb.active my_s...
[ { "code": null, "e": 1126, "s": 1062, "text": "Python provides openpyxl module for operating with Excel files." }, { "code": null, "e": 1212, "s": 1126, "text": "How to create Excel files, how to write, read etc. can be implemented by this module." }, { "code": null, ...
Text Summarization Using Deep Neural Networks | by Shivam Duseja | Towards Data Science
The amount of textual data being produced every day is increasing rapidly both in terms of complexity as well as volume. Social Media, News articles, emails, text messages (the list goes on..), generate massive information and it becomes cumbersome to go through lengthy text materials (and boring too!). Thankfully with...
[ { "code": null, "e": 676, "s": 172, "text": "The amount of textual data being produced every day is increasing rapidly both in terms of complexity as well as volume. Social Media, News articles, emails, text messages (the list goes on..), generate massive information and it becomes cumbersome to go ...
AWK - Time Functions
AWK has the following built-in time functions − This function returns the current time of the day as the number of seconds since the Epoch (1970-01-01 00:00:00 UTC on POSIX systems). [jerry]$ awk 'BEGIN { print "Number of seconds since the Epoch = " systime() }' On executing this code, you get the following result −...
[ { "code": null, "e": 1905, "s": 1857, "text": "AWK has the following built-in time functions −" }, { "code": null, "e": 2040, "s": 1905, "text": "This function returns the current time of the day as the number of seconds since the Epoch (1970-01-01 00:00:00 UTC on POSIX systems)....
AWT Graphics2D Class
The Graphics2D class extends the Graphics class to provide more sophisticated control over geometry, coordinate transformations, color management, and text layout. Following is the declaration for java.awt.Graphics2D class: public abstract class Graphics2D extends Graphics Graphics2D() Constructs a new Graphics2D o...
[ { "code": null, "e": 1911, "s": 1747, "text": "The Graphics2D class extends the Graphics class to provide more sophisticated control over geometry, coordinate transformations, color management, and text layout." }, { "code": null, "e": 1971, "s": 1911, "text": "Following is the d...
Create database in Cassandra - GeeksforGeeks
28 Apr, 2020 In this article, we are going to discuss how to create the database in Cassandra. so, for better understanding you can read “Introduction to Cassandra” article before creating a database in Cassandra. Step-1: login into cqlshyou can log in into the cqlsh using Cassandra default credential. Now, here before...
[ { "code": null, "e": 24196, "s": 24168, "text": "\n28 Apr, 2020" }, { "code": null, "e": 24397, "s": 24196, "text": "In this article, we are going to discuss how to create the database in Cassandra. so, for better understanding you can read “Introduction to Cassandra” article bef...
How to Load the Content of a Google Document in Python | by Angelica Lo Duca | Towards Data Science
It may happen that you have a document stored as a Google Doc in Google Drive and you want to load its content dynamically into a Python pandas DataFrame for further processing. First of all, you need to access the Google Cloud Platform and create a new project, say MyProject. Then you must select the created project i...
[ { "code": null, "e": 349, "s": 171, "text": "It may happen that you have a document stored as a Google Doc in Google Drive and you want to load its content dynamically into a Python pandas DataFrame for further processing." }, { "code": null, "e": 665, "s": 349, "text": "First of...
Time Series Forecasting with Graph Convolutional Neural Network | by Marco Cerliani | Towards Data Science
Time Series forecasting tasks can be carried out following different approaches. The most classical is based on statistical and autoregressive methods. More tricky are the algorithms based on boosting and ensemble where we have to produce a good amount of useful handmade features with rolling periods. On the other side...
[ { "code": null, "e": 645, "s": 172, "text": "Time Series forecasting tasks can be carried out following different approaches. The most classical is based on statistical and autoregressive methods. More tricky are the algorithms based on boosting and ensemble where we have to produce a good amount of...
C program to implement Adjacency Matrix of a given Graph - GeeksforGeeks
21 May, 2020 Given a undirected Graph of N vertices 1 to N and M edges in form of 2D array arr[][] whose every row consists of two numbers X and Y which denotes that there is a edge between X and Y, the task is to write C program to create Adjacency Matrix of the given Graph. Examples: Input: N = 5, M = 4, arr[][] = { ...
[ { "code": null, "e": 24641, "s": 24613, "text": "\n21 May, 2020" }, { "code": null, "e": 24905, "s": 24641, "text": "Given a undirected Graph of N vertices 1 to N and M edges in form of 2D array arr[][] whose every row consists of two numbers X and Y which denotes that there is a...
Image Data Analysis Using Python: | by Yassine Hamdaoui | Towards Data Science
Introduction: A Little Bit About Pixel Observe Basic Properties of Image Greyscale Use Logical Operator To Process Pixel Values Masking Image Processing Computers store images as a mosaic of tiny squares. This is like the ancient art form of tile mosaic, or the melting bead kits kids play with today. Now, if these squa...
[ { "code": null, "e": 210, "s": 171, "text": "Introduction: A Little Bit About Pixel" }, { "code": null, "e": 244, "s": 210, "text": "Observe Basic Properties of Image" }, { "code": null, "e": 254, "s": 244, "text": "Greyscale" }, { "code": null, "e...
XSD - Numeric Data Types
Numeric data types are used to represent numbers in XML documents. The <xs:decimal> data type is used to represent numeric values. It supports decimal numbers up to 18 digits. Element declaration in XSD − <xs:element name = "score" type = "xs:decimal"/> Element usage in XML − <score>9.12</score> The <xs:integer> data...
[ { "code": null, "e": 1771, "s": 1704, "text": "Numeric data types are used to represent numbers in XML documents." }, { "code": null, "e": 1880, "s": 1771, "text": "The <xs:decimal> data type is used to represent numeric values. It supports decimal numbers up to 18 digits." }, ...
Minimax Algorithm in Game Theory (Alpha-Beta Pruning) in C++
Aplha-Beta pruning is a optimization technique used in minimax algorithm. The idea benind this algorithm is cut off the branches of game tree which need not to be evaluated as better move exists already. This algorithm introduces two new fields − Alpha − This is best value(maximum) that maximizer player can guaratee at...
[ { "code": null, "e": 1266, "s": 1062, "text": "Aplha-Beta pruning is a optimization technique used in minimax algorithm. The idea benind this algorithm is cut off the branches of game tree which need not to be evaluated as better move exists already." }, { "code": null, "e": 1309, "s...
Search Pattern (KMP-Algorithm) | Practice | GeeksforGeeks
Given two strings, one is a text string, txt and other is a pattern string, pat. The task is to print the indexes of all the occurences of pattern string in the text string. For printing, Starting Index of a string should be taken as 1. Example 1: Input: txt = "batmanandrobinarebat", pat = "bat" Output: 1 18 Explanati...
[ { "code": null, "e": 475, "s": 238, "text": "Given two strings, one is a text string, txt and other is a pattern string, pat. The task is to print the indexes of all the occurences of pattern string in the text string. For printing, Starting Index of a string should be taken as 1." }, { "cod...
Detecting contours in an image using OpenCV
In this program, we will detect contours in an image. Contours can be explained simply as a curve joining all the continuous points having the same color or intensity. The contours are a useful tool for shape analysis and object detection and recognition. Step 1: Import OpenCV. Step 2: Import matplotlib. Step 3: Read t...
[ { "code": null, "e": 1318, "s": 1062, "text": "In this program, we will detect contours in an image. Contours can be explained simply as a curve joining all the continuous points having the same color or intensity. The contours are a useful tool for shape analysis and object detection and recognitio...
Difference between volatile and transient in java
A volatile keyword is used in a multithreading environment where two threads reading and writing the same variable simultaneously. The volatile keyword flushes the changes directly to the main memory instead of the CPU cache. On the other hand, the transient keyword is used during serialization. Fields that are marked...
[ { "code": null, "e": 1289, "s": 1062, "text": "A volatile keyword is used in a multithreading environment where two threads reading and writing the same variable simultaneously. The volatile keyword flushes the changes directly to the main memory instead of the CPU cache. " }, { "code": null...
Perform the given queries on the rooted tree - GeeksforGeeks
05 Oct, 2021 Given a rooted tree and not necessarily binary. The tree contains N nodes, labeled 1 to N. You are given the tree in the form of an array A[1..N] of size N. A[i] denotes label of the parent of node labeled i. For clarity, you may assume that the tree satisfies the following conditions. The root of the tre...
[ { "code": null, "e": 25084, "s": 25056, "text": "\n05 Oct, 2021" }, { "code": null, "e": 25372, "s": 25084, "text": "Given a rooted tree and not necessarily binary. The tree contains N nodes, labeled 1 to N. You are given the tree in the form of an array A[1..N] of size N. A[i] d...
ReactJS Blueprint Popover Component - GeeksforGeeks
08 Apr, 2022 BlueprintJS is a React-based UI toolkit for the web. This library is very optimized and popular for building interfaces that are complex data-dense for desktop applications. Popover Component provides a way for users to display floating content next to a target element. We can use the following approach in...
[ { "code": null, "e": 26557, "s": 26529, "text": "\n08 Apr, 2022" }, { "code": null, "e": 26731, "s": 26557, "text": "BlueprintJS is a React-based UI toolkit for the web. This library is very optimized and popular for building interfaces that are complex data-dense for desktop app...
Goal Seek in Excel - GeeksforGeeks
15 May, 2021 Goal Seek is a tool available in MS EXCEL to determine or calculate any input value based on the formula and the output/resultant value. To find the Goal seek : Go to Data Tab in MS EXCEL.In the Data Tools group, you will find a What-if analysis.Click on What if analysis, and you will find Goal seek. Go ...
[ { "code": null, "e": 26289, "s": 26261, "text": "\n15 May, 2021" }, { "code": null, "e": 26427, "s": 26289, "text": "Goal Seek is a tool available in MS EXCEL to determine or calculate any input value based on the formula and the output/resultant value. " }, { "code": nul...
Calculating Areas Of Different Shapes Using Python - GeeksforGeeks
07 Jul, 2021 We are going to make a Python program for Calculating Areas Of some mathematical Shapes. Example: Input: shape name = "Rectangle" length = 10 breadth = 15 Output: Area: 150 Input: shape name = "Square" side = 10 Output: Area: 100 Approach: In this program, We will ask the user to inpu...
[ { "code": null, "e": 25867, "s": 25839, "text": "\n07 Jul, 2021" }, { "code": null, "e": 25956, "s": 25867, "text": "We are going to make a Python program for Calculating Areas Of some mathematical Shapes." }, { "code": null, "e": 25965, "s": 25956, "text": "E...
C# Program For Finding Intersection Point Of Two Linked Lists - GeeksforGeeks
14 Dec, 2021 There are two singly linked lists in a system. By some programming error, the end node of one of the linked lists got linked to the second list, forming an inverted Y-shaped list. Write a program to get the point where two linked lists merge. Above diagram shows an example with two linked lists having 15 ...
[ { "code": null, "e": 26253, "s": 26225, "text": "\n14 Dec, 2021" }, { "code": null, "e": 26497, "s": 26253, "text": "There are two singly linked lists in a system. By some programming error, the end node of one of the linked lists got linked to the second list, forming an inverte...
GATE | GATE-IT-2004 | Question 12 - GeeksforGeeks
19 Nov, 2018 Consider a system with 2 level caches. Access times of Level 1 cache, Level 2 cache and main memory are 1 ns, 10ns, and 500 ns, respectively. The hit rates of Level 1 and Level 2 caches are 0.8 and 0.9, respectively. What is the average access time of the system ignoring the search time within the cache?(A...
[ { "code": null, "e": 25573, "s": 25545, "text": "\n19 Nov, 2018" }, { "code": null, "e": 26088, "s": 25573, "text": "Consider a system with 2 level caches. Access times of Level 1 cache, Level 2 cache and main memory are 1 ns, 10ns, and 500 ns, respectively. The hit rates of Leve...
Coding Sheet in COBOL - GeeksforGeeks
06 Sep, 2021 Every language needs an environment or platform to write codes. For example, in Java, we use notepad to write codes then compile them to run. Similarly, COBOL requires a coding sheet to write codes. COBOL is a business-oriented high-level language. It was developed for business, finance, and administrative...
[ { "code": null, "e": 24607, "s": 24579, "text": "\n06 Sep, 2021" }, { "code": null, "e": 25345, "s": 24607, "text": "Every language needs an environment or platform to write codes. For example, in Java, we use notepad to write codes then compile them to run. Similarly, COBOL requ...
ML | Introduction to Kernel PCA - GeeksforGeeks
26 Aug, 2019 PRINCIPAL COMPONENT ANALYSIS: is a tool which is used to reduce the dimension of the data. It allows us to reduce the dimension of the data without much loss of information. PCA reduces the dimension by finding a few orthogonal linear combinations (principal components) of the original variables with the l...
[ { "code": null, "e": 25615, "s": 25587, "text": "\n26 Aug, 2019" }, { "code": null, "e": 26502, "s": 25615, "text": "PRINCIPAL COMPONENT ANALYSIS: is a tool which is used to reduce the dimension of the data. It allows us to reduce the dimension of the data without much loss of in...
Program to check the number is Palindrome or not - GeeksforGeeks
14 Aug, 2021 Given an integer N, write a program that returns true if the given number is a palindrome, else return false. Examples: Input: N = 2002 Output: true Input: N = 1234 Output: false Approach: A simple method for this problem is to first reverse digits of n, then compare the reverse of n with n. If bot...
[ { "code": null, "e": 26118, "s": 26090, "text": "\n14 Aug, 2021" }, { "code": null, "e": 26240, "s": 26118, "text": "Given an integer N, write a program that returns true if the given number is a palindrome, else return false. Examples: " }, { "code": null, "e": 2630...
Lexicographical concatenation of all substrings of a string - GeeksforGeeks
28 May, 2021 Given a string, find concatenation of all substrings in lexicographic order.Examples: Input : s = “abc” Output : aababcbbcc The substrings of s in lexicographic order are “a”, “b”, “c”, “ab”, “abc”, “bc”. Concatenation of substrings is “a”+”ab”+”abc”+”b”+”bc”+”c” = “aababcbbcc”.Input : s = “cba” Output :...
[ { "code": null, "e": 25321, "s": 25293, "text": "\n28 May, 2021" }, { "code": null, "e": 25409, "s": 25321, "text": "Given a string, find concatenation of all substrings in lexicographic order.Examples: " }, { "code": null, "e": 25642, "s": 25409, "text": "In...
How many types of layouts are there in Bootstrap ? - GeeksforGeeks
20 Aug, 2021 Containers are the most basic layout element in Bootstrap and they are needed while using the default grid system. There are two major layouts for Bootstrap that are Fluid Layout and Fixed Layout. Fluid-layout: This uses the bootstrap .container-fluid class for the layout. This layout uses proportional va...
[ { "code": null, "e": 26889, "s": 26861, "text": "\n20 Aug, 2021" }, { "code": null, "e": 27087, "s": 26889, "text": "Containers are the most basic layout element in Bootstrap and they are needed while using the default grid system. There are two major layouts for Bootstrap that a...
Difference between cerr and clog - GeeksforGeeks
18 Oct, 2021 In C++ input and output are performed in the form of a sequence of bytes or more commonly known as streams. cerr and clog both are associated with the standard C error output stream stderr but the cerr is the unbuffered standard error stream whereas the clog is the buffered standard error stream. In this a...
[ { "code": null, "e": 24396, "s": 24368, "text": "\n18 Oct, 2021" }, { "code": null, "e": 24799, "s": 24396, "text": "In C++ input and output are performed in the form of a sequence of bytes or more commonly known as streams. cerr and clog both are associated with the standard C e...
Construct a BST from given postorder traversal using Stack - GeeksforGeeks
01 Jul, 2021 Given postorder traversal of a binary search tree, construct the BST.For example, 1. If the given traversal is {1, 7, 5, 50, 40, 10}, then following tree should be constructed and root of the tree should be returned. 10 / \ 5 40 / \ \ 1 7 50 Input : 1 7 5 50 40 10 Output ...
[ { "code": null, "e": 24835, "s": 24807, "text": "\n01 Jul, 2021" }, { "code": null, "e": 25054, "s": 24835, "text": "Given postorder traversal of a binary search tree, construct the BST.For example, 1. If the given traversal is {1, 7, 5, 50, 40, 10}, then following tree should be...
CSS Outline - GeeksforGeeks
21 Oct, 2021 The outline CSS shorthand property allows drawing a line around the element, outside the border. It is used to set all the properties of the outline in a single declaration. CSS outline properties can be categorized into 4 types, namely, Outline-style, Outline-color, Outline-width & Outline-offset. We will...
[ { "code": null, "e": 27655, "s": 27627, "text": "\n21 Oct, 2021" }, { "code": null, "e": 28042, "s": 27655, "text": "The outline CSS shorthand property allows drawing a line around the element, outside the border. It is used to set all the properties of the outline in a single de...
Place K-knights such that they do not attack each other in C++
In this problem, we are given three integer value K, N, M. our task is to place K knights in an NxM chessboard such that no two knights attack each other. There can be cases with 0 valid ways and also cases with multiple valid ways. You need to print all valid cases. Knight is a chess piece that moves two moves ahead a...
[ { "code": null, "e": 1330, "s": 1062, "text": "In this problem, we are given three integer value K, N, M. our task is to place K knights in an NxM chessboard such that no two knights attack each other. There can be cases with 0 valid ways and also cases with multiple valid ways. You need to print al...
HTML method Attribute - GeeksforGeeks
19 Aug, 2021 The HTML <form> method Attribute is used to specify the HTTP method used to send data while submitting the form. There are two kinds of HTTP methods, which are GET and POST. The method attribute can be used with the <form> element. Attribute Values: GET: In the GET method, after the submission of the form...
[ { "code": null, "e": 27282, "s": 27254, "text": "\n19 Aug, 2021" }, { "code": null, "e": 27533, "s": 27282, "text": "The HTML <form> method Attribute is used to specify the HTTP method used to send data while submitting the form. There are two kinds of HTTP methods, which are GET...
Calendar Functions in Python | Set 1( calendar(), month(), isleap()...) - GeeksforGeeks
22 Jan, 2022 Python defines an inbuilt module “calendar” which handles operations related to the calendar.Operations on the calendar : 1. calendar(year, w, l, c):- This function displays the year, the width of characters, no. of lines per week, and column separations.2. firstweekday() :- This function returns the first...
[ { "code": null, "e": 26479, "s": 26451, "text": "\n22 Jan, 2022" }, { "code": null, "e": 26828, "s": 26479, "text": "Python defines an inbuilt module “calendar” which handles operations related to the calendar.Operations on the calendar : 1. calendar(year, w, l, c):- This functio...
Java Program to Convert Integer Values into Binary - GeeksforGeeks
09 Feb, 2022 Given an integer in Java, your task is to write a Java program to convert this given integer into a binary number. Example: Input: = 45 Output: = 101101 Input: = 32 Output: = 100000 Integers: Integers are numbers whose base value is 10. The Integer or int data type is a 32-bit signed two’s complement i...
[ { "code": null, "e": 25225, "s": 25197, "text": "\n09 Feb, 2022" }, { "code": null, "e": 25340, "s": 25225, "text": "Given an integer in Java, your task is to write a Java program to convert this given integer into a binary number." }, { "code": null, "e": 25350, ...
C | Advanced Pointer | Question 3 - GeeksforGeeks
28 Jun, 2021 #include <stdio.h>int main(){ int a[5] = {1,2,3,4,5}; int *ptr = (int*)(&a+1); printf("%d %d", *(a+1), *(ptr-1)); return 0;} (A) 2 5(B) Garbage Value(C) Compiler Error(D) Segmentation FaultAnswer: (A)Explanation: The program prints “2 5′′. Since compilers convert array operations in pointers be...
[ { "code": null, "e": 25711, "s": 25683, "text": "\n28 Jun, 2021" }, { "code": "#include <stdio.h>int main(){ int a[5] = {1,2,3,4,5}; int *ptr = (int*)(&a+1); printf(\"%d %d\", *(a+1), *(ptr-1)); return 0;}", "e": 25848, "s": 25711, "text": null }, { "code": nu...
Convert a floating point number to string in C - GeeksforGeeks
06 Nov, 2019 Write a C function ftoa() that converts a given floating-point number or a double to a string. Use of standard library functions for direct conversion is not allowed. The following is prototype of ftoa(). The article provides insight of conversion of C double to string. ftoa(n, res, afterpoint) n ...
[ { "code": null, "e": 26555, "s": 26527, "text": "\n06 Nov, 2019" }, { "code": null, "e": 26826, "s": 26555, "text": "Write a C function ftoa() that converts a given floating-point number or a double to a string. Use of standard library functions for direct conversion is not allow...
Scala Map retain() method with example - GeeksforGeeks
26 Jul, 2019 The retain() method is utilized to retain all the pairs of the map that satisfies the stated condition. Method Definition: def retain(p: (A, B) => Boolean): Map.this.type Return Type: It returns all the “key-value” pairs of the map which satisfies the stated predicate. Example #1: // Scala program of retai...
[ { "code": null, "e": 25151, "s": 25123, "text": "\n26 Jul, 2019" }, { "code": null, "e": 25255, "s": 25151, "text": "The retain() method is utilized to retain all the pairs of the map that satisfies the stated condition." }, { "code": null, "e": 25322, "s": 25255,...
Mirror of a point through a 3 D plane - GeeksforGeeks
28 Apr, 2021 Given a point(x, y, z) in 3-D and coefficients of the equation of a plane, the task is to find the mirror image of that point through the given plane. Examples: Input: a = 1, b = -2, c = 0, d = 0, x = -1, y = 3, z = 4 Output: x3 = 1.7999999999999998, y3 = -2.5999999999999996, z3 = 4.0Input: a = 2, b = -1...
[ { "code": null, "e": 26829, "s": 26801, "text": "\n28 Apr, 2021" }, { "code": null, "e": 26992, "s": 26829, "text": "Given a point(x, y, z) in 3-D and coefficients of the equation of a plane, the task is to find the mirror image of that point through the given plane. Examples: "...
How to convert pandas DataFrame into SQL in Python? - GeeksforGeeks
02 Sep, 2021 In this article, we aim to convert the data frame into a SQL database and then try to read the content from the SQL database using SQL queries or through a table To deal with SQL in python we need to install the sqlalchemy library using the below-mentioned command by running it in cmd: pip install sqlalch...
[ { "code": null, "e": 25473, "s": 25445, "text": "\n02 Sep, 2021" }, { "code": null, "e": 25635, "s": 25473, "text": "In this article, we aim to convert the data frame into a SQL database and then try to read the content from the SQL database using SQL queries or through a table" ...
Multiple calculations in 4 processes using fork() - GeeksforGeeks
10 Nov, 2017 Write a program to create 4 processes: parent process and its child process which perform various tasks : Parent process count the frequency of a number 1st child sort the array 2nd child find total even number(s) in a given array 3rd child calculate the sum of even numbers in an array Example – Input : ...
[ { "code": null, "e": 25851, "s": 25823, "text": "\n10 Nov, 2017" }, { "code": null, "e": 25957, "s": 25851, "text": "Write a program to create 4 processes: parent process and its child process which perform various tasks :" }, { "code": null, "e": 26004, "s": 2595...
How to Import another TypeScript Files ? - GeeksforGeeks
02 Mar, 2020 Some times we want some facility that we have been used in our previous projects, in that situation we can’t rewrite that script again we can simply import that by making that file exportable. To import other TypeScript files into an existing TypeScript file we should know the concept of modules. Starting ...
[ { "code": null, "e": 26081, "s": 26053, "text": "\n02 Mar, 2020" }, { "code": null, "e": 26482, "s": 26081, "text": "Some times we want some facility that we have been used in our previous projects, in that situation we can’t rewrite that script again we can simply import that by...
byte Keyword in C# - GeeksforGeeks
22 Jun, 2020 Keywords are the words in a language that are used for some internal process or represent some predefined actions. byte is a keyword that is used to declare a variable which can store an unsigned value range from 0 to 255. It is an alias of System.Byte. byte keyword occupies 1 byte (8 bits) in the memory. ...
[ { "code": null, "e": 25547, "s": 25519, "text": "\n22 Jun, 2020" }, { "code": null, "e": 25801, "s": 25547, "text": "Keywords are the words in a language that are used for some internal process or represent some predefined actions. byte is a keyword that is used to declare a vari...
How to create an Asynchronous function in Javascript? - GeeksforGeeks
17 Dec, 2021 JavaScript is a single-threaded and synchronous language. The code is executed in order one at a time. But Javascript may appear to be asynchronous in some situations. Example: HTML <!DOCTYPE html><html lang="en"><head> <meta charset="utf-8" /> <title></title></head><body> <div id="message"></div...
[ { "code": null, "e": 26373, "s": 26345, "text": "\n17 Dec, 2021" }, { "code": null, "e": 26541, "s": 26373, "text": "JavaScript is a single-threaded and synchronous language. The code is executed in order one at a time. But Javascript may appear to be asynchronous in some situati...
How to add Items in ListBox in C#? - GeeksforGeeks
11 Jul, 2019 In Windows Forms, ListBox control is used to show multiple elements in a list, from which a user can select one or more elements and the elements are generally displayed in multiple columns. In ListBox, you can add items in the ListBox using Items Property. This property allows you to get a reference to th...
[ { "code": null, "e": 25331, "s": 25303, "text": "\n11 Jul, 2019" }, { "code": null, "e": 25853, "s": 25331, "text": "In Windows Forms, ListBox control is used to show multiple elements in a list, from which a user can select one or more elements and the elements are generally dis...
Node.js date-and-time Date.subtract() Method - GeeksforGeeks
07 Oct, 2021 The date-and-time Date.subtract() method is used to subtract the two date objects. Required Module: Install the module by npm or used it locally. By using npm. npm install date-and-time --save By using CDN link. <script src="/path/to/date-and-time.min.js"></script> Syntax: const subtract(date1, date2) Para...
[ { "code": null, "e": 26267, "s": 26239, "text": "\n07 Oct, 2021" }, { "code": null, "e": 26350, "s": 26267, "text": "The date-and-time Date.subtract() method is used to subtract the two date objects." }, { "code": null, "e": 26413, "s": 26350, "text": "Require...
Count of non-empty sequences of a String - GeeksforGeeks
20 Dec, 2021 Given a string s, the task is to find the number of possible non-empty sequences of letters that can be made.Examples: Input: "AAB" Output: 8 Explanation: 1) A 2) AA 3) AAB 4) AB 5) ABA 6) B 7) BA 8) BAA Total 8 possibilities Input: "AAABBC" Output: 188 Approach: There are two possibilities either take ...
[ { "code": null, "e": 26249, "s": 26221, "text": "\n20 Dec, 2021" }, { "code": null, "e": 26368, "s": 26249, "text": "Given a string s, the task is to find the number of possible non-empty sequences of letters that can be made.Examples:" }, { "code": null, "e": 26505, ...
Creating an Empty PDF Document using Java - GeeksforGeeks
13 Jul, 2021 For creating a PDF document using Java, we need to know the packages/libraries which are necessary for writing the code. So, for creating a PDF doc, we will be using the iText 7 library. To know how to install this library in your workspace, you can follow this link. To create an empty PDF Document, we fir...
[ { "code": null, "e": 25225, "s": 25197, "text": "\n13 Jul, 2021" }, { "code": null, "e": 25493, "s": 25225, "text": "For creating a PDF document using Java, we need to know the packages/libraries which are necessary for writing the code. So, for creating a PDF doc, we will be usi...
Iterative program to count leaf nodes in a Binary Tree - GeeksforGeeks
14 May, 2021 Given a binary tree, count leaves in the tree without using recursion. A node is a leaf node if both left and right children of it are NULL. Example Tree Leaves count for the above tree is 3. The idea is to use level order traversal. During traversal, if we find a node whose left and right children a...
[ { "code": null, "e": 26281, "s": 26253, "text": "\n14 May, 2021" }, { "code": null, "e": 26422, "s": 26281, "text": "Given a binary tree, count leaves in the tree without using recursion. A node is a leaf node if both left and right children of it are NULL." }, { "code": ...
ChronoLocalDate isEqual() method in Java with Examples - GeeksforGeeks
29 Apr, 2019 The isEqual() method of ChronoLocalDate interface in Java checks if this date is equal to the specified date or not. Syntax: public boolean isEqual(ChronoLocalDate date2) Parameter: This method accept a single mandatory parameter date2 the other date to compare to and not null. Return Value: The function ...
[ { "code": null, "e": 25659, "s": 25631, "text": "\n29 Apr, 2019" }, { "code": null, "e": 25776, "s": 25659, "text": "The isEqual() method of ChronoLocalDate interface in Java checks if this date is equal to the specified date or not." }, { "code": null, "e": 25784, ...
Matplotlib.pyplot.rcdefaults() in Python - GeeksforGeeks
19 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. There are various plots which can be used in Pyplot are Line Plot, Contour, Histogram, Scatter, 3D Plot, etc. Th...
[ { "code": null, "e": 25561, "s": 25533, "text": "\n19 Apr, 2020" }, { "code": null, "e": 25866, "s": 25561, "text": "Matplotlib is a library in Python and it is numerical – mathematical extension for NumPy library. Pyplot is a state-based interface to a Matplotlib module which pr...
Practice Questions on Time Complexity Analysis - GeeksforGeeks
09 Jun, 2021 Prerequisite: Analysis of Algorithms1. What is the time, space complexity of the following code: CPP int a = 0, b = 0;for (i = 0; i < N; i++) { a = a + rand();}for (j = 0; j < M; j++) { b = b + rand();} Options: O(N * M) time, O(1) spaceO(N + M) time, O(N + M) spaceO(N + M) time, O(1) spaceO(N * ...
[ { "code": null, "e": 25481, "s": 25453, "text": "\n09 Jun, 2021" }, { "code": null, "e": 25580, "s": 25481, "text": "Prerequisite: Analysis of Algorithms1. What is the time, space complexity of the following code: " }, { "code": null, "e": 25584, "s": 25580, ...
MySQL ON vs USING?
In general, we use ON in MySQL. In Joins, we use ON in a set of columns. USING is useful when both the tables share a column of the exact same name on which they join. Example of On. Creating our first table. mysql> CREATE table ForeignTableDemo -> ( -> Id int, -> Name varchar(100), - > FK int - > ); Que...
[ { "code": null, "e": 1230, "s": 1062, "text": "In general, we use ON in MySQL. In Joins, we use ON in a set of columns. USING is useful when both the tables share a column of the exact same name on which they join." }, { "code": null, "e": 1245, "s": 1230, "text": "Example of On....
Opening and Closing Files in Python
Until now, you have been reading and writing to the standard input and output. Now, we will see how to use actual data files. Python provides basic functions and methods necessary to manipulate files by default. You can do most of the file manipulation using a file object. Before you can read or write a file, you have ...
[ { "code": null, "e": 1188, "s": 1062, "text": "Until now, you have been reading and writing to the standard input and output. Now, we will see how to use actual data files." }, { "code": null, "e": 1336, "s": 1188, "text": "Python provides basic functions and methods necessary to...
Convert min Heap to max Heap - GeeksforGeeks
20 Oct, 2021 Given array representation of min Heap, convert it to max Heap in O(n) time. Example : Input: arr[] = [3 5 9 6 8 20 10 12 18 9] 3 / \ 5 9 / \ / \ 6 8 20 10 / \ / 12 18 9 Output: arr[] = [20 18 10 12 9 9 3 5 6 8] OR [any Max Heap formed from...
[ { "code": null, "e": 24205, "s": 24177, "text": "\n20 Oct, 2021" }, { "code": null, "e": 24294, "s": 24205, "text": "Given array representation of min Heap, convert it to max Heap in O(n) time. Example : " }, { "code": null, "e": 24629, "s": 24294, "text": "I...