title stringlengths 3 221 | text stringlengths 17 477k | parsed listlengths 0 3.17k |
|---|---|---|
Embedding Tomcat Server in Maven Project | 15 Nov, 2018
Today, developing an application using different servers depending on the environment which is to be used is really a tricky job. Applications may work fine in one server and may end up not working properly on the other server which is a problematic one. What if the developer had a privilege to use or conf... | [
{
"code": null,
"e": 54,
"s": 26,
"text": "\n15 Nov, 2018"
},
{
"code": null,
"e": 518,
"s": 54,
"text": "Today, developing an application using different servers depending on the environment which is to be used is really a tricky job. Applications may work fine in one server and... |
XML - Validation | Validation is a process by which an XML document is validated. An XML document is said to be valid if its contents match with the elements, attributes and associated document type declaration(DTD), and if the document complies with the constraints expressed in it. Validation is dealt in two ways by the XML parser. They... | [
{
"code": null,
"e": 2422,
"s": 2095,
"text": "Validation is a process by which an XML document is validated. An XML document is said to be valid if its contents match with the elements, attributes and associated document type declaration(DTD), and if the document complies with the constraints expre... |
Python Exception Handling | 22 Oct, 2021
We have explored basic python till now from Set 1 to 4 (Set 1 | Set 2 | Set 3 | Set 4).
In this article, we will discuss how to handle exceptions in Python using try. catch, and finally statement with the help of proper examples.
Error in Python can be of two types i.e. Syntax errors and Exceptions. Erro... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n22 Oct, 2021"
},
{
"code": null,
"e": 141,
"s": 52,
"text": "We have explored basic python till now from Set 1 to 4 (Set 1 | Set 2 | Set 3 | Set 4). "
},
{
"code": null,
"e": 284,
"s": 141,
"text": "In this article,... |
How to build a simple Calculator app using Android Studio? | 12 May, 2022
Pre-requisites:
Android App Development Fundamentals for Beginners
Guide to Install and Set up Android Studio
Android | Starting with first app/android project
Android | Running your first Android app
Create a simple calculator which can perform basic arithmetic operations like addition, subtraction, mul... | [
{
"code": null,
"e": 54,
"s": 26,
"text": "\n12 May, 2022"
},
{
"code": null,
"e": 72,
"s": 54,
"text": "Pre-requisites: "
},
{
"code": null,
"e": 123,
"s": 72,
"text": "Android App Development Fundamentals for Beginners"
},
{
"code": null,
"e": 1... |
Python – Dictionary Values Mean | 01 Aug, 2020
Given a dictionary, find mean of all the values present.
Input : test_dict = {“Gfg” : 4, “is” : 4, “Best” : 4, “for” : 4, “Geeks” : 4}Output : 4.0Explanation : (4 + 4 + 4 + 4 + 4) / 4 = 4.0, hence mean.
Input : test_dict = {“Gfg” : 5, “is” : 10, “Best” : 15}Output : 10.0Explanation : Mean of these is 10.0
... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n01 Aug, 2020"
},
{
"code": null,
"e": 85,
"s": 28,
"text": "Given a dictionary, find mean of all the values present."
},
{
"code": null,
"e": 231,
"s": 85,
"text": "Input : test_dict = {“Gfg” : 4, “is” : 4, “Best” : ... |
Random Numbers in Python | 25 Jan, 2022
Python defines a set of functions that are used to generate or manipulate random numbers through the random module. Functions in the random module rely on a pseudo-random number generator function random(), which generates a random float number between 0.0 and 1.0. These particular type of functions is use... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n25 Jan, 2022"
},
{
"code": null,
"e": 448,
"s": 52,
"text": "Python defines a set of functions that are used to generate or manipulate random numbers through the random module. Functions in the random module rely on a pseudo-random num... |
Cost and efforts of software maintenance - GeeksforGeeks | 17 Nov, 2021
Software Maintenance is a very broad activity that takes place once the operation is done. It optimizes the software performance by reducing errors, eliminating useless lines of codes and applying advanced development. It can take up to 1-2 years to build a software system while its maintenance and modific... | [
{
"code": null,
"e": 24582,
"s": 24554,
"text": "\n17 Nov, 2021"
},
{
"code": null,
"e": 24940,
"s": 24582,
"text": "Software Maintenance is a very broad activity that takes place once the operation is done. It optimizes the software performance by reducing errors, eliminating us... |
Robot following a walkway using image segmentation | by Constantin Toporov | Towards Data Science | In my previous story, I was teaching a Raspberry-powered robot-tank to navigate on a walkway on his own. The bottleneck was a road recognition — I used a simple approach with color filtering via OpenCV and the results were not reliable.
Generally speaking, this a task of image segmentation. There is a good article desc... | [
{
"code": null,
"e": 408,
"s": 171,
"text": "In my previous story, I was teaching a Raspberry-powered robot-tank to navigate on a walkway on his own. The bottleneck was a road recognition — I used a simple approach with color filtering via OpenCV and the results were not reliable."
},
{
"cod... |
Anonymous function in Go Language - GeeksforGeeks | 22 May, 2020
Go language provides a special feature known as an anonymous function. An anonymous function is a function which doesn’t contain any name. It is useful when you want to create an inline function. In Go language, an anonymous function can form a closure. An anonymous function is also known as function liter... | [
{
"code": null,
"e": 24931,
"s": 24903,
"text": "\n22 May, 2020"
},
{
"code": null,
"e": 25242,
"s": 24931,
"text": "Go language provides a special feature known as an anonymous function. An anonymous function is a function which doesn’t contain any name. It is useful when you wa... |
LIVE Sentiment Analysis on Twitter Data using Tweepy, Keras, and Django | by Rohit Agrawal | Towards Data Science | Welcome to this tutorial on performing live sentiment analysis on tweets. I am sure you have come across complex dashboards with tons of graphs and numbers being crunched which look straight out of a sci-fi movie and stared in awe. Well, that is our aim here.
Although our final result would not be as extensive as this,... | [
{
"code": null,
"e": 432,
"s": 172,
"text": "Welcome to this tutorial on performing live sentiment analysis on tweets. I am sure you have come across complex dashboards with tons of graphs and numbers being crunched which look straight out of a sci-fi movie and stared in awe. Well, that is our aim h... |
Sum of primes | Practice | GeeksforGeeks | Your task is to calculate sum of primes present as digits of given number N.
Example 1:
Input: 333
Output: 9
Explaination: 3 is a prime number. It
is present 3 times. So 3+3+3 = 9.
Example 2:
Input: 686
Output: 0
Explaination: Neither 6 nor 8 is a
prime number.
Your Task:
You do not need to read input or print anyth... | [
{
"code": null,
"e": 304,
"s": 226,
"text": "Your task is to calculate sum of primes present as digits of given number N."
},
{
"code": null,
"e": 315,
"s": 304,
"text": "Example 1:"
},
{
"code": null,
"e": 409,
"s": 315,
"text": "Input: 333\nOutput: 9\nExpla... |
Importance of Distance Metrics in Machine Learning Modelling | by Natasha Sharma | Towards Data Science | A number of Machine Learning Algorithms - Supervised or Unsupervised, use Distance Metrics to know the input data pattern in order to make any Data Based decision. A good distance metric helps in improving the performance of Classification, Clustering and Information Retrieval process significantly. In this article, we... | [
{
"code": null,
"e": 591,
"s": 172,
"text": "A number of Machine Learning Algorithms - Supervised or Unsupervised, use Distance Metrics to know the input data pattern in order to make any Data Based decision. A good distance metric helps in improving the performance of Classification, Clustering and... |
DFA that recognizes number of 0 is multiple of 3 on input {0,1} - GeeksforGeeks | 10 Dec, 2020
Finite Automata is known as a finite state machine that are acceptable otherwise not acceptable. on the input alphabet ‘0’ and 1′.
Determine the initial state.
The transition occurs on every input alphabet.
Determine whether the self-loop should apply or not.
Mark’s final state.
Designing DFA step by step ... | [
{
"code": null,
"e": 24886,
"s": 24858,
"text": "\n10 Dec, 2020"
},
{
"code": null,
"e": 25017,
"s": 24886,
"text": "Finite Automata is known as a finite state machine that are acceptable otherwise not acceptable. on the input alphabet ‘0’ and 1′."
},
{
"code": null,
... |
How to Add Apple's new San Francisco font on a Webpage using CSS ? - GeeksforGeeks | 29 Jan, 2020
The newly created Apple’s San Francisco font is comfortable for human eyes as per research. Normally Apple’s font can not be used on any webpage through CSS. These kind of fonts are in-build in Apple’s product but the new San Francisco font can be used in any web content. Mr. Craig Hockenberry introduces t... | [
{
"code": null,
"e": 24666,
"s": 24638,
"text": "\n29 Jan, 2020"
},
{
"code": null,
"e": 25048,
"s": 24666,
"text": "The newly created Apple’s San Francisco font is comfortable for human eyes as per research. Normally Apple’s font can not be used on any webpage through CSS. These... |
Insert data into inner array in MongoDB? | You can use $addToSet operator for this. Let us first create a collection with documents −
> db.insertDataIntoArrayDemo.insertOne(
{
"UserDetails":[
{
"UserId" :"user121",
"userGroupMessage":[]
},
{
"UserId" :"user221",
"userGroupMessag... | [
{
"code": null,
"e": 1153,
"s": 1062,
"text": "You can use $addToSet operator for this. Let us first create a collection with documents −"
},
{
"code": null,
"e": 1521,
"s": 1153,
"text": "> db.insertDataIntoArrayDemo.insertOne(\n {\n \"UserDetails\":[\n {\n ... |
Way to read input from console in C# | Use the ReadLine() method to read input from the console in C#. This method receives the input as string, therefore you need to convert it.
For example −
Let us see how to get user input from user and convert it to integer.
Firstly, read user input −
string val;
Console.Write("Enter integer: ");
val = Console.ReadLine(... | [
{
"code": null,
"e": 1202,
"s": 1062,
"text": "Use the ReadLine() method to read input from the console in C#. This method receives the input as string, therefore you need to convert it."
},
{
"code": null,
"e": 1216,
"s": 1202,
"text": "For example −"
},
{
"code": null,
... |
C Program for Program for array rotation - GeeksforGeeks | 01 Jun, 2021
Write a function rotate(ar[], d, n) that rotates arr[] of size n by d elements.
Rotation of the above array by 2 will make array
METHOD 1 (Using temp array)
Input arr[] = [1, 2, 3, 4, 5, 6, 7], d = 2, n =7
1) Store d elements in a temp array
temp[] = [1, 2]
2) Shift rest of the arr[]
arr[] = [3... | [
{
"code": null,
"e": 24157,
"s": 24129,
"text": "\n01 Jun, 2021"
},
{
"code": null,
"e": 24238,
"s": 24157,
"text": "Write a function rotate(ar[], d, n) that rotates arr[] of size n by d elements. "
},
{
"code": null,
"e": 24290,
"s": 24240,
"text": "Rotation ... |
How to Validate Password from Text Input in Android? - GeeksforGeeks | 11 Jun, 2021
Whenever we type the password in most social sites or any web and android application, We get an alert to add a minimum of one lowercase alphabet, minimum one uppercase alphabet, minimum one numerical digit and length of password must be greater than or equal to 8. So In this article, we are going to imple... | [
{
"code": null,
"e": 26381,
"s": 26353,
"text": "\n11 Jun, 2021"
},
{
"code": null,
"e": 26703,
"s": 26381,
"text": "Whenever we type the password in most social sites or any web and android application, We get an alert to add a minimum of one lowercase alphabet, minimum one uppe... |
Bulma | Notification - GeeksforGeeks | 27 Sep, 2021
Bulma is a free, open-source CSS framework based on Flexbox. It is component rich, compatible, and well documented. It is highly responsive in nature. It uses classes to implement its design. The notification is a simple colored block that draws the attention of the user about something. It can be used as ... | [
{
"code": null,
"e": 27353,
"s": 27325,
"text": "\n27 Sep, 2021"
},
{
"code": null,
"e": 27756,
"s": 27353,
"text": "Bulma is a free, open-source CSS framework based on Flexbox. It is component rich, compatible, and well documented. It is highly responsive in nature. It uses clas... |
Lexicographic rank of a string among all its substrings - GeeksforGeeks | 14 Sep, 2021
Given string str, the task is to find the rank of the given string among all its substrings arranged lexicographically.
Examples:
Input: S = “enren”Output: 7Explanation:All the possible substrings in the sorted order are {“e”, “e”, “en”, “en”, “enr”, “enre”, “enren”, “n”, “n”, “nr”, “nre”, “nren”, “r”, “re... | [
{
"code": null,
"e": 26403,
"s": 26375,
"text": "\n14 Sep, 2021"
},
{
"code": null,
"e": 26523,
"s": 26403,
"text": "Given string str, the task is to find the rank of the given string among all its substrings arranged lexicographically."
},
{
"code": null,
"e": 26533,... |
Difference between PUT and DELETE request in Vanilla JavaScript - GeeksforGeeks | 02 Sep, 2021
PUT and DELETE are the two different types of HTTP request methods. HTTP protocol supports many methods to transfer data from the server or do any operation on the server. The HTTP protocol supports the following methods, e.g. GET, POST, PUT, DELETE, PATCH, COPY, HEAD, OPTIONS, etc. Before we dive into the... | [
{
"code": null,
"e": 25971,
"s": 25943,
"text": "\n02 Sep, 2021"
},
{
"code": null,
"e": 26366,
"s": 25971,
"text": "PUT and DELETE are the two different types of HTTP request methods. HTTP protocol supports many methods to transfer data from the server or do any operation on the... |
How to use $scope.$apply() in AngularJS ? - GeeksforGeeks | 25 Jul, 2021
In this article, we will be discussing the $apply() function & how to use it in angularjs. In AngularJS, $apply() function is used to evaluate expressions outside of the AngularJS context (browser DOM Events, XHR). Moreover, $apply has $digest under its hood, which is ultimately called whenever $apply() is... | [
{
"code": null,
"e": 26354,
"s": 26326,
"text": "\n25 Jul, 2021"
},
{
"code": null,
"e": 26754,
"s": 26354,
"text": "In this article, we will be discussing the $apply() function & how to use it in angularjs. In AngularJS, $apply() function is used to evaluate expressions outside ... |
is_empty template in C++ - GeeksforGeeks | 19 Nov, 2018
The std::is_empty template of C++ STL is used to check whether the given type is empty or not. This method returns a boolean value showing whether the given type is empty or not.
Syntax:
template < class T > struct is_empty;
Parameters: This template contains single parameter T (Trait class) that identifi... | [
{
"code": null,
"e": 25343,
"s": 25315,
"text": "\n19 Nov, 2018"
},
{
"code": null,
"e": 25522,
"s": 25343,
"text": "The std::is_empty template of C++ STL is used to check whether the given type is empty or not. This method returns a boolean value showing whether the given type i... |
Scala Varargs - GeeksforGeeks | 28 May, 2019
Most of the programming languages provide us variable length argument mobility to a function, Scala is not a exception. it allows us to indicate that the last argument of the function is a variable length argument. it may be repeated multiple times. It allows us to indicate that last argument of a function... | [
{
"code": null,
"e": 26063,
"s": 26035,
"text": "\n28 May, 2019"
},
{
"code": null,
"e": 26803,
"s": 26063,
"text": "Most of the programming languages provide us variable length argument mobility to a function, Scala is not a exception. it allows us to indicate that the last argu... |
PyQt5 – How to change color of the label ? - GeeksforGeeks | 26 Mar, 2020
While creating a Label in PyQt5, we can see that there is no background color. In this article we will see how to add background color to the Label.
In order to add border to the Label we will use label.setStyleSheet() method, this will add the background color to the label, it is same like designing the C... | [
{
"code": null,
"e": 26071,
"s": 26043,
"text": "\n26 Mar, 2020"
},
{
"code": null,
"e": 26220,
"s": 26071,
"text": "While creating a Label in PyQt5, we can see that there is no background color. In this article we will see how to add background color to the Label."
},
{
... |
Designing a Markdown note taking application in ReactJS - GeeksforGeeks | 21 Sep, 2021
In this article, we will learn how to design a Markdown note-taking application in React that can help one to quickly jot down notes and download the rendered output. The use of Markdown allows one to spend less time on formatting the text and therefore create rich text content using only the Markdown synt... | [
{
"code": null,
"e": 26137,
"s": 26109,
"text": "\n21 Sep, 2021"
},
{
"code": null,
"e": 26448,
"s": 26137,
"text": "In this article, we will learn how to design a Markdown note-taking application in React that can help one to quickly jot down notes and download the rendered outp... |
tty command in Linux with examples | 19 Feb, 2021
Linux operating system represents everything in a file system, the hardware devices that we attach are also represented as a file. The terminal is also represented as a file. There a command exists called tty which displays information related to terminal. The tty command of terminal basically prints the f... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n19 Feb, 2021"
},
{
"code": null,
"e": 615,
"s": 52,
"text": "Linux operating system represents everything in a file system, the hardware devices that we attach are also represented as a file. The terminal is also represented as a file.... |
Sorting an array by date in JavaScript | Suppose, we have an array of objects like this −
const arr = [{id: 1, date: 'Mar 12 2012 10:00:00 AM'}, {id: 2, date: 'Mar 8 2012 08:00:00 AM'}];
We are required to write a JavaScript function that takes in one such array and sorts the array according to the date property of each object.
(Either newest first or oldest ... | [
{
"code": null,
"e": 1111,
"s": 1062,
"text": "Suppose, we have an array of objects like this −"
},
{
"code": null,
"e": 1208,
"s": 1111,
"text": "const arr = [{id: 1, date: 'Mar 12 2012 10:00:00 AM'}, {id: 2, date: 'Mar 8 2012 08:00:00 AM'}];"
},
{
"code": null,
"e":... |
CSS - widows | The widows property is used in paged media to control line breaks by specifying the minimum number of lines in a paragraph that should be left at the top of the page.
integer − Any length unit. Negative length values are not permitted for this property.
integer − Any length unit. Negative length values are not permitte... | [
{
"code": null,
"e": 2793,
"s": 2626,
"text": "The widows property is used in paged media to control line breaks by specifying the minimum number of lines in a paragraph that should be left at the top of the page."
},
{
"code": null,
"e": 2880,
"s": 2793,
"text": "integer − Any l... |
Count of carry operations on adding two Binary numbers - GeeksforGeeks | 07 May, 2021
Given two decimal numbers num1 and num2, the task is to count the number of times carry operation is required while adding the two given numbers in binary form.
Examples:
Input: num1 = 15, num2 = 10Output: 3Explanation:Give numbers are added as:15 -> 1 1 1 110 -> 1 0 1 0carry -> 1 ... | [
{
"code": null,
"e": 25476,
"s": 25448,
"text": "\n07 May, 2021"
},
{
"code": null,
"e": 25637,
"s": 25476,
"text": "Given two decimal numbers num1 and num2, the task is to count the number of times carry operation is required while adding the two given numbers in binary form."
... |
Create a block element with Bootstrap 4 | To create a block element, use the .d-block Bootstrap 4 class.
Use the d-block class −
<span class="d-block bg-info">
A block
</span>
To set blocks for difference screen sizes, use the .d-*-block −
<span class="d-md-block bg-info">
A block for medium screen size
</span>
Let us see an example to learn how to create ... | [
{
"code": null,
"e": 1125,
"s": 1062,
"text": "To create a block element, use the .d-block Bootstrap 4 class."
},
{
"code": null,
"e": 1149,
"s": 1125,
"text": "Use the d-block class −"
},
{
"code": null,
"e": 1198,
"s": 1149,
"text": "<span class=\"d-block bg... |
How can we add a JSONArray to JSONObject in Java? | The JSON is a text-based format for exchanging data. It is a lightweight component and language independent. We can also add a JSONArray to JSONObject. We need to add a few items to an ArrayList first and pass this list to the put() method of JSONArray class and finally add this array to JSONObject using the put() meth... | [
{
"code": null,
"e": 1387,
"s": 1062,
"text": "The JSON is a text-based format for exchanging data. It is a lightweight component and language independent. We can also add a JSONArray to JSONObject. We need to add a few items to an ArrayList first and pass this list to the put() method of JSONArray ... |
ConstraintLayout in Android - GeeksforGeeks | 15 Feb, 2022
ConstraintLayout is similar to that of other View Groups which we have seen in Android such as RelativeLayout, LinearLayout, and many more. In this article, we will take a look at using ConstraintLayout in Android.
Attributes
Description
ConstraintLayout provides you the ability to completely design your ... | [
{
"code": null,
"e": 24194,
"s": 24166,
"text": "\n15 Feb, 2022"
},
{
"code": null,
"e": 24410,
"s": 24194,
"text": "ConstraintLayout is similar to that of other View Groups which we have seen in Android such as RelativeLayout, LinearLayout, and many more. In this article, we wil... |
What is the purpose of a function prototype? - GeeksforGeeks | 07 Oct, 2021
The Function prototype serves the following purposes – 1) It tells the return type of the data that the function will return. 2) It tells the number of arguments passed to the function. 3) It tells the data types of each of the passed arguments. 4) Also it tells the order in which the arguments are passed ... | [
{
"code": null,
"e": 24422,
"s": 24394,
"text": "\n07 Oct, 2021"
},
{
"code": null,
"e": 25119,
"s": 24422,
"text": "The Function prototype serves the following purposes – 1) It tells the return type of the data that the function will return. 2) It tells the number of arguments p... |
How to Find a Best Match with Python | by Khuyen Tran | Towards Data Science | Congratulations! You are a new team leader of 8 talented employees. You want to split them into 4 pairs to work on 4 different projects. As an experienced leader, you know employees are the most productive when working with somebody they like. So you come up with a rating system for paring employees. The scales run fro... | [
{
"code": null,
"e": 712,
"s": 171,
"text": "Congratulations! You are a new team leader of 8 talented employees. You want to split them into 4 pairs to work on 4 different projects. As an experienced leader, you know employees are the most productive when working with somebody they like. So you come... |
Java Concurrency - Fork-Join framework | The fork-join framework allows to break a certain task on several workers and then wait for the result to combine them. It leverages multi-processor machine's capacity to great extent. Following are the core concepts and objects used in fork-join framework.
Fork is a process in which a task splits itself into smaller ... | [
{
"code": null,
"e": 2916,
"s": 2657,
"text": "The fork-join framework allows to break a certain task on several workers and then wait for the result to combine them. It leverages multi-processor machine's capacity to great extent. Following are the core concepts and objects used in fork-join frame... |
Largest prime factor | Practice | GeeksforGeeks | Given a number N, the task is to find the largest prime factor of that number.
Example 1:
Input:
N = 5
Output:
5
Explanation:
5 has 1 prime factor
i.e 5 only.
Example 2:
Input:
N = 24
Output:
3
Explanation:
24 has 2 prime factors
3 and 2 in which 3 is
greater
Your Task:
You don't need to read input or print any... | [
{
"code": null,
"e": 319,
"s": 238,
"text": "Given a number N, the task is to find the largest prime factor of that number.\n "
},
{
"code": null,
"e": 330,
"s": 319,
"text": "Example 1:"
},
{
"code": null,
"e": 401,
"s": 330,
"text": "Input:\nN = 5\nOutput:\n... |
Powershell - Create HTML File | New-Item cmdlet is used to create a html file and Set-Content cmdlet to put content into it.
In this example, we're creating a new html file named test.html
Type the following command in PowerShell ISE Console
New-Item D:\temp\test\test.html -ItemType File
You can see the test.html created in D:\temp\test directory.
In... | [
{
"code": null,
"e": 2127,
"s": 2034,
"text": "New-Item cmdlet is used to create a html file and Set-Content cmdlet to put content into it."
},
{
"code": null,
"e": 2191,
"s": 2127,
"text": "In this example, we're creating a new html file named test.html"
},
{
"code": nul... |
Scikit Learn - Gaussian Naà ̄ve Bayes | As the name suggest, Gaussian Naïve Bayes classifier assumes that the data from each label is drawn from a simple Gaussian distribution. The Scikit-learn provides sklearn.naive_bayes.GaussianNB to implement the Gaussian Naïve Bayes algorithm for classification.
Following table consist the parameters used by sklearn.n... | [
{
"code": null,
"e": 2485,
"s": 2221,
"text": "As the name suggest, Gaussian Naïve Bayes classifier assumes that the data from each label is drawn from a simple Gaussian distribution. The Scikit-learn provides sklearn.naive_bayes.GaussianNB to implement the Gaussian Naïve Bayes algorithm for class... |
HTML Emojis - GeeksforGeeks | 27 Nov, 2020
Emojis are letters (characters) from the UTF-8 (Unicode) character set. The <meta charset=”UTF-8′′> element in HTML defines the character set. Many UTF-8 characters cannot be typed on a keyboard, but they can always be displayed using numbers (called entity numbers). To let the browser understand that you ... | [
{
"code": null,
"e": 31783,
"s": 31755,
"text": "\n27 Nov, 2020"
},
{
"code": null,
"e": 32191,
"s": 31783,
"text": "Emojis are letters (characters) from the UTF-8 (Unicode) character set. The <meta charset=”UTF-8′′> element in HTML defines the character set. Many UTF-8 character... |
How to convert Python date to Unix timestamp? | You can use the datetime module to convert a datetime to a UTC timestamp in Python. If you already have the datetime object in UTC, you can the timestamp() to get a UTC timestamp. This function returns the time since epoch for that datetime object. If you have the datetime object in local timezone, first replace the ti... | [
{
"code": null,
"e": 1545,
"s": 1187,
"text": "You can use the datetime module to convert a datetime to a UTC timestamp in Python. If you already have the datetime object in UTC, you can the timestamp() to get a UTC timestamp. This function returns the time since epoch for that datetime object. If y... |
Python Raise Keyword | 28 Nov, 2021
Python raise Keyword is used to raise exceptions or errors. The raise keyword raises an error and stops the control flow of the program. It is used to bring up the current exception in an exception handler so that it can be handled further up the call stack.
Syntax of the raise keyword :
raise {name_of_ t... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n28 Nov, 2021"
},
{
"code": null,
"e": 311,
"s": 52,
"text": "Python raise Keyword is used to raise exceptions or errors. The raise keyword raises an error and stops the control flow of the program. It is used to bring up the current ex... |
Latent Semantic Analysis | 30 May, 2021
Latent Semantic Analysis is a natural language processing method that uses the statistical approach to identify the association among the words in a document. LSA deals with the following kind of issue:
Example: mobile, phone, cell phone, telephone are all similar but if we pose a query like “The cell ph... | [
{
"code": null,
"e": 54,
"s": 26,
"text": "\n30 May, 2021"
},
{
"code": null,
"e": 259,
"s": 54,
"text": "Latent Semantic Analysis is a natural language processing method that uses the statistical approach to identify the association among the words in a document. LSA deals with ... |
Sum of all Subarrays | Set 1 | 28 Apr, 2021
Given an integer array ‘arr[]’ of size n, find sum of all sub-arrays of given array.
Examples :
Input : arr[] = {1, 2, 3}
Output : 20
Explanation : {1} + {2} + {3} + {2 + 3} +
{1 + 2} + {1 + 2 + 3} = 20
Input : arr[] = {1, 2, 3, 4}
Output : 50
Method 1 (Simple Solution) A simple solut... | [
{
"code": null,
"e": 54,
"s": 26,
"text": "\n28 Apr, 2021"
},
{
"code": null,
"e": 140,
"s": 54,
"text": "Given an integer array ‘arr[]’ of size n, find sum of all sub-arrays of given array. "
},
{
"code": null,
"e": 152,
"s": 140,
"text": "Examples : "
},
... |
Python Tokens and Character Sets | 07 Feb, 2022
Python is a general-purpose, high-level programming language. It was designed with an emphasis on code readability, and its syntax allows programmers to express their concepts in fewer lines of code, and these codes are known as scripts. These scripts contain character sets, tokens, and identifiers. In thi... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n07 Feb, 2022"
},
{
"code": null,
"e": 437,
"s": 52,
"text": "Python is a general-purpose, high-level programming language. It was designed with an emphasis on code readability, and its syntax allows programmers to express their concept... |
Comparable interface in Kotlin | 14 Jul, 2019
Since Kotlin provides the programmer, to define new types in terms of classes, there must be a way to compare the instances of these classes. As in Java, the Comparable interface provides a compareTo() function to compare two objects. Kotlin provides this through the Comparable interface. However, it also ... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n14 Jul, 2019"
},
{
"code": null,
"e": 554,
"s": 28,
"text": "Since Kotlin provides the programmer, to define new types in terms of classes, there must be a way to compare the instances of these classes. As in Java, the Comparable interf... |
isupper() function in C Language | 27 Sep, 2021
isupper() function in C programming checks whether the given character is upper case or not. isupper() function is defined in ctype.h header file.
Syntax :
int isupper ( int x );
Examples:
Input: A
Output: Entered character is uppercase character
Input: a
Output: Entered character is not uppercase ch... | [
{
"code": null,
"e": 53,
"s": 25,
"text": "\n27 Sep, 2021"
},
{
"code": null,
"e": 202,
"s": 53,
"text": "isupper() function in C programming checks whether the given character is upper case or not. isupper() function is defined in ctype.h header file. "
},
{
"code": nul... |
Program to print Square inside a Square | 22 Jun, 2022
Given a number N, print a hollow square of side with N asterisks(‘*’), and inside it print a hollow square of side N-4 asterisks(‘*’).Examples :
Input : 6
Output :
******
* *
* ** *
* ** *
* *
******
Input :9
Output :
*********
* *
* ***** *
* * * *
* * * *
* * * *
* ***** *
* *
... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n22 Jun, 2022"
},
{
"code": null,
"e": 199,
"s": 52,
"text": "Given a number N, print a hollow square of side with N asterisks(‘*’), and inside it print a hollow square of side N-4 asterisks(‘*’).Examples : "
},
{
"code": null,... |
Underscore.js | _.omit() Function | 27 Apr, 2020
The _.omit() function is used to return a copy of the object that filtered to omit the blacklisted keys.
Syntax:
_.omit(object, *keys)
Parameters: This function accept two parameters as mentioned above and described below:
object: This parameter holds the value of an object.
keys: It is an optional paramet... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n27 Apr, 2020"
},
{
"code": null,
"e": 133,
"s": 28,
"text": "The _.omit() function is used to return a copy of the object that filtered to omit the blacklisted keys."
},
{
"code": null,
"e": 141,
"s": 133,
"text": "S... |
How to enable back button in action bar? | This example demonstrates How to get action bar tittle in android.
Step 1 − Create a new project in Android Studio, go to File ⇒ New Project and fill all required details to create a new project.
Step 2 − Add the following code to res/layout/activity_main.xml.
<?xml version = "1.0" encoding = "utf-8"?>
<LinearLayout xm... | [
{
"code": null,
"e": 1254,
"s": 1187,
"text": "This example demonstrates How to get action bar tittle in android."
},
{
"code": null,
"e": 1383,
"s": 1254,
"text": "Step 1 − Create a new project in Android Studio, go to File ⇒ New Project and fill all required details to create a... |
Depth First Traversal in C | We shall not see the implementation of Depth First Traversal (or Depth First Search) in C programming language. For our reference purpose, we shall follow our example and take this as our graph model −
#include <stdio.h>
#include <stdlib.h>
#include <stdbool.h>
#define MAX 5
struct Vertex {
char label;
bool vis... | [
{
"code": null,
"e": 2916,
"s": 2714,
"text": "We shall not see the implementation of Depth First Traversal (or Depth First Search) in C programming language. For our reference purpose, we shall follow our example and take this as our graph model −"
},
{
"code": null,
"e": 5517,
"s":... |
LINQ | Filtering Operator | where | 21 May, 2019
Filtering operators are those operators which are used to filter the data according to the user requirement from the given data source or from the given sequence. For example, in an employee record, we want to get the data of the employees whose age in 21. So, we filter the record, according to their age. ... | [
{
"code": null,
"e": 53,
"s": 25,
"text": "\n21 May, 2019"
},
{
"code": null,
"e": 415,
"s": 53,
"text": "Filtering operators are those operators which are used to filter the data according to the user requirement from the given data source or from the given sequence. For example... |
Sort an array in wave form | 23 Jun, 2022
Given an unsorted array of integers, sort the array into a wave like array. An array ‘arr[0..n-1]’ is sorted in wave form if arr[0] >= arr[1] <= arr[2] >= arr[3] <= arr[4] >= .....
what is a wave array?
well, you have seen waves right? how do they look? if you will form a graph of them it would be some in ... | [
{
"code": null,
"e": 54,
"s": 26,
"text": "\n23 Jun, 2022"
},
{
"code": null,
"e": 235,
"s": 54,
"text": "Given an unsorted array of integers, sort the array into a wave like array. An array ‘arr[0..n-1]’ is sorted in wave form if arr[0] >= arr[1] <= arr[2] >= arr[3] <= arr[4] >=... |
How to Flatten MultiIndex in Pandas? - GeeksforGeeks | 28 Nov, 2021
In this article, we will discuss how to flatten multiIndex in pandas.
In this method, we are going to flat all levels of the dataframe by using the reset_index() function.
Syntax:
dataframe.reset_index(inplace=True)
Note: Dataframe is the input dataframe, we have to create the dataframe MultiIndex.
Syntax:... | [
{
"code": null,
"e": 24212,
"s": 24184,
"text": "\n28 Nov, 2021"
},
{
"code": null,
"e": 24282,
"s": 24212,
"text": "In this article, we will discuss how to flatten multiIndex in pandas."
},
{
"code": null,
"e": 24384,
"s": 24282,
"text": "In this method, we a... |
How to plot a function defined with def in Python? (Matplotlib) | To plot a function defined with def in Python, we can take the following steps −
Set the figure size and adjust the padding between and around the subplots.
Create a user-defined function using, def, i.e., f(x).
Create x data points using numpy.
Plot x and f(x) using plot() method.
To display the figure, use show() met... | [
{
"code": null,
"e": 1143,
"s": 1062,
"text": "To plot a function defined with def in Python, we can take the following steps −"
},
{
"code": null,
"e": 1219,
"s": 1143,
"text": "Set the figure size and adjust the padding between and around the subplots."
},
{
"code": nul... |
GATE | GATE-CS-2016 (Set 2) | Question 43 - GeeksforGeeks | 30 Sep, 2021
Consider a 3 GHz (gigahertz) processor with a three-stage pipeline and stage latencies v1, v2, and v3 such thatv1 = 3v2/4 = 2v3. If the longest pipeline stage is split into two pipeline stages of equal latency, the new frequency is _________ GHz, ignoring delays in the pipeline registers(A) 2(B) 4(C) 8(D) ... | [
{
"code": null,
"e": 24434,
"s": 24406,
"text": "\n30 Sep, 2021"
},
{
"code": null,
"e": 24776,
"s": 24434,
"text": "Consider a 3 GHz (gigahertz) processor with a three-stage pipeline and stage latencies v1, v2, and v3 such thatv1 = 3v2/4 = 2v3. If the longest pipeline stage is s... |
JavaScript String - replace() Method | This method finds a match between a regular expression and a string, and replaces the matched substring with a new substring.
The replacement string can include the following special replacement patterns −
The syntax to use the replace() method is as follows −
string.replace(regexp/substr, newSubStr/function[, flags]);... | [
{
"code": null,
"e": 2592,
"s": 2466,
"text": "This method finds a match between a regular expression and a string, and replaces the matched substring with a new substring."
},
{
"code": null,
"e": 2672,
"s": 2592,
"text": "The replacement string can include the following special... |
How do we specify the buffer size when opening a file in Python? | If you look at the function definition of open - open(name[, mode[, buffering]]), you'll see that it takes 3 arguments in Python 2, third one being buffering. The optional buffering argument specifies the file’s desired buffer size: 0 means unbuffered, 1 means line buffered, any other positive value means use a buffer ... | [
{
"code": null,
"e": 1600,
"s": 1062,
"text": "If you look at the function definition of open - open(name[, mode[, buffering]]), you'll see that it takes 3 arguments in Python 2, third one being buffering. The optional buffering argument specifies the file’s desired buffer size: 0 means unbuffered, ... |
Boolean Values in Python | The truth values of an expression is stored as a python data type called bool. There are only two such values in this data type. True and False.
In the below program we find out the data types of True and False Boolean values.
Live Demo
print(True)
print(type(True))
print(False)
print(type(False))
Running the above co... | [
{
"code": null,
"e": 1207,
"s": 1062,
"text": "The truth values of an expression is stored as a python data type called bool. There are only two such values in this data type. True and False."
},
{
"code": null,
"e": 1289,
"s": 1207,
"text": "In the below program we find out the ... |
Josephus Problem Using Bit Magic | 15 Jun, 2022
The Problem
This problem is named after Flavius Josephus a Jewish historian who fought against the Romans. According to Josephus he and his group of Jewish soldiers were cornered & surrounded by the Romans inside a cave, and they choose to murder and suicide inside of surrender and capture. They decided th... | [
{
"code": null,
"e": 54,
"s": 26,
"text": "\n15 Jun, 2022"
},
{
"code": null,
"e": 66,
"s": 54,
"text": "The Problem"
},
{
"code": null,
"e": 1145,
"s": 66,
"text": "This problem is named after Flavius Josephus a Jewish historian who fought against the Romans.... |
How to align images in Bootstrap 4 ? | 23 Sep, 2021
We know that adding images to a website makes it more attractive and presentable. Sometimes, we need to align the images either at the right or to the left. Most of the time, we place an image at the center. With traditional CSS, we had to write a bunch of code to accomplish this specific task. Bootstrap o... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n23 Sep, 2021"
},
{
"code": null,
"e": 849,
"s": 28,
"text": "We know that adding images to a website makes it more attractive and presentable. Sometimes, we need to align the images either at the right or to the left. Most of the time, ... |
Output of Python program | Set 15 (Loops) | 22 Aug, 2019
Prerequisite – Loops in PythonPredict the output of the following Python programs.
1) What is the output of the following program?x = ['ab', 'cd']for i in x: i.upper()print(x)Output:['ab', 'cd']
Explanation:The function upper() does not modify a string in place, but it returns a new string which here is... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n22 Aug, 2019"
},
{
"code": null,
"e": 135,
"s": 52,
"text": "Prerequisite – Loops in PythonPredict the output of the following Python programs."
},
{
"code": null,
"e": 430,
"s": 135,
"text": "1) What is the output ... |
What is Replication in Distributed System? | 17 Dec, 2021
In a distributed system data is stored is over different computers in a network. Therefore, we need to make sure that data is readily available for the users. Availability of the data is an important factor often accomplished by data replication. Replication is the practice of keeping several copies of dat... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n17 Dec, 2021"
},
{
"code": null,
"e": 358,
"s": 28,
"text": "In a distributed system data is stored is over different computers in a network. Therefore, we need to make sure that data is readily available for the users. Availability of ... |
Google Internship 2020 – Google Online Challenge(1st Coding Round) | 09 Sep, 2020
Recently I Got An E-mail From Google That I’ve been selected from the Resume review round To Google’s Online Challenge round. On the 29th Of August, I’ve given That Challenge and face these two problems, which I want to share with all...
A Special String: You Are given a string S consisting of the lowercas... | [
{
"code": null,
"e": 54,
"s": 26,
"text": "\n09 Sep, 2020"
},
{
"code": null,
"e": 292,
"s": 54,
"text": "Recently I Got An E-mail From Google That I’ve been selected from the Resume review round To Google’s Online Challenge round. On the 29th Of August, I’ve given That Challenge... |
Data Structures | Binary Search Trees | Question 8 | 28 Jun, 2021
The preorder traversal sequence of a binary search tree is 30, 20, 10, 15, 25, 23, 39, 35, 42. Which one of the following is the postorder traversal sequence of the same tree?(A) 10, 20, 15, 23, 25, 35, 42, 39, 30(B) 15, 10, 25, 23, 20, 42, 35, 39, 30(C) 15, 20, 10, 23, 25, 42, 35, 39, 30(D) 15, 10, 23, 25... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n28 Jun, 2021"
},
{
"code": null,
"e": 441,
"s": 52,
"text": "The preorder traversal sequence of a binary search tree is 30, 20, 10, 15, 25, 23, 39, 35, 42. Which one of the following is the postorder traversal sequence of the same tree... |
Tic Tac Toe Game using PyQt5 in Python | 01 Aug, 2020
In this article , we will see how we can create a Tic Tac Toe game using PyQt5. Tic-tac-toe, noughts, and crosses, or Xs and Os is a paper-and-pencil game for two players, X and O, who take turns marking the spaces in a 3×3 grid. The player who succeeds in placing three of their marks in a horizontal, vert... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n01 Aug, 2020"
},
{
"code": null,
"e": 372,
"s": 28,
"text": "In this article , we will see how we can create a Tic Tac Toe game using PyQt5. Tic-tac-toe, noughts, and crosses, or Xs and Os is a paper-and-pencil game for two players, X a... |
Factorial of an Array of integers | 15 Dec, 2021
Given an array with positive integers. The task is to find the factorial of all the array elements. Note: As the numbers would be very large, print them by taking modulus with 109+7.
Examples:
Input: arr[] = {3, 10, 200, 20, 12}
Output: 6 3628800 722479105 146326063 479001600
Input: arr[] = {5, 7, 10}
Ou... | [
{
"code": null,
"e": 54,
"s": 26,
"text": "\n15 Dec, 2021"
},
{
"code": null,
"e": 237,
"s": 54,
"text": "Given an array with positive integers. The task is to find the factorial of all the array elements. Note: As the numbers would be very large, print them by taking modulus wit... |
Count smaller elements on right side | 11 Jul, 2022
Write a function to count number of smaller elements on right of each element in an array. Given an unsorted array arr[] of distinct integers, construct another array countSmaller[] such that countSmaller[i] contains count of smaller elements on right side of each element arr[i] in array.
Examples:
Input:... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n11 Jul, 2022"
},
{
"code": null,
"e": 342,
"s": 52,
"text": "Write a function to count number of smaller elements on right of each element in an array. Given an unsorted array arr[] of distinct integers, construct another array countSm... |
Constructor Overloading in Java | 28 Jun, 2021
Prerequisite – Constructor, Overloading in java
In addition to overloading methods, we can also overload constructors in java. Overloaded constructor is called based upon the parameters specified when new is executed.
When do we need Constructor Overloading?
Sometimes there is a need of initializing an obj... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n28 Jun, 2021"
},
{
"code": null,
"e": 100,
"s": 52,
"text": "Prerequisite – Constructor, Overloading in java"
},
{
"code": null,
"e": 270,
"s": 100,
"text": "In addition to overloading methods, we can also overload ... |
Mongoose | findOneAndUpdate() Function | 20 May, 2020
The findOneAndUpdate() function is used to find a matching document and update it according to the update arg, passing any options, and returns the found document (if any) to the callback.
Installation of mongoose module:
You can visit the link to Install mongoose module. You can install this package by us... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n20 May, 2020"
},
{
"code": null,
"e": 217,
"s": 28,
"text": "The findOneAndUpdate() function is used to find a matching document and update it according to the update arg, passing any options, and returns the found document (if any) to ... |
How can I add a Boolean field to MySQL? | You can use tinyint(1) or bool or boolean. All are synonym. If you use bool or boolean datatype, then it nternally change into tinyint(1).
In PHP, the value 0 represents false and 1 represents true. Any other number except 0 is also true.
Let us check the internal representation of bool or boolean using a table. The qu... | [
{
"code": null,
"e": 1326,
"s": 1187,
"text": "You can use tinyint(1) or bool or boolean. All are synonym. If you use bool or boolean datatype, then it nternally change into tinyint(1)."
},
{
"code": null,
"e": 1426,
"s": 1326,
"text": "In PHP, the value 0 represents false and 1 ... |
How to Install Python Tensorflow in Windows? | 06 Oct, 2021
Tensorflow is a free and open-source software library used to do computational mathematics to build machine learning models more profoundly deep learning models.It is a product of Google built by Google’s brain team, hence it provides a vast range of operations performance with ease that is compatible with... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n06 Oct, 2021"
},
{
"code": null,
"e": 404,
"s": 28,
"text": "Tensorflow is a free and open-source software library used to do computational mathematics to build machine learning models more profoundly deep learning models.It is a produc... |
Equivalent of SQL Server IDENTITY Column in MySQL? | Equivalent of Microsoft SQL Server IDENTITY column in MySQL is AUTO_INCREMENT. The IDENTITY in SQL Server acts like AUTO_INCREMENT in MySQL.
The syntax is as follows −
CREATE TABLE yourTableName
(
yourColumnName1 dataType NOT NULL AUTO_INCREMENT,
yourColumnName2 dataType,
.
.
.
N,
PRIMARY KEY(yourC... | [
{
"code": null,
"e": 1328,
"s": 1187,
"text": "Equivalent of Microsoft SQL Server IDENTITY column in MySQL is AUTO_INCREMENT. The IDENTITY in SQL Server acts like AUTO_INCREMENT in MySQL."
},
{
"code": null,
"e": 1355,
"s": 1328,
"text": "The syntax is as follows −"
},
{
... |
Find Circles and Ellipses in an Image using OpenCV | Python | 11 Apr, 2022
To identify circles, ellipses, or in general, any shape in which the pixels are connected we use the SimpleBlobDetector() function of OpenCV. In non-technical terms, a blob is understood as a thick liquid drop. Here, we are going to call all shapes a blob. Our task is to detect and recognize whether the bl... | [
{
"code": null,
"e": 54,
"s": 26,
"text": "\n11 Apr, 2022"
},
{
"code": null,
"e": 384,
"s": 54,
"text": "To identify circles, ellipses, or in general, any shape in which the pixels are connected we use the SimpleBlobDetector() function of OpenCV. In non-technical terms, a blob i... |
How to Eliminate Duplicate User Defined Objects from LinkedHashSet in Java? | 07 Jan, 2021
While creating a HashSet of your own class, always ensure that the HashCode() method of the key of HashSet doesn’t change. Java Object hashCode() is a native method and returns the integer hash code value of the object. If two objects are equal according to the equals() method, then their hash code must be... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n07 Jan, 2021"
},
{
"code": null,
"e": 458,
"s": 28,
"text": "While creating a HashSet of your own class, always ensure that the HashCode() method of the key of HashSet doesn’t change. Java Object hashCode() is a native method and return... |
Radix Sort | Radix sort is a non-comparative sorting algorithm. This sorting algorithm works on the integer keys by grouping digits which share the same position and value. The radix is the base of a number system. As we know that in the decimal system the radix or base is 10. So for sorting some decimal numbers, we need 10 positio... | [
{
"code": null,
"e": 1535,
"s": 1187,
"text": "Radix sort is a non-comparative sorting algorithm. This sorting algorithm works on the integer keys by grouping digits which share the same position and value. The radix is the base of a number system. As we know that in the decimal system the radix or ... |
Java Examples - Display files in a directory | How to display all the files in a directory ?
Following example shows how to display all the files contained in a directory using list method of File class.
import java.io.*;
public class Main {
public static void main(String[] args) {
File dir = new File("C:");
String[] children = dir.list();
... | [
{
"code": null,
"e": 2248,
"s": 2202,
"text": "How to display all the files in a directory ?"
},
{
"code": null,
"e": 2359,
"s": 2248,
"text": "Following example shows how to display all the files contained in a directory using list method of File class."
},
{
"code": nul... |
PyQt5 QSpinBox – Making it disabled according to user | 17 May, 2020
In this article we will see how we can make spin box disabled according to the user, disabled spin box box is basically spin box which can’t be edited i.e which get disabled. Below is the representation of how disabled spin box looks like.
In order to do so we use setDisabled method.
Syntax : spin_box.setD... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n17 May, 2020"
},
{
"code": null,
"e": 268,
"s": 28,
"text": "In this article we will see how we can make spin box disabled according to the user, disabled spin box box is basically spin box which can’t be edited i.e which get disabled. ... |
Matplotlib – Practice, Exercise, and Solutions | 19 Oct, 2021
Python Matplotlib is a library for visualization that helps to create a variety of charts in a variety of hardcopy formats. You might have seen various Matplotlib tutorials but the best way to gain a command over this library is by practicing more and more.
This Matplotlib exercise helps you learn Matplotl... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n19 Oct, 2021"
},
{
"code": null,
"e": 310,
"s": 52,
"text": "Python Matplotlib is a library for visualization that helps to create a variety of charts in a variety of hardcopy formats. You might have seen various Matplotlib tutorials b... |
PHP scandir( ) Function | 01 Dec, 2021
In this article, we will see how to get all the files from the current or specified directory using the scandir() function in PHP. The scandir() function in PHP is an inbuilt function that is used to return an array of files and directories of the specified directory. The scandir() function lists the files... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n01 Dec, 2021"
},
{
"code": null,
"e": 597,
"s": 28,
"text": "In this article, we will see how to get all the files from the current or specified directory using the scandir() function in PHP. The scandir() function in PHP is an inbuilt ... |
How can I show and hide an HTML element using jQuery? | To hide and show an HTML element using jQuery, use the hide and show() methods. Here, the <p> element is hidden and shown on button click,
Live Demo
<!DOCTYPE html>
<html>
<head>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script>
<script>
$(document).ready(function(){
$("#visib... | [
{
"code": null,
"e": 1326,
"s": 1187,
"text": "To hide and show an HTML element using jQuery, use the hide and show() methods. Here, the <p> element is hidden and shown on button click,"
},
{
"code": null,
"e": 1336,
"s": 1326,
"text": "Live Demo"
},
{
"code": null,
"... |
Why to Override equals(Object) and hashCode() method ? | 26 Sep, 2018
Prerequisite – Equals and Hashcode methodHashMap and HashSet use the hashcode value of an object to find out how the object would be stored in the collection, and subsequently hashcode is used to help locate the object in the collection. Hashing retrieval involves:
First, find out the right bucket using ha... | [
{
"code": null,
"e": 54,
"s": 26,
"text": "\n26 Sep, 2018"
},
{
"code": null,
"e": 320,
"s": 54,
"text": "Prerequisite – Equals and Hashcode methodHashMap and HashSet use the hashcode value of an object to find out how the object would be stored in the collection, and subsequentl... |
How to create Label widget in PyQt5 ? - GeeksforGeeks | 26 Mar, 2020
While designing any GUI (Graphical User Interface) there is a need to display plain text on screen, in order to do so Label widget is used in PyQt5.
A label is a graphical control element which displays text on a form. It is usually a static control; having no interactivity. A label is generally used to id... | [
{
"code": null,
"e": 25120,
"s": 25092,
"text": "\n26 Mar, 2020"
},
{
"code": null,
"e": 25269,
"s": 25120,
"text": "While designing any GUI (Graphical User Interface) there is a need to display plain text on screen, in order to do so Label widget is used in PyQt5."
},
{
... |
C++ | Inheritance | Question 10 - GeeksforGeeks | 28 Jun, 2021
Output of following program?
#include <iostream>#include<string>using namespace std; class Base{public: virtual string print() const { return "This is Base class"; }}; class Derived : public Base{public: virtual string print() const { return "This is Derived class"; }}; v... | [
{
"code": null,
"e": 24218,
"s": 24190,
"text": "\n28 Jun, 2021"
},
{
"code": null,
"e": 24247,
"s": 24218,
"text": "Output of following program?"
},
{
"code": "#include <iostream>#include<string>using namespace std; class Base{public: virtual string print() const ... |
Bidirectional Iterators in C++ | Here we will see the concept of Bidirectional iterators in C++.
The bidirectional iterators support all of the features of forward iterators, and also prefix and postfix decrement operators.
This type of iterator can access elements in both directions, like towards the end and towards the beginning.
The random access i... | [
{
"code": null,
"e": 1126,
"s": 1062,
"text": "Here we will see the concept of Bidirectional iterators in C++."
},
{
"code": null,
"e": 1253,
"s": 1126,
"text": "The bidirectional iterators support all of the features of forward iterators, and also prefix and postfix decrement op... |
Customer reviews: identify your strengths and weaknesses with the help of web-scraping, data analysis and basic NLP | by Shukhrat Khodjaev | Towards Data Science | Customer feedback is a crucial source of information describing user experience with a company and its service. Just like in product development, efficient use of feedback can help identify and prioritize opportunities for company’s further development.
Thanks to internet, today we have an access to numerous sources wh... | [
{
"code": null,
"e": 426,
"s": 172,
"text": "Customer feedback is a crucial source of information describing user experience with a company and its service. Just like in product development, efficient use of feedback can help identify and prioritize opportunities for company’s further development."
... |
How to check missing values in R dataframe ? - GeeksforGeeks | 21 Apr, 2021
In this article, we are going to see how to find out the missing values in the data frame in R Programming Language.
Step 1: Create DataFrame.
Let us first create a data frame with some missing values and then demonstrate with an example how to find the missing values.
R
data <- data.frame(x1 = c(NA, 5, 6,... | [
{
"code": null,
"e": 24928,
"s": 24900,
"text": "\n21 Apr, 2021"
},
{
"code": null,
"e": 25045,
"s": 24928,
"text": "In this article, we are going to see how to find out the missing values in the data frame in R Programming Language."
},
{
"code": null,
"e": 25071,
... |
Apache POI PPT - Formatting Text | The text in a presentation can be formatted using the methods of the XSLFTextRun class. For that, you have to create an XSLFTextRun class object by selecting one of the slide layouts as shown below −
//create the empty presentation
XMLSlideShow ppt = new XMLSlideShow();
//getting the slide master object
XSLFSlideMast... | [
{
"code": null,
"e": 2217,
"s": 2017,
"text": "The text in a presentation can be formatted using the methods of the XSLFTextRun class. For that, you have to create an XSLFTextRun class object by selecting one of the slide layouts as shown below −"
},
{
"code": null,
"e": 2899,
"s": 2... |
Find missing element in a sorted array of consecutive numbers in Python | Suppose we have an array A of n unique numbers, these n elements are present in the array in ascending order, but there is one missing element. We have to find the missing element.
So, if the input is like A = [1, 2, 3, 4, 5, 6, 7, 9], then the output will be 8.
To solve this, we will follow these steps −
n := size of ... | [
{
"code": null,
"e": 1243,
"s": 1062,
"text": "Suppose we have an array A of n unique numbers, these n elements are present in the array in ascending order, but there is one missing element. We have to find the missing element."
},
{
"code": null,
"e": 1325,
"s": 1243,
"text": "S... |
Power BI: Add Category ‘Other’ to Charts | by ZhongTr0n | Towards Data Science | Microsoft keeps improving Power BI at a faster pace. Whenever I run into shortcomings, my first idea is to wait it out and assume it will be resolved very soon by one of the new updates. However, the client waiting for the dashboard does not always share my optimism and patience and for that reason, I often need to be ... | [
{
"code": null,
"e": 501,
"s": 171,
"text": "Microsoft keeps improving Power BI at a faster pace. Whenever I run into shortcomings, my first idea is to wait it out and assume it will be resolved very soon by one of the new updates. However, the client waiting for the dashboard does not always share ... |
How to merge multiple Python dictionaries? | First, put all dictionary objects in a list object.
Initialize a dictionary object to empty directory. This is intended to contain merged directory
Update it with each directory item from the list
>>> d=[{'a':1, 'b':2, 'c':3}, {'a':1, 'd':2, 'c':'foo'}, {'e':57,'c':3}]
>>> d
[{'a': 1, 'b': 2, 'c': 3}, {'a': 1, 'd': 2, ... | [
{
"code": null,
"e": 1114,
"s": 1062,
"text": "First, put all dictionary objects in a list object."
},
{
"code": null,
"e": 1210,
"s": 1114,
"text": "Initialize a dictionary object to empty directory. This is intended to contain merged directory"
},
{
"code": null,
"e... |
How to find the MAC address of the system using PowerShell? | There are several ways to find the MAC address (Physical Address) of the system using PowerShell.
Using this command, we can retrieve the MAC address of the network adapter.
We need to use Ipconfig /all to retrieve the mac address of all the adapters.
Ipconfig /all | Select-String -Pattern "Description","Physical" | [
{
"code": null,
"e": 1160,
"s": 1062,
"text": "There are several ways to find the MAC address (Physical Address) of the system using PowerShell."
},
{
"code": null,
"e": 1236,
"s": 1160,
"text": "Using this command, we can retrieve the MAC address of the network adapter."
},
... |
Maximum triplet sum in array in C++ | In this problem, we are given an array. Our task is to create a program that will find the maximum triplet sum in the array i.e. find the set of three elements whose sum is maximum.
Let’s take an example to understand the problem,
Input − array = {4, 6, 1, 2}
Output − 12
Explanation −
all triplets are :
(4, 6, 1) = 4+6... | [
{
"code": null,
"e": 1244,
"s": 1062,
"text": "In this problem, we are given an array. Our task is to create a program that will find the maximum triplet sum in the array i.e. find the set of three elements whose sum is maximum."
},
{
"code": null,
"e": 1293,
"s": 1244,
"text": "... |
How to add a set of frames in HTML? | Use the <frameset> tag to add a set of frames. The HTML <frameset> tag is used to divide the window into frames.
Note − This tag is not supported in HTML5. Do not use.
The following are the attributes −
You can try to run the following code to add a set of frames using the <frameset> tag −
<!DOCTYPE html>
<html>
<h... | [
{
"code": null,
"e": 1176,
"s": 1062,
"text": "Use the <frameset> tag to add a set of frames. The HTML <frameset> tag is used to divide the window into frames. "
},
{
"code": null,
"e": 1231,
"s": 1176,
"text": "Note − This tag is not supported in HTML5. Do not use."
},
{
... |
Java Examples - Array sort and insert | How to sort an array and insert an element inside it?
Following example shows how to use sort () method and user defined method insertElement ()to accomplish the task.
import java.util.Arrays;
public class MainClass {
public static void main(String args[]) throws Exception {
int array[] = { 2, 5, -2, 6, -3, 8... | [
{
"code": null,
"e": 2122,
"s": 2068,
"text": "How to sort an array and insert an element inside it?"
},
{
"code": null,
"e": 2236,
"s": 2122,
"text": "Following example shows how to use sort () method and user defined method insertElement ()to accomplish the task."
},
{
... |
Web Scraping HTML Tables using Python | Towards Data Science | Data has become the most valuable currency and precious commodity these days and the way you use it will differentiate you from ordinary people. You need to be smart enough to earn this data which is available everywhere around you and in this article you will be able to learn an easy way to get the tabular data from a... | [
{
"code": null,
"e": 533,
"s": 171,
"text": "Data has become the most valuable currency and precious commodity these days and the way you use it will differentiate you from ordinary people. You need to be smart enough to earn this data which is available everywhere around you and in this article you... |
How to count the number of words in a string in R? | The number of words in a sentence could be used for text analysis, therefore, we are required to count them. This can be for a single sentence or for multiple sentences. We can find the number of words in a sentence or in multiple sentences using strsplit with sapply.
Consider the below sentences read as vectors −
> x1... | [
{
"code": null,
"e": 1331,
"s": 1062,
"text": "The number of words in a sentence could be used for text analysis, therefore, we are required to count them. This can be for a single sentence or for multiple sentences. We can find the number of words in a sentence or in multiple sentences using strspl... |
EmailField - Django Models - GeeksforGeeks | 12 Feb, 2020
EmailField is a CharField that checks the value for a valid email address using EmailValidator. EmailValidator validates a email through predefined regex which checks ‘@’ and a ‘.’ defined after it. One can change the regex by exploring options from EmailValidator itself.
Syntax
field_name = models.EmailFi... | [
{
"code": null,
"e": 24168,
"s": 24140,
"text": "\n12 Feb, 2020"
},
{
"code": null,
"e": 24441,
"s": 24168,
"text": "EmailField is a CharField that checks the value for a valid email address using EmailValidator. EmailValidator validates a email through predefined regex which che... |
Online PHP Formatter | Editable PHP Code
1234567891011121314151617181920212223242526272829<htm><body><?phpclass Books{/* Member variables */var $price;var $title;/* Member functions */function setPrice($par){$this->price = $par;}function getPrice(){echo $this->price ."";}function setTitle($par){$this->title = $par;}function getTitle(){echo ... | [
{
"code": null,
"e": 18,
"s": 0,
"text": "Editable PHP Code"
},
{
"code": null,
"e": 358,
"s": 18,
"text": "1234567891011121314151617181920212223242526272829<htm><body><?phpclass Books{/* Member variables */var $price;var $title;/* Member functions */function setPrice($par){$thi... |
How to create polynomial regression model in R? | A Polynomial regression model is the type of model in which the dependent variable does not have linear relationship with the independent variables rather they have nth degree relationship. For example, a dependent variable x can depend on an independent variable y-square. There are two ways to create a polynomial regr... | [
{
"code": null,
"e": 1467,
"s": 1062,
"text": "A Polynomial regression model is the type of model in which the dependent variable does not have linear relationship with the independent variables rather they have nth degree relationship. For example, a dependent variable x can depend on an independen... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.