title stringlengths 3 221 | text stringlengths 17 477k | parsed listlengths 0 3.17k |
|---|---|---|
Find and click element by title Python Selenium. | We can find and click elements by title in Selenium webdriver. An element can be identified with a title attribute with xpath or css selector. With the xpath, the expression should be //tagname[@title='value']. In css, the expression should be tagname[title='value'].
Let us take an html code for an element with a title... | [
{
"code": null,
"e": 1330,
"s": 1062,
"text": "We can find and click elements by title in Selenium webdriver. An element can be identified with a title attribute with xpath or css selector. With the xpath, the expression should be //tagname[@title='value']. In css, the expression should be tagname[t... |
Custom commands for linux terminal - GeeksforGeeks | 18 Aug, 2021
Linux operating system allows users to create commands and execute them over the command line. To create a command in Linux, the first step is to create a bash script for the command. The second step is to make the command executable. Syntax :
$ nano ~/.bashrc
Here, bashrc means run the Bash file. Bash ... | [
{
"code": null,
"e": 23864,
"s": 23836,
"text": "\n18 Aug, 2021"
},
{
"code": null,
"e": 24109,
"s": 23864,
"text": "Linux operating system allows users to create commands and execute them over the command line. To create a command in Linux, the first step is to create a bash scr... |
C program to convert days into months and number of days | User has to enter total number of days. We need to convert the total number of days into months and left-over days in coming month.
The formula to convert days into months is as follows −
Month=days/30
The logic to find left-over days for the coming month is as follows −
Days=days %30
Refer an algor... | [
{
"code": null,
"e": 1194,
"s": 1062,
"text": "User has to enter total number of days. We need to convert the total number of days into months and left-over days in coming month."
},
{
"code": null,
"e": 1250,
"s": 1194,
"text": "The formula to convert days into months is as foll... |
How to check if the USB device is connected to the system using PowerShell? | To retrieve the USB-connected devices using Powershell, we need to retrieve all the drives using the WMI object or CIM Instance and need to filter the win32_diskdrive class with the USB as shown below.
So basically, USB devices and other removable devices have the drivetype '2'. You can search with the InterfaceType or... | [
{
"code": null,
"e": 1264,
"s": 1062,
"text": "To retrieve the USB-connected devices using Powershell, we need to retrieve all the drives using the WMI object or CIM Instance and need to filter the win32_diskdrive class with the USB as shown below."
},
{
"code": null,
"e": 1398,
"s":... |
Salesforce - Standard Controllers | Visualforce consists of many built-in controllers which can be used to access and display data. It works on the MVC (model-view-controller) approach. The controllers interact with the database and pull the data from the database to view the data through a webpage created by apex page.
To display a specific record or gr... | [
{
"code": null,
"e": 2843,
"s": 2557,
"text": "Visualforce consists of many built-in controllers which can be used to access and display data. It works on the MVC (model-view-controller) approach. The controllers interact with the database and pull the data from the database to view the data through... |
human-learn: Create a Human Learning Model by Drawing | by Khuyen Tran | Towards Data Science | Nowadays, data scientists often give machine learning model data with labels so that it can figure out the rules. These rules can be used to predict the labels of new data.
This is convenient, but some information may be lost in this process. It is also difficult to know what is going on under the hood and why the mach... | [
{
"code": null,
"e": 345,
"s": 172,
"text": "Nowadays, data scientists often give machine learning model data with labels so that it can figure out the rules. These rules can be used to predict the labels of new data."
},
{
"code": null,
"e": 550,
"s": 345,
"text": "This is conve... |
Python - Strings | Strings are amongst the most popular types in Python. We can create them simply by enclosing characters in quotes. Python treats single quotes the same as double quotes. Creating strings is as simple as assigning a value to a variable. For example −
var1 = 'Hello World!'
var2 = "Python Programming"
Python does not supp... | [
{
"code": null,
"e": 2494,
"s": 2244,
"text": "Strings are amongst the most popular types in Python. We can create them simply by enclosing characters in quotes. Python treats single quotes the same as double quotes. Creating strings is as simple as assigning a value to a variable. For example −"
... |
Selects all <p> elements inside <div> elements with CSS | Use the element element selector to select all elements inside another element.
You can try to run the following code to implement element element selector,
Live Demo
<!DOCTYPE html>
<html>
<head>
<style>
div p {
color: white;
background-color: blue;
}
</style>
... | [
{
"code": null,
"e": 1142,
"s": 1062,
"text": "Use the element element selector to select all elements inside another element."
},
{
"code": null,
"e": 1219,
"s": 1142,
"text": "You can try to run the following code to implement element element selector,"
},
{
"code": nul... |
Swap characters in a String | 05 Jul, 2021
Given a String S of length N, two integers B and C, the task is to traverse characters starting from the beginning, swapping a character with the character after C places from it, i.e. swap characters at position i and (i + C)%N. Repeat this process B times, advancing one position at a time. Your task is t... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n05 Jul, 2021"
},
{
"code": null,
"e": 398,
"s": 52,
"text": "Given a String S of length N, two integers B and C, the task is to traverse characters starting from the beginning, swapping a character with the character after C places fro... |
PyQt5 QListWidget – Getting Count of Items | 01 Aug, 2020
In this article we will see how we can get the count of items of the QListWidget. QListWidget is a convenience class that provides a list view with a classic item-based interface for adding and removing items. QListWidget uses an internal model to manage each QListWidgetItem in the list. Count property hol... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n01 Aug, 2020"
},
{
"code": null,
"e": 398,
"s": 28,
"text": "In this article we will see how we can get the count of items of the QListWidget. QListWidget is a convenience class that provides a list view with a classic item-based interf... |
Represent a number as a sum of maximum possible number of Prime Numbers | 03 May, 2021
Given a positive integer . The task is to represent it as a sum of the maximum possible number of prime numbers. (N > 1)Examples:
Input : N = 5
Output : 2 3
Input : N = 6
Output : 2 2 2
At first, the problem might seem to involve some use of Goldbach’s conjecture. But the key observation here is to ... | [
{
"code": null,
"e": 53,
"s": 25,
"text": "\n03 May, 2021"
},
{
"code": null,
"e": 185,
"s": 53,
"text": "Given a positive integer . The task is to represent it as a sum of the maximum possible number of prime numbers. (N > 1)Examples: "
},
{
"code": null,
"e": 244,
... |
What is a GIT Repository? | 05 Jul, 2022
Repositories in GIT contain a collection of files of various different versions of a Project. These files are imported from the repository into the local server of the user for further updations and modifications in the content of the file. A VCS or the Version Control System is used to create these versio... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n05 Jul, 2022"
},
{
"code": null,
"e": 965,
"s": 28,
"text": "Repositories in GIT contain a collection of files of various different versions of a Project. These files are imported from the repository into the local server of the user fo... |
Highest Response Ratio Next (HRRN) CPU Scheduling | 04 May, 2022
Given N processes with their Arrival times and Burst times, the task is to find average waiting time and average turn around time using HRRN scheduling algorithm.
The name itself states that we need to find the response ratio of all available processes and select the one with the highest Response Ratio. A... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n04 May, 2022"
},
{
"code": null,
"e": 216,
"s": 52,
"text": "Given N processes with their Arrival times and Burst times, the task is to find average waiting time and average turn around time using HRRN scheduling algorithm. "
},
{
... |
HTML | aria-labelledby attribute | 15 Jul, 2021
The aria-labelledby attribute is an inbuilt attribute in HTML that is used to create relationships between objects and their labels. When any element containing both the attribute aria-labelledby and aria-label attribute the browser’s high priority will be aria-labelledby without any doubt. This aria-label... | [
{
"code": null,
"e": 53,
"s": 25,
"text": "\n15 Jul, 2021"
},
{
"code": null,
"e": 568,
"s": 53,
"text": "The aria-labelledby attribute is an inbuilt attribute in HTML that is used to create relationships between objects and their labels. When any element containing both the attr... |
Moment.js isDate() Function | 29 Jul, 2020
Given a value to the variable and the task is to check whether a variable is actual date or not in Moment.js using the isDate() method. To check if a variable is a native js Date object, use moment.isDate() method.
Syntax:
moment.isDate(obj);
Parameter: Object
Returns: True or False
Installation of moment ... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n29 Jul, 2020"
},
{
"code": null,
"e": 243,
"s": 28,
"text": "Given a value to the variable and the task is to check whether a variable is actual date or not in Moment.js using the isDate() method. To check if a variable is a native js D... |
void Keyword in C# | 22 Jun, 2020
Keywords are the words in a language that are used for some internal process or represent some predefined actions. void is a keyword, it is a reference type of data type and used to specify the return type of a method in C#. It is an alias of System.Void.
Syntax:
public void function_name([parameters])
{
... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n22 Jun, 2020"
},
{
"code": null,
"e": 284,
"s": 28,
"text": "Keywords are the words in a language that are used for some internal process or represent some predefined actions. void is a keyword, it is a reference type of data type and u... |
Python maketrans() and translate() functions | The maketrans() method returns a mapping table for translation usable for translate() method. This is a static method that creates a one to one mapping of a character to its translation/replacement. This method creates a Unicode representation of each character for translation.
The syntax of maketrans() method is −
str... | [
{
"code": null,
"e": 1466,
"s": 1187,
"text": "The maketrans() method returns a mapping table for translation usable for translate() method. This is a static method that creates a one to one mapping of a character to its translation/replacement. This method creates a Unicode representation of each c... |
Working with large CSV files in Python | 05 Apr, 2021
Data plays a key role in building machine learning and the AI model. In today’s world where data is being generated at an astronomical rate by every computing device and sensors, it is important to handle huge volumes of data correctly. One of the most common ways of storing data is in the form of Comma-Se... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n05 Apr, 2021"
},
{
"code": null,
"e": 512,
"s": 28,
"text": "Data plays a key role in building machine learning and the AI model. In today’s world where data is being generated at an astronomical rate by every computing device and senso... |
Scala | Decision Making (if, if-else, Nested if-else, if-else if) | 04 Jul, 2019
Decision making in programming is similar to decision making in real life. In decision making, a piece of code is executed when the given condition is fulfilled. Sometimes these are also termed as the Control flow statements. Scala uses control statements to control the flow of execution of the program bas... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n04 Jul, 2019"
},
{
"code": null,
"e": 497,
"s": 52,
"text": "Decision making in programming is similar to decision making in real life. In decision making, a piece of code is executed when the given condition is fulfilled. Sometimes th... |
Diameter of a Binary Tree in O(n) [A new method] | 30 Jun, 2021
The diameter of a tree is the number of nodes on the longest path between two leaves in the tree. The diagram below shows two trees each with diameter nine, the leaves that form the ends of the longest path are colored (note that there may be more than one path in the tree of the same diameter).
Examples:... | [
{
"code": null,
"e": 54,
"s": 26,
"text": "\n30 Jun, 2021"
},
{
"code": null,
"e": 352,
"s": 54,
"text": "The diameter of a tree is the number of nodes on the longest path between two leaves in the tree. The diagram below shows two trees each with diameter nine, the leaves that f... |
Find the unit place digit of sum of N factorials | 13 Jun, 2022
Given a number N, the task is to find units place digit of the first N natural numbers factorials, i.e. 1!+2!+3!+....N! where N<=10e18.Examples:
Input: n = 2
Output: 3
1! + 2! = 3
Last digit is 3
Input: n = 3
Output: 9
1! + 2! + 3! = 9
Last digit is 9
Naive Approach: In this approach, simply calculat... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n13 Jun, 2022"
},
{
"code": null,
"e": 175,
"s": 28,
"text": "Given a number N, the task is to find units place digit of the first N natural numbers factorials, i.e. 1!+2!+3!+....N! where N<=10e18.Examples: "
},
{
"code": null,
... |
What does inplace mean in Pandas? | 01 Jun, 2022
In this article, we will see Inplace in pandas. Inplace is an argument used in different functions. Some functions in which inplace is used as an attributes like, set_index(), dropna(), fillna(), reset_index(), drop(), replace() and many more. The default value of this attribute is False and it returns the... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n01 Jun, 2022"
},
{
"code": null,
"e": 380,
"s": 52,
"text": "In this article, we will see Inplace in pandas. Inplace is an argument used in different functions. Some functions in which inplace is used as an attributes like, set_index()... |
MoviePy – Assigning Audio Clip to Video File | 18 Aug, 2020
In this article we will see how we can add external audio to the video file clip in MoviePy. MoviePy is a Python module for video editing, which can be used for basic operations on videos and GIF’s. Video is formed by the frames, combination of frames creates a video each frame is an individual image. An a... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n18 Aug, 2020"
},
{
"code": null,
"e": 650,
"s": 28,
"text": "In this article we will see how we can add external audio to the video file clip in MoviePy. MoviePy is a Python module for video editing, which can be used for basic operatio... |
Java Examples - Create Table in a PDF | How to create a table in a PDF using Java.
Following is the program to create a table in a PDF using Java.
import com.itextpdf.kernel.pdf.PdfDocument;
import com.itextpdf.kernel.pdf.PdfWriter;
import com.itextpdf.layout.Document;
import com.itextpdf.layout.element.Cell;
import com.itextpdf.layout.element.Table;
... | [
{
"code": null,
"e": 2245,
"s": 2202,
"text": "How to create a table in a PDF using Java."
},
{
"code": null,
"e": 2309,
"s": 2245,
"text": "Following is the program to create a table in a PDF using Java."
}
] |
Residual Leverage Plot (Regression Diagnostic) - GeeksforGeeks | 21 Sep, 2021
In linear or multiple regression, it is not enough to just fit the model into the dataset. But, it may not give the desired result. To apply the linear or multiple regression efficiently to the dataset. There are some assumptions that we need to check on the dataset that made linear/multiple regression eff... | [
{
"code": null,
"e": 24344,
"s": 24316,
"text": "\n21 Sep, 2021"
},
{
"code": null,
"e": 24688,
"s": 24344,
"text": "In linear or multiple regression, it is not enough to just fit the model into the dataset. But, it may not give the desired result. To apply the linear or multiple... |
Hypothesis Testing. What it is and how to do it in Python | by Arthur Mello | Towards Data Science | A hypothesis is a claim or a premise that we want to test. Hypothesis testing is a way of backing up your conclusions with data, in a more “scientific” way. It is useful not only to scientists, but actually important in so many areas, ranging from marketing to web design to pharmaceutical trials and much more. Since it... | [
{
"code": null,
"e": 920,
"s": 172,
"text": "A hypothesis is a claim or a premise that we want to test. Hypothesis testing is a way of backing up your conclusions with data, in a more “scientific” way. It is useful not only to scientists, but actually important in so many areas, ranging from marketi... |
numpy.npv() in Python - GeeksforGeeks | 29 Nov, 2018
numpy.npv(rate, value) : This financial function helps user to calculate the NPV(Net Present Value) of a cash flow series.
Parameters :
rate : [scalar] Rate of discount
value : [array_like, shape(M,)] value of
cash flows time series. The (fixed) time interval
between cash flow “events” ... | [
{
"code": null,
"e": 24866,
"s": 24838,
"text": "\n29 Nov, 2018"
},
{
"code": null,
"e": 24989,
"s": 24866,
"text": "numpy.npv(rate, value) : This financial function helps user to calculate the NPV(Net Present Value) of a cash flow series."
},
{
"code": null,
"e": 250... |
Python datetime.utcoffset() Method with Example - GeeksforGeeks | 27 Dec, 2021
The utcoffset() function is used to return a timedelta object that represents the difference between the local time and UTC time.
This function is used in used in the datetime class of module datetime.
Here range of the utcoffset is “timedelta(hours=24) <= offset <= timedelta(hours=24)”.
If the offset is e... | [
{
"code": null,
"e": 24292,
"s": 24264,
"text": "\n27 Dec, 2021"
},
{
"code": null,
"e": 24422,
"s": 24292,
"text": "The utcoffset() function is used to return a timedelta object that represents the difference between the local time and UTC time."
},
{
"code": null,
"... |
VueJS - Watch Property | In this chapter, we will learn about the Watch property. Using an example, we will see we can use the Watch property in VueJS.
<html>
<head>
<title>VueJs Instance</title>
<script type = "text/javascript" src = "js/vue.js"></script>
</head>
<body>
<div id = "computed_props">
Kilometer... | [
{
"code": null,
"e": 2063,
"s": 1936,
"text": "In this chapter, we will learn about the Watch property. Using an example, we will see we can use the Watch property in VueJS."
},
{
"code": null,
"e": 3018,
"s": 2063,
"text": "<html>\n <head>\n <title>VueJs Instance</title>\... |
Check if two nodes are cousins in a Binary Tree - GeeksforGeeks | 14 Jan, 2022
Given the binary Tree and the two nodes say ‘a’ and ‘b’, determine whether the two nodes are cousins of each other or not.Two nodes are cousins of each other if they are at same level and have different parents.Example:
6
/ \
3 5
/ \ / \
7 8 1 3
Say two node be 7 and 1, result is T... | [
{
"code": null,
"e": 25326,
"s": 25298,
"text": "\n14 Jan, 2022"
},
{
"code": null,
"e": 25548,
"s": 25326,
"text": "Given the binary Tree and the two nodes say ‘a’ and ‘b’, determine whether the two nodes are cousins of each other or not.Two nodes are cousins of each other if th... |
Iteratively Reverse a linked list using only 2 pointers (An Interesting Method) - GeeksforGeeks | 24 Jan, 2022
Given pointer to the head node of a linked list, the task is to reverse the linked list.
Examples:
Input : Head of following linked list
1->2->3->4->NULL
Output : Linked list should be changed to,
4->3->2->1->NULL
Input : Head of following linked list
1->2->3->4->5->NULL
Output :... | [
{
"code": null,
"e": 24960,
"s": 24932,
"text": "\n24 Jan, 2022"
},
{
"code": null,
"e": 25049,
"s": 24960,
"text": "Given pointer to the head node of a linked list, the task is to reverse the linked list."
},
{
"code": null,
"e": 25060,
"s": 25049,
"text": "E... |
Solidity - Types | While writing program in any language, you need to use various variables to store various information. Variables are nothing but reserved memory locations to store values. This means that when you create a variable you reserve some space in memory.
You may like to store information of various data types like character,... | [
{
"code": null,
"e": 2804,
"s": 2555,
"text": "While writing program in any language, you need to use various variables to store various information. Variables are nothing but reserved memory locations to store values. This means that when you create a variable you reserve some space in memory."
}... |
Implement Runnable vs Extend Thread in Java - GeeksforGeeks | 04 Oct, 2017
As discussed in Java multi-threading article we can define a thread in the following two ways:
By extending Thread class
By implementing Runnable interface
In the first approach, Our class always extends Thread class. There is no chance of extending any other class. Hence we are missing Inheritance benefit... | [
{
"code": null,
"e": 25565,
"s": 25537,
"text": "\n04 Oct, 2017"
},
{
"code": null,
"e": 25660,
"s": 25565,
"text": "As discussed in Java multi-threading article we can define a thread in the following two ways:"
},
{
"code": null,
"e": 25686,
"s": 25660,
"tex... |
Secondary memory and DMA - GeeksforGeeks | 19 Nov, 2018
Initialize the address register
Initialize the count to 500
LOOP: Load a byte from device
Store in memory at address given by address register
Increment the address register
Decrement the count
If count != 0 go to ... | [
{
"code": null,
"e": 28855,
"s": 28827,
"text": "\n19 Nov, 2018"
},
{
"code": null,
"e": 29168,
"s": 28855,
"text": "\n Initialize the address register\n Initialize the count to 500\n LOOP: Load a byte from device\n Store in memory at... |
Materialize CSS Select - GeeksforGeeks | 01 Jun, 2021
Materialize provides a select feature to create options that can be easily selected to provide more information for the web forms. The following are different select feature:
simple select-option: allows to select an option from select dropdown. For this, <select> and <option> tags are used.
select dropdow... | [
{
"code": null,
"e": 26621,
"s": 26593,
"text": "\n01 Jun, 2021"
},
{
"code": null,
"e": 26796,
"s": 26621,
"text": "Materialize provides a select feature to create options that can be easily selected to provide more information for the web forms. The following are different sele... |
Find and Count total factors of co-prime A or B in a given range 1 to N - GeeksforGeeks | 22 Nov, 2021
Given three integers N, A, B, the task is to find the remainder when the sum of integers which are divisible by either A or B in the range [1, N] is divided by the number of integers in this range.Note: The numbers A and B are co-primes. Examples:
Input: N = 88, A = 11, B = 8 Output: 8 Explanation: There... | [
{
"code": null,
"e": 26291,
"s": 26263,
"text": "\n22 Nov, 2021"
},
{
"code": null,
"e": 26541,
"s": 26291,
"text": "Given three integers N, A, B, the task is to find the remainder when the sum of integers which are divisible by either A or B in the range [1, N] is divided by the... |
Chat application between two processes using signals and shared memory - GeeksforGeeks | 06 May, 2019
Prerequisite: C signal handling, IPC through shared memory
A signal is used in the UNIX system to notify a process that a particular event has occurred. A signal may be received either synchronously or asynchronously depending on the source and the reason for the event being signalled. A signal must follow... | [
{
"code": null,
"e": 25369,
"s": 25341,
"text": "\n06 May, 2019"
},
{
"code": null,
"e": 25428,
"s": 25369,
"text": "Prerequisite: C signal handling, IPC through shared memory"
},
{
"code": null,
"e": 25701,
"s": 25428,
"text": "A signal is used in the UNIX sy... |
Understanding OutOfMemoryError Exception in Java - GeeksforGeeks | 21 Dec, 2021
In Java, all objects are stored in a heap. They are allocated using a new operator. The OutOfMemoryError Exception in Java looks like this:
Exception in thread "main" java.lang.OutOfMemoryError: Java heap space
Usually, this error is thrown when the Java Virtual Machine cannot allocate an object because i... | [
{
"code": null,
"e": 25917,
"s": 25889,
"text": "\n21 Dec, 2021"
},
{
"code": null,
"e": 26058,
"s": 25917,
"text": "In Java, all objects are stored in a heap. They are allocated using a new operator. The OutOfMemoryError Exception in Java looks like this: "
},
{
"code": ... |
How to Enable or Disable SELinux Boolean Values? - GeeksforGeeks | 12 Mar, 2021
As SELinux has tones of policies to handle and maintain the security level of the system. SELinux has given an easy way to dynamically update the policy. You need special arguments to make these policies persistent over a reboot, this capability is provided by the SELinux management utility.
To see Boolean... | [
{
"code": null,
"e": 26197,
"s": 26169,
"text": "\n12 Mar, 2021"
},
{
"code": null,
"e": 26490,
"s": 26197,
"text": "As SELinux has tones of policies to handle and maintain the security level of the system. SELinux has given an easy way to dynamically update the policy. You need ... |
NPDA for accepting the language L = {a2mb3m | m ≥ 1} - GeeksforGeeks | 28 Aug, 2019
Prerequisite – Pushdown automata, Pushdown automata acceptance by final stateProblem – Design a non deterministic PDA for accepting the language L = {a2mb3m | m ≥ 1}, i.e.,
L = {aabbb, aaaabbbbbb, aaaaaabbbbbbbbb, aaaaaaaabbbbbbbbbbbb, ......}
In each of the string, for every 2 ‘a’s there is 3 ‘b’.
Explan... | [
{
"code": null,
"e": 31079,
"s": 31051,
"text": "\n28 Aug, 2019"
},
{
"code": null,
"e": 31252,
"s": 31079,
"text": "Prerequisite – Pushdown automata, Pushdown automata acceptance by final stateProblem – Design a non deterministic PDA for accepting the language L = {a2mb3m | m ≥ ... |
JSwing | Create Translucent and Shaped Windows in Java - GeeksforGeeks | 01 Sep, 2021
Per – Pixel Translucency allows the programmer to control the translucency of a specific pixel over others. we will use this property to create a shaped window.In this article we will try to implement shaped window in java by creating a transparent window and then painting the panel and then adding the Pan... | [
{
"code": null,
"e": 25225,
"s": 25197,
"text": "\n01 Sep, 2021"
},
{
"code": null,
"e": 25550,
"s": 25225,
"text": "Per – Pixel Translucency allows the programmer to control the translucency of a specific pixel over others. we will use this property to create a shaped window.In ... |
How to manually add a legend with a color box on a Matplotlib figure ? - GeeksforGeeks | 23 Dec, 2020
A legend is basically an area in the plot which describes the elements present in the graph. Matplotlib provides an inbuilt method named legend() for this purpose. The syntax of the method is below :
Example: Adding Simple legend
Python3
# Import librariesimport matplotlib.pyplot as plt # Creating plotplt... | [
{
"code": null,
"e": 31547,
"s": 31519,
"text": "\n23 Dec, 2020"
},
{
"code": null,
"e": 31747,
"s": 31547,
"text": "A legend is basically an area in the plot which describes the elements present in the graph. Matplotlib provides an inbuilt method named legend() for this purpose.... |
Find length of a string in python (3 ways) | String is a python which is a series of Unicode characters. Once declared it is not changeable. In this article we'll see what are the different ways to find the length of a string.
This is the most straight forward way. Here we use a library function named len(). The string is passed as parameter to the function and w... | [
{
"code": null,
"e": 1244,
"s": 1062,
"text": "String is a python which is a series of Unicode characters. Once declared it is not changeable. In this article we'll see what are the different ways to find the length of a string."
},
{
"code": null,
"e": 1425,
"s": 1244,
"text": "... |
Web Scraping Advanced Football Statistics | by Sergi Lehkyi | Towards Data Science | Lately I’ve being debating about the role of luck in football. Or maybe it’s not pure luck, but a skill? Do teams win their leagues purely on skill? Or the importance of luck is quite huge? Who is lucky and who is not? Did that team deserve the relegation? And many-many more.
But as I am a data guy, I thought, so let’s... | [
{
"code": null,
"e": 449,
"s": 172,
"text": "Lately I’ve being debating about the role of luck in football. Or maybe it’s not pure luck, but a skill? Do teams win their leagues purely on skill? Or the importance of luck is quite huge? Who is lucky and who is not? Did that team deserve the relegation... |
C program to append content of one text file to another - GeeksforGeeks | 24 Jul, 2020
Pre-requisite: File Handling in C
Given the source and destination text files, the task is to append the content from source file to destination file and then display the content of the destination file.Examples:
Input:
file1.text
This is line one in file1
Hello World.
file2.text
This is line one in f... | [
{
"code": null,
"e": 24820,
"s": 24792,
"text": "\n24 Jul, 2020"
},
{
"code": null,
"e": 24855,
"s": 24820,
"text": "Pre-requisite: File Handling in C "
},
{
"code": null,
"e": 25036,
"s": 24855,
"text": "Given the source and destination text files, the task i... |
Steps by Knight | Practice | GeeksforGeeks | Given a square chessboard, the initial position of Knight and position of a target. Find out the minimum steps a Knight will take to reach the target position.
Note:
The initial and the target position coordinates of Knight have been given according to 1-base indexing.
Example 1:
Input:
N=6
knightPos[ ] = {4, 5}
targ... | [
{
"code": null,
"e": 398,
"s": 238,
"text": "Given a square chessboard, the initial position of Knight and position of a target. Find out the minimum steps a Knight will take to reach the target position."
},
{
"code": null,
"e": 508,
"s": 398,
"text": "Note:\nThe initial and the... |
How to use Android Picasso Library to download images? | This example demonstrates how do I use the Android Picasso library to download images.
Step 1 − Create a new project in Android Studio, go to File ⇒New Project and fill all required details to create a new project.
Add the following dependency to the build gradle (Module: app)
implementation 'com.squareup.picasso:picas... | [
{
"code": null,
"e": 1149,
"s": 1062,
"text": "This example demonstrates how do I use the Android Picasso library to download images."
},
{
"code": null,
"e": 1277,
"s": 1149,
"text": "Step 1 − Create a new project in Android Studio, go to File ⇒New Project and fill all required ... |
Self–invoking function in JavaScript? | The self-invoking function in JavaScript are known as Immediately Invoked Function Expressions (IIFE). Immediately Invoked Function Expressions (IIFE) is a JavaScript function that executes immediately after it has been defined so there is no need to manually invoke IIFE.
Following is the code for self-invoking functio... | [
{
"code": null,
"e": 1335,
"s": 1062,
"text": "The self-invoking function in JavaScript are known as Immediately Invoked Function Expressions (IIFE). Immediately Invoked Function Expressions (IIFE) is a JavaScript function that executes immediately after it has been defined so there is no need to ma... |
How to display p-value with coefficients in stargazer output for linear regression model in R? | To display p-value in stargazer output for linear regression model, we can use the report argument. For example, if we have a model called RegressionModel then to display the p-value with coefficients can be done by using the below command −
stargazer(RegressionModel,type="text",report=("vc*p"))
Consider the below data... | [
{
"code": null,
"e": 1304,
"s": 1062,
"text": "To display p-value in stargazer output for linear regression model, we can use the report argument. For example, if we have a model called RegressionModel then to display the p-value with coefficients can be done by using the below command −"
},
{
... |
Trigonometric Functions in Java | The java.lang.Math class contains methods for trigonometric operations like cos(), sin(), tan(), tanh(), cosh(), atan(), etc.
Let us work around some of these trigonometric functions in Java −
static double asin(double a)
The java.lang.Math.asin(double a) returns the arc sine of an angle, in the range of -pi/2 through ... | [
{
"code": null,
"e": 1188,
"s": 1062,
"text": "The java.lang.Math class contains methods for trigonometric operations like cos(), sin(), tan(), tanh(), cosh(), atan(), etc."
},
{
"code": null,
"e": 1255,
"s": 1188,
"text": "Let us work around some of these trigonometric functions... |
HTML5 Canvas - Rotation | HTML5 canvas provides rotate(angle) method which is used to rotate the canvas around the current origin.
This method only takes one parameter and that's the angle the canvas is rotated by. This is a clockwise rotation measured in radians.
Following is a simple example which we are running two loops where first loop det... | [
{
"code": null,
"e": 2713,
"s": 2608,
"text": "HTML5 canvas provides rotate(angle) method which is used to rotate the canvas around the current origin."
},
{
"code": null,
"e": 2847,
"s": 2713,
"text": "This method only takes one parameter and that's the angle the canvas is rotat... |
Java - How to read CSV file and Map to Java Object - onlinetutorialspoint | PROGRAMMINGJava ExamplesC Examples
Java Examples
C Examples
C Tutorials
aws
JAVAEXCEPTIONSCOLLECTIONSSWINGJDBC
EXCEPTIONS
COLLECTIONS
SWING
JDBC
JAVA 8
SPRING
SPRING BOOT
HIBERNATE
PYTHON
PHP
JQUERY
PROGRAMMINGJava ExamplesC Examples
Java Examples
C Examples
C Tutorials
aws
Let’s see how to read CSV file in Java and ma... | [
{
"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,
... |
Kustomize explained; an MLOps Use Case | by Tibor Fabian | Towards Data Science | Kustomize is a tool to customize YAML files like Kubernetes (K8s) manifests, template free. Meanwhile, it became a built-in kubectl operation to apply K8s object definitions from YAML files stored in a hierarchical directory structure.
There are some great examples in the documentation of Kustomize. Nevertheless, shari... | [
{
"code": null,
"e": 408,
"s": 172,
"text": "Kustomize is a tool to customize YAML files like Kubernetes (K8s) manifests, template free. Meanwhile, it became a built-in kubectl operation to apply K8s object definitions from YAML files stored in a hierarchical directory structure."
},
{
"code... |
Arithmetic Aptitude - GeeksforGeeks | 06 Nov, 2019
10152 = (1000+15)2
= 10002 + 152 +2 x 1000 x 15
=1000000 + 225 + 30000
=1030225
10152 = (1000+15)2
= 10002 + 152 +2 x 1000 x 15
=1000000 + 225 + 30000
=1030225
Largest 5 digit number is 99999.
Let us divide 99999 by 39
39) 99999 (2564
78
-----
219
195
-----
249
... | [
{
"code": null,
"e": 27219,
"s": 27191,
"text": "\n06 Nov, 2019"
},
{
"code": null,
"e": 27299,
"s": 27219,
"text": "10152 = (1000+15)2\n= 10002 + 152 +2 x 1000 x 15\n=1000000 + 225 + 30000\n=1030225"
},
{
"code": null,
"e": 27319,
"s": 27299,
"text": "10152 =... |
Python | Replace NaN values with average of columns - GeeksforGeeks | 20 Mar, 2019
In machine learning and data analytics data visualization is one of the most important steps. Cleaning and arranging data is done by different algorithms. Sometimes in data sets, we get NaN (not a number) values which are not possible to use for data visualization.
To solve this problem, one possible metho... | [
{
"code": null,
"e": 25537,
"s": 25509,
"text": "\n20 Mar, 2019"
},
{
"code": null,
"e": 25803,
"s": 25537,
"text": "In machine learning and data analytics data visualization is one of the most important steps. Cleaning and arranging data is done by different algorithms. Sometime... |
How to change the height of br tag? - GeeksforGeeks | 30 Apr, 2019
You can’t change the height of <br> tag as its not an HTML element, it is just an instruction which enforces a line break.br does not take up any space in the page.
There is a way by which you can increase line break between lines, is by putting multiple br tags.
Another way is to use classed span tag and ... | [
{
"code": null,
"e": 25773,
"s": 25745,
"text": "\n30 Apr, 2019"
},
{
"code": null,
"e": 25938,
"s": 25773,
"text": "You can’t change the height of <br> tag as its not an HTML element, it is just an instruction which enforces a line break.br does not take up any space in the page... |
How to Check/Uncheck the checkbox using JavaScript ? - GeeksforGeeks | 27 Sep, 2019
Approach 1: Using Reset Button
Create a javascript function.Use window.addEventListener: It allows adding event listeners on any HTML document or other objects that support events.Use window.onload function: It is used to perform the task as soon as the page refresh or loading.
Create a javascript function... | [
{
"code": null,
"e": 26601,
"s": 26573,
"text": "\n27 Sep, 2019"
},
{
"code": null,
"e": 26632,
"s": 26601,
"text": "Approach 1: Using Reset Button"
},
{
"code": null,
"e": 26880,
"s": 26632,
"text": "Create a javascript function.Use window.addEventListener: I... |
Java Program to Illustrate String Interpolation - GeeksforGeeks | 15 Feb, 2022
String Interpolation is a process in which the placeholder characters are replaced with the variables (or strings in this case) which allow to dynamically or efficiently print out text output. String Interpolation makes the code more compact and avoids repetition of using variables to print the output. Str... | [
{
"code": null,
"e": 25249,
"s": 25221,
"text": "\n15 Feb, 2022"
},
{
"code": null,
"e": 25721,
"s": 25249,
"text": "String Interpolation is a process in which the placeholder characters are replaced with the variables (or strings in this case) which allow to dynamically or effic... |
PostgreSQL - Date Data Type - GeeksforGeeks | 28 Aug, 2020
PostgreSQL supports a DATE data type to store date values. It takes 4 bytes of storage and ranges from 4713 BC to 5874897 AD. PostgreSQL uses the yyyy-mm-dd format for storing and inserting date values. If you create a table that has a DATE column and you want to use the current date as the default value f... | [
{
"code": null,
"e": 29270,
"s": 29242,
"text": "\n28 Aug, 2020"
},
{
"code": null,
"e": 29648,
"s": 29270,
"text": "PostgreSQL supports a DATE data type to store date values. It takes 4 bytes of storage and ranges from 4713 BC to 5874897 AD. PostgreSQL uses the yyyy-mm-dd format... |
Check if a Thread has started in Python - GeeksforGeeks | 12 Jun, 2019
Problem: To know when will a launched thread actually starts running.
A key feature of threads is that they execute independently and nondeterministically. This can present a tricky synchronization problem if other threads in the program need to know if a thread has reached a certain point in its execution... | [
{
"code": null,
"e": 25537,
"s": 25509,
"text": "\n12 Jun, 2019"
},
{
"code": null,
"e": 25607,
"s": 25537,
"text": "Problem: To know when will a launched thread actually starts running."
},
{
"code": null,
"e": 25958,
"s": 25607,
"text": "A key feature of thr... |
PyQt5 QListWidget - Making Sorting Enabled - GeeksforGeeks | 01 Aug, 2020
In this article we will see how we can set the sorting enabled property of the QListWidget. QListWidget is a convenience class that provides a list view with a classic item-based interface for adding and removing items. QListWidget uses an internal model to manage each QListWidgetItem in the list. This pro... | [
{
"code": null,
"e": 26299,
"s": 26271,
"text": "\n01 Aug, 2020"
},
{
"code": null,
"e": 26779,
"s": 26299,
"text": "In this article we will see how we can set the sorting enabled property of the QListWidget. QListWidget is a convenience class that provides a list view with a cla... |
Back-Face Detection Method - GeeksforGeeks | 06 Apr, 2018
When we project 3-D objects on a 2-D screen, we need to detect the faces that are hidden on 2D.Back-Face detection, also known as Plane Equation method, is an object space method in which objects and parts of objects are compared to find out the visible surfaces. Let us consider a triangular surface that w... | [
{
"code": null,
"e": 25943,
"s": 25915,
"text": "\n06 Apr, 2018"
},
{
"code": null,
"e": 26738,
"s": 25943,
"text": "When we project 3-D objects on a 2-D screen, we need to detect the faces that are hidden on 2D.Back-Face detection, also known as Plane Equation method, is an obje... |
screenshot_as_png element method - Selenium Python - GeeksforGeeks | 30 Apr, 2020
Selenium’s Python Module is built to perform automated testing with Python. Selenium Python bindings provides a simple API to write functional/acceptance tests using Selenium WebDriver. To open a webpage using Selenium Python, checkout – Navigating links using get method – Selenium Python. Just being able ... | [
{
"code": null,
"e": 25943,
"s": 25915,
"text": "\n30 Apr, 2020"
},
{
"code": null,
"e": 26500,
"s": 25943,
"text": "Selenium’s Python Module is built to perform automated testing with Python. Selenium Python bindings provides a simple API to write functional/acceptance tests usi... |
How to apply Amazing Hover Effect over Button using HTML and CSS ? - GeeksforGeeks | 11 Feb, 2021
You have visited many websites and you have seen many hover buttons present in those websites. So, such Hover Button animation effect can be easily generated by using HTML and CSS. By using HTML we will design the basic structure of the button and then by using the properties of CSS, we can create the hov... | [
{
"code": null,
"e": 26757,
"s": 26729,
"text": "\n11 Feb, 2021"
},
{
"code": null,
"e": 27085,
"s": 26757,
"text": "You have visited many websites and you have seen many hover buttons present in those websites. So, such Hover Button animation effect can be easily generated by u... |
OpenCV - Image Pyramids | Pyramid is an operation on an image where,
An input image is initially smoothed using a particular smoothing filter (ex: Gaussian, Laplacian) and then the smoothed image is subsampled.
An input image is initially smoothed using a particular smoothing filter (ex: Gaussian, Laplacian) and then the smoothed image is subsa... | [
{
"code": null,
"e": 3047,
"s": 3004,
"text": "Pyramid is an operation on an image where,"
},
{
"code": null,
"e": 3189,
"s": 3047,
"text": "An input image is initially smoothed using a particular smoothing filter (ex: Gaussian, Laplacian) and then the smoothed image is subsample... |
Union-Find Algorithm | Set 2 (Union By Rank and Path Compression) | 17 Jun, 2022
In the previous post, we introduced union find algorithm and used it to detect cycle in a graph. We used following union() and find() operations for subsets.
C++
Java
Python3
C#
Javascript
// Naive implementation of findint find(int parent[], int i){ if (parent[i] == -1) return i; return find(... | [
{
"code": null,
"e": 54,
"s": 26,
"text": "\n17 Jun, 2022"
},
{
"code": null,
"e": 212,
"s": 54,
"text": "In the previous post, we introduced union find algorithm and used it to detect cycle in a graph. We used following union() and find() operations for subsets."
},
{
"c... |
Numerical Methods and Calculus - GeeksforGeeks | 21 Jan, 2014
Which one of the following functions is continuous at x = 3?
D
C
B
A
A function is continuous at some point c, Value of f(x) defined for x > c = Value of f(x) defined for x < c = Value of f(x) defined for x = c All values are 2 in option A
Function f is known at the following points:
9.017
9... | [
{
"code": null,
"e": 31975,
"s": 31947,
"text": "\n21 Jan, 2014"
},
{
"code": null,
"e": 32038,
"s": 31975,
"text": "Which one of the following functions is continuous at x = 3? "
},
{
"code": null,
"e": 32043,
"s": 32040,
"text": "D "
},
{
"code": nu... |
Collection clear() method in Java with Examples | 29 Nov, 2018
The clear() of java.util.Collection interface is used to clear the Collection upon which it is called. This method does not take any parameter and does not returns any value.
Syntax:
Collection.clear()
Parameters: This method do not accept any parameter
Return Value: This method does not return any value.... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n29 Nov, 2018"
},
{
"code": null,
"e": 203,
"s": 28,
"text": "The clear() of java.util.Collection interface is used to clear the Collection upon which it is called. This method does not take any parameter and does not returns any value."... |
Find duplicates in constant array with elements 0 to N-1 in O(1) space | 01 Jul, 2022
Given a constant array of n elements which contains elements from 1 to n-1, with any of these numbers appearing any number of times. Find any one of these repeating numbers in O(n) and using only constant memory space.Examples:
Input : arr[] = {1, 2, 3, 4, 5, 6, 3}
Output : 3
As the given array is consta... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n01 Jul, 2022"
},
{
"code": null,
"e": 282,
"s": 52,
"text": "Given a constant array of n elements which contains elements from 1 to n-1, with any of these numbers appearing any number of times. Find any one of these repeating numbers i... |
Find out how much memory is being used by an object in Python | 23 Aug, 2021
In this article, we are going to see how to find out how much memory is being used by an object in Python. For this, we will use sys.getsizeof() function can be done to find the storage size of a particular object that occupies some space in the memory. This function returns the size of the object in bytes... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n23 Aug, 2021"
},
{
"code": null,
"e": 387,
"s": 28,
"text": "In this article, we are going to see how to find out how much memory is being used by an object in Python. For this, we will use sys.getsizeof() function can be done to find t... |
How to Create a Paint Application in Android? | 16 Feb, 2022
We all have once used the MS-Paint in our childhood, and when the system was shifted from desks to our palms, we started doodling on Instagram Stories, Hike, WhatsApp, and many more such apps. But have you ever thought about how these functionalities were brought to life? So, In this article, we will be di... | [
{
"code": null,
"e": 54,
"s": 26,
"text": "\n16 Feb, 2022"
},
{
"code": null,
"e": 620,
"s": 54,
"text": "We all have once used the MS-Paint in our childhood, and when the system was shifted from desks to our palms, we started doodling on Instagram Stories, Hike, WhatsApp, and ma... |
Python | Maximum and minimum element’s position in a list | 31 May, 2020
Given a list of N integers, find the maximum and minimum element’s position in the list.
Examples:
Input : 3, 4, 1, 3, 4, 5
Output : The maximum is at position 6
The minimum is at position 3
The naive approach will be to traverse in the list and keep track of the minimum and maximum along with... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n31 May, 2020"
},
{
"code": null,
"e": 117,
"s": 28,
"text": "Given a list of N integers, find the maximum and minimum element’s position in the list."
},
{
"code": null,
"e": 127,
"s": 117,
"text": "Examples:"
},
... |
How to add unique constraint in collection of MongoDB using Node.js? | 08 Feb, 2021
Mongoose module is one of the most powerful external modules of the node.js.Mongoose is a MongoDB ODM i.e (Object database Modelling) that used to translate the code and its representation from MongoDB to the Node.js server. Mongoose module provides several functions in order to manipulate the documents of... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n08 Feb, 2021"
},
{
"code": null,
"e": 376,
"s": 28,
"text": "Mongoose module is one of the most powerful external modules of the node.js.Mongoose is a MongoDB ODM i.e (Object database Modelling) that used to translate the code and its r... |
Parsing form data in express app manually without body-parser | 07 Oct, 2021
Parsing means accessing the data submitted by user with HTML form. When the form is submitted with the ‘GET’ method, data are appended in ‘query string’ and can access easily but when a form is submitted using the ‘POST’ method, it is somewhat difficult to get access over those data since they are encoded ... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n07 Oct, 2021"
},
{
"code": null,
"e": 532,
"s": 28,
"text": "Parsing means accessing the data submitted by user with HTML form. When the form is submitted with the ‘GET’ method, data are appended in ‘query string’ and can access easily ... |
What are the Operators that Can be and Cannot be Overloaded in C++? | 27 May, 2022
There are various ways to overload Operators in C++ by implementing any of the following types of functions:
1) Member Function
2) Non-Member Function
3) Friend Function
List of operators that can be overloaded are:
+
–
*
⁄
%
‸
&
|
~
!
=
<
>
+=
-=
*=
⁄=
%=
‸=
&=
|=
<<
>>
<<=
>>=
==
!=
<=
>=
&&
||
... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n27 May, 2022"
},
{
"code": null,
"e": 161,
"s": 52,
"text": "There are various ways to overload Operators in C++ by implementing any of the following types of functions:"
},
{
"code": null,
"e": 180,
"s": 161,
"text... |
Java implementation of Digital Signatures in Cryptography | 16 Jul, 2020
Digital Signatures are an Asymmetrically encrypted hash of a digital message(data). It is a value that can provide a guarantee of authenticity, non-repudiation, and integrity. In other terms, it means you can verify the sender, date & time and message content have not been revealed or compromised.
Note: Yo... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n16 Jul, 2020"
},
{
"code": null,
"e": 327,
"s": 28,
"text": "Digital Signatures are an Asymmetrically encrypted hash of a digital message(data). It is a value that can provide a guarantee of authenticity, non-repudiation, and integrity.... |
Python – Maximum String value length of Key | 04 May, 2020
Sometimes, while working with Python dictionaries, we can have a problem in which we need to find the maximum length of all the string values of particular key. This problem can occur in domains of day-day programming and web development. Let’s discuss certain ways in which this task can be performed.
Exam... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n04 May, 2020"
},
{
"code": null,
"e": 331,
"s": 28,
"text": "Sometimes, while working with Python dictionaries, we can have a problem in which we need to find the maximum length of all the string values of particular key. This problem c... |
How to put a border around a Frame in Python Tkinter? | To put a border around a Frame in Tkinter, we have to use the highlightbackground and highlightthickeness parameters while creating the Frame. Let's take an example and see how to use these two parameters.
Import the tkinter library and create an instance of tkinter frame.
Import the tkinter library and create an insta... | [
{
"code": null,
"e": 1393,
"s": 1187,
"text": "To put a border around a Frame in Tkinter, we have to use the highlightbackground and highlightthickeness parameters while creating the Frame. Let's take an example and see how to use these two parameters."
},
{
"code": null,
"e": 1461,
... |
GATE | GATE-CS-2004 | Question 83 | 28 Jun, 2021
The time complexity of the following C function is (assume n > 0)
int recursive (int n) { if (n == 1) return (1); else return (recursive (n - 1) + recursive (n - 1));}
(A) O(n)(B) O(n log n)(C) O(n2)(D) O(2n)Answer: (D)Explanation:
See Question 4 of https://www.geeksforgeeks.org/data-structur... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n28 Jun, 2021"
},
{
"code": null,
"e": 94,
"s": 28,
"text": "The time complexity of the following C function is (assume n > 0)"
},
{
"code": "int recursive (int n) { if (n == 1) return (1); else return (recursive (n... |
JPA - Entity Relationships | This chapter takes you through the relationships between Entities. Generally the relations are more effective between tables in the database. Here the entity classes are treated as relational tables (concept of JPA), therefore the relationships between Entity classes are as follows:
@ManyToOne Relation
@OneToMany Relat... | [
{
"code": null,
"e": 2157,
"s": 1873,
"text": "This chapter takes you through the relationships between Entities. Generally the relations are more effective between tables in the database. Here the entity classes are treated as relational tables (concept of JPA), therefore the relationships between ... |
Image Classification Pipeline with Intel Neural Compute Stick 2 (NCS2) | by Oleksii Sheremet | Towards Data Science | Introduction
What we’ll cover in this story:
Installing OpenVINO toolkit for Ubuntu.
Data preprocessing and model training with Google Colab.
Saving a TensorFlow model to protocol buffer (pb) format.
Converting a TensorFlow model to intermediate representation.
Running a trained model and prediction obtaining with NCS2... | [
{
"code": null,
"e": 184,
"s": 171,
"text": "Introduction"
},
{
"code": null,
"e": 216,
"s": 184,
"text": "What we’ll cover in this story:"
},
{
"code": null,
"e": 256,
"s": 216,
"text": "Installing OpenVINO toolkit for Ubuntu."
},
{
"code": null,
... |
Convert list into list of lists in Python | During data analysis we face scenarios to convert every element of a list into a sublist. So in this article we will need to take a normal list as an input and convert into a list of lists where each element becomes a sublist.
This is a very straight forward approach in which we create for loop to read each element. We... | [
{
"code": null,
"e": 1289,
"s": 1062,
"text": "During data analysis we face scenarios to convert every element of a list into a sublist. So in this article we will need to take a normal list as an input and convert into a list of lists where each element becomes a sublist."
},
{
"code": null... |
Spring Boot - Scheduling | Scheduling is a process of executing the tasks for the specific time period. Spring Boot provides a good support to write a scheduler on the Spring applications.
Java Cron expressions are used to configure the instances of CronTrigger, a subclass of org.quartz.Trigger. For more information about Java cron expression yo... | [
{
"code": null,
"e": 3187,
"s": 3025,
"text": "Scheduling is a process of executing the tasks for the specific time period. Spring Boot provides a good support to write a scheduler on the Spring applications."
},
{
"code": null,
"e": 3372,
"s": 3187,
"text": "Java Cron expression... |
How to generate lat and long coordinates from an address column using Pandas and Googlemaps API | by Tobi Sam | Towards Data Science | If you would like to plot map graphs using geographical coordinates from your address data, Google provides an API called Geocoding that lets you convert addresses to geographical coordinates and vice versa.
Geocoding is the process of converting addresses (like “1600 Amphitheatre Parkway, Mountain View, CA”) into geog... | [
{
"code": null,
"e": 380,
"s": 172,
"text": "If you would like to plot map graphs using geographical coordinates from your address data, Google provides an API called Geocoding that lets you convert addresses to geographical coordinates and vice versa."
},
{
"code": null,
"e": 678,
"... |
K-Nearest Neighbors Classification from Scratch with NumPy | by Levent Baş | Towards Data Science | Welcome to another post of implementing machine learning algorithms from scratch with NumPy. In this post, I will implement K-nearest neighbors (KNN) which is a machine learning algorithm that can be used both for classification and regression purposes. It falls under the category of supervised learning algorithms that... | [
{
"code": null,
"e": 684,
"s": 172,
"text": "Welcome to another post of implementing machine learning algorithms from scratch with NumPy. In this post, I will implement K-nearest neighbors (KNN) which is a machine learning algorithm that can be used both for classification and regression purposes. I... |
Text2emotion: Python package to detect emotions from textual data | by Amey Band | Towards Data Science | Emotion is the state of mind that is aligned with feelings, and thoughts usually directed toward a specific object. Emotion is a behavior that reflects personal significance or opinion regarding the interaction we have with other human beings or related to a certain event. The human being is able to identify the emotio... | [
{
"code": null,
"e": 647,
"s": 172,
"text": "Emotion is the state of mind that is aligned with feelings, and thoughts usually directed toward a specific object. Emotion is a behavior that reflects personal significance or opinion regarding the interaction we have with other human beings or related t... |
How to convert an int to string in C++? | You can use the itoa function from C to convert an int to string.
#include<iostream>
int main() {
int a = 10;
char *intStr = itoa(a);
string str = string(intStr);
cout << str;
}
This will give the output −
10
This will convert the integer to a string. In C++11, a new method, to_string was added that can be... | [
{
"code": null,
"e": 1129,
"s": 1062,
"text": "You can use the itoa function from C to convert an int to string. "
},
{
"code": null,
"e": 1253,
"s": 1129,
"text": "#include<iostream>\nint main() {\n int a = 10;\n char *intStr = itoa(a);\n string str = string(intStr);\n c... |
Python Pandas - Get the seconds from Timedelta object using integer input | To return the seconds from Timedelta object, use the timedelta.seconds property. At first, import the required libraries −
import pandas as pd
TimeDeltas is Python’s standard datetime library uses a different representation timedelta’s. Set integer input for seconds using unit 's'. Create a Timedelta object
timedelta =... | [
{
"code": null,
"e": 1185,
"s": 1062,
"text": "To return the seconds from Timedelta object, use the timedelta.seconds property. At first, import the required libraries −"
},
{
"code": null,
"e": 1205,
"s": 1185,
"text": "import pandas as pd"
},
{
"code": null,
"e": 13... |
Angular Material 7 - Paginator | The <mat-paginator>, an Angular Directive, is used to show a navigator with paged information.
In this chapter, we will showcase the configuration required to show a paginator using Angular Material.
Following is the content of the modified module descriptor app.module.ts.
import { BrowserModule } from '@angular/platfo... | [
{
"code": null,
"e": 2850,
"s": 2755,
"text": "The <mat-paginator>, an Angular Directive, is used to show a navigator with paged information."
},
{
"code": null,
"e": 2955,
"s": 2850,
"text": "In this chapter, we will showcase the configuration required to show a paginator using ... |
Performing Database Transactions using Python | Transactions are a mechanism that ensures data consistency. Transactions have the following four properties −
Atomicity − Either a transaction completes or nothing happens at all.
Consistency − A transaction must start in a consistent state and leave the system in a consistent state.
Isolation − Intermediate results of... | [
{
"code": null,
"e": 1172,
"s": 1062,
"text": "Transactions are a mechanism that ensures data consistency. Transactions have the following four properties −"
},
{
"code": null,
"e": 1242,
"s": 1172,
"text": "Atomicity − Either a transaction completes or nothing happens at all."
... |
How to merge date and time in R? - GeeksforGeeks | 11 Aug, 2021
The date and time objects in R programming language can be represented using character strings in R. The date and time objects can be merged together using POSIX format or in the form of datetime objects. The POSIXlt class stores date and time information.
Discussed below are various approaches to combine ... | [
{
"code": null,
"e": 26597,
"s": 26569,
"text": "\n11 Aug, 2021"
},
{
"code": null,
"e": 26854,
"s": 26597,
"text": "The date and time objects in R programming language can be represented using character strings in R. The date and time objects can be merged together using POSIX f... |
Insert value in sorted way in a sorted doubly linked list - GeeksforGeeks | 27 Oct, 2021
Given a sorted doubly linked list and a value to insert, write a function to insert the value in sorted way.Initial doubly linked list
Doubly Linked List after insertion of 9
Algorithm: Let input doubly linked list is sorted in increasing order. New node passed to the function contains data in the data p... | [
{
"code": null,
"e": 26661,
"s": 26633,
"text": "\n27 Oct, 2021"
},
{
"code": null,
"e": 26797,
"s": 26661,
"text": "Given a sorted doubly linked list and a value to insert, write a function to insert the value in sorted way.Initial doubly linked list "
},
{
"code": null,... |
How To Predict Values From A Custom R Model in Power BI | by Luca Zavarella | Towards Data Science | If you usually develop predictive models in R for your customers, you might need to provide them with a practical GUI to test their model. A really simple and convenient way would be to provide the users with as many sliders and/or combo boxes as the input features of the model, and a simple label showing the predicted... | [
{
"code": null,
"e": 670,
"s": 172,
"text": "If you usually develop predictive models in R for your customers, you might need to provide them with a practical GUI to test their model. A really simple and convenient way would be to provide the users with as many sliders and/or combo boxes as the inpu... |
Check whether the triangle is valid or not if angles are given - GeeksforGeeks | 27 Apr, 2021
Given three integers A, B and C which are the three angles of a possible triangle in degrees, the task is to check whether the triangle is valid or not.Examples:
Input: A = 60, B = 40, C = 80 Output: ValidInput: A = 55, B = 45, C = 60 Output: Invalid
Approach: A triangle is valid if the sum of the th... | [
{
"code": null,
"e": 25379,
"s": 25351,
"text": "\n27 Apr, 2021"
},
{
"code": null,
"e": 25543,
"s": 25379,
"text": "Given three integers A, B and C which are the three angles of a possible triangle in degrees, the task is to check whether the triangle is valid or not.Examples: ... |
How to do Fuzzy Matching on Pandas Dataframe Column Using Python? - GeeksforGeeks | 30 May, 2021
Prerequisite: FuzzyWuzzy
In this tutorial, we will learn how to do fuzzy matching on the pandas DataFrame column using Python. Fuzzy matching is a process that lets us identify the matches which are not exact but find a given pattern in our target item. Fuzzy matching is the basis of search engines. That i... | [
{
"code": null,
"e": 24318,
"s": 24290,
"text": "\n30 May, 2021"
},
{
"code": null,
"e": 24343,
"s": 24318,
"text": "Prerequisite: FuzzyWuzzy"
},
{
"code": null,
"e": 24718,
"s": 24343,
"text": "In this tutorial, we will learn how to do fuzzy matching on the p... |
Ensembling HuggingFaceTransformer models | by Rishab Banerjee | Towards Data Science | Recently while doing some research on question answering using BERT, I was suggested to ensemble 2 BERT models. I took the obvious route — google search. But to my surprise, nothing really came up. There was a plethora of articles about transformers, but nothing on how to ensemble transformer models. This article discu... | [
{
"code": null,
"e": 569,
"s": 171,
"text": "Recently while doing some research on question answering using BERT, I was suggested to ensemble 2 BERT models. I took the obvious route — google search. But to my surprise, nothing really came up. There was a plethora of articles about transformers, but ... |
The Essential IdeaVim Remaps. Reaching the mouseless productivity... | by Amine Elhattami | Towards Data Science | I’ve been using IdeaVim for both machine learning and general software projects for a while now. During my journey, I’ve compiled a list of essential remaps to take your mouseless development to the next level without sacrificing the robust features that Jetbrains IDEs provide. So if you’re more focused on the code you... | [
{
"code": null,
"e": 757,
"s": 172,
"text": "I’ve been using IdeaVim for both machine learning and general software projects for a while now. During my journey, I’ve compiled a list of essential remaps to take your mouseless development to the next level without sacrificing the robust features that ... |
String Interpolation in Dart Programming | There are times when we want to make use of variables inside the statement that is made up of string values.
We know that we can add two strings together in Dart with the help of the + symbol operator. But to make use of a variable in between the strings that we are concatenating, we need to add one more + symbol and t... | [
{
"code": null,
"e": 1171,
"s": 1062,
"text": "There are times when we want to make use of variables inside the statement that is made up of string values."
},
{
"code": null,
"e": 1469,
"s": 1171,
"text": "We know that we can add two strings together in Dart with the help of the... |
Difference between SVG and HTML 5 Canvas - GeeksforGeeks | 22 Apr, 2020
SVG: The Scalable Vector Graphics (SVG) is an XML-based image format that is used to define two-dimensional vector-based graphics for the web. Unlike raster image (Ex .jpg, .gif, .png, etc.), a vector image can be scaled up or down to any extent without losing the image quality.
An SVG image is drawn out u... | [
{
"code": null,
"e": 24920,
"s": 24892,
"text": "\n22 Apr, 2020"
},
{
"code": null,
"e": 25200,
"s": 24920,
"text": "SVG: The Scalable Vector Graphics (SVG) is an XML-based image format that is used to define two-dimensional vector-based graphics for the web. Unlike raster image ... |
Number of ways to choose K intersecting line segments on X-axis - GeeksforGeeks | 27 Dec, 2021
Given an array arr[] of line segments on the x-axis and an integer K, the task is to calculate the number of ways to choose the K line-segments such that they do intersect at any point. Since the answer can be large, print it to modulo 10^9+7.
Examples:
Input: arr[] = [[1, 3], [4, 5], [5, 7]], K = 2 Outp... | [
{
"code": null,
"e": 26027,
"s": 25999,
"text": "\n27 Dec, 2021"
},
{
"code": null,
"e": 26271,
"s": 26027,
"text": "Given an array arr[] of line segments on the x-axis and an integer K, the task is to calculate the number of ways to choose the K line-segments such that they do i... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.