title
stringlengths
3
221
text
stringlengths
17
477k
parsed
listlengths
0
3.17k
C Program for Number of elements with odd factors in given range - GeeksforGeeks
05 Dec, 2018 Given a range [n, m], find the number of elements that have odd number of factors in the given range (n and m inclusive). Examples: Input : n = 5, m = 100 Output : 8 The numbers with odd factors are 9, 16, 25, 36, 49, 64, 81 and 100 Input : n = 8, m = 65 Output : 6 Input : n = 10, m = 23500 Output : ...
[ { "code": null, "e": 24930, "s": 24902, "text": "\n05 Dec, 2018" }, { "code": null, "e": 25052, "s": 24930, "text": "Given a range [n, m], find the number of elements that have odd number of factors in the given range (n and m inclusive)." }, { "code": null, "e": 2506...
Python | math.floor() function - GeeksforGeeks
11 Mar, 2019 In Python, math module contains a number of mathematical operations, which can be performed with ease using the module. math.floor() function returns the largest integer not greater than x. If number is already integer, same number is returned. Syntax: math.floor(x) Parameter: x: This is a numeric express...
[ { "code": null, "e": 24292, "s": 24264, "text": "\n11 Mar, 2019" }, { "code": null, "e": 24537, "s": 24292, "text": "In Python, math module contains a number of mathematical operations, which can be performed with ease using the module. math.floor() function returns the largest i...
VueJS - Binding
In this chapter will learn how to manipulate or assign values to HTML attributes, change the style, and assign classes with the help of binding directive called v-bind available with VueJS. Let’s consider an example to understand why we need and when to use v-bind directive for data binding. <html> <head> <tit...
[ { "code": null, "e": 2126, "s": 1936, "text": "In this chapter will learn how to manipulate or assign values to HTML attributes, change the style, and assign classes with the help of binding directive called v-bind available with VueJS." }, { "code": null, "e": 2229, "s": 2126, "...
Tryit Editor v3.7
Tryit: Keep getting coordinates when you move
[]
3 Different ways to print Fibonacci series in Java - GeeksforGeeks
19 Jul, 2020 Given a number N, we need to find the Fibonacci Series up to the N term. The Fibonacci series is a series of elements where, the previous two elements are added to get the next element, starting with 0 and 1. Examples: Input: N = 10 Output: 0 1 1 2 3 5 8 13 21 34 Here first term of Fibonacci is 0 and sec...
[ { "code": null, "e": 24221, "s": 24193, "text": "\n19 Jul, 2020" }, { "code": null, "e": 24294, "s": 24221, "text": "Given a number N, we need to find the Fibonacci Series up to the N term." }, { "code": null, "e": 24431, "s": 24294, "text": "The Fibonacci ser...
Python program to print rangoli pattern using alphabets
Suppose we have a number n. We have to create alphabet rangoli of n x n size. n must be within 1 and 26 and it will start from a and end at z when n is 26. So, if the input is like 5, then the output will be --------e-------- ------e-d-e------ ----e-d-c-d-e---- --e-d-c-b-c-d-e-- e-d-c-b-a-b-c-d-e --e-d-c-b-c-d-e-- ----...
[ { "code": null, "e": 1218, "s": 1062, "text": "Suppose we have a number n. We have to create alphabet rangoli of n x n size. n must be within 1 and 26 and it will start from a and end at z when n is 26." }, { "code": null, "e": 1270, "s": 1218, "text": "So, if the input is like 5...
Python : __delete__ vs __del__
27 Dec, 2019 Both __delete__ and __del__ are dunder or magic methods in Python. Dunder or magic methods in Python are the methods having two prefix and suffix underscores in the method name. Dunder here means “Double Under (Underscores)”. These are commonly used for operator overloading. __del__ is a destructor method ...
[ { "code": null, "e": 28, "s": 0, "text": "\n27 Dec, 2019" }, { "code": null, "e": 304, "s": 28, "text": "Both __delete__ and __del__ are dunder or magic methods in Python. Dunder or magic methods in Python are the methods having two prefix and suffix underscores in the method nam...
Lodash _.keyBy() Method
07 Sep, 2020 Lodash is a JavaScript library that works on the top of underscore.js. Lodash helps in working with arrays, collection, strings, objects, numbers etc. The _.keyBy() method creates an object that composed of keys generated from the results of running an each element of collection through iteratee. Correspon...
[ { "code": null, "e": 28, "s": 0, "text": "\n07 Sep, 2020" }, { "code": null, "e": 179, "s": 28, "text": "Lodash is a JavaScript library that works on the top of underscore.js. Lodash helps in working with arrays, collection, strings, objects, numbers etc." }, { "code": nu...
Representation of Boolean Functions
15 Jun, 2022 A Boolean function is described by an algebraic expression consisting of binary variables, the constants 0 and 1, and the logic operation symbols For a given set of values of the binary variables involved, the boolean function can have a value of 0 or 1. For example, the boolean function is defined in ter...
[ { "code": null, "e": 52, "s": 24, "text": "\n15 Jun, 2022" }, { "code": null, "e": 919, "s": 52, "text": "A Boolean function is described by an algebraic expression consisting of binary variables, the constants 0 and 1, and the logic operation symbols For a given set of values of...
Pandas – GroupBy One Column and Get Mean, Min, and Max values
25 Aug, 2020 We can use Groupby function to split dataframe into groups and apply different operations on it. One of them is Aggregation. Aggregation i.e. computing statistical parameters for each group created example – mean, min, max, or sums. Let’s have a look at how we can group a dataframe by one column and get th...
[ { "code": null, "e": 28, "s": 0, "text": "\n25 Aug, 2020" }, { "code": null, "e": 261, "s": 28, "text": "We can use Groupby function to split dataframe into groups and apply different operations on it. One of them is Aggregation. Aggregation i.e. computing statistical parameters ...
Count of n digit numbers whose sum of digits equals to given sum
25 Jun, 2021 Given two integers ‘n’ and ‘sum’, find count of all n digit numbers with sum of digits as ‘sum’. Leading 0’s are not counted as digits. 1 <= n <= 100 and 1 <= sum <= 500 Example: Input: n = 2, sum = 2 Output: 2 Explanation: Numbers are 11 and 20 Input: n = 2, sum = 5 Output: 5 Explanation: Numbers are ...
[ { "code": null, "e": 54, "s": 26, "text": "\n25 Jun, 2021" }, { "code": null, "e": 224, "s": 54, "text": "Given two integers ‘n’ and ‘sum’, find count of all n digit numbers with sum of digits as ‘sum’. Leading 0’s are not counted as digits. 1 <= n <= 100 and 1 <= sum <= 500" }...
Opening | Morphological Transformations in OpenCV in C++
10 Feb, 2021 In this article, a Morphological operation called Opening is discussed. Opening operation is similar to erosion in the sense that it also removes foreground pixels from the edges of the image. Opening operation is erosion operation followed by dilation. It is usually used for removing internal noise presen...
[ { "code": null, "e": 28, "s": 0, "text": "\n10 Feb, 2021" }, { "code": null, "e": 100, "s": 28, "text": "In this article, a Morphological operation called Opening is discussed." }, { "code": null, "e": 536, "s": 100, "text": "Opening operation is similar to er...
Python - Tkinter Menubutton
A menubutton is the part of a drop-down menu that stays on the screen all the time. Every menubutton is associated with a Menu widget that can display the choices for that menubutton when the user clicks on it. Here is the simple syntax to create this widget − w = Menubutton ( master, option, ... ) master − This repre...
[ { "code": null, "e": 2589, "s": 2378, "text": "A menubutton is the part of a drop-down menu that stays on the screen all the time. Every menubutton is associated with a Menu widget that can display the choices for that menubutton when the user clicks on it." }, { "code": null, "e": 2639,...
Java.lang.String.replace() in Java
03 Oct, 2021 This method searches for a specified string or a specified value, or a regex expression by virtue of which has the same suggests returns a new string with related characters. replace() method of strings contains three variants here are three variants of replace() method. There are 3 types that are frequent...
[ { "code": null, "e": 52, "s": 24, "text": "\n03 Oct, 2021" }, { "code": null, "e": 324, "s": 52, "text": "This method searches for a specified string or a specified value, or a regex expression by virtue of which has the same suggests returns a new string with related characters....
Python | Find all triplets in a list with given sum
30 Jul, 2019 Given a list of integers, write a Python program to find all triplets that sum up to given integer ‘k’. Examples: Input : [1, 2, 3, 4, 5, 6, 7, 8, 9, 10], k = 10 Output : [(1, 5, 4), (1, 6, 3), (1, 7, 2), (2, 5, 3)] Input : [12, 3, 6, 1, 6, 9], k = 24 Output : [(12, 6, 6), (12, 9, 3)] Approach #1 : Naive...
[ { "code": null, "e": 54, "s": 26, "text": "\n30 Jul, 2019" }, { "code": null, "e": 158, "s": 54, "text": "Given a list of integers, write a Python program to find all triplets that sum up to given integer ‘k’." }, { "code": null, "e": 168, "s": 158, "text": "E...
What are the differences between get() and navigate() method?
The differences between get() and navigate() methods are listed below. With get(). import org.openqa.selenium.By; import org.openqa.selenium.Keys; import org.openqa.selenium.WebDriver; import org.openqa.selenium.WebElement; import org.openqa.selenium.chrome.ChromeDriver; import java.util.concurrent.TimeUnit; import jav...
[ { "code": null, "e": 1258, "s": 1187, "text": "The differences between get() and navigate() methods are listed below." }, { "code": null, "e": 1270, "s": 1258, "text": "With get()." }, { "code": null, "e": 1928, "s": 1270, "text": "import org.openqa.selenium.B...
Python math function | copysign()
01 Jan, 2019 math.copysign() is a function exists in Standard math Library of Python. This function returns a float value consisting of magnitude from parameter x and the sign (+ve or -ve) from parameter y. Syntax : math.copysign(x, y) Parameters :x : Integer value to be convertedy : Integer whose sign is required Retu...
[ { "code": null, "e": 28, "s": 0, "text": "\n01 Jan, 2019" }, { "code": null, "e": 222, "s": 28, "text": "math.copysign() is a function exists in Standard math Library of Python. This function returns a float value consisting of magnitude from parameter x and the sign (+ve or -ve)...
Detect Cycle in a Directed Graph
Using a Depth First Search (DFS) traversal algorithm we can detect cycles in a directed graph. If there is any self-loop in any node, it will be considered as a cycle, otherwise, when the child node has another edge to connect its parent, it will also a cycle. For the disconnected graph, there may different trees prese...
[ { "code": null, "e": 1448, "s": 1187, "text": "Using a Depth First Search (DFS) traversal algorithm we can detect cycles in a directed graph. If there is any self-loop in any node, it will be considered as a cycle, otherwise, when the child node has another edge to connect its parent, it will also a...
Python Program to Convert Binary to Hexadecimal
14 Sep, 2021 Given a binary number, the task is to write a Python program to convert the given binary number into an equivalent hexadecimal number. i.e convert the number with base value 2 to base value 16. In hexadecimal representation we 16 values to represent a number. Numbers 0-9 are expressed by digits 0-9 and 10-...
[ { "code": null, "e": 53, "s": 25, "text": "\n14 Sep, 2021" }, { "code": null, "e": 405, "s": 53, "text": "Given a binary number, the task is to write a Python program to convert the given binary number into an equivalent hexadecimal number. i.e convert the number with base value ...
Minimum number of bracket reversals needed to make an expression balanced
25 Jun, 2022 Given an expression with only ‘}’ and ‘{‘. The expression may not be balanced. Find minimum number of bracket reversals to make the expression balanced.Examples: Input: exp = "}{" Output: 2 We need to change '}' to '{' and '{' to '}' so that the expression becomes balanced, the balanced expression is '{...
[ { "code": null, "e": 54, "s": 26, "text": "\n25 Jun, 2022" }, { "code": null, "e": 217, "s": 54, "text": "Given an expression with only ‘}’ and ‘{‘. The expression may not be balanced. Find minimum number of bracket reversals to make the expression balanced.Examples: " }, { ...
Convert Matrix to Dataframe in R - GeeksforGeeks
09 May, 2021 In this article, we will discuss how to convert the matrix into DataFrame, or we can also say that we will discuss how to create a DataFrame from a matrix in R Programming Language. A matrix can be converted to a dataframe by using a function called as.data.frame(). It will take each column from the matrix...
[ { "code": null, "e": 24618, "s": 24590, "text": "\n09 May, 2021" }, { "code": null, "e": 24800, "s": 24618, "text": "In this article, we will discuss how to convert the matrix into DataFrame, or we can also say that we will discuss how to create a DataFrame from a matrix in R Pro...
Display the minimum of three integer values in Java
The following is an example displaying the minimum of three integer values. Live Demo public class Demo { public static void main(String[] args) { int val1 = 99; int val2 = 87; int val3 = 130; System.out.println("Number 1 = "+val1); System.out.println("Number 2 = "+val2); System....
[ { "code": null, "e": 1138, "s": 1062, "text": "The following is an example displaying the minimum of three integer values." }, { "code": null, "e": 1149, "s": 1138, "text": " Live Demo" }, { "code": null, "e": 1598, "s": 1149, "text": "public class Demo {\n ...
Create Simple Optical Character Recognition (OCR) with Python | by Fahmi Nurfikri | Towards Data Science
When collecting data for the text mining process or looking for other references, we often find sources in the form of images. For example, if we are going to analyze a word in pdf format, the file instead contains an image of text. This certainly makes it difficult for data processing. One solution to this problem is ...
[ { "code": null, "e": 545, "s": 172, "text": "When collecting data for the text mining process or looking for other references, we often find sources in the form of images. For example, if we are going to analyze a word in pdf format, the file instead contains an image of text. This certainly makes i...
How To Change Default Shell In Linux - GeeksforGeeks
23 Dec, 2021 In most Linux systems, the default shell is bash but we can change that to any other shell-like zsh, fish, sh, and any other. In this article, we are going to show how to change that default shell to any other shell in Linux systems. To change the user’s shell, first, let’s find the current shell. There ar...
[ { "code": null, "e": 26197, "s": 26169, "text": "\n23 Dec, 2021" }, { "code": null, "e": 26644, "s": 26197, "text": "In most Linux systems, the default shell is bash but we can change that to any other shell-like zsh, fish, sh, and any other. In this article, we are going to show...
How to change svg icon colors with Tailwind CSS ? - GeeksforGeeks
26 May, 2021 SVG stands for Scalable Vector Graphics and is an XML-based ( can be edited ) vector image format. SVG is commonly used for icons, animations, interactive charts, graphs, and other dynamic graphics in the browser. As it is XML-based, you can easily edit or change the SVG icon colors with Tailwind. Approach...
[ { "code": null, "e": 26647, "s": 26619, "text": "\n26 May, 2021" }, { "code": null, "e": 26946, "s": 26647, "text": "SVG stands for Scalable Vector Graphics and is an XML-based ( can be edited ) vector image format. SVG is commonly used for icons, animations, interactive charts, ...
Finding the Size Resolution of Image in Python - GeeksforGeeks
02 Sep, 2020 Let us see how to find the resolution of an image in Python. We will be solving this problem with two different libraries which are present in Python: PIL OpenCV In our examples we will be using the following image: The resolution of the above image is 600×135. We will be using a library named Pillow to fi...
[ { "code": null, "e": 25537, "s": 25509, "text": "\n02 Sep, 2020" }, { "code": null, "e": 25688, "s": 25537, "text": "Let us see how to find the resolution of an image in Python. We will be solving this problem with two different libraries which are present in Python:" }, { ...
Smallest N digit number whose sum of square of digits is a Perfect Square - GeeksforGeeks
17 Feb, 2022 Given an integer N, find the smallest N digit number such that the sum of the square of digits (in decimal representation) of the number is also a perfect square. If no such number exists, print -1.Examples: Input : N = 2 Output : 34 Explanation: The smallest possible 2 digit number whose sum of square of...
[ { "code": null, "e": 26349, "s": 26321, "text": "\n17 Feb, 2022" }, { "code": null, "e": 26558, "s": 26349, "text": "Given an integer N, find the smallest N digit number such that the sum of the square of digits (in decimal representation) of the number is also a perfect square. ...
Period parse() method in Java with Examples - GeeksforGeeks
28 Nov, 2018 The parse() method of Period Class is used to obtain a period from given string in the form of PnYnMnD where nY means n years, nM means n months and nD means n days. Syntax: public static Period parse(CharSequence text) Parameters: This method accepts a single parameter text which is the String to be parse...
[ { "code": null, "e": 25609, "s": 25581, "text": "\n28 Nov, 2018" }, { "code": null, "e": 25775, "s": 25609, "text": "The parse() method of Period Class is used to obtain a period from given string in the form of PnYnMnD where nY means n years, nM means n months and nD means n day...
Count prime factors of N! - GeeksforGeeks
09 Nov, 2021 Given an integer N, the task is to count the number of prime factors of N!. Examples: Input: N = 5Output: 3Explanation: Factorial of 5 = 120. Prime factors of 120 are {2, 3, 5}. Therefore, the count is 3. Input: N = 1Output: 0 Naive Approach: Follow the steps to solve the problem : Initialize a variable, s...
[ { "code": null, "e": 25961, "s": 25933, "text": "\n09 Nov, 2021" }, { "code": null, "e": 26037, "s": 25961, "text": "Given an integer N, the task is to count the number of prime factors of N!." }, { "code": null, "e": 26047, "s": 26037, "text": "Examples:" }...
Implementation of Perceptron Algorithm for AND Logic Gate with 2-bit Binary Input - GeeksforGeeks
08 Jun, 2020 In the field of Machine Learning, the Perceptron is a Supervised Learning Algorithm for binary classifiers. The Perceptron Model implements the following function: For a particular choice of the weight vector and bias parameter , the model predicts output for the corresponding input vector . AND log...
[ { "code": null, "e": 26839, "s": 26811, "text": "\n08 Jun, 2020" }, { "code": null, "e": 27003, "s": 26839, "text": "In the field of Machine Learning, the Perceptron is a Supervised Learning Algorithm for binary classifiers. The Perceptron Model implements the following function:...
Command Line Arguments in Python - GeeksforGeeks
12 Apr, 2022 The arguments that are given after the name of the program in the command line shell of the operating system are known as Command Line Arguments. Python provides various ways of dealing with these types of arguments. The three most common are: Using sys.argv Using getopt module Using argparse module The s...
[ { "code": null, "e": 25457, "s": 25429, "text": "\n12 Apr, 2022" }, { "code": null, "e": 25702, "s": 25457, "text": "The arguments that are given after the name of the program in the command line shell of the operating system are known as Command Line Arguments. Python provides v...
Count of subarrays whose maximum element is greater than k - GeeksforGeeks
03 Feb, 2022 Given an array of n elements and an integer k. The task is to find the count of subarray which has maximum element greater than K.Examples : Input : arr[] = {1, 2, 3} and k = 2. Output : 3 All the possible subarrays of arr[] are { 1 }, { 2 }, { 3 }, { 1, 2 }, { 2, 3 }, { 1, 2, 3 }. Their maximum elemen...
[ { "code": null, "e": 24877, "s": 24849, "text": "\n03 Feb, 2022" }, { "code": null, "e": 25020, "s": 24877, "text": "Given an array of n elements and an integer k. The task is to find the count of subarray which has maximum element greater than K.Examples : " }, { "code"...
JavaScript Variables
Variables are containers for storing data (storing data values). In this example, x, y, and z, are variables, declared with the var keyword: In this example, x, y, and z, are variables, declared with the let keyword: In this example, x, y, and z, are undeclared variables: From all the examples above, you can guess: x s...
[ { "code": null, "e": 111, "s": 46, "text": "Variables are containers for storing data (storing data values)." }, { "code": null, "e": 187, "s": 111, "text": "In this example, x, y, and z,\nare variables, declared with the var keyword:" }, { "code": null, "e": 263, ...
Copy Kaggle data into Google Cloud Storage | Towards Data Science
So, you have picked your Kaggle competition, and you want to start training your model and make yourself known on the Kaggle leaderboard. If like us, you use Google Cloud AI Platform for your data science workloads, one of the first steps in a Kaggle competition is to upload the Kaggle training data into Google Cloud S...
[ { "code": null, "e": 310, "s": 172, "text": "So, you have picked your Kaggle competition, and you want to start training your model and make yourself known on the Kaggle leaderboard." }, { "code": null, "e": 500, "s": 310, "text": "If like us, you use Google Cloud AI Platform for...
ctime() Function in C/C++
The C library function char *ctime(const time_t *timer) returns a string representing the localtime based on the argument timer. The returned string has the following format − Www Mmm dd hh:mm:ss yyyy, where Www is the weekday, Mmm the month in letters, dd the day of the month, hh:mm:ss the time, and yyyy the year. The...
[ { "code": null, "e": 1191, "s": 1062, "text": "The C library function char *ctime(const time_t *timer) returns a string representing the localtime based on the argument timer." }, { "code": null, "e": 1379, "s": 1191, "text": "The returned string has the following format − Www Mm...
Dynamic method dispatch or Runtime polymorphism in Java
Runtime Polymorphism in Java is achieved by Method overriding in which a child class overrides a method in its parent. An overridden method is essentially hidden in the parent class, and is not invoked unless the child class uses the super keyword within the overriding method. This method call resolution happens at run...
[ { "code": null, "e": 1439, "s": 1062, "text": "Runtime Polymorphism in Java is achieved by Method overriding in which a child class overrides a method in its parent. An overridden method is essentially hidden in the parent class, and is not invoked unless the child class uses the super keyword withi...
How to use Swift to detect when AVPlayer video ends playing?
To detect the end of a video in swift we’ll need to create a video player, then use notifications to detect when the video stops playing. We’ll do this with help of an example in swift. Let’s create a project and drag and drop any video with extension “mp4”, select copy resource if required and add to the target of our...
[ { "code": null, "e": 1248, "s": 1062, "text": "To detect the end of a video in swift we’ll need to create a video player, then use notifications to detect when the video stops playing. We’ll do this with help of an example in swift." }, { "code": null, "e": 1392, "s": 1248, "text...
Detecting pedestrians and bikers on a drone with Jetson Xavier | by Jaiyam Sharma | Towards Data Science
Drones are one of the coolest technologies every maker and enthusiast wants to lay their hands on. At the same time as drones are becoming common, AI is rapidly advancing and we are now in a state where object detection and semantic segmentation are possible right onboard the drone. In this blog post, I will share how ...
[ { "code": null, "e": 548, "s": 172, "text": "Drones are one of the coolest technologies every maker and enthusiast wants to lay their hands on. At the same time as drones are becoming common, AI is rapidly advancing and we are now in a state where object detection and semantic segmentation are possi...
LOWESS Regression in Python: How to Discover Clear Patterns in Your Data? | by Saul Dobilas | Towards Data Science
Machine Learning is making huge leaps forward, with an increasing number of algorithms enabling us to solve complex real-world problems. This story is part of a deep dive series explaining the mechanics of Machine Learning algorithms. In addition to giving you an understanding of how ML algorithms work, it also provide...
[ { "code": null, "e": 308, "s": 171, "text": "Machine Learning is making huge leaps forward, with an increasing number of algorithms enabling us to solve complex real-world problems." }, { "code": null, "e": 547, "s": 308, "text": "This story is part of a deep dive series explaini...
bitset count() in C++ STL - GeeksforGeeks
18 Jun, 2018 bitset::count() is an inbuilt STL in C++ which returns the number of set bits in the binary representation of a number. Syntax: int count() Parameter: The function accepts no parameter. Return Value: The function returns the number of set bits. It returns the total number of ones or the number of set bit...
[ { "code": null, "e": 24043, "s": 24015, "text": "\n18 Jun, 2018" }, { "code": null, "e": 24163, "s": 24043, "text": "bitset::count() is an inbuilt STL in C++ which returns the number of set bits in the binary representation of a number." }, { "code": null, "e": 24171,...
Perl | Quoted, Interpolated and Escaped Strings
24 Dec, 2021 A string in Perl is a scalar variable and start with a ($) sign and it can contain alphabets, numbers, special characters. The string can consist of a single word, a group of words or a multi-line paragraph. The String is defined by the user within a single quote (‘) or double quote (“). In Perl, str...
[ { "code": null, "e": 28, "s": 0, "text": "\n24 Dec, 2021" }, { "code": null, "e": 321, "s": 28, "text": "A string in Perl is a scalar variable and start with a ($) sign and it can contain alphabets, numbers, special characters. The string can consist of a single word, a group of ...
Overview of Just a Bunch Of Disks (JBOD)
07 May, 2021 Just a Bunch Of Disks : JBOD (stands for “Just a Bunch Of Disks”) is referred as the collection of hard disks with one single storage enclosure that are not configured to acts as Redundant Array of Independent Disks (RAID array). The multiple disks in array are connected to a single server that provides hi...
[ { "code": null, "e": 28, "s": 0, "text": "\n07 May, 2021" }, { "code": null, "e": 52, "s": 28, "text": "Just a Bunch Of Disks :" }, { "code": null, "e": 358, "s": 52, "text": "JBOD (stands for “Just a Bunch Of Disks”) is referred as the collection of hard disk...
How to pad a string to get the determined length using JavaScript ?
31 Jul, 2019 Method 1: Using the padStart() method: The padStart() method can be used to pad a string with the specified characters to the specified length. It takes two parameters, the target length, and the string to be replaced with. The target length is the length of resulting string after the current string has be...
[ { "code": null, "e": 28, "s": 0, "text": "\n31 Jul, 2019" }, { "code": null, "e": 418, "s": 28, "text": "Method 1: Using the padStart() method: The padStart() method can be used to pad a string with the specified characters to the specified length. It takes two parameters, the ta...
Largest palindrome which is product of two n-digit numbers
04 Jun, 2022 Given a value n, find out the largest palindrome number which is product of two n digit numbers. Examples : Input : n = 2 Output : 9009 9009 is the largest number which is product of two 2-digit numbers. 9009 = 91*99. Input : n = 3 Output : 906609 Below are steps to find the required number. Find a l...
[ { "code": null, "e": 54, "s": 26, "text": "\n04 Jun, 2022" }, { "code": null, "e": 151, "s": 54, "text": "Given a value n, find out the largest palindrome number which is product of two n digit numbers." }, { "code": null, "e": 163, "s": 151, "text": "Examples...
Python – Check whether a string starts and ends with the same character or not (using Regular Expression)
18 May, 2021 Given a string. The task is to write a regular expression to check whether a string starts and ends with the same character.Examples: Input : abba Output : Valid Input : a Output : Valid Input : abc Output : Invalid Solution: The input can be divide into 2 cases: Single character string: ...
[ { "code": null, "e": 28, "s": 0, "text": "\n18 May, 2021" }, { "code": null, "e": 164, "s": 28, "text": "Given a string. The task is to write a regular expression to check whether a string starts and ends with the same character.Examples: " }, { "code": null, "e": 26...
Check if it is possible to move from (0, 0) to (x, y) in N steps
25 May, 2022 Given a point (x, y). Find whether it is possible or not to move from (0, 0) to (x, y) in exactly n steps. 4 types of steps are valid, you can move from a point (a, b) to either of (a, b+1), (a, b-1), (a-1, b), (a+1, b)Examples: Input: x = 0, y = 0, n = 2 Output: POSSIBLE Input: x = 1, y = 1, n = 3 Out...
[ { "code": null, "e": 53, "s": 25, "text": "\n25 May, 2022" }, { "code": null, "e": 284, "s": 53, "text": "Given a point (x, y). Find whether it is possible or not to move from (0, 0) to (x, y) in exactly n steps. 4 types of steps are valid, you can move from a point (a, b) to eit...
Program to creating Doraemon cartoon character using Computer Graphics
14 Jul, 2021 Computer Graphics is an important subject to improve coding skills. Many things can be implemented using computer graphics. For example- car animation, cartoon characters, and many more things. In this article, the cartoon character Doraemon is created using computer graphics. Implementation in C In C, the...
[ { "code": null, "e": 28, "s": 0, "text": "\n14 Jul, 2021" }, { "code": null, "e": 306, "s": 28, "text": "Computer Graphics is an important subject to improve coding skills. Many things can be implemented using computer graphics. For example- car animation, cartoon characters, and...
Unordered, Ordered, and Description Lists in HTML
09 Feb, 2022 Lists are used to store data or information in web pages in ordered or unordered form. HTML supports several types of list elements that can be included in the <BODY>tag of the document. These elements may also be nested, i.e, the onset of elements can be embedded within another. There are three types of l...
[ { "code": null, "e": 28, "s": 0, "text": "\n09 Feb, 2022" }, { "code": null, "e": 362, "s": 28, "text": "Lists are used to store data or information in web pages in ordered or unordered form. HTML supports several types of list elements that can be included in the <BODY>tag of th...
HTMLCollection for Loop
10 Jan, 2022 It is not recommended to use a for/in loop to loop through an HTMLCollection because this type of loop is used for iterating through properties of an object. The HTMLCollection contains other properties that may be returned along with the required elements. There are 3 methods that can be used to properly ...
[ { "code": null, "e": 28, "s": 0, "text": "\n10 Jan, 2022" }, { "code": null, "e": 286, "s": 28, "text": "It is not recommended to use a for/in loop to loop through an HTMLCollection because this type of loop is used for iterating through properties of an object. The HTMLCollectio...
JavaFX | Cursor class with examples
08 Aug, 2018 Cursor class is a part of JavaFX. Cursor class is used to encapsulate the bitmap representation of the mouse cursor. The cursor class has several predefined cursors that can be used according to the needs of the programmer. Commonly used Methods: Below programs will illustrate the use of the cursor class: ...
[ { "code": null, "e": 28, "s": 0, "text": "\n08 Aug, 2018" }, { "code": null, "e": 252, "s": 28, "text": "Cursor class is a part of JavaFX. Cursor class is used to encapsulate the bitmap representation of the mouse cursor. The cursor class has several predefined cursors that can b...
PyQt5 – Getting the current index of selected item in ComboBox
22 Apr, 2020 In this article we will see how we can get the current index of the selected item the combo box. In order to do this we will use the currentIndex method. Syntax : combo_box.currentIndex() Argument : It takes no argument Return : It return integer i.e index of selected item Steps for implementation – 1. Cre...
[ { "code": null, "e": 28, "s": 0, "text": "\n22 Apr, 2020" }, { "code": null, "e": 182, "s": 28, "text": "In this article we will see how we can get the current index of the selected item the combo box. In order to do this we will use the currentIndex method." }, { "code":...
Python – Itertools.chain.from_iterable()
09 Mar, 2020 Python’s Itertool is a module that provides various functions that work on iterators to produce complex iterators. This module works as a fast, memory-efficient tool that is used either by themselves or in combination to form iterator algebra. Note: For more information, refer to Python Itertools The funct...
[ { "code": null, "e": 54, "s": 26, "text": "\n09 Mar, 2020" }, { "code": null, "e": 298, "s": 54, "text": "Python’s Itertool is a module that provides various functions that work on iterators to produce complex iterators. This module works as a fast, memory-efficient tool that is ...
C++ Program To Check Whether The Length Of Given Linked List Is Even Or Odd
10 Jan, 2022 Given a linked list, the task is to make a function which checks whether the length of the linked list is even or odd. Examples: Input : 1->2->3->4->NULL Output : Even Input : 1->2->3->4->5->NULL Output : Odd Method 1: Count the codes linearly Traverse the entire Linked List and keep counting the number of...
[ { "code": null, "e": 28, "s": 0, "text": "\n10 Jan, 2022" }, { "code": null, "e": 157, "s": 28, "text": "Given a linked list, the task is to make a function which checks whether the length of the linked list is even or odd. Examples:" }, { "code": null, "e": 237, ...
What are Java Records and How to Use them Alongside Constructors and Methods?
22 Jun, 2022 As developers and software engineers, our aim is to always design ways to obtain maximum efficiency and if we need to write less code for it, then that’s a blessing. In Java, a record is a special type of class declaration aimed at reducing the boilerplate code. Java records were introduced with the inten...
[ { "code": null, "e": 52, "s": 24, "text": "\n22 Jun, 2022" }, { "code": null, "e": 219, "s": 52, "text": "As developers and software engineers, our aim is to always design ways to obtain maximum efficiency and if we need to write less code for it, then that’s a blessing. " }, ...
Can we declare the main () method as final in Java?
Yes, we can declare the main () method as final in Java. The compiler does not throw any error. If we declare any method as final by placing the final keyword then that method becomes the final method. The main use of the final method in Java is they are not overridden. We can not override final methods in subclasses. ...
[ { "code": null, "e": 1158, "s": 1062, "text": "Yes, we can declare the main () method as final in Java. The compiler does not throw any error." }, { "code": null, "e": 1264, "s": 1158, "text": "If we declare any method as final by placing the final keyword then that method become...
How do I find all documents with a field that is NaN in MongoDB?
To find all documents with a field that is NAN in MongoDB, use the following syntax db.yourCollectionName.find( { yourFieldName: NaN }) Let us first create a collection with documents > db.nanDemo.insertOne({"Score":0/0}); { "acknowledged" : true, "insertedId" : ObjectId("5ca251a26304881c5ce84b8a") } > db.nanDemo...
[ { "code": null, "e": 1146, "s": 1062, "text": "To find all documents with a field that is NAN in MongoDB, use the following syntax" }, { "code": null, "e": 1198, "s": 1146, "text": "db.yourCollectionName.find( { yourFieldName: NaN })" }, { "code": null, "e": 1246, ...
Floodfill Image using Python-Pillow - GeeksforGeeks
10 Jul, 2020 Seed Fill also known as flood fill, is an algorithm used to identify connected paths in a definite enclosed region. The algorithm has an array of practical applications, such as – Optimized pathfinding Paint Bucket Tool a generic tool found in several image processing packages, uses the algorithm internall...
[ { "code": null, "e": 24415, "s": 24387, "text": "\n10 Jul, 2020" }, { "code": null, "e": 24595, "s": 24415, "text": "Seed Fill also known as flood fill, is an algorithm used to identify connected paths in a definite enclosed region. The algorithm has an array of practical applica...
Tryit Editor v3.7
HTML form attributes Tryit: HTML form target attribute
[ { "code": null, "e": 31, "s": 10, "text": "HTML form attributes" } ]
403bypasser - Bypass 403 Restricted Directory - GeeksforGeeks
23 Sep, 2021 Access control is a fundamental component of data security that manages who’s allowed to access and use company data and resources. This access control technique is also applied to web-based applications. Development of certain web pages is done with high security. Although we can bypass this access contro...
[ { "code": null, "e": 24040, "s": 24012, "text": "\n23 Sep, 2021" }, { "code": null, "e": 24375, "s": 24040, "text": "Access control is a fundamental component of data security that manages who’s allowed to access and use company data and resources. This access control technique i...
Wiggle Animation Effect with CSS
The wiggle effect move or cause to move up and down or from side to side with small rapid movements. You can try to run the following code to implement the winggle animation effect − Live Demo <html> <head> <style> .animated { background-image: url(/css/images/logo.png); backg...
[ { "code": null, "e": 1163, "s": 1062, "text": "The wiggle effect move or cause to move up and down or from side to side with small rapid movements." }, { "code": null, "e": 1245, "s": 1163, "text": "You can try to run the following code to implement the winggle animation effect −...
CSS | Overflow - GeeksforGeeks
30 Jun, 2021 The CSS overflow controls the big content. It tells whether to clip content or to add scroll bars. The overflow contains the following property: visible hidden scroll auto Visible: The content is not clipped and visible outside the element box. Example: html <!DOCTYPE><html> <head> <style> ...
[ { "code": null, "e": 28071, "s": 28043, "text": "\n30 Jun, 2021" }, { "code": null, "e": 28218, "s": 28071, "text": "The CSS overflow controls the big content. It tells whether to clip content or to add scroll bars. The overflow contains the following property: " }, { "c...
Program to find minimum number of operations required to make one string substring of other in Python
Suppose we have two strings s and t, we have to find the minimum amount of operations required for s to make t a substring of s. Now, in each operation, we can choose any position in s and change the character at that position to any other character. So, if the input is like s = "abbpqr", t = "bbxy", then the output wi...
[ { "code": null, "e": 1313, "s": 1062, "text": "Suppose we have two strings s and t, we have to find the minimum amount of operations required for s to make t a substring of s. Now, in each operation, we can choose any position in s and change the character at that position to any other character." ...
Word Break | Practice | GeeksforGeeks
Given a string A and a dictionary of n words B, find out if A can be segmented into a space-separated sequence of dictionary words. Note: From the dictionary B each word can be taken any number of times and in any order. Example 1: Input: n = 12 B = { "i", "like", "sam", "sung", "samsung", "mobile", "ice","cream", "ice...
[ { "code": null, "e": 370, "s": 238, "text": "Given a string A and a dictionary of n words B, find out if A can be segmented into a space-separated sequence of dictionary words." }, { "code": null, "e": 470, "s": 370, "text": "Note: From the dictionary B each word can be taken any...
2D Vector In C++ With User Defined Size - GeeksforGeeks
20 Oct, 2021 A 2D vector is a vector of the vector. Like 2D arrays, we can declare and assign values to a 2D vector! Assuming you are familiar with a normal vector in C++, with the help of an example we demonstrate how a 2D vector differs from a normal vector below: C++ /* Vectors belong to a C++ library called STL ...
[ { "code": null, "e": 23995, "s": 23967, "text": "\n20 Oct, 2021" }, { "code": null, "e": 24250, "s": 23995, "text": "A 2D vector is a vector of the vector. Like 2D arrays, we can declare and assign values to a 2D vector! Assuming you are familiar with a normal vector in C++, with...
Aho-Corasick Algorithm
This algorithm is helpful to find all occurrences of all given set of keywords. It is a kind of Dictionary-matching algorithm. It uses a tree structure using all keywords. After making the tree, it tries to convert the tree as an automaton to make the searching in linear time. There are three different phases of Aho-Co...
[ { "code": null, "e": 1401, "s": 1062, "text": "This algorithm is helpful to find all occurrences of all given set of keywords. It is a kind of Dictionary-matching algorithm. It uses a tree structure using all keywords. After making the tree, it tries to convert the tree as an automaton to make the s...
Java - log() Method
The method returns the natural logarithm of the argument. double log(double d) Here is the detail of parameters − d − Any primitive data type. d − Any primitive data type. This method returns the natural logarithm of the argument. public class Test { public static void main(String args[]) { double x = 11.63...
[ { "code": null, "e": 2435, "s": 2377, "text": "The method returns the natural logarithm of the argument." }, { "code": null, "e": 2457, "s": 2435, "text": "double log(double d)\n" }, { "code": null, "e": 2492, "s": 2457, "text": "Here is the detail of paramete...
What is the maximum length of string in Python?
Maximum length of a string is platform dependent and depends upon address space and/or RAM. The maxsize constant defined in sys module returns 263-1 on 64 bit system. >>> import sys >>> sys.maxsize 9223372036854775807 The largest positive integer supported by the platform's Py_ssize_t type, is the maximum size lists...
[ { "code": null, "e": 1229, "s": 1062, "text": "Maximum length of a string is platform dependent and depends upon address space and/or RAM. The maxsize constant defined in sys module returns 263-1 on 64 bit system." }, { "code": null, "e": 1283, "s": 1229, "text": ">>> import sys\...
Difference between String class and StringBuffer class in Java
Strings, which are widely used in Java programming, are a sequence of characters. In Java programming language, strings are treated as objects. The Java platform provides the String class to create and manipulate strings. Whereas, StringBuffer class is a thread-safe, mutable sequence of characters. A string buffer is l...
[ { "code": null, "e": 1284, "s": 1062, "text": "Strings, which are widely used in Java programming, are a sequence of characters. In Java programming language, strings are treated as objects. The Java platform provides the String class to create and manipulate strings." }, { "code": null, ...
Getting started on Deep Learning for Audio Data | by Tirmidzi Faizal Aflahi | Towards Data Science
While traditional Machine Learning algorithm still triumphs on structural data with the insurgence of Gradient Boosting method, nothing beats Deep Learning on processing unstructured data. Let’s get back to the title. Audio Data, are you sure? Well, intentional or not, I think most of us already tried some solutions in...
[ { "code": null, "e": 361, "s": 172, "text": "While traditional Machine Learning algorithm still triumphs on structural data with the insurgence of Gradient Boosting method, nothing beats Deep Learning on processing unstructured data." }, { "code": null, "e": 390, "s": 361, "text"...
5 Must-Know Pandas Operations on Strings | by Soner Yıldırım | Towards Data Science
We have to represent every bit of data in numerical values to be processed and analyzed by machine learning and deep learning models. However, strings do not usually come in a nice and clean format and require preprocessing to convert to numerical values. Pandas offers many versatile functions to modify and process str...
[ { "code": null, "e": 514, "s": 172, "text": "We have to represent every bit of data in numerical values to be processed and analyzed by machine learning and deep learning models. However, strings do not usually come in a nice and clean format and require preprocessing to convert to numerical values....
Create an option group in HTML
The HTML <optgroup> tag is used for grouping related options within your select list. This makes it easier for users to comprehend their choices when looking at a large list. The following are the attributes − You can try to run the following code to create an option group in HTML − <!DOCTYPE html> <html> <head> ...
[ { "code": null, "e": 1237, "s": 1062, "text": "The HTML <optgroup> tag is used for grouping related options within your select list. This makes it easier for users to comprehend their choices when looking at a large list." }, { "code": null, "e": 1272, "s": 1237, "text": "The fol...
C++ String Library - assign
It appends character c to the end of the string, increasing its length by one. Following is the declaration for std::string::assign. string& assign (const string& str); string& assign (const string& str); string& assign (const string& str); c − It is a character object. c − It is a character object. str − It is a strin...
[ { "code": null, "e": 2682, "s": 2603, "text": "It appends character c to the end of the string, increasing its length by one." }, { "code": null, "e": 2736, "s": 2682, "text": "Following is the declaration for std::string::assign." }, { "code": null, "e": 2772, "s...
A Series on Flask APIs, Part 1: GETting and POSTing | by Alexis McKenzie | Towards Data Science
This article is part of a series on Flask APIs. This part addresses creating a basic REST API using a JSON doc and running that API locally. Each subsequent part will incorporate new technologies to help you better understand APIs and DevOps in the cloud. The Basics: What is Flask, What are APIs, What is a REST API? Fl...
[ { "code": null, "e": 428, "s": 172, "text": "This article is part of a series on Flask APIs. This part addresses creating a basic REST API using a JSON doc and running that API locally. Each subsequent part will incorporate new technologies to help you better understand APIs and DevOps in the cloud....
Dynamic RatingBar in Kotlin - GeeksforGeeks
28 Mar, 2022 Android RatingBar is a user interface widget which is used to get the rating from the customers or users. It is an extension of SeekBar and ProgressBar that shows star ratings and it allow users to give the rating by clicking on the stars. In RatingBar, we can set the step size using android:stepSize and i...
[ { "code": null, "e": 23922, "s": 23894, "text": "\n28 Mar, 2022" }, { "code": null, "e": 24162, "s": 23922, "text": "Android RatingBar is a user interface widget which is used to get the rating from the customers or users. It is an extension of SeekBar and ProgressBar that shows ...
click_and_hold - Action Chains in Selenium Python - GeeksforGeeks
11 May, 2020 Selenium’s Python Module is built to perform automated testing with Python. ActionChains are a way to automate low-level interactions such as mouse movements, mouse button actions, keypress, and context menu interactions. This is useful for doing more complex actions like hover over and drag and drop. Acti...
[ { "code": null, "e": 24292, "s": 24264, "text": "\n11 May, 2020" }, { "code": null, "e": 24891, "s": 24292, "text": "Selenium’s Python Module is built to perform automated testing with Python. ActionChains are a way to automate low-level interactions such as mouse movements, mous...
10 Most Important SQL Commands Every Data Analyst Needs to Know | by Jason Chong | Towards Data Science
As a data analyst or data scientist, it doesn’t matter how good you are at creating fancy visualizations or how skilled you are at building complicated models — at its core, you need data in order to do those things. When working at a large company, these data are typically stored in a database such that everyone can e...
[ { "code": null, "e": 389, "s": 172, "text": "As a data analyst or data scientist, it doesn’t matter how good you are at creating fancy visualizations or how skilled you are at building complicated models — at its core, you need data in order to do those things." }, { "code": null, "e": 5...
Get current year in MySQL WHERE clause?
To get current year, use YEAR() along with CURDATE(). Let us first create a table − mysql> create table DemoTable1360 -> ( -> JoiningYear int -> ) -> ; Query OK, 0 rows affected (0.51 sec) Insert some records in the table using insert command − mysql> insert into DemoTable1360 values(1998); Query OK, 1 ...
[ { "code": null, "e": 1146, "s": 1062, "text": "To get current year, use YEAR() along with CURDATE(). Let us first create a table −" }, { "code": null, "e": 1267, "s": 1146, "text": "mysql> create table DemoTable1360\n -> (\n -> JoiningYear int\n -> )\n -> ;\nQuery OK,...
wxPython - SplitterWindow Class
Object of this class is a layout manager, which holds two subwindows whose size can be changed dynamically by dragging the boundaries between them. The Splitter control gives a handle that can be dragged to resize the controls. wx.SplitterWindow class has a very basic constructor with all parameters having usual defaul...
[ { "code": null, "e": 2110, "s": 1882, "text": "Object of this class is a layout manager, which holds two subwindows whose size can be changed dynamically by dragging the boundaries between them. The Splitter control gives a handle that can be dragged to resize the controls." }, { "code": nul...
How to change the code "Yes" to 1 in an R data frame column?
To change the code “Yes” to 1, we can use ifelse function and set the Yes to 1 and others to 0. For example, if we have a data frame called df that contains a character column x which has Yes and No values then we can convert those values to 1 and 0 using the command ifelse(df$x=="Yes",1,0). Consider the below data fra...
[ { "code": null, "e": 1355, "s": 1062, "text": "To change the code “Yes” to 1, we can use ifelse function and set the Yes to 1 and others to 0. For example, if we have a data frame called df that contains a character column x which has Yes and No values then we can convert those values to 1 and 0 usi...
How can Tensorflow be used to train and compile a CNN model?
A convolutional neural network can be trained and compiled using the ‘train’ method and the ‘fit’ method respectively. The ‘epoch’ value is provided in the ‘fit’ method. Read More: What is TensorFlow and how Keras work with TensorFlow to create Neural Networks? We will use the Keras Sequential API, which is helpful in ...
[ { "code": null, "e": 1232, "s": 1062, "text": "A convolutional neural network can be trained and compiled using the ‘train’ method and the ‘fit’ method respectively. The ‘epoch’ value is provided in the ‘fit’ method." }, { "code": null, "e": 1324, "s": 1232, "text": "Read More:\n...
Python program to print all odd numbers in a range - GeeksforGeeks
31 Mar, 2020 Given starting and end points, write a Python program to print all odd numbers in that given range. Example: Input: start = 4, end = 15 Output: 5, 7, 9, 11, 13, 15 Input: start = 3, end = 11 Output: 3, 5, 7, 9, 11 Example #1: Print all odd numbers from given list using for loop Define start and end limit ...
[ { "code": null, "e": 24617, "s": 24589, "text": "\n31 Mar, 2020" }, { "code": null, "e": 24717, "s": 24617, "text": "Given starting and end points, write a Python program to print all odd numbers in that given range." }, { "code": null, "e": 24726, "s": 24717, ...
React Native - Props
In our last chapter, we showed you how to use mutable state. In this chapter, we will show you how to combine the state and the props. Presentational components should get all data by passing props. Only container components should have state. We will now understand what a container component is and also how it works. ...
[ { "code": null, "e": 2479, "s": 2344, "text": "In our last chapter, we showed you how to use mutable state. In this chapter, we will show you how to combine the state and the props." }, { "code": null, "e": 2588, "s": 2479, "text": "Presentational components should get all data b...
What is the difference between width and innerWidth in jQuery?
Width in jQuery The width is the horizontal measurement of the container, for example, width of a div. It excludes the padding, border, or margin. You can try to run the following code to learn how to get the width of an element in jQuery: Live Demo <!DOCTYPE html> <html> <head> <script src="https://ajax.googleapis.com...
[ { "code": null, "e": 1078, "s": 1062, "text": "Width in jQuery" }, { "code": null, "e": 1209, "s": 1078, "text": "The width is the horizontal measurement of the container, for example, width of a div. It excludes the padding, border, or margin." }, { "code": null, "e"...
Max sum in sub-arrays | Practice | GeeksforGeeks
Given an array, find maximum sum of smallest and second smallest elements chosen from all possible sub-arrays. More formally, if we write all (nC2) sub-arrays of array of size >=2 and find the sum of smallest and second smallest, then our answer will be maximum sum among them. Example 1: Input : arr[] = [4, 3, 1, 5, ...
[ { "code": null, "e": 518, "s": 238, "text": "Given an array, find maximum sum of smallest and second smallest elements chosen from all possible sub-arrays. More formally, if we write all (nC2) sub-arrays of array of size >=2 and find the sum of smallest and second smallest, then our answer will be m...
Why the constructor name is same as the class name in Java?
Every class object is created using the same new keyword, so it must have information about the class to which it must create an object. For this reason, the constructor name should be the same as the class name. class MyConstructor{ public MyConstructor() { System.out.println("The constructor name should be s...
[ { "code": null, "e": 1275, "s": 1062, "text": "Every class object is created using the same new keyword, so it must have information about the class to which it must create an object. For this reason, the constructor name should be the same as the class name." }, { "code": null, "e": 150...
How to use the PI constant in C++?
Here we will see how to use the PI constant in C++ program. The PI constant is present in the cmath header file. The name of the constant is M_PI. We can simply include that header file, and use the constant to perform operation. In the following example we will see how to find area of a circle using PI constant. #incl...
[ { "code": null, "e": 1292, "s": 1062, "text": "Here we will see how to use the PI constant in C++ program. The PI constant is present in the cmath header file. The name of the constant is M_PI. We can simply include that header file, and use the constant to perform operation." }, { "code": n...
Print all prime numbers less than or equal to N in C++
In this problem, we are given a number N and we have to print all prime numbers less than or equal to N. Let’s take an example to understand the topic better − Input: 10 Output: 2 3 5 7 A prime number is a number that can be divided by only one and the number itself. Example: 2, 3. A simple approach is to iterate from ...
[ { "code": null, "e": 1167, "s": 1062, "text": "In this problem, we are given a number N and we have to print all prime numbers less than or equal to N." }, { "code": null, "e": 1222, "s": 1167, "text": "Let’s take an example to understand the topic better −" }, { "code": ...
Simulation of 4-bit ALU
Moreover, we write an assembly program in 8085 assembly language just to simulate a 4-bit ALU by using an interface which is based on the logic controller. The Arithmetic Logical Unit always performs an addition, subtraction, AND operation, or OR operation, which is based on the 4-bit inputs for the desired operations ...
[ { "code": null, "e": 1399, "s": 1062, "text": "Moreover, we write an assembly program in 8085 assembly language just to simulate a 4-bit ALU by using an interface which is based on the logic controller. The Arithmetic Logical Unit always performs an addition, subtraction, AND operation, or OR operat...
Pass arguments from array in PHP to constructor
The Reflection API can be used to pass arguments from array to constructor. The above line creates a new class instance from given arguments − public ReflectionClass::newInstanceArgs ([ array $args ] ) : object It creates a new instance of the class when the arguments are passed to the constructor. Here, args refers to...
[ { "code": null, "e": 1138, "s": 1062, "text": "The Reflection API can be used to pass arguments from array to constructor." }, { "code": null, "e": 1205, "s": 1138, "text": "The above line creates a new class instance from given arguments −" }, { "code": null, "e": 12...
Machine Learning — Text Processing | by Javaid Nabi | Towards Data Science
Text Processing is one of the most common task in many ML applications. Below are some examples of such applications. • Language Translation: Translation of a sentence from one language to another.• Sentiment Analysis: To determine, from a text corpus, whether the sentiment towards any topic or product etc. is positiv...
[ { "code": null, "e": 290, "s": 172, "text": "Text Processing is one of the most common task in many ML applications. Below are some examples of such applications." }, { "code": null, "e": 583, "s": 290, "text": "• Language Translation: Translation of a sentence from one language ...
Linux and Unix Test Disk I/O Performance with DD Command
Do you know how to check the performance of a hard drive like checking the read and write speed on your Linux operating systems? then, this article is for you!! which is basically created to provide you an overview of DD command, which is geared towards better guidance to new users and as an exploration tour for gettin...
[ { "code": null, "e": 1412, "s": 1062, "text": "Do you know how to check the performance of a hard drive like checking the read and write speed on your Linux operating systems? then, this article is for you!! which is basically created to provide you an overview of DD command, which is geared towards...
Python dictionary len() Method
Python dictionary method len() gives the total length of the dictionary. This would be equal to the number of items in the dictionary. Following is the syntax for len() method − len(dict) dict − This is the dictionary, whose length needs to be calculated. dict − This is the dictionary, whose length needs to be calcul...
[ { "code": null, "e": 2380, "s": 2244, "text": "Python dictionary method len() gives the total length of the dictionary. This would be equal to the number of items in the dictionary." }, { "code": null, "e": 2423, "s": 2380, "text": "Following is the syntax for len() method −" ...
basename Command in Linux with examples - GeeksforGeeks
15 May, 2019 basename strips directory information and suffixes from file names i.e. it prints the file name NAME with any leading directory components removed. The basename command can be easily used by simply writing basename followed by the file name or the full pathname. Syntax of basename command : $basename NAME ...
[ { "code": null, "e": 24012, "s": 23984, "text": "\n15 May, 2019" }, { "code": null, "e": 24160, "s": 24012, "text": "basename strips directory information and suffixes from file names i.e. it prints the file name NAME with any leading directory components removed." }, { "...
Amazon WoW Internship Interview Experience 2021 - GeeksforGeeks
09 Jan, 2022 Difficulty Level: Medium-Hard Online Assessment 1: Date – 17/08/2021 Mettl Platform Time – 90 minutes 9 Sections – 41 Questions 1 Coding questions + 40 Objectives MCQ Topics (5 Questions Each Section) Data Structures and Algorithms Networking Linux ...
[ { "code": null, "e": 25109, "s": 25081, "text": "\n09 Jan, 2022" }, { "code": null, "e": 25140, "s": 25109, "text": "Difficulty Level: Medium-Hard" }, { "code": null, "e": 25161, "s": 25140, "text": "Online Assessment 1:" }, { "code": null, "e": 2...
CSS Floating Animation
06 Jul, 2021 In this article, we will explain the very basics of CSS animations along with a demonstration of how to add a floating animation. CSS animations need the following. The animation declaration. The keyframes which defines the properties for getting animation. It also provides properties which says when and...
[ { "code": null, "e": 28, "s": 0, "text": "\n06 Jul, 2021" }, { "code": null, "e": 195, "s": 28, "text": "In this article, we will explain the very basics of CSS animations along with a demonstration of how to add a floating animation. CSS animations need the following. " }, ...
Spurious Tuples in DBMS
24 Jun, 2020 In Database Management System (DBMS), data is represented in a tabular form through attributes and tuples i.e., columns and rows.There are various operations (insert, delete, update, modify, etc.) that we can perform on tables. One such operation is join. When we combine two tables into one, we call it a j...
[ { "code": null, "e": 52, "s": 24, "text": "\n24 Jun, 2020" }, { "code": null, "e": 387, "s": 52, "text": "In Database Management System (DBMS), data is represented in a tabular form through attributes and tuples i.e., columns and rows.There are various operations (insert, delete,...
Suspend/Resume tasks in FreeRTOS using Arduino
If you wish to suspend a task in FreeRTOS, there is a function vTaskSuspend() that can be used. The syntax is − Syntax void vTaskSuspend( TaskHandle_t xTaskToSuspend ); As you can see, it takes the handle of the task to suspend as the argument and returns nothing. A suspended task can be resumed using vTaskResume(). Th...
[ { "code": null, "e": 1174, "s": 1062, "text": "If you wish to suspend a task in FreeRTOS, there is a function vTaskSuspend() that can be used. The syntax is −" }, { "code": null, "e": 1181, "s": 1174, "text": "Syntax" }, { "code": null, "e": 1231, "s": 1181, "...
Essential Dictionary Mutation For Python Programmers | by Emmett Boudreau | Towards Data Science
The dictionary data-type is arguably the most important data structure in the Python programming language. This is even more true for Data Scientists who often work with labeled data that works exactly the same as a dictionary. In many ways, data frames are simply tabular views for the exact same thing that a dictionar...
[ { "code": null, "e": 553, "s": 171, "text": "The dictionary data-type is arguably the most important data structure in the Python programming language. This is even more true for Data Scientists who often work with labeled data that works exactly the same as a dictionary. In many ways, data frames a...
Getting the return value of Javascript code in Selenium.
We can get the return value of Javascript code with Selenium webdriver. Selenium can run Javascript commands with the help of executeScript method. The Javascript command to be executed is passed as an argument to the method. We shall be returning the value from the Javascript code with the help of the keyword return. ...
[ { "code": null, "e": 1288, "s": 1062, "text": "We can get the return value of Javascript code with Selenium webdriver. Selenium can run Javascript commands with the help of executeScript method. The Javascript command to be executed is passed as an argument to the method." }, { "code": null,...
jsoup - Using Selector Syntax
Following example will showcase use of selector methods after parsing an HTML String into a Document object. jsoup supports selectors similar to CSS Selectors. Document document = Jsoup.parse(html); Element sampleDiv = document.getElementById("sampleDiv"); Elements links = sampleDiv.getElementsByTag("a"); Where docume...
[ { "code": null, "e": 2190, "s": 2030, "text": "Following example will showcase use of selector methods after parsing an HTML String into a Document object. jsoup supports selectors similar to CSS Selectors." }, { "code": null, "e": 2338, "s": 2190, "text": "Document document = Js...