title stringlengths 3 221 | text stringlengths 17 477k | parsed listlengths 0 3.17k |
|---|---|---|
QTP - Data Table Object Methods | Consider the following DataTable −
'Accessing Datatable to get Row Count and Column Count
rowcount = DataTable.GetSheet("Global").GetRowCount
msgbox rowcount ' Displays 4
colcount = DataTable.GetSheet("Global").GetParameterCount
msgbox colcount ' Displays 3
DataTable.SetCurrentRow(2)
val_rate = DataTable.... | [
{
"code": null,
"e": 2157,
"s": 2122,
"text": "Consider the following DataTable −"
},
{
"code": null,
"e": 2654,
"s": 2157,
"text": "'Accessing Datatable to get Row Count and Column Count\nrowcount = DataTable.GetSheet(\"Global\").GetRowCount\nmsgbox rowcount ' Displays 4\n ... |
How to implement reactive streams using Flow API in Java 9? | Flow API is official support for reactive streams specification since Java 9. It is a combination of both Iterator and Observer patterns. The Flow API is an interoperation specification and not an end-user API like RxJava.
Flow API consists of four basic interfaces:
Subscriber: The Subscriber subscribes to Publisher fo... | [
{
"code": null,
"e": 1285,
"s": 1062,
"text": "Flow API is official support for reactive streams specification since Java 9. It is a combination of both Iterator and Observer patterns. The Flow API is an interoperation specification and not an end-user API like RxJava."
},
{
"code": null,
... |
Agile Testing | A software testing practice that follows the principles of agile software development is called Agile Testing. Agile is an iterative development methodology, where requirements evolve through collaboration between the customer and self-organizing teams and agile aligns development with customer needs.
Agile Testing Sav... | [
{
"code": null,
"e": 6048,
"s": 5745,
"text": "A software testing practice that follows the principles of agile software development is called Agile Testing. Agile is an iterative development methodology, where requirements evolve through collaboration between the customer and self-organizing teams ... |
How to print the largest value from Python dictionary? | Python's built-in dictionary class has values() method which returns list of value component from each key-value pair. Using built-in function max() the largest value in the dictionary can be obtained
>>> dct={1:45,2:76,3:12,4:55,5:33}
>>> vlist=dct.values()
>>> vlist
dict_values([45, 76, 12, 55, 33])
>>> max(vlist)
76 | [
{
"code": null,
"e": 1263,
"s": 1062,
"text": "Python's built-in dictionary class has values() method which returns list of value component from each key-value pair. Using built-in function max() the largest value in the dictionary can be obtained"
},
{
"code": null,
"e": 1383,
"s": ... |
Naive Bayes Classifier in R Programming | 13 Jul, 2021
Naive Bayes is a Supervised Non-linear classification algorithm in R Programming. Naive Bayes classifiers are a family of simple probabilistic classifiers based on applying Baye’s theorem with strong(Naive) independence assumptions between the features or variables. The Naive Bayes algorithm is called “Nai... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n13 Jul, 2021"
},
{
"code": null,
"e": 465,
"s": 28,
"text": "Naive Bayes is a Supervised Non-linear classification algorithm in R Programming. Naive Bayes classifiers are a family of simple probabilistic classifiers based on applying Ba... |
Implementation of lower_bound() and upper_bound() in Vector of Pairs in C++ | 27 May, 2022
In this article we will discuss the implementation of the lower_bound() and upper_bound() in vector of pairs.
lower_bound(): It returns an iterator pointing to the first element in the range [first, last) which has a value greater than or equals to the given value “val”. But in Vector of Pairs lower_bound... | [
{
"code": null,
"e": 53,
"s": 25,
"text": "\n27 May, 2022"
},
{
"code": null,
"e": 164,
"s": 53,
"text": "In this article we will discuss the implementation of the lower_bound() and upper_bound() in vector of pairs. "
},
{
"code": null,
"e": 654,
"s": 164,
"te... |
Split large Pandas Dataframe into list of smaller Dataframes | 05 Sep, 2020
In this article, we will learn about the splitting of large dataframe into list of smaller dataframes. This can be done mainly in two different ways :
By splitting each rowUsing the concept of groupby
By splitting each row
Using the concept of groupby
Here we use a small dataframe to understand the concept... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n05 Sep, 2020"
},
{
"code": null,
"e": 203,
"s": 52,
"text": "In this article, we will learn about the splitting of large dataframe into list of smaller dataframes. This can be done mainly in two different ways :"
},
{
"code": n... |
How to create a duplicate file of an existing file using Python? | 26 Oct, 2021
In this article, we will discuss how to create a duplicate of the existing file in Python. Below are the source and destination folders, before creating the duplicate file in the destination folder.
After a duplicate file has been created in the destination folder, it looks like the image below.
For automa... | [
{
"code": null,
"e": 53,
"s": 25,
"text": "\n26 Oct, 2021"
},
{
"code": null,
"e": 252,
"s": 53,
"text": "In this article, we will discuss how to create a duplicate of the existing file in Python. Below are the source and destination folders, before creating the duplicate file in... |
Flutter – WebSockets | 10 Sep, 2020
WebSockets are used to connect with the server just like the http package. It supports two-way communication with a server without polling.
In this article we will explore the below-listed topics related to WebSockets in Flutter:
Connecting to a WebSocket serverListen to messages from the server.Send data ... | [
{
"code": null,
"e": 54,
"s": 26,
"text": "\n10 Sep, 2020"
},
{
"code": null,
"e": 194,
"s": 54,
"text": "WebSockets are used to connect with the server just like the http package. It supports two-way communication with a server without polling."
},
{
"code": null,
"e... |
How to use xPath in Selenium WebDriver to grab SVG elements? | We can use xpath to grab SVG elements with Selenium webdriver. A SVG element is identified with tagname svg. The svg image has the attributes like width and height attributes.
Let us investigate the html code of a svg element.
To create a xpath for a svg element, we have the syntax as //*[local-name()='svg'].
The local... | [
{
"code": null,
"e": 1363,
"s": 1187,
"text": "We can use xpath to grab SVG elements with Selenium webdriver. A SVG element is identified with tagname svg. The svg image has the attributes like width and height attributes."
},
{
"code": null,
"e": 1414,
"s": 1363,
"text": "Let us... |
Binning in Data Mining | 15 Jun, 2022
Data binning, bucketing is a data pre-processing method used to minimize the effects of small observation errors. The original data values are divided into small intervals known as bins and then they are replaced by a general value calculated for that bin. This has a smoothing effect on the input data and ... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n15 Jun, 2022"
},
{
"code": null,
"e": 457,
"s": 28,
"text": "Data binning, bucketing is a data pre-processing method used to minimize the effects of small observation errors. The original data values are divided into small intervals kno... |
How to return an array from async function in Node.js ? | 01 Jul, 2021
We have to call the async function from another function which can be asynchronous or synchronous (We can pass the array or choose to declare the array in the async function itself) and then return the array from the async function.
The basic approach is to include a try-catch block. If anything wrong happ... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n01 Jul, 2021"
},
{
"code": null,
"e": 261,
"s": 28,
"text": "We have to call the async function from another function which can be asynchronous or synchronous (We can pass the array or choose to declare the array in the async function i... |
C++ Program to Implement Binary Heap | A Binary Heap is a complete binary tree which is either Min Heap or Max Heap. In a Max Binary Heap, the key at root must be maximum among all keys present in Binary Heap. This property must be recursively true for all nodes in that Binary Tree. Min Binary Heap is similar to MinHeap.
void BHeap::Insert(int ele): Perform... | [
{
"code": null,
"e": 1471,
"s": 1187,
"text": "A Binary Heap is a complete binary tree which is either Min Heap or Max Heap. In a Max Binary Heap, the key at root must be maximum among all keys present in Binary Heap. This property must be recursively true for all nodes in that Binary Tree. Min Bina... |
Loops in Java | 11 May, 2022
Looping in programming languages is a feature which facilitates the execution of a set of instructions/functions repeatedly while some condition evaluates to true. Java provides three ways for executing the loops. While all the ways provide similar basic functionality, they differ in their syntax and condi... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n11 May, 2022"
},
{
"code": null,
"e": 379,
"s": 52,
"text": "Looping in programming languages is a feature which facilitates the execution of a set of instructions/functions repeatedly while some condition evaluates to true. Java provi... |
Sum of Fibonacci Numbers with alternate negatives | 06 May, 2021
Given a positive integer n, the task is to find the value of F1 – F2 + F3 -..........+ (-1)n+1Fn where Fi denotes i-th Fibonacci number.Fibonacci Numbers: The Fibonacci numbers are the numbers in the following integer sequence.
0, 1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89, 144, ....
In mathematical terms, the ... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n06 May, 2021"
},
{
"code": null,
"e": 257,
"s": 28,
"text": "Given a positive integer n, the task is to find the value of F1 – F2 + F3 -..........+ (-1)n+1Fn where Fi denotes i-th Fibonacci number.Fibonacci Numbers: The Fibonacci number... |
SQL - Distinct Keyword | The SQL DISTINCT keyword is used in conjunction with the SELECT statement to eliminate all the duplicate records and fetching only unique records.
There may be a situation when you have multiple duplicate records in a table. While fetching such records, it makes more sense to fetch only those unique records instead of ... | [
{
"code": null,
"e": 2734,
"s": 2587,
"text": "The SQL DISTINCT keyword is used in conjunction with the SELECT statement to eliminate all the duplicate records and fetching only unique records."
},
{
"code": null,
"e": 2935,
"s": 2734,
"text": "There may be a situation when you h... |
Node.js NPM string-to-arraybuffer Module | 02 Feb, 2022
NPM(Node Package Manager) is a package manager of Node.js packages. There is a NPM package called ‘shortid’ used to short non-sequential url-friendly unique ids.
Command to install:
npm install string-to-arraybuffer
Syntax to import the package in local file
const str2ab = require('string-to-arraybuffer'... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n02 Feb, 2022"
},
{
"code": null,
"e": 190,
"s": 28,
"text": "NPM(Node Package Manager) is a package manager of Node.js packages. There is a NPM package called ‘shortid’ used to short non-sequential url-friendly unique ids."
},
{
... |
Java Program for Coin Change | 19 Jan, 2018
Given a value N, if we want to make change for N cents, and we have infinite supply of each of S = { S1, S2, .. , Sm} valued coins, how many ways can we make the change? The order of coins doesn\’t matter.
For example, for N = 4 and S = {1,2,3}, there are four solutions: {1,1,1,1},{1,1,2},{2,2},{1,3}. So o... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n19 Jan, 2018"
},
{
"code": null,
"e": 258,
"s": 52,
"text": "Given a value N, if we want to make change for N cents, and we have infinite supply of each of S = { S1, S2, .. , Sm} valued coins, how many ways can we make the change? The ... |
Difference between an id and class in HTML? | 29 Jul, 2021
HTML id Attribute: The id attribute is a unique identifier which is used to specify the document. It is used by CSS and JavaScript to perform a certain task for a unique element. In CSS, the id attribute is written using # symbol followed by id.Syntax:
<element id="id_name">
In CSS Stylesheet:
#id_name ... | [
{
"code": null,
"e": 53,
"s": 25,
"text": "\n29 Jul, 2021"
},
{
"code": null,
"e": 308,
"s": 53,
"text": "HTML id Attribute: The id attribute is a unique identifier which is used to specify the document. It is used by CSS and JavaScript to perform a certain task for a unique elem... |
send_keys method – Action Chains in Selenium Python | 15 May, 2020
Selenium’s Python Module is built to perform automated testing with Python. ActionChains are a way to automate low-level interactions such as mouse movements, mouse button actions, keypress, and context menu interactions. This is useful for doing more complex actions like hover over and drag and drop. Acti... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n15 May, 2020"
},
{
"code": null,
"e": 600,
"s": 28,
"text": "Selenium’s Python Module is built to perform automated testing with Python. ActionChains are a way to automate low-level interactions such as mouse movements, mouse button act... |
How to close child browser window in Selenium WebDriver using Java? | We can close the child browser window in Selenium webdriver. The getWindowHandles and getWindowHandle methods can be used to handle child windows. The getWindowHandles method is used to store all the opened window handles in the Set data structure.
The getWindowHandle method is used to store the browser window currentl... | [
{
"code": null,
"e": 1436,
"s": 1187,
"text": "We can close the child browser window in Selenium webdriver. The getWindowHandles and getWindowHandle methods can be used to handle child windows. The getWindowHandles method is used to store all the opened window handles in the Set data structure."
}... |
turtle.pen() function in Python | 24 Dec, 2021
The turtle module provides turtle graphics primitives, in both object-oriented and procedure-oriented ways. Because it uses Tkinter for the underlying graphics, it needs a version of Python installed with Tk support.
This function is used to return or set the pen’s attributes in a ‘pen-dictionary’ with the... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n24 Dec, 2021"
},
{
"code": null,
"e": 245,
"s": 28,
"text": "The turtle module provides turtle graphics primitives, in both object-oriented and procedure-oriented ways. Because it uses Tkinter for the underlying graphics, it needs a ver... |
Number of Longest Increasing Subsequences | 09 Jun, 2021
Given an array arr[] of size N, the task is to count the number of longest increasing subsequences present in the given array.
Examples:
Input: arr[] = {2, 2, 2, 2, 2}Output: 5Explanation: The length of the longest increasing subsequence is 1, i.e. {2}. Therefore, count of longest increasing subsequences o... | [
{
"code": null,
"e": 54,
"s": 26,
"text": "\n09 Jun, 2021"
},
{
"code": null,
"e": 181,
"s": 54,
"text": "Given an array arr[] of size N, the task is to count the number of longest increasing subsequences present in the given array."
},
{
"code": null,
"e": 191,
"... |
Instant toString() method in Java with Examples | 28 Nov, 2018
The toString() method of Instant class returns string representation of this instant using ISO-8601 representation and format used is the same as DateTimeFormatter.ISO_INSTANT.
Syntax:
public String toString()
Returns: This method returns an ISO-8601 representation of this instant, not null.
Below programs... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n28 Nov, 2018"
},
{
"code": null,
"e": 205,
"s": 28,
"text": "The toString() method of Instant class returns string representation of this instant using ISO-8601 representation and format used is the same as DateTimeFormatter.ISO_INSTANT... |
How does inline JavaScript work with HTML ? | 30 Sep, 2019
Inline JavaScript can be achieved by using Script tag inside the body of the HTML, and instead of specifying the source(src=”...”) of the JavaScript file in the Script tag, we have to write all the JavaScript code inside the Script tag.
Syntax:
<script>
// JavaScript Code
</script>
Example:
<!DOCTYPE ... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n30 Sep, 2019"
},
{
"code": null,
"e": 265,
"s": 28,
"text": "Inline JavaScript can be achieved by using Script tag inside the body of the HTML, and instead of specifying the source(src=”...”) of the JavaScript file in the Script tag, we... |
Different ways to import csv file in Pandas | 19 Dec, 2018
CSV files are the “comma separated values”, these values are separated by commas, this file can be view like as excel file. In Python, Pandas is the most important library coming to data science. We need to deal with huge datasets while analyzing the data, which usually can get in CSV file format.
Let’s se... | [
{
"code": null,
"e": 53,
"s": 25,
"text": "\n19 Dec, 2018"
},
{
"code": null,
"e": 352,
"s": 53,
"text": "CSV files are the “comma separated values”, these values are separated by commas, this file can be view like as excel file. In Python, Pandas is the most important library co... |
Deflater deflate() function in Java with examples | 24 Jun, 2019
The deflate() function of the Deflater class in java.util.zip is used to compress the input data and fill the given buffer with the compressed data. The function returns the number of bytes of the compressed data.
Function Signature:
public int deflate(byte[] b)
public int deflate(byte[] b, int offset, int... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n24 Jun, 2019"
},
{
"code": null,
"e": 242,
"s": 28,
"text": "The deflate() function of the Deflater class in java.util.zip is used to compress the input data and fill the given buffer with the compressed data. The function returns the n... |
Taylor’s Theorem and Taylor series | 03 May, 2020
Taylor’s theorem is used for the expansion of the infinite series such as etc. so that we can approximate the values of these functions or polynomials. Taylor’s theorem is used for approximation of k-time differentiable function.
Statement:Let the (n-1)th derivative of i.e. be continuous in the nth deri... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n03 May, 2020"
},
{
"code": null,
"e": 283,
"s": 52,
"text": "Taylor’s theorem is used for the expansion of the infinite series such as etc. so that we can approximate the values of these functions or polynomials. Taylor’s theorem is u... |
VueJS - Routing | VueJS does not have a built-in router feauture. We need to follow some additional steps to install it.
The latest version of vue-router is available at https://unpkg.com/vue-router/dist/vue-router.js
Unpkg.com provides npm-based cdn links. The above link is always updated to the recent version. We can download and hos... | [
{
"code": null,
"e": 2173,
"s": 2070,
"text": "VueJS does not have a built-in router feauture. We need to follow some additional steps to install it."
},
{
"code": null,
"e": 2271,
"s": 2173,
"text": "The latest version of vue-router is available at https://unpkg.com/vue-router/... |
Polynomial Regression in Julia - GeeksforGeeks | 01 Nov, 2020
In statistics, polynomial regression is a form of regression analysis in which the relationship between the independent variable x and the dependent variable y is modeled as an nth degree polynomial in x. Polynomial regression fits a nonlinear relationship between the value of x and the corresponding condi... | [
{
"code": null,
"e": 24153,
"s": 24125,
"text": "\n01 Nov, 2020"
},
{
"code": null,
"e": 24636,
"s": 24153,
"text": "In statistics, polynomial regression is a form of regression analysis in which the relationship between the independent variable x and the dependent variable y is ... |
Normal Distribution in R - GeeksforGeeks | 13 Apr, 2020
Normal Distribution is a probability function used in statistics that tells about how the data values are distributed. It is the most important probability distribution function used in statistics because of its advantages in real case scenarios. For example, the height of the population, shoe size, IQ lev... | [
{
"code": null,
"e": 28679,
"s": 28651,
"text": "\n13 Apr, 2020"
},
{
"code": null,
"e": 29021,
"s": 28679,
"text": "Normal Distribution is a probability function used in statistics that tells about how the data values are distributed. It is the most important probability distrib... |
Java - How to Use Comparator? | Both TreeSet and TreeMap store elements in sorted order. However, it is the comparator that defines precisely what sorted order means.
The Comparator interface defines two methods: compare( ) and equals( ). The compare( ) method, shown here, compares two elements for order −
int compare(Object obj1, Object obj2)
obj1 ... | [
{
"code": null,
"e": 2512,
"s": 2377,
"text": "Both TreeSet and TreeMap store elements in sorted order. However, it is the comparator that defines precisely what sorted order means."
},
{
"code": null,
"e": 2653,
"s": 2512,
"text": "The Comparator interface defines two methods: c... |
How to catch all the exceptions in C++? | Exceptions are the problems which arise at the time of execution of program. It is an event which is thrown at runtime. It protects the code and run the program even after throwing an exception. Exception handling is used to handle the exceptions. We can use try catch block to protect the code.
Catch block is used to c... | [
{
"code": null,
"e": 1358,
"s": 1062,
"text": "Exceptions are the problems which arise at the time of execution of program. It is an event which is thrown at runtime. It protects the code and run the program even after throwing an exception. Exception handling is used to handle the exceptions. We ca... |
unordered_set rehash() function in C++ STL - GeeksforGeeks | 28 Sep, 2018
The unordered_set::rehash() is a built-in function in C++ STL which is used to set the number of buckets in the container of unordered_set to given size or more. If size is greater than the current size of the container, then rehash is called. If it is lower than the current size, then the function has no ... | [
{
"code": null,
"e": 24519,
"s": 24491,
"text": "\n28 Sep, 2018"
},
{
"code": null,
"e": 24858,
"s": 24519,
"text": "The unordered_set::rehash() is a built-in function in C++ STL which is used to set the number of buckets in the container of unordered_set to given size or more. I... |
CSS - Roll In Effect | An Element can move in a particular direction by turning over and over on an axis.
@keyframes rollIn {
0% { opacity: 0; transform: translateX(-100%) rotate(-120deg); }
100% { opacity: 1; transform: translateX(0px) rotate(0deg); }
}
Transform − Transform applies to 2d and 3d transformation to an element.
Transfo... | [
{
"code": null,
"e": 2709,
"s": 2626,
"text": "An Element can move in a particular direction by turning over and over on an axis."
},
{
"code": null,
"e": 2866,
"s": 2709,
"text": "@keyframes rollIn {\n 0% { opacity: 0; transform: translateX(-100%) rotate(-120deg); }\n 100% {... |
random header in C++ | Set 1(Generators) - GeeksforGeeks | 20 Apr, 2022
This header introduces random number generation facilities. This library allows to produce random numbers using combinations of generators and distributions.
Generators: Objects that generate uniformly distributed numbers.
Distributions: Objects that transform sequences of numbers generated by a generator ... | [
{
"code": null,
"e": 24191,
"s": 24163,
"text": "\n20 Apr, 2022"
},
{
"code": null,
"e": 24349,
"s": 24191,
"text": "This header introduces random number generation facilities. This library allows to produce random numbers using combinations of generators and distributions."
},... |
Tryit Editor v3.7 | Tryit: HTML footer element | [] |
Using Snorkel For Multi-Label Annotation. | by Ori Cohen | Towards Data Science | Snorkel is a nice little package that allows us to use labeling functions (LFs) as simple as heuristics or keywords or as complex as algorithms and human annotators in order to create a labeled dataset for the purpose of training a classifier.
“Snorkel is a system for programmatically building and managing training dat... | [
{
"code": null,
"e": 416,
"s": 172,
"text": "Snorkel is a nice little package that allows us to use labeling functions (LFs) as simple as heuristics or keywords or as complex as algorithms and human annotators in order to create a labeled dataset for the purpose of training a classifier."
},
{
... |
Maximize sum of products at corresponding indices in two arrays by reversing at most one subarray in first Array - GeeksforGeeks | 17 Jan, 2022
Given two arrays A and B of size N, the task is to maximize the sum of A[i]*B[i] across all values of i from 0 to N-1 by reversing at most one subarray of array A.
Examples:
Input: N = 4, A = [5, 1, 2, 3], B = [1, 4, 3, 2]Output: 33Explanation: Array A after reversing the subarray A[0, 1] will become [1, 5... | [
{
"code": null,
"e": 24796,
"s": 24768,
"text": "\n17 Jan, 2022"
},
{
"code": null,
"e": 24960,
"s": 24796,
"text": "Given two arrays A and B of size N, the task is to maximize the sum of A[i]*B[i] across all values of i from 0 to N-1 by reversing at most one subarray of array A.... |
Clustering Music to Create your Playlists on Spotify Using Python and R. | by Cristóbal Veas | Towards Data Science | Spotify is one of the most famous Music Platforms to discover new music. The company uses a lot of different algorithms to recommend the user new music based on their music preferences and most of these recommendations are located in Playlists. These Playlists are created for different users based on a wide diversity o... | [
{
"code": null,
"e": 574,
"s": 172,
"text": "Spotify is one of the most famous Music Platforms to discover new music. The company uses a lot of different algorithms to recommend the user new music based on their music preferences and most of these recommendations are located in Playlists. These Play... |
Word Dictionary using Python Tkinter | In this article, we will create a GUI-based dictionary using PyDictionary and Tkinter
Module.
PyDictionary is a Python Module that helps to get meaning translations, antonyms and synonyms of words. It uses WordNet for getting meanings, Google for translations, and synonym.com for getting synonyms and antonyms. PyDictio... | [
{
"code": null,
"e": 1156,
"s": 1062,
"text": "In this article, we will create a GUI-based dictionary using PyDictionary and Tkinter\nModule."
},
{
"code": null,
"e": 1444,
"s": 1156,
"text": "PyDictionary is a Python Module that helps to get meaning translations, antonyms and sy... |
How to add a title to JTable in Java Swing? | To display a title to the JTable, you can set a title for the JPanel, which already consists of a JTable.
Here, we are using createTitledBorder() for the JPanel to set the title for the panel border that would eventually work for table title.
Let’s say the following is the JPanel −
JPanel panel = new JPanel();
Now, use... | [
{
"code": null,
"e": 1168,
"s": 1062,
"text": "To display a title to the JTable, you can set a title for the JPanel, which already consists of a JTable."
},
{
"code": null,
"e": 1305,
"s": 1168,
"text": "Here, we are using createTitledBorder() for the JPanel to set the title for ... |
Java String contains() Method | ❮ String Methods
Find out if a string contains a sequence of characters:
String myStr = "Hello";
System.out.println(myStr.contains("Hel")); // true
System.out.println(myStr.contains("e")); // true
System.out.println(myStr.contains("Hi")); // false
Try it Yourself »
The contains() method checks whether a str... | [
{
"code": null,
"e": 19,
"s": 0,
"text": "\n❮ String Methods\n"
},
{
"code": null,
"e": 75,
"s": 19,
"text": "Find out if a string contains a sequence of characters:"
},
{
"code": null,
"e": 259,
"s": 75,
"text": "String myStr = \"Hello\";\nSystem.out.println(... |
HTML width/height Attribute vs CSS width/height Property - GeeksforGeeks | 26 Jul, 2021
In HTML 5, few elements follow the width and height attributes and maximum elements do not follow this attribute. Like img, iframe, canvas, and svg kind of elements follow the width and height attributes but div, span, article and section type of elements don’t follow them.The width and height attributes a... | [
{
"code": null,
"e": 24606,
"s": 24578,
"text": "\n26 Jul, 2021"
},
{
"code": null,
"e": 25205,
"s": 24606,
"text": "In HTML 5, few elements follow the width and height attributes and maximum elements do not follow this attribute. Like img, iframe, canvas, and svg kind of element... |
Rexx - ask Command | This command is used to read a line from the default input stream.
variable = ask
Variable − The variable to store the value entered by the user.
Variable − The variable to store the value entered by the user.
None
/* Main program */
input = ask
say input
When we run the above program we will get the following resu... | [
{
"code": null,
"e": 2406,
"s": 2339,
"text": "This command is used to read a line from the default input stream."
},
{
"code": null,
"e": 2423,
"s": 2406,
"text": "variable = ask \n"
},
{
"code": null,
"e": 2487,
"s": 2423,
"text": "Variable − The variable to... |
Count Number of Words in String using R - GeeksforGeeks | 23 May, 2021
In this article, we are going to see how to count the number of words in character String in R Programming Language.
Method 1: Using strplit and sapply methods
The strsplit() method in R is used to return a vector of words contained in the specified string based on matching with regex defined. Each elemen... | [
{
"code": null,
"e": 25242,
"s": 25214,
"text": "\n23 May, 2021"
},
{
"code": null,
"e": 25360,
"s": 25242,
"text": "In this article, we are going to see how to count the number of words in character String in R Programming Language. "
},
{
"code": null,
"e": 25403,
... |
Max rectangle | Practice | GeeksforGeeks | Given a binary matrix M of size n X m. Find the maximum area of a rectangle formed only of 1s in the given matrix.
Example 1:
Input:
n = 4, m = 4
M[][] = {{0 1 1 0},
{1 1 1 1},
{1 1 1 1},
{1 1 0 0}}
Output: 8
Explanation: For the above test case the
matrix will look like
0 1 1 0
1 1 1 1
1 1 ... | [
{
"code": null,
"e": 354,
"s": 238,
"text": "Given a binary matrix M of size n X m. Find the maximum area of a rectangle formed only of 1s in the given matrix. "
},
{
"code": null,
"e": 365,
"s": 354,
"text": "Example 1:"
},
{
"code": null,
"e": 635,
"s": 365,
... |
Fusing EfficientNet & YoloV5 — Advanced Object Detection 2 stage pipeline tutorial | by Mostafa Ibrahim | Towards Data Science | In this article, I am going to be explaining a concept which I call the “2 class filter”. This is an ensembling technique for object detection and classification models that was heavily used during a Kaggle competition that I have been doing for the last few weeks. This technique has been used by almost everyone doing ... | [
{
"code": null,
"e": 584,
"s": 171,
"text": "In this article, I am going to be explaining a concept which I call the “2 class filter”. This is an ensembling technique for object detection and classification models that was heavily used during a Kaggle competition that I have been doing for the last ... |
Erlang - Functions | Erlang is known as a functional programming language, hence you would expect to see a lot of emphasis on how functions work in Erlang. This chapter covers what all can be done with the functions in Erlang.
The syntax of a function declaration is as follows −
FunctionName(Pattern1... PatternN) ->
Body;
Where,
FunctionN... | [
{
"code": null,
"e": 2507,
"s": 2301,
"text": "Erlang is known as a functional programming language, hence you would expect to see a lot of emphasis on how functions work in Erlang. This chapter covers what all can be done with the functions in Erlang."
},
{
"code": null,
"e": 2560,
... |
MongoDB Mock Test | This section presents you various set of Mock Tests related to MongoDB Framework. You can download these sample mock tests at your local machine and solve offline at your convenience. Every mock test is supplied with a mock test key to let you verify the final score and grade yourself.
Q 1 - What kind of database Mong... | [
{
"code": null,
"e": 2841,
"s": 2553,
"text": "This section presents you various set of Mock Tests related to MongoDB Framework. You can download these sample mock tests at your local machine and solve offline at your convenience. Every mock test is supplied with a mock test key to let you verify t... |
How does [\d+] regular expression work in Python? | The following code shows what the regular expression [\d+] does on the given string
[\d+] regular expression refers to one digit (0-9) or + character
import re
result = re.findall(r'[\d+]', 'Taran123tula+456')
print result
['1', '2', '3', '+', '4', '5', '6'] | [
{
"code": null,
"e": 1146,
"s": 1062,
"text": "The following code shows what the regular expression [\\d+] does on the given string"
},
{
"code": null,
"e": 1213,
"s": 1146,
"text": "[\\d+] regular expression refers to one digit (0-9) or + character "
},
{
"code": null,
... |
C++ List Library - remove_if() Function | The C++ function std::list::remove_if() removes elements from the list that fulfills the condition. It removes all elements for which predicate returns true.
Following is the declaration for std::list::remove_if() function form std::list header.
template <class Predicate>
void remove_if (Predicate pred);
pred − Unary ... | [
{
"code": null,
"e": 2761,
"s": 2603,
"text": "The C++ function std::list::remove_if() removes elements from the list that fulfills the condition. It removes all elements for which predicate returns true."
},
{
"code": null,
"e": 2849,
"s": 2761,
"text": "Following is the declara... |
Time Series Modeling for Atmospheric CO2 Concentration(ppm), 1958–2019 | by Peyman Kor | Towards Data Science | In this post, I will go through the Time Series Modeling for historical CO2 Concentration (1958–2019) in R. The Seasonal ARIMA modeling will be used to build the model. The source code in the Rmarkdown format could be found in the author’s GitHub link here. Knowing that it has often been stated that the CO2 concentrati... | [
{
"code": null,
"e": 635,
"s": 171,
"text": "In this post, I will go through the Time Series Modeling for historical CO2 Concentration (1958–2019) in R. The Seasonal ARIMA modeling will be used to build the model. The source code in the Rmarkdown format could be found in the author’s GitHub link her... |
What are the rules to declare variables in C++? | To declare a variable, you need to know what data type it is going to be of and what its name would be. The variable name has constraints on what you can name it. Following are the rules for naming variables −
Variable names in C++ can range from 1 to 255 characters.
All variable names must begin with a letter of the... | [
{
"code": null,
"e": 1272,
"s": 1062,
"text": "To declare a variable, you need to know what data type it is going to be of and what its name would be. The variable name has constraints on what you can name it. Following are the rules for naming variables −"
},
{
"code": null,
"e": 1331,
... |
How to Install PHP 7 on Ubuntu Linux 14.04 LTS | PHP is a server-side scripting language designed for web development but also used as a general-purpose programming language. Originally created by Rasmus Lerdorf in 1994, the PHP reference implementation is now produced by The PHP Group. The latest version PHP is PHP7 and it provides 2x faster performance and 50% bett... | [
{
"code": null,
"e": 1487,
"s": 1062,
"text": "PHP is a server-side scripting language designed for web development but also used as a general-purpose programming language. Originally created by Rasmus Lerdorf in 1994, the PHP reference implementation is now produced by The PHP Group. The latest ver... |
Python - Largest number possible from list of given numbers | In this article, we are going to learn how to find the possible largest number from the given list of numbers. We will see two different ways to find to solve the problem. Follow the below steps to solve the problem.
Import the itertools module for permutations method.
Initialize the list with numbers and an empty list... | [
{
"code": null,
"e": 1279,
"s": 1062,
"text": "In this article, we are going to learn how to find the possible largest number from the given list of numbers. We will see two different ways to find to solve the problem. Follow the below steps to solve the problem."
},
{
"code": null,
"e":... |
Partition negative and positive without comparison with 0 - GeeksforGeeks | 24 May, 2021
Given an array of n integers, both negative and positive, partition them into two different arrays without comparing any element with 0.
Examples:
Input : arr[] = [1, -2, 6, -7, 8]
Output : a[] = [1, 6, 8]
b[] = [-2, -7]
Algorithm:
Initialize two empty vectors. Push the first element of the a... | [
{
"code": null,
"e": 24429,
"s": 24401,
"text": "\n24 May, 2021"
},
{
"code": null,
"e": 24566,
"s": 24429,
"text": "Given an array of n integers, both negative and positive, partition them into two different arrays without comparing any element with 0."
},
{
"code": null... |
Auto insert values into a MySQL table in a range? | For this, you can create a stored procedure. Let us first create a table.
mysql> create table DemoTable
-> (
-> Value int
-> );
Query OK, 0 rows affected (0.55 sec)
Following is the query to create a stored procedure to auto insert values to a table from range 10 to 20 −
mysql> DELIMITER //
mysql> CREATE PROCE... | [
{
"code": null,
"e": 1136,
"s": 1062,
"text": "For this, you can create a stored procedure. Let us first create a table."
},
{
"code": null,
"e": 1236,
"s": 1136,
"text": "mysql> create table DemoTable\n -> (\n -> Value int\n -> );\nQuery OK, 0 rows affected (0.55 sec)"
}... |
Pascal - Nested Loops | Pascal allows using one loop inside another loop. Following section shows few examples to illustrate the concept.
The syntax for a nested for-do loop statement in Pascal is as follows −
for variable1:=initial_value1 to [downto] final_value1 do
begin
for variable2:=initial_value2 to [downto] final_value2 do
b... | [
{
"code": null,
"e": 2197,
"s": 2083,
"text": "Pascal allows using one loop inside another loop. Following section shows few examples to illustrate the concept."
},
{
"code": null,
"e": 2269,
"s": 2197,
"text": "The syntax for a nested for-do loop statement in Pascal is as follow... |
How to save a plot in pdf in R? | To save a plot in pdf, we can use the pdf function in base R. For example, if we want to save a plot with the name PDF then it can be done using the below command −
pdf("PDF.pdf")
After this we can create the plot and use dev.off().
pdf("pdfExample.pdf")
plot(1:10)
Live Demo
dev.off()
To check where it is saved, find ... | [
{
"code": null,
"e": 1227,
"s": 1062,
"text": "To save a plot in pdf, we can use the pdf function in base R. For example, if we want to save a plot with the name PDF then it can be done using the below command −"
},
{
"code": null,
"e": 1242,
"s": 1227,
"text": "pdf(\"PDF.pdf\")"... |
Find the minimum number of elements that should be removed to make an array good - GeeksforGeeks | 26 Aug, 2021
Given an array of size N and an integer K. The array consists of only digits {0, 1, 2, 3, ...k-1}. The task is to make array good by removing some of the elements. The array of length x is called good if x is divisible by k and one can split the given array into x/k subsequences and each of form {0, 1, 2, ... | [
{
"code": null,
"e": 25528,
"s": 25500,
"text": "\n26 Aug, 2021"
},
{
"code": null,
"e": 25897,
"s": 25528,
"text": "Given an array of size N and an integer K. The array consists of only digits {0, 1, 2, 3, ...k-1}. The task is to make array good by removing some of the elements.... |
Count of AP (Arithmetic Progression) Subsequences in an array - GeeksforGeeks | 21 May, 2021
Given an array of n positive integers. The task is to count the number of Arithmetic Progression subsequence in the array. Note: Empty sequence or single element sequence is Arithmetic Progression. 1 <= arr[i] <= 1000000.Examples:
Input : arr[] = { 1, 2, 3 }
Output : 8
Arithmetic Progression subsequence ... | [
{
"code": null,
"e": 25300,
"s": 25272,
"text": "\n21 May, 2021"
},
{
"code": null,
"e": 25533,
"s": 25300,
"text": "Given an array of n positive integers. The task is to count the number of Arithmetic Progression subsequence in the array. Note: Empty sequence or single element s... |
spaCy Basics: NLP in Python | Towards Data Science | A major challenge of text data is extracting meaningful patterns and using those patterns to find actionable insights.
NLP can be thought of as a two part problem:
Processing. Converting the text data from its original form into a form the computer can understand. This includes data cleaning and feature extraction.Anal... | [
{
"code": null,
"e": 291,
"s": 172,
"text": "A major challenge of text data is extracting meaningful patterns and using those patterns to find actionable insights."
},
{
"code": null,
"e": 336,
"s": 291,
"text": "NLP can be thought of as a two part problem:"
},
{
"code": ... |
D3.js | d3.scaleIdentity() Function - GeeksforGeeks | 12 Feb, 2021
The d3.scaleIdentity() function in D3.js is used to construct a new identity scale with the unit domain [0, 1] and the unit range [0, 1].Syntax:
d3.scaleIdentity().domain(array of values).range(array of values);
Parameters: This function does not accept any parameters.Return Value: This function returns ... | [
{
"code": null,
"e": 24916,
"s": 24888,
"text": "\n12 Feb, 2021"
},
{
"code": null,
"e": 25063,
"s": 24916,
"text": "The d3.scaleIdentity() function in D3.js is used to construct a new identity scale with the unit domain [0, 1] and the unit range [0, 1].Syntax: "
},
{
"c... |
How to Build a Movie Recommendation System | by Ramya Vidiyala | Towards Data Science | Have you ever wondered how YouTube recommends content, or how Facebook recommends you, new friends? Perhaps you’ve noticed similar recommendations with LinkedIn connections, or how Amazon will recommend similar products while you’re browsing. All of these recommendations are made possible by the implementation of recom... | [
{
"code": null,
"e": 507,
"s": 171,
"text": "Have you ever wondered how YouTube recommends content, or how Facebook recommends you, new friends? Perhaps you’ve noticed similar recommendations with LinkedIn connections, or how Amazon will recommend similar products while you’re browsing. All of these... |
Tryit Editor v3.7 | CSS Media Queries
Tryit: Simple example of using media queries | [
{
"code": null,
"e": 27,
"s": 9,
"text": "CSS Media Queries"
}
] |
How to set the default value for an HTML <select> element ? - GeeksforGeeks | 22 Nov, 2021
In this article, we will learn about setting the default value for the HTML select element, & will also understand their implementation through the examples.
The select tag in HTML is used to create a dropdown list of options that can be selected. The option tag contains the value that would be used when s... | [
{
"code": null,
"e": 26261,
"s": 26233,
"text": "\n22 Nov, 2021"
},
{
"code": null,
"e": 26419,
"s": 26261,
"text": "In this article, we will learn about setting the default value for the HTML select element, & will also understand their implementation through the examples."
},... |
How to add a foreign key using ALTER in MySQL - GeeksforGeeks | 08 Apr, 2021
In this article, we will discuss the overview of foreign keys and will discuss how to add a foreign key using ALTER in MySQL step by step. Let’s discuss it one by one.
Foreign key : If an attribute is a primary key in one table but was not used as a primary key in another table then the attribute which is ... | [
{
"code": null,
"e": 25513,
"s": 25485,
"text": "\n08 Apr, 2021"
},
{
"code": null,
"e": 25681,
"s": 25513,
"text": "In this article, we will discuss the overview of foreign keys and will discuss how to add a foreign key using ALTER in MySQL step by step. Let’s discuss it one by ... |
Python | Convert string enclosed list to list - GeeksforGeeks | 20 May, 2019
Given a list enclosed within string (or quotes), write a Python program to convert the given string to list type.
Examples:
Input : "[0, 2, 9, 4, 8]"
Output : [0, 2, 9, 4, 8]
Input : "['x', 'y', 'z']"
Output : ['x', 'y', 'z']
Approach #1 : Python eval()
The eval() method parses the expression passed to ... | [
{
"code": null,
"e": 25537,
"s": 25509,
"text": "\n20 May, 2019"
},
{
"code": null,
"e": 25651,
"s": 25537,
"text": "Given a list enclosed within string (or quotes), write a Python program to convert the given string to list type."
},
{
"code": null,
"e": 25661,
"... |
Get the substring of the column in Pandas-Python - GeeksforGeeks | 10 Jul, 2020
Now, we’ll see how we can get the substring for all the values of a column in a Pandas dataframe. This extraction can be very useful when working with data. For example, we have the first name and last name of different people in a column and we need to extract the first 3 letters of their name to create t... | [
{
"code": null,
"e": 26093,
"s": 26065,
"text": "\n10 Jul, 2020"
},
{
"code": null,
"e": 26415,
"s": 26093,
"text": "Now, we’ll see how we can get the substring for all the values of a column in a Pandas dataframe. This extraction can be very useful when working with data. For ex... |
What is Elastic Stack and Elasticsearch? - GeeksforGeeks | 28 Jul, 2020
Elastic Stack is a group of products that can reliably and securely take data from any source, in any format, then search, analyze, and visualize it in real-time. Elasticsearch is a distributed, RESTful search and analytics engine that can address a huge number of use cases. Also considered as the heart of... | [
{
"code": null,
"e": 25493,
"s": 25465,
"text": "\n28 Jul, 2020"
},
{
"code": null,
"e": 25947,
"s": 25493,
"text": "Elastic Stack is a group of products that can reliably and securely take data from any source, in any format, then search, analyze, and visualize it in real-time. ... |
SQL | Create Table Extension - GeeksforGeeks | 21 Mar, 2018
SQL provides an extension for CREATE TABLE clause that creates a new table with the same schema of some existing table in the database.
It is used to store the result of complex queries temporarily in a new table.
The new table created has the same schema as the referencing table.
By default, the new table... | [
{
"code": null,
"e": 25055,
"s": 25027,
"text": "\n21 Mar, 2018"
},
{
"code": null,
"e": 25191,
"s": 25055,
"text": "SQL provides an extension for CREATE TABLE clause that creates a new table with the same schema of some existing table in the database."
},
{
"code": null,... |
Java Implementation of Diffie-Hellman Algorithm between Client and Server - GeeksforGeeks | 10 Nov, 2021
Program to implement Diffie-Hellman Algorithm in Client-Server Fashion.
Prerequisite: Server Socket Programming, Diffie-Hellman algorithm
The Diffie Hellman Algorithm is being used to establish a shared secret that can be used for secret communications while exchanging data over a public network.
In the be... | [
{
"code": null,
"e": 25661,
"s": 25633,
"text": "\n10 Nov, 2021"
},
{
"code": null,
"e": 25733,
"s": 25661,
"text": "Program to implement Diffie-Hellman Algorithm in Client-Server Fashion."
},
{
"code": null,
"e": 25799,
"s": 25733,
"text": "Prerequisite: Serv... |
Ego graph Using Networkx in Python - GeeksforGeeks | 20 May, 2021
Prerequisite – Graphs, Networkx Basics
Ego network is a special type of network consisting of one central node and all other nodes directly connected to it. The central node is known as ego, while the other surrounding nodes directly connected to it are known as alters. Ego networks are mostly used in anal... | [
{
"code": null,
"e": 25537,
"s": 25509,
"text": "\n20 May, 2021"
},
{
"code": null,
"e": 25576,
"s": 25537,
"text": "Prerequisite – Graphs, Networkx Basics"
},
{
"code": null,
"e": 26045,
"s": 25576,
"text": "Ego network is a special type of network consisting... |
How to set Background Color of the FlowLayoutPanel in C#? - GeeksforGeeks | 02 Aug, 2019
In Windows Forms, FlowLayoutPanel control is used to arrange its child controls in a horizontal or vertical flow direction. Or in other words, FlowLayoutPanel is a container which is used to organize different or same types of controls in it either horizontally or vertically. In FlowLayoutPanel control, yo... | [
{
"code": null,
"e": 25547,
"s": 25519,
"text": "\n02 Aug, 2019"
},
{
"code": null,
"e": 26013,
"s": 25547,
"text": "In Windows Forms, FlowLayoutPanel control is used to arrange its child controls in a horizontal or vertical flow direction. Or in other words, FlowLayoutPanel is a... |
How to Prepopulate Room Database in Android? - GeeksforGeeks | 18 Oct, 2021
Room is one of the Jetpack Architecture Components in Android. This provides an abstract layer over the SQLite Database to save and perform the operations on persistent data locally. This is recommended by Google over SQLite Database although the SQLite APIs are more powerful they are fairly low-level, whi... | [
{
"code": null,
"e": 26381,
"s": 26353,
"text": "\n18 Oct, 2021"
},
{
"code": null,
"e": 27099,
"s": 26381,
"text": "Room is one of the Jetpack Architecture Components in Android. This provides an abstract layer over the SQLite Database to save and perform the operations on persi... |
C Program for Binary Insertion Sort - GeeksforGeeks | 13 Feb, 2022
We can use binary search to reduce the number of comparisons in normal insertion sort. Binary Insertion Sort find use binary search to find the proper location to insert the selected item at each iteration. In normal insertion, sort it takes O(i) (at ith iteration) in worst case. we can reduce it to O(logi... | [
{
"code": null,
"e": 26253,
"s": 26225,
"text": "\n13 Feb, 2022"
},
{
"code": null,
"e": 26586,
"s": 26253,
"text": "We can use binary search to reduce the number of comparisons in normal insertion sort. Binary Insertion Sort find use binary search to find the proper location to ... |
C Program to Check if a Given String is Palindrome - GeeksforGeeks | 25 Jul, 2021
Given a string, write a c function to check if it is palindrome or not. A string is said to be palindrome if reverse of the string is same as string. For example, “abba” is palindrome, but “abbc” is not palindrome.
Algorithm: isPalindrome(str) 1) Find length of str. Let length be n. 2) Initialize low an... | [
{
"code": null,
"e": 26027,
"s": 25999,
"text": "\n25 Jul, 2021"
},
{
"code": null,
"e": 26243,
"s": 26027,
"text": "Given a string, write a c function to check if it is palindrome or not. A string is said to be palindrome if reverse of the string is same as string. For example, ... |
Python | Check if variable is tuple - GeeksforGeeks | 21 Nov, 2019
Sometimes, while working with Python, we can have a problem in which we need to check if a variable is single or a record. This has applications in domains in which we need to restrict the type of data we work on. Let’s discuss certain ways in which this task can be performed.
Method #1 : Using type()This ... | [
{
"code": null,
"e": 26105,
"s": 26077,
"text": "\n21 Nov, 2019"
},
{
"code": null,
"e": 26383,
"s": 26105,
"text": "Sometimes, while working with Python, we can have a problem in which we need to check if a variable is single or a record. This has applications in domains in whic... |
C library function - mbstowcs() | The C library function size_t mbstowcs(schar_t *pwcs, const char *str, size_t n) converts the string of multi-byte characters pointed to, by the argument str to the array pointed to by pwcs.
Following is the declaration for mbstowcs() function.
size_t mbstowcs(schar_t *pwcs, const char *str, size_t n)
pwcs − This is th... | [
{
"code": null,
"e": 2198,
"s": 2007,
"text": "The C library function size_t mbstowcs(schar_t *pwcs, const char *str, size_t n) converts the string of multi-byte characters pointed to, by the argument str to the array pointed to by pwcs."
},
{
"code": null,
"e": 2252,
"s": 2198,
... |
Essential commands for data preparation with Pandas | by Mahbubul Alam | Towards Data Science | If you like to cook you know this very well. Turning on the stove and cooking food is a tiny part of the whole cooking process. Much of your sweat and tears actually go into preparing the right ingredients.
Cliché, but worth saying it again — data preparation is 80% of work in any data science project. Whether it is a... | [
{
"code": null,
"e": 379,
"s": 172,
"text": "If you like to cook you know this very well. Turning on the stove and cooking food is a tiny part of the whole cooking process. Much of your sweat and tears actually go into preparing the right ingredients."
},
{
"code": null,
"e": 715,
"s... |
Clojure - Recursion | We have seen the recur statement in an earlier topic and whereas the ‘for’ loop is somewhat like a loop, recur is a real loop in Clojure.
If you have a programming background, you may have heard of tail recursion, which is a major feature of functional languages. This recur special form is the one that implements tail ... | [
{
"code": null,
"e": 2512,
"s": 2374,
"text": "We have seen the recur statement in an earlier topic and whereas the ‘for’ loop is somewhat like a loop, recur is a real loop in Clojure."
},
{
"code": null,
"e": 2850,
"s": 2512,
"text": "If you have a programming background, you ma... |
Dataloader for sequential data using PyTorch deep learning framework — Part 2 | by Alleviate and Elevate (A & E) | May, 2021 | Medium | Towards Data Science | Deep learning and machine learning algorithms are ruling the world these days. PyTorch is one of the most commonly used deep learning framework used for implementing various deep learning algorithms. On the other hand, the learning-based method essentially requires some annotated training dataset which can be used by t... | [
{
"code": null,
"e": 727,
"s": 171,
"text": "Deep learning and machine learning algorithms are ruling the world these days. PyTorch is one of the most commonly used deep learning framework used for implementing various deep learning algorithms. On the other hand, the learning-based method essentiall... |
Check if a value is present in an Array in Java | At first sort the array −
int intArr[] = {55, 20, 10, 60, 12, 90, 59};
// sorting array
Arrays.sort(intArr);
Now, set the value to be searched in an int variable −
int searchVal = 12;
Check for the presence of a value in an array −
int retVal = Arrays.binarySearch(intArr,searchVal);
boolean res = retVal > 0 ? true : fa... | [
{
"code": null,
"e": 1088,
"s": 1062,
"text": "At first sort the array −"
},
{
"code": null,
"e": 1171,
"s": 1088,
"text": "int intArr[] = {55, 20, 10, 60, 12, 90, 59};\n// sorting array\nArrays.sort(intArr);"
},
{
"code": null,
"e": 1226,
"s": 1171,
"text": "... |
Function prototypes in JavaScript | Functions created in JavaScript always have the prototype property added by the JavaScript
engine to them. The prototype property is an object which contains the constructor property
by default. The function protoype can be accessed by −
functionName.prototype
When objects are creating using the function constructor, t... | [
{
"code": null,
"e": 1300,
"s": 1062,
"text": "Functions created in JavaScript always have the prototype property added by the JavaScript\nengine to them. The prototype property is an object which contains the constructor property\nby default. The function protoype can be accessed by −"
},
{
... |
CICS - WRITE | Write command is used to add new records to a file. The parameters used in Write command are same as we had described before. Data is picked from the data area mentioned in the FROM clause. Following is the syntax for Write command −
EXEC CICS WRITE
FILE(name)
FROM(data-area)
RIDFLD(data-area)
LENGTH(data-v... | [
{
"code": null,
"e": 2160,
"s": 1926,
"text": "Write command is used to add new records to a file. The parameters used in Write command are same as we had described before. Data is picked from the data area mentioned in the FROM clause. Following is the syntax for Write command −"
},
{
"code... |
Faster Levenshtein Distance Calculation using mbleven | by Parthvi Shah | Towards Data Science | Levenshtein Distance is the minimal number of insertions, deletions, and symbol substitutions required to transform a string a into string b.
Example: Consider string a: mouse & string b: morse
Levenshtein distance between string a and string b is 2. You need to delete u from string a and insert r to transform string a... | [
{
"code": null,
"e": 314,
"s": 172,
"text": "Levenshtein Distance is the minimal number of insertions, deletions, and symbol substitutions required to transform a string a into string b."
},
{
"code": null,
"e": 366,
"s": 314,
"text": "Example: Consider string a: mouse & string b... |
Java XPath Parser - Parse XML Document | Following are the steps used while parsing a document using XPath Parser.
Import XML-related packages.
Import XML-related packages.
Create a DocumentBuilder.
Create a DocumentBuilder.
Create a Document from a file or stream.
Create a Document from a file or stream.
Create an Xpath object and an XPath path expression.
C... | [
{
"code": null,
"e": 2397,
"s": 2323,
"text": "Following are the steps used while parsing a document using XPath Parser."
},
{
"code": null,
"e": 2426,
"s": 2397,
"text": "Import XML-related packages."
},
{
"code": null,
"e": 2455,
"s": 2426,
"text": "Import X... |
Vue.js | v-on:click directive | 22 Jun, 2020
The v-on:click directive is a Vue.js directive used to add a click event listener to an element. First, we will create a div element with id as app and let’s apply the v-on:click directive to a element. Further, we can execute a function when click even occurs.
Syntax:
v-on:click="function"
Parameters: Th... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n22 Jun, 2020"
},
{
"code": null,
"e": 290,
"s": 28,
"text": "The v-on:click directive is a Vue.js directive used to add a click event listener to an element. First, we will create a div element with id as app and let’s apply the v-on:cl... |
How to filter nested JSON object to return certain value using JavaScript ? | 03 Dec, 2020
Given a collection that contains the detail information of employees who are working in the organization. We need to find some values from that nested collections of details. That collection is known as the JSON object and the information inside object are known as nested JSON object.
Example 1: We create ... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n03 Dec, 2020"
},
{
"code": null,
"e": 314,
"s": 28,
"text": "Given a collection that contains the detail information of employees who are working in the organization. We need to find some values from that nested collections of details. ... |
Overview of testing package in Golang | 18 Dec, 2021
In the software industry, there are clear differences between manual testing and automated testing. Where manual testing is used to ensure that the software code performs as expected and it requires time and effort. Most of the manual testing includes checking log files, external services, and the database... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n18 Dec, 2021"
},
{
"code": null,
"e": 646,
"s": 28,
"text": "In the software industry, there are clear differences between manual testing and automated testing. Where manual testing is used to ensure that the software code performs as e... |
Reverse and Add given number repeatedly to get a Palindrome number | 07 Mar, 2022
Write a program that takes number and gives the resulting palindrome (if one exists). If it took more than 1, 000 iterations (additions) or yield a palindrome that is greater than 4, 294, 967, 295, assume that no palindrome exist for the given number.
Examples:
Input: N = 195Output: 9339
Input: N = 265Out... | [
{
"code": null,
"e": 53,
"s": 25,
"text": "\n07 Mar, 2022"
},
{
"code": null,
"e": 305,
"s": 53,
"text": "Write a program that takes number and gives the resulting palindrome (if one exists). If it took more than 1, 000 iterations (additions) or yield a palindrome that is greater... |
Number of triangles that can be formed with given N points | 07 Jul, 2022
Given X and Y coordinates of N points on a Cartesian plane. The task is to find the number of possible triangles with the non-zero area that can be formed by joining each point to every other point. Examples:
Input: P[] = {{0, 0}, {2, 0}, {1, 1}, {2, 2}}
Output: 3
Possible triangles can be [(0, 0}, (2, 0),... | [
{
"code": null,
"e": 54,
"s": 26,
"text": "\n07 Jul, 2022"
},
{
"code": null,
"e": 263,
"s": 54,
"text": "Given X and Y coordinates of N points on a Cartesian plane. The task is to find the number of possible triangles with the non-zero area that can be formed by joining each poi... |
Delete a Node from linked list without head pointer | 24 Jun, 2022
You are given a singly linked list and pointer which is pointing to the node which is required to be deleted. Any information about head pointer or any other node is not given. You need to write a function to delete that node from linked list. Your function will take only one argument, i.e., pointer to the... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n24 Jun, 2022"
},
{
"code": null,
"e": 389,
"s": 52,
"text": "You are given a singly linked list and pointer which is pointing to the node which is required to be deleted. Any information about head pointer or any other node is not give... |
How to scroll to top on every Route click in Angular5 ? | 18 Sep, 2020
We can use Router and NavigationEnd from ‘@angular/router’ and hence we can scroll to the top of the webpage for every route.
Approach:
First, we need to import the Router and NavigationEnd from ‘@angular/router’ in both app.module.ts file and app.component.ts.
Then we need to create an instance of those i... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n18 Sep, 2020"
},
{
"code": null,
"e": 154,
"s": 28,
"text": "We can use Router and NavigationEnd from ‘@angular/router’ and hence we can scroll to the top of the webpage for every route."
},
{
"code": null,
"e": 164,
"s"... |
Memory Management in Operating Systems - GeeksQuiz | 03 Oct, 2019
Let the page size is of 'x' bits
Size of T1 = 2 ^ x bytes
(This is because T1 occupies exactly one page)
Now, number of entries in T1 = (2^x) / 4
(This is because each page table entry is 32 bits
or 4 bytes in size)
Number of entries in T1 = Number of second level
page tables
(Because each I-level... | [
{
"code": null,
"e": 34106,
"s": 34078,
"text": "\n03 Oct, 2019"
},
{
"code": null,
"e": 35270,
"s": 34106,
"text": "Let the page size is of 'x' bits\n\nSize of T1 = 2 ^ x bytes\n\n(This is because T1 occupies exactly one page)\n\nNow, number of entries in T1 = (2^x) / 4\n\n(This... |
PostgreSQL – While Loops | 24 Jan, 2021
PostgreSQL provides the loop statement which simply defines an unconditional loop that executes repeatedly a block of code until terminated by an exit or return statement. The while loop statement executes a block of code till the condition remains true and stops executing when the conditions become false.... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n24 Jan, 2021"
},
{
"code": null,
"e": 336,
"s": 28,
"text": "PostgreSQL provides the loop statement which simply defines an unconditional loop that executes repeatedly a block of code until terminated by an exit or return statement. The... |
Deadlock - GeeksforGeeks | 28 Mar, 2020
if (i % 2 == 0) {
if (i < n) request Ri
if (i+2 < n) request Ri+2
}
else {
if (i < n) request Rn-i
if (i+2 < n) request Rn-i-2
}
Option B is answer
No. of resources, n = 21
No. of processes, k = 12
Processes {P0, P1....P11} make the following Resource requests:
{R0, R20, R2, R18... | [
{
"code": null,
"e": 34185,
"s": 34157,
"text": "\n28 Mar, 2020"
},
{
"code": null,
"e": 34339,
"s": 34185,
"text": " if (i % 2 == 0) {\n if (i < n) request Ri\n if (i+2 < n) request Ri+2\n}\nelse {\n if (i < n) request Rn-i\n if (i+2 < n) request Rn-i-2\n}"
... |
How to perform tukey HSD in base R? | First thing you must remember while moving on to post hoc analysis is the null hypothesis of the analysis of variance must be rejected, so that we can claim there exists a difference in the group means. Now, once we achieve that the tukey HSD can be performed simply by using TukeyHSD function in base R.
Consider the be... | [
{
"code": null,
"e": 1492,
"s": 1187,
"text": "First thing you must remember while moving on to post hoc analysis is the null hypothesis of the analysis of variance must be rejected, so that we can claim there exists a difference in the group means. Now, once we achieve that the tukey HSD can be per... |
Python | sympy.Derivative() method | 02 Aug, 2019
With the help of sympy.Derivative() method, we can create an unevaluated derivative of a SymPy expression. It has the same syntax as diff() method. To evaluate an unevaluated derivative, use the doit() method.
Syntax: Derivative(expression, reference variable)
Parameters:expression – A SymPy expression who... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n02 Aug, 2019"
},
{
"code": null,
"e": 238,
"s": 28,
"text": "With the help of sympy.Derivative() method, we can create an unevaluated derivative of a SymPy expression. It has the same syntax as diff() method. To evaluate an unevaluated ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.