title
stringlengths
3
221
text
stringlengths
17
477k
parsed
listlengths
0
3.17k
How to convert array of comma separated strings to array of objects?
Following is the code to convert array of comma separated strings to array of objects − Live Demo <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8" /> <meta name="viewport" content="width=device-width, initial-scale=1.0" /> <title>Document</title> <style> body { font-family: "Segoe UI", Tahoma, Ge...
[ { "code": null, "e": 1150, "s": 1062, "text": "Following is the code to convert array of comma separated strings to array of objects −" }, { "code": null, "e": 1161, "s": 1150, "text": " Live Demo" }, { "code": null, "e": 2479, "s": 1161, "text": "<!DOCTYPE ht...
numpy.ndarray.ndim() method | Python
26 Mar, 2020 numpy.ndarray.ndim() function return the number of dimensions of an array. Syntax : numpy.ndarray.ndim(arr) Parameters :arr : [array_like] Input array. If it is not already an ndarray, a conversion is attempted. Return : [int] Return the number of dimensions in arr. Code #1 : # Python program explaining# n...
[ { "code": null, "e": 28, "s": 0, "text": "\n26 Mar, 2020" }, { "code": null, "e": 103, "s": 28, "text": "numpy.ndarray.ndim() function return the number of dimensions of an array." }, { "code": null, "e": 136, "s": 103, "text": "Syntax : numpy.ndarray.ndim(arr...
Difference Between HTML, XML and DHTML
12 Feb, 2021 1. HTML HTML stands for HyperText Markup Language. Used to design the layout of a document and to specify the hyperlinks. Tells the browser how to display text, pictures, and other support media. Support multimedia and new page layout features. Easy to integrate with other programming languages. HTML consi...
[ { "code": null, "e": 28, "s": 0, "text": "\n12 Feb, 2021" }, { "code": null, "e": 36, "s": 28, "text": "1. HTML" }, { "code": null, "e": 79, "s": 36, "text": "HTML stands for HyperText Markup Language." }, { "code": null, "e": 150, "s": 79, ...
Get the first and last item in an array using JavaScript
24 Nov, 2021 In this article, we will learn to get the first & last element in an array in Javascript, along with understanding their implementation through the examples. Javascript array is a variable that holds multiple values at a time. The first and last elements are accessed using an index and the first value is a...
[ { "code": null, "e": 28, "s": 0, "text": "\n24 Nov, 2021" }, { "code": null, "e": 186, "s": 28, "text": "In this article, we will learn to get the first & last element in an array in Javascript, along with understanding their implementation through the examples." }, { "co...
Maximum number of chocolates to be distributed equally among k students
20 May, 2021 Given n boxes containing some chocolates arranged in a row. There are k number of students. The problem is to distribute maximum number of chocolates equally among k students by selecting a consecutive sequence of boxes from the given lot. Consider the boxes are arranged in a row with numbers from 1 to n f...
[ { "code": null, "e": 52, "s": 24, "text": "\n20 May, 2021" }, { "code": null, "e": 676, "s": 52, "text": "Given n boxes containing some chocolates arranged in a row. There are k number of students. The problem is to distribute maximum number of chocolates equally among k students...
Lossless Decomposition in DBMS
15 Nov, 2021 Lossless join decomposition is a decomposition of a relation R into relations R1, R2 such that if we perform a natural join of relation R1 and R2, it will return the original relation R. This is effective in removing redundancy from databases while preserving the original data... In other words by lossles...
[ { "code": null, "e": 52, "s": 24, "text": "\n15 Nov, 2021" }, { "code": null, "e": 334, "s": 52, "text": " Lossless join decomposition is a decomposition of a relation R into relations R1, R2 such that if we perform a natural join of relation R1 and R2, it will return the origina...
shuf Command in Linux with Examples
02 Dec, 2020 The shuf command in Linux writes a random permutation of the input lines to standard output. It pseudo randomizes an input in the same way as the cards are shuffled. It is a part of GNU Coreutils and is not a part of POSIX. This command reads either from a file or standard input in bash and randomizes thos...
[ { "code": null, "e": 28, "s": 0, "text": "\n02 Dec, 2020" }, { "code": null, "e": 439, "s": 28, "text": "The shuf command in Linux writes a random permutation of the input lines to standard output. It pseudo randomizes an input in the same way as the cards are shuffled. It is a p...
Python | How to get function name ?
22 May, 2019 One of the most prominent styles of coding is following OOP paradigm. For this, nowadays, stress has been to write code with modularity, to increase debugging and create a more robust, reusable code. This all encouraged the use of different functions for different tasks, and hence we are bound to know cert...
[ { "code": null, "e": 28, "s": 0, "text": "\n22 May, 2019" }, { "code": null, "e": 473, "s": 28, "text": "One of the most prominent styles of coding is following OOP paradigm. For this, nowadays, stress has been to write code with modularity, to increase debugging and create a mor...
Python math.gamma() Method
03 Dec, 2020 Python in its language allows various mathematical operations, which has manifolds application in scientific domain. One such offering of Python is the inbuilt gamma() function, which numerically computes the gamma value of the number that is passed in the function. Syntax : math.gamma(x)Parameters :x : Th...
[ { "code": null, "e": 28, "s": 0, "text": "\n03 Dec, 2020" }, { "code": null, "e": 295, "s": 28, "text": "Python in its language allows various mathematical operations, which has manifolds application in scientific domain. One such offering of Python is the inbuilt gamma() functio...
How to Create Boxplot from Pandas DataFrame?
19 Dec, 2021 Box plot is also called a Whisker plot which provides a summary of a set of data that includes minimum, first-quartile, median, third quartile, and maximum value. This Box plot is present in the matplotlib library. In the Box plot graph, the x-axis represents the data we are going to plot and the y-axis re...
[ { "code": null, "e": 28, "s": 0, "text": "\n19 Dec, 2021" }, { "code": null, "e": 356, "s": 28, "text": "Box plot is also called a Whisker plot which provides a summary of a set of data that includes minimum, first-quartile, median, third quartile, and maximum value. This Box plo...
Python program to sort a string
06 Jun, 2022 Sorting has always been quite a popular utility with lots of applications everywhere, where Python language opts. Python in its language offers a sort function to perform this task. But due to fact that not all the containers in Python are mutable, such as string, the sort function doesn’t work as it is in...
[ { "code": null, "e": 53, "s": 25, "text": "\n06 Jun, 2022" }, { "code": null, "e": 471, "s": 53, "text": "Sorting has always been quite a popular utility with lots of applications everywhere, where Python language opts. Python in its language offers a sort function to perform thi...
CSS | text-justify Property
09 Aug, 2019 The text-justify property in CSS is used to set the text-align to justify. It spreads the words into the complete line. Syntax: text-justify: auto|inter-word|inter-character|none:initial|inherit; Property Values: The text-justify property values are listed below: auto: It is used to allow the browser to de...
[ { "code": null, "e": 28, "s": 0, "text": "\n09 Aug, 2019" }, { "code": null, "e": 148, "s": 28, "text": "The text-justify property in CSS is used to set the text-align to justify. It spreads the words into the complete line." }, { "code": null, "e": 156, "s": 148,...
Extract all integers from a given String
27 Dec, 2021 Given a string str, extract all integers words from it. Example: Input: str = “1Hello2 &* how are y5ou”Output: 1 2 5 Input: str = “Hey everyone, I have 500 rupees and I would spend a 100”Output: 500 100 Approach: To solve this problem follow the below steps: Create a string tillNow, which will store all...
[ { "code": null, "e": 28, "s": 0, "text": "\n27 Dec, 2021" }, { "code": null, "e": 84, "s": 28, "text": "Given a string str, extract all integers words from it." }, { "code": null, "e": 93, "s": 84, "text": "Example:" }, { "code": null, "e": 148, ...
How to display HTML tags as plain text in HTML ?
20 Sep, 2021 Basically, there are two methods for displaying HTML tags as plain text. 1. Using <plaintext> element: Plaintext element is deprecated which means this feature is no longer supported. Though some browsers might still support it, it is not recommended to use. 2. HTML entities: The second and only option ava...
[ { "code": null, "e": 28, "s": 0, "text": "\n20 Sep, 2021" }, { "code": null, "e": 101, "s": 28, "text": "Basically, there are two methods for displaying HTML tags as plain text." }, { "code": null, "e": 287, "s": 101, "text": "1. Using <plaintext> element: Pla...
Groovy - Nested If Statement
Sometimes there is a requirement to have multiple if statement embedded inside of each other. The general form of this statement is − if(condition) { statement #1 statement #2 ... } else if(condition) { statement #3 statement #4 } else { statement #5 statement #6 } Following is an exampl...
[ { "code": null, "e": 2466, "s": 2372, "text": "Sometimes there is a requirement to have multiple if statement embedded inside of each other." }, { "code": null, "e": 2506, "s": 2466, "text": "The general form of this statement is −" }, { "code": null, "e": 2670, "...
PHP | json_encode() Function
17 Jun, 2019 The json_encode() function is an inbuilt function in PHP which is used to convert PHP array or object into JSON representation.Syntax : string json_encode( $value, $option, $depth ) Parameters: $value: It is a mandatory parameter which defines the value to be encoded. $option: It is optional parameter whic...
[ { "code": null, "e": 54, "s": 26, "text": "\n17 Jun, 2019" }, { "code": null, "e": 190, "s": 54, "text": "The json_encode() function is an inbuilt function in PHP which is used to convert PHP array or object into JSON representation.Syntax :" }, { "code": null, "e": 2...
Matplotlib.axes.Axes.set_xscale() in Python
19 Apr, 2020 Matplotlib is a library in Python and it is numerical – mathematical extension for NumPy library. The Axes Class contains most of the figure elements: Axis, Tick, Line2D, Text, Polygon, etc., and sets the coordinate system. And the instances of Axes supports callbacks through a callbacks attribute. The Axe...
[ { "code": null, "e": 28, "s": 0, "text": "\n19 Apr, 2020" }, { "code": null, "e": 328, "s": 28, "text": "Matplotlib is a library in Python and it is numerical – mathematical extension for NumPy library. The Axes Class contains most of the figure elements: Axis, Tick, Line2D, Text...
Repeated subsequence of length 2 or more
01 Jul, 2022 Given a string, find if there is any subsequence of length 2 or more that repeats itself such that the two subsequences doesn’t have the same character at the same position, i.e., any 0’th or 1st character in the two subsequences shouldn’t have the same index in the original string. Example: Input: ABCABD...
[ { "code": null, "e": 52, "s": 24, "text": "\n01 Jul, 2022" }, { "code": null, "e": 336, "s": 52, "text": "Given a string, find if there is any subsequence of length 2 or more that repeats itself such that the two subsequences doesn’t have the same character at the same position, ...
How to check whether an object exists in javascript ?
28 Jul, 2020 An object can be used to check if it exists using 2 approaches: Method 1: Using the typeof operatorThe typeof operator returns the type of the variable on which it is called as a string. The return string for any object that does not exist is “undefined”. This can be used to check if an object exists or no...
[ { "code": null, "e": 28, "s": 0, "text": "\n28 Jul, 2020" }, { "code": null, "e": 92, "s": 28, "text": "An object can be used to check if it exists using 2 approaches:" }, { "code": null, "e": 395, "s": 92, "text": "Method 1: Using the typeof operatorThe typeo...
Clustering in R Programming
03 Dec, 2021 Clustering in R Programming Language is an unsupervised learning technique in which the data set is partitioned into several groups called as clusters based on their similarity. Several clusters of data are produced after the segmentation of data. All the objects in a cluster share common characteristics. ...
[ { "code": null, "e": 28, "s": 0, "text": "\n03 Dec, 2021" }, { "code": null, "e": 413, "s": 28, "text": "Clustering in R Programming Language is an unsupervised learning technique in which the data set is partitioned into several groups called as clusters based on their similarit...
Python | Find missing numbers in a sorted list range
11 May, 2020 Given a range of sorted list of integers with some integers missing in between, write a Python program to find all the missing integers. Examples: Input : [1, 2, 4, 6, 7, 9, 10] Output : [3, 5, 8] Input : [5, 6, 10, 11, 13] Output : [7, 8, 9, 12] Method #1 : List comprehension # Python3 program to Find ...
[ { "code": null, "e": 53, "s": 25, "text": "\n11 May, 2020" }, { "code": null, "e": 190, "s": 53, "text": "Given a range of sorted list of integers with some integers missing in between, write a Python program to find all the missing integers." }, { "code": null, "e": ...
Python Program that Sends And Receives Message from Client
17 Jun, 2021 Socket programming is a way of connecting two nodes on a network to communicate with each other. One socket(node) listens on a particular port at an IP, while the other socket reaches out to the other to form a connection. The server forms the listener socket while the client reaches out to the server.Sock...
[ { "code": null, "e": 52, "s": 24, "text": "\n17 Jun, 2021" }, { "code": null, "e": 447, "s": 52, "text": "Socket programming is a way of connecting two nodes on a network to communicate with each other. One socket(node) listens on a particular port at an IP, while the other socke...
How to select first 10 elements from a MySQL database?
To select first 10 elements from a database using SQL ORDER BY clause with LIMIT 10. The syntax is as follows SELECT *FROM yourTableName ORDER BY yourIdColumnName LIMIT 10; To understand the above syntax, let us create a table. The query to create a table is as follows mysql> create table Clients - > ( - > Client...
[ { "code": null, "e": 1147, "s": 1062, "text": "To select first 10 elements from a database using SQL ORDER BY clause with LIMIT 10." }, { "code": null, "e": 1172, "s": 1147, "text": "The syntax is as follows" }, { "code": null, "e": 1235, "s": 1172, "text": "S...
OpenCV Static Saliency Detection in a Nutshell | by Bethea Davida | Towards Data Science
Saliency is the standout part of an image that enables our brain to focus on that part. It’s what we put attention on when we see an image, the conspicuous region. For example, have you ever seen something interesting in an ad that makes you stop for a while to see it? That’s the saliency of the ad, the part that pulls...
[ { "code": null, "e": 546, "s": 172, "text": "Saliency is the standout part of an image that enables our brain to focus on that part. It’s what we put attention on when we see an image, the conspicuous region. For example, have you ever seen something interesting in an ad that makes you stop for a wh...
How to compare two dictionaries in C#?
To compare two dictionaries, firstly set the two dictionaries − IDictionary<int, int> d = new Dictionary<int, int>(); d.Add(1,97); d.Add(2,89); d.Add(3,77); d.Add(4,88); // Dictionary One elements Console.WriteLine("Dictionary One elements: "+d.Count); IDictionary<int, int> d2 = new Dictionary<int, int>(); d2.Add(1,97...
[ { "code": null, "e": 1126, "s": 1062, "text": "To compare two dictionaries, firstly set the two dictionaries −" }, { "code": null, "e": 1316, "s": 1126, "text": "IDictionary<int, int> d = new Dictionary<int, int>();\nd.Add(1,97);\nd.Add(2,89);\nd.Add(3,77);\nd.Add(4,88);\n\n// Di...
JavaScript Insert space after every two letters in string?
For this, use replace() along with regular expressions. Following is the code − var values = "JavaScriptTutorial"; var result = values.replace(/.{1,2}(?=(.{2})+$)/g, '$& '); console.log("The actual result is="); console.log(values); console.log("After inserting space at nth position=") console.log(result); To run the a...
[ { "code": null, "e": 1118, "s": 1062, "text": "For this, use replace() along with regular expressions." }, { "code": null, "e": 1142, "s": 1118, "text": "Following is the code −" }, { "code": null, "e": 1370, "s": 1142, "text": "var values = \"JavaScriptTutori...
Perfect Squares in C++
Suppose we have a positive integer n, find the least number of perfect square numbers whose sum is n. So if the number is 13, then the output is 2, as the numbers are 13 = 9 + 4 To solve this, we will follow these steps − create one table for dynamic programming, of length n + 1, and fill it with infinity dp[0] := 0 fo...
[ { "code": null, "e": 1240, "s": 1062, "text": "Suppose we have a positive integer n, find the least number of perfect square numbers whose sum is n. So if the number is 13, then the output is 2, as the numbers are 13 = 9 + 4" }, { "code": null, "e": 1284, "s": 1240, "text": "To s...
Minimum Cost Tree From Leaf Values in Python
Suppose we have an array arr of positive integers, consider all binary trees such that − Each node has either 0 or 2 children; The values of arr array correspond to the values of each leaf in an inorder traversal of the tree. The value of each non-leaf node is equal to the product of the largest leaf value in its left ...
[ { "code": null, "e": 1151, "s": 1062, "text": "Suppose we have an array arr of positive integers, consider all binary trees such that −" }, { "code": null, "e": 1189, "s": 1151, "text": "Each node has either 0 or 2 children;" }, { "code": null, "e": 1288, "s": 118...
Kaggle — Predict survival on the Titanic challenge in MATLAB | by Abhishek Das | Towards Data Science
The objective of this Kaggle challenge is to create a Machine Learning model which is able to predict the survival of a passenger on the Titanic, given their features like age, sex, fare, ticket class etc. The outline of this tutorial is as follows: Data AnalysisFeature EngineeringModel FittingPrediction on the test se...
[ { "code": null, "e": 378, "s": 172, "text": "The objective of this Kaggle challenge is to create a Machine Learning model which is able to predict the survival of a passenger on the Titanic, given their features like age, sex, fare, ticket class etc." }, { "code": null, "e": 422, "s"...
Angular 7 | Observables - GeeksforGeeks
25 Sep, 2020 Observables provide support for data sharing between publishers and subscribers in an angular application. It is referred to as a better technique for event handling, asynchronous programming, and handling multiple values as compared to techniques like promises.A special feature of Observables is that it c...
[ { "code": null, "e": 25730, "s": 25702, "text": "\n25 Sep, 2020" }, { "code": null, "e": 26783, "s": 25730, "text": "Observables provide support for data sharing between publishers and subscribers in an angular application. It is referred to as a better technique for event handli...
HTML | DOM ondrop Event - GeeksforGeeks
12 Dec, 2021 The HTML DOM ondrop event occurs when a draggable element is dropped on a valid drop target.There are some events that are used and occurred in the different stages of a drag and drop operation: Events fired on the draggable target: ondragstart: occurs when dragging of an element started. ondrag: occurs w...
[ { "code": null, "e": 26305, "s": 26277, "text": "\n12 Dec, 2021" }, { "code": null, "e": 26501, "s": 26305, "text": "The HTML DOM ondrop event occurs when a draggable element is dropped on a valid drop target.There are some events that are used and occurred in the different stage...
Output of C Programs | Set 13 - GeeksforGeeks
05 Jul, 2018 Difficulty Level: Rookie Question 1Predict the output of below program. int main(){ char arr[] = "geeksforgeeks"; printf("%d", sizeof(arr)); getchar(); return 0;} Output: 14The string “geeksforgeeks” has 13 characters, but the size is 14 because compiler includes a single ‘\0’ (string terminator) when ...
[ { "code": null, "e": 25235, "s": 25207, "text": "\n05 Jul, 2018" }, { "code": null, "e": 25260, "s": 25235, "text": "Difficulty Level: Rookie" }, { "code": null, "e": 25307, "s": 25260, "text": "Question 1Predict the output of below program." }, { "cod...
numpy.ma.mask_cols() function | Python - GeeksforGeeks
22 Apr, 2020 In thisnumpy.ma.mask_cols() function, mask columns of a 2D array that contain masked values. This function is a shortcut to mask_rowcols with axis equal to 1. Syntax : numpy.ma.mask_cols(arr, axis = None) Parameters :arr : [array_like, MaskedArray] The array to mask.axis : [int, optional] Axis along which ...
[ { "code": null, "e": 25537, "s": 25509, "text": "\n22 Apr, 2020" }, { "code": null, "e": 25696, "s": 25537, "text": "In thisnumpy.ma.mask_cols() function, mask columns of a 2D array that contain masked values. This function is a shortcut to mask_rowcols with axis equal to 1." }...
Get a list of all the heading tags using BeautifulSoup - GeeksforGeeks
26 Jul, 2021 In order to print all the heading tags using BeautifulSoup, we use the find_all() method. The find_all method is one of the most common methods in BeautifulSoup. It looks through a tag and retrieves all the occurrences of that tag. Syntax: find_all(name, attrs, recursive, string, limit, **kwargs) An HTML d...
[ { "code": null, "e": 25537, "s": 25509, "text": "\n26 Jul, 2021" }, { "code": null, "e": 25769, "s": 25537, "text": "In order to print all the heading tags using BeautifulSoup, we use the find_all() method. The find_all method is one of the most common methods in BeautifulSoup. I...
find_elements_by_class_name() driver method - Selenium Python - GeeksforGeeks
23 Nov, 2021 Selenium’s Python Module is built to perform automated testing with Python. Selenium Python bindings provide a simple API to write functional/acceptance tests using Selenium WebDriver. After you have installed selenium and checked out – Navigating links using the get method, you might want to play more wit...
[ { "code": null, "e": 26043, "s": 26015, "text": "\n23 Nov, 2021" }, { "code": null, "e": 26922, "s": 26043, "text": "Selenium’s Python Module is built to perform automated testing with Python. Selenium Python bindings provide a simple API to write functional/acceptance tests usin...
Lodash _.some() Method - GeeksforGeeks
27 Sep, 2021 Lodash is a JavaScript library that works on the top of underscore.js. Lodash helps in working with arrays, collection, strings, objects, numbers, etc. The _.some() method is used to check if predicate return true for any element of collection. Iteration is stopped once predicate return true. Syntax: _....
[ { "code": null, "e": 26570, "s": 26542, "text": "\n27 Sep, 2021" }, { "code": null, "e": 26723, "s": 26570, "text": "Lodash is a JavaScript library that works on the top of underscore.js. Lodash helps in working with arrays, collection, strings, objects, numbers, etc. " }, { ...
Map Interface in Java - GeeksforGeeks
11 May, 2022 The map interface is present in java.util package represents a mapping between a key and a value. The Map interface is not a subtype of the Collection interface. Therefore it behaves a bit differently from the rest of the collection types. A map contains unique keys. Geeks, the brainstormer should have bee...
[ { "code": null, "e": 30195, "s": 30167, "text": "\n11 May, 2022" }, { "code": null, "e": 30463, "s": 30195, "text": "The map interface is present in java.util package represents a mapping between a key and a value. The Map interface is not a subtype of the Collection interface. T...
Perl | Recursive Subroutines - GeeksforGeeks
19 Jan, 2022 Prerequisite: Recursion in PerlRecursive means pertaining to or using a rule or procedure that can be applied repeatedly. It is the process of defining a function or calculating a number by the repeated application of an algorithm. Recursive Subroutine is a type of subroutine that calls itself as part of i...
[ { "code": null, "e": 25543, "s": 25515, "text": "\n19 Jan, 2022" }, { "code": null, "e": 26128, "s": 25543, "text": "Prerequisite: Recursion in PerlRecursive means pertaining to or using a rule or procedure that can be applied repeatedly. It is the process of defining a function ...
Check if the tower of sight issue occurs or not - GeeksforGeeks
22 Nov, 2021 Given four co-ordinates A, B, C and D where towers need to be constructed, the task is to check if the tower of sight issue occurs or not. Tower of sight issue occurs if the towers at A or C lies in the line joining B and D or vice versa. Examples: Input: A = (0, 0), B = (0, -2), C = (2, 0), D = (0, 2)...
[ { "code": null, "e": 26587, "s": 26559, "text": "\n22 Nov, 2021" }, { "code": null, "e": 26728, "s": 26587, "text": "Given four co-ordinates A, B, C and D where towers need to be constructed, the task is to check if the tower of sight issue occurs or not. " }, { "code": ...
Chrono in C++ - GeeksforGeeks
29 May, 2017 Chrono library is used to deal with date and time. This library was designed to deal with the fact that timers and clocks might be different on different systems and thus to improve over time in terms of precision. The unique thing about chrono is that it provides a precision-neutral concept by separating ...
[ { "code": null, "e": 26015, "s": 25987, "text": "\n29 May, 2017" }, { "code": null, "e": 26385, "s": 26015, "text": "Chrono library is used to deal with date and time. This library was designed to deal with the fact that timers and clocks might be different on different systems a...
How to set position relative to top of a canvas circle using Fabric.js ? - GeeksforGeeks
12 May, 2020 In this article, we are going to see how to position relative to the top of a canvas circle using FabricJS. The canvas means the circle is movable and can be stretched according to requirement. Further, the circle can be customized when it comes to initial stroke color, fill color, stroke width or radius. ...
[ { "code": null, "e": 25945, "s": 25917, "text": "\n12 May, 2020" }, { "code": null, "e": 26252, "s": 25945, "text": "In this article, we are going to see how to position relative to the top of a canvas circle using FabricJS. The canvas means the circle is movable and can be stret...
HashedIn Interview Experience (On-Campus) - GeeksforGeeks
26 Sep, 2021 Difficulty Level: Medium I want to share my interview experience for Hashedin. Hashedin Visited our college in September 2021. Round 1: Online Coding Assessment There were 3 coding questions. Given a string s and integer k. We have to return the string having <= k characters of the string s from the beginn...
[ { "code": null, "e": 26287, "s": 26259, "text": "\n26 Sep, 2021" }, { "code": null, "e": 26312, "s": 26287, "text": "Difficulty Level: Medium" }, { "code": null, "e": 26414, "s": 26312, "text": "I want to share my interview experience for Hashedin. Hashedin Vi...
How to detect copy paste commands Ctrl+V, Ctrl+C using JavaScript ? - GeeksforGeeks
23 Sep, 2020 To detect the combination of keys with “Ctrl”, we use the ctrl property of the keydown event. It returns a “boolean” value to tell if “ctrl” is pressed or not when the key event got triggered. Syntax: event.ctrlKey Return Value: true: When “ctrl” was pressed. false: When “ctrl” was not pressed. HTML code: ...
[ { "code": null, "e": 26621, "s": 26593, "text": "\n23 Sep, 2020" }, { "code": null, "e": 26814, "s": 26621, "text": "To detect the combination of keys with “Ctrl”, we use the ctrl property of the keydown event. It returns a “boolean” value to tell if “ctrl” is pressed or not when...
Java Program To Check Whether Two Strings Are Anagram Of Each Other - GeeksforGeeks
23 Dec, 2021 Write a function to check whether two given strings are anagram of each other or not. An anagram of a string is another string that contains the same characters, only the order of characters can be different. For example, “abcd” and “dabc” are an anagram of each other. Method 1 (Use Sorting): Sort both str...
[ { "code": null, "e": 26217, "s": 26189, "text": "\n23 Dec, 2021" }, { "code": null, "e": 26487, "s": 26217, "text": "Write a function to check whether two given strings are anagram of each other or not. An anagram of a string is another string that contains the same characters, o...
Arithmetic Expression Having Only + and * Operators in Java - GeeksforGeeks
13 Oct, 2020 Here, we will discuss the Arithmetic expression having operators like addition and multiplication and you will see how you can take an expression and can calculate the value with the help of the program. Given an expression having only + and * operators, the task is to evaluate the String expression and f...
[ { "code": null, "e": 23868, "s": 23840, "text": "\n13 Oct, 2020" }, { "code": null, "e": 24073, "s": 23868, "text": "Here, we will discuss the Arithmetic expression having operators like addition and multiplication and you will see how you can take an expression and can calculate...
GATE | GATE CS 2011 | Question 11 - GeeksforGeeks
28 Jun, 2021 A computer handles several interrupt sources of which the following are relevant for this question. . Interrupt from CPU temperature sensor (raises interrupt if CPU temperature is too high) . Interrupt from Mouse(raises interrupt if the mouse is moved or a button is pressed) . Interrupt from Keyboar...
[ { "code": null, "e": 24370, "s": 24342, "text": "\n28 Jun, 2021" }, { "code": null, "e": 24470, "s": 24370, "text": "A computer handles several interrupt sources of which the following are relevant for this question." }, { "code": null, "e": 24812, "s": 24470, ...
Check if a given mobile number is fancy - GeeksforGeeks
13 May, 2021 Given a mobile number and some conditions for a fancy number, find if the given number is fancy. A 10 digit mobile number is called fancy if it satisfies any of the following three conditions. A single number occurs three consecutive times. Like 777.Three consecutive digits are either in increasing or de...
[ { "code": null, "e": 25098, "s": 25070, "text": "\n13 May, 2021" }, { "code": null, "e": 25293, "s": 25098, "text": "Given a mobile number and some conditions for a fancy number, find if the given number is fancy. A 10 digit mobile number is called fancy if it satisfies any of th...
Linear Regression: Moneyball — Part 2 | by Sayar Banerjee | Towards Data Science
This post is the sequel to Linear Regression: Moneyball — Part 1. If you haven’t checked that out, I would highly recommend you to do so. By the end of the prior post, we had established a linear relationship between RD (Runs difference) and W (wins). We had also established that there was an extremely strong positive ...
[ { "code": null, "e": 310, "s": 172, "text": "This post is the sequel to Linear Regression: Moneyball — Part 1. If you haven’t checked that out, I would highly recommend you to do so." }, { "code": null, "e": 424, "s": 310, "text": "By the end of the prior post, we had established...
Count of subarrays having exactly K prime numbers - GeeksforGeeks
18 Nov, 2021 Given an array arr[] of N integers and a number K. The task is to count the number of subarray with exactly K Prime Numbers.Example: Input: arr[] = {1, 2, 3, 4}, K = 2 Output: 4 Explanation: Since total number of prime number in the array are 2. So the 4 subarray with 2 prime number are: 1. {2, 3} 2. {1,...
[ { "code": null, "e": 24796, "s": 24768, "text": "\n18 Nov, 2021" }, { "code": null, "e": 24931, "s": 24796, "text": "Given an array arr[] of N integers and a number K. The task is to count the number of subarray with exactly K Prime Numbers.Example: " }, { "code": null, ...
Protocol Testing Tutorial – L2 & L3
When a computer communicates with another computer, it must adhere to a shared set of rules and circumstances. Protocols, in other words, define how data is transferred between computers and through networks. Protocol testing is a method of validating communication protocols in fields like switching, wireless, VoIP, ro...
[ { "code": null, "e": 1271, "s": 1062, "text": "When a computer communicates with another computer, it must adhere to a shared set of rules and circumstances. Protocols, in other words, define how data is transferred between computers and through networks." }, { "code": null, "e": 1646, ...
Plot multiple columns of Pandas dataframe on the bar chart in Matplotlib
To plot multiple columns of a Pandas dataframe on the bar chart in matplotlib, we can take the following steps − Make a dictionary of different keys, between 1 to 10 range. Make a dictionary of different keys, between 1 to 10 range. Make a dataframe using Pandas dataframe. Make a dataframe using Pandas dataframe. Creat...
[ { "code": null, "e": 1175, "s": 1062, "text": "To plot multiple columns of a Pandas dataframe on the bar chart in matplotlib, we can take the following steps −" }, { "code": null, "e": 1235, "s": 1175, "text": "Make a dictionary of different keys, between 1 to 10 range." }, {...
Correct Way to Add a Splash Screen in Android - GeeksforGeeks
23 Jul, 2021 Google previously advised against utilizing a Splash Screen for Android Applications. It was pointless. Then, when they released the Material Design Specifications, several of us noticed that the Splash Screen had been renamed Launch Screen. Ideal for displaying your brand. So, what is the distinction betw...
[ { "code": null, "e": 24725, "s": 24697, "text": "\n23 Jul, 2021" }, { "code": null, "e": 25085, "s": 24725, "text": "Google previously advised against utilizing a Splash Screen for Android Applications. It was pointless. Then, when they released the Material Design Specifications...
Comment in header file name? - GeeksforGeeks
08 May, 2017 What happens if there is a comment in header file name?Parsing of `#include’ is slightly special because comments are not recognized within the ”. Thus, in `#include ‘ the `/*’ does not start a comment and the directive specifies inclusion of a system header file named `x/*y’. Of course, a header file with...
[ { "code": null, "e": 23841, "s": 23813, "text": "\n08 May, 2017" }, { "code": null, "e": 24255, "s": 23841, "text": "What happens if there is a comment in header file name?Parsing of `#include’ is slightly special because comments are not recognized within the ”. Thus, in `#inclu...
Visualization For Timeseries Exchange Data Using Plotly | by Antonello Calamea | Towards Data Science
Recently, I had the opportunity to deal with crypto exchange public data and this allowed me to visually explore the data using Plotly libraries, one of the best visualization tools available, as it will enable us to have general interactive graphs without worrying about coding part — like I used to do with Bokeh. If y...
[ { "code": null, "e": 362, "s": 46, "text": "Recently, I had the opportunity to deal with crypto exchange public data and this allowed me to visually explore the data using Plotly libraries, one of the best visualization tools available, as it will enable us to have general interactive graphs without...
How to set Android Toast duration longer than Toast.LENGTH_LONG?
This example demonstrates how to set Android Toast duration longer than Toast.LENGTH_LONG. Step 1 − Create a new project in Android Studio, go to File ⇒ New Project and fill all required details to create a new project. Step 2 − Add the following code to res/layout/activity_main.xml. <?xml version="1.0" encoding="utf-8...
[ { "code": null, "e": 1153, "s": 1062, "text": "This example demonstrates how to set Android Toast duration longer than Toast.LENGTH_LONG." }, { "code": null, "e": 1282, "s": 1153, "text": "Step 1 − Create a new project in Android Studio, go to File ⇒ New Project and fill all requ...
Powershell - Create Folder
New-Item cmdlet is used to create a directory by passing the path using -Path as path of the directory and -ItemType as Directory. In this example, we'll create a folder in D:\Temp\ with name "Test Folder" Type the following command in PowerShell ISE Console New-Item -Path 'D:\temp\Test Folder' -ItemType Directory You ...
[ { "code": null, "e": 2165, "s": 2034, "text": "New-Item cmdlet is used to create a directory by passing the path using -Path as path of the directory and -ItemType as Directory." }, { "code": null, "e": 2240, "s": 2165, "text": "In this example, we'll create a folder in D:\\Temp\...
Dockerize your Flask App - GeeksforGeeks
29 Dec, 2019 Python provides many ways to distribute your python projects. One such way is by using an important technology called Docker. Docker is an open-source application that allows administrators to create, manage, deploy, and replicate applications using containers. It is basically a platform that enables devel...
[ { "code": null, "e": 24547, "s": 24519, "text": "\n29 Dec, 2019" }, { "code": null, "e": 25534, "s": 24547, "text": "Python provides many ways to distribute your python projects. One such way is by using an important technology called Docker. Docker is an open-source application ...
Add two numbers represented by two arrays in C Program
A number represented by the array is stored in such a form that each digit of the number is represented by an element of the array. For example, Number 234 in array is {2,3,4}. To add to such numbers we will first add number at the least significant digit and if the sum is greater than 10 propagate the carry. After thi...
[ { "code": null, "e": 1207, "s": 1062, "text": "A number represented by the array is stored in such a form that each digit of the number is represented by an element of the array. For example," }, { "code": null, "e": 1239, "s": 1207, "text": "Number 234 in array is {2,3,4}." },...
Split Pandas Dataframe by column value - GeeksforGeeks
20 Apr, 2022 Sometimes in order to analyze the Dataframe more accurately, we need to split it into 2 or more parts. The Pandas provide the feature to split Dataframe according to column index, row index, and column values, etc. Let’ see how to Split Pandas Dataframe by column value in Python? Now, let’s create a Data...
[ { "code": null, "e": 24292, "s": 24264, "text": "\n20 Apr, 2022" }, { "code": null, "e": 24508, "s": 24292, "text": "Sometimes in order to analyze the Dataframe more accurately, we need to split it into 2 or more parts. The Pandas provide the feature to split Dataframe according ...
How to Create Text on Canvas using Fabric.js ? - GeeksforGeeks
31 Aug, 2021 In this article, we are going to see how to create a text on canvas using FabricJS. The text on canvas means text written is movable and can be stretched according to requirement. Further, the text itself cannot be edited like a textbox. Approach: To make this possible we are going to use a JavaScript libr...
[ { "code": null, "e": 24810, "s": 24782, "text": "\n31 Aug, 2021" }, { "code": null, "e": 25048, "s": 24810, "text": "In this article, we are going to see how to create a text on canvas using FabricJS. The text on canvas means text written is movable and can be stretched according...
Python Pandas – Find the common rows between two Data Frames
To find the common rows between two DataFrames, use the merge() method. Let us first create DataFrame1 with two columns − dataFrame1 = pd.DataFrame( { "Car": ['BMW', 'Lexus', 'Audi', 'Tesla', 'Bentley', 'Jaguar'], "Units": [100, 150, 110, 80, 110, 90] } ) Create DataFrame2 with two columns − dataFrame2 =...
[ { "code": null, "e": 1184, "s": 1062, "text": "To find the common rows between two DataFrames, use the merge() method. Let us first create DataFrame1 with two columns −" }, { "code": null, "e": 1333, "s": 1184, "text": "dataFrame1 = pd.DataFrame(\n {\n \"Car\": ['BMW', 'Le...
The Concave Hull. Creating a cluster border using a... | by João Paulo Figueira | Towards Data Science
Creating a cluster border using a K-nearest neighbors approach A couple of months ago, I wrote here on Medium an article on mapping the UK’s traffic accidents hot spots. I was mostly concerned about illustrating the use of the DBSCAN clustering algorithm on geographical data. In the article, I used geographical informa...
[ { "code": null, "e": 235, "s": 172, "text": "Creating a cluster border using a K-nearest neighbors approach" }, { "code": null, "e": 782, "s": 235, "text": "A couple of months ago, I wrote here on Medium an article on mapping the UK’s traffic accidents hot spots. I was mostly con...
Getting enumerator that iterates through the Queue in C# - GeeksforGeeks
28 Jan, 2019 Queue<T>.GetEnumerator Method is used to get an enumerator which can iterate through the Queue. And it comes under the System.Collections.Generic namespace. Syntax: public System.Collections.Generic.Queue<T>.Enumerator GetEnumerator (); Below programs illustrate the use of the above-discussed method: Examp...
[ { "code": null, "e": 24302, "s": 24274, "text": "\n28 Jan, 2019" }, { "code": null, "e": 24459, "s": 24302, "text": "Queue<T>.GetEnumerator Method is used to get an enumerator which can iterate through the Queue. And it comes under the System.Collections.Generic namespace." }, ...
Python | List of tuples to String - GeeksforGeeks
29 Oct, 2019 Many times we can have a problem in which we need to perform interconversion between strings and in those cases, we can have a problem in which we need to convert a tuple list to raw, comma separated string. Let’s discuss certain ways in which this task can be performed. Method #1 : Using str() + strip()Th...
[ { "code": null, "e": 24292, "s": 24264, "text": "\n29 Oct, 2019" }, { "code": null, "e": 24564, "s": 24292, "text": "Many times we can have a problem in which we need to perform interconversion between strings and in those cases, we can have a problem in which we need to convert ...
Outlier Detection with Isolation Forest | by Eryk Lewinson | Towards Data Science
Update: Part 2 describing the Extended Isolation Forest is available here. During a recent project, I was working on a clustering problem with data collected from users of a mobile app. The goal was to classify the users in terms of their behavior, potentially with the use of K-means clustering. However, after inspecti...
[ { "code": null, "e": 246, "s": 171, "text": "Update: Part 2 describing the Extended Isolation Forest is available here." }, { "code": null, "e": 585, "s": 246, "text": "During a recent project, I was working on a clustering problem with data collected from users of a mobile app. ...
Spark structured streaming with HTTP REST endpoints serving JSON data | Towards Data Science
Writing distributed applications could be a time-consuming process. While running simple spark.range( 0, 10 ).reduce( _ + _ ) ( A “Hello World” example of Spark ) code on your local machine is easy enough, it eventually gets complicated as you come across more complex real-world use cases, especially in the Structured ...
[ { "code": null, "e": 603, "s": 172, "text": "Writing distributed applications could be a time-consuming process. While running simple spark.range( 0, 10 ).reduce( _ + _ ) ( A “Hello World” example of Spark ) code on your local machine is easy enough, it eventually gets complicated as you come across...
numpy.broadcast
As seen earlier, NumPy has in-built support for broadcasting. This function mimics the broadcasting mechanism. It returns an object that encapsulates the result of broadcasting one array against the other. The function takes two arrays as input parameters. Following example illustrates its use. import numpy as np x = ...
[ { "code": null, "e": 2449, "s": 2243, "text": "As seen earlier, NumPy has in-built support for broadcasting. This function mimics the broadcasting mechanism. It returns an object that encapsulates the result of broadcasting one array against the other." }, { "code": null, "e": 2539, ...
How to Find the Factorial of a Number using Python?
Factorial of a number is the product of all integers between 1 and itself. To find factorial of a given number, let us form a for loop over a range from 1 to itself. Remember that range() function excludes the stop value. Hence stop value should be one more than the input number. Each number in range is cumulatively m...
[ { "code": null, "e": 1344, "s": 1062, "text": "Factorial of a number is the product of all integers between 1 and itself. To find factorial of a given number, let us form a for loop over a range from 1 to itself. Remember that range() function excludes the stop value. Hence stop value should be one ...
Python - Save List to CSV - GeeksforGeeks
10 Jul, 2020 A CSV (Comma Separated Values) is a simple file format, used to store data in a tabular format. CSV file stores tabular data (numbers and text) in plain text. Each line of the file is a data record. Each record consists of one or more fields, separated by commas. The use of the comma as a field separator i...
[ { "code": null, "e": 24436, "s": 24408, "text": "\n10 Jul, 2020" }, { "code": null, "e": 24790, "s": 24436, "text": "A CSV (Comma Separated Values) is a simple file format, used to store data in a tabular format. CSV file stores tabular data (numbers and text) in plain text. Each...
GRE Algebra | Applications - GeeksforGeeks
07 Jun, 2019 Algebra and its application cover a large chunk of the quantitative reasoning part of the GRE test paper. This is due to the fact that algebra has a good number of topics under its head. The topics which form a part of algebra as follows: Expanding expressionsBasic equationsSystems of equationsQuadratic eq...
[ { "code": null, "e": 24295, "s": 24267, "text": "\n07 Jun, 2019" }, { "code": null, "e": 24534, "s": 24295, "text": "Algebra and its application cover a large chunk of the quantitative reasoning part of the GRE test paper. This is due to the fact that algebra has a good number of...
CSS Styling Links
With CSS, links can be styled in many different ways. Links can be styled with any CSS property (e.g. color, font-family, background, etc.). In addition, links can be styled differently depending on what state they are in. The four links states are: a:link - a normal, unvisited link a:visited - a link the user has v...
[ { "code": null, "e": 54, "s": 0, "text": "With CSS, links can be styled in many different ways." }, { "code": null, "e": 142, "s": 54, "text": "Links can be styled with any CSS property (e.g. color, font-family, \nbackground, etc.)." }, { "code": null, "e": 225, "...
Add Watermark to PDF using PyPDF4 in Python - GeeksforGeeks
23 Oct, 2020 We are quite familiar with the most commonly used data format of PDF (Portable Document Format), with an extension .pdf. While the PDF was originally invented by Adobe, though maintained by ISO now, is used to present and exchange documents across various OSs. It could be installed using pip or conda depe...
[ { "code": null, "e": 25647, "s": 25619, "text": "\n23 Oct, 2020" }, { "code": null, "e": 25909, "s": 25647, "text": "We are quite familiar with the most commonly used data format of PDF (Portable Document Format), with an extension .pdf. While the PDF was originally invented by ...
Constructors in Python - GeeksforGeeks
10 Aug, 2021 Prerequisites: Object-Oriented Programming in Python, Object-Oriented Programming in Python | Set 2 Constructors are generally used for instantiating an object. The task of constructors is to initialize(assign values) to the data members of the class when an object of the class is created. In Python the __...
[ { "code": null, "e": 42933, "s": 42905, "text": "\n10 Aug, 2021" }, { "code": null, "e": 43366, "s": 42933, "text": "Prerequisites: Object-Oriented Programming in Python, Object-Oriented Programming in Python | Set 2 Constructors are generally used for instantiating an object. Th...
D3.js zoom.transform() Function - GeeksforGeeks
07 Sep, 2020 The zoom.transform() function in D3.js is used to set the current zoom transform of the selected elements to the specified transform. Syntax: zoom.transform(selection, transform[, point]); Parameters: This function accepts single parameter as mentioned above and described below: selection: This parameter c...
[ { "code": null, "e": 25517, "s": 25489, "text": "\n07 Sep, 2020" }, { "code": null, "e": 25651, "s": 25517, "text": "The zoom.transform() function in D3.js is used to set the current zoom transform of the selected elements to the specified transform." }, { "code": null, ...
Deploying TensorFlow Models to the Web | by James Briggs | Towards Data Science
Developing machine learning models in Python can be a wonderful experience. The support and community for all things ML and data science in Python is simply unparalleled in any other language. Despite this, there are very few ways to share those models with non-Python users — which for most of us, describes the majorit...
[ { "code": null, "e": 364, "s": 171, "text": "Developing machine learning models in Python can be a wonderful experience. The support and community for all things ML and data science in Python is simply unparalleled in any other language." }, { "code": null, "e": 526, "s": 364, "t...
DateTime.AddDays() Method in C# - GeeksforGeeks
21 Jan, 2019 This method is used to return a new DateTime that adds the specified number of days to the value of this instance. Syntax: public DateTime AddDays (double value); Here, the value is the number of whole and fractional days. The value parameter can be negative or positive. Return Value: This method returns a...
[ { "code": null, "e": 24136, "s": 24108, "text": "\n21 Jan, 2019" }, { "code": null, "e": 24251, "s": 24136, "text": "This method is used to return a new DateTime that adds the specified number of days to the value of this instance." }, { "code": null, "e": 24259, ...
Star elements | Practice | GeeksforGeeks
Given an unsorted array arr of size n. The task is to find all the star and super star elements in the array. Star are those elements which are strictly greater than all the elements on its right side. Super star are those elements which are strictly greater than all the elements on its left and right side. Note: Assum...
[ { "code": null, "e": 535, "s": 226, "text": "Given an unsorted array arr of size n. The task is to find all the star and super star elements in the array. Star are those elements which are strictly greater than all the elements on its right side. Super star are those elements which are strictly grea...
Count of elements that are binary searchable in the given array - GeeksforGeeks
28 Oct, 2021 Given an array arr[] consisting of N integers, the task is to find the maximum count of integers that are binary searchable in the given array. Examples: Input: arr[] = {1, 3, 2}Output: 2Explanation: arr[0], arr[1] can be found. Input: arr[] = {3, 2, 1, 10, 23, 22, 21}Output: 3Explanation: arr[1], arr[3], ...
[ { "code": null, "e": 26041, "s": 26013, "text": "\n28 Oct, 2021" }, { "code": null, "e": 26185, "s": 26041, "text": "Given an array arr[] consisting of N integers, the task is to find the maximum count of integers that are binary searchable in the given array." }, { "code...
Thread.sleep() Method in Java With Examples
19 Feb, 2022 Thread Class is a class that is basically a thread of execution of the programs. It is present in Java.lang package. Thread class contains the Sleep() method. There are two overloaded methods of Sleep() method present in Thread Class, one is with one argument and another one is with two arguments. The slee...
[ { "code": null, "e": 53, "s": 25, "text": "\n19 Feb, 2022" }, { "code": null, "e": 606, "s": 53, "text": "Thread Class is a class that is basically a thread of execution of the programs. It is present in Java.lang package. Thread class contains the Sleep() method. There are two o...
Iterators in C#
Iterator performs a custom iteration over a collection. It uses the yield return statement and returns each element one at a time. The iterator remembers the current location and in the next iteration the next element is returned. The following is an example − Live Demo using System; using System.Collections.Generic; ...
[ { "code": null, "e": 1418, "s": 1187, "text": "Iterator performs a custom iteration over a collection. It uses the yield return statement and returns each element one at a time. The iterator remembers the current location and in the next iteration the next element is returned." }, { "code": ...
Create PySpark dataframe from nested dictionary
17 Jun, 2021 In this article, we are going to discuss the creation of Pyspark dataframe from the nested dictionary. We will use the createDataFrame() method from pyspark for creating DataFrame. For this, we will use a list of nested dictionary and extract the pair as a key and value. Select the key, value pairs by men...
[ { "code": null, "e": 28, "s": 0, "text": "\n17 Jun, 2021" }, { "code": null, "e": 132, "s": 28, "text": "In this article, we are going to discuss the creation of Pyspark dataframe from the nested dictionary. " }, { "code": null, "e": 391, "s": 132, "text": "We...
Java Programming Language - GeeksforGeeks
23 May, 2022 Java is one of the most popular and widely used programming languages. Java has been one of the most popular programming languages for many years. Java is Object Oriented. However, it is not considered as pure object-oriented as it provides support for primitive data types (like int, char, etc) The Java co...
[ { "code": null, "e": 29819, "s": 29791, "text": "\n23 May, 2022" }, { "code": null, "e": 29890, "s": 29819, "text": "Java is one of the most popular and widely used programming languages." }, { "code": null, "e": 29966, "s": 29890, "text": "Java has been one o...
Python | Pandas DataFrame.isin()
17 Sep, 2018 Python is a great language for doing data analysis, primarily because of the fantastic ecosystem of data-centric python packages. Pandas is one of those packages and makes importing and analyzing data much easier. Pandas isin() method is used to filter data frames. isin() method helps in selecting rows wit...
[ { "code": null, "e": 53, "s": 25, "text": "\n17 Sep, 2018" }, { "code": null, "e": 267, "s": 53, "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 im...
Generating Word Cloud in R Programming
29 Jul, 2021 Word Cloud is a data visualization technique used for representing text data in which the size of each word indicates its frequency or importance. Significant textual data points can be highlighted using a word cloud. Word clouds are widely used for analyzing data from social network websites. The reasons...
[ { "code": null, "e": 28, "s": 0, "text": "\n29 Jul, 2021" }, { "code": null, "e": 324, "s": 28, "text": "Word Cloud is a data visualization technique used for representing text data in which the size of each word indicates its frequency or importance. Significant textual data poi...
Two-Dimensional Tensors in Pytorch
30 Aug, 2021 PyTorch is a python library developed by Facebook to run and train machine learning and deep learning models. In PyTorch everything is based on tensor operations. Two-dimensional tensors are nothing but matrices or vectors of two-dimension with specific datatype, of n rows and n columns. Representation: A ...
[ { "code": null, "e": 28, "s": 0, "text": "\n30 Aug, 2021" }, { "code": null, "e": 191, "s": 28, "text": "PyTorch is a python library developed by Facebook to run and train machine learning and deep learning models. In PyTorch everything is based on tensor operations." }, { ...
How to remove an object from a list in Python?
You can use 3 different methods to remove an object from a list in Python. They are remove, del and pop. You can use them as follows − The remove method removes the first value matching the argument to remove from the list, not a specific index. a = [3, 2, 3, 2] a.remove(3) print(a) This will give the output − [2, 3, ...
[ { "code": null, "e": 1322, "s": 1187, "text": "You can use 3 different methods to remove an object from a list in Python. They are remove, del and pop. You can use them as follows −" }, { "code": null, "e": 1434, "s": 1322, "text": "The remove method removes the first value match...
How to identify blocked and blocking sessions in Oracle ?
Problem: You’d like to identify the blocking and the blocked sessions in your database. Solution When we see an enqueue wait event in an Oracle database, the chances are that there is some thing locking or holding up some sessions from executing their SQL statements. When a session waits on an “enqueue” wait event, tha...
[ { "code": null, "e": 1196, "s": 1187, "text": "Problem:" }, { "code": null, "e": 1275, "s": 1196, "text": "You’d like to identify the blocking and the blocked sessions in your database." }, { "code": null, "e": 1284, "s": 1275, "text": "Solution" }, { ...
How to run two animations simultaneously in jQuery ?
22 Apr, 2020 The .animate() method in jQuery is used to handle effects and animations. Properties which have numeric values can be animated by this method such as width, height, border-width etc. however, the property names should be camel cased( eg. borderWidth). Usually, if different animations are chained on the sam...
[ { "code": null, "e": 28, "s": 0, "text": "\n22 Apr, 2020" }, { "code": null, "e": 693, "s": 28, "text": "The .animate() method in jQuery is used to handle effects and animations. Properties which have numeric values can be animated by this method such as width, height, border-wid...
Pollard’s Rho Algorithm for Prime Factorization
31 May, 2022 Given a positive integer n, and that it is composite, find a divisor of it.Example: Input: n = 12; Output: 2 [OR 3 OR 4] Input: n = 187; Output: 11 [OR 17] Brute approach: Test all integers less than n until a divisor is found. Improvisation: Test all integers less than √nA large enough number will still ...
[ { "code": null, "e": 52, "s": 24, "text": "\n31 May, 2022" }, { "code": null, "e": 136, "s": 52, "text": "Given a positive integer n, and that it is composite, find a divisor of it.Example:" }, { "code": null, "e": 209, "s": 136, "text": "Input: n = 12;\nOutpu...
Perl tr Function
This is not a function. This is the transliteration operator; it replaces all occurrences of the characters in SEARCHLIST with the characters in REPLACEMENTLIST. Following is the simple syntax for this function − tr/SEARCHLIST/REPLACEMENTLIST/ This function returns number of characters replaced or deleted. Following i...
[ { "code": null, "e": 2516, "s": 2354, "text": "This is not a function. This is the transliteration operator; it replaces all occurrences of the characters in SEARCHLIST with the characters in REPLACEMENTLIST." }, { "code": null, "e": 2567, "s": 2516, "text": "Following is the sim...
Count ways to divide circle using N non-intersecting chords
22 Jun, 2022 Given a number N, find the number of ways you can draw N chords in a circle with 2*N points such that no 2 chords intersect. Two ways are different if there exists a chord which is present in one way and not in other.Examples: Input : N = 2 Output : 2 Explanation: If points are numbered 1 to 4 in clockw...
[ { "code": null, "e": 52, "s": 24, "text": "\n22 Jun, 2022" }, { "code": null, "e": 281, "s": 52, "text": "Given a number N, find the number of ways you can draw N chords in a circle with 2*N points such that no 2 chords intersect. Two ways are different if there exists a chord wh...
How to match username and password in database in SQL ?
02 Dec, 2021 In this article, we are going to check the credentials (username and password) entered by the user. If credentials are matched from the database entries, the user can enter into another page and if credentials are incorrect then it displays “Sorry Invalid Username and Password”. Pre-requisites: XAMPP serve...
[ { "code": null, "e": 28, "s": 0, "text": "\n02 Dec, 2021" }, { "code": null, "e": 308, "s": 28, "text": "In this article, we are going to check the credentials (username and password) entered by the user. If credentials are matched from the database entries, the user can enter in...
How to install and use lite-server in your Project ?
06 Oct, 2021 Lite-server is a lightweight development server that serves a web application, opens it in the browser, and refreshes the page when HTML or JavaScript changes are made to the source code. This can help save time during development as the user does not manually have to refresh the page every time a change i...
[ { "code": null, "e": 28, "s": 0, "text": "\n06 Oct, 2021" }, { "code": null, "e": 415, "s": 28, "text": "Lite-server is a lightweight development server that serves a web application, opens it in the browser, and refreshes the page when HTML or JavaScript changes are made to the ...
HTML | Style Tag
17 Mar, 2022 The <style> tag in HTML helps us to modify our text, viewed in the page. This modification includes changing font size, font family, font color etc. Not only the texts but also we can change the style of a body ar part of a page. Now let’s look at various attributes of style and what else the tag supports....
[ { "code": null, "e": 52, "s": 24, "text": "\n17 Mar, 2022" }, { "code": null, "e": 367, "s": 52, "text": "The <style> tag in HTML helps us to modify our text, viewed in the page. This modification includes changing font size, font family, font color etc. Not only the texts but al...
Recursively print all sentences that can be formed from list of word lists
27 Jun, 2022 Given a list of word lists How to print all sentences possible taking one word from a list at a time via recursion? Example: Input: {{"you", "we"}, {"have", "are"}, {"sleep", "eat", "drink"}} Output: you have sleep you have eat you have drink you are sleep you are eat you are...
[ { "code": null, "e": 54, "s": 26, "text": "\n27 Jun, 2022" }, { "code": null, "e": 171, "s": 54, "text": "Given a list of word lists How to print all sentences possible taking one word from a list at a time via recursion? " }, { "code": null, "e": 181, "s": 171, ...
JasmineJS - Matchers
Jasmine is a testing framework, hence it always aims to compare the result of the JavaScript file or function with the expected result. Matcher works similarly in Jasmine framework. Matchers are the JavaScript function that does a Boolean comparison between an actual output and an expected output. There are two type of...
[ { "code": null, "e": 2366, "s": 2184, "text": "Jasmine is a testing framework, hence it always aims to compare the result of the JavaScript file or function with the expected result. Matcher works similarly in Jasmine framework." }, { "code": null, "e": 2551, "s": 2366, "text": "...
Python – Convert list of dictionaries to Dictionary Value list
01 Aug, 2020 Given a list of dictionary, convert to dictionary with same key mapped with all values in as value list. Input : test_list = [{“Gfg” : 6, “is” : 9, “best” : 10},{“Gfg” : 8, “is” : 11, “best” : 19}]Output : {‘Gfg’: [6, 8], ‘is’: [9, 11], ‘best’: [10, 19]}Explanation : 6, 8 of “Gfg” mapped as value list, sim...
[ { "code": null, "e": 28, "s": 0, "text": "\n01 Aug, 2020" }, { "code": null, "e": 133, "s": 28, "text": "Given a list of dictionary, convert to dictionary with same key mapped with all values in as value list." }, { "code": null, "e": 355, "s": 133, "text": "I...
Python – Similar characters Strings comparison
02 Sep, 2020 Given two Strings, separated by delim, check if both contain same characters. Input : test_str1 = ‘e!e!k!s!g’, test_str2 = ‘g!e!e!k!s’, delim = ‘!’Output : TrueExplanation : Same characters, just diff. positions. Input : test_str1 = ‘e!e!k!s’, test_str2 = ‘g!e!e!k!s’, delim = ‘!’Output : FalseExplanation :...
[ { "code": null, "e": 53, "s": 25, "text": "\n02 Sep, 2020" }, { "code": null, "e": 131, "s": 53, "text": "Given two Strings, separated by delim, check if both contain same characters." }, { "code": null, "e": 266, "s": 131, "text": "Input : test_str1 = ‘e!e!k!...
How to Create Google Lens Application in Android?
07 Mar, 2021 We have seen the new Google Lens application in which we can capture images of any product and from that image, we can get to see the search results of that product which we will display inside our application. We will be building a simple application in which we will be capturing an image from our device...
[ { "code": null, "e": 52, "s": 24, "text": "\n07 Mar, 2021" }, { "code": null, "e": 264, "s": 52, "text": "We have seen the new Google Lens application in which we can capture images of any product and from that image, we can get to see the search results of that product which we ...
List of Vectors in R
18 Jan, 2022 Vectors are a sequence of elements belonging to the same data type. A list in R, however, comprises of elements, vectors, variables or lists which may belong to different data types. In this article, we will study how to create a list consisting of vectors as elements and how to access, append and delete t...
[ { "code": null, "e": 28, "s": 0, "text": "\n18 Jan, 2022" }, { "code": null, "e": 508, "s": 28, "text": "Vectors are a sequence of elements belonging to the same data type. A list in R, however, comprises of elements, vectors, variables or lists which may belong to different data...