title
stringlengths
3
221
text
stringlengths
17
477k
parsed
listlengths
0
3.17k
Java Regex - Character Class [a-zA-Z] Match
The character class [a-zA-Z] matches any character from a to z or A to Z. The following example shows the usage of character class matching. package com.tutorialspoint; import java.util.regex.Matcher; import java.util.regex.Pattern; public class CharacterClassDemo { private static final String REGEX = "[a-zA-Z]"; ...
[ { "code": null, "e": 2198, "s": 2124, "text": "The character class [a-zA-Z] matches any character from a to z or A to Z." }, { "code": null, "e": 2265, "s": 2198, "text": "The following example shows the usage of character class matching." }, { "code": null, "e": 2873...
Building a Facial Recognition Model using PCA & SVM Algorithms | by Mahnoor Javed | Towards Data Science
In this article, we will learn to use Principal Component Analysis and Support Vector Machines for building a facial recognition model. First, let us understand what PCA and SVM are: Principal Component Analysis (PCA) is a machine learning algorithm that is widely used in exploratory data analysis and for making predic...
[ { "code": null, "e": 308, "s": 172, "text": "In this article, we will learn to use Principal Component Analysis and Support Vector Machines for building a facial recognition model." }, { "code": null, "e": 355, "s": 308, "text": "First, let us understand what PCA and SVM are:" ...
How do we use re.finditer() method in Python regular expression?
According to Python docs, re.finditer(pattern, string, flags=0) Return an iterator yielding MatchObject instances over all non-overlapping matches for the RE pattern in string. The string is scanned left-to-right, and matches are returned in the order found. Empty matches are included in the result. The following cod...
[ { "code": null, "e": 1088, "s": 1062, "text": "According to Python docs," }, { "code": null, "e": 1126, "s": 1088, "text": "re.finditer(pattern, string, flags=0)" }, { "code": null, "e": 1365, "s": 1126, "text": " Return an iterator yielding MatchObject instan...
Flutter - Battery Level and State - GeeksforGeeks
30 Nov, 2021 In this article, we will see how to fetch Battery level and its state using flutter. To fetch Battery level(percentage) and its state we use a package called battery plus package. Battery level – we see how much percent battery is remaining in mobile. Battery State – we see whether the state of the battery...
[ { "code": null, "e": 25371, "s": 25343, "text": "\n30 Nov, 2021" }, { "code": null, "e": 25551, "s": 25371, "text": "In this article, we will see how to fetch Battery level and its state using flutter. To fetch Battery level(percentage) and its state we use a package called batte...
C# | Get the first node of the LinkedList<T> - GeeksforGeeks
01 Feb, 2019 LinkedList<T>.First property is used to get the first node of the LinkedList<T>. Syntax: public System.Collections.Generic.LinkedListNode First { get; } Return Value: The first LinkedListNode<T> of the LinkedList<T>. Below given are some examples to understand the implementation in a better way: Example 1...
[ { "code": null, "e": 25847, "s": 25819, "text": "\n01 Feb, 2019" }, { "code": null, "e": 25928, "s": 25847, "text": "LinkedList<T>.First property is used to get the first node of the LinkedList<T>." }, { "code": null, "e": 25936, "s": 25928, "text": "Syntax:" ...
Common mistakes to be avoided in Competitive Programming in C++ | Beginners - GeeksforGeeks
Common mistakes to be avoided in Competitive Programming in C++ | Beginners C++ tricks for competitive programming (for C++ 11) Writing C/C++ code efficiently in Competitive programming Array algorithms in C++ STL (all_of, any_of, none_of, copy_n and iota) What are the default values of static variables in C? Understan...
[ { "code": null, "e": 24114, "s": 24038, "text": "Common mistakes to be avoided in Competitive Programming in C++ | Beginners" }, { "code": null, "e": 24166, "s": 24114, "text": "C++ tricks for competitive programming (for C++ 11)" }, { "code": null, "e": 24224, "s...
Reverse a number using stack in C++
We are given an integer number Num as input. The goal is to find the reverse of the number using stack. Stack:- A stack is a data structure in C++ which stores data in LIFO ( Last in First Out) manner. Major operations of stack are-: Declaration-: stack <int> stck; //stck is now a stack variable. Finding Top using top(...
[ { "code": null, "e": 1166, "s": 1062, "text": "We are given an integer number Num as input. The goal is to find the reverse of the number using stack." }, { "code": null, "e": 1296, "s": 1166, "text": "Stack:- A stack is a data structure in C++ which stores data in LIFO ( Last in...
Java Interface
Another way to achieve abstraction in Java, is with interfaces. An interface is a completely "abstract class" that is used to group related methods with empty bodies: // interface interface Animal { public void animalSound(); // interface method (does not have a body) public void run(); // interface method (does n...
[ { "code": null, "e": 64, "s": 0, "text": "Another way to achieve abstraction in Java, is with interfaces." }, { "code": null, "e": 168, "s": 64, "text": "An interface is a completely \"abstract class\" \nthat is used to group related methods with empty bodies:" }, { "code...
Recursive Selection Sort - GeeksforGeeks
29 Apr, 2022 The Selection Sort algorithm sorts maintain two parts. The first part that is already sortedThe second part is yet to be sorted. The first part that is already sorted The second part is yet to be sorted. The algorithm works by repeatedly finding the minimum element (considering ascending order) from the u...
[ { "code": null, "e": 24078, "s": 24050, "text": "\n29 Apr, 2022" }, { "code": null, "e": 24134, "s": 24078, "text": "The Selection Sort algorithm sorts maintain two parts. " }, { "code": null, "e": 24208, "s": 24134, "text": "The first part that is already sor...
Lodash _.isNumber() Function - GeeksforGeeks
25 Nov, 2021 Lodash is a JavaScript library that works on the top of underscore.js. Lodash helps in working with arrays, strings, objects, numbers, etc. The _.isNumber() method is used to find whether the given value parameter is number or not. If the given value is a number then it returns True value otherwise, it ret...
[ { "code": null, "e": 24978, "s": 24950, "text": "\n25 Nov, 2021" }, { "code": null, "e": 25118, "s": 24978, "text": "Lodash is a JavaScript library that works on the top of underscore.js. Lodash helps in working with arrays, strings, objects, numbers, etc." }, { "code": n...
MySQL CREATE TABLE Statement
The CREATE TABLE statement is used to create a new table in a database. The column parameters specify the names of the columns of the table. The datatype parameter specifies the type of data the column can hold (e.g. varchar, integer, date, etc.). Tip: For an overview of the available data types, go to our complete Dat...
[ { "code": null, "e": 72, "s": 0, "text": "The CREATE TABLE statement is used to create a new table in a database." }, { "code": null, "e": 141, "s": 72, "text": "The column parameters specify the names of the columns of the table." }, { "code": null, "e": 248, "s"...
SQL Tryit Editor v1.6
SELECT * FROM Orders WHERE OrderDate BETWEEN '1996-07-01' AND '1996-07-31'; ​ Edit the SQL Statement, and click "Run SQL" to see the result. This SQL-Statement is not supported in the WebSQL Database. The example still works, because it uses a modified version of SQL. Your browser does not support WebSQL. Your are now ...
[ { "code": null, "e": 21, "s": 0, "text": "SELECT * FROM Orders" }, { "code": null, "e": 76, "s": 21, "text": "WHERE OrderDate BETWEEN '1996-07-01' AND '1996-07-31';" }, { "code": null, "e": 78, "s": 76, "text": "​" }, { "code": null, "e": 141, ...
atd command in Linux with examples - GeeksforGeeks
04 Apr, 2019 atd is a job scheduler daemon that runs jobs scheduled for later execution. These jobs are one-time task(not recurring) at a specific time scheduled using ‘at’ or ‘batch’ utility. Syntax: atd [-l load_avg] [-b batch_interval] [-d] [-f] [-s] Options: -l : Specifies a limiting load factor, over which batch j...
[ { "code": null, "e": 24040, "s": 24012, "text": "\n04 Apr, 2019" }, { "code": null, "e": 24220, "s": 24040, "text": "atd is a job scheduler daemon that runs jobs scheduled for later execution. These jobs are one-time task(not recurring) at a specific time scheduled using ‘at’ or ...
Data Visualization: How to choose the right chart [Part 1] | by XuanKhanh Nguyen | Towards Data Science
According to the World Economic Forum, the world produces 2.5 quintillion bytes of data every day. With so much data, it’s become increasingly difficult to manage and make sense of it all. It would be impossible for any person to wade through data line-by-line and see distinct patterns and make observations. Data visua...
[ { "code": null, "e": 481, "s": 171, "text": "According to the World Economic Forum, the world produces 2.5 quintillion bytes of data every day. With so much data, it’s become increasingly difficult to manage and make sense of it all. It would be impossible for any person to wade through data line-by...
Production Data Processing with PySpark on AWS EMR | by Brent Lemieux | Towards Data Science
Data Pipelines with PySpark and AWS EMR is a multi-part series. This is part 2 of 2. Check out part 1 if you need a primer on AWS EMR. Getting Started with PySpark on AWS EMRProduction Data Processing with PySpark on AWS EMR (this article) Getting Started with PySpark on AWS EMR Production Data Processing with PySpark ...
[ { "code": null, "e": 307, "s": 172, "text": "Data Pipelines with PySpark and AWS EMR is a multi-part series. This is part 2 of 2. Check out part 1 if you need a primer on AWS EMR." }, { "code": null, "e": 412, "s": 307, "text": "Getting Started with PySpark on AWS EMRProduction D...
Adding Drop Shadow to Images using CSS3
To add drop shadow to image in CSS3, use the drop-shadow value for filter property. It has the following values − h-shadow – To specify a pixel value for the horizontal shadow. v-shadow – To specify a pixel value for the vertical shadow. Negative values place the shadow above the image. blur – To add a blur effect to t...
[ { "code": null, "e": 1176, "s": 1062, "text": "To add drop shadow to image in CSS3, use the drop-shadow value for filter property. It has the following values −" }, { "code": null, "e": 1239, "s": 1176, "text": "h-shadow – To specify a pixel value for the horizontal shadow." },...
An algorithm to find the best moving average for stock trading | by Gianluca Malato | Towards Data Science
Moving averages are one of the most used tools in stock trading. Many traders actually use only this tool in their investment toolbox. Let’s see what they are and how we can use Python to fine-tune their features. In a time series, a moving average of period N at a certain time t, is the mean value of the N values befo...
[ { "code": null, "e": 386, "s": 172, "text": "Moving averages are one of the most used tools in stock trading. Many traders actually use only this tool in their investment toolbox. Let’s see what they are and how we can use Python to fine-tune their features." }, { "code": null, "e": 928,...
du Command in LINUX - GeeksforGeeks
15 May, 2019 While working on LINUX, there might come a situation when you want to transfer a set of files or the entire directory. In such a case, you might wanna know the disk space consumed by that particular directory or set of files. As you are dealing with LINUX, there exists a command line utility for this also ...
[ { "code": null, "e": 23950, "s": 23922, "text": "\n15 May, 2019" }, { "code": null, "e": 24335, "s": 23950, "text": "While working on LINUX, there might come a situation when you want to transfer a set of files or the entire directory. In such a case, you might wanna know the dis...
AWT TextEvent Class
The object of this class represents the text events.The TextEvent is generated when character is entered in the text fields or text area. The TextEvent instance does not include the characters currently in the text component that generated the event rather we are provided with other methods to retrieve that informatio...
[ { "code": null, "e": 2070, "s": 1747, "text": "The object of this class represents the text events.The TextEvent is generated when character is entered in the text fields or text area. The TextEvent instance does not include the characters currently in the text component that generated the event ra...
List assign() function in C++ STL
Given is th e task to show the working of the assign() function in C++. The list::assign() function is a part of the C++ standard template library. It is used to assign the values to a list and also to copy values from one list to another. <list> header file should be included to call this function. The syntax for assi...
[ { "code": null, "e": 1134, "s": 1062, "text": "Given is th e task to show the working of the assign() function in C++." }, { "code": null, "e": 1302, "s": 1134, "text": "The list::assign() function is a part of the C++ standard template library. It is used to assign the values to...
Loop through the Vector elements using an Iterator in Java
An Iterator can be used to loop through the Vector elements. The method hasNext( ) returns true if there are more elements in the Vector and false otherwise. The method next( ) returns the next element in the Vector and throws the exception NoSuchElementException if there is no next element. A program that demonstrates...
[ { "code": null, "e": 1355, "s": 1062, "text": "An Iterator can be used to loop through the Vector elements. The method hasNext( ) returns true if there are more elements in the Vector and false otherwise. The method next( ) returns the next element in the Vector and throws the exception NoSuchElemen...
Making Docker, Conda and Jupyter play well together | by Borun Chowdhury Ph.D. | Towards Data Science
Docker and Docker-Compose are great utilities that support the microservice paradigm by allowing efficient containerization. Within the python ecosystem the package manager Conda also allows some kind of containerization that is limited to python packages. Conda environments are especially handy for data scientists wor...
[ { "code": null, "e": 585, "s": 172, "text": "Docker and Docker-Compose are great utilities that support the microservice paradigm by allowing efficient containerization. Within the python ecosystem the package manager Conda also allows some kind of containerization that is limited to python packages...
bin() in Python - GeeksforGeeks
17 Sep, 2021 Python bin() function returns the binary string of a given integer. Syntax: bin(a) Parameters : a : an integer to convert Return Value : A binary string of an integer or int object. Exceptions : Raises TypeError when a float value is sent in arguments. Python3 # Python code to demonstrate working of# bin(...
[ { "code": null, "e": 24678, "s": 24650, "text": "\n17 Sep, 2021" }, { "code": null, "e": 24746, "s": 24678, "text": "Python bin() function returns the binary string of a given integer." }, { "code": null, "e": 24762, "s": 24746, "text": "Syntax: bin(a)" }, ...
K-Nearest Neighbours (kNN) Algorithm: Common Questions and Python Implementation | by Chingis Oinar | Towards Data Science
K-Nearest Neighbours is considered to be one of the most intuitive machine learning algorithms since it is simple to understand and explain. Additionally, it is quite convenient to demonstrate how everything goes visually. However, the kNN algorithm is still a common and very useful algorithm to use for a large variety...
[ { "code": null, "e": 811, "s": 171, "text": "K-Nearest Neighbours is considered to be one of the most intuitive machine learning algorithms since it is simple to understand and explain. Additionally, it is quite convenient to demonstrate how everything goes visually. However, the kNN algorithm is st...
Best Practices for Airflow Developers | Towards Data Science
Apache Airflow is one of the most popular open-source data orchestration frameworks for building and scheduling batch-based pipelines. To master the art of ETL with Airflow, it is critical to learn how to efficiently develop data pipelines by properly utilizing built-in features, adopting DevOps strategies, and automat...
[ { "code": null, "e": 759, "s": 172, "text": "Apache Airflow is one of the most popular open-source data orchestration frameworks for building and scheduling batch-based pipelines. To master the art of ETL with Airflow, it is critical to learn how to efficiently develop data pipelines by properly uti...
Minimize Rounding Error to Meet Target in C++
Suppose we have an array of prices P [p1,p2...,pn] and a target value, we have to round each price Pi to Roundi(Pi) so that the rounded array [Round1(P1),Round2(P2)...,Roundn(Pn)] sums to the given target value. Here each operation Roundi(pi) could be either Floor(Pi) or Ceil(Pi). We have to return the string "-1" if t...
[ { "code": null, "e": 1344, "s": 1062, "text": "Suppose we have an array of prices P [p1,p2...,pn] and a target value, we have to round each price Pi to Roundi(Pi) so that the rounded array [Round1(P1),Round2(P2)...,Roundn(Pn)] sums to the given target value. Here each operation Roundi(pi) could be e...
Node.js shift() function - GeeksforGeeks
14 Oct, 2021 shift() is an array function from Node.js that is used to delete element from the front of an array. Syntax: array_name.shift() Parameter: This function does not takes any parameter. Return type: The function returns the array after deleting the element. The program below demonstrates the working of the fu...
[ { "code": null, "e": 24531, "s": 24503, "text": "\n14 Oct, 2021" }, { "code": null, "e": 24632, "s": 24531, "text": "shift() is an array function from Node.js that is used to delete element from the front of an array." }, { "code": null, "e": 24640, "s": 24632, ...
Operator Precedence and Associativity in C
Operator precedence determines the grouping of terms in an expression and decides how an expression is evaluated. Certain operators have higher precedence than others; for example, the multiplication operator has a higher precedence than the addition operator. For example, x = 7 + 3 * 2; here, x is assigned 13, not 20 ...
[ { "code": null, "e": 1323, "s": 1062, "text": "Operator precedence determines the grouping of terms in an expression and decides how an expression is evaluated. Certain operators have higher precedence than others; for example, the multiplication operator has a higher precedence than the addition op...
Apache Presto - MySQL Connector
The MySQL connector is used to query an external MySQL database. MySQL server installation. Hopefully you have installed mysql server on your machine. To enable mysql properties on Presto server, you must create a file “mysql.properties” in “etc/catalog” directory. Issue the following command to create a mysql.properti...
[ { "code": null, "e": 2071, "s": 2006, "text": "The MySQL connector is used to query an external MySQL database." }, { "code": null, "e": 2098, "s": 2071, "text": "MySQL server installation." }, { "code": null, "e": 2335, "s": 2098, "text": "Hopefully you have ...
C# Program to Get the Machine Name or Host Name Using Environment Class - GeeksforGeeks
30 Nov, 2021 Environment Class provides information about the current platform and manipulates, the current platform. It is useful for getting and setting various operating system-related information. We can use it in such a way that retrieves command-line arguments information, exit codes information, environment vari...
[ { "code": null, "e": 24302, "s": 24274, "text": "\n30 Nov, 2021" }, { "code": null, "e": 25022, "s": 24302, "text": "Environment Class provides information about the current platform and manipulates, the current platform. It is useful for getting and setting various operating sys...
ByteArrayOutputStream write() method in Java with Examples - GeeksforGeeks
28 May, 2020 The write() method of ByteArrayOutputStream class in Java is used in two ways: 1. The write(int) method of ByteArrayOutputStream class in Java is used to write the specified byte to the ByteArrayOutputStream. This specified byte is passed as integer type parameter in this write() method. This write() metho...
[ { "code": null, "e": 25225, "s": 25197, "text": "\n28 May, 2020" }, { "code": null, "e": 25304, "s": 25225, "text": "The write() method of ByteArrayOutputStream class in Java is used in two ways:" }, { "code": null, "e": 25564, "s": 25304, "text": "1. The writ...
How to Add JAR file to Classpath in Java? - GeeksforGeeks
07 Aug, 2021 JAR is an abbreviation of JAVA Archive. It is used for aggregating multiple files into a single one, and it is present in a ZIP format. It can also be used as an archiving tool but the main intention to use this file for development is that the Java applets and their components(.class files) can be easily ...
[ { "code": null, "e": 25681, "s": 25653, "text": "\n07 Aug, 2021" }, { "code": null, "e": 26312, "s": 25681, "text": "JAR is an abbreviation of JAVA Archive. It is used for aggregating multiple files into a single one, and it is present in a ZIP format. It can also be used as an a...
Mapping CSV to JavaBeans Using OpenCSV - GeeksforGeeks
17 Jul, 2018 OpenCSV provides classes to map CSV file to a list of Java-beans. CsvToBean class is used to map CSV data to JavaBeans. The CSV data can be parsed to a bean, but what is required to be done is to define the mapping strategy and pass the strategy to CsvToBean to parse the data into a bean. HeaderColumnNameT...
[ { "code": null, "e": 25830, "s": 25802, "text": "\n17 Jul, 2018" }, { "code": null, "e": 26237, "s": 25830, "text": "OpenCSV provides classes to map CSV file to a list of Java-beans. CsvToBean class is used to map CSV data to JavaBeans. The CSV data can be parsed to a bean, but w...
Python | Decision tree implementation - GeeksforGeeks
26 Apr, 2022 Prerequisites: Decision Tree, DecisionTreeClassifier, sklearn, numpy, pandas Decision Tree is one of the most powerful and popular algorithm. Decision-tree algorithm falls under the category of supervised learning algorithms. It works for both continuous as well as categorical output variables. In this art...
[ { "code": null, "e": 25471, "s": 25443, "text": "\n26 Apr, 2022" }, { "code": null, "e": 25548, "s": 25471, "text": "Prerequisites: Decision Tree, DecisionTreeClassifier, sklearn, numpy, pandas" }, { "code": null, "e": 25767, "s": 25548, "text": "Decision Tree...
Sum of all the levels in a Binary Search Tree - GeeksforGeeks
02 Nov, 2021 Given a Binary Search Tree, the task is to find the horizontal sum of the nodes that are in the same level.Examples: Input: Output: 6 12 24Input: Output: 6 12 12 Approach: Find the height of the given binary tree then the number of levels in the tree will be levels = height + 1. Now create an arr...
[ { "code": null, "e": 26065, "s": 26037, "text": "\n02 Nov, 2021" }, { "code": null, "e": 26184, "s": 26065, "text": "Given a Binary Search Tree, the task is to find the horizontal sum of the nodes that are in the same level.Examples: " }, { "code": null, "e": 26193, ...
How to use Array.BinarySearch() Method in C# | Set -1 - GeeksforGeeks
29 May, 2021 Array.BinarySearch() method is used to search a value in a sorted one dimensional array. The binary search algorithm is used by this method. This algorithm searches a sorted array by repeatedly dividing the search interval in half. Begin with an interval covering the whole array. If the value of the search...
[ { "code": null, "e": 26337, "s": 26309, "text": "\n29 May, 2021" }, { "code": null, "e": 26849, "s": 26337, "text": "Array.BinarySearch() method is used to search a value in a sorted one dimensional array. The binary search algorithm is used by this method. This algorithm searche...
Recursive program to check if number is palindrome or not - GeeksforGeeks
24 Feb, 2022 Given a number, the task is to write a recursive function which checks if the given number is palindrome or not. Examples: Input : 121 Output : yes Input : 532 Output : no The approach for writing the function is to call the function recursively till the number is completely traversed from the back. U...
[ { "code": null, "e": 26115, "s": 26087, "text": "\n24 Feb, 2022" }, { "code": null, "e": 26240, "s": 26115, "text": "Given a number, the task is to write a recursive function which checks if the given number is palindrome or not. Examples: " }, { "code": null, "e": 2...
How to create a table in ReactJS ? - GeeksforGeeks
27 Oct, 2021 In this article, we will create a simple table in React.js just like you would create in a normal HTML project. Also, we will style it using normal CSS. Prerequisites: The pre-requisites for this project are: React Functional Components JavaScript ES6 HTML Tables & CSS Creating a React application: Step 1...
[ { "code": null, "e": 26561, "s": 26533, "text": "\n27 Oct, 2021" }, { "code": null, "e": 26715, "s": 26561, "text": "In this article, we will create a simple table in React.js just like you would create in a normal HTML project. Also, we will style it using normal CSS. " }, {...
Appending to list in Python dictionary - GeeksforGeeks
17 Oct, 2021 In this article, we are going to see how to append to a list in a Python dictionary. In this method, we will use the += operator to append a list into the dictionary, for this we will take a dictionary and then add elements as a list into the dictionary. Python3 Details = {"Destination": "China", ...
[ { "code": null, "e": 25555, "s": 25527, "text": "\n17 Oct, 2021" }, { "code": null, "e": 25640, "s": 25555, "text": "In this article, we are going to see how to append to a list in a Python dictionary." }, { "code": null, "e": 25810, "s": 25640, "text": "In th...
Homomorphism & Isomorphism of Group - GeeksforGeeks
26 May, 2021 Introduction :We can say that “o” is the binary operation on set G if : G is an non-empty set & G * G = { (a,b) : a , b∈ G } and o : G * G –> G. Here, aob denotes the image of ordered pair (a,b) under the function / operation o.Example – “+” is called a binary operation on G (any non-empty set ) if & onl...
[ { "code": null, "e": 26137, "s": 26109, "text": "\n26 May, 2021" }, { "code": null, "e": 26680, "s": 26137, "text": "Introduction :We can say that “o” is the binary operation on set G if : G is an non-empty set & G * G = { (a,b) : a , b∈ G } and o : G * G –> G. Here, aob denote...
Minimum operations to make XOR of array zero - GeeksforGeeks
28 Apr, 2021 We are given an array of n elements. The task is to make XOR of whole array 0. We can do the following to achieve this. We can select any one of the elements.After selecting an element, we can either increment or decrement it by 1. We can select any one of the elements. After selecting an element, we can...
[ { "code": null, "e": 26699, "s": 26671, "text": "\n28 Apr, 2021" }, { "code": null, "e": 26821, "s": 26699, "text": "We are given an array of n elements. The task is to make XOR of whole array 0. We can do the following to achieve this. " }, { "code": null, "e": 2693...
Top 5 Easter Eggs in Python - GeeksforGeeks
22 Jul, 2021 Python is really an interesting language with very good documentation. In this article, we will go through some fun stuff that isn’t documented and so considered as Easter eggs of Python. Most of the programmers should have started your programming journey from printing “Hello World!”. Would you believe th...
[ { "code": null, "e": 25537, "s": 25509, "text": "\n22 Jul, 2021" }, { "code": null, "e": 25725, "s": 25537, "text": "Python is really an interesting language with very good documentation. In this article, we will go through some fun stuff that isn’t documented and so considered a...
AngularJS | ng-disabled Directive - GeeksforGeeks
31 Aug, 2021 The ng-disabled Directive in AngularJS is used to enable or disable HTML elements. If the expression inside the ng-disabled attribute returns true then the form field will be disabled or vice versa. It is usually applied on form field (input, select, button, etc). Syntax: <element ng-disabled="expressio...
[ { "code": null, "e": 25518, "s": 25490, "text": "\n31 Aug, 2021" }, { "code": null, "e": 25784, "s": 25518, "text": "The ng-disabled Directive in AngularJS is used to enable or disable HTML elements. If the expression inside the ng-disabled attribute returns true then the form fi...
Program to convert Java list of Strings to Seq in Scala - GeeksforGeeks
14 Jan, 2020 A java list of Strings can be converted to sequence in Scala by utilizing toSeq method of Java in Scala. Here, we need to import Scala’s JavaConversions object in order to make this conversions work else an error will occur.Now, lets see some examples and then discuss how it works in details.Example:1# // ...
[ { "code": null, "e": 25301, "s": 25273, "text": "\n14 Jan, 2020" }, { "code": null, "e": 25605, "s": 25301, "text": "A java list of Strings can be converted to sequence in Scala by utilizing toSeq method of Java in Scala. Here, we need to import Scala’s JavaConversions object in ...
Print all possible combinations of words from Dictionary using Trie - GeeksforGeeks
13 Feb, 2020 Given an array of strings arr[], for every string in the array, print all possible combinations of strings that can be concatenated to make that word. Examples: Input: arr[] = ["sam", "sung", "samsung"] Output: sam: sam sung: sung samsung: sam sung samsung String 'samsung' can be formed ...
[ { "code": null, "e": 26065, "s": 26037, "text": "\n13 Feb, 2020" }, { "code": null, "e": 26216, "s": 26065, "text": "Given an array of strings arr[], for every string in the array, print all possible combinations of strings that can be concatenated to make that word." }, { ...
How to sort an array in a single loop? - GeeksforGeeks
11 Jun, 2021 Given an array of size N, the task is to sort this array using a single loop.How the array is sorted usually? There are many ways by which the array can be sorted in ascending order, like: Selection Sort Binary Sort Merge Sort Radix Sort Insertion Sort, etc In any of these methods, more than 1 loops is u...
[ { "code": null, "e": 25323, "s": 25295, "text": "\n11 Jun, 2021" }, { "code": null, "e": 25514, "s": 25323, "text": "Given an array of size N, the task is to sort this array using a single loop.How the array is sorted usually? There are many ways by which the array can be sorted ...
C - Input and Output
When we say Input, it means to feed some data into a program. An input can be given in the form of a file or from the command line. C programming provides a set of built-in functions to read the given input and feed it to the program as per requirement. When we say Output, it means to display some data on screen, print...
[ { "code": null, "e": 2338, "s": 2084, "text": "When we say Input, it means to feed some data into a program. An input can be given in the form of a file or from the command line. C programming provides a set of built-in functions to read the given input and feed it to the program as per requirement....
Java Program For Closest Prime Number - GeeksforGeeks
22 Dec, 2021 Given a number N, you have to print its closest prime number. The prime number can be lesser, equal, or greater than the given number. Condition: 1 ≤ N ≤ 100000 Examples: Input : 16 Output: 17 Explanation: The two nearer prime number of 16 are 13 and 17. But among these, 17 is the closest(As its distance...
[ { "code": null, "e": 23583, "s": 23555, "text": "\n22 Dec, 2021" }, { "code": null, "e": 23718, "s": 23583, "text": "Given a number N, you have to print its closest prime number. The prime number can be lesser, equal, or greater than the given number." }, { "code": null, ...
How to Use Lambda for Efficient Python Code | by Khuyen Tran | Towards Data Science
What this graph reminds you of? Amplification of amplitude in a wave? How can this be made? You take a closer look at the graph and realize something interesting. It looks like as x increases, the value on the y-axis first goes down to -1 then goes up to 1, goes down to -2 then goes up to 2, and so on. This gives you t...
[ { "code": null, "e": 549, "s": 171, "text": "What this graph reminds you of? Amplification of amplitude in a wave? How can this be made? You take a closer look at the graph and realize something interesting. It looks like as x increases, the value on the y-axis first goes down to -1 then goes up to ...
Python 3 - String rstrip() Method
The rstrip() method returns a copy of the string in which all chars have been stripped from the end of the string (default whitespace characters). Following is the syntax for rstrip() method − str.rstrip([chars]) chars − You can supply what chars have to be trimmed. This method returns a copy of the string in which al...
[ { "code": null, "e": 2487, "s": 2340, "text": "The rstrip() method returns a copy of the string in which all chars have been stripped from the end of the string (default whitespace characters)." }, { "code": null, "e": 2533, "s": 2487, "text": "Following is the syntax for rstrip(...
MongoDB query to search date records using only Month and Day
To search using month and day only, use $where. Let us create a collection with documents − > db.demo181.insertOne({"ShippingDate":new ISODate("2020-01-10")}); { "acknowledged" : true, "insertedId" : ObjectId("5e398a699e4f06af551997fe") } > db.demo181.insertOne({"ShippingDate":new ISODate("2019-12-11")}); { "a...
[ { "code": null, "e": 1154, "s": 1062, "text": "To search using month and day only, use $where. Let us create a collection with documents −" }, { "code": null, "e": 1766, "s": 1154, "text": "> db.demo181.insertOne({\"ShippingDate\":new ISODate(\"2020-01-10\")});\n{\n \"acknowled...
Calculate total time duration (add time) in MySQL?
To calculate the total time duration in MySQL, you need to use SEC_TO_TIME(). Let us see an example by creating a table mysql> create table AddTotalTimeDemo - > ( - > Id int NOT NULL AUTO_INCREMENT PRIMARY KEY, - > LoginTime time - > ); Query OK, 0 rows affected (0.63 sec) Insert some records in the table u...
[ { "code": null, "e": 1182, "s": 1062, "text": "To calculate the total time duration in MySQL, you need to use SEC_TO_TIME(). Let us see an example by creating a table" }, { "code": null, "e": 1348, "s": 1182, "text": "mysql> create table AddTotalTimeDemo\n - > (\n - > Id int ...
Fortran - Pointers
In most programming languages, a pointer variable stores the memory address of an object. However, in Fortran, a pointer is a data object that has more functionalities than just storing the memory address. It contains more information about a particular object, like type, rank, extents, and memory address. A pointer is...
[ { "code": null, "e": 2454, "s": 2146, "text": "In most programming languages, a pointer variable stores the memory address of an object. However, in Fortran, a pointer is a data object that has more functionalities than just storing the memory address. It contains more information about a particular...
Optimize your CPU for Deep Learning | by Param Popat | Towards Data Science
In the last few years, Deep Learning has picked up pace in academia as well as industry. Every company is now looking for an A.I. based solution to problems. This boom has its own merits and demerits, but that’s for another article, another day. This surge in Machine Learning practitioners have infiltrated the academia...
[ { "code": null, "e": 642, "s": 171, "text": "In the last few years, Deep Learning has picked up pace in academia as well as industry. Every company is now looking for an A.I. based solution to problems. This boom has its own merits and demerits, but that’s for another article, another day. This surg...
Machine Learning Pipelines: Nonlinear Model Stacking | by Lester Leong | Towards Data Science
Normally, we face data sets that are fairly linear or can be manipulated into one. But what if the data set that we are examining really should be looked at in a nonlinear way? Step into the world of nonlinear feature engineering. First, we’ll look at examples of nonlinear data. Next, we’ll briefly discuss the K-means ...
[ { "code": null, "e": 659, "s": 172, "text": "Normally, we face data sets that are fairly linear or can be manipulated into one. But what if the data set that we are examining really should be looked at in a nonlinear way? Step into the world of nonlinear feature engineering. First, we’ll look at exa...
Arrays and Strings in C++ - GeeksforGeeks
07 May, 2020 Arrays An array in C or C++ is a collection of items stored at contiguous memory locations and elements can be accessed randomly using indices of an array. They are used to store similar types of elements as in the data type must be the same for all elements. They can be used to store the collection of pri...
[ { "code": null, "e": 24740, "s": 24712, "text": "\n07 May, 2020" }, { "code": null, "e": 24747, "s": 24740, "text": "Arrays" }, { "code": null, "e": 25260, "s": 24747, "text": "An array in C or C++ is a collection of items stored at contiguous memory locations...
How to get radiobutton output in Tkinter?
The radiobutton widget in Tkinter allows the user to make a selection for only one option from a set of given choices. The radiobutton has only two values, either True or False. If we want to get the output to check which option the user has selected, then we can use the get() method. It returns the object that is defi...
[ { "code": null, "e": 1240, "s": 1062, "text": "The radiobutton widget in Tkinter allows the user to make a selection for only one option from a set of given choices. The radiobutton has only two values, either True or False." }, { "code": null, "e": 1534, "s": 1240, "text": "If w...
CSS | stroke-linejoin Property - GeeksforGeeks
22 Nov, 2019 The stroke-linejoin property is an inbuilt property used to define the shape that is used to end an open sub-path of a stroke. Syntax: stroke-linejoin: miter | miter-clip | round | bevel | arcs | initial | inherit Property Values: miter: It is used to indicate that a sharp corner would be used to join the ...
[ { "code": null, "e": 25376, "s": 25348, "text": "\n22 Nov, 2019" }, { "code": null, "e": 25503, "s": 25376, "text": "The stroke-linejoin property is an inbuilt property used to define the shape that is used to end an open sub-path of a stroke." }, { "code": null, "e":...
Train a Hand Detector using Tensorflow 2 Object Detection API in 2021 | by Aalok Patwardhan | Towards Data Science
I wanted to make a computer vision application that could detect my hands in real-time. There were so many articles online that used the Tensorflow object detection API and Google Colab, but I still struggled a lot to actually get things working. The reason? Versions of libraries and code change! Here is an example of ...
[ { "code": null, "e": 469, "s": 171, "text": "I wanted to make a computer vision application that could detect my hands in real-time. There were so many articles online that used the Tensorflow object detection API and Google Colab, but I still struggled a lot to actually get things working. The reas...
jMeter - Webservice Test Plan
In this chapter, we will learn how to create a Test Plan to test a WebService. For our test purpose, we have created a simple webservice project and deployed it on the Tomcat server locally. To create a webservice project, we have used Eclipse IDE. First write the Service Endpoint Interface HelloWorld under the package...
[ { "code": null, "e": 2096, "s": 1905, "text": "In this chapter, we will learn how to create a Test Plan to test a WebService. For our test purpose, we have created a simple webservice project and deployed it on the Tomcat server locally." }, { "code": null, "e": 2302, "s": 2096, ...
How to Show All Tables in MySQL using Python? - GeeksforGeeks
29 Sep, 2021 A connector is employed when we have to use mysql with other programming languages. The work of mysql-connector is to provide access to MySQL Driver to the required language. Thus, it generates a connection between the programming language and the MySQL Server. In order to make python interact with the MyS...
[ { "code": null, "e": 24765, "s": 24737, "text": "\n29 Sep, 2021" }, { "code": null, "e": 25027, "s": 24765, "text": "A connector is employed when we have to use mysql with other programming languages. The work of mysql-connector is to provide access to MySQL Driver to the require...
Convert a Number to Hexadecimal in C++
Suppose we have an integer; we have to devise an algorithm to convert it to hexadecimal. For negative numbers we will use the two’s complement method. So, if the input is like 254 and -12, then the output will be fe and fffffff4 respectively. To solve this, we will follow these steps − if num1 is same as 0, then −retur...
[ { "code": null, "e": 1213, "s": 1062, "text": "Suppose we have an integer; we have to devise an algorithm to convert it to hexadecimal. For negative numbers we will use the two’s complement method." }, { "code": null, "e": 1305, "s": 1213, "text": "So, if the input is like 254 an...
Track COVID-19 Data Yourself Using R | by Chris Ross | Towards Data Science
When the global pandemic was first gaining momentum earlier this year, I relied on the media for updates, as most people do. I soon found that the media reports were not only inconsistent but often presented incomplete information. The fundamental issue with these limitations is that they frequently lead to misundersta...
[ { "code": null, "e": 644, "s": 172, "text": "When the global pandemic was first gaining momentum earlier this year, I relied on the media for updates, as most people do. I soon found that the media reports were not only inconsistent but often presented incomplete information. The fundamental issue w...
Java String regionMatches() Method with Examples - GeeksforGeeks
10 Dec, 2021 The regionMatches() method of the String class has two variants that can be used to test if two string regions are matching or equal. There are two variants of this method, i.e., one is case sensitive test method, and the other ignores the case-sensitive method. Syntax: 1. Case sensitive test method: publi...
[ { "code": null, "e": 23557, "s": 23529, "text": "\n10 Dec, 2021" }, { "code": null, "e": 23820, "s": 23557, "text": "The regionMatches() method of the String class has two variants that can be used to test if two string regions are matching or equal. There are two variants of thi...
Variational Autoencoder Demystified With PyTorch Implementation. | by William Falcon | Towards Data Science
It’s likely that you’ve searched for VAE tutorials but have come away empty-handed. Either the tutorial uses MNIST instead of color images or the concepts are conflated and not explained clearly. You’re in luck! This tutorial covers all aspects of VAEs including the matching math and implementation on a realistic datas...
[ { "code": null, "e": 367, "s": 171, "text": "It’s likely that you’ve searched for VAE tutorials but have come away empty-handed. Either the tutorial uses MNIST instead of color images or the concepts are conflated and not explained clearly." }, { "code": null, "e": 383, "s": 367, ...
Scrolling to element using Webdriver.
We can perform scrolling to an element using Selenium webdriver. This can be achieved in multiple ways. Selenium cannot handle scrolling directly. It takes the help of the Javascript Executor and Actions class to do scrolling action. First of all we have to identify the element up to which we have to scroll to with the...
[ { "code": null, "e": 1296, "s": 1062, "text": "We can perform scrolling to an element using Selenium webdriver. This can be achieved in multiple ways. Selenium cannot handle scrolling directly. It takes the help of the Javascript Executor and Actions class to do scrolling action." }, { "code...
Detect an object with OpenCV-Python - GeeksforGeeks
18 May, 2020 OpenCV is the huge open-source library for computer vision, machine learning, and image processing and now it plays a major role in real-time operation which is very important in today’s systems. By using it, one can process images and videos to identify objects, faces, or even the handwriting of a human. ...
[ { "code": null, "e": 25949, "s": 25921, "text": "\n18 May, 2020" }, { "code": null, "e": 26299, "s": 25949, "text": "OpenCV is the huge open-source library for computer vision, machine learning, and image processing and now it plays a major role in real-time operation which is ve...
Get a list of a specified column of a Pandas DataFrame - GeeksforGeeks
28 Jul, 2020 In this article, we will discuss how to get a list of specified column of a Pandas Dataframe. First, we will read a csv file into a pandas dataframe. Note: To get the CSV file used click here.Example: Python3 # importing pandas module import pandas as pd # making data frame from csvdata = pd.read_csv(...
[ { "code": null, "e": 23926, "s": 23898, "text": "\n28 Jul, 2020" }, { "code": null, "e": 24077, "s": 23926, "text": "In this article, we will discuss how to get a list of specified column of a Pandas Dataframe. First, we will read a csv file into a pandas dataframe. " }, { ...
What is the difference between class and typeof function in R?
The class function in R helps us to understand the type of object, for example the output of class for a data frame is integer and the typeof of the same object is list because data frames are stored as list in the memory but they are represented as a data frame. Check out the below examples with multiple type of objec...
[ { "code": null, "e": 1416, "s": 1062, "text": "The class function in R helps us to understand the type of object, for example the output of class for a data frame is integer and the typeof of the same object is list because data frames are stored as list in the memory but they are represented as a d...
Workflow Tools for ML Pipelines. Chapter 5 excerpt of “Data Science in... | by Ben Weber | Towards Data Science
Airflow is becoming the industry standard for authoring data engineering and model pipeline workflows. This chapter of my book explores the process of taking a simple pipeline that runs on a single EC2 instance to a fully-managed Kubernetes ecosystem responsible for scheduling tasks. This posts omits the sections on th...
[ { "code": null, "e": 547, "s": 172, "text": "Airflow is becoming the industry standard for authoring data engineering and model pipeline workflows. This chapter of my book explores the process of taking a simple pipeline that runs on a single EC2 instance to a fully-managed Kubernetes ecosystem resp...
Arduino - Servo Motor
A Servo Motor is a small device that has an output shaft. This shaft can be positioned to specific angular positions by sending the servo a coded signal. As long as the coded signal exists on the input line, the servo will maintain the angular position of the shaft. If the coded signal changes, the angular position of ...
[ { "code": null, "e": 3406, "s": 2870, "text": "A Servo Motor is a small device that has an output shaft. This shaft can be positioned to specific angular positions by sending the servo a coded signal. As long as the coded signal exists on the input line, the servo will maintain the angular position ...
How to delete all the documents from a collection in MongoDB?
If you want to delete all documents from the collection, you can use deleteMany(). Let us first create a collection and insert some documents to it: > db.deleteDocumentsDemo.insert({"Name":"Larry","Age":23}); WriteResult({ "nInserted" : 1 }) > db.deleteDocumentsDemo.insert({"Name":"Mike","Age":21}); WriteResult({ "nIns...
[ { "code": null, "e": 1211, "s": 1062, "text": "If you want to delete all documents from the collection, you can use deleteMany(). Let us first create a collection and insert some documents to it:" }, { "code": null, "e": 1487, "s": 1211, "text": "> db.deleteDocumentsDemo.insert({...
How to print characters from a string starting from 3rd to 5th in Python?
Slicing feature in Python helps fetch a substring from original string. Slice operator [:] needs two operands. First operand is an integer representing index of starting character of slice. Second operand is index of character next to slice. Recalling that index of sequence starts from 0, >>> string = 'abcdefghij' >>> ...
[ { "code": null, "e": 1352, "s": 1062, "text": "Slicing feature in Python helps fetch a substring from original string. Slice operator [:] needs two operands. First operand is an integer representing index of starting character of slice. Second operand is index of character next to slice. Recalling t...
How to capture divide by zero exception in C#?
System.DivideByZeroException is a class that handles errors generated from dividing a dividend with zero. Let us see an example − using System; namespace ErrorHandlingApplication { class DivNumbers { int result; DivNumbers() { result = 0; } public void division(int num1, int num2) ...
[ { "code": null, "e": 1168, "s": 1062, "text": "System.DivideByZeroException is a class that handles errors generated from dividing a dividend with zero." }, { "code": null, "e": 1192, "s": 1168, "text": "Let us see an example −" }, { "code": null, "e": 1784, "s": ...
Android - Navigation
In this chapter, we will see that how you can provide navigation forward and backward between an application. We will first look at how to provide up navigation in an application. The up navigation will allow our application to move to previous activity from the next activity. It can be done like this. To implement Up ...
[ { "code": null, "e": 3787, "s": 3607, "text": "In this chapter, we will see that how you can provide navigation forward and backward between an application. We will first look at how to provide up navigation in an application." }, { "code": null, "e": 3911, "s": 3787, "text": "Th...
How can we change the JButton text dynamically in Java?
A JButton is a subclass of AbstractButton and it can be used for adding platform-independent buttons in a Java Swing application. A JButon can generate an ActionListener interface when the user clicking on a button, it can also generate the MouseListener and KeyListener interfaces. By default, we can create a JButton w...
[ { "code": null, "e": 1670, "s": 1062, "text": "A JButton is a subclass of AbstractButton and it can be used for adding platform-independent buttons in a Java Swing application. A JButon can generate an ActionListener interface when the user clicking on a button, it can also generate the MouseListene...
How to create a dictionary with list comprehension in Python?
The zip() function which is an in-built function, provides a list of tuples containing elements at same indices from two lists. If two lists are keys and values respectively, this zip object can be used to constructed dictionary object using another built-in function dict() >>> L1=['a','b','c','d'] >>> L2=[1,2,3,4] >...
[ { "code": null, "e": 1339, "s": 1062, "text": "The zip() function which is an in-built function, provides a list of tuples containing elements at same indices from two lists. If two lists are keys and values respectively, this zip object can be used to constructed dictionary object using another b...
Implementation of Naive Bayes Classifier with the use of Scikit-learn and ML.NET | by Robert Krzaczyński | Towards Data Science
When we think about machine learning, the first languages that come to mind are Python or R. This is understandable because they provide us with many possibilities to implement these algorithms. However, I work in C# daily and my attention has been attracted by the quite fresh library that is ML.NET. In this article, I...
[ { "code": null, "e": 366, "s": 171, "text": "When we think about machine learning, the first languages that come to mind are Python or R. This is understandable because they provide us with many possibilities to implement these algorithms." }, { "code": null, "e": 655, "s": 366, ...
Primary Keys and Group By’s — A Brief SQL Investigation | by Jeremy Chow | Towards Data Science
Today an acquaintance asked me an interesting SQL question, but not in the typical query sense; his question revolved more around an understanding of the underlying framework of SQL. Here is the context: The exercise comes from this PostgreSQL exercise page and has the following schema: The SQL question the website is ...
[ { "code": null, "e": 376, "s": 172, "text": "Today an acquaintance asked me an interesting SQL question, but not in the typical query sense; his question revolved more around an understanding of the underlying framework of SQL. Here is the context:" }, { "code": null, "e": 460, "s": ...
Excel Formulas
A formula in Excel is used to do mathematical calculations. Formulas always start with the equal sign (=) typed in the cell, followed by your calculation. Formulas can be used for calculations such as: =1+1 =2*2 =4/2=2 It can also be used to calculate values using cells as input. Let's have a look at an example. Type ...
[ { "code": null, "e": 155, "s": 0, "text": "A formula in Excel is used to do mathematical calculations. Formulas always start with the equal sign (=) typed in the cell, followed by your calculation." }, { "code": null, "e": 202, "s": 155, "text": "Formulas can be used for calculat...
Java String startsWith() method example.
The startsWith(String prefix, int toffset) method of the String class tests if the substring of this string beginning at the specified index starts with the specified prefix. import java.lang.*; public class StringDemo { public static void main(String[] args) { String str = "www.tutorialspoint.com"; Sys...
[ { "code": null, "e": 1237, "s": 1062, "text": "The startsWith(String prefix, int toffset) method of the String class tests if the substring of this string beginning at the specified index starts with the specified prefix." }, { "code": null, "e": 1941, "s": 1237, "text": "import ...
Automatic Email Notifications for HiveQL/SQL Script Completion | by Andrew Young | Towards Data Science
If you find this article helpful in any way, please comment or click the applause button at the left to give me free virtual encouragement! This bash script is very useful for executing HiveQL files (.hql)or SQL files (.sql). For instance, rather than having to periodically check when a CREATE TABLE or JOINhas finished...
[ { "code": null, "e": 312, "s": 172, "text": "If you find this article helpful in any way, please comment or click the applause button at the left to give me free virtual encouragement!" }, { "code": null, "e": 726, "s": 312, "text": "This bash script is very useful for executing ...
How to update a MySQL date type column?
Let us first create a table − mysql> create table DemoTable1451 -> ( -> JoiningDate date -> ); Query OK, 0 rows affected (0.52 sec) Insert some records in the table using insert command − mysql> insert into DemoTable1451 values('2019-07-21'); Query OK, 1 row affected (0.07 sec) mysql> insert into DemoTable1451...
[ { "code": null, "e": 1092, "s": 1062, "text": "Let us first create a table −" }, { "code": null, "e": 1203, "s": 1092, "text": "mysql> create table DemoTable1451\n -> (\n -> JoiningDate date\n -> );\nQuery OK, 0 rows affected (0.52 sec)" }, { "code": null, "e": ...
How to remove duplicates from MongoDB Collection?
For this, set “unique:true” i.e. the unique constraint and avoid inserting duplicates as in the below syntax − db.yourCollectionName.ensureIndex({yourFieldName: 1}, {unique: true, dropDups: true}) To understand the above syntax, let us create a collection with documents. Here, duplicate insertion won’t be allowed − > d...
[ { "code": null, "e": 1173, "s": 1062, "text": "For this, set “unique:true” i.e. the unique constraint and avoid inserting duplicates as in the below syntax −" }, { "code": null, "e": 1259, "s": 1173, "text": "db.yourCollectionName.ensureIndex({yourFieldName: 1}, {unique: true, dr...
Python | Find missing and additional values in two lists - GeeksforGeeks
21 Nov, 2018 Given two lists, find the missing and additional values in both the lists. Examples: Input : list1 = [1, 2, 3, 4, 5, 6] list2 = [4, 5, 6, 7, 8] Output : Missing values in list1 = [8, 7] Additional values in list1 = [1, 2, 3] Missing values in list2 = [1, 2, 3] Additi...
[ { "code": null, "e": 24212, "s": 24184, "text": "\n21 Nov, 2018" }, { "code": null, "e": 24287, "s": 24212, "text": "Given two lists, find the missing and additional values in both the lists." }, { "code": null, "e": 24297, "s": 24287, "text": "Examples:" },...
Largest Element in Array | Practice | GeeksforGeeks
Given an array A[] of size n. The task is to find the largest element in it. Example 1: Input: n = 5 A[] = {1, 8, 7, 56, 90} Output: 90 Explanation: The largest element of given array is 90. Example 2: Input: n = 7 A[] = {1, 2, 0, 3, 2, 4, 5} Output: 5 Explanation: The largest element of given array is 5. Your Ta...
[ { "code": null, "e": 317, "s": 238, "text": "Given an array A[] of size n. The task is to find the largest element in it.\n " }, { "code": null, "e": 328, "s": 317, "text": "Example 1:" }, { "code": null, "e": 431, "s": 328, "text": "Input:\nn = 5\nA[] = {1, 8...
Cross Validation — Why & How. Importance Of Cross Validation In... | by Amitrajit Bose | Towards Data Science
So, you have been working on an imbalanced data set for a few days now and trying out different machine learning models, training them on a part of your data set, testing their accuracy and you are ecstatic to see the score going above 0.95 every-time. Do you really think you have achieved 95% accuracy with your model?...
[ { "code": null, "e": 493, "s": 172, "text": "So, you have been working on an imbalanced data set for a few days now and trying out different machine learning models, training them on a part of your data set, testing their accuracy and you are ecstatic to see the score going above 0.95 every-time. Do...
Area of Largest rectangle that can be inscribed in an Ellipse?
Here we will see the area of largest rectangle that can be inscribed in an ellipse. The rectangle in ellipse will be like below − The a and b are the half of major and minor axis of the ellipse. The upper right corner of the rectangle is (x, y). So the area is Now, after making this equation as f(x) and maximizing the ...
[ { "code": null, "e": 1192, "s": 1062, "text": "Here we will see the area of largest rectangle that can be inscribed in an ellipse. The rectangle in ellipse will be like below −" }, { "code": null, "e": 1323, "s": 1192, "text": "The a and b are the half of major and minor axis of ...
Explain switch statement in C language
It is used to select one among multiple decisions. ‘switch’ successively tests a value against a list of integers (or) character constant. When a match is found, the statement (or) statements associated with that value are executed. The syntax is given below − switch (expression){ case value1 : stmt1; break; ...
[ { "code": null, "e": 1295, "s": 1062, "text": "It is used to select one among multiple decisions. ‘switch’ successively tests a value against a list of integers (or) character constant. When a match is found, the statement (or) statements associated with that value are executed." }, { "code"...
TimeSpan.Compare() Method in C#
The TimeSpan.Compare() method in C# is used to compare two TimeSpan values and returns an integer that indicates whether the first value is shorter than, equal to, or longer than the second value. The return value is -1 if span1 is shorter than span2, 0 if span1=span2, whereas 1 if span1 is longer than span2. The synta...
[ { "code": null, "e": 1259, "s": 1062, "text": "The TimeSpan.Compare() method in C# is used to compare two TimeSpan values\nand returns an integer that indicates whether the first value is shorter than, equal to, or longer than the second value." }, { "code": null, "e": 1373, "s": 125...
DateFormat format() Method in Java with Examples - GeeksforGeeks
13 Jan, 2022 DateFormat class present inside java.text package is an abstract class that is used to format and parse dates for any locale. It allows us to format date to text and parse text to date. DateFormat class provides many functionalities to obtain, format, parse default date/time. DateFormat class extends Forma...
[ { "code": null, "e": 24508, "s": 24480, "text": "\n13 Jan, 2022" }, { "code": null, "e": 25050, "s": 24508, "text": "DateFormat class present inside java.text package is an abstract class that is used to format and parse dates for any locale. It allows us to format date to text a...
Focal Loss & Class Imbalance Data: TensorFlow | Towards Data Science
In machine learning sometimes we are dealt with a very good hand like MNIST fashion data or CIFAR-10 data where the examples of each class in the data-set are well balanced. What happens if in a classification problem the distribution of examples across the known classes are biased or skewed ? Such problems with severe...
[ { "code": null, "e": 725, "s": 47, "text": "In machine learning sometimes we are dealt with a very good hand like MNIST fashion data or CIFAR-10 data where the examples of each class in the data-set are well balanced. What happens if in a classification problem the distribution of examples across th...
Matrix Chain Multiplication
If a chain of matrices is given, we have to find the minimum number of the correct sequence of matrices to multiply. We know that the matrix multiplication is associative, so four matrices ABCD, we can multiply A(BCD), (AB)(CD), (ABC)D, A(BC)D, in these sequences. Like these sequences, our task is to find which orderin...
[ { "code": null, "e": 1179, "s": 1062, "text": "If a chain of matrices is given, we have to find the minimum number of the correct sequence of matrices to multiply." }, { "code": null, "e": 1410, "s": 1179, "text": "We know that the matrix multiplication is associative, so four ma...
A Python Library to Generate a Synthetic Time Series Data | by MANIE TADAYON | Towards Data Science
Synthetic data is widely used in various domains. This is because many modern algorithms require lots of data for efficient training, and data collection and labeling usually are a time-consuming process and are prone to errors. Furthermore, some real-world data, due to its nature, is confidential and cannot be shared....
[ { "code": null, "e": 493, "s": 172, "text": "Synthetic data is widely used in various domains. This is because many modern algorithms require lots of data for efficient training, and data collection and labeling usually are a time-consuming process and are prone to errors. Furthermore, some real-wor...
How to convert a string to snake case using JavaScript ? - GeeksforGeeks
25 Dec, 2020 Given a string in and the task is to write a JavaScript code to convert the given string into snake case and print the modified string. Examples: Input: GeeksForGeeks Output: geeks_for_geeks Input: CamelCaseToSnakeCase Output: camel_case_to_snake_case We use match(), map(), join, and toLowerCase() method ...
[ { "code": null, "e": 25376, "s": 25348, "text": "\n25 Dec, 2020" }, { "code": null, "e": 25513, "s": 25376, "text": "Given a string in and the task is to write a JavaScript code to convert the given string into snake case and print the modified string. " }, { "code": null...
C++ Program to Search Sorted Sequence Using Divide and Conquer with the Aid of Fibonacci Numbers
In this C++ program we implement a Divide and Conquer approach using Fibonacci numbers. Using Fibonacci numbers, we calculate mid of data array to search the data item. The time complexity of this approach is O(log(n)). Begin Assign the data to the array in a sorted manner. Take input of the element to be searche...
[ { "code": null, "e": 1282, "s": 1062, "text": "In this C++ program we implement a Divide and Conquer approach using Fibonacci numbers. Using Fibonacci numbers, we calculate mid of data array to search the data item. The time complexity of this approach is O(log(n))." }, { "code": null, "...
What is a register storage class in C language?
There are four storage classes in C programming language, which are as follows − auto extern static register The keyword is register. The keyword is register. Register variable values are stored in CPU registers, rather than in memory where, normal variables are stored. Register variable values are stored in CPU regist...
[ { "code": null, "e": 1143, "s": 1062, "text": "There are four storage classes in C programming language, which are as follows −" }, { "code": null, "e": 1148, "s": 1143, "text": "auto" }, { "code": null, "e": 1155, "s": 1148, "text": "extern" }, { "cod...
Number of positions where a letter can be inserted such that a string becomes palindrome - GeeksforGeeks
03 May, 2021 Given a string str, we need to find the no. of positions where a letter(lowercase) can be inserted so that string becomes a palindrome. Examples: Input : str = "abca" Output : possible palindromic strings: 1) acbca (at position 2) 2) abcba (at position 4) Hence, the output is ...
[ { "code": null, "e": 24852, "s": 24824, "text": "\n03 May, 2021" }, { "code": null, "e": 25000, "s": 24852, "text": "Given a string str, we need to find the no. of positions where a letter(lowercase) can be inserted so that string becomes a palindrome. Examples: " }, { "...
BlockingQueue take() method in Java with examples - GeeksforGeeks
23 Aug, 2021 The take() method of BlockingQueue interface is used to retrieve and remove the head of this queue. If the queue is empty then it will wait until an element becomes available. This method is more efficient if working on threads and using BlockingQueue in that process. So the thread that initially calls tak...
[ { "code": null, "e": 25617, "s": 25589, "text": "\n23 Aug, 2021" }, { "code": null, "e": 26028, "s": 25617, "text": "The take() method of BlockingQueue interface is used to retrieve and remove the head of this queue. If the queue is empty then it will wait until an element become...
Database, Table and Column Naming Conventions - GeeksforGeeks
09 Aug, 2021 Overview :Databases are persistent storage mechanisms that are present throughout the lifecycle of any application. Databases are created and maintained by the initial database managers and are continued to be maintained by any new database managers that join the team, thus it is a good habit to keep its c...
[ { "code": null, "e": 24304, "s": 24276, "text": "\n09 Aug, 2021" }, { "code": null, "e": 24917, "s": 24304, "text": "Overview :Databases are persistent storage mechanisms that are present throughout the lifecycle of any application. Databases are created and maintained by the ini...