title stringlengths 3 221 | text stringlengths 17 477k | parsed listlengths 0 3.17k |
|---|---|---|
Instant getEpochSecond() method in Java with Examples - GeeksforGeeks | 22 Nov, 2018
The getEpochSecond() method of Instant class is used to return the number of seconds from the Java epoch of 1970-01-01T00:00:00Z. It means the difference between time in seconds of this instance and time represented by “1970-01-01T00:00:00Z” is returned by this method. The epoch second count is a simple in... | [
{
"code": null,
"e": 25225,
"s": 25197,
"text": "\n22 Nov, 2018"
},
{
"code": null,
"e": 25604,
"s": 25225,
"text": "The getEpochSecond() method of Instant class is used to return the number of seconds from the Java epoch of 1970-01-01T00:00:00Z. It means the difference between t... |
PyQt5 QDial - Getting Slider's Value - GeeksforGeeks | 07 Jul, 2020
In this article we will see how we can get slider’s value of the QDial. User can change the value with the help of mouse although we can change it programmatically with the help of setValue method. The slider forces the value to be within the legal range i.e value should be greater than or equal to the min... | [
{
"code": null,
"e": 25537,
"s": 25509,
"text": "\n07 Jul, 2020"
},
{
"code": null,
"e": 25966,
"s": 25537,
"text": "In this article we will see how we can get slider’s value of the QDial. User can change the value with the help of mouse although we can change it programmatically... |
Counts Path in an Array - GeeksforGeeks | 30 Apr, 2021
Given an array A consisting of positive integer, of size N. If the element in the array at index i is K then you can jump between index ranges (i + 1) to (i + K). The task is to find the number of possible ways to reach the end with module 109 + 7.The starting position is considered as index 0.Examples:
... | [
{
"code": null,
"e": 26067,
"s": 26039,
"text": "\n30 Apr, 2021"
},
{
"code": null,
"e": 26374,
"s": 26067,
"text": "Given an array A consisting of positive integer, of size N. If the element in the array at index i is K then you can jump between index ranges (i + 1) to (i + K). ... |
PyQt5 – Set Icon for Check Box - GeeksforGeeks | 22 Apr, 2020
In this article we will see about how to set icon to a check box. Setting icon to a check box is similar to setting icon to a main window, icon of check box appear in between the indicator and the check box it self below is how normal check box vs check box with icon looks like.
In order to do this we wi... | [
{
"code": null,
"e": 25393,
"s": 25365,
"text": "\n22 Apr, 2020"
},
{
"code": null,
"e": 25673,
"s": 25393,
"text": "In this article we will see about how to set icon to a check box. Setting icon to a check box is similar to setting icon to a main window, icon of check box appear... |
SQLite - Triggers | SQLite Triggers are database callback functions, which are automatically performed/invoked when a specified database event occurs. Following are the important points about SQLite triggers −
SQLite trigger may be specified to fire whenever a DELETE, INSERT or UPDATE of a particular database table occurs or whenever an U... | [
{
"code": null,
"e": 2828,
"s": 2638,
"text": "SQLite Triggers are database callback functions, which are automatically performed/invoked when a specified database event occurs. Following are the important points about SQLite triggers −"
},
{
"code": null,
"e": 3016,
"s": 2828,
"... |
Rank of All Elements in an Array using C++ | In the given problem, we need to rank all the given elements of an array, with the smallest number having the smallest rank and the largest having the largest rank. We also need to change the ranks of a number depending on their frequencies, for examples −
Input : 20 30 10
Output : 2.0 3.0 1.0
Input : 10 12 15 12 10 2... | [
{
"code": null,
"e": 1319,
"s": 1062,
"text": "In the given problem, we need to rank all the given elements of an array, with the smallest number having the smallest rank and the largest having the largest rank. We also need to change the ranks of a number depending on their frequencies, for example... |
CSV Full Form - GeeksforGeeks | 12 Jun, 2020
Comma Separated Value (CSV) is a text file containing data contents. It facilitates the storage of data in a table like structure. CSV files are stored with a CSV extension.The data fields in a ksd)(*&^%$#@nslnl like in databases or spreadsheets CSV are usually separated by delimiters, a space or a comma
1... | [
{
"code": null,
"e": 24304,
"s": 24276,
"text": "\n12 Jun, 2020"
},
{
"code": null,
"e": 24610,
"s": 24304,
"text": "Comma Separated Value (CSV) is a text file containing data contents. It facilitates the storage of data in a table like structure. CSV files are stored with a CSV ... |
The MySQL Command-Line Client | The mysql is a simple SQL shell that has input line editing capabilities. It supports interactive and noninteractive usage. When it is used interactively, query results are presented in an ASCII-table format. When it is used noninteractively, like a filter, the result would be presented in tab-separated format.
The out... | [
{
"code": null,
"e": 1375,
"s": 1062,
"text": "The mysql is a simple SQL shell that has input line editing capabilities. It supports interactive and noninteractive usage. When it is used interactively, query results are presented in an ASCII-table format. When it is used noninteractively, like a fil... |
Arranging words in Ascending order in a string - JavaScript | Let’s say, we are required to write a JavaScript function that takes in a string and returns a new string with words rearranged according to their increasing length.
Following is the code −
const str = 'This is a sample string only';
const arrangeByLength = str => {
const strArr = str.split(' ');
const sorted = s... | [
{
"code": null,
"e": 1228,
"s": 1062,
"text": "Let’s say, we are required to write a JavaScript function that takes in a string and returns a new string with words rearranged according to their increasing length."
},
{
"code": null,
"e": 1252,
"s": 1228,
"text": "Following is the... |
How to use setInterval function call in JavaScript? | The setInterval() method is JavaScript is used to evaluate an expression at intervals. Here’s the syntax:
setInterval(function, interval_in_milliseconds, param1, param2, param3...)
Here, interval_in_milliseconds sets the intervals in milliseconds, after the code will execute.
param are the optional parameters, which is... | [
{
"code": null,
"e": 1168,
"s": 1062,
"text": "The setInterval() method is JavaScript is used to evaluate an expression at intervals. Here’s the syntax:"
},
{
"code": null,
"e": 1243,
"s": 1168,
"text": "setInterval(function, interval_in_milliseconds, param1, param2, param3...)"
... |
Draw a line in C++ graphics | In this tutorial, we will be discussing a program to draw a line in C++ graphics.
To implement different shapes and sizes, animations, graphics.h library is used in C++.
#include <graphics.h>
int main(){
int gd = DETECT, gm;
initgraph(&gd, &gm, "");
line(150, 150, 450, 150);
line(150, 200, 450, 200);
lin... | [
{
"code": null,
"e": 1144,
"s": 1062,
"text": "In this tutorial, we will be discussing a program to draw a line in C++ graphics."
},
{
"code": null,
"e": 1232,
"s": 1144,
"text": "To implement different shapes and sizes, animations, graphics.h library is used in C++."
},
{
... |
JDBC Delete Example | JDBC Delete Program | executeUpdate() JDBC | PROGRAMMINGJava ExamplesC Examples
Java Examples
C Examples
C Tutorials
aws
JAVAEXCEPTIONSCOLLECTIONSSWINGJDBC
EXCEPTIONS
COLLECTIONS
SWING
JDBC
JAVA 8
SPRING
SPRING BOOT
HIBERNATE
PYTHON
PHP
JQUERY
PROGRAMMINGJava ExamplesC Examples
Java Examples
C Examples
C Tutorials
aws
In this tutorials, we are going to understand... | [
{
"code": null,
"e": 158,
"s": 123,
"text": "PROGRAMMINGJava ExamplesC Examples"
},
{
"code": null,
"e": 172,
"s": 158,
"text": "Java Examples"
},
{
"code": null,
"e": 183,
"s": 172,
"text": "C Examples"
},
{
"code": null,
"e": 195,
"s": 183,
... |
All the Steps to Build your first Image Classifier (with code) | by Arthur Arnx | Towards Data Science | If you want to create an image classifier but have no idea where to start, follow this quick guide to understand the concepts and be able to train a convolutional neural network to recognize any image you want !
To achieve that, the code provided is written in Python (3.x), and we will mainly use the Keras library.
Fir... | [
{
"code": null,
"e": 383,
"s": 171,
"text": "If you want to create an image classifier but have no idea where to start, follow this quick guide to understand the concepts and be able to train a convolutional neural network to recognize any image you want !"
},
{
"code": null,
"e": 488,
... |
Dynamic Programming: return all matched data in JavaScript | Suppose we have a JSON object that have information about the location of some cities of some countries like this −
const countryInfo = {
country: [{
name: "Bangladesh",
province: [{
name:"Dhaka",
city: [{
name:"Tangail",
lat: '11'
}, {
name:... | [
{
"code": null,
"e": 1178,
"s": 1062,
"text": "Suppose we have a JSON object that have information about the location of some cities of some countries like this −"
},
{
"code": null,
"e": 2408,
"s": 1178,
"text": "const countryInfo = {\n country: [{\n name: \"Bangladesh\",... |
do...while loop in C | Unlike for and while loops, which test the loop condition at the top of the loop, the do...while loop in C programming checks its condition at the bottom of the loop.
A do...while loop is similar to a while loop, except the fact that it is guaranteed to execute at least one time.
The syntax of a do...while loop in C pr... | [
{
"code": null,
"e": 2251,
"s": 2084,
"text": "Unlike for and while loops, which test the loop condition at the top of the loop, the do...while loop in C programming checks its condition at the bottom of the loop."
},
{
"code": null,
"e": 2365,
"s": 2251,
"text": "A do...while lo... |
C Library - <time.h> | The time.h header defines four variable types, two macro and various functions for manipulating date and time.
Following are the variable types defined in the header time.h −
size_t
This is the unsigned integral type and is the result of the sizeof keyword.
clock_t
This is a type suitable for storing the processor time... | [
{
"code": null,
"e": 2118,
"s": 2007,
"text": "The time.h header defines four variable types, two macro and various functions for manipulating date and time."
},
{
"code": null,
"e": 2182,
"s": 2118,
"text": "Following are the variable types defined in the header time.h −"
},
... |
How can I set the content of an iframe without src using jQuery? | To set the content of an iframe without src, use the jQuery html() method. You can try to run the following code to learn how to set the content of an iframe without src attribute −
Live Demo
<html>
<head>
<title>jQuery Selector</title>
<script src = "https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.mi... | [
{
"code": null,
"e": 1244,
"s": 1062,
"text": "To set the content of an iframe without src, use the jQuery html() method. You can try to run the following code to learn how to set the content of an iframe without src attribute −"
},
{
"code": null,
"e": 1254,
"s": 1244,
"text": "... |
Display Month of Year using Java Calendar | For using Calendar class, import the following package.
import java.util.Calendar;
Using the Calendar class, create an object.
Calendar calendar = Calendar.getInstance();
Now, create a string array of the month names.
String[] month = new String[] {"January", "February", "March", "April", "May", "June", "July", "August... | [
{
"code": null,
"e": 1118,
"s": 1062,
"text": "For using Calendar class, import the following package."
},
{
"code": null,
"e": 1145,
"s": 1118,
"text": "import java.util.Calendar;"
},
{
"code": null,
"e": 1189,
"s": 1145,
"text": "Using the Calendar class, cr... |
MVC Framework - Layouts | Layouts are used in MVC to provide a consistent look and feel on all the pages of our application. It is the same as defining the Master Pages but MVC provides some more functionalities.
Step 1 − Create a sample MVC application with Internet application as Template and create a Content folder in the root directory of t... | [
{
"code": null,
"e": 2212,
"s": 2025,
"text": "Layouts are used in MVC to provide a consistent look and feel on all the pages of our application. It is the same as defining the Master Pages but MVC provides some more functionalities."
},
{
"code": null,
"e": 2365,
"s": 2212,
"tex... |
Python Program to calculate the Round Trip Time (RTT) | Here we will see how Python can be used to get the Round Trip Time (RTT). The RTT is the time which is taken by the entire trip of a signal. It means the time between the starting time when a signal is sent and the receiving time of the acknowledge signal.
The RTT results varies on different parameters like.
The data t... | [
{
"code": null,
"e": 1319,
"s": 1062,
"text": "Here we will see how Python can be used to get the Round Trip Time (RTT). The RTT is the time which is taken by the entire trip of a signal. It means the time between the starting time when a signal is sent and the receiving time of the acknowledge sign... |
Update a column A if null, else update column B, else if both columns are not null do nothing with MySQL | For this, use IF() with IS NULL property. Let us first create a table −
mysql> create table DemoTable1976
(
FirstName varchar(20),
LastName varchar(20)
);
Query OK, 0 rows affected (0.00 sec)
Insert some records in the table using insert command −
mysql> insert into DemoTable1976 values('John','Doe');
Query... | [
{
"code": null,
"e": 1134,
"s": 1062,
"text": "For this, use IF() with IS NULL property. Let us first create a table −"
},
{
"code": null,
"e": 1266,
"s": 1134,
"text": "mysql> create table DemoTable1976\n (\n FirstName varchar(20),\n LastName varchar(20)\n );\nQuery OK, ... |
Swap and Maximize | Practice | GeeksforGeeks | Given an array a[ ] of N elements. Consider array as a circular array i.e. element after an is a1. The task is to find maximum sum of the absolute difference between consecutive elements with rearrangement of array elements allowed i.e. after any rearrangement of array elements find |a1 – a2| + |a2 – a3| + ...... + |an... | [
{
"code": null,
"e": 580,
"s": 238,
"text": "Given an array a[ ] of N elements. Consider array as a circular array i.e. element after an is a1. The task is to find maximum sum of the absolute difference between consecutive elements with rearrangement of array elements allowed i.e. after any rearrang... |
Teradata - Create Tables | CREATE TABLE command is used to create tables in Teradata.
Following is the generic syntax of CREATE TABLE statement.
CREATE <SET/MULTISET> TABLE <Tablename>
<Table Options>
<Column Definitions>
<Index Definitions>;
Table Options − Specifies the physical attributes of the table such as Journal and Fallback.
Table O... | [
{
"code": null,
"e": 2689,
"s": 2630,
"text": "CREATE TABLE command is used to create tables in Teradata."
},
{
"code": null,
"e": 2748,
"s": 2689,
"text": "Following is the generic syntax of CREATE TABLE statement."
},
{
"code": null,
"e": 2850,
"s": 2748,
"t... |
What is a singleton class in Java? | A singleton class in Java is the one which can have only one object.
The easiest implementation consists of a private constructor and a field to hold its result, and a static accessor method with a name like getInstance().
The private field can be assigned from within a static initializer block or, more simply, using ... | [
{
"code": null,
"e": 1131,
"s": 1062,
"text": "A singleton class in Java is the one which can have only one object."
},
{
"code": null,
"e": 1285,
"s": 1131,
"text": "The easiest implementation consists of a private constructor and a field to hold its result, and a static accesso... |
How to create fast and accurate scatter plots with lots of data in python | by Paul Gavrikov | Towards Data Science | Scatter plots are quite basic and easy to create — or so I thought. Recently I had to visualize a dataset with hundreds of millions of data points. If you’re a Python developer you’ll immediately import matplotlib and get started. But it turns out there are better, faster, and more intuitive ways to create scatter plot... | [
{
"code": null,
"e": 495,
"s": 172,
"text": "Scatter plots are quite basic and easy to create — or so I thought. Recently I had to visualize a dataset with hundreds of millions of data points. If you’re a Python developer you’ll immediately import matplotlib and get started. But it turns out there a... |
How to load and display an image on iOS App using Swift? | To load and display an image in iOS app we’ll first need to get an image.
Then we’ll drag that image to our project and select copy if required option and our application target.
Let’s see the rest with help of an example.
Now, we’ll create an UIImageView and assign the image to its image property, for that we’ll creat... | [
{
"code": null,
"e": 1136,
"s": 1062,
"text": "To load and display an image in iOS app we’ll first need to get an image."
},
{
"code": null,
"e": 1241,
"s": 1136,
"text": "Then we’ll drag that image to our project and select copy if required option and our application target."
... |
Python Design Patterns - Facade | Facade design pattern provides a unified interface to a set of interfaces in a subsystem. It defines a higher-level interface that any subsystem can use.
A facade class knows which subsystem is responsible for a request.
Let us now see how to design a facade pattern.
class _IgnitionSystem(object):
@staticmethod
... | [
{
"code": null,
"e": 2633,
"s": 2479,
"text": "Facade design pattern provides a unified interface to a set of interfaces in a subsystem. It defines a higher-level interface that any subsystem can use."
},
{
"code": null,
"e": 2700,
"s": 2633,
"text": "A facade class knows which s... |
Bootstrap 4 Button .btn-outline-danger class | To set an outline on a button that indicates danger, you need to use the btn-outline-danger class in Bootstrap.
Set the outline in the <button> element −
<button type="button" class="btn btn-outline-danger">
Danger Ahead
</button>
You can try to run the following code to implement the btn-outline-danger class −
Live ... | [
{
"code": null,
"e": 1174,
"s": 1062,
"text": "To set an outline on a button that indicates danger, you need to use the btn-outline-danger class in Bootstrap."
},
{
"code": null,
"e": 1216,
"s": 1174,
"text": "Set the outline in the <button> element −"
},
{
"code": null,
... |
How to find through list of ids in MongoDB? | You can use $in operator to find through the list of ids in MongoDB. To understand the concept, let us create a collection with the document. The query to create a collection with a document is as follows −
> db.findListOfIdsDemo.insertOne({"StudentName":"Carol","StudentAge":21});
{
"acknowledged" : true,
"insert... | [
{
"code": null,
"e": 1269,
"s": 1062,
"text": "You can use $in operator to find through the list of ids in MongoDB. To understand the concept, let us create a collection with the document. The query to create a collection with a document is as follows −"
},
{
"code": null,
"e": 2065,
... |
Python PostgreSQL - Create Database - GeeksforGeeks | 23 Aug, 2021
In this article, we will discuss how to create database in PsotgreSQL using pysopg2 in Python.
CREATE DATABASE is one of the Data Definition Language ( DDL ) statements supported by the PostgreSQL Database Management System. It is used to create database in PostgreSQL. Database name should be always unique... | [
{
"code": null,
"e": 23901,
"s": 23873,
"text": "\n23 Aug, 2021"
},
{
"code": null,
"e": 23996,
"s": 23901,
"text": "In this article, we will discuss how to create database in PsotgreSQL using pysopg2 in Python."
},
{
"code": null,
"e": 24291,
"s": 23996,
"tex... |
Keras - Deep learning | Keras provides a complete framework to create any type of neural networks. Keras is innovative as well as very easy to learn. It supports simple neural network to very large and complex neural network model. Let us understand the architecture of Keras framework and how Keras helps in deep learning in this chapter.
Kera... | [
{
"code": null,
"e": 2367,
"s": 2051,
"text": "Keras provides a complete framework to create any type of neural networks. Keras is innovative as well as very easy to learn. It supports simple neural network to very large and complex neural network model. Let us understand the architecture of Keras f... |
Count number of substrings of a string consisting of same characters - GeeksforGeeks | 26 Aug, 2021
Given a string. The task is to find out the numbers of substrings consisting of the same characters.
Examples:
Input: abba Output: 5 The desired substrings are {a}, {b}, {b}, {a}, {bb}
Input: bbbcbb Output: 10
Approach: It is known for a string of length n, there are a total of n*(n+1)/2 number of subst... | [
{
"code": null,
"e": 24854,
"s": 24826,
"text": "\n26 Aug, 2021"
},
{
"code": null,
"e": 24955,
"s": 24854,
"text": "Given a string. The task is to find out the numbers of substrings consisting of the same characters."
},
{
"code": null,
"e": 24966,
"s": 24955,
... |
Share your Projects even more easily with this New Streamlit Feature | by Rahul Agarwal | Towards Data Science | A Machine Learning project is never really complete if we don’t have a good way to showcase it.
While in the past, a well-made visualization or a small PPT used to be enough for showcasing a data science project, with the advent of dashboarding tools like RShiny and Dash, a good data scientist needs to have a fair bit ... | [
{
"code": null,
"e": 267,
"s": 171,
"text": "A Machine Learning project is never really complete if we don’t have a good way to showcase it."
},
{
"code": null,
"e": 536,
"s": 267,
"text": "While in the past, a well-made visualization or a small PPT used to be enough for showcasi... |
Sorting array with conditional swapping | 09 Jun, 2022
Given an array arr containing elements from [1...to n]. Each element appears exactly once in the array arr. Given an string str of length n-1. Each character of the string is either 0 or 1. In the array, swapping of the i-th element with (i + 1)-th element can be done as many times as we want, if the i-th ... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n09 Jun, 2022"
},
{
"code": null,
"e": 489,
"s": 52,
"text": "Given an array arr containing elements from [1...to n]. Each element appears exactly once in the array arr. Given an string str of length n-1. Each character of the string is... |
Node.js fs.unlinkSync() Method | 08 Oct, 2021
The fs.unlinkSync() method is used to synchronously remove a file or symbolic link from the filesystem. This function does not work on directories, therefore it is recommended to use fs.rmdir() to remove a directory.Syntax:
fs.unlinkSync( path )
Parameters: This method accepts one parameter as mentioned ... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n08 Oct, 2021"
},
{
"code": null,
"e": 254,
"s": 28,
"text": "The fs.unlinkSync() method is used to synchronously remove a file or symbolic link from the filesystem. This function does not work on directories, therefore it is recommended... |
SOAP - Quick Guide | SOAP is an acronym for Simple Object Access Protocol. It is an XML-based messaging protocol for exchanging information among computers. SOAP is an application of the XML specification.
SOAP is a communication protocol designed to communicate via Internet.
SOAP is a communication protocol designed to communicate via Int... | [
{
"code": null,
"e": 2033,
"s": 1848,
"text": "SOAP is an acronym for Simple Object Access Protocol. It is an XML-based messaging protocol for exchanging information among computers. SOAP is an application of the XML specification."
},
{
"code": null,
"e": 2104,
"s": 2033,
"text"... |
Python String replace() Method | Python string method replace() returns a copy of the string in which the occurrences of old have been replaced with new, optionally restricting the number of replacements to max.
Following is the syntax for replace() method −
str.replace(old, new[, max])
old − This is old substring to be replaced.
old − This is old s... | [
{
"code": null,
"e": 2558,
"s": 2378,
"text": "Python string method replace() returns a copy of the string in which the occurrences of old have been replaced with new, optionally restricting the number of replacements to max."
},
{
"code": null,
"e": 2605,
"s": 2558,
"text": "Fo... |
Export List to CSV or text File in R | 16 May, 2021
In this article, we will discuss how to export a list to CSV and text file using R Programming language. Exporting to both of these types of files can be done using capture.output() function. This function is mainly used to evaluate its arguments with the output being returned as a character string or sent... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n16 May, 2021"
},
{
"code": null,
"e": 475,
"s": 28,
"text": "In this article, we will discuss how to export a list to CSV and text file using R Programming language. Exporting to both of these types of files can be done using capture.ou... |
How to Send Data From Activity to Fragment in Android? | 15 Feb, 2022
Prerequisites:
Introduction to Activities in Android
Introduction to Fragments in Android
In Android, a fragment is a portion of the user interface that can be used again and again. Fragment manages its own layout and has its own life cycle. Since fragment is a small portion of the bigger user interface, i... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n15 Feb, 2022"
},
{
"code": null,
"e": 43,
"s": 28,
"text": "Prerequisites:"
},
{
"code": null,
"e": 81,
"s": 43,
"text": "Introduction to Activities in Android"
},
{
"code": null,
"e": 118,
"s": 81,
... |
Print all the prime numbers between ‘m’ and ‘n’ in PL/SQL | 10 May, 2020
Prerequisite – PL/SQL Introduction
In PL/SQL code groups of commands are arranged within a block. A block group related declarations or statements. In declare part, we declare variables and between begin and end part, we perform the operations.
Problem :Write a script in PL/SQL to display all the prime num... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n10 May, 2020"
},
{
"code": null,
"e": 63,
"s": 28,
"text": "Prerequisite – PL/SQL Introduction"
},
{
"code": null,
"e": 273,
"s": 63,
"text": "In PL/SQL code groups of commands are arranged within a block. A block gr... |
volatile Keyword in Java | 23 Jan, 2022
Using volatile is yet another way (like synchronized, atomic wrapper) of making class thread-safe. Thread-safe means that a method or class instance can be used by multiple threads at the same time without any problem. Consider the below example.
class SharedObj
{
// Changes made to sharedVar in one th... | [
{
"code": null,
"e": 54,
"s": 26,
"text": "\n23 Jan, 2022"
},
{
"code": null,
"e": 302,
"s": 54,
"text": "Using volatile is yet another way (like synchronized, atomic wrapper) of making class thread-safe. Thread-safe means that a method or class instance can be used by multiple t... |
EmberJS - Classes and Instances | Class is a template or blue print, that has a collection of variables and functions, where as instances are related to the object of that class. Creating and extending the Ember class on Ember.Object is the main property of the Ember object model.
You can create new Ember class by using the Ember.Object's extend() meth... | [
{
"code": null,
"e": 2280,
"s": 2032,
"text": "Class is a template or blue print, that has a collection of variables and functions, where as instances are related to the object of that class. Creating and extending the Ember class on Ember.Object is the main property of the Ember object model."
},... |
How to make text input non-editable using CSS? | 26 Feb, 2019
The read-only attribute in HTML is used to create a text input non-editable. But in case of CSS, the pointer-events property is used to stop the pointer events.
Syntax:
pointer-events: none;
Example 1: This example shows two input text, in which one is non-editable.
<!DOCTYPE html> <html> <head> ... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n26 Feb, 2019"
},
{
"code": null,
"e": 189,
"s": 28,
"text": "The read-only attribute in HTML is used to create a text input non-editable. But in case of CSS, the pointer-events property is used to stop the pointer events."
},
{
... |
How to use Table Component in ReactJS ? - GeeksforGeeks | 05 Mar, 2021
Tables display sets of data. They can be fully customized. Material UI for React has this component available for us, and it is very easy to integrate. We can use the Table Component in ReactJS using the following approach.
Creating React Application And Installing Module:
Step 1: Create a React applicatio... | [
{
"code": null,
"e": 24397,
"s": 24369,
"text": "\n05 Mar, 2021"
},
{
"code": null,
"e": 24621,
"s": 24397,
"text": "Tables display sets of data. They can be fully customized. Material UI for React has this component available for us, and it is very easy to integrate. We can use ... |
What is routing? Explain how it works in ASP.NET Core | In the context of web application frameworks, routing matches an incoming HTTP request to executable code. The executable code works as an endpoint that handles the request and returns a response.
ASP.NET Core defines and configures the endpoints when the application starts. Routing also handles extracting the values f... | [
{
"code": null,
"e": 1259,
"s": 1062,
"text": "In the context of web application frameworks, routing matches an incoming HTTP request to executable code. The executable code works as an endpoint that handles the request and returns a response."
},
{
"code": null,
"e": 1486,
"s": 1259... |
printf() function in PHP | The printf() function output a formatted string. It returns the length of the outputted string.
printf (format, argument1, argument2, ... )
format − Specifies the string and how to format the variables in it.
format − Specifies the string and how to format the variables in it.
The following are the possible format valu... | [
{
"code": null,
"e": 1158,
"s": 1062,
"text": "The printf() function output a formatted string. It returns the length of the outputted string."
},
{
"code": null,
"e": 1202,
"s": 1158,
"text": "printf (format, argument1, argument2, ... )"
},
{
"code": null,
"e": 1271,... |
Big Data Analytics - Time Series Analysis | Time series is a sequence of observations of categorical or numeric variables indexed by a date, or timestamp. A clear example of time series data is the time series of a stock price. In the following table, we can see the basic structure of time series data. In this case the observations are recorded every hour.
Norma... | [
{
"code": null,
"e": 2869,
"s": 2554,
"text": "Time series is a sequence of observations of categorical or numeric variables indexed by a date, or timestamp. A clear example of time series data is the time series of a stock price. In the following table, we can see the basic structure of time series... |
Make array elements equal in Minimum Steps | 13 Sep, 2021
Given an array of N elements where the first element is a non zero positive number M, and the rest N – 1 elements are 0, the task is to calculate the minimum number of steps required to make the entire array equal while abiding by the following rules:1. The ith element can be increased by one if and only i... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n13 Sep, 2021"
},
{
"code": null,
"e": 640,
"s": 28,
"text": "Given an array of N elements where the first element is a non zero positive number M, and the rest N – 1 elements are 0, the task is to calculate the minimum number of steps r... |
Happy Number | 14 Jun, 2022
A number is called happy if it leads to 1 after a sequence of steps wherein each step number is replaced by the sum of squares of its digit that is if we start with Happy Number and keep replacing it with digits square sum, we reach 1.
Examples :
Input: n = 19
Output: True
19 is Happy Number,
1^2 + 9^2 =... | [
{
"code": null,
"e": 54,
"s": 26,
"text": "\n14 Jun, 2022"
},
{
"code": null,
"e": 291,
"s": 54,
"text": "A number is called happy if it leads to 1 after a sequence of steps wherein each step number is replaced by the sum of squares of its digit that is if we start with Happy Num... |
Setting up the environment in C# | 06 Jun, 2019
Prerequisite : Introduction to C#C# is a general-purpose, modern and object-oriented programming language pronounced as “C sharp”. It was developed by Microsoft led by Anders Hejlsberg and his team within the .Net initiative and was approved by the European Computer Manufacturers Association (ECMA) and Int... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n06 Jun, 2019"
},
{
"code": null,
"e": 613,
"s": 52,
"text": "Prerequisite : Introduction to C#C# is a general-purpose, modern and object-oriented programming language pronounced as “C sharp”. It was developed by Microsoft led by Anders... |
Count number of even and odd length elements in an Array | 22 Mar, 2021
Given an array arr[] of integers of size N, the task is to find the number elements of the array having even and odd length.Examples:
Input: arr[] = {14, 735, 3333, 223222} Output: Number of even length elements = 3 Number of odd length elements = 1 Input: arr[] = {1121, 322, 32, 14783, 44} Output: Numbe... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n22 Mar, 2021"
},
{
"code": null,
"e": 164,
"s": 28,
"text": "Given an array arr[] of integers of size N, the task is to find the number elements of the array having even and odd length.Examples: "
},
{
"code": null,
"e": 40... |
Python Pillow Tutorial | 17 Jun, 2021
Digital Image processing means processing the image digitally with the help of a computer. Using image processing we can perform operations like enhancing the image, blurring the image, extracting text from images, and many more operations. There are various ways to process images digitally. Here we will d... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n17 Jun, 2021"
},
{
"code": null,
"e": 696,
"s": 28,
"text": "Digital Image processing means processing the image digitally with the help of a computer. Using image processing we can perform operations like enhancing the image, blurring ... |
Difference Between Fork/Join Framework and ExecutorService in Java | 01 Jul, 2022
The Fork/Join framework provides fine-grained task execution framework with high performance for Java data parallelism. Its parallel computing engine is used by many higher-level frameworks. The fork/join framework supports a style of parallel programming that solves problems by “Divide and conquer”, in th... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n01 Jul, 2022"
},
{
"code": null,
"e": 370,
"s": 28,
"text": "The Fork/Join framework provides fine-grained task execution framework with high performance for Java data parallelism. Its parallel computing engine is used by many higher-le... |
Theming Material Design Buttons in Android with Examples | 14 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": "\n14 Oct, 2020"
},
{
"code": null,
"e": 1263,
"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 engineer... |
Pandas – Find unique values from multiple columns | 21 Oct, 2021
Prerequisite: Pandas
In this article, we will discuss various methods to obtain unique values from multiple columns of Pandas DataFrame.
Method 1: Using pandas Unique() and Concat() methods
Pandas series aka columns has a unique() method that filters out only unique values from a column. The first output ... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n21 Oct, 2021"
},
{
"code": null,
"e": 50,
"s": 28,
"text": "Prerequisite: Pandas "
},
{
"code": null,
"e": 166,
"s": 50,
"text": "In this article, we will discuss various methods to obtain unique values from multiple... |
Introduction to Material Design in Android | 27 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": 54,
"s": 26,
"text": "\n27 Oct, 2020"
},
{
"code": null,
"e": 709,
"s": 54,
"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 engineer... |
Python | getattr() method | 08 Oct, 2021
Python getattr() function is used to access the attribute value of an object and also gives an option of executing the default value in case of unavailability of the key.
Syntax : getattr(obj, key, def)
Parameters :
obj : The object whose attributes need to be processed.
key : The attribute of object
def ... | [
{
"code": null,
"e": 53,
"s": 25,
"text": "\n08 Oct, 2021"
},
{
"code": null,
"e": 224,
"s": 53,
"text": "Python getattr() function is used to access the attribute value of an object and also gives an option of executing the default value in case of unavailability of the key."
... |
Java.util.zip.InflaterInputStream class in Java | 26 Jan, 2017
This class implements a stream filter for uncompressing data in the “deflate” compression format. It is also used as the basis for other decompression filters, such as GZIPInputStream.Constructors
InflaterInputStream(InputStream in) : Creates a new input stream with a default decompressor and buffer size.
... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n26 Jan, 2017"
},
{
"code": null,
"e": 225,
"s": 28,
"text": "This class implements a stream filter for uncompressing data in the “deflate” compression format. It is also used as the basis for other decompression filters, such as GZIPInp... |
Sets union() function | Guava | Java | 15 Nov, 2018
Guava’s Sets.union() returns an unmodifiable view of the union of two sets. The returned set contains all elements that are contained in either backing set. Iterating over the returned set iterates first over all the elements of set1, then over each element of set2, in order, that is not contained in set1.... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n15 Nov, 2018"
},
{
"code": null,
"e": 336,
"s": 28,
"text": "Guava’s Sets.union() returns an unmodifiable view of the union of two sets. The returned set contains all elements that are contained in either backing set. Iterating over the... |
Heap Sort for decreasing order using min heap | 20 Jun, 2022
Given an array of elements, sort the array in decreasing order using min heap. Examples:
Input : arr[] = {5, 3, 10, 1}
Output : arr[] = {10, 5, 3, 1}
Input : arr[] = {1, 50, 100, 25}
Output : arr[] = {100, 50, 25, 1}
Prerequisite : Heap sort using min heap.Algorithm : 1. Build a min heap from the inpu... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n20 Jun, 2022"
},
{
"code": null,
"e": 143,
"s": 52,
"text": "Given an array of elements, sort the array in decreasing order using min heap. Examples: "
},
{
"code": null,
"e": 272,
"s": 143,
"text": "Input : arr[] ... |
Hierholzer’s Algorithm for directed graph | 06 Jul, 2022
Given a directed Eulerian graph, print an Euler circuit. Euler circuit is a path that traverses every edge of a graph, and the path ends on the starting vertex. Examples:
Input : Adjacency list for the below graph
Output : 0 -> 1 -> 2 -> 0
Input : Adjacency list for the below graph
Output : 0 -> 6 -> 4... | [
{
"code": null,
"e": 54,
"s": 26,
"text": "\n06 Jul, 2022"
},
{
"code": null,
"e": 225,
"s": 54,
"text": "Given a directed Eulerian graph, print an Euler circuit. Euler circuit is a path that traverses every edge of a graph, and the path ends on the starting vertex. Examples:"
... |
Count pairs in array divisible by K | Practice | GeeksforGeeks | Given an array A[] and positive integer K, the task is to count total number of pairs in the array whose sum is divisible by K.
Example 1:
Input :
A[] = {2, 2, 1, 7, 5, 3}, K = 4
Output : 5
Explanation :
There are five pairs possible whose sum
is divisible by '4' i.e., (2, 2),
(1, 7), (7, 5), (1, 3) and (5, 3)
Examp... | [
{
"code": null,
"e": 366,
"s": 238,
"text": "Given an array A[] and positive integer K, the task is to count total number of pairs in the array whose sum is divisible by K."
},
{
"code": null,
"e": 377,
"s": 366,
"text": "Example 1:"
},
{
"code": null,
"e": 553,
"... |
Bead Sort | A Natural Sorting Algorithm - GeeksforGeeks | 27 May, 2018
Also known as Gravity sort, this algorithm was inspired from natural phenomenons and was designed keeping in mind objects(or beads) falling under the influence of gravity.
The Idea: Positive numbers are represented by a set of beads like those on an abacus.
Sorting of {7, 2, 1, 4, 2} using Bead Sort. Beads... | [
{
"code": null,
"e": 24078,
"s": 24050,
"text": "\n27 May, 2018"
},
{
"code": null,
"e": 24250,
"s": 24078,
"text": "Also known as Gravity sort, this algorithm was inspired from natural phenomenons and was designed keeping in mind objects(or beads) falling under the influence of ... |
Regular Expressions and RegExp Object | A regular expression is an object that describes a pattern of characters.
The JavaScript RegExp class represents regular expressions, and both String and RegExp define methods that use regular expressions to perform powerful pattern-matching and search-and-replace functions on text.
A regular expression could be define... | [
{
"code": null,
"e": 2540,
"s": 2466,
"text": "A regular expression is an object that describes a pattern of characters."
},
{
"code": null,
"e": 2750,
"s": 2540,
"text": "The JavaScript RegExp class represents regular expressions, and both String and RegExp define methods that u... |
How To Configure and Install Redis on Ubuntu Linux | In this article we will learn how to configure Redis, Redis is an in-memory Key-value store which is popular for its flexibility, performance and used with wide language support. We will configure this on the Ubuntu Linux server. To do this demo we need a non-root user and we will set Sudo privileges to the user to per... | [
{
"code": null,
"e": 1388,
"s": 1062,
"text": "In this article we will learn how to configure Redis, Redis is an in-memory Key-value store which is popular for its flexibility, performance and used with wide language support. We will configure this on the Ubuntu Linux server. To do this demo we need... |
Greenhouse gas (CO2) emissions and oil refining | by Ranganath Venkataraman | Towards Data Science | My previous posts have used Python visualizations to explore oil refining capacity across the United States. Further, we analyzed behavior of crude and fuel prices over the years.
I’m going to explore something else in this article: carbon dioxide (CO2) emissions from oil refining. Source data for all work below is fro... | [
{
"code": null,
"e": 351,
"s": 171,
"text": "My previous posts have used Python visualizations to explore oil refining capacity across the United States. Further, we analyzed behavior of crude and fuel prices over the years."
},
{
"code": null,
"e": 722,
"s": 351,
"text": "I’m go... |
JavaScript Objects | In real life, a car is an object.
A car has properties like weight and color, and methods like start and stop:
All cars have the same properties, but the property values differ from car to car.
All cars have the same methods, but the methods are performed
at different times.
You have already learned that JavaScript v... | [
{
"code": null,
"e": 35,
"s": 0,
"text": "In real life, a car is an object. "
},
{
"code": null,
"e": 112,
"s": 35,
"text": "A car has properties like weight and color, and methods like start and stop:"
},
{
"code": null,
"e": 195,
"s": 112,
"text": "All cars ... |
How to delete specific cache data in ReactJS ? | 26 Apr, 2021
We can use the following approach in ReactJS to delete specific cache data in ReactJS. We can delete specific cache data from the browser as per the user requirement. Caching is a technique that helps us to stores a copy of a given resource into our browser and serves it back when requested.
Approach: Foll... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n26 Apr, 2021"
},
{
"code": null,
"e": 321,
"s": 28,
"text": "We can use the following approach in ReactJS to delete specific cache data in ReactJS. We can delete specific cache data from the browser as per the user requirement. Caching ... |
How to Get Coordinate Of Screen in Python Turtle ? | 21 Jun, 2022
Turtle is a special feature in python which contains a graphical library. In this article we will learn how to Get Coordinate Of Screen in Python Turtle.
Turtle has many built in function to create this program we use following.
import turtle –> This is the python library which allow us to access turtle l... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n21 Jun, 2022"
},
{
"code": null,
"e": 183,
"s": 28,
"text": "Turtle is a special feature in python which contains a graphical library. In this article we will learn how to Get Coordinate Of Screen in Python Turtle. "
},
{
"code"... |
How to show and hide widgets in Tkinter? | Tkinter is a Python library which is used to create and develop GUI-based applications.Let us suppose that we have to create an application such that we can show or hide the widgets.
In order to display/show the widget, use pack() geometry manager
To hide any widget from the application, use pack_forget() method.
Let u... | [
{
"code": null,
"e": 1370,
"s": 1187,
"text": "Tkinter is a Python library which is used to create and develop GUI-based applications.Let us suppose that we have to create an application such that we can show or hide the widgets."
},
{
"code": null,
"e": 1435,
"s": 1370,
"text": ... |
Arduino - micros () function | The micros() function returns the number of microseconds from the time, the Arduino board begins running the current program. This number overflows i.e. goes back to zero after approximately 70 minutes. On 16 MHz Arduino boards (e.g. Duemilanove and Nano), this function has a resolution of four microseconds (i.e. the v... | [
{
"code": null,
"e": 3333,
"s": 2870,
"text": "The micros() function returns the number of microseconds from the time, the Arduino board begins running the current program. This number overflows i.e. goes back to zero after approximately 70 minutes. On 16 MHz Arduino boards (e.g. Duemilanove and Nan... |
What are runtime errors in JavaScript? | There are three types of errors in programming: (a) Syntax Errors, (b) Runtime Errors, and (c) Logical Errors. Runtime errors, also called exceptions, occur during execution (after compilation/interpretation). For example, the following line causes a runtime error because here the syntax is correct, but at runtime, it ... | [
{
"code": null,
"e": 1430,
"s": 1062,
"text": "There are three types of errors in programming: (a) Syntax Errors, (b) Runtime Errors, and (c) Logical Errors. Runtime errors, also called exceptions, occur during execution (after compilation/interpretation). For example, the following line causes a ru... |
Creating a Path Graph Using Networkx in Python - GeeksforGeeks | 29 Apr, 2021
A path graph is a connected graph denoted by Pn if it contains n nodes. Nodes are connected in form of a straight line in a path graph. Here we will discuss how networkx module can be used to generate one using its inbuilt path_graph() function.
The number of nodes in a path graph(Pn) is N.
The number of e... | [
{
"code": null,
"e": 25192,
"s": 25164,
"text": "\n29 Apr, 2021"
},
{
"code": null,
"e": 25438,
"s": 25192,
"text": "A path graph is a connected graph denoted by Pn if it contains n nodes. Nodes are connected in form of a straight line in a path graph. Here we will discuss how ne... |
Computer Vision: Instance Segmentation with Mask R-CNN | by Renu Khandelwal | Towards Data Science | This is the fourth part in the series on Computer vision journey. In this article we will explore Mask R-CNN to understand how instance segmentation works with Mask R-CNN and then predict the segmentation for an image with Mask R-CNN using Keras
Part 1- CNN, R-CNN, Fast R-CNN, Faster R-CNN
Part 2 — Understanding YOLO, ... | [
{
"code": null,
"e": 418,
"s": 172,
"text": "This is the fourth part in the series on Computer vision journey. In this article we will explore Mask R-CNN to understand how instance segmentation works with Mask R-CNN and then predict the segmentation for an image with Mask R-CNN using Keras"
},
{... |
int(5) vs. int(10) in MySQL? | The value in the parentheses is used to display only the width and sets the zerofill. The width is 5 for int(5), whereas 10 for int(10). Let us see another example with a different width value set for int.
Let us first create a table. Here, we have set the int to int(11) and int(13). The following is the query to creat... | [
{
"code": null,
"e": 1268,
"s": 1062,
"text": "The value in the parentheses is used to display only the width and sets the zerofill. The width is 5 for int(5), whereas 10 for int(10). Let us see another example with a different width value set for int."
},
{
"code": null,
"e": 1394,
... |
R Tutorial | R is a programming language.
R is often used for statistical computing and graphical presentation to analyze
and visualize data.
With our "Try it Yourself" editor, you can edit R code and view the result.
How to output some text, and how to do a simple calculation in R:
Result:
How you can use R to easily create a g... | [
{
"code": null,
"e": 29,
"s": 0,
"text": "R is a programming language."
},
{
"code": null,
"e": 132,
"s": 29,
"text": "R is often used for statistical computing and graphical presentation to analyze \n and visualize data."
},
{
"code": null,
"e": 208,
"s": 132,
... |
How to put data of any size in the EEPROM using Arduino? | Arduino Uno has 1 kB of EEPROM storage. EEPROM is a type of non-volatile memory, i.e., its contents are preserved even after power-down. Therefore, it can be used to store data that you want to be unchanged across power cycles. Configurations or settings are examples of such data.
In this article, we will see how to pu... | [
{
"code": null,
"e": 1344,
"s": 1062,
"text": "Arduino Uno has 1 kB of EEPROM storage. EEPROM is a type of non-volatile memory, i.e., its contents are preserved even after power-down. Therefore, it can be used to store data that you want to be unchanged across power cycles. Configurations or setting... |
QlikView - Master Calendar | In QlikView, many times we need to create a calendar reference object, which can be linked to any data set present in QlikView's memory. For example, you have a table that captures the sales amount and sales date but does not store the weekday or quarter, which corresponds to that date. In such a scenario, we create a ... | [
{
"code": null,
"e": 3353,
"s": 2920,
"text": "In QlikView, many times we need to create a calendar reference object, which can be linked to any data set present in QlikView's memory. For example, you have a table that captures the sales amount and sales date but does not store the weekday or quarte... |
XML Functionalities in Oracle. An overview of implementation and... | by Gaurav Goel | Towards Data Science | There is always an extensive demand for exchanging data between different sources without worrying about how the receiver will use it or how it will be displayed. XML does that thing for us. It’s a W3C(World Wide Web Consortium) initiative that allows information to be encoded in meaningful structure and rules that hum... | [
{
"code": null,
"e": 406,
"s": 46,
"text": "There is always an extensive demand for exchanging data between different sources without worrying about how the receiver will use it or how it will be displayed. XML does that thing for us. It’s a W3C(World Wide Web Consortium) initiative that allows info... |
Bank Institution Term Deposit Predictive Model | by Lotome John | Towards Data Science | The investment and portfolio department of the Bank of Portugal would want to be able to identify their customers who potentially would subscribe to their term deposits. As there has been heightened interest of marketing managers to carefully tune their directed campaigns to the rigorous selection of contacts, the task... | [
{
"code": null,
"e": 963,
"s": 172,
"text": "The investment and portfolio department of the Bank of Portugal would want to be able to identify their customers who potentially would subscribe to their term deposits. As there has been heightened interest of marketing managers to carefully tune their d... |
How to count number of notification on an icon? - GeeksforGeeks | 09 Aug, 2021
Bootstrap provides us with badges to display counts on an icon which can be used to show unread notifications/messages etc. We need to get the value of count on the icon badge and update that value accordingly. In this article, we will create a notification icon that can hold the counting like unread notif... | [
{
"code": null,
"e": 24580,
"s": 24552,
"text": "\n09 Aug, 2021"
},
{
"code": null,
"e": 25261,
"s": 24580,
"text": "Bootstrap provides us with badges to display counts on an icon which can be used to show unread notifications/messages etc. We need to get the value of count on th... |
MySQL - UNLOCK TABLES Statement | A session releases all the tables locks with it at once. You can implicitly release the table locks. If the connection to the server terminates explicitly or implicitly all the locks will be released.
You can release the locks of a table explicitly using the UNLOCK TABLES statement.
Following is the syntax of the MySQL... | [
{
"code": null,
"e": 2534,
"s": 2333,
"text": "A session releases all the tables locks with it at once. You can implicitly release the table locks. If the connection to the server terminates explicitly or implicitly all the locks will be released."
},
{
"code": null,
"e": 2617,
"s": ... |
Kotlin - Constructors | A Kotlin constructor is a special member function in a class that is invoked when an object is instantiated. Whenever an object is created, the defined constructor is called automatically which is used to initialize the properties of the class.
A Kotlin class can have following two type of constructors:
Primary Constru... | [
{
"code": null,
"e": 2670,
"s": 2425,
"text": "A Kotlin constructor is a special member function in a class that is invoked when an object is instantiated. Whenever an object is created, the defined constructor is called automatically which is used to initialize the properties of the class."
},
... |
Recommender System — singular value decomposition (SVD) & truncated SVD | by Denise Chen | Towards Data Science | The most common method for recommendation systems often comes with Collaborating Filtering (CF) where it relies on the past user and item dataset. Two popular approaches of CF are latent factor models, which extract features from user and item matrices and neighborhood models, which finds similarities between products ... | [
{
"code": null,
"e": 501,
"s": 171,
"text": "The most common method for recommendation systems often comes with Collaborating Filtering (CF) where it relies on the past user and item dataset. Two popular approaches of CF are latent factor models, which extract features from user and item matrices an... |
Primitive root of a prime number n modulo n in C++ | In this problem, we are given a prime number N. our task is to print the primitive root of prime number N modulo N.
Primitive root of prime number N is an integer x lying between [1, n-1] such that all values of xk (mod n) where k lies in [0, n-2] are unique.
Let’s take an example to understand the problem,
Input: 13
O... | [
{
"code": null,
"e": 1178,
"s": 1062,
"text": "In this problem, we are given a prime number N. our task is to print the primitive root of prime number N modulo N."
},
{
"code": null,
"e": 1322,
"s": 1178,
"text": "Primitive root of prime number N is an integer x lying between [1,... |
Program to find Circumference of a Circle in C++ | In this tutorial, we will be discussing a program to find circumference of a circle.
For this we will be provided with the radius of the circle. Our task is to calculate and print the circumference of that circle.
Live Demo
#include<bits/stdc++.h>
using namespace std;
#define PI 3.1415
double circumference(double r){
... | [
{
"code": null,
"e": 1147,
"s": 1062,
"text": "In this tutorial, we will be discussing a program to find circumference of a circle."
},
{
"code": null,
"e": 1276,
"s": 1147,
"text": "For this we will be provided with the radius of the circle. Our task is to calculate and print th... |
Java - isUpperCase() Method | This method determines whether the specified char value is uppercase.
boolean isUpperCase(char ch)
Here is the detail of parameters −
ch − Primitive character type.
ch − Primitive character type.
This method returns true, if the passed character is really an uppercase.
public class Test {
public static void main(S... | [
{
"code": null,
"e": 2447,
"s": 2377,
"text": "This method determines whether the specified char value is uppercase."
},
{
"code": null,
"e": 2477,
"s": 2447,
"text": "boolean isUpperCase(char ch)\n"
},
{
"code": null,
"e": 2512,
"s": 2477,
"text": "Here is th... |
Kotlin For Loop | Often when you work with arrays, you need to loop through all of the
elements.
To loop through array elements, use the for
loop together with the in operator:
Output all elements in the cars array:
val cars = arrayOf("Volvo", "BMW", "Ford", "Mazda")
for (x in cars) {
println(x)
}
You can loop through all kinds of ... | [
{
"code": null,
"e": 80,
"s": 0,
"text": "Often when you work with arrays, you need to loop through all of the \nelements."
},
{
"code": null,
"e": 161,
"s": 80,
"text": "To loop through array elements, use the for \nloop together with the in operator:"
},
{
"code": null,... |
Instruction type ORA R in 8085 Microprocessor | In 8085 Instruction set, ORA is a mnemonic, which stands for “OR Accumulator” and “R” stands for any of the following registers, or memory location M pointed by HL pair.
R = A, B, C, D, E, H, L, or M
This instruction is used to OR contents of R with the Accumulator. The result of OR operation will be stored back in th... | [
{
"code": null,
"e": 1232,
"s": 1062,
"text": "In 8085 Instruction set, ORA is a mnemonic, which stands for “OR Accumulator” and “R” stands for any of the following registers, or memory location M pointed by HL pair."
},
{
"code": null,
"e": 1263,
"s": 1232,
"text": "R = A, B, C,... |
Find the maximum length of the prefix | Set-2 - GeeksforGeeks | 15 Jul, 2021
Given an array arr[] of N integers, the task is to find the maximum prefix length of the array such that removing exactly one element from the prefix will make the frequency of the remaining prefix elements the same.
Examples:
Input: arr[] = {1, 1, 1, 2, 2, 2} Output: 5 Explanation: The following prefi... | [
{
"code": null,
"e": 24796,
"s": 24768,
"text": "\n15 Jul, 2021"
},
{
"code": null,
"e": 25013,
"s": 24796,
"text": "Given an array arr[] of N integers, the task is to find the maximum prefix length of the array such that removing exactly one element from the prefix will make the... |
How to Compress files with ZIPFILE module in Python. | You want to create a compress files in python.
ZIP files can hold the compressed contents of many other files. Compressing a file reduces its size on disk, which is useful when transferring it over the internet or between the systems using Control-m AFT or Connect direct or even scp.
Python programs creates ZIP files u... | [
{
"code": null,
"e": 1109,
"s": 1062,
"text": "You want to create a compress files in python."
},
{
"code": null,
"e": 1347,
"s": 1109,
"text": "ZIP files can hold the compressed contents of many other files. Compressing a file reduces its size on disk, which is useful when trans... |
How to read file content into istringstream in C++? | Here is a C++ program to read file content into isstringstream in C++.
#include <fstream>
#include <sstream>
#include<iostream>
using namespace std;
int main() {
ifstream is("a.txt", ios::binary );
// get length of file:
is.seekg (0, std::ios::end);
long length = is.tellg();
is.seekg (0, std::ios::beg);
... | [
{
"code": null,
"e": 1133,
"s": 1062,
"text": "Here is a C++ program to read file content into isstringstream in C++."
},
{
"code": null,
"e": 1694,
"s": 1133,
"text": "#include <fstream>\n#include <sstream>\n#include<iostream>\nusing namespace std;\nint main() {\n ifstream is(... |
“Digital Twin” with Python: A hands-on example | by Tirthajyoti Sarkar | Towards Data Science | IBM defines a digital twin as follows “A digital twin is a virtual model designed to accurately reflect a physical object”.
They go on to describe how the main enabling factors for creating a digital twin are the sensors that gather data and the processing system that inserts the data in some particular format/model in... | [
{
"code": null,
"e": 296,
"s": 172,
"text": "IBM defines a digital twin as follows “A digital twin is a virtual model designed to accurately reflect a physical object”."
},
{
"code": null,
"e": 527,
"s": 296,
"text": "They go on to describe how the main enabling factors for creat... |
Using useState hook in React.js | Hooks allows the functional component in react to get the features available in class based component in make them more powerful.
useState we will import from react. Import {useState} from ‘react’; This helps us in creating local state variables for functional component and provides method to update that variable.
Stat... | [
{
"code": null,
"e": 1192,
"s": 1062,
"text": "Hooks allows the functional component in react to get the features available in class based component in make them more powerful."
},
{
"code": null,
"e": 1378,
"s": 1192,
"text": "useState we will import from react. Import {useState... |
Bulma | Input - GeeksforGeeks | 15 Jul, 2020
Bulma is a free, open-source CSS framework based on Flexbox. It is component rich, compatible, and well documented. It is highly responsive in nature. It uses classes to implement its design.
The ‘input’ component of a form is not that attractive in look. Using Bulma we can design input elements of the for... | [
{
"code": null,
"e": 26108,
"s": 26080,
"text": "\n15 Jul, 2020"
},
{
"code": null,
"e": 26300,
"s": 26108,
"text": "Bulma is a free, open-source CSS framework based on Flexbox. It is component rich, compatible, and well documented. It is highly responsive in nature. It uses clas... |
Check if the given two matrices are mirror images of one another - GeeksforGeeks | 23 Apr, 2021
Given two matrices mat1[][] and mat2[][] of size NxN. The task is to find if the given two matrices are mirror images of one another. Print “Yes” if the given two matrices are mirror images, otherwise print “No”.
Two matrices mat1 and mat2 of size N*N are said to be mirror images of one another if for any ... | [
{
"code": null,
"e": 24922,
"s": 24894,
"text": "\n23 Apr, 2021"
},
{
"code": null,
"e": 25135,
"s": 24922,
"text": "Given two matrices mat1[][] and mat2[][] of size NxN. The task is to find if the given two matrices are mirror images of one another. Print “Yes” if the given two ... |
Write an example program on structure using C language | The structure is a collection of different datatype variables, grouped together under a single name Syntax.
The general form of structure declaration is as follows −
datatype member1;
struct tagname{
datatype member2;
datatype member n;
};
Here, struct - keyword
tagname - specifies name of structure
... | [
{
"code": null,
"e": 1170,
"s": 1062,
"text": "The structure is a collection of different datatype variables, grouped together under a single name Syntax."
},
{
"code": null,
"e": 1228,
"s": 1170,
"text": "The general form of structure declaration is as follows −"
},
{
"c... |
How to find the sum of column values of an R dataframe? - GeeksforGeeks | 30 May, 2021
In this article, we are going to find the sum of the column values of a dataframe in R with the use of sum() function.
Syntax:
sum(dataframe$column_name)
A dataframe can be created with the use of data.frame() function that is pre-defined in the R library. This function accepts the elements and the number ... | [
{
"code": null,
"e": 25242,
"s": 25214,
"text": "\n30 May, 2021"
},
{
"code": null,
"e": 25361,
"s": 25242,
"text": "In this article, we are going to find the sum of the column values of a dataframe in R with the use of sum() function."
},
{
"code": null,
"e": 25369,
... |
Calculate n + nn + nnn + ... + n(m times) in Python program | We are going to write a program that calculates the following series in Python. Examine the example inputs and outputs for the program that we are going to write.
Input:
34
3 + 33 + 333 + 3333
Output:
3702
Input:
5 5 5 + 55 + 555 + 5555 + 55555
Output:
61725
So, we will have two numbers, and we have to calculate the su... | [
{
"code": null,
"e": 1225,
"s": 1062,
"text": "We are going to write a program that calculates the following series in Python. Examine the example inputs and outputs for the program that we are going to write."
},
{
"code": null,
"e": 1268,
"s": 1225,
"text": "Input:\n34\n3 + 33 ... |
How to install Python on Linux? - GeeksforGeeks | 22 Jan, 2020
Prerequisite: Python Language Introduction Before we start with how to install Python3 on Linux, let’s first go through the basic introduction to Python. Python is a widely-used general-purpose, high-level programming language. Python is a programming language that lets you work quickly and integrate syste... | [
{
"code": null,
"e": 24386,
"s": 24358,
"text": "\n22 Jan, 2020"
},
{
"code": null,
"e": 24800,
"s": 24386,
"text": "Prerequisite: Python Language Introduction Before we start with how to install Python3 on Linux, let’s first go through the basic introduction to Python. Python is... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.