title
stringlengths
3
221
text
stringlengths
17
477k
parsed
listlengths
0
3.17k
Distribution of candies according to ages of students - GeeksforGeeks
09 Apr, 2021 Given two integer arrays ages and packs where ages store the ages of different students and an element of pack stores the number of candies that packet has (complete array represent the number of packets). The candies can be distributed among students such that: Every student must get only one pack of can...
[ { "code": null, "e": 26563, "s": 26535, "text": "\n09 Apr, 2021" }, { "code": null, "e": 26827, "s": 26563, "text": "Given two integer arrays ages and packs where ages store the ages of different students and an element of pack stores the number of candies that packet has (comple...
Lodash _.intersectionWith() Method - GeeksforGeeks
22 Jul, 2020 Lodash is a JavaScript library that works on the top of Underscore.js. Lodash helps in working with arrays, strings, objects, numbers etc.The _.intersectionwith() method is used to take the intersection of the one or more arrays. It is same as the intersection function in lodash only difference is that it ...
[ { "code": null, "e": 26545, "s": 26517, "text": "\n22 Jul, 2020" }, { "code": null, "e": 26921, "s": 26545, "text": "Lodash is a JavaScript library that works on the top of Underscore.js. Lodash helps in working with arrays, strings, objects, numbers etc.The _.intersectionwith() ...
How to Synchronize HashMap in Java? - GeeksforGeeks
28 Dec, 2020 HashMap is part of the Collection’s framework of java. It stores the data in the form of key-value pairs. These values of the HashMap can be accessed by using their respective keys. The key-value pairs can be accessed using their indexes (of Integer type). HashMap is similar to HashTable in java. The main...
[ { "code": null, "e": 25251, "s": 25223, "text": "\n28 Dec, 2020" }, { "code": null, "e": 25509, "s": 25251, "text": "HashMap is part of the Collection’s framework of java. It stores the data in the form of key-value pairs. These values of the HashMap can be accessed by using the...
Ruby | String inspect Method - GeeksforGeeks
09 Dec, 2019 inspect is a String class method in Ruby which is used to return a printable version of the given string, surrounded by quote marks, with special characters escaped. Syntax: str.inspect Parameters: Returns: Here, str is the given string. Example 1: # Ruby program to demonstrate # the inspect method ...
[ { "code": null, "e": 25014, "s": 24986, "text": "\n09 Dec, 2019" }, { "code": null, "e": 25180, "s": 25014, "text": "inspect is a String class method in Ruby which is used to return a printable version of the given string, surrounded by quote marks, with special characters escape...
Microsoft Azure - Count of Azure Resources using Resource Graph Query - GeeksforGeeks
16 Dec, 2021 Graph Query is Azure can be easier to understand if you are familiar with Querying languages like SQL. In this article, we will keep track of the Azure resources using the Resource Query graph. For this first open the Azure Resource Graph Explorer in Azure Portal to Run the following below Queries 1. To ...
[ { "code": null, "e": 27103, "s": 27075, "text": "\n16 Dec, 2021" }, { "code": null, "e": 27299, "s": 27103, "text": "Graph Query is Azure can be easier to understand if you are familiar with Querying languages like SQL. In this article, we will keep track of the Azure resources...
JavaScript Date getDay() Method - GeeksforGeeks
12 Oct, 2021 Below is the example of Date getDay() method. Example: javascript <script> // Here a date has been assigned // while creating Date object var A = new Date('October 15, 1996 05:35:32'); // Day of the week from above Date Object is // being extracted using getDay() var Day = A.getDay()...
[ { "code": null, "e": 26545, "s": 26517, "text": "\n12 Oct, 2021" }, { "code": null, "e": 26593, "s": 26545, "text": "Below is the example of Date getDay() method. " }, { "code": null, "e": 26604, "s": 26593, "text": "Example: " }, { "code": null, ...
Cards in React-Bootstrap - GeeksforGeeks
16 Feb, 2021 Introduction: React-Bootstrap is a front-end framework that was designed keeping react in mind. Bootstrap was re-built and revamped for React, hence it is known as React-Bootstrap. Cards are a type of section or containers which consists of information in a structured and organized way. Creating React App...
[ { "code": null, "e": 26169, "s": 26141, "text": "\n16 Feb, 2021" }, { "code": null, "e": 26458, "s": 26169, "text": "Introduction: React-Bootstrap is a front-end framework that was designed keeping react in mind. Bootstrap was re-built and revamped for React, hence it is known as...
PositiveIntegerField - Django Models - GeeksforGeeks
12 Feb, 2020 PositiveIntegerField is a integer number represented in Python by a int instance. This field is like a IntegerField but must be either positive or zero (0). The default form widget for this field is a NumberInput when localize is False or TextInput otherwise. It supports values from 0 to 2147483647 are saf...
[ { "code": null, "e": 25559, "s": 25531, "text": "\n12 Feb, 2020" }, { "code": null, "e": 26031, "s": 25559, "text": "PositiveIntegerField is a integer number represented in Python by a int instance. This field is like a IntegerField but must be either positive or zero (0). The de...
Getting Started With ImageIO Library in Python - GeeksforGeeks
20 Aug, 2020 Imageio is a Python library that provides an easy interface to read and write a wide range of image data, including animated images, volumetric data, and scientific formats. It is cross-platform. This module does not come built-in with Python. To install it type the below command in the terminal. pip insta...
[ { "code": null, "e": 25562, "s": 25534, "text": "\n20 Aug, 2020" }, { "code": null, "e": 25758, "s": 25562, "text": "Imageio is a Python library that provides an easy interface to read and write a wide range of image data, including animated images, volumetric data, and scientifi...
HTML | <input> Hidden attribute - GeeksforGeeks
28 Oct, 2020 The HTML input hidden attribute is used to define the visibility of Input field elements. It contains a boolean value. If this attribute is used then browsers will not display elements that have the hidden attribute specified. The hidden attribute can be seen using some condition or JavaScript used to see ...
[ { "code": null, "e": 26039, "s": 26011, "text": "\n28 Oct, 2020" }, { "code": null, "e": 26366, "s": 26039, "text": "The HTML input hidden attribute is used to define the visibility of Input field elements. It contains a boolean value. If this attribute is used then browsers will...
Program to find Sum of a Series a^1/1! + a^2/2! + a^3/3! + a^4/4! +.......+ a^n/n! - GeeksforGeeks
02 Nov, 2021 Given two values ‘a’ and ‘n’, find sum of series a^1/1! + a^2/2! + a^3/3! + a^4/4! +.......+ a^n/n!.Examples : Input : a = 2 and n = 5 Output : 6.26667 We get result by adding 2^1/1! + 2^2/2! + 2^3/3! + 2^4/4! + 2^5/5! = 2/1 + 4/2 + 8/6 + 16/24 + 32/120 = 6.26667 A simple solution is to one by one ...
[ { "code": null, "e": 26583, "s": 26555, "text": "\n02 Nov, 2021" }, { "code": null, "e": 26696, "s": 26583, "text": "Given two values ‘a’ and ‘n’, find sum of series a^1/1! + a^2/2! + a^3/3! + a^4/4! +.......+ a^n/n!.Examples : " }, { "code": null, "e": 26853, "s...
GUI chat application using Tkinter in Python - GeeksforGeeks
01 Oct, 2021 Prerequisites: Tkinter, Socket Programming, and Multithreading This is a simple GUI (Graphical User Interface) chat application where multiple users can connect with each other in a client-server architecture i.e the clients will interact with the help of the server. Server Side Script: This script file n...
[ { "code": null, "e": 26067, "s": 26039, "text": "\n01 Oct, 2021" }, { "code": null, "e": 26130, "s": 26067, "text": "Prerequisites: Tkinter, Socket Programming, and Multithreading" }, { "code": null, "e": 26335, "s": 26130, "text": "This is a simple GUI (Graph...
Saving Metadata with DataFrames. Saving metadata with DataFrames using... | by Darren Smith | Towards Data Science
Metadata is important — okay, perhaps not exactly a life & death issue for most Python data engineers, but its power and utility should not be overlooked. It enriches data with essential context, such as when, where and how it was created. Collection and storage of metadata should be considered a key feature to include...
[ { "code": null, "e": 526, "s": 172, "text": "Metadata is important — okay, perhaps not exactly a life & death issue for most Python data engineers, but its power and utility should not be overlooked. It enriches data with essential context, such as when, where and how it was created. Collection and ...
C# int.Parse Method
Convert a string representation of number to an integer, using the int.Parse method in C#. If the string cannot be converted, then the int.Parse method returns an exception Let’s say you have a string representation of a number. string myStr = "200"; Now to convert it to an integer, use the int.Parse(). It will get con...
[ { "code": null, "e": 1235, "s": 1062, "text": "Convert a string representation of number to an integer, using the int.Parse method in C#. If the string cannot be converted, then the int.Parse method returns an exception" }, { "code": null, "e": 1291, "s": 1235, "text": "Let’s say...
How to change notification background colour in Android?
This example demonstrate about How can I marquee the text content in Android Notification. 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 = "...
[ { "code": null, "e": 1153, "s": 1062, "text": "This example demonstrate about How can I marquee the text content in Android Notification." }, { "code": null, "e": 1282, "s": 1153, "text": "Step 1 − Create a new project in Android Studio, go to File ⇒ New Project and fill all requ...
Using BigInt to calculate long factorials in JavaScript
We are required to write a JavaScript function that takes in a number as the only input. The function should calculate the factorial of big numbers (greater than 10) whose factorial can be accommodated in the simple let or type variables using the new bigInt variable of JavaScript. Lastly the function should convert th...
[ { "code": null, "e": 1429, "s": 1062, "text": "We are required to write a JavaScript function that takes in a number as the only input. The function should calculate the factorial of big numbers (greater than 10) whose factorial can be accommodated in the simple let or type variables using the new b...
Understanding Feature extraction using Correlation Matrix and Scatter Plots | by Tarun Acharya | Towards Data Science
This article is going to deal with a very fundamental and important concept when dealing with a large number of features in a given dataset. Any typical machine learning or deep learning model is made to provide a single output from huge amounts of data be it structured or unstructured. These factors may contribute to ...
[ { "code": null, "e": 313, "s": 172, "text": "This article is going to deal with a very fundamental and important concept when dealing with a large number of features in a given dataset." }, { "code": null, "e": 695, "s": 313, "text": "Any typical machine learning or deep learning...
How to check whether a JavaScript date is valid?
To check whether a JavaScript date is valid or not, you can try to run the following code − Live Demo <!DOCTYPE html> <html> <body> <script> var date1, date2; date1 = new Date("2018/1/1"); if( ! isNaN ( date1.getMonth() )) { document.write("Valid date1: "+date1); ...
[ { "code": null, "e": 1154, "s": 1062, "text": "To check whether a JavaScript date is valid or not, you can try to run the following code −" }, { "code": null, "e": 1164, "s": 1154, "text": "Live Demo" }, { "code": null, "e": 1714, "s": 1164, "text": "<!DOCTYPE...
VBA - Strings
Strings are a sequence of characters, which can consist of either alphabets, numbers, special characters, or all of them. A variable is said to be a string if it is enclosed within double quotes " ". variablename = "string" str1 = "string" ' Only Alphabets str2 = "132.45" ' Only Numbers str3 = "!@#$;*" ' Only Spe...
[ { "code": null, "e": 2135, "s": 1935, "text": "Strings are a sequence of characters, which can consist of either alphabets, numbers, special characters, or all of them. A variable is said to be a string if it is enclosed within double quotes \" \"." }, { "code": null, "e": 2160, "s":...
Spring Boot SOAP Consumer Example | Spring Boot SOAP Client
PROGRAMMINGJava ExamplesC Examples Java Examples C Examples C Tutorials aws JAVAEXCEPTIONSCOLLECTIONSSWINGJDBC EXCEPTIONS COLLECTIONS SWING JDBC JAVA 8 SPRING SPRING BOOT HIBERNATE PYTHON PHP JQUERY PROGRAMMINGJava ExamplesC Examples Java Examples C Examples C Tutorials aws In this tutorial, we are going to see how to ...
[ { "code": null, "e": 158, "s": 123, "text": "PROGRAMMINGJava ExamplesC Examples" }, { "code": null, "e": 172, "s": 158, "text": "Java Examples" }, { "code": null, "e": 183, "s": 172, "text": "C Examples" }, { "code": null, "e": 195, "s": 183, ...
Java - toString() Method
This method returns a String object representing the specified character value, that is, a one-character string. String toString(char ch) Here is the detail of parameters − ch − Primitive character type. ch − Primitive character type. This method returns String object. public class Test { public static void main(S...
[ { "code": null, "e": 2490, "s": 2377, "text": "This method returns a String object representing the specified character value, that is, a one-character string." }, { "code": null, "e": 2516, "s": 2490, "text": "String toString(char ch)\n" }, { "code": null, "e": 2551,...
Find the element that appears once in sorted array | Practice | GeeksforGeeks
Given a sorted array arr[] of size N. Find the element that appears only once in the array. All other elements appear exactly twice. Example 1: Input: N = 11 arr[] = {1, 1, 2, 2, 3, 3, 4, 50, 50, 65, 65} Output: 4 Explanation: 4 is the only element that appears exactly once. Your Task: You don't need to read inpu...
[ { "code": null, "e": 372, "s": 238, "text": "Given a sorted array arr[] of size N. Find the element that appears only once in the array. All other elements appear exactly twice. " }, { "code": null, "e": 383, "s": 372, "text": "Example 1:" }, { "code": null, "e": 516,...
Scatter Plots with Plotly Express | by Darío Weitz | Towards Data Science
You could say that it was a dream team of data science: a physics Ph.D. from Harvard, a Silicon Valley analyst in energy, a member of Facebook, and a guy who worked in a research startup, also in the Valley. Together, Alex Johnson, Jack Parmer, Matthew Sundquist, and Chris Parmer, founded Plotly, a technical computing ...
[ { "code": null, "e": 521, "s": 172, "text": "You could say that it was a dream team of data science: a physics Ph.D. from Harvard, a Silicon Valley analyst in energy, a member of Facebook, and a guy who worked in a research startup, also in the Valley. Together, Alex Johnson, Jack Parmer, Matthew Su...
Tryit Editor v3.7
Tryit: HTML fonts
[]
How to find the 95% confidence interval for the glm model in R?
To find the confidence interval for a lm model (linear regression model), we can use confint function and there is no need to pass the confidence level because the default is 95%. This can be also used for a glm model (general linear model). Check out the below examples to see the output of confint for a glm model. Liv...
[ { "code": null, "e": 1379, "s": 1062, "text": "To find the confidence interval for a lm model (linear regression model), we can use confint function and there is no need to pass the confidence level because the default is 95%. This can be also used for a glm model (general linear model). Check out t...
Computer Networks | Set 13 - GeeksforGeeks
25 Feb, 2019 These questions for practice purpose for GATE CS Exam. Ques-1: How many bits are allocated for network id (NID) and host id(HID) in the IP address 25.193.155.233? (A) 24 bit for NID, 8 bits for HID(B) 8 bit for NID, 24 bits for HID(C) 16 bit for NID, 16 bits for HID(D) none Explanation:It is class A IP add...
[ { "code": null, "e": 23477, "s": 23449, "text": "\n25 Feb, 2019" }, { "code": null, "e": 23532, "s": 23477, "text": "These questions for practice purpose for GATE CS Exam." }, { "code": null, "e": 23640, "s": 23532, "text": "Ques-1: How many bits are allocated...
Generating any custom JSON in ABAP
You can use class ZCL_MDP_JSON Library that can encode/parse any JSON. JSON is supported natively in ABAP by the following features: With the use of JSON-XML- it is known as special XML format that can be used for JSON data to be described using an XML representation. By defining a mapping between ABAP types and JSON....
[ { "code": null, "e": 1195, "s": 1062, "text": "You can use class ZCL_MDP_JSON Library that can encode/parse any JSON. JSON is supported natively in ABAP by the following features:" }, { "code": null, "e": 1332, "s": 1195, "text": "With the use of JSON-XML- it is known as special ...
rand package in Golang - GeeksforGeeks
08 Jun, 2020 Go language provides inbuilt support for generating random numbers of the specified type with the help of a math/rand package. This package implements pseudo-random number generators. These random numbers are generated by a source and this source produces a deterministic sequence of values every time when ...
[ { "code": null, "e": 24069, "s": 24041, "text": "\n08 Jun, 2020" }, { "code": null, "e": 24490, "s": 24069, "text": "Go language provides inbuilt support for generating random numbers of the specified type with the help of a math/rand package. This package implements pseudo-rando...
Python program to sort a list of tuples alphabetically
When it is required to sort a list of tuples in alphabetical order, the 'sort' method can be used. When using this, the contents of the original tuple get changed, since in-place sorting is performed. The 'sort' function sorts the values in ascending order by default. If the order of sorting is specified as descending,...
[ { "code": null, "e": 1263, "s": 1062, "text": "When it is required to sort a list of tuples in alphabetical order, the 'sort' method can be used. When using this, the contents of the original tuple get changed, since in-place sorting is performed." }, { "code": null, "e": 1417, "s": ...
PySpark Sentiment Analysis on Google Dataproc | by Ricky Kim | Towards Data Science
I recently had a chance to play around with Google Cloud Platform through a specialization course on Coursera; Data Engineering on Google Cloud Platform Specialization. Overall I learned a lot through the courses, and it was such a good opportunity to try various services of Google Cloud Platform(GCP) for free while go...
[ { "code": null, "e": 671, "s": 172, "text": "I recently had a chance to play around with Google Cloud Platform through a specialization course on Coursera; Data Engineering on Google Cloud Platform Specialization. Overall I learned a lot through the courses, and it was such a good opportunity to try...
Tryit Editor v3.7
Tryit: box-shadow with color
[]
How to change an HTML element name using jQuery ? - GeeksforGeeks
07 Jul, 2021 Given an HTML document and the task is to replace an HTML element by another element. For example: we can change an element <b> with <h1> element without changing any other property.Approach: Select the HTML element which need to be change. Copy all attributes of previous element in an object. Replace th...
[ { "code": null, "e": 25300, "s": 25272, "text": "\n07 Jul, 2021" }, { "code": null, "e": 25494, "s": 25300, "text": "Given an HTML document and the task is to replace an HTML element by another element. For example: we can change an element <b> with <h1> element without changing ...
ASP.NET Core - Exceptions
In this chapter, we will discuss exceptions and error handling. When errors occur in your ASP.NET Core app, you can handle them in a variety of ways. Let us see an additional piece of middleware that is available through the diagnostics package. This piece of middleware will help us process errors. To simulate an error...
[ { "code": null, "e": 2761, "s": 2461, "text": "In this chapter, we will discuss exceptions and error handling. When errors occur in your ASP.NET Core app, you can handle them in a variety of ways. Let us see an additional piece of middleware that is available through the diagnostics package. This pi...
Check if the Matrix satisfies the given conditions - GeeksforGeeks
28 May, 2021 Given a matrix mat[][], the task is to check whether the matrix is valid or not. A valid matrix is the matrix that satisfies the given conditions: For every row, it must contain a single distinct character.No two consecutive rows have a character in common. For every row, it must contain a single distinct...
[ { "code": null, "e": 24528, "s": 24500, "text": "\n28 May, 2021" }, { "code": null, "e": 24676, "s": 24528, "text": "Given a matrix mat[][], the task is to check whether the matrix is valid or not. A valid matrix is the matrix that satisfies the given conditions: " }, { "...
CICS - Temporary Storage
There are different scratch pads which are available in CICS for saving data or to transfer the data between transactions. There are five storage areas which are provided by CICS, which we will be discussing in this module. The COMMAREA behaves like a scratch pad that can be used to pass data from one program to anothe...
[ { "code": null, "e": 2150, "s": 1926, "text": "There are different scratch pads which are available in CICS for saving data or to transfer the data between transactions. There are five storage areas which are provided by CICS, which we will be discussing in this module." }, { "code": null, ...
Copy Files from Docker Container to Local Machine
If you are working on a project that requires frequent copying of files and folders either from container to your local machine or from the local machine to the container, docker provides an easy and simple way to do that. If you have already built a docker image which is of large size and contains a large number of fi...
[ { "code": null, "e": 1635, "s": 1062, "text": "If you are working on a project that requires frequent copying of files and folders either from container to your local machine or from the local machine to the container, docker provides an easy and simple way to do that. If you have already built a do...
base64.b64encode() in Python
26 Mar, 2020 With the help of base64.b64encode() method, we can encode the string into the binary form. Syntax : base64.b64encode(string) Return : Return the encoded string. Example #1 :In this example we can see that by using base64.b64encode() method, we are able to get the encoded string which can be in binary form ...
[ { "code": null, "e": 28, "s": 0, "text": "\n26 Mar, 2020" }, { "code": null, "e": 119, "s": 28, "text": "With the help of base64.b64encode() method, we can encode the string into the binary form." }, { "code": null, "e": 153, "s": 119, "text": "Syntax : base64...
Creating a Vertical Stepper in React
20 Sep, 2021 Steppers display progress through a sequence of logical and numbered steps. They may also be used for navigation. Steppers may display a transient feedback message after a step is saved. In this article we will learn , how to create a vertical stepper using react and material-ui. Creating React-app Step 1:...
[ { "code": null, "e": 28, "s": 0, "text": "\n20 Sep, 2021" }, { "code": null, "e": 215, "s": 28, "text": "Steppers display progress through a sequence of logical and numbered steps. They may also be used for navigation. Steppers may display a transient feedback message after a ste...
Array algorithms in C++ STL (all_of, any_of, none_of, copy_n and iota)
19 Apr, 2018 From C++11 onwards, some new and interesting algorithms are added in STL of C++. These algorithms operate on an array and are useful in saving time during coding and hence useful in competitive programming as well. all_of() This function operates on whole range of array elements and can save time to run a ...
[ { "code": null, "e": 52, "s": 24, "text": "\n19 Apr, 2018" }, { "code": null, "e": 267, "s": 52, "text": "From C++11 onwards, some new and interesting algorithms are added in STL of C++. These algorithms operate on an array and are useful in saving time during coding and hence us...
HTML Elements
30 May, 2022 In this article, we will know the HTML Elements, along with understanding the various available elements & their syntax through the examples. An HTML element is the collection of start and end tags with the content inserted in between them. Syntax: <tagname > Contents... </tagname> Supported Tags: HTML El...
[ { "code": null, "e": 53, "s": 25, "text": "\n30 May, 2022" }, { "code": null, "e": 294, "s": 53, "text": "In this article, we will know the HTML Elements, along with understanding the various available elements & their syntax through the examples. An HTML element is the collectio...
CLAHE Histogram Equalization – OpenCV
09 Nov, 2021 In this tutorial, we are going to see how to apply Contrast Limited Adaptive Histogram Equalization (CLAHE) to equalize images. CLAHE is a variant of Adaptive histogram equalization (AHE) which takes care of over-amplification of the contrast. CLAHE operates on small regions in the image, called tiles, rat...
[ { "code": null, "e": 54, "s": 26, "text": "\n09 Nov, 2021" }, { "code": null, "e": 559, "s": 54, "text": "In this tutorial, we are going to see how to apply Contrast Limited Adaptive Histogram Equalization (CLAHE) to equalize images. CLAHE is a variant of Adaptive histogram equal...
Placement new operator in C++
In this section we will see what is the placement new operator in C++. This placement new is another variation of new operator. The normal new operator performs two things. It allocates memory, and then constructs an object in allocated memory. The new operator allocates memory in the heap section and constructs object...
[ { "code": null, "e": 1432, "s": 1187, "text": "In this section we will see what is the placement new operator in C++. This placement new is another variation of new operator. The normal new operator performs two things. It allocates memory, and then constructs an object in allocated memory." }, ...
How to call loading function with React useEffect?
05 Jan, 2021 The useEffect runs by default after every render of the component. When placing useEffect in our component we tell React that we want to run the callback as an effect. React will run the effect after rendering and after performing the DOM updates. If we pass only a callback, the callback will run after ea...
[ { "code": null, "e": 28, "s": 0, "text": "\n05 Jan, 2021" }, { "code": null, "e": 277, "s": 28, "text": "The useEffect runs by default after every render of the component. When placing useEffect in our component we tell React that we want to run the callback as an effect. React w...
How to display warning before leaving the web page with unsaved changes using JavaScript ?
23 Nov, 2020 The onbeforeunload event handler is used for processing beforeunload events. This event is fired whenever a window is about to unload its resources. The result of this event depends on the user selection to proceed or cancel the action. This event can be used to check whether the user has left a form incom...
[ { "code": null, "e": 28, "s": 0, "text": "\n23 Nov, 2020" }, { "code": null, "e": 381, "s": 28, "text": "The onbeforeunload event handler is used for processing beforeunload events. This event is fired whenever a window is about to unload its resources. The result of this event d...
Python | sympy.Matrix().row_insert()
25 Jun, 2019 With the help of Matrix().row_insert() method, we can insert a row in a matrix having dimension nxm, where dimension of inserted row is 1xm. Syntax : Matrix().row_insert()Return : Return a new matrix. Example #1 :In this example, we are able to insert a row in a matrix by using Matrix().row_insert() method...
[ { "code": null, "e": 28, "s": 0, "text": "\n25 Jun, 2019" }, { "code": null, "e": 169, "s": 28, "text": "With the help of Matrix().row_insert() method, we can insert a row in a matrix having dimension nxm, where dimension of inserted row is 1xm." }, { "code": null, "e...
How to add a new element to HTML DOM in JavaScript?
To add a new element to the HTML DOM, we have to create it first and then we need to append it to the existing element. 1) First, create a div section and add some text to it using <p> tags. 2) Create an element <p> using document.createElement("p"). 3) Create a text, using document.createTextNode(), so as to insert i...
[ { "code": null, "e": 1307, "s": 1187, "text": "To add a new element to the HTML DOM, we have to create it first and then we need to append it to the existing element." }, { "code": null, "e": 1379, "s": 1307, "text": "1) First, create a div section and add some text to it using <...
Python | Create Test DataSets using Sklearn
11 Feb, 2022 Python’s Sklearn library provides a great sample dataset generator which will help you to create your own custom dataset. It’s fast and very easy to use. Following are the types of samples it provides.For all the above methods you need to import sklearn.datasets.samples_generator. Python3 # importing lib...
[ { "code": null, "e": 54, "s": 26, "text": "\n11 Feb, 2022" }, { "code": null, "e": 338, "s": 54, "text": "Python’s Sklearn library provides a great sample dataset generator which will help you to create your own custom dataset. It’s fast and very easy to use. Following are the ty...
Changing Class Members in Python
14 Dec, 2021 In the previous fact, we have seen that Python doesn’t have the static keyword. All variables that are assigned a value in the class declaration are class variables. We should be careful when changing the value of a class variable. If we try to change a class variable using an object, a new instance (or no...
[ { "code": null, "e": 52, "s": 24, "text": "\n14 Dec, 2021" }, { "code": null, "e": 218, "s": 52, "text": "In the previous fact, we have seen that Python doesn’t have the static keyword. All variables that are assigned a value in the class declaration are class variables." }, ...
Minimum and Maximum prime numbers in an array
21 May, 2021 Given an array arr[] of N positive integers. The task is to find the minimum and maximum prime elements in the given array. Examples: Input: arr[] = 1, 3, 4, 5, 7 Output: Minimum : 3 Maximum : 7 Input: arr[] = 1, 2, 3, 4, 5, 6, 7, 11 Output: Minimum : 2 Maximum : 11 Naive Approach: Tak...
[ { "code": null, "e": 53, "s": 25, "text": "\n21 May, 2021" }, { "code": null, "e": 189, "s": 53, "text": "Given an array arr[] of N positive integers. The task is to find the minimum and maximum prime elements in the given array. Examples: " }, { "code": null, "e": 3...
Tryit Editor v3.7
HTML Web Storage Tryit: HTML local storage
[ { "code": null, "e": 27, "s": 10, "text": "HTML Web Storage" } ]
How to check if a "lateInit" variable has been initialized in Kotlin?
Any variable which is initialized after its declaration is known as a "late initialized variable". In conventional programming languages, any non-NULL type of variable need to be initialized in the constructor. But sometimes, by mistake, developers forget to do these NULL checks which causes a programming error. In ord...
[ { "code": null, "e": 1581, "s": 1062, "text": "Any variable which is initialized after its declaration is known as a \"late\ninitialized variable\". In conventional programming languages, any non-NULL\ntype of variable need to be initialized in the constructor. But sometimes, by\nmistake, developers...
Flex - RadioButton Control
The RadioButton control allows the user make a single choice within a set of mutually exclusive choices. Following is the declaration for spark.components.RadioButton class − public class RadioButton extends ToggleButtonBase implements IFocusManagerGroup enabled : Boolean [override] The RadioButton component ...
[ { "code": null, "e": 2152, "s": 2047, "text": "The RadioButton control allows the user make a single choice within a set of mutually exclusive choices." }, { "code": null, "e": 2222, "s": 2152, "text": "Following is the declaration for spark.components.RadioButton class −" }, ...
The Best Exploratory Data Analysis with Pandas Profiling | by Matt Przybyla | Towards Data Science
IntroductionOverviewVariablesInteractionsCorrelationsMissing ValuesSampleSummaryReferences Introduction Overview Variables Interactions Correlations Missing Values Sample Summary References There are countless ways to perform exploratory data analysis (EDA) in Python (and in R). I do most of mine in the popular Jupyter...
[ { "code": null, "e": 262, "s": 171, "text": "IntroductionOverviewVariablesInteractionsCorrelationsMissing ValuesSampleSummaryReferences" }, { "code": null, "e": 275, "s": 262, "text": "Introduction" }, { "code": null, "e": 284, "s": 275, "text": "Overview" }...
Google Guice - First Application
Let's create a sample console based application where we'll demonstrate dependency injection using Guice binding mechanism step by step. //spell checker interface interface SpellChecker { public void checkSpelling(); } //spell checker implementation class SpellCheckerImpl implements SpellChecker { @Override pu...
[ { "code": null, "e": 2239, "s": 2102, "text": "Let's create a sample console based application where we'll demonstrate dependency injection using Guice binding mechanism step by step." }, { "code": null, "e": 2324, "s": 2239, "text": "//spell checker interface\ninterface SpellChe...
Can we have multiple type parameters in generic methods in Java?
Generics is a concept in Java where you can enable a class, interface and, method, accept all (reference) types as parameters. In other words it is the concept which enables the users to choose the reference type that a method, constructor of a class accepts, dynamically. By defining a class as generic you are making i...
[ { "code": null, "e": 1430, "s": 1062, "text": "Generics is a concept in Java where you can enable a class, interface and, method, accept all (reference) types as parameters. In other words it is the concept which enables the users to choose the reference type that a method, constructor of a class ac...
SVN - Environment Setup
Subversion is a popular open-source version control tool. It is open-source and available for free over the internet. It comes by default with most of the GNU/Linux distributions, so it might be already installed on your system. To check whether it is installed or not use following command. [jerry@CentOS ~]$ svn --vers...
[ { "code": null, "e": 2068, "s": 1776, "text": "Subversion is a popular open-source version control tool. It is open-source and available for free over the internet. It comes by default with most of the GNU/Linux distributions, so it might be already installed on your system. To check whether it is i...
Contrast Enhancement of Grayscale Images Using Morphological Operators | by Shivanee Jaiswal | Towards Data Science
Contrast Enhancement is a very common image processing technique for enhancing features in low contrast images. Several methods like Contrast Stretching, Histogram Equalization, Adaptive Histogram Equalization, Contrast-Limited Adaptive Histogram Equalization or CLAHE, etc. have been used for enhancing the contrast of ...
[ { "code": null, "e": 639, "s": 166, "text": "Contrast Enhancement is a very common image processing technique for enhancing features in low contrast images. Several methods like Contrast Stretching, Histogram Equalization, Adaptive Histogram Equalization, Contrast-Limited Adaptive Histogram Equaliza...
How to add a title to an existing line border in Java?
Here, we will see how to add a title to an existing Line border. Let’s say we have a label and the border is to be set − LineBorder linedBorder = new LineBorder(Color.blue); TitledBorder titledBorder = BorderFactory.createTitledBorder(linedBorder, "Demo Title"); JLabel label = new JLabel(); label.setBorder(titledBorder...
[ { "code": null, "e": 1183, "s": 1062, "text": "Here, we will see how to add a title to an existing Line border. Let’s say we have a label and the border is to be set −" }, { "code": null, "e": 1385, "s": 1183, "text": "LineBorder linedBorder = new LineBorder(Color.blue);\nTitledB...
How to standardize matrix elements in R?
The standardization is the process of converting a value to another value so that the mean of the set of values from which the original value was taken becomes zero and the standard deviation becomes one. To standardize matrix elements, we can use data.Normalization function of clusterSim package but we need to make su...
[ { "code": null, "e": 1506, "s": 1062, "text": "The standardization is the process of converting a value to another value so that the mean of the set of values from which the original value was taken becomes zero and the standard deviation becomes one. To standardize matrix elements, we can use data....
CSS Overflow
The CSS overflow property controls what happens to content that is too big to fit into an area. The overflow property specifies whether to clip the content or to add scrollbars when the content of an element is too big to fit in the specified area. The overflow property has the following values: visible - Default. ...
[ { "code": null, "e": 97, "s": 0, "text": "The CSS overflow property controls what \nhappens to content that is too big to fit into an area." }, { "code": null, "e": 253, "s": 97, "text": "The overflow property specifies whether to clip \nthe content or \nto add scrollbars when th...
How to Solve the Real Big Data Problems - Load Huge Excel Files | by Shravankumar Suvarna | Towards Data Science
More and more companies have started to realize the importance of data. Hence, they come with requests to load huge CSV or Excel files from their legacy systems or manual processes to a database for data-driven analytics. I know, we now have a lot of solutions to solve this problem like pandas, dask, vaex python librar...
[ { "code": null, "e": 526, "s": 171, "text": "More and more companies have started to realize the importance of data. Hence, they come with requests to load huge CSV or Excel files from their legacy systems or manual processes to a database for data-driven analytics. I know, we now have a lot of solu...
Java BeanUtils - BeanUtils and ConvertUtils
The BeanUtils is defined as a utility method for populating JavaBeans properties and ConvertUtils method converts string scalar values to objects, string arrays to arrays of the specified class. The BeanUtils accepts string values by using the setter methods and automatically converts them to suitable property types fo...
[ { "code": null, "e": 2351, "s": 2156, "text": "The BeanUtils is defined as a utility method for populating JavaBeans properties and ConvertUtils method converts string scalar values to objects, string arrays to arrays of the specified class." }, { "code": null, "e": 2707, "s": 2351, ...
C | Pointer Basics | Question 6 - GeeksforGeeks
04 Feb, 2013 #include<stdio.h>int main(){ int arr[] = {10, 20, 30, 40, 50, 60}; int *ptr1 = arr; int *ptr2 = arr + 5; printf("Number of elements between two pointer are: %d.", (ptr2 - ptr1)); printf("Number of bytes between two pointers are: %d", ...
[ { "code": null, "e": 23979, "s": 23951, "text": "\n04 Feb, 2013" }, { "code": "#include<stdio.h>int main(){ int arr[] = {10, 20, 30, 40, 50, 60}; int *ptr1 = arr; int *ptr2 = arr + 5; printf(\"Number of elements between two pointer are: %d.\", (ptr...
time.Weekday() Function in Golang With Examples - GeeksforGeeks
21 Apr, 2020 In Go language, time packages supplies functionality for determining as well as viewing time. The Weekday() function in Go language is used to check the English name of the day. Moreover, this function is defined under the time package. Here, you need to import “time” package in order to use these function...
[ { "code": null, "e": 24063, "s": 24035, "text": "\n21 Apr, 2020" }, { "code": null, "e": 24373, "s": 24063, "text": "In Go language, time packages supplies functionality for determining as well as viewing time. The Weekday() function in Go language is used to check the English na...
Comparing dates in Python
Comparing dates and times is a very crucial requirement in any programming language. Python has a datetime library which has many inbuilt functions to use date and time. Interestingly date and time can also be compared like mathematical comparison between various numbers. In the below example we have chosen to dates by...
[ { "code": null, "e": 1335, "s": 1062, "text": "Comparing dates and times is a very crucial requirement in any programming language. Python has a datetime library which has many inbuilt functions to use date and time. Interestingly date and time can also be compared like mathematical comparison betwe...
jQuery Traversing Siblings
With jQuery you can traverse sideways in the DOM tree to find siblings of an element. Siblings share the same parent. There are many useful jQuery methods for traversing sideways in the DOM tree: siblings() next() nextAll() nextUntil() prev() prevAll() prevUntil() The siblings() method returns all sibling elements of...
[ { "code": null, "e": 87, "s": 0, "text": "With jQuery you can traverse sideways in the DOM \ntree to find siblings of an element." }, { "code": null, "e": 120, "s": 87, "text": "Siblings share the same parent. " }, { "code": null, "e": 198, "s": 120, "text": "...
Phone Number Verification using Firebase in Android
19 Sep, 2021 Phone number Firebase Authentication is used to sign in a user by sending an SMS message to the user’s phone. The user signs in using a one-time code contained in the SMS message. A sample video is given below to get an idea about what we are going to do in this article. Note that we are going to implement...
[ { "code": null, "e": 52, "s": 24, "text": "\n19 Sep, 2021" }, { "code": null, "e": 400, "s": 52, "text": "Phone number Firebase Authentication is used to sign in a user by sending an SMS message to the user’s phone. The user signs in using a one-time code contained in the SMS mes...
How to Display Random ASCII Art on Linux Terminal?
09 Apr, 2021 Here we are going to see how to print the drawing on the terminal in the form of ASCII characters.ASCII-Art-Splash-Screen is a tool written in python that pulls a random drawing from a repository and shows it every time you open the terminal. This work on UNIX-based systems like Linux and macOS. Now let’s...
[ { "code": null, "e": 28, "s": 0, "text": "\n09 Apr, 2021" }, { "code": null, "e": 326, "s": 28, "text": "Here we are going to see how to print the drawing on the terminal in the form of ASCII characters.ASCII-Art-Splash-Screen is a tool written in python that pulls a random drawi...
PostgreSQL – Create Database
28 Aug, 2020 PostgreSQL has multiple ways to create a database. In this article we will discuss multiple ways to do so. 1. Using psql Shell: To create a database through the psql shell we make the use of the CREATE DATABASE statement as below: CREATE DATABASE db_name OWNER = role_name TEMPLATE = template ENCODING =...
[ { "code": null, "e": 28, "s": 0, "text": "\n28 Aug, 2020" }, { "code": null, "e": 135, "s": 28, "text": "PostgreSQL has multiple ways to create a database. In this article we will discuss multiple ways to do so." }, { "code": null, "e": 156, "s": 135, "text": ...
Sort a stack using a temporary stack
13 Jul, 2022 Given a stack of integers, sort it in ascending order using another temporary stack. Examples: Input : [34, 3, 31, 98, 92, 23] Output : [3, 23, 31, 34, 92, 98] Input : [3, 5, 1, 4, 2, 8] Output : [1, 2, 3, 4, 5, 8] Algorithm: Create a temporary stack say tmpStack.While input stack is NOT empty do this: ...
[ { "code": null, "e": 54, "s": 26, "text": "\n13 Jul, 2022" }, { "code": null, "e": 139, "s": 54, "text": "Given a stack of integers, sort it in ascending order using another temporary stack." }, { "code": null, "e": 150, "s": 139, "text": "Examples: " }, {...
Program to find the count of coins of each type from the given ratio
14 Apr, 2021 Given the total number of Rupees in a bag and the ratio of coins. The bag contains only 1 Rs, 50 paise, 25 paise coins in X, Y, Z, ratio. The task is to determine the number of 1 Rs coins, 50 Paise coins, and 25 paise coins So that after summation of all these we again get the total rupees given.Examples: ...
[ { "code": null, "e": 28, "s": 0, "text": "\n14 Apr, 2021" }, { "code": null, "e": 337, "s": 28, "text": "Given the total number of Rupees in a bag and the ratio of coins. The bag contains only 1 Rs, 50 paise, 25 paise coins in X, Y, Z, ratio. The task is to determine the number o...
Vector elements() Method in Java
17 Aug, 2018 The java.util.vector.elements() method of Vector class in Java is used to get the enumeration of the values present in the Vector. Syntax: Enumeration enu = Vector.elements() Parameters: The method does not take any parameters. Return value: The method returns an enumeration of the values of the Vector. Be...
[ { "code": null, "e": 53, "s": 25, "text": "\n17 Aug, 2018" }, { "code": null, "e": 184, "s": 53, "text": "The java.util.vector.elements() method of Vector class in Java is used to get the enumeration of the values present in the Vector." }, { "code": null, "e": 192, ...
Maximum sum of hour glass in matrix
13 Jun, 2022 Given a 2D matrix, the task is to find the maximum sum of an hourglass. An hour glass is made of 7 cells in following form. A B C D E F G Examples: Input : 1 1 1 0 0 0 1 0 0 0 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 Output : 7 Below is the hour glass with maximum s...
[ { "code": null, "e": 52, "s": 24, "text": "\n13 Jun, 2022" }, { "code": null, "e": 124, "s": 52, "text": "Given a 2D matrix, the task is to find the maximum sum of an hourglass." }, { "code": null, "e": 204, "s": 124, "text": "An hour glass is made of 7 cells\...
What are the types of Popup box available in JavaScript ?
13 Jun, 2022 In Javascript, popup boxes are used to display the message or notification to the user. There are three types of pop-up boxes in JavaScript namely Alert Box, Confirm Box and Prompt Box. Alert Box: It is used when a warning message is needed to be produced. When the alert box is displayed to the user, the u...
[ { "code": null, "e": 52, "s": 24, "text": "\n13 Jun, 2022" }, { "code": null, "e": 238, "s": 52, "text": "In Javascript, popup boxes are used to display the message or notification to the user. There are three types of pop-up boxes in JavaScript namely Alert Box, Confirm Box and ...
Cross Origin Resource Sharing (CORS)
07 Nov, 2018 CORS (Cross-Origin Resource Sharing) is a mechanism by which data or any other resource of a site could be shared intentionally to a third party website when there is a need. Generally, access to resources that are residing in a third party site is restricted by the browser clients for security purposes. C...
[ { "code": null, "e": 54, "s": 26, "text": "\n07 Nov, 2018" }, { "code": null, "e": 360, "s": 54, "text": "CORS (Cross-Origin Resource Sharing) is a mechanism by which data or any other resource of a site could be shared intentionally to a third party website when there is a need....
How to allow access outside localhost in AngularJS ?
05 Jun, 2020 Firstly, let us discuss how we can build an Angular application, run it, and preview it in the browser. We can easily do using the CLI, provided by Angular. The CLI is a Command-line interface tool by using which, the developers face fewer challenges to initialize an application, develop it, scaffold, and ...
[ { "code": null, "e": 54, "s": 26, "text": "\n05 Jun, 2020" }, { "code": null, "e": 560, "s": 54, "text": "Firstly, let us discuss how we can build an Angular application, run it, and preview it in the browser. We can easily do using the CLI, provided by Angular. The CLI is a Comm...
Self Referential Structures
03 Nov, 2021 Self Referential structures are those structures that have one or more pointers which point to the same type of structure, as their member. In other words, structures pointing to the same type of structures are self-referential in nature.Example: CPP Python3 struct node { int data1; char data2; ...
[ { "code": null, "e": 54, "s": 26, "text": "\n03 Nov, 2021" }, { "code": null, "e": 195, "s": 54, "text": "Self Referential structures are those structures that have one or more pointers which point to the same type of structure, as their member. " }, { "code": null, "...
Create a Donut Chart using Recharts in ReactJS
27 Jul, 2021 Introduction: Rechart JS is a library that is used for creating charts for React JS. This library is used for building Line charts, Bar charts, Pie charts, etc, with the help of React and D3 (Data-Driven Documents). To create Donut Chart using Recharts, we create a dataset that contains actual data. Then...
[ { "code": null, "e": 28, "s": 0, "text": "\n27 Jul, 2021" }, { "code": null, "e": 246, "s": 28, "text": "Introduction: Rechart JS is a library that is used for creating charts for React JS. This library is used for building Line charts, Bar charts, Pie charts, etc, with the help ...
Difference between Static binding and dynamic binding in Java
Binding is a mechanism creating link between method call and method actual implementation. As per the polymorphism concept in Java , object can have many different forms. Object forms can be resolved at compile time and run time. If linking between method call and method implementation is resolved at compile time then...
[ { "code": null, "e": 1569, "s": 1062, "text": "Binding is a mechanism creating link between method call and method actual implementation. As per the polymorphism concept in Java , object can have many different forms. Object forms can be resolved at compile time and run time. If linking between meth...
SQL INSERT INTO Statement
The INSERT INTO statement is used to insert new records in a table. It is possible to write the INSERT INTO statement in two ways: 1. Specify both the column names and the values to be inserted: 2. If you are adding values for all the columns of the table, you do not need to specify the column names in the SQL query....
[ { "code": null, "e": 68, "s": 0, "text": "The INSERT INTO statement is used to insert new records in a table." }, { "code": null, "e": 132, "s": 68, "text": "It is possible to write the INSERT INTO \nstatement in two ways:" }, { "code": null, "e": 196, "s": 132, ...
How to use an animated image in HTML page?
Animated images in HTML are an image on a web page that moves. It is in GIF format i.e. Graphics Interchange Format file. To add an animated image in HTML is quite easy. You need to use the <image> tag with the src attribute. The src attribute adds the URL of the image. Also, set the height and width of the image using...
[ { "code": null, "e": 1184, "s": 1062, "text": "Animated images in HTML are an image on a web page that moves. It is in GIF format i.e. Graphics Interchange Format file." }, { "code": null, "e": 1333, "s": 1184, "text": "To add an animated image in HTML is quite easy. You need to ...
How can I change the text color with jQuery?
To change the text color with jQuery, use the jQuery css() method. The color css property is used to change text color. You can try to run the following code to learn how to change text color with jQuery − Live Demo <!DOCTYPE html> <html> <head> <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min...
[ { "code": null, "e": 1182, "s": 1062, "text": "To change the text color with jQuery, use the jQuery css() method. The color css property is used to change text color." }, { "code": null, "e": 1268, "s": 1182, "text": "You can try to run the following code to learn how to change t...
Dorkify - Perform Google Dork Search - GeeksforGeeks
28 Nov, 2021 Dorkify is a free and open-source tool available on GitHub. Dorkify is used to perform google Dorking from the Linux terminal. Google Dorking is a technique used by hackers to find security loopholes in websites and servers. Google Dorking can be performed using mathematical operators such as ? ,” ” etc. ...
[ { "code": null, "e": 24406, "s": 24378, "text": "\n28 Nov, 2021" }, { "code": null, "e": 24898, "s": 24406, "text": "Dorkify is a free and open-source tool available on GitHub. Dorkify is used to perform google Dorking from the Linux terminal. Google Dorking is a technique used b...
Andrew Ng’s Machine Learning Course in Python (Regularized Logistic Regression) + Lasso Regression | by Benjamin Lau | Towards Data Science
Continuing from programming assignment 2 (Logistic Regression), we will now proceed to regularized logistic regression in python to help us deal with the problem of overfitting. Regularizations are shrinkage methods that shrink coefficient towards zero to prevent overfitting by reducing the variance of the model. Going...
[ { "code": null, "e": 350, "s": 172, "text": "Continuing from programming assignment 2 (Logistic Regression), we will now proceed to regularized logistic regression in python to help us deal with the problem of overfitting." }, { "code": null, "e": 487, "s": 350, "text": "Regulari...
Detecting Abnormal Weather Patterns With Data Science Tools | by Chua Chin Hon | Towards Data Science
Around the world, extreme weather events are becoming more intense and frequent. There’s no missing some of these major weather abnormalities, such as flash floods or prolonged droughts, which can affect large swathes of a country’s population. But not every weather outlier can be easily observed, particularly in Singa...
[ { "code": null, "e": 128, "s": 47, "text": "Around the world, extreme weather events are becoming more intense and frequent." }, { "code": null, "e": 292, "s": 128, "text": "There’s no missing some of these major weather abnormalities, such as flash floods or prolonged droughts, ...
Left View of Binary Tree | Practice | GeeksforGeeks
Given a Binary Tree, print Left view of it. Left view of a Binary Tree is set of nodes visible when tree is visited from Left side. The task is to complete the function leftView(), which accepts root of the tree as argument. Left view of following tree is 1 2 4 8. 1 / \ 2 3 / \ ...
[ { "code": null, "e": 463, "s": 238, "text": "Given a Binary Tree, print Left view of it. Left view of a Binary Tree is set of nodes visible when tree is visited from Left side. The task is to complete the function leftView(), which accepts root of the tree as argument." }, { "code": null, ...
Find the largest pair sum in an unsorted array - GeeksforGeeks
12 Aug, 2021 Given an unsorted of distinct integers, find the largest pair sum in it. For example, the largest pair sum in {12, 34, 10, 6, 40} is 74.Difficulty Level: Rookie Expected Time Complexity: O(n) [Only one traversal of an array is allowed] This problem mainly boils down to finding the largest and second-large...
[ { "code": null, "e": 25152, "s": 25124, "text": "\n12 Aug, 2021" }, { "code": null, "e": 25389, "s": 25152, "text": "Given an unsorted of distinct integers, find the largest pair sum in it. For example, the largest pair sum in {12, 34, 10, 6, 40} is 74.Difficulty Level: Rookie Ex...
What is the difference between String.valueOf() and toString() in Java?
The toString() method of the String class returns itself a string. Live Demo import java.io.*; public class Test { public static void main(String args[]) { String Str = new String("Welcome to Tutorialspoint.com"); System.out.print("Return Value :"); System.out.println(Str.toString()); } } Return...
[ { "code": null, "e": 1254, "s": 1187, "text": "The toString() method of the String class returns itself a string." }, { "code": null, "e": 1264, "s": 1254, "text": "Live Demo" }, { "code": null, "e": 1501, "s": 1264, "text": "import java.io.*;\npublic class Te...
GATE | GATE-CS-2014-(Set-1) | Question 65
10 Nov, 2021 A machine has a 32-bit architecture, with 1-word long instructions. It has 64 registers, each of which is 32 bits long. It needs to support 45 instructions, which have an immediate operand in addition to two register operands. Assuming that the immediate operand is an unsigned integer, the maximum value of...
[ { "code": null, "e": 28, "s": 0, "text": "\n10 Nov, 2021" }, { "code": null, "e": 434, "s": 28, "text": "A machine has a 32-bit architecture, with 1-word long instructions. It has 64 registers, each of which is 32 bits long. It needs to support 45 instructions, which have an imme...
Palindrome Substring Queries
04 Jul, 2022 Given a string and several queries on the substrings of the given input string to check whether the substring is a palindrome or not. Examples : Suppose our input string is “abaaabaaaba” and the queries- [0, 10], [5, 8], [2, 5], [5, 9]We have to tell that the substring having the starting and ending indic...
[ { "code": null, "e": 52, "s": 24, "text": "\n04 Jul, 2022" }, { "code": null, "e": 186, "s": 52, "text": "Given a string and several queries on the substrings of the given input string to check whether the substring is a palindrome or not." }, { "code": null, "e": 198...
Smallest integer with digit sum M and multiple of N
23 Jun, 2022 Given two positive integers N and M, the task is to find the smallest positive integer which is divisible by N and whose digit sum is M. Print -1 if no such integer exists within the range of int. Examples: Input: N = 13, M = 32 Output: 8879 8879 is divisible by 13 and its Sum of digits of 8879 is 8+8+7+...
[ { "code": null, "e": 52, "s": 24, "text": "\n23 Jun, 2022" }, { "code": null, "e": 249, "s": 52, "text": "Given two positive integers N and M, the task is to find the smallest positive integer which is divisible by N and whose digit sum is M. Print -1 if no such integer exists wi...
What does ‘<?=’ short open tag mean in PHP ?
05 Feb, 2019 The <php is used to identify the start of a PHP document. In PHP whenever it reads a PHP document, It looks for: <?php ?> It process the codes in between the above tags only and leaves the other codes around them. For example : <?phpecho "Hello PHP !";?> Hello PHP ! Note : But a special case is when you w...
[ { "code": null, "e": 52, "s": 24, "text": "\n05 Feb, 2019" }, { "code": null, "e": 110, "s": 52, "text": "The <php is used to identify the start of a PHP document." }, { "code": null, "e": 165, "s": 110, "text": "In PHP whenever it reads a PHP document, It loo...
Minimum number of edges between two vertices of a Graph
29 Jun, 2021 You are given a undirected graph G(V, E) with N vertices and M edges. We need to find the minimum number of edges between a given pair of vertices (u, v). Examples: Input : For given graph G. Find minimum number of edges between (1, 5). Output : 2 Explanation: (1, 2) and (2, 5) are the only edges ...
[ { "code": null, "e": 52, "s": 24, "text": "\n29 Jun, 2021" }, { "code": null, "e": 207, "s": 52, "text": "You are given a undirected graph G(V, E) with N vertices and M edges. We need to find the minimum number of edges between a given pair of vertices (u, v)." }, { "code...
File isAbsolute() method in Java with Examples
30 Jan, 2019 The isAbsolute() method is a part of File class. The function returns whether the abstract pathname is absolute or not. For Example: if we create a file object using the path as “program.txt”, it points to the file present in the same directory where the executable program is kept (if you are using a IDE i...
[ { "code": null, "e": 28, "s": 0, "text": "\n30 Jan, 2019" }, { "code": null, "e": 148, "s": 28, "text": "The isAbsolute() method is a part of File class. The function returns whether the abstract pathname is absolute or not." }, { "code": null, "e": 566, "s": 148,...
Maximum path sum in matrix
25 May, 2022 Given a matrix of N * M. Find the maximum path sum in matrix. The maximum path is sum of all elements from first row to last row where you are allowed to move only down or diagonally to left or right. You can start from any element in first row. Examples: Input : mat[][] = 10 10 2 0 20 4 ...
[ { "code": null, "e": 54, "s": 26, "text": "\n25 May, 2022" }, { "code": null, "e": 300, "s": 54, "text": "Given a matrix of N * M. Find the maximum path sum in matrix. The maximum path is sum of all elements from first row to last row where you are allowed to move only down or di...
Find the one missing number in range
28 Jun, 2022 Given an array of size n. It is also given that range of numbers is from smallestNumber to smallestNumber + n where smallestNumber is the smallest number in array. The array contains number in this range but one number is missing so the task is to find this missing number.Examples: Input : arr[] = {13,...
[ { "code": null, "e": 54, "s": 26, "text": "\n28 Jun, 2022" }, { "code": null, "e": 339, "s": 54, "text": "Given an array of size n. It is also given that range of numbers is from smallestNumber to smallestNumber + n where smallestNumber is the smallest number in array. The array ...
Python – Convert day number to date in particular year
16 Nov, 2020 Given day number, convert to date it refers to. Input : day_num = “339”, year = “2020” Output : 12-04-2020 Explanation : 339th Day of 2020 is 4th December. Input : day_num = “4”, year = “2020” Output : 01-04-2020 Explanation : 4th Day of 2020 is 4th January. Method #1 : Using datetime.strptime() In this, ...
[ { "code": null, "e": 28, "s": 0, "text": "\n16 Nov, 2020" }, { "code": null, "e": 76, "s": 28, "text": "Given day number, convert to date it refers to." }, { "code": null, "e": 184, "s": 76, "text": "Input : day_num = “339”, year = “2020” Output : 12-04-2020 E...
Python | Ways to Copy Dictionary
22 Jan, 2019 Dictionary is a collection which is unordered, changeable and indexed. In Python, dictionaries are written with curly brackets, and they have keys and values. It is widely used in day to day programming, web development, and machine learning. When we simply assign dict1 = dict2 it refers to the same dictio...
[ { "code": null, "e": 28, "s": 0, "text": "\n22 Jan, 2019" }, { "code": null, "e": 598, "s": 28, "text": "Dictionary is a collection which is unordered, changeable and indexed. In Python, dictionaries are written with curly brackets, and they have keys and values. It is widely use...
Java Swing | Simple User Registration Form
20 Aug, 2021 Swing is a part of the JFC (Java Foundation Classes). Building Graphical User Interface in Java requires the use of Swings. Swing Framework contains a large set of components which allow a high level of customization and provide rich functionalities, and is used to create window-based applications. Java sw...
[ { "code": null, "e": 54, "s": 26, "text": "\n20 Aug, 2021" }, { "code": null, "e": 506, "s": 54, "text": "Swing is a part of the JFC (Java Foundation Classes). Building Graphical User Interface in Java requires the use of Swings. Swing Framework contains a large set of components...
Using await async in Dart
14 Aug, 2020 The async and await approaches in Dart are very similar to other languages, which makes it a comfortable topic to grasp for those who have used this pattern before. However, even if you don’t have experience with asynchronous programming using async/await, you should find it easy to follow along here. Fun...
[ { "code": null, "e": 54, "s": 26, "text": "\n14 Aug, 2020" }, { "code": null, "e": 358, "s": 54, "text": "The async and await approaches in Dart are very similar to other languages, which makes it a comfortable topic to grasp for those who have used this pattern before. However, ...