title stringlengths 3 221 | text stringlengths 17 477k | parsed listlengths 0 3.17k |
|---|---|---|
Left Leaning Red Black Tree (Insertion) | 09 Jul, 2022
Prerequisites : Red – Black Trees.A left leaning Red Black Tree or (LLRB), is a variant of red black tree, which is a lot easier to implement than Red black tree itself and guarantees all the search, delete and insert operations in O(logn) time.
Which nodes are RED and Which are Black ? Nodes which have do... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n09 Jul, 2022"
},
{
"code": null,
"e": 298,
"s": 52,
"text": "Prerequisites : Red – Black Trees.A left leaning Red Black Tree or (LLRB), is a variant of red black tree, which is a lot easier to implement than Red black tree itself and g... |
foreach() loop vs Stream foreach() vs Parallel Stream foreach() | 29 May, 2021
Lambda operator is not used: foreach loop in Java doesn’t use any lambda operations and thus operations can be applied on any value outside the list that we are using for iteration in the foreach loop. The foreach loop is concerned over iterating the collection or array by storing each element of the list ... | [
{
"code": null,
"e": 54,
"s": 26,
"text": "\n29 May, 2021"
},
{
"code": null,
"e": 423,
"s": 54,
"text": "Lambda operator is not used: foreach loop in Java doesn’t use any lambda operations and thus operations can be applied on any value outside the list that we are using for ite... |
GATE | GATE CS 2011 | Question 65 | 28 Jun, 2021
Let the page fault service time be 10ms in a computer with average memory access time being 20ns. If one page fault is generated for every 10^6 memory accesses, what is the effective access time for the memory?(A) 21ns(B) 30ns(C) 23ns(D) 35nsAnswer: (B)Explanation:
Let P be the page fault rate
Effective Me... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n28 Jun, 2021"
},
{
"code": null,
"e": 318,
"s": 52,
"text": "Let the page fault service time be 10ms in a computer with average memory access time being 20ns. If one page fault is generated for every 10^6 memory accesses, what is the e... |
How to set the matplotlib figure default size in ipython notebook? | To set the matplotlib figure default size in iPython, use the following steps −
To check the default figure size, use plt.rcParams["figure.figsize"] over the ipython
shell.
To check the default figure size, use plt.rcParams["figure.figsize"] over the ipython
shell.
Now to set the figure size, override the plt.rcParams[... | [
{
"code": null,
"e": 1142,
"s": 1062,
"text": "To set the matplotlib figure default size in iPython, use the following steps −"
},
{
"code": null,
"e": 1235,
"s": 1142,
"text": "To check the default figure size, use plt.rcParams[\"figure.figsize\"] over the ipython\nshell."
},
... |
Python regex to find sequences of one upper case letter followed by lower case letters | When it is required to find sequences of an upper case letter followed by lower case using regular expression, a method named ‘match_string’ is defined that uses the ‘search’ method to match a regular expression. Outside the method, the string is defined, and the method is called on it by passing the string.
Below is a... | [
{
"code": null,
"e": 1372,
"s": 1062,
"text": "When it is required to find sequences of an upper case letter followed by lower case using regular expression, a method named ‘match_string’ is defined that uses the ‘search’ method to match a regular expression. Outside the method, the string is define... |
fabs() in C++ | 09 Apr, 2018
The fabs() function returns the absolute value of the argument.Mathematically |a|. If a is value given in the argument.
Syntax:
double fabs(double a);
float fabs(float a);
int fabs(int a);
Parameter:
The fabs() function takes a single argument, a whose absolute value has to be returned.
Return:
The fabs()... | [
{
"code": null,
"e": 54,
"s": 26,
"text": "\n09 Apr, 2018"
},
{
"code": null,
"e": 174,
"s": 54,
"text": "The fabs() function returns the absolute value of the argument.Mathematically |a|. If a is value given in the argument."
},
{
"code": null,
"e": 182,
"s": 174... |
Variants of Binary Search | 05 Jan, 2021
Binary search is very easy right? Well, binary search can become complex when element duplication occurs in the sorted list of values. It’s not always the “contains or not” we search using Binary Search, but there are 5 variants such as below:1) Contains (True or False) 2) Index of first occurrence of a ke... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n05 Jan, 2021"
},
{
"code": null,
"e": 484,
"s": 52,
"text": "Binary search is very easy right? Well, binary search can become complex when element duplication occurs in the sorted list of values. It’s not always the “contains or not” w... |
Exposing ML/DL Models as REST APIs | 17 Jan, 2019
In this article, we will learn how to expose ML/DL model as flask APIs.
Frameworks we’ll be using:Keras is a Deep Learning library, built on top of backends such as Tensorflow, Theano or CNTK. It provides abstraction and allows rapid development of ML/DL models.
Flask is a micro web framework in Python, wh... | [
{
"code": null,
"e": 54,
"s": 26,
"text": "\n17 Jan, 2019"
},
{
"code": null,
"e": 126,
"s": 54,
"text": "In this article, we will learn how to expose ML/DL model as flask APIs."
},
{
"code": null,
"e": 317,
"s": 126,
"text": "Frameworks we’ll be using:Keras i... |
Print last k digits of a^b (a raised to power b) | 13 Jul, 2022
Given positive integers k, a and b we need to print last k digits of a^b ie.. pow(a, b).
Input Constraint:
k <= 9, a <= 10^6, b<= 10^6
Examples:
Input : a = 11, b = 3, k = 2
Output : 31
Explanation : a^b = 11^3 = 1331, hence
last two digits are 31
Input : a = 10, b = 10000, k = 5
Output : 00000
Explanat... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n13 Jul, 2022"
},
{
"code": null,
"e": 141,
"s": 52,
"text": "Given positive integers k, a and b we need to print last k digits of a^b ie.. pow(a, b)."
},
{
"code": null,
"e": 187,
"s": 141,
"text": "Input Constraint... |
Ruby | StringScanner scan function | 12 Dec, 2019
StringScanner#scan() : scan() is a StringScanner class method which tries to match with pattern at the current position.
Syntax: StringScanner.scan()
Parameter: StringScanner values
Return: matched string otherwise return false
Example #1 :
# Ruby code for StringScanner.scan() method # loading StringScann... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n12 Dec, 2019"
},
{
"code": null,
"e": 149,
"s": 28,
"text": "StringScanner#scan() : scan() is a StringScanner class method which tries to match with pattern at the current position."
},
{
"code": null,
"e": 178,
"s": 149... |
AWT ContainerEvent Class | The Class ContainerEvent represents that a container's contents changed because a component was added or removed.
Following is the declaration for java.awt.event.ContainerEvent class:
public class ContainerEvent
extends ComponentEvent
Following are the fields for java.awt.Component class:
static int COMPONENT_ADDED ... | [
{
"code": null,
"e": 1861,
"s": 1747,
"text": "The Class ContainerEvent represents that a container's contents changed because a component was added or removed."
},
{
"code": null,
"e": 1931,
"s": 1861,
"text": "Following is the declaration for java.awt.event.ContainerEvent class... |
How to take backup of a single table in a MySQL database? | The backup of a table can be made with the help of backup table as well as mysqldump utility.
The backup table concept was used in MySQL version 5.0 and its earlier version.
Here, I am performing backup with the help of mysqldump. Firstly, we will open cmd with the
help of shortcut key. The mysqldump will run at the cm... | [
{
"code": null,
"e": 1236,
"s": 1062,
"text": "The backup of a table can be made with the help of backup table as well as mysqldump utility.\nThe backup table concept was used in MySQL version 5.0 and its earlier version."
},
{
"code": null,
"e": 1445,
"s": 1236,
"text": "Here, I... |
How to insert into two tables using a single MySQL query? | You can use stored procedure to insert into two tables in a single query. Let us first create a table −
mysql> create table DemoTable
(
StudentId int NOT NULL AUTO_INCREMENT PRIMARY KEY,
StudentFirstName varchar(20)
);
Query OK, 0 rows affected (0.56 sec)
Here is the query to create second table −
mysql> create t... | [
{
"code": null,
"e": 1166,
"s": 1062,
"text": "You can use stored procedure to insert into two tables in a single query. Let us first create a table −"
},
{
"code": null,
"e": 1324,
"s": 1166,
"text": "mysql> create table DemoTable\n(\n StudentId int NOT NULL AUTO_INCREMENT PRI... |
How to read a simple text file in Android App? | This example demonstrates how do I read a simple text file in the android app.
Step 1 − Create a new project in Android Studio, go to File ⇒ New Project and fill all required details to create a new project.
Create a new Android Resource directory (raw.xml) and add a text file in the res/raw
Step 2 − Add the following ... | [
{
"code": null,
"e": 1141,
"s": 1062,
"text": "This example demonstrates how do I read a simple text file in the android app."
},
{
"code": null,
"e": 1270,
"s": 1141,
"text": "Step 1 − Create a new project in Android Studio, go to File ⇒ New Project and fill all required details... |
HTML - <fieldset> Tag | The HTML <fieldset> tag is used for grouping related form elements. By using the fieldset tag and the legend tag, you can make your forms much easier to understand for your users.
<!DOCTYPE html>
<html>
<head>
<title>HTML fieldset Tag</title>
</head>
<body>
<form>
<fieldset>
... | [
{
"code": null,
"e": 2554,
"s": 2374,
"text": "The HTML <fieldset> tag is used for grouping related form elements. By using the fieldset tag and the legend tag, you can make your forms much easier to understand for your users."
},
{
"code": null,
"e": 2967,
"s": 2554,
"text": "<!... |
DateTime.ToLongDateString() Method in C# | The DateTime.ToLongDateString() method in C# is used to convert the value of the current DateTime object to its equivalent long date string representation.
Following is the syntax −
public string ToLongDateString ();
Let us now see an example to implement the DateTime.ToLongDateString() method −
using System;
public cl... | [
{
"code": null,
"e": 1218,
"s": 1062,
"text": "The DateTime.ToLongDateString() method in C# is used to convert the value of the current DateTime object to its equivalent long date string representation."
},
{
"code": null,
"e": 1244,
"s": 1218,
"text": "Following is the syntax −"... |
How to setup Tailwind CSS in AngularJS ? - GeeksforGeeks | 01 Jul, 2021
What is Tailwind CSS?
According to the official documentation, Tailwind CSS is a utility-first CSS framework for rapidly building custom user interfaces. It is a cool way to write inline styling and achieve an awesome interface without writing a single line of your own CSS.
What is Angular?
Angular is a pl... | [
{
"code": null,
"e": 25134,
"s": 25106,
"text": "\n01 Jul, 2021"
},
{
"code": null,
"e": 25156,
"s": 25134,
"text": "What is Tailwind CSS?"
},
{
"code": null,
"e": 25409,
"s": 25156,
"text": "According to the official documentation, Tailwind CSS is a utility-f... |
PostgreSQL - TRUNCATE TABLE Command | The PostgreSQL TRUNCATE TABLE command is used to delete complete data from an existing table. You can also use DROP TABLE command to delete complete table but it would remove complete table structure from the database and you would need to re-create this table once again if you wish to store some data.
It has the same ... | [
{
"code": null,
"e": 3129,
"s": 2825,
"text": "The PostgreSQL TRUNCATE TABLE command is used to delete complete data from an existing table. You can also use DROP TABLE command to delete complete table but it would remove complete table structure from the database and you would need to re-create thi... |
Applications of tree data structure - GeeksforGeeks | 17 Dec, 2021
Why Tree? Unlike Array and Linked List, which are linear data structures, tree is hierarchical (or non-linear) data structure.
One reason to use trees might be because you want to store information that naturally forms a hierarchy. For example, the file system on a computer: file system ———–
One reason ... | [
{
"code": null,
"e": 35847,
"s": 35819,
"text": "\n17 Dec, 2021"
},
{
"code": null,
"e": 35975,
"s": 35847,
"text": "Why Tree? Unlike Array and Linked List, which are linear data structures, tree is hierarchical (or non-linear) data structure. "
},
{
"code": null,
"e"... |
ANSYS in a Python Web App, Part 1: Post Processing with PyDPF | by Steve Kiefer | Towards Data Science | ANSYS recently announced it is supporting an open source project: PyAnsys. PyAnsys is split into multiple packages: PyMAPDL for interacting with an instance of an Ansys multiphysics simulation and equation solver and PyDPF-Core (& its simplified sibling PyDPF-Post) for post-processing Ansys results files. This is reall... | [
{
"code": null,
"e": 714,
"s": 165,
"text": "ANSYS recently announced it is supporting an open source project: PyAnsys. PyAnsys is split into multiple packages: PyMAPDL for interacting with an instance of an Ansys multiphysics simulation and equation solver and PyDPF-Core (& its simplified sibling P... |
Recursive program for prime number - GeeksforGeeks | 27 Jan, 2022
Given a number n, check whether it’s prime number or not using recursion.Examples:
Input : n = 11
Output : Yes
Input : n = 15
Output : No
The idea is based on school method to check for prime numbers.
C++
Java
Python3
C#
PHP
Javascript
// CPP Program to find whether a Number // is Prime or Not using... | [
{
"code": null,
"e": 24744,
"s": 24716,
"text": "\n27 Jan, 2022"
},
{
"code": null,
"e": 24829,
"s": 24744,
"text": "Given a number n, check whether it’s prime number or not using recursion.Examples: "
},
{
"code": null,
"e": 24885,
"s": 24829,
"text": "Input... |
Output of Python programs | Set 8 - GeeksforGeeks | 01 Jun, 2021
Prerequisite – Lists in Python Predict the output of the following Python programs.
Program 1
Python
list = [1, 2, 3, None, (1, 2, 3, 4, 5), ['Geeks', 'for', 'Geeks']]print len(list)
Output:
6
Explanation: The beauty of python list datatype is that within a list, a programmer can nest another list, a ... | [
{
"code": null,
"e": 24618,
"s": 24590,
"text": "\n01 Jun, 2021"
},
{
"code": null,
"e": 24703,
"s": 24618,
"text": "Prerequisite – Lists in Python Predict the output of the following Python programs. "
},
{
"code": null,
"e": 24715,
"s": 24703,
"text": "Progr... |
Painting the Fence | Practice | GeeksforGeeks | Given a fence with n posts and k colors, find out the number of ways of painting the fence so that not more than two consecutive fences have the same colors. Since the answer can be large return it modulo 10^9 + 7.
Example 1:
Input:
N=3, K=2
Output: 6
Explanation:
We have following possible combinations:
Example... | [
{
"code": null,
"e": 453,
"s": 238,
"text": "Given a fence with n posts and k colors, find out the number of ways of painting the fence so that not more than two consecutive fences have the same colors. Since the answer can be large return it modulo 10^9 + 7."
},
{
"code": null,
"e": 465... |
What is the difference between Dictionary and HashTable in PowerShell? | PowerShell programmers generally prefer the Hashtable over the Dictionary although there are some advantages of using Dictionary. See the difference below.
a. Hashtable is easy to declare while the Dictionary is a little complex compared to Hashtable. For example,
To create a hashtable,
$hash = @{
'Country' = 'India... | [
{
"code": null,
"e": 1218,
"s": 1062,
"text": "PowerShell programmers generally prefer the Hashtable over the Dictionary although there are some advantages of using Dictionary. See the difference below."
},
{
"code": null,
"e": 1327,
"s": 1218,
"text": "a. Hashtable is easy to de... |
ios manipulators showpoint() function in C++ - GeeksforGeeks | 28 Aug, 2019
The showpoint() method of stream manipulators in C++ is used to set the showpoint format flag for the specified str stream. This flag always displays the floating point values along with their decimal values.
Syntax:
ios_base& showpoint (ios_base& str)
Parameters: This method accepts str as a parameter wh... | [
{
"code": null,
"e": 24098,
"s": 24070,
"text": "\n28 Aug, 2019"
},
{
"code": null,
"e": 24307,
"s": 24098,
"text": "The showpoint() method of stream manipulators in C++ is used to set the showpoint format flag for the specified str stream. This flag always displays the floating ... |
Data Cleaning in R Made Simple. The title says it all. | by Emily Burns | Towards Data Science | Data cleaning. The process of identifying, correcting, or removing inaccurate raw data for downstream purposes. Or, more colloquially, an unglamorous yet wholely necessary first step towards an analysis-ready dataset. Data cleaning may not be the sexiest task in a data scientist’s day but never underestimate its abilit... | [
{
"code": null,
"e": 543,
"s": 172,
"text": "Data cleaning. The process of identifying, correcting, or removing inaccurate raw data for downstream purposes. Or, more colloquially, an unglamorous yet wholely necessary first step towards an analysis-ready dataset. Data cleaning may not be the sexiest ... |
A Comprehensive Guide to Pandas’ Advanced Features in 20 Minutes | by Fabian Bosler | Towards Data Science | I am going out on a limb here and assume that red pandas are smarter and thus more advanced than their black-and-white brethren. Hence, the cover picture.
In Part I of this Pandas series, we explored the basics of Pandas, including:
How to load data;
How to inspect, sort, and filter data;
How to analyze data using and ... | [
{
"code": null,
"e": 327,
"s": 172,
"text": "I am going out on a limb here and assume that red pandas are smarter and thus more advanced than their black-and-white brethren. Hence, the cover picture."
},
{
"code": null,
"e": 405,
"s": 327,
"text": "In Part I of this Pandas series... |
How to find strings with a given prefix in MySQL? | You can use LIKE operator to find strings with a given prefix.
The syntax is as follows
select *from yourTableName where yourColumnName LIKE 'yourPrefixValue%';
To understand the above syntax, let us create a table. The query to create a table is as follows
mysql> create table findStringWithGivenPrefixDemo
-> (
-... | [
{
"code": null,
"e": 1125,
"s": 1062,
"text": "You can use LIKE operator to find strings with a given prefix."
},
{
"code": null,
"e": 1150,
"s": 1125,
"text": "The syntax is as follows"
},
{
"code": null,
"e": 1223,
"s": 1150,
"text": "select *from yourTableN... |
mdir - Unix, Linux Command | The mdir command is used to display an MS-DOS directory. Its
syntax is:
mdir [-/] [-f] [-w] [-a] [-b] msdosfile [ msdosfiles...]
Mdir
displays the contents of MS-DOS directories, or the entries for some
MS-DOS files.
Mdir supports the following command line options:
./configure; make dvi; dvips mtools.d... | [
{
"code": null,
"e": 10660,
"s": 10586,
"text": "\nThe mdir command is used to display an MS-DOS directory. Its\nsyntax is:\n"
},
{
"code": null,
"e": 10719,
"s": 10660,
"text": "\nmdir [-/] [-f] [-w] [-a] [-b] msdosfile [ msdosfiles...]\n"
},
{
"code": null,
"e": 108... |
How to print a calendar for the given month and year in Python? | You can use the calender module to get the calender for a given month of a given year in Python. You need to provide the year and month as arguments.
import calendar
y = 2017
m = 11
print(calendar.month(y, m))
This will give the output −
November 2017
Mo Tu We Th Fr Sa Su
1 2 3 4 5
6 7 8 9 10 11 12
13... | [
{
"code": null,
"e": 1212,
"s": 1062,
"text": "You can use the calender module to get the calender for a given month of a given year in Python. You need to provide the year and month as arguments."
},
{
"code": null,
"e": 1272,
"s": 1212,
"text": "import calendar\ny = 2017\nm = 1... |
How To Fine-Tune GPT-2 So You Can Generate Long-Form Creative Writing | by Jason Boog | Towards Data Science | Ever since OpenAI released its GPT-2 language model into the wild, people have been using this AI writing tool to generate hilarious, scary, and fascinating short-form texts.
If you want to use GPT-2 to generate long-form writing that incorporates your favorite themes, characters, settings, and writing styles, you’ll n... | [
{
"code": null,
"e": 222,
"s": 47,
"text": "Ever since OpenAI released its GPT-2 language model into the wild, people have been using this AI writing tool to generate hilarious, scary, and fascinating short-form texts."
},
{
"code": null,
"e": 423,
"s": 222,
"text": "If you want ... |
How to remove leading zeros from a number in JavaScript? | Use parseInt() to remove leading zeros from a number in JavaScript.
You can try to run the following code to run how to remove leading zeros −
Live Demo
<!DOCTYPE html>
<html>
<body>
<script>
var num1 = parseInt("025", 10);
document.write(num1);
var num2 = parseInt("040", 10);
... | [
{
"code": null,
"e": 1130,
"s": 1062,
"text": "Use parseInt() to remove leading zeros from a number in JavaScript."
},
{
"code": null,
"e": 1205,
"s": 1130,
"text": "You can try to run the following code to run how to remove leading zeros −"
},
{
"code": null,
"e": 12... |
PyTorch Geometric Graph Embedding | by Anuradha Wickramarachchi | Towards Data Science | Graph representation learning/embedding is commonly the term used for the process where we transform a Graph data structure to a more structured vector form. This enables the downstream analysis by providing more manageable fixed-length vectors. Ideally, these vectors should incorporate both graph structure (topologica... | [
{
"code": null,
"e": 693,
"s": 171,
"text": "Graph representation learning/embedding is commonly the term used for the process where we transform a Graph data structure to a more structured vector form. This enables the downstream analysis by providing more manageable fixed-length vectors. Ideally, ... |
Program to print the given Z Pattern - GeeksforGeeks | 22 Apr, 2021
Given an integer N, the task is to print the Alphabet Z Pattern as given below:
1 2 3 * * * N
*
*
*
3
2
1 2 3 * * * N
Examples:
Input: N = 5
Output:
1 2 3 4 5
4
3
2
1 2 3 4 5
Input: N = 4
Output:
1 2 3 4
3
2
1 2 3 4
Approach:
Print the first... | [
{
"code": null,
"e": 24162,
"s": 24134,
"text": "\n22 Apr, 2021"
},
{
"code": null,
"e": 24243,
"s": 24162,
"text": "Given an integer N, the task is to print the Alphabet Z Pattern as given below: "
},
{
"code": null,
"e": 24311,
"s": 24243,
"text": "1 2 3 * *... |
How do I use the @ sign in MySQL? | To use the @ sign, use MySQL SET command. The @sign is used to set user-defined variables. Following is the syntax −
SET @anyVariableName:=yourValue;
Let us first create a table −
mysql> create table DemoTable1331
-> (
-> Id int,
-> Name varchar(20)
-> );
Query OK, 0 rows affected (0.51 sec)
Insert some rec... | [
{
"code": null,
"e": 1179,
"s": 1062,
"text": "To use the @ sign, use MySQL SET command. The @sign is used to set user-defined variables. Following is the syntax −"
},
{
"code": null,
"e": 1212,
"s": 1179,
"text": "SET @anyVariableName:=yourValue;"
},
{
"code": null,
... |
ReactJS value Attribute - GeeksforGeeks | 04 Jun, 2021
React.js library is all about splitting the app into several components. Each Component has its own lifecycle. React provides us some in-built methods that we can override at particular stages in the life-cycle of the component.
In this article, we will know how to use value attributes. The value attribute... | [
{
"code": null,
"e": 26071,
"s": 26043,
"text": "\n04 Jun, 2021"
},
{
"code": null,
"e": 26300,
"s": 26071,
"text": "React.js library is all about splitting the app into several components. Each Component has its own lifecycle. React provides us some in-built methods that we can ... |
How to Perform CRUD Operations in Room Database in Android? - GeeksforGeeks | 28 Nov, 2021
Data from the app can be saved on users’ devices in different ways. We can store data in the user’s device in SQLite tables, shared preferences, and many more ways. In this article, we will take a look at saving data, reading, updating, and deleting data in Room Database on Android. We will perform CRUD op... | [
{
"code": null,
"e": 26034,
"s": 26006,
"text": "\n28 Nov, 2021"
},
{
"code": null,
"e": 26479,
"s": 26034,
"text": "Data from the app can be saved on users’ devices in different ways. We can store data in the user’s device in SQLite tables, shared preferences, and many more ways... |
Python | Interleave multiple lists of same length - GeeksforGeeks | 30 Dec, 2018
Given lists of same length, write a Python program to store alternative elements of given lists in a new list.
Let’s discuss certain ways in which this can be performed.
Method #1 : Using map() + list comprehensionmap() is used to handle the interleave of lists and the task of insertion at alternate is per... | [
{
"code": null,
"e": 25667,
"s": 25639,
"text": "\n30 Dec, 2018"
},
{
"code": null,
"e": 25778,
"s": 25667,
"text": "Given lists of same length, write a Python program to store alternative elements of given lists in a new list."
},
{
"code": null,
"e": 25837,
"s":... |
How to change video playing speed using JavaScript ? - GeeksforGeeks | 12 Jan, 2021
In this article, we will see how we can change playback speed of videos embedded in an HTML document using an HTML5 video tag.
We can set the new playing speed using playbackRate attribute. It has the following syntax.
Syntax:
let video = document.querySelector('video')
video.playbackRate = newPlaybackRate... | [
{
"code": null,
"e": 26621,
"s": 26593,
"text": "\n12 Jan, 2021"
},
{
"code": null,
"e": 26748,
"s": 26621,
"text": "In this article, we will see how we can change playback speed of videos embedded in an HTML document using an HTML5 video tag."
},
{
"code": null,
"e":... |
Calculate the Mean of each Column of a Matrix or Array in R Programming - colMeans() Function - GeeksforGeeks | 03 Jun, 2020
colMeans() function in R Language is used to compute the mean of each column of a matrix or array.
Syntax: colMeans(x, dims = 1)
Parameters:x: array of two or more dimensions, containing numeric, complex, integer or logical values, or a numeric data framedims: integer value, which dimensions are regarded a... | [
{
"code": null,
"e": 26317,
"s": 26289,
"text": "\n03 Jun, 2020"
},
{
"code": null,
"e": 26416,
"s": 26317,
"text": "colMeans() function in R Language is used to compute the mean of each column of a matrix or array."
},
{
"code": null,
"e": 26446,
"s": 26416,
... |
Program to find the sum of a Series (1*1) + (2*2) + (3*3) + (4*4) + (5*5) + ... + (n*n) - GeeksforGeeks | 24 Mar, 2021
You have been given a series (1*1) + (2*2) + (3*3) + (4*4) + (5*5) + ... + (n*n), find out the sum of the series till nth term. Examples :
Input : n = 3
Output : 14
Explanation : 1 + 1/2^2 + 1/3^3
Input : n = 5
Output : 55
Explanation : (1*1) + (2*2) + (3*3) + (4*4) + (5*5)
C++
C
Java
Python
C#
PHP
... | [
{
"code": null,
"e": 26769,
"s": 26741,
"text": "\n24 Mar, 2021"
},
{
"code": null,
"e": 26910,
"s": 26769,
"text": "You have been given a series (1*1) + (2*2) + (3*3) + (4*4) + (5*5) + ... + (n*n), find out the sum of the series till nth term. Examples : "
},
{
"code": ... |
Get Bank details from IFSC Code Using PHP - GeeksforGeeks | 10 Dec, 2020
The Indian Financial System Code (IFSC) is an 11-digit alpha-numeric code used to uniquely classify bank branches within the National Electronic Fund Transfer (NEFT) network by the Central Bank.
In this article, we are going to write PHP code to get details of the Bank from the given IFSC code. For this, w... | [
{
"code": null,
"e": 26253,
"s": 26225,
"text": "\n10 Dec, 2020"
},
{
"code": null,
"e": 26448,
"s": 26253,
"text": "The Indian Financial System Code (IFSC) is an 11-digit alpha-numeric code used to uniquely classify bank branches within the National Electronic Fund Transfer (NEF... |
How to Enter Your First Kaggle Competition | by Rebecca Vickery | Towards Data Science | Kaggle is probably the most well-known machine learning competition website. A Kaggle competition consists of a dataset made available from the website with a problem to solve with machine, deep learning or some other data science technique. Once you have developed a solution you upload your predictions back onto the s... | [
{
"code": null,
"e": 630,
"s": 172,
"text": "Kaggle is probably the most well-known machine learning competition website. A Kaggle competition consists of a dataset made available from the website with a problem to solve with machine, deep learning or some other data science technique. Once you have... |
How to get memory usage at runtime using C++? | We can get the memory usage like virtual memory usage or resident set size etc. at run time. To get them we can use some system libraries. This process depends on operating systems. For this example, we are using Linux operating system.
So here we will see how to get the memory usage statistics under Linux environment ... | [
{
"code": null,
"e": 1299,
"s": 1062,
"text": "We can get the memory usage like virtual memory usage or resident set size etc. at run time. To get them we can use some system libraries. This process depends on operating systems. For this example, we are using Linux operating system."
},
{
"c... |
AI Feynman 2.0: Learning Regression Equations From Data | by Daniel Shapiro, PhD | Towards Data Science | Table of Contents
1. Introduction2. Code3. Their Example4. Our Own Easy Example5. Symbolic Regression on Noisy Data
I recently saw a post on LinkedIn from MIT professor Max Tegmark about a new ML library his lab released. I decided to try it out. The paper is AI Feynman 2.0: Pareto-optimal symbolic regression exploitin... | [
{
"code": null,
"e": 189,
"s": 171,
"text": "Table of Contents"
},
{
"code": null,
"e": 287,
"s": 189,
"text": "1. Introduction2. Code3. Their Example4. Our Own Easy Example5. Symbolic Regression on Noisy Data"
},
{
"code": null,
"e": 1057,
"s": 287,
"text": "... |
Select Random Element from List in R - GeeksforGeeks | 23 Sep, 2021
In this article, we will discuss how to select a random element from a List using R programming language.
We can select a Random element from a list by using the sample() function. sample() function is used to get the random element from the data structure
Syntax:
sample(1:length(list), n)
where
1:length(l... | [
{
"code": null,
"e": 25162,
"s": 25134,
"text": "\n23 Sep, 2021"
},
{
"code": null,
"e": 25268,
"s": 25162,
"text": "In this article, we will discuss how to select a random element from a List using R programming language."
},
{
"code": null,
"e": 25419,
"s": 2526... |
TextPlot: R Library for Visualizing Text Data | Towards Data Science | Data visualization is an essential task in data science. We can gain insights from the data visualization so it can support our decision for our problems.
Text data is one of the most analyzed data by many people. It is also one of the most complex data because we have to spend a lot of time preprocessing the data, ran... | [
{
"code": null,
"e": 327,
"s": 172,
"text": "Data visualization is an essential task in data science. We can gain insights from the data visualization so it can support our decision for our problems."
},
{
"code": null,
"e": 601,
"s": 327,
"text": "Text data is one of the most an... |
Count numbers in given range such that sum of even digits is greater than sum of odd digits - GeeksforGeeks | 11 Nov, 2019
Given two integers L and R denoting a range [L, R]. The task is to find the total count of numbers in the given range [L,R] whose sum of even digits is greater than the sum of odd digits.
Examples:
Input : L=2 R=10Output : 4Numbers having the property that sum of evendigits is greater than sum of odd digit... | [
{
"code": null,
"e": 24592,
"s": 24564,
"text": "\n11 Nov, 2019"
},
{
"code": null,
"e": 24780,
"s": 24592,
"text": "Given two integers L and R denoting a range [L, R]. The task is to find the total count of numbers in the given range [L,R] whose sum of even digits is greater tha... |
Maximum number of edges among all connected components of an undirected graph - GeeksforGeeks | 12 Jul, 2021
Given integers ‘N’ and ‘K’ where, N is the number of vertices of an undirected graph and ‘K’ denotes the number of edges in the same graph (each edge is denoted by a pair of integers where i, j means that the vertex ‘i’ is directly connected to the vertex ‘j’ in the graph).The task is to find the maximum n... | [
{
"code": null,
"e": 24725,
"s": 24697,
"text": "\n12 Jul, 2021"
},
{
"code": null,
"e": 25113,
"s": 24725,
"text": "Given integers ‘N’ and ‘K’ where, N is the number of vertices of an undirected graph and ‘K’ denotes the number of edges in the same graph (each edge is denoted by... |
Change the string | Practice | GeeksforGeeks | Given a string S, the task is to change the complete string to Uppercase or Lowercase depending upon the case for the first character.
Example 1:
Input:
S = "abCD"
Output: abcd
Explanation: The first letter (a) is
lowercase. Hence, the complete string
is made lowercase.
​Example 2:
Input:
S = "Abcd"
Output: ABCD... | [
{
"code": null,
"e": 373,
"s": 238,
"text": "Given a string S, the task is to change the complete string to Uppercase or Lowercase depending upon the case for the first character."
},
{
"code": null,
"e": 384,
"s": 373,
"text": "Example 1:"
},
{
"code": null,
"e": 512... |
CSS | border-image-source Property - GeeksforGeeks | 03 Nov, 2021
The border-image-source property is used to specify the image source which is to be set as the border of an element.
Syntax:
border-image-source: url(image-path.png)| none| initial| inherit;
Note: If the value is none, the border styles will be used. The specified image can be divided into regions wit... | [
{
"code": null,
"e": 23377,
"s": 23349,
"text": "\n03 Nov, 2021"
},
{
"code": null,
"e": 23496,
"s": 23377,
"text": "The border-image-source property is used to specify the image source which is to be set as the border of an element. "
},
{
"code": null,
"e": 23506,
... |
How to get Subtraction of tuples in Python | When it is required to subtract the tuples, the 'map' method and lambda function can be used.
The map function applies a given function/operation to every item in an iterable (such as list, tuple). It returns a list as the result.
Anonymous function is a function which is defined without a name. In general, functions i... | [
{
"code": null,
"e": 1156,
"s": 1062,
"text": "When it is required to subtract the tuples, the 'map' method and lambda function can be used."
},
{
"code": null,
"e": 1293,
"s": 1156,
"text": "The map function applies a given function/operation to every item in an iterable (such a... |
How can I position JButtons vertically one after another in Java Swing? | Position buttons vertically one after another using the Box class. Use the createVerticalBox() method that displays components from top to bottom −
JButton button1 = new JButton("One");
JButton button2 = new JButton("Two");
JButton button3 = new JButton("Three");
Box box = Box.createVerticalBox();
box.add(button1);
box... | [
{
"code": null,
"e": 1210,
"s": 1062,
"text": "Position buttons vertically one after another using the Box class. Use the createVerticalBox() method that displays components from top to bottom −"
},
{
"code": null,
"e": 1415,
"s": 1210,
"text": "JButton button1 = new JButton(\"On... |
A Complete Sentiment Analysis Project Using Python’s Scikit-Learn | by Rashida Nasrin Sucky | Towards Data Science | Sentiment analysis is one of the most important parts of Natural Language Processing. It is different than machine learning with numeric data because text data cannot be processed by an algorithm directly. It needs to be transformed into a numeric form. So, text data are vectorized before they get fed into the machine ... | [
{
"code": null,
"e": 669,
"s": 172,
"text": "Sentiment analysis is one of the most important parts of Natural Language Processing. It is different than machine learning with numeric data because text data cannot be processed by an algorithm directly. It needs to be transformed into a numeric form. S... |
Track objects with Camshift using OpenCV - GeeksforGeeks | 10 Feb, 2020
OpenCV is the huge open-source library for computer vision, machine learning, and image processing and now it plays a major role in real-time operation which is very important in today’s systems. By using it, one can process images and videos to identify objects, faces, or even the handwriting of a human.
... | [
{
"code": null,
"e": 24212,
"s": 24184,
"text": "\n10 Feb, 2020"
},
{
"code": null,
"e": 24519,
"s": 24212,
"text": "OpenCV is the huge open-source library for computer vision, machine learning, and image processing and now it plays a major role in real-time operation which is ve... |
DATESBETWEEN function | Returns a table that contains a column of dates that begins with the start_date and continues until the end_date.
DATESBETWEEN (<dates>, <start_date>, <end_date>)
dates
A column that contains dates.
start_date
A date expression.
end_date
A date expression.
A table containing a single column of date values.
If start_d... | [
{
"code": null,
"e": 2115,
"s": 2001,
"text": "Returns a table that contains a column of dates that begins with the start_date and continues until the end_date."
},
{
"code": null,
"e": 2166,
"s": 2115,
"text": "DATESBETWEEN (<dates>, <start_date>, <end_date>) \n"
},
{
"c... |
How to deploy Apache Airflow with Celery on AWS | by Axel Furlan | Towards Data Science | Disclaimer: this post assumes basic knowledge of Airflow, AWS ECS, VPC (security groups, etc) and Docker. I suggest an architecture that may not be perfect nor the best in your particular case. In that case, make what you want from this lecture.
Where I work, we use Apache Airflow extensively. We have approximately 15 ... | [
{
"code": null,
"e": 418,
"s": 172,
"text": "Disclaimer: this post assumes basic knowledge of Airflow, AWS ECS, VPC (security groups, etc) and Docker. I suggest an architecture that may not be perfect nor the best in your particular case. In that case, make what you want from this lecture."
},
{... |
Bubble chart using Plotly in Python - GeeksforGeeks | 03 Jul, 2020
Plotly is a Python library which is used to design graphs, especially interactive graphs. It can plot various graphs and charts like histogram, barplot, boxplot, spreadplot, and many more. It is mainly used in data analysis as well as financial analysis. Plotly is an interactive visualization library.
The ... | [
{
"code": null,
"e": 23677,
"s": 23649,
"text": "\n03 Jul, 2020"
},
{
"code": null,
"e": 23980,
"s": 23677,
"text": "Plotly is a Python library which is used to design graphs, especially interactive graphs. It can plot various graphs and charts like histogram, barplot, boxplot, s... |
Java.io.ByteArrayOutputStream() Class in Java | 23 Jan, 2017
java.io.ByteArrayOutputStream class creates an Output Stream for writing data into byte array. The size of buffer grows automatically as data is written to it. There is no affect of closing the byteArrayOutputStream on the working of it’s methods. They can be called even after closing the class.Thus, no me... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n23 Jan, 2017"
},
{
"code": null,
"e": 362,
"s": 28,
"text": "java.io.ByteArrayOutputStream class creates an Output Stream for writing data into byte array. The size of buffer grows automatically as data is written to it. There is no aff... |
Capacity of a channel in Computer Network | 07 Apr, 2020
By capacity of a channel, it means the capacity of the transmission medium (wire or link). Capacity is the number of bits the transmission medium can hold. So basically there are 2 types of channels – Full duplex and half duplex.
Half duplex – the transmission can happen in one direction at a time.Full dup... | [
{
"code": null,
"e": 53,
"s": 25,
"text": "\n07 Apr, 2020"
},
{
"code": null,
"e": 283,
"s": 53,
"text": "By capacity of a channel, it means the capacity of the transmission medium (wire or link). Capacity is the number of bits the transmission medium can hold. So basically there... |
Python | Ways to sort a zipped list by values | 17 Oct, 2019
Zipped lists are those lists where several lists are mapped together to form one list which can be used as one entity altogether. In Python Zip() function is used to map different lists.
Let’s discuss a few methods to demonstrate the problem.
Method #1: Using lambda and sort
# Python code to demonstrate# s... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n17 Oct, 2019"
},
{
"code": null,
"e": 215,
"s": 28,
"text": "Zipped lists are those lists where several lists are mapped together to form one list which can be used as one entity altogether. In Python Zip() function is used to map diffe... |
Software Engineering | MOCK (Introduction) | 21 May, 2019
Mock is an Object that clone the behavior of a real object. It is basically used in Unit Testing by testing the isolated unit even when Backend is not available.
Why we use MOCK object?The unit testing purpose is to approve each unit of software designed and verify that the generated code is working perfec... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n21 May, 2019"
},
{
"code": null,
"e": 190,
"s": 28,
"text": "Mock is an Object that clone the behavior of a real object. It is basically used in Unit Testing by testing the isolated unit even when Backend is not available."
},
{
... |
What is the difference between CSS and SCSS ? | 30 Jun, 2022
Introduction
CSS : Cascading Style Sheet is the basically the scripting language. CSS is used for designing web pages.CSS is the most important web technologies that are widely used along with HTML and JavaScript. CSS have file extension of .css.
SCSS : Syntactically Awesome Style Sheet is the superset of ... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n30 Jun, 2022"
},
{
"code": null,
"e": 65,
"s": 52,
"text": "Introduction"
},
{
"code": null,
"e": 299,
"s": 65,
"text": "CSS : Cascading Style Sheet is the basically the scripting language. CSS is used for designing... |
Python | Pandas dataframe.corr() | 22 Apr, 2020
Python is a great language for doing data analysis, primarily because of the fantastic ecosystem of data-centric python packages. Pandas is one of those packages and makes importing and analyzing data much easier.
Pandas dataframe.corr() is used to find the pairwise correlation of all columns in the datafr... | [
{
"code": null,
"e": 53,
"s": 25,
"text": "\n22 Apr, 2020"
},
{
"code": null,
"e": 267,
"s": 53,
"text": "Python is a great language for doing data analysis, primarily because of the fantastic ecosystem of data-centric python packages. Pandas is one of those packages and makes im... |
User Authentication and CRUD Operation with Firebase Realtime Database in Android | 10 Jan, 2022
Firebase is a famous product of Google which is used by so many developers to add backend functionality for their website as well as apps. The Firebase will make your job really easier for the backend database and handling the database. In this article, we will take a look at the implementation of the Fire... | [
{
"code": null,
"e": 54,
"s": 26,
"text": "\n10 Jan, 2022"
},
{
"code": null,
"e": 642,
"s": 54,
"text": "Firebase is a famous product of Google which is used by so many developers to add backend functionality for their website as well as apps. The Firebase will make your job rea... |
HTML | <button> formaction Attribute | 31 May, 2019
The HTML <button> formaction Attribute is used to specify where to send the data of the form. After submission of form the formaction attribute called. The form data is to be sent to the server after submission of form. It overrides the feature of the action attribute of an <form> element.
Syntax:
<button ... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n31 May, 2019"
},
{
"code": null,
"e": 319,
"s": 28,
"text": "The HTML <button> formaction Attribute is used to specify where to send the data of the form. After submission of form the formaction attribute called. The form data is to be ... |
Python GUI – PyQt VS TKinter | 11 Dec, 2020
A GUI toolkit contains widgets that are used to create a graphical interface. Python includes a wide range of Interface implementations available, from TkInter (it comes with Python, ) to a variety of various cross-platform solutions, such as PyQt5, which is known for its more sophisticated widgets and sl... | [
{
"code": null,
"e": 53,
"s": 25,
"text": "\n11 Dec, 2020"
},
{
"code": null,
"e": 371,
"s": 53,
"text": " A GUI toolkit contains widgets that are used to create a graphical interface. Python includes a wide range of Interface implementations available, from TkInter (it comes wit... |
Lodash _.flatten() Method | 29 Jul, 2020
Lodash is a JavaScript library that works on the top of underscore.js. Lodash helps in working with arrays, strings, objects, numbers etc.The Lodash.flatten() method is used to flatten the array to one level deep.
Syntax:
flatten( array )
Parameter: This method accepts single parameter array that holds sim... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n29 Jul, 2020"
},
{
"code": null,
"e": 242,
"s": 28,
"text": "Lodash is a JavaScript library that works on the top of underscore.js. Lodash helps in working with arrays, strings, objects, numbers etc.The Lodash.flatten() method is used t... |
PyQt - Using Qt Designer | The PyQt installer comes with a GUI builder tool called Qt Designer. Using its simple drag and drop interface, a GUI interface can be quickly built without having to write the code. It is however, not an IDE such as Visual Studio. Hence, Qt Designer does not have the facility to debug and build the application.
Creatio... | [
{
"code": null,
"e": 2239,
"s": 1926,
"text": "The PyQt installer comes with a GUI builder tool called Qt Designer. Using its simple drag and drop interface, a GUI interface can be quickly built without having to write the code. It is however, not an IDE such as Visual Studio. Hence, Qt Designer doe... |
Execute a String of Code in Python | There are times when you need the entire block of code as a string and want this code to execute as part of a bigger python program. IN this article we will see how we can pass code as a string to a variable and then use that variable in a wrapper program which will then execute this program as a python code.
The exec(... | [
{
"code": null,
"e": 1373,
"s": 1062,
"text": "There are times when you need the entire block of code as a string and want this code to execute as part of a bigger python program. IN this article we will see how we can pass code as a string to a variable and then use that variable in a wrapper progr... |
Highcharts - Basic Line Chart | We have already seen the configuration used to draw this chart in Highcharts Configuration Syntax chapter. Let us now consider the following example to further understand a basic line chart.
highcharts_line_basic.htm
<html>
<head>
<title>Highcharts Tutorial</title>
<script src = "https://ajax.googleapis.... | [
{
"code": null,
"e": 2208,
"s": 2017,
"text": "We have already seen the configuration used to draw this chart in Highcharts Configuration Syntax chapter. Let us now consider the following example to further understand a basic line chart."
},
{
"code": null,
"e": 2234,
"s": 2208,
... |
SciPy - Ndimage | The SciPy ndimage submodule is dedicated to image processing. Here, ndimage means an n-dimensional image.
Some of the most common tasks in image processing are as follows &miuns;
Input/Output, displaying images
Basic manipulations − Cropping, flipping, rotating, etc.
Image filtering − De-noising, sharpening, etc.
Image... | [
{
"code": null,
"e": 1993,
"s": 1887,
"text": "The SciPy ndimage submodule is dedicated to image processing. Here, ndimage means an n-dimensional image."
},
{
"code": null,
"e": 2066,
"s": 1993,
"text": "Some of the most common tasks in image processing are as follows &miuns;"
... |
A Simple Breakout Trading Strategy in Python | by Sofien Kaabar, CFA | Towards Data Science | Note from Towards Data Science’s editors: While we allow independent authors to publish articles in accordance with our rules and guidelines, we do not endorse each author’s contribution. You should not rely on an author’s works without seeking professional advice. See our Reader Terms for details.
I have just publishe... | [
{
"code": null,
"e": 471,
"s": 171,
"text": "Note from Towards Data Science’s editors: While we allow independent authors to publish articles in accordance with our rules and guidelines, we do not endorse each author’s contribution. You should not rely on an author’s works without seeking profession... |
What are the differences between paint() method and repaint() method in Java? | paint(): This method holds instructions to paint this component. In Java Swing, we can change the paintComponent() method instead of paint() method as paint calls paintBorder(),
paintComponent() and paintChildren() methods. We cannot call this method directly instead we can call repaint().
repaint(): This method cannot... | [
{
"code": null,
"e": 1353,
"s": 1062,
"text": "paint(): This method holds instructions to paint this component. In Java Swing, we can change the paintComponent() method instead of paint() method as paint calls paintBorder(),\npaintComponent() and paintChildren() methods. We cannot call this method d... |
HTML <th> colspan Attribute | The colspan attribute of the <th> element is used to set the number of columns a header cell should span.
Following is the syntax −
<th colspan="num">
Above, num is the count of columns a header cell should span.
Let us now see an example to implement the colspan attribute of the <th> element −
Live Demo
<!DOCTYPE htm... | [
{
"code": null,
"e": 1168,
"s": 1062,
"text": "The colspan attribute of the <th> element is used to set the number of columns a header cell should span."
},
{
"code": null,
"e": 1194,
"s": 1168,
"text": "Following is the syntax −"
},
{
"code": null,
"e": 1213,
"s"... |
Compute the value of Cauchy Quantile Function in R Programming - qcauchy() Function - GeeksforGeeks | 25 Jun, 2020
qcauchy() function in R Language is used to calculate the value of cauchy quantile function. It also creates a density plot of cauchy quantile function.
Syntax: qcauchy(vec, scale)
Parameters:vec: x-values for cauchy functionscale: Scale for plotting
Example 1:
# R Program to compute value of# cauchy quant... | [
{
"code": null,
"e": 24851,
"s": 24823,
"text": "\n25 Jun, 2020"
},
{
"code": null,
"e": 25004,
"s": 24851,
"text": "qcauchy() function in R Language is used to calculate the value of cauchy quantile function. It also creates a density plot of cauchy quantile function."
},
{
... |
Renaming and Deleting Files in Python | Python os module provides methods that help you perform file-processing operations, such as renaming and deleting files.
To use this module you need to import it first and then you can call any related functions.
The rename() method takes two arguments, the current filename and the new filename.
os.rename(current_file_... | [
{
"code": null,
"e": 1183,
"s": 1062,
"text": "Python os module provides methods that help you perform file-processing operations, such as renaming and deleting files."
},
{
"code": null,
"e": 1275,
"s": 1183,
"text": "To use this module you need to import it first and then you c... |
Program for subtraction of matrices - GeeksforGeeks | 24 Aug, 2021
The below program subtracts of two square matrices of size 4*4, we can change N for different dimension.
C++
C
Java
Python3
C#
PHP
Javascript
// C++ program for subtraction of matrices#include <bits/stdc++.h>using namespace std;#define N 4 // This function subtracts B[][] from A[][], and stores// the resu... | [
{
"code": null,
"e": 26166,
"s": 26138,
"text": "\n24 Aug, 2021"
},
{
"code": null,
"e": 26272,
"s": 26166,
"text": "The below program subtracts of two square matrices of size 4*4, we can change N for different dimension. "
},
{
"code": null,
"e": 26276,
"s": 2627... |
Find Exponential of a column in Pandas-Python - GeeksforGeeks | 02 Jul, 2021
Let’s see how to find Exponential of a column in Pandas Dataframe. First, let’s create a Dataframe:
Python3
# importing pandas and# numpy librariesimport pandas as pdimport numpy as np # creating and initializing a listvalues= [ ['Rohan', 5, 50.59], ['Elvish', 2, 90.57], ['Deepak', 10, 98.51], ['S... | [
{
"code": null,
"e": 25537,
"s": 25509,
"text": "\n02 Jul, 2021"
},
{
"code": null,
"e": 25637,
"s": 25537,
"text": "Let’s see how to find Exponential of a column in Pandas Dataframe. First, let’s create a Dataframe:"
},
{
"code": null,
"e": 25645,
"s": 25637,
... |
K maximum sum combinations from two arrays - GeeksforGeeks | 02 Jul, 2021
Given two equally sized arrays (A, B) and N (size of both arrays). A sum combination is made by adding one element from array A and another element of array B. Display the maximum K valid sum combinations from all the possible sum combinations.
Examples:
Input : A[] : {3, 2}
B[] : {1, 4}
... | [
{
"code": null,
"e": 26299,
"s": 26271,
"text": "\n02 Jul, 2021"
},
{
"code": null,
"e": 26545,
"s": 26299,
"text": "Given two equally sized arrays (A, B) and N (size of both arrays). A sum combination is made by adding one element from array A and another element of array B. Dis... |
ArrayList trimToSize() in Java with example - GeeksforGeeks | 26 Nov, 2018
The trimToSize() method of ArrayList in Java trims the capacity of an ArrayList instance to be the list’s current size. This method is used to trim an ArrayList instance to the number of elements it contains.
Syntax:
trimToSize()
Parameter: It does not accepts any parameter.
Return Value: It does not retur... | [
{
"code": null,
"e": 25752,
"s": 25724,
"text": "\n26 Nov, 2018"
},
{
"code": null,
"e": 25961,
"s": 25752,
"text": "The trimToSize() method of ArrayList in Java trims the capacity of an ArrayList instance to be the list’s current size. This method is used to trim an ArrayList in... |
PHP | xml_parse_into_struct() Function - GeeksforGeeks | 07 Aug, 2021
The xml_parse_into_struct() function is an inbuilt function in PHP which is used to parse XML data into an array structure. The XML data are parsed into two parallel array structures, first one is index array that contains pointers to the location of the values in the value array and second one is value ar... | [
{
"code": null,
"e": 26243,
"s": 26215,
"text": "\n07 Aug, 2021"
},
{
"code": null,
"e": 26598,
"s": 26243,
"text": "The xml_parse_into_struct() function is an inbuilt function in PHP which is used to parse XML data into an array structure. The XML data are parsed into two parall... |
Load Factor and Rehashing - GeeksforGeeks | 24 Apr, 2022
Prerequisites: Hashing Introduction and Collision handling by separate chaining
For insertion of a key(K) – value(V) pair into a hash map, 2 steps are required:
K is converted into a small integer (called its hash code) using a hash function.The hash code is used to find an index (hashCode % arrSize) an... | [
{
"code": null,
"e": 26057,
"s": 26029,
"text": "\n24 Apr, 2022"
},
{
"code": null,
"e": 26138,
"s": 26057,
"text": "Prerequisites: Hashing Introduction and Collision handling by separate chaining "
},
{
"code": null,
"e": 26221,
"s": 26138,
"text": "For inser... |
Python | Pandas Series.clip() - GeeksforGeeks | 11 Oct, 2018
Python is a great language for doing data analysis, primarily because of the fantastic ecosystem of data-centric Python packages. Pandas is one of those packages and makes importing and analyzing data much easier.
Python Series.clip() is used to clip value below and above to passed Least and Max value. Thi... | [
{
"code": null,
"e": 25555,
"s": 25527,
"text": "\n11 Oct, 2018"
},
{
"code": null,
"e": 25769,
"s": 25555,
"text": "Python is a great language for doing data analysis, primarily because of the fantastic ecosystem of data-centric Python packages. Pandas is one of those packages a... |
Decode a string recursively encoded as count followed by substring - GeeksforGeeks | 05 Jan, 2022
An encoded string (s) is given, the task is to decode it. The pattern in which the strings are encoded is as follows.
<count>[sub_str] ==> The substring 'sub_str'
appears count times.
Examples:
Input : str[] = "1[b]"
Output : b
Input : str[] = "2[ab]"
Output : abab
Input : str[]... | [
{
"code": null,
"e": 26457,
"s": 26429,
"text": "\n05 Jan, 2022"
},
{
"code": null,
"e": 26576,
"s": 26457,
"text": "An encoded string (s) is given, the task is to decode it. The pattern in which the strings are encoded is as follows. "
},
{
"code": null,
"e": 26665,
... |
Merge two sorted arrays - GeeksforGeeks | 11 Jan, 2022
Given two sorted arrays, the task is to merge them in a sorted manner.Examples:
Input: arr1[] = { 1, 3, 4, 5}, arr2[] = {2, 4, 6, 8} Output: arr3[] = {1, 2, 3, 4, 4, 5, 6, 8}Input: arr1[] = { 5, 8, 9}, arr2[] = {4, 7, 8} Output: arr3[] = {4, 5, 7, 8, 8, 9}
Method 1 (O(n1 * n2) Time and O(n1+n2) Extra Spa... | [
{
"code": null,
"e": 26145,
"s": 26117,
"text": "\n11 Jan, 2022"
},
{
"code": null,
"e": 26226,
"s": 26145,
"text": "Given two sorted arrays, the task is to merge them in a sorted manner.Examples: "
},
{
"code": null,
"e": 26404,
"s": 26226,
"text": "Input: ar... |
LEX program to count the number of vowels and consonants in a given string - GeeksforGeeks | 27 Feb, 2020
Prerequisite: Flex (Fast lexical Analyzer Generator)
Given a string containing both vowels and consonants, write a LEX program to count the number of vowels and consonants in given string.
Examples:
Input: Hello everyone
Output: Number of vowels are: 6
Number of consonants are: 7
Input: This is G... | [
{
"code": null,
"e": 25955,
"s": 25927,
"text": "\n27 Feb, 2020"
},
{
"code": null,
"e": 26008,
"s": 25955,
"text": "Prerequisite: Flex (Fast lexical Analyzer Generator)"
},
{
"code": null,
"e": 26144,
"s": 26008,
"text": "Given a string containing both vowels... |
Program to find gravitational force between two objects - GeeksforGeeks | 04 May, 2022
Introduction to Gravitational Force
We know that gravity is universal. According to Newton’s Law of Universal Gravitation, all objects attract each other with a force of gravitational attraction. According to this law, the force of gravitational attraction is directly dependent upon the masses of both obje... | [
{
"code": null,
"e": 25439,
"s": 25411,
"text": "\n04 May, 2022"
},
{
"code": null,
"e": 25475,
"s": 25439,
"text": "Introduction to Gravitational Force"
},
{
"code": null,
"e": 26196,
"s": 25475,
"text": "We know that gravity is universal. According to Newton... |
Choose atleast two elements from array such that their GCD is 1 and cost is minimum - GeeksforGeeks | 02 Jun, 2021
Given two integer arrays arr[] and cost[] where cost[i] is the cost of choosing arr[i]. The task is to choose a subset with at least two elements such that the GCD of all the elements from the subset is 1 and the cost of choosing those elements is as minimum as possible then print the minimum cost.Examples... | [
{
"code": null,
"e": 26483,
"s": 26455,
"text": "\n02 Jun, 2021"
},
{
"code": null,
"e": 26794,
"s": 26483,
"text": "Given two integer arrays arr[] and cost[] where cost[i] is the cost of choosing arr[i]. The task is to choose a subset with at least two elements such that the GCD... |
Schedule Python Script using Windows Scheduler | 24 Feb, 2021
In this article, we are going to schedule a python script using a windows task scheduler, i.e. make it launch automatically at a certain time or after a certain time period.
Before starting we need to know the following point:
Python Script: It is a bunch of python code meant to be directly executed by the... | [
{
"code": null,
"e": 54,
"s": 26,
"text": "\n24 Feb, 2021"
},
{
"code": null,
"e": 228,
"s": 54,
"text": "In this article, we are going to schedule a python script using a windows task scheduler, i.e. make it launch automatically at a certain time or after a certain time period."... |
Number of matches required to find the winner | 13 Apr, 2021
Given a number N which represent the number of players participating in Badminton match. The task is to determine the Number of matches required to determine the Winner. In each Match 1 player is knocked out.
Examples:
Input: N = 4
Output: Matches played = 3
(As after each match only N - 1 players left)
... | [
{
"code": null,
"e": 53,
"s": 25,
"text": "\n13 Apr, 2021"
},
{
"code": null,
"e": 262,
"s": 53,
"text": "Given a number N which represent the number of players participating in Badminton match. The task is to determine the Number of matches required to determine the Winner. In e... |
Clockwise/Spiral Rule in C/C++ with Examples | 22 Sep, 2021
The Spiral/Clockwise Method is a magic tool for C/C++ programmers to define the meaning of syntax declaration in the head within seconds. This method was created by David Anderson and here is a short brief about how to apply this method.
While coding, when someone comes across a new unwanted syntax declara... | [
{
"code": null,
"e": 54,
"s": 26,
"text": "\n22 Sep, 2021"
},
{
"code": null,
"e": 292,
"s": 54,
"text": "The Spiral/Clockwise Method is a magic tool for C/C++ programmers to define the meaning of syntax declaration in the head within seconds. This method was created by David And... |
Classification Algorithms - Decision Tree | In general, Decision tree analysis is a predictive modelling tool that can be applied across many areas. Decision trees can be constructed by an algorithmic approach that can split the dataset in different ways based on different conditions. Decisions tress are the most powerful algorithms that falls under the category... | [
{
"code": null,
"e": 2785,
"s": 2438,
"text": "In general, Decision tree analysis is a predictive modelling tool that can be applied across many areas. Decision trees can be constructed by an algorithmic approach that can split the dataset in different ways based on different conditions. Decisions t... |
C++ program for Complex Number Calculator | 17 Jan, 2022
Pre-Requisites: Complex Numbers, Mathematics, Object-oriented Programming
This is a Complex Number Calculator which performs a lot of operations which are mentioned below, to simplify our day-to-day problems in mathematics. The implementation of this calculator is done using C++ Programming Language using ... | [
{
"code": null,
"e": 54,
"s": 26,
"text": "\n17 Jan, 2022"
},
{
"code": null,
"e": 128,
"s": 54,
"text": "Pre-Requisites: Complex Numbers, Mathematics, Object-oriented Programming"
},
{
"code": null,
"e": 403,
"s": 128,
"text": "This is a Complex Number Calcul... |
Python | Pandas Period.year | 06 Jan, 2019
Python is a great language for doing data analysis, primarily because of the fantastic ecosystem of data-centric python packages. Pandas is one of those packages and makes importing and analyzing data much easier.
Pandas Period.year attribute return an integer value representing the year the given period l... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n06 Jan, 2019"
},
{
"code": null,
"e": 242,
"s": 28,
"text": "Python is a great language for doing data analysis, primarily because of the fantastic ecosystem of data-centric python packages. Pandas is one of those packages and makes imp... |
One-Proportion Z-Test in R Programming | 22 Jul, 2020
The One proportion Z-test is used to compare an observed proportion to a theoretical one when there are only two categories. For example, we have a population of mice containing half male and half females (p = 0.5 = 50%). Some of these mice (n = 160) have developed spontaneous cancer, including 95 males an... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n22 Jul, 2020"
},
{
"code": null,
"e": 434,
"s": 28,
"text": "The One proportion Z-test is used to compare an observed proportion to a theoretical one when there are only two categories. For example, we have a population of mice containi... |
HTML | <img> alt Attribute | 27 May, 2019
The <img> alt attribute is used to specify the alternate text for an image. It is useful when the image not displayed. It is used to give alternative information for an image.
Syntax:
<img alt="text">
Attribute Values: It contains single value text which specifies the alternative text for an image.
Example... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n27 May, 2019"
},
{
"code": null,
"e": 204,
"s": 28,
"text": "The <img> alt attribute is used to specify the alternate text for an image. It is useful when the image not displayed. It is used to give alternative information for an image.... |
Data Analysis with SciPy | 26 Apr, 2022
SciPy is a python library that is useful in solving many mathematical equations and algorithms. It is designed on the top of Numpy library that gives more extension of finding scientific mathematical formulae like Matrix Rank, Inverse, polynomial equations, LU Decomposition, etc. Using its high level funct... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n26 Apr, 2022"
},
{
"code": null,
"e": 788,
"s": 52,
"text": "SciPy is a python library that is useful in solving many mathematical equations and algorithms. It is designed on the top of Numpy library that gives more extension of findin... |
How to detect when an @Input() value changes in Angular? | 28 Jul, 2020
@Input() is basically a decorator to bind a property as an input. It is used to pass data i.e property binding from one component to other or we can say, from parent to child component. It is bound with the DOM element. When the DOM element value is changed, Angular automatically updates this property with... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n28 Jul, 2020"
},
{
"code": null,
"e": 391,
"s": 28,
"text": "@Input() is basically a decorator to bind a property as an input. It is used to pass data i.e property binding from one component to other or we can say, from parent to child ... |
React Native style Prop | 28 Apr, 2021
In React Native, we can style our application using JavaScript. All of the core components accept a prop named style. The style names and values usually match how CSS works on the web, except names are written using camel casing.
The style prop can be a plain old JavaScript object. We can also pass an arra... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n28 Apr, 2021"
},
{
"code": null,
"e": 258,
"s": 28,
"text": "In React Native, we can style our application using JavaScript. All of the core components accept a prop named style. The style names and values usually match how CSS works on... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.