title stringlengths 3 221 | text stringlengths 17 477k | parsed listlengths 0 3.17k |
|---|---|---|
How to Perform a SUMIF Function in R? | 19 Dec, 2021
In this article, we will discuss the sumif function in R Programming Language.
This function is used to group the data and get the sum of the values by a group of values in the dataframe, so we are going to perform this operation on the dataframe.
In this method to perform a SUMIF() function on one column,... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n19 Dec, 2021"
},
{
"code": null,
"e": 107,
"s": 28,
"text": "In this article, we will discuss the sumif function in R Programming Language."
},
{
"code": null,
"e": 276,
"s": 107,
"text": "This function is used to gr... |
Ways to capture the backspace and delete on the onkeydown event | 23 Jan, 2020
Given the HTML document. The task is to detect when the backspace and delete keys are pressed on keydown events. Here 2 approaches are discussed, one uses event.key and another uses event.keyCode with the help of JavaScript.
Approach 1:
Take the input from input element and add a event listener to the inpu... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n23 Jan, 2020"
},
{
"code": null,
"e": 277,
"s": 52,
"text": "Given the HTML document. The task is to detect when the backspace and delete keys are pressed on keydown events. Here 2 approaches are discussed, one uses event.key and anoth... |
Pygame – Character Animation | 16 Jun, 2022
PyGame is a Free and Open source python library used to design video games. In this article, we will learn how we can add different animations to our characters.
We can easily add simple animations in our pygame projects by following the below steps.
Create a list of sprites
Iterate over the list
Display t... | [
{
"code": null,
"e": 54,
"s": 26,
"text": "\n16 Jun, 2022"
},
{
"code": null,
"e": 216,
"s": 54,
"text": "PyGame is a Free and Open source python library used to design video games. In this article, we will learn how we can add different animations to our characters."
},
{
... |
Integer shortValue() Method in Java | 05 Dec, 2018
The Integer.shortValue() is an inbuilt method of java.lang which returns the value of this Integer in the short type .
Syntax:
public short shortValue()
Parameters: The method does not take any parameters.
Return Value: The method returns the integer value represented by this object after converting it to... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n05 Dec, 2018"
},
{
"code": null,
"e": 147,
"s": 28,
"text": "The Integer.shortValue() is an inbuilt method of java.lang which returns the value of this Integer in the short type ."
},
{
"code": null,
"e": 155,
"s": 147,
... |
pidof Command in Linux with Examples | 26 May, 2022
pidof command is used to find out the process IDs of a specific running program. It is basically an identification number that is automatically assigned to each process when it is created. Syntax:
pidof [options] program1 program2 ... programN
1. To find pid of any process
pidof bash
Use the name of the p... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n26 May, 2022"
},
{
"code": null,
"e": 249,
"s": 52,
"text": "pidof command is used to find out the process IDs of a specific running program. It is basically an identification number that is automatically assigned to each process when ... |
Input Events in Android with Example | 23 Feb, 2021
In Android, there’s quite a method to intercept the events from a user’s interaction with your application. When considering events within your interface, the approach is to capture the events from the precise View object that the user interacts with. The View class provides the means to try to do so. With... | [
{
"code": null,
"e": 54,
"s": 26,
"text": "\n23 Feb, 2021"
},
{
"code": null,
"e": 1129,
"s": 54,
"text": "In Android, there’s quite a method to intercept the events from a user’s interaction with your application. When considering events within your interface, the approach is to... |
Inheritance in Java - GeeksQuiz | 13 Oct, 2021
Java
1) Private methods are final.
2) Protected members are accessible within a package and
inherited classes outside the package.
3) Protected methods are final.
4) We cannot override private methods.
Base
Derived
Derived
Base
Base
Derived
Base
Derived
Base
Grandparent's Print()
Parent's Print()
Chi... | [
{
"code": null,
"e": 29498,
"s": 29470,
"text": "\n13 Oct, 2021"
},
{
"code": null,
"e": 29503,
"s": 29498,
"text": "Java"
},
{
"code": null,
"e": 29706,
"s": 29503,
"text": "\n1) Private methods are final.\n2) Protected members are accessible within a package... |
Retrieving Elements from Collection in Java (For-each, Iterator, ListIterator & EnumerationIterator) | 21 Oct, 2021
Prerequisite: Collection in Java Following are the 4 ways to retrieve any elements from a collection object:
For each loop is meant for traversing items in a collection.
// Iterating over collection 'c' using for-each
for (Element e: c)
System.out.println(e);
We read the ‘:’ used in for-each l... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n21 Oct, 2021"
},
{
"code": null,
"e": 163,
"s": 52,
"text": "Prerequisite: Collection in Java Following are the 4 ways to retrieve any elements from a collection object: "
},
{
"code": null,
"e": 224,
"s": 163,
"te... |
Django manage.py migrate command | Python | 26 Sep, 2019
According to documentation, Migrations are Django’s way of propagating changes you make to your models (adding a field, deleting a model, etc.) into your database schema. They’re designed to be mostly automatic, but you’ll need to know when to make migrations when to run them, and the common problems you m... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n26 Sep, 2019"
},
{
"code": null,
"e": 350,
"s": 28,
"text": "According to documentation, Migrations are Django’s way of propagating changes you make to your models (adding a field, deleting a model, etc.) into your database schema. They... |
NLP | Trigrams’n’Tags (TnT) Tagging | 05 Dec, 2019
TnT Tagger : It is a statistical tagger that works on second-order Markov models.
It is a very efficient part-of-speech tagger that can be trained on different languages and on any tagset.
For parameter generation, the component trains on tagged corpora. It incorporates different methods of smoothing and h... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n05 Dec, 2019"
},
{
"code": null,
"e": 110,
"s": 28,
"text": "TnT Tagger : It is a statistical tagger that works on second-order Markov models."
},
{
"code": null,
"e": 217,
"s": 110,
"text": "It is a very efficient p... |
JP Morgan Chase Interview Experience | 12 Dec, 2018
JP Morgan visited our campus for full time hiring for quant research and MGG(Model Governance Group). I applied for the MGG role.
Test 2 sectionsQuant – 35 minutes : Problems on probability, expected values, etc. Similar to ones in 50 challenging, heard on the street and BrainstellarCoding – 2 problems — h... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n12 Dec, 2018"
},
{
"code": null,
"e": 158,
"s": 28,
"text": "JP Morgan visited our campus for full time hiring for quant research and MGG(Model Governance Group). I applied for the MGG role."
},
{
"code": null,
"e": 472,
... |
Django App Model – Python manage.py makemigrations command | 26 Sep, 2019
According to documentation, Migrations are Django’s way of propagating changes you make to your models (adding a field, deleting a model, etc.) into your database schema. They’re designed to be mostly automatic, but you’ll need to know when to make migrations, when to run them, and the common problems you ... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n26 Sep, 2019"
},
{
"code": null,
"e": 351,
"s": 28,
"text": "According to documentation, Migrations are Django’s way of propagating changes you make to your models (adding a field, deleting a model, etc.) into your database schema. They... |
What is the Difference between Interactive and Script Mode in Python Programming? | 05 Aug, 2021
Python is a programming language that lets you work quickly and integrate systems more efficiently. It is a widely-used general-purpose, high-level programming language. It was designed with an emphasis on code readability, and its syntax allows programmers to express their concepts in fewer lines of code.... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n05 Aug, 2021"
},
{
"code": null,
"e": 445,
"s": 52,
"text": "Python is a programming language that lets you work quickly and integrate systems more efficiently. It is a widely-used general-purpose, high-level programming language. It w... |
StringBuilder replace() in Java with Examples | 10 Dec, 2019
The replace(int start, int end, String str) method of StringBuilder class is used to replace the characters in a substring of this sequence with characters in the specified String. The substring begins at the specified index start and extends to the character at index end – 1 or to the end of the sequence ... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n10 Dec, 2019"
},
{
"code": null,
"e": 500,
"s": 28,
"text": "The replace(int start, int end, String str) method of StringBuilder class is used to replace the characters in a substring of this sequence with characters in the specified St... |
Python Program for 0-1 Knapsack Problem | 23 Oct, 2019
# A naive recursive implementation of 0-1 Knapsack Problem # Returns the maximum value that can be put in a knapsack of# capacity Wdef knapSack(W, wt, val, n): # Base Case if n == 0 or W == 0 : return 0 # If weight of the nth item is more than Knapsack of capacity # W, then this ite... | [
{
"code": null,
"e": 54,
"s": 26,
"text": "\n23 Oct, 2019"
},
{
"code": "# A naive recursive implementation of 0-1 Knapsack Problem # Returns the maximum value that can be put in a knapsack of# capacity Wdef knapSack(W, wt, val, n): # Base Case if n == 0 or W == 0 : return 0 ... |
Moment.js moment().valueOf() Function | 29 Jul, 2020
The moment().valueOf() function is used to get the number of milliseconds since the Unix Epoch. Basically the Unix time is a system for describing a point in time.
Syntax:
moment().valueOf();
Parameters: This function has no parameter.
Return Value: This function returns the Unix Timestamp in milliseconds.... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n29 Jul, 2020"
},
{
"code": null,
"e": 192,
"s": 28,
"text": "The moment().valueOf() function is used to get the number of milliseconds since the Unix Epoch. Basically the Unix time is a system for describing a point in time."
},
{
... |
Count non zero values in each column of R dataframe | 05 Apr, 2021
In this article, we are going to count the number of non-zero data entries in the data using R Programming Language.
To check the number of non-zero data entries in the data first we have to put that data in the data frame by using:
data <- data.frame(x1 = c(1,2,0,100,0,3,10),
x2 = c(5,0... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n05 Apr, 2021"
},
{
"code": null,
"e": 145,
"s": 28,
"text": "In this article, we are going to count the number of non-zero data entries in the data using R Programming Language."
},
{
"code": null,
"e": 261,
"s": 145,
... |
Reshaping array as a vector in Julia – vec() Method | 25 Mar, 2020
The vec() is an inbuilt function in julia which is used to reshape the specified array as a one-dimensional column vector i.e, 1D array.
Syntax:vec(a::AbstractArray)
Parameters:
a::AbstractArray: Specified array.
Returns: It returns the reshaped 1D array.
Example 1:
# Julia program to illustrate # the use ... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n25 Mar, 2020"
},
{
"code": null,
"e": 165,
"s": 28,
"text": "The vec() is an inbuilt function in julia which is used to reshape the specified array as a one-dimensional column vector i.e, 1D array."
},
{
"code": null,
"e": 1... |
Check if two trees are mirror of each other using level order traversal | 18 Aug, 2021
Given two binary trees, the task is to check whether the two binary trees is a mirror of each other or not. Mirror of a Binary Tree: Mirror of a Binary Tree T is another Binary Tree M(T) with left and right children of all non-leaf nodes interchanged.
Trees in the above figure are mirrors of each other.
... | [
{
"code": null,
"e": 54,
"s": 26,
"text": "\n18 Aug, 2021"
},
{
"code": null,
"e": 307,
"s": 54,
"text": "Given two binary trees, the task is to check whether the two binary trees is a mirror of each other or not. Mirror of a Binary Tree: Mirror of a Binary Tree T is another Bina... |
How to Use Picasso Image Loader Library in Android? | 11 Jul, 2022
Picasso is open source and one of the widely used image download libraries in Android. It is created and maintained by Square. It is among the powerful image download and caching library for Android. Picasso simplifies the process of loading images from external URLs and displays them on your application. ... | [
{
"code": null,
"e": 54,
"s": 26,
"text": "\n11 Jul, 2022"
},
{
"code": null,
"e": 616,
"s": 54,
"text": "Picasso is open source and one of the widely used image download libraries in Android. It is created and maintained by Square. It is among the powerful image download and cac... |
Node.js | fs.copyFile() Function | 07 Oct, 2021
The fs.copyFile() method is used to asynchronously copy a file from the source path to destination path. By default, Node.js will overwrite the file if it already exists at the given destination. The optional mode parameter can be used to modify the behavior of the copy operation.
Syntax:
fs.copyFile( src... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n07 Oct, 2021"
},
{
"code": null,
"e": 310,
"s": 28,
"text": "The fs.copyFile() method is used to asynchronously copy a file from the source path to destination path. By default, Node.js will overwrite the file if it already exists at th... |
atol(), atoll() and atof() functions in C/C++ | 09 Jun, 2020
atol(): This function converts a C-type string, passed as an argument to function call, to a long integer. It parses the C-string str interpreting its content as an integral number, which is returned as a value of type long int. The function discards the whitespace characters present at the beginning of th... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n09 Jun, 2020"
},
{
"code": null,
"e": 4594,
"s": 52,
"text": "atol(): This function converts a C-type string, passed as an argument to function call, to a long integer. It parses the C-string str interpreting its content as an integral... |
Minimum number of Cuboids required to form a Cube | 07 Sep, 2021
Given L, B, and H which denotes the length, breadth, and height of a cuboid, the task is to find the minimum number of cuboids of specified dimensions that can be placed together to form a cube.
Examples:
Input: L = 1, B = 1, H = 2Output: 4Explanation: Volume of a cuboid of given dimensions = 1 * 1 * 2 = 2... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n07 Sep, 2021"
},
{
"code": null,
"e": 223,
"s": 28,
"text": "Given L, B, and H which denotes the length, breadth, and height of a cuboid, the task is to find the minimum number of cuboids of specified dimensions that can be placed toget... |
How to select rows based on range of values of a column in an R data frame? | Extraction or selection of data can be done in many ways such as based on an individual value, range of values, etc. This is mostly required when we want to either compare the subsets of the data set or use the subset for analysis. The selection of rows based on range of value may be done for testing as well. We can do... | [
{
"code": null,
"e": 1408,
"s": 1062,
"text": "Extraction or selection of data can be done in many ways such as based on an individual value, range of values, etc. This is mostly required when we want to either compare the subsets of the data set or use the subset for analysis. The selection of rows... |
How does one use Glide to download an image into a bitmap? | This example demonstrates how do I does one Glide to download an image into a bitmap.
Step 1 − Create a new project in Android Studio, go to File ⇒ New Project and fill all required details to create a new project
Add the following dependency in build.gradle: Module: app
implementation 'com.github.bumptech.glide:glide:... | [
{
"code": null,
"e": 1148,
"s": 1062,
"text": "This example demonstrates how do I does one Glide to download an image into a bitmap."
},
{
"code": null,
"e": 1276,
"s": 1148,
"text": "Step 1 − Create a new project in Android Studio, go to File ⇒ New Project and fill all required ... |
Calendar in Python - GeeksforGeeks | 30 Jun, 2021
Python has a built-in function, calendar to work with date related tasks. You will learn to display the calendar of a given date in this example.Examples:
Input 1 :
yy = 2017
mm = 11
Output : November 2017
Mo Tu We Th Fr Sa Su
1 2 3 4 5
6 7 8 9 10 11 12
13 14 15 16 17 18 19
20 21 22 2... | [
{
"code": null,
"e": 24316,
"s": 24288,
"text": "\n30 Jun, 2021"
},
{
"code": null,
"e": 24473,
"s": 24316,
"text": "Python has a built-in function, calendar to work with date related tasks. You will learn to display the calendar of a given date in this example.Examples: "
},
... |
Java Program to Find the Intersection Between Two Collection - GeeksforGeeks | 28 Apr, 2021
Collection means a set of different classes and interfaces are group together into a single unit that has similar functions are called collection and framework we know very that provides a predefined architecture to represents and manipulate collections in java. Here we will be discussing discuss out how ... | [
{
"code": null,
"e": 23557,
"s": 23529,
"text": "\n28 Apr, 2021"
},
{
"code": null,
"e": 24020,
"s": 23557,
"text": "Collection means a set of different classes and interfaces are group together into a single unit that has similar functions are called collection and framework we ... |
Prove that the Hamiltonian Path is NP-Complete in TOC | A Hamilton cycle is a round trip path along n edges of graph G which visits every vertex once and returns to its starting vertex
Given below is an example of the Hamilton cycle path −
Hamilton cycle path: 1,2,8,7,6,5,4,3,1
The travelling salesman problem (TSP) is having a salesman and a set of cities. The salesman need... | [
{
"code": null,
"e": 1191,
"s": 1062,
"text": "A Hamilton cycle is a round trip path along n edges of graph G which visits every vertex once and returns to its starting vertex"
},
{
"code": null,
"e": 1246,
"s": 1191,
"text": "Given below is an example of the Hamilton cycle path ... |
Program to compare two fractions in C | Given two fractions with some numerator nume1 and nume2 and deno1 and deno2 as their respective denominator, the task is to compare both the fractions and find out the greater one. Like we have a fraction 1/2 and 2/3 and the higher one is 2/3 because the value of 1/2 is 0.5 and the value of 2/3 is 0.66667 which is high... | [
{
"code": null,
"e": 1386,
"s": 1062,
"text": "Given two fractions with some numerator nume1 and nume2 and deno1 and deno2 as their respective denominator, the task is to compare both the fractions and find out the greater one. Like we have a fraction 1/2 and 2/3 and the higher one is 2/3 because th... |
Catch block and type conversion in C++ - GeeksforGeeks | 12 Nov, 2021
Predict the output of following C++ program.
C++
#include <iostream>using namespace std; int main(){ try { throw 'x'; } catch(int x) { cout << " Caught int " << x; } catch(...) { cout << "Default catch block"; }}
Output:
Default catch block
In the above prog... | [
{
"code": null,
"e": 26962,
"s": 26934,
"text": "\n12 Nov, 2021"
},
{
"code": null,
"e": 27007,
"s": 26962,
"text": "Predict the output of following C++ program."
},
{
"code": null,
"e": 27011,
"s": 27007,
"text": "C++"
},
{
"code": "#include <iostream... |
Python and Apache CassandraTM for Beginners | by Andreas Adamides | Towards Data Science | Python is one of the most widely used programming languages with a huge and supportive community, while Cassandra is one of the most popular NoSQL databases traditionally used for web applications storage or also data centric applications that are dependent on quick retrieval of data. Together, they are found in many a... | [
{
"code": null,
"e": 428,
"s": 46,
"text": "Python is one of the most widely used programming languages with a huge and supportive community, while Cassandra is one of the most popular NoSQL databases traditionally used for web applications storage or also data centric applications that are dependen... |
How to catch EOFError Exception in Python? | An EOFError is raised when a built-in function like input() or raw_input() do not read any data before encountering the end of their input stream. The file methods like read() return an empty string at the end of the file.
The given code is rewritten as follows to catch the EOFError and find its type.
#eofError.py
try:... | [
{
"code": null,
"e": 1285,
"s": 1062,
"text": "An EOFError is raised when a built-in function like input() or raw_input() do not read any data before encountering the end of their input stream. The file methods like read() return an empty string at the end of the file."
},
{
"code": null,
... |
How to use jQuery.serializeArray() method to serialize data? | The serializeArray( ) method serializes all forms and form elements like the .serialize() method but returns a JSON data structure for you to work with.
Assuming we have following PHP content in serialize.php file −
<?php
if( $_REQUEST["name"] ) {
$name = $_REQUEST['name'];
echo "Welcome ". $name;
$age = $_RE... | [
{
"code": null,
"e": 1215,
"s": 1062,
"text": "The serializeArray( ) method serializes all forms and form elements like the .serialize() method but returns a JSON data structure for you to work with."
},
{
"code": null,
"e": 1278,
"s": 1215,
"text": "Assuming we have following PH... |
JSF - h:outputScript | The h:outputScript tag renders an HTML element of the type "script" with type "text/javascript". This tag is used to add an external javascript file to JSF page.
<h:outputScript library = "js" name = "help.js" />
<script type = "text/javascript"
src = "/helloworld/javax.faces.resource/help.js.jsf?ln = js"></scrip... | [
{
"code": null,
"e": 2114,
"s": 1952,
"text": "The h:outputScript tag renders an HTML element of the type \"script\" with type \"text/javascript\". This tag is used to add an external javascript file to JSF page."
},
{
"code": null,
"e": 2166,
"s": 2114,
"text": "<h:outputScript ... |
How to use range-based for() loop with std::map? | Here we will see how to use the range based for loop for std::map type objects. In C++, we know that there are map type objects. That can store key value pairs. The map basically stores the pair objects. This pair object is used to store one key and corresponding value. These keys and values are implemented using templ... | [
{
"code": null,
"e": 1420,
"s": 1062,
"text": "Here we will see how to use the range based for loop for std::map type objects. In C++, we know that there are map type objects. That can store key value pairs. The map basically stores the pair objects. This pair object is used to store one key and cor... |
How to update two columns in a MySQL database? | You can update two columns using SET command separated with comma(,). The syntax is as follows −
UPDATE yourTableName SET yourColumnName1 = ’yourValue1’, yourColumnName2 = ’yourValue2’ where yourCondition;
To understand the above syntax, let us create a table. The query to create a table is as follows −
mysql> create t... | [
{
"code": null,
"e": 1159,
"s": 1062,
"text": "You can update two columns using SET command separated with comma(,). The syntax is as follows −"
},
{
"code": null,
"e": 1268,
"s": 1159,
"text": "UPDATE yourTableName SET yourColumnName1 = ’yourValue1’, yourColumnName2 = ’yourValue... |
Tryit Editor v3.7 - Show Java | public class CreateFileDir {
public static void main(String[] args) {
try {
File myObj = new File("C:\\Users\\MyName\\filename.txt");
if (myObj.createNewFile()) {
System.out.println("File created: " + myObj.getName());
System.out.println("Absolute path: " + myObj.getAbsolut... | [] |
How to use OpenCV with GPU on Colab? | by C K | Towards Data Science | OpenCV’s ‘Deep Neural Network’ (dnn) module is a convenient tool for computer vision, it is very easy to apply some techniques such as Yolo and OpenPose. However, the major drawback of OpenCV was the lack of GPU support, resulting in slow inference. Luckily since OpenCV 4.2, NVIDIA GPU/CUDA is supported.
It still requi... | [
{
"code": null,
"e": 477,
"s": 171,
"text": "OpenCV’s ‘Deep Neural Network’ (dnn) module is a convenient tool for computer vision, it is very easy to apply some techniques such as Yolo and OpenPose. However, the major drawback of OpenCV was the lack of GPU support, resulting in slow inference. Lucki... |
Working with XlsxWriter module - Python - GeeksforGeeks | 22 Nov, 2021
XlsxWriter is a Python module that provides various methods to work with Excel using Python. It can be used to read, write, applying formulas. Also, it supports features such as formatting, images, charts, page setup, auto filters, conditional formatting, and many others.
This tutorial aims at providing kn... | [
{
"code": null,
"e": 23901,
"s": 23873,
"text": "\n22 Nov, 2021"
},
{
"code": null,
"e": 24174,
"s": 23901,
"text": "XlsxWriter is a Python module that provides various methods to work with Excel using Python. It can be used to read, write, applying formulas. Also, it supports fe... |
Boolean.CompareTo(Boolean) Method in C# | The Boolean.CompareTo(Boolean) method in C# is used to compare this instance to a specified Boolean object and returns an integer that indicates their relationship to one another.
Following is the syntax −
public int CompareTo (bool val);
Above, Val is a Boolean object to compare to the current instance.
Let us now see... | [
{
"code": null,
"e": 1242,
"s": 1062,
"text": "The Boolean.CompareTo(Boolean) method in C# is used to compare this instance to a specified Boolean object and returns an integer that indicates their relationship to one another."
},
{
"code": null,
"e": 1268,
"s": 1242,
"text": "Fo... |
Add a shadow to an element with Bootstrap 4 | To add a shadow to an element in Bootstrap, use the .shadow class in Bootstrap 4.
You can try to run the following code to add shadow to an element −
Live Demo
<!DOCTYPE html>
<html>
<head>
<title>Bootstrap Example</title>
<link rel = "stylesheet" href = "https://maxcdn.bootstrapcdn.com/bootstrap/4.1.1/c... | [
{
"code": null,
"e": 1144,
"s": 1062,
"text": "To add a shadow to an element in Bootstrap, use the .shadow class in Bootstrap 4."
},
{
"code": null,
"e": 1212,
"s": 1144,
"text": "You can try to run the following code to add shadow to an element −"
},
{
"code": null,
... |
WPF - RoutedCommands | RoutedCommands enable input handling at a more semantic level. These are actually simple instructions as New, Open, Copy, Cut, and Save. These commands are very useful and they can be accessed from a Menu or from a keyboard shortcut. It disables the controls if the command becomes unavailable. The following example def... | [
{
"code": null,
"e": 2374,
"s": 2020,
"text": "RoutedCommands enable input handling at a more semantic level. These are actually simple instructions as New, Open, Copy, Cut, and Save. These commands are very useful and they can be accessed from a Menu or from a keyboard shortcut. It disables the con... |
MongoDB - Delete Document | In this chapter, we will learn how to delete a document using MongoDB.
MongoDB's remove() method is used to remove a document from the collection. remove() method accepts two parameters. One is deletion criteria and second is justOne flag.
deletion criteria − (Optional) deletion criteria according to documents will be ... | [
{
"code": null,
"e": 2624,
"s": 2553,
"text": "In this chapter, we will learn how to delete a document using MongoDB."
},
{
"code": null,
"e": 2793,
"s": 2624,
"text": "MongoDB's remove() method is used to remove a document from the collection. remove() method accepts two paramet... |
What is the difference between a++ and ++a in JavaScript? | ++a returns the value of an after it has been incremented. It is a pre-increment operator since ++ comes before the operand.
a++ returns the value of a before incrementing. It is a post-increment operator since ++ comes after the operand.
You can try to run the following code to learn the difference between i++ and ++i... | [
{
"code": null,
"e": 1187,
"s": 1062,
"text": "++a returns the value of an after it has been incremented. It is a pre-increment operator since ++ comes before the operand."
},
{
"code": null,
"e": 1301,
"s": 1187,
"text": "a++ returns the value of a before incrementing. It is a p... |
Difference between Stop and Wait protocol and Sliding Window protocol - GeeksforGeeks | 22 Apr, 2020
Both Stop and Wait protocol and Sliding Window protocol are the techniques to the solution of flow control handling. The main difference between Stop-and-wait protocol and Sliding window protocol is that in Stop-and-Wait Protocol, the sender sends one frame and wait for acknowledgment from the receiver whe... | [
{
"code": null,
"e": 24249,
"s": 24221,
"text": "\n22 Apr, 2020"
},
{
"code": null,
"e": 24707,
"s": 24249,
"text": "Both Stop and Wait protocol and Sliding Window protocol are the techniques to the solution of flow control handling. The main difference between Stop-and-wait prot... |
SAP Scripts - Standard Text | You can use standard texts in SAP to display the database stored value on the output document and this can be done using Transaction Code: SO10
Let us say you want to print terms and conditions on every invoice and you want each invoice to contain these legal terms and conditions directly. You can create a Standard tex... | [
{
"code": null,
"e": 2667,
"s": 2523,
"text": "You can use standard texts in SAP to display the database stored value on the output document and this can be done using Transaction Code: SO10"
},
{
"code": null,
"e": 2874,
"s": 2667,
"text": "Let us say you want to print terms and... |
JavaScript - How to create nested unordered list based on nesting of array? | Suppose, we have a nested array of arrays like this −
const arr = [
'Value 1', ['Inner value 1', 'Inner value 2', 'Inner value 3', 'Inner value 4'], 'Value 2', 'Value 3', 'Value 4', 'Value 5', 'Value 6' ];
We are required to write a JavaScript program that should map any such nested array of arrays of literals to ne... | [
{
"code": null,
"e": 1116,
"s": 1062,
"text": "Suppose, we have a nested array of arrays like this −"
},
{
"code": null,
"e": 1271,
"s": 1116,
"text": "const arr = [\n 'Value 1', ['Inner value 1', 'Inner value 2', 'Inner value 3', 'Inner value 4'], 'Value 2', 'Value 3', 'Value ... |
Difference Between Keyword and Identifier | In this post, we will understand the difference between a keyword and an identifier.
They define a specific kind of entity.
They define a specific kind of entity.
It always starts with a lower case letter.
It always starts with a lower case letter.
They are pre-defined words that are reserved to work with programs.
The... | [
{
"code": null,
"e": 1147,
"s": 1062,
"text": "In this post, we will understand the difference between a keyword and an identifier."
},
{
"code": null,
"e": 1186,
"s": 1147,
"text": "They define a specific kind of entity."
},
{
"code": null,
"e": 1225,
"s": 1186,
... |
java.time.YearMonth.format() Method Example | The java.time.YearMonth.format(DateTimeFormatter formatter) method formats this year using the specified formatter.
Following is the declaration for java.time.YearMonth.format(DateTimeFormatter formatter) method.
public String format(DateTimeFormatter formatter)
formatter − the formatter to use, not null.
the formatte... | [
{
"code": null,
"e": 2031,
"s": 1915,
"text": "The java.time.YearMonth.format(DateTimeFormatter formatter) method formats this year using the specified formatter."
},
{
"code": null,
"e": 2128,
"s": 2031,
"text": "Following is the declaration for java.time.YearMonth.format(DateTi... |
Striped Table with Bootstrap | To add a striped table in Bootstrap, use the .table-striped class. You can try to run the following code to implement the .table-striped class −
Live Demo
<!DOCTYPE html>
<html>
<head>
<title>Bootstrap Table</title>
<meta name = "viewport" content = "width=device-width, initial-scale = 1">
<link re... | [
{
"code": null,
"e": 1207,
"s": 1062,
"text": "To add a striped table in Bootstrap, use the .table-striped class. You can try to run the following code to implement the .table-striped class −"
},
{
"code": null,
"e": 1217,
"s": 1207,
"text": "Live Demo"
},
{
"code": null,... |
Java.io.PrintWriter class in Java | Set 1 - GeeksforGeeks | 24 Jan, 2017
This class gives Prints formatted representations of objects to a text-output stream. It implements all of the print methods found in PrintStream. It does not contain methods for writing raw bytes, for which a program should use unencoded byte streams.Unlike the PrintStream class, if automatic flushing is ... | [
{
"code": null,
"e": 23953,
"s": 23925,
"text": "\n24 Jan, 2017"
},
{
"code": null,
"e": 24512,
"s": 23953,
"text": "This class gives Prints formatted representations of objects to a text-output stream. It implements all of the print methods found in PrintStream. It does not cont... |
Django URL patterns | Python - GeeksforGeeks | 19 Jul, 2019
In Django, views are Python functions which take a URL request as parameter and return an HTTP response or throw an exception like 404. Each view needs to be mapped to a corresponding URL pattern. This is done via a Python module called URLConf(URL configuration)
Let the project name be myProject. The Pyth... | [
{
"code": null,
"e": 24198,
"s": 24170,
"text": "\n19 Jul, 2019"
},
{
"code": null,
"e": 24462,
"s": 24198,
"text": "In Django, views are Python functions which take a URL request as parameter and return an HTTP response or throw an exception like 404. Each view needs to be mappe... |
Compound Finite Automata (FA) - GeeksforGeeks | 27 May, 2019
Prerequisite – Finite Automata (FA)Compound FA is the resultant DFA formed after performing operation (∪, ∩, -) on given DFAs D1 and D2.
D1 = (Q1, ∑, δ, q1, F1) and D2 = (Q2, ∑, δ, q2, F2)
Where,Q1 and Q2: Set of finite states of DFA D1 and D2 respectively.∑: Input alphabet contain finite number of input ... | [
{
"code": null,
"e": 24352,
"s": 24324,
"text": "\n27 May, 2019"
},
{
"code": null,
"e": 24489,
"s": 24352,
"text": "Prerequisite – Finite Automata (FA)Compound FA is the resultant DFA formed after performing operation (∪, ∩, -) on given DFAs D1 and D2."
},
{
"code": null... |
__call__ in Python - GeeksforGeeks | 27 Feb, 2020
Python has a set of built-in methods and __call__ is one of them. The __call__ method enables Python programmers to write classes where the instances behave like functions and can be called like a function. When the instance is called as a function; if this method is defined, x(arg1, arg2, ...) is a shorth... | [
{
"code": null,
"e": 24038,
"s": 24010,
"text": "\n27 Feb, 2020"
},
{
"code": null,
"e": 24382,
"s": 24038,
"text": "Python has a set of built-in methods and __call__ is one of them. The __call__ method enables Python programmers to write classes where the instances behave like f... |
Install custom Python Libraries from private PyPI on Databricks | by David Suarez | Towards Data Science | This method opens up the door for sharing code and libraries across data teams while keeping versioning. Moreover, it gives the possibility to apply hybrid coding approaches on Databricks where you can combine libraries written on local machine (properly tested and released using CI/CD pipelines) and Notebooks using th... | [
{
"code": null,
"e": 506,
"s": 171,
"text": "This method opens up the door for sharing code and libraries across data teams while keeping versioning. Moreover, it gives the possibility to apply hybrid coding approaches on Databricks where you can combine libraries written on local machine (properly ... |
WML - Inputs | WML provides various options to let a user enter information through WAP application.
First of all, we are going to look at the different options for allowing the user to make straight choices between items. These are usually in the form of menus and submenus, allowing users to drill down to the exact data that they wa... | [
{
"code": null,
"e": 2025,
"s": 1939,
"text": "WML provides various options to let a user enter information through WAP application."
},
{
"code": null,
"e": 2263,
"s": 2025,
"text": "First of all, we are going to look at the different options for allowing the user to make straig... |
Basics of Python Generators. Understanding the basics of generators... | by Muriel Kosaka | Towards Data Science | Python Generator functions allow you to declare a function that behaves likes an iterator, allowing programmers to make an iterator in a fast, easy, and clean way. An iterator is an object that can be iterated or looped upon. It is used to abstract a container of data to make it behave like an iterable object. Examples... | [
{
"code": null,
"e": 582,
"s": 171,
"text": "Python Generator functions allow you to declare a function that behaves likes an iterator, allowing programmers to make an iterator in a fast, easy, and clean way. An iterator is an object that can be iterated or looped upon. It is used to abstract a cont... |
Tcl - Environment Setup | If you are willing to set up your environment for Tcl, you need the following two software applications available on your computer −
Text Editor
Tcl Interpreter.
This will be used to type your program. Examples of a few text editors include Windows Notepad, OS Edit command, Brief, Epsilon, EMACS, and vim or vi.
Name an... | [
{
"code": null,
"e": 2334,
"s": 2201,
"text": "If you are willing to set up your environment for Tcl, you need the following two software applications available on your computer −"
},
{
"code": null,
"e": 2346,
"s": 2334,
"text": "Text Editor"
},
{
"code": null,
"e": ... |
Checking Internet Connectivity using Java - GeeksforGeeks | 30 May, 2018
Checking Internet connectivity using Java can be done using 2 methods:1) by using getRuntime() method of java Runtime class.2) by using methods of java URL and URLConnection classes.
#Java Runtime Class:This class is used to interact with java runtime environment (Java virtual machine) in which the applica... | [
{
"code": null,
"e": 24265,
"s": 24237,
"text": "\n30 May, 2018"
},
{
"code": null,
"e": 24448,
"s": 24265,
"text": "Checking Internet connectivity using Java can be done using 2 methods:1) by using getRuntime() method of java Runtime class.2) by using methods of java URL and URL... |
What is the use of default methods in Java? | An interface in Java is similar to class but, it contains only abstract methods and fields which are final and static.
It is a specification of method prototypes. Whenever you need to guide the programmer or, make a contract specifying how the methods and fields of a type should be you can define an interface.
If you n... | [
{
"code": null,
"e": 1181,
"s": 1062,
"text": "An interface in Java is similar to class but, it contains only abstract methods and fields which are final and static."
},
{
"code": null,
"e": 1374,
"s": 1181,
"text": "It is a specification of method prototypes. Whenever you need t... |
Minimum number of subsets with distinct elements - GeeksforGeeks | 01 Jul, 2021
You are given an array of n-element. You have to make subsets from the array such that no subset contain duplicate elements. Find out minimum number of subset possible.Examples :
Input : arr[] = {1, 2, 3, 4}
Output :1
Explanation : A single subset can contains all
values and all values are distinct
Inp... | [
{
"code": null,
"e": 25005,
"s": 24977,
"text": "\n01 Jul, 2021"
},
{
"code": null,
"e": 25186,
"s": 25005,
"text": "You are given an array of n-element. You have to make subsets from the array such that no subset contain duplicate elements. Find out minimum number of subset poss... |
Max Circular Subarray Sum | Practice | GeeksforGeeks | Given an array arr[] of N integers arranged in a circular fashion. Your task is to find the maximum contiguous subarray sum.
Example 1:
Input:
N = 7
arr[] = {8,-8,9,-9,10,-11,12}
Output:
22
Explanation:
Starting from the last element
of the array, i.e, 12, and
moving in a circular fashion, we
have max subarray as 12... | [
{
"code": null,
"e": 363,
"s": 238,
"text": "Given an array arr[] of N integers arranged in a circular fashion. Your task is to find the maximum contiguous subarray sum."
},
{
"code": null,
"e": 375,
"s": 363,
"text": "\nExample 1:"
},
{
"code": null,
"e": 611,
"s... |
Maximum of all subarrays of size k | Practice | GeeksforGeeks | Given an array arr[] of size N and an integer K. Find the maximum for each and every contiguous subarray of size K.
Example 1:
Input:
N = 9, K = 3
arr[] = 1 2 3 1 4 5 2 3 6
Output:
3 3 4 5 5 5 6
Explanation:
1st contiguous subarray = {1 2 3} Max = 3
2nd contiguous subarray = {2 3 1} Max = 3
3rd contiguous subarray =... | [
{
"code": null,
"e": 354,
"s": 238,
"text": "Given an array arr[] of size N and an integer K. Find the maximum for each and every contiguous subarray of size K."
},
{
"code": null,
"e": 365,
"s": 354,
"text": "Example 1:"
},
{
"code": null,
"e": 743,
"s": 365,
... |
JQuery .Deferred() method - GeeksforGeeks | 16 Jul, 2020
This JQuery.Deferred() method in JQuery is a function which returns the utility object with methods which can register multiple callbacks to queues. It calls the callback queues, and relay the success or failure state of any synchronous or asynchronous function.
Syntax:
jQuery.Deferred([beforeStart])
Par... | [
{
"code": null,
"e": 24040,
"s": 24012,
"text": "\n16 Jul, 2020"
},
{
"code": null,
"e": 24305,
"s": 24040,
"text": "This JQuery.Deferred() method in JQuery is a function which returns the utility object with methods which can register multiple callbacks to queues. It calls the... |
Shuffle or Randomize a list in Java - GeeksforGeeks | 09 Sep, 2021
Shuffling a list Collections.shuffle() is used to shuffle lists in java.Class hierarchy:
java
↳ util
↳ Collections
Syntax:
Collections.shuffle(list);
Examples:
Java
// Java program to demonstrate working of shuffle()import java.util.*; public class GFG { public static void main(String[] args... | [
{
"code": null,
"e": 24561,
"s": 24533,
"text": "\n09 Sep, 2021"
},
{
"code": null,
"e": 24651,
"s": 24561,
"text": "Shuffling a list Collections.shuffle() is used to shuffle lists in java.Class hierarchy: "
},
{
"code": null,
"e": 24686,
"s": 24651,
"text": "... |
What are generator functions in JavaScript? | Generator Functions allows execution of code in between when a function is exited and resumed later. So, generators can be used to manage flow control in a code. Cancel asynchronous operations easily since execution can be paused anytime.
Here’s the syntax; do not forget to add an asterisk after the “function” keyword.... | [
{
"code": null,
"e": 1301,
"s": 1062,
"text": "Generator Functions allows execution of code in between when a function is exited and resumed later. So, generators can be used to manage flow control in a code. Cancel asynchronous operations easily since execution can be paused anytime."
},
{
... |
How do you initialize jagged arrays in C#? | A Jagged array is an array of arrays. This is how you can initialize it.
int[][] rank = new int[2][]{new int[]{3,2,7},new int[]{9,4,5,6}};
The following is an example showing how to initialize jagged arrays in C#.
Live Demo
using System;
namespace ArrayApplication {
class MyArray {
static void Main(string[] a... | [
{
"code": null,
"e": 1135,
"s": 1062,
"text": "A Jagged array is an array of arrays. This is how you can initialize it."
},
{
"code": null,
"e": 1201,
"s": 1135,
"text": "int[][] rank = new int[2][]{new int[]{3,2,7},new int[]{9,4,5,6}};"
},
{
"code": null,
"e": 1276,
... |
How to replace NA’s to a value of selected columns in an R data frame? | In data analysis, finding some NA values in a data frame is very common but all the NA values do not create problems if the column that contain NA values is not useful for the analysis. We can replace all NA values to 0 or to any other for the columns that are useful.
Consider the below data frame −
> set.seed(99)
> x1... | [
{
"code": null,
"e": 1331,
"s": 1062,
"text": "In data analysis, finding some NA values in a data frame is very common but all the NA values do not create problems if the column that contain NA values is not useful for the analysis. We can replace all NA values to 0 or to any other for the columns t... |
Apache IVY - Settings File | Apache Ivy follows Maven principles and comes with lot of default configurations. Default settings can be overridden by defining a ivysettings.xml file.
<ivysettings>
<properties file="${ivy.settings.dir}/ivysettings-file.properties" />
<settings defaultCache="${cache.dir}" defaultResolver="ibiblio" checkUpToDate... | [
{
"code": null,
"e": 2157,
"s": 2004,
"text": "Apache Ivy follows Maven principles and comes with lot of default configurations. Default settings can be overridden by defining a ivysettings.xml file."
},
{
"code": null,
"e": 2734,
"s": 2157,
"text": "<ivysettings>\n <properties... |
Make an Ordered list with Bootstrap | For ordered list in Bootstrap, you can try to run the following code −
Live Demo
<!DOCTYPE html>
<html>
<head>
<title>Bootstrap lists</title>
<meta name = "viewport" content = "width=device-width, initial-scale = 1">
<link rel = "stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.1.1... | [
{
"code": null,
"e": 1133,
"s": 1062,
"text": "For ordered list in Bootstrap, you can try to run the following code −"
},
{
"code": null,
"e": 1144,
"s": 1133,
"text": " Live Demo"
},
{
"code": null,
"e": 1799,
"s": 1144,
"text": "<!DOCTYPE html>\n<html>\n <... |
PyTorch – How to get the exponents of tensor elements? | To find the exponential of the elements of an input tensor, we can apply
Tensor.exp() or torch.exp(input). Here, input is the input tensor for
which the exponentials are computed. Both the methods return a new
tensor with the exponential values of the elements of the input tensor.
Tensor.exp()
or
torch.exp(input)
We c... | [
{
"code": null,
"e": 1344,
"s": 1062,
"text": "To find the exponential of the elements of an input tensor, we can apply\nTensor.exp() or torch.exp(input). Here, input is the input tensor for\nwhich the exponentials are computed. Both the methods return a new\ntensor with the exponential values of th... |
GATE | GATE CS 2012 | Question 8 - GeeksforGeeks | 28 Jun, 2021
A process executes the code
fork();
fork();
fork();
The total number of child processes created is(A) 3(B) 4(C) 7(D) 8Answer: (C)Explanation: Let us put some label names for the three lines
fork (); // Line 1
fork (); // Line 2
fork (); // Line 3
L1 // There will be 1 child proc... | [
{
"code": null,
"e": 24044,
"s": 24016,
"text": "\n28 Jun, 2021"
},
{
"code": null,
"e": 24072,
"s": 24044,
"text": "A process executes the code"
},
{
"code": null,
"e": 24097,
"s": 24072,
"text": "fork();\nfork();\nfork(); "
},
{
"code": null,
"e"... |
How to find the union of two vectors in R? | The union of vectors return all the unique values in both the vectors. For example, if we have a vector x that contains 1, 2, 3, 4, 2, 3, 4, 1, 1, 4 and another vector that contains 2, 1, 2, 4, 5, 7, 5, 1, 2, 3, 7, 6, 5, 7, 4, 2, 4, 1, 5, 8, 1, 3 then the union of these two vectors will be 1, 2, 3, 4, 5, 6, 7, 8. In R,... | [
{
"code": null,
"e": 1423,
"s": 1062,
"text": "The union of vectors return all the unique values in both the vectors. For example, if we have a vector x that contains 1, 2, 3, 4, 2, 3, 4, 1, 1, 4 and another vector that contains 2, 1, 2, 4, 5, 7, 5, 1, 2, 3, 7, 6, 5, 7, 4, 2, 4, 1, 5, 8, 1, 3 then t... |
Java 9 - Process API Improvements | In Java 9 Process API which is responsible to control and manage operating system processes has been improved considerably. ProcessHandle Class now provides process's native process ID, start time, accumulated CPU time, arguments, command, user, parent process, and descendants. ProcessHandle class also provides method ... | [
{
"code": null,
"e": 2588,
"s": 2109,
"text": "In Java 9 Process API which is responsible to control and manage operating system processes has been improved considerably. ProcessHandle Class now provides process's native process ID, start time, accumulated CPU time, arguments, command, user, parent ... |
PHP Escaping From HTML | PHP file can have mixed content with code within tags embedded in a HTML document. Code outside tags is ignored by the parser, leaving it to be interpreted by client browser. A HTML document can have multiple blocks of PHP, each inside <?php and ?> tags.
<p>
HTML block
</p>
<?php
//php block
..
..
?>
<p>
HTML block
</p... | [
{
"code": null,
"e": 1317,
"s": 1062,
"text": "PHP file can have mixed content with code within tags embedded in a HTML document. Code outside tags is ignored by the parser, leaving it to be interpreted by client browser. A HTML document can have multiple blocks of PHP, each inside <?php and ?> tags... |
How to plot bar graphs with same X coordinates side by side in Matplotlib? | To plot bar graphs with same X coordinates (G1, G2, G3, G4 and G5), side by side in matplotlib, we can take the following steps −
Create the following lists – labels, men_means and women_means with different data elements.
Create the following lists – labels, men_means and women_means with different data elements.
Retu... | [
{
"code": null,
"e": 1192,
"s": 1062,
"text": "To plot bar graphs with same X coordinates (G1, G2, G3, G4 and G5), side by side in matplotlib, we can take the following steps −"
},
{
"code": null,
"e": 1285,
"s": 1192,
"text": "Create the following lists – labels, men_means and w... |
Function overloading and const keyword in C++ | In C++, we can overload functions. Some functions are normal functions; some are constant type functions. Let us see one program and its output to get the idea about the constant functions and normal functions.
#include <iostream>
using namespace std;
class my_class {
public:
void my_func() const {
co... | [
{
"code": null,
"e": 1273,
"s": 1062,
"text": "In C++, we can overload functions. Some functions are normal functions; some are constant type functions. Let us see one program and its output to get the idea about the constant functions and normal functions."
},
{
"code": null,
"e": 1622,... |
How to draw a star in HTML5 SVG? | SVG stands for Scalable Vector Graphics and is a language for describing 2D-graphics and graphical applications in XML and the XML is then rendered by an SVG viewer. Most of the web browsers can display SVG just like they can display PNG, GIF, and JPG.
To draw a polygon in HTML SVG, use the SVG <polygon> element. The <... | [
{
"code": null,
"e": 1315,
"s": 1062,
"text": "SVG stands for Scalable Vector Graphics and is a language for describing 2D-graphics and graphical applications in XML and the XML is then rendered by an SVG viewer. Most of the web browsers can display SVG just like they can display PNG, GIF, and JPG."... |
Python - Remove keys with substring values - GeeksforGeeks | 31 Jan, 2022
Sometimes, while working with Python dictionaries, we can have a problem in which we need to remove keys whose values have substring as argument we pass. This problem can occur in cases of web development and day-day programming. Lets discuss certain ways in which this task can be performed.
Input : test_... | [
{
"code": null,
"e": 25555,
"s": 25527,
"text": "\n31 Jan, 2022"
},
{
"code": null,
"e": 25849,
"s": 25555,
"text": "Sometimes, while working with Python dictionaries, we can have a problem in which we need to remove keys whose values have substring as argument we pass. This prob... |
Java Program to Convert Integer List to Integer Array - GeeksforGeeks | 17 Jun, 2021
There are many ways to convert integer List to ArrayList where in this article we will be discussing out 2 approaches as below:
Using concept od streams in Java8Using Apache Commons LangUsing Guava Library
Using concept od streams in Java8
Using Apache Commons Lang
Using Guava Library
Method 1: Using conce... | [
{
"code": null,
"e": 25250,
"s": 25222,
"text": "\n17 Jun, 2021"
},
{
"code": null,
"e": 25378,
"s": 25250,
"text": "There are many ways to convert integer List to ArrayList where in this article we will be discussing out 2 approaches as below:"
},
{
"code": null,
"e"... |
Queries to check if the path between two nodes in a tree is a palindrome - GeeksforGeeks | 03 Sep, 2021
Given a tree with N nodes and N – 1 edges. Each edge of the tree is labeled by a string of lowercase english alphabets. You are given Q queries. In each query you are given two node x and y. For the path between x to y, the task is to check if it is possible to make a new palindrome string which use all th... | [
{
"code": null,
"e": 26175,
"s": 26147,
"text": "\n03 Sep, 2021"
},
{
"code": null,
"e": 26627,
"s": 26175,
"text": "Given a tree with N nodes and N – 1 edges. Each edge of the tree is labeled by a string of lowercase english alphabets. You are given Q queries. In each query you ... |
How to hide or show one record from an ng-repeat within a table based on ng-click? - GeeksforGeeks | 18 Oct, 2019
The way to hide or show a particular record in a table is similar to what is used to hide or show any elements of the DOM. The basic and the first thing that comes to mind is the ng-show and ng-hide directives which show or hides respectively based on binary results of the expressions bound to them. Anothe... | [
{
"code": null,
"e": 25814,
"s": 25786,
"text": "\n18 Oct, 2019"
},
{
"code": null,
"e": 26445,
"s": 25814,
"text": "The way to hide or show a particular record in a table is similar to what is used to hide or show any elements of the DOM. The basic and the first thing that comes... |
Destructuring Declarations in Kotlin - GeeksforGeeks | 02 Aug, 2019
Kotlin provides the programmer with a unique way to work with instances of a class, in the form of destructuring declarations. A destructuring declaration is the one that creates and initializes multiple variables at once.For example :
val (emp_id,salary) = employee
These multiple variables correspond to t... | [
{
"code": null,
"e": 25135,
"s": 25107,
"text": "\n02 Aug, 2019"
},
{
"code": null,
"e": 25371,
"s": 25135,
"text": "Kotlin provides the programmer with a unique way to work with instances of a class, in the form of destructuring declarations. A destructuring declaration is the o... |
Python | Alternate element summation in list - GeeksforGeeks | 29 Mar, 2019
The problem of getting summation of a list is quite generic and we might some day face the issue of getting the summation of alternate elements and get the list of 2 elements containing summation of alternate elements. Let’s discuss certain ways in which this can be performed.
Method #1 : Using list compre... | [
{
"code": null,
"e": 25607,
"s": 25579,
"text": "\n29 Mar, 2019"
},
{
"code": null,
"e": 25885,
"s": 25607,
"text": "The problem of getting summation of a list is quite generic and we might some day face the issue of getting the summation of alternate elements and get the list of... |
CSS | :only-child Selector - GeeksforGeeks | 17 Dec, 2018
The :only-child selector in CSS is used to match every element that is the only child of its parent. It represents an element without any siblings.
Syntax:
:only-child {
// CSS property
}
Example 1:
<!DOCTYPE html><html> <head> <title>:only-child selector</title> <style> h... | [
{
"code": null,
"e": 24889,
"s": 24861,
"text": "\n17 Dec, 2018"
},
{
"code": null,
"e": 25037,
"s": 24889,
"text": "The :only-child selector in CSS is used to match every element that is the only child of its parent. It represents an element without any siblings."
},
{
"... |
Difference between sh and bash - GeeksforGeeks | 21 Feb, 2022
bash and sh are two different shells of the Unix operating system. bash is sh, but with more features and better syntax. Bash is “Bourne Again SHell”, and is an improvement of the sh (original Bourne shell). Shell scripting is scripting in any shell, whereas Bash scripting is scripting specifically for Bas... | [
{
"code": null,
"e": 25755,
"s": 25727,
"text": "\n21 Feb, 2022"
},
{
"code": null,
"e": 26484,
"s": 25755,
"text": "bash and sh are two different shells of the Unix operating system. bash is sh, but with more features and better syntax. Bash is “Bourne Again SHell”, and is an im... |
Find the Kth position element of the given sequence - GeeksforGeeks | 07 Mar, 2022
Given two integers N and K, the task is to find the element at the Kth position if all odd numbers from 1 to N are written down in increasing order followed by all the even numbers from 1 to N in increasing order.Examples:
Input: N = 10, K = 3 Output: 5 The required sequence is 1, 3, 5, 7, 9, 2, 4, 6, 8 ... | [
{
"code": null,
"e": 25937,
"s": 25909,
"text": "\n07 Mar, 2022"
},
{
"code": null,
"e": 26162,
"s": 25937,
"text": "Given two integers N and K, the task is to find the element at the Kth position if all odd numbers from 1 to N are written down in increasing order followed by all... |
Cisco ASA Redistribution example - GeeksforGeeks | 22 Nov, 2021
Prerequisite – Adaptive security appliance (ASA) In real scenarios, a condition can occur where an organization routes are using more than one routing protocol (EIGRP, OSPF, or RIP). Also, static or default routing is being used. Now, the routes learned by one means (dynamic or static routing) should be re... | [
{
"code": null,
"e": 26101,
"s": 26073,
"text": "\n22 Nov, 2021"
},
{
"code": null,
"e": 26503,
"s": 26101,
"text": "Prerequisite – Adaptive security appliance (ASA) In real scenarios, a condition can occur where an organization routes are using more than one routing protocol (EI... |
What are transmission and propagation delay? | Network delay is defined as how much time will take a bit of data to travel from one node to another node.
Network delay can be divided into following ways −
Transmission delay
Propagation delay
Let us learn about both of them in detail.
It is the time required to put a packet’s bit (or data bits) on the transmission m... | [
{
"code": null,
"e": 1169,
"s": 1062,
"text": "Network delay is defined as how much time will take a bit of data to travel from one node to another node."
},
{
"code": null,
"e": 1220,
"s": 1169,
"text": "Network delay can be divided into following ways −"
},
{
"code": nu... |
Determining If an Object Is an Array in Java | In order to determine if an object is an Object is an array in Java, we use the isArray() and getClass() methods.
The isArray() method checks whether the passed argument is an array. It returns a boolean value, either true or false
Syntax - The isArray() method has the following syntax -
Array.isArray(obj)
The getClass... | [
{
"code": null,
"e": 1176,
"s": 1062,
"text": "In order to determine if an object is an Object is an array in Java, we use the isArray() and getClass() methods."
},
{
"code": null,
"e": 1294,
"s": 1176,
"text": "The isArray() method checks whether the passed argument is an array.... |
How to get all properties and methods available for the service in PowerShell? | To display all the properties and methods available for the get-service cmdlet you need to pipeline Get-Member (alias gm). MemberType ‘Property’ is to display the specific property like machinename, servicename, etc. and with the MemberType ‘Method’ you can perform specific operations on the object, for example, Start,... | [
{
"code": null,
"e": 1413,
"s": 1062,
"text": "To display all the properties and methods available for the get-service cmdlet you need to pipeline Get-Member (alias gm). MemberType ‘Property’ is to display the specific property like machinename, servicename, etc. and with the MemberType ‘Method’ you... |
How to reset or clear an edit box in Selenium? | We can reset or clear an edit box in Selenium with the help of clear() method.
Code Implementation with clear().
import org.openqa.selenium.By;
import org.openqa.selenium.Keys;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.WebElement;
import org.openqa.selenium.chrome.ChromeDriver;
import java.util.c... | [
{
"code": null,
"e": 1141,
"s": 1062,
"text": "We can reset or clear an edit box in Selenium with the help of clear() method."
},
{
"code": null,
"e": 1175,
"s": 1141,
"text": "Code Implementation with clear()."
},
{
"code": null,
"e": 2074,
"s": 1175,
"text":... |
Maximum sum combination from the given array - GeeksforGeeks | 20 Jul, 2021
Given an array arr[] of N integers and three integers X, Y and Z. The task is to find the maximum value of (arr[i] * X) + (arr[j] * Y) + (arr[k] * Z) where 0 ≤ i ≤ j ≤ k ≤ N – 1.
Examples:
Input: arr[] = {1, 5, -3, 4, -2}, X = 2, Y = 1, Z = -1 Output: 18 (2 * 5) + (1 * 5) + (-1 * -3) = 18 is the maximum p... | [
{
"code": null,
"e": 24429,
"s": 24401,
"text": "\n20 Jul, 2021"
},
{
"code": null,
"e": 24608,
"s": 24429,
"text": "Given an array arr[] of N integers and three integers X, Y and Z. The task is to find the maximum value of (arr[i] * X) + (arr[j] * Y) + (arr[k] * Z) where 0 ≤ i ≤... |
Time Series Anomaly Detection with PyCaret | by Moez Ali | Towards Data Science | This is a step-by-step, beginner-friendly tutorial on detecting anomalies in time series data using PyCaret’s Unsupervised Anomaly Detection Module.
What is Anomaly Detection? Types of Anomaly Detection.
Anomaly Detection use-case in business.
Training and evaluating anomaly detection model using PyCaret.
Label anomali... | [
{
"code": null,
"e": 196,
"s": 47,
"text": "This is a step-by-step, beginner-friendly tutorial on detecting anomalies in time series data using PyCaret’s Unsupervised Anomaly Detection Module."
},
{
"code": null,
"e": 251,
"s": 196,
"text": "What is Anomaly Detection? Types of An... |
How to keep your PC awake automatically using Python? - GeeksforGeeks | 03 Jan, 2021
In this article, we are going to discuss how to keep your PC awake using Python. In order to perform this task, we are going to use an external Python module.
Here we will be using a python package PyAutoGUI (cross-platform GUI automation Python module used to programmatically control the mouse & keyboard... | [
{
"code": null,
"e": 23901,
"s": 23873,
"text": "\n03 Jan, 2021"
},
{
"code": null,
"e": 24061,
"s": 23901,
"text": "In this article, we are going to discuss how to keep your PC awake using Python. In order to perform this task, we are going to use an external Python module. "
... |
Count number of substrings with numeric value greater than X - GeeksforGeeks | 25 May, 2021
Given a string ‘S’ (composed of digits) and an integer ‘X”, the task is to count all the sub-strings of ‘S’ that satisfy the following conditions:
The sub-string must not begin with the digit ‘0’.
And the numeric number it represents must be greater than ‘X’.
Note: Two ways of selecting a sub-string are ... | [
{
"code": null,
"e": 25127,
"s": 25099,
"text": "\n25 May, 2021"
},
{
"code": null,
"e": 25276,
"s": 25127,
"text": "Given a string ‘S’ (composed of digits) and an integer ‘X”, the task is to count all the sub-strings of ‘S’ that satisfy the following conditions: "
},
{
... |
How to compare attributes of different objects in MongoDB object array? | To compare attributes, use letalongwithindexOfArray. Let us first create a collection with documents −
> db.demo366.insertOne(
... {
...
... "Name" : "Chris",
... "details" : [
... {
... "Id" : "John1",
... "value" : "test"
... },
... {
... "Id" : "John2",
...... | [
{
"code": null,
"e": 1165,
"s": 1062,
"text": "To compare attributes, use letalongwithindexOfArray. Let us first create a collection with documents −"
},
{
"code": null,
"e": 1599,
"s": 1165,
"text": "> db.demo366.insertOne(\n... {\n...\n... \"Name\" : \"Chris\",\n... ... |
4 Libraries that can perform EDA in one line of python code | by Satyam Kumar | Towards Data Science | Exploratory data analysis (EDA) is an approach to analyze the data and find patterns, visual insights, etc. that the data set is having, before proceeding to model. One spends a lot of time doing EDA to get a better understanding of data, that can be minimized by using auto visualizations tools such as Pandas-profiling... | [
{
"code": null,
"e": 522,
"s": 171,
"text": "Exploratory data analysis (EDA) is an approach to analyze the data and find patterns, visual insights, etc. that the data set is having, before proceeding to model. One spends a lot of time doing EDA to get a better understanding of data, that can be mini... |
Find root of the tree where children id sum for every node is given - GeeksforGeeks | 25 May, 2021
Consider a binary tree whose nodes have ids from 1 to n where n is number of nodes in the tree. The tree is given as a collection of n pairs, where every pair represents node id and sum of children ids.Examples:
Input : 1 5
2 0
3 0
4 0
5 5
6 5
Output: 6
Explanation... | [
{
"code": null,
"e": 35455,
"s": 35427,
"text": "\n25 May, 2021"
},
{
"code": null,
"e": 35669,
"s": 35455,
"text": "Consider a binary tree whose nodes have ids from 1 to n where n is number of nodes in the tree. The tree is given as a collection of n pairs, where every pair repr... |
Scala Iterator slice() method with example - GeeksforGeeks | 06 Jun, 2019
The slice() method belongs to the concrete value members of the class AbstractIterator. It is defined in the class Iterator. It creates a new iterator for the interval given in the slice. The first value present in the slice indicates the start of the element in the new iterator and the second value presen... | [
{
"code": null,
"e": 23637,
"s": 23609,
"text": "\n06 Jun, 2019"
},
{
"code": null,
"e": 23978,
"s": 23637,
"text": "The slice() method belongs to the concrete value members of the class AbstractIterator. It is defined in the class Iterator. It creates a new iterator for the inte... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.