title stringlengths 3 221 | text stringlengths 17 477k | parsed listlengths 0 3.17k |
|---|---|---|
C# | Convert.ToSingle(String, IFormatProvider) Method - GeeksforGeeks | 19 Sep, 2021
This method is used to converts the specified string representation of a number to an equivalent single-precision floating-point number, using the specified culture-specific formatting information.Syntax:
public static float ToSingle (string value, IFormatProvider provider);
Parameters:
value: It is a s... | [
{
"code": null,
"e": 24473,
"s": 24445,
"text": "\n19 Sep, 2021"
},
{
"code": null,
"e": 24679,
"s": 24473,
"text": "This method is used to converts the specified string representation of a number to an equivalent single-precision floating-point number, using the specified cultur... |
Synchronizing Threads | Thread synchronization may be defined as a method with the help of which we can be assured that two or more concurrent threads are not simultaneously accessing the program segment known as critical section. On the other hand, as we know that critical section is the part of the program where the shared resource is acces... | [
{
"code": null,
"e": 2529,
"s": 1922,
"text": "Thread synchronization may be defined as a method with the help of which we can be assured that two or more concurrent threads are not simultaneously accessing the program segment known as critical section. On the other hand, as we know that critical se... |
XML DOM - Remove Node | In this chapter, we will study about the XML DOM Remove Node operation. The remove node operation removes the specified node from the document. This operation can be implemented to remove the nodes like text node, element node or an attribute node.
Following are the methods that are used for remove node operation β
rem... | [
{
"code": null,
"e": 2537,
"s": 2288,
"text": "In this chapter, we will study about the XML DOM Remove Node operation. The remove node operation removes the specified node from the document. This operation can be implemented to remove the nodes like text node, element node or an attribute node."
}... |
How to Create a Weather Alert System in Python | by Ng Wai Foong | Towards Data Science | By reading this piece, you will learn to create a weather alert system in Python that will send an email notification to multiple recipients when it forecasts that the sky will rain/snow in the next few hours. The email notification contains additional information such as the forecast-ed temperature and humidity.
There... | [
{
"code": null,
"e": 487,
"s": 172,
"text": "By reading this piece, you will learn to create a weather alert system in Python that will send an email notification to multiple recipients when it forecasts that the sky will rain/snow in the next few hours. The email notification contains additional in... |
Batch Script - String length - GeeksforGeeks | 04 Jan, 2022
In this article , we are going to learn how to find length of any String using Batch Script.
@echo off
set str=Geeks For Geeks
call :strLen str strlen
echo String is %strlen% characters long
pause
exit /b
:strLen
setlocal enabledelayedexpansion
:strLen_Loop
if not "!%1:~%len%!"=="" set /A len+=1 & got... | [
{
"code": null,
"e": 25761,
"s": 25733,
"text": "\n04 Jan, 2022"
},
{
"code": null,
"e": 25854,
"s": 25761,
"text": "In this article , we are going to learn how to find length of any String using Batch Script."
},
{
"code": null,
"e": 26119,
"s": 25854,
"text"... |
Session State for Streamlit. You can now store information across... | by abhi saini | Towards Data Science | Soon after Streamlit launched in 2019, the community started asking for ways to add statefulness to their apps. Hacks for Session State have been around since October 2019, but we wanted to build an elegant solution that you could intuitively weave into apps in a few lines of code. Today weβre excited to release it!
Yo... | [
{
"code": null,
"e": 489,
"s": 171,
"text": "Soon after Streamlit launched in 2019, the community started asking for ways to add statefulness to their apps. Hacks for Session State have been around since October 2019, but we wanted to build an elegant solution that you could intuitively weave into a... |
Exploratory Data Analysis on Iris Dataset - GeeksforGeeks | 17 Feb, 2022
In this article, we will discuss how to perform Exploratory Data Analysis on the Iris dataset. Before continuing with this article, we have used two terns i.e. EDA and Iris Dataset. Letβs see a brief about these datasets.
Exploratory Data Analysis (EDA) is a technique to analyze data using some visual Tech... | [
{
"code": null,
"e": 23953,
"s": 23925,
"text": "\n17 Feb, 2022"
},
{
"code": null,
"e": 24175,
"s": 23953,
"text": "In this article, we will discuss how to perform Exploratory Data Analysis on the Iris dataset. Before continuing with this article, we have used two terns i.e. EDA... |
C Program for Radix Sort | A sorting algorithm is an algorithm that puts components of a listing in a certain order. The most-used orders are numerical order and lexicographic order.
The Radix sort is a non-comparative sorting algorithm. The Radix sort algorithm is the most preferred algorithm for the unsorted list.
It sorts the elements by init... | [
{
"code": null,
"e": 1218,
"s": 1062,
"text": "A sorting algorithm is an algorithm that puts components of a listing in a certain order. The most-used orders are numerical order and lexicographic order."
},
{
"code": null,
"e": 1353,
"s": 1218,
"text": "The Radix sort is a non-co... |
Bootstrap .tooltip("hide") method | Use the tooltip(βhideβ) method in Bootstrap to hide the tooltip. The tooltip hides on button click as shown below β
$(".btn-default").click(function(){
$("[data-toggle='tooltip']").tooltip('hide');
});
Above the data-toggle attribute can be seen which we set before on <a> element. Now the toggle will generate from th... | [
{
"code": null,
"e": 1178,
"s": 1062,
"text": "Use the tooltip(βhideβ) method in Bootstrap to hide the tooltip. The tooltip hides on button click as shown below β"
},
{
"code": null,
"e": 1266,
"s": 1178,
"text": "$(\".btn-default\").click(function(){\n $(\"[data-toggle='tooltip... |
Pandas Sidetable Just Announced. An informative and insightful overview... | by Soner YΔ±ldΔ±rΔ±m | Towards Data Science | Pandas is a very powerful and versatile Python data analysis library that expedites the preprocessing steps of data science projects. It provides numerous functions and methods that are quite useful in data analysis.
Although the built-in functions of Pandas are capable of performing efficient data analysis, custom mad... | [
{
"code": null,
"e": 388,
"s": 171,
"text": "Pandas is a very powerful and versatile Python data analysis library that expedites the preprocessing steps of data science projects. It provides numerous functions and methods that are quite useful in data analysis."
},
{
"code": null,
"e": 5... |
Web Scraping with Beautiful Soup β A Use Case | by Bety Rodriguez-Milla | Towards Data Science | In this post, I will give a brief introduction to obtaining data from a webpage, i.e., web scraping, using Python and libraries such as Requests to get the data and Beautiful Soup to parse it. Web scraping becomes necessary when a website does not have an API, or one that suits your needs.
As an example, I use a webpag... | [
{
"code": null,
"e": 463,
"s": 172,
"text": "In this post, I will give a brief introduction to obtaining data from a webpage, i.e., web scraping, using Python and libraries such as Requests to get the data and Beautiful Soup to parse it. Web scraping becomes necessary when a website does not have an... |
Java Data Types | As explained in the previous chapter, a variable in Java must be a specified data type:
int myNum = 5; // Integer (whole number)
float myFloatNum = 5.99f; // Floating point number
char myLetter = 'D'; // Character
boolean myBool = true; // Boolean
String myText = "Hello"; // String
... | [
{
"code": null,
"e": 88,
"s": 0,
"text": "As explained in the previous chapter, a variable in Java must be a specified data type:"
},
{
"code": null,
"e": 319,
"s": 88,
"text": "int myNum = 5; // Integer (whole number)\nfloat myFloatNum = 5.99f; // Floating point... |
Searching Algorithms for 2D Arrays (Matrix) | 27 Dec, 2021
Linear Search in 2D Array
Linear search is a simple and sequential searching algorithm. It is used to find a particular element is present in the array or not by traversing every element in the array. While searching in the 2D array is exactly the same but here all the cells need to be traversed and In thi... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n27 Dec, 2021"
},
{
"code": null,
"e": 54,
"s": 28,
"text": "Linear Search in 2D Array"
},
{
"code": null,
"e": 382,
"s": 54,
"text": "Linear search is a simple and sequential searching algorithm. It is used to find a... |
isalpha() and isdigit() functions in C with cstring examples. | 23 Jun, 2022
isalpha(c) is a function in C which can be used to check if the passed character is an alphabet or not. It returns a non-zero value if itβs an alphabet else it returns 0. For example, it returns non-zero values for βaβ to βzβ and βAβ to βZβ and zeroes for other characters.Similarly, isdigit(c) is a functio... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n23 Jun, 2022"
},
{
"code": null,
"e": 926,
"s": 52,
"text": "isalpha(c) is a function in C which can be used to check if the passed character is an alphabet or not. It returns a non-zero value if itβs an alphabet else it returns 0. For... |
Django Introduction and Installation | 03 Jul, 2022
Django is a Python-based web framework which allows you to quickly create web application without all of the installation or dependency problems that you normally will find with other frameworks.When youβre building a website, you always need a similar set of components: a way to handle user authentication... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n03 Jul, 2022"
},
{
"code": null,
"e": 518,
"s": 52,
"text": "Django is a Python-based web framework which allows you to quickly create web application without all of the installation or dependency problems that you normally will find w... |
Software Testing | Reliability Testing | 06 May, 2019
Reliability Testing is a testing technique that relates to test the ability of a software to function and given environmental conditions that helps in uncovering issues in the software design and functionality. It is defined as a type of software testing that determines whether the software can perform a f... | [
{
"code": null,
"e": 54,
"s": 26,
"text": "\n06 May, 2019"
},
{
"code": null,
"e": 524,
"s": 54,
"text": "Reliability Testing is a testing technique that relates to test the ability of a software to function and given environmental conditions that helps in uncovering issues in th... |
Matplotlib.gridspec.GridSpec Class in Python | 07 Oct, 2021
Matplotlib is an amazing visualization library in Python for 2D plots of arrays. Matplotlib is a multi-platform data visualization library built on NumPy arrays and designed to work with the broader SciPy stack.
The matplotlib.gridspec.GridSpec class is used to specify the geometry of the grid to place a ... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n07 Oct, 2021"
},
{
"code": null,
"e": 241,
"s": 28,
"text": "Matplotlib is an amazing visualization library in Python for 2D plots of arrays. Matplotlib is a multi-platform data visualization library built on NumPy arrays and designed t... |
Python | Get first K items in dictionary | 26 Jul, 2019
While working with dictionaries, we can come across a problem in which we might have to get just some of the initial keys in dictionary. This problem can typically occur in cases of web development domain. Letβs discuss certain ways in which this problem can be solved.
Method #1 : Using items() + list slic... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n26 Jul, 2019"
},
{
"code": null,
"e": 298,
"s": 28,
"text": "While working with dictionaries, we can come across a problem in which we might have to get just some of the initial keys in dictionary. This problem can typically occur in ca... |
<mat-button> in Angular material | 25 Nov, 2020
Angular Material is a UI component library that is developed by the Angular team to build design components for desktop and mobile web applications.
In order to use it, we need to have angular installed in our project, after having it you can enter the below command and can download it.
Installation synta... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n25 Nov, 2020"
},
{
"code": null,
"e": 202,
"s": 52,
"text": "Angular Material is a UI component library that is developed by the Angular team to build design components for desktop and mobile web applications. "
},
{
"code": nu... |
Lodash | _.pull() Method | 29 Apr, 2020
The _.pull() method is used to remove all the given values from a given array.
Syntax:
_.pull(array, [values])
Parameters: This method accepts two or more parameters as mentioned above and described below:
Array: This parameter holds the query array.
values: This parameter holds one or multiple element tha... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n29 Apr, 2020"
},
{
"code": null,
"e": 107,
"s": 28,
"text": "The _.pull() method is used to remove all the given values from a given array."
},
{
"code": null,
"e": 115,
"s": 107,
"text": "Syntax:"
},
{
"code... |
Implement dynamic queue using templates class and a circular array | 21 Jun, 2022
In this article, we will discuss how to create a dynamic circular queue using a circular array having the following functionality:
Front(): Get the front item from the queue.
Back(): Get the last item from the queue.
Push(X): Push the X in the queue at the end of the queue.
Pop(): Delete an element from t... | [
{
"code": null,
"e": 54,
"s": 26,
"text": "\n21 Jun, 2022"
},
{
"code": null,
"e": 186,
"s": 54,
"text": "In this article, we will discuss how to create a dynamic circular queue using a circular array having the following functionality: "
},
{
"code": null,
"e": 230,
... |
Python | Pandas dataframe.add_prefix() | 16 Nov, 2018
Python is a great language for doing data analysis, primarily because of the fantastic ecosystem of data-centric python packages. Pandas is one of those packages and makes importing and analyzing data much easier.
Dataframe.add_prefix() function can be used with both series as well as dataframes.
For Serie... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n16 Nov, 2018"
},
{
"code": null,
"e": 242,
"s": 28,
"text": "Python is a great language for doing data analysis, primarily because of the fantastic ecosystem of data-centric python packages. Pandas is one of those packages and makes imp... |
How a Preprocessor works in C? | 08 Feb, 2018
Compiling a C program β Behind the Scene
A Preprocessor is a system software (a computer program that is designed to run on computerβs hardware and application programs). It performs preprocessing of the High Level Language(HLL). Preprocessing is the first step of the language processing system. Language p... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n08 Feb, 2018"
},
{
"code": null,
"e": 93,
"s": 52,
"text": "Compiling a C program β Behind the Scene"
},
{
"code": null,
"e": 515,
"s": 93,
"text": "A Preprocessor is a system software (a computer program that is de... |
SQL USE Database Statement | 06 Sep, 2021
SQL(Structured Query Language) is a standard Database language that is used to create, maintain and retrieve the data from relational databases like MySQL, Oracle, etc. It is flexible and user-friendly. In SQL, to interact with the database, the users have to type queries that have certain syntax, and use ... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n06 Sep, 2021"
},
{
"code": null,
"e": 643,
"s": 28,
"text": "SQL(Structured Query Language) is a standard Database language that is used to create, maintain and retrieve the data from relational databases like MySQL, Oracle, etc. It is ... |
Create a User-Defined Data Type Alias in SQL Server | 17 Mar, 2021
SQL Server has multiple data types e.g. integers, char, varchar, doubles, strings, etc. which are used for keeping specific values. Although built-in data types could store specific values, sometimes SQL DBA may need to store more specific values and create customized data types.
We can create a user-defin... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n17 Mar, 2021"
},
{
"code": null,
"e": 309,
"s": 28,
"text": "SQL Server has multiple data types e.g. integers, char, varchar, doubles, strings, etc. which are used for keeping specific values. Although built-in data types could store sp... |
Can Virtual Functions be Inlined in C++? | 01 Dec, 2021
Virtual functions are member functions that are declared in the base class using the keyword virtual and can be overridden by the derived class. They are used to achieve Runtime polymorphism or say late binding or dynamic binding.
Inline functions are used to replace the function calling location with the... | [
{
"code": null,
"e": 54,
"s": 26,
"text": "\n01 Dec, 2021"
},
{
"code": null,
"e": 286,
"s": 54,
"text": "Virtual functions are member functions that are declared in the base class using the keyword virtual and can be overridden by the derived class. They are used to achieve Runt... |
Java Program to Convert a Float value to String | 30 Sep, 2021
Given a Float value in Java, the task is to write a Java program to convert this float value to string type.
Examples:
Input: 1.0
Output: "1.0"
Input: 3.14
Output: "3.14"
Strings β Strings in Java are objects that are supported internally by a char array. Since arrays are immutable, and strings are also ... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n30 Sep, 2021"
},
{
"code": null,
"e": 137,
"s": 28,
"text": "Given a Float value in Java, the task is to write a Java program to convert this float value to string type."
},
{
"code": null,
"e": 148,
"s": 137,
"text"... |
Program to convert given Binary to its equivalent ASCII character string | 27 May, 2022
Given a binary string str, the task is to find its equivalent ASCII character string.
Examples:
Input: str = β0110000101100010βOutput: abExplanation: Dividing str into set of 8 bits as follows:
01100001 = 97, ASCII value of 97 is βaβ.
01100010 = 98, ASCII value of 98 is βbβ.
Therefore, the required ASCII... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n27 May, 2022"
},
{
"code": null,
"e": 114,
"s": 28,
"text": "Given a binary string str, the task is to find its equivalent ASCII character string."
},
{
"code": null,
"e": 125,
"s": 114,
"text": "Examples: "
},
{... |
C# Example for MultiLevel Inheritance | Multilevel Inheritance occurs when a derived class is formed from another derived class.
Grandfather, father, and son are the perfect example to represent Multilevel Inheritance in C# β
The following is an example stating the usage of multilevel inheritance in C#.
Live Demo
using System;
using System.Collections.Generi... | [
{
"code": null,
"e": 1151,
"s": 1062,
"text": "Multilevel Inheritance occurs when a derived class is formed from another derived class."
},
{
"code": null,
"e": 1248,
"s": 1151,
"text": "Grandfather, father, and son are the perfect example to represent Multilevel Inheritance in C... |
Smallest index in the given array that satisfies the given condition - GeeksforGeeks | 04 Aug, 2021
Given an array arr[] of size N and an integer K, the task is to find the smallest index in the array such that:
floor(arr[i] / 1) + floor(arr[i + 1] / 2) + floor(arr[i + 2] / 2) + ..... + floor(arr[n β 1] / n β i ) β€ K
If no such index is found then print -1.
Examples:
Input: arr[] = {6, 5, 4, 2}, K = 8... | [
{
"code": null,
"e": 25258,
"s": 25230,
"text": "\n04 Aug, 2021"
},
{
"code": null,
"e": 25371,
"s": 25258,
"text": "Given an array arr[] of size N and an integer K, the task is to find the smallest index in the array such that: "
},
{
"code": null,
"e": 25478,
"s... |
Print all odd nodes of Binary Search Tree | 07 Feb, 2022
Given a binary search tree. The task is to print all odd nodes of the binary search tree.Examples:
Input :
5
/ \
3 7
/ \ / \
2 4 6 8
Output : 3 5 7
Input :
14
/ \
12 17
/ \ / \
8 13 16 19
Output : 13... | [
{
"code": null,
"e": 54,
"s": 26,
"text": "\n07 Feb, 2022"
},
{
"code": null,
"e": 155,
"s": 54,
"text": "Given a binary search tree. The task is to print all odd nodes of the binary search tree.Examples: "
},
{
"code": null,
"e": 368,
"s": 155,
"text": "Inpu... |
Maximum difference of zeros and ones in binary string | Set 2 (O(n) time) | 23 Jun, 2022
Given a binary string of 0s and 1s. The task is to find the maximum difference between the number of 0s and number of 1s in any sub-string of the given binary string. That is maximize ( number of 0s β number of 1s ) for any sub-string in the given binary string.
Examples:
Input : S = "11000010001"
Output... | [
{
"code": null,
"e": 54,
"s": 26,
"text": "\n23 Jun, 2022"
},
{
"code": null,
"e": 318,
"s": 54,
"text": "Given a binary string of 0s and 1s. The task is to find the maximum difference between the number of 0s and number of 1s in any sub-string of the given binary string. That is... |
Given a number, find the next smallest palindrome | 21 Jun, 2022
Given a number, find the next smallest palindrome larger than this number. For example, if the input number is β2 3 5 4 5β, the output should be β2 3 6 3 2β. And if the input number is β9 9 9β, the output should be β1 0 0 1β. The input is assumed to be an array. Every entry in array represents a digit in i... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n21 Jun, 2022"
},
{
"code": null,
"e": 422,
"s": 52,
"text": "Given a number, find the next smallest palindrome larger than this number. For example, if the input number is β2 3 5 4 5β, the output should be β2 3 6 3 2β. And if the input... |
How to remove outline around text input boxes in chrome using CSS? | 16 Oct, 2021
Generally in the case of Google Chrome Browser, when the input field gets focus then the blue outline occurred on the border of the Input fields. The Task can be done by using the CSS outline property.
Example:
html
<html><head> <title> How to remove outline around text input boxes in chrom... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n16 Oct, 2021"
},
{
"code": null,
"e": 232,
"s": 28,
"text": "Generally in the case of Google Chrome Browser, when the input field gets focus then the blue outline occurred on the border of the Input fields. The Task can be done by using... |
How to make first letter of a string uppercase in JavaScript ? | 20 Mar, 2019
There are number of ways to capitalize the first letter of the string in JavaScript. Following are the ways:
toUpperCase():This function applies on a string and change the all letters to uppercase.Syntax:string.toUpperCase()
Return Value: This function returns the capitalized string.slice():This function a... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n20 Mar, 2019"
},
{
"code": null,
"e": 137,
"s": 28,
"text": "There are number of ways to capitalize the first letter of the string in JavaScript. Following are the ways:"
},
{
"code": null,
"e": 4148,
"s": 137,
"text... |
Maximum Subarray Sum in a given Range | 30 Jun, 2021
Given an array of n numbers, the task is to answer the following queries:
maximumSubarraySum(start, end) : Find the maximum
subarray sum in the range from array index 'start'
to 'end'.
Also see : Range Query With Update RequiredExamples:
Input : arr[] = {1, 3, -4, 5, -2}
Query 1: start = 0, e... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n30 Jun, 2021"
},
{
"code": null,
"e": 128,
"s": 52,
"text": "Given an array of n numbers, the task is to answer the following queries: "
},
{
"code": null,
"e": 241,
"s": 128,
"text": "maximumSubarraySum(start, end... |
Google Interview Experience | Set 7 (For Software Engineering Intern) | 03 Dec, 2017
Round 1: Coding Sample
In this coding sample, I was given 90 minutes to answer 2 coding questions.
Question 1: Given a string A consisting of n characters and a string B consisting of m characters, write a function that will return the number of times A must be stated such that B is a substring of the repe... | [
{
"code": null,
"e": 54,
"s": 26,
"text": "\n03 Dec, 2017"
},
{
"code": null,
"e": 77,
"s": 54,
"text": "Round 1: Coding Sample"
},
{
"code": null,
"e": 153,
"s": 77,
"text": "In this coding sample, I was given 90 minutes to answer 2 coding questions."
},
... |
C# | LinkedList Class | 20 Dec, 2018
LinkedList<T> Class is present in System.Collections.Generic namespace. This generic type allows fast inserting and removing of elements. It implements a classic linked list. Each object is separately allocated. In the LinkedList, certain operations do not require the whole collection to be copied. But in ... | [
{
"code": null,
"e": 53,
"s": 25,
"text": "\n20 Dec, 2018"
},
{
"code": null,
"e": 410,
"s": 53,
"text": "LinkedList<T> Class is present in System.Collections.Generic namespace. This generic type allows fast inserting and removing of elements. It implements a classic linked list.... |
Highly Composite Numbers | 23 Mar, 2021
A number N is called highly composite if it has more divisors than any of the smaller numbers than N.Few Highly composite numbers are:
1, 2, 4, 6, 12, 24, 36, 48, 60, 120....
Given a number N, the task is to check if N is a Highly Composite Number or not. If N is a Highly Composite Number than print βY... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n23 Mar, 2021"
},
{
"code": null,
"e": 165,
"s": 28,
"text": "A number N is called highly composite if it has more divisors than any of the smaller numbers than N.Few Highly composite numbers are: "
},
{
"code": null,
"e": 2... |
CSS | animation-iteration-count Property | 06 Aug, 2019
The animation-iteration-count property in CSS is used to specify the number of times the animation will be repeated. It can specify as infinite to repeat the animation indefinitely.
Syntax:
animation-iteration-count: number|infinite|initial|inherit;
Property Value:
number: This property value is used to de... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n06 Aug, 2019"
},
{
"code": null,
"e": 210,
"s": 28,
"text": "The animation-iteration-count property in CSS is used to specify the number of times the animation will be repeated. It can specify as infinite to repeat the animation indefin... |
Dynamically Resize Buttons When Resizing a Window using Tkinter | 04 Sep, 2021
Prerequisite: Python GUI β tkinter
Button size is static, which means the size of a button cannot be changed once it is defined by the user. The problem here is while resizing the window size, it can affect the button size problem. So the solution here is, make a dynamic button, which means the button size... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n04 Sep, 2021"
},
{
"code": null,
"e": 63,
"s": 28,
"text": "Prerequisite: Python GUI β tkinter"
},
{
"code": null,
"e": 368,
"s": 63,
"text": "Button size is static, which means the size of a button cannot be changed... |
get_attribute() element method β Selenium Python | 17 Nov, 2021
Seleniumβs Python Module is built to perform automated testing with Python. Selenium Python bindings provides a simple API to write functional/acceptance tests using Selenium WebDriver. To open a webpage using Selenium Python, checkout β Navigating links using get method β Selenium Python. Just being able ... | [
{
"code": null,
"e": 53,
"s": 25,
"text": "\n17 Nov, 2021"
},
{
"code": null,
"e": 1043,
"s": 53,
"text": "Seleniumβs Python Module is built to perform automated testing with Python. Selenium Python bindings provides a simple API to write functional/acceptance tests using Seleniu... |
Introduction to PyTorch BigGraph β with Examples | by Sven Balnojan | Towards Data Science | PyTorch BigGraph is a tool to create and handle large graph embeddings for machine learning. Currently there are two approaches in graph-based neural networks:
Directly use the graph structure and feed it to a neural network. The graph structure is then preserved at every layer. graphCNNs use that approach, see for ins... | [
{
"code": null,
"e": 332,
"s": 172,
"text": "PyTorch BigGraph is a tool to create and handle large graph embeddings for machine learning. Currently there are two approaches in graph-based neural networks:"
},
{
"code": null,
"e": 529,
"s": 332,
"text": "Directly use the graph str... |
Rearrange numbers in an array such that no two adjacent numbers are same - GeeksforGeeks | 29 Oct, 2021
Given an array of integers. The task is to rearrange elements of the array such that no two adjacent elements in the array are same.
Examples:
Input: arr[] = {1, 1, 1, 2, 2, 2}
Output: {2, 1, 2, 1, 2, 1}
Input: arr[] = {1, 1, 1, 1, 2, 2, 3, 3}
Output: {1, 3, 1, 3, 2, 1, 2, 1}
The idea is to put the high... | [
{
"code": null,
"e": 24599,
"s": 24571,
"text": "\n29 Oct, 2021"
},
{
"code": null,
"e": 24732,
"s": 24599,
"text": "Given an array of integers. The task is to rearrange elements of the array such that no two adjacent elements in the array are same."
},
{
"code": null,
... |
isNAN() function in JavaScript | The isNaN() function accepts a value and determines whether the given value is a number or not.If so, this method returns true else it returns false. You can also call this method using Number object.
Its Syntax is as follows
isNAN(5655);
Live Demo
<html>
<head>
<title>JavaScript Example</title>
</head>
<body>
<... | [
{
"code": null,
"e": 1263,
"s": 1062,
"text": "The isNaN() function accepts a value and determines whether the given value is a number or not.If so, this method returns true else it returns false. You can also call this method using Number object."
},
{
"code": null,
"e": 1288,
"s": ... |
Node.js process.cpuUsage() Method - GeeksforGeeks | 12 Oct, 2021
The process.cpuUsage() method is an inbuilt application programming interface of the Process module which is used to get the user, system CPU time usage of the current process. It is returned as an object with property user and system, values are in microseconds. Return values may differ from the actual ti... | [
{
"code": null,
"e": 37176,
"s": 37148,
"text": "\n12 Oct, 2021"
},
{
"code": null,
"e": 37526,
"s": 37176,
"text": "The process.cpuUsage() method is an inbuilt application programming interface of the Process module which is used to get the user, system CPU time usage of the cur... |
Creating benchmark models the scikit-learn way | by Eryk Lewinson | Towards Data Science | What I really like about scikit-learn is that I often stumble upon functionalities, which I was not aware of before. My most recent βdiscoveryβ is the DummyClassifier. The dummy estimator does not learn any patterns from the features, it uses simple heuristics (inferred from the targets) to calculate the predictions.
W... | [
{
"code": null,
"e": 490,
"s": 171,
"text": "What I really like about scikit-learn is that I often stumble upon functionalities, which I was not aware of before. My most recent βdiscoveryβ is the DummyClassifier. The dummy estimator does not learn any patterns from the features, it uses simple heuri... |
Mining Telecom Product Recommendations | by Meghana Holemadlu Murthy | Towards Data Science | In the current age of information overload, it is becoming increasingly hard for people to find relevant content. Recommender systems have been introduced to help people in retrieving potentially useful information from a huge set of choices. It is a system that suggests products, services, information to users based o... | [
{
"code": null,
"e": 601,
"s": 172,
"text": "In the current age of information overload, it is becoming increasingly hard for people to find relevant content. Recommender systems have been introduced to help people in retrieving potentially useful information from a huge set of choices. It is a syst... |
Basics of File Handling in C Programming | File Handling is the storing of data in a file using a program. In C programming language, the programs store results, and other data of the program to a file using file handling in C. Also, we can extract/fetch data from a file to work with it in the program.
The operations that you can perform on a File in C are β
Cr... | [
{
"code": null,
"e": 1323,
"s": 1062,
"text": "File Handling is the storing of data in a file using a program. In C programming language, the programs store results, and other data of the program to a file using file handling in C. Also, we can extract/fetch data from a file to work with it in the p... |
FormatException in C# | FomatException is thrown when the format of an argument is invalid.
Let us see an example.
When we set a value other than int to int.Parse() method, then FormatException is thrown as shown below β
Live Demo
using System;
class Demo {
static void Main() {
string str = "3.5";
int res = int.Parse(str);
... | [
{
"code": null,
"e": 1130,
"s": 1062,
"text": "FomatException is thrown when the format of an argument is invalid."
},
{
"code": null,
"e": 1153,
"s": 1130,
"text": "Let us see an example."
},
{
"code": null,
"e": 1259,
"s": 1153,
"text": "When we set a value ... |
Statistics in Python β Using Chi-Square for Feature Selection | by Wei-Meng Lee | Towards Data Science | In my previous two articles, I talked about how to measure correlations between the various columns in your dataset and how to detect multicollinearity between them:
towardsdatascience.com
towardsdatascience.com
However, these techniques are useful when the variables you are trying to compare with are continuous. How d... | [
{
"code": null,
"e": 338,
"s": 172,
"text": "In my previous two articles, I talked about how to measure correlations between the various columns in your dataset and how to detect multicollinearity between them:"
},
{
"code": null,
"e": 361,
"s": 338,
"text": "towardsdatascience.c... |
Query Salesforce Data in Python using intake-salesforce | by Sophia Yang | Towards Data Science | A Salesforce database can be a hot mess. The figure below illustrates the relationship among some of the data tables in Salesforce. As you can see, the relationship among data tables (i.e., objects) can be complicated and hard to work with. I wrote a blog post previously on how to understand and query Salesforce data u... | [
{
"code": null,
"e": 923,
"s": 171,
"text": "A Salesforce database can be a hot mess. The figure below illustrates the relationship among some of the data tables in Salesforce. As you can see, the relationship among data tables (i.e., objects) can be complicated and hard to work with. I wrote a blog... |
Google Summer Trainee Engineering Program(STEP) Interview Experience - GeeksforGeeks | 04 Jun, 2019
Telephonic Interview 1. (Telephonic + Google Docs Shared)
Q1. Given an array of integers, you need to find the local maxima.
Example : [1 3 5 4 7 10 6]
Output: 5 or 10
Explanation: Any of the local maxima can be the output.
Here 5 is greater than 3 and 4, 10 is greater than 7 and 6.
Hint : Refer this ... | [
{
"code": null,
"e": 25234,
"s": 25206,
"text": "\n04 Jun, 2019"
},
{
"code": null,
"e": 25292,
"s": 25234,
"text": "Telephonic Interview 1. (Telephonic + Google Docs Shared)"
},
{
"code": null,
"e": 25359,
"s": 25292,
"text": "Q1. Given an array of integers, ... |
Calculating Customer Lifetime Values using a Shifted-Beta-Geometric model | by Farshad Lavassani Miraftab | Towards Data Science | Customer lifetime values (CLV) are a critical metric considered to be a companyβs north star metric and all in-compassing KPI, used to inform:
marketing campaigns β how much should we spend to acquire customers?
customer segmentation β who are our most valuable customers and what are their demographic and behavioral tr... | [
{
"code": null,
"e": 315,
"s": 172,
"text": "Customer lifetime values (CLV) are a critical metric considered to be a companyβs north star metric and all in-compassing KPI, used to inform:"
},
{
"code": null,
"e": 384,
"s": 315,
"text": "marketing campaigns β how much should we sp... |
How to Create a Spinner in JavaFX? | A spinner is a UI element that displays a number with an up and down arrow with it. You can increase or, decrease the value of the spinner using those arrows. You can create a spinner by instantiating the javafx.scene.control.Spinner class.
The following Example demonstrates the creation of a Spinner.
import javafx.app... | [
{
"code": null,
"e": 1303,
"s": 1062,
"text": "A spinner is a UI element that displays a number with an up and down arrow with it. You can increase or, decrease the value of the spinner using those arrows. You can create a spinner by instantiating the javafx.scene.control.Spinner class."
},
{
... |
Java program to implement insertion sort | This is an in-place comparison-based sorting algorithm. Here, a sub-list is maintained which is always sorted. For example, the lower part of an array is maintained to be sorted. An element which is to be inserted in this sorted sub-list has to find its appropriate place and then it has to be inserted there. Hence the ... | [
{
"code": null,
"e": 1404,
"s": 1062,
"text": "This is an in-place comparison-based sorting algorithm. Here, a sub-list is maintained which is always sorted. For example, the lower part of an array is maintained to be sorted. An element which is to be inserted in this sorted sub-list has to find its... |
Identifying trolls and bots on Reddit with machine learning (Part 2) | by Jason Skowronski | Towards Data Science | Trolls and bots are widespread across social media, and they influence us in ways we are not always aware of. Trolls can be relatively harmless, just trying to entertain themselves at othersβ expense, but they can also be political actors sowing mistrust or discord. While some bots offer helpful information, others can... | [
{
"code": null,
"e": 656,
"s": 172,
"text": "Trolls and bots are widespread across social media, and they influence us in ways we are not always aware of. Trolls can be relatively harmless, just trying to entertain themselves at othersβ expense, but they can also be political actors sowing mistrust ... |
Divide two integers without using multiplication, division and mod operator | Set2 - GeeksforGeeks | 19 Apr, 2021
Given two integers say a and b. Find the quotient after dividing a by b without using multiplication, division and mod operator.Examples:
Input: a = 10, b = 3
Output: 3
Input: a = 43, b = -8
Output: -5
This problem has been already discussed here. In this post, a different approach is discussed.Approa... | [
{
"code": null,
"e": 24455,
"s": 24427,
"text": "\n19 Apr, 2021"
},
{
"code": null,
"e": 24595,
"s": 24455,
"text": "Given two integers say a and b. Find the quotient after dividing a by b without using multiplication, division and mod operator.Examples: "
},
{
"code": n... |
What is the difference between root.destroy() and root.quit() in Tkinter(Python)? | When we invoke the destroy() method with the tkinter window object, it terminates the mainloop process and destroys all the widgets inside the window. Tkinter destroy() method is mainly used to kill and terminate the interpreter running in the background.
However, quit() method can be invoked in order to stop the proce... | [
{
"code": null,
"e": 1318,
"s": 1062,
"text": "When we invoke the destroy() method with the tkinter window object, it terminates the mainloop process and destroys all the widgets inside the window. Tkinter destroy() method is mainly used to kill and terminate the interpreter running in the backgroun... |
Instruction type RAL in 8085 Microprocessor | In 8085 Instruction set, there is another mnemonic RAL,which stands or Rotate Accumulator Left and also involving Cy flag in rotation. It rotates the Accumulator contents to the left by 1-bit position. The following Fig. is depicting the execution logic of the instruction.
From the Fig. we can see that the due to left ... | [
{
"code": null,
"e": 1336,
"s": 1062,
"text": "In 8085 Instruction set, there is another mnemonic RAL,which stands or Rotate Accumulator Left and also involving Cy flag in rotation. It rotates the Accumulator contents to the left by 1-bit position. The following Fig. is depicting the execution logic... |
SAS - Fishers Exact Tests | Fisher's exact test is a statistical test used to determine if there are nonrandom associations between two categorical variables.In SAS this is carried out using PROC FREQ. We use the Tables option to use the two variables subjected to Fisher Exact test.
The basic syntax for applying Fisher Exact test in SAS is β
PROC... | [
{
"code": null,
"e": 2839,
"s": 2583,
"text": "Fisher's exact test is a statistical test used to determine if there are nonrandom associations between two categorical variables.In SAS this is carried out using PROC FREQ. We use the Tables option to use the two variables subjected to Fisher Exact tes... |
.NET Core - Quick Guide | .NET Core is the latest general purpose development platform maintained by Microsoft. It works across different platforms and has been redesigned in a way that makes .NET fast, flexible and modern. This happens to be one of the major contributions by Microsoft. Developers can now build Android, iOS, Linux, Mac, and Win... | [
{
"code": null,
"e": 2755,
"s": 2386,
"text": ".NET Core is the latest general purpose development platform maintained by Microsoft. It works across different platforms and has been redesigned in a way that makes .NET fast, flexible and modern. This happens to be one of the major contributions by Mi... |
Program to encrypt a string using Vigenere cipher in Python | Suppose we have a lowercase alphabet string text, and have another string called key. We have to find a new string where every letter in text[i] is moved to the right side with offset key[i]. Here the offset represented by key[i]'s position in the alphabet (A=0, B=1 etc.) If the letter overflows, it gets wrapped around... | [
{
"code": null,
"e": 1399,
"s": 1062,
"text": "Suppose we have a lowercase alphabet string text, and have another string called key. We have to find a new string where every letter in text[i] is moved to the right side with offset key[i]. Here the offset represented by key[i]'s position in the alpha... |
Program for converting hours into minutes and seconds - GeeksforGeeks | 01 Apr, 2021
Given an integer n which is the number of hours, the task is to convert it into minutes and seconds.Examples:
Input: 5 Output: Minutes = 300, Seconds = 18000Input: 2 Output: Minutes = 120, Seconds = 7200
Approach:
h hours = h * 60 minutes as 1 hour = 60 minutes.
Similarly h hours = h * 3600 seconds... | [
{
"code": null,
"e": 24505,
"s": 24477,
"text": "\n01 Apr, 2021"
},
{
"code": null,
"e": 24617,
"s": 24505,
"text": "Given an integer n which is the number of hours, the task is to convert it into minutes and seconds.Examples: "
},
{
"code": null,
"e": 24713,
"s"... |
Python - Construct dictionary Key-Value pairs separated by delimiter - GeeksforGeeks | 01 Jul, 2021
Given a String with key-value pairs separated by delim, construct a dictionary.
Input : test_str = βgfg#3, is#9, best#10β, delim = β#β Output : {βgfgβ: β3β, βisβ: β9β, βbestβ: β10β} Explanation : gfg paired with 3, as separated with # delim.Input : test_str = βgfg.10β, delim = β.β Output : {βgfgβ: β10β} Ex... | [
{
"code": null,
"e": 23901,
"s": 23873,
"text": "\n01 Jul, 2021"
},
{
"code": null,
"e": 23981,
"s": 23901,
"text": "Given a String with key-value pairs separated by delim, construct a dictionary."
},
{
"code": null,
"e": 24269,
"s": 23981,
"text": "Input : te... |
Deep Learning using Transfer Learning -Python Code for ResNet50 | by Renu Khandelwal | Towards Data Science | This is the second part of the series where we will write code to apply Transfer Learning using ResNet50 . Here we will use transfer learning suing a Pre-trained ResNet50 model and then fine-tune ResNet50.
Transfer Learning Concept part 1
For code implementation, we will use ResNet50. ResNet is short for Residual Netwo... | [
{
"code": null,
"e": 378,
"s": 172,
"text": "This is the second part of the series where we will write code to apply Transfer Learning using ResNet50 . Here we will use transfer learning suing a Pre-trained ResNet50 model and then fine-tune ResNet50."
},
{
"code": null,
"e": 411,
"s"... |
Next Greater Element - GeeksforGeeks | 02 Dec, 2021
Given an array, print the Next Greater Element (NGE) for every element. The Next greater Element for an element x is the first greater element on the right side of x in the array. Elements for which no greater element exist, consider the next greater element as -1.
Examples:
For an array, the rightmost e... | [
{
"code": null,
"e": 24741,
"s": 24713,
"text": "\n02 Dec, 2021"
},
{
"code": null,
"e": 25008,
"s": 24741,
"text": "Given an array, print the Next Greater Element (NGE) for every element. The Next greater Element for an element x is the first greater element on the right side of... |
Using python package to build your custom dataset β MLDatasetBuilder | by Karthick Nagarajan | Towards Data Science | As an ML Newbie, I need to figure out the best way to prepare the dataset for our machine learning training model. As per my last article, I came up with a Python package for this process!
Whenever you are training a custom model the important thing is the dataset. Yes, of course, the dataset plays the main role in dee... | [
{
"code": null,
"e": 361,
"s": 172,
"text": "As an ML Newbie, I need to figure out the best way to prepare the dataset for our machine learning training model. As per my last article, I came up with a Python package for this process!"
},
{
"code": null,
"e": 712,
"s": 361,
"text"... |
How to use multiple threads in android? | Before getting into an example, we should know what thread is. A thread is a lightweight sub-process, it going to do background operations without interrupt to ui. This example demonstrate about How to use multiple threads in android.
Step 1 β Create a new project in Android Studio, go to File β New Project and fill al... | [
{
"code": null,
"e": 1297,
"s": 1062,
"text": "Before getting into an example, we should know what thread is. A thread is a lightweight sub-process, it going to do background operations without interrupt to ui. This example demonstrate about How to use multiple threads in android."
},
{
"cod... |
GATE | GATE-CS-2015 (Set 3) | Question 65 - GeeksforGeeks | 29 Sep, 2021
Consider a machine with a byte addressable main memory of 220 bytes, block size of 16 bytes and a direct mapped cache having 212 cache lines. Let the addresses of two consecutive bytes in main memory be (E201F)16 and (E2020)16. What are the tag and cache line address (in hex) for main memory address (E201F... | [
{
"code": null,
"e": 24101,
"s": 24073,
"text": "\n29 Sep, 2021"
},
{
"code": null,
"e": 24476,
"s": 24101,
"text": "Consider a machine with a byte addressable main memory of 220 bytes, block size of 16 bytes and a direct mapped cache having 212 cache lines. Let the addresses of ... |
Plotting Correlation Matrix using Python | 26 Nov, 2020
Correlation means an association, It is a measure of the extent to which two variables are related.
1. Positive Correlation: When two variables increase together and decrease together. They are positively correlated. β1β is a perfect positive correlation. For example β demand and profit are positively cor... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n26 Nov, 2020"
},
{
"code": null,
"e": 129,
"s": 28,
"text": "Correlation means an association, It is a measure of the extent to which two variables are related. "
},
{
"code": null,
"e": 424,
"s": 129,
"text": "1. Po... |
Python PIL | ImageDraw.Draw.rectangle() | 02 Aug, 2019
PIL is the Python Imaging Library which provides the python interpreter with image editing capabilities. The ImageDraw module provide simple 2D graphics for Image objects. You can use this module to create new images, annotate or retouch existing images, and to generate graphics on the fly for web use.
Ima... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n02 Aug, 2019"
},
{
"code": null,
"e": 332,
"s": 28,
"text": "PIL is the Python Imaging Library which provides the python interpreter with image editing capabilities. The ImageDraw module provide simple 2D graphics for Image objects. You... |
Python statistics | pvariance() | 20 Oct, 2021
Prerequisite : Python statistics | variance()pvariance() function helps to calculate the variance of an entire, rather than that of a sample. The only difference between variance() and pvariance() is that while using variance(), only the sample mean is taken into consideration, while during pvariance(), th... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n20 Oct, 2021"
},
{
"code": null,
"e": 729,
"s": 28,
"text": "Prerequisite : Python statistics | variance()pvariance() function helps to calculate the variance of an entire, rather than that of a sample. The only difference between varia... |
Node.js process.argv Property | 12 Oct, 2021
The process.argv property is an inbuilt application programming interface of the process module which is used to get the arguments passed to the node.js process when run in the command line.
Syntax:
process.argv
Return Value: This property returns an array containing the arguments passed to the process whe... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n12 Oct, 2021"
},
{
"code": null,
"e": 219,
"s": 28,
"text": "The process.argv property is an inbuilt application programming interface of the process module which is used to get the arguments passed to the node.js process when run in th... |
Pull to Refresh with ListView in Android with Example | 17 Nov, 2020
The SwipeRefreshLayout widget is used for implementing a swipe-to-refresh user interface design pattern. It uses a vertical swipe gesture to refresh the content of the views. SwipeRefreshLayout widget detects the vertical swipe and display distinct progress bars and triggers the callback methods in the app... | [
{
"code": null,
"e": 53,
"s": 25,
"text": "\n17 Nov, 2020"
},
{
"code": null,
"e": 866,
"s": 53,
"text": "The SwipeRefreshLayout widget is used for implementing a swipe-to-refresh user interface design pattern. It uses a vertical swipe gesture to refresh the content of the views.... |
Securing Django Admin login with OTP (2 Factor Authentication) | 01 Nov, 2020
Multi factor authentication is one of the most basic principle when adding security for our applications. In this tutorial, we will be adding multi factor authentication using OTP Method. This article is in continuation of Blog CMS Project in Django. Check this out here β Building Blog CMS (Content Managem... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n01 Nov, 2020"
},
{
"code": null,
"e": 359,
"s": 28,
"text": "Multi factor authentication is one of the most basic principle when adding security for our applications. In this tutorial, we will be adding multi factor authentication using... |
Ruby | Enumerable group_by() function | 05 Dec, 2019
The group_by() of enumerable is an inbuilt method in Ruby returns an hash where the groups are collectively kept as the result of the block after grouping them. In case no block is given, then an enumerator is returned.
Syntax: enu.group_by { |obj| block }
Parameters: The function takes an optional block a... | [
{
"code": null,
"e": 53,
"s": 25,
"text": "\n05 Dec, 2019"
},
{
"code": null,
"e": 273,
"s": 53,
"text": "The group_by() of enumerable is an inbuilt method in Ruby returns an hash where the groups are collectively kept as the result of the block after grouping them. In case no bl... |
HTML <hr> color Attribute | 05 May, 2021
The HTML <hr> color Attribute is used to specify the color of a Horizontal rule. It is not supported by HTML 5.Syntax:
<Hr color= "color_name | hex_number | rgb_number">
Attribute Values:
color_name: It sets the Text color by using the color name. For example βredβ.
hex_number: It sets the text color ... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n05 May, 2021"
},
{
"code": null,
"e": 149,
"s": 28,
"text": "The HTML <hr> color Attribute is used to specify the color of a Horizontal rule. It is not supported by HTML 5.Syntax: "
},
{
"code": null,
"e": 201,
"s": 149... |
How to access a collection in MongoDB using Python? | 30 May, 2022
MongoDB is a cross-platform, document-oriented database that works on the concept of collections and documents. MongoDB offers high speed, high availability, and high scalability.
1) Getting a list of collection: For getting a list of a MongoDB databaseβs collections list_collection_names() method is used.... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n30 May, 2022"
},
{
"code": null,
"e": 208,
"s": 28,
"text": "MongoDB is a cross-platform, document-oriented database that works on the concept of collections and documents. MongoDB offers high speed, high availability, and high scalabil... |
Kotlin generics | 01 Jun, 2020
Generics are the powerful features that allow us to define classes, methods and properties which are accessible using different data types while keeping a check of the compile-time type safety.
Creating parameterized classes βA generic type is a class or method that is parameterized over types. We always u... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n01 Jun, 2020"
},
{
"code": null,
"e": 246,
"s": 52,
"text": "Generics are the powerful features that allow us to define classes, methods and properties which are accessible using different data types while keeping a check of the compil... |
Count number of trees in a forest | 28 Jul, 2021
Given n nodes of a forest (collection of trees), find the number of trees in the forest.Examples :
Input : edges[] = {0, 1}, {0, 2}, {3, 4}
Output : 2
Explanation : There are 2 trees
0 3
/ \ \
1 2 4
Approach : 1. Apply DFS on ev... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n28 Jul, 2021"
},
{
"code": null,
"e": 153,
"s": 52,
"text": "Given n nodes of a forest (collection of trees), find the number of trees in the forest.Examples : "
},
{
"code": null,
"e": 328,
"s": 153,
"text": "Inpu... |
Count triplets such that sum of any two number is equal to third | Set 2 | 13 Aug, 2021
Given an array of distinct positive integers arr[] of length N, the task is to count all the triplets such that sum of two elements equals the third element.
Examples:
Input: arr[] = {1, 5, 3, 2} Output: 2 Explanation: In the given array, there are two such triplets such that sum of the two numbers is eq... | [
{
"code": null,
"e": 54,
"s": 26,
"text": "\n13 Aug, 2021"
},
{
"code": null,
"e": 212,
"s": 54,
"text": "Given an array of distinct positive integers arr[] of length N, the task is to count all the triplets such that sum of two elements equals the third element."
},
{
"c... |
C++ Queue Library - push() Function | The C++ function std::queue::push() inserts new element at the end of queue and assigns val to newly inserted element. This member function increases size of queue by one.
This member function effectively calls the push_back() member function of the underlying container.
Following is the declaration for std::queue::pus... | [
{
"code": null,
"e": 2775,
"s": 2603,
"text": "The C++ function std::queue::push() inserts new element at the end of queue and assigns val to newly inserted element. This member function increases size of queue by one."
},
{
"code": null,
"e": 2875,
"s": 2775,
"text": "This membe... |
Anonymous Method in C# - GeeksforGeeks | 11 Feb, 2019
An anonymous method is a method which doesnβt contain any name which is introduced in C# 2.0. It is useful when the user wants to create an inline method and also wants to pass parameter in the anonymous method like other methods. An Anonymous method is defined using the delegate keyword and the user can a... | [
{
"code": null,
"e": 24913,
"s": 24885,
"text": "\n11 Feb, 2019"
},
{
"code": null,
"e": 25274,
"s": 24913,
"text": "An anonymous method is a method which doesnβt contain any name which is introduced in C# 2.0. It is useful when the user wants to create an inline method and also ... |
Calendar Functions in Java | The java.util.calendar class provides the calendar functions in Java. Is an abstract class that provides methods for converting between a specific instant in time and a set of calendar fields such as YEAR, MONTH, DAY_OF_MONTH, HOUR, and so on, and for manipulating the calendar fields, such as getting the date of the ne... | [
{
"code": null,
"e": 1391,
"s": 1062,
"text": "The java.util.calendar class provides the calendar functions in Java. Is an abstract class that provides methods for converting between a specific instant in time and a set of calendar fields such as YEAR, MONTH, DAY_OF_MONTH, HOUR, and so on, and for m... |
Running Deep Learning Algorithms as a Service | by Nir Orman | Towards Data Science | So, You want to serve Deep Learning Algorithms as a service.
You have a really cool algorithmic library written in Python and TensorFlow/Keras/Some other platform that requires running workloads on a GPU and you want to be able to serve it at scale and have it up and running fast.
Celery is an open-source asynchronous ... | [
{
"code": null,
"e": 233,
"s": 172,
"text": "So, You want to serve Deep Learning Algorithms as a service."
},
{
"code": null,
"e": 454,
"s": 233,
"text": "You have a really cool algorithmic library written in Python and TensorFlow/Keras/Some other platform that requires running w... |
BabylonJS - Video Texture | To display video in the scene, babylonjs has the video texture feature. videotexture takes an array of videos as input.
For video texture, we are going to use mp4 file. Please download an mp4 of your choice and use it in the demo below.
video.material.diffuseTexture = new BABYLON.VideoTexture("video",
["mp4 file", "web... | [
{
"code": null,
"e": 2303,
"s": 2183,
"text": "To display video in the scene, babylonjs has the video texture feature. videotexture takes an array of videos as input."
},
{
"code": null,
"e": 2420,
"s": 2303,
"text": "For video texture, we are going to use mp4 file. Please downlo... |
How do I hide an element when printing a web page? | To hide the element, add βdisplay:noneβ to the element with CSS.
<style>
@media print {
.noprint {
visibility: hidden;
}
}
</style>
In addition, add the element, which you want to hide inside the <div>β
<div id="noprint">
Add here the element, which you want to hide.
</div> | [
{
"code": null,
"e": 1127,
"s": 1062,
"text": "To hide the element, add βdisplay:noneβ to the element with CSS."
},
{
"code": null,
"e": 1206,
"s": 1127,
"text": "<style>\n@media print {\n .noprint {\n visibility: hidden;\n }\n}\n</style>"
},
{
"code": null,
... |
When should I use a semicolon after curly braces in JavaScript? | In JavaScript, Semicolons are optional. Simple statements in JavaScript are generally followed by a semicolon character, just as they are in C, C++, and Java. JavaScript, however, allows you to omit this semicolon if each of your statements is placed on a separate line. It is a good programming practice to use semicolo... | [
{
"code": null,
"e": 1386,
"s": 1062,
"text": "In JavaScript, Semicolons are optional. Simple statements in JavaScript are generally followed by a semicolon character, just as they are in C, C++, and Java. JavaScript, however, allows you to omit this semicolon if each of your statements is placed on... |
Slice Composite Literal in Go - GeeksforGeeks | 22 Jul, 2019
There are two terms i.e. Slice and Composite Literal. Slice is a composite data type similar to an array which is used to hold the elements of the same data type. The main difference between array and slice is that slice can vary in size dynamically but not an array.Composite literals are used to construct... | [
{
"code": null,
"e": 24826,
"s": 24798,
"text": "\n22 Jul, 2019"
},
{
"code": null,
"e": 25475,
"s": 24826,
"text": "There are two terms i.e. Slice and Composite Literal. Slice is a composite data type similar to an array which is used to hold the elements of the same data type. ... |
Calculate time of operation in Arduino | Often, you need to measure the time your microcontroller takes to perform a particular task. You can use the millis() function of Arduino to measure the time. This function returns the number of milliseconds passed since your board started running the current program. Therefore, to calculate the time taken by an operat... | [
{
"code": null,
"e": 1485,
"s": 1062,
"text": "Often, you need to measure the time your microcontroller takes to perform a particular task. You can use the millis() function of Arduino to measure the time. This function returns the number of milliseconds passed since your board started running the c... |
C# Program to check if a number is prime or not | To calculate whether a number is prime or not, we have used a for a loop. Within that on every iteration, we use an if statement to find that the remainder is equal to 0, between the number itself.
for (int i = 1; i <= n; i++) {
if (n % i == 0) {
a++;
}
}
A counter a is also added, which increments only twi... | [
{
"code": null,
"e": 1260,
"s": 1062,
"text": "To calculate whether a number is prime or not, we have used a for a loop. Within that on every iteration, we use an if statement to find that the remainder is equal to 0, between the number itself."
},
{
"code": null,
"e": 1330,
"s": 126... |
TypeScript - Nested if statement | The else...if ladder is useful to test multiple conditions. Its syntax is given below β
if (boolean_expression1) {
//statements if the expression1 evaluates to true
} else if (boolean_expression2) {
//statements if the expression2 evaluates to true
} else {
//statements if both expression1 and expression2... | [
{
"code": null,
"e": 2136,
"s": 2048,
"text": "The else...if ladder is useful to test multiple conditions. Its syntax is given below β"
},
{
"code": null,
"e": 2389,
"s": 2136,
"text": "if (boolean_expression1) { \n //statements if the expression1 evaluates to true \n} else if ... |
Modified version of summing an array with recursion in JavaScript | Letβs say, we are required to write a recursive function that sums all the elements of an array of
Numbers but with a twist and the twist is that the recursive function we write cannot initialize any
extra variable (memory).
Like we cannot use a variable to store the sum or to keep a count of the index of the array, it... | [
{
"code": null,
"e": 1287,
"s": 1062,
"text": "Letβs say, we are required to write a recursive function that sums all the elements of an array of\nNumbers but with a twist and the twist is that the recursive function we write cannot initialize any\nextra variable (memory)."
},
{
"code": null... |
How to wrap the text in text flow layout in JavaFX? | To create rich text contents in our applications JavaFX provides a special layout called text flow represented by the javafx.scene.layout.TextFlow class. Using this you can layout multiple text nodes in a single text flow.
Since they are separate nodes, you can set different fonts to them. If you try to add nodes other... | [
{
"code": null,
"e": 1285,
"s": 1062,
"text": "To create rich text contents in our applications JavaFX provides a special layout called text flow represented by the javafx.scene.layout.TextFlow class. Using this you can layout multiple text nodes in a single text flow."
},
{
"code": null,
... |
What is the difference between compile time polymorphism and runtime polymorphism in java? | If we perform (achieve) method overriding and method overloading using instance methods, it is run time (dynamic) polymorphism.
In dynamic polymorphism the binding between the method call an the method body happens at the time of execution and, this binding is known as dynamic binding or late binding.
Live Demo
class ... | [
{
"code": null,
"e": 1190,
"s": 1062,
"text": "If we perform (achieve) method overriding and method overloading using instance methods, it is run time (dynamic) polymorphism."
},
{
"code": null,
"e": 1365,
"s": 1190,
"text": "In dynamic polymorphism the binding between the method... |
Sorting in C++ | In this section we will see how to perform sorting algorithm in C++. A sorted array is
an array in which each of the elements are sorted in some order such as numerical,
alphabetical etc. There are many algorithms to sort a numerical array such as bubble
sort, insertion sort, selection sort, merge sort, quick sort, hea... | [
{
"code": null,
"e": 1469,
"s": 1062,
"text": "In this section we will see how to perform sorting algorithm in C++. A sorted array is\nan array in which each of the elements are sorted in some order such as numerical,\nalphabetical etc. There are many algorithms to sort a numerical array such as bub... |
Append Operation on Vectors in R Programming - GeeksforGeeks | 11 Jun, 2021
Vectors in R programming is a basic object consisting sequence of homogeneous elements. It can be integer, logical, double, character, complex or raw. In this article, let us discuss different methods to concatenate/append values to a vector in R programming. Values can be appended/concatenated in a vector... | [
{
"code": null,
"e": 25242,
"s": 25214,
"text": "\n11 Jun, 2021"
},
{
"code": null,
"e": 25569,
"s": 25242,
"text": "Vectors in R programming is a basic object consisting sequence of homogeneous elements. It can be integer, logical, double, character, complex or raw. In this arti... |
Google Interview Experience for Software Engineer 2021 New Grad - GeeksforGeeks | 17 Dec, 2020
I was contacted by a Google recruiter a few months ago, that my resume has been shortlisted for the Software Engineer 2021 New Grad Role. I was provided with the next action steps of how to proceed with the next round of interviews β Technical Phone Interview which is generally 45 minutes.
I wasnβt able to... | [
{
"code": null,
"e": 25054,
"s": 25026,
"text": "\n17 Dec, 2020"
},
{
"code": null,
"e": 25345,
"s": 25054,
"text": "I was contacted by a Google recruiter a few months ago, that my resume has been shortlisted for the Software Engineer 2021 New Grad Role. I was provided with the n... |
Combinations of sum with tuples in tuple list in Python | If it is required to get the combinations of sum with respect to tuples in a list of tuples, the 'combinations' method and the list comprehension can be used.
The 'combinations' method returns 'r' length subsequence of elements from the iterable that is passed as input. The combinations are shown in lexicographic sort ... | [
{
"code": null,
"e": 1221,
"s": 1062,
"text": "If it is required to get the combinations of sum with respect to tuples in a list of tuples, the 'combinations' method and the list comprehension can be used."
},
{
"code": null,
"e": 1445,
"s": 1221,
"text": "The 'combinations' meth... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.