title
stringlengths
3
221
text
stringlengths
17
477k
parsed
listlengths
0
3.17k
Java Regex - Matcher Class
The java.util.regex.Matcher class acts as an engine that performs match operations on a character sequence by interpreting a Pattern. Following is the declaration for java.util.regex.Matcher class − public final class Matcher extends Object implements MatchResult Implements a non-terminal append-and-replace s...
[ { "code": null, "e": 2258, "s": 2124, "text": "The java.util.regex.Matcher class acts as an engine that performs match operations on a character sequence by interpreting a Pattern." }, { "code": null, "e": 2323, "s": 2258, "text": "Following is the declaration for java.util.regex...
5 Levels of Difficulty — Bayesian Gaussian Random Walk with PyMC3 and Theano | Towards Data Science
Today time series forecasting is ubiquitous, and decision-making processes in companies depend heavily on their ability to predict the future. Through a short series of articles, I will present you with a possible approach to this kind of problems, combining state-space models with Bayesian statistics. In the initial a...
[ { "code": null, "e": 476, "s": 172, "text": "Today time series forecasting is ubiquitous, and decision-making processes in companies depend heavily on their ability to predict the future. Through a short series of articles, I will present you with a possible approach to this kind of problems, combin...
Lucene - StandardAnalyzer
This is the most sophisticated analyzer and is capable of handling names, email addresses, etc. It lowercases each token and removes common words and punctuations, if any. Following is the declaration for the org.apache.lucene.analysis.StandardAnalyzer class − public final class StandardAnalyzer extends StopwordAnal...
[ { "code": null, "e": 2015, "s": 1843, "text": "This is the most sophisticated analyzer and is capable of handling names, email addresses, etc. It lowercases each token and removes common words and punctuations, if any." }, { "code": null, "e": 2104, "s": 2015, "text": "Following ...
__future__ Module in Python - GeeksforGeeks
17 Oct, 2021 __future__ module is a built-in module in Python that is used to inherit new features that will be available in the new Python versions.. This module includes all the latest functions which were not present in the previous version in Python. And we can use this by importing the __future__ module. Its rele...
[ { "code": null, "e": 24212, "s": 24184, "text": "\n17 Oct, 2021" }, { "code": null, "e": 24351, "s": 24212, "text": "__future__ module is a built-in module in Python that is used to inherit new features that will be available in the new Python versions.. " }, { "code": nu...
C library function - localtime()
The C library function struct tm *localtime(const time_t *timer) uses the time pointed by timer to fill a tm structure with the values that represent the corresponding local time. The value of timer is broken up into the structure tm and expressed in the local time zone. Following is the declaration for localtime() fun...
[ { "code": null, "e": 2279, "s": 2007, "text": "The C library function struct tm *localtime(const time_t *timer) uses the time pointed by timer to fill a tm structure with the values that represent the corresponding local time. The value of timer is broken up into the structure tm and expressed in th...
Change the dimension of a NumPy array - GeeksforGeeks
29 Aug, 2020 Let’s discuss how to change the dimensions of an array. In NumPy, this can be achieved many ways. Let’s discuss each of them. Method #1: Using Shape() Syntax : array_name.shape() Python3 # importing numpyimport numpy as np def main(): # initialising array print('Initialised array') gfg = np...
[ { "code": null, "e": 23901, "s": 23873, "text": "\n29 Aug, 2020" }, { "code": null, "e": 24028, "s": 23901, "text": "Let’s discuss how to change the dimensions of an array. In NumPy, this can be achieved many ways. Let’s discuss each of them. " }, { "code": null, "e":...
Modify array such that the array does not contain any common divisors other than 1 - GeeksforGeeks
14 Feb, 2022 Given an array arr[] consisting of N integers and an integer X, the task is to check if it is possible to modify the array such that the array does not contain any common divisor other than 1, by repeatedly dividing any array element of the array by any of its divisor d (d ≤ X). If it is possible to modify...
[ { "code": null, "e": 24716, "s": 24688, "text": "\n14 Feb, 2022" }, { "code": null, "e": 25120, "s": 24716, "text": "Given an array arr[] consisting of N integers and an integer X, the task is to check if it is possible to modify the array such that the array does not contain any...
What are MySQL joins?
As we know that MySQL SELECT can be used to retrieve information from a single table at a time but all the questions cannot be answered using just one table. So for the above said purpose i.e. drawing on information stored in multiple tables, we can use Join operation. Basically, MySQL join is a method of linking data ...
[ { "code": null, "e": 1332, "s": 1062, "text": "As we know that MySQL SELECT can be used to retrieve information from a single table at a time but all the questions cannot be answered using just one table. So for the above said purpose i.e. drawing on information stored in multiple tables, we can use...
Go - Interfaces
Go programming provides another data type called interfaces which represents a set of method signatures. The struct data type implements these interfaces to have method definitions for the method signature of the interfaces. /* define an interface */ type interface_name interface { method_name1 [return_type] meth...
[ { "code": null, "e": 2162, "s": 1937, "text": "Go programming provides another data type called interfaces which represents a set of method signatures. The struct data type implements these interfaces to have method definitions for the method signature of the interfaces." }, { "code": null, ...
Count rows based on condition in Pyspark Dataframe - GeeksforGeeks
29 Jun, 2021 In this article, we will discuss how to count rows based on conditions in Pyspark dataframe. For this, we are going to use these methods: Using where() function. Using filter() function. Creating Dataframe for demonstration: Python3 # importing module import pyspark # importing spark...
[ { "code": null, "e": 24284, "s": 24253, "text": " \n29 Jun, 2021\n" }, { "code": null, "e": 24377, "s": 24284, "text": "In this article, we will discuss how to count rows based on conditions in Pyspark dataframe." }, { "code": null, "e": 24422, "s": 24377, "te...
How can I use goto statement in JavaScript?
JavaScript goto statement is a reserved keyword. Generally, according to web standards it isn’t considered a good practice to use goto statement. Using goto with JavaScript preprocessing is still considered good as shown below. var a = 0; [lbl] beginning: console.log("Demo Text!"); a++; if(i < 424) goto beginning; The ...
[ { "code": null, "e": 1208, "s": 1062, "text": "JavaScript goto statement is a reserved keyword. Generally, according to web standards it isn’t considered a good practice to use goto statement." }, { "code": null, "e": 1290, "s": 1208, "text": "Using goto with JavaScript preproces...
Maximum consecutive repeating character in string in C++
We are given a string of alphabets. The task is to find the character which has the longest consecutive repetitions occurring in string. Let’s understand with examples. Input− String[] = “abbbabbbbcdd” Output − b Explanation − In the above string, the longest consecutive sequence is of character ‘b’. Count of consecuti...
[ { "code": null, "e": 1231, "s": 1062, "text": "We are given a string of alphabets. The task is to find the character which has the longest consecutive repetitions occurring in string. Let’s understand with examples." }, { "code": null, "e": 1264, "s": 1231, "text": "Input− String...
Working with csv files in Python Programming
The CSV file or comma separated values file are one of the most widely used flat files to store and hare data across platforms. The columns are separated by comma and there is optional header row also which will indicate the name of each column. Python can read the CSV files using many modules. In this article we will ...
[ { "code": null, "e": 1519, "s": 1062, "text": "The CSV file or comma separated values file are one of the most widely used flat files to store and hare data across platforms. The columns are separated by comma and there is optional header row also which will indicate the name of each column. Python ...
Graph Theory - Quick Guide
In the domain of mathematics and computer science, graph theory is the study of graphs that concerns with the relationship among edges and vertices. It is a popular subject having its applications in computer science, information technology, biosciences, mathematics, and linguistics to name a few. Without further ado, ...
[ { "code": null, "e": 2322, "s": 1966, "text": "In the domain of mathematics and computer science, graph theory is the study of graphs that concerns with the relationship among edges and vertices. It is a popular subject having its applications in computer science, information technology, biosciences...
Python math function | sqrt() - GeeksforGeeks
11 Jan, 2018 sqrt() function is an inbuilt function in Python programming language that returns the square root of any number. Syntax: math.sqrt(x) Parameter: x is any number such that x>=0 Returns: It returns the square root of the number passed in the parameter. # Python3 program to demonstrate the # sqrt() met...
[ { "code": null, "e": 23979, "s": 23951, "text": "\n11 Jan, 2018" }, { "code": null, "e": 24093, "s": 23979, "text": "sqrt() function is an inbuilt function in Python programming language that returns the square root of any number." }, { "code": null, "e": 24237, "...
Dart - Super and This keyword - GeeksforGeeks
08 Mar, 2022 In Dart, super keyword is used to refer immediate parent class object. It is used to call properties and methods of the superclass. It does not call the method, whereas when we create an instance of subclass than that of the parent class is created implicitly so super keyword calls that instance. Advantage...
[ { "code": null, "e": 23635, "s": 23607, "text": "\n08 Mar, 2022" }, { "code": null, "e": 23933, "s": 23635, "text": "In Dart, super keyword is used to refer immediate parent class object. It is used to call properties and methods of the superclass. It does not call the method, wh...
SWING - Event Classes
Event classes represent the event. Java provides various Event classes, however, only those which are more frequently used will be discussed. It is the root class from which all event state objects shall be derived. All Events are constructed with a reference to the object, the source, that is logically deemed to be th...
[ { "code": null, "e": 1905, "s": 1763, "text": "Event classes represent the event. Java provides various Event classes, however, only those which are more frequently used will be discussed." }, { "code": null, "e": 2194, "s": 1905, "text": "It is the root class from which all even...
Decision Trees: A step-by-step approach to building DTs | by Gokul S Kumar | Towards Data Science
Decision Trees (DTs) are a non-parametric supervised learning method used for classification and regression. The goal is to create a model that predicts the value of a target variable by learning simple decision rules inferred from the data features. Decision trees are commonly used in operations research, specifically...
[ { "code": null, "e": 621, "s": 172, "text": "Decision Trees (DTs) are a non-parametric supervised learning method used for classification and regression. The goal is to create a model that predicts the value of a target variable by learning simple decision rules inferred from the data features. Deci...
Inplace operator in Python
Definition - In-place operation is an operation that changes directly the content of a given linear algebra, vector, matrices(Tensor) without making a copy. The operators which helps to do the operation is called in-place operator. Eg: a+= b is equivalent to a= operator.iadd(a, b) There are some operators are used fo...
[ { "code": null, "e": 1294, "s": 1062, "text": "Definition - In-place operation is an operation that changes directly the content of a given linear algebra, vector, matrices(Tensor) without making a copy. The operators which helps to do the operation is called in-place operator." }, { "code":...
Default Assignment Operator and References in C++ - GeeksforGeeks
27 Dec, 2021 We have discussed assignment operator overloading for dynamically allocated resources here. In this article, we discussed that when we don’t write our own assignment operator, the compiler creates an assignment operator itself that does shallow copy and thus causes problems. The difference between shallow ...
[ { "code": null, "e": 24853, "s": 24825, "text": "\n27 Dec, 2021" }, { "code": null, "e": 25402, "s": 24853, "text": "We have discussed assignment operator overloading for dynamically allocated resources here. In this article, we discussed that when we don’t write our own assignme...
Angular CLI - ng serve Command
This chapter explains the syntax, argument and options of ng serve command along with an example. The syntax for ng serve command is as follows − ng serve <project> [options] ng s <project> [options] ng serve command builds and serve the application. It rebuilds the application if changes occur. Here project is the na...
[ { "code": null, "e": 2173, "s": 2075, "text": "This chapter explains the syntax, argument and options of ng serve command along with an example." }, { "code": null, "e": 2221, "s": 2173, "text": "The syntax for ng serve command is as follows −" }, { "code": null, "e":...
RSpec - Quick Guide
RSpec is a unit test framework for the Ruby programming language. RSpec is different than traditional xUnit frameworks like JUnit because RSpec is a Behavior driven development tool. What this means is that, tests written in RSpec focus on the “behavior” of an application being tested. RSpec does not put emphasis on, h...
[ { "code": null, "e": 2222, "s": 1794, "text": "RSpec is a unit test framework for the Ruby programming language. RSpec is different than traditional xUnit frameworks like JUnit because RSpec is a Behavior driven development tool. What this means is that, tests written in RSpec focus on the “behavior...
Decision Tree Algorithm in Python From Scratch | by Eligijus Bujokas | Towards Data Science
The aim of this article is to make all the parts of a decision tree classifier clear by walking through the code that implements the algorithm. The code uses only NumPy, Pandas and the standard python libraries. The full code can be accessed via https://github.com/Eligijus112/decision-tree-python As of now, the code cr...
[ { "code": null, "e": 384, "s": 172, "text": "The aim of this article is to make all the parts of a decision tree classifier clear by walking through the code that implements the algorithm. The code uses only NumPy, Pandas and the standard python libraries." }, { "code": null, "e": 470, ...
How to use appbar layout in android?
This example demonstrate about How to use appbar layout in android Step 1 − Create a new project in Android Studio, go to File ⇒ New Project and fill all required details to create a new project. Step 2 − Add the following code to res/layout/activity_main.xml. <?xml version = "1.0" encoding = "utf-8"?> <android.support...
[ { "code": null, "e": 1129, "s": 1062, "text": "This example demonstrate about How to use appbar layout in android" }, { "code": null, "e": 1258, "s": 1129, "text": "Step 1 − Create a new project in Android Studio, go to File ⇒ New Project and fill all required details to create a...
Top 22 Podcasts for Data Science in 2021 | by Benedict Neo | Towards Data Science
Podcasts are one of the best methods to learn new things and a handy tool for cultivating curiosity and passion. I love listening to TED radio hour in my commute on the train and on my walks. This ensures that I have my daily dose of knowledge and that I go to bed smarter than when I woke up, something I picked up from...
[ { "code": null, "e": 544, "s": 172, "text": "Podcasts are one of the best methods to learn new things and a handy tool for cultivating curiosity and passion. I love listening to TED radio hour in my commute on the train and on my walks. This ensures that I have my daily dose of knowledge and that I ...
How to build a Streamlit UI to Analyze Different Classifiers on the Wine, Iris and Breast Cancer Dataset | by Rahul Banerjee | Towards Data Science
In this tutorial, we will be working with three datasets (Iris, Breast Cancer, Wine) We will use 3 different models (KNN, SVM, Random Forest) for classification and give the user the ability to set some parameters. pip install virtualenv /* Install virtual environment */virtualenv venv /* Create a virtual envi...
[ { "code": null, "e": 256, "s": 171, "text": "In this tutorial, we will be working with three datasets (Iris, Breast Cancer, Wine)" }, { "code": null, "e": 386, "s": 256, "text": "We will use 3 different models (KNN, SVM, Random Forest) for classification and give the user the abi...
Help function in Python
Many times we need to look into the python documentation for some help on functions, modules etc. Python provides a help function that gives us this needed results. Help(‘term’) Where term is the word on which we want the help. In the below example we seek to find help on the word time. The output comes from python doc...
[ { "code": null, "e": 1227, "s": 1062, "text": "Many times we need to look into the python documentation for some help on functions, modules etc. Python provides a help function that gives us this needed results." }, { "code": null, "e": 1290, "s": 1227, "text": "Help(‘term’)\nWhe...
Formatting Axes in Python-Matplotlib - GeeksforGeeks
22 Jun, 2020 Matplotlib is a python library for creating static, animated and interactive data visualizations. Note: For more information, refer to Introduction to Matplotlib This is what you think of as ‘plot’. It is the region of the image that contains the data space. The Axes contains two or three-axis(in case of 3...
[ { "code": null, "e": 24942, "s": 24914, "text": "\n22 Jun, 2020" }, { "code": null, "e": 25040, "s": 24942, "text": "Matplotlib is a python library for creating static, animated and interactive data visualizations." }, { "code": null, "e": 25104, "s": 25040, "...
Date.getDate() function in JavaScript
The Date object is a data type built into the JavaScript language. Date objects are created with the new Date( ) as shown below. Once a Date object is created, a number of methods allow you to operate on it. Most methods simply allow you to get and set the year, month, day, hour, minute, second, and millisecond fields ...
[ { "code": null, "e": 1191, "s": 1062, "text": "The Date object is a data type built into the JavaScript language. Date objects are created with the new Date( ) as shown below." }, { "code": null, "e": 1454, "s": 1191, "text": "Once a Date object is created, a number of methods al...
Maximum Intervals Overlap | Practice | GeeksforGeeks
Consider a big party where N guests came to it and a log register for guest’s entry and exit times was maintained. Find the minimum time at which there were maximum guests at the party. Note that entries in the register are not in any order. Note: Guests are leaving after the exit times. Example 1: Input: N = 5 Entry= ...
[ { "code": null, "e": 480, "s": 238, "text": "Consider a big party where N guests came to it and a log register for guest’s entry and exit times was maintained. Find the minimum time at which there were maximum guests at the party. Note that entries in the register are not in any order." }, { ...
How can we create a MySQL view with a subquery?
To illustrate the making of MySQL view with subquery we are using the following data from the table ‘Cars’ − mysql> select * from cars; +------+--------------+---------+ | ID | Name | Price | +------+--------------+---------+ | 1 | Nexa | 750000 | | 2 | Maruti Swift | 450000 | | 3 | BMW ...
[ { "code": null, "e": 1171, "s": 1062, "text": "To illustrate the making of MySQL view with subquery we are using the following data from the table ‘Cars’ −" }, { "code": null, "e": 1631, "s": 1171, "text": "mysql> select * from cars;\n+------+--------------+---------+\n| ID | N...
Puppeteer - Getting Element Text
We can get element text in Puppeteer. This is done with the help of the textContent property. This property of the element is passed as a parameter to the getProperty method. The syntax of getting element text is as follows − const n = await page.$("#txt") const t = await (await n.getProperty('textContent')).jsonValue(...
[ { "code": null, "e": 2925, "s": 2750, "text": "We can get element text in Puppeteer. This is done with the help of the textContent property. This property of the element is passed as a parameter to the getProperty method." }, { "code": null, "e": 2976, "s": 2925, "text": "The syn...
Python Numbers
There are three numeric types in Python: int float complex Variables of numeric types are created when you assign a value to them: To verify the type of any object in Python, use the type() function: Int, or integer, is a whole number, positive or negative, without decimals, of unlimited length. Integers: Float, or "f...
[ { "code": null, "e": 41, "s": 0, "text": "There are three numeric types in Python:" }, { "code": null, "e": 45, "s": 41, "text": "int" }, { "code": null, "e": 51, "s": 45, "text": "float" }, { "code": null, "e": 59, "s": 51, "text": "comple...
Python: Hamiltonian Monte Carlo from scratch | by Jake | Towards Data Science
If your experience with Markov Chain Monte Carlo (MCMC) methods has been anything like mine, it’s been an endless search for answers. Every time you get an answer to one question, a dozen more pop up! You’re continuously learning how much you don’t know. I recently accepted a full time role as data scientist at an orga...
[ { "code": null, "e": 792, "s": 172, "text": "If your experience with Markov Chain Monte Carlo (MCMC) methods has been anything like mine, it’s been an endless search for answers. Every time you get an answer to one question, a dozen more pop up! You’re continuously learning how much you don’t know. ...
JavaFX example to set action listeners to a CheckBox
A checkbox is a type of selection control, which is square in shape with a tick mark int it, It has three states checked or, unchecked and, tristate/indeterminate (optional). In JavaFX a checkbox is represented by the javafx.scene.control.CheckBox class. This class has three boolean properties namely allowIndeterminate...
[ { "code": null, "e": 1237, "s": 1062, "text": "A checkbox is a type of selection control, which is square in shape with a tick mark int it, It has three states checked or, unchecked and, tristate/indeterminate (optional)." }, { "code": null, "e": 1414, "s": 1237, "text": "In Java...
Volatility Trading 101. An intuitive guide to delta hedging | by Roman Paolucci | Towards Data Science
A large client wants to purchase 100,000 AAPL call options with the following parameters: Strike Price: 350 Spot Price: 320 Implied Volatility: 30% Risk-free rate: 8% Time until expiration: 1 year You decide to consult your team. Your team has research suggesting that realized volatility will be less than the volatilit...
[ { "code": null, "e": 262, "s": 172, "text": "A large client wants to purchase 100,000 AAPL call options with the following parameters:" }, { "code": null, "e": 280, "s": 262, "text": "Strike Price: 350" }, { "code": null, "e": 296, "s": 280, "text": "Spot Pric...
Matplotlib - Setting Ticks and Tick Labels - GeeksforGeeks
26 Dec, 2020 In this article, we are going to discuss how set Ticks and Tick labels in a graph. Ticks are the markers denoting data points on the axes and tick labels are the name given to ticks. By default matplotlib itself marks the data points on the axes but it has also provided us with setting their own axes havin...
[ { "code": null, "e": 25537, "s": 25509, "text": "\n26 Dec, 2020" }, { "code": null, "e": 25620, "s": 25537, "text": "In this article, we are going to discuss how set Ticks and Tick labels in a graph." }, { "code": null, "e": 25885, "s": 25620, "text": "Ticks a...
numpy.equal() in Python - GeeksforGeeks
04 Jan, 2022 numpy.equal(arr1, arr2, out = None, where = True, casting = ‘same_kind’, order = ‘K’, dtype = None, ufunc ‘not_equal’) : This logical function checks for arr1 == arr2 element-wise. Parameters : arr1 : [array_like]Input arrayarr2 : [array_like]Input array out : [ndarray, optional]Output array with same dime...
[ { "code": null, "e": 26399, "s": 26371, "text": "\n04 Jan, 2022" }, { "code": null, "e": 26580, "s": 26399, "text": "numpy.equal(arr1, arr2, out = None, where = True, casting = ‘same_kind’, order = ‘K’, dtype = None, ufunc ‘not_equal’) : This logical function checks for arr1 == a...
Check if the given string is vowel prime - GeeksforGeeks
10 May, 2021 Given a string str of lowercase English alphabets, the task is to check whether the string is a vowel prime or not. A string is said to be vowel prime if all the vowels in the string appear at only prime indices.Examples: Input: str = “geeksforgeeks” Output: No str[1] = ‘e’ is a vowel but 1 is not prime....
[ { "code": null, "e": 26099, "s": 26071, "text": "\n10 May, 2021" }, { "code": null, "e": 26323, "s": 26099, "text": "Given a string str of lowercase English alphabets, the task is to check whether the string is a vowel prime or not. A string is said to be vowel prime if all the v...
Sequence with examples in SQL Server - GeeksforGeeks
03 Sep, 2020 Sequence :A sequence is a list of numbers, in an ordered manner. For example, {1, 2, 3} is a sequence and {3, 2, 1} is also sequence but a different sequence. It is a user-defined schema object that produces a list of numbers in accordance to specified value in SQL server. Syntax : CREATE SEQUENCE schema_n...
[ { "code": null, "e": 25513, "s": 25485, "text": "\n03 Sep, 2020" }, { "code": null, "e": 25672, "s": 25513, "text": "Sequence :A sequence is a list of numbers, in an ordered manner. For example, {1, 2, 3} is a sequence and {3, 2, 1} is also sequence but a different sequence." }...
Mouse and keyboard automation using Python - GeeksforGeeks
21 Jan, 2021 This article illustrates how to automate movements of mouse and keyboard using pyautogui module in python. This module is not preloaded with python. So to install it run the following command: pip3 install pyautogui Controlling mouse movements using pyautogui module Python tracks and controls mouse us...
[ { "code": null, "e": 26025, "s": 25997, "text": "\n21 Jan, 2021" }, { "code": null, "e": 26220, "s": 26025, "text": "This article illustrates how to automate movements of mouse and keyboard using pyautogui module in python. This module is not preloaded with python. So to install ...
Java Program to Demonstrate the Nested Initialization For Singleton Class - GeeksforGeeks
07 Jan, 2021 A Singleton Class is capable of producing just a single instance. Every Singleton class has a getInstance method which returns its object. When the getInstance method is called for the first time, an object of the class is generated, stored, and then returned. On subsequent calls to getInstance, the same o...
[ { "code": null, "e": 25225, "s": 25197, "text": "\n07 Jan, 2021" }, { "code": null, "e": 25571, "s": 25225, "text": "A Singleton Class is capable of producing just a single instance. Every Singleton class has a getInstance method which returns its object. When the getInstance met...
DateTime.SpecifyKind() Method in C#
The DateTime.SpecifyKind() method in C# is used to create a new DateTime object that has the same number of ticks as the specified DateTime but is designated as either local time, Coordinated Universal Time (UTC), or neither, as indicated by the specified DateTimeKind value. Following is the syntax − public static Date...
[ { "code": null, "e": 1338, "s": 1062, "text": "The DateTime.SpecifyKind() method in C# is used to create a new DateTime object that has the same number of ticks as the specified DateTime but is designated as either local time, Coordinated Universal Time (UTC), or neither, as indicated by the specifi...
SAS - Cross Tabulations
Cross tabulation involves producing cross tables also called contingent tables using all possible combinations of two or more variables. In SAS it is created using PROC FREQ along with the TABLES option. For example - if we need the frequency of each model for each make in each car type category, then we need to use th...
[ { "code": null, "e": 2933, "s": 2583, "text": "Cross tabulation involves producing cross tables also called contingent tables using all possible combinations of two or more variables. In SAS it is created using PROC FREQ along with the TABLES option. For example - if we need the frequency of each mo...
Jackson Annotations - @JsonIdentityInfo
@JsonIdentityInfo is used when objects have parent child relationship. @JsonIdentityInfo is used to indicate that object identity will be used during serialization/de-serialization. import java.io.IOException; import java.text.ParseException; import java.util.ArrayList; import java.util.List; import com.fasterxml.jack...
[ { "code": null, "e": 2657, "s": 2475, "text": "@JsonIdentityInfo is used when objects have parent child relationship. @JsonIdentityInfo is used to indicate that object identity will be used during serialization/de-serialization." }, { "code": null, "e": 4218, "s": 2657, "text": "...
Design a Queue data structure to get minimum or maximum in O(1) time - GeeksforGeeks
26 Nov, 2021 Problem: Design a Data Structure a SpecialQueue which supports following operations enque, deque, getMin() or getMax() where getMin() operation takes O(1) time.Example: Let the data to be inserted in queue be - 4, 2, 1, 6 Operation Queue Output push(4) 4 - push(2) 4, 2...
[ { "code": null, "e": 24408, "s": 24380, "text": "\n26 Nov, 2021" }, { "code": null, "e": 24579, "s": 24408, "text": "Problem: Design a Data Structure a SpecialQueue which supports following operations enque, deque, getMin() or getMax() where getMin() operation takes O(1) time.Exa...
log4j - Sample Program
We have seen how to create a configuration file. This chapter describe how to generate debug messages and log them in a simple text file. Following is a simple configuration file created for our example. Let us revise it once again: The level of the root logger is defined as DEBUG and attaches appender named FILE to it...
[ { "code": null, "e": 1964, "s": 1826, "text": "We have seen how to create a configuration file. This chapter describe how to generate debug messages and log them in a simple text file." }, { "code": null, "e": 2059, "s": 1964, "text": "Following is a simple configuration file cre...
End to End Deep Learning Project: Part 1 | by Dr. Varshita Sher | Towards Data Science
Note: This is the first part of a two-part series implementing a deep-learning project from scratch. Part 1 covers the setup for the problem statement, data preprocessing, the intuition behind transfer learning, feature extraction, fine-tuning, and model evaluation. Part 2 covers the implementation of the Flask app and...
[ { "code": null, "e": 611, "s": 172, "text": "Note: This is the first part of a two-part series implementing a deep-learning project from scratch. Part 1 covers the setup for the problem statement, data preprocessing, the intuition behind transfer learning, feature extraction, fine-tuning, and model ...
Facebook’s Prophet + Deep Learning = NeuralProphet | by Eryk Lewinson | Towards Data Science
While learning about time series forecasting, sooner or later you will encounter the vastly popular Prophet model, developed by Facebook. It gained lots of popularity due to the fact that it provides good performance in terms of accuracy, interpretable results, and — at the same time — it automates a lot of the element...
[ { "code": null, "e": 691, "s": 171, "text": "While learning about time series forecasting, sooner or later you will encounter the vastly popular Prophet model, developed by Facebook. It gained lots of popularity due to the fact that it provides good performance in terms of accuracy, interpretable re...
What is the use of cin.ignore() in C++?
The cin.ignore() function is used which is used to ignore or clear one or more characters from the input buffer. To get the idea about ignore() is working, we have to see one problem, and its solution is found using the ignore() function. The problem is like below. Sometimes we need to clear the unwanted buffer, so whe...
[ { "code": null, "e": 1175, "s": 1062, "text": "The cin.ignore() function is used which is used to ignore or clear one or more characters from the input buffer." }, { "code": null, "e": 1328, "s": 1175, "text": "To get the idea about ignore() is working, we have to see one problem...
How to redirect to another webpage with JavaScript?
To redirect to another webpage using JavaScript, the code is as follows − Live Demo <!DOCTYPE html> <html> <head> <h1>Redirect to a Webpage Example</h1> <button class="redirectBtn">Redirect</button> <h2>Click the above button to Redirect to another Webpage</h2> <script> document .querySelector(".redirectBtn") .addE...
[ { "code": null, "e": 1136, "s": 1062, "text": "To redirect to another webpage using JavaScript, the code is as follows −" }, { "code": null, "e": 1147, "s": 1136, "text": " Live Demo" }, { "code": null, "e": 1539, "s": 1147, "text": "<!DOCTYPE html>\n<html>\n<...
Difference Between Private and Protected in C++
In this post, we will understand the difference between private and protected access modifiers in C++. They are declared using the ‘private’ keyword, followed by a ‘:’. They are declared using the ‘private’ keyword, followed by a ‘:’. They can’t be accessed outside the class. They can’t be accessed outside the class. T...
[ { "code": null, "e": 1165, "s": 1062, "text": "In this post, we will understand the difference between private and protected access modifiers in C++." }, { "code": null, "e": 1231, "s": 1165, "text": "They are declared using the ‘private’ keyword, followed by a ‘:’." }, { ...
NativeScript - Installation
This section explains about how to install NativeScript on your machine. Before moving to installation, we need the following prerequisites − Node.js Node.js Android Android iOS iOS Node.js is a JavaScript runtime engine build on top of Google Chrome’s internal JavaScript engine, v8. NativeScript uses Node.js extensive...
[ { "code": null, "e": 2178, "s": 2105, "text": "This section explains about how to install NativeScript on your machine." }, { "code": null, "e": 2247, "s": 2178, "text": "Before moving to installation, we need the following prerequisites −" }, { "code": null, "e": 225...
Python for Finance: Dash by Plotly | by Kevin Boller | Towards Data Science
In part 1 of this series I discussed how, since I’ve become more accustomed to using pandas, that I have signficantly increased my use of Python for financial analyses. During the part 1 post, we reviewed how to largely automate the tracking and benchmarking of a stock portfolio’s performance leveraging pandas and the ...
[ { "code": null, "e": 1225, "s": 172, "text": "In part 1 of this series I discussed how, since I’ve become more accustomed to using pandas, that I have signficantly increased my use of Python for financial analyses. During the part 1 post, we reviewed how to largely automate the tracking and benchmar...
Java - rint() Method
The method rint returns the integer that is closest in value to the argument. double rint(double d) Here is the detail of parameters − d − it accepts a double value as parameter. d − it accepts a double value as parameter. This method returns the integer that is closest in value to the argument. Returned as a double. ...
[ { "code": null, "e": 2455, "s": 2377, "text": "The method rint returns the integer that is closest in value to the argument." }, { "code": null, "e": 2478, "s": 2455, "text": "double rint(double d)\n" }, { "code": null, "e": 2513, "s": 2478, "text": "Here is t...
Dials, Tune, and Parsnip: Tidymodels’ Way to Create and Tune Model Parameters | Towards Data Science
Finding optimal values can make significant improvements in machine learning models. I enjoy experimenting with various values in the tuning processes and seeing my models getting better at prediction. However, it can be troublesome having to figure out the names, ranges, values, and other aspects for the parameters. G...
[ { "code": null, "e": 605, "s": 172, "text": "Finding optimal values can make significant improvements in machine learning models. I enjoy experimenting with various values in the tuning processes and seeing my models getting better at prediction. However, it can be troublesome having to figure out t...
Node.js zlib.gunzipSync() Method
12 Oct, 2021 The zlib.gunzipSync() method is an inbuilt application programming interface of the Zlib module which is used to decompress a chunk of data with Gunzip. Syntax: zlib.gunzipSync( buffer, options ) Parameters: This method accepts two parameters as mentioned above and described below: buffer: This parameter h...
[ { "code": null, "e": 28, "s": 0, "text": "\n12 Oct, 2021" }, { "code": null, "e": 181, "s": 28, "text": "The zlib.gunzipSync() method is an inbuilt application programming interface of the Zlib module which is used to decompress a chunk of data with Gunzip." }, { "code": ...
Skip List | Set 2 (Insertion)
14 Jul, 2022 We have already discussed the idea of Skip list and how they work in Skip List | Set 1 (Introduction). In this article, we will be discussing how to insert an element in Skip list. Deciding nodes level Each element in the list is represented by a node, the level of the node is chosen randomly while inserti...
[ { "code": null, "e": 52, "s": 24, "text": "\n14 Jul, 2022" }, { "code": null, "e": 233, "s": 52, "text": "We have already discussed the idea of Skip list and how they work in Skip List | Set 1 (Introduction). In this article, we will be discussing how to insert an element in Skip...
Maximum product of indexes of next greater on left and right
22 Jun, 2022 Given an array a[1..N]. For each element at position i (1 <= i <= N). Where L(i) is defined as closest index j such that j < i and a[j] > a[i]. If no such j exists then L(i) = 0.R(i) is defined as closest index k such that k > i and a[k] > a[i]. If no such k exists then R(i) = 0. L(i) is defined as closes...
[ { "code": null, "e": 54, "s": 26, "text": "\n22 Jun, 2022" }, { "code": null, "e": 131, "s": 54, "text": "Given an array a[1..N]. For each element at position i (1 <= i <= N). Where " }, { "code": null, "e": 336, "s": 131, "text": "L(i) is defined as closest i...
Connect n ropes with minimum cost
23 Jun, 2022 There are given n ropes of different lengths, we need to connect these ropes into one rope. The cost to connect two ropes is equal to the sum of their lengths. We need to connect the ropes with minimum cost. For example, if we are given 4 ropes of lengths 4, 3, 2, and 6. We can connect the ropes in the fol...
[ { "code": null, "e": 54, "s": 26, "text": "\n23 Jun, 2022" }, { "code": null, "e": 262, "s": 54, "text": "There are given n ropes of different lengths, we need to connect these ropes into one rope. The cost to connect two ropes is equal to the sum of their lengths. We need to con...
Python program to Swap Keys and Values in Dictionary
16 May, 2022 Dictionary is quite a useful data structure in programming that is usually used to hash a particular key with value so that they can be retrieved efficiently. Let’s discuss various ways of swapping the keys and values in Python Dictionary. Method#1 (Does not work when there are multiple same values): One ...
[ { "code": null, "e": 53, "s": 25, "text": "\n16 May, 2022" }, { "code": null, "e": 294, "s": 53, "text": "Dictionary is quite a useful data structure in programming that is usually used to hash a particular key with value so that they can be retrieved efficiently. Let’s discuss v...
Python | Remove unwanted spaces from string
25 Jun, 2019 Sometimes, while working with strings, we may have situations in which we might have more than 1 spaces between intermediate words in strings that are mostly unwanted. This type of situations can occur in web development and often needs rectification. Let’s discuss certain ways in which this task can be pe...
[ { "code": null, "e": 28, "s": 0, "text": "\n25 Jun, 2019" }, { "code": null, "e": 344, "s": 28, "text": "Sometimes, while working with strings, we may have situations in which we might have more than 1 spaces between intermediate words in strings that are mostly unwanted. This ty...
How to add Timer in Next.js ?
15 Nov, 2021 In this article, we are going to learn how we can add Timer in NextJs. NextJS is a React-based framework. It has the power to Develop beautiful Web applications for different platforms like Windows, Linux, and mac. The linking of dynamic paths helps in rendering your NextJS components conditionally. Approa...
[ { "code": null, "e": 28, "s": 0, "text": "\n15 Nov, 2021" }, { "code": null, "e": 329, "s": 28, "text": "In this article, we are going to learn how we can add Timer in NextJs. NextJS is a React-based framework. It has the power to Develop beautiful Web applications for different ...
Check if given two straight lines are identical or not
07 Jun, 2022 Given two straight lines with co-efficients of there equations a1x + b1y + c1 = 0 and a2x + b2y + c2 = 0 respectively, the task is to check if the straight lines are identical or not. Examples: Input: a1 = -2, b1 = 4, c1 = 3, a2 = -6, b2 = 12, c2 = 9 Output: The given straight lines are identicalInput: a1...
[ { "code": null, "e": 28, "s": 0, "text": "\n07 Jun, 2022" }, { "code": null, "e": 223, "s": 28, "text": "Given two straight lines with co-efficients of there equations a1x + b1y + c1 = 0 and a2x + b2y + c2 = 0 respectively, the task is to check if the straight lines are identical...
Output of Java program | Set 28
30 Aug, 2017 Question 1. What is the output of the following question? class Test { int a = 10; static int b = 20; public static void main(String[] args) { Test t1 = new Test(); t1.a = 100; t1.b = 200; Test t2 = new Test(); System.out.println("t1.a =" + t1.a + " t1.b ...
[ { "code": null, "e": 52, "s": 24, "text": "\n30 Aug, 2017" }, { "code": null, "e": 110, "s": 52, "text": "Question 1. What is the output of the following question?" }, { "code": "class Test { int a = 10; static int b = 20; public static void main(String[] args) ...
How to remove gutter space for a specific div in Bootstrap ?
28 Nov, 2019 To remove gutter space for a specific div, first we must know what is gutter space. In Bootstrap 4, There are 12 columns in the grid system each column has a small space in between that space is known as gutter space. Gutter Space has width 30px (15px on each side of a column). The Following Approach will ...
[ { "code": null, "e": 28, "s": 0, "text": "\n28 Nov, 2019" }, { "code": null, "e": 352, "s": 28, "text": "To remove gutter space for a specific div, first we must know what is gutter space. In Bootstrap 4, There are 12 columns in the grid system each column has a small space in be...
Multidimensional Array in R
22 Apr, 2020 Arrays are the R data objects which can store data in more than two dimensions. For example: If we create an array of dimensions (2, 3, 4) then it creates 4 rectangular matrices each with 2 rows and 3 columns. These types of arrays are called Multidimensional Arrays. Arrays can store only data types. An ar...
[ { "code": null, "e": 28, "s": 0, "text": "\n22 Apr, 2020" }, { "code": null, "e": 330, "s": 28, "text": "Arrays are the R data objects which can store data in more than two dimensions. For example: If we create an array of dimensions (2, 3, 4) then it creates 4 rectangular matric...
numpy.array_equal() in Python
29 Nov, 2018 numpy.array_equal(arr1, arr2) : This logical function that checks if two arrays have the same shape and elements. Parameters : arr1 : [array_like]Input array or object whose elements, we need to test. arr2 : [array_like]Input array or object whose elements, we need to test. Return : True, if both ar...
[ { "code": null, "e": 28, "s": 0, "text": "\n29 Nov, 2018" }, { "code": null, "e": 142, "s": 28, "text": "numpy.array_equal(arr1, arr2) : This logical function that checks if two arrays have the same shape and elements." }, { "code": null, "e": 155, "s": 142, "...
Python | super() in single inheritance
17 Oct, 2019 Prerequisites: Inheritance, function overriding At a fairly abstract level, super() provides the access to those methods of the super-class (parent class) which have been overridden in a sub-class (child class) that inherits from it. Consider the code example given below, here we have a class named Square ...
[ { "code": null, "e": 54, "s": 26, "text": "\n17 Oct, 2019" }, { "code": null, "e": 102, "s": 54, "text": "Prerequisites: Inheritance, function overriding" }, { "code": null, "e": 426, "s": 102, "text": "At a fairly abstract level, super() provides the access t...
JavaScript | Break and Continue
06 Mar, 2019 Break statement: The break statement is used to jump out of a loop. It can be used to “jump out” of a switch() statement. It breaks the loop and continues executing the code after the loop. Example: <!DOCTYPE html><html> <head> <title> JavaScript Break statement </title> </h...
[ { "code": null, "e": 54, "s": 26, "text": "\n06 Mar, 2019" }, { "code": null, "e": 244, "s": 54, "text": "Break statement: The break statement is used to jump out of a loop. It can be used to “jump out” of a switch() statement. It breaks the loop and continues executing the code ...
How to set Text on the Label in C#?
30 Jun, 2019 In Windows Forms, Label control is used to display text on the form and it does not take part in user input or in mouse or keyboard events. You are allowed to set the text in the Label control using the Text Property. It makes your label more attractive. You can set this property using two different method...
[ { "code": null, "e": 28, "s": 0, "text": "\n30 Jun, 2019" }, { "code": null, "e": 338, "s": 28, "text": "In Windows Forms, Label control is used to display text on the form and it does not take part in user input or in mouse or keyboard events. You are allowed to set the text in ...
How to deep-freeze an object in JavaScript ?
22 Jul, 2021 In this article, we will see what is the problem with objects in JavaScript and why we need to “deep-freeze” an object in JavaScript. We will also learn how to “deep-freeze” an object in JavaScript. Problem with Object in JavaScript: We all know that JavaScript objects are mutable. How can we make them imm...
[ { "code": null, "e": 28, "s": 0, "text": "\n22 Jul, 2021" }, { "code": null, "e": 227, "s": 28, "text": "In this article, we will see what is the problem with objects in JavaScript and why we need to “deep-freeze” an object in JavaScript. We will also learn how to “deep-freeze” a...
What is callback hell in Node.js ?
11 May, 2020 To know what is callback hell, we have to start from Synchronous and Asynchronous Javascript. What is Synchronous Javascript?In Synchronous Javascript, when we run the code, the result is returned as soon as the browser can do. Only one operation can happen at a time because it is single-threaded. So, all ...
[ { "code": null, "e": 54, "s": 26, "text": "\n11 May, 2020" }, { "code": null, "e": 148, "s": 54, "text": "To know what is callback hell, we have to start from Synchronous and Asynchronous Javascript." }, { "code": null, "e": 426, "s": 148, "text": "What is Syn...
How to validate a Date in ReactJS?
16 Dec, 2020 Data validation is an important step in every application in order to authenticate the user’s entered data which can be used to calculate the date of birth or any other use. It can be achieved using the validator module in ReactJS. The following example shows how to validate the user entered data and check...
[ { "code": null, "e": 28, "s": 0, "text": "\n16 Dec, 2020" }, { "code": null, "e": 412, "s": 28, "text": "Data validation is an important step in every application in order to authenticate the user’s entered data which can be used to calculate the date of birth or any other use. I...
PoseNet Pose Estimation
23 Jun, 2022 Pose estimation refers to computer vision techniques that detect persons or objects in images and video so that one could determine , for example, where someone’s elbow shown up in an image. Pose Estimation techniques have many applications such as Gesture Control, Action Recognition and also in the field ...
[ { "code": null, "e": 52, "s": 24, "text": "\n23 Jun, 2022" }, { "code": null, "e": 595, "s": 52, "text": "Pose estimation refers to computer vision techniques that detect persons or objects in images and video so that one could determine , for example, where someone’s elbow shown...
PHP | usort() Function
01 Jun, 2020 PHP comes with a number of built-in functions that are used to sort arrays in an easier way. Here, we are going to discuss a new function usort(). The usort() function in PHP sorts a given array by using a user-defined comparison function. This function is useful in case if we want to sort the array in a n...
[ { "code": null, "e": 53, "s": 25, "text": "\n01 Jun, 2020" }, { "code": null, "e": 494, "s": 53, "text": "PHP comes with a number of built-in functions that are used to sort arrays in an easier way. Here, we are going to discuss a new function usort(). The usort() function in PHP...
How To Use Seaborn Color Palette to Color Boxplot?
12 Nov, 2020 Box Plot is the visual representation of the depicting groups of numerical data through their quartiles. Boxplot is also used to detect the outlier in the data set. It captures the summary of the data efficiently with a simple box and whiskers and allows us to compare easily across groups. Adding the righ...
[ { "code": null, "e": 52, "s": 24, "text": "\n12 Nov, 2020" }, { "code": null, "e": 344, "s": 52, "text": "Box Plot is the visual representation of the depicting groups of numerical data through their quartiles. Boxplot is also used to detect the outlier in the data set. It captur...
Node.js Connect Mysql with Node app
10 Jun, 2022 In this article, we will learn how to connect the Mysql database to the NodeJs application. Before we go deep into the coding part, let’s get a brief introduction about these technologies: NodeJs: An open-source platform for executing javascript code on the server side. Also a javascript runtime built on C...
[ { "code": null, "e": 53, "s": 25, "text": "\n10 Jun, 2022" }, { "code": null, "e": 242, "s": 53, "text": "In this article, we will learn how to connect the Mysql database to the NodeJs application. Before we go deep into the coding part, let’s get a brief introduction about these...
Find maximum meetings in one room
23 Jun, 2022 There is one meeting room in a firm. There are N meetings in the form of (S[i], F[i]) where S[i] is the start time of meeting i and F[i] is the finish time of meeting i. The task is to find the maximum number of meetings that can be accommodated in the meeting room. Print all meeting numbers Examples: Inp...
[ { "code": null, "e": 54, "s": 26, "text": "\n23 Jun, 2022" }, { "code": null, "e": 347, "s": 54, "text": "There is one meeting room in a firm. There are N meetings in the form of (S[i], F[i]) where S[i] is the start time of meeting i and F[i] is the finish time of meeting i. The ...
Performing Google Search using Python code - GeeksforGeeks
24 Nov, 2021 Let’s say you are working on a project that needs to do web scraping but you don’t know websites on which scraping is to be performed beforehand instead you are required to perform a google search and then proceed according to google search results to a few websites. In that case, you need google search re...
[ { "code": null, "e": 24872, "s": 24844, "text": "\n24 Nov, 2021" }, { "code": null, "e": 25213, "s": 24872, "text": "Let’s say you are working on a project that needs to do web scraping but you don’t know websites on which scraping is to be performed beforehand instead you are re...
How to create horizontal legend using ggplot2 in R?
The default legend direction is vertical but it can be changed to horizontal as well and for this purpose we can use legend.direction argument of theme function of ggplot2 package. For example, if we want to create a bar chart with x as categories and y as frequencies tjat are contained in a data frame df then the bar ...
[ { "code": null, "e": 1452, "s": 1062, "text": "The default legend direction is vertical but it can be changed to horizontal as well and for this purpose we can use legend.direction argument of theme function of ggplot2 package. For example, if we want to create a bar chart with x as categories and y...
Creating Box Plots in Excel - GeeksforGeeks
29 Jun, 2021 Box plot is a statistical plot that helps in data visualization. It is used to show the distribution of numerical data using various quartiles. They are as follows : Lower Extreme: It is the minimum value in the data set which is at the end of the whisker.First Quartile: It is also known as lower quartile ...
[ { "code": null, "e": 24653, "s": 24625, "text": "\n29 Jun, 2021" }, { "code": null, "e": 24819, "s": 24653, "text": "Box plot is a statistical plot that helps in data visualization. It is used to show the distribution of numerical data using various quartiles. They are as follows...
Counting number of paragraphs in text file using java
We can read paragraphs in a file by reading it in a string and then spilting based on "\r\n" pattern. See the example below − Consider the following text file in the classpath. test.txt This is Line 1 This is Line 2 This is Line 3 This is Line 4 This is Line 5 This is Line 6 This is Line 7 This is Line 8 This is Li...
[ { "code": null, "e": 1188, "s": 1062, "text": "We can read paragraphs in a file by reading it in a string and then spilting based on \"\\r\\n\" pattern. See the example below −" }, { "code": null, "e": 1239, "s": 1188, "text": "Consider the following text file in the classpath." ...
numpy.eye() in Python - GeeksforGeeks
04 Aug, 2021 numpy.eye(R, C = None, k = 0, dtype = type <‘float’>) : –The eye tool returns a 2-D array with 1’s as the diagonal and 0’s elsewhere. The diagonal can be main, upper, or lower depending on the optional parameter k. A positive k is for the upper diagonal, a negative k is for the lower, and a 0 k (default...
[ { "code": null, "e": 24659, "s": 24631, "text": "\n04 Aug, 2021" }, { "code": null, "e": 24994, "s": 24659, "text": "numpy.eye(R, C = None, k = 0, dtype = type <‘float’>) : –The eye tool returns a 2-D array with 1’s as the diagonal and 0’s elsewhere. The diagonal can be main, u...
Read Messy Excel Files Like a Pro | by Tim Meehan | Towards Data Science
As data scientists, we often interface with non-technical colleagues. When they provide data in the form of a spreadsheet, they probably don’t think about how pd.read_excel() will perform on our end, it’s just not their job to format their data to favor our tech stack. Luckily, there are ways we can remedy this using p...
[ { "code": null, "e": 441, "s": 171, "text": "As data scientists, we often interface with non-technical colleagues. When they provide data in the form of a spreadsheet, they probably don’t think about how pd.read_excel() will perform on our end, it’s just not their job to format their data to favor o...
acos() function in C++ STL
The acos() function returns the inverse cosine of an angle given in radians. It is an inbuilt function in C++ STL. The syntax of the acos() function is given as follows. acos(var) As can be seen from the syntax, the function acos() accepts a parameter var of data type float, double or long double. The value of this par...
[ { "code": null, "e": 1177, "s": 1062, "text": "The acos() function returns the inverse cosine of an angle given in radians. It is an inbuilt function in C++ STL." }, { "code": null, "e": 1232, "s": 1177, "text": "The syntax of the acos() function is given as follows." }, { ...
How to Slice Sequences in Python. Become an expert on slicing lists and strings in Python. | Towards Data Science
Being able to efficiently slice sequences in Python (such as lists, strings, and tuples) is one of the most crucial skills to have when programming. Luckily, python provides indexing syntax that greatly facilitates the slicing process and makes it much more intuitive. In this tutorial, we will first review how to index...
[ { "code": null, "e": 440, "s": 171, "text": "Being able to efficiently slice sequences in Python (such as lists, strings, and tuples) is one of the most crucial skills to have when programming. Luckily, python provides indexing syntax that greatly facilitates the slicing process and makes it much mo...
Don’t Use Python OS Library Any More When Pathlib Can Do | by Christopher Tao | Towards Data Science
In recent years, Python is known by a lot more people who are not programmers. This is not only because of its popularity in the area of Machine Learning but also because it could be used to automate a lot of repetitive works such as bulk editing files with certain patterns. In one of my previous articles (as follows),...
[ { "code": null, "e": 448, "s": 172, "text": "In recent years, Python is known by a lot more people who are not programmers. This is not only because of its popularity in the area of Machine Learning but also because it could be used to automate a lot of repetitive works such as bulk editing files wi...
MySQL - DECLARE ... HANDLER Statement
While working with stored procedures in MySQL if an exception or occurs the execution of the procedure terminates abruptly, to avoid this you need to handle the exceptions in MYSQL. MySQL provides a handler to handle the exceptions in the stored procedures. You can handle these exceptions by declaring a handler using t...
[ { "code": null, "e": 2515, "s": 2333, "text": "While working with stored procedures in MySQL if an exception or occurs the execution of the procedure terminates abruptly, to avoid this you need to handle the exceptions in MYSQL." }, { "code": null, "e": 2693, "s": 2515, "text": "...
Spring Boot - Quick Start
This chapter will teach you how to create a Spring Boot application using Maven and Gradle. Your system need to have the following minimum requirements to create a Spring Boot application − Java 7 Maven 3.2 Gradle 2.5 The Spring Boot CLI is a command line tool and it allows us to run the Groovy scripts. This is the eas...
[ { "code": null, "e": 3117, "s": 3025, "text": "This chapter will teach you how to create a Spring Boot application using Maven and Gradle." }, { "code": null, "e": 3215, "s": 3117, "text": "Your system need to have the following minimum requirements to create a Spring Boot applic...
Python program to Get Month Name from Month Number - GeeksforGeeks
09 May, 2021 Given a datetime object or month number, the task is to write a Python program to get the corresponding month name from it. Examples: Input : test_date = datetime(2020, 4, 8) Output : April Explanation : 4th Month is April. Input : test_date = datetime(2020, 1, 8) Output : January Explanation : 1st Month ...
[ { "code": null, "e": 24212, "s": 24184, "text": "\n09 May, 2021" }, { "code": null, "e": 24337, "s": 24212, "text": "Given a datetime object or month number, the task is to write a Python program to get the corresponding month name from it. " }, { "code": null, "e": 2...
How to change the background color using jQuery?
To change the background color using jQuery, use the jQuery css() property. We will change background color on mouse hover with the jQuery on() and css() method. You can try to run the following code to learn how to change background color using jQuery: Live Demo <!DOCTYPE html> <html> <head> <script src="https://ajax...
[ { "code": null, "e": 1225, "s": 1062, "text": "To change the background color using jQuery, use the jQuery css() property. We will change background color on mouse hover with the jQuery on() and css() method. " }, { "code": null, "e": 1317, "s": 1225, "text": "You can try to run ...
How to Write/create a JSON array using Java?
A Json array is an ordered collection of values that are enclosed in square brackets i.e. it begins with ‘[’ and ends with ‘]’. The values in the arrays are separated by ‘,’ (comma). { "books": [ Java, JavaFX, Hbase, Cassandra, WebGL, JOGL] } The json-simple is a light weight library which is used to process JSON ob...
[ { "code": null, "e": 1245, "s": 1062, "text": "A Json array is an ordered collection of values that are enclosed in square brackets i.e. it begins with ‘[’ and ends with ‘]’. The values in the arrays are separated by ‘,’ (comma)." }, { "code": null, "e": 1308, "s": 1245, "text": ...
Finding The Biggest Key In A Python Dictionary?
If you have a dict with string-integer mappings, you can use the max method on the dictionary's item pairs to get the largest value. d = { 'foo': 100, 'bar': 25, 'baz': 360 } print(max(k for k, v in d.items())) This will give the output − foo foo is largest in alphabetical order.
[ { "code": null, "e": 1196, "s": 1062, "text": "If you have a dict with string-integer mappings, you can use the max method on the dictionary's item pairs to get the largest value. " }, { "code": null, "e": 1283, "s": 1196, "text": "d = {\n 'foo': 100,\n 'bar': 25,\n 'baz': ...
Deep learning for Arabic part-of-speech tagging | by Adham Ehab | Towards Data Science
In this post, I will explain Long short-term memory network (aka . LSTM) and How it’s used in natural language processing in solving the sequence modeling task while building an Arabic part-of-speech tagger based on Universal Dependancy Tree Bank. This post is part of a series in building a python package for Arabic na...
[ { "code": null, "e": 557, "s": 172, "text": "In this post, I will explain Long short-term memory network (aka . LSTM) and How it’s used in natural language processing in solving the sequence modeling task while building an Arabic part-of-speech tagger based on Universal Dependancy Tree Bank. This po...
How to create Immutable class in Java? - GeeksforGeeks
15 Dec, 2021 Immutable class in java means that once an object is created, we cannot change its content. In Java, all the wrapper classes (like Integer, Boolean, Byte, Short) and String class is immutable. We can create our own immutable class as well. Prior to going ahead do go through characteristics of immutability ...
[ { "code": null, "e": 24896, "s": 24868, "text": "\n15 Dec, 2021" }, { "code": null, "e": 25303, "s": 24896, "text": "Immutable class in java means that once an object is created, we cannot change its content. In Java, all the wrapper classes (like Integer, Boolean, Byte, Short) a...
C++ program for length of a string using recursion
Given with the string and the task is to calculate the length of the given string using a user defined function or in-built function. Length of a string can be calculated using two different ways − Using user defined function − In this, traverse the entire string until ‘\o’ is found and keep incrementing the value by 1...
[ { "code": null, "e": 1196, "s": 1062, "text": "Given with the string and the task is to calculate the length of the given string using a user defined function or in-built function." }, { "code": null, "e": 1260, "s": 1196, "text": "Length of a string can be calculated using two d...
TypeScript - Array pop()
pop() method removes the last element from an array and returns that element. array.pop(); Returns the removed element from the array. var numbers = [1, 4, 9]; var element = numbers.pop(); console.log("element is : " + element ); var element = numbers.pop(); console.log("element is : " + ele...
[ { "code": null, "e": 2126, "s": 2048, "text": "pop() method removes the last element from an array and returns that element." }, { "code": null, "e": 2140, "s": 2126, "text": "array.pop();\n" }, { "code": null, "e": 2184, "s": 2140, "text": "Returns the remove...
Python - Plot a Histogram for Pandas Dataframe with Matplotlib?
Histogram is a representation of the distribution of data. To plot a Histogram, use the hist() method. At first, import both the libraries − import pandas as pd import matplotlib.pyplot as plt Create a DataFrame with 2 columns − dataFrame = pd.DataFrame({ "Car": ['BMW', 'Lexus', 'Tesla', 'Mustang', 'Mercedes', 'Jagu...
[ { "code": null, "e": 1328, "s": 1187, "text": "Histogram is a representation of the distribution of data. To plot a Histogram, use the hist() method. At first, import both the libraries −" }, { "code": null, "e": 1380, "s": 1328, "text": "import pandas as pd\nimport matplotlib.py...
PHP rand() Function
06 Dec, 2021 In this article, we will see how to get the random number using the rand() function in PHP, along with knowing its implementation through the example. The rand() is an inbuilt function in PHP used to generate a random number ie., it can generate a random integer value in the range [min, max]. Syntax: rand(...
[ { "code": null, "e": 53, "s": 25, "text": "\n06 Dec, 2021" }, { "code": null, "e": 347, "s": 53, "text": "In this article, we will see how to get the random number using the rand() function in PHP, along with knowing its implementation through the example. The rand() is an inbuil...