title stringlengths 3 221 | text stringlengths 17 477k | parsed listlengths 0 3.17k |
|---|---|---|
How many ways are there to initialize the instance variables of a class in java? | You can initialize the instance variables of a class using final methods, constructors or, Instance initialization blocks.
Whenever you make a method final, you cannot override it. i.e. you cannot provide implementation to the superclass’s final method from the subclass.
i.e. The purpose of making a method final is to ... | [
{
"code": null,
"e": 1185,
"s": 1062,
"text": "You can initialize the instance variables of a class using final methods, constructors or, Instance initialization blocks."
},
{
"code": null,
"e": 1334,
"s": 1185,
"text": "Whenever you make a method final, you cannot override it. i... |
Using Object Detection for Complex Image Classification Scenarios Part 3: | by Aaron (Ari) Bornstein | Towards Data Science | TLDR; This series is based on the work detecting complex policies in the following real life code story. Code for the series can be found here.
In the previous tutorials we outlined our policy classification challenge and showed how we can approach it using the Custom Vision Cognitive Service. This tutorial introduces ... | [
{
"code": null,
"e": 315,
"s": 171,
"text": "TLDR; This series is based on the work detecting complex policies in the following real life code story. Code for the series can be found here."
},
{
"code": null,
"e": 594,
"s": 315,
"text": "In the previous tutorials we outlined our ... |
Check if the current date falls in a given date range using MySQL query | Let us first create a table −
mysql> create table DemoTable1448
-> (
-> StartDate date,
-> EndDate date
-> );
Query OK, 0 rows affected (0.46 sec)
Insert some records in the table using insert command −
mysql> insert into DemoTable1448 values('2019-01-21','2019-03-22');
Query OK, 1 row affected (0.16 sec)
m... | [
{
"code": null,
"e": 1092,
"s": 1062,
"text": "Let us first create a table −"
},
{
"code": null,
"e": 1221,
"s": 1092,
"text": "mysql> create table DemoTable1448\n -> (\n -> StartDate date,\n -> EndDate date\n -> );\nQuery OK, 0 rows affected (0.46 sec)"
},
{
"cod... |
Hands-on TensorFlow Tutorial: Train ResNet-50 From Scratch Using the ImageNet Dataset | by James Montantes | Towards Data Science | In this blog, we give a quick hands on tutorial on how to train the ResNet model in TensorFlow. While the official TensorFlow documentation does have the basic information you need, it may not entirely make sense right away, and it can be a little hard to sift through.
We present here a step by step process for trainin... | [
{
"code": null,
"e": 442,
"s": 172,
"text": "In this blog, we give a quick hands on tutorial on how to train the ResNet model in TensorFlow. While the official TensorFlow documentation does have the basic information you need, it may not entirely make sense right away, and it can be a little hard to... |
Quiver Plots using Plotly in Python - GeeksforGeeks | 05 Sep, 2020
A Plotly is a Python library that is used to design graphs, especially interactive graphs. It can plot various graphs and charts like histogram, barplot, boxplot, spreadplot, and many more. It is mainly used in data analysis as well as financial analysis. plotly is an interactive visualization library.
A q... | [
{
"code": null,
"e": 25015,
"s": 24987,
"text": "\n05 Sep, 2020"
},
{
"code": null,
"e": 25319,
"s": 25015,
"text": "A Plotly is a Python library that is used to design graphs, especially interactive graphs. It can plot various graphs and charts like histogram, barplot, boxplot, ... |
Program for Goldbach’s Conjecture (Two Primes with given Sum) - GeeksforGeeks | 24 May, 2021
Goldbach’s conjecture is one of the oldest and best-known unsolved problems in the number theory of mathematics. Every even integer greater than 2 can be expressed as the sum of two primes.
Examples:
Input : n = 44
Output : 3 + 41 (both are primes)
Input : n = 56
Output : 3 + 53 (both are primes) ... | [
{
"code": null,
"e": 25949,
"s": 25921,
"text": "\n24 May, 2021"
},
{
"code": null,
"e": 26139,
"s": 25949,
"text": "Goldbach’s conjecture is one of the oldest and best-known unsolved problems in the number theory of mathematics. Every even integer greater than 2 can be expressed... |
Tailwind CSS Box Shadow - GeeksforGeeks | 23 Mar, 2022
This class accepts lots of value in tailwind CSS in which all the properties are covered in class form. By using this class we can control the box-shadow of an element. In CSS, we do that by using the CSS Shadow Effect properties of box-shadow.
Box Shadow classes:
shadow-sm: This class is used to create a... | [
{
"code": null,
"e": 37385,
"s": 37357,
"text": "\n23 Mar, 2022"
},
{
"code": null,
"e": 37631,
"s": 37385,
"text": "This class accepts lots of value in tailwind CSS in which all the properties are covered in class form. By using this class we can control the box-shadow of an ele... |
Stack | Set 2 (Infix to Postfix) - GeeksforGeeks | 12 Apr, 2022
Prerequisite – Stack | Set 1 (Introduction) Infix expression: The expression of the form a op b. When an operator is in-between every pair of operands.Postfix expression: The expression of the form a b op. When an operator is followed for every pair of operands.Why postfix representation of the expression?... | [
{
"code": null,
"e": 26165,
"s": 26137,
"text": "\n12 Apr, 2022"
},
{
"code": null,
"e": 27453,
"s": 26165,
"text": "Prerequisite – Stack | Set 1 (Introduction) Infix expression: The expression of the form a op b. When an operator is in-between every pair of operands.Postfix expr... |
What is the advantage of collapsing white space ? - GeeksforGeeks | 21 Oct, 2021
White space refers to empty or blank values in the code which the browser reads and renders. Html has a special feature of collapsing these white spaces. If you put extra/consecutive white spaces or newlines in the code it will regard it as one white space this is known as collapsing of white spaces. In th... | [
{
"code": null,
"e": 26139,
"s": 26111,
"text": "\n21 Oct, 2021"
},
{
"code": null,
"e": 26524,
"s": 26139,
"text": "White space refers to empty or blank values in the code which the browser reads and renders. Html has a special feature of collapsing these white spaces. If you pu... |
Minimum step to reach one - GeeksforGeeks | 13 Jul, 2021
Given a positive number N, we need to reach to 1 in minimum number of steps where a step is defined as converting N to (N-1) or converting N to its one of the bigger divisor.
Formally, if we are at N, then in 1 step we can reach to (N – 1) or if N = u*v then we can reach to max(u, v) where u > 1 and v > 1... | [
{
"code": null,
"e": 25963,
"s": 25935,
"text": "\n13 Jul, 2021"
},
{
"code": null,
"e": 26139,
"s": 25963,
"text": "Given a positive number N, we need to reach to 1 in minimum number of steps where a step is defined as converting N to (N-1) or converting N to its one of the bigg... |
Web scraper for extracting emails based on keywords and regions - GeeksforGeeks | 29 Dec, 2020
Web scraping is a task that is normally performed to scrape structured data from the websites which are then stored accordingly, this kind of data is valuable enough to open the doors to a variety of fields from data mining-related stuff to the data science related applications where large amounts of data ... | [
{
"code": null,
"e": 25561,
"s": 25533,
"text": "\n29 Dec, 2020"
},
{
"code": null,
"e": 25909,
"s": 25561,
"text": "Web scraping is a task that is normally performed to scrape structured data from the websites which are then stored accordingly, this kind of data is valuable enou... |
Create Local Binary Pattern of an image using OpenCV-Python - GeeksforGeeks | 06 Mar, 2020
In this article, we will discuss the image and how to find a binary pattern using the pixel value of the image.
As we all know, image is also known as a set of pixels. When we store an image in computers or digitally, it’s corresponding pixel values are stored. So, when we read an image to a variable using... | [
{
"code": null,
"e": 25807,
"s": 25779,
"text": "\n06 Mar, 2020"
},
{
"code": null,
"e": 25919,
"s": 25807,
"text": "In this article, we will discuss the image and how to find a binary pattern using the pixel value of the image."
},
{
"code": null,
"e": 26184,
"s"... |
Efficient search in an array where difference between adjacent is 1 - GeeksforGeeks | 26 Mar, 2021
Given an array of n integers. Each array element is obtained by adding either +1 or -1 to previous element i.e absolute difference between any two consecutive elements is 1. The task is to search an element index with the minimum number of comparison (less than simple element by element search). If the ele... | [
{
"code": null,
"e": 26783,
"s": 26755,
"text": "\n26 Mar, 2021"
},
{
"code": null,
"e": 27203,
"s": 26783,
"text": "Given an array of n integers. Each array element is obtained by adding either +1 or -1 to previous element i.e absolute difference between any two consecutive elem... |
Bash program to check if the Number is a Prime or not - GeeksforGeeks | 30 Sep, 2019
Given a number, the task is to find whether the given number is prime or not using Bash Scripting.
Examples:
Input: N = 43
Output: Prime
Input: N = 35
Output: Not Prime
Prime Numbers:A prime number is a whole number greater than 1, which is only divisible by 1 and itself. First few prime numbers are : 2 ... | [
{
"code": null,
"e": 25741,
"s": 25713,
"text": "\n30 Sep, 2019"
},
{
"code": null,
"e": 25840,
"s": 25741,
"text": "Given a number, the task is to find whether the given number is prime or not using Bash Scripting."
},
{
"code": null,
"e": 25850,
"s": 25840,
... |
CSS | column-width Property - GeeksforGeeks | 28 Apr, 2021
The columns-width property in CSS is used to define the width of the columns. The minimum number of columns are require to show the content across the element. It is a flexible property. If the browser cannot fit at least two-columns at given column-width then the two columns will put into a single column.... | [
{
"code": null,
"e": 24897,
"s": 24869,
"text": "\n28 Apr, 2021"
},
{
"code": null,
"e": 25214,
"s": 24897,
"text": "The columns-width property in CSS is used to define the width of the columns. The minimum number of columns are require to show the content across the element. It ... |
Check if it is possible to create a palindrome string from given N - GeeksforGeeks | 31 Oct, 2018
Given a number N. The task is to create an alphabetical string in lower case from that number and tell whether the string is palindrome or not. a = 0, b = 1..... and so on.
For eg: If the number is 61 the substring “gb” will be printed till 7 (6+1) characters i.e. “gbgbgbg” and check if palindrome or not.
... | [
{
"code": null,
"e": 26073,
"s": 26045,
"text": "\n31 Oct, 2018"
},
{
"code": null,
"e": 26246,
"s": 26073,
"text": "Given a number N. The task is to create an alphabetical string in lower case from that number and tell whether the string is palindrome or not. a = 0, b = 1..... a... |
How to get current function name in PHP? - GeeksforGeeks | 11 Nov, 2018
The function name can be easily obtained by the __FUNCTION__ or the __METHOD__magic constant.
Method 1 (Prints function name):__FUNCTION__ is used to resolve function name or method name (function in class).
Example:
<?phpclass Test { public function bar() { var_dump(__FUNCTION__); }} funct... | [
{
"code": null,
"e": 25963,
"s": 25935,
"text": "\n11 Nov, 2018"
},
{
"code": null,
"e": 26057,
"s": 25963,
"text": "The function name can be easily obtained by the __FUNCTION__ or the __METHOD__magic constant."
},
{
"code": null,
"e": 26171,
"s": 26057,
"text... |
How do you use NumPy, SciPy and SymPy to solve Systems of Linear Equations? | by Rukshan Pramoditha | Towards Data Science | In linear algebra, a system of linear equations is defined as a collection of two or more linear equations having the same set of variables. All equations in the system are considered simultaneously. Systems of linear equations are used in different sectors such as Manufacturing, Marketing, Business, Transportation, et... | [
{
"code": null,
"e": 495,
"s": 172,
"text": "In linear algebra, a system of linear equations is defined as a collection of two or more linear equations having the same set of variables. All equations in the system are considered simultaneously. Systems of linear equations are used in different secto... |
Setting up Amazon SageMaker Environment On Your Local Machine | by Sam Palani | Towards Data Science | Amazon SageMaker is beyond just managed Jupyter notebooks, it is a fully managed service that enables you to build, train, optimize and deploy machine learning models. A common misconception, specially when you are starting out with SageMaker is that, in order to use these services, you need a SageMaker Notebook Instan... | [
{
"code": null,
"e": 636,
"s": 172,
"text": "Amazon SageMaker is beyond just managed Jupyter notebooks, it is a fully managed service that enables you to build, train, optimize and deploy machine learning models. A common misconception, specially when you are starting out with SageMaker is that, in ... |
Count Distinct Rectangles in N*N Chessboard - GeeksforGeeks | 27 Apr, 2021
Given a N x N Chessboard. The task is to count distinct rectangles from the chessboard. For example, if the input is 8 then the output should be 36.Examples:
Input: N = 4
Output: 10
Input: N = 6
Output: 21
Approach: Suppose N = 8 i.e. 8 x 8 chessboard is given, So different rectangles that can be for... | [
{
"code": null,
"e": 24326,
"s": 24298,
"text": "\n27 Apr, 2021"
},
{
"code": null,
"e": 24486,
"s": 24326,
"text": "Given a N x N Chessboard. The task is to count distinct rectangles from the chessboard. For example, if the input is 8 then the output should be 36.Examples: "
... |
Python File fileno() Method | Python file method fileno() returns the integer file descriptor that is used by the underlying implementation to request I/O operations from the operating system.
Following is the syntax for fileno() method −
fileObject.fileno();
NA
NA
This method returns the integer file descriptor.
The following example shows the u... | [
{
"code": null,
"e": 2407,
"s": 2244,
"text": "Python file method fileno() returns the integer file descriptor that is used by the underlying implementation to request I/O operations from the operating system."
},
{
"code": null,
"e": 2453,
"s": 2407,
"text": "Following is the sy... |
Isupper() and Islower() and their application in C++ | The functions isupper() and islower() in C++ are inbuilt functions present in “ctype.h” header file. It checks whether the given character or string is in uppercase or lowercase.
This function is used to check whether the given string contains any uppercase letter or not and also if we have one character as an input th... | [
{
"code": null,
"e": 1241,
"s": 1062,
"text": "The functions isupper() and islower() in C++ are inbuilt functions present in “ctype.h” header file. It checks whether the given character or string is in uppercase or lowercase."
},
{
"code": null,
"e": 1441,
"s": 1241,
"text": "Thi... |
Implementation of Whale Optimization Algorithm - GeeksforGeeks | 13 Dec, 2021
Previous article Whale optimization algorithm (WOA) talked about the inspiration of whale optimization, its mathematical modeling and algorithm. In this article we will implement a whale optimization algorithm (WOA) for two fitness functions 1) Rastrigin function 2) Sphere function The algorithm will r... | [
{
"code": null,
"e": 23953,
"s": 23925,
"text": "\n13 Dec, 2021"
},
{
"code": null,
"e": 24376,
"s": 23953,
"text": "Previous article Whale optimization algorithm (WOA) talked about the inspiration of whale optimization, its mathematical modeling and algorithm. In this article we... |
How to create a product card with CSS? | To create a product card with CSS, the code is as follows −
Live Demo
<!DOCTYPE html>
<html>
<head>
<style>
body {
font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
}
.productCard {
box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2);
max-width: 300px;
margin: auto;
text-align... | [
{
"code": null,
"e": 1122,
"s": 1062,
"text": "To create a product card with CSS, the code is as follows −"
},
{
"code": null,
"e": 1133,
"s": 1122,
"text": " Live Demo"
},
{
"code": null,
"e": 2266,
"s": 1133,
"text": "<!DOCTYPE html>\n<html>\n<head>\n<style>... |
How to Train A Custom Object Detection Model with YOLO v5 | by Jacob Solawetz | Towards Data Science | We will cover the following material and you can jump in wherever you are in the process of creating your object detection model:
An Overview of Object Detection
About the YOLO v5 Model
Collecting Our Training Images
Annotating Our Training Images
Install YOLO v5 dependencies
Download Custom YOLO v5 Object Detection Da... | [
{
"code": null,
"e": 302,
"s": 172,
"text": "We will cover the following material and you can jump in wherever you are in the process of creating your object detection model:"
},
{
"code": null,
"e": 334,
"s": 302,
"text": "An Overview of Object Detection"
},
{
"code": nu... |
Count unique sublists within list in Python | A Python list can also contain sublist. A sublist itself is a list nested within a bigger list. In this article we will see how to count the number of unique sublists within a given list.
Counter is a subclass of Dictionary and used to keep track of elements and their count. It is also considered as an unordered collec... | [
{
"code": null,
"e": 1250,
"s": 1062,
"text": "A Python list can also contain sublist. A sublist itself is a list nested within a bigger list. In this article we will see how to count the number of unique sublists within a given list."
},
{
"code": null,
"e": 1525,
"s": 1250,
"te... |
Check Whether a number is Duck Number or not - GeeksforGeeks | 13 Apr, 2021
A Duck number is a positive number which has zeroes present in it, For example 3210, 8050896, 70709 are all Duck numbers. Please note that a numbers with only leading 0s is not considered as Duck Number. For example, numbers like 035 or 0012 are not considered as Duck Numbers. A number like 01203 is consid... | [
{
"code": null,
"e": 24871,
"s": 24843,
"text": "\n13 Apr, 2021"
},
{
"code": null,
"e": 25239,
"s": 24871,
"text": "A Duck number is a positive number which has zeroes present in it, For example 3210, 8050896, 70709 are all Duck numbers. Please note that a numbers with only lead... |
Odd Even Problem | Practice | GeeksforGeeks | Given a string S of lowercase english characters, find out whether the summation of X and Y is even or odd, where X is the count of characters which occupy even positions in english alphabets and have positive even frequency, and Y is the count of characters which occupy odd positions in english alphabets and have posi... | [
{
"code": null,
"e": 618,
"s": 238,
"text": "Given a string S of lowercase english characters, find out whether the summation of X and Y is even or odd, where X is the count of characters which occupy even positions in english alphabets and have positive even frequency, and Y is the count of charact... |
How to take a screenshot of the window using Python?(Tkinter) | Python has a rich library of modules and functions that allows us to build and develop featured applications. Tkinter is a well-known Python library that is used for creating GUIbased applications. If we want to develop an application that takes a screenshot of the window, then we can definitely use Tkinter to build th... | [
{
"code": null,
"e": 1493,
"s": 1062,
"text": "Python has a rich library of modules and functions that allows us to build and develop featured applications. Tkinter is a well-known Python library that is used for creating GUIbased applications. If we want to develop an application that takes a scree... |
!!! DOGS VS CATS IMAGE CLASSIFIER !!! | by Ashis Kumar Panda | Towards Data Science | I’ve been going through fast.ai for a couple of months . I got to admit that there were lots of stuffs and awesome techniques that I learned in the process. I’ll make sure to update all those in my Blog . All thanks to Jeremy Howard and Rachel Thomas for their efforts to democratize AI. Thanks to the awesome fast.ai co... | [
{
"code": null,
"e": 525,
"s": 172,
"text": "I’ve been going through fast.ai for a couple of months . I got to admit that there were lots of stuffs and awesome techniques that I learned in the process. I’ll make sure to update all those in my Blog . All thanks to Jeremy Howard and Rachel Thomas for ... |
A Beginner’s Guide to Rasa NLU for Intent Classification and Named-entity Recognition | by Ng Wai Foong | Towards Data Science | The purpose of this article is to explore the new way to use Rasa NLU for intent classification and named-entity recognition. Since version 1.0.0, both Rasa NLU and Rasa Core have been merged into a single framework. As a results, there are some minor changes to the training process and the functionality available. Fir... | [
{
"code": null,
"e": 851,
"s": 172,
"text": "The purpose of this article is to explore the new way to use Rasa NLU for intent classification and named-entity recognition. Since version 1.0.0, both Rasa NLU and Rasa Core have been merged into a single framework. As a results, there are some minor cha... |
Java program to print a given matrix in Spiral Form. | Following is a Java program to print the spiral form of a given matrix.
Live Demo
public class PrintMatrixInSpiralForm {
public static void main(String args[]){
int a[][]={{1,2,3},{4,5,6},{7,8,9}};
int w = 0;
int x = a.length-1;
int y = 0;
int z = a[0].length-1;
while(w <= x && y... | [
{
"code": null,
"e": 1134,
"s": 1062,
"text": "Following is a Java program to print the spiral form of a given matrix."
},
{
"code": null,
"e": 1145,
"s": 1134,
"text": " Live Demo"
},
{
"code": null,
"e": 1936,
"s": 1145,
"text": "public class PrintMatrixInSp... |
What is Sparsemax?. A useful variation of softmax | by Michael Larionov, PhD | Towards Data Science | In machine learning, there are several very useful functions, for example, sigmoid, relu, softmax. The latter is widely used in multi-class classification problems as an output layer of the Neural networks:
This function has a useful property: the sum of its elements is one, which makes it very useful to model probabil... | [
{
"code": null,
"e": 379,
"s": 172,
"text": "In machine learning, there are several very useful functions, for example, sigmoid, relu, softmax. The latter is widely used in multi-class classification problems as an output layer of the Neural networks:"
},
{
"code": null,
"e": 922,
"s... |
How to Package A Python Application using Anaconda and Docker | Towards Data Science | I rarely use anaconda for my python projects, but recently it happened to me to rely on a python package which is available only via Anaconda. Therefore, I had to set my project using conda environment. However, I encountered a problem packaging my python application using Docker, because of the conda virtual environme... | [
{
"code": null,
"e": 626,
"s": 172,
"text": "I rarely use anaconda for my python projects, but recently it happened to me to rely on a python package which is available only via Anaconda. Therefore, I had to set my project using conda environment. However, I encountered a problem packaging my python... |
How to get the height and width of the android.widget.ImageView? | This example demonstrates how do I get the height and width of the android.widget.ImageView in android.
Step 1 − Create a new project in Android Studio, go to File ⇒ New Project and fill all required details to create a new project.
Step 2 − Add the following code to res/layout/activity_main.xml.
<?xml version="1.0" en... | [
{
"code": null,
"e": 1166,
"s": 1062,
"text": "This example demonstrates how do I get the height and width of the android.widget.ImageView in android."
},
{
"code": null,
"e": 1295,
"s": 1166,
"text": "Step 1 − Create a new project in Android Studio, go to File ⇒ New Project and ... |
Why the #1054 - Unknown column error occurs in MySQL and how to fix it? | Let’s see when the #1054 error occurs in MySQL. While inserting a varchar value, if you will forget to add single quotes, then this error will arise.
Following is the error −
mysql> insert into DemoTable798 values(100,Adam);
ERROR 1054 (42S22): Unknown column 'Adam' in 'field list'
You need to use single quotes around... | [
{
"code": null,
"e": 1213,
"s": 1062,
"text": "Let’s see when the #1054 error occurs in MySQL. While inserting a varchar value, if you will forget to add single quotes, then this error will arise.\n"
},
{
"code": null,
"e": 1238,
"s": 1213,
"text": "Following is the error −"
},... |
How to lock Screen Orientation programmatically in iOS? | You might come across a scenario where you need to show the UI in a specific orientation may be Landscape or Portrait.
We will be seeing how to lock orientation programmatically using Swift in iOS.
Open Xcode → New Project → ViewController.swift write the below code.
// Set the shouldAutorotate to False
override open v... | [
{
"code": null,
"e": 1181,
"s": 1062,
"text": "You might come across a scenario where you need to show the UI in a specific orientation may be Landscape or Portrait."
},
{
"code": null,
"e": 1260,
"s": 1181,
"text": "We will be seeing how to lock orientation programmatically usin... |
CSS font-weight Property - GeeksforGeeks | 11 Oct, 2021
The font-weight property of the CSS is used to set the weight or thickness of the font being used with the HTML Text. The font-weight applied will depend on font-family used and the browser. For instance, some font-family is available only in specific weights.
Syntax:
font-weight: normal|bold|lighter|bolde... | [
{
"code": null,
"e": 23720,
"s": 23692,
"text": "\n11 Oct, 2021"
},
{
"code": null,
"e": 23981,
"s": 23720,
"text": "The font-weight property of the CSS is used to set the weight or thickness of the font being used with the HTML Text. The font-weight applied will depend on font-f... |
How to use context in a fragment? | This example demonstrate about How to use context in a fragment
Step 1 − Create a new project in Android Studio, go to File ⇒ New Project and fill all required details to create a new project.
Step 2 − Add the following code to res/layout/activity_main.xml.
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:and... | [
{
"code": null,
"e": 1126,
"s": 1062,
"text": "This example demonstrate about How to use context in a fragment"
},
{
"code": null,
"e": 1255,
"s": 1126,
"text": "Step 1 − Create a new project in Android Studio, go to File ⇒ New Project and fill all required details to create a ne... |
Symfony - View Engine | A View Layer is the presentation layer of the MVC application. It separates the application logic from the presentation logic.
When a controller needs to generate HTML, CSS, or any other content then, it forwards the task to the templating engine.
Templates are basically text files used to generate any text-based docum... | [
{
"code": null,
"e": 2330,
"s": 2203,
"text": "A View Layer is the presentation layer of the MVC application. It separates the application logic from the presentation logic."
},
{
"code": null,
"e": 2451,
"s": 2330,
"text": "When a controller needs to generate HTML, CSS, or any o... |
JSF - h:commandButton | The h:commandButton tag renders an HTML input element of the type "submit".
<h:commandButton value = "Click Me!" onclick = "alert('Hello World!');" />
<input type = "submit" name = "j_idt10:j_idt13" value = "Click Me!"
onclick = "alert('Hello World!');" />
id
Identifier for a component
rendered
A boolean; false s... | [
{
"code": null,
"e": 2028,
"s": 1952,
"text": "The h:commandButton tag renders an HTML input element of the type \"submit\"."
},
{
"code": null,
"e": 2104,
"s": 2028,
"text": "<h:commandButton value = \"Click Me!\" onclick = \"alert('Hello World!');\" /> "
},
{
"code": nu... |
Building an End-To-End Data Science Project | by George Liu | Towards Data Science | It is often said that the majority of a Data Scientist’s work is not the actual analysis and modeling, but rather the data wrangling and cleaning part. As a result, full-cycle data science projects that involve these stages will be more valuable since they prove the author’s abilities to work independently with real da... | [
{
"code": null,
"e": 534,
"s": 171,
"text": "It is often said that the majority of a Data Scientist’s work is not the actual analysis and modeling, but rather the data wrangling and cleaning part. As a result, full-cycle data science projects that involve these stages will be more valuable since the... |
Java Program for Maximum Product Subarray - GeeksforGeeks | 21 Dec, 2021
Given an array that contains both positive and negative integers, find the product of the maximum product subarray. Expected Time complexity is O(n) and only O(1) extra space can be used.
Examples:
Input: arr[] = {6, -3, -10, 0, 2}
Output: 180 // The subarray is {6, -3, -10}
Input: arr[] = {-1, -3, -10... | [
{
"code": null,
"e": 24405,
"s": 24377,
"text": "\n21 Dec, 2021"
},
{
"code": null,
"e": 24593,
"s": 24405,
"text": "Given an array that contains both positive and negative integers, find the product of the maximum product subarray. Expected Time complexity is O(n) and only O(1) ... |
Histograms with Python’s Matplotlib | by Thiago Carvalho | Towards Data Science | Karl Pearson coined the term histogram, but it’s hard to tell who invented the visualization, and it’s most likely that it was used way before Pearson named it.
William Playfair is considered the inventor of bar charts or the first to publish such graphs, so it’s not hard to imagine that he would have drawn a couple of... | [
{
"code": null,
"e": 333,
"s": 172,
"text": "Karl Pearson coined the term histogram, but it’s hard to tell who invented the visualization, and it’s most likely that it was used way before Pearson named it."
},
{
"code": null,
"e": 565,
"s": 333,
"text": "William Playfair is consi... |
JavaFX - 3D Shape Box | A cuboid is a three dimensional or solid shape. Cuboids are made from 6 rectangles, which are placed at right angles. A cuboid that uses square faces is a cube, if the faces are rectangles, other than cubes, it looks like a shoe box.
A cuboid is a three-dimensional shape with a length (depth), width, and a height as sh... | [
{
"code": null,
"e": 2134,
"s": 1900,
"text": "A cuboid is a three dimensional or solid shape. Cuboids are made from 6 rectangles, which are placed at right angles. A cuboid that uses square faces is a cube, if the faces are rectangles, other than cubes, it looks like a shoe box."
},
{
"code... |
Bootstrap - Badges | This chapter will discuss about Bootstrap badges. Badges are similar to labels; the primary difference is that the corners are more rounded.
Badges are mainly used to highlight new or unread items. To use badges just add <span class = "badge"> to links, Bootstrap navs, and more.
The following example demonstrates this ... | [
{
"code": null,
"e": 3472,
"s": 3331,
"text": "This chapter will discuss about Bootstrap badges. Badges are similar to labels; the primary difference is that the corners are more rounded."
},
{
"code": null,
"e": 3611,
"s": 3472,
"text": "Badges are mainly used to highlight new o... |
Tryit Editor v3.7 | CSS Rounded Corners
Tryit: Specify each corner | [
{
"code": null,
"e": 29,
"s": 9,
"text": "CSS Rounded Corners"
}
] |
Count of nodes that are greater than Ancestors - GeeksforGeeks | 10 Jun, 2021
Given the root of a tree, the task is to find the count of nodes which are greater than all of its ancestors.Examples:
Input:
4
/ \
5 2
/ \
3 6
Output: 3
The nodes are 4, 5 and 6.
Input:
10
/ \
8 6
\ \
3 5
/
1
Output: 1
Approach: The problem can be solved using dfs. ... | [
{
"code": null,
"e": 25228,
"s": 25200,
"text": "\n10 Jun, 2021"
},
{
"code": null,
"e": 25348,
"s": 25228,
"text": "Given the root of a tree, the task is to find the count of nodes which are greater than all of its ancestors.Examples: "
},
{
"code": null,
"e": 25488,... |
The Filter Function in Python. Learn how to use the filter function in... | by Luay Matalka | Towards Data Science | Even though Python is an object-oriented language, it still offers functions that provide a functional programming style. In a previous article, we discussed one of those functions, map. In this article, we will discuss another one of these Python built-in functions, the filter function.
In this tutorial, we will learn... | [
{
"code": null,
"e": 336,
"s": 47,
"text": "Even though Python is an object-oriented language, it still offers functions that provide a functional programming style. In a previous article, we discussed one of those functions, map. In this article, we will discuss another one of these Python built-in... |
Collection addAll() method in Java with Examples - GeeksforGeeks | 29 Nov, 2018
The addAll(Collection collection) of java.util.Collection interface is used to add the Collection ‘collection’ to this existing collection. This method returns a boolean value depicting the successfulness of the operation. If the collection was added, it returns true, else it returns false.
Syntax:
Collect... | [
{
"code": null,
"e": 23948,
"s": 23920,
"text": "\n29 Nov, 2018"
},
{
"code": null,
"e": 24240,
"s": 23948,
"text": "The addAll(Collection collection) of java.util.Collection interface is used to add the Collection ‘collection’ to this existing collection. This method returns a b... |
CSS | grid-area Property - GeeksforGeeks | 08 Aug, 2019
The grid-area property is used to set a grid item size and location in a grid layout. The grid-area property is also used to set a name to a grid item.
Syntax:
grid-area: grid-row-start|grid-column-start|grid-row-end|
grid-column-end|itemname;
Property Values:
grid-row-start: It sets the row on which the i... | [
{
"code": null,
"e": 23580,
"s": 23552,
"text": "\n08 Aug, 2019"
},
{
"code": null,
"e": 23732,
"s": 23580,
"text": "The grid-area property is used to set a grid item size and location in a grid layout. The grid-area property is also used to set a name to a grid item."
},
{
... |
How to extract numbers from text using Python regular expression? | If we want to extract all numbers/digits individually from given text we use the following regex
import re
s = '12345 abcdf 67'
result=re.findall(r'\d', s)
print result
['1', '2', '3', '4', '5', '6', '7']
If we want to extract groups of numbers/digits from given text we use the following regex
import re
s = '12345 abc... | [
{
"code": null,
"e": 1160,
"s": 1062,
"text": "If we want to extract all numbers/digits individually from given text we use the following regex"
},
{
"code": null,
"e": 1232,
"s": 1160,
"text": "import re\ns = '12345 abcdf 67'\nresult=re.findall(r'\\d', s)\nprint result"
},
... |
Cleaning and Preparing Data in Python | by Sergi Lehkyi | Towards Data Science | Data Science sounds like something cool and awesome. It’s pictured as something cool and awesome. It is a sexiest job of 21st century as we all know (I won’t even add the link to that article :D). All the cool terms are related to this field — Machine Learning, Deep Learning, AI, Neural Networks, algorithms, models...
... | [
{
"code": null,
"e": 492,
"s": 172,
"text": "Data Science sounds like something cool and awesome. It’s pictured as something cool and awesome. It is a sexiest job of 21st century as we all know (I won’t even add the link to that article :D). All the cool terms are related to this field — Machine Lea... |
Normal Equation in Python: The Closed-Form Solution for Linear Regression | by Suraj Verma | Towards Data Science | In this article, we will implement the Normal Equation which is the closed-form solution for the Linear Regression algorithm where we can find the optimal value of theta in just one step without using the Gradient Descent algorithm.
We will first recap with Gradient Descent Algorithm, then talk about calculating theta ... | [
{
"code": null,
"e": 405,
"s": 172,
"text": "In this article, we will implement the Normal Equation which is the closed-form solution for the Linear Regression algorithm where we can find the optimal value of theta in just one step without using the Gradient Descent algorithm."
},
{
"code": ... |
JavaScript | Date - GeeksforGeeks | 12 Oct, 2021
The Date object in JavaScript is used to represent a moment of time. This time value is since 1 January 1970 UTC (Coordinated Universal Time). We can create a date using the Date object by calling the new Date() constructor as shown in the below syntax.Syntax:
new Date();
new Date(value);
new Date(dateSt... | [
{
"code": null,
"e": 29667,
"s": 29639,
"text": "\n12 Oct, 2021"
},
{
"code": null,
"e": 29930,
"s": 29667,
"text": "The Date object in JavaScript is used to represent a moment of time. This time value is since 1 January 1970 UTC (Coordinated Universal Time). We can create a date... |
How to wait until an element no longer exists in Selenium? | We can wait until an element no longer exists in Selenium webdriver. This can be achieved with synchronization in Selenium. We shall add an explicit wait criteria where we shall stop or wait till the element no longer exists.
Timeout exception is thrown once the explicit wait time has elapsed and the expected behavior ... | [
{
"code": null,
"e": 1288,
"s": 1062,
"text": "We can wait until an element no longer exists in Selenium webdriver. This can be achieved with synchronization in Selenium. We shall add an explicit wait criteria where we shall stop or wait till the element no longer exists."
},
{
"code": null,... |
Next.js - Environment Variables | Next.js, has support for publishing environment variables in node which we can use in connecting to server, database etc. For this, we need to create .env.local file in root directory. We can also create .env.production.
Create .env.local in root directory with the following contents.
DB_HOST=localhost
DB_USER=tutorial... | [
{
"code": null,
"e": 2328,
"s": 2107,
"text": "Next.js, has support for publishing environment variables in node which we can use in connecting to server, database etc. For this, we need to create .env.local file in root directory. We can also create .env.production."
},
{
"code": null,
... |
How to read data from a file using FileInputStream? | The FileInputStream class reads the data from a specific file (byte by byte). It is usually used to read the contents of a file with raw bytes, such as images.
To read the contents of a file using this class −
First of all, you need to instantiate this class by passing a String variable or a File object, representing t... | [
{
"code": null,
"e": 1222,
"s": 1062,
"text": "The FileInputStream class reads the data from a specific file (byte by byte). It is usually used to read the contents of a file with raw bytes, such as images."
},
{
"code": null,
"e": 1272,
"s": 1222,
"text": "To read the contents o... |
Ionic - Lists | Lists are one of the most popular elements of any web or mobile application. They are usually used for displaying various information. They can be combined with other HTML elements to create different menus, tabs or to break the monotony of pure text files. Ionic framework offers different list types to make their usag... | [
{
"code": null,
"e": 2791,
"s": 2463,
"text": "Lists are one of the most popular elements of any web or mobile application. They are usually used for displaying various information. They can be combined with other HTML elements to create different menus, tabs or to break the monotony of pure text fi... |
GOCC15: Google's Online Challenge for Internship (India) - GeeksforGeeks | 22 Jul, 2021
I came to know about the opportunity through https://careers.google.com/jobs/results/ Google’s website. Applied for the same with my resume. After two weeks got a mail Invite participating in the coding round. The mail had a unique ID and got the passkey(for login) on the day of the coding round1 (29th Aug... | [
{
"code": null,
"e": 24994,
"s": 24966,
"text": "\n22 Jul, 2021"
},
{
"code": null,
"e": 25353,
"s": 24994,
"text": "I came to know about the opportunity through https://careers.google.com/jobs/results/ Google’s website. Applied for the same with my resume. After two weeks got a ... |
java.time.LocalDate.format() Method Example | The java.time.LocalDate.format(DateTimeFormatter formatter) method formats this date using the specified formatter.
Following is the declaration for java.time.LocalDate.format(DateTimeFormatter formatter) method.
public String format(DateTimeFormatter formatter)
formatter − the formatter to use, not null.
the formatte... | [
{
"code": null,
"e": 2031,
"s": 1915,
"text": "The java.time.LocalDate.format(DateTimeFormatter formatter) method formats this date using the specified formatter."
},
{
"code": null,
"e": 2128,
"s": 2031,
"text": "Following is the declaration for java.time.LocalDate.format(DateTi... |
Arithmetic Progression - GeeksforGeeks | 29 Apr, 2021
A sequence of numbers is called an Arithmetic progression if the difference between any two consecutive terms is always the same. In simple terms, it means that the next number in the series is calculated by adding a fixed number to the previous number in the series. For example, 2, 4, 6, 8, 10 is an AP be... | [
{
"code": null,
"e": 25416,
"s": 25388,
"text": "\n29 Apr, 2021"
},
{
"code": null,
"e": 25856,
"s": 25416,
"text": "A sequence of numbers is called an Arithmetic progression if the difference between any two consecutive terms is always the same. In simple terms, it means that th... |
R - While Loop | The While loop executes the same code again and again until a stop condition is met.
The basic syntax for creating a while loop in R is −
while (test_expression) {
statement
}
Here key point of the while loop is that the loop might not ever run. When the condition is tested and the result is false, the loop body wi... | [
{
"code": null,
"e": 2487,
"s": 2402,
"text": "The While loop executes the same code again and again until a stop condition is met."
},
{
"code": null,
"e": 2540,
"s": 2487,
"text": "The basic syntax for creating a while loop in R is −"
},
{
"code": null,
"e": 2582,
... |
Implementing Web Scraping in Python with BeautifulSoup - GeeksforGeeks | 15 May, 2021
There are mainly two ways to extract data from a website:
Use the API of the website (if it exists). For example, Facebook has the Facebook Graph API which allows retrieval of data posted on Facebook.
Access the HTML of the webpage and extract useful information/data from it. This technique is called web s... | [
{
"code": null,
"e": 25140,
"s": 25112,
"text": "\n15 May, 2021"
},
{
"code": null,
"e": 25198,
"s": 25140,
"text": "There are mainly two ways to extract data from a website:"
},
{
"code": null,
"e": 25341,
"s": 25198,
"text": "Use the API of the website (if i... |
Program to find the sum of all digits of given number in Python | Suppose we have a number num, we have to find the sum of its digits. We have to solve it without using strings.
So, if the input is like num = 512, then the output will be 8, as 8 = 5 + 1 + 2.
tput will be 8, as 8 = 5 + 1 + 2.
To solve this, we will follow these steps −
sum:= 0
while num is not same as 0, dosum := sum ... | [
{
"code": null,
"e": 1174,
"s": 1062,
"text": "Suppose we have a number num, we have to find the sum of its digits. We have to solve it without using strings."
},
{
"code": null,
"e": 1255,
"s": 1174,
"text": "So, if the input is like num = 512, then the output will be 8, as 8 = ... |
SQL — Substring with Negative Indexing | by Deepak Khandelwal | Towards Data Science | In this post, I have discussed about one of the very important string related operations in SQL — SUBSTR with the application of negative indexing.
SUBSTR is used to extract the certain part of the given string from a given position. I have used SQLite-implementation of SUBSTR to illustrate the use of negative indexing... | [
{
"code": null,
"e": 320,
"s": 172,
"text": "In this post, I have discussed about one of the very important string related operations in SQL — SUBSTR with the application of negative indexing."
},
{
"code": null,
"e": 494,
"s": 320,
"text": "SUBSTR is used to extract the certain ... |
Predict Customer Churn using PySpark Machine Learning | by Marvin Lüthe | Towards Data Science | Predicting customer churn is a challenging and common problem that data scientists encounter these days. The ability to predict that a particular customer is at a high risk of churning, while there is still time to do something about it, represents a huge additional potential revenue source for every customer-facing bu... | [
{
"code": null,
"e": 499,
"s": 171,
"text": "Predicting customer churn is a challenging and common problem that data scientists encounter these days. The ability to predict that a particular customer is at a high risk of churning, while there is still time to do something about it, represents a huge... |
Categorical Data. Strategies for working with discrete... | by Dipanjan (DJ) Sarkar | Towards Data Science | We covered various feature engineering strategies for dealing with structured continuous numeric data in the previous article in this series. In this article, we will look at another type of structured data, which is discrete in nature and is popularly termed as categorical data. Dealing with numeric data is often easi... | [
{
"code": null,
"e": 920,
"s": 171,
"text": "We covered various feature engineering strategies for dealing with structured continuous numeric data in the previous article in this series. In this article, we will look at another type of structured data, which is discrete in nature and is popularly te... |
Guava - Multimap Interface | Multimap interface extends Map so that its keys can be mapped to multiple values at a time.
Following is the declaration for com.google.common.collect.Multimap<K,V> interface −
@GwtCompatible
public interface Multimap<K,V>
Map<K,Collection<V>> asMap()
Returns a view of this multimap as a Map from each distinct key to t... | [
{
"code": null,
"e": 1977,
"s": 1885,
"text": "Multimap interface extends Map so that its keys can be mapped to multiple values at a time."
},
{
"code": null,
"e": 2062,
"s": 1977,
"text": "Following is the declaration for com.google.common.collect.Multimap<K,V> interface −"
},... |
Angular CLI - ng add Command | This chapter explains the syntax, argument and options of ng add command along with an example.
The syntax for ng add command is as follows −
ng add <collection> [options]
ng add a npm package to workspace.
The argument for ng add command is as follows −
Options are optional parameters.
Shows a help message for this c... | [
{
"code": null,
"e": 2171,
"s": 2075,
"text": "This chapter explains the syntax, argument and options of ng add command along with an example."
},
{
"code": null,
"e": 2217,
"s": 2171,
"text": "The syntax for ng add command is as follows −"
},
{
"code": null,
"e": 224... |
Three Sum Closest | Practice | GeeksforGeeks | Given an array Arr of N numbers and another number target, find three integers in the array such that the sum is closest to target. Return the sum of the three integers.
Example 1:
Input:
N = 6, target = 2
A[] = {-7,9,8,3,1,1}
Output: 2
Explanation: There is one triplet with sum
2 in the array. Triplet elements are -7,... | [
{
"code": null,
"e": 408,
"s": 238,
"text": "Given an array Arr of N numbers and another number target, find three integers in the array such that the sum is closest to target. Return the sum of the three integers."
},
{
"code": null,
"e": 419,
"s": 408,
"text": "Example 1:"
},... |
How to create animation using XML file in an Android App? | This example demonstrates how do I create an animation using XML in an android app.
Step 1 − Create a new project in Android Studio, go to File ⇒ New Project and fill all required details to create a new project.
Step 2 − Add the following code to res/layout/activity_main.xml.
<?xml version="1.0" encoding="utf-8"?>
<Re... | [
{
"code": null,
"e": 1146,
"s": 1062,
"text": "This example demonstrates how do I create an animation using XML in an android app."
},
{
"code": null,
"e": 1275,
"s": 1146,
"text": "Step 1 − Create a new project in Android Studio, go to File ⇒ New Project and fill all required de... |
Find a specific column in all the tables in a database? | For this, use COLUMN_NAME and set LIKE with that specific column name. Let us find a specific column in an unknown table in a database −
mysql> SELECT TABLE_NAME, COLUMN_NAME, DATA_TYPE, IS_NULLABLE, COLUMN_DEFAULT
-> FROM INFORMATION_SCHEMA.COLUMNS
-> WHERE column_name LIKE '%StudentName%'
-> AND table_schema... | [
{
"code": null,
"e": 1199,
"s": 1062,
"text": "For this, use COLUMN_NAME and set LIKE with that specific column name. Let us find a specific column in an unknown table in a database −"
},
{
"code": null,
"e": 1392,
"s": 1199,
"text": "mysql> SELECT TABLE_NAME, COLUMN_NAME, DATA_T... |
How to get and store Device ID in Android? | This example demonstrates how do I get and store Device ID in android.
Step 1 − Create a new project in Android Studio, go to File ⇒ New Project and fill all required details to create a new project.
Step 2 − Add the following code to res/layout/activity_main.xml.
import android.provider.Settings;
import android.suppor... | [
{
"code": null,
"e": 1133,
"s": 1062,
"text": "This example demonstrates how do I get and store Device ID in android."
},
{
"code": null,
"e": 1262,
"s": 1133,
"text": "Step 1 − Create a new project in Android Studio, go to File ⇒ New Project and fill all required details to crea... |
JavaScript - Math floor Method | This method returns the largest integer less than or equal to a number.
Its syntax is as follows −
Math.floor( x ) ;
x − A numbers.
Returns the largest integer less than or equal to a number x.
Try the following example program.
<html>
<head>
<title>JavaScript Math floor() Method</title>
</head>
... | [
{
"code": null,
"e": 2538,
"s": 2466,
"text": "This method returns the largest integer less than or equal to a number."
},
{
"code": null,
"e": 2565,
"s": 2538,
"text": "Its syntax is as follows −"
},
{
"code": null,
"e": 2584,
"s": 2565,
"text": "Math.floor( ... |
JavaScript Date constructor Property | Javascript date constructor property returns a reference to the array function that created the instance's prototype.
Its syntax is as follows −
date.constructor
Returns the function that created this object's instance.
Try the following example.
<html>
<head>
<title>JavaScript Date constructor Property</titl... | [
{
"code": null,
"e": 2584,
"s": 2466,
"text": "Javascript date constructor property returns a reference to the array function that created the instance's prototype."
},
{
"code": null,
"e": 2611,
"s": 2584,
"text": "Its syntax is as follows −"
},
{
"code": null,
"e": ... |
Collections.binarySearch() in Java with Examples - GeeksforGeeks | 28 Jun, 2021
java.util.Collections.binarySearch() method is a java.util.Collections class method that returns position of an object in a sorted list.
// Returns index of key in sorted list sorted in
// ascending order
public static int binarySearch(List slist, T key)
// Returns index of key in sorted list sorted in
/... | [
{
"code": null,
"e": 23847,
"s": 23819,
"text": "\n28 Jun, 2021"
},
{
"code": null,
"e": 23985,
"s": 23847,
"text": "java.util.Collections.binarySearch() method is a java.util.Collections class method that returns position of an object in a sorted list. "
},
{
"code": nul... |
Android Hello World Example | The first step is to create a simple Android Application using Android Studio. Follow the option File -> New project ->Configure your new project -> selct factor your application is run on -> add activity ->Customise your activity -> and finally select finish wizard from the wizard list. Now name your application as H... | [
{
"code": null,
"e": 3974,
"s": 3607,
"text": "The first step is to create a simple Android Application using Android Studio. Follow the option File -> New project ->Configure your new project -> selct factor your application is run on -> add activity ->Customise your activity -> and finally select... |
How to check whether an array is empty using PHP? - GeeksforGeeks | 31 Jul, 2021
An empty array can sometimes cause software crash or unexpected outputs. To avoid this, it is better to check whether an array is empty or not beforehand. There are various methods and functions available in PHP to check whether the defined or given array is an empty or not. Some of them are given below:
U... | [
{
"code": null,
"e": 24450,
"s": 24422,
"text": "\n31 Jul, 2021"
},
{
"code": null,
"e": 24756,
"s": 24450,
"text": "An empty array can sometimes cause software crash or unexpected outputs. To avoid this, it is better to check whether an array is empty or not beforehand. There ar... |
Maximize the count of adjacent element pairs with even sum by rearranging the Array - GeeksforGeeks | 12 Jul, 2021
Given an array, arr[] of N integers, the task is to find the maximum possible count of adjacent pairs with an even sum, rearranging the array arr[].
Examples:
Input: arr[] = {5, 5, 1}Output: 2Explanation:The given array is already arranged to give the maximum count of adjacent pairs with an even sum.
{arr[... | [
{
"code": null,
"e": 24405,
"s": 24377,
"text": "\n12 Jul, 2021"
},
{
"code": null,
"e": 24554,
"s": 24405,
"text": "Given an array, arr[] of N integers, the task is to find the maximum possible count of adjacent pairs with an even sum, rearranging the array arr[]."
},
{
... |
Minimum operations required to make two numbers equal - GeeksforGeeks | 24 Nov, 2021
Given two integers A and B. the task is to find the minimum number of operations required to make A and B equal. In each operation, either of the below steps can be performed:
Increment either A or B with its initial value.
Increment both A and B with their initial value
Examples:
Input: A = 4, B = 10 ... | [
{
"code": null,
"e": 26057,
"s": 26029,
"text": "\n24 Nov, 2021"
},
{
"code": null,
"e": 26235,
"s": 26057,
"text": "Given two integers A and B. the task is to find the minimum number of operations required to make A and B equal. In each operation, either of the below steps can b... |
How to Iterate HashMap in Java? - GeeksforGeeks | 16 Oct, 2021
HashMap is a part of Java’s collection providing the basic implementation of the Map interface of Java by storing the data in (Key, Value) pairs to access them by an index of another type. One object is listed as a key (index) to another object (value). If you try to insert the duplicate key, it will repla... | [
{
"code": null,
"e": 25249,
"s": 25221,
"text": "\n16 Oct, 2021"
},
{
"code": null,
"e": 25712,
"s": 25249,
"text": "HashMap is a part of Java’s collection providing the basic implementation of the Map interface of Java by storing the data in (Key, Value) pairs to access them by ... |
Check if a large number is divisible by 25 or not - GeeksforGeeks | 15 Apr, 2021
Given a number, the task is to check if number is divisible by 25. The input number may be large and it may not be possible to store even if we use long long int.
Examples:
Input : n = 56945250
Output : Yes
Input : n = 1234567589333100
Output : Yes
Input : n = 3635883959606670431112222
Output : No
Si... | [
{
"code": null,
"e": 25962,
"s": 25934,
"text": "\n15 Apr, 2021"
},
{
"code": null,
"e": 26125,
"s": 25962,
"text": "Given a number, the task is to check if number is divisible by 25. The input number may be large and it may not be possible to store even if we use long long int."... |
Matplotlib.axes.Axes.boxplot() in Python - GeeksforGeeks | 13 Apr, 2020
Matplotlib is a library in Python and it is numerical – mathematical extension for NumPy library. Axes Class contains most of the figure elements: Axis, Tick, Line2D, Text, Polygon, etc., and sets the coordinate system. And the instances of Axes supports callbacks through a callbacks attribute.
The Axes.bo... | [
{
"code": null,
"e": 25537,
"s": 25509,
"text": "\n13 Apr, 2020"
},
{
"code": null,
"e": 25833,
"s": 25537,
"text": "Matplotlib is a library in Python and it is numerical – mathematical extension for NumPy library. Axes Class contains most of the figure elements: Axis, Tick, Line... |
How to convert JSON data to a html table using JavaScript/jQuery ? - GeeksforGeeks | 30 Sep, 2021
Given an HTML document containing JSON data and the task is to convert JSON data into a HTML table.
Approach 1:
Take the JSON Object in a variable.
Call a function which first adds the column names to the < table > element.(It is looking for the all columns, which is UNION of the column names).
Traverse ... | [
{
"code": null,
"e": 39241,
"s": 39213,
"text": "\n30 Sep, 2021"
},
{
"code": null,
"e": 39342,
"s": 39241,
"text": "Given an HTML document containing JSON data and the task is to convert JSON data into a HTML table. "
},
{
"code": null,
"e": 39355,
"s": 39342,
... |
jQuery | table2excel Plugin - GeeksforGeeks | 28 May, 2020
In the process of web design and development, taking regular backups is an important practice followed. jQuery provides table2excel plugin which helps to export HTML tables to excel (.xls) files.
Please download the required library files from the jQuery table2excel plugin and include it in your working fo... | [
{
"code": null,
"e": 26926,
"s": 26898,
"text": "\n28 May, 2020"
},
{
"code": null,
"e": 27122,
"s": 26926,
"text": "In the process of web design and development, taking regular backups is an important practice followed. jQuery provides table2excel plugin which helps to export HT... |
Python | fmod() function - GeeksforGeeks | 21 Sep, 2018
fmod() function is one of the Standard math library function in Python, which is used to calculate the Module of the specified given arguments.
Syntax: math.fmod( x, y )
Parameters:x any valid number (positive or negative).y any valid number(positive or negative).
Returns: Return a floating point number va... | [
{
"code": null,
"e": 25537,
"s": 25509,
"text": "\n21 Sep, 2018"
},
{
"code": null,
"e": 25681,
"s": 25537,
"text": "fmod() function is one of the Standard math library function in Python, which is used to calculate the Module of the specified given arguments."
},
{
"code... |
Underscore.js _.countBy Function - GeeksforGeeks | 24 Nov, 2021
The Underscore.js is a JavaScript library that provides a lot of useful functions that helps in the programming in a big way like the map, filter, invoke etc even without using any built-in objects.The _.countBy() function is used to sort a list into groups and returns a count for the number of objects in ... | [
{
"code": null,
"e": 26297,
"s": 26269,
"text": "\n24 Nov, 2021"
},
{
"code": null,
"e": 27003,
"s": 26297,
"text": "The Underscore.js is a JavaScript library that provides a lot of useful functions that helps in the programming in a big way like the map, filter, invoke etc even ... |
How to redirect a user to the registration if he has not logged in? - GeeksforGeeks | 04 Jul, 2021
Not all content on a website is accessible to all users. There exist some confidential content where only authorized members can access.When a user searches for an IEEE Paper, the IEEE.org displays only the abstract of the paper. To read the whole paper, according to the organization’s protocol user requir... | [
{
"code": null,
"e": 26217,
"s": 26189,
"text": "\n04 Jul, 2021"
},
{
"code": null,
"e": 26725,
"s": 26217,
"text": "Not all content on a website is accessible to all users. There exist some confidential content where only authorized members can access.When a user searches for an... |
How to change link color in CSS ? - GeeksforGeeks | 20 Jun, 2021
In HTML hyperlinks are added into the webpage by using the anchor tag <a>Name</a>. It creates the link navigate to another webpage from the current webpage.
The default HTML links are in blue color and when mouse hovered they get an underline. When the link is visited, it becomes violet. These default pro... | [
{
"code": null,
"e": 26621,
"s": 26593,
"text": "\n20 Jun, 2021"
},
{
"code": null,
"e": 26779,
"s": 26621,
"text": "In HTML hyperlinks are added into the webpage by using the anchor tag <a>Name</a>. It creates the link navigate to another webpage from the current webpage. "
},... |
How to find Nth smallest value in vector in R ? - GeeksforGeeks | 07 Apr, 2021
In this article, we will discuss how to find the Nth smallest in vector in the R programming language.
Create vector
Take input from the user using the function readline().
Convert data from string to int using the function as.integer().
In this step, we are finding nth largest number using
Syntax:
sort(ve... | [
{
"code": null,
"e": 26487,
"s": 26459,
"text": "\n07 Apr, 2021"
},
{
"code": null,
"e": 26590,
"s": 26487,
"text": "In this article, we will discuss how to find the Nth smallest in vector in the R programming language."
},
{
"code": null,
"e": 26604,
"s": 26590,
... |
Count Divisors of Factorial - GeeksforGeeks | 24 Sep, 2021
Given a number n, count the total number of divisors of n!.
Examples:
Input : n = 4Output: 8Explanation:4! is 24. Divisors of 24 are 1, 2, 3, 4, 6,8, 12 and 24.
Input : n = 5Output : 16Explanation:5! is 120. Divisors of 120 are 1, 2, 3, 4, 5, 6, 8, 10, 12, 15, 20, 24 30, 40, 60 and 12
A Simple Solution i... | [
{
"code": null,
"e": 26091,
"s": 26063,
"text": "\n24 Sep, 2021"
},
{
"code": null,
"e": 26151,
"s": 26091,
"text": "Given a number n, count the total number of divisors of n!."
},
{
"code": null,
"e": 26162,
"s": 26151,
"text": "Examples: "
},
{
"code... |
Perl | Reading Excel Files - GeeksforGeeks | 11 Jul, 2019
Excel sheets are one of the most commonly used methods for maintaining office records, especially to work on applications where non-developers and even managers can provide input to the systems in batches.
However, the issue is to read the content from a file created by Microsoft Excel using Perl.
Few modu... | [
{
"code": null,
"e": 25227,
"s": 25199,
"text": "\n11 Jul, 2019"
},
{
"code": null,
"e": 25433,
"s": 25227,
"text": "Excel sheets are one of the most commonly used methods for maintaining office records, especially to work on applications where non-developers and even managers ca... |
How to change selected value of a drop-down list using jQuery? - GeeksforGeeks | 03 Aug, 2021
With jQuery, it is easy to writing one line of code to change the selected value from a drop-down list. Suppose, you have a select element and you need to select one of its options based on one of its values. To achieve this feat you can use various methods, two of those methods will be explained below.
Us... | [
{
"code": null,
"e": 26412,
"s": 26384,
"text": "\n03 Aug, 2021"
},
{
"code": null,
"e": 26717,
"s": 26412,
"text": "With jQuery, it is easy to writing one line of code to change the selected value from a drop-down list. Suppose, you have a select element and you need to select o... |
Populating a Network Graph with Named-Entities | by Ednalyn C. De Dios | Towards Data Science | I do a lot of natural language processing and usually, the results are pretty boring to the eye. When I learned about network graphs, it got me thinking, why not use keywords as nodes and connect them together to create a network graph?
Yupp, why not!
In this post, we’ll do exactly that. We’re going to extract named-en... | [
{
"code": null,
"e": 284,
"s": 47,
"text": "I do a lot of natural language processing and usually, the results are pretty boring to the eye. When I learned about network graphs, it got me thinking, why not use keywords as nodes and connect them together to create a network graph?"
},
{
"code... |
Check whether the two numbers differ at one bit position only - GeeksforGeeks | 13 Apr, 2021
Given two non-negative integers a and b. The problem is to check whether the two numbers differ at one bit position only or not.Examples:
Input : a = 13, b = 9
Output : Yes
(13)10 = (1101)2
(9)10 = (1001)2
Both the numbers differ at one bit position only, i.e,
differ at the 3rd bit from the right.
Input... | [
{
"code": null,
"e": 25368,
"s": 25340,
"text": "\n13 Apr, 2021"
},
{
"code": null,
"e": 25508,
"s": 25368,
"text": "Given two non-negative integers a and b. The problem is to check whether the two numbers differ at one bit position only or not.Examples: "
},
{
"code": n... |
How to display a PDF as an image in React app using URL? - GeeksforGeeks | 13 Aug, 2020
If we use the fetch method then it will open a new window for displaying the PDF file and let users download the PDF. But if you don’t want that then there is a way to do so. You can use the package called react-pdf, by using this package you can render the PDF in your React app by using the PDF URL.
Prere... | [
{
"code": null,
"e": 26751,
"s": 26723,
"text": "\n13 Aug, 2020"
},
{
"code": null,
"e": 27053,
"s": 26751,
"text": "If we use the fetch method then it will open a new window for displaying the PDF file and let users download the PDF. But if you don’t want that then there is a wa... |
Angular 8 - Angular Components and Templates | As we learned earlier, Components are building block of Angular application. The main job of Angular Component is to generate a section of web page called view. Every component will have an associated template and it will be used to generate views.
Let us learn the basic concept of component and template in this chapte... | [
{
"code": null,
"e": 2637,
"s": 2388,
"text": "As we learned earlier, Components are building block of Angular application. The main job of Angular Component is to generate a section of web page called view. Every component will have an associated template and it will be used to generate views."
}... |
Subsets II in C++ | Suppose we have a set of numbers; we have to generate all possible subsets of that set. This is also known as power set. We have to keep in mind that the elements may be duplicate. So if the set is like [1,2,2], then the power set will be [[], [1], [2], [1,2], [2,2], [1,2,2]]
Let us see the steps −
Define one array res... | [
{
"code": null,
"e": 1339,
"s": 1062,
"text": "Suppose we have a set of numbers; we have to generate all possible subsets of that set. This is also known as power set. We have to keep in mind that the elements may be duplicate. So if the set is like [1,2,2], then the power set will be [[], [1], [2],... |
Count Pairs whose sum is equal to X | Practice | GeeksforGeeks | Given two linked list of size N1 and N2 respectively of distinct elements, your task is to complete the function countPairs(), which returns the count of all pairs from both lists whose sum is equal to the given value X.
Note: The 2 numbers of a pair should be parts of different lists.
Example 1:
Input:
L1 = 1->2->3->4... | [
{
"code": null,
"e": 525,
"s": 238,
"text": "Given two linked list of size N1 and N2 respectively of distinct elements, your task is to complete the function countPairs(), which returns the count of all pairs from both lists whose sum is equal to the given value X.\nNote: The 2 numbers of a pair sho... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.