title
stringlengths
3
221
text
stringlengths
17
477k
parsed
listlengths
0
3.17k
How to handle multiple input field in react form with a single function?
30 Sep, 2020 There are two types of form, one is uncontrolled form and another one is controlled form. In uncontrolled form values of the input field stored in DOM and whenever we want to use the values we have to reach the DOM and pull out the values of each input field. Now in control, we do not allow to store the va...
[ { "code": null, "e": 52, "s": 24, "text": "\n30 Sep, 2020" }, { "code": null, "e": 909, "s": 52, "text": "There are two types of form, one is uncontrolled form and another one is controlled form. In uncontrolled form values of the input field stored in DOM and whenever we want to...
HTML | <tr> bgcolor Attribute
26 Jun, 2019 The HTML <tr> bgcolor Attribute is used to specify the background color of a table row. It is not supported by HTML 5. Syntax: <tr bgcolor= "color_name | hex_number | rgb_number"> Attribute Values: color_name: It sets the background color by using the color name. For example “red”. hex_number: It sets the ...
[ { "code": null, "e": 28, "s": 0, "text": "\n26 Jun, 2019" }, { "code": null, "e": 147, "s": 28, "text": "The HTML <tr> bgcolor Attribute is used to specify the background color of a table row. It is not supported by HTML 5." }, { "code": null, "e": 155, "s": 147, ...
Data encryption standard (DES) | Set 1
15 May, 2022 Data encryption standard (DES) has been found vulnerable to very powerful attacks and therefore, the popularity of DES has been found slightly on the decline. DES is a block cipher and encrypts data in blocks of size of 64 bits each, which means 64 bits of plain text go as the input to DES, which produces ...
[ { "code": null, "e": 52, "s": 24, "text": "\n15 May, 2022" }, { "code": null, "e": 539, "s": 52, "text": "Data encryption standard (DES) has been found vulnerable to very powerful attacks and therefore, the popularity of DES has been found slightly on the decline. DES is a block ...
Flutter – Material Banner Widget
22 Sep, 2021 In this article, we will learn about a new feature called Material Banner which is a new feature in flutter and got released in flutter version 2.5.0. A banner displays an important message and asks the user to perform some action. Banner is displayed at top of the screen below appbar. They are persistent,...
[ { "code": null, "e": 28, "s": 0, "text": "\n22 Sep, 2021" }, { "code": null, "e": 179, "s": 28, "text": "In this article, we will learn about a new feature called Material Banner which is a new feature in flutter and got released in flutter version 2.5.0." }, { "code": nu...
Interfaces and Polymorphism in Java
02 Sep, 2021 Java language is one of the most popular languages among all programming languages. There are several advantages of using the java programming language, whether for security purposes or building large distribution projects. One of the advantages of using JA is that Java tries to connect every concept in th...
[ { "code": null, "e": 54, "s": 26, "text": "\n02 Sep, 2021" }, { "code": null, "e": 546, "s": 54, "text": "Java language is one of the most popular languages among all programming languages. There are several advantages of using the java programming language, whether for security ...
Two Pointers Technique
Difficulty Level : Easy Two pointers is really an easy and effective technique that is typically used for searching pairs in a sorted array.Given a sorted array A (sorted in ascending order), having N integers, find if there exists any pair of elements (A[i], A[j]) such that their sum is equal to X. Illustration : A[]...
[ { "code": null, "e": 24, "s": 0, "text": "Difficulty Level :\nEasy" }, { "code": null, "e": 301, "s": 24, "text": "Two pointers is really an easy and effective technique that is typically used for searching pairs in a sorted array.Given a sorted array A (sorted in ascending order...
What is ObjectId in MongoDB
01 Nov, 2020 Every document in the collection has an “_id” field that is used to uniquely identify the document in a particular collection it acts as the primary key for the documents in the collection. “_id” field can be used in any format and the default format is ObjectId of the document. An ObjectID is a 12-byte Fi...
[ { "code": null, "e": 52, "s": 24, "text": "\n01 Nov, 2020" }, { "code": null, "e": 332, "s": 52, "text": "Every document in the collection has an “_id” field that is used to uniquely identify the document in a particular collection it acts as the primary key for the documents in ...
Even Fibonacci Numbers Sum | Practice | GeeksforGeeks
Given a number N find the sum of all the even valued terms in the Fibonacci sequence less than or equal to N. The first few terms of Fibonacci Numbers are, 1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89, 144, 233 ,... (Even numbers are highlighted). Example 1: Input: N = 8 Output: 10 Explanation: There are two even fibonacci ...
[ { "code": null, "e": 480, "s": 238, "text": "Given a number N find the sum of all the even valued terms in the Fibonacci sequence less than or equal to N.\nThe first few terms of Fibonacci Numbers are, 1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89, 144, 233 ,... (Even numbers are highlighted).\n " }, { ...
How to use componentWillMount() in React Hooks?
09 Feb, 2021 The componentWillMount() method allows us to execute the React code synchronously when the component gets loaded or mounted in the DOM (Document Object Model). This method is called during the mounting phase of the React Life-cycle You cannot use any of the existing React lifecycle methods like ComponentDi...
[ { "code": null, "e": 53, "s": 25, "text": "\n09 Feb, 2021" }, { "code": null, "e": 285, "s": 53, "text": "The componentWillMount() method allows us to execute the React code synchronously when the component gets loaded or mounted in the DOM (Document Object Model). This method is...
PHP | mime_content_type() function
15 Jul, 2019 The mime_content_type() function is an inbuilt function in PHP which is used to get the MIME content-type of a file. Syntax: string mime_content_type( $file ) Parameters: This function accepts single parameter $file which specifies the path of the file which MIME details to be find. Return Value: This func...
[ { "code": null, "e": 28, "s": 0, "text": "\n15 Jul, 2019" }, { "code": null, "e": 145, "s": 28, "text": "The mime_content_type() function is an inbuilt function in PHP which is used to get the MIME content-type of a file." }, { "code": null, "e": 153, "s": 145, ...
time.sleep() in Python
08 Oct, 2021 Python time sleep() function suspends execution for the given number of seconds. Sometimes, there is a need to halt the flow of the program so that several other executions can take place or simply due to the utility required. sleep() can come handy in such a situation which provides an accurate and flexi...
[ { "code": null, "e": 53, "s": 25, "text": "\n08 Oct, 2021" }, { "code": null, "e": 135, "s": 53, "text": "Python time sleep() function suspends execution for the given number of seconds. " }, { "code": null, "e": 471, "s": 135, "text": "Sometimes, there is a n...
Java - String hashCode() Method
This method returns a hash code for this string. The hash code for a String object is computed as − s[0]*31^(n - 1) + s[1]*31^(n - 2) + ... + s[n - 1] Using int arithmetic, where s[i] is the ith character of the string, n is the length of the string, and ^ indicates exponentiation. (The hash value of the empty string ...
[ { "code": null, "e": 2611, "s": 2511, "text": "This method returns a hash code for this string. The hash code for a String object is computed as −" }, { "code": null, "e": 2663, "s": 2611, "text": "s[0]*31^(n - 1) + s[1]*31^(n - 2) + ... + s[n - 1]\n" }, { "code": null, ...
wxPython - StaticText Class
Another important element in a GUI interface is a label, a read-only text of one or more lines. It is usually placed on the frame either as an identifier of another widget or as an informative string. In wxPython, wx.StaticText class object presents a control holding such read-only text. It can be termed as a passive c...
[ { "code": null, "e": 2217, "s": 2016, "text": "Another important element in a GUI interface is a label, a read-only text of one or more lines. It is usually placed on the frame either as an identifier of another widget or as an informative string." }, { "code": null, "e": 2453, "s": ...
Microsoft Interview Experience | Set 55 (For Software Engineer 2)
12 Feb, 2018 Skype round 1: (10 min)Print a tree in zigzag order. For Example for the given input tree:- 1 2 3 4 5 6 7 The output would be:- 1 3 2 4 5 6 7 Code for the logic in any language that you are comfortable in. Skype Round 2: (10 min)Find if two given s...
[ { "code": null, "e": 52, "s": 24, "text": "\n12 Feb, 2018" }, { "code": null, "e": 144, "s": 52, "text": "Skype round 1: (10 min)Print a tree in zigzag order. For Example for the given input tree:-" }, { "code": null, "e": 216, "s": 144, "text": " ...
Matplotlib.pyplot.hsv() in Python
19 Apr, 2020 Matplotlib is a library in Python and it is numerical – mathematical extension for NumPy library. Pyplot is a state-based interface to a Matplotlib module which provides a MATLAB-like interface. The hsv() function in pyplot module of matplotlib library is used to set the colormap to “hsv”.Syntax: matplotli...
[ { "code": null, "e": 28, "s": 0, "text": "\n19 Apr, 2020" }, { "code": null, "e": 223, "s": 28, "text": "Matplotlib is a library in Python and it is numerical – mathematical extension for NumPy library. Pyplot is a state-based interface to a Matplotlib module which provides a MAT...
How to check whether the day is a weekday or not using Pandas in Python?
29 Aug, 2020 Python is a very popular language because it is suitable for almost any type of data science task. And Pandas is one of the popular python-based data analysis toolkits and also provides pandas.bdate_range() function to return a fixed frequency DatetimeIndex. This function Returns a fixed frequency Datetime...
[ { "code": null, "e": 28, "s": 0, "text": "\n29 Aug, 2020" }, { "code": null, "e": 402, "s": 28, "text": "Python is a very popular language because it is suitable for almost any type of data science task. And Pandas is one of the popular python-based data analysis toolkits and als...
How to Train a Classification Model with TensorFlow in 10 Minutes | by Dario Radečić | Towards Data Science
Deep learning is everywhere. From sales forecasting to segmenting skin diseases on image data — there’s nothing deep learning algorithms can’t do, given quality data. If deep learning and TensorFlow are new to you, you’re in the right place. This article will show you the entire process of building a classification mod...
[ { "code": null, "e": 339, "s": 172, "text": "Deep learning is everywhere. From sales forecasting to segmenting skin diseases on image data — there’s nothing deep learning algorithms can’t do, given quality data." }, { "code": null, "e": 641, "s": 339, "text": "If deep learning an...
Batch Script - toInt
A variable which has been set as string using the set variable can be converted to an integer using the /A switch which is using the set variable. The following example shows how this can be accomplished. @echo off set var = 13145 set /A var=%var% + 5 echo %var% The above command produces the following output. 13150 A...
[ { "code": null, "e": 2374, "s": 2169, "text": "A variable which has been set as string using the set variable can be converted to an integer using the /A switch which is using the set variable. The following example shows how this can be accomplished." }, { "code": null, "e": 2432, "...
Maximum height when coins are arranged in a triangle
21 Jun, 2022 We have N coins which need to arrange in form of a triangle, i.e. first row will have 1 coin, second row will have 2 coins and so on, we need to tell maximum height which we can achieve by using these N coins.Examples: Input : N = 7 Output : 3 Maximum height will be 3, putting 1, 2 and then 3 coins. It i...
[ { "code": null, "e": 53, "s": 25, "text": "\n21 Jun, 2022" }, { "code": null, "e": 274, "s": 53, "text": "We have N coins which need to arrange in form of a triangle, i.e. first row will have 1 coin, second row will have 2 coins and so on, we need to tell maximum height which we ...
Print array elements in alternatively increasing and decreasing order in C++
In this problem, we are given an array of number and we have to print the elements of the array in alternatively increasing and decreasing order while printing. The alternative order will be in such a way that 1st two elements are in increasing order and then the next three elements are in decreasing order again next f...
[ { "code": null, "e": 1535, "s": 1187, "text": "In this problem, we are given an array of number and we have to print the elements of the array in alternatively increasing and decreasing order while printing. The alternative order will be in such a way that 1st two elements are in increasing order an...
KeyStore getKey() method in Java with Examples
10 Dec, 2019 The getKey() method of java.security.KeyStore class is used to get the key associated with the given alias, using the given password to recover it. Syntax: public final Key getKey(String alias, char[] password) throws KeyStoreException, NoSuchAlgorithmException, UnrecoverableKey...
[ { "code": null, "e": 28, "s": 0, "text": "\n10 Dec, 2019" }, { "code": null, "e": 176, "s": 28, "text": "The getKey() method of java.security.KeyStore class is used to get the key associated with the given alias, using the given password to recover it." }, { "code": null,...
Create Countdown Timer using Python-Tkinter
20 Jan, 2022 Prerequisites: Python GUI – tkinterPython Tkinter is a GUI programming package or built-in library. Tkinter provides the Tk GUI toolkit with a potent object-oriented interface. Python with Tkinter is the fastest and easiest way to create GUI applications. Creating a GUI using Tkinter is an easy task.Approa...
[ { "code": null, "e": 52, "s": 24, "text": "\n20 Jan, 2022" }, { "code": null, "e": 364, "s": 52, "text": "Prerequisites: Python GUI – tkinterPython Tkinter is a GUI programming package or built-in library. Tkinter provides the Tk GUI toolkit with a potent object-oriented interfac...
Number of ways to go from one point to another in a grid
16 Apr, 2021 Given the NxN grid of horizontal and vertical roads. The task is to find out the number of ways that the person can go from point A to point B using the shortest possible path.Note: A and B point are fixed i.e A is at top left corner and B at bottom right corner as shown in the below image. In the above i...
[ { "code": null, "e": 52, "s": 24, "text": "\n16 Apr, 2021" }, { "code": null, "e": 345, "s": 52, "text": "Given the NxN grid of horizontal and vertical roads. The task is to find out the number of ways that the person can go from point A to point B using the shortest possible pat...
Java Program to Concatenate Two List
19 Jan, 2021 Concatenating two lists means merging two lists into a single list. Consider the given lists: LIST 1 LIST 2 LIST AFTER CONCATENATION There are several methods to perform concatenation operation: Using addAll() methodUsing streamUsing union() Using addAll() method Using stream Using union() Method 1: Using ...
[ { "code": null, "e": 52, "s": 24, "text": "\n19 Jan, 2021" }, { "code": null, "e": 120, "s": 52, "text": "Concatenating two lists means merging two lists into a single list." }, { "code": null, "e": 146, "s": 120, "text": "Consider the given lists:" }, { ...
scp command in Linux with Examples
27 May, 2019 scp (secure copy) command in Linux system is used to copy file(s) between servers in a secure way. The SCP command or secure copy allows secure transferring of files in between the local host and the remote host or between two remote hosts. It uses the same authentication and security as it is used in the ...
[ { "code": null, "e": 53, "s": 25, "text": "\n27 May, 2019" }, { "code": null, "e": 463, "s": 53, "text": "scp (secure copy) command in Linux system is used to copy file(s) between servers in a secure way. The SCP command or secure copy allows secure transferring of files in betwe...
Python – Draw “GFG” logo using Turtle Graphics
13 Oct, 2020 Prerequisites: Turtle Programming in Python Turtle is a Python feature like a drawing board, which let us command a turtle to draw all over it! We can use many turtle functions which can move the turtle around. Turtle comes into the turtle library. The turtle module can be used in both object-oriented and ...
[ { "code": null, "e": 54, "s": 26, "text": "\n13 Oct, 2020" }, { "code": null, "e": 98, "s": 54, "text": "Prerequisites: Turtle Programming in Python" }, { "code": null, "e": 386, "s": 98, "text": "Turtle is a Python feature like a drawing board, which let us c...
Maximum Sum SubArray using Divide and Conquer | Set 2
10 Nov, 2021 Given an array arr[] of integers, the task is to find the maximum sum sub-array among all the possible sub-arrays.Examples: Input: arr[] = {-2, 1, -3, 4, -1, 2, 1, -5, 4} Output: 6 {4, -1, 2, 1} is the required sub-array.Input: arr[] = {2, 2, -2} Output: 4 Approach: Till now we are only aware of Kada...
[ { "code": null, "e": 52, "s": 24, "text": "\n10 Nov, 2021" }, { "code": null, "e": 178, "s": 52, "text": "Given an array arr[] of integers, the task is to find the maximum sum sub-array among all the possible sub-arrays.Examples: " }, { "code": null, "e": 313, "s...
Fibonacci Series in Bash
20 May, 2022 Prerequisite: Fibonacci Series Write a program to print the Fibonacci sequence up to nth digit using Bash. Examples: Input : 5 Output : Fibonacci Series is : 0 1 1 2 3 Input :4 Output : Fibonacci Series is : 0 1 1 2 The Fibonacci numbers are the numbers in the following integer sequence . 0, 1, 1, 2, 3,...
[ { "code": null, "e": 52, "s": 24, "text": "\n20 May, 2022" }, { "code": null, "e": 169, "s": 52, "text": "Prerequisite: Fibonacci Series Write a program to print the Fibonacci sequence up to nth digit using Bash. Examples:" }, { "code": null, "e": 271, "s": 169, ...
HTML | <tbody> align Attribute
22 Feb, 2022 The HTML <tbody> align Attribute is used to set the horizontal alignment of text content inside the table body (tbody). Syntax: <tbody align="left | right | center | justify | char"> Attribute Value: left: It sets the text left-align. right: It sets the text right-align. center: It sets the text center-ali...
[ { "code": null, "e": 28, "s": 0, "text": "\n22 Feb, 2022" }, { "code": null, "e": 148, "s": 28, "text": "The HTML <tbody> align Attribute is used to set the horizontal alignment of text content inside the table body (tbody)." }, { "code": null, "e": 156, "s": 148,...
LEFT() Function in MySQL
24 Sep, 2021 LEFT() function in MySQL is used to extract a specified number of characters from the left side of a given string. It uses its second argument to decide, how many characters it should return. Syntax : LEFT (str, len) Parameter : This function accepts two parameters as mentioned above and described below...
[ { "code": null, "e": 28, "s": 0, "text": "\n24 Sep, 2021" }, { "code": null, "e": 221, "s": 28, "text": "LEFT() function in MySQL is used to extract a specified number of characters from the left side of a given string. It uses its second argument to decide, how many characters i...
How to get the next page on BeautifulSoup?
16 May, 2021 In this article, we are going to see how to Get the next page on beautifulsoup. BeautifulSoup: Beautiful Soup(bs4) is a Python library for pulling data out of HTML and XML files. To install this module type the below command in the terminal. pip install bs4 requests: This library allows you to send HTTP/1....
[ { "code": null, "e": 28, "s": 0, "text": "\n16 May, 2021" }, { "code": null, "e": 108, "s": 28, "text": "In this article, we are going to see how to Get the next page on beautifulsoup." }, { "code": null, "e": 270, "s": 108, "text": "BeautifulSoup: Beautiful S...
How to use multiple attribute in HTML?
The multiple attribute in HTML allows user to enter more than one value. It is a Boolean attribute and can be used on <input> as well as <select> element, To allow multiple file uploads in HTML forms, use the multiple attribute. The multiple attribute works with email and file input types. You can try to run the follow...
[ { "code": null, "e": 1342, "s": 1187, "text": "The multiple attribute in HTML allows user to enter more than one value. It is a Boolean attribute and can be used on <input> as well as <select> element," }, { "code": null, "e": 1478, "s": 1342, "text": "To allow multiple file uplo...
Unit Testing of Node.js Application
29 Jul, 2020 Node.js is a widely used javascript library based on Chrome’s V8 JavaScript engine for developing server-side applications in web development. Unit Testing is a software testing method where individual units/components are tested in isolation. A unit can be described as the smallest testable part of code i...
[ { "code": null, "e": 54, "s": 26, "text": "\n29 Jul, 2020" }, { "code": null, "e": 197, "s": 54, "text": "Node.js is a widely used javascript library based on Chrome’s V8 JavaScript engine for developing server-side applications in web development." }, { "code": null, ...
How to check an object is empty using JavaScript? - GeeksforGeeks
30 Apr, 2019 Method 1: Using the Object.keys(object) method: The required object could be passed to the Object.keys(object) method which will return the keys in the object. The length property is used to the result to check the number of keys. If the length property returns 0 keys, it means that the object is empty. Sy...
[ { "code": null, "e": 24909, "s": 24881, "text": "\n30 Apr, 2019" }, { "code": null, "e": 25214, "s": 24909, "text": "Method 1: Using the Object.keys(object) method: The required object could be passed to the Object.keys(object) method which will return the keys in the object. The...
ASP.NET WP - Charts
In this chapter, we will cover the chart helper and how to display data on charts. In the last chapter, we have displayed data on the WebGrid helper. Chart helper can be used to display data in a graphical format. The Chart helper can render an image that displays data in a variety of chart types. The Chart helper can ...
[ { "code": null, "e": 2499, "s": 2285, "text": "In this chapter, we will cover the chart helper and how to display data on charts. In the last chapter, we have displayed data on the WebGrid helper. Chart helper can be used to display data in a graphical format." }, { "code": null, "e": 25...
Explain in detail about Reference-counting garbage collection in JavaScript?
This is the simplest garbage collection algorithm.This algorithm looks out for those objects which have no references left.An object becomes eligible for garbage collection if it has no references attached to it.The garbage collection is explained in the below example. var obj = { x: { y: 2 } }; ...
[ { "code": null, "e": 1336, "s": 1062, "text": "This is the simplest garbage collection algorithm.This algorithm looks out for those objects which have no references left.An object becomes eligible for garbage collection if it has no references attached to it.The garbage collection is explained i...
Distinct Prime Factors of Array Product - GeeksforGeeks
14 May, 2021 Given an array of integers.Let us say P is the product of elements of the array. Find the number of distinct prime factors of product P. Examples: Input : 1 2 3 4 5 Output : 3 Explanation: Here P = 1 * 2 * 3 * 4 * 5 = 120. Distinct prime divisors of 120 are 2, 3 and 5. So, the output is 3. Input : 21 30 1...
[ { "code": null, "e": 24395, "s": 24367, "text": "\n14 May, 2021" }, { "code": null, "e": 24532, "s": 24395, "text": "Given an array of integers.Let us say P is the product of elements of the array. Find the number of distinct prime factors of product P." }, { "code": null...
Compile and Run Java Programs in Sublime Text in Linux - GeeksforGeeks
11 Feb, 2021 Sublime Text is a free minimalist coding editor developed by Sublime HQ for desktop use. This development and IT program enable you to solely focus on your code, leaving all the other types of eye-candy out. Procedure: Open terminal and the specific command are entered there in order to check for the softw...
[ { "code": null, "e": 23582, "s": 23554, "text": "\n11 Feb, 2021" }, { "code": null, "e": 23790, "s": 23582, "text": "Sublime Text is a free minimalist coding editor developed by Sublime HQ for desktop use. This development and IT program enable you to solely focus on your code, l...
Using range in switch case in C/C++ - GeeksforGeeks
22 Sep, 2021 You all are familiar with switch case in C/C++, but did you know you can use range of numbers instead of a single number or character in case statement. That is the case range extension of the GNU C compiler and not standard C or C++ You can specify a range of consecutive values in a single case label, lik...
[ { "code": null, "e": 24009, "s": 23981, "text": "\n22 Sep, 2021" }, { "code": null, "e": 24162, "s": 24009, "text": "You all are familiar with switch case in C/C++, but did you know you can use range of numbers instead of a single number or character in case statement." }, { ...
8 Advanced Python Logging Features that You Shouldn’t Miss | by Xiaoxu Gao | Towards Data Science
Logging is a very important unit in software development. It helps developers have a better understanding of the execution of the program and reason about defects and unexpected failures. A log message can store information like the current status of a program or where the program is running. If an error occurs, develo...
[ { "code": null, "e": 572, "s": 172, "text": "Logging is a very important unit in software development. It helps developers have a better understanding of the execution of the program and reason about defects and unexpected failures. A log message can store information like the current status of a pr...
Entity Framework - Code First Migration
Entity Framework 4.3 includes a new Code First Migrations feature that allows you to incrementally evolve the database schema as your model changes over time. For most developers, this is a big improvement over the database initializer options from the 4.1 and 4.2 releases that required you to manually update the datab...
[ { "code": null, "e": 3405, "s": 3032, "text": "Entity Framework 4.3 includes a new Code First Migrations feature that allows you to incrementally evolve the database schema as your model changes over time. For most developers, this is a big improvement over the database initializer options from the ...
jQuery - stopPropagation() Method
The stopPropagation() method stops the bubbling of an event to parent elements, preventing any parent handlers from being notified of the event. You can use the method event.isPropagationStopped() to know whether this method was ever called (on that event object). Here is the simple syntax to use this method − event....
[ { "code": null, "e": 2469, "s": 2322, "text": "The stopPropagation() method stops the bubbling of an event to parent elements, preventing any parent handlers from being notified of the event. " }, { "code": null, "e": 2589, "s": 2469, "text": "You can use the method event.isProp...
Types of References in Java
There are four different kinds of references based on the way in which the data is garbage collected. Strong references Weak references Soft references Phantom references It is the default type of reference object. An object that has active strong reference can’t be garbage collected. It is possible only if the variabl...
[ { "code": null, "e": 1164, "s": 1062, "text": "There are four different kinds of references based on the way in which the data is garbage collected." }, { "code": null, "e": 1182, "s": 1164, "text": "Strong references" }, { "code": null, "e": 1198, "s": 1182, ...
Apache Derby - Tools
Apache Derby provides you tools such as sysinfo, ij and, dblook. Using this tool, you can get information about Java and Derby environment. Browse through the bin folder of Derby installation directory and execute the sysinfo command as shown below − C:\Users\MY_USER>cd %DERBY_HOME%/bin C:\Derby\bin>sysinfo On executi...
[ { "code": null, "e": 2245, "s": 2180, "text": "Apache Derby provides you tools such as sysinfo, ij and, dblook." }, { "code": null, "e": 2320, "s": 2245, "text": "Using this tool, you can get information about Java and Derby environment." }, { "code": null, "e": 2431,...
Chunking an array in JavaScript
We are required to write a function chunk() that takes in an array arr of string / number literals as the first argument and a number n as second argument. We are required to return an array of n subarrays, each of which contains at most arr.length / n elements. And the distribution of elements should be like this − Th...
[ { "code": null, "e": 1218, "s": 1062, "text": "We are required to write a function chunk() that takes in an array arr of string / number literals\nas the first argument and a number n as second argument." }, { "code": null, "e": 1380, "s": 1218, "text": "We are required to return...
Fetch API - GeeksforGeeks
27 Oct, 2021 For long XMLHttpRequest is being used by web developer’s trusted “amigo”. XMLHttpRequest has enabled ajax and a whole new kind of interactive exposure. However, it is being slowly succeeded by the Fetch API. These both deliver the same work i.e. fetching data asynchronously from a different network, but th...
[ { "code": null, "e": 24516, "s": 24488, "text": "\n27 Oct, 2021" }, { "code": null, "e": 25119, "s": 24516, "text": "For long XMLHttpRequest is being used by web developer’s trusted “amigo”. XMLHttpRequest has enabled ajax and a whole new kind of interactive exposure. However, it...
Basic Input and Output in C - GeeksforGeeks
12 Jul, 2021 C language has standard libraries that allow input and output in a program. The stdio.h or standard input output library in C that has methods for input and output. The scanf() method, in C, reads the value from the console as per the type specified. Syntax: scanf(“%X”, &variableOfXType); where %X is the f...
[ { "code": null, "e": 24233, "s": 24205, "text": "\n12 Jul, 2021" }, { "code": null, "e": 24398, "s": 24233, "text": "C language has standard libraries that allow input and output in a program. The stdio.h or standard input output library in C that has methods for input and output...
Context api in React.js
The React context api is safe to use in production with the version 16.3 or latest. The reason for adding context api is to avoid the passing of props if there is a chain of children components. Without the use of context api, we have to pass the props through all the intermediate components. The other alternative solu...
[ { "code": null, "e": 1257, "s": 1062, "text": "The React context api is safe to use in production with the version 16.3 or latest. The reason for adding context api is to avoid the passing of props if there is a chain of children components." }, { "code": null, "e": 1464, "s": 1257, ...
ASP.NET Core - Project.Json
In this chapter, we will discuss the project.json file. This file is using JavaScript object notation to store configuration information and it is this file that is really the heart of a .NET application. Without this file, you would not have an ASP.NET Core project. Here, we will discuss some of the most important fea...
[ { "code": null, "e": 2847, "s": 2461, "text": "In this chapter, we will discuss the project.json file. This file is using JavaScript object notation to store configuration information and it is this file that is really the heart of a .NET application. Without this file, you would not have an ASP.NET...
ML - Neural Network Implementation in C++ From Scratch - GeeksforGeeks
11 Mar, 2022 What are we going to do here? This article explains how to create a super-fast Artificial Neural Network that can crunch millions of data points within seconds! even milliseconds. Artificial Intelligence and Machine Learning are nowadays one of the most trending topics among computer geeks. Data scientists...
[ { "code": null, "e": 24570, "s": 24542, "text": "\n11 Mar, 2022" }, { "code": null, "e": 25594, "s": 24570, "text": "What are we going to do here? This article explains how to create a super-fast Artificial Neural Network that can crunch millions of data points within seconds! ev...
Maximum adjacent difference in an array in its sorted form - GeeksforGeeks
24 Jun, 2021 Given an array, find the maximum difference between its two consecutive elements in its sorted form.Examples: Input: arr[] = {1, 10, 5} Output: 5 Sorted array would be {1, 5, 10} and maximum adjacent difference would be 10 - 5 = 5 Input: arr[] = {2, 4, 8, 11} Output: 4 Naive Solution: First sort the arr...
[ { "code": null, "e": 24174, "s": 24146, "text": "\n24 Jun, 2021" }, { "code": null, "e": 24285, "s": 24174, "text": "Given an array, find the maximum difference between its two consecutive elements in its sorted form.Examples: " }, { "code": null, "e": 24447, "s":...
Minimum steps to make all the elements of the array divisible by 4 in C++
Given an array of size n, the task iss to find the minimum number of steps required to make all the elements of the array divisible by 4. A step is defined as removal of any two elements from the array and adding the sum of these elements to the array If input array is {1, 2, 0, 2, 4, 3} then 3 operations are required ...
[ { "code": null, "e": 1314, "s": 1062, "text": "Given an array of size n, the task iss to find the minimum number of steps required to make all the elements of the array divisible by 4. A step is defined as removal of any two elements from the array and adding the sum of these elements to the array" ...
PHP Type Juggling
PHP is known as a dynamically typed language. Explicit type declaration of a variable is neither needed nor supported in PHP. Contrary to C, C++ and Java, type of PHP variable is decided by the value assigned to it, and not other way around. Further, a variable when assigned value of different type, its type too change...
[ { "code": null, "e": 1483, "s": 1062, "text": "PHP is known as a dynamically typed language. Explicit type declaration of a variable is neither needed nor supported in PHP. Contrary to C, C++ and Java, type of PHP variable is decided by the value assigned to it, and not other way around. Further, a ...
Spring Batch - MySQL to XML
In this chapter, we will create a Spring Batch application which uses a MySQL reader and an XML Writer. Reader − The reader we are using in the application is JdbcCursorItemReader to read data from MySQL database. Assume we have created a table in the MySQL database as shown below − CREATE TABLE details.xml_mysql( ...
[ { "code": null, "e": 2032, "s": 1928, "text": "In this chapter, we will create a Spring Batch application which uses a MySQL reader and an XML Writer." }, { "code": null, "e": 2142, "s": 2032, "text": "Reader − The reader we are using in the application is JdbcCursorItemReader to...
Java Program to convert from integer to String
To convert integer to string, firstly set an integer. int val = 150; Now use the Integer.toString() method and pass the same int value. The method returns a string representation. String myStr = Integer.toString(val); Let us now see the complete example. Live Demo public class Demo { public static void main( String...
[ { "code": null, "e": 1116, "s": 1062, "text": "To convert integer to string, firstly set an integer." }, { "code": null, "e": 1131, "s": 1116, "text": "int val = 150;" }, { "code": null, "e": 1242, "s": 1131, "text": "Now use the Integer.toString() method and ...
What is a reference/ref parameter of an array type in C#?
Declare the reference parameters using the ref keyword. A reference parameter is a reference to a memory location of a variable. When you pass parameters by reference, unlike value parameters, a new storage location is not created for these parameters. Declare a ref parameter − public void swap(ref int x, ref int y) {}...
[ { "code": null, "e": 1315, "s": 1062, "text": "Declare the reference parameters using the ref keyword. A reference parameter is a reference to a memory location of a variable. When you pass parameters by reference, unlike value parameters, a new storage location is not created for these parameters."...
GWT - CellTable Widget
The CellTable widget represents a A tabular view that supports paging and columns. Following is the declaration for com.google.gwt.user.cellview.client.CellTable<T> class − public class CellTable<T> extends AbstractHasData<T> CellTable() Constructs a table with a default page size of 15. CellTable(int pageSize) Cons...
[ { "code": null, "e": 2106, "s": 2023, "text": "The CellTable widget represents a A tabular view that supports paging and columns." }, { "code": null, "e": 2196, "s": 2106, "text": "Following is the declaration for com.google.gwt.user.cellview.client.CellTable<T> class −" }, {...
How to scroll to an element inside a div using javascript? - GeeksforGeeks
03 Jun, 2020 There are lots of methods to scroll to an element. The following are the methods available in javascript to scroll to an element. The scrollIntoView method: The scrollIntoView() is used to scroll to the specified element in the browser. Syntax: element.scrollIntoView() Example: Using scrollIntoView() ...
[ { "code": null, "e": 24641, "s": 24613, "text": "\n03 Jun, 2020" }, { "code": null, "e": 24773, "s": 24641, "text": "There are lots of methods to scroll to an element. The following are the methods available in javascript to scroll to an element. " }, { "code": null, ...
Concurrency in Python - Pool of Threads
Suppose we had to create a large number of threads for our multithreaded tasks. It would be computationally most expensive as there can be many performance issues, due to too many threads. A major issue could be in the throughput getting limited. We can solve this problem by creating a pool of threads. A thread pool ma...
[ { "code": null, "e": 2550, "s": 1922, "text": "Suppose we had to create a large number of threads for our multithreaded tasks. It would be computationally most expensive as there can be many performance issues, due to too many threads. A major issue could be in the throughput getting limited. We can...
vector insert() function in C++ STL - GeeksforGeeks
23 Jan, 2020 std::vector::insert() is a built-in function in C++ STL which inserts new elements before the element at the specified position, effectively increasing the container size by the number of elements inserted. Syntax:vector_name.insert (position, val) Parameter:The function accepts two parameters specified as...
[ { "code": null, "e": 24020, "s": 23992, "text": "\n23 Jan, 2020" }, { "code": null, "e": 24227, "s": 24020, "text": "std::vector::insert() is a built-in function in C++ STL which inserts new elements before the element at the specified position, effectively increasing the contain...
C# Program to Subtract Two TimeSpan
Firstly, set two TimeSpans − TimeSpan t1 = TimeSpan.FromMinutes(2); TimeSpan t2 = TimeSpan.FromMinutes(1); To add it, use the Subtract() method − imeSpan res = t1.Subtract(t2); Here is the complete code − Live Demo using System; using System.Linq; public class Demo { public static void Main() { TimeSpan t1 = ...
[ { "code": null, "e": 1091, "s": 1062, "text": "Firstly, set two TimeSpans −" }, { "code": null, "e": 1169, "s": 1091, "text": "TimeSpan t1 = TimeSpan.FromMinutes(2);\nTimeSpan t2 = TimeSpan.FromMinutes(1);" }, { "code": null, "e": 1208, "s": 1169, "text": "To ...
Regression Plots in Python with Seaborn | by Alan Jones | Towards Data Science
A Scatter plot is a great way of exploring relationships or patterns in data. But adding a regression line can make those patterns stand out and it is one thing that is not built into the Pandas plot API. You can use a stats library like Statsmodels, or even Numpy, to create a regression model from your data and includ...
[ { "code": null, "e": 376, "s": 171, "text": "A Scatter plot is a great way of exploring relationships or patterns in data. But adding a regression line can make those patterns stand out and it is one thing that is not built into the Pandas plot API." }, { "code": null, "e": 619, "s":...
New York Taxi data set analysis. Recently I had the opportunity to play... | by Marie Stephen Leo | Towards Data Science
Recently I had the opportunity to play with the New York taxi public data set hosted by Google cloud’s Big Query platform. I decided to apply machine learning techniques on the data set to try and build some predictive models using Python. For this post, I’ll attempt to predict the taxi fare amount. Let’s jump right in...
[ { "code": null, "e": 560, "s": 172, "text": "Recently I had the opportunity to play with the New York taxi public data set hosted by Google cloud’s Big Query platform. I decided to apply machine learning techniques on the data set to try and build some predictive models using Python. For this post, ...
NHibernate - Configuration
In this chapter, we will look at NHibernate configuration. We have different ways that we can configure NHibernate. It divides into two main groups XML-based configuration Code-based configuration The code-based configuration is built into NHibernate. It was introduced around the NHibernate 3 and we have used the code ...
[ { "code": null, "e": 2481, "s": 2333, "text": "In this chapter, we will look at NHibernate configuration. We have different ways that we can configure NHibernate. It divides into two main groups" }, { "code": null, "e": 2505, "s": 2481, "text": "XML-based configuration" }, { ...
Loading CSV data into Azure Synapse Analytics by using PolyBase | by Dhyanendra Singh Rathore | Towards Data Science
Azure Synapse Analytics SQL pool supports various data loading methods. The fastest and most scalable way to load data is through PolyBase. PolyBase is a data virtualization technology that can access external data stored in Hadoop or Azure Data Lake Storage via the T-SQL language. PolyBase shifts the data loading para...
[ { "code": null, "e": 455, "s": 172, "text": "Azure Synapse Analytics SQL pool supports various data loading methods. The fastest and most scalable way to load data is through PolyBase. PolyBase is a data virtualization technology that can access external data stored in Hadoop or Azure Data Lake Stor...
Distributed Application Paradigms - GeeksforGeeks
03 Sep, 2021 Paradigm means an idea or pattern. In this article, we will see the classification of the paradigms for distributed applications. Level of Abstraction: Message Passing Paradigm: It is a basic approach for Inter Process Communication. The data exchange between the sender and the receiver. A process sends ...
[ { "code": null, "e": 24412, "s": 24384, "text": "\n03 Sep, 2021" }, { "code": null, "e": 24543, "s": 24412, "text": "Paradigm means an idea or pattern. In this article, we will see the classification of the paradigms for distributed applications. " }, { "code": null, ...
AbstractMap.SimpleEntry getKey() Method in Java with Examples - GeeksforGeeks
27 Jun, 2019 AbstractMap.SimpleEntry<K, V> is used to maintain a key and a value entry. The value can be changed using the setValue method. This class facilitates the process of building custom map implementations.getKey() method of AbstractMap.SimpleEntry<K, V> returns the key corresponding to this entry. Syntax: publ...
[ { "code": null, "e": 25347, "s": 25319, "text": "\n27 Jun, 2019" }, { "code": null, "e": 25642, "s": 25347, "text": "AbstractMap.SimpleEntry<K, V> is used to maintain a key and a value entry. The value can be changed using the setValue method. This class facilitates the process o...
How to Create Custom Shapes of Data Points in GraphView in Android?
23 May, 2021 If you are looking for a view to represent some statistical data or looking for a UI for displaying a graph in your app then in this article we will take a look at creating a line graph view and showing custom shape to the data points in our Android App. We will be building a simple Line Graph View in ou...
[ { "code": null, "e": 28, "s": 0, "text": "\n23 May, 2021" }, { "code": null, "e": 285, "s": 28, "text": "If you are looking for a view to represent some statistical data or looking for a UI for displaying a graph in your app then in this article we will take a look at creating a ...
Python Program to find whether a no is power of two
06 Jan, 2022 Given a positive integer, write a function to find if it is a power of two or not.Examples : Input : n = 4 Output : Yes 22 = 4 Input : n = 7 Output : No Input : n = 32 Output : Yes 25 = 32 1. A simple method for this is to simply take the log of the number on base 2 and if you get an integer then numbe...
[ { "code": null, "e": 52, "s": 24, "text": "\n06 Jan, 2022" }, { "code": null, "e": 147, "s": 52, "text": "Given a positive integer, write a function to find if it is a power of two or not.Examples : " }, { "code": null, "e": 245, "s": 147, "text": "Input : n ...
Ruby | Array sort() function
06 Dec, 2019 Array#sort() : sort() is a Array class method which returns a new array created by sorting self Syntax: Array.sort() Parameter: Array Return: a new array created by sorting self Example #1 : # Ruby code for sort() method # declaring arraya = ["abc", "nil", "dog"] # declaring arrayc = ["cat", "efg", "geek...
[ { "code": null, "e": 28, "s": 0, "text": "\n06 Dec, 2019" }, { "code": null, "e": 124, "s": 28, "text": "Array#sort() : sort() is a Array class method which returns a new array created by sorting self" }, { "code": null, "e": 145, "s": 124, "text": "Syntax: Ar...
PHPUnit assertIsArray() Function
07 Aug, 2020 The assertIsArray() function is a builtin function in PHPUnit and is used to assert whether the given variable is an array or not. This assertion will return true in the case if the given variable is array else returns false. In case of true the asserted test case got passed else test case got failed. Synt...
[ { "code": null, "e": 28, "s": 0, "text": "\n07 Aug, 2020" }, { "code": null, "e": 331, "s": 28, "text": "The assertIsArray() function is a builtin function in PHPUnit and is used to assert whether the given variable is an array or not. This assertion will return true in the case ...
Get the Number of Levels of a Factor in R Programming – nlevels() Function
16 Jun, 2020 nlevels() function in R Language is used to get the number of levels of a factor. Syntax: nlevels(x) Parameters:x: Factor Object Example 1: # R program to get the number# of levels of a factor # Creating a factorx <- gl(3, 2)x # Calling nlevels() function# to get the number of levelsnlevels(x) Output: [1...
[ { "code": null, "e": 28, "s": 0, "text": "\n16 Jun, 2020" }, { "code": null, "e": 110, "s": 28, "text": "nlevels() function in R Language is used to get the number of levels of a factor." }, { "code": null, "e": 129, "s": 110, "text": "Syntax: nlevels(x)" },...
System Design – URL Shortening Service
14 Feb, 2021 Designing a URL shortener service is one of the frequently asked common questions of system design round in interviews. You will have to tell your approach to design this service within a limited timeframe (45 minutes or less). A lot of candidates get afraid of this round more than the coding round because...
[ { "code": null, "e": 52, "s": 24, "text": "\n14 Feb, 2021" }, { "code": null, "e": 684, "s": 52, "text": "Designing a URL shortener service is one of the frequently asked common questions of system design round in interviews. You will have to tell your approach to design this ser...
3 Tools to Monitor and Optimize your Linux System | by Khuyen Tran | Towards Data Science
If you are a Linux user, you might want to know some important information about your computer such as: System’s CPU usage, memory usage, and disk usage System information Disk usage of each folder or file and when was the last time that you used them. Memory and CPU consumption of the running processes Startup applica...
[ { "code": null, "e": 276, "s": 172, "text": "If you are a Linux user, you might want to know some important information about your computer such as:" }, { "code": null, "e": 325, "s": 276, "text": "System’s CPU usage, memory usage, and disk usage" }, { "code": null, "...
Advanced NumPy: Master stride tricks with 25 illustrated exercises | by Raimi Karim | Towards Data Science
Best viewed with a Chrome browser on desktop Update 6 Jan 2022: Updated Problem 19 based on comments from Sirouan Nouriddine.Update 5 Jan 2022: Fix typos and improve clarity.Update 30 Dec 2021: As of NumPy 1.20.0, there is a sliding_window_view API which can also serve as a higher-level API on top of the as_strided API...
[ { "code": null, "e": 216, "s": 171, "text": "Best viewed with a Chrome browser on desktop" }, { "code": null, "e": 512, "s": 216, "text": "Update 6 Jan 2022: Updated Problem 19 based on comments from Sirouan Nouriddine.Update 5 Jan 2022: Fix typos and improve clarity.Update 30 De...
What does ** (double star) and * (star) do for parameters in Python?
In Python function, an argument with single asterisk (star) prefixed to it helps in receiving variable number of argument from calling environment >>> def function(*arg): for i in arg: print (i) >>> function(1,2,3,4,5) 1 2 3 4 5 Argument with double asterisks (stars) is used in function definition when v...
[ { "code": null, "e": 1209, "s": 1062, "text": "In Python function, an argument with single asterisk (star) prefixed to it helps in receiving variable number of argument from calling environment" }, { "code": null, "e": 1306, "s": 1209, "text": ">>> def function(*arg):\n for ...
Connell sequence in Python
Suppose we have a number n, we have to find the nth term of Connell sequence. The Connell sequence is as follows: 1. Take first odd integer: 1 2. Take next two even integers 2, 4 3. Then take the next three odd integers 5, 7, 9 4. After that take the next four even integers 10, 12, 14, 16 And so on. So, if the input is...
[ { "code": null, "e": 1363, "s": 1062, "text": "Suppose we have a number n, we have to find the nth term of Connell sequence. The Connell\nsequence is as follows: 1. Take first odd integer: 1 2. Take next two even integers 2, 4 3. Then\ntake the next three odd integers 5, 7, 9 4. After that take the ...
JavaScript | Spread Operator - GeeksforGeeks
21 Jul, 2021 Spread operator allows an iterable to expand in places where 0+ arguments are expected. It is mostly used in the variable array where there is more than 1 values are expected. It allows us the privilege to obtain a list of parameters from an array. Syntax of Spread operator is same as Rest parameter but it...
[ { "code": null, "e": 29691, "s": 29663, "text": "\n21 Jul, 2021" }, { "code": null, "e": 30032, "s": 29691, "text": "Spread operator allows an iterable to expand in places where 0+ arguments are expected. It is mostly used in the variable array where there is more than 1 values a...
Pair with a given sum in BST | Set 2 - GeeksforGeeks
18 Aug, 2021 Given a binary search tree, and an integer X, the task is to check if there exists a pair of distinct nodes in BST with sum equal to X. If yes then print Yes else print No. Examples: Input: X = 5 5 / \ 3 7 / \ / \ 2 4 6 8 Output: Yes 2 + 3 = 5. Thus, the...
[ { "code": null, "e": 25146, "s": 25118, "text": "\n18 Aug, 2021" }, { "code": null, "e": 25319, "s": 25146, "text": "Given a binary search tree, and an integer X, the task is to check if there exists a pair of distinct nodes in BST with sum equal to X. If yes then print Yes else ...
Solving business usecases by recommender system using lightFM | by Aayush Agrawal | Towards Data Science
In this post, I am going to write about Recommender systems, how they are used in many e-commerce websites. The post will also cover about building simple recommender system models using Matrix Factorization algorithm using lightFM package and my recommender system cookbook. The post will focus on business use cases an...
[ { "code": null, "e": 665, "s": 172, "text": "In this post, I am going to write about Recommender systems, how they are used in many e-commerce websites. The post will also cover about building simple recommender system models using Matrix Factorization algorithm using lightFM package and my recommen...
The Three Keys to Experimental Design | by Robert Wood | Towards Data Science
This quick blog is designed to help you get off to the races quickly in world of data science; and here specifically, Experimental design. Enjoy! When it comes to experimental design there are three main steps it can be broken down to: Planning Design Analysis Planning should always begin with a well formed hypothesis....
[ { "code": null, "e": 317, "s": 171, "text": "This quick blog is designed to help you get off to the races quickly in world of data science; and here specifically, Experimental design. Enjoy!" }, { "code": null, "e": 407, "s": 317, "text": "When it comes to experimental design the...
When are Constructors Called in C++?
Here we will see, when constructors are called. Here constructors are of different types. Global, local, static local, dynamic. For the global object, the constructors are called before entering into the main function. #include <iostream> using namespace std; class MyClass { public: MyClass() { cout <...
[ { "code": null, "e": 1190, "s": 1062, "text": "Here we will see, when constructors are called. Here constructors are of different types. Global, local, static local, dynamic." }, { "code": null, "e": 1281, "s": 1190, "text": "For the global object, the constructors are called bef...
Python Pandas - Options and Customization
Pandas provide API to customize some aspects of its behavior, display is being mostly used. The API is composed of five relevant functions. They are − get_option() set_option() reset_option() describe_option() option_context() Let us now understand how the functions operate. get_option takes a single parameter and retu...
[ { "code": null, "e": 2535, "s": 2443, "text": "Pandas provide API to customize some aspects of its behavior, display is being mostly used." }, { "code": null, "e": 2594, "s": 2535, "text": "The API is composed of five relevant functions. They are −" }, { "code": null, ...
First Bad Version in Python
Suppose in a company, one product manager is leading a team who develops a new product. Suppose latest version fails the quality check. Since each version is developed based on the previous version, all the versions after a bad version will be bad. So we have an array A with n elements [1, 2, ... n] and we have to find...
[ { "code": null, "e": 1422, "s": 1062, "text": "Suppose in a company, one product manager is leading a team who develops a new product. Suppose latest version fails the quality check. Since each version is developed based on the previous version, all the versions after a bad version will be bad. So w...
How to Automate the Storage using Dropbox API in Python ?
21 Apr, 2021 In this Data Era Storing, Managing, and organizing the Data is an important factor considered by every business. Dropbox is one of the most popular cloud storage systems on the market, and it continues to improve its features. In this article, we will be demonstrating how one can connect to dropbox API us...
[ { "code": null, "e": 28, "s": 0, "text": "\n21 Apr, 2021" }, { "code": null, "e": 390, "s": 28, "text": "In this Data Era Storing, Managing, and organizing the Data is an important factor considered by every business. Dropbox is one of the most popular cloud storage systems on th...
runBlocking in Kotlin Coroutines with Example
10 Sep, 2021 Prerequisite: Kotlin Coroutines on Android Suspend Function In Kotlin Coroutines As it is known that when the user calls the delay() function in any coroutine, it will not block the thread in which it is running, while the delay() function is called one can do some other operations like updating UI and man...
[ { "code": null, "e": 28, "s": 0, "text": "\n10 Sep, 2021" }, { "code": null, "e": 42, "s": 28, "text": "Prerequisite:" }, { "code": null, "e": 71, "s": 42, "text": "Kotlin Coroutines on Android" }, { "code": null, "e": 109, "s": 71, "text":...
Format Specifiers in Julia - GeeksforGeeks
12 Oct, 2020 Format Specifiers are used to format the Input and Output of a Programming language. It tell the compiler about the data type of the Input that is being passed to it. Julia contains a package Printf and using its macro @printf takes input string value to be formatted and accepts parameters as variables to ...
[ { "code": null, "e": 24544, "s": 24516, "text": "\n12 Oct, 2020" }, { "code": null, "e": 24932, "s": 24544, "text": "Format Specifiers are used to format the Input and Output of a Programming language. It tell the compiler about the data type of the Input that is being passed to ...
Reverse String II in Python
Suppose we have a string and an integer k, we have to reverse the first k characters for every 2k characters counting from the start of the string. If there is no sufficient character left, then reverse all of them. If there are less than 2k characters but greater than or equal to k characters, then reverse the first k...
[ { "code": null, "e": 1426, "s": 1062, "text": "Suppose we have a string and an integer k, we have to reverse the first k characters for every 2k characters counting from the start of the string. If there is no sufficient character left, then reverse all of them. If there are less than 2k characters ...
UInt64.MaxValue Field in C# with Examples - GeeksforGeeks
01 May, 2019 The MaxValue field of UInt64 Struct is used to represent the maximum value of the 64-bit unsigned long integer. The value of this field is constant means that the user cannot change the value of this field. The value of this field is 18446744073709551615. Its hexadecimal value is 0xFFFFFFFFFFFFFFFF. It is ...
[ { "code": null, "e": 24502, "s": 24474, "text": "\n01 May, 2019" }, { "code": null, "e": 24857, "s": 24502, "text": "The MaxValue field of UInt64 Struct is used to represent the maximum value of the 64-bit unsigned long integer. The value of this field is constant means that the ...
Draw any polygon in Turtle - Python - GeeksforGeeks
10 Feb, 2020 Prerequisite: Python Turtle Basics Turtle is an inbuilt module of python. It enables us to draw any drawing by a turtle and methods defined in the turtle module and by using some logical loops. turtle drawings are basically drawn using four methods defined in the turtle module. forward(x): moves the turtle...
[ { "code": null, "e": 24604, "s": 24576, "text": "\n10 Feb, 2020" }, { "code": null, "e": 24639, "s": 24604, "text": "Prerequisite: Python Turtle Basics" }, { "code": null, "e": 24883, "s": 24639, "text": "Turtle is an inbuilt module of python. It enables us to...
Sum of even elements of an Array using Recursion - GeeksforGeeks
27 Apr, 2021 Given an array arr[] of integers, the task is to find the sum of even elements from the array. Examples: Input: arr[] = {1, 2, 3, 4, 5, 6, 7, 8} Output: 20 2 + 4 + 6 + 8 = 20Input: arr[] = {4, 1, 3, 6} Output: 10 4 + 6 = 10 Approach: Write a recursive function that takes the array as an argument with th...
[ { "code": null, "e": 24796, "s": 24768, "text": "\n27 Apr, 2021" }, { "code": null, "e": 24892, "s": 24796, "text": "Given an array arr[] of integers, the task is to find the sum of even elements from the array. " }, { "code": null, "e": 24903, "s": 24892, "te...
Display <div> or <span> over image on :hover in HTML
In order to allow div or span element to appear over an image when mouse hover over the image, this can be done with the help of .image:hover overlay, To position .overlay element absolutely relative to the parent element we give height and width to 100% for all image sizes making parent element inline-block <div class...
[ { "code": null, "e": 1213, "s": 1062, "text": "In order to allow div or span element to appear over an image when mouse hover over the image, this can be done with the help of .image:hover overlay," }, { "code": null, "e": 1372, "s": 1213, "text": "To position .overlay element ab...
Update the date and time values while inserting them in MySQL
Here, we will see an example wherein we are inserting datetime and updating them while using INSERT query. Let us first create a table − mysql> create table DemoTable816 (DueDate datetime); Query OK, 0 rows affected (0.45 sec) Insert some records in the table using insert command. Here is the query to add (minutes / ho...
[ { "code": null, "e": 1169, "s": 1062, "text": "Here, we will see an example wherein we are inserting datetime and updating them while using INSERT query." }, { "code": null, "e": 1199, "s": 1169, "text": "Let us first create a table −" }, { "code": null, "e": 1289, ...
C++ | Exception Handling | Question 11 - GeeksforGeeks
28 Jun, 2021 What happens in C++ when an exception is thrown and not caught anywhere like following program. #include <iostream>using namespace std; int fun() throw (int){ throw 10;} int main() { fun(); return 0;} (A) Compiler error(B) Abnormal program termination(C) Program doesn’t print anything and term...
[ { "code": null, "e": 24758, "s": 24730, "text": "\n28 Jun, 2021" }, { "code": null, "e": 24854, "s": 24758, "text": "What happens in C++ when an exception is thrown and not caught anywhere like following program." }, { "code": "#include <iostream>using namespace std; int...
Find the center of the circle using endpoints of diameter - GeeksforGeeks
24 Jan, 2022 Given two endpoint of diameter of a circle (x1, y1) and (x2, y2) find out the center of a circle. Examples : Input : x1 = -9, y1 = 3, and x2 = 5, y2 = –7 Output : -2, –2 Input : x1 = 5, y1 = 3 and x2 = –10 y2 = 4 Output : –2.5, 3.5 Midpoint Formula: The midpoint of two points, ...
[ { "code": null, "e": 24986, "s": 24958, "text": "\n24 Jan, 2022" }, { "code": null, "e": 25097, "s": 24986, "text": "Given two endpoint of diameter of a circle (x1, y1) and (x2, y2) find out the center of a circle. Examples : " }, { "code": null, "e": 25245, "s":...
Explain the equals() method of the Object, String and, StringBuffer classes.
To compare two objects the object class provides a method with name equals(), this method accepts an object and compares it with the current object. If the references of these two objects are equal, then it returns true else this method returns false. In the following example we have a class Employee with two variables...
[ { "code": null, "e": 1314, "s": 1062, "text": "To compare two objects the object class provides a method with name equals(), this method accepts an object and compares it with the current object. If the references of these two objects are equal, then it returns true else this method returns false." ...
How to horizontally center a widget using a grid() in Tkinter?
As the name suggests, a grid is nothing but a set of rows and columns. Tkinter grid manager works similarly; it places the widget in a 2-dimensional plane to align the device through its position vertically and horizontally. Let us consider an example where we want to make the widget centered in the window while resizi...
[ { "code": null, "e": 1287, "s": 1062, "text": "As the name suggests, a grid is nothing but a set of rows and columns. Tkinter grid manager works similarly; it places the widget in a 2-dimensional plane to align the device through its position vertically and horizontally." }, { "code": null, ...
Back-off Algorithm for CSMA/CD - GeeksforGeeks
18 Oct, 2021 Prerequisite – Basics of CSMA/ CD, Collision Detection in CSMA/CDBack-off algorithm is a collision resolution mechanism which is used in random access MAC protocols (CSMA/CD). This algorithm is generally used in Ethernet to schedule re-transmissions after collisions. If a collision takes place between 2 st...
[ { "code": null, "e": 36592, "s": 36564, "text": "\n18 Oct, 2021" }, { "code": null, "e": 36860, "s": 36592, "text": "Prerequisite – Basics of CSMA/ CD, Collision Detection in CSMA/CDBack-off algorithm is a collision resolution mechanism which is used in random access MAC protocol...
How to set up your python development environment on AWS?
You need to have Python, pip, virtualenv, awswebcli and a SSH client installed to set up your Python Development Environment on AWS. You can follow instructions at http://docs.aws.amazon.com/elasticbeanstalk/latest/dg/eb-cli3-install.html to install these. Once you have all those installed, you need to set up a virtual...
[ { "code": null, "e": 1319, "s": 1062, "text": "You need to have Python, pip, virtualenv, awswebcli and a SSH client installed to set up your Python Development Environment on AWS. You can follow instructions at http://docs.aws.amazon.com/elasticbeanstalk/latest/dg/eb-cli3-install.html to install the...
How to fix "Exception in thread main" in java?
An exception is an issue (run time error) occurred during the execution of a program. When an exception occurred the program gets terminated abruptly and, the code past the line that generated the exception never gets executed. import java.util.Scanner; public class ExceptionExample { public static void main(String ...
[ { "code": null, "e": 1290, "s": 1062, "text": "An exception is an issue (run time error) occurred during the execution of a program. When an exception occurred the program gets terminated abruptly and, the code past the line that generated the exception never gets executed." }, { "code": nul...