title stringlengths 3 221 | text stringlengths 17 477k | parsed listlengths 0 3.17k |
|---|---|---|
CART: Classification and Regression Trees for Clean but Powerful Models | by Saul Dobilas | Towards Data Science | If you want to be a successful Data Scientist, it is essential to understand how different Machine Learning algorithms work.
This story is part of the series that explains the nuances of each algorithm and provides a range of Python examples to help you build your own ML models. Not to mention some cool 3D visualizatio... | [
{
"code": null,
"e": 297,
"s": 172,
"text": "If you want to be a successful Data Scientist, it is essential to understand how different Machine Learning algorithms work."
},
{
"code": null,
"e": 496,
"s": 297,
"text": "This story is part of the series that explains the nuances of... |
Can we define a parameterized constructor in an abstract class in Java? | Yes, we can define a parameterized constructor in an abstract class.
We need to make sure that the class which is extending an abstract class have a constructor and it can call the superclass parameterized constructor.
We can call the superclass parameterized constructor in a subclass by using super() call.
If we are n... | [
{
"code": null,
"e": 1131,
"s": 1062,
"text": "Yes, we can define a parameterized constructor in an abstract class."
},
{
"code": null,
"e": 1281,
"s": 1131,
"text": "We need to make sure that the class which is extending an abstract class have a constructor and it can call the s... |
What is the maximum size of list in Python? | Maximum length of a list is platform dependent and depends upon address space and/or RAM. The maxsize constant defined in sys module returns 263-1 on 64 bit system.
>>> import sys
>>> sys.maxsize
9223372036854775807
The largest positive integer supported by the platform's Py_ssize_t type, is the maximum size lists, ... | [
{
"code": null,
"e": 1227,
"s": 1062,
"text": "Maximum length of a list is platform dependent and depends upon address space and/or RAM. The maxsize constant defined in sys module returns 263-1 on 64 bit system."
},
{
"code": null,
"e": 1281,
"s": 1227,
"text": ">>> import sys\n>... |
Distributed DBMS - Replication Control | This chapter looks into replication control, which is required to maintain consistent data in all sites. We will study the replication control techniques and the algorithms required for replication control.
As discussed earlier, replication is a technique used in distributed databases to store multiple copies of a data... | [
{
"code": null,
"e": 2430,
"s": 2223,
"text": "This chapter looks into replication control, which is required to maintain consistent data in all sites. We will study the replication control techniques and the algorithms required for replication control."
},
{
"code": null,
"e": 2716,
... |
Python | Split flatten String List - GeeksforGeeks | 07 Feb, 2022
Sometimes, while working with Python Strings, we can have problem in which we need to perform the split of strings on a particular deliminator. In this, we might need to flatten this to a single String List. Lets discuss certain ways in which this task can be performed.Method #1 : Using list comprehension ... | [
{
"code": null,
"e": 23901,
"s": 23873,
"text": "\n07 Feb, 2022"
},
{
"code": null,
"e": 24399,
"s": 23901,
"text": "Sometimes, while working with Python Strings, we can have problem in which we need to perform the split of strings on a particular deliminator. In this, we might n... |
logger - Unix, Linux Command | Options:
The
logger
utility exits 0 on success, and >0 if an error occurs.
Valid facility names are: auth, authpriv (for security information of
a sensitive nature), cron, daemon, ftp, kern, lpr, mail, news,
security (deprecated synonym for auth), syslog, user, uucp, and local0
to local7, inclusive.
Valid leve... | [
{
"code": null,
"e": 10588,
"s": 10577,
"text": "\nOptions:\n"
},
{
"code": null,
"e": 10659,
"s": 10590,
"text": "\nThe\n logger\nutility exits 0 on success, and >0 if an error occurs.\n"
},
{
"code": null,
"e": 10887,
"s": 10659,
"text": "\nValid facility na... |
C# Orderby Descending | Use Orderby descending in C# to sort elements in descending order.
The following is our list −
IList<Employee> emp = new List<Employee>() {
new Employee() { EmployeeRank = 3, EmpName = "Tom", EmpMarks = 90 } ,
new Employee() { EmployeeRank = 4, EmpName = "Katie", EmpMarks = 95 }
};
Now to sort the list according to Stu... | [
{
"code": null,
"e": 1129,
"s": 1062,
"text": "Use Orderby descending in C# to sort elements in descending order."
},
{
"code": null,
"e": 1157,
"s": 1129,
"text": "The following is our list −"
},
{
"code": null,
"e": 1345,
"s": 1157,
"text": "IList<Employee> ... |
Average of even numbers till a given even number? | To find the average of even numbers till a given even number, we will add all the even number till the given number and t count the number of even numbers. Then divide the sum by the number of even numbers.
Average of even numbers till 10 is 6 i.e.
2 + 4 + 6 + 8 + 10 = 30 => 30/ 5 = 6
There are two methods for calculat... | [
{
"code": null,
"e": 1269,
"s": 1062,
"text": "To find the average of even numbers till a given even number, we will add all the even number till the given number and t count the number of even numbers. Then divide the sum by the number of even numbers."
},
{
"code": null,
"e": 1311,
... |
Best Time to Buy and Sell Stock in Python | Suppose we have an array A, here A[i] is indicating the price of a given stock on day i. We have to find the maximum profit. We can complete at most one transaction. (Transaction means to buy and sell stocks). But we have to keep in mind that we may not engage in multiple transactions at the same time. So we have to se... | [
{
"code": null,
"e": 1422,
"s": 1062,
"text": "Suppose we have an array A, here A[i] is indicating the price of a given stock on day i. We have to find the maximum profit. We can complete at most one transaction. (Transaction means to buy and sell stocks). But we have to keep in mind that we may not... |
C library function - tanh() | The C library function double tanh(double x) returns the hyperbolic tangent of x.
Following is the declaration for tanh() function.
double tanh(double x)
x − This is the floating point value.
x − This is the floating point value.
This function returns hyperbolic tangent of x.
The following example shows the usage of ta... | [
{
"code": null,
"e": 2089,
"s": 2007,
"text": "The C library function double tanh(double x) returns the hyperbolic tangent of x."
},
{
"code": null,
"e": 2139,
"s": 2089,
"text": "Following is the declaration for tanh() function."
},
{
"code": null,
"e": 2161,
"s"... |
PDF Processing with Python. The way to extract text from your pdf... | by Ahmed Khemiri | Towards Data Science | Being a high-level, interpreted language with a relatively easy syntax, Python is perfect even for those who don’t have prior programming experience. Popular Python libraries are well integrated and provide the solution to handle unstructured data sources like Pdf and could be used to make it more sensible and useful.
... | [
{
"code": null,
"e": 491,
"s": 171,
"text": "Being a high-level, interpreted language with a relatively easy syntax, Python is perfect even for those who don’t have prior programming experience. Popular Python libraries are well integrated and provide the solution to handle unstructured data sources... |
Find the Nth term of the series 5, 13, 37, 109, 325, . . . - GeeksforGeeks | 28 Jan, 2022
Given a positive integer N. The task is to find Nth term of the series 5, 13, 37, 109, 325, .....
Examples:
Input: N = 5Output: 325Explanation: From the sequence it can be seen that the 5th term is 325
Input: N = 1Output: 5Explanation: The 1st term of the given sequence is 5
Approach: The sequence formed ... | [
{
"code": null,
"e": 26350,
"s": 26322,
"text": "\n28 Jan, 2022"
},
{
"code": null,
"e": 26448,
"s": 26350,
"text": "Given a positive integer N. The task is to find Nth term of the series 5, 13, 37, 109, 325, ....."
},
{
"code": null,
"e": 26458,
"s": 26448,
"... |
Creating a Grocery Product Recommender for Instacart | by Alex Ellman | Towards Data Science | In the ecommerce shopping experience product recommendations come in many forms: they may be used to recommend other products on one product’s page (Amazon’s “Frequently bought together” feature for instance) or they may be used on the checkout page to show customers products they may be interested in based on their to... | [
{
"code": null,
"e": 576,
"s": 172,
"text": "In the ecommerce shopping experience product recommendations come in many forms: they may be used to recommend other products on one product’s page (Amazon’s “Frequently bought together” feature for instance) or they may be used on the checkout page to sh... |
MomentJS - Is After | This method gives true or false if the given moment is after another moment.
moment().isAfter(Moment|String|Number|Date|Array);
moment().isAfter(Moment|String|Number|Date|Array, String);
var isafter = moment().isAfter();
If no param to isAfter it considers it as the current date. It gives the output as false since the... | [
{
"code": null,
"e": 2037,
"s": 1960,
"text": "This method gives true or false if the given moment is after another moment."
},
{
"code": null,
"e": 2148,
"s": 2037,
"text": "moment().isAfter(Moment|String|Number|Date|Array);\nmoment().isAfter(Moment|String|Number|Date|Array, Str... |
Python 3 - String count() Method | The count() method returns the number of occurrences of substring sub in the range [start, end]. Optional arguments start and end are interpreted as in slice notation.
Following is the syntax for count() method −
str.count(sub, start = 0,end = len(string))
sub − This is the substring to be searched.
sub − This is the ... | [
{
"code": null,
"e": 2508,
"s": 2340,
"text": "The count() method returns the number of occurrences of substring sub in the range [start, end]. Optional arguments start and end are interpreted as in slice notation."
},
{
"code": null,
"e": 2553,
"s": 2508,
"text": "Following is t... |
Different types of image shapes & Corners used in Bootstrap 4 - GeeksforGeeks | 07 Oct, 2021
In this article, we will learn how to make different image shapes using Bootstrap & will also understand its implementation through the examples. Bootstrap offers different classes for images to make their appearance better and also to make them responsive. Making an image responsive means it should scale ... | [
{
"code": null,
"e": 25644,
"s": 25616,
"text": "\n07 Oct, 2021"
},
{
"code": null,
"e": 26235,
"s": 25644,
"text": "In this article, we will learn how to make different image shapes using Bootstrap & will also understand its implementation through the examples. Bootstrap offers ... |
Python | shutil.which() method - GeeksforGeeks | 25 Jun, 2019
Shutil module in Python provides many functions of high-level operations on files and collections of files. It comes under Python’s standard utility modules. This module helps in automating process of copying and removal of files and directories.shutil.which() method tells the path to an executable applica... | [
{
"code": null,
"e": 23901,
"s": 23873,
"text": "\n25 Jun, 2019"
},
{
"code": null,
"e": 24342,
"s": 23901,
"text": "Shutil module in Python provides many functions of high-level operations on files and collections of files. It comes under Python’s standard utility modules. This ... |
Sorting Elements of an Array by Frequency | Practice | GeeksforGeeks | Given an array A[] of integers, sort the array according to frequency of elements. That is elements that have higher frequency come first. If frequencies of two elements are same, then smaller number comes first.
Input:
The first line of input contains an integer T denoting the number of test cases. The description of ... | [
{
"code": null,
"e": 451,
"s": 238,
"text": "Given an array A[] of integers, sort the array according to frequency of elements. That is elements that have higher frequency come first. If frequencies of two elements are same, then smaller number comes first."
},
{
"code": null,
"e": 773,
... |
C++ mutable keyword? | Mutable data members are those members whose values can be changed in runtime even if the object is of constant type. It is just opposite to constant.
Sometimes logic required to use only one or two data member as a variable and another one as a constant to handle the data. In that situation, mutability is very helpful... | [
{
"code": null,
"e": 1213,
"s": 1062,
"text": "Mutable data members are those members whose values can be changed in runtime even if the object is of constant type. It is just opposite to constant."
},
{
"code": null,
"e": 1410,
"s": 1213,
"text": "Sometimes logic required to use... |
3 Best metrics to evaluate Regression Model? | by Songhao Wu | Towards Data Science | Model evaluation is very important in data science. It helps you to understand the performance of your model and makes it easy to present your model to other people. There are many different evaluation metrics out there but only some of them are suitable to be used for regression. This article will cover the different ... | [
{
"code": null,
"e": 668,
"s": 172,
"text": "Model evaluation is very important in data science. It helps you to understand the performance of your model and makes it easy to present your model to other people. There are many different evaluation metrics out there but only some of them are suitable ... |
Consistency levels in Cassandra - GeeksforGeeks | 03 Feb, 2020
In this article, we are going to discuss consistency levels in Cassandra which is very helpful for high availability and high mechanism in Cassandra. let’s discuss one by one.
First here, we are going to define the scenario of keyspace in which we will show how we have a different data center and each data... | [
{
"code": null,
"e": 24028,
"s": 24000,
"text": "\n03 Feb, 2020"
},
{
"code": null,
"e": 24204,
"s": 24028,
"text": "In this article, we are going to discuss consistency levels in Cassandra which is very helpful for high availability and high mechanism in Cassandra. let’s discuss... |
RIOT.JS - Tags | RIOT works by building custom, reusable html tags. These tags are similar to Web components and are reusable across pages and web apps. When you include the RIOT framework in your HTML page, the imported js creates a riot variable pointing to a riot object. This object contains the functions which is required to intera... | [
{
"code": null,
"e": 2225,
"s": 1852,
"text": "RIOT works by building custom, reusable html tags. These tags are similar to Web components and are reusable across pages and web apps. When you include the RIOT framework in your HTML page, the imported js creates a riot variable pointing to a riot obj... |
How to create a download progress bar in Tkinter? | Let’s suppose that we are creating an application which interacts with sources and files such as downloading the files, tracking the file. In order to make a progressbar for such an application, we will use the tkinter.ttk package that includes the Progressbar module.
Initially, we will instantiate an object of Progres... | [
{
"code": null,
"e": 1331,
"s": 1062,
"text": "Let’s suppose that we are creating an application which interacts with sources and files such as downloading the files, tracking the file. In order to make a progressbar for such an application, we will use the tkinter.ttk package that includes the Prog... |
Python - Concatenate Strings in the Given Order - GeeksforGeeks | 06 Nov, 2021
Given a String List and order list, perform string concatenation in a specific order.
Input : test_list = [“best”, “Gfg”, “for”, “is”], sort_order = [1, 3, 0, 2] Output : Gfgisbestfor Explanation : Combined as per order of indices.
Input : test_list = [“best”, “Gfg”], sort_order = [1, 0] Output : Gfgbest E... | [
{
"code": null,
"e": 26103,
"s": 26075,
"text": "\n06 Nov, 2021"
},
{
"code": null,
"e": 26189,
"s": 26103,
"text": "Given a String List and order list, perform string concatenation in a specific order."
},
{
"code": null,
"e": 26335,
"s": 26189,
"text": "Inpu... |
std::distance in C++ - GeeksforGeeks | 30 Nov, 2021
If we have two iterators and we want to find the total no. of elements between the two iterators, then that is facilitated by std::distance(), defined inside the header file .It has an important feature that just like we have vectors in science, which have both magnitude and direction, std::distance also h... | [
{
"code": null,
"e": 25369,
"s": 25341,
"text": "\n30 Nov, 2021"
},
{
"code": null,
"e": 25957,
"s": 25369,
"text": "If we have two iterators and we want to find the total no. of elements between the two iterators, then that is facilitated by std::distance(), defined inside the h... |
Python | Pandas Timestamp.date - GeeksforGeeks | 08 Jan, 2019
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 Timestamp.date() function return a datetime object with same year, month and day as th... | [
{
"code": null,
"e": 26057,
"s": 26029,
"text": "\n08 Jan, 2019"
},
{
"code": null,
"e": 26271,
"s": 26057,
"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 a... |
NLP | Part of Speech - Default Tagging - GeeksforGeeks | 11 Apr, 2022
What is Part-of-speech (POS) tagging ? It is a process of converting a sentence to forms – list of words, list of tuples (where each tuple is having a form (word, tag)). The tag in case of is a part-of-speech tag, and signifies whether the word is a noun, adjective, verb, and so on. Default tagging is a b... | [
{
"code": null,
"e": 25741,
"s": 25713,
"text": "\n11 Apr, 2022"
},
{
"code": null,
"e": 26382,
"s": 25741,
"text": "What is Part-of-speech (POS) tagging ? It is a process of converting a sentence to forms – list of words, list of tuples (where each tuple is having a form (word, ... |
Using Custom JavaScript Modules as Static Resources in Salesforce Orgs | by Lynn Zheng | Towards Data Science | This tutorial will walk you through integrating your custom JavaScript modules with Salesforce Lightning Web Components and use them in Salesforce Orgs.
A Salesforce org is a customer-facing platform that contains Salesforce data.
A lightning web component is essentially a Web Component that uses Salesforce-branded sty... | [
{
"code": null,
"e": 332,
"s": 179,
"text": "This tutorial will walk you through integrating your custom JavaScript modules with Salesforce Lightning Web Components and use them in Salesforce Orgs."
},
{
"code": null,
"e": 410,
"s": 332,
"text": "A Salesforce org is a customer-fa... |
Combine bar and line chart in ggplot2 in R - GeeksforGeeks | 24 Jun, 2021
Sometimes while dealing with hierarchical data we need to combine two or more various chart types into a single chart for better visualization and analysis. These are known as “Combination charts”. In this article, we are going to see how to combine a bar chart and a line chart in R Programming Language us... | [
{
"code": null,
"e": 24851,
"s": 24823,
"text": "\n24 Jun, 2021"
},
{
"code": null,
"e": 25171,
"s": 24851,
"text": "Sometimes while dealing with hierarchical data we need to combine two or more various chart types into a single chart for better visualization and analysis. These ... |
Complete Introduction to PySpark-Part 4 | by Himanshu Sharma | Towards Data Science | Data Visualization plays an important role in data analysis because as soon as the human eyes see some charts or graphs they try finding the patterns in that graph.
Data Visualization is visually representing the data using different plots/graphs/charts to find out the pattern, outliers, and relation between different ... | [
{
"code": null,
"e": 337,
"s": 172,
"text": "Data Visualization plays an important role in data analysis because as soon as the human eyes see some charts or graphs they try finding the patterns in that graph."
},
{
"code": null,
"e": 559,
"s": 337,
"text": "Data Visualization is... |
What is an array in Java? | An array is a data structure/container/object that stores a fixed-size sequential collection of elements of the same type. The size/length of the array is determined at the time of creation.
The position of the elements in the array is called as index or subscript. The first element of the array is stored at the index ... | [
{
"code": null,
"e": 1253,
"s": 1062,
"text": "An array is a data structure/container/object that stores a fixed-size sequential collection of elements of the same type. The size/length of the array is determined at the time of creation."
},
{
"code": null,
"e": 1437,
"s": 1253,
... |
Mixture modelling from scratch, in R | by Arnaud M. | Towards Data Science | In the Machine Learning literature, K-means and Gaussian Mixture Models (GMM) are the first clustering / unsupervised models described [1–3], and as such, should be part of any data scientist’s toolbox. In R, one can use kmeans(), Mclust() or other similar functions, but to fully understand those algorithms, one needs ... | [
{
"code": null,
"e": 755,
"s": 172,
"text": "In the Machine Learning literature, K-means and Gaussian Mixture Models (GMM) are the first clustering / unsupervised models described [1–3], and as such, should be part of any data scientist’s toolbox. In R, one can use kmeans(), Mclust() or other simila... |
MongoDB regex to display records whose first five letters are uppercase? | Let us first create a collection with documents −
> db.upperCaseFiveLetterDemo.insertOne({"StudentFullName":"JOHN Smith"});
{
"acknowledged" : true,
"insertedId" : ObjectId("5cd7edef1a844af18acdffb2")
}
> db.upperCaseFiveLetterDemo.insertOne({"StudentFullName":"SAM Williams"});
{
"acknowledged" : true,
"ins... | [
{
"code": null,
"e": 1112,
"s": 1062,
"text": "Let us first create a collection with documents −"
},
{
"code": null,
"e": 1913,
"s": 1112,
"text": "> db.upperCaseFiveLetterDemo.insertOne({\"StudentFullName\":\"JOHN Smith\"});\n{\n \"acknowledged\" : true,\n \"insertedId\" : O... |
for loop in Objective-C | A for loop is a repetition control structure that allows you to efficiently write a loop that needs to execute a specific number of times.
The syntax of a for loop in Objective-C programming language is −
for( init; condition; increment ) {
statement(s);
}
Here is the flow of control in a for loop −
The init step is... | [
{
"code": null,
"e": 2699,
"s": 2560,
"text": "A for loop is a repetition control structure that allows you to efficiently write a loop that needs to execute a specific number of times."
},
{
"code": null,
"e": 2765,
"s": 2699,
"text": "The syntax of a for loop in Objective-C pro... |
Lambda and filter in Python Examples | In this article, we will learn about lambda expressions and filter() functions in Python 3.x. Or earlier. These functions are present in the built-in Python standard library.
An inline function may be defined by the help of lambda expressions. A lambda expression consists of the lambda keyword followed by a comma seper... | [
{
"code": null,
"e": 1237,
"s": 1062,
"text": "In this article, we will learn about lambda expressions and filter() functions in Python 3.x. Or earlier. These functions are present in the built-in Python standard library."
},
{
"code": null,
"e": 1493,
"s": 1237,
"text": "An inli... |
Where does Array stored in JVM memory in Java? | Array is a container which can hold a fix number of entities, which are of the of the same type. Each entity of an array is known as element and, the position of each element is indicated by an integer (starting from 0) value known as index.
import java.util.Arrays;
public class ArrayExample {
public static void mai... | [
{
"code": null,
"e": 1304,
"s": 1062,
"text": "Array is a container which can hold a fix number of entities, which are of the of the same type. Each entity of an array is known as element and, the position of each element is indicated by an integer (starting from 0) value known as index."
},
{
... |
PHP - session_unset() Function | Sessions or session handling is a way to make the data available across various pages of a web application. The session_unset() function releases all the variables in the current sessions.
session_unset();
This function does not accept any parameters.
This function returns a boolean value which is TRUE if the session ... | [
{
"code": null,
"e": 2946,
"s": 2757,
"text": "Sessions or session handling is a way to make the data available across various pages of a web application. The session_unset() function releases all the variables in the current sessions."
},
{
"code": null,
"e": 2964,
"s": 2946,
"t... |
How to print Colored text in C++ - GeeksforGeeks | 01 Jun, 2020
In C++ programming, the background of the output screen is black and text color is in white color. We can color both the background and text color in the output screen in the following ways.
Header File:
#include <windows.h>
or
#include <stdlib.h>
Syntax:
system("Color XY")
In the above command to c... | [
{
"code": null,
"e": 24668,
"s": 24640,
"text": "\n01 Jun, 2020"
},
{
"code": null,
"e": 24859,
"s": 24668,
"text": "In C++ programming, the background of the output screen is black and text color is in white color. We can color both the background and text color in the output sc... |
How to Annotate a Specific Cluster or Group in ggplot2 in R? - GeeksforGeeks | 28 Nov, 2021
The ggplot method in R Programming Language is used to do graph visualizations using the specified dataframe. It is used to instantiate a ggplot object. Aesthetic mappings can be created to the plot object to determine the relationship between the x and y-axis respectively. Additional components can be add... | [
{
"code": null,
"e": 26487,
"s": 26459,
"text": "\n28 Nov, 2021"
},
{
"code": null,
"e": 26827,
"s": 26487,
"text": "The ggplot method in R Programming Language is used to do graph visualizations using the specified dataframe. It is used to instantiate a ggplot object. Aesthetic ... |
numpy.around() in Python - GeeksforGeeks | 29 Nov, 2018
numpy.around(arr, decimals = 0, out = None) : This mathematical function helps user to evenly round array elements to the given number of decimals.
Parameters :
array : [array_like] Input array.decimal : [int, optional] Decimal places we want to round off.
Default = 0. In case of -ve decimal, it specifies ... | [
{
"code": null,
"e": 25451,
"s": 25423,
"text": "\n29 Nov, 2018"
},
{
"code": null,
"e": 25599,
"s": 25451,
"text": "numpy.around(arr, decimals = 0, out = None) : This mathematical function helps user to evenly round array elements to the given number of decimals."
},
{
"... |
How to get the <div> height using JavaScript ? - GeeksforGeeks | 07 Nov, 2019
Method 1: Using the offsetHeight property: The offsetHeight property of an element is a read-only property and used to return the height of an element in pixels. It includes any borders or padding of the element. This property can be used to find the height of the <div> element.
Syntax:
divElement.offsetHe... | [
{
"code": null,
"e": 26861,
"s": 26833,
"text": "\n07 Nov, 2019"
},
{
"code": null,
"e": 27141,
"s": 26861,
"text": "Method 1: Using the offsetHeight property: The offsetHeight property of an element is a read-only property and used to return the height of an element in pixels. I... |
Convert a String to Integer Array in C/C++ | In this tutorial, we will be discussing a program to understand how to convert a string into integer array in C/C++.
For this we will create a new array. Traverse through the given string, if the character is a comma “,”, we move on to the next character else add it to the new array.
Live Demo
#include <bits/stdc++.h>... | [
{
"code": null,
"e": 1179,
"s": 1062,
"text": "In this tutorial, we will be discussing a program to understand how to convert a string into integer array in C/C++."
},
{
"code": null,
"e": 1347,
"s": 1179,
"text": "For this we will create a new array. Traverse through the given s... |
Android - Entity Relationship in Room - GeeksforGeeks | 11 May, 2022
This article describes how to define the relationship between entities in the Room persistence library. Because SQLite is a relational database, entities can be related to one another. Entities in Room cannot directly reference other entities because doing so may result in the loading of unnecessary data e... | [
{
"code": null,
"e": 26491,
"s": 26463,
"text": "\n11 May, 2022"
},
{
"code": null,
"e": 26932,
"s": 26491,
"text": "This article describes how to define the relationship between entities in the Room persistence library. Because SQLite is a relational database, entities can be re... |
ES6 - Array.find | This function returns the value of the first element in the array that satisfies the provided testing function. Otherwise undefined is returned.
Given below is the syntax for the array method find(), where, thisArg is an optional object to use as this when executing the callback and callback is the function to execute ... | [
{
"code": null,
"e": 2422,
"s": 2277,
"text": "This function returns the value of the first element in the array that satisfies the provided testing function. Otherwise undefined is returned."
},
{
"code": null,
"e": 2661,
"s": 2422,
"text": "Given below is the syntax for the arr... |
Number of cells in a matrix that satisfy the given condition - GeeksforGeeks | 10 Jun, 2021
Given an N * N grid consisting of empty cells (denoted by ‘1’) and obstacles (denoted by ‘0’), the task is to find the number of empty cells in which a mirror can be placed to view the east-side view of grid from the south-side. Examples:
Input: mat[][] = { {1, 1, 1}, {1, 1, 0}, {1, 0, 1}} Output: 2
On... | [
{
"code": null,
"e": 26195,
"s": 26167,
"text": "\n10 Jun, 2021"
},
{
"code": null,
"e": 26436,
"s": 26195,
"text": "Given an N * N grid consisting of empty cells (denoted by ‘1’) and obstacles (denoted by ‘0’), the task is to find the number of empty cells in which a mirror can ... |
How to create Vertical Navigation Bar using HTML and CSS ? - GeeksforGeeks | 14 Sep, 2021
After reading this article, you will be able to build your own vertical navigation bar. To follow this article you only need some basic understanding of HTML and CSS.
Let us start writing our vertical navigation bar, first, we will write the structure of the navigation bar. In this tutorial, we create the ... | [
{
"code": null,
"e": 25296,
"s": 25268,
"text": "\n14 Sep, 2021"
},
{
"code": null,
"e": 25463,
"s": 25296,
"text": "After reading this article, you will be able to build your own vertical navigation bar. To follow this article you only need some basic understanding of HTML and C... |
Backward iteration in Python | Sometimes we need to go through the elements of a list in backward order. To achieve this we need to read the last element first and then the last but one and so on till the element at index 0. Various python programming features can be used to achieve this.
We are using the range function but starting with the positio... | [
{
"code": null,
"e": 1321,
"s": 1062,
"text": "Sometimes we need to go through the elements of a list in backward order. To achieve this we need to read the last element first and then the last but one and so on till the element at index 0. Various python programming features can be used to achieve ... |
Create a Data Frame of all the Combinations of Vectors passed as Argument in R Programming - expand.grid() Function - GeeksforGeeks | 05 Jun, 2020
expand.grid() function in R Language is used to create a data frame with all the values that can be formed with the combinations of all the vectors or factors passed to the function as argument.
Syntax: expand.grid(...)
Parameters:...: Vector1, Vector2, Vector3, ...
Example 1:
# R program to create a dataf... | [
{
"code": null,
"e": 26223,
"s": 26195,
"text": "\n05 Jun, 2020"
},
{
"code": null,
"e": 26418,
"s": 26223,
"text": "expand.grid() function in R Language is used to create a data frame with all the values that can be formed with the combinations of all the vectors or factors pass... |
Find the maximum possible value of a[i] % a[j] over all pairs of i and j - GeeksforGeeks | 19 May, 2021
Given an array arr[] of N positive integers. The task is to find the maximum possible value of a[i] % a[j] over all pairs of i and j. Examples:
Input: arr[] = {4, 5, 1, 8} Output: 5 If we choose the pair (5, 8), then 5 % 8 gives us 5 which is the maximum possible. Input: arr[] = {7, 7, 8, 8, 1} Output: 7... | [
{
"code": null,
"e": 26201,
"s": 26173,
"text": "\n19 May, 2021"
},
{
"code": null,
"e": 26347,
"s": 26201,
"text": "Given an array arr[] of N positive integers. The task is to find the maximum possible value of a[i] % a[j] over all pairs of i and j. Examples: "
},
{
"co... |
Conversion constructor in C++? | In this section we will see what is the conversion constructor in C++ class. A
constructor is a special type of function of class. It has some unique property like, its
name will be same as class name, it will not return any value etc. The constructors
are used to construct objects of a class. Sometimes constructors ma... | [
{
"code": null,
"e": 1446,
"s": 1062,
"text": "In this section we will see what is the conversion constructor in C++ class. A\nconstructor is a special type of function of class. It has some unique property like, its\nname will be same as class name, it will not return any value etc. The constructor... |
How do we assign values to variables in a list using a loop in Python? | Python’s built-in list class has append() method. We can get user input and add it to list till user presses Enter key. An infinite while loop contains input() function and append() method
L=[]
while True:
item=input("enter new item")
if item=='':
break
L.append(item)
print ("List : ",L) | [
{
"code": null,
"e": 1251,
"s": 1062,
"text": "Python’s built-in list class has append() method. We can get user input and add it to list till user presses Enter key. An infinite while loop contains input() function and append() method"
},
{
"code": null,
"e": 1361,
"s": 1251,
"t... |
PySpark - RDD | Now that we have installed and configured PySpark on our system, we can program in Python on Apache Spark. However before doing so, let us understand a fundamental concept in Spark - RDD.
RDD stands for Resilient Distributed Dataset, these are the elements that run and operate on multiple nodes to do parallel processin... | [
{
"code": null,
"e": 1993,
"s": 1805,
"text": "Now that we have installed and configured PySpark on our system, we can program in Python on Apache Spark. However before doing so, let us understand a fundamental concept in Spark - RDD."
},
{
"code": null,
"e": 2393,
"s": 1993,
"te... |
Is it possible to have multiple try blocks with only one catch block in java? | An exception is an issue (run time error) occurred during the execution of a program. When an exception occurred the program gets terminated abruptly and, the code past the line that generated the exception never gets executed.
import java.util.Scanner;
public class ExceptionExample {
public static void main(String ... | [
{
"code": null,
"e": 1290,
"s": 1062,
"text": "An exception is an issue (run time error) occurred during the execution of a program. When an exception occurred the program gets terminated abruptly and, the code past the line that generated the exception never gets executed."
},
{
"code": nul... |
Predicting Apple Stock Prices with Neural Networks | by Soner Yıldırım | Towards Data Science | Stock price prediction is definitely not an easy task as there are many factors that need to be taken into consideration. Overall market conditions, competitors’ performance, new product releases, temper of global relations are just some key factors that have potential to increase or decrease stock prices. In addition ... | [
{
"code": null,
"e": 595,
"s": 171,
"text": "Stock price prediction is definitely not an easy task as there are many factors that need to be taken into consideration. Overall market conditions, competitors’ performance, new product releases, temper of global relations are just some key factors that ... |
VBScript Class Objects | Class is a construct that is used to define a unique type. Like Object Oriented Programming, VbScript 5.0 supports the creation of classes and it is very similar to writing COM objects with VB.
Class is simply the template for an object and we instantiate an object to access the properties and methods of it. Classes ca... | [
{
"code": null,
"e": 2274,
"s": 2080,
"text": "Class is a construct that is used to define a unique type. Like Object Oriented Programming, VbScript 5.0 supports the creation of classes and it is very similar to writing COM objects with VB."
},
{
"code": null,
"e": 2452,
"s": 2274,
... |
Wrap Strings of Text in Bootstrap Navbar | To wrap strings of text in an element using the class .navbar-text.
You can try to run the following code to set text in Bootstrap Navbar −
Live Demo
<!DOCTYPE html>
<html>
<head>
<title>Bootstrap Example</title>
<link href = "/bootstrap/css/bootstrap.min.css" rel = "stylesheet">
<script src = "/sc... | [
{
"code": null,
"e": 1130,
"s": 1062,
"text": "To wrap strings of text in an element using the class .navbar-text."
},
{
"code": null,
"e": 1202,
"s": 1130,
"text": "You can try to run the following code to set text in Bootstrap Navbar −"
},
{
"code": null,
"e": 1212,... |
How can we create a MySQL view by using data from multiple tables? | MySQL UNION operator can combine two or more result sets hence we can use UNION operator to create a view having data from multiple tables. To understand this concept we are using the base tables ‘Student_info’ and ‘Student_detail’ having the following data −
mysql> Select * from Student_info;
+------+---------+-------... | [
{
"code": null,
"e": 1322,
"s": 1062,
"text": "MySQL UNION operator can combine two or more result sets hence we can use UNION operator to create a view having data from multiple tables. To understand this concept we are using the base tables ‘Student_info’ and ‘Student_detail’ having the following ... |
Blur and anonymize faces with OpenCV and Python - GeeksforGeeks | 12 Nov, 2021
In this article, we are going to see how to Blur and anonymize faces with OpenCV and Python.
For this, we will be using Cascade Classifier to detect the faces. Make sure to download the same, from this link: haarcascade_frontalface_default.xml
Firstly, we use a built face detection algorithm, to detect the... | [
{
"code": null,
"e": 24292,
"s": 24264,
"text": "\n12 Nov, 2021"
},
{
"code": null,
"e": 24385,
"s": 24292,
"text": "In this article, we are going to see how to Blur and anonymize faces with OpenCV and Python."
},
{
"code": null,
"e": 24536,
"s": 24385,
"text"... |
How to make a simple lollipop plot in Matplotlib? | To make a simple lollipop plot in Matplotlib, we can take the following steps −
Set the figure size and adjust the padding between and around the subplots.
Set the figure size and adjust the padding between and around the subplots.
Make a dataframe, df, of two-dimensional, size-mutable, potentially heterogeneous tabula... | [
{
"code": null,
"e": 1142,
"s": 1062,
"text": "To make a simple lollipop plot in Matplotlib, we can take the following steps −"
},
{
"code": null,
"e": 1218,
"s": 1142,
"text": "Set the figure size and adjust the padding between and around the subplots."
},
{
"code": null... |
Find the path from root to the given nodes of a tree for multiple queries - GeeksforGeeks | 06 Sep, 2021
Given a tree with N vertices numbered from 0 to N – 1 (0th node is the root node). Also, given q queries containing nodes in the tree. The task is to find the path from the root node to the given node for multiple queries.
Examples:
Input: N = 6, q[] = {2, 4}
Tree:
0
... | [
{
"code": null,
"e": 24301,
"s": 24273,
"text": "\n06 Sep, 2021"
},
{
"code": null,
"e": 24524,
"s": 24301,
"text": "Given a tree with N vertices numbered from 0 to N – 1 (0th node is the root node). Also, given q queries containing nodes in the tree. The task is to find the path... |
How you can get a true/false from a Python regular expressions? | When you use match and search methods of module re, if there is a match, it has bool value of True and if there is no match, you get None that has a bool value of False.
Match objects are always true, and None is returned if there is no match
>>> bool(re.search("def", "abcdefgh"))
True
>>> bool(re.search("rest", "pqrst... | [
{
"code": null,
"e": 1232,
"s": 1062,
"text": "When you use match and search methods of module re, if there is a match, it has bool value of True and if there is no match, you get None that has a bool value of False."
},
{
"code": null,
"e": 1305,
"s": 1232,
"text": "Match object... |
Blending two images with HTML5 canvas | To blend, you need to perform blending of two images in proportion 50-50.
Let us see how:
<img src="Tutorial1.jpg" id="Tutorial One">
<img src="Tutorial2.jpg" id="Tutorial Two">
<p>Blended image<br>
<canvas id="canvas"></canvas></p>
<script>
window.onload = function () {
var myImg1 = document.getElementById(... | [
{
"code": null,
"e": 1136,
"s": 1062,
"text": "To blend, you need to perform blending of two images in proportion 50-50."
},
{
"code": null,
"e": 1152,
"s": 1136,
"text": "Let us see how:"
},
{
"code": null,
"e": 2162,
"s": 1152,
"text": "<img src=\"Tutorial1.... |
How to connect Jupyter Notebook to remote spark clusters and run spark jobs every day? | by Teng Peng | Towards Data Science | As a data scientist, you are developing notebooks that process large data that does not fit in your laptop using Spark. What would you do? This is not a trivial problem.
Let’s start with the most naive solution without install anything on your laptop.
“No notebook”: SSH into the remote clusters and use Spark shell on t... | [
{
"code": null,
"e": 217,
"s": 47,
"text": "As a data scientist, you are developing notebooks that process large data that does not fit in your laptop using Spark. What would you do? This is not a trivial problem."
},
{
"code": null,
"e": 299,
"s": 217,
"text": "Let’s start with ... |
LALR Parser (with Examples) - GeeksforGeeks | 24 Jun, 2021
LALR Parser :LALR Parser is lookahead LR parser. It is the most powerful parser which can handle large classes of grammar. The size of CLR parsing table is quite large as compared to other parsing table. LALR reduces the size of this table.LALR works similar to CLR. The only difference is , it combines th... | [
{
"code": null,
"e": 24053,
"s": 24025,
"text": "\n24 Jun, 2021"
},
{
"code": null,
"e": 24567,
"s": 24053,
"text": "LALR Parser :LALR Parser is lookahead LR parser. It is the most powerful parser which can handle large classes of grammar. The size of CLR parsing table is quite ... |
Check if array is sorted | Practice | GeeksforGeeks | Given an array arr[] of size N, check if it is sorted in non-decreasing order or not.
Example 1:
Input:
N = 5
arr[] = {10, 20, 30, 40, 50}
Output: 1
Explanation: The given array is sorted.
Example 2:
Input:
N = 6
arr[] = {90, 80, 100, 70, 40, 30}
Output: 0
Explanation: The given array is not sorted.
Your Task:
You d... | [
{
"code": null,
"e": 325,
"s": 238,
"text": "Given an array arr[] of size N, check if it is sorted in non-decreasing order or not. "
},
{
"code": null,
"e": 336,
"s": 325,
"text": "Example 1:"
},
{
"code": null,
"e": 429,
"s": 336,
"text": "Input:\nN = 5\narr[... |
JSF - h:selectOneMenu | The h:selectOneMenu tag renders an HTML input element of the type "select" with size not specified.
<h:selectOneMenu value = "#{userData.data}">
<f:selectItem itemValue = "1" itemLabel = "Item 1" />
<f:selectItem itemValue = "2" itemLabel = "Item 2" />
</h:selectOneMenu>
<select name = "j_idt6:j_idt8">
... | [
{
"code": null,
"e": 2052,
"s": 1952,
"text": "The h:selectOneMenu tag renders an HTML input element of the type \"select\" with size not specified."
},
{
"code": null,
"e": 2237,
"s": 2052,
"text": "<h:selectOneMenu value = \"#{userData.data}\"> \n <f:selectItem itemValue = \"... |
Functions that cannot be overloaded in C++ - GeeksforGeeks | 03 Sep, 2018
In C++, following function declarations cannot be overloaded.
1) Function declarations that differ only in the return type. For example, the following program fails in compilation.
#include<iostream>int foo() { return 10; } char foo() { return 'a'; } int main(){ char x = foo(); getchar(); retur... | [
{
"code": null,
"e": 24478,
"s": 24450,
"text": "\n03 Sep, 2018"
},
{
"code": null,
"e": 24540,
"s": 24478,
"text": "In C++, following function declarations cannot be overloaded."
},
{
"code": null,
"e": 24659,
"s": 24540,
"text": "1) Function declarations tha... |
How do I get the src of an image in Selenium? | We can get the source of an image in Selenium. An image in an html document has <img> tagname. Each image also has an attribute src which contains the source of image in the page.
To fetch any attribute in Selenium, we have to use the getAttribute() method. The method takes the attribute name as a parameter. So to get ... | [
{
"code": null,
"e": 1242,
"s": 1062,
"text": "We can get the source of an image in Selenium. An image in an html document has <img> tagname. Each image also has an attribute src which contains the source of image in the page."
},
{
"code": null,
"e": 1439,
"s": 1242,
"text": "To... |
How to create a dynamic array of integers in C++ using the new keyword | In C++, a dynamic array can be created using new keyword and can be deleted it by using delete keyword.
Let us consider a simple example of it.
Live Demo
#include<iostream>
using namespace std;
int main() {
int i,n;
cout<<"Enter total number of elements:"<<"\n";
cin>>n;
int *a = new int(n);
cout<<"Enter... | [
{
"code": null,
"e": 1166,
"s": 1062,
"text": "In C++, a dynamic array can be created using new keyword and can be deleted it by using delete keyword."
},
{
"code": null,
"e": 1206,
"s": 1166,
"text": "Let us consider a simple example of it."
},
{
"code": null,
"e": 1... |
ASP.NET - LINQ | Most applications are data-centric, however most of the data repositories are relational databases. Over the years, designers and developers have designed applications based on object models.
The objects are responsible for connecting to the data access components - called the Data Access Layer (DAL). Here we have thre... | [
{
"code": null,
"e": 2539,
"s": 2347,
"text": "Most applications are data-centric, however most of the data repositories are relational databases. Over the years, designers and developers have designed applications based on object models."
},
{
"code": null,
"e": 2689,
"s": 2539,
... |
Find the sum of digits of a number at even and odd places - GeeksforGeeks | 22 Jun, 2021
Given a number N, the task is to find the sum of digits of a number at even and odd places.
Examples:
Input: N = 54873 Output: Sum odd = 16 Sum even = 11
Input: N = 457892 Output: Sum odd = 20 Sum even = 15
Approach:
First, calculate the reverse of the given number.
To the reverse number we apply modu... | [
{
"code": null,
"e": 25588,
"s": 25560,
"text": "\n22 Jun, 2021"
},
{
"code": null,
"e": 25680,
"s": 25588,
"text": "Given a number N, the task is to find the sum of digits of a number at even and odd places."
},
{
"code": null,
"e": 25691,
"s": 25680,
"text":... |
How to concatenate two Integer values into one? - GeeksforGeeks | 01 Apr, 2021
Given two integers n1 and n2, the task is to concatenate these two integers into one integer.Example:
Input: n1 = 12, n2 = 34
Output: 1234
Input: n1 = 1, n2 = 93
Output: 193
Approach: The simplest approach to do this is:
Convert both numbers to string
Concatenate both strings into one, as this is co... | [
{
"code": null,
"e": 24572,
"s": 24544,
"text": "\n01 Apr, 2021"
},
{
"code": null,
"e": 24676,
"s": 24572,
"text": "Given two integers n1 and n2, the task is to concatenate these two integers into one integer.Example: "
},
{
"code": null,
"e": 24749,
"s": 24676,... |
Scrapy: This is how to successfully login with ease | by Aaron S | Towards Data Science | Once you understand the basics of Scrapy one of the first complication is having to deal with logins. To do this its useful to get an understanding of how logging in works and how you can observe that process in your browser. We will go through this and how scrapy deals with the login process in this article.
How to us... | [
{
"code": null,
"e": 483,
"s": 172,
"text": "Once you understand the basics of Scrapy one of the first complication is having to deal with logins. To do this its useful to get an understanding of how logging in works and how you can observe that process in your browser. We will go through this and h... |
Python 3 - Lists | The most basic data structure in Python is the sequence. Each element of a sequence is assigned a number - its position or index. The first index is zero, the second index is one, and so forth.
Python has six built-in types of sequences, but the most common ones are lists and tuples, which we would see in this tutorial... | [
{
"code": null,
"e": 2534,
"s": 2340,
"text": "The most basic data structure in Python is the sequence. Each element of a sequence is assigned a number - its position or index. The first index is zero, the second index is one, and so forth."
},
{
"code": null,
"e": 2662,
"s": 2534,
... |
Find maximum (or minimum) in Binary Tree in C++ | In this problem, we are given a binary tree. Our task is to Find maximum (or minimum) in Binary Tree.
Problem Description: We need to find the nodes of the binary tree that have maximum and minimum value in the binary tree.
Let’s take an example to understand the problem,
Input:
Output: max = 9 , min = 1
We need to ... | [
{
"code": null,
"e": 1165,
"s": 1062,
"text": "In this problem, we are given a binary tree. Our task is to Find maximum (or minimum) in Binary Tree. "
},
{
"code": null,
"e": 1287,
"s": 1165,
"text": "Problem Description: We need to find the nodes of the binary tree that have max... |
Fetching rows updated at timestamp older than 1 day in MySQL? | For this,yYou can use from_unixtime() along with now().
Let us create a table with some data type −
mysql> create table demo75
-> (
-> due_date int(11)
-> );
Query OK, 0 rows affected, 1 warning (2.87
Insert some records into the table with the help of insert command −
mysql> insert into demo75 values(unix_tim... | [
{
"code": null,
"e": 1118,
"s": 1062,
"text": "For this,yYou can use from_unixtime() along with now()."
},
{
"code": null,
"e": 1162,
"s": 1118,
"text": "Let us create a table with some data type −"
},
{
"code": null,
"e": 1272,
"s": 1162,
"text": "mysql> crea... |
Basics of Insurance Pricing. with a quick intro to GLM models | by Samuel Tober | Towards Data Science | In this article the basics of insurance pricing will be explained: Why pricing is so important, what happens if the pricing strategy is out of line, and how insurance companies set their premiums using statistical modelling. In the final section a very simple case study using real insurance data is presented to put som... | [
{
"code": null,
"e": 547,
"s": 172,
"text": "In this article the basics of insurance pricing will be explained: Why pricing is so important, what happens if the pricing strategy is out of line, and how insurance companies set their premiums using statistical modelling. In the final section a very si... |
Tryit Editor v3.7 | Tryit: HTML basic table | [] |
Java - String contentEquals() Method | This method returns true if and only if this String represents the same sequence of characters as specified in StringBuffer.
Here is the syntax of this method −
public boolean contentEquals(StringBuffer sb)
Here is the detail of parameters −
sb − the StringBuffer to compare.
sb − the StringBuffer to compare.
This meth... | [
{
"code": null,
"e": 2502,
"s": 2377,
"text": "This method returns true if and only if this String represents the same sequence of characters as specified in StringBuffer."
},
{
"code": null,
"e": 2538,
"s": 2502,
"text": "Here is the syntax of this method −"
},
{
"code":... |
Declare variable as constant in C | Variables can be declared as constant using the const keyword or the #define preprocessor directive. Details about these are given as follows.
Variables can be declared as constants by using the “const” keyword before the datatype of the variable. The constant variables can be initialized once only. The default value o... | [
{
"code": null,
"e": 1205,
"s": 1062,
"text": "Variables can be declared as constant using the const keyword or the #define preprocessor directive. Details about these are given as follows."
},
{
"code": null,
"e": 1413,
"s": 1205,
"text": "Variables can be declared as constants ... |
Python - Variable Types | Variables are nothing but reserved memory locations to store values. This means that when you create a variable you reserve some space in memory.
Based on the data type of a variable, the interpreter allocates memory and decides what can be stored in the reserved memory. Therefore, by assigning different data types to ... | [
{
"code": null,
"e": 2390,
"s": 2244,
"text": "Variables are nothing but reserved memory locations to store values. This means that when you create a variable you reserve some space in memory."
},
{
"code": null,
"e": 2642,
"s": 2390,
"text": "Based on the data type of a variable... |
Python - Filter Duplicate Words | Many times, we have a need of analysing the text only for the unique words present in the file. So, we need to eliminate the duplicate words from the text. This is achieved by using the word tokenization and set functions available in nltk.
In the below example we first tokenize the sentence into words. Then we apply ... | [
{
"code": null,
"e": 2829,
"s": 2587,
"text": "Many times, we have a need of analysing the text only for the unique words present in the file. So, we need to eliminate the duplicate words from the text. This is achieved by using the word tokenization and set functions available in nltk. "
},
{
... |
How to send Email on Android using JavaMail API? | This example demonstrates how to send Email on Android using JavaMail API.
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"?>
<LinearLayou... | [
{
"code": null,
"e": 1137,
"s": 1062,
"text": "This example demonstrates how to send Email on Android using JavaMail API."
},
{
"code": null,
"e": 1266,
"s": 1137,
"text": "Step 1 − Create a new project in Android Studio, go to File ⇒ New Project and fill all required details to ... |
ISRO | ISRO CS 2018 | Question 53 - GeeksforGeeks | 08 Jun, 2019
Consider the following C code segment
int f (int x)
{
if (x < 1) return 1;
else return (f(x-1) + g(x))
}
int g (int x)
{
if (x < 2) return 2;
else return (f(x-1) + g(x/2));
}
Of the following, which best describes the growth of f(x) as a function of x?
(A) Linear(B) Exponential(C... | [
{
"code": null,
"e": 27245,
"s": 27217,
"text": "\n08 Jun, 2019"
},
{
"code": null,
"e": 27283,
"s": 27245,
"text": "Consider the following C code segment"
},
{
"code": null,
"e": 27447,
"s": 27283,
"text": "int f (int x)\n{\n if (x < 1) return 1;\n ... |
How to Create Custom Camera using CameraX in Android? - GeeksforGeeks | 19 Feb, 2021
CameraX is used to create a custom camera in the app. CameraX is a Jetpack support library, built to help you make camera app development easier. A sample video is given below to get an idea about what we are going to do in this article. Note that we are going to implement this project using the Kotlin lan... | [
{
"code": null,
"e": 24725,
"s": 24697,
"text": "\n19 Feb, 2021"
},
{
"code": null,
"e": 25039,
"s": 24725,
"text": "CameraX is used to create a custom camera in the app. CameraX is a Jetpack support library, built to help you make camera app development easier. A sample video is... |
Autoencoder neural networks: what and how? | by Jake Krajewski | Towards Data Science | Preface
I’ll be walking through the creation of an autoencoder using Keras and Python. First, I’ll address what an autoencoder is and how would we possibly implement one. Then I’ll go through steps of actually creating one. Probably going to use MNIST because it’s generic and simple.
Introduction: What is an autoencode... | [
{
"code": null,
"e": 180,
"s": 172,
"text": "Preface"
},
{
"code": null,
"e": 457,
"s": 180,
"text": "I’ll be walking through the creation of an autoencoder using Keras and Python. First, I’ll address what an autoencoder is and how would we possibly implement one. Then I’ll go th... |
Minimum Cost Maximum Flow from a Graph using Bellman Ford Algorithm | 23 Feb, 2022
Given a source node S, a sink node T, two matrices Cap[ ][ ] and Cost[ ][ ] representing a graph, where Cap[i][j] is the capacity of a directed edge from node i to node j and cost[i][j] is the cost of sending one unit of flow along a directed edge from node i to node j, the task is to find a flow with the ... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n23 Feb, 2022"
},
{
"code": null,
"e": 416,
"s": 52,
"text": "Given a source node S, a sink node T, two matrices Cap[ ][ ] and Cost[ ][ ] representing a graph, where Cap[i][j] is the capacity of a directed edge from node i to node j and... |
Python | Convert dictionary object into string | 21 Jul, 2021
Dictionary is an important container and used almost in every code of day-day programming as well as web-development, more it is used, more is the requirement to master it and hence knowledge of its operations is necessary.Let’s see the different ways of changing dictionary into string.Methods #1: Using js... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n21 Jul, 2021"
},
{
"code": null,
"e": 467,
"s": 28,
"text": "Dictionary is an important container and used almost in every code of day-day programming as well as web-development, more it is used, more is the requirement to master it and... |
Python | Pandas dataframe.idxmin() | 19 Nov, 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 dataframe.idxmin() function returns index of first occurrence of minimum over requeste... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n19 Nov, 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... |
How to validate form using Regular Expression in JavaScript ? | 21 Sep, 2021
JavaScript is a scripting programming language that also helps in validating the user’s information. Have you ever heard about validating forms? Here comes into the picture JavaScript, the Scripting language which is used for validations and verification. To get deeper into this topic let us understand wit... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n21 Sep, 2021"
},
{
"code": null,
"e": 371,
"s": 52,
"text": "JavaScript is a scripting programming language that also helps in validating the user’s information. Have you ever heard about validating forms? Here comes into the picture J... |
time.process_time() function in Python | 18 Apr, 2019
time.process_time() function always returns the float value of time in seconds. Return the value (in fractional seconds) of the sum of the system and user CPU time of the current process. It does not include time elapsed during sleep. The reference point of the returned value is undefined, so that only the... | [
{
"code": null,
"e": 53,
"s": 25,
"text": "\n18 Apr, 2019"
},
{
"code": null,
"e": 423,
"s": 53,
"text": "time.process_time() function always returns the float value of time in seconds. Return the value (in fractional seconds) of the sum of the system and user CPU time of the cur... |
How to Remove Duplicates From Array Using VBA in Excel? | 09 Nov, 2021
Excel VBA code to remove duplicates from a given range of cells. In the below data set we have given a list of 15 numbers in “Column A” range A1:A15. Need to remove duplicates and place unique numbers in column B.
Sample Data: Cells A1:A15
Sample Data
Final Output:
VBA Code to remove duplicates and place ... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n09 Nov, 2021"
},
{
"code": null,
"e": 243,
"s": 28,
"text": "Excel VBA code to remove duplicates from a given range of cells. In the below data set we have given a list of 15 numbers in “Column A” range A1:A15. Need to remove duplicate... |
Tail Recursion | 28 Feb, 2022
What is tail recursion? A recursive function is tail recursive when a recursive call is the last thing executed by the function. For example the following C++ function print() is tail recursive.
C
Java
Python3
C#
Javascript
// An example of tail recursive functionvoid print(int n){ if (n < 0) return; ... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n28 Feb, 2022"
},
{
"code": null,
"e": 248,
"s": 52,
"text": "What is tail recursion? A recursive function is tail recursive when a recursive call is the last thing executed by the function. For example the following C++ function print(... |
fwrite() Vs write() | 03 Aug, 2021
Overview:C has two sets of binary stream files for reading and writing in UNIX: fread() and fwrite(). fwrite() is a function that writes to a FILE*, which is a (possibly) buffered stdio stream. The ISO C standard specifies it. Furthermore, fwrite() is thread-safe to a degree on POSIX platforms. The POSIX s... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n03 Aug, 2021"
},
{
"code": null,
"e": 638,
"s": 28,
"text": "Overview:C has two sets of binary stream files for reading and writing in UNIX: fread() and fwrite(). fwrite() is a function that writes to a FILE*, which is a (possibly) buff... |
Maximum Occurrence in a Given Range | 11 Jul, 2022
Given an array of n integers in non-decreasing order. Find the number of occurrences of the most frequent value within a given range.Examples:
Input : arr[] = {-5, -5, 2, 2, 2, 2, 3, 7, 7, 7}
Query 1: start = 0, end = 9
Query 2: start = 4, end = 9
Output : 4
3
Explanation:
Quer... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n11 Jul, 2022"
},
{
"code": null,
"e": 197,
"s": 52,
"text": "Given an array of n integers in non-decreasing order. Find the number of occurrences of the most frequent value within a given range.Examples: "
},
{
"code": null,
... |
Python Pandas – get_dummies() method | 13 Oct, 2020
pandas.get_dummies() is used for data manipulation. It converts categorical data into dummy or indicator variables.
syntax: pandas.get_dummies(data, prefix=None, prefix_sep=’_’, dummy_na=False, columns=None, sparse=False, drop_first=False, dtype=None)
Parameters:
data: whose data is to be manipulated.
pre... | [
{
"code": null,
"e": 53,
"s": 25,
"text": "\n13 Oct, 2020"
},
{
"code": null,
"e": 169,
"s": 53,
"text": "pandas.get_dummies() is used for data manipulation. It converts categorical data into dummy or indicator variables."
},
{
"code": null,
"e": 306,
"s": 169,
... |
numpy.expm1() in Python | 29 Nov, 2018
numpy.expm1(array, out = None, where = True, casting = ‘same_kind’, order = ‘K’, dtype = None) :This mathematical function helps user to calculate exponential of all the elements subtracting 1 from all the input array elements.
Parameters :
array : [array_like]Input array or object whose elements, we ne... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n29 Nov, 2018"
},
{
"code": null,
"e": 256,
"s": 28,
"text": "numpy.expm1(array, out = None, where = True, casting = ‘same_kind’, order = ‘K’, dtype = None) :This mathematical function helps user to calculate exponential of all the eleme... |
Barchart with vertical labels in Python/Matplotlib | First, we can create bars using plt.bar and using xticks. Then, we can align the labels by setting the “vertical” or “horizontal” attributes in the “rotation” key.
Make lists, bars_heights, and bars_label, with numbers.
Make lists, bars_heights, and bars_label, with numbers.
Make a bar plot using bar() method, with bar... | [
{
"code": null,
"e": 1226,
"s": 1062,
"text": "First, we can create bars using plt.bar and using xticks. Then, we can align the labels by setting the “vertical” or “horizontal” attributes in the “rotation” key."
},
{
"code": null,
"e": 1282,
"s": 1226,
"text": "Make lists, bars_h... |
How to Create a Dynamic Widget of an Android App? - GeeksforGeeks | 07 Sep, 2020
Widgets are the UI elements provided by an application for accessing some of its features remotely either from Home Screens or Lock Screens. Widgets can be Static or Dynamic meaning that the display elements don’t change (Static) or change (Dynamic) with time. Through this article, let’s demonstrate the im... | [
{
"code": null,
"e": 25677,
"s": 25649,
"text": "\n07 Sep, 2020"
},
{
"code": null,
"e": 26127,
"s": 25677,
"text": "Widgets are the UI elements provided by an application for accessing some of its features remotely either from Home Screens or Lock Screens. Widgets can be Static ... |
How to Install Matplotlib on Linux? - GeeksforGeeks | 08 Sep, 2021
Matploptib is a low-level library of Python which is used for data visualization. It is easy to use and emulates MATLAB like graphs and visualization. This library is built on the top of NumPy arrays and consist of several plots like line chart, bar chart, histogram, etc. It provides a lot of flexibility b... | [
{
"code": null,
"e": 24878,
"s": 24850,
"text": "\n08 Sep, 2021"
},
{
"code": null,
"e": 25222,
"s": 24878,
"text": "Matploptib is a low-level library of Python which is used for data visualization. It is easy to use and emulates MATLAB like graphs and visualization. This library... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.