title stringlengths 3 221 | text stringlengths 17 477k | parsed listlengths 0 3.17k |
|---|---|---|
Stream builder() in Java with Examples | 06 Dec, 2018
Stream builder() returns a builder for a Stream.
Syntax :
static <T> Stream.Builder<T> builder()
where, T is the type of elements.
Return Value : A stream builder.
Example 1 :
// Java code for Stream builder()import java.util.*;import java.util.stream.Stream; class GFG { // Driver code public st... | [
{
"code": null,
"e": 53,
"s": 25,
"text": "\n06 Dec, 2018"
},
{
"code": null,
"e": 102,
"s": 53,
"text": "Stream builder() returns a builder for a Stream."
},
{
"code": null,
"e": 111,
"s": 102,
"text": "Syntax :"
},
{
"code": null,
"e": 186,
"... |
Practice | GeeksforGeeks | A computer science portal for geeks | Popular Company Tags
Amazon
Microsoft
Oracle
Samsung
Adobe
Synopsys
Infosys
Cisco
Wipro
Ola-Cabs
Morgan-Stanley
Goldman-Sachs
show more
Amazon
Microsoft
Oracle
Samsung
Adobe
Synopsys
Infosys
Cisco
Wipro
Ola-Cabs
Morgan-Stanley
Goldman-Sachs
Popular Topic Tags
Maths
Array
Dynamic-Programming
Greedy-Algorithm
Hashi... | [
{
"code": null,
"e": 310,
"s": 169,
"text": "\nPopular Company Tags\n\nAmazon\nMicrosoft\nOracle\nSamsung\nAdobe\nSynopsys\nInfosys\nCisco\nWipro\nOla-Cabs\nMorgan-Stanley\nGoldman-Sachs\nshow more\n\n"
},
{
"code": null,
"e": 317,
"s": 310,
"text": "Amazon"
},
{
"code": ... |
Lovecraft with NLP: Tokenisation and Word Counts | Towards Data Science | This is the second blog post in my series in which I analyse the works of H. P. Lovecraft through the lens of Natural Language Processing. In the first post, we kicked things off by analysing the overall sentiment of the stories. We can’t postpone this any longer, we have to talk about the basis of all NLP analysis: to... | [
{
"code": null,
"e": 694,
"s": 171,
"text": "This is the second blog post in my series in which I analyse the works of H. P. Lovecraft through the lens of Natural Language Processing. In the first post, we kicked things off by analysing the overall sentiment of the stories. We can’t postpone this an... |
Find the single digit sum of alphabetical values of a string - GeeksforGeeks | 11 Nov, 2021
Given string S of size N, the task is to find the single-digit sum by the repetitive sum of digits of the value obtained by the sum of order of all alphabets in the given string.
The order of alphabets is given by the position at which they occur in English Alaphabets.
Examples:
Input: S = “geek”Output: 1E... | [
{
"code": null,
"e": 24301,
"s": 24273,
"text": "\n11 Nov, 2021"
},
{
"code": null,
"e": 24480,
"s": 24301,
"text": "Given string S of size N, the task is to find the single-digit sum by the repetitive sum of digits of the value obtained by the sum of order of all alphabets in th... |
Using findOneAndUpdate () to update in MongoDB? | The findOneAndUpdate() is used to update a single document based on the filter and sort criteria i.e. −
db.collection.findOneAndUpdate(filter, update, options)
Let us create a collection with documents −
> db.demo328.insertOne({Name:"Chris",Marks:67});
{
"acknowledged" : true,
"insertedId" : ObjectId("5e516b19f86... | [
{
"code": null,
"e": 1166,
"s": 1062,
"text": "The findOneAndUpdate() is used to update a single document based on the filter and sort criteria i.e. −"
},
{
"code": null,
"e": 1222,
"s": 1166,
"text": "db.collection.findOneAndUpdate(filter, update, options)"
},
{
"code": ... |
OpenShift - Docker and Kubernetes | OpenShift is built on top of Docker and Kubernetes. All the containers are built on top of Docker cluster, which is basically Kubernetes service on top of Linux machines, using Kubernetes orchestrations feature.
In this process, we build Kubernetes master which controls all the nodes and deploys the containers to all t... | [
{
"code": null,
"e": 2160,
"s": 1948,
"text": "OpenShift is built on top of Docker and Kubernetes. All the containers are built on top of Docker cluster, which is basically Kubernetes service on top of Linux machines, using Kubernetes orchestrations feature."
},
{
"code": null,
"e": 2536... |
Flutter - Introduction to Layouts | Since the core concept of Flutter is Everything is widget, Flutter incorporates a user interface layout functionality into the widgets itself. Flutter provides quite a lot of specially designed widgets like Container, Center, Align, etc., only for the purpose of laying out the user interface. Widgets build by composing... | [
{
"code": null,
"e": 2640,
"s": 2218,
"text": "Since the core concept of Flutter is Everything is widget, Flutter incorporates a user interface layout functionality into the widgets itself. Flutter provides quite a lot of specially designed widgets like Container, Center, Align, etc., only for the p... |
Python 3 - List index() Method | The index() method returns the lowest index in list that obj appears.
Following is the syntax for index() method −
list.index(obj)
obj − This is the object to be find out.
This method returns index of the found object otherwise raise an exception indicating that value does not find.
The following example shows the usa... | [
{
"code": null,
"e": 2410,
"s": 2340,
"text": "The index() method returns the lowest index in list that obj appears."
},
{
"code": null,
"e": 2455,
"s": 2410,
"text": "Following is the syntax for index() method −"
},
{
"code": null,
"e": 2472,
"s": 2455,
"text... |
Using RStudio Project Templates to help the project standardization in data science teams | by Luis Henrique Zanandréa Paese | Towards Data Science | Many works in the data science realm rely solely upon the data scientist/analyst to guarantee the project standardization and code reproducibility; unfortunately, this becomes a source of confusion/disorganization since everybody (even on the same team) have different work strategies. To help ensure that teams share th... | [
{
"code": null,
"e": 661,
"s": 172,
"text": "Many works in the data science realm rely solely upon the data scientist/analyst to guarantee the project standardization and code reproducibility; unfortunately, this becomes a source of confusion/disorganization since everybody (even on the same team) h... |
Engineering Intuitive Computer Vision | by Raveena Jayadev | Towards Data Science | Image classification is one of the hottest fields of machine learning, data science, and AI, and often used to benchmark certain types of AI algorithms — from logistic regression to deep neural networks.
But for now, I want to take your mind away from those hot techniques, and ask ourselves a question: if us humans saw... | [
{
"code": null,
"e": 376,
"s": 172,
"text": "Image classification is one of the hottest fields of machine learning, data science, and AI, and often used to benchmark certain types of AI algorithms — from logistic regression to deep neural networks."
},
{
"code": null,
"e": 682,
"s": ... |
How to get the magnitude of a vector in NumPy? - GeeksforGeeks | 29 Aug, 2020
The fundamental feature of linear algebra are vectors, these are the objects having both direction and magnitude. In Python, NumPy arrays can be used to depict a vector.
There are mainly two ways of getting the magnitude of vector:
By defining an explicit function which computes the magnitude of a given ve... | [
{
"code": null,
"e": 23779,
"s": 23751,
"text": "\n29 Aug, 2020"
},
{
"code": null,
"e": 23949,
"s": 23779,
"text": "The fundamental feature of linear algebra are vectors, these are the objects having both direction and magnitude. In Python, NumPy arrays can be used to depict a v... |
Perl pos Function | This function is used to find the offset or position of the last matched substring. If SCALAR is specified, it will return the offset of the last match on that scalar variable.
You can also assign a value to this function (for example, pos($foo) = 20;) in order to change the starting point of the next match operation.
... | [
{
"code": null,
"e": 2397,
"s": 2220,
"text": "This function is used to find the offset or position of the last matched substring. If SCALAR is specified, it will return the offset of the last match on that scalar variable."
},
{
"code": null,
"e": 2540,
"s": 2397,
"text": "You c... |
Find records from one MySQL table which don't exist in another? | To find the records from one MySQL table which don’t exist in another table we can use the
subquery for the table which does not have the records. This can be better understood using the
given steps −
First a table is created using the create command. The table name is ‘PresentHistory’ and it has
two columns. This is g... | [
{
"code": null,
"e": 1263,
"s": 1062,
"text": "To find the records from one MySQL table which don’t exist in another table we can use the\nsubquery for the table which does not have the records. This can be better understood using the\ngiven steps −"
},
{
"code": null,
"e": 1400,
"s"... |
Autoencoders for the compression of stock market time series | by Gerard Martínez | Towards Data Science | Stock market data space is highly dimensional and, as such, algorithms that try to exploit potential patterns or structure in the price formation can suffer from the so-called “curse of dimensionality”. In this short article, we will explore the potential of 4 different types of autoencoders to capture the dynamic info... | [
{
"code": null,
"e": 864,
"s": 172,
"text": "Stock market data space is highly dimensional and, as such, algorithms that try to exploit potential patterns or structure in the price formation can suffer from the so-called “curse of dimensionality”. In this short article, we will explore the potential... |
Python - How to remove duplicate elements from List - onlinetutorialspoint | PROGRAMMINGJava ExamplesC Examples
Java Examples
C Examples
C Tutorials
aws
JAVAEXCEPTIONSCOLLECTIONSSWINGJDBC
EXCEPTIONS
COLLECTIONS
SWING
JDBC
JAVA 8
SPRING
SPRING BOOT
HIBERNATE
PYTHON
PHP
JQUERY
PROGRAMMINGJava ExamplesC Examples
Java Examples
C Examples
C Tutorials
aws
In this tutorials, we will see how to remove ... | [
{
"code": null,
"e": 158,
"s": 123,
"text": "PROGRAMMINGJava ExamplesC Examples"
},
{
"code": null,
"e": 172,
"s": 158,
"text": "Java Examples"
},
{
"code": null,
"e": 183,
"s": 172,
"text": "C Examples"
},
{
"code": null,
"e": 195,
"s": 183,
... |
Timetk: The R Library for Time Series Analysis | Towards Data Science | Have you ever seen data like weather temperature, stock price, or sales numbers that change over time? I’m pretty sure that you’ve already seen that data in real life at least once. Those are time-series data. Time Series is data where it changes over time, whether it’s caused by other factors or the time itself.
Analy... | [
{
"code": null,
"e": 487,
"s": 172,
"text": "Have you ever seen data like weather temperature, stock price, or sales numbers that change over time? I’m pretty sure that you’ve already seen that data in real life at least once. Those are time-series data. Time Series is data where it changes over tim... |
LTrim() and RTrim() Function in MS Access - GeeksforGeeks | 02 Sep, 2020
1. LTrim() Function :In MS Access LTrim() function remove all the leading spaces from the given string. In LTrim() function a string will be pass as a parameter and it will return the string with no leading spaces.
Syntax :
LTrim(string)
Example-1 :
SELECT LTrim(" GEEKSFORGEEKS") AS LeftTrimmedString;
O... | [
{
"code": null,
"e": 23877,
"s": 23849,
"text": "\n02 Sep, 2020"
},
{
"code": null,
"e": 24092,
"s": 23877,
"text": "1. LTrim() Function :In MS Access LTrim() function remove all the leading spaces from the given string. In LTrim() function a string will be pass as a parameter an... |
Print triplets with sum less than k - GeeksforGeeks | 24 May, 2021
Given an array of distinct integers and a sum value. Print all triplets with sum smaller than given sum value. Expected Time Complexity is O(n2).
Examples:
Input : arr[] = {-2, 0, 1, 3}
sum = 2.
Output : (-2, 0, 1)
(-2, 0, 3)
Explanation : The two triplets have sum less than 2.
Input :... | [
{
"code": null,
"e": 24820,
"s": 24792,
"text": "\n24 May, 2021"
},
{
"code": null,
"e": 24966,
"s": 24820,
"text": "Given an array of distinct integers and a sum value. Print all triplets with sum smaller than given sum value. Expected Time Complexity is O(n2)."
},
{
"co... |
Python 3 - File truncate() Method | The method truncate() truncates the file's size. If the optional size argument is present, the file is truncated to (at most) that size.
The size defaults to the current position. The current file position is not changed. Note that if a specified size exceeds the file's current size, the result is platform-dependent.
N... | [
{
"code": null,
"e": 2477,
"s": 2340,
"text": "The method truncate() truncates the file's size. If the optional size argument is present, the file is truncated to (at most) that size."
},
{
"code": null,
"e": 2659,
"s": 2477,
"text": "The size defaults to the current position. Th... |
C library function - fread() | The C library function size_t fread(void *ptr, size_t size, size_t nmemb, FILE *stream) reads data from the given stream into the array pointed to, by ptr.
Following is the declaration for fread() function.
size_t fread(void *ptr, size_t size, size_t nmemb, FILE *stream)
ptr − This is the pointer to a block of memory w... | [
{
"code": null,
"e": 2163,
"s": 2007,
"text": "The C library function size_t fread(void *ptr, size_t size, size_t nmemb, FILE *stream) reads data from the given stream into the array pointed to, by ptr."
},
{
"code": null,
"e": 2214,
"s": 2163,
"text": "Following is the declarati... |
Read a character from standard input without waiting for a newline in C++ | A portable solution doesn't exist for doing this. On windows, you can use the getch() function from the conio(Console I/O) library to get characters pressed.
#include<iostream>
#include<conio.h>
using namespace std;
int main() {
char c;
while(1){ // infinite loop
c = getch();
cout << c;
}
}
... | [
{
"code": null,
"e": 1220,
"s": 1062,
"text": "A portable solution doesn't exist for doing this. On windows, you can use the getch() function from the conio(Console I/O) library to get characters pressed."
},
{
"code": null,
"e": 1382,
"s": 1220,
"text": "#include<iostream>\n#inc... |
How to print object by id in an array of objects in JavaScript? - GeeksforGeeks | 22 Feb, 2021
We have an array of objects and in every object, there is a key named id and whose value is a number.
Example:
const arr = [
{
'id' : 12,
'name' : 'Ram'
},
{
'id' : 32,
'name' : 'Shyam'
}
]
We want to find the... | [
{
"code": null,
"e": 37970,
"s": 37942,
"text": "\n22 Feb, 2021"
},
{
"code": null,
"e": 38072,
"s": 37970,
"text": "We have an array of objects and in every object, there is a key named id and whose value is a number."
},
{
"code": null,
"e": 38081,
"s": 38072,
... |
GATE | GATE CS 2013 | Question 28 - GeeksforGeeks | 19 Nov, 2018
Consider the following sequence of micro-operations.
MBR ← PC
MAR ← X
PC ← Y
Memory ← MBR
Which one of the following is a possible operation performed by this sequence?(A) Instruction fetch(B) Operand fetch(C) Conditional branch(D) Initiation of interrupt serviceAnswer: (D)Explanat... | [
{
"code": null,
"e": 24326,
"s": 24298,
"text": "\n19 Nov, 2018"
},
{
"code": null,
"e": 24379,
"s": 24326,
"text": "Consider the following sequence of micro-operations."
},
{
"code": null,
"e": 24441,
"s": 24379,
"text": " MBR ← PC \n MAR ← X \n ... |
Groovy - Lists get() | Returns the element at the specified position in this List.
Object get(int index)
Index – The index at which the value needs to be returned.
The value at the index position in the list.
Following is an example of the usage of this method −
class Example {
static void main(String[] args) {
def lst = [11, 12, 1... | [
{
"code": null,
"e": 2298,
"s": 2238,
"text": "Returns the element at the specified position in this List."
},
{
"code": null,
"e": 2321,
"s": 2298,
"text": "Object get(int index)\n"
},
{
"code": null,
"e": 2380,
"s": 2321,
"text": "Index – The index at which ... |
Performing regex Queries with PyMongo? | PyMongo is a Python distribution containing tools for working with MongoDB. To perform regex queries with PyMongo, the syntax is as follows −
db.yourCollectionName.find({'yourCollectionName':{'$regex':'^yourWords'}}).pretty();
The above syntax will give all those documents that start from a specific word.
To understand... | [
{
"code": null,
"e": 1204,
"s": 1062,
"text": "PyMongo is a Python distribution containing tools for working with MongoDB. To perform regex queries with PyMongo, the syntax is as follows −"
},
{
"code": null,
"e": 1289,
"s": 1204,
"text": "db.yourCollectionName.find({'yourCollect... |
Explain the logical operators in DBMS | Logical operators are used to specify conditions in the structured query language (SQL) statement. They are also used to serve as conjunctions for multiple conditions in a statement.
The different logical operators are shown below −
ALL − It is used to compare a value with every value in a list or returned by a query. ... | [
{
"code": null,
"e": 1245,
"s": 1062,
"text": "Logical operators are used to specify conditions in the structured query language (SQL) statement. They are also used to serve as conjunctions for multiple conditions in a statement."
},
{
"code": null,
"e": 1295,
"s": 1245,
"text": ... |
Building and Evaluating Classification ML Models | by Nishit Jain | Towards Data Science | There are different types of problems in machine learning. Some might fall under regression (having continuous targets) while others might fall under classification (having discrete targets). Some might not have a target at all where you are just trying to learn the characteristics of data by distinguishing the data po... | [
{
"code": null,
"e": 552,
"s": 172,
"text": "There are different types of problems in machine learning. Some might fall under regression (having continuous targets) while others might fall under classification (having discrete targets). Some might not have a target at all where you are just trying t... |
Assoc cmd command - GeeksforGeeks | 15 Sep, 2020
Assoc is command (internal) found inside Windows Command Processor Command Prompt, that allows for file extension to file type association. A file extension is generally last few characters in File Name after period (“.”). Though it is not mandatory for file to have an extension at all (in case of extensio... | [
{
"code": null,
"e": 24492,
"s": 24464,
"text": "\n15 Sep, 2020"
},
{
"code": null,
"e": 24814,
"s": 24492,
"text": "Assoc is command (internal) found inside Windows Command Processor Command Prompt, that allows for file extension to file type association. A file extension is gen... |
Spring Boot & H2 - Unit Test Service | To test a Service, we need the following annotation and classes −
@ExtendWith(SpringExtension.class) − Mark the class to run as test case using SpringExtension class.
@ExtendWith(SpringExtension.class) − Mark the class to run as test case using SpringExtension class.
@SpringBootTest(classes = SprintBootH2Application.cl... | [
{
"code": null,
"e": 2162,
"s": 2096,
"text": "To test a Service, we need the following annotation and classes −"
},
{
"code": null,
"e": 2263,
"s": 2162,
"text": "@ExtendWith(SpringExtension.class) − Mark the class to run as test case using SpringExtension class."
},
{
"... |
HTML5 Canvas - Drawing Lines | We require the following methods to draw lines on the canvas −
beginPath()
This method resets the current path.
moveTo(x, y)
This method creates a new subpath with the given point.
closePath()
This method marks the current subpath as closed, and starts a new subpath with a point the same as the start and end of the new... | [
{
"code": null,
"e": 2671,
"s": 2608,
"text": "We require the following methods to draw lines on the canvas −"
},
{
"code": null,
"e": 2683,
"s": 2671,
"text": "beginPath()"
},
{
"code": null,
"e": 2720,
"s": 2683,
"text": "This method resets the current path.... |
Python – Check Similar elements in Matrix rows | 08 Dec, 2020
Given a Matrix and list, the task is to write a Python program to check if all the matrix elements of the row are similar to the ith index of List.
Input : test_list = [[1, 1, 1], [4, 4], [3, 3, 3], [5, 5, 5, 5]] Output : True Explanation : All rows have same elements.
Input : test_list = [[1, 1, 4], [4, 4... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n08 Dec, 2020"
},
{
"code": null,
"e": 176,
"s": 28,
"text": "Given a Matrix and list, the task is to write a Python program to check if all the matrix elements of the row are similar to the ith index of List."
},
{
"code": null,... |
Obtain List of Directories in R | 06 Jun, 2021
A directory or folder in the R programming language may contain other directories. It is possible to access the list of all the directories using base methods in R and return them as a list of folders.
The list.dirs() method in R language is used to retrieve a list of directories present within the path s... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n06 Jun, 2021"
},
{
"code": null,
"e": 231,
"s": 28,
"text": "A directory or folder in the R programming language may contain other directories. It is possible to access the list of all the directories using base methods in R and return ... |
Plot multiple separate graphs for same data from one Python script | 13 Sep, 2021
It is very easy to plot different kinds of maps and plots of different data using Python. One such useful library in Python is Matplotlib which is very useful for creating different types of plots using the same data.
The easiest way to install Matplotlib is by using the pip command in the command-line as ... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n13 Sep, 2021"
},
{
"code": null,
"e": 246,
"s": 28,
"text": "It is very easy to plot different kinds of maps and plots of different data using Python. One such useful library in Python is Matplotlib which is very useful for creating dif... |
Implementing ANDNOT Gate using Adaline Network | 18 Jun, 2019
ADALINE (Adaptive Linear Neuron or later Adaptive Linear Element) is an early single-layer artificial neural network and the name of the physical device that implemented this network. The problem here is to implement AND-NOT using Adaline network. Here we perform 5 epochs of training and calculate total me... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n18 Jun, 2019"
},
{
"code": null,
"e": 442,
"s": 28,
"text": "ADALINE (Adaptive Linear Neuron or later Adaptive Linear Element) is an early single-layer artificial neural network and the name of the physical device that implemented this ... |
Pandas.cut() method in Python | 13 Jul, 2021
Pandas cut() function is used to separate the array elements into different bins . The cut function is mainly used to perform statistical analysis on scalar data.
Syntax: cut(x, bins, right=True, labels=None, retbins=False, precision=3, include_lowest=False, duplicates=”raise”,)
Parameters:
x: The input ... | [
{
"code": null,
"e": 53,
"s": 25,
"text": "\n13 Jul, 2021"
},
{
"code": null,
"e": 218,
"s": 53,
"text": "Pandas cut() function is used to separate the array elements into different bins . The cut function is mainly used to perform statistical analysis on scalar data. "
},
{... |
QuickSort using Random Pivoting | 20 Jun, 2022
In this article, we will discuss how to implement QuickSort using random pivoting. In QuickSort we first partition the array in place such that all elements to the left of the pivot element are smaller, while all elements to the right of the pivot are greater than the pivot. Then we recursively call the sa... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n20 Jun, 2022"
},
{
"code": null,
"e": 671,
"s": 52,
"text": "In this article, we will discuss how to implement QuickSort using random pivoting. In QuickSort we first partition the array in place such that all elements to the left of th... |
JavaScript(ES6) | Object Literal Enhancement | 10 May, 2020
Object literal enhancement is used to group variables from the global scope and form them into javascript objects. It is the process of restructuring or putting back together.
Example 1:
<script>// variable declarationvar name = "Duke";var color = "Brown";var age = 5; // Using Object Literal Enhancement//... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n10 May, 2020"
},
{
"code": null,
"e": 228,
"s": 52,
"text": "Object literal enhancement is used to group variables from the global scope and form them into javascript objects. It is the process of restructuring or putting back together... |
vector::operator= and vector::operator[ ] in C++ STL | 30 Jun, 2022
Vectors are same as dynamic arrays with the ability to resize itself automatically when an element is inserted or deleted, with their storage being handled automatically by the container.
This operator is used to assign new contents to the container by replacing the existing contents. It also modifies the... | [
{
"code": null,
"e": 53,
"s": 25,
"text": "\n30 Jun, 2022"
},
{
"code": null,
"e": 242,
"s": 53,
"text": "Vectors are same as dynamic arrays with the ability to resize itself automatically when an element is inserted or deleted, with their storage being handled automatically by t... |
How to Find the Minimum and Maximum Value from Java HashSet? | 28 Dec, 2020
HashSet is used to store distinct values in Java. The HashSet does not guarantee the constant order of elements over time, which means when we iterate a HashSet, there is no guarantee that we get the same order of elements as we added in order. HashSet does not provide any built-in method to get the maximu... | [
{
"code": null,
"e": 54,
"s": 26,
"text": "\n28 Dec, 2020"
},
{
"code": null,
"e": 383,
"s": 54,
"text": "HashSet is used to store distinct values in Java. The HashSet does not guarantee the constant order of elements over time, which means when we iterate a HashSet, there is no ... |
How to build a DAG Factory on Airflow | by Axel Furlan | Towards Data Science | Let’s look at a pretty simple DAG with 2 tasks...
Isn’t it weird the amount of boilerplate code necessary in order to execute 2 simple python scripts on Airflow? No matter how many DAGs you write, most certainly you will find yourself writing almost all the same variables with the slightest of changes in a lot of diffe... | [
{
"code": null,
"e": 222,
"s": 172,
"text": "Let’s look at a pretty simple DAG with 2 tasks..."
},
{
"code": null,
"e": 503,
"s": 222,
"text": "Isn’t it weird the amount of boilerplate code necessary in order to execute 2 simple python scripts on Airflow? No matter how many DAGs ... |
GridSearchCV or RandomSearchCV?. Comparing two sklearn hyperparameter... | by Brunna Torino | Towards Data Science | Hyperparameter tuning is a powerful tool to enhance your supervised learning models— improving accuracy, precision, and other important metrics by searching the optimal model parameters based on different scoring methods. There are two main options available from sklearn: GridSearchCV and RandomSearchCV. I will go thro... | [
{
"code": null,
"e": 571,
"s": 172,
"text": "Hyperparameter tuning is a powerful tool to enhance your supervised learning models— improving accuracy, precision, and other important metrics by searching the optimal model parameters based on different scoring methods. There are two main options availa... |
3 Awesome Python Libraries That You Should Know About | by Ismael Araujo | Towards Data Science | A few days ago, I published a blog on 5 Python Libraries That You Don’t Know About, But Should. That blog had dozens of thousands of views in less than a week. Thus, I decided to write a part two with other cool libraries that you should try out.
Python is one of the most popular languages in computation. One of the ma... | [
{
"code": null,
"e": 419,
"s": 172,
"text": "A few days ago, I published a blog on 5 Python Libraries That You Don’t Know About, But Should. That blog had dozens of thousands of views in less than a week. Thus, I decided to write a part two with other cool libraries that you should try out."
},
... |
C++ Program for Optimal Page Replacement Algorithm | Given page number and page size; the task is to find number of hits and misses as when we allocate the memory block to a page using Optimal Page Replacement Algorithm.
What is Optimal Page Replacement Algorithm?
Optimal page replacement algorithm is a page replacement algorithm. A page replacement algorithm is an algor... | [
{
"code": null,
"e": 1230,
"s": 1062,
"text": "Given page number and page size; the task is to find number of hits and misses as when we allocate the memory block to a page using Optimal Page Replacement Algorithm."
},
{
"code": null,
"e": 1274,
"s": 1230,
"text": "What is Optima... |
Exploratory Data Analysis in Python - GeeksforGeeks | 26 Apr, 2022
EDA is a phenomenon under data analysis used for gaining a better understanding of data aspects like: – main features of data – variables and relationships that hold between them – identifying which variables are important for our problem We shall look at various exploratory data analysis methods like:
D... | [
{
"code": null,
"e": 24974,
"s": 24946,
"text": "\n26 Apr, 2022"
},
{
"code": null,
"e": 25280,
"s": 24974,
"text": "EDA is a phenomenon under data analysis used for gaining a better understanding of data aspects like: – main features of data – variables and relationships that ho... |
Find and plot your optimal path using OSM, Plotly and NetworkX in Python | by Apurv Priyam | Towards Data Science | Many libraries can be used to plot a path using Google Maps API, but this leads to reduced flexibility. Also, if you use a set of lines to draw a path then, in a lack of better words, it doesn’t look good. Let me give you an example:
Also, on many occasions, you may want some flexibility to not only change the desired ... | [
{
"code": null,
"e": 405,
"s": 171,
"text": "Many libraries can be used to plot a path using Google Maps API, but this leads to reduced flexibility. Also, if you use a set of lines to draw a path then, in a lack of better words, it doesn’t look good. Let me give you an example:"
},
{
"code":... |
Ulong type in C# | The Ulong type in C# is an alias to the System.UInt64 type. It is an Unsigned integer.
Set the Ulong type −
ulong val = 7712059531;
To get the minimum and maximum value for Ulong type −
Console.WriteLine(ulong.MaxValue);
Console.WriteLine(ulong.MinValue);
Here is the complete code −
Live Demo
using System;
using Syste... | [
{
"code": null,
"e": 1149,
"s": 1062,
"text": "The Ulong type in C# is an alias to the System.UInt64 type. It is an Unsigned integer."
},
{
"code": null,
"e": 1170,
"s": 1149,
"text": "Set the Ulong type −"
},
{
"code": null,
"e": 1194,
"s": 1170,
"text": "ulo... |
Time Series Analysis in Python: An Introduction | by Will Koehrsen | Towards Data Science | Additive models for time series modeling
Time series are one of the most common data types encountered in daily life. Financial prices, weather, home energy usage, and even weight are all examples of data that can be collected at regular intervals. Almost every data scientist will encounter time series in their daily w... | [
{
"code": null,
"e": 213,
"s": 172,
"text": "Additive models for time series modeling"
},
{
"code": null,
"e": 1112,
"s": 213,
"text": "Time series are one of the most common data types encountered in daily life. Financial prices, weather, home energy usage, and even weight are a... |
AngularJS | Factory Method - GeeksforGeeks | 30 Aug, 2019
AngularJS Factory Method makes the development process of AngularJS application more robust. A factory is a simple function which allows us to add some logic to a created object and return the created object. The factory is also used to create/return a function in the form of reusable code which can be use... | [
{
"code": null,
"e": 24650,
"s": 24622,
"text": "\n30 Aug, 2019"
},
{
"code": null,
"e": 25253,
"s": 24650,
"text": "AngularJS Factory Method makes the development process of AngularJS application more robust. A factory is a simple function which allows us to add some logic to a ... |
Confusion Matrix for Object Detection | by Kiprono Elijah Koech | Towards Data Science | After training a machine learning classifier, the next step is to evaluate its performance using relevant metric(s). The confusion matrix is one of the evaluation metrics.
A confusion matrix is a table showing the performance of a classifier given some truth values/instances (supervised learning kind of).
But calculati... | [
{
"code": null,
"e": 344,
"s": 172,
"text": "After training a machine learning classifier, the next step is to evaluate its performance using relevant metric(s). The confusion matrix is one of the evaluation metrics."
},
{
"code": null,
"e": 479,
"s": 344,
"text": "A confusion ma... |
Bitwise Logical Operations in R - GeeksforGeeks | 08 May, 2021
Bitwise logical operations are used to perform logical operations bit by bit in a number. This article discusses how bitwise logical operators are used in the R programming language.
The logical operations include:
Let’s discuss these operators in detail.
R programming language uses bitwOr function to perf... | [
{
"code": null,
"e": 25242,
"s": 25214,
"text": "\n08 May, 2021"
},
{
"code": null,
"e": 25425,
"s": 25242,
"text": "Bitwise logical operations are used to perform logical operations bit by bit in a number. This article discusses how bitwise logical operators are used in the R pr... |
Can you extend a static inner class in Java? | A static inner class is a nested class which is a static member of the outer class. It can be accessed without instantiating the outer class, using other static members. Just like static members, a static nested class does not have access to the instance variables and methods of the outer class.
You can extend static i... | [
{
"code": null,
"e": 1359,
"s": 1062,
"text": "A static inner class is a nested class which is a static member of the outer class. It can be accessed without instantiating the outer class, using other static members. Just like static members, a static nested class does not have access to the instanc... |
Check if a number is Fermat Pseudoprime - GeeksforGeeks | 07 May, 2021
Given a number N and a base number A. The task is to check whether the number is a Fermat Pseudoprime to the base. The number N is called as Fermat Pseudoprime to the base A, if
1. A > 1 2. N is a composite number 3. N divides AN-1 – 1.
Examples:
Input : N = 645, a = 2 Output :1 645 = 3*5*43, Hence i... | [
{
"code": null,
"e": 25188,
"s": 25160,
"text": "\n07 May, 2021"
},
{
"code": null,
"e": 25368,
"s": 25188,
"text": "Given a number N and a base number A. The task is to check whether the number is a Fermat Pseudoprime to the base. The number N is called as Fermat Pseudoprime to ... |
SQLite - WHERE Clause | SQLite WHERE clause is used to specify a condition while fetching the data from one table or multiple tables.
If the given condition is satisfied, means true, then it returns the specific value from the table. You will have to use WHERE clause to filter the records and fetching only necessary records.
The WHERE clause ... | [
{
"code": null,
"e": 2748,
"s": 2638,
"text": "SQLite WHERE clause is used to specify a condition while fetching the data from one table or multiple tables."
},
{
"code": null,
"e": 2941,
"s": 2748,
"text": "If the given condition is satisfied, means true, then it returns the spe... |
Check if a Float value is equivalent to an Integer value - GeeksforGeeks | 28 Apr, 2021
Given a floating-point number N, the task is to check if the value of N is equivalent to an integer or not. If found to be true, then print “YES”. Otherwise, print “NO”.
Examples:
Input: N = 1.5Output: NO
Input: N = 1.0Output: YES
Approach: The idea is to use the concept of Type Casting. Follow the steps b... | [
{
"code": null,
"e": 24834,
"s": 24806,
"text": "\n28 Apr, 2021"
},
{
"code": null,
"e": 25004,
"s": 24834,
"text": "Given a floating-point number N, the task is to check if the value of N is equivalent to an integer or not. If found to be true, then print “YES”. Otherwise, print... |
Five Tips for Automatic Python Documentation | by Louis de Bruijn | Towards Data Science | In this story, you will learn how to automatically generate documentation from Python modules with a bit of magic in our custom functions, the package mkgendocs, pre-commit Git hooks, and MkDocs. We will touch upon the following elements
MkDocs & Material installation
Automate type-hints to docstrings
Automate docstrin... | [
{
"code": null,
"e": 410,
"s": 172,
"text": "In this story, you will learn how to automatically generate documentation from Python modules with a bit of magic in our custom functions, the package mkgendocs, pre-commit Git hooks, and MkDocs. We will touch upon the following elements"
},
{
"co... |
Bootstrap - Grid System | In this chapter we shall discuss the Bootstrap Grid System.
As put by wikepedia −
To put in simple words, grids in web design organise and structure content, makes the websites easy to scan and reduces the cognitive load on users.
As put by the official documentation of Bootstrap for grid system −
Let us understand the... | [
{
"code": null,
"e": 3391,
"s": 3331,
"text": "In this chapter we shall discuss the Bootstrap Grid System."
},
{
"code": null,
"e": 3413,
"s": 3391,
"text": "As put by wikepedia −"
},
{
"code": null,
"e": 3562,
"s": 3413,
"text": "To put in simple words, grids... |
aspell command in Linux with examples - GeeksforGeeks | 04 Apr, 2019
aspell command is used as a spell checker in Linux. Generally, it will scan the given files or anything from standard input then it check for misspellings. Finally it allows the user to correct the words interactively.
Syntax:
aspell check [options] filename
Options:
-a : To check individual words.
-c : Ch... | [
{
"code": null,
"e": 24430,
"s": 24402,
"text": "\n04 Apr, 2019"
},
{
"code": null,
"e": 24649,
"s": 24430,
"text": "aspell command is used as a spell checker in Linux. Generally, it will scan the given files or anything from standard input then it check for misspellings. Finally... |
How to handle the Runtime Exception in Java? | The Runtime Exception is the parent class in all exceptions of the Java programming language that are expected to crash or break down the program or application when they occur. Unlike exceptions that are not considered as Runtime Exceptions, Runtime Exceptions are never checked.
The Runtime Exception usually shows the... | [
{
"code": null,
"e": 1343,
"s": 1062,
"text": "The Runtime Exception is the parent class in all exceptions of the Java programming language that are expected to crash or break down the program or application when they occur. Unlike exceptions that are not considered as Runtime Exceptions, Runtime Ex... |
Python - Calculate the variance of a column in a Pandas DataFrame | To calculate the variance of column values, use the var() method. At first, import the required Pandas library −
import pandas as pd
Create a DataFrame with two columns −
dataFrame1 = pd.DataFrame(
{
"Car": ['BMW', 'Lexus', 'Audi', 'Tesla', 'Bentley', 'Jaguar'],
"Units": [100, 150, 110, 80, 110, 90]
}... | [
{
"code": null,
"e": 1175,
"s": 1062,
"text": "To calculate the variance of column values, use the var() method. At first, import the required Pandas library −"
},
{
"code": null,
"e": 1195,
"s": 1175,
"text": "import pandas as pd"
},
{
"code": null,
"e": 1233,
"s... |
Time-Series Forecasting with Google BigQuery ML | by Tobi Sam | Towards Data Science | If you have worked with any kind of forecasting models, you will know how laborious it can be at times especially when trying to predict multiple variables. From identifying if a time-series is stationary or not, to estimation and finally model evaluation, this process is nothing short of time-consuming. For example, b... | [
{
"code": null,
"e": 605,
"s": 171,
"text": "If you have worked with any kind of forecasting models, you will know how laborious it can be at times especially when trying to predict multiple variables. From identifying if a time-series is stationary or not, to estimation and finally model evaluation... |
Sort The Array | Practice | GeeksforGeeks | Given a random set of numbers, Print them in sorted order.
Example 1:
Input:
N = 4
arr[] = {1, 5, 3, 2}
Output: {1, 2, 3, 5}
Explanation: After sorting array will
be like {1, 2, 3, 5}.
Example 2:
Input:
N = 2
arr[] = {3, 1}
Output: {1, 3}
Explanation: After sorting array will
be like {3, 1}.
Your Task:
You don't nee... | [
{
"code": null,
"e": 285,
"s": 226,
"text": "Given a random set of numbers, Print them in sorted order."
},
{
"code": null,
"e": 296,
"s": 285,
"text": "Example 1:"
},
{
"code": null,
"e": 412,
"s": 296,
"text": "Input:\nN = 4\narr[] = {1, 5, 3, 2}\nOutput: {1... |
C++ Pointers ( Incrementing a variable) | Set 1 | Practice | GeeksforGeeks | Given a pointer to a variable a, the task is to complete the function updateVar() which will increment the value of the variable by 10. The function does not returns anything.
Example 1:
Input:
a = 4
Output:
14
Example 2:
Input:
a = 61
Output:
71
Your Task:
Since this is a functional problem you don't have to wo... | [
{
"code": null,
"e": 402,
"s": 226,
"text": "Given a pointer to a variable a, the task is to complete the function updateVar() which will increment the value of the variable by 10. The function does not returns anything."
},
{
"code": null,
"e": 415,
"s": 402,
"text": "Example 1:... |
Useful Excel Functions for Data Science | by Pranjal Saxena | Towards Data Science | A Data Scientist spends plenty of time with the data. And, When we talk about the data, excel come in handy all the time. Excel has many useful functions like addition, subtraction, multiplication, but those are useful for calculation. In the data science field, we need a massive amount of data to train our machine lea... | [
{
"code": null,
"e": 648,
"s": 172,
"text": "A Data Scientist spends plenty of time with the data. And, When we talk about the data, excel come in handy all the time. Excel has many useful functions like addition, subtraction, multiplication, but those are useful for calculation. In the data science... |
eject command in Linux with examples - GeeksforGeeks | 15 May, 2019
eject allows ejecting a removable media (typically a CD-ROM, floppy disk, tape, or JAZ or ZIP disk) using the software. You can also control some multi-disc CD-ROM changers, the auto-eject feature (supported by some devices) and also close the disc tray of some CD-ROM drives. The methods of ejecting depend... | [
{
"code": null,
"e": 24015,
"s": 23987,
"text": "\n15 May, 2019"
},
{
"code": null,
"e": 24565,
"s": 24015,
"text": "eject allows ejecting a removable media (typically a CD-ROM, floppy disk, tape, or JAZ or ZIP disk) using the software. You can also control some multi-disc CD-ROM... |
How to create Tkinter buttons in a Python for loop? | Tkinter Button widgets are very useful in terms of handling events and performing actions during the execution of an application. We can create Tkinter Buttons using the Button(parent, text, option..) constructor. Using the constructor, we can create multiple buttons within the loop.
In this example, we will create mul... | [
{
"code": null,
"e": 1347,
"s": 1062,
"text": "Tkinter Button widgets are very useful in terms of handling events and performing actions during the execution of an application. We can create Tkinter Buttons using the Button(parent, text, option..) constructor. Using the constructor, we can create mu... |
How to set up a GPU VM with Ubuntu 18 on Oracle Cloud | by Luigi Saetta | Towards Data Science | If you want to develop a Deep Learning model and want a good likelihood to be successful, you need two things:
lots of data, for the training of the model
enough computational power, in the form of GPUs
A Deep Learning model commonly is based on a Deep (many layers) Neural Network. The algorithm commonly used for the t... | [
{
"code": null,
"e": 283,
"s": 172,
"text": "If you want to develop a Deep Learning model and want a good likelihood to be successful, you need two things:"
},
{
"code": null,
"e": 327,
"s": 283,
"text": "lots of data, for the training of the model"
},
{
"code": null,
... |
C# General Date Short Time ("g") Format Specifier | The Generate Date Short Time format specifier is a combination of the short date ("d") and short time ("t") patterns, separated by a space.
Set a date using DateTime.
DateTime dt = new DateTime(2018, 10, 2, 7, 59, 20);
Now, use the (“g”) format specifier.
dt.ToString("g", DateTimeFormatInfo.InvariantInfo));
Live Demo
... | [
{
"code": null,
"e": 1202,
"s": 1062,
"text": "The Generate Date Short Time format specifier is a combination of the short date (\"d\") and short time (\"t\") patterns, separated by a space."
},
{
"code": null,
"e": 1229,
"s": 1202,
"text": "Set a date using DateTime."
},
{
... |
Getting error- <type table> is not an internal table “OCCURS n” specification is missing in SAP method | You need to define the et_flights parameter as of type SFLIGHT. As per method defined, you have this type as structure type and also declare transparent table SFLIGHT at the same time.
You should use an already available dictionary table type with row structure of SFLIGHT for et_flight.
You should declare et_flights in... | [
{
"code": null,
"e": 1247,
"s": 1062,
"text": "You need to define the et_flights parameter as of type SFLIGHT. As per method defined, you have this type as structure type and also declare transparent table SFLIGHT at the same time."
},
{
"code": null,
"e": 1350,
"s": 1247,
"text"... |
Median in a row-wise sorted Matrix | Practice | GeeksforGeeks | Given a row wise sorted matrix of size RxC where R and C are always odd, find the median of the matrix.
Example 1:
Input:
R = 3, C = 3
M = [[1, 3, 5],
[2, 6, 9],
[3, 6, 9]]
Output: 5
Explanation:
Sorting matrix elements gives us
{1,2,3,3,5,6,6,9,9}. Hence, 5 is median.
Example 2:
Input:
R = 3, C = 1
... | [
{
"code": null,
"e": 342,
"s": 238,
"text": "Given a row wise sorted matrix of size RxC where R and C are always odd, find the median of the matrix."
},
{
"code": null,
"e": 353,
"s": 342,
"text": "Example 1:"
},
{
"code": null,
"e": 525,
"s": 353,
"text": "In... |
Understanding ROC Curves with Python | by Lucas Soares | Towards Data Science | If you google: “ROC curve machine learning”, you get a Wikipedia answer like this:
A receiver operating characteristic curve, or ROC curve, is a graphical plot that illustrates the diagnostic ability of a binary classifier system as its discrimination threshold is varied
Another common description is that the ROC Curve... | [
{
"code": null,
"e": 254,
"s": 171,
"text": "If you google: “ROC curve machine learning”, you get a Wikipedia answer like this:"
},
{
"code": null,
"e": 443,
"s": 254,
"text": "A receiver operating characteristic curve, or ROC curve, is a graphical plot that illustrates the diagn... |
How to add special characters to text to print in color in the console in JavaScript ? - GeeksforGeeks | 15 Apr, 2021
The purpose of this article is to add special characters to text to print in color in the console in JavaScript.
Approach: The ANSI escape codes help change/specify the color of the output in the console. The color of the output of the console can be changed by adding these escape codes just before the act... | [
{
"code": null,
"e": 25246,
"s": 25218,
"text": "\n15 Apr, 2021"
},
{
"code": null,
"e": 25359,
"s": 25246,
"text": "The purpose of this article is to add special characters to text to print in color in the console in JavaScript."
},
{
"code": null,
"e": 25564,
"s... |
ASP.NET Core - Project Layout | In this chapter, we will discuss how ASP.NET core project appears on the file system and how the different files and directories all work together.
Let us open the FirstAppDemo project created in the previous chapter.
In the Solution Explorer window, right-click on the Solution node and select the Open Folder in File E... | [
{
"code": null,
"e": 2609,
"s": 2461,
"text": "In this chapter, we will discuss how ASP.NET core project appears on the file system and how the different files and directories all work together."
},
{
"code": null,
"e": 2679,
"s": 2609,
"text": "Let us open the FirstAppDemo proje... |
\backsimeq - Tex Command | \backsimeq - Command to show back sim equal symbol
{ \backsimeq }
\backsimeq command shows back sim symbol.
\backsimeq
⋍
\backsimeq
⋍
\backsimeq
14 Lectures
52 mins
Ashraf Said
11 Lectures
1 hours
Ashraf Said
9 Lectures
1 hours
Emenwa Global, Ejike IfeanyiChukwu
... | [
{
"code": null,
"e": 8037,
"s": 7986,
"text": "\\backsimeq - Command to show back sim equal symbol"
},
{
"code": null,
"e": 8052,
"s": 8037,
"text": "{ \\backsimeq }"
},
{
"code": null,
"e": 8094,
"s": 8052,
"text": "\\backsimeq command shows back sim symbol."... |
How to change a table's fontsize with matplotlib.pyplot? | To change a table's fontsize with matplotlib, we can use set_fontsize() method.
Create a figure and a set of subplots, nrows=1 and ncols=1.
Create random data using numpy.
Create columns value.
Make the axis tight and off.
Initialize a variable fontsize to change the font size.
Set the font size of the table using set_... | [
{
"code": null,
"e": 1142,
"s": 1062,
"text": "To change a table's fontsize with matplotlib, we can use set_fontsize() method."
},
{
"code": null,
"e": 1202,
"s": 1142,
"text": "Create a figure and a set of subplots, nrows=1 and ncols=1."
},
{
"code": null,
"e": 1234,... |
Design a Drum-kit web app using JavaScript - GeeksforGeeks | 08 Feb, 2021
We all must have seen a drum kit in some concert or elsewhere, it is a collection of drums, cymbals and other percussion instruments. But have you ever imagined making that drum kit on your own virtually with the help of some scripting language? Well, so here we are with the goal for this article to build ... | [
{
"code": null,
"e": 24985,
"s": 24957,
"text": "\n08 Feb, 2021"
},
{
"code": null,
"e": 25765,
"s": 24985,
"text": "We all must have seen a drum kit in some concert or elsewhere, it is a collection of drums, cymbals and other percussion instruments. But have you ever imagined ma... |
How to Make CardView Checkable In Android? - GeeksforGeeks | 28 Jan, 2021
In Android, We can make a CardView checkable, which can be really a useful feature. If we want the user to select some items and want to display the items that the user has chosen then this one is the most important feature for us. A sample GIF is given below to get an idea about what we are going to do in... | [
{
"code": null,
"e": 24751,
"s": 24723,
"text": "\n28 Jan, 2021"
},
{
"code": null,
"e": 25150,
"s": 24751,
"text": "In Android, We can make a CardView checkable, which can be really a useful feature. If we want the user to select some items and want to display the items that the... |
Multiply a given Integer with 3.5 - GeeksforGeeks | 13 Oct, 2021
Given an integer x, write a function that multiplies x with 3.5 and returns the integer result. You are not allowed to use %, /, *.
Examples :
Input: 2
Output: 7
Input: 5
Output: 17 (Ignore the digits after decimal point)
Solution: 1. We can get x*3.5 by adding 2*x, x and x/2. To calculate 2*x, left shif... | [
{
"code": null,
"e": 24567,
"s": 24539,
"text": "\n13 Oct, 2021"
},
{
"code": null,
"e": 24700,
"s": 24567,
"text": "Given an integer x, write a function that multiplies x with 3.5 and returns the integer result. You are not allowed to use %, /, *. "
},
{
"code": null,
... |
A Simple HDR Implementation on OpenCV Python | by Felipe Cunha | Towards Data Science | HDR images encompass the information of multiple pictures with different exposures. In a scene which the source of light is uneven, a single shot may overexpose certain areas of the image and details will be lost due to elevated brightness. Conversely, this picture may also present underexposed areas which will also le... | [
{
"code": null,
"e": 515,
"s": 171,
"text": "HDR images encompass the information of multiple pictures with different exposures. In a scene which the source of light is uneven, a single shot may overexpose certain areas of the image and details will be lost due to elevated brightness. Conversely, th... |
RSpec - Helpers | Sometimes your RSpec examples need an easy way to share reusable code. The best way to accomplish this is with Helpers. Helpers are basically regular Ruby methods which you share across examples. To illustrate the benefit of using helpers, let’s consider this code −
class Dog
attr_reader :good_dog, :has_been_walked... | [
{
"code": null,
"e": 2061,
"s": 1794,
"text": "Sometimes your RSpec examples need an easy way to share reusable code. The best way to accomplish this is with Helpers. Helpers are basically regular Ruby methods which you share across examples. To illustrate the benefit of using helpers, let’s conside... |
C# | Collection Class - GeeksforGeeks | 01 Feb, 2019
Collection<T> Class provides the base class for a generic collection. Here T is the type of elements in the collection. This class comes under the System.Collections.ObjectModel namespace.
Characteristics:
The Collection<T> class can be used immediately by creating an instance of one of its constructed typ... | [
{
"code": null,
"e": 24889,
"s": 24861,
"text": "\n01 Feb, 2019"
},
{
"code": null,
"e": 25078,
"s": 24889,
"text": "Collection<T> Class provides the base class for a generic collection. Here T is the type of elements in the collection. This class comes under the System.Collectio... |
PL/SQL - Functions | In this chapter, we will discuss the functions in PL/SQL. A function is same as a procedure except that it returns a value. Therefore, all the discussions of the previous chapter are true for functions too.
A standalone function is created using the CREATE FUNCTION statement. The simplified syntax for the CREATE OR REP... | [
{
"code": null,
"e": 2272,
"s": 2065,
"text": "In this chapter, we will discuss the functions in PL/SQL. A function is same as a procedure except that it returns a value. Therefore, all the discussions of the previous chapter are true for functions too."
},
{
"code": null,
"e": 2426,
... |
Batch Script - NET STATISTICS | Display network statistics of the workstation or server.
Net statistics [SERVER/WORKSTATION]
Net statistics Server
Server Statistics for \\WIN-50GP30FGO75
Statistics since 1/3/2016 9:16:28 PM
Sessions accepted 0
Sessions timed-out 0
Sessions errored-out 0
Kilobytes sent... | [
{
"code": null,
"e": 2226,
"s": 2169,
"text": "Display network statistics of the workstation or server."
},
{
"code": null,
"e": 2263,
"s": 2226,
"text": "Net statistics [SERVER/WORKSTATION]\n"
},
{
"code": null,
"e": 2285,
"s": 2263,
"text": "Net statistics S... |
Bootstrap pre tag styling | If the code needs to be displayed as a standalone block element or if it has multiple lines, then you should use the <pre> tag.
You can try to run the following code to implement the pre tag for code −
Live Demo
<!DOCTYPE html>
<html>
<head>
<title>Bootstrap Example</title>
<link href = "/bootstrap/css/b... | [
{
"code": null,
"e": 1190,
"s": 1062,
"text": "If the code needs to be displayed as a standalone block element or if it has multiple lines, then you should use the <pre> tag."
},
{
"code": null,
"e": 1264,
"s": 1190,
"text": "You can try to run the following code to implement the... |
Program to replace all digits with characters using Python | Suppose we have an alphanumeric string s that contains lowercase English letters in its even positions and digits in its odd positions. Consider an operation shift(c, x), where c is any character and x is a number (digit), this will find the xth character after c. So, for example, shift('p', 5) = 'u' and shift('a', 0) ... | [
{
"code": null,
"e": 1522,
"s": 1062,
"text": "Suppose we have an alphanumeric string s that contains lowercase English letters in its even positions and digits in its odd positions. Consider an operation shift(c, x), where c is any character and x is a number (digit), this will find the xth charact... |
How to extract the p-value from t test in R? | To extract the p-value from t test in R, we can follow the below steps −
First of all, create a data frame with numerical column or a numerical vector.
Then, use t.test function to perform the test and put $p.value at the end to extract the p-value from the test output.
Create the data frame
Let's create a data frame a... | [
{
"code": null,
"e": 1135,
"s": 1062,
"text": "To extract the p-value from t test in R, we can follow the below steps −"
},
{
"code": null,
"e": 1214,
"s": 1135,
"text": "First of all, create a data frame with numerical column or a numerical vector."
},
{
"code": null,
... |
How to auto-increment the property of a JSONObject in Java? | A JSONObject is an unordered collection of name/value pairs and parses text from a String to produce a map-like object. However, we can auto-increment the property of a JSONObject using the increment() method of JSONObject class. If there is no such property, create one with a value of 1. If there is such a property an... | [
{
"code": null,
"e": 1447,
"s": 1062,
"text": "A JSONObject is an unordered collection of name/value pairs and parses text from a String to produce a map-like object. However, we can auto-increment the property of a JSONObject using the increment() method of JSONObject class. If there is no such pro... |
How to Solve Analogies with Word2Vec | by Khuyen Tran | Towards Data Science | To make words understood by machine learning algorithms, word embedding is used to map words into vectors of real numbers. There are various word embedding models and word2vec is one of them.
In simple words, word2vec is a group of related models that are used to produce word embeddings. These models are trained to con... | [
{
"code": null,
"e": 364,
"s": 172,
"text": "To make words understood by machine learning algorithms, word embedding is used to map words into vectors of real numbers. There are various word embedding models and word2vec is one of them."
},
{
"code": null,
"e": 691,
"s": 364,
"te... |
Tryit Editor v3.7 | Tryit: Sort the flex items | [] |
PyQt5 - Gradient Color Progress Bar - GeeksforGeeks | 22 Apr, 2020
In this article we will see how we can set gradient color to the progress bar. Below is how normal color progress bar looks like vs the gradient color progress bar looks like.
In order to do this we have to change the CSS style sheet, below is the code for style sheet.
QProgressBar::chunk
{
border : 1px ... | [
{
"code": null,
"e": 24508,
"s": 24480,
"text": "\n22 Apr, 2020"
},
{
"code": null,
"e": 24685,
"s": 24508,
"text": "In this article we will see how we can set gradient color to the progress bar. Below is how normal color progress bar looks like vs the gradient color progress bar... |
Tryit Editor v3.7 | Tryit: Link URL's | [] |
Represent the fraction of two numbers in the string format | 03 Sep, 2021
Given two integers representing the Numerator and Denominator of a fraction, return the fraction in string format. If the fractional part is repeating, enclose the repeating part in parentheses.
Examples:
Input: Numerator = 1, Denominator = 2
Output: "0.5"
1/2 = 0.5 with no repeating part.
Input: Numerat... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n03 Sep, 2021"
},
{
"code": null,
"e": 247,
"s": 52,
"text": "Given two integers representing the Numerator and Denominator of a fraction, return the fraction in string format. If the fractional part is repeating, enclose the repeating ... |
Python | Pandas dataframe.resample() | 22 Oct, 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 dataframe.resample() function is primarily used for time series data.A time series is ... | [
{
"code": null,
"e": 53,
"s": 25,
"text": "\n22 Oct, 2019"
},
{
"code": null,
"e": 267,
"s": 53,
"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... |
Java Integer compare() method | 05 Dec, 2018
The compare() method of Integer class of java.lang package compares two integer values (x, y) givenas a parameter and returns the value zero if (x==y), if (x < y) then it returns a value less than zero andif (x > y) then it returns a value greater than zero.
Syntax :
public static int compare(int x, int y)... | [
{
"code": null,
"e": 53,
"s": 25,
"text": "\n05 Dec, 2018"
},
{
"code": null,
"e": 312,
"s": 53,
"text": "The compare() method of Integer class of java.lang package compares two integer values (x, y) givenas a parameter and returns the value zero if (x==y), if (x < y) then it ret... |
ReactJS UI Ant Design Upload Component | 03 Jun, 2021
Ant Design Library has this component pre-built, and it is very easy to integrate as well. Upload Component is used for uploading files by selecting or dragging. We can use the following approach in ReactJS to use the Ant Design Upload Component.
Upload Props:
accept: It is used to denote the file types th... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n03 Jun, 2021"
},
{
"code": null,
"e": 275,
"s": 28,
"text": "Ant Design Library has this component pre-built, and it is very easy to integrate as well. Upload Component is used for uploading files by selecting or dragging. We can use th... |
Maximum repeated frequency of characters in a given string | 09 Jun, 2021
Given a string S, the task is to find the count of maximum repeated frequency of characters in the given string S.Examples:
Input: S = “geeksgeeks” Output: Frequency 2 is repeated 3 times Explanation: Frequency of characters in the given string – {“g”: 2, “e”: 4, “k”: 2, “s”: 2} The frequency 2 is repeat... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n09 Jun, 2021"
},
{
"code": null,
"e": 154,
"s": 28,
"text": "Given a string S, the task is to find the count of maximum repeated frequency of characters in the given string S.Examples: "
},
{
"code": null,
"e": 624,
"s"... |
Minimum number of Water to Land conversion to make two islands connected in a Grid | 04 Apr, 2022
Given a 2D grid arr[][] of ‘W’ and ‘L’ where ‘W’ denotes water and ‘L’ denotes land, the task is to find the minimum number of water components ‘W’ that must be changed to land component ‘L’ so that two islands becomes connected.
An island is the set of connected ‘L’s.
Note: There can be only two disjoin... | [
{
"code": null,
"e": 54,
"s": 26,
"text": "\n04 Apr, 2022"
},
{
"code": null,
"e": 285,
"s": 54,
"text": "Given a 2D grid arr[][] of ‘W’ and ‘L’ where ‘W’ denotes water and ‘L’ denotes land, the task is to find the minimum number of water components ‘W’ that must be changed to la... |
How to create an HTML checkbox with a clickable label? | 10 Apr, 2019
To make an HTML checkbox with a clickable label means the checkbox gets on/off when the label is clicked.
Below are the methods:
Using checkbox inside label tag:<!DOCTYPE html><html> <head> <title> Create an HTML checkbox with a clickable label </title> <!-- Adding Style to label --> ... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n10 Apr, 2019"
},
{
"code": null,
"e": 134,
"s": 28,
"text": "To make an HTML checkbox with a clickable label means the checkbox gets on/off when the label is clicked."
},
{
"code": null,
"e": 157,
"s": 134,
"text": "... |
SQL query to find unique column values from table | 13 Aug, 2020
We take a sample table named Geeks and return unique column values by applying various SQL queries on it.
SQL query to find unique values of column department from Geeks table.
Select distinct DEPARTMENT
from Geeks;
Output –
SQL query to find details of column department where name as “DBA”.
Select *
fro... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n13 Aug, 2020"
},
{
"code": null,
"e": 134,
"s": 28,
"text": "We take a sample table named Geeks and return unique column values by applying various SQL queries on it."
},
{
"code": null,
"e": 205,
"s": 134,
"text": "... |
Tuples in C++ | 26 Jun, 2020
What is a tuple?A tuple is an object that can hold a number of elements. The elements can be of different data types. The elements of tuples are initialized as arguments in order in which they will be accessed.
Operations on tuple :-
1. get() :- get() is used to access the tuple values and modify them, it ... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n26 Jun, 2020"
},
{
"code": null,
"e": 263,
"s": 52,
"text": "What is a tuple?A tuple is an object that can hold a number of elements. The elements can be of different data types. The elements of tuples are initialized as arguments in o... |
Boolean Indexing in Pandas - GeeksforGeeks | 21 Oct, 2021
In boolean indexing, we will select subsets of data based on the actual values of the data in the DataFrame and not on their row/column labels or integer locations. In boolean indexing, we use a boolean vector to filter the data.
Boolean indexing is a type of indexing which uses actual values of the data... | [
{
"code": null,
"e": 41554,
"s": 41526,
"text": "\n21 Oct, 2021"
},
{
"code": null,
"e": 41786,
"s": 41554,
"text": "In boolean indexing, we will select subsets of data based on the actual values of the data in the DataFrame and not on their row/column labels or integer locations... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.