title stringlengths 3 221 | text stringlengths 17 477k | parsed listlengths 0 3.17k |
|---|---|---|
How to Use axis=0 and axis=1 in Pandas? | 19 Dec, 2021
In this article, we will discuss how to use axis=0 and axis=1 in pandas using Python.
Sometimes we need to do operations only on rows, and sometimes only on columns, in such situations, we specify the axis parameter. In this article, let’s see a few examples to know when and how to use the axis parameter. ... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n19 Dec, 2021"
},
{
"code": null,
"e": 138,
"s": 52,
"text": "In this article, we will discuss how to use axis=0 and axis=1 in pandas using Python."
},
{
"code": null,
"e": 462,
"s": 138,
"text": "Sometimes we need t... |
Merge k sorted arrays | Set 2 (Different Sized Arrays) | 21 Jun, 2022
Given k sorted arrays of possibly different sizes, merge them and print the sorted output.Examples:
Input: k = 3
arr[][] = { {1, 3},
{2, 4, 6},
{0, 9, 10, 11}} ;
Output: 0 1 2 3 4 6 9 10 11
Input: k = 2
arr[][] = { {1, 3, 20},
{2, 4, 6}}... | [
{
"code": null,
"e": 54,
"s": 26,
"text": "\n21 Jun, 2022"
},
{
"code": null,
"e": 155,
"s": 54,
"text": "Given k sorted arrays of possibly different sizes, merge them and print the sorted output.Examples: "
},
{
"code": null,
"e": 386,
"s": 155,
"text": "Inpu... |
Python MySQL – Create Database | 04 Jul, 2021
Python Database API ( Application Program Interface ) is the Database interface for the standard Python. This standard is adhered to by most Python Database interfaces. There are various Database servers supported by Python Database such as MySQL, GadFly, mSQL, PostgreSQL, Microsoft SQL Server 2000, Inform... | [
{
"code": null,
"e": 54,
"s": 26,
"text": "\n04 Jul, 2021"
},
{
"code": null,
"e": 505,
"s": 54,
"text": "Python Database API ( Application Program Interface ) is the Database interface for the standard Python. This standard is adhered to by most Python Database interfaces. There... |
How to check whether a checkbox is checked in jQuery? | 03 Aug, 2021
prop() and is() method are the two way by which we can check whether a checkbox is checked in jQuery or not.
prop(): This method provides an simple way to track down the status of checkboxes. It works well in every condition because every checkbox has checked property which specifies its checked or uncheck... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n03 Aug, 2021"
},
{
"code": null,
"e": 137,
"s": 28,
"text": "prop() and is() method are the two way by which we can check whether a checkbox is checked in jQuery or not."
},
{
"code": null,
"e": 346,
"s": 137,
"text"... |
PostgreSQL – BETWEEN operator | 28 Aug, 2020
PostgreSQL BETWEEN operator is used to match a value against a range of values.
Syntax: value BETWEEN low AND high;
Or,
Syntax: value >= low and value;
The BETWEEN operator is used generally with WHERE clause with association with SELECT, INSERT, UPDATE or DELETE statement.For the sake of this article we... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n28 Aug, 2020"
},
{
"code": null,
"e": 108,
"s": 28,
"text": "PostgreSQL BETWEEN operator is used to match a value against a range of values."
},
{
"code": null,
"e": 182,
"s": 108,
"text": "Syntax: value BETWEEN low ... |
LL(1) Parsing Algorithm | 29 Apr, 2021
Prerequisite — construction of LL(1) parsing table.LL(1) parsing is a top-down parsing method in the syntax analysis phase of compiler design. Required components for LL(1) parsing are input string, a stack, parsing table for given grammar, and parser. Here, we discuss a parser that determines that given ... | [
{
"code": null,
"e": 54,
"s": 26,
"text": "\n29 Apr, 2021"
},
{
"code": null,
"e": 558,
"s": 54,
"text": "Prerequisite — construction of LL(1) parsing table.LL(1) parsing is a top-down parsing method in the syntax analysis phase of compiler design. Required components for LL(1) ... |
Matcher groupCount() method in Java with Examples | 26 Nov, 2018
The groupCount() method of Matcher Class is used to get the number of capturing groups in this matcher’s pattern.
Syntax:
public int groupCount()
Parameters: This method do not takes any parameter.
Return Value: This method returns the number of capturing groups in this matcher’s pattern.
Below examples i... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n26 Nov, 2018"
},
{
"code": null,
"e": 142,
"s": 28,
"text": "The groupCount() method of Matcher Class is used to get the number of capturing groups in this matcher’s pattern."
},
{
"code": null,
"e": 150,
"s": 142,
"... |
ImageView in Android using Jetpack Compose | 25 Feb, 2021
Images, Graphics, and vectors attract so many users as they tell so much information in a very informative way. ImageView in Android is used to display different types of images from drawable or in the form of Bitmaps. In this article, we will take a look at the implementation of an ImageView in Android us... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n25 Feb, 2021"
},
{
"code": null,
"e": 357,
"s": 28,
"text": "Images, Graphics, and vectors attract so many users as they tell so much information in a very informative way. ImageView in Android is used to display different types of imag... |
Insert N elements in a Linked List one after other at middle position | 09 Jun, 2022
Given an array of N elements. The task is to insert the given elements at the middle position in the linked list one after another. Each insert operation should take O(1) time complexity.Examples:
Input: arr[] = {1, 2, 3, 4, 5} Output: 1 -> 3 -> 5 -> 4 -> 2 -> NULL 1 -> NULL 1 -> 2 -> NULL 1 -> 3 -> 2 ->... | [
{
"code": null,
"e": 53,
"s": 25,
"text": "\n09 Jun, 2022"
},
{
"code": null,
"e": 252,
"s": 53,
"text": "Given an array of N elements. The task is to insert the given elements at the middle position in the linked list one after another. Each insert operation should take O(1) tim... |
How to create reflection effect using HTML and CSS ? | 10 Jul, 2020
The reflection effect is one of the coolest effects that one can use in his/her website. It is a type of informal effect so it is highly recommended not to use it any professional project. You can use it in your personal projects and maybe your portfolio to show your creativity. In this effect, we try to i... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n10 Jul, 2020"
},
{
"code": null,
"e": 411,
"s": 28,
"text": "The reflection effect is one of the coolest effects that one can use in his/her website. It is a type of informal effect so it is highly recommended not to use it any professi... |
turtle.backward() method in Python | 16 Jul, 2020
The turtle module provides turtle graphics primitives, in both object-oriented and procedure-oriented ways. Because it uses Tkinter for the underlying graphics, it needs a version of Python installed with Tk support.
The turtle.backward() method is used to move the turtle backward by the value of the argum... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n16 Jul, 2020"
},
{
"code": null,
"e": 245,
"s": 28,
"text": "The turtle module provides turtle graphics primitives, in both object-oriented and procedure-oriented ways. Because it uses Tkinter for the underlying graphics, it needs a ver... |
Overview of Data Science | 26 Apr, 2022
Data science is the study of data. Like biological sciences is a study of biology, physical sciences, it’s the study of physical reactions. Data is real, data has real properties, and we need to study them if we’re going to work on them. Data Science involves data and some signs.
It is a process, not an e... | [
{
"code": null,
"e": 54,
"s": 26,
"text": "\n26 Apr, 2022"
},
{
"code": null,
"e": 336,
"s": 54,
"text": "Data science is the study of data. Like biological sciences is a study of biology, physical sciences, it’s the study of physical reactions. Data is real, data has real proper... |
Unused variable in for loop in Python | 01 Oct, 2020
Prerequisite: Python For loops
The for loop has a loop variable that controls the iteration. Not all the loops utilize the loop variable inside the process carried out in the loop.
Example:
Python3
# i,j - loop variable # loop-1print("Using the loop variable inside :") # used loop variablefor i in rang... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n01 Oct, 2020"
},
{
"code": null,
"e": 59,
"s": 28,
"text": "Prerequisite: Python For loops"
},
{
"code": null,
"e": 211,
"s": 59,
"text": "The for loop has a loop variable that controls the iteration. Not all the loo... |
IntStream mapToObj() in Java | 06 Dec, 2018
IntStream mapToObj() returns an object-valued Stream consisting of the results of applying the given function.
Note : IntStream mapToObj() is a intermediate operation. These operations are always lazy. Intermediate operations are invoked on a Stream instance and after they finish their processing, they giv... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n06 Dec, 2018"
},
{
"code": null,
"e": 163,
"s": 52,
"text": "IntStream mapToObj() returns an object-valued Stream consisting of the results of applying the given function."
},
{
"code": null,
"e": 398,
"s": 163,
"te... |
Pyspark – Converting JSON to DataFrame | 29 Jun, 2021
In this article, we are going to convert JSON String to DataFrame in Pyspark.
Method 1: Using read_json()
We can read JSON files using pandas.read_json. This method is basically used to read JSON files through pandas.
Syntax: pandas.read_json(“file_name.json”)
Here we are going to use this JSON file for de... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n29 Jun, 2021"
},
{
"code": null,
"e": 106,
"s": 28,
"text": "In this article, we are going to convert JSON String to DataFrame in Pyspark."
},
{
"code": null,
"e": 134,
"s": 106,
"text": "Method 1: Using read_json()"... |
Matplotlib.colors.to_hex() in Python | 21 Apr, 2020
Matplotlib is an amazing visualization library in Python for 2D plots of arrays. Matplotlib is a multi-platform data visualization library built on NumPy arrays and designed to work with the broader SciPy stack.
The matplotlib.colors.to_hex() function is used to convert numbers between 0 to 1 into hex colo... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n21 Apr, 2020"
},
{
"code": null,
"e": 240,
"s": 28,
"text": "Matplotlib is an amazing visualization library in Python for 2D plots of arrays. Matplotlib is a multi-platform data visualization library built on NumPy arrays and designed t... |
Role of Pressure Groups and its Influence on Politics | 05 Jul, 2022
David Truman defined pressure groups as “that on the basis of one or more shared attitudes, makes certain claims upon other groups in the society for the establishment, maintenance, enhancement of forms of behavior that are implied by shared attitude.” Pressure groups and movements are the very essences of... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n05 Jul, 2022"
},
{
"code": null,
"e": 724,
"s": 28,
"text": "David Truman defined pressure groups as “that on the basis of one or more shared attitudes, makes certain claims upon other groups in the society for the establishment, mainte... |
list size() function in C++ STL | 14 Jun, 2022
The list::size() is a built-in function in C++ STL which is used to find the number of elements present in a list container. That is, it is used to find the size of the list container. Syntax:
list_name.size();
Time Complexity – Linear O(N)
Parameters: This function does not accept any parameter. Return Va... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n14 Jun, 2022"
},
{
"code": null,
"e": 221,
"s": 28,
"text": "The list::size() is a built-in function in C++ STL which is used to find the number of elements present in a list container. That is, it is used to find the size of the list c... |
Missing data imputation with fancyimpute | 01 Aug, 2020
In a real world dataset, there will always be some data missing. This mainly associates with how the data was collected. Missing data plays an important role creating a predictive model, because there are algorithms which does not perform very well with missing dataset.
fancyimpute is a library for missing... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n01 Aug, 2020"
},
{
"code": null,
"e": 299,
"s": 28,
"text": "In a real world dataset, there will always be some data missing. This mainly associates with how the data was collected. Missing data plays an important role creating a predic... |
Mongoose count() Function | 10 Sep, 2020
The Query.prototype.count() function is used to count the number of documents in a collection. This functions basically specifies this query as a count query.
Syntax:
Query.prototype.count()
Parameters: This function accepts one array parameter i.e. callback function.
Return Value: This function returns... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n10 Sep, 2020"
},
{
"code": null,
"e": 187,
"s": 28,
"text": "The Query.prototype.count() function is used to count the number of documents in a collection. This functions basically specifies this query as a count query."
},
{
"c... |
JavaScript | Adding hours to the Date object | 18 May, 2019
Given a date, the task is to add hours to it. To add hours to date in javascript, we’re going to discuss a few techniques. First few methods to know.
JavaScript getHours() MethodThis method returns the hour (from 0 to 23) of the provided date and time.Syntax:Date.getHours()
Return value:It returns a number... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n18 May, 2019"
},
{
"code": null,
"e": 178,
"s": 28,
"text": "Given a date, the task is to add hours to it. To add hours to date in javascript, we’re going to discuss a few techniques. First few methods to know."
},
{
"code": nul... |
GATE | GATE-CS-2002 | Question 35 | 28 Jun, 2021
Consider the following algorithm for searching for a given number x in an unsorted array A[1.....n] having n distinct values:
1. Choose an i uniformaly at random from 1..... n;
2. If A[i] = x then Stop else Goto 1;
Assuming that x is present in A, what is the expected number of comparisons made by t... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n28 Jun, 2021"
},
{
"code": null,
"e": 154,
"s": 28,
"text": "Consider the following algorithm for searching for a given number x in an unsorted array A[1.....n] having n distinct values:"
},
{
"code": null,
"e": 250,
"s"... |
Given a sequence of words, print all anagrams together | Set 2 | 07 Jun, 2022
Given an array of words, print all anagrams together. For example, if the given array is {“cat”, “dog”, “tac”, “god”, “act”}, then output may be “cat tac act dog god”.
We have discussed two different methods in the previous post. In this post, a more efficient solution is discussed.Trie data structure can ... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n07 Jun, 2022"
},
{
"code": null,
"e": 220,
"s": 52,
"text": "Given an array of words, print all anagrams together. For example, if the given array is {“cat”, “dog”, “tac”, “god”, “act”}, then output may be “cat tac act dog god”."
},
... |
SQL Query to Add a New Column After an Existing Column in SQL | 29 Sep, 2021
Structured Query Language or SQL is a standard Database language that is used to create, maintain and retrieve the data from relational databases like MySQL, Oracle, SQL Server, Postgres, etc. In Microsoft SQL Server, we can change the order of the columns and can add a new column by using ALTER command. A... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n29 Sep, 2021"
},
{
"code": null,
"e": 490,
"s": 28,
"text": "Structured Query Language or SQL is a standard Database language that is used to create, maintain and retrieve the data from relational databases like MySQL, Oracle, SQL Serve... |
How to convert string to binary in Python? | To convert a string to binary, you need to iterate over each character and convert it to binary. Then join these characters together in a single string. You can use format(ord(x), 'b') to format the character x as binary. For example:
>>>st = "hello world"
>>>' '.join(format(ord(x), 'b') for x in st)
'11010001100101 11... | [
{
"code": null,
"e": 1297,
"s": 1062,
"text": "To convert a string to binary, you need to iterate over each character and convert it to binary. Then join these characters together in a single string. You can use format(ord(x), 'b') to format the character x as binary. For example:"
},
{
"cod... |
C++ Pointer to Pointer (Multiple Indirection) | A pointer to a pointer is a form of multiple indirection or a chain of pointers. Normally, a pointer contains the address of a variable. When we define a pointer to a pointer, the first pointer contains the address of the second pointer, which points to the location that contains the actual value as shown below.
A vari... | [
{
"code": null,
"e": 2632,
"s": 2318,
"text": "A pointer to a pointer is a form of multiple indirection or a chain of pointers. Normally, a pointer contains the address of a variable. When we define a pointer to a pointer, the first pointer contains the address of the second pointer, which points to... |
Enumerator (Enum) in MySQL - GeeksforGeeks | 20 Sep, 2021
An ENUM is a string object whose value is decided from a set of permitted literals(Values) that are explicitly defined at the time of column creation.
Benefits of Enum data type –
Succinct data storage required to store data in limited size columns. The strings that you pass to the enum data types implicit... | [
{
"code": null,
"e": 24212,
"s": 24184,
"text": "\n20 Sep, 2021"
},
{
"code": null,
"e": 24363,
"s": 24212,
"text": "An ENUM is a string object whose value is decided from a set of permitted literals(Values) that are explicitly defined at the time of column creation."
},
{
... |
A practical example of Training a Neural Network in the AWS cloud with Docker | by Jens Laufer | Towards Data Science | My last article Example Use Cases of Docker in the Data Science Process was about Docker in Data Science in general. This time I want to get my hands dirty with a practical example.
In this case study, I want to show you how to train a shallow neural network on top of a deep InceptionV3 model on CIFAR-10 images within ... | [
{
"code": null,
"e": 354,
"s": 172,
"text": "My last article Example Use Cases of Docker in the Data Science Process was about Docker in Data Science in general. This time I want to get my hands dirty with a practical example."
},
{
"code": null,
"e": 667,
"s": 354,
"text": "In t... |
How to Build a Chatbot — A Lesson in NLP | by Rishi Sidhu | Towards Data Science | A ‘chatbot’ as the name suggests is a machine that chats with you. The trick though is to make it as human-like as possible. From ‘American Express customer support’ to Google Pixel’s call screening software chatbots can be found in various flavours.
The earlier versions of chatbots used a machine learning technique ca... | [
{
"code": null,
"e": 423,
"s": 172,
"text": "A ‘chatbot’ as the name suggests is a machine that chats with you. The trick though is to make it as human-like as possible. From ‘American Express customer support’ to Google Pixel’s call screening software chatbots can be found in various flavours."
}... |
Default Arguments and Virtual Function in C++ - GeeksforGeeks | 08 Dec, 2021
Let’s first understand what Default arguments and Virtual functions mean.
Default Arguments: These are the values provided during function declaration, such that values can be automatically assigned if no argument is passed to them. In case any value is passed the default value is overridden.
Virtual Funct... | [
{
"code": null,
"e": 23733,
"s": 23705,
"text": "\n08 Dec, 2021"
},
{
"code": null,
"e": 23807,
"s": 23733,
"text": "Let’s first understand what Default arguments and Virtual functions mean."
},
{
"code": null,
"e": 24027,
"s": 23807,
"text": "Default Argument... |
Exploring Univariate Data in Python | Towards Data Science | Wikipedia states that “univariate analysis is perhaps the simplest form of statistical analysis. . . The key fact is that only one variable is involved.”
Because univariate analysis is so simple, it’s a good place to start in an exploratory analysis.
Some questions to consider when getting started can include:
How many... | [
{
"code": null,
"e": 326,
"s": 172,
"text": "Wikipedia states that “univariate analysis is perhaps the simplest form of statistical analysis. . . The key fact is that only one variable is involved.”"
},
{
"code": null,
"e": 423,
"s": 326,
"text": "Because univariate analysis is s... |
Stack.Clear Method in C# - GeeksforGeeks | 04 Feb, 2019
This method(comes under System.Collections namespace) is used to remove all the objects from the Stack. This method will set the Count of Stack to zero, and references to other objects from elements of the collection are also removed. This method is an O(n) operation, where n is Count.
Syntax:
public virtu... | [
{
"code": null,
"e": 24533,
"s": 24505,
"text": "\n04 Feb, 2019"
},
{
"code": null,
"e": 24820,
"s": 24533,
"text": "This method(comes under System.Collections namespace) is used to remove all the objects from the Stack. This method will set the Count of Stack to zero, and refere... |
numpy.random.triangular() in Python - GeeksforGeeks | 18 Aug, 2020
With the help of numpy.random.triangular() method, we can get the random samples from triangular distribution from interval [left, right] and return the random samples by using this method.
Syntax : numpy.random.triangular(left, mode, right, size=None)
Parameters :
1) left – lower limit of the triangle.
2)... | [
{
"code": null,
"e": 25537,
"s": 25509,
"text": "\n18 Aug, 2020"
},
{
"code": null,
"e": 25727,
"s": 25537,
"text": "With the help of numpy.random.triangular() method, we can get the random samples from triangular distribution from interval [left, right] and return the random sam... |
CSS | DropDowns - GeeksforGeeks | 03 Dec, 2018
Dropdowns are one of the most important parts of an interactive website. CSS is used to design the drop-down menus. A drop-down is a bunch of lists under an unordered list i.e. <ul> as it is popularly known in HTML world. Nested list (<li>) tags under the <ul> tag used to create drop-down structure. To bri... | [
{
"code": null,
"e": 29317,
"s": 29289,
"text": "\n03 Dec, 2018"
},
{
"code": null,
"e": 29772,
"s": 29317,
"text": "Dropdowns are one of the most important parts of an interactive website. CSS is used to design the drop-down menus. A drop-down is a bunch of lists under an unorde... |
Count number of Faces using Python - OpenCV - GeeksforGeeks | 06 Jun, 2021
Prerequisites: Face detection using dlib and openCV
In this article, we will use image processing to detect and count the number of faces. We are not supposed to get all the features of the face. Instead, the objective is to obtain the bounding box through some methods i.e. coordinates of the face in the i... | [
{
"code": null,
"e": 25861,
"s": 25833,
"text": "\n06 Jun, 2021"
},
{
"code": null,
"e": 25913,
"s": 25861,
"text": "Prerequisites: Face detection using dlib and openCV"
},
{
"code": null,
"e": 26281,
"s": 25913,
"text": "In this article, we will use image pro... |
Transmitting data over WiFi using HTTPS | We looked at transmitting data over HTTP using ESP32 in the previous chapter. In this one, we will transmit data over HTTPS. The S in HTTPS stands for 'Secure'. Basically, whatever data you transmit is encrypted using Transport Layer Security (TLS). This means that if someone is eavesdropping on your communication, the... | [
{
"code": null,
"e": 2805,
"s": 2183,
"text": "We looked at transmitting data over HTTP using ESP32 in the previous chapter. In this one, we will transmit data over HTTPS. The S in HTTPS stands for 'Secure'. Basically, whatever data you transmit is encrypted using Transport Layer Security (TLS). Thi... |
Angular Material - Divider | The md-divider, an Angular Directive, is a rule element and is used to display a thin lightweight rule to group and divide contents within lists and page layouts.
The following table lists out the parameters and description of the different attributes of md-divider.
md-inset
Add this attribute to activate the inset div... | [
{
"code": null,
"e": 2353,
"s": 2190,
"text": "The md-divider, an Angular Directive, is a rule element and is used to display a thin lightweight rule to group and divide contents within lists and page layouts."
},
{
"code": null,
"e": 2457,
"s": 2353,
"text": "The following table... |
WebGL - Drawing a Triangle | In the previous chapter (Chapter 11), we discussed how to draw three points using WebGL. In Chapter 5, we took sample application to demonstrate how to draw a triangle. In both the examples, we have drawn the primitives using only vertices.
To draw more complex shapes/meshes, we pass the indices of a geometry too, alon... | [
{
"code": null,
"e": 2288,
"s": 2047,
"text": "In the previous chapter (Chapter 11), we discussed how to draw three points using WebGL. In Chapter 5, we took sample application to demonstrate how to draw a triangle. In both the examples, we have drawn the primitives using only vertices."
},
{
... |
Java Program to Get System IP Address in Windows and Linux Machine - GeeksforGeeks | 19 Aug, 2021
IP Address: An Internet Protocol address is a numerical label assigned to each device connected to a computer network that uses the Internet Protocol for communication.
Packages used:
io (input-output): This package provides for system input and output through data streams, serialization, and the file sys... | [
{
"code": null,
"e": 23583,
"s": 23555,
"text": "\n19 Aug, 2021"
},
{
"code": null,
"e": 23753,
"s": 23583,
"text": "IP Address: An Internet Protocol address is a numerical label assigned to each device connected to a computer network that uses the Internet Protocol for communica... |
Simplest way to detect keypresses in JavaScript? | The easiest way to detect keypresses in JavaScript, use the onKeyPress event handler −
document.onkeypress
The key press is matched with the keyCode property, which returns the Unicode character code
of the key that triggered the onkeypress event.
Live Demo
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8"... | [
{
"code": null,
"e": 1149,
"s": 1062,
"text": "The easiest way to detect keypresses in JavaScript, use the onKeyPress event handler −"
},
{
"code": null,
"e": 1169,
"s": 1149,
"text": "document.onkeypress"
},
{
"code": null,
"e": 1310,
"s": 1169,
"text": "The ... |
Vertically stack pills with Bootstrap | Use the .nav-stacked class in Bootstrap to vertically stack pills:
You can try to run the following code to implement the .nav-stacked class −
Live Demo
<!DOCTYPE html>
<html>
<head>
<title>Bootstrap Example</title>
<link rel = "stylesheet" href = "https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/boot... | [
{
"code": null,
"e": 1129,
"s": 1062,
"text": "Use the .nav-stacked class in Bootstrap to vertically stack pills:"
},
{
"code": null,
"e": 1205,
"s": 1129,
"text": "You can try to run the following code to implement the .nav-stacked class −"
},
{
"code": null,
"e": 12... |
Clustering Algorithms - K-means Algorithm | K-means clustering algorithm computes the centroids and iterates until we it finds optimal centroid. It assumes that the number of clusters are already known. It is also called flat clustering algorithm. The number of clusters identified from data by algorithm is represented by ‘K’ in K-means.
In this algorithm, the da... | [
{
"code": null,
"e": 2599,
"s": 2304,
"text": "K-means clustering algorithm computes the centroids and iterates until we it finds optimal centroid. It assumes that the number of clusters are already known. It is also called flat clustering algorithm. The number of clusters identified from data by al... |
Difference between 1NF and 3NF in DBMS - GeeksforGeeks | 19 Oct, 2020
1. First Normal Form (1NF) :An entity that does not have any repeating columns or data groups can be termed as the First Norm. 1NF is the First normal form, which provides the minimum set of requirements for normalizing a relational database. A table that complies with 1NF assures that it actually represen... | [
{
"code": null,
"e": 24330,
"s": 24302,
"text": "\n19 Oct, 2020"
},
{
"code": null,
"e": 24938,
"s": 24330,
"text": "1. First Normal Form (1NF) :An entity that does not have any repeating columns or data groups can be termed as the First Norm. 1NF is the First normal form, which ... |
C Program for Iterative Quick Sort - GeeksforGeeks | 04 Dec, 2018
// An iterative implementation of quick sort#include <stdio.h> // A utility function to swap two elementsvoid swap(int* a, int* b){ int t = *a; *a = *b; *b = t;} /* This function is same in both iterative and recursive*/int partition(int arr[], int l, int h){ int x = arr[h]; int i = (l - 1... | [
{
"code": null,
"e": 25008,
"s": 24980,
"text": "\n04 Dec, 2018"
},
{
"code": "// An iterative implementation of quick sort#include <stdio.h> // A utility function to swap two elementsvoid swap(int* a, int* b){ int t = *a; *a = *b; *b = t;} /* This function is same in both iterati... |
Angular 8 - Pipes | Pipes are referred as filters. It helps to transform data and manage data within interpolation, denoted by {{ | }}. It accepts data, arrays, integers and strings as inputs which are separated by ‘|’ symbol. This chapter explains about pipes in detail.
Create a date method in your test.component.ts file.
export class Te... | [
{
"code": null,
"e": 2640,
"s": 2388,
"text": "Pipes are referred as filters. It helps to transform data and manage data within interpolation, denoted by {{ | }}. It accepts data, arrays, integers and strings as inputs which are separated by ‘|’ symbol. This chapter explains about pipes in detail."
... |
Character.digit() in Java with examples - GeeksforGeeks | 06 Dec, 2018
The java.lang.Character.digit() is an inbuilt method in java which returns the numeric value of the character ch in the specified radix. It returns -1 if the radix is not in the range MIN_RADIX <= radix <= MAX_RADIX or if the value of ch is not a valid digit in the specified radix. A character is a valid d... | [
{
"code": null,
"e": 23972,
"s": 23944,
"text": "\n06 Dec, 2018"
},
{
"code": null,
"e": 24326,
"s": 23972,
"text": "The java.lang.Character.digit() is an inbuilt method in java which returns the numeric value of the character ch in the specified radix. It returns -1 if the radix... |
Perl glob Function | This function returns a list of files matching EXPR as they would be expanded by the standard Bourne shell. If the EXPR does not specify a path, uses the current directory. If EXPR is omitted, the value of $_ is used.
From Perl 5.6 on, expansion is done internally, rather than using an external script. Expansion follow... | [
{
"code": null,
"e": 2438,
"s": 2220,
"text": "This function returns a list of files matching EXPR as they would be expanded by the standard Bourne shell. If the EXPR does not specify a path, uses the current directory. If EXPR is omitted, the value of $_ is used."
},
{
"code": null,
"e"... |
Perl hex Function | This function interprets EXPR as a hexadecimal string and returns the value, or converts $_ if EXPR is omitted.
Following is the simple syntax for this function −
hex EXPR
hex
This function returns numeric value equivalent to hexa in scalar context.
Following is the example code showing its basic usage −
#!/usr/bin/p... | [
{
"code": null,
"e": 2332,
"s": 2220,
"text": "This function interprets EXPR as a hexadecimal string and returns the value, or converts $_ if EXPR is omitted."
},
{
"code": null,
"e": 2383,
"s": 2332,
"text": "Following is the simple syntax for this function −"
},
{
"code... |
Date and Time Functions in DBMS | The date and time functions in DBMS are quite useful to manipulate and store values related to date and time.
The different date and time functions are as follows −
The numbers of days in integer form (DAYS) is added to the specified date. This is the value returned by the function. For example −
sql> SELECT ADDDATE('2... | [
{
"code": null,
"e": 1172,
"s": 1062,
"text": "The date and time functions in DBMS are quite useful to manipulate and store values related to date and time."
},
{
"code": null,
"e": 1227,
"s": 1172,
"text": "The different date and time functions are as follows −"
},
{
"co... |
Python Program to Find All Connected Components using DFS in an Undirected Graph | When it is required to find all the connected components using depth first search in an undirected graph, a class is defined that contains methods to initialize values, perform depth first search traversal, find the connected components, add nodes to the graph and so on. The instance of the class can be created and the... | [
{
"code": null,
"e": 1446,
"s": 1062,
"text": "When it is required to find all the connected components using depth first search in an undirected graph, a class is defined that contains methods to initialize values, perform depth first search traversal, find the connected components, add nodes to th... |
Handling a thread's exception in the caller thread in Python - GeeksforGeeks | 22 Nov, 2021
Multithreading in Python can be achieved by using the threading library. For invoking a thread, the caller thread creates a thread object and calls the start method on it. Once the join method is called, that initiates its execution and executes the run method of the class object.
For Exception handling, ... | [
{
"code": null,
"e": 24238,
"s": 24210,
"text": "\n22 Nov, 2021"
},
{
"code": null,
"e": 24521,
"s": 24238,
"text": "Multithreading in Python can be achieved by using the threading library. For invoking a thread, the caller thread creates a thread object and calls the start metho... |
Standard I/O in Rust - GeeksforGeeks | 17 Mar, 2021
In this article, we will explore the standard input and standard output in the Rust programming language. Generally, the standard input is provided through the keyboard and the standard output displays values in the console.
There are two core traits in Rust, around which the Rust’s standard Input and Out... | [
{
"code": null,
"e": 23550,
"s": 23522,
"text": "\n17 Mar, 2021"
},
{
"code": null,
"e": 23776,
"s": 23550,
"text": "In this article, we will explore the standard input and standard output in the Rust programming language. Generally, the standard input is provided through the key... |
How to count SQL table columns using Python? | It may be required to count the number of columns present in a SQL table.
This is done using count(*) function with information_schema.columns and the WHERE clause. The WHERE clause is used to specify the name of the table whose columns are to be counted.
SELECT COUNT(*) FROM information_schema.columns WHERE table_name... | [
{
"code": null,
"e": 1136,
"s": 1062,
"text": "It may be required to count the number of columns present in a SQL table."
},
{
"code": null,
"e": 1318,
"s": 1136,
"text": "This is done using count(*) function with information_schema.columns and the WHERE clause. The WHERE clause ... |
Unity - Saving and Loading Scenes | At the end of the day, when you are done with a fair amount of work, you want to save your progress. In Unity, hitting Ctrl + S will not directly save your project.
Everything in Unity happens in scenes. So does saving and loading; you must save your current work as a scene (.unity extension) in your assets.
Let us try... | [
{
"code": null,
"e": 2380,
"s": 2215,
"text": "At the end of the day, when you are done with a fair amount of work, you want to save your progress. In Unity, hitting Ctrl + S will not directly save your project."
},
{
"code": null,
"e": 2525,
"s": 2380,
"text": "Everything in Uni... |
Materialize - Grids | Materialize provides a 12 column fluid responsive grid.
It uses the row and column style classes to define rows and columns respectively.
Specifies a padding-less container to be used for responsive columns. This class is mandatory for responsive classes to be fully responsive.
Specifies a column with sub-classes.
col ... | [
{
"code": null,
"e": 2243,
"s": 2187,
"text": "Materialize provides a 12 column fluid responsive grid."
},
{
"code": null,
"e": 2325,
"s": 2243,
"text": "It uses the row and column style classes to define rows and columns respectively."
},
{
"code": null,
"e": 2466,
... |
Reduce string to shortest length by deleting a pair of same adjacent characters | 05 May, 2021
Given a string str of lowercase characters. The task is to count the number of deletions required to reduce the string to its shortest length. In each delete operation, you can select a pair of adjacent lowercase letters that match, and then delete them. The task is to print the count of deletions done.
E... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n05 May, 2021"
},
{
"code": null,
"e": 358,
"s": 52,
"text": "Given a string str of lowercase characters. The task is to count the number of deletions required to reduce the string to its shortest length. In each delete operation, you c... |
SQL Query to Compare Two Strings | 14 Sep, 2021
SQL stands for Structured Query Language. It is used to communicate with the database. There are some standard SQL commands like ‘select’, ‘delete’, ‘alter’ etc. To compare two strings in SQL Server, there is no direct way. In this article, we will learn how to compare two strings in an MS SQL server and w... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n14 Sep, 2021"
},
{
"code": null,
"e": 365,
"s": 28,
"text": "SQL stands for Structured Query Language. It is used to communicate with the database. There are some standard SQL commands like ‘select’, ‘delete’, ‘alter’ etc. To compare tw... |
HTML | Color Styles and HSL | 14 Jun, 2022
Colors are used to make the page more attractive. Here are the different styles which can be used to create new colors by combination of different colors.
Hexadecimal Style : In this style, we define the color in 6 digit hexadecimal number (from 0 to F). It is denoted by ‘#’. The first two digits indicat... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n14 Jun, 2022"
},
{
"code": null,
"e": 209,
"s": 52,
"text": "Colors are used to make the page more attractive. Here are the different styles which can be used to create new colors by combination of different colors. "
},
{
"co... |
R - Next Statement | The next statement in R programming language is useful when we want to skip the current iteration of a loop without terminating it. On encountering next, the R parser skips further evaluation and starts next iteration of the loop.
The basic syntax for creating a next statement in R is −
next
v <- LETTERS[1:6]
for ( i ... | [
{
"code": null,
"e": 2767,
"s": 2536,
"text": "The next statement in R programming language is useful when we want to skip the current iteration of a loop without terminating it. On encountering next, the R parser skips further evaluation and starts next iteration of the loop."
},
{
"code": ... |
Python | Numpy matrix.copy() | 12 Apr, 2019
With the help of Numpy matrix.copy() method, we can make a copy of all the data elements that is present in matrix. If we change any data element in the copy, it will not affect the original matrix.
Syntax : matrix.copy()
Return : Return copy of matrix
Example #1 :In this example we can see that with the h... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n12 Apr, 2019"
},
{
"code": null,
"e": 227,
"s": 28,
"text": "With the help of Numpy matrix.copy() method, we can make a copy of all the data elements that is present in matrix. If we change any data element in the copy, it will not affe... |
Python program to convert time from 12 hour to 24 hour format | 02 May, 2018
Given a time in 12-hour AM/PM format, convert it to military (24-hour) time.
Note : Midnight is 12:00:00 AM on a 12-hour clock and 00:00:00 on a 24-hour clock. Noon is 12:00:00 PM on 12-hour clock and 12:00:00 on 24-hour clock.
Examples :
Input : 11:21:30 PM
Output : 23:21:30
Input : 12:12:20 AM
Output : ... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n02 May, 2018"
},
{
"code": null,
"e": 129,
"s": 52,
"text": "Given a time in 12-hour AM/PM format, convert it to military (24-hour) time."
},
{
"code": null,
"e": 280,
"s": 129,
"text": "Note : Midnight is 12:00:00 ... |
jQuery - Widget Tab | The Widget Tab function can be used with widgets in JqueryUI.tab is used to swap between content that is broken into logical sections.
Here is the simple syntax to use tab −
$( "#tabs" ).tabs();
Following is a simple example showing the usage of Tab −
<!doctype html>
<html lang = "en">
<head>
<meta charset = ... | [
{
"code": null,
"e": 2924,
"s": 2789,
"text": "The Widget Tab function can be used with widgets in JqueryUI.tab is used to swap between content that is broken into logical sections."
},
{
"code": null,
"e": 2963,
"s": 2924,
"text": "Here is the simple syntax to use tab −"
},
... |
How to Correctly Access Elements in a 3D Pytorch Tensor? | 23 Aug, 2021
In this article, we will discuss how to access elements in a 3D Tensor in Pytorch. PyTorch is an optimized tensor library majorly used for Deep Learning applications using GPUs and CPUs. It is one of the widely used Machine learning libraries, others being TensorFlow and Keras. The python supports the torc... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n23 Aug, 2021"
},
{
"code": null,
"e": 411,
"s": 28,
"text": "In this article, we will discuss how to access elements in a 3D Tensor in Pytorch. PyTorch is an optimized tensor library majorly used for Deep Learning applications using GPU... |
Longest Subarray consisting of unique elements from an Array | 09 Jun, 2022
Given an array arr[] consisting of N integers, the task is to find the largest subarray consisting of unique elements only.
Examples:
Input: arr[] = {1, 2, 3, 4, 5, 1, 2, 3} Output: 5 Explanation: One possible subarray is {1, 2, 3, 4, 5}.
Input: arr[]={1, 2, 4, 4, 5, 6, 7, 8, 3, 4, 5, 3, 3, 4, 5, 6, 7, 8, ... | [
{
"code": null,
"e": 54,
"s": 26,
"text": "\n09 Jun, 2022"
},
{
"code": null,
"e": 178,
"s": 54,
"text": "Given an array arr[] consisting of N integers, the task is to find the largest subarray consisting of unique elements only."
},
{
"code": null,
"e": 188,
"s":... |
JavaFX | ChoiceBox | 13 Jun, 2022
ChoiceBox is a part of the JavaFX package. ChoiceBox shows a set of items and allows the user to select a single choice and it will show the currently selected item on the top. ChoiceBox by default has no selected item unless otherwise selected. One may either specify the items and then the selected item, ... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n13 Jun, 2022"
},
{
"code": null,
"e": 432,
"s": 28,
"text": "ChoiceBox is a part of the JavaFX package. ChoiceBox shows a set of items and allows the user to select a single choice and it will show the currently selected item on the top... |
Loops (For and While) and Control Statements in Octave | 01 Aug, 2020
Control statements are expressions used to control the execution and flow of the program based on the conditions provided in the statements. These structures are used to make a decision after assessing the variable. In this article, we’ll discuss control statements like the if statement, for and while loop... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n01 Aug, 2020"
},
{
"code": null,
"e": 352,
"s": 28,
"text": "Control statements are expressions used to control the execution and flow of the program based on the conditions provided in the statements. These structures are used to make ... |
How to get HTML code of a WebElement in Selenium? | We can get the html code of a webelement with the help of Selenium webdriver. We can obtain the innerHTML attribute to get the HTML content of the web element.
The innerHTML is an attribute of a webelement which is equal to the content that is present between the starting and ending tag. The getAttribute method is used... | [
{
"code": null,
"e": 1347,
"s": 1187,
"text": "We can get the html code of a webelement with the help of Selenium webdriver. We can obtain the innerHTML attribute to get the HTML content of the web element."
},
{
"code": null,
"e": 1571,
"s": 1347,
"text": "The innerHTML is an at... |
CHARINDEX() function SQL Server | 22 Dec, 2020
CHARINDEX() :This function in SQL Server helps to return the position of a substring within a given string. The searching performed in this function is NOT case-sensitive.
Syntax :
CHARINDEX(substring, string, [starting_position]
Parameters :This function accepts 3 parameters.
substring –The substring that... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n22 Dec, 2020"
},
{
"code": null,
"e": 200,
"s": 28,
"text": "CHARINDEX() :This function in SQL Server helps to return the position of a substring within a given string. The searching performed in this function is NOT case-sensitive."
... |
How to create static classes in PHP ? | 22 Jul, 2021
A class is a user-defined data type that holds its own data members and member functions that can be accessed and used by creating one or more instances of that class. Every time a class is instantiated, the values that it holds are different and unique to the particular instance or object and not to that ... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n22 Jul, 2021"
},
{
"code": null,
"e": 580,
"s": 28,
"text": "A class is a user-defined data type that holds its own data members and member functions that can be accessed and used by creating one or more instances of that class. Every t... |
NavigableMap Interface in Java with Example | 21 Nov, 2021
The NavigableMap interface is a member of the Java Collection Framework. It belongs to java.util package and It is an extension of SortedMap which provides convenient navigation methods like lowerKey, floorKey, ceilingKey and higherKey, and along with this popular navigation method. It also provide ways to... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n21 Nov, 2021"
},
{
"code": null,
"e": 653,
"s": 52,
"text": "The NavigableMap interface is a member of the Java Collection Framework. It belongs to java.util package and It is an extension of SortedMap which provides convenient navigat... |
Launching AWS EC2 Instance using Python | 26 Aug, 2020
In this article, we will learn how python can be used for creating and managing Amazon Web Services (AWS) such as Elastic Compute Cloud (EC2), Simple Storage Service (S3), Relational Database Service (RDS). For this purpose, we will use boto3 library of python, Boto is a Python package that provides interf... | [
{
"code": null,
"e": 54,
"s": 26,
"text": "\n26 Aug, 2020"
},
{
"code": null,
"e": 397,
"s": 54,
"text": "In this article, we will learn how python can be used for creating and managing Amazon Web Services (AWS) such as Elastic Compute Cloud (EC2), Simple Storage Service (S3), Re... |
Function overloading and const keyword | 17 Jun, 2022
Function overloading is a feature of object-oriented programming where two or more functions can have the same name but different parameters. When a function name is overloaded with different jobs it is called Function Overloading. In Function Overloading “Function” name should be the same and the argument... | [
{
"code": null,
"e": 54,
"s": 26,
"text": "\n17 Jun, 2022"
},
{
"code": null,
"e": 471,
"s": 54,
"text": "Function overloading is a feature of object-oriented programming where two or more functions can have the same name but different parameters. When a function name is overload... |
Python – seaborn.jointplot() method | 01 Aug, 2020
Seaborn is a Python data visualization library based on matplotlib. It provides a high-level interface for drawing attractive and informative statistical graphics. Seaborn helps resolve the two major problems faced by Matplotlib; the problems are ?
Default Matplotlib parameters
Working with data frames
As ... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n01 Aug, 2020"
},
{
"code": null,
"e": 277,
"s": 28,
"text": "Seaborn is a Python data visualization library based on matplotlib. It provides a high-level interface for drawing attractive and informative statistical graphics. Seaborn hel... |
Program to find last two digits of 2^n | 24 Nov, 2021
Given a number n, we need to find the last two digits of 2n.
Examples:
Input : n = 7
Output : 28
Input : n = 72
Output : 96
2^72 = 4722366482869645213696
A Naive Approach is to find the value of 2^n iteratively or using pow function. Once the value of 2^n is calculated, find the last two digits and print... | [
{
"code": null,
"e": 54,
"s": 26,
"text": "\n24 Nov, 2021"
},
{
"code": null,
"e": 115,
"s": 54,
"text": "Given a number n, we need to find the last two digits of 2n."
},
{
"code": null,
"e": 126,
"s": 115,
"text": "Examples: "
},
{
"code": null,
"... |
Lexicographically largest permutation possible by a swap that is smaller than a given array - GeeksforGeeks | 06 Jul, 2021
Given an array arr[] consisting of N integers, the task is to find the lexicographically largest permutation of the given array possible by exactly one swap, which is smaller than the given array. If it is possible to obtain such a permutation, then print that permutation. Otherwise, print “-1”.
Examples:
... | [
{
"code": null,
"e": 24822,
"s": 24794,
"text": "\n06 Jul, 2021"
},
{
"code": null,
"e": 25119,
"s": 24822,
"text": "Given an array arr[] consisting of N integers, the task is to find the lexicographically largest permutation of the given array possible by exactly one swap, which... |
How to read form data using JSP via POST Method? | Below is the main.jsp JSP program to handle the input given by web browser using the GET or the POST methods.
Infact there is no change in the above JSP because the only way of passing parameters is changed and no binary data is being passed to the JSP program. File handling related concepts will be explained in a sepa... | [
{
"code": null,
"e": 1172,
"s": 1062,
"text": "Below is the main.jsp JSP program to handle the input given by web browser using the GET or the POST methods."
},
{
"code": null,
"e": 1441,
"s": 1172,
"text": "Infact there is no change in the above JSP because the only way of passi... |
Program to find sum of first n natural numbers in C++ | In this tutorial, we will be discussing a program to find sum of first n natural numbers.
For this we will be provided with an integer n. Our task is to add up, find the sum of the first n natural numbers and print it out.
Live Demo
#include<iostream>
using namespace std;
//returning sum of first n natural numbers
int... | [
{
"code": null,
"e": 1152,
"s": 1062,
"text": "In this tutorial, we will be discussing a program to find sum of first n natural numbers."
},
{
"code": null,
"e": 1285,
"s": 1152,
"text": "For this we will be provided with an integer n. Our task is to add up, find the sum of the f... |
How to convert RGB image to HSV using Java OpenCV library? | The cvtColor() method of the Imgproc class changes/converts the color of the image from one to another. This method accepts three parameters −
src − A Matrix object representing source.
src − A Matrix object representing source.
dst − A Matrix object representing the destination.
dst − A Matrix object representing the ... | [
{
"code": null,
"e": 1205,
"s": 1062,
"text": "The cvtColor() method of the Imgproc class changes/converts the color of the image from one to another. This method accepts three parameters −"
},
{
"code": null,
"e": 1248,
"s": 1205,
"text": "src − A Matrix object representing sour... |
Bigram formation from given a Python list | A bigram is formed by creating a pair of words from every two consecutive words from a given sentence. In python, this technique is heavily used in text analytics. Below we see two approaches on how to achieve this.
Using these two methods we first split the sentence into multiple words and then use the enumerate funct... | [
{
"code": null,
"e": 1278,
"s": 1062,
"text": "A bigram is formed by creating a pair of words from every two consecutive words from a given sentence. In python, this technique is heavily used in text analytics. Below we see two approaches on how to achieve this."
},
{
"code": null,
"e": ... |
Python Program to Find the Total Sum of a Nested List Using Recursion | When it is required to find the total sum of a nest list using the recursion technique, a user defined method is used, that takes the list as a parameter.
The recursion computes output of small bits of the bigger problem, and combines these bits to give the solution to the bigger problem.
A list can be used to store he... | [
{
"code": null,
"e": 1217,
"s": 1062,
"text": "When it is required to find the total sum of a nest list using the recursion technique, a user defined method is used, that takes the list as a parameter."
},
{
"code": null,
"e": 1352,
"s": 1217,
"text": "The recursion computes outp... |
Thread Safe Concurrent Collection in C# | The .NET Framework 4 brought the System.Collections.Concurrent namespace. This has several collection classes that are thread-safe and scalable. These collections are called concurrent collections because they can be accessed by multiple threads at a time.
The following are the concurrent collection in C# −
Let us see ... | [
{
"code": null,
"e": 1319,
"s": 1062,
"text": "The .NET Framework 4 brought the System.Collections.Concurrent namespace. This has several collection classes that are thread-safe and scalable. These collections are called concurrent collections because they can be accessed by multiple threads at a ti... |
How can we create and use a MySQL trigger? | For creating a new trigger, we need to use the CREATE TRIGGER statement. Its syntax is as follows −
CREATE TRIGGER trigger_name trigger_time trigger_event
ON table_name
FOR EACH ROW
BEGIN
...
END;
Here,
Trigger_name is the name of the trigger which must be put after the CREATE TRIGGER statement. The naming convention f... | [
{
"code": null,
"e": 1162,
"s": 1062,
"text": "For creating a new trigger, we need to use the CREATE TRIGGER statement. Its syntax is as follows −"
},
{
"code": null,
"e": 1259,
"s": 1162,
"text": "CREATE TRIGGER trigger_name trigger_time trigger_event\nON table_name\nFOR EACH RO... |
Coroutines in C/C++ | In this tutorial, we will be discussing a program to understand coroutines in C/C++.
Coroutines are control instructions which switch the execution control between two routines which returning any of them.
Live Demo
#include<stdio.h>
int range(int a, int b){
static long long int i;
static int state = 0;
switc... | [
{
"code": null,
"e": 1147,
"s": 1062,
"text": "In this tutorial, we will be discussing a program to understand coroutines in C/C++."
},
{
"code": null,
"e": 1268,
"s": 1147,
"text": "Coroutines are control instructions which switch the execution control between two routines which... |
What are conditional attributes in C#? | Attributes are used for adding metadata, such as compiler instruction and other information such as comments, description, methods, and classes to a program.
This predefined attribute marks a conditional method whose execution depends on a specified preprocessing identifier.
It causes conditional compilation of method ... | [
{
"code": null,
"e": 1220,
"s": 1062,
"text": "Attributes are used for adding metadata, such as compiler instruction and other information such as comments, description, methods, and classes to a program."
},
{
"code": null,
"e": 1338,
"s": 1220,
"text": "This predefined attribut... |
Remove borders from an element in Bootstrap | Use the border-0 class in Bootstrap 4 to remove all borders from an element in Bootstrap 4 −
<div class="mystyle border no-border">
no border
</div>
Above, we have the div class to no-border class and this allow us to remove the borders from the element.
Let us see an example to implement the border-0 class in Bootst... | [
{
"code": null,
"e": 1155,
"s": 1062,
"text": "Use the border-0 class in Bootstrap 4 to remove all borders from an element in Bootstrap 4 −"
},
{
"code": null,
"e": 1213,
"s": 1155,
"text": "<div class=\"mystyle border no-border\">\n no border\n</div>"
},
{
"code": null,... |
K-Nearest Neighbors. All you need to know about KNN. | by Sangeet Aggarwal | Towards Data Science | “A man is known for the company he keeps.”
A perfect opening line I must say for presenting the K-Nearest Neighbors. Yes, that's how simple the concept behind KNN is. It just classifies a data point based on its few nearest neighbors. How many neighbors? That is what we decide.
Looks like you already know a lot of ther... | [
{
"code": null,
"e": 214,
"s": 171,
"text": "“A man is known for the company he keeps.”"
},
{
"code": null,
"e": 450,
"s": 214,
"text": "A perfect opening line I must say for presenting the K-Nearest Neighbors. Yes, that's how simple the concept behind KNN is. It just classifies ... |
TensorFlow vs PyTorch — Convolutional Neural Networks (CNN) | by Gurucharan M K | Towards Data Science | In my previous article, I had given the implementation of a Simple Linear Regression in both TensorFlow and PyTorch frameworks and compared their results. In this article, we shall go through the application of a Convolutional Neural Network (CNN) on a very famous Fashion MNIST dataset using both the frameworks and com... | [
{
"code": null,
"e": 510,
"s": 172,
"text": "In my previous article, I had given the implementation of a Simple Linear Regression in both TensorFlow and PyTorch frameworks and compared their results. In this article, we shall go through the application of a Convolutional Neural Network (CNN) on a ve... |
King's War | Practice | GeeksforGeeks | King is getting ready for a war. He know his strengths and weeknesses so he is taking required number of soldiers with him. King can only defeat enemies with strongest and weakest power, and one soldier can only kill one enemy. Your task is to calculate that how many soldiers are required by king to take with him for t... | [
{
"code": null,
"e": 596,
"s": 226,
"text": "King is getting ready for a war. He know his strengths and weeknesses so he is taking required number of soldiers with him. King can only defeat enemies with strongest and weakest power, and one soldier can only kill one enemy. Your task is to calculate t... |
Increasing the space for X-axis labels in Matplotlib | To increase the space for X-axis labels in Matplotlib, we can use the spacing variable in subplots_adjust() method's argument.
Set the figure size and adjust the padding between and around the subplots.
Set the figure size and adjust the padding between and around the subplots.
Create a new figure or activate an existi... | [
{
"code": null,
"e": 1189,
"s": 1062,
"text": "To increase the space for X-axis labels in Matplotlib, we can use the spacing variable in subplots_adjust() method's argument."
},
{
"code": null,
"e": 1265,
"s": 1189,
"text": "Set the figure size and adjust the padding between and ... |
Censoring toxic comments using fastai v2 with a multi-label text classifier | by Vinayak Nayak | Towards Data Science | The internet has become a basic necessity in recent times and a lot of things which happen physically in our world are on the verge of being digitised. Already a substantial proportion of the world population uses the internet for day to day chores, entertainment, academic research etc. It then is a big responsibility ... | [
{
"code": null,
"e": 673,
"s": 172,
"text": "The internet has become a basic necessity in recent times and a lot of things which happen physically in our world are on the verge of being digitised. Already a substantial proportion of the world population uses the internet for day to day chores, enter... |
HTML | <link> sizes Attribute - GeeksforGeeks | 19 Oct, 2020
The HTML link sizes Attribute is used to specify the sizes of the icon for visual media and it only works when rel=”icon”. It is a read-only Property.
Syntax:
<link sizes="HeightxWidth | any">
Attribute Values
HeightxWidth It is used to specify the one or more sizes of a linked icon. The value of the heigh... | [
{
"code": null,
"e": 24894,
"s": 24866,
"text": "\n19 Oct, 2020"
},
{
"code": null,
"e": 25045,
"s": 24894,
"text": "The HTML link sizes Attribute is used to specify the sizes of the icon for visual media and it only works when rel=”icon”. It is a read-only Property."
},
{
... |
Convert one array to another using adjacent swaps of elements - GeeksforGeeks | 23 Aug, 2021
Given two arrays arr1[] and arr2[] of N integers. We can choose any two adjacent elements from array arr1[] and swap them if they are of opposite parity, the task is to check if it is possible to convert array arr1[] to array arr2[] by performing the given operation on arr1[]. Print “Yes” if it is possible... | [
{
"code": null,
"e": 26468,
"s": 26440,
"text": "\n23 Aug, 2021"
},
{
"code": null,
"e": 26838,
"s": 26468,
"text": "Given two arrays arr1[] and arr2[] of N integers. We can choose any two adjacent elements from array arr1[] and swap them if they are of opposite parity, the task ... |
Quick Sort(Lomuto Partition) Visualization using JavaScript - GeeksforGeeks | 25 Feb, 2021
GUI(Graphical User Interface) helps in better in understanding than programs. In this article, we will visualize Quick Sort using JavaScript. We will see how the array is being partitioned using Lomuto Partition and then how we get the final sorted array. We will also visualize the time complexity of Quick... | [
{
"code": null,
"e": 26621,
"s": 26593,
"text": "\n25 Feb, 2021"
},
{
"code": null,
"e": 26936,
"s": 26621,
"text": "GUI(Graphical User Interface) helps in better in understanding than programs. In this article, we will visualize Quick Sort using JavaScript. We will see how the a... |
Output of Java program | Set 27 - GeeksforGeeks | 10 Aug, 2017
Ques1. What is the output of the following?
import java.util.*; public class Test {public static void main(String[] args) { int[] x = new int[3]; System.out.println("x[0] is " + x[0]); }}
Options :A. The program has a compile error because the size of the array wasn’t specified when de... | [
{
"code": null,
"e": 25685,
"s": 25657,
"text": "\n10 Aug, 2017"
},
{
"code": null,
"e": 25729,
"s": 25685,
"text": "Ques1. What is the output of the following?"
},
{
"code": "import java.util.*; public class Test {public static void main(String[] args) { int[]... |
How to solve “Submit is not a function” error in JavaScript ? - GeeksforGeeks | 28 Jun, 2019
Ever tried to submit a form, by using a JavaScript? But when you tried to submit the form by using JavaScript, you might be getting a “Submit is not a function” error in the code. Well, don’t panic as of yet. This article is being dedicated to solving that problem of yours.
So what are we waiting for? Let’... | [
{
"code": null,
"e": 26775,
"s": 26747,
"text": "\n28 Jun, 2019"
},
{
"code": null,
"e": 27050,
"s": 26775,
"text": "Ever tried to submit a form, by using a JavaScript? But when you tried to submit the form by using JavaScript, you might be getting a “Submit is not a function” er... |
HTTP headers | X-XSS-Protection - GeeksforGeeks | 10 Jan, 2022
HTTP headers are used to pass additional information with HTTP response or HTTP requests. The X-XSS-Protection in HTTP header is a feature that stops a page from loading when it detects XSS attacks. This feature is becoming unnecessary with increasing content-security-policy of sites.
XSS attacks: The XSS ... | [
{
"code": null,
"e": 26169,
"s": 26141,
"text": "\n10 Jan, 2022"
},
{
"code": null,
"e": 26455,
"s": 26169,
"text": "HTTP headers are used to pass additional information with HTTP response or HTTP requests. The X-XSS-Protection in HTTP header is a feature that stops a page from l... |
Time complexity of insertion sort when there are O(n) inversions? - GeeksforGeeks | 20 Dec, 2016
What is an inversion?Given an array arr[], a pair arr[i] and arr[j] forms an inversion if arr[i] < arr[j] and i > j. For example, the array {1, 3, 2, 5} has one inversion (3, 2) and array {5, 4, 3} has inversions (5, 4), (5, 3) and (4, 3). We have discussed a merge sort based algorithm to count inversions
... | [
{
"code": null,
"e": 24983,
"s": 24955,
"text": "\n20 Dec, 2016"
},
{
"code": null,
"e": 25290,
"s": 24983,
"text": "What is an inversion?Given an array arr[], a pair arr[i] and arr[j] forms an inversion if arr[i] < arr[j] and i > j. For example, the array {1, 3, 2, 5} has one in... |
GATE | GATE-CS-2016 (Set 2) | Question 22 - GeeksforGeeks | 12 Aug, 2021
The value printed by the following program is
void f(int* p, int m){ m = m + 5; *p = *p + m; return;}void main(){ int i=5, j=10; f(&i, j); printf("%d", i+j);}
(A) 10(B) 20(C) 30(D) 40Answer: (C)Explanation:
#include"stdio.h"
void f(int* p, int m)
{
m = m + 5;
*p = *p + m;
ret... | [
{
"code": null,
"e": 25879,
"s": 25851,
"text": "\n12 Aug, 2021"
},
{
"code": null,
"e": 25925,
"s": 25879,
"text": "The value printed by the following program is"
},
{
"code": "void f(int* p, int m){ m = m + 5; *p = *p + m; return;}void main(){ int i=5, j=10;... |
SQL Query to Find the Highest Salary of Each Department - GeeksforGeeks | 07 Apr, 2021
Structured Query Language or SQL is a standard Database language that is used to create, maintain and retrieve the data from relational databases like MySQL, Oracle, etc. In this article, we will be using the Microsoft SQL Server.
Here we are going to see how to get the highest salary of each department. H... | [
{
"code": null,
"e": 25981,
"s": 25953,
"text": "\n07 Apr, 2021"
},
{
"code": null,
"e": 26212,
"s": 25981,
"text": "Structured Query Language or SQL is a standard Database language that is used to create, maintain and retrieve the data from relational databases like MySQL, Oracl... |
Euler Tour of Tree - GeeksforGeeks | 09 Dec, 2021
A Tree is a generalization of connected graph where it has N nodes that will have exactly N-1 edges, i.e one edge between every pair of vertices. Find the Euler tour of tree represented by adjacency list.Examples:Input :
Output : 1 2 3 2 4 2 1Input :
Output : 1 5 4 2 4 3 4 5 1
Euler tour is defined as ... | [
{
"code": null,
"e": 25991,
"s": 25963,
"text": "\n09 Dec, 2021"
},
{
"code": null,
"e": 26214,
"s": 25991,
"text": "A Tree is a generalization of connected graph where it has N nodes that will have exactly N-1 edges, i.e one edge between every pair of vertices. Find the Euler to... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.