title stringlengths 3 221 | text stringlengths 17 477k | parsed listlengths 0 3.17k |
|---|---|---|
How to write backslash in Golang string? | 04 May, 2020
In most of the programming languages, Backslash (\) works as an escape sequence character and the same is the case with Golang. Thus, if a user needs to write backslash in a string, he can make use of the two common methods.
1. A user can use another backslash just before the backslash (\) he/she wants to ... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n04 May, 2020"
},
{
"code": null,
"e": 253,
"s": 28,
"text": "In most of the programming languages, Backslash (\\) works as an escape sequence character and the same is the case with Golang. Thus, if a user needs to write backslash in a ... |
df command in Linux with Examples | 21 Feb, 2018
The df command (short for disk free), is used to display information related to file systems about total space and available space.
Syntax :
df [OPTION]... [FILE]...
If no file name is given, it displays the space available on all currently mounted file systems.For example :
df
Output :
Filesystem 1K... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n21 Feb, 2018"
},
{
"code": null,
"e": 184,
"s": 52,
"text": "The df command (short for disk free), is used to display information related to file systems about total space and available space."
},
{
"code": null,
"e": 193,
... |
Initial form data – Django Forms | 29 Dec, 2019
After creating a Django Form, if one requires some or all fields of the form be filled with some initial data, one can use functionality of Django forms to do so. It is not the same as a placeholder, but this data will be passed into the view when submitted. There are multiple methods to do this, most comm... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n29 Dec, 2019"
},
{
"code": null,
"e": 540,
"s": 52,
"text": "After creating a Django Form, if one requires some or all fields of the form be filled with some initial data, one can use functionality of Django forms to do so. It is not t... |
How to Add OnClickListner to Marker on Google Maps in Android? | 26 Jan, 2021
We have seen implementing Marker on Google Maps in Android. Now we will see adding OnClickListner for that marker on our Google Maps. In this article, we will take a look at adding OnClickListner to Google Maps marker in Android.
We will be building a simple application in which we will be showing a marke... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n26 Jan, 2021"
},
{
"code": null,
"e": 259,
"s": 28,
"text": "We have seen implementing Marker on Google Maps in Android. Now we will see adding OnClickListner for that marker on our Google Maps. In this article, we will take a look at a... |
Convert output of MySQL query to UTF8? | You need to use CAST() or CONVERT() function to convert output of MySQL query to UTF8. Here, I am using MySQL version 8.0.12. Let us first check the version:
mysql> select version();
+-----------+
| version() |
+-----------+
| 8.0.12 |
+-----------+
1 row in set (0.00 sec)
In this if you use utf8 then you will get w... | [
{
"code": null,
"e": 1345,
"s": 1187,
"text": "You need to use CAST() or CONVERT() function to convert output of MySQL query to UTF8. Here, I am using MySQL version 8.0.12. Let us first check the version:"
},
{
"code": null,
"e": 1464,
"s": 1345,
"text": "mysql> select version();... |
PyQt - Database Handling | PyQt API contains an elaborate class system to communicate with many SQL based databases. Its QSqlDatabase provides access through a Connection object. Following is the list of currently available SQL drivers −
QDB2
IBM DB2
QIBASE
Borland InterBase Driver
QMYSQL
MySQL Driver
QOCI
Oracle Call Interface Driver
QODBC
ODBC... | [
{
"code": null,
"e": 2271,
"s": 2060,
"text": "PyQt API contains an elaborate class system to communicate with many SQL based databases. Its QSqlDatabase provides access through a Connection object. Following is the list of currently available SQL drivers −"
},
{
"code": null,
"e": 2276,... |
Callable and Future in Java | 28 Jun, 2021
Prerequisite: Threads, Multi-threading
The need for Callable
There are two ways of creating threads – one by extending the Thread class and other by creating a thread with a Runnable. However, one feature lacking in Runnable is that we cannot make a thread return result when it terminates, i.e. when run()... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n28 Jun, 2021"
},
{
"code": null,
"e": 91,
"s": 52,
"text": "Prerequisite: Threads, Multi-threading"
},
{
"code": null,
"e": 113,
"s": 91,
"text": "The need for Callable"
},
{
"code": null,
"e": 443,
... |
Implement a stack using singly linked list | 24 Jun, 2022
To implement a stack using singly linked list concept , all the singly linked list operations are performed based on Stack operations LIFO(last in first out) and with the help of that knowledge we are going to implement a stack using single linked list. Using singly linked lists , we implement stack by sto... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n24 Jun, 2022"
},
{
"code": null,
"e": 749,
"s": 52,
"text": "To implement a stack using singly linked list concept , all the singly linked list operations are performed based on Stack operations LIFO(last in first out) and with the hel... |
Python Program to Find Sum of First and Last Digit | 23 Aug, 2021
Given a positive integer N(at least contain two digits). The task is to write a Python program to add the first and last digit of the given number N.
Examples:
Input: N = 1247
Output: 8
Explanation: First digit is 1 and Last digit is 7. So, addition of these two (1 + 7) is equal to 8.
Input: N = 73
Output:... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n23 Aug, 2021"
},
{
"code": null,
"e": 178,
"s": 28,
"text": "Given a positive integer N(at least contain two digits). The task is to write a Python program to add the first and last digit of the given number N."
},
{
"code": nul... |
Feature Encoding Techniques – Machine Learning | 22 Jun, 2022
As we all know that better encoding leads to a better model and most algorithms cannot handle the categorical variables unless they are converted into a numerical value.
Categorical features are generally divided into 3 types:
A. Binary: Either/or Examples:
Yes, No
True, False
B. Ordinal: Specific ordere... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n22 Jun, 2022"
},
{
"code": null,
"e": 222,
"s": 52,
"text": "As we all know that better encoding leads to a better model and most algorithms cannot handle the categorical variables unless they are converted into a numerical value."
}... |
Find the first repeated character in a string | 11 Jul, 2022
Given a string, find the first repeated character in it. We need to find the character that occurs more than once and whose index of second occurrence is smallest. A variation of this question is discussed here.
Examples:
Input: ch = “geeksforgeeks” Output: e e is the first element that repeats
Input: st... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n11 Jul, 2022"
},
{
"code": null,
"e": 265,
"s": 52,
"text": "Given a string, find the first repeated character in it. We need to find the character that occurs more than once and whose index of second occurrence is smallest. A variatio... |
HTML | DOM Form submit() Method | 12 Feb, 2019
The form submit() Method in HTML DOM is used to send the form data to the web-server. It works as same as submit button. It does not contain any parameters.
Syntax:
formObject.submit()
Example:
<!DOCTYPE html> <html> <head> <title> HTML DOM Form submit() Method </title></head> <body style="... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n12 Feb, 2019"
},
{
"code": null,
"e": 185,
"s": 28,
"text": "The form submit() Method in HTML DOM is used to send the form data to the web-server. It works as same as submit button. It does not contain any parameters."
},
{
"cod... |
Flutter – Lottie Animation | 21 Oct, 2020
Visualization is an integral part of any application. Animations can highly glorify the UI of an app, but animations can be hectic to implement for an application. This is where the Lottie animation comes in. Lottie is a JSON-based animation file. It can be used both as a network asset and a static asset ... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n21 Oct, 2020"
},
{
"code": null,
"e": 360,
"s": 28,
"text": "Visualization is an integral part of any application. Animations can highly glorify the UI of an app, but animations can be hectic to implement for an application. This is wh... |
How to Take Screenshot Programmatically in Android? | 26 Feb, 2021
In every android phone, we have feature to take screenshots of screens. In this article, we are going to explain how to take screenshots programmatically. A sample GIF is given below to get an idea about what we are going to do in this article. Note that we are going to implement this project using the Jav... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n26 Feb, 2021"
},
{
"code": null,
"e": 372,
"s": 52,
"text": "In every android phone, we have feature to take screenshots of screens. In this article, we are going to explain how to take screenshots programmatically. A sample GIF is giv... |
Understanding nullptr in C++ | 22 Jul, 2021
Consider the following C++ program that shows problem with NULL (need of nullptr)
CPP
// C++ program to demonstrate problem with NULL#include <bits/stdc++.h>using namespace std; // function with integer argumentvoid fun(int N) { cout << "fun(int)"; return;} // Overloaded function with char pointer argum... | [
{
"code": null,
"e": 54,
"s": 26,
"text": "\n22 Jul, 2021"
},
{
"code": null,
"e": 137,
"s": 54,
"text": "Consider the following C++ program that shows problem with NULL (need of nullptr) "
},
{
"code": null,
"e": 141,
"s": 137,
"text": "CPP"
},
{
"cod... |
HTML | DOM Input Checkbox required Property | 11 Mar, 2019
The Input Checkbox required property in HTML DOM is used to set or return whether the input checkbox field should be checked or not before submitting the form. This property is used to reflect the HTML required attribute.
Syntax:
It returns the Input Checkbox required property.checkboxObject.required
check... | [
{
"code": null,
"e": 53,
"s": 25,
"text": "\n11 Mar, 2019"
},
{
"code": null,
"e": 275,
"s": 53,
"text": "The Input Checkbox required property in HTML DOM is used to set or return whether the input checkbox field should be checked or not before submitting the form. This property ... |
Flutter – BoxShadow Widget | 22 Feb, 2022
BoxShadow is a built-in widget in flutter, whose functionality is to cast shadow to a box. The BoxShadow widget is usually used with BoxDecoration. In BoxDecoration widget one of its parameters is boxShadow which takes a list of BoxShadow to cast a shadow around a box.
const BoxShadow(
{Color color: const ... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n22 Feb, 2022"
},
{
"code": null,
"e": 322,
"s": 52,
"text": "BoxShadow is a built-in widget in flutter, whose functionality is to cast shadow to a box. The BoxShadow widget is usually used with BoxDecoration. In BoxDecoration widget on... |
How to check if given four points form a square | 21 Jun, 2022
Given coordinates of four points in a plane, find if the four points form a square or not.
To check for square, we need to check for following. a) All fours sides formed by points are the same. b) The angle between any two sides is 90 degree. (This condition is required as Quadrilateral also has same side... | [
{
"code": null,
"e": 54,
"s": 26,
"text": "\n21 Jun, 2022"
},
{
"code": null,
"e": 146,
"s": 54,
"text": "Given coordinates of four points in a plane, find if the four points form a square or not. "
},
{
"code": null,
"e": 415,
"s": 146,
"text": "To check for ... |
How to detect If textbox content has changed using JavaScript ? | 27 Apr, 2020
The task is to detect the changes in the textbox content with JavaScript. There are two approaches that are discussed below.
Approach 1: We will use the onchange event in the input element and call a function to see the effect.
Example:<!DOCTYPE html><html> <head> <title> Detect If Textbox conte... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n27 Apr, 2020"
},
{
"code": null,
"e": 177,
"s": 52,
"text": "The task is to detect the changes in the textbox content with JavaScript. There are two approaches that are discussed below."
},
{
"code": null,
"e": 280,
"s"... |
Memory Interleaving | 31 Jul, 2021
Prerequisite – Virtual Memory Abstraction is one of the most important aspects of computing. It is a widely implemented Practice in the Computational field.
Memory Interleaving is less or More an Abstraction technique. Though it’s a bit different from Abstraction. It is a Technique that divides memory int... | [
{
"code": null,
"e": 54,
"s": 26,
"text": "\n31 Jul, 2021"
},
{
"code": null,
"e": 212,
"s": 54,
"text": "Prerequisite – Virtual Memory Abstraction is one of the most important aspects of computing. It is a widely implemented Practice in the Computational field. "
},
{
"c... |
Python | Numpy matrix.resize() | 18 Apr, 2019
With the help of Numpy matrix.resize() method, we are able to resize the shape of the given matrix. Remember all elements should be covered after resizing the given matrix.
Syntax : matrix.resize(shape)
Return: new resized matrix
Example #1 :In the given example we are able to resize the given matrix by us... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n18 Apr, 2019"
},
{
"code": null,
"e": 201,
"s": 28,
"text": "With the help of Numpy matrix.resize() method, we are able to resize the shape of the given matrix. Remember all elements should be covered after resizing the given matrix."
... |
PostgreSQL – ORDER BY clause | 28 Aug, 2020
The PostgreSQL ORDER BY clause is used to sort the result query set returned by the SELECT statement. As the query set returned by the SELECT statement has no specific order, one can use the ORDER BY clause in the SELECT statement to sort the results in the desired manner.
Syntax:SELECTcolumn_1,column_2FRO... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n28 Aug, 2020"
},
{
"code": null,
"e": 302,
"s": 28,
"text": "The PostgreSQL ORDER BY clause is used to sort the result query set returned by the SELECT statement. As the query set returned by the SELECT statement has no specific order, ... |
How to get coordinates or dimensions of element with Selenium Python? | We can get coordinates or dimensions of elements with Selenium
webdriver. Each of the elements have .size and .location properties which give the x, y coordinates and height, width of the element in the form of a dictionary.
Syntax −
loc = element.location
s = element.size
Let us consider an element for which we shall ... | [
{
"code": null,
"e": 1412,
"s": 1187,
"text": "We can get coordinates or dimensions of elements with Selenium\nwebdriver. Each of the elements have .size and .location properties which give the x, y coordinates and height, width of the element in the form of a dictionary."
},
{
"code": null,... |
Program to count vowels in a string (Iterative and Recursive) | 02 Jun, 2022
Given a string, count the total number of vowels (a, e, i, o, u) in it. There are two methods to count total number of vowels in a string. 1. Iterative 2. RecursiveExamples:
Input : abc de
Output : 2
Input : geeksforgeeks portal
Output : 7
1. Iterative Method Below is the implementation:
C++
Java
Py... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n02 Jun, 2022"
},
{
"code": null,
"e": 228,
"s": 52,
"text": "Given a string, count the total number of vowels (a, e, i, o, u) in it. There are two methods to count total number of vowels in a string. 1. Iterative 2. RecursiveExamples: ... |
How to Use SVG Vector Drawables in Android? | 11 Aug, 2021
SVG stands for Scalable Vector Graphics. It is used for rendering two-dimensional images on the internet. SVG is used for high-quality images that can be scaled to any size. we can use SVG files in android too. SVG can be used for icons, for creating images for creating beautiful UI. In this post, we are h... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n11 Aug, 2021"
},
{
"code": null,
"e": 390,
"s": 28,
"text": "SVG stands for Scalable Vector Graphics. It is used for rendering two-dimensional images on the internet. SVG is used for high-quality images that can be scaled to any size. w... |
PHP | mkdir( ) Function | 01 Jun, 2018
The mkdir() creates a new directory with the specified pathname. The path and mode are sent as parameters to the mkdir() function and it returns TRUE on success or FALSE on failure.The mode parameter in mkdir() function is ignored on Windows platforms.
Syntax:
mkdir(path, mode, recursive, context)
Paramete... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n01 Jun, 2018"
},
{
"code": null,
"e": 305,
"s": 52,
"text": "The mkdir() creates a new directory with the specified pathname. The path and mode are sent as parameters to the mkdir() function and it returns TRUE on success or FALSE on f... |
How to sort a Pandas DataFrame by multiple columns in Python? | 25 Aug, 2021
Sorting is one of the operations performed on the dataframe based on conditional requirements. We can sort dataframe alphabetically as well as in numerical order also. In this article, we will see how to sort Pandas Dataframe by multiple columns.
Method 1: Using sort_values() method
Syntax: df_name.sort_v... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n25 Aug, 2021"
},
{
"code": null,
"e": 276,
"s": 28,
"text": "Sorting is one of the operations performed on the dataframe based on conditional requirements. We can sort dataframe alphabetically as well as in numerical order also. In this... |
scanf() and fscanf() in C | 13 Jun, 2022
In C language, scanf() function is used to read formatted input from stdin. It returns the whole number of characters written in it otherwise, returns a negative value.
Syntax:
int scanf(const char *characters_set)
Many of us know the traditional uses of scanf. Well, here are some of the lesser-known facts... | [
{
"code": null,
"e": 54,
"s": 26,
"text": "\n13 Jun, 2022"
},
{
"code": null,
"e": 223,
"s": 54,
"text": "In C language, scanf() function is used to read formatted input from stdin. It returns the whole number of characters written in it otherwise, returns a negative value."
},... |
Quadratic Probing in Hashing | 08 Feb, 2022
Hashing is an improvement over Direct Access Table. The idea is to use a hash function that converts a given phone number or any other key to a smaller number and uses the small number as the index in a table called a hash table. Hash Function: A function that converts a given big number to a small practic... | [
{
"code": null,
"e": 54,
"s": 26,
"text": "\n08 Feb, 2022"
},
{
"code": null,
"e": 906,
"s": 54,
"text": "Hashing is an improvement over Direct Access Table. The idea is to use a hash function that converts a given phone number or any other key to a smaller number and uses the sm... |
Python program to find runner-up score | Suppose we have a list of scores for different number of participants. We have to find the runner-up score.
So, if the input is like scores = [5,8,2,6,8,5,8,7], then the output will be 7 because the winner score is 8 and second largest score is 7.
To solve this, we will follow these steps −
winner := -99999
runner_up :... | [
{
"code": null,
"e": 1295,
"s": 1187,
"text": "Suppose we have a list of scores for different number of participants. We have to find the runner-up score."
},
{
"code": null,
"e": 1435,
"s": 1295,
"text": "So, if the input is like scores = [5,8,2,6,8,5,8,7], then the output will ... |
HTML Introduction | 09 Jun, 2022
HTML stands for HyperText Markup Language. It is used to design web pages using a markup language. HTML is the combination of Hypertext and Markup language. Hypertext defines the link between the web pages. A markup language is used to define the text document within tag which defines the structure of web ... | [
{
"code": null,
"e": 53,
"s": 25,
"text": "\n09 Jun, 2022"
},
{
"code": null,
"e": 639,
"s": 53,
"text": "HTML stands for HyperText Markup Language. It is used to design web pages using a markup language. HTML is the combination of Hypertext and Markup language. Hypertext defines... |
Iterate associative array using foreach loop in PHP | 24 May, 2019
Given two arrays arr1 and arr2 of size n. The task is to iterate both arrays in the foreach loop. Both arrays can combine into a single array using a foreach loop.
Array: Arrays in PHP is a type of data structure that allows to storing multiple elements of similar data type under a single variable thereby ... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n24 May, 2019"
},
{
"code": null,
"e": 192,
"s": 28,
"text": "Given two arrays arr1 and arr2 of size n. The task is to iterate both arrays in the foreach loop. Both arrays can combine into a single array using a foreach loop."
},
{
... |
Reduce Data Consumption on Windows OS | 08 Jan, 2021
On a Windows machine, there is an option of “Data usages” settings to monitor your network consumption and avoid going over your data plan when using a limited internet connection. Windows introduced so many features like a built-in network traffic monitor for your system.
In this article, we will look int... | [
{
"code": null,
"e": 54,
"s": 26,
"text": "\n08 Jan, 2021"
},
{
"code": null,
"e": 328,
"s": 54,
"text": "On a Windows machine, there is an option of “Data usages” settings to monitor your network consumption and avoid going over your data plan when using a limited internet conne... |
Program for factorial of a number - GeeksforGeeks | 14 Mar, 2022
Factorial of a non-negative integer, is multiplication of all integers smaller than or equal to n. For example factorial of 6 is 6*5*4*3*2*1 which is 720.
Recursive Solution: Factorial can be calculated using following recursive formula.
n! = n * (n-1)!
n! = 1 if n = 0 or n = 1
Following is implem... | [
{
"code": null,
"e": 25922,
"s": 25894,
"text": "\n14 Mar, 2022"
},
{
"code": null,
"e": 26078,
"s": 25922,
"text": "Factorial of a non-negative integer, is multiplication of all integers smaller than or equal to n. For example factorial of 6 is 6*5*4*3*2*1 which is 720. "
},
... |
ReactJS MDBootstrap Input Group Component - GeeksforGeeks | 07 Jan, 2022
MDBootstrap is a Material Design and bootstrap-based react UI library that is used to make good-looking webpages with its seamless and easy-to-use component. In this article, we will know how to use the Input Group Component in ReactJS MDBootstrap. Input Group allows a user to make a field in which the use... | [
{
"code": null,
"e": 26071,
"s": 26043,
"text": "\n07 Jan, 2022"
},
{
"code": null,
"e": 26401,
"s": 26071,
"text": "MDBootstrap is a Material Design and bootstrap-based react UI library that is used to make good-looking webpages with its seamless and easy-to-use component. In th... |
Smallest Palindrome after replacement - GeeksforGeeks | 12 Apr, 2021
Given a string which has some lowercase alphabet characters and one special character dot(.). We need to replace all dots with some alphabet character in such a way that resultant string becomes a palindrome, in case of many possible replacements, we need to choose palindrome string which is lexicographica... | [
{
"code": null,
"e": 26207,
"s": 26179,
"text": "\n12 Apr, 2021"
},
{
"code": null,
"e": 26654,
"s": 26207,
"text": "Given a string which has some lowercase alphabet characters and one special character dot(.). We need to replace all dots with some alphabet character in such a wa... |
Difference between #include and #include" " in C/C++ with Examples - GeeksforGeeks | 08 Dec, 2021
Pre-requisites: Header files in C/ C++ and its uses
The difference between the two types is in the location where the preprocessor searches for the file to be included in the code.
#include <filename> // Standard library header
#include “filename” // User defined header
#include<filename>
#include<> is ... | [
{
"code": null,
"e": 25667,
"s": 25636,
"text": " \n08 Dec, 2021\n"
},
{
"code": null,
"e": 25719,
"s": 25667,
"text": "Pre-requisites: Header files in C/ C++ and its uses"
},
{
"code": null,
"e": 25848,
"s": 25719,
"text": "The difference between the two type... |
How to join two arrays in JavaScript? | Following is the code to join two arrays together in JavaScript −
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>
<style>
body {
font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-se... | [
{
"code": null,
"e": 1128,
"s": 1062,
"text": "Following is the code to join two arrays together in JavaScript −"
},
{
"code": null,
"e": 1139,
"s": 1128,
"text": " Live Demo"
},
{
"code": null,
"e": 2218,
"s": 1139,
"text": "<!DOCTYPE html>\n<html lang=\"en\"... |
How to use cardview in recyclerview? | This example demonstrates about How to use cardview in recyclerview
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"?>
<android.suppor... | [
{
"code": null,
"e": 1130,
"s": 1062,
"text": "This example demonstrates about How to use cardview in recyclerview"
},
{
"code": null,
"e": 1259,
"s": 1130,
"text": "Step 1 − Create a new project in Android Studio, go to File ⇒ New Project and fill all required details to create ... |
A Guide to Text Classification and Sentiment Analysis | by Abhijit Roy | Towards Data Science | Motivation: Text Classification and sentiment analysis is a very common machine learning problem and is used in a lot of activities like product predictions, movie recommendations, and several others. Currently, for every machine learner new to this field, like myself, exploring this domain has become very important. A... | [
{
"code": null,
"e": 773,
"s": 172,
"text": "Motivation: Text Classification and sentiment analysis is a very common machine learning problem and is used in a lot of activities like product predictions, movie recommendations, and several others. Currently, for every machine learner new to this field... |
Bitwise operators and chaining comparisons in Pandas | by Àlex Escolà Nixon | Towards Data Science | When learning Pandas, it is natural to have a tendency to use Python’s boolean operators ( and , or etc.) to chain conditions, since that is how it is done in Python. However, these are not the operators we should be using in Pandas (or NumPy). Let me explain why...
In Python, chaining comparisons is straight forward:
... | [
{
"code": null,
"e": 439,
"s": 172,
"text": "When learning Pandas, it is natural to have a tendency to use Python’s boolean operators ( and , or etc.) to chain conditions, since that is how it is done in Python. However, these are not the operators we should be using in Pandas (or NumPy). Let me exp... |
How to Share your Jupyter Notebook in 3 Lines of Code with Ngrok | by Khuyen Tran | Towards Data Science | Have you ever wanted to share your Jupyter Notebook with your friend to collaborate on a project but found no collaboration button? You cannot just copy and paste the link of your Jupyter Notebook because it runs on the local machine. You wish there could be a way that you could just send your friend a link and both of... | [
{
"code": null,
"e": 618,
"s": 172,
"text": "Have you ever wanted to share your Jupyter Notebook with your friend to collaborate on a project but found no collaboration button? You cannot just copy and paste the link of your Jupyter Notebook because it runs on the local machine. You wish there could... |
Framework7 - Environment | In this chapter, we will discuss about how to install and setup Framework7.
You can download the Framework7 in two ways −
Download from Framework7 Github repository
You can install the Framework7, using Bower as shown below −
bower install framework7
After successful installation of Framework7, you need to follow the ... | [
{
"code": null,
"e": 2727,
"s": 2651,
"text": "In this chapter, we will discuss about how to install and setup Framework7."
},
{
"code": null,
"e": 2773,
"s": 2727,
"text": "You can download the Framework7 in two ways −"
},
{
"code": null,
"e": 2816,
"s": 2773,
... |
AngularJS | ng-minlength Directive - GeeksforGeeks | 26 Mar, 2019
The ng-minlength Directive in AngularJS is used to set the minimum length for an input field i.e it adds the restriction for an input field. It is different from minlength attribute in HTML because the former prevent users from entering less than the specified limit whereas the later doesn’t do that. It ma... | [
{
"code": null,
"e": 25109,
"s": 25081,
"text": "\n26 Mar, 2019"
},
{
"code": null,
"e": 25492,
"s": 25109,
"text": "The ng-minlength Directive in AngularJS is used to set the minimum length for an input field i.e it adds the restriction for an input field. It is different from m... |
How to Fetch Audio file From Storage in Android? - GeeksforGeeks | 11 Jul, 2021
Selecting an audio file from the phone’s storage is required when the user is uploading or sending an audio file in your application. So this article primarily focuses on getting the audio files as a URI from your phone’s storage.
Step 1: Create a New Project
To create a new project in Android Studio pleas... | [
{
"code": null,
"e": 25142,
"s": 25114,
"text": "\n11 Jul, 2021"
},
{
"code": null,
"e": 25373,
"s": 25142,
"text": "Selecting an audio file from the phone’s storage is required when the user is uploading or sending an audio file in your application. So this article primarily foc... |
Make a font italic with CSS | To make a font italic, use the font-style property. You can try to run the following code to learn how to work with the font-style property:
<html>
<head>
</head>
<body>
<p style = "font-style:italic;">
This text is in italic style
</p>
</body>
</html> | [
{
"code": null,
"e": 1203,
"s": 1062,
"text": "To make a font italic, use the font-style property. You can try to run the following code to learn how to work with the font-style property:"
},
{
"code": null,
"e": 1348,
"s": 1203,
"text": "<html>\n <head>\n </head>\n <body>\... |
KeyNotFoundException in C# | The KeyNotFoundException is thrown when a key you are finding is not available in the Dictionary
collection.
Let us see an example −
Live Demo
using System;
using System.Collections.Generic;
public class Demo {
public static void Main() {
try {
var dict = new Dictionary<string, string>() {
... | [
{
"code": null,
"e": 1171,
"s": 1062,
"text": "The KeyNotFoundException is thrown when a key you are finding is not available in the Dictionary\ncollection."
},
{
"code": null,
"e": 1195,
"s": 1171,
"text": "Let us see an example −"
},
{
"code": null,
"e": 1206,
"... |
Set the opacity for the background color with CSS | To set the opacity for the background color, use the opacity property with RGBA color values.
You can try to run the following code to implement the opacity property:
Live Demo
<!DOCTYPE html>
<html>
<head>
<style>
div {
background: rgb(40, 135, 70);
padding: 20px;
}
... | [
{
"code": null,
"e": 1156,
"s": 1062,
"text": "To set the opacity for the background color, use the opacity property with RGBA color values."
},
{
"code": null,
"e": 1229,
"s": 1156,
"text": "You can try to run the following code to implement the opacity property:"
},
{
"... |
Get the property of the difference between two objects in JavaScript | Let’s say, we are given two objects that have similar key value pairs with one or key having
different values in both objects. Our job is to write a function that takes in the two objects as
argument and returns the very first key it finds having different values. If all the keys have exact
same values, it should retur... | [
{
"code": null,
"e": 1388,
"s": 1062,
"text": "Let’s say, we are given two objects that have similar key value pairs with one or key having\ndifferent values in both objects. Our job is to write a function that takes in the two objects as\nargument and returns the very first key it finds having diff... |
How to use PySpark on your computer | by Favio Vázquez | Towards Data Science | I will assume you know what Apache Spark is, and what PySpark is too, but if you have questions don’t mind asking me! Oh, you can check a quick intro I made a while ago here.
The $ symbol will mean run in the shell (but don’t copy the symbol).
Install Jupyter notebook
Install Jupyter notebook
$ pip install jupyter
2. I... | [
{
"code": null,
"e": 347,
"s": 172,
"text": "I will assume you know what Apache Spark is, and what PySpark is too, but if you have questions don’t mind asking me! Oh, you can check a quick intro I made a while ago here."
},
{
"code": null,
"e": 416,
"s": 347,
"text": "The $ symbo... |
Build a Flask application to validate CAPTCHA - GeeksforGeeks | 14 Sep, 2021
In this article, we are going a build a web application that can have a CAPTCHA. CAPTCHA is a tool you can use to differentiate between real users and automated users. CAPTCHAs are usually found on the login pages or on payment pages.
Captcha is strategy used to ensure sites against spam. Objective is to p... | [
{
"code": null,
"e": 23901,
"s": 23873,
"text": "\n14 Sep, 2021"
},
{
"code": null,
"e": 24136,
"s": 23901,
"text": "In this article, we are going a build a web application that can have a CAPTCHA. CAPTCHA is a tool you can use to differentiate between real users and automated us... |
Extract hyperlinks from PDF in Python | Python has a large set of libraries for handling different types of operations. To extract the data and meta-information from a PDF, we use the PyPdf2 package. It is easy to use and has many different operations or toolkits such as Extracting the data from the PDF, Searching Keyword in the Document, Extracting Meta Inf... | [
{
"code": null,
"e": 1523,
"s": 1062,
"text": "Python has a large set of libraries for handling different types of operations. To extract the data and meta-information from a PDF, we use the PyPdf2 package. It is easy to use and has many different operations or toolkits such as Extracting the data f... |
Binary and Multiclass Text Classification (auto detection in a model test pipeline) | by Christophe Pere | Towards Data Science | In my previous article (Model Selection in Text Classification), I presented a way to select a model by making a comparison between classical machine learning and deep learning for the binary text classification problem.
The notebook is structured to run automatically with cross-validation all the algorithms and shows ... | [
{
"code": null,
"e": 393,
"s": 172,
"text": "In my previous article (Model Selection in Text Classification), I presented a way to select a model by making a comparison between classical machine learning and deep learning for the binary text classification problem."
},
{
"code": null,
"e... |
How to Normalize, Center, and Standardize Image Pixels in Keras? - GeeksforGeeks | 25 Feb, 2021
The most crucial part for a Deep learning neural network model is the ‘dataset’, or straightforwardly the Images in the dataset if the model is used for object/image detection, etc. The pixel values in the images must be scaled properly before the development of the neural network model.
Keras is a deep le... | [
{
"code": null,
"e": 25537,
"s": 25509,
"text": "\n25 Feb, 2021"
},
{
"code": null,
"e": 25826,
"s": 25537,
"text": "The most crucial part for a Deep learning neural network model is the ‘dataset’, or straightforwardly the Images in the dataset if the model is used for object/ima... |
What are the differences between PHP constants and variables ? - GeeksforGeeks | 21 Oct, 2021
PHP Constants: PHP Constants are the identifiers that remain the same. Usually, it does not change during the execution of the script. They are case-sensitive. By default, constant identifiers are always uppercase. Usually, a Constant name starts with an underscore or a letter which is followed by a number... | [
{
"code": null,
"e": 26313,
"s": 26285,
"text": "\n21 Oct, 2021"
},
{
"code": null,
"e": 26766,
"s": 26313,
"text": "PHP Constants: PHP Constants are the identifiers that remain the same. Usually, it does not change during the execution of the script. They are case-sensitive. By ... |
DictField in serializers - Django REST Framework - GeeksforGeeks | 09 Dec, 2021
In Django REST Framework the very concept of Serializing is to convert DB data to a datatype that can be used by javascript. Every serializer comes with some fields (entries) which are going to be processed. For example if you have a class with name Employee and its fields as Employee_id, Employee_name, is... | [
{
"code": null,
"e": 25631,
"s": 25603,
"text": "\n09 Dec, 2021"
},
{
"code": null,
"e": 26246,
"s": 25631,
"text": "In Django REST Framework the very concept of Serializing is to convert DB data to a datatype that can be used by javascript. Every serializer comes with some field... |
Types of Restoration Filters - GeeksforGeeks | 06 Dec, 2019
Restoration Filters are the type of filters that are used for operation of noisy image and estimating the clean and original image. It may consists of processes that are used for blurring or the reverse processes that are used for inverse of blur. Filter used in restoration is different from the filter use... | [
{
"code": null,
"e": 26163,
"s": 26135,
"text": "\n06 Dec, 2019"
},
{
"code": null,
"e": 26496,
"s": 26163,
"text": "Restoration Filters are the type of filters that are used for operation of noisy image and estimating the clean and original image. It may consists of processes th... |
PING Command in Linux with examples - GeeksforGeeks | 11 May, 2022
PING (Packet Internet Groper) command is used to check the network connectivity between host and server/host. This command takes as input the IP address or the URL and sends a data packet to the specified address with the message “PING” and get a response from the server/host this time is recorded which is... | [
{
"code": null,
"e": 25527,
"s": 25499,
"text": "\n11 May, 2022"
},
{
"code": null,
"e": 26192,
"s": 25527,
"text": "PING (Packet Internet Groper) command is used to check the network connectivity between host and server/host. This command takes as input the IP address or the URL... |
Matrix Diagonalization - GeeksforGeeks | 27 Apr, 2022
Prerequisite: Eigenvalues and eigenvectors
Let A and B be two matrices of order n. B can be considered similar to A if there exists an invertible matrix P such that B=P^{-1} A P This is known as Matrix Similarity Transformation.
Diagonalization of a matrix is defined as the process of reducing any matrix... | [
{
"code": null,
"e": 25667,
"s": 25639,
"text": "\n27 Apr, 2022"
},
{
"code": null,
"e": 25711,
"s": 25667,
"text": "Prerequisite: Eigenvalues and eigenvectors"
},
{
"code": null,
"e": 25898,
"s": 25711,
"text": "Let A and B be two matrices of order n. B can ... |
Program to print reverse character bridge pattern - GeeksforGeeks | 28 Mar, 2022
For a given value N, denoting the number of Charters starting from the A, print reverse character bridge pattern.Examples :
Input : n = 5
Output :
ABCDEDCBA
ABCD DCBA
ABC CBA
AB BA
A A
Input : n = 8
Output :
ABCDEFGHGFEDCBA
ABCDEFG GFEDCBA
ABCDEF FEDCBA
ABCDE EDCBA
ABCD D... | [
{
"code": null,
"e": 25799,
"s": 25771,
"text": "\n28 Mar, 2022"
},
{
"code": null,
"e": 25925,
"s": 25799,
"text": "For a given value N, denoting the number of Charters starting from the A, print reverse character bridge pattern.Examples : "
},
{
"code": null,
"e": ... |
Python VLC MediaListPlayer - Currently Playing - GeeksforGeeks | 29 Aug, 2020
In this article we will see how we can check if the media is playing or not in the MediaListPlayer object in the python vlc module. VLC media player is a free and open-source portable cross-platform media player software and streaming media server developed by the VideoLAN project. Media list player is use... | [
{
"code": null,
"e": 26161,
"s": 26133,
"text": "\n29 Aug, 2020"
},
{
"code": null,
"e": 26836,
"s": 26161,
"text": "In this article we will see how we can check if the media is playing or not in the MediaListPlayer object in the python vlc module. VLC media player is a free and ... |
How to reverse the order of given vector in R? - GeeksforGeeks | 30 May, 2021
In this article, we will discuss how to reverse the order of elements in a vector in R Programming Language.
It can be done using the rev() function. It returns the reverse version of data objects.
Syntax: rev(x)
Parameter: x: Data object
Returns: Reverse of the data object passed
Example 1: Here we will c... | [
{
"code": null,
"e": 26487,
"s": 26459,
"text": "\n30 May, 2021"
},
{
"code": null,
"e": 26596,
"s": 26487,
"text": "In this article, we will discuss how to reverse the order of elements in a vector in R Programming Language."
},
{
"code": null,
"e": 26685,
"s": 2... |
ZoneId getId() method in Java with Examples - GeeksforGeeks | 10 May, 2019
The getId() method of the ZoneId class in Java is used to get the unique time-zone ID which uniquely defines this object.
Syntax:
public String getId(Object obj)
Parameters: This method accepts nothing.
Return value: This method returns the time-zone unique ID.
Below programs illustrate the getId() method... | [
{
"code": null,
"e": 25711,
"s": 25683,
"text": "\n10 May, 2019"
},
{
"code": null,
"e": 25833,
"s": 25711,
"text": "The getId() method of the ZoneId class in Java is used to get the unique time-zone ID which uniquely defines this object."
},
{
"code": null,
"e": 2584... |
Java Program to Find the Maximum Element in a Matrix - GeeksforGeeks | 06 Apr, 2022
Given a multi-dimensional 2D matrix of n rows and m column order N × M. The task is to find the maximum element in the given matrix.
Illustration:
Input : mat[][] = { {1,3,4,19}, {11,10,12,1}, {7,9,0,4,99} }
Output : 99
Methods:
Iterative method (naive approach)Using the principle of recursion (Bit more o... | [
{
"code": null,
"e": 25225,
"s": 25197,
"text": "\n06 Apr, 2022"
},
{
"code": null,
"e": 25358,
"s": 25225,
"text": "Given a multi-dimensional 2D matrix of n rows and m column order N × M. The task is to find the maximum element in the given matrix."
},
{
"code": null,
... |
*args and **kwargs in Python - GeeksforGeeks | 15 Dec, 2021
In Python, we can pass a variable number of arguments to a function using special symbols. There are two special symbols:
Special Symbols Used for passing arguments:-
1.)*args (Non-Keyword Arguments)
2.)**kwargs (Keyword Arguments)
Note: “We use the “wildcard” or “*” notation like this – *args OR **kwargs ... | [
{
"code": null,
"e": 42675,
"s": 42647,
"text": "\n15 Dec, 2021"
},
{
"code": null,
"e": 42797,
"s": 42675,
"text": "In Python, we can pass a variable number of arguments to a function using special symbols. There are two special symbols:"
},
{
"code": null,
"e": 4284... |
DataTables order Option - GeeksforGeeks | 13 Jul, 2021
DataTables is a jQuery plugin that can be used for adding interactive and advanced controls to HTML tables for the webpage. This also allows the data in the table to be searched, sorted, and filtered according to the needs of the user. The DataTables also exposes a powerful API that can be further used to ... | [
{
"code": null,
"e": 26954,
"s": 26926,
"text": "\n13 Jul, 2021"
},
{
"code": null,
"e": 27295,
"s": 26954,
"text": "DataTables is a jQuery plugin that can be used for adding interactive and advanced controls to HTML tables for the webpage. This also allows the data in the table ... |
Image segmentation using Morphological operations in Python - GeeksforGeeks | 12 Feb, 2018
If we want to extract or define something from the rest of the image, eg. detecting an object from a background, we can break the image up into segments in which we can do more processing on. This is typically called Segmentation.
Morphological operations are some simple operations based on the image shape... | [
{
"code": null,
"e": 26157,
"s": 26129,
"text": "\n12 Feb, 2018"
},
{
"code": null,
"e": 26388,
"s": 26157,
"text": "If we want to extract or define something from the rest of the image, eg. detecting an object from a background, we can break the image up into segments in which w... |
Materialize CSS Checkbox - GeeksforGeeks | 11 Sep, 2020
Materialize provides a checkbox feature for creating styled checkboxes for the websites. The standard HTML checkboxes are plain with a simple black border in unchecked and a tick mark in checked states, but with materialize border style can be changed along with the tick mark.
For creating a checkbox with ... | [
{
"code": null,
"e": 29291,
"s": 29263,
"text": "\n11 Sep, 2020"
},
{
"code": null,
"e": 29569,
"s": 29291,
"text": "Materialize provides a checkbox feature for creating styled checkboxes for the websites. The standard HTML checkboxes are plain with a simple black border in unche... |
Gradle - Running a Build | Gradle provides a command line to execute build script. It can execute more than one task at a time. This chapter explains how to execute multiple tasks using different options.
You can execute multiple tasks from a single build file. Gradle can handle the build file using gradle command. This command will compile each... | [
{
"code": null,
"e": 2060,
"s": 1882,
"text": "Gradle provides a command line to execute build script. It can execute more than one task at a time. This chapter explains how to execute multiple tasks using different options."
},
{
"code": null,
"e": 2321,
"s": 2060,
"text": "You ... |
Stacked Bar Charts with Python’s Matplotlib | by Thiago Carvalho | Towards Data Science | Bar charts are by far my favourite visualization technique. They are very versatile, usually easy to read, and relatively straightforward to build.
Just like any visualization, they do have some disadvantages as well. For example, they struggle with scalability.
Too many bars in a bar chart make it confusing and hard t... | [
{
"code": null,
"e": 320,
"s": 172,
"text": "Bar charts are by far my favourite visualization technique. They are very versatile, usually easy to read, and relatively straightforward to build."
},
{
"code": null,
"e": 435,
"s": 320,
"text": "Just like any visualization, they do h... |
A Gentle Introduction to Natural Language Processing | by Ronak Vijay | Towards Data Science | Humans communicate through some form of language either by text or speech. Now to make interactions between computers and humans, computers need to understand natural languages used by humans. Natural language processing is all about making computers to learn, process and manipulate natural languages.
In this blog, we ... | [
{
"code": null,
"e": 475,
"s": 172,
"text": "Humans communicate through some form of language either by text or speech. Now to make interactions between computers and humans, computers need to understand natural languages used by humans. Natural language processing is all about making computers to l... |
CSS | flex-wrap property - GeeksforGeeks | 24 Aug, 2021
The CSS flex-wrap property is used to specify whether flex items are forced into a single line or wrapped onto multiple lines. The flex-wrap property allows enabling the control direction in which lines are stacked. It is used to designate a single line or multi-line format to flex items inside the flex co... | [
{
"code": null,
"e": 23684,
"s": 23656,
"text": "\n24 Aug, 2021"
},
{
"code": null,
"e": 24000,
"s": 23684,
"text": "The CSS flex-wrap property is used to specify whether flex items are forced into a single line or wrapped onto multiple lines. The flex-wrap property allows enabli... |
HTML - <plaintext> Tag | The HTML <plaintext> tag is used to render all text in the document exactly as it was typed in, including all tags and even the document tags.
This tag ignores all formatting for the rest of the document, displaying all text exactly as is. It cannot be stopped, it cannot be turned off. It is deprecated because it messe... | [
{
"code": null,
"e": 2517,
"s": 2374,
"text": "The HTML <plaintext> tag is used to render all text in the document exactly as it was typed in, including all tags and even the document tags."
},
{
"code": null,
"e": 2733,
"s": 2517,
"text": "This tag ignores all formatting for the... |
How to convert Image into base64 String in Android? | This example demonstrates how to do I 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"?>
<RelativeLayout xmlns:android="http:/... | [
{
"code": null,
"e": 1112,
"s": 1062,
"text": "This example demonstrates how to do I in android."
},
{
"code": null,
"e": 1241,
"s": 1112,
"text": "Step 1 − Create a new project in Android Studio, go to File ⇒ New Project and fill all required details to create a new project."
... |
k sorted array | Practice | GeeksforGeeks | Given an array of n distinct elements. Check whether the given array is a k sorted array or not. A k sorted array is an array where each element is at most k distance away from its target position in the sorted array.
Example 1:
Input:
N=6
arr[] = {3, 2, 1, 5, 6, 4}
K = 2
Output: Yes
Explanation:
Every element is at ... | [
{
"code": null,
"e": 456,
"s": 238,
"text": "Given an array of n distinct elements. Check whether the given array is a k sorted array or not. A k sorted array is an array where each element is at most k distance away from its target position in the sorted array."
},
{
"code": null,
"e": ... |
File listRoots() method in Java with examples - GeeksforGeeks | 28 Jan, 2019
The listRoots() method is a part of File class. The listRoots() function returns the root directories of all the available file System roots. It is guaranteed that the pathname of any file on the system will begin with any one of these roots.
Function Signature:
public static File[] listRoots()
Syntax:
Fil... | [
{
"code": null,
"e": 24904,
"s": 24876,
"text": "\n28 Jan, 2019"
},
{
"code": null,
"e": 25147,
"s": 24904,
"text": "The listRoots() method is a part of File class. The listRoots() function returns the root directories of all the available file System roots. It is guaranteed that... |
JasmineJS - Exception Check | Apart from different computational matchers, Jasmine provides some useful matchers to check exception of the program. Let us modify our JavaScript with the following set of code.
var throwMeAnError = function() {
throw new Error();
};
describe("Different Methods of Expect Block", function() {
var exp = 2... | [
{
"code": null,
"e": 2229,
"s": 2050,
"text": "Apart from different computational matchers, Jasmine provides some useful matchers to check exception of the program. Let us modify our JavaScript with the following set of code."
},
{
"code": null,
"e": 2482,
"s": 2229,
"text": "var... |
Speeding up Convolutional Neural Networks | by Alex Burlacu | Towards Data Science | An overview of methods to speed up training of convolutional neural networks without significant impact on the accuracy.
It’s funny how fully connected layers are the main cause for big memory footprint of neural networks, but are fast, while convolutions eat most of the computing power although being compact in the nu... | [
{
"code": null,
"e": 292,
"s": 171,
"text": "An overview of methods to speed up training of convolutional neural networks without significant impact on the accuracy."
},
{
"code": null,
"e": 667,
"s": 292,
"text": "It’s funny how fully connected layers are the main cause for big ... |
Page Object Model (POM) - GeeksforGeeks | 16 Jul, 2019
What is POM?POM is a design pattern which is commonly used in Selenium for Automating the Test Cases. This design pattern can be used with any kind of framework like keyword-driven, Data-driven, hybrid framework, etc.The Page object is an object-oriented class which acts as an interface for the page of you... | [
{
"code": null,
"e": 26069,
"s": 26041,
"text": "\n16 Jul, 2019"
},
{
"code": null,
"e": 26626,
"s": 26069,
"text": "What is POM?POM is a design pattern which is commonly used in Selenium for Automating the Test Cases. This design pattern can be used with any kind of framework li... |
Salesforce Interview Experience for Internship (On-Campus 2020) - GeeksforGeeks | 08 Oct, 2020
Online Test: There were 3 coding questions to be answered in 75mins
Give an array you have to sum up the values of the array and call the sum as q. You have to evaluate the following: ∑qi=1 ∑qj=i F(i,j)Where F(i,j)=sum of divisors of i and j. Simple,... | [
{
"code": null,
"e": 26713,
"s": 26685,
"text": "\n08 Oct, 2020"
},
{
"code": null,
"e": 26781,
"s": 26713,
"text": "Online Test: There were 3 coding questions to be answered in 75mins"
},
{
"code": null,
"e": 27333,
"s": 26781,
"text": "Give an array you have... |
p5.js map() Function - GeeksforGeeks | 17 Feb, 2021
The map() function in p5.js is used to normalize a number having range from min1 to max1 in a range of min2 to max2.
Normalization is very helpful in p5.js if you are scaling your elements. Because as we know normalization takes care of all the proportions in scaling so, we get a completely balanced scalin... | [
{
"code": null,
"e": 26627,
"s": 26599,
"text": "\n17 Feb, 2021"
},
{
"code": null,
"e": 26744,
"s": 26627,
"text": "The map() function in p5.js is used to normalize a number having range from min1 to max1 in a range of min2 to max2."
},
{
"code": null,
"e": 26937,
... |
Python program to print hello world - GeeksforGeeks | 31 Aug, 2021
Prerequisite: Python Language Introduction, Python 3 basics
In this article, we will look into How to print “Hello World” in Python.
Here we will be using the python print() function for the same. The print() function in python is used to print python objects as strings as standard output.
The python print... | [
{
"code": null,
"e": 25537,
"s": 25509,
"text": "\n31 Aug, 2021"
},
{
"code": null,
"e": 25597,
"s": 25537,
"text": "Prerequisite: Python Language Introduction, Python 3 basics"
},
{
"code": null,
"e": 25670,
"s": 25597,
"text": "In this article, we will look ... |
JQuery escapeSelector() Method - GeeksforGeeks | 08 Jul, 2020
The escapeSelector() method in jQuery is used to escape CSS selectors which have special significant character or string. It can select the element of id(‘#ID1’, ‘#ID2’) and elements of class(‘.class1’, ‘.class2’). Let us understand it with the help of few examples.
Syntax:
jQuery.escapeSelector( selector ... | [
{
"code": null,
"e": 26954,
"s": 26926,
"text": "\n08 Jul, 2020"
},
{
"code": null,
"e": 27221,
"s": 26954,
"text": "The escapeSelector() method in jQuery is used to escape CSS selectors which have special significant character or string. It can select the element of id(‘#ID1’, ‘... |
Matplotlib.figure.Figure.set_constrained_layout() 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... |
An introduction to MultiLabel classification - GeeksforGeeks | 16 Jul, 2020
One of the most used capabilities of supervised machine learning techniques is for classifying content, employed in many contexts like telling if a given restaurant review is positive or negative or inferring if there is a cat or a dog on an image. This task may be divided into three domains, binary classi... | [
{
"code": null,
"e": 25871,
"s": 25843,
"text": "\n16 Jul, 2020"
},
{
"code": null,
"e": 26443,
"s": 25871,
"text": "One of the most used capabilities of supervised machine learning techniques is for classifying content, employed in many contexts like telling if a given restauran... |
Create a tuple from string and list - Python - GeeksforGeeks | 26 Nov, 2019
Sometimes, we can have a problem in which we need to construct a new container with elements from different containers. This kind of problem can occur in domains in which we use different types of data. Let’s discuss ways to convert string and list data to tuple.
Method #1 : Using List conversion to tuple ... | [
{
"code": null,
"e": 25537,
"s": 25509,
"text": "\n26 Nov, 2019"
},
{
"code": null,
"e": 25801,
"s": 25537,
"text": "Sometimes, we can have a problem in which we need to construct a new container with elements from different containers. This kind of problem can occur in domains i... |
Stack toArray() method in Java with Example - GeeksforGeeks | 24 Dec, 2018
The toArray() method of Stack class in Java is used to form an array of the same elements as that of the Stack. Basically, it copies all the element from a Stack to a new array.
Syntax:
Object[] arr = Stack.toArray()
Parameters: The method does not take any parameters.
Return Value: The method returns an a... | [
{
"code": null,
"e": 25363,
"s": 25335,
"text": "\n24 Dec, 2018"
},
{
"code": null,
"e": 25541,
"s": 25363,
"text": "The toArray() method of Stack class in Java is used to form an array of the same elements as that of the Stack. Basically, it copies all the element from a Stack t... |
Differentiate between LOC and Function Point in Software Engineering - GeeksforGeeks | 26 Apr, 2021
1. Lines of Code (LOC) :The line of code (LOC) metric is any line of text in a code that is not a comment or blank line, in any case of the number of statements or fragments of statements on the line. LOC clearly consists of all lines containing program header files, declaration of any variable, and execut... | [
{
"code": null,
"e": 26103,
"s": 26075,
"text": "\n26 Apr, 2021"
},
{
"code": null,
"e": 26645,
"s": 26103,
"text": "1. Lines of Code (LOC) :The line of code (LOC) metric is any line of text in a code that is not a comment or blank line, in any case of the number of statements or... |
Convert distance from km to meters and centimeters in PL/SQL - GeeksforGeeks | 15 Apr, 2021
Prerequisite – PL/SQL introduction In PL/SQL code groups of commands are arranged within a block. A block group related declarations or statements. In declare part, we declare variables and between begin and end part, we perform the operations.Given distance in kilometres and task is to convert it into met... | [
{
"code": null,
"e": 25537,
"s": 25509,
"text": "\n15 Apr, 2021"
},
{
"code": null,
"e": 25877,
"s": 25537,
"text": "Prerequisite – PL/SQL introduction In PL/SQL code groups of commands are arranged within a block. A block group related declarations or statements. In declare part... |
NFA to accept strings that has atleast one character occurring in a multiple of 3 - GeeksforGeeks | 21 Dec, 2021
Prerequisites: Finite AutomataGiven a string str consisting of characters a, b and c, check if the number of occurrences of any character in the string is a multiple of 3 or not.
Examples:
Input: str = bc Output: ACCEPTED Explanation: The string consists 0 a’s and 3 * 0 = 0.
Input: str = abccc Output: AC... | [
{
"code": null,
"e": 24405,
"s": 24377,
"text": "\n21 Dec, 2021"
},
{
"code": null,
"e": 24585,
"s": 24405,
"text": "Prerequisites: Finite AutomataGiven a string str consisting of characters a, b and c, check if the number of occurrences of any character in the string is a multip... |
AWT ComponentListener Interface | The class which processes the ComponentEvent should implement this interface.The object of that class must be registered with a component. The object can be registered using the addComponentListener() method. Component event are raised for information only.
Following is the declaration for java.awt.event.ComponentListe... | [
{
"code": null,
"e": 2005,
"s": 1747,
"text": "The class which processes the ComponentEvent should implement this interface.The object of that class must be registered with a component. The object can be registered using the addComponentListener() method. Component event are raised for information o... |
How to query Neo4j from Python: a quick introduction to Neo4j Driver and Cypher. | Towards Data Science | Neo4j is a graph database management system.
According to its website:
Neo4j is a native graph database, built from the ground up to leverage not only data but also data relationships. Neo4j connects data as it’s stored, enabling queries never before imagined, at speeds never thought possible.
In this article, we will ... | [
{
"code": null,
"e": 217,
"s": 172,
"text": "Neo4j is a graph database management system."
},
{
"code": null,
"e": 243,
"s": 217,
"text": "According to its website:"
},
{
"code": null,
"e": 467,
"s": 243,
"text": "Neo4j is a native graph database, built from t... |
Flow control in a try catch finally in Java | A method catches an exception using a combination of the try and catch keywords. A try/catch block is placed around the code that might generate an exception. Code within a try/catch block is referred to as protected code, and the syntax for using try/catch looks like the following −
try {
// Protected code
} catch ... | [
{
"code": null,
"e": 1347,
"s": 1062,
"text": "A method catches an exception using a combination of the try and catch keywords. A try/catch block is placed around the code that might generate an exception. Code within a try/catch block is referred to as protected code, and the syntax for using try/c... |
Add Comment Section in NextJS - GeeksforGeeks | 31 Oct, 2021
In this article, we are going to learn how we can add a Comment Section in NextJs. Using the comment section users can write their thoughts and queries in your NextJs app.
NextJS is a React-based framework. It has the power to Develop beautiful Web applications for different platforms like Windows, Linux,... | [
{
"code": null,
"e": 26557,
"s": 26529,
"text": "\n31 Oct, 2021"
},
{
"code": null,
"e": 26730,
"s": 26557,
"text": "In this article, we are going to learn how we can add a Comment Section in NextJs. Using the comment section users can write their thoughts and queries in your Nex... |
How to Create a Curve Text using CSS3/Canvas ? - GeeksforGeeks | 31 May, 2020
There are several methods to curve text in web technologies. The simplest ways are by using jQuery plugins and SVG, but we won’t be explaining that here, we will stick to the question and elucidate how to curve text using CSS3 and canvas. Let’s get started.
Curving Text using CSS3: This method is extremely... | [
{
"code": null,
"e": 25863,
"s": 25835,
"text": "\n31 May, 2020"
},
{
"code": null,
"e": 26121,
"s": 25863,
"text": "There are several methods to curve text in web technologies. The simplest ways are by using jQuery plugins and SVG, but we won’t be explaining that here, we will s... |
Python Program for Sum of squares of first n natural numbers | In this article, we will learn about the solution and approach to solve the given problem statement.
Given a positive integer N as input . We need to compute the value of 12 + 22 + 32 + ..... + N2.
Problem statement:This can be solved by two methods
Multiplication addition arithmetic
Using mathematical formula
Here we ... | [
{
"code": null,
"e": 1163,
"s": 1062,
"text": "In this article, we will learn about the solution and approach to solve the given problem statement."
},
{
"code": null,
"e": 1260,
"s": 1163,
"text": "Given a positive integer N as input . We need to compute the value of 12 + 22 + 3... |
VBA - DatePart Function | A Function, which returns the specific part of the given date.
DatePart(interval,date[,firstdayofweek[,firstweekofyear]])
Interval − A required parameter. It can take the following values.
d - day of the year.
m - month of the year
y - year of the year
yyyy - year
w - weekday
ww - week
q - quarter
h - hour
n - minut... | [
{
"code": null,
"e": 1998,
"s": 1935,
"text": "A Function, which returns the specific part of the given date."
},
{
"code": null,
"e": 2059,
"s": 1998,
"text": "DatePart(interval,date[,firstdayofweek[,firstweekofyear]]) \n"
},
{
"code": null,
"e": 2270,
"s": 2059,... |
Jenkins Events, Logs, and Metrics | by Shawn Stafford | Towards Data Science | How to collect information about Jenkins for analysis and data visualization
If you support a reasonably large Jenkins instance, or you support a large number of instances, you have probably been faced with a performance problem. Like many Continuous Integration (CI) applications, Jenkins works quite well at a small sc... | [
{
"code": null,
"e": 249,
"s": 172,
"text": "How to collect information about Jenkins for analysis and data visualization"
},
{
"code": null,
"e": 701,
"s": 249,
"text": "If you support a reasonably large Jenkins instance, or you support a large number of instances, you have prob... |
How to Create Dynamic Horizontal RecyclerView in Android using Firebase Realtime Database? - GeeksforGeeks | 24 Feb, 2021
HorizontalRecyclerView is seen in many apps. It is generally used to display the categories in most apps and websites. This type of RecyclerView is mostly seen in many E-commerce apps to indicate categories in the app. As we have already seen in Amazon Shopping App. So in this article, we will take a look ... | [
{
"code": null,
"e": 24749,
"s": 24721,
"text": "\n24 Feb, 2021"
},
{
"code": null,
"e": 25245,
"s": 24749,
"text": "HorizontalRecyclerView is seen in many apps. It is generally used to display the categories in most apps and websites. This type of RecyclerView is mostly seen in ... |
Boolean Type in Java | To display Boolean type, firstly take two variables and declare them as boolean.
boolean val1, val2;
Then one by one assign values to both of them, one of them is shown below −
val1 = true;
Now, use if statement to check and display the Boolean true value.
if(val1)
System.out.println("This is true and will get displaye... | [
{
"code": null,
"e": 1143,
"s": 1062,
"text": "To display Boolean type, firstly take two variables and declare them as boolean."
},
{
"code": null,
"e": 1163,
"s": 1143,
"text": "boolean val1, val2;"
},
{
"code": null,
"e": 1239,
"s": 1163,
"text": "Then one b... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.