title stringlengths 3 221 | text stringlengths 17 477k | parsed listlengths 0 3.17k |
|---|---|---|
C# | Math.Abs() Method | Set - 1 - GeeksforGeeks | 01 Feb, 2019
In C#, Abs() is a Math class method which is used to return the absolute value of a specified number. This method can be overload by passing the different type of parameters to it.
Math.Abs(Decimal)Math.Abs(Double)Math.Abs(Int16)Math.Abs(Int32)Math.Abs(Int64)Math.Abs(SByte)Math.Abs(Single)Math.Abs(Decimal)... | [
{
"code": null,
"e": 25777,
"s": 25749,
"text": "\n01 Feb, 2019"
},
{
"code": null,
"e": 25958,
"s": 25777,
"text": "In C#, Abs() is a Math class method which is used to return the absolute value of a specified number. This method can be overload by passing the different type of ... |
strrev() function in PHP | The strrev() function is used to reverse a string. It returns the reversed string.
strrev(str)
str − The string to be reversed
str − The string to be reversed
The strrev() function returns the reversed string.
The following is an example −
Live Demo
<?php
echo strrev("Jack");
?>
The following is the output −
kcaJ
L... | [
{
"code": null,
"e": 1145,
"s": 1062,
"text": "The strrev() function is used to reverse a string. It returns the reversed string."
},
{
"code": null,
"e": 1157,
"s": 1145,
"text": "strrev(str)"
},
{
"code": null,
"e": 1189,
"s": 1157,
"text": "str − The string... |
Merge two arrays using C# AddRange() method | Firstly, set two arrays −
int[] arr1 = { 15, 20, 27, 56 };
int[] arr2 = { 62, 69, 76, 92 };
Now create a new list and use AddRange() method to merge −
var myList = new List<int>();
myList.AddRange(arr1);
myList.AddRange(arr2);
After that, convert the merged collection to an array −
int[] arr3 = myList.ToArray()
Let us ... | [
{
"code": null,
"e": 1088,
"s": 1062,
"text": "Firstly, set two arrays −"
},
{
"code": null,
"e": 1154,
"s": 1088,
"text": "int[] arr1 = { 15, 20, 27, 56 };\nint[] arr2 = { 62, 69, 76, 92 };"
},
{
"code": null,
"e": 1213,
"s": 1154,
"text": "Now create a new l... |
Hyperparameters of Decision Trees Explained with Visualizations | by Soner Yıldırım | Towards Data Science | Decision tree is a widely-used supervised learning algorithm which is suitable for both classification and regression tasks. Decision trees serve as building blocks for some prominent ensemble learning algorithms such as random forests, GBDT, and XGBOOST.
A decision tree builds upon iteratively asking questions to part... | [
{
"code": null,
"e": 428,
"s": 172,
"text": "Decision tree is a widely-used supervised learning algorithm which is suitable for both classification and regression tasks. Decision trees serve as building blocks for some prominent ensemble learning algorithms such as random forests, GBDT, and XGBOOST.... |
How to convert Decimal to Hexadecimal in Java | To convert decimal to hexadecimal, use any of the two methods i.e.
Integer.toHexString() − It returns a string representation of the integer argument as an unsigned integer in base 16.
Integer.toHexString() − It returns a string representation of the integer argument as an unsigned integer in base 16.
Integer.parseInt(... | [
{
"code": null,
"e": 1129,
"s": 1062,
"text": "To convert decimal to hexadecimal, use any of the two methods i.e."
},
{
"code": null,
"e": 1247,
"s": 1129,
"text": "Integer.toHexString() − It returns a string representation of the integer argument as an unsigned integer in base 1... |
Create Reusable ML Modules with MLflow Projects & Docker | by George Novack | Towards Data Science | Let’s face it, getting a Machine Learning model into production isn’t easy. From pulling together data from disparate sources to tuning hyperparameters and evaluating model performance, there are so many different steps from sandbox to production that, if we’re not careful, can and will end up scattered across a number... | [
{
"code": null,
"e": 870,
"s": 172,
"text": "Let’s face it, getting a Machine Learning model into production isn’t easy. From pulling together data from disparate sources to tuning hyperparameters and evaluating model performance, there are so many different steps from sandbox to production that, if... |
Batch Script - Reading from the Registry | Reading from the registry is done via the REG QUERY command. This command can be used to retrieve values of any key from within the registry.
REG QUERY [ROOT\]RegKey /v ValueName [/s]
REG QUERY [ROOT\]RegKey /ve --This returns the (default) value
Where RegKey is the key which needs to be searched for in the registry.... | [
{
"code": null,
"e": 2311,
"s": 2169,
"text": "Reading from the registry is done via the REG QUERY command. This command can be used to retrieve values of any key from within the registry."
},
{
"code": null,
"e": 2418,
"s": 2311,
"text": "REG QUERY [ROOT\\]RegKey /v ValueName [/... |
Aptitude - Arithmetic Online Quiz | Following quiz provides Multiple Choice Questions (MCQs) related to Basic Arithmetic. You will have to read all the given answers and click over the correct answer. If you are not sure about the answer then you can check the answer using Show Answer button. You can use Next Quiz button to check new set of questions in ... | [
{
"code": null,
"e": 4222,
"s": 3892,
"text": "Following quiz provides Multiple Choice Questions (MCQs) related to Basic Arithmetic. You will have to read all the given answers and click over the correct answer. If you are not sure about the answer then you can check the answer using Show Answer but... |
Understanding the Effect of Bagging on Variance and Bias visually | by Dr. Robert Kübler | Towards Data Science | There exist a vast amount of great articles describing how Bagging methods like Random Forests work on an algorithmic level and why Bagging is a good thing to do. Usually, the essence is the following:
“You train a lot of Decision Trees on different parts of the training set and average their predictions into a final p... | [
{
"code": null,
"e": 374,
"s": 172,
"text": "There exist a vast amount of great articles describing how Bagging methods like Random Forests work on an algorithmic level and why Bagging is a good thing to do. Usually, the essence is the following:"
},
{
"code": null,
"e": 653,
"s": 37... |
Cocktail Sort - GeeksforGeeks | 03 Mar, 2022
Cocktail Sort is a variation of Bubble sort. The Bubble sort algorithm always traverses elements from left and moves the largest element to its correct position in first iteration and second largest in second iteration and so on. Cocktail Sort traverses through a given array in both directions alternativel... | [
{
"code": null,
"e": 23854,
"s": 23826,
"text": "\n03 Mar, 2022"
},
{
"code": null,
"e": 24236,
"s": 23854,
"text": "Cocktail Sort is a variation of Bubble sort. The Bubble sort algorithm always traverses elements from left and moves the largest element to its correct position in... |
How does Selenium Webdriver handle the SSL certificate in Edge? | We can handle SSL certificates in Edge browser with Selenium webdriver. This is done with the help of the EdgeOptions class. We shall create an object of this class and set the parameter setAcceptInsecureCerts to the true value.
Finally, this information has to be passed to the webdriver object to get the desired brows... | [
{
"code": null,
"e": 1291,
"s": 1062,
"text": "We can handle SSL certificates in Edge browser with Selenium webdriver. This is done with the help of the EdgeOptions class. We shall create an object of this class and set the parameter setAcceptInsecureCerts to the true value."
},
{
"code": nu... |
Java & MySQL - Environment Setup | To start developing with JDBC, you should setup your JDBC environment by following the steps shown below. We assume that you are working on a Windows platform.
Java SE is available for download for free. To download click here, please download a version compatible with your operating system.
Follow the instructions to ... | [
{
"code": null,
"e": 2846,
"s": 2686,
"text": "To start developing with JDBC, you should setup your JDBC environment by following the steps shown below. We assume that you are working on a Windows platform."
},
{
"code": null,
"e": 2979,
"s": 2846,
"text": "Java SE is available f... |
How do you check if a ResultSet is closed or not in JDBC? | Whenever we execute SQL statements using the executeQuery() method, it returns a ResultSet object which holds the tabular data returned by the SELECT queries(in general).
The ResultSet object contains a cursor/pointer which points to the current row. Initially this cursor is positioned before first row (default positio... | [
{
"code": null,
"e": 1233,
"s": 1062,
"text": "Whenever we execute SQL statements using the executeQuery() method, it returns a ResultSet object which holds the tabular data returned by the SELECT queries(in general)."
},
{
"code": null,
"e": 1386,
"s": 1233,
"text": "The ResultS... |
Fast and Robust Sliding Window Vectorization with NumPy | by Syafiq Kamarul Azman | Towards Data Science | Once in a while, you get to work with the underdog of the data world: time series (images and natural language have been in the limelight a lot, recently!). I’ve been lucky (or unlucky) enough to have had to work on time series data for the most part of last year. Among my adventures in the wacky world of 1-dimensional... | [
{
"code": null,
"e": 735,
"s": 172,
"text": "Once in a while, you get to work with the underdog of the data world: time series (images and natural language have been in the limelight a lot, recently!). I’ve been lucky (or unlucky) enough to have had to work on time series data for the most part of l... |
XSD - Quick Guide | XML Schema Definition, commonly known as XSD, is a way to describe precisely the XML language. XSD checks the validity of structure and vocabulary of an XML document against the grammatical rules of the appropriate XML language.
An XML document can be defined as −
Well-formed − If the XML document adheres to all the ge... | [
{
"code": null,
"e": 1933,
"s": 1704,
"text": "XML Schema Definition, commonly known as XSD, is a way to describe precisely the XML language. XSD checks the validity of structure and vocabulary of an XML document against the grammatical rules of the appropriate XML language."
},
{
"code": nu... |
Traffic Intersection Simulation using Pygame, Part 2 | by Mihir Gandhi | Towards Data Science | In this article, we will be adding some more features to the simulation developed in my previous article. This updated simulation will represent real-life scenario more closely and can be used effectively in Data Analysis tasks or AI applications. First, we will be adding turning functionality to the vehicles being gen... | [
{
"code": null,
"e": 1098,
"s": 171,
"text": "In this article, we will be adding some more features to the simulation developed in my previous article. This updated simulation will represent real-life scenario more closely and can be used effectively in Data Analysis tasks or AI applications. First,... |
Python MySQL – GROUP BY and HAVING Clause | 09 May, 2021
In this article, we will see how to perform groupby() and HAVING() operations on SQL using Python. Here we will consider a college database to perform group by operation on the department with respect to student strength.
The GROUP BY statement groups rows that have the same values into single based on the... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n09 May, 2021"
},
{
"code": null,
"e": 250,
"s": 28,
"text": "In this article, we will see how to perform groupby() and HAVING() operations on SQL using Python. Here we will consider a college database to perform group by operation on th... |
SQL Query to Rename Database | 08 Oct, 2021
ALTER SQL command is a DDL (Data Definition Language) statement. ALTER is used to update the structure of the table in the database (like add, delete, modify the attributes of the tables in the database).In this article, we will look at how to rename a database in the SQL server by using the ALTER-Modify k... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n08 Oct, 2021"
},
{
"code": null,
"e": 426,
"s": 28,
"text": "ALTER SQL command is a DDL (Data Definition Language) statement. ALTER is used to update the structure of the table in the database (like add, delete, modify the attributes of... |
Find number of days between two given dates | 05 Nov, 2021
Given two dates, find total number of days between them. The count of days must be calculated in O(1) time and O(1) auxiliary space.
Examples:
Input: dt1 = {10, 2, 2014}
dt2 = {10, 3, 2015}
Output: 393
dt1 represents "10-Feb-2014" and dt2 represents "10-Mar-2015"
The difference is 365 + 28
Input:... | [
{
"code": null,
"e": 54,
"s": 26,
"text": "\n05 Nov, 2021"
},
{
"code": null,
"e": 188,
"s": 54,
"text": "Given two dates, find total number of days between them. The count of days must be calculated in O(1) time and O(1) auxiliary space. "
},
{
"code": null,
"e": 199... |
Create Array of Zeros in MATLAB | 04 Jul, 2021
MATLAB generally stores its variables in matrix forms, also in array and vector form. Sometimes, we often need a matrix(or array or vector) of zero(s) for some specific operations. We can create a matrix of zero(s) manually or with the help of the in-built function of MATLAB. The in-built function that is ... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n04 Jul, 2021"
},
{
"code": null,
"e": 612,
"s": 28,
"text": "MATLAB generally stores its variables in matrix forms, also in array and vector form. Sometimes, we often need a matrix(or array or vector) of zero(s) for some specific operat... |
Python – Replace vowels by next vowel | 14 Oct, 2020
Given a String replace each vowel with next vowel in series.
Input : test_str = ‘geekforgeeks’Output : giikfurgiiksExplanation : After e, next vowel is i, all e replaced by i.
Input : test_str = ‘geekforgeeks is best’Output : giikfurgiiks os bistExplanation : After e, next vowel is i, all e replaced by i.
... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n14 Oct, 2020"
},
{
"code": null,
"e": 89,
"s": 28,
"text": "Given a String replace each vowel with next vowel in series."
},
{
"code": null,
"e": 204,
"s": 89,
"text": "Input : test_str = ‘geekforgeeks’Output : giikf... |
How to iterate through a Vector without using Iterators in C++ | 01 Jun, 2020
Prerequisite: C++ STL, Iterators in C++ STL
The iterator is not the only way to iterate through any STL container. There exists a better and efficient way to iterate through vector without using iterators. It can be iterated using the values stored in any container. Below is the syntax for the same for vec... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n01 Jun, 2020"
},
{
"code": null,
"e": 96,
"s": 52,
"text": "Prerequisite: C++ STL, Iterators in C++ STL"
},
{
"code": null,
"e": 365,
"s": 96,
"text": "The iterator is not the only way to iterate through any STL con... |
NumPy – 3D matrix multiplication | 12 Nov, 2020
A 3D matrix is nothing but a collection (or a stack) of many 2D matrices, just like how a 2D matrix is a collection/stack of many 1D vectors. So, matrix multiplication of 3D matrices involves multiple multiplications of 2D matrices, which eventually boils down to a dot product between their row/column vect... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n12 Nov, 2020"
},
{
"code": null,
"e": 364,
"s": 52,
"text": "A 3D matrix is nothing but a collection (or a stack) of many 2D matrices, just like how a 2D matrix is a collection/stack of many 1D vectors. So, matrix multiplication of 3D ... |
numpy matrix operations | repmat() function | 21 Feb, 2019
numpy.matlib.repmat() is another function for doing matrix operations in numpy. It returns Repeat a 0-D, 1-D or 2-D array or matrix M x N times.
Syntax : numpy.matlib.repmat(a, m, n)
Parameters :a : [array_like] The input array or matrix which to be repeated.m, n : [int] The number of times a is repeated a... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n21 Feb, 2019"
},
{
"code": null,
"e": 173,
"s": 28,
"text": "numpy.matlib.repmat() is another function for doing matrix operations in numpy. It returns Repeat a 0-D, 1-D or 2-D array or matrix M x N times."
},
{
"code": null,
... |
Function Interface in Java with Examples | 08 Dec, 2021
The Function Interface is a part of the java.util.function package which has been introduced since Java 8, to implement functional programming in Java. It represents a function which takes in one argument and produces a result. Hence this functional interface takes in 2 generics namely as follows:
T: denot... | [
{
"code": null,
"e": 54,
"s": 26,
"text": "\n08 Dec, 2021"
},
{
"code": null,
"e": 353,
"s": 54,
"text": "The Function Interface is a part of the java.util.function package which has been introduced since Java 8, to implement functional programming in Java. It represents a functi... |
Observer Pattern | Set 2 (Implementation) | 12 Feb, 2018
We strongly recommend to refer below Set 1 before moving on to this post.
Observer Pattern -Introduction
In Set 1, we discussed below problem, a solution for the problem without Observer pattern and problems with the solution.
Suppose we are building a cricket app that notifies viewers about the informatio... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n12 Feb, 2018"
},
{
"code": null,
"e": 126,
"s": 52,
"text": "We strongly recommend to refer below Set 1 before moving on to this post."
},
{
"code": null,
"e": 157,
"s": 126,
"text": "Observer Pattern -Introduction"... |
Python – seaborn.swarmplot() method | 18 Aug, 2020
Prerequisite : Fundamentals of Seaborn
Seaborn is a Python data visualization library based on matplotlib. It provides a high-level interface for drawing attractive and informative statistical graphics. There is just something extraordinary about a well-designed visualization. The colors stand out, the lay... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n18 Aug, 2020"
},
{
"code": null,
"e": 91,
"s": 52,
"text": "Prerequisite : Fundamentals of Seaborn"
},
{
"code": null,
"e": 530,
"s": 91,
"text": "Seaborn is a Python data visualization library based on matplotlib. ... |
MongoDB insertMany() Method – db.Collection.insertMany() | 28 Jan, 2021
The insertMany() method inserts one or more documents in the collection. It takes array of documents to insert in the collection.
By default, documents are inserted in the given order if you want to insert documents in unordered, then set the value of ordered to false.
Using this method you can also creat... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n28 Jan, 2021"
},
{
"code": null,
"e": 183,
"s": 52,
"text": "The insertMany() method inserts one or more documents in the collection. It takes array of documents to insert in the collection. "
},
{
"code": null,
"e": 323,
... |
Exchange first and last nodes in Circular Linked List | 23 Jun, 2022
Given Circular linked list exchange the first and the last node. The task should be done with only one extra node, you can not declare more than one extra node, and also you are not allowed to declare any other temporary variable. Note: Extra node means the need of a node to traverse a list.
Examples:
I... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n23 Jun, 2022"
},
{
"code": null,
"e": 347,
"s": 52,
"text": "Given Circular linked list exchange the first and the last node. The task should be done with only one extra node, you can not declare more than one extra node, and also you ... |
Django Basic App Model – Makemigrations and Migrate | 11 Feb, 2020
In this article, we will create a basic model of an app. Say, we have a project geeksforgeeks in which we will create a new app in order to simplify and make independent model units.
To create an app run command through terminal :
python manage.py startapp geeks
and add geeks to INSTALLED_APPS list in sett... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n11 Feb, 2020"
},
{
"code": null,
"e": 235,
"s": 52,
"text": "In this article, we will create a basic model of an app. Say, we have a project geeksforgeeks in which we will create a new app in order to simplify and make independent mode... |
Teradata - Statistics | Teradata optimizer comes up with an execution strategy for every SQL query. This execution strategy is based on the statistics collected on the tables used within the SQL query. Statistics on the table is collected using COLLECT STATISTICS command. Optimizer requires environment information and data demographics to com... | [
{
"code": null,
"e": 3122,
"s": 2764,
"text": "Teradata optimizer comes up with an execution strategy for every SQL query. This execution strategy is based on the statistics collected on the tables used within the SQL query. Statistics on the table is collected using COLLECT STATISTICS command. Opti... |
Maximum element in min heap | 28 May, 2021
Given a min heap, find the maximum element present in the heap.Examples:
Input : 10
/ \
25 23
/ \ / \
45 30 50 40
Output : 50
Input : 20
/ \
40 28
Output : 40
Brute force approach: We can check all the nodes in th... | [
{
"code": null,
"e": 54,
"s": 26,
"text": "\n28 May, 2021"
},
{
"code": null,
"e": 129,
"s": 54,
"text": "Given a min heap, find the maximum element present in the heap.Examples: "
},
{
"code": null,
"e": 307,
"s": 129,
"text": "Input : 10 \n /... |
Select First Row of Each Group in DataFrame in R | 23 Sep, 2021
In this article, we will discuss how to select the first row of each group in Dataframe using R programming language.
The duplicated() method is used to determine which of the elements of a dataframe are duplicates of other elements. The method returns a logical vector which tells which of the rows of the ... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n23 Sep, 2021"
},
{
"code": null,
"e": 146,
"s": 28,
"text": "In this article, we will discuss how to select the first row of each group in Dataframe using R programming language."
},
{
"code": null,
"e": 362,
"s": 146,
... |
How to get Pixel from HTML Canvas ? | 22 Nov, 2019
To get the pixel of any specific portion from HTML canvas you can use the HTML canvas getImageData() Method. The getImageData() method usually returns an ImageData object that contains the pixel information of the specified object on the HTML canvas.
Example 1: This example will display each pixel value of... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n22 Nov, 2019"
},
{
"code": null,
"e": 279,
"s": 28,
"text": "To get the pixel of any specific portion from HTML canvas you can use the HTML canvas getImageData() Method. The getImageData() method usually returns an ImageData object that... |
What is the difference between List and IList in C#? | The main difference between List and IList in C# is that List is a class that represents a list of objects which can be accessed by index while IList is an interface that represents a collection of objects which can be accessed by index. The IList interface implemented from two interfaces and they are ICollection and I... | [
{
"code": null,
"e": 1519,
"s": 1187,
"text": "The main difference between List and IList in C# is that List is a class that represents a list of objects which can be accessed by index while IList is an interface that represents a collection of objects which can be accessed by index. The IList inter... |
How can I trigger a JavaScript click event? | To trigger a JavaScript click event, let us see the example of mouse hover.
Live Demo
<!DOCTYPE html>
<html>
<body>
<p>Hover over the button.</p>
<form>
<input type="button" id="test" value="Hover" onmouseover="display()" onclick="alert('click event')">
</form>
<script>
func... | [
{
"code": null,
"e": 1263,
"s": 1187,
"text": "To trigger a JavaScript click event, let us see the example of mouse hover."
},
{
"code": null,
"e": 1273,
"s": 1263,
"text": "Live Demo"
},
{
"code": null,
"e": 1623,
"s": 1273,
"text": "<!DOCTYPE html>\n<html>\n... |
Python – List of tuples to multiple lists | 23 Aug, 2021
In this article, we will discuss how to convert a List of tuples to multiple lists. We can convert lit of tuples to multiple lists by using the map() function
Syntax: map(list, zip(*list_of_tuples)
Example:
Input: [('a', 'b', 'c'), (1,2,3), ('1','3','4')]
Output: ['a', 'b', 'c'], [1, 2, 3], ('1', '3', '4')... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n23 Aug, 2021"
},
{
"code": null,
"e": 187,
"s": 28,
"text": "In this article, we will discuss how to convert a List of tuples to multiple lists. We can convert lit of tuples to multiple lists by using the map() function"
},
{
"c... |
HTML | accesskey Attribute | 10 Aug, 2021
The accesskey attribute in HTML is the keyboard shortcuts to activate/focus specific elements. The access key attribute is browser dependent. It may vary from browser to browser.Supported Tags: It supports all HTML elements.
Syntax:
<element accessKey = "single_character">
Shortcut to use access key: Th... | [
{
"code": null,
"e": 53,
"s": 25,
"text": "\n10 Aug, 2021"
},
{
"code": null,
"e": 279,
"s": 53,
"text": "The accesskey attribute in HTML is the keyboard shortcuts to activate/focus specific elements. The access key attribute is browser dependent. It may vary from browser to brow... |
Random Forest Approach for Classification in R Programming | 08 Jul, 2020
Random forest approach is supervised nonlinear classification and regression algorithm. Classification is a process of classifying a group of datasets in categories or classes. As random forest approach can use classification or regression techniques depending upon the user and target or categories needed.... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n08 Jul, 2020"
},
{
"code": null,
"e": 960,
"s": 28,
"text": "Random forest approach is supervised nonlinear classification and regression algorithm. Classification is a process of classifying a group of datasets in categories or classes... |
Psutil module in Python | 21 Sep, 2021
Psutil is a Python cross-platform library used to access system details and process utilities. It is used to keep track of various resources utilization in the system. Usage of resources like CPU, memory, disks, network, sensors can be monitored. Hence, this library is used for system monitoring, profiling... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n21 Sep, 2021"
},
{
"code": null,
"e": 462,
"s": 28,
"text": "Psutil is a Python cross-platform library used to access system details and process utilities. It is used to keep track of various resources utilization in the system. Usage o... |
How to Push a Container Image to a Docker Repository? | 30 Sep, 2021
In this article we will look into how you can push a container image to a Docker Repo. We’re going to use Docker Hub as a container registry, that we’re going to push our Docker image to.
Follow the below steps to push container Image to Docker repository:
Step 1: The first thing you need to do is make su... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n30 Sep, 2021"
},
{
"code": null,
"e": 217,
"s": 28,
"text": "In this article we will look into how you can push a container image to a Docker Repo. We’re going to use Docker Hub as a container registry, that we’re going to push our Dock... |
Compilation and Execution of a Java Program | 01 Oct, 2021
Java, being a platform-independent programming language, doesn’t work on the one-step compilation. Instead, it involves a two-step execution, first through an OS-independent compiler; and second, in a virtual machine (JVM) which is custom-built for every operating system.
The two principal stages are expl... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n01 Oct, 2021"
},
{
"code": null,
"e": 326,
"s": 52,
"text": "Java, being a platform-independent programming language, doesn’t work on the one-step compilation. Instead, it involves a two-step execution, first through an OS-independent ... |
Two nodes of a BST are swapped, correct the BST | 20 Jun, 2022
Two of the nodes of a Binary Search Tree (BST) are swapped. Fix (or correct) the BST.
Input Tree:
10
/ \
5 8
/ \
2 20
In the above tree, nodes 20 and 8 must be swapped to fix the tree.
Following is the output tree
10
/ \
5 20
/ ... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n20 Jun, 2022"
},
{
"code": null,
"e": 139,
"s": 52,
"text": "Two of the nodes of a Binary Search Tree (BST) are swapped. Fix (or correct) the BST. "
},
{
"code": null,
"e": 372,
"s": 139,
"text": "Input Tree:\n ... |
How to read numbers in CSV files in Python? | 12 Dec, 2021
Prerequisites: Reading and Writing data in CSV, Creating CSV files
CSV is a Comma-Separated Values file, which allows plain-text data to be saved in a tabular format. These files are stored in our system with a .csv extension. CSV files differ from other spreadsheet file types (like Microsoft Excel) becau... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n12 Dec, 2021"
},
{
"code": null,
"e": 96,
"s": 28,
"text": "Prerequisites: Reading and Writing data in CSV, Creating CSV files "
},
{
"code": null,
"e": 473,
"s": 96,
"text": "CSV is a Comma-Separated Values file, wh... |
B*-Trees implementation in C++ | 30 Jul, 2019
B*-tree of order m is a search tree that is either empty or that satisfies three properties:
The root node has minimum two and maximum 2 floor ((2m-2)/3) +1 children
Other internal nodes have the minimum floor ((2m-1)/3) and maximum m children
All external nodes are on the same level.
The advantage of usin... | [
{
"code": null,
"e": 54,
"s": 26,
"text": "\n30 Jul, 2019"
},
{
"code": null,
"e": 147,
"s": 54,
"text": "B*-tree of order m is a search tree that is either empty or that satisfies three properties:"
},
{
"code": null,
"e": 220,
"s": 147,
"text": "The root nod... |
Write a program that produces different results in C and C++ | 29 May, 2017
Write a program that compiles and runs both in C and C++, but produces different results when compiled by C and C++ compilers.
There can be many such programs, following are some of them.
1) Character literals are treated differently in C and C++. In C character literals like ‘a’, ‘b’, ..etc are treated as... | [
{
"code": null,
"e": 54,
"s": 26,
"text": "\n29 May, 2017"
},
{
"code": null,
"e": 181,
"s": 54,
"text": "Write a program that compiles and runs both in C and C++, but produces different results when compiled by C and C++ compilers."
},
{
"code": null,
"e": 242,
"... |
Smallest number greater than or equal to N having sum of digits not exceeding S | 13 Apr, 2021
Given integer N and integer S, the task is to find the smallest number greater than or equal to N such that the sum of its digits does not exceed S.
Examples:
Input: N = 3, S = 2Output: 10Explanation: Sum of digits of 10 is 1, which is less than 2.
Input: N = 19, S = 3Output: 20Explanation: Sum of digits o... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n13 Apr, 2021"
},
{
"code": null,
"e": 177,
"s": 28,
"text": "Given integer N and integer S, the task is to find the smallest number greater than or equal to N such that the sum of its digits does not exceed S."
},
{
"code": null... |
Python – Get particular Nested level Items from Dictionary | 24 Oct, 2020
Given a dictionary, extract items from particular level.
Examples:
Input : {“Gfg” : { “n1”: 3, “nd2”: { “n2” : 6 }}, “is” : { “ne1”: 5, “ndi2”: { “ne2” : 8, “ne22” : 10 } }}, K = 2 Output : {‘n2’: 6, ‘ne2’: 8, ‘ne22’: 10} Explanation : 2nd nesting items are extracted.
Input : {“Gfg” : { “n1”: 3, “nd2”: { ... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n24 Oct, 2020"
},
{
"code": null,
"e": 85,
"s": 28,
"text": "Given a dictionary, extract items from particular level."
},
{
"code": null,
"e": 95,
"s": 85,
"text": "Examples:"
},
{
"code": null,
"e": 298,
... |
C# | Convert Stack to array | 01 Feb, 2019
Stack represents a last-in, first out collection of object. It is used when you need a last-in, first-out access of items. When you add an item in the list, it is called pushing the item and when you remove it, it is called popping the item. Stack<T>.ToArray Method is used to copy a Stack<T> to a new array... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n01 Feb, 2019"
},
{
"code": null,
"e": 337,
"s": 28,
"text": "Stack represents a last-in, first out collection of object. It is used when you need a last-in, first-out access of items. When you add an item in the list, it is called pushi... |
StringJoiner Class in Java | 24 Jan, 2022
StringJoiner is a class in java.util package is used to construct a sequence of characters(strings) separated by a delimiter and optionally starting with a supplied prefix and ending with a given suffix. Though this can also be done with the help of the StringBuilder class to append delimiter after each st... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n24 Jan, 2022"
},
{
"code": null,
"e": 439,
"s": 52,
"text": "StringJoiner is a class in java.util package is used to construct a sequence of characters(strings) separated by a delimiter and optionally starting with a supplied prefix an... |
Python Bokeh – Plotting Line Segments on a Graph | 10 Jul, 2020
Bokeh is a Python interactive data visualization. It renders its plots using HTML and JavaScript. It targets modern web browsers for presentation providing elegant, concise construction of novel graphics with high-performance interactivity.
Bokeh can be used to plot line segments on a graph. Plotting line ... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n10 Jul, 2020"
},
{
"code": null,
"e": 269,
"s": 28,
"text": "Bokeh is a Python interactive data visualization. It renders its plots using HTML and JavaScript. It targets modern web browsers for presentation providing elegant, concise co... |
Types of Spring Bean Scopes Example - onlinetutorialspoint | PROGRAMMINGJava ExamplesC Examples
Java Examples
C Examples
C Tutorials
aws
JAVAEXCEPTIONSCOLLECTIONSSWINGJDBC
EXCEPTIONS
COLLECTIONS
SWING
JDBC
JAVA 8
SPRING
SPRING BOOT
HIBERNATE
PYTHON
PHP
JQUERY
PROGRAMMINGJava ExamplesC Examples
Java Examples
C Examples
C Tutorials
aws
In this tutorial, we will see the different t... | [
{
"code": null,
"e": 158,
"s": 123,
"text": "PROGRAMMINGJava ExamplesC Examples"
},
{
"code": null,
"e": 172,
"s": 158,
"text": "Java Examples"
},
{
"code": null,
"e": 183,
"s": 172,
"text": "C Examples"
},
{
"code": null,
"e": 195,
"s": 183,
... |
Generating Synthetic Classification Data using Scikit | by Faizan Ahemad | Towards Data Science | This is part 1 in a series of articles about imbalanced and noisy data. Part 2 about skewed classification metrics is out.
Data generators help us create data with different distributions and profiles to experiment on. If you are testing various algorithms available to you and you want to find which one works in what c... | [
{
"code": null,
"e": 295,
"s": 172,
"text": "This is part 1 in a series of articles about imbalanced and noisy data. Part 2 about skewed classification metrics is out."
},
{
"code": null,
"e": 595,
"s": 295,
"text": "Data generators help us create data with different distribution... |
Python - Network Environment | Python 3 is available for Windows, Mac OS and most of the flavors of Linux operating system. Even though Python 2 is available for many other OSs, Python 3 support either has not been made available for them or has been dropped.
Open a terminal window and type "python" to find out if it is already installed and which v... | [
{
"code": null,
"e": 2555,
"s": 2326,
"text": "Python 3 is available for Windows, Mac OS and most of the flavors of Linux operating system. Even though Python 2 is available for many other OSs, Python 3 support either has not been made available for them or has been dropped."
},
{
"code": nu... |
B+ tree Deletion in Data Structure | Here we will see, how to perform the deletion of a node from B+ Tree. Suppose we have a B+ Tree like below 7minus;
Example of B+ Tree −
Deletion has two parts. At first we have to find the element. That strategy is like the querying. Now for deletion, we have to care about some rules. One node must have at-least m/2 el... | [
{
"code": null,
"e": 1177,
"s": 1062,
"text": "Here we will see, how to perform the deletion of a node from B+ Tree. Suppose we have a B+ Tree like below 7minus;"
},
{
"code": null,
"e": 1198,
"s": 1177,
"text": "Example of B+ Tree −"
},
{
"code": null,
"e": 1661,
... |
Change the Return-Path in PHP mail function | The reply and return path can be placed in the headers as shown below −
$headers = 'From: sample@example.com' . "\r\n" .
'Reply-To: sample@example.com' . "\r\n" .
'Return-Path: sample@example.com'
Otherwise, it can be passed as the fifth parameter to change the return path −
mail($to, $subject, $message, $headers, "-f ... | [
{
"code": null,
"e": 1134,
"s": 1062,
"text": "The reply and return path can be placed in the headers as shown below −"
},
{
"code": null,
"e": 1259,
"s": 1134,
"text": "$headers = 'From: sample@example.com' . \"\\r\\n\" .\n'Reply-To: sample@example.com' . \"\\r\\n\" .\n'Return-P... |
How do you fill in or pad a column with zeros using a MySQL query? | You can use ZEROFILL for column to fill in or pad with zeros. Let us first create a table−
mysql> create table DemoTable
(
Number int
);
Query OK, 0 rows affected (0.58 sec)
Following is the query to add zerofill attribute for Number column−
mysql> alter table DemoTable change Number Number int(10) zerofill no... | [
{
"code": null,
"e": 1153,
"s": 1062,
"text": "You can use ZEROFILL for column to fill in or pad with zeros. Let us first create a table−"
},
{
"code": null,
"e": 1245,
"s": 1153,
"text": "mysql> create table DemoTable\n (\n Number int\n );\nQuery OK, 0 rows affected (0.58 ... |
How to add a Login Form to an Image using HTML and CSS ? | 21 May, 2021
The login form on an Image is used on many websites. Like hotels website that contains the pictures of the hotels or some organizations that organize some special events holding that events picture and login form on that. In that case, you can design a login or registration form on that picture. This desig... | [
{
"code": null,
"e": 53,
"s": 25,
"text": "\n21 May, 2021"
},
{
"code": null,
"e": 690,
"s": 53,
"text": "The login form on an Image is used on many websites. Like hotels website that contains the pictures of the hotels or some organizations that organize some special events hold... |
HTML | Marquee scrolldelay attribute | 11 Jan, 2022
The Marquee scrolldelay attribute in HTML is used to set the interval between each scroll movement in milliseconds. The default value of Scrolldelay is 85. Note: Value less then 60 is not acceptable, unless truespeed is specified.Syntax:
<marquee scrolldelay=number>
Attribute value:
number: Define the ... | [
{
"code": null,
"e": 53,
"s": 25,
"text": "\n11 Jan, 2022"
},
{
"code": null,
"e": 293,
"s": 53,
"text": "The Marquee scrolldelay attribute in HTML is used to set the interval between each scroll movement in milliseconds. The default value of Scrolldelay is 85. Note: Value less t... |
HTML | Marquee bgcolor attribute | 14 Jan, 2022
The Marquee bgcolor attribute in HTML is used to set the backgroundcolor of marquee.
Note: This attribute is no longer supported in HTML5.
Syntax:
<marquee bgcolor="colorname" >
Attribute value:
color name: Define the background color of the marquee.
Example:
html
<!DOCTYPE html><html> <head> <title>HT... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n14 Jan, 2022"
},
{
"code": null,
"e": 113,
"s": 28,
"text": "The Marquee bgcolor attribute in HTML is used to set the backgroundcolor of marquee."
},
{
"code": null,
"e": 167,
"s": 113,
"text": "Note: This attribute ... |
What is GAV (Global as View)? | 24 Apr, 2020
There are many databases and data sources that need integration. Almost every application has many sources of data that can be used to work together. Data integration involves integrating data from various sources and it has a single view over the sources. It is done to answer queries using the information... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n24 Apr, 2020"
},
{
"code": null,
"e": 452,
"s": 28,
"text": "There are many databases and data sources that need integration. Almost every application has many sources of data that can be used to work together. Data integration involves... |
ResourceBundle and ListResourceBundle class in Java with Examples | 12 Oct, 2021
The ResourceBundle and ListResourceBundle classes are part java.util package. These classes are designed to aid in the internationalization of programs.
ResourceBundle: The class ResourceBundle is an abstract class. It defines methods that enable you to manage a collection of locale-sensitive resources. R... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n12 Oct, 2021"
},
{
"code": null,
"e": 182,
"s": 28,
"text": "The ResourceBundle and ListResourceBundle classes are part java.util package. These classes are designed to aid in the internationalization of programs. "
},
{
"code":... |
Count pairs with given sum | Practice | GeeksforGeeks | Given an array of N integers, and an integer K, find the number of pairs of elements in the array whose sum is equal to K.
Example 1:
Input:
N = 4, K = 6
arr[] = {1, 5, 7, 1}
Output: 2
Explanation:
arr[0] + arr[1] = 1 + 5 = 6
and arr[1] + arr[3] = 5 + 1 = 6.
Example 2:
Input:
N = 4, K = 2
arr[] = {1, 1, 1, 1}
Outp... | [
{
"code": null,
"e": 361,
"s": 238,
"text": "Given an array of N integers, and an integer K, find the number of pairs of elements in the array whose sum is equal to K."
},
{
"code": null,
"e": 373,
"s": 361,
"text": "\nExample 1:"
},
{
"code": null,
"e": 501,
"s":... |
Difference between System Testing and Acceptance Testing | 21 May, 2020
System Testing:System Testing is done to check whether the software or product meets the specified requirements or not. It is done by both testers and developers. It contains the Testings: System testing, Integration Testing. It is done through more positive and negative test cases.
Acceptance Testing:Acce... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n21 May, 2020"
},
{
"code": null,
"e": 312,
"s": 28,
"text": "System Testing:System Testing is done to check whether the software or product meets the specified requirements or not. It is done by both testers and developers. It contains ... |
Heap Sort | Heap sort is performed on the heap data structure. We know that heap is a complete binary tree. Heap tree can be of two types. Min-heap or max heap. For min heap the root element is minimum and for max heap the root is maximum. After forming a heap, we can delete an element from the root and send the last element to th... | [
{
"code": null,
"e": 1643,
"s": 1187,
"text": "Heap sort is performed on the heap data structure. We know that heap is a complete binary tree. Heap tree can be of two types. Min-heap or max heap. For min heap the root element is minimum and for max heap the root is maximum. After forming a heap, we ... |
numpy.cos() in Python | 09 Feb, 2021
numpy.cos(x[, out]) = ufunc ‘cos’) : This mathematical function helps user to calculate trigonometric cosine for all x(being the array elements). Parameters :
array : [array_like]elements are in radians.
2pi Radians = 360 degrees
Return :
An array with trigonometric cosine
of x for all x i.e. arra... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n09 Feb, 2021"
},
{
"code": null,
"e": 189,
"s": 28,
"text": "numpy.cos(x[, out]) = ufunc ‘cos’) : This mathematical function helps user to calculate trigonometric cosine for all x(being the array elements). Parameters : "
},
{
... |
Arduino - Variables & Constants | Before we start explaining the variable types, a very important subject we need to make sure, you fully understand is called the variable scope.
Variables in C programming language, which Arduino uses, have a property called scope. A scope is a region of the program and there are three places where variables can be dec... | [
{
"code": null,
"e": 3149,
"s": 3004,
"text": "Before we start explaining the variable types, a very important subject we need to make sure, you fully understand is called the variable scope."
},
{
"code": null,
"e": 3342,
"s": 3149,
"text": "Variables in C programming language, ... |
PImpl Idiom in C++ with Examples | 27 Dec, 2021
When changes are made to a header file, all sources including it needs to be recompiled. In large projects and libraries, it can cause build time issues due to the fact that even when a small change to the implementation is made everyone has to wait some time until they compile their code. One way to solve... | [
{
"code": null,
"e": 54,
"s": 26,
"text": "\n27 Dec, 2021"
},
{
"code": null,
"e": 506,
"s": 54,
"text": "When changes are made to a header file, all sources including it needs to be recompiled. In large projects and libraries, it can cause build time issues due to the fact that ... |
Difference Between notify() and notifyAll() in Java | 21 Dec, 2021
The notify() and notifyAll() methods with wait() methods are used for communication between the threads. A thread that goes into waiting for state by calling the wait() method will be in waiting for the state until any other thread calls either notify() or notifyAll() method on the same object.
notify(): ... | [
{
"code": null,
"e": 54,
"s": 26,
"text": "\n21 Dec, 2021"
},
{
"code": null,
"e": 351,
"s": 54,
"text": "The notify() and notifyAll() methods with wait() methods are used for communication between the threads. A thread that goes into waiting for state by calling the wait() metho... |
Remove common elements from two list in Python | 19 Dec, 2021
Given two lists, the task is to write a Python program to remove all the common elements of two lists.
Examples:
Input : list1 = [1, 2, 3, 4, 5]
list2 = [4, 5, 6, 7, 8,]
Output : list1 = [1, 2, 3]
list2 = [6, 7, 8]
Explanation: Lists after removing common elements of both the ... | [
{
"code": null,
"e": 54,
"s": 26,
"text": "\n19 Dec, 2021"
},
{
"code": null,
"e": 158,
"s": 54,
"text": "Given two lists, the task is to write a Python program to remove all the common elements of two lists. "
},
{
"code": null,
"e": 168,
"s": 158,
"text": "E... |
Python | Pandas Series.to_dense() | 05 Feb, 2019
Pandas series is a One-dimensional ndarray with axis labels. The labels need not be unique but must be a hashable type. The object supports both integer- and label-based indexing and provides a host of methods for performing operations involving the index.
Pandas Series.to_dense() function return dense rep... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n05 Feb, 2019"
},
{
"code": null,
"e": 285,
"s": 28,
"text": "Pandas series is a One-dimensional ndarray with axis labels. The labels need not be unique but must be a hashable type. The object supports both integer- and label-based index... |
How to apply radial gradient (color) to a node in JavaFX? | You can apply colors to shapes in JavaFX using the setFill() method it adds color to the interior of the geometrical shapes or background.
This method accepts an object of the javafx.scene.paint.Paint class as a parameter. It is the base class for the color and gradients that are used to fill the shapes and backgrounds... | [
{
"code": null,
"e": 1201,
"s": 1062,
"text": "You can apply colors to shapes in JavaFX using the setFill() method it adds color to the interior of the geometrical shapes or background."
},
{
"code": null,
"e": 1395,
"s": 1201,
"text": "This method accepts an object of the javafx... |
Division Operators in Java | The division operator in Java includes the Division, Modulus, and the Divide And Assignment operator. Let us work with them one by one −
The division operator divides left-hand operand by right-hand operand.
The modulus operator divides left-hand operand by right-hand operand and returns remainder.
This operator divide... | [
{
"code": null,
"e": 1199,
"s": 1062,
"text": "The division operator in Java includes the Division, Modulus, and the Divide And Assignment operator. Let us work with them one by one −"
},
{
"code": null,
"e": 1270,
"s": 1199,
"text": "The division operator divides left-hand opera... |
Build a Calculate Expression Game in Java | 03 Jan, 2022
Java is a class-based, object-oriented programming language and is designed to have as few implementation dependencies as possible. A general-purpose programming language made for developers to write once run anywhere that is compiled Java code can run on all platforms that support Java. Java applications ... | [
{
"code": null,
"e": 53,
"s": 25,
"text": "\n03 Jan, 2022"
},
{
"code": null,
"e": 469,
"s": 53,
"text": "Java is a class-based, object-oriented programming language and is designed to have as few implementation dependencies as possible. A general-purpose programming language mad... |
How to use Breadcrumbs Component in ReactJS? | 16 Feb, 2021
Breadcrumbs allow users to make selections from a range of values. Material UI for React has this component available for us, and it is very easy to integrate. We can use Breadcrumbs Component in ReactJS using the following approach.
Creating React Application And Installing Module:
Step 1: Create a React ... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n16 Feb, 2021"
},
{
"code": null,
"e": 262,
"s": 28,
"text": "Breadcrumbs allow users to make selections from a range of values. Material UI for React has this component available for us, and it is very easy to integrate. We can use Brea... |
How to Install Pyproj on Windows? | 22 Sep, 2021
Pyproj is an Interface for the cartographic projections and coordinate transformations library (PROJ). In this article, we will look into the process of installing the Pyproj interface on a windows machine.
The only thing that you need for installing Numpy on Windows are:
Python
PIP or Conda (depending up... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n22 Sep, 2021"
},
{
"code": null,
"e": 235,
"s": 28,
"text": "Pyproj is an Interface for the cartographic projections and coordinate transformations library (PROJ). In this article, we will look into the process of installing the Pyproj ... |
GATE | GATE-CS-2017 (Set 2) | Question 58 | 28 Jun, 2021
A message is made up entirely of characters from the set X = {P,Q,R,S,T} . The table of probabilities of each character is shown below :
A message of 100 characters over X is encoded using Huffman coding. Then the excepted length of the encoded message in bits is _____(A) 225(B) 226(C) 227(D) 228Answer: (A... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n28 Jun, 2021"
},
{
"code": null,
"e": 189,
"s": 52,
"text": "A message is made up entirely of characters from the set X = {P,Q,R,S,T} . The table of probabilities of each character is shown below :"
},
{
"code": null,
"e": ... |
Runtime and Compile-time constants in C++ | 19 Oct, 2020
Run-time Constant:
These are the constants whose respective values can only be known or computed at the time of running of source code. Run time Constants are a bit slower than compile-time constants but are more flexible than compile-time constants. However, once it is initialized, the value of these cons... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n19 Oct, 2020"
},
{
"code": null,
"e": 47,
"s": 28,
"text": "Run-time Constant:"
},
{
"code": null,
"e": 359,
"s": 47,
"text": "These are the constants whose respective values can only be known or computed at the time... |
JavaScript | Uint8Array.from() Method | 28 Jan, 2020
The Uint8Array array represents an array of 8-bit unsigned integers. By default, the contents of Uint8Array are initialized to 0.
The Uint8Array.from() method is used to create a new Uint8Array from an array-like or iterable object. So when you want to convert an arrayLike or iterable object then you can b... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n28 Jan, 2020"
},
{
"code": null,
"e": 158,
"s": 28,
"text": "The Uint8Array array represents an array of 8-bit unsigned integers. By default, the contents of Uint8Array are initialized to 0."
},
{
"code": null,
"e": 477,
... |
jQuery | children() with Examples | 03 Aug, 2021
children() is an inbuilt method in jQuery which is used to find all the children element related to that selected element. This children() method in jQuery traverse down to a single level of the selected element and return all elements.
Syntax:
$(selector).children()
Here selector is the selected element ... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n03 Aug, 2021"
},
{
"code": null,
"e": 265,
"s": 28,
"text": "children() is an inbuilt method in jQuery which is used to find all the children element related to that selected element. This children() method in jQuery traverse down to a ... |
Switch in Kotlin | 27 Jan, 2022
Android Switch is also a two-state user interface element that is used to toggle between ON and OFF as a button. By touching the button we can drag it back and forth to make it either ON or OFF.The Switch element is useful when only two states require for activity either choose ON or OFF. We can add a Swit... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n27 Jan, 2022"
},
{
"code": null,
"e": 759,
"s": 28,
"text": "Android Switch is also a two-state user interface element that is used to toggle between ON and OFF as a button. By touching the button we can drag it back and forth to make i... |
Java - String toUpperCase() Method | This method has two variants. The first variant converts all of the characters in this String to upper case using the rules of the given Locale. This is equivalent to calling toUpperCase(Locale.getDefault()).
The second variant takes locale as an argument to be used while converting into upper case.
Here is the syntax ... | [
{
"code": null,
"e": 2720,
"s": 2511,
"text": "This method has two variants. The first variant converts all of the characters in this String to upper case using the rules of the given Locale. This is equivalent to calling toUpperCase(Locale.getDefault())."
},
{
"code": null,
"e": 2812,
... |
Find the common elements of more than two JavaScript arrays ? | 02 Mar, 2020
Given an HTML document having multiple arrays with some elements and the task is to get the common elements from arrays with the help of JavaScript. There are two approaches that are discussed below.
Approach 1: First get the arrays in 2-dimensional format then take the first array by shift() method and th... | [
{
"code": null,
"e": 53,
"s": 25,
"text": "\n02 Mar, 2020"
},
{
"code": null,
"e": 253,
"s": 53,
"text": "Given an HTML document having multiple arrays with some elements and the task is to get the common elements from arrays with the help of JavaScript. There are two approaches ... |
Implementation of Bayesian Regression | 12 Jan, 2022
Regression is a Machine Learning task to predict continuous values (real numbers), as compared to classification, that is used to predict categorical (discrete) values. To learn more about the basics of regression, you can follow this link.
When you hear the word, ‘Bayesian’, you might think of Naive Bayes... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n12 Jan, 2022"
},
{
"code": null,
"e": 269,
"s": 28,
"text": "Regression is a Machine Learning task to predict continuous values (real numbers), as compared to classification, that is used to predict categorical (discrete) values. To lea... |
How to detect HTML 5 is supported or not in the browser ? | 10 Nov, 2021
HTML 5 is the latest standard of HTML that includes many new changes and features. HTML 5 support can be detected by using three approaches:Method 1: Checking for Geolocation support: The Geolocation API was added in HTML5. It is used for identifying the user’s location. The presence of this API could be d... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n10 Nov, 2021"
},
{
"code": null,
"e": 582,
"s": 28,
"text": "HTML 5 is the latest standard of HTML that includes many new changes and features. HTML 5 support can be detected by using three approaches:Method 1: Checking for Geolocation ... |
React-Bootstrap Form Component | 27 Apr, 2022
React-Bootstrap is a front-end framework that was designed keeping react in mind. Form Component provides a way to make a form and take user input and then forward it to the server for further data processing. We can use the following approach in ReactJS to use the react-bootstrap Form Component.
Form Prop... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n27 Apr, 2022"
},
{
"code": null,
"e": 326,
"s": 28,
"text": "React-Bootstrap is a front-end framework that was designed keeping react in mind. Form Component provides a way to make a form and take user input and then forward it to the s... |
Python PIL | ImageEnhance.Brightness() and ImageEnhance.Sharpness() method | 29 Jun, 2019
PIL is the Python Imaging Library which provides the python interpreter with image editing capabilities. The ImageEnhance module contains a number of classes that can be used for image enhancement.
This class can be used to control the brightness of an image. An enhancement factor of 0.0 gives a black imag... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n29 Jun, 2019"
},
{
"code": null,
"e": 226,
"s": 28,
"text": "PIL is the Python Imaging Library which provides the python interpreter with image editing capabilities. The ImageEnhance module contains a number of classes that can be used ... |
Personal Voice Assistant in Python | 25 May, 2022
As we know Python is a suitable language for script writers and developers. Let’s write a script for Personal Voice Assistant using Python. The query for the assistant can be manipulated as per the user’s need. The implemented assistant can open up the application (if it’s installed in the system), search ... | [
{
"code": null,
"e": 54,
"s": 26,
"text": "\n25 May, 2022"
},
{
"code": null,
"e": 844,
"s": 54,
"text": "As we know Python is a suitable language for script writers and developers. Let’s write a script for Personal Voice Assistant using Python. The query for the assistant can be... |
std::sort() in C++ STL | 06 Jul, 2022
We have discussed qsort() in C. C++ STL provides a similar function sort that sorts a vector or array (items with random access)
It generally takes two parameters, the first one being the point of the array/vector from where the sorting needs to begin and the second parameter being the length up to which w... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n06 Jul, 2022"
},
{
"code": null,
"e": 181,
"s": 52,
"text": "We have discussed qsort() in C. C++ STL provides a similar function sort that sorts a vector or array (items with random access)"
},
{
"code": null,
"e": 514,
... |
Types of HTML Lists | There are three types of lists in HTML −
unordered list <ul>This list has bullets list items with no specific order.
This list has bullets list items with no specific order.
ordered list <ol>This list is used for ordered list items
This list is used for ordered list items
definition list <dl>This list is used to displa... | [
{
"code": null,
"e": 1228,
"s": 1187,
"text": "There are three types of lists in HTML −"
},
{
"code": null,
"e": 1304,
"s": 1228,
"text": "unordered list <ul>This list has bullets list items with no specific order."
},
{
"code": null,
"e": 1361,
"s": 1304,
"te... |
Find the hypotenuse of a right angled triangle with given two sides | 21 Jun, 2022
Given the other two sides of a right angled triangle, the task is to find it’s hypotenuse.Examples:
Input: side1 = 3, side2 = 4 Output: 5.00 32 + 42 = 52Input: side1 = 12, side2 = 15 Output: 19.21
Approach: Pythagoras theorem states that the square of hypotenuse of a right angled triangle is equal to... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n21 Jun, 2022"
},
{
"code": null,
"e": 130,
"s": 28,
"text": "Given the other two sides of a right angled triangle, the task is to find it’s hypotenuse.Examples: "
},
{
"code": null,
"e": 229,
"s": 130,
"text": "Inpu... |
HTML | <textarea> readonly Attribute - GeeksforGeeks | 08 Jul, 2021
The <textarea> readonly attribute in HTML is used to specify that the textarea element is read-only. If the textarea is readonly, then it’s content cannot be changed but can be copied and highlighted. It is a boolean attribute.Syntax:
<textarea readonly> Contents... </textarea>
Example 1: This example us... | [
{
"code": null,
"e": 24503,
"s": 24475,
"text": "\n08 Jul, 2021"
},
{
"code": null,
"e": 24740,
"s": 24503,
"text": "The <textarea> readonly attribute in HTML is used to specify that the textarea element is read-only. If the textarea is readonly, then it’s content cannot be chang... |
Angular 6 - Directives | Directives in Angular is a js class, which is declared as @directive. We have 3 directives in Angular. The directives are listed below −
These form the main class having details of how the component should be processed, instantiated and used at runtime.
A structure directive basically deals with manipulating the dom el... | [
{
"code": null,
"e": 2132,
"s": 1995,
"text": "Directives in Angular is a js class, which is declared as @directive. We have 3 directives in Angular. The directives are listed below −"
},
{
"code": null,
"e": 2249,
"s": 2132,
"text": "These form the main class having details of h... |
CSS | scrollbar-color Property - GeeksforGeeks | 21 Nov, 2019
The scrollbar-color property is used to set the color of an element’s scrollbar. It can be used to control both the scrollbar track and scrollbar thumb colors separately.The track of a scrollbar is the background of the scrollbar which stays fixed and shows the area that can be scrolled. The thumb of the s... | [
{
"code": null,
"e": 24985,
"s": 24957,
"text": "\n21 Nov, 2019"
},
{
"code": null,
"e": 25424,
"s": 24985,
"text": "The scrollbar-color property is used to set the color of an element’s scrollbar. It can be used to control both the scrollbar track and scrollbar thumb colors sepa... |
MySQL temporary variable assignment? | You can use SET command for temporary variable assignment.
The syntax is as follows
SET @anyVariableName=(SELECT yourColumnName FROM yourTableName WHERE yourCondition);
To understand the above syntax, let us create a table. The query to create a table is as follows
mysql> create table tempVariableAssignment
-> (
... | [
{
"code": null,
"e": 1121,
"s": 1062,
"text": "You can use SET command for temporary variable assignment."
},
{
"code": null,
"e": 1146,
"s": 1121,
"text": "The syntax is as follows"
},
{
"code": null,
"e": 1231,
"s": 1146,
"text": "SET @anyVariableName=(SELEC... |
HTML rowspan Attribute | The HTML rowspan attribute define the number of rows a cell of a table should span in an HTML document. It can only be applied on td or th HTML element.
Following is the syntax −
<tagname rowspan=”number”></tagname>
Let us see an example of HTML rowspan Attribute −
Live Demo
<!DOCTYPE html>
<html>
<style>
body {
... | [
{
"code": null,
"e": 1215,
"s": 1062,
"text": "The HTML rowspan attribute define the number of rows a cell of a table should span in an HTML document. It can only be applied on td or th HTML element."
},
{
"code": null,
"e": 1241,
"s": 1215,
"text": "Following is the syntax −"
... |
How to link a submit button to another webpage using HTML? | Submit button automatically submits a form on click. Using HTML forms, you can easily take user input. The <form> tag is used to get user input, by adding the form elements. Different types of form elements include text input, radio button input, submit button, etc.
To link a submit button to another webpage, use the f... | [
{
"code": null,
"e": 1329,
"s": 1062,
"text": "Submit button automatically submits a form on click. Using HTML forms, you can easily take user input. The <form> tag is used to get user input, by adding the form elements. Different types of form elements include text input, radio button input, submit... |
Implement Conditional MySQL Query in a stored procedure? | For conditional MySQL query, you can use IF ELSE concept in stored procedure. Let us first create a table −
mysql> create table DemoTable1
(
Id int
);
Query OK, 0 rows affected (0.62 sec)
Insert some records in the table using insert command −
mysql> insert into DemoTable1 values(10);
Query OK, 1 row affected ... | [
{
"code": null,
"e": 1170,
"s": 1062,
"text": "For conditional MySQL query, you can use IF ELSE concept in stored procedure. Let us first create a table −"
},
{
"code": null,
"e": 1259,
"s": 1170,
"text": "mysql> create table DemoTable1\n (\n Id int\n );\nQuery OK, 0 rows a... |
Web Scraping — Make your Own Dataset | by Suraj Gurav | Towards Data Science | Even though numerous resources available to get the required dataset, it is good to have a self-created dataset. In the current scenario of COVID-19, I found interesting data on worldometers.com. It shows a table containing total number of cases, total number of tests performed, total number of closed cases and so on. ... | [
{
"code": null,
"e": 521,
"s": 172,
"text": "Even though numerous resources available to get the required dataset, it is good to have a self-created dataset. In the current scenario of COVID-19, I found interesting data on worldometers.com. It shows a table containing total number of cases, total nu... |
How to add a legend on Seaborn facetgrid bar plot using Matplotlib? | Set the figure size and adjust the padding between and around the subplots.
Create a dataframe with col1 columns.
Multi-plot grid for plotting conditional relationships.
Use map_dataframe(). This method is suitable for plotting with functions that accept a long-form DataFrame as a 'data' keyword argument and access the... | [
{
"code": null,
"e": 1138,
"s": 1062,
"text": "Set the figure size and adjust the padding between and around the subplots."
},
{
"code": null,
"e": 1176,
"s": 1138,
"text": "Create a dataframe with col1 columns."
},
{
"code": null,
"e": 1232,
"s": 1176,
"text"... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.