title
stringlengths
3
221
text
stringlengths
17
477k
parsed
listlengths
0
3.17k
Subsets having Sum between A and B
23 Nov, 2021 Given a set of N integers. Find how many subsets of given array have sum between A and B(inclusive). Constraints: 1 ≤ N ≤ 34, -2 * 107 ≤ arri ≤ 2 * 107 -5 * 108 ≤ A, B ≤ 5 * 108 Examples: Input : S[] = { 1, -2, 3 }, A = -1, B = 2 Output : 5 Explanation: 1) 0 = 0 (the empty subset) 2) {1} = 1 3) {1, ...
[ { "code": null, "e": 52, "s": 24, "text": "\n23 Nov, 2021" }, { "code": null, "e": 155, "s": 52, "text": "Given a set of N integers. Find how many subsets of given array have sum between A and B(inclusive). " }, { "code": null, "e": 234, "s": 155, "text": "Co...
Python calendar module | firstweekday() method
22 Oct, 2018 Calendar module allows to output calendars like program, and provides additional useful functions related to the calendar. Functions and classes defined in Calendar module use an idealized calendar, the current Gregorian calendar extended indefinitely in both directions. In Python, calendar.firstweekday() ...
[ { "code": null, "e": 28, "s": 0, "text": "\n22 Oct, 2018" }, { "code": null, "e": 300, "s": 28, "text": "Calendar module allows to output calendars like program, and provides additional useful functions related to the calendar. Functions and classes defined in Calendar module use...
Using TreeMap to sort User-defined Objects in Java
11 Dec, 2018 Given example shows how to sort user defined objects TreeMap, you can sort the keys based on the logic provided inside the method.Given a record of employees name and salary as positive integer, it is required to sort the records on the basis of employee salary, using TreeMap in Java. If salary is same, th...
[ { "code": null, "e": 28, "s": 0, "text": "\n11 Dec, 2018" }, { "code": null, "e": 372, "s": 28, "text": "Given example shows how to sort user defined objects TreeMap, you can sort the keys based on the logic provided inside the method.Given a record of employees name and salary a...
linecache.getline() in Python
22 Apr, 2020 With the help of linecache.getline() method, we can get a particular line by providing a line number, one of the usecase for this method is to find the syntax error in the given line number within a big file by using linecache.getline() method. Syntax : linecache.getline(filename, lineno)Return : Return th...
[ { "code": null, "e": 28, "s": 0, "text": "\n22 Apr, 2020" }, { "code": null, "e": 273, "s": 28, "text": "With the help of linecache.getline() method, we can get a particular line by providing a line number, one of the usecase for this method is to find the syntax error in the giv...
PHP | get_object_vars() Function
01 Oct, 2021 The get_object_vars() function is an inbuilt function in PHP that is used to get the properties of the given object. When an object is made, it has some properties. An associative array of properties of the mentioned object is returned by the function. But if there is no property of the object, then it ret...
[ { "code": null, "e": 28, "s": 0, "text": "\n01 Oct, 2021" }, { "code": null, "e": 346, "s": 28, "text": "The get_object_vars() function is an inbuilt function in PHP that is used to get the properties of the given object. When an object is made, it has some properties. An associa...
std::string::replace , std::string::replace_if in C++
28 May, 2021 It replaces each element in the range [first, last) that is equal to oldValue with newValue. The function uses operator == to compare the individual elements to old_value. template <class ForwardIterator, class T> void replace (ForwardIterator first, ForwardIterator last, const T& old_val...
[ { "code": null, "e": 54, "s": 26, "text": "\n28 May, 2021" }, { "code": null, "e": 226, "s": 54, "text": "It replaces each element in the range [first, last) that is equal to oldValue with newValue. The function uses operator == to compare the individual elements to old_value." ...
Greedy Algorithm to find Minimum number of Coins
28 Sep, 2021 Given a value V, if we want to make a change for V Rs, and we have an infinite supply of each of the denominations in Indian currency, i.e., we have an infinite supply of { 1, 2, 5, 10, 20, 50, 100, 500, 1000} valued coins/notes, what is the minimum number of coins and/or notes needed to make the change? E...
[ { "code": null, "e": 52, "s": 24, "text": "\n28 Sep, 2021" }, { "code": null, "e": 358, "s": 52, "text": "Given a value V, if we want to make a change for V Rs, and we have an infinite supply of each of the denominations in Indian currency, i.e., we have an infinite supply of { 1...
jQuery Timepicker Plugin
18 Aug, 2020 In this article, we will learn how to add a time picker to the jQueryUI Datepicker using the jQuery Timepicker-Addon image plugin. Note: Please download the jQuery Timepicker plugin in the working folder and include the required files in the head section of your HTML code. <link href=”http://code.jquery.co...
[ { "code": null, "e": 28, "s": 0, "text": "\n18 Aug, 2020" }, { "code": null, "e": 159, "s": 28, "text": "In this article, we will learn how to add a time picker to the jQueryUI Datepicker using the jQuery Timepicker-Addon image plugin." }, { "code": null, "e": 302, ...
ArrayDeque size() Method in Java
10 Dec, 2018 The Java.util.ArrayDeque.size() method in Java is used to get the size of the Deque or the number of elements present in the Deque. Syntax: Array_Deque.size() Parameters: The method does not take any parameter. Return Value: The method returns the size or the number of elements present in the Deque. Below ...
[ { "code": null, "e": 28, "s": 0, "text": "\n10 Dec, 2018" }, { "code": null, "e": 160, "s": 28, "text": "The Java.util.ArrayDeque.size() method in Java is used to get the size of the Deque or the number of elements present in the Deque." }, { "code": null, "e": 168, ...
Python Pandas - Create Multiindex from dataframe
To create Multiindex from DataFrame, use the MultiIndex. from_frame() method. At first, let us create a Dictionary of lists − d = {'Car': ['BMW', 'Lexus', 'Audi', 'Mercedes', 'Jaguar', 'Bentley'],'Date_of_purchase': ['2020-10-10', '2020-10-12', '2020-10-17', '2020-10-16', '2020-10-19', '2020-10-22'] } Next, create a Pa...
[ { "code": null, "e": 1313, "s": 1187, "text": "To create Multiindex from DataFrame, use the MultiIndex. from_frame() method. At first, let us create a Dictionary of lists −" }, { "code": null, "e": 1490, "s": 1313, "text": "d = {'Car': ['BMW', 'Lexus', 'Audi', 'Mercedes', 'Jaguar...
Python program to find second maximum value in Dictionary
03 Feb, 2021 Dictionaries in Python is same as Associative arrays or Maps in other languages. Unlike lists, dictionaries stores data in key-value pair.Let’s see how to find the second maximum value in a Python dictionary.Method #1: Naive Approach: A general approach is to find the largest value of the dictionary and th...
[ { "code": null, "e": 52, "s": 24, "text": "\n03 Feb, 2021" }, { "code": null, "e": 492, "s": 52, "text": "Dictionaries in Python is same as Associative arrays or Maps in other languages. Unlike lists, dictionaries stores data in key-value pair.Let’s see how to find the second max...
One Liner for Python if-elif-else Statements
11 Dec, 2020 If-elif-else statement is used in Python for decision-making i.e the program will evaluate test expression and will execute the remaining statements only if the given test expression turns out to be true. This allows validation for multiple expressions. Syntax : if test expression: Body of if elif...
[ { "code": null, "e": 28, "s": 0, "text": "\n11 Dec, 2020" }, { "code": null, "e": 282, "s": 28, "text": "If-elif-else statement is used in Python for decision-making i.e the program will evaluate test expression and will execute the remaining statements only if the given test exp...
Sort and Search an Element in Java
21 Oct, 2020 In Java sorting and searching an element in an array is very easy. Unlike C, where we have to make all the functions to work, Java has inbuilt functions to do the same work. To sort an array there is a sort function and to search an element in a sorted array there is a binarySearch() function. To learn mor...
[ { "code": null, "e": 28, "s": 0, "text": "\n21 Oct, 2020" }, { "code": null, "e": 403, "s": 28, "text": "In Java sorting and searching an element in an array is very easy. Unlike C, where we have to make all the functions to work, Java has inbuilt functions to do the same work. T...
How to update matplotlib's imshow() window interactively?
To plot interactive matplotlib’s imshow window, we can take the following steps − Using the subplots() method, create a figure and a set of subplots. Using the subplots() method, create a figure and a set of subplots. Create an array to plot an image, using numpy. Create an array to plot an image, using numpy. Display ...
[ { "code": null, "e": 1269, "s": 1187, "text": "To plot interactive matplotlib’s imshow window, we can take the following steps −" }, { "code": null, "e": 1337, "s": 1269, "text": "Using the subplots() method, create a figure and a set of subplots." }, { "code": null, ...
PHP | FPDF-PDF Generator
02 Aug, 2018 FPDF is a PHP class which allows generating PDF files with PHP code. It is free to use and it does not require any API keys. FPDF stands for Free PDF. It means that any kind of modification can be done in PDF files.The main features of this class are: Allows to setup page format and margins. Allows to setu...
[ { "code": null, "e": 54, "s": 26, "text": "\n02 Aug, 2018" }, { "code": null, "e": 306, "s": 54, "text": "FPDF is a PHP class which allows generating PDF files with PHP code. It is free to use and it does not require any API keys. FPDF stands for Free PDF. It means that any kind ...
Password Protect a Static Website
17 Mar, 2021 Static websites are on rising again, In the early days of Internet HTML, CSS with some JavaScript is all the website, since then a number of Backend Frameworks like Django, Larvel, Ruby on Ralis have been developed along with looks like WordPress which now powers one-third of websites have been also gained...
[ { "code": null, "e": 28, "s": 0, "text": "\n17 Mar, 2021" }, { "code": null, "e": 460, "s": 28, "text": "Static websites are on rising again, In the early days of Internet HTML, CSS with some JavaScript is all the website, since then a number of Backend Frameworks like Django, La...
How to Plot a Smooth Curve in Matplotlib?
02 Feb, 2021 Prerequisite: Introduction to Matplotlib Many times we have line plots generated from lists of data that are quite scattered which makes graphs seem like straight lines connecting dots or quite dense which leads to the data points being extremely close to each other and hence the plot looks cluttered. Th...
[ { "code": null, "e": 52, "s": 24, "text": "\n02 Feb, 2021" }, { "code": null, "e": 93, "s": 52, "text": "Prerequisite: Introduction to Matplotlib" }, { "code": null, "e": 357, "s": 93, "text": "Many times we have line plots generated from lists of data that ar...
How to get the coordinates of a mouse click on a canvas element ?
16 Oct, 2019 The coordinates of the mouse whenever a click takes place can be found by detecting the click event with an event listener and finding the event’s x and y position. A function is created which takes in the canvas element and event as parameters. The dimension of the canvas is found using the getBoundingCli...
[ { "code": null, "e": 54, "s": 26, "text": "\n16 Oct, 2019" }, { "code": null, "e": 219, "s": 54, "text": "The coordinates of the mouse whenever a click takes place can be found by detecting the click event with an event listener and finding the event’s x and y position." }, {...
Length of longest consecutive ones by at most one swap in a Binary String
11 Oct, 2021 Given a Binary String of length . It is allowed to do at most one swap between any 0 and 1. The task is to find the length of the longest consecutive 1’s that can be achieved.Examples: Input : str = "111011101" Output : 7 We can swap 0 at 4th with 1 at 10th position Input : str = "111000" Output : 3 W...
[ { "code": null, "e": 54, "s": 26, "text": "\n11 Oct, 2021" }, { "code": null, "e": 241, "s": 54, "text": "Given a Binary String of length . It is allowed to do at most one swap between any 0 and 1. The task is to find the length of the longest consecutive 1’s that can be achieved...
Python – Multiply two list
27 Dec, 2019 There can be many situations in which one requires to find index wise product of two different lists. This can have a possible applications in day-day programming. Lets discuss various ways in which this task can be performed. Method #1 : Naive MethodIn this method, we simply run a loop and append to the n...
[ { "code": null, "e": 28, "s": 0, "text": "\n27 Dec, 2019" }, { "code": null, "e": 255, "s": 28, "text": "There can be many situations in which one requires to find index wise product of two different lists. This can have a possible applications in day-day programming. Lets discus...
LINQ | Grouping Operator | GroupBy
26 May, 2019 In LINQ, grouping operators pick the elements of the sequence or collection which contains common attributes and serve them in a group. Or in other words, we can say that the grouping operator returns the group of elements based on the given key. This group is held in a special type of collection, which im...
[ { "code": null, "e": 28, "s": 0, "text": "\n26 May, 2019" }, { "code": null, "e": 786, "s": 28, "text": "In LINQ, grouping operators pick the elements of the sequence or collection which contains common attributes and serve them in a group. Or in other words, we can say that the ...
Python VLC MediaListPlayer – Pause/Resume
29 Aug, 2020 In this article we will see how we can pause/resume the MediaListPlayer object in the python vlc module. VLC media player is a free and open-source portable cross-platform media player software and streaming media server developed by the VideoLAN project. Media list player is used to play multiple media in...
[ { "code": null, "e": 28, "s": 0, "text": "\n29 Aug, 2020" }, { "code": null, "e": 695, "s": 28, "text": "In this article we will see how we can pause/resume the MediaListPlayer object in the python vlc module. VLC media player is a free and open-source portable cross-platform med...
How to convert NumPy array to list ?
16 Mar, 2021 In this article, we will discuss how to convert NumPy arrays to a list. We can convert the Numpy array to the list by tolist() method, we can have a list of data element which is converted from an array using this method. Syntax: ndarray.tolist() Parameters: none Returns: The possibly nested list of array ...
[ { "code": null, "e": 28, "s": 0, "text": "\n16 Mar, 2021" }, { "code": null, "e": 250, "s": 28, "text": "In this article, we will discuss how to convert NumPy arrays to a list. We can convert the Numpy array to the list by tolist() method, we can have a list of data element which...
Node.js http.server.timeout Property
10 May, 2022 The http.server.timeout is an inbuilt application programming interface of class Server within http module which is used to get the default Timeout value in milliseconds. In Node.js, default server timeout is 0 milliseconds for the latest version and 2min i.e. (120000 milliseconds) for the older version. S...
[ { "code": null, "e": 28, "s": 0, "text": "\n10 May, 2022" }, { "code": null, "e": 334, "s": 28, "text": "The http.server.timeout is an inbuilt application programming interface of class Server within http module which is used to get the default Timeout value in milliseconds. In N...
response.close() – Python requests
24 Jan, 2022 Python requests are generally used to fetch the content from a particular resource URI. Whenever we make a request to a specified URI through Python, it returns a response object. Now, this response object would be used to access certain features such as content, headers, etc. This article revolves around ...
[ { "code": null, "e": 28, "s": 0, "text": "\n24 Jan, 2022" }, { "code": null, "e": 449, "s": 28, "text": "Python requests are generally used to fetch the content from a particular resource URI. Whenever we make a request to a specified URI through Python, it returns a response obj...
How to change line width in ggplot2?
03 Mar, 2021 ggplot2 is a data visualization package for the statistical programming language R. This article discusses how can we change line width in ggplot2. For this, only the size parameter in the geom_line() function has to be initialized to the required value. Syntax: geom_line(mapping=NULL, data=NULL, stat=”ide...
[ { "code": null, "e": 28, "s": 0, "text": "\n03 Mar, 2021" }, { "code": null, "e": 283, "s": 28, "text": "ggplot2 is a data visualization package for the statistical programming language R. This article discusses how can we change line width in ggplot2. For this, only the size par...
Python PIL | ImageDraw.Draw.polygon() Method
27 Aug, 2019 PIL is the Python Imaging Library which provides the python interpreter with image editing capabilities. The ImageDraw module provide simple 2D graphics for Image objects. You can use this module to create new images, annotate or retouch existing images, and to generate graphics on the fly for web use. Ima...
[ { "code": null, "e": 28, "s": 0, "text": "\n27 Aug, 2019" }, { "code": null, "e": 332, "s": 28, "text": "PIL is the Python Imaging Library which provides the python interpreter with image editing capabilities. The ImageDraw module provide simple 2D graphics for Image objects. You...
Find the middle of a given linked list
22 Jun, 2022 Given a singly linked list, find the middle of the linked list. For example, if the given linked list is 1->2->3->4->5 then the output should be 3. If there are even nodes, then there would be two middle nodes, we need to print the second middle element. For example, if the given linked list is 1->2->3->4-...
[ { "code": null, "e": 52, "s": 24, "text": "\n22 Jun, 2022" }, { "code": null, "e": 395, "s": 52, "text": "Given a singly linked list, find the middle of the linked list. For example, if the given linked list is 1->2->3->4->5 then the output should be 3. If there are even nodes, t...
Ext.js - Multiline User Input Box
This is also like the prompt box but it allows THE user to enter multiline information instead of just one line. Following is a simple syntax. Ext.MessageBox.show ({ title: 'Details', msg: 'Please enter your details:', width:300, buttons: Ext.MessageBox.OKCANCEL, multiline: true, // this property is f...
[ { "code": null, "e": 2136, "s": 2023, "text": "This is also like the prompt box but it allows THE user to enter multiline information instead of just one line." }, { "code": null, "e": 2166, "s": 2136, "text": "Following is a simple syntax." }, { "code": null, "e": 23...
Find smallest values of x and y such that ax - by = 0 - GeeksforGeeks
02 Mar, 2022 Given two values ‘a’ and ‘b’ that represent coefficients in “ax – by = 0”, find the smallest values of x and y that satisfy the equation. It may also be assumed that x > 0, y > 0, a > 0 and b > 0. Input: a = 25, b = 35 Output: x = 7, y = 5 A Simple Solution is to try every possible value of x and y star...
[ { "code": null, "e": 26071, "s": 26043, "text": "\n02 Mar, 2022" }, { "code": null, "e": 26269, "s": 26071, "text": "Given two values ‘a’ and ‘b’ that represent coefficients in “ax – by = 0”, find the smallest values of x and y that satisfy the equation. It may also be assumed th...
Node.js socket.connect() Method - GeeksforGeeks
02 Jul, 2021 The socket.connect() method is an inbuilt application programming interface of class Socket within dgram module which is used to connect the particular server to a particular port and address. Syntax: const socket.connect(port[, address][, callback]) Parameters: This method accepts the following parameter...
[ { "code": null, "e": 37354, "s": 37326, "text": "\n02 Jul, 2021" }, { "code": null, "e": 37547, "s": 37354, "text": "The socket.connect() method is an inbuilt application programming interface of class Socket within dgram module which is used to connect the particular server to a...
XERXES – Penetration Testing Tool using Kali Linux - GeeksforGeeks
25 Mar, 2022 XERXES is a free and Open source tool available on GitHub. You can install and download the tool free of cost. A denial of service attack can be performed by using this tool. Xerxes is written in C. The framework works by maintaining a full TCP connection. After making full TCP Connection it only requires ...
[ { "code": null, "e": 25761, "s": 25733, "text": "\n25 Mar, 2022" }, { "code": null, "e": 26435, "s": 25761, "text": "XERXES is a free and Open source tool available on GitHub. You can install and download the tool free of cost. A denial of service attack can be performed by using...
How to find size of an object in Python?
06 Jun, 2022 In python, the usage of sys.getsizeof() can be done to find the storage size of a particular object that occupies some space in the memory. This function returns the size of the object in bytes. It takes at most two arguments i.e Object itself. Note: Only the memory consumption directly attributed to the o...
[ { "code": null, "e": 53, "s": 25, "text": "\n06 Jun, 2022" }, { "code": null, "e": 298, "s": 53, "text": "In python, the usage of sys.getsizeof() can be done to find the storage size of a particular object that occupies some space in the memory. This function returns the size of ...
response.status_code – Python requests
01 Mar, 2020 response.status_code returns a number that indicates the status (200 is OK, 404 is Not Found). Python requests are generally used to fetch the content from a particular resource URI. Whenever we make a request to a specified URI through Python, it returns a response object. Now, this response object would ...
[ { "code": null, "e": 28, "s": 0, "text": "\n01 Mar, 2020" }, { "code": null, "e": 634, "s": 28, "text": "response.status_code returns a number that indicates the status (200 is OK, 404 is Not Found). Python requests are generally used to fetch the content from a particular resour...
tellp() in file handling with c++ with example
12 Jul, 2021 The tellp() function is used with output streams, and returns the current “put” position of the pointer in the stream. It has no parameters and return a value of the member type pos_type, which is an integer data type representing the current position of the put stream pointer.Syntax: pos_type tellp(); R...
[ { "code": null, "e": 54, "s": 26, "text": "\n12 Jul, 2021" }, { "code": null, "e": 342, "s": 54, "text": "The tellp() function is used with output streams, and returns the current “put” position of the pointer in the stream. It has no parameters and return a value of the member t...
Generators in Python?
Generators have been an important part of python ever since they were introduced with PEP 255. Generator in python are special routine that can be used to control the iteration behaviour of a loop. A generator is similar to a function returning an array. A generator has parameter, which we can called and it generates a...
[ { "code": null, "e": 1282, "s": 1187, "text": "Generators have been an important part of python ever since they were introduced with PEP 255." }, { "code": null, "e": 1646, "s": 1282, "text": "Generator in python are special routine that can be used to control the iteration behav...
How to use image overlay correctly with Bootstrap ?
13 Jun, 2022 In this article, we will be learning how to use image overlay correctly with Bootstrap. But before that, first, we need to know what is an Image Overlay. Image Overlay: Image overlay generally refers to the image being a background image and inserting texts, and links inside of that image. It can be done u...
[ { "code": null, "e": 28, "s": 0, "text": "\n13 Jun, 2022" }, { "code": null, "e": 182, "s": 28, "text": "In this article, we will be learning how to use image overlay correctly with Bootstrap. But before that, first, we need to know what is an Image Overlay." }, { "code":...
sympy.integrals.transforms.laplace_transform() in python
28 Jun, 2021 With the help of laplace_transform() method, we can compute the laplace transformation F(s) of f(t). Syntax : laplace_transform(f, t, s) Return : Return the laplace transformation and convergence condition. Example #1 : In this example, we can see that by using laplace_transform() method, we are able ...
[ { "code": null, "e": 28, "s": 0, "text": "\n28 Jun, 2021" }, { "code": null, "e": 130, "s": 28, "text": "With the help of laplace_transform() method, we can compute the laplace transformation F(s) of f(t). " }, { "code": null, "e": 240, "s": 132, "text": "Synt...
R – Inheritance
22 Jun, 2020 Inheritance is one of the concept in object oriented programming by which new classes can derived from existing or base classes helping in re-usability of code. Derived classes can be the same as a base class or can have extended features which creates a hierarchical structure of classes in the programming...
[ { "code": null, "e": 28, "s": 0, "text": "\n22 Jun, 2020" }, { "code": null, "e": 468, "s": 28, "text": "Inheritance is one of the concept in object oriented programming by which new classes can derived from existing or base classes helping in re-usability of code. Derived classe...
How to Hide IP and MAC Address using Anonym8 in Kali Linux ?
17 Jun, 2021 Anonym8 is a free and open-source tool for becoming anonymous on the Internet while testing the security of a web browser. Anonym8 uses IP-tables to create a Transparent Proxy through the Tor Network. Anonym8 can move the network of your Kali Linux operating system through the Tor Network. When you run the...
[ { "code": null, "e": 52, "s": 24, "text": "\n17 Jun, 2021" }, { "code": null, "e": 780, "s": 52, "text": "Anonym8 is a free and open-source tool for becoming anonymous on the Internet while testing the security of a web browser. Anonym8 uses IP-tables to create a Transparent Prox...
Addition of Lines to a Plot in R Programming – lines() Function
09 Dec, 2021 lines() function in R Programming Language is used to add lines of different types, colors and width to an existing plot. Syntax: lines(x, y, col, lwd, lty) Parameters: x, y: Vector of coordinates col: Color of line lwd: Width of line lty: Type of line Here we are going to create a scatter plot using the ...
[ { "code": null, "e": 28, "s": 0, "text": "\n09 Dec, 2021" }, { "code": null, "e": 150, "s": 28, "text": "lines() function in R Programming Language is used to add lines of different types, colors and width to an existing plot." }, { "code": null, "e": 185, "s": 15...
Python | Pandas Timestamp.round
14 Jan, 2019 Python is a great language for doing data analysis, primarily because of the fantastic ecosystem of data-centric python packages. Pandas is one of those packages and makes importing and analyzing data much easier. Pandas Timestamp.round() function is used to round the given Timestamp to the specified resol...
[ { "code": null, "e": 28, "s": 0, "text": "\n14 Jan, 2019" }, { "code": null, "e": 242, "s": 28, "text": "Python is a great language for doing data analysis, primarily because of the fantastic ecosystem of data-centric python packages. Pandas is one of those packages and makes imp...
Python | Removing duplicate dicts in list
02 Dec, 2018 Removal of duplicates is essential in many applications. List of dictionaries are quite common and sometimes we require to duplicate the duplicated. Lets discuss certain ways in which this can be achieved. Method #1 : Naive methodThe basic method that comes to mind while performing this operation is the na...
[ { "code": null, "e": 54, "s": 26, "text": "\n02 Dec, 2018" }, { "code": null, "e": 260, "s": 54, "text": "Removal of duplicates is essential in many applications. List of dictionaries are quite common and sometimes we require to duplicate the duplicated. Lets discuss certain ways...
Implementation of Deque using circular array
08 Jul, 2022 Deque or Double Ended Queue is a generalized version of Queue data structure that allows insert and delete at both ends.In previous post we had discussed introduction of deque. Now in this post we see how we implement deque Using circular array. Operations on Deque: Mainly the following four basic operat...
[ { "code": null, "e": 52, "s": 24, "text": "\n08 Jul, 2022" }, { "code": null, "e": 299, "s": 52, "text": "Deque or Double Ended Queue is a generalized version of Queue data structure that allows insert and delete at both ends.In previous post we had discussed introduction of dequ...
Rotate bits of a number
01 Nov, 2021 Bit Rotation: A rotation (or circular shift) is an operation similar to shift except that the bits that fall off at one end are put back to the other end. In left rotation, the bits that fall off at left end are put back at right end. In right rotation, the bits that fall off at right end are put back at l...
[ { "code": null, "e": 52, "s": 24, "text": "\n01 Nov, 2021" }, { "code": null, "e": 369, "s": 52, "text": "Bit Rotation: A rotation (or circular shift) is an operation similar to shift except that the bits that fall off at one end are put back to the other end. In left rotation, t...
How to wake up a std::thread while it is sleeping?
31 Mar, 2021 In this article, we will discuss how to wake up a std::thread while it is sleeping. It is known that a thread can’t be exited when it is sleeping. So it is woken up using a command as: std::condition_variable Below is the pseudo-code to implement the same: C++ // Custom Classstruct MyClass { // Const...
[ { "code": null, "e": 52, "s": 24, "text": "\n31 Mar, 2021" }, { "code": null, "e": 237, "s": 52, "text": "In this article, we will discuss how to wake up a std::thread while it is sleeping. It is known that a thread can’t be exited when it is sleeping. So it is woken up using a c...
Calculate the average, variance and standard deviation in Python using NumPy
08 Oct, 2021 Numpy in Python is a general-purpose array-processing package. It provides a high-performance multidimensional array object and tools for working with these arrays. It is the fundamental package for scientific computing with Python. Numpy provides very easy methods to calculate the average, variance, and s...
[ { "code": null, "e": 53, "s": 25, "text": "\n08 Oct, 2021" }, { "code": null, "e": 379, "s": 53, "text": "Numpy in Python is a general-purpose array-processing package. It provides a high-performance multidimensional array object and tools for working with these arrays. It is the...
Longest repeating and non-overlapping substring
05 Jul, 2022 Given a string str, find the longest repeating non-overlapping substring in it. In other words find 2 identical substrings of maximum length which do not overlap. If there exists more than one such substring return any of them. Examples: Input : str = "geeksforgeeks" Output : geeks Input : str = "aab" Ou...
[ { "code": null, "e": 52, "s": 24, "text": "\n05 Jul, 2022" }, { "code": null, "e": 280, "s": 52, "text": "Given a string str, find the longest repeating non-overlapping substring in it. In other words find 2 identical substrings of maximum length which do not overlap. If there ex...
Scanner hasNextLine() method in Java with Examples
16 Oct, 2018 The hasNextLine() method of java.util.Scanner class returns true if there is another line in the input of this scanner. This method may block while waiting for input. The scanner does not advance past any input. Syntax: public boolean hasNextLine() Parameters: The function does not accepts any parameter. R...
[ { "code": null, "e": 28, "s": 0, "text": "\n16 Oct, 2018" }, { "code": null, "e": 240, "s": 28, "text": "The hasNextLine() method of java.util.Scanner class returns true if there is another line in the input of this scanner. This method may block while waiting for input. The scan...
How to select specified node within Xpath node sets by index with Selenium?
We can select specific nodes within xpath node sets by index with Selenium webdriver. We can mention a specific node with the help of its index number enclosed in []. Let us have a look at the below html code for an element having children. The element with tagname ul has multiple child elements with tagname li. If we ...
[ { "code": null, "e": 1229, "s": 1062, "text": "We can select specific nodes within xpath node sets by index with Selenium webdriver. We can mention a specific node with the help of its index number enclosed in []." }, { "code": null, "e": 1545, "s": 1229, "text": "Let us have a l...
C Formal and Actual Arguments - onlinetutorialspoint
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 learn about...
[ { "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, ...
Compound Literals in C - GeeksforGeeks
02 Jun, 2017 Consider below program in C. // Please make sure that you compile this program// using a C compiler, not a C++ compiler (Save your// file .cpp). If using online compiler, select "C"#include <stdio.h>int main(){ // Compound literal (an array is created without // any name and address of first element is...
[ { "code": null, "e": 24428, "s": 24400, "text": "\n02 Jun, 2017" }, { "code": null, "e": 24457, "s": 24428, "text": "Consider below program in C." }, { "code": "// Please make sure that you compile this program// using a C compiler, not a C++ compiler (Save your// file .c...
Spring Cloud - Load Balancer
In a distributed environment, services need to communicate with each other. The communication can either happen synchronously or asynchronously. Now, when a service communicates synchronously, it is better for those services to load balance the request among workers so that a single worker does not get overwhelmed. The...
[ { "code": null, "e": 2242, "s": 1878, "text": "In a distributed environment, services need to communicate with each other. The communication can either happen synchronously or asynchronously. Now, when a service communicates synchronously, it is better for those services to load balance the request ...
Classification Algorithms - Introduction
Classification may be defined as the process of predicting class or category from observed values or given data points. The categorized output can have the form such as “Black” or “White” or “spam” or “no spam”. Mathematically, classification is the task of approximating a mapping function (f) from input variables (X) ...
[ { "code": null, "e": 2516, "s": 2304, "text": "Classification may be defined as the process of predicting class or category from observed values or given data points. The categorized output can have the form such as “Black” or “White” or “spam” or “no spam”." }, { "code": null, "e": 2774...
Scope of Variables In Scala - GeeksforGeeks
17 Feb, 2019 Variable declaration specifies the name of the variable that would be stored in the memory and memory can be accessed further with this name of variable. There are three types of scope for Scala variable. Fields. Method Parameters. Local Variables. Let’s discuss each of them in detail. We can access these ...
[ { "code": null, "e": 23695, "s": 23667, "text": "\n17 Feb, 2019" }, { "code": null, "e": 23900, "s": 23695, "text": "Variable declaration specifies the name of the variable that would be stored in the memory and memory can be accessed further with this name of variable. There are...
Bayesian Networks: Analysing Hotel Customer Data | by Michael Grogan | Towards Data Science
Bayesian networks are quite an intuitive tool when it comes to examining the dependencies between different variables. Specifically, a DAG (or directed acyclic graph) is what allows us to represent the conditional probabilities between a given set of variables. Using the bnlearn library in Python, let’s take a look at ...
[ { "code": null, "e": 291, "s": 172, "text": "Bayesian networks are quite an intuitive tool when it comes to examining the dependencies between different variables." }, { "code": null, "e": 434, "s": 291, "text": "Specifically, a DAG (or directed acyclic graph) is what allows us t...
Radius of the circle when the width and height of an arc is given - GeeksforGeeks
19 Apr, 2021 Given a circle in which the width and height of an arc are given. The task is to find the radius of the circle with the help of the width and height of the arc.Examples: Input: d = 4, h = 1 Output: The radius of the circle is 2.5 Input: d = 14, h = 8 Output: The radius of the circle is 7.0625 Approac...
[ { "code": null, "e": 24749, "s": 24721, "text": "\n19 Apr, 2021" }, { "code": null, "e": 24921, "s": 24749, "text": "Given a circle in which the width and height of an arc are given. The task is to find the radius of the circle with the help of the width and height of the arc.Exa...
The Significance and Applications of Covariance Matrix | by Yitong Ren | Towards Data Science
“The beauty of math is that simple models can do great things.” There is no lack of fancy algorithms and techniques in modern data science. Technology is easy to learn, but also easy to fall behind. The mathematical underpinnings, however, can benefit in the long run. Covariance matrix is one simple and useful math con...
[ { "code": null, "e": 714, "s": 171, "text": "“The beauty of math is that simple models can do great things.” There is no lack of fancy algorithms and techniques in modern data science. Technology is easy to learn, but also easy to fall behind. The mathematical underpinnings, however, can benefit in ...
How do we make my string comparison case insensitive in java?
We can compare Strings in Java in various ways − Using the comapareTo() method − The compareTo() method compares two strings lexicographically. The comparison is based on the Unicode value of each character in the strings. The character sequence represented by this String object is compared lexicographically to the cha...
[ { "code": null, "e": 1111, "s": 1062, "text": "We can compare Strings in Java in various ways −" }, { "code": null, "e": 1434, "s": 1111, "text": "Using the comapareTo() method − The compareTo() method compares two strings lexicographically. The comparison is based on the Unicode...
Difference of two large numbers - GeeksforGeeks
18 Jun, 2021 Given two numbers as strings. The numbers may be very large (may not fit in long long int), the task is to find the difference between these two numbers. Examples: Input : str1 = "11443333311111111100", str2 = "1144422222221111" Output : 11442188888888889989 Input :str1 = "12238787656656567...
[ { "code": null, "e": 25382, "s": 25354, "text": "\n18 Jun, 2021" }, { "code": null, "e": 25536, "s": 25382, "text": "Given two numbers as strings. The numbers may be very large (may not fit in long long int), the task is to find the difference between these two numbers." }, {...
GATE | GATE-CS-2016 (Set 1) | Question 33 - GeeksforGeeks
28 Sep, 2017 A database of research articles in a journal uses the following schema. (VOLUME, NUMBER, STARTPGE, ENDPAGE, TITLE, YEAR, PRICE) The primary key is (VOLUME, NUMBER, STARTPAGE, ENDPAGE) and the following functional dependencies exist in the schema. (VOLUME, NUMBER, STARTPAGE, ENDPAGE) -> TITLE (VOLUME, NUMB...
[ { "code": null, "e": 24055, "s": 24027, "text": "\n28 Sep, 2017" }, { "code": null, "e": 24127, "s": 24055, "text": "A database of research articles in a journal uses the following schema." }, { "code": null, "e": 24184, "s": 24127, "text": "(VOLUME, NUMBER, S...
Apache HttpClient - Form-Based Login
Using the HttpClient library you can send a request or, login to a form by passing parameters. Follow the steps given below to login to a form. The createDefault() method of the HttpClients class returns an object of the class CloseableHttpClient, which is the base implementation of the HttpClient interface. Using this...
[ { "code": null, "e": 1922, "s": 1827, "text": "Using the HttpClient library you can send a request or, login to a form by passing parameters." }, { "code": null, "e": 1971, "s": 1922, "text": "Follow the steps given below to login to a form." }, { "code": null, "e": 2...
Count Uppercase, Lowercase, special character and numeric values in C++
We are given a string containing Uppercase letters, Lowercase letters, specials characters and number values also. The task is to calculate the frequency of all types of characters, special characters and numeric values in the string. Uppercase Letters − A - Z having ASCII values from 65 - 90 where, 65 and 90 are inclu...
[ { "code": null, "e": 1297, "s": 1062, "text": "We are given a string containing Uppercase letters, Lowercase letters, specials characters and number values also. The task is to calculate the frequency of all types of characters, special characters and numeric values in the string." }, { "cod...
strcpy in C/C++ - GeeksforGeeks
22 Sep, 2021 strcpy() is a standard library function in C/C++ and is used to copy one string to another. In C it is present in string.h header file and in C++ it is present in cstring header file. Syntax: char* strcpy(char* dest, const char* src); Parameters: This method accepts the following parameters: dest: Poin...
[ { "code": null, "e": 23975, "s": 23947, "text": "\n22 Sep, 2021" }, { "code": null, "e": 24160, "s": 23975, "text": "strcpy() is a standard library function in C/C++ and is used to copy one string to another. In C it is present in string.h header file and in C++ it is present in ...
Count ways to reach the n'th stair - GeeksforGeeks
22 Apr, 2022 There are n stairs, a person standing at the bottom wants to reach the top. The person can climb either 1 stair or 2 stairs at a time. Count the number of ways, the person can reach the top. Consider the example shown in the diagram. The value of n is 3. There are 3 ways to reach the top. The diagram is t...
[ { "code": null, "e": 24255, "s": 24227, "text": "\n22 Apr, 2022" }, { "code": null, "e": 24447, "s": 24255, "text": "There are n stairs, a person standing at the bottom wants to reach the top. The person can climb either 1 stair or 2 stairs at a time. Count the number of ways, th...
How to use Location API in Android to track your current location?
This example demonstrates how do I use Location API in android to track your current location. Step 1 − Create a new project in Android Studio, go to File ⇒ New Project and fill all required details to create a new project. Add the following dependency in the build.gradle (Module:app) − implementation 'com.google.andro...
[ { "code": null, "e": 1157, "s": 1062, "text": "This example demonstrates how do I use Location API in android to track your current location." }, { "code": null, "e": 1286, "s": 1157, "text": "Step 1 − Create a new project in Android Studio, go to File ⇒ New Project and fill all ...
Python Pandas - Return the microseconds from Timedelta object
To return the microseconds from Timedelta object, use the timedelta.microseconds property. At first, import the required libraries − import pandas as pd TimeDeltas is Python’s standard datetime library uses a different representation timedelta’s. Create a Timedelta object timedelta = pd.Timedelta('7 days 20 min 15 s 35...
[ { "code": null, "e": 1195, "s": 1062, "text": "To return the microseconds from Timedelta object, use the timedelta.microseconds property. At first, import the required libraries −" }, { "code": null, "e": 1215, "s": 1195, "text": "import pandas as pd" }, { "code": null, ...
A Comprehensive Guide to the Correlational Neural Network with Keras | by Md Ashiqur Rahman | Towards Data Science
(improvement of this blog is in here) Human beings along with many other animals have 5 basic senses: Sight, Hearing, Taste, Smell, and Touch. We also have additional senses like a sense of balance and acceleration, a sense of time, etc. Every single moment the human brain processes information from all these sources a...
[ { "code": null, "e": 209, "s": 171, "text": "(improvement of this blog is in here)" }, { "code": null, "e": 1174, "s": 209, "text": "Human beings along with many other animals have 5 basic senses: Sight, Hearing, Taste, Smell, and Touch. We also have additional senses like a sens...
How to setup or install MongoDB on Windows 10 - onlinetutorialspoint
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 tutorials, we are going to show you h...
[ { "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, ...
How to get a variable name as a string in PHP?
To get a variable name as a string in PHP, the code is as follows− Live Demo <?php $a = "This is it!"; $$a = "Demo string!"; print($a); ?> This will produce the following output− This is it! Let us now see another example − Live Demo <?php $val = "This is it!"; function display($var) { foreach($G...
[ { "code": null, "e": 1129, "s": 1062, "text": "To get a variable name as a string in PHP, the code is as follows−" }, { "code": null, "e": 1140, "s": 1129, "text": " Live Demo" }, { "code": null, "e": 1211, "s": 1140, "text": "<?php\n $a = \"This is it!\";\n...
Tk - Canvas Text Widget
Canvas text widget is used to draw text in canvas. The syntax for canvas text widget is shown below − canvasName create text x y options x and y are used to determine the position of text − The options available for the canvas text widget are listed below in the following table − -anchor position The text will be posi...
[ { "code": null, "e": 2303, "s": 2201, "text": "Canvas text widget is used to draw text in canvas. The syntax for canvas text widget is shown below −" }, { "code": null, "e": 2339, "s": 2303, "text": "canvasName create text x y options\n" }, { "code": null, "e": 2392, ...
Hermes — Wildfire Detection using NVIDIA Jetson and Ryze Tello | by Akash James | Towards Data Science
Wildfires have been ever-increasing, devouring our planet earth, rendering our planet worse day by day. Just in 2019 and 2020 alone, there has been more than enough wildfires to throw off earth’s ecology out-of-balance. Amazon wildfires, Californian wildfires, Arctic Wildfires and Australian bush-fires are some of the ...
[ { "code": null, "e": 503, "s": 172, "text": "Wildfires have been ever-increasing, devouring our planet earth, rendering our planet worse day by day. Just in 2019 and 2020 alone, there has been more than enough wildfires to throw off earth’s ecology out-of-balance. Amazon wildfires, Californian wildf...
Java Program to Convert String to Long - GeeksforGeeks
09 Oct, 2021 Given a String, the task is to convert the given String to Long in Java. Examples: Input : String = "20" Output: 20 Input : String = "999999999999" Output: 999999999999 Strings: Strings in Java are objects that are supported internally by a char array. Since arrays are immutable, and strings are also a ty...
[ { "code": null, "e": 23583, "s": 23555, "text": "\n09 Oct, 2021" }, { "code": null, "e": 23656, "s": 23583, "text": "Given a String, the task is to convert the given String to Long in Java." }, { "code": null, "e": 23666, "s": 23656, "text": "Examples:" }, ...
How to Upload and Embed Interactive Plotly Visualizations | by Will Norris | Towards Data Science
I have been sharing a lot of interactive plots this year that I make using Plotly. For a while, Plotly’s chart-studio service was a good solution for me to upload my plots so that I could embed them in articles or presentations. However, Chart-Studio has a pretty aggressive 500KB size limit on their free tier. And char...
[ { "code": null, "e": 598, "s": 172, "text": "I have been sharing a lot of interactive plots this year that I make using Plotly. For a while, Plotly’s chart-studio service was a good solution for me to upload my plots so that I could embed them in articles or presentations. However, Chart-Studio has ...
React useMemo Hook
The React useMemo Hook returns a memoized value. Think of memoization as caching a value so that it does not need to be recalculated. The useMemo Hook only runs when one of its dependencies update. This can improve performance. The useMemo and useCallback Hooks are similar. The main difference is that useMemo returns a...
[ { "code": null, "e": 49, "s": 0, "text": "The React useMemo Hook returns a memoized value." }, { "code": null, "e": 134, "s": 49, "text": "Think of memoization as caching a value so that it does not need to be recalculated." }, { "code": null, "e": 198, "s": 134, ...
Check for balanced parentheses in Python - GeeksforGeeks
31 Dec, 2020 Given an expression string, write a python program to find whether a given string has balanced parentheses or not. Examples: Input : {[]{()}} Output : Balanced Input : [{}{}(] Output : Unbalanced Approach #1 : Using stack One approach to check balanced parentheses is to use stack. Each time, when an open...
[ { "code": null, "e": 25044, "s": 25016, "text": "\n31 Dec, 2020" }, { "code": null, "e": 25159, "s": 25044, "text": "Given an expression string, write a python program to find whether a given string has balanced parentheses or not." }, { "code": null, "e": 25169, ...
ES6 - Iterator
Iterator is an object which allows us to access a collection of objects one at a time. The following built-in types are by default iterable − String Array Map Set An object is considered iterable, if the object implements a function whose key is [Symbol.iterator] and returns an iterator. A for...of loop can be used to ...
[ { "code": null, "e": 2364, "s": 2277, "text": "Iterator is an object which allows us to access a collection of objects one at a time." }, { "code": null, "e": 2419, "s": 2364, "text": "The following built-in types are by default iterable −" }, { "code": null, "e": 242...
Range Queries for Longest Correct Bracket Subsequence - GeeksforGeeks
05 Apr, 2018 Given a bracket sequence or in other words a string S of length n, consisting of characters ‘(‘ and ‘)’. Find length of the maximum correct bracket subsequence of sequence for a given query range. Note: A correct bracket sequence is the one that have matched bracket pairs or which contains another nested c...
[ { "code": null, "e": 25234, "s": 25206, "text": "\n05 Apr, 2018" }, { "code": null, "e": 25624, "s": 25234, "text": "Given a bracket sequence or in other words a string S of length n, consisting of characters ‘(‘ and ‘)’. Find length of the maximum correct bracket subsequence of ...
Use R To Pull Energy Data From The Department of Energy’s EIA API | by Shu Lee | Towards Data Science
Note: I have written a Python version of this article, you can access that article here. The beginning of each article is the same. It walks you through how to sign up for the EIA API and obtain an API key. The Energy Information Administration (EIA) is responsible for the US Department of Energy’s statistics and data....
[ { "code": null, "e": 379, "s": 172, "text": "Note: I have written a Python version of this article, you can access that article here. The beginning of each article is the same. It walks you through how to sign up for the EIA API and obtain an API key." }, { "code": null, "e": 712, "s...
3D Scatter Plotting in Python using Matplotlib - GeeksforGeeks
28 Sep, 2020 A 3D Scatter Plot is a mathematical diagram, the most basic version of three-dimensional plotting used to display the properties of data as three variables of a dataset using the cartesian coordinates.To create a 3D Scatter plot, Matplotlib’s mplot3d toolkit is used to enable three dimensional plotting.Gen...
[ { "code": null, "e": 30302, "s": 30274, "text": "\n28 Sep, 2020" }, { "code": null, "e": 30951, "s": 30302, "text": "A 3D Scatter Plot is a mathematical diagram, the most basic version of three-dimensional plotting used to display the properties of data as three variables of a da...
Concatenation of Elements without Separator in R Programming - paste0() Function - GeeksforGeeks
01 Jun, 2020 paste0() function in R Language is used to concatenate all elements without separator. Syntax: paste0(..., collapse = NULL) Parameters:...: one or more R objects, to be converted to character vectors.collapse: an optional character string to separate the results. Example 1: # R program to illustrate# paste...
[ { "code": null, "e": 25242, "s": 25214, "text": "\n01 Jun, 2020" }, { "code": null, "e": 25329, "s": 25242, "text": "paste0() function in R Language is used to concatenate all elements without separator." }, { "code": null, "e": 25366, "s": 25329, "text": "Syn...
D3.js time.tickFormat() Function - GeeksforGeeks
23 Aug, 2020 The time.tickFormat() function in D3.js is used to return a time format function suitable for displaying tick values. It returns the default time format when the specifier is not specified. Syntax: time.tickFormat( count, specifier ) Parameters: This function accepts two parameters as given above and descr...
[ { "code": null, "e": 24909, "s": 24881, "text": "\n23 Aug, 2020" }, { "code": null, "e": 25099, "s": 24909, "text": "The time.tickFormat() function in D3.js is used to return a time format function suitable for displaying tick values. It returns the default time format when the s...
Convert long primitive to Long object in Java
To convert long primitive to Long object, follow the below steps. Let’s say the following is our long primitive. // primitive long val = 45; System.out.println("long primitive: "+val); Now, to convert it to Long object is not a tiresome task. Include the same long value while creating a new Long object − // object Long...
[ { "code": null, "e": 1128, "s": 1062, "text": "To convert long primitive to Long object, follow the below steps." }, { "code": null, "e": 1175, "s": 1128, "text": "Let’s say the following is our long primitive." }, { "code": null, "e": 1247, "s": 1175, "text":...
If-Else Statements, For Loops and List Comprehensions for Beginners in Python | Towards Data Science
Control Flow structures such as if statements and for loops are powerful ways to create logical, clean and well organized code in Python. If Statements test a condition and then do something if the test is True. For Loops do something for a defined number of elements. List comprehensions are a neat python way of creati...
[ { "code": null, "e": 541, "s": 172, "text": "Control Flow structures such as if statements and for loops are powerful ways to create logical, clean and well organized code in Python. If Statements test a condition and then do something if the test is True. For Loops do something for a defined number...
Realtime video object detection on Raspberry Pi | by Constantin Toporov | Towards Data Science
Recently a video from Tesla autopilot view appeared on the Internet and got very popular. I was interested in the streaming of a similar video (with the detected objects) for a long time and this demo finally made me do some work. The only problem is I wanted to stream video from Raspberry Pi, but in general, it is not...
[ { "code": null, "e": 403, "s": 172, "text": "Recently a video from Tesla autopilot view appeared on the Internet and got very popular. I was interested in the streaming of a similar video (with the detected objects) for a long time and this demo finally made me do some work." }, { "code": nu...
Python 3 - String zfill() Method
The zfill() method pads string on the left with zeros to fill width. Following is the syntax for zfill() method − str.zfill(width) width − This is final width of the string. This is the width which we would get after filling zeros. This method returns padded string. The following example shows the usage of zfill() met...
[ { "code": null, "e": 2409, "s": 2340, "text": "The zfill() method pads string on the left with zeros to fill width." }, { "code": null, "e": 2454, "s": 2409, "text": "Following is the syntax for zfill() method −" }, { "code": null, "e": 2472, "s": 2454, "text"...
How to create an HTML button that acts like a link?
29 Jul, 2021 There are several methods to create an HTML button that acts as a link. Some of them are discussed below:Note: Adding basic CSS property to the button in every method to make button looks better. Using onclick Event: The onclick event attribute works when the user click on the button. When mouse clicked on...
[ { "code": null, "e": 54, "s": 26, "text": "\n29 Jul, 2021" }, { "code": null, "e": 250, "s": 54, "text": "There are several methods to create an HTML button that acts as a link. Some of them are discussed below:Note: Adding basic CSS property to the button in every method to make...
Lodash | _.xor() Method
08 May, 2020 The _.xor() method returns an array of the symmetric difference of given arrays i.e. it will create an array that contains an element that doesn’t exist in any other array. Syntax: _.xor( arrays ) Parameters: This function accepts one or more parameters as mentioned above and described below: arrays: This ...
[ { "code": null, "e": 28, "s": 0, "text": "\n08 May, 2020" }, { "code": null, "e": 201, "s": 28, "text": "The _.xor() method returns an array of the symmetric difference of given arrays i.e. it will create an array that contains an element that doesn’t exist in any other array." ...
Pattern flags() method in Java with examples
The pattern class of java.regex package is a compiled representation of a regular expression. The compile() method of this class accepts a string value representing a regular expression and returns a Pattern object, the following is the signature of this method. static Pattern compile(String regex) Another variant of t...
[ { "code": null, "e": 1156, "s": 1062, "text": "The pattern class of java.regex package is a compiled representation of a regular expression." }, { "code": null, "e": 1325, "s": 1156, "text": "The compile() method of this class accepts a string value representing a regular express...
Find uncommon characters of the two strings in C++ Program
In this tutorial, we are going to learn how to find distinct characters from the given two strings. Let's see an example. Input string_one = "tutorialspoint" string_two = "tutorialsworld" Output d n p w We are going to use hashing to solve the problem. It's more efficient than writing two nested loop Let's see the ste...
[ { "code": null, "e": 1184, "s": 1062, "text": "In this tutorial, we are going to learn how to find distinct characters from the given two strings. Let's see an example." }, { "code": null, "e": 1191, "s": 1184, "text": "Input " }, { "code": null, "e": 1251, "s": 1...
Pattern asPredicate() Method in Java with Examples - GeeksforGeeks
06 Mar, 2019 asPredicate() method of a Pattern class used to creates a predicate object which can be used to match a string.Predicate is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference. Syntax: public Predicate asPredicate() Parameters: This method ...
[ { "code": null, "e": 25471, "s": 25443, "text": "\n06 Mar, 2019" }, { "code": null, "e": 25714, "s": 25471, "text": "asPredicate() method of a Pattern class used to creates a predicate object which can be used to match a string.Predicate is a functional interface and can therefor...
Print all the permutation of length L using the elements of an array | Iterative - GeeksforGeeks
29 Apr, 2021 Given an array of unique elements, we have to find all the permutation of length L using the elements of the array. Repetition of elements is allowed.Examples: Input: arr = { 1, 2 }, L=3 Output: 111 211 121 221 112 212 122 222Input: arr = { 1, 2, 3 }, L=2 Output: 11 21 31 12 22 32 13 23 33 Approach: ...
[ { "code": null, "e": 26721, "s": 26693, "text": "\n29 Apr, 2021" }, { "code": null, "e": 26883, "s": 26721, "text": "Given an array of unique elements, we have to find all the permutation of length L using the elements of the array. Repetition of elements is allowed.Examples: " ...
Risk Breakdown Structure (RBS) - GeeksforGeeks
15 Jan, 2021 Risk is a condition that can sidetrack a project if a project manager didn’t plan for it. For example, a project team plans that certain work needs to be done by its employees, but it is also possible that someone in the team pulls out unexpectedly. So, when a project is planned on the basis of cost, sched...
[ { "code": null, "e": 26235, "s": 26207, "text": "\n15 Jan, 2021" }, { "code": null, "e": 26859, "s": 26235, "text": "Risk is a condition that can sidetrack a project if a project manager didn’t plan for it. For example, a project team plans that certain work needs to be done by i...
How to Find Recently Modified Files in Linux? - GeeksforGeeks
20 Apr, 2021 Here we are going to see how to find recent or today’s modified files in Linux. Locating files with a particular name is one of the problems Linux user’s faces, it would be easier when you actually know the filename. let’s assume that you have created a file in your home folder and you have forgotten the n...
[ { "code": null, "e": 26197, "s": 26169, "text": "\n20 Apr, 2021" }, { "code": null, "e": 26414, "s": 26197, "text": "Here we are going to see how to find recent or today’s modified files in Linux. Locating files with a particular name is one of the problems Linux user’s faces, it...
How to return/favicon.ico as req.url in ExpressJS ? - GeeksforGeeks
13 Apr, 2021 Favicon is the small icon you see in the tab, left of the title... depending on the user’s browser it may (or not) ask for that file, associated with a particular website or web page. Node.js is an open source and cross-platform runtime environment for executing JavaScript code outside the browser. It is w...
[ { "code": null, "e": 26267, "s": 26239, "text": "\n13 Apr, 2021" }, { "code": null, "e": 26451, "s": 26267, "text": "Favicon is the small icon you see in the tab, left of the title... depending on the user’s browser it may (or not) ask for that file, associated with a particular ...
Lex Program For checking a valid URL - GeeksforGeeks
02 May, 2019 Problem: Write a Lex program for checking a valid URL. Explanation:Lex is a computer utility that generates some lexical analyzers. Lex reads a stream of characters as input specifying the lexical analyzer and give source code as the output implementing the lexer in the C programming language. Prerequisite...
[ { "code": null, "e": 26069, "s": 26041, "text": "\n02 May, 2019" }, { "code": null, "e": 26124, "s": 26069, "text": "Problem: Write a Lex program for checking a valid URL." }, { "code": null, "e": 26364, "s": 26124, "text": "Explanation:Lex is a computer utili...
Recursive program to print triangular patterns - GeeksforGeeks
08 Jun, 2021 We have discussed iterative pattern printing in previous post. Examples: Input : 7 Output : * * * * * * * * * * * * * * * * * * * * * * * * * * * * Algorithm:- step 1:- first think for the base condition i.e. number less then 0 step 2:-do the recursive calls ti...
[ { "code": null, "e": 25731, "s": 25703, "text": "\n08 Jun, 2021" }, { "code": null, "e": 25806, "s": 25731, "text": "We have discussed iterative pattern printing in previous post. Examples: " }, { "code": null, "e": 25923, "s": 25806, "text": "Input : 7\nOutp...
What is Lexical scope and lexical closures in Dart - GeeksforGeeks
08 Jun, 2020 It is the term used in various programming languages (not just in dart), to describe a condition where the scope of the variable is not present when the control is out of the block of code where the scope was present. Dart is a lexically scoped language, i.e. you can find the scope of the variable by the h...
[ { "code": null, "e": 25261, "s": 25233, "text": "\n08 Jun, 2020" }, { "code": null, "e": 25587, "s": 25261, "text": "It is the term used in various programming languages (not just in dart), to describe a condition where the scope of the variable is not present when the control is...
Mean Encoding - Machine Learning - GeeksforGeeks
03 Jun, 2020 During Feature Engineering the task of converting categorical features into numerical is called Encoding.There are various ways to handle categorical features like OneHotEncoding and LabelEncoding, FrequencyEncoding or replacing by categorical features by their count. In similar way we can uses MeanEncodin...
[ { "code": null, "e": 25613, "s": 25585, "text": "\n03 Jun, 2020" }, { "code": null, "e": 25923, "s": 25613, "text": "During Feature Engineering the task of converting categorical features into numerical is called Encoding.There are various ways to handle categorical features like...
Python | Implementation of Movie Recommender System - GeeksforGeeks
10 Aug, 2021 Recommender System is a system that seeks to predict or filter preferences according to the user’s choices. Recommender systems are utilized in a variety of areas including movies, music, news, books, research articles, search queries, social tags, and products in general. Recommender systems produce a lis...
[ { "code": null, "e": 25581, "s": 25553, "text": "\n10 Aug, 2021" }, { "code": null, "e": 25936, "s": 25581, "text": "Recommender System is a system that seeks to predict or filter preferences according to the user’s choices. Recommender systems are utilized in a variety of areas ...