title stringlengths 3 221 | text stringlengths 17 477k | parsed listlengths 0 3.17k |
|---|---|---|
Binomial Random Variables - GeeksforGeeks | 30 Nov, 2021
In this post, we’ll discuss Binomial Random Variables.Prerequisite : Random Variables A specific type of discrete random variable that counts how often a particular event occurs in a fixed number of tries or trials. For a variable to be a binomial random variable, ALL of the following conditions must be me... | [
{
"code": null,
"e": 24327,
"s": 24299,
"text": "\n30 Nov, 2021"
},
{
"code": null,
"e": 24639,
"s": 24327,
"text": "In this post, we’ll discuss Binomial Random Variables.Prerequisite : Random Variables A specific type of discrete random variable that counts how often a particula... |
Count all possible paths from top left to bottom right of a mXn matrix in C++ | In this tutorial, we will be discussing a program to find the number of possible paths from top left to bottom right of a mXn matrix.
For this we will be provided with a mXn matrix. Our task is to find all the possible paths from top left to bottom right of the given matrix.
#include <iostream>
using namespace std;
//r... | [
{
"code": null,
"e": 1196,
"s": 1062,
"text": "In this tutorial, we will be discussing a program to find the number of possible paths from top left to bottom right of a mXn matrix."
},
{
"code": null,
"e": 1338,
"s": 1196,
"text": "For this we will be provided with a mXn matrix. ... |
A beginner’s guide to dimensionality reduction in Machine Learning | by Judy T Raj | Towards Data Science | This is my first article on medium. Here, I’ll be giving a quick overview of what dimensionality reduction is, why we need it and how to do it.
Dimensionality reduction is simply, the process of reducing the dimension of your feature set. Your feature set could be a dataset with a hundred columns (i.e features) or it c... | [
{
"code": null,
"e": 316,
"s": 172,
"text": "This is my first article on medium. Here, I’ll be giving a quick overview of what dimensionality reduction is, why we need it and how to do it."
},
{
"code": null,
"e": 725,
"s": 316,
"text": "Dimensionality reduction is simply, the pr... |
Angular 8 - Form Validation | Form validation is an important part of web application. It is used to validate whether the user input is in correct format or not.
Let’s perform simple required field validation in angular.
Open command prompt and go to reactive-form-app.
cd /go/to/reactive-form-app
Replace the below code in test.component.ts file.
im... | [
{
"code": null,
"e": 2520,
"s": 2388,
"text": "Form validation is an important part of web application. It is used to validate whether the user input is in correct format or not."
},
{
"code": null,
"e": 2579,
"s": 2520,
"text": "Let’s perform simple required field validation in ... |
Creating an environment with Airflow and DBT on AWS (part 2) | by Arthur Chaves | Towards Data Science | In part 1 of this article, we launched an EC2 instance, installed some OS requirements and then Airflow. Now, we are going to install DBT. But first let’s make some settings to simplify some things.
Until now, we were connecting to the EC2 instance using the default user, ec2-user. Then we switched to the user Airflow,... | [
{
"code": null,
"e": 371,
"s": 172,
"text": "In part 1 of this article, we launched an EC2 instance, installed some OS requirements and then Airflow. Now, we are going to install DBT. But first let’s make some settings to simplify some things."
},
{
"code": null,
"e": 948,
"s": 371,
... |
How to Convert Index to Column in Pandas Dataframe? - GeeksforGeeks | 01 Jul, 2020
Pandas is a powerful tool which is used for data analysis and is built on top of the python library. The Pandas library enables users to create and manipulate dataframes (Tables of data) and time series effectively and efficiently. These dataframes can be used for training and testing machine learning mode... | [
{
"code": null,
"e": 26141,
"s": 26113,
"text": "\n01 Jul, 2020"
},
{
"code": null,
"e": 26472,
"s": 26141,
"text": "Pandas is a powerful tool which is used for data analysis and is built on top of the python library. The Pandas library enables users to create and manipulate data... |
How to add a number to a current value in MySQL (multiple times at the same time)? | You can use UPDATE command for this.
The syntax is as follows
update yourTableName set yourColumnName =yourColumnName +yourIntegerValue where <yourCondition>;
To understand the above syntax, let us create a table. The query to create a table is as follows
mysql> create table addANumberToCurrentValueDemo
-> (
-> G... | [
{
"code": null,
"e": 1099,
"s": 1062,
"text": "You can use UPDATE command for this."
},
{
"code": null,
"e": 1124,
"s": 1099,
"text": "The syntax is as follows"
},
{
"code": null,
"e": 1221,
"s": 1124,
"text": "update yourTableName set yourColumnName =yourColu... |
Python program to input a comma separated string - GeeksforGeeks | 23 Jan, 2020
Given an input string that is comma-separated instead of space. The task is to store this input string in a list or variables. This can be achieved in Python using two ways:
Using List comprehension and split()
Using map() and split()
Method 1: Using List comprehension and split()
split() function helps in... | [
{
"code": null,
"e": 26550,
"s": 26522,
"text": "\n23 Jan, 2020"
},
{
"code": null,
"e": 26724,
"s": 26550,
"text": "Given an input string that is comma-separated instead of space. The task is to store this input string in a list or variables. This can be achieved in Python using... |
Construct Binary Tree from given Parent Array representation | Iterative Approach - GeeksforGeeks | 02 Jun, 2021
Given an array that represents a tree in such a way that array indexes are values in tree nodes and array values give the parent node of that particular index (or node). The value of the root node index would always be -1 as there is no parent for root. Construct the standard linked representation of given... | [
{
"code": null,
"e": 24822,
"s": 24794,
"text": "\n02 Jun, 2021"
},
{
"code": null,
"e": 25185,
"s": 24822,
"text": "Given an array that represents a tree in such a way that array indexes are values in tree nodes and array values give the parent node of that particular index (or ... |
Build your own barcode and QRcode scanner using python | by Pruthvi Hingu | Towards Data Science | Let’s create a program that scans the QR codes and Barcodes from an image. For this program, we need three packages, which are OpenCV, NumPy, and pyzbar. Most of the python programmers are familiar with OpenCV and Numpy libraries. OpenCV is an open-source computer vision and machine learning library. It is a useful lib... | [
{
"code": null,
"e": 994,
"s": 172,
"text": "Let’s create a program that scans the QR codes and Barcodes from an image. For this program, we need three packages, which are OpenCV, NumPy, and pyzbar. Most of the python programmers are familiar with OpenCV and Numpy libraries. OpenCV is an open-source... |
How to send email using Node.js ? - GeeksforGeeks | 11 Sep, 2021
Electronic Mail is a widely used method to transfer/exchange messages among people. We generally send the email with any software or application like Gmail, outlook, thunderbird mail, and yahoo, etc. We can also code the basic concept of these applications in a node.js app by using any third-party library ... | [
{
"code": null,
"e": 24709,
"s": 24681,
"text": "\n11 Sep, 2021"
},
{
"code": null,
"e": 25082,
"s": 24709,
"text": "Electronic Mail is a widely used method to transfer/exchange messages among people. We generally send the email with any software or application like Gmail, outloo... |
Java program to reverse a string using recursion | Recursion is the process of repeating items in a self-similar way. In programming languages, if a program allows you to call a function inside the same function, then it is called a recursive call of the function. You can reverse a string using the recursive function as shown in the following program.
Live Demo
public ... | [
{
"code": null,
"e": 1365,
"s": 1062,
"text": "Recursion is the process of repeating items in a self-similar way. In programming languages, if a program allows you to call a function inside the same function, then it is called a recursive call of the function. You can reverse a string using the recu... |
What Explainable AI fails to explain (and how we fix that) | by Alvin Wan | Towards Data Science | Don’t take it from me. Take it from IEEE Fellow Cuntai Guan, who recognizes “many machine decisions are still poorly understood”. Most papers even suggest a rigid dichotomy between accuracy and interpretability.
Explainable AI (XAI) attempts to bridge this divide, but as we explain below, XAI justifies decisions withou... | [
{
"code": null,
"e": 384,
"s": 172,
"text": "Don’t take it from me. Take it from IEEE Fellow Cuntai Guan, who recognizes “many machine decisions are still poorly understood”. Most papers even suggest a rigid dichotomy between accuracy and interpretability."
},
{
"code": null,
"e": 704,
... |
How to select a date less than the current date with MySQL? | Let us first create a table −
mysql> create table DemoTable1877
(
DueDate datetime
);
Query OK, 0 rows affected (0.00 sec)
Insert some records in the table using insert command −
mysql> insert into DemoTable1877 values('2019-12-10');
Query OK, 1 row affected (0.00 sec)
mysql> insert into DemoTable1877 values('... | [
{
"code": null,
"e": 1092,
"s": 1062,
"text": "Let us first create a table −"
},
{
"code": null,
"e": 1194,
"s": 1092,
"text": "mysql> create table DemoTable1877\n (\n DueDate datetime\n );\nQuery OK, 0 rows affected (0.00 sec)"
},
{
"code": null,
"e": 1250,
... |
What do you mean by buffer in C language? | A temporary storage area is called buffer. All input output (I/O) devices contain I/O buffer.
When we try to pass more than the required number of values as input then, the remaining values will automatically hold in the input buffer. This buffer data automatically go to the next input functionality, if it is exists.
W... | [
{
"code": null,
"e": 1156,
"s": 1062,
"text": "A temporary storage area is called buffer. All input output (I/O) devices contain I/O buffer."
},
{
"code": null,
"e": 1381,
"s": 1156,
"text": "When we try to pass more than the required number of values as input then, the remaining... |
How to Read Data Files on S3 from Amazon SageMaker | by Mikhail Klassen | Towards Data Science | Amazon SageMaker is a powerful, cloud-hosted Jupyter Notebook service offered by Amazon Web Services (AWS). It’s used to create, train, and deploy machine learning models, but it’s also great for doing exploratory data analysis and prototyping.
While it may not be quite as beginner-friendly as some alternatives, such a... | [
{
"code": null,
"e": 417,
"s": 172,
"text": "Amazon SageMaker is a powerful, cloud-hosted Jupyter Notebook service offered by Amazon Web Services (AWS). It’s used to create, train, and deploy machine learning models, but it’s also great for doing exploratory data analysis and prototyping."
},
{
... |
Can Selenium interact with an existing browser session? | We can interact with an existing browser session. This is performed by using the Capabilities and ChromeOptions classes. The Capabilities class obtains the browser capabilities with the help of the getCapabilities method.
This is generally used for debugging purposes when we have a large number of steps in a test and w... | [
{
"code": null,
"e": 1284,
"s": 1062,
"text": "We can interact with an existing browser session. This is performed by using the Capabilities and ChromeOptions classes. The Capabilities class obtains the browser capabilities with the help of the getCapabilities method."
},
{
"code": null,
... |
Processing and visualizing multiple categorical variables with Python — NBA’s schedule challenges | by JP Hwang | Towards Data Science | Today, I would like to discuss various ways to process, visualise and review categorical variables. Processing and visualising data when there are multiple categorical variables can be tricky.
You might have seen criss-crossing line plots with multiple colours and marker shapes, or maybe it was a grid of subplots. Thes... | [
{
"code": null,
"e": 365,
"s": 172,
"text": "Today, I would like to discuss various ways to process, visualise and review categorical variables. Processing and visualising data when there are multiple categorical variables can be tricky."
},
{
"code": null,
"e": 669,
"s": 365,
"t... |
Garbage collection(GC) in JavaScript? | garbage collection (GC) is a form of automatic memory management. The garbage collector, or just collector, attempts to reclaim garbage, or memory occupied by objects that are no longer in use by the program. The general problem of automatically finding whether some memory "is not needed anymore" is undecidable. As a c... | [
{
"code": null,
"e": 1475,
"s": 1062,
"text": "garbage collection (GC) is a form of automatic memory management. The garbage collector, or just collector, attempts to reclaim garbage, or memory occupied by objects that are no longer in use by the program. The general problem of automatically finding... |
5 Reasons “Logistic Regression” should be the first thing you learn when becoming a Data Scientist | by Dima Shulga | Towards Data Science | I started my way in the Data Science world a few years back. I was a Software Engineer back then and I started to learn online first (before starting my Master’s degree). I remember that as I searched for online resources I saw only names of learning algorithms — Linear Regression, Support Vector Machine, Decision Tree... | [
{
"code": null,
"e": 1014,
"s": 172,
"text": "I started my way in the Data Science world a few years back. I was a Software Engineer back then and I started to learn online first (before starting my Master’s degree). I remember that as I searched for online resources I saw only names of learning alg... |
Highcharts - Basic Pie Chart | Following is an example of a basic pie chart.
We have already seen the configuration used to draw a chart in Highcharts Configuration Syntax chapter.
An example of a basic pie chart is given below.
Let us now see the additional configurations/steps taken.
Configure the series type to be pie based. series.type decides t... | [
{
"code": null,
"e": 2063,
"s": 2017,
"text": "Following is an example of a basic pie chart."
},
{
"code": null,
"e": 2167,
"s": 2063,
"text": "We have already seen the configuration used to draw a chart in Highcharts Configuration Syntax chapter."
},
{
"code": null,
... |
Python Number atan2() Method | Python number method atan2() returns atan(y / x), in radians.
Following is the syntax for atan2() method −
atan2(y, x)
Note − This function is not accessible directly, so we need to import math module and then we need to call this function using math static object.
y − This must be a numeric value.
y − This must be a... | [
{
"code": null,
"e": 2307,
"s": 2244,
"text": "Python number method atan2() returns atan(y / x), in radians."
},
{
"code": null,
"e": 2352,
"s": 2307,
"text": "Following is the syntax for atan2() method −"
},
{
"code": null,
"e": 2365,
"s": 2352,
"text": "ata... |
RxJS - Join Operator merge | This operator will take in the input observable and will emit all the values from the observable and emit one single output observable.
merge(observable:array[]): Observable
observable − The input will be an array of Observable.
It will return an observable with a single value as output.
import { of, merge } from 'rxj... | [
{
"code": null,
"e": 1960,
"s": 1824,
"text": "This operator will take in the input observable and will emit all the values from the observable and emit one single output observable."
},
{
"code": null,
"e": 1999,
"s": 1960,
"text": "merge(observable:array[]): Observable\n"
},
... |
C Program For Searching An Element In A Linked List - GeeksforGeeks | 27 Dec, 2021
Write a function that searches a given key ‘x’ in a given singly linked list. The function should return true if x is present in linked list and false otherwise.
bool search(Node *head, int x)
For example, if the key to be searched is 15 and linked list is 14->21->11->30->10, then function should return fa... | [
{
"code": null,
"e": 24286,
"s": 24258,
"text": "\n27 Dec, 2021"
},
{
"code": null,
"e": 24448,
"s": 24286,
"text": "Write a function that searches a given key ‘x’ in a given singly linked list. The function should return true if x is present in linked list and false otherwise."
... |
Bridge Design Pattern - GeeksforGeeks | 22 Nov, 2021
The Bridge design pattern allows you to separate the abstraction from the implementation. It is a structural design pattern.
There are 2 parts in Bridge design pattern :
AbstractionImplementation
Abstraction
Implementation
This is a design mechanism that encapsulates an implementation class inside of an ... | [
{
"code": null,
"e": 24596,
"s": 24568,
"text": "\n22 Nov, 2021"
},
{
"code": null,
"e": 24722,
"s": 24596,
"text": "The Bridge design pattern allows you to separate the abstraction from the implementation. It is a structural design pattern. "
},
{
"code": null,
"e": ... |
Generators in Python - GeeksforGeeks | 31 Mar, 2020
Prerequisites: Yield Keyword and Iterators
There are two terms involved when we discuss generators.
Generator-Function : A generator-function is defined like a normal function, but whenever it needs to generate a value, it does so with the yield keyword rather than return. If the body of a def contains yie... | [
{
"code": null,
"e": 41552,
"s": 41524,
"text": "\n31 Mar, 2020"
},
{
"code": null,
"e": 41595,
"s": 41552,
"text": "Prerequisites: Yield Keyword and Iterators"
},
{
"code": null,
"e": 41652,
"s": 41595,
"text": "There are two terms involved when we discuss ge... |
Conversational AI: Design & Build a Contextual Assistant- Part 2 | by Mady Mantha | Towards Data Science | In the first part of this series, we introduced the different maturity levels of conversational AI and started building a travel assistant using Rasa. In this post, we’ll look at structuring happy and unhappy conversation paths, various machine learning policies and configurations to improve your dialogue model, and us... | [
{
"code": null,
"e": 570,
"s": 172,
"text": "In the first part of this series, we introduced the different maturity levels of conversational AI and started building a travel assistant using Rasa. In this post, we’ll look at structuring happy and unhappy conversation paths, various machine learning p... |
How to use replaceAll () in Android textview? | This example demonstrate about How to use replaceAll () in Android textview.
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"?>
<LinearLay... | [
{
"code": null,
"e": 1139,
"s": 1062,
"text": "This example demonstrate about How to use replaceAll () in Android textview."
},
{
"code": null,
"e": 1268,
"s": 1139,
"text": "Step 1 − Create a new project in Android Studio, go to File ⇒ New Project and fill all required details t... |
Program to find minimum absolute sum difference in Python | Suppose we have two positive valued arrays nums1 and nums2, of same size. The absolute sum
difference of these two arrays is the sum of |nums1[i] - nums2[i]| for each 0 <= i < n (0-indexed). Now, we can replace at most one element of nums1 with any other element in nums1
to minimize the absolute sum difference. We have... | [
{
"code": null,
"e": 1542,
"s": 1062,
"text": "Suppose we have two positive valued arrays nums1 and nums2, of same size. The absolute sum\ndifference of these two arrays is the sum of |nums1[i] - nums2[i]| for each 0 <= i < n (0-indexed). Now, we can replace at most one element of nums1 with any oth... |
SAP Webi - Quick Guide | Web Intelligence is part of SAP BusinessObjects product suite and is used for analytical and ad hoc reporting to meet an organization’s business requirements. Web Intelligence is a Business Intelligence reporting tool for business users to analyze data in Data Warehouse. It assists business managers in the decision-mak... | [
{
"code": null,
"e": 2697,
"s": 2333,
"text": "Web Intelligence is part of SAP BusinessObjects product suite and is used for analytical and ad hoc reporting to meet an organization’s business requirements. Web Intelligence is a Business Intelligence reporting tool for business users to analyze data ... |
Java String equalsIgnoreCase() Method with Examples - GeeksforGeeks | 10 Nov, 2021
The equalsIgnoreCase() method of the String class compares two strings irrespective of the case (lower or upper) of the string. This method returns a boolean value, true if the argument is not null and represents an equivalent String ignoring case, else false.
Syntax:
str2.equalsIgnoreCase(str1);
Note: He... | [
{
"code": null,
"e": 23893,
"s": 23865,
"text": "\n10 Nov, 2021"
},
{
"code": null,
"e": 24154,
"s": 23893,
"text": "The equalsIgnoreCase() method of the String class compares two strings irrespective of the case (lower or upper) of the string. This method returns a boolean value... |
C Program to display hostname and IP address - GeeksforGeeks | 24 Nov, 2017
There are many ways to find Hostname and IP address of a local machine. Here is a simple method to find hostname and IP address using C program.
We will be using the following functions :-
gethostname() : The gethostname function retrieves the standard host name for the local computer.
gethostbyname() : Th... | [
{
"code": null,
"e": 24528,
"s": 24500,
"text": "\n24 Nov, 2017"
},
{
"code": null,
"e": 24673,
"s": 24528,
"text": "There are many ways to find Hostname and IP address of a local machine. Here is a simple method to find hostname and IP address using C program."
},
{
"cod... |
Python | Pandas dataframe.between_time() - GeeksforGeeks | 16 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.between_time() is used to select values between particular times of the day ... | [
{
"code": null,
"e": 24390,
"s": 24362,
"text": "\n16 Nov, 2018"
},
{
"code": null,
"e": 24604,
"s": 24390,
"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... |
Sankey Charts with Multiple levels | Following is an example of a SanKey Chart with multiple levels.
We have already seen the configurations used to draw a chart in Google Charts Configuration Syntax chapter. Now, let us see an example of a SanKey Chart with multiple levels.
We've used Sankey class to show a Sankey chart with multiple levels.
type = 'Sank... | [
{
"code": null,
"e": 1860,
"s": 1796,
"text": "Following is an example of a SanKey Chart with multiple levels."
},
{
"code": null,
"e": 2035,
"s": 1860,
"text": "We have already seen the configurations used to draw a chart in Google Charts Configuration Syntax chapter. Now, let u... |
What is useState() & how it has been used to validate input values? - GeeksforGeeks | 13 Oct, 2021
The useState() is a hook in ReactJs which allows a functional component to have a state. We pass the initial state in this function, and it returns us a variable and a function to update that state.
We have to import the useState() hook from the react package.import { useState } from 'react';
We have to i... | [
{
"code": null,
"e": 26667,
"s": 26639,
"text": "\n13 Oct, 2021"
},
{
"code": null,
"e": 26866,
"s": 26667,
"text": "The useState() is a hook in ReactJs which allows a functional component to have a state. We pass the initial state in this function, and it returns us a variable a... |
All possible binary numbers of length n with equal sum in both halves - GeeksforGeeks | 07 Jul, 2021
Given a number n, we need to print all n-digit binary numbers with equal sum in left and right halves. If n is odd, then mid element can be either 0 or 1.Examples:
Input : n = 4
Output : 0000 0101 0110 1001 1010 1111
Input : n = 5
Output : 00000 00100 01001 01101 01010 01110 10001 10101 10010 10110 110... | [
{
"code": null,
"e": 26527,
"s": 26499,
"text": "\n07 Jul, 2021"
},
{
"code": null,
"e": 26693,
"s": 26527,
"text": "Given a number n, we need to print all n-digit binary numbers with equal sum in left and right halves. If n is odd, then mid element can be either 0 or 1.Examples:... |
Change Gregorian Calendar to SimpleDateFormat in Java - GeeksforGeeks | 24 Jan, 2022
Given a date in GregorianCalendar format change it into SimpleDateFormat.Examples:
Input: Sat Apr 28 13:36:37 UTC 2018
Output: 28-Apr-2018
Input: Wed Apr 03 20:49:45 IST 2019
Output: 03-Apr-2019
Approach:
Get the Gregorian Date to be converted.Create an object of SimpleDateFormat that will store the con... | [
{
"code": null,
"e": 24460,
"s": 24432,
"text": "\n24 Jan, 2022"
},
{
"code": null,
"e": 24544,
"s": 24460,
"text": "Given a date in GregorianCalendar format change it into SimpleDateFormat.Examples: "
},
{
"code": null,
"e": 24657,
"s": 24544,
"text": "Input:... |
Where Machine Learning meets Cryptography | by Dr. Robert Kübler | Towards Data Science | When reading this, chances are that you know one or another thing about machine learning already. You know that machine learning algorithms typically take in a bunch of samples, each containing a fixed amount of features, and output a prediction in the end.
What you maybe have heard about (but did not dig deeper into) ... | [
{
"code": null,
"e": 429,
"s": 171,
"text": "When reading this, chances are that you know one or another thing about machine learning already. You know that machine learning algorithms typically take in a bunch of samples, each containing a fixed amount of features, and output a prediction in the en... |
Check whether the bit at given position is set or unset in Python | Suppose we have a number n and another value k. We have to check whether the kth bit in n is set (1) or unset (0). The value of k is considered from right hand side.
So, if the input is like n = 18 k = 2, then the output will be Set as binary form of 18 is 10010 so the second last bit is 1 (set).
To solve this, we will... | [
{
"code": null,
"e": 1228,
"s": 1062,
"text": "Suppose we have a number n and another value k. We have to check whether the kth bit in n is set (1) or unset (0). The value of k is considered from right hand side."
},
{
"code": null,
"e": 1360,
"s": 1228,
"text": "So, if the input... |
GWT - HTML Widget | The HTML widget can cantain arbitrary HTML it can be interpreted as HTML. This widget uses a <div> element, causing it to be displayed with block layout.
Following is the declaration for com.google.gwt.user.client.ui.Label class −
public class HTML
extends Label
implements HasHTML
Following default CSS Style r... | [
{
"code": null,
"e": 2177,
"s": 2023,
"text": "The HTML widget can cantain arbitrary HTML it can be interpreted as HTML. This widget uses a <div> element, causing it to be displayed with block layout."
},
{
"code": null,
"e": 2254,
"s": 2177,
"text": "Following is the declaration... |
How to calculate row means by excluding NA values in an R data frame? | To find the row means we can use rowMeans function but if we have some missing values in the data frame then na.rm=TRUE argument can be used in the same way as it is used while calculating the means for columns. For example, if we have a data frame df that contains two columns x and y each having some missing values th... | [
{
"code": null,
"e": 1445,
"s": 1062,
"text": "To find the row means we can use rowMeans function but if we have some missing values in the data frame then na.rm=TRUE argument can be used in the same way as it is used while calculating the means for columns. For example, if we have a data frame df t... |
Rat and Poisoned bottle Problem - GeeksforGeeks | 06 Jun, 2021
Given N number of bottles in which one bottle is poisoned. So the task is to find out minimum number of rats required to identify the poisoned bottle. A rat can drink any number of bottles at a time.
Examples:
Input: N = 4
Output: 2
Input: N = 100
Output: 7
Approach: Let’s start from the base case.
Fo... | [
{
"code": null,
"e": 24142,
"s": 24114,
"text": "\n06 Jun, 2021"
},
{
"code": null,
"e": 24343,
"s": 24142,
"text": "Given N number of bottles in which one bottle is poisoned. So the task is to find out minimum number of rats required to identify the poisoned bottle. A rat can dr... |
How to extract img src and alt from html using PHP? - GeeksforGeeks | 15 May, 2019
Extraction of image attributes like ‘src’, ‘alt’, ‘height’, ‘width’ etc from a HTML page using PHP. This task can be done using the following steps.
Loading HTML content in a variable(DOM variable).
Selecting each image in that document.
Selecting attribute and save it’s content to a variable.
Output as HT... | [
{
"code": null,
"e": 24581,
"s": 24553,
"text": "\n15 May, 2019"
},
{
"code": null,
"e": 24730,
"s": 24581,
"text": "Extraction of image attributes like ‘src’, ‘alt’, ‘height’, ‘width’ etc from a HTML page using PHP. This task can be done using the following steps."
},
{
... |
Tryit Editor v3.7 | CSS Grid Item
Tryit: The grid-row property | [
{
"code": null,
"e": 23,
"s": 9,
"text": "CSS Grid Item"
}
] |
Customer Churn Prediction within Music Streaming using PySpark | by Isak Kabir | Towards Data Science | It is key for a music streaming business to identify users that are likely to churn, i.e. users who are at risk of downgrading from premium and free subscription to cancelling the service. If a music streaming business accurately identifies such users in advance, they can offer them discounts or other similar incentive... | [
{
"code": null,
"e": 743,
"s": 172,
"text": "It is key for a music streaming business to identify users that are likely to churn, i.e. users who are at risk of downgrading from premium and free subscription to cancelling the service. If a music streaming business accurately identifies such users in ... |
Assignment Operators in C/C++ - GeeksforGeeks | 11 Oct, 2019
Assignment operators are used to assigning value to a variable. The left side operand of the assignment operator is a variable and right side operand of the assignment operator is a value. The value on the right side must be of the same data-type of the variable on the left side otherwise the compiler will... | [
{
"code": null,
"e": 25589,
"s": 25561,
"text": "\n11 Oct, 2019"
},
{
"code": null,
"e": 25969,
"s": 25589,
"text": "Assignment operators are used to assigning value to a variable. The left side operand of the assignment operator is a variable and right side operand of the assign... |
Count the number of holes in an integer - GeeksforGeeks | 29 Apr, 2021
Given an integer num, the task is to count the number of holes in that number. The holes in each digit are given below:
Examples:
Input: num = 6457819 Output: 5Input: num = 2537312 Output: 0
Approach: Initialize holes = 0 and an array hole[] with the values given where hole[i] stores the number of ... | [
{
"code": null,
"e": 24617,
"s": 24589,
"text": "\n29 Apr, 2021"
},
{
"code": null,
"e": 24739,
"s": 24617,
"text": "Given an integer num, the task is to count the number of holes in that number. The holes in each digit are given below: "
},
{
"code": null,
"e": 2475... |
How to update an existing document in MongoDB collection using Java? | The update() method updates the values in the existing document.
db.COLLECTION_NAME.update(SELECTIOIN_CRITERIA, UPDATED_DATA)
In Java, you can update a single document using the updateOne()method of the com.mongodb.client.MongoCollection interface. To this method, you need to pass the filter and values for the update.
... | [
{
"code": null,
"e": 1127,
"s": 1062,
"text": "The update() method updates the values in the existing document."
},
{
"code": null,
"e": 1188,
"s": 1127,
"text": "db.COLLECTION_NAME.update(SELECTIOIN_CRITERIA, UPDATED_DATA)"
},
{
"code": null,
"e": 1382,
"s": 1188... |
Java Program to Represent Graphs Using Linked List - GeeksforGeeks | 26 Jul, 2021
Data structures are divided into two categories Linear data structures and Non-Linear data structures. The major disadvantage of the linear data structure is we cannot arrange the data of linear data structure in hierarchy manner that’s why in the computer field we use Non-Linear data structures. The most ... | [
{
"code": null,
"e": 26335,
"s": 26307,
"text": "\n26 Jul, 2021"
},
{
"code": null,
"e": 26848,
"s": 26335,
"text": "Data structures are divided into two categories Linear data structures and Non-Linear data structures. The major disadvantage of the linear data structure is we ca... |
How to add a Money field in Django? | Sometimes, we may have to add money-related data in a website, like salary, fees or income. Django provides an integer field but many a time, it doesn't work like we want. So, for handling money field, we can use a third-package library that will add the money field to our model.
Make a project and an app, I named it "... | [
{
"code": null,
"e": 1343,
"s": 1062,
"text": "Sometimes, we may have to add money-related data in a website, like salary, fees or income. Django provides an integer field but many a time, it doesn't work like we want. So, for handling money field, we can use a third-package library that will add th... |
Setup Your Own Deep Learning Sandbox: Quick Guide | by Thomas Morris | Towards Data Science | Like many data science enthusiasts I dove into this field by filling every spare minute learning the DS eco-system –namely Python, Jupyter, NumPy, Pandas, Scikit-learn, Matplotlib, and a dash of Seaborn. Together with the all powerful Unix tools –vi, less, sort, cut, grep, cat, tail, head, etc.– you have an incredibly ... | [
{
"code": null,
"e": 1158,
"s": 172,
"text": "Like many data science enthusiasts I dove into this field by filling every spare minute learning the DS eco-system –namely Python, Jupyter, NumPy, Pandas, Scikit-learn, Matplotlib, and a dash of Seaborn. Together with the all powerful Unix tools –vi, les... |
Laravel - Controllers | In the MVC framework, the letter ‘C’ stands for Controller. It acts as a directing traffic between Views and Models. In this chapter, you will learn about Controllers in Laravel.
Open the command prompt or terminal based on the operating system you are using and type the following command to create controller using the... | [
{
"code": null,
"e": 2651,
"s": 2472,
"text": "In the MVC framework, the letter ‘C’ stands for Controller. It acts as a directing traffic between Views and Models. In this chapter, you will learn about Controllers in Laravel."
},
{
"code": null,
"e": 2831,
"s": 2651,
"text": "Ope... |
Classification of Amazon Food Reviews | by Sohail Hosseini | Towards Data Science | The goal here is to classify Food reviews based on customers' text. So the first step would be to download the dataset. It would be fascinating for suppliers to use reviews from their customers to provide better service to them. Reviews include several features like ‘ProductId’, ‘UserId’, ‘Score’, and ‘text’.
But how c... | [
{
"code": null,
"e": 483,
"s": 172,
"text": "The goal here is to classify Food reviews based on customers' text. So the first step would be to download the dataset. It would be fascinating for suppliers to use reviews from their customers to provide better service to them. Reviews include several fe... |
SQL AND, OR, NOT Operators | The WHERE clause can be combined with
AND, OR, and
NOT operators.
The AND and OR operators are used to filter records based on more than one
condition:
The AND operator displays a record if all the conditions separated by
AND
are TRUE.
The OR operator displays a record if any of the conditions separated by
... | [
{
"code": null,
"e": 68,
"s": 0,
"text": "The WHERE clause can be combined with \nAND, OR, and \nNOT operators."
},
{
"code": null,
"e": 155,
"s": 68,
"text": "The AND and OR operators are used to filter records based on more than one \ncondition:"
},
{
"code": null,
... |
MongoDB find() to operate on recursive search? | Use find() with dot notation to perform recursive search. Let us first create a collection with documents −
> db.findOperationDemo.insertOne({"ClientDetails":[{"ClientId":101,"ClientName":"Chris"},{"ClientId":102,"ClientName":"Robert"}]});
{
"acknowledged" : true,
"insertedId" : ObjectId("5cd9a118b50a6c6dd317ad99... | [
{
"code": null,
"e": 1170,
"s": 1062,
"text": "Use find() with dot notation to perform recursive search. Let us first create a collection with documents −"
},
{
"code": null,
"e": 1602,
"s": 1170,
"text": "> db.findOperationDemo.insertOne({\"ClientDetails\":[{\"ClientId\":101,\"C... |
New Features of Java 12 - GeeksforGeeks | 24 Jan, 2022
Oracle released Java SE(Standard Edition) 12 on March 19, 2019, after which they plan to have a new release every six months. JDK 12 came with a lot of improvements over JDK 11. This latest version offers a list of new features such as Switch Expressions, Default CDS Archives, Shenandoah, Microbenchmark Su... | [
{
"code": null,
"e": 25347,
"s": 25319,
"text": "\n24 Jan, 2022"
},
{
"code": null,
"e": 25713,
"s": 25347,
"text": "Oracle released Java SE(Standard Edition) 12 on March 19, 2019, after which they plan to have a new release every six months. JDK 12 came with a lot of improvement... |
Mood's Median Test - GeeksforGeeks | 25 Aug, 2021
Mood’s Median Test: It is a non-parametric alternative to one way ANOVA. It is a special case of Pearson’s Chi-Squared Test. It tests whether the medians of two or more groups differ and also calculates a range of values that is likely to include the difference between population medians. In this test, dif... | [
{
"code": null,
"e": 24442,
"s": 24414,
"text": "\n25 Aug, 2021"
},
{
"code": null,
"e": 24805,
"s": 24442,
"text": "Mood’s Median Test: It is a non-parametric alternative to one way ANOVA. It is a special case of Pearson’s Chi-Squared Test. It tests whether the medians of two or... |
Python | Get positive elements from given list of lists - GeeksforGeeks | 25 Apr, 2019
Given a list of list, the task is to get only positive element from given list. Below are some ways to solve the above problem.
Method #1: Using Iteration
# Python code to get positive # element from list of list # List InitialisationInput = [[10, -11, 222], [42, -222, -412, 99, -87]]Output = [] # Using ... | [
{
"code": null,
"e": 26411,
"s": 26383,
"text": "\n25 Apr, 2019"
},
{
"code": null,
"e": 26539,
"s": 26411,
"text": "Given a list of list, the task is to get only positive element from given list. Below are some ways to solve the above problem."
},
{
"code": null,
"e"... |
Analysis of test data using K-Means Clustering in Python - GeeksforGeeks | 09 Feb, 2018
This article demonstrates an illustration of K-means clustering on a sample random data using open-cv library.
Pre-requisites: Numpy, OpenCV, matplot-libLet’s first visualize test data with Multiple Features using matplot-lib tool.
# importing required toolsimport numpy as npfrom matplotlib import pyplot a... | [
{
"code": null,
"e": 25629,
"s": 25601,
"text": "\n09 Feb, 2018"
},
{
"code": null,
"e": 25740,
"s": 25629,
"text": "This article demonstrates an illustration of K-means clustering on a sample random data using open-cv library."
},
{
"code": null,
"e": 25861,
"s":... |
Sudoku Solver in C++ | Suppose we have a Sudoku grid and we have to solve this famous number maze problem, Sudoku. We know that Sudoku is a 9 x 9 number grid, and the whole grid are also divided into 3 x 3 boxes There are some rules to solve the Sudoku.
We have to use digits 1 to 9 for solving this problem.
We have to use digits 1 to 9 for s... | [
{
"code": null,
"e": 1293,
"s": 1062,
"text": "Suppose we have a Sudoku grid and we have to solve this famous number maze problem, Sudoku. We know that Sudoku is a 9 x 9 number grid, and the whole grid are also divided into 3 x 3 boxes There are some rules to solve the Sudoku."
},
{
"code": ... |
Example of Interfacing Seven Segments LED Display with 8085 - GeeksforGeeks | 22 Jan, 2021
Seven segments LED display :
A seven-segment LED is a kind of LED(Light Emitting Diode) consisting of 7 small LEDs it usually comes with the microprocessor’s as we commonly need to interface them with microprocessors like 8085.
Structure of Seven Segments LED :
The LED in Seven Segment display are arranged... | [
{
"code": null,
"e": 26141,
"s": 26113,
"text": "\n22 Jan, 2021"
},
{
"code": null,
"e": 26170,
"s": 26141,
"text": "Seven segments LED display :"
},
{
"code": null,
"e": 26369,
"s": 26170,
"text": "A seven-segment LED is a kind of LED(Light Emitting Diode) co... |
Boolean compareTo() method in Java with examples - GeeksforGeeks | 08 Oct, 2018
The compareTo() method of Boolean class is a built in method in Java which is used to compare the given Boolean instance with the current instance.
Syntax:
BooleanObject.compareTo(Boolean a)
Parameters: It takes a Boolean value a as parameter which is to be compared with the current instance.
Return Type: ... | [
{
"code": null,
"e": 25237,
"s": 25209,
"text": "\n08 Oct, 2018"
},
{
"code": null,
"e": 25385,
"s": 25237,
"text": "The compareTo() method of Boolean class is a built in method in Java which is used to compare the given Boolean instance with the current instance."
},
{
"... |
AB Testing With R Programming - GeeksforGeeks | 23 Oct, 2020
Split testing is another name of A/B testing and it’s a common or general methodology. It’s used online when one wants to test a new feature or a product. The main agenda over here is to design an experiment that gives repeatable results and robust to make an informed decision to launch it or not. Generall... | [
{
"code": null,
"e": 25162,
"s": 25134,
"text": "\n23 Oct, 2020"
},
{
"code": null,
"e": 26098,
"s": 25162,
"text": "Split testing is another name of A/B testing and it’s a common or general methodology. It’s used online when one wants to test a new feature or a product. The main... |
Check if subtree | Practice | GeeksforGeeks | Given two binary trees with head reference as T and S having at most N nodes. The task is to check if S is present as subtree in T.
A subtree of a tree T1 is a tree T2 consisting of a node in T1 and all of its descendants in T1.
Example 1:
Input:
T: 1 S: 3
/ \ /
2 3 ... | [
{
"code": null,
"e": 467,
"s": 238,
"text": "Given two binary trees with head reference as T and S having at most N nodes. The task is to check if S is present as subtree in T.\nA subtree of a tree T1 is a tree T2 consisting of a node in T1 and all of its descendants in T1."
},
{
"code": nul... |
stat() - Unix, Linux System Call | Unix - Home
Unix - Getting Started
Unix - File Management
Unix - Directories
Unix - File Permission
Unix - Environment
Unix - Basic Utilities
Unix - Pipes & Filters
Unix - Processes
Unix - Communication
Unix - The vi Editor
Unix - What is Shell?
Unix - Using Variables
Unix - Special Variables
Unix - Using Arrays
Unix -... | [
{
"code": null,
"e": 1466,
"s": 1454,
"text": "Unix - Home"
},
{
"code": null,
"e": 1489,
"s": 1466,
"text": "Unix - Getting Started"
},
{
"code": null,
"e": 1512,
"s": 1489,
"text": "Unix - File Management"
},
{
"code": null,
"e": 1531,
"s": 1... |
How to track the color in OpenCV using C++? | Color tracking is similar to color detection. For tracking purpose, we added extra few lines to calculate the area of the detected object and then track the current position of that area and finally used line() function of OpenCV to show the object's path of motion.
The following program demonstrates how to track the c... | [
{
"code": null,
"e": 1329,
"s": 1062,
"text": "Color tracking is similar to color detection. For tracking purpose, we added extra few lines to calculate the area of the detected object and then track the current position of that area and finally used line() function of OpenCV to show the object's pa... |
Predicting Fake job postings — Part 2 (Predictive Analysis) | by Sharad Jain | Towards Data Science | In Part 1 of this two-part series, I did a detailed exploratory analysis of how fake job postings are different from genuine ones. Below is a link to Part 1 and I would highly recommend you read that first before moving forward!
towardsdatascience.com
Fake job postings were mostly targeted towards Full-time roles, whic... | [
{
"code": null,
"e": 401,
"s": 172,
"text": "In Part 1 of this two-part series, I did a detailed exploratory analysis of how fake job postings are different from genuine ones. Below is a link to Part 1 and I would highly recommend you read that first before moving forward!"
},
{
"code": null... |
Difference between Firm Real-time Tasks and Soft Real-time Tasks - GeeksforGeeks | 16 May, 2020
Real-time tasks are generally classified as – Hard and Soft but on a wide range, Real-time tasks are classified as:
Hard Real-time TasksFirm Real-time TasksSoft Real-time Tasks
Hard Real-time Tasks
Firm Real-time Tasks
Soft Real-time Tasks
1. Firm Real-time Tasks :Firm real-time tasks are such type of real... | [
{
"code": null,
"e": 24896,
"s": 24868,
"text": "\n16 May, 2020"
},
{
"code": null,
"e": 25012,
"s": 24896,
"text": "Real-time tasks are generally classified as – Hard and Soft but on a wide range, Real-time tasks are classified as:"
},
{
"code": null,
"e": 25073,
... |
ES6 - toLowerCase() | This method returns the calling string value converted to lowercase.
string.toLowerCase( )
Returns the calling string value converted to lowercase.
var str = "Apples are round, and Apples are Juicy.";
console.log(str.toLowerCase( ))
apples are round, and apples are juicy.
32 Lectures
3.5 hours
Sh... | [
{
"code": null,
"e": 2346,
"s": 2277,
"text": "This method returns the calling string value converted to lowercase."
},
{
"code": null,
"e": 2371,
"s": 2346,
"text": "string.toLowerCase( ) \n"
},
{
"code": null,
"e": 2428,
"s": 2371,
"text": "Returns the call... |
K Nearest Neighbours Explained. In this article I will give a general... | by Vatsal | Towards Data Science | In this article I will give a general overview, implementation, drawbacks and resources associated to the K Nearest Neighbours algorithm. Supervised learning is a subsection of machine learning generally associated to classification and regression based problems. Supervised learning implies that you are training a mode... | [
{
"code": null,
"e": 756,
"s": 172,
"text": "In this article I will give a general overview, implementation, drawbacks and resources associated to the K Nearest Neighbours algorithm. Supervised learning is a subsection of machine learning generally associated to classification and regression based p... |
ASP.NET WP - WebGrid | In the previous chapters of databases, we have displayed database data by using a razor code, and doing the HTML markup ourselves. But in ASP.NET Web Pages while using a Razor, we also have an easier way to display data by using the WebGrid helper.
This helper can render an HTML table for you that displays data.
This h... | [
{
"code": null,
"e": 2534,
"s": 2285,
"text": "In the previous chapters of databases, we have displayed database data by using a razor code, and doing the HTML markup ourselves. But in ASP.NET Web Pages while using a Razor, we also have an easier way to display data by using the WebGrid helper."
}... |
How to find the length of the StringBuilder in C# - GeeksforGeeks | 28 Jan, 2019
StringBuilder.Length Property is used to get or set the length of the current StringBuilder object.
Syntax: public int Length { get; set; }It returns the length of the current instance.
Exception: This property will give ArgumentOutOfRangeException if the value specified for a set operation is less than ze... | [
{
"code": null,
"e": 23609,
"s": 23581,
"text": "\n28 Jan, 2019"
},
{
"code": null,
"e": 23709,
"s": 23609,
"text": "StringBuilder.Length Property is used to get or set the length of the current StringBuilder object."
},
{
"code": null,
"e": 23795,
"s": 23709,
... |
Predicting Pharmacokinetics with Deterministic Models and Bayesian Statistics | by Georgi Tancev | Towards Data Science | Pharmacokinetics (PK) deals with the distribution and metabolism of xenobiotics in organisms. In drug development and clinical research, one encounters pharmacologists whose job it is to advise physicians the dose of drug(s) to provide to their patients. For this purpose, they often run simulations of so-called pharmac... | [
{
"code": null,
"e": 678,
"s": 172,
"text": "Pharmacokinetics (PK) deals with the distribution and metabolism of xenobiotics in organisms. In drug development and clinical research, one encounters pharmacologists whose job it is to advise physicians the dose of drug(s) to provide to their patients. ... |
Print new line and tab in Arduino | In order to print a newline, you can either introduce the '\n' character in your text, or use Serial.println() instead of Serial.print()
An example code is given below −
void setup() {
// put your setup code here, to run once:
Serial.begin(9600);
Serial.println();
Serial.print("This is line1\nThis is line2\... | [
{
"code": null,
"e": 1199,
"s": 1062,
"text": "In order to print a newline, you can either introduce the '\\n' character in your text, or use Serial.println() instead of Serial.print()"
},
{
"code": null,
"e": 1232,
"s": 1199,
"text": "An example code is given below −"
},
{
... |
ReactJS - Create a Component Using Properties | Let us modify our ExpenseEntryItem component and try to use properties.
Open our expense-manager application in your favorite editor.
Open ExpenseEntryItem file in the src/components folder.
Introduce construction function with argument props.
constructor(props) {
super(props);
}
Next, change the render method and... | [
{
"code": null,
"e": 2105,
"s": 2033,
"text": "Let us modify our ExpenseEntryItem component and try to use properties."
},
{
"code": null,
"e": 2167,
"s": 2105,
"text": "Open our expense-manager application in your favorite editor."
},
{
"code": null,
"e": 2224,
"... |
Palindrome program in Java. | Following is the required program.
Live Demo
public class Tester {
public static void main(String args[]) {
int r, sum = 0, temp;
int m = 454;
int n = m;
temp = n;
while (n > 0) {
r = n % 10;
sum = (sum * 10) + r;
n = n / 10;
}
if (temp == sum) {
... | [
{
"code": null,
"e": 1097,
"s": 1062,
"text": "Following is the required program."
},
{
"code": null,
"e": 1107,
"s": 1097,
"text": "Live Demo"
},
{
"code": null,
"e": 1530,
"s": 1107,
"text": "public class Tester {\n public static void main(String args[]) {... |
Advanced Selectors in CSS | The Advanced Selectors in CSS includes Adjacent Sibling selector, attribute selector, direct child selector, nth-of-type selector, etc. It also includes General Sibling Selector, an example is shown below:
h1 ~ h3
Example of direct child selector −
div > span
Following is the code showing advanced selectors in CSS −
L... | [
{
"code": null,
"e": 1268,
"s": 1062,
"text": "The Advanced Selectors in CSS includes Adjacent Sibling selector, attribute selector, direct child selector, nth-of-type selector, etc. It also includes General Sibling Selector, an example is shown below:"
},
{
"code": null,
"e": 1276,
... |
DLL - Tools | Several tools are available to help you troubleshoot DLL problems. Some of them are discussed below.
The Dependency Walker tool (depends.exe) can recursively scan for all the dependent DLLs that are used by a program. When you open a program in Dependency Walker, the Dependency Walker performs the following checks:
Che... | [
{
"code": null,
"e": 1753,
"s": 1652,
"text": "Several tools are available to help you troubleshoot DLL problems. Some of them are discussed below."
},
{
"code": null,
"e": 1969,
"s": 1753,
"text": "The Dependency Walker tool (depends.exe) can recursively scan for all the depende... |
How to retrieve the value from a table cell with TableModel in Java? | At first, create a table with DefaultTableModel −
String data[][] = {
{"Australia","5","1"},
{"US","10","2"},
{"Canada","9","3"},
{"India","7","4"},
{"Poland","2","5"},
{"SriLanka","5","6"}
};
String col [] = {"Team","Selected Players","Rank"};
DefaultTableModel tableModel = new DefaultTableModel(data... | [
{
"code": null,
"e": 1112,
"s": 1062,
"text": "At first, create a table with DefaultTableModel −"
},
{
"code": null,
"e": 1428,
"s": 1112,
"text": "String data[][] = {\n {\"Australia\",\"5\",\"1\"},\n {\"US\",\"10\",\"2\"},\n {\"Canada\",\"9\",\"3\"},\n {\"India\",\"7\",\... |
How to run a Spark application from an EC2 Instance | by Natalie Olivo | Towards Data Science | Why would you do this instead of using EMR? Well, great question. Under certain circumstances, using EC2 might be cheaper than using EMR, but otherwise, EMR may be advisable. In any case, here’s how to run a Spark application from an EC2 instance:
I used a Deep Learning AMI (Ubuntu 16.04) Version 25.3 with a p3 instanc... | [
{
"code": null,
"e": 420,
"s": 172,
"text": "Why would you do this instead of using EMR? Well, great question. Under certain circumstances, using EC2 might be cheaper than using EMR, but otherwise, EMR may be advisable. In any case, here’s how to run a Spark application from an EC2 instance:"
},
... |
Find All Live Hosts IP Addresses Connected on Network in Linux - GeeksforGeeks | 28 Jul, 2021
As network engineers or penetration testers, we need to find the live hosts on the networks. Today we are going to see how to find live hosts on the network. We are going to use the nmap tool to find the live hosts on the network.
Nmap (network mapper) is an open-source command-line tool for network explor... | [
{
"code": null,
"e": 24015,
"s": 23987,
"text": "\n28 Jul, 2021"
},
{
"code": null,
"e": 24246,
"s": 24015,
"text": "As network engineers or penetration testers, we need to find the live hosts on the networks. Today we are going to see how to find live hosts on the network. We ar... |
Python unittest - assertIs() function - GeeksforGeeks | 29 Aug, 2020
assertIs() in Python is a unittest library function that is used in unit testing to test whether first and second input value evaluates to the same object or not. This function will take three parameters as input and return a boolean value depending upon the assert condition. If both input evaluates to the... | [
{
"code": null,
"e": 24069,
"s": 24041,
"text": "\n29 Aug, 2020"
},
{
"code": null,
"e": 24441,
"s": 24069,
"text": "assertIs() in Python is a unittest library function that is used in unit testing to test whether first and second input value evaluates to the same object or not. ... |
Sort an array of 0s, 1s and 2s (Simple Counting) - GeeksforGeeks | 25 Aug, 2021
Given an array A[] consisting 0s, 1s and 2s, write a function that sorts A[]. The functions should put all 0s first, then all 1s and all 2s in last.
Examples:
Input : {0, 1, 2, 0, 1, 2}
Output : {0, 0, 1, 1, 2, 2}
Input : {0, 1, 1, 0, 1, 2, 1, 2, 0, 0, 0, 1}
Output : {0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 2, 2... | [
{
"code": null,
"e": 24939,
"s": 24911,
"text": "\n25 Aug, 2021"
},
{
"code": null,
"e": 25088,
"s": 24939,
"text": "Given an array A[] consisting 0s, 1s and 2s, write a function that sorts A[]. The functions should put all 0s first, then all 1s and all 2s in last."
},
{
... |
Bootstrap 4 - Quick Guide | Bootstrap 4 is a powerful and popular mobile first front-end framework for building responsive mobile first sites on the web. It is a latest version of Bootstrap, which uses HTML, CSS and JavaScript.
The last stable release of Bootstrap v3.3.7 was in July 2016 and in August 2017, Bootstrap 4.0.0 beta version released.
... | [
{
"code": null,
"e": 2016,
"s": 1816,
"text": "Bootstrap 4 is a powerful and popular mobile first front-end framework for building responsive mobile first sites on the web. It is a latest version of Bootstrap, which uses HTML, CSS and JavaScript."
},
{
"code": null,
"e": 2136,
"s": 2... |
Generating OTP (One time Password) in PHP | 10 Oct, 2018
Now these days, OTP (one time password) is mandatory in almost each and every service. A developer can generate OTP in many ways but the challenge is not to be predictive as any one can predict the OTP and can exploit the service.
Some of popular format of OTPs are:
4 or 6 digit Numeric OTP.
4 or 6 alphabe... | [
{
"code": null,
"e": 54,
"s": 26,
"text": "\n10 Oct, 2018"
},
{
"code": null,
"e": 285,
"s": 54,
"text": "Now these days, OTP (one time password) is mandatory in almost each and every service. A developer can generate OTP in many ways but the challenge is not to be predictive as ... |
LocalStorage and SessionStorage | Web Storage APIs | 23 May, 2022
SessionStorage and LocalStorage are known as the web storage API. Data can be stored on the client side by using these APIs.
SessionStorage:
SessionStorage is used for storing data on the client side.
Maximum limit of data saving in SessionStorage is about 5 MB.
Data in the SessionStorage exist till the c... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n23 May, 2022"
},
{
"code": null,
"e": 154,
"s": 28,
"text": "SessionStorage and LocalStorage are known as the web storage API. Data can be stored on the client side by using these APIs. "
},
{
"code": null,
"e": 170,
"s"... |
ScheduledExecutorService Interface in Java | 19 Oct, 2020
The ScheduledExecutorService interface in Java is a sub-interface of ExecutorService interface defined in java.util.concurrent package. This interface is used to run the given tasks periodically or once after a given delay. The ScheduledExecutorService interface has declared some useful methods to schedule... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n19 Oct, 2020"
},
{
"code": null,
"e": 425,
"s": 28,
"text": "The ScheduledExecutorService interface in Java is a sub-interface of ExecutorService interface defined in java.util.concurrent package. This interface is used to run the given... |
JavaScript String toUpperCase() Method | 23 Dec, 2021
Below is the example of the String toUpperCase() Method.
Example:
JavaScript
<script>function func() { var str = 'geeksforgeeks'; var string = str.toUpperCase(); document.write(string);}func();</script>
Output:
GEEKSFORGEEKS
str.toUpperCase() method converts the entire string to Upper case. Th... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n23 Dec, 2021"
},
{
"code": null,
"e": 85,
"s": 28,
"text": "Below is the example of the String toUpperCase() Method."
},
{
"code": null,
"e": 96,
"s": 85,
"text": "Example: "
},
{
"code": null,
"e": 107,... |
deque::push_back() in C++ STL | 06 Oct, 2021
Deque or Double ended queues are sequence containers with the feature of expansion and contraction on both the ends. They are similar to vectors, but are more efficient in case of insertion and deletion of elements at the end, and also the beginning. Unlike vectors, contiguous storage allocation may not be... | [
{
"code": null,
"e": 53,
"s": 25,
"text": "\n06 Oct, 2021"
},
{
"code": null,
"e": 374,
"s": 53,
"text": "Deque or Double ended queues are sequence containers with the feature of expansion and contraction on both the ends. They are similar to vectors, but are more efficient in ca... |
JavaScript String split() Method | 17 May, 2022
Below is the example of the String split() Method.
Example:
JavaScript
<script>// JavaScript Program to illustrate split() function function func() { //Original string var str = 'Geeks for Geeks' var array = str.split("for"); document.write(array);} func();</script>
Output:
Geeks , Geeks
... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n17 May, 2022"
},
{
"code": null,
"e": 81,
"s": 28,
"text": "Below is the example of the String split() Method. "
},
{
"code": null,
"e": 92,
"s": 81,
"text": "Example: "
},
{
"code": null,
"e": 103,
... |
Early Fire detection system using deep learning and OpenCV | by Dhruvil Shah | Towards Data Science | Recent advancements in embedded processing have allowed vision-based systems to detect fire using Convolutional Neural Networks during surveillance. In this article, two custom CNN models have been implemented for a cost-effective fire detection CNN architecture for surveillance videos. The first model is a customized ... | [
{
"code": null,
"e": 937,
"s": 171,
"text": "Recent advancements in embedded processing have allowed vision-based systems to detect fire using Convolutional Neural Networks during surveillance. In this article, two custom CNN models have been implemented for a cost-effective fire detection CNN archi... |
How to create a temperature converter with HTML and JavaScript? | To create a temperature converter with HTML and JavaScript, the code is as follows −
Live Demo
<!DOCTYPE html>
<html>
<head>
<style>
body{
font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}
input,span{
font-size: 20px;
}
</style>
</head>
<body>
<h1>Temperature Converter</h1>
<h2>Ty... | [
{
"code": null,
"e": 1147,
"s": 1062,
"text": "To create a temperature converter with HTML and JavaScript, the code is as follows −"
},
{
"code": null,
"e": 1158,
"s": 1147,
"text": " Live Demo"
},
{
"code": null,
"e": 1800,
"s": 1158,
"text": "<!DOCTYPE html>... |
How to Disable Browser Back Button using jQuery ? - GeeksforGeeks | 10 Aug, 2021
While working with some privacy-related projects, we have to make sure that our programming doesn’t have any kind of loopholes. In this article, we will see how we can disable the back button of the browser intentionally so that users cannot get back and access the content. We have many scenarios where we ... | [
{
"code": null,
"e": 25675,
"s": 25647,
"text": "\n10 Aug, 2021"
},
{
"code": null,
"e": 26021,
"s": 25675,
"text": "While working with some privacy-related projects, we have to make sure that our programming doesn’t have any kind of loopholes. In this article, we will see how we... |
Tailwind CSS overscroll Behavior - GeeksforGeeks | 23 Mar, 2022
This class accepts more than one value in tailwind CSS. It is the alternative to the CSS Overscroll-behavior property. This class is used to set the behavior of the browser when the boundary of a scrolling area is reached. This property can be used to prevent unwanted scrolling in pages where there are mul... | [
{
"code": null,
"e": 35749,
"s": 35721,
"text": "\n23 Mar, 2022"
},
{
"code": null,
"e": 36077,
"s": 35749,
"text": "This class accepts more than one value in tailwind CSS. It is the alternative to the CSS Overscroll-behavior property. This class is used to set the behavior of th... |
How to match one of the two given expressions using Java RegEx? | Using the or logical operator | of Java regular expressions you can match either of two given expressions.
For example, if you need your regular expression should match more than one expression you can do so by separating the required expressions by “|”.
import java.util.Scanner;
import java.util.regex.Matcher;
import ... | [
{
"code": null,
"e": 1169,
"s": 1062,
"text": "Using the or logical operator | of Java regular expressions you can match either of two given expressions."
},
{
"code": null,
"e": 1317,
"s": 1169,
"text": "For example, if you need your regular expression should match more than one... |
Create a temporary table in a MySQL procedure? | To create a temporary table in a MySQL procedure, following is the syntax −
CREATE PROCEDURE yourProcedureName()
BEGIN
CREATE TEMPORARY TABLE yourTemporaryTableName SELECT yourValue;
END
Let us implement the above syntax to create a temporary table and insert some records in the table. Following is the quer... | [
{
"code": null,
"e": 1138,
"s": 1062,
"text": "To create a temporary table in a MySQL procedure, following is the syntax −"
},
{
"code": null,
"e": 1261,
"s": 1138,
"text": "CREATE PROCEDURE yourProcedureName()\n BEGIN\n CREATE TEMPORARY TABLE yourTemporaryTableName SELECT... |
C++ Program to Check Leap Year | A leap year contains one additional day that is added to keep the calendar year synchronized with the astronomical year.
A year that is divisible by 4 is known as a leap year. However, years divisible by 100 are not leap years while those divisible by 400 are.
The program that checks if a year is leap year or not is as... | [
{
"code": null,
"e": 1183,
"s": 1062,
"text": "A leap year contains one additional day that is added to keep the calendar year synchronized with the astronomical year."
},
{
"code": null,
"e": 1323,
"s": 1183,
"text": "A year that is divisible by 4 is known as a leap year. Howeve... |
Exchange Rate Prediction: Machine Learning with 5 Regression Models | by Andrew Nguyen | Towards Data Science | If you have missed my 1st part on this end-to-end project about Exchange Rate Prediction, feel free to check it out here.
As a recap, this project aims to analyze the historical pattern of exchange rates across different country currencies against USD and therefore to forecast the values in 2020. In order to bring out ... | [
{
"code": null,
"e": 294,
"s": 172,
"text": "If you have missed my 1st part on this end-to-end project about Exchange Rate Prediction, feel free to check it out here."
},
{
"code": null,
"e": 618,
"s": 294,
"text": "As a recap, this project aims to analyze the historical pattern ... |
How to save pyttsx3 results to MP3 or WAV file? - GeeksforGeeks | 25 Feb, 2021
In this article, we will see how to generate and save pyttsx3 results as mp3 and wav file. Pyttsx3 is a python module that provides a Text to Speech API. We can use this API to convert the text into voice.
To use pyttsx3 we have to install espeak and ffmpeg first.
sudo apt update
sudo apt install espeak
s... | [
{
"code": null,
"e": 23925,
"s": 23897,
"text": "\n25 Feb, 2021"
},
{
"code": null,
"e": 24132,
"s": 23925,
"text": "In this article, we will see how to generate and save pyttsx3 results as mp3 and wav file. Pyttsx3 is a python module that provides a Text to Speech API. We can us... |
What are Subprograms? | A subprogram is defined as a set of statements that can be reused at multiple places in a program when convenient. This reuse results in multiple types of savings, from memory space to coding time. Such reuse is also an abstraction, for the analysis of subprograms computations are restored in a program by a statement t... | [
{
"code": null,
"e": 1408,
"s": 1062,
"text": "A subprogram is defined as a set of statements that can be reused at multiple places in a program when convenient. This reuse results in multiple types of savings, from memory space to coding time. Such reuse is also an abstraction, for the analysis of ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.