title stringlengths 3 221 | text stringlengths 17 477k | parsed listlengths 0 3.17k |
|---|---|---|
CSS to put icon inside an input element in a form | To show how to put an icon inside an input element in a form using CSS, the code is as follows −
Live Demo
<!DOCTYPE html>
<html>
<head>
<link
rel="stylesheet"
href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/fontawesome.
min.css"
/>
<style>
body {
font-family: "Segoe UI", Tahoma, Geneva, Verdana... | [
{
"code": null,
"e": 1159,
"s": 1062,
"text": "To show how to put an icon inside an input element in a form using CSS, the code is as follows −"
},
{
"code": null,
"e": 1170,
"s": 1159,
"text": " Live Demo"
},
{
"code": null,
"e": 2266,
"s": 1170,
"text": "<!D... |
BigDecimal scale() Method in Java - GeeksforGeeks | 04 Dec, 2018
The java.math.BigDecimal.scale() is an inbuilt method in java that returns the scale of this BigDecimal.
For zero or positive value, the scale is the number of digits to the right of the decimal point.
For negative value, the unscaled value of the number is multiplied by ten to the power of the negation of... | [
{
"code": null,
"e": 24474,
"s": 24446,
"text": "\n04 Dec, 2018"
},
{
"code": null,
"e": 24579,
"s": 24474,
"text": "The java.math.BigDecimal.scale() is an inbuilt method in java that returns the scale of this BigDecimal."
},
{
"code": null,
"e": 24676,
"s": 24579... |
Python Program to Determine Whether a Given Number is Even or Odd Recursively | When it is required to check if a given number is an odd number or an even number using recursion, recursion can be used.
The recursion computes output of small bits of the bigger problem, and combines these bits to give the solution to the bigger problem.
Below is a demonstration for the same −
Live Demo
def check_od... | [
{
"code": null,
"e": 1184,
"s": 1062,
"text": "When it is required to check if a given number is an odd number or an even number using recursion, recursion can be used."
},
{
"code": null,
"e": 1319,
"s": 1184,
"text": "The recursion computes output of small bits of the bigger pr... |
How to get the notification configuration details of a S3 bucket using Boto3 and AWS Client? | Problem Statement − Use boto3 library in Python to get the notification configuration of a S3 bucket. For example, find the notification configuration details of Bucket_1 in S3.
Step 1 − Import boto3 and botocore exceptions to handle exceptions.
Step 2 − Use bucket_name as the parameter in the function.
Step 3 − Create... | [
{
"code": null,
"e": 1240,
"s": 1062,
"text": "Problem Statement − Use boto3 library in Python to get the notification configuration of a S3 bucket. For example, find the notification configuration details of Bucket_1 in S3."
},
{
"code": null,
"e": 1308,
"s": 1240,
"text": "Step... |
What are mixed arrays in C#? | Mixed arrays are a combination of multi-dimension arrays and jagged arrays.
Note − The mixed arrays type is obsolete now since .NET 4.0 update removed it.
Let us see how you can declare a mixed array −
var x = new object[] {89,45,"jacob",9.8}
We can also set them as −
var x = new object[] {87, 33,"tim",6.7, new List<st... | [
{
"code": null,
"e": 1138,
"s": 1062,
"text": "Mixed arrays are a combination of multi-dimension arrays and jagged arrays."
},
{
"code": null,
"e": 1217,
"s": 1138,
"text": "Note − The mixed arrays type is obsolete now since .NET 4.0 update removed it."
},
{
"code": null,... |
Tryit Editor v3.7 | HTML Input types
Tryit: HTML input button | [
{
"code": null,
"e": 27,
"s": 10,
"text": "HTML Input types"
}
] |
Generating Random String Using PHP - GeeksforGeeks | 31 Jul, 2021
Generate a random, unique, alpha-numeric string using PHP.
Examples:
EA070
aBX32gTf
APPROACH 1: Brute ForceThe first approach is the simplest one to understand and thus brute force.It can be achieved as follows:
Store all the possible letters into a string.
Generate random index from 0 to string length-1.... | [
{
"code": null,
"e": 24796,
"s": 24768,
"text": "\n31 Jul, 2021"
},
{
"code": null,
"e": 24855,
"s": 24796,
"text": "Generate a random, unique, alpha-numeric string using PHP."
},
{
"code": null,
"e": 24865,
"s": 24855,
"text": "Examples:"
},
{
"code":... |
Check if a given Graph is 2-edge connected or not - GeeksforGeeks | 30 Jun, 2021
Given an undirected graph G, with V vertices and E edges, the task is to check whether the graph is 2-edge connected or not.
A graph is said to be 2-edge connected if, on removing any edge of the graph, it still remains connected, i.e. it contains no Bridges.
Examples:
Input: V = 8, E = 10
Output: Yes... | [
{
"code": null,
"e": 24701,
"s": 24673,
"text": "\n30 Jun, 2021"
},
{
"code": null,
"e": 24826,
"s": 24701,
"text": "Given an undirected graph G, with V vertices and E edges, the task is to check whether the graph is 2-edge connected or not."
},
{
"code": null,
"e": 2... |
Representing text in natural language processing | by Michel Kana, Ph.D | Towards Data Science | This article looks at the representation of language for natural language processing (NLP). If you are one of those rare deep learning gurus, you will likely not learn anything new here. If not, dive with me into the fascinating world of turning words into some representations which algorithms can understand. We motiva... | [
{
"code": null,
"e": 829,
"s": 172,
"text": "This article looks at the representation of language for natural language processing (NLP). If you are one of those rare deep learning gurus, you will likely not learn anything new here. If not, dive with me into the fascinating world of turning words int... |
Report is too long to read? Use NLP to create a summary | by Louis Teo | Towards Data Science | Have you ever had one too many reports to read and you just want a quick summary of each report? Were you ever in a situation where everybody just wanted to read a summary instead of a full-blown report?
Summarization has become a very helpful way of tackling the issue of data overburden in the 21st century. In this st... | [
{
"code": null,
"e": 251,
"s": 47,
"text": "Have you ever had one too many reports to read and you just want a quick summary of each report? Were you ever in a situation where everybody just wanted to read a summary instead of a full-blown report?"
},
{
"code": null,
"e": 488,
"s": 2... |
MySQL query to check if a string contains a word? | For this, you can use the LIKE operator along with CONCAT() function. Let us first create a table −
mysql> create table DemoTable
(
Value text
);
Query OK, 0 rows affected (0.63 sec)
Insert some records in the table using insert command −
mysql> insert into DemoTable values('MySQL');
Query OK, 1 row affected (0.15 s... | [
{
"code": null,
"e": 1162,
"s": 1062,
"text": "For this, you can use the LIKE operator along with CONCAT() function. Let us first create a table −"
},
{
"code": null,
"e": 1248,
"s": 1162,
"text": "mysql> create table DemoTable\n(\n Value text\n);\nQuery OK, 0 rows affected (0.... |
Functional Interfaces in Java - GeeksforGeeks | 16 Jan, 2022
Java has forever remained an Object-Oriented Programming language. By object-oriented programming language, we can declare that everything present in the Java programming language rotates throughout the Objects, except for some of the primitive data types and primitive methods for integrity and simplicity.... | [
{
"code": null,
"e": 28950,
"s": 28922,
"text": "\n16 Jan, 2022"
},
{
"code": null,
"e": 29505,
"s": 28950,
"text": "Java has forever remained an Object-Oriented Programming language. By object-oriented programming language, we can declare that everything present in the Java prog... |
Firebase - Environment Setup | In this chapter, we will show you how to add Firebase to the existing application. We will need NodeJS. Check the link from the following table, if you do not have it already.
NodeJS and NPM
NodeJS is the platform needed for Firebase development. Checkout our NodeJS Environment Setup.
You can create a Firebase account ... | [
{
"code": null,
"e": 2342,
"s": 2166,
"text": "In this chapter, we will show you how to add Firebase to the existing application. We will need NodeJS. Check the link from the following table, if you do not have it already."
},
{
"code": null,
"e": 2357,
"s": 2342,
"text": "NodeJS... |
SQLite - DELETE Query | SQLite DELETE Query is used to delete the existing records from a table. You can use WHERE clause with DELETE query to delete the selected rows, otherwise all the records would be deleted.
Following is the basic syntax of DELETE query with WHERE clause.
DELETE FROM table_name
WHERE [condition];
You can combine N numbe... | [
{
"code": null,
"e": 2827,
"s": 2638,
"text": "SQLite DELETE Query is used to delete the existing records from a table. You can use WHERE clause with DELETE query to delete the selected rows, otherwise all the records would be deleted."
},
{
"code": null,
"e": 2892,
"s": 2827,
"t... |
Push Down Automata | Theory of Computation
The Pushdown Automata is investigated by Sheila Greibach. It is a part in theoretical computer science which employs a stack. It is called "pushed-down" as it works on the principal of stack i.e., Last In First Out. Always the operation is first performed on the top most element. The push down aut... | [
{
"code": null,
"e": 112,
"s": 90,
"text": "Theory of Computation"
},
{
"code": null,
"e": 501,
"s": 112,
"text": "The Pushdown Automata is investigated by Sheila Greibach. It is a part in theoretical computer science which employs a stack. It is called \"pushed-down\" as it work... |
MySQL - WHERE Clause | We have seen the SQL SELECT command to fetch data from a MySQL table. We can use a conditional clause called the WHERE Clause to filter out the results. Using this WHERE clause, we can specify a selection criteria to select the required records from a table.
The following code block has a generic SQL syntax of the SELE... | [
{
"code": null,
"e": 2592,
"s": 2333,
"text": "We have seen the SQL SELECT command to fetch data from a MySQL table. We can use a conditional clause called the WHERE Clause to filter out the results. Using this WHERE clause, we can specify a selection criteria to select the required records from a t... |
C# program to sort an array in descending order | Initialize the array.
int[] myArr = new int[5] {98, 76, 99, 32, 77};
Compare the first element in the array with the next element to find the largest element, then the second largest, etc.
if(myArr[i] < myArr[j]) {
temp = myArr[i];
myArr[i] = myArr[j];
myArr[j] = temp;
}
Above, i and j are initially set to.
i=... | [
{
"code": null,
"e": 1084,
"s": 1062,
"text": "Initialize the array."
},
{
"code": null,
"e": 1131,
"s": 1084,
"text": "int[] myArr = new int[5] {98, 76, 99, 32, 77};"
},
{
"code": null,
"e": 1251,
"s": 1131,
"text": "Compare the first element in the array wit... |
StyleGAN v2: notes on training and latent space exploration | by 5agado | Towards Data Science | What: in this entry I’m going to present notes, thoughts and experimental results I collected while training multiple StyleGAN models and exploring the learned latent space.
Why: this is a dump of ideas/considerations that can range from the obvious to the “ holy moly”, meant to possibly provide insight — or starting p... | [
{
"code": null,
"e": 346,
"s": 172,
"text": "What: in this entry I’m going to present notes, thoughts and experimental results I collected while training multiple StyleGAN models and exploring the learned latent space."
},
{
"code": null,
"e": 647,
"s": 346,
"text": "Why: this is... |
Python - Convert Binary tuple to Integer - GeeksforGeeks | 02 Sep, 2020
Given Binary Tuple representing binary representation of number, convert to integer.
Input : test_tup = (1, 1, 0)Output : 6Explanation : 4 + 2 = 6.
Input : test_tup = (1, 1, 1)Output : 7Explanation : 4 + 2 + 1 = 7.
Method #1 : Using join() + list comprehension + int()
In this, we concatenate the binary tu... | [
{
"code": null,
"e": 24404,
"s": 24376,
"text": "\n02 Sep, 2020"
},
{
"code": null,
"e": 24490,
"s": 24404,
"text": "Given Binary Tuple representing binary representation of number, convert to integer."
},
{
"code": null,
"e": 24553,
"s": 24490,
"text": "Inpu... |
C++ Program to Compute Cross Product of Two Vectors | This is a C++ program to compute Cross Product of Two Vectors.
Let us suppose,
M = m1 * i + m2 * j + m3 * k
N = n1 * i + n2 * j + n3 * k.
So, cross product = (m2 * n3 – m3 * n2) * i + (m1 * n3 – m3 * n1) * j + (m1 * n1 – m2 * n1) * k
where m2 * n3 – m3 * n2, m1 * n3 – m3 * n1 and m1 * n1 – m2 * n1 are the coefficients ... | [
{
"code": null,
"e": 1125,
"s": 1062,
"text": "This is a C++ program to compute Cross Product of Two Vectors."
},
{
"code": null,
"e": 1141,
"s": 1125,
"text": "Let us suppose,"
},
{
"code": null,
"e": 1170,
"s": 1141,
"text": "M = m1 * i + m2 * j + m3 * k"
... |
Fuzzy Inference System implementation in Python | by Carmel Gafa | Towards Data Science | In a previous article, we discussed the basics of fuzzy sets and fuzzy inferencing. The report also illustrated the construction of a possible control application using a fuzzy inferencing method. In this article, we will build a multi-input/multi-output fuzzy inference system using the Python programming language. It ... | [
{
"code": null,
"e": 613,
"s": 172,
"text": "In a previous article, we discussed the basics of fuzzy sets and fuzzy inferencing. The report also illustrated the construction of a possible control application using a fuzzy inferencing method. In this article, we will build a multi-input/multi-output ... |
How to Deploy Models at Scale with AI Platform | by Elsa Scola | Towards Data Science | Usually, when we all start learning Machine Learning, we find a ton of information about how to build models, which of course is the core of the topic. But there’s an equally important aspect of ML that is rarely taught in the academic world of Data Science, and that is how to deploy these models. How can I share this ... | [
{
"code": null,
"e": 652,
"s": 178,
"text": "Usually, when we all start learning Machine Learning, we find a ton of information about how to build models, which of course is the core of the topic. But there’s an equally important aspect of ML that is rarely taught in the academic world of Data Scien... |
Difference between Write-Output and Write-Host command in PowerShell? | Have we ever wondered, Write-Output and Write-Host both are used to print the strings or the output of the command then what is the difference between them?
PS C:\> Write-Output "Test String"
Test String
PS C:\> Write-Host "Test String"
Test String
The output remains the same.
The first major difference is storing the ... | [
{
"code": null,
"e": 1219,
"s": 1062,
"text": "Have we ever wondered, Write-Output and Write-Host both are used to print the strings or the output of the command then what is the difference between them?"
},
{
"code": null,
"e": 1311,
"s": 1219,
"text": "PS C:\\> Write-Output \"T... |
Difference between %p and %x in C/C++ | Here we will see what are the differences between %p and %x in C or C++. The %p is used to print the pointer value, and %x is used to print hexadecimal values. Though pointers can also be displayed using %u, or %x. If we want to print some value using %p and %x then we will not feel any major differences. The only diff... | [
{
"code": null,
"e": 1471,
"s": 1062,
"text": "Here we will see what are the differences between %p and %x in C or C++. The %p is used to print the pointer value, and %x is used to print hexadecimal values. Though pointers can also be displayed using %u, or %x. If we want to print some value using %... |
Tryit Editor v3.7 | Tryit: Different text transformations | [] |
Swarm intelligence: Inside the ant colony | by Fabrizio Brioccia | Towards Data Science | “The whole is greater than the sum of its parts” is a well-known quote that according to the Gestalt psychology sums up the idea that a system — the whole — is something more complex and different from the aggregation of its basic elements.
In other words, the attempt to understand a complex system trying to dissect it... | [
{
"code": null,
"e": 413,
"s": 172,
"text": "“The whole is greater than the sum of its parts” is a well-known quote that according to the Gestalt psychology sums up the idea that a system — the whole — is something more complex and different from the aggregation of its basic elements."
},
{
... |
How to add rounded corners to a button with CSS? | To add rounded corners to a button, use the border-radius property.
You can try to run the following code to add rounded corners −
Live Demo
<!DOCTYPE html>
<html>
<head>
<style>
.button {
background-color: yellow;
color: black;
text-align: center;
font-... | [
{
"code": null,
"e": 1130,
"s": 1062,
"text": "To add rounded corners to a button, use the border-radius property."
},
{
"code": null,
"e": 1193,
"s": 1130,
"text": "You can try to run the following code to add rounded corners −"
},
{
"code": null,
"e": 1203,
"s":... |
Underscore.js _.range() Function - GeeksforGeeks | 24 Nov, 2021
_.range() function:
It is used to print the list of elements from the start given as a parameter to the end also a parameter.
The start and step parameters are optional.
The default value of start is 0 and that of step is 1.
In the list formed the start is inclusive and the stop is exclusive.
The step para... | [
{
"code": null,
"e": 23982,
"s": 23954,
"text": "\n24 Nov, 2021"
},
{
"code": null,
"e": 24002,
"s": 23982,
"text": "_.range() function:"
},
{
"code": null,
"e": 24108,
"s": 24002,
"text": "It is used to print the list of elements from the start given as a par... |
Basic Tweet Preprocessing in Python | by Parthvi Shah | Towards Data Science | Note from the editors: Towards Data Science is a Medium publication primarily based on the study of data science and machine learning. We are not health professionals or epidemiologists, and the opinions of this article should not be interpreted as professional advice. To learn more about the coronavirus pandemic, you ... | [
{
"code": null,
"e": 508,
"s": 172,
"text": "Note from the editors: Towards Data Science is a Medium publication primarily based on the study of data science and machine learning. We are not health professionals or epidemiologists, and the opinions of this article should not be interpreted as profes... |
How to find items in one list that are not in another list in C#? | LINQ Except operator comes under Set operators category in LINQ
The Except() method requires two collections and find those elements which are not present in second collection
Except extension method doesn't return the correct result for the collection of complex types.
Live Demo
using System;
using System.Collections... | [
{
"code": null,
"e": 1126,
"s": 1062,
"text": "LINQ Except operator comes under Set operators category in LINQ"
},
{
"code": null,
"e": 1238,
"s": 1126,
"text": "The Except() method requires two collections and find those elements which are not present in second collection"
},
... |
Which are the new Null Operators introduced in PowerShell version 7? | PowerShell version 7 has introduced a few new null operators. They are as below.
Null-Coalescing operator - ??
Null-Coalescing operator - ??
Null Conditional Assignment Operators - ??=
Null Conditional Assignment Operators - ??=
Null Conditional member access operators - ?. and ?[]
Null Conditional member access operat... | [
{
"code": null,
"e": 1143,
"s": 1062,
"text": "PowerShell version 7 has introduced a few new null operators. They are as below."
},
{
"code": null,
"e": 1173,
"s": 1143,
"text": "Null-Coalescing operator - ??"
},
{
"code": null,
"e": 1203,
"s": 1173,
"text": "... |
How to get a list of all the fonts currently available for Matplotlib? | To get a list of all the fonts currently available for matplotlib, we can use the font_manager.findSystemFonts() method.
Print a statement.
Print a statement.
Use font_manager.findSystemFonts() method to get a list of fonts availabe.
Use font_manager.findSystemFonts() method to get a list of fonts availabe.
from matplo... | [
{
"code": null,
"e": 1183,
"s": 1062,
"text": "To get a list of all the fonts currently available for matplotlib, we can use the font_manager.findSystemFonts() method."
},
{
"code": null,
"e": 1202,
"s": 1183,
"text": "Print a statement."
},
{
"code": null,
"e": 1221,... |
Git Pull Branch from GitHub | Now continue working on our new branch in our local Git.
Lets pull from our GitHub repository again so that our code is up-to-date:
git pull
remote: Enumerating objects: 5, done.
remote: Counting objects: 100% (5/5), done.
remote: Compressing objects: 100% (3/3), done.
remote: Total 3 (delta 2), reused 0 (delta 0), pac... | [
{
"code": null,
"e": 57,
"s": 0,
"text": "Now continue working on our new branch in our local Git."
},
{
"code": null,
"e": 132,
"s": 57,
"text": "Lets pull from our GitHub repository again so that our code is up-to-date:"
},
{
"code": null,
"e": 522,
"s": 132,
... |
Max() and Min() function in MS Access - GeeksforGeeks | 02 Sep, 2020
1. Max() Function :max() function return the maximum value of given set. In the function a query is passed and in the eligible records which value will be maximum that will return as result. A expression will be pass as parameter and it will return the maximum value in the expression.
Syntax :
Max (express... | [
{
"code": null,
"e": 23877,
"s": 23849,
"text": "\n02 Sep, 2020"
},
{
"code": null,
"e": 24163,
"s": 23877,
"text": "1. Max() Function :max() function return the maximum value of given set. In the function a query is passed and in the eligible records which value will be maximum ... |
How to use diff command in linux | The diff command analyzes line by line and displays a list of changes between two files. As a special case, diff compares a copy of standard input to itself. This article describes “How to use diff command in Linux.
Recognize the changes between one version of a file
Compare two configuration or program files
Create a ... | [
{
"code": null,
"e": 1278,
"s": 1062,
"text": "The diff command analyzes line by line and displays a list of changes between two files. As a special case, diff compares a copy of standard input to itself. This article describes “How to use diff command in Linux."
},
{
"code": null,
"e": ... |
When will be an IllegalStateException (unchecked) thrown in Java? | An IllegalStateException is an unchecked exception in Java. This exception may arise in our java program mostly if we are dealing with the collection framework of java.util.package. There are many collections like List, Queue, Tree, Map out of which List and Queues (Queue and Deque) to throw this IllegalStateException ... | [
{
"code": null,
"e": 1408,
"s": 1062,
"text": "An IllegalStateException is an unchecked exception in Java. This exception may arise in our java program mostly if we are dealing with the collection framework of java.util.package. There are many collections like List, Queue, Tree, Map out of which Lis... |
How to install PIP in Linux? - GeeksforGeeks | 20 Jan, 2020
Prerequisite: Python Language Introduction Before we start with how to install pip for Python on Linux, let’s first go through the basic introduction to Python. Python is a widely-used general-purpose, high-level programming language. Python is a programming language that lets you work quickly and integrat... | [
{
"code": null,
"e": 24292,
"s": 24264,
"text": "\n20 Jan, 2020"
},
{
"code": null,
"e": 24627,
"s": 24292,
"text": "Prerequisite: Python Language Introduction Before we start with how to install pip for Python on Linux, let’s first go through the basic introduction to Python. Py... |
Creating sea routes from the sea of AIS data. | by Alexei Novikov | Towards Data Science | Maritime routes are important characteristics of maritime transportation. Sometimes they are clearly defined by the official guidelines “traffic separation schemes”, sometimes they are more of the recommendations. International Maritime Organization is responsible for the routeing systems, including traffic separation ... | [
{
"code": null,
"e": 629,
"s": 172,
"text": "Maritime routes are important characteristics of maritime transportation. Sometimes they are clearly defined by the official guidelines “traffic separation schemes”, sometimes they are more of the recommendations. International Maritime Organization is re... |
What is a pageContext Object in JSP? | The pageContext object is an instance of a javax.servlet.jsp.PageContext object. The pageContext object is used to represent the entire JSP page.
This object is intended as a means to access information about the page while avoiding most of the implementation details.
This object stores references to the request and re... | [
{
"code": null,
"e": 1208,
"s": 1062,
"text": "The pageContext object is an instance of a javax.servlet.jsp.PageContext object. The pageContext object is used to represent the entire JSP page."
},
{
"code": null,
"e": 1331,
"s": 1208,
"text": "This object is intended as a means t... |
Is it better to have one big JavaScript file or multiple light files? | To avoid multiple server requests, group your JavaScript files into one. Whatever you use for performance, try to minify JavaScript to improve the load time of the web page.
If you are using single page application, then group all the scripts in a single file.
If you are using multiple files, then minify all of your sc... | [
{
"code": null,
"e": 1236,
"s": 1062,
"text": "To avoid multiple server requests, group your JavaScript files into one. Whatever you use for performance, try to minify JavaScript to improve the load time of the web page."
},
{
"code": null,
"e": 1323,
"s": 1236,
"text": "If you a... |
Tryit Editor v3.7 | Padding & Spacing
Tryit: HTML table - cellpadding | [
{
"code": null,
"e": 40,
"s": 22,
"text": "Padding & Spacing"
}
] |
regexp_replace(string, pattern, replacement) | presto:default> SELECT regexp_replace('1a 2b 3c 6f', '(\d+)([abc]) ', 'aa$2 ')
as expression;
expression
----------------
aaa aab aac 6f
(1 row)
Replace the instance of the string matched for the expression with the pattern and replacement string ‘aa’.
46 Lectures
3.5 hours
Arnab Chakraborty
... | [
{
"code": null,
"e": 2101,
"s": 2006,
"text": "presto:default> SELECT regexp_replace('1a 2b 3c 6f', '(\\d+)([abc]) ', 'aa$2 ') \nas expression;"
},
{
"code": null,
"e": 2159,
"s": 2101,
"text": " expression \n---------------- \n aaa aab aac 6f \n (1 row)\n"
},
{
"code": n... |
Selenium and Headless Environment. | We can execute Selenium in a headless environment. The headless execution is a new trend followed in industry today since it is fast and supports more than one browser.
Firefox in headless mode, can be run once we configure the geckodriver path. We shall then use the FirefoxOptions class, and send the headless knowledg... | [
{
"code": null,
"e": 1231,
"s": 1062,
"text": "We can execute Selenium in a headless environment. The headless execution is a new trend followed in industry today since it is fast and supports more than one browser."
},
{
"code": null,
"e": 1459,
"s": 1231,
"text": "Firefox in he... |
Robot Framework - Environment Setup | Robot framework is built using python. In this chapter, we will learn how to set up Robot Framework. To work with Robot Framework, we need to install the following −
Python
pip
Robot Framework
wxPython for Ride IDE
Robot Framework Ride
To install python, go to python official site − https://www.python.org/downloads/ an... | [
{
"code": null,
"e": 2335,
"s": 2169,
"text": "Robot framework is built using python. In this chapter, we will learn how to set up Robot Framework. To work with Robot Framework, we need to install the following −"
},
{
"code": null,
"e": 2342,
"s": 2335,
"text": "Python"
},
{... |
Java NIO - Pipe | In Java NIO pipe is a component which is used to write and read data between two threads.Pipe mainly consist of two channels which are responsible for data propagation.
Among two constituent channels one is called as Sink channel which is mainly for writing data and other is Source channel whose main purpose is to read... | [
{
"code": null,
"e": 2153,
"s": 1984,
"text": "In Java NIO pipe is a component which is used to write and read data between two threads.Pipe mainly consist of two channels which are responsible for data propagation."
},
{
"code": null,
"e": 2329,
"s": 2153,
"text": "Among two con... |
How to pass arrays as function arguments in JavaScript? | In olden days if we need to pass arrays as function arguments then apply() and null should be used. The use of null makes a code unclean. So to make code clean and also to pass an array as a function argument, the spread operator comes in to picture. By using the spread operator we don't need to use apply() function. L... | [
{
"code": null,
"e": 1413,
"s": 1062,
"text": "In olden days if we need to pass arrays as function arguments then apply() and null should be used. The use of null makes a code unclean. So to make code clean and also to pass an array as a function argument, the spread operator comes in to picture. By... |
Keras - Time Series Prediction using LSTM RNN | In this chapter, let us write a simple Long Short Term Memory (LSTM) based RNN to do sequence analysis. A sequence is a set of values where each value corresponds to a particular instance of time. Let us consider a simple example of reading a sentence. Reading and understanding a sentence involves reading the word in t... | [
{
"code": null,
"e": 2534,
"s": 2051,
"text": "In this chapter, let us write a simple Long Short Term Memory (LSTM) based RNN to do sequence analysis. A sequence is a set of values where each value corresponds to a particular instance of time. Let us consider a simple example of reading a sentence. ... |
HTML5 Input type=number removes leading zero | The leading zero issues may arise when you want to add an international phone number.
To solve this −
<input type="tel" pattern="[0-9]*">
On iOS, the numeric keyboard appears with only numbers.
On Android phones, the "tel" is rightly interpreted but not the pattern.
You can also use −
<input type="text" pattern="[0-9]*... | [
{
"code": null,
"e": 1148,
"s": 1062,
"text": "The leading zero issues may arise when you want to add an international phone number."
},
{
"code": null,
"e": 1164,
"s": 1148,
"text": "To solve this −"
},
{
"code": null,
"e": 1200,
"s": 1164,
"text": "<input ty... |
Go - Passing pointers to functions | Go programming language allows you to pass a pointer to a function. To do so, simply declare the function parameter as a pointer type.
In the following example, we pass two pointers to a function and change the value inside the function which reflects back in the calling function −
package main
import "fmt"
func main... | [
{
"code": null,
"e": 2072,
"s": 1937,
"text": "Go programming language allows you to pass a pointer to a function. To do so, simply declare the function parameter as a pointer type."
},
{
"code": null,
"e": 2220,
"s": 2072,
"text": "In the following example, we pass two pointers ... |
How I Made a Website with Python and AWS | Towards Data Science | As coders and programmers, we must be able to present the projects and applications that we’ve created to various individuals without having a laptop on us at all times. In order to do so, we can host our applications on our own websites to be viewed by anyone with access to the internet. The first step in creating our... | [
{
"code": null,
"e": 694,
"s": 172,
"text": "As coders and programmers, we must be able to present the projects and applications that we’ve created to various individuals without having a laptop on us at all times. In order to do so, we can host our applications on our own websites to be viewed by a... |
Difference between throw and throws in Java | Both throw and throws are the concepts of exception handing in which throw is used to explicitly throw an exception from a method or any block of code while throws are used in the signature of the method to indicate that this method might throw one of the listed type exceptions.
The following are the important differen... | [
{
"code": null,
"e": 1342,
"s": 1062,
"text": "Both throw and throws are the concepts of exception handing in which throw is used to explicitly throw an exception from a method or any block of code while throws are used in the signature of the method to indicate that this method might throw one of t... |
How do I access subdocuments in MongoDB queries? | To access subdocuments in MongoDB, use find() with dot notation. Let us create a collection with documents −
> db.demo670.insertOne({
... id:101,
... "details":
... {
... Name:"Chris",
... Age:21,
... CountryName:"US",
... SubjectName:"MongoDB"
... }
... }
... );
{
"acknowledged" : true,
"insertedId" : ObjectId("... | [
{
"code": null,
"e": 1171,
"s": 1062,
"text": "To access subdocuments in MongoDB, use find() with dot notation. Let us create a collection with documents −"
},
{
"code": null,
"e": 1609,
"s": 1171,
"text": "> db.demo670.insertOne({\n... id:101,\n... \"details\":\n... {\n... Name:... |
Most Popular Convolutional Neural Networks Architectures | by Victor Roman | Towards Data Science | The objective of this article is to explore in-depth the concepts of:
Most popular CNN architectures
How to implement them with Keras to perform image classification
There are research teams fully dedicated to developing deep learning architectures for CNN and to training them in huge datasets, so we will take advantag... | [
{
"code": null,
"e": 242,
"s": 172,
"text": "The objective of this article is to explore in-depth the concepts of:"
},
{
"code": null,
"e": 273,
"s": 242,
"text": "Most popular CNN architectures"
},
{
"code": null,
"e": 338,
"s": 273,
"text": "How to implement... |
Multiple Ways to Create Kubernetes Secrets | by Tibor Fabian | Towards Data Science | This article describes how to create Kubernetes (K8s) secrets as part of an installation guide to the Machine Learning Operations (MLOps) pipeline detailed in my post “MLOps on Kubernetes with Docker Desktop”.
The installation in the above-mentioned article uses the following secrets on the K8s pod:
github-repo-cred to... | [
{
"code": null,
"e": 382,
"s": 172,
"text": "This article describes how to create Kubernetes (K8s) secrets as part of an installation guide to the Machine Learning Operations (MLOps) pipeline detailed in my post “MLOps on Kubernetes with Docker Desktop”."
},
{
"code": null,
"e": 473,
... |
IMS DB - Recovery | The database administrator needs to plan for the database recovery in case of system failures. Failures can be of many types such as application crashes, hardware errors, power failures, etc.
Some simple approaches to database recovery are as follows −
Make periodical backup copies of important datasets so that all tra... | [
{
"code": null,
"e": 2138,
"s": 1946,
"text": "The database administrator needs to plan for the database recovery in case of system failures. Failures can be of many types such as application crashes, hardware errors, power failures, etc."
},
{
"code": null,
"e": 2199,
"s": 2138,
... |
BitArray.RightShift() Method in C# with Examples - GeeksforGeeks | 27 Mar, 2019
BitArray class manages a array of bit values, which are represented as Booleans, where true indicates bit is 1 and false indicates bit is 0. This class is contained in namespace, System.Collections. BitArray.RightShift(Int32) method is used to shift the bits of the bit array to the right by one position an... | [
{
"code": null,
"e": 24394,
"s": 24366,
"text": "\n27 Mar, 2019"
},
{
"code": null,
"e": 24822,
"s": 24394,
"text": "BitArray class manages a array of bit values, which are represented as Booleans, where true indicates bit is 1 and false indicates bit is 0. This class is containe... |
Lua - Math library | We often need math operations in scientific and engineering calculations and we can avail this using the standard Lua library math. The list of functions available in math library is shown in the following table.
math.abs (x)
Returns the absolute value of x.
math.acos (x)
Returns the arc cosine of x (in radians).
math.... | [
{
"code": null,
"e": 2316,
"s": 2103,
"text": "We often need math operations in scientific and engineering calculations and we can avail this using the standard Lua library math. The list of functions available in math library is shown in the following table."
},
{
"code": null,
"e": 232... |
How to use href attribute in HTML Page? | The href attribute in an HTML page is used to specify the URL for a page. If the href attribute is not present, then the <a> tag will not be considered as a hyperlink.
Just keep in mind the href attribute should get included as an attribute for <a> tag. It should be used inside the <body>...</body> tags.
You can try th... | [
{
"code": null,
"e": 1230,
"s": 1062,
"text": "The href attribute in an HTML page is used to specify the URL for a page. If the href attribute is not present, then the <a> tag will not be considered as a hyperlink."
},
{
"code": null,
"e": 1368,
"s": 1230,
"text": "Just keep in m... |
How to navigate to a parent route from a child route? - GeeksforGeeks | 12 Nov, 2020
In angular, a root component that serves as the parent component of all the components and rest of the other components can be called a Child Component to the root component. This structure is in a form of a tree where a component which is the parent of a child lies above the child component and this there... | [
{
"code": null,
"e": 24398,
"s": 24370,
"text": "\n12 Nov, 2020"
},
{
"code": null,
"e": 24825,
"s": 24398,
"text": "In angular, a root component that serves as the parent component of all the components and rest of the other components can be called a Child Component to the root... |
LightGBM vs XGBOOST - Which algorithm is better - GeeksforGeeks | 12 Feb, 2021
There are a lot of Data Enthusiasts who are taking part in a number of online competitive competitions in the domain of Machine Learning. Everyone has their own unique independent approach to determine the best model and predict the accurate output of the given problem statement. In Machine Learning, Featu... | [
{
"code": null,
"e": 24344,
"s": 24316,
"text": "\n12 Feb, 2021"
},
{
"code": null,
"e": 25118,
"s": 24344,
"text": "There are a lot of Data Enthusiasts who are taking part in a number of online competitive competitions in the domain of Machine Learning. Everyone has their own un... |
Creating a Table in MySQL to set current date as default | Following is the syntax for creating a table and adding DEFAULT constraint to set default value −
CREATE TABLE yourTableName
(
yourColumnName1 dataType not null ,
yourColumnName2 dataType default anyValue,
.
.
.
N
);;
Let us create a table wherein we have set “employee_joining_date” with default constraint for current ... | [
{
"code": null,
"e": 1160,
"s": 1062,
"text": "Following is the syntax for creating a table and adding DEFAULT constraint to set default value −"
},
{
"code": null,
"e": 1280,
"s": 1160,
"text": "CREATE TABLE yourTableName\n(\nyourColumnName1 dataType not null ,\nyourColumnName2 ... |
Semi-Supervised Learning with K-Means Clustering | by Yufeng | Towards Data Science | Supervised learning and unsupervised learning are the two major tasks in machine learning. Supervised learning models are used when the output of all the instances is available, whereas unsupervised learning is applied when we don’t have the “true label”.
Even though the exploration of unsupervised learning has huge po... | [
{
"code": null,
"e": 428,
"s": 172,
"text": "Supervised learning and unsupervised learning are the two major tasks in machine learning. Supervised learning models are used when the output of all the instances is available, whereas unsupervised learning is applied when we don’t have the “true label”.... |
Entity Level Evaluation for NER Task | by Xu LIANG | Towards Data Science | When we evaluate the NER (Named Entity Recognition) task, there are two kinds of methods, the token-level method, and the entity-level method. For example, we have this sentence predicted below: “Foreign Ministry spokesman Shen Guofang told Reuters”. If we use the token-level evaluation, the token “Shen” is correct, an... | [
{
"code": null,
"e": 770,
"s": 172,
"text": "When we evaluate the NER (Named Entity Recognition) task, there are two kinds of methods, the token-level method, and the entity-level method. For example, we have this sentence predicted below: “Foreign Ministry spokesman Shen Guofang told Reuters”. If w... |
Access metadata of various audio and video file formats using Python - tinytag library - GeeksforGeeks | 12 Nov, 2020
Metadata extraction is a necessary task while making music players or other related applications. The best python library to read music metadata of various audio and video file formats is tinytag. This library allows you to access metadata of various audio and video file formats like mp3, m4a, mp4, flac, w... | [
{
"code": null,
"e": 23901,
"s": 23873,
"text": "\n12 Nov, 2020"
},
{
"code": null,
"e": 24216,
"s": 23901,
"text": "Metadata extraction is a necessary task while making music players or other related applications. The best python library to read music metadata of various audio a... |
Display the dropdown’s (select) selected value on console in JavaScript? | Let’s say the following is our dropdown (select) −
<select onchange="selectedSubjectName()" id="subjectName">
<option>Javascript</option>
<option>MySQL</option>
<option>MongoDB</option>
<option>Java</option>
</select>
Following is the code to display the selected value on Console −
Live Demo
<!DOCTYPE html... | [
{
"code": null,
"e": 1113,
"s": 1062,
"text": "Let’s say the following is our dropdown (select) −"
},
{
"code": null,
"e": 1292,
"s": 1113,
"text": "<select onchange=\"selectedSubjectName()\" id=\"subjectName\">\n <option>Javascript</option>\n <option>MySQL</option>\n <opti... |
Clear a StringBuilder in C# | To clear a StringBuilder, use the Clear() method.
Let’s say we have set the following StringBuilder −
string[] myStr = { "One", "Two", "Three", "Four" };
StringBuilder str = new StringBuilder("We will print now...").AppendLine();
Now, use the Clear() method to clear the StringBuilder −
str.Clear();
Let us see the compl... | [
{
"code": null,
"e": 1112,
"s": 1062,
"text": "To clear a StringBuilder, use the Clear() method."
},
{
"code": null,
"e": 1164,
"s": 1112,
"text": "Let’s say we have set the following StringBuilder −"
},
{
"code": null,
"e": 1292,
"s": 1164,
"text": "string[] ... |
Get Started: 3 Ways to Load CSV files into Colab | by A Apte | Towards Data Science | Data science is nothing without data. Yes, that’s obvious. What is not so obvious is the series of steps involved in getting the data into a format which allows you to explore the data. You may be in possession of a dataset in CSV format (short for comma-separated values) but no idea what to do next. This post will hel... | [
{
"code": null,
"e": 576,
"s": 172,
"text": "Data science is nothing without data. Yes, that’s obvious. What is not so obvious is the series of steps involved in getting the data into a format which allows you to explore the data. You may be in possession of a dataset in CSV format (short for comma-... |
PyQt - QSplitter Widget | This is another advanced layout manager which allows the size of child widgets to be changed dynamically by dragging the boundaries between them. The Splitter control provides a handle that can be dragged to resize the controls.
The widgets in a QSplitter object are laid horizontally by default although the orientation... | [
{
"code": null,
"e": 2289,
"s": 2060,
"text": "This is another advanced layout manager which allows the size of child widgets to be changed dynamically by dragging the boundaries between them. The Splitter control provides a handle that can be dragged to resize the controls."
},
{
"code": nu... |
Scala | Functions – Basics | 17 Jan, 2019
A function is a collection of statements that perform a certain task. One can divide up the code into separate functions, keeping in mind that each function must perform a specific task. Functions are used to put some common and repeated task into a single function, so instead of writing the same code agai... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n17 Jan, 2019"
},
{
"code": null,
"e": 573,
"s": 28,
"text": "A function is a collection of statements that perform a certain task. One can divide up the code into separate functions, keeping in mind that each function must perform a spe... |
GATE | GATE CS 2010 | Question 26 | 28 Jun, 2021
Consider a company that assembles computers. The probability of a faulty assembly of any computer is p. The company therefore subjects each computer to a testing process.This testing process gives the correct result for any computer with a probability of q. What is the probability of a computer being decla... | [
{
"code": null,
"e": 54,
"s": 26,
"text": "\n28 Jun, 2021"
},
{
"code": null,
"e": 451,
"s": 54,
"text": "Consider a company that assembles computers. The probability of a faulty assembly of any computer is p. The company therefore subjects each computer to a testing process.This... |
How to Truncate the Double Value to Given Decimal Places in Java? | 15 Dec, 2020
In simplest terms, truncation means to chop off the decimal portion of a number. A method of approximating a decimal number by dropping all decimal places past a certain point without rounding.
Given a double value and a decimal place truncate the value to the given decimal point.
Example:
Input: val = 3.... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n15 Dec, 2020"
},
{
"code": null,
"e": 222,
"s": 28,
"text": "In simplest terms, truncation means to chop off the decimal portion of a number. A method of approximating a decimal number by dropping all decimal places past a certain point... |
numpy.pmt() in Python | 29 Nov, 2018
numpy.pmt(rate, nper, pv, fv, when = ‘end’): This financial function helps user to compute payment value as per the principal and interest.
Parameters :rate : [scalar or (M, )array] Rate of interest as decimal (not per cent) per periodnper : [scalar or (M, )array] total compounding periodsfv : [scalar or (... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n29 Nov, 2018"
},
{
"code": null,
"e": 168,
"s": 28,
"text": "numpy.pmt(rate, nper, pv, fv, when = ‘end’): This financial function helps user to compute payment value as per the principal and interest."
},
{
"code": null,
"e"... |
Print all numbers in given range having digits in strictly increasing order | 23 May, 2021
Given two positive integers L and R, the task is to print the numbers in the range [L, R] which have their digits in strictly increasing order.
Examples:
Input: L = 10, R = 15 Output: 12 13 14 15 Explanation: In the range [10, 15], only the numbers {12, 13, 14, 15} have their digits in strictly increasing ... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n23 May, 2021"
},
{
"code": null,
"e": 196,
"s": 52,
"text": "Given two positive integers L and R, the task is to print the numbers in the range [L, R] which have their digits in strictly increasing order."
},
{
"code": null,
... |
What is column ordering in Bootstrap ? | 19 Aug, 2021
Column ordering classes in Bootstrap helps to change the order of our grid system based on different screen sizes eg: desktop, mobile, tablet, smartwatches. This makes the website more responsive for different screen sizes.
For example, let’s say we have 4 columns (V, X, Y, and Z). We want the appearance t... | [
{
"code": null,
"e": 54,
"s": 26,
"text": "\n19 Aug, 2021"
},
{
"code": null,
"e": 278,
"s": 54,
"text": "Column ordering classes in Bootstrap helps to change the order of our grid system based on different screen sizes eg: desktop, mobile, tablet, smartwatches. This makes the we... |
Python – Bitwise AND of List | 06 Oct, 2020
Sometimes, while programming, we have a problem in which we might need to perform certain bitwise operations among list elements. This is an essential utility as we come across bitwise operations many times. Let’s discuss certain ways in which this task can be performed.Method #1 : Using reduce() + lambda ... | [
{
"code": null,
"e": 54,
"s": 26,
"text": "\n06 Oct, 2020"
},
{
"code": null,
"e": 555,
"s": 54,
"text": "Sometimes, while programming, we have a problem in which we might need to perform certain bitwise operations among list elements. This is an essential utility as we come acro... |
Implementation of Composition (Has-A Relation) in Python | 19 Apr, 2021
We can access the member of one class inside a class using these 2 concepts:
By Composition(Has-A Relation)
By Inheritance(Is-A Relation)
Here we will study how to use implement Has-A Relation in Python.
Implementation of Composition in Python
By using the class names or by creating an object we can acces... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n19 Apr, 2021"
},
{
"code": null,
"e": 106,
"s": 28,
"text": "We can access the member of one class inside a class using these 2 concepts: "
},
{
"code": null,
"e": 137,
"s": 106,
"text": "By Composition(Has-A Relatio... |
Python 3 - os.unlink() Method | The method unlink() removes (deletes) the file path.If the path is a directory, OSError is raised. function is identical to remove(); the unlink name is its traditional Unix name.
Following is the syntax for unlink() method −
os.unlink(path)
path − This is the path, which is to be removed.
This method does not return ... | [
{
"code": null,
"e": 2654,
"s": 2474,
"text": "The method unlink() removes (deletes) the file path.If the path is a directory, OSError is raised. function is identical to remove(); the unlink name is its traditional Unix name."
},
{
"code": null,
"e": 2700,
"s": 2654,
"text": "Fo... |
Import multiple excel sheets into in R | 17 Jun, 2021
In this article, we are going to see how to import multiple Excel sheets into the R language.
Excel provides us with multiple worksheets. For example, in the below Excel workbook StudentData, we have two worksheets – sheet 1 is Student Details and sheet 2 is Subject Details.
For importing multiple Excel s... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n17 Jun, 2021"
},
{
"code": null,
"e": 147,
"s": 52,
"text": "In this article, we are going to see how to import multiple Excel sheets into the R language. "
},
{
"code": null,
"e": 329,
"s": 147,
"text": "Excel prov... |
Wildcard Selectors (*, ^ and $) in CSS for classes | 19 May, 2022
Wildcard selector is used to select multiple elements simultaneously. It selects similar type of class name or attribute and use CSS property. * wildcard also known as containing wildcard. [attribute*=”str”] Selector: The [attribute*=”str”] selector is used to select that elements whose attribute value con... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n19 May, 2022"
},
{
"code": null,
"e": 530,
"s": 28,
"text": "Wildcard selector is used to select multiple elements simultaneously. It selects similar type of class name or attribute and use CSS property. * wildcard also known as contain... |
How to download the public companies’ earnings calendar in Python | by Eryk Lewinson | Towards Data Science | At the moment of writing, we are currently close to the end of the Q1 2020 earnings season. For many investors and quantitative finance hobbyists, this is a specially interesting period, with multiple short-term investment opportunities. That is why in this article, I wanted to briefly introduce the concept of the earn... | [
{
"code": null,
"e": 579,
"s": 172,
"text": "At the moment of writing, we are currently close to the end of the Q1 2020 earnings season. For many investors and quantitative finance hobbyists, this is a specially interesting period, with multiple short-term investment opportunities. That is why in th... |
Spaghetti Code - GeeksforGeeks | 17 Jun, 2021
In this article, we will discuss Spaghetti Code, and We often hear this term, Spaghetti Code, and we should avoid it. But what exactly is Spaghetti Code? And Why should we Avoid it?
Overview :Spaghetti Code is nothing but a generalized common-usage term for unstructured and difficult-to-read code. Such a t... | [
{
"code": null,
"e": 24990,
"s": 24962,
"text": "\n17 Jun, 2021"
},
{
"code": null,
"e": 25172,
"s": 24990,
"text": "In this article, we will discuss Spaghetti Code, and We often hear this term, Spaghetti Code, and we should avoid it. But what exactly is Spaghetti Code? And Why s... |
Find all possible interpretations of an array of digits - GeeksforGeeks | 17 Feb, 2022
Consider a coding system for alphabets to integers where ‘a’ is represented as 1, ‘b’ as 2, .. ‘z’ as 26. Given an array of digits (1 to 9) as input, write a function that prints all valid interpretations of input array. Examples
Input: {1, 1}
Output: ("aa", 'k")
[2 interpretations: aa(1, 1), k(11)]
Inp... | [
{
"code": null,
"e": 24486,
"s": 24458,
"text": "\n17 Feb, 2022"
},
{
"code": null,
"e": 24717,
"s": 24486,
"text": "Consider a coding system for alphabets to integers where ‘a’ is represented as 1, ‘b’ as 2, .. ‘z’ as 26. Given an array of digits (1 to 9) as input, write a funct... |
GATE | GATE-CS-2014-(Set-1) | Question 65 - GeeksforGeeks | 30 Sep, 2021
Consider two processors P1 and P2 executing the same instruction set. Assume that under identical conditions, for the same input, a program running on P2 takes 25% less time but incurs 20% more CPI (clock cycles per instruction) as compared to the program running on P1. If the clock frequency of P1 is 1GHz... | [
{
"code": null,
"e": 24522,
"s": 24494,
"text": "\n30 Sep, 2021"
},
{
"code": null,
"e": 24936,
"s": 24522,
"text": "Consider two processors P1 and P2 executing the same instruction set. Assume that under identical conditions, for the same input, a program running on P2 takes 25%... |
Subarray Product Less Than K in C++ | Suppose we have given an array of positive integers nums. We have to count and print the number of (contiguous) subarrays where the product of each the elements in the subarray is less than k. So if the input is like [10,5,2,6] and k := 100, then the output will be 8. So the subarrays will be [[10], [5], [2], [6], [10,... | [
{
"code": null,
"e": 1417,
"s": 1062,
"text": "Suppose we have given an array of positive integers nums. We have to count and print the number of (contiguous) subarrays where the product of each the elements in the subarray is less than k. So if the input is like [10,5,2,6] and k := 100, then the ou... |
How An Online Judge Works And How To Avoid Time Limit Exceeded Problem? - GeeksforGeeks | 10 Jun, 2020
In this article, you will get consent on how an online judge works and this article discusses very frustrating error Time Limit Exceed error that coders get at some point in time while solving the questions at online platforms. The article primarily discusses three things:
How does an online judge work?
Wh... | [
{
"code": null,
"e": 24633,
"s": 24605,
"text": "\n10 Jun, 2020"
},
{
"code": null,
"e": 24907,
"s": 24633,
"text": "In this article, you will get consent on how an online judge works and this article discusses very frustrating error Time Limit Exceed error that coders get at som... |
Python program for the permutation of a given string inbuilt function in python | String is given. Our task is to display permutation of given string. Here solve this problem in python using inbuilt function permutations (iterable).
Input : string = 'XYZ'
Output : XYZ
XZY
YXZ
YZX
ZXY
ZYX
Step 1: given string.
Step 2: Get all permutations of string.
Step 3: print all permutations.
from itertools impo... | [
{
"code": null,
"e": 1213,
"s": 1062,
"text": "String is given. Our task is to display permutation of given string. Here solve this problem in python using inbuilt function permutations (iterable)."
},
{
"code": null,
"e": 1269,
"s": 1213,
"text": "Input : string = 'XYZ'\nOutput ... |
Ratio and Proportion - GeeksforGeeks | 21 Apr, 2016
Then (3x+5) / (4x+5) = 7 / 9
∴ 9(3x + 5) = 7(4x + 5)
∴ 27x + 45 = 28x + 35
∴ x = 10
∴ Ashok’s present age = 4x = 40 years
Let the present age of Ram and Shyam be 6x years and 5x years respectively.
Then 5x + 7 = 32
∴ 5x = 25
∴ x = 5
∴ Present age of Ram = 6x = 30 years
Then (4x-9) + (5x-9)... | [
{
"code": null,
"e": 27530,
"s": 27502,
"text": "\n21 Apr, 2016"
},
{
"code": null,
"e": 27656,
"s": 27530,
"text": "Then (3x+5) / (4x+5) = 7 / 9 \n\n∴ 9(3x + 5) = 7(4x + 5)\n∴ 27x + 45 = 28x + 35\n∴ x = 10\n∴ Ashok’s present age = 4x = 40 years "
},
{
"code": null,
... |
C++ Data Types - GeeksforGeeks | 28 Jan, 2022
All variables use data-type during declaration to restrict the type of data to be stored. Therefore, we can say that data types are used to tell the variables the type of data it can store. Whenever a variable is defined in C++, the compiler allocates some memory for that variable based on the data-type wi... | [
{
"code": null,
"e": 26648,
"s": 26620,
"text": "\n28 Jan, 2022"
},
{
"code": null,
"e": 27036,
"s": 26648,
"text": "All variables use data-type during declaration to restrict the type of data to be stored. Therefore, we can say that data types are used to tell the variables the ... |
Presenting Python code using RISE | by Tanu N Prabhu | Towards Data Science | Your boss/professor tells you to find the largest number in a Python list and present the result in front of the whole employees/classmates. Now there are some rules that you need to follow to impress your boss/professor. They should be able to see both the documentation and code in this presentation. You should execut... | [
{
"code": null,
"e": 635,
"s": 172,
"text": "Your boss/professor tells you to find the largest number in a Python list and present the result in front of the whole employees/classmates. Now there are some rules that you need to follow to impress your boss/professor. They should be able to see both t... |
Maximize array elements upto given number - GeeksforGeeks | 04 May, 2021
Given an array of integers, a number and a maximum value, task is to compute the maximum value that can be obtained from the array elements. Every value on the array traversing from the beginning can be either added to or subtracted from the result obtained from previous index such that at any point the re... | [
{
"code": null,
"e": 25254,
"s": 25226,
"text": "\n04 May, 2021"
},
{
"code": null,
"e": 25727,
"s": 25254,
"text": "Given an array of integers, a number and a maximum value, task is to compute the maximum value that can be obtained from the array elements. Every value on the arr... |
C# Strings | Strings are used for storing text.
A string variable contains a collection of characters surrounded by double quotes:
Create a variable of type string and assign it a value:
string greeting = "Hello";
Run example »
A string in C# is actually an object, which contain properties and methods that can perform certain op... | [
{
"code": null,
"e": 35,
"s": 0,
"text": "Strings are used for storing text."
},
{
"code": null,
"e": 118,
"s": 35,
"text": "A string variable contains a collection of characters surrounded by double quotes:"
},
{
"code": null,
"e": 174,
"s": 118,
"text": "Cre... |
COVID-19 Outbreak Prediction using Machine Learning Algorithm | by Wie Kiang H. | Towards Data Science | Note from the editors: Towards Data Science is a Medium publication primarily based on the study of data science and machine learning. We are not health professionals or epidemiologists, and the opinions of this article should not be interpreted as professional health advice. However, this article will be focus on how ... | [
{
"code": null,
"e": 560,
"s": 172,
"text": "Note from the editors: Towards Data Science is a Medium publication primarily based on the study of data science and machine learning. We are not health professionals or epidemiologists, and the opinions of this article should not be interpreted as profes... |
Display a percentage in Java | To display a percentage in Java, use the following DecimalFormat.
DecimalFormat decFormat = new DecimalFormat("#%");
Since, we have used the DecimalFormat class, therefore do not forget to import the following package −
import java.text.DecimalFormat;
Now, let us learn how to display percentage −
decFormat.format(0.80)... | [
{
"code": null,
"e": 1128,
"s": 1062,
"text": "To display a percentage in Java, use the following DecimalFormat."
},
{
"code": null,
"e": 1179,
"s": 1128,
"text": "DecimalFormat decFormat = new DecimalFormat(\"#%\");"
},
{
"code": null,
"e": 1282,
"s": 1179,
"... |
How to create a Ripple Effect on Click the Button ? - GeeksforGeeks | 24 Apr, 2020
Ripple effect is a part of the modern design trend. You have seen it on many websites specially on Google’s material design language. It gives a button pressing effect. We can make a ripple effect by adding and animating a child element to the button. We can also position it according to the position of th... | [
{
"code": null,
"e": 24879,
"s": 24851,
"text": "\n24 Apr, 2020"
},
{
"code": null,
"e": 25227,
"s": 24879,
"text": "Ripple effect is a part of the modern design trend. You have seen it on many websites specially on Google’s material design language. It gives a button pressing ef... |
How to create an array of integers in JavaScript? | To create an array of integers in JavaScript, try the following −
var rank = [1, 2, 3, 4];
You can also use the new keyword to create array of integers in JavaScript −
var rank = new Array(1, 2, 3, 4);
The Array parameter is a list of strings or integers. When you specify a single numeric parameter with the Array const... | [
{
"code": null,
"e": 1128,
"s": 1062,
"text": "To create an array of integers in JavaScript, try the following −"
},
{
"code": null,
"e": 1153,
"s": 1128,
"text": "var rank = [1, 2, 3, 4];"
},
{
"code": null,
"e": 1230,
"s": 1153,
"text": "You can also use the... |
How to Override toString Method for ArrayList in Java? - GeeksforGeeks | 04 Dec, 2020
Every class in java is a child of Object class either directly or indirectly. toString() is present in Object class. The toString method returns a string representation of an object. The toString() can be overridden as part of a class to cater to the customized needs of the user. Whenever we try to print t... | [
{
"code": null,
"e": 25373,
"s": 25345,
"text": "\n04 Dec, 2020"
},
{
"code": null,
"e": 25925,
"s": 25373,
"text": "Every class in java is a child of Object class either directly or indirectly. toString() is present in Object class. The toString method returns a string represent... |
KNN visualization in just 13 lines of code | by Deepthi A R | Towards Data Science | Yes! It’s that simple. Let’s play around with datasets to visualize how the decision boundary changes as ‘k’ changes.
Let’s have a quick review...
K Nearest Neighbor(KNN) algorithm is a very simple, easy to understand, versatile and one of the topmost machine learning algorithms. In k-NN classification, the output is a... | [
{
"code": null,
"e": 290,
"s": 172,
"text": "Yes! It’s that simple. Let’s play around with datasets to visualize how the decision boundary changes as ‘k’ changes."
},
{
"code": null,
"e": 319,
"s": 290,
"text": "Let’s have a quick review..."
},
{
"code": null,
"e": 79... |
Use of explicit keyword in C++ - GeeksforGeeks | 02 May, 2022
Explicit Keyword in C++ is used to mark constructors to not implicitly convert types in C++. It is optional for constructors that take exactly one argument and work on constructors(with a single argument) since those are the only constructors that can be used in typecasting.
Let’s understand explicit keywo... | [
{
"code": null,
"e": 24620,
"s": 24592,
"text": "\n02 May, 2022"
},
{
"code": null,
"e": 24896,
"s": 24620,
"text": "Explicit Keyword in C++ is used to mark constructors to not implicitly convert types in C++. It is optional for constructors that take exactly one argument and wor... |
Java 8 - Functional Interfaces | Functional interfaces have a single functionality to exhibit. For example, a Comparable interface with a single method ‘compareTo’ is used for comparison purpose. Java 8 has defined a lot of functional interfaces to be used extensively in lambda expressions. Following is the list of functional interfaces defined in jav... | [
{
"code": null,
"e": 2219,
"s": 1874,
"text": "Functional interfaces have a single functionality to exhibit. For example, a Comparable interface with a single method ‘compareTo’ is used for comparison purpose. Java 8 has defined a lot of functional interfaces to be used extensively in lambda express... |
Animation using clip-path property in CSS - GeeksforGeeks | 24 Aug, 2020
The clip-path CSS property is used to clip the region in such a way that element in the clipped regions are shown.
In this article, we will see how we can use the clip-path and @keyframes together to create an image animation.
Step 1: Create a div with a class container that should include <img> tag.
<!DOC... | [
{
"code": null,
"e": 26621,
"s": 26593,
"text": "\n24 Aug, 2020"
},
{
"code": null,
"e": 26736,
"s": 26621,
"text": "The clip-path CSS property is used to clip the region in such a way that element in the clipped regions are shown."
},
{
"code": null,
"e": 26848,
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.