title
stringlengths
3
221
text
stringlengths
17
477k
parsed
listlengths
0
3.17k
How to create a ButtonBar in JavaFX?
A ButtonBar is simply an HBox on which you can arrange buttons. Typically, the buttons on a ButtonBar are Operating System specific. You can create a button bar by instantiating the javafx.scene.control.ButtonBar class. The following Example demonstrates the creation of a ButtonBar. import javafx.application.Applicatio...
[ { "code": null, "e": 1282, "s": 1062, "text": "A ButtonBar is simply an HBox on which you can arrange buttons. Typically, the buttons on a ButtonBar are Operating System specific. You can create a button bar by instantiating the javafx.scene.control.ButtonBar class." }, { "code": null, "...
JavaScript Object Properties
Properties in JavaScript are the values associated with an object. Following is the code implementing object properties in JavaScript − Live Demo <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8" /> <meta name="viewport" content="width=device-width, initial-scale=1.0" /> <title>Document</title> <style> ...
[ { "code": null, "e": 1198, "s": 1062, "text": "Properties in JavaScript are the values associated with an object. Following is the code implementing object properties in JavaScript −" }, { "code": null, "e": 1209, "s": 1198, "text": " Live Demo" }, { "code": null, "e"...
rmmod command in Linux with Examples - GeeksforGeeks
24 May, 2019 rmmod command in Linux system is used to remove a module from the kernel. Most of the users still use modprobe with the -r option instead of using rmmod. Syntax: rmmod [-f] [-s] [-v] [modulename] Example: rmmod bluetooth Options: rmmod command with help option: It will print the general syntax of the rmmo...
[ { "code": null, "e": 24816, "s": 24788, "text": "\n24 May, 2019" }, { "code": null, "e": 24970, "s": 24816, "text": "rmmod command in Linux system is used to remove a module from the kernel. Most of the users still use modprobe with the -r option instead of using rmmod." }, {...
Analyzing time series data in Pandas | by Ehi Aigiomawu | Towards Data Science
In my previous tutorials, we have considered data preparation and visualization tools such as Numpy, Pandas, Matplotlib and Seaborn. In this tutorial, we are going to learn about Time Series, why it’s important, situations we will need to apply Time Series, and more specifically, we will learn how to analyze Time Serie...
[ { "code": null, "e": 512, "s": 171, "text": "In my previous tutorials, we have considered data preparation and visualization tools such as Numpy, Pandas, Matplotlib and Seaborn. In this tutorial, we are going to learn about Time Series, why it’s important, situations we will need to apply Time Serie...
Python - Merge Pandas DataFrame with Inner Join
To merge Pandas DataFrame, use the merge() function. The inner join is implemented on both the DataFrames by setting under the “how” parameter of the merge() function i.e. − how = “inner” At first, let us import the pandas library with an alias − import pandas as pd Create DataFrame1 − dataFrame1 = pd.DataFrame( { ...
[ { "code": null, "e": 1236, "s": 1062, "text": "To merge Pandas DataFrame, use the merge() function. The inner join is implemented on both the DataFrames by setting under the “how” parameter of the merge() function i.e. −" }, { "code": null, "e": 1250, "s": 1236, "text": "how = “i...
Finding distance between two latitudes and longitudes in Python | by Zolzaya Luvsandorj | Towards Data Science
When preparing data for a model, there may be a time where it’s useful to find distances between two locations. This post shows how to find the shortest spherical and travel distance between two locations from their latitude and longitude in Python. We can locate any place on earth from its geographic coordinates. Geog...
[ { "code": null, "e": 415, "s": 165, "text": "When preparing data for a model, there may be a time where it’s useful to find distances between two locations. This post shows how to find the shortest spherical and travel distance between two locations from their latitude and longitude in Python." },...
Execution of ‘DAD rp’ instruction
In 8085 Instruction set, for 16-bit addition, there is one instruction available that is DAD rp instruction. It is a 1-Byte instruction. With this instruction, with the content of the HL register pair, the contents of the mentioned register pair will get added and the result thus produced will be stored on the HL regis...
[ { "code": null, "e": 1392, "s": 1062, "text": "In 8085 Instruction set, for 16-bit addition, there is one instruction available that is DAD rp instruction. It is a 1-Byte instruction. With this instruction, with the content of the HL register pair, the contents of the mentioned register pair will ge...
select() function in Lua programming
The select function in Lua is used to return the number of arguments that are passed into it as an argument. It can be used in two forms, the first one includes passing an index and then it will return the numbers that are passed after that number into the function as an argument in a list format, the other pattern is ...
[ { "code": null, "e": 1518, "s": 1062, "text": "The select function in Lua is used to return the number of arguments that are passed into it as an argument. It can be used in two forms, the first one includes passing an index and then it will return the numbers that are passed after that number into ...
Textwrap - Text wrapping and filling in Python
The textwrap module provides TextWrapper class that performs wrapping or filling. It has convenience functions for the same purpose. Wraps the single paragraph in text (a string) so every line is at most width characters long. Returns a list of output lines, without final newlines. Wraps the single paragraph in text, a...
[ { "code": null, "e": 1195, "s": 1062, "text": "The textwrap module provides TextWrapper class that performs wrapping or filling. It has convenience functions for the same purpose." }, { "code": null, "e": 1345, "s": 1195, "text": "Wraps the single paragraph in text (a string) so ...
XHTML - Quick Guide
XHTML stands for EXtensible HyperText Markup Language. It is the next step in the evolution of the internet. The XHTML 1.0 is the first document type in the XHTML family. XHTML is almost identical to HTML 4.01 with only few differences. This is a cleaner and stricter version of HTML 4.01. If you already know HTML, then...
[ { "code": null, "e": 1920, "s": 1749, "text": "XHTML stands for EXtensible HyperText Markup Language. It is the next step in the evolution of the internet. The XHTML 1.0 is the first document type in the XHTML family." }, { "code": null, "e": 2142, "s": 1920, "text": "XHTML is al...
Apache Airflow Tips and Best Practices | Towards Data Science
When I first started building ETL pipelines with Airflow, I had so many memorable “aha” moments after figuring out why my pipelines didn’t run. As the tech documentation never covers everything, I tend to learn much more about a new tool from making mistakes and reading source code from good developers. In the blog pos...
[ { "code": null, "e": 649, "s": 171, "text": "When I first started building ETL pipelines with Airflow, I had so many memorable “aha” moments after figuring out why my pipelines didn’t run. As the tech documentation never covers everything, I tend to learn much more about a new tool from making mista...
Python MySQL - Create Database
You can create a database in MYSQL using the CREATE DATABASE query. Following is the syntax of the CREATE DATABASE query − CREATE DATABASE name_of_the_database Following statement creates a database with name mydb in MySQL − mysql> CREATE DATABASE mydb; Query OK, 1 row affected (0.04 sec) If you observe the list of d...
[ { "code": null, "e": 3273, "s": 3205, "text": "You can create a database in MYSQL using the CREATE DATABASE query." }, { "code": null, "e": 3328, "s": 3273, "text": "Following is the syntax of the CREATE DATABASE query −" }, { "code": null, "e": 3366, "s": 3328, ...
What is the process of compilation and linking in python?
Compilation: The source code in python is saved as a .py file which is then compiled into a format known as byte code, byte code is then converted to machine code. After the compilation, the code is stored in .pyc files and is regenerated when the source is updated. This process is known as compilation. Linking: Linkin...
[ { "code": null, "e": 1367, "s": 1062, "text": "Compilation: The source code in python is saved as a .py file which is then compiled into a format known as byte code, byte code is then converted to machine code. After the compilation, the code is stored in .pyc files and is regenerated when the sourc...
Swift - Fallthrough Statement
A switch statement in Swift 4 completes its execution as soon as the first matching case is completed instead of falling through the bottom of subsequent cases as it happens in C and C++ programming languages. The generic syntax of a switch statement in C and C++ is as follows − switch(expression){ case constant-exp...
[ { "code": null, "e": 2463, "s": 2253, "text": "A switch statement in Swift 4 completes its execution as soon as the first matching case is completed instead of falling through the bottom of subsequent cases as it happens in C and C++ programming languages." }, { "code": null, "e": 2533, ...
JavaScript | Blob - GeeksforGeeks
27 May, 2020 A blob object is simply a group of bytes that holds the data stored in a file. It may seem like that a blob is a reference to the actual file but actually it is not. A blob has its size and MIME just like that of a simple file. The blob data is stored in the memory or filesystem of a user depending on the ...
[ { "code": null, "e": 24909, "s": 24881, "text": "\n27 May, 2020" }, { "code": null, "e": 25432, "s": 24909, "text": "A blob object is simply a group of bytes that holds the data stored in a file. It may seem like that a blob is a reference to the actual file but actually it is no...
Modern Gaussian Process Regression | by Ryan Sander | Towards Data Science
Ever wonder how you can create non-parametric supervised learning models with unlimited expressive power? Look no further than Gaussian Process Regression (GPR), an algorithm that learns to make predictions almost entirely from the data itself (with a little help from hyperparameters). Combining this algorithm with rec...
[ { "code": null, "e": 657, "s": 172, "text": "Ever wonder how you can create non-parametric supervised learning models with unlimited expressive power? Look no further than Gaussian Process Regression (GPR), an algorithm that learns to make predictions almost entirely from the data itself (with a lit...
Higher order components in React.js
Higher order component in short called as hoc. It’s a pattern which receives a component and returns a new component with add-on features to it. //hoc is the name of a custom JavaScript function const AddOnComponent= hoc(SimpleComponent); We use component with state and/or props to build an UI. Similar way a hoc builds...
[ { "code": null, "e": 1207, "s": 1062, "text": "Higher order component in short called as hoc. It’s a pattern which receives a component and returns a new component with add-on features to it." }, { "code": null, "e": 1257, "s": 1207, "text": "//hoc is the name of a custom JavaScr...
Create a 3D Text Effect using HTML and CSS - GeeksforGeeks
03 Aug, 2021 The 3D text effect is one of the most used text effects in the web design world. As a designer or front-end developer one should know how to create a 3D text effect. Today we will be looking at one of the simplest and easy methods to create our text in a 3D look.Approach: The 3D text animation effect is de...
[ { "code": null, "e": 24812, "s": 24784, "text": "\n03 Aug, 2021" }, { "code": null, "e": 25645, "s": 24812, "text": "The 3D text effect is one of the most used text effects in the web design world. As a designer or front-end developer one should know how to create a 3D text effec...
Chain processes vs Fan of processes using fork() function in C - GeeksforGeeks
07 Jul, 2021 Fork System Call: The fork system call is used for creating a new process, which is called the child process, which runs concurrently with the process that makes the fork() call (parent process). After a new child process is created, both processes will execute the next instruction following the fork() sys...
[ { "code": null, "e": 24234, "s": 24206, "text": "\n07 Jul, 2021" }, { "code": null, "e": 24676, "s": 24234, "text": "Fork System Call: The fork system call is used for creating a new process, which is called the child process, which runs concurrently with the process that makes t...
How to list all functions in a Python module?
You can use the dir(module) to get all the attributes/methods of a module. For example, >>> import math >>> dir(math) ['__doc__', '__name__', '__package__', 'acos', 'acosh', 'asin', 'asinh', 'atan', 'atan2', 'atanh', 'ceil', 'copysign', 'cos', 'cosh', 'degrees', 'e', 'erf', 'erfc', 'exp', 'expm1', 'fabs', 'factorial', ...
[ { "code": null, "e": 1150, "s": 1062, "text": "You can use the dir(module) to get all the attributes/methods of a module. For example," }, { "code": null, "e": 1575, "s": 1150, "text": ">>> import math\n>>> dir(math)\n['__doc__', '__name__', '__package__', 'acos', 'acosh', 'asin'...
Extract day, hour, minute, etc. from a datetime column in PostgreSQL?
Let us create a new table containing a single timestamp column − CREATE TABLE timestamp_test( ts timestamp ); Now let us populate it with some data − INSERT INTO timestamp_test(ts) VALUES(current_timestamp), (current_timestamp+interval '5 days'), (current_timestamp-interval '18 hours'), (current_timestamp+interval '...
[ { "code": null, "e": 1127, "s": 1062, "text": "Let us create a new table containing a single timestamp column −" }, { "code": null, "e": 1175, "s": 1127, "text": "CREATE TABLE timestamp_test(\n ts timestamp\n);" }, { "code": null, "e": 1215, "s": 1175, "text...
PL/SQL - Strings
The string in PL/SQL is actually a sequence of characters with an optional size specification. The characters could be numeric, letters, blank, special characters or a combination of all. PL/SQL offers three kinds of strings − Fixed-length strings − In such strings, programmers specify the length while declaring the st...
[ { "code": null, "e": 2292, "s": 2065, "text": "The string in PL/SQL is actually a sequence of characters with an optional size specification. The characters could be numeric, letters, blank, special characters or a combination of all. PL/SQL offers three kinds of strings −" }, { "code": null...
Scala Collections - Fold Method
fold() method is a member of TraversableOnce trait, it is used to collapse elements of collections. The following is the syntax of fold method. def fold[A1 >: A](z: A1)(op: (A1, A1) ? A1): A1 Here, fold method takes associative binary operator function as a parameter. This method returns the result as value. It consid...
[ { "code": null, "e": 2982, "s": 2882, "text": "fold() method is a member of TraversableOnce trait, it is used to collapse elements of collections." }, { "code": null, "e": 3026, "s": 2982, "text": "The following is the syntax of fold method." }, { "code": null, "e": 3...
How to find and extract a number from a string in C#?
A regular expression is a pattern that could be matched against an input text. The .Net framework provides a regular expression engine that allows such matching. A pattern consists of one or more character literals, operators, or constructs. Here are basic pattern metacharacters used by RegEx − * = zero or more ? = zer...
[ { "code": null, "e": 1304, "s": 1062, "text": "A regular expression is a pattern that could be matched against an input text.\nThe .Net framework provides a regular expression engine that allows such matching.\nA pattern consists of one or more character literals, operators, or constructs." }, {...
Format Year in yyyy format in Java
To format year in yyyy format is like displaying the entire year. For example, 2018. Use the yyyy format like this − SimpleDateFormat("yyyy"); Let us see an example − // year in yyyy format SimpleDateFormat simpleformat = new SimpleDateFormat("yyyy"); String strYear = simpleformat.format(new Date()); System.out.println...
[ { "code": null, "e": 1147, "s": 1062, "text": "To format year in yyyy format is like displaying the entire year. For example, 2018." }, { "code": null, "e": 1179, "s": 1147, "text": "Use the yyyy format like this −" }, { "code": null, "e": 1205, "s": 1179, "te...
jQuery UI dialog close() Method - GeeksforGeeks
13 Jan, 2021 close() method is used to disable the dialog. This method does not accept any argument Syntax: $( ".selector" ).dialog("close"); Approach: First, add jQuery UI scripts needed for your project. <link href = “https://code.jquery.com/ui/1.10.4/themes/ui-lightness/jquery-ui.css” rel = “stylesheet”><script src ...
[ { "code": null, "e": 50960, "s": 50932, "text": "\n13 Jan, 2021" }, { "code": null, "e": 51047, "s": 50960, "text": "close() method is used to disable the dialog. This method does not accept any argument" }, { "code": null, "e": 51055, "s": 51047, "text": "Syn...
Time Series Hierarchical Clustering using Dynamic Time Warping in Python | by Andrew Vladimirovich | Towards Data Science
Let us consider the following task: we have a bunch of evenly distributed time series of different lengths. The goal is to cluster time series by defining general patterns that are presented in the data. Here I’d like to present one approach to solving this task. We will use hierarchical clustering and DTW algorithm as...
[ { "code": null, "e": 376, "s": 172, "text": "Let us consider the following task: we have a bunch of evenly distributed time series of different lengths. The goal is to cluster time series by defining general patterns that are presented in the data." }, { "code": null, "e": 740, "s": ...
Traverse a collection of objects using the Enumeration Interface in Java
All the elements in a collection of objects can be traversed using the Enumeration interface. The method hasMoreElements( ) returns true if there are more elements to be enumerated and false if there are no more elements to be enumerated. The method nextElement( ) returns the next object in the enumeration. A program t...
[ { "code": null, "e": 1371, "s": 1062, "text": "All the elements in a collection of objects can be traversed using the Enumeration interface. The method hasMoreElements( ) returns true if there are more elements to be enumerated and false if there are no more elements to be enumerated. The method nex...
Python Program for Longest Common Subsequence - GeeksforGeeks
18 Apr, 2020 LCS Problem Statement: Given two sequences, find the length of longest subsequence present in both of them. A subsequence is a sequence that appears in the same relative order, but not necessarily contiguous. For example, “abc”, “abg”, “bdf”, “aeg”, ‘”acefg”, .. etc are subsequences of “abcdefg”. So a stri...
[ { "code": null, "e": 26932, "s": 26904, "text": "\n18 Apr, 2020" }, { "code": null, "e": 27295, "s": 26932, "text": "LCS Problem Statement: Given two sequences, find the length of longest subsequence present in both of them. A subsequence is a sequence that appears in the same re...
Count of longest possible subarrays with sum not divisible by K - GeeksforGeeks
12 May, 2021 Given an array of integers arr[] and a positive integer K, the task is to find the count of the longest possible subarrays with sum of its elements not divisible by K. Examples: Input: arr[] = {2, 3, 4, 6}, K = 3 Output: 1 Explanation: There is only one longest possible subarray of size 3 i.e. {3, 4, 6} h...
[ { "code": null, "e": 26455, "s": 26427, "text": "\n12 May, 2021" }, { "code": null, "e": 26623, "s": 26455, "text": "Given an array of integers arr[] and a positive integer K, the task is to find the count of the longest possible subarrays with sum of its elements not divisible b...
How to create a Breadcrumb Navigation ? - GeeksforGeeks
23 Apr, 2021 In this article, we will learn how to create breadcrumbs navigation. Breadcrumbs are a secondary navigation aid that helps users easily navigate through a website. Breadcrumbs provide you an orientation and show you exactly where you are within the website’s hierarchy. Approach 1: We will follow the below ...
[ { "code": null, "e": 26951, "s": 26923, "text": "\n23 Apr, 2021" }, { "code": null, "e": 27221, "s": 26951, "text": "In this article, we will learn how to create breadcrumbs navigation. Breadcrumbs are a secondary navigation aid that helps users easily navigate through a website....
PyQt5 – How to open window in maximized format? - GeeksforGeeks
22 Apr, 2020 In this article we will see how to make a window to open in maximized format, which refer to full screen display window. We can do this by using showMaximized method which belongs to QWidget class. Syntax : self.showMaximized() Argument : It takes no argument. Action performed It will open the window in fu...
[ { "code": null, "e": 24934, "s": 24906, "text": "\n22 Apr, 2020" }, { "code": null, "e": 25132, "s": 24934, "text": "In this article we will see how to make a window to open in maximized format, which refer to full screen display window. We can do this by using showMaximized meth...
How to Combine Lists in Dart? - GeeksforGeeks
20 Jul, 2020 In Dart programming, the List data type is similar to arrays in other programming languages. A list is used to represent a collection of objects. It is an ordered group of objects. The core libraries in Dart are responsible for the existence of List class, its creation, and manipulation. There are 5 ways t...
[ { "code": null, "e": 24018, "s": 23990, "text": "\n20 Jul, 2020" }, { "code": null, "e": 24353, "s": 24018, "text": "In Dart programming, the List data type is similar to arrays in other programming languages. A list is used to represent a collection of objects. It is an ordered ...
A limitation of Random Forest Regression | by Ben Thompson | Towards Data Science
Random Forest is a popular machine learning model that is commonly used for classification tasks as can be seen in many academic papers, Kaggle competitions, and blog posts. In addition to classification, Random Forests can also be used for regression tasks. A Random Forest’s nonlinear nature can give it a leg up over ...
[ { "code": null, "e": 1187, "s": 172, "text": "Random Forest is a popular machine learning model that is commonly used for classification tasks as can be seen in many academic papers, Kaggle competitions, and blog posts. In addition to classification, Random Forests can also be used for regression ta...
7 React Best Practices Every Web Developer Should Follow - GeeksforGeeks
26 May, 2020 React...the most popular library of Javascript for building user interfaces. For developers, this library is one of the favorite libraries to build any kind of beautiful applications. Learning React might be easy for you. You start using React and you start developing an application. You create one compone...
[ { "code": null, "e": 28409, "s": 28381, "text": "\n26 May, 2020" }, { "code": null, "e": 29267, "s": 28409, "text": "React...the most popular library of Javascript for building user interfaces. For developers, this library is one of the favorite libraries to build any kind of bea...
Python - Evaluate Expression given in String - GeeksforGeeks
27 Jul, 2021 Sometimes, while working with Python Strings, we can have certain computations in string format and we need to formulate its result. This can occur in domains related to Mathematics and data. Let’s discuss certain ways in which we can perform this task. Method #1 : Using regex + map() + sum() The combinati...
[ { "code": null, "e": 25935, "s": 25907, "text": "\n27 Jul, 2021" }, { "code": null, "e": 26189, "s": 25935, "text": "Sometimes, while working with Python Strings, we can have certain computations in string format and we need to formulate its result. This can occur in domains rela...
C++ Program to Implement Sorted Singly Linked List
In data structure, Linked List is a linear collection of data elements. Each element or node of a list is comprising of two items - the data and a reference to the next node. The last node has a reference to null. Into a linked list the entry point is called the head of the list. Each node in the list stores the conten...
[ { "code": null, "e": 1343, "s": 1062, "text": "In data structure, Linked List is a linear collection of data elements. Each element or node of a list is comprising of two items - the data and a reference to the next node. The last node has a reference to null. Into a linked list the entry point is c...
How to Design Homepage like Facebook using HTML and CSS ? - GeeksforGeeks
07 Oct, 2020 HTML: HTML stands for Hyper Text Markup Language. It is used to design web pages using a markup language. HTML is the combination of Hypertext and Markup language. Hypertext defines the link between the web pages. A markup language is used to define the text document within tag which defines the structure...
[ { "code": null, "e": 24644, "s": 24616, "text": "\n07 Oct, 2020" }, { "code": null, "e": 24966, "s": 24644, "text": "HTML: HTML stands for Hyper Text Markup Language. It is used to design web pages using a markup language. HTML is the combination of Hypertext and Markup language...
Automation of Invoice Processing using RPA - GeeksforGeeks
13 Apr, 2021 In this article, we will learn how to make a simple project on Automation of Invoice Processing using RPA in UiPath Studio. This is a simple application of Robotic Process Automation in which invoices get downloaded in pdf formats from the desired email address, then from those invoices, specific informati...
[ { "code": null, "e": 25583, "s": 25555, "text": "\n13 Apr, 2021" }, { "code": null, "e": 26126, "s": 25583, "text": "In this article, we will learn how to make a simple project on Automation of Invoice Processing using RPA in UiPath Studio. This is a simple application of Robotic...
Freeware v/s Shareware - GeeksforGeeks
18 Apr, 2019 Freeware:It is a software that is provided to the user free of cost with the fully functional mechanism having no expiry date. Anyone can download it from the internet and use it for free. Here the author retains the copyright to the software.Shareware:It is a commercial software that is initially distribu...
[ { "code": null, "e": 24804, "s": 24776, "text": "\n18 Apr, 2019" }, { "code": null, "e": 24931, "s": 24804, "text": "Freeware:It is a software that is provided to the user free of cost with the fully functional mechanism having no expiry date." }, { "code": null, "e":...
How can I get days since epoch in JavaScript?
To get days since epoch, you need to use Math.abs() JavaScript method. Then use the Math.Floor() method to get the difference between dates since epoch and current date − Live Demo <html> <head> <title>JavaScript Clone Date</title> </head> <body> <script> var current_date, epocDate; ...
[ { "code": null, "e": 1233, "s": 1062, "text": "To get days since epoch, you need to use Math.abs() JavaScript method. Then use the Math.Floor() method to get the difference between dates since epoch and current date −" }, { "code": null, "e": 1243, "s": 1233, "text": "Live Demo" ...
Implementation of Multi-Variate Linear Regression in Python using Gradient Descent Optimization from scratch | by Navoneel Chakrabarty | Towards Data Science
Most Practical Applications of Machine Learning involve Multiple Features on which the Target Outcome depends upon. Similarly in Regression Analysis Problems, there are instances where the Target Outcome depends on numerous features. Multi-Variate Linear Regression is a possible solution to tackle such problems. In thi...
[ { "code": null, "e": 682, "s": 172, "text": "Most Practical Applications of Machine Learning involve Multiple Features on which the Target Outcome depends upon. Similarly in Regression Analysis Problems, there are instances where the Target Outcome depends on numerous features. Multi-Variate Linear ...
Groovy - remove()
Removes the element at the specified position in this List. Object remove(int index) Index – Index at which the value needs to be removed. The removed value. Following is an example of the usage of this method − class Example { static void main(String[] args) { def lst = [11, 12, 13, 14]; println(lst.r...
[ { "code": null, "e": 2298, "s": 2238, "text": "Removes the element at the specified position in this List." }, { "code": null, "e": 2324, "s": 2298, "text": "Object remove(int index)\n" }, { "code": null, "e": 2378, "s": 2324, "text": "Index – Index at which t...
Partition problem
For this problem, a given set can be partitioned in such a way, that sum of each subset is equal. At first, we have to find the sum of the given set. If it is even, then there is a chance to divide it into two sets. Otherwise, it cannot be divided. For even value of the sum, then we will create a table named partTable,...
[ { "code": null, "e": 1160, "s": 1062, "text": "For this problem, a given set can be partitioned in such a way, that sum of each subset is equal." }, { "code": null, "e": 1311, "s": 1160, "text": "At first, we have to find the sum of the given set. If it is even, then there is a c...
C Program to Swap two Numbers - GeeksforGeeks
07 May, 2020 Given two numbers, write a C program to swap the given numbers. Input : x = 10, y = 20; Output : x = 20, y = 10 Input : x = 200, y = 100 Output : x = 100, y = 200 The idea is simple Assign x to a temp variable : temp = xAssign y to x : x = yAssign temp to y : y = temp Assign x to a temp variable : temp =...
[ { "code": null, "e": 24579, "s": 24551, "text": "\n07 May, 2020" }, { "code": null, "e": 24643, "s": 24579, "text": "Given two numbers, write a C program to swap the given numbers." }, { "code": null, "e": 24744, "s": 24643, "text": "Input : x = 10, y = 20;\nO...
Java - How to Check if a Path Exists ? - onlinetutorialspoint
PROGRAMMINGJava ExamplesC Examples Java Examples C Examples C Tutorials aws JAVAEXCEPTIONSCOLLECTIONSSWINGJDBC EXCEPTIONS COLLECTIONS SWING JDBC JAVA 8 SPRING SPRING BOOT HIBERNATE PYTHON PHP JQUERY PROGRAMMINGJava ExamplesC Examples Java Examples C Examples C Tutorials aws This article shows you how to check if a Path...
[ { "code": null, "e": 158, "s": 123, "text": "PROGRAMMINGJava ExamplesC Examples" }, { "code": null, "e": 172, "s": 158, "text": "Java Examples" }, { "code": null, "e": 183, "s": 172, "text": "C Examples" }, { "code": null, "e": 195, "s": 183, ...
Ruby on Rails - Migrations
Rails Migration allows you to use Ruby to define changes to your database schema, making it possible to use a version control system to keep things synchronized with the actual code. This has many uses, including − Teams of developers − If one person makes a schema change, the other developers just need to update, and ...
[ { "code": null, "e": 2286, "s": 2103, "text": "Rails Migration allows you to use Ruby to define changes to your database schema, making it possible to use a version control system to keep things synchronized with the actual code." }, { "code": null, "e": 2318, "s": 2286, "text": ...
Arduino - Humidity Sensor
In this section, we will learn how to interface our Arduino board with different sensors. We will discuss the following sensors − Humidity sensor (DHT22) Temperature sensor (LM35) Water detector sensor (Simple Water Trigger) PIR SENSOR ULTRASONIC SENSOR GPS The DHT-22 (also named as AM2302) is a digital-output, relativ...
[ { "code": null, "e": 3000, "s": 2870, "text": "In this section, we will learn how to interface our Arduino board with different sensors. We will discuss the following sensors −" }, { "code": null, "e": 3024, "s": 3000, "text": "Humidity sensor (DHT22)" }, { "code": null, ...
Angular 4 - Components
Major part of the development with Angular 4 is done in the components. Components are basically classes that interact with the .html file of the component, which gets displayed on the browser. We have seen the file structure in one of our previous chapters. The file structure has the app component and it consists of t...
[ { "code": null, "e": 2333, "s": 1992, "text": "Major part of the development with Angular 4 is done in the components. Components are basically classes that interact with the .html file of the component, which gets displayed on the browser. We have seen the file structure in one of our previous chap...
Magic Triplets | Practice | GeeksforGeeks
Given an array of size n, a triplet (a[i], a[j], a[k]) is called a Magic Triplet if a[i] < a[j] < a[k] and i < j < k. Count the number of magic triplets in a given array. Example 1: Input: arr = [3, 2, 1] Output: 0 Explanation: There is no magic triplet. Example 2: Input: arr = [1, 2, 3, 4] Output: 4 Explanation: ...
[ { "code": null, "e": 400, "s": 226, "text": "Given an array of size n, a triplet (a[i], a[j], a[k]) is called a Magic Triplet if a[i] < a[j] < a[k] and i < j < k. Count the number of magic triplets in a given array.\n " }, { "code": null, "e": 411, "s": 400, "text": "Example 1:"...
How to add dividers and spaces between items in RecyclerView?
This example demonstrate about How to add dividers and spaces between items in RecyclerView Step 1 − Create a new project in Android Studio, go to File ⇒ New Project and fill all required details to create a new project. Step 2 − Add the following code to res/layout/activity_main.xml. <?xml version = "1.0" encoding = "...
[ { "code": null, "e": 1154, "s": 1062, "text": "This example demonstrate about How to add dividers and spaces between items in RecyclerView" }, { "code": null, "e": 1283, "s": 1154, "text": "Step 1 − Create a new project in Android Studio, go to File ⇒ New Project and fill all req...
A Guide on How to Build a Fuzzy Search Algorithm with FuzzyWuzzy and HMNI | by Cheng | Towards Data Science
In this article I will guide you through my thoughts on how to build a fuzzy search algorithm. A very practical use case of this algorithm is that we can use it to find alternative names for a brand saying ‘Amazon’ and we want it to return strings such as ‘AMZ’, ‘AMZN’ or ‘AMZN MKTP’. The article follows an outline as ...
[ { "code": null, "e": 457, "s": 171, "text": "In this article I will guide you through my thoughts on how to build a fuzzy search algorithm. A very practical use case of this algorithm is that we can use it to find alternative names for a brand saying ‘Amazon’ and we want it to return strings such as...
How to close an opened file in Python?
To close an opened file in python, just call the close function on the file's object. >>> f = open('hello.txt', 'r') >>> # Do stuff with file >>> f.close() Try not to open files in this way though as it is not safe. Use with ... open instead. with open('hello.txt', 'r') as f: print(f.read()) The file auto closes as...
[ { "code": null, "e": 1148, "s": 1062, "text": "To close an opened file in python, just call the close function on the file's object." }, { "code": null, "e": 1218, "s": 1148, "text": ">>> f = open('hello.txt', 'r')\n>>> # Do stuff with file\n>>> f.close()" }, { "code": nu...
Find the location with specified latitude and longitude using Python
06 Aug, 2021 In this article, we are going to write a python script to find the address of a specified latitude and longitude using the geopy module. The geopy module makes it easier to locate the coordinates of addresses, cities, countries, landmarks, and zipcode. Installation: To install GeoPy module, run the followi...
[ { "code": null, "e": 28, "s": 0, "text": "\n06 Aug, 2021" }, { "code": null, "e": 281, "s": 28, "text": "In this article, we are going to write a python script to find the address of a specified latitude and longitude using the geopy module. The geopy module makes it easier to lo...
How to insert an item into array at specific index in JavaScript?
14 May, 2019 There is no inbuilt method in JavaScript which directly allows for insertion of an element at any arbitrary index of an array. This can be solved using 2 approaches: Using array.splice():The array.splice() method is usually used to add or remove items from an array. This method takes in 3 parameters, the i...
[ { "code": null, "e": 28, "s": 0, "text": "\n14 May, 2019" }, { "code": null, "e": 194, "s": 28, "text": "There is no inbuilt method in JavaScript which directly allows for insertion of an element at any arbitrary index of an array. This can be solved using 2 approaches:" }, {...
How to sort an Array of Strings in Java
29 Nov, 2021 Array Of Strings To sort an array of strings in Java, we can use Arrays.sort() function. Java // A sample Java program to// sort an array of strings// in ascending and descending// orders using Arrays.sort(). import java.util.Arrays;import java.util.Collections; public class SortExample { public static...
[ { "code": null, "e": 28, "s": 0, "text": "\n29 Nov, 2021" }, { "code": null, "e": 45, "s": 28, "text": "Array Of Strings" }, { "code": null, "e": 118, "s": 45, "text": "To sort an array of strings in Java, we can use Arrays.sort() function. " }, { "cod...
Get a specific row in a given Pandas DataFrame
20 Aug, 2020 In the Pandas DataFrame we can find the specified row value with the using function iloc(). In this function we pass the row number as parameter. Syntax : pandas.DataFrame.iloc[]Parameters : Index Position : Index position of rows in integer or list of integer. Return type : Data frame or Series depending...
[ { "code": null, "e": 28, "s": 0, "text": "\n20 Aug, 2020" }, { "code": null, "e": 175, "s": 28, "text": "In the Pandas DataFrame we can find the specified row value with the using function iloc(). In this function we pass the row number as parameter." }, { "code": null, ...
Super Keyword in Java
16 Mar, 2020 The super keyword in java is a reference variable that is used to refer parent class objects. The keyword “super” came into the picture with the concept of Inheritance. It is majorly used in the following contexts: 1. Use of super with variables: This scenario occurs when a derived class and base class ha...
[ { "code": null, "e": 52, "s": 24, "text": "\n16 Mar, 2020" }, { "code": null, "e": 268, "s": 52, "text": "The super keyword in java is a reference variable that is used to refer parent class objects. The keyword “super” came into the picture with the concept of Inheritance. It i...
Search in a matrix | Practice | GeeksforGeeks
Given a matrix mat[][] of size N x M, where every row and column is sorted in increasing order, and a number X is given. The task is to find whether element X is present in the matrix or not. Example 1: Input: N = 3, M = 3 mat[][] = 3 30 38 44 52 54 57 60 69 X = 62 Output: 0 Explanation: 62 is not ...
[ { "code": null, "e": 430, "s": 238, "text": "Given a matrix mat[][] of size N x M, where every row and column is sorted in increasing order, and a number X is given. The task is to find whether element X is present in the matrix or not." }, { "code": null, "e": 442, "s": 430, "te...
Python | Pandas DatetimeIndex.freq
24 Dec, 2018 Python is a great language for doing data analysis, primarily because of the fantastic ecosystem of data-centric python packages. Pandas is one of those packages and makes importing and analyzing data much easier. Pandas DatetimeIndex.freq attribute returns the frequency object if it is set in the Datetime...
[ { "code": null, "e": 28, "s": 0, "text": "\n24 Dec, 2018" }, { "code": null, "e": 242, "s": 28, "text": "Python is a great language for doing data analysis, primarily because of the fantastic ecosystem of data-centric python packages. Pandas is one of those packages and makes imp...
Android - Gestures
Android provides special types of touch screen events such as pinch , double tap, scrolls , long presses and flinch. These are all known as gestures. Android provides GestureDetector class to receive motion events and tell us that these events correspond to gestures or not. To use it , you need to create an object of G...
[ { "code": null, "e": 3757, "s": 3607, "text": "Android provides special types of touch screen events such as pinch , double tap, scrolls , long presses and flinch. These are all known as gestures." }, { "code": null, "e": 4093, "s": 3757, "text": "Android provides GestureDetector...
MLflow Part 2: Deploying a Tracking Server to Minikube! | by David Hundley | Towards Data Science
10/15/20 Update: In writing my next post in this series, I found several bugs that prevented me from appropriately deploying to Minikube. To that end, I’ve updated a number of things to get you up and going with a WORKING instance! 😃 Welcome back, friends! We’re back with our continued mini-series on MLflow. In case y...
[ { "code": null, "e": 405, "s": 171, "text": "10/15/20 Update: In writing my next post in this series, I found several bugs that prevented me from appropriately deploying to Minikube. To that end, I’ve updated a number of things to get you up and going with a WORKING instance! 😃" }, { "code"...
How to remove rows containing missing value based on a particular column in an R data frame?
If we want to remove rows containing missing values based on a particular column then we should select that column by ignoring the missing values. This can be done by using is.na function. For example, if we have a data frame df that contains column x, y, z and each of the columns have some missing values then rows of ...
[ { "code": null, "e": 1445, "s": 1062, "text": "If we want to remove rows containing missing values based on a particular column then we should select that column by ignoring the missing values. This can be done by using is.na function. For example, if we have a data frame df that contains column x, ...
5 Powerful Tricks to Visualize Your Data with Matplotlib | by Rizky Maulana Nurhidayat | Towards Data Science
Data visualization is used to shows the data in a more straightforward representation and more comfortable to be understood. It can be formed in histograms, scatter plots, line plots, pie chart, etc. Many people are still using Matplotlib as their back-end module to visualize their plots. In this story, I will give you...
[ { "code": null, "e": 573, "s": 172, "text": "Data visualization is used to shows the data in a more straightforward representation and more comfortable to be understood. It can be formed in histograms, scatter plots, line plots, pie chart, etc. Many people are still using Matplotlib as their back-en...
Multi-dimensional Arrays in C
C programming language allows multidimensional arrays. Here is the general form of a multidimensional array declaration − type name[size1][size2]...[sizeN]; For example, the following declaration creates a three dimensional integer array − int threedim[5][10][4]; The simplest form of multidimensional array is the two...
[ { "code": null, "e": 2206, "s": 2084, "text": "C programming language allows multidimensional arrays. Here is the general form of a multidimensional array declaration −" }, { "code": null, "e": 2242, "s": 2206, "text": "type name[size1][size2]...[sizeN];\n" }, { "code": n...
15 Tips and Tricks for Jupyter Notebook that will ease your Coding Experience | by Satyam Kumar | Towards Data Science
Jupyter Notebook is a browser bases REPL (read eval print loop) built on IPython and other open-source libraries, it allows us to run interactive python code on the browser. It not only runs python code but also has many interesting plugins and magic commands which enhances the python coding experience greatly. One can...
[ { "code": null, "e": 345, "s": 171, "text": "Jupyter Notebook is a browser bases REPL (read eval print loop) built on IPython and other open-source libraries, it allows us to run interactive python code on the browser." }, { "code": null, "e": 484, "s": 345, "text": "It not only ...
Count the Reversals | Practice | GeeksforGeeks
Given a string S consisting of only opening and closing curly brackets '{' and '}', find out the minimum number of reversals required to convert the string into a balanced expression. A reversal means changing '{' to '}' or vice-versa. Example 1: Input: S = "}{{}}{{{" Output: 3 Explanation: One way to balance is: "{{{}...
[ { "code": null, "e": 474, "s": 238, "text": "Given a string S consisting of only opening and closing curly brackets '{' and '}', find out the minimum number of reversals required to convert the string into a balanced expression.\nA reversal means changing '{' to '}' or vice-versa." }, { "cod...
Apache HttpClient - Custom SSL Context
Using Secure Socket Layer, you can establish a secured connection between the client and server. It helps to safeguard sensitive information such as credit card numbers, usernames, passwords, pins, etc. You can make connections more secure by creating your own SSL context using the HttpClient library. Follow the steps ...
[ { "code": null, "e": 2030, "s": 1827, "text": "Using Secure Socket Layer, you can establish a secured connection between the client and\nserver. It helps to safeguard sensitive information such as credit card numbers, usernames, passwords, pins, etc." }, { "code": null, "e": 2130, "s...
Python Program to Find all Numbers in a Range which are Perfect Squares and Sum of all Digits in the Number is Less than 10
When it is required to find all numbers in a range where there are perfect square, and sum of digits in the number is less than 10, list comprehension is used. Below is the demonstration of the same − Live Demo lower_limit = int(input(“Enter the lower range: “)) upper_limit = int(input(“Enter the upper range: “)) my_l...
[ { "code": null, "e": 1222, "s": 1062, "text": "When it is required to find all numbers in a range where there are perfect square, and sum of digits in the number is less than 10, list comprehension is used." }, { "code": null, "e": 1263, "s": 1222, "text": "Below is the demonstra...
Django - File Uploading
It is generally useful for a web app to be able to upload files (profile picture, songs, pdf, words.....). Let's discuss how to upload files in this chapter. Before starting to play with an image, make sure you have the Python Image Library (PIL) installed. Now to illustrate uploading an image, let's create a profile f...
[ { "code": null, "e": 2203, "s": 2045, "text": "It is generally useful for a web app to be able to upload files (profile picture, songs, pdf, words.....). Let's discuss how to upload files in this chapter." }, { "code": null, "e": 2394, "s": 2203, "text": "Before starting to play ...
Exponential Search
Exponential search is also known as doubling or galloping search. This mechanism is used to find the range where the search key may present. If L and U are the upper and lower bound of the list, then L and U both are the power of 2. For the last section, the U is the last position of the list. For that reason, it is kn...
[ { "code": null, "e": 1402, "s": 1062, "text": "Exponential search is also known as doubling or galloping search. This mechanism is used to find the range where the search key may present. If L and U are the upper and lower bound of the list, then L and U both are the power of 2. For the last section...
Distributed Processing with PyArrow-Powered New Pandas UDFs in PySpark 3.0 | by Pınar Ersoy | Towards Data Science
Data processing time is so valuable as each minute spent costs back to users in financial terms. This article is mainly for data scientists and data engineers looking to use the newest enhancements of Apache Spark since, in a noticeably short amount of time, Apache Spark has emerged as the next generation big data proc...
[ { "code": null, "e": 579, "s": 172, "text": "Data processing time is so valuable as each minute spent costs back to users in financial terms. This article is mainly for data scientists and data engineers looking to use the newest enhancements of Apache Spark since, in a noticeably short amount of ti...
How to read and parse CSV files in C++?
You should really be using a library to parsing CSV files in C++ as there are many cases that you can miss if you read files on your own. The boost library for C++ provides a really nice set of tools for reading CSV files. For example, #include<iostream> vector<string> parseCSVLine(string line){ using namespace boos...
[ { "code": null, "e": 1298, "s": 1062, "text": "You should really be using a library to parsing CSV files in C++ as there are many cases that you can miss if you read files on your own. The boost library for C++ provides a really nice set of tools for reading CSV files. For example," }, { "co...
Tcl - Commands
As you know, Tcl is a Tool command language, commands are the most vital part of the language. Tcl commands are built in-to the language with each having its own predefined function. These commands form the reserved words of the language and cannot be used for other variable naming. The advantage with these Tcl command...
[ { "code": null, "e": 2645, "s": 2201, "text": "As you know, Tcl is a Tool command language, commands are the most vital part of the language. Tcl commands are built in-to the language with each having its own predefined function. These commands form the reserved words of the language and cannot be u...
What are the differences between a static block and a constructor in Java?
The static blocks are executed at the time of class loading. The static blocks are executed before running the main () method. The static blocks don't have any name in its prototype. If we want any logic that needs to be executed at the time of class loading that logic needs to placed inside the static block so that it...
[ { "code": null, "e": 1123, "s": 1062, "text": "The static blocks are executed at the time of class loading." }, { "code": null, "e": 1189, "s": 1123, "text": "The static blocks are executed before running the main () method." }, { "code": null, "e": 1245, "s": 118...
ES6 | Array forEach() Method - GeeksforGeeks
13 Dec, 2021 When working with arrays, it’s widespread to iterate through its elements and manipulate them. Traditionally this can be done using for, while or do-while loops. The forEach will call the function for each element in the array. Syntax: array.forEach( callback, thisObject ) Parameter: This method accept ...
[ { "code": null, "e": 24598, "s": 24570, "text": "\n13 Dec, 2021" }, { "code": null, "e": 24827, "s": 24598, "text": "When working with arrays, it’s widespread to iterate through its elements and manipulate them. Traditionally this can be done using for, while or do-while loops. T...
Logic Programming — Rethinking The Way We Program | by Louis de Benoist | Towards Data Science
If you’ve coded before, chances are you’re familiar with an imperative language, such as Python, Java, or C++. In this paradigm, a program is a list of instructions that modify its state when executed. Although this is the most common way of programming, it isn’t the focus of this article. Instead, we’re going to intro...
[ { "code": null, "e": 337, "s": 46, "text": "If you’ve coded before, chances are you’re familiar with an imperative language, such as Python, Java, or C++. In this paradigm, a program is a list of instructions that modify its state when executed. Although this is the most common way of programming, i...
Control Structure Testing - GeeksforGeeks
07 Apr, 2020 Control structure testing is used to increase the coverage area by testing various control structures present in the program. The different types of testing performed under control structure testing are as follows- 1. Condition Testing 2. Data Flow Testing 3. Loop Testing 1. Condition Testing :Condition ...
[ { "code": null, "e": 25014, "s": 24986, "text": "\n07 Apr, 2020" }, { "code": null, "e": 25229, "s": 25014, "text": "Control structure testing is used to increase the coverage area by testing various control structures present in the program. The different types of testing perfor...
Rexx - Decision Making
Decision making structures require that the programmer specify one or more conditions to be evaluated or tested by the program. The following diagram shows the general form of a typical decision-making structure found in most of the programming languages. There is a statement or statements to be executed if the conditi...
[ { "code": null, "e": 2467, "s": 2339, "text": "Decision making structures require that the programmer specify one or more conditions to be evaluated or tested by the program." }, { "code": null, "e": 2595, "s": 2467, "text": "The following diagram shows the general form of a typi...
Spring Boot Actuator Database Health Check - onlinetutorialspoint
PROGRAMMINGJava ExamplesC Examples Java Examples C Examples C Tutorials aws JAVAEXCEPTIONSCOLLECTIONSSWINGJDBC EXCEPTIONS COLLECTIONS SWING JDBC JAVA 8 SPRING SPRING BOOT HIBERNATE PYTHON PHP JQUERY PROGRAMMINGJava ExamplesC Examples Java Examples C Examples C Tutorials aws Here I am going to show how to check database...
[ { "code": null, "e": 158, "s": 123, "text": "PROGRAMMINGJava ExamplesC Examples" }, { "code": null, "e": 172, "s": 158, "text": "Java Examples" }, { "code": null, "e": 183, "s": 172, "text": "C Examples" }, { "code": null, "e": 195, "s": 183, ...
Detect Specific Color From Image using Python OpenCV
Theory of Computation In this previous article, we have mentioned to detect a specific color (say blue) from a captured video (webcam or video file) and in this article, you will learn to detect a specific color from an image using the Python OpenCV. Color detection is important to recognize objects, it is also utilize...
[ { "code": null, "e": 112, "s": 90, "text": "Theory of Computation" }, { "code": null, "e": 473, "s": 112, "text": "In this previous article, we have mentioned to detect a specific color (say blue) from a captured video (webcam or video file) and in this article, you will learn to...
How to add column using alter in MySQL?
Following is the syntax to add column using alter in MySQL: alter table yourTableName add column yourColumnName yourDataType default yourValue; Let us first create a table: mysql> create table alterTableDemo -> ( -> Id int, -> Name varchar(10) -> ); Query OK, 0 rows affected (0.69 sec) Let us check the desc...
[ { "code": null, "e": 1122, "s": 1062, "text": "Following is the syntax to add column using alter in MySQL:" }, { "code": null, "e": 1206, "s": 1122, "text": "alter table yourTableName add column yourColumnName yourDataType default yourValue;" }, { "code": null, "e": 1...
Creating a MySQL table using Node.js
Generally, NoSQL databases (like MongoDB) are more popular among the Node developers. However, it totally depends upon your usecase and choice to choose any DBMS from different database options present. The type of databse you choose mainly depends upon one's project's requirements. For example, if you need table creat...
[ { "code": null, "e": 1346, "s": 1062, "text": "Generally, NoSQL databases (like MongoDB) are more popular among the Node developers. However, it totally depends upon your usecase and choice to choose any DBMS from different database options present. The type of databse you choose mainly depends upon...
string.find() function in Lua
string.find() is one of the most powerful library functions that is present inside the string library. Lua doesn’t use the POSIX regular expression for pattern matching, as the implementation of the same takes 4,000 lines of code, which is actually bigger than all the Lua standard libraries together. In place of the PO...
[ { "code": null, "e": 1165, "s": 1062, "text": "string.find() is one of the most powerful library functions that is present inside the string library." }, { "code": null, "e": 1476, "s": 1165, "text": "Lua doesn’t use the POSIX regular expression for pattern matching, as the imple...
C++ Program to Find the Number of Permutations of a Given String
We can arrange the characters of a string in different order. Here we will see how we can count the number of permutations can be formed from a given string. We know that if one string is ‘abc’. It has three characters; we can arrange them into 3! = 6 different ways. So a string with n characters, we can arrange them i...
[ { "code": null, "e": 1220, "s": 1062, "text": "We can arrange the characters of a string in different order. Here we will see how we can count the number of permutations can be formed from a given string." }, { "code": null, "e": 1523, "s": 1220, "text": "We know that if one stri...
Reduce the string to minimum length with the given operation - GeeksforGeeks
13 Aug, 2021 Given a string str consisting of lowercase and uppercase characters, the task is to find the minimum possible length the string can be reduced to after performing the given operation any number of times. In a single operation, any two consecutive characters can be removed if they represent the same charact...
[ { "code": null, "e": 25159, "s": 25131, "text": "\n13 Aug, 2021" }, { "code": null, "e": 25570, "s": 25159, "text": "Given a string str consisting of lowercase and uppercase characters, the task is to find the minimum possible length the string can be reduced to after performing ...
Coding a custom imputer in scikit-learn | by Eryk Lewinson | Towards Data Science
Working with missing data is an inherent part of the majority of the machine learning projects. A typical approach would be to use scikit-learn’s SimpleImputer (or another imputer from the sklearn.impute module). However, often the simplest approach might not be the best one and we could gain some extra performance by ...
[ { "code": null, "e": 529, "s": 172, "text": "Working with missing data is an inherent part of the majority of the machine learning projects. A typical approach would be to use scikit-learn’s SimpleImputer (or another imputer from the sklearn.impute module). However, often the simplest approach might...
Building a Social Network from the News using Graph Theory | by Marcell Ferencz | Towards Data Science
Who are the most influential individuals on the news? What does the sprawling web of politicians, companies and celebrities really look like? How is Meghan Markle related to Argos? If you’ve ever found yourself lying in bed sleeplessly, wondering any of the above, you’ve clicked on the right article. For we will explor...
[ { "code": null, "e": 353, "s": 172, "text": "Who are the most influential individuals on the news? What does the sprawling web of politicians, companies and celebrities really look like? How is Meghan Markle related to Argos?" }, { "code": null, "e": 697, "s": 353, "text": "If yo...
Neural Networks to Predict the Market | by Vivek Palaniappan | Towards Data Science
Machine Learning and deep learning have become new and effective strategies commonly used by quantitative hedge funds to maximize their profits. As an AI and finance enthusiast myself, this is exciting news as it combines two of my areas of interest. This article will be an introduction on how to use neural networks to...
[ { "code": null, "e": 757, "s": 172, "text": "Machine Learning and deep learning have become new and effective strategies commonly used by quantitative hedge funds to maximize their profits. As an AI and finance enthusiast myself, this is exciting news as it combines two of my areas of interest. This...
How to deal with error “Error in eval(predvars, data, env) : numeric 'envir' arg not of length one” in R?
This error occurs when we do not pass the argument for independent variable as a data frame. The predict function will predict the value of the dependent variable for the provided values of the independent variable and we can also use the values of the independent variable using which the model is created. Consider the...
[ { "code": null, "e": 1370, "s": 1062, "text": "This error occurs when we do not pass the argument for independent variable as a data frame. The predict function will predict the value of the dependent variable for the provided values of the independent variable and we can also use the values of the ...
C++ Vector Library - swap() Function
The C++ function std::vector::swap() exchanges the content of vector with contents of vector x. Following is the declaration for std::vector::swap() function form std::vector header. void swap (vector& x); x − Another vector object of same type. None Constant i.e. O(1) The following example shows the usage of std::vec...
[ { "code": null, "e": 2699, "s": 2603, "text": "The C++ function std::vector::swap() exchanges the content of vector with contents of vector x." }, { "code": null, "e": 2786, "s": 2699, "text": "Following is the declaration for std::vector::swap() function form std::vector header....
Java Program to Get System MAC Address of Windows and Linux Machine - GeeksforGeeks
04 Jan, 2021 Media Access Control address (MAC address) is a unique hexadecimal identifier assigned to a Network Interface Controller (NIC) to be used as a network address in communications within a network segment. This use is common in most IEEE 802 networking technologies, including Ethernet, Wi-Fi, and Bluetooth. W...
[ { "code": null, "e": 23581, "s": 23553, "text": "\n04 Jan, 2021" }, { "code": null, "e": 24194, "s": 23581, "text": "Media Access Control address (MAC address) is a unique hexadecimal identifier assigned to a Network Interface Controller (NIC) to be used as a network address in c...
Filter array of objects by a specific property in JavaScript?
Use the concept of map() along with ternary operator (?). Following are our array of objects − let firstCustomerDetails = [ {firstName: 'John', amount: 100}, {firstName: 'David', amount: 50}, {firstName: 'Bob', amount: 80} ]; let secondCustomerDetails = [ {firstName: 'John', amount: 400}, {firstName: ...
[ { "code": null, "e": 1157, "s": 1062, "text": "Use the concept of map() along with ternary operator (?). Following are our array of objects −" }, { "code": null, "e": 1441, "s": 1157, "text": "let firstCustomerDetails =\n[\n {firstName: 'John', amount: 100},\n {firstName: 'Da...
For Statement List Implementations
The "FOR" construct offers looping capabilities for batch files. Following is the common construct of the ‘for’ statement for working with a list of values. FOR %%variable IN list DO do_something The classic ‘for’ statement consists of the following parts − Variable declaration – This step is executed only once for th...
[ { "code": null, "e": 2326, "s": 2169, "text": "The \"FOR\" construct offers looping capabilities for batch files. Following is the common construct of the ‘for’ statement for working with a list of values." }, { "code": null, "e": 2366, "s": 2326, "text": "FOR %%variable IN list ...
Prototyping a Recommender System Step by Step Part 2: Alternating Least Square (ALS) Matrix Factorization in Collaborative Filtering | by Kevin Liao | Towards Data Science
Part 1 of recommender systems can be found here In the last post, we covered a lot of ground in how to build our own recommender systems and got our hand dirty with Pandas and Scikit-learn to implement a KNN item-based collaborative filtering movie recommender. The source code of the KNN recommender system can be found...
[ { "code": null, "e": 220, "s": 172, "text": "Part 1 of recommender systems can be found here" }, { "code": null, "e": 836, "s": 220, "text": "In the last post, we covered a lot of ground in how to build our own recommender systems and got our hand dirty with Pandas and Scikit-lea...
emacs command in Linux with examples - GeeksforGeeks
15 May, 2019 Introduction to Emacs Editor in Linux/Unix Systems: The Emacs is referred to a family of editors, which means it has many versions or flavors or iterations. The most commonly used version of Emacs editor is GNU Emacs and was created by Richard Stallman. The main difference between text editors like vi, vim...
[ { "code": null, "e": 24150, "s": 24122, "text": "\n15 May, 2019" }, { "code": null, "e": 24813, "s": 24150, "text": "Introduction to Emacs Editor in Linux/Unix Systems: The Emacs is referred to a family of editors, which means it has many versions or flavors or iterations. The mo...
Inorder Traversal (Iterative) | Practice | GeeksforGeeks
Given a binary tree. Find the inorder traversal of the tree without using recursion. Example 1 Input: 1 / \ 2 3 / \ 4 5 Output: 4 2 5 1 3 Explanation: Inorder traversal (Left->Root->Right) of the tree is 4 2 5 1 3. Example 2 Input: 8 / \ ...
[ { "code": null, "e": 323, "s": 238, "text": "Given a binary tree. Find the inorder traversal of the tree without using recursion." }, { "code": null, "e": 333, "s": 323, "text": "Example 1" }, { "code": null, "e": 507, "s": 333, "text": "Input:\n 1\n...
How to create nest tables within tables in HTML ? - GeeksforGeeks
14 Aug, 2021 HTML tables are very helpful to structure the content in the form of rows and columns. But sometimes there is a need to add a table within a table. HTML supports this functionality and is known as the nesting of the tables. Tables can be nested together to create a table inside a table. To create a nested ...
[ { "code": null, "e": 26039, "s": 26011, "text": "\n14 Aug, 2021" }, { "code": null, "e": 26327, "s": 26039, "text": "HTML tables are very helpful to structure the content in the form of rows and columns. But sometimes there is a need to add a table within a table. HTML supports t...
Java | Renaming a file - GeeksforGeeks
26 Mar, 2018 In Java we can rename a file using renameTo(newName) method that belongs to the File class.Declaration: Following is the declaration for java.io.File.renameTo(File dest) method: public boolean renameTo(File dest) Parameters: dest – The new abstract pathname for the existing abstract pathname.Exception: Se...
[ { "code": null, "e": 24114, "s": 24086, "text": "\n26 Mar, 2018" }, { "code": null, "e": 24218, "s": 24114, "text": "In Java we can rename a file using renameTo(newName) method that belongs to the File class.Declaration:" }, { "code": null, "e": 24292, "s": 24218,...
Python For Loops - GeeksforGeeks
25 Aug, 2021 Python For loop is used for sequential traversal i.e. it is used for iterating over an iterable like string, tuple, list, etc. It falls under the category of definite iteration. Definite iterations mean the number of repetitions is specified explicitly in advance. In Python, there is no C style for loop, i...
[ { "code": null, "e": 41472, "s": 41444, "text": "\n25 Aug, 2021" }, { "code": null, "e": 41946, "s": 41472, "text": "Python For loop is used for sequential traversal i.e. it is used for iterating over an iterable like string, tuple, list, etc. It falls under the category of defin...