title stringlengths 3 221 | text stringlengths 17 477k | parsed listlengths 0 3.17k |
|---|---|---|
Boxplot using Seaborn in Python | 10 Nov, 2020
Seaborn is an amazing visualization library for statistical graphics plotting in Python. It provides beautiful default styles and color palettes to make statistical plots more attractive. It is built on the top of matplotlib library and also closely integrated into the data structures from pandas.
A box pl... | [
{
"code": null,
"e": 53,
"s": 25,
"text": "\n10 Nov, 2020"
},
{
"code": null,
"e": 352,
"s": 53,
"text": "Seaborn is an amazing visualization library for statistical graphics plotting in Python. It provides beautiful default styles and color palettes to make statistical plots mor... |
JUnit - Using Assertion | All the assertions are in the Assert class.
public class Assert extends java.lang.Object
This class provides a set of assertion methods, useful for writing tests. Only failed assertions are recorded. Some of the important methods of Assert class are as follows −
void assertEquals(boolean expected, boolean actual)
Chec... | [
{
"code": null,
"e": 2150,
"s": 2106,
"text": "All the assertions are in the Assert class."
},
{
"code": null,
"e": 2196,
"s": 2150,
"text": "public class Assert extends java.lang.Object\n"
},
{
"code": null,
"e": 2370,
"s": 2196,
"text": "This class provides ... |
String matching with * (that matches with any) in any of the two strings | 06 May, 2021
You are given two strings A and B. Strings also contains special character * . you can replace * with any alphabetic character. Finally, you have to tell whether it is possible to make both string same or not.Examples:
Input : A = "gee*sforgeeks"
B = "geeksforgeeks"
Output :Yes
Input :A = "abs*"... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n06 May, 2021"
},
{
"code": null,
"e": 273,
"s": 52,
"text": "You are given two strings A and B. Strings also contains special character * . you can replace * with any alphabetic character. Finally, you have to tell whether it is possib... |
PwnXSS – Automated XSS Vulnerability Scanner Tool in Kali Linux | 20 Apr, 2021
PwnXSS is a free and open-source tool available on Github. This tool is specially designed to find cross-site scripting. This tool is written in python. You must have python 3.7 installed in your Kali Linux. There are lots of websites on the internet which are vulnerable to cross-site scripting(XSS). This ... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n20 Apr, 2021"
},
{
"code": null,
"e": 709,
"s": 28,
"text": "PwnXSS is a free and open-source tool available on Github. This tool is specially designed to find cross-site scripting. This tool is written in python. You must have python 3... |
SQL Query to Filter a Table using Another Table | 28 Oct, 2021
In this article, we will see, how to filter a table using another table. We can perform the function by using a subquery in place of the condition in WHERE Clause. A query inside another query is called subquery. It can also be called a nested query. One SQL code can have one or more than one nested query.... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n28 Oct, 2021"
},
{
"code": null,
"e": 336,
"s": 28,
"text": "In this article, we will see, how to filter a table using another table. We can perform the function by using a subquery in place of the condition in WHERE Clause. A query ins... |
Run Scrapy code from Jupyter Notebook without issues | by Tamjid Ahsan | Towards Data Science | Scrapy is an open-source framework for extracting the data from websites. It is fast, simple, and extensible. Every data scientist should have familiarity with this, as they often need to gather data in this manner. Data scientists usually prefer some sort of computational notebook for managing their workflow. Jupyter ... | [
{
"code": null,
"e": 640,
"s": 172,
"text": "Scrapy is an open-source framework for extracting the data from websites. It is fast, simple, and extensible. Every data scientist should have familiarity with this, as they often need to gather data in this manner. Data scientists usually prefer some sor... |
Using Workflow Sets to Screen and Compare Model-Recipe Combinations for Bank Loan Classification | by Murray Gillin | Towards Data Science | Consider you are a data scientist at a large bank, and your CDO has instructed you to develop a means of automating bank loan decisions. You decide that this should be a binary classifier and proceed to collect several hundred data points. But what kind of model should you start off and what sort of feature engineering... | [
{
"code": null,
"e": 552,
"s": 172,
"text": "Consider you are a data scientist at a large bank, and your CDO has instructed you to develop a means of automating bank loan decisions. You decide that this should be a binary classifier and proceed to collect several hundred data points. But what kind o... |
Create Primary Key on an existing table in PostgreSQL? | Although quite infrequent, you may come across situations wherein you need to define the primary key on an existing table. This can be achieved using the ALTER TABLE statement.
The syntax is −
ALTER TABLE table_name ADD PRIMARY KEY (column_name1,
column_name2,...., columns_nameN)
As can be seen from the above syntax, y... | [
{
"code": null,
"e": 1239,
"s": 1062,
"text": "Although quite infrequent, you may come across situations wherein you need to define the primary key on an existing table. This can be achieved using the ALTER TABLE statement."
},
{
"code": null,
"e": 1255,
"s": 1239,
"text": "The s... |
How can we create a custom exception in Java? | Sometimes it is required to develop meaningful exceptions based on the application requirements. We can create our own exceptions by extending Exception class in Java
User-defined exceptions in Java are also known as Custom Exceptions.
CustomException class is the custom exception class this class is extending Exceptio... | [
{
"code": null,
"e": 1229,
"s": 1062,
"text": "Sometimes it is required to develop meaningful exceptions based on the application requirements. We can create our own exceptions by extending Exception class in Java"
},
{
"code": null,
"e": 1298,
"s": 1229,
"text": "User-defined ex... |
Sum of the series 1, 2, 4, 3, 5, 7, 9, 6, 8, 10, 11, 13.. till N-th term - GeeksforGeeks | 10 Oct, 2021
Given a series of numbers 1, 2, 4, 3, 5, 7, 9, 6, 8, 10, 11, 13... The task is to find the sum of all the numbers in series till N-th number. Examples:
Input: N = 4 Output: 10 1 + 2 + 4 + 3 = 10 Input: N = 10 Output: 55
Approach: The series is basically 20 odd numbers, 21 even numbers, 22 even numbers...... | [
{
"code": null,
"e": 25937,
"s": 25909,
"text": "\n10 Oct, 2021"
},
{
"code": null,
"e": 26091,
"s": 25937,
"text": "Given a series of numbers 1, 2, 4, 3, 5, 7, 9, 6, 8, 10, 11, 13... The task is to find the sum of all the numbers in series till N-th number. Examples: "
},
{... |
C# | UInt16 Struct - GeeksforGeeks | 01 May, 2019
In C#, UInt16 struct is used to represent 16-bit unsigned integers(also termed as ushort data type) starting from range 0 to 65535. It provides different types of method to perform various actions like to compare instances of this type, convert the value of an instance to its string representation, convert... | [
{
"code": null,
"e": 25619,
"s": 25591,
"text": "\n01 May, 2019"
},
{
"code": null,
"e": 26122,
"s": 25619,
"text": "In C#, UInt16 struct is used to represent 16-bit unsigned integers(also termed as ushort data type) starting from range 0 to 65535. It provides different types of ... |
Ext.js - Fonts | Ext.js provides the facility to use different font packages. Font packages are used to add different classes for icons available in the package.
Font-Awesome
Font-Pictos
ExtJS new theme, Triton, has an inbuilt font family font-awesome included in the framework itself, hence we do not need any explicit requirement for t... | [
{
"code": null,
"e": 2168,
"s": 2023,
"text": "Ext.js provides the facility to use different font packages. Font packages are used to add different classes for icons available in the package."
},
{
"code": null,
"e": 2181,
"s": 2168,
"text": "Font-Awesome"
},
{
"code": nu... |
Tryit Editor v3.7 | Tryit: HTML image | [] |
Reverse a string using the pointer in C++ | This article reverse a string using the pointer in C++ coding, First, it calculates the length of a pointer to string then run a for loop in decrement order to display the reverse string as follows;
Live Demo
#include <string.h>
#include <iostream>
using namespace std;
int main(){
char *str="ajaykumar";
cout<<"o... | [
{
"code": null,
"e": 1261,
"s": 1062,
"text": "This article reverse a string using the pointer in C++ coding, First, it calculates the length of a pointer to string then run a for loop in decrement order to display the reverse string as follows;"
},
{
"code": null,
"e": 1272,
"s": 12... |
Google Charts - Basic Line Chart | Following is an example of a basic line chart. We've already seen the configuration used to draw this chart in Google Charts Configuration Syntax chapter. So, let's see the complete example.
googlecharts_line_basic.htm
<html>
<head>
<title>Google Charts Tutorial</title>
<script type = "text/javascript" s... | [
{
"code": null,
"e": 2452,
"s": 2261,
"text": "Following is an example of a basic line chart. We've already seen the configuration used to draw this chart in Google Charts Configuration Syntax chapter. So, let's see the complete example."
},
{
"code": null,
"e": 2480,
"s": 2452,
... |
Calculate Arithmetic mean in R Programming - mean() Function - GeeksforGeeks | 05 Jun, 2020
mean() function in R Language is used to calculate the arithmetic mean of the elements of the numeric vector passed to it as argument.
Syntax: mean(x, na.rm)
Parameters:x: Numeric Vectorna.rm: Boolean value to ignore NA value
Example 1:
# R program to calculate# Arithmetic mean of a vector # Creating a nu... | [
{
"code": null,
"e": 24681,
"s": 24653,
"text": "\n05 Jun, 2020"
},
{
"code": null,
"e": 24816,
"s": 24681,
"text": "mean() function in R Language is used to calculate the arithmetic mean of the elements of the numeric vector passed to it as argument."
},
{
"code": null,
... |
Powershell - Get-ChildItem Cmdlet | Get-ChildItem cmdlet can be used to get the items or child items in one or more specific locations.
In these examples, we're see the Get-ChildItem cmdlet in action.
In this example, first we've a file test.txt in D:\temp\test with content "Welcome to TutorialsPoint.Com" and test1.txt with content "Hello World!" and "We... | [
{
"code": null,
"e": 2134,
"s": 2034,
"text": "Get-ChildItem cmdlet can be used to get the items or child items in one or more specific locations."
},
{
"code": null,
"e": 2199,
"s": 2134,
"text": "In these examples, we're see the Get-ChildItem cmdlet in action."
},
{
"co... |
How to Set opacity for View in Android? | This example demonstrates how to Set opacity for View in Android .
Step 1 − Create a new project in Android Studio, go to File ⇒ New Project and fill all required details to create a new project.
Step 2 − Add the following code to res/layout/activity_main.xml.
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xm... | [
{
"code": null,
"e": 1129,
"s": 1062,
"text": "This example demonstrates how to Set opacity for View in Android ."
},
{
"code": null,
"e": 1259,
"s": 1129,
"text": "Step 1 − Create a new project in Android Studio, go to File ⇒ New Project and fill all required details to create ... |
Installing MATLAB on MacOS | 04 Jul, 2021
MATLAB stands for “Matrix Laboratory” and it is a numerical computing environment and fourth-generation programming language. designed by Math Works, MATLAB allows matrix manipulations, plotting of functions and data, implementation of algorithms, creation of user interfaces, and interfacing with programs ... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n04 Jul, 2021"
},
{
"code": null,
"e": 418,
"s": 52,
"text": "MATLAB stands for “Matrix Laboratory” and it is a numerical computing environment and fourth-generation programming language. designed by Math Works, MATLAB allows matrix man... |
NavigableString class – Python Beautifulsoup | 25 Oct, 2020
NavigableString class is provided by Beautiful Soup which is a web scraping framework for Python. Web scraping is the process of extracting data from the website using automated tools to make the process faster. A string corresponds to a bit of text within a tag. Beautiful Soup uses the NavigableString cla... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n25 Oct, 2020"
},
{
"code": null,
"e": 369,
"s": 28,
"text": "NavigableString class is provided by Beautiful Soup which is a web scraping framework for Python. Web scraping is the process of extracting data from the website using automat... |
Program for length of a string using recursion | 13 Jul, 2022
Given a string calculate length of the string using recursion. Examples:
Input : str = "abcd"
Output :4
Input : str = "GEEKSFORGEEKS"
Output :13
Chapters
descriptions off, selected
captions settings, opens captions settings dialog
captions off, selected
English
This is a modal window.
Beginning of dia... | [
{
"code": null,
"e": 53,
"s": 25,
"text": "\n13 Jul, 2022"
},
{
"code": null,
"e": 128,
"s": 53,
"text": "Given a string calculate length of the string using recursion. Examples: "
},
{
"code": null,
"e": 201,
"s": 128,
"text": "Input : str = \"abcd\"\nOutput... |
How to Sort Numeric Array using JavaScript ? | 27 Jan, 2022
The JavaScript Array.sort() method is used to sort the array elements in-place and returns the sorted array. This function sorts the elements in string format. It will work good for string array but not for numbers. For example: if numbers are sorted as string, than “75” is bigger than “200”.Example:
Inp... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n27 Jan, 2022"
},
{
"code": null,
"e": 332,
"s": 28,
"text": "The JavaScript Array.sort() method is used to sort the array elements in-place and returns the sorted array. This function sorts the elements in string format. It will work go... |
Python – tensorflow.eye() | 10 Jul, 2020
TensorFlow is open-source Python library designed by Google to develop Machine Learning models and deep learning neural networks.
tensorflow.eye() is used to generate identity matrix.
Syntax: tensorflow.eye( num_rows, num_columns, batch_shape, dtype, name)
Parameters:
num_rows: It is int32 scalar Tensor ... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n10 Jul, 2020"
},
{
"code": null,
"e": 160,
"s": 28,
"text": "TensorFlow is open-source Python library designed by Google to develop Machine Learning models and deep learning neural networks. "
},
{
"code": null,
"e": 214,
... |
numpy.ones_like() in Python | 22 Oct, 2020
The numpy.one_like() function returns an array of given shape and type as a given array, with ones.
Syntax: numpy.ones_like(array, dtype = None, order = 'K', subok = True)
Parameters :
array : array_like input
subok : [optional, boolean]If true, then newly created array will be sub-class of array;
... | [
{
"code": null,
"e": 53,
"s": 25,
"text": "\n22 Oct, 2020"
},
{
"code": null,
"e": 153,
"s": 53,
"text": "The numpy.one_like() function returns an array of given shape and type as a given array, with ones."
},
{
"code": null,
"e": 225,
"s": 153,
"text": "Synta... |
How to get character array from string in JavaScript? | 20 Jul, 2021
The string in JavaScript can be converted into a character array by using the split() and Array.from() functions.
Using String split() Function: The str.split() function is used to split the given string into array of strings by separating it into substrings using a specified separator provided in the argu... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n20 Jul, 2021"
},
{
"code": null,
"e": 142,
"s": 28,
"text": "The string in JavaScript can be converted into a character array by using the split() and Array.from() functions."
},
{
"code": null,
"e": 348,
"s": 142,
"... |
Panic in Golang | 17 Sep, 2019
In Go language, panic is just like an exception, it also arises at runtime. Or in other words, panic means an unexpected condition arises in your Go program due to which the execution of your program is terminated. Sometimes panic occurs at runtime when some specific situation arises like out-of-bounds arr... | [
{
"code": null,
"e": 53,
"s": 25,
"text": "\n17 Sep, 2019"
},
{
"code": null,
"e": 737,
"s": 53,
"text": "In Go language, panic is just like an exception, it also arises at runtime. Or in other words, panic means an unexpected condition arises in your Go program due to which the ... |
Integer valueOf() Method in Java | 14 Dec, 2021
1. The java.lang.Integer.valueOf(int a) is an inbuilt method which is used to return an Integer instance representing the specified int value a.
Syntax :
public static Integer valueOf(int a)
Parameters : The method accepts a single parameter a of integer type representing the parameter whose Integer insta... | [
{
"code": null,
"e": 53,
"s": 25,
"text": "\n14 Dec, 2021"
},
{
"code": null,
"e": 198,
"s": 53,
"text": "1. The java.lang.Integer.valueOf(int a) is an inbuilt method which is used to return an Integer instance representing the specified int value a."
},
{
"code": null,
... |
QBasic | 11 Jul, 2022
The name QBasic is an acronym for Quick Beginners All Purpose Symbolic Instruction Code. It was developed and launched by Microsoft in the year 1991 and is considered to be one of the most ideal languages for absolute beginners. It was intended as a replacement for GW-BASIC. QBasic was based on earlier Qui... | [
{
"code": null,
"e": 54,
"s": 26,
"text": "\n11 Jul, 2022"
},
{
"code": null,
"e": 609,
"s": 54,
"text": "The name QBasic is an acronym for Quick Beginners All Purpose Symbolic Instruction Code. It was developed and launched by Microsoft in the year 1991 and is considered to be o... |
How to Reset an Input Value when Limit Exceeds using AngularJS ? | 02 Mar, 2020
The task is to handle an input field if the number entered by the user in the input exceeds some limit using angularJS. We define a limitTo directive and use it on an HTML input element. This directive is used for all the handling of overflowing limits. The directive calls a function on the keypress event ... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n02 Mar, 2020"
},
{
"code": null,
"e": 370,
"s": 28,
"text": "The task is to handle an input field if the number entered by the user in the input exceeds some limit using angularJS. We define a limitTo directive and use it on an HTML inp... |
delattr() and del() in Python | 16 Apr, 2021
delattr
The delattr() method is used to delete the named attribute from the object, with the prior permission of the object. Syntax:
delattr(object, name)
The function takes only two parameter:
object : from which
the name attribute is to be removed.
name : of the attribute
which is to be removed.
... | [
{
"code": null,
"e": 53,
"s": 25,
"text": "\n16 Apr, 2021"
},
{
"code": null,
"e": 61,
"s": 53,
"text": "delattr"
},
{
"code": null,
"e": 188,
"s": 61,
"text": "The delattr() method is used to delete the named attribute from the object, with the prior permissi... |
p5.js Keyboard | keyIsPressed | 15 Apr, 2019
The keyIsPressed variable in p5.js is true if any key is pressed and false if no keys are pressed.
Syntax:
keyIsPressed
Below program illustrates the keyIsPressed variable in p5.js:Example-1:
let valueX;let valueY; function setup() { // Create Canvas of size 500*500 createCanvas(1000, 500);} funct... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n15 Apr, 2019"
},
{
"code": null,
"e": 127,
"s": 28,
"text": "The keyIsPressed variable in p5.js is true if any key is pressed and false if no keys are pressed."
},
{
"code": null,
"e": 135,
"s": 127,
"text": "Syntax:... |
SVG viewBox Attribute | 21 Jan, 2022
The viewBox is an attribute of the SVG element in HTML. It is used to scale the SVG element that means we can set the coordinates as well as width and height.
Syntax:
viewBox = "min-x min-y width height"
Attribute Values:
min-x: It is used to set the horizontal axis. It is used to make the SVG move on a ho... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n21 Jan, 2022"
},
{
"code": null,
"e": 187,
"s": 28,
"text": "The viewBox is an attribute of the SVG element in HTML. It is used to scale the SVG element that means we can set the coordinates as well as width and height."
},
{
"c... |
Number of subarrays having sum less than K | 04 May, 2021
Given an array of non-negative numbers and a non-negative number k, find the number of subarrays having sum less than k. We may assume that there is no overflow.Examples :
Input : arr[] = {2, 5, 6}
K = 10
Output : 4
The subarrays are {2}, {5}, {6} and
{2, 5},
Input : arr[] = {1, 11, 2, 3, 15}
... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n04 May, 2021"
},
{
"code": null,
"e": 226,
"s": 52,
"text": "Given an array of non-negative numbers and a non-negative number k, find the number of subarrays having sum less than k. We may assume that there is no overflow.Examples : "... |
How to install a Python Module? | The best and recommended way to install Python modules is to use pip, the Python package manager.
If you have Python 2 >=2.7.9 or Python 3 >=3.4 installed from python.org, you will already have pip and setuptools, but will need to upgrade to the latest version:
On Linux or macOS:
pip install -U pip setuptools
On Window... | [
{
"code": null,
"e": 1285,
"s": 1187,
"text": "The best and recommended way to install Python modules is to use pip, the Python package manager."
},
{
"code": null,
"e": 1449,
"s": 1285,
"text": "If you have Python 2 >=2.7.9 or Python 3 >=3.4 installed from python.org, you will a... |
How to use Bootstrap in ReactJS ? | 28 Apr, 2021
There are the following ways we can use bootstrap in our ReactJS Project.
1. Using Bootstrap CDN: The simplest way to use Bootstrap in your React application is to use BootstrapCDN. There are no downloads or installations needed. Simply provide a link in the head section of your app, as seen in the example... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n28 Apr, 2021"
},
{
"code": null,
"e": 102,
"s": 28,
"text": "There are the following ways we can use bootstrap in our ReactJS Project."
},
{
"code": null,
"e": 343,
"s": 102,
"text": "1. Using Bootstrap CDN: The simp... |
Program to print right and left arrow patterns | 30 Apr, 2021
Write to program to print the right arrow pattern and the left arrow pattern formed of stars. Input is an odd number n which represents height and width of pattern to be printed.Examples:
Input : n = 9
Output :
*
*
*
*
*********
*
*
*
*
*... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n30 Apr, 2021"
},
{
"code": null,
"e": 218,
"s": 28,
"text": "Write to program to print the right arrow pattern and the left arrow pattern formed of stars. Input is an odd number n which represents height and width of pattern to be print... |
Perl | Variables and its Types | 18 Apr, 2022
The reserved memory locations to store values are the Variables. This means that creating a variable, reserves a space in memory. Data type of a variable helps the interpreter to allocate memory and decide what to be stored in the reserved memory. Therefore, variables can store integers, decimals, or strin... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n18 Apr, 2022"
},
{
"code": null,
"e": 455,
"s": 28,
"text": "The reserved memory locations to store values are the Variables. This means that creating a variable, reserves a space in memory. Data type of a variable helps the interpreter... |
Java program to swap two numbers using XOR operator | Following is a program to swap two numbers using XOR operator.
public class ab31_SwapTwoNumberUsingXOR {
public static void main(String args[]){
int a,b;
Scanner sc = new Scanner(System.in);
System.out.println("Enter a value :");
a = sc.nextInt();
System.out.println("Enter b value :");
... | [
{
"code": null,
"e": 1250,
"s": 1187,
"text": "Following is a program to swap two numbers using XOR operator."
},
{
"code": null,
"e": 1729,
"s": 1250,
"text": "public class ab31_SwapTwoNumberUsingXOR {\n public static void main(String args[]){\n int a,b;\n Scanner sc... |
How to Use Material Text Input Layout in Android? | 23 Oct, 2020
Material Design Components (MDC Android) offers designers and developers a way to implement Material Design in their Android application. Developed by a core team of engineers and UX designers at Google, these components enable a reliable development workflow to build beautiful and functional Android appli... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n23 Oct, 2020"
},
{
"code": null,
"e": 706,
"s": 28,
"text": "Material Design Components (MDC Android) offers designers and developers a way to implement Material Design in their Android application. Developed by a core team of engineers... |
How to Change Image Dynamically when User Scrolls using JavaScript ? | 19 Jan, 2022
We are going to add the functionality to our web-page so that whenever the user scrolls up or scrolls down on the image, then the image changes. We have used only 3 images but it can easily be expanded for multiple images.We are keeping the images on top of each other, this makes sure only one image is vis... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n19 Jan, 2022"
},
{
"code": null,
"e": 575,
"s": 28,
"text": "We are going to add the functionality to our web-page so that whenever the user scrolls up or scrolls down on the image, then the image changes. We have used only 3 images but... |
Program to check if two given matrices are identical | 23 Jun, 2022
The below program checks if two square matrices of size 4*4 are identical or not. For any two matrices to be equal, a number of rows and columns in both the matrix should be equal and the corresponding elements should also be equal.
Implementation:
C++
C
Java
Python3
C#
PHP
Javascript
// C++ Program to ch... | [
{
"code": null,
"e": 53,
"s": 25,
"text": "\n23 Jun, 2022"
},
{
"code": null,
"e": 287,
"s": 53,
"text": "The below program checks if two square matrices of size 4*4 are identical or not. For any two matrices to be equal, a number of rows and columns in both the matrix should be ... |
Largest subarray with equal number of 0s and 1s | 21 Feb, 2022
Given an array containing only 0s and 1s, find the largest subarray which contains equal no of 0s and 1s. The expected time complexity is O(n).
Examples:
Input: arr[] = {1, 0, 1, 1, 1, 0, 0}
Output: 1 to 6
(Starting and Ending indexes of output subarray)
Input: arr[] = {1, 1, 1, 1}
Output: No such suba... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n21 Feb, 2022"
},
{
"code": null,
"e": 197,
"s": 52,
"text": "Given an array containing only 0s and 1s, find the largest subarray which contains equal no of 0s and 1s. The expected time complexity is O(n). "
},
{
"code": null,
... |
Python EasyGUI – Enter Box | 05 Sep, 2020
Enter Box : It is used to get the input from the user, input can be any keyboard input, it takes input in form of string. It displays the title, message to be displayed, place to enter a text and a pair of “Ok”, “Cancel” button which is used confirm the input. Also we can set some default text to the place... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n05 Sep, 2020"
},
{
"code": null,
"e": 397,
"s": 28,
"text": "Enter Box : It is used to get the input from the user, input can be any keyboard input, it takes input in form of string. It displays the title, message to be displayed, place... |
Length of longest subarray with increasing contiguous elements | 08 Jul, 2022
Given an array arr[] of length N, the task is to find the length of the longest subarray which consists of consecutive numbers in increasing order, from the array.
Examples:
Input: arr[] = {2, 3, 4, 6, 7, 8, 9, 10}Output: 5Explanation: Subarray {6, 7, 8, 9, 10} is the longest subarray satisfying the given ... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n08 Jul, 2022"
},
{
"code": null,
"e": 192,
"s": 28,
"text": "Given an array arr[] of length N, the task is to find the length of the longest subarray which consists of consecutive numbers in increasing order, from the array."
},
{
... |
How to Impute Missing Values in R? | 04 Jan, 2022
In this article, we will discuss how to impute missing values in R programming language.
In most datasets, there might be missing values either because it wasn’t entered or due to some error. Replacing these missing values with another value is known as Data Imputation. There are several ways of imputation... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n04 Jan, 2022"
},
{
"code": null,
"e": 117,
"s": 28,
"text": "In this article, we will discuss how to impute missing values in R programming language."
},
{
"code": null,
"e": 674,
"s": 117,
"text": "In most datasets,... |
Fix() and Format() Function in MS Access | 02 Sep, 2020
1. Fix() Function :In MS Access, the fix() function returns the integer part of a number. In this function, a number will be pass as a parameter and it will return the integer part of that number.
Syntax :
Fix(number)
Example-1 :
SELECT Fix(-75.43) AS FixNum;
Output –
Example-2 :
SELECT Fix(23.93) AS FixN... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n02 Sep, 2020"
},
{
"code": null,
"e": 225,
"s": 28,
"text": "1. Fix() Function :In MS Access, the fix() function returns the integer part of a number. In this function, a number will be pass as a parameter and it will return the integer... |
Python program to find middle of a linked list using one traversal | 06 Jul, 2022
Given a singly linked list, find the middle of the linked list. Given a singly linked list, find the middle of the linked list. For example, if the given linked list is 1->2->3->4->5 then the output should be 3.
Method 1: Traverse the whole linked list and count the no. of nodes. Now traverse the list agai... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n06 Jul, 2022"
},
{
"code": null,
"e": 264,
"s": 52,
"text": "Given a singly linked list, find the middle of the linked list. Given a singly linked list, find the middle of the linked list. For example, if the given linked list is 1->2-... |
MongoDB – Query Documents using Mongo Shell | 14 Jun, 2022
MongoDB provides you read operations to retrieve documents from the collection or query a collection for a document. You can perform read operations using the db.collection.find() method. This method selects or views the documents from the collection and returns the cursor to the selected document.
find()... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n14 Jun, 2022"
},
{
"code": null,
"e": 329,
"s": 28,
"text": "MongoDB provides you read operations to retrieve documents from the collection or query a collection for a document. You can perform read operations using the db.collection.fi... |
How to make sliders in Plotly? | 01 Oct, 2020
A Plotly is a Python library that is used to design graphs, especially interactive graphs. It can plot various graphs and charts like histogram, barplot, boxplot, spreadplot, and many more. It is mainly used in data analysis as well as financial analysis. plotly is an interactive visualization library.
In... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n01 Oct, 2020"
},
{
"code": null,
"e": 333,
"s": 28,
"text": "A Plotly is a Python library that is used to design graphs, especially interactive graphs. It can plot various graphs and charts like histogram, barplot, boxplot, spreadplot, ... |
Node.js fs.mkdir() Method | 12 Oct, 2021
The fs.mkdir() method i Node.js is used to create a directory asynchronously.
Syntax
fs.mkdir(path, mode, callback)
Parameters: This method accept three parameters as mentioned above and described below:
path: This parameter holds the path of the directory has to be created.
mode: This parameter holds the ... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n12 Oct, 2021"
},
{
"code": null,
"e": 130,
"s": 52,
"text": "The fs.mkdir() method i Node.js is used to create a directory asynchronously."
},
{
"code": null,
"e": 137,
"s": 130,
"text": "Syntax"
},
{
"code"... |
Python | Flatten given list of dictionaries | 12 Jan, 2022
Given a list of the dictionaries, the task is to convert it into single dictionary i.e flattening a list of dictionaries.
Given below are a few methods to solve the given task.
Method #1: Using Naive Method
Python3
# Python code to demonstrate# to flatten list of dictionaries # Initialising dictionaryini_... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n12 Jan, 2022"
},
{
"code": null,
"e": 150,
"s": 28,
"text": "Given a list of the dictionaries, the task is to convert it into single dictionary i.e flattening a list of dictionaries."
},
{
"code": null,
"e": 205,
"s": 15... |
semanage - Unix, Linux Command | # View SELinux user mappings
$ semanage user -l
# Allow joe to login as staff_u
$ semanage login -a -s staff_u joe
# Add file-context for everything under /web (used by restorecon)
$ semanage fcontext -a -t httpd_sys_content_t "/web(/.*)?"
# Allow Apache to listen on port 81
$ semanage port -a -t http_port_t -p tcp 81 | [] |
Ruby | Decision Making (if, if-else, if-else-if, ternary) | Set – 1 | 18 Jan, 2022
Decision Making in programming is similar to decision making in real life. In programming too, a certain block of code needs to be executed when some condition is fulfilled. A programming language uses control statements to control the flow of execution of the program based on certain conditions. These are... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n18 Jan, 2022"
},
{
"code": null,
"e": 547,
"s": 52,
"text": "Decision Making in programming is similar to decision making in real life. In programming too, a certain block of code needs to be executed when some condition is fulfilled. ... |
ReactJS Chakra-UI Card Component | 30 Jul, 2021
Chakra UI is a modern component library for React created by Segun Adebayo to build front-end applications. It provides accessibility, simplicity, and modularity making it a powerful library with over 50 components. Chakra UI comes with concise and scrutable documentation making it easier to build an acces... | [
{
"code": null,
"e": 53,
"s": 25,
"text": "\n30 Jul, 2021"
},
{
"code": null,
"e": 741,
"s": 53,
"text": "Chakra UI is a modern component library for React created by Segun Adebayo to build front-end applications. It provides accessibility, simplicity, and modularity making it a ... |
Find size of largest subset with bitwise AND greater than their bitwise XOR - GeeksforGeeks | 13 Dec, 2021
Given an array arr[] of N integers, the task is to find the size of the largest subset such that the bitwise AND of all elements of the subset is greater than the bitwise XOR of all elements of the subset.
Example:
Input: arr[] = {1, 2, 3, 4, 5}Output: 2Explanation: The subset {2, 3} has the bitwise AND of... | [
{
"code": null,
"e": 24796,
"s": 24768,
"text": "\n13 Dec, 2021"
},
{
"code": null,
"e": 25002,
"s": 24796,
"text": "Given an array arr[] of N integers, the task is to find the size of the largest subset such that the bitwise AND of all elements of the subset is greater than the ... |
COBOL - Internal Sort | Sorting of data in a file or merging of two or more files is a common necessity in almost all business-oriented applications. Sorting is used for arranging records either in ascending or descending order, so that sequential processing can be performed. There are two techniques which are used for sorting files in COBOL ... | [
{
"code": null,
"e": 2344,
"s": 2022,
"text": "Sorting of data in a file or merging of two or more files is a common necessity in almost all business-oriented applications. Sorting is used for arranging records either in ascending or descending order, so that sequential processing can be performed. ... |
PyQt5 QListWidget – Getting Auto Scroll Margin | 06 Aug, 2020
In this article we will see how we can get auto scroll margin of the QListWidget. QListWidget is a convenience class that provides a list view with a classic item-based interface for adding and removing items. QListWidget uses an internal model to manage each QListWidgetItem in the list. This property hold... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n06 Aug, 2020"
},
{
"code": null,
"e": 596,
"s": 28,
"text": "In this article we will see how we can get auto scroll margin of the QListWidget. QListWidget is a convenience class that provides a list view with a classic item-based interf... |
Scanner nextFloat() method in Java with Examples | 12 Oct, 2018
The nextFloat() method of java.util.Scanner class scans the next token of the input as a Float(). If the translation is successful, the scanner advances past the input that matched.
Syntax:
public float nextFloat()
Parameters: The function does not accepts any parameter.
Return Value: This function returns... | [
{
"code": null,
"e": 53,
"s": 25,
"text": "\n12 Oct, 2018"
},
{
"code": null,
"e": 235,
"s": 53,
"text": "The nextFloat() method of java.util.Scanner class scans the next token of the input as a Float(). If the translation is successful, the scanner advances past the input that m... |
Sum of degrees of all nodes of a undirected graph | 07 May, 2021
Given an edge list of a graph we have to find the sum of degree of all nodes of a undirected graph. Example
Examples:
Input : edge list : (1, 2), (2, 3), (1, 4), (2, 4)
Output : sum= 8
Brute force approach We will add the degree of each node of the graph and print the sum.
C++
Java
Python3
C#
PHP
J... | [
{
"code": null,
"e": 54,
"s": 26,
"text": "\n07 May, 2021"
},
{
"code": null,
"e": 164,
"s": 54,
"text": "Given an edge list of a graph we have to find the sum of degree of all nodes of a undirected graph. Example "
},
{
"code": null,
"e": 176,
"s": 164,
"tex... |
LinkedList size() Method in Java | 10 Dec, 2018
The Java.util.LinkedList.size() method is used to get the size of the Linked list or the number of elements present in the linked list.
Syntax:
LinkedList.size()
Parameters: This method does not take any parameter.
Return Value: This method returns the size or the number of elements present in the LinkedL... | [
{
"code": null,
"e": 53,
"s": 25,
"text": "\n10 Dec, 2018"
},
{
"code": null,
"e": 189,
"s": 53,
"text": "The Java.util.LinkedList.size() method is used to get the size of the Linked list or the number of elements present in the linked list."
},
{
"code": null,
"e": 1... |
The most occurring number in a string using Regex in python | 29 Dec, 2020
Given a string str, the task is to extract all the numbers from a string and find out the most occurring element of them using Regex Python.
It is guaranteed that no two element have the same frequency
Input :geek55of55geeks4abc3dr2
Output :55
Input :abcd1def2high2bnasvd3vjhd44
Output :2
Approach:Extrac... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n29 Dec, 2020"
},
{
"code": null,
"e": 169,
"s": 28,
"text": "Given a string str, the task is to extract all the numbers from a string and find out the most occurring element of them using Regex Python."
},
{
"code": null,
"e... |
Initialize a static Map using Java 9 Map.of() | 14 Jul, 2022
In this article, a static map is created and initialised in Java using Java 9.
Static Map in JavaA static map is a map which is defined as static. It means that the map becomes a class member and can be easily used using class.
Java 9 feature – Map.of() methodIn Java 9, Map.of() was introduced which is a c... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n14 Jul, 2022"
},
{
"code": null,
"e": 107,
"s": 28,
"text": "In this article, a static map is created and initialised in Java using Java 9."
},
{
"code": null,
"e": 256,
"s": 107,
"text": "Static Map in JavaA static ... |
Angular7 - Materials/CDK-Virtual Scrolling | This is one of the new features added to Angular 7 called as Virtual Scrolling. This feature is added to CDK (Component Development Kit). Virtual scrolling shows up the visible dom elements to the user, as the user scrolls, the next list is displayed. This gives faster experience as the full list is not loaded at one g... | [
{
"code": null,
"e": 2436,
"s": 2061,
"text": "This is one of the new features added to Angular 7 called as Virtual Scrolling. This feature is added to CDK (Component Development Kit). Virtual scrolling shows up the visible dom elements to the user, as the user scrolls, the next list is displayed. T... |
Difference between Arrays and Collection in Java - GeeksforGeeks | 29 Dec, 2021
An array in Java is a group of like-typed variables referred to by a common name. Arrays in Java work differently than they do in C/C++. Following are some important points about Java arrays. On the other hand, any group of individual objects which are represented as a single unit is known as the collectio... | [
{
"code": null,
"e": 23893,
"s": 23865,
"text": "\n29 Dec, 2021"
},
{
"code": null,
"e": 24369,
"s": 23893,
"text": "An array in Java is a group of like-typed variables referred to by a common name. Arrays in Java work differently than they do in C/C++. Following are some importa... |
How to Render Interactive Weather Models Entirely in the Browser | by Thomas Horner | Towards Data Science | Weather enthusiasts, meteorologists, and storm chasers are aware of the myriad of weather model visualization websites out on the web. These platforms allow you to view various parameters, levels, and forecast hours of dozens of different weather models. For example, when preparing for a day of storm chasing, a chaser ... | [
{
"code": null,
"e": 752,
"s": 171,
"text": "Weather enthusiasts, meteorologists, and storm chasers are aware of the myriad of weather model visualization websites out on the web. These platforms allow you to view various parameters, levels, and forecast hours of dozens of different weather models. ... |
How do I convert a datetime to a UTC timestamp in Python? | You can use the datetime module to convert a datetime to a UTC timestamp in Python. If you already have the datetime object in UTC, you can the timestamp() to get a UTC timestamp. This function returns the time since epoch for that datetime object. If you have the datetime object in local timezone, first replace the ti... | [
{
"code": null,
"e": 1420,
"s": 1062,
"text": "You can use the datetime module to convert a datetime to a UTC timestamp in Python. If you already have the datetime object in UTC, you can the timestamp() to get a UTC timestamp. This function returns the time since epoch for that datetime object. If y... |
How to make page links in HTML Page? | With HTML, easily add page links to an HTML page. Link contact us, about, home or any other external website page using the page links, which gets added inside an HTML document. To make page links in an HTML page, use the <a> and </a> tags, which are the tags used to define the links.
The <a> tag indicates where the li... | [
{
"code": null,
"e": 1348,
"s": 1062,
"text": "With HTML, easily add page links to an HTML page. Link contact us, about, home or any other external website page using the page links, which gets added inside an HTML document. To make page links in an HTML page, use the <a> and </a> tags, which are th... |
How to create a 3D outset and inset border using CSS ? - GeeksforGeeks | 21 May, 2021
In this article, we will create a 3D outset and inset border using CSS. Inset border property makes the content appear embedded (inside the surface) and on the other hand, the outset property makes the content appear embossed (outside the surface). You can achieve this task by using the border-style proper... | [
{
"code": null,
"e": 25376,
"s": 25348,
"text": "\n21 May, 2021"
},
{
"code": null,
"e": 25723,
"s": 25376,
"text": "In this article, we will create a 3D outset and inset border using CSS. Inset border property makes the content appear embedded (inside the surface) and on the oth... |
Distinguish between Finite Automata and Turing Machine | Before understanding the differences between the finite automata (FA) and the turing machine (TM), let us learn about these concepts.
Finite automata is an abstract computing device
It is a mathematical model of a system with discrete inputs, outputs, states and set of transitions from state to state that occurs on inp... | [
{
"code": null,
"e": 1196,
"s": 1062,
"text": "Before understanding the differences between the finite automata (FA) and the turing machine (TM), let us learn about these concepts."
},
{
"code": null,
"e": 1244,
"s": 1196,
"text": "Finite automata is an abstract computing device"... |
Tk - Canvas Bitmap Widget | Bitmap widget is used to add bitmap to canvas. The syntax for bitmap widget is shown below −
canvasName create bitmap x y options
x and y set the location of bitmap −
The options available for the bitmap widget are listed below in the following table −
-anchor position
The bitmap will be positioned relative to the x a... | [
{
"code": null,
"e": 2294,
"s": 2201,
"text": "Bitmap widget is used to add bitmap to canvas. The syntax for bitmap widget is shown below −"
},
{
"code": null,
"e": 2332,
"s": 2294,
"text": "canvasName create bitmap x y options\n"
},
{
"code": null,
"e": 2369,
"s"... |
Date Formatting Using printf | Date and time formatting can be done very easily using the printf method. You use a two-letter format, starting with t and ending in one of the letters of the table as shown in the following code.
Live Demo
import java.util.Date;
public class DateDemo {
public static void main(String args[]) {
// Instantiate ... | [
{
"code": null,
"e": 1259,
"s": 1062,
"text": "Date and time formatting can be done very easily using the printf method. You use a two-letter format, starting with t and ending in one of the letters of the table as shown in the following code."
},
{
"code": null,
"e": 1269,
"s": 1259... |
How do I declare a two-dimensional array in C++ using new? | A dynamic 2D array is basically an array of pointers to arrays. So you first need to initialize the array of pointers to pointers and then initialize each 1d array in a loop.
#include<iostream>
using namespace std;
int main() {
int rows = 3, cols = 4;
int** arr = new int*[rows];
for(int i = 0; i < rows; ++i)
... | [
{
"code": null,
"e": 1237,
"s": 1062,
"text": "A dynamic 2D array is basically an array of pointers to arrays. So you first need to initialize the array of pointers to pointers and then initialize each 1d array in a loop."
},
{
"code": null,
"e": 1425,
"s": 1237,
"text": "#includ... |
Performing Over-The-Air Update of ESP32 firmware | Say you have a thousand IoT devices out in the field. Now, if one fine day, you find a bug in the production code, and wish to fix it, will you recall all the thousand devices and flash the new firmware in them? Probably not! What you'll prefer to have is a way to update all the devices remotely, over-the-air. OTA upda... | [
{
"code": null,
"e": 2780,
"s": 2183,
"text": "Say you have a thousand IoT devices out in the field. Now, if one fine day, you find a bug in the production code, and wish to fix it, will you recall all the thousand devices and flash the new firmware in them? Probably not! What you'll prefer to have ... |
Python, Performance, and GPUs. A status update for using GPU... | by Matthew Rocklin | Towards Data Science | This blogpost was delivered in talk form at the recent PASC 2019 conference. Slides for that talk are here.
We’re improving the state of scalable GPU computing in Python.
This post lays out the current status, and describes future work. It also summarizes and links to several other more blogposts from recent months tha... | [
{
"code": null,
"e": 280,
"s": 172,
"text": "This blogpost was delivered in talk form at the recent PASC 2019 conference. Slides for that talk are here."
},
{
"code": null,
"e": 343,
"s": 280,
"text": "We’re improving the state of scalable GPU computing in Python."
},
{
"... |
Insecure Direct Object References | A direct object reference is likely to occur when a developer exposes a reference to an internal implementation object, such as a file, directory, or database key without any validation mechanism which allows attackers to manipulate these references to access unauthorized data.
Let us understand Threat Agents, Attack V... | [
{
"code": null,
"e": 2719,
"s": 2440,
"text": "A direct object reference is likely to occur when a developer exposes a reference to an internal implementation object, such as a file, directory, or database key without any validation mechanism which allows attackers to manipulate these references to ... |
Python | Pandas Index.to_series() - GeeksforGeeks | 24 Dec, 2018
Python is a great language for doing data analysis, primarily because of the fantastic ecosystem of data-centric python packages. Pandas is one of those packages and makes importing and analyzing data much easier.
Pandas Index.to_series() function create a Series with both index and values equal to the ind... | [
{
"code": null,
"e": 24019,
"s": 23991,
"text": "\n24 Dec, 2018"
},
{
"code": null,
"e": 24233,
"s": 24019,
"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... |
Arduino - delayMicroseconds () function | The delayMicroseconds() function accepts a single integer (or number) argument. This number represents the time and is measured in microseconds. There are a thousand microseconds in a millisecond, and a million microseconds in a second.
Currently, the largest value that can produce an accurate delay is 16383. This may ... | [
{
"code": null,
"e": 3107,
"s": 2870,
"text": "The delayMicroseconds() function accepts a single integer (or number) argument. This number represents the time and is measured in microseconds. There are a thousand microseconds in a millisecond, and a million microseconds in a second."
},
{
"c... |
Python | Compare tuples | 21 Nov, 2019
Sometimes, while working with records, we can have a problem in which we need to check if each element of one tuple is greater/smaller than it’s corresponding index in other tuple. This can have many possible applications. Let’s discuss certain ways in which this task can be performed.
Method #1 : Using al... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n21 Nov, 2019"
},
{
"code": null,
"e": 315,
"s": 28,
"text": "Sometimes, while working with records, we can have a problem in which we need to check if each element of one tuple is greater/smaller than it’s corresponding index in other t... |
Karger’s algorithm for Minimum Cut | Set 1 (Introduction and Implementation) | 27 Jun, 2022
Given an undirected and unweighted graph, find the smallest cut (smallest number of edges that disconnects the graph into two components). The input graph may have parallel edges.
For example consider the following example, the smallest cut has 2 edges.
A Simple Solution use Max-Flow based s-t cut algorith... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n27 Jun, 2022"
},
{
"code": null,
"e": 232,
"s": 52,
"text": "Given an undirected and unweighted graph, find the smallest cut (smallest number of edges that disconnects the graph into two components). The input graph may have parallel e... |
Python | Repeat each element K times in list | 08 Apr, 2019
Many times we have this particular use-case in which we need to repeat each element of list K times. The problems of making a double clone have been discussed but this problem extends to allow a flexible variable to define the number of times the element has to be repeated. Let’s discuss certain ways in wh... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n08 Apr, 2019"
},
{
"code": null,
"e": 362,
"s": 28,
"text": "Many times we have this particular use-case in which we need to repeat each element of list K times. The problems of making a double clone have been discussed but this problem... |
Node.js Stream.pipeline() Method | 11 Oct, 2021
The stream.pipeline() method is a module method that is used to the pipe by linking the streams passing on errors and accurately cleaning up and providing a callback function when the pipeline is done.
Syntax:
stream.pipeline(...streams, callback)
Parameters: This method accepts two parameters as mentioned... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n11 Oct, 2021"
},
{
"code": null,
"e": 230,
"s": 28,
"text": "The stream.pipeline() method is a module method that is used to the pipe by linking the streams passing on errors and accurately cleaning up and providing a callback function ... |
Difference between Angular and AngularJS | 30 Jun, 2022
In this article, we will learn about Angular JS & Angular, along with understanding the significant distinction between them.
Angular JS: AngularJS is a JavaScript open-source front-end framework that is mainly used to develop single-page web applications(SPAs). It is a continuously growing and expanding f... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n30 Jun, 2022"
},
{
"code": null,
"e": 178,
"s": 52,
"text": "In this article, we will learn about Angular JS & Angular, along with understanding the significant distinction between them."
},
{
"code": null,
"e": 946,
"s... |
How to Perform Debouncing in ReactJS ? | 29 Jun, 2021
A Debouncing Events in ReactJS will allow you to call a function that ensures that a time-consuming task does not fire so often. It’s a function that takes a function as a parameter and wraps that function in a closure and returns it so this new function displays the “wait for a bit” behavior.
Creating Rea... | [
{
"code": null,
"e": 54,
"s": 26,
"text": "\n29 Jun, 2021"
},
{
"code": null,
"e": 349,
"s": 54,
"text": "A Debouncing Events in ReactJS will allow you to call a function that ensures that a time-consuming task does not fire so often. It’s a function that takes a function as a pa... |
NLP | Singularizing Plural Nouns and Swapping Infinite Phrases | 26 Feb, 2019
Let’s understand this with an example :
Is our child training enough?Is are our child training enough?
Is our child training enough?
Is are our child training enough?
The verb ‘is’ can only be used with singular nouns. For plural nouns, we use ‘are’. This problem is very common in the real world and we can... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n26 Feb, 2019"
},
{
"code": null,
"e": 68,
"s": 28,
"text": "Let’s understand this with an example :"
},
{
"code": null,
"e": 131,
"s": 68,
"text": "Is our child training enough?Is are our child training enough?"
},... |
Creating an ArrayList with Multiple Object Types in Java | 22 Oct, 2021
ArrayList class Java is basically a resizable array i.e. it can grow and shrink in size dynamically according to the values that we add to it. It is present in java.util package.
Syntax: To create an ArrayList of Integer type is mentioned below.
List<Integer> list = new ArrayList <Integer>();
It is more c... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n22 Oct, 2021"
},
{
"code": null,
"e": 208,
"s": 28,
"text": "ArrayList class Java is basically a resizable array i.e. it can grow and shrink in size dynamically according to the values that we add to it. It is present in java.util packa... |
Find Maximum and Minimum of two numbers using Absolute function | 04 Dec, 2021
Given two numbers, the task is to print the maximum and minimum of the given numbers using Absolute function.Examples:
Input: 99, 18
Output: Maximum = 99
Minimum = 18
Input: -10, 20
Output: Maximum = 20
Minimum = -10
Input: -1, -5
Output: Maximum = -1
Minimum = -5
Approach: Th... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n04 Dec, 2021"
},
{
"code": null,
"e": 149,
"s": 28,
"text": "Given two numbers, the task is to print the maximum and minimum of the given numbers using Absolute function.Examples: "
},
{
"code": null,
"e": 321,
"s": 149... |
Minimum steps required to reach the end of a matrix | Set 2 | 13 May, 2021
Given a 2d-matrix mat[][] consisting of positive integers, the task is to find the minimum number of steps required to reach the end of the matrix. If we are at cell (i, j) we can go to cells (i, j + arr[i][j]) or (i + arr[i][j], j). We cannot go out of bounds. If no path exists then print -1.
Examples:
... | [
{
"code": null,
"e": 54,
"s": 26,
"text": "\n13 May, 2021"
},
{
"code": null,
"e": 349,
"s": 54,
"text": "Given a 2d-matrix mat[][] consisting of positive integers, the task is to find the minimum number of steps required to reach the end of the matrix. If we are at cell (i, j) w... |
Window | Window.requestAnimationFrame() Method | 23 Oct, 2019
Nowadays, various web development technologies are introduced to create elegant web pages. While talking about elegant web pages, one of the most important things that come to mind is animation. There are many ways to generate them, modern CSS is one of them but JavaScript has always been a power-packed op... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n23 Oct, 2019"
},
{
"code": null,
"e": 350,
"s": 28,
"text": "Nowadays, various web development technologies are introduced to create elegant web pages. While talking about elegant web pages, one of the most important things that come to... |
R - Break Statement | The break statement in R programming language has the following two usages −
When the break statement is encountered inside a loop, the loop is immediately terminated and program control resumes at the next statement following the loop.
When the break statement is encountered inside a loop, the loop is immediately term... | [
{
"code": null,
"e": 2479,
"s": 2402,
"text": "The break statement in R programming language has the following two usages −"
},
{
"code": null,
"e": 2639,
"s": 2479,
"text": "When the break statement is encountered inside a loop, the loop is immediately terminated and program con... |
numpy.hstack() in Python - GeeksforGeeks | 06 Jan, 2019
numpy.hstack() function is used to stack the sequence of input arrays horizontally (i.e. column wise) to make a single array.
Syntax : numpy.hstack(tup)
Parameters :tup : [sequence of ndarrays] Tuple containing arrays to be stacked. The arrays must have the same shape along all but the second axis.
Return ... | [
{
"code": null,
"e": 24468,
"s": 24440,
"text": "\n06 Jan, 2019"
},
{
"code": null,
"e": 24594,
"s": 24468,
"text": "numpy.hstack() function is used to stack the sequence of input arrays horizontally (i.e. column wise) to make a single array."
},
{
"code": null,
"e": ... |
Retrieve MIN and MAX date in a single MySQL query from a column with date values | For this, you can use aggregate function MIN() and MAX(). Let us first create a table −
mysql> create table DemoTable(AdmissionDate date);
Query OK, 0 rows affected (0.76 sec)
Insert some records in the table using insert command −
mysql> insert into DemoTable values('2019-01-21');
Query OK, 1 row affected (0.11 sec)
m... | [
{
"code": null,
"e": 1150,
"s": 1062,
"text": "For this, you can use aggregate function MIN() and MAX(). Let us first create a table −"
},
{
"code": null,
"e": 1238,
"s": 1150,
"text": "mysql> create table DemoTable(AdmissionDate date);\nQuery OK, 0 rows affected (0.76 sec)"
},... |
Write a program in JavaScript to check if two strings are anagrams of each other or not | Given two strings ‘a’ and string ‘b’, we have to check if they are anagrams of each other or not and return True/False. For example,
Input-1 −
String a= “india”
String b= “nidia”
Output −
True
Explanation − Since the given string ‘b’ contains all the characters in the string ‘a’ thus we will return True.
Input-2 −
Stri... | [
{
"code": null,
"e": 1195,
"s": 1062,
"text": "Given two strings ‘a’ and string ‘b’, we have to check if they are anagrams of each other or not and return True/False. For example,"
},
{
"code": null,
"e": 1205,
"s": 1195,
"text": "Input-1 −"
},
{
"code": null,
"e": 12... |
HTML5 Canvas to PNG File | To convert HTML5 canvas to PNG, follow the below-given steps −
You need to add the generated data URL to the href attribute of an <a> tag.
Dialog for base64 image −
<img src="data:image/png;base64,iOBVRw0KGgoAAAANSUhEUg...." class="image" />
Add a filename −
<a download="newimg.png" href="...">
Now define http headers ... | [
{
"code": null,
"e": 1125,
"s": 1062,
"text": "To convert HTML5 canvas to PNG, follow the below-given steps −"
},
{
"code": null,
"e": 1201,
"s": 1125,
"text": "You need to add the generated data URL to the href attribute of an <a> tag."
},
{
"code": null,
"e": 1227,
... |
How to create Buttons in a game using PyGame? - GeeksforGeeks | 08 May, 2020
Pygame is a Python library that can be used specifically to design and build games. Pygame only supports 2D games that are build using different shapes/images called sprites. Pygame is not particularly best for designing games as it is very complex to use and lacks a proper GUI like unity gaming engine but... | [
{
"code": null,
"e": 24065,
"s": 24037,
"text": "\n08 May, 2020"
},
{
"code": null,
"e": 24429,
"s": 24065,
"text": "Pygame is a Python library that can be used specifically to design and build games. Pygame only supports 2D games that are build using different shapes/images call... |
How to clear an entire Treeview with Tkinter? | Tkinter Treeview widgets are used to display the hierarchy of the items in the form of a list. It generally looks like the file explorer in Windows or Mac OS.
Let us suppose we have created a list of items using treeview widget and we want to clear the entire treeview, then we can use the delete() function. The functio... | [
{
"code": null,
"e": 1221,
"s": 1062,
"text": "Tkinter Treeview widgets are used to display the hierarchy of the items in the form of a list. It generally looks like the file explorer in Windows or Mac OS."
},
{
"code": null,
"e": 1440,
"s": 1221,
"text": "Let us suppose we have ... |
Doing and reporting your first ANOVA and ANCOVA in R | by Matthieu Renard | Towards Data Science | Analysis of Variance, or ANOVA, is a frequently-used and fundamental statistical test in many sciences. In its most common form, it analyzes how much of the variance of the dependent variable can be attributed to the independent variable(s) in the model. It is most often used to analyze the impact of a categorical inde... | [
{
"code": null,
"e": 949,
"s": 172,
"text": "Analysis of Variance, or ANOVA, is a frequently-used and fundamental statistical test in many sciences. In its most common form, it analyzes how much of the variance of the dependent variable can be attributed to the independent variable(s) in the model. ... |
Play sound in Python - GeeksforGeeks | 13 Jan, 2021
In this article, we will see how to play sound in Python using some of the most popular audio libraries. We will learn about the various methods for playing sound.
Method 1: Using playsound module
Run the following command to install the packages:
pip install playsound
The playsound module contains only a ... | [
{
"code": null,
"e": 23927,
"s": 23899,
"text": "\n13 Jan, 2021"
},
{
"code": null,
"e": 24091,
"s": 23927,
"text": "In this article, we will see how to play sound in Python using some of the most popular audio libraries. We will learn about the various methods for playing sound.... |
Deploy Nodejs microservices to a Docker Swarm Cluster [Docker from zero to hero] | by Cristian Ramirez | Towards Data Science | This is the 🖐🏽 fifth article from the series “Build a NodeJS cinema microservice”. This series of articles demonstrates how to design, build, and deploy microservices with expressjs using ES6, ¿ES7 ...8?, connected to a MongoDB Replica Set, and deploying it into a docker containers to simulate the power of a cloud en... | [
{
"code": null,
"e": 501,
"s": 172,
"text": "This is the 🖐🏽 fifth article from the series “Build a NodeJS cinema microservice”. This series of articles demonstrates how to design, build, and deploy microservices with expressjs using ES6, ¿ES7 ...8?, connected to a MongoDB Replica Set, and deployin... |
Deep Learning With Weighted Cross Entropy Loss On Imbalanced Tabular Data Using FastAI | by Faiyaz Hasan | Towards Data Science | FastAI is an incredibly convenient and powerful machine learning library bringing Deep Learning (DL) to the masses. I was motivated to write this article while troubleshooting some issues related to training a model for a binary classification task. My objective is to walk you through the steps required to a build a si... | [
{
"code": null,
"e": 696,
"s": 172,
"text": "FastAI is an incredibly convenient and powerful machine learning library bringing Deep Learning (DL) to the masses. I was motivated to write this article while troubleshooting some issues related to training a model for a binary classification task. My ob... |
C# Program for Activity Selection Problem | Greedy Algo-1 - GeeksforGeeks | 22 Aug, 2019
You are given n activities with their start and finish times. Select the maximum number of activities that can be performed by a single person, assuming that a person can only work on a single activity at a time.Example:
Example 1 : Consider the following 3 activities sorted
by finish time.
start[] =... | [
{
"code": null,
"e": 24893,
"s": 24865,
"text": "\n22 Aug, 2019"
},
{
"code": null,
"e": 25114,
"s": 24893,
"text": "You are given n activities with their start and finish times. Select the maximum number of activities that can be performed by a single person, assuming that a per... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.