title stringlengths 3 221 | text stringlengths 17 477k | parsed listlengths 0 3.17k |
|---|---|---|
Running previous command with sudo - GeeksforGeeks | 19 Nov, 2018
Very often in linux, we execute a command only to see an error displaying ‘Permission denied.’ Then we realize that we had forgotten sudo before the command and we write the command again, this time with a sudo infront.
Examples:
rohan@Rohan-PC:~$ apt-get update
Reading package lists... Done
W: chmod 0700 ... | [
{
"code": null,
"e": 24015,
"s": 23987,
"text": "\n19 Nov, 2018"
},
{
"code": null,
"e": 24235,
"s": 24015,
"text": "Very often in linux, we execute a command only to see an error displaying ‘Permission denied.’ Then we realize that we had forgotten sudo before the command and we... |
Print string of odd length in 'X' format - GeeksforGeeks | 25 Nov, 2021
Given a string of odd length, print the string X format.Examples :
Input: 12345
Output:
1 5
2 4
3
2 4
1 5
Input: geeksforgeeks
Output:
g s
e k
e e
k e
s g
f r
... | [
{
"code": null,
"e": 24379,
"s": 24351,
"text": "\n25 Nov, 2021"
},
{
"code": null,
"e": 24447,
"s": 24379,
"text": "Given a string of odd length, print the string X format.Examples : "
},
{
"code": null,
"e": 24836,
"s": 24447,
"text": "Input: 12345\nOutput:\... |
F# - while..do Loops | The while...do expression is used to perform iterative execution while a specified test condition is true.
while test-expression do
body-expression
The test-expression is evaluated first; if it is true, the body-expression is executed and the test expression is evaluated again. The body-expression must have type un... | [
{
"code": null,
"e": 2268,
"s": 2161,
"text": "The while...do expression is used to perform iterative execution while a specified test condition is true."
},
{
"code": null,
"e": 2313,
"s": 2268,
"text": "while test-expression do\n body-expression\n"
},
{
"code": null,
... |
Creating Synthetic Data for Machine Learning | by Amizorach | Towards Data Science | The training itself is based on Jacob Solawetz Tutorial on Training custom objects with YOLOv5
And so I will be using the YOLOv5 repository by Ultralytics.
This tutorial will guide you through the steps needed to create the synthetic data and show how you can then train it with YOLOv5 in order to work on real images.
I... | [
{
"code": null,
"e": 267,
"s": 172,
"text": "The training itself is based on Jacob Solawetz Tutorial on Training custom objects with YOLOv5"
},
{
"code": null,
"e": 328,
"s": 267,
"text": "And so I will be using the YOLOv5 repository by Ultralytics."
},
{
"code": null,
... |
Compute Cumulative Logistic Density in R Programming - plogis() Function - GeeksforGeeks | 25 Jun, 2020
plogis() function in R Language is used to compute logistic cumulative density of the distribution. It also creates a plot of the density of the logistic cumulative distribution.
Syntax: plogis(vec)
Parameters:vec: Vector of x-values for density
Example 1:
# R program to calculate # cumulative logistic den... | [
{
"code": null,
"e": 25043,
"s": 25015,
"text": "\n25 Jun, 2020"
},
{
"code": null,
"e": 25222,
"s": 25043,
"text": "plogis() function in R Language is used to compute logistic cumulative density of the distribution. It also creates a plot of the density of the logistic cumulativ... |
How to Fix: No module named pandas - GeeksforGeeks | 19 Dec, 2021
In this article, we will discuss how to fix the No module named pandas error.
The error “No module named pandas ” will occur when there is no pandas library in your environment IE the pandas module is either not installed or there is an issue while downloading the module right.
Let’s see the error by creat... | [
{
"code": null,
"e": 25555,
"s": 25527,
"text": "\n19 Dec, 2021"
},
{
"code": null,
"e": 25633,
"s": 25555,
"text": "In this article, we will discuss how to fix the No module named pandas error."
},
{
"code": null,
"e": 25834,
"s": 25633,
"text": "The error “N... |
Node.js Redis Module - GeeksforGeeks | 08 Oct, 2021
Redis is an Open Source store for storing data structures. It is used in multiple ways. It is used as a database, cache, and message broker. It can store data structures such as strings, hashes, sets, sorted sets, bitmaps, indexes, and streams.
Redis is very useful for Node.js developers as it reduces the ... | [
{
"code": null,
"e": 26377,
"s": 26349,
"text": "\n08 Oct, 2021"
},
{
"code": null,
"e": 26622,
"s": 26377,
"text": "Redis is an Open Source store for storing data structures. It is used in multiple ways. It is used as a database, cache, and message broker. It can store data stru... |
How to get started with the Graph Data Science Library of Neo4j | by CJ Sullivan | Towards Data Science | The field of graph analytics has been around for a long time. The general idea is to create a database of things connecting to other things. Those things might be people connecting to other people on social media or maybe flights between cities or any number of other examples. Graphs are regularly used to enhance searc... | [
{
"code": null,
"e": 627,
"s": 171,
"text": "The field of graph analytics has been around for a long time. The general idea is to create a database of things connecting to other things. Those things might be people connecting to other people on social media or maybe flights between cities or any num... |
Laravel - Facades | Facades provide a static interface to classes that are available in the application's service container. Laravel facades serve as static proxies to underlying classes in the service container, providing the benefit of a terse, expressive syntax while maintaining more testability and flexibility than traditional static ... | [
{
"code": null,
"e": 2801,
"s": 2472,
"text": "Facades provide a static interface to classes that are available in the application's service container. Laravel facades serve as static proxies to underlying classes in the service container, providing the benefit of a terse, expressive syntax while ma... |
BigInteger toByteArray() Method in Java - GeeksforGeeks | 12 Apr, 2022
The java.math.BigInteger.toByteArray() method returns a array of byte containing the two’s-complement representation of this BigInteger. The most significant byte of byte array is present in the zeroth element. The returning array from this method contain sing bit and contain the minimum number of bytes re... | [
{
"code": null,
"e": 23948,
"s": 23920,
"text": "\n12 Apr, 2022"
},
{
"code": null,
"e": 24359,
"s": 23948,
"text": "The java.math.BigInteger.toByteArray() method returns a array of byte containing the two’s-complement representation of this BigInteger. The most significant byte ... |
Pangram Checking - GeeksforGeeks | 08 Apr, 2022
Given a string check if it is Pangram or not. A pangram is a sentence containing every letter in the English Alphabet.Examples : The quick brown fox jumps over the lazy dog ” is a Pangram [Contains all the characters from ‘a’ to ‘z’] “The quick brown fox jumps over the dog” is not a Pangram [Doesn’t contai... | [
{
"code": null,
"e": 26614,
"s": 26586,
"text": "\n08 Apr, 2022"
},
{
"code": null,
"e": 26989,
"s": 26614,
"text": "Given a string check if it is Pangram or not. A pangram is a sentence containing every letter in the English Alphabet.Examples : The quick brown fox jumps over the... |
Rotating Images using OpenCV in Java - GeeksforGeeks | 21 Dec, 2021
Image rotation is a common image processing routine used to rotate images at any desired angle. This helps in image reversal, flipping, and obtaining an intended view of the image. Image rotation has applications in matching, alignment, and other image-based algorithms. OpenCV is a well-known library used ... | [
{
"code": null,
"e": 26231,
"s": 26203,
"text": "\n21 Dec, 2021"
},
{
"code": null,
"e": 26560,
"s": 26231,
"text": "Image rotation is a common image processing routine used to rotate images at any desired angle. This helps in image reversal, flipping, and obtaining an intended v... |
How to Capture Weather Data with your own IoT Home Station | by Marcelo Rovai | Towards Data Science | When we are talking about physical variables, as temperature, pressure, etc., as a Data Scientist, usually you start working from a dataset that was created somewhere else. But have you thought about how to capture those data yourself?
On this tutorial we will learn how to get data from several different sensors, sendi... | [
{
"code": null,
"e": 407,
"s": 171,
"text": "When we are talking about physical variables, as temperature, pressure, etc., as a Data Scientist, usually you start working from a dataset that was created somewhere else. But have you thought about how to capture those data yourself?"
},
{
"code... |
Java Program to Compare Strings | You can compare two Strings in Java using the compareTo() method, equals() method or == operator.
The compareTo() method compares two strings. The comparison is based on the Unicode value of each character in the strings. The character sequence represented by this String object is compared lexicographically to the char... | [
{
"code": null,
"e": 1160,
"s": 1062,
"text": "You can compare two Strings in Java using the compareTo() method, equals() method or == operator."
},
{
"code": null,
"e": 1433,
"s": 1160,
"text": "The compareTo() method compares two strings. The comparison is based on the Unicode ... |
Add a column with the literal value in PySpark DataFrame - GeeksforGeeks | 24 Sep, 2021
In this article, we are going to see how to add a column with the literal value in PySpark Dataframe.
Creating dataframe for demonstration:
Python3
# import SparkSession from the pysparkfrom pyspark.sql import SparkSession # build and create the# SparkSession with name "lit_value"spark = SparkSession.build... | [
{
"code": null,
"e": 23939,
"s": 23911,
"text": "\n24 Sep, 2021"
},
{
"code": null,
"e": 24041,
"s": 23939,
"text": "In this article, we are going to see how to add a column with the literal value in PySpark Dataframe."
},
{
"code": null,
"e": 24079,
"s": 24041,
... |
How do I plot two countplot graphs side by side in Seaborn using Matplotlib? | To plot two countplot graphs side by side in Seaborn, we can take the following steps −
To create two graphs, we can use nrows=1, ncols=2 with figure size (7, 7).
To create two graphs, we can use nrows=1, ncols=2 with figure size (7, 7).
Create a dataframe with keys, col1 and col2, using Pandas.
Create a dataframe with... | [
{
"code": null,
"e": 1150,
"s": 1062,
"text": "To plot two countplot graphs side by side in Seaborn, we can take the following steps −"
},
{
"code": null,
"e": 1225,
"s": 1150,
"text": "To create two graphs, we can use nrows=1, ncols=2 with figure size (7, 7)."
},
{
"code... |
Explain Squeeze Function C language | Squeeze(s1,s2) or squeeze(char[],char[]) is a user defined function which is used to delete the common characters or equal characters in two strings.
How to delete the common characters in two strings using squeeze function in C programming language?
In this program, the user enters two strings in the console and write... | [
{
"code": null,
"e": 1212,
"s": 1062,
"text": "Squeeze(s1,s2) or squeeze(char[],char[]) is a user defined function which is used to delete the common characters or equal characters in two strings."
},
{
"code": null,
"e": 1313,
"s": 1212,
"text": "How to delete the common charact... |
How to Remove % Sign From Data Table | by Benjamin Obi Tayo Ph.D. | Towards Data Science | Data wrangling is the process of transforming raw unstructured to a form that is ready for further analysis such as data visualization or for model building. Sometimes after wrangling your data, you may notice that some columns may contain symbols such as the dollar sign ($), plus sign (+), minus sign (-) or the percen... | [
{
"code": null,
"e": 632,
"s": 172,
"text": "Data wrangling is the process of transforming raw unstructured to a form that is ready for further analysis such as data visualization or for model building. Sometimes after wrangling your data, you may notice that some columns may contain symbols such as... |
Building a cryptocurrency dashboard using Plotly and Binance API | by Mayank Vadsola | Towards Data Science | As of now, according to CoinMarketCap, the global cryptocurrency market is worth more than $1.5T. Recent approval from a couple of banks and credit card companies to include cryptocurrencies as one of their financial products indicates a bright future for the crypto market. In the last few years, more people started tr... | [
{
"code": null,
"e": 773,
"s": 172,
"text": "As of now, according to CoinMarketCap, the global cryptocurrency market is worth more than $1.5T. Recent approval from a couple of banks and credit card companies to include cryptocurrencies as one of their financial products indicates a bright future for... |
Character.charValue() in Java with examples - GeeksforGeeks | 06 Dec, 2018
Java.lang.Character.charValue() is a built-in method in Java that returns the value of this character object. This method converts the Character object into its primitive data type char.
Syntax:
public char charValue()
The function does not accepts any parameter.
Return Type: This method returns the pr... | [
{
"code": null,
"e": 23917,
"s": 23889,
"text": "\n06 Dec, 2018"
},
{
"code": null,
"e": 24104,
"s": 23917,
"text": "Java.lang.Character.charValue() is a built-in method in Java that returns the value of this character object. This method converts the Character object into its pr... |
Count pairs with sum as a prime number and less than n - GeeksforGeeks | 10 Mar, 2022
Given a positive integer n, count distinct number of pairs (x, y) that satisfy following conditions :
(x + y) is a prime number.
(x + y) < n
x != y
1 <= x, y
Examples:
Input : n = 6
Output : 3
prime pairs whose sum is less than 6 are:
(1,2), (1,4), (2,3)
Input : 12
Output : 11
prime pairs whose sum is ... | [
{
"code": null,
"e": 24586,
"s": 24558,
"text": "\n10 Mar, 2022"
},
{
"code": null,
"e": 24689,
"s": 24586,
"text": "Given a positive integer n, count distinct number of pairs (x, y) that satisfy following conditions : "
},
{
"code": null,
"e": 24716,
"s": 24689,
... |
Calculating Wind Chill Factor(WCF) or Wind Chill Index(WCI) in Python | Wind Chill Factor is an indication of how cold we feel not just because of the atmospheric temperature but also taking into account the speed of the wind. It combines both these factors in form of an equation and gives us a measurement of how cold it actually feels when the wind blows at a higher speed even without any... | [
{
"code": null,
"e": 1406,
"s": 1062,
"text": "Wind Chill Factor is an indication of how cold we feel not just because of the atmospheric temperature but also taking into account the speed of the wind. It combines both these factors in form of an equation and gives us a measurement of how cold it ac... |
In Android how to register a custom Intent filter to a broadcast receiver? | Before getting into the example, we should know what is intent filter in android. An intent filter is an instance of the IntentFilter class. Intent filters are helpful while using implicit intents, It is not going to handle in java code, we have to set it up in AndroidManifest.xml. Android must know what kind of intent... | [
{
"code": null,
"e": 1475,
"s": 1062,
"text": "Before getting into the example, we should know what is intent filter in android. An intent filter is an instance of the IntentFilter class. Intent filters are helpful while using implicit intents, It is not going to handle in java code, we have to set ... |
How to create an ordered list using HTML5 ? - GeeksforGeeks | 03 Jun, 2020
In this article, we define an ordered list by using the <ol> tag in the document, This tag is used for ordered list, an ordered list can be numerical or alphabetical. Inside the <ol> tag you have to make a list li of items that will follow the order.
Syntax:
<ol>
<li>Item1</li>
<li>Item2</li>
<li>... | [
{
"code": null,
"e": 24503,
"s": 24475,
"text": "\n03 Jun, 2020"
},
{
"code": null,
"e": 24754,
"s": 24503,
"text": "In this article, we define an ordered list by using the <ol> tag in the document, This tag is used for ordered list, an ordered list can be numerical or alphabetic... |
C Hello World Program - GeeksforGeeks | 17 Jul, 2020
To begin with, the “Hello World” program is the first step towards learning any programming language and also one of the simplest programs you will learn. All one needs to do is display the message “Hello World” on the screen. Let’s look at the program and try to understand the terminologies involved in it... | [
{
"code": null,
"e": 24563,
"s": 24535,
"text": "\n17 Jul, 2020"
},
{
"code": null,
"e": 24872,
"s": 24563,
"text": "To begin with, the “Hello World” program is the first step towards learning any programming language and also one of the simplest programs you will learn. All one ... |
Central Limit Theorem — Explained with Examples | by Soner Yıldırım | Towards Data Science | The central limit theorem (CLT) is a fundamental and widely used theorem in the field of statistics. Before we go in detail on CLT, let’s define some terms that will make it easier to comprehend the idea behind CLT.
Population is all elements in a group. For example, college students in US is a population that includes... | [
{
"code": null,
"e": 388,
"s": 172,
"text": "The central limit theorem (CLT) is a fundamental and widely used theorem in the field of statistics. Before we go in detail on CLT, let’s define some terms that will make it easier to comprehend the idea behind CLT."
},
{
"code": null,
"e": 63... |
How do we upload external file on a website using HTML forms? | If you want to allow a user to upload an external file to your website, you need to use a file upload box, also known as a file select box. This is also created using the <input> element but type attribute is set to file.
Live Demo
You can try to run the following code to upload an external file to your website −
<!DOC... | [
{
"code": null,
"e": 1284,
"s": 1062,
"text": "If you want to allow a user to upload an external file to your website, you need to use a file upload box, also known as a file select box. This is also created using the <input> element but type attribute is set to file."
},
{
"code": null,
... |
TensorFlow - Single Layer Perceptron | For understanding single layer perceptron, it is important to understand Artificial Neural Networks (ANN). Artificial neural networks is the information processing system the mechanism of which is inspired with the functionality of biological neural circuits. An artificial neural network possesses many processing units... | [
{
"code": null,
"e": 2734,
"s": 2315,
"text": "For understanding single layer perceptron, it is important to understand Artificial Neural Networks (ANN). Artificial neural networks is the information processing system the mechanism of which is inspired with the functionality of biological neural cir... |
How can I restore multiple databases or all databases dumped by mysqldump? | Suppose if we have dumped multiple databases or all the databases and now want to restore it then we can do it with the following example −
C:\mysql\bin>mysql -u root < tutorials_query1.sql
With the help of above query, we are restoring the dumped multiple databases named ‘tutorials’ and ‘query1’, which are dumped in t... | [
{
"code": null,
"e": 1327,
"s": 1187,
"text": "Suppose if we have dumped multiple databases or all the databases and now want to restore it then we can do it with the following example −"
},
{
"code": null,
"e": 1377,
"s": 1327,
"text": "C:\\mysql\\bin>mysql -u root < tutorials_q... |
Python program to print the hexadecimal value of the numbers from 1 to N | 03 Jan, 2021
Given a number N, the task is to write a Python program to print the hexadecimal value of the numbers from 1 to N.
Examples:
Input: 3
Output: 1
2
3
Input: 11
Output: 1
2
3
4
5
6
7
8
9
a
b
Approach:
We will take... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n03 Jan, 2021"
},
{
"code": null,
"e": 143,
"s": 28,
"text": "Given a number N, the task is to write a Python program to print the hexadecimal value of the numbers from 1 to N."
},
{
"code": null,
"e": 153,
"s": 143,
... |
Containers in Bootstrap with examples | 27 Apr, 2022
In bootstrap, the container is used to set the content’s margin. It contains row elements and the row elements are containers of columns. This is known as the grid system. There are two container classes in bootstrap:
.container.container-fluid
.container
.container-fluid
Let’s look at each of the above ... | [
{
"code": null,
"e": 53,
"s": 25,
"text": "\n27 Apr, 2022"
},
{
"code": null,
"e": 273,
"s": 53,
"text": "In bootstrap, the container is used to set the content’s margin. It contains row elements and the row elements are containers of columns. This is known as the grid system. Th... |
How to specify no border in CSS ? | 26 Mar, 2021
We can specify the no border property using CSS border: none, border-width : 0, border : 0 properties.
Approach 1:
We will give border-color, border-style properties to both headings, for showing text with border and no-border.
For no border heading, we will use the border-width : 0 which will result in no... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n26 Mar, 2021"
},
{
"code": null,
"e": 131,
"s": 28,
"text": "We can specify the no border property using CSS border: none, border-width : 0, border : 0 properties."
},
{
"code": null,
"e": 143,
"s": 131,
"text": "App... |
MongoDB – countDocuments() Method | 05 Feb, 2021
In MongoDB, the countDocuments() method counts the number of documents that matches to the selection criteria. It returns a numeric value that represents the total number of documents that match the selection criteria. It takes two arguments first one is the selection criteria and other is optional.
This ... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n05 Feb, 2021"
},
{
"code": null,
"e": 330,
"s": 28,
"text": "In MongoDB, the countDocuments() method counts the number of documents that matches to the selection criteria. It returns a numeric value that represents the total number of d... |
SUBSTRING_INDEX() function in MySQL | 23 Sep, 2020
SUBSTRING_INDEX() function in MySQL is used to return a substring from a string before a specified number of occurrences of the delimiter.
Syntax :
SUBSTRING_INDEX( str, delim, count )
Parameter : This method accepts three-parameter as mentioned above and described below :
str : The original string from w... | [
{
"code": null,
"e": 54,
"s": 26,
"text": "\n23 Sep, 2020"
},
{
"code": null,
"e": 193,
"s": 54,
"text": "SUBSTRING_INDEX() function in MySQL is used to return a substring from a string before a specified number of occurrences of the delimiter."
},
{
"code": null,
"e"... |
Streams on Arrays in Java 8 | 21 Aug, 2021
In this article, we would be going through stream method of Arrays class which is added in Java 8, it simplifies many operations on arrays as well have improved the efficiency. Addition of different features like lambdas and streams in java 8 have made java efficient to write elegant code which have improv... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n21 Aug, 2021"
},
{
"code": null,
"e": 415,
"s": 28,
"text": "In this article, we would be going through stream method of Arrays class which is added in Java 8, it simplifies many operations on arrays as well have improved the efficiency... |
numpy.degrees() and rad2deg() in Python | 04 Dec, 2020
The numpy.degrees() is a mathematical function that helps user to convert angles from radians to degrees.
Syntax : numpy.degrees(x[, out]) = ufunc ‘degrees’)Parameters :
array : [array_like] elements are in radians.out : [ndaaray, optional] Output array of same shape as x. 2pi Radians = 360 degrees
... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n04 Dec, 2020"
},
{
"code": null,
"e": 134,
"s": 28,
"text": "The numpy.degrees() is a mathematical function that helps user to convert angles from radians to degrees."
},
{
"code": null,
"e": 198,
"s": 134,
"text": "... |
Python – Edge Detection using Pillow | 16 Dec, 2021
Edge Detection, is an Image Processing discipline that incorporates mathematics methods to find edges in a Digital Image. Edge Detection internally works by running a filter/Kernel over a Digital Image, which detects discontinuities in Image regions like stark changes in brightness/Intensity value of pixel... | [
{
"code": null,
"e": 54,
"s": 26,
"text": "\n16 Dec, 2021"
},
{
"code": null,
"e": 364,
"s": 54,
"text": "Edge Detection, is an Image Processing discipline that incorporates mathematics methods to find edges in a Digital Image. Edge Detection internally works by running a filter/... |
Leap Year | Practice | GeeksforGeeks | For an input year N, find whether the year is a leap or not.
Example 1:
Input:
N = 4
Output:
1
Explanation:
4 is not divisible by 100
and is divisible by 4 so its
a leap year
Example 2:
Input:
N = 2021
Output:
0
Explanation:
2021 is not divisible by 100
and is also not divisible by 4
so its not a leap year
Your Tas... | [
{
"code": null,
"e": 302,
"s": 238,
"text": "For an input year N, find whether the year is a leap or not. \n "
},
{
"code": null,
"e": 313,
"s": 302,
"text": "Example 1:"
},
{
"code": null,
"e": 416,
"s": 313,
"text": "Input:\nN = 4\nOutput:\n1\nExplanation:\n... |
Chronometer in Kotlin | 28 Mar, 2022
Android ChronoMeter is user interface control which shows timer in the view. We can easily start up or down counter with base time using the chronometer widget. By default, start() method can assume base time and starts the counter.Generally, we can create use ChronoMeter widget in XML layout but we can do... | [
{
"code": null,
"e": 54,
"s": 26,
"text": "\n28 Mar, 2022"
},
{
"code": null,
"e": 388,
"s": 54,
"text": "Android ChronoMeter is user interface control which shows timer in the view. We can easily start up or down counter with base time using the chronometer widget. By default, s... |
ML | K-Medoids clustering with solved example | 07 Aug, 2020
K-Medoids (also called as Partitioning Around Medoid) algorithm was proposed in 1987 by Kaufman and Rousseeuw. A medoid can be defined as the point in the cluster, whose dissimilarities with all the other points in the cluster is minimum.
The dissimilarity of the medoid(Ci) and object(Pi) is calculated by ... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n07 Aug, 2020"
},
{
"code": null,
"e": 291,
"s": 52,
"text": "K-Medoids (also called as Partitioning Around Medoid) algorithm was proposed in 1987 by Kaufman and Rousseeuw. A medoid can be defined as the point in the cluster, whose diss... |
HashMap and TreeMap in Java | 11 Dec, 2018
HashMap and TreeMap are part of collection framework.
HashMap<K, V> hmap = new HashMap<K, V>();
Let us consider below example where we have to count occurrences of each integer in given array of integers.
Input: arr[] = {10, 3, 5, 10, 3, 5, 10};
Output: Frequency of 10 is 3
Frequency of 3 is 2
... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n11 Dec, 2018"
},
{
"code": null,
"e": 106,
"s": 52,
"text": "HashMap and TreeMap are part of collection framework."
},
{
"code": null,
"e": 149,
"s": 106,
"text": " HashMap<K, V> hmap = new HashMap<K, V>();"
},
... |
Python | Intensity Transformation Operations on Images | 02 Aug, 2019
Intensity transformations are applied on images for contrast manipulation or image thresholding. These are in the spatial domain, i.e. they are performed directly on the pixels of the image at hand, as opposed to being performed on the Fourier transform of the image.
The following are commonly used intensi... | [
{
"code": null,
"e": 53,
"s": 25,
"text": "\n02 Aug, 2019"
},
{
"code": null,
"e": 321,
"s": 53,
"text": "Intensity transformations are applied on images for contrast manipulation or image thresholding. These are in the spatial domain, i.e. they are performed directly on the pixe... |
What is the use of ini_set() in PHP? | PHP allows the user to modify some of its settings mentioned in php.ini using ini_set(). This function requires two string arguments. The first one is the name of the setting to be modified and the second one is the new value to be assigned to it.
Not all the available options can be changed using ini_set(). There is a... | [
{
"code": null,
"e": 1435,
"s": 1187,
"text": "PHP allows the user to modify some of its settings mentioned in php.ini using ini_set(). This function requires two string arguments. The first one is the name of the setting to be modified and the second one is the new value to be assigned to it."
},... |
SQL | With Ties Clause | 21 Mar, 2018
This post is a continuation of SQL Offset-Fetch Clause
Now, we understand that how to use the Fetch Clause in Oracle Database, along with the Specified Offset and we also understand that Fetch clause is the newly added clause in the Oracle Database 12c or it is the new feature added in the Oracle database ... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n21 Mar, 2018"
},
{
"code": null,
"e": 107,
"s": 52,
"text": "This post is a continuation of SQL Offset-Fetch Clause"
},
{
"code": null,
"e": 364,
"s": 107,
"text": "Now, we understand that how to use the Fetch Claus... |
Java Program to Get CPU Serial Number for Windows Machine | 09 Jul, 2021
CPU Serial Number (or Processor Serial Number) is a software-readable unique serial number that Intel has stamped into its Pentium 3 microprocessor. Intel offers this as a feature that can be optionally used to provide certain network management and e-commerce benefits. Basically, it lets a program identif... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n09 Jul, 2021"
},
{
"code": null,
"e": 353,
"s": 28,
"text": "CPU Serial Number (or Processor Serial Number) is a software-readable unique serial number that Intel has stamped into its Pentium 3 microprocessor. Intel offers this as a fea... |
jQuery | chaining() - GeeksforGeeks | 27 Apr, 2020
jQuery is a very powerful framework of JavaScript. With jQuery, we can use do chaining which means to chain together multiple methods in a single statement on a single element.We have been using a single statement at once, but now using the chaining method we can bind multiple methods to make the code shor... | [
{
"code": null,
"e": 26264,
"s": 26236,
"text": "\n27 Apr, 2020"
},
{
"code": null,
"e": 26649,
"s": 26264,
"text": "jQuery is a very powerful framework of JavaScript. With jQuery, we can use do chaining which means to chain together multiple methods in a single statement on a si... |
How to get emails using PHP and IMAP ? - GeeksforGeeks | 15 Oct, 2020
Reading emails from the Gmail account using PHP will be an enriching task for web developers for its simplicity of code through IMAP (Internet Message Access Protocol). Sometimes there can be a requirement in web projects or from a client that needs the complete management of inbox emails or access to emai... | [
{
"code": null,
"e": 25915,
"s": 25887,
"text": "\n15 Oct, 2020"
},
{
"code": null,
"e": 26527,
"s": 25915,
"text": "Reading emails from the Gmail account using PHP will be an enriching task for web developers for its simplicity of code through IMAP (Internet Message Access Proto... |
C# | Math.Floor() Method - GeeksforGeeks | 31 Jan, 2019
In C#, Math.Floor() is a Math class method. This method is used to find the largest integer, which is less than or equal to the passed argument. The floor method operates both functionalities in decimal and double. This method can be overload by passing different arguments to it.
Math.Floor(Decimal) Method... | [
{
"code": null,
"e": 25777,
"s": 25749,
"text": "\n31 Jan, 2019"
},
{
"code": null,
"e": 26058,
"s": 25777,
"text": "In C#, Math.Floor() is a Math class method. This method is used to find the largest integer, which is less than or equal to the passed argument. The floor method o... |
Extract column from list in R - GeeksforGeeks | 26 Mar, 2021
In this article, we are going to create a list of elements and access those columns in R. We are first creating a list with matrix and vectors and access those columns using R.
Approach
Create a list
Syntax:
list_name=list(var1, var2, varn..)
Assign names to list elements as columns names. We can give name... | [
{
"code": null,
"e": 26487,
"s": 26459,
"text": "\n26 Mar, 2021"
},
{
"code": null,
"e": 26664,
"s": 26487,
"text": "In this article, we are going to create a list of elements and access those columns in R. We are first creating a list with matrix and vectors and access those col... |
Set all odd bits of a number - GeeksforGeeks | 03 May, 2021
Given a number, the task is to set all odd bits of a number. Positions of bits are counted from LSB (least significant bit) to MSB (Most significant bit). Position of LSB is considered as 1.
Examples :
Input : 20
Output : 21
Explanation : Binary representation of 20
is 10100. Setting all odd
bits make the... | [
{
"code": null,
"e": 26277,
"s": 26249,
"text": "\n03 May, 2021"
},
{
"code": null,
"e": 26468,
"s": 26277,
"text": "Given a number, the task is to set all odd bits of a number. Positions of bits are counted from LSB (least significant bit) to MSB (Most significant bit). Position... |
Convert a Binary Tree to Threaded binary tree | Set 1 (Using Queue) - GeeksforGeeks | 28 Jan, 2022
We have discussed Threaded Binary Tree. The idea of threaded binary trees is to make inorder traversal faster and do it without stack and without recursion. In a simple threaded binary tree, the NULL right pointers are used to store inorder successor. Where-ever a right pointer is NULL, it is used to store... | [
{
"code": null,
"e": 26167,
"s": 26139,
"text": "\n28 Jan, 2022"
},
{
"code": null,
"e": 26595,
"s": 26167,
"text": "We have discussed Threaded Binary Tree. The idea of threaded binary trees is to make inorder traversal faster and do it without stack and without recursion. In a s... |
MRI Image Segmentation in MATLAB - GeeksforGeeks | 16 Nov, 2021
In the domain of digital image processing, sometimes we need to separate the main object from the image for clear observation. Image segmentation is the process that enables this partitioning. In this method, each pixel is assigned a label, and pixels that share some characteristics are assigned the same l... | [
{
"code": null,
"e": 25887,
"s": 25859,
"text": "\n16 Nov, 2021"
},
{
"code": null,
"e": 26293,
"s": 25887,
"text": "In the domain of digital image processing, sometimes we need to separate the main object from the image for clear observation. Image segmentation is the process th... |
Python CuPy - GeeksforGeeks | 05 Dec, 2019
NumPy surely is the most compatible library for any pythonic code to process large amounts of data in the form of numpy.ndarray(n-dimensional matrix array). However, as soon as we increase the size of data processed to a significant amount the multicore CPU cannot process data as efficiently as required be... | [
{
"code": null,
"e": 25493,
"s": 25465,
"text": "\n05 Dec, 2019"
},
{
"code": null,
"e": 25923,
"s": 25493,
"text": "NumPy surely is the most compatible library for any pythonic code to process large amounts of data in the form of numpy.ndarray(n-dimensional matrix array). Howeve... |
Python VLC Instance - Creating MediaPlayer Instance - GeeksforGeeks | 29 Aug, 2020
In this article we will see how we can create a MediaPlayer instance from the Instance class in the python vlc module. VLC media player is a free and open-source portable cross-platform media player software and streaming media server developed by the VideoLAN project. Instance act as a main object of the ... | [
{
"code": null,
"e": 25829,
"s": 25801,
"text": "\n29 Aug, 2020"
},
{
"code": null,
"e": 26383,
"s": 25829,
"text": "In this article we will see how we can create a MediaPlayer instance from the Instance class in the python vlc module. VLC media player is a free and open-source p... |
Comparing two dates in PHP - GeeksforGeeks | 31 Jul, 2021
Given two dates (date1 and date2) and the task is to compare the given dates. Comparing two dates in PHP is simple when both the dates are in the same format but the problem arises when both dates are in a different format.
Method 1: If the given dates are in the same format then use a simple comparison op... | [
{
"code": null,
"e": 25671,
"s": 25643,
"text": "\n31 Jul, 2021"
},
{
"code": null,
"e": 25895,
"s": 25671,
"text": "Given two dates (date1 and date2) and the task is to compare the given dates. Comparing two dates in PHP is simple when both the dates are in the same format but t... |
How to Deobfuscate an Android Stacktrace using a Mapping File? - GeeksforGeeks | 19 Nov, 2021
In general, the stack traces we do receive can be of ANR (Application not responding) issues, Android services logs for e.g. broadcast receivers, Intent services, and many more. On the development side, tracing those error logs will be a major burden. In this article, we go through some specific techniques... | [
{
"code": null,
"e": 26381,
"s": 26353,
"text": "\n19 Nov, 2021"
},
{
"code": null,
"e": 26868,
"s": 26381,
"text": "In general, the stack traces we do receive can be of ANR (Application not responding) issues, Android services logs for e.g. broadcast receivers, Intent services, ... |
GridView Using BaseAdapter in Android with Example - GeeksforGeeks | 29 Oct, 2020
Here, we are designing an android app to demonstrate the use of GridView layout. The GridView layout is a ViewGroup that is group views in a two-dimensional scrolling grid of rows and columns. Items in the grid view are inserted using a ListAdapter. The layout by default is scrollable and we don’t need to ... | [
{
"code": null,
"e": 25865,
"s": 25837,
"text": "\n29 Oct, 2020"
},
{
"code": null,
"e": 26236,
"s": 25865,
"text": "Here, we are designing an android app to demonstrate the use of GridView layout. The GridView layout is a ViewGroup that is group views in a two-dimensional scroll... |
JavaScript Function.prototype.bind() Method - GeeksforGeeks | 08 Dec, 2021
A function is a set of statements that take inputs, do some specific computation, and produce output. There are various scenarios in programming in which we need to pre-configure this keyword or function arguments and we can easily do that in JavaScript with the help of the bind() method. The bind() method... | [
{
"code": null,
"e": 26545,
"s": 26517,
"text": "\n08 Dec, 2021"
},
{
"code": null,
"e": 27041,
"s": 26545,
"text": "A function is a set of statements that take inputs, do some specific computation, and produce output. There are various scenarios in programming in which we need t... |
Java Program for Rotate a Matrix by 180 degree - GeeksforGeeks | 13 Jan, 2022
Given a square matrix, the task is that we turn it by 180 degrees in an anti-clockwise direction without using any extra space.
Examples :
Input : 1 2 3
4 5 6
7 8 9
Output : 9 8 7
6 5 4
3 2 1
Input : 1 2 3 4
5 6 7 8
9 0 1 2
3 4 ... | [
{
"code": null,
"e": 25303,
"s": 25275,
"text": "\n13 Jan, 2022"
},
{
"code": null,
"e": 25432,
"s": 25303,
"text": "Given a square matrix, the task is that we turn it by 180 degrees in an anti-clockwise direction without using any extra space. "
},
{
"code": null,
"e... |
C++ Program To Check For Balanced Brackets In An Expression (Well-Formedness) Using Stack - GeeksforGeeks | 14 Dec, 2021
Given an expression string exp, write a program to examine whether the pairs and the orders of “{“, “}”, “(“, “)”, “[“, “]” are correct in exp.
Example:
Input: exp = “[()]{}{[()()]()}” Output: Balanced
Input: exp = “[(])” Output: Not Balanced
Algorithm:
Declare a character stack S.
Now traverse the expr... | [
{
"code": null,
"e": 25851,
"s": 25823,
"text": "\n14 Dec, 2021"
},
{
"code": null,
"e": 25995,
"s": 25851,
"text": "Given an expression string exp, write a program to examine whether the pairs and the orders of “{“, “}”, “(“, “)”, “[“, “]” are correct in exp."
},
{
"code... |
Python Program to Rotate Matrix Elements - GeeksforGeeks | 28 Dec, 2021
Given a matrix, clockwise rotate elements in it.
Examples:
Input
1 2 3
4 5 6
7 8 9
Output:
4 1 2
7 5 3
8 9 6
For 4*4 matrix
Input:
1 2 3 4
5 6 7 8
9 10 11 12
13 14 15 16
Output:
5 1 2 3
9 10 6 4
13 11 7 8
14 ... | [
{
"code": null,
"e": 26159,
"s": 26131,
"text": "\n28 Dec, 2021"
},
{
"code": null,
"e": 26208,
"s": 26159,
"text": "Given a matrix, clockwise rotate elements in it."
},
{
"code": null,
"e": 26218,
"s": 26208,
"text": "Examples:"
},
{
"code": null,
... |
CPU Scheduling in Operating Systems using priority queue with gantt chart - GeeksforGeeks | 22 Apr, 2020
Prerequisite: CPU Scheduling in Operating SystemsDifferent Scheduling Algorithms:
First Come First Serve CPU Scheduling:Simplest scheduling algorithm that schedules according to arrival times of processes. First come first serve scheduling algorithm states that the process that requests the CPU first is al... | [
{
"code": null,
"e": 25943,
"s": 25915,
"text": "\n22 Apr, 2020"
},
{
"code": null,
"e": 26025,
"s": 25943,
"text": "Prerequisite: CPU Scheduling in Operating SystemsDifferent Scheduling Algorithms:"
},
{
"code": null,
"e": 29965,
"s": 26025,
"text": "First Co... |
Program to print all the numbers divisible by 3 and 5 for a given number - GeeksforGeeks | 17 May, 2021
Given the integer N, the task is to print all the numbers less than N, which are divisible by 3 and 5.Examples :
Input : 50
Output : 0 15 30 45
Input : 100
Output : 0 15 30 45 60 75 90
Approach : For example, let’s take N = 20 as a limit, then the program should print all numbers less than 20 which ... | [
{
"code": null,
"e": 26559,
"s": 26531,
"text": "\n17 May, 2021"
},
{
"code": null,
"e": 26674,
"s": 26559,
"text": "Given the integer N, the task is to print all the numbers less than N, which are divisible by 3 and 5.Examples : "
},
{
"code": null,
"e": 26749,
... |
Advantages and Disadvantages of Using Stored Procedures - SQL - GeeksforGeeks | 05 Jun, 2020
A Stored Procedure is a type of code in SQL that can be stored for later use and can be used many times. So, whenever you need to execute the query, instead of calling it you can just call the stored procedure. You can also pass parameters to a stored procedure, so that the stored procedure can act based o... | [
{
"code": null,
"e": 25574,
"s": 25546,
"text": "\n05 Jun, 2020"
},
{
"code": null,
"e": 25920,
"s": 25574,
"text": "A Stored Procedure is a type of code in SQL that can be stored for later use and can be used many times. So, whenever you need to execute the query, instead of cal... |
Print the Kth Digit | Practice | GeeksforGeeks | Given two numbers A and B, find Kth digit from right of AB.
Example 1:
Input:
A = 3
B = 3
K = 1
Output:
7
Explanation:
33 = 27 and 1st
digit from right is
7
Example 2:
Input:
A = 5
B = 2
K = 2
Output:
2
Explanation:
52 = 25 and second
digit from right is
2.
Your Task:
You don't need to read input or print anythin... | [
{
"code": null,
"e": 300,
"s": 238,
"text": "Given two numbers A and B, find Kth digit from right of AB.\n "
},
{
"code": null,
"e": 311,
"s": 300,
"text": "Example 1:"
},
{
"code": null,
"e": 399,
"s": 311,
"text": "Input:\nA = 3\nB = 3\nK = 1\nOutput:\n7\nEx... |
Difference between Console.Write and Console.WriteLine in C# - GeeksforGeeks | 26 May, 2020
In C#, to print the data on the console output screen the following method are used – Console.Write() and Console.WriteLine() method. Console is a predefined class of System namespace. While Write() and WriteLine() both are the Console Class methods.
The only difference between the Write() and WriteLine() ... | [
{
"code": null,
"e": 25657,
"s": 25629,
"text": "\n26 May, 2020"
},
{
"code": null,
"e": 25908,
"s": 25657,
"text": "In C#, to print the data on the console output screen the following method are used – Console.Write() and Console.WriteLine() method. Console is a predefined class... |
Find the angle between tangents drawn from a given external point to a Circle - GeeksforGeeks | 25 May, 2021
Given a positive integers R representing the radius of the circle and the center of the circle (X1, Y1) and another point (X2, Y2) in the cartesian plane, the task is to find the angle between the pair of tangents drawn from the point (X2, Y2) to the circle.
Examples:
Input: R = 6, (X1, Y1) = (5, 1), (X2, ... | [
{
"code": null,
"e": 25354,
"s": 25326,
"text": "\n25 May, 2021"
},
{
"code": null,
"e": 25613,
"s": 25354,
"text": "Given a positive integers R representing the radius of the circle and the center of the circle (X1, Y1) and another point (X2, Y2) in the cartesian plane, the task... |
Dynamic SQL - GeeksforGeeks | 08 Sep, 2020
Prerequisite – Difference between Static and Dynamic SQL
Dynamic SQL is a programming technique that could be used to write SQL queries during runtime. Dynamic SQL could be used to create general and flexible SQL queries.
Syntax for dynamic SQL is to make it string as below :
'SELECT statement';
To run a d... | [
{
"code": null,
"e": 25513,
"s": 25485,
"text": "\n08 Sep, 2020"
},
{
"code": null,
"e": 25570,
"s": 25513,
"text": "Prerequisite – Difference between Static and Dynamic SQL"
},
{
"code": null,
"e": 25735,
"s": 25570,
"text": "Dynamic SQL is a programming tech... |
Product of all pairwise consecutive elements in an Array - GeeksforGeeks | 23 Apr, 2021
Given an array of integers of N elements. The task is to print the product of all of the pairwise consecutive elements.Pairwise consecutive pairs of an array of size N are (a[i], a[i+1]) for all ranging from 0 to N-2Examples:
Input : arr[] = {8, 5, 4, 3, 15, 20}
Output : 40, 20, 12, 45, 300
Input : ar... | [
{
"code": null,
"e": 24821,
"s": 24793,
"text": "\n23 Apr, 2021"
},
{
"code": null,
"e": 25049,
"s": 24821,
"text": "Given an array of integers of N elements. The task is to print the product of all of the pairwise consecutive elements.Pairwise consecutive pairs of an array of si... |
C program to print digital clock with current time - GeeksforGeeks | 16 Nov, 2021
The time.h header defines four variable types, two macro and various functions for manipulating date and time. A brief description of the variable types defined in the header time.h is as :
size_t : This is the unsigned integral type and is the result of the sizeof keyword.
clock_t : This is a type suita... | [
{
"code": null,
"e": 25587,
"s": 25559,
"text": "\n16 Nov, 2021"
},
{
"code": null,
"e": 25779,
"s": 25587,
"text": "The time.h header defines four variable types, two macro and various functions for manipulating date and time. A brief description of the variable types defined in... |
Java Program to Display Transpose Matrix - GeeksforGeeks | 07 Jan, 2021
Transpose of a matrix is obtained by changing rows to columns and columns to rows. In other words, transpose of A[][] is obtained by changing A[i][j] to A[j][i].
Approach:
Create a 2-D Array.
Insert the values in the array by running two nested loops. The outer ith loop will go till the no.of rows and the ... | [
{
"code": null,
"e": 25373,
"s": 25345,
"text": "\n07 Jan, 2021"
},
{
"code": null,
"e": 25535,
"s": 25373,
"text": "Transpose of a matrix is obtained by changing rows to columns and columns to rows. In other words, transpose of A[][] is obtained by changing A[i][j] to A[j][i]."
... |
isgraph() C library function - GeeksforGeeks | 24 Oct, 2017
The C library function isgraph() checks whether a character is a graphic character or not.Characters that have graphical representation are known are graphic characters. For example: ‘:’ ‘;’ ‘?’ ‘@’ etc.
Syntax –
#include <ctype.h>
int isgraph(int ch);
Return Value – function returns nonzero if ch is any ... | [
{
"code": null,
"e": 24330,
"s": 24302,
"text": "\n24 Oct, 2017"
},
{
"code": null,
"e": 24534,
"s": 24330,
"text": "The C library function isgraph() checks whether a character is a graphic character or not.Characters that have graphical representation are known are graphic chara... |
Partial functions in Python. Reduce the complexity of your code. | by Dhanesh Budhrani | Towards Data Science | In this post I’ll be talking about partial functions and how we can use them to make our code cleaner.
A partial function allows us to call a second function with fixed values in certain arguments. For instance, we may have a function that computes an exponentiation. Then, we may need to create a new function that assi... | [
{
"code": null,
"e": 274,
"s": 171,
"text": "In this post I’ll be talking about partial functions and how we can use them to make our code cleaner."
},
{
"code": null,
"e": 756,
"s": 274,
"text": "A partial function allows us to call a second function with fixed values in certain... |
Sort first k values in ascending order and remaining n-k values in descending order - GeeksforGeeks | 19 May, 2021
Given an array of size n, arrange the first k elements of the array in ascending order and the remaining n-k elements in descending order.
Examples:
Input: arr[] = {5, 4, 6, 2, 1, 3, 8, 9, -1}, k = 4 Output: 2 4 5 6 9 8 3 1 -1
Input: arr[] = {5, 4, 6}, k = 2 Output: 4 5 6
Algorithm:
Store the first k el... | [
{
"code": null,
"e": 27310,
"s": 27282,
"text": "\n19 May, 2021"
},
{
"code": null,
"e": 27449,
"s": 27310,
"text": "Given an array of size n, arrange the first k elements of the array in ascending order and the remaining n-k elements in descending order."
},
{
"code": nu... |
How to create a String object in C#? | To create a string object in C#, use any of the below given method.
By assigning a string literal to a String variable
By using a String class constructor
By using the string concatenation operator (+)
By retrieving a property or calling a method that returns a string
By calling a formatting method to convert a value o... | [
{
"code": null,
"e": 1130,
"s": 1062,
"text": "To create a string object in C#, use any of the below given method."
},
{
"code": null,
"e": 1181,
"s": 1130,
"text": "By assigning a string literal to a String variable"
},
{
"code": null,
"e": 1217,
"s": 1181,
"... |
Java - String toLowerCase() Method | This method has two variants. The first variant converts all of the characters in this String to lower case using the rules of the given Locale. This is equivalent to calling toLowerCase(Locale.getDefault()).
The second variant takes locale as an argument to be used while converting into lower case.
Here is the syntax ... | [
{
"code": null,
"e": 2586,
"s": 2377,
"text": "This method has two variants. The first variant converts all of the characters in this String to lower case using the rules of the given Locale. This is equivalent to calling toLowerCase(Locale.getDefault())."
},
{
"code": null,
"e": 2678,
... |
How to work with object detection datasets in COCO format | by Eric Hofesmann | Towards Data Science | Microsoft's Common Objects in Context dataset (COCO) is the most popular object detection dataset at the moment. It is widely used to benchmark the performance of computer vision methods.
Due to the popularity of the dataset, the format that COCO uses to store annotations is often the go-to format when creating a new c... | [
{
"code": null,
"e": 360,
"s": 172,
"text": "Microsoft's Common Objects in Context dataset (COCO) is the most popular object detection dataset at the moment. It is widely used to benchmark the performance of computer vision methods."
},
{
"code": null,
"e": 703,
"s": 360,
"text":... |
Change x axes scale in matplotlib | Using plt.xticks, we can change the X-axis scale.
Using plt.plot() method, we can create a line with two lists that are passed in its argument.
Using plt.plot() method, we can create a line with two lists that are passed in its argument.
Add text to the axes. Add the text *s* to the axes at location *x*, *y* in data co... | [
{
"code": null,
"e": 1112,
"s": 1062,
"text": "Using plt.xticks, we can change the X-axis scale."
},
{
"code": null,
"e": 1206,
"s": 1112,
"text": "Using plt.plot() method, we can create a line with two lists that are passed in its argument."
},
{
"code": null,
"e": 1... |
Possible paths | Practice | GeeksforGeeks | Given a directed graph and two vertices ‘u’ and ‘v’ in it. Find the number of possible walks from ‘u’ to ‘v’ with exactly k edges on the walk modulo 109+7.
Note : There can be a cycle in the graph and an edge can be travelled multiple times.
Example 1:
Input 1: graph = {{0,1,1,1},{0,0,0,1},
{0,0,0,1}, {0,0,0,0}}, u = ... | [
{
"code": null,
"e": 394,
"s": 238,
"text": "Given a directed graph and two vertices ‘u’ and ‘v’ in it. Find the number of possible walks from ‘u’ to ‘v’ with exactly k edges on the walk modulo 109+7."
},
{
"code": null,
"e": 480,
"s": 394,
"text": "Note : There can be a cycle in... |
Check if an array can be split into subsets of K consecutive elements - GeeksforGeeks | 21 May, 2021
Given an array arr[] and integer K, the task is to split the array into subsets of size K, such that each subset consists of K consecutive elements.
Examples:
Input: arr[] = {1, 2, 3, 6, 2, 3, 4, 7, 8}, K = 3 Output: true Explanation: The given array of length 9 can be split into 3 subsets {1, 2, 3}, {2, ... | [
{
"code": null,
"e": 24431,
"s": 24403,
"text": "\n21 May, 2021"
},
{
"code": null,
"e": 24580,
"s": 24431,
"text": "Given an array arr[] and integer K, the task is to split the array into subsets of size K, such that each subset consists of K consecutive elements."
},
{
... |
Difference between strncmp() and strcmp() in C/C++ | The function strncmp() is used to compare left string to right string up to a number. It works same as strcmp(). It returns a value greater than zero when the matching character of left string has greater ASCII value than the character of the right string. Returns a value less than zero when the matching character of l... | [
{
"code": null,
"e": 1456,
"s": 1062,
"text": "The function strncmp() is used to compare left string to right string up to a number. It works same as strcmp(). It returns a value greater than zero when the matching character of left string has greater ASCII value than the character of the right stri... |
How to Create a Progress Bar using HTML5 ? - GeeksforGeeks | 28 May, 2020
In this article, we are creating the progress bar of a task by using a <progress> tag. It is used to represent the progress of a task. It is also defined as how much work is done and how much is left. It is not used to represent the disk space or relevant query.
Syntax:
<progress attributes...> </progress>... | [
{
"code": null,
"e": 25186,
"s": 25158,
"text": "\n28 May, 2020"
},
{
"code": null,
"e": 25449,
"s": 25186,
"text": "In this article, we are creating the progress bar of a task by using a <progress> tag. It is used to represent the progress of a task. It is also defined as how mu... |
How to create an impressive GUI in Python using Tkinter? | Tkinter is a standard Python GUI library in Python, which gives us an object-oriented interface with Tk GUI Toolkit. It's amazing how quickly one can create some really impressive looking apps. Actions in GUI are usually performed through direct manipulation of graphical elements.
We will take a simple "addition" appli... | [
{
"code": null,
"e": 1344,
"s": 1062,
"text": "Tkinter is a standard Python GUI library in Python, which gives us an object-oriented interface with Tk GUI Toolkit. It's amazing how quickly one can create some really impressive looking apps. Actions in GUI are usually performed through direct manipul... |
map::clear() in C++ STL | In this article we will be discussing the working, syntax and examples of map::clear() function in C++ STL.
Maps are the associative container, which facilitates to store the elements formed by a combination of key value and mapped value in a specific order. In a map container the data is internally always sorted with ... | [
{
"code": null,
"e": 1170,
"s": 1062,
"text": "In this article we will be discussing the working, syntax and examples of map::clear() function in C++ STL."
},
{
"code": null,
"e": 1480,
"s": 1170,
"text": "Maps are the associative container, which facilitates to store the element... |
What is the difference between custom and built-in functions in JavaScript? | The custom functions in JavaScript are user-defined functions. JavaScript allows us to write our own functions. The following is the syntax −
<script>
<!--
function functionname(parameter-list)
{
statements
}
//-->
</script>
Bult-in functions are functions already provided by JavaScript... | [
{
"code": null,
"e": 1204,
"s": 1062,
"text": "The custom functions in JavaScript are user-defined functions. JavaScript allows us to write our own functions. The following is the syntax −"
},
{
"code": null,
"e": 1320,
"s": 1204,
"text": "<script>\n <!--\n function functi... |
Bootstrap - Images | This chapter covers the Bootstrap support for images. Bootstrap provides three classes that can be used to apply some simple styles to images −
.img-rounded − adds border-radius:6px to give the image rounded corners.
.img-rounded − adds border-radius:6px to give the image rounded corners.
.img-circle − makes the entire... | [
{
"code": null,
"e": 3475,
"s": 3331,
"text": "This chapter covers the Bootstrap support for images. Bootstrap provides three classes that can be used to apply some simple styles to images −"
},
{
"code": null,
"e": 3548,
"s": 3475,
"text": ".img-rounded − adds border-radius:6px ... |
man - Unix, Linux Command | man it is the interface used to view the system's reference manuals.
man [-C file] [-d] [-D] [--warnings[=warnings]] [-R encoding] [-L locale] [-m system[,...]] [-M path] [-S list] [-e extension]
[-i|-I] [--regex|--wildcard] [--names-only] [-a] [-u] [--no-subpages] [-P pager] [-r prompt] [-7] [-E encoding] [--no-hyph... | [
{
"code": null,
"e": 10646,
"s": 10577,
"text": "man it is the interface used to view the system's reference manuals."
},
{
"code": null,
"e": 11424,
"s": 10646,
"text": " man [-C file] [-d] [-D] [--warnings[=warnings]] [-R encoding] [-L locale] [-m system[,...]] [-M path] [-S li... |
MySQL - RAND Function | MySQL has a RAND function that can be invoked to produce random numbers between 0 and 1 −
mysql> SELECT RAND( ), RAND( ), RAND( );
+------------------+-----------------+------------------+
| RAND( ) | RAND( ) | RAND( ) |
+------------------+-----------------+------------------+
| 0.4546458492... | [
{
"code": null,
"e": 2423,
"s": 2333,
"text": "MySQL has a RAND function that can be invoked to produce random numbers between 0 and 1 −"
},
{
"code": null,
"e": 2779,
"s": 2423,
"text": "mysql> SELECT RAND( ), RAND( ), RAND( );\n+------------------+-----------------+-----------... |
Zend Framework - Forms & Validation | Zend Framework provides a separate component, zend-form to accelerate the form creation and validation process. It connects the model and the view layer. It provides a set of form elements to create full-fledged html form from pre-defined models, an InputFilter class to validate the model against the form and options t... | [
{
"code": null,
"e": 2691,
"s": 2312,
"text": "Zend Framework provides a separate component, zend-form to accelerate the form creation and validation process. It connects the model and the view layer. It provides a set of form elements to create full-fledged html form from pre-defined models, an Inp... |
Forward List and List of Unordered Maps in C++ with Examples - GeeksforGeeks | 23 Nov, 2021
Forward List
Forward list in STL implements singly linked list. Introduced from C++11, forward lists are more useful than other containers in insertion, removal, and moving operations (like sort) and allow time constant insertion and removal of elements. It differs from the list by the fact that the forwar... | [
{
"code": null,
"e": 23707,
"s": 23679,
"text": "\n23 Nov, 2021"
},
{
"code": null,
"e": 23720,
"s": 23707,
"text": "Forward List"
},
{
"code": null,
"e": 24596,
"s": 23720,
"text": "Forward list in STL implements singly linked list. Introduced from C++11, for... |
Explain about regular expressions in TOC? | A regular expression is basically a shorthand way of showing how a regular language is built from the base set of regular languages.
The symbols are identical which are used to construct the languages, and any given expression that has a language closely associated with it.
For each regular expression E, there is a reg... | [
{
"code": null,
"e": 1195,
"s": 1062,
"text": "A regular expression is basically a shorthand way of showing how a regular language is built from the base set of regular languages."
},
{
"code": null,
"e": 1337,
"s": 1195,
"text": "The symbols are identical which are used to const... |
Zipping and Unzipping Iterables in Python | by Luay Matalka | Towards Data Science | Let’s say that we have two lists, one that includes first names, and the other includes last names. We would like to somehow combine the first names with the corresponding last names as tuples. In other words, we would like to combine elements from multiple iterables that have the same index together in a list of tuple... | [
{
"code": null,
"e": 495,
"s": 172,
"text": "Let’s say that we have two lists, one that includes first names, and the other includes last names. We would like to somehow combine the first names with the corresponding last names as tuples. In other words, we would like to combine elements from multip... |
Longest substring of vowels | 13 Mar, 2022
Given a string s of lowercase letters, we need to find the longest substring length that contains (a, e, i, o, u) only.
Examples :
Input: s = "geeksforgeeks"
Output: 2
Longest substring is "ee"
Input: s = "theeare"
Output: 3
The idea is to traverse the string and keep track of the current number of vowe... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n13 Mar, 2022"
},
{
"code": null,
"e": 173,
"s": 52,
"text": "Given a string s of lowercase letters, we need to find the longest substring length that contains (a, e, i, o, u) only. "
},
{
"code": null,
"e": 185,
"s": 17... |
Python | Pandas Period.freq | 06 Jan, 2019
Python is a great language for doing data analysis, primarily because of the fantastic ecosystem of data-centric python packages. Pandas is one of those packages and makes importing and analyzing data much easier.
Pandas Period.freq attribute returns the frequency applied on the given Period object.
Syntax... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n06 Jan, 2019"
},
{
"code": null,
"e": 242,
"s": 28,
"text": "Python is a great language for doing data analysis, primarily because of the fantastic ecosystem of data-centric python packages. Pandas is one of those packages and makes imp... |
Field setInt() method in Java with Examples | 02 Jun, 2022
setInt() method of java.lang.reflect.Field used to set the value of a field as an int on the specified object. When you need to set the value of a field of an object as int then you can use this method to set value over an Object. Syntax:
public void setInt(Object obj, int i)
throws IllegalArgu... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n02 Jun, 2022"
},
{
"code": null,
"e": 267,
"s": 28,
"text": "setInt() method of java.lang.reflect.Field used to set the value of a field as an int on the specified object. When you need to set the value of a field of an object as int th... |
Visualize correlation matrix using correlogram in R Programming | 05 Sep, 2020
A graph of the correlation matrix is known as Correlogram. This is generally used to highlight the variables in a data set or data table that are correlated most. The correlation coefficients in the plot are colored based on the value. Based on the degree of association among the variables, we can reorder ... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n05 Sep, 2020"
},
{
"code": null,
"e": 371,
"s": 28,
"text": "A graph of the correlation matrix is known as Correlogram. This is generally used to highlight the variables in a data set or data table that are correlated most. The correlat... |
Bucket Sort Visualization Using Javascript - GeeksforGeeks | 19 Dec, 2021
GUI(Graphical User Interface) helps in better in understanding than programs. In this article, we will visualize Bucket Sort using JavaScript. We will see how the elements are stored into Buckets and then how Buckets get traversed to get the final sorted array. We will also visualize the time complexity of... | [
{
"code": null,
"e": 26831,
"s": 26803,
"text": "\n19 Dec, 2021"
},
{
"code": null,
"e": 27153,
"s": 26831,
"text": "GUI(Graphical User Interface) helps in better in understanding than programs. In this article, we will visualize Bucket Sort using JavaScript. We will see how the ... |
Make Your Pandas DataFrame Output Report-Ready | by Christopher Tao | Towards Data Science | As a Data Scientist or Analyst who use Python as the primary programming language, I believe you must have use Pandas a lot. It is very frequently for us to output out pandas data frame in the Jupyter notebooks.
However, have you ever think that we can actually let the data frame visualise itself? In other words, for s... | [
{
"code": null,
"e": 384,
"s": 172,
"text": "As a Data Scientist or Analyst who use Python as the primary programming language, I believe you must have use Pandas a lot. It is very frequently for us to output out pandas data frame in the Jupyter notebooks."
},
{
"code": null,
"e": 719,
... |
Add QT GUI to Python for plotting graphics - GeeksforGeeks | 19 Feb, 2020
Qt framework (with QT Creator IDE) can be used to create a fancy interfaces for Python GUI application. Plotting graphics on a GUI is possible with pyqtgraph library.
Installing pyqtgraph –There are several ways of installing pyqtgraph depending on your needs.
If you are using Anaconda you can install with... | [
{
"code": null,
"e": 25647,
"s": 25619,
"text": "\n19 Feb, 2020"
},
{
"code": null,
"e": 25814,
"s": 25647,
"text": "Qt framework (with QT Creator IDE) can be used to create a fancy interfaces for Python GUI application. Plotting graphics on a GUI is possible with pyqtgraph libra... |
Modifying PDF file using Python - GeeksforGeeks | 02 Jul, 2021
The following article depicts how a PDF can be modified using python’s pylovepdf module. The Portable Document Format(PDF) is a file format developed by Adobe in 1993 to present documents, including text formatting and images, in a manner independent of application software, hardware, and operating systems... | [
{
"code": null,
"e": 25671,
"s": 25643,
"text": "\n02 Jul, 2021"
},
{
"code": null,
"e": 25980,
"s": 25671,
"text": "The following article depicts how a PDF can be modified using python’s pylovepdf module. The Portable Document Format(PDF) is a file format developed by Adobe in 1... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.