title stringlengths 3 221 | text stringlengths 17 477k | parsed listlengths 0 3.17k |
|---|---|---|
Java Program for Longest Increasing Subsequence | 08 Jun, 2022
The Longest Increasing Subsequence (LIS) problem is to find the length of the longest subsequence of a given sequence such that all elements of the subsequence are sorted in increasing order. For example, the length of LIS for {10, 22, 9, 33, 21, 50, 41, 60, 80} is 6 and LIS is {10, 22, 33, 50, 60, 80}. M... | [
{
"code": null,
"e": 54,
"s": 26,
"text": "\n08 Jun, 2022"
},
{
"code": null,
"e": 375,
"s": 54,
"text": "The Longest Increasing Subsequence (LIS) problem is to find the length of the longest subsequence of a given sequence such that all elements of the subsequence are sorted in ... |
Variable initialization in C++ | Variables are the names given by the user. A datatype is also used to declare and initialize a variable which allocates memory to that variable. There are several datatypes like int, char, float etc. to allocate the memory to that variable.
There are two ways to initialize the variable. One is static initialization in ... | [
{
"code": null,
"e": 1428,
"s": 1187,
"text": "Variables are the names given by the user. A datatype is also used to declare and initialize a variable which allocates memory to that variable. There are several datatypes like int, char, float etc. to allocate the memory to that variable."
},
{
... |
The Initialize Method in Ruby | 25 Sep, 2019
The initialize method is useful when we want to initialize some class variables at the time of object creation. The initialize method is part of the object-creation process in Ruby and it allows us to set the initial values for an object.
Below are some points about Initialize :
We can define default argum... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n25 Sep, 2019"
},
{
"code": null,
"e": 291,
"s": 52,
"text": "The initialize method is useful when we want to initialize some class variables at the time of object creation. The initialize method is part of the object-creation process i... |
Spring MVC - Generate PDF Example | The following example shows how to generate a PDF using the Spring Web MVC Framework. To start with, let us have a working Eclipse IDE in place and adhere to the following steps to develop a Dynamic Form based Web Application using the Spring Web Framework.
package com.tutorialspoint;
import java.util.HashMap;
import ... | [
{
"code": null,
"e": 3183,
"s": 2925,
"text": "The following example shows how to generate a PDF using the Spring Web MVC Framework. To start with, let us have a working Eclipse IDE in place and adhere to the following steps to develop a Dynamic Form based Web Application using the Spring Web Framew... |
PHP | strtoupper() Function | 08 Mar, 2018
The strtoupper() function is used to convert a string into uppercase. This function takes a string as parameter and converts all the lowercase english alphabets present in the string to uppercase. All other numeric characters or special characters in the string remains unchanged.
Syntax:
string strtoupper ... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n08 Mar, 2018"
},
{
"code": null,
"e": 309,
"s": 28,
"text": "The strtoupper() function is used to convert a string into uppercase. This function takes a string as parameter and converts all the lowercase english alphabets present in the... |
Java Program to Generate Harmonic Series | 22 Jun, 2021
Harmonic series is the inverse of an arithmetic progression. In general, the terms in a harmonic progression can be denoted as
h1 = 1/a, h2 = 1/(a+d), h3 = 1/(a+2d), h4 = 1/(a+3d), ................., hn = 1/(a+nd).
Where h is the harmonic series, a is arithmetic progression and d is the common difference... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n22 Jun, 2021"
},
{
"code": null,
"e": 155,
"s": 28,
"text": "Harmonic series is the inverse of an arithmetic progression. In general, the terms in a harmonic progression can be denoted as"
},
{
"code": null,
"e": 245,
"s... |
ctags command in Linux with examples | 15 May, 2019
ctags command in Linux system is used for the with the classic editors. It allows quick access across the files (For example quickly seeing definition of a function). A user can run tags or ctags inside a directory to create a simple index of the source files while working on. Tags-capable editors like vi/... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n15 May, 2019"
},
{
"code": null,
"e": 650,
"s": 28,
"text": "ctags command in Linux system is used for the with the classic editors. It allows quick access across the files (For example quickly seeing definition of a function). A user c... |
How to download Files with Scrapy ? | 03 Mar, 2021
Scrapy is a fast high-level web crawling and web scraping framework used to crawl websites and extract structured data from their pages. It can be used for a wide range of purposes, from data mining to monitoring and automated testing. In this tutorial, we will be exploring how to download files using a sc... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n03 Mar, 2021"
},
{
"code": null,
"e": 378,
"s": 52,
"text": "Scrapy is a fast high-level web crawling and web scraping framework used to crawl websites and extract structured data from their pages. It can be used for a wide range of pu... |
How to count the number of words in a text file using Java? | Read the number of words in text file
Create a FileInputStream object by passing the required file (object) as a parameter to its constructor.
Read the contents of the file using the read() method into a byte array.
Insatiate a String class by passing the byte array to its constructor.
Using split() method read the wo... | [
{
"code": null,
"e": 1225,
"s": 1187,
"text": "Read the number of words in text file"
},
{
"code": null,
"e": 1330,
"s": 1225,
"text": "Create a FileInputStream object by passing the required file (object) as a parameter to its constructor."
},
{
"code": null,
"e": 14... |
Data Munging in R Programming | 01 Jun, 2022
Data Munging is the general technique of transforming data from unusable or erroneous form to useful form. Without a few degrees of data munging (irrespective of whether a specialized user or automated system performs it), the data can’t be ready for downstream consumption. Basically the procedure of clean... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n01 Jun, 2022"
},
{
"code": null,
"e": 460,
"s": 28,
"text": "Data Munging is the general technique of transforming data from unusable or erroneous form to useful form. Without a few degrees of data munging (irrespective of whether a spe... |
Difference between Server OS and Client OS | 02 Jul, 2020
1. Client OS :It is an operating system that operates within desktop. It is used to obtain services from a server. It run on the client devices like laptop, computer and is very simple operating system.
2. Server OS :It is an operating system that is designed to be used on server. It is used to provide ser... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n02 Jul, 2020"
},
{
"code": null,
"e": 231,
"s": 28,
"text": "1. Client OS :It is an operating system that operates within desktop. It is used to obtain services from a server. It run on the client devices like laptop, computer and is ve... |
PHP | Types of Errors | 24 Aug, 2018
Error is the fault or mistake in a program. It can be several types. Error can occur due to wrong syntax or wrong logic. It is a type of mistakes or condition of having incorrect knowledge of the code.
There are various types of errors in PHP but it contains basically four main type of errors.
Parse error ... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n24 Aug, 2018"
},
{
"code": null,
"e": 254,
"s": 52,
"text": "Error is the fault or mistake in a program. It can be several types. Error can occur due to wrong syntax or wrong logic. It is a type of mistakes or condition of having incor... |
What is RowSet in Java JDBC? | 24 Jun, 2021
RowSet is an interface in java that is present in the java.sql package. Geek do note not to confuse RowSet with ResultSet.
Note: RowSet is present in package javax.sql while ResultSet is present in package java.sql.
The instance of RowSet is the java bean component because it has properties and a java ... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n24 Jun, 2021"
},
{
"code": null,
"e": 152,
"s": 28,
"text": "RowSet is an interface in java that is present in the java.sql package. Geek do note not to confuse RowSet with ResultSet. "
},
{
"code": null,
"e": 248,
"s": ... |
JavaFX - 2D Shapes Rectangle | In general, a rectangle is a four-sided polygon that has two pairs of parallel and concurrent sides with all interior angles as right angles.
It is described by two parameters namely −
height − The vertical length of the rectangle is known as height.
height − The vertical length of the rectangle is known as height.
wid... | [
{
"code": null,
"e": 2176,
"s": 2034,
"text": "In general, a rectangle is a four-sided polygon that has two pairs of parallel and concurrent sides with all interior angles as right angles."
},
{
"code": null,
"e": 2219,
"s": 2176,
"text": "It is described by two parameters namely... |
Primorial of a number | 11 May, 2021
Given a number n, the task is to calculate its primorial. Primorial (denoted as Pn#) is a product of first n prime numbers. Primorial of a number is similar to the factorial of a number. In primorial, not all the natural numbers get multiplied only prime numbers are multiplied to calculate the primorial of... | [
{
"code": null,
"e": 53,
"s": 25,
"text": "\n11 May, 2021"
},
{
"code": null,
"e": 405,
"s": 53,
"text": "Given a number n, the task is to calculate its primorial. Primorial (denoted as Pn#) is a product of first n prime numbers. Primorial of a number is similar to the factorial ... |
How to update the State of a component in ReactJS ? | 27 Sep, 2021
The State is an instance of React Component that can be defined as an object of a set of observable properties that control the behavior of the component. In other words, the State of a component is an object that holds some information that may change over the lifetime of the component. The state of a com... | [
{
"code": null,
"e": 54,
"s": 26,
"text": "\n27 Sep, 2021"
},
{
"code": null,
"e": 404,
"s": 54,
"text": "The State is an instance of React Component that can be defined as an object of a set of observable properties that control the behavior of the component. In other words, the... |
How to convert Set to Array in JavaScript? | 21 Jul, 2021
A set can be converted to an array in JavaScript by the following way-
By using Array.from() method:This method returns a new Array from an array like object or iterable objects like Map, Set, etc.SyntaxArray.from(arrayLike object);Example-1<!DOCTYPE html><html> <head> <title> Convert Set to Arr... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n21 Jul, 2021"
},
{
"code": null,
"e": 99,
"s": 28,
"text": "A set can be converted to an array in JavaScript by the following way-"
},
{
"code": null,
"e": 658,
"s": 99,
"text": "By using Array.from() method:This met... |
PyQt5 – How to change font and size of Label text ? | 26 Mar, 2020
A label is a graphical control element which displays text on a form. A label is generally used to identify a nearby text box or other widget. Some labels can respond to events such as mouse clicks, allowing the text of the label to be copied, but this is not standard user-interface practice.
In this artic... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n26 Mar, 2020"
},
{
"code": null,
"e": 322,
"s": 28,
"text": "A label is a graphical control element which displays text on a form. A label is generally used to identify a nearby text box or other widget. Some labels can respond to event... |
How to find top-N records using MapReduce | 11 Feb, 2022
Finding top 10 or 20 records from a large dataset is the heart of many recommendation systems and it is also an important attribute for data analysis. Here, we will discuss the two methods to find top-N records as follows.Method 1: First, let’s find out top-10 most viewed movies to understand the methods a... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n11 Feb, 2022"
},
{
"code": null,
"e": 395,
"s": 28,
"text": "Finding top 10 or 20 records from a large dataset is the heart of many recommendation systems and it is also an important attribute for data analysis. Here, we will discuss th... |
LongStream sum() in Java - GeeksforGeeks | 06 Dec, 2018
LongStream sum() returns the sum of elements in this stream. This is a special case of a reduction. LongStream sum() is a terminal operation i.e, it may traverse the stream to produce a result or a side-effect.
Note : A reduction operation (also called a fold) takes a sequence of input elements and combine... | [
{
"code": null,
"e": 23557,
"s": 23529,
"text": "\n06 Dec, 2018"
},
{
"code": null,
"e": 23768,
"s": 23557,
"text": "LongStream sum() returns the sum of elements in this stream. This is a special case of a reduction. LongStream sum() is a terminal operation i.e, it may traverse t... |
Using MALLET LDA to Learn Why Players Hate Pokémon Sword /Shield | by Adeline Ong | Towards Data Science | The latest Pokémon game for Nintendo Switch launched with fanfare, promising to wow fans with stunning visuals and an open-world adventure. Despite praise from critics, the game was a let-down for most players. In this article, I will walk you through how I used MALLET Latent Dirichlet Allocation (LDA) to find out key... | [
{
"code": null,
"e": 535,
"s": 172,
"text": "The latest Pokémon game for Nintendo Switch launched with fanfare, promising to wow fans with stunning visuals and an open-world adventure. Despite praise from critics, the game was a let-down for most players. In this article, I will walk you through ho... |
Java super Keyword | ❮ Java Keywords
Using super to call the superclass of Dog
(subclass):
class Animal { // Superclass (parent)
public void animalSound() {
System.out.println("The animal makes a sound");
}
}
class Dog extends Animal { // Subclass (child)
public void animalSound() {
super.animalSound(); // Call the supercl... | [
{
"code": null,
"e": 18,
"s": 0,
"text": "\n❮ Java Keywords\n"
},
{
"code": null,
"e": 73,
"s": 18,
"text": "Using super to call the superclass of Dog \n(subclass):"
},
{
"code": null,
"e": 573,
"s": 73,
"text": "class Animal { // Superclass (parent)\n public... |
Squares of Matrix Diagonal Elements | 20 Jun, 2022
You have given an integer matrix with odd dimensions. Find the square of the diagonals elements on both sides.
Examples:
Input : 1 2 3
4 5 6
7 8 9
Output : Diagonal one: 1 25 81
Diagonal two: 9 25 49
Input : 2 5 7
3 7 2
5 6 9
Output : Diagonal one ... | [
{
"code": null,
"e": 53,
"s": 25,
"text": "\n20 Jun, 2022"
},
{
"code": null,
"e": 164,
"s": 53,
"text": "You have given an integer matrix with odd dimensions. Find the square of the diagonals elements on both sides."
},
{
"code": null,
"e": 174,
"s": 164,
"te... |
Multidimensional Arrays in Java | 08 Jul, 2022
Array-Basics in JavaMultidimensional Arrays can be defined in simple words as array of arrays. Data in multidimensional arrays are stored in tabular form (in row major order).
Syntax:
data_type[1st dimension][2nd dimension][]..[Nth dimension] array_name = new data_type[size1][size2]....[sizeN];
where:
data... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n08 Jul, 2022"
},
{
"code": null,
"e": 228,
"s": 52,
"text": "Array-Basics in JavaMultidimensional Arrays can be defined in simple words as array of arrays. Data in multidimensional arrays are stored in tabular form (in row major order)... |
How to convert text to speech in Node.js ? | 19 May, 2020
To convert text to speech in Node.js, there are various modules but the most popular among them is gtts(Google Text to Speech) module.
Feature of gtts module:
It is easy to get started and easy to use.It is widely used and popular for converting text to speech.
It is easy to get started and easy to use.
It... | [
{
"code": null,
"e": 53,
"s": 25,
"text": "\n19 May, 2020"
},
{
"code": null,
"e": 188,
"s": 53,
"text": "To convert text to speech in Node.js, there are various modules but the most popular among them is gtts(Google Text to Speech) module."
},
{
"code": null,
"e": 21... |
What is an extern storage class in C language? | There are four storage classes in C programming language, which are as follows −
auto
extern
static
register
The keyword is extern. These variables are declared outside the block.
Scope − Scope of a global variable is available throughout the program.
Scope − Scope of a global variable is available throughout the progr... | [
{
"code": null,
"e": 1268,
"s": 1187,
"text": "There are four storage classes in C programming language, which are as follows −"
},
{
"code": null,
"e": 1273,
"s": 1268,
"text": "auto"
},
{
"code": null,
"e": 1280,
"s": 1273,
"text": "extern"
},
{
"cod... |
Python | Pandas Series.values | 28 Jan, 2019
Python is a great language for doing data analysis, primarily because of the fantastic ecosystem of data-centric python packages. Pandas is one of those packages and makes importing and analyzing data much easier.
Pandas series is a One-dimensional ndarray with axis labels. The labels need not be unique bu... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n28 Jan, 2019"
},
{
"code": null,
"e": 242,
"s": 28,
"text": "Python is a great language for doing data analysis, primarily because of the fantastic ecosystem of data-centric python packages. Pandas is one of those packages and makes imp... |
GATE | GATE CS 2020 | Question 32 | 11 Aug, 2021
Consider the following C program.
#include <stdio.h> int main () { int a[4][5] = {{1, 2, 3, 4, 5}, {6, 7, 8, 9, 10}, {11, 12, 13, 14, 15}, {16, 17, 18, 19, 20}}; printf("%d\n", *(*(a+**a+2)+3)); return(0); }
The output of the progr... | [
{
"code": null,
"e": 54,
"s": 26,
"text": "\n11 Aug, 2021"
},
{
"code": null,
"e": 88,
"s": 54,
"text": "Consider the following C program."
},
{
"code": "#include <stdio.h> int main () { int a[4][5] = {{1, 2, 3, 4, 5}, {6, 7, 8, 9, 10}, ... |
How to add a datepicker in form using HTML ? | 22 Jul, 2021
We know that a datepicker is used to select a particular date from a calendar. A datepicker is an interactive dropdown that makes it easy to choose the date from a calendar instead of typing it manually. It is generally used to save a birthdate of a user or also used in many cases.
In this article, we wil... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n22 Jul, 2021"
},
{
"code": null,
"e": 312,
"s": 28,
"text": "We know that a datepicker is used to select a particular date from a calendar. A datepicker is an interactive dropdown that makes it easy to choose the date from a calendar in... |
Scala String startsWith(String prefix) method with example | 29 Oct, 2019
The startsWith(String prefix) method is utilized to check if the stated string starts with the prefix or not that is being specified by us.
Method Definition: Boolean startsWith(String prefix)
Return Type: It returns true if the string starts with the specified prefix else it returns false.
Example: 1#
// ... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n29 Oct, 2019"
},
{
"code": null,
"e": 168,
"s": 28,
"text": "The startsWith(String prefix) method is utilized to check if the stated string starts with the prefix or not that is being specified by us."
},
{
"code": null,
"e"... |
Executing SQL query with Psycopg2 in Python | 17 Oct, 2021
In this article, we are going to see how to execute SQL queries in PostgreSQL using Psycopg2 in Python.
Psycopg2 is a PostgreSQL database driver, it is used to perform operations on PostgreSQL using python, it is designed for multi-threaded applications. SQL queries are executed with psycopg2 with the help... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n17 Oct, 2021"
},
{
"code": null,
"e": 132,
"s": 28,
"text": "In this article, we are going to see how to execute SQL queries in PostgreSQL using Psycopg2 in Python."
},
{
"code": null,
"e": 423,
"s": 132,
"text": "Ps... |
Java program to count the occurrence of each character in a string using Hashmap | 07 Aug, 2021
Given a string, the task is to write a program in Java which prints the number of occurrences of each character in a string.
Examples:
Input: str = "GeeksForGeeks"
Output:
r 1
s 2
e 4
F 1
G 2
k 2
o 1
Input: str = "Ajit"
Output:
A 1
t 1
i 1
j 1
An approach using frequency[] array has already been dis... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n07 Aug, 2021"
},
{
"code": null,
"e": 177,
"s": 52,
"text": "Given a string, the task is to write a program in Java which prints the number of occurrences of each character in a string."
},
{
"code": null,
"e": 188,
"s"... |
MySQL SELECT to add a new column to a query and give it a value? | To add column to MySQL query and give it a value, use the below syntax −
select yourColumnName1,yourColumnName2,.....N ,yourValue AS anyAliasName from yourTableName;
Let us first create a table −
mysql> create table DemoTable
(
Id int NOT NULL AUTO_INCREMENT PRIMARY KEY,
FirstName varchar(20)
);
Query OK, 0 rows ... | [
{
"code": null,
"e": 1260,
"s": 1187,
"text": "To add column to MySQL query and give it a value, use the below syntax −"
},
{
"code": null,
"e": 1353,
"s": 1260,
"text": "select yourColumnName1,yourColumnName2,.....N ,yourValue AS anyAliasName from yourTableName;"
},
{
"c... |
Memory Leak in Python requests | 01 Dec, 2021
When a programmer forgets to clear a memory allocated in heap memory, the memory leak occurs. It’s a type of resource leak or wastage. When there is a memory leak in the application, the memory of the machine gets filled and slows down the performance of the machine. This is a serious issue while building ... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n01 Dec, 2021"
},
{
"code": null,
"e": 365,
"s": 28,
"text": "When a programmer forgets to clear a memory allocated in heap memory, the memory leak occurs. It’s a type of resource leak or wastage. When there is a memory leak in the appli... |
ML | Types of Regression Techniques | 19 Aug, 2021
When Regression is chosen? A regression problem is when the output variable is a real or continuous value, such as “salary” or “weight”. Many different models can be used, the simplest is linear regression. It tries to fit data with the best hyperplane which goes through the points.
Regression Analysis is ... | [
{
"code": null,
"e": 54,
"s": 26,
"text": "\n19 Aug, 2021"
},
{
"code": null,
"e": 338,
"s": 54,
"text": "When Regression is chosen? A regression problem is when the output variable is a real or continuous value, such as “salary” or “weight”. Many different models can be used, th... |
How to call a jQuery library function? | Calling a JavaScript library function is quite easy. You need to use the script tag. As almost everything we do when using jQuery reads or manipulates the document object model (DOM), we need to make sure that we start adding events etc. as soon as the DOM is ready.
If you want an event to work on your page, you should... | [
{
"code": null,
"e": 1454,
"s": 1187,
"text": "Calling a JavaScript library function is quite easy. You need to use the script tag. As almost everything we do when using jQuery reads or manipulates the document object model (DOM), we need to make sure that we start adding events etc. as soon as the ... |
System tray applications using PyQt5 | 22 May, 2020
In this article, we will learn how to create a System Tray application using PyQt.
System Tray(or menu bar) is an area on the taskbar in an operating system. You can find this system on the bottom right side of the desktop if you’re using windows, and top right if using macOS. The icons which are visible i... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n22 May, 2020"
},
{
"code": null,
"e": 111,
"s": 28,
"text": "In this article, we will learn how to create a System Tray application using PyQt."
},
{
"code": null,
"e": 535,
"s": 111,
"text": "System Tray(or menu bar... |
Gateway Load Balancing Protocol (GLBP) - GeeksforGeeks | 09 Aug, 2019
Gateway Load Balancing Protocol (GLBP) is one of First Hop Redundancy Protocol (FHRP) which provides redundancy like other First Hop Redundancy Protocol, also provides load Balancing. It is a Cisco proprietary protocol which can perform both functions. It provides load Balancing over multiple routers using... | [
{
"code": null,
"e": 26207,
"s": 26179,
"text": "\n09 Aug, 2019"
},
{
"code": null,
"e": 26575,
"s": 26207,
"text": "Gateway Load Balancing Protocol (GLBP) is one of First Hop Redundancy Protocol (FHRP) which provides redundancy like other First Hop Redundancy Protocol, also prov... |
4-ZERO-3: Tool to bypass 403/401 - GeeksforGeeks | 04 Jan, 2022
4-ZERO-3 is a free and open-source tool available on GitHub. It’s a bash script.4-ZERO-3 is used to bypass 403 and 401 technical obstacles on any domain. Content length matters when performing bypass using the 4-ZERO-3 tool. If you see multiple 200 while bypassing then you must check the content length. ... | [
{
"code": null,
"e": 24326,
"s": 24298,
"text": "\n04 Jan, 2022"
},
{
"code": null,
"e": 24697,
"s": 24326,
"text": "4-ZERO-3 is a free and open-source tool available on GitHub. It’s a bash script.4-ZERO-3 is used to bypass 403 and 401 technical obstacles on any domain. Content l... |
Extract Just Number from Named Numeric Vector in R - GeeksforGeeks | 16 May, 2021
In this article, we are going to see how to extract just the number from the named numeric vector in R Programming Language.
Method 1: Using NULL
The names() method can be invoked on the vector and assigned to NULL in order to remove any instances of the names set to this object. It makes modifications to ... | [
{
"code": null,
"e": 26487,
"s": 26459,
"text": "\n16 May, 2021"
},
{
"code": null,
"e": 26612,
"s": 26487,
"text": "In this article, we are going to see how to extract just the number from the named numeric vector in R Programming Language."
},
{
"code": null,
"e": 2... |
How to format numbers by prepending 0 to single-digit numbers? - GeeksforGeeks | 18 Jul, 2019
A number can be formatted to prepend a 0 to single-digit numbers using 3 approaches:
Method 1: Using padStart() method:The padStart() method is used to pad a string with another string to a certain length. The padding is started from the left of the string. It takes two parameters, the target length, and t... | [
{
"code": null,
"e": 26545,
"s": 26517,
"text": "\n18 Jul, 2019"
},
{
"code": null,
"e": 26630,
"s": 26545,
"text": "A number can be formatted to prepend a 0 to single-digit numbers using 3 approaches:"
},
{
"code": null,
"e": 26883,
"s": 26630,
"text": "Metho... |
Difference between function expression vs declaration in JavaScript - GeeksforGeeks | 23 May, 2019
Function Declaration:A Function Declaration( or a Function Statement) defines a function with the specified parameters without requiring a variable assignment. They exist on their own, i.e, they are standalone constructs and cannot be nested within a non-function block. A function is declared using the fun... | [
{
"code": null,
"e": 24418,
"s": 24390,
"text": "\n23 May, 2019"
},
{
"code": null,
"e": 24740,
"s": 24418,
"text": "Function Declaration:A Function Declaration( or a Function Statement) defines a function with the specified parameters without requiring a variable assignment. The... |
CheckBox in Kotlin - GeeksforGeeks | 19 Feb, 2021
A CheckBox is a special kind of button in Android which has two states either checked or unchecked. The Checkbox is a very common widget to be used in Android and a very good example is the “Remember me” option in any kind of Login activity of an app which asks the user to activate or deactivate that servi... | [
{
"code": null,
"e": 24232,
"s": 24204,
"text": "\n19 Feb, 2021"
},
{
"code": null,
"e": 24888,
"s": 24232,
"text": "A CheckBox is a special kind of button in Android which has two states either checked or unchecked. The Checkbox is a very common widget to be used in Android and ... |
gRPC - Bidirectional RPC | Let us see now see how the client-server streaming works while using gRPCcommunication. In this case, the client will search and add books to the cart. The server would respond with live cart value every time a book is added.
First let us define the bookstore.proto file in common_proto_files −
syntax = "proto3";
option... | [
{
"code": null,
"e": 2063,
"s": 1837,
"text": "Let us see now see how the client-server streaming works while using gRPCcommunication. In this case, the client will search and add books to the cart. The server would respond with live cart value every time a book is added."
},
{
"code": null,... |
Feature Importance with Time Series and Recurrent Neural Network | by Marco Cerliani | Towards Data Science | Neural networks are often considered black-box algorithms. This is true but with few tricks and some useful external inference techniques we can extract lots of information from them. Amazing examples come from the application of Deep Learning with images. The extraction of internal features from the network is useful ... | [
{
"code": null,
"e": 520,
"s": 47,
"text": "Neural networks are often considered black-box algorithms. This is true but with few tricks and some useful external inference techniques we can extract lots of information from them. Amazing examples come from the application of Deep Learning with images.... |
Groovy - Maps size() | Returns the number of key-value mappings in this Map.
int size()
None.
The size of the map.
Following is an example of the usage of this method −
class Example {
static void main(String[] args) {
def mp = ["TopicName" : "Maps", "TopicDescription" : "Methods in Maps"]
println(mp.size());
mp.... | [
{
"code": null,
"e": 2292,
"s": 2238,
"text": "Returns the number of key-value mappings in this Map."
},
{
"code": null,
"e": 2304,
"s": 2292,
"text": "int size()\n"
},
{
"code": null,
"e": 2310,
"s": 2304,
"text": "None."
},
{
"code": null,
"e": 2... |
Deep Demand Forecasting with Amazon SageMaker | by Ehsan M. Kermani | Towards Data Science | In this article, we explore how to use Deep Learning methods for Demand Forecasting using Amazon SageMaker.
TL;DR: The code for this project is available on GitHub with a single click AWS CloudFormation template to set up the required stack.
Demand forecasting uses historical time-series data to help streamline the sup... | [
{
"code": null,
"e": 280,
"s": 172,
"text": "In this article, we explore how to use Deep Learning methods for Demand Forecasting using Amazon SageMaker."
},
{
"code": null,
"e": 414,
"s": 280,
"text": "TL;DR: The code for this project is available on GitHub with a single click AW... |
Java.lang.Thread Class in Java - GeeksforGeeks | 26 Apr, 2022
Thread a line of execution within a program. Each program can have multiple associated threads. Each thread has a priority which is used by the thread scheduler to determine which thread must run first. Java provides a thread class that has various method calls in order to manage the behavior of threads by... | [
{
"code": null,
"e": 23952,
"s": 23924,
"text": "\n26 Apr, 2022"
},
{
"code": null,
"e": 24330,
"s": 23952,
"text": "Thread a line of execution within a program. Each program can have multiple associated threads. Each thread has a priority which is used by the thread scheduler to... |
Abstract Factory Pattern - GeeksforGeeks | 13 Oct, 2021
Introduction
Abstract Factory design pattern is one of the Creational pattern. Abstract Factory pattern is almost similar to Factory Pattern is considered as another layer of abstraction over factory pattern. Abstract Factory patterns work around a super-factory which creates other factories.Abstract facto... | [
{
"code": null,
"e": 24292,
"s": 24264,
"text": "\n13 Oct, 2021"
},
{
"code": null,
"e": 24305,
"s": 24292,
"text": "Introduction"
},
{
"code": null,
"e": 24908,
"s": 24305,
"text": "Abstract Factory design pattern is one of the Creational pattern. Abstract Fa... |
Python PIL | getbands() and getextrema() method - GeeksforGeeks | 16 Aug, 2021
Python PIL library contains Image module in which variety of functions are defined. PIL.Image.Image.getbands() This method is used to get the mode (bands) present in an image.
Syntax: PIL.Image.Image.getbands(image_object [valid image path])Parameters: It takes a parameter image_object i.e it the referenc... | [
{
"code": null,
"e": 24406,
"s": 24378,
"text": "\n16 Aug, 2021"
},
{
"code": null,
"e": 24583,
"s": 24406,
"text": "Python PIL library contains Image module in which variety of functions are defined. PIL.Image.Image.getbands() This method is used to get the mode (bands) present ... |
Why Makefile? | Compiling the source code files can be tiring, especially when you have to include several source files and type the compiling command every time you need to compile. Makefiles are the solution to simplify this task.
Makefiles are special format files that help build and manage the projects automatically.
For example, ... | [
{
"code": null,
"e": 2001,
"s": 1784,
"text": "Compiling the source code files can be tiring, especially when you have to include several source files and type the compiling command every time you need to compile. Makefiles are the solution to simplify this task."
},
{
"code": null,
"e":... |
Prime Palindrome in C++ | Suppose we have to find the smallest prime palindrome that is greater than or equal to N. So if the N is 13, then the smallest palindrome will be 101.
To solve this, we will follow these steps −
If N is in range 8 to 11, then return 11
If N is in range 8 to 11, then return 11
for i in range 1 to 99999s := i as a string... | [
{
"code": null,
"e": 1213,
"s": 1062,
"text": "Suppose we have to find the smallest prime palindrome that is greater than or equal to N. So if the N is 13, then the smallest palindrome will be 101."
},
{
"code": null,
"e": 1257,
"s": 1213,
"text": "To solve this, we will follow t... |
Find rows where column value ends with a specific substring in MySQL? | To find rows and update with new value where column value ends with specific substring you need to use LIKE operator.
The syntax is as follows:
UPDATE yourTableName
SET yourColumnName=’yourValue’
WHERE yourColumnName LIKE ‘%.yourString’;
To understand the above syntax, let us create a table. The query to create a table... | [
{
"code": null,
"e": 1180,
"s": 1062,
"text": "To find rows and update with new value where column value ends with specific substring you need to use LIKE operator."
},
{
"code": null,
"e": 1206,
"s": 1180,
"text": "The syntax is as follows:"
},
{
"code": null,
"e": 1... |
Rearrange characters in a string such that no two adjacent are same in C++ | We are given a string, let's say, str of any given length. The task is to rearrange the given string in such a manner that there won't be the same adjacent characters arranged together in the resultant string.
Input − string str = "itinn"
Output − Rearrangement of characters in a string such that no two adjacent are sa... | [
{
"code": null,
"e": 1272,
"s": 1062,
"text": "We are given a string, let's say, str of any given length. The task is to rearrange the given string in such a manner that there won't be the same adjacent characters arranged together in the resultant string."
},
{
"code": null,
"e": 1301,
... |
D3.js brush() Function - GeeksforGeeks | 31 Jul, 2020
The d3.brush() function in D3.js is used to new create a 2-D brush. The brush is generally created SVG element.
Syntax:
d3.brush();
Parameters: This function does not accept any parameters.
Return Value: This function returns a newly created brush.
Example: In this example, we will create a brush of size ... | [
{
"code": null,
"e": 25300,
"s": 25272,
"text": "\n31 Jul, 2020"
},
{
"code": null,
"e": 25412,
"s": 25300,
"text": "The d3.brush() function in D3.js is used to new create a 2-D brush. The brush is generally created SVG element."
},
{
"code": null,
"e": 25420,
"s"... |
Python – Strip whitespace from a Pandas DataFrame | To strip whitespace, whether its leading or trailing, use the strip() method. At first, let us import thr required Pandas library with an alias −
import pandas as pd
Let’s create a DataFrame with 3 columns. The first column is having leading and trailing whitespaces −
dataFrame = pd.DataFrame({
'Product Category': [... | [
{
"code": null,
"e": 1208,
"s": 1062,
"text": "To strip whitespace, whether its leading or trailing, use the strip() method. At first, let us import thr required Pandas library with an alias −"
},
{
"code": null,
"e": 1228,
"s": 1208,
"text": "import pandas as pd"
},
{
"c... |
Getting Started with Reinforcement Learning and Open AI Gym | by Genevieve Hayes | Towards Data Science | This is the third in a series of articles on Reinforcement Learning and Open AI Gym. Part 1 can be found here, while Part 2 can be found here.
Reinforcement learning (RL) is the branch of machine learning that deals with learning from interacting with an environment where feedback may be delayed.
Although RL is a very ... | [
{
"code": null,
"e": 315,
"s": 172,
"text": "This is the third in a series of articles on Reinforcement Learning and Open AI Gym. Part 1 can be found here, while Part 2 can be found here."
},
{
"code": null,
"e": 470,
"s": 315,
"text": "Reinforcement learning (RL) is the branch o... |
Debugging Dbt: When Your Table Name is a Reserved Keyword | by Madison Schott | Towards Data Science | Welcome to my newest series- debugging dbt. As an analytics engineer, I use dbt every day in my job to write robust data models. It is a great tool for simplifying and containerizing the way data models run. While it makes things easier, there are still things I am constantly learning about the tool. I wanted to use my... | [
{
"code": null,
"e": 597,
"s": 171,
"text": "Welcome to my newest series- debugging dbt. As an analytics engineer, I use dbt every day in my job to write robust data models. It is a great tool for simplifying and containerizing the way data models run. While it makes things easier, there are still t... |
Add an autoincrement column with a custom start value in MySQL | To add a new column to an already created table, use ALTER TABLE and ADD COLUMN. Use AUTO_INCREMENT to set auto increment custom value.
Let us first create a table −
mysql> create table DemoTable
-> (
-> StudentName varchar(20)
-> );
Query OK, 0 rows affected (0.63 sec)
Insert some records in the table using i... | [
{
"code": null,
"e": 1198,
"s": 1062,
"text": "To add a new column to an already created table, use ALTER TABLE and ADD COLUMN. Use AUTO_INCREMENT to set auto increment custom value."
},
{
"code": null,
"e": 1228,
"s": 1198,
"text": "Let us first create a table −"
},
{
"c... |
Training Neural Networks for price prediction with TensorFlow | by Jan Majewski | Towards Data Science | Using Deep Neural Networks for regression problems might seem like overkill (and quite often is), but for some cases where you have a significant amount of high dimensional data they can outperform any other ML models.
When you learn about Neural Networks you usually start with some image classification problem like th... | [
{
"code": null,
"e": 391,
"s": 172,
"text": "Using Deep Neural Networks for regression problems might seem like overkill (and quite often is), but for some cases where you have a significant amount of high dimensional data they can outperform any other ML models."
},
{
"code": null,
"e":... |
Generating Errors using HTTP-errors module in Node.js - GeeksforGeeks | 06 Jul, 2021
HTTP-errors module is used for generating errors for Node.js applications. It is very easy to use. We can use it with express, Koa, etc. applications. We will implement this module in an express application.
Installation and Setup: First, initialize the application with package.json file with the following... | [
{
"code": null,
"e": 24664,
"s": 24636,
"text": "\n06 Jul, 2021"
},
{
"code": null,
"e": 24872,
"s": 24664,
"text": "HTTP-errors module is used for generating errors for Node.js applications. It is very easy to use. We can use it with express, Koa, etc. applications. We will impl... |
Auto-scrolling animation in React.js using react-spring | In this article, we will see how to create a scroll to top animation in React JS using the react-spring package.
First create a react project −
npx create-react-app tutorialpurpose
Now go to the project directory −
cd tutorialpurpose
Install the react-spring package −
npm install react-spring
react-spring is used to ad... | [
{
"code": null,
"e": 1175,
"s": 1062,
"text": "In this article, we will see how to create a scroll to top animation in React JS using the react-spring package."
},
{
"code": null,
"e": 1206,
"s": 1175,
"text": "First create a react project −"
},
{
"code": null,
"e": 1... |
20 Golden Rules to Learn in Software Development - GeeksforGeeks | 23 Oct, 2020
If you are a developer then you might have experienced a few things in your team...
Sometimes it’s difficult for you to make small changes in code.
You break the functionality of software due to the changes you made in your code.
You introduce a new bug while fixing the other one.
You implement some unnece... | [
{
"code": null,
"e": 24928,
"s": 24900,
"text": "\n23 Oct, 2020"
},
{
"code": null,
"e": 25012,
"s": 24928,
"text": "If you are a developer then you might have experienced a few things in your team..."
},
{
"code": null,
"e": 25076,
"s": 25012,
"text": "Someti... |
Tryit Editor v3.7 | HTML Input types
Tryit: default text on submit button | [
{
"code": null,
"e": 27,
"s": 10,
"text": "HTML Input types"
}
] |
How can I add items to a spinner in Android? | Spinner is just like a drop down button, using this button we can select a item from set of items. This example demonstrate about how to add items to a spinner 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 fo... | [
{
"code": null,
"e": 1234,
"s": 1062,
"text": "Spinner is just like a drop down button, using this button we can select a item from set of items. This example demonstrate about how to add items to a spinner in android."
},
{
"code": null,
"e": 1363,
"s": 1234,
"text": "Step 1 − C... |
How can we provide an alias name for an action method in Asp .Net MVC C#? | ActionName attribute is an action selector which is used for a different name of the
action method. We use ActionName attribute when we want that action method to be
called with a different name instead of the actual name of the method.
[ActionName("AliasName")]
using System.Collections.Generic;
using System.Web.Mvc;
n... | [
{
"code": null,
"e": 1299,
"s": 1062,
"text": "ActionName attribute is an action selector which is used for a different name of the\naction method. We use ActionName attribute when we want that action method to be\ncalled with a different name instead of the actual name of the method."
},
{
... |
Can we remove the Title Bar of a Frame in Java? | Yes, we can remove the title bar of a frame using the setUndecorated() method. Set it to TRUE if you don’t want to remove the Title Bar.
The following is an example to remove the title bar of a frame in Java −
package my;
import java.awt.GridLayout;
import javax.swing.JFrame;
import javax.swing.JLabel;
import javax.swi... | [
{
"code": null,
"e": 1199,
"s": 1062,
"text": "Yes, we can remove the title bar of a frame using the setUndecorated() method. Set it to TRUE if you don’t want to remove the Title Bar."
},
{
"code": null,
"e": 1272,
"s": 1199,
"text": "The following is an example to remove the tit... |
Different methods to reverse a string in C/C++ - GeeksforGeeks | 03 Feb, 2022
Given a string, write a C/C++ program to reverse it.
Write own reverse function by swapping characters: One simple solution is to write our own reverse function to reverse a string in C++.CPPCPP// A Simple C++ program to reverse a string#include <bits/stdc++.h>using namespace std; // Function to reverse a... | [
{
"code": null,
"e": 24418,
"s": 24390,
"text": "\n03 Feb, 2022"
},
{
"code": null,
"e": 24471,
"s": 24418,
"text": "Given a string, write a C/C++ program to reverse it."
},
{
"code": null,
"e": 27486,
"s": 24471,
"text": "Write own reverse function by swappin... |
What are the local static variables in C language? | A local static variable is a variable, whose lifetime doesn’t stop with a function call where it is declared. It extends until the lifetime of a complete program. All function calls share the same copy of local static variables.
These variables are used to count the number of times a function is called. The default val... | [
{
"code": null,
"e": 1291,
"s": 1062,
"text": "A local static variable is a variable, whose lifetime doesn’t stop with a function call where it is declared. It extends until the lifetime of a complete program. All function calls share the same copy of local static variables."
},
{
"code": nu... |
CSS 2D Transforms | CSS transforms allow you to move, rotate, scale, and skew elements.
Mouse over the element below to see a 2D transformation:
In this chapter you will learn about the following CSS property:
transform
The numbers in the table specify the first browser version that fully supports the property.
With the CSS transform prop... | [
{
"code": null,
"e": 68,
"s": 0,
"text": "CSS transforms allow you to move, rotate, scale, and skew elements."
},
{
"code": null,
"e": 125,
"s": 68,
"text": "Mouse over the element below to see a 2D transformation:"
},
{
"code": null,
"e": 190,
"s": 125,
"text... |
Java program to generate and print Floyd’s triangle | Floyd's triangle, named after Robert Floyd, is a right-angled triangle, which is made using natural numbers. It starts at 1 and consecutively selects the next greater number in the sequence.
Take a number of rows to be printed, n.
Make outer iteration I for n times to print rows
Make inner iteration for J to I
Print K
... | [
{
"code": null,
"e": 1253,
"s": 1062,
"text": "Floyd's triangle, named after Robert Floyd, is a right-angled triangle, which is made using natural numbers. It starts at 1 and consecutively selects the next greater number in the sequence."
},
{
"code": null,
"e": 1293,
"s": 1253,
... |
How to Commit a Query in JDBC? - GeeksforGeeks | 07 Apr, 2022
COMMIT command is used to permanently save any transaction into the database. It is used to end your current transaction and make permanent all changes performed in the transaction. A transaction is a sequence of SQL statements that Oracle Database treats as a single unit. This statement also erases all sa... | [
{
"code": null,
"e": 23892,
"s": 23864,
"text": "\n07 Apr, 2022"
},
{
"code": null,
"e": 24260,
"s": 23892,
"text": "COMMIT command is used to permanently save any transaction into the database. It is used to end your current transaction and make permanent all changes performed i... |
Change value of input on form submit in JavaScript? | To change value of input, use the concept of document. The syntax is as follows −
document.yourFormName.yourTextName.value=anyValue;
Let’s say the following is our input type calling submitForm() on clicking “Submit Form” −
<form name="studentForm" onsubmit="submitForm();">
<input type="hidden" name="txtInput" value... | [
{
"code": null,
"e": 1144,
"s": 1062,
"text": "To change value of input, use the concept of document. The syntax is as follows −"
},
{
"code": null,
"e": 1195,
"s": 1144,
"text": "document.yourFormName.yourTextName.value=anyValue;"
},
{
"code": null,
"e": 1286,
"s... |
Output of Java Programs | Set 43 (Conditional statements & Loops) | 29 Sep, 2017
Prerequisite: Decision Control and Loops
1. What will be the output of the following program?
class Test {public static void main(String[] args) { int i = 0, j = 9; do { i++; if (j-- < i++) { break; } } while (i < 5); System.... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n29 Sep, 2017"
},
{
"code": null,
"e": 93,
"s": 52,
"text": "Prerequisite: Decision Control and Loops"
},
{
"code": null,
"e": 146,
"s": 93,
"text": "1. What will be the output of the following program?"
},
{
... |
Mediator design pattern | 22 Feb, 2018
Mediator design pattern is one of the important and widely used behavioral design pattern. Mediator enables decoupling of objects by introducing a layer in between so that the interaction between objects happen via the layer. If the objects interact with each other directly, the system components are tight... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n22 Feb, 2018"
},
{
"code": null,
"e": 588,
"s": 52,
"text": "Mediator design pattern is one of the important and widely used behavioral design pattern. Mediator enables decoupling of objects by introducing a layer in between so that th... |
HTML | DOM Input Radio defaultvalue Property | 30 Nov, 2019
The Input Radio defaultValue Property in HTML DOM is used to set or return the default value of a Radio field. This property is used to reflect the HTML value attribute. The main difference between the default value and value is that the default value indicate the default value and the value contains the c... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n30 Nov, 2019"
},
{
"code": null,
"e": 460,
"s": 28,
"text": "The Input Radio defaultValue Property in HTML DOM is used to set or return the default value of a Radio field. This property is used to reflect the HTML value attribute. The m... |
Data type of a Pointer in C++ | 05 Jan, 2022
A pointer is a variable that stores the memory address of an object. The pointer then simply “points” to the object. The type of the object must correspond with the type of the pointer. Pointers are used extensively in both C and C++ for three main purposes:
To allocate new objects on the heap.
To pass fu... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n05 Jan, 2022"
},
{
"code": null,
"e": 288,
"s": 28,
"text": "A pointer is a variable that stores the memory address of an object. The pointer then simply “points” to the object. The type of the object must correspond with the type of t... |
Python | Pandas dataframe.mean() | 19 Nov, 2018
Python is a great language for doing data analysis, primarily because of the fantastic ecosystem of data-centric python packages. Pandas is one of those packages and makes importing and analyzing data much easier.
Pandas dataframe.mean() function return the mean of the values for the requested axis. If the... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n19 Nov, 2018"
},
{
"code": null,
"e": 266,
"s": 52,
"text": "Python is a great language for doing data analysis, primarily because of the fantastic ecosystem of data-centric python packages. Pandas is one of those packages and makes im... |
Python | Ways to determine common prefix in set of strings | 22 Jun, 2022
Given a set of strings, write a Python program to determine common prefix from a set of strings. Given below are a few methods to solve the above task.Method #1: Using Naive Approach
Python3
# Python code to demonstrate# to find common prefix# from set of strings # Initialising stringini_strlist = ['aksh... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n22 Jun, 2022"
},
{
"code": null,
"e": 237,
"s": 52,
"text": "Given a set of strings, write a Python program to determine common prefix from a set of strings. Given below are a few methods to solve the above task.Method #1: Using Naive ... |
Select rows from a DataFrame based on values in a vector in R | 09 May, 2021
In this article, we will discuss how to select rows from a DataFrame based on values in a vector in R Programming Language.
%in% operator in R, is used to identify if an element belongs to a vector or Dataframe. It is used to perform a selection of the elements satisfying the condition. It takes the value ... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n09 May, 2021"
},
{
"code": null,
"e": 152,
"s": 28,
"text": "In this article, we will discuss how to select rows from a DataFrame based on values in a vector in R Programming Language."
},
{
"code": null,
"e": 390,
"s": ... |
unique=True – Django Built-in Field Validation | 13 Feb, 2020
Built-in Field Validations in Django models are the validations that come predefined to all Django fields. Every field comes in with built-in validations from Django validators. One can also add more built-in field validations for applying or removing certain constraints on a particular field. unique=True ... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n13 Feb, 2020"
},
{
"code": null,
"e": 577,
"s": 28,
"text": "Built-in Field Validations in Django models are the validations that come predefined to all Django fields. Every field comes in with built-in validations from Django validator... |
Why would you use the return statement in Python? | The print() function writes, i.e., "prints", a string or a number on the console. The return statement does not print out the value it returns when the function is called. It however causes the function to exit or terminate immediately, even if it is not the last statement of the function.
Functions that return values ... | [
{
"code": null,
"e": 1478,
"s": 1187,
"text": "The print() function writes, i.e., \"prints\", a string or a number on the console. The return statement does not print out the value it returns when the function is called. It however causes the function to exit or terminate immediately, even if it is ... |
Aptitude - Number System | In Decimal number system, there are ten symbols namely 0,1,2,3,4,5,6,7,8 and 9 called digits. A number is denoted by group of these digits called as numerals.
Face value of a digit in a numeral is value of the digit itself. For example in 321, face value of 1 is 1, face value of 2 is 2 and face value of 3 is 3.
Place v... | [
{
"code": null,
"e": 4185,
"s": 4026,
"text": "In Decimal number system, there are ten symbols namely 0,1,2,3,4,5,6,7,8 and 9 called digits. A number is denoted by group of these digits called as numerals."
},
{
"code": null,
"e": 4339,
"s": 4185,
"text": "Face value of a digit i... |
Python program to Count Uppercase, Lowercase, special character and numeric values using Regex | 19 Feb, 2022
Prerequisites: Regular Expression in PythonGiven a string. The task is to count the number of Uppercase, Lowercase, special character and numeric values present in the string using Regular expression in Python.Examples:
Input :
"ThisIsGeeksforGeeks!, 123"
Output :
No. of uppercase characters = 4
No. o... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n19 Feb, 2022"
},
{
"code": null,
"e": 274,
"s": 52,
"text": "Prerequisites: Regular Expression in PythonGiven a string. The task is to count the number of Uppercase, Lowercase, special character and numeric values present in the string... |
Multiply Matrix by Vector in R | 26 Mar, 2021
A matrix is a 2-dimensional structure whereas a vector is a one-dimensional structure. In this article, we are going to multiply the given matrix by the given vector using R Programming Language. Multiplication between the two occurs when vector elements are multiplied with matrix elements column-wise.
App... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n26 Mar, 2021"
},
{
"code": null,
"e": 332,
"s": 28,
"text": "A matrix is a 2-dimensional structure whereas a vector is a one-dimensional structure. In this article, we are going to multiply the given matrix by the given vector using R P... |
Python | Filter list by Boolean list | 27 Sep, 2019
Sometimes, while working with Python list, we can have a problem in which we have to filter a list. This can sometimes, come with variations. One such variation can be filtering by the use of Boolean list. Let’s discuss a way in which this task can be done.
Method : Using itertools.compress()The most elega... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n27 Sep, 2019"
},
{
"code": null,
"e": 286,
"s": 28,
"text": "Sometimes, while working with Python list, we can have a problem in which we have to filter a list. This can sometimes, come with variations. One such variation can be filteri... |
Given a sorted and rotated array, find if there is a pair with a given sum | 22 Jun, 2022
Given an array that is sorted and then rotated around an unknown point. Find if the array has a pair with a given sum ‘x’. It may be assumed that all elements in the array are distinct.
Examples :
Input: arr[] = {11, 15, 6, 8, 9, 10}, x = 16
Output: true
There is a pair (6, 10) with sum 16
Input: arr[] =... | [
{
"code": null,
"e": 54,
"s": 26,
"text": "\n22 Jun, 2022"
},
{
"code": null,
"e": 240,
"s": 54,
"text": "Given an array that is sorted and then rotated around an unknown point. Find if the array has a pair with a given sum ‘x’. It may be assumed that all elements in the array ar... |
Creating dialog boxes with the Dialog Tool in Linux | 22 Jun, 2022
The dialog package is a nifty little tool that was originally created by Savio Lam and is currently maintained by Thomas E. Dickey. This package actually recreates standard Windows dialog boxes in a text environment using ANSI escape control codes. These dialog boxes can be easily incorporated into your sh... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n22 Jun, 2022"
},
{
"code": null,
"e": 407,
"s": 52,
"text": "The dialog package is a nifty little tool that was originally created by Savio Lam and is currently maintained by Thomas E. Dickey. This package actually recreates standard W... |
What’s the yield keyword in JavaScript? | 20 Sep, 2019
yield keyword is used to resume or pause a generator function asynchronously. A generator function is just like a normal function but the difference is that whenever the function is returning any value, it does it with the help of ‘yield’ keyword instead of return it. Yield can’t be called from nested func... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n20 Sep, 2019"
},
{
"code": null,
"e": 360,
"s": 28,
"text": "yield keyword is used to resume or pause a generator function asynchronously. A generator function is just like a normal function but the difference is that whenever the funct... |
C# Program to Get the Full Path of the Current Directory Using Environment Class - GeeksforGeeks | 01 Nov, 2021
In C#, Environment Class provides information about the current platform and manipulates, the current platform. It is useful for getting and setting various operating system-related information. We can use it in such a way that it retrieves command-line arguments information, exit codes information, enviro... | [
{
"code": null,
"e": 23911,
"s": 23883,
"text": "\n01 Nov, 2021"
},
{
"code": null,
"e": 24675,
"s": 23911,
"text": "In C#, Environment Class provides information about the current platform and manipulates, the current platform. It is useful for getting and setting various operat... |
PDFBox - Inserting Image | In the previous chapter, we have seen how to extract text from an existing PDF document. In this chapter, we will discuss how to insert image to a PDF document.
You can insert an image into a PDF document using the createFromFile() and drawImage() methods of the classes PDImageXObject and PDPageContentStream respective... | [
{
"code": null,
"e": 2188,
"s": 2027,
"text": "In the previous chapter, we have seen how to extract text from an existing PDF document. In this chapter, we will discuss how to insert image to a PDF document."
},
{
"code": null,
"e": 2351,
"s": 2188,
"text": "You can insert an ima... |
How to align checkboxes and their labels on cross-browsers using CSS ? - GeeksforGeeks | 21 Dec, 2020
For aligning the checkboxes or radio buttons with their labels can be achieved in many ways. Some of the simplest methods to achieve this are described below with proper code and output in different browsers. Now styling can be done in various ways to align the checkboxes and their labels. For this article... | [
{
"code": null,
"e": 25284,
"s": 25256,
"text": "\n21 Dec, 2020"
},
{
"code": null,
"e": 25661,
"s": 25284,
"text": "For aligning the checkboxes or radio buttons with their labels can be achieved in many ways. Some of the simplest methods to achieve this are described below with ... |
Ruby | Enumerable sum() function - GeeksforGeeks | 05 Dec, 2019
The sum() of enumerable is an inbuilt method in Ruby returns the sum of all the elements in the enumerable. If a block is given, the block is applied to the enumerable, then the sum is computed. If the enumerable is empty, it returns init.
Syntax: enu.sum { |obj| block }
Parameters: The function accepts a ... | [
{
"code": null,
"e": 23600,
"s": 23572,
"text": "\n05 Dec, 2019"
},
{
"code": null,
"e": 23840,
"s": 23600,
"text": "The sum() of enumerable is an inbuilt method in Ruby returns the sum of all the elements in the enumerable. If a block is given, the block is applied to the enumer... |
Java.lang.Integer class and its methods - GeeksforGeeks | 21 Jun, 2021
java.lang.Integer wraps integer data type to an object containing a single field having datatype is int. Constructors :
Integer (int arg) : Constructs integer object representing an int value.
Integer (String arg) : Constructs string object representing a string value.
Integer class methods:
toBinarySt... | [
{
"code": null,
"e": 23583,
"s": 23555,
"text": "\n21 Jun, 2021"
},
{
"code": null,
"e": 23705,
"s": 23583,
"text": "java.lang.Integer wraps integer data type to an object containing a single field having datatype is int. Constructors : "
},
{
"code": null,
"e": 2377... |
Python - Divide and Conquer | In divide and conquer approach, the problem in hand, is divided into smaller sub-problems and then each problem is solved independently. When we keep on dividing the subproblems into even smaller sub-problems, we may eventually reach a stage where no more division is possible. Those "atomic" smallest possible sub-probl... | [
{
"code": null,
"e": 2781,
"s": 2327,
"text": "In divide and conquer approach, the problem in hand, is divided into smaller sub-problems and then each problem is solved independently. When we keep on dividing the subproblems into even smaller sub-problems, we may eventually reach a stage where no mo... |
Set a border around navbar with CSS | To add a border around navbar, set border to <ul>
ul {
border: 2px solid blue;
}
You can try to run the following code to set border
Live Demo
<!DOCTYPE html>
<html>
<head>
<style>
ul {
list-style-type: none;
margin: 0;
padding: 0;
width: 200px;
... | [
{
"code": null,
"e": 1112,
"s": 1062,
"text": "To add a border around navbar, set border to <ul>"
},
{
"code": null,
"e": 1146,
"s": 1112,
"text": "ul {\n border: 2px solid blue;\n}"
},
{
"code": null,
"e": 1198,
"s": 1146,
"text": "You can try to run the fo... |
Clustering: Why to Use it. As an new data science student who came... | by Robert Miller | Towards Data Science | As an new data science student who came from a no coding background, I like to explain complex topics in a simplified way. As if talking to myself before my program started. Well I hope you are all ready for some clustering.
Lets start with what is clustering? It is something that you have done, many times in fact. Its... | [
{
"code": null,
"e": 397,
"s": 172,
"text": "As an new data science student who came from a no coding background, I like to explain complex topics in a simplified way. As if talking to myself before my program started. Well I hope you are all ready for some clustering."
},
{
"code": null,
... |
Hyperparameters Optimization. An introduction on how to fine-tune... | by Pier Paolo Ippolito | Towards Data Science | 1
2
3
4
5
6
7
8
9
10
Powered by Play.ht
Create audio with Play.ht
Create Audio Narrations with Play.ht
Machine Learning models are composed of two different types of parameters:
Hyperparameters = are all the parameters which can be arbitrarily set by the user before starting training (eg. number of estimators in Random... | [
{
"code": null,
"e": 174,
"s": 172,
"text": "1"
},
{
"code": null,
"e": 176,
"s": 174,
"text": "2"
},
{
"code": null,
"e": 178,
"s": 176,
"text": "3"
},
{
"code": null,
"e": 180,
"s": 178,
"text": "4"
},
{
"code": null,
"e": 182... |
How to resize an image in Node Jimp? | NodeJS – Resize() is an inbuilt function that is used to resize the images to the desired size. We can use resize to set the height and width using a 2-pass bilinear algorithm. It can resize an image into any size as declared by the user. We can take input from the user or resize it into fixed Width*Height size.
resize... | [
{
"code": null,
"e": 1376,
"s": 1062,
"text": "NodeJS – Resize() is an inbuilt function that is used to resize the images to the desired size. We can use resize to set the height and width using a 2-pass bilinear algorithm. It can resize an image into any size as declared by the user. We can take in... |
Display Month in MMMM format in Java | The MMMM format for months is like entire month name: January, February, March, etc. We will use it like this.
SimpleDateFormat("MMM");
Let us see an example.
// displaying month in MMMM format SimpleDateFormat simpleformat = new SimpleDateFormat("MMMM");
String strMonth= simpleformat.format(new Date());
System.out.pri... | [
{
"code": null,
"e": 1173,
"s": 1062,
"text": "The MMMM format for months is like entire month name: January, February, March, etc. We will use it like this."
},
{
"code": null,
"e": 1198,
"s": 1173,
"text": "SimpleDateFormat(\"MMM\");"
},
{
"code": null,
"e": 1221,
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.