title stringlengths 3 221 | text stringlengths 17 477k | parsed listlengths 0 3.17k |
|---|---|---|
SQL | Sub queries in From Clause | 11 Apr, 2022
From clause can be used to specify a sub-query expression in SQL. The relation produced by the sub-query is then used as a new relation on which the outer query is applied.
Sub queries in the from clause are supported by most of the SQL implementations.
The correlation variables from the relations in fro... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n11 Apr, 2022"
},
{
"code": null,
"e": 227,
"s": 52,
"text": "From clause can be used to specify a sub-query expression in SQL. The relation produced by the sub-query is then used as a new relation on which the outer query is applied. ... |
Fluttertoast in Flutter | 20 Jun, 2022
Fluttertoast is used to create a toast message by writing only one line of code. Below are some steps to create a Fluttertoast in Flutter. Basically here, we are creating a new Flutter application using a command prompt.
Delete the default code from the main.dart file and write your own code.
Now, add flut... | [
{
"code": null,
"e": 54,
"s": 26,
"text": "\n20 Jun, 2022"
},
{
"code": null,
"e": 275,
"s": 54,
"text": "Fluttertoast is used to create a toast message by writing only one line of code. Below are some steps to create a Fluttertoast in Flutter. Basically here, we are creating a n... |
Python | Remove particular element from tuple list | 28 Aug, 2019
Since the advent of popularity of Python in data analysis, we have list of tuples as a container in many of our problems. Sometimes, while data preprocessing, we might have a problem in which we need to completely remove a particular element from a list of tuple. Let’s discuss a way in which this task can ... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n28 Aug, 2019"
},
{
"code": null,
"e": 349,
"s": 28,
"text": "Since the advent of popularity of Python in data analysis, we have list of tuples as a container in many of our problems. Sometimes, while data preprocessing, we might have a ... |
Sum of all leaf nodes of binary tree | 28 Apr, 2022
Given a binary tree, find the sum of all the leaf nodes.Examples:
Input :
1
/ \
2 3
/ \ / \
4 5 6 7
\
8
Output :
Sum = 4 + 5 + 8 + 7 = 24
The idea is to traverse the tree in any fashion and check if the node is the leaf node or not. If the nod... | [
{
"code": null,
"e": 53,
"s": 25,
"text": "\n28 Apr, 2022"
},
{
"code": null,
"e": 121,
"s": 53,
"text": "Given a binary tree, find the sum of all the leaf nodes.Examples: "
},
{
"code": null,
"e": 253,
"s": 121,
"text": "Input : \n 1\n / \\\n ... |
Python – Get sum of last K list items using slice | 12 Jul, 2021
Accessing elements in a list has many types and variations. These are an essential part of Python programming and one must have the knowledge to perform the same. This article discusses ways to fetch the last K elements and do its summation. Let’s discuss certain solution to perform this task.Method #1 : U... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n12 Jul, 2021"
},
{
"code": null,
"e": 564,
"s": 28,
"text": "Accessing elements in a list has many types and variations. These are an essential part of Python programming and one must have the knowledge to perform the same. This article... |
Python | ToDo webapp using Django | 25 May, 2022
Prerequisite : django installationDjango is a high-level Python Web framework based web framework that allows rapid development and clean, pragmatic design. today we will create a todo app created to understand the basics of Django. In this web app, one can create notes like Google Keep or Evernote.Modules... | [
{
"code": null,
"e": 54,
"s": 26,
"text": "\n25 May, 2022"
},
{
"code": null,
"e": 375,
"s": 54,
"text": "Prerequisite : django installationDjango is a high-level Python Web framework based web framework that allows rapid development and clean, pragmatic design. today we will cre... |
How to create AnimatedGradient in Android? | 25 Jun, 2020
In this article, we are going to learn how to create AnimatedGradient in android. It can be used in the background of our app. In this, we add different color gradients and animate them. Even in the older versions of Instagram, the developers used AnimatedGradient for the background of the login screen to ... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n25 Jun, 2020"
},
{
"code": null,
"e": 368,
"s": 28,
"text": "In this article, we are going to learn how to create AnimatedGradient in android. It can be used in the background of our app. In this, we add different color gradients and an... |
Python – Filter Non-None dictionary Keys | 23 Jan, 2020
Many times, while working with dictionaries, we wish to get keys for a non-null keys. This finds application in Machine Learning in which we have to feed data with no none values. Let’s discuss certain ways in which this task can be performed.
Method #1 : Using loopIn this we just run a loop for all the ke... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n23 Jan, 2020"
},
{
"code": null,
"e": 272,
"s": 28,
"text": "Many times, while working with dictionaries, we wish to get keys for a non-null keys. This finds application in Machine Learning in which we have to feed data with no none val... |
reinterpret_cast in C++ | Type Casting operators | 30 May, 2022
reinterpret_cast is a type of casting operator used in C++.
It is used to convert a pointer of some data type into a pointer of another data type, even if the data types before and after conversion are different.
It does not check if the pointer type and data pointed by the pointer is same or not.
Syntax... | [
{
"code": null,
"e": 54,
"s": 26,
"text": "\n30 May, 2022"
},
{
"code": null,
"e": 116,
"s": 54,
"text": "reinterpret_cast is a type of casting operator used in C++. "
},
{
"code": null,
"e": 269,
"s": 116,
"text": "It is used to convert a pointer of some dat... |
Program to find sum of series 1 + 2 + 2 + 3 + 3 + 3 + .. + n in C++ | In this problem, we are given a number n that denotes that nth term of the series. Our task is to create a Program to find sum of series 1 + 2 + 2 + 3 +
3 + 3 + .. + n in C++.
Problem description − Here, we will find the sum of series whose nth terms is n times the sum of number n. This means it is a series of square n... | [
{
"code": null,
"e": 1238,
"s": 1062,
"text": "In this problem, we are given a number n that denotes that nth term of the series. Our task is to create a Program to find sum of series 1 + 2 + 2 + 3 +\n3 + 3 + .. + n in C++."
},
{
"code": null,
"e": 1390,
"s": 1238,
"text": "Probl... |
Fractal Trees in Python | Fractal patterns are all around us in nature. Like a small branch taken out of the leaf of a fern leaf resembles the leaf itself. Or a pebble often resembles the shape of a mountain! So this idea of a repetition of small pattern to generate a large pattern is known as a fractal tree. In python programming we can also g... | [
{
"code": null,
"e": 1440,
"s": 1062,
"text": "Fractal patterns are all around us in nature. Like a small branch taken out of the leaf of a fern leaf resembles the leaf itself. Or a pebble often resembles the shape of a mountain! So this idea of a repetition of small pattern to generate a large patt... |
Spring Boot - Interceptor | You can use the Interceptor in Spring Boot to perform operations under the following situations −
Before sending the request to the controller
Before sending the request to the controller
Before sending the response to the client
Before sending the response to the client
For example, you can use an interceptor to add t... | [
{
"code": null,
"e": 3123,
"s": 3025,
"text": "You can use the Interceptor in Spring Boot to perform operations under the following situations −"
},
{
"code": null,
"e": 3168,
"s": 3123,
"text": "Before sending the request to the controller"
},
{
"code": null,
"e": 32... |
Building A Recommendation System for Anime | by Anila Qureshi | Towards Data Science | Anime is a hand-drawn computer animation originating from Japan which has drawn a cult following around the world. The animation industry consists of more than 430 companies. Pokemon and Yugi-Oh are some of the most popular anime shows that have come to Western television. Spirited Away, a film created by Hayao Miyazak... | [
{
"code": null,
"e": 1433,
"s": 172,
"text": "Anime is a hand-drawn computer animation originating from Japan which has drawn a cult following around the world. The animation industry consists of more than 430 companies. Pokemon and Yugi-Oh are some of the most popular anime shows that have come to ... |
Reflection of a point at 180 degree rotation of another point - GeeksforGeeks | 26 Feb, 2021
Given two points coordinates (x1, y1) and (x2, y2)on 2D plane. The task is to find the reflection of (x1, y1) at 180 degree rotation of (x2, y2).Examples:
Input : x1 = 0, y1 = 0, x2 = 1, y2 = 1
Output : (2, 2)
Input : x1 = 1, y1 = 1, x2 = 2, y2 = 2
Output : (3, 3)
Let the reflection point of point (x1, y... | [
{
"code": null,
"e": 25274,
"s": 25246,
"text": "\n26 Feb, 2021"
},
{
"code": null,
"e": 25431,
"s": 25274,
"text": "Given two points coordinates (x1, y1) and (x2, y2)on 2D plane. The task is to find the reflection of (x1, y1) at 180 degree rotation of (x2, y2).Examples: "
},
... |
How to apply validation on Props in ReactJS ? - GeeksforGeeks | 25 Jun, 2021
Need of Validating Props in React JS: Props are used to passing the read-only attributes to React components. For the proper functioning of components and to avoid future bugs and glitches it is necessary that props are passed correctly. Hence, it is required to use props validation for improving react com... | [
{
"code": null,
"e": 24423,
"s": 24395,
"text": "\n25 Jun, 2021"
},
{
"code": null,
"e": 24752,
"s": 24423,
"text": "Need of Validating Props in React JS: Props are used to passing the read-only attributes to React components. For the proper functioning of components and to avoid... |
How to download files using Python | by Aaron S | Towards Data Science | Python is a good fit to do web scraping the internet with but one of the first tasks after grabbing some titles or links from a website I wanted to do was to download files. I needed to have a way to automate this process!
Here we will outline how to do this.
Be aware of the choice of HTTP handling packages in python
B... | [
{
"code": null,
"e": 394,
"s": 171,
"text": "Python is a good fit to do web scraping the internet with but one of the first tasks after grabbing some titles or links from a website I wanted to do was to download files. I needed to have a way to automate this process!"
},
{
"code": null,
... |
Image processing with Scikit-image in Python - GeeksforGeeks | 14 Jan, 2022
scikit-image is an image processing Python package that works with NumPy arrays which is a collection of algorithms for image processing. Let’s discuss how to deal with images into set of information and it’s some application in the real world. Important features of scikit-image :
Simple and efficient to... | [
{
"code": null,
"e": 23927,
"s": 23899,
"text": "\n14 Jan, 2022"
},
{
"code": null,
"e": 24211,
"s": 23927,
"text": "scikit-image is an image processing Python package that works with NumPy arrays which is a collection of algorithms for image processing. Let’s discuss how to deal... |
Apex - SOSL | Every business or application has search functionality as one of the basic requirements. For this, Salesforce.com provides two major approaches using SOSL and SOQL. Let us discuss the SOSL approach in detail in this chapter.
Searching the text string across the object and across the field will be done by using SOSL. Th... | [
{
"code": null,
"e": 2277,
"s": 2052,
"text": "Every business or application has search functionality as one of the basic requirements. For this, Salesforce.com provides two major approaches using SOSL and SOQL. Let us discuss the SOSL approach in detail in this chapter."
},
{
"code": null,
... |
Angular 2 - Attribute Directives | The attribute directive changes the appearance or behavior of a DOM element. These directives look like regular HTML attributes in templates. The ngModel directive which is used for two-way is an example of an attribute directive. Some of the other attribute directives are listed below:
NgSwitch: It is used whenever yo... | [
{
"code": null,
"e": 2585,
"s": 2297,
"text": "The attribute directive changes the appearance or behavior of a DOM element. These directives look like regular HTML attributes in templates. The ngModel directive which is used for two-way is an example of an attribute directive. Some of the other attr... |
How to use Wait-Process in Powershell? | Wait-Process cmdlet in PowerShell is used to wait for the process to stop before the execution moves on to the next step.
We have a snipping tool application running and we need to wait for the process to stop first and then move on to the next step.
PS C:\> Get-Process SnippingTool | Select Name,Id,CPU
Name I... | [
{
"code": null,
"e": 1184,
"s": 1062,
"text": "Wait-Process cmdlet in PowerShell is used to wait for the process to stop before the execution moves on to the next step."
},
{
"code": null,
"e": 1313,
"s": 1184,
"text": "We have a snipping tool application running and we need to w... |
How to Create Stacked area plot using Plotly in Python? - GeeksforGeeks | 10 Jul, 2020
Plotly is a Python library that is used to design graphs, especially interactive graphs. It can plot various graphs and charts like histogram, barplot, boxplot, spreadplot, and many more. It is mainly used in data analysis as well as financial analysis. plotly is an interactive visualization library.
A st... | [
{
"code": null,
"e": 24405,
"s": 24377,
"text": "\n10 Jul, 2020"
},
{
"code": null,
"e": 24708,
"s": 24405,
"text": "Plotly is a Python library that is used to design graphs, especially interactive graphs. It can plot various graphs and charts like histogram, barplot, boxplot, sp... |
Batch Script - Overview | Batch Script is incorporated to automate command sequences which are repetitive in nature. Scripting is a way by which one can alleviate this necessity by automating these command sequences in order to make one’s life at the shell easier and more productive. In most organizations, Batch Script is incorporated in some w... | [
{
"code": null,
"e": 2524,
"s": 2169,
"text": "Batch Script is incorporated to automate command sequences which are repetitive in nature. Scripting is a way by which one can alleviate this necessity by automating these command sequences in order to make one’s life at the shell easier and more produc... |
A Machine Learning Project — Predicting Used Car Prices | by Terence Shin | Towards Data Science | This is for those who want to get into data science, who have a little bit of knowledge but are having a hard time coming up with your first data science project. That’s why I created a step by step guide to completing your first end-to-end machine learning model! Follow along, and you’ll learn a wide range of new skil... | [
{
"code": null,
"e": 495,
"s": 171,
"text": "This is for those who want to get into data science, who have a little bit of knowledge but are having a hard time coming up with your first data science project. That’s why I created a step by step guide to completing your first end-to-end machine learni... |
Bit Difference | Practice | GeeksforGeeks | You are given two numbers A and B. The task is to count the number of bits needed to be flipped to convert A to B.
Example 1:
Input: A = 10, B = 20
Output: 4
Explanation:
A = 01010
B = 10100
As we can see, the bits of A that need
to be flipped are 01010. If we flip
these bits, we get 10100, which is B.
Example 2:... | [
{
"code": null,
"e": 365,
"s": 238,
"text": "You are given two numbers A and B. The task is to count the number of bits needed to be flipped to convert A to B.\n\nExample 1:"
},
{
"code": null,
"e": 548,
"s": 365,
"text": "Input: A = 10, B = 20\nOutput: 4\nExplanation:\nA = 0101... |
PHP 7 - Null Coalescing Operator | In PHP 7, a new feature, null coalescing operator (??) has been introduced. It is used to replace the ternary operation in conjunction with isset() function. The Null coalescing operator returns its first operand if it exists and is not NULL; otherwise it returns its second operand.
<?php
// fetch the value of $_GET... | [
{
"code": null,
"e": 2361,
"s": 2077,
"text": "In PHP 7, a new feature, null coalescing operator (??) has been introduced. It is used to replace the ternary operation in conjunction with isset() function. The Null coalescing operator returns its first operand if it exists and is not NULL; otherwise ... |
How to Install Python and Jupyter Notebook onto an Android Device | by Angelica Lo Duca | Towards Data Science | Thanks to the spread of mobile technologies, we are online for almost all the part of the day: while travelling by car or by train, preparing the dinner and even when we go out for a walk.
For who, like me, is always active and multitasking, it may happen that, while sitting at computer, she must leave what she was doi... | [
{
"code": null,
"e": 235,
"s": 46,
"text": "Thanks to the spread of mobile technologies, we are online for almost all the part of the day: while travelling by car or by train, preparing the dinner and even when we go out for a walk."
},
{
"code": null,
"e": 443,
"s": 235,
"text":... |
Tryit Editor v3.6 - Show React | import React from 'react';
import ReactDOM from 'react-dom/client';
function Car(props) {
return <h2>I am a { props.brand }!</h2>;
}
const myElement = <Car brand="Ford" />;
const root = ReactDOM.createRoot(document.getElementById('root'));
root.render(myElement);
<!DOCTYPE html>
<html lang="en">
<head>
<... | [
{
"code": null,
"e": 272,
"s": 0,
"text": "\nimport React from 'react';\nimport ReactDOM from 'react-dom/client';\n\nfunction Car(props) {\n return <h2>I am a { props.brand }!</h2>;\n}\n\nconst myElement = <Car brand=\"Ford\" />;\n\nconst root = ReactDOM.createRoot(document.getElementById('root'));... |
SQL Query to find All Sundays Between Two Dates - GeeksforGeeks | 07 Apr, 2021
To find all the Sundays in between two days using SQL Language, we will be using the “Date Functions” defined in SQL. Apart from these we will be using CTE ( View) idea too.
Basic idea:
So basically we are given two days, and we are required to list all Sundays between these two days.
Thinking a little w... | [
{
"code": null,
"e": 24366,
"s": 24338,
"text": "\n07 Apr, 2021"
},
{
"code": null,
"e": 24540,
"s": 24366,
"text": "To find all the Sundays in between two days using SQL Language, we will be using the “Date Functions” defined in SQL. Apart from these we will be using CTE ( View)... |
Bootstrap Buttons | Bootstrap provides different styles of buttons:
Basic
Default
Primary
Success
Info
Warning
Danger
Link
To achieve the button styles above, Bootstrap has the following classes:
.btn
.btn-default
.btn-primary
.btn-success
.btn-info
.btn-warning
.btn-danger
.btn-link
The following example shows the code for the differen... | [
{
"code": null,
"e": 48,
"s": 0,
"text": "Bootstrap provides different styles of buttons:"
},
{
"code": null,
"e": 105,
"s": 48,
"text": "\nBasic\nDefault\nPrimary\nSuccess\nInfo\nWarning\nDanger\nLink\n"
},
{
"code": null,
"e": 178,
"s": 105,
"text": "To achi... |
Analysing and Visualising the Country wise Population from 1955 to 2020 with Pandas, Matplotlib, Seaborn and Plotly | by Durgesh Samariya | Towards Data Science | On August 12, 2020, I started 100 Days of Data Science Challenge. The main goal of this challenge is to learn/code about data science for 1 hour daily for 100 days. I am planning to learn and code projects to improve my skills and getting hands-on experience. I am going to share my journey on GitHub, Instagram, and Med... | [
{
"code": null,
"e": 540,
"s": 172,
"text": "On August 12, 2020, I started 100 Days of Data Science Challenge. The main goal of this challenge is to learn/code about data science for 1 hour daily for 100 days. I am planning to learn and code projects to improve my skills and getting hands-on experie... |
Freivald’s Algorithm to check if a matrix is product of two - GeeksforGeeks | 11 Aug, 2021
Given three matrices A, B and C, find if C is a product of A and B. Examples:
Input : A = 1 1
1 1
B = 1 1
1 1
C = 2 2
2 2
Output : Yes
C = A x B
Input : A = 1 1 1
1 1 1
1 1 1
B = 1 1 1
1 1 1
1 1 ... | [
{
"code": null,
"e": 25943,
"s": 25915,
"text": "\n11 Aug, 2021"
},
{
"code": null,
"e": 26022,
"s": 25943,
"text": "Given three matrices A, B and C, find if C is a product of A and B. Examples: "
},
{
"code": null,
"e": 26319,
"s": 26022,
"text": "Input : A =... |
How to delete a row from an R data frame? | While doing the analysis, we might come across with data that is not required and we want to delete it. This data can be a whole row or multiple rows. For example, if a row contains values greater than, less than or equal to a certain threshold then it might not be needed, therefore we can delete it. In R, we achieve t... | [
{
"code": null,
"e": 1446,
"s": 1062,
"text": "While doing the analysis, we might come across with data that is not required and we want to delete it. This data can be a whole row or multiple rows. For example, if a row contains values greater than, less than or equal to a certain threshold then it ... |
How can we create a MySQL view with INNER JOIN? | To illustrate of the making of MySQL view with INNER JOIN we are using the following data from ‘Customers’ and ‘Resreve’ tables −
mysql> Select * from customers;
+-------------+----------+
| Customer_Id | Name |
+-------------+----------+
| 1 | Rahul |
| 2 | Yashpal |
| 3 | Gaurav ... | [
{
"code": null,
"e": 1192,
"s": 1062,
"text": "To illustrate of the making of MySQL view with INNER JOIN we are using the following data from ‘Customers’ and ‘Resreve’ tables −"
},
{
"code": null,
"e": 1719,
"s": 1192,
"text": "mysql> Select * from customers;\n+-------------+----... |
Default Methods in C++ with Examples - GeeksforGeeks | 29 Jul, 2021
If we write a class that has no methods in it, and the class does not inherit from another class, the compiler will add six methods to it automatically. The methods which can be automatically generated by the compiler are:
Default Constructor: It is equivalent to an empty default constructor. The default ... | [
{
"code": null,
"e": 24124,
"s": 24096,
"text": "\n29 Jul, 2021"
},
{
"code": null,
"e": 24348,
"s": 24124,
"text": "If we write a class that has no methods in it, and the class does not inherit from another class, the compiler will add six methods to it automatically. The method... |
Python time clock() Method | Pythom time method clock() returns the current processor time as a floating point number expressed in seconds on Unix. The precision depends on that of the C function of the same name, but in any case, this is the function to use for benchmarking Python or timing algorithms.
On Windows, this function returns wall-clock... | [
{
"code": null,
"e": 2520,
"s": 2244,
"text": "Pythom time method clock() returns the current processor time as a floating point number expressed in seconds on Unix. The precision depends on that of the C function of the same name, but in any case, this is the function to use for benchmarking Python... |
Recency, Frequency, Monetary Model with Python — and how Sephora uses it to optimize their Google and Facebook Ads | by Yexi Yuan | Towards Data Science | The last time we analyzed our online shopper date set using the cohort analysis method. We discovered some interesting observations around our cohort data set. While cohort analysis provides us with customer behavior overtime and understand retention rates, we also want to be able to segment our data by their behavior ... | [
{
"code": null,
"e": 911,
"s": 172,
"text": "The last time we analyzed our online shopper date set using the cohort analysis method. We discovered some interesting observations around our cohort data set. While cohort analysis provides us with customer behavior overtime and understand retention rate... |
Check whether right angled triangle is valid or not for large sides - GeeksforGeeks | 30 Apr, 2021
Given three integers a, b and c as triplets. Check if it is possible to make right angled triangle or not. Print Yes if possible, else No. 10-18 <= a, b, c <= 1018 Examples:
Input: 3 4 5
Output: Yes
Explanation:
Since 3*3 + 4*4 = 5*5
Hence print "Yes"
Input: 8 5 13
Since 8 + 5 < 13 which violates the pr... | [
{
"code": null,
"e": 25232,
"s": 25204,
"text": "\n30 Apr, 2021"
},
{
"code": null,
"e": 25408,
"s": 25232,
"text": "Given three integers a, b and c as triplets. Check if it is possible to make right angled triangle or not. Print Yes if possible, else No. 10-18 <= a, b, c <= 1018... |
Oversampling and Undersampling. A technique for Imbalanced... | by Kurtis Pykes | Towards Data Science | The Imbalanced classification problem is what we face when there is a severe skew in the class distribution of our training data. Okay, the skew may not be extremely severe (it can vary), but the reason we identify imbalanced classification as a problem is because it can influence the performance on our Machine Learnin... | [
{
"code": null,
"e": 506,
"s": 172,
"text": "The Imbalanced classification problem is what we face when there is a severe skew in the class distribution of our training data. Okay, the skew may not be extremely severe (it can vary), but the reason we identify imbalanced classification as a problem i... |
Extract JSON from HTML using BeautifulSoup in Python - GeeksforGeeks | 16 Dec, 2021
In this article, we are going to extract JSON from HTML using BeautifulSoup in Python.
bs4: Beautiful Soup(bs4) is a Python library for pulling data out of HTML and XML files. This module does not come built-in with Python. To install this type the below command in the terminal.
pip install bs4
requests: R... | [
{
"code": null,
"e": 23927,
"s": 23899,
"text": "\n16 Dec, 2021"
},
{
"code": null,
"e": 24014,
"s": 23927,
"text": "In this article, we are going to extract JSON from HTML using BeautifulSoup in Python."
},
{
"code": null,
"e": 24207,
"s": 24014,
"text": "bs4... |
How to open Node.js command prompt ? - GeeksforGeeks | 20 Aug, 2021
Node js help us to execute JavaScript code outside a web browser. It is neither a framework nor a programming language but basically a backend JavaScript runtime environment that helps to execute the scripts outside the browser. You can install node js from the web. You’ll be able to visit the link Downloa... | [
{
"code": null,
"e": 24842,
"s": 24814,
"text": "\n20 Aug, 2021"
},
{
"code": null,
"e": 25298,
"s": 24842,
"text": "Node js help us to execute JavaScript code outside a web browser. It is neither a framework nor a programming language but basically a backend JavaScript runtime e... |
Struts 2 - The If and Else Tags | package com.tutorialspoint.struts2;
public class HelloWorldAction {
private String name;
public String execute() throws Exception {
return "success";
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
}
Let us have index.jsp fi... | [
{
"code": null,
"e": 2542,
"s": 2246,
"text": "package com.tutorialspoint.struts2;\n\npublic class HelloWorldAction {\n private String name;\n\n public String execute() throws Exception {\n return \"success\";\n }\n \n public String getName() {\n return name;\n }\n\n public v... |
Make image round with Bootstrap | Use the img-circle Bootstrap class to style your image and make it completely round.
You can try to run the following code to make an image round
Live Demo
<!DOCTYPE html>
<html>
<head>
<title>Bootstrap Images</title>
<link href = "/bootstrap/css/bootstrap.min.css" rel = "stylesheet">
<script src =... | [
{
"code": null,
"e": 1147,
"s": 1062,
"text": "Use the img-circle Bootstrap class to style your image and make it completely round."
},
{
"code": null,
"e": 1208,
"s": 1147,
"text": "You can try to run the following code to make an image round"
},
{
"code": null,
"e":... |
Stop using Print or Logger to Debug your Python Code | by Satyam Kumar | Towards Data Science | Debugging code is an important but tiresome task for every developer. It is essential to perform code debugging when your code output is not as expected or throws an error. Debugging is the process of finding and fixing the errors in the program.
Syntactic errors and Semantic errors are two types of errors a developer ... | [
{
"code": null,
"e": 419,
"s": 172,
"text": "Debugging code is an important but tiresome task for every developer. It is essential to perform code debugging when your code output is not as expected or throws an error. Debugging is the process of finding and fixing the errors in the program."
},
... |
GATE | GATE-CS-2015 (Set 3) | Question 65 - GeeksforGeeks | 28 Jun, 2021
For the processes listed in the following table, which of the following scheduling schemes will give the lowest average turnaround time?
Process Arrival Time Processing Time
A 0 3
B 1 6
C 4 4
D 6 ... | [
{
"code": null,
"e": 24142,
"s": 24114,
"text": "\n28 Jun, 2021"
},
{
"code": null,
"e": 24279,
"s": 24142,
"text": "For the processes listed in the following table, which of the following scheduling schemes will give the lowest average turnaround time?"
},
{
"code": null... |
Stack | Set 4 (Evaluation of Postfix Expression) - GeeksforGeeks | 14 Jan, 2022
The Postfix notation is used to represent algebraic expressions. The expressions written in postfix form are evaluated faster compared to infix notation as parenthesis are not required in postfix. We have discussed infix to postfix conversion. In this post, evaluation of postfix expressions is discussed.
F... | [
{
"code": null,
"e": 24838,
"s": 24810,
"text": "\n14 Jan, 2022"
},
{
"code": null,
"e": 25144,
"s": 24838,
"text": "The Postfix notation is used to represent algebraic expressions. The expressions written in postfix form are evaluated faster compared to infix notation as parenth... |
HTML | async Attribute | 06 Dec, 2021
The HTML async attribute is a boolean attribute. When present, it specifies that the script will be executed asynchronously when it is available. This attribute only works for external scripts (and used only in when src attribute is present ).Note: There are so many ways in which external script execute: ... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n06 Dec, 2021"
},
{
"code": null,
"e": 336,
"s": 28,
"text": "The HTML async attribute is a boolean attribute. When present, it specifies that the script will be executed asynchronously when it is available. This attribute only works for... |
Get the type of a variable in MySQL? | You cannot get the type of variable in MySQL. Cast the type of variable into another using CAST operator. The syntax is as follows −
SET @yourVariableName:=’anyValue’
Use the CAST operator to cast to another type. The syntax is as follows −
SELECT CAST( @yourVariableName AS SIGNED);
To understand the above syntax, let ... | [
{
"code": null,
"e": 1320,
"s": 1187,
"text": "You cannot get the type of variable in MySQL. Cast the type of variable into another using CAST operator. The syntax is as follows −"
},
{
"code": null,
"e": 1354,
"s": 1320,
"text": "SET @yourVariableName:=’anyValue’"
},
{
"... |
Find number of pairs (x, y) in an array such that x^y > y^x | 25 Jun, 2022
Given two arrays X[] and Y[] of positive integers, find a number of pairs such that x^y > y^x where x is an element from X[] and y is an element from Y[].
Examples:
Input: X[] = {2, 1, 6}, Y = {1, 5} Output: 3 Explanation: There are total 3 pairs where pow(x, y) is greater than pow(y, x) Pairs are (2, 1), ... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n25 Jun, 2022"
},
{
"code": null,
"e": 207,
"s": 52,
"text": "Given two arrays X[] and Y[] of positive integers, find a number of pairs such that x^y > y^x where x is an element from X[] and y is an element from Y[]."
},
{
"code... |
How to select the first and last row based on group column in an R data frame? | Extraction of data is necessary in data analysis because extraction helps us to keep the important information about a data set. This important information could be the first row and the last row of groups as well, also we might want to use these rows for other type of analysis such as comparing the initial and last da... | [
{
"code": null,
"e": 1643,
"s": 1187,
"text": "Extraction of data is necessary in data analysis because extraction helps us to keep the important information about a data set. This important information could be the first row and the last row of groups as well, also we might want to use these rows f... |
Apache Hive – Static Partitioning With Examples | 04 Jul, 2021
Partitioning in Apache Hive is very much needed to improve performance while scanning the Hive tables. It allows a user working on the hive to query a small or desired portion of the Hive tables.
Suppose we have a table student that contains 5000 records, and we want to only process data of students belong... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n04 Jul, 2021"
},
{
"code": null,
"e": 224,
"s": 28,
"text": "Partitioning in Apache Hive is very much needed to improve performance while scanning the Hive tables. It allows a user working on the hive to query a small or desired portion... |
Need of Wrapper Classes in Java | 06 Jul, 2022
Firstly the question that hits the programmers is when we have primitive data types then why does there arise a need for the concept of wrapper classes in java. It is because of the additional features being there in the Wrapper class over the primitive data types when it comes to usage. These methods incl... | [
{
"code": null,
"e": 54,
"s": 26,
"text": "\n06 Jul, 2022"
},
{
"code": null,
"e": 438,
"s": 54,
"text": "Firstly the question that hits the programmers is when we have primitive data types then why does there arise a need for the concept of wrapper classes in java. It is because... |
Java Examples - Display Date in different formats | How to display date in different formats?
This example displays the names of the weekdays in short form with the help of DateFormatSymbols().getWeekdays() method of DateFormatSymbols class.
import java.text.*;
import java.util.*;
public class Main {
public static void main(String[] args) {
Date dt = new Date(... | [
{
"code": null,
"e": 2244,
"s": 2202,
"text": "How to display date in different formats?"
},
{
"code": null,
"e": 2392,
"s": 2244,
"text": "This example displays the names of the weekdays in short form with the help of DateFormatSymbols().getWeekdays() method of DateFormatSymbols... |
GATE | GATE-CS-2009 | Question 56 | 17 Dec, 2021
Consider the following relational schema:
Suppliers(sid:integer, sname:string, city:string, street:string)
Parts(pid:integer, pname:string, color:string)
Catalog(sid:integer, pid:integer, cost:real)
Assume that, in the suppliers relation above, each supplier and each street within a city has a unique name,... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n17 Dec, 2021"
},
{
"code": null,
"e": 94,
"s": 52,
"text": "Consider the following relational schema:"
},
{
"code": null,
"e": 251,
"s": 94,
"text": "Suppliers(sid:integer, sname:string, city:string, street:string)\... |
Tuple as function arguments in Python | 01 Aug, 2020
Tuples have many applications in all the domains of Python programming. They are immutable and hence are important containers to ensure read-only access, or keeping elements persistent for more time. Usually, they can be used to pass to functions and can have different kinds of behavior. Different cases ca... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n01 Aug, 2020"
},
{
"code": null,
"e": 344,
"s": 28,
"text": "Tuples have many applications in all the domains of Python programming. They are immutable and hence are important containers to ensure read-only access, or keeping elements p... |
How to set a value to an input file using HTML ? | 13 May, 2020
In HTML, we will use the type attribute to take input in a form and when we have to take the file as an input, the file value of the type attribute allows us to define an element for the file uploads. It displays a browse button on our computer screen, and when we click on this browse button, it asks the u... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n13 May, 2020"
},
{
"code": null,
"e": 398,
"s": 28,
"text": "In HTML, we will use the type attribute to take input in a form and when we have to take the file as an input, the file value of the type attribute allows us to define an elem... |
Solve Linear Congruences Ax = B (mod N) for values of x in range [0, N-1] | 12 Jul, 2021
Given three positive integers A, B, and N, which represent a linear congruence of the form AX=B (mod N), the task is to print all possible values of X (mod N) i.e in the range [0, N-1] that satisfies this equation. If there is no solution, print -1.
Examples:
Input: A=15, B=9, N=18Output: 15, 3, 9Explanati... | [
{
"code": null,
"e": 54,
"s": 26,
"text": "\n12 Jul, 2021"
},
{
"code": null,
"e": 304,
"s": 54,
"text": "Given three positive integers A, B, and N, which represent a linear congruence of the form AX=B (mod N), the task is to print all possible values of X (mod N) i.e in the rang... |
Python | sympy.Interval().contains() method | 17 Sep, 2019
With the help of method, we can check whether a value is present in the interval or not by using sympy.Interval().contains() method.
Syntax : sympy.Interval(x, y).contains(value)
Return : Return the boolean value True or False.
Example #1 :In this example we can see that by using sympy.Interval().contains(... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n17 Sep, 2019"
},
{
"code": null,
"e": 161,
"s": 28,
"text": "With the help of method, we can check whether a value is present in the interval or not by using sympy.Interval().contains() method."
},
{
"code": null,
"e": 207,
... |
Linestyles in Matplotlib Python | 24 Jan, 2021
Matplotlib is an amazing visualization library in Python for 2D plots of arrays. Matplotlib is a multi-platform data visualization library built on NumPy arrays and designed to work with the broader SciPy stack.
The default linestyle while plotting data is solid linestyle in matplotlib. We can change this ... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n24 Jan, 2021"
},
{
"code": null,
"e": 240,
"s": 28,
"text": "Matplotlib is an amazing visualization library in Python for 2D plots of arrays. Matplotlib is a multi-platform data visualization library built on NumPy arrays and designed t... |
Network Scanner in Python | 23 Jul, 2018
A network scanner is one major tool for analyzing the hosts that are available on the network. A network scanner is an IP scanner that is used for scanning the networks that are connected to several computers.
To get the list of the available hosts on a network, there are two basic methods –
ICMP Echo Requ... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n23 Jul, 2018"
},
{
"code": null,
"e": 238,
"s": 28,
"text": "A network scanner is one major tool for analyzing the hosts that are available on the network. A network scanner is an IP scanner that is used for scanning the networks that a... |
Divide a string in N equal parts | 27 Jun, 2022
Difficulty Level: RookieQuestion: Write a program to print N equal parts of a given string.
Solution: 1) Get the size of the string using string function strlen() (present in the string.h) 2) Get the size of a part.
part_size = string_length/n
3) Loop through the input string. In loop, if index becomes ... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n27 Jun, 2022"
},
{
"code": null,
"e": 145,
"s": 52,
"text": "Difficulty Level: RookieQuestion: Write a program to print N equal parts of a given string. "
},
{
"code": null,
"e": 270,
"s": 145,
"text": "Solution: 1)... |
How to set the font family for text with JavaScript? | To set the font family, use the fontFamily property in JavaScript.
You can try to run the following code to set the font family for text with JavaScript −
Live Demo
<!DOCTYPE html>
<html>
<body>
<h1>Heading 1</h1>
<p id="myID">
This is Demo Text. This is Demo Text. This is Demo Text. This is Dem... | [
{
"code": null,
"e": 1254,
"s": 1187,
"text": "To set the font family, use the fontFamily property in JavaScript."
},
{
"code": null,
"e": 1342,
"s": 1254,
"text": "You can try to run the following code to set the font family for text with JavaScript −"
},
{
"code": null,... |
numpy.isfinite() in Python | 28 Mar, 2022
The numpy.isfinite() function tests element-wise whether it is finite or not(not infinity or not Not a Number) and return the result as a boolean array. Syntax :
numpy.isfinite(array [, out])
Parameters :
array : [array_like]Input array or object whose elements,
we need to test for infinity
out ... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n28 Mar, 2022"
},
{
"code": null,
"e": 191,
"s": 28,
"text": "The numpy.isfinite() function tests element-wise whether it is finite or not(not infinity or not Not a Number) and return the result as a boolean array. Syntax : "
},
{
... |
Python PIL | ImageEnhance.Color() and ImageEnhance.Contrast() method | 27 Jun, 2019
PIL is the Python Imaging Library which provides the python interpreter with image editing capabilities. The ImageEnhance module contains a number of classes that can be used for image enhancement.
This class can be used to adjust the color balance of an image, in a manner similar to the controls on a colo... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n27 Jun, 2019"
},
{
"code": null,
"e": 226,
"s": 28,
"text": "PIL is the Python Imaging Library which provides the python interpreter with image editing capabilities. The ImageEnhance module contains a number of classes that can be used ... |
PyQt - Layout Management | A GUI widget can be placed inside the container window by specifying its absolute coordinates measured in pixels. The coordinates are relative to the dimensions of the window defined by setGeometry() method.
QWidget.setGeometry(xpos, ypos, width, height)
In the following code snippet, the top level window of 300 by 20... | [
{
"code": null,
"e": 2268,
"s": 2060,
"text": "A GUI widget can be placed inside the container window by specifying its absolute coordinates measured in pixels. The coordinates are relative to the dimensions of the window defined by setGeometry() method."
},
{
"code": null,
"e": 2316,
... |
Ruby | Exception Handling in Threads | Set – 1 | 19 Dec, 2018
Threads can also contain exceptions. In Ruby threads, the only exception arose in the main thread is handled but if an exception arises in the thread(other than main thread) cause the termination of the thread. The arising of an exception in a thread other than the main thread depends upon abort_on_excepti... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n19 Dec, 2018"
},
{
"code": null,
"e": 795,
"s": 28,
"text": "Threads can also contain exceptions. In Ruby threads, the only exception arose in the main thread is handled but if an exception arises in the thread(other than main thread) c... |
How to find missing value between two MySQL Tables? | To find missing value between two MySQL tables, use NOT IN. Let us first create a table −
mysql> create table DemoTable1(Value int);
Query OK, 0 rows affected (0.56 sec)
Insert some records in the table using insert command −
mysql> insert into DemoTable1 values(1);
Query OK, 1 row affected (0.15 sec)
mysql> insert int... | [
{
"code": null,
"e": 1152,
"s": 1062,
"text": "To find missing value between two MySQL tables, use NOT IN. Let us first create a table −"
},
{
"code": null,
"e": 1232,
"s": 1152,
"text": "mysql> create table DemoTable1(Value int);\nQuery OK, 0 rows affected (0.56 sec)"
},
{
... |
Minimum delete operations to make all elements of array same | 08 Jul, 2022
Given an array of n elements such that elements may repeat. We can delete any number of elements from the array. The task is to find a minimum number of elements to be deleted from the array to make it equal.Examples:
Input: arr[] = {4, 3, 4, 4, 2, 4}
Output: 2
After deleting 2 and 3 from array, array beco... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n08 Jul, 2022"
},
{
"code": null,
"e": 270,
"s": 52,
"text": "Given an array of n elements such that elements may repeat. We can delete any number of elements from the array. The task is to find a minimum number of elements to be delete... |
Find sum of factorials till N factorial (1! + 2! + 3! + ... + N!) | 13 Jul, 2022
Given a positive integer N. The task is to compute the sum of factorial from 1! to N!, 1! + 2! + 3! + ... + N!.
Examples:
Input: N = 5Output: 153Explanation: 1! + 2! + 3! + 4! + 5! = 1 + 2 + 6 + 24 + 120 = 153.
Input: N = 1Output: 1
Naive Approach: The basic way to solve this problem is to find the factori... | [
{
"code": null,
"e": 53,
"s": 25,
"text": "\n13 Jul, 2022"
},
{
"code": null,
"e": 165,
"s": 53,
"text": "Given a positive integer N. The task is to compute the sum of factorial from 1! to N!, 1! + 2! + 3! + ... + N!."
},
{
"code": null,
"e": 175,
"s": 165,
"t... |
How to send a PUT/DELETE request in jQuery ? | 14 Dec, 2020
In jQuery, we can use the .get() method to make a get request and .post() method to make a post request but there is not .put() or .delete() methods available. In this article, we are going to see how we can make a PUT and DELETE request in jQuery.
Approach: To make a PUT or DELETE requests in jQuery we ca... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n14 Dec, 2020"
},
{
"code": null,
"e": 277,
"s": 28,
"text": "In jQuery, we can use the .get() method to make a get request and .post() method to make a post request but there is not .put() or .delete() methods available. In this article... |
Sort an array of strings according to string lengths | 22 Jun, 2022
We are given an array of strings, we need to sort the array in increasing order of string lengths.Examples:
Input : {"GeeksforGeeeks", "I", "from", "am"}
Output : I am from GeeksforGeeks
Input : {"You", "are", "beautiful", "looking"}
Output : You are looking beautiful
A simple solution is to write our o... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n22 Jun, 2022"
},
{
"code": null,
"e": 161,
"s": 52,
"text": "We are given an array of strings, we need to sort the array in increasing order of string lengths.Examples: "
},
{
"code": null,
"e": 324,
"s": 161,
"text... |
Iterating over Enum Values in Java | 05 Mar, 2021
Enum in Java is a data type that contains a fixed set of constants. A Java enum type is a special kind of Java class. An enum can contain constants, methods, etc.
Given below is a demonstration of how to declare an enum:
Java
// Demonstrates the declaration of enumpublic enum season { Spring, Summe... | [
{
"code": null,
"e": 54,
"s": 26,
"text": "\n05 Mar, 2021"
},
{
"code": null,
"e": 217,
"s": 54,
"text": "Enum in Java is a data type that contains a fixed set of constants. A Java enum type is a special kind of Java class. An enum can contain constants, methods, etc."
},
{
... |
Java Program for Selection Sort | 13 Jun, 2022
The selection sort algorithm sorts an array by repeatedly finding the minimum element (considering ascending order) from unsorted part and putting it at the beginning. The algorithm maintains two subarrays in a given array.
1) The subarray which is already sorted.
2) Remaining subarray which is unsorted.In... | [
{
"code": null,
"e": 53,
"s": 25,
"text": "\n13 Jun, 2022"
},
{
"code": null,
"e": 277,
"s": 53,
"text": "The selection sort algorithm sorts an array by repeatedly finding the minimum element (considering ascending order) from unsorted part and putting it at the beginning. The al... |
Impala - Create Table Statement | The CREATE TABLE Statement is used to create a new table in the required database in Impala. Creating a basic table involves naming the table and defining its columns and each column's data type.
Following is the syntax of the CREATE TABLE Statement. Here, IF NOT EXISTS is an optional clause. If we use this clause, a t... | [
{
"code": null,
"e": 2615,
"s": 2419,
"text": "The CREATE TABLE Statement is used to create a new table in the required database in Impala. Creating a basic table involves naming the table and defining its columns and each column's data type."
},
{
"code": null,
"e": 2857,
"s": 2615,... |
How to label bubble chart/scatter plot with column from Pandas dataframe? | To label bubble charts/scatter plot with column from Pandas dataframe, we can take the following steps −
Set the figure size and adjust the padding between and around the subplots.
Create a data frame, df, of two-dimensional, size-mutable, potentially heterogeneous tabular data.
Create a scatter plot with df.
Annotate ... | [
{
"code": null,
"e": 1292,
"s": 1187,
"text": "To label bubble charts/scatter plot with column from Pandas dataframe, we can take the following steps −"
},
{
"code": null,
"e": 1368,
"s": 1292,
"text": "Set the figure size and adjust the padding between and around the subplots."
... |
Scope of Variables in Go | 22 Jul, 2019
The Scope of a variable can be defined as a part of the program where a particular variable is accessible. A variable can be defined in a class, method, loop, etc. Like C/C++, in Golang all identifiers are lexically (or statically) scoped, i.e. scope of a variable can be determined at compile time. Or you ... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n22 Jul, 2019"
},
{
"code": null,
"e": 451,
"s": 52,
"text": "The Scope of a variable can be defined as a part of the program where a particular variable is accessible. A variable can be defined in a class, method, loop, etc. Like C/C++... |
Python | Pandas Series.str.partition() | 24 Jun, 2020
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 str.partition() works in a similar way like str.split(). Instead of splitting the stri... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n24 Jun, 2020"
},
{
"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... |
Redux - React Example | Here is a small example of react and Redux application. You can also try developing small apps. Sample code for increase or decrease counter is given below −
This is the root file which is responsible for the creation of store and rendering our react app component.
/src/index.js
import React from 'react'
import { rend... | [
{
"code": null,
"e": 2107,
"s": 1949,
"text": "Here is a small example of react and Redux application. You can also try developing small apps. Sample code for increase or decrease counter is given below −"
},
{
"code": null,
"e": 2215,
"s": 2107,
"text": "This is the root file wh... |
What is Java Executor Framework? | 28 Mar, 2022
With the increase in the number of cores available in the processors nowadays, coupled with the ever-increasing need to achieve more throughput, multi-threading APIs are getting quite popular. Java provides its own multi-threading framework called the Java Executor Framework.
Java executor framework (java.... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n28 Mar, 2022"
},
{
"code": null,
"e": 305,
"s": 28,
"text": "With the increase in the number of cores available in the processors nowadays, coupled with the ever-increasing need to achieve more throughput, multi-threading APIs are getti... |
Bootstrap Form Radio Button | Use radio class if you want to limit the user to just one selection i.e. adding radio buttons. Use.radio-inline class to a series of radios for controls appear on the same line.
You can try to run the following code to implement Bootstrap Forms radio button
Live Demo
<!DOCTYPE html>
<html>
<head>
<title>Bootst... | [
{
"code": null,
"e": 1365,
"s": 1187,
"text": "Use radio class if you want to limit the user to just one selection i.e. adding radio buttons. Use.radio-inline class to a series of radios for controls appear on the same line."
},
{
"code": null,
"e": 1445,
"s": 1365,
"text": "You ... |
Implementation of Perceptron Algorithm for OR Logic Gate with 2-bit Binary Input | 08 Jun, 2020
In the field of Machine Learning, the Perceptron is a Supervised Learning Algorithm for binary classifiers. The Perceptron Model implements the following function:
For a particular choice of the weight vector and bias parameter , the model predicts output for the corresponding input vector .
OR logi... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n08 Jun, 2020"
},
{
"code": null,
"e": 216,
"s": 52,
"text": "In the field of Machine Learning, the Perceptron is a Supervised Learning Algorithm for binary classifiers. The Perceptron Model implements the following function:"
},
{
... |
Retrieve the position (X,Y) of an element using HTML | 10 Jan, 2019
The position of (X, Y) means the co-ordinate of an element at the top-left point in a document. X represent the horizontal position and Y represent the vertical position. Use element.getBoundingClientRect() property to get the position of an element.
Example 1:
<!-- HTML program to get (x, y) coordinate of... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n10 Jan, 2019"
},
{
"code": null,
"e": 303,
"s": 52,
"text": "The position of (X, Y) means the co-ordinate of an element at the top-left point in a document. X represent the horizontal position and Y represent the vertical position. Use... |
Difference Between FileInputStream and FileReader in Java | 16 Dec, 2021
Let us first do discuss them in order to get the understanding alongside an example to interpret the differences. Here first we will be discussing out FileReader class. So starting of with FileReader class in java is used to read data from the file. It returns data in byte format like FileInputStream class... | [
{
"code": null,
"e": 54,
"s": 26,
"text": "\n16 Dec, 2021"
},
{
"code": null,
"e": 544,
"s": 54,
"text": "Let us first do discuss them in order to get the understanding alongside an example to interpret the differences. Here first we will be discussing out FileReader class. So st... |
How to set fullscreen mode for Java Swing Application? | To set fullscreen mode for your Java Swing application, use the setFullScreenWindow() method:
GraphicsDevice device = graphics.getDefaultScreenDevice();
JFrame frame = new JFrame("Fullscreen");
device.setFullScreenWindow(frame);
The following is an example to set fullscreen mode for Java Swing Application:
import java.... | [
{
"code": null,
"e": 1281,
"s": 1187,
"text": "To set fullscreen mode for your Java Swing application, use the setFullScreenWindow() method:"
},
{
"code": null,
"e": 1416,
"s": 1281,
"text": "GraphicsDevice device = graphics.getDefaultScreenDevice();\nJFrame frame = new JFrame(\"... |
Find lost element from a duplicated array | 30 Jun, 2022
Given two arrays that are duplicates of each other except one element, that is one element from one of the array is missing, we need to find that missing element.
Examples:
Input: arr1[] = {1, 4, 5, 7, 9}
arr2[] = {4, 5, 7, 9}
Output: 1
1 is missing from second array.
Input: arr1[] = {2, 3, 4, 5... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n30 Jun, 2022"
},
{
"code": null,
"e": 215,
"s": 52,
"text": "Given two arrays that are duplicates of each other except one element, that is one element from one of the array is missing, we need to find that missing element."
},
{
... |
Minimum salary hike for each employee such that no employee feels unfair | 24 Sep, 2021
There are N employees in a company, and each employee has some ratings. The employees are given a hike in their salary based on their ratings, i.e., employees with higher ratings will get a higher hike in their salary. An employee only knows the hike and rating of its neighbors i.e., on the left and right ... | [
{
"code": null,
"e": 54,
"s": 26,
"text": "\n24 Sep, 2021"
},
{
"code": null,
"e": 583,
"s": 54,
"text": "There are N employees in a company, and each employee has some ratings. The employees are given a hike in their salary based on their ratings, i.e., employees with higher rat... |
StringCharacterIterator setText() method in Java with Examples | 29 Jul, 2019
The setText() method of java.text.StringCharacterIterator class in Java is used to set the current text that is to be read by this StringCharacterIterator. This method takes the text to be set as a parameter and sets the text of this StringCharacterIterator at that text.
Syntax:
public void setText(String ... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n29 Jul, 2019"
},
{
"code": null,
"e": 300,
"s": 28,
"text": "The setText() method of java.text.StringCharacterIterator class in Java is used to set the current text that is to be read by this StringCharacterIterator. This method takes t... |
GATE | GATE-CS-2007 | Question 61 | 30 Sep, 2020
Consider the table employee(empId, name, department, salary) and the two queries Q1 ,Q2 below. Assuming that department 5 has more than one employee, and we want to find the employees who get higher salary than anyone in the department 5, which one of the statements is TRUE for any arbitrary employee table... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n30 Sep, 2020"
},
{
"code": null,
"e": 361,
"s": 52,
"text": "Consider the table employee(empId, name, department, salary) and the two queries Q1 ,Q2 below. Assuming that department 5 has more than one employee, and we want to find the ... |
Python | Pandas dataframe.rename_axis() | 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.rename_axis() is used to rename the axes of the index or columns in dataframe.
Synt... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n16 Nov, 2018"
},
{
"code": null,
"e": 242,
"s": 28,
"text": "Python is a great language for doing data analysis, primarily because of the fantastic ecosystem of data-centric python packages. Pandas is one of those packages and makes imp... |
How do you directly overlay a scatter plot on top of a jpg image in Matplotlib? | To directly overlay a scatter plot on top of a jpg image, we can take the following steps −
Load an image "bird.jpg", using imread() method, Read an image from a file into an array.
Load an image "bird.jpg", using imread() method, Read an image from a file into an array.
Now display data as an image.
Now display data a... | [
{
"code": null,
"e": 1154,
"s": 1062,
"text": "To directly overlay a scatter plot on top of a jpg image, we can take the following steps −"
},
{
"code": null,
"e": 1244,
"s": 1154,
"text": "Load an image \"bird.jpg\", using imread() method, Read an image from a file into an array... |
Virtual Copy Constructor in C++ | Before digging deep into the topics lets brush up all the related terms.
A copy constructor is a special type of constructor that is used to create an object that is an exact copy of the object that is passed.
A virtual function is a member function that is declared in the parent class and is redefined ( overridden) in... | [
{
"code": null,
"e": 1135,
"s": 1062,
"text": "Before digging deep into the topics lets brush up all the related terms."
},
{
"code": null,
"e": 1272,
"s": 1135,
"text": "A copy constructor is a special type of constructor that is used to create an object that is an exact copy of... |
Python os.dup() Method | Python method dup() returns a duplicate of file descriptor fd which can be used in place of original descriptor.
Following is the syntax for dup() method −
os.dup(fd);
fd − This is the original file descriptor.
fd − This is the original file descriptor.
This method returns a duplicate of file descriptor.
The following... | [
{
"code": null,
"e": 2357,
"s": 2244,
"text": "Python method dup() returns a duplicate of file descriptor fd which can be used in place of original descriptor."
},
{
"code": null,
"e": 2400,
"s": 2357,
"text": "Following is the syntax for dup() method −"
},
{
"code": null... |
XGBoost Python Example. XGBoost is short for Extreme Gradient... | by Cory Maklin | Towards Data Science | XGBoost is short for Extreme Gradient Boost (I wrote an article that provides the gist of gradient boost here). Unlike Gradient Boost, XGBoost makes use of regularization parameters that helps against overfitting.
Suppose we wanted to construct a model to predict the price of a house given its square footage.
We start ... | [
{
"code": null,
"e": 385,
"s": 171,
"text": "XGBoost is short for Extreme Gradient Boost (I wrote an article that provides the gist of gradient boost here). Unlike Gradient Boost, XGBoost makes use of regularization parameters that helps against overfitting."
},
{
"code": null,
"e": 482,... |
How to deal with error “undefined columns selected” while subsetting data in R? | When we do subsetting with the help of single square brackets we need to be careful about putting the commas at appropriate places. If we want to subset rows using the columns then comma needs to be placed before the condition. The “undefined columns selected” error occurs when we do not specify any comma. Check out th... | [
{
"code": null,
"e": 1421,
"s": 1062,
"text": "When we do subsetting with the help of single square brackets we need to be careful about putting the commas at appropriate places. If we want to subset rows using the columns then comma needs to be placed before the condition. The “undefined columns se... |
Cutting hierarchical dendrogram into clusters using SciPy in Python - GeeksforGeeks | 28 Jul, 2021
In this article, we will see how to cut a hierarchical dendrogram into clusters via a threshold value using SciPy in Python.
A dendrogram is a type of tree diagram showing hierarchical clustering i.e. relationships between similar sets of data. It is used to analyze the hierarchical relationship between th... | [
{
"code": null,
"e": 25537,
"s": 25509,
"text": "\n28 Jul, 2021"
},
{
"code": null,
"e": 25662,
"s": 25537,
"text": "In this article, we will see how to cut a hierarchical dendrogram into clusters via a threshold value using SciPy in Python."
},
{
"code": null,
"e": 2... |
Longest subarray with GCD greater than 1 - GeeksforGeeks | 05 Oct, 2021
Given an array arr[] consisting of N integers, the task is to find the maximum length of subarray having the Greatest Common Divisor (GCD) of all the elements greater than 1.
Examples:
Input: arr[] = {4, 3, 2, 2}Output: 2Explaination:Consider the subarray {2, 2} having GCD as 2(> 1) which is of maximum len... | [
{
"code": null,
"e": 25731,
"s": 25703,
"text": "\n05 Oct, 2021"
},
{
"code": null,
"e": 25906,
"s": 25731,
"text": "Given an array arr[] consisting of N integers, the task is to find the maximum length of subarray having the Greatest Common Divisor (GCD) of all the elements grea... |
How to Add RangeSeekbar in Android Using Kotlin? - GeeksforGeeks | 23 Feb, 2021
In this article, RangeSeekbar is implemented in an application in android. Android Seekbar is a type of progress bar. We can drag the seekbar from left to right and vice versa and hence changes the current progress. Here we use the RangeSeekbar library to add custom seekbar in our app. This library provid... | [
{
"code": null,
"e": 26407,
"s": 26379,
"text": "\n23 Feb, 2021"
},
{
"code": null,
"e": 26834,
"s": 26407,
"text": "In this article, RangeSeekbar is implemented in an application in android. Android Seekbar is a type of progress bar. We can drag the seekbar from left to right a... |
PriorityQueue contains() Method in Java - GeeksforGeeks | 10 Dec, 2018
The Java.util.PriorityQueue.contains() method is used to check whether a specific element is present in the PriorityQueue or not. So basically it is used to check if a Queue contains any particular element or not.
Syntax:
Priority_Queue.contains(Object element)
Parameters: The parameter element is of the t... | [
{
"code": null,
"e": 25557,
"s": 25529,
"text": "\n10 Dec, 2018"
},
{
"code": null,
"e": 25771,
"s": 25557,
"text": "The Java.util.PriorityQueue.contains() method is used to check whether a specific element is present in the PriorityQueue or not. So basically it is used to check ... |
How to verify recaptcha in Node.js server call ? - GeeksforGeeks | 30 Sep, 2021
Google reCAPTCHA: reCAPTCHA is a CAPTCHA system that enables web hosts to distinguish between human and automated access to websites. This service is offered by Google.
There are two versions of reCAPTCHA offered by google:
reCAPTCHA v3reCAPTCHA v2
reCAPTCHA v3
reCAPTCHA v2
In this article, we will see ab... | [
{
"code": null,
"e": 26805,
"s": 26777,
"text": "\n30 Sep, 2021"
},
{
"code": null,
"e": 26975,
"s": 26805,
"text": "Google reCAPTCHA: reCAPTCHA is a CAPTCHA system that enables web hosts to distinguish between human and automated access to websites. This service is offered by G... |
Designing Deterministic Finite Automata (Set 5) - GeeksforGeeks | 08 Jun, 2020
Prerequisite: Designing finite automataIn this article, we will see some designing of Deterministic Finite Automata (DFA).
Problem-1: Construction of a minimal DFA accepting set of strings over {a, b} in which every ‘a’ is followed by a ‘bb’.Explanation: The desired language will be like:
L1 = {ε, abb, abb... | [
{
"code": null,
"e": 25699,
"s": 25671,
"text": "\n08 Jun, 2020"
},
{
"code": null,
"e": 25822,
"s": 25699,
"text": "Prerequisite: Designing finite automataIn this article, we will see some designing of Deterministic Finite Automata (DFA)."
},
{
"code": null,
"e": 259... |
How to Create a Bootstrap Dismissible Alert ? - GeeksforGeeks | 30 Sep, 2021
Bootstrap is a free and open-source tool for making responsive and beautiful web pages very easily. Alerts are used to notify the users and the visitors of the webpage about some action or information. Also, we can provide the user with dismissing the alert. But Simple alerts are not so good-looking. So wi... | [
{
"code": null,
"e": 26863,
"s": 26835,
"text": "\n30 Sep, 2021"
},
{
"code": null,
"e": 27329,
"s": 26863,
"text": "Bootstrap is a free and open-source tool for making responsive and beautiful web pages very easily. Alerts are used to notify the users and the visitors of the web... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.