title
stringlengths
3
221
text
stringlengths
17
477k
parsed
listlengths
0
3.17k
Pascal - Pointers
Pointers in Pascal are easy and fun to learn. Some Pascal programming tasks are performed more easily with pointers, and other tasks, such as dynamic memory allocation, cannot be performed without using pointers. So it becomes necessary to learn pointers to become a perfect Pascal programmer. Let's start learning them...
[ { "code": null, "e": 2430, "s": 2083, "text": "Pointers in Pascal are easy and fun to learn. Some Pascal programming tasks are performed more easily with pointers, and other tasks, such as dynamic memory allocation, cannot be performed without using pointers. So it becomes necessary to learn pointer...
PHP - Function preg_grep()
array preg_grep ( string $pattern, array $input [, int $flags] ); Returns the array consisting of the elements of the input array that match the given pattern. If flag is set to PREG_GREP_INVERT, this function returns the elements of the input array that do not match the given pattern. Returns an array indexed using t...
[ { "code": null, "e": 2824, "s": 2757, "text": "array preg_grep ( string $pattern, array $input [, int $flags] );\n" }, { "code": null, "e": 2918, "s": 2824, "text": "Returns the array consisting of the elements of the input array that match the given pattern." }, { "code"...
Python - API.statuses_lookup() in Tweepy - GeeksforGeeks
05 Jun, 2020 Twitter is a popular social network where users share messages called tweets. Twitter allows us to mine the data of any user using Twitter API or Tweepy. The data will be tweets extracted from the user. The first thing to do is get the consumer key, consumer secret, access key and access secret from twitte...
[ { "code": null, "e": 24454, "s": 24426, "text": "\n05 Jun, 2020" }, { "code": null, "e": 24854, "s": 24454, "text": "Twitter is a popular social network where users share messages called tweets. Twitter allows us to mine the data of any user using Twitter API or Tweepy. The data ...
Spark Join Strategies — How & What? | by Jyoti Dhiman | Towards Data Science
While dealing with data, we have all dealt with different kinds of joins, be it inner, outer, left or (maybe)left-semi. This article covers the different join strategies employed by Spark to perform the join operation. Knowing spark join internals comes in handy to optimize tricky join operations, in finding root cause...
[ { "code": null, "e": 624, "s": 172, "text": "While dealing with data, we have all dealt with different kinds of joins, be it inner, outer, left or (maybe)left-semi. This article covers the different join strategies employed by Spark to perform the join operation. Knowing spark join internals comes i...
BeautifulSoup - Find all <li> in <ul> - GeeksforGeeks
15 Mar, 2021 Prerequisites: Beautifulsoup Beautifulsoup is a Python module used for web scraping. In this article, we will discuss how contents of <li> tags can be retrieved from <ul> using Beautifulsoup. bs4: Beautiful Soup(bs4) is a Python library for pulling data out of HTML and XML files. requests: Requests allow...
[ { "code": null, "e": 24886, "s": 24858, "text": "\n15 Mar, 2021" }, { "code": null, "e": 24915, "s": 24886, "text": "Prerequisites: Beautifulsoup" }, { "code": null, "e": 25079, "s": 24915, "text": "Beautifulsoup is a Python module used for web scraping. In th...
How to draw circle in HTML page?
To draw a circle in HTML page, use SVG or canvas. You can also draw it using CSS, with the border-radius property. You can try to run the following code to learn how to draw a circle in HTML Live Demo <!DOCTYPE html> <html> <head> <style> #circle { width: 50px; height: 50px; ...
[ { "code": null, "e": 1177, "s": 1062, "text": "To draw a circle in HTML page, use SVG or canvas. You can also draw it using CSS, with the border-radius property." }, { "code": null, "e": 1253, "s": 1177, "text": "You can try to run the following code to learn how to draw a circle...
Creating COVID-19 Folium map | Towards Data Science
All of the code shown in this article are available in my GitHub repo here. There are many ways to create an interactive map, but my favorite way to creating it is via Folium; a map visualization library based on the Python language. In this article, I want to show how to create a nice interactive map and with current ...
[ { "code": null, "e": 247, "s": 171, "text": "All of the code shown in this article are available in my GitHub repo here." }, { "code": null, "e": 405, "s": 247, "text": "There are many ways to create an interactive map, but my favorite way to creating it is via Folium; a map visu...
queue::push() and queue::pop() in C++ STL
In this article we will be discussing the working, syntax and examples of queue::push() and queue::pop() functions in C++ STL. Queue is a simple sequence or data structure defined in the C++ STL which does insertion and deletion of the data in FIFO(First In First Out) fashion. The data in a queue is stored in continuou...
[ { "code": null, "e": 1189, "s": 1062, "text": "In this article we will be discussing the working, syntax and examples of queue::push() and queue::pop() functions in C++ STL." }, { "code": null, "e": 1603, "s": 1189, "text": "Queue is a simple sequence or data structure defined in...
R - Statistics - GeeksforGeeks
16 Dec, 2021 Statistics is a form of mathematical analysis that concerns the collection, organization, analysis, interpretation, and presentation of data. The statistical analysis helps to make the best usage of the vast data available and improves the efficiency of solutions. R is a programming language and is used fo...
[ { "code": null, "e": 29044, "s": 29016, "text": "\n16 Dec, 2021" }, { "code": null, "e": 29309, "s": 29044, "text": "Statistics is a form of mathematical analysis that concerns the collection, organization, analysis, interpretation, and presentation of data. The statistical analy...
How to add a column in MongoDB collection?
To add a column, you need to update the collection. The syntax is as follows − db.getCollection(yourCollectionName).update({}, {$set: {"yourColumnName": "yourValue"}},false,true); To understand the above syntax, let us create a collection with documents − > db.addColumnDemo.insertOne({"StudentId":101,"StudentName":"Chr...
[ { "code": null, "e": 1141, "s": 1062, "text": "To add a column, you need to update the collection. The syntax is as follows −" }, { "code": null, "e": 1242, "s": 1141, "text": "db.getCollection(yourCollectionName).update({}, {$set: {\"yourColumnName\": \"yourValue\"}},false,true)...
How to code The Transformer in Pytorch | by Samuel Lynn-Evans | Towards Data Science
Could The Transformer be another nail in the coffin for RNNs? Doing away with the clunky for loops, it finds a way to allow whole sentences to simultaneously enter the network in batches. The miracle; NLP now reclaims the advantage of python’s highly efficient linear algebra libraries. This time-saving can then spent d...
[ { "code": null, "e": 234, "s": 172, "text": "Could The Transformer be another nail in the coffin for RNNs?" }, { "code": null, "e": 529, "s": 234, "text": "Doing away with the clunky for loops, it finds a way to allow whole sentences to simultaneously enter the network in batches...
Display tooltip text while hovering a textbox in jQuery
For this, use jQuery(selector).toolTip(). Following is the code: − Live Demo <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>Document</title> </head> <link rel="stylesheet" href="//code.jquery.com/ui/1.12.1/themes/bas...
[ { "code": null, "e": 1104, "s": 1062, "text": "For this, use jQuery(selector).toolTip()." }, { "code": null, "e": 1129, "s": 1104, "text": "Following is the code: −" }, { "code": null, "e": 1140, "s": 1129, "text": " Live Demo" }, { "code": null, "...
Performance Metrics for Classification Machine Learning Problems | by Ramya Vidiyala | Towards Data Science
Many learning algorithms have been proposed. It is often valuable to assess the efficacy of an algorithm. In many cases, such assessment is relative, that is, evaluating which of several alternative algorithms is best suited to a specific application. People even end up creating metrics that suit the application. In th...
[ { "code": null, "e": 424, "s": 172, "text": "Many learning algorithms have been proposed. It is often valuable to assess the efficacy of an algorithm. In many cases, such assessment is relative, that is, evaluating which of several alternative algorithms is best suited to a specific application." ...
Switching among OpenCV, Tensorflow and Pillow? Wait!!! | by Saksham Sinha | Towards Data Science
Modern Computer Vision (CV) is currently a hot field of research which involves largely working with images. For this, one needs to use a framework to open those images to do some processing on them. In today’s rapid development of frameworks, every framework has its own way of handling images, each with its own specif...
[ { "code": null, "e": 372, "s": 172, "text": "Modern Computer Vision (CV) is currently a hot field of research which involves largely working with images. For this, one needs to use a framework to open those images to do some processing on them." }, { "code": null, "e": 914, "s": 372,...
Mirror Tree | Practice | GeeksforGeeks
Given a Binary Tree, convert it into its mirror. Example 1: Input: 1 / \ 2 3 Output: 3 1 2 Explanation: The tree is 1 (mirror) 1 / \ => / \ 2 3 3 2 The inorder of mirror is 3 1 2 Example 2: Input: 10 / \ 20 30 / \ 40 60 Output: 30...
[ { "code": null, "e": 301, "s": 238, "text": "Given a Binary Tree, convert it into its mirror.\n " }, { "code": null, "e": 312, "s": 301, "text": "Example 1:" }, { "code": null, "e": 482, "s": 312, "text": "Input:\n 1\n / \\\n 2 3\nOut...
Introduction to Data Visualization in Python | by Gilbert Tanner | Towards Data Science
Data visualization is the discipline of trying to understand data by placing it in a visual context so that patterns, trends and correlations that might not otherwise be detected can be exposed. Python offers multiple great graphing libraries that come packed with lots of different features. No matter if you want to cr...
[ { "code": null, "e": 242, "s": 47, "text": "Data visualization is the discipline of trying to understand data by placing it in a visual context so that patterns, trends and correlations that might not otherwise be detected can be exposed." }, { "code": null, "e": 458, "s": 242, "...
Python | Scipy integrate.quad() method - GeeksforGeeks
23 Jan, 2020 With the help of scipy.integrate.quad() method, we can get the integration of a given function from limit a to b by using scipy.integrate.quad() method. Syntax : scipy.integrate.quad(func, a, b) Return : Return the integration of a polynomial. Example #1 :In this example we can see that by using scipy.inte...
[ { "code": null, "e": 25581, "s": 25553, "text": "\n23 Jan, 2020" }, { "code": null, "e": 25734, "s": 25581, "text": "With the help of scipy.integrate.quad() method, we can get the integration of a given function from limit a to b by using scipy.integrate.quad() method." }, { ...
AngularJS Interview Questions and Answers - GeeksforGeeks
06 Jan, 2020 What is AngularJS and who created it?AngularJs is a Javascript open-source front-end framework that is mainly used to develop single-page web applications(SPAs). It is a continuously growing and expanding framework which provides better ways for developing web applications. It changes the static HTML to dy...
[ { "code": null, "e": 25237, "s": 25209, "text": "\n06 Jan, 2020" }, { "code": null, "e": 32936, "s": 25237, "text": "What is AngularJS and who created it?AngularJs is a Javascript open-source front-end framework that is mainly used to develop single-page web applications(SPAs). I...
Angular10 Trigger Animation - GeeksforGeeks
02 Jun, 2021 In this article, we are going to see what is trigger in Angular 10 and how to use it. The trigger in Angular10 is used to create an animation trigger containing state and transition of the animation. Syntax: animate(name | definations) NgModule: Module used by trigger is: animations Approach: Create an ...
[ { "code": null, "e": 26354, "s": 26326, "text": "\n02 Jun, 2021" }, { "code": null, "e": 26440, "s": 26354, "text": "In this article, we are going to see what is trigger in Angular 10 and how to use it." }, { "code": null, "e": 26554, "s": 26440, "text": "The ...
Adjusting Learning Rate of a Neural Network in PyTorch - GeeksforGeeks
22 Jan, 2021 Learning Rate is an important hyperparameter in Gradient Descent. Its value determines how fast the Neural Network would converge to minima. Usually, we choose a learning rate and depending on the results change its value to get the optimal value for LR. If the learning rate is too low for the Neural Netwo...
[ { "code": null, "e": 23953, "s": 23925, "text": "\n22 Jan, 2021" }, { "code": null, "e": 24540, "s": 23953, "text": "Learning Rate is an important hyperparameter in Gradient Descent. Its value determines how fast the Neural Network would converge to minima. Usually, we choose a l...
Golang - Environment Variables - GeeksforGeeks
04 Feb, 2021 An Environment Variable is a dynamic object pair on the Operating System. These value pairs can be manipulated with the help of the operating system. These value pairs can be used to store file path, user profile, authentication keys, execution mode, etc. In Golang, we can use the os package to read and wr...
[ { "code": null, "e": 24069, "s": 24041, "text": "\n04 Feb, 2021" }, { "code": null, "e": 24325, "s": 24069, "text": "An Environment Variable is a dynamic object pair on the Operating System. These value pairs can be manipulated with the help of the operating system. These value p...
Deleting Lambda Function
Deleting AWS Lambda function will remove the AWS Lambda from the AWS console. There are 2 ways to delete AWS Lambda function. Using AWS console. Using AWS CLI command This chapter discusses these two ways in detail. For deleting a Lambda function using AWS console, follow the steps given below − Login to AWS console an...
[ { "code": null, "e": 2532, "s": 2406, "text": "Deleting AWS Lambda function will remove the AWS Lambda from the AWS console. There are 2 ways to delete AWS Lambda function." }, { "code": null, "e": 2551, "s": 2532, "text": "Using AWS console." }, { "code": null, "e": ...
Training a Convolutional Neural Network from scratch | by Victor Zhou | Towards Data Science
In this post, we’re going to do a deep-dive on something most introductions to Convolutional Neural Networks (CNNs) lack: how to train a CNN, including deriving gradients, implementing backprop from scratch (using only numpy), and ultimately building a full training pipeline! This post assumes a basic knowledge of CNNs...
[ { "code": null, "e": 448, "s": 171, "text": "In this post, we’re going to do a deep-dive on something most introductions to Convolutional Neural Networks (CNNs) lack: how to train a CNN, including deriving gradients, implementing backprop from scratch (using only numpy), and ultimately building a fu...
The Serious Downsides To The Julia Language In 1.0.3 | by Emmett Boudreau | Towards Data Science
I have talked a lot about how much I love Julia. If I was asked what my favorite programming language right now, “ Julia” would certainly be my reply. On the other hand, something I don’t talk about as much are the things I don’t like about Julia. Although today I would like to address some of these weaknesses and pers...
[ { "code": null, "e": 806, "s": 171, "text": "I have talked a lot about how much I love Julia. If I was asked what my favorite programming language right now, “ Julia” would certainly be my reply. On the other hand, something I don’t talk about as much are the things I don’t like about Julia. Althoug...
Convert text to lowercase with CSS
To convert text to lowercase with CSS, use the text-transform property with value lowercase. You can try to run the following code to convert text to lowercase: <html> <head> </head> <body> <p>Normal Text</p> <p style = "text-transform:lowercase;"> Normal Text! This will be in lowercase! ...
[ { "code": null, "e": 1155, "s": 1062, "text": "To convert text to lowercase with CSS, use the text-transform property with value lowercase." }, { "code": null, "e": 1223, "s": 1155, "text": "You can try to run the following code to convert text to lowercase:" }, { "code":...
Cross Validation Explained: Evaluating estimator performance. | by Rahil Shaikh | Towards Data Science
The ultimate goal of a Machine Learning Engineer or a Data Scientist is to develop a Model in order to get Predictions on New Data or Forecast some events for future on Unseen data. A Good Model is not the one that gives accurate predictions on the known data or training data but the one which gives good predictions on...
[ { "code": null, "e": 547, "s": 172, "text": "The ultimate goal of a Machine Learning Engineer or a Data Scientist is to develop a Model in order to get Predictions on New Data or Forecast some events for future on Unseen data. A Good Model is not the one that gives accurate predictions on the known ...
Tryit Editor v3.7
Tryit: Use a PNG image as the mask layer
[]
Why do we use const qualifier in C++?
We use the const qualifier to declare a variable as constant. That means that we cannot change the value once the variable has been initialized. Using const has a very big benefit. For example, if you have a constant value of the value of PI, you wouldn't like any part of the program to modify that value. So you should...
[ { "code": null, "e": 1408, "s": 1062, "text": "We use the const qualifier to declare a variable as constant. That means that we cannot change the value once the variable has been initialized. Using const has a very big benefit. For example, if you have a constant value of the value of PI, you wouldn...
Interactive Problems in Competitive Programming - GeeksforGeeks
13 Jan, 2022 Interactive Problems are those problems in which our solution or code interacts with the judge in real time. When we develop a solution for an Interactive Problem then the input data given to our solution may not be predetermined but is built for that problem specifically. The solution performs a series of...
[ { "code": null, "e": 24761, "s": 24733, "text": "\n13 Jan, 2022" }, { "code": null, "e": 25196, "s": 24761, "text": "Interactive Problems are those problems in which our solution or code interacts with the judge in real time. When we develop a solution for an Interactive Problem ...
Python Pandas – Count the Observations
To count the observations, first use the groupby() and then use count() on the result. At first, import the required library − dataFrame = pd.DataFrame({'Product Name': ['Keyboard', 'Charger', 'SmartTV', 'Camera', 'Graphic Card', 'Earphone'],'Product Category': ['Computer', 'Mobile Phone', 'Electronics','Electronics', ...
[ { "code": null, "e": 1189, "s": 1062, "text": "To count the observations, first use the groupby() and then use count() on the result. At first, import the required library −" }, { "code": null, "e": 1449, "s": 1189, "text": "dataFrame = pd.DataFrame({'Product Name': ['Keyboard', ...
Create Postman collection from Flask application using flask2postman - GeeksforGeeks
28 Apr, 2022 Prerequisite: Introduction to Postman, First App using Flask Since Postman is gaining popularity in the development domain, this article explains a way in which it can be easily integrated with Flask APIs using command-line utility written in Python. We will be using the flask2postman module. But you will ...
[ { "code": null, "e": 24292, "s": 24264, "text": "\n28 Apr, 2022" }, { "code": null, "e": 24353, "s": 24292, "text": "Prerequisite: Introduction to Postman, First App using Flask" }, { "code": null, "e": 24633, "s": 24353, "text": "Since Postman is gaining popu...
Python | Plotting scatter charts in excel sheet using XlsxWriter module
01 Jul, 2022 Prerequisite: Creat and Write on an excel file. XlsxWriter is a Python library using which one can perform multiple operations on excel files like creating, writing, arithmetic operations and plotting graphs. Let’s see how to plot different type of Scatter charts using realtime data. Charts are composed of...
[ { "code": null, "e": 28, "s": 0, "text": "\n01 Jul, 2022" }, { "code": null, "e": 845, "s": 28, "text": "Prerequisite: Creat and Write on an excel file. XlsxWriter is a Python library using which one can perform multiple operations on excel files like creating, writing, arithmeti...
Logical Functions in Tableau
24 Oct, 2020 In this article, we will learn about logical functions and it’s used in Tableau. For this first look into two terms : Tableau: Tableau is a very powerful data visualization tool that can be used by data analysts, scientists, statisticians, etc. to visualize the data and get a clear opinion based on the dat...
[ { "code": null, "e": 28, "s": 0, "text": "\n24 Oct, 2020" }, { "code": null, "e": 146, "s": 28, "text": "In this article, we will learn about logical functions and it’s used in Tableau. For this first look into two terms :" }, { "code": null, "e": 466, "s": 146, ...
Pair with given sum in a sorted array | Practice | GeeksforGeeks
You are given an array Arr of size N. You need to find all pairs in the array that sum to a number K. If no such pair exists then output will be -1. The elements of the array are distinct and are in sorted order. Note: (a,b) and (b,a) are considered same. Also, an element cannot pair with itself, i.e., (a,a) is invalid...
[ { "code": null, "e": 548, "s": 226, "text": "You are given an array Arr of size N. You need to find all pairs in the array that sum to a number K. If no such pair exists then output will be -1. The elements of the array are distinct and are in sorted order.\nNote: (a,b) and (b,a) are considered same...
Python | Tools in the world of Web Scraping
03 May, 2018 Web page scraping can be done using multiple tools or using different frameworks in Python. There are variety of options available for scraping data from a web page, each suiting different needs. First, let’s understand the difference between web-scraping and web-crawling. Web crawling is used to index the...
[ { "code": null, "e": 54, "s": 26, "text": "\n03 May, 2018" }, { "code": null, "e": 250, "s": 54, "text": "Web page scraping can be done using multiple tools or using different frameworks in Python. There are variety of options available for scraping data from a web page, each sui...
Check if two nodes in a Binary Tree are siblings
18 Aug, 2021 Given a binary tree and two nodes, the task is to check if the nodes are siblings of each other or not. Two nodes are said to be siblings if they are present at the same level, and their parents are same. Examples: Input : 1 / \ 2 3 / \ / \ 4 5 6 7 First node is 4 and Sec...
[ { "code": null, "e": 52, "s": 24, "text": "\n18 Aug, 2021" }, { "code": null, "e": 156, "s": 52, "text": "Given a binary tree and two nodes, the task is to check if the nodes are siblings of each other or not." }, { "code": null, "e": 257, "s": 156, "text": "T...
Log functions in Python
31 Oct, 2021 Python offers many inbuild logarithmic functions under the module “math” which allows us to compute logs using a single line. There are 4 variants of logarithmic functions, all of which are discussed in this article.1. log(a,(Base)) : This function is used to compute the natural logarithm (Base e) of a. If...
[ { "code": null, "e": 53, "s": 25, "text": "\n31 Oct, 2021" }, { "code": null, "e": 486, "s": 53, "text": "Python offers many inbuild logarithmic functions under the module “math” which allows us to compute logs using a single line. There are 4 variants of logarithmic functions, a...
A better way for asynchronous programming: asyncio over multi-threading | by Qian (Aria) Li | Towards Data Science
If you’ve come here, it is probably because you have heard of asyncio module that’s introduced in Python 3.4. You might have been wondering whether you should begin using it. I remember the moment I got stunned by its brilliant performance. Before I learned about asyncio, I was using multi-processing and threading to s...
[ { "code": null, "e": 652, "s": 47, "text": "If you’ve come here, it is probably because you have heard of asyncio module that’s introduced in Python 3.4. You might have been wondering whether you should begin using it. I remember the moment I got stunned by its brilliant performance. Before I learne...
ReactJS - Redux
React redux is an advanced state management library for React. As we learned earlier, React only supports component level state management. In a big and complex application, large number of components are used. React recommends to move the state to the top level component and pass the state to the nested component usin...
[ { "code": null, "e": 2445, "s": 2033, "text": "React redux is an advanced state management library for React. As we learned earlier, React only supports component level state management. In a big and complex application, large number of components are used. React recommends to move the state to the ...
How to implement a program to count the number in Java?
The program uses a JLabel to hold a count label, a JTextField component to hold the number count, JButton component to create add, remove and reset buttons. When we click the add button, the count in the JTextField will get incremented by '1' and by clicking the remove button the count will be decremented by '1'. If we...
[ { "code": null, "e": 1439, "s": 1062, "text": "The program uses a JLabel to hold a count label, a JTextField component to hold the number count, JButton component to create add, remove and reset buttons. When we click the add button, the count in the JTextField will get incremented by '1' and by cli...
Iterate through elements of TreeSet in Java
First, create a TreeSet and add elements − TreeSet<String> set = new TreeSet<String>(); set.add("34"); set.add("12"); set.add("67"); set.add("54"); set.add("76"); set.add("49"); Now, let us iterate through the elements − Iterator<String> i = set.iterator(); while(i.hasNext()){ System.out.println(i.next()); } The fol...
[ { "code": null, "e": 1105, "s": 1062, "text": "First, create a TreeSet and add elements −" }, { "code": null, "e": 1240, "s": 1105, "text": "TreeSet<String> set = new TreeSet<String>();\nset.add(\"34\");\nset.add(\"12\");\nset.add(\"67\");\nset.add(\"54\");\nset.add(\"76\");\nset...
Buy and Hold Trading Strategy. Calculating the performance of the... | by Roman Orac | Towards Data Science
Buy and Hold strategy is when you simply buy an asset with the first incoming data point and see what the portfolio value is available with the last data point. The Buy and Hold strategy is sometimes also used as a baseline for testing the performance of other strategies. If a carefully crafted logic cannot beat a simp...
[ { "code": null, "e": 208, "s": 47, "text": "Buy and Hold strategy is when you simply buy an asset with the first incoming data point and see what the portfolio value is available with the last data point." }, { "code": null, "e": 436, "s": 208, "text": "The Buy and Hold strategy ...
Repeating Annotations in Java 8 | @Repeatable | Onlinetutorialspoint
PROGRAMMINGJava ExamplesC Examples Java Examples C Examples C Tutorials aws JAVAEXCEPTIONSCOLLECTIONSSWINGJDBC EXCEPTIONS COLLECTIONS SWING JDBC JAVA 8 SPRING SPRING BOOT HIBERNATE PYTHON PHP JQUERY PROGRAMMINGJava ExamplesC Examples Java Examples C Examples C Tutorials aws Repeating Annotations in Java 8 are introduce...
[ { "code": null, "e": 158, "s": 123, "text": "PROGRAMMINGJava ExamplesC Examples" }, { "code": null, "e": 172, "s": 158, "text": "Java Examples" }, { "code": null, "e": 183, "s": 172, "text": "C Examples" }, { "code": null, "e": 195, "s": 183, ...
How to create Python dictionary with duplicate keys?
Python dictionary doesn't allow key to be repeated. However, we can use defaultdict to find a workaround. This class is defined in collections module. Use list as default factory for defaultdict object >>> from collections import defaultdict >>> d=defaultdict(list) Here is a list of tuples each with two items. First it...
[ { "code": null, "e": 1213, "s": 1062, "text": "Python dictionary doesn't allow key to be repeated. However, we can use defaultdict to find a workaround. This class is defined in collections module." }, { "code": null, "e": 1264, "s": 1213, "text": "Use list as default factory for...
Lodash _.toArray() Method - GeeksforGeeks
03 Sep, 2020 Lodash is a JavaScript library that works on the top of underscore.js. Lodash helps in working with arrays, strings, objects, numbers, etc. The _.toArray() method is used to convert the given value to an array. Syntax: _.toArray( value ) Parameters: This method accepts a single parameter as mentioned abov...
[ { "code": null, "e": 24412, "s": 24384, "text": "\n03 Sep, 2020" }, { "code": null, "e": 24552, "s": 24412, "text": "Lodash is a JavaScript library that works on the top of underscore.js. Lodash helps in working with arrays, strings, objects, numbers, etc." }, { "code": n...
C - if...else statement
An if statement can be followed by an optional else statement, which executes when the Boolean expression is false. The syntax of an if...else statement in C programming language is − if(boolean_expression) { /* statement(s) will execute if the boolean expression is true */ } else { /* statement(s) will execute i...
[ { "code": null, "e": 2200, "s": 2084, "text": "An if statement can be followed by an optional else statement, which executes when the Boolean expression is false." }, { "code": null, "e": 2268, "s": 2200, "text": "The syntax of an if...else statement in C programming language is ...
Exercise v1.3
Create a variable called carName, assign the value "Volvo" to it, and display it. Hint: Use the var keyword to create a variable. <!DOCTYPE html> <html> <body> ​ <p id="demo">Display the result here.</p> ​ <script> // Create the variable here </script> ​ </body> </html> ​ xxxxxxxxxx <!DOCTYPE html> <html> <body> ​ <p ...
[ { "code": null, "e": 82, "s": 0, "text": "Create a variable called carName, assign the value \"Volvo\" to it, and display it." }, { "code": null, "e": 130, "s": 82, "text": "Hint: Use the var keyword to create a variable." }, { "code": null, "e": 146, "s": 130, ...
PostgreSQL - Logical Operators
Consider the table COMPANY having records as follows − testdb# select * from COMPANY; id | name | age | address | salary ----+-------+-----+-----------+-------- 1 | Paul | 32 | California| 20000 2 | Allen | 25 | Texas | 15000 3 | Teddy | 23 | Norway | 20000 4 | Mark | 25 | Rich-Mond | 65000...
[ { "code": null, "e": 2880, "s": 2825, "text": "Consider the table COMPANY having records as follows −" }, { "code": null, "e": 3273, "s": 2880, "text": "testdb# select * from COMPANY;\n id | name | age | address | salary\n----+-------+-----+-----------+--------\n 1 | Paul | ...
Optional property in a C# class
A property is optional if it is possible and valid for it to have null. A property whose CLR type cannot have null cannot be configured optional. An example optional attribute usage − [AttributeUsage(AttributeTargets.Property, Inherited = false, AllowMultiple = false)] internal sealed class OptionalAttribute : Attribut...
[ { "code": null, "e": 1208, "s": 1062, "text": "A property is optional if it is possible and valid for it to have null. A property whose CLR type cannot have null cannot be configured optional." }, { "code": null, "e": 1246, "s": 1208, "text": "An example optional attribute usage ...
How to check multiple columns for a single value in MySQL?
You can check multiple columns for one value with the help of IN operator. The syntax is as follows − select *from yourTableName where value IN(yourColumnName1, yourColumnName2,......N); To understand the above concept, let us create a table with some columns. The query to create a table is as follows − mysql> create t...
[ { "code": null, "e": 1164, "s": 1062, "text": "You can check multiple columns for one value with the help of IN operator. The syntax is as follows −" }, { "code": null, "e": 1249, "s": 1164, "text": "select *from yourTableName where value IN(yourColumnName1, yourColumnName2,........
How do you create a Tkinter GUI stop button to break an infinite loop?
Tkinter is a Python library which is used to create GUI-based application. Let us suppose that we have to create a functional application in which a particular function is defined in a loop. The recursive function will display some text in a Label widget for infinite times. To stop this recursive function, we can defin...
[ { "code": null, "e": 1337, "s": 1062, "text": "Tkinter is a Python library which is used to create GUI-based application. Let us suppose that we have to create a functional application in which a particular function is defined in a loop. The recursive function will display some text in a Label widge...
Python | os.DirEntry.is_dir() method
28 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.scandir() method of os module yields os.DirEntry objects corresponding to the entries...
[ { "code": null, "e": 28, "s": 0, "text": "\n28 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...
Long Division Method to find Square root with Examples
26 Nov, 2021 Given an integer X which is a perfect square, the task is to find the square root of it by using the long division method. Examples: Input: N = 484 Output: 22 222 = 484 Input: N = 144 Output: 12 122 = 144 Approach: Long division is a very common method to find the square root of a number. The following ...
[ { "code": null, "e": 28, "s": 0, "text": "\n26 Nov, 2021" }, { "code": null, "e": 151, "s": 28, "text": "Given an integer X which is a perfect square, the task is to find the square root of it by using the long division method." }, { "code": null, "e": 163, "s": 1...
Program to print characters present at prime indexes in a given string
01 May, 2021 Given a string, our task is to print the characters present at prime index. Examples : Input : I love programming Output : lv gan Explanation : prime index characters in a string are : lv gan Input : Happy coding everyone Output : apycn ro Chapters descriptions off, selected captions sett...
[ { "code": null, "e": 28, "s": 0, "text": "\n01 May, 2021" }, { "code": null, "e": 104, "s": 28, "text": "Given a string, our task is to print the characters present at prime index." }, { "code": null, "e": 116, "s": 104, "text": "Examples : " }, { "cod...
Matplotlib.axes.Axes.set_position() in Python
19 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": "\n19 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...
Introduction to Webpack Module Bundler
14 Dec, 2020 Webpack: Webpack is a static module bundler used for JavaScript applications. Since webpack understands only JavaScript and JSON files, It transforms front-end assets such as HTML, CSS, and images into valid modules if the corresponding loaders are included. While Processing your application webpack intern...
[ { "code": null, "e": 28, "s": 0, "text": "\n14 Dec, 2020" }, { "code": null, "e": 449, "s": 28, "text": "Webpack: Webpack is a static module bundler used for JavaScript applications. Since webpack understands only JavaScript and JSON files, It transforms front-end assets such as ...
Difference Between Single and Double Quotes in Shell Script and Linux
17 Nov, 2020 Single quotes and double quotes are both functional in Linux while working with shell scripts or executing commands directly in the terminal but there is a difference between the way the bash shell interprets them. Single quotes: Enclosing characters in single quotation marks (‘) holds onto the literal va...
[ { "code": null, "e": 28, "s": 0, "text": "\n17 Nov, 2020" }, { "code": null, "e": 244, "s": 28, "text": "Single quotes and double quotes are both functional in Linux while working with shell scripts or executing commands directly in the terminal but there is a difference between ...
Flutter – Stack Widget
21 Feb, 2022 Stack widget is a built-in widget in flutter SDK which allows us to make a layer of widgets by putting them on top of each other. Many of the times a simple row and column layout is not enough, we need a way to overlay one widget on top of the other, for example, we might want to show some text over an ima...
[ { "code": null, "e": 52, "s": 24, "text": "\n21 Feb, 2022" }, { "code": null, "e": 1013, "s": 52, "text": "Stack widget is a built-in widget in flutter SDK which allows us to make a layer of widgets by putting them on top of each other. Many of the times a simple row and column l...
Quadratic equation whose roots are reciprocal to the roots of given equation
22 Apr, 2021 Given three integers A, B, and C representing the coefficients of a quadratic equation Ax2 + Bx + C = 0, the task is to find the quadratic equation whose roots are reciprocal to the roots of the given equation. Examples: Input: A = 1, B = -5, C = 6 Output: (6)x^2 +(-5)x + (1) = 0Explanation: The given quad...
[ { "code": null, "e": 53, "s": 25, "text": "\n22 Apr, 2021" }, { "code": null, "e": 264, "s": 53, "text": "Given three integers A, B, and C representing the coefficients of a quadratic equation Ax2 + Bx + C = 0, the task is to find the quadratic equation whose roots are reciprocal...
Python | Pandas dataframe.count()
20 Nov, 2018 Python is a great language for doing data analysis, primarily because of the fantastic ecosystem of data-centric python packages. Pandas is one of those packages and makes importing and analyzing data much easier. Pandas dataframe.count() is used to count the no. of non-NA/null observations across the give...
[ { "code": null, "e": 52, "s": 24, "text": "\n20 Nov, 2018" }, { "code": null, "e": 266, "s": 52, "text": "Python is a great language for doing data analysis, primarily because of the fantastic ecosystem of data-centric python packages. Pandas is one of those packages and makes im...
Upload and Retrieve Images on MongoDB using Dart in Flutter
16 Oct, 2020 To upload files from a local system to the dedicated server is called file uploading and retrieval files from the dedicated server to a local system is called file retrieving. It works exactly the same as the definition when we select a file from the Android device and click the submit button, the Android...
[ { "code": null, "e": 54, "s": 26, "text": "\n16 Oct, 2020" }, { "code": null, "e": 787, "s": 54, "text": "To upload files from a local system to the dedicated server is called file uploading and retrieval files from the dedicated server to a local system is called file retrieving...
java.net.URLConnection Class in Java
26 Aug, 2021 URLConnection Class in Java is an abstract class that represents a connection of a resource as specified by the corresponding URL. It is imported by the java.net package. The URLConnection class is utilized for serving two different yet related purposes, Firstly it provides control on interaction with a se...
[ { "code": null, "e": 28, "s": 0, "text": "\n26 Aug, 2021" }, { "code": null, "e": 596, "s": 28, "text": "URLConnection Class in Java is an abstract class that represents a connection of a resource as specified by the corresponding URL. It is imported by the java.net package. The ...
Python | Decimal conjugate() method
05 Sep, 2019 Decimal#conjugate() : conjugate() is a Decimal class method which returns the self, this method is only to comply with the Decimal Specification Syntax: Decimal.conjugate() Parameter: Decimal values Return: the self Decimal value Code #1 : Example for conjugate() method # Python Program explaining #...
[ { "code": null, "e": 28, "s": 0, "text": "\n05 Sep, 2019" }, { "code": null, "e": 173, "s": 28, "text": "Decimal#conjugate() : conjugate() is a Decimal class method which returns the self, this method is only to comply with the Decimal Specification" }, { "code": null, ...
ML | Spectral Clustering
19 Jul, 2019 Prerequisites: K-Means Clustering Spectral Clustering is a growing clustering algorithm which has performed better than many traditional clustering algorithms in many cases. It treats each data point as a graph-node and thus transforms the clustering problem into a graph-partitioning problem. A typical imp...
[ { "code": null, "e": 52, "s": 24, "text": "\n19 Jul, 2019" }, { "code": null, "e": 86, "s": 52, "text": "Prerequisites: K-Means Clustering" }, { "code": null, "e": 409, "s": 86, "text": "Spectral Clustering is a growing clustering algorithm which has performed...
PyQt5 – Change size of Push Button
22 Apr, 2020 In this article we will see how to change the size of push button. There are basically two ways in order to change the size of button i.e using resize method and setGeometry method.The main difference between them is resize method will only resize the push button. on the other hand setGeometry method will ...
[ { "code": null, "e": 28, "s": 0, "text": "\n22 Apr, 2020" }, { "code": null, "e": 397, "s": 28, "text": "In this article we will see how to change the size of push button. There are basically two ways in order to change the size of button i.e using resize method and setGeometry m...
Deque in Python
09 May, 2022 Deque (Doubly Ended Queue) in Python is implemented using the module “collections“. Deque is preferred over a list in the cases where we need quicker append and pop operations from both the ends of the container, as deque provides an O(1) time complexity for append and pop operations as compared to list wh...
[ { "code": null, "e": 52, "s": 24, "text": "\n09 May, 2022" }, { "code": null, "e": 394, "s": 52, "text": "Deque (Doubly Ended Queue) in Python is implemented using the module “collections“. Deque is preferred over a list in the cases where we need quicker append and pop operation...
std::advance in C++
26 Apr, 2022 std::advance advances the iterator ‘it’ by n element positions. Syntax : template void advance (InputIterator& it, Distance n); it : Iterator to be advanced n : Number of element positions to advance. This shall only be negative for random-access and bidirectional iterators. Return type : None. Moti...
[ { "code": null, "e": 52, "s": 24, "text": "\n26 Apr, 2022" }, { "code": null, "e": 125, "s": 52, "text": "std::advance advances the iterator ‘it’ by n element positions. Syntax :" }, { "code": null, "e": 355, "s": 125, "text": "template \n void advance (Inp...
req.cookies and req.signedCookies in Express.js
26 Nov, 2021 req.cookies: Request.Cookies are supposed to be cookies that come from client (browser) and Response.Cookies are cookies that will send back to client (browser). Cookies are small files/data that are sent to the client with a server request and stored on the client side. This helps us to keep track of the ...
[ { "code": null, "e": 54, "s": 26, "text": "\n26 Nov, 2021" }, { "code": null, "e": 377, "s": 54, "text": "req.cookies: Request.Cookies are supposed to be cookies that come from client (browser) and Response.Cookies are cookies that will send back to client (browser). Cookies are ...
Socket Programming in Python
10 Nov, 2021 Socket programming is a way of connecting two nodes on a network to communicate with each other. One socket(node) listens on a particular port at an IP, while the other socket reaches out to the other to form a connection. The server forms the listener socket while the client reaches out to the server. The...
[ { "code": null, "e": 54, "s": 26, "text": "\n10 Nov, 2021" }, { "code": null, "e": 548, "s": 54, "text": "Socket programming is a way of connecting two nodes on a network to communicate with each other. One socket(node) listens on a particular port at an IP, while the other socke...
Addition in Nested Tuples in Python
When it is required to perform addition in nested tuples, the 'zip' method and the generator expression can be used. Generator is a simple way of creating iterators. It automatically implements a class with '__iter__()' and '__next__()' methods and keeps track of the internal states, as well as raises 'StopIteration' e...
[ { "code": null, "e": 1179, "s": 1062, "text": "When it is required to perform addition in nested tuples, the 'zip' method and the generator expression can be used." }, { "code": null, "e": 1442, "s": 1179, "text": "Generator is a simple way of creating iterators. It automatically...
How to Create a Docker Image with Jupyter Notebook and Kotlin | by Miguel Doctor Yuste | Towards Data Science
Computational Notebooks or simply Notebooks are a flexible and interactive tool that allows scientists to combine software code, computational output and explanatory resources (like text, charts and any other media content) within the same document. Notebooks are used for a wide variety of purposes, including data clea...
[ { "code": null, "e": 613, "s": 172, "text": "Computational Notebooks or simply Notebooks are a flexible and interactive tool that allows scientists to combine software code, computational output and explanatory resources (like text, charts and any other media content) within the same document. Noteb...
Count characters with same neighbors - GeeksforGeeks
28 Jun, 2021 Given a string, the task is to find the number of characters with the same adjacent characters. Note: First and last character will always be counted as they will have only one adjacent character.Examples: Input: str = “egeeksk” Output: 4 Characters with same adjacent characters are e, g, s, kInput: str =...
[ { "code": null, "e": 24902, "s": 24874, "text": "\n28 Jun, 2021" }, { "code": null, "e": 25109, "s": 24902, "text": "Given a string, the task is to find the number of characters with the same adjacent characters. Note: First and last character will always be counted as they will ...
Dart Programming - List.single Method
Checks if the list has only one element and returns it. List.single void main() { var lst = new List(); lst.add(12); print("The list has only one element: ${lst.single}"); } It will produce the following output − The list values in reverse order: (13, 12) It will produce the following output − The lis...
[ { "code": null, "e": 2581, "s": 2525, "text": "Checks if the list has only one element and returns it." }, { "code": null, "e": 2595, "s": 2581, "text": "List.single \n" }, { "code": null, "e": 2715, "s": 2595, "text": "void main() { \n var lst = new List();...
Dictionary Methods in Python | Set 1 (cmp(), len(), items()...) - GeeksforGeeks
28 Jun, 2021 Python Dictionary Basics have been discussed in the article below Dictionary Some dictionary methods are discussed in this article. 1. str(dic) :- This method is used to return the string, denoting all the dictionary keys with their values. 2. items() :- This method is used to return the list with all dict...
[ { "code": null, "e": 24396, "s": 24368, "text": "\n28 Jun, 2021" }, { "code": null, "e": 24462, "s": 24396, "text": "Python Dictionary Basics have been discussed in the article below" }, { "code": null, "e": 24473, "s": 24462, "text": "Dictionary" }, { ...
How to exit a Kivy application using a button ? - GeeksforGeeks
15 Mar, 2021 Kivy is a graphical user interface open-source Python library that allows you to develop multi-platform applications on Windows, macOS, Android, iOS, Linux, and Raspberry-Pi. In addition to the regular mouse and keyboard inputs, it also supports multitouch events. The applications made using Kivy will simi...
[ { "code": null, "e": 24316, "s": 24288, "text": "\n15 Mar, 2021" }, { "code": null, "e": 24748, "s": 24316, "text": "Kivy is a graphical user interface open-source Python library that allows you to develop multi-platform applications on Windows, macOS, Android, iOS, Linux, and Ra...
Difference between Selection and Projection in DBMS - GeeksforGeeks
12 Jun, 2020 Prerequisite – Relational Algebra1. Selection :This operation chooses the subset of tuples from the relation that satisfies the given condition mentioned in the syntax of selection. Notation – σc (R) Here, ‘c’ is selection condition and ‘σ (sigma)’ is used to denote Select Operator. 2. Projection :This ope...
[ { "code": null, "e": 24304, "s": 24276, "text": "\n12 Jun, 2020" }, { "code": null, "e": 24486, "s": 24304, "text": "Prerequisite – Relational Algebra1. Selection :This operation chooses the subset of tuples from the relation that satisfies the given condition mentioned in the sy...
Raspberry Pi: Dummy Tutorial on hosting a Jupyter Notebook that you can access anywhere | by JimSpark | Towards Data Science
This series is mainly about setting up your Raspberry Pi with a Jupyter Notebook server that you can access anywhere with open internet. And we are at the final chapter. In the previous sessions, we have covered how to set up port forwarding or a cloud proxy server in order for you to connect to Raspberry Pi via SSH se...
[ { "code": null, "e": 216, "s": 46, "text": "This series is mainly about setting up your Raspberry Pi with a Jupyter Notebook server that you can access anywhere with open internet. And we are at the final chapter." }, { "code": null, "e": 847, "s": 216, "text": "In the previous s...
Seaborn - Histogram
Histograms represent the data distribution by forming bins along the range of the data and then drawing bars to show the number of observations that fall in each bin. Seaborn comes with some datasets and we have used few datasets in our previous chapters. We have learnt how to load the dataset and how to lookup the lis...
[ { "code": null, "e": 2206, "s": 2039, "text": "Histograms represent the data distribution by forming bins along the range of the data and then drawing bars to show the number of observations that fall in each bin." }, { "code": null, "e": 2384, "s": 2206, "text": "Seaborn comes w...
Pascal - Bit Operators
The Bitwise operators supported by Pascal are listed in the following table. Assume variable A holds 60 and variable B holds 13, then − Please note that different implementations of Pascal differ in bitwise operators. Free Pascal, the compiler we used here, however, supports the following bitwise operators − The follow...
[ { "code": null, "e": 2219, "s": 2083, "text": "The Bitwise operators supported by Pascal are listed in the following table. Assume variable A holds 60 and variable B holds 13, then −" }, { "code": null, "e": 2393, "s": 2219, "text": "Please note that different implementations of ...
power query functions, power query functions list,power query functions table, power bi functions, power query functions custom, functions apply | Towards Data Science
Cleaning, wrangling and summarizing. I don’t know about you but I enjoy this process of data analysis. Power Query is the main tool I use for this. I’ll be writing more about Power Query in the future. I clean because the data is dirty. I clean because I want good data for analysis. I wrangle to get the right “shape” f...
[ { "code": null, "e": 374, "s": 172, "text": "Cleaning, wrangling and summarizing. I don’t know about you but I enjoy this process of data analysis. Power Query is the main tool I use for this. I’ll be writing more about Power Query in the future." }, { "code": null, "e": 661, "s": 37...
PyQt5 - QDock Widget
A dockable window is a subwindow that can remain in floating state or can be attached to the main window at a specified position. Main window object of QMainWindow class has an area reserved for dockable windows. This area is around the central widget. A dock window can be moved inside the main window, or they can be u...
[ { "code": null, "e": 2216, "s": 1963, "text": "A dockable window is a subwindow that can remain in floating state or can be attached to the main window at a specified position. Main window object of QMainWindow class has an area reserved for dockable windows. This area is around the central widget."...
How to remove onClickListener for a view in android?
In some situations, We should not allow onClickListener for a view. This example demonstrates how to remove onClickListener for a view 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/layou...
[ { "code": null, "e": 1209, "s": 1062, "text": "In some situations, We should not allow onClickListener for a view. This example demonstrates how to remove onClickListener for a view in android." }, { "code": null, "e": 1338, "s": 1209, "text": "Step 1 − Create a new project in An...
Avoid duplicate entries in MongoDB?
To avoid duplicate entries in MongoDB, you can use createIndex(). The syntax is as follows − db.yourCollectionName.createIndex({"yourFieldName":1},{unique:true}); Let us implement the above syntax. The query to avoid duplicate entries in MongoDB is a follows − > db.avoidDuplicateEntriesDemo.createIndex({"UserName":1},{...
[ { "code": null, "e": 1155, "s": 1062, "text": "To avoid duplicate entries in MongoDB, you can use createIndex(). The syntax is as follows −" }, { "code": null, "e": 1225, "s": 1155, "text": "db.yourCollectionName.createIndex({\"yourFieldName\":1},{unique:true});" }, { "co...
Visualizing Tiff File Using Matplotlib and GDAL using Python - GeeksforGeeks
12 Nov, 2020 Tiff file formats are used for storing raster images. A library called GDAL- Geospatial Data Abstraction Library is specially used for the purpose of reading such raster files along with other file formats like vector formats. The gdal module belongs to Open Source Geospatial Foundation To install this mod...
[ { "code": null, "e": 25537, "s": 25509, "text": "\n12 Nov, 2020" }, { "code": null, "e": 25825, "s": 25537, "text": "Tiff file formats are used for storing raster images. A library called GDAL- Geospatial Data Abstraction Library is specially used for the purpose of reading such ...
ByteArrayOutputStream toByteArray() method in Java with Examples - GeeksforGeeks
28 May, 2020 The toByteArray() method of ByteArrayOutputStream class in Java is used to create a newly allocated byte array. The size of the newly allocated byte array is equal to the current size of this output stream. This method copies valid contents of the buffer into it. Syntax: public byte[] toByteArray() Parame...
[ { "code": null, "e": 25225, "s": 25197, "text": "\n28 May, 2020" }, { "code": null, "e": 25489, "s": 25225, "text": "The toByteArray() method of ByteArrayOutputStream class in Java is used to create a newly allocated byte array. The size of the newly allocated byte array is equal...
How to Request Permissions in Android Application? - GeeksforGeeks
30 Apr, 2021 Starting from Android 6.0 (API 23), users are not asked for permissions at the time of installation rather developers need to request the permissions at the run time. Only the permissions that are defined in the manifest file can be requested at run time. 1. Install-Time Permissions: If the Android 5.1.1 (...
[ { "code": null, "e": 25876, "s": 25848, "text": "\n30 Apr, 2021" }, { "code": null, "e": 26132, "s": 25876, "text": "Starting from Android 6.0 (API 23), users are not asked for permissions at the time of installation rather developers need to request the permissions at the run ti...
Java Program to find the sum of a Series 1/1! + 2/2! + 3/3! + 4/4! +.......+ n/n! - GeeksforGeeks
02 Nov, 2021 You have been given a series 1/1! + 2/2! + 3/3! + 4/4! +.......+ n/n!, find out the sum of the series till nth term.Examples: Input :n = 5 Output : 2.70833 Input :n = 7 Output : 2.71806 Java // Java program to print the sum of series import java.io.*;import java.lang.*; class GFG { public static ...
[ { "code": null, "e": 26813, "s": 26785, "text": "\n02 Nov, 2021" }, { "code": null, "e": 26941, "s": 26813, "text": "You have been given a series 1/1! + 2/2! + 3/3! + 4/4! +.......+ n/n!, find out the sum of the series till nth term.Examples: " }, { "code": null, "e"...
AngularJS | ng-app Directive - GeeksforGeeks
28 Mar, 2019 The ng-app Directive in AngularJS is used to define the root element of an AngularJS application. This directive automatically initializes the AngularJS application on page load. It can be used to load various modules in AngularJS Application. Syntax: <element ng-app=""> Contents... </element> Example 1: T...
[ { "code": null, "e": 29516, "s": 29488, "text": "\n28 Mar, 2019" }, { "code": null, "e": 29760, "s": 29516, "text": "The ng-app Directive in AngularJS is used to define the root element of an AngularJS application. This directive automatically initializes the AngularJS applicatio...
How to find the sum of elements of a Vector using STL in C++? - GeeksforGeeks
08 Jul, 2021 Given a vector, find the sum of the elements of this vector using STL in C++.Example: Input: vec = {1, 45, 54, 71, 76, 12} Output: 259 Input: vec = {1, 7, 5, 4, 6, 12} Output: 35 Approach: Sum can be found with the help of accumulate() function provided in STL.Syntax: accumulate(first_index, last_in...
[ { "code": null, "e": 25760, "s": 25732, "text": "\n08 Jul, 2021" }, { "code": null, "e": 25848, "s": 25760, "text": "Given a vector, find the sum of the elements of this vector using STL in C++.Example: " }, { "code": null, "e": 25942, "s": 25848, "text": "In...
Matplotlib.figure.Figure.set_constrained_layout_pads() in Python - GeeksforGeeks
03 May, 2020 Matplotlib is a library in Python and it is numerical – mathematical extension for NumPy library. The figure module provides the top-level Artist, the Figure, which contains all the plot elements. This module is used to control the default spacing of the subplots and top level container for all plot elemen...
[ { "code": null, "e": 25537, "s": 25509, "text": "\n03 May, 2020" }, { "code": null, "e": 25848, "s": 25537, "text": "Matplotlib is a library in Python and it is numerical – mathematical extension for NumPy library. The figure module provides the top-level Artist, the Figure, whic...
Count the number of Documents in MongoDB using Python - GeeksforGeeks
08 Jun, 2020 Mongodb is a document-oriented NoSQL database which is non-relational DB. Mongodb is a schema-free database which is based on Binary JSON format. It is organized with a group of documents (rows in RDBMS) called collection (table in RDBMS). The collections in mongodb are schema-less. PyMongo is one of the M...
[ { "code": null, "e": 25563, "s": 25535, "text": "\n08 Jun, 2020" }, { "code": null, "e": 25847, "s": 25563, "text": "Mongodb is a document-oriented NoSQL database which is non-relational DB. Mongodb is a schema-free database which is based on Binary JSON format. It is organized w...
Iterative Merge Sort for Linked List - GeeksforGeeks
31 Oct, 2021 Given a singly linked list of integers, the task is to sort it using iterative merge sort. Merge Sort is often preferred for sorting a linked list. It is discussed here. However, the method discussed above uses Stack for storing recursion calls. This may consume a lot of memory if the linked list to be ...
[ { "code": null, "e": 25941, "s": 25913, "text": "\n31 Oct, 2021" }, { "code": null, "e": 26033, "s": 25941, "text": "Given a singly linked list of integers, the task is to sort it using iterative merge sort. " }, { "code": null, "e": 26900, "s": 26035, "text":...
ISNULL() Function in SQL Server - GeeksforGeeks
21 Jan, 2021 ISNULL() : This function in SQL Server is used to return the value given, in case the stated expression is NULL. Moreover, in case the given expression is not NULL then it returns the stated expression. Features : This function is used to find the given value, in case the expression given is NULL. This fun...
[ { "code": null, "e": 25513, "s": 25485, "text": "\n21 Jan, 2021" }, { "code": null, "e": 25524, "s": 25513, "text": "ISNULL() :" }, { "code": null, "e": 25716, "s": 25524, "text": "This function in SQL Server is used to return the value given, in case the stat...
Remove BST keys outside the given range - GeeksforGeeks
25 May, 2021 Given a Binary Search Tree (BST) and a range [min, max], remove all keys which are outside the given range. The modified tree should also be BST. For example, consider the following BST and range [-10, 13]. The given tree should be changed to the following. Note that all keys outside the range [-10, 13] ...
[ { "code": null, "e": 26265, "s": 26237, "text": "\n25 May, 2021" }, { "code": null, "e": 26474, "s": 26265, "text": "Given a Binary Search Tree (BST) and a range [min, max], remove all keys which are outside the given range. The modified tree should also be BST. For example, cons...
Minimum number of operations required to reduce N to 0 - GeeksforGeeks
05 Apr, 2021 Given an integer N, the task is to count the minimum steps required to reduce the value of N to 0 by performing the following two operations: Consider integers A and B where N = A * B (A != 1 and B != 1), reduce N to min(A, B) Decrease the value of N by 1 Examples : Input: N = 3Output: 3Explanation:Steps i...
[ { "code": null, "e": 26521, "s": 26493, "text": "\n05 Apr, 2021" }, { "code": null, "e": 26663, "s": 26521, "text": "Given an integer N, the task is to count the minimum steps required to reduce the value of N to 0 by performing the following two operations:" }, { "code":...
Queries in a Matrix - GeeksforGeeks
28 Jan, 2022 Given a matrix M of size m x n ( 1 <= m,n <= 1000 ). It is initially filled with integers from 1 to m x n sequentially in a row major order. The task is to process a list of queries manipulating M such that every query is one of the following three. R(x, y): swaps the x-th and y-th rows of M where x and ...
[ { "code": null, "e": 26591, "s": 26563, "text": "\n28 Jan, 2022" }, { "code": null, "e": 26843, "s": 26591, "text": "Given a matrix M of size m x n ( 1 <= m,n <= 1000 ). It is initially filled with integers from 1 to m x n sequentially in a row major order. The task is to process...
Displaying horizontal bar graphs using Matplotlib
In this program, we will plot a bar graph using the matplotlib library. The most important Step in solving matplotlib related problems using the matplotlib library is importing the matplotlib library. The syntax is: import matplotlib.pyplot as plt Pyplot is a collection of command style functions that make Matplotlib w...
[ { "code": null, "e": 1278, "s": 1062, "text": "In this program, we will plot a bar graph using the matplotlib library. The most important Step in solving matplotlib related problems using the matplotlib library is importing the matplotlib library. The syntax is:" }, { "code": null, "e": ...
Automatic Type Promotion in Overloading in Java - GeeksforGeeks
11 Jan, 2022 Before going into the actual topic, first, we need to know about method overloading and type promotions. When a class consists of more than one method with the same name but with different signatures and return types, then we call those overloaded methods, and the process is called method overloading. Exam...
[ { "code": null, "e": 25225, "s": 25197, "text": "\n11 Jan, 2022" }, { "code": null, "e": 25330, "s": 25225, "text": "Before going into the actual topic, first, we need to know about method overloading and type promotions." }, { "code": null, "e": 25528, "s": 25330...
How to Make USB Rubber Ducky at Home? - GeeksforGeeks
08 Jul, 2020 USB Rubber ducky is an HID device that looks similar to a USB Pen drive. It may be used to inject keystroke into a system, used to hack a system, steal victims essential and credential data can inject payload to the victim’s computers. The main important thing about USB Rubber ducky is that it cannot be de...
[ { "code": null, "e": 26009, "s": 25981, "text": "\n08 Jul, 2020" }, { "code": null, "e": 26383, "s": 26009, "text": "USB Rubber ducky is an HID device that looks similar to a USB Pen drive. It may be used to inject keystroke into a system, used to hack a system, steal victims ess...
DFA for exactly one of a and at least one of b - GeeksforGeeks
02 Dec, 2021 Deterministic Finite Automata (DFA) is defined as an abstract mathematical concept which is used to solve various specific problems in different software and hardware.In this type of problems we have some given parameters according to which we should design DFA. In this article,two instructions are given:...
[ { "code": null, "e": 25652, "s": 25624, "text": "\n02 Dec, 2021" }, { "code": null, "e": 25916, "s": 25652, "text": "Deterministic Finite Automata (DFA) is defined as an abstract mathematical concept which is used to solve various specific problems in different software and hardw...