title stringlengths 3 221 | text stringlengths 17 477k | parsed listlengths 0 3.17k |
|---|---|---|
Design a stack which can give maximum frequency element - GeeksforGeeks | 06 Mar, 2022
Given N elements and the task is to implement a stack which removes and returns the maximum frequency element on every pop operation. If there’s a tie in the frequency then the topmost highest frequency element will be returned.Examples:
Input: push(4) 8 push(6) 6 push(7) 7 push(6) 6 push(8); 4Output: po... | [
{
"code": null,
"e": 25078,
"s": 25050,
"text": "\n06 Mar, 2022"
},
{
"code": null,
"e": 25318,
"s": 25078,
"text": "Given N elements and the task is to implement a stack which removes and returns the maximum frequency element on every pop operation. If there’s a tie in the frequ... |
Top 5 Beautiful Soup Functions That Will Make Your Life Easier | by Lazar Gugleta | Towards Data Science | Once you get into Web Scraping and data processing, you will find so many tools that can do that job for you. One of them is Beautiful Soup, which is a python library for pulling data out of HTML and XML files. It creates data parse trees in order to get data easily.
The basic process goes something like this:
Get the ... | [
{
"code": null,
"e": 439,
"s": 171,
"text": "Once you get into Web Scraping and data processing, you will find so many tools that can do that job for you. One of them is Beautiful Soup, which is a python library for pulling data out of HTML and XML files. It creates data parse trees in order to get ... |
Retrieve and Process hyperspectral field measurements | Towards Data Science | As technology evolves rapidly, remote sensing is finding its many uses across different subjects, from forest fire mapping to water quality assessment, 3D surface modeling and many others. The advantages of obtaining physical characteristics of an area by measuring its reflected and emitted radiation at a distance are ... | [
{
"code": null,
"e": 874,
"s": 171,
"text": "As technology evolves rapidly, remote sensing is finding its many uses across different subjects, from forest fire mapping to water quality assessment, 3D surface modeling and many others. The advantages of obtaining physical characteristics of an area by... |
How to use drag and drop in Android? | This example demonstrates how do I use drag and drop 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.
<LinearLayout xmlns:android="http://schemas.android.com/apk/r... | [
{
"code": null,
"e": 1127,
"s": 1062,
"text": "This example demonstrates how do I use drag and drop in android."
},
{
"code": null,
"e": 1256,
"s": 1127,
"text": "Step 1 − Create a new project in Android Studio, go to File ⇒ New Project and fill all required details to create a n... |
Fortran - Stop Statement | If you wish execution of your program to cease, you can insert a stop statement.
program stop_example
implicit none
integer :: i
do i = 1, 20
if (i == 5) then
stop
end if
print*, i
end do
end program stop_example
When th... | [
{
"code": null,
"e": 2227,
"s": 2146,
"text": "If you wish execution of your program to cease, you can insert a stop statement."
},
{
"code": null,
"e": 2459,
"s": 2227,
"text": "program stop_example \nimplicit none\n\n integer :: i \n do i = 1, 20 \n \n ... |
Find minimum and maximum element in an array | Practice | GeeksforGeeks | Given an array A of size N of integers. Your task is to find the minimum and maximum elements in the array.
Example 1:
Input:
N = 6
A[] = {3, 2, 1, 56, 10000, 167}
Output:
min = 1, max = 10000
Example 2:
Input:
N = 5
A[] = {1, 345, 234, 21, 56789}
Output:
min = 1, max = 56789
Your Task:
You don't need to read... | [
{
"code": null,
"e": 346,
"s": 238,
"text": "Given an array A of size N of integers. Your task is to find the minimum and maximum elements in the array."
},
{
"code": null,
"e": 359,
"s": 348,
"text": "Example 1:"
},
{
"code": null,
"e": 434,
"s": 359,
"text":... |
How to Copy Rows from One Table to Another in SQL? - GeeksforGeeks | 28 Feb, 2022
In this article, we learn How to copy rows from one table to another table in SQL. For better understanding, we will Implement this Query with the Help of an Example. This query is Very Help Whenever we need two or more same Column in a Different Table. That time we do need to insert the record manually in... | [
{
"code": null,
"e": 24268,
"s": 24240,
"text": "\n28 Feb, 2022"
},
{
"code": null,
"e": 24872,
"s": 24268,
"text": "In this article, we learn How to copy rows from one table to another table in SQL. For better understanding, we will Implement this Query with the Help of an Examp... |
How to pass multiple props in a single event handler in ReactJS? - GeeksforGeeks | 31 Mar, 2021
If we want to pass/call the multiple props methods in a single event handler in ReactJS then there are two ways to make it work.
Method 1: We can make a separate method for the event and call all the props method in that method. Syntax:const seperateMethod= () => {
props.method1()
props.method2()
}
Metho... | [
{
"code": null,
"e": 24397,
"s": 24369,
"text": "\n31 Mar, 2021"
},
{
"code": null,
"e": 24526,
"s": 24397,
"text": "If we want to pass/call the multiple props methods in a single event handler in ReactJS then there are two ways to make it work."
},
{
"code": null,
"e... |
C# program to display the next day | To display the next day, use the AddDays() method and a value +1 to get the next day.
Firstly, use the following to get the current day −
DateTime.Today
Now, add 1 to the AddDays() method to get the next day −
DateTime.Today.AddDays(1)
The following is the code −
Live Demo
using System;
using System.Collections.Generi... | [
{
"code": null,
"e": 1148,
"s": 1062,
"text": "To display the next day, use the AddDays() method and a value +1 to get the next day."
},
{
"code": null,
"e": 1200,
"s": 1148,
"text": "Firstly, use the following to get the current day −"
},
{
"code": null,
"e": 1215,
... |
Check if given email address is valid or not in C++ - GeeksforGeeks | 26 Oct, 2020
Given a string email that denotes an Email Address, the task is to check if the given string is a valid email id or not. If found to be true, then print “Valid”. Otherwise, print “Invalid”. A valid email address consists of an email prefix and an email domain, both in acceptable formats:
The email address ... | [
{
"code": null,
"e": 24854,
"s": 24826,
"text": "\n26 Oct, 2020"
},
{
"code": null,
"e": 25143,
"s": 24854,
"text": "Given a string email that denotes an Email Address, the task is to check if the given string is a valid email id or not. If found to be true, then print “Valid”. O... |
C# | NumericUpDown Class - GeeksforGeeks | 05 Sep, 2019
In Windows Forms, NumericUpDown control is used to provide a Windows spin box or an up-down control which displays the numeric values. Or in other words, NumericUpDown control provides an interface which moves using up and down arrow and holds some pre-defined numeric value. The NumericUpDown class is used... | [
{
"code": null,
"e": 24416,
"s": 24388,
"text": "\n05 Sep, 2019"
},
{
"code": null,
"e": 24976,
"s": 24416,
"text": "In Windows Forms, NumericUpDown control is used to provide a Windows spin box or an up-down control which displays the numeric values. Or in other words, NumericUp... |
Graph Coloring Algorithm with Networkx in Python | Towards Data Science | Let’s start with a possible real life challenge and I want to convince you that network theory and the mathematical tools that were developed within this field can solve this for you.
Imagine you work in the administration of a school for several years now. To make the exam schedules was painful but manageable with pap... | [
{
"code": null,
"e": 356,
"s": 172,
"text": "Let’s start with a possible real life challenge and I want to convince you that network theory and the mathematical tools that were developed within this field can solve this for you."
},
{
"code": null,
"e": 849,
"s": 356,
"text": "Im... |
Statistics - Reliability Coefficient | A measure of the accuracy of a test or measuring instrument obtained by measuring the same individuals twice and computing the correlation of the two sets of measures.
Reliability Coefficient is defined and given by the following function:
Reliability Coefficient, RC=(N(N−1))×((Total Variance −Sum of Variance)TotalVari... | [
{
"code": null,
"e": 4491,
"s": 4323,
"text": "A measure of the accuracy of a test or measuring instrument obtained by measuring the same individuals twice and computing the correlation of the two sets of measures."
},
{
"code": null,
"e": 4563,
"s": 4491,
"text": "Reliability Co... |
Ruby | Hash each_pair() function - GeeksforGeeks | 07 Jan, 2020
Hash#each_pair() is a Hash class method which finds the nested value which calls block once for each pair in hash by passing the key_value pair as parameters.
Syntax: Hash.each_pair()
Parameter: Hash values
Return: calls block once for key_value pair in hash with key_value pair as parameter otherwise Enume... | [
{
"code": null,
"e": 23247,
"s": 23219,
"text": "\n07 Jan, 2020"
},
{
"code": null,
"e": 23406,
"s": 23247,
"text": "Hash#each_pair() is a Hash class method which finds the nested value which calls block once for each pair in hash by passing the key_value pair as parameters."
}... |
Count the number of carry operations required to add two numbers in C++ | We are given two numbers num_1 and num_2. The goal is to count the number of carry operations required if the numbers are added. If numbers are 123 and 157 then carry operations will be 1. (7+3=10, 1+2+5=8, 1+1=2 ).
Let us understand with examples
Input − num_1=432 num_2=638
Output − Count of number of carry operations... | [
{
"code": null,
"e": 1278,
"s": 1062,
"text": "We are given two numbers num_1 and num_2. The goal is to count the number of carry operations required if the numbers are added. If numbers are 123 and 157 then carry operations will be 1. (7+3=10, 1+2+5=8, 1+1=2 )."
},
{
"code": null,
"e": ... |
HTML - <img> Tag | The HTML <img> tag is used to put an image in an HTML document.
<!DOCTYPE html>
<html>
<head>
<title>HTML Tag</title>
</head>
<body>
<img src = "https://www.tutorialspoint.com/images/html.gif"
alt = "HTML Tutorial" height = "150" width = "140" />
</body>
</html>
This will produce th... | [
{
"code": null,
"e": 2438,
"s": 2374,
"text": "The HTML <img> tag is used to put an image in an HTML document."
},
{
"code": null,
"e": 2674,
"s": 2438,
"text": "<!DOCTYPE html>\n<html>\n\n <head>\n <title>HTML Tag</title>\n </head>\n\n <body>\n <img src = \"http... |
AWK - Quick Guide | AWK is an interpreted programming language. It is very powerful and specially designed for text processing. Its name is derived from the family names of its authors − Alfred Aho, Peter Weinberger, and Brian Kernighan.
The version of AWK that GNU/Linux distributes is written and maintained by the Free Software Foundatio... | [
{
"code": null,
"e": 2075,
"s": 1857,
"text": "AWK is an interpreted programming language. It is very powerful and specially designed for text processing. Its name is derived from the family names of its authors − Alfred Aho, Peter Weinberger, and Brian Kernighan."
},
{
"code": null,
"e"... |
Infinite Steps CartPole Problem With Variable Reward | by Suraj Regmi | Towards Data Science | In the last blog post, we wrote our first reinforcement learning application — CartPole problem. We used Deep -Q-Network to train the algorithm. As we can see in the blog, the fixed reward of +1 was used for all the stable states and when the CartPole loses its balance, a reward of 0 was given. We saw at the end: when ... | [
{
"code": null,
"e": 793,
"s": 171,
"text": "In the last blog post, we wrote our first reinforcement learning application — CartPole problem. We used Deep -Q-Network to train the algorithm. As we can see in the blog, the fixed reward of +1 was used for all the stable states and when the CartPole los... |
Page Rank Algorithm and Implementation using Python | The PageRank algorithm is applicable in web pages. Web page is a directed graph, we know that the two components of Directed graphsare -nodes and connections. The pages are nodes and hyperlinks are the connections, the connection between two nodes.
We can find out the importance of each page by the PageRank and it is a... | [
{
"code": null,
"e": 1311,
"s": 1062,
"text": "The PageRank algorithm is applicable in web pages. Web page is a directed graph, we know that the two components of Directed graphsare -nodes and connections. The pages are nodes and hyperlinks are the connections, the connection between two nodes."
}... |
Deep Learning for image classification w/ implementation in PyTorch | by Amine Hadj-Youcef, PhD. | Towards Data Science | This article will explain the Convolutional Neural Network (CNN) with an illustration of image classification. It provides a simple implementation of the CNN algorithm using the framework PyTorch on Python.There are many free courses that can be found on the internet. Personally, I suggest the course of Andrej Karpathy... | [
{
"code": null,
"e": 655,
"s": 172,
"text": "This article will explain the Convolutional Neural Network (CNN) with an illustration of image classification. It provides a simple implementation of the CNN algorithm using the framework PyTorch on Python.There are many free courses that can be found on ... |
p5.js | random() Function - GeeksforGeeks | 22 Apr, 2019
The random() function in p5.js is used to return a random floating point number between ranges given as the parameter.
Syntax:
random(Min, Max)
or
random(Array)
Parameters: This function accepts three parameters as mentioned above and described below:
Min: This is the lower bound of the random number which... | [
{
"code": null,
"e": 24341,
"s": 24313,
"text": "\n22 Apr, 2019"
},
{
"code": null,
"e": 24460,
"s": 24341,
"text": "The random() function in p5.js is used to return a random floating point number between ranges given as the parameter."
},
{
"code": null,
"e": 24468,
... |
What are generic methods in C#? | Generics allow you to write a class or method that can work with any data type. Declare a generic method with a type parameter −
static void Swap(ref T lhs, ref T rhs) {}
To call the above shown generic method, here is an example −
Swap(ref a, ref b);
Let us see how to create a generic method in C# −
Live Demo
using S... | [
{
"code": null,
"e": 1191,
"s": 1062,
"text": "Generics allow you to write a class or method that can work with any data type. Declare a generic method with a type parameter −"
},
{
"code": null,
"e": 1233,
"s": 1191,
"text": "static void Swap(ref T lhs, ref T rhs) {}"
},
{
... |
Check data type in NumPy - GeeksforGeeks | 09 Aug, 2021
Numpy is a module in python. It is originally called numerical python, but in short, we pronounce it as numpy. NumPy is a general-purpose array-processing package in python. It provides high-performance multidimensional data structures like array objects and tools for working with these arrays. Numpy provi... | [
{
"code": null,
"e": 24292,
"s": 24264,
"text": "\n09 Aug, 2021"
},
{
"code": null,
"e": 24661,
"s": 24292,
"text": "Numpy is a module in python. It is originally called numerical python, but in short, we pronounce it as numpy. NumPy is a general-purpose array-processing package ... |
JavaMail API - Deleting Emails | In this chapter we will see how to delete an email using JavaMail API. Deleting messages involves working with the Flags associated with the messages. There are different flags for different states, some system-defined and some user-defined. The predefined flags are defined in the inner class Flags.Flag and are listed ... | [
{
"code": null,
"e": 2398,
"s": 2071,
"text": "In this chapter we will see how to delete an email using JavaMail API. Deleting messages involves working with the Flags associated with the messages. There are different flags for different states, some system-defined and some user-defined. The predefi... |
GETUTCDATE() Function in SQL Server - GeeksforGeeks | 21 Jan, 2021
GETUTCDATE() :
This function in SQL Server is used to return the UTC date and time of the present database system in a ‘YYYY-MM-DD hh:mm:ss.mmm’ pattern.
Features :
This function is used to find the UTC date and time of the current database system.
This function comes under Date Functions.
This function do... | [
{
"code": null,
"e": 24268,
"s": 24240,
"text": "\n21 Jan, 2021"
},
{
"code": null,
"e": 24283,
"s": 24268,
"text": "GETUTCDATE() :"
},
{
"code": null,
"e": 24422,
"s": 24283,
"text": "This function in SQL Server is used to return the UTC date and time of the ... |
Creating Containerized Workflows with Argo | by George Novack | Towards Data Science | In a previous article, I explored Kubeflow Pipelines and walked through the process of creating and executing a simple Machine Learning Pipeline. In this article, I will take a closer look at Argo, the open-source workflow orchestration engine that is used as the default orchestration platform for Kubeflow Pipelines.
I... | [
{
"code": null,
"e": 491,
"s": 172,
"text": "In a previous article, I explored Kubeflow Pipelines and walked through the process of creating and executing a simple Machine Learning Pipeline. In this article, I will take a closer look at Argo, the open-source workflow orchestration engine that is use... |
URL getPath() method in Java with Examples | 31 Dec, 2018
The getPath() function is a part of URL class. The function getPath() returns the Path name of a specified URL.
Function Signature:
public String getPath()
Syntax:
url.getPath()
Parameter: This function does not require any parameterReturn Type: The function returns String Type
Below programs illustrates t... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n31 Dec, 2018"
},
{
"code": null,
"e": 140,
"s": 28,
"text": "The getPath() function is a part of URL class. The function getPath() returns the Path name of a specified URL."
},
{
"code": null,
"e": 160,
"s": 140,
"te... |
Pie plot using Plotly in Python | 28 Jun, 2021
Plotly is a Python library which is used to design graphs, especially interactive graphs. It can plot various graphs and charts like histogram, barplot, boxplot, spreadplot and many more. It is mainly used in data analysis as well as financial analysis. plotly is an interactive visualization library.
A pi... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n28 Jun, 2021"
},
{
"code": null,
"e": 331,
"s": 28,
"text": "Plotly is a Python library which is used to design graphs, especially interactive graphs. It can plot various graphs and charts like histogram, barplot, boxplot, spreadplot an... |
C# | SortedDictionary.Add() Method | 21 Jan, 2019
This is used to add a specified key and value to the sorted dictionary. The elements are sorted according to TKey.
Syntax:
public void Add (TKey key, TValue value);
Parameters:
key: It is the key of the element to add.value: It is the value of the element to add. The value can be null for reference types.... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n21 Jan, 2019"
},
{
"code": null,
"e": 143,
"s": 28,
"text": "This is used to add a specified key and value to the sorted dictionary. The elements are sorted according to TKey."
},
{
"code": null,
"e": 151,
"s": 143,
... |
TreeSet in Java | 07 Jul, 2022
TreeSet is one of the most important implementations of the SortedSet interface in Java that uses a Tree for storage. The ordering of the elements is maintained by a set using their natural ordering whether or not an explicit comparator is provided. This must be consistent with equals if it is to correctly... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n07 Jul, 2022"
},
{
"code": null,
"e": 390,
"s": 52,
"text": "TreeSet is one of the most important implementations of the SortedSet interface in Java that uses a Tree for storage. The ordering of the elements is maintained by a set usin... |
Maximize count of non overlapping substrings which contains all occurrences of its characters | 10 Mar, 2022
Given string str consisting of lowercase letters, the task is to find the maximum number of non-overlapping substrings such that each substring contains all occurrences of its characters from the entire string. If multiple solutions with the same number of substrings exist, then print the one with the mini... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n10 Mar, 2022"
},
{
"code": null,
"e": 353,
"s": 28,
"text": "Given string str consisting of lowercase letters, the task is to find the maximum number of non-overlapping substrings such that each substring contains all occurrences of its... |
Python – seaborn.boxenplot() method | 18 Aug, 2020
Prerequisite : Fundamentals of Seaborn
Seaborn is a Python data visualization library based on matplotlib. It provides a high-level interface for drawing attractive and informative statistical graphics. There is just something extraordinary about a well-designed visualization. The colors stand out, the lay... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n18 Aug, 2020"
},
{
"code": null,
"e": 67,
"s": 28,
"text": "Prerequisite : Fundamentals of Seaborn"
},
{
"code": null,
"e": 506,
"s": 67,
"text": "Seaborn is a Python data visualization library based on matplotlib. I... |
Java Program to Validate Phone Numbers using Google’s libphonenumber Library | 02 Feb, 2021
Validating phone numbers is a common prerequisite in today’s web, mobile, or desktop applications, but Java does not have an integrated method for carrying out this kind of common validation. So, we have to use some open source libraries to perform such validation. One such library is Google’s phone number... | [
{
"code": null,
"e": 54,
"s": 26,
"text": "\n02 Feb, 2021"
},
{
"code": null,
"e": 472,
"s": 54,
"text": "Validating phone numbers is a common prerequisite in today’s web, mobile, or desktop applications, but Java does not have an integrated method for carrying out this kind of c... |
Change the data type of a column or a Pandas Series | 17 Aug, 2020
Series is a one-dimensional labeled array capable of holding data of the type integer, string, float, python objects, etc. The axis labels are collectively called index.
Let’s see the program to change the data type of column or a Series in Pandas Dataframe.Method 1: Using DataFrame.astype() method.
We ca... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n17 Aug, 2020"
},
{
"code": null,
"e": 199,
"s": 28,
"text": "Series is a one-dimensional labeled array capable of holding data of the type integer, string, float, python objects, etc. The axis labels are collectively called index. "
}... |
jQuery | height() and innerHeight() with Examples | 13 Feb, 2019
The height() is an inbuilt method in jQuery which is used to check the height of an element but it will not check the padding, border and margin of the element.Syntax:
$("param").height()
Parameters : This function do not accept any parameter.Return value : It returns height of the selected element.
<html... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n13 Feb, 2019"
},
{
"code": null,
"e": 196,
"s": 28,
"text": "The height() is an inbuilt method in jQuery which is used to check the height of an element but it will not check the padding, border and margin of the element.Syntax:"
},
... |
How to validate MAC address using Regular Expression | 27 Jan, 2021
Given string str, the task is to check whether the given string is a valid MAC address or not by using Regular Expression.
A valid MAC address must satisfy the following conditions:
It must contain 12 hexadecimal digits.One way to represent them is to form six pairs of the characters separated with a hyph... | [
{
"code": null,
"e": 54,
"s": 26,
"text": "\n27 Jan, 2021"
},
{
"code": null,
"e": 177,
"s": 54,
"text": "Given string str, the task is to check whether the given string is a valid MAC address or not by using Regular Expression."
},
{
"code": null,
"e": 237,
"s": ... |
How to change css styles of elements in JavaScript? | JavaScript can change Css styles such as color, font size etc. of elements using some methods such as getElementById(), getElementByClassName() etc.
In the following example font style and font size of the elements have changed using getElementById() method.
Live Demo
In the following example, using style commands "sty... | [
{
"code": null,
"e": 1336,
"s": 1187,
"text": "JavaScript can change Css styles such as color, font size etc. of elements using some methods such as getElementById(), getElementByClassName() etc."
},
{
"code": null,
"e": 1446,
"s": 1336,
"text": "In the following example font sty... |
Gerrit - Configuring Git-Review | Gerrit is built on top of Git version control system, which extracts the code from other host, pushing changes to the code, submitting the code for review, etc. The default remote name of Git is origin and we tell git-review to use this name 'origin' by using the following command.
$ git config --global gitreview.remot... | [
{
"code": null,
"e": 2655,
"s": 2372,
"text": "Gerrit is built on top of Git version control system, which extracts the code from other host, pushing changes to the code, submitting the code for review, etc. The default remote name of Git is origin and we tell git-review to use this name 'origin' by... |
Reverse Delete Algorithm for Minimum Spanning Tree | 07 Jul, 2022
Reverse Delete algorithm is closely related to Kruskal’s algorithm. In Kruskal’s algorithm what we do is : Sort edges by increasing order of their weights. After sorting, we one by one pick edges in increasing order. We include current picked edge if by including this in spanning tree not form any cycle un... | [
{
"code": null,
"e": 54,
"s": 26,
"text": "\n07 Jul, 2022"
},
{
"code": null,
"e": 433,
"s": 54,
"text": "Reverse Delete algorithm is closely related to Kruskal’s algorithm. In Kruskal’s algorithm what we do is : Sort edges by increasing order of their weights. After sorting, we ... |
How to find the missing number in a given Array from number 1 to n in Java? | If a single number is missing in an integer array that contains a sequence of numbers values, you can find it basing of the sum of numbers or, basing on the xor of the numbers.
Based on the sum of the numbers −
The sum of n sequential numbers will be [n*(n+1)]/2. Using this get the sum of the numbers the n numbers.
Add... | [
{
"code": null,
"e": 1239,
"s": 1062,
"text": "If a single number is missing in an integer array that contains a sequence of numbers values, you can find it basing of the sum of numbers or, basing on the xor of the numbers."
},
{
"code": null,
"e": 1273,
"s": 1239,
"text": "Based... |
Timing diagram of INR M - GeeksforGeeks | 26 Oct, 2018
Problem – Draw the timing diagram of the given instruction in 8085,
INR M
The content present in the designated register/memory location (M) is incremented by 1 and the result is stored in the same place. If the operand is a memory location, it is specified by the contents of HL pair.Example:
INR M
Opcode... | [
{
"code": null,
"e": 24926,
"s": 24898,
"text": "\n26 Oct, 2018"
},
{
"code": null,
"e": 24994,
"s": 24926,
"text": "Problem – Draw the timing diagram of the given instruction in 8085,"
},
{
"code": null,
"e": 25001,
"s": 24994,
"text": "INR M "
},
{
"... |
after method in Python Tkinter | Tkinter is a python library to make GUIs. It has many built in methods to create and manipulate GUI windows and other widgets to show the data and GUI events. In this article we will see how the after method is used in a Tkinter GUI.
.after(delay, FuncName=FuncName)
This method calls the function FuncName after the giv... | [
{
"code": null,
"e": 1296,
"s": 1062,
"text": "Tkinter is a python library to make GUIs. It has many built in methods to create and manipulate GUI windows and other widgets to show the data and GUI events. In this article we will see how the after method is used in a Tkinter GUI."
},
{
"code... |
DFA of alternate 0's and 1's - GeeksforGeeks | 09 Sep, 2020
Regular Expression can be anything, from a terminal symbol, ∅, to union of two regular expressions (R1 + R2), their concatenation (R1R2) or its closure R1* as well.
Examples of Regular Expression :
Regular expression of set of all strings of 0’s and 1’s starting with two zeros :00(0+1)*Regular expression o... | [
{
"code": null,
"e": 24495,
"s": 24467,
"text": "\n09 Sep, 2020"
},
{
"code": null,
"e": 24660,
"s": 24495,
"text": "Regular Expression can be anything, from a terminal symbol, ∅, to union of two regular expressions (R1 + R2), their concatenation (R1R2) or its closure R1* as well... |
Subset Sums | Practice | GeeksforGeeks | Given a list arr of N integers, print sums of all subsets in it.
Example 1:
Input:
N = 2
arr[] = {2, 3}
Output:
0 2 3 5
Explanation:
When no elements is taken then Sum = 0.
When only 2 is taken then Sum = 2.
When only 3 is taken then Sum = 3.
When element 2 and 3 are taken then
Sum = 2+3 = 5.
Example 2:
Input:
N = 3... | [
{
"code": null,
"e": 303,
"s": 238,
"text": "Given a list arr of N integers, print sums of all subsets in it."
},
{
"code": null,
"e": 316,
"s": 305,
"text": "Example 1:"
},
{
"code": null,
"e": 535,
"s": 316,
"text": "Input:\nN = 2\narr[] = {2, 3}\nOutput:\n0... |
C++ String Library - reserve | It request a change in capacity.
Following is the declaration for std::string::reserve.
void reserve (size_t n = 0);
void reserve (size_t n = 0);
n − Planned length for the string.
none
if an exception is thrown, there are no changes in the string.
In below example for std::string::reserve.
#include <iostream>
#include... | [
{
"code": null,
"e": 2636,
"s": 2603,
"text": "It request a change in capacity."
},
{
"code": null,
"e": 2691,
"s": 2636,
"text": "Following is the declaration for std::string::reserve."
},
{
"code": null,
"e": 2720,
"s": 2691,
"text": "void reserve (size_t n ... |
Area of a polygon with given n ordered vertices - GeeksforGeeks | 07 Nov, 2021
Given ordered coordinates of a polygon with n vertices. Find the area of the polygon. Here ordered means that the coordinates are given either in a clockwise manner or anticlockwise from the first vertex to last.Examples :
Input : X[] = {0, 4, 4, 0}, Y[] = {0, 0, 4, 4};
Output : 16
Input : X[] = {0, 4, ... | [
{
"code": null,
"e": 24415,
"s": 24387,
"text": "\n07 Nov, 2021"
},
{
"code": null,
"e": 24639,
"s": 24415,
"text": "Given ordered coordinates of a polygon with n vertices. Find the area of the polygon. Here ordered means that the coordinates are given either in a clockwise manne... |
An Advanced Example of the Tensorflow Estimator Class | by Tijmen Verhulsdonck | Towards Data Science | Estimators were introduced in version 1.3 of the Tensorflow API, and are used to abstract and simplify training, evaluation and prediction. If you haven’t worked with Estimators before I suggest to start by reading this article and get some familiarity as I won’t be covering all of the basics when using estimators. Ins... | [
{
"code": null,
"e": 640,
"s": 172,
"text": "Estimators were introduced in version 1.3 of the Tensorflow API, and are used to abstract and simplify training, evaluation and prediction. If you haven’t worked with Estimators before I suggest to start by reading this article and get some familiarity as... |
C library function - ftell() | The C library function long int ftell(FILE *stream) returns the current file position of the given stream.
Following is the declaration for ftell() function.
long int ftell(FILE *stream)
stream − This is the pointer to a FILE object that identifies the stream.
stream − This is the pointer to a FILE object that identifi... | [
{
"code": null,
"e": 2114,
"s": 2007,
"text": "The C library function long int ftell(FILE *stream) returns the current file position of the given stream."
},
{
"code": null,
"e": 2165,
"s": 2114,
"text": "Following is the declaration for ftell() function."
},
{
"code": nu... |
How to Check if PHP session has already started? | In PHP,we utilize session_start() an inbuilt function to start the session .But the problem we face in a PHP script is if we execute it more than once it throws an error. So here we will learn how to check the session started or not without calling session_start() function twice.
There are two ways to follow to resolve... | [
{
"code": null,
"e": 1343,
"s": 1062,
"text": "In PHP,we utilize session_start() an inbuilt function to start the session .But the problem we face in a PHP script is if we execute it more than once it throws an error. So here we will learn how to check the session started or not without calling sess... |
Find the sequence number of a triangular number - GeeksforGeeks | 17 Mar, 2021
Given an integer N print the sequence number of the given Triangular Number. If the number is not a triangular number then print -1.
A number is termed as a triangular number if we can represent it in the form of a triangular grid of points such that the points form an equilateral triangle and each row co... | [
{
"code": null,
"e": 24711,
"s": 24683,
"text": "\n17 Mar, 2021"
},
{
"code": null,
"e": 24845,
"s": 24711,
"text": "Given an integer N print the sequence number of the given Triangular Number. If the number is not a triangular number then print -1. "
},
{
"code": null,
... |
How do we use radio buttons in HTML forms? | Using HTML forms, you can easily take user input. The <form> tag is used to get user input, by adding the form elements. Different types of form elements include text input, radio button input, submit button, etc.
Let’s learn how to use radio buttons in HTML forms to get user input. Radio buttons are used when out of m... | [
{
"code": null,
"e": 1276,
"s": 1062,
"text": "Using HTML forms, you can easily take user input. The <form> tag is used to get user input, by adding the form elements. Different types of form elements include text input, radio button input, submit button, etc."
},
{
"code": null,
"e": 15... |
Matplotlib.axes.Axes.set_transform() in Python - GeeksforGeeks | 30 Apr, 2020
Matplotlib is a library in Python and it is numerical – mathematical extension for NumPy library. The Axes Class contains most of the figure elements: Axis, Tick, Line2D, Text, Polygon, etc., and sets the coordinate system. And the instances of Axes supports callbacks through a callbacks attribute.
The Axe... | [
{
"code": null,
"e": 23901,
"s": 23873,
"text": "\n30 Apr, 2020"
},
{
"code": null,
"e": 24201,
"s": 23901,
"text": "Matplotlib is a library in Python and it is numerical – mathematical extension for NumPy library. The Axes Class contains most of the figure elements: Axis, Tick, ... |
There are two very different ways to deploy ML models, here’s both | by Tom Grek | Towards Data Science | If an ML model makes a prediction in Jupyter, is anyone around to hear it?
Probably not. Deploying models is the key to making them useful.
It’s not only if you’re building product, in which case deployment is a necessity — it also applies if you’re generating reports for management. Ten years ago it was unthinkable th... | [
{
"code": null,
"e": 247,
"s": 172,
"text": "If an ML model makes a prediction in Jupyter, is anyone around to hear it?"
},
{
"code": null,
"e": 312,
"s": 247,
"text": "Probably not. Deploying models is the key to making them useful."
},
{
"code": null,
"e": 749,
... |
Installing Hadoop 3.1.0 multi-node cluster on Ubuntu 16.04 Step by Step | by Hadi Fadlallah | Towards Data Science | There are many links on the web about install Hadoop 3. Many of them are not working well or need improvements. This article is taken from the official documentation and other articles in addition of many answers from Stackoverflow.com
Note: All prerequisites must be applied on name node and data nodes
First, we need t... | [
{
"code": null,
"e": 407,
"s": 171,
"text": "There are many links on the web about install Hadoop 3. Many of them are not working well or need improvements. This article is taken from the official documentation and other articles in addition of many answers from Stackoverflow.com"
},
{
"code... |
How to multiply each value in a column by a constant in R? | To multiply each value in a column by a constant, we can use multiplication sign *.
For example, if we have a data frame called df that contains a column say x. Now, if we want to multiply each value in x with 10 then we can use the below mentioned command −
df$x<-10*(df$x)
Following snippet creates a sample data frame... | [
{
"code": null,
"e": 1146,
"s": 1062,
"text": "To multiply each value in a column by a constant, we can use multiplication sign *."
},
{
"code": null,
"e": 1321,
"s": 1146,
"text": "For example, if we have a data frame called df that contains a column say x. Now, if we want to mu... |
NeuralProphet: A Time-Series Modeling Library based on Neural-Networks | by Esmaeil Alizadeh | Towards Data Science | NeuralProphet is a python library for modeling time-series data based on neural networks. It’s built on top of PyTorch and is heavily inspired by Facebook Prophet and AR-Net libraries.
From the library name, you may ask what is the main difference between Facebook’s Prophet library and NeuralProphet. According to Neura... | [
{
"code": null,
"e": 356,
"s": 171,
"text": "NeuralProphet is a python library for modeling time-series data based on neural networks. It’s built on top of PyTorch and is heavily inspired by Facebook Prophet and AR-Net libraries."
},
{
"code": null,
"e": 544,
"s": 356,
"text": "F... |
Tree Data Structure (Case Study) | So far we have seen different concepts of logic programming in Prolog. Now we will see one case study on Prolog. We will see how to implement a tree data structure using Prolog, and we will create our own operators. So let us start the planning.
Suppose we have a tree as shown below −
We have to implement this tree usi... | [
{
"code": null,
"e": 2338,
"s": 2092,
"text": "So far we have seen different concepts of logic programming in Prolog. Now we will see one case study on Prolog. We will see how to implement a tree data structure using Prolog, and we will create our own operators. So let us start the planning."
},
... |
All Unique Permutations of an array | Practice | GeeksforGeeks | Given an array arr[] of length n. Find all possible unique permutations of the array.
Example 1:
Input:
n = 3
arr[] = {1, 2, 1}
Output:
1 1 2
1 2 1
2 1 1
Explanation:
These are the only possible unique permutations
for the given array.
Example 2:
Input:
n = 2
arr[] = {4, 5}
Output:
4 5
5 4
Your Task:
You don't ... | [
{
"code": null,
"e": 312,
"s": 226,
"text": "Given an array arr[] of length n. Find all possible unique permutations of the array."
},
{
"code": null,
"e": 324,
"s": 312,
"text": "\nExample 1:"
},
{
"code": null,
"e": 466,
"s": 324,
"text": "Input: \nn = 3\nar... |
java.time.LocalDateTime.getLong() Method Example | The java.time.LocalDateTime.getLong(TemporalField field) method gets the value of the specified field from this date-time as an long.
Following is the declaration for java.time.LocalDateTime.getLong(TemporalField field) method.
public long getLong(TemporalField field)
field − the field to get, not null.
the value for ... | [
{
"code": null,
"e": 2049,
"s": 1915,
"text": "The java.time.LocalDateTime.getLong(TemporalField field) method gets the value of the specified field from this date-time as an long."
},
{
"code": null,
"e": 2143,
"s": 2049,
"text": "Following is the declaration for java.time.Local... |
Selenium - Radio Button Interaction | In this section, we will understand how to interact with Radio Buttons. We can select a radio button option using the 'click' method and unselect using the same 'click' method.
Let us understand how to interact with radio buttons using https://www.calculator.net/mortgage-payoff-calculator.html. We can also check if a r... | [
{
"code": null,
"e": 2052,
"s": 1875,
"text": "In this section, we will understand how to interact with Radio Buttons. We can select a radio button option using the 'click' method and unselect using the same 'click' method."
},
{
"code": null,
"e": 2231,
"s": 2052,
"text": "Let u... |
Walmart Interview Experience | On-Campus 2021 (Virtual) | 26 Aug, 2021
In Placement season 2021-22 Walmart Labs Visited our campus
Round 1(Coding Round): Platform was HackerEarth time duration was 1 hour. [100 Marks ]
30 MCQs (Moderate Level Core CS questions) 1 marks each
Coding question 1-We have to find minimum length of matching substrings among two strings.[simple HashM... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n26 Aug, 2021"
},
{
"code": null,
"e": 112,
"s": 52,
"text": "In Placement season 2021-22 Walmart Labs Visited our campus"
},
{
"code": null,
"e": 200,
"s": 112,
"text": "Round 1(Coding Round): Platform was HackerEar... |
JavaScript | How to add an element to a JSON object? | 27 May, 2019
In order to add Key/value pair to a JSON object, Either we use dot notation or square bracket notation. Both methods are widely accepted.
Example 1: This example adds {“prop_4” : “val_4”} to the GFG_p object by using dot notation.
<!DOCTYPE html><html> <head> <title> JavaScript | Add a key/... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n27 May, 2019"
},
{
"code": null,
"e": 166,
"s": 28,
"text": "In order to add Key/value pair to a JSON object, Either we use dot notation or square bracket notation. Both methods are widely accepted."
},
{
"code": null,
"e": ... |
How to Convert a String value to Float value in Java with Examples | 29 Jan, 2020
Given a String “str” in Java, the task is to convert this string to float type.
Examples:
Input: str = "1.0"
Output: 1.0
Input: str = "3.14"
Output: 3.14
Approach 1: (Naive Method)One method is to traverse the string and add the numbers one by one to the float type. This method is not an efficient approa... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n29 Jan, 2020"
},
{
"code": null,
"e": 108,
"s": 28,
"text": "Given a String “str” in Java, the task is to convert this string to float type."
},
{
"code": null,
"e": 118,
"s": 108,
"text": "Examples:"
},
{
"c... |
Maximum possible XOR of every element in an array with another array in C++ | In this problem, we are given two arrays A and B of n elements each. Our task is to create a program to find the maximum possible XOR of every element in an array with another array.
We have to compute the maximum XOR for each element of array A with array B i.e. for each element of array A we will select an element in... | [
{
"code": null,
"e": 1370,
"s": 1187,
"text": "In this problem, we are given two arrays A and B of n elements each. Our task is to create a program to find the maximum possible XOR of every element in an array with another array."
},
{
"code": null,
"e": 1555,
"s": 1370,
"text": ... |
matplotlib.axes.Axes.barh() in Python | 13 Apr, 2020
Matplotlib is a library in Python and it is numerical – mathematical extension for NumPy library. The Axes Class contains most of the figure elements: Axis, Tick, Line2D, Text, Polygon, etc., and sets the coordinate system. And the instances of Axes supports callbacks through a callbacks attribute.
The Axe... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n13 Apr, 2020"
},
{
"code": null,
"e": 328,
"s": 28,
"text": "Matplotlib is a library in Python and it is numerical – mathematical extension for NumPy library. The Axes Class contains most of the figure elements: Axis, Tick, Line2D, Text... |
How to use Xpath with BeautifulSoup ? | 16 Mar, 2021
Prerequisites: Beautifulsoup
In this article, we will see how to use Xpath with BeautifulSoup. Getting data from an element on the webpage using lxml requires the usage of Xpaths. XPath works very much like a traditional file system
First, we need to install all these modules on our computer.
BeautifulSoup... | [
{
"code": null,
"e": 53,
"s": 25,
"text": "\n16 Mar, 2021"
},
{
"code": null,
"e": 82,
"s": 53,
"text": "Prerequisites: Beautifulsoup"
},
{
"code": null,
"e": 286,
"s": 82,
"text": "In this article, we will see how to use Xpath with BeautifulSoup. Getting data... |
Suffix Tree Application 3 – Longest Repeated Substring | 22 Nov, 2021
Given a text string, find Longest Repeated Substring in the text. If there are more than one Longest Repeated Substrings, get any one of them.
Longest Repeated Substring in GEEKSFORGEEKS is: GEEKS
Longest Repeated Substring in AAAAAAAAAA is: AAAAAAAAA
Longest Repeated Substring in ABCDEFG is: No repeated... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n22 Nov, 2021"
},
{
"code": null,
"e": 197,
"s": 52,
"text": "Given a text string, find Longest Repeated Substring in the text. If there are more than one Longest Repeated Substrings, get any one of them. "
},
{
"code": null,
... |
PHP | utf8_decode() Function | 07 Aug, 2021
The utf8_decode() function is an inbuilt function in PHP which is used to decode a UTF-8 string to the ISO-8859-1. This function decodes back to the encoded string which is encoded with the utf8_encode() function.
Syntax:
string utf8_decode( string $string )
Parameter: This function accepts single paramet... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n07 Aug, 2021"
},
{
"code": null,
"e": 242,
"s": 28,
"text": "The utf8_decode() function is an inbuilt function in PHP which is used to decode a UTF-8 string to the ISO-8859-1. This function decodes back to the encoded string which is en... |
Python IMDbPY – Searching a movie | 18 Jan, 2022
IMDbPY is a Python package which is used to retrieve and manage the data of the IMDb.IMDb is an online database of information related to films, television programs, home videos, video games, and streaming content online – including cast, production crew and personal biographies, plot summaries, trivia, fa... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n18 Jan, 2022"
},
{
"code": null,
"e": 664,
"s": 28,
"text": "IMDbPY is a Python package which is used to retrieve and manage the data of the IMDb.IMDb is an online database of information related to films, television programs, home vide... |
ToDo App in C Language | 08 Jun, 2021
ToDo List App is a kind of app that generally used to maintain our day-to-day tasks or list everything that we have to do, with the most important tasks at the top of the list, and the least important tasks at the bottom. It is helpful in planning our daily schedules. We can add more tasks at any time and ... | [
{
"code": null,
"e": 54,
"s": 26,
"text": "\n08 Jun, 2021"
},
{
"code": null,
"e": 395,
"s": 54,
"text": "ToDo List App is a kind of app that generally used to maintain our day-to-day tasks or list everything that we have to do, with the most important tasks at the top of the lis... |
Divide large number represented as string | 13 Jul, 2022
Given a large number (represented as a string) which has to divide by another number (represented as int data type). The large number can be very large which does not even fit in long long in C++. The task is to find the division of these numbers.
Examples:
Input : number = 1260257
divisor = 37
O... | [
{
"code": null,
"e": 54,
"s": 26,
"text": "\n13 Jul, 2022"
},
{
"code": null,
"e": 302,
"s": 54,
"text": "Given a large number (represented as a string) which has to divide by another number (represented as int data type). The large number can be very large which does not even fi... |
Print all even numbers from 1 to n in PL/SQL | 29 Jun, 2018
Prerequisite- PL/SQL Introduction
In PL/SQL code groups of commands are arranged within a block. It groups together related declarations or statements. In declare part, we declare variables and between begin and end part, we perform the operations.
Given a number N, the task is to display all the even numb... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n29 Jun, 2018"
},
{
"code": null,
"e": 62,
"s": 28,
"text": "Prerequisite- PL/SQL Introduction"
},
{
"code": null,
"e": 277,
"s": 62,
"text": "In PL/SQL code groups of commands are arranged within a block. It groups t... |
TCS Placement Paper | MCQ 7 | 21 May, 2019
This is a TCS model placement paper for aptitude preparation. This placement paper will cover aptitude questions that are asked in TCS recruitment drives and also strictly follows the pattern of questions asked in TCS interviews. It is recommended to solve each one of the following questions to increase yo... | [
{
"code": null,
"e": 54,
"s": 26,
"text": "\n21 May, 2019"
},
{
"code": null,
"e": 403,
"s": 54,
"text": "This is a TCS model placement paper for aptitude preparation. This placement paper will cover aptitude questions that are asked in TCS recruitment drives and also strictly fo... |
Foundation - Pagination | Pagination is a type of navigation that divides the content into a series of related pages.
The following example demonstrates the use of pagination in Foundation −
<!doctype html>
<head>
<meta charset = "utf-8" />
<meta http-equiv = "x-ua-compatible" content = "ie = edge" />
<meta name = "viewport... | [
{
"code": null,
"e": 2330,
"s": 2238,
"text": "Pagination is a type of navigation that divides the content into a series of related pages."
},
{
"code": null,
"e": 2403,
"s": 2330,
"text": "The following example demonstrates the use of pagination in Foundation −"
},
{
"co... |
HTML canvas fillStyle Property | The fillStyle() property of the HTML canvas is used to set the color or gradient or pattern for the drawing. The default is #000000. The <canvas> element allows you to draw graphics on a web page using JavaScript. Every canvas has two elements that describes the height and width of the canvas i.e. height and width resp... | [
{
"code": null,
"e": 1392,
"s": 1062,
"text": "The fillStyle() property of the HTML canvas is used to set the color or gradient or pattern for the drawing. The default is #000000. The <canvas> element allows you to draw graphics on a web page using JavaScript. Every canvas has two elements that desc... |
Elasticsearch - Document APIs | Elasticsearch provides single document APIs and multi-document APIs, where the API call is targeting a single document and multiple documents respectively.
It helps to add or update the JSON document in an index when a request is made to that respective index with specific mapping. For example, the following request wi... | [
{
"code": null,
"e": 2737,
"s": 2581,
"text": "Elasticsearch provides single document APIs and multi-document APIs, where the API call is targeting a single document and multiple documents respectively."
},
{
"code": null,
"e": 2968,
"s": 2737,
"text": "It helps to add or update ... |
Slot machine project using R programming - GeeksforGeeks | 16 Mar, 2021
The slot machine is a game, and it comprises two steps: Generating three symbols randomly from 7 symbols and For the generated three symbols, computing score.
The symbols used in the slot machine are:DiamondSeven3Bars2Bars1BarcherryZero
Diamond
Seven
3Bars
2Bars
1Bar
cherry
Zero
We can take any symbol. It ... | [
{
"code": null,
"e": 24875,
"s": 24847,
"text": "\n16 Mar, 2021"
},
{
"code": null,
"e": 25034,
"s": 24875,
"text": "The slot machine is a game, and it comprises two steps: Generating three symbols randomly from 7 symbols and For the generated three symbols, computing score."
}... |
Assignment, Shallow Copy, Or Deep Copy? | by Weilin Li | Towards Data Science | from copy import copy, deepcopy
The goal of this article is to describe what will happen in memory when we
Assign a variable B = A ,
Shallow copy it C = copy(A) , or
Deep copy it D = deepcopy(A).
I first describe a bit about memory management and optimization in Python. After laying the ground, I explain the difference... | [
{
"code": null,
"e": 204,
"s": 172,
"text": "from copy import copy, deepcopy"
},
{
"code": null,
"e": 279,
"s": 204,
"text": "The goal of this article is to describe what will happen in memory when we"
},
{
"code": null,
"e": 305,
"s": 279,
"text": "Assign a v... |
Java Program to display double and single quote in a string | The following are our strings with single and double quote.
String str1 = "This is Jack's mobile";
String str2 = "\"This is it\"!";
Above, for single quote, we have to mention it normally like.
This is Jack's mobile
However, for double quotes, use the following and add a slash in the beginning as well as at the end.
St... | [
{
"code": null,
"e": 1122,
"s": 1062,
"text": "The following are our strings with single and double quote."
},
{
"code": null,
"e": 1194,
"s": 1122,
"text": "String str1 = \"This is Jack's mobile\";\nString str2 = \"\\\"This is it\\\"!\";"
},
{
"code": null,
"e": 1256... |
Java Examples - Solving Tower of Hanoi | How to use method for solving Tower of Hanoi problem?
This example displays the way of using method for solving Tower of Hanoi problem( for 3 disks).
public class MainClass {
public static void main(String[] args) {
int nDisks = 3;
doTowers(nDisks, 'A', 'B', 'C');
}
public static void doTowers(in... | [
{
"code": null,
"e": 2123,
"s": 2068,
"text": "How to use method for solving Tower of Hanoi problem?"
},
{
"code": null,
"e": 2220,
"s": 2123,
"text": "This example displays the way of using method for solving Tower of Hanoi problem( for 3 disks)."
},
{
"code": null,
... |
Batch Script - Bitwise Operators | The following code snippet shows how the various operators can be used.
@echo off
SET /A "Result = 48 & 23"
echo %Result%
SET /A "Result = 16 | 16"
echo %Result%
SET /A "Result = 31 ^ 15"
echo %Result%
The above command produces the following output.
16
16
16
Redirection is a concept of taking the output of a command ... | [
{
"code": null,
"e": 2241,
"s": 2169,
"text": "The following code snippet shows how the various operators can be used."
},
{
"code": null,
"e": 2371,
"s": 2241,
"text": "@echo off\nSET /A \"Result = 48 & 23\"\necho %Result%\nSET /A \"Result = 16 | 16\"\necho %Result%\nSET /A \"Re... |
How to implement interface in anonymous class in C#? | No, anonymous types cannot implement an interface. We need to create your own
type.
Anonymous types provide a convenient way to encapsulate a set of read-only
properties into a single object without having to explicitly define a type first.
The type name is generated by the compiler and is not available at the source c... | [
{
"code": null,
"e": 1146,
"s": 1062,
"text": "No, anonymous types cannot implement an interface. We need to create your own\ntype."
},
{
"code": null,
"e": 1303,
"s": 1146,
"text": "Anonymous types provide a convenient way to encapsulate a set of read-only\nproperties into a sin... |
Convert elements of a Vector to Strings in R Language - toString() Function - GeeksforGeeks | 25 Oct, 2021
toString() function in R Programming Language is used to produce a single character string describing an R object.
Syntax: toString(x, width = NULL)
Parameters:
x: R object
width: Suggestion for the maximum field width. Values of NULL or 0 indicate no maximum. The minimum value accepted is 6 and smaller v... | [
{
"code": null,
"e": 24393,
"s": 24365,
"text": "\n25 Oct, 2021"
},
{
"code": null,
"e": 24508,
"s": 24393,
"text": "toString() function in R Programming Language is used to produce a single character string describing an R object."
},
{
"code": null,
"e": 24542,
... |
Creating a Proxy Webserver in Python | Set 1 - GeeksforGeeks | 15 Nov, 2017
Socket programming in python is very user friendly as compared to c. The programmer need not worry about minute details regarding sockets. In python, the user has more chance of focusing on the application layer rather than the network layer. In this tutorial we would be developing a simple multi-threaded ... | [
{
"code": null,
"e": 24629,
"s": 24601,
"text": "\n15 Nov, 2017"
},
{
"code": null,
"e": 25166,
"s": 24629,
"text": "Socket programming in python is very user friendly as compared to c. The programmer need not worry about minute details regarding sockets. In python, the user has ... |
C++ Program to Implement self Balancing Binary Search Tree | AVL tree is a self-balancing Binary Search Tree where the difference between heights of left and right subtrees cannot be more than one for all nodes.
This is a C++ Program to Implement self Balancing Binary Search Tree.
Begin
class avl_tree to declare following functions:
balance() = Balance the tree by getting balanc... | [
{
"code": null,
"e": 1213,
"s": 1062,
"text": "AVL tree is a self-balancing Binary Search Tree where the difference between heights of left and right subtrees cannot be more than one for all nodes."
},
{
"code": null,
"e": 1283,
"s": 1213,
"text": "This is a C++ Program to Implem... |
VB.Net - Nested Select Case Statement | It is possible to have a select statement as part of the statement sequence of an outer select statement. Even if the case constants of the inner and outer select contain common values, no conflicts will arise.
Module decisions
Sub Main()
'local variable definition
Dim a As Integer = 100
Dim b As I... | [
{
"code": null,
"e": 2511,
"s": 2300,
"text": "It is possible to have a select statement as part of the statement sequence of an outer select statement. Even if the case constants of the inner and outer select contain common values, no conflicts will arise."
},
{
"code": null,
"e": 3046,... |
C++ Program to Find the Number of Vowels, Consonants, Digits and White Spaces in a String | A string is a one dimensional character array that is terminated by a null character. There can be many vowels, consonants, digits and white spaces in a string.
For example.
String: There are 7 colours in the rainbow
Vowels: 12
Consonants: 15
Digits: 1
White spaces: 6
A program to find the number of vowels, consonants,... | [
{
"code": null,
"e": 1223,
"s": 1062,
"text": "A string is a one dimensional character array that is terminated by a null character. There can be many vowels, consonants, digits and white spaces in a string."
},
{
"code": null,
"e": 1236,
"s": 1223,
"text": "For example."
},
... |
Java Program to Implement the RSA Algorithm - GeeksforGeeks | 27 Apr, 2021
RSA or Rivest–Shamir–Adleman is an algorithm employed by modern computers to encrypt and decrypt messages. It is an asymmetric cryptographic algorithm. Asymmetric means that there are two different keys. This is also called public-key cryptography because one among the keys are often given to anyone. The... | [
{
"code": null,
"e": 24125,
"s": 24097,
"text": "\n27 Apr, 2021"
},
{
"code": null,
"e": 24723,
"s": 24127,
"text": "RSA or Rivest–Shamir–Adleman is an algorithm employed by modern computers to encrypt and decrypt messages. It is an asymmetric cryptographic algorithm. Asymmetric ... |
How to serialize a JavaScript array? | The serializeArray( ) method serializes all forms and forms elements like the .serialize() method but returns a JSON data structure for you to work with.
Let’s say the following is the content in PHP file serialize.php −
<?php
if( $_REQUEST["name"] ) {
$name = $_REQUEST['name'];
echo "Welcome ". $name;
... | [
{
"code": null,
"e": 1216,
"s": 1062,
"text": "The serializeArray( ) method serializes all forms and forms elements like the .serialize() method but returns a JSON data structure for you to work with."
},
{
"code": null,
"e": 1283,
"s": 1216,
"text": "Let’s say the following is t... |
Create a Range of Colors between the Specified Colors in R Programming - colorRampPalette() Function - GeeksforGeeks | 30 Jun, 2020
colorRampPalette() function in R Language is used to create a color range between two colors specified as arguments to the function. This function is used to specify the starting and ending color of the range.
Syntax:colorRampPalette(c(“color1”, “color2”))
Parameters:color1, color2: starting and ending col... | [
{
"code": null,
"e": 25242,
"s": 25214,
"text": "\n30 Jun, 2020"
},
{
"code": null,
"e": 25452,
"s": 25242,
"text": "colorRampPalette() function in R Language is used to create a color range between two colors specified as arguments to the function. This function is used to speci... |
5 Different methods to find the length of a string in C++? | A sequence of characters or a linear array of character is known as String. Its declaration is same as define other arrays.
Length of array is the number of characters in the String. There are many in-built method and other methods to find the length of string. Here, we are discussing 5 different methods to find the le... | [
{
"code": null,
"e": 1186,
"s": 1062,
"text": "A sequence of characters or a linear array of character is known as String. Its declaration is same as define other arrays."
},
{
"code": null,
"e": 1407,
"s": 1186,
"text": "Length of array is the number of characters in the String.... |
PDFBox - Extracting Image | In the previous chapter, we have seen how to merge multiple PDF documents. In this chapter, we will understand how to extract an image from a page of a PDF document.
PDFBox library provides you a class named PDFRenderer which renders a PDF document into an AWT BufferedImage.
Following are the steps to generate an image... | [
{
"code": null,
"e": 2193,
"s": 2027,
"text": "In the previous chapter, we have seen how to merge multiple PDF documents. In this chapter, we will understand how to extract an image from a page of a PDF document."
},
{
"code": null,
"e": 2303,
"s": 2193,
"text": "PDFBox library p... |
Dynamic Programming - GeeksforGeeks | 04 May, 2020
l(i,j) = 0, if either i=0 or j=0
= expr1, if i,j > 0 and X[i-1] = Y[j-1]
= expr2, if i,j > 0 and X[i-1] != Y[j-1]
1) The last characters of two strings match.
The length of lcs is length of lcs of X[0..i-1] and Y[0..j-1]
2) The last characters don't match.
The length of lcs is max of ... | [
{
"code": null,
"e": 34492,
"s": 34464,
"text": "\n04 May, 2020"
},
{
"code": null,
"e": 34621,
"s": 34492,
"text": "l(i,j) = 0, if either i=0 or j=0\n = expr1, if i,j > 0 and X[i-1] = Y[j-1]\n = expr2, if i,j > 0 and X[i-1] != Y[j-1] "
},
{
"code": null,
... |
How do I convert (or scale) axis values and redefine the tick frequency in Matplotlib? | To convert or scale the axis values and redefine the tick frequency in matplotlib, we can make a list of xticks and xtick_labels using xticks() method. Place the axis scale and redefine the tick frequency.
Set the figure size and adjust the padding between and around the subplots.
Set the figure size and adjust the pad... | [
{
"code": null,
"e": 1268,
"s": 1062,
"text": "To convert or scale the axis values and redefine the tick frequency in matplotlib, we can make a list of xticks and xtick_labels using xticks() method. Place the axis scale and redefine the tick frequency."
},
{
"code": null,
"e": 1344,
... |
Covariant return types in Java | Covariant return type refers to return type of an overriding method. It allows to narrow down return type of an overridden method without any need to cast the type or check the return type. Covariant return type works only for non-primitive return types.
From Java 5 onwards, we can override a method by changing its ret... | [
{
"code": null,
"e": 1317,
"s": 1062,
"text": "Covariant return type refers to return type of an overriding method. It allows to narrow down return type of an overridden method without any need to cast the type or check the return type. Covariant return type works only for non-primitive return types... |
React Native Modal Component - GeeksforGeeks | 10 May, 2021
The following approach covers how to create Modal in react-native. For this, we are going to use the Modal component. It is a basic way to present content above an enclosing view.
Syntax:
<Modal
animationType=""
transparent={}
visible={}
onRequestClose={}
>
Props in Modal:
animationType: This prop ... | [
{
"code": null,
"e": 24836,
"s": 24808,
"text": "\n10 May, 2021"
},
{
"code": null,
"e": 25016,
"s": 24836,
"text": "The following approach covers how to create Modal in react-native. For this, we are going to use the Modal component. It is a basic way to present content above an... |
Implementing a Trading Algorithm with R | by Adam Gajtkowski | Towards Data Science | This story explains how to implement the moving average trading algorithm with R. If you’re interested in setting up your automated trading pipeline, you should first read this article. This story is a purely technical guide focusing on programming and statistics, not financial advice.
Throughout this story, we will bu... | [
{
"code": null,
"e": 458,
"s": 171,
"text": "This story explains how to implement the moving average trading algorithm with R. If you’re interested in setting up your automated trading pipeline, you should first read this article. This story is a purely technical guide focusing on programming and st... |
What is the scope of variables in JavaScript | The scope of a variable is the region of your program in which it is defined. JavaScript variables have only two scopes.
Global Variables − A global variable has global scope which means it can be defined anywhere in your JavaScript code.
Local Variables − A local variable will be visible only within a function where i... | [
{
"code": null,
"e": 1183,
"s": 1062,
"text": "The scope of a variable is the region of your program in which it is defined. JavaScript variables have only two scopes."
},
{
"code": null,
"e": 1301,
"s": 1183,
"text": "Global Variables − A global variable has global scope which m... |
ALBERT - A Light BERT for Supervised Learning - GeeksforGeeks | 27 Jan, 2022
The BERT was proposed by researchers at Google AI in 2018. BERT has created something like a transformation in NLP similar to that caused by AlexNet in computer vision in 2012. It allows one to leverage large amounts of text data that is available for training the model in a self-supervised way.
ALBERT was... | [
{
"code": null,
"e": 23953,
"s": 23925,
"text": "\n27 Jan, 2022"
},
{
"code": null,
"e": 24250,
"s": 23953,
"text": "The BERT was proposed by researchers at Google AI in 2018. BERT has created something like a transformation in NLP similar to that caused by AlexNet in computer vi... |
Apache Pig - Quick Guide | Apache Pig is an abstraction over MapReduce. It is a tool/platform which is used to analyze larger sets of data representing them as data flows. Pig is generally used with Hadoop; we can perform all the data manipulation operations in Hadoop using Apache Pig.
To write data analysis programs, Pig provides a high-level l... | [
{
"code": null,
"e": 2944,
"s": 2684,
"text": "Apache Pig is an abstraction over MapReduce. It is a tool/platform which is used to analyze larger sets of data representing them as data flows. Pig is generally used with Hadoop; we can perform all the data manipulation operations in Hadoop using Apach... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.