title stringlengths 3 221 | text stringlengths 17 477k | parsed listlengths 0 3.17k |
|---|---|---|
C library function - fprintf() | The C library function int fprintf(FILE *stream, const char *format, ...) sends formatted output to a stream.
Following is the declaration for fprintf() function.
int fprintf(FILE *stream, const char *format, ...)
stream − This is the pointer to a FILE object that identifies the stream.
stream − This is the pointer to ... | [
{
"code": null,
"e": 2117,
"s": 2007,
"text": "The C library function int fprintf(FILE *stream, const char *format, ...) sends formatted output to a stream."
},
{
"code": null,
"e": 2170,
"s": 2117,
"text": "Following is the declaration for fprintf() function."
},
{
"code... |
Natural Language Processing Using Stanford’s CoreNLP | by Lukas Frei | Towards Data Science | Analyzing text data using Stanford’s CoreNLP makes text data analysis easy and efficient. With just a few lines of code, CoreNLP allows for the extraction of all kinds of text properties, such as named-entity recognition or part-of-speech tagging. CoreNLP is written in Java and requires Java to be installed on your dev... | [
{
"code": null,
"e": 742,
"s": 171,
"text": "Analyzing text data using Stanford’s CoreNLP makes text data analysis easy and efficient. With just a few lines of code, CoreNLP allows for the extraction of all kinds of text properties, such as named-entity recognition or part-of-speech tagging. CoreNLP... |
HTML Styles | Style sheets describe how documents are presented on screens, in print, or perhaps how they are pronounced. W3C has actively promoted the use of style sheets on the Web since the Consortium was founded in 1994.
Cascading Style Sheets (CSS) is a style sheet mechanism that has been specifically developed to meet the need... | [
{
"code": null,
"e": 2585,
"s": 2374,
"text": "Style sheets describe how documents are presented on screens, in print, or perhaps how they are pronounced. W3C has actively promoted the use of style sheets on the Web since the Consortium was founded in 1994."
},
{
"code": null,
"e": 2724,... |
How to find the inverse of a matrix in R? | The inverse of a matrix can be calculated in R with the help of solve function, most of the times people who don’t use R frequently mistakenly use inv function for this purpose but there is no function called inv in base R to find the inverse of a matrix.
Consider the below matrices and their inverses −
> M1<-1:4
> M1<... | [
{
"code": null,
"e": 1318,
"s": 1062,
"text": "The inverse of a matrix can be calculated in R with the help of solve function, most of the times people who don’t use R frequently mistakenly use inv function for this purpose but there is no function called inv in base R to find the inverse of a matri... |
Octree | Insertion and Searching - GeeksforGeeks | 25 Mar, 2022
Octree is a tree data structure in which each internal node can have at most 8 children. Like Binary tree which divides the space two segments, Octree divides the space into at most eight-part which is called as octanes. It is used to store the 3-D point which takes a large amount of space. if all the inte... | [
{
"code": null,
"e": 24711,
"s": 24683,
"text": "\n25 Mar, 2022"
},
{
"code": null,
"e": 25167,
"s": 24711,
"text": "Octree is a tree data structure in which each internal node can have at most 8 children. Like Binary tree which divides the space two segments, Octree divides the ... |
Why “1.5” in IQR Method of Outlier Detection? | by Shivam Chaudhary | Towards Data Science | If you can’t explain it to a six year old, you don’t understand it yourself.
The world still awaits the next Einstein, or perhaps it won’t ever get another person of the century. But I like to believe: in the universe and in a variation of the above quote...
The best way to learn is to teach.
The idea for this post cam... | [
{
"code": null,
"e": 249,
"s": 172,
"text": "If you can’t explain it to a six year old, you don’t understand it yourself."
},
{
"code": null,
"e": 431,
"s": 249,
"text": "The world still awaits the next Einstein, or perhaps it won’t ever get another person of the century. But I l... |
Python Classes for Statistics with Pandas | by Sadrach Pierre, Ph.D. | Towards Data Science | In computer programming, a class is a blueprint for a user-defined data type. Classes are defined in terms of attributes (data) and methods (functions). These data structures are a great way to organize data and methods such that they are easy to reuse and extend in the future. In this post, we will define a python cla... | [
{
"code": null,
"e": 581,
"s": 171,
"text": "In computer programming, a class is a blueprint for a user-defined data type. Classes are defined in terms of attributes (data) and methods (functions). These data structures are a great way to organize data and methods such that they are easy to reuse an... |
How to remove hidden files and folders using Python? | On Unix OS(OSX, Linux, etc) hidden files start with a '.' so we can filter them out using a simple startswith check. On windows, we need to check file attributes and then determine whether the file/folder is hidden or not.
For example, you can use the following code to delete all hidden files:
import os
if os.name == '... | [
{
"code": null,
"e": 1285,
"s": 1062,
"text": "On Unix OS(OSX, Linux, etc) hidden files start with a '.' so we can filter them out using a simple startswith check. On windows, we need to check file attributes and then determine whether the file/folder is hidden or not."
},
{
"code": null,
... |
Understand the Data With Univariate And Multivariate Charts and Plots in Python | by Rashida Nasrin Sucky | Towards Data Science | Univariate data analysis is the simplest form of data analysis. As the name suggests, it deals with one variable. It doesn’t find cause and effect or relationship between variables. The purpose of univariate data analysis is to summarize and describe one data or one variable. If two variables are included, it becomes b... | [
{
"code": null,
"e": 749,
"s": 172,
"text": "Univariate data analysis is the simplest form of data analysis. As the name suggests, it deals with one variable. It doesn’t find cause and effect or relationship between variables. The purpose of univariate data analysis is to summarize and describe one ... |
How to use getline() in C++ when there are blank lines in input? | 03 Jun, 2022
In C++, if we need to read a few sentences from a stream, the generally preferred way is to use the getline() function as it can read string streams till it encounters a newline or sees a delimiter provided by the user. Also, it uses <string.h> header file to be fully functional.
Here is a sample program i... | [
{
"code": null,
"e": 54,
"s": 26,
"text": "\n03 Jun, 2022"
},
{
"code": null,
"e": 335,
"s": 54,
"text": "In C++, if we need to read a few sentences from a stream, the generally preferred way is to use the getline() function as it can read string streams till it encounters a newl... |
Maximal Independent Set in an Undirected Graph | 13 Jul, 2020
Given an undirected graph defined by the number of vertex V and the edges E[ ], the task is to find Maximal Independent Vertex Set in an undirected graph.
Independent Set: An independent set in a graph is a set of vertices which are not directly connected to each other.
Note: It is a given that there is at... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n13 Jul, 2020"
},
{
"code": null,
"e": 183,
"s": 28,
"text": "Given an undirected graph defined by the number of vertex V and the edges E[ ], the task is to find Maximal Independent Vertex Set in an undirected graph."
},
{
"code"... |
How to overlay one div over another div using CSS | 13 Jun, 2022
Creating an overlay effect simply means putting two div together at the same place but both the div appear when needed i.e while hovering or while clicking on one of the div to make the second one appear. Overlays are very clean and give the webpage a tidy look. It looks sophisticated and is simple to desi... | [
{
"code": null,
"e": 54,
"s": 26,
"text": "\n13 Jun, 2022"
},
{
"code": null,
"e": 418,
"s": 54,
"text": "Creating an overlay effect simply means putting two div together at the same place but both the div appear when needed i.e while hovering or while clicking on one of the div ... |
Moore and Mealy machines to count number of substring ‘ab’ | 20 Nov, 2019
Prerequisite: Mealy and Moore Machines, Difference between Mealy machine and Moore machineProblem: Construction of the machines that take set of all string over {a, b} as input and count number of substring ‘ab’Assume,
Ε = {a, b} and
Δ = {0, 1}
where Ε and Δ are the input and output alphabet respectively... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n20 Nov, 2019"
},
{
"code": null,
"e": 247,
"s": 28,
"text": "Prerequisite: Mealy and Moore Machines, Difference between Mealy machine and Moore machineProblem: Construction of the machines that take set of all string over {a, b} as inpu... |
Implementing Checksum Using Java | 31 May, 2022
The checksum is an error-detecting technique that can be applied to message of any length. It is used mostly at the network and transport layers of the TCP/IP protocol suite. Here, we have considered decimal data that is being sent by the sender to the receiver using socket programming. The number of segme... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n31 May, 2022"
},
{
"code": null,
"e": 768,
"s": 28,
"text": "The checksum is an error-detecting technique that can be applied to message of any length. It is used mostly at the network and transport layers of the TCP/IP protocol suite. ... |
JavaScript | Function expression | 08 Oct, 2021
Function Expression allows us to create an anonymous function which doesn’t have any function name which is the main difference between Function Expression and Function Declaration. A function expression can be used as an IIFE (Immediately Invoked Function Expression)which runs as soon as it is defined. A... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n08 Oct, 2021"
},
{
"code": null,
"e": 533,
"s": 28,
"text": "Function Expression allows us to create an anonymous function which doesn’t have any function name which is the main difference between Function Expression and Function Decla... |
Resolving CUDA Being Out of Memory With Gradient Accumulation and AMP | by Rishik C. Mourya | Towards Data Science | Do you remember that delightful time, when you were so happily preprocessing your data, building your model with so many efforts, and then right at the moment when you expect to enjoy that soda while your model trains, an error pops up, telling you to get your butt down here again because you don’t have enough CUDA mem... | [
{
"code": null,
"e": 681,
"s": 172,
"text": "Do you remember that delightful time, when you were so happily preprocessing your data, building your model with so many efforts, and then right at the moment when you expect to enjoy that soda while your model trains, an error pops up, telling you to get... |
How to display image using Plotly? - GeeksforGeeks | 01 Oct, 2020
A Plotly is a Python library that is used to design graphs, especially interactive graphs. It can plot various graphs and charts like histogram, barplot, boxplot, spreadplot, and many more. It is mainly used in data analysis as well as financial analysis. plotly is an interactive visualization library.
The... | [
{
"code": null,
"e": 24292,
"s": 24264,
"text": "\n01 Oct, 2020"
},
{
"code": null,
"e": 24596,
"s": 24292,
"text": "A Plotly is a Python library that is used to design graphs, especially interactive graphs. It can plot various graphs and charts like histogram, barplot, boxplot, ... |
Maximum Product Subarray | Practice | GeeksforGeeks | Given an array Arr[] that contains N integers (may be positive, negative or zero). Find the product of the maximum product subarray.
Example 1:
Input:
N = 5
Arr[] = {6, -3, -10, 0, 2}
Output: 180
Explanation: Subarray with maximum product
is [6, -3, -10] which gives product as 180.
Example 2:
Input:
N = 6
Arr[] = {2, ... | [
{
"code": null,
"e": 371,
"s": 238,
"text": "Given an array Arr[] that contains N integers (may be positive, negative or zero). Find the product of the maximum product subarray."
},
{
"code": null,
"e": 382,
"s": 371,
"text": "Example 1:"
},
{
"code": null,
"e": 522,
... |
How to Take Input From User in Java? | 08 Jun, 2022
Java brings various Streams with its I/O package that helps the user to perform all the input-output operations. These streams support all the types of objects, data types, characters, files, etc to fully execute the I/O operations. There are two ways by which we can take input from the user or from a file... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n08 Jun, 2022"
},
{
"code": null,
"e": 360,
"s": 52,
"text": "Java brings various Streams with its I/O package that helps the user to perform all the input-output operations. These streams support all the types of objects, data types, c... |
Program to print solid and hollow rhombus patterns | 06 Jun, 2022
For any given number n, print Hollow and solid Squares and Rhombus made with stars(*). Examples:
Input : n = 4
Output :
Solid Rhombus:
****
****
****
****
Hollow Rhombus:
****
* *
* *
****
1. Solid Rhombus : Making Solid Rhombus is a bit similar to making solid square rather than the co... | [
{
"code": null,
"e": 53,
"s": 25,
"text": "\n06 Jun, 2022"
},
{
"code": null,
"e": 152,
"s": 53,
"text": "For any given number n, print Hollow and solid Squares and Rhombus made with stars(*). Examples: "
},
{
"code": null,
"e": 260,
"s": 152,
"text": "Input ... |
Minimum and maximum number of digits required to be removed to make a given number divisible by 3 | 22 Nov, 2021
Given a numeric string S, the task is to find the minimum and the maximum number of digits that must be removed from S such that it is divisible by 3. If it is impossible to do so, then print “-1”.
Examples:
Input: S = “12345”Output:Minimum: 0Maximum: 4Explanation: The given number 12345 is divisible by 3.... | [
{
"code": null,
"e": 54,
"s": 26,
"text": "\n22 Nov, 2021"
},
{
"code": null,
"e": 252,
"s": 54,
"text": "Given a numeric string S, the task is to find the minimum and the maximum number of digits that must be removed from S such that it is divisible by 3. If it is impossible to ... |
Loss when two items are sold at same price and same percentage profit/loss | 09 Jun, 2022
Given the Selling price i.e ‘SP’ of the two items each. One item is sold at ‘P%’ Profit and other at ‘P%’ Loss. The task is to find out the overall Loss.Examples:
Input: SP = 2400, P = 30%
Output: Loss = 474.725
Input: SP = 5000, P = 10%
Output: Loss = 101.01
Approach:
How does the above formula wo... | [
{
"code": null,
"e": 53,
"s": 25,
"text": "\n09 Jun, 2022"
},
{
"code": null,
"e": 218,
"s": 53,
"text": "Given the Selling price i.e ‘SP’ of the two items each. One item is sold at ‘P%’ Profit and other at ‘P%’ Loss. The task is to find out the overall Loss.Examples: "
},
{... |
Program for Muller Method | 26 Apr, 2021
Given a function f(x) on floating number x and three initial distinct guesses for root of the function, find the root of function. Here, f(x) can be an algebraic or transcendental function.Examples:
Input : A function f(x) = x + 2x + 10x - 20
and three initial guesses - 0, 1 and 2 .
Output : T... | [
{
"code": null,
"e": 54,
"s": 26,
"text": "\n26 Apr, 2021"
},
{
"code": null,
"e": 255,
"s": 54,
"text": "Given a function f(x) on floating number x and three initial distinct guesses for root of the function, find the root of function. Here, f(x) can be an algebraic or transcend... |
Vector indexOf() Method in Java | 31 Oct, 2021
The java.util.vector.indexOf(Object element) method is used to check and find the occurrence of a particular element in the vector. If the element is present then the index of the first occurrence of the element is returned otherwise -1 is returned if the vector does not contain the element.
Syntax:
Vecto... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n31 Oct, 2021"
},
{
"code": null,
"e": 321,
"s": 28,
"text": "The java.util.vector.indexOf(Object element) method is used to check and find the occurrence of a particular element in the vector. If the element is present then the index of... |
Kotlin when expression | 03 Jan, 2022
In Kotlin, when replaces the switch operator of other languages like Java. A certain block of code needs to be executed when some condition is fulfilled. The argument of when expression compares with all the branches one by one until some match is found. After the first match is found, it reaches to end of... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n03 Jan, 2022"
},
{
"code": null,
"e": 564,
"s": 28,
"text": "In Kotlin, when replaces the switch operator of other languages like Java. A certain block of code needs to be executed when some condition is fulfilled. The argument of when ... |
How to Export SQL Server Data to a Text File Format? | 16 Nov, 2021
In this article, we will see how to export SQL Server data to a Flat file using three different techniques. Before we proceed let’s setup our database.
Step 1: Create a database
Query:
CREATE DATABASE geeks;
Step 2: Select the newly created database
USE geeks;
Step 3: Table Definition
We have the following... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n16 Nov, 2021"
},
{
"code": null,
"e": 180,
"s": 28,
"text": "In this article, we will see how to export SQL Server data to a Flat file using three different techniques. Before we proceed let’s setup our database."
},
{
"code": n... |
Primary and secondary prompt in Python | 10 May, 2020
The ">>>" sign seen on the Python’s interactive shell is called a prompt. Python’s interactive shell, which appears after firing command “python3” (if we are working on python version 3) on the terminal, has two such prompts.
">>>" - Primary prompt
"..." - Secondary prompt
When we fire command ‘python3’ on... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n10 May, 2020"
},
{
"code": null,
"e": 254,
"s": 28,
"text": "The \">>>\" sign seen on the Python’s interactive shell is called a prompt. Python’s interactive shell, which appears after firing command “python3” (if we are working on pyth... |
CSS | Pulse animation | 12 Jun, 2020
CSS Pulse Animation Effect provides a pulsating effect to an element that changes its shape and opacity. As per the time and need, different @keyframes are used to achieve this animation. The simple yet powerful effect makes the website more vibrant, colorful, and attractive. This animation is completely i... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n12 Jun, 2020"
},
{
"code": null,
"e": 372,
"s": 28,
"text": "CSS Pulse Animation Effect provides a pulsating effect to an element that changes its shape and opacity. As per the time and need, different @keyframes are used to achieve thi... |
SQL - CREATE Database | The SQL CREATE DATABASE statement is used to create a new SQL database.
The basic syntax of this CREATE DATABASE statement is as follows −
CREATE DATABASE DatabaseName;
Always the database name should be unique within the RDBMS.
If you want to create a new database <testDB>, then the CREATE DATABASE statement would be... | [
{
"code": null,
"e": 2525,
"s": 2453,
"text": "The SQL CREATE DATABASE statement is used to create a new SQL database."
},
{
"code": null,
"e": 2592,
"s": 2525,
"text": "The basic syntax of this CREATE DATABASE statement is as follows −"
},
{
"code": null,
"e": 2623,
... |
JavaScript | Remove the last item from an array - GeeksforGeeks | 18 May, 2019
The task is to remove the last item from the array. Here are a few of the most preferred methods discussed.First few functions to understand.
JavaScript Array splice() methodThis method adds/deletes items to/from the array, and returns the deleted item(s).Syntax:array.splice(index, number, item1, ....., it... | [
{
"code": null,
"e": 25434,
"s": 25406,
"text": "\n18 May, 2019"
},
{
"code": null,
"e": 25576,
"s": 25434,
"text": "The task is to remove the last item from the array. Here are a few of the most preferred methods discussed.First few functions to understand."
},
{
"code":... |
Calculation of TCP Checksum - GeeksforGeeks | 19 Nov, 2021
In this article, we will learn a good concept of how the TCP/UDP checksum is calculated.
When we receive data from the application it is broken into smaller data parts as the whole data from the application cannot be sent through the network to the receiver host.
The protocol we use in OSI in the Transpo... | [
{
"code": null,
"e": 24535,
"s": 24507,
"text": "\n19 Nov, 2021"
},
{
"code": null,
"e": 24625,
"s": 24535,
"text": "In this article, we will learn a good concept of how the TCP/UDP checksum is calculated. "
},
{
"code": null,
"e": 24801,
"s": 24625,
"text": "... |
ByteArrayInputStream available() method in Java with Examples - GeeksforGeeks | 13 Sep, 2021
The available() method is a built-in method of the Java.io.ByteArrayInputStream returns the number of remaining bytes that can be read (or skipped over) from this input stream. It tells the total no. of bytes from the Input Stream to be read.
Syntax:
public int available()
Parameters: The function does n... | [
{
"code": null,
"e": 24560,
"s": 24532,
"text": "\n13 Sep, 2021"
},
{
"code": null,
"e": 24804,
"s": 24560,
"text": "The available() method is a built-in method of the Java.io.ByteArrayInputStream returns the number of remaining bytes that can be read (or skipped over) from this ... |
Tryit Editor v3.7 | HTML Computer Code
Tryit: HTML code element | [
{
"code": null,
"e": 29,
"s": 10,
"text": "HTML Computer Code"
}
] |
What is a sealed class in C#? | Sealed class in C# with the sealed keyword cannot be inherited. In the same way, the sealed keyword can be added to the method.
When you use sealed modifiers in C# on a method, then the method loses its capabilities of overriding. The sealed method should be part of a derived class and the method must be an overridden ... | [
{
"code": null,
"e": 1190,
"s": 1062,
"text": "Sealed class in C# with the sealed keyword cannot be inherited. In the same way, the sealed keyword can be added to the method."
},
{
"code": null,
"e": 1390,
"s": 1190,
"text": "When you use sealed modifiers in C# on a method, then ... |
Apache Pig - PluckTuple() | After performing operations like join to differentiate the columns of the two schemas, we use the function PluckTuple(). To use this function, first of all, we have to define a string Prefix and we have to filter for the columns in a relation that begin with that prefix.
Given below is the syntax of the PluckTuple() fu... | [
{
"code": null,
"e": 2956,
"s": 2684,
"text": "After performing operations like join to differentiate the columns of the two schemas, we use the function PluckTuple(). To use this function, first of all, we have to define a string Prefix and we have to filter for the columns in a relation that begin... |
Set characters at a specific position within the string in Arduino | In case you don’t want to overwrite a string, but just change a character at a specific position, Arduino provides the setCharAt() function exactly for that.
String1.setCharAt(ind, new_char);
String 1 is the string to modify. ind is the index where the character needs to be set. new_char is the value of the new charact... | [
{
"code": null,
"e": 1220,
"s": 1062,
"text": "In case you don’t want to overwrite a string, but just change a character at a specific position, Arduino provides the setCharAt() function exactly for that."
},
{
"code": null,
"e": 1254,
"s": 1220,
"text": "String1.setCharAt(ind, n... |
Pygame – Surface | 29 Dec, 2021
When using Pygame, surfaces are generally used to represent the appearance of the object and its position on the screen. All the objects, text, images that we create in Pygame are created using surfaces.
Creating surfaces in pygame is quite easy. We just have to pass the height and the width with a tuple t... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n29 Dec, 2021"
},
{
"code": null,
"e": 232,
"s": 28,
"text": "When using Pygame, surfaces are generally used to represent the appearance of the object and its position on the screen. All the objects, text, images that we create in Pygame... |
CSS | Text Formatting | 02 Jun, 2022
CSS text formatting properties is used to format text and style text.CSS text formatting include following properties:1.Text-color2.Text-alignment3.Text-decoration4.Text-transformation5.Text-indentation6.Letter spacing7.Line height8.Text-direction9.Text-shadow10.Word spacing
1.TEXT COLORText-color property... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n02 Jun, 2022"
},
{
"code": null,
"e": 328,
"s": 52,
"text": "CSS text formatting properties is used to format text and style text.CSS text formatting include following properties:1.Text-color2.Text-alignment3.Text-decoration4.Text-tran... |
How to set character encoding for document in HTML5 ? | 01 Apr, 2021
Character encoding is a method of defining a mapping between bytes and text. To display an HTML document correctly, we must choose a proper character encoding.
The different types of character encoding include:
ASCII Character Set: It is the first ever character encoding standard. The major disadvantage ... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n01 Apr, 2021"
},
{
"code": null,
"e": 190,
"s": 28,
"text": "Character encoding is a method of defining a mapping between bytes and text. To display an HTML document correctly, we must choose a proper character encoding. "
},
{
... |
How to merge the first index of an array with the first index of second array? | 08 Jun, 2020
The task is to merge the first index of an array with the first index of another array. Suppose, an array is array1 = {a, b, c} and another array is array2 = {c, d, e} if we perform the task on these arrays then the output will be
result array
{
[0]=> array(2)
{
[0]=> string(1) ... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n08 Jun, 2020"
},
{
"code": null,
"e": 260,
"s": 28,
"text": "The task is to merge the first index of an array with the first index of another array. Suppose, an array is array1 = {a, b, c} and another array is array2 = {c, d, e} if we p... |
CSS Child vs Descendant selectors | 10 Jun, 2022
Child Selector: Child Selector is used to match all the elements which are children of a specified element. It gives the relation between two elements. The element > element selector selects those elements which are the children of the specific parent. The operand on the left side of > is the parent and th... | [
{
"code": null,
"e": 53,
"s": 25,
"text": "\n10 Jun, 2022"
},
{
"code": null,
"e": 409,
"s": 53,
"text": "Child Selector: Child Selector is used to match all the elements which are children of a specified element. It gives the relation between two elements. The element > element ... |
Node.js Chalk Module | 07 Oct, 2021
Chalk module in Node.js is the third-party module that is used for styling the format of text and allows us to create our own themes in the node.js project.
Advantages of Chalk Module:
It helps to customize the color of the output of the command-line outputIt helps to improve the quality of the output by p... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n07 Oct, 2021"
},
{
"code": null,
"e": 185,
"s": 28,
"text": "Chalk module in Node.js is the third-party module that is used for styling the format of text and allows us to create our own themes in the node.js project."
},
{
"cod... |
How to convert string to char array in C++? | This is a C++ program to convert string to char array in C++. This can be done in multiple different ways
Begin
Assign a string value to a char array variable m.
Define and string variable str
For i = 0 to sizeof(m)
Copy character by character from m to str.
Print character by character from str.
E... | [
{
"code": null,
"e": 1293,
"s": 1187,
"text": "This is a C++ program to convert string to char array in C++. This can be done in multiple different ways"
},
{
"code": null,
"e": 1510,
"s": 1293,
"text": "Begin\n Assign a string value to a char array variable m.\n Define and s... |
Interactive visualization of data using Bokeh | 28 Mar, 2022
Bokeh is a Python library for creating interactive data visualizations in a web browser. It offers human-readable and fast presentation of data in an visually pleasing manner. If you’ve worked with visualization in Python before, it’s likely that you have used matplotlib. But Bokeh differs from matplotlib.... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n28 Mar, 2022"
},
{
"code": null,
"e": 336,
"s": 28,
"text": "Bokeh is a Python library for creating interactive data visualizations in a web browser. It offers human-readable and fast presentation of data in an visually pleasing manner.... |
JavaBean class in Java | 14 Sep, 2017
JavaBeans are classes that encapsulate many objects into a single object (the bean). It is a java class that should follow following conventions:
Must implement Serializable.It should have a public no-arg constructor.All properties in java bean must be private with public getters and setter methods.
Must i... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n14 Sep, 2017"
},
{
"code": null,
"e": 198,
"s": 52,
"text": "JavaBeans are classes that encapsulate many objects into a single object (the bean). It is a java class that should follow following conventions:"
},
{
"code": null,
... |
Python Support for gzip files (gzip) | GZip application is used for compression and decompression of files. It is a part of GNU project. Python’s gzip module is the interface to GZip application. The gzip data compression algorithm itself is based on zlib module.
The gzip module contains definition of GzipFile class along with its methods. It also caontains... | [
{
"code": null,
"e": 1412,
"s": 1187,
"text": "GZip application is used for compression and decompression of files. It is a part of GNU project. Python’s gzip module is the interface to GZip application. The gzip data compression algorithm itself is based on zlib module."
},
{
"code": null,
... |
Protractor - Protractor And Selenium Server | As discussed earlier, Protractor is an open source, end-to-end testing framework for Angular and AngularJS applications. It is Node.js program. On the other hand, Selenium is a browser automation framework that includes the Selenium Server, the WebDriver APIs and the WebDriver browser drivers.
If we talk about the conj... | [
{
"code": null,
"e": 2320,
"s": 2025,
"text": "As discussed earlier, Protractor is an open source, end-to-end testing framework for Angular and AngularJS applications. It is Node.js program. On the other hand, Selenium is a browser automation framework that includes the Selenium Server, the WebDrive... |
time.Time.Local() Function in Golang with Examples | 19 Apr, 2020
In Go language, time packages supplies functionality for determining as well as viewing time. The Time.Local() function in Go language is used to find “t” with the location that is set to local time. Moreover, this function is defined under the time package. Here, you need to import the “time” package in o... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n19 Apr, 2020"
},
{
"code": null,
"e": 364,
"s": 28,
"text": "In Go language, time packages supplies functionality for determining as well as viewing time. The Time.Local() function in Go language is used to find “t” with the location th... |
Changing Nginx Port in Linux - GeeksforGeeks | 24 Feb, 2021
Nginx, written by Igor Sysoev and released on October 4th, 2003, is a fast, open-source multi-functional web server. It also acts as a reverse proxy and loads balancer, apart from being a web server, allowing it to handle large numbers of concurrent HTTP connections and is mostly preferred to Apache in the... | [
{
"code": null,
"e": 24406,
"s": 24378,
"text": "\n24 Feb, 2021"
},
{
"code": null,
"e": 24889,
"s": 24406,
"text": "Nginx, written by Igor Sysoev and released on October 4th, 2003, is a fast, open-source multi-functional web server. It also acts as a reverse proxy and loads bala... |
How to create ACF plot in R? | The autocorrelation plot or ACF plot is a display of serial correlation in data that changes over time. The ACF plot can be easily created by using acf function.
For example, if we have a vector called V then we can create its autocorrelation plot by using the command given below −
acf(V)
Check out the below examples t... | [
{
"code": null,
"e": 1224,
"s": 1062,
"text": "The autocorrelation plot or ACF plot is a display of serial correlation in data that changes over time. The ACF plot can be easily created by using acf function."
},
{
"code": null,
"e": 1345,
"s": 1224,
"text": "For example, if we h... |
How to use onKeyPress event in ReactJS? - GeeksforGeeks | 25 Jan, 2021
The onKeyPress event in ReactJS occurs when the user presses a key on the keyboard but it is not fired for all keys e.g. ALT, CTRL, SHIFT, ESC in all browsers.
To use the onKeyPress event in ReactJS we will use the predefined onKeyPress method.
Creating React Application:
Step 1: Create a React applicatio... | [
{
"code": null,
"e": 24450,
"s": 24419,
"text": " \n25 Jan, 2021\n"
},
{
"code": null,
"e": 24610,
"s": 24450,
"text": "The onKeyPress event in ReactJS occurs when the user presses a key on the keyboard but it is not fired for all keys e.g. ALT, CTRL, SHIFT, ESC in all browsers."... |
Print stack trace in Java | In order to print the stack trace in Java, we use the java.lang.Throwable.printStackTrace() method. The printStackTrace() method prints the throwable and its backtrace in the standard error stream.
Declaration - The java.lang.Throwable.printStackTrace() method is declared as follows −
public void printStackTrace()
Let ... | [
{
"code": null,
"e": 1260,
"s": 1062,
"text": "In order to print the stack trace in Java, we use the java.lang.Throwable.printStackTrace() method. The printStackTrace() method prints the throwable and its backtrace in the standard error stream."
},
{
"code": null,
"e": 1348,
"s": 126... |
How can we modify a MySQL view with CREATE OR REPLACE VIEW statement? | As we know that we can modify a view by using ALTER VIEW statement but other than that we can also use CREATE OR REPLACE VIEW to modify an existing view. The concept is simple as MySQL simply modifies the view if it already exists otherwise a new view would be created. Following is the syntax of it −
CREATE OR REPLACE ... | [
{
"code": null,
"e": 1364,
"s": 1062,
"text": "As we know that we can modify a view by using ALTER VIEW statement but other than that we can also use CREATE OR REPLACE VIEW to modify an existing view. The concept is simple as MySQL simply modifies the view if it already exists otherwise a new view w... |
How to correctly sort a string with a number inside in Python? | This type of sort in which you want to sort on the basis of numbers within string is called natural sort or human sort. For example, if you have the text:
['Hello1','Hello12', 'Hello29', 'Hello2', 'Hello17', 'Hello25']
Then you want the sorted list to be:
['Hello1', 'Hello2','Hello12', 'Hello17', 'Hello25', 'Hello29']... | [
{
"code": null,
"e": 1217,
"s": 1062,
"text": "This type of sort in which you want to sort on the basis of numbers within string is called natural sort or human sort. For example, if you have the text:"
},
{
"code": null,
"e": 1281,
"s": 1217,
"text": "['Hello1','Hello12', 'Hello... |
Can we change the Cursor with Java Swing? | Yes, we can change the default cursor representation in Java. Let us first create a button component −
JButton button = new JButton("Button with two borders");
Whenever user will keep the mouse cursor on the above button component, the cursor would change to hand cursor −
Cursor cursor = button.getCursor();
button.setC... | [
{
"code": null,
"e": 1165,
"s": 1062,
"text": "Yes, we can change the default cursor representation in Java. Let us first create a button component −"
},
{
"code": null,
"e": 1222,
"s": 1165,
"text": "JButton button = new JButton(\"Button with two borders\");"
},
{
"code"... |
Batch Script - COMP | This batch command compares 2 files based on the file size.
COMP [sourceA] [sourceB]
Wherein sourceA and sourceB are the files which need to be compared.
@echo off
COMP C:\tp\lists.txt C:\tp\listsA.txt
The above command will compare the files lists.txt and listsA.txt and find out if the two file sizes are different.
... | [
{
"code": null,
"e": 2229,
"s": 2169,
"text": "This batch command compares 2 files based on the file size."
},
{
"code": null,
"e": 2255,
"s": 2229,
"text": "COMP [sourceA] [sourceB]\n"
},
{
"code": null,
"e": 2324,
"s": 2255,
"text": "Wherein sourceA and sour... |
C++ Program for converting hours into minutes and seconds | Given with the input as hours and the task is to convert the number of hours into minutes and seconds and display the corresponding result
Formula used for converting the hours into minutes and seconds is −
1 hour = 60 minutes
Minutes = hours * 60
1 hour = 3600 seconds
Seconds = hours * 3600
Input-: hours = 3
Out... | [
{
"code": null,
"e": 1201,
"s": 1062,
"text": "Given with the input as hours and the task is to convert the number of hours into minutes and seconds and display the corresponding result"
},
{
"code": null,
"e": 1269,
"s": 1201,
"text": "Formula used for converting the hours into ... |
Auto-Generated Knowledge Graphs, extract linked data from unstructured text | Towards Data Science | Knowledge graphs are a tool of data science that deal with interconnected entities (people, organizations, places, events, etc.). Entities are the nodes which are connected via edges. Knowledge graphs consist of these entity pairs that can be traversed to uncover meaningful connections in unstructured data.
There are i... | [
{
"code": null,
"e": 480,
"s": 171,
"text": "Knowledge graphs are a tool of data science that deal with interconnected entities (people, organizations, places, events, etc.). Entities are the nodes which are connected via edges. Knowledge graphs consist of these entity pairs that can be traversed to... |
forward_list::unique() in C++ STL - GeeksforGeeks | 09 Oct, 2019
forward_list::unique() is an inbuilt function in C++ STL which removes all consecutive duplicate elements from the forward_list. It uses binary predicate for comparison.
Syntax:
forwardlist_name.unique(BinaryPredicate name)
Parameters: The function accepts a single parameter which is a binary predicate tha... | [
{
"code": null,
"e": 24700,
"s": 24672,
"text": "\n09 Oct, 2019"
},
{
"code": null,
"e": 24870,
"s": 24700,
"text": "forward_list::unique() is an inbuilt function in C++ STL which removes all consecutive duplicate elements from the forward_list. It uses binary predicate for compa... |
How to do date validation in Python? | The date validation you want to achieve in python will largely depend on the format of the date you have. The strptime function from the datetime library can be used to parse strings to dates/times.
import datetime
date_string = '2017-12-31'
date_format = '%Y-%m-%d'
try:
date_obj = datetime.datetime.strptime(date_str... | [
{
"code": null,
"e": 1261,
"s": 1062,
"text": "The date validation you want to achieve in python will largely depend on the format of the date you have. The strptime function from the datetime library can be used to parse strings to dates/times."
},
{
"code": null,
"e": 1492,
"s": 12... |
How to run Selenium WebDriver test cases in Chrome? | We can run Selenium webdriver test cases in Chrome browser. But before working with Chrome browser with Selenium we have to ensure that the Java JDK, any Java IDE like Eclipse and Selenium webdriver are configured in our system. Next we have to download the Chrome browser driver and configure it to our project by follo... | [
{
"code": null,
"e": 1420,
"s": 1062,
"text": "We can run Selenium webdriver test cases in Chrome browser. But before working with Chrome browser with Selenium we have to ensure that the Java JDK, any Java IDE like Eclipse and Selenium webdriver are configured in our system. Next we have to download... |
Neural Networks for Absolute Beginners with Numpy from scratch — Part 3: Logistic Regression | by Suraj Donthi | Towards Data Science | In both Machine Learning and Deep Learning, you could encounter two kinds of problems which are regression and classification.
In regression problems, you predict a continuous real-valued number while in classification problems, you predict different classes of objects.
In the previous tutorials, we went in-depth into ... | [
{
"code": null,
"e": 298,
"s": 171,
"text": "In both Machine Learning and Deep Learning, you could encounter two kinds of problems which are regression and classification."
},
{
"code": null,
"e": 442,
"s": 298,
"text": "In regression problems, you predict a continuous real-value... |
Merge Sort for Doubly Linked List using C++. | Given a doubly linked list. Sort it using merge sort algorithm
List: 10->20->8-17->5->13->4
Sorted list: 4->5->8->10->13->17->20
1. If head is NULL or list contains only one element then return list
2. Create two lists by dividing original list into 2 parts
3. Sort first and second part of list
4. Merge both sorted lis... | [
{
"code": null,
"e": 1125,
"s": 1062,
"text": "Given a doubly linked list. Sort it using merge sort algorithm"
},
{
"code": null,
"e": 1191,
"s": 1125,
"text": "List: 10->20->8-17->5->13->4\nSorted list: 4->5->8->10->13->17->20"
},
{
"code": null,
"e": 1384,
"s": ... |
How to Create a Geofence with Python | by Mike Flanagan | Towards Data Science | Geofencing is a useful technique with a wide range of applications whenever one is handling location data. It can be used to signal notifications or flag alerts based on proximity to an individual or landmark. In data science, it is often used in feature engineering and creating boundaries for visualizations.
A geofenc... | [
{
"code": null,
"e": 483,
"s": 172,
"text": "Geofencing is a useful technique with a wide range of applications whenever one is handling location data. It can be used to signal notifications or flag alerts based on proximity to an individual or landmark. In data science, it is often used in feature ... |
Implementing a Contacts directory in Python - GeeksforGeeks | 15 Sep, 2021
Our task is to implement a smartphone directory that collects contact data from the user until the user prompts the program to. Contact data refers to the contact’s name, phone number, date-of-birth, a category that contact belongs to (Friends, Family, Work, Other), e-mail address. The user may enter as mu... | [
{
"code": null,
"e": 24318,
"s": 24290,
"text": "\n15 Sep, 2021"
},
{
"code": null,
"e": 24865,
"s": 24318,
"text": "Our task is to implement a smartphone directory that collects contact data from the user until the user prompts the program to. Contact data refers to the contact’... |
Simple Plot in Python using Matplotlib - GeeksforGeeks | 04 Jan, 2022
Matplotlib is a Python library that helps in visualizing and analyzing the data and helps in better understanding of the data with the help of graphical, pictorial visualizations that can be simulated using the matplotlib library. Matplotlib is a comprehensive library for static, animated and interactive v... | [
{
"code": null,
"e": 24575,
"s": 24547,
"text": "\n04 Jan, 2022"
},
{
"code": null,
"e": 24897,
"s": 24575,
"text": "Matplotlib is a Python library that helps in visualizing and analyzing the data and helps in better understanding of the data with the help of graphical, pictorial... |
Adding a Page break/new page in SAP Script | To add a new page, you can use Control command NEW-PAGE in Transaction SE71.
NEW-PAGE [page_options] [ spool_options]
This statement creates a new page in the current list and writes the subsequent list output into a spool list.
In T-Code: SE38 Print Program, you can use Function Module CONTROL_FORM to call NEW-PAGE co... | [
{
"code": null,
"e": 1139,
"s": 1062,
"text": "To add a new page, you can use Control command NEW-PAGE in Transaction SE71."
},
{
"code": null,
"e": 1180,
"s": 1139,
"text": "NEW-PAGE [page_options] [ spool_options]"
},
{
"code": null,
"e": 1291,
"s": 1180,
"t... |
Minimum String in C++ | Suppose we have two strings s and t of same length, and both are in lowercase letters. Consider we have rearranged s at first into any order, then count the minimum number of changes needed to turn s into t.
So, if the input is like s = "eccynue", t = "science", then the output will be 2 as if we rearrange "eccynue" to... | [
{
"code": null,
"e": 1270,
"s": 1062,
"text": "Suppose we have two strings s and t of same length, and both are in lowercase letters. Consider we have rearranged s at first into any order, then count the minimum number of changes needed to turn s into t."
},
{
"code": null,
"e": 1459,
... |
Apache MXNet - Gluon | Another most important MXNet Python package is Gluon. In this chapter, we will be discussing this package. Gluon provides a clear, concise, and simple API for DL projects. It enables Apache MXNet to prototype, build, and train DL models without forfeiting the training speed.
Blocks form the basis of more complex networ... | [
{
"code": null,
"e": 2424,
"s": 2148,
"text": "Another most important MXNet Python package is Gluon. In this chapter, we will be discussing this package. Gluon provides a clear, concise, and simple API for DL projects. It enables Apache MXNet to prototype, build, and train DL models without forfeiti... |
How to have a function return a figure in Python (using Matplotlib)? | To have a function return a figure in Python (using Matplotlib), we can take the following steps −
Set the figure size and adjust the padding between and around the subplots.
Set the figure size and adjust the padding between and around the subplots.
Create x and y data points using numpy.
Create x and y data points us... | [
{
"code": null,
"e": 1161,
"s": 1062,
"text": "To have a function return a figure in Python (using Matplotlib), we can take the following steps −"
},
{
"code": null,
"e": 1237,
"s": 1161,
"text": "Set the figure size and adjust the padding between and around the subplots."
},
... |
Word-level text generation using GPT-2, LSTM and Markov Chain | Towards Data Science | Natural Language Generation (NLG) or Text Generation is a subfield of Natural Language Processing (NLP). Its goal is to generate meaningful phrases and sentences in the form of human-written text. It has a wide range of use cases: writing long form content (eg reports, articles), product descriptions, social media post... | [
{
"code": null,
"e": 508,
"s": 171,
"text": "Natural Language Generation (NLG) or Text Generation is a subfield of Natural Language Processing (NLP). Its goal is to generate meaningful phrases and sentences in the form of human-written text. It has a wide range of use cases: writing long form conten... |
How to set the spacing between words in a text in JavaScript? | Use the wordSpacing property in JavaScript to set the spacing between words.
You can try to run the following code to learn how to implement wordSpacing property −
<!DOCTYPE html>
<html>
<body>
<p id = "pid">This is an example paragraph.</p>
<button type = "button" id="btn" onclick = "display... | [
{
"code": null,
"e": 1139,
"s": 1062,
"text": "Use the wordSpacing property in JavaScript to set the spacing between words."
},
{
"code": null,
"e": 1226,
"s": 1139,
"text": "You can try to run the following code to learn how to implement wordSpacing property −"
},
{
"cod... |
Prototype - cumulativeScrollOffset() Method | This method calculates and returns the cumulative scroll offset of an element in nested scrolling containers. This adds the cumulative scrollLeft and scrollTop of an element and all its parents.
This is used for calculating the scroll offset of an element that is in more than one scroll container (e.g., a draggable in ... | [
{
"code": null,
"e": 2256,
"s": 2061,
"text": "This method calculates and returns the cumulative scroll offset of an element in nested scrolling containers. This adds the cumulative scrollLeft and scrollTop of an element and all its parents."
},
{
"code": null,
"e": 2450,
"s": 2256,
... |
A quick look at Julia, R and Python - knn Example | Towards Data Science | Once again, I found myself in the middle of considering learning a new language or simply fostering my knowledge of one I already know.
Every year seems to be the year of a “new” language and it appears that the talk about the “data science languages” has come back stronger than ever. I will, therefore, provide a quick... | [
{
"code": null,
"e": 308,
"s": 172,
"text": "Once again, I found myself in the middle of considering learning a new language or simply fostering my knowledge of one I already know."
},
{
"code": null,
"e": 592,
"s": 308,
"text": "Every year seems to be the year of a “new” languag... |
What is NULL check and insertion rule in a DB2 table? | Null in DB2 is defined as nothing. It is an unknown value. If we want to restrict NULL value in any column then the column should be defined with the “NOT NULL” parameter in CREATE TABLE.
The “NOT NULL” will force the user to enter a value for the column. However, if we do not
want to give any value for this column we ... | [
{
"code": null,
"e": 1250,
"s": 1062,
"text": "Null in DB2 is defined as nothing. It is an unknown value. If we want to restrict NULL value in any column then the column should be defined with the “NOT NULL” parameter in CREATE TABLE."
},
{
"code": null,
"e": 1543,
"s": 1250,
"te... |
HTML5 Canvas - Using Images | This tutorial would show how to import an external image into a canvas and then how to draw on that image by using following methods −
beginPath()
This method resets the current path.
moveTo(x, y)
This method creates a new subpath with the given point.
closePath()
This method marks the current subpath as closed, and st... | [
{
"code": null,
"e": 2743,
"s": 2608,
"text": "This tutorial would show how to import an external image into a canvas and then how to draw on that image by using following methods −"
},
{
"code": null,
"e": 2755,
"s": 2743,
"text": "beginPath()"
},
{
"code": null,
"e"... |
Finding middle element in a linked list | Practice | GeeksforGeeks | Given a singly linked list of N nodes.
The task is to find the middle of the linked list. For example, if the linked list is
1-> 2->3->4->5, then the middle node of the list is 3.
If there are two middle nodes(in case, when N is even), print the second middle element.
For example, if the linked list given is 1->2->3->4... | [
{
"code": null,
"e": 605,
"s": 238,
"text": "Given a singly linked list of N nodes.\nThe task is to find the middle of the linked list. For example, if the linked list is\n1-> 2->3->4->5, then the middle node of the list is 3.\nIf there are two middle nodes(in case, when N is even), print the second... |
Using NLP to improve your Resume | Towards Data Science | Recruiters are using increasingly complicated Software and tools to scan and match Resumes to posted job positions and job specifications. If your Resume (CV) is generic, or the job specification is vague and/or generic, these tools will work against you. AI really is working against your job application, and I am not ... | [
{
"code": null,
"e": 726,
"s": 172,
"text": "Recruiters are using increasingly complicated Software and tools to scan and match Resumes to posted job positions and job specifications. If your Resume (CV) is generic, or the job specification is vague and/or generic, these tools will work against you.... |
Check if a string has white space in JavaScript? | To check whitespace in a string, use the concept of indexOf(‘ ’). Following is the code −
function stringHasTheWhiteSpaceOrNot(value){
return value.indexOf(' ') >= 0;
}
var whiteSpace=stringHasTheWhiteSpaceOrNot("MyNameis John");
if(whiteSpace==true){
console.log("The string has whitespace");
} else {
... | [
{
"code": null,
"e": 1152,
"s": 1062,
"text": "To check whitespace in a string, use the concept of indexOf(‘ ’). Following is the code −"
},
{
"code": null,
"e": 1440,
"s": 1152,
"text": "function stringHasTheWhiteSpaceOrNot(value){\n return value.indexOf(' ') >= 0;\n}\nvar whi... |
AI and Real State: Predicting Rental Prices in Amsterdam | Towards Data Science | Renting or buying a new house, whether you are a university student or a middle-class family, is always a daunting process that often seems impulsive or risky (a true economic market for lemons).
If the renting itself is already hard, doing it in Amsterdam doesn’t make it any easier. With increasing city regulations, l... | [
{
"code": null,
"e": 368,
"s": 172,
"text": "Renting or buying a new house, whether you are a university student or a middle-class family, is always a daunting process that often seems impulsive or risky (a true economic market for lemons)."
},
{
"code": null,
"e": 694,
"s": 368,
... |
How to perform double click on an element in Selenium? | We can perform double click on elements in Selenium with the help of Actions class. In order to perform the double click action we will use moveToElement() method, then use doubleClick() method. Finally use build().perform() to execute all the steps.
import org.openqa.selenium.By;
import org.openqa.selenium.Keys;
impor... | [
{
"code": null,
"e": 1313,
"s": 1062,
"text": "We can perform double click on elements in Selenium with the help of Actions class. In order to perform the double click action we will use moveToElement() method, then use doubleClick() method. Finally use build().perform() to execute all the steps."
... |
Count the number of elements in a HashSet in Java | To count the number of elements in a HashSet, use the size() method.
Create HashSet −
String strArr[] = { "P", "Q", "R" };
Set s = new HashSet(Arrays.asList(strArr));
Let us now count the number of elements in the above Set −
s.size()
The following is an example to count the number of elements in a HashSet −
Live Demo... | [
{
"code": null,
"e": 1131,
"s": 1062,
"text": "To count the number of elements in a HashSet, use the size() method."
},
{
"code": null,
"e": 1148,
"s": 1131,
"text": "Create HashSet −"
},
{
"code": null,
"e": 1229,
"s": 1148,
"text": "String strArr[] = { \"P\"... |
Finding the Frobenius Norm of a given matrix - GeeksforGeeks | 06 May, 2021
Given an M * N matrix, the task is to find the Frobenius Norm of the matrix. The Frobenius Norm of a matrix is defined as the square root of the sum of the squares of the elements of the matrix.Example:
Input: mat[][] = {{1, 2}, {3, 4}} Output: 5.47723 sqrt(12 + 22 + 32 + 42) = sqrt(30) = 5.47723Input: m... | [
{
"code": null,
"e": 24820,
"s": 24792,
"text": "\n06 May, 2021"
},
{
"code": null,
"e": 25025,
"s": 24820,
"text": "Given an M * N matrix, the task is to find the Frobenius Norm of the matrix. The Frobenius Norm of a matrix is defined as the square root of the sum of the squares... |
How can we set the margin to a JButton in Java? | A JButton is a subclass of AbstractButton and it can be used for adding platform-independent buttons to a Java Swing application. A JButon can generate an ActionListener interface when the button is pressed or clicked, it can also generate the MouseListener and KeyListener interfaces. We can set a margin to a JButton b... | [
{
"code": null,
"e": 1504,
"s": 1062,
"text": "A JButton is a subclass of AbstractButton and it can be used for adding platform-independent buttons to a Java Swing application. A JButon can generate an ActionListener interface when the button is pressed or clicked, it can also generate the MouseList... |
VueJS - Events | v-on is the attribute added to the DOM elements to listen to the events in VueJS.
<html>
<head>
<title>VueJs Instance</title>
<script type = "text/javascript" src = "js/vue.js"></script>
</head>
<body>
<div id = "databinding">
<button v-on:click = "displaynumbers">Click ME</button>
... | [
{
"code": null,
"e": 2018,
"s": 1936,
"text": "v-on is the attribute added to the DOM elements to listen to the events in VueJS."
},
{
"code": null,
"e": 2787,
"s": 2018,
"text": "<html>\n <head>\n <title>VueJs Instance</title>\n <script type = \"text/javascript\" src... |
Visualizing multi dimensional arrays | by Nayantara Jeyaraj (Taro) | Towards Data Science | If you asked my opinion about Multidimensional arrays, 5 or 6 years ago, I would have said that they were the most simplistic concept to grasp but the most complicated to implement since the above “architectural marvel” is what pops into my mind as soon as I think of a Multidimensional Array.
That was ages ago before I... | [
{
"code": null,
"e": 465,
"s": 171,
"text": "If you asked my opinion about Multidimensional arrays, 5 or 6 years ago, I would have said that they were the most simplistic concept to grasp but the most complicated to implement since the above “architectural marvel” is what pops into my mind as soon a... |
Kubernetes - Service | A service can be defined as a logical set of pods. It can be defined as an abstraction on the top of the pod which provides a single IP address and DNS name by which pods can be accessed. With Service, it is very easy to manage load balancing configuration. It helps pods to scale very easily.
A service is a REST object... | [
{
"code": null,
"e": 2489,
"s": 2195,
"text": "A service can be defined as a logical set of pods. It can be defined as an abstraction on the top of the pod which provides a single IP address and DNS name by which pods can be accessed. With Service, it is very easy to manage load balancing configurat... |
C - Input and Output | C - Programming HOME
C - Basic Introduction
C - Program Structure
C - Reserved Keywords
C - Basic Datatypes
C - Variable Types
C - Storage Classes
C - Using Constants
C - Operator Types
C - Control Statements
C - Input and Output
C - Pointing to Data
C - Using Functions
C - Play with Strings
C - Structured Datatypes
C ... | [
{
"code": null,
"e": 1475,
"s": 1454,
"text": "C - Programming HOME"
},
{
"code": null,
"e": 1498,
"s": 1475,
"text": "C - Basic Introduction"
},
{
"code": null,
"e": 1520,
"s": 1498,
"text": "C - Program Structure"
},
{
"code": null,
"e": 1542,
... |
How to Change the Style of <a> Tag Title Attribute ? - GeeksforGeeks | 16 Apr, 2020
The style of <a> (anchor) tag title attribute is pre-defined for the browser and it may differ from one browser to the other. The webpage cannot display the changes in the tool-tip if based on the title attribute.
The option is to make a false-tool-tip using CSS properties according to the wish. For doing ... | [
{
"code": null,
"e": 26435,
"s": 26407,
"text": "\n16 Apr, 2020"
},
{
"code": null,
"e": 26649,
"s": 26435,
"text": "The style of <a> (anchor) tag title attribute is pre-defined for the browser and it may differ from one browser to the other. The webpage cannot display the change... |
Annotate Text Outside of ggplot2 Plot in R - GeeksforGeeks | 03 Mar, 2021
Ggplot2 is based on the grammar of graphics, the idea that you can build every graph from the same few components: a data set, a set of geoms—visual marks that represent data points, and a coordinate system. There are many scenarios where we need to annotate outside the plot area or specific area as per cl... | [
{
"code": null,
"e": 26597,
"s": 26569,
"text": "\n03 Mar, 2021"
},
{
"code": null,
"e": 27084,
"s": 26597,
"text": "Ggplot2 is based on the grammar of graphics, the idea that you can build every graph from the same few components: a data set, a set of geoms—visual marks that rep... |
Using Python and Selenium to get coordinates from street addresses | by Khalid El Mouloudi | Towards Data Science | This is a step by step article on how to use Python and Selenium to scrape coordinates data (Latitude and Longitude values) from Google Maps based on street addresses.
In this case example, I’m going to work with an official dataset containing the street addresses of all Australian charities and nonprofits. At the end,... | [
{
"code": null,
"e": 215,
"s": 47,
"text": "This is a step by step article on how to use Python and Selenium to scrape coordinates data (Latitude and Longitude values) from Google Maps based on street addresses."
},
{
"code": null,
"e": 534,
"s": 215,
"text": "In this case exampl... |
C# | Math Class Fields with Examples - GeeksforGeeks | 13 Jan, 2022
In C#, the Math class provides the constants and the static methods for logarithmic, trigonometric, and other mathematical functions. Math class has two fields as follows:
Math.E Field
Math.PI Field
This field represents the natural logarithmic base, specified by the constant, e.
Syntax:
public const do... | [
{
"code": null,
"e": 25887,
"s": 25859,
"text": "\n13 Jan, 2022"
},
{
"code": null,
"e": 26060,
"s": 25887,
"text": "In C#, the Math class provides the constants and the static methods for logarithmic, trigonometric, and other mathematical functions. Math class has two fields as ... |
BeautifulSoup - Append to the contents of tag - GeeksforGeeks | 25 Feb, 2021
Prerequisites: Beautifulsoup
Beautifulsoup is a Python library used to extract the contents from the webpages. It is used in extracting the contents from HTML and XML structures. To use this library, we need to install it first. Here we are going to append the text to the existing contents of tag. We will ... | [
{
"code": null,
"e": 24292,
"s": 24264,
"text": "\n25 Feb, 2021"
},
{
"code": null,
"e": 24321,
"s": 24292,
"text": "Prerequisites: Beautifulsoup"
},
{
"code": null,
"e": 24651,
"s": 24321,
"text": "Beautifulsoup is a Python library used to extract the content... |
Python | Operators | Question 1 - GeeksforGeeks | 28 Jun, 2021
What is the output of the following code :
print 9//2
(A) 4.5(B) 4.0(C) 4(D) ErrorAnswer: (C)Explanation: The ‘//’ operator in Python returns the integer part of the floating number.Quiz of this QuestionPlease comment below if you find anything wrong in the above post
amartyaghoshgfg
Operators
Python-Opera... | [
{
"code": null,
"e": 24093,
"s": 24065,
"text": "\n28 Jun, 2021"
},
{
"code": null,
"e": 24136,
"s": 24093,
"text": "What is the output of the following code :"
},
{
"code": "print 9//2",
"e": 24147,
"s": 24136,
"text": null
},
{
"code": null,
"e":... |
Serverless Model Hosting with Docker, AWS Lambda and API Gateway | by Jonathan Readshaw | Towards Data Science | Previously AWS Lambda deployment packages were limited to a maximum unzipped size of 250MB including requirements. This proved to be an obstacle when attempting to host Machine Learning models using the service, as common ML libraries and complex models led to deployment packages far larger than the 250MB limit.
Howeve... | [
{
"code": null,
"e": 486,
"s": 172,
"text": "Previously AWS Lambda deployment packages were limited to a maximum unzipped size of 250MB including requirements. This proved to be an obstacle when attempting to host Machine Learning models using the service, as common ML libraries and complex models l... |
Create Battery Notifier for Laptop using Python - GeeksforGeeks | 09 Mar, 2021
Laptop or P.C battery charging is always a tension. We often forget to charge our laptop and seem to check the battery. This article demonstrates how to create a simple Battery Notifier application using Python. A battery notifier is a simple application that produces a notification message in the form of ... | [
{
"code": null,
"e": 24816,
"s": 24788,
"text": "\n09 Mar, 2021"
},
{
"code": null,
"e": 25234,
"s": 24816,
"text": "Laptop or P.C battery charging is always a tension. We often forget to charge our laptop and seem to check the battery. This article demonstrates how to create a s... |
How to simulate scanf() method using Python? | Python does not currently have an equivalent to scanf(). Regular expressions are generally more powerful, though also more verbose, than scanf()format strings. The table below offers some more-or-less equivalent mappings between scanf() format tokens and regular expressions.
To extract the filename and numbers from a s... | [
{
"code": null,
"e": 1338,
"s": 1062,
"text": "Python does not currently have an equivalent to scanf(). Regular expressions are generally more powerful, though also more verbose, than scanf()format strings. The table below offers some more-or-less equivalent mappings between scanf() format tokens an... |
Chef - Roles | Roles in Chef are a logical way of grouping nodes. Typical cases are to have roles for web servers, database servers, and so on. One can set custom run list for all the nodes and override attribute value within roles.
vipin@laptop:~/chef-repo $ subl roles/web_servers.rb
name "web_servers"
description "This role conta... | [
{
"code": null,
"e": 2598,
"s": 2380,
"text": "Roles in Chef are a logical way of grouping nodes. Typical cases are to have roles for web servers, database servers, and so on. One can set custom run list for all the nodes and override attribute value within roles."
},
{
"code": null,
"e"... |
Storing value from a MySQL SELECT statement to a variable? | Let us first create a table −
mysql> create table DemoTable631 (
StudentId int NOT NULL AUTO_INCREMENT PRIMARY KEY,StudentName varchar(100)
);
Query OK, 0 rows affected (0.83 sec)
Insert some records in the table using insert command −
mysql> insert into DemoTable631(StudentName) values('John Smith');
Query OK, 1 ro... | [
{
"code": null,
"e": 1092,
"s": 1062,
"text": "Let us first create a table −"
},
{
"code": null,
"e": 1245,
"s": 1092,
"text": "mysql> create table DemoTable631 (\n StudentId int NOT NULL AUTO_INCREMENT PRIMARY KEY,StudentName varchar(100)\n);\nQuery OK, 0 rows affected (0.83 s... |
Count of elements of an array present in every row of NxM matrix in C++ | We are given an array of integer type elements and a matrix or 2-D array of given row and column size and the task is to calculate the count of elements of an array that are present in each row of a matrix.
Input
int arr = { 2, 4, 6} and int matrix[row][col] = { { 2, 4, 6 }, {3, 4, 6}, {6, 2, 1}}
Output
Elements of a... | [
{
"code": null,
"e": 1269,
"s": 1062,
"text": "We are given an array of integer type elements and a matrix or 2-D array of given row and column size and the task is to calculate the count of elements of an array that are present in each row of a matrix."
},
{
"code": null,
"e": 1276,
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.