title stringlengths 3 221 | text stringlengths 17 477k | parsed listlengths 0 3.17k |
|---|---|---|
Convert the column type from string to datetime format in Pandas dataframe - GeeksforGeeks | 05 Oct, 2020
While working with data in Pandas, it is not an unusual thing to encounter time series data, and we know Pandas is a very useful tool for working with time-series data in python.Let’s see how we can convert a dataframe column of strings (in dd/mm/yyyy format) to datetime format. We cannot perform any time ... | [
{
"code": null,
"e": 24777,
"s": 24749,
"text": "\n05 Oct, 2020"
},
{
"code": null,
"e": 25257,
"s": 24777,
"text": "While working with data in Pandas, it is not an unusual thing to encounter time series data, and we know Pandas is a very useful tool for working with time-series ... |
Epoch time in Perl | You can use the time() function in Perl to get epoch time, i.e., the numbers of seconds that have elapsed since a given date, in Unix is January 1, 1970.
Live Demo
#!/usr/local/bin/perl
$epoc = time();
print "Number of seconds since Jan 1, 1970 - $epoc\n";
When the above code is executed, it produces the following res... | [
{
"code": null,
"e": 1216,
"s": 1062,
"text": "You can use the time() function in Perl to get epoch time, i.e., the numbers of seconds that have elapsed since a given date, in Unix is January 1, 1970."
},
{
"code": null,
"e": 1227,
"s": 1216,
"text": " Live Demo"
},
{
"co... |
Persisting Data in ElectronJS - GeeksforGeeks | 13 Aug, 2020
ElectronJS is an Open Source Framework used for building Cross-Platform native desktop applications using web technologies such as HTML, CSS, and JavaScript which are capable of running on Windows, macOS, and Linux operating systems. It combines the Chromium engine and NodeJS into a Single Runtime.
All com... | [
{
"code": null,
"e": 25991,
"s": 25963,
"text": "\n13 Aug, 2020"
},
{
"code": null,
"e": 26291,
"s": 25991,
"text": "ElectronJS is an Open Source Framework used for building Cross-Platform native desktop applications using web technologies such as HTML, CSS, and JavaScript which ... |
Calculating the Power of a Number in Java Without Using Math pow() Method - GeeksforGeeks | 03 Mar, 2021
We need to calculate a number raised to the power of some other number without using the predefined function java.lang.Math.pow()
In Java, we can calculate the power of any number by :
Calculating the power of a number through while loop or for loop.Calculating the power of a number by the divide and conqu... | [
{
"code": null,
"e": 25371,
"s": 25343,
"text": "\n03 Mar, 2021"
},
{
"code": null,
"e": 25501,
"s": 25371,
"text": "We need to calculate a number raised to the power of some other number without using the predefined function java.lang.Math.pow()"
},
{
"code": null,
"... |
A Decent Guide to DataFrames in Spark 3.0 for Beginners | by David Vrba | Towards Data Science | Apache Spark is a distributed engine that provides a couple of APIs for the end-user to build data processing pipelines. The most commonly used API in Apache Spark 3.0 is the DataFrame API that is very popular especially because it is user-friendly, easy to use, very expressive (similarly to SQL), and in 3.0 quite rich... | [
{
"code": null,
"e": 689,
"s": 172,
"text": "Apache Spark is a distributed engine that provides a couple of APIs for the end-user to build data processing pipelines. The most commonly used API in Apache Spark 3.0 is the DataFrame API that is very popular especially because it is user-friendly, easy ... |
Can we have generic constructors in Java? | Generics is a concept in Java where you can enable a class, interface and, method, accept all (reference) types as parameters. In other words it is the concept which enables the users to choose the reference type that a method, constructor of a class accepts, dynamically. By defining a class as generic you are making i... | [
{
"code": null,
"e": 1430,
"s": 1062,
"text": "Generics is a concept in Java where you can enable a class, interface and, method, accept all (reference) types as parameters. In other words it is the concept which enables the users to choose the reference type that a method, constructor of a class ac... |
Construct Tree from Preorder Traversal | Practice | GeeksforGeeks | Construct a binary tree of size N using two given arrays pre[] and preLN[]. Array pre[] represents preorder traversal of a binary tree. Array preLN[] has only two possible values L and N. The value L in preLN[] indicates that the corresponding node in Binary Tree is a leaf node and value N indicates that the correspond... | [
{
"code": null,
"e": 651,
"s": 238,
"text": "Construct a binary tree of size N using two given arrays pre[] and preLN[]. Array pre[] represents preorder traversal of a binary tree. Array preLN[] has only two possible values L and N. The value L in preLN[] indicates that the corresponding node in Bin... |
C++ Program For Reversing A Linked List In Groups Of Given Size - Set 2 - GeeksforGeeks | 11 Jan, 2022
Given a linked list, write a function to reverse every k nodes (where k is an input to the function). Examples:
Input: 1->2->3->4->5->6->7->8->NULL and k = 3
Output: 3->2->1->6->5->4->8->7->NULL.
Input: 1->2->3->4->5->6->7->8->NULL and k = 5
Output: 5->4->3->2->1->8->7->6->NULL.
We have already discusse... | [
{
"code": null,
"e": 24200,
"s": 24172,
"text": "\n11 Jan, 2022"
},
{
"code": null,
"e": 24312,
"s": 24200,
"text": "Given a linked list, write a function to reverse every k nodes (where k is an input to the function). Examples:"
},
{
"code": null,
"e": 24483,
"s"... |
Using conda on an M1 Mac. Run multiple conda distributions to get... | by Nils Flaschel | Towards Data Science | If you recently bought or got a new M1 Mac from work and you are using Python to develop or work on data science projects you probably already wasted some hours trying to get some packages to run. I still struggle a lot with Python, Docker, and conda on my Mac, but I found a way to get many packages to run inside conda... | [
{
"code": null,
"e": 506,
"s": 171,
"text": "If you recently bought or got a new M1 Mac from work and you are using Python to develop or work on data science projects you probably already wasted some hours trying to get some packages to run. I still struggle a lot with Python, Docker, and conda on m... |
C program to count Positive and Negative numbers in an Array - GeeksforGeeks | 22 Apr, 2020
Given an array arr of integers of size N, the task is to find the count of positive numbers and negative numbers in the array
Examples:
Input: arr[] = {2, -1, 5, 6, 0, -3}Output:Positive elements = 3Negative elements = 2There are 3 positive, 2 negative, and 1 zero.
Input: arr[] = {4, 0, -2, -9, -7, 1}Outpu... | [
{
"code": null,
"e": 25013,
"s": 24985,
"text": "\n22 Apr, 2020"
},
{
"code": null,
"e": 25139,
"s": 25013,
"text": "Given an array arr of integers of size N, the task is to find the count of positive numbers and negative numbers in the array"
},
{
"code": null,
"e": ... |
Deleting a Label in Python Tkinter | Tkinter label widgets are used to display text and images in the application. We can also configure the properties of Label widget that are created by default in a tkinter application.
If we want to delete a label that is defined in a tkinter application, then we have to use the destroy() method.
In this example, we wi... | [
{
"code": null,
"e": 1247,
"s": 1062,
"text": "Tkinter label widgets are used to display text and images in the application. We can also configure the properties of Label widget that are created by default in a tkinter application."
},
{
"code": null,
"e": 1360,
"s": 1247,
"text"... |
Python - MySQL Database Access | The Python standard for database interfaces is the Python DB-API. Most Python database interfaces adhere to this standard.
You can choose the right database for your application. Python Database API supports a wide range of database servers such as −
GadFly
mSQL
MySQL
PostgreSQL
Microsoft SQL Server 2000
Informix
Inter... | [
{
"code": null,
"e": 2367,
"s": 2244,
"text": "The Python standard for database interfaces is the Python DB-API. Most Python database interfaces adhere to this standard."
},
{
"code": null,
"e": 2495,
"s": 2367,
"text": "You can choose the right database for your application. Pyt... |
How to sort an ArrayList in Ascending Order in Java - GeeksforGeeks | 11 Dec, 2018
Given an unsorted ArrayList, the task is to sort this ArrayList in ascending order in Java.
Examples:
Input: Unsorted ArrayList: [Geeks, For, ForGeeks, GeeksForGeeks, A computer portal]Output: Sorted ArrayList: [A computer portal, For, ForGeeks, Geeks, GeeksForGeeks]
Input: Unsorted ArrayList: [Geeks, For,... | [
{
"code": null,
"e": 24546,
"s": 24518,
"text": "\n11 Dec, 2018"
},
{
"code": null,
"e": 24638,
"s": 24546,
"text": "Given an unsorted ArrayList, the task is to sort this ArrayList in ascending order in Java."
},
{
"code": null,
"e": 24648,
"s": 24638,
"text":... |
How can I remove everything inside of a <div> using jQuery? | To remove everything inside a div element, use the remove() method. You can try to run the following code to remove everything inside a <div> element −
Live Demo
<!DOCTYPE html>
<html>
<head>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script>
<script>
$(document).ready(function(){
... | [
{
"code": null,
"e": 1214,
"s": 1062,
"text": "To remove everything inside a div element, use the remove() method. You can try to run the following code to remove everything inside a <div> element −"
},
{
"code": null,
"e": 1224,
"s": 1214,
"text": "Live Demo"
},
{
"code"... |
Kibana - Creating Reports Using Kibana | Reports can be easily created by using the Share button available in Kibana UI.
Reports in Kibana are available in the following two forms −
Permalinks
CSV Report
When performing visualization, you can share the same as follows −
Use the share button to share the visualization with others as Embed Code or Permalinks.
I... | [
{
"code": null,
"e": 2185,
"s": 2105,
"text": "Reports can be easily created by using the Share button available in Kibana UI."
},
{
"code": null,
"e": 2246,
"s": 2185,
"text": "Reports in Kibana are available in the following two forms −"
},
{
"code": null,
"e": 2257... |
C# | Math.Exp() Method - GeeksforGeeks | 01 Feb, 2019
In C#, Exp() is a Math class method which is used to return the e raised to the specified power. Here e is a mathematical constant whose value is approximately 2.71828. Exp() is the inverse of Log().
Syntax:
public static double Exp (double num);
Parameter:
num: It is the required number of type System.Dou... | [
{
"code": null,
"e": 24394,
"s": 24366,
"text": "\n01 Feb, 2019"
},
{
"code": null,
"e": 24594,
"s": 24394,
"text": "In C#, Exp() is a Math class method which is used to return the e raised to the specified power. Here e is a mathematical constant whose value is approximately 2.7... |
DAX Date & Time - TODAY function | Returns the current date.
TODAY ()
No parameters for this function.
Current date in datetime format.
DAX TODAY function is useful when you need to have the current date displayed on a workbook, regardless of when you open the workbook. It is also useful for calculating intervals.
DAX functions - TODAY and NOW both re... | [
{
"code": null,
"e": 2027,
"s": 2001,
"text": "Returns the current date."
},
{
"code": null,
"e": 2038,
"s": 2027,
"text": "TODAY () \n"
},
{
"code": null,
"e": 2071,
"s": 2038,
"text": "No parameters for this function."
},
{
"code": null,
"e": 210... |
Hamming Distance between two strings - GeeksforGeeks | 19 May, 2021
You are given two strings of equal length, you have to find the Hamming Distance between these string. Where the Hamming distance between two strings of equal length is the number of positions at which the corresponding character is different. Examples:
Input : str1[] = "geeksforgeeks", str2[] = "geeksand... | [
{
"code": null,
"e": 26617,
"s": 26589,
"text": "\n19 May, 2021"
},
{
"code": null,
"e": 26872,
"s": 26617,
"text": "You are given two strings of equal length, you have to find the Hamming Distance between these string. Where the Hamming distance between two strings of equal leng... |
How to add sleep/wait function before continuing in JavaScript? - GeeksforGeeks | 17 Sep, 2019
JavaScript, unlike other languages, does not have any method to simulate a sleep() function. There are some approaches that can be used to simulate a sleep function.
Method 1: Using an infinite loop to keep checking for the elapsed timeThe time that the sleep function starts is first found using the new Da... | [
{
"code": null,
"e": 26545,
"s": 26517,
"text": "\n17 Sep, 2019"
},
{
"code": null,
"e": 26711,
"s": 26545,
"text": "JavaScript, unlike other languages, does not have any method to simulate a sleep() function. There are some approaches that can be used to simulate a sleep functio... |
SymPy - Installation | SymPy has one important prerequisite library named mpmath. It is a Python library for real and complex floating-point arithmetic with arbitrary precision. However, Python's package installer PIP installs it automatically when SymPy is installed as follows −
pip install sympy
Other Python distributions such as Anaconda... | [
{
"code": null,
"e": 2277,
"s": 2019,
"text": "SymPy has one important prerequisite library named mpmath. It is a Python library for real and complex floating-point arithmetic with arbitrary precision. However, Python's package installer PIP installs it automatically when SymPy is installed as follo... |
\Bigg - Tex Command | \Bigg - Used to obtain various-sized delimiters.
{ \Bigg }
\Bigg commands are used to obtain various-sized delimiters.
\Bigg[
[
\Bigg[
[
\bigg[
[
\Big[
[
\Big[
[
[
[
\Bigg[
[
\Bigg[
\Bigg[
[
\Bigg[
\bigg[
[
\bigg[
\Big[
[
\Big[
\Big[
[
\Big[
[
[
[
14 Lectures... | [
{
"code": null,
"e": 8035,
"s": 7986,
"text": "\\Bigg - Used to obtain various-sized delimiters."
},
{
"code": null,
"e": 8045,
"s": 8035,
"text": "{ \\Bigg }"
},
{
"code": null,
"e": 8105,
"s": 8045,
"text": "\\Bigg commands are used to obtain various-sized d... |
PHP | DateTime diff() Function | 10 Oct, 2019
The DateTime::diff() function is an inbuilt function in PHP which is used to return the difference between two given DateTime objects.
Syntax:
Object oriented style:DateInterval DateTime::diff( DateTimeInterface $datetime2,
bool $absolute = FALSE )orDateInterval DateTimeIm... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n10 Oct, 2019"
},
{
"code": null,
"e": 163,
"s": 28,
"text": "The DateTime::diff() function is an inbuilt function in PHP which is used to return the difference between two given DateTime objects."
},
{
"code": null,
"e": 171... |
C# | Check if the Hashtable contains a specific Key | 01 Feb, 2019
The Hashtable class represents a collection of key-and-value pairs that are organized based on the hash code of the key. The key is used to access the items in the collection. Hashtable.ContainsKey(Object) Method is used to check whether the Hashtable contains a specific key or not.
Syntax:
public virtual ... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n01 Feb, 2019"
},
{
"code": null,
"e": 312,
"s": 28,
"text": "The Hashtable class represents a collection of key-and-value pairs that are organized based on the hash code of the key. The key is used to access the items in the collection.... |
GATE | GATE CS 2019 | Question 11 | 16 Aug, 2021
A certain processor uses a fully associative cache of size 16 kB, The cache block size is 16 bytes. Assume that the main memory is byte addressable and uses a 32-bit address. How many bits are required for the Tag and the Index fields respectively in the addresses generated by the processor?
(A) 24 bits an... | [
{
"code": null,
"e": 54,
"s": 26,
"text": "\n16 Aug, 2021"
},
{
"code": null,
"e": 347,
"s": 54,
"text": "A certain processor uses a fully associative cache of size 16 kB, The cache block size is 16 bytes. Assume that the main memory is byte addressable and uses a 32-bit address.... |
How to Change FTP Port in Linux? | 24 Feb, 2021
Files are either uploaded or downloaded to the FTP server. The files are moved from a personal computer to the server when you upload files. The files are moved from the cloud to your personal computer when the files are downloaded. In order to transfer files through FTP, TCP/IP (Transmission Control Proto... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n24 Feb, 2021"
},
{
"code": null,
"e": 426,
"s": 28,
"text": "Files are either uploaded or downloaded to the FTP server. The files are moved from a personal computer to the server when you upload files. The files are moved from the cloud... |
How to fetch data from an API in ReactJS ? | 18 Aug, 2021
ReactJS: ReactJS is a declarative, efficient, and flexible JavaScript library for building user interfaces. It’s ‘V’ in MVC. ReactJS is an open-source, component-based front-end library responsible only for the view layer of the application. It is maintained by Facebook.
API: API is an abbreviation for App... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n18 Aug, 2021"
},
{
"code": null,
"e": 324,
"s": 52,
"text": "ReactJS: ReactJS is a declarative, efficient, and flexible JavaScript library for building user interfaces. It’s ‘V’ in MVC. ReactJS is an open-source, component-based front-... |
Minimum possible travel cost among N cities | 04 Aug, 2021
There are N cities situated on a straight road and each is separated by a distance of 1 unit. You have to reach the (N + 1)th city by boarding a bus. The ith city would cost of C[i] dollars to travel 1 unit of distance. In other words, cost to travel from the ith city to the jth city is abs(i – j ) * C[i] ... | [
{
"code": null,
"e": 54,
"s": 26,
"text": "\n04 Aug, 2021"
},
{
"code": null,
"e": 483,
"s": 54,
"text": "There are N cities situated on a straight road and each is separated by a distance of 1 unit. You have to reach the (N + 1)th city by boarding a bus. The ith city would cost ... |
MATLAB - The switch Statement | A switch block conditionally executes one set of statements from several choices. Each choice is covered by a case statement.
An evaluated switch_expression is a scalar or string.
An evaluated case_expression is a scalar, a string or a cell array of scalars or strings.
The switch block tests each case until one of the ... | [
{
"code": null,
"e": 2401,
"s": 2275,
"text": "A switch block conditionally executes one set of statements from several choices. Each choice is covered by a case statement."
},
{
"code": null,
"e": 2455,
"s": 2401,
"text": "An evaluated switch_expression is a scalar or string."
... |
Kotlin annotations | 09 Sep, 2021
Annotations are a feature of Kotlin that allows the programmer to embed supplemental information into the source file. This information, however, does not changes the actions of the program. This information is used by various tools during both development and deployment.Annotations contains the following ... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n09 Sep, 2021"
},
{
"code": null,
"e": 406,
"s": 28,
"text": "Annotations are a feature of Kotlin that allows the programmer to embed supplemental information into the source file. This information, however, does not changes the actions ... |
Java String Class strip() Method With Examples | 02 Feb, 2021
Java String Class strip() method returns a string that provides a string with all leading and trailing white spaces removed. This method is similar to the String.trim() method. There are basically 3 methods by which we can remove white spaces in a different manner.
strip() Method: It returns a string, with... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n02 Feb, 2021"
},
{
"code": null,
"e": 294,
"s": 28,
"text": "Java String Class strip() method returns a string that provides a string with all leading and trailing white spaces removed. This method is similar to the String.trim() method... |
GATE | GATE-CS-2001 | Question 27 | 28 Jun, 2021
Consider the following statements:
S1: There exists infinite sets A, B, C such that
A ∩ (B ∪ C) is finite.
S2: There exists two irrational numbers x and y such
that (x+y) is rational.
Which of the following is true about S1 and S2?(A) Only S1 is correct(B) Only S2 is correct(C) Both S1 and S2 are ... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n28 Jun, 2021"
},
{
"code": null,
"e": 63,
"s": 28,
"text": "Consider the following statements:"
},
{
"code": null,
"e": 221,
"s": 63,
"text": "S1: There exists infinite sets A, B, C such that \n A ∩ (B ∪ C) is fin... |
Python | Scramble strings in list | 29 Nov, 2019
Sometimes, while working with different applications, we can come across a problem in which we require to shuffle all the strings in the list input we get. This kind of problem can particularly occur in gaming domain. Let’s discuss certain ways in which this problem can be solved.
Method #1 : Using list co... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n29 Nov, 2019"
},
{
"code": null,
"e": 310,
"s": 28,
"text": "Sometimes, while working with different applications, we can come across a problem in which we require to shuffle all the strings in the list input we get. This kind of proble... |
How to change the playing speed of videos in HTML5? | Use the playbackRate property sets the current playback speed of the audio/video. With that, the defaultPlaybackRate property sets the default playback speed of the audio/video.
You can try to run the following code to change the playing speed of videos −
/* play video thrice as fast */
document.querySelector('video').... | [
{
"code": null,
"e": 1240,
"s": 1062,
"text": "Use the playbackRate property sets the current playback speed of the audio/video. With that, the defaultPlaybackRate property sets the default playback speed of the audio/video."
},
{
"code": null,
"e": 1318,
"s": 1240,
"text": "You ... |
Assigning an integer to float and comparison in C/C++ | The integer is a data type used to define a number that contains all positive, negative or zero non-fractional values. These cannot have decimals.
Float is a data type used to define a number that has a fractional value. These can have decimals also.
Now, we will check what will be the value of float and integer return... | [
{
"code": null,
"e": 1209,
"s": 1062,
"text": "The integer is a data type used to define a number that contains all positive, negative or zero non-fractional values. These cannot have decimals."
},
{
"code": null,
"e": 1313,
"s": 1209,
"text": "Float is a data type used to define... |
Variables in C++ - GeeksforGeeks | 04 Aug, 2021
A variable is a name given to a memory location. It is the basic unit of storage in a program.
The value stored in a variable can be changed during program execution.
A variable is only a name given to a memory location, all the operations done on the variable effects that memory location.
In C++, all the... | [
{
"code": null,
"e": 26569,
"s": 26541,
"text": "\n04 Aug, 2021"
},
{
"code": null,
"e": 26665,
"s": 26569,
"text": "A variable is a name given to a memory location. It is the basic unit of storage in a program. "
},
{
"code": null,
"e": 26737,
"s": 26665,
"te... |
C# - ArrayList Class | It represents an ordered collection of an object that can be indexed individually. It is basically an alternative to an array. However, unlike array you can add and remove items from a list at a specified position using an index and the array resizes itself automatically. It also allows dynamic memory allocation, addin... | [
{
"code": null,
"e": 2634,
"s": 2270,
"text": "It represents an ordered collection of an object that can be indexed individually. It is basically an alternative to an array. However, unlike array you can add and remove items from a list at a specified position using an index and the array resizes it... |
Program to Convert Centimeter to Feet and Inches in C | Given with the length into centimeter as an input, the task is to convert the given length into feet and inches
We can use length conversion formula for this −
1 feet = 30.48 cm
1 inche = 2.54 cm
Input-: centimetre = 100
Output -: Length in meter = 3m
Length in Kilometer = 0.003km
Start
Step 1 -> Declare function to... | [
{
"code": null,
"e": 1174,
"s": 1062,
"text": "Given with the length into centimeter as an input, the task is to convert the given length into feet and inches"
},
{
"code": null,
"e": 1222,
"s": 1174,
"text": "We can use length conversion formula for this −"
},
{
"code": ... |
Ford Fulkerson Algorithm | The Ford-Fulkerson algorithm is used to detect maximum flow from start vertex to sink vertex in a given graph. In this graph, every edge has the capacity. Two vertices are provided named Source and Sink. The source vertex has all outward edge, no inward edge, and the sink will have all inward edge no outward edge.
Ther... | [
{
"code": null,
"e": 1378,
"s": 1062,
"text": "The Ford-Fulkerson algorithm is used to detect maximum flow from start vertex to sink vertex in a given graph. In this graph, every edge has the capacity. Two vertices are provided named Source and Sink. The source vertex has all outward edge, no inward... |
Get specific value of cell in MySQL | Let us first create a table −
mysql> create table DemoTable
(
Name varchar(40),
Score int
);
Query OK, 0 rows affected (0.72 sec)
Insert some records in the table using insert command −
mysql> insert into DemoTable values('Chris Brown',78);
Query OK, 1 row affected (0.13 sec)
mysql> insert into DemoTable values('... | [
{
"code": null,
"e": 1092,
"s": 1062,
"text": "Let us first create a table −"
},
{
"code": null,
"e": 1198,
"s": 1092,
"text": "mysql> create table DemoTable\n(\n Name varchar(40),\n Score int\n);\nQuery OK, 0 rows affected (0.72 sec)"
},
{
"code": null,
"e": 1254... |
Introduction to Graphs (Part 1). Main concepts, properties, and... | by Maël Fabien | Towards Data Science | Graphs are becoming central to machine learning these days, whether you’d like to understand the structure of a social network by predicting potential connections, detecting fraud, understand customer’s behavior of a car rental service or making real-time recommendations for example.
In this article, we’ll cover the fo... | [
{
"code": null,
"e": 456,
"s": 171,
"text": "Graphs are becoming central to machine learning these days, whether you’d like to understand the structure of a social network by predicting potential connections, detecting fraud, understand customer’s behavior of a car rental service or making real-time... |
Make multiple checkboxes appear on the same line with Bootstrap | Use the .checkbox-line class in Bootstrap to make multiple checkboxes appear on the same line:
Live Demo
<!DOCTYPE html>
<html>
<head>
<title>Bootstrap Example</title>
<link href = "/bootstrap/css/bootstrap.min.css" rel = "stylesheet">
<script src = "/scripts/jquery.min.js"></script>
<script ... | [
{
"code": null,
"e": 1157,
"s": 1062,
"text": "Use the .checkbox-line class in Bootstrap to make multiple checkboxes appear on the same line:"
},
{
"code": null,
"e": 1167,
"s": 1157,
"text": "Live Demo"
},
{
"code": null,
"e": 2004,
"s": 1167,
"text": "<!DOCT... |
How to remove lines starting with any prefix using Python? | 29 Dec, 2020
Given a text file, read the content of that text file line by line and print only those lines which do not start with defined prefix. Also store those printed lines in another text file. There are following ways in which this task can be done:
Method 1: Using loop and startswith().
In this method, we read ... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n29 Dec, 2020"
},
{
"code": null,
"e": 272,
"s": 28,
"text": "Given a text file, read the content of that text file line by line and print only those lines which do not start with defined prefix. Also store those printed lines in another... |
Deploying an Image Classifier using JavaScript | by Sushrut Ashtikar | Towards Data Science | Yet another way of inferencing an image classification model for reducing inference time by directly deploying in a static website or nodejs web application.
Deploying a machine learning model can be fun. You have to make sure you have setup with hardware and software optimized pipeline and boom your model is ready for... | [
{
"code": null,
"e": 330,
"s": 172,
"text": "Yet another way of inferencing an image classification model for reducing inference time by directly deploying in a static website or nodejs web application."
},
{
"code": null,
"e": 832,
"s": 330,
"text": "Deploying a machine learning... |
C | Storage Classes and Type Qualifiers | Question 9 - GeeksforGeeks | 28 Jun, 2021
Output?
#include <stdio.h>int fun(){ static int num = 16; return num--;} int main(){ for(fun(); fun(); fun()) printf("%d ", fun()); return 0;}
(A) Infinite loop(B) 13 10 7 4 1(C) 14 11 8 5 2(D) 15 12 8 5 2Answer: (C)Explanation: Since num is static in fun(), the old value of num is preserved for su... | [
{
"code": null,
"e": 25014,
"s": 24986,
"text": "\n28 Jun, 2021"
},
{
"code": null,
"e": 25022,
"s": 25014,
"text": "Output?"
},
{
"code": "#include <stdio.h>int fun(){ static int num = 16; return num--;} int main(){ for(fun(); fun(); fun()) printf(\"%d \", fun());... |
Find length of Diagonal of Hexagon - GeeksforGeeks | 08 Mar, 2022
Given a regular hexagon of side length a, the task is to find the length of it’s diagonal.Examples:
Input : a = 4
Output : 8
Input : a = 7
Output : 14
From the diagram, it is clear that the triangle ABC is an equilateral triangle, so AB = AC = BC = a.also it is obvious, diagonal = 2*AC or 2*BC So th... | [
{
"code": null,
"e": 24844,
"s": 24816,
"text": "\n08 Mar, 2022"
},
{
"code": null,
"e": 24946,
"s": 24844,
"text": "Given a regular hexagon of side length a, the task is to find the length of it’s diagonal.Examples: "
},
{
"code": null,
"e": 24998,
"s": 24946,
... |
How to enable Pandas to access BigQuery from a service account | by Lak Lakshmanan | Towards Data Science | Service accounts are a way to keep a tight leash on what your applications in Google Cloud Platform are doing. Instead of running your applications with all the permissions your user account has, you typically want the application to have extremely constrained access to your organization’s resources.
Let’s say that you... | [
{
"code": null,
"e": 474,
"s": 172,
"text": "Service accounts are a way to keep a tight leash on what your applications in Google Cloud Platform are doing. Instead of running your applications with all the permissions your user account has, you typically want the application to have extremely constr... |
Building a Biomedical Knowledge Graph | by Daniel Crowe | Towards Data Science | Debrief from a Vaticle Community talk — featuring Konrad Myśliwiec, Scientist, Systems Biology, at Roche. This talk was delivered virtually at Orbit 2021 in April.
Konrad, like so many TypeDB community members, comes from a diverse engineering background. Knowledge graphs have been part of his scope since working on a... | [
{
"code": null,
"e": 212,
"s": 47,
"text": "Debrief from a Vaticle Community talk — featuring Konrad Myśliwiec, Scientist, Systems Biology, at Roche. This talk was delivered virtually at Orbit 2021 in April."
},
{
"code": null,
"e": 738,
"s": 212,
"text": "Konrad, like so many T... |
Categorical Representation of Data in Julia - GeeksforGeeks | 15 Sep, 2021
Julia is a high performance, dynamic programming language that is easy to learn as it is a high-level language. But sometimes, when dealing with data in programming languages like Julia, we encounter structures or representations with a small number of levels as represented below.
Julia
# Creating an array... | [
{
"code": null,
"e": 24544,
"s": 24516,
"text": "\n15 Sep, 2021"
},
{
"code": null,
"e": 24826,
"s": 24544,
"text": "Julia is a high performance, dynamic programming language that is easy to learn as it is a high-level language. But sometimes, when dealing with data in programmin... |
Sieve of Eratosthenes - Finding prime numbers less than a given number - 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
In this tutorial, we will see how to find all... | [
{
"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,
... |
Which is the fastest algorithm to find prime numbers using C++? | The Sieve of Eratosthenes is one of the most efficient ways to find the prime numbers smaller than n when n is smaller than around 10 million.
A program that demonstrates the Sieve of Eratosthenes is given as follows.
#include <bits/stdc++.h>
using namespace std;
void SieveOfEratosthenes(int num) {
bool pno[num+1];
... | [
{
"code": null,
"e": 1205,
"s": 1062,
"text": "The Sieve of Eratosthenes is one of the most efficient ways to find the prime numbers smaller than n when n is smaller than around 10 million."
},
{
"code": null,
"e": 1280,
"s": 1205,
"text": "A program that demonstrates the Sieve o... |
Minimum replacements with any positive integer to make the array K-increasing - GeeksforGeeks | 15 Feb, 2022
Given an array arr[] of N positive integers and an integer K, The task is to replace minimum number of elements with any positive integer to make the array K-increasing. An array is K-increasing if for every index i in range [K, N), arr[i] ≥ arr[i-K]
Examples:
Input: arr[] = {4, 1, 5, 2, 6, 2}, k = 2Outpu... | [
{
"code": null,
"e": 25600,
"s": 25572,
"text": "\n15 Feb, 2022"
},
{
"code": null,
"e": 25852,
"s": 25600,
"text": "Given an array arr[] of N positive integers and an integer K, The task is to replace minimum number of elements with any positive integer to make the array K-incre... |
Find a specific pair in Matrix - GeeksforGeeks | 12 Apr, 2021
Given an n x n matrix mat[n][n] of integers, find the maximum value of mat(c, d) – mat(a, b) over all choices of indexes such that both c > a and d > b.Example:
Input:
mat[N][N] = {{ 1, 2, -1, -4, -20 },
{ -8, -3, 4, 2, 1 },
{ 3, 8, 6, 1, 3 },
{ -4, -1, 1, 7, -6 },... | [
{
"code": null,
"e": 24996,
"s": 24965,
"text": " \n12 Apr, 2021\n"
},
{
"code": null,
"e": 25158,
"s": 24996,
"text": "Given an n x n matrix mat[n][n] of integers, find the maximum value of mat(c, d) – mat(a, b) over all choices of indexes such that both c > a and d > b.Example:... |
ML | Unsupervised Face Clustering Pipeline - GeeksforGeeks | 29 Nov, 2021
Live face-recognition is a problem that automated security division still face. With the advancements in Convolutions Neural Networks and specifically creative ways of Region-CNN, it’s already confirmed that with our current technologies, we can opt for supervised learning options such as FaceNet, YOLO for... | [
{
"code": null,
"e": 24344,
"s": 24316,
"text": "\n29 Nov, 2021"
},
{
"code": null,
"e": 24941,
"s": 24344,
"text": "Live face-recognition is a problem that automated security division still face. With the advancements in Convolutions Neural Networks and specifically creative way... |
How to install Elasticsearch on Windows 10 - 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
In this tutorials, we will show how to instal... | [
{
"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,
... |
How to use an Image as a button in Tkinter? | In this example, we will create a rounded button in a window that can be used in
many other applications like forms, games, dialogue boxes, etc.
The best way to create rounded buttons in Tkinter is to use the desired images of buttons and turn it into a clickable button in the frame. That is really possible by using Ph... | [
{
"code": null,
"e": 1207,
"s": 1062,
"text": "In this example, we will create a rounded button in a window that can be used in\nmany other applications like forms, games, dialogue boxes, etc."
},
{
"code": null,
"e": 1447,
"s": 1207,
"text": "The best way to create rounded butto... |
Constructor-based Dependency Injection | Constructor-based DI is accomplished when the container invokes a class constructor with a number of arguments, each representing a dependency on the other class.
The following example shows a class TextEditor that can only be dependency-injected with constructor injection.
Let us have a working Eclipse IDE in place an... | [
{
"code": null,
"e": 2455,
"s": 2292,
"text": "Constructor-based DI is accomplished when the container invokes a class constructor with a number of arguments, each representing a dependency on the other class."
},
{
"code": null,
"e": 2567,
"s": 2455,
"text": "The following examp... |
p5.js | vertex() Function - GeeksforGeeks | 31 May, 2020
The vertex() function in p5.js is used to specify the coordinates of the vertices used to draw a shape. It can only be used with the beginShape() and endShape() functions to make various shapes and curves like points, lines, triangles, quads and polygons.
Syntax:
vertex( x, y )
OR
vertex( x, y, z, [u], [v]... | [
{
"code": null,
"e": 24991,
"s": 24963,
"text": "\n31 May, 2020"
},
{
"code": null,
"e": 25247,
"s": 24991,
"text": "The vertex() function in p5.js is used to specify the coordinates of the vertices used to draw a shape. It can only be used with the beginShape() and endShape() fu... |
Apache POI PPT - Images | In this chapter, you will learn how to add an image to a PPT and how to read an image from it.
You can add images to a presentation using the createPicture() method of XSLFSlide. This method accepts image in the form of byte array format. Therefore, you have to create a byte array of the image that is to be added to th... | [
{
"code": null,
"e": 2112,
"s": 2017,
"text": "In this chapter, you will learn how to add an image to a PPT and how to read an image from it."
},
{
"code": null,
"e": 2353,
"s": 2112,
"text": "You can add images to a presentation using the createPicture() method of XSLFSlide. Thi... |
PHP Throwing Exceptions | Throwable interface is implemented by Error and Exception class. All predefined Error classes are inherited from Error class. Instance of corresponding Error class is thrown inside try block and processed inside appropriate catch block.
Normal execution (when no exception is thrown within the try block) will continue a... | [
{
"code": null,
"e": 1299,
"s": 1062,
"text": "Throwable interface is implemented by Error and Exception class. All predefined Error classes are inherited from Error class. Instance of corresponding Error class is thrown inside try block and processed inside appropriate catch block."
},
{
"c... |
Difference Between Cellpadding and Cellspacing | In this post, we will understand the difference between cellpadding and cell spacing.
It is associated with a single cell.
It is associated with a single cell.
It helps control the white space that is present between the border of the cell and the contents within the cell.
It helps control the white space that is prese... | [
{
"code": null,
"e": 1148,
"s": 1062,
"text": "In this post, we will understand the difference between cellpadding and cell spacing."
},
{
"code": null,
"e": 1185,
"s": 1148,
"text": "It is associated with a single cell."
},
{
"code": null,
"e": 1222,
"s": 1185,
... |
How to find a replace a word in a string in C#? | Firstly, set the string to be replaced.
string str = "Demo text!";
Now use the replace() method to replace the above string.
string res = str.Replace("Demo ", "New ");
The following is the complete code to replace a word in a string.
Live Demo
using System;
public class Demo {
public static void Main() {
str... | [
{
"code": null,
"e": 1102,
"s": 1062,
"text": "Firstly, set the string to be replaced."
},
{
"code": null,
"e": 1129,
"s": 1102,
"text": "string str = \"Demo text!\";"
},
{
"code": null,
"e": 1187,
"s": 1129,
"text": "Now use the replace() method to replace th... |
What is a static polymorphism in C#? | Static Polymorphism is the linking of a function with an object during compile time is called static. It is also called static binding. C# provides two techniques to implement static polymorphism i.e. Function overloading and Operator overloading.
Let us learn about Function Overloading. You can have multiple definitio... | [
{
"code": null,
"e": 1310,
"s": 1062,
"text": "Static Polymorphism is the linking of a function with an object during compile time is called static. It is also called static binding. C# provides two techniques to implement static polymorphism i.e. Function overloading and Operator overloading."
},... |
How to use Try/catch blocks in C#? | Exceptions provide a way to transfer control from one part of a program to another. C# exception handling is built upon four keywords: try, catch, finally, and throw.
try − A try block identifies a block of code for which particular exceptions is activated. It is followed by one or more catch blocks.
try − A try block ... | [
{
"code": null,
"e": 1229,
"s": 1062,
"text": "Exceptions provide a way to transfer control from one part of a program to another. C# exception handling is built upon four keywords: try, catch, finally, and throw."
},
{
"code": null,
"e": 1364,
"s": 1229,
"text": "try − A try blo... |
GATE | GATE-CS-2004 | Question 55 - GeeksforGeeks | 28 Jun, 2021
The routing table of a router is shown below:
Destination Sub net mask Interface
128.75.43.0 255.255.255.0 Eth0
128.75.43.0 255.255.255.128 Eth1
192.12.17.5 255.255.255.255 Eth3
default Eth2
On which interfaces will the router f... | [
{
"code": null,
"e": 24386,
"s": 24358,
"text": "\n28 Jun, 2021"
},
{
"code": null,
"e": 24432,
"s": 24386,
"text": "The routing table of a router is shown below:"
},
{
"code": null,
"e": 24656,
"s": 24432,
"text": " Destination Sub net mask Inter... |
How to add current date to an existing MySQL table? | To update an existing table, use UPDATE. With that, to set the current date, use the CURDATE() method −
update yourTableName set yourCoumnName=CURDATE();
Let us first create a table −
mysql> create table DemoTable
-> (
-> DueDate datetime
-> );
Query OK, 0 rows affected (0.58 sec)
Insert some records in the table using... | [
{
"code": null,
"e": 1166,
"s": 1062,
"text": "To update an existing table, use UPDATE. With that, to set the current date, use the CURDATE() method −"
},
{
"code": null,
"e": 1216,
"s": 1166,
"text": "update yourTableName set yourCoumnName=CURDATE();"
},
{
"code": null,
... |
Set the image path with CSS | The border-image-source property is used in CSS to set the image path. You can try to run the following code to set the image path −
<html>
<head>
<style>
#borderimg1 {
border: 15px solid transparent;
padding: 15px;
border-image-source: url(https://tutorialspoint.co... | [
{
"code": null,
"e": 1195,
"s": 1062,
"text": "The border-image-source property is used in CSS to set the image path. You can try to run the following code to set the image path −"
},
{
"code": null,
"e": 1579,
"s": 1195,
"text": "<html>\n <head>\n <style>\n #borde... |
What is .htaccess in PHP? | .htaccess is a configuration file for use on web servers running on the web apache server software. when a .htaccess file is placed in a directory which in turn loaded via the Apache web server, then the .htaccess file detected and executed by the Apache server software.
.htaccess files can be utilized to modify the s... | [
{
"code": null,
"e": 1335,
"s": 1062,
"text": ".htaccess is a configuration file for use on web servers running on the web apache server software. when a .htaccess file is placed in a directory which in turn loaded via the Apache web server, then the .htaccess file detected and executed by the Apach... |
Bash Scripting - Split String - GeeksforGeeks | 04 Jan, 2022
In this article, we will discuss how to split strings in a bash script.
Dividing a single string into multiple strings is called string splitting. Many programming languages have a built-in function to perform string splitting but there is no built-in function in bash to do so. There are various methods to... | [
{
"code": null,
"e": 24352,
"s": 24324,
"text": "\n04 Jan, 2022"
},
{
"code": null,
"e": 24424,
"s": 24352,
"text": "In this article, we will discuss how to split strings in a bash script."
},
{
"code": null,
"e": 24738,
"s": 24424,
"text": "Dividing a single ... |
HTML DOM Form submit() method | The HTML DOM Form submit() method is used for submitting the form data to the address specified by the action attribute. It acts as a submit button to submit form data and it doesn’t take any kind of parameters.
Following is the syntax for Form submit() method −
formObject.submit()
Let us look at an example for the For... | [
{
"code": null,
"e": 1274,
"s": 1062,
"text": "The HTML DOM Form submit() method is used for submitting the form data to the address specified by the action attribute. It acts as a submit button to submit form data and it doesn’t take any kind of parameters."
},
{
"code": null,
"e": 1325... |
Data Visualization of Uber Rides with Tableau | by Vanessa Leung | Towards Data Science | This piece of work is inspired by the plotly demo sample New York Uber Rides. But we are going to do it in Tableau without writing a single line of code.
You can find my work on my Tableau page here.
This visualization creates a view of Uber rides in New York City from April to May in 2014. It aims to provide consumers... | [
{
"code": null,
"e": 326,
"s": 172,
"text": "This piece of work is inspired by the plotly demo sample New York Uber Rides. But we are going to do it in Tableau without writing a single line of code."
},
{
"code": null,
"e": 372,
"s": 326,
"text": "You can find my work on my Table... |
Understanding the Seasonal Order of the SARIMA Model | by Angelica Lo Duca | Towards Data Science | Some months ago, I wrote an article, which described the full process to build a SARIMA model for time series forecasting. In that article, I explained how to tune the p, d and q order of a SARIMA model and I evaluated the performance of the trained model in terms of NRMSE.
One comment about that article was that the p... | [
{
"code": null,
"e": 322,
"s": 47,
"text": "Some months ago, I wrote an article, which described the full process to build a SARIMA model for time series forecasting. In that article, I explained how to tune the p, d and q order of a SARIMA model and I evaluated the performance of the trained model ... |
C# Enum Equals Method | To find the equality between enums, use the Equals() method.
Let’s say we have the following Enum.
enum Products { HardDrive, PenDrive, Keyboard};
Create two Products objects and assign the same values.
Products prod1 = Products.HardDrive;
Products prod2 = Products.HardDrive;
Now check for equality using Equals() metho... | [
{
"code": null,
"e": 1123,
"s": 1062,
"text": "To find the equality between enums, use the Equals() method."
},
{
"code": null,
"e": 1161,
"s": 1123,
"text": "Let’s say we have the following Enum."
},
{
"code": null,
"e": 1209,
"s": 1161,
"text": "enum Product... |
less - Unix, Linux Command | Commands are based on both
more and
vi. Commands may be preceded by a decimal number,
called N in the descriptions below.
The number is used by some commands, as indicated.
Certain characters are special
if entered at the beginning of the pattern;
they modify the type of search rather than become part of the patter... | [
{
"code": null,
"e": 10754,
"s": 10579,
"text": "\nCommands are based on both\nmore and\nvi. Commands may be preceded by a decimal number,\ncalled N in the descriptions below.\nThe number is used by some commands, as indicated.\n"
},
{
"code": null,
"e": 10904,
"s": 10756,
"text"... |
Classifying Hate Speech: an overview | by Jacob Crabb | Towards Data Science | By Jacob Crabb, Sherry Yang, and Anna Zubova.
The challenge of wrangling hate speech is an ancient one, but the scale, personalization, and velocity of today’s hate speech a uniquely modern dilemma. While there is no exact definition of hate speech, in general, it is speech that is intended not just to insult or mock, ... | [
{
"code": null,
"e": 218,
"s": 172,
"text": "By Jacob Crabb, Sherry Yang, and Anna Zubova."
},
{
"code": null,
"e": 670,
"s": 218,
"text": "The challenge of wrangling hate speech is an ancient one, but the scale, personalization, and velocity of today’s hate speech a uniquely mod... |
Dart Programming - Logical Operators | The following example shows how you can use Logical Operators in Dart −
void main() {
var a = 10;
var b = 12;
var res = (a<b)&&(b>10);
print(res);
}
It will produce the following output −
true
Let’s take another example −
void main() {
var a = 10;
var b = 12;
var res = (a>b)||(b<10)... | [
{
"code": null,
"e": 2597,
"s": 2525,
"text": "The following example shows how you can use Logical Operators in Dart −"
},
{
"code": null,
"e": 2697,
"s": 2597,
"text": "void main() { \n var a = 10; \n var b = 12; \n var res = (a<b)&&(b>10); \n print(res); \n} "
},... |
The Complete Guide to Building a Chatbot with Deep Learning From Scratch | by Matthew Evan Taruno | Towards Data Science | Over the past month, I wanted to look for a project that encompasses the entire data science end-to-end workflow — from the data pipeline, to deep learning, to deployment. It had to be challenging, but not pointlessly so — it still had to be something useful. It took a little ideation and divergent thinking, but when t... | [
{
"code": null,
"e": 1174,
"s": 171,
"text": "Over the past month, I wanted to look for a project that encompasses the entire data science end-to-end workflow — from the data pipeline, to deep learning, to deployment. It had to be challenging, but not pointlessly so — it still had to be something us... |
How to use loc and iloc for selecting data in Pandas | by B. Chen | Towards Data Science | When it comes to select data on a DataFrame, Pandas loc and iloc are two top favorites. They are quick, fast, easy to read, and sometimes interchangeable.
In this article, we’ll explore the differences between loc and iloc, take a looks at their similarities, and check how to perform data selection with them. We will g... | [
{
"code": null,
"e": 327,
"s": 172,
"text": "When it comes to select data on a DataFrame, Pandas loc and iloc are two top favorites. They are quick, fast, easy to read, and sometimes interchangeable."
},
{
"code": null,
"e": 521,
"s": 327,
"text": "In this article, we’ll explore ... |
Bootstrap 4 .flex-row class | Use the flex-row class in Bootstrap to dispay flex items horizontally.
Achieve the following using the flex-row class −
<div class="d-flex flex-row bg-primary mb-3">
Now add the flex-items in the class to allow horizontal alignment −
<div class="d-flex flex-row bg-primary mb-3">
<div class="p-2 bg-primary">Audi</div>... | [
{
"code": null,
"e": 1133,
"s": 1062,
"text": "Use the flex-row class in Bootstrap to dispay flex items horizontally."
},
{
"code": null,
"e": 1182,
"s": 1133,
"text": "Achieve the following using the flex-row class −"
},
{
"code": null,
"e": 1228,
"s": 1182,
... |
Getting screens height and width using Tkinter Python | Tkinter is the library which gives GUI programming capability to python programs. As part of GUI creation we need to create screen layouts of different sizes and depth. In this program we will see how to calculate the size of a screen in terms of pixels as well as in mm. We can also get the depth of the screen in pixel... | [
{
"code": null,
"e": 1463,
"s": 1062,
"text": "Tkinter is the library which gives GUI programming capability to python programs. As part of GUI creation we need to create screen layouts of different sizes and depth. In this program we will see how to calculate the size of a screen in terms of pixels... |
Bubble plot with ggplot2 in R - GeeksforGeeks | 18 Jul, 2021
A bubble plot is a data visualization that helps to displays multiple circles (bubbles) in a two-dimensional plot as same in a scatter plot. A bubble plot is primarily used to depict and show relationships between numeric variables.
With ggplot2, bubble plots can be built using geom_point() function. At l... | [
{
"code": null,
"e": 25268,
"s": 25240,
"text": "\n18 Jul, 2021"
},
{
"code": null,
"e": 25502,
"s": 25268,
"text": " A bubble plot is a data visualization that helps to displays multiple circles (bubbles) in a two-dimensional plot as same in a scatter plot. A bubble plot is prim... |
How to setup Python VirtualEnv - onlinetutorialspoint | PROGRAMMINGJava ExamplesC Examples
Java Examples
C Examples
C Tutorials
aws
In this tutorials we are going to see what is Python Virtual Environment and how to setup Python VirtualEnv in different operating systems.
Virtual Environment (virtual env or venv) is a tool that helps to keep the libraries and dependencies re... | [
{
"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,
... |
Kotlin Classes and Objects | Everything in Kotlin is associated with classes and objects, along with its properties and
functions. For example: in real life, a car is an object. The car has properties, such as
brand, weight and color, and
functions, such as drive and brake.
A Class is like an object constructor, or a "blueprint" for creating o... | [
{
"code": null,
"e": 250,
"s": 0,
"text": "Everything in Kotlin is associated with classes and objects, along with its properties and \nfunctions. For example: in real life, a car is an object. The car has properties, such as \nbrand, weight and color, and \nfunctions, such as drive and brake. "
}... |
How to Fix java.lang.classcastexception in Java? - GeeksforGeeks | 29 Mar, 2021
ClassCastException in Java occurs when we try to convert the data type of entry into another. This is related to the type conversion feature and data type conversion is successful only where a class extends a parent class and the child class is cast to its parent class.
Here we can consider parent class a... | [
{
"code": null,
"e": 23948,
"s": 23920,
"text": "\n29 Mar, 2021"
},
{
"code": null,
"e": 24220,
"s": 23948,
"text": "ClassCastException in Java occurs when we try to convert the data type of entry into another. This is related to the type conversion feature and data type conversi... |
parallel streams in Java 8 | Streams in Java 8 | 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
Parallel Streams are greatest addition to Jav... | [
{
"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,
... |
Batch Script - Remove Both Ends | This is used to remove the first and the last character of a string
@echo off
set str = Batch scripts is easy. It is really easy
echo %str%
set str = %str:~1,-1%
echo %str%
The key thing to note about the above program is, the ~1,-1 is used to remove the first and last character of a string.
The above command prod... | [
{
"code": null,
"e": 2237,
"s": 2169,
"text": "This is used to remove the first and the last character of a string"
},
{
"code": null,
"e": 2347,
"s": 2237,
"text": "@echo off \nset str = Batch scripts is easy. It is really easy \necho %str% \n\nset str = %str:~1,-1% \necho %str%... |
What is the difference between “word-break: break-all” versus “word-wrap: break-word” in CSS ? | 12 Feb, 2019
The word-break property in CSS is used to specify how a word should be broken or split when reaching the end of a line. The word-wrap property is used to split/break long words and wrap them into the next line.
Difference between the “word-break: break-all;” and “word-wrap: break-word;”
word-break: break-a... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n12 Feb, 2019"
},
{
"code": null,
"e": 239,
"s": 28,
"text": "The word-break property in CSS is used to specify how a word should be broken or split when reaching the end of a line. The word-wrap property is used to split/break long word... |
How to Set Axis Limits bokeh? | 03 Mar, 2021
In this article, we will be learning about how to set axis limits to a plot in bokeh. When we are plotting a graph with a set of values, then X-limits and Y-limits for the points are automatically created. But bokeh allows us to set those axis limits according to our choice.
So, at first, we need to know t... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n03 Mar, 2021"
},
{
"code": null,
"e": 304,
"s": 28,
"text": "In this article, we will be learning about how to set axis limits to a plot in bokeh. When we are plotting a graph with a set of values, then X-limits and Y-limits for the poi... |
Python Nested Dictionary | 10 Feb, 2022
Prerequisite – Python dictionaryA Dictionary in Python works similar to the Dictionary in the real world. Keys of a Dictionary must be unique and of immutable data type such as Strings, Integers and tuples, but the key-values can be repeated and be of any type.Nested Dictionary: Nesting Dictionary means pu... | [
{
"code": null,
"e": 54,
"s": 26,
"text": "\n10 Feb, 2022"
},
{
"code": null,
"e": 506,
"s": 54,
"text": "Prerequisite – Python dictionaryA Dictionary in Python works similar to the Dictionary in the real world. Keys of a Dictionary must be unique and of immutable data type such ... |
Metagoofil – Tool to Extract Information from Docs, Images in Kali Linux | 31 Oct, 2021
The Metagoofil is an information-gathering tool. This is a free and open-source tool designed to extract all the metadata information from public documents that are available on websites. This tool uses two libraries to extract data. These are Hachoir and PdfMiner. After extracting all the data, this tool ... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n31 Oct, 2021"
},
{
"code": null,
"e": 689,
"s": 28,
"text": "The Metagoofil is an information-gathering tool. This is a free and open-source tool designed to extract all the metadata information from public documents that are available ... |
Multiply large integers under large modulo | 13 Jun, 2022
Given an integer a, b, m. Find (a * b ) mod m, where a, b may be large and their direct multiplication may cause overflow. However they are smaller than half of the maximum allowed long long int value.
Examples:
Input: a = 426, b = 964, m = 235
Output: 119
Explanation: (426 * 964) % 235
= 41... | [
{
"code": null,
"e": 54,
"s": 26,
"text": "\n13 Jun, 2022"
},
{
"code": null,
"e": 256,
"s": 54,
"text": "Given an integer a, b, m. Find (a * b ) mod m, where a, b may be large and their direct multiplication may cause overflow. However they are smaller than half of the maximum a... |
Using Tags in Git | 08 Jun, 2020
Tagging in GIT refers to creating specific points in the history of your repository/data. It is usually done to mark the release points.
Two main purposes of tags are:
Make Release point on your code.
Create historic restore points.
You can create tags when you want to create a release point for a stable v... | [
{
"code": null,
"e": 54,
"s": 26,
"text": "\n08 Jun, 2020"
},
{
"code": null,
"e": 191,
"s": 54,
"text": "Tagging in GIT refers to creating specific points in the history of your repository/data. It is usually done to mark the release points."
},
{
"code": null,
"e": ... |
Delete Nth node from the end of the given linked list | 12 Jul, 2022
Given a linked list and an integer N, the task is to delete the Nth node from the end of the given linked list.
Examples:
Input: 2 -> 3 -> 1 -> 7 -> NULL, N = 1 Output: The created linked list is: 2 3 1 7 The linked list after deletion is: 2 3 1
Input: 1 -> 2 -> 3 -> 4 -> NULL, N = 4 Output: The created... | [
{
"code": null,
"e": 54,
"s": 26,
"text": "\n12 Jul, 2022"
},
{
"code": null,
"e": 167,
"s": 54,
"text": "Given a linked list and an integer N, the task is to delete the Nth node from the end of the given linked list. "
},
{
"code": null,
"e": 179,
"s": 167,
"... |
Maximum modulo of all the pairs of array where arr[i] >= arr[j] | 13 Jul, 2022
Given an array of n integers. Find the maximum value of arr[i] mod arr[j] where arr[i] >= arr[j] and 1 <= i, j <= n
Examples:
Input: arr[] = {3, 4, 7}
Output: 3
Explanation:
There are 3 pairs which satisfies arr[i] >= arr[j] are:-
4, 3 => 4 % 3 = 1
7, 3 => 7 % 3 = 1
7, 4 => 7 % 4 = 3
Hence Maximum value ... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n13 Jul, 2022"
},
{
"code": null,
"e": 169,
"s": 52,
"text": "Given an array of n integers. Find the maximum value of arr[i] mod arr[j] where arr[i] >= arr[j] and 1 <= i, j <= n "
},
{
"code": null,
"e": 180,
"s": 169,
... |
Check if possible to move from given coordinate to desired coordinate | 06 Jul, 2022
Given two coordinates (x, y) and (a, b). Find if it is possible to reach (x, y) from (a, b).
Only possible moves from any coordinate (i, j) are
(i-j, j)
(i, i-j)
(i+j, j)
(i, i+j)
Given x, y, a, b can be negative.
Examples:
Input : (x, y) = (1, 1) and (a, b) = (2, 3).
Output : Yes.
(1, 1) -> (2, 1) -> ... | [
{
"code": null,
"e": 54,
"s": 26,
"text": "\n06 Jul, 2022"
},
{
"code": null,
"e": 148,
"s": 54,
"text": "Given two coordinates (x, y) and (a, b). Find if it is possible to reach (x, y) from (a, b). "
},
{
"code": null,
"e": 200,
"s": 148,
"text": "Only possib... |
Difference between Abstraction and Encapsulation in Java with Examples | 13 Jun, 2022
Encapsulation is defined as the wrapping up of data under a single unit. It is the mechanism that binds together code and the data it manipulates. Another way to think about encapsulation is, that it is a protective shield that prevents the data from being accessed by the code outside this shield. Technica... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n13 Jun, 2022"
},
{
"code": null,
"e": 816,
"s": 52,
"text": "Encapsulation is defined as the wrapping up of data under a single unit. It is the mechanism that binds together code and the data it manipulates. Another way to think about ... |
Python - Linked Lists | A linked list is a sequence of data elements, which are connected together via links. Each data element contains a connection to another data element in form of a pointer. Python does not have linked lists in its standard library. We implement the concept of linked lists using the concept of nodes as discussed in the p... | [
{
"code": null,
"e": 2664,
"s": 2327,
"text": "A linked list is a sequence of data elements, which are connected together via links. Each data element contains a connection to another data element in form of a pointer. Python does not have linked lists in its standard library. We implement the conce... |
C / C++ Program for Median of two sorted arrays of same size - GeeksforGeeks | 11 Dec, 2018
There are 2 sorted arrays A and B of size n each. Write an algorithm to find the median of the array obtained merging the above 2 arrays(i.e. array of length 2n). The complexity should be O(log(n)).
Note : Since size of the set for which we are looking for median is even (2n), we need take average of middl... | [
{
"code": null,
"e": 24539,
"s": 24511,
"text": "\n11 Dec, 2018"
},
{
"code": null,
"e": 24738,
"s": 24539,
"text": "There are 2 sorted arrays A and B of size n each. Write an algorithm to find the median of the array obtained merging the above 2 arrays(i.e. array of length 2n). ... |
Fine-Tuning GPT2 on Colab GPU... For Free! | by Joey S | Towards Data Science | Models these days are very big, and most of us don’t have the resources to train them from scratch. Luckily, HuggingFace has generously provided pretrained models in PyTorch, and Google Colab allows usage of their GPU (for a fixed time). Otherwise, even fine-tuning a dataset on my local machine without a NVIDIA GPU wou... | [
{
"code": null,
"e": 661,
"s": 172,
"text": "Models these days are very big, and most of us don’t have the resources to train them from scratch. Luckily, HuggingFace has generously provided pretrained models in PyTorch, and Google Colab allows usage of their GPU (for a fixed time). Otherwise, even f... |
C++ Stack Library - push() Function | The C++ function std::stack::push() inserts new element at the top of the stack and increases size of stack by one.
Following is the declaration for std::stack::push() function form std::stack header.
void push (const value_type& val);
void push (const value_type& val);
val − Value to be assigned to the newly inserte... | [
{
"code": null,
"e": 2719,
"s": 2603,
"text": "The C++ function std::stack::push() inserts new element at the top of the stack and increases size of stack by one."
},
{
"code": null,
"e": 2804,
"s": 2719,
"text": "Following is the declaration for std::stack::push() function form ... |
Check for perfect square in JavaScript | We are required to write a JavaScript function that takes in a number and returns a boolean
based on the fact whether or not the number is a perfect square.
Examples of perfect square numbers −
Some perfect square numbers are −
144, 196, 121, 81, 484
The code for this will be −
const num = 484;
const isPerfectSquare = ... | [
{
"code": null,
"e": 1219,
"s": 1062,
"text": "We are required to write a JavaScript function that takes in a number and returns a boolean\nbased on the fact whether or not the number is a perfect square."
},
{
"code": null,
"e": 1256,
"s": 1219,
"text": "Examples of perfect squa... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.