title stringlengths 3 221 | text stringlengths 17 477k | parsed listlengths 0 3.17k |
|---|---|---|
C++ Regex Library - regex_iterator | It is an iterator type to iterate over different matches of a same regex pattern in a sequence.
Following is the declaration for std::regex_iterator.
emplate <class BidirectionalIterator,
class charT=typename iterator_traits<BidirectionalIterator>::value_type,
class traits=regex_traits<charT> > clas... | [
{
"code": null,
"e": 2699,
"s": 2603,
"text": "It is an iterator type to iterate over different matches of a same regex pattern in a sequence."
},
{
"code": null,
"e": 2753,
"s": 2699,
"text": "Following is the declaration for std::regex_iterator."
},
{
"code": null,
... |
AWK - Unary Operators | AWK supports the following unary operators −
It is represented by +. It multiplies a single operand by +1.
[jerry]$ awk 'BEGIN { a = -10; a = +a; print "a =", a }'
On executing this code, you get the following result −
a = -10
It is represented by -. It multiplies a single operand by -1.
[jerry]$ awk 'BEGIN { a = -10;... | [
{
"code": null,
"e": 1902,
"s": 1857,
"text": "AWK supports the following unary operators −"
},
{
"code": null,
"e": 1964,
"s": 1902,
"text": "It is represented by +. It multiplies a single operand by +1."
},
{
"code": null,
"e": 2021,
"s": 1964,
"text": "[jer... |
Neural Machine Translation with Python | by Susan Li | Towards Data Science | Machine translation, sometimes referred to by the abbreviation MT is a very challenge task that investigates the use of software to translate text or speech from one language to another. Traditionally, it involves large statistical models developed using highly sophisticated linguistic knowledge.
Here we are, we are go... | [
{
"code": null,
"e": 470,
"s": 172,
"text": "Machine translation, sometimes referred to by the abbreviation MT is a very challenge task that investigates the use of software to translate text or speech from one language to another. Traditionally, it involves large statistical models developed using ... |
Circuit (Combinational and Sequential) Implementation using Prolog - GeeksforGeeks | 31 May, 2021
Prerequisite – Prolog | An Introduction
Overview :Digital circuits or digital electronics is a branch of electronics which deals with digital signals to perform the various task to meet various requirement. The input signal applied to these circuits is of digital form, which is represented in 0’s and 1’s b... | [
{
"code": null,
"e": 24356,
"s": 24328,
"text": "\n31 May, 2021"
},
{
"code": null,
"e": 24396,
"s": 24356,
"text": "Prerequisite – Prolog | An Introduction"
},
{
"code": null,
"e": 25170,
"s": 24396,
"text": "Overview :Digital circuits or digital electronics ... |
How to display progress dialog before starting an activity in Android? | This example demonstrates how do I to display progress dialog before starting an activity 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" enco... | [
{
"code": null,
"e": 1164,
"s": 1062,
"text": "This example demonstrates how do I to display progress dialog before starting an activity in android."
},
{
"code": null,
"e": 1293,
"s": 1164,
"text": "Step 1 − Create a new project in Android Studio, go to File ⇒ New Project and fi... |
Routing in Node.js - GeeksforGeeks | 26 Jul, 2019
What is Routing?Routing defines the way in which the client requests are handled by the application endpoints.
Implementation of routing in Node.js: There are two ways to implement routing in node.js which are listed below:
By Using Framework
Without using Framework
Using Framework: Node has many framework... | [
{
"code": null,
"e": 24345,
"s": 24317,
"text": "\n26 Jul, 2019"
},
{
"code": null,
"e": 24456,
"s": 24345,
"text": "What is Routing?Routing defines the way in which the client requests are handled by the application endpoints."
},
{
"code": null,
"e": 24569,
"s":... |
ASP.NET MVC - Web API | ASP.NET Web API is a framework that makes it easy to build HTTP services that reach a broad range of clients, including browsers and mobile devices. ASP.NET Web API is an ideal platform for building RESTful applications on the .NET Framework.
When you're building APIs on the Web, there are several ways you can build AP... | [
{
"code": null,
"e": 2512,
"s": 2269,
"text": "ASP.NET Web API is a framework that makes it easy to build HTTP services that reach a broad range of clients, including browsers and mobile devices. ASP.NET Web API is an ideal platform for building RESTful applications on the .NET Framework."
},
{
... |
Count Uppercase, Lowercase, special character and numeric values - GeeksforGeeks | 11 Mar, 2022
Given a string, write a program to count the occurrence of Lowercase characters, Uppercase characters, Special characters, and Numeric values. Examples:
Input : #GeeKs01fOr@gEEks07
Output :
Upper case letters : 5
Lower case letters : 8
Numbers : 4
Special Characters : 2
Input : *GeEkS4GeEkS*
Output :
U... | [
{
"code": null,
"e": 24793,
"s": 24765,
"text": "\n11 Mar, 2022"
},
{
"code": null,
"e": 24948,
"s": 24793,
"text": "Given a string, write a program to count the occurrence of Lowercase characters, Uppercase characters, Special characters, and Numeric values. Examples: "
},
... |
Different ways of accessing array elements in C++ - GeeksforGeeks | 27 May, 2021
In this article, two unique and different ways of accessing an element from an array rather than the conventional arr[i] expression are discussed below.
Using pointer *(arr+1)
Using a little manipulation i[arr] for using arrays and the reason behind that.
When a C++ program is compiled, a symbol table is g... | [
{
"code": null,
"e": 24485,
"s": 24457,
"text": "\n27 May, 2021"
},
{
"code": null,
"e": 24638,
"s": 24485,
"text": "In this article, two unique and different ways of accessing an element from an array rather than the conventional arr[i] expression are discussed below."
},
{
... |
Check if the given string is linear or not - GeeksforGeeks | 11 May, 2021
Given string str, the task is to check whether the given string is linear or not. If it is linear then print “Yes” else print “No”.
Let the string be “abcdefghij”. It can be broken as: “a” “bc” “def” “ghij” if the character a, b, c, and are equal then the given string is linear otherwise not. Therefore i... | [
{
"code": null,
"e": 24927,
"s": 24899,
"text": "\n11 May, 2021"
},
{
"code": null,
"e": 25061,
"s": 24927,
"text": "Given string str, the task is to check whether the given string is linear or not. If it is linear then print “Yes” else print “No”. "
},
{
"code": null,
... |
Bayesian Linear Regression in Python via PyMC3 | by Dr. Robert Kübler | Towards Data Science | In this article, we will see how to conduct Bayesian linear regression with PyMC3. If you got here without knowing what Bayes or PyMC3 is, don’t worry! You can use my articles as a primer
A gentle Introduction to Bayesian Inference
Conducting Bayesian Inference in Python using PyMC3
You can view Bayesian linear regress... | [
{
"code": null,
"e": 360,
"s": 172,
"text": "In this article, we will see how to conduct Bayesian linear regression with PyMC3. If you got here without knowing what Bayes or PyMC3 is, don’t worry! You can use my articles as a primer"
},
{
"code": null,
"e": 404,
"s": 360,
"text":... |
C++ Program to Find Quotient and Remainder | Quotient and Remainder are parts of division along with dividend and divisor.
The number which we divide is known as the dividend. The number which divides the dividend is known as the divisor. The result obtained after the division is known as the quotient and the number left over is the remainder.
dividend = divisor ... | [
{
"code": null,
"e": 1140,
"s": 1062,
"text": "Quotient and Remainder are parts of division along with dividend and divisor."
},
{
"code": null,
"e": 1363,
"s": 1140,
"text": "The number which we divide is known as the dividend. The number which divides the dividend is known as t... |
How to click on <input type=file> across browsers using Selenium Webdriver? | We can click on a button with <input type= file> across browsers with Selenium webdriver. First of all we need to identify the element with the help of locators like xpath or css, then apply sendKeys() method where the path of the file to be uploaded is passed.
Let us see the html code of an element with input type as ... | [
{
"code": null,
"e": 1324,
"s": 1062,
"text": "We can click on a button with <input type= file> across browsers with Selenium webdriver. First of all we need to identify the element with the help of locators like xpath or css, then apply sendKeys() method where the path of the file to be uploaded is... |
How to implement Email Registration and Login using Firebase in React? - GeeksforGeeks | 28 Dec, 2020
When building a full-stack application we sometimes want to do build the authentication part quickly without writing much code, then there comes Firebase to our rescue which offers multiple authentication methods like Email-Password, Google, Facebook, etc.
Following are the steps which cover how to authent... | [
{
"code": null,
"e": 25218,
"s": 25190,
"text": "\n28 Dec, 2020"
},
{
"code": null,
"e": 25475,
"s": 25218,
"text": "When building a full-stack application we sometimes want to do build the authentication part quickly without writing much code, then there comes Firebase to our re... |
Unique Paths in Python | Suppose there is a robot is located at the top-left corner of a n x m grid (n rows and m columns). The robot can only move either down side or right side at any point in time. The robot wants to reach the bottom-right corner of the grid (marked 'END in the diagram below). So we have to find how many possible unique pat... | [
{
"code": null,
"e": 1463,
"s": 1062,
"text": "Suppose there is a robot is located at the top-left corner of a n x m grid (n rows and m columns). The robot can only move either down side or right side at any point in time. The robot wants to reach the bottom-right corner of the grid (marked 'END in ... |
Find Itinerary from a given list of tickets - GeeksforGeeks | 28 Feb, 2022
Given a list of tickets, find itinerary in order using the given list.Example:
Input:
"Chennai" -> "Banglore"
"Bombay" -> "Delhi"
"Goa" -> "Chennai"
"Delhi" -> "Goa"
Output:
Bombay->Delhi, Delhi->Goa, Goa->Chennai, Chennai->Banglore,
It may be assumed that the input list of tickets is not cyclic an... | [
{
"code": null,
"e": 25158,
"s": 25130,
"text": "\n28 Feb, 2022"
},
{
"code": null,
"e": 25239,
"s": 25158,
"text": "Given a list of tickets, find itinerary in order using the given list.Example: "
},
{
"code": null,
"e": 25400,
"s": 25239,
"text": "Input:\n\... |
Python | os.link() method - GeeksforGeeks | 02 Mar, 2021
OS module in Python provides functions for interacting with the operating system. OS comes under Python’s standard utility modules. This module provides a portable way of using operating system-dependent functionality.os.link() method in Python is used to create a hard link. This method creates a hard link... | [
{
"code": null,
"e": 23901,
"s": 23873,
"text": "\n02 Mar, 2021"
},
{
"code": null,
"e": 24311,
"s": 23901,
"text": "OS module in Python provides functions for interacting with the operating system. OS comes under Python’s standard utility modules. This module provides a portable... |
Count number of columns of a Pandas DataFrame - GeeksforGeeks | 26 Jul, 2020
Let’s discuss how to count the number of columns of a Pandas DataFrame. Lets first make a dataframe.
Example:
Python3
# Import Required Librariesimport pandas as pdimport numpy as np # Create a dictionary for the dataframedict = {'Name': ['Sukritin', 'Sumit Tyagi', 'Akriti Goel', 'Sanskrit... | [
{
"code": null,
"e": 24653,
"s": 24625,
"text": "\n26 Jul, 2020"
},
{
"code": null,
"e": 24754,
"s": 24653,
"text": "Let’s discuss how to count the number of columns of a Pandas DataFrame. Lets first make a dataframe."
},
{
"code": null,
"e": 24763,
"s": 24754,
... |
How to Perform Exploratory Data Analysis with Seaborn | by Lorraine Li | Towards Data Science | Exploratory Data Analysis (EDA) is an approach to analyzing datasets to summarize their main characteristics. It is used to understand data, get some context regarding it, understand the variables and the relationships between them, and formulate hypotheses that could be useful when building predictive models.
All data... | [
{
"code": null,
"e": 484,
"s": 172,
"text": "Exploratory Data Analysis (EDA) is an approach to analyzing datasets to summarize their main characteristics. It is used to understand data, get some context regarding it, understand the variables and the relationships between them, and formulate hypothes... |
What happens when a subclass object is assigned to a superclass object in Java? | Converting one data type to others in Java is known as casting.
If you convert a higher datatype to lower datatype, it is known as narrowing (assigning higher data type value to the lower data type variable).
If you convert a higher datatype to lower datatype, it is known as narrowing (assigning higher data type value ... | [
{
"code": null,
"e": 1126,
"s": 1062,
"text": "Converting one data type to others in Java is known as casting."
},
{
"code": null,
"e": 1271,
"s": 1126,
"text": "If you convert a higher datatype to lower datatype, it is known as narrowing (assigning higher data type value to the ... |
An intuitive explanation of Self Attention | by Saketh Kotamraju | Towards Data Science | In this article, I am going to explain everything you need to know about self-attention.
What do transformer neural networks contain that make them so much more powerful and better performing than regular recurrent neural networks?
Answer: They use the Multi-headed Self Attention block to give the word embedding inputs... | [
{
"code": null,
"e": 260,
"s": 171,
"text": "In this article, I am going to explain everything you need to know about self-attention."
},
{
"code": null,
"e": 403,
"s": 260,
"text": "What do transformer neural networks contain that make them so much more powerful and better perfo... |
How do we compare two tuples in Python? | Tuples are compared position by position: the first item of the first tuple is compared to the first item of the second tuple; if they are not equal, this is the result of the comparison, else the second item is considered, then the third and so on.
>>> a = (1, 2, 3)
>>> b = (1, 2, 5)
>>> a < b
True
There is another t... | [
{
"code": null,
"e": 1313,
"s": 1062,
"text": "Tuples are compared position by position: the first item of the first tuple is compared to the first item of the second tuple; if they are not equal, this is the result of the comparison, else the second item is considered, then the third and so on. "
... |
EmberJS - Creating and Running Application | You can easily configure the Ember.js in your system. The installation of Ember.js is explained in the EmberJS Installation chapter.
Let us create one simple app using Ember.js. First create one folder where you create your applications. For instance, if you have created the "emberjs-app" folder, then navigate to this ... | [
{
"code": null,
"e": 2031,
"s": 1898,
"text": "You can easily configure the Ember.js in your system. The installation of Ember.js is explained in the EmberJS Installation chapter."
},
{
"code": null,
"e": 2230,
"s": 2031,
"text": "Let us create one simple app using Ember.js. Firs... |
Concept of Callable Classes in Dart - GeeksforGeeks | 20 Jul, 2020
Dart allows the user to create a callable class which allows the instance of the class to be called as a function. To allow an instance of your Dart class to be called like a function, implement the call() method.
Syntax:
class class_name {
... // class content
return_type call ( parameters ) {
... | [
{
"code": null,
"e": 24010,
"s": 23982,
"text": "\n20 Jul, 2020"
},
{
"code": null,
"e": 24225,
"s": 24010,
"text": "Dart allows the user to create a callable class which allows the instance of the class to be called as a function. To allow an instance of your Dart class to be ca... |
Perl read Function | This function reads, or attempts to read, LENGTH number of bytes from the file associated with FILEHANDLE into BUFFER. If an offset is specified, the bytes that are read are placed into the buffer starting at the specified offset.
Following is the simple syntax for this function −
read FILEHANDLE, SCALAR, LENGTH, OFFSE... | [
{
"code": null,
"e": 2451,
"s": 2220,
"text": "This function reads, or attempts to read, LENGTH number of bytes from the file associated with FILEHANDLE into BUFFER. If an offset is specified, the bytes that are read are placed into the buffer starting at the specified offset."
},
{
"code": ... |
One-Dimensional Tensor in Pytorch - GeeksforGeeks | 29 Jun, 2021
In this article, we are going to discuss a one-dimensional tensor in Python. We will look into the following concepts:
Creation of One-Dimensional TensorsAccessing Elements of TensorSize of TensorData Types of Elements of TensorsView of TensorFloating Point Tensor
Creation of One-Dimensional Tensors
Access... | [
{
"code": null,
"e": 24292,
"s": 24264,
"text": "\n29 Jun, 2021"
},
{
"code": null,
"e": 24411,
"s": 24292,
"text": "In this article, we are going to discuss a one-dimensional tensor in Python. We will look into the following concepts:"
},
{
"code": null,
"e": 24557,
... |
gcov - Unix, Linux Command | Profiling tools help you analyze your code’s performance. Using a
profiler such as gcov or gprof, you can find out some
basic performance statistics, such as:
Software developers also use coverage testing in concert with
testsuites, to make sure software is actually good enough for a release.
Testsuites can verify t... | [
{
"code": null,
"e": 10739,
"s": 10577,
"text": "\nProfiling tools help you analyze your code’s performance. Using a\nprofiler such as gcov or gprof, you can find out some\nbasic performance statistics, such as:\n"
},
{
"code": null,
"e": 11168,
"s": 10739,
"text": "\nSoftware d... |
Comments in Java | 25 May, 2022
In a program, comments are like indents one makes, they are used so that it is easier for someone who isn’t familiar with the language to be able to understand the code. It will also make the job easier for you, as a coder, to find errors in the code since you will be easily able to find the location of th... | [
{
"code": null,
"e": 53,
"s": 25,
"text": "\n25 May, 2022"
},
{
"code": null,
"e": 537,
"s": 53,
"text": "In a program, comments are like indents one makes, they are used so that it is easier for someone who isn’t familiar with the language to be able to understand the code. It w... |
C++ Program to Print Cross or X Pattern | 04 Jun, 2022
Given a number n, we need to print a X pattern of size n.
Input : n = 3
Output :
$ $
$
$ $
Input : n = 5
Output :
$ $
$ $
$
$ $
$ $
Input : n = 4
Output :
$ $
$$
$$
$ $
We need to print n rows and n columns. So we run two nested loops. The outer loop prints all rows one by one (run... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n04 Jun, 2022"
},
{
"code": null,
"e": 110,
"s": 52,
"text": "Given a number n, we need to print a X pattern of size n."
},
{
"code": null,
"e": 246,
"s": 110,
"text": "Input : n = 3\nOutput : \n$ $\n $ \n$ $\n\nInpu... |
Find elements of original array from doubled array | 22 Dec, 2021
Given an array arr[] of 2*N integers such that it consists of all elements along with the twice values of another array, say A[], the task is to find the array A[].
Examples:
Input: arr[] = {4, 1, 18, 2, 9, 8}Output: 1 4 9Explanation:After taking double values of 1, 4, and 9 then adding them to the origina... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n22 Dec, 2021"
},
{
"code": null,
"e": 217,
"s": 52,
"text": "Given an array arr[] of 2*N integers such that it consists of all elements along with the twice values of another array, say A[], the task is to find the array A[]."
},
{... |
help Command in Linux with examples | 18 Feb, 2021
If you are new to LINUX operating system and having trouble dealing with the command-line utilities provided by LINUX then you really need to know first of all about the help command which as its name says help you to learn about any built-in command.help command as told before just displays information ab... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n18 Feb, 2021"
},
{
"code": null,
"e": 414,
"s": 52,
"text": "If you are new to LINUX operating system and having trouble dealing with the command-line utilities provided by LINUX then you really need to know first of all about the help... |
How To Manually Specify Colors for Barplot in ggplot2 in R? | 21 Dec, 2021
In this article, we will discuss how to manually specify colors for Barplot in ggplot2 in R Programming Language.
To specify colors of the bar in Barplot in ggplot2, we use the scale_fill_manual function of the ggplot2 package. Within this function, we need to specify a color for each of the bars as a vect... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n21 Dec, 2021"
},
{
"code": null,
"e": 142,
"s": 28,
"text": "In this article, we will discuss how to manually specify colors for Barplot in ggplot2 in R Programming Language."
},
{
"code": null,
"e": 391,
"s": 142,
"... |
How to export our DataGrid as CSV in ReactJS ? | 26 Apr, 2021
GridToolbarExport Component allows the user to export the displayed data to CSV with an extra API call. Material UI for React has this component available for us, and it is very easy to integrate. We can use the following approach in ReactJS to export our DataGrid as CSV in ReactJS.
Approach: Follow these ... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n26 Apr, 2021"
},
{
"code": null,
"e": 312,
"s": 28,
"text": "GridToolbarExport Component allows the user to export the displayed data to CSV with an extra API call. Material UI for React has this component available for us, and it is ve... |
Replacing ‘public’ with ‘private’ in “main” in Java | 21 Aug, 2018
Consider following Java program:
class GFG { public static void main(String args[]) { System.out.println("GeeksforGeeks"); }}
GeeksforGeeks
Explanation:1)public: It is an access specifier which allows the JVM(Java Virtual Machine) to access the main method from anywhere.2)static: static key... | [
{
"code": null,
"e": 54,
"s": 26,
"text": "\n21 Aug, 2018"
},
{
"code": null,
"e": 87,
"s": 54,
"text": "Consider following Java program:"
},
{
"code": "class GFG { public static void main(String args[]) { System.out.println(\"GeeksforGeeks\"); }}",
"e... |
numpy.add() in Python | 28 Nov, 2018
numpy.add() function is used when we want to compute the addition of two array. It add arguments element-wise. If shape of two arrays are not same, that is arr1.shape != arr2.shape, they must be broadcastable to a common shape (which may be the shape of one or the other).
Syntax : numpy.add(arr1, arr2, /, ... | [
{
"code": null,
"e": 54,
"s": 26,
"text": "\n28 Nov, 2018"
},
{
"code": null,
"e": 327,
"s": 54,
"text": "numpy.add() function is used when we want to compute the addition of two array. It add arguments element-wise. If shape of two arrays are not same, that is arr1.shape != arr2... |
Flutter – FlutterLogo Widget | 06 Aug, 2021
FlutterLogo widget is as simple as it sounds, it is just the flutter logo in the form of an icon. This widget also comes built-in with flutter SDK. This widget can found its use as a placeholder for an image or icon. Below we will see its implementation with all its properties and constructor.
const Flutte... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n06 Aug, 2021"
},
{
"code": null,
"e": 347,
"s": 52,
"text": "FlutterLogo widget is as simple as it sounds, it is just the flutter logo in the form of an icon. This widget also comes built-in with flutter SDK. This widget can found its ... |
Math.Atan() Method in C# | The Math.Atan() method in C# is used to return the angle whose tan is the specified number. The number is a double value argument. The method returns an angle, θ, measured in radians, such that -Π/2 ≤θ≤Π/2.
Following is the syntax −
public static double Atan(double num)
Let us now see an example to implement the Math.A... | [
{
"code": null,
"e": 1269,
"s": 1062,
"text": "The Math.Atan() method in C# is used to return the angle whose tan is the specified number. The number is a double value argument. The method returns an angle, θ, measured in radians, such that -Π/2 ≤θ≤Π/2."
},
{
"code": null,
"e": 1295,
... |
How to write a common title for par(mfrow) plots in R? | We can create multiple plots using par(mfrow) on a single plot window in R. It might be possible that all of these plots are different or same as well. Irrespective of the type of plots, we can give a common title to all the plots. This can be a situation where we want to show, say, scatterplots, and histograms of few ... | [
{
"code": null,
"e": 1564,
"s": 1062,
"text": "We can create multiple plots using par(mfrow) on a single plot window in R. It might be possible that all of these plots are different or same as well. Irrespective of the type of plots, we can give a common title to all the plots. This can be a situati... |
Comparing the Five Most Popular EDA Tools | by Saad Ahmad | Towards Data Science | Exploratory Data Analysis (EDA) is an integral part of any data science project. In simpler terms, it could be referred to as the “detective work” necessary to understand a dataset. These initial investigations lead to the discovery of non-obvious trends and anomalies, leading to enhanced understanding of the data at h... | [
{
"code": null,
"e": 715,
"s": 172,
"text": "Exploratory Data Analysis (EDA) is an integral part of any data science project. In simpler terms, it could be referred to as the “detective work” necessary to understand a dataset. These initial investigations lead to the discovery of non-obvious trends ... |
Redirection in PHP | The header function in PHP can be used to redirect the user from one page to another. It is an in-built function that sends raw HTTP header to the destination (client).
Syntax of header function
header( $header_value, $replace_value, $http_response_code)
Following are the parameters −
The ‘header_value’ in the function... | [
{
"code": null,
"e": 1231,
"s": 1062,
"text": "The header function in PHP can be used to redirect the user from one page to another. It is an in-built function that sends raw HTTP header to the destination (client)."
},
{
"code": null,
"e": 1257,
"s": 1231,
"text": "Syntax of hea... |
CakePHP - Errors & Exception Handling | Failure of system needs to be handled effectively for smooth running of the system. CakePHP comes with default error trapping, that prints and logs error as they occur. This same error handler is used to catch Exceptions.
Error handler displays errors, when debug is true and logs error, when debug is false. CakePHP has... | [
{
"code": null,
"e": 2464,
"s": 2242,
"text": "Failure of system needs to be handled effectively for smooth running of the system. CakePHP comes with default error trapping, that prints and logs error as they occur. This same error handler is used to catch Exceptions."
},
{
"code": null,
... |
Subtracting a number from a single MySQL column value? | For this, just update the table and subtract. Let us first create a table −
mysql> create table DemoTable1372
-> (
-> Value int
-> );
Query OK, 0 rows affected (0.77 sec)
Insert some records in the table using insert command −
mysql> insert into DemoTable1372 values(500);
Query OK, 1 row affected (0.13 sec)
my... | [
{
"code": null,
"e": 1138,
"s": 1062,
"text": "For this, just update the table and subtract. Let us first create a table −"
},
{
"code": null,
"e": 1242,
"s": 1138,
"text": "mysql> create table DemoTable1372\n -> (\n -> Value int\n -> );\nQuery OK, 0 rows affected (0.77 sec... |
Perl wait Function | This function Waits for a child process to terminate, returning the process ID of the deceased process. The exit status of the process is contained in $?.
Following is the simple syntax for this function −
wait
This function returns -1 if there are no child processes else the Process ID of deceased process
46 Lec... | [
{
"code": null,
"e": 2375,
"s": 2220,
"text": "This function Waits for a child process to terminate, returning the process ID of the deceased process. The exit status of the process is contained in $?."
},
{
"code": null,
"e": 2426,
"s": 2375,
"text": "Following is the simple syn... |
Pass by reference vs value in Python | All parameters (arguments) in the Python language are passed by reference. It means if you change what a parameter refers to within a function, the change also reflects back in the calling function.
Live Demo
#!/usr/bin/python
# Function definition is here
def changeme( mylist ):
"This changes a passed list into this ... | [
{
"code": null,
"e": 1261,
"s": 1062,
"text": "All parameters (arguments) in the Python language are passed by reference. It means if you change what a parameter refers to within a function, the change also reflects back in the calling function."
},
{
"code": null,
"e": 1272,
"s": 12... |
An Easy Beginner’s Guide to Git Part 1 | by Julia Kho | Towards Data Science | If you’re new to coding, you’re definitely going to want to learn about Git!
Git is a distributed version control software that basically allows multiple people to work in parallel and it saves a history of all changes made. This will help ensure that there are no code conflicts as well as allow developers the ability ... | [
{
"code": null,
"e": 248,
"s": 171,
"text": "If you’re new to coding, you’re definitely going to want to learn about Git!"
},
{
"code": null,
"e": 568,
"s": 248,
"text": "Git is a distributed version control software that basically allows multiple people to work in parallel and i... |
Maximum edge removal from tree to make even forest - GeeksforGeeks | 22 Jun, 2021
Given an undirected tree which has even number of vertices, we need to remove the maximum number of edges from this tree such that each connected component of the resultant forest has an even number of vertices.
Examples:
In above shown tree, we can remove at max 2
edges 0-2 and 0-4 shown in red such th... | [
{
"code": null,
"e": 24947,
"s": 24919,
"text": "\n22 Jun, 2021"
},
{
"code": null,
"e": 25160,
"s": 24947,
"text": "Given an undirected tree which has even number of vertices, we need to remove the maximum number of edges from this tree such that each connected component of the ... |
numpy.flip() in Python - GeeksforGeeks | 09 Mar, 2022
The numpy.flip() function reverses the order of array elements along the specified axis, preserving the shape of the array.
Syntax: numpy.flip(array, axis)
Parameters :
array : [array_like]Array to be input
axis : [integer]axis along which array
is reversed.
Returns :
reversed array with shap... | [
{
"code": null,
"e": 23923,
"s": 23895,
"text": "\n09 Mar, 2022"
},
{
"code": null,
"e": 24048,
"s": 23923,
"text": "The numpy.flip() function reverses the order of array elements along the specified axis, preserving the shape of the array. "
},
{
"code": null,
"e": 2... |
Deletion in a Binary Tree | Practice | GeeksforGeeks | Given a Binary Tree of size N, your task is to complete the function deletionBT(), that should delete a given node from the tree by making sure that tree shrinks from the bottom (the deleted node is replaced by bottommost and rightmost node).
Example:
Your Task:
You don't have to take input. Complete the function dele... | [
{
"code": null,
"e": 490,
"s": 238,
"text": "Given a Binary Tree of size N, your task is to complete the function deletionBT(), that should delete a given node from the tree by making sure that tree shrinks from the bottom (the deleted node is replaced by bottommost and rightmost node).\nExample:"
... |
EmberJS - Installation | It is easy to configure Ember.js in your system. By using the Ember CLI (Command Line Interface) utility, you can create and manage your Ember projects. The Ember CLI deals with different kinds of application asset management such as concatenation, minification and versioning and also provide generators to produce comp... | [
{
"code": null,
"e": 2238,
"s": 1898,
"text": "It is easy to configure Ember.js in your system. By using the Ember CLI (Command Line Interface) utility, you can create and manage your Ember projects. The Ember CLI deals with different kinds of application asset management such as concatenation, mini... |
How to sum all elements in a nested array? JavaScript | Let’s say, we are supposed to write a function that takes in a nested array of Numbers and returns the sum of all the numbers. We are required to do this without using the Array.prototype.flat() method.
Let’s write the code for this function −
const arr = [
5,
7,
[ 4, [2], 8, [1,3], 2 ],
[ 9, [] ],
1,
... | [
{
"code": null,
"e": 1265,
"s": 1062,
"text": "Let’s say, we are supposed to write a function that takes in a nested array of Numbers and returns the sum of all the numbers. We are required to do this without using the Array.prototype.flat() method."
},
{
"code": null,
"e": 1306,
"s"... |
PyQt5 - Set background color to view part of ComboBox - GeeksforGeeks | 04 May, 2020
In this article we will see how we can set background color to the view part of the combo box. View part is basically drop down item list, which shows all the available items, we have get the view object with the help of view method, by default combo box uses QListView object. Below is the representation o... | [
{
"code": null,
"e": 24888,
"s": 24860,
"text": "\n04 May, 2020"
},
{
"code": null,
"e": 25238,
"s": 24888,
"text": "In this article we will see how we can set background color to the view part of the combo box. View part is basically drop down item list, which shows all the avai... |
8 Ways to Transform Pandas Dataframes | by Soner Yıldırım | Towards Data Science | Pandas is a data analysis and manipulation library for Python. The core data structure of Pandas is dataframe which stores data in tabular form with labelled rows and columns.
Pandas provides a variety of functions to modify or manipulate its core structure. In this article, we will go over 8 different ways of transfor... | [
{
"code": null,
"e": 347,
"s": 171,
"text": "Pandas is a data analysis and manipulation library for Python. The core data structure of Pandas is dataframe which stores data in tabular form with labelled rows and columns."
},
{
"code": null,
"e": 508,
"s": 347,
"text": "Pandas pro... |
How can I disable/enable GPS programmatically in android? | This example demonstrates how do I disable/enable GPS programmatically 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"?>
<Rel... | [
{
"code": null,
"e": 1145,
"s": 1062,
"text": "This example demonstrates how do I disable/enable GPS programmatically in android."
},
{
"code": null,
"e": 1274,
"s": 1145,
"text": "Step 1 − Create a new project in Android Studio, go to File ⇒ New Project and fill all required det... |
Objective-C Blocks | An Objective-C class defines an object that combines data with related behavior. Sometimes, it makes sense just to represent a single task or unit of behavior, rather than a collection of methods.
Blocks are a language-level feature added to C, Objective-C and C++ which allow you to create distinct segments of code tha... | [
{
"code": null,
"e": 2757,
"s": 2560,
"text": "An Objective-C class defines an object that combines data with related behavior. Sometimes, it makes sense just to represent a single task or unit of behavior, rather than a collection of methods."
},
{
"code": null,
"e": 3202,
"s": 2757... |
Prototype and AJAX Tutorial | AJAX stands for Asynchronous JavaScript and XML. AJAX is a new technique for creating better, faster, and more interactive web applications with the help of XML, HTML, CSS and Java Script.
For a complete understanding on AJAX, please go through our simple AJAX Tutorial.
Prototype framework enables you to deal with Ajax... | [
{
"code": null,
"e": 2250,
"s": 2061,
"text": "AJAX stands for Asynchronous JavaScript and XML. AJAX is a new technique for creating better, faster, and more interactive web applications with the help of XML, HTML, CSS and Java Script."
},
{
"code": null,
"e": 2332,
"s": 2250,
"t... |
How to count the total number of frames in Selenium with python? | We can count the total number of frames in a page in Selenium with the help of find_elements method. While working on frames, we will always find the tagname in the html code and its value should be frame/iframe.
This characteristic is only applicable to frames on that particular page and to no other types of UI elemen... | [
{
"code": null,
"e": 1275,
"s": 1062,
"text": "We can count the total number of frames in a page in Selenium with the help of find_elements method. While working on frames, we will always find the tagname in the html code and its value should be frame/iframe."
},
{
"code": null,
"e": 141... |
Kotlin - Visibility Control (Modifiers) | The Kotlin visibility modifiers are the keywords that set the visibility of classes, objects, interface, constructors, functions as well as properties and their setters. Though getters always have the same visibility as their properties, so we can not set their visibility.
There are four visibility modifiers in Kotlin... | [
{
"code": null,
"e": 2700,
"s": 2425,
"text": "The Kotlin visibility modifiers are the keywords that set the visibility of classes, objects, interface, constructors, functions as well as properties and their setters. Though getters always have the same visibility as their properties, so we can not ... |
A Detailed, Novice Introduction to Natural Language Processing (NLP) | by Rahulraj Singh | Towards Data Science | Language is the most important medium of communication we use. It encompasses both geographical and intellectual boundaries. Research suggests that processing natural spoken or written dialect can be useful in a variety of businesses ranging from search autocompletion/autocorrection, translation, social media monitorin... | [
{
"code": null,
"e": 850,
"s": 172,
"text": "Language is the most important medium of communication we use. It encompasses both geographical and intellectual boundaries. Research suggests that processing natural spoken or written dialect can be useful in a variety of businesses ranging from search a... |
Dissecting Stockfish Part 2: In-Depth Look at a chess engine | by Antoine Champion | Towards Data Science | The first part of this series demonstrates how Stockfish abstracts a chess position and how it quickly finds every possible move. Now, the engine must evaluate the quality of a move in order to pick the best one.
In the past, Stockfish only relied on a set of fixed rules that are algorithmic translations of chess conce... | [
{
"code": null,
"e": 384,
"s": 171,
"text": "The first part of this series demonstrates how Stockfish abstracts a chess position and how it quickly finds every possible move. Now, the engine must evaluate the quality of a move in order to pick the best one."
},
{
"code": null,
"e": 826,
... |
Python | Morphological Operations in Image Processing (Opening) | Set-1 - GeeksforGeeks | 19 Oct, 2021
Morphological operations are used to extract image components that are useful in the representation and description of region shape. Morphological operations are some basic tasks dependent on the picture shape. It is typically performed on binary images. It needs two data sources, one is the input image, t... | [
{
"code": null,
"e": 24611,
"s": 24583,
"text": "\n19 Oct, 2021"
},
{
"code": null,
"e": 25740,
"s": 24611,
"text": "Morphological operations are used to extract image components that are useful in the representation and description of region shape. Morphological operations are s... |
How to Translate PDF with Python (Google vs AWS Translate) — Part 1: extract and translate text | by Agnese Kapnere | Towards Data Science | I needed to translate a PDF file containing text from English to Latvian. It turned out to be slightly more challenging than I initially thought, so I decided to write a tutorial to share what I learned and hopefully save some time for you. I have split my project into two parts.
This article is part one, and it focuse... | [
{
"code": null,
"e": 453,
"s": 172,
"text": "I needed to translate a PDF file containing text from English to Latvian. It turned out to be slightly more challenging than I initially thought, so I decided to write a tutorial to share what I learned and hopefully save some time for you. I have split m... |
Change color of button in Python - Tkinter - GeeksforGeeks | 23 Dec, 2020
Prerequisite: Creating a button in tkinter, Python GUI – tkinter
In this article, we are going to write a Python script to change the color of the button in Tkinter. It can be done with two methods:
Using bg properties.
Using activebackground properties.
Example 1: using bg properties.
We can change the bu... | [
{
"code": null,
"e": 24292,
"s": 24264,
"text": "\n23 Dec, 2020"
},
{
"code": null,
"e": 24357,
"s": 24292,
"text": "Prerequisite: Creating a button in tkinter, Python GUI – tkinter"
},
{
"code": null,
"e": 24491,
"s": 24357,
"text": "In this article, we are g... |
Algorithms | Analysis of Algorithms | Question 19 - GeeksforGeeks | 28 Jun, 2021
Consider the following two functions. What are time complexities of the functions?
int fun1(int n){ if (n <= 1) return n; return 2*fun1(n-1);}
int fun2(int n){ if (n <= 1) return n; return fun2(n-1) + fun2(n-1);}
(A) O(2^n) for both fun1() and fun2()(B) O(n) for fun1() and O(2^n) for fun2()(C) ... | [
{
"code": null,
"e": 24986,
"s": 24958,
"text": "\n28 Jun, 2021"
},
{
"code": null,
"e": 25069,
"s": 24986,
"text": "Consider the following two functions. What are time complexities of the functions?"
},
{
"code": "int fun1(int n){ if (n <= 1) return n; return 2*fun... |
Python Number choice() Method | Python number method choice() returns a random item from a list, tuple, or string.
Following is the syntax for choice() method −
choice( seq )
Note − This function is not accessible directly, so we need to import random module and then we need to call this function using random static object.
seq − This could be a li... | [
{
"code": null,
"e": 2328,
"s": 2244,
"text": "Python number method choice() returns a random item from a list, tuple, or string."
},
{
"code": null,
"e": 2374,
"s": 2328,
"text": "Following is the syntax for choice() method −"
},
{
"code": null,
"e": 2389,
"s": ... |
Print all subsets of given size of a set in C++ | In this problem, we are given an array and we have to print all the subset of a given size r that can be formed using the element of the array.
Let’s take an example to understand the topic better −
Input:
array = {3, 5, 6}
r = 2
Output:
3 5
3 6
5 6
In this problem, we will have to find all the combinations of the numb... | [
{
"code": null,
"e": 1206,
"s": 1062,
"text": "In this problem, we are given an array and we have to print all the subset of a given size r that can be formed using the element of the array."
},
{
"code": null,
"e": 1261,
"s": 1206,
"text": "Let’s take an example to understand th... |
How to visualize 95% confidence interval in Matplotlib? | To visualize 95% confidence interval in Matplotlib, we can take the following steps −
Set the figure size and adjust the padding between and around the subplots.
Set the figure size and adjust the padding between and around the subplots.
Create x and y data sets.
Create x and y data sets.
Get the confidence interval da... | [
{
"code": null,
"e": 1148,
"s": 1062,
"text": "To visualize 95% confidence interval in Matplotlib, we can take the following steps −"
},
{
"code": null,
"e": 1224,
"s": 1148,
"text": "Set the figure size and adjust the padding between and around the subplots."
},
{
"code"... |
How to find a number using Pythagoras Theorem using C#? | Firstly, set the first two numbers −
double val1, val2;
val1 = 10;
val2 = 5;
Now use the Math.Sqrt function to use Pythagoras Theorem.
res = Math.Sqrt(val1 * val1 + val2 * val2);
Live Demo
using System;
public class Program {
public static void Main(string[] args) {
double val1, val2, res;
val1 = 10;
... | [
{
"code": null,
"e": 1099,
"s": 1062,
"text": "Firstly, set the first two numbers −"
},
{
"code": null,
"e": 1139,
"s": 1099,
"text": "double val1, val2;\nval1 = 10;\nval2 = 5;"
},
{
"code": null,
"e": 1197,
"s": 1139,
"text": "Now use the Math.Sqrt function t... |
ASP.NET - Calendars | The calendar control is a functionally rich web control, which provides the following capabilities:
Displaying one month at a time
Selecting a day, a week or a month
Selecting a range of days
Moving from month to month
Controlling the display of the days programmatically
The basic syntax of a calendar control is:
<asp:... | [
{
"code": null,
"e": 2447,
"s": 2347,
"text": "The calendar control is a functionally rich web control, which provides the following capabilities:"
},
{
"code": null,
"e": 2478,
"s": 2447,
"text": "Displaying one month at a time"
},
{
"code": null,
"e": 2513,
"s":... |
Positive Negative Pair | Practice | GeeksforGeeks | Given an array of distinct integers, find all the pairs having both negative and positive values of a number in the array.
Example 1:
Input:
n = 8
arr[] = {1,3,6,-2,-1,-3,2,7}
Output: -1 1 -3 3 -2 2
Explanation: 1, 3 and 2 are present
pairwise positive and negative. 6 and
7 have no pair.
Example 2:
Input:
n = 3
arr... | [
{
"code": null,
"e": 361,
"s": 238,
"text": "Given an array of distinct integers, find all the pairs having both negative and positive values of a number in the array."
},
{
"code": null,
"e": 373,
"s": 361,
"text": "\nExample 1:"
},
{
"code": null,
"e": 531,
"s":... |
Tryit Editor v3.7 | HTML Form elements
Tryit: HTML fieldset element | [
{
"code": null,
"e": 29,
"s": 10,
"text": "HTML Form elements"
}
] |
Difference Between Constructor and Destructor | In this post, we will understand the difference between constructor and destructor.
It helps allocate memory to an object.
It helps allocate memory to an object.
It can take arguments.
It can take arguments.
It is called automatically when an object is created.
It is called automatically when an object is created.
It a... | [
{
"code": null,
"e": 1146,
"s": 1062,
"text": "In this post, we will understand the difference between constructor and destructor."
},
{
"code": null,
"e": 1185,
"s": 1146,
"text": "It helps allocate memory to an object."
},
{
"code": null,
"e": 1224,
"s": 1185,
... |
C - Using Constants | C - Programming HOME
C - Basic Introduction
C - Program Structure
C - Reserved Keywords
C - Basic Datatypes
C - Variable Types
C - Storage Classes
C - Using Constants
C - Operator Types
C - Control Statements
C - Input and Output
C - Pointing to Data
C - Using Functions
C - Play with Strings
C - Structured Datatypes
C ... | [
{
"code": null,
"e": 1475,
"s": 1454,
"text": "C - Programming HOME"
},
{
"code": null,
"e": 1498,
"s": 1475,
"text": "C - Basic Introduction"
},
{
"code": null,
"e": 1520,
"s": 1498,
"text": "C - Program Structure"
},
{
"code": null,
"e": 1542,
... |
How to parse JSON Objects on Android using Kotlin? | This example demonstrates how to parse JSON Objects on Android using Kotlin.
Step 1 − Create a new project in Android Studio, go to File ⇒ New Project and fill all required details to create a new project.
Step 2 − Add the following code to res/layout/activity_main.xml.
<?xml version="1.0" encoding="utf-8"?>
<RelativeL... | [
{
"code": null,
"e": 1139,
"s": 1062,
"text": "This example demonstrates how to parse JSON Objects on Android using Kotlin."
},
{
"code": null,
"e": 1268,
"s": 1139,
"text": "Step 1 − Create a new project in Android Studio, go to File ⇒ New Project and fill all required details t... |
Can we override a start() method in Java? | Yes, we can override the
start() method of a Thread class in Java. We must call the super.start() method to create a new thread and need to call run() method in that newly created thread. If we call the run() method directly from within our start() method, it can be executed in the actual thread as a normal method, not... | [
{
"code": null,
"e": 1400,
"s": 1062,
"text": "Yes, we can override the\nstart() method of a Thread class in Java. We must call the super.start() method to create a new thread and need to call run() method in that newly created thread. If we call the run() method directly from within our start() met... |
A Guide To Encoding Text In Python | by Kurtis Pykes | Towards Data Science | The reason we encode text is that computers do not understand characters, words, or sentences; Computers can only process numbers, therefore, if we wish to teach computers to understand natural language then we ought to encode the textual data into a numeric format before inputting it into any machine.
Therefore, text ... | [
{
"code": null,
"e": 476,
"s": 172,
"text": "The reason we encode text is that computers do not understand characters, words, or sentences; Computers can only process numbers, therefore, if we wish to teach computers to understand natural language then we ought to encode the textual data into a nume... |
gs command in Linux with Examples - GeeksforGeeks | 11 Jan, 2022
gs command invokes Ghostscript, which is an interpreter of Adobe Systems PostScript and Portable Document Format(PDF) languages. After executing Ghostscript it reads further input from the standard input stream until it encounters ‘quit‘ command.
Syntax:
gs [ options ] [ files ] ...
Options: Below are s... | [
{
"code": null,
"e": 25287,
"s": 25259,
"text": "\n11 Jan, 2022"
},
{
"code": null,
"e": 25535,
"s": 25287,
"text": "gs command invokes Ghostscript, which is an interpreter of Adobe Systems PostScript and Portable Document Format(PDF) languages. After executing Ghostscript it rea... |
Python | Check if tuple exists as dictionary key - GeeksforGeeks | 29 Oct, 2019
Sometimes, while working with dictionaries, there is a possibility that it’s keys be in form of tuples. This can be a sub problem to some of web development domain. Let’s discuss certain ways in which this problem can be solved.
Method #1 : Using in operatorThis is the most recommened and Pythonic way to p... | [
{
"code": null,
"e": 25613,
"s": 25585,
"text": "\n29 Oct, 2019"
},
{
"code": null,
"e": 25842,
"s": 25613,
"text": "Sometimes, while working with dictionaries, there is a possibility that it’s keys be in form of tuples. This can be a sub problem to some of web development domain... |
GATE | GATE-CS-2014-(Set-1) | Question 65 - GeeksforGeeks | 28 Jun, 2021
An operating system uses the Banker’s algorithm for deadlock avoidance when managing the allocation of three resource types X, Y, and Z to three processes P0, P1, and P2. The table given below presents the current system state. Here, the Allocation matrix shows the current number of resources of each type ... | [
{
"code": null,
"e": 25785,
"s": 25757,
"text": "\n28 Jun, 2021"
},
{
"code": null,
"e": 26235,
"s": 25785,
"text": "An operating system uses the Banker’s algorithm for deadlock avoidance when managing the allocation of three resource types X, Y, and Z to three processes P0, P1, ... |
Arithmetic Operators in LISP - GeeksforGeeks | 21 Sep, 2021
Arithmetic operators are used to perform mathematical operations like addition, subtraction, multiplication, and division.
There are 7 arithmetic operators in LISP that are listed in the below table:
Example 1: LISP Program that demonstrates arithmetic operators
Lisp
;set value 1 to 300; set value 2 to 600... | [
{
"code": null,
"e": 24811,
"s": 24783,
"text": "\n21 Sep, 2021"
},
{
"code": null,
"e": 24934,
"s": 24811,
"text": "Arithmetic operators are used to perform mathematical operations like addition, subtraction, multiplication, and division."
},
{
"code": null,
"e": 250... |
OpenGL program for simple Animation (Revolution) in C - GeeksforGeeks | 07 Oct, 2021
OpenGL is a cross-language, cross-platform API for rendering 2D and 3D Vector Graphics. Using this, we can make a lot of design as well as animations. Below is the simple animation made using OpenGL.Approach : To make a picture moving, we need to understand the working procedure of a function used to displ... | [
{
"code": null,
"e": 25765,
"s": 25737,
"text": "\n07 Oct, 2021"
},
{
"code": null,
"e": 26904,
"s": 25765,
"text": "OpenGL is a cross-language, cross-platform API for rendering 2D and 3D Vector Graphics. Using this, we can make a lot of design as well as animations. Below is the... |
Python | Find minimum of each index in list of lists - GeeksforGeeks | 06 May, 2019
Sometimes, we are encountered with such problem in which we need to find the minimum of each column in a matrix i.e minimum of each index in list of lists. This kind of problem is quite common and useful in competitive programming. Let’s discuss certain ways in which this problem can be solved.
Examples:
I... | [
{
"code": null,
"e": 25715,
"s": 25687,
"text": "\n06 May, 2019"
},
{
"code": null,
"e": 26011,
"s": 25715,
"text": "Sometimes, we are encountered with such problem in which we need to find the minimum of each column in a matrix i.e minimum of each index in list of lists. This ki... |
Auto select option from Dropdown in ReactJS - GeeksforGeeks | 18 Jan, 2021
Auto Select option from Dropdown means without forcing the user to click on any options, the option value is auto-populated. Material UI for React has this component available for us and it is very easy to integrate. We can auto-select the options from Dropdown using the following approach.
Creating React ... | [
{
"code": null,
"e": 26071,
"s": 26043,
"text": "\n18 Jan, 2021"
},
{
"code": null,
"e": 26363,
"s": 26071,
"text": "Auto Select option from Dropdown means without forcing the user to click on any options, the option value is auto-populated. Material UI for React has this compone... |
Spinning Ball Animation with Glow Effect using CSS - GeeksforGeeks | 23 Feb, 2021
Spinning ball animation can be easily created using the transform property to rotate the ball. The animation iteration count is applied as infinite to get the never-ending spinning animation. To get the glowing effect, box-shadow is used.
STEPS:
Create an HTML file with the name index.html.
Create a div e... | [
{
"code": null,
"e": 26621,
"s": 26593,
"text": "\n23 Feb, 2021"
},
{
"code": null,
"e": 26861,
"s": 26621,
"text": "Spinning ball animation can be easily created using the transform property to rotate the ball. The animation iteration count is applied as infinite to get the neve... |
Perl | Anchors in Regex - GeeksforGeeks | 31 Jan, 2022
Anchors in Perl Regex do not match any character at all. Instead, they match a particular position as before, after, or between the characters. These are used to check not the string but its positional boundaries.Following are the respective anchors in Perl Regex:
'^' '$', '\b', '\A', '\Z', '\z', '\G', '\p... | [
{
"code": null,
"e": 25315,
"s": 25287,
"text": "\n31 Jan, 2022"
},
{
"code": null,
"e": 25580,
"s": 25315,
"text": "Anchors in Perl Regex do not match any character at all. Instead, they match a particular position as before, after, or between the characters. These are used to c... |
pmap command in Linux with Examples - GeeksforGeeks | 23 Apr, 2019
The pmap command in Linux is used to display the memory map of a process. A memory map indicates how memory is spread out.
Syntax:
pmap [options] pid [...]
Example:
Options:
-x : This option is used to display the memory map in an extended format.Example:pmap -x 9466
Example:
pmap -x 9466
-p : This option ... | [
{
"code": null,
"e": 25615,
"s": 25587,
"text": "\n23 Apr, 2019"
},
{
"code": null,
"e": 25738,
"s": 25615,
"text": "The pmap command in Linux is used to display the memory map of a process. A memory map indicates how memory is spread out."
},
{
"code": null,
"e": 257... |
CSS | border-image-slice Property - GeeksforGeeks | 03 Nov, 2021
In CSS the border-image-slice property is used to divide or slice an image specified by border-image-source property. The border-slice property divides a given image into:
9 regions
4 corners
4 edges
A middle region.
Note: The middle region remains transparent as default and fill value is used to make it... | [
{
"code": null,
"e": 25068,
"s": 25040,
"text": "\n03 Nov, 2021"
},
{
"code": null,
"e": 25242,
"s": 25068,
"text": "In CSS the border-image-slice property is used to divide or slice an image specified by border-image-source property. The border-slice property divides a given ima... |
How to use Hierarchical Indexes with Pandas ? - GeeksforGeeks | 08 May, 2021
The index is like an address, that’s how any data point across the data frame or series can be accessed. Rows and columns both have indexes, rows indices are called index and for columns, it’s general column names.
Hierarchical Indexes are also known as multi-indexing is setting more than one column name a... | [
{
"code": null,
"e": 25563,
"s": 25535,
"text": "\n08 May, 2021"
},
{
"code": null,
"e": 25778,
"s": 25563,
"text": "The index is like an address, that’s how any data point across the data frame or series can be accessed. Rows and columns both have indexes, rows indices are calle... |
Create Boxplot of Multiple Column Values using ggplot2 in R - GeeksforGeeks | 28 Nov, 2021
In this article, we will discuss how to create a boxplot of multiple column values using ggplot2 in R Programming Language.
A dataframe can be created by containing values organized in the form of rows and columns. The values may belong to different data types. The reshape2 package is used to aggregate dat... | [
{
"code": null,
"e": 26487,
"s": 26459,
"text": "\n28 Nov, 2021"
},
{
"code": null,
"e": 26611,
"s": 26487,
"text": "In this article, we will discuss how to create a boxplot of multiple column values using ggplot2 in R Programming Language."
},
{
"code": null,
"e": 26... |
Circular Convolution using Matrix Method - GeeksforGeeks | 26 Nov, 2021
Given two array X[] and H[] of length N and M respectively, the task is to find the circular convolution of the given arrays using Matrix method. Multiplication of the Circularly Shifted Matrix and the column-vector is the Circular-Convolution of the arrays.Examples:
Input: X[] = {1, 2, 4, 2}, H[] = {1, ... | [
{
"code": null,
"e": 25917,
"s": 25889,
"text": "\n26 Nov, 2021"
},
{
"code": null,
"e": 26187,
"s": 25917,
"text": "Given two array X[] and H[] of length N and M respectively, the task is to find the circular convolution of the given arrays using Matrix method. Multiplication of... |
Minimum swaps required to bring all elements less than or equal to k together - GeeksforGeeks | 24 Feb, 2022
Given an array of n positive integers and a number k. Find the minimum number of swaps required to bring all the numbers less than or equal to k together.
Input: arr[] = {2, 1, 5, 6, 3}, k = 3
Output: 1
Explanation:
To bring elements 2, 1, 3 together, swap
element '5' with '3' such that final array
w... | [
{
"code": null,
"e": 26763,
"s": 26735,
"text": "\n24 Feb, 2022"
},
{
"code": null,
"e": 26920,
"s": 26763,
"text": "Given an array of n positive integers and a number k. Find the minimum number of swaps required to bring all the numbers less than or equal to k together. "
},
... |
Kth Smallest Element of a Matrix of given dimensions filled with product of indices - GeeksforGeeks | 23 Apr, 2021
Given an integer K and a matrix of size N x M, where each matrix element is equal to the product of its indices(i * j), the task is to find the Kth Smallest element in the given Matrix.Examples:
Input: N = 2, M = 3, K = 5 Output: 4 Explanation: The matrix possible for given dimensions is {{1, 2, 3}, {2, ... | [
{
"code": null,
"e": 26237,
"s": 26209,
"text": "\n23 Apr, 2021"
},
{
"code": null,
"e": 26434,
"s": 26237,
"text": "Given an integer K and a matrix of size N x M, where each matrix element is equal to the product of its indices(i * j), the task is to find the Kth Smallest elemen... |
strsplit() Function in R | 31 Aug, 2021
The strsplit() in R programming language function is used to split the elements of the specified character vector into substrings according to the given substring taken as its parameter.
Syntax: strsplit(x, split, fixed = FALSE, perl = FALSE, useBytes = FALSE)
Parameters: This function accepts some paramet... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n31 Aug, 2021"
},
{
"code": null,
"e": 215,
"s": 28,
"text": "The strsplit() in R programming language function is used to split the elements of the specified character vector into substrings according to the given substring taken as its... |
How to Fix: TypeError: no numeric data to plot | 28 Nov, 2021
In this article, we will fix the error: TypeError: no numeric data to plot
Python3
# importing pandasimport pandas as pd# importing numpyimport numpy as npimport matplotlib.pyplot as plt petal_length = ['3.3', '3.5', '4.0', '4.5', '4.6', '5.0', '5.5', '6.0', '6.5', '7.0']pet... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n28 Nov, 2021"
},
{
"code": null,
"e": 103,
"s": 28,
"text": "In this article, we will fix the error: TypeError: no numeric data to plot"
},
{
"code": null,
"e": 111,
"s": 103,
"text": "Python3"
},
{
"code": "... |
Types of Functions in R Programming | 25 Jan, 2022
A function is a set of statements orchestrated together to perform a specific operation. A function is an object so the interpreter is able to pass control to the function, along with arguments that may be necessary for the function to accomplish the actions. The function in turn performs the task and retu... | [
{
"code": null,
"e": 53,
"s": 25,
"text": "\n25 Jan, 2022"
},
{
"code": null,
"e": 458,
"s": 53,
"text": "A function is a set of statements orchestrated together to perform a specific operation. A function is an object so the interpreter is able to pass control to the function, a... |
Matplotlib.axes.Axes.imshow() in Python | 13 Apr, 2020
Matplotlib is a library in Python and it is numerical – mathematical extension for NumPy library. The Axes Class contains most of the figure elements: Axis, Tick, Line2D, Text, Polygon, etc., and sets the coordinate system. And the instances of Axes supports callbacks through a callbacks attribute.
The Axe... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n13 Apr, 2020"
},
{
"code": null,
"e": 328,
"s": 28,
"text": "Matplotlib is a library in Python and it is numerical – mathematical extension for NumPy library. The Axes Class contains most of the figure elements: Axis, Tick, Line2D, Text... |
Traverse a given Matrix using Recursion | 31 May, 2021
Given a matrix arr of size N x M, the task is to traverse this matrix using recursion.Examples:
Input: arr[][] = {{1, 2, 3},
{4, 5, 6},
{7, 8, 9}}
Output: 1, 2, 3, 4, 5, 6, 7, 8, 9
Input: M[][] = {{11, 12, 13},
{14, 15, 16},
{17,... | [
{
"code": null,
"e": 54,
"s": 26,
"text": "\n31 May, 2021"
},
{
"code": null,
"e": 151,
"s": 54,
"text": "Given a matrix arr of size N x M, the task is to traverse this matrix using recursion.Examples: "
},
{
"code": null,
"e": 414,
"s": 151,
"text": "Input: a... |
Program to find the smallest element among three elements | 17 May, 2022
Given three numbers. The task is to find the smallest among given three numbers.
Examples:
Input: first = 15, second = 16, third = 10
Output: 10
Input: first = 5, second = 3, third = 6
Output: 3
Approach:
Check if the first element is smaller than second and third. If yes then print it.Else if chec... | [
{
"code": null,
"e": 53,
"s": 25,
"text": "\n17 May, 2022"
},
{
"code": null,
"e": 135,
"s": 53,
"text": "Given three numbers. The task is to find the smallest among given three numbers. "
},
{
"code": null,
"e": 147,
"s": 135,
"text": "Examples: "
},
{
... |
Euclid Euler Theorem | 05 Apr, 2021
According to Euclid Euler Theorem, a perfect number which is even, can be represented in the form where n is a prime number and is a Mersenne prime number. It is a product of a power of 2 with a Mersenne prime number. This theorem establishes a connection between a Mersenne prime and an even perfect number... | [
{
"code": null,
"e": 54,
"s": 26,
"text": "\n05 Apr, 2021"
},
{
"code": null,
"e": 364,
"s": 54,
"text": "According to Euclid Euler Theorem, a perfect number which is even, can be represented in the form where n is a prime number and is a Mersenne prime number. It is a product of... |
ROWS and COLUMNS Functions in Excel With Examples | 01 Jun, 2021
In this article, we are going to see the details about Excel ROW, ROWS, COLUMN, COLUMNS functions, and their usages.
The ROW( ) function basically returns the row number for a reference.
Syntax:
=ROW([reference])
Example :
=ROW(G100); Returns 100 as output
as G100 is in the 100th row in the Excel sheet
I... | [
{
"code": null,
"e": 53,
"s": 25,
"text": "\n01 Jun, 2021"
},
{
"code": null,
"e": 170,
"s": 53,
"text": "In this article, we are going to see the details about Excel ROW, ROWS, COLUMN, COLUMNS functions, and their usages."
},
{
"code": null,
"e": 241,
"s": 170,
... |
Create Bounce Animation on Touch in Android Jetpack Compose | 27 Jul, 2021
Prerequisites:
Basic knowledge of Kotlin
Basic Knowledge of Jetpack Compose
In this article, we will take a look at how to create a bounce animation when the user taps anything, further it can be extended as per the use of the App. Here’s a sample gif demonstrating the animation.
Step 1: Create a New Proje... | [
{
"code": null,
"e": 54,
"s": 26,
"text": "\n27 Jul, 2021"
},
{
"code": null,
"e": 69,
"s": 54,
"text": "Prerequisites:"
},
{
"code": null,
"e": 95,
"s": 69,
"text": "Basic knowledge of Kotlin"
},
{
"code": null,
"e": 130,
"s": 95,
"text": ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.