title stringlengths 3 221 | text stringlengths 17 477k | parsed listlengths 0 3.17k |
|---|---|---|
Using OpenCV with Tkinter | Open CV is a Python library that is used to work with Computer Vision and other artificial artifacts. Open CV has inbuilt functions and methods which provide access to work with Computer Vision in Artificial Intelligence and Machine Learning. Some of the examples of Open CV are: face detection, object detection, X-ray ... | [
{
"code": null,
"e": 1409,
"s": 1062,
"text": "Open CV is a Python library that is used to work with Computer Vision and other artificial artifacts. Open CV has inbuilt functions and methods which provide access to work with Computer Vision in Artificial Intelligence and Machine Learning. Some of th... |
VBA - CDate Function | The Function converts a valid date and time expression to type date.
cdate(date)
Add a button and add the following function.
Private Sub Constant_demo_Click()
Dim a as Variant
Dim b as Variant
a = cdate("Jan 01 2020")
msgbox("The Value of a : " & a)
b = cdate("31 Dec 2050")
msgbox("The Value... | [
{
"code": null,
"e": 2004,
"s": 1935,
"text": "The Function converts a valid date and time expression to type date."
},
{
"code": null,
"e": 2017,
"s": 2004,
"text": "cdate(date)\n"
},
{
"code": null,
"e": 2062,
"s": 2017,
"text": "Add a button and add the fol... |
Java NIO - Datagram Channel | Java NIO Datagram is used as channel which can send and receive UDP packets over a connection less protocol.By default datagram channel is blocking while it can be use in non blocking mode.In order to make it non-blocking we can use the configureBlocking(false) method.DataGram channel can be open by calling its one of ... | [
{
"code": null,
"e": 2424,
"s": 1984,
"text": "Java NIO Datagram is used as channel which can send and receive UDP packets over a connection less protocol.By default datagram channel is blocking while it can be use in non blocking mode.In order to make it non-blocking we can use the configureBlockin... |
Bootstrap Glyphicons | Bootstrap provides 260 glyphicons from the Glyphicons
Halflings set.
Glyphicons can be used in text, buttons, toolbars, navigation, forms, etc.
Here are some examples of glyphicons:
Envelope glyphicon:
Print glyphicon:
Search glyphicon:
Download glyphicon:
A glyphicon is inserted with the following syntax:
The name... | [
{
"code": null,
"e": 69,
"s": 0,
"text": "Bootstrap provides 260 glyphicons from the Glyphicons\nHalflings set."
},
{
"code": null,
"e": 144,
"s": 69,
"text": "Glyphicons can be used in text, buttons, toolbars, navigation, forms, etc."
},
{
"code": null,
"e": 182,
... |
4 Reasons Why You Should Use Google Colab for Your Next Project | by Orhan G. Yalçın | Towards Data Science | Colaboratory, or Colab for short, is a Google Research product, which allows developers to write and execute Python code through their browser. Google Colab is an excellent tool for deep learning tasks. It is a hosted Jupyter notebook that requires no setup and has an excellent free version, which gives free access to ... | [
{
"code": null,
"e": 542,
"s": 172,
"text": "Colaboratory, or Colab for short, is a Google Research product, which allows developers to write and execute Python code through their browser. Google Colab is an excellent tool for deep learning tasks. It is a hosted Jupyter notebook that requires no set... |
How to display regression slope using model in a plot created by ggplot2 in R? | To display regression slope using model in a plot created by ggplot2, we can follow the below steps −
First of all, create the data frame.
Use annotate function of ggplot2 to create the scatterplot with regression slope displayed on the plot.
Check the regression slope.
Let's create a data frame as shown below −
Live ... | [
{
"code": null,
"e": 1164,
"s": 1062,
"text": "To display regression slope using model in a plot created by ggplot2, we can follow the below steps −"
},
{
"code": null,
"e": 1201,
"s": 1164,
"text": "First of all, create the data frame."
},
{
"code": null,
"e": 1305,
... |
DAX Math & Trigonometric - ROUND function | Rounds a number to the specified number of digits.
ROUND (<number>, <num_digits>)
number
The number you want to round.
num_digits
The number of digits to which you want to round.
A decimal number.
If num_digits > 0, then the number is rounded to the specified number of decimal places.
If num_digits > 0, then the numb... | [
{
"code": null,
"e": 2052,
"s": 2001,
"text": "Rounds a number to the specified number of digits."
},
{
"code": null,
"e": 2085,
"s": 2052,
"text": "ROUND (<number>, <num_digits>) \n"
},
{
"code": null,
"e": 2092,
"s": 2085,
"text": "number"
},
{
"code... |
Program for product of array | 26 May, 2022
Given an array, find a product of all array elements.Examples :
Input : ar[] = {1, 2, 3, 4, 5}
Output : 120
Product of array elements is 1 x 2
x 3 x 4 x 5 = 120.
Input : ar[] = {1, 6, 3}
Output : 18
C
Java
Python3
C#
PHP
Javascript
// C program to find product of array// elements.#include <stdio.h... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n26 May, 2022"
},
{
"code": null,
"e": 118,
"s": 52,
"text": "Given an array, find a product of all array elements.Examples : "
},
{
"code": null,
"e": 256,
"s": 118,
"text": "Input : ar[] = {1, 2, 3, 4, 5}\nOutput... |
Java String Class indent() Method With Examples | 13 Apr, 2021
JDK 12 introduced indent() method in Java.lang.String class. This method is useful to add or remove white spaces from the beginning of the line to adjust indentation for each string line.
Syntax:
public String indent(int n)
Parameter: It takes integer n as input and does indentation accordingly.
Also, eac... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n13 Apr, 2021"
},
{
"code": null,
"e": 216,
"s": 28,
"text": "JDK 12 introduced indent() method in Java.lang.String class. This method is useful to add or remove white spaces from the beginning of the line to adjust indentation for each ... |
Lexicographically smallest permutation with distinct elements using minimum replacements | 28 Apr, 2021
Given an array of n positive integers such that each element of an integer is from 1 to n. Find the lexicographically permutation that can be obtained by replacing minimum number of elements in array such that every element of array occurs exactly once in the entire array. First, print the minimum number o... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n28 Apr, 2021"
},
{
"code": null,
"e": 443,
"s": 52,
"text": "Given an array of n positive integers such that each element of an integer is from 1 to n. Find the lexicographically permutation that can be obtained by replacing minimum nu... |
Wand implode() function – Python | 25 Aug, 2021
The implode() function is an inbuilt function in the Python Wand ImageMagick library which is used to create a “imploding” effect by pulling pixels towards the center of the image.
Syntax:
implode(amount, method)
Parameters: This function accepts two parameters as mentioned above and defined below:
amou... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n25 Aug, 2021"
},
{
"code": null,
"e": 210,
"s": 28,
"text": "The implode() function is an inbuilt function in the Python Wand ImageMagick library which is used to create a “imploding” effect by pulling pixels towards the center of the i... |
Upsert in MongoDB | 30 Jun, 2022
In MongoDB, upsert is an option that is used for update operation e.g. update(), findAndModify(), etc. Or in other words, upsert is a combination of update and insert (update + insert = upsert). If the value of this option is set to true and the document or documents found that match the specified query, t... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n30 Jun, 2022"
},
{
"code": null,
"e": 810,
"s": 28,
"text": "In MongoDB, upsert is an option that is used for update operation e.g. update(), findAndModify(), etc. Or in other words, upsert is a combination of update and insert (update ... |
Rename the column name in R using Dplyr | 21 Jul, 2021
In this article, we are going to rename the column name using dplyr package in the R programming language.
Dataset in use:
This method is used to rename the columns in the dataframe
Syntax:
rename(dataframe,new_columnname=old_column,.............,name,new_columnname=old_columnname)
Where dataframe is the i... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n21 Jul, 2021"
},
{
"code": null,
"e": 135,
"s": 28,
"text": "In this article, we are going to rename the column name using dplyr package in the R programming language."
},
{
"code": null,
"e": 151,
"s": 135,
"text": ... |
Dijkstra’s shortest path with minimum edges | 16 May, 2022
Prerequisite: Dijkstra’s shortest path algorithm Given an adjacency matrix graph representing paths between the nodes in the given graph. The task is to find the shortest path with minimum edges i.e. if there a multiple short paths with same cost then choose the one with the minimum number of edges.Conside... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n16 May, 2022"
},
{
"code": null,
"e": 386,
"s": 52,
"text": "Prerequisite: Dijkstra’s shortest path algorithm Given an adjacency matrix graph representing paths between the nodes in the given graph. The task is to find the shortest pat... |
REST API (Introduction) | 08 Jun, 2022
Representational State Transfer (REST) is an architectural style that defines a set of constraints to be used for creating web services. REST API is a way of accessing web services in a simple and flexible way without having any processing.
REST technology is generally preferred to the more robust Simple O... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n08 Jun, 2022"
},
{
"code": null,
"e": 293,
"s": 52,
"text": "Representational State Transfer (REST) is an architectural style that defines a set of constraints to be used for creating web services. REST API is a way of accessing web se... |
Python – The new generation Language | 29 Jun, 2022
Python designed by Guido van Rossum at CWI has become a widely used general-purpose, high-level programming language.
Prerequisites:
Knowledge of any programming language can be a plus.
Reason for increasing popularity
Emphasis on code readability, shorter codes, ease of writingProgrammers can express logi... | [
{
"code": null,
"e": 53,
"s": 25,
"text": "\n29 Jun, 2022"
},
{
"code": null,
"e": 171,
"s": 53,
"text": "Python designed by Guido van Rossum at CWI has become a widely used general-purpose, high-level programming language."
},
{
"code": null,
"e": 186,
"s": 171,
... |
Creating a REST API Backend using Node.js, Express and Postgres | 09 May, 2022
JavaScript Backend can be developed using Node.js, Express, and Postgres. This backend can do Query operations on the PostgreSQL database and provide the status or data on the REST API.
Installation Requirement:
Node.js:Install the Node.js on WindowsInstall the Node.js on LinuxPostgreSQL:Install Postgres o... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n09 May, 2022"
},
{
"code": null,
"e": 214,
"s": 28,
"text": "JavaScript Backend can be developed using Node.js, Express, and Postgres. This backend can do Query operations on the PostgreSQL database and provide the status or data on the... |
How to join the elements of the byte slice in Golang? | 26 Aug, 2019
In Go language slice is more powerful, flexible, convenient than an array, and is a lightweight data structure. The slice is a variable-length sequence which stores elements of a similar type, you are not allowed to store different type of elements in the same slice.In the Go slice of bytes, you are allowe... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n26 Aug, 2019"
},
{
"code": null,
"e": 718,
"s": 28,
"text": "In Go language slice is more powerful, flexible, convenient than an array, and is a lightweight data structure. The slice is a variable-length sequence which stores elements o... |
reflect.TypeOf() Function in Golang with Examples | 28 Apr, 2020
Go language provides inbuilt support implementation of run-time reflection and allowing a program to manipulate objects with arbitrary types with the help of reflect package.The reflect.TypeOf() Function in Golang is used to get the reflection Type that represents the dynamic type of i. To access this func... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n28 Apr, 2020"
},
{
"code": null,
"e": 398,
"s": 28,
"text": "Go language provides inbuilt support implementation of run-time reflection and allowing a program to manipulate objects with arbitrary types with the help of reflect package.T... |
How to loop through input elements in jQuery ? | 01 Apr, 2021
In this article, we will learn how to loop through input elements and display their current values in jQuery. This can be done using two approaches:
Approach 1: In this approach, we will iterate over every input type which is of text type by using input[type=text] as the selector. Next, we will use the eac... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n01 Apr, 2021"
},
{
"code": null,
"e": 177,
"s": 28,
"text": "In this article, we will learn how to loop through input elements and display their current values in jQuery. This can be done using two approaches:"
},
{
"code": null... |
GATE | GATE-CS-2016 (Set 1) | Question 29 | 16 Sep, 2021
Consider the following code segment.
x = u - t;
y = x * v;
x = y + w;
y = t - z;
y = x * y;
The minimum number of total variables required to convert the above code segment to static single assignment form is
Note : This question was asked as Numerical Answer Type.(A) 6(B) 8(C) 9(D) 10Answer: (D)Explanat... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n16 Sep, 2021"
},
{
"code": null,
"e": 65,
"s": 28,
"text": "Consider the following code segment."
},
{
"code": null,
"e": 121,
"s": 65,
"text": "x = u - t;\ny = x * v;\nx = y + w;\ny = t - z;\ny = x * y; "
},
{
... |
PHP | Converting string to Date and DateTime | 31 Jul, 2021
Converting the string to Date and DateTime uses several functions/methods like strtotime(), getDate(). We will see what these functions do.strtotime() – This is basically a function which returns the number of seconds passed since Jan 1, 1970, just like a linux machine timestamp. It returns the number of s... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n31 Jul, 2021"
},
{
"code": null,
"e": 406,
"s": 28,
"text": "Converting the string to Date and DateTime uses several functions/methods like strtotime(), getDate(). We will see what these functions do.strtotime() – This is basically a fu... |
Data Structures and Algorithms | Set 35 | 03 Dec, 2015
Following questions have been asked in GATE CS 2014 exam.
1) The number of distinct minimum spanning trees for the weighted graph below is ____
Answer: 6Highlighted (in green) are the edges picked to make a MST. In the right side of MST, we could either pick edge ‘a’ or ‘b’. In the left side, we could eith... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n03 Dec, 2015"
},
{
"code": null,
"e": 110,
"s": 52,
"text": "Following questions have been asked in GATE CS 2014 exam."
},
{
"code": null,
"e": 196,
"s": 110,
"text": "1) The number of distinct minimum spanning tree... |
JavaFX | HBox Class | 07 Sep, 2018
HBox is a part of JavaFX. HBox lays out its children in form of horizontal columns. If the HBox has a border and/or padding set, then the contents will be layed out within those insets. HBox class extends Pane class.
Constructors of the class:
HBox(): Creates an HBox object with no nodes.
HBox(double s): C... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n07 Sep, 2018"
},
{
"code": null,
"e": 245,
"s": 28,
"text": "HBox is a part of JavaFX. HBox lays out its children in form of horizontal columns. If the HBox has a border and/or padding set, then the contents will be layed out within tho... |
Insightful Loan Default Analysis. Exploring and crunching out the driving... | by Sparsh Gupta | Towards Data Science | Lending Club is the largest online loan marketplace, facilitating personal loans, business loans, and financing of medical procedures. Borrowers can easily access lower interest rate loans through a fast online interface.
Like most other lending companies, lending loans to ‘risky’ applicants is the largest source of fi... | [
{
"code": null,
"e": 394,
"s": 172,
"text": "Lending Club is the largest online loan marketplace, facilitating personal loans, business loans, and financing of medical procedures. Borrowers can easily access lower interest rate loans through a fast online interface."
},
{
"code": null,
"... |
How to ignore the multiple properties of a JSON object in Java? | The @JsonIgnoreProperties Jackson annotation can be used to specify a list of properties or fields of a class to ignore. The @JsonIgnoreProperties
annotation can be placed above the class declaration instead of above the individual properties or fields to ignore.
@Target(value={ANNOTATION_TYPE,TYPE,METHOD,CONSTRUCTOR,F... | [
{
"code": null,
"e": 1326,
"s": 1062,
"text": "The @JsonIgnoreProperties Jackson annotation can be used to specify a list of properties or fields of a class to ignore. The @JsonIgnoreProperties\nannotation can be placed above the class declaration instead of above the individual properties or fields... |
Min and max values of an array in MongoDB? | To get the min and max values, use minandmax. Let us create a collection with documents −
> db.demo286.insertOne({"details":[{Value1:70,Value2:50},{Value1:30,Value2:36}]});
{
"acknowledged" : true,
"insertedId" : ObjectId("5e4ac743f49383b52759cbbc")
}
Display all documents from a collection with the help of find(... | [
{
"code": null,
"e": 1152,
"s": 1062,
"text": "To get the min and max values, use minandmax. Let us create a collection with documents −"
},
{
"code": null,
"e": 1320,
"s": 1152,
"text": "> db.demo286.insertOne({\"details\":[{Value1:70,Value2:50},{Value1:30,Value2:36}]});\n{\n ... |
Stars Charts in Python. A Tutorial to Create Star Charts using... | by Cody Glickman, PhD | Towards Data Science | Diamonds are a data scientist’s best friend. More specifically, the diamond dataset found on Kaggle. In this article, I will walk through a simple workflow to create a Star Chart (aka Spider Chart or Radar Charts). This tutorial was adapted from the wonderful workflow of Alex at Python Charts. All of the code in this a... | [
{
"code": null,
"e": 547,
"s": 172,
"text": "Diamonds are a data scientist’s best friend. More specifically, the diamond dataset found on Kaggle. In this article, I will walk through a simple workflow to create a Star Chart (aka Spider Chart or Radar Charts). This tutorial was adapted from the wonde... |
Java Program to Illustrate Use of Binary Literals - GeeksforGeeks | 09 Nov, 2020
A binary literal is a number that is represented in 0s and 1s (binary digits). Java allows you to express integral types (byte, short, int, and long) in a binary number system. To specify a binary literal, add the prefix 0b or 0B to the integral value. So, we can express binary digits in a program by assig... | [
{
"code": null,
"e": 23557,
"s": 23529,
"text": "\n09 Nov, 2020"
},
{
"code": null,
"e": 23974,
"s": 23557,
"text": "A binary literal is a number that is represented in 0s and 1s (binary digits). Java allows you to express integral types (byte, short, int, and long) in a binary n... |
How to find the number of distinct values in an R vector? | When we have repeated elements in an R vector and the vector size is large then we might want to know the distinct values in that vector. This will help us to understand the unique values we have in our vector, so that we can create the appropriate chart and perform the appropriate analysis using that vector. This can ... | [
{
"code": null,
"e": 1428,
"s": 1062,
"text": "When we have repeated elements in an R vector and the vector size is large then we might want to know the distinct values in that vector. This will help us to understand the unique values we have in our vector, so that we can create the appropriate char... |
Python | Binning method for data smoothing - GeeksforGeeks | 13 Apr, 2022
Prerequisite: ML | Binning or Discretization Binning method is used to smoothing data or to handle noisy data. In this method, the data is first sorted and then the sorted values are distributed into a number of buckets or bins. As binning methods consult the neighbourhood of values, they perform local smo... | [
{
"code": null,
"e": 23859,
"s": 23831,
"text": "\n13 Apr, 2022"
},
{
"code": null,
"e": 24227,
"s": 23859,
"text": "Prerequisite: ML | Binning or Discretization Binning method is used to smoothing data or to handle noisy data. In this method, the data is first sorted and then th... |
Train GPT-2 in your own language. A step-by-step guide to train your own... | by Arshabhi Kayal | Towards Data Science | We all know modern day Natural Language Processing (NLP) has progressed by leaps and bounds in the past couple of years following the development of attention networks and transformers. It paved the way for a plethora of new algorithms achieving State-Of-The-Art (SOTA) for the different tasks of NLP.
OpenAI has been on... | [
{
"code": null,
"e": 474,
"s": 172,
"text": "We all know modern day Natural Language Processing (NLP) has progressed by leaps and bounds in the past couple of years following the development of attention networks and transformers. It paved the way for a plethora of new algorithms achieving State-Of-... |
String compareToIgnoreCase() Method | This method compares two strings lexicographically, ignoring case differences.
Here is the syntax of this method −
int compareToIgnoreCase(String str)
Here is the detail of parameters −
str − the String to be compared.
str − the String to be compared.
This method returns a negative integer, zero, or a positive integer... | [
{
"code": null,
"e": 2456,
"s": 2377,
"text": "This method compares two strings lexicographically, ignoring case differences."
},
{
"code": null,
"e": 2492,
"s": 2456,
"text": "Here is the syntax of this method −"
},
{
"code": null,
"e": 2529,
"s": 2492,
"text... |
NLP Based Information Retrieval System | by Nikhil Sharma | Towards Data Science | In this post, we will understand how to build a recommendation system with text data. Here text data is comprised of scholarly articles about COVID-19, SARS-COV-2, and related coronaviruses. The dataset is known as CORD-19, prepared by the White House and a coalition of leading research groups. This freely available da... | [
{
"code": null,
"e": 893,
"s": 172,
"text": "In this post, we will understand how to build a recommendation system with text data. Here text data is comprised of scholarly articles about COVID-19, SARS-COV-2, and related coronaviruses. The dataset is known as CORD-19, prepared by the White House and... |
Maximum difference of zeros and ones in binary string | Practice | GeeksforGeeks | Given a binary string S consisting of 0s and 1s. The task is to find the maximum difference of the number of 0s and the number of 1s (number of 0s – number of 1s) in the substrings of a string.
Note: In the case of all 1s, the answer will be -1.
Example 1:
Input : S = "11000010001"
Output : 6
Explanatio: From index ... | [
{
"code": null,
"e": 432,
"s": 238,
"text": "Given a binary string S consisting of 0s and 1s. The task is to find the maximum difference of the number of 0s and the number of 1s (number of 0s – number of 1s) in the substrings of a string."
},
{
"code": null,
"e": 485,
"s": 432,
"... |
Collections.sort() in Java with Examples - GeeksforGeeks | 07 Dec, 2018
java.util.Collections.sort() method is present in java.util.Collections class. It is used to sort the elements present in the specified list of Collection in ascending order.It works similar to java.util.Arrays.sort() method but it is better then as it can sort the elements of Array as well as linked list,... | [
{
"code": null,
"e": 23873,
"s": 23845,
"text": "\n07 Dec, 2018"
},
{
"code": null,
"e": 24216,
"s": 23873,
"text": "java.util.Collections.sort() method is present in java.util.Collections class. It is used to sort the elements present in the specified list of Collection in ascen... |
GeeksforGeeks | A computer science portal for geeks | Events at GeeksforGeeks
Courses at GeeksforGeeks
Write an Article
Java Tutorial
Python Tutorial
Data Structures Tutorial
Coding Practice
Events at GeeksforGeeks
Courses at GeeksforGeeks
Write an Article
Java Tutorial
Python Tutorial
Data Structures... | [
{
"code": null,
"e": 21968,
"s": 21938,
"text": "\n\n\nEvents at GeeksforGeeks\n\n\n"
},
{
"code": null,
"e": 21999,
"s": 21968,
"text": "\n\n\nCourses at GeeksforGeeks\n\n\n"
},
{
"code": null,
"e": 22022,
"s": 21999,
"text": "\n\n\nWrite an Article\n\n\n"
... |
C# - Break Statement | The break statement in C# has following two usage −
When the break statement is encountered inside a loop, the loop is immediately terminated and program control resumes at the next statement following the loop.
When the break statement is encountered inside a loop, the loop is immediately terminated and program contro... | [
{
"code": null,
"e": 2322,
"s": 2270,
"text": "The break statement in C# has following two usage −"
},
{
"code": null,
"e": 2482,
"s": 2322,
"text": "When the break statement is encountered inside a loop, the loop is immediately terminated and program control resumes at the next ... |
Find specific records from a column with comma separated values in MySQL | For this, you can use FIND_IN_SET(). Let us first create a table −
mysql> create table DemoTable
-> (
-> ListOfValue varchar(20)
-> );
Query OK, 0 rows affected (0.52 sec)
Insert some records in the table using insert command −
mysql> insert into DemoTable values('78,89,65');
Query OK, 1 row affected (0.12 sec... | [
{
"code": null,
"e": 1129,
"s": 1062,
"text": "For this, you can use FIND_IN_SET(). Let us first create a table −"
},
{
"code": null,
"e": 1243,
"s": 1129,
"text": "mysql> create table DemoTable\n -> (\n -> ListOfValue varchar(20)\n -> );\nQuery OK, 0 rows affected (0.52 se... |
Check whether the Average Character of the String is present or not - GeeksforGeeks | 05 Apr, 2019
Given a string of alphanumeric characters, the task is to check whether the average character of the string is present or not. Average character refers to the character corresponding to the ASCII value which is the floor of the average value of the ASCII values of all characters in the string.
Examples:
In... | [
{
"code": null,
"e": 24150,
"s": 24122,
"text": "\n05 Apr, 2019"
},
{
"code": null,
"e": 24445,
"s": 24150,
"text": "Given a string of alphanumeric characters, the task is to check whether the average character of the string is present or not. Average character refers to the char... |
What is the character wrapper class and its methods in Java? | The Character class of the java.lang package wraps a value of the primitive datatype char. It offers a number of useful class (i.e., static) methods for manipulating characters. You can create a Character object with the Character constructor.
Character ch = new Character('a');
Following are the notable methods of the... | [
{
"code": null,
"e": 1306,
"s": 1062,
"text": "The Character class of the java.lang package wraps a value of the primitive datatype char. It offers a number of useful class (i.e., static) methods for manipulating characters. You can create a Character object with the Character constructor."
},
{... |
Check for Balanced Tree | Practice | GeeksforGeeks | Given a binary tree, find if it is height balanced or not.
A tree is height balanced if difference between heights of left and right subtrees is not more than one for all nodes of tree.
A height balanced tree
1
/ \
10 39
/
5
An unbalanced tree
1
/
10
/
5
Example 1:
... | [
{
"code": null,
"e": 426,
"s": 238,
"text": "Given a binary tree, find if it is height balanced or not. \nA tree is height balanced if difference between heights of left and right subtrees is not more than one for all nodes of tree. "
},
{
"code": null,
"e": 492,
"s": 426,
"text"... |
Setup Web Server Over Docker Container in Linux - GeeksforGeeks | 04 May, 2020
Before setting up a server we must know the real meaning or definition of a server. So, the Server is a program that provides the client with any kind of services. For example, a web server provides our websites, a database server provides us data. This means every server has work to do and for every diffe... | [
{
"code": null,
"e": 25831,
"s": 25803,
"text": "\n04 May, 2020"
},
{
"code": null,
"e": 26307,
"s": 25831,
"text": "Before setting up a server we must know the real meaning or definition of a server. So, the Server is a program that provides the client with any kind of services.... |
A Protocol Using Selective Repeat | Selective repeat protocol, also called Selective Repeat ARQ (Automatic Repeat reQuest), is a data link layer protocol that uses sliding window method for reliable delivery of data frames. Here, only the erroneous or lost frames are retransmitted, while the good frames are received and buffered.
It uses two windows of e... | [
{
"code": null,
"e": 1358,
"s": 1062,
"text": "Selective repeat protocol, also called Selective Repeat ARQ (Automatic Repeat reQuest), is a data link layer protocol that uses sliding window method for reliable delivery of data frames. Here, only the erroneous or lost frames are retransmitted, while ... |
How to print "GeeksforGeeks" with empty main() in C, C++ and Java? - GeeksforGeeks | 25 Jul, 2017
Write a program that prints “GeeksforGeeks” with empty main() function. You are not allowed to write anything in main().
C language
One way of doing this is to apply GCC constructor attribute to a function so that it executes before main() (See this for details).#include <stdio.h> /* Apply the constructor... | [
{
"code": null,
"e": 26975,
"s": 26947,
"text": "\n25 Jul, 2017"
},
{
"code": null,
"e": 27096,
"s": 26975,
"text": "Write a program that prints “GeeksforGeeks” with empty main() function. You are not allowed to write anything in main()."
},
{
"code": null,
"e": 27107... |
How to convert a decimal number to roman using JavaScript? | To convert a decimal number to roman, try to run the following JavaScript code −
Live Demo
<!DOCTYPE html>
<html>
<body>
<script>
// roman numeral
var romanNum = new Array();
romanNum = ["M","CM","D","CD","C","XC","L","XL","X","IX","V","IV","I"];
// decimal number
v... | [
{
"code": null,
"e": 1143,
"s": 1062,
"text": "To convert a decimal number to roman, try to run the following JavaScript code −"
},
{
"code": null,
"e": 1153,
"s": 1143,
"text": "Live Demo"
},
{
"code": null,
"e": 2051,
"s": 1153,
"text": "<!DOCTYPE html>\n<ht... |
Distributed Component Object Model (DCOM) - GeeksforGeeks | 22 Jul, 2020
In the last two decades, a massive range of modifications took place in an object-oriented and distributed component-oriented paradigm. To fulfill this demand, Microsoft developed Distributed Component Object Model. DCOM can be defined as COM with inclusion of a long wire and this is an extension to Compon... | [
{
"code": null,
"e": 25893,
"s": 25865,
"text": "\n22 Jul, 2020"
},
{
"code": null,
"e": 26326,
"s": 25893,
"text": "In the last two decades, a massive range of modifications took place in an object-oriented and distributed component-oriented paradigm. To fulfill this demand, Mic... |
Android - Date Picker | Android Date Picker allows you to select the date consisting of day, month and year in your custom user interface. For this functionality android provides DatePicker and DatePickerDialog components.
In this tutorial, we are going to demonstrate the use of Date Picker through DatePickerDialog. DatePickerDialog is a simp... | [
{
"code": null,
"e": 3806,
"s": 3607,
"text": "Android Date Picker allows you to select the date consisting of day, month and year in your custom user interface. For this functionality android provides DatePicker and DatePickerDialog components."
},
{
"code": null,
"e": 3960,
"s": 38... |
Minimum jumps required to reach all array elements using largest element - GeeksforGeeks | 14 Jan, 2022
Given an array arr[] of N distinct integer, the task is to find the minimum number of jumps required from the largest element to reach all array elements such that a jump is possible from the ith element to the jth element if the value of arr[i] is greater than arr[j] and value of arr[j] is greater than al... | [
{
"code": null,
"e": 25178,
"s": 25150,
"text": "\n14 Jan, 2022"
},
{
"code": null,
"e": 25535,
"s": 25178,
"text": "Given an array arr[] of N distinct integer, the task is to find the minimum number of jumps required from the largest element to reach all array elements such that... |
Plotting at full resolution with matplotlib.pyplot, imshow() and savefig() | To plot at full resolution with matplotlib.pyplot, imshow() and savefig(), we can keep the dpi value from 600 to 1200.
Set the figure size and adjust the padding between and around the subplots.
Set random values in a given shape.
Display the data as an image, i.e., on a 2D regular raster
Save the figure with 1200 dpi.... | [
{
"code": null,
"e": 1181,
"s": 1062,
"text": "To plot at full resolution with matplotlib.pyplot, imshow() and savefig(), we can keep the dpi value from 600 to 1200."
},
{
"code": null,
"e": 1257,
"s": 1181,
"text": "Set the figure size and adjust the padding between and around t... |
Introducing End-to-End Interpolation of Time Series Data in Apache PySpark | by Jessica Walkenhorst | Towards Data Science | Anyone working with data knows that real-world data is often patchy and cleaning it takes up a considerable amount of your time (80/20 rule anyone?). Having recently moved from Pandas to Pyspark, I was used to the conveniences that Pandas offers and that Pyspark sometimes lacks due to its distributed nature. One of the... | [
{
"code": null,
"e": 1319,
"s": 172,
"text": "Anyone working with data knows that real-world data is often patchy and cleaning it takes up a considerable amount of your time (80/20 rule anyone?). Having recently moved from Pandas to Pyspark, I was used to the conveniences that Pandas offers and that... |
Count number of increasing sub-sequences : O(NlogN) - GeeksforGeeks | 12 May, 2021
Given an array arr[] of length N, the task is to find the number of strictly increasing sub-sequences in the given array.
Examples:
Input: arr[] = {1, 2, 3} Output: 7 All increasing sub-sequences will be: 1) {1} 2) {2} 3) {3} 4) {1, 2} 5) {1, 3} 6) {2, 3} 7) {1, 2, 3} Thus, answer = 7Input: arr[] = {3, 2... | [
{
"code": null,
"e": 24406,
"s": 24378,
"text": "\n12 May, 2021"
},
{
"code": null,
"e": 24528,
"s": 24406,
"text": "Given an array arr[] of length N, the task is to find the number of strictly increasing sub-sequences in the given array."
},
{
"code": null,
"e": 2454... |
Optimal Cost Binary Search Trees | A Binary Search Tree (BST) is a tree where the key values are stored in the internal nodes. The external nodes are null nodes. The keys are ordered lexicographically, i.e. for each internal node all the keys in the left sub-tree are less than the keys in the node, and all the keys in the right sub-tree are greater.
Whe... | [
{
"code": null,
"e": 2916,
"s": 2599,
"text": "A Binary Search Tree (BST) is a tree where the key values are stored in the internal nodes. The external nodes are null nodes. The keys are ordered lexicographically, i.e. for each internal node all the keys in the left sub-tree are less than the keys i... |
AKTU 1st Year Sem 1 Solved Paper 2017-18 | COMP. SYSTEM & C PROGRAMMING | Sec B - GeeksforGeeks | 30 Jan, 2019
Paper download link: Paper | Sem 1 | 2017-18
Time: 3hrsTotal Marks: 100
Note:-
There are three sections. Section A carries 20 marks, Section B carries 30 marks and Section C carries 50 marks.
Attempt all questions. Marks are indicated against each question.
Assume suitable data wherever necessary.
What is ... | [
{
"code": null,
"e": 25399,
"s": 25371,
"text": "\n30 Jan, 2019"
},
{
"code": null,
"e": 25444,
"s": 25399,
"text": "Paper download link: Paper | Sem 1 | 2017-18"
},
{
"code": null,
"e": 25471,
"s": 25444,
"text": "Time: 3hrsTotal Marks: 100"
},
{
"cod... |
Bot realtime object detection in Overwatch on Ubuntu 18.04 | by Dmitriy Kisil | Towards Data Science | For doing that, ensure that you have installed Tensorflow. Preferably with GPU support for more speedup. Without that you will have smaller fps, training the model will take a fair amount of time and realtime performance may be not achievable.
Part1: Install Overwatch on Ubuntu 18.04
After few unsuccessfull attempts to... | [
{
"code": null,
"e": 416,
"s": 172,
"text": "For doing that, ensure that you have installed Tensorflow. Preferably with GPU support for more speedup. Without that you will have smaller fps, training the model will take a fair amount of time and realtime performance may be not achievable."
},
{
... |
C++ Data Types | Practice | GeeksforGeeks | Read a value and store it in the appropriate C++ Data Type.
Example 1:
Input:
2 h 2.555
Output:
2
h
2.555
Explanation:
The three inputs are printed in order.
Your Task:
Your task is to complete each of the given functions
cppIntType() : read an integer input, store it in appropriate data type and return it.
cpp... | [
{
"code": null,
"e": 287,
"s": 226,
"text": "Read a value and store it in the appropriate C++ Data Type. "
},
{
"code": null,
"e": 298,
"s": 287,
"text": "Example 1:"
},
{
"code": null,
"e": 388,
"s": 298,
"text": "Input: \n2 h 2.555\nOutput:\n2\nh\n2.555 \nEx... |
Indonesia’s Poverty Profile. Exploration of Indonesia County Level... | by Redi Sunarta | Towards Data Science | The issue of poverty has always been one of the main topics of discussion in various economic and social forums. Poverty is considered a serious problem and must be resolved because it has a high social cost. Poverty itself is usually defined as the inability of an individual to meet basic needs in the form of goods, s... | [
{
"code": null,
"e": 582,
"s": 172,
"text": "The issue of poverty has always been one of the main topics of discussion in various economic and social forums. Poverty is considered a serious problem and must be resolved because it has a high social cost. Poverty itself is usually defined as the inabi... |
Python String Methods. A summary of the most commonly used... | by Robert Alterman | Towards Data Science | In Python, data in text form is known as a string. To designate data as a string, the text must be surrounded by single (‘ ’) or double (“ ”) quotes. Names, locations, objects, sentences, even numbers can be strings, as long as they are surrounded by quotes. Once you have a string, you are able to manipulate that strin... | [
{
"code": null,
"e": 872,
"s": 47,
"text": "In Python, data in text form is known as a string. To designate data as a string, the text must be surrounded by single (‘ ’) or double (“ ”) quotes. Names, locations, objects, sentences, even numbers can be strings, as long as they are surrounded by quote... |
Java & MySQL - PreparedStatement | The PreparedStatement interface extends the Statement interface, which gives you added functionality with a couple of advantages over a generic Statement object.
This statement gives you the flexibility of supplying arguments dynamically.
PreparedStatement pstmt = null;
try {
String SQL = "Update Employees SET age =... | [
{
"code": null,
"e": 2848,
"s": 2686,
"text": "The PreparedStatement interface extends the Statement interface, which gives you added functionality with a couple of advantages over a generic Statement object."
},
{
"code": null,
"e": 2925,
"s": 2848,
"text": "This statement gives... |
How to Get the Descriptive Statistics for Pandas DataFrame? - GeeksforGeeks | 10 Jul, 2020
describe() method in Python Pandas is used to compute descriptive statistical data like count, unique values, mean, standard deviation, minimum and maximum value and many more. In this article, let’s learn to get the descriptive statistics for Pandas DataFrame.
Syntax:df[‘cname’].describe(percentiles = Non... | [
{
"code": null,
"e": 25061,
"s": 25033,
"text": "\n10 Jul, 2020"
},
{
"code": null,
"e": 25323,
"s": 25061,
"text": "describe() method in Python Pandas is used to compute descriptive statistical data like count, unique values, mean, standard deviation, minimum and maximum value a... |
Text Classification with BERT in PyTorch | by Ruben Winastwan | Towards Data Science | Back in 2018, Google developed a powerful Transformer-based machine learning model for NLP applications that outperforms previous language models in different benchmark datasets. And this model is called BERT.
In this post, we’re going to use a pre-trained BERT model from Hugging Face for a text classification task. As... | [
{
"code": null,
"e": 382,
"s": 172,
"text": "Back in 2018, Google developed a powerful Transformer-based machine learning model for NLP applications that outperforms previous language models in different benchmark datasets. And this model is called BERT."
},
{
"code": null,
"e": 641,
... |
Sum of upper and lower triangles | Practice | GeeksforGeeks | Given a square matrix of size N*N, print the sum of upper and lower triangular elements. Upper Triangle consists of elements on the diagonal and above it. The lower triangle consists of elements on the diagonal and below it.
Example 1:
Input:
N = 3
mat[][] = {{6, 5, 4},
{1, 2, 5}
{7, 9, 7}}
Out... | [
{
"code": null,
"e": 464,
"s": 226,
"text": "Given a square matrix of size N*N, print the sum of upper and lower triangular elements. Upper Triangle consists of elements on the diagonal and above it. The lower triangle consists of elements on the diagonal and below it. \n\nExample 1:"
},
{
"... |
Circular queues-Insertion and deletion operations in C++ | A queue is an abstract data structure that contains a collection of elements. Queue implements the FIFO mechanism i.e the element that is inserted first is also deleted first.
Queue cane be one linear data structure. But it may create some problem if we implement queue using array. Sometimes by using some consecutive i... | [
{
"code": null,
"e": 1238,
"s": 1062,
"text": "A queue is an abstract data structure that contains a collection of elements. Queue implements the FIFO mechanism i.e the element that is inserted first is also deleted first."
},
{
"code": null,
"e": 1697,
"s": 1238,
"text": "Queue ... |
How to apply a tag to the azure resource group using PowerShell? | Like Azure VM, we can apply the azure tags to the resource group or any other resources. The tagging works on the resource ID and in azure, all the resources come with the resource ID property.
To apply the tag to the azure resource group, we first need to use get the resource group details to use its resource ID. The ... | [
{
"code": null,
"e": 1256,
"s": 1062,
"text": "Like Azure VM, we can apply the azure tags to the resource group or any other resources. The tagging works on the resource ID and in azure, all the resources come with the resource ID property."
},
{
"code": null,
"e": 1462,
"s": 1256,
... |
close() - Unix, Linux System Call | Unix - Home
Unix - Getting Started
Unix - File Management
Unix - Directories
Unix - File Permission
Unix - Environment
Unix - Basic Utilities
Unix - Pipes & Filters
Unix - Processes
Unix - Communication
Unix - The vi Editor
Unix - What is Shell?
Unix - Using Variables
Unix - Special Variables
Unix - Using Arrays
Unix -... | [
{
"code": null,
"e": 1466,
"s": 1454,
"text": "Unix - Home"
},
{
"code": null,
"e": 1489,
"s": 1466,
"text": "Unix - Getting Started"
},
{
"code": null,
"e": 1512,
"s": 1489,
"text": "Unix - File Management"
},
{
"code": null,
"e": 1531,
"s": 1... |
Spring - Logging with Log4J | This is a very easy-to-use Log4J functionality inside Spring applications. The following example will take you through simple steps to explain the simple integration between Log4J and Spring.
We assume you already have log4J installed on your machine. If you do not have it then you can download it from https://logging.... | [
{
"code": null,
"e": 2484,
"s": 2292,
"text": "This is a very easy-to-use Log4J functionality inside Spring applications. The following example will take you through simple steps to explain the simple integration between Log4J and Spring."
},
{
"code": null,
"e": 2723,
"s": 2484,
... |
Django - Sitemap Framework - GeeksforGeeks | 04 Jul, 2021
Prerequisites: Django Introduction and Installation
Search-Engines crawls and indexes the site’s URLs to show them in their search results. Search-Engines recommend the explicit submission of an XML file consisting of all the important and updated URLs of your site for faster crawling and indexing. Django... | [
{
"code": null,
"e": 23901,
"s": 23873,
"text": "\n04 Jul, 2021"
},
{
"code": null,
"e": 23954,
"s": 23901,
"text": "Prerequisites: Django Introduction and Installation "
},
{
"code": null,
"e": 24336,
"s": 23954,
"text": "Search-Engines crawls and indexes the... |
Program to find maximum product of contiguous subarray in Python | Suppose we have an array called nums, we have to find the product of elements of a contiguous subarray within an array (containing at least one number) which has the largest
product. So if the array is [1,9,2,0,2,5], the output will be 18, as contiguous subarray [1,9,2] has max product.
To solve this, we will follow th... | [
{
"code": null,
"e": 1350,
"s": 1062,
"text": "Suppose we have an array called nums, we have to find the product of elements of a contiguous subarray within an array (containing at least one number) which has the largest\nproduct. So if the array is [1,9,2,0,2,5], the output will be 18, as contiguou... |
Tips for Data Mapping and Replacing with Pandas and NumPy | by Chi Nguyen | Towards Data Science | In order to summarize main characteristics, spot anomalies, and visualize information, you should know how to rearrange and transform datasets. In other words, transforming data helps you play with your dataset, make sense of it, and gather as many insights as you can. In this article, I will show you some of my common... | [
{
"code": null,
"e": 559,
"s": 172,
"text": "In order to summarize main characteristics, spot anomalies, and visualize information, you should know how to rearrange and transform datasets. In other words, transforming data helps you play with your dataset, make sense of it, and gather as many insigh... |
ELMo: Contextual language embedding | by Josh Taylor | Towards Data Science | This article will explore the latest in natural language modelling; deep contextualised word embeddings. The focus is more practical than theoretical with a worked example of how you can use the state-of-the-art ELMo model to review sentence similarity in a given document as well as creating a simple semantic search en... | [
{
"code": null,
"e": 553,
"s": 171,
"text": "This article will explore the latest in natural language modelling; deep contextualised word embeddings. The focus is more practical than theoretical with a worked example of how you can use the state-of-the-art ELMo model to review sentence similarity in... |
How a Preprocessor works in C/C++? | Here we will see how the preprocessors are working in C or C++. Let us see what are the preprocessors.
The preprocessors are the directives, which give instructions to the compiler to preprocess the information before actual compilation starts.
All preprocessor directives begin with #, and only white-space characters m... | [
{
"code": null,
"e": 1165,
"s": 1062,
"text": "Here we will see how the preprocessors are working in C or C++. Let us see what are the preprocessors."
},
{
"code": null,
"e": 1307,
"s": 1165,
"text": "The preprocessors are the directives, which give instructions to the compiler t... |
Flutter - Database Concepts | Flutter provides many advanced packages to work with databases. The most important packages are −
sqflite − Used to access and manipulate SQLite database, and
sqflite − Used to access and manipulate SQLite database, and
firebase_database − Used to access and manipulate cloud hosted NoSQL database from Google.
firebase_... | [
{
"code": null,
"e": 2316,
"s": 2218,
"text": "Flutter provides many advanced packages to work with databases. The most important packages are −"
},
{
"code": null,
"e": 2377,
"s": 2316,
"text": "sqflite − Used to access and manipulate SQLite database, and"
},
{
"code": n... |
How to remove specific characters from a string in Python? | The string class has a method replace that can be used to replace substrings in a string. We can use this method to replace characters we want to remove with an empty string. For example:
>>> "Hello people".replace("e", "")
"Hllo popl"
If you want to remove multiple characters from a string in a single line, it's bette... | [
{
"code": null,
"e": 1250,
"s": 1062,
"text": "The string class has a method replace that can be used to replace substrings in a string. We can use this method to replace characters we want to remove with an empty string. For example:"
},
{
"code": null,
"e": 1298,
"s": 1250,
"te... |
Split single column into multiple columns in PySpark DataFrame - GeeksforGeeks | 09 May, 2021
pyspark.sql.functions provide a function split() which is used to split DataFrame string Column into multiple columns.
Syntax: pyspark.sql.functions.split(str, pattern, limit=- 1)
Parameters:
str: str is a Column or str to split.
pattern: It is a str parameter, a string that represents a regular expressi... | [
{
"code": null,
"e": 23901,
"s": 23873,
"text": "\n09 May, 2021"
},
{
"code": null,
"e": 24021,
"s": 23901,
"text": "pyspark.sql.functions provide a function split() which is used to split DataFrame string Column into multiple columns. "
},
{
"code": null,
"e": 24083,... |
How to use $ifNull with MongoDB aggregation? | The $ifNull evaluates an expression and returns the value of the expression if the expression evaluates to a non-null value.
Let us first create a collection with documents −
> db.demo372.insertOne({"FirstName":"Chris"});
{
"acknowledged" : true,
"insertedId" : ObjectId("5e591aea2ae06a1609a00af6")
}
> db.demo372.... | [
{
"code": null,
"e": 1187,
"s": 1062,
"text": "The $ifNull evaluates an expression and returns the value of the expression if the expression evaluates to a non-null value."
},
{
"code": null,
"e": 1237,
"s": 1187,
"text": "Let us first create a collection with documents −"
},
... |
Count of numbers in Array ending with digits of number N - GeeksforGeeks | 10 May, 2021
Given a number N and an array arr[] consisting of K numbers, the task is to find the count of numbers in the array which ends with any of the digit present in the number N.
Examples:
Input: N = 1731 arr[] = {57, 6786} Output: 1 Explanation: For 57, the last digit is 7 and since 7 is present is N, so the... | [
{
"code": null,
"e": 24796,
"s": 24768,
"text": "\n10 May, 2021"
},
{
"code": null,
"e": 24970,
"s": 24796,
"text": "Given a number N and an array arr[] consisting of K numbers, the task is to find the count of numbers in the array which ends with any of the digit present in the ... |
How to convert a value to a string in JavaScript? | There are 5 ways to convert a value to a string. They are
Concatenating empty strings
Concatenating empty strings
Template strings
Template strings
JSON. stringify
JSON. stringify
toString()
toString()
String()
String()
In the following example, all the above-mentioned methods were used to convert a value to a str... | [
{
"code": null,
"e": 1121,
"s": 1062,
"text": "There are 5 ways to convert a value to a string. They are "
},
{
"code": null,
"e": 1149,
"s": 1121,
"text": "Concatenating empty strings"
},
{
"code": null,
"e": 1177,
"s": 1149,
"text": "Concatenating empty stri... |
Validate Binary Search Tree in Python | Suppose we have a binary tree, determine to check whether it is a valid binary search tree (BST) or not. Assume a BST is defined as follows –
The left subtree of a node holds only nodes with keys smaller than the node's key.
The right subtree of a node holds only nodes with keys larger than the node's key.
Both the lef... | [
{
"code": null,
"e": 1204,
"s": 1062,
"text": "Suppose we have a binary tree, determine to check whether it is a valid binary search tree (BST) or not. Assume a BST is defined as follows –"
},
{
"code": null,
"e": 1287,
"s": 1204,
"text": "The left subtree of a node holds only no... |
Angular Material 7 - DatePicker | The <mat-datepicker>, an Angular Directive, is used to create a datepicker control using which date can be selected from a calendar or can be input directly using input box.
In this chapter, we will showcase the configuration required to draw a datepicker control using Angular Material.
Follow the following steps to up... | [
{
"code": null,
"e": 2929,
"s": 2755,
"text": "The <mat-datepicker>, an Angular Directive, is used to create a datepicker control using which date can be selected from a calendar or can be input directly using input box."
},
{
"code": null,
"e": 3043,
"s": 2929,
"text": "In this ... |
Difference between next() and hasNext() in java collections? | Java provides Iterator and ListIterator classes to retrieve the elements of the collection objects.
The hasNext() method of these interfaces returns true if the collection object has the next element else it returns false.
Live Demo
import java.util.ArrayList;
import java.util.Iterator;
public class hasNextExample{
... | [
{
"code": null,
"e": 1162,
"s": 1062,
"text": "Java provides Iterator and ListIterator classes to retrieve the elements of the collection objects."
},
{
"code": null,
"e": 1285,
"s": 1162,
"text": "The hasNext() method of these interfaces returns true if the collection object has... |
Can we have a return statement in the catch or, finally blocks in Java? | Yes, we can write a return statement of the method in catch and finally block.
There is a situation where a method will have a return type and we can return some value at any part of the method based on the conditions.
If we return a value in the catch block and we can return a value at the end of the method, the code ... | [
{
"code": null,
"e": 1141,
"s": 1062,
"text": "Yes, we can write a return statement of the method in catch and finally block."
},
{
"code": null,
"e": 1281,
"s": 1141,
"text": "There is a situation where a method will have a return type and we can return some value at any part of... |
Node.js - Web Module | A Web Server is a software application which handles HTTP requests sent by the HTTP client, like web browsers, and returns web pages in response to the clients. Web servers usually deliver html documents along with images, style sheets, and scripts.
Most of the web servers support server-side scripts, using scripting l... | [
{
"code": null,
"e": 2268,
"s": 2018,
"text": "A Web Server is a software application which handles HTTP requests sent by the HTTP client, like web browsers, and returns web pages in response to the clients. Web servers usually deliver html documents along with images, style sheets, and scripts."
... |
Project Idea | Smart Elevator | 07 Feb, 2018
Introduction:
Nowadays, in large buildings, the conventional elevators have higher waiting time, higher traveling time, more power consumption. So there is a need to develop an algorithm which reduces the above problems. I have done this project as in intern at Smartron. I have developed an algorithm which... | [
{
"code": null,
"e": 54,
"s": 26,
"text": "\n07 Feb, 2018"
},
{
"code": null,
"e": 68,
"s": 54,
"text": "Introduction:"
},
{
"code": null,
"e": 416,
"s": 68,
"text": "Nowadays, in large buildings, the conventional elevators have higher waiting time, higher tra... |
Parameters for Feature Selection | 29 Apr, 2018
Prerequisite : Introduction to Dimensionality Reduction
Dimensionality reduction is the process of reducing the number of random variables under consideration, by obtaining a set of principal variables. It can be divided into feature selection and feature extraction.
Dimensionality Reduction is an importan... | [
{
"code": null,
"e": 54,
"s": 26,
"text": "\n29 Apr, 2018"
},
{
"code": null,
"e": 110,
"s": 54,
"text": "Prerequisite : Introduction to Dimensionality Reduction"
},
{
"code": null,
"e": 322,
"s": 110,
"text": "Dimensionality reduction is the process of reduci... |
How to round off a number in Python? | Python has an inbuilt round() function to round off a number.
The round() method in Python takes two parameters −
The first one is the number to be rounded off.
The first one is the number to be rounded off.
The second one specifies the number of digits to which the number must be rounded off.
The second one specifies ... | [
{
"code": null,
"e": 1249,
"s": 1187,
"text": "Python has an inbuilt round() function to round off a number."
},
{
"code": null,
"e": 1301,
"s": 1249,
"text": "The round() method in Python takes two parameters −"
},
{
"code": null,
"e": 1348,
"s": 1301,
"text"... |
HTTP headers | Accept-Language | 31 Oct, 2019
This HTTP Accept-Language header tells the server about all the languages that the client can understand. With the help of content negotiation, there will be a set of supported languages in the HTTP Accept-Language proposal then the server selects one of the proposals of those languages and place that in t... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n31 Oct, 2019"
},
{
"code": null,
"e": 802,
"s": 28,
"text": "This HTTP Accept-Language header tells the server about all the languages that the client can understand. With the help of content negotiation, there will be a set of supporte... |
How to update parent state in ReactJS ? | 22 Dec, 2020
We can pass a function setting the state from the parent to the child component as a prop.
Creating React Application:
Step 1: Create a React application using the following command:
npx create-react-app foldername
Step 2: After creating your project folder i.e. foldername, move to it using the following c... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n22 Dec, 2020"
},
{
"code": null,
"e": 119,
"s": 28,
"text": "We can pass a function setting the state from the parent to the child component as a prop."
},
{
"code": null,
"e": 147,
"s": 119,
"text": "Creating React ... |
Razorpay Integration in Django | 22 Jul, 2021
Payments are an integral part of the online ecosystem, be it at e-commerce stores to process the orders or a simple donation to someone. Integrating a payment gateway into your website can be a tedious process. Let us have a look at how you can integrate Razorpay into a Django website.
We will build a basi... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n22 Jul, 2021"
},
{
"code": null,
"e": 339,
"s": 52,
"text": "Payments are an integral part of the online ecosystem, be it at e-commerce stores to process the orders or a simple donation to someone. Integrating a payment gateway into yo... |
How to get array structure with alert() in JavaScript? | 06 Sep, 2019
Here is the code to see the array structure using alert() . Here below few techniquesare discussedApproach 1:
First take the values in a variable(lets arr).
Pass the array name in the alert() .
We can directly use the array name because arrayName automatically converted to arrayName.toString()
Example 1: T... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n06 Sep, 2019"
},
{
"code": null,
"e": 138,
"s": 28,
"text": "Here is the code to see the array structure using alert() . Here below few techniquesare discussedApproach 1:"
},
{
"code": null,
"e": 185,
"s": 138,
"text... |
Sum of array elements after reversing each element | 09 Apr, 2021
Given an array arr[] consisting of N positive integers, the task is to find the sum of all array elements after reversing digits of every array element.
Examples:
Input: arr[] = {7, 234, 58100}Output: 18939Explanation:Modified array after reversing each array elements = {7, 432, 18500}.Therefore, the sum o... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n09 Apr, 2021"
},
{
"code": null,
"e": 205,
"s": 52,
"text": "Given an array arr[] consisting of N positive integers, the task is to find the sum of all array elements after reversing digits of every array element."
},
{
"code":... |
Decimal representation of given binary string is divisible by 5 or not | 25 Jun, 2022
The problem is to check whether the decimal representation of the given binary number is divisible by 5 or not. Take care, the number could be very large and may not fit even in long long int. The approach should be such that there are zero or minimum number of multiplication and division operations. No le... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n25 Jun, 2022"
},
{
"code": null,
"e": 403,
"s": 52,
"text": "The problem is to check whether the decimal representation of the given binary number is divisible by 5 or not. Take care, the number could be very large and may not fit even... |
GATE | GATE-CS-2015 (Set 1) | Question 65 - GeeksforGeeks | 11 Sep, 2019
Consider a uniprocessor system executing three tasks T1, T2 and T3, each of which is composed of an infinite sequence of jobs (or instances) which arrive periodically at intervals of 3, 7 and 20 milliseconds, respectively. The priority of each task is the inverse of its period and the available tasks are s... | [
{
"code": null,
"e": 23839,
"s": 23811,
"text": "\n11 Sep, 2019"
},
{
"code": null,
"e": 24624,
"s": 23839,
"text": "Consider a uniprocessor system executing three tasks T1, T2 and T3, each of which is composed of an infinite sequence of jobs (or instances) which arrive periodica... |
Objective-C Typedef | The Objective-C programming language provides a keyword called typedef, which you can use to give a type a new name. Following is an example to define a term BYTE for one-byte numbers −
typedef unsigned char BYTE;
After this type definition, the identifier BYTE can be used as an abbreviation for the type unsigned char,... | [
{
"code": null,
"e": 2746,
"s": 2560,
"text": "The Objective-C programming language provides a keyword called typedef, which you can use to give a type a new name. Following is an example to define a term BYTE for one-byte numbers −"
},
{
"code": null,
"e": 2774,
"s": 2746,
"text... |
Count numbers having 0 as a digit - GeeksforGeeks | 24 Mar, 2021
Count how many integers from 1 to N contains 0’s as a digit.Examples:
Input: n = 9
Output: 0
Input: n = 107
Output: 17
The numbers having 0 are 10, 20,..90, 100, 101..107
Input: n = 155
Output: 24
The numbers having 0 are 10, 20,..90, 100, 101..110,
120, ..150.
The idea is to traverse all numbers from ... | [
{
"code": null,
"e": 25071,
"s": 25043,
"text": "\n24 Mar, 2021"
},
{
"code": null,
"e": 25142,
"s": 25071,
"text": "Count how many integers from 1 to N contains 0’s as a digit.Examples: "
},
{
"code": null,
"e": 25337,
"s": 25142,
"text": "Input: n = 9\nOutp... |
Building a Simple Machine Learning Model on Breast Cancer Data | by vishabh goel | Towards Data Science | Breast cancer (BC) is one of the most common cancers among women worldwide, representing the majority of new cancer cases and cancer-related deaths according to global statistics, making it a significant public health problem in today’s society.
The early diagnosis of BC can improve the prognosis and chance of survival... | [
{
"code": null,
"e": 418,
"s": 172,
"text": "Breast cancer (BC) is one of the most common cancers among women worldwide, representing the majority of new cancer cases and cancer-related deaths according to global statistics, making it a significant public health problem in today’s society."
},
{... |
How to position text to center on an image with CSS | To positioned text to center an image, use the transform property in CSS. You can try to run the following code for centered text over an image
Live Demo
<!DOCTYPE html>
<html>
<head>
<style>
.container {
position: relative;
}
.topleft {
position: absolute;
... | [
{
"code": null,
"e": 1206,
"s": 1062,
"text": "To positioned text to center an image, use the transform property in CSS. You can try to run the following code for centered text over an image"
},
{
"code": null,
"e": 1216,
"s": 1206,
"text": "Live Demo"
},
{
"code": null,
... |
Can we use the result of a SUM() function in MySQL WHERE clause | We can use the HAVING clause rather than the WHERE in MySQL. Let us first create a table −
mysql> create table DemoTable
(
Name varchar(50),
Price int
);
Query OK, 0 rows affected (0.79 sec)
Insert some records in the table using insert command −
mysql> insert into DemoTable values('Chris',30);
Query OK, 1 row af... | [
{
"code": null,
"e": 1153,
"s": 1062,
"text": "We can use the HAVING clause rather than the WHERE in MySQL. Let us first create a table −"
},
{
"code": null,
"e": 1259,
"s": 1153,
"text": "mysql> create table DemoTable\n(\n Name varchar(50),\n Price int\n);\nQuery OK, 0 rows ... |
Python - Set Exercises | Now you have learned a lot about sets, and how to use them in Python.
Are you ready for a test?
Try to insert the missing part to make the code work as expected:
Check if "apple" is present in the fruits set.
fruits = {"apple", "banana", "cherry"}
if "apple" fruits:
print("Yes, apple is a fruit!")
Go to the Exercis... | [
{
"code": null,
"e": 70,
"s": 0,
"text": "Now you have learned a lot about sets, and how to use them in Python."
},
{
"code": null,
"e": 96,
"s": 70,
"text": "Are you ready for a test?"
},
{
"code": null,
"e": 162,
"s": 96,
"text": "Try to insert the missing p... |
20+ Must-Subscribe Data and AI Newsletters in 2021 | by Benedict Neo | Towards Data Science | There’s an ocean of noise on the internet for data science and AI that it can be overwhelming to focus on good quality news and content.
As Herbert A. Simon says:
“...a wealth of information creates a poverty of attention...”
The solution to information overload?
Newsletters.
If you’re someone who wants to keep up with... | [
{
"code": null,
"e": 308,
"s": 171,
"text": "There’s an ocean of noise on the internet for data science and AI that it can be overwhelming to focus on good quality news and content."
},
{
"code": null,
"e": 334,
"s": 308,
"text": "As Herbert A. Simon says:"
},
{
"code": n... |
forward_list::front() and forward_list::empty() in C++ STL - GeeksforGeeks | 28 Sep, 2021
Forward list in STL implements singly linked list. Introduced from C++11, forward list are useful than other containers in insertion, removal and moving operations (like sort) and allows time constant insertion and removal of elements.It differs from list by the fact that forward list keeps track of locati... | [
{
"code": null,
"e": 25945,
"s": 25917,
"text": "\n28 Sep, 2021"
},
{
"code": null,
"e": 26335,
"s": 25945,
"text": "Forward list in STL implements singly linked list. Introduced from C++11, forward list are useful than other containers in insertion, removal and moving operations... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.