title stringlengths 3 221 | text stringlengths 17 477k | parsed listlengths 0 3.17k |
|---|---|---|
C library function - isalnum() | The C library function int isalnum(int c) checks if the passed character is alphanumeric.
Following is the declaration for isalnum() function.
int isalnum(int c);
c − This is the character to be checked.
c − This is the character to be checked.
This function returns non-zero value if c is a digit or a letter, else it r... | [
{
"code": null,
"e": 2097,
"s": 2007,
"text": "The C library function int isalnum(int c) checks if the passed character is alphanumeric."
},
{
"code": null,
"e": 2150,
"s": 2097,
"text": "Following is the declaration for isalnum() function."
},
{
"code": null,
"e": 21... |
How to Deploy on Kubernetes in Simple Words | by Pedram Ataee, PhD | Towards Data Science | I recently developed a contextualized most-similar word API service named Owl hosted on RapidAPI. It was a great journey for me so I decided to share various stages of its development with you. In this article, I want to share a step-by-step guide (Create, Connect, Deploy, and Expose) on how to deploy a containerized w... | [
{
"code": null,
"e": 765,
"s": 171,
"text": "I recently developed a contextualized most-similar word API service named Owl hosted on RapidAPI. It was a great journey for me so I decided to share various stages of its development with you. In this article, I want to share a step-by-step guide (Create... |
How can I check the status of MySQL Server? | With the help of ‘mysqladmin’ along with ‘status’ option program we would be able to check the status of MySQL server. It can be used as follows on command line −
C:\mysql\bin>mysqladmin -u root status
Uptime: 3865 Threads: 1 Questions: 50 Slow queries: 0 Opens: 113
Flush tables: 1 Open tables: 102 Queries per second a... | [
{
"code": null,
"e": 1225,
"s": 1062,
"text": "With the help of ‘mysqladmin’ along with ‘status’ option program we would be able to check the status of MySQL server. It can be used as follows on command line −"
},
{
"code": null,
"e": 1392,
"s": 1225,
"text": "C:\\mysql\\bin>mysq... |
Get the length of distinct values in an array with MongoDB | To get distinct values, use MongoDB DISTINCT. For length, use LENGTH(). Let us create a collection with documents −
> db.demo36.insertOne({"Names":["Chris","Bob"]});
{
"acknowledged" : true,
"insertedId" : ObjectId("5e17643bcfb11e5c34d898d4")
}
> db.demo36.insertOne({"Names":["Mike","Sam","Carol"]});
{
"acknow... | [
{
"code": null,
"e": 1178,
"s": 1062,
"text": "To get distinct values, use MongoDB DISTINCT. For length, use LENGTH(). Let us create a collection with documents −"
},
{
"code": null,
"e": 1598,
"s": 1178,
"text": "> db.demo36.insertOne({\"Names\":[\"Chris\",\"Bob\"]});\n{\n \"a... |
How to perform approximate string matching in one line of code | by Lorenzo Tracanna | Towards Data Science | Did you ever try to join two tables using keys or lookup values that don’t match perfectly? Maybe you work in finance or marketing and you have to match two customer lists from two different data sources. While the customer names are meant to be the same, their spelling differs, making it an insurmountable challenge fo... | [
{
"code": null,
"e": 689,
"s": 172,
"text": "Did you ever try to join two tables using keys or lookup values that don’t match perfectly? Maybe you work in finance or marketing and you have to match two customer lists from two different data sources. While the customer names are meant to be the same,... |
Python | Split given list and insert in excel file | 28 Feb, 2019
Given a list containing Names and Addresses consecutively, the task is to split these two elements at a time and insert it into excel.
We can use a very popular library for data analysis, Pandas. Using pandas we can easily manipulate the columns and simply insert the filtered elements into excel file using... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n28 Feb, 2019"
},
{
"code": null,
"e": 163,
"s": 28,
"text": "Given a list containing Names and Addresses consecutively, the task is to split these two elements at a time and insert it into excel."
},
{
"code": null,
"e": 360... |
wait() - Unix, Linux System Call | Unix - Home
Unix - Getting Started
Unix - File Management
Unix - Directories
Unix - File Permission
Unix - Environment
Unix - Basic Utilities
Unix - Pipes & Filters
Unix - Processes
Unix - Communication
Unix - The vi Editor
Unix - What is Shell?
Unix - Using Variables
Unix - Special Variables
Unix - Using Arrays
Unix -... | [
{
"code": null,
"e": 1600,
"s": 1588,
"text": "Unix - Home"
},
{
"code": null,
"e": 1623,
"s": 1600,
"text": "Unix - Getting Started"
},
{
"code": null,
"e": 1646,
"s": 1623,
"text": "Unix - File Management"
},
{
"code": null,
"e": 1665,
"s": 1... |
Noise Removal using Lowpass Digital Butterworth Filter in Scipy – Python | 13 Jan, 2021
In this article, the task is to write a Python program for Noise Removal using Lowpass Digital Butterworth Filter.
Noise is basically the unwanted part of an electronic signal. It is often generated due to fault in design, loose connections, fault in switches etc.
To remove unwanted signals/noise we use fi... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n13 Jan, 2021"
},
{
"code": null,
"e": 143,
"s": 28,
"text": "In this article, the task is to write a Python program for Noise Removal using Lowpass Digital Butterworth Filter."
},
{
"code": null,
"e": 293,
"s": 143,
... |
OAuth 2.0 - Obtaining an Access Token | An access token is a string that identifies a user, an application, or a page. The token includes information such as when the token will expire and which app created that token.
First, it is necessary to acquire OAuth 2.0 client credentials from API console.
First, it is necessary to acquire OAuth 2.0 client credentia... | [
{
"code": null,
"e": 2098,
"s": 1919,
"text": "An access token is a string that identifies a user, an application, or a page. The token includes information such as when the token will expire and which app created that token."
},
{
"code": null,
"e": 2179,
"s": 2098,
"text": "Fir... |
How to accordion scroll to top to open content in Bootstrap ? | 30 Sep, 2019
Bootstrap Accordions are so attractive to watch in action but when the accordion context element is so large there was a problem to get the active accordion top. but here you will learn how to achieve that facility with the help of a few lines of JavaScript code. Here we will use the scrolltop property to ... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n30 Sep, 2019"
},
{
"code": null,
"e": 371,
"s": 28,
"text": "Bootstrap Accordions are so attractive to watch in action but when the accordion context element is so large there was a problem to get the active accordion top. but here you ... |
Rearrange positive and negative numbers in O(n) time and O(1) extra space | 23 Jun, 2022
An array contains both positive and negative numbers in random order. Rearrange the array elements so that positive and negative numbers are placed alternatively. A number of positive and negative numbers need not be equal. If there are more positive numbers they appear at the end of the array. If there ar... | [
{
"code": null,
"e": 54,
"s": 26,
"text": "\n23 Jun, 2022"
},
{
"code": null,
"e": 1209,
"s": 54,
"text": "An array contains both positive and negative numbers in random order. Rearrange the array elements so that positive and negative numbers are placed alternatively. A number o... |
Java Logical Operators with Examples | 25 May, 2022
Operators constitute the basic building block of any programming language. Java too provides many types of operators which can be used according to the need to perform various calculations and functions be it logical, arithmetic, relational, etc. They are classified based on the functionality they provide.... | [
{
"code": null,
"e": 53,
"s": 25,
"text": "\n25 May, 2022"
},
{
"code": null,
"e": 362,
"s": 53,
"text": "Operators constitute the basic building block of any programming language. Java too provides many types of operators which can be used according to the need to perform variou... |
Find the word with most anagrams in a given sentence | 28 May, 2021
Given a string S in the form of a sentence, the task is to find the word from the text with maximum number of its anagrams present in the given sentence.
Example:
Input: S = “please be silent and listen to what the professor says” Output: silent Explanation: Only the word “silent” has an anagram(listen) p... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n28 May, 2021"
},
{
"code": null,
"e": 206,
"s": 52,
"text": "Given a string S in the form of a sentence, the task is to find the word from the text with maximum number of its anagrams present in the given sentence."
},
{
"code"... |
SAP | An Introduction | 07 Feb, 2018
Before getting into any technicalities of what SAP is all about; why enterprises are keen on getting SAP installed; how SAP is handling massive organizations; Let’s discuss the below scenario before the advent of SAP:
Earlier enterprises used to work with data dispersed across departments thereby working i... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n07 Feb, 2018"
},
{
"code": null,
"e": 246,
"s": 28,
"text": "Before getting into any technicalities of what SAP is all about; why enterprises are keen on getting SAP installed; how SAP is handling massive organizations; Let’s discuss th... |
Top 10 Kali Linux Tools For Hacking | 08 Jun, 2022
Kali Linux is a Debian-derived Linux distribution that is maintained by Offensive Security. It was developed by Mati Aharoni and Devon Kearns. Kali Linux is a specially designed OS for network analysts, Penetration testers, or in simple words, it is for those who work under the umbrella of cybersecurity an... | [
{
"code": null,
"e": 54,
"s": 26,
"text": "\n08 Jun, 2022"
},
{
"code": null,
"e": 373,
"s": 54,
"text": "Kali Linux is a Debian-derived Linux distribution that is maintained by Offensive Security. It was developed by Mati Aharoni and Devon Kearns. Kali Linux is a specially desig... |
Maximum String Partition | 25 May, 2021
Given a string. The task is to find the maximum number P, such that a given string can be partitioned into P contiguous substrings such that any two adjacent substrings must be different. More formally, and .
Examples:
Input: str = “aabccd” Output: 4 Explanation: We can divide the given string into four ... | [
{
"code": null,
"e": 54,
"s": 26,
"text": "\n25 May, 2021"
},
{
"code": null,
"e": 263,
"s": 54,
"text": "Given a string. The task is to find the maximum number P, such that a given string can be partitioned into P contiguous substrings such that any two adjacent substrings must ... |
SequenceMatcher in Python for Longest Common Substring. | Given two strings, our task is to print the longest common sub-string. We will solve problem in python using SequenceMatcher.find_longest_match () method.
Class difflib.SequenceMatcher is a flexible class for comparing pairs of sequences of any type, so long as the sequence elements are hashable.
find_longest_match(a, ... | [
{
"code": null,
"e": 1342,
"s": 1187,
"text": "Given two strings, our task is to print the longest common sub-string. We will solve problem in python using SequenceMatcher.find_longest_match () method."
},
{
"code": null,
"e": 1485,
"s": 1342,
"text": "Class difflib.SequenceMatch... |
XML | Attributes | 14 Feb, 2022
Prerequisite: XML | BasicsThe XML attribute is a part of an XML element. The addition of attribute in XML element gives more precise properties of the element i.e, it enhances the properties of the XML element.Syntax:
<element_name attribute1 attribute2 ... > Contents... </element_name>
In the above synt... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n14 Feb, 2022"
},
{
"code": null,
"e": 272,
"s": 52,
"text": "Prerequisite: XML | BasicsThe XML attribute is a part of an XML element. The addition of attribute in XML element gives more precise properties of the element i.e, it enhance... |
Java Swing | Create a simple text editor | 19 Apr, 2021
To create a simple text editor in Java Swing we will use a JTextArea, a JMenuBar and add JMenu to it and we will add JMenuItems. All the menu items will have actionListener to detect any action.There will be a menu bar and it will contain two menus and a button:
File menuopen: this menuitem is used to ope... | [
{
"code": null,
"e": 54,
"s": 26,
"text": "\n19 Apr, 2021"
},
{
"code": null,
"e": 318,
"s": 54,
"text": "To create a simple text editor in Java Swing we will use a JTextArea, a JMenuBar and add JMenu to it and we will add JMenuItems. All the menu items will have actionListener t... |
std::move in C++ | 20 Jul, 2017
std :: moveMoves the elements in the range [first,last] into the range beginning at result.The value of the elements in the [first,last] is transferred to the elements pointed by result. After the call, the elements in the range [first,last] are left in an unspecified but valid state.Template :
OutputItera... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n20 Jul, 2017"
},
{
"code": null,
"e": 348,
"s": 52,
"text": "std :: moveMoves the elements in the range [first,last] into the range beginning at result.The value of the elements in the [first,last] is transferred to the elements pointe... |
Java Program to Swap the Elements of Vector | 21 Dec, 2021
The swap() method of java.util.Collections class is used to swap the elements at the specified positions in the specified list. If the specified positions are equal, invoking this method leaves the list unchanged.
Syntax:
public static void swap(List list, int i, int j)
Parameters: This method takes the fo... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n21 Dec, 2021"
},
{
"code": null,
"e": 266,
"s": 52,
"text": "The swap() method of java.util.Collections class is used to swap the elements at the specified positions in the specified list. If the specified positions are equal, invoking... |
Most Powerful NLP Transformer - ELECTRA | Towards Data Science | Transformers dominate the field of Natural Language Processing (NLP). The 2017 paper ‘Attention is All You Need’ introduced the first transformer — no other architecture has since dethroned these NLP powerhouses.
Fast-forward a year to 2018, and we find BERT (Bidirectional Encoder Representations from Transformers). A ... | [
{
"code": null,
"e": 385,
"s": 172,
"text": "Transformers dominate the field of Natural Language Processing (NLP). The 2017 paper ‘Attention is All You Need’ introduced the first transformer — no other architecture has since dethroned these NLP powerhouses."
},
{
"code": null,
"e": 607,
... |
How to Scrape Videos using Python ? - GeeksforGeeks | 30 Nov, 2021
Prerequisite:
requests
BeautifulSoup
In this article, we will discuss web scraping of videos using python. For web scraping, we will use requests and BeautifulSoup Module in Python. The requests library is an integral part of Python for making HTTP requests to a specified URL. Whether it be REST APIs or We... | [
{
"code": null,
"e": 24292,
"s": 24264,
"text": "\n30 Nov, 2021"
},
{
"code": null,
"e": 24306,
"s": 24292,
"text": "Prerequisite:"
},
{
"code": null,
"e": 24315,
"s": 24306,
"text": "requests"
},
{
"code": null,
"e": 24329,
"s": 24315,
"te... |
How to use the tree command in PowerShell? | Tree command graphically shows the folder structure of the given drive or a path. It is similar to Get−ChildItem or dir recursive command except this shows the graphical structure. For example, the below command will retrieve the folder structure of C:\VMs including
tree c:\VMs
There are also two other switches support... | [
{
"code": null,
"e": 1329,
"s": 1062,
"text": "Tree command graphically shows the folder structure of the given drive or a path. It is similar to Get−ChildItem or dir recursive command except this shows the graphical structure. For example, the below command will retrieve the folder structure of C:\... |
MongoDB query to search for Month and Day only? | To search for month and day only, use the aggregate framework.
Let us first create a collection with documents −
> db.monthAndDayDemo.insertOne({"LoginDate":new ISODate("2019-04-27")});
{
"acknowledged" : true,
"insertedId" : ObjectId("5cefbcaeef71edecf6a1f6b2")
}
> db.monthAndDayDemo.insertOne({"LoginDate":new I... | [
{
"code": null,
"e": 1125,
"s": 1062,
"text": "To search for month and day only, use the aggregate framework."
},
{
"code": null,
"e": 1175,
"s": 1125,
"text": "Let us first create a collection with documents −"
},
{
"code": null,
"e": 1807,
"s": 1175,
"text":... |
Maximum bitwise AND value of a pair in an array in C++ | Given an array of n positive elements. we need to find the maximum bitwise AND value generated by any pair of element from the array.
If input array is {10, 12, 15, 18} then maximum value of bitwise AND is 12.
The result of bitwise AND operations on single bit is maximum when both bits are 1. Considering this property ... | [
{
"code": null,
"e": 1196,
"s": 1062,
"text": "Given an array of n positive elements. we need to find the maximum bitwise AND value generated by any pair of element from the array."
},
{
"code": null,
"e": 1272,
"s": 1196,
"text": "If input array is {10, 12, 15, 18} then maximum ... |
Perl - Syntax Overview | Perl borrows syntax and concepts from many languages: awk, sed, C, Bourne Shell, Smalltalk, Lisp and even English. However, there are some definite differences between the languages. This chapter is designd to quickly get you up to speed on the syntax that is expected in Perl.
A Perl program consists of a sequence of d... | [
{
"code": null,
"e": 2498,
"s": 2220,
"text": "Perl borrows syntax and concepts from many languages: awk, sed, C, Bourne Shell, Smalltalk, Lisp and even English. However, there are some definite differences between the languages. This chapter is designd to quickly get you up to speed on the syntax t... |
Semantic Image Segmentation using Fully Convolutional Networks | by Arun Kumar | Towards Data Science | Humans have the innate ability to identify the objects that they see in the world around them. The visual cortex present in our brain can distinguish between a cat and a dog effortlessly in almost no time. This is true not only with cats and dogs but with almost all the objects that we see. But a computer is not as sma... | [
{
"code": null,
"e": 756,
"s": 172,
"text": "Humans have the innate ability to identify the objects that they see in the world around them. The visual cortex present in our brain can distinguish between a cat and a dog effortlessly in almost no time. This is true not only with cats and dogs but with... |
DataTables autoWidth Option - GeeksforGeeks | 21 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": 25755,
"s": 25727,
"text": "\n21 Jul, 2021"
},
{
"code": null,
"e": 26093,
"s": 25755,
"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... |
How to convert table to dataframe in R? - GeeksforGeeks | 08 Oct, 2021
In this article, we will discuss how to convert a given table to a dataframe in the R programming language.
as.data.frame.matrix() will be taking the table as its parameter and will return the dataframe back to the user.
Syntax: as.data.frame.matrix(x)
Parameter:
x: name of the table which is to be convert... | [
{
"code": null,
"e": 25242,
"s": 25214,
"text": "\n08 Oct, 2021"
},
{
"code": null,
"e": 25350,
"s": 25242,
"text": "In this article, we will discuss how to convert a given table to a dataframe in the R programming language."
},
{
"code": null,
"e": 25463,
"s": 25... |
Calculate your monthly recurring customer by Cohort Analysis | by Md. Hasibul Islam | Towards Data Science | Imagine you have opened a business, your business is going well. But this could be better. Some of your customers may ask you, “Hey man, I often buy from you, don’t I deserve some offer?”. Now you think that “Well, I should see who are my recurring customers! I should offer them more so that they keep coming regularly.... | [
{
"code": null,
"e": 626,
"s": 172,
"text": "Imagine you have opened a business, your business is going well. But this could be better. Some of your customers may ask you, “Hey man, I often buy from you, don’t I deserve some offer?”. Now you think that “Well, I should see who are my recurring custom... |
Diameter of a Binary Tree | Practice | GeeksforGeeks | The diameter of a tree (sometimes called the width) is the number of nodes on the longest path between two end nodes. The diagram below shows two trees each with diameter nine, the leaves that form the ends of the longest path are shaded (note that there is more than one path in each tree of length nine, but no path lo... | [
{
"code": null,
"e": 582,
"s": 238,
"text": "The diameter of a tree (sometimes called the width) is the number of nodes on the longest path between two end nodes. The diagram below shows two trees each with diameter nine, the leaves that form the ends of the longest path are shaded (note that there ... |
How to print an Array in Java without using Loop - GeeksforGeeks | 26 Aug, 2019
Given an array arr in Java, the task is to print the contents of this array.
Loop method: The first thing that comes to mind is to write a for loop from i = 0 to n, and print each element by arr[i].
for(int i = 0; i < Array.length; i++)
System.out.println(Array[i]);
This article tells how to print... | [
{
"code": null,
"e": 24817,
"s": 24789,
"text": "\n26 Aug, 2019"
},
{
"code": null,
"e": 24894,
"s": 24817,
"text": "Given an array arr in Java, the task is to print the contents of this array."
},
{
"code": null,
"e": 25016,
"s": 24894,
"text": "Loop method: ... |
Biopython - Pairwise Alignment - GeeksforGeeks | 24 Oct, 2020
Pairwise Sequence Alignment is a process in which two sequences are compared at a time and the best possible sequence alignment is provided. Pairwise sequence alignment uses a dynamic programming algorithm. Biopython has a special module Bio.pairwise2 which identifies the alignment sequence using pairwise ... | [
{
"code": null,
"e": 24212,
"s": 24184,
"text": "\n24 Oct, 2020"
},
{
"code": null,
"e": 24623,
"s": 24212,
"text": "Pairwise Sequence Alignment is a process in which two sequences are compared at a time and the best possible sequence alignment is provided. Pairwise sequence alig... |
PyQt5 - Changing color of pressed Push Button - GeeksforGeeks | 22 Apr, 2020
In this article we will see how to make a push button react when it is pressed. When button get releases it comes back to its original color, by default when button get clicked it becomes light blue color although we can change this color.
In order to change pressed button color we have to change the style... | [
{
"code": null,
"e": 24459,
"s": 24431,
"text": "\n22 Apr, 2020"
},
{
"code": null,
"e": 24699,
"s": 24459,
"text": "In this article we will see how to make a push button react when it is pressed. When button get releases it comes back to its original color, by default when butto... |
ArangoDB - Web Interface | In this chapter, we will learn how to enable/disable the Authentication, and how to bind the ArangoDB to the Public Network Interface.
# arangosh --server.endpoint tcp://127.0.0.1:8529 --server.database "_system"
It will prompt you for the password saved earlier −
Please specify a password:
Use the password you creat... | [
{
"code": null,
"e": 2115,
"s": 1980,
"text": "In this chapter, we will learn how to enable/disable the Authentication, and how to bind the ArangoDB to the Public Network Interface."
},
{
"code": null,
"e": 2194,
"s": 2115,
"text": "# arangosh --server.endpoint tcp://127.0.0.1:85... |
Close specific Web page using Selenium in Python - GeeksforGeeks | 04 Jan, 2021
Prerequisites: Selenium Basics, Selenium close() and quit()
Selenium is a powerful tool for controlling web browsers through programs and performing browser automation. It is functional for all browsers, works on all major OS and its scripts are written in various languages i.e Python, Java, C#, etc, we w... | [
{
"code": null,
"e": 23901,
"s": 23873,
"text": "\n04 Jan, 2021"
},
{
"code": null,
"e": 23962,
"s": 23901,
"text": "Prerequisites: Selenium Basics, Selenium close() and quit() "
},
{
"code": null,
"e": 24236,
"s": 23962,
"text": "Selenium is a powerful tool f... |
Connectivity, Distance, and Spanning Trees | One simple definition is that a tree is a connected graph associated with no cycles, where a cycle let's us go from a node to itself without repeating an edge.
A spanning tree for a connected graph G is defined as a tree containing all the vertices of G.
Spanning trees are often implemented for Internet routing Algorit... | [
{
"code": null,
"e": 1222,
"s": 1062,
"text": "One simple definition is that a tree is a connected graph associated with no cycles, where a cycle let's us go from a node to itself without repeating an edge."
},
{
"code": null,
"e": 1317,
"s": 1222,
"text": "A spanning tree for a ... |
Boolean search - GeeksforGeeks | 02 Dec, 2021
In this article we will see what is Boolean Expression.
Before starting with the topic directly lets us see what is Boolean expression so It is an expression that always yields two values either true or false when evaluated. If the condition is true then it will return true or false vice versa.
Lets take o... | [
{
"code": null,
"e": 24902,
"s": 24874,
"text": "\n02 Dec, 2021"
},
{
"code": null,
"e": 24958,
"s": 24902,
"text": "In this article we will see what is Boolean Expression."
},
{
"code": null,
"e": 25198,
"s": 24958,
"text": "Before starting with the topic dir... |
Singular Value Decomposition Example In Python | by Cory Maklin | Towards Data Science | Singular Value Decomposition, or SVD, has a wide array of applications. These include dimensionality reduction, image compression, and denoising data. In essence, SVD states that a matrix can be represented as the product of three other matrices. In mathematical terms, SVD can be written as follows:
where n is the numb... | [
{
"code": null,
"e": 472,
"s": 171,
"text": "Singular Value Decomposition, or SVD, has a wide array of applications. These include dimensionality reduction, image compression, and denoising data. In essence, SVD states that a matrix can be represented as the product of three other matrices. In mathe... |
How to Add One Side Left Border to TextView in Android using XML? | This example demonstrate about How to Add One Side Left Border to TextView in Android using XML.
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" encodin... | [
{
"code": null,
"e": 1159,
"s": 1062,
"text": "This example demonstrate about How to Add One Side Left Border to TextView in Android using XML."
},
{
"code": null,
"e": 1288,
"s": 1159,
"text": "Step 1 − Create a new project in Android Studio, go to File ⇒ New Project and fill al... |
Android - Multitouch | Multi-touch gesture happens when more then one finger touches the screen at the same time. Android allows us to detect these gestures.
Android system generates the following touch events whenever multiple fingers touches the screen at the same time.
ACTION_DOWN
For the first pointer that touches the screen. This starts... | [
{
"code": null,
"e": 3742,
"s": 3607,
"text": "Multi-touch gesture happens when more then one finger touches the screen at the same time. Android allows us to detect these gestures."
},
{
"code": null,
"e": 3857,
"s": 3742,
"text": "Android system generates the following touch ev... |
Python Web Scraping - Quick Guide | Web scraping is an automatic process of extracting information from web. This chapter will give you an in-depth idea of web scraping, its comparison with web crawling, and why you should opt for web scraping. You will also learn about the components and working of a web scraper.
The dictionary meaning of word ‘Scrappin... | [
{
"code": null,
"e": 2192,
"s": 1912,
"text": "Web scraping is an automatic process of extracting information from web. This chapter will give you an in-depth idea of web scraping, its comparison with web crawling, and why you should opt for web scraping. You will also learn about the components and... |
AngularJS | Filters - GeeksforGeeks | 11 Jun, 2019
There are some filters that are added in the AngularJS for the sake of making the formatting and working with data easier. There are several in-built filters in AngularJS. They are listed here along with some examples to make the understanding easier.
Basic Syntax:Filters are generally added to the express... | [
{
"code": null,
"e": 28191,
"s": 28163,
"text": "\n11 Jun, 2019"
},
{
"code": null,
"e": 28443,
"s": 28191,
"text": "There are some filters that are added in the AngularJS for the sake of making the formatting and working with data easier. There are several in-built filters in An... |
Delete only specific rows in a table with MySQL | To delete only specific rows, use MySQL NOT IN(). Let us first create a table −
mysql> create table DemoTable1830
(
StudentId int NOT NULL AUTO_INCREMENT PRIMARY KEY,
StudentName varchar(20)
)AUTO_INCREMENT=101;
Query OK, 0 rows affected (0.00 sec)
Insert some records in the table using insert comma... | [
{
"code": null,
"e": 1142,
"s": 1062,
"text": "To delete only specific rows, use MySQL NOT IN(). Let us first create a table −"
},
{
"code": null,
"e": 1331,
"s": 1142,
"text": "mysql> create table DemoTable1830\n (\n StudentId int NOT NULL AUTO_INCREMENT PRIMARY KEY,\n ... |
Installing Apache Hive 3.1.2 on Windows 10 | by Hadi Fadlallah | Towards Data Science | While working on a project, we were asked to install Apache Hive on a Windows 10 operating system. Many guides were found online but unfortunately, they didn’t work. For this reason, I decided to write a step-by-step guide to help others.
The starting point of this guide was from a great video I found on Youtube which ... | [
{
"code": null,
"e": 410,
"s": 171,
"text": "While working on a project, we were asked to install Apache Hive on a Windows 10 operating system. Many guides were found online but unfortunately, they didn’t work. For this reason, I decided to write a step-by-step guide to help others."
},
{
"c... |
Pyspark — wrap your feature engineering in a pipeline | by Alexandre Wrg | Towards Data Science | In order to have a cleaner and more industrializable code, it may be useful to create a pipeline object that handles feature engineering. suppose we have this type of dataframe:
df.show()+----------+-----+| date|sales|+----------+-----+|2018-12-22| 17||2017-01-08| 22||2015-08-25| 48||2015-03-12| 150|+------... | [
{
"code": null,
"e": 225,
"s": 47,
"text": "In order to have a cleaner and more industrializable code, it may be useful to create a pipeline object that handles feature engineering. suppose we have this type of dataframe:"
},
{
"code": null,
"e": 379,
"s": 225,
"text": "df.show()... |
Tryit Editor v3.7 | HTML Form attributes
Tryit: The formenctype attribute | [
{
"code": null,
"e": 31,
"s": 10,
"text": "HTML Form attributes"
}
] |
C++ Program to Convert Binary Number to Octal and vice-versa | In a computer system, the binary number is expressed in the binary numeral system while the octal number is in the octal numeral system. The binary number is in base 2 while the octal number is in base 8.
Examples of binary numbers and their corresponding octal numbers are as follows −
A program that converts the binar... | [
{
"code": null,
"e": 1267,
"s": 1062,
"text": "In a computer system, the binary number is expressed in the binary numeral system while the octal number is in the octal numeral system. The binary number is in base 2 while the octal number is in base 8."
},
{
"code": null,
"e": 1349,
"... |
Yii - RESTful APIs in Action | The controller class extends from the yii\rest\ActiveController class, which implements common RESTful actions. We specify the $modelClass property so that the controller knows which model to use for manipulating data.
Step 1 − Create a file called UserController.php inside the controllers folder.
<?php
namespace ap... | [
{
"code": null,
"e": 3052,
"s": 2833,
"text": "The controller class extends from the yii\\rest\\ActiveController class, which implements common RESTful actions. We specify the $modelClass property so that the controller knows which model to use for manipulating data."
},
{
"code": null,
... |
Understanding PyTorch Activation Functions: The Maths and Algorithms (Part 1) | by Juan Nathaniel | Towards Data Science | You can find part 2 here.
In the world of ML, the activation functions help a network to learn complex patterns in the input data (or embeddings). Comparing to our brains, the activation functions are akin to the terminal side of the neurons determining what packet of information is to be propagated to the subsequent n... | [
{
"code": null,
"e": 73,
"s": 47,
"text": "You can find part 2 here."
},
{
"code": null,
"e": 404,
"s": 73,
"text": "In the world of ML, the activation functions help a network to learn complex patterns in the input data (or embeddings). Comparing to our brains, the activation fu... |
Using Iterations in Python Effectively | In this article, we will learn about how to implement iterators and their effective implementation in Python 3.x. Or earlier. Let’ s take a look at various methods available in python which implements iterators.
Live Demo
genre = ("Python","C","C++","Java")
print("The topic available on Tutorial's Point are:")
i = 0
w... | [
{
"code": null,
"e": 1274,
"s": 1062,
"text": "In this article, we will learn about how to implement iterators and their effective implementation in Python 3.x. Or earlier. Let’ s take a look at various methods available in python which implements iterators."
},
{
"code": null,
"e": 1285... |
Number of ways to make mobile lock pattern - GeeksforGeeks | 16 Jun, 2021
A mobile pattern is a grid of 3X3 cell, where drawing a specific pattern (connecting specific sequence of cells in order) will unlock the mobile. In this problem, the task is to calculate number of ways of making the lock pattern with number of connections in given range. In general terms, we are given a r... | [
{
"code": null,
"e": 25085,
"s": 25057,
"text": "\n16 Jun, 2021"
},
{
"code": null,
"e": 25533,
"s": 25085,
"text": "A mobile pattern is a grid of 3X3 cell, where drawing a specific pattern (connecting specific sequence of cells in order) will unlock the mobile. In this problem, ... |
Diameter of n-ary tree using BFS - GeeksforGeeks | 30 Jun, 2021
N-ary tree refers to the rooted tree in which each node having atmost k child nodes. The diameter of n-ary tree is the longest path between two leaf nodes.
Various approaches have already been discussed to compute diameter of tree. 1. Diameter of an N-ary tree 2. Diameter of a Binary Tree in O(n) 3. Diame... | [
{
"code": null,
"e": 24649,
"s": 24621,
"text": "\n30 Jun, 2021"
},
{
"code": null,
"e": 24806,
"s": 24649,
"text": "N-ary tree refers to the rooted tree in which each node having atmost k child nodes. The diameter of n-ary tree is the longest path between two leaf nodes. "
},
... |
How to count unique ID after groupBy in PySpark Dataframe ? - GeeksforGeeks | 17 Jun, 2021
In this article, we will discuss how to count unique ID after group by in PySpark Dataframe.
For this, we will use two different methods:
Using distinct().count() method.
Using SQL Query.
But at first, let’s Create Dataframe for demonstration:
Python3
# importing moduleimport pyspark # importing sparksess... | [
{
"code": null,
"e": 24192,
"s": 24164,
"text": "\n17 Jun, 2021"
},
{
"code": null,
"e": 24285,
"s": 24192,
"text": "In this article, we will discuss how to count unique ID after group by in PySpark Dataframe."
},
{
"code": null,
"e": 24330,
"s": 24285,
"text"... |
JavaFX - 2D Shapes Circle | A circle is the locus of all points at a fixed distance (radius of circle) from a fixed point (the centre of circle). In other words, a circle is a line forming a closed loop, every point on which is a fixed distance from a centre point.
A circle is defined by two parameters namely −
Centre − It is a point inside the c... | [
{
"code": null,
"e": 2138,
"s": 1900,
"text": "A circle is the locus of all points at a fixed distance (radius of circle) from a fixed point (the centre of circle). In other words, a circle is a line forming a closed loop, every point on which is a fixed distance from a centre point."
},
{
"... |
JavaScript - The Math Object | The math object provides you properties and methods for mathematical constants and functions. Unlike other global objects, Math is not a constructor. All the properties and methods of Math are static and can be called by using Math as an object without creating it.
Thus, you refer to the constant pi as Math.PI and you ... | [
{
"code": null,
"e": 2732,
"s": 2466,
"text": "The math object provides you properties and methods for mathematical constants and functions. Unlike other global objects, Math is not a constructor. All the properties and methods of Math are static and can be called by using Math as an object without ... |
C# | Adding the elements of the specified collection to the end of the List - GeeksforGeeks | 01 Feb, 2019
List<T>.AddRange(IEnumerable<T>) Method is used to add the elements of the specified collection to the end of the List<T>.
Properties of List:
It is different from the arrays. A list can be resized dynamically but arrays cannot.
List class can accept null as a valid value for reference types and it also al... | [
{
"code": null,
"e": 24612,
"s": 24584,
"text": "\n01 Feb, 2019"
},
{
"code": null,
"e": 24735,
"s": 24612,
"text": "List<T>.AddRange(IEnumerable<T>) Method is used to add the elements of the specified collection to the end of the List<T>."
},
{
"code": null,
"e": 247... |
Find the Sum of the series 1/2 - 2/3 + 3/4 - 4/5 + ... till N terms - GeeksforGeeks | 24 Nov, 2021
Given a number N, the task is to find the sum of the below series till N terms.
Examples:
Input: N = 6 Output: -0.240476Input: N = 10 Output: -0.263456
Approach: From the given series, find the formula for Nth term:
1st term = 1/2
2nd term = - 2/3
3rd term = 3/4
4th term = - 4/5
.
.
Nthe term = ((... | [
{
"code": null,
"e": 25071,
"s": 25043,
"text": "\n24 Nov, 2021"
},
{
"code": null,
"e": 25152,
"s": 25071,
"text": "Given a number N, the task is to find the sum of the below series till N terms. "
},
{
"code": null,
"e": 25164,
"s": 25152,
"text": "Examples:... |
Redux - Actions | Actions are the only source of information for the store as per Redux official documentation. It carries a payload of information from your application to store.
As discussed earlier, actions are plain JavaScript object that must have a type attribute to indicate the type of action performed. It tells us what had happe... | [
{
"code": null,
"e": 1977,
"s": 1815,
"text": "Actions are the only source of information for the store as per Redux official documentation. It carries a payload of information from your application to store."
},
{
"code": null,
"e": 2221,
"s": 1977,
"text": "As discussed earlier... |
Nearly Sorted Algorithm | Practice | GeeksforGeeks | Given an array of n elements, where each element is at most k away from its target position. The task is to print array in sorted form.
Input:
First line consists of T test cases. First line of every test case consists of two integers N and K, denoting number of elements in array and at most k positions away from its t... | [
{
"code": null,
"e": 374,
"s": 238,
"text": "Given an array of n elements, where each element is at most k away from its target position. The task is to print array in sorted form."
},
{
"code": null,
"e": 649,
"s": 374,
"text": "Input:\nFirst line consists of T test cases. First... |
Area of a circle inscribed in a regular hexagon? | The circle inscribed in a regular hexagon has 6 points touching the six sides of the regular hexagon.
To find the area of inscribed circle we need to find the radius first. For the regular hexagon the radius is found using the formula, a(√3)/2.
Now area of the circle inscribed is 3πa*a/4
Side of hexagon − 4
Area = 37.6... | [
{
"code": null,
"e": 1164,
"s": 1062,
"text": "The circle inscribed in a regular hexagon has 6 points touching the six sides of the regular hexagon."
},
{
"code": null,
"e": 1307,
"s": 1164,
"text": "To find the area of inscribed circle we need to find the radius first. For the r... |
switch statement examples: | C - Programming HOME
C - Basic Introduction
C - Program Structure
C - Reserved Keywords
C - Basic Datatypes
C - Variable Types
C - Storage Classes
C - Using Constants
C - Operator Types
C - Control Statements
C - Input and Output
C - Pointing to Data
C - Using Functions
C - Play with Strings
C - Structured Datatypes
C ... | [
{
"code": null,
"e": 1475,
"s": 1454,
"text": "C - Programming HOME"
},
{
"code": null,
"e": 1498,
"s": 1475,
"text": "C - Basic Introduction"
},
{
"code": null,
"e": 1520,
"s": 1498,
"text": "C - Program Structure"
},
{
"code": null,
"e": 1542,
... |
Reduced Order Modeling using TensorFlow | by Sunil | Towards Data Science | While in grad school, I worked on an unsupervised machine learning (ML) problem with computational fluid dynamics (CFD) data (link to the paper and the journal article). The singular value decomposition (SVD) based learning algorithm was written in C++ and ran on the CPU. I was recently recalling this work and decided ... | [
{
"code": null,
"e": 614,
"s": 172,
"text": "While in grad school, I worked on an unsupervised machine learning (ML) problem with computational fluid dynamics (CFD) data (link to the paper and the journal article). The singular value decomposition (SVD) based learning algorithm was written in C++ an... |
Count digits in a factorial | Set 2 - GeeksforGeeks | 03 Mar, 2021
Given an integer n (can be very large), find the number of digits that appear in its factorial, where factorial is defined as, factorial(n) = 1*2*3*4........*n and factorial(0) = 1Examples:
Input : n = 1
Output : 1
1! = 1, hence number of digits is 1
Input : 5
Output : 3
5! = 120, i.e., 3 digits
Inpu... | [
{
"code": null,
"e": 26789,
"s": 26761,
"text": "\n03 Mar, 2021"
},
{
"code": null,
"e": 26981,
"s": 26789,
"text": "Given an integer n (can be very large), find the number of digits that appear in its factorial, where factorial is defined as, factorial(n) = 1*2*3*4........*n and... |
Find the index of first 1 in a sorted array of 0's and 1's - GeeksforGeeks | 20 May, 2021
Given a sorted array consisting 0’s and 1’s. The problem is to find the index of first ‘1’ in the sorted array. It could be possible that the array consists of only 0’s or only 1’s. If 1’s are not present in the array then print “-1”.Examples :
Input : arr[] = {0, 0, 0, 0, 0, 0, 1, 1, 1, 1}
Output : 6
Th... | [
{
"code": null,
"e": 26814,
"s": 26786,
"text": "\n20 May, 2021"
},
{
"code": null,
"e": 27061,
"s": 26814,
"text": "Given a sorted array consisting 0’s and 1’s. The problem is to find the index of first ‘1’ in the sorted array. It could be possible that the array consists of onl... |
Python Bokeh – Plotting Vertical Bar Graphs | 30 Nov, 2021
Bokeh is a Python interactive data visualization. It renders its plots using HTML and JavaScript. It targets modern web browsers for presentation providing elegant, concise construction of novel graphics with high-performance interactivity.Bokeh can be used to plot vertical bar graphs. Plotting vertical ba... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n30 Nov, 2021"
},
{
"code": null,
"e": 429,
"s": 52,
"text": "Bokeh is a Python interactive data visualization. It renders its plots using HTML and JavaScript. It targets modern web browsers for presentation providing elegant, concise c... |
How to connect to an API in JavaScript ? | 08 May, 2020
An API or Application Programming Interface is an intermediary which carries request/response data between the endpoints of a channel. We can visualize an analogy of API to that of a waiter in a restaurant. A typical waiter in a restaurant would welcome you and ask for your order. He/She confirms the same ... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n08 May, 2020"
},
{
"code": null,
"e": 1103,
"s": 28,
"text": "An API or Application Programming Interface is an intermediary which carries request/response data between the endpoints of a channel. We can visualize an analogy of API to t... |
set::clear in C++ STL | 22 Jan, 2018
Sets are a type of associative containers in which each element has to be unique, because the value of the element identifies it. The value of the element cannot be modified once it is added to the set, though it is possible to remove and add the modified value of that element.
clear() function is used to ... | [
{
"code": null,
"e": 53,
"s": 25,
"text": "\n22 Jan, 2018"
},
{
"code": null,
"e": 332,
"s": 53,
"text": "Sets are a type of associative containers in which each element has to be unique, because the value of the element identifies it. The value of the element cannot be modified ... |
Generate string with Hamming Distance as half of the hamming distance between strings A and B | 02 Mar, 2022
Given two Binary string A and B of length N, the task is to find the Binary string whose Hamming Distance to strings A and B is half the Hamming Distance of A and B.Examples:
Input: A = “1001010”, B = “0101010” Output: 0001010 Explanation: The hamming distance of the string A and B is 2. The hamming dist... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n02 Mar, 2022"
},
{
"code": null,
"e": 205,
"s": 28,
"text": "Given two Binary string A and B of length N, the task is to find the Binary string whose Hamming Distance to strings A and B is half the Hamming Distance of A and B.Examples: ... |
Program to find line passing through 2 Points | 16 Jun, 2022
Given two points P and Q in the coordinate plane, find the equation of the line passing through both the points.This kind of conversion is very useful in many geometric algorithms like intersection of lines, finding the circumcenter of a triangle, finding the incenter of a triangle and many more...
Example... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n16 Jun, 2022"
},
{
"code": null,
"e": 352,
"s": 52,
"text": "Given two points P and Q in the coordinate plane, find the equation of the line passing through both the points.This kind of conversion is very useful in many geometric algor... |
How to solve “Process out of Memory Exception” in Node.js ? | 02 Jul, 2021
In this article, we will learn how to solve the ProcessOutOfMemory exception in NodeJS. Process out of Memory Exception is an exception that occurs when your node.js program gets out of memory. This happens when the default memory allocated to our program gets exceeded by our program while execution.
This... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n02 Jul, 2021"
},
{
"code": null,
"e": 331,
"s": 28,
"text": "In this article, we will learn how to solve the ProcessOutOfMemory exception in NodeJS. Process out of Memory Exception is an exception that occurs when your node.js program g... |
Find the Missing Number | 05 Jul, 2022
You are given a list of n-1 integers and these integers are in the range of 1 to n. There are no duplicates in the list. One of the integers is missing from the list. Write an efficient code to find the missing integer.Example:
Input: arr[] = {1, 2, 4, 6, 3, 7, 8}Output: 5Explanation: The missing number b... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n05 Jul, 2022"
},
{
"code": null,
"e": 281,
"s": 52,
"text": "You are given a list of n-1 integers and these integers are in the range of 1 to n. There are no duplicates in the list. One of the integers is missing from the list. Write a... |
JDK 17 – New Features in Java 17 | 11 May, 2022
Java 17 LTS is the latest long-term support release for the Java SE platform. JDK 17 binaries are free to use in production and free to redistribute, at no cost, under the Oracle No-Fee Terms and Conditions License, where LTS stands for long-term support. It was released on September 15, 2021.
Have you ev... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n11 May, 2022"
},
{
"code": null,
"e": 324,
"s": 28,
"text": "Java 17 LTS is the latest long-term support release for the Java SE platform. JDK 17 binaries are free to use in production and free to redistribute, at no cost, under the Ora... |
Check whether a given column is present in a Pandas DataFrame or not | 29 Jul, 2021
Consider a Dataframe with 4 columns : ‘ConsumerId’, ‘CarName’, CompanyName, and ‘Price’. We have to determine whether a particular column is present in the DataFrame or not.
In this pandas program, we are using Dataframe.columns attribute That return the column labels of the given Dataframe.
Syntax: Data... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n29 Jul, 2021"
},
{
"code": null,
"e": 204,
"s": 28,
"text": "Consider a Dataframe with 4 columns : ‘ConsumerId’, ‘CarName’, CompanyName, and ‘Price’. We have to determine whether a particular column is present in the DataFrame or not. ... |
Python | os.rename() method | 26 Aug, 2019
OS module in Python provides functions for interacting with the operating system. OS comes under Python’s standard utility modules. This module provides a portable way of using operating system dependent functionality.
os.rename() method in Python is used to rename a file or directory.This method renames a... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n26 Aug, 2019"
},
{
"code": null,
"e": 247,
"s": 28,
"text": "OS module in Python provides functions for interacting with the operating system. OS comes under Python’s standard utility modules. This module provides a portable way of usin... |
modf() in C/C++ | 18 Apr, 2018
In C++, modf() is a predefined function used for mathematical calculations. math.h is the header file required for various mathematical functions. All the functions available in this library take double as an argument and return double as the result.
modf() function breaks the given argument into two parts... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n18 Apr, 2018"
},
{
"code": null,
"e": 279,
"s": 28,
"text": "In C++, modf() is a predefined function used for mathematical calculations. math.h is the header file required for various mathematical functions. All the functions available ... |
Java Program to Sort 2D Array Across Left Diagonal | 10 Oct, 2021
The Vector class implements a growable array of objects. Vectors basically fall in legacy classes but now it is fully compatible with collections. It is found in java.util package and implements the List interface, so we can use all the methods of List interface here. This program is used to Sort the 2D ar... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n10 Oct, 2021"
},
{
"code": null,
"e": 472,
"s": 28,
"text": "The Vector class implements a growable array of objects. Vectors basically fall in legacy classes but now it is fully compatible with collections. It is found in java.util pac... |
How to Play and Record Audio in Python? | 25 Oct, 2021
As python can mostly do everything one can imagine including playing and recording audio. This article will make you familiar with some python libraries and straight-forwards methods using those libraries for playing and recording sound in python, with some more functionalities in exchange for few extra in... | [
{
"code": null,
"e": 53,
"s": 25,
"text": "\n25 Oct, 2021"
},
{
"code": null,
"e": 381,
"s": 53,
"text": "As python can mostly do everything one can imagine including playing and recording audio. This article will make you familiar with some python libraries and straight-forwards... |
Lex program to check whether given number is armstrong number or not | 09 May, 2019
Problem: Lex program to check whether given number is armstrong number or not.
Explanation:Lex is a computer program that generates lexical analyzers and was written by Mike Lesk and Eric Schmidt. Lex reads an input stream specifying the lexical analyzer and outputs source code implementing the lexer in th... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n09 May, 2019"
},
{
"code": null,
"e": 107,
"s": 28,
"text": "Problem: Lex program to check whether given number is armstrong number or not."
},
{
"code": null,
"e": 361,
"s": 107,
"text": "Explanation:Lex is a comput... |
Find the weight of the minimum spanning tree | 12 Aug, 2021
Given a connected undirected weighted graph with N nodes and M edges. The task is to perform given queries and find the weight of the minimum spanning tree. Queries are of three types:
query(1) -> Find the weight of the minimum spanning tree.query(2, x, y) -> Change the weight of the edge between the nod... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n12 Aug, 2021"
},
{
"code": null,
"e": 239,
"s": 52,
"text": "Given a connected undirected weighted graph with N nodes and M edges. The task is to perform given queries and find the weight of the minimum spanning tree. Queries are of th... |
HTML | canvas drawImage() Method | 09 Jun, 2021
In HTML5, canvas drawImage() function is used to display an image or video on canvas. This function can be used to display the whole image or just a small part of the image. But, image has to be loaded first to load it further on canvas.
Syntax:
context.drawImage(img, x, y, swidth, sheight, sx, sy, width... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n09 Jun, 2021"
},
{
"code": null,
"e": 267,
"s": 28,
"text": "In HTML5, canvas drawImage() function is used to display an image or video on canvas. This function can be used to display the whole image or just a small part of the image. B... |
How to reset selected file with input tag file type in Angular 9? | 30 Jun, 2020
To reset the selected file with input tag file type, we can implement a method which on invocation will clear the selected file.
Approach:
Set the id of your input using ‘#’ to make it readable inside the component.
Now in the component we can use ViewChild directive to read the value of the input from th... | [
{
"code": null,
"e": 53,
"s": 25,
"text": "\n30 Jun, 2020"
},
{
"code": null,
"e": 182,
"s": 53,
"text": "To reset the selected file with input tag file type, we can implement a method which on invocation will clear the selected file."
},
{
"code": null,
"e": 192,
... |
Python | Tensorflow nn.softplus() | 06 Jan, 2022
Tensorflow is an open-source machine learning library developed by Google. One of its applications is to develop deep neural networks.
The module tensorflow.nn provides support for many basic neural network operations.
An activation function is a function which is applied to the output of a neural network ... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n06 Jan, 2022"
},
{
"code": null,
"e": 163,
"s": 28,
"text": "Tensorflow is an open-source machine learning library developed by Google. One of its applications is to develop deep neural networks."
},
{
"code": null,
"e": 247... |
How to Play an arbitrary tone in Android using Kotlin? | This example demonstrates how to Play an arbitrary tone in Android using Kotlin
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"?>
<Linear... | [
{
"code": null,
"e": 1142,
"s": 1062,
"text": "This example demonstrates how to Play an arbitrary tone in Android using Kotlin"
},
{
"code": null,
"e": 1271,
"s": 1142,
"text": "Step 1 − Create a new project in Android Studio, go to File ⇒ New Project and fill all required detail... |
CRM - Customer Related Databases | “How you gather, manage, and use information to serve your clients will determine whether you win or lose in the business.”
− Bill Gates
The customer related database gives a business an insight on the customer behavior. It is the foundation on which the CRM software strategies work. For any business using the CRM, the... | [
{
"code": null,
"e": 2058,
"s": 1934,
"text": "“How you gather, manage, and use information to serve your clients will determine whether you win or lose in the business.”"
},
{
"code": null,
"e": 2071,
"s": 2058,
"text": "− Bill Gates"
},
{
"code": null,
"e": 2354,
... |
How to scroll a specific DIV using Selenium WebDriver with Java? | We can scroll a specific DIV using Selenium webdriver. Selenium cannot handle scrolling directly. It takes the help of the Javascript Executor to do scrolling action to a specific DIV.
First of all we have to identify the specific DIV up to which we have to scroll to with the help of xpath or css locator. Next we shall... | [
{
"code": null,
"e": 1247,
"s": 1062,
"text": "We can scroll a specific DIV using Selenium webdriver. Selenium cannot handle scrolling directly. It takes the help of the Javascript Executor to do scrolling action to a specific DIV."
},
{
"code": null,
"e": 1632,
"s": 1247,
"text"... |
Genetic Algorithm for Reinforcement Learning : Python implementation - GeeksforGeeks | 07 Jun, 2019
Most beginners in Machine Learning start with learning Supervised Learning techniques such as classification and regression. However, one of the most important paradigms in Machine Learning is Reinforcement Learning (RL) which is able to tackle many challenging tasks. It is an aspect of Machine learning wh... | [
{
"code": null,
"e": 24256,
"s": 24228,
"text": "\n07 Jun, 2019"
},
{
"code": null,
"e": 24711,
"s": 24256,
"text": "Most beginners in Machine Learning start with learning Supervised Learning techniques such as classification and regression. However, one of the most important par... |
10 Python Code Snippets For Everyday Programming Problems - GeeksforGeeks | 01 Dec, 2021
In recent years, the Python programming language has seen a huge user base. One of the reasons could be that it is easier to learn as compared to other object-oriented programming languages like Java, C++, C#, JavaScript, and therefore more and more beginners who are entering the field of computer science ... | [
{
"code": null,
"e": 24984,
"s": 24956,
"text": "\n01 Dec, 2021"
},
{
"code": null,
"e": 25917,
"s": 24984,
"text": "In recent years, the Python programming language has seen a huge user base. One of the reasons could be that it is easier to learn as compared to other object-orie... |
Batch Script - FORMAT | This batch command formats a disk to use Windows-supported file system such as FAT, FAT32 or NTFS, thereby overwriting the previous content of the disk.
format [drive]
Where drive is the drive which needs to be formatted.
@echo off
format D:\
With the above command, D drive will be formatted.
Print
Add Notes
Bookm... | [
{
"code": null,
"e": 2322,
"s": 2169,
"text": "This batch command formats a disk to use Windows-supported file system such as FAT, FAT32 or NTFS, thereby overwriting the previous content of the disk."
},
{
"code": null,
"e": 2338,
"s": 2322,
"text": "format [drive]\n"
},
{
... |
C++ Program to Calculate Power of a Number | The power of a number can be calculated as x^y where x is the number and y is its power.
For example.
Let’s say, x = 2 and y = 10
x^y =1024
Here, x^y is 2^10
Power of a number can be calculated using recursive and non-recursive programs. Each of these are given as follows.
The program to find the power of a nu... | [
{
"code": null,
"e": 1151,
"s": 1062,
"text": "The power of a number can be calculated as x^y where x is the number and y is its power."
},
{
"code": null,
"e": 1164,
"s": 1151,
"text": "For example."
},
{
"code": null,
"e": 1227,
"s": 1164,
"text": "Let’s say... |
Rendering Text on Video using Python | by Behic Guven | Towards Data Science | In this post, I will show you how to add text to your videos using Python. It may sound very difficult at first glance, but trust me it’s much easier than you think, and also it’s cool. This will be a simple exercise where we will be able to see how machine learning can be used in real life. If you check my other artic... | [
{
"code": null,
"e": 894,
"s": 172,
"text": "In this post, I will show you how to add text to your videos using Python. It may sound very difficult at first glance, but trust me it’s much easier than you think, and also it’s cool. This will be a simple exercise where we will be able to see how machi... |
Iterative diagonal traversal of binary tree - GeeksforGeeks | 23 Aug, 2021
Consider lines of slope -1 passing between nodes. Given a Binary Tree, print all diagonal elements in a binary tree belonging to same line.
Input : Root of below tree
Output :
Diagonal Traversal of binary tree :
8 10 14
3 6 7 13
1 4
We have discussed recursive solution in below post.Diagonal Traversal... | [
{
"code": null,
"e": 35848,
"s": 35820,
"text": "\n23 Aug, 2021"
},
{
"code": null,
"e": 35988,
"s": 35848,
"text": "Consider lines of slope -1 passing between nodes. Given a Binary Tree, print all diagonal elements in a binary tree belonging to same line."
},
{
"code": n... |
Batch Script - Return Code | By default when a command line execution is completed it should either return zero when execution succeeds or non-zero when execution fails. When a batch script returns a non-zero value after the execution fails, the non-zero value will indicate what is the error number. We will then use the error number to determine w... | [
{
"code": null,
"e": 2540,
"s": 2169,
"text": "By default when a command line execution is completed it should either return zero when execution succeeds or non-zero when execution fails. When a batch script returns a non-zero value after the execution fails, the non-zero value will indicate what is... |
WPF - Datepicker | A DatePicker is a control that allows a user to pick a date value. The user picks the date by using ComboBox selection for month, day, and year values. The hierarchical inheritance of DatePicker class is as follows −
CalendarIdentifier
Gets or sets the calendar system to use.
CalendarIdentifierProperty
Gets the identif... | [
{
"code": null,
"e": 2237,
"s": 2020,
"text": "A DatePicker is a control that allows a user to pick a date value. The user picks the date by using ComboBox selection for month, day, and year values. The hierarchical inheritance of DatePicker class is as follows −"
},
{
"code": null,
"e":... |
Python | Pandas.pivot_table() | 28 Sep, 2018
pandas.pivot_table(data, values=None, index=None, columns=None, aggfunc=’mean’, fill_value=None, margins=False, dropna=True, margins_name=’All’) create a spreadsheet-style pivot table as a DataFrame.
Levels in the pivot table will be stored in MultiIndex objects (hierarchical indexes) on the index and colu... | [
{
"code": null,
"e": 54,
"s": 26,
"text": "\n28 Sep, 2018"
},
{
"code": null,
"e": 254,
"s": 54,
"text": "pandas.pivot_table(data, values=None, index=None, columns=None, aggfunc=’mean’, fill_value=None, margins=False, dropna=True, margins_name=’All’) create a spreadsheet-style pi... |
Network Layer - GeeksforGeeks | 02 Dec, 2021
See http://www.geeksforgeeks.org/computer-networks-set-2/
See Question 3 of http://www.geeksforgeeks.org/computer-networks-set-3/
[S1] The computational overhead in link state protocols
is higher than in distance vector protocols.
[S2] A distance vector protocol (with split horizon)
avoids pers... | [
{
"code": null,
"e": 38456,
"s": 38428,
"text": "\n02 Dec, 2021"
},
{
"code": null,
"e": 38514,
"s": 38456,
"text": "See http://www.geeksforgeeks.org/computer-networks-set-2/"
},
{
"code": null,
"e": 38586,
"s": 38514,
"text": "See Question 3 of http://www.gee... |
How to add `style=display:“block”` to an element using jQuery? | 03 Aug, 2021
The task is to add style=display: “block” to an element with the help of jQuery.
There are multiple function or method to do this work, these are as follows:.css(): Set one or more CSS properties for the set of matched elements.Syntax:$("div").css("display", "block").show(): Display the matched elements an... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n03 Aug, 2021"
},
{
"code": null,
"e": 109,
"s": 28,
"text": "The task is to add style=display: “block” to an element with the help of jQuery."
},
{
"code": null,
"e": 532,
"s": 109,
"text": "There are multiple functi... |
PostgreSQL – List Indexes | 22 Jul, 2021
In PostgreSQL, we use the pr_indexes view to list the indexes of a database. PostgreSQL does not provide a command like SHOW INDEXES to list the index information of a table or database. If you use psql to access the PostgreSQL database, you can use the \d command to view the index information for a table.... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n22 Jul, 2021"
},
{
"code": null,
"e": 336,
"s": 28,
"text": "In PostgreSQL, we use the pr_indexes view to list the indexes of a database. PostgreSQL does not provide a command like SHOW INDEXES to list the index information of a table o... |
How to change style attribute of an element dynamically using JavaScript ? | 05 Sep, 2019
Given an HTML document and the task is to change the style properties (CSS Properties) of an element dynamically with the help of JavaScript.
Approach:
Select the element whose style properties needs to be change.
Use element.style property to set the style attribute of an element.
Set the properties eithe... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n05 Sep, 2019"
},
{
"code": null,
"e": 170,
"s": 28,
"text": "Given an HTML document and the task is to change the style properties (CSS Properties) of an element dynamically with the help of JavaScript."
},
{
"code": null,
"... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.