title stringlengths 3 221 | text stringlengths 17 477k | parsed listlengths 0 3.17k |
|---|---|---|
MATLAB Annotation | 15 Dec, 2021
Annotations in MATLAB is a way of adding explanation or notes to the plots. Annotations add more information to the plots. There are different syntax formations for adding annotations to a plot:
annotation(lineType,x,y)
annotation(lineType)
annotation(shapeType,dim)
annotation(shapeType)
annotation(___,Nam... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n15 Dec, 2021"
},
{
"code": null,
"e": 223,
"s": 28,
"text": "Annotations in MATLAB is a way of adding explanation or notes to the plots. Annotations add more information to the plots. There are different syntax formations for adding ann... |
Gaussian Elimination to Solve Linear Equations | 14 Jul, 2022
The article focuses on using an algorithm for solving a system of linear equations. We will deal with the matrix of coefficients. Gaussian Elimination does not work on singular matrices (they lead to division by zero).
Input: For N unknowns, input is an augmented
matrix of size N x (N+1). One extra... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n14 Jul, 2022"
},
{
"code": null,
"e": 271,
"s": 52,
"text": "The article focuses on using an algorithm for solving a system of linear equations. We will deal with the matrix of coefficients. Gaussian Elimination does not work on singul... |
Flutter – Read and Write Data on Firebase | 10 Nov, 2020
Firebase helps developers to manage their mobile app easily. It is a service provided by Google. Firebase has various functionalities available to help developers manage and grow their mobile apps. In this article, we will learn how to write and read data into/from firebase. We will be using flutter for th... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n10 Nov, 2020"
},
{
"code": null,
"e": 418,
"s": 52,
"text": "Firebase helps developers to manage their mobile app easily. It is a service provided by Google. Firebase has various functionalities available to help developers manage and ... |
Move all negative elements to end in order with extra space allowed | 06 Jul, 2022
Given an unsorted array arr[] of both negative and positive integer. The task is place all negative element at the end of array without changing the order of positive element and negative element.
Examples:
Input : arr[] = {1, -1, 3, 2, -7, -5, 11, 6 }
Output : 1 3 2 11 6 -1 -7 -5
Input : arr[] ... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n06 Jul, 2022"
},
{
"code": null,
"e": 250,
"s": 52,
"text": "Given an unsorted array arr[] of both negative and positive integer. The task is place all negative element at the end of array without changing the order of positive element... |
Check whether a character is Uppercase or not in Java | To check whether a character is in Uppercase or not in Java, use the Character.isUpperCase() method.
We have a character to be checked.
char val = 'K';
Now let us use the Character.isUpperCase() method.
if (Character.isUpperCase(val)) {
System.out.println("Character is in Uppercase!");
}else {
System.out.println(... | [
{
"code": null,
"e": 1163,
"s": 1062,
"text": "To check whether a character is in Uppercase or not in Java, use the Character.isUpperCase() method."
},
{
"code": null,
"e": 1198,
"s": 1163,
"text": "We have a character to be checked."
},
{
"code": null,
"e": 1214,
... |
Rock Paper and Scissor Game Using Tkinter | Tkinter is one of the Python-based libraries used to create and develop Desktop User interfaces and applications. Using the Tkinter library and its packages, we will create a Rock Paper Scissor Game Application. The game can be played between two people using hand gestures. The condition for winning the game is,
If pla... | [
{
"code": null,
"e": 1376,
"s": 1062,
"text": "Tkinter is one of the Python-based libraries used to create and develop Desktop User interfaces and applications. Using the Tkinter library and its packages, we will create a Rock Paper Scissor Game Application. The game can be played between two people... |
deque insert() function in C++ STL - GeeksforGeeks | 12 Dec, 2018
The deque::insert() function is a built-in function in C++ which is used to insert elements in the deque.The insert() function can be used in three ways:
Extends deque by inserting a new element val at a position.
Extends deque by inserting n new element of value val in the deque.
Extends deque by insertin... | [
{
"code": null,
"e": 25477,
"s": 25449,
"text": "\n12 Dec, 2018"
},
{
"code": null,
"e": 25631,
"s": 25477,
"text": "The deque::insert() function is a built-in function in C++ which is used to insert elements in the deque.The insert() function can be used in three ways:"
},
{... |
GATE | GATE-CS-2015 (Set 3) | Question 56 - GeeksforGeeks | 28 Jun, 2021
Consider B+ tree in which the search key is 12 bytes long, block size is 1024 bytes, record pointer is 10 bytes long and block pointer is 8 bytes long. The maximum number of keys that can be accommodated in each non-leaf node of the tree is(A) 49(B) 50(C) 51(D) 52Answer: (B)Explanation:
Let m be the order ... | [
{
"code": null,
"e": 25893,
"s": 25865,
"text": "\n28 Jun, 2021"
},
{
"code": null,
"e": 26181,
"s": 25893,
"text": "Consider B+ tree in which the search key is 12 bytes long, block size is 1024 bytes, record pointer is 10 bytes long and block pointer is 8 bytes long. The maximum... |
How to Use Streamlit and Python to Build a Data Science App | Towards Data Science | Web apps are still useful tools for data scientists to present their data science projects to users. Since we may not have web development skills, we can use open-source python libraries like Streamlit to easily develop web apps in a short time.
Introduction to StreamlitInstallation and Set upDevelop the Web AppTest th... | [
{
"code": null,
"e": 418,
"s": 172,
"text": "Web apps are still useful tools for data scientists to present their data science projects to users. Since we may not have web development skills, we can use open-source python libraries like Streamlit to easily develop web apps in a short time."
},
{... |
Angular Material - Sliders | The md-slider, an Angular directive is used to show a range component. It has two modes −
normal − User can slide between wide range of values. This mode exists by default.
normal − User can slide between wide range of values. This mode exists by default.
discrete − User can slide between selected values. To enable dis... | [
{
"code": null,
"e": 2280,
"s": 2190,
"text": "The md-slider, an Angular directive is used to show a range component. It has two modes −"
},
{
"code": null,
"e": 2363,
"s": 2280,
"text": "normal − User can slide between wide range of values. This mode exists by default."
},
{... |
RStudio Server in AWS EMR easy, reproducible, and fast | by Luis Henrique Zanandréa Paese | Towards Data Science | In a previous post that I’ve written (which can be found here), I shared my views on the use of Infrastructure as Code tools, such as Packer and Terraform, to create Amazon Machine Images (AMI), creating a reproducible environment for data scientists and data analysts to explore Cloud resources with many tools pre-inst... | [
{
"code": null,
"e": 546,
"s": 172,
"text": "In a previous post that I’ve written (which can be found here), I shared my views on the use of Infrastructure as Code tools, such as Packer and Terraform, to create Amazon Machine Images (AMI), creating a reproducible environment for data scientists and ... |
How to Get City and State Name from Pincode in Android? - GeeksforGeeks | 06 Jan, 2021
Many apps ask users to add the address in their apps. To make this task easy for the users they firstly prompt the user to add Pincode and from that Pincode, they fetch the data such as city and state name. So the user’s task is reduced to add city and state names while entering the address. Along with man... | [
{
"code": null,
"e": 24750,
"s": 24722,
"text": "\n06 Jan, 2021"
},
{
"code": null,
"e": 25597,
"s": 24750,
"text": "Many apps ask users to add the address in their apps. To make this task easy for the users they firstly prompt the user to add Pincode and from that Pincode, they ... |
How to apply one sample t-test on all columns of an R data frame? | When we want to apply t-test on columns of a data frame then we generally perform them one by one by accessing the appropriate columns but if we want to apply the test on all columns of the data frame then we can take the help of sapply function. For example, if we have a data frame called df that contains multiple col... | [
{
"code": null,
"e": 1479,
"s": 1062,
"text": "When we want to apply t-test on columns of a data frame then we generally perform them one by one by accessing the appropriate columns but if we want to apply the test on all columns of the data frame then we can take the help of sapply function. For ex... |
Pascal - Environment Set Up | There are several Pascal compilers and interpreters available for general use. Among these are −
Turbo Pascal − provides an IDE and compiler for running Pascal programs on CP/M, CP/M-86, DOS, Windows and Macintosh.
Turbo Pascal − provides an IDE and compiler for running Pascal programs on CP/M, CP/M-86, DOS, Windows an... | [
{
"code": null,
"e": 2180,
"s": 2083,
"text": "There are several Pascal compilers and interpreters available for general use. Among these are −"
},
{
"code": null,
"e": 2298,
"s": 2180,
"text": "Turbo Pascal − provides an IDE and compiler for running Pascal programs on CP/M, CP/M... |
How to display Hexadecimal Values in NumericUpDown in C#? - GeeksforGeeks | 29 Jul, 2019
In Windows Forms, NumericUpDown control is used to provide a Windows spin box or an up-down control which displays the numeric values. Or in other words, NumericUpDown control provides an interface which moves using up and down arrow and holds some pre-defined numeric value. In NumericUpDown control, you c... | [
{
"code": null,
"e": 24222,
"s": 24194,
"text": "\n29 Jul, 2019"
},
{
"code": null,
"e": 24954,
"s": 24222,
"text": "In Windows Forms, NumericUpDown control is used to provide a Windows spin box or an up-down control which displays the numeric values. Or in other words, NumericUp... |
Get current time and date on Android | As per Oracle documentation, SimpleDateFormat is a concrete class for formatting and parsing dates in a locale-sensitive manner. In this example, we have imported simple date format class from java as shown below -
import java.text.SimpleDateFormat;
import java.util.Date;
Step 1 − Create a new project in Android Studio... | [
{
"code": null,
"e": 1277,
"s": 1062,
"text": "As per Oracle documentation, SimpleDateFormat is a concrete class for formatting and parsing dates in a locale-sensitive manner. In this example, we have imported simple date format class from java as shown below -"
},
{
"code": null,
"e": 1... |
Loading Ridiculously Large Excel Files in Python | by Yaakov Bressler | Towards Data Science | Sometimes you need to work with .xls or .xlx files. In the event that they’re larger than 1M rows, excel will either load the first 1M rows or crash. This article will demonstrate how to load such files in python.
Before we dive in, here’s some background information on how spreadsheets work on the backend.
Spreadsheet... | [
{
"code": null,
"e": 386,
"s": 172,
"text": "Sometimes you need to work with .xls or .xlx files. In the event that they’re larger than 1M rows, excel will either load the first 1M rows or crash. This article will demonstrate how to load such files in python."
},
{
"code": null,
"e": 481,... |
How to Get Random Elements from Java HashSet? | 07 Jan, 2021
Unlike List classes, the HashSet class does not provide any methods using which we can get the elements using their index. It makes it difficult to get random elements from it using the index.
We need to get random elements from HashSet, which can be done by either of the two ways:
By converting it to an a... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n07 Jan, 2021"
},
{
"code": null,
"e": 221,
"s": 28,
"text": "Unlike List classes, the HashSet class does not provide any methods using which we can get the elements using their index. It makes it difficult to get random elements from it... |
CSS | fit-content() Property | 06 Jun, 2022
The CSS fit-content property is an inbuilt property in CSS. This property is used to adjust the size according to this formula min(maximum size, max(minimum size, argument)). The fit-content() property use to defined function to put a limit on the maximum size of the division. This formula is very helpful ... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n06 Jun, 2022"
},
{
"code": null,
"e": 618,
"s": 52,
"text": "The CSS fit-content property is an inbuilt property in CSS. This property is used to adjust the size according to this formula min(maximum size, max(minimum size, argument)).... |
Groovy - Traits | Traits are a structural construct of the language which allow −
Composition of behaviors.
Runtime implementation of interfaces.
Compatibility with static type checking/compilation
They can be seen as interfaces carrying both default implementations and state. A trait is defined using the trait keyword.
An example of a ... | [
{
"code": null,
"e": 2436,
"s": 2372,
"text": "Traits are a structural construct of the language which allow −"
},
{
"code": null,
"e": 2462,
"s": 2436,
"text": "Composition of behaviors."
},
{
"code": null,
"e": 2500,
"s": 2462,
"text": "Runtime implementatio... |
Excel – Descriptive Statistics | 08 Feb, 2022
Descriptive statistics is all about describing the given data. To describe about the data, we use Measures of central tendency and measures of dispersion.
Measures of central tendency [Mean, Median, and Mode] – a single number about the center of the data points.
Measures of dispersion [Range, Variance and... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n08 Feb, 2022"
},
{
"code": null,
"e": 183,
"s": 28,
"text": "Descriptive statistics is all about describing the given data. To describe about the data, we use Measures of central tendency and measures of dispersion."
},
{
"code"... |
Python Program To Merge Two Sorted Lists (In-Place) | 11 Jan, 2022
Given two sorted lists, merge them so as to produce a combined sorted list (without using extra space).Examples:
Input: head1: 5->7->9
head2: 4->6->8
Output: 4->5->6->7->8->9
Explanation: The output list is in sorted order.
Input: head1: 1->3->5->7
head2: 2->4
Output: 1->2->3->4->5->7
Exp... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n11 Jan, 2022"
},
{
"code": null,
"e": 141,
"s": 28,
"text": "Given two sorted lists, merge them so as to produce a combined sorted list (without using extra space).Examples:"
},
{
"code": null,
"e": 381,
"s": 141,
"t... |
Python program to find the String in a List | 12 Apr, 2022
Given a list, the task is to write a Python program to check whether a list contains a particular string or not.
Examples:
Input: l=[1, 1.0, ‘have’, ‘a’, ‘geeky’, ‘day’]; s=’geeky’
Output: geeky is present in the list
Input: l=[‘hello’,’ geek’, ‘have’, ‘a’, ‘geeky’, ‘day’]; s=’nice’
Output: nice is not pre... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n12 Apr, 2022"
},
{
"code": null,
"e": 141,
"s": 28,
"text": "Given a list, the task is to write a Python program to check whether a list contains a particular string or not."
},
{
"code": null,
"e": 151,
"s": 141,
"t... |
Which Book Should I Read Next?. Building a book recommendation system... | by Jordan Bean | Towards Data Science | I love to read but each time I finish a book I run into the same problem: What do I read next? The platforms I use should have plenty of data to help me solve this problem.
However, Libby — through the Boston Public Library — doesn’t provide any recommendations and the ones from Goodreads, an Amazon company where I sto... | [
{
"code": null,
"e": 220,
"s": 47,
"text": "I love to read but each time I finish a book I run into the same problem: What do I read next? The platforms I use should have plenty of data to help me solve this problem."
},
{
"code": null,
"e": 408,
"s": 220,
"text": "However, Libby... |
How to upload file with selenium (Python)? | We can upload files with Selenium using Python. This can be done with the help of the send_keys method. First, we shall identify the element which does the task of selecting the file path that has to be uploaded.
This feature is only applied to elements having the type attribute set to file. Also, the tagname of the el... | [
{
"code": null,
"e": 1275,
"s": 1062,
"text": "We can upload files with Selenium using Python. This can be done with the help of the send_keys method. First, we shall identify the element which does the task of selecting the file path that has to be uploaded."
},
{
"code": null,
"e": 148... |
AngularJS | Application - GeeksforGeeks | 31 Jul, 2020
Applications in AngularJS enable the creation of real-time Applications. There are four primary steps involved in creation of Applications in AngularJS:
Creation of List for an Application.
Adding elements in the List.
Removing elements from the List.
Error Handling
Below are the steps for creations a Subj... | [
{
"code": null,
"e": 28271,
"s": 28243,
"text": "\n31 Jul, 2020"
},
{
"code": null,
"e": 28424,
"s": 28271,
"text": "Applications in AngularJS enable the creation of real-time Applications. There are four primary steps involved in creation of Applications in AngularJS:"
},
{
... |
How to implement a constructor reference with one or more arguments in Java? | A method reference can also be applicable to constructors in Java 8. A constructor reference can be created using the class name and a new keyword. The constructor reference can be assigned to any functional interface reference that defines a method compatible with the constructor.
<Class-Name>::new
import java.util.fu... | [
{
"code": null,
"e": 1345,
"s": 1062,
"text": "A method reference can also be applicable to constructors in Java 8. A constructor reference can be created using the class name and a new keyword. The constructor reference can be assigned to any functional interface reference that defines a method com... |
Spring MVC - Simple Url Handler Mapping Example | The following example shows how to use Simple URL Handler Mapping using the Spring Web MVC framework. The SimpleUrlHandlerMapping class helps to explicitly-map URLs with their controllers respectively.
<beans>
<bean class = "org.springframework.web.servlet.view.InternalResourceViewResolver">
<property name = "... | [
{
"code": null,
"e": 2993,
"s": 2791,
"text": "The following example shows how to use Simple URL Handler Mapping using the Spring Web MVC framework. The SimpleUrlHandlerMapping class helps to explicitly-map URLs with their controllers respectively."
},
{
"code": null,
"e": 3699,
"s":... |
How to change the mode of a file using Python? | To change the permission of a file, you can use the os.chmod(file, mode) call. Note that the mode should be specified in octal representation and therefore must begin with a 0o. For example, to make a file readonly, you can set the permission to 0o777, you can use:
>>> import os
>>> os.chmod('my_file', 0o777)
You can a... | [
{
"code": null,
"e": 1328,
"s": 1062,
"text": "To change the permission of a file, you can use the os.chmod(file, mode) call. Note that the mode should be specified in octal representation and therefore must begin with a 0o. For example, to make a file readonly, you can set the permission to 0o777, ... |
PHP Cookies | A cookie is often used to identify a user. A cookie is a small file that the
server embeds on the user's computer. Each time the same computer requests a
page with a browser, it will send the cookie too. With PHP, you can both create
and retrieve cookie values.
A cookie is created with the setcookie() function.
Only... | [
{
"code": null,
"e": 265,
"s": 0,
"text": "A cookie is often used to identify a user. A cookie is a small file that the \nserver embeds on the user's computer. Each time the same computer requests a \npage with a browser, it will send the cookie too. With PHP, you can both create \nand retrieve cook... |
How to call Python file from within PHP? | To call a Python file from within a PHP file, you need to call it using the shell_exec function.
<?php
$command = escapeshellcmd('/usr/custom/test.py');
$output = shell_exec($command);
echo $output;
?>
This will call the script. But in your script at the top, you'll need to specify the interpreter as well. ... | [
{
"code": null,
"e": 1159,
"s": 1062,
"text": "To call a Python file from within a PHP file, you need to call it using the shell_exec function."
},
{
"code": null,
"e": 1276,
"s": 1159,
"text": "<?php\n $command = escapeshellcmd('/usr/custom/test.py');\n $output = shell_exe... |
Python - String concatenation in Heterogeneous list - GeeksforGeeks | 04 Oct, 2021
Sometimes, while working with Python, we can come across a problem in which we require to find the concatenation of strings. This problem is easier to solve. But this can get complex in case we have mixture of data types to go along with it. Let’s discuss certain ways in which this task can be performed.
M... | [
{
"code": null,
"e": 23901,
"s": 23873,
"text": "\n04 Oct, 2021"
},
{
"code": null,
"e": 24207,
"s": 23901,
"text": "Sometimes, while working with Python, we can come across a problem in which we require to find the concatenation of strings. This problem is easier to solve. But t... |
Python program to split a string and join with comma | Suppose we have few words that are separated by spaces. We have to split these words to form a list, then join them into a string by placing comma in-between.
So, if the input is like s = "Programming Python Language Easy Funny", then the output will be Programming, Python, Language, Easy, Funny
To solve this, we will ... | [
{
"code": null,
"e": 1221,
"s": 1062,
"text": "Suppose we have few words that are separated by spaces. We have to split these words to form a list, then join them into a string by placing comma in-between."
},
{
"code": null,
"e": 1359,
"s": 1221,
"text": "So, if the input is lik... |
Ridiculously Powerful Functions in Python | Towards Data Science | Python offers a bunch of built-in functions!
Python programmers use them to write code quickly, clearly, and in a more Pythonic way.
Here, I am discussing the 5 most powerful, speedy built-in functions which I mastered (and certainly you can) in 1 minute or less. ⏳
I use them a lot in my projects to make the code faste... | [
{
"code": null,
"e": 216,
"s": 171,
"text": "Python offers a bunch of built-in functions!"
},
{
"code": null,
"e": 304,
"s": 216,
"text": "Python programmers use them to write code quickly, clearly, and in a more Pythonic way."
},
{
"code": null,
"e": 437,
"s": 30... |
Introduction to Survival Analysis: the Kaplan-Meier estimator | by Eryk Lewinson | Towards Data Science | In my previous article, I described the potential use-cases of survival analysis and introduced all the building blocks required to understand the techniques used for analyzing the time-to-event data.
I continue the series by explaining perhaps the simplest, yet very insightful approach to survival analysis — the Kapla... | [
{
"code": null,
"e": 373,
"s": 172,
"text": "In my previous article, I described the potential use-cases of survival analysis and introduced all the building blocks required to understand the techniques used for analyzing the time-to-event data."
},
{
"code": null,
"e": 638,
"s": 373... |
Why is the size of an empty class not zero in C++? | Suppose we have one empty class in C++. Now let us check whether its size is 0 or not. Actually, the standard does not permit objects (or classes) of size 0, this is because that would make it possible for two distinct objects to have the same memory location. This is the reason behind the concept that even an empty cl... | [
{
"code": null,
"e": 1516,
"s": 1062,
"text": "Suppose we have one empty class in C++. Now let us check whether its size is 0 or not. Actually, the standard does not permit objects (or classes) of size 0, this is because that would make it possible for two distinct objects to have the same memory lo... |
2D Shapes(Objects) Intersection Operation | This operation takes two or more shapes as inputs and returns the intersection area between them as shown below.
You can perform an intersection operation on the shapes using the method named intersect(). Since this is a static method, you should call it using the class name (Shape or its subclasses) as shown below.
Sh... | [
{
"code": null,
"e": 2013,
"s": 1900,
"text": "This operation takes two or more shapes as inputs and returns the intersection area between them as shown below."
},
{
"code": null,
"e": 2218,
"s": 2013,
"text": "You can perform an intersection operation on the shapes using the met... |
Find N distinct numbers whose bitwise Or is equal to K - GeeksforGeeks | 24 Mar, 2022
Given two integers N and K, the task is to find N distinct integers whose bit-wise OR is equal to K. If there does not exist any possible answer then print -1.Examples:
Input: N = 3, K = 5 Output: 5 0 1 5 OR 0 OR 1 = 5Input: N = 10, K = 5 Output: -1 It is not possible to find any solution.
Approach: ... | [
{
"code": null,
"e": 25013,
"s": 24985,
"text": "\n24 Mar, 2022"
},
{
"code": null,
"e": 25184,
"s": 25013,
"text": "Given two integers N and K, the task is to find N distinct integers whose bit-wise OR is equal to K. If there does not exist any possible answer then print -1.Exam... |
How to filter R DataFrame by values in a column? - GeeksforGeeks | 30 May, 2021
In R Programming Language, dataframe columns can be subjected to constraints, and produce smaller subsets. However, while the conditions are applied, the following properties are maintained :
Rows are considered to be a subset of the input.
Rows in the subset appear in the same order as the original datafr... | [
{
"code": null,
"e": 25256,
"s": 25228,
"text": "\n30 May, 2021"
},
{
"code": null,
"e": 25448,
"s": 25256,
"text": "In R Programming Language, dataframe columns can be subjected to constraints, and produce smaller subsets. However, while the conditions are applied, the following... |
Check privileges (grants) for a specific user in MySQL? | If you want to check privileges for a specific user, then use the below syntax −
SHOW GRANTS FOR 'yourUserName'@'yourHostName';
The above syntax will check privileges for a specific user.
To check the privileges for a specific user, then use FOR. Let’s say we have a username ‘JOHN‘ and host is ‘%’. Following is the que... | [
{
"code": null,
"e": 1143,
"s": 1062,
"text": "If you want to check privileges for a specific user, then use the below syntax −"
},
{
"code": null,
"e": 1190,
"s": 1143,
"text": "SHOW GRANTS FOR 'yourUserName'@'yourHostName';"
},
{
"code": null,
"e": 1250,
"s": 11... |
Visualizing Graph Embeddings with t-SNE in Python | by CJ Sullivan | Towards Data Science | In my previous post we discussed the purpose and nature of graph embeddings. The main idea is that to do machine learning on a graph we need to convert the graph into a series of vectors (embeddings) that we can then use to train our machine learning (ML) models.
The catch is that graph embeddings can be difficult to t... | [
{
"code": null,
"e": 311,
"s": 47,
"text": "In my previous post we discussed the purpose and nature of graph embeddings. The main idea is that to do machine learning on a graph we need to convert the graph into a series of vectors (embeddings) that we can then use to train our machine learning (ML) ... |
MCQ on Memory allocation and compilation process in C | Here we will see some MCQ questions on Memory Allocation and Compilation Processes.
Question 1 − What will be the output of the following code −
Live Demo
#include <stdio.h>
#include <stdlib.h>
int main() {
union my_union {
int i;
float f;
char c;
};
union my_union* u;
u = (union my_union... | [
{
"code": null,
"e": 1146,
"s": 1062,
"text": "Here we will see some MCQ questions on Memory Allocation and Compilation Processes."
},
{
"code": null,
"e": 1207,
"s": 1146,
"text": "Question 1 − What will be the output of the following code −"
},
{
"code": null,
"e": ... |
What are the main file components in Cucumber? | The main file components in Cucumber are listed below −
Feature file − This file has an extension of .feature. It comprises single or multiple test scenarios in plain text. All the scenarios are written with the
keywords like Then, Given, When, And, But, Feature, Background and so on.
Feature file − This file has an ex... | [
{
"code": null,
"e": 1118,
"s": 1062,
"text": "The main file components in Cucumber are listed below −"
},
{
"code": null,
"e": 1348,
"s": 1118,
"text": "Feature file − This file has an extension of .feature. It comprises single or multiple test scenarios in plain text. All the s... |
How can we update the values of a collection using LINQ in C#? | If the collection is a List, then we can make use of ForEach extension method which is available as part of LINQ.
Live Demo
using System;
using System.Collections.Generic;
namespace DemoApplication {
class Program {
static void Main(string[] args) {
List<Fruit> fruits = new List<Fruit> {
... | [
{
"code": null,
"e": 1176,
"s": 1062,
"text": "If the collection is a List, then we can make use of ForEach extension method which is available as part of LINQ."
},
{
"code": null,
"e": 1187,
"s": 1176,
"text": " Live Demo"
},
{
"code": null,
"e": 2078,
"s": 1187,... |
.NET Core - Create a Testing Project | In this chapter, we will discuss how to create a Testing project using .NET Core. Unit testing is a development process for the software that has the smallest testable parts of an application, which are called units. They are individually and independently scrutinized for any proper operation. Unit testing is can eithe... | [
{
"code": null,
"e": 2747,
"s": 2386,
"text": "In this chapter, we will discuss how to create a Testing project using .NET Core. Unit testing is a development process for the software that has the smallest testable parts of an application, which are called units. They are individually and independen... |
Convert.ToBase64String() Method in C# | The Convert.ToBase64String() method in C# is used to convert the value of an array of 8-bit unsigned integers to its equivalent string representation that is encoded with base-64 digits.
Following is the syntax −
public static string ToBase64String (byte[] arr);
Above, arr is an array of 8-bit unsigned integers.
Let us... | [
{
"code": null,
"e": 1249,
"s": 1062,
"text": "The Convert.ToBase64String() method in C# is used to convert the value of an array of 8-bit unsigned integers to its equivalent string representation that is encoded with base-64 digits."
},
{
"code": null,
"e": 1275,
"s": 1249,
"tex... |
Cohesion in Java - GeeksforGeeks | 06 Dec, 2021
Cohesion in Java is the Object-Oriented principle most closely associated with making sure that a class is designed with a single, well-focused purpose. In object-oriented design, cohesion refers all to how a single class is designed.
Note: The more focused a class is, the more cohesiveness of that class ... | [
{
"code": null,
"e": 24211,
"s": 24183,
"text": "\n06 Dec, 2021"
},
{
"code": null,
"e": 24447,
"s": 24211,
"text": "Cohesion in Java is the Object-Oriented principle most closely associated with making sure that a class is designed with a single, well-focused purpose. In object-... |
What is the difference between PCA and Factor Analysis? | by Joos Korstanje | Towards Data Science | PCA, short for Principal Component Analysis, and Factor Analysis, are two statistical methods that are often covered together in classes on Multivariate Statistics.
In this article, you will discover the mathematical and practical differences between the two methods.
Multivariate Statistics is a group of statistical me... | [
{
"code": null,
"e": 336,
"s": 171,
"text": "PCA, short for Principal Component Analysis, and Factor Analysis, are two statistical methods that are often covered together in classes on Multivariate Statistics."
},
{
"code": null,
"e": 439,
"s": 336,
"text": "In this article, you ... |
Reduced-Rank Vector Autoregressive Model for High-Dimensional Time Series Forecasting | by Xinyu Chen (陈新宇) | Towards Data Science | Nowadays, with the remarkable development of data collection/availability techniques, we have more opportunities to approach many kinds of time series data in a lot of scientific and industrial fields. There are many types of time series data, including univariate time series, multivariate time series, and multidimensi... | [
{
"code": null,
"e": 851,
"s": 172,
"text": "Nowadays, with the remarkable development of data collection/availability techniques, we have more opportunities to approach many kinds of time series data in a lot of scientific and industrial fields. There are many types of time series data, including u... |
Accessing a parent Element using JavaScript | Following is the code for accessing a parent element using JavaScript −
Live Demo
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Document</title>
<style>
body {
font-family: "Segoe UI", Tahoma, Geneva, Verdana, s... | [
{
"code": null,
"e": 1134,
"s": 1062,
"text": "Following is the code for accessing a parent element using JavaScript −"
},
{
"code": null,
"e": 1145,
"s": 1134,
"text": " Live Demo"
},
{
"code": null,
"e": 2778,
"s": 1145,
"text": "<!DOCTYPE html>\n<html lang=... |
Python program to sort and find the data in the student records | 29 May, 2021
Consider a software for maintaining records of the students in a class. Consider the following functions which are required to be performed:
Sorting of names according to First Name of the students.Finding the Minimum marks among all the marksFinding contact number of student using his/her First Name.
Sort... | [
{
"code": null,
"e": 54,
"s": 26,
"text": "\n29 May, 2021"
},
{
"code": null,
"e": 195,
"s": 54,
"text": "Consider a software for maintaining records of the students in a class. Consider the following functions which are required to be performed:"
},
{
"code": null,
"... |
How to Draw Polyline in Google Maps in Android? | 24 Jan, 2021
Google Maps is used in many Android applications. While using Google Maps there are many modifications which you will get to see while using Maps in this apps. When we have used Google Maps in different apps such as OLA and Uber we will get to see lines and routes drawn on our Maps. In this article, we wil... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n24 Jan, 2021"
},
{
"code": null,
"e": 397,
"s": 28,
"text": "Google Maps is used in many Android applications. While using Google Maps there are many modifications which you will get to see while using Maps in this apps. When we have us... |
How to flip an image horizontally or vertically in Python? | 25 May, 2021
Prerequisites: PIL
Given an image the task here is to generate a Python script to flip an image horizontally and vertically. Here the module used for the task is PIL and transpose() function of this module.
Syntax:
transpose(degree)
Keywords FLIP_TOP_BOTTOM and FLIP_LEFT_RIGHT will be passed to transpose ... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n25 May, 2021"
},
{
"code": null,
"e": 47,
"s": 28,
"text": "Prerequisites: PIL"
},
{
"code": null,
"e": 236,
"s": 47,
"text": "Given an image the task here is to generate a Python script to flip an image horizontally... |
Java Program to Solve Set Cover Problem | 12 Jul, 2022
Problem Statement: Given a set of elements 1 to n and a set S of n sets whose union equals everything, the problem is to find the minimum numbers of subsets equal the set in a pair of 2.
Concept: This problem is to solve the set problems. We can use permutations and combinations to solve this problem.
Ill... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n12 Jul, 2022"
},
{
"code": null,
"e": 215,
"s": 28,
"text": "Problem Statement: Given a set of elements 1 to n and a set S of n sets whose union equals everything, the problem is to find the minimum numbers of subsets equal the set in a... |
Python – Convert Image to String and vice-versa | 23 Dec, 2020
To store or transfer an Image to some we need to convert it into a string such that the string should portray the image which we give as input. So In Python to do this Operation, it is a straight forward task not complicated because we have a lot of functions in Python available.
Here First We Import “Base... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n23 Dec, 2020"
},
{
"code": null,
"e": 333,
"s": 52,
"text": "To store or transfer an Image to some we need to convert it into a string such that the string should portray the image which we give as input. So In Python to do this Operat... |
Scala Int max() method with example | 30 Jan, 2020
The max() method is utilized to return the maximum value of the two specified int numbers.
Method Definition: (First_Number).max(Second_Number)
Return Type: It returns true the maximum value of the two specified int numbers.
Example #1:
// Scala program of Int max()// method // Creating objectobject GfG{... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n30 Jan, 2020"
},
{
"code": null,
"e": 119,
"s": 28,
"text": "The max() method is utilized to return the maximum value of the two specified int numbers."
},
{
"code": null,
"e": 172,
"s": 119,
"text": "Method Definiti... |
Program for Page Replacement Algorithms | Set 2 (FIFO) | 13 Jul, 2022
Prerequisite : Page Replacement Algorithms In operating systems that use paging for memory management, page replacement algorithm are needed to decide which page needed to be replaced when new page comes in. Whenever a new page is referred and not present in memory, page fault occurs and Operating System r... | [
{
"code": null,
"e": 54,
"s": 26,
"text": "\n13 Jul, 2022"
},
{
"code": null,
"e": 580,
"s": 54,
"text": "Prerequisite : Page Replacement Algorithms In operating systems that use paging for memory management, page replacement algorithm are needed to decide which page needed to be... |
How to find the height of a text in HTML canvas using JavaScript ? | 25 Dec, 2020
In this article, we will find the height of the text canvas using JavaScript.
Approach: In the following example, the height attribute of the HTML canvas is used. First set the font in pt to set the height.
context.font = '26pt Calibri';
Then the current text is aligned in the center by using values ‘middl... | [
{
"code": null,
"e": 54,
"s": 26,
"text": "\n25 Dec, 2020"
},
{
"code": null,
"e": 132,
"s": 54,
"text": "In this article, we will find the height of the text canvas using JavaScript."
},
{
"code": null,
"e": 261,
"s": 132,
"text": "Approach: In the following ... |
Birthday Reminder Application in Python | In this section we will see how to create a birthday reminder application using Python.
Create an application using Python, which can check whether there is any birthday on the current day or not. If it is the birthday of some listed person, send a notification to the System with the name of that person.
We need a file... | [
{
"code": null,
"e": 1150,
"s": 1062,
"text": "In this section we will see how to create a birthday reminder application using Python."
},
{
"code": null,
"e": 1368,
"s": 1150,
"text": "Create an application using Python, which can check whether there is any birthday on the curre... |
Difference Between Friend Function and Virtual Function in C++ - GeeksforGeeks | 12 Mar, 2021
A friend class can access private and protected members of other classes in which it is declared as friend. It is sometimes useful to allow a particular class to access private members of other classes. Just likely, a friend function is a function that is declared outside the scope of a class. This functio... | [
{
"code": null,
"e": 24098,
"s": 24070,
"text": "\n12 Mar, 2021"
},
{
"code": null,
"e": 24604,
"s": 24098,
"text": "A friend class can access private and protected members of other classes in which it is declared as friend. It is sometimes useful to allow a particular class to a... |
Java Program to convert positive int to negative and negative to positive | To convert positive int to negative and vice-versa, use the Bitwise Complement Operator.
Let us first initialize a positive int −
int positiveVal = 200;
Now, let us convert it to negative −
int negativeVal = (~(positiveVal - 1));
Now, let’s say we have the following negative int −
int negativeVal = -300;
The following ... | [
{
"code": null,
"e": 1151,
"s": 1062,
"text": "To convert positive int to negative and vice-versa, use the Bitwise Complement Operator."
},
{
"code": null,
"e": 1192,
"s": 1151,
"text": "Let us first initialize a positive int −"
},
{
"code": null,
"e": 1215,
"s": ... |
How to get the index of selected option in Tkinter Combobox? | If you want to create a dropdown list of items and enable the items of list to be selected by the user, then you can use the Combobox widget. The Combobox widget allows you to create a dropdown list in which the list of items can be selected instantly. However, if you want to get the index of selected items in the comb... | [
{
"code": null,
"e": 1519,
"s": 1062,
"text": "If you want to create a dropdown list of items and enable the items of list to be selected by the user, then you can use the Combobox widget. The Combobox widget allows you to create a dropdown list in which the list of items can be selected instantly. ... |
Time & Work - Solved Examples | Q 1 - A can do a bit of work in 8 days, which B alone can do in 10 days in how long . In how long both cooperating can do it?
A - 40/9 days
B - 41/9 days
C - 42/9 days
D - 43/9 days
Answer - A
Explanation
A's 1 day work= 1/8, B`s 1 day work = 1/10
∴ (A+B) 1 day work = (1/8+1/10) = 9/40
Both cooperating can complete it ... | [
{
"code": null,
"e": 4018,
"s": 3892,
"text": "Q 1 - A can do a bit of work in 8 days, which B alone can do in 10 days in how long . In how long both cooperating can do it?"
},
{
"code": null,
"e": 4032,
"s": 4018,
"text": "A - 40/9 days"
},
{
"code": null,
"e": 4046,... |
How to create our own Listener interface in android? | This example demonstrate about How to create our own Listener interface in android
Step 1 − Create a new project in Android Studio, go to File ⇒ New Project and fill all required details to create a new project.
Step 2 − Add the following code to res/layout/activity_main.xml.
<?xml version = "1.0" encoding = "utf-8"?>
... | [
{
"code": null,
"e": 1145,
"s": 1062,
"text": "This example demonstrate about How to create our own Listener interface in android"
},
{
"code": null,
"e": 1274,
"s": 1145,
"text": "Step 1 − Create a new project in Android Studio, go to File ⇒ New Project and fill all required det... |
How to Use Selenium to Web-Scrape with Example | by Bryan Pfalzgraf | Towards Data Science | Selenium is a Python library and tool used for automating web browsers to do a number of tasks. One of such is web-scraping to extract useful data and information that may be otherwise unavailable. Here’s a step-by-step guide on how to use Selenium with the example being extracting NBA player salary data from the websi... | [
{
"code": null,
"e": 535,
"s": 171,
"text": "Selenium is a Python library and tool used for automating web browsers to do a number of tasks. One of such is web-scraping to extract useful data and information that may be otherwise unavailable. Here’s a step-by-step guide on how to use Selenium with t... |
Interactive Visualizations with Plotly | by Soner Yıldırım | Towards Data Science | Plotly Python (plotly.py) is an open-source plotting library built on plotly javascript (plotly.js). It allows to create interactive visualizations that can be displayed in Jupyter notebooks. It can be installed using pip or conda:
$ pip install plotly==4.8.0$ conda install -c plotly plotly=4.8.0
There are basically tw... | [
{
"code": null,
"e": 404,
"s": 172,
"text": "Plotly Python (plotly.py) is an open-source plotting library built on plotly javascript (plotly.js). It allows to create interactive visualizations that can be displayed in Jupyter notebooks. It can be installed using pip or conda:"
},
{
"code": n... |
Machine Learning: GridSearchCV & RandomizedSearchCV | by Papa Moryba Kouate | Towards Data Science | Introduction
In this article, I’d like to speak about how we can improve the performance of our machine learning model by tuning the parameters.
Obviously it is important to know the meaning of the parameters that we want to adjust in order to improve our model. For this reason, before to speak about GridSearchCV and R... | [
{
"code": null,
"e": 185,
"s": 172,
"text": "Introduction"
},
{
"code": null,
"e": 317,
"s": 185,
"text": "In this article, I’d like to speak about how we can improve the performance of our machine learning model by tuning the parameters."
},
{
"code": null,
"e": 572,... |
Minimum halls required for class scheduling - GeeksforGeeks | 25 May, 2021
Given N lecture timings, with their start time and end time (both inclusive), the task is to find the minimum number of halls required to hold all the classes such that a single hall can be used for only one lecture at a given time. Note that the maximum end time can be 105.Examples:
Input: lectures[][] ... | [
{
"code": null,
"e": 24431,
"s": 24403,
"text": "\n25 May, 2021"
},
{
"code": null,
"e": 24718,
"s": 24431,
"text": "Given N lecture timings, with their start time and end time (both inclusive), the task is to find the minimum number of halls required to hold all the classes such... |
A comprehensive guide to downloading stock prices in Python | by Eryk Lewinson | Towards Data Science | The goal of this short article is to show how easy it is to download stock prices (and stock-related data) in Python. In this article I present two approaches, both using Yahoo Finance as the data source. There are many alternatives out there (Quandl, Intrinion, AlphaVantage, Tiingo, IEX Cloud, etc.), however, Yahoo Fi... | [
{
"code": null,
"e": 605,
"s": 172,
"text": "The goal of this short article is to show how easy it is to download stock prices (and stock-related data) in Python. In this article I present two approaches, both using Yahoo Finance as the data source. There are many alternatives out there (Quandl, Int... |
Building a Real-Time Object Recognition App with Tensorflow and OpenCV | by Dat Tran | Towards Data Science | In this article, I will walk through the steps how you can easily build your own real-time object recognition application with Tensorflow’s (TF) new Object Detection API and OpenCV in Python 3 (specifically 3.5). The focus will be on the challenges that I faced when building it. You can find the full code on my repo.
A... | [
{
"code": null,
"e": 491,
"s": 172,
"text": "In this article, I will walk through the steps how you can easily build your own real-time object recognition application with Tensorflow’s (TF) new Object Detection API and OpenCV in Python 3 (specifically 3.5). The focus will be on the challenges that I... |
How to take screenshots using python? - GeeksforGeeks | 17 May, 2021
Python is a widely used general-purpose language. It allows performing a variety of tasks. One of them can be taking a screenshot. It provides a module named pyautogui which can be used to take the screenshot. This module along with NumPy and OpenCV provides the way to manipulate and save the images (scree... | [
{
"code": null,
"e": 24323,
"s": 24295,
"text": "\n17 May, 2021"
},
{
"code": null,
"e": 24650,
"s": 24323,
"text": "Python is a widely used general-purpose language. It allows performing a variety of tasks. One of them can be taking a screenshot. It provides a module named pyaut... |
Python program to check if the given number is Happy Number | When it is required to check if a given number is a happy number, the ‘%’ operator, the ‘//’ operator and the ‘+’ operator can be used.
A Happy number is the one that ends up as 1, when it is replaced by the sum of square of every digit in the number.
Below is a demonstration for the same −
Live Demo
def check_happy_n... | [
{
"code": null,
"e": 1198,
"s": 1062,
"text": "When it is required to check if a given number is a happy number, the ‘%’ operator, the ‘//’ operator and the ‘+’ operator can be used."
},
{
"code": null,
"e": 1314,
"s": 1198,
"text": "A Happy number is the one that ends up as 1, w... |
Non capturing groups Java regular expressions: | Using capturing groups you can treat multiple characters as a single unit. You just need to place the characters to be grouped inside a set of parentheses. For example −
(.*)(\\d+)(.*)
If you are trying to match multiple groups the match results of each group is captured. You can get the results a group by passing its ... | [
{
"code": null,
"e": 1232,
"s": 1062,
"text": "Using capturing groups you can treat multiple characters as a single unit. You just need to place the characters to be grouped inside a set of parentheses. For example −"
},
{
"code": null,
"e": 1247,
"s": 1232,
"text": "(.*)(\\\\d+)... |
How to Deal with Missing Data in Python | by Chaitanya Baweja | Towards Data Science | Last year I was working on a project that dealt with Twitter data. We had around a billion tweets in our database. I needed to clean our data so that we can run some machine learning models on it.
Here is a snapshot of the Dataset:
Weird Unicode characters (emojis), random missing values with changing identifiers, etc.... | [
{
"code": null,
"e": 369,
"s": 172,
"text": "Last year I was working on a project that dealt with Twitter data. We had around a billion tweets in our database. I needed to clean our data so that we can run some machine learning models on it."
},
{
"code": null,
"e": 404,
"s": 369,
... |
Adding Collisions Using pygame.Rect.colliderect in Pygame - GeeksforGeeks | 24 Sep, 2021
Prerequisite: Drawing shapes in Pygame, Introduction to pygame
In this article, we are going to use pygame.Rect.colliderect for adding collision in a shape using Pygame in Python.
We can easily add collisions in Pygame shapes using the colliderect( ). For this, we are going to draw two rectangles then we w... | [
{
"code": null,
"e": 24546,
"s": 24518,
"text": "\n24 Sep, 2021"
},
{
"code": null,
"e": 24609,
"s": 24546,
"text": "Prerequisite: Drawing shapes in Pygame, Introduction to pygame"
},
{
"code": null,
"e": 24726,
"s": 24609,
"text": "In this article, we are goi... |
Print all n-digit strictly increasing numbers in C++ | In this problem, we are given a number N and we have to print all n-digit numbers whose digits are strickly increasing from MSB to LSB i.e. the number at LSB (left) should be smaller than the number at right.
Let’s take an example to understand the problem −
Input − n = 2
Output −
01 02 03 04 05 06 07 08 09 12 13 14 15... | [
{
"code": null,
"e": 1271,
"s": 1062,
"text": "In this problem, we are given a number N and we have to print all n-digit numbers whose digits are strickly increasing from MSB to LSB i.e. the number at LSB (left) should be smaller than the number at right."
},
{
"code": null,
"e": 1321,
... |
C Program on two-dimensional array initialized at run time | Calculate the sum and product of all elements in an array by using the run-time compilation.
A two-dimensional array is used in situations where a table of values have to be stored (or) in matrices applications
The syntax is as follows −
datatype array_ name [rowsize] [column size];
For example, int a[5] [5];
Number of... | [
{
"code": null,
"e": 1155,
"s": 1062,
"text": "Calculate the sum and product of all elements in an array by using the run-time compilation."
},
{
"code": null,
"e": 1273,
"s": 1155,
"text": "A two-dimensional array is used in situations where a table of values have to be stored (... |
Interactive basketball data visualizations with Plotly | by JP Hwang | Towards Data Science | This post is mostly about visualisation. It is only going to include very cursory basketball info — basically, if you know what it is, you’re going to be fine.
I have been tinkering with basketball data analysis & visualisation recently, using matplotlib for plotting. It is powerful, but Plotly is my usual visualisatio... | [
{
"code": null,
"e": 332,
"s": 172,
"text": "This post is mostly about visualisation. It is only going to include very cursory basketball info — basically, if you know what it is, you’re going to be fine."
},
{
"code": null,
"e": 513,
"s": 332,
"text": "I have been tinkering with... |
Filter table with Bootstrap | To filter a table in Bootstrap, you can try to run the following code −
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 src = "/bootstrap/js/bo... | [
{
"code": null,
"e": 1134,
"s": 1062,
"text": "To filter a table in Bootstrap, you can try to run the following code −"
},
{
"code": null,
"e": 1144,
"s": 1134,
"text": "Live Demo"
},
{
"code": null,
"e": 3087,
"s": 1144,
"text": "<!DOCTYPE html>\n<html>\n <... |
C++ program to find the sum of the series 1 + 1/2^2 + 1/3^3 + .....+ 1/n^n | In this tutorial, we will be discussing a program to find the sum of the given series 1 + 1/2^2 + 1/3^3 + .....+ 1/n^n.
For this, we will be given with the value of n and our task is to add up every term starting from the first one to find the sum of the given series.
#include <iostream>
#include <math.h>
using namespa... | [
{
"code": null,
"e": 1182,
"s": 1062,
"text": "In this tutorial, we will be discussing a program to find the sum of the given series 1 + 1/2^2 + 1/3^3 + .....+ 1/n^n."
},
{
"code": null,
"e": 1331,
"s": 1182,
"text": "For this, we will be given with the value of n and our task is... |
Explain insertion of elements in linked list using C language | Linked lists use dynamic memory allocation i.e. they grow and shrink accordingly. They are defined as a collection of nodes. Here, nodes have two parts, which are data and link. The representation of data, link and linked lists is given below −
There are three types of operations on linked lists in C language, which ar... | [
{
"code": null,
"e": 1307,
"s": 1062,
"text": "Linked lists use dynamic memory allocation i.e. they grow and shrink accordingly. They are defined as a collection of nodes. Here, nodes have two parts, which are data and link. The representation of data, link and linked lists is given below −"
},
... |
An Introduction to PyTorch Lightning | by Harsh Maheshwari | Towards Data Science | Word on the street is that PyTorch lightning is a much better version of normal PyTorch. But what could it possibly have that it brought such consensus in our world? Well, it helps researchers scale the model with multi-GPU training, Fp-16 training, and TPU enabled training by changing just one argument.
YESSSS you rea... | [
{
"code": null,
"e": 478,
"s": 172,
"text": "Word on the street is that PyTorch lightning is a much better version of normal PyTorch. But what could it possibly have that it brought such consensus in our world? Well, it helps researchers scale the model with multi-GPU training, Fp-16 training, and T... |
C++ nested loops | A loop can be nested inside of another loop. C++ allows at least 256 levels of nesting.
The syntax for a nested for loop statement in C++ is as follows −
for ( init; condition; increment ) {
for ( init; condition; increment ) {
statement(s);
}
statement(s); // you can put more statements.
}
The syntax f... | [
{
"code": null,
"e": 2406,
"s": 2318,
"text": "A loop can be nested inside of another loop. C++ allows at least 256 levels of nesting."
},
{
"code": null,
"e": 2472,
"s": 2406,
"text": "The syntax for a nested for loop statement in C++ is as follows −"
},
{
"code": null,
... |
Multivalued Dependency (MVD) in DBMS - GeeksforGeeks | 23 Feb, 2022
MVD or multivalued dependency means that for a single value of attribute ‘a’ multiple values of attribute ‘b’ exist. We write it as,
a --> --> b
It is read as: a is multi-valued dependent on b.
Suppose a person named Geeks is working on 2 projects Microsoft and Oracle and has 2 hobbies namely Reading and ... | [
{
"code": null,
"e": 24428,
"s": 24400,
"text": "\n23 Feb, 2022"
},
{
"code": null,
"e": 24561,
"s": 24428,
"text": "MVD or multivalued dependency means that for a single value of attribute ‘a’ multiple values of attribute ‘b’ exist. We write it as,"
},
{
"code": null,
... |
Building a Simple Application using KivyMD in Python - GeeksforGeeks | 01 Jun, 2021
KivyMD is an extension of the Kivy framework. KivyMD is a collection of Material Design widgets for use with Kivy, a GUI framework for making mobile applications. It is similar to the Kivy framework but provides a more attractive GUI. In this article, we will see how to make a simple application in KivyMDu... | [
{
"code": null,
"e": 23901,
"s": 23873,
"text": "\n01 Jun, 2021"
},
{
"code": null,
"e": 24262,
"s": 23901,
"text": "KivyMD is an extension of the Kivy framework. KivyMD is a collection of Material Design widgets for use with Kivy, a GUI framework for making mobile applications. ... |
Lower bound in C++ | In this tutorial, we will be discussing a program to understand the lower bound in C++.
lower_bound() method in C++ is used to return the very first number in the container object which is not less than the given value.
Live Demo
#include <bits/stdc++.h>
int main(){
std::vector<int> v{ 10, 20, 30, 40, 50 };
std:... | [
{
"code": null,
"e": 1150,
"s": 1062,
"text": "In this tutorial, we will be discussing a program to understand the lower bound in C++."
},
{
"code": null,
"e": 1282,
"s": 1150,
"text": "lower_bound() method in C++ is used to return the very first number in the container object wh... |
MySQL - PREPARE Statement | A prepared statement in MySQL represents a precompiled statement. A statement is compiled and stored in a prepared statement and you can later execute this multiple times. Instead of values we pass place holders to this statement.
If you want to execute several identical queries (that differ by values only). You can us... | [
{
"code": null,
"e": 2564,
"s": 2333,
"text": "A prepared statement in MySQL represents a precompiled statement. A statement is compiled and stored in a prepared statement and you can later execute this multiple times. Instead of values we pass place holders to this statement."
},
{
"code": ... |
Text Summarization on the Books of Harry Potter | by Greg Rafferty | Towards Data Science | I’m Greg Rafferty, a data scientist in the Bay Area. You can check out the code for this project on my github. Feel free to contact me with any questions!
In this series of posts, I’m looking at a few handy NLP techniques, through the lens of Harry Potter. Previous posts in this series on basic NLP looked at Topic Mode... | [
{
"code": null,
"e": 327,
"s": 172,
"text": "I’m Greg Rafferty, a data scientist in the Bay Area. You can check out the code for this project on my github. Feel free to contact me with any questions!"
},
{
"code": null,
"e": 605,
"s": 327,
"text": "In this series of posts, I’m lo... |
Intro to Dynamic Visualization with Python — Animations and Interactive Plots | by Naveen Venkatesan | Towards Data Science | Sometimes, you would like to create a dynamic graphic that either changes with time like a video, or adapts based on an interactive user input. These visualizations do a great of job of really showing how an output can change with its inputs. In this article, I will present the same data as a static plot, an animation,... | [
{
"code": null,
"e": 906,
"s": 172,
"text": "Sometimes, you would like to create a dynamic graphic that either changes with time like a video, or adapts based on an interactive user input. These visualizations do a great of job of really showing how an output can change with its inputs. In this arti... |
FinRL for Quantitative Finance: Tutorial for Multiple Stock Trading | by Bruce Yang | Towards Data Science | Note from Towards Data Science’s editors: While we allow independent authors to publish articles in accordance with our rules and guidelines, we do not endorse each author’s contribution. You should not rely on an author’s works without seeking professional advice. See our Reader Terms for details.
This blog is a tutor... | [
{
"code": null,
"e": 471,
"s": 171,
"text": "Note from Towards Data Science’s editors: While we allow independent authors to publish articles in accordance with our rules and guidelines, we do not endorse each author’s contribution. You should not rely on an author’s works without seeking profession... |
Program to Add Two Complex Numbers - GeeksforGeeks | 18 Feb, 2022
Given two complex numbers of the form and the task is to add these two complex numbers.
and
Here the values of real and imaginary numbers are passed while calling the parameterized constructor and, with the help of a default(empty) constructor, the function addComp is called to get the addition of complex... | [
{
"code": null,
"e": 24551,
"s": 24523,
"text": "\n18 Feb, 2022"
},
{
"code": null,
"e": 24639,
"s": 24551,
"text": "Given two complex numbers of the form and the task is to add these two complex numbers."
},
{
"code": null,
"e": 24644,
"s": 24639,
"text": "an... |
HTML | <table> width Attribute | 29 May, 2019
The HTML <table> width Attribute is used to specify the width of a table. If width attribute is not set then it takes default width according to content.
Syntax:
<table width="pixels | %">
Attribute Values:
pixels: It sets the width of table in terms of pixels.
%: It sets the width of table in terms of per... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n29 May, 2019"
},
{
"code": null,
"e": 182,
"s": 28,
"text": "The HTML <table> width Attribute is used to specify the width of a table. If width attribute is not set then it takes default width according to content."
},
{
"code":... |
Output of Python Programs | Set 21 (Bool) | 11 Jun, 2021
Prerequisite : Boolean Note: Output of all these programs is tested on Python31. What is the output of the code:
Python3
print(bool('False'))print(bool())
False, TrueNone, NoneTrue, TrueTrue, False
False, True
None, None
True, True
True, False
Output:
4. True, False
Explanation: If the argument passed ... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n11 Jun, 2021"
},
{
"code": null,
"e": 167,
"s": 52,
"text": "Prerequisite : Boolean Note: Output of all these programs is tested on Python31. What is the output of the code: "
},
{
"code": null,
"e": 175,
"s": 167,
... |
Node.js process.platform Property | 12 Oct, 2021
The process.platform property is an inbuilt application programming interface of the process module which is used to get the Operating System platform information.
Syntax:
process.platform
Return Value: This property returns a string that represents the operating system platform. The returned value can b... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n12 Oct, 2021"
},
{
"code": null,
"e": 192,
"s": 28,
"text": "The process.platform property is an inbuilt application programming interface of the process module which is used to get the Operating System platform information."
},
{
... |
Comparator nullsFirst() method in Java with examples | 29 Apr, 2019
The nullsFirst(java.util.Comparator) method returns comparator that is a null-friendly comparator and considers null values to be less than non-null. The null first operates by the following logic:
The null element is considered to be less than non-null.When both elements are null, then they are considered... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n29 Apr, 2019"
},
{
"code": null,
"e": 226,
"s": 28,
"text": "The nullsFirst(java.util.Comparator) method returns comparator that is a null-friendly comparator and considers null values to be less than non-null. The null first operates b... |
Simple Keyboard Racing with Python | 21 Jul, 2021
Let’s make a simple keyboard racing game using Python. In the game, the participant clicks a pair of keys in quick succession and the program shows the total time taken by the racer to cover the distance.
Rules: As soon as you see ‘GO!’ on screen, start pressing the keys ‘z’ and ‘x’. A ‘*’ sign is shown fo... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n21 Jul, 2021"
},
{
"code": null,
"e": 257,
"s": 52,
"text": "Let’s make a simple keyboard racing game using Python. In the game, the participant clicks a pair of keys in quick succession and the program shows the total time taken by th... |
Find lexicographically smallest string in at most one swaps | 29 Jun, 2022
Given a string str of length N. The task is to find out the lexicographically smallest string when at most only one swap is allowed. That is, two indices 1 <= i, j <= n can be chosen and swapped. This operation can be performed at most one time.
Examples:
Input: str = “string” Output: gtrins Explanation:... | [
{
"code": null,
"e": 54,
"s": 26,
"text": "\n29 Jun, 2022"
},
{
"code": null,
"e": 301,
"s": 54,
"text": "Given a string str of length N. The task is to find out the lexicographically smallest string when at most only one swap is allowed. That is, two indices 1 <= i, j <= n can b... |
Managing Themes in ElectronJS | 28 Jun, 2022
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.
To make... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n28 Jun, 2022"
},
{
"code": null,
"e": 328,
"s": 28,
"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 are capable ... |
Perl | push() Function | 25 Jun, 2019
push() function in Perl is used to push a list of values onto the end of the array. push() function is often used with pop to implement stacks. push() function doesn’t depend on the type of values passed as list. These values can be alpha-numeric.
Syntax: push(Array, List)
Parameter:Array: in which list of... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n25 Jun, 2019"
},
{
"code": null,
"e": 276,
"s": 28,
"text": "push() function in Perl is used to push a list of values onto the end of the array. push() function is often used with pop to implement stacks. push() function doesn’t depend ... |
How to search and replace text in a file in Python ? | 14 Sep, 2021
In this article, we will learn how we can replace text in a file using python.
Let see how we can search and replace text in a text file. First, we create a text file in which we want to search and replace text. Let this file be SampleFile.txt with the following contents:
To replace text in a file we are g... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n14 Sep, 2021"
},
{
"code": null,
"e": 131,
"s": 52,
"text": "In this article, we will learn how we can replace text in a file using python."
},
{
"code": null,
"e": 325,
"s": 131,
"text": "Let see how we can search ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.