title stringlengths 3 221 | text stringlengths 17 477k | parsed listlengths 0 3.17k |
|---|---|---|
How do I pass options to the Selenium Chrome driver using Python? | We can pass options to the Selenium Chrome driver using Python. This can be with the help of the ChromeOptions and the DesiredCapabilities class. For the ChromeOptions, we have to create an object for that class.
Then we shall take the help of the add_argument method and pass the option we want to send to the browser a... | [
{
"code": null,
"e": 1275,
"s": 1062,
"text": "We can pass options to the Selenium Chrome driver using Python. This can be with the help of the ChromeOptions and the DesiredCapabilities class. For the ChromeOptions, we have to create an object for that class."
},
{
"code": null,
"e": 147... |
Anomaly detection with Local Outlier Factor (LOF) | by Mahbubul Alam | Towards Data Science | Today’s article is my 5th in a series of “bite-size” article I am writing on different techniques used for anomaly detection. If you are interested, the following are the previous four articles:
Z-score for anomaly detection
Boxplot for anomaly detection
Statistical techniques for anomaly detection
Time series anomaly ... | [
{
"code": null,
"e": 367,
"s": 172,
"text": "Today’s article is my 5th in a series of “bite-size” article I am writing on different techniques used for anomaly detection. If you are interested, the following are the previous four articles:"
},
{
"code": null,
"e": 397,
"s": 367,
... |
Ajax Introduction - GeeksforGeeks | 08 Oct, 2021
Introduction:The following tutorial will provide a short introduction to Ajax and its uses. Before understanding these terms see few practical examples to demonstrate the power of Ajax. Facebook, Instagram, Twitter etc are considered the situation when check news feed and if like someone post simply click ... | [
{
"code": null,
"e": 25050,
"s": 25022,
"text": "\n08 Oct, 2021"
},
{
"code": null,
"e": 26551,
"s": 25050,
"text": "Introduction:The following tutorial will provide a short introduction to Ajax and its uses. Before understanding these terms see few practical examples to demonstr... |
JUnit - Plug with Eclipse | To set up JUnit with eclipse, follow the steps given below.
Download a JUnit jar based on the operating system you have on your system.
Assume you have copied the above JAR file onto the folder C:\>JUnit.
Open eclipse → right click on project and click on property > Build Path > Configure Build Path and add the junit-4... | [
{
"code": null,
"e": 2032,
"s": 1972,
"text": "To set up JUnit with eclipse, follow the steps given below."
},
{
"code": null,
"e": 2108,
"s": 2032,
"text": "Download a JUnit jar based on the operating system you have on your system."
},
{
"code": null,
"e": 2177,
... |
XML Processing Modules in Python | XML stands for "Extensible Markup Language". It is mainly used in webpages, where the data has a specific structure. It has elements, defined by a beginning and an ending tag. A tag is a markup construct that begins with < and ends with >. The characters between the start-tag and end-tag, are the element's content. Ele... | [
{
"code": null,
"e": 1451,
"s": 1062,
"text": "XML stands for \"Extensible Markup Language\". It is mainly used in webpages, where the data has a specific structure. It has elements, defined by a beginning and an ending tag. A tag is a markup construct that begins with < and ends with >. The charact... |
Explain dependency injection in C# | A dependency is an object that another object depends on. Dependency Injection (or inversion) is basically providing the objects that an object needs, instead of having it construct the objects themselves. It is a useful technique that makes testing easier, as it allows you to mock the dependencies.
For example, if cla... | [
{
"code": null,
"e": 1363,
"s": 1062,
"text": "A dependency is an object that another object depends on. Dependency Injection (or inversion) is basically providing the objects that an object needs, instead of having it construct the objects themselves. It is a useful technique that makes testing eas... |
How to find the 95% confidence interval for the slope of regression line in R? | The slope of the regression line is a very important part of regression analysis, by finding the slope we get an estimate of the value by which the dependent variable is expected to increase or decrease. But the confidence interval provides the range of the slope values that we expect 95% of the times when the sample s... | [
{
"code": null,
"e": 1513,
"s": 1062,
"text": "The slope of the regression line is a very important part of regression analysis, by finding the slope we get an estimate of the value by which the dependent variable is expected to increase or decrease. But the confidence interval provides the range of... |
How can we use MySQL TRIM() to remove the whitespaces from all the rows and update table? | Suppose if a table has many values having whitespaces in the columns of a table then it is wastage of space. We can use TRIM() function to remove whitespaces from all the rows and update the table too in a single query. Following the example from ‘Employee’, having whitespaces in all its rows will exhibit the concept −... | [
{
"code": null,
"e": 1383,
"s": 1062,
"text": "Suppose if a table has many values having whitespaces in the columns of a table then it is wastage of space. We can use TRIM() function to remove whitespaces from all the rows and update the table too in a single query. Following the example from ‘Emplo... |
PyCaret is an open-source, low-code machine learning library and end-to-end model management tool built in Python for automating ML worflows | Towards Data Science | PyCaret is an open-source, low-code machine learning library and end-to-end model management tool built-in Python for automating machine learning workflows. It is incredibly popular for its ease of use, simplicity, and ability to build and deploy end-to-end ML prototypes quickly and efficiently.
PyCaret is an alternate... | [
{
"code": null,
"e": 469,
"s": 172,
"text": "PyCaret is an open-source, low-code machine learning library and end-to-end model management tool built-in Python for automating machine learning workflows. It is incredibly popular for its ease of use, simplicity, and ability to build and deploy end-to-e... |
C Program to sum the digits of a given number in single statement | In this section we will see how to find the sum of digits without writing multiple statements. In other
words, we will find the sum of digits in a single statement.
As we know that, to find the sum of digits we cut the last digit by taking the remainder after
dividing the number by 10, and then divide the number by 10 ... | [
{
"code": null,
"e": 1227,
"s": 1062,
"text": "In this section we will see how to find the sum of digits without writing multiple statements. In other\nwords, we will find the sum of digits in a single statement."
},
{
"code": null,
"e": 1426,
"s": 1227,
"text": "As we know that,... |
Data Classes in Python | Set 4 (Inheritance) - GeeksforGeeks | 12 Apr, 2019
Prerequisites: Inheritance In Python, Data Classes in Python | Set 3
In this post, we will discuss how DataClasses behave when inherited. Though they make their own constructors, DataClasses behave pretty much the same way as normal classes do when inherited.
from dataclasses import dataclass @dataclass... | [
{
"code": null,
"e": 23901,
"s": 23873,
"text": "\n12 Apr, 2019"
},
{
"code": null,
"e": 23970,
"s": 23901,
"text": "Prerequisites: Inheritance In Python, Data Classes in Python | Set 3"
},
{
"code": null,
"e": 24161,
"s": 23970,
"text": "In this post, we will... |
PL/SQL - IF-THEN Statement | It is the simplest form of the IF control statement, frequently used in decision-making and changing the control flow of the program execution.
The IF statement associates a condition with a sequence of statements enclosed by the keywords THEN and END IF. If the condition is TRUE, the statements get executed, and if th... | [
{
"code": null,
"e": 2209,
"s": 2065,
"text": "It is the simplest form of the IF control statement, frequently used in decision-making and changing the control flow of the program execution."
},
{
"code": null,
"e": 2451,
"s": 2209,
"text": "The IF statement associates a conditio... |
continue statement in C | The continue statement in C programming works somewhat like the break statement. Instead of forcing termination, it forces the next iteration of the loop to take place, skipping any code in between.
For the for loop, continue statement causes the conditional test and increment portions of the loop to execute. For the w... | [
{
"code": null,
"e": 2283,
"s": 2084,
"text": "The continue statement in C programming works somewhat like the break statement. Instead of forcing termination, it forces the next iteration of the loop to take place, skipping any code in between."
},
{
"code": null,
"e": 2511,
"s": 22... |
3 Examples For Using Python Pandas More Efficiently | by Soner Yıldırım | Towards Data Science | Pandas is one of the most widely-used Python libraries in the data science ecosystem. It has numerous functions and methods to perform efficient and quick data analysis and manipulation.
In this article, we will go over 3 examples that show how to do some specific operations with Pandas.
The first and foremost requirem... | [
{
"code": null,
"e": 359,
"s": 172,
"text": "Pandas is one of the most widely-used Python libraries in the data science ecosystem. It has numerous functions and methods to perform efficient and quick data analysis and manipulation."
},
{
"code": null,
"e": 461,
"s": 359,
"text": ... |
PostgreSQL - Boolean Data Type - GeeksforGeeks | 08 Jun, 2020
In this article, we will look into the PostgreSQL Boolean data type and it’s implementation while designing a database table. PostgreSQL boolean data type has 3 states namely TRUE< FALSE and NULL. It uses single byte for storing boolean value and can be abbreviated as BOOL.The below table depicts all valid... | [
{
"code": null,
"e": 27920,
"s": 27892,
"text": "\n08 Jun, 2020"
},
{
"code": null,
"e": 28277,
"s": 27920,
"text": "In this article, we will look into the PostgreSQL Boolean data type and it’s implementation while designing a database table. PostgreSQL boolean data type has 3 st... |
An Introduction to Genetic Algorithms | by Anh T. Dang | Towards Data Science | Genetic Algorithms (GAs) are a part of Evolutionary Computing (EC), which is a rapidly growing area of Artificial Intelligence (AI). It inspired by the process of biological evolution based on Charles Darwin’s theory of natural selection, where fitter individuals are more likely to pass on their genes to the next gener... | [
{
"code": null,
"e": 576,
"s": 172,
"text": "Genetic Algorithms (GAs) are a part of Evolutionary Computing (EC), which is a rapidly growing area of Artificial Intelligence (AI). It inspired by the process of biological evolution based on Charles Darwin’s theory of natural selection, where fitter ind... |
ASCII sum difference of strings in JavaScript | ASCII is a 7-bit character code where every single bit represents a unique character. Every
English alphabet has a unique decimal ascii code.
We are required to write a function that takes in two strings and calculates their ascii scores (i.e., the sum of ascii decimal of each character of string) and returns the diffe... | [
{
"code": null,
"e": 1204,
"s": 1062,
"text": "ASCII is a 7-bit character code where every single bit represents a unique character. Every\nEnglish alphabet has a unique decimal ascii code."
},
{
"code": null,
"e": 1389,
"s": 1204,
"text": "We are required to write a function tha... |
MariaDB - Create Database | Creation or deletion of databases in MariaDB requires privileges typically only given to root users or admins. Under these accounts, you have two options for creating a database − the mysqladmin binary and a PHP script.
The following example demonstrates the use of the mysqladmin binary in creating a database with the ... | [
{
"code": null,
"e": 2582,
"s": 2362,
"text": "Creation or deletion of databases in MariaDB requires privileges typically only given to root users or admins. Under these accounts, you have two options for creating a database − the mysqladmin binary and a PHP script."
},
{
"code": null,
"... |
hibernate cache | caching in hibernate | hibernate caching | 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 the previous tutorials, we have discussed ... | [
{
"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,
... |
Cypress - Configuration of JSON File | Cypress configurations consist of some key-value pairs that are applicable to all tests within a framework. Cypress default configurations are available under the Settings tab->Configuration (expand it) in the Test Runner window.
If we look further down in the same window, we shall have the existing values of multiple ... | [
{
"code": null,
"e": 2727,
"s": 2497,
"text": "Cypress configurations consist of some key-value pairs that are applicable to all tests within a framework. Cypress default configurations are available under the Settings tab->Configuration (expand it) in the Test Runner window."
},
{
"code": n... |
How To Evaluate Unsupervised Learning Models | by Callum Ballard | Towards Data Science | So far in this blog series, we have looked at how to create automated playlists of songs by clustering a collection of tracks, based purely on their audio features. Previously, we worked on a toy example of 32 songs and showed how Hierarchical Agglomerative Clustering (HAC) can automatically create sub-groups of simila... | [
{
"code": null,
"e": 703,
"s": 172,
"text": "So far in this blog series, we have looked at how to create automated playlists of songs by clustering a collection of tracks, based purely on their audio features. Previously, we worked on a toy example of 32 songs and showed how Hierarchical Agglomerati... |
Tryit Editor v3.6 - Show Node.js Command Prompt | var mysql = require('mysql');
var con = mysql.createConnection({
host: "localhost",
user: "myusername",
password: "mypassword"
});
con.connect(function(err) {
if (err) throw err; | [
{
"code": null,
"e": 30,
"s": 0,
"text": "var mysql = require('mysql');"
},
{
"code": null,
"e": 32,
"s": 30,
"text": ""
},
{
"code": null,
"e": 67,
"s": 32,
"text": "var con = mysql.createConnection({"
},
{
"code": null,
"e": 88,
"s": 67,
... |
ReactJS - Event management | Event management is one of the important features in a web application. It enables the user to interact with the application. React support all events available in a web application. React event handling is very similar to DOM events with little changes. Let us learn how to handle events in a React application in this ... | [
{
"code": null,
"e": 2496,
"s": 2167,
"text": "Event management is one of the important features in a web application. It enables the user to interact with the application. React support all events available in a web application. React event handling is very similar to DOM events with little changes... |
Wildcards in Java | 25 Feb, 2022
The question mark (?) is known as the wildcard in generic programming. It represents an unknown type. The wildcard can be used in a variety of situations such as the type of a parameter, field, or local variable; sometimes as a return type. Unlike arrays, different instantiations of a generic type are not ... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n25 Feb, 2022"
},
{
"code": null,
"e": 503,
"s": 52,
"text": "The question mark (?) is known as the wildcard in generic programming. It represents an unknown type. The wildcard can be used in a variety of situations such as the type of ... |
Binary search in sorted vector of pairs | 12 Jun, 2022
How to apply STL binary_search to vector of pairs(key, value), given that vector is sorted by its first value(key) struct compare in the code contains two functions which compares the key(searching element) with the first element in the vector
CPP
/* C++ code to demonstrate how Binary Searchcan be applied... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n12 Jun, 2022"
},
{
"code": null,
"e": 297,
"s": 52,
"text": "How to apply STL binary_search to vector of pairs(key, value), given that vector is sorted by its first value(key) struct compare in the code contains two functions which com... |
lshw command in Linux with Examples | 23 May, 2019
lshw(list hardware) is a small Linux/Unix tool which is used to generate the detailed information of the system’s hardware configuration from various files in the /proc directory. lshw can also report exact memory configuration, firmware version, mainboard configuration, CPU version and speed, cache memory... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n23 May, 2019"
},
{
"code": null,
"e": 569,
"s": 28,
"text": "lshw(list hardware) is a small Linux/Unix tool which is used to generate the detailed information of the system’s hardware configuration from various files in the /proc direct... |
What is Regex in Golang? | 19 May, 2020
A Regular Expression (or RegEx) is a special sequence of characters that defines a search pattern that is used for matching specific text. In Golang, there’s a built-in package for regular expressions, called the regexp package which contains all list of actions like filtering, replacing, validating, or ex... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n19 May, 2020"
},
{
"code": null,
"e": 533,
"s": 52,
"text": "A Regular Expression (or RegEx) is a special sequence of characters that defines a search pattern that is used for matching specific text. In Golang, there’s a built-in packa... |
Solve the Linear Equation of Single Variable | 30 Jul, 2018
Given a linear equation, task is to find the value of variable used. The equation contains only ‘+’, ‘-‘ operation, the variable and its coefficient.
If there is no solution for the equation, return “No solution”.If there are infinite solutions for the equation, return “Infinite solutions”.If there is exac... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n30 Jul, 2018"
},
{
"code": null,
"e": 202,
"s": 52,
"text": "Given a linear equation, task is to find the value of variable used. The equation contains only ‘+’, ‘-‘ operation, the variable and its coefficient."
},
{
"code": nu... |
HLOOKUP Function in Excel With Examples | 24 May, 2021
Excel has several functions to search data from a table. HLOOKUP() function is one of them. The ‘H’ in the HLOOKUP() function stands for ‘horizontal’. This function generally helps to find a value from a row of an array or table. For this function to work the lookup value must be in the first row of the ta... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n24 May, 2021"
},
{
"code": null,
"e": 480,
"s": 28,
"text": "Excel has several functions to search data from a table. HLOOKUP() function is one of them. The ‘H’ in the HLOOKUP() function stands for ‘horizontal’. This function generally ... |
How to match whitespace but not newlines using Python regular expressions? | The following code matches only the whitespaces but not newlines in the given string
import re
print re.findall(r"(\s){1,}","""I find
Tutorialspoint useful""")
This gives the output
[' ', ' ', ' '] | [
{
"code": null,
"e": 1147,
"s": 1062,
"text": "The following code matches only the whitespaces but not newlines in the given string"
},
{
"code": null,
"e": 1226,
"s": 1147,
"text": "import re\nprint re.findall(r\"(\\s){1,}\",\"\"\"I find\n Tutorialspoint useful\"\"\")"
},
... |
Bare Machine and Resident Monitor - GeeksforGeeks | 22 Jul, 2019
In this article, we are going to talk about two important part of the computer system, that is Bare machine and Resident monitor. So first let’s study about them that how they are important for the operating systems.
The Bare Machine and Resident Monitor are not directly related to the operating system but... | [
{
"code": null,
"e": 24724,
"s": 24696,
"text": "\n22 Jul, 2019"
},
{
"code": null,
"e": 24941,
"s": 24724,
"text": "In this article, we are going to talk about two important part of the computer system, that is Bare machine and Resident monitor. So first let’s study about them t... |
Lodash _.filter() Method - GeeksforGeeks | 06 Sep, 2020
Lodash is a JavaScript library that works on the top of underscore.js. Lodash helps in working with arrays, collection, strings, objects, numbers etc.
The _.filter() method iterates over elements of collection, returning an array of all elements predicate returns true.
Note: This method is not similar to t... | [
{
"code": null,
"e": 37045,
"s": 37017,
"text": "\n06 Sep, 2020"
},
{
"code": null,
"e": 37196,
"s": 37045,
"text": "Lodash is a JavaScript library that works on the top of underscore.js. Lodash helps in working with arrays, collection, strings, objects, numbers etc."
},
{
... |
How to Easily Deploy Machine Learning Models Using Flask | by Abhinav Sagar | Towards Data Science | Stuck behind the paywall? Click here to read the full story with my Friend Link!
When a data scientist/machine learning engineer develops a machine learning model using Scikit-Learn, TensorFlow, Keras, PyTorch etc, the ultimate goal is to make it available in production. Often times when working on a machine learning p... | [
{
"code": null,
"e": 252,
"s": 171,
"text": "Stuck behind the paywall? Click here to read the full story with my Friend Link!"
},
{
"code": null,
"e": 702,
"s": 252,
"text": "When a data scientist/machine learning engineer develops a machine learning model using Scikit-Learn, Ten... |
Program to display all alphabets from A to Z in uppercase and lowercase both - GeeksforGeeks | 05 Sep, 2021
Alphabets in lowercase and uppercase can be printed using two methods, first is using ASCII values and second is to directly print values from ‘A’ to ‘Z’ using loops. Below are the implementation of both methods:
Using ASCII values:ASCII value of uppercase alphabets – 65 to 90.ASCII value of lowercase alph... | [
{
"code": null,
"e": 23840,
"s": 23812,
"text": "\n05 Sep, 2021"
},
{
"code": null,
"e": 24053,
"s": 23840,
"text": "Alphabets in lowercase and uppercase can be printed using two methods, first is using ASCII values and second is to directly print values from ‘A’ to ‘Z’ using loo... |
uniq Command in LINUX with examples - GeeksforGeeks | 22 Dec, 2021
The uniq command in Linux is a command-line utility that reports or filters out the repeated lines in a file. In simple words, uniq is the tool that helps to detect the adjacent duplicate lines and also deletes the duplicate lines. uniq filters out the adjacent matching lines from the input file(that is r... | [
{
"code": null,
"e": 23952,
"s": 23921,
"text": " \n22 Dec, 2021\n"
},
{
"code": null,
"e": 24332,
"s": 23952,
"text": "The uniq command in Linux is a command-line utility that reports or filters out the repeated lines in a file. In simple words, uniq is the tool that helps to de... |
Online Javascript Minifier | Editable Javascript Code
123456789101112131415161718192021222324252627282930$('#input').click(function() { if ( $(this).val() == 'Type (or paste) your input here...' ) { $(this).val(''); }});$('#output').click(function() { if ( $(this).val() == 'Compressed output goes here...' ) { $(this).val(''); }})... | [
{
"code": null,
"e": 25,
"s": 0,
"text": "Editable Javascript Code"
},
{
"code": null,
"e": 754,
"s": 25,
"text": "123456789101112131415161718192021222324252627282930$('#input').click(function() { if ( $(this).val() == 'Type (or paste) your input here...' ) { $(this).val(... |
Python: The Boolean confusion. `if val` and `if val is not None` are... | by Akash Panchal | Towards Data Science | if valand if val is not None are not the same!
When you do if val is None, you call the operator is, which checks the identity of x. i.e, if val is value Here, is operator checks whether both the operands refer to the same object or not.
None is a singleton in Python and all None values are also the exact same instance... | [
{
"code": null,
"e": 218,
"s": 171,
"text": "if valand if val is not None are not the same!"
},
{
"code": null,
"e": 409,
"s": 218,
"text": "When you do if val is None, you call the operator is, which checks the identity of x. i.e, if val is value Here, is operator checks whether... |
Big Data Analytics - Decision Trees | A Decision Tree is an algorithm used for supervised learning problems such as classification or regression. A decision tree or a classification tree is a tree in which each internal (nonleaf) node is labeled with an input feature. The arcs coming from a node labeled with a feature are labeled with each of the possible ... | [
{
"code": null,
"e": 2991,
"s": 2554,
"text": "A Decision Tree is an algorithm used for supervised learning problems such as classification or regression. A decision tree or a classification tree is a tree in which each internal (nonleaf) node is labeled with an input feature. The arcs coming from a... |
Java Program to convert integer to octal | To convert integer to octal in Java, use the Integer.toOctalString() method.
Let’s say the following is our integer.
int val = 768;
Convert the above integer to octal.
Integer.toOctalString(val)
The following is the final example.
Live Demo
public class Demo {
public static void main(String[] args) {
int va... | [
{
"code": null,
"e": 1139,
"s": 1062,
"text": "To convert integer to octal in Java, use the Integer.toOctalString() method."
},
{
"code": null,
"e": 1179,
"s": 1139,
"text": "Let’s say the following is our integer."
},
{
"code": null,
"e": 1194,
"s": 1179,
"te... |
C# Enum Parse Method | The Parse method in Enum converts the string representation of the name or numeric value of enum constants to an equivalent enumerated object.
The following is our enumeration.
enum Vehicle { Car, Bus, Truck, Motobike };
Now, use the GetNames() method in a loop to get the enum values. Parse them using the Enum.Parse() ... | [
{
"code": null,
"e": 1205,
"s": 1062,
"text": "The Parse method in Enum converts the string representation of the name or numeric value of enum constants to an equivalent enumerated object."
},
{
"code": null,
"e": 1239,
"s": 1205,
"text": "The following is our enumeration."
},... |
How to compute Average for the Set of Values using C#? | Firstly, set an array with values −
int[] myArr = new int[] {
34,
23,
77,
67
};
To get the average, firstly get the sum of array elements.
Divide the sum with the length of the array and that will give you the average of the elements −
int sum = 0;
int average = 0;
for (int i = 0; i < len; i++) {
sum += ... | [
{
"code": null,
"e": 1098,
"s": 1062,
"text": "Firstly, set an array with values −"
},
{
"code": null,
"e": 1154,
"s": 1098,
"text": "int[] myArr = new int[] {\n 34,\n 23,\n 77,\n 67\n};"
},
{
"code": null,
"e": 1213,
"s": 1154,
"text": "To get the ave... |
CSS | font-display property - GeeksforGeeks | 07 May, 2020
While using web fonts, the text will be invisible until either web font is loaded or three seconds are passed, at which point the fallback font is used.
Font-display allows customizing how web fonts are displayed when the page is being rendered.
It is applied using @font-face rule which defines custom font... | [
{
"code": null,
"e": 25376,
"s": 25348,
"text": "\n07 May, 2020"
},
{
"code": null,
"e": 25529,
"s": 25376,
"text": "While using web fonts, the text will be invisible until either web font is loaded or three seconds are passed, at which point the fallback font is used."
},
{
... |
Perl sleep Function | This function Pauses the script for EXPR seconds, or forever if EXPR is not specified. Returns the number of seconds actually slept. Can be interrupted by a signal handler, but you should avoid using sleep with alarm, since many systems use alarm for the sleep implementation.
Following is the simple syntax for this fun... | [
{
"code": null,
"e": 2497,
"s": 2220,
"text": "This function Pauses the script for EXPR seconds, or forever if EXPR is not specified. Returns the number of seconds actually slept. Can be interrupted by a signal handler, but you should avoid using sleep with alarm, since many systems use alarm for th... |
How to convert std::string to LPCSTR in C++? | In this section we will see how to convert C++ string (std::string) to LPCSTR. The LPCSTR is the (Long Pointer to Constant STRing). It is basically the string like C. So by converting string to character array we can get LPCSTR. This LPCSTR is Microsoft defined. So to use them we have to include Windows.h header file i... | [
{
"code": null,
"e": 1399,
"s": 1062,
"text": "In this section we will see how to convert C++ string (std::string) to LPCSTR. The LPCSTR is the (Long Pointer to Constant STRing). It is basically the string like C. So by converting string to character array we can get LPCSTR. This LPCSTR is Microsoft... |
How to add Phone Number Input in React.js ? - GeeksforGeeks | 28 Dec, 2021
In this article, we are going to learn how we can add phone input in ReactJs. React is a free and open-source front-end JavaScript library for building user interfaces or UI components. It is maintained by Facebook and a community of individual developers and companies.
Approach: To add our phone input we ... | [
{
"code": null,
"e": 25298,
"s": 25270,
"text": "\n28 Dec, 2021"
},
{
"code": null,
"e": 25569,
"s": 25298,
"text": "In this article, we are going to learn how we can add phone input in ReactJs. React is a free and open-source front-end JavaScript library for building user interf... |
Build Responsive UI with Flutter - GeeksforGeeks | 21 Sep, 2021
In this article, we’ll go over the different widgets using which we can build responsive applications with Flutter.
Builds a widget tree that can depend on the parent widget’s size. This is useful if we want to change or hide something depending on the parent size.
Dart
LayoutBuilder( builder: (Buil... | [
{
"code": null,
"e": 25116,
"s": 25088,
"text": "\n21 Sep, 2021"
},
{
"code": null,
"e": 25232,
"s": 25116,
"text": "In this article, we’ll go over the different widgets using which we can build responsive applications with Flutter."
},
{
"code": null,
"e": 25382,
... |
How can we alter a MySQL stored function? | If we have ALTER ROUTINE privileges then we can alter MySQL stored function with the help of ALTER FUNCTION query. Its syntax is as follows −
ALTER FUNCTION function_name [characteristic ...]
characteristic:
{ CONTAINS SQL | NO SQL | READS SQL DATA | MODIFIES SQL DATA }
| SQL SECURITY { DEFINER | INVOKER }
| COMMENT... | [
{
"code": null,
"e": 1204,
"s": 1062,
"text": "If we have ALTER ROUTINE privileges then we can alter MySQL stored function with the help of ALTER FUNCTION query. Its syntax is as follows −"
},
{
"code": null,
"e": 1392,
"s": 1204,
"text": "ALTER FUNCTION function_name [characteri... |
Change marker border color in Plotly - Python - GeeksforGeeks | 17 Dec, 2020
In this article, we are going to discuss how to change marker border color using plotly module in Python.
Plotly is definitely a must-know tool for visualization since it’s incredibly powerful easily used and has the big benefit of interactivity we are able to export visualization, being able to run on bro... | [
{
"code": null,
"e": 24318,
"s": 24290,
"text": "\n17 Dec, 2020"
},
{
"code": null,
"e": 24424,
"s": 24318,
"text": "In this article, we are going to discuss how to change marker border color using plotly module in Python."
},
{
"code": null,
"e": 25015,
"s": 2442... |
CSS3 - Multi Background | CSS Multi background property is used to add one or more images at a time without HTML code, We can add images as per our requirement.A sample syntax of multi background images is as follows −
#multibackground {
background-image: url(/css/images/logo.png), url(/css/images/border.png);
background-position: left to... | [
{
"code": null,
"e": 2819,
"s": 2626,
"text": "CSS Multi background property is used to add one or more images at a time without HTML code, We can add images as per our requirement.A sample syntax of multi background images is as follows −"
},
{
"code": null,
"e": 3020,
"s": 2819,
... |
Count pairs in an array that hold i+j= arr[i]+arr[j] - GeeksforGeeks | 31 May, 2021
Given an array of integers arr[], the task is to count all the pairs (arr[i], arr[j]) such that i + j = arr[i] + arr[j] for all 0 ≤ i < j < n. Note: Pairs (x, y) and (y, x) are considered a single pair.
Examples:
Input: arr[] = {8, 4, 2, 1, 5, 4, 2, 1, 2, 3} Output: 1 The only possible pair is (arr[4], a... | [
{
"code": null,
"e": 24429,
"s": 24401,
"text": "\n31 May, 2021"
},
{
"code": null,
"e": 24633,
"s": 24429,
"text": "Given an array of integers arr[], the task is to count all the pairs (arr[i], arr[j]) such that i + j = arr[i] + arr[j] for all 0 ≤ i < j < n. Note: Pairs (x, y) a... |
Tryit Editor v3.7 | Tryit: CSS padding | [] |
Open New Browser Tab in Selenuim | Answer − We can open a new browser tab in Selenium webdriver. The methods - Keys.chord and sendKeys are required to achieve this task. The Keys.chord method is used to send multiple keys at once.
We shall pass Keys.CONTROL and Keys.ENTER as parameters to this method. The complete string is again passed as a parameter t... | [
{
"code": null,
"e": 1258,
"s": 1062,
"text": "Answer − We can open a new browser tab in Selenium webdriver. The methods - Keys.chord and sendKeys are required to achieve this task. The Keys.chord method is used to send multiple keys at once."
},
{
"code": null,
"e": 1491,
"s": 1258,... |
Angular Material - List | The md-list, an Angular directive, is a container component that contains the md-list-item elements as children. The md-list-item directive is a container component for row items of md-list container. The CSS classes, md-2-line and md-3-line, can be added to md-list-item to increase the height of row with 22px and 40px... | [
{
"code": null,
"e": 2525,
"s": 2190,
"text": "The md-list, an Angular directive, is a container component that contains the md-list-item elements as children. The md-list-item directive is a container component for row items of md-list container. The CSS classes, md-2-line and md-3-line, can be add... |
Rexx - If statement | The first decision-making statement is the if statement. An if statement consists of a Boolean expression followed by one or more statements.
The general form of this statement in Rexx is as follows −
if (condition) then
do
#statement1
#statement2
end
In Rexx, the condition is an expression which... | [
{
"code": null,
"e": 2481,
"s": 2339,
"text": "The first decision-making statement is the if statement. An if statement consists of a Boolean expression followed by one or more statements."
},
{
"code": null,
"e": 2540,
"s": 2481,
"text": "The general form of this statement in Re... |
Ear Biometrics — Machine Learning a little further... | by Hitesh Valecha | Towards Data Science | Like other biometric using face, iris, and finger, the ear as a biometric contains a large amount of specific and unique features that allow for human identification. The ear morphology changes slightly after the age of 10 years and medical studies have shown that significant changes in the shape of the ear happen only... | [
{
"code": null,
"e": 1166,
"s": 172,
"text": "Like other biometric using face, iris, and finger, the ear as a biometric contains a large amount of specific and unique features that allow for human identification. The ear morphology changes slightly after the age of 10 years and medical studies have ... |
Sort even and odd placed elements in increasing order - GeeksforGeeks | 16 Feb, 2022
Given a list N, the task is to sort all the elements in odd and even positions in increasing order. After sorting, we need to put all the odd positioned elements together, then all the even positioned elements.
Examples:
Input : [3, 2, 7, 6, 8]
Output : 3 7 8 2 6
Explanation:
Odd position elements in sor... | [
{
"code": null,
"e": 24557,
"s": 24529,
"text": "\n16 Feb, 2022"
},
{
"code": null,
"e": 24768,
"s": 24557,
"text": "Given a list N, the task is to sort all the elements in odd and even positions in increasing order. After sorting, we need to put all the odd positioned elements t... |
Gamma Distribution — Intuition, Derivation, and Examples | by Aerin Kim | Towards Data Science | Before setting Gamma’s two parameters α, β and plugging them into the formula, let’s pause for a moment and ask a few questions...
Why did we have to invent the Gamma distribution? (i.e., why does this distribution exist?)
When should Gamma distribution be used for modeling?
Answer: To predict the wait time until futur... | [
{
"code": null,
"e": 303,
"s": 172,
"text": "Before setting Gamma’s two parameters α, β and plugging them into the formula, let’s pause for a moment and ask a few questions..."
},
{
"code": null,
"e": 395,
"s": 303,
"text": "Why did we have to invent the Gamma distribution? (i.e.... |
Add arrow in tooltip with CSS | With CSS, you can add a small arrow to the tooltip, using :after. With that, use the content property as well.
You can try to run the following code to add an arrow in the tooltip:
Live Demo
<!DOCTYPE html>
<html>
<style>
.mytooltip .mytext {
visibility: hidden;
width: 140px;
backgro... | [
{
"code": null,
"e": 1173,
"s": 1062,
"text": "With CSS, you can add a small arrow to the tooltip, using :after. With that, use the content property as well."
},
{
"code": null,
"e": 1243,
"s": 1173,
"text": "You can try to run the following code to add an arrow in the tooltip:"
... |
Python Lambda Function. In this article, you will learn more... | by Tanu N Prabhu | Towards Data Science | In this article, you will learn more about lambda functions in python. How can we use lambda functions, what is the syntax of lambda functions and why do we need them?
Lambda functions are also called anonymous functions. An anonymous function is a function defined without a name. As you know to define a normal functio... | [
{
"code": null,
"e": 340,
"s": 172,
"text": "In this article, you will learn more about lambda functions in python. How can we use lambda functions, what is the syntax of lambda functions and why do we need them?"
},
{
"code": null,
"e": 717,
"s": 340,
"text": "Lambda functions a... |
Nested functions in C | In some applications, we have seen that some functions are declared inside another function. This is sometimes known as nested function, but actually this is not the nested function. This is called the lexical scoping. Lexical scoping is not valid in C because the compiler is unable to reach correct memory location of ... | [
{
"code": null,
"e": 1398,
"s": 1062,
"text": "In some applications, we have seen that some functions are declared inside another function. This is sometimes known as nested function, but actually this is not the nested function. This is called the lexical scoping. Lexical scoping is not valid in C ... |
SymPy - Printing | There are several printers available in SymPy. Following is a partial list −
str
srepr
ASCII pretty printer
Unicode pretty printer
LaTeX
MathML
Dot
SymPy objects can also be sent as output to code of various languages, such as C, Fortran, Javascript, Theano, and Python.
SymPy uses Unicode characters to render output in... | [
{
"code": null,
"e": 2096,
"s": 2019,
"text": "There are several printers available in SymPy. Following is a partial list −"
},
{
"code": null,
"e": 2100,
"s": 2096,
"text": "str"
},
{
"code": null,
"e": 2106,
"s": 2100,
"text": "srepr"
},
{
"code": nu... |
Shuffle 2n integers in format {a1, b1, a2, b2, a3, b3, ......, an, bn} without using extra space - GeeksforGeeks | 11 Aug, 2021
Given an array of 2n elements in the following format { a1, a2, a3, a4, ....., an, b1, b2, b3, b4, ...., bn }. The task is shuffle the array to {a1, b1, a2, b2, a3, b3, ......, an, bn } without using extra space.
Examples:
Input : arr[] = { 1, 2, 9, 15 }
Output : 1 9 2 15
Input : arr[] = { 1, 2, 3, 4, ... | [
{
"code": null,
"e": 25012,
"s": 24984,
"text": "\n11 Aug, 2021"
},
{
"code": null,
"e": 25226,
"s": 25012,
"text": "Given an array of 2n elements in the following format { a1, a2, a3, a4, ....., an, b1, b2, b3, b4, ...., bn }. The task is shuffle the array to {a1, b1, a2, b2, a3... |
Java Connection rollBack() method with example | A rollback operation undoes all the changes done by the current transaction i.e. If you call a rollBack() method of the Connection interface, all the modifications are reverted until the last commit.Con.rollback()
You can also rollback the changes in the database up to a particular save point by passing the required Sa... | [
{
"code": null,
"e": 1276,
"s": 1062,
"text": "A rollback operation undoes all the changes done by the current transaction i.e. If you call a rollBack() method of the Connection interface, all the modifications are reverted until the last commit.Con.rollback()"
},
{
"code": null,
"e": 14... |
Different Methods to find Prime Number in Java | A prime number is a number that is only divisible by one or itself. Some of the prime numbers are 2, 3, 5, 7, 11, 13 etc.
Some of the different methods to find a prime number in Java are given as follows −
A program that finds if the given number is prime without using a function is given as follow −
Live Demo
public ... | [
{
"code": null,
"e": 1184,
"s": 1062,
"text": "A prime number is a number that is only divisible by one or itself. Some of the prime numbers are 2, 3, 5, 7, 11, 13 etc."
},
{
"code": null,
"e": 1268,
"s": 1184,
"text": "Some of the different methods to find a prime number in Java... |
Check if it possible to partition in k subarrays with equal sum - GeeksforGeeks | 05 May, 2021
Given an array A of size N, and a number K. Task is to find out if it is possible to partition the array A into K contiguous subarrays such that the sum of elements within each of these subarrays is the same.Prerequisite: Count the number of ways to divide an array into three contiguous parts having equal ... | [
{
"code": null,
"e": 25300,
"s": 25272,
"text": "\n05 May, 2021"
},
{
"code": null,
"e": 25611,
"s": 25300,
"text": "Given an array A of size N, and a number K. Task is to find out if it is possible to partition the array A into K contiguous subarrays such that the sum of element... |
React Props | Props are arguments passed into React components.
Props are passed to components via HTML attributes.
props stands for properties.
React Props are like function arguments in JavaScript and attributes
in HTML.
To send props into a component, use the same syntax as HTML attributes:
Add a "brand" attribute to the Car ele... | [
{
"code": null,
"e": 50,
"s": 0,
"text": "Props are arguments passed into React components."
},
{
"code": null,
"e": 102,
"s": 50,
"text": "Props are passed to components via HTML attributes."
},
{
"code": null,
"e": 131,
"s": 102,
"text": "props stands for pr... |
How do you overlap widgets/frames in Python tkinter? | There are three general ways through which we can align and position a particular widget in a Tkinter application. Let us suppose that we want to overlap two or more widgets or frames one on another, then we can use place() geometry manager. What place() geometry manager does is that it lines up the widget in rows and ... | [
{
"code": null,
"e": 1479,
"s": 1062,
"text": "There are three general ways through which we can align and position a particular widget in a Tkinter application. Let us suppose that we want to overlap two or more widgets or frames one on another, then we can use place() geometry manager. What place(... |
PyTorch - Loading Data | PyTorch includes a package called torchvision which is used to load and prepare the dataset. It includes two basic functions namely Dataset and DataLoader which helps in transformation and loading of dataset.
Dataset is used to read and transform a datapoint from the given dataset. The basic syntax to implement is ment... | [
{
"code": null,
"e": 2468,
"s": 2259,
"text": "PyTorch includes a package called torchvision which is used to load and prepare the dataset. It includes two basic functions namely Dataset and DataLoader which helps in transformation and loading of dataset."
},
{
"code": null,
"e": 2593,
... |
How to set Spring Boot SetTimeZone - 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 tutorial, I am going to show how to s... | [
{
"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,
... |
How can Tensorflow and pre-trained model be used to continue training the model using Python? | Tensorflow and the pre-trained model can be used to continue training the model by using the ‘fit’ method and specifying the number of training steps. The validation data is used to fit the model.
Read More:
What is TensorFlow and how Keras work with TensorFlow to create Neural Networks?
A neural network that contains ... | [
{
"code": null,
"e": 1259,
"s": 1062,
"text": "Tensorflow and the pre-trained model can be used to continue training the model by using the ‘fit’ method and specifying the number of training steps. The validation data is used to fit the model."
},
{
"code": null,
"e": 1351,
"s": 1259... |
Flatten a 2d numpy array into 1d array in Python | A 2d numpy array is an array of arrays. In this article we will see how to flatten it to get the elements as one dimensional arrays.
The flatten function in numpy is a direct way to convert the 2d array in to a 1D array.
Live Demo
import numpy as np
array2D = np.array([[31, 12, 43], [21, 9, 16], [0, 9, 0]])
# printing... | [
{
"code": null,
"e": 1195,
"s": 1062,
"text": "A 2d numpy array is an array of arrays. In this article we will see how to flatten it to get the elements as one dimensional arrays."
},
{
"code": null,
"e": 1283,
"s": 1195,
"text": "The flatten function in numpy is a direct way to ... |
Installing Multiple CUDA & cuDNN Versions in Ubuntu | by Mathanraj Sharma | Towards Data Science | Nowadays most of us use the CUDA toolkit to train deep learning models. But things get messy when we grow from PROJECT to PROJECTS. Yes, soon as we start to work on two or three deep learning projects we may end up with the need for different environments. Sometimes we may need different versions of CUDA and cuDNN for ... | [
{
"code": null,
"e": 512,
"s": 172,
"text": "Nowadays most of us use the CUDA toolkit to train deep learning models. But things get messy when we grow from PROJECT to PROJECTS. Yes, soon as we start to work on two or three deep learning projects we may end up with the need for different environments... |
How I Built My Own Dating App Algorithm | Towards Data Science | Almost every dating app on the market right now have some form of a dating algorithm. However, these algorithms are usually not publicly available for public scrutiny. Also, the companies behind them probably wouldn’t want their secret formula to be exposed to competitors. But, we can still try and figure out how a pot... | [
{
"code": null,
"e": 525,
"s": 172,
"text": "Almost every dating app on the market right now have some form of a dating algorithm. However, these algorithms are usually not publicly available for public scrutiny. Also, the companies behind them probably wouldn’t want their secret formula to be expos... |
How to check if a string contains a specific sub string? | To check if a string contains a specific substring, the ‘strlen’ and ‘strpos’ functions can be used. The ‘strlen’ gives the entire length of the string. The function ‘strpos’ finds the position wherein the substring occurs first in the string.
Live Demo
<?php
$str_1 = "thisisasample";
$str_2 = "asample";
if (... | [
{
"code": null,
"e": 1306,
"s": 1062,
"text": "To check if a string contains a specific substring, the ‘strlen’ and ‘strpos’ functions can be used. The ‘strlen’ gives the entire length of the string. The function ‘strpos’ finds the position wherein the substring occurs first in the string."
},
{... |
Adjust gap size for CSS Grid | To adjust the gap size, use grid-column-gap, grid-row-gap or grid-gap property in CSS.
Set gap between Grid columns with CSS. You can try to run the following code to implement the grid-column-gap property.
Live Demo
<!DOCTYPE html>
<html>
<head>
<style>
.container {
display: grid;
... | [
{
"code": null,
"e": 1149,
"s": 1062,
"text": "To adjust the gap size, use grid-column-gap, grid-row-gap or grid-gap property in CSS."
},
{
"code": null,
"e": 1269,
"s": 1149,
"text": "Set gap between Grid columns with CSS. You can try to run the following code to implement the g... |
Visualizing the composition two of graph using networkx - GeeksforGeeks | 24 Jan, 2021
In this article, we are going to see how to visualize the composition two of the graph using networkx. If we are given two graphs A and B then their composition can be found by performing union operation on node-set and edge-set of A and B.
Simply if an edge is contained between any two vertices in any of ... | [
{
"code": null,
"e": 24292,
"s": 24264,
"text": "\n24 Jan, 2021"
},
{
"code": null,
"e": 24533,
"s": 24292,
"text": "In this article, we are going to see how to visualize the composition two of the graph using networkx. If we are given two graphs A and B then their composition ca... |
SAP HANA - Calculation View | Calculation Views are used to consume other Analytic, Attribute and other Calculation views and base column tables. These are used to perform complex calculations, which are not possible with other type of Views.
Below given are few characteristics of Calculation Views −
Calculation Views are used to consume Analytic, ... | [
{
"code": null,
"e": 3320,
"s": 3107,
"text": "Calculation Views are used to consume other Analytic, Attribute and other Calculation views and base column tables. These are used to perform complex calculations, which are not possible with other type of Views."
},
{
"code": null,
"e": 337... |
Difference between app.use() and app.get() in Express.js - GeeksforGeeks | 26 May, 2021
Express is a small framework that sits on top of Node.js’s web server functionality to simplify its APIs and add helpful new features
Perquisites: Follow these steps for project setup and module installation.
Step 1: Create a directory using the below-given command. After creating a directory add the locat... | [
{
"code": null,
"e": 25120,
"s": 25092,
"text": "\n26 May, 2021"
},
{
"code": null,
"e": 25254,
"s": 25120,
"text": "Express is a small framework that sits on top of Node.js’s web server functionality to simplify its APIs and add helpful new features"
},
{
"code": null,
... |
What is a string? Declare and initialize the strings in C language | An array of characters (or) collection of characters is called a string.
Refer to the declaration given below −
char stringname [size];
For example - char a[50]; a string of length 50 characters.
The initialization is as follows −
Using single character constant −
Using single character constant −
char string[20] = { ‘... | [
{
"code": null,
"e": 1135,
"s": 1062,
"text": "An array of characters (or) collection of characters is called a string."
},
{
"code": null,
"e": 1174,
"s": 1135,
"text": "Refer to the declaration given below −"
},
{
"code": null,
"e": 1198,
"s": 1174,
"text": ... |
Cluster-based Image Segmentation -Python | by Mathanraj Sharma | Towards Data Science | Recently I was working on an Image classification task where first I wanted to capture the region of interest from the image before feeding it into the model. I tried a technique called cluster-based image segmentation which helped me to improve my model performance by a certain level. Let us see what it is and some sa... | [
{
"code": null,
"e": 579,
"s": 171,
"text": "Recently I was working on an Image classification task where first I wanted to capture the region of interest from the image before feeding it into the model. I tried a technique called cluster-based image segmentation which helped me to improve my model ... |
How to make the Tkinter text widget read only? | In Tkinter, sometimes, we may want to make a text widget disabled. To achieve
this, we can set the text configuration as DISABLED. This will freeze the text widget
and will make it read-only.
In this example, we will create a text widget and a button which will allow users to
disable or freeze the text widget instantly... | [
{
"code": null,
"e": 1254,
"s": 1062,
"text": "In Tkinter, sometimes, we may want to make a text widget disabled. To achieve\nthis, we can set the text configuration as DISABLED. This will freeze the text widget\nand will make it read-only."
},
{
"code": null,
"e": 1384,
"s": 1254,
... |
Setup the format of DATETIME to 'DDMM- YYYY HH:MM:SS' with MySQL SELECT? | Whenever you retrieve datetime from a table, the datetime gives ‘YYYY-MM-DD’ format. If you want to change the output, then you need to use in-built date_format() from MySQL.
The syntax is as follows −
SELECT DATE_FORMAT(yourDatetimeColumnName,yourFormat) as anyVariableName from
yourTableName;
To understand the above s... | [
{
"code": null,
"e": 1237,
"s": 1062,
"text": "Whenever you retrieve datetime from a table, the datetime gives ‘YYYY-MM-DD’ format. If you want to change the output, then you need to use in-built date_format() from MySQL."
},
{
"code": null,
"e": 1264,
"s": 1237,
"text": "The syn... |
MongoDB query to get date records in a range | To get date records in a range, use gtalongwithlt. Let us create a collection with documents −
> db.demo60.insertOne({"ArrivalDate":new ISODate("2019-01-11 12:30:10")});
{
"acknowledged" : true,
"insertedId" : ObjectId("5e2863fecfb11e5c34d89927")
}
> db.demo60.insertOne({"ArrivalDate":new ISODate("2019-10-12 03:1... | [
{
"code": null,
"e": 1157,
"s": 1062,
"text": "To get date records in a range, use gtalongwithlt. Let us create a collection with documents −"
},
{
"code": null,
"e": 1637,
"s": 1157,
"text": "> db.demo60.insertOne({\"ArrivalDate\":new ISODate(\"2019-01-11 12:30:10\")});\n{\n \... |
JSF - h:messages | The h:messages tag shows all the messages at one place corresponding to UI elements.
<h:messages style = "color:red;margin:8px;" />
Case: Username entered is more than 20 characters and password entered is less than 5 characters.
<ul style = "color:red;margin:8px;">
<li> UserName: Validation Error:
Length ... | [
{
"code": null,
"e": 2037,
"s": 1952,
"text": "The h:messages tag shows all the messages at one place corresponding to UI elements."
},
{
"code": null,
"e": 2085,
"s": 2037,
"text": "<h:messages style = \"color:red;margin:8px;\" /> "
},
{
"code": null,
"e": 2183,
... |
Count number of triplets in an array having sum in the range [a, b] - GeeksforGeeks | 11 Aug, 2021
Given an array of distinct integers and a range [a, b], the task is to count the number of triplets having a sum in the range [a, b].Examples:
Input : arr[] = {8, 3, 5, 2}
range = [7, 11]
Output : 1
There is only one triplet {2, 3, 5}
having sum 10 in range [7, 11].
Input : arr[] = {2, 7, 5, 3, ... | [
{
"code": null,
"e": 25172,
"s": 25144,
"text": "\n11 Aug, 2021"
},
{
"code": null,
"e": 25317,
"s": 25172,
"text": "Given an array of distinct integers and a range [a, b], the task is to count the number of triplets having a sum in the range [a, b].Examples: "
},
{
"cod... |
MYBATIS - Delete Operation | This chapter describes how to delete records from a table using MyBatis.
We have the following STUDENT table in MySQL −
CREATE TABLE details.student(
ID int(10) NOT NULL AUTO_INCREMENT,
NAME varchar(100) NOT NULL,
BRANCH varchar(255) NOT NULL,
PERCENTAGE int(3) NOT NULL,
PHONE int(11) NOT NULL,
EMAIL ... | [
{
"code": null,
"e": 1944,
"s": 1871,
"text": "This chapter describes how to delete records from a table using MyBatis."
},
{
"code": null,
"e": 1991,
"s": 1944,
"text": "We have the following STUDENT table in MySQL −"
},
{
"code": null,
"e": 2240,
"s": 1991,
... |
How to find leap year or not in android using year API class? | This example demonstrate about How to find leap year or not in android using year API class.
Step 1 − Create a new project in Android Studio, go to File ⇒ New Project and fill all required details to create a new project.
Step 2 − Add the following code to res/layout/activity_main.xml.
<?xml version="1.0" encoding="utf... | [
{
"code": null,
"e": 1155,
"s": 1062,
"text": "This example demonstrate about How to find leap year or not in android using year API class."
},
{
"code": null,
"e": 1284,
"s": 1155,
"text": "Step 1 − Create a new project in Android Studio, go to File ⇒ New Project and fill all re... |
HTTP headers | Strict-Transport-Security | 05 Nov, 2019
HTTP Strict Transport Security (HSTS) is a web security policy mechanism that helps protect websites from malicious activities and informs user agents and web browsers how to handle its connection through a response header. Whenever a website connects through HTTP and then redirects to HTTPS, an opportunit... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n05 Nov, 2019"
},
{
"code": null,
"e": 679,
"s": 28,
"text": "HTTP Strict Transport Security (HSTS) is a web security policy mechanism that helps protect websites from malicious activities and informs user agents and web browsers how to ... |
How do I copy items from list to list without foreach in C#? | The List<T> is a collection of strongly typed objects that can be accessed by index
and having methods for sorting, searching, and modifying list.
It is the generic version of the ArrayList that comes under System.Collection.Generic
namespace.
List<T> equivalent of the ArrayList, which implements IList<T>.
It comes und... | [
{
"code": null,
"e": 1431,
"s": 1187,
"text": "The List<T> is a collection of strongly typed objects that can be accessed by index\nand having methods for sorting, searching, and modifying list.\nIt is the generic version of the ArrayList that comes under System.Collection.Generic\nnamespace."
},
... |
Bash shell script to find out the largest value from given command line arguments | 05 Sep, 2019
Write a shell script to find out the largest value from the given number of command-line arguments.
Example:
Special variables in bash:
$@- All arguments.
$#- Number of arguments.
$0- Filename.
$1, $2, $3, $4 ... - Specific arguments.
Approach
If the number of arguments is 0, end the program.
If not zero,... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n05 Sep, 2019"
},
{
"code": null,
"e": 128,
"s": 28,
"text": "Write a shell script to find out the largest value from the given number of command-line arguments."
},
{
"code": null,
"e": 137,
"s": 128,
"text": "Exampl... |
JavaScript | Timer | 19 Feb, 2019
Prerequisites:
GetMinutes()
GetSeconds()
SetInterval() Method
In this post, a timer has been shown that shows the countdown and its colour/message gets changed after every specific period of time.
Syntax:
setTimeout(function, milliseconds, parameter1, ...)
Parameter: It accept some parameters which are sp... | [
{
"code": null,
"e": 54,
"s": 26,
"text": "\n19 Feb, 2019"
},
{
"code": null,
"e": 69,
"s": 54,
"text": "Prerequisites:"
},
{
"code": null,
"e": 82,
"s": 69,
"text": "GetMinutes()"
},
{
"code": null,
"e": 95,
"s": 82,
"text": "GetSeconds()"... |
PostgreSQL – DROP COLUMN | 28 Aug, 2020
PostgreSQL also supports the DROP COLUMN clause in the ALTER TABLE statement to remove one or more columns of a table. When you remove a column from a table, PostgreSQL will automatically remove all of its indexes and constraints involving the column.
Syntax:
ALTER TABLE table_name
DROP COLUMN column_name... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n28 Aug, 2020"
},
{
"code": null,
"e": 280,
"s": 28,
"text": "PostgreSQL also supports the DROP COLUMN clause in the ALTER TABLE statement to remove one or more columns of a table. When you remove a column from a table, PostgreSQL will a... |
Intuition of SpanBert | 11 Sep, 2021
Prerequisite: BERT Model
SpanBERT vs BERT
SpanBERT is an improvement on the BERT model providing improved prediction of spans of text. Unlike BERT, we perform the following steps here i) mask random contiguous spans, rather than random individual tokens. ii) training the model based on tokens at the start ... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n11 Sep, 2021"
},
{
"code": null,
"e": 77,
"s": 52,
"text": "Prerequisite: BERT Model"
},
{
"code": null,
"e": 94,
"s": 77,
"text": "SpanBERT vs BERT"
},
{
"code": null,
"e": 464,
"s": 94,
"text":... |
How to generate Large Prime numbers for RSA Algorithm | 27 Sep, 2021
The security of the RSA algorithm is based on the difficulty of factorizing very large numbers. The setup of an RSA cryptosystem involves the generation of two large primes, say p and q, from which, the RSA modulus is calculated as n = p * q. The greater the modulus size, the higher is the security level o... | [
{
"code": null,
"e": 54,
"s": 26,
"text": "\n27 Sep, 2021"
},
{
"code": null,
"e": 706,
"s": 54,
"text": "The security of the RSA algorithm is based on the difficulty of factorizing very large numbers. The setup of an RSA cryptosystem involves the generation of two large primes, ... |
java.time.Duration Class in Java | 24 Jan, 2022
Duration is the value-based Class present in the Java time library. It’s used to get time-based amount of time. This class is immutable and thread-safe. This article describes all the methods present in this class and some basic examples using class methods.
This class implements Serializable, Comparable<... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n24 Jan, 2022"
},
{
"code": null,
"e": 288,
"s": 28,
"text": "Duration is the value-based Class present in the Java time library. It’s used to get time-based amount of time. This class is immutable and thread-safe. This article describes... |
Java Program to locate a character in a string | To locate a character in a string, use the indexOf() method.
Let’s say the following is our string.
String str = "testdemo";
Find a character ‘d’ in a string and get the index.
int index = str.indexOf( 'd');
Live Demo
public class Demo {
public static void main(String []args) {
String str = "testdemo";
... | [
{
"code": null,
"e": 1123,
"s": 1062,
"text": "To locate a character in a string, use the indexOf() method."
},
{
"code": null,
"e": 1162,
"s": 1123,
"text": "Let’s say the following is our string."
},
{
"code": null,
"e": 1187,
"s": 1162,
"text": "String str ... |
Besides Word Embedding, why you need to know Character Embedding? | by Edward Ma | Towards Data Science | In 2013, Tomas Mikolov [1] introduced word embedding to learn a better quality of word. At that time word embedding is state of the art on dealing with text. Later on, doc2vec is introduced as well. What if we think in another angel? Instead of aggregate from word to document, is it possible to aggregate from character... | [
{
"code": null,
"e": 502,
"s": 172,
"text": "In 2013, Tomas Mikolov [1] introduced word embedding to learn a better quality of word. At that time word embedding is state of the art on dealing with text. Later on, doc2vec is introduced as well. What if we think in another angel? Instead of aggregate ... |
Combine similar characters in Python using Dictionary Get() Method - GeeksforGeeks | 14 Apr, 2022
Let us see how to combine similar characters in a list.
Example :
Input : [‘g’, ‘e’, ‘e’, ‘k’, ‘s’, ‘f’, ‘o’, ‘r’, ‘g’, ‘e’, ‘e’, ‘k’, ‘s’]
Output : [‘gg’, ‘eeee’, ‘kk’, ‘ss’, ‘f’, ‘o’, ‘r’]
We will be using the get() method of the dictionary class.
The get() method returns the value of the item with the... | [
{
"code": null,
"e": 23781,
"s": 23753,
"text": "\n14 Apr, 2022"
},
{
"code": null,
"e": 23838,
"s": 23781,
"text": "Let us see how to combine similar characters in a list. "
},
{
"code": null,
"e": 23848,
"s": 23838,
"text": "Example :"
},
{
"code": n... |
Max sum submatrix | Practice | GeeksforGeeks | Given a matrix of size NxM and a list of queries containing (a,b) pairs. Find the maximum sum among all (a x b) sub-matrices of the matrix.
Note: The rows and columns of the submatrix must be contiguous. For example:
Example 1:
Input:
N = 3, M = 4
mat[][] = {{1, 2, 3, 9},
{4, 5, 6, 2},
{8, 3, ... | [
{
"code": null,
"e": 444,
"s": 226,
"text": "Given a matrix of size NxM and a list of queries containing (a,b) pairs. Find the maximum sum among all (a x b) sub-matrices of the matrix. \nNote: The rows and columns of the submatrix must be contiguous. For example:"
},
{
"code": null,
"e":... |
JavaScript - Array concat() Method | Javascript array concat() method returns a new array comprised of this array joined with two or more arrays.
The syntax of concat() method is as follows −
array.concat(value1, value2, ..., valueN);
valueN − Arrays and/or values to concatenate to the resulting array.
This method returns an array object representing the... | [
{
"code": null,
"e": 2575,
"s": 2466,
"text": "Javascript array concat() method returns a new array comprised of this array joined with two or more arrays."
},
{
"code": null,
"e": 2621,
"s": 2575,
"text": "The syntax of concat() method is as follows −"
},
{
"code": null,... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.