title stringlengths 3 221 | text stringlengths 17 477k | parsed listlengths 0 3.17k |
|---|---|---|
A step-by-step guide for creating advanced Python data visualizations with Seaborn / Matplotlib | by Shiu-Tang Li | Towards Data Science | In this article, I will go through a few sections first to prepare background knowledge for some readers who are new to Matplotlib:
Understand the two different Matplotlib interfaces (It has caused a lot of confusion!) .Understand the elements in a figure, so that you can easily look up the APIs to solve your problem.T... | [
{
"code": null,
"e": 304,
"s": 172,
"text": "In this article, I will go through a few sections first to prepare background knowledge for some readers who are new to Matplotlib:"
},
{
"code": null,
"e": 707,
"s": 304,
"text": "Understand the two different Matplotlib interfaces (It... |
What is the difference between global and local Variables in JavaScript? | The scope of a variable is the region of your program in which it is defined. JavaScript variables have only two scopes.
Global Variables − A global variable has a global scope which means it can be defined anywhere in your JavaScript code.
Local Variables − A local variable will be visible only within a function where... | [
{
"code": null,
"e": 1183,
"s": 1062,
"text": "The scope of a variable is the region of your program in which it is defined. JavaScript variables have only two scopes."
},
{
"code": null,
"e": 1303,
"s": 1183,
"text": "Global Variables − A global variable has a global scope which... |
Ngx-Bootstrap - Popover | ngx-bootstrap popover component provides a small overlay component to provide small information about a component.
popover
popover
adaptivePosition − boolean, sets disable adaptive position.
adaptivePosition − boolean, sets disable adaptive position.
container − string, A selector specifying the element the popover sho... | [
{
"code": null,
"e": 2215,
"s": 2100,
"text": "ngx-bootstrap popover component provides a small overlay component to provide small information about a component."
},
{
"code": null,
"e": 2223,
"s": 2215,
"text": "popover"
},
{
"code": null,
"e": 2231,
"s": 2223,
... |
NumPy - Byte Swapping | We have seen that the data stored in the memory of a computer depends on which architecture the CPU uses. It may be little-endian (least significant is stored in the smallest address) or big-endian (most significant byte in the smallest address).
The numpy.ndarray.byteswap() function toggles between the two representat... | [
{
"code": null,
"e": 2490,
"s": 2243,
"text": "We have seen that the data stored in the memory of a computer depends on which architecture the CPU uses. It may be little-endian (least significant is stored in the smallest address) or big-endian (most significant byte in the smallest address)."
},
... |
C++ STL Deque | Practice | GeeksforGeeks | Implement different operations on a Deque i.e. adding an element in front and end, removing an element from front and end, sort the Deque, reverse the Deque, getting the size of the Deque.
Input Format:
The first line of input contains an integer T denoting the no of test cases. For each test case, the first line of i... | [
{
"code": null,
"e": 416,
"s": 226,
"text": "Implement different operations on a Deque i.e. adding an element in front and end, removing an element from front and end, sort the Deque, reverse the Deque, getting the size of the Deque. "
},
{
"code": null,
"e": 1227,
"s": 416,
"tex... |
MATLAB - Matrix | A matrix is a two-dimensional array of numbers.
In MATLAB, you create a matrix by entering elements in each row as comma or space delimited numbers and using semicolons to mark the end of each row.
For example, let us create a 4-by-5 matrix a −
a = [ 1 2 3 4 5; 2 3 4 5 6; 3 4 5 6 7; 4 5 6 7 8]
MATLAB will execute the a... | [
{
"code": null,
"e": 2189,
"s": 2141,
"text": "A matrix is a two-dimensional array of numbers."
},
{
"code": null,
"e": 2339,
"s": 2189,
"text": "In MATLAB, you create a matrix by entering elements in each row as comma or space delimited numbers and using semicolons to mark the e... |
How to create previous and next button and non-working on end position using JavaScript ? - GeeksforGeeks | 18 Nov, 2020
The task is to create previous and next button that doesn’t work on the end positions with the help of JavaScript.
Here we are going to add disabled attribute to the pre button when it is at the start position which is 1 for us and remove disabled attribute when it is not at start (1) position.
And same fo... | [
{
"code": null,
"e": 25351,
"s": 25323,
"text": "\n18 Nov, 2020"
},
{
"code": null,
"e": 25466,
"s": 25351,
"text": "The task is to create previous and next button that doesn’t work on the end positions with the help of JavaScript."
},
{
"code": null,
"e": 25647,
... |
How to return local variables from a function in C++ - GeeksforGeeks | 17 Jun, 2021
The following article discusses the way to return a local variable created inside a function, which can be done by returning a pointer to the variable from the called function to the caller function.
What happens when you try to return a local variable as usual?
For example, in the following code, when the... | [
{
"code": null,
"e": 25453,
"s": 25425,
"text": "\n17 Jun, 2021"
},
{
"code": null,
"e": 25653,
"s": 25453,
"text": "The following article discusses the way to return a local variable created inside a function, which can be done by returning a pointer to the variable from the cal... |
Difference between continue and break statements in C++ - GeeksforGeeks | 14 Oct, 2018
Break and continue are same type of statements which is specifically used to alter the normal flow of a program still they have some difference between them.
break statement: the break statement terminates the smallest enclosing loop (i. e., while, do-while, for or switch statement)
continue statement: the... | [
{
"code": null,
"e": 24122,
"s": 24094,
"text": "\n14 Oct, 2018"
},
{
"code": null,
"e": 24280,
"s": 24122,
"text": "Break and continue are same type of statements which is specifically used to alter the normal flow of a program still they have some difference between them."
},... |
C# Program to Check a Specified Type is an Array or Not - GeeksforGeeks | 07 Jan, 2022
In C#, an array is a group of homogeneous elements that are referred to by a common name. So in this article, we will discuss how to check the variable is of array type or not. To do this task, we use the IsArray property of the Type class. This property is used to determine whether the specified type is a... | [
{
"code": null,
"e": 25547,
"s": 25519,
"text": "\n07 Jan, 2022"
},
{
"code": null,
"e": 25973,
"s": 25547,
"text": "In C#, an array is a group of homogeneous elements that are referred to by a common name. So in this article, we will discuss how to check the variable is of array... |
How to create a Hoverable Sidenav with CSS? | Following is the code to create hoverable side navigation buttons with CSS.
Live Demo
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Document</title>
<style>
nav a {
position: fixed;
left: -120px;
transition: 0.3... | [
{
"code": null,
"e": 1138,
"s": 1062,
"text": "Following is the code to create hoverable side navigation buttons with CSS."
},
{
"code": null,
"e": 1149,
"s": 1138,
"text": " Live Demo"
},
{
"code": null,
"e": 2133,
"s": 1149,
"text": "<!DOCTYPE html>\n<html l... |
Tensorflow.js tf.metrics.meanAbsoluteError() Function - GeeksforGeeks | 25 May, 2021
Tensorflow.js is an open-source library developed by Google for running machine learning models and deep learning neural networks in the browser or node environment.
The tf.metrics.meanAbsoluteError() is used to calculate mean absolute error. The mean absolute error is defined as the mean of absolute diffe... | [
{
"code": null,
"e": 25300,
"s": 25272,
"text": "\n25 May, 2021"
},
{
"code": null,
"e": 25466,
"s": 25300,
"text": "Tensorflow.js is an open-source library developed by Google for running machine learning models and deep learning neural networks in the browser or node environmen... |
C++ Unordered_map Library - find() Function | The C++ function std::unordered_map::find() finds an element associated with key k.
If operation succeeds then methods returns iterator pointing to the element otherwise it returns an iterator pointing the map::end().
Following is the declaration for std::unordered_map::find() function form std::unordered_map header.
i... | [
{
"code": null,
"e": 2687,
"s": 2603,
"text": "The C++ function std::unordered_map::find() finds an element associated with key k."
},
{
"code": null,
"e": 2821,
"s": 2687,
"text": "If operation succeeds then methods returns iterator pointing to the element otherwise it returns a... |
Number of prime pairs in an array - GeeksforGeeks | 06 May, 2021
Given an array. The task is to count the possible pairs which can be formed using the elements of the array where both of the elements in the pair are prime. Note: Pairs such as (a, b) and (b, a) should not be considered different.Examples:
Input: arr[] = {1, 2, 3, 5, 7, 9}
Output: 6
From the given array... | [
{
"code": null,
"e": 24820,
"s": 24792,
"text": "\n06 May, 2021"
},
{
"code": null,
"e": 25063,
"s": 24820,
"text": "Given an array. The task is to count the possible pairs which can be formed using the elements of the array where both of the elements in the pair are prime. Note:... |
Word embeddings: exploration, explanation, and exploitation (with code in Python) | by Halyna Oliinyk | Towards Data Science | Word embeddings discussion is the topic being talked about by every natural language processing scientist for many-many years, so don’t expect me to tell you something dramatically new or ‘open your eyes’ on the world of word vectors. I’m here to tell some basic things on word embeddings and describe the most common wo... | [
{
"code": null,
"e": 568,
"s": 171,
"text": "Word embeddings discussion is the topic being talked about by every natural language processing scientist for many-many years, so don’t expect me to tell you something dramatically new or ‘open your eyes’ on the world of word vectors. I’m here to tell som... |
Satellite Imagery Analysis using Python | by Syam Kakarla | Towards Data Science | This article helps readers to better understand the satellite data and different methods to explore and analyze the Sundarbans satellite data using Python.
Sundarbans Satellite ImageryData AnalysisVegetation and Soil IndicesWater IndicesGeology IndicesConclusionReferences
Sundarbans Satellite Imagery
Data Analysis
Vege... | [
{
"code": null,
"e": 327,
"s": 171,
"text": "This article helps readers to better understand the satellite data and different methods to explore and analyze the Sundarbans satellite data using Python."
},
{
"code": null,
"e": 444,
"s": 327,
"text": "Sundarbans Satellite ImageryDa... |
C# Program to Sort a List of Employees Based on Salary and Whose Department is ABC using LINQ - GeeksforGeeks | 06 Dec, 2021
Given a list of employees, now our task is to sort the given list of employees based on salary and whose department is ABC using LINQ.
Example:
Input:
{id = 101, name = "Sumit", salary = 10000, department = ABC}
{id = 102, name = "Rohit", salary = 20000, department = HR}
{id = 103, name = "Mohit", sala... | [
{
"code": null,
"e": 24222,
"s": 24194,
"text": "\n06 Dec, 2021"
},
{
"code": null,
"e": 24358,
"s": 24222,
"text": "Given a list of employees, now our task is to sort the given list of employees based on salary and whose department is ABC using LINQ. "
},
{
"code": null,... |
Implementing Custom Data Generators in Keras | by Rohan Jagtap | Towards Data Science | Data Generators is one of the most useful features of the Keras API. Consider a scenario where you have lots of data, so much that you cannot have all of it at once in the RAM. Wyd? Purchasing more RAM is obviously isn’t an option.
Well, the solution to this can be loading the mini-batches fed to the model dynamically.... | [
{
"code": null,
"e": 403,
"s": 171,
"text": "Data Generators is one of the most useful features of the Keras API. Consider a scenario where you have lots of data, so much that you cannot have all of it at once in the RAM. Wyd? Purchasing more RAM is obviously isn’t an option."
},
{
"code": n... |
GATE-CS-2007 - GeeksforGeeks | 02 Dec, 2021
P. f(x) is continuous for all real values of x
Q. f(x) is differentiable for all real values of x
Consider an example set, S = (1,2,3)
Equivalence property follows, reflexive, symmetric
and transitive
Largest ordered set are s x s =
{ (1,1) (1,2) (1,3) (2,1) (2,2) (2,3) (3,1) (3,2)
(3,3) } which are 9... | [
{
"code": null,
"e": 27219,
"s": 27191,
"text": "\n02 Dec, 2021"
},
{
"code": null,
"e": 27318,
"s": 27219,
"text": "P. f(x) is continuous for all real values of x\nQ. f(x) is differentiable for all real values of x "
},
{
"code": null,
"e": 27649,
"s": 27318,
... |
How to check a checkbox in a page in Selenium with python? | We can check a checkbox in a page in Selenium with the help of click() method. First of all we need to uniquely identify the checkbox with the help of any of the locators like css, xpath, id, class and so on.
Next we have to use findElement() method to locate the element and finally perform the clicking action. The exc... | [
{
"code": null,
"e": 1271,
"s": 1062,
"text": "We can check a checkbox in a page in Selenium with the help of click() method. First of all we need to uniquely identify the checkbox with the help of any of the locators like css, xpath, id, class and so on."
},
{
"code": null,
"e": 1455,
... |
React-Router Hooks - GeeksforGeeks | 10 Nov, 2021
React-Router is a popular React library that is heavily used for client-side routing and offers single-page routing. It provides various Component APIs( like Route, Link, Switch, etc.) that you can use in your React application to render different components based on the URL pathnames in a single page.
Pre... | [
{
"code": null,
"e": 24048,
"s": 24020,
"text": "\n10 Nov, 2021"
},
{
"code": null,
"e": 24352,
"s": 24048,
"text": "React-Router is a popular React library that is heavily used for client-side routing and offers single-page routing. It provides various Component APIs( like Route... |
Convert LinkedList to ArrayList in Java | A LinkedList can be converted into an ArrayList by creating an ArrayList such that the parameterized constructor of the ArrayList initialises it with the elements of the LinkedList.
A program that demonstrates this is given as follows −
Live Demo
import java.util.ArrayList;
import java.util.LinkedList;
import java.uti... | [
{
"code": null,
"e": 1244,
"s": 1062,
"text": "A LinkedList can be converted into an ArrayList by creating an ArrayList such that the parameterized constructor of the ArrayList initialises it with the elements of the LinkedList."
},
{
"code": null,
"e": 1299,
"s": 1244,
"text": "... |
How to create a collapsible sidebar menu with CSS and JavaScript? | Following is the code to create a collapsible sidebar menu using CSS and JavaScript −
Live Demo
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Document</title>
<style>
.sideNav {
height: 100vh;
width: 0;
position... | [
{
"code": null,
"e": 1148,
"s": 1062,
"text": "Following is the code to create a collapsible sidebar menu using CSS and JavaScript −"
},
{
"code": null,
"e": 1159,
"s": 1148,
"text": " Live Demo"
},
{
"code": null,
"e": 3025,
"s": 1159,
"text": "<!DOCTYPE html... |
Selenium - Page Object Model | Selenium acts on webelements with the help of their properties such ID, name, XPath, etc. Unlike QTP which has an inbuilt object repository(OR), Selenium has no inbuilt ORs.
Hence we need to build an OR which should also be maintainable and accessible on demand. Page Object Model (POM) is a popular design pattern to cr... | [
{
"code": null,
"e": 2049,
"s": 1875,
"text": "Selenium acts on webelements with the help of their properties such ID, name, XPath, etc. Unlike QTP which has an inbuilt object repository(OR), Selenium has no inbuilt ORs."
},
{
"code": null,
"e": 2303,
"s": 2049,
"text": "Hence we... |
How to get windows firewall profile settings using PowerShell? | Recent windows client and server operating systems like Windows 10, Windows Server 2008 onwards, supports advanced firewall versions and they have mainly 3 profiles.
Domain
Domain
Public
Public
Private profile.
Private profile.
To get the setting using GUI, you need to search in the box Windows Firewall with Advanced S... | [
{
"code": null,
"e": 1228,
"s": 1062,
"text": "Recent windows client and server operating systems like Windows 10, Windows Server 2008 onwards, supports advanced firewall versions and they have mainly 3 profiles."
},
{
"code": null,
"e": 1235,
"s": 1228,
"text": "Domain"
},
{... |
How to work with Structs in JavaScript? | To work with Structs in JavaScript, you can try to run the following code −
Live Demo
<!DOCTYPE html>
<html>
<body>
<script>
function displayStruct(str) {
var str = str.split(' ');
var count = str.length;
function constructor() {
for (var i = 0; i <... | [
{
"code": null,
"e": 1138,
"s": 1062,
"text": "To work with Structs in JavaScript, you can try to run the following code −"
},
{
"code": null,
"e": 1149,
"s": 1138,
"text": " Live Demo"
},
{
"code": null,
"e": 1701,
"s": 1149,
"text": "<!DOCTYPE html>\n<html>\... |
Model Compression with TensorFlow Lite: A Look into Reducing Model Size | by Cawin Chan | Towards Data Science | A significant problem in the arms race to produce more accurate models is complexity, which leads to the problem of size. These models are usually huge and resource-intensive, which leads to greater space and time consumption. (Takes up more space in memory and slower in prediction as compared to smaller models)
A larg... | [
{
"code": null,
"e": 485,
"s": 171,
"text": "A significant problem in the arms race to produce more accurate models is complexity, which leads to the problem of size. These models are usually huge and resource-intensive, which leads to greater space and time consumption. (Takes up more space in memo... |
Superscript in Python plots | To put some superscript in Python, we can take the following steps −
Create points for a and f using numpy.
Create points for a and f using numpy.
Plot f = ma curve using the plot() method, with label f=ma.
Plot f = ma curve using the plot() method, with label f=ma.
Add title for the plot with superscript, i.e., kgms-2... | [
{
"code": null,
"e": 1131,
"s": 1062,
"text": "To put some superscript in Python, we can take the following steps −"
},
{
"code": null,
"e": 1170,
"s": 1131,
"text": "Create points for a and f using numpy."
},
{
"code": null,
"e": 1209,
"s": 1170,
"text": "Cre... |
Python 3 - Tkinter Listbox | The Listbox widget is used to display a list of items from which a user can select a number of items
Here is the simple syntax to create this widget −
w = Listbox ( master, option, ... )
master − This represents the parent window.
master − This represents the parent window.
options − Here is the list of most commonly... | [
{
"code": null,
"e": 2441,
"s": 2340,
"text": "The Listbox widget is used to display a list of items from which a user can select a number of items"
},
{
"code": null,
"e": 2491,
"s": 2441,
"text": "Here is the simple syntax to create this widget −"
},
{
"code": null,
... |
C# program to reverse an array | Firstly, set the original array −
int[] arr = { 15, 16, 17, 18 };
// Original Array
Console.WriteLine("Original Array= ");
foreach (int i in arr) {
Console.WriteLine(i);
}
Now, use the Array.reverse() method to reverse the array −
Array.Reverse(arr);
The following is the complete code to reverse an array in C#
Live ... | [
{
"code": null,
"e": 1096,
"s": 1062,
"text": "Firstly, set the original array −"
},
{
"code": null,
"e": 1237,
"s": 1096,
"text": "int[] arr = { 15, 16, 17, 18 };\n// Original Array\nConsole.WriteLine(\"Original Array= \");\nforeach (int i in arr) {\n Console.WriteLine(i);\n}"... |
Add months to current date using Calendar.add() method in Java | Import the following package for Calendar class in Java.
import java.util.Calendar;
Firstly, create a Calendar object and display the current date and time.
Calendar calendar = Calendar.getInstance();
System.out.println("Current Date and Time = " + calendar.getTime());
Now, let us increment the months using the calenda... | [
{
"code": null,
"e": 1119,
"s": 1062,
"text": "Import the following package for Calendar class in Java."
},
{
"code": null,
"e": 1146,
"s": 1119,
"text": "import java.util.Calendar;"
},
{
"code": null,
"e": 1219,
"s": 1146,
"text": "Firstly, create a Calendar ... |
The Definitive Way to Deal With Continuous Variables in Machine Learning | by Riccardo Di Sipio | Towards Data Science | Data analysis can be seen as a device (or a black box; or a Chinese room) which, given some inputs, provides outputs. The main difference between rule-based and statistics-based (aka machine learning) is that the former accepts training examples and rules (“algorithms”) as inputs and gives predictions as output, while ... | [
{
"code": null,
"e": 1435,
"s": 172,
"text": "Data analysis can be seen as a device (or a black box; or a Chinese room) which, given some inputs, provides outputs. The main difference between rule-based and statistics-based (aka machine learning) is that the former accepts training examples and rule... |
C program to find the second largest and smallest numbers in an array | Enter the array elements and then, arrange the numbers in descending order by using the swapping technique. Later on, with the help of an index location, try to print the second largest and the second smallest element in an array.
An array is used to hold the group of common elements under one name.
The array operation... | [
{
"code": null,
"e": 1293,
"s": 1062,
"text": "Enter the array elements and then, arrange the numbers in descending order by using the swapping technique. Later on, with the help of an index location, try to print the second largest and the second smallest element in an array."
},
{
"code": ... |
C# | finally keyword - GeeksforGeeks | 24 Jan, 2019
In programming, sometimes an exception may cause an error which ends the current method. However, that method might have opened a file or a network that needs to be closed. So, to overcome such types of problem, C# provides a special keyword named as finally keyword. It is a reserved keyword in C#.The fina... | [
{
"code": null,
"e": 24283,
"s": 24255,
"text": "\n24 Jan, 2019"
},
{
"code": null,
"e": 24904,
"s": 24283,
"text": "In programming, sometimes an exception may cause an error which ends the current method. However, that method might have opened a file or a network that needs to b... |
Add a red border to an element in Bootstrap to indicate danger | To add a red border to an element, you need to implement the border-danger class.
Red border implement danger and you can set danger messages inside it.
Implementing the border-danger is quite easy −
<div class="new border border-danger">
Red Border
</div>
Let us see an example to work with the border-danger Bootstra... | [
{
"code": null,
"e": 1144,
"s": 1062,
"text": "To add a red border to an element, you need to implement the border-danger class."
},
{
"code": null,
"e": 1215,
"s": 1144,
"text": "Red border implement danger and you can set danger messages inside it."
},
{
"code": null,
... |
Guide to R and Python in a Single Jupyter Notebook | by Matthew Stewart, PhD Researcher | Towards Data Science | Why pick one when you can use both at the same time?
R is primarily used for statistical analysis, while Python provides a more general approach to data science. R and Python are object-oriented towards data science for programming language. Learning both is an ideal solution. Python is a common-purpose language with a... | [
{
"code": null,
"e": 225,
"s": 172,
"text": "Why pick one when you can use both at the same time?"
},
{
"code": null,
"e": 531,
"s": 225,
"text": "R is primarily used for statistical analysis, while Python provides a more general approach to data science. R and Python are object-... |
Tryit Editor v3.7 | Tryit: HTML table | [] |
How to retrieve the Azure VM vNet name using PowerShell? | To retrieve the Azure Virtual Network (vNet) or subnet name, we need the first name of the network interface of the VM. Below is the command to retrieve the name of the network interface.
$vm = Get-AzVM -VMName Testmachine2k16
TestMachine2k16 is the Azure VM name. Assuming this VM has a single NIC attached.
PS C:\> $ni... | [
{
"code": null,
"e": 1250,
"s": 1062,
"text": "To retrieve the Azure Virtual Network (vNet) or subnet name, we need the first name of the network interface of the VM. Below is the command to retrieve the name of the network interface."
},
{
"code": null,
"e": 1289,
"s": 1250,
"te... |
How to remove rows in data.table object in R that contains a specific number? | To remove rows in data.table object in R that contains a specific number, we can follow the below steps −
First of all, create a data.table object.
First of all, create a data.table object.
Then, use single square subsetting with apply function to remove rows that contains a specific number.
Then, use single square sub... | [
{
"code": null,
"e": 1168,
"s": 1062,
"text": "To remove rows in data.table object in R that contains a specific number, we can follow the below steps −"
},
{
"code": null,
"e": 1210,
"s": 1168,
"text": "First of all, create a data.table object."
},
{
"code": null,
"e... |
Extract a property from an array of objects in PHP | Given the below code, the task is to extract the ID of the my_object variable −
$my_object = Array
( [0] => stdClass Object
(
[id] => 12
),
[1] => stdClass Object
(
[id] => 33
),
[2] => stdClass Object
(
[id] => 59
)
)
The array_map function can be used for older versions of PH... | [
{
"code": null,
"e": 1142,
"s": 1062,
"text": "Given the below code, the task is to extract the ID of the my_object variable −"
},
{
"code": null,
"e": 1323,
"s": 1142,
"text": "$my_object = Array\n( [0] => stdClass Object\n (\n [id] => 12\n ),\n [1] => stdClass Object... |
How to change the JOIN order in Oracle? | Problem:
You have a performance issue with a queryhaving JOIN conditions on multiple tables, and the Oracle optimizer is not choosing the join order you wanted.
Solution:
Oracle has two hints the ORDERED hint, and the LEADING hint that can be used to influence the join order used within a query.
ORDERED Hint
You are ru... | [
{
"code": null,
"e": 1071,
"s": 1062,
"text": "Problem:"
},
{
"code": null,
"e": 1223,
"s": 1071,
"text": "You have a performance issue with a queryhaving JOIN conditions on multiple tables, and the Oracle optimizer is not choosing the join order you wanted."
},
{
"code":... |
Readers-Writers Problem | The readers-writers problem relates to an object such as a file that is shared between multiple processes. Some of these processes are readers i.e. they only want to read the data from the object and some of the processes are writers i.e. they want to write into the object.
The readers-writers problem is used to manage... | [
{
"code": null,
"e": 1337,
"s": 1062,
"text": "The readers-writers problem relates to an object such as a file that is shared between multiple processes. Some of these processes are readers i.e. they only want to read the data from the object and some of the processes are writers i.e. they want to w... |
Counting the frequencies in a list using dictionary in Python | In this article we develop a program to calculate the frequency of each element present in a list.
Here we capture the items as the keys of a dictionary and their frequencies as the values.
Live Demo
list = ['a','b','a','c','d','c','c']
frequency = {}
for item in list:
if (item in frequency):
frequency[item] ... | [
{
"code": null,
"e": 1161,
"s": 1062,
"text": "In this article we develop a program to calculate the frequency of each element present in a list."
},
{
"code": null,
"e": 1252,
"s": 1161,
"text": "Here we capture the items as the keys of a dictionary and their frequencies as the ... |
How do I select data from one table only where column values from that table match the column values of another table in MySQL? | For this, you can use subquery along with EXISTS. Let us first create a table −
mysql> create table DemoTable1
-> (
-> Id int,
-> SubjectName varchar(20)
-> );
Query OK, 0 rows affected (0.58 sec)
Insert some records in the table using insert command −
mysql> insert into DemoTable1 values(111,'MySQL');
Quer... | [
{
"code": null,
"e": 1142,
"s": 1062,
"text": "For this, you can use subquery along with EXISTS. Let us first create a table −"
},
{
"code": null,
"e": 1271,
"s": 1142,
"text": "mysql> create table DemoTable1\n -> (\n -> Id int,\n -> SubjectName varchar(20)\n -> );\nQuery... |
TIKA - Extracting Image File | Given below is the program to extract content and meta data from a JPEG image.
import java.io.File;
import java.io.FileInputStream;
import java.io.IOException;
import org.apache.tika.exception.TikaException;
import org.apache.tika.metadata.Metadata;
import org.apache.tika.parser.ParseContext;
import org.apache.tika.pa... | [
{
"code": null,
"e": 2189,
"s": 2110,
"text": "Given below is the program to extract content and meta data from a JPEG image."
},
{
"code": null,
"e": 3378,
"s": 2189,
"text": "import java.io.File;\nimport java.io.FileInputStream;\nimport java.io.IOException;\n\nimport org.apache... |
\lim - Tex Command | \lim - Used to draw lim symbol.
{ \lim }
\lim command draws lim symbol.
\lim_{n\rightarrow\infty} f(x) = \ell
limn→∞f(x)=l
\lim_{n\rightarrow\infty} f(x) = \ell
limn→∞f(x)=l
\lim_{n\rightarrow\infty} f(x) = \ell
14 Lectures
52 mins
Ashraf Said
11 Lectures
1 hours
Ashraf Said
9 Le... | [
{
"code": null,
"e": 8018,
"s": 7986,
"text": "\\lim - Used to draw lim symbol."
},
{
"code": null,
"e": 8027,
"s": 8018,
"text": "{ \\lim }"
},
{
"code": null,
"e": 8058,
"s": 8027,
"text": "\\lim command draws lim symbol."
},
{
"code": null,
"e":... |
Change Image Opacity on Mouse Over | Use the opacity property with the :hover selector to change the opacity on mouse-over. Following is the code to change image opacity on mouse over −
Live Demo
<!DOCTYPE html>
<html>
<head>
<style>
body{
font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}
.transparent{
width:270px;
height:200px;
... | [
{
"code": null,
"e": 1211,
"s": 1062,
"text": "Use the opacity property with the :hover selector to change the opacity on mouse-over. Following is the code to change image opacity on mouse over −"
},
{
"code": null,
"e": 1222,
"s": 1211,
"text": " Live Demo"
},
{
"code": ... |
The Best Features of Geopandas 0.8.0 Release | by Abdishakur | Towards Data Science | I like using Geopandas for my Geospatial data science projects. Geopandas gets better in every release, thanks to its developers. If you have ever processed Geospatial Vector data, the chances are that you have used Geopandas.
With the latest 0.8.0 release, there are a lot of improvements and bug fixes. In particular, ... | [
{
"code": null,
"e": 399,
"s": 172,
"text": "I like using Geopandas for my Geospatial data science projects. Geopandas gets better in every release, thanks to its developers. If you have ever processed Geospatial Vector data, the chances are that you have used Geopandas."
},
{
"code": null,
... |
RetinaNet: Custom Object Detection training with 5 lines of code | by Akula Hemanth Kumar | Towards Data Science | In a previous article, we have built a custom object detector using Monk’s EfficientDet. In this article, we will build an Indoor Object Detector using Monk’s RetinaNet, built on top of PyTorch RetinaNet.
These days, computer vision is used everywhere from Self-driving cars to surveillance cameras and whatnot. To get s... | [
{
"code": null,
"e": 377,
"s": 172,
"text": "In a previous article, we have built a custom object detector using Monk’s EfficientDet. In this article, we will build an Indoor Object Detector using Monk’s RetinaNet, built on top of PyTorch RetinaNet."
},
{
"code": null,
"e": 634,
"s":... |
DIY AI: An old school matrix NN. How do NN work and how to create and... | by Andrew Tch | Towards Data Science | How do NN work and how to create and train NN like many years ago. Part of DIY AI series.
You will need Python and Python IDE. Consult DIY AI installation manuals if you need to install them (you will need Python and Console parts for this story).
You can download the full source code from Github here.
The draw.io diag... | [
{
"code": null,
"e": 262,
"s": 172,
"text": "How do NN work and how to create and train NN like many years ago. Part of DIY AI series."
},
{
"code": null,
"e": 420,
"s": 262,
"text": "You will need Python and Python IDE. Consult DIY AI installation manuals if you need to install ... |
jQuery | :contains() Selector - GeeksforGeeks | 27 Feb, 2019
The :contains() selector in jQuery is used to select elements containing the specified string.
Syntax:
$(":contains(text)")
Parameters: This selector contains single parameter text which is mandatory and used to specify the text to find.
Example 1: This example uses :contains() selector to select element.
... | [
{
"code": null,
"e": 24570,
"s": 24542,
"text": "\n27 Feb, 2019"
},
{
"code": null,
"e": 24665,
"s": 24570,
"text": "The :contains() selector in jQuery is used to select elements containing the specified string."
},
{
"code": null,
"e": 24673,
"s": 24665,
"tex... |
Apache Camel - Endpoints | We have learnt about how the endpoints look like in our integration code. The expressions that we have used so far such as file:/order, jms:orderQueue, direct:distributeOrderDSL are the endpoints. As you see, they follow the URI specification formats. While evaluating this URI, the CamelContext creates the Endpoint ins... | [
{
"code": null,
"e": 2274,
"s": 1871,
"text": "We have learnt about how the endpoints look like in our integration code. The expressions that we have used so far such as file:/order, jms:orderQueue, direct:distributeOrderDSL are the endpoints. As you see, they follow the URI specification formats. W... |
Extract bit planes from an Image in Matlab - GeeksforGeeks | 28 May, 2017
Image is basically combination of individual pixel (dots) information. When we write that image is of 620 X 480 size, it means that image has 620 pixel in horizontal direction and 480 pixel in vertical direction. So, altogether there is 620 X 480 pixels and each pixels contains some information about image... | [
{
"code": null,
"e": 24174,
"s": 24146,
"text": "\n28 May, 2017"
},
{
"code": null,
"e": 24483,
"s": 24174,
"text": "Image is basically combination of individual pixel (dots) information. When we write that image is of 620 X 480 size, it means that image has 620 pixel in horizont... |
Buddy Memory Allocation Program | Set 2 (Deallocation) - GeeksforGeeks | 20 Oct, 2021
Prerequisite – Buddy Allocation | Set 1 Question: Write a program to implement the buddy system of memory allocation and deallocation in Operating Systems.Explanation – As we already know from Set 1, the allocation is done via the usage of free lists. Now, for deallocation, we will maintain an extra data s... | [
{
"code": null,
"e": 24476,
"s": 24448,
"text": "\n20 Oct, 2021"
},
{
"code": null,
"e": 25547,
"s": 24476,
"text": "Prerequisite – Buddy Allocation | Set 1 Question: Write a program to implement the buddy system of memory allocation and deallocation in Operating Systems.Explanat... |
Count smaller elements on right side and greater elements on left side using Binary Index Tree - GeeksforGeeks | 06 Nov, 2021
Given an array arr[] of size N. The task is to find smaller elements on the right side and greater elements on the left side for each element arr[i] in the given array.Examples:
Input: arr[] = {12, 1, 2, 3, 0, 11, 4} Output: Smaller right: 6 1 1 1 0 1 0 Greater left: 0 1 1 1 4 1 2Input: arr[] = {5, 4, 3,... | [
{
"code": null,
"e": 24268,
"s": 24240,
"text": "\n06 Nov, 2021"
},
{
"code": null,
"e": 24448,
"s": 24268,
"text": "Given an array arr[] of size N. The task is to find smaller elements on the right side and greater elements on the left side for each element arr[i] in the given a... |
Powershell - Move File | Move-Item cmdlet is used to move a file by passing the path of the file to be moved and destination path where the file is to be moved.
In this example, we'll move a folder D:\Temp\Test\Test.txt to D:\Temp\Test1
Type the following command in PowerShell ISE Console
Move-Item D:\temp\Test\Test.txt D:\temp\Test1
You can s... | [
{
"code": null,
"e": 2170,
"s": 2034,
"text": "Move-Item cmdlet is used to move a file by passing the path of the file to be moved and destination path where the file is to be moved."
},
{
"code": null,
"e": 2246,
"s": 2170,
"text": "In this example, we'll move a folder D:\\Temp\... |
OpenPose, PNASNet 5 for Pose Classification Competition (Fastai) | by Benjamin Lau | Towards Data Science | I recently competed in a local AI competition where the challenge involved human pose classification with 15 different classes. This was my first ever AI competition and the experience was humbling. My team came in overall 2nd-runner up based on our model accuracy, creativity and teamwork. I will definitely recommend l... | [
{
"code": null,
"e": 767,
"s": 172,
"text": "I recently competed in a local AI competition where the challenge involved human pose classification with 15 different classes. This was my first ever AI competition and the experience was humbling. My team came in overall 2nd-runner up based on our model... |
Get Hash Code for Integer in Java | The HashCode for an Integer can be obtained using the hashCode() method in Java. This method does not accept any parameters and it returns a hash code value of the Integer object.
A program that demonstrates the hashCode() method in Java is given as follows:
Live Demo
import java.lang.*;
public class Demo {
public ... | [
{
"code": null,
"e": 1242,
"s": 1062,
"text": "The HashCode for an Integer can be obtained using the hashCode() method in Java. This method does not accept any parameters and it returns a hash code value of the Integer object."
},
{
"code": null,
"e": 1321,
"s": 1242,
"text": "A ... |
Android Slide Up/Down in Kotlin - GeeksforGeeks | 23 Feb, 2021
In Android Animations are the visuals that are added to make the user interface more interactive, clear and good looking.
In this article we will be discussing how to create a Slide Up/Down animation in Kotlin.
First step is to create a new Project in Android Studio. For this follow these steps:
Click on F... | [
{
"code": null,
"e": 25116,
"s": 25088,
"text": "\n23 Feb, 2021"
},
{
"code": null,
"e": 25238,
"s": 25116,
"text": "In Android Animations are the visuals that are added to make the user interface more interactive, clear and good looking."
},
{
"code": null,
"e": 2532... |
Get live train status using Python - GeeksforGeeks | 29 Dec, 2020
Suppose you want to travel to places using Indian Railways and have booked a train. But you are not sure that the train is on time or not and doing this manually can be very hectic. So in this article, we are going to write a Python script to get live train status using a train name or train code.
bs4: Bea... | [
{
"code": null,
"e": 24728,
"s": 24700,
"text": "\n29 Dec, 2020"
},
{
"code": null,
"e": 25027,
"s": 24728,
"text": "Suppose you want to travel to places using Indian Railways and have booked a train. But you are not sure that the train is on time or not and doing this manually c... |
Write Clean and SOLID Scala Spark Jobs | by Ronald Ángel | Towards Data Science | Creating data pipelines by writing spark jobs is nowadays easier due to the growth of new tools and data platforms that allow multiple data parties (analysts, engineers, scientists, etc.) to focus on understanding data and writing logic to get insights. Nevertheless, new tools like notebooks that allow easy scripting, ... | [
{
"code": null,
"e": 753,
"s": 47,
"text": "Creating data pipelines by writing spark jobs is nowadays easier due to the growth of new tools and data platforms that allow multiple data parties (analysts, engineers, scientists, etc.) to focus on understanding data and writing logic to get insights. Ne... |
Do You Use Apply in Pandas? There is a 600x Faster Way. | Towards Data Science | I recently read yet another article showing you how to speed up the apply function in pandas. These articles will usually tell you to parallelize the apply function to make it 2 to 4 times faster.
Before I show you how to make it 600 times faster, let’s illustrate a use case using the vanilla apply().
Let’s imagine you... | [
{
"code": null,
"e": 369,
"s": 172,
"text": "I recently read yet another article showing you how to speed up the apply function in pandas. These articles will usually tell you to parallelize the apply function to make it 2 to 4 times faster."
},
{
"code": null,
"e": 475,
"s": 369,
... |
Python Tweepy – Getting the number of tweets a user has liked - GeeksforGeeks | 18 Jun, 2020
In this article we will see how we can get number of statuses/tweets a user has liked/favourited. The favourites_count attribute provides us with an integer which denotes the number of statuses the user has favourited.
In order to get the number of statuses the user has favourited, we have to do the follow... | [
{
"code": null,
"e": 24488,
"s": 24460,
"text": "\n18 Jun, 2020"
},
{
"code": null,
"e": 24707,
"s": 24488,
"text": "In this article we will see how we can get number of statuses/tweets a user has liked/favourited. The favourites_count attribute provides us with an integer which ... |
Display the month number with SimpleDateFormat(“M”) in Java | To display the month number, use the SimpleDateFormat(“M”)
// displaying month number
Format f = new SimpleDateFormat("M");
String strMonth = f.format(new Date());
System.out.println("Month Number = "+strMonth);
Since, we have used the Format and SimpleDateFormat class above, therefore import the following packages. Wi... | [
{
"code": null,
"e": 1121,
"s": 1062,
"text": "To display the month number, use the SimpleDateFormat(“M”)"
},
{
"code": null,
"e": 1274,
"s": 1121,
"text": "// displaying month number\nFormat f = new SimpleDateFormat(\"M\");\nString strMonth = f.format(new Date());\nSystem.out.pr... |
MapReduce - Hadoop Implementation | MapReduce is a framework that is used for writing applications to process huge volumes of data on large clusters of commodity hardware in a reliable manner. This chapter takes you through the operation of MapReduce in Hadoop framework using Java.
Generally MapReduce paradigm is based on sending map-reduce programs to c... | [
{
"code": null,
"e": 2037,
"s": 1790,
"text": "MapReduce is a framework that is used for writing applications to process huge volumes of data on large clusters of commodity hardware in a reliable manner. This chapter takes you through the operation of MapReduce in Hadoop framework using Java."
},
... |
Generating A Twitter Ego-Network & Detecting Communities | by Shaham | Towards Data Science | Our hearts have not even been engaged — nor, for that matter, have our ears! We’ve been much more like someone divinely distracted and self-absorbed into whose ear the clock has just pealed the twelve strokes of noon with all its force [a twitter notification wakes you up] and who all at once wakes up and asks himself ... | [
{
"code": null,
"e": 1380,
"s": 172,
"text": "Our hearts have not even been engaged — nor, for that matter, have our ears! We’ve been much more like someone divinely distracted and self-absorbed into whose ear the clock has just pealed the twelve strokes of noon with all its force [a twitter notific... |
Feature Engineering for Election Result Prediction (in Python) | by Thamindu Dilshan Jayawickrama | Towards Data Science | I recently competed in a Kaggle competition where we have to predict the election results using machine learning. The dataset was from the 2019 India general election (see here). This article explains how to clean and prepare the dataset, create new features out of the existing ones and then predict the results using a... | [
{
"code": null,
"e": 910,
"s": 171,
"text": "I recently competed in a Kaggle competition where we have to predict the election results using machine learning. The dataset was from the 2019 India general election (see here). This article explains how to clean and prepare the dataset, create new featu... |
String to binary in JavaScript | We are required to write a JavaScript function that takes in a string as the only input. The function should construct and return the binary representation of the input string.
For example −
If the input string is −
const str = 'Hello World';
Then the output should be −
const output = '1001000 1100101 1101100 1101100 1... | [
{
"code": null,
"e": 1239,
"s": 1062,
"text": "We are required to write a JavaScript function that takes in a string as the only input. The function should construct and return the binary representation of the input string."
},
{
"code": null,
"e": 1253,
"s": 1239,
"text": "For e... |
Python Pandas - Get the hour of the day component of the Period | To get the hour of the day component of the Period, use the period.hour property.
At first, import the required libraries −
import pandas as pd
The pandas.Period represents a period of time. Creating two Period objects −
period1 = pd.Period("2020-09-23 05:55:30")
period2 = pd.Period(freq="H", year = 2021, month = 7, da... | [
{
"code": null,
"e": 1144,
"s": 1062,
"text": "To get the hour of the day component of the Period, use the period.hour property."
},
{
"code": null,
"e": 1186,
"s": 1144,
"text": "At first, import the required libraries −"
},
{
"code": null,
"e": 1206,
"s": 1186,
... |
java.lang.management.ThreadInfo Class in Java - GeeksforGeeks | 03 Sep, 2021
java.lang.management.ThreadInfo class contains methods to get information about a thread. This information includes:
Thread ID
Thread Name
State of the Thread
Stack trace of the Thread
The object upon which the Thread is blocked
List of object monitors that are blocked by the Thread
List of ownable synchro... | [
{
"code": null,
"e": 25347,
"s": 25319,
"text": "\n03 Sep, 2021"
},
{
"code": null,
"e": 25464,
"s": 25347,
"text": "java.lang.management.ThreadInfo class contains methods to get information about a thread. This information includes:"
},
{
"code": null,
"e": 25474,
... |
Exploratory network analysis of Marvel Universe | by Tomaz Bratanic | Towards Data Science | A wise man once said that the 2020–30 decade will be the decade of graph data science. Actually, that happened just a few days ago at the Nodes 2020 conference, and that wise man was Emil Eifrem presenting at the keynote of the Nodes 2020. In case you missed the conference, all the presentations are already available o... | [
{
"code": null,
"e": 499,
"s": 172,
"text": "A wise man once said that the 2020–30 decade will be the decade of graph data science. Actually, that happened just a few days ago at the Nodes 2020 conference, and that wise man was Emil Eifrem presenting at the keynote of the Nodes 2020. In case you mis... |
How to ignore a field of JSON object using the Jackson library in Java?
| The Jackson @JsonIgnore annotation can be used to ignore a certain property or field of a Java object. The property can be ignored both when reading JSON into Java objects and when writing Java objects into JSON. We can use the readValue() and writeValueAsString() methods of ObjectMapper class to read a JSON to Java Ob... | [
{
"code": null,
"e": 1423,
"s": 1062,
"text": "The Jackson @JsonIgnore annotation can be used to ignore a certain property or field of a Java object. The property can be ignored both when reading JSON into Java objects and when writing Java objects into JSON. We can use the readValue() and writeValu... |
Python OpenCV - Bicubic Interpolation for Resizing Image - GeeksforGeeks | 08 May, 2021
Image resizing is a crucial concept that wishes to augment or reduce the number of pixels in a picture. Applications of image resizing can occur under a wider form of scenarios: transliteration of the image, correcting for lens distortion, changing perspective, and rotating a picture. The results of resiz... | [
{
"code": null,
"e": 24390,
"s": 24359,
"text": " \n08 May, 2021\n"
},
{
"code": null,
"e": 24766,
"s": 24390,
"text": "Image resizing is a crucial concept that wishes to augment or reduce the number of pixels in a picture. Applications of image resizing can occur under a wider f... |
Loop through all MongoDB collections and execute query? | First of all, you need to get your collection with the help of getCollectionNames().
The database name is “test”. Let us loop through all MongoDB collections and execute the query. The query is as follows −
> db.getCollectionNames().forEach(function(collectioNameDemo)
... {
... var nextDemo = db[(collectioNameDemo) ... | [
{
"code": null,
"e": 1147,
"s": 1062,
"text": "First of all, you need to get your collection with the help of getCollectionNames()."
},
{
"code": null,
"e": 1269,
"s": 1147,
"text": "The database name is “test”. Let us loop through all MongoDB collections and execute the query. T... |
TensorBoard- A Visualization suite for Tensorflow models | by Renu Khandelwal | Towards Data Science | In this article, you will learn to use TensorBoard to display metrics, graphs, images, and histograms of weights and bias over different epochs for a deep learning model created in TensorFlow along with common issues you may encounter with TensorBoard.
What is TensorBoard?
TensorBoard is a visualization toolkit from Te... | [
{
"code": null,
"e": 425,
"s": 172,
"text": "In this article, you will learn to use TensorBoard to display metrics, graphs, images, and histograms of weights and bias over different epochs for a deep learning model created in TensorFlow along with common issues you may encounter with TensorBoard."
... |
C# Queryable TakeLast() Method | Get specified number of elements from the end using the TakeLast() method.
The following is our array.
int[] pages = { 492, 290, 129, 602, 152 };
Now, use OrderBy to order the elements in ascending order. Then use the TakeLast() method to get specified number of elements from the end.
marks.AsQueryable().OrderByDescend... | [
{
"code": null,
"e": 1137,
"s": 1062,
"text": "Get specified number of elements from the end using the TakeLast() method."
},
{
"code": null,
"e": 1165,
"s": 1137,
"text": "The following is our array."
},
{
"code": null,
"e": 1208,
"s": 1165,
"text": "int[] pa... |
Different Ways To Count Unique Values In R | by Chi Nguyen | Towards Data Science | I was originally a Python user. I use Python in my daily work to explore, visualize and analyze data. However, at the moment, as I am undertaking my Master in Statistics, it is required that I learn R. As R is an open source program with about 10,000 libraries and packages contributed by different developers and statis... | [
{
"code": null,
"e": 856,
"s": 171,
"text": "I was originally a Python user. I use Python in my daily work to explore, visualize and analyze data. However, at the moment, as I am undertaking my Master in Statistics, it is required that I learn R. As R is an open source program with about 10,000 libr... |
An Understandable Guide to ROC Curves And AUC and Why and When to use them? | by Rahul Agarwal | Towards Data Science | ROC curves, or receiver operating characteristic curves, are one of the most common evaluation metrics for checking a classification model’s performance. Unfortunately, many data scientists often just end up seeing the ROC curves and then quoting an AUC (short for the area under the ROC curve) value without really unde... | [
{
"code": null,
"e": 571,
"s": 172,
"text": "ROC curves, or receiver operating characteristic curves, are one of the most common evaluation metrics for checking a classification model’s performance. Unfortunately, many data scientists often just end up seeing the ROC curves and then quoting an AUC (... |
How to check whether a string ends with one from a list of suffixes in Python? | Python has a method endswith(tuple) in the String class. This method accepts a tuple of strings that you want to search and is called on a string object. You can call this method in the following way:
string = 'core java'
print(string.endswith(('txt', 'xml', 'java', 'orld')))
OUTPUT
True
There is another way to find if... | [
{
"code": null,
"e": 1263,
"s": 1062,
"text": "Python has a method endswith(tuple) in the String class. This method accepts a tuple of strings that you want to search and is called on a string object. You can call this method in the following way:"
},
{
"code": null,
"e": 1339,
"s": ... |
PHP | getimagesize() Function - GeeksforGeeks | 01 Aug, 2021
The getimagesize() function in PHP is an inbuilt function which is used to get the size of an image. This function accepts the filename as a parameter and determines the image size and returns the dimensions with the file type and height/width of image.
Syntax:
array getimagesize( $filename, $image_info )
... | [
{
"code": null,
"e": 42139,
"s": 42111,
"text": "\n01 Aug, 2021"
},
{
"code": null,
"e": 42393,
"s": 42139,
"text": "The getimagesize() function in PHP is an inbuilt function which is used to get the size of an image. This function accepts the filename as a parameter and determin... |
Priority Queue of Lists in C++ with Examples - GeeksforGeeks | 10 Nov, 2021
Priority Queue
Priority queues are a type of container adapters, specifically designed such that the first element of the queue is the greatest of all elements in the queue and elements are in nonincreasing order (hence we can see that each element of the queue has a priority {fixed order}).
Functions used... | [
{
"code": null,
"e": 25343,
"s": 25315,
"text": "\n10 Nov, 2021"
},
{
"code": null,
"e": 25358,
"s": 25343,
"text": "Priority Queue"
},
{
"code": null,
"e": 25636,
"s": 25358,
"text": "Priority queues are a type of container adapters, specifically designed suc... |
Python | Set 6 (Command Line and Variable Arguments) - GeeksforGeeks | 25 Jan, 2022
Previous Python Articles (Set 1 | Set 2 | Set 3 | Set 4 | Set 5) This article is focused on command line arguments as well as variable arguments (args and kwargs) for the functions in python.
Till now, we have taken input in python using raw_input() or input() [for integers]. There is another method that ... | [
{
"code": null,
"e": 25496,
"s": 25468,
"text": "\n25 Jan, 2022"
},
{
"code": null,
"e": 25689,
"s": 25496,
"text": "Previous Python Articles (Set 1 | Set 2 | Set 3 | Set 4 | Set 5) This article is focused on command line arguments as well as variable arguments (args and kwargs) ... |
How to get the value of text input field using JavaScript ? - GeeksforGeeks | 09 Nov, 2021
We can get the value of the text input field using various methods in JavaScript. There is a text value property that can set and return the value of the value attribute of a text field. Also, we can use the jquery val() method inside the script to get or set the value of the text input field.
The below ar... | [
{
"code": null,
"e": 26287,
"s": 26259,
"text": "\n09 Nov, 2021"
},
{
"code": null,
"e": 26582,
"s": 26287,
"text": "We can get the value of the text input field using various methods in JavaScript. There is a text value property that can set and return the value of the value att... |
How to find inverse log transformation in R ? - GeeksforGeeks | 21 Apr, 2021
A logarithm of a given number n is the exponent to which another number which is been fixed, the base b, must be raised, to produce that number n. In layman terms the logarithm counts the number of occurrences of the same factor in repeated multiplication. A logarithmic function is represented as:
f(x) = ... | [
{
"code": null,
"e": 26487,
"s": 26459,
"text": "\n21 Apr, 2021"
},
{
"code": null,
"e": 26787,
"s": 26487,
"text": "A logarithm of a given number n is the exponent to which another number which is been fixed, the base b, must be raised, to produce that number n. In layman terms ... |
Python - Key with all Characters in String - GeeksforGeeks | 08 May, 2020
Sometimes, while working with Python Strings, we can have problem in which we need to extract all the keys that have all the characters in the character value list. This kind of problem has application has many domains such as day-day programming. Let’s discuss a way in which this problem can be solved.
Me... | [
{
"code": null,
"e": 25537,
"s": 25509,
"text": "\n08 May, 2020"
},
{
"code": null,
"e": 25842,
"s": 25537,
"text": "Sometimes, while working with Python Strings, we can have problem in which we need to extract all the keys that have all the characters in the character value list... |
PHP | array_multisort() Function - GeeksforGeeks | 18 Mar, 2018
The array_multisort() is an inbuilt function in PHP which is used to sort multiple arrays at once or a multi-dimensional array with each individual dimension.With this function, one should remember that string keys will be maintained, but numeric keys will be re-indexed, starting at 0 and increases by 1.
S... | [
{
"code": null,
"e": 25731,
"s": 25703,
"text": "\n18 Mar, 2018"
},
{
"code": null,
"e": 26037,
"s": 25731,
"text": "The array_multisort() is an inbuilt function in PHP which is used to sort multiple arrays at once or a multi-dimensional array with each individual dimension.With ... |
Find the point where maximum intervals overlap - GeeksforGeeks | 17 Jan, 2022
Consider a big party where a log register for guest’s entry and exit times is maintained. Find the time at which there are maximum guests in the party. Note that entries in register are not in any order.Example :
Input: arrl[] = {1, 2, 9, 5, 5}
exit[] = {4, 5, 12, 9, 12}
First guest in array arrive... | [
{
"code": null,
"e": 25787,
"s": 25759,
"text": "\n17 Jan, 2022"
},
{
"code": null,
"e": 26001,
"s": 25787,
"text": "Consider a big party where a log register for guest’s entry and exit times is maintained. Find the time at which there are maximum guests in the party. Note that e... |
Cauchy's Mean Value Theorem - GeeksforGeeks | 15 Apr, 2018
Suppose f(x) and g(x) are 2 functions satisfying three conditions:
1) f(x), g(x) are continuous in the closed interval a <= x <= b
2) f(x), g(x) are differentiable in the open interval a < x < b and
3) g'(x) != 0 for all x belongs to the open interval a < x < b
Then according to Cauchy’s Mean Value Theorem... | [
{
"code": null,
"e": 31279,
"s": 31251,
"text": "\n15 Apr, 2018"
},
{
"code": null,
"e": 31346,
"s": 31279,
"text": "Suppose f(x) and g(x) are 2 functions satisfying three conditions:"
},
{
"code": null,
"e": 31410,
"s": 31346,
"text": "1) f(x), g(x) are conti... |
Find Length of a Linked List (Iterative and Recursive) - GeeksforGeeks | 20 Jan, 2022
Write a function to count the number of nodes in a given singly linked list.
For example, the function should return 5 for linked list 1->3->1->2->1.
Iterative Solution
1) Initialize count as 0
2) Initialize a node pointer, current = head.
3) Do following while current is not NULL
a) current = cur... | [
{
"code": null,
"e": 25580,
"s": 25552,
"text": "\n20 Jan, 2022"
},
{
"code": null,
"e": 25658,
"s": 25580,
"text": "Write a function to count the number of nodes in a given singly linked list. "
},
{
"code": null,
"e": 25732,
"s": 25658,
"text": "For example,... |
ReactJS | Binding Event Handlers - GeeksforGeeks | 22 Jun, 2020
In ReactJS, we need to bind events so that the this keyword would not return an “undefined“. In this article, we are going to see the different ways in which we can bind event handlers in ReactJS.
First, let’s make a new class component and name it Binding.js. Make a simple class component with a simple me... | [
{
"code": null,
"e": 25917,
"s": 25889,
"text": "\n22 Jun, 2020"
},
{
"code": null,
"e": 26114,
"s": 25917,
"text": "In ReactJS, we need to bind events so that the this keyword would not return an “undefined“. In this article, we are going to see the different ways in which we ca... |
filepath.Ext() Function in Golang With Examples - GeeksforGeeks | 10 May, 2020
In Go language, path package used for paths separated by forwarding slashes, such as the paths in URLs. The filepath.Ext() function in Go language used to return the file name extension used by the specified path. The extension is the suffix beginning at the final dot in the final element of path; it is em... | [
{
"code": null,
"e": 25703,
"s": 25675,
"text": "\n10 May, 2020"
},
{
"code": null,
"e": 26179,
"s": 25703,
"text": "In Go language, path package used for paths separated by forwarding slashes, such as the paths in URLs. The filepath.Ext() function in Go language used to return t... |
Benchmarking in Julia - GeeksforGeeks | 03 Aug, 2021
In Julia, most of the codes are checked for it’s speed and efficiency. One of the hallmarks of Julia is that it’s quite faster than it’s other scientific computing counterparts(Python, R, Matlab). To verify this, we often tend to compare the speed and performance of a code block run across various language... | [
{
"code": null,
"e": 24153,
"s": 24125,
"text": "\n03 Aug, 2021"
},
{
"code": null,
"e": 24803,
"s": 24153,
"text": "In Julia, most of the codes are checked for it’s speed and efficiency. One of the hallmarks of Julia is that it’s quite faster than it’s other scientific computing... |
GATE | GATE CS 2020 | Question 56 - GeeksforGeeks | 11 Aug, 2021
Consider the following C functions.
int fun1(int n) { static int i= 0; if (n > 0) { ++i; fun1(n-1); } return (i);}int fun2(int n) { static int i= 0; if (n>0) { i = i+ fun1 (n) ; fun2(n-1) ; }return (i);}
The return value of fun2(5) is ________ .
Note – This question was N... | [
{
"code": null,
"e": 24474,
"s": 24446,
"text": "\n11 Aug, 2021"
},
{
"code": null,
"e": 24510,
"s": 24474,
"text": "Consider the following C functions."
},
{
"code": "int fun1(int n) { static int i= 0; if (n > 0) { ++i; fun1(n-1); } return (i);}int fu... |
Fibonacci Series in C# | To find Fibonaccli series, firsty set the first two number in the series as 0 and 1.
int val1 = 0, val2 = 1, v
Now loop through 2 to n and find the fibonai series. Every number in the series is the sum of the last 2 elements −
for(i=2;i<n;++i) {
val3 = val1 + val2;
Console.Write(val3+" ");
val1 = val2;
val2... | [
{
"code": null,
"e": 1147,
"s": 1062,
"text": "To find Fibonaccli series, firsty set the first two number in the series as 0 and 1."
},
{
"code": null,
"e": 1173,
"s": 1147,
"text": "int val1 = 0, val2 = 1, v"
},
{
"code": null,
"e": 1289,
"s": 1173,
"text": "... |
How to create spinner Programmatically from array in Android? | This example demonstrates how do I create spinner programmatically from array in android.
Step 1 − Create a new project in Android Studio, go to File ⇒ New Project and fill all required details to create a new project.
Step 2 − Add the following code to res/layout/activity_main.xml.
<?xml version="1.0" encoding="utf-8"... | [
{
"code": null,
"e": 1152,
"s": 1062,
"text": "This example demonstrates how do I create spinner programmatically from array in android."
},
{
"code": null,
"e": 1281,
"s": 1152,
"text": "Step 1 − Create a new project in Android Studio, go to File ⇒ New Project and fill all requi... |
JavaScript - Page Printing | Many times you would like to place a button on your webpage to print the content of that web page via an actual printer. JavaScript helps you to implement this functionality using the print function of window object.
The JavaScript print function window.print() prints the current web page when executed. You can call th... | [
{
"code": null,
"e": 2683,
"s": 2466,
"text": "Many times you would like to place a button on your webpage to print the content of that web page via an actual printer. JavaScript helps you to implement this functionality using the print function of window object."
},
{
"code": null,
"e":... |
How to define variables in C#? | Each variable in C# has a specific type, which determines the size and layout of the variable's memory the range of values that can be stored within that memory and the set of operations that can be applied to the variable.
For variables −
<data_type> <variable_list>;
Let us see an example −
int x, y;
Above the varia... | [
{
"code": null,
"e": 1286,
"s": 1062,
"text": "Each variable in C# has a specific type, which determines the size and layout of the variable's memory the range of values that can be stored within that memory and the set of operations that can be applied to the variable."
},
{
"code": null,
... |
K-Means Clustering. Making Sense of Text Data using... | by Daniel Foley | Towards Data Science | Customer Segmentation, Document Classification, House Price Estimation, and Fraud Detection. These are just some of the real world applications of clustering. There are many other use cases for this algorithm but today we are going to apply K-means to text data. In particular, we are going to implement the algorithm fr... | [
{
"code": null,
"e": 577,
"s": 46,
"text": "Customer Segmentation, Document Classification, House Price Estimation, and Fraud Detection. These are just some of the real world applications of clustering. There are many other use cases for this algorithm but today we are going to apply K-means to text... |
Take Your Histograms to the Next Level Using Matplotlib | by Max Hilsdorf | Towards Data Science | Histograms are the most common method for visualizing the distribution of a variable. A simple histogram can be very useful to get a first glance at the data. However, compared to other prominent plot types like pie-, bar-, or line plots, they are rather boring to look at. Most importantly, they require a statistical b... | [
{
"code": null,
"e": 673,
"s": 172,
"text": "Histograms are the most common method for visualizing the distribution of a variable. A simple histogram can be very useful to get a first glance at the data. However, compared to other prominent plot types like pie-, bar-, or line plots, they are rather ... |
Check for an element in a HashSet in Java | To check whether an element is in a HashSet or not in Java, use the contains() method.
Create a HashSet −
HashSet hs = new HashSet();
Add elements to it −
hs.add("R");
hs.add("S");
hs.add("T");
hs.add("V");
hs.add("W");
hs.add("Y");
hs.add("Z");
To check for an element, for example, S here, use the contains() −
hs.cont... | [
{
"code": null,
"e": 1149,
"s": 1062,
"text": "To check whether an element is in a HashSet or not in Java, use the contains() method."
},
{
"code": null,
"e": 1168,
"s": 1149,
"text": "Create a HashSet −"
},
{
"code": null,
"e": 1196,
"s": 1168,
"text": "HashS... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.