title stringlengths 3 221 | text stringlengths 17 477k | parsed listlengths 0 3.17k |
|---|---|---|
Table | Guava | Java - GeeksforGeeks | 24 May, 2018
Guava’s Table is a collection that represents a table like structure containing rows, columns and the associated cell values. The row and the column act as an ordered pair of keys.
The row and column act as an ordered pair of keys. If we have to manage this the traditional way then the structure would be a... | [
{
"code": null,
"e": 24143,
"s": 24115,
"text": "\n24 May, 2018"
},
{
"code": null,
"e": 24324,
"s": 24143,
"text": "Guava’s Table is a collection that represents a table like structure containing rows, columns and the associated cell values. The row and the column act as an orde... |
How to apply NOW() to timestamps field in MySQL Workbench? | Let us first create a table −
create table DemoTable
(
Id int NOT NULL AUTO_INCREMENT PRIMARY KEY,
ShippingDate timestamp
);
Insert some records in the table using insert command. Here, we have included the current date with NOW() −
INSERT INTO DemoTable(ShippingDate) VALUES(now());
Display all records from the t... | [
{
"code": null,
"e": 1092,
"s": 1062,
"text": "Let us first create a table −"
},
{
"code": null,
"e": 1193,
"s": 1092,
"text": "create table DemoTable\n(\n Id int NOT NULL AUTO_INCREMENT PRIMARY KEY,\n ShippingDate timestamp\n);"
},
{
"code": null,
"e": 1301,
... |
How to iterate over an Array using for loop in Golang? - GeeksforGeeks | 05 May, 2020
An array is a data structure of the collection of items of the similar type stored in contiguous locations. For performing operations on arrays, the need arises to iterate through it. A for loop is used to iterate over data structures in programming languages. It can be used here in the following ways:
Exa... | [
{
"code": null,
"e": 24035,
"s": 24007,
"text": "\n05 May, 2020"
},
{
"code": null,
"e": 24339,
"s": 24035,
"text": "An array is a data structure of the collection of items of the similar type stored in contiguous locations. For performing operations on arrays, the need arises to... |
Bar Chart with negative values | Following is an example of a Bar Chart with negative values.
We have already seen the configurations used to draw a chart in Highcharts Configuration Syntax chapter. Now, let us see an example of a basic bar chart with negative values.
app.component.ts
import { Component } from '@angular/core';
import * as Highcharts ... | [
{
"code": null,
"e": 2096,
"s": 2035,
"text": "Following is an example of a Bar Chart with negative values."
},
{
"code": null,
"e": 2272,
"s": 2096,
"text": "We have already seen the configurations used to draw a chart in Highcharts Configuration Syntax chapter. Now, let us see ... |
Integer hashCode() Method in Java | 05 Dec, 2018
The java.lang.Integer.hashCode() method of Integer class in Java is used to return the hash code for a particular Integer .
Syntax:
public int hashCode()
Parameters : The method does not take any parameters.
Return Value: The method returns a hash code integer value for this object, which is equal to the u... | [
{
"code": null,
"e": 54,
"s": 26,
"text": "\n05 Dec, 2018"
},
{
"code": null,
"e": 178,
"s": 54,
"text": "The java.lang.Integer.hashCode() method of Integer class in Java is used to return the hash code for a particular Integer ."
},
{
"code": null,
"e": 186,
"s":... |
PHP money_format() Function | 14 Jul, 2020
The money_format() function is an inbuilt function in PHP that returns a number formatted as a currency string. In the main string, the formatted number is inserted where there is a percentage sign (%).The function is only defined in systems with strfmon() capacities. For example, money_format() is not def... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n14 Jul, 2020"
},
{
"code": null,
"e": 580,
"s": 28,
"text": "The money_format() function is an inbuilt function in PHP that returns a number formatted as a currency string. In the main string, the formatted number is inserted where ther... |
Python – Frequencies of Values in a Dictionary | 01 Oct, 2020
Sometimes, while working with python dictionaries, we can have a problem in which we need to extract the frequency of values in the dictionary. This is quite a common problem and has applications in many domains including web development and day-day programming. Let’s discuss certain ways in which this tas... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n01 Oct, 2020"
},
{
"code": null,
"e": 355,
"s": 28,
"text": "Sometimes, while working with python dictionaries, we can have a problem in which we need to extract the frequency of values in the dictionary. This is quite a common problem ... |
How to run MongoDB shell using mongos command?
| In order to launch the MongoDB shell, you need to use mongo command. Following is the syntax −
>mongo
First reach the MongoDB bin directory from command prompt as in the below screenshot −
Here is the command to launch the mongo shell as in the below screenshot −
This will produce the following output − | [
{
"code": null,
"e": 1282,
"s": 1187,
"text": "In order to launch the MongoDB shell, you need to use mongo command. Following is the syntax −"
},
{
"code": null,
"e": 1289,
"s": 1282,
"text": ">mongo"
},
{
"code": null,
"e": 1376,
"s": 1289,
"text": "First rea... |
Python | Pandas Series.nonzero() to get Index of all non zero values in a series | 30 Sep, 2019
Python is a great language for doing data analysis, primarily because of the fantastic ecosystem of data-centric Python packages. Pandas is one of those packages and makes importing and analyzing data much easier.
Pandas Series.nonzero() is an argument less method. Just like it name says, rather returning ... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n30 Sep, 2019"
},
{
"code": null,
"e": 242,
"s": 28,
"text": "Python is a great language for doing data analysis, primarily because of the fantastic ecosystem of data-centric Python packages. Pandas is one of those packages and makes imp... |
What are chrome extensions? | 31 Oct, 2019
It is a small program to modify the experience or add functionality to the chrome browser. They are created using web technology like HTML, CSS, JavaScript, etc.The main aim of an extension is to serve a single purpose around which the whole program is built, although it can have multiple components but th... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n31 Oct, 2019"
},
{
"code": null,
"e": 704,
"s": 28,
"text": "It is a small program to modify the experience or add functionality to the chrome browser. They are created using web technology like HTML, CSS, JavaScript, etc.The main aim o... |
Reentrant Lock in Java | 04 Feb, 2021
Background
The traditional way to achieve thread synchronization in Java is by the use of synchronized keyword. While it provides a certain basic synchronization, the synchronized keyword is quite rigid in its use. For example, a thread can take a lock only once. Synchronized blocks don’t offer any mechani... | [
{
"code": null,
"e": 54,
"s": 26,
"text": "\n04 Feb, 2021"
},
{
"code": null,
"e": 65,
"s": 54,
"text": "Background"
},
{
"code": null,
"e": 636,
"s": 65,
"text": "The traditional way to achieve thread synchronization in Java is by the use of synchronized keyw... |
Python – Removing Constant Features From the Dataset | 02 Sep, 2020
Those features which contain constant values (i.e. only one value for all the outputs or target values) in the dataset are known as Constant Features. These features don’t provide any information to the target feature. These are redundant data available in the dataset. Presence of this feature has no effec... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n02 Sep, 2020"
},
{
"code": null,
"e": 568,
"s": 28,
"text": "Those features which contain constant values (i.e. only one value for all the outputs or target values) in the dataset are known as Constant Features. These features don’t pro... |
How to upload files using HTML to website ? | 31 Oct, 2021
Every file that needs to be uploaded to the website, required the basic form which facilitates uploading. This feature is essential when we are filling the form on a specific website. This file upload may support a variety of file formats along with various types of files. The file uploading feature is one... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n31 Oct, 2021"
},
{
"code": null,
"e": 577,
"s": 28,
"text": "Every file that needs to be uploaded to the website, required the basic form which facilitates uploading. This feature is essential when we are filling the form on a specific ... |
Hierarchically-clustered Heatmap in Python with Seaborn Clustermap | 02 Dec, 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.
Cluster... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n02 Dec, 2020"
},
{
"code": null,
"e": 328,
"s": 28,
"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 more... |
sizeof() Operator in C# | 28 May, 2020
The sizeof() operator is used to obtain the size of a data type in bytes in bytes. It will not return the size of the variables or instances. Its return type is always int.
Syntax:
int sizeof(type);
Examples:
Input : sizeof(byte);
Output : 1
Input : sizeof(int);
Output : 4
// C# program to illustrate the... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n28 May, 2020"
},
{
"code": null,
"e": 201,
"s": 28,
"text": "The sizeof() operator is used to obtain the size of a data type in bytes in bytes. It will not return the size of the variables or instances. Its return type is always int."
... |
What is Bridge Protocol Data Unit (BPDU) Frame? | 03 Dec, 2021
Bridge Protocol Data Unit is fundamentally a tree traversed convention which portrays each message of the organization with the various sorts of characteristics on the organization like the MAC address or the IP address utilizing distinctive switch ports present on the organization.
The Spanning Tree Pro... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n03 Dec, 2021"
},
{
"code": null,
"e": 314,
"s": 28,
"text": "Bridge Protocol Data Unit is fundamentally a tree traversed convention which portrays each message of the organization with the various sorts of characteristics on the organiz... |
How can we disable the maximize button of a JFrame in Java? | A JFrame is a class from javax. swing package and it can extend java.awt.frame class. It is a top-level window with a border and a title bar. A JFrame class has many methods that can be used to customize it.
After setting the size of a JFrame we can still change the size by putting the cursor at the corners and draggin... | [
{
"code": null,
"e": 1395,
"s": 1187,
"text": "A JFrame is a class from javax. swing package and it can extend java.awt.frame class. It is a top-level window with a border and a title bar. A JFrame class has many methods that can be used to customize it."
},
{
"code": null,
"e": 1847,
... |
PugJS Basics and Installation | 25 May, 2021
Pug.js is a template engine for Node.js and browsers to render dynamic reusable content. At compile time, the template engine compiles our Pug template code to HTML. We can use variables in pug just like in JavaScript. At runtime, the template engine injects or replaces variables in a template file with ac... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n25 May, 2021"
},
{
"code": null,
"e": 433,
"s": 28,
"text": "Pug.js is a template engine for Node.js and browsers to render dynamic reusable content. At compile time, the template engine compiles our Pug template code to HTML. We can us... |
How to Set Axis Ranges in Matplotlib? | 28 Nov, 2021
Matplotlib sets the default range of the axis by finding extreme values (i.e. minimum and maximum) on that axis. However, to get a better view of data sometimes pyplot module is used to set axis ranges of the graphs according to the requirements in Matplotlib. Following is the method used to set axis rang... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n28 Nov, 2021"
},
{
"code": null,
"e": 352,
"s": 28,
"text": "Matplotlib sets the default range of the axis by finding extreme values (i.e. minimum and maximum) on that axis. However, to get a better view of data sometimes pyplot module... |
Convolutional Neural Network: Feature Map and Filter Visualization | by Renu Khandelwal | Towards Data Science | In this article, we will visualize the intermediate feature representations across different CNN layers to understand what happens inside CNN’s to classify images.
Convolutional Neural Network Basics,
Building Powerful Image Classification Convolutional Neural Network using Keras
Building powerful image classification ... | [
{
"code": null,
"e": 336,
"s": 172,
"text": "In this article, we will visualize the intermediate feature representations across different CNN layers to understand what happens inside CNN’s to classify images."
},
{
"code": null,
"e": 373,
"s": 336,
"text": "Convolutional Neural N... |
What is strlen function in C language? | The C library function size_t strlen(const char *str) computes the length of the string str up to, but not including the terminating null character.
An array of characters is called a string.
Given below is the declaration of an array −
char stringname [size];
For example − char a[50]; string of length 50 characters
Us... | [
{
"code": null,
"e": 1211,
"s": 1062,
"text": "The C library function size_t strlen(const char *str) computes the length of the string str up to, but not including the terminating null character."
},
{
"code": null,
"e": 1254,
"s": 1211,
"text": "An array of characters is called ... |
XSLT <apply-template> | <xsl:apply-template> tag signals the XSLT processor to find the appropriate template to apply, based on the type and context of each selected node.
Following is the syntax declaration of <xsl:apply-template> element.
<xsl:apply-template
select = Expression
mode = QName >
</xsl:apply-template>
select
Used to ... | [
{
"code": null,
"e": 1907,
"s": 1759,
"text": "<xsl:apply-template> tag signals the XSLT processor to find the appropriate template to apply, based on the type and context of each selected node."
},
{
"code": null,
"e": 1976,
"s": 1907,
"text": "Following is the syntax declaratio... |
Program to Find Out the Occurrence of a Digit from a Given Range in Python | Suppose we have been provided with two positive integers n and d where d is a digit within 0 to 9. We have to determine how many times the digit d appears within the integer numbers between 1 and n.
So, if the input is like n = 45, d = 5, then the output will be 5.
These numbers have the digit 5: [5, 15, 25, 35, 45].
T... | [
{
"code": null,
"e": 1261,
"s": 1062,
"text": "Suppose we have been provided with two positive integers n and d where d is a digit within 0 to 9. We have to determine how many times the digit d appears within the integer numbers between 1 and n."
},
{
"code": null,
"e": 1328,
"s": 12... |
Retrieve the last element from a LinkedList in Java | The last element of a Linked List can be retrieved using the method java.util.LinkedList.getLast() respectively. This method does not require any parameters and it returns the last element of the LinkedList.
A program that demonstrates this is given as follows −
Live Demo
import java.util.LinkedList;
public class Demo... | [
{
"code": null,
"e": 1270,
"s": 1062,
"text": "The last element of a Linked List can be retrieved using the method java.util.LinkedList.getLast() respectively. This method does not require any parameters and it returns the last element of the LinkedList."
},
{
"code": null,
"e": 1325,
... |
Java Program for Longest Increasing Subsequence | Following is the Java program for longest increasing subsequence −
Live Demo
public class Demo{
static int incre_subseq(int my_arr[], int arr_len){
int seq_arr[] = new int[arr_len];
int i, j, max = 0;
for (i = 0; i < arr_len; i++)
seq_arr[i] = 1;
for (i = 1; i < arr_len; i++)
... | [
{
"code": null,
"e": 1129,
"s": 1062,
"text": "Following is the Java program for longest increasing subsequence −"
},
{
"code": null,
"e": 1140,
"s": 1129,
"text": " Live Demo"
},
{
"code": null,
"e": 1872,
"s": 1140,
"text": "public class Demo{\n static int... |
How to apply antialiasing in HTML5 canvas drawImage()? | For antialiasing, you need to set resampling quality.
ctx.imageSmoothingQuality = "low|medium|high"
Use an off-screen canvas to reduce the image to half −
var c = document.createElement('canvas'),
ocx = c.getContext('2d');
c.width = img.width * 0.5;
c.height = img.height * 0.5;
ocxx.drawImage(img, 0, 0, c.width, c.hei... | [
{
"code": null,
"e": 1116,
"s": 1062,
"text": "For antialiasing, you need to set resampling quality."
},
{
"code": null,
"e": 1162,
"s": 1116,
"text": "ctx.imageSmoothingQuality = \"low|medium|high\""
},
{
"code": null,
"e": 1217,
"s": 1162,
"text": "Use an of... |
C/C++ Program to Count trailing zeroes in factorial of a number? | Here we will see how to calculate the number of trailing 0s for the result of factorial of any number. So if the n = 5, then 5! = 120. There is only one trailing 0. For 20!, it will be 4 zeros as 20! = 2432902008176640000.
The easiest approach is just calculating the factorial and count the 0s. But this approach fails ... | [
{
"code": null,
"e": 1285,
"s": 1062,
"text": "Here we will see how to calculate the number of trailing 0s for the result of factorial of any number. So if the n = 5, then 5! = 120. There is only one trailing 0. For 20!, it will be 4 zeros as 20! = 2432902008176640000."
},
{
"code": null,
... |
How Can Chipotle Regain Customers? | by cqye | Towards Data Science | This is the final project of our team (Crystal Huang, Jack Ye, Hao Hao, Yuting Li) in Machine Learning class of UC Davis MSBA program. The step-by-step guidance of python coding has been shared at Github: https://github.com/Cryyyystal/Analysis-of-Yelp-Review-for-Chipotle-Mexican-Grill
Chipotle has been losing customers... | [
{
"code": null,
"e": 458,
"s": 172,
"text": "This is the final project of our team (Crystal Huang, Jack Ye, Hao Hao, Yuting Li) in Machine Learning class of UC Davis MSBA program. The step-by-step guidance of python coding has been shared at Github: https://github.com/Cryyyystal/Analysis-of-Yelp-Rev... |
Linking Files having same variables with different data types in C - GeeksforGeeks | 23 May, 2018
Suppose there are two codes foo1.c and foo2.c as below and here the task is to link foo1.c and foo2.c which have same variable name x but different data type i.e int in foo1.c and double in foo2.c.Note that none of the variables is declared as extern.
What do you expect to be the output of the following co... | [
{
"code": null,
"e": 25453,
"s": 25425,
"text": "\n23 May, 2018"
},
{
"code": null,
"e": 25705,
"s": 25453,
"text": "Suppose there are two codes foo1.c and foo2.c as below and here the task is to link foo1.c and foo2.c which have same variable name x but different data type i.e i... |
Python | Convert list of tuples to list of strings - GeeksforGeeks | 26 Feb, 2019
The interconversion between datatypes is quite useful utility and many articles have been written to perform the same. This article discusses the interconversion between a tuple of characters to individual strings. This kind of interconversion is useful in Machine Learning in which we need to give the inpu... | [
{
"code": null,
"e": 25739,
"s": 25711,
"text": "\n26 Feb, 2019"
},
{
"code": null,
"e": 26139,
"s": 25739,
"text": "The interconversion between datatypes is quite useful utility and many articles have been written to perform the same. This article discusses the interconversion b... |
PySpark DataFrame - Drop Rows with NULL or None Values - GeeksforGeeks | 30 Apr, 2021
Sometimes while handling data inside a dataframe we may get null values. In order to clean the dataset we have to remove all the null values in the dataframe. So in this article, we will learn how to drop rows with NULL or None Values in PySpark DataFrame.
In pyspark the drop() function can be used to rem... | [
{
"code": null,
"e": 25555,
"s": 25527,
"text": "\n30 Apr, 2021"
},
{
"code": null,
"e": 25813,
"s": 25555,
"text": "Sometimes while handling data inside a dataframe we may get null values. In order to clean the dataset we have to remove all the null values in the dataframe. So i... |
OffsetDateTime format() method in Java with examples - GeeksforGeeks | 13 Aug, 2021
The format() method of OffsetDateTime class in Java formats this date-time using the specified formatter.
Syntax :
public String format(DateTimeFormatter formatter)
Parameter : This method accepts a single parameter formatter which specifies the formatter to use, not null.Return Value: It returns the fo... | [
{
"code": null,
"e": 26273,
"s": 26245,
"text": "\n13 Aug, 2021"
},
{
"code": null,
"e": 26380,
"s": 26273,
"text": "The format() method of OffsetDateTime class in Java formats this date-time using the specified formatter. "
},
{
"code": null,
"e": 26391,
"s": 263... |
Combinatorics - GeeksforGeeks | 21 Jan, 2014
How many onto (or surjective) functions are there from an n-element (n >= 2) set to a 2-element set?
2(2n - 2)
2n - 2
2n - 1
2n
Total possible number of functions is 2n. In mathematics, a function f from a set X to a set Y is surjective (or onto), or a surjection, if every element y in Y has a corresp... | [
{
"code": null,
"e": 31253,
"s": 31225,
"text": "\n21 Jan, 2014"
},
{
"code": null,
"e": 31355,
"s": 31253,
"text": "How many onto (or surjective) functions are there from an n-element (n >= 2) set to a 2-element set? "
},
{
"code": null,
"e": 31366,
"s": 31355,
... |
Next.js Introduction - GeeksforGeeks | 03 Nov, 2021
Next.js is a react based framework. It has powers to Develop beautiful Web application for different platform like Windows, Linux and mac. If you have little experience in react and looking forward to know more about react ecosystem then you should have knowledge about Next.js framework.Let’s have a brief ... | [
{
"code": null,
"e": 25618,
"s": 25590,
"text": "\n03 Nov, 2021"
},
{
"code": null,
"e": 25953,
"s": 25618,
"text": "Next.js is a react based framework. It has powers to Develop beautiful Web application for different platform like Windows, Linux and mac. If you have little exper... |
Application of Partial Derivative – Two variable Maxima and Minima - GeeksforGeeks | 22 Oct, 2021
Partial derivatives can be used to find the maximum and minimum value (if they exist) of a two-variable function. We try to locate a stationary point that has zero slope and then trace maximum and minimum values near it. The practical application of maxima/minima is to maximize profit for a given curve or ... | [
{
"code": null,
"e": 26137,
"s": 26109,
"text": "\n22 Oct, 2021"
},
{
"code": null,
"e": 26463,
"s": 26137,
"text": "Partial derivatives can be used to find the maximum and minimum value (if they exist) of a two-variable function. We try to locate a stationary point that has zero... |
How to check for IP address using regular expression in javascript? - GeeksforGeeks | 14 Jan, 2022
The task is to validate the IP address both IPv4 as well as IPv6. Here we are going to use RegExp to solve the problem. Approach 1:
RegExp: Which split the IP address on .(dot) and check for each element whether they are valid or not(0-255).
Example 1: This example using the approach discussed above.
ht... | [
{
"code": null,
"e": 26277,
"s": 26249,
"text": "\n14 Jan, 2022"
},
{
"code": null,
"e": 26411,
"s": 26277,
"text": "The task is to validate the IP address both IPv4 as well as IPv6. Here we are going to use RegExp to solve the problem. Approach 1: "
},
{
"code": null,
... |
Python | Pandas dataframe.assign() - 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.
Dataframe.assign() method assign new columns to a DataFrame, returning a new object (a copy) ... | [
{
"code": null,
"e": 26129,
"s": 26101,
"text": "\n16 Nov, 2018"
},
{
"code": null,
"e": 26343,
"s": 26129,
"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... |
Last Minute Notes - DBMS - GeeksforGeeks | 28 Jun, 2021
See Last Minute Notes on all subjects here.
We will discuss the important key points useful for GATE exams in summarized form. For details you may refer this.
E-R Diagram: The most common asked questions in ER diagram is minimum number of tables required for a given ER diagram. Generally, following cri... | [
{
"code": null,
"e": 25497,
"s": 25469,
"text": "\n28 Jun, 2021"
},
{
"code": null,
"e": 25541,
"s": 25497,
"text": "See Last Minute Notes on all subjects here."
},
{
"code": null,
"e": 25656,
"s": 25541,
"text": "We will discuss the important key points usefu... |
Find index of an extra element present in one sorted array - GeeksforGeeks | 25 Jun, 2021
Given two sorted arrays. There is only 1 difference between the arrays. The first array has one element extra added in between. Find the index of the extra element.
Examples:
Input: {2, 4, 6, 8, 9, 10, 12};
{2, 4, 6, 8, 10, 12};
Output: 4
Explanation: The first array has an extra element 9.
The ext... | [
{
"code": null,
"e": 26699,
"s": 26671,
"text": "\n25 Jun, 2021"
},
{
"code": null,
"e": 26864,
"s": 26699,
"text": "Given two sorted arrays. There is only 1 difference between the arrays. The first array has one element extra added in between. Find the index of the extra element... |
NULL pointer in C - GeeksforGeeks | 14 Aug, 2019
At the very high level, we can think of NULL as a null pointer which is used in C for various purposes. Some of the most common use cases for NULL area) To initialize a pointer variable when that pointer variable isn’t assigned any valid memory address yet.b) To check for a null pointer before accessing an... | [
{
"code": null,
"e": 25987,
"s": 25959,
"text": "\n14 Aug, 2019"
},
{
"code": null,
"e": 26539,
"s": 25987,
"text": "At the very high level, we can think of NULL as a null pointer which is used in C for various purposes. Some of the most common use cases for NULL area) To initial... |
Java.Lang.Float class in Java - GeeksforGeeks | 09 Aug, 2021
Float class is a wrapper class for the primitive type float which contains several methods to effectively deal with a float value like converting it to a string representation, and vice-versa. An object of Float class can hold a single float value. There are mainly two constructors to initialize a Float ob... | [
{
"code": null,
"e": 24284,
"s": 24256,
"text": "\n09 Aug, 2021"
},
{
"code": null,
"e": 24599,
"s": 24284,
"text": "Float class is a wrapper class for the primitive type float which contains several methods to effectively deal with a float value like converting it to a string re... |
How to Create Fragment Using Bottom Navigation in Social Media Android App? - GeeksforGeeks | 06 Sep, 2021
This is the Part 2 of “Build a Social Media App in Android Studio” tutorial, and we are going to cover the following functionalities in this article:
We are going to Create Bottom Navigation with 5 Fragments (Home, Users, AddBlog, ChatList, Profile).
On HomeFragment we will be Showing all the added blogs.
... | [
{
"code": null,
"e": 26489,
"s": 26461,
"text": "\n06 Sep, 2021"
},
{
"code": null,
"e": 26639,
"s": 26489,
"text": "This is the Part 2 of “Build a Social Media App in Android Studio” tutorial, and we are going to cover the following functionalities in this article:"
},
{
... |
Count possible ways to construct buildings - GeeksforGeeks | 26 Aug, 2021
Given an input number of sections and each section has 2 plots on either sides of the road. Find all possible ways to construct buildings in the plots such that there is a space between any 2 buildings.
Example :
N = 1
Output = 4
Place a building on one side.
Place a building on other side
Do not place an... | [
{
"code": null,
"e": 26187,
"s": 26159,
"text": "\n26 Aug, 2021"
},
{
"code": null,
"e": 26390,
"s": 26187,
"text": "Given an input number of sections and each section has 2 plots on either sides of the road. Find all possible ways to construct buildings in the plots such that th... |
How to load the contents of a text file into a JavaScript variable? - GeeksforGeeks | 10 May, 2022
In this article, we will examine how to read the contents of any text file that exists on your computer into a variable using JavaScript. The following are a few basic pointers that everybody should brush through before looking at the code:
Event listeners: These are predefined functions that exist in Java... | [
{
"code": null,
"e": 25925,
"s": 25897,
"text": "\n10 May, 2022"
},
{
"code": null,
"e": 26166,
"s": 25925,
"text": "In this article, we will examine how to read the contents of any text file that exists on your computer into a variable using JavaScript. The following are a few b... |
PYGLET – Drawing Rectangle - GeeksforGeeks | 09 Jul, 2021
In this article we will see how we can draw rectangle on window in PYGLET module in python. Pyglet is easy to use but powerful library for developing visually rich GUI applications like games, multimedia etc. A window is a “heavyweight” object occupying operating system resources. Windows may appear as flo... | [
{
"code": null,
"e": 25537,
"s": 25509,
"text": "\n09 Jul, 2021"
},
{
"code": null,
"e": 26163,
"s": 25537,
"text": "In this article we will see how we can draw rectangle on window in PYGLET module in python. Pyglet is easy to use but powerful library for developing visually rich... |
Cryptocurrency Analysis with Python — Buy and Hold | by Roman Orac | Towards Data Science | In this part, I am going to analyze which coin (Bitcoin, Ethereum or Litecoin) was the most profitable in the last two months using buy and hold strategy. We’ll go through the analysis of these 3 cryptocurrencies and try to give an objective answer.
In case you’ve missed my other articles about this topic:
romanorac.me... | [
{
"code": null,
"e": 422,
"s": 172,
"text": "In this part, I am going to analyze which coin (Bitcoin, Ethereum or Litecoin) was the most profitable in the last two months using buy and hold strategy. We’ll go through the analysis of these 3 cryptocurrencies and try to give an objective answer."
},... |
Selection Sort Program in C | Selection sort is a simple sorting algorithm. This sorting algorithm is an in-place comparison-based algorithm in which the list is divided into two parts, the sorted part at the left end and the unsorted part at the right end. Initially, the sorted part is empty and the unsorted part is the entire list.
#include <stdi... | [
{
"code": null,
"e": 2886,
"s": 2580,
"text": "Selection sort is a simple sorting algorithm. This sorting algorithm is an in-place comparison-based algorithm in which the list is divided into two parts, the sorted part at the left end and the unsorted part at the right end. Initially, the sorted par... |
MongoDB query to add new array element in document | To add new array element in a MongoDB document, use $(projection) along with update(). Let us create a collection with documents −
>db.demo222.insertOne({"details":[{"StudentName":"Chris","StudentMarks":78},{"StudentName":"David","StudentMarks":89}]});
{
"acknowledged" : true,
"insertedId" : ObjectId("5e3ee31703d... | [
{
"code": null,
"e": 1193,
"s": 1062,
"text": "To add new array element in a MongoDB document, use $(projection) along with update(). Let us create a collection with documents −"
},
{
"code": null,
"e": 1400,
"s": 1193,
"text": ">db.demo222.insertOne({\"details\":[{\"StudentName\... |
Java DIP - Understand Convolution | Convolution is a mathematical operation on two functions f and g. The function f and g in this case are images, since an image is also a two dimensional function.
In order to perform convolution on an image, following steps are taken −
Flip the mask (horizontally and vertically) only once.
Slide the mask onto the image... | [
{
"code": null,
"e": 2500,
"s": 2337,
"text": "Convolution is a mathematical operation on two functions f and g. The function f and g in this case are images, since an image is also a two dimensional function."
},
{
"code": null,
"e": 2573,
"s": 2500,
"text": "In order to perform... |
Using machine learning to predict Kickstarter success | by Laura Lewis | Towards Data Science | In recent years, the range of funding options for projects created by individuals and small companies has expanded considerably. In addition to savings, bank loans, friends & family funding and other traditional options, crowdfunding has become a popular and readily available alternative. Kickstarter, founded in 2009, ... | [
{
"code": null,
"e": 712,
"s": 171,
"text": "In recent years, the range of funding options for projects created by individuals and small companies has expanded considerably. In addition to savings, bank loans, friends & family funding and other traditional options, crowdfunding has become a popular ... |
Custom Messages in ElectronJS - GeeksforGeeks | 28 May, 2020
ElectronJS is an Open Source Framework used for building Cross-Platform native desktop applications using web technologies such as HTML, CSS, and JavaScript which are capable of running on Windows, macOS, and Linux operating systems. It combines the Chromium engine and NodeJS into a Single Runtime.
One of ... | [
{
"code": null,
"e": 25300,
"s": 25272,
"text": "\n28 May, 2020"
},
{
"code": null,
"e": 25600,
"s": 25300,
"text": "ElectronJS is an Open Source Framework used for building Cross-Platform native desktop applications using web technologies such as HTML, CSS, and JavaScript which ... |
Python (Scikit-Learn): Logistic Regression Classification | by Maurizio Sluijmers | Towards Data Science | The process of differentiating categorical data using predictive techniques is called classification. One of the most widely used classification techniques is the logistic regression. For the theoretical foundation of the logistic regression, please see my previous article.
In this article, we are going to apply the lo... | [
{
"code": null,
"e": 447,
"s": 172,
"text": "The process of differentiating categorical data using predictive techniques is called classification. One of the most widely used classification techniques is the logistic regression. For the theoretical foundation of the logistic regression, please see m... |
How to convert list elements into a single string in R? | To convert list elements into a single string, we can use paste function but firstly we would need to unlist the elements. Also, since we want to create a single string double quotes will be required at the end of the output. For example, if we have a list that contains 5 elements say 1, 2, 3, 4, 5 then conversion of t... | [
{
"code": null,
"e": 1435,
"s": 1062,
"text": "To convert list elements into a single string, we can use paste function but firstly we would need to unlist the elements. Also, since we want to create a single string double quotes will be required at the end of the output. For example, if we have a l... |
Sync Copy in fs-extra using NodeJS | This method copies files or directories from one location to another location in a sync process. The directory can have sub-directories and files.
copySync(src, dest[, options])
src – This is a string paramter which will hold the source location of the file or directory that needs to be copies. If the location is a dir... | [
{
"code": null,
"e": 1209,
"s": 1062,
"text": "This method copies files or directories from one location to another location in a sync process. The directory can have sub-directories and files."
},
{
"code": null,
"e": 1240,
"s": 1209,
"text": "copySync(src, dest[, options])"
}... |
mlock() - 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... |
MongoDB AND operator ( $and ) | 05 Jun, 2022
MongoDB provides different types of logical query operators and $and operator is one of them. This operator is used to perform logical AND operation on the array of one or more expressions and select or retrieve only those documents that match all the given expression in the array. You can use this operato... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n05 Jun, 2022"
},
{
"code": null,
"e": 408,
"s": 28,
"text": "MongoDB provides different types of logical query operators and $and operator is one of them. This operator is used to perform logical AND operation on the array of one or mor... |
How to get attribute of element from Selenium? | We can get the attribute of element in Selenium webdriver. The getAttribute() method is used to obtain the value of an attribute in an html document. In an html code, attribute and its value appear as a key value pair.
Some of the commonly known html attributes are disabled, alt, id, href, style, title and src. The val... | [
{
"code": null,
"e": 1406,
"s": 1187,
"text": "We can get the attribute of element in Selenium webdriver. The getAttribute() method is used to obtain the value of an attribute in an html document. In an html code, attribute and its value appear as a key value pair."
},
{
"code": null,
"e... |
Flexbox - Flex-Direction | The flex-direction property is used to specify the direction in which the elements of flex container (flex-items) are needed to be placed.
usage −
flex-direction: row | row-reverse | column | column-reverse
This property accepts four values −
row − Arranges the elements of the container horizontally from left to right... | [
{
"code": null,
"e": 2084,
"s": 1945,
"text": "The flex-direction property is used to specify the direction in which the elements of flex container (flex-items) are needed to be placed."
},
{
"code": null,
"e": 2092,
"s": 2084,
"text": "usage −"
},
{
"code": null,
"e"... |
Downloading PDFs with Python using Requests and BeautifulSoup | 13 Apr, 2021
BeautifulSoup object 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. The BeautifulSoup object represents the parsed document as a whole. For most purposes, you can t... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n13 Apr, 2021"
},
{
"code": null,
"e": 360,
"s": 28,
"text": "BeautifulSoup object 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 automate... |
Neo4j Drop Index | 27 Aug, 2019
In neo4j you can drop index for both property and nodes. Indexing is data structure that helps faster performance on retrieval operation on database. There is special features in neo4j indexing once you create indexing that index will manage itself and keep it up to date whenever changes made on the databa... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n27 Aug, 2019"
},
{
"code": null,
"e": 407,
"s": 28,
"text": "In neo4j you can drop index for both property and nodes. Indexing is data structure that helps faster performance on retrieval operation on database. There is special features... |
MySQL - Select Query | The SQL SELECT command is used to fetch data from the MySQL database. You can use this command at mysql> prompt as well as in any script like PHP.
Here is generic SQL syntax of SELECT command to fetch data from the MySQL table −
SELECT field1, field2,...fieldN
FROM table_name1, table_name2...
[WHERE Clause]
[OFFSET M ... | [
{
"code": null,
"e": 2588,
"s": 2441,
"text": "The SQL SELECT command is used to fetch data from the MySQL database. You can use this command at mysql> prompt as well as in any script like PHP."
},
{
"code": null,
"e": 2670,
"s": 2588,
"text": "Here is generic SQL syntax of SELEC... |
Convert Text File to CSV using Python Pandas | 02 Sep, 2020
Let’s see how to Convert Text File to CSV using Python Pandas. Python will read data from a text file and will create a dataframe with rows equal to number of lines present in the text file and columns equal to the number of fields present in a single line. See below example for better understanding.
Origi... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n02 Sep, 2020"
},
{
"code": null,
"e": 354,
"s": 52,
"text": "Let’s see how to Convert Text File to CSV using Python Pandas. Python will read data from a text file and will create a dataframe with rows equal to number of lines present i... |
Point Graph Series in Android | 04 Feb, 2021
We have seen using a simple line graph and BarChart implementation in Android to represent data in the graphical format. Another graphical format for representing data is a point graph series. In this article, we will take a look at the implementation of the Point Graph Series in Android.
We will be build... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n04 Feb, 2021"
},
{
"code": null,
"e": 319,
"s": 28,
"text": "We have seen using a simple line graph and BarChart implementation in Android to represent data in the graphical format. Another graphical format for representing data is a po... |
Working with zcat, zmore and zless Command in Linux | 10 Oct, 2021
Compression means to keep files together in an archive and to reduce the size of files. Gzip a.k.a. Gunzip is a command in Linux which is used to compress and decompress the files. So in case, you compressed a very large file with gzip and you just want to see what are the contents of the file. As in this ... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n10 Oct, 2021"
},
{
"code": null,
"e": 490,
"s": 28,
"text": "Compression means to keep files together in an archive and to reduce the size of files. Gzip a.k.a. Gunzip is a command in Linux which is used to compress and decompress the f... |
How to catch IndentationError Exception in python? | A IndentationError occurs any time the parser finds source code that does not follow indentation rules. We can catch it when importing a module, since the module will be compiled on first import. You can't catch it in the same module that contains the try/except block, because with this exception, Python won't be able ... | [
{
"code": null,
"e": 1578,
"s": 1187,
"text": "A IndentationError occurs any time the parser finds source code that does not follow indentation rules. We can catch it when importing a module, since the module will be compiled on first import. You can't catch it in the same module that contains the t... |
Convert given Matrix into a Symmetric Matrix by replacing elements at (i, j) and (j, i) with their mean | 07 Mar, 2022
Given an integer N and a N x N matrix, the task is to convert the given matrix into a symmetric matrix by replacing (i, j)th and (j, i)th element with their arithmetic mean.
Examples:
Input: arr[] = {{1, 2, 3}, {4, 5, 6}, {7, 8, 9}}Output: 1 3 53 5 75 7 9Explan... | [
{
"code": null,
"e": 54,
"s": 26,
"text": "\n07 Mar, 2022"
},
{
"code": null,
"e": 228,
"s": 54,
"text": "Given an integer N and a N x N matrix, the task is to convert the given matrix into a symmetric matrix by replacing (i, j)th and (j, i)th element with their arithmetic mean."... |
Major Applications of Data Science | 12 Mar, 2021
Data Science is the deep study of a large quantity of data, which involves extracting some meaningful from the raw, structured, and unstructured data. The extracting out meaningful data from large amounts use processing of data and this processing can be done using statistical techniques and algorithm, sci... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n12 Mar, 2021"
},
{
"code": null,
"e": 532,
"s": 28,
"text": "Data Science is the deep study of a large quantity of data, which involves extracting some meaningful from the raw, structured, and unstructured data. The extracting out meani... |
How Bitcoin Transaction Works? | 21 Sep, 2021
Bitcoin is basically a digital currency that is currently used as a form of payment. Bitcoin is a cryptocurrency and the transactions related to bitcoins take place in the blockchain network. Every bitcoin is stored in a virtual wallet and transaction involves the transfer of bitcoin from one wallet to ano... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n21 Sep, 2021"
},
{
"code": null,
"e": 612,
"s": 28,
"text": "Bitcoin is basically a digital currency that is currently used as a form of payment. Bitcoin is a cryptocurrency and the transactions related to bitcoins take place in the blo... |
Python | Real time weather detection using Tkinter | 10 Jun, 2021
Prerequisites : Introduction to tkinter | Find current weather of any cityPython offers multiple options for developing GUI (Graphical User Interface). Out of all the GUI methods, tkinter is the most commonly used method. It is a standard Python interface to the Tk GUI toolkit shipped with Python. Python w... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n10 Jun, 2021"
},
{
"code": null,
"e": 568,
"s": 52,
"text": "Prerequisites : Introduction to tkinter | Find current weather of any cityPython offers multiple options for developing GUI (Graphical User Interface). Out of all the GUI met... |
Priority Queue of Sets in C++ with Examples | 18 Jan, 2022
Priority Queues
Priority queues are a type of container adapters, specifically designed such that the first element of the queue is the greatest of all elements in the queue and elements are in nonincreasing order (hence we can see that each element of the queue has a priority {fixed order}).
Functions use... | [
{
"code": null,
"e": 54,
"s": 26,
"text": "\n18 Jan, 2022"
},
{
"code": null,
"e": 70,
"s": 54,
"text": "Priority Queues"
},
{
"code": null,
"e": 348,
"s": 70,
"text": "Priority queues are a type of container adapters, specifically designed such that the first... |
Run Multiple Services In Single Docker Container Using Supervisor | by Aakash Rathor | Towards Data Science | Have you ever faced this scenario where you want to run two or more lightweight services within the same container?
Although Docker provides a Docker-compose tool for building and running multi-services applications in multiple containers. Docker-compose requires a YAML file to configure your multiple services. But som... | [
{
"code": null,
"e": 288,
"s": 172,
"text": "Have you ever faced this scenario where you want to run two or more lightweight services within the same container?"
},
{
"code": null,
"e": 574,
"s": 288,
"text": "Although Docker provides a Docker-compose tool for building and runnin... |
Duration minusDays() method in Java | An immutable copy of a duration where some days are removed from it can be obtained using the minusDays() method in the Duration class in Java. This method requires a single parameter i.e. the number of days to be subtracted and it returns the duration with the subtracted days.
A program that demonstrates this is given... | [
{
"code": null,
"e": 1341,
"s": 1062,
"text": "An immutable copy of a duration where some days are removed from it can be obtained using the minusDays() method in the Duration class in Java. This method requires a single parameter i.e. the number of days to be subtracted and it returns the duration ... |
Row-wise vs column-wise traversal of matrix - GeeksforGeeks | 05 Apr, 2022
Two common ways of traversing a matrix are row-major-order and column-major-order. Row Major Order : When matrix is accessed row by row. Column Major Order : When matrix is accessed column by column.Examples:
Input : mat[][] = {{1, 2, 3},
{4, 5, 6},
{7, 8, 9}}
Output... | [
{
"code": null,
"e": 24714,
"s": 24686,
"text": "\n05 Apr, 2022"
},
{
"code": null,
"e": 24925,
"s": 24714,
"text": "Two common ways of traversing a matrix are row-major-order and column-major-order. Row Major Order : When matrix is accessed row by row. Column Major Order : When ... |
ReactJS – getDerivedStateFromError() Method | In this article, we are going to see how to execute a function if some error occurs in the component.
This method is called when a component encounters some error during the React Component Lifecycle. This method allows us to handle the error boundaries of the application. To avoid performance issues, don’t set up any ... | [
{
"code": null,
"e": 1164,
"s": 1062,
"text": "In this article, we are going to see how to execute a function if some error occurs in the component."
},
{
"code": null,
"e": 1411,
"s": 1164,
"text": "This method is called when a component encounters some error during the React Co... |
Blob object in JavaScript | The blob object is used for representing a blob object which is immutable and is used for representing raw data. The blob has a size and mime type property just like a file has. File is a derivation of blob and blob can be used in places where the file is used.
Following is the code showing blob object in JavaScript −
... | [
{
"code": null,
"e": 1324,
"s": 1062,
"text": "The blob object is used for representing a blob object which is immutable and is used for representing raw data. The blob has a size and mime type property just like a file has. File is a derivation of blob and blob can be used in places where the file ... |
Generate all N digit numbers having absolute difference as K between adjacent digits - GeeksforGeeks | 29 May, 2021
Given two integers N and K, the task is to generate all positive integers with length N having an absolute difference of adjacent digits equal to K.
Examples:
Input: N = 4, K = 8Output: 1919, 8080, 9191Explanation:The absolute difference between every consecutive digit of each number is 8.For Example: 8080... | [
{
"code": null,
"e": 24567,
"s": 24539,
"text": "\n29 May, 2021"
},
{
"code": null,
"e": 24716,
"s": 24567,
"text": "Given two integers N and K, the task is to generate all positive integers with length N having an absolute difference of adjacent digits equal to K."
},
{
... |
Splitting a dataset. Here I explain how to split your data... | by Nischal Madiraju | Towards Data Science | To train any machine learning model irrespective what type of dataset is being used you have to split the dataset into training data and testing data. So, let us look into how it can be done?
Here I am going to use the iris dataset and split it using the ‘train_test_split’ library from sklearn
from sklearn.model_select... | [
{
"code": null,
"e": 364,
"s": 172,
"text": "To train any machine learning model irrespective what type of dataset is being used you have to split the dataset into training data and testing data. So, let us look into how it can be done?"
},
{
"code": null,
"e": 467,
"s": 364,
"te... |
How do you copy a Lua table by value? | Copying a table means that we want all the values or pairs that are present in one table in another table. In Lua, there’s no standard library function that we can use to create such a table but we can create our own function to do so.
Let’s create a function in Lua that will take a table as an argument and will create... | [
{
"code": null,
"e": 1298,
"s": 1062,
"text": "Copying a table means that we want all the values or pairs that are present in one table in another table. In Lua, there’s no standard library function that we can use to create such a table but we can create our own function to do so."
},
{
"co... |
Count digit groupings of a number with given constraints - GeeksforGeeks | 06 May, 2021
We are given a string consisting of digits, we may group these digits into sub-groups (but maintaining their original order). The task is to count the number of groupings such that for every sub-group except the last one, the sum of digits in a sub-group is less than or equal to the sum of the digits in th... | [
{
"code": null,
"e": 25116,
"s": 25088,
"text": "\n06 May, 2021"
},
{
"code": null,
"e": 25692,
"s": 25116,
"text": "We are given a string consisting of digits, we may group these digits into sub-groups (but maintaining their original order). The task is to count the number of gr... |
How to use multiple for and while loops together in Python? | You can create nested loops in python fairly easily. You can even nest a for loop inside a while loop or the other way around. For example,
for i in range(5):
j = i
while j != 0:
print(j, end=', ')
j -= 1
print("")
This will give the output
1,
2, 1,
3, 2, 1,
4, 3, 2, 1,
You can take this nesting to... | [
{
"code": null,
"e": 1202,
"s": 1062,
"text": "You can create nested loops in python fairly easily. You can even nest a for loop inside a while loop or the other way around. For example,"
},
{
"code": null,
"e": 1298,
"s": 1202,
"text": "for i in range(5):\n j = i\n while j !... |
C Program to print hollow pyramid and diamond pattern | Here we will see how to generate hollow pyramid and diamond patterns using C. We can generate solid Pyramid patterns very easily. To make it hollow, we have to add some few tricks.
For the pyramid at the first line it will print one star, and at the last line it will print n number of stars. For other lines it will pri... | [
{
"code": null,
"e": 1243,
"s": 1062,
"text": "Here we will see how to generate hollow pyramid and diamond patterns using C. We can generate solid Pyramid patterns very easily. To make it hollow, we have to add some few tricks."
},
{
"code": null,
"e": 1499,
"s": 1243,
"text": "F... |
React Events | Just like HTML DOM events, React can perform actions based on user events.
React has the same events as HTML: click, change, mouseover etc.
React events are written in camelCase syntax:
onClick
instead of onclick.
React event handlers are written inside curly
braces:
onClick={shoot} instead of
onClick="shoot()".
<bu... | [
{
"code": null,
"e": 75,
"s": 0,
"text": "Just like HTML DOM events, React can perform actions based on user events."
},
{
"code": null,
"e": 140,
"s": 75,
"text": "React has the same events as HTML: click, change, mouseover etc."
},
{
"code": null,
"e": 186,
"s":... |
How To Organize Data Science Project Notebooks With Extensions | Towards Data Science | While working on a Data Science project notebook, I create code and markdown cells every minute, print variables, get results, visualize data, try tens of visualizations to find the best looking ones... If I don’t keep well organized during all this process, I can’t manage to come to the end of the project until the de... | [
{
"code": null,
"e": 500,
"s": 172,
"text": "While working on a Data Science project notebook, I create code and markdown cells every minute, print variables, get results, visualize data, try tens of visualizations to find the best looking ones... If I don’t keep well organized during all this proce... |
Python interface for SQLite databases | SQLite is an open source database and is serverless that needs no configuration. Entire database is a single disk file that can be placed anywhere in operating system's file system. SQLite commands are similar to standard SQL. SQLite is extensively used by applications such as browsers for internal data storage. It is ... | [
{
"code": null,
"e": 1433,
"s": 1062,
"text": "SQLite is an open source database and is serverless that needs no configuration. Entire database is a single disk file that can be placed anywhere in operating system's file system. SQLite commands are similar to standard SQL. SQLite is extensively used... |
Lambda Functions with Example and Error Handling | by Wie Kiang H. | Towards Data Science | Before going through this, you need to be familiar with defining your own function in Python; otherwise, you will get lost in the middle. The articles below will give you more information on how to define your own function.
towardsdatascience.com
towardsdatascience.com
towardsdatascience.com
There is a more agile way t... | [
{
"code": null,
"e": 396,
"s": 172,
"text": "Before going through this, you need to be familiar with defining your own function in Python; otherwise, you will get lost in the middle. The articles below will give you more information on how to define your own function."
},
{
"code": null,
... |
Simple File Upload Script in PHP | Theory of Computation
In this tutorial, you will learn a simple script to upload a file on a remote server using a simple HTML form and store it in a directory. It is easy to upload a file to the server using PHP. This can be used to upload any type of file, like PDF, doc, image, video, zip files and other file types. ... | [
{
"code": null,
"e": 112,
"s": 90,
"text": "Theory of Computation"
},
{
"code": null,
"e": 495,
"s": 112,
"text": "In this tutorial, you will learn a simple script to upload a file on a remote server using a simple HTML form and store it in a directory. It is easy to upload a fil... |
Compute the Negative Binomial Density in R Programming - dnbinom() Function - GeeksforGeeks | 25 Jun, 2020
dnbinom() function in R Language is used to compute the value of negative binomial density. It also creates a plot of the negative binomial density.
Syntax: dnbinom(vec, size, prob)
Parameters:vec: x-values for binomial densitysize: Number of trialsprob: Probability
Example 1:
# R program to compute# Negat... | [
{
"code": null,
"e": 25316,
"s": 25288,
"text": "\n25 Jun, 2020"
},
{
"code": null,
"e": 25465,
"s": 25316,
"text": "dnbinom() function in R Language is used to compute the value of negative binomial density. It also creates a plot of the negative binomial density."
},
{
... |
Recursive and Recursive Enumerable Languages in TOC | 29 Nov, 2021
Recursive Enumerable (RE) or Type -0 Language
RE languages or type-0 languages are generated by type-0 grammars. An RE language can be accepted or recognized by Turing machine which means it will enter into final state for the strings of language and may or may not enter into rejecting state for the string... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n29 Nov, 2021"
},
{
"code": null,
"e": 98,
"s": 52,
"text": "Recursive Enumerable (RE) or Type -0 Language"
},
{
"code": null,
"e": 543,
"s": 98,
"text": "RE languages or type-0 languages are generated by type-0 gram... |
Flutter – BoxConstraints Widget | 09 Aug, 2021
BoxConstraints is a built-in widget in flutter SDK. Its functionality is to add sized constraints on its child widget. It is usually taken as the object of constraints property in ConstrainedBox widget. It comes packed with many properties for customization. Below we will see all its properties with and an... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n09 Aug, 2021"
},
{
"code": null,
"e": 369,
"s": 52,
"text": "BoxConstraints is a built-in widget in flutter SDK. Its functionality is to add sized constraints on its child widget. It is usually taken as the object of constraints proper... |
A Peterson Graph Problem | 06 Jun, 2022
The following graph G is called a Petersen graph and its vertices have been numbered from 0 to 9. Some letters have also been assigned to vertices of G, as can be seen from the following picture: Let’s consider a walk W in graph G, which consists of L vertices W1, W2, ..., WL. A string S of L letters ‘A’ –... | [
{
"code": null,
"e": 54,
"s": 26,
"text": "\n06 Jun, 2022"
},
{
"code": null,
"e": 898,
"s": 54,
"text": "The following graph G is called a Petersen graph and its vertices have been numbered from 0 to 9. Some letters have also been assigned to vertices of G, as can be seen from t... |
Flutter - Creating Snackbar Using GetX Library - GeeksforGeeks | 14 May, 2021
Sometimes, it’s very useful to show the message when a certain action takes place in our app. Let’s suppose, we have a list of items and we want to delete any item from the list then after deleting those items, some message should be displayed to inform the user that the item has been deleted. If we want t... | [
{
"code": null,
"e": 25397,
"s": 25369,
"text": "\n14 May, 2021"
},
{
"code": null,
"e": 26007,
"s": 25397,
"text": "Sometimes, it’s very useful to show the message when a certain action takes place in our app. Let’s suppose, we have a list of items and we want to delete any item... |
What characters are valid for JavaScript variable names? | To check the valid characters for JavaScript variable names, you should follow the below given naming conventions, which discuss about other rules to name a variable −
Name can begin with $ and _ characters, for example, _result.
You should not use any of the JavaScript reserved keywords as a variable name. These keywo... | [
{
"code": null,
"e": 1230,
"s": 1062,
"text": "To check the valid characters for JavaScript variable names, you should follow the below given naming conventions, which discuss about other rules to name a variable −"
},
{
"code": null,
"e": 1292,
"s": 1230,
"text": "Name can begin... |
Linear Regression Simulation to Understand Slope Sensitivity | by Robert Wood | Towards Data Science | Over the next few minutes, I’ll send you on your way to leveraging linear regression for a bit more than explanation or prediction, rather you’ll utilize them to for the sake of inference.
We will leverage simulation for inference in three ways:
Understanding model sensitivity
p-value
confidence intervals
In this post,... | [
{
"code": null,
"e": 361,
"s": 172,
"text": "Over the next few minutes, I’ll send you on your way to leveraging linear regression for a bit more than explanation or prediction, rather you’ll utilize them to for the sake of inference."
},
{
"code": null,
"e": 418,
"s": 361,
"text"... |
Java SQL Timestamp setTime() function with examples - GeeksforGeeks | 25 Oct, 2019
The setTime() function is a part of Timestamp class of Java SQL.The function is used to set the time of the Timestamp object. The function takes time in milliseconds which represents the time in milliseconds after 1st January, 1970.
Function Signature:
public void setTime(long t)
Syntax:
ts1.setTime(l);
Pa... | [
{
"code": null,
"e": 25237,
"s": 25209,
"text": "\n25 Oct, 2019"
},
{
"code": null,
"e": 25470,
"s": 25237,
"text": "The setTime() function is a part of Timestamp class of Java SQL.The function is used to set the time of the Timestamp object. The function takes time in millisecon... |
C program to write an image in PGM format | The PGM is the Portable Gray Map. If we want to store a 2d array in C as images in PNG, JPEG, or any other image format, we have to do lots of work to encode the data in some specified format before writing into a file.
The Netpbm format gives an easy and portable solution. The Netpbm is an open source package of graph... | [
{
"code": null,
"e": 1282,
"s": 1062,
"text": "The PGM is the Portable Gray Map. If we want to store a 2d array in C as images in PNG, JPEG, or any other image format, we have to do lots of work to encode the data in some specified format before writing into a file."
},
{
"code": null,
"... |
OpenCV - Drawing a Rectangle | You can draw a rectangle on an image using the method rectangle() of the imgproc class. Following is the syntax of this method −
rectangle(img, pt1, pt2, color, thickness)
This method accepts the following parameters −
mat − A Mat object representing the image on which the rectangle is to be drawn.
mat − A Mat object ... | [
{
"code": null,
"e": 3133,
"s": 3004,
"text": "You can draw a rectangle on an image using the method rectangle() of the imgproc class. Following is the syntax of this method −"
},
{
"code": null,
"e": 3177,
"s": 3133,
"text": "rectangle(img, pt1, pt2, color, thickness)\n"
},
... |
Print all possible ways to split an array into K subsets | 21 Jul, 2021
Given an array arr[] of size N and an integer K, the task is to print all possible ways to split the given array into K subsets.
Examples:
Input: arr[] = { 1, 2, 3 }, K = 2Output: { {{ 1, 2 }, { 3 }}, {{ 1, 3 }, { 2 }}, {{ 1 }, { 2, 3 }}}.
Input: arr[] = { 1, 2, 3, 4 }, K = 2Output: { {{ 1, 2, 3 }, { 4 }},... | [
{
"code": null,
"e": 54,
"s": 26,
"text": "\n21 Jul, 2021"
},
{
"code": null,
"e": 183,
"s": 54,
"text": "Given an array arr[] of size N and an integer K, the task is to print all possible ways to split the given array into K subsets."
},
{
"code": null,
"e": 193,
... |
wxPython – Disable Button | 18 Jun, 2020
In this article we are going to learn about how can we disable a button present in a frame. Sometimes when we dont want user to press a button we can disable a button and the button become unclickable.In order to disable a button we can use Disable() function associated with wx.Button class of wxPython.
Sy... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n18 Jun, 2020"
},
{
"code": null,
"e": 333,
"s": 28,
"text": "In this article we are going to learn about how can we disable a button present in a frame. Sometimes when we dont want user to press a button we can disable a button and the ... |
Lodash _.random() Method | 09 Sep, 2020
The _.random() method is used to return a random number which is in the range provided to the function. If floating is true, or either lower or upper are floats, a floating-point number is returned instead of an integer.
Syntax:
_.random([lower = 0], [upper = 1], [floating])
Parameters: This method accept... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n09 Sep, 2020"
},
{
"code": null,
"e": 249,
"s": 28,
"text": "The _.random() method is used to return a random number which is in the range provided to the function. If floating is true, or either lower or upper are floats, a floating-po... |
How to get or set the selection state of JCheckBox in Java | The following is an example to get or set the selection state of JCheckBox:
import java.awt.FlowLayout;
import javax.swing.JCheckBox;
import javax.swing.JFrame;
public class SwingDemo extends JFrame {
public SwingDemo() {
setSize(500, 500);
setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
setLayout(... | [
{
"code": null,
"e": 1138,
"s": 1062,
"text": "The following is an example to get or set the selection state of JCheckBox:"
},
{
"code": null,
"e": 1746,
"s": 1138,
"text": "import java.awt.FlowLayout;\nimport javax.swing.JCheckBox;\nimport javax.swing.JFrame;\npublic class Swing... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.