title stringlengths 3 221 | text stringlengths 17 477k | parsed listlengths 0 3.17k |
|---|---|---|
Prim’s MST for Adjacency List Representation | Greedy Algo-6 | 20 Jun, 2022
We recommend reading the following two posts as a prerequisite to this post.
Greedy Algorithms | Set 5 (Prim’s Minimum Spanning Tree (MST)) Graph and its representations
Greedy Algorithms | Set 5 (Prim’s Minimum Spanning Tree (MST))
Graph and its representations
We have discussed Prim’s algorithm and its ... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n20 Jun, 2022"
},
{
"code": null,
"e": 129,
"s": 52,
"text": "We recommend reading the following two posts as a prerequisite to this post."
},
{
"code": null,
"e": 222,
"s": 129,
"text": "Greedy Algorithms | Set 5 (P... |
\mathring - Tex Command | \mathring - Used to draw mathring symbol over the argument.
{ \mathring #1}
\mathring command is used to draw mathring symbol over the argument. | [
{
"code": null,
"e": 8180,
"s": 8120,
"text": "\\mathring - Used to draw mathring symbol over the argument."
},
{
"code": null,
"e": 8196,
"s": 8180,
"text": "{ \\mathring #1}"
}
] |
Semaphore in Java | 10 Dec, 2018
A semaphore controls access to a shared resource through the use of a counter. If the counter is greater than zero, then access is allowed. If it is zero, then access is denied. What the counter is counting are permits that allow access to the shared resource. Thus, to access the resource, a thread must be... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n10 Dec, 2018"
},
{
"code": null,
"e": 397,
"s": 52,
"text": "A semaphore controls access to a shared resource through the use of a counter. If the counter is greater than zero, then access is allowed. If it is zero, then access is deni... |
Java Servlet and JDBC Example | Insert data in MySQL | 10 Dec, 2019
Prerequisites: Servlet, JDBC Connectivity
To start with interfacing Java Servlet Program with JDBC Connection:
Proper JDBC Environment should set-up along with database creation.To do so, download the mysql-connector.jar file from the internet,As it is downloaded, move the jar file to the apache-tomcat ser... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n10 Dec, 2019"
},
{
"code": null,
"e": 94,
"s": 52,
"text": "Prerequisites: Servlet, JDBC Connectivity"
},
{
"code": null,
"e": 163,
"s": 94,
"text": "To start with interfacing Java Servlet Program with JDBC Connecti... |
Proof that Clique Decision problem is NP-Complete | Set 2 - GeeksforGeeks | 01 Jul, 2020
Prerequisite: NP-Completeness, Clique problem.
A clique in a graph is a set of vertices where each vertex shares an edge with every other vertex. Thus, a clique in a graph is a subgraph which is a complete graph.Problem: Given a graph G(V, E) and an integer K, the problem is to determine if the graph conta... | [
{
"code": null,
"e": 26871,
"s": 26843,
"text": "\n01 Jul, 2020"
},
{
"code": null,
"e": 26918,
"s": 26871,
"text": "Prerequisite: NP-Completeness, Clique problem."
},
{
"code": null,
"e": 27202,
"s": 26918,
"text": "A clique in a graph is a set of vertices wh... |
Difference between int* p() and int (*p)()? - GeeksforGeeks | 11 Dec, 2020
A pointer is a variable whose value is the address of another variable, i.e., direct address of the memory location. Like any variable or constant, a pointer must be declare before storing any variable address. The general form of a pointer variable declaration is:
Syntax:
type *var_name;
Here, type is the... | [
{
"code": null,
"e": 25971,
"s": 25943,
"text": "\n11 Dec, 2020"
},
{
"code": null,
"e": 26237,
"s": 25971,
"text": "A pointer is a variable whose value is the address of another variable, i.e., direct address of the memory location. Like any variable or constant, a pointer must ... |
Profit and Loss - GeeksforGeeks | 30 Apr, 2016
For a shirt cost price is Rs. 400. Shopkeeper prints a tag on it with Markup% = 20% to earn a profit of 7.5%. What is markup?
For a shirt cost price = 400Rs. Shopkeeper prints a tag on it with Markup% = 20% to earn a profit of 7.5%. What is marked price
For a shirt cost price = 400Rs. Shopkeeper prints a t... | [
{
"code": null,
"e": 28855,
"s": 28827,
"text": "\n30 Apr, 2016"
},
{
"code": null,
"e": 28981,
"s": 28855,
"text": "For a shirt cost price is Rs. 400. Shopkeeper prints a tag on it with Markup% = 20% to earn a profit of 7.5%. What is markup?"
},
{
"code": null,
"e": ... |
Hive - One Shot Commands - GeeksforGeeks | 22 Jan, 2021
Hive comes with various “One Shot” commands that a user can use through Hive CLI(Command Line Interface) without entering the Hive shell to execute one or more than one query separated by a semicolon. Hive CLI offers multiple options that provide various functionalities to the user. We will be discussing v... | [
{
"code": null,
"e": 25591,
"s": 25563,
"text": "\n22 Jan, 2021"
},
{
"code": null,
"e": 26034,
"s": 25591,
"text": "Hive comes with various “One Shot” commands that a user can use through Hive CLI(Command Line Interface) without entering the Hive shell to execute one or more tha... |
PyQt5 - Setting role to item in ComboBox - GeeksforGeeks | 22 Apr, 2020
In this article we will see how we can set the item role in combo box, by default when we create a combo box and add items to it no role is set to the items, in order to set this we will use setItemData method
Syntax : combo_box.setItemData(index, role)
Argument : It takes two argument one is integer i.e i... | [
{
"code": null,
"e": 25537,
"s": 25509,
"text": "\n22 Apr, 2020"
},
{
"code": null,
"e": 25747,
"s": 25537,
"text": "In this article we will see how we can set the item role in combo box, by default when we create a combo box and add items to it no role is set to the items, in or... |
Private Variables in Python - GeeksforGeeks | 19 Aug, 2021
Prerequisite: Underscore in PythonIn Python, there is no existence of “Private” instance variables that cannot be accessed except inside an object. However, a convention is being followed by most Python code and coders i.e., a name prefixed with an underscore, For e.g. _geek should be treated as a non-publ... | [
{
"code": null,
"e": 24971,
"s": 24943,
"text": "\n19 Aug, 2021"
},
{
"code": null,
"e": 25530,
"s": 24971,
"text": "Prerequisite: Underscore in PythonIn Python, there is no existence of “Private” instance variables that cannot be accessed except inside an object. However, a conv... |
RecyclerView Multiple View Types in Android with Example - GeeksforGeeks | 20 Dec, 2021
We’ve all used RecyclerView in Android to display a list in our applications. RecyclerView is used to display emails in the Gmail app, feeds on Facebook and Instagram, and messages in WhatsApp, among other things. However, as being an Android Developer you would have come across a fact that when we define ... | [
{
"code": null,
"e": 26381,
"s": 26353,
"text": "\n20 Dec, 2021"
},
{
"code": null,
"e": 26963,
"s": 26381,
"text": "We’ve all used RecyclerView in Android to display a list in our applications. RecyclerView is used to display emails in the Gmail app, feeds on Facebook and Instag... |
Java Program to Check For a Valid Mobile Number - GeeksforGeeks | 23 Dec, 2021
Regular Expressions or Regex (in short) is an API for defining String patterns that can be used for searching, manipulating, and editing a string in Java. Email validation and passwords are few areas of strings where Regex is widely used to define the constraints. Regular Expressions are provided under jav... | [
{
"code": null,
"e": 25225,
"s": 25197,
"text": "\n23 Dec, 2021"
},
{
"code": null,
"e": 25598,
"s": 25225,
"text": "Regular Expressions or Regex (in short) is an API for defining String patterns that can be used for searching, manipulating, and editing a string in Java. Email va... |
Minimum number of subtract operation to make an array decreasing - GeeksforGeeks | 14 Apr, 2021
You are given a sequence of numbers arr[0], arr[1], ..., arr[N – 1] and a positive integer K. In each operation, you may subtract K from any element of the array. You are required to find the minimum number of operations to make the given array decreasing.An array is called decreasing if for each i: .
In... | [
{
"code": null,
"e": 26201,
"s": 26173,
"text": "\n14 Apr, 2021"
},
{
"code": null,
"e": 26506,
"s": 26201,
"text": "You are given a sequence of numbers arr[0], arr[1], ..., arr[N – 1] and a positive integer K. In each operation, you may subtract K from any element of the array. ... |
Automating Google meet using selenium in Python - GeeksforGeeks | 13 Jan, 2022
Prerequisites: Selenium Python basics, Browser Automation using Selenium
Selenium is a powerful tool for controlling web browsers through programs and performing browser automation. It is functional for all browsers, works on all major OS and its scripts are written in various languages i.e Python, Java, C... | [
{
"code": null,
"e": 25563,
"s": 25535,
"text": "\n13 Jan, 2022"
},
{
"code": null,
"e": 25636,
"s": 25563,
"text": "Prerequisites: Selenium Python basics, Browser Automation using Selenium"
},
{
"code": null,
"e": 25910,
"s": 25636,
"text": "Selenium is a pow... |
How to get ID of the last updated row in MySQL? - GeeksforGeeks | 13 Jun, 2019
Many times, we require updating the data based on the last updated table id.
We should write an update query in such a way that we can get the last updated ID in the update statement itselfThe code mentioned below has been created in a generalized sense and can be used easily just by replacing the values i... | [
{
"code": null,
"e": 26179,
"s": 26151,
"text": "\n13 Jun, 2019"
},
{
"code": null,
"e": 26256,
"s": 26179,
"text": "Many times, we require updating the data based on the last updated table id."
},
{
"code": null,
"e": 26520,
"s": 26256,
"text": "We should wri... |
Minimum hours taken by Zombies to infect all Humans by infecting up, left, down and right only - GeeksforGeeks | 23 Dec, 2021
Given a 2D grid, each cell is either a zombie 1 or human 0. Zombies can turn adjacent horizont or vertical (up/down/left/right) human beings into zombies every hour. The task is to find out how many hours it will take to infect all humans.
Examples:
Input: arr[][] = { { 0, 1, 0, 1 }, ... | [
{
"code": null,
"e": 26065,
"s": 26037,
"text": "\n23 Dec, 2021"
},
{
"code": null,
"e": 26306,
"s": 26065,
"text": "Given a 2D grid, each cell is either a zombie 1 or human 0. Zombies can turn adjacent horizont or vertical (up/down/left/right) human beings into zombies every hou... |
hibernate update | hibernate update example | update query | PROGRAMMINGJava ExamplesC Examples
Java Examples
C Examples
C Tutorials
aws
JAVAEXCEPTIONSCOLLECTIONSSWINGJDBC
EXCEPTIONS
COLLECTIONS
SWING
JDBC
JAVA 8
SPRING
SPRING BOOT
HIBERNATE
PYTHON
PHP
JQUERY
PROGRAMMINGJava ExamplesC Examples
Java Examples
C Examples
C Tutorials
aws
In the previous tutorials, we have discussed ... | [
{
"code": null,
"e": 158,
"s": 123,
"text": "PROGRAMMINGJava ExamplesC Examples"
},
{
"code": null,
"e": 172,
"s": 158,
"text": "Java Examples"
},
{
"code": null,
"e": 183,
"s": 172,
"text": "C Examples"
},
{
"code": null,
"e": 195,
"s": 183,
... |
Lucky Numbers in a Matrix in JavaScript | Given a m * n matrix of distinct numbers, we have to return all lucky numbers in the 2-D array (matrix) in any order.
A lucky number is an element of the matrix such that it is the minimum element in its row and maximum in its column.
For example − If the input array is −
const arr = [
[3,7,8],
[9,11,13],
[15,... | [
{
"code": null,
"e": 1180,
"s": 1062,
"text": "Given a m * n matrix of distinct numbers, we have to return all lucky numbers in the 2-D array (matrix) in any order."
},
{
"code": null,
"e": 1297,
"s": 1180,
"text": "A lucky number is an element of the matrix such that it is the m... |
How to get all the options in the dropdown in Selenium? | We can extract all the options in a dropdown in Selenium with the help of Select class which has the getOptions() method. This retrieves all the options on a Select tag and returns a list of web elements. This method does not accept any arguments.
import org.openqa.selenium.By;
import org.openqa.selenium.WebDriver;
imp... | [
{
"code": null,
"e": 1310,
"s": 1062,
"text": "We can extract all the options in a dropdown in Selenium with the help of Select class which has the getOptions() method. This retrieves all the options on a Select tag and returns a list of web elements. This method does not accept any arguments."
},... |
Count number of substrings with exactly k distinct characters - GeeksforGeeks | 22 Apr, 2022
Given a string of lowercase alphabets, count all possible substrings (not necessarily distinct) that has exactly k distinct characters. Examples:
Input: abc, k = 2
Output: 2
Possible substrings are {"ab", "bc"}
Input: aba, k = 2
Output: 3
Possible substrings are {"ab", "ba", "aba"}
Input: aa, k = 1
Out... | [
{
"code": null,
"e": 25095,
"s": 25067,
"text": "\n22 Apr, 2022"
},
{
"code": null,
"e": 25243,
"s": 25095,
"text": "Given a string of lowercase alphabets, count all possible substrings (not necessarily distinct) that has exactly k distinct characters. Examples: "
},
{
"... |
How to create a Hash Table in PowerShell? | There are several ways to create a Hash Table in PowerShell. We will discuss here the standard method @{} for creating the Hash Table.
You can use @{} method to create a hash table. Key-Value pair is separated with the Semi-Colon (;). You can only add unique keys. Duplicate keys are not accepted.
$htable = @{EmpName="C... | [
{
"code": null,
"e": 1197,
"s": 1062,
"text": "There are several ways to create a Hash Table in PowerShell. We will discuss here the standard method @{} for creating the Hash Table."
},
{
"code": null,
"e": 1360,
"s": 1197,
"text": "You can use @{} method to create a hash table. ... |
Learning to Use Progress Bars in Python | Towards Data Science | Progress Bars are a visual representation of how long is left for a process to complete. They save you having to worry whether the process has hang or try to predict how your code has been getting on. You can visually see in real time how well the script is progressing!
If you have never thought of or worked with progr... | [
{
"code": null,
"e": 443,
"s": 172,
"text": "Progress Bars are a visual representation of how long is left for a process to complete. They save you having to worry whether the process has hang or try to predict how your code has been getting on. You can visually see in real time how well the script ... |
Big Data Analytics - Data Exploration | Exploratory data analysis is a concept developed by John Tuckey (1977) that consists on a new perspective of statistics. Tuckey’s idea was that in traditional statistics, the data was not being explored graphically, is was just being used to test hypotheses. The first attempt to develop a tool was done in Stanford, the... | [
{
"code": null,
"e": 3030,
"s": 2554,
"text": "Exploratory data analysis is a concept developed by John Tuckey (1977) that consists on a new perspective of statistics. Tuckey’s idea was that in traditional statistics, the data was not being explored graphically, is was just being used to test hypoth... |
How to change login screen background in Ubuntu - GeeksforGeeks | 18 Feb, 2019
You may get bored with ordinary purple-colored background screen whenever you login into your computer. To replace this purple-colored background to your favorite background screen it is not as easy as in Windows.
Steps to change login screen background in Ubuntu:
Step 1: Copy your favorite background imag... | [
{
"code": null,
"e": 24904,
"s": 24876,
"text": "\n18 Feb, 2019"
},
{
"code": null,
"e": 25118,
"s": 24904,
"text": "You may get bored with ordinary purple-colored background screen whenever you login into your computer. To replace this purple-colored background to your favorite ... |
CSS | Tooltip Fade In Animation - GeeksforGeeks | 29 May, 2020
Tooltip is used to display information about an element when the mouse has hovered over that element. Tooltips are by default displayed with no delay (animation).
How to add animation to Tooltip?We can add fade-in effect to the tooltip text before it becomes visible. This can be done by changing the opacit... | [
{
"code": null,
"e": 24465,
"s": 24437,
"text": "\n29 May, 2020"
},
{
"code": null,
"e": 24628,
"s": 24465,
"text": "Tooltip is used to display information about an element when the mouse has hovered over that element. Tooltips are by default displayed with no delay (animation)."... |
Shell Script to Demonstrate the Use of Shell Function Library - GeeksforGeeks | 11 May, 2021
Shell Function Library is basically a collection of functions that can be accessed from anywhere in the development environment. It actually makes shell scripting a bit less tedious and repetitive. By creating a shell script with some functions defined in it, we can then access and call those functions fro... | [
{
"code": null,
"e": 24039,
"s": 24011,
"text": "\n11 May, 2021"
},
{
"code": null,
"e": 24449,
"s": 24039,
"text": "Shell Function Library is basically a collection of functions that can be accessed from anywhere in the development environment. It actually makes shell scripting ... |
Java Read Files | In the previous chapter, you learned how to create and write to a file.
In the
following example, we use the Scanner class to read the contents of the text file we created in the previous chapter:
import java.io.File; // Import the File class
import java.io.FileNotFoundException; // Import this class to handle error... | [
{
"code": null,
"e": 72,
"s": 0,
"text": "In the previous chapter, you learned how to create and write to a file."
},
{
"code": null,
"e": 198,
"s": 72,
"text": "In the \nfollowing example, we use the Scanner class to read the contents of the text file we created in the previous ... |
How to use placeholder attribute in HTML? | If you want to set a hint for text area or input field, then use the HTML placeholder attribute. The hint is the expected value, which gets displayed before the user enters a value, for example, name, details, etc.
You can try to run the following code to learn how to use placeholder attribute in HTML.
<!DOCTYPE html>
... | [
{
"code": null,
"e": 1277,
"s": 1062,
"text": "If you want to set a hint for text area or input field, then use the HTML placeholder attribute. The hint is the expected value, which gets displayed before the user enters a value, for example, name, details, etc."
},
{
"code": null,
"e": 1... |
What are assertions in Selenium with python? | There are assertions in Selenium which are verification or checkpoints for
the test case. In the absence of an assertion, there is no option of determining if a
test case has failed or not.
Sometimes, we may use the conditional statements like if – else and so on and then
print the result of pass/ fail in the console. ... | [
{
"code": null,
"e": 1252,
"s": 1062,
"text": "There are assertions in Selenium which are verification or checkpoints for\nthe test case. In the absence of an assertion, there is no option of determining if a\ntest case has failed or not."
},
{
"code": null,
"e": 1465,
"s": 1252,
... |
Custom exceptions in Java | You can create your own exceptions in Java and they are known as user-defined exceptions or custom exceptions.
To create a user-defined exception extend one of the above-mentioned classes. To display the message override the toString() method or, call the superclass parameterized constructor bypassing the message in St... | [
{
"code": null,
"e": 1173,
"s": 1062,
"text": "You can create your own exceptions in Java and they are known as user-defined exceptions or custom exceptions."
},
{
"code": null,
"e": 1395,
"s": 1173,
"text": "To create a user-defined exception extend one of the above-mentioned cl... |
AWT KeyListener Interface | The class which processes the KeyEvent should implement this interface.The object of that class must be registered with a component. The object can be registered using the addKeyListener() method.
Following is the declaration for java.awt.event.KeyListener interface:
public interface KeyListener
extends EventListen... | [
{
"code": null,
"e": 1945,
"s": 1747,
"text": "The class which processes the KeyEvent should implement this interface.The object of that class must be registered with a component. The object can be registered using the addKeyListener() method. "
},
{
"code": null,
"e": 2016,
"s": 194... |
Set the opacity only to background color not on the text in CSS - GeeksforGeeks | 30 Jul, 2021
The opacity property is used in the image to describes the transparency of the image. The value of opacity lies between 0.0 to 1.0 where the low value represents high transparent and high value represents low transparent. The percentage of opacity is calculated as Opacity% = Opacity * 100To set the opacity... | [
{
"code": null,
"e": 24736,
"s": 24708,
"text": "\n30 Jul, 2021"
},
{
"code": null,
"e": 25262,
"s": 24736,
"text": "The opacity property is used in the image to describes the transparency of the image. The value of opacity lies between 0.0 to 1.0 where the low value represents h... |
Creating a Table from an Existing Table | A copy of an existing table can be created using a combination of the CREATE TABLE statement and the SELECT statement. The new table has the same column definitions. All columns or specific columns can be selected. When you will create a new table using the existing table, the new table would be populated using the exi... | [
{
"code": null,
"e": 2804,
"s": 2453,
"text": "A copy of an existing table can be created using a combination of the CREATE TABLE statement and the SELECT statement. The new table has the same column definitions. All columns or specific columns can be selected. When you will create a new table using... |
How to get the current weeknumber of the year? - GeeksforGeeks | 26 Sep, 2019
The problem is to find the week number of year of a given date (in dd/mm/yy format).
Input: date = "02/01/2019"
Output: 1
Explanation: We can check from the calendar that 2nd January 2019 lies
in 1st week of 2019.
Input: date = "08/09/2019"
Output: 36
Approach:We will assign each day of the week a numbe... | [
{
"code": null,
"e": 24686,
"s": 24658,
"text": "\n26 Sep, 2019"
},
{
"code": null,
"e": 24771,
"s": 24686,
"text": "The problem is to find the week number of year of a given date (in dd/mm/yy format)."
},
{
"code": null,
"e": 24941,
"s": 24771,
"text": "Input... |
CSS | :not Selector - GeeksforGeeks | 04 Jan, 2019
The :not(selector) selector is used to style every element that is not the specified by selector. Since it prevents specific items from being selected, it is also known as the negation pseudo-class.
Syntax:
:not(selector) {
//CSS Property
}
Example-1:
<!DOCTYPE html><html> <head> <title> CSS ... | [
{
"code": null,
"e": 23648,
"s": 23620,
"text": "\n04 Jan, 2019"
},
{
"code": null,
"e": 23847,
"s": 23648,
"text": "The :not(selector) selector is used to style every element that is not the specified by selector. Since it prevents specific items from being selected, it is also ... |
What is encapsulation in C#? | Encapsulation in C# prevents access to implementation details. Implement Encapsulation in C# using access specifiers.
The following are the access specifiers supported by C# −
Public
Private
Protected
Internal
Protected internal
Encapsulation can be understood by taking an example of private access specifier that allow... | [
{
"code": null,
"e": 1180,
"s": 1062,
"text": "Encapsulation in C# prevents access to implementation details. Implement Encapsulation in C# using access specifiers."
},
{
"code": null,
"e": 1238,
"s": 1180,
"text": "The following are the access specifiers supported by C# −"
},
... |
CSS Margin Collapse - GeeksforGeeks | 02 Jul, 2021
The CSS margin property is used to set a margin on all four sides of an element. When two elements are next to each other on a page vertically, one of the elements might lose its vertical margin. This means the top and bottom margins of elements are sometimes combined into a single margin. The single margi... | [
{
"code": null,
"e": 24472,
"s": 24444,
"text": "\n02 Jul, 2021"
},
{
"code": null,
"e": 24852,
"s": 24472,
"text": "The CSS margin property is used to set a margin on all four sides of an element. When two elements are next to each other on a page vertically, one of the elements... |
What is emplace_back( ) in C++? | This function is used to insert new element at the end of deque.
dequename.emplace_back(value)
Value − It defines the element to be inserted at the end of deque.
Input Deque − 11 12 13 14 15
Output New Deque − 11 12 13 14 15 16
Input Deque − M O M E N T
Output New Deque − M O M E N T S
First we declare the deque.
First... | [
{
"code": null,
"e": 1127,
"s": 1062,
"text": "This function is used to insert new element at the end of deque."
},
{
"code": null,
"e": 1157,
"s": 1127,
"text": "dequename.emplace_back(value)"
},
{
"code": null,
"e": 1224,
"s": 1157,
"text": "Value − It defin... |
AttrDict module in Python - GeeksforGeeks | 31 Aug, 2021
AttrDict is an MIT-licensed library which provides mapping objects that allow their elements to be accessed both as keys and as attributes. So we can think of the dictionary that we import and use.
Installation:
To install AttrDict, use the pip command as follows:
pip install attrdict
Having installed it,... | [
{
"code": null,
"e": 24292,
"s": 24264,
"text": "\n31 Aug, 2021"
},
{
"code": null,
"e": 24490,
"s": 24292,
"text": "AttrDict is an MIT-licensed library which provides mapping objects that allow their elements to be accessed both as keys and as attributes. So we can think of the ... |
C# | Jagged Arrays - GeeksforGeeks | 14 Nov, 2019
Jagged array is a array of arrays such that member arrays can be of different sizes. In other words, the length of each array index can differ. The elements of Jagged Array are reference types and initialized to null by default. Jagged Array can also be mixed with multidimensional arrays. Here, the number ... | [
{
"code": null,
"e": 25280,
"s": 25252,
"text": "\n14 Nov, 2019"
},
{
"code": null,
"e": 25674,
"s": 25280,
"text": "Jagged array is a array of arrays such that member arrays can be of different sizes. In other words, the length of each array index can differ. The elements of Jag... |
MySQL - String Functions | Compares sounds
Returns numeric value of left-most character
Returns a string representation of the argument
Returns length of argument in bits
Returns number of characters in argument
Returns the character for each integer passed
A synonym for CHAR_LENGTH()
Returns concatenate with separator
Returns concatenated stri... | [
{
"code": null,
"e": 2349,
"s": 2333,
"text": "Compares sounds"
},
{
"code": null,
"e": 2394,
"s": 2349,
"text": "Returns numeric value of left-most character"
},
{
"code": null,
"e": 2442,
"s": 2394,
"text": "Returns a string representation of the argument"
... |
Sort an array using Bubble Sort without using loops - GeeksforGeeks | 22 Jun, 2021
Given an array arr[] consisting of N integers, the task is to sort the given array by using Bubble Sort without using loops.
Examples:
Input: arr[] = {1, 3, 4, 2, 5}Output: 1 2 3 4 5
Input: arr[] = {1, 3, 4, 2}Output: 1 2 3 4
Approach: The idea to implement Bubble Sort without using loops is based on the ... | [
{
"code": null,
"e": 24271,
"s": 24240,
"text": " \n22 Jun, 2021\n"
},
{
"code": null,
"e": 24396,
"s": 24271,
"text": "Given an array arr[] consisting of N integers, the task is to sort the given array by using Bubble Sort without using loops."
},
{
"code": null,
"e"... |
Mapping Your Favorite Coffee Shop in the Philippines using Google Places API and Folium | by Francis Adrian Viernes | Towards Data Science | For most of us, coffee has become a non-negotiable in our morning routine.
But in a lot of urban planning studies, the number of coffee shops has become indicative of the level of development of a place or a city. It is not really surprising as coffee shops are avenues for business and client meetings and are found in ... | [
{
"code": null,
"e": 247,
"s": 172,
"text": "For most of us, coffee has become a non-negotiable in our morning routine."
},
{
"code": null,
"e": 567,
"s": 247,
"text": "But in a lot of urban planning studies, the number of coffee shops has become indicative of the level of develo... |
How to get a JSON field in a nested JSON using Rest Assured? | We can get a JSON field in a complex nested JSON using Rest Assured. First, we shall obtain a Response body which is in JSON format from a request. Then convert it to string.
We shall send a GET request via Postman on a mock API URL and observe its Response.
Using Rest Assured, let us get the value of the Price field h... | [
{
"code": null,
"e": 1237,
"s": 1062,
"text": "We can get a JSON field in a complex nested JSON using Rest Assured. First, we shall obtain a Response body which is in JSON format from a request. Then convert it to string."
},
{
"code": null,
"e": 1321,
"s": 1237,
"text": "We shal... |
How does a process look like in memory? | A program loaded into memory and executing is called a process. In simple, a process is a program in execution.
When a program is created then it is just some pieces of Bytes which is stored in Hard Disk as a passive entity. Then the program starts loading in memory and become an active entity, when a program is double... | [
{
"code": null,
"e": 1174,
"s": 1062,
"text": "A program loaded into memory and executing is called a process. In simple, a process is a program in execution."
},
{
"code": null,
"e": 1492,
"s": 1174,
"text": "When a program is created then it is just some pieces of Bytes which i... |
Perform Multi-table delete in MySQL | For this, you can use DELETE command. Let us first create a table −
mysql> create table DemoTable1
(
Id int,
Name varchar(20)
);
Query OK, 0 rows affected (0.63 sec)
Insert some records in the table using insert command −
mysql> insert into DemoTable1 values(1,'Chris');
Query OK, 1 row affected (0.30 sec)
mysql> ... | [
{
"code": null,
"e": 1130,
"s": 1062,
"text": "For this, you can use DELETE command. Let us first create a table −"
},
{
"code": null,
"e": 1234,
"s": 1130,
"text": "mysql> create table DemoTable1\n(\n Id int,\n Name varchar(20)\n);\nQuery OK, 0 rows affected (0.63 sec)"
},... |
Decision Tree. In our day-to-day life, we interact... | by Aditya Kumar | Towards Data Science | In our day-to-day life, we interact with various machine learning applications and use it without knowing it. The best example is buying something from any online shopping portal where we get several recommendations based on what we are buying.
One type of machine learning algorithm is Decision Tree, which is a type of... | [
{
"code": null,
"e": 416,
"s": 171,
"text": "In our day-to-day life, we interact with various machine learning applications and use it without knowing it. The best example is buying something from any online shopping portal where we get several recommendations based on what we are buying."
},
{
... |
Machine Learning — Probability & Statistics | by Javaid Nabi | Towards Data Science | Machine Learning is an interdisciplinary field that uses statistics, probability, algorithms to learn from data and provide insights which can be used to build intelligent applications. In this article, we will discuss some of the key concepts widely used in machine learning.
Probability and statistics are related area... | [
{
"code": null,
"e": 448,
"s": 171,
"text": "Machine Learning is an interdisciplinary field that uses statistics, probability, algorithms to learn from data and provide insights which can be used to build intelligent applications. In this article, we will discuss some of the key concepts widely used... |
Generate a list of n consecutive composite numbers (An interesting method) - GeeksforGeeks | 05 Apr, 2021
Given a number n, generate a list of n composite numbers.Examples:
Input : 5
Output : 122, 123, 124, 125
Input : 10
Output : 3628802, 3628803, 3628804, 3628805, 3628806,
3628807, 3628808, 3628809, 3628810
The idea here is using the properties of . Since , then numbers , all divide . Therefor... | [
{
"code": null,
"e": 25206,
"s": 25178,
"text": "\n05 Apr, 2021"
},
{
"code": null,
"e": 25275,
"s": 25206,
"text": "Given a number n, generate a list of n composite numbers.Examples: "
},
{
"code": null,
"e": 25424,
"s": 25275,
"text": "Input : 5\nOutput : 1... |
A Practical Introduction to Keras Callbacks in TensorFlow 2 | by B. Chen | Towards Data Science | When training a machine learning model, we would like to have the ability to monitor the model performance and perform certain actions depending on those performance measures. That’s where Keras Callbacks come in.
Callbacks are an important type of object TensorFlow and Keras that are designed to be able to monitor the... | [
{
"code": null,
"e": 385,
"s": 171,
"text": "When training a machine learning model, we would like to have the ability to monitor the model performance and perform certain actions depending on those performance measures. That’s where Keras Callbacks come in."
},
{
"code": null,
"e": 634,... |
What is hysteresis thresholding? How can it be achieved using scikit-learn in Python? | Hysteresis refers to the lagging effect of a result. With respect to threshold, hysteresis refers to the areas that are above a specific low threshold value or above high threshold values. It refers to areas that are highly-confident in nature.
With the help of hysteresis, the noise outside the edges of the object in t... | [
{
"code": null,
"e": 1307,
"s": 1062,
"text": "Hysteresis refers to the lagging effect of a result. With respect to threshold, hysteresis refers to the areas that are above a specific low threshold value or above high threshold values. It refers to areas that are highly-confident in nature."
},
... |
Perl Conditional Statements - IF...ELSE | Perl conditional statements helps in the decision making, which require that the programmer specifies one or more conditions to be evaluated or tested by the program, along with a statement or statements to be executed if the condition is determined to be true, and optionally, other statements to be executed if the con... | [
{
"code": null,
"e": 2574,
"s": 2220,
"text": "Perl conditional statements helps in the decision making, which require that the programmer specifies one or more conditions to be evaluated or tested by the program, along with a statement or statements to be executed if the condition is determined to ... |
Node.js stream.Readable.from() Method - GeeksforGeeks | 11 Oct, 2021
The stream.Readable.from() method is an inbuilt application programming interface of the Stream module which is used to construct Readable Streams out of iterators.
Syntax:
stream.Readable.from( iterable, options )
Parameters: This method accept two parameters as mentioned above and described below:
iterab... | [
{
"code": null,
"e": 24531,
"s": 24503,
"text": "\n11 Oct, 2021"
},
{
"code": null,
"e": 24696,
"s": 24531,
"text": "The stream.Readable.from() method is an inbuilt application programming interface of the Stream module which is used to construct Readable Streams out of iterators... |
How to create a line chart using JavaFX? | Inline chart, the data values have represented a series of points connected by a line. In JavaFX, you can create a line chart by instantiating the javafx.scene.chart.LineChart class.
While instantiating this class you must pass the two objects of the Axis class representing the x and y-axis (as parameters of the constr... | [
{
"code": null,
"e": 1245,
"s": 1062,
"text": "Inline chart, the data values have represented a series of points connected by a line. In JavaFX, you can create a line chart by instantiating the javafx.scene.chart.LineChart class."
},
{
"code": null,
"e": 1544,
"s": 1245,
"text": ... |
Struts 2 - Value Stack/OGNL | The value stack is a set of several objects which keeps the following objects in the provided order −
Temporary Objects
There are various temporary objects which are created during execution of a page. For example the current iteration value for a collection being looped over in a JSP tag.
The Model Object
If you are u... | [
{
"code": null,
"e": 2348,
"s": 2246,
"text": "The value stack is a set of several objects which keeps the following objects in the provided order −"
},
{
"code": null,
"e": 2366,
"s": 2348,
"text": "Temporary Objects"
},
{
"code": null,
"e": 2537,
"s": 2366,
... |
Print all subsequences of a string - GeeksforGeeks | 06 Apr, 2022
Given a string, we have to find out all subsequences of it. A String is a subsequence of a given String, that is generated by deleting some character of a given string without changing its order.
Examples:
Input : abc
Output : a, b, c, ab, bc, ac, abc
Input : aaa
Output : a, aa, aaa
Method 1 (Pick and Do... | [
{
"code": null,
"e": 24899,
"s": 24871,
"text": "\n06 Apr, 2022"
},
{
"code": null,
"e": 25095,
"s": 24899,
"text": "Given a string, we have to find out all subsequences of it. A String is a subsequence of a given String, that is generated by deleting some character of a given st... |
PHP - Arithmetic Operators Example | Try following example to understand all the arithmetic operators. Copy and paste following PHP program in test.php file and keep it in your PHP Server's document root and browse it using any browser.
<html>
<head>
<title>Arithmetical Operators</title>
</head>
<body>
<?php
$a = ... | [
{
"code": null,
"e": 2957,
"s": 2757,
"text": "Try following example to understand all the arithmetic operators. Copy and paste following PHP program in test.php file and keep it in your PHP Server's document root and browse it using any browser."
},
{
"code": null,
"e": 3739,
"s": 2... |
Find the real and imaginary part of a Complex number - GeeksforGeeks | 19 May, 2021
Given a complex number Z, the task is to determine the real and imaginary parts of this complex number.Examples:
Input: z = 3 + 4i Output: Real part: 3, Imaginary part: 4Input: z = 6 – 8i Output: Real part: 6, Imaginary part: 8
Approach: A complex number can be represented as Z = x + yi, where x is r... | [
{
"code": null,
"e": 24982,
"s": 24954,
"text": "\n19 May, 2021"
},
{
"code": null,
"e": 25097,
"s": 24982,
"text": "Given a complex number Z, the task is to determine the real and imaginary parts of this complex number.Examples: "
},
{
"code": null,
"e": 25214,
... |
How to detect and track the motion of eyeball in OpenCV using C++? | Here, we will learn how to detect and track the motion of eyeball in OpenCV.
The following program demonstrates to detect the eyeball and track the location.
#include<iostream>
#include<opencv2/core/core.hpp>
#include<opencv2/highgui/highgui.hpp>
#include<opencv2/imgproc/imgproc.hpp>
#include<opencv2/objdetect/objdetec... | [
{
"code": null,
"e": 1139,
"s": 1062,
"text": "Here, we will learn how to detect and track the motion of eyeball in OpenCV."
},
{
"code": null,
"e": 1220,
"s": 1139,
"text": "The following program demonstrates to detect the eyeball and track the location."
},
{
"code": nu... |
Nth term of Ruler Function Series - GeeksforGeeks | 25 Jun, 2021
Given a positive integer N, the task is to find the Nth term of the Ruler Function Series.
The Ruler Function Series is a series, having 1 as the first term, formed by performing the following two operations:
Append the smallest positive integer not present in the series.
Then, append all the numbers befor... | [
{
"code": null,
"e": 24621,
"s": 24593,
"text": "\n25 Jun, 2021"
},
{
"code": null,
"e": 24712,
"s": 24621,
"text": "Given a positive integer N, the task is to find the Nth term of the Ruler Function Series."
},
{
"code": null,
"e": 24830,
"s": 24712,
"text": ... |
PySpark - orderBy() and sort() - GeeksforGeeks | 06 Jun, 2021
In this article, we will see how to sort the data frame by specified columns in PySpark. We can make use of orderBy() and sort() to sort the data frame in PySpark
OrderBy() function is used to sort an object by its index value.
Syntax: DataFrame.orderBy(cols, args)
Parameters :
cols: List of columns to be... | [
{
"code": null,
"e": 23901,
"s": 23873,
"text": "\n06 Jun, 2021"
},
{
"code": null,
"e": 24065,
"s": 23901,
"text": "In this article, we will see how to sort the data frame by specified columns in PySpark. We can make use of orderBy() and sort() to sort the data frame in PySpark... |
Calculate sum of the main diagonal and the number of rows and columns containing repeated values in a square matrix - GeeksforGeeks | 23 Nov, 2021
Given a matrix M[][] of dimensions N * N, consisting only of integers from the range 1 to N, the task is to compute the sum of the matrix elements present in the main diagonal, the number of rows and columns containing repeated values.
Examples:
Input: N = 4, M[][] = {{1, 2, 3, 4}, {2, 1, 4, 3}, {3, 4, 1, ... | [
{
"code": null,
"e": 26539,
"s": 26511,
"text": "\n23 Nov, 2021"
},
{
"code": null,
"e": 26775,
"s": 26539,
"text": "Given a matrix M[][] of dimensions N * N, consisting only of integers from the range 1 to N, the task is to compute the sum of the matrix elements present in the m... |
ASP BinaryWrite Method - GeeksforGeeks | 26 Apr, 2021
The ASP BinaryWrite Method is used to specify to write the data to the current HTTP output. without any character conversion. This method is used to write the non-string information such as Binary data required for the image. It is a predefined method of the Response type Object.
Syntax:
response.BinaryWri... | [
{
"code": null,
"e": 25265,
"s": 25237,
"text": "\n26 Apr, 2021"
},
{
"code": null,
"e": 25546,
"s": 25265,
"text": "The ASP BinaryWrite Method is used to specify to write the data to the current HTTP output. without any character conversion. This method is used to write the non-... |
How to create a categorical variable using a data frame column in R? | If a variable is numerical then it can be converted into a categorical variable by defining the lower and upper limits. For example, age starting from 21 and ending at 25 can be converted into a category say 21−25. To convert an R data frame column into a categorical variable, we can use cut function.
Live Demo
Consid... | [
{
"code": null,
"e": 1365,
"s": 1062,
"text": "If a variable is numerical then it can be converted into a categorical variable by defining the lower and upper limits. For example, age starting from 21 and ending at 25 can be converted into a category say 21−25. To convert an R data frame column into... |
Finding Integreand using Weedle's Rule - GeeksforGeeks | 11 Jun, 2021
Given a function and two integers a and b. The task is to find the integrand of the given function from lower limit(a) to the upper limit(b) using Weedle’s Rule. The given function is:
Examples:
Input: a = 0, b = 6 Output: 1.373448
Input: a = 10, b = 13 Output: f(x) = 0.022897
Approach: The integration... | [
{
"code": null,
"e": 25963,
"s": 25935,
"text": "\n11 Jun, 2021"
},
{
"code": null,
"e": 26149,
"s": 25963,
"text": "Given a function and two integers a and b. The task is to find the integrand of the given function from lower limit(a) to the upper limit(b) using Weedle’s Rule. T... |
Build pipelines with Pandas using “pdpipe” | by Tirthajyoti Sarkar | Towards Data Science | Pandas is an amazing library in the Python ecosystem for data analytics and machine learning. They form the perfect bridge between the data world, where Excel/CSV files and SQL tables live, and the modeling world where Scikit-learn or TensorFlow perform their magic.
A data science flow is most often a sequence of steps... | [
{
"code": null,
"e": 439,
"s": 172,
"text": "Pandas is an amazing library in the Python ecosystem for data analytics and machine learning. They form the perfect bridge between the data world, where Excel/CSV files and SQL tables live, and the modeling world where Scikit-learn or TensorFlow perform t... |
How to retrieve the Azure VM RAM and CPU size using PowerShell? | Azure VM RAM and CPU size depend on the hardware profile chosen for the VM. In this example, we will retrieve VM (TestMachine2k16) hardware profile and then we can find how much RAM or CPU is allocated to it.
To get the Size of the Azure VM,
PS C:\> $azvm = Get-AzVM -VMName 'TestMachine2k16'
PS C:\> $azvm.HardwareProfi... | [
{
"code": null,
"e": 1271,
"s": 1062,
"text": "Azure VM RAM and CPU size depend on the hardware profile chosen for the VM. In this example, we will retrieve VM (TestMachine2k16) hardware profile and then we can find how much RAM or CPU is allocated to it."
},
{
"code": null,
"e": 1304,
... |
Add two integers of different base and represent sum in smaller base of the two - GeeksforGeeks | 08 Mar, 2022
Given two integers X, Y in base B1 and B2 respectively, the task is to find the sum of integers X and Y and represent the result in min of ( B1 and B2 ).
Example:
Input: X = 123, Y = 234, B1 = 6, B2 = 8 Output: 543 Explanation: Integer in base 10: 51 and 156 Sum of Integers: 207 Minimum Base: 6 Sum of In... | [
{
"code": null,
"e": 24612,
"s": 24584,
"text": "\n08 Mar, 2022"
},
{
"code": null,
"e": 24766,
"s": 24612,
"text": "Given two integers X, Y in base B1 and B2 respectively, the task is to find the sum of integers X and Y and represent the result in min of ( B1 and B2 )."
},
{... |
Using Machine Learning to Predict Fantasy Football Points | by Jim King | Towards Data Science | NFL fantasy football is a game in which football fans take on the role of the coach or general manager of a pro football team. Participants draft their initial teams, select players to play each week and trade players in order to compete weekly during a season against other teams. The winning teams are determined by th... | [
{
"code": null,
"e": 411,
"s": 47,
"text": "NFL fantasy football is a game in which football fans take on the role of the coach or general manager of a pro football team. Participants draft their initial teams, select players to play each week and trade players in order to compete weekly during a se... |
10 Examples to Master Python Tuples | by Soner Yıldırım | Towards Data Science | Data structures are crucial parts of any programming language. In order to create robust and well-performing products, one must know the data structures very well.
In this post, we will work on an important data structure of Python programming language and that is tuple.
Tuple is a collection of values separated by com... | [
{
"code": null,
"e": 210,
"s": 46,
"text": "Data structures are crucial parts of any programming language. In order to create robust and well-performing products, one must know the data structures very well."
},
{
"code": null,
"e": 318,
"s": 210,
"text": "In this post, we will w... |
Alternate Lower Upper String Sort in C++ | A string is an array of characters. And this problem is to sort the elements of the string with alternate upper and lower case.
Problem Description − Alternate lower upper string sort, is a problem in which we are provided an unordered string which contains mixed upper and lowercase characters and we need to sort this ... | [
{
"code": null,
"e": 1190,
"s": 1062,
"text": "A string is an array of characters. And this problem is to sort the elements of the string with alternate upper and lower case."
},
{
"code": null,
"e": 1502,
"s": 1190,
"text": "Problem Description − Alternate lower upper string sor... |
BigInteger longValue() Method in Java - GeeksforGeeks | 04 Dec, 2018
The java.math.BigInteger.longValue() converts this BigInteger to a long value. If the value return by this function is too big to fit into long value, then it will return only the low-order 64 bits. There is chance that this conversion can loose information about the overall magnitude of the BigInteger val... | [
{
"code": null,
"e": 23948,
"s": 23920,
"text": "\n04 Dec, 2018"
},
{
"code": null,
"e": 24318,
"s": 23948,
"text": "The java.math.BigInteger.longValue() converts this BigInteger to a long value. If the value return by this function is too big to fit into long value, then it will... |
How to set the min and max height or width of a Frame in Tkinter? | In order to manage too many widgets in the window, we can use Frame widgets in Tkinter. In order to place the widgets inside the frame widget, we have to set the relative width and height of the frame. To configure the relative height and width of the frame, we have to configure it using the place(relx, rely) method.
N... | [
{
"code": null,
"e": 1381,
"s": 1062,
"text": "In order to manage too many widgets in the window, we can use Frame widgets in Tkinter. In order to place the widgets inside the frame widget, we have to set the relative width and height of the frame. To configure the relative height and width of the f... |
Tk - Combobox Widget | Combobox widget is a widget that combines an entry with a list of choices available to the use. The syntax for combobox widget is shown below −
combobox comboboxName options
The options available for the combobox widget are listed below in table.
-background color
Used to set background color for widget.
-borderwidth ... | [
{
"code": null,
"e": 2345,
"s": 2201,
"text": "Combobox widget is a widget that combines an entry with a list of choices available to the use. The syntax for combobox widget is shown below −"
},
{
"code": null,
"e": 2376,
"s": 2345,
"text": "combobox comboboxName options\n"
},
... |
Java - min() Method | The method gives the smaller of the two arguments. The argument can be int, float, long, double.
This method has the following variants −
double min(double arg1, double arg2)
float min(float arg1, float arg2)
int min(int arg1, int arg2)
long min(long arg1, long arg2)
Here is the detail of parameters −
This method acce... | [
{
"code": null,
"e": 2474,
"s": 2377,
"text": "The method gives the smaller of the two arguments. The argument can be int, float, long, double."
},
{
"code": null,
"e": 2515,
"s": 2474,
"text": "This method has the following variants −"
},
{
"code": null,
"e": 2646,
... |
How to Label Images for Object Detection, Step by Step | by Pranjal Saxena | Towards Data Science | Labelling image is the first and most significant part of object detection. Labelling is indeed a very time-consuming process, but the more dedication you will give in labelling images, the more accurate your model can be. In this story, I will be discussing the complete approach of labelling in detail. Finally, with t... | [
{
"code": null,
"e": 576,
"s": 171,
"text": "Labelling image is the first and most significant part of object detection. Labelling is indeed a very time-consuming process, but the more dedication you will give in labelling images, the more accurate your model can be. In this story, I will be discuss... |
Train/Test Split and Cross Validation in Python | by Adi Bronshtein | Towards Data Science | Hi everyone! After my last post on linear regression in Python, I thought it would only be natural to write a post about Train/Test Split and Cross Validation. As usual, I am going to give a short overview on the topic and then give an example on implementing it in Python. These are two rather important concepts in dat... | [
{
"code": null,
"e": 938,
"s": 172,
"text": "Hi everyone! After my last post on linear regression in Python, I thought it would only be natural to write a post about Train/Test Split and Cross Validation. As usual, I am going to give a short overview on the topic and then give an example on implemen... |
Ensemble Methods Code-Along. A code-along of Random Forest... | by Leana Critchell | Towards Data Science | As the subtitle suggests, this code-along post is for beginners interested in making their first, more advanced, supervised machine learning model. Perhaps you’re wanting to know how to improve your Titanic score on Kaggle — well this code along will show you a way that could boost your score significantly straight awa... | [
{
"code": null,
"e": 494,
"s": 171,
"text": "As the subtitle suggests, this code-along post is for beginners interested in making their first, more advanced, supervised machine learning model. Perhaps you’re wanting to know how to improve your Titanic score on Kaggle — well this code along will show... |
What is RTT(Round Trip Time)? | 10 May, 2020
RTT also called round-trip time/delay is a crucial tool in determining the health of a network. It is the time between a request for data and the display of that data. It is the duration measured in milliseconds. RTT can be analysed and determined by pinging a certain address. It refers to the time taken b... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n10 May, 2020"
},
{
"code": null,
"e": 550,
"s": 28,
"text": "RTT also called round-trip time/delay is a crucial tool in determining the health of a network. It is the time between a request for data and the display of that data. It is t... |
SQL indexes | 04 Oct, 2021
An index is a schema object. It is used by the server to speed up the retrieval of rows by using a pointer. It can reduce disk I/O(input/output) by using a rapid path access method to locate data quickly. An index helps to speed up select queries and where clauses, but it slows down data input, with the up... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n04 Oct, 2021"
},
{
"code": null,
"e": 542,
"s": 52,
"text": "An index is a schema object. It is used by the server to speed up the retrieval of rows by using a pointer. It can reduce disk I/O(input/output) by using a rapid path access ... |
boost::trim in C++ library | 14 Jul, 2021
This function is included in the “boost/algorithm/string” library. The Boost String Algorithms Library provides a generic implementation of string-related algorithms which are missing in STL. The trim function is used to remove all leading or trailing white spaces from the string. The input sequence is mod... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n14 Jul, 2021"
},
{
"code": null,
"e": 351,
"s": 28,
"text": "This function is included in the “boost/algorithm/string” library. The Boost String Algorithms Library provides a generic implementation of string-related algorithms which are... |
What will happen if a print() statement is written inside a if() such as if(print()) | 13 Sep, 2021
Pre-requisite: if-else
This article focuses on discussing what happens when the print statement is used inside the if-else conditional statement.
For example: Consider the below code and predict the output.
C
C++
Java
Python3
C#
Javascript
// C program #include <stdio.h> // Driver codeint main(){ // if ... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n13 Sep, 2021"
},
{
"code": null,
"e": 75,
"s": 52,
"text": "Pre-requisite: if-else"
},
{
"code": null,
"e": 198,
"s": 75,
"text": "This article focuses on discussing what happens when the print statement is used ins... |
Python – math.acos() function | 28 May, 2020
Math module contains a number of functions which is used for mathematical operations. The math.acos() function returns the arc cosine value of a number. The value passed in this function should be in between -1 to 1.
Syntax: math.acos(x)
Parameter:This method accepts only single parameters.
x :This paramet... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n28 May, 2020"
},
{
"code": null,
"e": 245,
"s": 28,
"text": "Math module contains a number of functions which is used for mathematical operations. The math.acos() function returns the arc cosine value of a number. The value passed in th... |
Python | Pandas Series.unique() | 17 Sep, 2018
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.
While analyzing the data, many times the user wants to see the unique values in a particular... | [
{
"code": null,
"e": 54,
"s": 26,
"text": "\n17 Sep, 2018"
},
{
"code": null,
"e": 269,
"s": 54,
"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 i... |
How to use Color Palettes in Python-Bokeh? | 28 Jul, 2020
Bokeh is a Python interactive data visualization. It renders its plots using HTML and JavaScript. It targets modern web browsers for presentation providing elegant, concise construction of novel graphics with high-performance interactivity. Bokeh provides us with multiple color palettes in the bokeh.palett... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n28 Jul, 2020"
},
{
"code": null,
"e": 399,
"s": 28,
"text": "Bokeh is a Python interactive data visualization. It renders its plots using HTML and JavaScript. It targets modern web browsers for presentation providing elegant, concise co... |
Company Interview Corner - GeeksforGeeks | 23 May, 2022
Want to know how successful candidates ace their interviews and get their dream job? Then read on to find 'Interview Experiences' of all product and service-based companies from all corners of the world.
Amazon [833]
Microsoft [381]
Adobe [130]
Oracle [122]
Flipkart [114]
MakeMyTrip [89]
Accolite [86]
Gold... | [
{
"code": null,
"e": 26828,
"s": 26800,
"text": "\n23 May, 2022"
},
{
"code": null,
"e": 27032,
"s": 26828,
"text": "Want to know how successful candidates ace their interviews and get their dream job? Then read on to find 'Interview Experiences' of all product and service-based ... |
Encoding a word into Pig Latin | 31 May, 2021
Design a program to take a word as an input, and then encode it into Pig Latin. A Pig Latin is an encrypted word in English, which is generated by doing the following alterations:The first vowel occurring in the input word is placed at the start of the new word along with the remaining alphabet of it. The ... | [
{
"code": null,
"e": 54,
"s": 26,
"text": "\n31 May, 2021"
},
{
"code": null,
"e": 469,
"s": 54,
"text": "Design a program to take a word as an input, and then encode it into Pig Latin. A Pig Latin is an encrypted word in English, which is generated by doing the following alterat... |
Matplotlib.axes.Axes.add_patch() in Python | 21 Apr, 2020
Matplotlib is a library in Python and it is numerical – mathematical extension for NumPy library. The Axes Class contains most of the figure elements: Axis, Tick, Line2D, Text, Polygon, etc., and sets the coordinate system. And the instances of Axes supports callbacks through a callbacks attribute.
The Axe... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n21 Apr, 2020"
},
{
"code": null,
"e": 328,
"s": 28,
"text": "Matplotlib is a library in Python and it is numerical – mathematical extension for NumPy library. The Axes Class contains most of the figure elements: Axis, Tick, Line2D, Text... |
SQL | LIKE | 20 Aug, 2020
Sometimes we may require tuples from the database which match certain patterns. For example, we may wish to retrieve all columns where the tuples start with the letter ‘y’, or start with ‘b’ and end with ‘l’, or even more complicated and restrictive string patterns. This is where the LIKE Clause comes to r... | [
{
"code": null,
"e": 53,
"s": 25,
"text": "\n20 Aug, 2020"
},
{
"code": null,
"e": 411,
"s": 53,
"text": "Sometimes we may require tuples from the database which match certain patterns. For example, we may wish to retrieve all columns where the tuples start with the letter ‘y’, o... |
Maximize cost of removing all occurrences of substrings "ab" and "ba" - GeeksforGeeks | 09 Feb, 2022
Given a string S and integers P and Q, which denotes the cost of removal of substrings “ab” and “ba” respectively from S, the task is to find the maximum cost of removing all occurrences of substrings “ab” and “ba”.
Examples:
Input: S = “cbbaabbaab”, P = 6, Q = 4Output: 22Explanation:Removing substring “ab... | [
{
"code": null,
"e": 24927,
"s": 24899,
"text": "\n09 Feb, 2022"
},
{
"code": null,
"e": 25143,
"s": 24927,
"text": "Given a string S and integers P and Q, which denotes the cost of removal of substrings “ab” and “ba” respectively from S, the task is to find the maximum cost of r... |
Writer write(int) method in Java with Examples - GeeksforGeeks | 29 Jan, 2019
The write(int) method of Writer Class in Java is used to write the specified byte value on the writer. This byte value is specified using the ASCII value of the byte value passed as an integer value. This integer value is taken as a parameter.
Syntax:
public void write(int ascii)
Parameters: This method ac... | [
{
"code": null,
"e": 24437,
"s": 24409,
"text": "\n29 Jan, 2019"
},
{
"code": null,
"e": 24681,
"s": 24437,
"text": "The write(int) method of Writer Class in Java is used to write the specified byte value on the writer. This byte value is specified using the ASCII value of the by... |
How to Install OpenCV for Python on Windows? - GeeksforGeeks | 05 Oct, 2021
Prerequisite: Python Language Introduction OpenCV is the huge open-source library for computer vision, machine learning, and image processing and now it plays a major role in real-time operation which is very important in today’s systems. By using it, one can process images and videos to identify objects, ... | [
{
"code": null,
"e": 41161,
"s": 41133,
"text": "\n05 Oct, 2021"
},
{
"code": null,
"e": 41770,
"s": 41161,
"text": "Prerequisite: Python Language Introduction OpenCV is the huge open-source library for computer vision, machine learning, and image processing and now it plays a ma... |
Fuzzywuzzy: Merging Datasets on Diversely Transcribed Names | by Megan Sorel | Towards Data Science | I recently did a project that involved merging datasets on names which had slightly different transcriptions for the same person. Some names were spelled wrong, included a nickname, middle name or suffix which didn’t match across datasets. In this case, I used the a string matching package, Fuzzywuzzy, to merge on the ... | [
{
"code": null,
"e": 507,
"s": 172,
"text": "I recently did a project that involved merging datasets on names which had slightly different transcriptions for the same person. Some names were spelled wrong, included a nickname, middle name or suffix which didn’t match across datasets. In this case, I... |
How Happy is Your Country? — Happy Planet Index Visualized | by Susan Li | Towards Data Science | The Happy Planet Index (HPI) is an index of human well-being and environmental impact that was introduced by NEF, a UK-based economic think tank promoting social, economic and environmental justice. It ranks 140 countries according to “what matters most — sustainable wellbeing for all”.
This is how HPI is calculated:
I... | [
{
"code": null,
"e": 459,
"s": 171,
"text": "The Happy Planet Index (HPI) is an index of human well-being and environmental impact that was introduced by NEF, a UK-based economic think tank promoting social, economic and environmental justice. It ranks 140 countries according to “what matters most —... |
Finding the first non-repeating character of a string in JavaScript | We are required to write a JavaScript function that takes in a string as the first and the only argument.
The function should find and return the index of first character it encounters in the string which appears only once in the string.
If the string does not contain any unique character, the function should return -1... | [
{
"code": null,
"e": 1168,
"s": 1062,
"text": "We are required to write a JavaScript function that takes in a string as the first and the only argument."
},
{
"code": null,
"e": 1300,
"s": 1168,
"text": "The function should find and return the index of first character it encounte... |
Find the Nth highest value of a vector in R - GeeksforGeeks | 27 Jan, 2022
In this article, we will see how to find the Nth largest value of a vector in the R Programming Language.
Steps for finding nth largest element in vector R:
Step 1: Create a vector and take input from the user.
Syntax : variable name = readline()
Where
Variable is the valid identifier.
readline() will ta... | [
{
"code": null,
"e": 25234,
"s": 25203,
"text": " \n27 Jan, 2022\n"
},
{
"code": null,
"e": 25340,
"s": 25234,
"text": "In this article, we will see how to find the Nth largest value of a vector in the R Programming Language."
},
{
"code": null,
"e": 25391,
"s": 2... |
AWK - Miscellaneous Functions | AWK has the following miscellaneous functions −
This function closes file of pipe..
[jerry]$ awk 'BEGIN {
cmd = "tr [a-z] [A-Z]"
print "hello, world !!!" |& cmd
close(cmd, "to")
cmd |& getline out
print out;
close(cmd);
}'
On executing this code, you get the following result −
HELLO, WORLD !!!... | [
{
"code": null,
"e": 1905,
"s": 1857,
"text": "AWK has the following miscellaneous functions −"
},
{
"code": null,
"e": 1941,
"s": 1905,
"text": "This function closes file of pipe.."
},
{
"code": null,
"e": 2106,
"s": 1941,
"text": "[jerry]$ awk 'BEGIN {\n c... |
3 techniques to make your Python code faster | by Dhanesh Budhrani | Towards Data Science | In this post I’ll be sharing 3 Python efficiency techniques that you may use in your daily scripting, and how to measure the performance improvement between 2 solutions. Let’s get started!
Performance may refer to many different factors in a solution (e.g. execution time, CPU usage, memory usage, etc.). In this post, t... | [
{
"code": null,
"e": 361,
"s": 172,
"text": "In this post I’ll be sharing 3 Python efficiency techniques that you may use in your daily scripting, and how to measure the performance improvement between 2 solutions. Let’s get started!"
},
{
"code": null,
"e": 540,
"s": 361,
"text"... |
CSS3 Left to right Gradient | You can try to run the following code to implement left to right gradient in CSS3
Live Demo
<html>
<head>
<style>
#grad1 {
height: 100px;
background: -webkit-linear-gradient(left, red , blue);
background: -o-linear-gradient(right, red, blue);
background:... | [
{
"code": null,
"e": 1144,
"s": 1062,
"text": "You can try to run the following code to implement left to right gradient in CSS3"
},
{
"code": null,
"e": 1154,
"s": 1144,
"text": "Live Demo"
},
{
"code": null,
"e": 1583,
"s": 1154,
"text": "<html>\n <head>\n... |
Java Swing | JCheckBox with examples - GeeksforGeeks | 23 May, 2018
JCheckBox is a part of Java Swing package . JCheckBox can be selected or deselected . It displays it state to the user . JCheckBox is an implementation to checkbox . JCheckBox inherits JToggleButton class.
Constructor of the class are :
JCheckBox() : creates a new checkbox with no text or iconJCheckBox(Ico... | [
{
"code": null,
"e": 24454,
"s": 24426,
"text": "\n23 May, 2018"
},
{
"code": null,
"e": 24660,
"s": 24454,
"text": "JCheckBox is a part of Java Swing package . JCheckBox can be selected or deselected . It displays it state to the user . JCheckBox is an implementation to checkbox... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.