title
stringlengths
3
221
text
stringlengths
17
477k
parsed
listlengths
0
3.17k
Apothem of a n-sided regular polygon - GeeksforGeeks
17 Mar, 2021 Given here the side length a of a regular n-sided polygon, the task is to find the length of its Apothem. Apothem is the line drawn from the center of the polygon that is perpendicular to one of its sides. Examples: Input a = 9, n = 6 Output: 7.79424 Input: a = 8, n = 7 Output: 8.30609 Approach: I...
[ { "code": null, "e": 26379, "s": 26351, "text": "\n17 Mar, 2021" }, { "code": null, "e": 26597, "s": 26379, "text": "Given here the side length a of a regular n-sided polygon, the task is to find the length of its Apothem. Apothem is the line drawn from the center of the polygon ...
How to Create Embossed Text Effect using CSS ? - GeeksforGeeks
14 May, 2020 The embossed text effect can be easily generated using HTML and CSS. We will use the CSS text-shadow property to get the desired output. HTML Code: In this section, we will create a basic structure of the body that holds text or heading. <!DOCTYPE html><html lang="en" dir="ltr"> <head> <meta charset="u...
[ { "code": null, "e": 26731, "s": 26703, "text": "\n14 May, 2020" }, { "code": null, "e": 26868, "s": 26731, "text": "The embossed text effect can be easily generated using HTML and CSS. We will use the CSS text-shadow property to get the desired output." }, { "code": null...
Java - The SortedMap Interface
The SortedMap interface extends Map. It ensures that the entries are maintained in an ascending key order. Several methods throw a NoSuchElementException when no items are in the invoking map. A ClassCastException is thrown when an object is incompatible with the elements in a map. A NullPointerException is thrown if a...
[ { "code": null, "e": 2484, "s": 2377, "text": "The SortedMap interface extends Map. It ensures that the entries are maintained in an ascending key order." }, { "code": null, "e": 2773, "s": 2484, "text": "Several methods throw a NoSuchElementException when no items are in the inv...
Python program to create 3D list.
3D list means 3D array. In this program we create 3D array with integer elements. Input: 3× 3 × 2 [[1,1,1],[2,2,2],[3,3,3]], [[4,4,4],[5,5,5],[6,6,6]] Step 1: given the order of 3D list. Step 2: using for loop we create list and print data. # Python program to created 3D list import pprint def print3D(i, j, k): lst ...
[ { "code": null, "e": 1144, "s": 1062, "text": "3D list means 3D array. In this program we create 3D array with integer elements." }, { "code": null, "e": 1213, "s": 1144, "text": "Input: 3× 3 × 2\n[[1,1,1],[2,2,2],[3,3,3]],\n[[4,4,4],[5,5,5],[6,6,6]]" }, { "code": null, ...
What are multiple statement groups as suites in python?
A group of individual statements, which make a single code block are called suites in Python. Compound or complex statements, such as if, while, def, and class require a header line and a suite. Header lines begin the statement (with the keyword) and terminate with a colon (: ) and are followed by one or more lines whi...
[ { "code": null, "e": 1257, "s": 1062, "text": "A group of individual statements, which make a single code block are called suites in Python. Compound or complex statements, such as if, while, def, and class require a header line and a suite." }, { "code": null, "e": 1405, "s": 1257, ...
A Quick and Dirty Guide to Random Forest Regression | by Ashwin Raj | Towards Data Science
As machine learning practitioners, we come across a wide array of machine learning algorithms that we may apply to build our model. In this article I will try to give you an intuition of the concepts of how a Random Forest model works from scratch. This algorithm can be used for computing both Regression and classifica...
[ { "code": null, "e": 507, "s": 172, "text": "As machine learning practitioners, we come across a wide array of machine learning algorithms that we may apply to build our model. In this article I will try to give you an intuition of the concepts of how a Random Forest model works from scratch. This a...
Material UI Typography - GeeksforGeeks
05 Jan, 2021 Material-UI is a user interface library that provides pre-defined and customizable React components for faster and easy web development, these Material-UI components are based on top of Material Design by Google. In this article let’s discuss the Typography component in the Material-UI library. Typography:...
[ { "code": null, "e": 24916, "s": 24888, "text": "\n05 Jan, 2021" }, { "code": null, "e": 25212, "s": 24916, "text": "Material-UI is a user interface library that provides pre-defined and customizable React components for faster and easy web development, these Material-UI componen...
A quick run-through of Holt-Winters, Seasonal ARIMA and FB Prophet | by Ian Felton | Towards Data Science
github.com The link above will take you to the notebook where the following code is sourced. The purpose of this post is to show a quick run-through of Holt Winters, SARIMA and FB Prophet. I am skipping anything about parameter tuning as that could be multiple posts on its own. First, lets get out imports for Holt Wint...
[ { "code": null, "e": 183, "s": 172, "text": "github.com" }, { "code": null, "e": 265, "s": 183, "text": "The link above will take you to the notebook where the following code is sourced." }, { "code": null, "e": 451, "s": 265, "text": "The purpose of this post...
Permutation Feature Importance | Towards Data Science
Advanced topics in machine learning are dominated by black box models. As the name suggests, black box models are complex models where it’s extremely hard to understand how model inputs are combined to make predictions. Deep learning models like artificial neural networks and ensemble models like random forests, gradie...
[ { "code": null, "e": 673, "s": 172, "text": "Advanced topics in machine learning are dominated by black box models. As the name suggests, black box models are complex models where it’s extremely hard to understand how model inputs are combined to make predictions. Deep learning models like artificia...
Market Basket Analysis using PySpark | by Jesko Rehberg | Towards Data Science
Motivation: Do you want to learn how to analyze your customer market baskets regarding frequently bought together items? Look no further, if you are willing to work with PySpark’s FPGrowth. Solution: First of all, let us have a look at our dataframe (data is stored in my github repository). In case you want to use Goog...
[ { "code": null, "e": 184, "s": 172, "text": "Motivation:" }, { "code": null, "e": 362, "s": 184, "text": "Do you want to learn how to analyze your customer market baskets regarding frequently bought together items? Look no further, if you are willing to work with PySpark’s FPGrow...
Android - EditText Control
A EditText is an overlay over TextView that configures itself to be editable. It is the predefined subclass of TextView that includes rich editing capabilities. Following are the important attributes related to EditText control. You can check Android official documentation for complete list of attributes and related me...
[ { "code": null, "e": 3768, "s": 3607, "text": "A EditText is an overlay over TextView that configures itself to be editable. It is the predefined subclass of TextView that includes rich editing capabilities." }, { "code": null, "e": 3992, "s": 3768, "text": "Following are the imp...
How can I use multiple submit buttons in an HTML form?
yes, multiple submit buttons can include in the html form. One simple example is given below. Here I am using MVC VB.net.In view I am using three buttons with the same name but in different values. In the controller, I am using same name parameter(cmd) which is string type and compare with the value of button's value(S...
[ { "code": null, "e": 1156, "s": 1062, "text": "yes, multiple submit buttons can include in the html form. One simple example is given below." }, { "code": null, "e": 1404, "s": 1156, "text": "Here I am using MVC VB.net.In view I am using three buttons with the same name but in di...
C++ if...else statement
An if statement can be followed by an optional else statement, which executes when the boolean expression is false. The syntax of an if...else statement in C++ is − if(boolean_expression) { // statement(s) will execute if the boolean expression is true } else { // statement(s) will execute if the boolean expressio...
[ { "code": null, "e": 2434, "s": 2318, "text": "An if statement can be followed by an optional else statement, which executes when the boolean expression is false." }, { "code": null, "e": 2483, "s": 2434, "text": "The syntax of an if...else statement in C++ is −" }, { "co...
C# Enums
An enum is a special "class" that represents a group of constants (unchangeable/read-only variables). To create an enum, use the enum keyword (instead of class or interface), and separate the enum items with a comma: enum Level { Low, Medium, High } You can access enum items with the dot syntax: Level myVar =...
[ { "code": null, "e": 103, "s": 0, "text": "An enum is a special \"class\" that represents a group of \nconstants (unchangeable/read-only variables)." }, { "code": null, "e": 219, "s": 103, "text": "To create an enum, use the enum keyword (instead of class or interface), and separ...
Tailwind CSS Vertical Alignment - GeeksforGeeks
23 Mar, 2022 This class accepts more than one value in tailwind CSS. All the properties are covered in class form. It is the alternative to the CSS vertical-align property. This class is used to specify the vertical alignment of the table-box or inline element. Vertical Alignment classes: align-baseline: It aligns the ...
[ { "code": null, "e": 35749, "s": 35721, "text": "\n23 Mar, 2022" }, { "code": null, "e": 35998, "s": 35749, "text": "This class accepts more than one value in tailwind CSS. All the properties are covered in class form. It is the alternative to the CSS vertical-align property. Thi...
ES6 | Functions - GeeksforGeeks
20 Jul, 2021 The ES6 function is the same as a normal function, but ES6 has some differences. A function is a set of instruction that takes some inputs, do some specific task and produce output. A function is a set of codes that can be reused in the program at any time. Syntax: function func-name() { // body } ...
[ { "code": null, "e": 24909, "s": 24881, "text": "\n20 Jul, 2021" }, { "code": null, "e": 25168, "s": 24909, "text": "The ES6 function is the same as a normal function, but ES6 has some differences. A function is a set of instruction that takes some inputs, do some specific task a...
Compare Amazon Textract with Tesseract OCR — OCR & NLP Use Case | by Manoj Kukreja | Towards Data Science
What is OCR anyway and why the buzz? Artificial Intelligence (AI) enables entities with Human Intelligence (us) process data at a large scale — faster and cheaper. Unarguably, a large portion of data is saved digitally- easy to read and analyze. However there is a significant portion of data that is stored in physical ...
[ { "code": null, "e": 801, "s": 172, "text": "What is OCR anyway and why the buzz? Artificial Intelligence (AI) enables entities with Human Intelligence (us) process data at a large scale — faster and cheaper. Unarguably, a large portion of data is saved digitally- easy to read and analyze. However t...
How to count the total number of links in Selenium with python?
We can count the total number of links in a page in Selenium with the help of find_elements method. While working on links, we will always find the tagname in the html code and its value should be anchor (a). This characteristic is only applicable to links on that particular page and to no other types of UI elements li...
[ { "code": null, "e": 1271, "s": 1062, "text": "We can count the total number of links in a page in Selenium with the help of find_elements method. While working on links, we will always find the tagname in the html code and its value should be anchor (a)." }, { "code": null, "e": 1420, ...
Python - Extension Programming with C
Any code that you write using any compiled language like C, C++, or Java can be integrated or imported into another Python script. This code is considered as an "extension." A Python extension module is nothing more than a normal C library. On Unix machines, these libraries usually end in .so (for shared object). On Wi...
[ { "code": null, "e": 2418, "s": 2244, "text": "Any code that you write using any compiled language like C, C++, or Java can be integrated or imported into another Python script. This code is considered as an \"extension.\"" }, { "code": null, "e": 2637, "s": 2418, "text": "A Pyth...
A complete guide to building a Docker Image serving a Machine learning system in Production | by Akash Desarda | Towards Data Science
Building a Docker image is generally considered trivial compared to developing other components of a ML system like data pipeline, model training, serving infra, etc. But an inefficient, bulky docker image can greatly reduce performance and can even bring down the serving infra. This blog aims to focus on building an i...
[ { "code": null, "e": 452, "s": 172, "text": "Building a Docker image is generally considered trivial compared to developing other components of a ML system like data pipeline, model training, serving infra, etc. But an inefficient, bulky docker image can greatly reduce performance and can even bring...
HTML DOM Image Object
The HTML DOM image Object represents the <img> element of an HTML document. Let us create an img object − Following is the syntax − document.createElement(“IMG”); Following are the properties of image Object − Let us see an example of HTML DOM image object − Live Demo <!DOCTYPE html> <html> <head> <style> body{ ...
[ { "code": null, "e": 1138, "s": 1062, "text": "The HTML DOM image Object represents the <img> element of an HTML document." }, { "code": null, "e": 1168, "s": 1138, "text": "Let us create an img object −" }, { "code": null, "e": 1194, "s": 1168, "text": "Follo...
Linux Admin - Create SSL Certificates
TLS is the new standard for socket layer security, proceeding SSL. TLS offers better encryption standards with other security and protocol wrapper features advancing SSL. Often, the terms TLS and SSL are used interchangeably. However, as a professional CentOS Administrator, it is important to note the differences and h...
[ { "code": null, "e": 2601, "s": 2257, "text": "TLS is the new standard for socket layer security, proceeding SSL. TLS offers better encryption standards with other security and protocol wrapper features advancing SSL. Often, the terms TLS and SSL are used interchangeably. However, as a professional ...
Java ResultSetMetaData getTableName() method with example.
The getTableName() method of the ResultSetMetaData (interface) retrieves and displays the name of the table which contains the given column. This method accepts an integer value representing the index of a column and, returns a String value representing the name of the table that contains the given column. To get the R...
[ { "code": null, "e": 1203, "s": 1062, "text": "The getTableName() method of the ResultSetMetaData (interface) retrieves and displays the name of the table which contains the given column." }, { "code": null, "e": 1370, "s": 1203, "text": "This method accepts an integer value repr...
GATE | GATE-CS-2016 (Set 2) | Question 21
12 Aug, 2021 Breadth First Search (BFS) is started on a binary tree beginning from the root vertex. There is a vertex t at a distance four from the root. If t is the n-th vertex in this BFS traversal, then the maximum possible value of n is ________ [This Question was originally a Fill-in-the-blanks Question] (A) 15(B)...
[ { "code": null, "e": 28, "s": 0, "text": "\n12 Aug, 2021" }, { "code": null, "e": 265, "s": 28, "text": "Breadth First Search (BFS) is started on a binary tree beginning from the root vertex. There is a vertex t at a distance four from the root. If t is the n-th vertex in this BF...
Java IO FileReader Class
09 Feb, 2022 FileReader is a class in the java.io package which can be used to read a stream of characters from the files. This class uses either specified charset or the platform’s default charset for decoding from bytes to characters. Charset: The Charset class is used to define methods for producing encoders and dec...
[ { "code": null, "e": 28, "s": 0, "text": "\n09 Feb, 2022" }, { "code": null, "e": 252, "s": 28, "text": "FileReader is a class in the java.io package which can be used to read a stream of characters from the files. This class uses either specified charset or the platform’s defaul...
Navigation Drawer in Android
06 May, 2022 The navigation drawer is the most common feature offered by android and the navigation drawer is a UI panel that shows your app’s main navigation menu. It is also one of the important UI elements, which provides actions preferable to the users like example changing user profile, changing settings of the ap...
[ { "code": null, "e": 52, "s": 24, "text": "\n06 May, 2022" }, { "code": null, "e": 475, "s": 52, "text": "The navigation drawer is the most common feature offered by android and the navigation drawer is a UI panel that shows your app’s main navigation menu. It is also one of the ...
Disk Scheduling Algorithms
24 Feb, 2022 Disk scheduling is done by operating systems to schedule I/O requests arriving for the disk. Disk scheduling is also known as I/O scheduling. Disk scheduling is important because: Multiple I/O requests may arrive by different processes and only one I/O request can be served at a time by the disk control...
[ { "code": null, "e": 52, "s": 24, "text": "\n24 Feb, 2022" }, { "code": null, "e": 195, "s": 52, "text": "Disk scheduling is done by operating systems to schedule I/O requests arriving for the disk. Disk scheduling is also known as I/O scheduling. " }, { "code": null, ...
Drop Shadow with HTML5 Canvas
HTML5 canvas provides capabilities to create nice shadows around the drawings. All drawing operations are affected by the four global shadow attributes. You can try to run the following code to create shadows: <!DOCTYPE HTML> <html> <head> <style> #test { width: 100px; height:1...
[ { "code": null, "e": 1340, "s": 1187, "text": "HTML5 canvas provides capabilities to create nice shadows around the drawings. All drawing operations are affected by the four global shadow attributes." }, { "code": null, "e": 1397, "s": 1340, "text": "You can try to run the follow...
jQuery UI Datepicker beforeShowDay Option
02 Dec, 2021 The jQuery UI beforeShowDay is an option in Datepicker. By using this option we can call any function by using each day. This is executed before showing the calendar. We don’t want some days to be selected by users (say all tickets for that day is sold-out) then we can apply this option and disable the day...
[ { "code": null, "e": 28, "s": 0, "text": "\n02 Dec, 2021" }, { "code": null, "e": 195, "s": 28, "text": "The jQuery UI beforeShowDay is an option in Datepicker. By using this option we can call any function by using each day. This is executed before showing the calendar." }, ...
MATLAB – Butterworth Highpass Filter in Image Processing
10 May, 2020 In the field of Image Processing, Butterworth Highpass Filter (BHPF) is used for image sharpening in the frequency domain. Image Sharpening is a technique to enhance the fine details and highlight the edges in a digital image. It removes low-frequency components from an image and preserves high-frequency c...
[ { "code": null, "e": 54, "s": 26, "text": "\n10 May, 2020" }, { "code": null, "e": 372, "s": 54, "text": "In the field of Image Processing, Butterworth Highpass Filter (BHPF) is used for image sharpening in the frequency domain. Image Sharpening is a technique to enhance the fine...
Availability in Information Security
24 Jan, 2020 Prerequisite – Information SecurityAvailability is one of the three basic functions of security management that are present in all systems. Availability is the assertion that a computer system is available or accessible by an authorized user whenever it is needed. Systems have high order of availability to...
[ { "code": null, "e": 28, "s": 0, "text": "\n24 Jan, 2020" }, { "code": null, "e": 573, "s": 28, "text": "Prerequisite – Information SecurityAvailability is one of the three basic functions of security management that are present in all systems. Availability is the assertion that ...
How to convert multiple numerical variables to factor variable in R?
Sometimes the data type for a variable is not correct and it is very common that a factor variable is read as a numeric variable, especially in cases where factor levels are represented by numbers. If we do not change the data type of a factor variable then the result of the analysis will be incorrect. Therefore, if a ...
[ { "code": null, "e": 1770, "s": 1187, "text": "Sometimes the data type for a variable is not correct and it is very common that a factor variable is read as a numeric variable, especially in cases where factor levels are represented by numbers. If we do not change the data type of a factor variable ...
HashMap getOrDefault(key, defaultValue) method in Java with Examples
15 Oct, 2019 The getOrDefault(Object key, V defaultValue) method of Map interface, implemented by HashMap class is used to get the value mapped with specified key. If no value is mapped with the provided key then the default value is returned. Syntax: default V getOrDefault(Object key, V defaultValue) Parameters: This ...
[ { "code": null, "e": 53, "s": 25, "text": "\n15 Oct, 2019" }, { "code": null, "e": 284, "s": 53, "text": "The getOrDefault(Object key, V defaultValue) method of Map interface, implemented by HashMap class is used to get the value mapped with specified key. If no value is mapped w...
Inflater inflate() function in Java with examples
24 Jun, 2019 The inflate() function of the Inflater class is used to uncompress the input data and fill the given buffer with the uncompressed data. The function returns the number of bytes of the uncompressed data. Function Signature: public int inflate(byte[] b) public int inflate(byte[] b, int offset, int length) S...
[ { "code": null, "e": 28, "s": 0, "text": "\n24 Jun, 2019" }, { "code": null, "e": 231, "s": 28, "text": "The inflate() function of the Inflater class is used to uncompress the input data and fill the given buffer with the uncompressed data. The function returns the number of byte...
Maximum Sum Alternating Subarray
18 Nov, 2021 Given an array arr[] of size N, the task is to find the maximum alternating sum of a subarray possible for a given array. Alternating Subarray Sum: Considering a subarray {arr[i], arr[j]}, alternating sum of the subarray is arr[i] – arr[i + 1] + arr[i + 2] – ........ (+ / -) arr[j]. Examples: Input: arr[]...
[ { "code": null, "e": 52, "s": 24, "text": "\n18 Nov, 2021" }, { "code": null, "e": 174, "s": 52, "text": "Given an array arr[] of size N, the task is to find the maximum alternating sum of a subarray possible for a given array." }, { "code": null, "e": 337, "s": 1...
How to use JavaScript variables in jQuery selectors ?
03 Aug, 2021 In this article, we will discuss how to use JavaScript variables in jQuery selectors. In the following examples, it can be seen that we have used the values stored in JavaScript Variables are used inside the jQuery Selectors. Example 1: The concatenation technique can be applied in order to use the values ...
[ { "code": null, "e": 52, "s": 24, "text": "\n03 Aug, 2021" }, { "code": null, "e": 278, "s": 52, "text": "In this article, we will discuss how to use JavaScript variables in jQuery selectors. In the following examples, it can be seen that we have used the values stored in JavaScr...
jQuery | insertAfter() with Examples
03 Aug, 2021 The insertAfter() is an inbuilt method in jQuery which is used to insert some HTML content after a specified element. The HTML content will be inserted after each occurrence of the specified element.Syntax: $(content).insertAfter(target) Here the “content” is the HTML content which is to be inserted after...
[ { "code": null, "e": 28, "s": 0, "text": "\n03 Aug, 2021" }, { "code": null, "e": 235, "s": 28, "text": "The insertAfter() is an inbuilt method in jQuery which is used to insert some HTML content after a specified element. The HTML content will be inserted after each occurrence o...
PHP | gettype() Function
31 Jul, 2021 The gettype() function is an inbuilt function in PHP which is used to get the type of a variable. It is used to check the type of existing variable. Syntax: string gettype ( $var ) Parameter: This function accepts a single parameter $var. It is the name of variable which is needed to be checked for type o...
[ { "code": null, "e": 28, "s": 0, "text": "\n31 Jul, 2021" }, { "code": null, "e": 177, "s": 28, "text": "The gettype() function is an inbuilt function in PHP which is used to get the type of a variable. It is used to check the type of existing variable." }, { "code": null...
Minimum number of square tiles required to fill the rectangular floor
14 May, 2021 Given a rectanglular floor of (M X N) meters is to be paved with square tiles of (s X s). The task is to find the minimum number of tiles required to pave the rectangular floor. Constraints: It’s allowed to cover the surface larger than the floor, but the floor has to be covered.It’s not allowed to break...
[ { "code": null, "e": 54, "s": 26, "text": "\n14 May, 2021" }, { "code": null, "e": 233, "s": 54, "text": "Given a rectanglular floor of (M X N) meters is to be paved with square tiles of (s X s). The task is to find the minimum number of tiles required to pave the rectangular flo...
\Lambda - Tex Command
\Lambda - Used to draw uppercase Lambda symbol. { \Lambda } \Lambda command is used to draw uppercase Lambda symbol. \Lambda Λ \Lambda Λ \Lambda 14 Lectures 52 mins Ashraf Said 11 Lectures 1 hours Ashraf Said 9 Lectures 1 hours Emenwa Global, Ejike IfeanyiChukwu 29 ...
[ { "code": null, "e": 8034, "s": 7986, "text": "\\Lambda - Used to draw uppercase Lambda symbol." }, { "code": null, "e": 8046, "s": 8034, "text": "{ \\Lambda }" }, { "code": null, "e": 8103, "s": 8046, "text": "\\Lambda command is used to draw uppercase Lambda...
wxPython - Add submenu in Menu - GeeksforGeeks
15 May, 2020 In this article we are going to learn How can we add submenu to a Menuitem inside a Menu present on MenuBar. In this we use AppendMenu() function rather than just using Append(). Steps :1. Create a MenuBar in frame using MenuBar() constructor.2. Add menu to the menu bar.3. Create wx.Menu for Menuitem.4. Ad...
[ { "code": null, "e": 26221, "s": 26193, "text": "\n15 May, 2020" }, { "code": null, "e": 26400, "s": 26221, "text": "In this article we are going to learn How can we add submenu to a Menuitem inside a Menu present on MenuBar. In this we use AppendMenu() function rather than just ...
Lambda Functions in LISP - GeeksforGeeks
09 Nov, 2021 In this article, we will discuss lambda functions in LISP. The Lambda function is used to evaluate a mathematical expression in our program. They are also known as anonymous functions. We can create these functions using lambda expression. Syntax: (lambda (parameters) expression_code) where, The parameters...
[ { "code": null, "e": 24919, "s": 24891, "text": "\n09 Nov, 2021" }, { "code": null, "e": 25104, "s": 24919, "text": "In this article, we will discuss lambda functions in LISP. The Lambda function is used to evaluate a mathematical expression in our program. They are also known as...
Merge Without Extra Space | Practice | GeeksforGeeks
Given two sorted arrays arr1[] and arr2[] of sizes n and m in non-decreasing order. Merge them in sorted order without using any extra space. Modify arr1 so that it contains the first N elements and modify arr2 so that it contains the last M elements. Example 1: Input: n = 4, arr1[] = [1 3 5 7] m = 5, arr2[] = [0 ...
[ { "code": null, "e": 545, "s": 290, "text": "Given two sorted arrays arr1[] and arr2[] of sizes n and m in non-decreasing order. Merge them in sorted order without using any extra space. Modify arr1 so that it contains the first N elements and modify arr2 so that it contains the last M elements. \n ...
How to adjust the size of a Matplotlib legend box?
To adjust the size of a matplotlib legend box, we can use borderpad arguments in the legend method. Create line1 and line2 using two lists with different line widths. Create line1 and line2 using two lists with different line widths. To place a legend on the figure and to adjust the size of legend box, use borderpad=2 ...
[ { "code": null, "e": 1162, "s": 1062, "text": "To adjust the size of a matplotlib legend box, we can use borderpad arguments in the legend method." }, { "code": null, "e": 1229, "s": 1162, "text": "Create line1 and line2 using two lists with different line widths." }, { "...
How regular expression back references works in Python?
We group part of a regular expression by enclosing it in a pair of parentheses. This way we apply operators to the group instead of a single character. Parentheses not only group sub-expressions but they also create backreferences. The part of the string matched by the grouped part of the regular expression, is stored ...
[ { "code": null, "e": 1214, "s": 1062, "text": "We group part of a regular expression by enclosing it in a pair of parentheses. This way we apply operators to the group instead of a single character." }, { "code": null, "e": 1473, "s": 1214, "text": "Parentheses not only group sub...
Tokenize a string in C++?
First way is using a stringstream to read words seperated by spaces. This is a little limited but does the task fairly well if you provide the proper checks. #include <vector> #include <string> #include <sstream> using namespace std; int main() { string str("Hello from the dark side"); string tmp; // A string ...
[ { "code": null, "e": 1221, "s": 1062, "text": "First way is using a stringstream to read words seperated by spaces. This is a little limited but does the task fairly well if you provide the proper checks. " }, { "code": null, "e": 1712, "s": 1221, "text": "#include <vector>\n#inc...
JavaFx | PasswordField - GeeksforGeeks
27 Jun, 2018 PasswordField class is a part of JavaFX package. It is a Text field that masks entered characters (the characters that are entered are not shown to the user). It allows the user to enter a single-line of unformatted text, hence it does not allow multi-line input. Constructor of the PasswordField class : Pa...
[ { "code": null, "e": 25237, "s": 25209, "text": "\n27 Jun, 2018" }, { "code": null, "e": 25501, "s": 25237, "text": "PasswordField class is a part of JavaFX package. It is a Text field that masks entered characters (the characters that are entered are not shown to the user). It a...
HTML <table> align Attribute - GeeksforGeeks
22 Feb, 2022 The HTML <table> align Attribute is used to specify the alignment of the table and its content. Note : This attribute is not supported by HTML5. Syntax: <table align="left | right | center"> Attribute Values: left: It sets the left align to the table. It is a default value. right: It sets the right align t...
[ { "code": null, "e": 24686, "s": 24658, "text": "\n22 Feb, 2022" }, { "code": null, "e": 24782, "s": 24686, "text": "The HTML <table> align Attribute is used to specify the alignment of the table and its content." }, { "code": null, "e": 24831, "s": 24782, "te...
Water Overflow | Practice | GeeksforGeeks
There is a stack of water glasses in a form of pascal triangle and a person wants to pour the water at the topmost glass, but the capacity of each glass is 1 unit. Overflow takes place in such a way that after 1 unit, 1/2 of remaining unit gets into bottom left glass and other half in bottom right glass.Now John pours ...
[ { "code": null, "e": 671, "s": 238, "text": "There is a stack of water glasses in a form of pascal triangle and a person wants to pour the water at the topmost glass, but the capacity of each glass is 1 unit. Overflow takes place in such a way that after 1 unit, 1/2 of remaining unit gets into botto...
Python Tweepy – Getting the URL of a user - GeeksforGeeks
18 Jun, 2020 In this article we will see how we can get the URL of a user. The url attribute is a URL provided by the user in association with their profile. The URL attribute is optional and is Nullable. Identifying the URL in the GUI : In the above mentioned profile the url is : geeksforgeeks.org In order to get the ...
[ { "code": null, "e": 25899, "s": 25871, "text": "\n18 Jun, 2020" }, { "code": null, "e": 26091, "s": 25899, "text": "In this article we will see how we can get the URL of a user. The url attribute is a URL provided by the user in association with their profile. The URL attribute ...
How to check whether a string contains a substring in jQuery?
The jQuery :contains() Selector is used to check whether a string contains a substring in jQuery. Set the substring you are searching for in the contains() method as shown below: $(document).ready(function(){ $("p:contains(Video)").css("background-color", "blue"); }); Now, let us see the complete code to check wheth...
[ { "code": null, "e": 1160, "s": 1062, "text": "The jQuery :contains() Selector is used to check whether a string contains a substring in jQuery." }, { "code": null, "e": 1241, "s": 1160, "text": "Set the substring you are searching for in the contains() method as shown below:" ...
How to use input type field with date field in HTML?
The <input type="date"> is for input fields with date. It allows to easily entering the date with day, month and year. You can get user input for birthday date, registration date, etc. A datepicker will be visible when you will try to add a date in the input type. Note − The input type date is not supported by Firefox ...
[ { "code": null, "e": 1247, "s": 1062, "text": "The <input type=\"date\"> is for input fields with date. It allows to easily entering the date with day, month and year. You can get user input for birthday date, registration date, etc." }, { "code": null, "e": 1327, "s": 1247, "tex...
Difference between apply() and transform() in Pandas | by B. Chen | Towards Data Science
Pandas is an amazing library that contains extensive built-in functions for manipulating data. When looking for applying a custom function, you might be confusing with the following two choices: apply(func, axis=0): call a function func along an axis of the DataFrame. It returns the result of applying func along the gi...
[ { "code": null, "e": 367, "s": 172, "text": "Pandas is an amazing library that contains extensive built-in functions for manipulating data. When looking for applying a custom function, you might be confusing with the following two choices:" }, { "code": null, "e": 502, "s": 367, ...
Elements greater than the previous and next element in an Array in C++
In this problem, we are given an array arr[] of n positive integers. Our task is to create a program to find the elements greater than the previous and next element in an Array. Code Description: We need to find the elements of the array that satisfy the condition, the element is greater that the element at index 1 le...
[ { "code": null, "e": 1241, "s": 1062, "text": "In this problem, we are given an array arr[] of n positive integers. Our task is to create a program to find the elements greater than the previous and next element in an Array. " }, { "code": null, "e": 1458, "s": 1241, "text": "Cod...
Combine SUM and FORMAT in MySQL to format the result
Let us create a table − mysql> create table DemoTable1950 ( Amount float ); Query OK, 0 rows affected (0.00 sec) Insert some records in the table using insert command − mysql> insert into DemoTable1950 values(45.60); Query OK, 1 row affected (0.00 sec) mysql> insert into DemoTable1950 values(101.78); Query OK,...
[ { "code": null, "e": 1086, "s": 1062, "text": "Let us create a table −" }, { "code": null, "e": 1184, "s": 1086, "text": "mysql> create table DemoTable1950\n (\n Amount float\n );\nQuery OK, 0 rows affected (0.00 sec)" }, { "code": null, "e": 1240, "s": 1184...
numpy.divide() in Python
29 Nov, 2018 numpy.divide(arr1, arr2, out = None, where = True, casting = ‘same_kind’, order = ‘K’, dtype = None) :Array element from first array is divided by elements from second element (all happens element-wise). Both arr1 and arr2 must have same shape and element in arr2 must not be zero; otherwise it will raise a...
[ { "code": null, "e": 28, "s": 0, "text": "\n29 Nov, 2018" }, { "code": null, "e": 344, "s": 28, "text": "numpy.divide(arr1, arr2, out = None, where = True, casting = ‘same_kind’, order = ‘K’, dtype = None) :Array element from first array is divided by elements from second element...
Signup Form Using Node.js and MongoDB
14 Oct, 2021 InstallationsFirst, we need to include a few packages for our Nodejs application. npm install express --save Express allows us to set up middlewares to respond to HTTP Requests. npm install body-parser --save If you want to read HTTP POST data , you have to use the “body-parser” node module. npm install mo...
[ { "code": null, "e": 54, "s": 26, "text": "\n14 Oct, 2021" }, { "code": null, "e": 136, "s": 54, "text": "InstallationsFirst, we need to include a few packages for our Nodejs application." }, { "code": null, "e": 163, "s": 136, "text": "npm install express --s...
Longest subarray forming an Arithmetic Progression (AP)
27 Dec, 2021 Given an array arr[] of size, N, the task is to find the length of the longest subarray that forms an Arithmetic Progression.Examples: Input: arr[] = {3, 4, 5}Output: 3Explanation:The longest subarray forming an AP is {3, 4, 5} with common difference 1.Input: {10, 7, 4, 6, 8, 10, 11}Output: 4Explanation:Th...
[ { "code": null, "e": 52, "s": 24, "text": "\n27 Dec, 2021" }, { "code": null, "e": 187, "s": 52, "text": "Given an array arr[] of size, N, the task is to find the length of the longest subarray that forms an Arithmetic Progression.Examples:" }, { "code": null, "e": 44...
HTML5 | Mathematical operators
03 Dec, 2018 Mathematical Operators are used for representation of mathematical and technical operators. In HTML5 some special codes are used. For the representation of these operators we can use the name or hexadecimal(Hex) reference. Examples: Input : &minus or &#8722 Output : - Input : &times or &#215 Output : x In...
[ { "code": null, "e": 53, "s": 25, "text": "\n03 Dec, 2018" }, { "code": null, "e": 276, "s": 53, "text": "Mathematical Operators are used for representation of mathematical and technical operators. In HTML5 some special codes are used. For the representation of these operators we...
Perl | eof – End of File Function
17 Dec, 2019 The eof() function is used to check if the End Of File (EOF) is reached. It returns 1 if EOF is reached or if the FileHandle is not open and undef in all other cases. Syntax: eof(FileHandle) Parameter:FileHandle: used to open the file Returns: 1 if EOF is reached Cases: eof(FileHandle) : Passing FileHandle...
[ { "code": null, "e": 28, "s": 0, "text": "\n17 Dec, 2019" }, { "code": null, "e": 195, "s": 28, "text": "The eof() function is used to check if the End Of File (EOF) is reached. It returns 1 if EOF is reached or if the FileHandle is not open and undef in all other cases." }, ...
SQL Query to Find the Name of a Person Whose Name Starts with Specific Letter
26 Jun, 2021 Here, we are going to see how to find the name of a person whose name starts with a specified letter in SQL. In this article, we will be making use of the Microsoft SQL Server as our database. For example, finding the name of the person whose name starts with the letter “H”. We will use the % symbol after...
[ { "code": null, "e": 53, "s": 25, "text": "\n26 Jun, 2021" }, { "code": null, "e": 246, "s": 53, "text": "Here, we are going to see how to find the name of a person whose name starts with a specified letter in SQL. In this article, we will be making use of the Microsoft SQL Serve...
C Program for Bubble Sort
13 Jun, 2022 Bubble Sort is the simplest sorting algorithm that works by repeatedly swapping the adjacent elements if they are in wrong order. C // C program for implementation of Bubble sort#include <stdio.h>void swap(int *xp, int *yp){int temp = *xp;*xp = *yp;*yp = temp;}// A function to implement bubble sortvoid bub...
[ { "code": null, "e": 52, "s": 24, "text": "\n13 Jun, 2022" }, { "code": null, "e": 182, "s": 52, "text": "Bubble Sort is the simplest sorting algorithm that works by repeatedly swapping the adjacent elements if they are in wrong order." }, { "code": null, "e": 184, ...
How to Retrieve Blog On Home Page in Social Media Android App?
17 Jun, 2021 This is the Part 6 of “Build a Social Media App in Android Studio” tutorial, and we are going to cover the following functionalities in this article: We are going to retrieve the blogs written by users on HomeFragment. Here we have only shown the user data and title, description, and image of the blogs, bu...
[ { "code": null, "e": 54, "s": 26, "text": "\n17 Jun, 2021" }, { "code": null, "e": 204, "s": 54, "text": "This is the Part 6 of “Build a Social Media App in Android Studio” tutorial, and we are going to cover the following functionalities in this article:" }, { "code": nu...
How to avoid overflow in modular multiplication?
27 May, 2022 Consider below simple method to multiply two numbers. C Java Python C# Javascript // A Simple solution that causes overflow when// value of (a % mod) * (b % mod) becomes more than// maximum value of long long int#define ll long long ll multiply(ll a, ll b, ll mod){ return ((a % mod) * (b % mod)) % mod;}...
[ { "code": null, "e": 54, "s": 26, "text": "\n27 May, 2022" }, { "code": null, "e": 109, "s": 54, "text": "Consider below simple method to multiply two numbers. " }, { "code": null, "e": 111, "s": 109, "text": "C" }, { "code": null, "e": 116, "s...
Sort an almost sorted array where only two elements are swapped
23 May, 2022 Given an almost sorted array where only two elements are swapped, how to sort the array efficiently?Examples : Input: arr[] = {10, 20, 60, 40, 50, 30} // 30 and 60 are swapped Output: arr[] = {10, 20, 30, 40, 50, 60} Input: arr[] = {10, 20, 40, 30, 50, 60} // 30 and 40 are swapped Output: arr[] = {1...
[ { "code": null, "e": 52, "s": 24, "text": "\n23 May, 2022" }, { "code": null, "e": 163, "s": 52, "text": "Given an almost sorted array where only two elements are swapped, how to sort the array efficiently?Examples :" }, { "code": null, "e": 460, "s": 163, "te...
Spearman Correlation Testing in R Programming
30 Jun, 2022 The strength of the association between two variables is known as the correlation test. For instance, if one is interested to know whether there is a relationship between the weights of mothers and daughters, a correlation coefficient can be calculated to answer this question. To know more about correlatio...
[ { "code": null, "e": 28, "s": 0, "text": "\n30 Jun, 2022" }, { "code": null, "e": 363, "s": 28, "text": "The strength of the association between two variables is known as the correlation test. For instance, if one is interested to know whether there is a relationship between the ...
MySQL | Recursive CTE (Common Table Expressions)
03 Jan, 2022 What is a CTE? In MySQL every query generates a temporary result or relation. In order to give a name to those temporary result set, CTE is used. A CTE is defined using WITH clause. Using WITH clause we can define more than one CTEs in a single statement. A CTE can be referenced in the other CTEs that are ...
[ { "code": null, "e": 52, "s": 24, "text": "\n03 Jan, 2022" }, { "code": null, "e": 67, "s": 52, "text": "What is a CTE?" }, { "code": null, "e": 198, "s": 67, "text": "In MySQL every query generates a temporary result or relation. In order to give a name to th...
How to add or remove multiple classes to a ReactJS Component?
28 Dec, 2020 There are the following approaches to add or remove multiple classes to a ReactJS Component: Approach 1: We can use the classNames Method (A simple JavaScript utility for conditionally joining classNames together). The classNames function takes any number of arguments which can be a string or object. The a...
[ { "code": null, "e": 28, "s": 0, "text": "\n28 Dec, 2020" }, { "code": null, "e": 121, "s": 28, "text": "There are the following approaches to add or remove multiple classes to a ReactJS Component:" }, { "code": null, "e": 330, "s": 121, "text": "Approach 1: W...
Longest Common Subsequence | Practice | GeeksforGeeks
Given two sequences, find the length of longest subsequence present in both of them. Both the strings are of uppercase. Example 1: Input: A = 6, B = 6 str1 = ABCDGH str2 = AEDFHR Output: 3 Explanation: LCS for input Sequences “ABCDGH” and “AEDFHR” is “ADH” of length 3. Example 2: Input: A = 3, B = 2 str1 = ABC str2 = ...
[ { "code": null, "e": 358, "s": 238, "text": "Given two sequences, find the length of longest subsequence present in both of them. Both the strings are of uppercase." }, { "code": null, "e": 369, "s": 358, "text": "Example 1:" }, { "code": null, "e": 509, "s": 369,...
Write a program to calculate pow(x,n)
27 Jun, 2022 Given two integers x and n, write a function to compute xn. We may assume that x and n are small and overflow doesn’t happen. Examples : Input : x = 2, n = 3 Output : 8 Input : x = 7, n = 2 Output : 49 Below solution divides the problem into subproblems of size y/2 and call the subproblems recursively. C...
[ { "code": null, "e": 52, "s": 24, "text": "\n27 Jun, 2022" }, { "code": null, "e": 178, "s": 52, "text": "Given two integers x and n, write a function to compute xn. We may assume that x and n are small and overflow doesn’t happen." }, { "code": null, "e": 190, "s...
Ways to sort list of dictionaries by values in Python – Using itemgetter
05 Jul, 2022 In this article, we will cover how to sort a dictionary by value in Python. To sort a list of dictionaries by the value of the specific key in Python we will use the following method in this article. In everyday programming, sorting has always been a helpful tool. Python’s dictionary is frequently utilized...
[ { "code": null, "e": 54, "s": 26, "text": "\n05 Jul, 2022" }, { "code": null, "e": 254, "s": 54, "text": "In this article, we will cover how to sort a dictionary by value in Python. To sort a list of dictionaries by the value of the specific key in Python we will use the followin...
What is PERN Stack?
25 Sep, 2020 This stack consists of PostgreSQL, Express, React and Node.js. Combining these technologies, one can build a full-stack web application with CRUD operations. Everyone must have heard about MERN Stack which is basically a JavaScript Stack for the deployment of full-stack web development and contains 4 techn...
[ { "code": null, "e": 54, "s": 26, "text": "\n25 Sep, 2020" }, { "code": null, "e": 584, "s": 54, "text": "This stack consists of PostgreSQL, Express, React and Node.js. Combining these technologies, one can build a full-stack web application with CRUD operations. Everyone must ha...
GATE | GATE-CS-2016 (Set 1) | Question 60
22 Sep, 2021 Consider the following proposed solution for the critical section problem. There are n processes: P0 ...Pn−1. In the code, function pmax returns an integer not smaller than any of its arguments. For all i, t[i] is initialized to zero. Which one of the following is TRUE about the above solution?(A) At most ...
[ { "code": null, "e": 54, "s": 26, "text": "\n22 Sep, 2021" }, { "code": null, "e": 289, "s": 54, "text": "Consider the following proposed solution for the critical section problem. There are n processes: P0 ...Pn−1. In the code, function pmax returns an integer not smaller than a...
Python | Reverse All Strings in String List
27 Feb, 2020 Given a list, we always come across situations in which we require to apply certain function to each element in a list. This can be easily done by applying a loop and performing an operation to each element. But having shorthands to solve this problem is always beneficial and helps to focus more on importa...
[ { "code": null, "e": 53, "s": 25, "text": "\n27 Feb, 2020" }, { "code": null, "e": 485, "s": 53, "text": "Given a list, we always come across situations in which we require to apply certain function to each element in a list. This can be easily done by applying a loop and perform...
Python | Pandas Timestamp.nanosecond
08 Jan, 2019 Python is a great language for doing data analysis, primarily because of the fantastic ecosystem of data-centric python packages. Pandas is one of those packages and makes importing and analyzing data much easier. Pandas Timestamp.nanosecond attribute return the nanosecond value of the given Timestamp obje...
[ { "code": null, "e": 28, "s": 0, "text": "\n08 Jan, 2019" }, { "code": null, "e": 242, "s": 28, "text": "Python is a great language for doing data analysis, primarily because of the fantastic ecosystem of data-centric python packages. Pandas is one of those packages and makes imp...
Universal Serial Bus (USB) in Computer Network
24 Sep, 2021 Universal Serial Bus (USB) is an industry-standard that establishes specifications for connectors, cables, and protocols for communication, connection, and power supply between personal computers and their peripheral devices. There have been 3 generations of USB specifications: 1. USB 1.x 2. USB 2.0 3. US...
[ { "code": null, "e": 28, "s": 0, "text": "\n24 Sep, 2021" }, { "code": null, "e": 308, "s": 28, "text": "Universal Serial Bus (USB) is an industry-standard that establishes specifications for connectors, cables, and protocols for communication, connection, and power supply betwee...
Writing Tests using Selenium Python
29 Dec, 2021 Selenium’s Python Module is built to perform automated testing with Python. Selenium Python bindings provides a simple API to write functional/acceptance tests using Selenium WebDriver. Through Selenium Python API you can access all functionalities of Selenium WebDriver in an intuitive way. This article il...
[ { "code": null, "e": 53, "s": 25, "text": "\n29 Dec, 2021" }, { "code": null, "e": 770, "s": 53, "text": "Selenium’s Python Module is built to perform automated testing with Python. Selenium Python bindings provides a simple API to write functional/acceptance tests using Selenium...
Converting a PySpark DataFrame Column to a Python List
01 Dec, 2021 In this article, we will discuss how to convert Pyspark dataframe column to a Python list. Creating dataframe for demonstration: Python3 # importing moduleimport pyspark # importing sparksession from pyspark.sql modulefrom pyspark.sql import SparkSession # creating sparksession and giving an app namespark ...
[ { "code": null, "e": 28, "s": 0, "text": "\n01 Dec, 2021" }, { "code": null, "e": 119, "s": 28, "text": "In this article, we will discuss how to convert Pyspark dataframe column to a Python list." }, { "code": null, "e": 157, "s": 119, "text": "Creating datafr...
ReactJS | Types of Routers
16 Oct, 2021 On the basis of the part of URL that the router will use to track the content that the user is trying to view, React Router provides three different kinds of routers: Memory Router Browser Router Hash Router Pre-requisite: Before start this article you need to have basic knowledge of React Router.Memory R...
[ { "code": null, "e": 52, "s": 24, "text": "\n16 Oct, 2021" }, { "code": null, "e": 220, "s": 52, "text": "On the basis of the part of URL that the router will use to track the content that the user is trying to view, React Router provides three different kinds of routers: " }, ...
GUI Application for Live Cricket scoreboard Using Python
04 Dec, 2021 In this article, we will see how sports.py module is imported and implemented to produce scoreboard of a specified sport like baseball, basketball, cricket and many more along with other details about the sport. Code examples in the text below revolve around cricket, you can perform the same operation for ...
[ { "code": null, "e": 28, "s": 0, "text": "\n04 Dec, 2021" }, { "code": null, "e": 352, "s": 28, "text": "In this article, we will see how sports.py module is imported and implemented to produce scoreboard of a specified sport like baseball, basketball, cricket and many more along...
StringBuffer delete() Method in Java with Examples
02 Feb, 2022 The java.lang.StringBuffer.delete() is an inbuilt method in Java which is used to remove or delete the characters in a substring of this sequence. The substring starts at a specified index start_point and extends to the character at the index end_point. Syntax : public StringBuffer delete(int start_point, ...
[ { "code": null, "e": 53, "s": 25, "text": "\n02 Feb, 2022" }, { "code": null, "e": 307, "s": 53, "text": "The java.lang.StringBuffer.delete() is an inbuilt method in Java which is used to remove or delete the characters in a substring of this sequence. The substring starts at a s...
Sum 2D array in Python using map() function
22 Nov, 2020 Given a 2-D matrix, we need to find sum of all elements present in matrix ? Examples: Input : arr = [[1, 2, 3], [4, 5, 6], [2, 1, 2]] Output : Sum = 26 This problem can be solved easily using two for loops by iterating whole matrix but we can solve this problem quickly ...
[ { "code": null, "e": 54, "s": 26, "text": "\n22 Nov, 2020" }, { "code": null, "e": 130, "s": 54, "text": "Given a 2-D matrix, we need to find sum of all elements present in matrix ?" }, { "code": null, "e": 140, "s": 130, "text": "Examples:" }, { "code...
Python | Pandas Series.apply()
27 Feb, 2019 Pandas series is a One-dimensional ndarray with axis labels. The labels need not be unique but must be a hashable type. The object supports both integer- and label-based indexing and provides a host of methods for performing operations involving the index. Pandas Series.apply() function invoke the passed f...
[ { "code": null, "e": 28, "s": 0, "text": "\n27 Feb, 2019" }, { "code": null, "e": 285, "s": 28, "text": "Pandas series is a One-dimensional ndarray with axis labels. The labels need not be unique but must be a hashable type. The object supports both integer- and label-based index...
How to add ColorSeekBar in Android
23 Feb, 2021 Seekbar is a type of progress bar. We can drag the seekbar from left to right and vice versa and hence changes the current progress. ColorSeekbar is similar to seekbar but we use this to select a color from multiple colors and can select any custom color. With the help of this widget, we can give more cont...
[ { "code": null, "e": 54, "s": 26, "text": "\n23 Feb, 2021" }, { "code": null, "e": 429, "s": 54, "text": "Seekbar is a type of progress bar. We can drag the seekbar from left to right and vice versa and hence changes the current progress. ColorSeekbar is similar to seekbar but we...
Python | Classify Handwritten Digits with Tensorflow
22 Sep, 2021 Classifying handwritten digits is the basic problem of the machine learning and can be solved in many ways here we will implement them by using TensorFlowUsing a Linear Classifier Algorithm with tf.contrib.learn linear classifier achieves the classification of handwritten digits by making a choice based on...
[ { "code": null, "e": 54, "s": 26, "text": "\n22 Sep, 2021" }, { "code": null, "e": 546, "s": 54, "text": "Classifying handwritten digits is the basic problem of the machine learning and can be solved in many ways here we will implement them by using TensorFlowUsing a Linear Class...
Make the array non-decreasing with the given operation
07 Mar, 2022 Given an array arr[] of size N, the task is to check if it is possible to make the array non-decreasing by applying the given operation at most once on each array element. In a single operation, one can decrease the element by one i.e. arr[i] = arr[i] – 1.Examples: Input: arr[] = {1, 2, 1, 2, 3} Output: ...
[ { "code": null, "e": 52, "s": 24, "text": "\n07 Mar, 2022" }, { "code": null, "e": 320, "s": 52, "text": "Given an array arr[] of size N, the task is to check if it is possible to make the array non-decreasing by applying the given operation at most once on each array element. In...
Control Point Border Thickness of ggplot2 Scatterplot in R - GeeksforGeeks
23 May, 2021 In this article, we will see how to control Point Border Thickness of ggplot ScatterPlot in R Programming Language. For this, we will be using geom_point() function. Following is brief information about ggplot function, geom_point(). Syntax : geom_point(size, color, fill, shape, stroke) Parameter : size : ...
[ { "code": null, "e": 25242, "s": 25214, "text": "\n23 May, 2021" }, { "code": null, "e": 25476, "s": 25242, "text": "In this article, we will see how to control Point Border Thickness of ggplot ScatterPlot in R Programming Language. For this, we will be using geom_point() functio...
How to assign values to an array with null/empty objects in JavaScript?
Following is the code to assign values to an array with null/empty objects using JavaScript − Live Demo <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8" /> <meta name="viewport" content="width=device-width, initial-scale=1.0" /> <title>Document</title> <style> body { font-family: "Segoe UI", Taho...
[ { "code": null, "e": 1156, "s": 1062, "text": "Following is the code to assign values to an array with null/empty objects using JavaScript −" }, { "code": null, "e": 1167, "s": 1156, "text": " Live Demo" }, { "code": null, "e": 2205, "s": 1167, "text": "<!DOCT...
Android image scale animation relative to center point?
This example demonstrate about Android image scale animation relative to center point. 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...
[ { "code": null, "e": 1149, "s": 1062, "text": "This example demonstrate about Android image scale animation relative to center point." }, { "code": null, "e": 1278, "s": 1149, "text": "Step 1 − Create a new project in Android Studio, go to File ⇒ New Project and fill all required...
Jasper Report - View & Print Reports
The output of the report filling process JasperPrint objects can be viewed using a built-in viewer component, or printed, or exported to more popular document formats like PDF, HTML, RTF, XLS, ODT, CSV, or XML. Viewing and printing of the Jasper documents will be discussed in this chapter and exporting will be discusse...
[ { "code": null, "e": 2619, "s": 2254, "text": "The output of the report filling process JasperPrint objects can be viewed using a built-in viewer component, or printed, or exported to more popular document formats like PDF, HTML, RTF, XLS, ODT, CSV, or XML. Viewing and printing of the Jasper documen...
VBScript Replace Function
The Replace Function replaces a specified part of a string with a specific string a specified number of times. Replace(string,find,replacewith[,start[,count[,compare]]]) string, a Required Parameter. The Input String from to be searched for replacing. string, a Required Parameter. The Input String from to be searched...
[ { "code": null, "e": 2191, "s": 2080, "text": "The Replace Function replaces a specified part of a string with a specific string a specified number of times." }, { "code": null, "e": 2252, "s": 2191, "text": "Replace(string,find,replacewith[,start[,count[,compare]]]) \n" }, {...
Ruby - Socket Programming
Ruby provides two levels of access to network services. At a low level, you can access the basic socket support in the underlying operating system, which allows you to implement clients and servers for both connection-oriented and connectionless protocols. Ruby also has libraries that provide higher-level access to spe...
[ { "code": null, "e": 2551, "s": 2294, "text": "Ruby provides two levels of access to network services. At a low level, you can access the basic socket support in the underlying operating system, which allows you to implement clients and servers for both connection-oriented and connectionless protoco...
What are covariant return types in Java?
In general, in overriding, the method in a superclass and subclass have the same name and, parameters. But, when it comes to returning type, the method in the subclass can return the subtype of the return type of the method in the superclass. If you observe the following example super class has a method named demoMetho...
[ { "code": null, "e": 1305, "s": 1062, "text": "In general, in overriding, the method in a superclass and subclass have the same name and, parameters. But, when it comes to returning type, the method in the subclass can return the subtype of the return type of the method in the superclass." }, { ...
Basic Approximations in Python - GeeksforGeeks
11 Nov, 2019 Approximation means to estimate the value of something which is not exactly but rather nearly correct. It plays a vital role in the field of science and technology. Let’s start with the most widely seen example. Have you ever used the exact value of Pi? Of course not. It is a non-terminating irrational num...
[ { "code": null, "e": 24894, "s": 24866, "text": "\n11 Nov, 2019" }, { "code": null, "e": 25330, "s": 24894, "text": "Approximation means to estimate the value of something which is not exactly but rather nearly correct. It plays a vital role in the field of science and technology...
Count the number of sub-arrays such that the average of elements present in the sub-array is greater than that not present in the sub-array - GeeksforGeeks
23 Apr, 2022 Given an array of integers arr[], the task is to count the number of sub-arrays such that the average of elements present in the sub-array is greater than the average of elements that are not present in the sub-array.Examples: Input: arr[] = {6, 3, 5} Output: 3 The sub-arrays are {6}, {5} and {6, 3, 5} b...
[ { "code": null, "e": 24429, "s": 24401, "text": "\n23 Apr, 2022" }, { "code": null, "e": 24658, "s": 24429, "text": "Given an array of integers arr[], the task is to count the number of sub-arrays such that the average of elements present in the sub-array is greater than the aver...
Check if the remainder of N-1 factorial when divided by N is N-1 or not - GeeksforGeeks
24 Mar, 2021 Given an integer N where 1 ≤ N ≤ 105, the task is to find whether (N-1)! % N = N – 1 or not.Examples: Input: N = 3 Output: Yes Explanation: Here, n = 3 so (3 – 1)! = 2! = 2 => 2 % 3 = 2 which is N – 1 itselfInput: N = 4 Output: No Explanation: Here, n = 4 so (4 – 1)! = 3! = 6 => 6 % 3 = 0 which is not N – ...
[ { "code": null, "e": 24301, "s": 24273, "text": "\n24 Mar, 2021" }, { "code": null, "e": 24403, "s": 24301, "text": "Given an integer N where 1 ≤ N ≤ 105, the task is to find whether (N-1)! % N = N – 1 or not.Examples:" }, { "code": null, "e": 24611, "s": 24403, ...
numpy.identity() in Python - GeeksforGeeks
05 Aug, 2021 numpy.identity(n, dtype = None) : Return a identity matrix i.e. a square matrix with ones on the main diagonal. Parameters : n : [int] Dimension n x n of output array dtype : [optional, float(by Default)] Data type of returned array. Returns : identity array of dimension n x n, with its main di...
[ { "code": null, "e": 24683, "s": 24655, "text": "\n05 Aug, 2021" }, { "code": null, "e": 24796, "s": 24683, "text": "numpy.identity(n, dtype = None) : Return a identity matrix i.e. a square matrix with ones on the main diagonal. " }, { "code": null, "e": 24927, "s...
Tryit Editor v3.7
HTML form attributes Tryit: HTML form action attribute
[ { "code": null, "e": 31, "s": 10, "text": "HTML form attributes" } ]
Can I set any of the attribute value of a WebElement in Selenium?
We can set any attribute value of a webelement in Selenium. Selenium can run Javascript commands by the executeScript method. The command to be executed is passed as an argument to the method. Next, we have to identify the element with the help of the Javascript method document.getElementsByClassname. It returns a list...
[ { "code": null, "e": 1255, "s": 1062, "text": "We can set any attribute value of a webelement in Selenium. Selenium can run Javascript commands by the executeScript method. The command to be executed is passed as an argument to the method." }, { "code": null, "e": 1509, "s": 1255, ...
C Program for Hexagonal Pattern
We are given with an integer ‘n’ and the task is to generate the hexagonal pattern and display the final output. Input-: n=5 Output-: Input-: n = 4 Output-: Approach we are using in the given program is as follows − Input the number ‘n’ from user Divide the entire pattern into three parts i.e. upper part, middle part a...
[ { "code": null, "e": 1175, "s": 1062, "text": "We are given with an integer ‘n’ and the task is to generate the hexagonal pattern and display the final output." }, { "code": null, "e": 1196, "s": 1175, "text": "Input-: n=5\nOutput-:" }, { "code": null, "e": 1219, ...