title
stringlengths
3
221
text
stringlengths
17
477k
parsed
listlengths
0
3.17k
PHPUnit assertIsInt() Function
07 Aug, 2020 The assertIsInt() function is a builtin function in PHPUnit and is used to assert whether the given actual variable is an integer or not. This assertion will return true in the case if the actual variable is an integer else returns false. In case of true the asserted test case got passed else test case got...
[ { "code": null, "e": 28, "s": 0, "text": "\n07 Aug, 2020" }, { "code": null, "e": 344, "s": 28, "text": "The assertIsInt() function is a builtin function in PHPUnit and is used to assert whether the given actual variable is an integer or not. This assertion will return true in th...
Selenium Click Link By href Value
We can click a link by href value with Selenium webdriver. To identify the link with the href attribute we can take the help of the locators xpath or css selector. We shall use the findElement method and pass By.xpath or By.cssSelector as a parameter to this method. Let us investigate the html code of the link Privacy ...
[ { "code": null, "e": 1351, "s": 1187, "text": "We can click a link by href value with Selenium webdriver. To identify the link with the href attribute we can take the help of the locators xpath or css selector." }, { "code": null, "e": 1606, "s": 1351, "text": "We shall use the f...
Python | Pandas Series - GeeksforGeeks
17 Jan, 2019 Pandas Series is a one-dimensional labeled array capable of holding data of any type (integer, string, float, python objects, etc.). The axis labels are collectively called index. Pandas Series is nothing but a column in an excel sheet.Labels need not be unique but must be a hashable type. The object suppo...
[ { "code": null, "e": 43445, "s": 43417, "text": "\n17 Jan, 2019" }, { "code": null, "e": 43915, "s": 43445, "text": "Pandas Series is a one-dimensional labeled array capable of holding data of any type (integer, string, float, python objects, etc.). The axis labels are collective...
Flask – Mail
A web based application is often required to have a feature of sending mail to the users/clients. Flask-Mail extension makes it very easy to set up a simple interface with any email server. At first, Flask-Mail extension should be installed with the help of pip utility. pip install Flask-Mail Then Flask-Mail needs to ...
[ { "code": null, "e": 2357, "s": 2167, "text": "A web based application is often required to have a feature of sending mail to the users/clients. Flask-Mail extension makes it very easy to set up a simple interface with any email server." }, { "code": null, "e": 2438, "s": 2357, "...
C# program to multiply two matrices
The program for matrix multiplication is used to multiply two matrices. This procedure is only possible if the number of columns in the first matrix are equal to the number of rows in the second matrix. A program that demonstrates matrix multiplication in C# is given as follows − Live Demo using System; namespace Matr...
[ { "code": null, "e": 1265, "s": 1062, "text": "The program for matrix multiplication is used to multiply two matrices. This procedure is only possible if the number of columns in the first matrix are equal to the number of rows in the second matrix." }, { "code": null, "e": 1343, "s"...
Read an image with OpenCV and display it with Tkinter
OpenCV is an Open Source Computer Vision library in Python which is widely used for Research purposes in Artificial Intelligence and Machine Learning. Computer Vision Library such as OpenCV deals with image processing. We can use OpenCV to read an image and further use it for development. Let us suppose that we want to...
[ { "code": null, "e": 1352, "s": 1062, "text": "OpenCV is an Open Source Computer Vision library in Python which is widely used for Research purposes in Artificial Intelligence and Machine Learning. Computer Vision Library such as OpenCV deals with image processing. We can use OpenCV to read an image...
ChronoUnit values() method in Java with Examples - GeeksforGeeks
29 Jan, 2020 The values() method of ChronoUnit enum is used to an array containing the units of this ChronoUnit, in the order, they are declared. Syntax: public static ChronoUnit[] values() Parameters: This method accepts nothing. Return value: This method returns an array containing the constants of this enum type, i...
[ { "code": null, "e": 24442, "s": 24414, "text": "\n29 Jan, 2020" }, { "code": null, "e": 24575, "s": 24442, "text": "The values() method of ChronoUnit enum is used to an array containing the units of this ChronoUnit, in the order, they are declared." }, { "code": null, ...
Assigning values to variables in R programming - assign() Function - GeeksforGeeks
10 May, 2020 In R programming, assign() method is used to assign the value to a variable in an environment. Syntax : assign(variable, value)Return : Return the variable having value assigned. Example 1: # Using assign() methodassign("gfg", 10) print(gfg) Output: [1] 10 Example 2: # Using assign() methodassign("gfg", 2...
[ { "code": null, "e": 24201, "s": 24173, "text": "\n10 May, 2020" }, { "code": null, "e": 24296, "s": 24201, "text": "In R programming, assign() method is used to assign the value to a variable in an environment." }, { "code": null, "e": 24380, "s": 24296, "tex...
Check whether two numbers are in golden ratio - GeeksforGeeks
17 May, 2021 Given two numbers A and B, the task is to check that A and B are in the golden ratio.Golden Ratio: Two numbers are said to be in the golden ratio if their ratio is the same as the ratio of the sum of the two numbers to the larger number. Here a > b > 0, Below is the geometric representation of the Golden r...
[ { "code": null, "e": 24638, "s": 24610, "text": "\n17 May, 2021" }, { "code": null, "e": 24952, "s": 24638, "text": "Given two numbers A and B, the task is to check that A and B are in the golden ratio.Golden Ratio: Two numbers are said to be in the golden ratio if their ratio is...
Count of pairs in an array whose sum is a perfect square in C++
We are given with an array of N elements. The goal is to find the count of all pairs (Arr[i],Arr[j]) which have a sum which is a perfect square such that i!=j. That is Arr[i]+Arr[j] is a perfect square. We will do this by calculating the sum of pairs and check if the square root of that sum is equal to the floor value ...
[ { "code": null, "e": 1265, "s": 1062, "text": "We are given with an array of N elements. The goal is to find the count of all pairs (Arr[i],Arr[j]) which have a sum which is a perfect square such that i!=j. That is Arr[i]+Arr[j] is a perfect square." }, { "code": null, "e": 1454, "s"...
Data Pre Processing Techniques You Should Know | by Maneesha Rajaratne | Towards Data Science
Hi guys! Welcome Back. Today we will be discussing feature engineering techniques that can help you to score a higher accuracy. As you know data can be very intimidating for a data scientist. If you have a dataset in your hand, and if you are a data scientist on top of that, then you kind of start thinking of varies st...
[ { "code": null, "e": 299, "s": 171, "text": "Hi guys! Welcome Back. Today we will be discussing feature engineering techniques that can help you to score a higher accuracy." }, { "code": null, "e": 817, "s": 299, "text": "As you know data can be very intimidating for a data scien...
Design and Analysis Strassen’s Matrix Multiplication
In this chapter, first we will discuss the general method of matrix multiplication and later we will discuss Strassen’s matrix multiplication algorithm. Let us consider two matrices X and Y. We want to calculate the resultant matrix Z by multiplying X and Y. First, we will discuss naïve method and its complexity. Here...
[ { "code": null, "e": 2752, "s": 2599, "text": "In this chapter, first we will discuss the general method of matrix multiplication and later we will discuss Strassen’s matrix multiplication algorithm." }, { "code": null, "e": 2858, "s": 2752, "text": "Let us consider two matrices ...
Explain the evaluation of expressions of stacks in C language
Stack is a linear data structure, where data is inserted and removed only at one end. Given below is an algorithm for Push ( ) − Check for stack overflow. if (top = = n-1) printf("stack over flow"); Otherwise, insert an element into the stack. top ++ a[top] = item Given below is an algorithm for Pop ( ) − Check for sta...
[ { "code": null, "e": 1148, "s": 1062, "text": "Stack is a linear data structure, where data is inserted and removed only at one end." }, { "code": null, "e": 1191, "s": 1148, "text": "Given below is an algorithm for Push ( ) −" }, { "code": null, "e": 1217, "s": 1...
Difference Between Constructor Injection and Setter Injection in Spring
Dependency Injection is a practice to pass dependent object to other objects. Spring has two types of Dependency Injection : Constructor based Injection -When container call the constructor of the class. It should be used for mandatory dependencies. Constructor based Injection -When container call the constructor of th...
[ { "code": null, "e": 1187, "s": 1062, "text": "Dependency Injection is a practice to pass dependent object to other objects. Spring has two types of Dependency Injection :" }, { "code": null, "e": 1312, "s": 1187, "text": "Constructor based Injection -When container call the cons...
SAP ABAP - Interfaces
Similar to classes in ABAP, interfaces act as data types for objects. The components of interfaces are same as the components of classes. Unlike the declaration of classes, the declaration of an interface does not include the visibility sections. This is because the components defined in the declaration of an interface...
[ { "code": null, "e": 3290, "s": 2898, "text": "Similar to classes in ABAP, interfaces act as data types for objects. The components of interfaces are same as the components of classes. Unlike the declaration of classes, the declaration of an interface does not include the visibility sections. This i...
H2 Database - Truncate
TRUNCATE is a command used to delete the data from the table. Unlike DELETE FROM without WHERE clause, this command cannot be rolled back. This command commits an open transaction in this connection. Following is the generic syntax of the truncate command. TRUNCATE TABLE tableName In this example, we will truncate a...
[ { "code": null, "e": 2308, "s": 2107, "text": "TRUNCATE is a command used to delete the data from the table. Unlike DELETE FROM without WHERE clause, this command cannot be rolled back. This command commits an open transaction in this connection." }, { "code": null, "e": 2365, "s": ...
Scraping the World Development Indicators (WDI)database using Python | by Kanishka Narayan | Towards Data Science
The World Development Indicators database maintained by the World Bank is one of the most robust and diverse open access databases. The database contains datasets on a wide variety of development indicators and is an analytical gold mine for anyone interested in pursuing development research questions either quantitati...
[ { "code": null, "e": 515, "s": 172, "text": "The World Development Indicators database maintained by the World Bank is one of the most robust and diverse open access databases. The database contains datasets on a wide variety of development indicators and is an analytical gold mine for anyone intere...
MySQL query to update string field by concatenating to it?
For concatenating a string field, use CONCAT() function. Let us first create a table − mysql> create table DemoTable -> ( -> SequenceId int NOT NULL AUTO_INCREMENT PRIMARY KEY, -> StudentId varchar(100) -> ); Query OK, 0 rows affected (0.59 sec) Insert some records in the table using insert command − mysql>...
[ { "code": null, "e": 1149, "s": 1062, "text": "For concatenating a string field, use CONCAT() function. Let us first create a table −" }, { "code": null, "e": 1320, "s": 1149, "text": "mysql> create table DemoTable\n -> (\n -> SequenceId int NOT NULL AUTO_INCREMENT PRIMARY KE...
Area of the largest Rectangle without a given point - GeeksforGeeks
05 May, 2021 Given the length L and breadth B of a rectangle and the position of a hole in the rectangle as (X, Y) coordinate, the task is to find the area of largest Rectangle within the given Rectangle such that it does not contain the hole.Note: The rectangle is placed at the origin by two of its side touching the C...
[ { "code": null, "e": 26375, "s": 26347, "text": "\n05 May, 2021" }, { "code": null, "e": 26710, "s": 26375, "text": "Given the length L and breadth B of a rectangle and the position of a hole in the rectangle as (X, Y) coordinate, the task is to find the area of largest Rectangle...
Python | Check for URL in a String
29 Dec, 2020 Prerequisite : Pattern matching with Regular Expression In this article, we will need to accept a string and we need to check if the string contains any URL in it. If the URL is present in the string, we will say URL’s been found or not and print the respective URL present in the string. We will use the co...
[ { "code": null, "e": 54, "s": 26, "text": "\n29 Dec, 2020" }, { "code": null, "e": 110, "s": 54, "text": "Prerequisite : Pattern matching with Regular Expression" }, { "code": null, "e": 421, "s": 110, "text": "In this article, we will need to accept a string ...
Python | Pandas Series.from_array()
13 Feb, 2019 Pandas series is a One-dimensional ndarray with axis labels. The labels need not be unique but must be a hashable type. The object supports both integer- and label-based indexing and provides a host of methods for performing operations involving the index. Pandas Series.from_array() function construct a Se...
[ { "code": null, "e": 28, "s": 0, "text": "\n13 Feb, 2019" }, { "code": null, "e": 285, "s": 28, "text": "Pandas series is a One-dimensional ndarray with axis labels. The labels need not be unique but must be a hashable type. The object supports both integer- and label-based index...
How to add an element to an Array in Java?
13 May, 2022 Given an array of size n, the task is to add an element x in this array in Java. The size of the array cannot be changed dynamically in Java, as it is done in C/C++. Hence in order to add an element in the array, one of the following methods can be done: By creating a new array:Create a new array of size n...
[ { "code": null, "e": 54, "s": 26, "text": "\n13 May, 2022" }, { "code": null, "e": 135, "s": 54, "text": "Given an array of size n, the task is to add an element x in this array in Java." }, { "code": null, "e": 309, "s": 135, "text": "The size of the array ca...
Kotlin Interfaces
03 Jul, 2019 Interfaces are custom types provided by Kotlin that cannot be instantiated directly. Instead, these define a form of behavior that the implementing types have to follow. With the interface, you can define a set of properties and methods, that the concrete types must follow and implement. The interface defi...
[ { "code": null, "e": 52, "s": 24, "text": "\n03 Jul, 2019" }, { "code": null, "e": 341, "s": 52, "text": "Interfaces are custom types provided by Kotlin that cannot be instantiated directly. Instead, these define a form of behavior that the implementing types have to follow. With...
Platform As A Service (PaaS) and its Types
07 Aug, 2020 Prerequisite – Cloud Based ServicesPlatform-as-an-service (PaaS) is distributed computing model where an outsider supplier appropriates equipment and programming instruments to clients over Internet. As rule, these are required for application improvement. PaaS supplier has equipment and programming on its...
[ { "code": null, "e": 28, "s": 0, "text": "\n07 Aug, 2020" }, { "code": null, "e": 473, "s": 28, "text": "Prerequisite – Cloud Based ServicesPlatform-as-an-service (PaaS) is distributed computing model where an outsider supplier appropriates equipment and programming instruments t...
How to extract date from Excel file using Pandas?
29 Dec, 2020 Prerequisite: Regular Expressions in Python In this article, Let’s see how to extract date from the Excel file. Suppose our Excel file looks like below given image then we have to extract the date from the string and store it into a new Dataframe column. date_sample_data.xlsx For viewing the Excel file Cli...
[ { "code": null, "e": 53, "s": 25, "text": "\n29 Dec, 2020" }, { "code": null, "e": 97, "s": 53, "text": "Prerequisite: Regular Expressions in Python" }, { "code": null, "e": 308, "s": 97, "text": "In this article, Let’s see how to extract date from the Excel f...
How to connect Node.js with React.js ?
07 Oct, 2021 ReactJS is an open-source JavaScript library that is used for building user interfaces specifically for single-page applications. It is widely used for making SPA(Single Page Application) and it has a large developer community. NodeJS is primarily used for non-blocking, event-driven servers, due to its sin...
[ { "code": null, "e": 52, "s": 24, "text": "\n07 Oct, 2021" }, { "code": null, "e": 280, "s": 52, "text": "ReactJS is an open-source JavaScript library that is used for building user interfaces specifically for single-page applications. It is widely used for making SPA(Single Page...
Matplotlib.axes.Axes.get_visible() in Python
30 Apr, 2020 Matplotlib is a library in Python and it is numerical – mathematical extension for NumPy library. The Axes Class contains most of the figure elements: Axis, Tick, Line2D, Text, Polygon, etc., and sets the coordinate system. And the instances of Axes supports callbacks through a callbacks attribute. The Axe...
[ { "code": null, "e": 28, "s": 0, "text": "\n30 Apr, 2020" }, { "code": null, "e": 328, "s": 28, "text": "Matplotlib is a library in Python and it is numerical – mathematical extension for NumPy library. The Axes Class contains most of the figure elements: Axis, Tick, Line2D, Text...
cvs command in Linux with Examples
27 Apr, 2021 cvs(Concurrent Versions System) command in Linux is used to store the history of a file. Whenever a file gets corrupted or anything goes wrong “cvs” help us to go back to the previous version and restore our file. Syntax: cvs [cvs_options] cvs_command [command_options] [command_args] Policy Options: ...
[ { "code": null, "e": 28, "s": 0, "text": "\n27 Apr, 2021" }, { "code": null, "e": 243, "s": 28, "text": "cvs(Concurrent Versions System) command in Linux is used to store the history of a file. Whenever a file gets corrupted or anything goes wrong “cvs” help us to go back to the ...
Angular | keyup event
11 Jun, 2020 Introduction Here, we will be explaining the (keyup) event and options that can be used with (keyup) in Angular2. There are various options that can be used with (keyup) event but first let me explain you what is (keyup). (keyup): (keyup) is an Angular event binding to respond to any DOM event. It is a s...
[ { "code": null, "e": 54, "s": 26, "text": "\n11 Jun, 2020" }, { "code": null, "e": 67, "s": 54, "text": "Introduction" }, { "code": null, "e": 278, "s": 67, "text": "Here, we will be explaining the (keyup) event and options that can be used with (keyup) in Ang...
HTML | DOM Audio volume Property - GeeksforGeeks
30 Jul, 2019 The HTML DOM Audio volume property is used for set or return the current volume of the Audio element. The volume value 0.0 represents silent and 1.0 represents loudest. Syntax: It returns the volume property.audio.volume It sets the volume property. audio.volume = number audio.volume It sets the volume pro...
[ { "code": null, "e": 24247, "s": 24219, "text": "\n30 Jul, 2019" }, { "code": null, "e": 24416, "s": 24247, "text": "The HTML DOM Audio volume property is used for set or return the current volume of the Audio element. The volume value 0.0 represents silent and 1.0 represents lou...
How to stretch elements to fit the whole height of the browser window with CSS?
To stretch elements to fit the whole height of the browser window with CSS, the code is as follows − Live Demo <!DOCTYPE html> <html> <head> <title>Page Title</title> <style> *{ box-sizing: border-box; } html, body { height: 100%; margin: 0; } .fullHeight{ font-family: 'Segoe UI'...
[ { "code": null, "e": 1163, "s": 1062, "text": "To stretch elements to fit the whole height of the browser window with CSS, the code is as follows −" }, { "code": null, "e": 1174, "s": 1163, "text": " Live Demo" }, { "code": null, "e": 1690, "s": 1174, "text": ...
Angular 8 - Building with Bazel
Bazel is an advanced build and test tool. It supports lot of features suitable for large projects. Some of the features of Bazel are as follows: Support multiple languages. Support multiple platforms. Support multiple repository. Support high-level build language. Fast and reliable. Angular supports building the applic...
[ { "code": null, "e": 2487, "s": 2388, "text": "Bazel is an advanced build and test tool. It supports lot of features suitable for large projects." }, { "code": null, "e": 2533, "s": 2487, "text": "Some of the features of Bazel are as follows:" }, { "code": null, "e": ...
C++ Operators
Operators are used to perform operations on variables and values. In the example below, we use the + operator to add together two values: Although the + operator is often used to add together two values, like in the example above, it can also be used to add together a variable and a value, or a variable and another var...
[ { "code": null, "e": 66, "s": 0, "text": "Operators are used to perform operations on variables and values." }, { "code": null, "e": 138, "s": 66, "text": "In the example below, we use the\n+ operator to add together two values:" }, { "code": null, "e": 327, "s": ...
Tryit Editor v3.7
Tryit: Center with position and transform
[]
Pie Charts - Solved Examples
Directions(Q 1 to Q 4): The pie-graph given below shows the breakup of the cost of construction of a house. Assuming that the total cost of construction is Rs 600000, answer the question given below: Q 1 - The sum spent on cement is: A - Rs 200000 B - Rs 160000 C - Rs 120000 D - Rs 100000 Answer - C Explanation Amo...
[ { "code": null, "e": 4092, "s": 3892, "text": "Directions(Q 1 to Q 4): The pie-graph given below shows the breakup of the cost of construction of a house. Assuming that the total cost of construction is Rs 600000, answer the question given below:" }, { "code": null, "e": 4126, "s": 4...
How to communicate from parent component to the child component in Angular 9 ? - GeeksforGeeks
11 Jun, 2020 Angular makes the communication between components very easy. In this article, we will learn how to communicate from a parent component to the child component. Approach: Let’s create two components:parentchild parentchild parent child In the parent component, declare the property that you want to receive i...
[ { "code": null, "e": 24751, "s": 24723, "text": "\n11 Jun, 2020" }, { "code": null, "e": 24911, "s": 24751, "text": "Angular makes the communication between components very easy. In this article, we will learn how to communicate from a parent component to the child component." ...
Building python from source on Ubuntu 20.04 LTS Focal Fossa | by Sushrut Ashtikar | Towards Data Science
PS: Apart from users facing dependency issues ,this blog is for anyone who would love to try installing python from source code on any Linux based operating systems If you have upgraded your operating system and wandering why some libraries which were easily install-able on Ubuntu 18.04 are not getting installed on 20....
[ { "code": null, "e": 337, "s": 172, "text": "PS: Apart from users facing dependency issues ,this blog is for anyone who would love to try installing python from source code on any Linux based operating systems" }, { "code": null, "e": 672, "s": 337, "text": "If you have upgraded ...
Convert a given tree to its Sum Tree - GeeksforGeeks
08 Sep, 2021 Given a Binary Tree where each node has positive and negative values. Convert this to a tree where each node contains the sum of the left and right sub trees in the original tree. The values of leaf nodes are changed to 0. For example, the following tree 10 / \ ...
[ { "code": null, "e": 35848, "s": 35820, "text": "\n08 Sep, 2021" }, { "code": null, "e": 36071, "s": 35848, "text": "Given a Binary Tree where each node has positive and negative values. Convert this to a tree where each node contains the sum of the left and right sub trees in th...
How to insert a video link within an image file? - GeeksforGeeks
19 Aug, 2020 There are mainly two methods to insert a video link in an image file: Method 1: Linking the HTML file containing the video with the image in a different HTML file. Steps:Create an html file and add the video.Syntax:<video src="video_url" controls></video>Create another HTML file having the image, in which ...
[ { "code": null, "e": 24894, "s": 24866, "text": "\n19 Aug, 2020" }, { "code": null, "e": 24964, "s": 24894, "text": "There are mainly two methods to insert a video link in an image file:" }, { "code": null, "e": 24974, "s": 24964, "text": "Method 1:" }, { ...
How to get text with selenium web driver in python?
We can extract text of an element with a selenium webdriver. This is done with the help of a text method. It fetches the text in an element which can be later validated. First we need to identify the element with the help of any locators. Suppose we want to get the text of an element in below page. Code Implementation....
[ { "code": null, "e": 1232, "s": 1062, "text": "We can extract text of an element with a selenium webdriver. This is done with the help of a text method. It fetches the text in an element which can be later validated." }, { "code": null, "e": 1362, "s": 1232, "text": "First we nee...
TimeSpan.Add() Method in C#
30 Sep, 2019 This method is used to a get new TimeSpan object whose value is the sum of the specified TimeSpan object and this instance. Syntax public TimeSpan Add (TimeSpan t); Parameter:t: This parameter specifies the time interval to be added. Return Value: It returns a new TimeSpan object whose value is the sum cur...
[ { "code": null, "e": 28, "s": 0, "text": "\n30 Sep, 2019" }, { "code": null, "e": 152, "s": 28, "text": "This method is used to a get new TimeSpan object whose value is the sum of the specified TimeSpan object and this instance." }, { "code": null, "e": 193, "s": ...
How to prevent inline-block divs from wrapping ?
08 Jun, 2020 The display: inline-block; is a layout property in CSS that does not add a line break after the element. As a result, the elements can sit next to each other. The major difference between display: inline; and display: inline-block; is that, display: inline-block; also allows us to set the width and height ...
[ { "code": null, "e": 28, "s": 0, "text": "\n08 Jun, 2020" }, { "code": null, "e": 351, "s": 28, "text": "The display: inline-block; is a layout property in CSS that does not add a line break after the element. As a result, the elements can sit next to each other. The major differ...
Reference to a pointer in C++ with examples and applications
10 Sep, 2018 Like references to simple data types, we can have references to pointers. // CPP program to demonstrate references to pointers.#include <iostream>using namespace std; int main(){ int x = 10; // ptr1 holds address of x int* ptr1 = &x; // Now ptr2 also holds address of x. // But note that...
[ { "code": null, "e": 28, "s": 0, "text": "\n10 Sep, 2018" }, { "code": null, "e": 102, "s": 28, "text": "Like references to simple data types, we can have references to pointers." }, { "code": "// CPP program to demonstrate references to pointers.#include <iostream>using ...
Redirecting System.out.println() Output to a File in Java
10 May, 2022 System.out.println() is used mostly to print messages to the console. However very few of us are actually aware of its working mechanism. We can use System.out.println() to print messages to other sources too, not just restricting it to the console. However, before doing so, we must reassign the standard ...
[ { "code": null, "e": 54, "s": 26, "text": "\n10 May, 2022" }, { "code": null, "e": 433, "s": 54, "text": "System.out.println() is used mostly to print messages to the console. However very few of us are actually aware of its working mechanism. We can use System.out.println() to ...
scipy.stats.expon() | Python
20 Mar, 2019 scipy.stats.expon() is an exponential continuous random variable that is defined with a standard format and some shape parameters to complete its specification. Parameters :q : lower and upper tail probabilityx : quantilesloc : [optional] location parameter. Default = 0scale : [optional] scale parameter. D...
[ { "code": null, "e": 28, "s": 0, "text": "\n20 Mar, 2019" }, { "code": null, "e": 189, "s": 28, "text": "scipy.stats.expon() is an exponential continuous random variable that is defined with a standard format and some shape parameters to complete its specification." }, { ...
PHP | imageresolution() Function
06 Jan, 2022 The imageresolution() function is an inbuilt function in PHP which is used to set and return the resolution of an image in DPI (dots per inch). If none of the optional parameters is given, the current resolution is returned as an indexed array. If one of the optional parameters is given it will set both wi...
[ { "code": null, "e": 28, "s": 0, "text": "\n06 Jan, 2022" }, { "code": null, "e": 625, "s": 28, "text": "The imageresolution() function is an inbuilt function in PHP which is used to set and return the resolution of an image in DPI (dots per inch). If none of the optional paramet...
Vector iterator() method in Java with Examples
17 Dec, 2021 iterator() method of Vector class that is present inside java.util package is used to return an iterator of the same elements as that of the Vector. The elements are returned in random order from what was present in the vector. Syntax: Iterator iterate_value = Vector.iterator(); Parameters: The function d...
[ { "code": null, "e": 53, "s": 25, "text": "\n17 Dec, 2021" }, { "code": null, "e": 281, "s": 53, "text": "iterator() method of Vector class that is present inside java.util package is used to return an iterator of the same elements as that of the Vector. The elements are returned...
Python | Convert numeric String to integers in mixed List
25 Aug, 2021 Sometimes, while working with data, we can have a problem in which we receive mixed data and need to convert the integer elements in form of strings to integers. This kind of operation might be required in data preprocessing step. Let’s discuss certain ways in which this task can be performed. Method #1 : ...
[ { "code": null, "e": 52, "s": 24, "text": "\n25 Aug, 2021" }, { "code": null, "e": 347, "s": 52, "text": "Sometimes, while working with data, we can have a problem in which we receive mixed data and need to convert the integer elements in form of strings to integers. This kind of...
Python – Cost computation using Frequency and Price dictionary
01 Aug, 2020 Given price and frequency dictionary, compute total cost of products, i.e by summing the product of price and frequency of each item. Input : test_dict = {“Apple” : 2, “Mango” : 2, “Grapes” : 2}, {“Apple” : 2, “Mango” : 2, “Grapes” : 2}Output : 12Explanation : (2*2) + (2*2) + (2*2) = 12. Input : test_dict ...
[ { "code": null, "e": 28, "s": 0, "text": "\n01 Aug, 2020" }, { "code": null, "e": 162, "s": 28, "text": "Given price and frequency dictionary, compute total cost of products, i.e by summing the product of price and frequency of each item." }, { "code": null, "e": 317,...
Inclusion Exclusion principle and programming applications
Difficulty Level : Medium Sum Rule – If a task can be done in one of n1 ways or one of n2 ways, where none of the set of n1 ways is the same as any of the set of n2 ways, then there are n1 + n2 ways to do the task. The sum-rule mentioned above states that if there are multiple sets of ways of doing a task, there should...
[ { "code": null, "e": 26, "s": 0, "text": "Difficulty Level :\nMedium" }, { "code": null, "e": 459, "s": 26, "text": "Sum Rule – If a task can be done in one of n1 ways or one of n2 ways, where none of the set of n1 ways is the same as any of the set of n2 ways, then there are n1 ...
Program to find the minimum (or maximum) element of an array
15 Jun, 2022 Given an array, write functions to find the minimum and maximum elements in it. C++ C Java Python3 C# PHP Javascript // CPP program to find minimum (or maximum) element// in an array.#include <bits/stdc++.h>using namespace std; int getMin(int arr[], int n){ int res = arr[0]; for (int i = 1; i < n; i...
[ { "code": null, "e": 52, "s": 24, "text": "\n15 Jun, 2022" }, { "code": null, "e": 133, "s": 52, "text": "Given an array, write functions to find the minimum and maximum elements in it. " }, { "code": null, "e": 137, "s": 133, "text": "C++" }, { "code"...
Saving a machine learning Model
10 Jun, 2022 In machine learning, while working with scikit learn library, we need to save the trained models in a file and restore them in order to reuse them to compare the model with other models, and to test the model on new data. The saving of data is called Serialization, while restoring the data is called Deseri...
[ { "code": null, "e": 52, "s": 24, "text": "\n10 Jun, 2022" }, { "code": null, "e": 370, "s": 52, "text": "In machine learning, while working with scikit learn library, we need to save the trained models in a file and restore them in order to reuse them to compare the model with o...
session_unset() vs session_destroy() in PHP
14 Mar, 2019 There are two very similar PHP function session_destroy() & session_unset(). Both seem to delete all variables registered to a session but there is difference between them. session_destroy() function: It destroys all of the data associated with the current session. It does not unset any of the global varia...
[ { "code": null, "e": 28, "s": 0, "text": "\n14 Mar, 2019" }, { "code": null, "e": 201, "s": 28, "text": "There are two very similar PHP function session_destroy() & session_unset(). Both seem to delete all variables registered to a session but there is difference between them." ...
Python | os.path.splitdrive() method
07 Jun, 2019 OS module in Python provides functions for interacting with the operating system. OS comes under Python’s standard utility modules. This module provides a portable way of using operating system dependent functionality. os.path module is a submodule of OS module in Python used for common pathname manipulati...
[ { "code": null, "e": 28, "s": 0, "text": "\n07 Jun, 2019" }, { "code": null, "e": 339, "s": 28, "text": "OS module in Python provides functions for interacting with the operating system. OS comes under Python’s standard utility modules. This module provides a portable way of usin...
How to get and store device ID in Android using Kotlin?
This example demonstrates how to get and store device ID in Android using Kotlin. Step 1 − Create a new project in Android Studio, go to File? New Project and fill all required details to create a new project. Step 2 − Add the following code to res/layout/activity_main.xml. <?xml version="1.0" encoding="utf-8"?> <Relat...
[ { "code": null, "e": 1269, "s": 1187, "text": "This example demonstrates how to get and store device ID in Android using Kotlin." }, { "code": null, "e": 1397, "s": 1269, "text": "Step 1 − Create a new project in Android Studio, go to File? New Project and fill all required detai...
HTML | DOM Input Checkbox name Property
11 Mar, 2019 The Input Checkbox name property in HTML DOM is used to set or return the value of name attribute of a input checkbox field. The name attribute is required for each input field. If the name attribute is not specified in an input field then the data of that field would not be sent at all. Syntax: It returns...
[ { "code": null, "e": 53, "s": 25, "text": "\n11 Mar, 2019" }, { "code": null, "e": 342, "s": 53, "text": "The Input Checkbox name property in HTML DOM is used to set or return the value of name attribute of a input checkbox field. The name attribute is required for each input fie...
Python PIL | Image.crop() method
17 Jun, 2021 PIL is the Python Imaging Library which provides the python interpreter with image editing capabilities. PIL.Image.crop() method is used to crop a rectangular portion of any image. Syntax: PIL.Image.crop(box = None)Parameters: box – a 4-tuple defining the left, upper, right, and lower pixel coordinate.Ret...
[ { "code": null, "e": 54, "s": 26, "text": "\n17 Jun, 2021" }, { "code": null, "e": 236, "s": 54, "text": "PIL is the Python Imaging Library which provides the python interpreter with image editing capabilities. PIL.Image.crop() method is used to crop a rectangular portion of any ...
Native Keyword in Java
22 Apr, 2022 The native keyword in Java is applied to a method to indicate that the method is implemented in native code using JNI (Java Native Interface). The native keyword is a modifier that is applicable only for methods, and we can’t apply it anywhere else. The methods which are implemented in C, C++ are called na...
[ { "code": null, "e": 54, "s": 26, "text": "\n22 Apr, 2022" }, { "code": null, "e": 394, "s": 54, "text": "The native keyword in Java is applied to a method to indicate that the method is implemented in native code using JNI (Java Native Interface). The native keyword is a modifie...
On Implementing Deep Learning Library from Scratch in Python | by Parmeet Bhatia | Towards Data Science
Deep Learning has evolved from simple neural networks to quite complex architectures in a short span of time. To support this rapid expansion, many different deep learning platforms and libraries are developed along the way. One of the primary goals for these libraries is to provide easy to use interfaces for building ...
[ { "code": null, "e": 1390, "s": 172, "text": "Deep Learning has evolved from simple neural networks to quite complex architectures in a short span of time. To support this rapid expansion, many different deep learning platforms and libraries are developed along the way. One of the primary goals for ...
Naive Bayes Algorithm: Intuition and Implementation in a Spam Detector | by Victor Roman | Towards Data Science
In a broad sense, Naive Bayes models are a special kind of classification machine learning algorithms. They are based on a statistical classification technique called ‘Bayes Theorem’. Naive Bayes model are called ‘naive’ algorithms becaused they make an assumption that the predictor variables are independent from each ...
[ { "code": null, "e": 355, "s": 171, "text": "In a broad sense, Naive Bayes models are a special kind of classification machine learning algorithms. They are based on a statistical classification technique called ‘Bayes Theorem’." }, { "code": null, "e": 627, "s": 355, "text": "Na...
STL Priority Queue for Structure or Class in C++
STL Priority Queue is the implementation of maxheap. This is a C++ program of STL priority queue for structure. Begin Define a structure of type student. Initialize variables in student structure. Define another structure of type comparemarks Overload the variables of student structure in comapremarks st...
[ { "code": null, "e": 1115, "s": 1062, "text": "STL Priority Queue is the implementation of maxheap." }, { "code": null, "e": 1174, "s": 1115, "text": "This is a C++ program of STL priority queue for structure." }, { "code": null, "e": 1562, "s": 1174, "text": ...
DAX Date & Time - DATE function
Returns the specified date in datetime format. DATE (<year>, <month>, <day>) year A number representing the year. The value of the year argument can include one to four digits. The year argument is interpreted according to the date system used by your computer. Dates beginning with March 1, 1900 are supported. If you...
[ { "code": null, "e": 2048, "s": 2001, "text": "Returns the specified date in datetime format." }, { "code": null, "e": 2080, "s": 2048, "text": "DATE (<year>, <month>, <day>) \n" }, { "code": null, "e": 2085, "s": 2080, "text": "year" }, { "code": null...
C# program to Display Hostname and IP address
To find the hostname, use the Dns.GetHostName() method in C# − String hostName = string.Empty; hostName = Dns.GetHostName(); Console.WriteLine("Hostname: "+hostName); Now, use the IPHostEntry.AddressList Property to get IP Address − IPHostEntry myIP = Dns.GetHostEntry(hostName); IPAddress[] address = myIP.AddressList; ...
[ { "code": null, "e": 1125, "s": 1062, "text": "To find the hostname, use the Dns.GetHostName() method in C# −" }, { "code": null, "e": 1229, "s": 1125, "text": "String hostName = string.Empty;\nhostName = Dns.GetHostName();\nConsole.WriteLine(\"Hostname: \"+hostName);" }, { ...
How to add multiple objects to a single array list in Javascript?
There are many ways to add multiple objects to a single array list in Javascript. Let us look at some of them − To add multiple objects at the end of an array, you can repeatedly call push on it. For example, let arr = []; arr.push(1); arr.push(2); console.log(arr); This will give the output − [1, 2] To add multiple ob...
[ { "code": null, "e": 1174, "s": 1062, "text": "There are many ways to add multiple objects to a single array list in\nJavascript. Let us look at some of them −" }, { "code": null, "e": 1271, "s": 1174, "text": "To add multiple objects at the end of an array, you can repeatedly ca...
Array Operations in R Programming - GeeksforGeeks
22 Apr, 2020 Arrays are the R data objects which store the data in more than two dimensions. Arrays are n-dimensional data structures. For example, if we create an array of dimensions (2, 3, 3) then it creates 3 rectangular matrices each with 2 rows and 3 columns. They are homogeneous data structures. Now, let’s see ho...
[ { "code": null, "e": 24906, "s": 24878, "text": "\n22 Apr, 2020" }, { "code": null, "e": 25196, "s": 24906, "text": "Arrays are the R data objects which store the data in more than two dimensions. Arrays are n-dimensional data structures. For example, if we create an array of dim...
Check if two elements of a matrix are on the same diagonal or not - GeeksforGeeks
26 Nov, 2021 Given a matrix mat[][], and two integers X and Y, the task is to check if X and Y are on the same diagonal of the given matrix or not. Examples: Input: mat[][]= {{1, 2}. {3, 4}}, X = 1, Y = 4 Output: YesExplanation:Both X and Y lie on the same diagonal. Input: mat[][]= {{1, 2}. {3, 4}}, X = 2, Y = 4Output:...
[ { "code": null, "e": 24896, "s": 24868, "text": "\n26 Nov, 2021" }, { "code": null, "e": 25031, "s": 24896, "text": "Given a matrix mat[][], and two integers X and Y, the task is to check if X and Y are on the same diagonal of the given matrix or not." }, { "code": null, ...
How to Make your Computer Talk with Python | by Jake Manger | Towards Data Science
If you’re a fan of movies like Iron Man, you’ve probably fantasised about getting your very own Jarvis. Well, in this post, I’m going to show you how you can get started making your own computer assistant. We’ll do so with a little programming and some smart python packages doing data science under the hood. Now, makin...
[ { "code": null, "e": 482, "s": 172, "text": "If you’re a fan of movies like Iron Man, you’ve probably fantasised about getting your very own Jarvis. Well, in this post, I’m going to show you how you can get started making your own computer assistant. We’ll do so with a little programming and some sm...
ML | Face Recognition Using PCA Implementation
30 Nov, 2021 Face Recognition is one of the most popular and controversial tasks of computer vision. One of the most important milestones is achieved using This approach was first developed by Sirovich and Kirby in 1987 and first used by Turk and Alex Pentland in face classification in 1991. It is easy to implement and...
[ { "code": null, "e": 28, "s": 0, "text": "\n30 Nov, 2021" }, { "code": null, "e": 866, "s": 28, "text": "Face Recognition is one of the most popular and controversial tasks of computer vision. One of the most important milestones is achieved using This approach was first develope...
Program to check if the String is Null in Java
22 Jan, 2020 Given a string str, the task is to check if this string is null or not, in Java. Examples: Input: str = null Output: True Input: str = "GFG" Output: False Approach: Get the String to be checked in str We can simply compare the string with Null using == relational operator.Syntax:if(str == null) if(str ...
[ { "code": null, "e": 53, "s": 25, "text": "\n22 Jan, 2020" }, { "code": null, "e": 134, "s": 53, "text": "Given a string str, the task is to check if this string is null or not, in Java." }, { "code": null, "e": 144, "s": 134, "text": "Examples:" }, { ...
Perl | hex Function
07 May, 2019 The hex function in Perl converts the given hexadecimal number ( of base 16 ) into its equivalent decimal number ( of base 10 ). Syntax: hex number Parameters:number: hexadecimal number to be converted Returns: equivalent decimal number of the given hexadecimal number. Example 1: #!/usr/bin/perl # Initial...
[ { "code": null, "e": 28, "s": 0, "text": "\n07 May, 2019" }, { "code": null, "e": 157, "s": 28, "text": "The hex function in Perl converts the given hexadecimal number ( of base 16 ) into its equivalent decimal number ( of base 10 )." }, { "code": null, "e": 176, ...
std::back_inserter in C++
27 Jul, 2017 std::back_inserter constructs a back-insert iterator that inserts new elements at the end of the container to which it is applied. It is defined inside the header file . A back-insert iterator is a special type of output iterator designed to allow algorithms that usually overwrite elements (such as copy) t...
[ { "code": null, "e": 54, "s": 26, "text": "\n27 Jul, 2017" }, { "code": null, "e": 224, "s": 54, "text": "std::back_inserter constructs a back-insert iterator that inserts new elements at the end of the container to which it is applied. It is defined inside the header file ." }...
D3.js scaleOrdinal() Function
18 Sep, 2020 The d3.scaleOrdinal() function is used to create and return the ordinal scale which has the specified range and domain. If the domain and range are not given then both are set to empty array. These types of scales have a discrete domain and range. Syntax: d3.scaleOrdinal([[domain, ]range]); Parameters: T...
[ { "code": null, "e": 28, "s": 0, "text": "\n18 Sep, 2020" }, { "code": null, "e": 276, "s": 28, "text": "The d3.scaleOrdinal() function is used to create and return the ordinal scale which has the specified range and domain. If the domain and range are not given then both are set...
numpy.frompyfunc() in Python
29 Jun, 2021 numpy.frompyfunc(func, nin, nout) function allows to create an arbitrary Python function as Numpy ufunc (universal function). Parameters: func: [A python function object ] An arbitrary python function nin: [int] Number of input arguments to that function. nout: [int] Number of objects returned by that func...
[ { "code": null, "e": 28, "s": 0, "text": "\n29 Jun, 2021" }, { "code": null, "e": 154, "s": 28, "text": "numpy.frompyfunc(func, nin, nout) function allows to create an arbitrary Python function as Numpy ufunc (universal function)." }, { "code": null, "e": 383, "s"...
Vue.js v-on:click.right Directive
08 Jul, 2020 The v-on:click.right directive is a Vue.js directive used to add a click event listener to an element. While click directive triggers the event for all kind of clicks, this directive only triggers the event when right key of mouse is clicked. First, we will create a div element with id as app and let’s app...
[ { "code": null, "e": 28, "s": 0, "text": "\n08 Jul, 2020" }, { "code": null, "e": 443, "s": 28, "text": "The v-on:click.right directive is a Vue.js directive used to add a click event listener to an element. While click directive triggers the event for all kind of clicks, this di...
Get directory of current Python script
01 Jul, 2022 In this article, we will cover How to Get and Change the Current Working Directory in Python. While working with file handling you might have noticed that files are referenced only by their names, e.g. ‘GFG.txt’ and if the file is not located in the directory of the script, Python raises an error. So, How ...
[ { "code": null, "e": 53, "s": 25, "text": "\n01 Jul, 2022" }, { "code": null, "e": 373, "s": 53, "text": "In this article, we will cover How to Get and Change the Current Working Directory in Python. While working with file handling you might have noticed that files are reference...
Timing Constraints in Real-time System
13 Apr, 2022 Timing constraints is a vital attribute in real-time systems. Timing constraints decides the total correctness of the result in real-time systems. The correctness of results in real-time system does not depends only on logical correctness but also the result should be obtained within the time constraint. T...
[ { "code": null, "e": 28, "s": 0, "text": "\n13 Apr, 2022" }, { "code": null, "e": 465, "s": 28, "text": "Timing constraints is a vital attribute in real-time systems. Timing constraints decides the total correctness of the result in real-time systems. The correctness of results i...
URL getFile() method in Java with Examples
31 Dec, 2018 The getFile() function is a part of URL class. The function getFile() returns the file name of a specified URL. The getFile() function returns the path and the query of the URL. Function Signature: public String getFile() Syntax: url.getFile() Parameter: This function does not require any parameter Return ...
[ { "code": null, "e": 28, "s": 0, "text": "\n31 Dec, 2018" }, { "code": null, "e": 206, "s": 28, "text": "The getFile() function is a part of URL class. The function getFile() returns the file name of a specified URL. The getFile() function returns the path and the query of the UR...
Python program to convert float to exponential
26 Oct, 2021 Given a float number, the task is to write a Python program to convert float to exponential. Examples: Input: 19.0 Output: 1.900000e+01 Input: 200.2 Output: 2.002000e+02 Input: 1101.02 Output: 1.101020e+03 Approach: We will first declare and initialise a float number. Then we will use format method to co...
[ { "code": null, "e": 28, "s": 0, "text": "\n26 Oct, 2021" }, { "code": null, "e": 121, "s": 28, "text": "Given a float number, the task is to write a Python program to convert float to exponential." }, { "code": null, "e": 131, "s": 121, "text": "Examples:" ...
How To Create Custom Arduino Library Using C++
19 Dec, 2021 What is the Arduino library? Libraries are a collection of precompiled, reusable code or routines which are used by developers to reduce the development time. Arduino libraries are written in C or C++. These libraries provide us with a convenient way to share code. Arduino IDE already consists of a set of ...
[ { "code": null, "e": 54, "s": 26, "text": "\n19 Dec, 2021" }, { "code": null, "e": 83, "s": 54, "text": "What is the Arduino library?" }, { "code": null, "e": 587, "s": 83, "text": "Libraries are a collection of precompiled, reusable code or routines which are...
PHP | mysqli_num_rows() Function
31 Jul, 2021 The mysqli_num_rows() function is an inbuilt function in PHP which is used to return the number of rows present in the result set. It is generally used to check if data is present in the database or not. To use this function, it is mandatory to first set up the connection with the MySQL database. Syntax: m...
[ { "code": null, "e": 28, "s": 0, "text": "\n31 Jul, 2021" }, { "code": null, "e": 326, "s": 28, "text": "The mysqli_num_rows() function is an inbuilt function in PHP which is used to return the number of rows present in the result set. It is generally used to check if data is pre...
Logical Operators on String in Python
14 Dec, 2021 For strings in python, boolean operators (and, or, not) work. Let us consider the two strings namely str1 and str2 and try boolean operators on them: Python3 str1 = ''str2 = 'geeks' # repr is used to print the string along with the quotes # Returns str1print(repr(str1 and str2)) # Returns str1 print(rep...
[ { "code": null, "e": 52, "s": 24, "text": "\n14 Dec, 2021" }, { "code": null, "e": 203, "s": 52, "text": "For strings in python, boolean operators (and, or, not) work. Let us consider the two strings namely str1 and str2 and try boolean operators on them: " }, { "code": n...
Scala Iterator toList() method with example
28 May, 2019 The toList() method belongs to the concrete value members of the AbstractIterable class and is defined in the TraversableOnce and GenTraversableOnce classes. It converts a traversable or iterator to a list but it doesn’t terminates for infinite-sized collections. Method Definition:def toList: List[A] def ...
[ { "code": null, "e": 28, "s": 0, "text": "\n28 May, 2019" }, { "code": null, "e": 292, "s": 28, "text": "The toList() method belongs to the concrete value members of the AbstractIterable class and is defined in the TraversableOnce and GenTraversableOnce classes. It converts a tra...
How to use 'extent' in matplotlib.pyplot.imshow?
To use extent in matplotlib imshow(), we can use extent [left, right, bottom, top]. Create random data using numpy. Display the data as an image, i.e., on a 2D regular raster with data and extent [−1, 1, −1, 1] arguments. To display the figure, use show() method. import numpy as np from matplotlib import pyplot as plt ...
[ { "code": null, "e": 1146, "s": 1062, "text": "To use extent in matplotlib imshow(), we can use extent [left, right, bottom, top]." }, { "code": null, "e": 1178, "s": 1146, "text": "Create random data using numpy." }, { "code": null, "e": 1284, "s": 1178, "tex...
Node.js fs.rename() Method - GeeksforGeeks
13 Oct, 2021 The fs.rename() method is used to asynchronously rename a file at the given old path to a given new path. It will overwrite the destination file if it already exists. Syntax: fs.rename( oldPath, newPath, callback ) Parameters: This method accept three parameters as mentioned above and described below: oldP...
[ { "code": null, "e": 24516, "s": 24488, "text": "\n13 Oct, 2021" }, { "code": null, "e": 24683, "s": 24516, "text": "The fs.rename() method is used to asynchronously rename a file at the given old path to a given new path. It will overwrite the destination file if it already exis...
Setting a default variable value to undefined in a function - JavaScript?
Let’s say we are passing the following values to a function − 300 undefined We will now set the default value. Following is the code − function showValue(value) { if (value===undefined) { value=100000; } else { value=value; } return value; } console.log("The value="+showValue(300)); console....
[ { "code": null, "e": 1124, "s": 1062, "text": "Let’s say we are passing the following values to a function −" }, { "code": null, "e": 1138, "s": 1124, "text": "300\nundefined" }, { "code": null, "e": 1197, "s": 1138, "text": "We will now set the default value....
Dijkstra's algorithm in Javascript
Dijkstra's algorithm is an algorithm for finding the shortest paths between nodes in a weighted graph. We'll use the new addEdge and addDirectedEdge methods to add weights to the edges when creating a graph. Let us look at how this algorithm works − Create a distance collection and set all vertices distances as infinit...
[ { "code": null, "e": 1312, "s": 1062, "text": "Dijkstra's algorithm is an algorithm for finding the shortest paths between nodes in a weighted graph. We'll use the new addEdge and addDirectedEdge methods to add weights to the edges when creating a graph. Let us look at how this algorithm works −" ...
sqlite3 - Unix, Linux Command
sqlite3 is a terminal-based front-end to the SQLite library that can evaluate queries interactively and display the results in multiple formats. sqlite3 can also be used within shell scripts and other applications to provide batch processing features. For example, to create a new database file named "mydata.db", cr...
[ { "code": null, "e": 10835, "s": 10581, "text": "\nsqlite3 is a terminal-based front-end to the SQLite library that can evaluate\nqueries interactively and display the results in multiple formats.\nsqlite3 can also be used within shell scripts and other applications to provide\nbatch processing feat...
Stuffs Division | Practice | GeeksforGeeks
Your are given N students with some goodies to be distrubuted among them such that student at ith index gets exactly i amount of goodies (considering no wastage). The goodies has already been distributed by some other. Your task is to check if it can be redistributed such that student at ith index gets i amount of good...
[ { "code": null, "e": 554, "s": 226, "text": "Your are given N students with some goodies to be distrubuted among them such that student at ith index gets exactly i amount of goodies (considering no wastage). The goodies has already been distributed by some other. Your task is to check if it can be r...
How to validate if input in input field has float number only using express-validator ? - GeeksforGeeks
01 Jun, 2021 In HTML forms, we often required validation of different types. Validate existing email, validate password length, validate confirm password, validate to allow only integer inputs, these are some examples of validation. In a certain input field, only float numbers are allowed i.e. there not allowed any str...
[ { "code": null, "e": 25622, "s": 25594, "text": "\n01 Jun, 2021" }, { "code": null, "e": 26154, "s": 25622, "text": "In HTML forms, we often required validation of different types. Validate existing email, validate password length, validate confirm password, validate to allow onl...
How to Style the Border of the RichTextBox in C#? - GeeksforGeeks
02 Aug, 2019 In C#, RichTextBox control is a textbox which gives you rich text editing controls and advanced formatting features also includes a loading rich text format (RTF) files. Or in other words, RichTextBox controls allows you to display or edit flow content, including paragraphs, images, tables, etc. In RichTex...
[ { "code": null, "e": 24302, "s": 24274, "text": "\n02 Aug, 2019" }, { "code": null, "e": 24807, "s": 24302, "text": "In C#, RichTextBox control is a textbox which gives you rich text editing controls and advanced formatting features also includes a loading rich text format (RTF) ...
java.lang.reflect - Quick Guide
The java.lang.reflect.AccessibleObject class is the base class for Field, Method and Constructor objects. It provides the ability to flag a reflected object as suppressing default Java language access control checks when it is used. The access checks for public, default (package) access, protected, and private members ...
[ { "code": null, "e": 2191, "s": 1454, "text": "The java.lang.reflect.AccessibleObject class is the base class for Field, Method and Constructor objects. It provides the ability to flag a reflected object as suppressing default Java language access control checks when it is used. The access checks fo...
How to get the value of the edit box in Selenium?
We can get the value of the edit box in Selenium by the following ways − By using getText () method. By using getText () method. Using the class JavascriptExecutor. Using the class JavascriptExecutor. Code Implementation with method getText (). import org.openqa.selenium.By; import org.openqa.selenium.Keys; import org....
[ { "code": null, "e": 1135, "s": 1062, "text": "We can get the value of the edit box in Selenium by the following ways −" }, { "code": null, "e": 1163, "s": 1135, "text": "By using getText () method." }, { "code": null, "e": 1191, "s": 1163, "text": "By using g...
Python 3 - Tkinter Text
Text widgets provide advanced capabilities that allow you to edit a multiline text and format the way it has to be displayed, such as changing its color and font. You can also use elegant structures like tabs and marks to locate specific sections of the text, and apply changes to those areas. Moreover, you can embed wi...
[ { "code": null, "e": 2503, "s": 2340, "text": "Text widgets provide advanced capabilities that allow you to edit a multiline text and format the way it has to be displayed, such as changing its color and font." }, { "code": null, "e": 2763, "s": 2503, "text": "You can also use el...
C++ program to find first digit in factorial of a number
In this article, we will be discussing a program to find the first digit in the factorial of a given number. The basic approach for this is to find the factorial of the number and then get its first digit. But since factorials can end up being too large, we would make a small tweak. At every point we would check for an...
[ { "code": null, "e": 1171, "s": 1062, "text": "In this article, we will be discussing a program to find the first digit in the factorial of a given number." }, { "code": null, "e": 1346, "s": 1171, "text": "The basic approach for this is to find the factorial of the number and th...
How to Split a Pickled Model File to Bypass Upload Limits on PythonAnywhere | by Jacob Tadesse | Towards Data Science
In my last post, “Building a Convolutional Neural Network to Recognize Shaved vs UnShaved Faces”, I ended the article sharing the method I used to save my final trained model with Pickle. “Pickling” is the process whereby a Python object hierarchy is converted into a byte stream, and “unpickling” is the inverse operati...
[ { "code": null, "e": 360, "s": 172, "text": "In my last post, “Building a Convolutional Neural Network to Recognize Shaved vs UnShaved Faces”, I ended the article sharing the method I used to save my final trained model with Pickle." }, { "code": null, "e": 633, "s": 360, "text":...
Node.js console.clear() Method
13 Oct, 2021 The console.clear() method is used to clear the stdout, when stdout is a TTY (Teletype) i.e. terminal it will attempt to clear the TTY. When stdout is not a TTY, this method does nothing. The console.clear() will work differently across different operating systems and terminal types. For Linux operating sy...
[ { "code": null, "e": 28, "s": 0, "text": "\n13 Oct, 2021" }, { "code": null, "e": 216, "s": 28, "text": "The console.clear() method is used to clear the stdout, when stdout is a TTY (Teletype) i.e. terminal it will attempt to clear the TTY. When stdout is not a TTY, this method d...
Perl opendir Function
This function opens the directory EXPR, associating it with DIRHANDLE for processing, using the readdir function. Following is the simple syntax for this function − opendir DIRHANDLE, EXPR This function returns true if successful. Following is the example code showing its basic usage − #!/usr/bin/perl -w $dirname = "...
[ { "code": null, "e": 2468, "s": 2354, "text": "This function opens the directory EXPR, associating it with DIRHANDLE for processing, using the readdir function." }, { "code": null, "e": 2519, "s": 2468, "text": "Following is the simple syntax for this function −" }, { "co...
VLSI Design - Verilog Introduction
Verilog is a HARDWARE DESCRIPTION LANGUAGE (HDL). It is a language used for describing a digital system like a network switch or a microprocessor or a memory or a flip−flop. It means, by using a HDL we can describe any digital hardware at any level. Designs, which are described in HDL are independent of technology, ver...
[ { "code": null, "e": 2508, "s": 2073, "text": "Verilog is a HARDWARE DESCRIPTION LANGUAGE (HDL). It is a language used for describing a digital system like a network switch or a microprocessor or a memory or a flip−flop. It means, by using a HDL we can describe any digital hardware at any level. Des...
Scala List drop() method with example
13 Aug, 2019 The drop() method belongs to the value member of the class List. It is utilized to select all the elements except the first n elements of the list. Method Definition: def drop(n: Int): List[A] Where, n is the number of elements to be dropped from the stated sequence. Return Type: It returns all the element...
[ { "code": null, "e": 28, "s": 0, "text": "\n13 Aug, 2019" }, { "code": null, "e": 176, "s": 28, "text": "The drop() method belongs to the value member of the class List. It is utilized to select all the elements except the first n elements of the list." }, { "code": null,...
Python setattr() method - GeeksforGeeks
30 Sep, 2021 Python setattr() method is used to assign the object attribute its value. Apart from ways to assign values to class variables, through constructors and object functions, this method gives you an alternative way to assign value. Syntax : setattr(obj, var, val) Parameters : obj : Object whose which attribu...
[ { "code": null, "e": 25885, "s": 25857, "text": "\n30 Sep, 2021" }, { "code": null, "e": 25960, "s": 25885, "text": "Python setattr() method is used to assign the object attribute its value. " }, { "code": null, "e": 26114, "s": 25960, "text": "Apart from ways...