title stringlengths 3 221 | text stringlengths 17 477k | parsed listlengths 0 3.17k |
|---|---|---|
How to measure time taken by a function in C? - GeeksforGeeks | 29 May, 2017
To calculate time taken by a process, we can use clock() function which is available time.h. We can call the clock function at the beginning and end of the code for which we measure time, subtract the values, and then divide by CLOCKS_PER_SEC (the number of clock ticks per second) to get processor time, li... | [
{
"code": null,
"e": 24834,
"s": 24806,
"text": "\n29 May, 2017"
},
{
"code": null,
"e": 25155,
"s": 24834,
"text": "To calculate time taken by a process, we can use clock() function which is available time.h. We can call the clock function at the beginning and end of the code fo... |
Visualize Your Data with Google Data Studio | by Tal Peretz | Towards Data Science | While striving to create a simple, interactive and accessible Dashboard out of my precious data, I bumped into Data Studio and fell in love.
When creating a new data source you can use Data Studio connectors or explore community connectors such as data.world, facebook ads, salesforce and more.
You can construct
time se... | [
{
"code": null,
"e": 313,
"s": 172,
"text": "While striving to create a simple, interactive and accessible Dashboard out of my precious data, I bumped into Data Studio and fell in love."
},
{
"code": null,
"e": 467,
"s": 313,
"text": "When creating a new data source you can use D... |
C Library math.h functions - GeeksforGeeks | 09 Feb, 2021
The math.h header defines various mathematical functions and one macro. All the functions available in this library take double as an argument and return double as the result. Let us discuss some important functions one by one.1. double ceil(double x): The C library function double ceil (double x) returns ... | [
{
"code": null,
"e": 24290,
"s": 24262,
"text": "\n09 Feb, 2021"
},
{
"code": null,
"e": 24654,
"s": 24290,
"text": "The math.h header defines various mathematical functions and one macro. All the functions available in this library take double as an argument and return double as... |
What is the use of the "export" clause in a module-info file in Java 9? | A Module is a combination of both code and data that has a name, declares dependencies on other modules, exports packages that contain the public types that can be accessible outside this module and specifies the services it uses or the service implementations it provides. All of these have specified in a module-info.j... | [
{
"code": null,
"e": 1445,
"s": 1062,
"text": "A Module is a combination of both code and data that has a name, declares dependencies on other modules, exports packages that contain the public types that can be accessible outside this module and specifies the services it uses or the service implemen... |
Solving A Simple Classification Problem with Python — Fruits Lovers’ Edition | by Susan Li | Towards Data Science | In this post, we’ll implement several machine learning algorithms in Python using Scikit-learn, the most popular machine learning tool for Python. Using a simple dataset for the task of training a classifier to distinguish between different types of fruits.
The purpose of this post is to identify the machine learning a... | [
{
"code": null,
"e": 429,
"s": 171,
"text": "In this post, we’ll implement several machine learning algorithms in Python using Scikit-learn, the most popular machine learning tool for Python. Using a simple dataset for the task of training a classifier to distinguish between different types of fruit... |
Parsing XML Data in Python. Storing XML Data in a Pandas Dataframe | by Sadrach Pierre, Ph.D. | Towards Data Science | Extensible Mark up Language (XML) is a mark up language that encodes data in a human and machine readable format. XML is used in a variety of programs for structuring, storing and transmitting data. Python contains several interfaces for processing XML data. In this post, we will discuss how to use the ‘ElementTree’ mo... | [
{
"code": null,
"e": 585,
"s": 171,
"text": "Extensible Mark up Language (XML) is a mark up language that encodes data in a human and machine readable format. XML is used in a variety of programs for structuring, storing and transmitting data. Python contains several interfaces for processing XML da... |
ReactJS - Keys | React keys are useful when working with dynamically created components or when your lists are altered by the users. Setting the key value will keep your components uniquely identified after the change.
Let's dynamically create Content elements with unique index (i). The map function will create three elements from our ... | [
{
"code": null,
"e": 2235,
"s": 2033,
"text": "React keys are useful when working with dynamically created components or when your lists are altered by the users. Setting the key value will keep your components uniquely identified after the change."
},
{
"code": null,
"e": 2475,
"s":... |
What is MySQL event and how it is related to trigger? | A MySQL event is a task that rums based on a predefined schedule therefore sometimes it is referred to as a scheduled event. In other words, we can say that the MySQL event schedule is a process that runs in the background and constantly looks for the events to execute. It is referred to as a temporal trigger because t... | [
{
"code": null,
"e": 1661,
"s": 1062,
"text": "A MySQL event is a task that rums based on a predefined schedule therefore sometimes it is referred to as a scheduled event. In other words, we can say that the MySQL event schedule is a process that runs in the background and constantly looks for the e... |
Type Selectors in CSS | A selector is an HTML tag at which a style will be applied. This could be any tag like <h1> or <table> etc.
With the type selector, set for HTML tags like h1, h2, h3, p, etc:
h2 {
color: #FF0000;
}
Set for p:
p {
color: #800000;
} | [
{
"code": null,
"e": 1170,
"s": 1062,
"text": "A selector is an HTML tag at which a style will be applied. This could be any tag like <h1> or <table> etc."
},
{
"code": null,
"e": 1237,
"s": 1170,
"text": "With the type selector, set for HTML tags like h1, h2, h3, p, etc:"
},
... |
How to Use Volatile Variables in Arduino? | Just like in C and C++, you need to qualify a variable with the volatile keyword if it can be modified within an interrupt routine.
When you qualify a variable as volatile, this is what happens behind the scenes −
The compiler gets instructed that the variable should be loaded into the RAM and not the storage register ... | [
{
"code": null,
"e": 1194,
"s": 1062,
"text": "Just like in C and C++, you need to qualify a variable with the volatile keyword if it can be modified within an interrupt routine."
},
{
"code": null,
"e": 1276,
"s": 1194,
"text": "When you qualify a variable as volatile, this is w... |
Multi-Layer perceptron using Tensorflow | by Aayush Agrawal | Towards Data Science | In this blog, we are going to build a neural network(multilayer perceptron) using TensorFlow and successfully train it to recognize digits in the image. Tensorflow is a very popular deep learning framework released by, and this notebook will guide to build a neural network with this library. If you want to understand w... | [
{
"code": null,
"e": 623,
"s": 172,
"text": "In this blog, we are going to build a neural network(multilayer perceptron) using TensorFlow and successfully train it to recognize digits in the image. Tensorflow is a very popular deep learning framework released by, and this notebook will guide to buil... |
Insert a character at nth position in string in JavaScript | We are required to write a JavaScript function that takes in a string as the first argument and a number as the second argument and a single character as the third argument, let’s call this argument char.
The number is guaranteed to be smaller than the length of the array. The function should insert the character char ... | [
{
"code": null,
"e": 1267,
"s": 1062,
"text": "We are required to write a JavaScript function that takes in a string as the first argument and a number as the second argument and a single character as the third argument, let’s call this argument char."
},
{
"code": null,
"e": 1457,
"... |
Pairs of complete strings in two sets of strings - GeeksforGeeks | 03 Nov, 2021
Two strings are said to be complete if on concatenation, they contain all the 26 English alphabets. For example, “abcdefghi” and “jklmnopqrstuvwxyz” are complete as they together have all characters from ‘a’ to ‘z’. We are given two sets of sizes n and m respectively and we need to find the number of pairs... | [
{
"code": null,
"e": 24623,
"s": 24595,
"text": "\n03 Nov, 2021"
},
{
"code": null,
"e": 25017,
"s": 24623,
"text": "Two strings are said to be complete if on concatenation, they contain all the 26 English alphabets. For example, “abcdefghi” and “jklmnopqrstuvwxyz” are complete a... |
How to instantiate a class in C#? | Use the new operator to instantiate a class in C#.
Let’s say our class is Line. Instantiation will create a new object as shown below −
Line line = new Line();
Using the object, you can now call the method −
line.setLength(6.0);
Let us see the example −
Live Demo
using System;
namespace LineApplication {
class Lin... | [
{
"code": null,
"e": 1113,
"s": 1062,
"text": "Use the new operator to instantiate a class in C#."
},
{
"code": null,
"e": 1198,
"s": 1113,
"text": "Let’s say our class is Line. Instantiation will create a new object as shown below −"
},
{
"code": null,
"e": 1222,
... |
Lodash _.snakeCase() Method - GeeksforGeeks | 09 Sep, 2020
The _.snakeCase() method is used to convert string to snake case. Snake case refers to combines words into a lower case string with underscores(_) between words.
Syntax:
_.snakeCase( [string=''] )
Parameters: This method accepts a single parameter as mentioned above and described below:
string: This param... | [
{
"code": null,
"e": 24423,
"s": 24395,
"text": "\n09 Sep, 2020"
},
{
"code": null,
"e": 24585,
"s": 24423,
"text": "The _.snakeCase() method is used to convert string to snake case. Snake case refers to combines words into a lower case string with underscores(_) between words."
... |
stack swap() in C++ STL | 21 Jun, 2022
Stacks are a type of container adaptors with LIFO(Last In First Out) type of work, where a new element is added at one end and (top) an element is removed from that end only.
This function is used to swap the contents of one stack with another stack of same type but the size may vary. Syntax :
stackname1.s... | [
{
"code": null,
"e": 53,
"s": 25,
"text": "\n21 Jun, 2022"
},
{
"code": null,
"e": 228,
"s": 53,
"text": "Stacks are a type of container adaptors with LIFO(Last In First Out) type of work, where a new element is added at one end and (top) an element is removed from that end only.... |
Cartesian Product of Two Sets - GeeksforGeeks | 08 Apr, 2021
Let A and B be two sets, Cartesian productA × B is the set of all ordered pair of elements from A and B A × B = {{x, y} : x ∈ A, y ∈ B}
Let A = {a, b, c} and B = {d, e, f} The Cartesian product of two sets is A x B = {a, d}, {a, e}, {a, f}, {b, d}, {b, e}, {b, f}, {c, d}, {c, e}, {c, f}}A has 3 elements a... | [
{
"code": null,
"e": 26722,
"s": 26694,
"text": "\n08 Apr, 2021"
},
{
"code": null,
"e": 26859,
"s": 26722,
"text": "Let A and B be two sets, Cartesian productA × B is the set of all ordered pair of elements from A and B A × B = {{x, y} : x ∈ A, y ∈ B} "
},
{
"code": null... |
Menu-Driven Shell Script - GeeksforGeeks | 25 Nov, 2021
Here we are going to discuss how to create a menu-driven shell script. Let’s first understand what does menu-driven means and why should we learn to create a menu-driven shell script. Basically, a menu-driven shell script provides users more options/interactive interface. In a layman’s term shell script is... | [
{
"code": null,
"e": 24431,
"s": 24403,
"text": "\n25 Nov, 2021"
},
{
"code": null,
"e": 24954,
"s": 24431,
"text": "Here we are going to discuss how to create a menu-driven shell script. Let’s first understand what does menu-driven means and why should we learn to create a menu-... |
VBScript Filter Function | A Filter Function, which returns a zero-based array that contains a subset of a string array based on a specific filter criteria.
Filter(inputstrings,value[,include[,compare]])
inputstrings, a Required parameter. This parameter corresponds to the array of strings to be searched.
inputstrings, a Required parameter. Th... | [
{
"code": null,
"e": 2210,
"s": 2080,
"text": "A Filter Function, which returns a zero-based array that contains a subset of a string array based on a specific filter criteria."
},
{
"code": null,
"e": 2259,
"s": 2210,
"text": "Filter(inputstrings,value[,include[,compare]]) \n"
... |
resizable() method in Tkinter | Python - GeeksforGeeks | 15 Apr, 2019
resizable() method is used to allow Tkinter root window to change it’s size according to the users need as well we can prohibit resizing of the Tkinter window.So, basically, if user wants to create a fixed size window, this method can be used.
How to use:
-> import tkinter
-> root = Tk()
-> root.resizable(... | [
{
"code": null,
"e": 25729,
"s": 25701,
"text": "\n15 Apr, 2019"
},
{
"code": null,
"e": 25973,
"s": 25729,
"text": "resizable() method is used to allow Tkinter root window to change it’s size according to the users need as well we can prohibit resizing of the Tkinter window.So, ... |
How to Create a Transparent button using HTML and CSS ? - GeeksforGeeks | 29 Apr, 2020
The transparent button can be easily created by using HTML and CSS. In this article, we will use background-color: transparent; property to design the transparent background button.
HTML Code: In this section, we will create a basic structure of button using the button Tag.
<!DOCTYPE html><html lang="en"> ... | [
{
"code": null,
"e": 26505,
"s": 26477,
"text": "\n29 Apr, 2020"
},
{
"code": null,
"e": 26687,
"s": 26505,
"text": "The transparent button can be easily created by using HTML and CSS. In this article, we will use background-color: transparent; property to design the transparent ... |
How to declare a tuple in C#? | To declare a tuple the following is the format wherein we have a tuple with int and string items −
Tuple<int, string> tuple = new Tuple<int, string>(20, "Tom");
Now, check for first item in the tuple, which is an integer −
if (tuple.Item1 == 99) {
Console.WriteLine(tuple.Item1);
}
Now check for second item in the tu... | [
{
"code": null,
"e": 1161,
"s": 1062,
"text": "To declare a tuple the following is the format wherein we have a tuple with int and string items −"
},
{
"code": null,
"e": 1223,
"s": 1161,
"text": "Tuple<int, string> tuple = new Tuple<int, string>(20, \"Tom\");"
},
{
"code... |
Fetch maximum individual marks for a student with marks1 and marks2 records in MySQL? | For this, use MAX() along with GROUP BY clause. Let us first create a table −
mysql> create table DemoTable
-> (
-> StudentEmailId varchar(20),
-> Marks1 int,
-> Marks2 int
-> );
Query OK, 0 rows affected (0.90 sec)
Insert some records in the table using insert command −
mysql> insert into DemoTable values(... | [
{
"code": null,
"e": 1140,
"s": 1062,
"text": "For this, use MAX() along with GROUP BY clause. Let us first create a table −"
},
{
"code": null,
"e": 1290,
"s": 1140,
"text": "mysql> create table DemoTable\n -> (\n -> StudentEmailId varchar(20),\n -> Marks1 int,\n -> Mark... |
Longest Arithmetic Progression | DP-35 | 21 Jun, 2022
Given a set of numbers, find the Length of the Longest Arithmetic Progression (LLAP) in it.
Examples:
set[] = {1, 7, 10, 15, 27, 29}
output = 3
The longest arithmetic progression is {1, 15, 29}
set[] = {5, 10, 15, 20, 25, 30}
output = 6
The whole set is in AP
For simplicity, we have assumed that the giv... | [
{
"code": null,
"e": 54,
"s": 26,
"text": "\n21 Jun, 2022"
},
{
"code": null,
"e": 147,
"s": 54,
"text": "Given a set of numbers, find the Length of the Longest Arithmetic Progression (LLAP) in it. "
},
{
"code": null,
"e": 158,
"s": 147,
"text": "Examples: "
... |
Set the size of background image using CSS ? | 15 Feb, 2019
The background-size property is used to set the background image size using CSS. Use height and width property to set the size of the background image.
Syntax:
background-size: width height;
Note:
If the first value is omitted then the image takes its original width.
If the second value is omitted then the... | [
{
"code": null,
"e": 53,
"s": 25,
"text": "\n15 Feb, 2019"
},
{
"code": null,
"e": 205,
"s": 53,
"text": "The background-size property is used to set the background image size using CSS. Use height and width property to set the size of the background image."
},
{
"code": ... |
Multi-Language support in React Native | 09 Sep, 2021
Multi-Language support in React Native: Internationalization of React Native app helps us to target those users who either don’t speak English or are more comfortable using the app in their local language. We can give options to the users to choose from multiple languages that we will offer in our app.
For... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n09 Sep, 2021"
},
{
"code": null,
"e": 332,
"s": 28,
"text": "Multi-Language support in React Native: Internationalization of React Native app helps us to target those users who either don’t speak English or are more comfortable using th... |
Python MariaDB – Select Query using PyMySQL | 14 Oct, 2020
MariaDB is an open source Database Management System and its predecessor to MySQL. The pymysql client can be used to interact with MariaDB similar to that of MySQL using Python.
In this article we will look into the process of querying data from a table of the database using pymysql. To query data use the... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n14 Oct, 2020"
},
{
"code": null,
"e": 206,
"s": 28,
"text": "MariaDB is an open source Database Management System and its predecessor to MySQL. The pymysql client can be used to interact with MariaDB similar to that of MySQL using Pytho... |
Node.js fs.watchFile() Method | 08 Oct, 2021
The fs.watchFile() method is used to continuously watch for changes on the given file. It has a callback listener that is called every time the file is accessed. It has an optional options parameter that can be used to specify properties like the interval on how often the file has to be polled and whether ... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n08 Oct, 2021"
},
{
"code": null,
"e": 400,
"s": 28,
"text": "The fs.watchFile() method is used to continuously watch for changes on the given file. It has a callback listener that is called every time the file is accessed. It has an opt... |
Double.IsInfinity() Method in C# | 10 Oct, 2021
In C#, Double.IsInfinity() is a Double struct method. This method is used to check whether a specified value evaluates to either positive infinity or negative infinity or not. While performing some mathematical operations, it is possible to obtain a result that is either positive infinity or negative infin... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n10 Oct, 2021"
},
{
"code": null,
"e": 429,
"s": 28,
"text": "In C#, Double.IsInfinity() is a Double struct method. This method is used to check whether a specified value evaluates to either positive infinity or negative infinity or not.... |
Tailwind CSS Border Style | 23 Mar, 2022
This class accepts more than one value in tailwind CSS in which all the properties are covered in class form. It is the alternative to the CSS border-style property. This class is used for controlling the style of an element’s borders.
Border Style Classes:
border-solid
border-dashed
border-dotted
border-d... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n23 Mar, 2022"
},
{
"code": null,
"e": 264,
"s": 28,
"text": "This class accepts more than one value in tailwind CSS in which all the properties are covered in class form. It is the alternative to the CSS border-style property. This clas... |
Scanner nextShort() method in Java with Examples | 19 Nov, 2020
The nextShort(radix) method of java.util.Scanner class scans the next token of the input as a short. If the translation is successful, the scanner advances past the input that matched. If the parameter radix is not passed, then it behaves similarly as nextShort(radix) where the radix is assumed to be the d... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n19 Nov, 2020"
},
{
"code": null,
"e": 350,
"s": 28,
"text": "The nextShort(radix) method of java.util.Scanner class scans the next token of the input as a short. If the translation is successful, the scanner advances past the input that... |
p5.js | scale() Function | 28 May, 2020
The scale() function in p5.js is used to increase or decrease the size of a shape or model by expanding or contracting its vertices. The scale values are specified as decimal percentages, that is, a scale value of “2.0” would increase the dimensions of the shape by 200%. Similarly, a negative of “-2.0” wou... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n28 May, 2020"
},
{
"code": null,
"e": 383,
"s": 28,
"text": "The scale() function in p5.js is used to increase or decrease the size of a shape or model by expanding or contracting its vertices. The scale values are specified as decimal ... |
Write a Program to Find the Maximum Depth or Height of a Tree - GeeksforGeeks | 28 Oct, 2021
Given a binary tree, find height of it. Height of empty tree is -1, height of tree with one node is 0 and height of below tree is 2.
Recursively calculate height of left and right subtrees of a node and assign height to the node as max of the heights of two children plus 1. See below pseudo code and prog... | [
{
"code": null,
"e": 24539,
"s": 24511,
"text": "\n28 Oct, 2021"
},
{
"code": null,
"e": 24674,
"s": 24539,
"text": "Given a binary tree, find height of it. Height of empty tree is -1, height of tree with one node is 0 and height of below tree is 2. "
},
{
"code": null,
... |
What are the differences between json and simplejson Python modules? | json is simplejson, added to the stdlib. But since json was added in 2.6, simplejson has the advantage of working on more Python versions (2.4+).
simplejson is also updated more frequently than Python. Although they are the same, the version included in the stdlib doesn't include the latest optimizations. So if you nee... | [
{
"code": null,
"e": 1208,
"s": 1062,
"text": "json is simplejson, added to the stdlib. But since json was added in 2.6, simplejson has the advantage of working on more Python versions (2.4+)."
},
{
"code": null,
"e": 1463,
"s": 1208,
"text": "simplejson is also updated more freq... |
HTML <font> Tag - GeeksforGeeks | 17 Mar, 2022
The <font> tag in HTML plays an important role in the web page to create an attractive and readable web page. The font tag is used to change the color, size, and style of a text. The base font tag is used to set all the text to the same size, color and face.
Syntax:
<font attribute = "value"> Content </fon... | [
{
"code": null,
"e": 23035,
"s": 23007,
"text": "\n17 Mar, 2022"
},
{
"code": null,
"e": 23294,
"s": 23035,
"text": "The <font> tag in HTML plays an important role in the web page to create an attractive and readable web page. The font tag is used to change the color, size, and s... |
AWS DynamoDB - Working with Items & Attributes - GeeksforGeeks | 31 Mar, 2021
AWS DynamoDB is a NoSQL managed database that stores semi-structured data i.e. key-value and document data. It stores data in form of an item. An item consists of attributes. Upon table creation in DynamoDB, it only requires a primary key to differentiate between items and no schema is to be defined. Each ... | [
{
"code": null,
"e": 25276,
"s": 25248,
"text": "\n31 Mar, 2021"
},
{
"code": null,
"e": 25632,
"s": 25276,
"text": "AWS DynamoDB is a NoSQL managed database that stores semi-structured data i.e. key-value and document data. It stores data in form of an item. An item consists of ... |
How to Access Content of Google Drive in Android? - GeeksforGeeks | 22 Mar, 2021
In certain cases, while uploading files we may require to upload files from our google drive or it may happen that we want to give certain folder access of our google drive to users of our case. Like in the case of providing courses or study material that we have stored in our google drive. Here we going t... | [
{
"code": null,
"e": 26405,
"s": 26377,
"text": "\n22 Mar, 2021"
},
{
"code": null,
"e": 26973,
"s": 26405,
"text": "In certain cases, while uploading files we may require to upload files from our google drive or it may happen that we want to give certain folder access of our goo... |
Download Video in MP3 format using PyTube - GeeksforGeeks | 25 Feb, 2021
YouTube is the world’s most common video sharing site, and you can experience a situation as a hacker where you want to script something to download videos. For this, We present Pytube to you.
Pytube is a lightweight, Python-written library. It does not have third-party dependencies and strives to be extre... | [
{
"code": null,
"e": 25689,
"s": 25661,
"text": "\n25 Feb, 2021"
},
{
"code": null,
"e": 25882,
"s": 25689,
"text": "YouTube is the world’s most common video sharing site, and you can experience a situation as a hacker where you want to script something to download videos. For th... |
List of Dataframes in R - GeeksforGeeks | 01 Jul, 2021
DataFrames are generic data objects of R which are used to store the tabular data. They are two-dimensional, heterogeneous data structures. A list in R, however, comprises of elements, vectors, data frames, variables, or lists that may belong to different data types. In this article, we will study how to c... | [
{
"code": null,
"e": 24536,
"s": 24508,
"text": "\n01 Jul, 2021"
},
{
"code": null,
"e": 25176,
"s": 24536,
"text": "DataFrames are generic data objects of R which are used to store the tabular data. They are two-dimensional, heterogeneous data structures. A list in R, however, c... |
An End-to-End Project on Time Series Analysis and Forecasting with Python | by Susan Li | Towards Data Science | Time series analysis comprises methods for analyzing time series data in order to extract meaningful statistics and other characteristics of the data. Time series forecasting is the use of a model to predict future values based on previously observed values.
Time series are widely used for non-stationary data, like eco... | [
{
"code": null,
"e": 305,
"s": 46,
"text": "Time series analysis comprises methods for analyzing time series data in order to extract meaningful statistics and other characteristics of the data. Time series forecasting is the use of a model to predict future values based on previously observed value... |
BeautifulSoup object - Python Beautifulsoup - GeeksforGeeks | 25 Oct, 2020
BeautifulSoup object is provided by Beautiful Soup which is a web scraping framework for Python. Web scraping is the process of extracting data from the website using automated tools to make the process faster. The BeautifulSoup object represents the parsed document as a whole. For most purposes, you can t... | [
{
"code": null,
"e": 24236,
"s": 24208,
"text": "\n25 Oct, 2020"
},
{
"code": null,
"e": 24568,
"s": 24236,
"text": "BeautifulSoup object is provided by Beautiful Soup which is a web scraping framework for Python. Web scraping is the process of extracting data from the website us... |
Big Data Analytics - Online Learning | Online learning is a subfield of machine learning that allows to scale supervised learning models to massive datasets. The basic idea is that we don’t need to read all the data in memory to fit a model, we only need to read each instance at a time.
In this case, we will show how to implement an online learning algorith... | [
{
"code": null,
"e": 2803,
"s": 2554,
"text": "Online learning is a subfield of machine learning that allows to scale supervised learning models to massive datasets. The basic idea is that we don’t need to read all the data in memory to fit a model, we only need to read each instance at a time."
}... |
Hibernate - Caching | Caching is a mechanism to enhance the performance of a system. It is a buffer memorythat lies between the application and the database. Cache memory stores recently used data items in order to reduce the number of database hits as much as possible.
Caching is important to Hibernate as well. It utilizes a multilevel cac... | [
{
"code": null,
"e": 2312,
"s": 2063,
"text": "Caching is a mechanism to enhance the performance of a system. It is a buffer memorythat lies between the application and the database. Cache memory stores recently used data items in order to reduce the number of database hits as much as possible."
}... |
How to verify a JSON response body using Assertions in Rest Assured? | We can verify the JSON response body using Assertions in Rest Assured. This is done with the help of the Hamcrest Assertion. It uses the Matcher class for Assertion.
To work with Hamcrest we have to add the Hamcrest Core dependency in the pom.xml in our Maven project. The link to this dependency is available in the bel... | [
{
"code": null,
"e": 1228,
"s": 1062,
"text": "We can verify the JSON response body using Assertions in Rest Assured. This is done with the help of the Hamcrest Assertion. It uses the Matcher class for Assertion."
},
{
"code": null,
"e": 1392,
"s": 1228,
"text": "To work with Ham... |
Length of the longest substring with consecutive characters | 28 Jan, 2022
Given string str of lowercase alphabets, the task is to find the length of the longest substring of characters in alphabetical order i.e. string “dfabck” will return 3. Note that the alphabetical order here is considered circular i.e. a, b, c, d, e, ..., x, y, z, a, b, c, ....
Examples:
Input: str = “abc... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n28 Jan, 2022"
},
{
"code": null,
"e": 307,
"s": 28,
"text": "Given string str of lowercase alphabets, the task is to find the length of the longest substring of characters in alphabetical order i.e. string “dfabck” will return 3. Note t... |
mkfs Command in Linux with Examples | 14 Oct, 2020
The mkfs command stands for “make file system” is utilized to make a file system (which is, a system for organizing a hierarchy of directories, subdirectories, and files) on a formatted storage device usually, a partition on a hard disk drive (HDD) or it can also be a USB drive, etc. A partition is logical... | [
{
"code": null,
"e": 54,
"s": 26,
"text": "\n14 Oct, 2020"
},
{
"code": null,
"e": 689,
"s": 54,
"text": "The mkfs command stands for “make file system” is utilized to make a file system (which is, a system for organizing a hierarchy of directories, subdirectories, and files) on ... |
Observer method – Python Design Patterns | 24 May, 2021
The observer method is a Behavioral design Pattern which allows you to define or create a subscription mechanism to send the notification to the multiple objects about any new event that happens to the object that they are observing. The subject is basically observed by multiple objects. The subject needs ... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n24 May, 2021"
},
{
"code": null,
"e": 608,
"s": 28,
"text": "The observer method is a Behavioral design Pattern which allows you to define or create a subscription mechanism to send the notification to the multiple objects about any new... |
Large number arithmetic using doubly linked list | 03 Apr, 2018
Given two very large numbers in form of strings. Your task is to apply different arithmetic operations on these strings.
Prerequisite : Doubly Linked List.
Examples:
Input :
m : 123456789123456789123456789123456789123456789123456789
n : 456789123456789123456789123456789123456789123456789
Output :
Product ... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n03 Apr, 2018"
},
{
"code": null,
"e": 173,
"s": 52,
"text": "Given two very large numbers in form of strings. Your task is to apply different arithmetic operations on these strings."
},
{
"code": null,
"e": 208,
"s": 17... |
initial – Django Form Field Validation | 13 Feb, 2020
Built-in Form Field Validations in Django Forms are the default validations that come predefined to all fields. Every field comes in with some built-in validations from Django validators. Each Field class constructor takes some fixed arguments.
initial is used to change the value of the field in the input ... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n13 Feb, 2020"
},
{
"code": null,
"e": 273,
"s": 28,
"text": "Built-in Form Field Validations in Django Forms are the default validations that come predefined to all fields. Every field comes in with some built-in validations from Django... |
Longest subsequence such that no 3 consecutive characters are same | 20 Dec, 2021
Given a string of lowercase characters S, the task is to find longest subsequence of the string with no 3 consecutive identical characters.Examples:
Input: S = “eedaaad”Output: eedaadExplanation: One occurrence of letter a is deleted.
Input: xxxtxxxOutput: xxtxx
Approach: The task can be solved by checking... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n20 Dec, 2021"
},
{
"code": null,
"e": 177,
"s": 28,
"text": "Given a string of lowercase characters S, the task is to find longest subsequence of the string with no 3 consecutive identical characters.Examples:"
},
{
"code": null... |
MongoDB – Index Types | 21 Jul, 2021
The beauty of a database lies in indexing i.e. fetching the data in a short span of time without iterating over the whole dataset. MongoDB is a NoSQL document type database that follows indexing. Indexes make searching in a collection is easier with the limited number of documents. A binary tree is the dat... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n21 Jul, 2021"
},
{
"code": null,
"e": 655,
"s": 28,
"text": "The beauty of a database lies in indexing i.e. fetching the data in a short span of time without iterating over the whole dataset. MongoDB is a NoSQL document type database th... |
How to read a PGMB format image in C | 29 Oct, 2021
PGM or Portable Gray Map file is a grayscale image where each pixel is encoded with 1 or 2 bytes. It contains header information and pixel grayscale values in a matrix form.
Approach: The idea is followed to read PGMB format image is as follows:
Open a PGMB (binary format PGM image).
Extract the pixel info... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n29 Oct, 2021"
},
{
"code": null,
"e": 226,
"s": 52,
"text": "PGM or Portable Gray Map file is a grayscale image where each pixel is encoded with 1 or 2 bytes. It contains header information and pixel grayscale values in a matrix form."... |
Java Program to Find LCM of Two Numbers | 28 Mar, 2021
LCM (i.e. Least Common Multiple) is the largest of the two stated numbers that can be divided by both the given numbers.
Example:
LCM of 15 and 25 is 75, and LCM of 3 and 7 is 21.
Therefore, firstly find all the prime factors of both the stated numbers, then find the union of all those factors that are pre... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n28 Mar, 2021"
},
{
"code": null,
"e": 149,
"s": 28,
"text": "LCM (i.e. Least Common Multiple) is the largest of the two stated numbers that can be divided by both the given numbers."
},
{
"code": null,
"e": 158,
"s": 149... |
Express.js req.hostname Property | 25 Jan, 2022
The req.hostname property contains the hostname which is derived from the Host HTTP header. It basically returns the hostname which is being supplied in the host HTTP header.Syntax:
req.hostname
Parameter: No parameterReturn Value: StringInstallation of express module:
You can visit the link to Install... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n25 Jan, 2022"
},
{
"code": null,
"e": 212,
"s": 28,
"text": "The req.hostname property contains the hostname which is derived from the Host HTTP header. It basically returns the hostname which is being supplied in the host HTTP header.S... |
How to set caption for an image using HTML ? | 30 Sep, 2020
The <figurecaption> tag in HTML is used to set a caption to the figure element in a document. This tag is new in HTML5.
Syntax:
<figcaption> Figure caption... </figcaption>
Example 1:
HTML
<!DOCTYPE html><html> <head> <style> body { text-align: center; } h1 { ... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n30 Sep, 2020"
},
{
"code": null,
"e": 149,
"s": 28,
"text": "The <figurecaption> tag in HTML is used to set a caption to the figure element in a document. This tag is new in HTML5. "
},
{
"code": null,
"e": 157,
"s": 149... |
Python Program to Print Largest Even and Largest Odd Number in a List | 10 Mar, 2021
Given a list. The task is to print the largest even and largest odd number in a list.
Examples:
Input: 1 3 5 8 6 10
Output:
Largest even number is 10
Largest odd number is 5
Input: 123 234 236 694 809
Output:
Largest odd number is 809
Largest even number is 694
The first approach uses two methods , ... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n10 Mar, 2021"
},
{
"code": null,
"e": 114,
"s": 28,
"text": "Given a list. The task is to print the largest even and largest odd number in a list."
},
{
"code": null,
"e": 124,
"s": 114,
"text": "Examples:"
},
{
... |
Find next right node of a given key | 23 Jun, 2022
Given a Binary tree and a key in the binary tree, find the node right to the given key. If there is no node on right side, then return NULL. Expected time complexity is O(n) where n is the number of nodes in the given binary tree.
For example, consider the following Binary Tree. Output for 2 is 6, output f... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n23 Jun, 2022"
},
{
"code": null,
"e": 283,
"s": 52,
"text": "Given a Binary tree and a key in the binary tree, find the node right to the given key. If there is no node on right side, then return NULL. Expected time complexity is O(n) ... |
Reverse the rows and columns of a matrix alternatively | 31 Dec, 2021
Given a matrix arr[][] of size M*N, where M is the number of rows and N is the number of columns. The task is to reverse the rows and columns of the matrix alternatively i.e start with reversing the 1st row, then the 2nd column, and so on.
Examples:
Input: arr[][] = { {3, 4, 1, 8}, {11, 23, 43,... | [
{
"code": null,
"e": 54,
"s": 26,
"text": "\n31 Dec, 2021"
},
{
"code": null,
"e": 294,
"s": 54,
"text": "Given a matrix arr[][] of size M*N, where M is the number of rows and N is the number of columns. The task is to reverse the rows and columns of the matrix alternatively i.e ... |
GATE-CS-2014-(Set-3) - GeeksforGeeks | 19 Oct, 2021
Given series is 2,5,10,17,26,37,50,64.
Here total number of terms are 8..i.e. A(1) to A(8).
For the 1st 7 terms, you can observe the relationship
between the terms which is
A(n) = [ A(n-1) - {A(n-1) + A(n-2)} + 2 ] where n >= 3
Now for the 8th term i.e. A(8), this relationship violates.
According to t... | [
{
"code": null,
"e": 29577,
"s": 29549,
"text": "\n19 Oct, 2021"
},
{
"code": null,
"e": 30049,
"s": 29577,
"text": "Given series is 2,5,10,17,26,37,50,64.\n\nHere total number of terms are 8..i.e. A(1) to A(8).\n\nFor the 1st 7 terms, you can observe the relationship \nbetween t... |
CSS | Links | 19 Jan, 2022
Link is a connection from one web page to another web pages. CSS property can be used to style the links in various different ways.States of Link: Before discussing CSS properties, it is important to know the states of a link. Links can exist in different states and they can be styled using pseudo classes.... | [
{
"code": null,
"e": 54,
"s": 26,
"text": "\n19 Jan, 2022"
},
{
"code": null,
"e": 407,
"s": 54,
"text": "Link is a connection from one web page to another web pages. CSS property can be used to style the links in various different ways.States of Link: Before discussing CSS prope... |
Introduction to Sockets.IO in Node.js | 14 Oct, 2021
Sockets.IO :
Earlier, websites used to reload every-time a resource was requested. This introduced unnecessary delays which increased average wait time. Often users had to wait for minutes to fetch a particular page or file. Real-time applications(Instant messenger, Online gaming, push notification etc), o... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n14 Oct, 2021"
},
{
"code": null,
"e": 41,
"s": 28,
"text": "Sockets.IO :"
},
{
"code": null,
"e": 701,
"s": 41,
"text": "Earlier, websites used to reload every-time a resource was requested. This introduced unnecessa... |
How to create a modal image gallery with CSS and JavaScript? | Following is the code to create modal image gallery with CSS and JavaScript −
Live Demo
<!DOCTYPE html>
<html>
<head<
<meta name="viewport" content="width=device-width, initial-scale=1" /<
<style>
* {
box-sizing: border-box;
}
h1 {
text-align: center;
}
.ImgThumbnail {
border-radius: 5px;
cursor: pointer;
... | [
{
"code": null,
"e": 1265,
"s": 1187,
"text": "Following is the code to create modal image gallery with CSS and JavaScript −"
},
{
"code": null,
"e": 1276,
"s": 1265,
"text": " Live Demo"
},
{
"code": null,
"e": 3405,
"s": 1276,
"text": "<!DOCTYPE html>\n<html... |
Sum of all Primes in a given range using Sieve of Eratosthenes | 10 Jun, 2022
Given a range [L, R]. The task is to find the sum of all the prime numbers in the given range from L to R both inclusive.Examples:
Input : L = 10, R = 20
Output : Sum = 60
Prime numbers between [10, 20] are:
11, 13, 17, 19
Therefore, sum = 11 + 13 + 17 + 19 = 60
Input : L = 15, R = 25
Output : Sum = 59
... | [
{
"code": null,
"e": 53,
"s": 25,
"text": "\n10 Jun, 2022"
},
{
"code": null,
"e": 186,
"s": 53,
"text": "Given a range [L, R]. The task is to find the sum of all the prime numbers in the given range from L to R both inclusive.Examples: "
},
{
"code": null,
"e": 360,... |
Exponential Search | 14 Jun, 2022
The name of this searching algorithm may be misleading as it works in O(Log n) time. The name comes from the way it searches an element.
Given a sorted array, and an element x to be
searched, find position of x in the array.
Input: arr[] = {10, 20, 40, 45, 55}
x = 45
Output: Element found at ind... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n14 Jun, 2022"
},
{
"code": null,
"e": 189,
"s": 52,
"text": "The name of this searching algorithm may be misleading as it works in O(Log n) time. The name comes from the way it searches an element."
},
{
"code": null,
"e": ... |
Send email using Java Program | 31 Aug, 2021
Sending Email is a basic requirement regardless of which platform you are working on like JAVA, JavaEE, Python etc. Sending Email may be required to send error alerts or confirmation of registration or signup. Java provides the facility to send emails by writing java programs.To send emails using Java, you... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n31 Aug, 2021"
},
{
"code": null,
"e": 381,
"s": 52,
"text": "Sending Email is a basic requirement regardless of which platform you are working on like JAVA, JavaEE, Python etc. Sending Email may be required to send error alerts or conf... |
Maximize array sum after K negations | Set 2 | 07 Jul, 2021
Given an array of size n and a number k. We must modify array K number of times. Here modify array means in each operation we can replace any array element arr[i] by -arr[i]. We need to perform this operation in such a way that after K operations, sum of array must be maximum?
Examples:
Input : arr[] = {-... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n07 Jul, 2021"
},
{
"code": null,
"e": 330,
"s": 52,
"text": "Given an array of size n and a number k. We must modify array K number of times. Here modify array means in each operation we can replace any array element arr[i] by -arr[i].... |
Gaussian Mixture Model | 18 Nov, 2021
Suppose there are set of data points that need to be grouped into several parts or clusters based on their similarity. In machine learning, this is known as Clustering.There are several methods available for clustering like:
K Means Clustering
Hierarchical Clustering
Gaussian Mixture Models
In this artic... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n18 Nov, 2021"
},
{
"code": null,
"e": 279,
"s": 52,
"text": "Suppose there are set of data points that need to be grouped into several parts or clusters based on their similarity. In machine learning, this is known as Clustering.There ... |
Java Program to set the Font and Color of some text in a JTextPane using Styles | Let’s say the following is our JTextPane −
JTextPane textPane = new JTextPane();
Now, set the font style for some of the text −
SimpleAttributeSet attributeSet = new SimpleAttributeSet();
StyleConstants.setItalic(attributeSet, true);
textPane.setCharacterAttributes(attributeSet, true);
textPane.setText("Learn with Text... | [
{
"code": null,
"e": 1105,
"s": 1062,
"text": "Let’s say the following is our JTextPane −"
},
{
"code": null,
"e": 1143,
"s": 1105,
"text": "JTextPane textPane = new JTextPane();"
},
{
"code": null,
"e": 1190,
"s": 1143,
"text": "Now, set the font style for so... |
VBA - Do-While Loops | A Do...While loop is used when we want to repeat a set of statements as long as the condition is true. The condition may be checked at the beginning of the loop or at the end of the loop.
Following is the syntax of a Do...While loop in VBA.
Do While condition
[statement 1]
[statement 2]
...
[statement n]
... | [
{
"code": null,
"e": 2123,
"s": 1935,
"text": "A Do...While loop is used when we want to repeat a set of statements as long as the condition is true. The condition may be checked at the beginning of the loop or at the end of the loop."
},
{
"code": null,
"e": 2176,
"s": 2123,
"te... |
Inheritance in Python | In this article, we will learn inheritance and extending classes in Python 3.x. Or earlier.
Inheritance represents real-world relationships well, provides reusability & supports transitivity. It offers faster development time, easier maintenance and easy to extend.
Inheritance is broadly categorized into 5 types −
Sing... | [
{
"code": null,
"e": 1154,
"s": 1062,
"text": "In this article, we will learn inheritance and extending classes in Python 3.x. Or earlier."
},
{
"code": null,
"e": 1328,
"s": 1154,
"text": "Inheritance represents real-world relationships well, provides reusability & supports tran... |
A Complete Guide to User Input in Python | by Chaitanya Baweja | Towards Data Science | User input is critical for building interactive programs. Every programming language has its unique implementation of an input interface. C++ has scanf, Java has the Scanner class, and Ruby has gets.
While in most cases, this input stems from the keyboard, other forms like mouse clicks, track-pad, sensors, etc. are als... | [
{
"code": null,
"e": 372,
"s": 172,
"text": "User input is critical for building interactive programs. Every programming language has its unique implementation of an input interface. C++ has scanf, Java has the Scanner class, and Ruby has gets."
},
{
"code": null,
"e": 504,
"s": 372,... |
Building a k-NN Similarity Search Engine using Amazon Elasticsearch and SageMaker | by Yi Ai | Towards Data Science | Amazon Elasticsearch Service recently added support for k-nearest neighbor search. It enables you to run high scale and low latency k-NN search across thousands of dimensions with the same ease as running any regular Elasticsearch query.
k-NN similarity search is powered by Open Distro for Elasticsearch, an Apache 2.0-... | [
{
"code": null,
"e": 410,
"s": 172,
"text": "Amazon Elasticsearch Service recently added support for k-nearest neighbor search. It enables you to run high scale and low latency k-NN search across thousands of dimensions with the same ease as running any regular Elasticsearch query."
},
{
"co... |
How to use drag and drop in HTML5? | Drag and Drop (DnD) is powerful user interface concept which makes it easy to copy, reorder and deletion of items with the help of mouse clicks. This allows the user to click and hold the mouse button down over an element, drag it to another location, and release the mouse button to drop the element there.
To achieve d... | [
{
"code": null,
"e": 1370,
"s": 1062,
"text": "Drag and Drop (DnD) is powerful user interface concept which makes it easy to copy, reorder and deletion of items with the help of mouse clicks. This allows the user to click and hold the mouse button down over an element, drag it to another location, a... |
Find the longest substring with k unique characters in a given string in Python | Suppose we have a string we have to return the longest possible substring that has exactly k number of unique characters, if there are more than one substring of longest possible length, return any of them.
So, if the input is like s = "ppqprqtqtqt", k = 3, then the output will be rqtqtqt as that has length 7.
To solve... | [
{
"code": null,
"e": 1269,
"s": 1062,
"text": "Suppose we have a string we have to return the longest possible substring that has exactly k number of unique characters, if there are more than one substring of longest possible length, return any of them."
},
{
"code": null,
"e": 1374,
... |
Google Charts - Stacked Area Chart | Following is an example of a stacked area chart. We've already seen the configuration used to draw this chart in Google Charts Configuration Syntax chapter. So, let's see the complete example.
We've used isStacked configuration to show stacked chart.
// Set chart options
var options = {
isStacked: true
};
googlechar... | [
{
"code": null,
"e": 2454,
"s": 2261,
"text": "Following is an example of a stacked area chart. We've already seen the configuration used to draw this chart in Google Charts Configuration Syntax chapter. So, let's see the complete example."
},
{
"code": null,
"e": 2512,
"s": 2454,
... |
How to filter a RecyclerView with a SearchView on Android? | This example demonstrates how to filter a RecyclerView with a SearchView on Android.
Step 1 − Create a new project in Android Studio, go to File ⇒ New Project and fill all required details to create a new project.
Step 2 − Add the following code to res/layout/activity_main.xml.
<?xml version="1.0" encoding="utf-8"?>
<a... | [
{
"code": null,
"e": 1147,
"s": 1062,
"text": "This example demonstrates how to filter a RecyclerView with a SearchView on Android."
},
{
"code": null,
"e": 1276,
"s": 1147,
"text": "Step 1 − Create a new project in Android Studio, go to File ⇒ New Project and fill all required d... |
Substring in C# | Substring is used to get the sub-parts of a string in C#. We have the substring() method for this purpose. Use the substring() method in C# to check each and every substring for unique characters. Loop it until the length of the string.
If anyone the substring matches another, then it would mean that the string does no... | [
{
"code": null,
"e": 1299,
"s": 1062,
"text": "Substring is used to get the sub-parts of a string in C#. We have the substring() method for this purpose. Use the substring() method in C# to check each and every substring for unique characters. Loop it until the length of the string."
},
{
"c... |
R - Pareto Chart - GeeksforGeeks | 10 May, 2020
Pareto chart is a combination of a bar chart and a line chart used for visualization.In Pareto charts, the right vertical axis is used for cumulative frequency while the left vertical axis represents frequency. They basically use the Pareto principle which says that 80% of effects are produced from 20% of ... | [
{
"code": null,
"e": 24193,
"s": 24165,
"text": "\n10 May, 2020"
},
{
"code": null,
"e": 24519,
"s": 24193,
"text": "Pareto chart is a combination of a bar chart and a line chart used for visualization.In Pareto charts, the right vertical axis is used for cumulative frequency whi... |
Design Patterns - Mediator Pattern | Mediator pattern is used to reduce communication complexity between multiple objects or classes. This pattern provides a mediator class which normally handles all the communications between different classes and supports easy maintenance of the code by loose coupling. Mediator pattern falls under behavioral pattern cat... | [
{
"code": null,
"e": 3078,
"s": 2751,
"text": "Mediator pattern is used to reduce communication complexity between multiple objects or classes. This pattern provides a mediator class which normally handles all the communications between different classes and supports easy maintenance of the code by ... |
Python 3 - Environment Setup | Python 3 is available for Windows, Mac OS and most of the flavors of Linux operating system. Even though Python 2 is available for many other OSs, Python 3 support either has not been made available for them or has been dropped.
Open a terminal window and type "python" to find out if it is already installed and which v... | [
{
"code": null,
"e": 2569,
"s": 2340,
"text": "Python 3 is available for Windows, Mac OS and most of the flavors of Linux operating system. Even though Python 2 is available for many other OSs, Python 3 support either has not been made available for them or has been dropped."
},
{
"code": nu... |
Matplotlib.pyplot.text() function in Python - GeeksforGeeks | 25 Nov, 2020
This function is used to add a text to the axes at location x, y in data coordinates.
Syntax: matplotlib.pyplot.text(x, y, s, fontdict=None, **kwargs)
Example #1: Text on plot sheet
Python3
import matplotlib.pyplot matplotlib.pyplot.text(0.5, 0.5, "Hello World!")matplotlib.pyplot.savefig("out.png")
Output... | [
{
"code": null,
"e": 24996,
"s": 24968,
"text": "\n25 Nov, 2020"
},
{
"code": null,
"e": 25082,
"s": 24996,
"text": "This function is used to add a text to the axes at location x, y in data coordinates."
},
{
"code": null,
"e": 25147,
"s": 25082,
"text": "Synt... |
BeautifulSoup - Parsing only section of a document - GeeksforGeeks | 16 Mar, 2021
BeautifulSoup is a Python Module used to find specific website contents/tags from a scraped website which can be scraped by any module like requests or scrapy. Remember BeautifulSoup doesn’t scrape a website but processes and displays the scraped contents by other modules in a readable form. So, to underst... | [
{
"code": null,
"e": 25647,
"s": 25619,
"text": "\n16 Mar, 2021"
},
{
"code": null,
"e": 26034,
"s": 25647,
"text": "BeautifulSoup is a Python Module used to find specific website contents/tags from a scraped website which can be scraped by any module like requests or scrapy. Rem... |
Python | Decimal compare() method - GeeksforGeeks | 05 Sep, 2019
Decimal#compare() : compare() is a Decimal class method which compares the two Decimal values.
Syntax: Decimal.compare()
Parameter: Decimal values
Return:1 – if a > b-1 – if a < b0 – if a = b
Code #1 : Example for compare() method
# Python Program explaining # compare() method # loading decimal libraryfro... | [
{
"code": null,
"e": 25693,
"s": 25665,
"text": "\n05 Sep, 2019"
},
{
"code": null,
"e": 25788,
"s": 25693,
"text": "Decimal#compare() : compare() is a Decimal class method which compares the two Decimal values."
},
{
"code": null,
"e": 25814,
"s": 25788,
"tex... |
Data Analysis for Cyber Security 101: Detecting Lateral Movement | by Pepe Berba | Towards Data Science | This is the second part of a series of blog posts. You can read the first one on Data Exfiltration.
This blog post is structured as follows:
Introduction Lateral Movement (4 mins): a toy example to illustrate what lateral movement isNetwork Anomaly Detection (7 mins): Statistical and machine learning techniques to dete... | [
{
"code": null,
"e": 272,
"s": 172,
"text": "This is the second part of a series of blog posts. You can read the first one on Data Exfiltration."
},
{
"code": null,
"e": 313,
"s": 272,
"text": "This blog post is structured as follows:"
},
{
"code": null,
"e": 867,
... |
Swapping two column values in MySQL? | To swap two columns, we can apply the below swapping logic.
Add both values and store them into the first column
Add both values and store them into the first column
Subtract the first column’s value from the second and store it into the second column.
Subtract the first column’s value from the second and store it int... | [
{
"code": null,
"e": 1122,
"s": 1062,
"text": "To swap two columns, we can apply the below swapping logic."
},
{
"code": null,
"e": 1175,
"s": 1122,
"text": "Add both values and store them into the first column"
},
{
"code": null,
"e": 1228,
"s": 1175,
"text":... |
C# Program to find whether the Number is Divisible by 2 | If the remainder of the number when it is divided by 2 is 0, then it would be divisible by 2.
Let’s say our number is 5, we will check it using the following if-else −
// checking if the number is divisible by 2 or not
if (num % 2 == 0) {
Console.WriteLine("Divisible by 2 ");
} else {
Console.WriteLine("Not divis... | [
{
"code": null,
"e": 1156,
"s": 1062,
"text": "If the remainder of the number when it is divided by 2 is 0, then it would be divisible by 2."
},
{
"code": null,
"e": 1230,
"s": 1156,
"text": "Let’s say our number is 5, we will check it using the following if-else −"
},
{
... |
C program to find sum of digits of a five digit number | Suppose we have a five-digit number num. We shall have to find the sum of its digits. To do this we shall take out digits from right to left. Each time divide the number by 10 and the remainder will be the last digit and then update the number by its quotient (integer part only) and finally the number will be reduced t... | [
{
"code": null,
"e": 1452,
"s": 1062,
"text": "Suppose we have a five-digit number num. We shall have to find the sum of its digits. To do this we shall take out digits from right to left. Each time divide the number by 10 and the remainder will be the last digit and then update the number by its qu... |
NLP | Chunking Rules | 29 Jul, 2021
Below are the steps involved for Chunking –
Conversion of sentence to a flat tree.
Creation of Chunk string using this tree.
Creation of RegexpChunkParser by parsing the grammar using RegexpParser.
Applying the created chunk rule to the ChunkString that matches the sentence into a chunk.
Splitting ... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n29 Jul, 2021"
},
{
"code": null,
"e": 98,
"s": 52,
"text": "Below are the steps involved for Chunking – "
},
{
"code": null,
"e": 139,
"s": 98,
"text": "Conversion of sentence to a flat tree. "
},
{
"code"... |
Compound assignment operators in Java | 23 Sep, 2017
Compound-assignment operators provide a shorter syntax for assigning the result of an arithmetic or bitwise operator. They perform the operation on the two operands before assigning the result to the first operand.The following are all possible assignment operator in java:
1. += (compound addition assig... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n23 Sep, 2017"
},
{
"code": null,
"e": 326,
"s": 52,
"text": "Compound-assignment operators provide a shorter syntax for assigning the result of an arithmetic or bitwise operator. They perform the operation on the two operands before as... |
Calculate XOR from 1 to n. | 24 Jun, 2022
Given a number n, the task is to find the XOR from 1 to n. Examples :
Input : n = 6
Output : 7
// 1 ^ 2 ^ 3 ^ 4 ^ 5 ^ 6 = 7
Input : n = 7
Output : 0
// 1 ^ 2 ^ 3 ^ 4 ^ 5 ^ 6 ^ 7 = 0
Method 1 (Naive Approach): 1- Initialize the result as 0. 1- Traverse all numbers from 1 to n. 2- Do XOR of numbers one ... | [
{
"code": null,
"e": 54,
"s": 26,
"text": "\n24 Jun, 2022"
},
{
"code": null,
"e": 125,
"s": 54,
"text": "Given a number n, the task is to find the XOR from 1 to n. Examples : "
},
{
"code": null,
"e": 239,
"s": 125,
"text": "Input : n = 6\nOutput : 7\n// 1 ^ ... |
How to check the input date is equal to today’s date or not using JavaScript ? | 29 Jan, 2020
Given a date object and the task is to determine whether the given date is the same as today’s date or not with the help of JavaScript. There are two well-famous approaches are discussed here.
Approach 1: Get the input date from user (var inpDate) and the today’s date by new Date(). Now, use .setHours() me... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n29 Jan, 2020"
},
{
"code": null,
"e": 221,
"s": 28,
"text": "Given a date object and the task is to determine whether the given date is the same as today’s date or not with the help of JavaScript. There are two well-famous approaches ar... |
Java Swing | JProgressBar | 14 Apr, 2021
JProgressBar is a part of Java Swing package. JProgressBar visually displays the progress of some specified task. JProgressBar shows the percentage of completion of specified task.The progress bar fills up as the task reaches it completion. In addition to show the percentage of completion of task, it can a... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n14 Apr, 2021"
},
{
"code": null,
"e": 415,
"s": 52,
"text": "JProgressBar is a part of Java Swing package. JProgressBar visually displays the progress of some specified task. JProgressBar shows the percentage of completion of specified... |
Mandelbrot Fractal Set visualization in Python | 03 Oct, 2018
Fractal:A fractal is a curve or geometrical figure, each part of which has the same statistical character as the whole. They are useful in modeling structures (such as snowflakes) in which similar patterns recur at progressively smaller scales, and in describing partly random or chaotic phenomena such as c... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n03 Oct, 2018"
},
{
"code": null,
"e": 371,
"s": 28,
"text": "Fractal:A fractal is a curve or geometrical figure, each part of which has the same statistical character as the whole. They are useful in modeling structures (such as snowfla... |
PyTorch – How to normalize an image with mean and standard deviation? | The Normalize() transform normalizes an image with mean and standard deviation. The torchvision.transforms module provides many important transforms that can be used to perform different types of manipulations on the image data.
Normalize() accepts only tensor images of any size. A tensor image is a torch tensor. A ten... | [
{
"code": null,
"e": 1416,
"s": 1187,
"text": "The Normalize() transform normalizes an image with mean and standard deviation. The torchvision.transforms module provides many important transforms that can be used to perform different types of manipulations on the image data."
},
{
"code": nu... |
HTML | <td> align Attribute | 31 Dec, 2021
The HTML <td> align attribute is used to set the horizontal alignment of text content. It is not supported by HTML 5.
Syntax:
<td align ="left | right | center | justify | char">
Attribute Values:
left: It sets the text left-align.
right: It sets the text right-align.
center: It sets the text center-align.... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n31 Dec, 2021"
},
{
"code": null,
"e": 146,
"s": 28,
"text": "The HTML <td> align attribute is used to set the horizontal alignment of text content. It is not supported by HTML 5."
},
{
"code": null,
"e": 154,
"s": 146,
... |
JavaScript | RegExp \W Metacharacter | 22 Apr, 2019
The RegExp \W Metacharacter in JavaScript is used to find the non word character i.e. characters which are not from a to z, A to Z, 0 to 9. It is same as [^a-zA-Z0-9].
Syntax:
/\W/
or
new RegExp("\\W")
Syntax with modifiers:
/\W/g
or
new RegExp("\\W", "g")
Example 1: This example searches the non words c... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n22 Apr, 2019"
},
{
"code": null,
"e": 196,
"s": 28,
"text": "The RegExp \\W Metacharacter in JavaScript is used to find the non word character i.e. characters which are not from a to z, A to Z, 0 to 9. It is same as [^a-zA-Z0-9]."
},
... |
Statistical Functions in Python | Set 1 (Averages and Measure of Central Location) | 10 Feb, 2020
Python has the ability to manipulate some statistical data and calculate results of various statistical operations using the file “statistics“, useful in domain of mathematics.
Important Average and measure of central location functions :
1. mean() :- This function returns the mean or average of the data p... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n10 Feb, 2020"
},
{
"code": null,
"e": 229,
"s": 52,
"text": "Python has the ability to manipulate some statistical data and calculate results of various statistical operations using the file “statistics“, useful in domain of mathematic... |
How to Use Go with MySQL? - GeeksforGeeks | 04 Sep, 2021
MySQL is an open-source relational database management system based on Structured Query Language(SQL). It is a relational database that organizes data into one or more tables in which data are related to each other.
Database Driver: A Database Driver implements a protocol for a database connection. The Dri... | [
{
"code": null,
"e": 24069,
"s": 24041,
"text": "\n04 Sep, 2021"
},
{
"code": null,
"e": 24285,
"s": 24069,
"text": "MySQL is an open-source relational database management system based on Structured Query Language(SQL). It is a relational database that organizes data into one or ... |
\boxed - Tex Command | \boxed - Used to draw a box around argument; argument is in math mode.
{ \boxed #1 }
\boxed command draws a box around argument; argument is in math mode.
\boxed ab
ab
\boxed{ab}
ab
\boxed{ab\strut}
ab
\boxed{\text{boxed text}}
boxed text
\boxed ab
ab
\boxed ab
\boxed{ab}
ab
\boxed{ab}
\boxe... | [
{
"code": null,
"e": 8057,
"s": 7986,
"text": "\\boxed - Used to draw a box around argument; argument is in math mode."
},
{
"code": null,
"e": 8071,
"s": 8057,
"text": "{ \\boxed #1 }"
},
{
"code": null,
"e": 8141,
"s": 8071,
"text": "\\boxed command draws a ... |
Determine the count of Leaf nodes in an N-ary tree - GeeksforGeeks | 13 Apr, 2021
Given the value of ‘N’ and ‘I’. Here, represents the number of internal nodes present in an N-ary tree and every node of the N-ary can either have childs or zero child. The task is to determine the number of Leaf nodes in n-ary tree.
Examples:
Input : N = 3, I = 5 Output : Leaf nodes = 11
Input : N = 1... | [
{
"code": null,
"e": 24632,
"s": 24604,
"text": "\n13 Apr, 2021"
},
{
"code": null,
"e": 24866,
"s": 24632,
"text": "Given the value of ‘N’ and ‘I’. Here, represents the number of internal nodes present in an N-ary tree and every node of the N-ary can either have childs or zero c... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.