title stringlengths 3 221 | text stringlengths 17 477k | parsed listlengths 0 3.17k |
|---|---|---|
How to Install Selenium WebDriver on MacOS? | 21 Sep, 2021
In this article, we will learn how to install Selenium WebDriver in Python on macOS. Selenium WebDriver is a web framework that permits you to execute cross-browser tests. This tool is used for automating web-based application testing to verify that it performs expectedly.
Follow the below steps to install... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n21 Sep, 2021"
},
{
"code": null,
"e": 326,
"s": 52,
"text": "In this article, we will learn how to install Selenium WebDriver in Python on macOS. Selenium WebDriver is a web framework that permits you to execute cross-browser tests. Th... |
PHP | gmdate() Function | 05 Jul, 2018
The gmdate() is an inbuilt function in PHP which is used to format a GMT/UTC date and time and return the formatted date strings. It is similar to the date() function but it returns the time in Greenwich Mean Time (GMT).
Syntax:
string gmdate ( $format, $timestamp )
Parameters: The gmdate() function accept... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n05 Jul, 2018"
},
{
"code": null,
"e": 249,
"s": 28,
"text": "The gmdate() is an inbuilt function in PHP which is used to format a GMT/UTC date and time and return the formatted date strings. It is similar to the date() function but it r... |
Reverse substrings between each pair of parenthesis | 10 Mar, 2022
Given a string str that consists of lower case English letters and brackets. The task is to reverse the substrings in each pair of matching parentheses, starting from the innermost one. The result should not contain any brackets.
Examples:
Input: str = “(skeeg(for)skeeg)” Output: geeksforgeeks
Input: str... | [
{
"code": null,
"e": 54,
"s": 26,
"text": "\n10 Mar, 2022"
},
{
"code": null,
"e": 284,
"s": 54,
"text": "Given a string str that consists of lower case English letters and brackets. The task is to reverse the substrings in each pair of matching parentheses, starting from the inn... |
Python | Pandas Series.str.encode() | 27 Mar, 2019
Series.str can be used to access the values of the series as strings and apply several methods to it. Pandas Series.str.encode() function is used to encode character string in the Series/Index using indicated encoding. Equivalent to str.encode().
Syntax: Series.str.encode(encoding, errors=’strict’)
Paramet... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n27 Mar, 2019"
},
{
"code": null,
"e": 299,
"s": 52,
"text": "Series.str can be used to access the values of the series as strings and apply several methods to it. Pandas Series.str.encode() function is used to encode character string i... |
What are reserved keywords in C#? | Keywords are reserved words predefined to the C# compiler. These keywords cannot be used as identifiers. If you want to use these keywords as identifiers, you may prefix the keyword with the @ character.
In C#, some identifiers have special meaning in the context of code, such as get and set are called contextual keywo... | [
{
"code": null,
"e": 1391,
"s": 1187,
"text": "Keywords are reserved words predefined to the C# compiler. These keywords cannot be used as identifiers. If you want to use these keywords as identifiers, you may prefix the keyword with the @ character."
},
{
"code": null,
"e": 1512,
"s... |
Python | Check if any element occurs n times in given list | 08 Sep, 2020
Given a list, the task is to find whether any element occurs ‘n’ times in given list of integers. It will basically check for the first element that occurs n number of times. Examples:
Input: l = [1, 2, 3, 4, 0, 4, 3, 2, 1, 2], n = 3
Output : 2
Input: l = [1, 2, 3, 4, 0, 4, 3, 2, 1, 2, 1, 1], n = 4
O... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n08 Sep, 2020"
},
{
"code": null,
"e": 215,
"s": 28,
"text": "Given a list, the task is to find whether any element occurs ‘n’ times in given list of integers. It will basically check for the first element that occurs n number of times. ... |
How to scrape multiple pages using Selenium in Python? | 03 Mar, 2021
As we know, selenium is a web-based automation tool that helps us to automate browsers. Selenium is an Open-Source testing tool which means we can easily download it from the internet and use it. With the help of Selenium, we can also scrap the data from the webpages. Here, In this article, we are going to... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n03 Mar, 2021"
},
{
"code": null,
"e": 413,
"s": 52,
"text": "As we know, selenium is a web-based automation tool that helps us to automate browsers. Selenium is an Open-Source testing tool which means we can easily download it from the... |
How to submit a form on Enter button using jQuery ? | 18 Aug, 2020
Given an HTML form and the task is to submit the form after clicking the ‘Enter’ button using jQuery. To submit the form using ‘Enter’ button, we will use jQuery keypress() method and to check the ‘Enter’ button is pressed or not, we will use ‘Enter’ button key code value.
<!DOCTYPE html><html lang="en"> ... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n18 Aug, 2020"
},
{
"code": null,
"e": 302,
"s": 28,
"text": "Given an HTML form and the task is to submit the form after clicking the ‘Enter’ button using jQuery. To submit the form using ‘Enter’ button, we will use jQuery keypress() me... |
Plot Multiple Columns of Pandas Dataframe on Bar Chart with Matplotlib | 24 Jan, 2021
Prerequisites:
Pandas
Matplotlib
In this article, we will learn how to plot multiple columns on bar chart using Matplotlib. Bar Plot is used to represent categories of data using rectangular bars. We can plot these bars with overlapping edges or on same axes. Different ways of plotting bar graph in the sa... | [
{
"code": null,
"e": 54,
"s": 26,
"text": "\n24 Jan, 2021"
},
{
"code": null,
"e": 70,
"s": 54,
"text": "Prerequisites: "
},
{
"code": null,
"e": 77,
"s": 70,
"text": "Pandas"
},
{
"code": null,
"e": 88,
"s": 77,
"text": "Matplotlib"
},
... |
Python – Itertools.chain() | 25 Aug, 2021
The itertools is a module in Python having a collection of functions that are used for handling iterators. They make iterating through the iterables like lists and strings very easily. One such itertools function is chain().Note: For more information, refer to Python Itertools
It is a function that takes ... | [
{
"code": null,
"e": 53,
"s": 25,
"text": "\n25 Aug, 2021"
},
{
"code": null,
"e": 332,
"s": 53,
"text": "The itertools is a module in Python having a collection of functions that are used for handling iterators. They make iterating through the iterables like lists and strings ve... |
Python – datetime.tzinfo() | 27 Feb, 2020
The DateTime class provides various functions to manipulate the date and time intervals. The DateTime object which you use in datetime.now() is actually the object of the DateTime class. These objects help us use the functions on dates and times.
Note: For more information, refer to Python datetime module ... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n27 Feb, 2020"
},
{
"code": null,
"e": 299,
"s": 52,
"text": "The DateTime class provides various functions to manipulate the date and time intervals. The DateTime object which you use in datetime.now() is actually the object of the Dat... |
Select Only Numeric Columns from DataFrame in R | 23 Sep, 2021
In this article, we will discuss how to select only numeric columns from dataframe in R Programming Language.
We can use select_if() function to get numeric columns by calling the function with the dataframe name and isnumeric() function that will check for numeric columns.
Syntax:
select_if(dataframe, is.... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n23 Sep, 2021"
},
{
"code": null,
"e": 138,
"s": 28,
"text": "In this article, we will discuss how to select only numeric columns from dataframe in R Programming Language."
},
{
"code": null,
"e": 303,
"s": 138,
"text... |
Python | Pandas dataframe.mask() | 19 Nov, 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.
Pandas dataframe.mask() function return an object of same shape as self and whose correspondi... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n19 Nov, 2018"
},
{
"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... |
Hadoop – File Permission and ACL(Access Control List) | 10 Jul, 2020
In general, a Hadoop cluster performs security on many layers. The level of protection depends upon the organization’s requirements. In this article, we are going to Learn about Hadoop’s first level of security. It contains mainly two components. Both of these features are part of the default installation.... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n10 Jul, 2020"
},
{
"code": null,
"e": 336,
"s": 28,
"text": "In general, a Hadoop cluster performs security on many layers. The level of protection depends upon the organization’s requirements. In this article, we are going to Learn abo... |
Calculate the Average, Variance and Standard Deviation in R Programming | 16 Dec, 2021
R Programming Language is an open-source programming language that is widely used as a statistical software and data analysis tool. R generally comes with the Command-line interface. R is available across widely used platforms like Windows, Linux, and macOS. R language provides very easy methods to calcula... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n16 Dec, 2021"
},
{
"code": null,
"e": 385,
"s": 28,
"text": "R Programming Language is an open-source programming language that is widely used as a statistical software and data analysis tool. R generally comes with the Command-line int... |
Sum of series (n/1) + (n/2) + (n/3) + (n/4) +.......+ (n/n) | 20 Apr, 2021
Given a value n, find the sum of series, (n/1) + (n/2) + (n/3) + (n/4) +.......+(n/n) where the value of n can be up to 10^12. Note: Consider only integer division.Examples:
Input : n = 5
Output : (5/1) + (5/2) + (5/3) +
(5/4) + (5/5) = 5 + 2 + 1 + 1 + 1
= 10
Input : 7
Ou... | [
{
"code": null,
"e": 54,
"s": 26,
"text": "\n20 Apr, 2021"
},
{
"code": null,
"e": 230,
"s": 54,
"text": "Given a value n, find the sum of series, (n/1) + (n/2) + (n/3) + (n/4) +.......+(n/n) where the value of n can be up to 10^12. Note: Consider only integer division.Examples: ... |
Opening Modes in Standard I/O in C/C++ with Examples | 26 Nov, 2021
Pre-requisites: File Handling in C++
So far the operations using the C program are done on a prompt/terminal that is not stored anywhere. But in the software industry, most of the programs are written to store the information fetched from the program. One such way is to store the fetched information in a f... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n26 Nov, 2021"
},
{
"code": null,
"e": 89,
"s": 52,
"text": "Pre-requisites: File Handling in C++"
},
{
"code": null,
"e": 424,
"s": 89,
"text": "So far the operations using the C program are done on a prompt/termina... |
Creating a Simple Chat with netcat in Linux | 02 Feb, 2021
Firstly, We should know that what is netcat, which is also known as TCP/IP swiss army knife a feature-rich network utility. netcat can do port scanning, transfer files, create a listener, or stream media, and many more. The netcat utility program supports a wide range of commands to manage networks and mon... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n02 Feb, 2021"
},
{
"code": null,
"e": 382,
"s": 28,
"text": "Firstly, We should know that what is netcat, which is also known as TCP/IP swiss army knife a feature-rich network utility. netcat can do port scanning, transfer files, create... |
Excel VBA | Average() Functions | 03 Jul, 2018
VBA (Visual Basic for Applications) is the programming language of Excel and other offices. It is an event-driven programming language from Microsoft.
With Excel VBA, one can automate many tasks in excel and all other office softwares. It helps in generating reports, preparing various charts, graphs and mo... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n03 Jul, 2018"
},
{
"code": null,
"e": 179,
"s": 28,
"text": "VBA (Visual Basic for Applications) is the programming language of Excel and other offices. It is an event-driven programming language from Microsoft."
},
{
"code": nu... |
Unix Socket - Structures | Various structures are used in Unix Socket Programming to hold information about the address and port, and other information. Most socket functions require a pointer to a socket address structure as an argument. Structures defined in this chapter are related to Internet Protocol Family.
The first structure is sockaddr ... | [
{
"code": null,
"e": 2425,
"s": 2137,
"text": "Various structures are used in Unix Socket Programming to hold information about the address and port, and other information. Most socket functions require a pointer to a socket address structure as an argument. Structures defined in this chapter are re... |
PHP | strrev() Function | 11 Aug, 2021
Reversing a string is one of the most basic string operations and is used very frequently by developers and programmers. PHP comes with a built-in function to reverse strings.
The strrev() function is a built-in function in PHP and is used to reverse a string. This function does not make any change in the ... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n11 Aug, 2021"
},
{
"code": null,
"e": 204,
"s": 28,
"text": "Reversing a string is one of the most basic string operations and is used very frequently by developers and programmers. PHP comes with a built-in function to reverse strings.... |
Draw Boxplot with Mean in R | 29 Jun, 2021
In this article, we will discuss how to draw a boxplot with the mean in the R programming language.
In this approach for drawing the boxplot with a mean value of the data on it, the user needs to call the boxplot() function with the required parameters for drawing the simple boxplot of the given data, and ... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n29 Jun, 2021"
},
{
"code": null,
"e": 128,
"s": 28,
"text": "In this article, we will discuss how to draw a boxplot with the mean in the R programming language."
},
{
"code": null,
"e": 617,
"s": 128,
"text": "In thi... |
Python Program for Cutting a Rod | DP-13 | 17 Jan, 2022
Given a rod of length n inches and an array of prices that contains prices of all pieces of size smaller than n. Determine the maximum value obtainable by cutting up the rod and selling the pieces. For example, if length of the rod is 8 and the values of different pieces are given as following, then the ma... | [
{
"code": null,
"e": 54,
"s": 26,
"text": "\n17 Jan, 2022"
},
{
"code": null,
"e": 437,
"s": 54,
"text": "Given a rod of length n inches and an array of prices that contains prices of all pieces of size smaller than n. Determine the maximum value obtainable by cutting up the rod ... |
How to use SearchView in the Toolbar in Kotlin? | This example demonstrates how to use SearchView in the Toolbar in Kotlin.
Step 1 − Create a new project in Android Studio, go to File ⇉ New Project and fill all required details to create a new project.
Step 2 − Add the following code to res/layout/activity_main.xml.
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayo... | [
{
"code": null,
"e": 1136,
"s": 1062,
"text": "This example demonstrates how to use SearchView in the Toolbar in Kotlin."
},
{
"code": null,
"e": 1265,
"s": 1136,
"text": "Step 1 − Create a new project in Android Studio, go to File ⇉ New Project and fill all required details to c... |
Tryit Editor v3.7 - Show Java | static void Main(string[] args)
{
string firstName = "John ";
string lastName = "Doe";
string name = string.Concat(firstName, lastName); | [] |
How to change the color of points in a scatterplot using ggplot2 in R? | To color the points in a scatterplot using ggplot2, we can use colour argument inside geom_point with aes. The color can be passed in multiple ways, one such way is to name the particular color and the other way is to giving a range or using a variable. If range or a variable will be used then the color of the points w... | [
{
"code": null,
"e": 1410,
"s": 1062,
"text": "To color the points in a scatterplot using ggplot2, we can use colour argument inside geom_point with aes. The color can be passed in multiple ways, one such way is to name the particular color and the other way is to giving a range or using a variable.... |
How to get a list of all the keys from a Python dictionary? | To get a list of all keys from a dictionary, you can simply use the dict.keys() function.
my_dict = {'name': 'TutorialsPoint', 'time': '15 years', 'location': 'India'}
key_list = list(my_dict.keys())
print(key_list)
This will give the output −
['name', 'time', 'location']
You can also get a list of all keys in a dicti... | [
{
"code": null,
"e": 1153,
"s": 1062,
"text": "To get a list of all keys from a dictionary, you can simply use the dict.keys() function. "
},
{
"code": null,
"e": 1279,
"s": 1153,
"text": "my_dict = {'name': 'TutorialsPoint', 'time': '15 years', 'location': 'India'}\nkey_list = l... |
Byte Class in Java | The Byte class wraps a value of primitive type byte in an object. An object of type Byte contains a single field whose type is byte.
Following are some of the methods of the Byte class −
Let us now see an example−
Live Demo
import java.lang.*;
public class Demo {
public static void main(String[] args){
Byte b... | [
{
"code": null,
"e": 1195,
"s": 1062,
"text": "The Byte class wraps a value of primitive type byte in an object. An object of type Byte contains a single field whose type is byte."
},
{
"code": null,
"e": 1249,
"s": 1195,
"text": "Following are some of the methods of the Byte cla... |
Material - Action Icons | This chapter explains the usage of Google's (Material) Action Icons. Assume that custom is the CSS class name where we defined the size and color, as shown in the example given below.
<!DOCTYPE html>
<html>
<head>
<link href = "https://fonts.googleapis.com/icon?family=Material+Icons" rel = "stylesheet">
... | [
{
"code": null,
"e": 2750,
"s": 2566,
"text": "This chapter explains the usage of Google's (Material) Action Icons. Assume that custom is the CSS class name where we defined the size and color, as shown in the example given below."
},
{
"code": null,
"e": 3068,
"s": 2750,
"text":... |
Sum of an Infinite Geometric Progression ( GP ) - GeeksforGeeks | 07 May, 2021
Given two integers A and R, representing the first term and the common ratio of a geometric sequence, the task is to find the sum of the infinite geometric series formed by the given first term and the common ratio.
Examples:
Input: A = 1, R = 0.5Output: 2
Input: A = 1, R = -0.25Output: 0.8
Approach: The ... | [
{
"code": null,
"e": 24686,
"s": 24655,
"text": " \n07 May, 2021\n"
},
{
"code": null,
"e": 24902,
"s": 24686,
"text": "Given two integers A and R, representing the first term and the common ratio of a geometric sequence, the task is to find the sum of the infinite geometric seri... |
Create Your Resume with Pagedown Package in R | by Abhinav Malasi | Towards Data Science | In the past, I always dreamt of making my resume using LaTeX, but the learning curve to achieve that polished looked never materialized. So, I always ended up making my resume using word documents and silently endured the alignment struggles that entailed.
Recently, I was going through the same cycle of updating my res... | [
{
"code": null,
"e": 428,
"s": 171,
"text": "In the past, I always dreamt of making my resume using LaTeX, but the learning curve to achieve that polished looked never materialized. So, I always ended up making my resume using word documents and silently endured the alignment struggles that entailed... |
Kotlin Break and Continue | The break statement is used to jump out of a
loop.
This example jumps out of the loop when i is equal to 4:
var i = 0
while (i < 10) {
println(i)
i++
if (i == 4) {
break
}
}
The continue statement breaks one iteration (in the loop), if a specified condition occurs, and continues with the next iteration in ... | [
{
"code": null,
"e": 52,
"s": 0,
"text": "The break statement is used to jump out of a \nloop."
},
{
"code": null,
"e": 109,
"s": 52,
"text": "This example jumps out of the loop when i is equal to 4:"
},
{
"code": null,
"e": 187,
"s": 109,
"text": "var i = 0\n... |
BFS for Disconnected Graph in C++ | Disconnected graph is a Graph in which one or more nodes are not the endpoints of the graph i.e. they are not connected.
A disconnected graph...
Now, the Simple BFS is applicable only when the graph is connected i.e. all vertices of the graph are accessible from one node of the graph. in the above disconnected graph te... | [
{
"code": null,
"e": 1183,
"s": 1062,
"text": "Disconnected graph is a Graph in which one or more nodes are not the endpoints of the graph i.e. they are not connected."
},
{
"code": null,
"e": 1207,
"s": 1183,
"text": "A disconnected graph..."
},
{
"code": null,
"e": ... |
Count the number of contiguous increasing and decreasing subsequences in a sequence - GeeksforGeeks | 13 May, 2021
For a given distinct integer sequence of size N, the task is to count the number of contiguous increasing subsequence and contiguous decreasing subsequence in this sequence.Examples:
Input: arr[] = { 80, 50, 60, 70, 40 } Output: 1 2 Explanation: The only one increasing subsequence is (50, 60, 70) and two... | [
{
"code": null,
"e": 26563,
"s": 26535,
"text": "\n13 May, 2021"
},
{
"code": null,
"e": 26748,
"s": 26563,
"text": "For a given distinct integer sequence of size N, the task is to count the number of contiguous increasing subsequence and contiguous decreasing subsequence in this... |
HBase - Create Data | This chapter demonstrates how to create data in an HBase table. To create data in an HBase table, the following commands and methods are used:
put command,
put command,
add() method of Put class, and
add() method of Put class, and
put() method of HTable class.
put() method of HTable class.
As an example, we are going t... | [
{
"code": null,
"e": 2180,
"s": 2037,
"text": "This chapter demonstrates how to create data in an HBase table. To create data in an HBase table, the following commands and methods are used:"
},
{
"code": null,
"e": 2193,
"s": 2180,
"text": "put command,"
},
{
"code": null... |
How to write "Hello World" in C#? | To print “Hello World” in C#, use the Console.WriteLine.
Let us see a basic C# program to display a text −
Live Demo
using System;
using System.Collections.Generic;
using System.Text;
namespace Program {
class MyApplication {
static void Main(string[] args) {
Console.WriteLine("Hello World");
... | [
{
"code": null,
"e": 1119,
"s": 1062,
"text": "To print “Hello World” in C#, use the Console.WriteLine."
},
{
"code": null,
"e": 1169,
"s": 1119,
"text": "Let us see a basic C# program to display a text −"
},
{
"code": null,
"e": 1180,
"s": 1169,
"text": " Liv... |
Check if a destination is reachable from source with two movements allowed - GeeksforGeeks | 22 Oct, 2021
Given coordinates of a source point (x1, y1) determine if it is possible to reach the destination point (x2, y2). From any point (x, y) there only two types of valid movements: (x, x + y) and (x + y, y). Return a boolean true if it is possible else return false. Note: All coordinates are positive. Asked in... | [
{
"code": null,
"e": 25710,
"s": 25682,
"text": "\n22 Oct, 2021"
},
{
"code": null,
"e": 26047,
"s": 25710,
"text": "Given coordinates of a source point (x1, y1) determine if it is possible to reach the destination point (x2, y2). From any point (x, y) there only two types of val... |
Creating Custom Aggregations to Use with Pandas groupby | by Rose Day | Towards Data Science | Pandas groupby is a function you can utilize on dataframes to split the object, apply a function, and combine the results. This function is useful when you want to group large amounts of data and compute different operations for each group. If you are using an aggregation function with your groupby, this aggregation wi... | [
{
"code": null,
"e": 634,
"s": 171,
"text": "Pandas groupby is a function you can utilize on dataframes to split the object, apply a function, and combine the results. This function is useful when you want to group large amounts of data and compute different operations for each group. If you are usi... |
HTML <input type=”radio”> | 15 Dec, 2021
The HTML <input type=”radio”> is used to define a Radio Button. Radio Buttons are used to let the user select exactly one option from a list of predefined options. Radio Button input controls are created by using the “input” element with a type attribute having value as “radio”.
Syntax:
<input type="radio"... | [
{
"code": null,
"e": 53,
"s": 25,
"text": "\n15 Dec, 2021"
},
{
"code": null,
"e": 333,
"s": 53,
"text": "The HTML <input type=”radio”> is used to define a Radio Button. Radio Buttons are used to let the user select exactly one option from a list of predefined options. Radio Butt... |
QuickSort on Singly Linked List | 24 Jun, 2022
QuickSort on Doubly Linked List is discussed here. QuickSort on Singly linked list was given as an exercise. Following is C++ implementation for same. The important things about implementation are, it changes pointers rather swapping data and time complexity is same as the implementation for Doubly Linked ... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n24 Jun, 2022"
},
{
"code": null,
"e": 366,
"s": 52,
"text": "QuickSort on Doubly Linked List is discussed here. QuickSort on Singly linked list was given as an exercise. Following is C++ implementation for same. The important things ab... |
Beautifulsoup – Kinds of objects | 01 Jun, 2021
Prerequisites: BeautifulSoup
In this article, we will discuss different types of objects in Beautifullsoup. When the string or HTML document is given in the constructor of BeautifulSoup, this constructor converts this document to different python objects.
The four major and important objects are :
Beauti... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n01 Jun, 2021"
},
{
"code": null,
"e": 57,
"s": 28,
"text": "Prerequisites: BeautifulSoup"
},
{
"code": null,
"e": 285,
"s": 57,
"text": "In this article, we will discuss different types of objects in Beautifullsoup. ... |
MySQL query to convert a single digit number to two-digit | For this, you can use LPAD() and pad a value on the left.
Let us first create a table −
mysql> create table DemoTable767 (Value varchar(100));
Query OK, 0 rows affected (1.40 sec)
Insert some records in the table using insert command −
mysql> insert into DemoTable767 values('4');
Query OK, 1 row affected (0.15 sec)
mys... | [
{
"code": null,
"e": 1245,
"s": 1187,
"text": "For this, you can use LPAD() and pad a value on the left."
},
{
"code": null,
"e": 1275,
"s": 1245,
"text": "Let us first create a table −"
},
{
"code": null,
"e": 1367,
"s": 1275,
"text": "mysql> create table Dem... |
PyQt5 – How to add image in window ? | 03 Aug, 2021
In this article, we will see how to add image to a window. The basic idea of doing this is first of all loading the image using QPixmap and adding the loaded image to the Label then resizing the label according to the dimensions of the image, although the resizing part is optional.
In order to use Qpixmap ... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n03 Aug, 2021"
},
{
"code": null,
"e": 311,
"s": 28,
"text": "In this article, we will see how to add image to a window. The basic idea of doing this is first of all loading the image using QPixmap and adding the loaded image to the Labe... |
Limitation of Distributed System | 31 Jan, 2020
Distributed System is a collection of self-governing computer systems efficient of transmission and cooperation among each other by the means of interconnections between their hardware and software. It is a collection of loosely coupled processor that appears to its users a single systematic system. Distri... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n31 Jan, 2020"
},
{
"code": null,
"e": 582,
"s": 52,
"text": "Distributed System is a collection of self-governing computer systems efficient of transmission and cooperation among each other by the means of interconnections between thei... |
GUI to Shutdown, Restart and Logout from the PC using Python | 21 Oct, 2021
In this article, we are going to write a python script to shut down or Restart or Logout your system and bind it with GUI Application.
The OS module in Python provides functions for interacting with the operating system. OS is an inbuilt library python.
Syntax :
For shutdown your system : os.system(“shutd... | [
{
"code": null,
"e": 54,
"s": 26,
"text": "\n21 Oct, 2021"
},
{
"code": null,
"e": 190,
"s": 54,
"text": "In this article, we are going to write a python script to shut down or Restart or Logout your system and bind it with GUI Application. "
},
{
"code": null,
"e": 3... |
SQL - CHECK Constraint | The CHECK Constraint enables a condition to check the value being entered into a record. If the condition evaluates to false, the record violates the constraint and isn't entered the table.
For example, the following program creates a new table called CUSTOMERS and adds five columns. Here, we add a CHECK with AGE colum... | [
{
"code": null,
"e": 2777,
"s": 2587,
"text": "The CHECK Constraint enables a condition to check the value being entered into a record. If the condition evaluates to false, the record violates the constraint and isn't entered the table."
},
{
"code": null,
"e": 2970,
"s": 2777,
"... |
How to Group Pandas DataFrame By Date and Time ? | 08 May, 2021
In this article, we will discuss how to group by a dataframe on the basis of date and time in Pandas. We will see the way to group a timeseries dataframe by Year, Month, days, etc. Additionally, we’ll also see the way to groupby time objects like minutes.
Pandas GroupBy allows us to specify a groupby instr... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n08 May, 2021"
},
{
"code": null,
"e": 284,
"s": 28,
"text": "In this article, we will discuss how to group by a dataframe on the basis of date and time in Pandas. We will see the way to group a timeseries dataframe by Year, Month, days,... |
Python | time.clock_gettime_ns() method | 17 Sep, 2019
Time module in Python provides various time-related functions. This module comes under Python’s standard utility modules.
time.clock_gettime_ns() method of Time module is used to get the time (in nanoseconds) of the specified clock clk_id. Basically, clk_id is a integer value which represents the id of the... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n17 Sep, 2019"
},
{
"code": null,
"e": 150,
"s": 28,
"text": "Time module in Python provides various time-related functions. This module comes under Python’s standard utility modules."
},
{
"code": null,
"e": 343,
"s": 15... |
Intersection of two Sorted Linked Lists | 01 Jul, 2022
Given two lists sorted in increasing order, create and return a new list representing the intersection of the two lists. The new list should be made with its own memory — the original lists should not be changed.
Example:
Input:
First linked list: 1->2->3->4->6
Second linked list be 2->4->6->8,
Output:... | [
{
"code": null,
"e": 54,
"s": 26,
"text": "\n01 Jul, 2022"
},
{
"code": null,
"e": 268,
"s": 54,
"text": "Given two lists sorted in increasing order, create and return a new list representing the intersection of the two lists. The new list should be made with its own memory — the... |
Count of distinct XORs formed by rearranging two Binary strings | 06 Jun, 2022
Given two binary strings A and B of equal length N, the task is to find the number of distinct XORs possible by arbitrarily reordering the two binary strings. Since the number can be large enough, find the number modulo 109 + 7
Examples:
Input: A = “00”, B = “01” Output: 2 Explanation: There are two possi... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n06 Jun, 2022"
},
{
"code": null,
"e": 280,
"s": 52,
"text": "Given two binary strings A and B of equal length N, the task is to find the number of distinct XORs possible by arbitrarily reordering the two binary strings. Since the numbe... |
Java - The Collection Interface | The Collection interface is the foundation upon which the collections framework is built. It declares the core methods that all collections will have. These methods are summarized in the following table.
Because all collections implement Collection, familiarity with its methods is necessary for a clear understanding of... | [
{
"code": null,
"e": 2715,
"s": 2511,
"text": "The Collection interface is the foundation upon which the collections framework is built. It declares the core methods that all collections will have. These methods are summarized in the following table."
},
{
"code": null,
"e": 2916,
"s... |
How to Create a Table With Multiple Foreign Keys in SQL? | 26 Sep, 2021
When a non-prime attribute column in one table references the primary key and has the same column as the column of the table which is prime attribute is called a foreign key. It lays the relation between the two tables which majorly helps in the normalization of the tables. A table can have multiple foreig... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n26 Sep, 2021"
},
{
"code": null,
"e": 368,
"s": 28,
"text": "When a non-prime attribute column in one table references the primary key and has the same column as the column of the table which is prime attribute is called a foreign key. ... |
Matplotlib.figure.Figure.add_gridspec() in Python | 30 Apr, 2020
Matplotlib is a library in Python and it is numerical – mathematical extension for NumPy library. The figure module provides the top-level Artist, the Figure, which contains all the plot elements. This module is used to control the default spacing of the subplots and top level container for all plot elemen... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n30 Apr, 2020"
},
{
"code": null,
"e": 339,
"s": 28,
"text": "Matplotlib is a library in Python and it is numerical – mathematical extension for NumPy library. The figure module provides the top-level Artist, the Figure, which contains a... |
Python | Adding markers to volcano locations using folium package | 10 Sep, 2021
Python is a multipurpose language and its utilities extend to more than just normal programming. It can be used to develop games, crawl the internet, or develop deep learning models. We’ll be using the Python library named folium (with Pandas) along with the Volcanoes_USA dataset (which contains the necess... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n10 Sep, 2021"
},
{
"code": null,
"e": 588,
"s": 52,
"text": "Python is a multipurpose language and its utilities extend to more than just normal programming. It can be used to develop games, crawl the internet, or develop deep learning... |
Accessing Values of Tuples in Python | To access values in tuple, use the square brackets for slicing along with the index or indices to obtain value available at that index.
Live Demo
#!/usr/bin/python
tup1 = ('physics', 'chemistry', 1997, 2000);
tup2 = (1, 2, 3, 4, 5, 6, 7 );
print "tup1[0]: ", tup1[0];
print "tup2[1:5]: ", tup2[1:5];
When the above code... | [
{
"code": null,
"e": 1198,
"s": 1062,
"text": "To access values in tuple, use the square brackets for slicing along with the index or indices to obtain value available at that index."
},
{
"code": null,
"e": 1209,
"s": 1198,
"text": " Live Demo"
},
{
"code": null,
"e"... |
ClassLoader in Java - GeeksforGeeks | 07 Sep, 2020
The Java ClassLoader is a part of the Java Runtime Environment that dynamically loads Java classes into the Java Virtual Machine. The Java run time system does not need to know about files and file systems because of classloaders.
Java classes aren’t loaded into memory all at once, but when required by an ... | [
{
"code": null,
"e": 23875,
"s": 23847,
"text": "\n07 Sep, 2020"
},
{
"code": null,
"e": 24106,
"s": 23875,
"text": "The Java ClassLoader is a part of the Java Runtime Environment that dynamically loads Java classes into the Java Virtual Machine. The Java run time system does not... |
Java Program to Return the Largest Element in a List - GeeksforGeeks | 04 Jan, 2021
Given a List, find the largest element in it. There are multiple approaches to tackle this problem like iterating through the List or using various inbuilt functions.
Input : List = [5, 3, 234, 114, 154]
Output : 234
Input : List = {10, 20, 4}
Output : 20
Approach 1: Using ForEach Loop
Create List objec... | [
{
"code": null,
"e": 23557,
"s": 23529,
"text": "\n04 Jan, 2021"
},
{
"code": null,
"e": 23724,
"s": 23557,
"text": "Given a List, find the largest element in it. There are multiple approaches to tackle this problem like iterating through the List or using various inbuilt functio... |
Data Science For Cycling — How To Read GPX Strava Routes With Python | by Dario Radečić | Towards Data Science | I love cycling, and I love using Strava to keep track of my training activities. As a data nerd, I’m a bit disappointed with their workout analysis. Sure, you can analyze speed, power, cadence, heart rate, and whatnot — depending on the sensors you have available — but what I really miss is a deep gradient analysis.
No... | [
{
"code": null,
"e": 489,
"s": 171,
"text": "I love cycling, and I love using Strava to keep track of my training activities. As a data nerd, I’m a bit disappointed with their workout analysis. Sure, you can analyze speed, power, cadence, heart rate, and whatnot — depending on the sensors you have a... |
Insertion sort using C++ STL | In this tutorial, we will be discussing a program to understand the insertion sort using C++ STL.
In this we use std::upper_bound to find the element at the wrong position, then rotate the unsorted part of the array to make it sorted.
Live Demo
#include <bits/stdc++.h>
//function to perform insertion sort
void inserti... | [
{
"code": null,
"e": 1160,
"s": 1062,
"text": "In this tutorial, we will be discussing a program to understand the insertion sort using C++ STL."
},
{
"code": null,
"e": 1297,
"s": 1160,
"text": "In this we use std::upper_bound to find the element at the wrong position, then rota... |
Count minimum number of fountains to be activated to cover the entire garden - GeeksforGeeks | 26 Aug, 2021
There is a one-dimensional garden of length N. In each position of the N length garden, a fountain has been installed. Given an array a[]such that a[i] describes the coverage limit of ith fountain. A fountain can cover the range from the position max(i – a[i], 1) to min(i + a[i], N). In beginning, all the ... | [
{
"code": null,
"e": 25379,
"s": 25351,
"text": "\n26 Aug, 2021"
},
{
"code": null,
"e": 25850,
"s": 25379,
"text": "There is a one-dimensional garden of length N. In each position of the N length garden, a fountain has been installed. Given an array a[]such that a[i] describes t... |
How to set a cookie to a specific domain in selenium webdriver with Python? | We can set a cookie to a specific domain in Selenium webdriver with Python. A cookie is used to hold information sent by the browser. A key−value pair format is utilized and it is like a message provided to the browser by the server.
For cookie addition, the method add_cookie is used. The key and value are passed as pa... | [
{
"code": null,
"e": 1296,
"s": 1062,
"text": "We can set a cookie to a specific domain in Selenium webdriver with Python. A cookie is used to hold information sent by the browser. A key−value pair format is utilized and it is like a message provided to the browser by the server."
},
{
"code... |
Scala | Trait Mixins - GeeksforGeeks | 15 Apr, 2019
We can extend several number of scala traits with a class or an abstract class that is known to be trait Mixins. It is worth knowing that only traits or blend of traits and class or blend of traits and abstract class can be extended by us. It is even compulsory here to maintain the sequence of trait Mixins... | [
{
"code": null,
"e": 26063,
"s": 26035,
"text": "\n15 Apr, 2019"
},
{
"code": null,
"e": 26418,
"s": 26063,
"text": "We can extend several number of scala traits with a class or an abstract class that is known to be trait Mixins. It is worth knowing that only traits or blend of t... |
List isEmpty() method in Java with Examples - GeeksforGeeks | 23 Aug, 2020
The isEmpty() method of List interface in java is used to check if a list is empty or not. It returns true if the list contains no elements otherwise it returns false if the list contains any element.
Syntax:
boolean isEmpty()
Parameter: It does not accepts any parameter.
Returns: It returns True if the li... | [
{
"code": null,
"e": 26277,
"s": 26249,
"text": "\n23 Aug, 2020"
},
{
"code": null,
"e": 26478,
"s": 26277,
"text": "The isEmpty() method of List interface in java is used to check if a list is empty or not. It returns true if the list contains no elements otherwise it returns fa... |
Pure CSS Disabled Inputs - GeeksforGeeks | 28 Feb, 2022
In this article, we will see how to disable the input field in Pure CSS. In some cases, when we ask someone to fill a form few things are activated as well a few things are disabled for their previous choices. In that case, we can use HTML disabled in Pure CSS as well. This attribute works with other types... | [
{
"code": null,
"e": 26647,
"s": 26619,
"text": "\n28 Feb, 2022"
},
{
"code": null,
"e": 27071,
"s": 26647,
"text": "In this article, we will see how to disable the input field in Pure CSS. In some cases, when we ask someone to fill a form few things are activated as well a few t... |
Pair Class in Java - GeeksforGeeks | 28 Jun, 2021
In C++, we have std::pair in the utility library which is of immense use if we want to keep a pair of values together. We were looking for an equivalent class for pair in Java but Pair class did not come into existence till Java 7. JavaFX 2.2 has the javafx.util.Pair class which can be used to store a pair... | [
{
"code": null,
"e": 25677,
"s": 25649,
"text": "\n28 Jun, 2021"
},
{
"code": null,
"e": 26244,
"s": 25677,
"text": "In C++, we have std::pair in the utility library which is of immense use if we want to keep a pair of values together. We were looking for an equivalent class for ... |
Print all distinct permutations of a given string with duplicates - GeeksforGeeks | 18 Apr, 2022
Given a string that may contain duplicates, write a function to print all permutations of given string such that no permutation is repeated in output.Examples:
Input: str[] = "AB"
Output: AB BA
Input: str[] = "AA"
Output: AA
Input: str[] = "ABC"
Output: ABC ACB BAC BCA CBA CAB
Input: str[] = "ABA"
... | [
{
"code": null,
"e": 26299,
"s": 26271,
"text": "\n18 Apr, 2022"
},
{
"code": null,
"e": 26460,
"s": 26299,
"text": "Given a string that may contain duplicates, write a function to print all permutations of given string such that no permutation is repeated in output.Examples: "
... |
How to Set Git Username and Password in GitBash? - GeeksforGeeks | 03 Jan, 2022
Git is an open-source version control system. Git is software that helps to track updates in any folder. It is a DevOps resource used mostly for source code planning. It’s typically used to promote collaboration between coders who are relying on source code together during software development. Speed, the ... | [
{
"code": null,
"e": 25795,
"s": 25767,
"text": "\n03 Jan, 2022"
},
{
"code": null,
"e": 26195,
"s": 25795,
"text": "Git is an open-source version control system. Git is software that helps to track updates in any folder. It is a DevOps resource used mostly for source code planni... |
TypeScript Numbers - GeeksforGeeks | 03 Jun, 2020
TypeScript is like JavaScript which supports numerical values as Number objects. The numbers in typescript are used as both integers as well as floating-point values. The number class acts as wrapper and manipulates the numeric literals as they were objects.
Syntax:
var var_name = new Number(value)
Propert... | [
{
"code": null,
"e": 26545,
"s": 26517,
"text": "\n03 Jun, 2020"
},
{
"code": null,
"e": 26804,
"s": 26545,
"text": "TypeScript is like JavaScript which supports numerical values as Number objects. The numbers in typescript are used as both integers as well as floating-point valu... |
React Native View Component - GeeksforGeeks | 28 Apr, 2021
In this article, We are going to see how to create a view component in react-native. For this, we are going to use React Native View component. It’s basically a small container that supports layout with flexbox, style, some touch handling, and accessibility controls. View maps directly to the native view e... | [
{
"code": null,
"e": 26169,
"s": 26141,
"text": "\n28 Apr, 2021"
},
{
"code": null,
"e": 26587,
"s": 26169,
"text": "In this article, We are going to see how to create a view component in react-native. For this, we are going to use React Native View component. It’s basically a sm... |
Uninitialized primitive data types in C/C++ - GeeksforGeeks | 10 Feb, 2022
What do you think happens when you use an uninitialized primitive data type? Well you may assume that the compiler should assign your primitive type variable with meaningful values like 0 for int, 0.0 for float. What about char data type?Let’s find the answer to that by running the code in the IDE.
CPP
#i... | [
{
"code": null,
"e": 25479,
"s": 25451,
"text": "\n10 Feb, 2022"
},
{
"code": null,
"e": 25780,
"s": 25479,
"text": "What do you think happens when you use an uninitialized primitive data type? Well you may assume that the compiler should assign your primitive type variable with ... |
How to add float numbers using JavaScript ? - GeeksforGeeks | 11 Dec, 2019
Given two or more numbers and the task is to get the float addition in the desired format with the help of JavaScript. There are two methods to solve this problem which are discussed below:
Approach 1:
Given two or more numbers to sum up the float numbers.
Use parseFloat() and toFixed() method to format th... | [
{
"code": null,
"e": 39215,
"s": 39187,
"text": "\n11 Dec, 2019"
},
{
"code": null,
"e": 39405,
"s": 39215,
"text": "Given two or more numbers and the task is to get the float addition in the desired format with the help of JavaScript. There are two methods to solve this problem ... |
Java.util.ArrayList.addall() method in Java - GeeksforGeeks | 26 Nov, 2018
Below are the addAll() methods of ArrayList in Java:
boolean addAll(Collection c) : This method appends all of the elements in the specified collection to the end of this list, in the order that they are returned by the specified collection’s Iterator. The behavior of this operation is undefined if the spe... | [
{
"code": null,
"e": 25683,
"s": 25655,
"text": "\n26 Nov, 2018"
},
{
"code": null,
"e": 25736,
"s": 25683,
"text": "Below are the addAll() methods of ArrayList in Java:"
},
{
"code": null,
"e": 30618,
"s": 25736,
"text": "boolean addAll(Collection c) : This m... |
Hopcroft–Karp Algorithm for Maximum Matching | Set 1 (Introduction) - GeeksforGeeks | 02 Oct, 2015
A matching in a Bipartite Graph is a set of the edges chosen in such a way that no two edges share an endpoint. A maximum matching is a matching of maximum size (maximum number of edges). In a maximum matching, if any edge is added to it, it is no longer a matching. There can be more than one maximum match... | [
{
"code": null,
"e": 26151,
"s": 26123,
"text": "\n02 Oct, 2015"
},
{
"code": null,
"e": 26491,
"s": 26151,
"text": "A matching in a Bipartite Graph is a set of the edges chosen in such a way that no two edges share an endpoint. A maximum matching is a matching of maximum size (m... |
LocalDate minusMonths() method in Java with Examples - GeeksforGeeks | 24 Jul, 2019
The minusMonths() method of LocalDate class in Java is used to subtract the number of specified months from this LocalDate and return a copy of LocalDate.This method subtracts the months field in the following steps:
subtract the months from the month-of-year field.
Check if the date after subtracting mont... | [
{
"code": null,
"e": 25473,
"s": 25445,
"text": "\n24 Jul, 2019"
},
{
"code": null,
"e": 25690,
"s": 25473,
"text": "The minusMonths() method of LocalDate class in Java is used to subtract the number of specified months from this LocalDate and return a copy of LocalDate.This meth... |
How to Create Pie Chart from Pandas DataFrame? - GeeksforGeeks | 19 Dec, 2021
In this article, we will discuss how to create a Pie chart from Pandas dataframe using Python.
The data in a circular graph is represented by a pie chart, which is a form of a graph. In research, engineering, and business, it is frequently utilized. The segments of the pie depict the data’s relative streng... | [
{
"code": null,
"e": 25555,
"s": 25527,
"text": "\n19 Dec, 2021"
},
{
"code": null,
"e": 25650,
"s": 25555,
"text": "In this article, we will discuss how to create a Pie chart from Pandas dataframe using Python."
},
{
"code": null,
"e": 26309,
"s": 25650,
"tex... |
numpy.ndarray.copy() in Python - GeeksforGeeks | 28 Dec, 2018
numpy.ndarray.copy() returns a copy of the array.
Syntax : numpy.ndarray.copy(order=’C’)
Parameters:order : Controls the memory layout of the copy. ‘C’ means C-order, ‘F’ means F-order, ‘A’ means ‘F’ if a is Fortran contiguous, ‘C’ otherwise. ‘K’ means match the layout of a as closely as possible.
Code #1:... | [
{
"code": null,
"e": 25531,
"s": 25503,
"text": "\n28 Dec, 2018"
},
{
"code": null,
"e": 25581,
"s": 25531,
"text": "numpy.ndarray.copy() returns a copy of the array."
},
{
"code": null,
"e": 25620,
"s": 25581,
"text": "Syntax : numpy.ndarray.copy(order=’C’)"
... |
Count of anagrams of each string in an array present in another array - GeeksforGeeks | 24 May, 2021
Given two arrays arr1[] and arr2[] consisting of strings, the task is to print the count of anagrams of every string in arr2[] that are present in arr1[].
Examples:
Input: arr1[] = [“geeks”, “learn”, “for”, “egeks”, “ealrn”], arr2[] = [“kgees”, “rof”, “nrael”] Output: 2 1 2 Explanation: Anagrams of arr2[0... | [
{
"code": null,
"e": 26065,
"s": 26037,
"text": "\n24 May, 2021"
},
{
"code": null,
"e": 26220,
"s": 26065,
"text": "Given two arrays arr1[] and arr2[] consisting of strings, the task is to print the count of anagrams of every string in arr2[] that are present in arr1[]."
},
... |
SQL Query to Copy, Duplicate or Backup Table - GeeksforGeeks | 15 May, 2021
In relational databases, we often deal with different tables and perform various operations using this different database software like MYSQL, Oracle, PostgreSQL, etc. Sometimes, while performing these operations many of us want to keep a backup table which is beneficial and can be used as a reference or c... | [
{
"code": null,
"e": 25357,
"s": 25329,
"text": "\n15 May, 2021"
},
{
"code": null,
"e": 25790,
"s": 25357,
"text": "In relational databases, we often deal with different tables and perform various operations using this different database software like MYSQL, Oracle, PostgreSQL, ... |
D3.js scaleTime() Function - GeeksforGeeks | 23 Aug, 2020
The d3.scaleTime() function is used to create and return a new time scale which have the particular domain and range. In this function the clamping is disabled by default.
Syntax:
d3.scaleTime([[domain, ]range]);
Parameter: This function accepts two parameters as mentioned above and described below.
Domain... | [
{
"code": null,
"e": 25467,
"s": 25439,
"text": "\n23 Aug, 2020"
},
{
"code": null,
"e": 25639,
"s": 25467,
"text": "The d3.scaleTime() function is used to create and return a new time scale which have the particular domain and range. In this function the clamping is disabled by ... |
Java.lang.Class class in Java | Set 1 - GeeksforGeeks | 28 Jun, 2021
Java provides a class with name Class in java.lang package. Instances of the class Class represent classes and interfaces in a running Java application. The primitive Java types (boolean, byte, char, short, int, long, float, and double), and the keyword void are also represented as Class objects. It has no... | [
{
"code": null,
"e": 25851,
"s": 25823,
"text": "\n28 Jun, 2021"
},
{
"code": null,
"e": 26302,
"s": 25851,
"text": "Java provides a class with name Class in java.lang package. Instances of the class Class represent classes and interfaces in a running Java application. The primit... |
PyQt5 QLabel - Setting blur radius to the blur effect - GeeksforGeeks | 10 May, 2020
In this article we will see how we can set blur radius to the label blur effect, The blur radius (required), if set to 0 the shadow will be sharp, the higher the number, the more blurred it will be. By default the blur radius value is 5.0 we can change it any time.
In order to do this we use setBlurRadius ... | [
{
"code": null,
"e": 26215,
"s": 26187,
"text": "\n10 May, 2020"
},
{
"code": null,
"e": 26481,
"s": 26215,
"text": "In this article we will see how we can set blur radius to the label blur effect, The blur radius (required), if set to 0 the shadow will be sharp, the higher the n... |
Check if elements of an array can be arranged satisfying the given condition - GeeksforGeeks | 09 Jun, 2021
Given an array arr of N (even) integer elements. The task is to check if it is possible to reorder the elements of the array such that:
arr[2*i + 1] = 2 * A[2 * i]
for i = 0 ... N-1.
Print True if it is possible, otherwise print False.Examples:
Input: arr[] = {4, -2, 2, -4} Output: True {-2, -4, 2, ... | [
{
"code": null,
"e": 26065,
"s": 26037,
"text": "\n09 Jun, 2021"
},
{
"code": null,
"e": 26203,
"s": 26065,
"text": "Given an array arr of N (even) integer elements. The task is to check if it is possible to reorder the elements of the array such that: "
},
{
"code": nul... |
Program to check if input is an integer or a string - GeeksforGeeks | 04 May, 2021
Write a function to check whether a given input is an integer or a string.
Definition of an integer :
Every element should be a valid digit, i.e '0-9'.
Definition of a string :
Any one element should be an invalid digit, i.e any symbol other than '0-9'.
Examples:
Input : 127
Output : Integer
Explanation... | [
{
"code": null,
"e": 26141,
"s": 26113,
"text": "\n04 May, 2021"
},
{
"code": null,
"e": 26216,
"s": 26141,
"text": "Write a function to check whether a given input is an integer or a string."
},
{
"code": null,
"e": 26244,
"s": 26216,
"text": "Definition of a... |
Python Program For Chocolate Distribution Problem - GeeksforGeeks | 06 Jan, 2022
Given an array of n integers where each value represents the number of chocolates in a packet. Each packet can have a variable number of chocolates. There are m students, the task is to distribute chocolate packets such that:
Each student gets one packet.The difference between the number of chocolates in ... | [
{
"code": null,
"e": 26041,
"s": 26013,
"text": "\n06 Jan, 2022"
},
{
"code": null,
"e": 26268,
"s": 26041,
"text": "Given an array of n integers where each value represents the number of chocolates in a packet. Each packet can have a variable number of chocolates. There are m st... |
Number Representation - GeeksforGeeks | 12 Mar, 2018
P is a 16-bit signed integer. The 2's complement representation of P is (F87B)16.The 2's complement representation of 8*P
(C3D8)16
(187B)16
(F878)16
(987B)16
P = (F87B)16 is -1111 1000 0111 1011 in binary Note that most significant bit in the binary representation is 1, which implies that the number i... | [
{
"code": null,
"e": 28055,
"s": 28027,
"text": "\n12 Mar, 2018"
},
{
"code": null,
"e": 28178,
"s": 28055,
"text": "P is a 16-bit signed integer. The 2's complement representation of P is (F87B)16.The 2's complement representation of 8*P "
},
{
"code": null,
"e": 281... |
BFS using vectors & queue as per the algorithm of CLRS - GeeksforGeeks | 15 Nov, 2021
Breadth-first search traversal of a graph using the algorithm given in CLRS book.BFS is one of the ways to traverse a graph. It is named so because it expands the frontier between discovered and undiscovered vertices uniformly across the breadth of the frontier. What it means is that the algorithm first di... | [
{
"code": null,
"e": 26337,
"s": 26309,
"text": "\n15 Nov, 2021"
},
{
"code": null,
"e": 26966,
"s": 26337,
"text": "Breadth-first search traversal of a graph using the algorithm given in CLRS book.BFS is one of the ways to traverse a graph. It is named so because it expands the ... |
Replace Negative Number by Zeros in Pandas DataFrame - GeeksforGeeks | 05 Sep, 2020
In this article, Let’s discuss how to replace the negative numbers by zero in Pandas
Approach:
Import pandas module.
Create a Dataframe.
Check the DataFrame element is less than zero, if yes then assign zero in this element.
Display the final DataFrame
First, let’s create the dataframe.
Python3
# importi... | [
{
"code": null,
"e": 26229,
"s": 26201,
"text": "\n05 Sep, 2020"
},
{
"code": null,
"e": 26315,
"s": 26229,
"text": "In this article, Let’s discuss how to replace the negative numbers by zero in Pandas "
},
{
"code": null,
"e": 26325,
"s": 26315,
"text": "Appr... |
Portfolio Optimization With NumPy | by Tony Yiu | Towards Data Science | Note from Towards Data Science’s editors: While we allow independent authors to publish articles in accordance with our rules and guidelines, we do not endorse each author’s contribution. You should not rely on an author’s works without seeking professional advice. See our Reader Terms for details.
If you would like to... | [
{
"code": null,
"e": 472,
"s": 172,
"text": "Note from Towards Data Science’s editors: While we allow independent authors to publish articles in accordance with our rules and guidelines, we do not endorse each author’s contribution. You should not rely on an author’s works without seeking profession... |
How to use Plotly.js in React to Visualize and Interact with Your Data | by Ran (Reine) | Towards Data Science | I’ve written a tutorial on how to visualize interactive 3D networks (or data) with Python Plotly a few months ago and thought maybe it’ll be a good idea to write another one for Plotly.js.
One of the reasons why someone might prefer Plotly.js over Python Plotly could be because of loading speeds — I’ve once written a R... | [
{
"code": null,
"e": 361,
"s": 172,
"text": "I’ve written a tutorial on how to visualize interactive 3D networks (or data) with Python Plotly a few months ago and thought maybe it’ll be a good idea to write another one for Plotly.js."
},
{
"code": null,
"e": 695,
"s": 361,
"text"... |
All About Target Encoding For Classification Tasks | by Nishant Mohan | Towards Data Science | Recently I did a project wherein the target was multi-class. It was a simple prediction task and the dataset involved both categorical as well as numerical features.
For those of you who are wondering what multi-class classification is: If you want to answer in ‘0 vs 1’, ‘clicked vs not-clicked’ or ‘cat vs dog’, your c... | [
{
"code": null,
"e": 337,
"s": 171,
"text": "Recently I did a project wherein the target was multi-class. It was a simple prediction task and the dataset involved both categorical as well as numerical features."
},
{
"code": null,
"e": 643,
"s": 337,
"text": "For those of you who... |
How to create a database in MongoDB using Java? | There is no separate method to create a MongoDB database in Java, you can create a database by invoking the getDatabase() method of the com.mongodb.MongoClient class.
import com.mongodb.MongoClient;
public class CreatingDatabase {
public static void main( String args[] ) {
//Creating a MongoDB client
@Su... | [
{
"code": null,
"e": 1229,
"s": 1062,
"text": "There is no separate method to create a MongoDB database in Java, you can create a database by invoking the getDatabase() method of the com.mongodb.MongoClient class."
},
{
"code": null,
"e": 1693,
"s": 1229,
"text": "import com.mong... |
Topic Modeling on PyCaret. A beginner’s guide to PyCaret’s natural... | by Ednalyn C. De Dios | Towards Data Science | I remember a brief conversation with my boss’ boss a while back. He said that he wouldn’t be impressed if somebody in the company built a face recognition tool from scratch because, and I quote, “Guess what? There’s an API for that.” He then goes on about the futility of doing something that’s already been done instead... | [
{
"code": null,
"e": 510,
"s": 171,
"text": "I remember a brief conversation with my boss’ boss a while back. He said that he wouldn’t be impressed if somebody in the company built a face recognition tool from scratch because, and I quote, “Guess what? There’s an API for that.” He then goes on about... |
Angle between hour and minute hand | Practice | GeeksforGeeks | Calculate the angle between the hour hand and minute hand.
Note: There can be two angles between hands; we need to print a minimum of two. Also, we need to print the floor of the final result angle. For example, if the final angle is 10.61, we need to print 10.
Example 1:
Input:
H = 9 , M = 0
Output:
90
Explanation:
... | [
{
"code": null,
"e": 298,
"s": 238,
"text": "Calculate the angle between the hour hand and minute hand. "
},
{
"code": null,
"e": 501,
"s": 298,
"text": "Note: There can be two angles between hands; we need to print a minimum of two. Also, we need to print the floor of the final ... |
How to apply a CNN from PyTorch to your images. | by Alexey Khrustalev | Towards Data Science | Hello everyone! Today I’d like to talk about uploading your images into your PyTorch CNN.
Today we will cover the following:
How to store images properly, so that you can easily get your data labeled.
How to access the data using PyTorch and make some preprocessing on the way.
In the end, we will use a very simple CNN ... | [
{
"code": null,
"e": 262,
"s": 172,
"text": "Hello everyone! Today I’d like to talk about uploading your images into your PyTorch CNN."
},
{
"code": null,
"e": 297,
"s": 262,
"text": "Today we will cover the following:"
},
{
"code": null,
"e": 373,
"s": 297,
"... |
PHP date() Function | The date() function accepts a format string as a parameter, formats the local date/time in the specified format and returns the result.
date($format, $timestamp)
format (Mandatory)
This is a format string specifying the format in which you want the output date string to be.
timestamp (Optional)
This is an integer val... | [
{
"code": null,
"e": 2893,
"s": 2757,
"text": "The date() function accepts a format string as a parameter, formats the local date/time in the specified format and returns the result."
},
{
"code": null,
"e": 2920,
"s": 2893,
"text": "date($format, $timestamp)\n"
},
{
"cod... |
How to Sort/Order keys in JavaScript objects ? | 31 Dec, 2019
Given an object and the task is to sort the JavaScript Object on the basis of keys. Here are a few of the most used techniques discussed with the help of JavaScript.
Approach 1: By using .sort() method to sort the keys according to the conditions specified in the function and get the sorted keys in the arr... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n31 Dec, 2019"
},
{
"code": null,
"e": 194,
"s": 28,
"text": "Given an object and the task is to sort the JavaScript Object on the basis of keys. Here are a few of the most used techniques discussed with the help of JavaScript."
},
{... |
Python | Custom sorting in list of tuples | 11 May, 2020
Sometimes, while working with list of tuples, we can have a problem in which we need to perform it’s sorting. Naive sorting is easier, but sometimes, we have to perform custom sorting, i.e by decreasing order of first element and increasing order of 2nd element. And these can also be in cases of different ... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n11 May, 2020"
},
{
"code": null,
"e": 434,
"s": 28,
"text": "Sometimes, while working with list of tuples, we can have a problem in which we need to perform it’s sorting. Naive sorting is easier, but sometimes, we have to perform custom... |
How Change the vertical spacing between legend entries in Matplotlib? | 13 Jan, 2021
Prerequisites: Matplotlib
In this article, we will see how can we can change vertical space between labels of a legend in our graph using matplotlib, Here we will take two different examples to showcase our graph.
Approach:
Import required module.
Create data.
Change the vertical spacing between labels.
No... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n13 Jan, 2021"
},
{
"code": null,
"e": 54,
"s": 28,
"text": "Prerequisites: Matplotlib"
},
{
"code": null,
"e": 242,
"s": 54,
"text": "In this article, we will see how can we can change vertical space between labels o... |
SVG <feFlood> Element | 31 Mar, 2022
SVG stands for Scalable Vector Graphic. It can be used to make graphics and animations like in HTML canvas. SVG <feFlood> element generates a layer of continuous color that completely fills this element’s filter primitive region.
Syntax:
<feFlood x="" y="" width="" height=""
flood-color="" flood-opacity="... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n31 Mar, 2022"
},
{
"code": null,
"e": 258,
"s": 28,
"text": "SVG stands for Scalable Vector Graphic. It can be used to make graphics and animations like in HTML canvas. SVG <feFlood> element generates a layer of continuous color that co... |
Create an Online Payment UI design using HTML/CSS | 31 Mar, 2021
For anyone who is running an online business, checkout becomes an important part of the selling process to maintain the convenience for online sales and Fast transactions. An appealing User-Interface(UI) will help us in bringing in potential visitors and facilitates the user experience.
In this article, we... | [
{
"code": null,
"e": 53,
"s": 25,
"text": "\n31 Mar, 2021"
},
{
"code": null,
"e": 341,
"s": 53,
"text": "For anyone who is running an online business, checkout becomes an important part of the selling process to maintain the convenience for online sales and Fast transactions. An... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.