title
stringlengths
3
221
text
stringlengths
17
477k
parsed
listlengths
0
3.17k
find_elements_by_tag_name() driver method - Selenium Python - GeeksforGeeks
22 Nov, 2021 Selenium’s Python Module is built to perform automated testing with Python. Selenium Python bindings provide a simple API to write functional/acceptance tests using Selenium WebDriver. After you have installed selenium and checked out – Navigating links using the get method, you might want to play more wit...
[ { "code": null, "e": 25647, "s": 25619, "text": "\n22 Nov, 2021" }, { "code": null, "e": 26522, "s": 25647, "text": "Selenium’s Python Module is built to perform automated testing with Python. Selenium Python bindings provide a simple API to write functional/acceptance tests usin...
deque max_size() function in C++ STL - GeeksforGeeks
30 Jul, 2018 The deque::max_size() is a built-in function in C++ STL which returns the maximum number of elements that a deque container can hold. Syntax: deque_name.max_size() Parameters: The function does not accept any parameters. Return Value: The function returns the maximum number of elements that a deque contain...
[ { "code": null, "e": 25927, "s": 25899, "text": "\n30 Jul, 2018" }, { "code": null, "e": 26061, "s": 25927, "text": "The deque::max_size() is a built-in function in C++ STL which returns the maximum number of elements that a deque container can hold." }, { "code": null, ...
Collections.UserList in Python - GeeksforGeeks
24 Jun, 2021 Python Lists are array-like data structure but unlike it can be homogeneous. A single list may contain DataTypes like Integers, Strings, as well as Objects. List in Python are ordered and have a definite count. The elements in a list are indexed according to a definite sequence and the indexing of a list i...
[ { "code": null, "e": 41638, "s": 41610, "text": "\n24 Jun, 2021" }, { "code": null, "e": 42032, "s": 41638, "text": "Python Lists are array-like data structure but unlike it can be homogeneous. A single list may contain DataTypes like Integers, Strings, as well as Objects. List i...
FIFA Ultimate Team Machine Learning Project | by Jean-Paul Zambrano-Leon | Towards Data Science
This project follows the principles/steps outlined in the Machine Learning End-To-End guideline by ML consultant Aurélien Géron. Machine Learning (ML) is a subset of Artificial Intelligence (AI) that uses computer algorithms to find patterns in large datasets without being explicitly programmed. ML gives the computer...
[ { "code": null, "e": 303, "s": 172, "text": "This project follows the principles/steps outlined in the Machine Learning End-To-End guideline by ML consultant Aurélien Géron." }, { "code": null, "e": 637, "s": 303, "text": "Machine Learning (ML) is a subset of Artificial Intelli...
How to Colab with TPU. Training a Huggingface BERT on Google... | by Rohan Jagtap | Towards Data Science
TPUs (Tensor Processing Units) are application-specific integrated circuits (ASICs) that are optimized specifically for processing matrices. Cloud TPU resources accelerate the performance of linear algebra computation, which is used heavily in machine learning applications — Cloud TPU Documentation Google Colab provide...
[ { "code": null, "e": 313, "s": 172, "text": "TPUs (Tensor Processing Units) are application-specific integrated circuits (ASICs) that are optimized specifically for processing matrices." }, { "code": null, "e": 446, "s": 313, "text": "Cloud TPU resources accelerate the performanc...
MATLAB - Variables
In MATLAB environment, every variable is an array or matrix. You can assign variables in a simple way. For example, x = 3 % defining x and initializing it with a value MATLAB will execute the above statement and return the following result − x = 3 It creates a 1-by-1 matrix named x and stores the value 3 in its...
[ { "code": null, "e": 2202, "s": 2141, "text": "In MATLAB environment, every variable is an array or matrix." }, { "code": null, "e": 2257, "s": 2202, "text": "You can assign variables in a simple way. For example," }, { "code": null, "e": 2316, "s": 2257, "tex...
PySpark Window Functions - GeeksforGeeks
20 Sep, 2021 PySpark Window function performs statistical operations such as rank, row number, etc. on a group, frame, or collection of rows and returns results for each row individually. It is also popularly growing to perform data transformations. We will understand the concept of window functions, syntax, and finall...
[ { "code": null, "e": 23901, "s": 23873, "text": "\n20 Sep, 2021" }, { "code": null, "e": 24271, "s": 23901, "text": "PySpark Window function performs statistical operations such as rank, row number, etc. on a group, frame, or collection of rows and returns results for each row in...
C Program To Check If A Singly Linked List Is Palindrome - GeeksforGeeks
24 Dec, 2021 Given a singly linked list of characters, write a function that returns true if the given list is a palindrome, else false. METHOD 1 (By reversing the list): This method takes O(n) time and O(1) extra space. 1) Get the middle of the linked list. 2) Reverse the second half of the linked list. 3) Check if th...
[ { "code": null, "e": 23895, "s": 23867, "text": "\n24 Dec, 2021" }, { "code": null, "e": 24019, "s": 23895, "text": "Given a singly linked list of characters, write a function that returns true if the given list is a palindrome, else false." }, { "code": null, "e": 24...
Interactive Visualization of Decision Trees with Jupyter Widgets | by Dafni Sidiropoulou Velidou | Towards Data Science
Decision Trees are broadly used supervised models for classification and regression tasks. In this article, we will talk about decision tree classifiers and how we can dynamically visualize them. These classifiers build a sequence of simple if/else rules on the training data through which they predict the target value....
[ { "code": null, "e": 610, "s": 172, "text": "Decision Trees are broadly used supervised models for classification and regression tasks. In this article, we will talk about decision tree classifiers and how we can dynamically visualize them. These classifiers build a sequence of simple if/else rules ...
How to extract first value from a list in R?
To extract first value from a list, we first need to access the element using double square brackets then the sub-element of each element will be accessed using single square brackets. For example, if we have a list called LIST containing five elements each having 10 elements then the first sub-element of the LIST will...
[ { "code": null, "e": 1418, "s": 1062, "text": "To extract first value from a list, we first need to access the element using double square brackets then the sub-element of each element will be accessed using single square brackets. For example, if we have a list called LIST containing five elements ...
Linux Admin - Using the vi / vim Text Editor
vim represents a newer, improved version of the vi text editor for Linux. vim is installed by default on CentOS 7, the most recent version of CentOS. However, some older and minimal base installs will only include the original vi by default. The biggest difference between vi and vim are advanced ease-of-use features su...
[ { "code": null, "e": 2499, "s": 2257, "text": "vim represents a newer, improved version of the vi text editor for Linux. vim is installed by default on CentOS 7, the most recent version of CentOS. However, some older and minimal base installs will only include the original vi by default." }, { ...
Searching in a map using std::map functions in C++ - GeeksforGeeks
25 May, 2018 Usually, main purpose of using map stl container is for efficient search operations and sorted order retrieval. As map stores key-value pair, all the search operations take “O(log(n))” time (n is size of map). Different types of search functions exists in C++ language, each having different functions. In t...
[ { "code": null, "e": 25565, "s": 25537, "text": "\n25 May, 2018" }, { "code": null, "e": 26062, "s": 25565, "text": "Usually, main purpose of using map stl container is for efficient search operations and sorted order retrieval. As map stores key-value pair, all the search operat...
Android, How to crop circular area from bitmap
This example demonstrates how to crop circular area from bitmap in Android . Step 1 − Create a new project in Android Studio, go to File ⇒ New Project and fill all required details to create a new project. Step 2 − Add the following code to res/layout/activity_main.xml. <?xml version="1.0" encoding="utf-8"?> <Relativ...
[ { "code": null, "e": 1139, "s": 1062, "text": "This example demonstrates how to crop circular area from bitmap in Android ." }, { "code": null, "e": 1269, "s": 1139, "text": "Step 1 − Create a new project in Android Studio, go to File ⇒ New Project and fill all required details ...
C++ Program to Implement Kadane’s Algorithm
Kadane’s algorithm is used to find out the maximum subarray sum from an array of integers. Here we shall discuss a C++ program to implement this algorithm. Begin Function kadanes(int array[], int length): Initialize highestMax = 0 currentElementMax = 0 for i = 0 to length-1 currentElementMax = max(arr...
[ { "code": null, "e": 1218, "s": 1062, "text": "Kadane’s algorithm is used to find out the maximum subarray sum from an array of integers. Here we shall discuss a C++ program to implement this algorithm." }, { "code": null, "e": 1497, "s": 1218, "text": "Begin\nFunction kadanes(in...
Flutter - Flushbar - GeeksforGeeks
02 Jan, 2022 Flutter is loaded with libraries to make development easier with less code and more functionalities. We are back with another amazing Flutter package today. Showing snackbar in the apps is a common feature of today’s apps. Showing error messages when something goes wrong or sending important notifications...
[ { "code": null, "e": 26491, "s": 26463, "text": "\n02 Jan, 2022" }, { "code": null, "e": 26649, "s": 26491, "text": "Flutter is loaded with libraries to make development easier with less code and more functionalities. We are back with another amazing Flutter package today. " },...
DataTables pageLength Option - GeeksforGeeks
13 Jul, 2021 DataTables is jQuery plugin that can be used for adding interactive and advanced controls to HTML tables for the webpage. This also allows the data in the table to be searched, sorted, and filtered according to the needs of the user. The DataTable also exposes a powerful API that can be further used to mod...
[ { "code": null, "e": 25807, "s": 25779, "text": "\n13 Jul, 2021" }, { "code": null, "e": 26145, "s": 25807, "text": "DataTables is jQuery plugin that can be used for adding interactive and advanced controls to HTML tables for the webpage. This also allows the data in the table to...
Average numbers in array - GeeksforGeeks
13 May, 2022 Given a sequence of positive integers a1, a2, ..., an. Find all such indexes i such that the i-th element equals the arithmetic mean of all other elements (that is all elements except for this one).Examples : Input : 5 1 2 3 4 5 Output : 1 no. of elements 2 index of element Average of 1,...
[ { "code": null, "e": 26066, "s": 26038, "text": "\n13 May, 2022" }, { "code": null, "e": 26277, "s": 26066, "text": "Given a sequence of positive integers a1, a2, ..., an. Find all such indexes i such that the i-th element equals the arithmetic mean of all other elements (that is...
Hash data structure - GeeksQuiz
05 Jan, 2020 - - - - - - - 0 1 2 3 4 5 6 1 - - - - - - 0 1 2 3 4 5 6 1 - - - - - 3 0 1 2 3 4 5 6 1 8 - - - - 3 0 1 2 3 4 5 6 1 8 10 - - - 3 0 1 2 3 4...
[ { "code": null, "e": 27530, "s": 27502, "text": "\n05 Jan, 2020" }, { "code": null, "e": 27593, "s": 27530, "text": " - - - - - - -\n 0 1 2 3 4 5 6" }, { "code": null, "e": 27656, "s": 27593, "text": " 1 - - - - ...
Programs for printing pyramid patterns in Python - GeeksforGeeks
18 Dec, 2021 Patterns can be printed in python using simple for loops. First outer loop is used to handle number of rows and Inner nested loop is used to handle the number of columns. Manipulating the print statements, different number patterns, alphabet patterns or star patterns can be printed. Some of the Patterns ar...
[ { "code": null, "e": 24256, "s": 24228, "text": "\n18 Dec, 2021" }, { "code": null, "e": 24589, "s": 24256, "text": "Patterns can be printed in python using simple for loops. First outer loop is used to handle number of rows and Inner nested loop is used to handle the number of c...
D3.js - Collections API
A collection is simply an object that groups multiple elements into a single unit. It is also called as a container. This chapter explains about collections API in detail. You can configure the API using the following script. <script src = "https://d3js.org/d3-collection.v1.min.js"></script> <script> </script> Collect...
[ { "code": null, "e": 2302, "s": 2130, "text": "A collection is simply an object that groups multiple elements into a single unit. It is also called as a container. This chapter explains about collections API in detail." }, { "code": null, "e": 2356, "s": 2302, "text": "You can co...
How to perform fisher test in R?
The fisher test helps us to understand whether there exists a significant non-random relationship among categorical variables or not. It is applied on contingency tables because these tables are used to represent the frequency for categorical variables and we can apply it on a matrix as well as matrices have the simila...
[ { "code": null, "e": 1456, "s": 1062, "text": "The fisher test helps us to understand whether there exists a significant non-random relationship among categorical variables or not. It is applied on contingency tables because these tables are used to represent the frequency for categorical variables ...
Java - String replaceFirst() Method
This method replaces the first substring of this string that matches the given regular expression with the given replacement. Here is the syntax of this method − public String replaceFirst(String regex, String replacement) Here is the detail of parameters − regex − the regular expression to which this string is to be...
[ { "code": null, "e": 2503, "s": 2377, "text": "This method replaces the first substring of this string that matches the given regular expression with the given replacement." }, { "code": null, "e": 2540, "s": 2503, "text": "Here is the syntax of this method −" }, { "code...
Converting an image to ASCII image in Python - GeeksforGeeks
01 Nov, 2021 Introduction to ASCII art ASCII art is a graphic design technique that uses computers for presentation and consists of pictures pieced together from the 95 printable (from a total of 128) characters defined by the ASCII Standard from 1963 and ASCII compliant character sets with proprietary extended charac...
[ { "code": null, "e": 24460, "s": 24432, "text": "\n01 Nov, 2021" }, { "code": null, "e": 24487, "s": 24460, "text": "Introduction to ASCII art " }, { "code": null, "e": 25939, "s": 24487, "text": "ASCII art is a graphic design technique that uses computers for...
MySQL - GROUP BY Clause
You can use GROUP BY to group values from a column, and, if you wish, perform calculations on that column. You can use COUNT, SUM, AVG, etc., functions on the grouped column. To understand GROUP BY clause, consider an employee_tbl table, which is having the following records − mysql> SELECT * FROM employee_tbl; +------...
[ { "code": null, "e": 2508, "s": 2333, "text": "You can use GROUP BY to group values from a column, and, if you wish, perform calculations on that column. You can use COUNT, SUM, AVG, etc., functions on the grouped column." }, { "code": null, "e": 2611, "s": 2508, "text": "To unde...
How to read the windows host file using PowerShell?
Windows Host file that maps the hostname and the IP address is the plain text file. So reading the host file is simpler. We just need to use the Get-Content command to retrieve the file content. Generally, the host file is stored at the location c:\windows\System32\drivers\etc\. If the OS is installed at that location...
[ { "code": null, "e": 1257, "s": 1062, "text": "Windows Host file that maps the hostname and the IP address is the plain text file. So reading the host file is simpler. We just need to use the Get-Content command to retrieve the file content." }, { "code": null, "e": 1384, "s": 1257, ...
Program to calculate Variance of first N Natural Numbers - GeeksforGeeks
02 Sep, 2021 Given an integer N, the task is to find the variance of the first N natural numbers. Variance is used to determine how far the data is spread from their average value. It is generally represented by symbol σ2 and the equation for finding the variance is generally given by the following equation: ∑Ni = 1 ...
[ { "code": null, "e": 24716, "s": 24688, "text": "\n02 Sep, 2021" }, { "code": null, "e": 24801, "s": 24716, "text": "Given an integer N, the task is to find the variance of the first N natural numbers." }, { "code": null, "e": 25015, "s": 24801, "text": "Varia...
set::key_comp() in C++ STL - GeeksforGeeks
25 Jun, 2018 set::key_comp() is an inbuilt function in C++ STL which returns a copy of the comparison object used by the container. By default, this is a less object, which returns the same as operator ‘<'. This object determines the order of the elements in the container. It is a function pointer or a function object ...
[ { "code": null, "e": 24506, "s": 24478, "text": "\n25 Jun, 2018" }, { "code": null, "e": 25179, "s": 24506, "text": "set::key_comp() is an inbuilt function in C++ STL which returns a copy of the comparison object used by the container. By default, this is a less object, which ret...
Python | Element indices Summation - GeeksforGeeks
19 Feb, 2020 Usually, we require to find the sum of index, in which the particular value is located. There are many method to achieve that, using index() etc. But sometimes require to find all the indices of a particular value in case it has multiple occurrences in list. Lets discuss certain ways to do so. Method #1 : ...
[ { "code": null, "e": 25675, "s": 25647, "text": "\n19 Feb, 2020" }, { "code": null, "e": 25970, "s": 25675, "text": "Usually, we require to find the sum of index, in which the particular value is located. There are many method to achieve that, using index() etc. But sometimes req...
Remove Sub-Directories from a File System - GeeksforGeeks
08 Jun, 2021 Given an array of strings arr[] consisting of N unique directories in the form of strings, the task is to remove all the subdirectories and print the final array. A directory S is a subdirectory if there exists any directory D such that S is the prefix of D. Examples: Input: arr[] = {“/a”, “/a/j”, “/c/d/e”...
[ { "code": null, "e": 26041, "s": 26013, "text": "\n08 Jun, 2021" }, { "code": null, "e": 26204, "s": 26041, "text": "Given an array of strings arr[] consisting of N unique directories in the form of strings, the task is to remove all the subdirectories and print the final array."...
Menu Driven Shell Script to Check Memory and Disk Usages - GeeksforGeeks
07 Sep, 2021 In Linux most of the time, we automate things using the bash scripts. Some script has only one functionality, but some script can do more than one functions. For that, we have to provide the menu to select the option which function should be performed now. This script is called as Menu-Driven Programs. Fre...
[ { "code": null, "e": 25651, "s": 25623, "text": "\n07 Sep, 2021" }, { "code": null, "e": 25955, "s": 25651, "text": "In Linux most of the time, we automate things using the bash scripts. Some script has only one functionality, but some script can do more than one functions. For t...
Print all substring of a number without any conversion - GeeksforGeeks
25 Oct, 2021 Given an integer N, the task is to print all the substring of N without doing any conversion i.e converting it into a string or an array. Examples: Input: N = 12345 Output: Possible Substrings: {1, 12, 123, 1234, 12345, 2, 23, 234, 2345, 3, 34, 345, 4, 45, 5}Input: N = 123 Output: Possible Substrings: {1...
[ { "code": null, "e": 26261, "s": 26233, "text": "\n25 Oct, 2021" }, { "code": null, "e": 26399, "s": 26261, "text": "Given an integer N, the task is to print all the substring of N without doing any conversion i.e converting it into a string or an array." }, { "code": nul...
Next smallest prime palindrome - GeeksforGeeks
10 May, 2021 Given a positive integer N where . The task is to find the smallest prime palindrome greater than or equal to N.Examples: Input: 8 Output: 11 Input: 7000000000 Output: 10000500001 Approach: The Naive approach is to loop from N + 1 until we found the next smallest prime palindrome greater than or equal...
[ { "code": null, "e": 25963, "s": 25935, "text": "\n10 May, 2021" }, { "code": null, "e": 26087, "s": 25963, "text": "Given a positive integer N where . The task is to find the smallest prime palindrome greater than or equal to N.Examples: " }, { "code": null, "e": 26...
Java Program to Get TreeMap Key, Value, or Entry Greater or Less than the Specified Value - GeeksforGeeks
07 Jan, 2021 TreeMap class is a red-black tree implementation. It helps us in storing key-value pairs in sorted order. Here 3 approaches are discussed as follows where 4 key-value pairs in the TreeMap in all approaches are as follows along with syntax. tree.put100, "=> Welcoming"); tree.put(120, "=> you to "); tree.put...
[ { "code": null, "e": 26205, "s": 26177, "text": "\n07 Jan, 2021" }, { "code": null, "e": 26445, "s": 26205, "text": "TreeMap class is a red-black tree implementation. It helps us in storing key-value pairs in sorted order. Here 3 approaches are discussed as follows where 4 key-va...
Filter DataFrame columns in R by given condition - GeeksforGeeks
24 Jun, 2021 In this article, we are going to see how to select DataFrame columns in R Programming Language by given condition. R data frame columns can be subjected to constraints, and produce smaller subsets. However, while the conditions are applied, the following properties are maintained : Rows of the data frame r...
[ { "code": null, "e": 26487, "s": 26459, "text": "\n24 Jun, 2021" }, { "code": null, "e": 26770, "s": 26487, "text": "In this article, we are going to see how to select DataFrame columns in R Programming Language by given condition. R data frame columns can be subjected to constra...
Java Program to Find the Roots of Quadratic Equation - GeeksforGeeks
04 Dec, 2020 The roots of a function are the x-intercepts. By definition, the y-coordinate of points lying on the x-axis is zero. Therefore, to find the roots of a quadratic function, we set f (x) = 0, and solve the equation, ax2 + bx + c = 0. Conditions for a quadratic equation – ax^2 + bx + c = 0 where a, b, c ar...
[ { "code": null, "e": 25249, "s": 25221, "text": "\n04 Dec, 2020" }, { "code": null, "e": 25480, "s": 25249, "text": "The roots of a function are the x-intercepts. By definition, the y-coordinate of points lying on the x-axis is zero. Therefore, to find the roots of a quadratic fu...
Background Subtraction in an Image using Concept of Running Average - GeeksforGeeks
05 Nov, 2018 Background subtraction is a technique for separating out foreground elements from the background and is done by generating a foreground mask. This technique is used for detecting dynamically moving objects from static cameras. Background subtraction technique is important for object tracking. There are sev...
[ { "code": null, "e": 25915, "s": 25887, "text": "\n05 Nov, 2018" }, { "code": null, "e": 26265, "s": 25915, "text": "Background subtraction is a technique for separating out foreground elements from the background and is done by generating a foreground mask. This technique is use...
How to create a video to GIF converter using ReactJS ? - GeeksforGeeks
10 Feb, 2021 When you think about a GIF image, a video is a must convert into a .gif format to an image. For this project, we are using FFMPEG library utility written in the C programming language. With the support of web Assembly, it can run in browsers easily without any need for a server, also here we are using the ...
[ { "code": null, "e": 26096, "s": 26068, "text": "\n10 Feb, 2021" }, { "code": null, "e": 26463, "s": 26096, "text": "When you think about a GIF image, a video is a must convert into a .gif format to an image. For this project, we are using FFMPEG library utility written in the C ...
Circular primes less than n - GeeksforGeeks
21 Apr, 2021 Find all circular primes less than given number n. A prime number is a Circular Prime Number if all of its possible rotations are itself prime numbers. Examples : 79 is a circular prime. as 79 and 97 are prime numbers. But 23 is not a circular prime. as 23 is prime but 32 is not a prime number. Algorith...
[ { "code": null, "e": 24664, "s": 24636, "text": "\n21 Apr, 2021" }, { "code": null, "e": 24816, "s": 24664, "text": "Find all circular primes less than given number n. A prime number is a Circular Prime Number if all of its possible rotations are itself prime numbers." }, { ...
Ways to sum to N using Natural Numbers up to K with repetitions allowed - GeeksforGeeks
13 Sep, 2021 Given two integers N and K, the task is to find the total number of ways of representing N as the sum of positive integers in the range [1, K], where each integer can be chosen multiple times. Examples: Input: N = 8, K = 2Output: 5Explanation: All possible ways of representing N as sum of positive integers...
[ { "code": null, "e": 26997, "s": 26969, "text": "\n13 Sep, 2021" }, { "code": null, "e": 27190, "s": 26997, "text": "Given two integers N and K, the task is to find the total number of ways of representing N as the sum of positive integers in the range [1, K], where each integer ...
Explain about CYK Algorithm for Context Free Grammar
CKY means Cocke-Kasami-Younger. It is one of the earliest recognition and parsing algorithms. The standard version of CKY can only recognize languages defined by context-free grammars in Chomsky Normal Form (CNF). It is also possible to extend the CKY algorithm to handle some grammars which are not in CNF (Hard to unde...
[ { "code": null, "e": 1276, "s": 1062, "text": "CKY means Cocke-Kasami-Younger. It is one of the earliest recognition and parsing algorithms. The standard version of CKY can only recognize languages defined by context-free grammars in Chomsky Normal Form (CNF)." }, { "code": null, "e": 13...
How to convert timestamp string to datetime object in Python?
You can use the fromtimestamp function from the datetime module to get a date from a UNIX timestamp. This function takes the timestamp as input and returns the datetime object corresponding to the timestamp. import datetime timestamp = datetime.datetime.fromtimestamp(1500000000) print(timestamp.strftime('%Y-%m-%d %H:%...
[ { "code": null, "e": 1271, "s": 1062, "text": "You can use the fromtimestamp function from the datetime module to get a date from a UNIX timestamp. This function takes the timestamp as input and returns the datetime object corresponding to the timestamp. " }, { "code": null, "e": 1390, ...
How to validate Indian Passport number using Regular Expression - GeeksforGeeks
27 Jan, 2021 Given a string str of alphanumeric characters, the task is to check whether the given string is valid passport number or not by using Regular Expression. The valid passport number of India must satisfy the following conditions: It should be eight characters long.The first character should be an upper case...
[ { "code": null, "e": 25158, "s": 25130, "text": "\n27 Jan, 2021" }, { "code": null, "e": 25387, "s": 25158, "text": "Given a string str of alphanumeric characters, the task is to check whether the given string is valid passport number or not by using Regular Expression. The valid...
How do I get an ISO 8601 date in string format in Python?
To get an ISO 8601 date in string format in Python 3, you can simply use the isoformat function. It returns the date in the ISO 8601 format. For example, if you give it the date 31/12/2017, it'll give you the string '2017-12-31T00:00:00'. You can use it as follows − from datetime import datetime my_date = datetime.now...
[ { "code": null, "e": 1302, "s": 1062, "text": "To get an ISO 8601 date in string format in Python 3, you can simply use the isoformat function. It returns the date in the ISO 8601 format. For example, if you give it the date 31/12/2017, it'll give you the string '2017-12-31T00:00:00'. " }, { ...
Avoiding class data shared among the instances in Python
When we instantiate a class in Python, all its variables and functions also get inherited to the new instantiated class. But there may be e occasions when we do not want some of the variables of the parent class to be inherited by the child class. In this article, we will explore two ways to do that. In the below examp...
[ { "code": null, "e": 1364, "s": 1062, "text": "When we instantiate a class in Python, all its variables and functions also get inherited to the new instantiated class. But there may be e occasions when we do not want some of the variables of the parent class to be inherited by the child class. In th...
Flip Effect with CSS
The flip effect is used to create a mirror image of the object. The following parameters can be used in this filter To set flip effect Live Demo <html> <head> </head> <body> <img src = "/css/images/logo.png" alt = "CSS Logo" style = "Filter: FlipH"> <img src = "/css/images/logo.png" alt = "CSS Logo...
[ { "code": null, "e": 1178, "s": 1062, "text": "The flip effect is used to create a mirror image of the object. The following parameters can be used in this filter" }, { "code": null, "e": 1197, "s": 1178, "text": "To set flip effect" }, { "code": null, "e": 1207, ...
How To Select Multiple Columns From PySpark DataFrames | Towards Data Science
When working with Spark, we typically need to deal with a fairly large number of rows and columns and thus, we sometimes have to work only with a small subset of columns. In today’s short guide we will explore different ways for selecting columns from PySpark DataFrames. Specifically, we will discuss how to select mult...
[ { "code": null, "e": 343, "s": 172, "text": "When working with Spark, we typically need to deal with a fairly large number of rows and columns and thus, we sometimes have to work only with a small subset of columns." }, { "code": null, "e": 505, "s": 343, "text": "In today’s shor...
TD in Reinforcement Learning, the Easy Way | by Ziad SALLOUM | Towards Data Science
Update: The best way of learning and practicing TD method is by going to http://rl-lab.com/gridworld-td Suppose you are driving your car equipped with a GPS. At the start of your journey the GPS gives you an estimate of the arrival time (based on statistical data), as you drive and you hit traffic jams (or not), it ref...
[ { "code": null, "e": 276, "s": 172, "text": "Update: The best way of learning and practicing TD method is by going to http://rl-lab.com/gridworld-td" }, { "code": null, "e": 545, "s": 276, "text": "Suppose you are driving your car equipped with a GPS. At the start of your journey...
GATE | GATE-CS-2009 | Question 10 - GeeksforGeeks
28 Jun, 2021 What is the number of swaps required to sort n elements using selection sort, in the worst case?(A) (n)(B) (n log n)(C) (n^2 )(D) (n^2 log n)(A) Theta(n)(B) Theta(nLogn)(C) Theta(n*n)(D) Theta(n*nLogn)Answer: (A)Explanation: Here is Selection Sort algorithm for sorting in ascending order. 1. Find the mi...
[ { "code": null, "e": 24466, "s": 24438, "text": "\n28 Jun, 2021" }, { "code": null, "e": 24756, "s": 24466, "text": "What is the number of swaps required to sort n elements using selection sort, in the worst case?(A) (n)(B) (n log n)(C) (n^2 )(D) (n^2 log n)(A) Theta(n)(B) Theta(...
PySide2 - Create Tooltip - GeeksforGeeks
29 Aug, 2020 In this article, we are going to learn how to create a tooltip. A tooltip is often used to specify extra information about something when the user moves the mouse pointer over an element. In order to make it, we use setToolTip() function which is defined in PySide2.QtWidgets. Steps to create tooltip: 1. I...
[ { "code": null, "e": 24292, "s": 24264, "text": "\n29 Aug, 2020" }, { "code": null, "e": 24570, "s": 24292, "text": "In this article, we are going to learn how to create a tooltip. A tooltip is often used to specify extra information about something when the user moves the mouse ...
Geek-onacci Number - GeeksforGeeks
30 Apr, 2021 Given four integers A, B, C and N, where A, B, C represents the first three numbers of the geekonacci series, the task is to find the Nth term of the geekonacci series. The Nth term of the geekonacci series is the sum of its previous three terms in the series i.e., sum of (N – 1)th, (N – 2)th, and (N – 3)t...
[ { "code": null, "e": 25412, "s": 25384, "text": "\n30 Apr, 2021" }, { "code": null, "e": 25581, "s": 25412, "text": "Given four integers A, B, C and N, where A, B, C represents the first three numbers of the geekonacci series, the task is to find the Nth term of the geekonacci se...
Handling Categorical Data, The Right Way | by Eugenio Zuccarelli | Towards Data Science
Categorical data is simply information aggregated into groups rather than being in numeric formats, such as Gender, Sex or Education Level. They are present in almost all real-life datasets, yet the current algorithms still struggle to deal with them. Take, for instance, XGBoost or most SKlearn models. If you try and t...
[ { "code": null, "e": 424, "s": 172, "text": "Categorical data is simply information aggregated into groups rather than being in numeric formats, such as Gender, Sex or Education Level. They are present in almost all real-life datasets, yet the current algorithms still struggle to deal with them." ...
How to get objects by ID, Class, Tag, and Attribute in jQuery?
Here’s how you can get objects by ID Selector (#id), by Class Selector (.class), by Tag, and Attribute (.attr()). Get Object by Class Selector The element class selector selects all the elements which match with the given class of the elements. Live Demo <html> <head> <title>jQuery Selector</title> <scri...
[ { "code": null, "e": 1176, "s": 1062, "text": "Here’s how you can get objects by ID Selector (#id), by Class Selector (.class), by Tag, and Attribute (.attr())." }, { "code": null, "e": 1205, "s": 1176, "text": "Get Object by Class Selector" }, { "code": null, "e": 13...
How to change the Tkinter label text? - GeeksforGeeks
22 Jul, 2021 Prerequisites: Introduction to tkinter Tkinter is a standard GUI (Graphical user interface) package for python. It provides a fast and easy way of creating a GUI application. To create a tkinter application: Importing the module — tkinter Create the main window (container) Add any number of widgets to the ...
[ { "code": null, "e": 23925, "s": 23897, "text": "\n22 Jul, 2021" }, { "code": null, "e": 23964, "s": 23925, "text": "Prerequisites: Introduction to tkinter" }, { "code": null, "e": 24100, "s": 23964, "text": "Tkinter is a standard GUI (Graphical user interface...
LCM of N numbers modulo M - GeeksforGeeks
20 Sep, 2021 Given an array arr[] of integers, the task is to find the LCM of all the elements of the array modulo M where M = 109 + 7.Examples: Input: arr[] = {10000000, 12345, 159873} Output: 780789722 LCM of (10000000, 12345, 159873) is 1315754790000000 1315754790000000 % 1000000007 = 780789722Input: arr[] = {10, 1...
[ { "code": null, "e": 24551, "s": 24523, "text": "\n20 Sep, 2021" }, { "code": null, "e": 24684, "s": 24551, "text": "Given an array arr[] of integers, the task is to find the LCM of all the elements of the array modulo M where M = 109 + 7.Examples: " }, { "code": null, ...
What is dependency inversion principle and how to implement in C#?
High-level modules should not depend on low-level modules. Both should depend on abstractions.Abstractions should not depend on details. Details should depend on abstractions.This principle is primarily concerned with reducing dependencies among the code modules. Code Before Dependency Inversion using System; namespace...
[ { "code": null, "e": 1326, "s": 1062, "text": "High-level modules should not depend on low-level modules. Both should depend on abstractions.Abstractions should not depend on details. Details should depend on abstractions.This principle is primarily concerned with reducing dependencies among the cod...
How to work with images in Bokeh (Python)?
To work with images in Bokeh, use image_url() method and pass a list of images. Configure the default output state to generate output saved to a file when :func:'show' is called. Create a new Figure for plotting. Render the images loaded from the given URLs. Immediately display a Bokeh object or application. from bokeh...
[ { "code": null, "e": 1142, "s": 1062, "text": "To work with images in Bokeh, use image_url() method and pass a list of images." }, { "code": null, "e": 1241, "s": 1142, "text": "Configure the default output state to generate output saved to a file when :func:'show' is called." ...
Minimum rotations required to get the same String | Set-2 - GeeksforGeeks
15 Jun, 2021 Given a string, we need to find the minimum number of rotations required to get the same string. In this case, we will only consider Left rotations. Examples: Input : s = “geeks” Output : 5 Input : s = “aaaa” Output :1 Naive approach: The basic approach is to keep rotating the string from the first posit...
[ { "code": null, "e": 25017, "s": 24989, "text": "\n15 Jun, 2021" }, { "code": null, "e": 25166, "s": 25017, "text": "Given a string, we need to find the minimum number of rotations required to get the same string. In this case, we will only consider Left rotations." }, { ...
What are The Different Protection Levels in Android Permission? - GeeksforGeeks
19 Sep, 2021 When building an Android application, we require different Android device components such as the camera, GPS, and so on. So, in order to use these capabilities of our Android smartphone, we must first obtain permission from the user to use something on their phone. You cannot utilize any of those functiona...
[ { "code": null, "e": 25116, "s": 25088, "text": "\n19 Sep, 2021" }, { "code": null, "e": 25829, "s": 25116, "text": "When building an Android application, we require different Android device components such as the camera, GPS, and so on. So, in order to use these capabilities of ...
How to delete empty files and folders using PowerShell?
To delete empty files and folders, we need to first retrieve the list and which has been shown in the earlier articles. In this article, we are using the logic that if we find an empty file or folder we will delete them. To implement that logic, use the below script. gci C:\Temp -Recurse | foreach { if($_.Length -eq...
[ { "code": null, "e": 1182, "s": 1062, "text": "To delete empty files and folders, we need to first retrieve the list and which has been shown in the earlier articles." }, { "code": null, "e": 1330, "s": 1182, "text": "In this article, we are using the logic that if we find an emp...
What, Why and How of (De)Serialization in Python | by Xiaoxu Gao | Towards Data Science
The first time I heard about the word serialization and deserialization, I had no idea what they mean and felt these terms quite “intimidating”. After a few days, I started to pick up this concept, but was confused by their correlation with encoding and decoding. In this article, I want to walk you through this concept...
[ { "code": null, "e": 484, "s": 47, "text": "The first time I heard about the word serialization and deserialization, I had no idea what they mean and felt these terms quite “intimidating”. After a few days, I started to pick up this concept, but was confused by their correlation with encoding and de...
How to create geometric progression series in R?
A geometric progression series is a sequence of numbers in which all the numbers after the first can be found by multiplying the previous one by a fixed number. To generate a geometric progression series in R, we can use seq function. For example, to generate a geometric progression series of 2 by having the difference...
[ { "code": null, "e": 1502, "s": 1062, "text": "A geometric progression series is a sequence of numbers in which all the numbers after the first can be found by multiplying the previous one by a fixed number. To generate a geometric progression series in R, we can use seq function. For example, to ge...
What is the correct use of schema.org SiteNavigationElement in HTML?
The schema.org SiteNavigationElement extends WebPageElement. It is used to mark-up links that would make amazing contextual links. <nav role = "navigation" itemscope itemtype = "http://schema.org/SiteNavigationElement"> <ul> <li> <a href = "https://example.com/" title = "Link to home page" itemprop = "url"> ...
[ { "code": null, "e": 1193, "s": 1062, "text": "The schema.org SiteNavigationElement extends WebPageElement. It is used to mark-up links that would make amazing contextual links." }, { "code": null, "e": 1621, "s": 1193, "text": "<nav role = \"navigation\" itemscope itemtype = \"h...
Modulus function in C++ STL
In this article, we will be discussing the working, syntax, and examples of modulus functions in C++. modulus function object class in C++, which is defined in <functional> header file. modulus function is a binary function object class used to get the result of the modulus operation of the two arguments. This function...
[ { "code": null, "e": 1164, "s": 1062, "text": "In this article, we will be discussing the working, syntax, and examples of modulus functions in C++." }, { "code": null, "e": 1420, "s": 1164, "text": "modulus function object class in C++, which is defined in <functional> header fi...
Java log10() with example - GeeksforGeeks
29 Mar, 2018 The java.lang.Math.log10() is one of the Java Math Library method which is used to return the base 10logarithmic value of given double value as a parameter. There are various cases : If the argument is positive double value, Math.log10() method will return the logarithm of a givenvalue. If the argument is ...
[ { "code": null, "e": 24085, "s": 24057, "text": "\n29 Mar, 2018" }, { "code": null, "e": 24268, "s": 24085, "text": "The java.lang.Math.log10() is one of the Java Math Library method which is used to return the base 10logarithmic value of given double value as a parameter. There ...
Stop Overusing “+” to Join Strings in Python | by Frank Andrade | Towards Data Science
One common task data scientists have to deal with when collecting and cleaning data is working with strings. This involves formatting as well as joining strings (also known as string concatenation). Joining strings in Python — and other programming languages — is as simple as using the plus operator +. You’ve probably ...
[ { "code": null, "e": 370, "s": 171, "text": "One common task data scientists have to deal with when collecting and cleaning data is working with strings. This involves formatting as well as joining strings (also known as string concatenation)." }, { "code": null, "e": 556, "s": 370, ...
PHP Function arguments
A function in PHP can be defined to accept input from calling environment/script in the form of arguments. These arguments are given as comma separeted list inside the parentheses in front of name of function. Note that while calling a function, same number of arguments must be passed to it. PHP supports calling a func...
[ { "code": null, "e": 1355, "s": 1062, "text": "A function in PHP can be defined to accept input from calling environment/script in the form of arguments. These arguments are given as comma separeted list inside the parentheses in front of name of function. Note that while calling a function, same nu...
Go Data Types
Data type is an important concept in programming. Data type specifies the size and type of variable values. Go is statically typed, meaning that once a variable type is defined, it can only store data of that type. Go has three basic data types: bool: represents a boolean value and is either true or false Numeric: repr...
[ { "code": null, "e": 108, "s": 0, "text": "Data type is an important concept in programming. Data type specifies the size and type of variable values." }, { "code": null, "e": 215, "s": 108, "text": "Go is statically typed, meaning that once a variable type is defined, it can onl...
How to use JavaScript to check if a number has a decimal place or it’s a whole number?
Use the Math.floor method to check whether a number has a decimal place or not. You can try to run the following code to check if a number has a decimal place or not − Live Demo <html> <head> <title>JavaScript Numbers</title> </head> <body> <script> var num = 10.2; if (num == ...
[ { "code": null, "e": 1142, "s": 1062, "text": "Use the Math.floor method to check whether a number has a decimal place or not." }, { "code": null, "e": 1230, "s": 1142, "text": "You can try to run the following code to check if a number has a decimal place or not −" }, { ...
Decrypt Map Coordinates from given pair of strings based on given rules - GeeksforGeeks
27 Dec, 2021 Given a pair of lowercase strings string1[] and string2[] of size M and N, the task is to decrypt these strings according to the following rules. The last character of encrypted string denotes the direction latitude string(only two [n-North, s-South]) longitude string(other two [e-East, w-West]). Except f...
[ { "code": null, "e": 25290, "s": 25262, "text": "\n27 Dec, 2021" }, { "code": null, "e": 25875, "s": 25290, "text": "Given a pair of lowercase strings string1[] and string2[] of size M and N, the task is to decrypt these strings according to the following rules. The last characte...
Display USD currency records with the correct format in MySQL
Use FORMAT() in MySQL to display USD currency records in the correct form. Let us first create a table − mysql> create table DemoTable -> ( -> Amount DECIMAL(15,4) -> ); Query OK, 0 rows affected (0.75 sec) Insert some records in the table using insert command − mysql> insert into DemoTable values(90948484); Q...
[ { "code": null, "e": 1167, "s": 1062, "text": "Use FORMAT() in MySQL to display USD currency records in the correct form. Let us first create a table −" }, { "code": null, "e": 1278, "s": 1167, "text": "mysql> create table DemoTable\n -> (\n -> Amount DECIMAL(15,4)\n -> );\...
How to calculate sum in MongoDB with aggregate()?
To get the sum, use $sum along with aggregate(). Let us create a collection with documents − > db.demo337.insertOne({"Amount":100}); { "acknowledged" : true, "insertedId" : ObjectId("5e5231e5f8647eb59e56209b") } > db.demo337.insertOne({"Amount":500}); { "acknowledged" : true, "insertedId" : ObjectId("5e5231...
[ { "code": null, "e": 1155, "s": 1062, "text": "To get the sum, use $sum along with aggregate(). Let us create a collection with documents −" }, { "code": null, "e": 1530, "s": 1155, "text": "> db.demo337.insertOne({\"Amount\":100});\n{\n \"acknowledged\" : true,\n \"insertedI...
Select distinct combinations from two columns in MySQL?
To select distinct combinations from two columns, you can use CASE statement. Let us create a table with some columns. The query to create a table is as follows − mysql> create table select_DistinctTwoColumns -> ( -> Id int NOT NULL AUTO_INCREMENT, -> FirstValue char(1), -> SecondValue char(1), -> PRIMAR...
[ { "code": null, "e": 1181, "s": 1062, "text": "To select distinct combinations from two columns, you can use CASE statement. Let us create a table with some columns." }, { "code": null, "e": 1225, "s": 1181, "text": "The query to create a table is as follows −" }, { "code...
AngularJS Interview Questions
Dear readers, these AngularJS Interview Questions have been designed specially to get you acquainted with the nature of questions you may encounter during your interview for the subject of AngularJS. As per my experience good interviewers hardly plan to ask any particular question during your interview, normally questi...
[ { "code": null, "e": 3142, "s": 2699, "text": "Dear readers, these AngularJS Interview Questions have been designed specially to get you acquainted with the nature of questions you may encounter during your interview for the subject of AngularJS. As per my experience good interviewers hardly plan to...
How To Change DataTypes In Pandas in 4 Minutes | by Benedikt Droste | Towards Data Science
When I worked with pandas for the first time, I didn’t have an overview of the different data types at first and didn’t think about them any further. At the latest when you want to do the first arithmetic operations, you will receive warnings and error messages, so you have to deal with the data types. We will have a l...
[ { "code": null, "e": 522, "s": 171, "text": "When I worked with pandas for the first time, I didn’t have an overview of the different data types at first and didn’t think about them any further. At the latest when you want to do the first arithmetic operations, you will receive warnings and error me...
Delete a Node from linked list without head pointer in C++
In this tutorial, we are going to learn how to delete a node without head pointer in a singly linked list. Let's see the steps to solve the problem. Write struct with data, and next pointer. Write struct with data, and next pointer. Write a function to insert the node into the singly linked list. Write a function to in...
[ { "code": null, "e": 1169, "s": 1062, "text": "In this tutorial, we are going to learn how to delete a node without head pointer in a singly linked list." }, { "code": null, "e": 1211, "s": 1169, "text": "Let's see the steps to solve the problem." }, { "code": null, "...
NLP - Expand contractions in Text Processing - GeeksforGeeks
21 Feb, 2022 Text preprocessing is a crucial step in NLP. Cleaning our text data in order to convert it into a presentable form that is analyzable and predictable for our task is known as text preprocessing. In this article, we are going to discuss contractions and how to handle contractions in text. What are contracti...
[ { "code": null, "e": 24007, "s": 23979, "text": "\n21 Feb, 2022" }, { "code": null, "e": 24296, "s": 24007, "text": "Text preprocessing is a crucial step in NLP. Cleaning our text data in order to convert it into a presentable form that is analyzable and predictable for our task ...
Why Gradient descent isn’t enough: A comprehensive introduction to optimization algorithms in neural networks | by vikashraj luhaniwal | Towards Data Science
The goal of neural networks is to minimize the loss, for producing better and accurate results. In order to minimize the loss, we need to update the internal learning parameters(especially weights and biases). These parameters are updated based on some update rule/function. Generally, we think about Gradient descent as...
[ { "code": null, "e": 566, "s": 171, "text": "The goal of neural networks is to minimize the loss, for producing better and accurate results. In order to minimize the loss, we need to update the internal learning parameters(especially weights and biases). These parameters are updated based on some up...
Node.js First Application - GeeksforGeeks
13 Oct, 2021 Node.js is an open source, cross-platform server environment which executes JavaScript using V8 JavaScript Engine. Node.js helps to write front-end and back-end code in the same language. It helps to write efficient code for real-time applications. In Node.js, the applications can be written using console-...
[ { "code": null, "e": 37201, "s": 37173, "text": "\n13 Oct, 2021" }, { "code": null, "e": 37542, "s": 37201, "text": "Node.js is an open source, cross-platform server environment which executes JavaScript using V8 JavaScript Engine. Node.js helps to write front-end and back-end co...
10 Examples to Understand SQL Views | by Soner Yıldırım | Towards Data Science
SQL is a programming language used to manage and maintain data stored in relational databases. A relational database consists of tables with labelled rows and columns. One of the most frequent operations with SQL is to query a database to retrieve data. A typical relational database contains many tables that are relate...
[ { "code": null, "e": 339, "s": 171, "text": "SQL is a programming language used to manage and maintain data stored in relational databases. A relational database consists of tables with labelled rows and columns." }, { "code": null, "e": 567, "s": 339, "text": "One of the most fr...
How to use input readonly attribute in jQuery ?
03 Aug, 2021 Use jQuery methods to add the readonly attribute to the form input field. jQuery attr() Method: This method set/return attributes and values of the selected elements. If this method is used to return the attribute value, it returns the value of the first selected element.If this method is used to set attri...
[ { "code": null, "e": 28, "s": 0, "text": "\n03 Aug, 2021" }, { "code": null, "e": 102, "s": 28, "text": "Use jQuery methods to add the readonly attribute to the form input field." }, { "code": null, "e": 1155, "s": 102, "text": "jQuery attr() Method: This meth...
How to create Binary File from the existing Text File?
21 Jul, 2021 In this article, we will discuss how to create a binary file from the given text file. Before proceeding to the steps, let’s have an introduction of what are text files and binary files. Text files: Text files store data in human-readable form and sequentially. Binary files: Binary files store data in the ...
[ { "code": null, "e": 28, "s": 0, "text": "\n21 Jul, 2021" }, { "code": null, "e": 215, "s": 28, "text": "In this article, we will discuss how to create a binary file from the given text file. Before proceeding to the steps, let’s have an introduction of what are text files and bi...
Scala ListBuffer
07 Jun, 2019 A list is a collection which contains immutable data. List represents linked list in Scala. A List is immutable, if we need to create a list that is constantly changing, the preferred approach is to use a ListBuffer.The Scala List class holds a sequenced, linear list of items. A List can be built up effici...
[ { "code": null, "e": 53, "s": 25, "text": "\n07 Jun, 2019" }, { "code": null, "e": 529, "s": 53, "text": "A list is a collection which contains immutable data. List represents linked list in Scala. A List is immutable, if we need to create a list that is constantly changing, the ...
Natural Numbers
29 Jun, 2022 Counting numbers like 1, 2, 3, 4, 5, 6 ... Basically, all integers greater than 0 are natural numbers. Fact about Natural numbers They are whole numbers (called integers), and never less than zero (i.e. positive numbers)The next possible natural number can be found by adding 1 to the current natural numb...
[ { "code": null, "e": 52, "s": 24, "text": "\n29 Jun, 2022" }, { "code": null, "e": 156, "s": 52, "text": "Counting numbers like 1, 2, 3, 4, 5, 6 ... Basically, all integers greater than 0 are natural numbers. " }, { "code": null, "e": 184, "s": 156, "text": "F...
Select columns in PySpark dataframe
08 May, 2021 In this article, we will learn how to select columns in PySpark dataframe. In PySpark we can select columns using the select() function. The select() function allows us to select single or multiple columns in different formats. Syntax: dataframe_name.select( columns_names ) Note: We are specifying our pat...
[ { "code": null, "e": 28, "s": 0, "text": "\n08 May, 2021" }, { "code": null, "e": 103, "s": 28, "text": "In this article, we will learn how to select columns in PySpark dataframe." }, { "code": null, "e": 257, "s": 103, "text": "In PySpark we can select column...
Matplotlib.ticker.PercentFormatter class in Python
21 Apr, 2020 Matplotlib is an amazing visualization library in Python for 2D plots of arrays. Matplotlib is a multi-platform data visualization library built on NumPy arrays and designed to work with the broader SciPy stack. The matplotlib.ticker.PercentFormatter class is used to format numbers as a percentage. Syntax:...
[ { "code": null, "e": 28, "s": 0, "text": "\n21 Apr, 2020" }, { "code": null, "e": 240, "s": 28, "text": "Matplotlib is an amazing visualization library in Python for 2D plots of arrays. Matplotlib is a multi-platform data visualization library built on NumPy arrays and designed t...
Program for Volume and Surface Area of Cube
21 Jun, 2022 Cube is a 3-dimensional box-like figure represented in the 3-dimensional plane. Cube has 6 squared-shape equal faces. Each face meet another face at 90 degree each. Three sides of cube meet at same vertex. Examples: Input : Side of a cube = 2 Output : Area = 8 Total surface area = 24 Input : ...
[ { "code": null, "e": 28, "s": 0, "text": "\n21 Jun, 2022" }, { "code": null, "e": 236, "s": 28, "text": "Cube is a 3-dimensional box-like figure represented in the 3-dimensional plane. Cube has 6 squared-shape equal faces. Each face meet another face at 90 degree each. Three side...
What are Widgets in Tkinter?
22 May, 2020 Tkinter is Python’s standard GUI (Graphical User Interface) package. tkinter provides us with a variety of common GUI elements which we can use to build out interface – such as buttons, menus and various kind of entry fields and display areas. We call these elements Widgets. In general, Widget is an eleme...
[ { "code": null, "e": 52, "s": 24, "text": "\n22 May, 2020" }, { "code": null, "e": 328, "s": 52, "text": "Tkinter is Python’s standard GUI (Graphical User Interface) package. tkinter provides us with a variety of common GUI elements which we can use to build out interface – such ...
Print numbers in sequence using thread synchronization
23 Dec, 2021 The problem is to synchronize n number of threads using pthread library. The idea is take thread count and print 1 in first thread, print 2 in second thread, print 3 in third thread, ..... print n in nth thread and again repeat from thread 1 infinitely. Prerequisite : Multithreading Examples : Input : Thr...
[ { "code": null, "e": 52, "s": 24, "text": "\n23 Dec, 2021" }, { "code": null, "e": 336, "s": 52, "text": "The problem is to synchronize n number of threads using pthread library. The idea is take thread count and print 1 in first thread, print 2 in second thread, print 3 in third...
strdup() and strndup() functions in C/C++
23 Jun, 2022 The strdup() and strndup() functions are used to duplicate a string. strdup() : Syntax : char *strdup(const char *s); This function returns a pointer to a null-terminated byte string, which is a duplicate of the string pointed to by s. The memory obtained is done dynamically using malloc and hence it can b...
[ { "code": null, "e": 54, "s": 26, "text": "\n23 Jun, 2022" }, { "code": null, "e": 505, "s": 54, "text": "The strdup() and strndup() functions are used to duplicate a string. strdup() : Syntax : char *strdup(const char *s); This function returns a pointer to a null-terminated byt...
Get the First parts of a Data Set in R Programming – head() Function
30 Jun, 2020 head() function in R Language is used to get the first parts of a vector, matrix, table, data frame or function. Syntax: head(x, n) Parameters:x: specified data typesn: number of row need to be printed Example 1: # R program to illustrate# head function # Calling the head() function to # get the iris demo...
[ { "code": null, "e": 28, "s": 0, "text": "\n30 Jun, 2020" }, { "code": null, "e": 141, "s": 28, "text": "head() function in R Language is used to get the first parts of a vector, matrix, table, data frame or function." }, { "code": null, "e": 160, "s": 141, "t...
Julia Language Introduction
16 Apr, 2020 Julia is a high-level open-source programming language, developed by a group of 4 people at MIT. Julia is a dynamic, high-performance programming language that is used to perform operations in scientific computing. Similar to R Programming Language, Julia is used for statistical computations and data analy...
[ { "code": null, "e": 53, "s": 25, "text": "\n16 Apr, 2020" }, { "code": null, "e": 871, "s": 53, "text": "Julia is a high-level open-source programming language, developed by a group of 4 people at MIT. Julia is a dynamic, high-performance programming language that is used to per...
Implementing Generic Graph in Java
17 Nov, 2021 Prerequisite: Generic Class We can also use them to code for Graph in Java. The Graph class is implemented using HashMap in Java. As we know HashMap contains a key and a value, we represent nodes as keys and their adjacency list in values in the graph. Illustration: An undirected and unweighted graph with...
[ { "code": null, "e": 54, "s": 26, "text": "\n17 Nov, 2021" }, { "code": null, "e": 83, "s": 54, "text": "Prerequisite: Generic Class " }, { "code": null, "e": 308, "s": 83, "text": "We can also use them to code for Graph in Java. The Graph class is implemented...
Create a green button (success) with Bootstrap
Use the .btn-success class in Bootstrap to create a green button that indicates success Live Demo <!DOCTYPE html> <html> <head> <title>Bootstrap Example</title> <link rel = "stylesheet" href = "https://maxcdn.bootstrapcdn.com/bootstrap/4.1.1/css/bootstrap.min.css"> <script src = "https://a...
[ { "code": null, "e": 1275, "s": 1187, "text": "Use the .btn-success class in Bootstrap to create a green button that indicates success" }, { "code": null, "e": 1285, "s": 1275, "text": "Live Demo" }, { "code": null, "e": 1866, "s": 1285, "text": "<!DOCTYPE htm...
Unordered Sets in C++ Standard Template Library
11 May, 2022 An unordered_set is implemented using a hash table where keys are hashed into indices of a hash table so that the insertion is always randomized. All operations on the unordered_set takes constant time O(1) on an average which can go up to linear time O(n) in worst case which depends on the internally used...
[ { "code": null, "e": 52, "s": 24, "text": "\n11 May, 2022" }, { "code": null, "e": 702, "s": 52, "text": "An unordered_set is implemented using a hash table where keys are hashed into indices of a hash table so that the insertion is always randomized. All operations on the unorde...
How to hide elements in responsive layout using CSS ?
11 Oct, 2019 CSS can be used to hide or display elements of the page. This can be used in a responsive website to show certain elements that are only possible to interact with a larger screen size for a good user experience. Media queries are the technique introduced in CSS3 to help to design responsive websites. A med...
[ { "code": null, "e": 28, "s": 0, "text": "\n11 Oct, 2019" }, { "code": null, "e": 240, "s": 28, "text": "CSS can be used to hide or display elements of the page. This can be used in a responsive website to show certain elements that are only possible to interact with a larger scr...
Python | Count the array elements with factors less than or equal to the factors of given x
12 Jun, 2022 Given an array, the task is to count the elements of array whose factors are less than the given number x. Examples: Input: arr = [2, 12, 4, 6], x = 6 Output: 2 factors of x = 6 is [1, 2, 3] factors of arr[0] = 2 is [1] factors of arr[1] = 12 is [1, 2, 3, 4] factors of arr[2] = 4 is [1, 2] factors of arr[3...
[ { "code": null, "e": 28, "s": 0, "text": "\n12 Jun, 2022" }, { "code": null, "e": 145, "s": 28, "text": "Given an array, the task is to count the elements of array whose factors are less than the given number x. Examples:" }, { "code": null, "e": 396, "s": 145, ...
Python program to change values in a Dictionary
08 Dec, 2020 Given a dictionary in Python, the task is to write a Python program to change the value in one of the key-value pairs. This article discusses mechanisms to do this effectively. Examples: Input: {'hari': 1, 'dita': 2} Output: {'hari': 1, 'dita': 4} Input: {'hari': 1, 'dita': 2} Output: {'hari': 3, 'dita': ...
[ { "code": null, "e": 28, "s": 0, "text": "\n08 Dec, 2020" }, { "code": null, "e": 205, "s": 28, "text": "Given a dictionary in Python, the task is to write a Python program to change the value in one of the key-value pairs. This article discusses mechanisms to do this effectively...
Box Plot in Python using Matplotlib
08 Mar, 2022 A Box Plot is also known as Whisker plot is created to display the summary of the set of data values having properties like minimum, first quartile, median, third quartile and maximum. In the box plot, a box is created from the first quartile to the third quartile, a vertical line is also there which goes ...
[ { "code": null, "e": 52, "s": 24, "text": "\n08 Mar, 2022" }, { "code": null, "e": 484, "s": 52, "text": "A Box Plot is also known as Whisker plot is created to display the summary of the set of data values having properties like minimum, first quartile, median, third quartile an...
Mongoose | save() Function
20 May, 2020 The save() function is used to save the document to the database. Using this function, new documents can be added to the database. Installation of mongoose module: You can visit the link to Install mongoose module. You can install this package by using this command.npm install mongooseAfter installing mong...
[ { "code": null, "e": 52, "s": 24, "text": "\n20 May, 2020" }, { "code": null, "e": 183, "s": 52, "text": "The save() function is used to save the document to the database. Using this function, new documents can be added to the database." }, { "code": null, "e": 216, ...
R - Vectors
Vectors are the most basic R data objects and there are six types of atomic vectors. They are logical, integer, double, complex, character and raw. Even when you write just one value in R, it becomes a vector of length 1 and belongs to one of the above vector types. # Atomic vector of type character. print("abc"); # A...
[ { "code": null, "e": 2684, "s": 2536, "text": "Vectors are the most basic R data objects and there are six types of atomic vectors. They are logical, integer, double, complex, character and raw." }, { "code": null, "e": 2803, "s": 2684, "text": "Even when you write just one value...