title
stringlengths
3
221
text
stringlengths
17
477k
parsed
listlengths
0
3.17k
Go - if...else statement
An if statement can be followed by an optional else statement, which executes when the boolean expression is false. The syntax of an if...else statement in Go programming language is − if(boolean_expression) { /* statement(s) will execute if the boolean expression is true */ } else { /* statement(s) will execute ...
[ { "code": null, "e": 2053, "s": 1937, "text": "An if statement can be followed by an optional else statement, which executes when the boolean expression is false." }, { "code": null, "e": 2122, "s": 2053, "text": "The syntax of an if...else statement in Go programming language is...
A Beginners Guide to Artificial Neural Network using Tensor Flow & Keras | by Angel Das | Towards Data Science
ANNs (Artificial Neural Network) is at the very core of Deep Learning an advanced version of Machine Learning techniques. Artificial Neural Networks involve the following concepts. The input & the output layer, the hidden layers, neurons under hidden layers, forward propagation, and backward propagation. In a nutshell,...
[ { "code": null, "e": 992, "s": 171, "text": "ANNs (Artificial Neural Network) is at the very core of Deep Learning an advanced version of Machine Learning techniques. Artificial Neural Networks involve the following concepts. The input & the output layer, the hidden layers, neurons under hidden laye...
Angular Material 7 - Radio Button
The <mat-radiobutton>, an Angular Directive, is used for <input type="radio"> for enhance material design based styling.. In this chapter, we will showcase the configuration required to draw a radio button control using Angular Material. Follow the following steps to update the Angular application we created in Angular...
[ { "code": null, "e": 2877, "s": 2755, "text": "The <mat-radiobutton>, an Angular Directive, is used for <input type=\"radio\"> for enhance material design based styling.." }, { "code": null, "e": 2993, "s": 2877, "text": "In this chapter, we will showcase the configuration requir...
Machine Learning detects Fake News. | Towards Data Science
IntroductionExploratory Data AnalysisFeature EngineeringModelAccuracyFeature ImportanceSummaryReferences Introduction Exploratory Data Analysis Feature Engineering Model Accuracy Feature Importance Summary References Deciphering if a news article is valid or not can be difficult. As a new author on Towards Data Science...
[ { "code": null, "e": 277, "s": 172, "text": "IntroductionExploratory Data AnalysisFeature EngineeringModelAccuracyFeature ImportanceSummaryReferences" }, { "code": null, "e": 290, "s": 277, "text": "Introduction" }, { "code": null, "e": 316, "s": 290, "text": ...
Find maximum number of elements such that their absolute difference is less than or equal to 1 - GeeksforGeeks
25 May, 2021 Given an array of n elements, find the maximum number of elements to select from the array such that the absolute difference between any two of the chosen elements is less than or equal to 1.Examples: Input : arr[] = {1, 2, 3} Output : 2 We can either take 1, 2 or 2, 3. Both will have the count 2 so maxim...
[ { "code": null, "e": 25166, "s": 25138, "text": "\n25 May, 2021" }, { "code": null, "e": 25368, "s": 25166, "text": "Given an array of n elements, find the maximum number of elements to select from the array such that the absolute difference between any two of the chosen elements...
Ruby Literals - GeeksforGeeks
23 Feb, 2022 Any constant value which can be assigned to the variable is called as literal/constant. we use literal every time when typing an object in the ruby code. Ruby Literals are same as other programming languages, just a few adjustments, and differences here.These are following literals in Ruby. Booleans and ni...
[ { "code": null, "e": 23595, "s": 23567, "text": "\n23 Feb, 2022" }, { "code": null, "e": 23887, "s": 23595, "text": "Any constant value which can be assigned to the variable is called as literal/constant. we use literal every time when typing an object in the ruby code. Ruby Lite...
Top Websites To Find Hackathons With Big Prizes
21 Jun, 2022 A hackathon is an event in which computer programmers and other tech enthusiasts work together to find a solution to a problem (these problems can be a real-world issue that a company is trying to solve, or it could be something for innovation purposes). These programs can range from a single day to even w...
[ { "code": null, "e": 52, "s": 24, "text": "\n21 Jun, 2022" }, { "code": null, "e": 982, "s": 52, "text": "A hackathon is an event in which computer programmers and other tech enthusiasts work together to find a solution to a problem (these problems can be a real-world issue that ...
How to create cookies in JavaScript?
Using cookies is the most efficient method of remembering and tracking preferences, purchases, commissions, and other information required for better visitor experience or site statistics. The simplest way to create a cookie is to assign a string value to the document.cookie object, which looks like this. document.cook...
[ { "code": null, "e": 1376, "s": 1187, "text": "Using cookies is the most efficient method of remembering and tracking preferences, purchases, commissions, and other information required for better visitor experience or site statistics." }, { "code": null, "e": 1494, "s": 1376, "t...
Redis Pipelining
13 Aug, 2020 Redis is a Transmission Control Protocol (TCP) server which supports request or response protocol. A request is completed in 2 steps : The client sends query to server in blocking manner to get server response. Then server operates command and sends response back result of query to client. What is Pipelini...
[ { "code": null, "e": 54, "s": 26, "text": "\n13 Aug, 2020" }, { "code": null, "e": 189, "s": 54, "text": "Redis is a Transmission Control Protocol (TCP) server which supports request or response protocol. A request is completed in 2 steps :" }, { "code": null, "e": 26...
Date() and DateAdd() Function in MS Access
03 Sep, 2020 1. Date() Function :Date() function returns the current date of the system. In this function, no parameter will be passed and it will return the current date. Syntax : Date() Example : SELECT Date() AS CurrentDate; Output – 2. DateAdd() Function :DateAdd() function will add the time interval and date to t...
[ { "code": null, "e": 28, "s": 0, "text": "\n03 Sep, 2020" }, { "code": null, "e": 187, "s": 28, "text": "1. Date() Function :Date() function returns the current date of the system. In this function, no parameter will be passed and it will return the current date." }, { "c...
GETDATE() Function in SQL Server
18 Jan, 2021 GETDATE() function :This function in SQL Server is used to return the present date and time of the database system in a ‘YYYY-MM-DD hh:mm:ss.mmm’ pattern. Features : This function is used to find the present date and time of the database system. This function comes under Date Functions. This function doesn...
[ { "code": null, "e": 28, "s": 0, "text": "\n18 Jan, 2021" }, { "code": null, "e": 183, "s": 28, "text": "GETDATE() function :This function in SQL Server is used to return the present date and time of the database system in a ‘YYYY-MM-DD hh:mm:ss.mmm’ pattern." }, { "code"...
Ruby | Array count() operation
08 Jan, 2020 Array#count() : count() is a Array class method which returns the number of elements in the array. It can also find the total number of a particular element in the array. Syntax: Array.count() Parameter: obj - specific element to found Return: removes all the nil values from the array. Code #1 : Exa...
[ { "code": null, "e": 54, "s": 26, "text": "\n08 Jan, 2020" }, { "code": null, "e": 225, "s": 54, "text": "Array#count() : count() is a Array class method which returns the number of elements in the array. It can also find the total number of a particular element in the array." ...
How to create a meeting with zoom API in Python?
17 May, 2022 In this article, we will discuss how to create a zoom meeting with the help of zoom API using Python. To integrate zoom API, we need to create it. Follow the given steps for the same: To use the zoom API first visit https://marketplace.zoom.us/ and either sign up or sign in with your zoom account. Now clic...
[ { "code": null, "e": 53, "s": 25, "text": "\n17 May, 2022" }, { "code": null, "e": 237, "s": 53, "text": "In this article, we will discuss how to create a zoom meeting with the help of zoom API using Python. To integrate zoom API, we need to create it. Follow the given steps for ...
HashMap isEmpty() Method in Java
26 Nov, 2018 The java.util.HashMap.isEmpty() method of HashMap class is used to check for the emptiness of the map. The method returns True if no key-value pair or mapping is present in the map else False. Syntax: Hash_Map.isEmpty() Parameters: The method does not take any parameters. Return Value: The method returns b...
[ { "code": null, "e": 53, "s": 25, "text": "\n26 Nov, 2018" }, { "code": null, "e": 246, "s": 53, "text": "The java.util.HashMap.isEmpty() method of HashMap class is used to check for the emptiness of the map. The method returns True if no key-value pair or mapping is present in t...
Steps to make array empty by removing maximum and its right side
29 Apr, 2022 We are given an array of Integers. We have to perform the following operation on the array until it is fully exhausted. Select the max number in the array and delete that number including all the numbers to its right side in the array. Repeat the step 1 for the left elements of the array i.e select the m...
[ { "code": null, "e": 54, "s": 26, "text": "\n29 Apr, 2022" }, { "code": null, "e": 176, "s": 54, "text": "We are given an array of Integers. We have to perform the following operation on the array until it is fully exhausted. " }, { "code": null, "e": 292, "s": 1...
C Library - <float.h>
The float.h header file of the C Standard Library contains a set of various platform-dependent constants related to floating point values. These constants are proposed by ANSI C. They allow making more portable programs. Before checking all the constants, it is good to understand that floating-point number is composed ...
[ { "code": null, "e": 2490, "s": 2141, "text": "The float.h header file of the C Standard Library contains a set of various platform-dependent constants related to floating point values. These constants are proposed by ANSI C. They allow making more portable programs. Before checking all the constant...
Semaphores and its types
31 May, 2021 Overview : Semaphores are compound data types with two fields one is a Non-negative integer S.V and the second is Set of processes in a queue S.L. It is used to solve critical section problems, and by using two atomic operations, it will be solved. In this, wait and signal that is used for process syn...
[ { "code": null, "e": 28, "s": 0, "text": "\n31 May, 2021" }, { "code": null, "e": 349, "s": 28, "text": "Overview : Semaphores are compound data types with two fields one is a Non-negative integer S.V and the second is Set of processes in a queue S.L. It is used to solve cri...
Rod Cutting | Practice | GeeksforGeeks
Given a rod of length N inches and an array of prices, price[] that contains prices of all pieces of size smaller than N. Determine the maximum value obtainable by cutting up the rod and selling the pieces. Example 1: Input: N = 8 Price[] = {1, 5, 8, 9, 10, 17, 17, 20} Output: 22 Explanation: The maximum obtainable v...
[ { "code": null, "e": 445, "s": 238, "text": "Given a rod of length N inches and an array of prices, price[] that contains prices of all pieces of size smaller than N. Determine the maximum value obtainable by cutting up the rod and selling the pieces." }, { "code": null, "e": 458, "s...
How to Clone webpage Using pywebcopy in Python?
17 Jan, 2022 Sometimes we need a handy web page on your local hard drive. So, here we are going to write a simple Python script to Scrap a web page. Web scraping is used for extracting data from websites for offline reading, storage, or whatever reason. Before writing the script we need to know pywebcopy. pywebcopy is ...
[ { "code": null, "e": 52, "s": 24, "text": "\n17 Jan, 2022" }, { "code": null, "e": 476, "s": 52, "text": "Sometimes we need a handy web page on your local hard drive. So, here we are going to write a simple Python script to Scrap a web page. Web scraping is used for extracting da...
Program to sort a given linked list into ascending order in python
Suppose we have a linked list. We have to sort the list into ascending order. So, if the input is like [5, 8, 4, 1, 5, 6, 3], then the output will be [1, 3, 4, 5, 5, 6, 8, ] To solve this, we will follow these steps: values := a new list head := node while node is not null, doinsert value of node at the end of valuesno...
[ { "code": null, "e": 1265, "s": 1187, "text": "Suppose we have a linked list. We have to sort the list into ascending order." }, { "code": null, "e": 1361, "s": 1265, "text": "So, if the input is like [5, 8, 4, 1, 5, 6, 3], then the output will be [1, 3, 4, 5, 5, 6, 8, ]" }, ...
Python | Splitting operators in String
30 Jun, 2019 Sometimes we have a source string to have certain mathematical statement for computations and we need to split both the numbers and operators as a list of individual elements. Let’s discuss certain ways in which this problem can be performed. Method #1 : Using re.split()This task can be solved using the sp...
[ { "code": null, "e": 28, "s": 0, "text": "\n30 Jun, 2019" }, { "code": null, "e": 271, "s": 28, "text": "Sometimes we have a source string to have certain mathematical statement for computations and we need to split both the numbers and operators as a list of individual elements....
Shift Operator in Java
24 May, 2022 Operators in Java are used to performing operations on variables and values. Examples of operators: +, -, *, /, >>, <<. Types of operators: Arithmetic Operator, Shift Operator, Relational Operator, Bitwise Operator, Logical Operator, Ternary Operator and Assignment Operator. In this article, we will ma...
[ { "code": null, "e": 52, "s": 24, "text": "\n24 May, 2022" }, { "code": null, "e": 131, "s": 52, "text": "Operators in Java are used to performing operations on variables and values. " }, { "code": null, "e": 176, "s": 131, "text": "Examples of operators: +, ...
How to compute derivative using Numpy?
21 Apr, 2021 In this article, we will learn how to compute derivatives using NumPy. Generally, NumPy does not provide any robust function to compute the derivatives of different polynomials. However, NumPy can compute the special cases of one-dimensional polynomials using the functions numpy.poly1d() and deriv(). poly1...
[ { "code": null, "e": 54, "s": 26, "text": "\n21 Apr, 2021" }, { "code": null, "e": 356, "s": 54, "text": "In this article, we will learn how to compute derivatives using NumPy. Generally, NumPy does not provide any robust function to compute the derivatives of different polynomia...
Arraylist removeRange() in Java with examples - GeeksforGeeks
08 Oct, 2021 The removeRange() method of ArrayList in Java is used to remove all elements within the specified range from an ArrayList object. It shifts any succeeding elements to the left. This call shortens the list by (toIndex-fromIndex) elements where toIndex is the ending index and fromIndex is the starting index ...
[ { "code": null, "e": 24115, "s": 24087, "text": "\n08 Oct, 2021" }, { "code": null, "e": 24532, "s": 24115, "text": "The removeRange() method of ArrayList in Java is used to remove all elements within the specified range from an ArrayList object. It shifts any succeeding elements...
AngularJS | ng-transclude Directive - GeeksforGeeks
10 May, 2019 ng-transclude directive is used to mark the insertion point for transcluded DOM of nearest parent that uses transclusion. Use transclusion slot name as value of ng-transclude or ng-transclude-slot attribute. Example-1: <!DOCTYPE html><html> <head> <meta charset="UTF-8"> <script src="//ajax.googleapi...
[ { "code": null, "e": 25109, "s": 25081, "text": "\n10 May, 2019" }, { "code": null, "e": 25317, "s": 25109, "text": "ng-transclude directive is used to mark the insertion point for transcluded DOM of nearest parent that uses transclusion. Use transclusion slot name as value of ng...
What are character classes or character sets used in Python regular expression?
A "character class", or a "character set", is a set of characters put in square brackets. The regex engine matches only one out of several characters in the character class or character set. We place the characters we want to match between square brackets. If you want to match any vowel, we use the character set [aeiou...
[ { "code": null, "e": 1385, "s": 1062, "text": "A \"character class\", or a \"character set\", is a set of characters put in square brackets. The regex engine matches only one out of several characters in the character class or character set. We place the characters we want to match between square br...
C++ Program to Implement Johnson’s Algorithm
Here we will see the Johnson’s Algorithm to find shortest path between two vertices. The graph is given here. The shortest path between the edges is like below. This program will take the number of vertices, number of edges, and the edges with their costs. Input − Vertices: 3 Edges: 5 Edge with costs − 1 2 8 2 1 12 1 ...
[ { "code": null, "e": 1148, "s": 1062, "text": "Here we will see the Johnson’s Algorithm to find shortest path between two vertices. " }, { "code": null, "e": 1320, "s": 1148, "text": "The graph is given here. The shortest path between the edges is like below. This program will ta...
BigDecimal plus() method in Java - GeeksforGeeks
11 Aug, 2021 The java.math.BigDecimal.plus() is an inbuilt method in java that returns a BigDecimal whose value is (+this), and whose scale is this.scale(). This method, which simply returns this BigDecimal is included for symmetry with the unary minus method negate().Syntax: The java.math.BigDecimal.plus() is an inb...
[ { "code": null, "e": 24290, "s": 24262, "text": "\n11 Aug, 2021" }, { "code": null, "e": 24556, "s": 24290, "text": "The java.math.BigDecimal.plus() is an inbuilt method in java that returns a BigDecimal whose value is (+this), and whose scale is this.scale(). This method, which ...
Angular PrimeNG InputTextArea Component - GeeksforGeeks
30 Jul, 2021 Angular PrimeNG is an open-source framework with a rich set of native Angular UI components that are used for great styling and this framework is used to make responsive websites with very much ease. In this article, we will know how to use the InputTextArea component in angular primeNG. InputTextArea comp...
[ { "code": null, "e": 26354, "s": 26326, "text": "\n30 Jul, 2021" }, { "code": null, "e": 26643, "s": 26354, "text": "Angular PrimeNG is an open-source framework with a rich set of native Angular UI components that are used for great styling and this framework is used to make resp...
Python string | swapcase() - GeeksforGeeks
05 Jan, 2018 The string swapcase() method converts all uppercase characters to lowercase and vice versa of the given string, and returns it. Syntax: string_name.swapcase()Here string_name is the string whose cases are to be swapped. Parameter: The swapcase() method does not takes any parameter. Return value: The swapca...
[ { "code": null, "e": 24667, "s": 24639, "text": "\n05 Jan, 2018" }, { "code": null, "e": 24795, "s": 24667, "text": "The string swapcase() method converts all uppercase characters to lowercase and vice versa of the given string, and returns it." }, { "code": null, "e"...
Bootstrap 4 Tutorial
Bootstrap 4 is a newer version of Bootstrap, which is the most popular HTML, CSS, and JavaScript framework for developing responsive, mobile-first websites. Bootstrap 4 is completely free to download and use! Start learning Bootstrap 4 now » Learn Bootstrap 4 This Bootstrap 4 tutorial contains hundreds of Bootstrap 4 e...
[ { "code": null, "e": 157, "s": 0, "text": "Bootstrap 4 is a newer version of Bootstrap, which is the most popular HTML, CSS, and JavaScript framework for developing responsive, mobile-first websites." }, { "code": null, "e": 209, "s": 157, "text": "Bootstrap 4 is completely free ...
ArrayIndexOutOfBounds Vs ArrayStoreException in Java?
An array is a data structure/container/object that stores a fixed-size sequential collection of elements of the same type. The size/length of the array is determined at the time of creation. The position of the elements in the array is called as index or subscript. The first element of the array is stored at the index ...
[ { "code": null, "e": 1253, "s": 1062, "text": "An array is a data structure/container/object that stores a fixed-size sequential collection of elements of the same type. The size/length of the array is determined at the time of creation." }, { "code": null, "e": 1437, "s": 1253, ...
How to rethrow an exception in Java?
Sometimes we may need to rethrow an exception in Java. If a catch block cannot handle the particular exception it has caught, we can rethrow the exception. The rethrow expression causes the originally thrown object to be rethrown. Because the exception has already been caught at the scope in which the rethrow expressio...
[ { "code": null, "e": 1293, "s": 1062, "text": "Sometimes we may need to rethrow an exception in Java. If a catch block cannot handle the particular exception it has caught, we can rethrow the exception. The rethrow expression causes the originally thrown object to be rethrown." }, { "code": ...
Powershell - Get-Unique Cmdlet
Get-Unique cmdlet can be used to get the unique objects from a sorted list of objects. In this example, we're see the Get-Unique cmdlet in action. In this example, we're set list of strings in a variable. Type the following command in PowerShell ISE Console $list = "one","two","two","three","four","five" In this exampl...
[ { "code": null, "e": 2121, "s": 2034, "text": "Get-Unique cmdlet can be used to get the unique objects from a sorted list of objects." }, { "code": null, "e": 2181, "s": 2121, "text": "In this example, we're see the Get-Unique cmdlet in action." }, { "code": null, "e"...
Context in React - GeeksforGeeks
17 Sep, 2021 In this article, you will be introduced to React Context, one of the latest features in React Applications.Prerequisites: ReactJS-Basics, Typescript(with Interfaces), ES6 notation What is React Context?React Context is a method to pass props from parent to child component(s), by storing the props in a stor...
[ { "code": null, "e": 27142, "s": 27114, "text": "\n17 Sep, 2021" }, { "code": null, "e": 27322, "s": 27142, "text": "In this article, you will be introduced to React Context, one of the latest features in React Applications.Prerequisites: ReactJS-Basics, Typescript(with Interface...
Character.isSpaceChar() method in Java - GeeksforGeeks
06 Dec, 2018 The java.lang.Character.isSpaceChar(char ch) is an inbuilt method in java which determines if the specified character is a Unicode space character. A character is considered to be a space character if and only if it is specified to be a space character by the Unicode Standard. This method returns true if t...
[ { "code": null, "e": 23948, "s": 23920, "text": "\n06 Dec, 2018" }, { "code": null, "e": 24226, "s": 23948, "text": "The java.lang.Character.isSpaceChar(char ch) is an inbuilt method in java which determines if the specified character is a Unicode space character. A character is ...
Count number of substrings having at least K distinct characters - GeeksforGeeks
06 Jun, 2021 Given a string S consisting of N characters and a positive integer K, the task is to count the number of substrings having at least K distinct characters. Examples: Input: S = “abcca”, K = 3Output: 4Explanation:The substrings that contain at least K(= 3) distinct characters are: “abc”: Count of distinct ch...
[ { "code": null, "e": 25158, "s": 25130, "text": "\n06 Jun, 2021" }, { "code": null, "e": 25313, "s": 25158, "text": "Given a string S consisting of N characters and a positive integer K, the task is to count the number of substrings having at least K distinct characters." }, ...
How to sum a comma separated string (string with numbers) in MySQL?
You can create a custom function to sum a comma-separated string in MySQL. Let us first create a table. Here, we have a varchar column, wherein we will add numbers in the form of strings − mysql> create table DemoTable -> ( -> ListOfValues varchar(50) -> ); Query OK, 0 rows affected (0.56 sec) Insert some reco...
[ { "code": null, "e": 1251, "s": 1062, "text": "You can create a custom function to sum a comma-separated string in MySQL. Let us first create a table. Here, we have a varchar column, wherein we will add numbers in the form of strings −" }, { "code": null, "e": 1366, "s": 1251, "t...
Naive Bayes Algorithm for Classification | by Idil Ismiguzel | Towards Data Science
Classification is one of the most used forms of prediction where the goal is to predict the class of the record. For binary classification, we aim to predict whether a record is a 1 or a 0 such as spam/not spam or churn/not churn and for multiclass classification, we aim to predict the class of a record such as classif...
[ { "code": null, "e": 540, "s": 172, "text": "Classification is one of the most used forms of prediction where the goal is to predict the class of the record. For binary classification, we aim to predict whether a record is a 1 or a 0 such as spam/not spam or churn/not churn and for multiclass classi...
Is java pass by reference or pass by value?
Call by Value means calling a method with a parameter as value. Through this, the argument value is passed to the parameter. While Call by Reference means calling a method with a parameter as reference. Through this, the argument reference is passed to the parameter. In call by value, the modification done to the param...
[ { "code": null, "e": 1187, "s": 1062, "text": "Call by Value means calling a method with a parameter as value. Through this, the argument value is passed to the parameter." }, { "code": null, "e": 1330, "s": 1187, "text": "While Call by Reference means calling a method with a par...
Practice Questions for Recursion | Set 6 - GeeksforGeeks
28 May, 2021 Question 1 Consider the following recursive C function. Let len be the length of the string s and num be the number of characters printed on the screen. Give the relation between num and len where len is always greater than 0. C++ C Java Python3 C# Javascript void abc(char *s){ if(s[0] == '\0') ...
[ { "code": null, "e": 24978, "s": 24950, "text": "\n28 May, 2021" }, { "code": null, "e": 25206, "s": 24978, "text": "Question 1 Consider the following recursive C function. Let len be the length of the string s and num be the number of characters printed on the screen. Give the r...
How to sort in MongoDB?
To sort in MongoDB, you can use the sort() method. Case 1 − Sort in ascending order. The syntax is as follows − db.yourCollectionName.find().sort({yourField:1}); Case 2 − Sort in descending order. The syntax is as follows − db.yourCollectionName.find().sort({yourField:-1}); To understand the concept, let us create a co...
[ { "code": null, "e": 1113, "s": 1062, "text": "To sort in MongoDB, you can use the sort() method." }, { "code": null, "e": 1174, "s": 1113, "text": "Case 1 − Sort in ascending order. The syntax is as follows −" }, { "code": null, "e": 1224, "s": 1174, "text": ...
Accessing Attributes and Methods in Python - GeeksforGeeks
23 Nov, 2020 Attributes of a class are function objects that define corresponding methods of its instances. They are used to implement access controls of the classes.Attributes of a class can also be accessed using the following built-in methods and functions : getattr() – This function is used to access the attribute ...
[ { "code": null, "e": 24043, "s": 24015, "text": "\n23 Nov, 2020" }, { "code": null, "e": 24292, "s": 24043, "text": "Attributes of a class are function objects that define corresponding methods of its instances. They are used to implement access controls of the classes.Attributes...
Serialize and Deserialize Binary Tree in C++
Suppose we have one binary tree and we have to serialize and deserialize them. As we know that the serialization is the process of converting a data structure or object into a sequence of bits so we can store them in a file or memory buffer, and that can be reconstructed later in the same or another computer environmen...
[ { "code": null, "e": 1385, "s": 1062, "text": "Suppose we have one binary tree and we have to serialize and deserialize them. As we know that the serialization is the process of converting a data structure or object into a sequence of bits so we can store them in a file or memory buffer, and that ca...
How to create different Y-axis for group levels using ggplot2 in R?
If we have a categorical variable or a group variable then we might want to create a line chart for each of the categories or levels, this will help us to understand the range of multiple levels in a single plot. For this purpose, we can use facet_grid function of ggplot2 package as shown in the below example. Consider...
[ { "code": null, "e": 1374, "s": 1062, "text": "If we have a categorical variable or a group variable then we might want to create a line chart for each of the categories or levels, this will help us to understand the range of multiple levels in a single plot. For this purpose, we can use facet_grid ...
NHibernate - Lazy Loading
In this chapter, we will be covering the lazy loading feature. It is an entirely different concept by default and NHibernate doesn't have lazy loading, for example if you load a customer, it's not going to load all of the orders. The order collection will be loaded on demand. The order collection will be loaded on dema...
[ { "code": null, "e": 2563, "s": 2333, "text": "In this chapter, we will be covering the lazy loading feature. It is an entirely different concept by default and NHibernate doesn't have lazy loading, for example if you load a customer, it's not going to load all of the orders." }, { "code": n...
How to fetch data from APIs using Asynchronous await in ReactJS ? - GeeksforGeeks
14 Apr, 2022 In this article, we are going to make an API request to any APIs that you want using ReactJS, and fetch data using Asynchronous await. Here we are using something called Axios which is a library in ReactJS. API: APIs are basically a type of application that stored data in the format of JSON (JavaScript Obj...
[ { "code": null, "e": 24826, "s": 24798, "text": "\n14 Apr, 2022" }, { "code": null, "e": 25033, "s": 24826, "text": "In this article, we are going to make an API request to any APIs that you want using ReactJS, and fetch data using Asynchronous await. Here we are using something ...
Speech Recognition Analysis. From Siri to smart home devices, speech... | by Yihui April Chen | Towards Data Science
From Siri to smart home devices, speech recognition is widely used in our lives. This speech recognition project is to utilize Kaggle speech recognition challenge dataset to create Keras model on top of Tensorflow and make predictions on the voice files. The link of the Kaggle speech recognition challenge dataset is li...
[ { "code": null, "e": 302, "s": 47, "text": "From Siri to smart home devices, speech recognition is widely used in our lives. This speech recognition project is to utilize Kaggle speech recognition challenge dataset to create Keras model on top of Tensorflow and make predictions on the voice files." ...
Java - Abstraction
As per dictionary, abstraction is the quality of dealing with ideas rather than events. For example, when you consider the case of e-mail, complex details such as what happens as soon as you send an e-mail, the protocol your e-mail server uses are hidden from the user. Therefore, to send an e-mail you just need to type...
[ { "code": null, "e": 2764, "s": 2377, "text": "As per dictionary, abstraction is the quality of dealing with ideas rather than events. For example, when you consider the case of e-mail, complex details such as what happens as soon as you send an e-mail, the protocol your e-mail server uses are hidde...
Given a number N in decimal base, find number of its digits in any base (base b) - GeeksforGeeks
24 Mar, 2021 Given A Number n in a base 10, find the number of digits in its base b representation. Constraints : Whole Examples : Input : Number = 48 Base = 4 Output: 3 Explanation : (48)10 = (300)4 Input : Number = 1446 Base = 7 Output: 4 Explanation : (446)10 = (4134)7 A simple approach: conver...
[ { "code": null, "e": 25911, "s": 25883, "text": "\n24 Mar, 2021" }, { "code": null, "e": 26031, "s": 25911, "text": "Given A Number n in a base 10, find the number of digits in its base b representation. Constraints : Whole Examples : " }, { "code": null, "e": 26191,...
5 SQL tips to make your queries prettier and easier to read | by Axel Furlan | Towards Data Science
Well, SQL queries could be thought as usual code. Even though it works, that’s probably not enough and can surely be improved by applying some formatting standards. Prettier code is easy to analyze and easy to maintain. The same principle applies to SQL queries. The colleague at your company, who has to review your wor...
[ { "code": null, "e": 435, "s": 172, "text": "Well, SQL queries could be thought as usual code. Even though it works, that’s probably not enough and can surely be improved by applying some formatting standards. Prettier code is easy to analyze and easy to maintain. The same principle applies to SQL q...
Built-in Error Views in Django - GeeksforGeeks
01 Nov, 2020 Whenever one tries to visit a link that doesn’t exist on a website, it gives a 404 Error, that this page is not found. Similarly, there are more error codes such as 500, 403, etc. Django has some default functions to for handle HTTP errors. Let’s explore them one-by-one. Normally this view is used by to re...
[ { "code": null, "e": 24433, "s": 24405, "text": "\n01 Nov, 2020" }, { "code": null, "e": 24705, "s": 24433, "text": "Whenever one tries to visit a link that doesn’t exist on a website, it gives a 404 Error, that this page is not found. Similarly, there are more error codes such a...
Class getMethod() method in Java with Examples - GeeksforGeeks
16 Dec, 2019 The getMethod() method of java.lang.Class class is used to get the specified method of this class with the specified parameter type, which is the method that is public and its members. The method returns the specified method of this class in the form of Method objects. Syntax: public Method getMethod(Strin...
[ { "code": null, "e": 23581, "s": 23553, "text": "\n16 Dec, 2019" }, { "code": null, "e": 23851, "s": 23581, "text": "The getMethod() method of java.lang.Class class is used to get the specified method of this class with the specified parameter type, which is the method that is pu...
How to define a Fitness Function in a Genetic Algorithm? | by Vijini Mallawaarachchi | Towards Data Science
In my previous article, I have explained the basics about Genetic Algorithms. After it was published, I got many requests to discuss more about the Fitness Function and Evaluation Strategies. In this article, we will discuss about fitness functions and how to come up with a fitness function for a given problem. Fitness...
[ { "code": null, "e": 485, "s": 172, "text": "In my previous article, I have explained the basics about Genetic Algorithms. After it was published, I got many requests to discuss more about the Fitness Function and Evaluation Strategies. In this article, we will discuss about fitness functions and ho...
JavaScript RegExp - [a-zA-Z]
[a-zA-Z] matches any character from lowercase a through uppercase Z. Following example shows usage of RegExp expression. <html> <head> <title>JavaScript RegExp</title> </head> <body> <script type = "text/javascript"> var str = "first1"; var pattern = /[a-zA-Z]/g; var...
[ { "code": null, "e": 3150, "s": 3081, "text": "[a-zA-Z] matches any character from lowercase a through uppercase Z." }, { "code": null, "e": 3202, "s": 3150, "text": "Following example shows usage of RegExp expression." }, { "code": null, "e": 3673, "s": 3202, ...
DSA using C - Stack
Stack is kind of data structure which allows operations on data only at one end. It allows access to the last inserted data only. Stack is also called LIFO (Last In First Out) data structure and Push and Pop operations are related in such a way that only last item pushed (added to stack) can be popped (removed from the...
[ { "code": null, "e": 2420, "s": 2091, "text": "Stack is kind of data structure which allows operations on data only at one end. It allows access to the last inserted data only. Stack is also called LIFO (Last In First Out) data structure and Push and Pop operations are related in such a way that onl...
Selenium - Element is not clickable at point
We can get the error - Element is not clickable at point while trying to click a link in Selenium webdriver. This is common in chromedriver as the Chrome browser determines an element with point location. When the position of an element is changing and we make an attempt to click on it, this error is encountered. This ...
[ { "code": null, "e": 1267, "s": 1062, "text": "We can get the error - Element is not clickable at point while trying to click a link in Selenium webdriver. This is common in chromedriver as the Chrome browser determines an element with point location." }, { "code": null, "e": 1467, "...
Find k closest elements to a given value - GeeksforGeeks
13 Apr, 2021 Given a sorted array arr[] and a value X, find the k closest elements to X in arr[]. Examples: Input: K = 4, X = 35 arr[] = {12, 16, 22, 30, 35, 39, 42, 45, 48, 50, 53, 55, 56} Output: 30 39 42 45 Note that if the element is present in array, then it should not be in output, only t...
[ { "code": null, "e": 24788, "s": 24760, "text": "\n13 Apr, 2021" }, { "code": null, "e": 24874, "s": 24788, "text": "Given a sorted array arr[] and a value X, find the k closest elements to X in arr[]. " }, { "code": null, "e": 24885, "s": 24874, "text": "Exam...
D3.js pie() Function - GeeksforGeeks
01 Sep, 2020 The d3.pie() is used to construct a pie generator that has its default settings. This pie generator takes an array of data and then returns an array of objects that contains details about each arc angle. Syntax: d3.pie(); Parameters: This function does not accept any parameters. Return Values: This functi...
[ { "code": null, "e": 25300, "s": 25272, "text": "\n01 Sep, 2020" }, { "code": null, "e": 25504, "s": 25300, "text": "The d3.pie() is used to construct a pie generator that has its default settings. This pie generator takes an array of data and then returns an array of objects tha...
C# | Char.IsWhiteSpace() Method - GeeksforGeeks
31 Jan, 2019 In C#, Char.IsWhiteSpace() is a System.Char struct method which is used to check whether a Unicode character is a whitespace or not. Whitespace characters include Unicode characters of category SpaceSeparator, LineSeparator, ParagraphSeparator etc. This method can be overloaded by passing different type an...
[ { "code": null, "e": 23506, "s": 23478, "text": "\n31 Jan, 2019" }, { "code": null, "e": 23842, "s": 23506, "text": "In C#, Char.IsWhiteSpace() is a System.Char struct method which is used to check whether a Unicode character is a whitespace or not. Whitespace characters include ...
Long Run Linkages: A Briefer on the Johansen Cointegration Methodology | by Justin Eloriaga | Towards Data Science
In Economics, there are numerous variables that may appear non-stationary on the outset but when a linear combination of these non-stationary series is made, the linear combination may be described as stationary. While most economists think that Cointegration is some deep theoretical construct, the definition is actual...
[ { "code": null, "e": 955, "s": 171, "text": "In Economics, there are numerous variables that may appear non-stationary on the outset but when a linear combination of these non-stationary series is made, the linear combination may be described as stationary. While most economists think that Cointegra...
Count of groups of consecutive 1s in a given Binary String - GeeksforGeeks
06 Jul, 2021 Given a binary string S of size N, the task is to find the number of groups of 1s only in the string S. Examples: Input: S = “100110111”, N = 9Output: 3Explanation: The following groups are of 1s only: Group over the range [0, 0] which is equal to “1”.Group over the range [3, 4] which is equal to “11”.Grou...
[ { "code": null, "e": 24956, "s": 24928, "text": "\n06 Jul, 2021" }, { "code": null, "e": 25060, "s": 24956, "text": "Given a binary string S of size N, the task is to find the number of groups of 1s only in the string S." }, { "code": null, "e": 25070, "s": 25060,...
Visualization with Plotly.Express: Comprehensive guide | by Vaclav Dekanovsky | Towards Data Science
I frequently come up with an ideal visualization and then struggle to code it. It would be to the point, expressive, and easy to interpret, but it’s impossible to create. When I found Plotly it made plotting, well, much easier. Plotly.Express, first introduced in version 4.0.0 is a high-level abstraction to Plotly API ...
[ { "code": null, "e": 400, "s": 172, "text": "I frequently come up with an ideal visualization and then struggle to code it. It would be to the point, expressive, and easy to interpret, but it’s impossible to create. When I found Plotly it made plotting, well, much easier." }, { "code": null,...
C# | Get an enumerator that iterates through the Dictionary - GeeksforGeeks
03 Apr, 2019 Dictionary<TKey, TValue>.GetEnumerator method is used to return an enumerator that iterates through the Dictionary<TKey, TValue>. Syntax: public System.Collections.Generic.Dictionary<TKey,TValue>.Enumerator GetEnumerator (); Return Value: This method returns an Dictionary<TKey, TValue>.Enumerator structure...
[ { "code": null, "e": 24674, "s": 24646, "text": "\n03 Apr, 2019" }, { "code": null, "e": 24804, "s": 24674, "text": "Dictionary<TKey, TValue>.GetEnumerator method is used to return an enumerator that iterates through the Dictionary<TKey, TValue>." }, { "code": null, "...
What are Generalised Additive Models? | Towards Data Science
Linear Models are considered the Swiss Army Knife of models. There are many adaptations we can make to adapt the model to perform well on a variety of conditions and data types. Generalised Additive Models (GAMs) are an adaptation that allows us to model non-linear data while maintaining explainability. What is a GAM? ...
[ { "code": null, "e": 350, "s": 172, "text": "Linear Models are considered the Swiss Army Knife of models. There are many adaptations we can make to adapt the model to perform well on a variety of conditions and data types." }, { "code": null, "e": 477, "s": 350, "text": "Generali...
MomentJS - Date Validation
MomentJS handles date validation in an easy way. You need not write lots of code to validate date. isValid() is the method available on moment which tells if the date is valid or not. MomentJS also provides many parsing flags which can be used to check for date validation. MomentJS provides the following parsing flags ...
[ { "code": null, "e": 2234, "s": 1960, "text": "MomentJS handles date validation in an easy way. You need not write lots of code to validate date. isValid() is the method available on moment which tells if the date is valid or not. MomentJS also provides many parsing flags which can be used to check ...
C++ Program to Represent Graph Using 2D Arrays
This is a C++ program represents a graph using 2D arrays. The time complexity of this algorithm is O(v*v). Begin Take the input of the number of vertex ‘v’ and edges ‘e’. Assign memory to the graph[][] matrix. Take the input of ‘e’ pairs of vertexes of the given graph in graph[][]. For each pair of connecte...
[ { "code": null, "e": 1120, "s": 1062, "text": "This is a C++ program represents a graph using 2D arrays." }, { "code": null, "e": 1169, "s": 1120, "text": "The time complexity of this algorithm is O(v*v)." }, { "code": null, "e": 1506, "s": 1169, "text": "Begi...
How to get the path of the currently executing script in PowerShell?
To get the full path of the script we need to use the $myInvocation command. This is an automatic variable and it is only invoked when the script or the function is executed. $MyInvocation.MyCommand.Path command is useful to get the full path of the script where it resides while $MyInvocation.MyCommand.Name is useful t...
[ { "code": null, "e": 1237, "s": 1062, "text": "To get the full path of the script we need to use the $myInvocation command. This is an automatic variable and it is only invoked when the script or the function is executed." }, { "code": null, "e": 1413, "s": 1237, "text": "$MyInvo...
Go - Interview Questions
Dear readers, these Go Programming Language Interview Questions have been designed specially to get you acquainted with the nature of questions you may encounter during your interview for the subject of Go Programming Language. As per my experience good interviewers hardly plan to ask any particular question during you...
[ { "code": null, "e": 2407, "s": 1937, "text": "Dear readers, these Go Programming Language Interview Questions have been designed specially to get you acquainted with the nature of questions you may encounter during your interview for the subject of Go Programming Language. As per my experience good...
Quantile Quantile plots - GeeksforGeeks
22 Jan, 2021 The quantile-quantile plot is a graphical method for determining whether two samples of data came from the same population or not. A q-q plot is a plot of the quantiles of the first data set against the quantiles of the second data set. By a quantile, we mean the fraction (or percent) of points below the g...
[ { "code": null, "e": 23953, "s": 23925, "text": "\n22 Jan, 2021" }, { "code": null, "e": 24273, "s": 23953, "text": "The quantile-quantile plot is a graphical method for determining whether two samples of data came from the same population or not. A q-q plot is a plot of the quan...
How can I verify Error Message on a webpage using Selenium Webdriver?
We can verify error messages on a webpage using Selenium webdriver using the Assertion. In case, the actual and expected values do not match, an Assertion Error is thrown. Let us try to verify the highlighted error message. import org.openqa.selenium.By; import org.openqa.selenium.WebDriver; import org.openqa.selenium....
[ { "code": null, "e": 1234, "s": 1062, "text": "We can verify error messages on a webpage using Selenium webdriver using the Assertion. In case, the actual and expected values do not match, an Assertion Error is thrown." }, { "code": null, "e": 1286, "s": 1234, "text": "Let us try...
What is the difference between String s1 = "Hello" and String s1= new String("Hello") in java?
When you store a String as String str1 = "Hello"; directly, then JVM creates a String object with the given value in a separate block of memory known as String constant pool. And whenever we try to create another String as String str2 = "Hello"; JVM verifies whether any String object with the same value exists in the S...
[ { "code": null, "e": 1089, "s": 1062, "text": "When you store a String as" }, { "code": null, "e": 1112, "s": 1089, "text": "String str1 = \"Hello\";" }, { "code": null, "e": 1237, "s": 1112, "text": "directly, then JVM creates a String object with the given v...
Python Program for Selection Sort
In this article, we will learn about the Selection sort and its implementation in Python 3.x. Or earlier. In the selection sort algorithm, an array is sorted by recursively finding the minimum element from the unsorted part and inserting it at the beginning. Two subarrays are formed during the execution of Selection so...
[ { "code": null, "e": 1168, "s": 1062, "text": "In this article, we will learn about the Selection sort and its implementation in Python 3.x. Or earlier." }, { "code": null, "e": 1403, "s": 1168, "text": "In the selection sort algorithm, an array is sorted by recursively finding t...
Check whether N is a Dihedral Prime Number or not - GeeksforGeeks
21 May, 2021 Given an integer N, the task is to check if N is a Dihedral prime number or not. A Dihedral prime is a prime number that can be read as itself or as another prime number when read in a seven-segment display, regardless of different orientation and surface. Examples: Input: N = 108881 Output: Yes Input: N ...
[ { "code": null, "e": 24275, "s": 24247, "text": "\n21 May, 2021" }, { "code": null, "e": 24532, "s": 24275, "text": "Given an integer N, the task is to check if N is a Dihedral prime number or not. A Dihedral prime is a prime number that can be read as itself or as another prime ...
Generating Parameterized Powerpoint Documents in Python and R | by Keith McNulty | Towards Data Science
Many data scientists in business reporting settings are asked to pipe their data into Powerpoint presentations (whether they like it or not!). Most commonly these are numerous parameterized presentations where the format, charts and content are the same but the data changes — for example by organization unit. Frequentl...
[ { "code": null, "e": 689, "s": 172, "text": "Many data scientists in business reporting settings are asked to pipe their data into Powerpoint presentations (whether they like it or not!). Most commonly these are numerous parameterized presentations where the format, charts and content are the same b...
Getting Started with Datasets in Keras | by Sadrach Pierre, Ph.D. | Towards Data Science
Keras is an open-source python library for neural networks. It enables easy implementation and experimentation of a variety of neural network architectures. In addition to providing many of the building blocks for neural networks, Keras also has many built-in datasets. In this post, we will take a look at some of the b...
[ { "code": null, "e": 442, "s": 172, "text": "Keras is an open-source python library for neural networks. It enables easy implementation and experimentation of a variety of neural network architectures. In addition to providing many of the building blocks for neural networks, Keras also has many buil...
Multiple Inserts for a single column in MySQL?
The syntax for multiple inserts for a single column in MySQL is as follows − INSERT INTO yourTableName(yourColumnName) values(‘yourValue1'),(‘yourValue2'),(‘yourValue3'),(‘yourValue4'),.........N; To understand the above syntax, let us create a table. The query to create a table is as follows − mysql> create table Inse...
[ { "code": null, "e": 1139, "s": 1062, "text": "The syntax for multiple inserts for a single column in MySQL is as follows −" }, { "code": null, "e": 1259, "s": 1139, "text": "INSERT INTO yourTableName(yourColumnName) values(‘yourValue1'),(‘yourValue2'),(‘yourValue3'),(‘yourValue4...
Count even and odd digits in an Integer in C++
We are given with an integer number and the task is to count the even numbers and the odd numbers in a digit. Also, we will keep check on whether the even digits in an integer are occurring an even number of times and also the odd digits in an integer are occurring an odd number of times. Input − digit = 12345 Output −...
[ { "code": null, "e": 1352, "s": 1062, "text": "We are given with an integer number and the task is to count the even numbers and the odd numbers in a digit. Also, we will keep check on whether the even digits in an integer are occurring an even number of times and also the odd digits in an integer a...
Count full nodes in a Binary tree (Iterative and Recursive) in C++
We are given a binary tree and the task is to calculate the count of full nodes available in a binary tree using iterative and recursive approach. Full nodes are those nodes who have both the children and no child is null. Note that in full nodes we consider nodes with exactly two children. Binary Tree is a special dat...
[ { "code": null, "e": 1354, "s": 1062, "text": "We are given a binary tree and the task is to calculate the count of full nodes available in a binary tree using iterative and recursive approach. Full nodes are those nodes who have both the children and no child is null. Note that in full nodes we con...
Kubernetes - Volumes
In Kubernetes, a volume can be thought of as a directory which is accessible to the containers in a pod. We have different types of volumes in Kubernetes and the type defines how the volume is created and its content. The concept of volume was present with the Docker, however the only issue was that the volume was very...
[ { "code": null, "e": 2413, "s": 2195, "text": "In Kubernetes, a volume can be thought of as a directory which is accessible to the containers in a pod. We have different types of volumes in Kubernetes and the type defines how the volume is created and its content." }, { "code": null, "e"...
Node.js - File System
Node implements File I/O using simple wrappers around standard POSIX functions. The Node File System (fs) module can be imported using the following syntax − var fs = require("fs") Every method in the fs module has synchronous as well as asynchronous forms. Asynchronous methods take the last parameter as the completio...
[ { "code": null, "e": 2176, "s": 2018, "text": "Node implements File I/O using simple wrappers around standard POSIX functions. The Node File System (fs) module can be imported using the following syntax −" }, { "code": null, "e": 2200, "s": 2176, "text": "var fs = require(\"fs\")...
HTML - <marquee> Tag
The HTML <marquee> tag is used for scrolling piece of text or image displayed either horizontally across or vertically down your web site page depending on the settings. <!DOCTYPE html> <html> <head> <title>HTML marquee Tag</title> </head> <body> <marquee>This is basic example of marquee</marquee...
[ { "code": null, "e": 2544, "s": 2374, "text": "The HTML <marquee> tag is used for scrolling piece of text or image displayed either horizontally across or vertically down your web site page depending on the settings." }, { "code": null, "e": 2808, "s": 2544, "text": "<!DOCTYPE ht...
Object Detection on Python Using Template Matching | by Ravindu Senaratne | Towards Data Science
Whenever we hear about ‘Object Detection’, machine learning along with different frameworks comes to our mind. But we can actually do object detection without using machine learning or any other frameworks. In this article, I’ll show you how to do it using only Python. We’ll start off by defining a template image(objec...
[ { "code": null, "e": 442, "s": 172, "text": "Whenever we hear about ‘Object Detection’, machine learning along with different frameworks comes to our mind. But we can actually do object detection without using machine learning or any other frameworks. In this article, I’ll show you how to do it usin...
C# | Char.IsLowSurrogate(String, Int32) Method - GeeksforGeeks
01 Feb, 2019 This method is used to indicates whether the Char object at the specified position in a string is a low surrogate or not. Syntax: public static bool IsLowSurrogate (string s, int index); Parameters: s: It is a String. index: It is the character position to evaluate in s. Return Value: This method returns t...
[ { "code": null, "e": 23687, "s": 23659, "text": "\n01 Feb, 2019" }, { "code": null, "e": 23809, "s": 23687, "text": "This method is used to indicates whether the Char object at the specified position in a string is a low surrogate or not." }, { "code": null, "e": 2381...
Apache HttpClient - Interceptors
Interceptors are those which helps to obstruct or change requests or responses. Protocol interceptors in general act upon a specific header or a group of related headers. HttpClient library provides support for interceptors. The HttpRequestInterceptor interface represents the request interceptors. This interface contai...
[ { "code": null, "e": 2052, "s": 1827, "text": "Interceptors are those which helps to obstruct or change requests or responses. Protocol interceptors in general act upon a specific header or a group of related headers. HttpClient library provides support for interceptors." }, { "code": null, ...
3 Libraries to visualize the execution of your Python code in real-time | by Satyam Kumar | Towards Data Science
Python is comparatively slower than other languages because of its dynamic nature and versatility. Sometimes complex computations or algorithms take a lot of time to execute in Python. There arises a need to track the execution flow of the code and get a deep dive understanding of performance bottlenecks. The logging m...
[ { "code": null, "e": 479, "s": 172, "text": "Python is comparatively slower than other languages because of its dynamic nature and versatility. Sometimes complex computations or algorithms take a lot of time to execute in Python. There arises a need to track the execution flow of the code and get a ...
Bayesian Hierarchical Modeling in PyMC3 | by Dr. Robert Kübler | Towards Data Science
From time to time, you have the agony of choice when trying to do machine learning on a quite heterogeneous dataset. As an example of what I mean with a heterogeneous dataset, consider a simple height of people dataset. The really important feature of this data is the height. However, we can also find two different gro...
[ { "code": null, "e": 392, "s": 172, "text": "From time to time, you have the agony of choice when trying to do machine learning on a quite heterogeneous dataset. As an example of what I mean with a heterogeneous dataset, consider a simple height of people dataset." }, { "code": null, "e"...
Change the array into a permutation of numbers from 1 to n - GeeksforGeeks
28 May, 2021 Given an array A of n elements. We need to change the array into a permutation of numbers from 1 to n using minimum replacements in the array. Examples: Input : A[] = {2, 2, 3, 3} Output : 2 1 3 4 Explanation: To make it a permutation of 1 to 4, 1 and 4 are missing from the array. So replace 2, 3 with ...
[ { "code": null, "e": 25262, "s": 25234, "text": "\n28 May, 2021" }, { "code": null, "e": 25417, "s": 25262, "text": "Given an array A of n elements. We need to change the array into a permutation of numbers from 1 to n using minimum replacements in the array. Examples: " }, ...
How to fit ellipses around possible objects in an image using OpenCV Java?
You can fit an ellipse over a shape using the fitEllipse() method of the org.opencv.imgproc.Imgproc class. This method accepts an object of MatOfPoint2f class, calculates the ellipse that would fit the given set of points and returns a RotatedRect object. Using this you can draw ellipses around the possible objects in ...
[ { "code": null, "e": 1318, "s": 1062, "text": "You can fit an ellipse over a shape using the fitEllipse() method of the org.opencv.imgproc.Imgproc class. This method accepts an object of MatOfPoint2f class, calculates the ellipse that would fit the given set of points and returns a RotatedRect objec...
Sabre Interview Experience for SDE 2022
02 Aug, 2021 Sabre onsite recruiting drew a total of 240 students, but only six were chosen. There were four rounds to the procedure. Let’s discuss the experience and look at some pointers for each round. Round 1(Online Test): This round is comprised of 45 multiple-choice questions (MCQs) and two coding problems. Twen...
[ { "code": null, "e": 28, "s": 0, "text": "\n02 Aug, 2021" }, { "code": null, "e": 220, "s": 28, "text": "Sabre onsite recruiting drew a total of 240 students, but only six were chosen. There were four rounds to the procedure. Let’s discuss the experience and look at some pointers...
What is Exception in Python?
An exception is an event, which occurs during the execution of a program that disrupts the normal flow of the program's instructions. In general, when a Python script encounters a situation that it cannot cope with, it raises an exception. An exception is a Python object that represents an error. When a Python script r...
[ { "code": null, "e": 1485, "s": 1187, "text": "An exception is an event, which occurs during the execution of a program that disrupts the normal flow of the program's instructions. In general, when a Python script encounters a situation that it cannot cope with, it raises an exception. An exception ...
What are Snippets in Postman?
Snippets are small scripts used in Postman which are used to verify an API. These are pre-developed scripts that can be utilized directly. Thus it helps to save a good amount of time. Snippets can be used in the Pre-request Script and Tests tabs in Postman. Navigate to the Tests tab and the SNIPPETS section should be a...
[ { "code": null, "e": 1371, "s": 1187, "text": "Snippets are small scripts used in Postman which are used to verify an API. These are pre-developed scripts that can be utilized directly. Thus it helps to save a good amount of time." }, { "code": null, "e": 1596, "s": 1371, "text":...
How to extract image metadata in Python?
03 Jan, 2021 Prerequisites: PIL Metadata stands for data about data. In case of images, metadata means details about the image and its production. Some metadata is generated automatically by the capturing device. Some details contained by image metadata is as follows: Height Width Date and Time Model etc. Python has P...
[ { "code": null, "e": 28, "s": 0, "text": "\n03 Jan, 2021" }, { "code": null, "e": 47, "s": 28, "text": "Prerequisites: PIL" }, { "code": null, "e": 229, "s": 47, "text": "Metadata stands for data about data. In case of images, metadata means details about the ...
callable() in Python
10 Nov, 2017 In general, a callable is something that can be called. This built-in method in Python checks and returns True if the object passed appears to be callable, but may not be, otherwise False.Syntax: callable(object) The callable() method takes only one argument, an object and returns one of the two values: re...
[ { "code": null, "e": 54, "s": 26, "text": "\n10 Nov, 2017" }, { "code": null, "e": 250, "s": 54, "text": "In general, a callable is something that can be called. This built-in method in Python checks and returns True if the object passed appears to be callable, but may not be, ot...
Python | Multiply each element in a sublist by its index
29 May, 2019 Given a list of lists, the task is to multiply each element in a sublist by its index and return a summed list. Given below are a few methods to solve the problem. Method #1: Using Naive Method # Python3 code to demonstrate# to multiply numbers with position# and add them to return num import numpy as np ...
[ { "code": null, "e": 28, "s": 0, "text": "\n29 May, 2019" }, { "code": null, "e": 140, "s": 28, "text": "Given a list of lists, the task is to multiply each element in a sublist by its index and return a summed list." }, { "code": null, "e": 192, "s": 140, "te...
How to change the placeholder text using jQuery?
03 Aug, 2021 The placeholder text is the text output for the user what is that input for. Like in HTML, we use Name as an input field and place a text inside that space i.e. Enter your name. Like shown in the below image: Name: So we want a button or some event that will change that placeholder text into some other te...
[ { "code": null, "e": 28, "s": 0, "text": "\n03 Aug, 2021" }, { "code": null, "e": 237, "s": 28, "text": "The placeholder text is the text output for the user what is that input for. Like in HTML, we use Name as an input field and place a text inside that space i.e. Enter your nam...
Number guessing game in Python 3 and C
08 Feb, 2021 Most of the geeks from a CS (Computer Science) background, think of their very first project after doing a Programming Language. Here, you will get your very first project and the basic one, in this article. Task: Below are the steps: Build a Number guessing game, in which the user selects a range. Let’s s...
[ { "code": null, "e": 52, "s": 24, "text": "\n08 Feb, 2021" }, { "code": null, "e": 260, "s": 52, "text": "Most of the geeks from a CS (Computer Science) background, think of their very first project after doing a Programming Language. Here, you will get your very first project an...
Minimum number of items to be delivered
07 Jul, 2022 Given N buckets, each containing A[i] items. Given K tours within which all of the items are needed to be delivered. It is allowed to take items from only one bucket in 1 tour. The task is to tell the minimum number of items needed to be delivered per tour so that all of the items can be delivered within K...
[ { "code": null, "e": 52, "s": 24, "text": "\n07 Jul, 2022" }, { "code": null, "e": 399, "s": 52, "text": "Given N buckets, each containing A[i] items. Given K tours within which all of the items are needed to be delivered. It is allowed to take items from only one bucket in 1 tou...
Python | Variance of List
17 Sep, 2019 While working with Python, we can have a problem in which we need to find variance of a list cumulative. This problem is common in Data Science domain. Let’s discuss certain ways in which this problem can be solved. Method #1 : Using loop + formulaThe simpler manner to approach this problem is to employ th...
[ { "code": null, "e": 28, "s": 0, "text": "\n17 Sep, 2019" }, { "code": null, "e": 244, "s": 28, "text": "While working with Python, we can have a problem in which we need to find variance of a list cumulative. This problem is common in Data Science domain. Let’s discuss certain w...
How do I wrap text in a <pre> tag in HTML?
HTML <pre> tag defines preformatted text. It is used to display code blocks since it preserves spaces and line breaks. If the line is large, then the <pre> tag won’t wrap it by default. To wrap it, we need to use CSS. You can try to run the following code to learn about the usage of <pre> tag and how we can wrap text i...
[ { "code": null, "e": 1306, "s": 1187, "text": "HTML <pre> tag defines preformatted text. It is used to display code blocks since it preserves spaces and line breaks." }, { "code": null, "e": 1405, "s": 1306, "text": "If the line is large, then the <pre> tag won’t wrap it by defau...