title stringlengths 3 221 | text stringlengths 17 477k | parsed listlengths 0 3.17k |
|---|---|---|
C++ Program To Print All Permutations Of A Given String | 11 Dec, 2021
A permutation also called an “arrangement number” or “order,” is a rearrangement of the elements of an ordered list S into a one-to-one correspondence with S itself. A string of length n has n! permutation.
Source: Mathword(http://mathworld.wolfram.com/Permutation.html)
Below are the permutations of strin... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n11 Dec, 2021"
},
{
"code": null,
"e": 236,
"s": 28,
"text": "A permutation also called an “arrangement number” or “order,” is a rearrangement of the elements of an ordered list S into a one-to-one correspondence with S itself. A string ... |
How to test a URL for 404 error in PHP? | 20 May, 2019
Checking if a Webpage URL exists or not is relatively easy in PHP. If the required URL does not exist, then it will return 404 error. The checking can be done with and without using cURL library.
cURL: The cURL stands for ‘Client for URLs’, originally with URL spelled in uppercase to make it obvious that i... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n20 May, 2019"
},
{
"code": null,
"e": 224,
"s": 28,
"text": "Checking if a Webpage URL exists or not is relatively easy in PHP. If the required URL does not exist, then it will return 404 error. The checking can be done with and without... |
Python | os.symlink() method | 26 Aug, 2019
OS module in Python provides functions for interacting with the operating system. OS comes under Python’s standard utility modules. This module provides a portable way of using operating system dependent functionality.
os.symlink() method in Python is used to create symbolic link. This method creates symbo... | [
{
"code": null,
"e": 53,
"s": 25,
"text": "\n26 Aug, 2019"
},
{
"code": null,
"e": 272,
"s": 53,
"text": "OS module in Python provides functions for interacting with the operating system. OS comes under Python’s standard utility modules. This module provides a portable way of usi... |
Spring @Service Annotation with Example | 18 Feb, 2022
Spring is one of the most popular Java EE frameworks. It is an open-source lightweight framework that allows Java EE 7 developers to build simple, reliable, and scalable enterprise applications. This framework mainly focuses on providing various ways to help you manage your business objects. It made the de... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n18 Feb, 2022"
},
{
"code": null,
"e": 768,
"s": 28,
"text": "Spring is one of the most popular Java EE frameworks. It is an open-source lightweight framework that allows Java EE 7 developers to build simple, reliable, and scalable enter... |
Tryit Editor v3.7 | Tryit: Using object-fit: cover | [] |
Visualizing representations of Outputs/Activations of each CNN layer - GeeksforGeeks | 30 Jun, 2020
Convolutional neural networks are very powerful in image classification and recognition tasks. CNN models learn features of the training images with various filters applied at each layer. The features learned at each convolutional layer significantly vary. It is an observed fact that initial layers predomi... | [
{
"code": null,
"e": 23953,
"s": 23925,
"text": "\n30 Jun, 2020"
},
{
"code": null,
"e": 24682,
"s": 23953,
"text": "Convolutional neural networks are very powerful in image classification and recognition tasks. CNN models learn features of the training images with various filter... |
How to use Python features in your data analytics project | by René Bremer | Towards Data Science | A lot of companies are moving to cloud and consider what tooling shall be used for data analytics. On-premises, companies mostly use propriety software for advanced analytics, BI and reporting. However, this tooling may not be the most logical choice in a cloud environment. Reasons can be 1) lack of integration with cl... | [
{
"code": null,
"e": 618,
"s": 172,
"text": "A lot of companies are moving to cloud and consider what tooling shall be used for data analytics. On-premises, companies mostly use propriety software for advanced analytics, BI and reporting. However, this tooling may not be the most logical choice in a... |
Adding caption below X-axis for a scatter plot using Matplotlib | To add caption below X-axis for a scatter plot, we can use text() method for the current figure.
Create x and y data points using numpy.
Create x and y data points using numpy.
Create a new figure or activate an existing figure using figure() method.
Create a new figure or activate an existing figure using figure() met... | [
{
"code": null,
"e": 1159,
"s": 1062,
"text": "To add caption below X-axis for a scatter plot, we can use text() method for the current figure."
},
{
"code": null,
"e": 1199,
"s": 1159,
"text": "Create x and y data points using numpy."
},
{
"code": null,
"e": 1239,
... |
Flutter - Stateful vs Stateless Widgets - GeeksforGeeks | 19 Mar, 2021
The state of an app can very simply be defined as anything that exists in the memory of the app while the app is running. This includes all the widgets that maintain the UI of the app including the buttons, text fonts, icons, animations, etc. So now as we know what are these states let’s dive directly into... | [
{
"code": null,
"e": 23857,
"s": 23829,
"text": "\n19 Mar, 2021"
},
{
"code": null,
"e": 24271,
"s": 23857,
"text": "The state of an app can very simply be defined as anything that exists in the memory of the app while the app is running. This includes all the widgets that mainta... |
Dart Programming - If Statement | The if...else construct evaluates a condition before a block of code is executed.
Following is the syntax.
if(boolean_expression){
// statement(s) will execute if the boolean expression is true.
}
If the Boolean expression evaluates to be true, then the block of code inside the if statement will be executed. If ... | [
{
"code": null,
"e": 2607,
"s": 2525,
"text": "The if...else construct evaluates a condition before a block of code is executed."
},
{
"code": null,
"e": 2632,
"s": 2607,
"text": "Following is the syntax."
},
{
"code": null,
"e": 2729,
"s": 2632,
"text": "if(b... |
Get only a single value from a specific MySQL row? | For this, use SELECT INTO variable with where clause. Let us first create a table −
mysql> create table DemoTable1896
(
StudentId int NOT NULL AUTO_INCREMENT PRIMARY KEY,
StudentName varchar(20),
StudentMarks int
);
Query OK, 0 rows affected (0.00 sec)
Insert some records in the table using insert comman... | [
{
"code": null,
"e": 1146,
"s": 1062,
"text": "For this, use SELECT INTO variable with where clause. Let us first create a table −"
},
{
"code": null,
"e": 1330,
"s": 1146,
"text": "mysql> create table DemoTable1896\n (\n StudentId int NOT NULL AUTO_INCREMENT PRIMARY KEY,\n ... |
Run Length Encoding - GeeksforGeeks | 15 Feb, 2022
Given an input string, write a function that returns the Run Length Encoded string for the input string.For example, if the input string is “wwwwaaadexxxxxx”, then the function should return “w4a3d1e1x6”
a) Pick the first character from the source string. b) Append the picked character to the destination s... | [
{
"code": null,
"e": 24838,
"s": 24810,
"text": "\n15 Feb, 2022"
},
{
"code": null,
"e": 25042,
"s": 24838,
"text": "Given an input string, write a function that returns the Run Length Encoded string for the input string.For example, if the input string is “wwwwaaadexxxxxx”, then... |
Value of continuous floor function : F(x) = F(floor(x/2)) + x - GeeksforGeeks | 29 Apr, 2021
Given an array of positive integers. For every element x of array, we need to find the value of continuous floor function defined as F(x) = F(floor(x/2)) + x, where F(0) = 0. Examples :-
Input : arr[] = {6, 8}
Output : 10 15
Explanation : F(6) = 6 + F(3)
= 6 + 3 + F(1)
... | [
{
"code": null,
"e": 24787,
"s": 24759,
"text": "\n29 Apr, 2021"
},
{
"code": null,
"e": 24976,
"s": 24787,
"text": "Given an array of positive integers. For every element x of array, we need to find the value of continuous floor function defined as F(x) = F(floor(x/2)) + x, wher... |
Function hoisting in JavaScript | Hoisting is a JavaScript technique which moves variables and function declarations to the top of their scope before code execution begins. Within a scope no matter where functions or variables are declared, they're moved to the top of their scope.
Note that hoisting only moves the declaration while assignments are left... | [
{
"code": null,
"e": 1310,
"s": 1062,
"text": "Hoisting is a JavaScript technique which moves variables and function declarations to the top of their scope before code execution begins. Within a scope no matter where functions or variables are declared, they're moved to the top of their scope."
},... |
numpy.less() in Python | 28 Mar, 2022
The numpy.less() : checks whether x1 is lesser than x2 or not. Syntax :
numpy.less(x1, x2[, out])
Parameters :
x1, x2 : [array_like]Input arrays. If x1.shape != x2.shape, they must be
broadcastable to a common shape
out : [ndarray, boolean]Array of bools, or a single bool if x1 and x2 a... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n28 Mar, 2022"
},
{
"code": null,
"e": 101,
"s": 28,
"text": "The numpy.less() : checks whether x1 is lesser than x2 or not. Syntax : "
},
{
"code": null,
"e": 127,
"s": 101,
"text": "numpy.less(x1, x2[, out])"
},
... |
How to Design a Web Page in HTML? | 09 Mar, 2022
HTML is known as HyperText Markup Language. It is a combination of both Hypertext and Markup language. Here hypertext means the link between the web pages and markup is used to define the text document within tag which defines the structure of web pages. It acts as a skeleton of a web page and without HTML... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n09 Mar, 2022"
},
{
"code": null,
"e": 593,
"s": 28,
"text": "HTML is known as HyperText Markup Language. It is a combination of both Hypertext and Markup language. Here hypertext means the link between the web pages and markup is used t... |
Create a Responsive Navbar using ReactJS | 30 Jul, 2021
In this Article, We will create a functioning navigation bar using Reactjs.
Problem statement: Create a navigation bar using reactJS & styled-component
Modules required:
npmcreate-react-appstyled-componentsreact-router-dom
npm
create-react-app
styled-components
react-router-dom
Basic Setup: For creating a ... | [
{
"code": null,
"e": 54,
"s": 26,
"text": "\n30 Jul, 2021"
},
{
"code": null,
"e": 130,
"s": 54,
"text": "In this Article, We will create a functioning navigation bar using Reactjs."
},
{
"code": null,
"e": 206,
"s": 130,
"text": "Problem statement: Create a n... |
Multimap in C++ Standard Template Library (STL) | 17 Jan, 2022
Multimap is similar to a map with the addition that multiple elements can have the same keys. Also, it is NOT required that the key-value and mapped value pair have to be unique in this case. One important thing to note about multimap is that multimap keeps all the keys in sorted order always. These proper... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n17 Jan, 2022"
},
{
"code": null,
"e": 429,
"s": 52,
"text": "Multimap is similar to a map with the addition that multiple elements can have the same keys. Also, it is NOT required that the key-value and mapped value pair have to be uni... |
HTML5 <audio> Tag | 15 Jul, 2022
Since the release of HTML5, audios can be added to webpages using the “audio” tag. Previously, audios could be only played on web pages using web plugins like Flash. The “audio” tag is an inline element that is used to embed sound files into a web page. It is a useful tag if you want to add audio such as s... | [
{
"code": null,
"e": 53,
"s": 25,
"text": "\n15 Jul, 2022"
},
{
"code": null,
"e": 400,
"s": 53,
"text": "Since the release of HTML5, audios can be added to webpages using the “audio” tag. Previously, audios could be only played on web pages using web plugins like Flash. The “aud... |
Output of C programs | Set 31 (Pointers) | 19 Apr, 2018
Prerequisite: Pointers in C/C++
Question 1What will be the output?#include<stdio.h> int main(){ int a[] = { 1, 2, 3, 4, 5} ; int *ptr; ptr = a; printf(" %d ", *( ptr + 1) ); return 0;}output 2
Description:It is possible to assign an array to a pointer. so, when ptr = a; is executed the ... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n19 Apr, 2018"
},
{
"code": null,
"e": 84,
"s": 52,
"text": "Prerequisite: Pointers in C/C++"
},
{
"code": null,
"e": 2230,
"s": 84,
"text": "Question 1What will be the output?#include<stdio.h> int main(){ int a... |
outtextxy() function in C | 05 Dec, 2019
The header file graphics.h contains outtextxy() function which displays the text or string at a specified point (x, y) on the screen.
Syntax :
void outtextxy(int x, int y, char *string);
where, x, y are coordinates of
the point and, third argument contains
the address of string to be displayed.
Examples... | [
{
"code": null,
"e": 54,
"s": 26,
"text": "\n05 Dec, 2019"
},
{
"code": null,
"e": 188,
"s": 54,
"text": "The header file graphics.h contains outtextxy() function which displays the text or string at a specified point (x, y) on the screen."
},
{
"code": null,
"e": 197... |
How to setup Competitive Programming in Visual Studio Code for C++ | 11 May, 2022
We need to install GCC compilers for Windows. Linux has already GCC installed.
1.Download and Install the MinGW for GCC compiler using this link.
2.Open Control Panel in your system and then select: System (Control Panel)
3.Click on the Advanced system settings
4.Click on Environment Variables. In the sect... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n11 May, 2022"
},
{
"code": null,
"e": 131,
"s": 52,
"text": "We need to install GCC compilers for Windows. Linux has already GCC installed."
},
{
"code": null,
"e": 618,
"s": 131,
"text": "1.Download and Install the... |
Python | Grouping similar substrings in list | 17 Jun, 2021
Sometimes we have an application in which we require to group common prefix strings into one such that further processing can be done according to the grouping. This type of grouping is useful in the cases of Machine Learning and Web Development. Let’s discuss certain ways in which this can be done.Method ... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n17 Jun, 2021"
},
{
"code": null,
"e": 596,
"s": 28,
"text": "Sometimes we have an application in which we require to group common prefix strings into one such that further processing can be done according to the grouping. This type of g... |
Inheritance in C++ | 13 Jul, 2022
The capability of a class to derive properties and characteristics from another class is called Inheritance. Inheritance is one of the most important features of Object-Oriented Programming.
Inheritance is a feature or a process in which, new classes are created from the existing classes. The new class cr... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n13 Jul, 2022"
},
{
"code": null,
"e": 244,
"s": 52,
"text": "The capability of a class to derive properties and characteristics from another class is called Inheritance. Inheritance is one of the most important features of Object-Orien... |
Simplifying Context Free Grammars | 11 Apr, 2022
The definition of context free grammars (CFGs) allows us to develop a wide variety of grammars. Most of the time, some of the productions of CFGs are not useful and are redundant. This happens because the definition of CFGs does not restrict us from making these redundant productions.
By simplifying CFGs ... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n11 Apr, 2022"
},
{
"code": null,
"e": 339,
"s": 52,
"text": "The definition of context free grammars (CFGs) allows us to develop a wide variety of grammars. Most of the time, some of the productions of CFGs are not useful and are redun... |
Joining Threads in Java | java.lang.Thread class provides a method join() which serves the following purposes usign its overloaded version.
join() − The current thread invokes this method on a second thread, causing the current thread to block until the second thread terminates.
join() − The current thread invokes this method on a second thread... | [
{
"code": null,
"e": 1176,
"s": 1062,
"text": "java.lang.Thread class provides a method join() which serves the following purposes usign its overloaded version."
},
{
"code": null,
"e": 1316,
"s": 1176,
"text": "join() − The current thread invokes this method on a second thread, ... |
Minimum Operations | Practice | GeeksforGeeks | Given a number N. Find the minimum number of operations required to reach N starting from 0. You have 2 operations available:
Double the number
Add one to the number
Example 1:
Input:
N = 8
Output: 4
Explanation: 0 + 1 = 1, 1 + 1 = 2,
2 * 2 = 4, 4 * 2 = 8
​Example 2:
Input:
N = 7
Output: 5
Explanation: 0 + 1 = ... | [
{
"code": null,
"e": 352,
"s": 226,
"text": "Given a number N. Find the minimum number of operations required to reach N starting from 0. You have 2 operations available:"
},
{
"code": null,
"e": 371,
"s": 352,
"text": "Double the number "
},
{
"code": null,
"e": 393,... |
How to open multiple filenames in Tkinter and add the file names to a list? | To open a file dialog in a tkinter application, tkinter provides the tkfiledialog package which creates a dialog box to interact with the external files located on the system. In order to work with filedialog, we have to first import the package using the following command,
import tkinter.filedialog as fd
To open the e... | [
{
"code": null,
"e": 1337,
"s": 1062,
"text": "To open a file dialog in a tkinter application, tkinter provides the tkfiledialog package which creates a dialog box to interact with the external files located on the system. In order to work with filedialog, we have to first import the package using t... |
New Algorithm to Generate Prime Numbers from 1 to Nth Number - GeeksforGeeks | 24 Apr, 2019
Apart from Sieve of Eratosthenes method to generate Prime numbers, we can implement a new Algorithm for generating prime numbers from 1 to N.
It might be amazing to know that all the prime numbers ≥ 5 can be traced from a pattern:Let’s try to understand the series:
Series 1:5 + 6 = 1111 + 6 = 1717 + 6 = 23... | [
{
"code": null,
"e": 24107,
"s": 24079,
"text": "\n24 Apr, 2019"
},
{
"code": null,
"e": 24249,
"s": 24107,
"text": "Apart from Sieve of Eratosthenes method to generate Prime numbers, we can implement a new Algorithm for generating prime numbers from 1 to N."
},
{
"code":... |
How to Convert Binary to Hexadecimal? | Binary is the simplest kind of number system that uses only two digits of 0 and 1 (i.e. value of base 2). Since digital electronics have only these two states (either 0 or 1), so binary number is most preferred in modern computer engineer, networking and communication specialists, and other professionals.
Whereas Hexad... | [
{
"code": null,
"e": 1369,
"s": 1062,
"text": "Binary is the simplest kind of number system that uses only two digits of 0 and 1 (i.e. value of base 2). Since digital electronics have only these two states (either 0 or 1), so binary number is most preferred in modern computer engineer, networking an... |
Create a dynamic table name from current year in MySQL like 2019 | To create a table name like year (2019), use PREPARE statement. Let us first create a table −
mysql> create table DemoTable1959
(
UserName varchar(20)
);
Query OK, 0 rows affected (0.00 sec)
Insert some records in the table using insert command −
mysql> insert into DemoTable1959 values('Chris');
Query OK, 1 ro... | [
{
"code": null,
"e": 1156,
"s": 1062,
"text": "To create a table name like year (2019), use PREPARE statement. Let us first create a table −"
},
{
"code": null,
"e": 1262,
"s": 1156,
"text": "mysql> create table DemoTable1959\n (\n UserName varchar(20)\n );\nQuery OK, 0 row... |
Why I Think Python is Perfect for Machine Learning and Artificial Intelligence | by Andrew Luashchuk | Towards Data Science | This article about why Python is good for ML and AI is originally posted on Django Stars blog.
Artificial Intelligence (AI) and Machine Learning (ML) are the new black of the IT industry. While discussions over the safety of its development keep escalating, developers expand abilities and capacity of artificial intelle... | [
{
"code": null,
"e": 267,
"s": 172,
"text": "This article about why Python is good for ML and AI is originally posted on Django Stars blog."
},
{
"code": null,
"e": 783,
"s": 267,
"text": "Artificial Intelligence (AI) and Machine Learning (ML) are the new black of the IT industry... |
NLP Text Preprocessing: Steps, tools, and examples | by Viet Hoang Tran Duong | Towards Data Science | Text data is everywhere, from your daily Facebook or Twitter newsfeed to textbooks and customer feedback. Data is the new oil, and text is an oil well that we need to drill deeper. Before we can actually use the oil, we must preprocess it so it fits our machines. Same for data, we must clean and preprocess the data to ... | [
{
"code": null,
"e": 623,
"s": 172,
"text": "Text data is everywhere, from your daily Facebook or Twitter newsfeed to textbooks and customer feedback. Data is the new oil, and text is an oil well that we need to drill deeper. Before we can actually use the oil, we must preprocess it so it fits our m... |
Python code to move spaces to front of string in single traversal - GeeksforGeeks | 23 Nov, 2020
Given a string that has set of words and spaces, write a program to move all spaces to front of string, by traversing the string only once.
Examples:
Input : str = "geeks for geeks"
Output : ste = " geeksforgeeks"
Input : str = "move these spaces to beginning"
Output : str = " movethesespacestobegin... | [
{
"code": null,
"e": 23926,
"s": 23898,
"text": "\n23 Nov, 2020"
},
{
"code": null,
"e": 24066,
"s": 23926,
"text": "Given a string that has set of words and spaces, write a program to move all spaces to front of string, by traversing the string only once."
},
{
"code": n... |
Python Type Object | Everything in Python is an object including classes. All classes are instances of a class called "type".The type object is also an instance of type class. You can inspect the inheritance hierarchy of class by examining the __bases__ attribute of a class object. type() method returns class type of the argument(object) p... | [
{
"code": null,
"e": 1577,
"s": 1062,
"text": "Everything in Python is an object including classes. All classes are instances of a class called \"type\".The type object is also an instance of type class. You can inspect the inheritance hierarchy of class by examining the __bases__ attribute of a cla... |
Difference between EnumMap and HashMap in Java | EnumMap is introduced in JDK5. It is designed to use Enum as key in the Map. It is also the implementation of the Map interface. All of the key in the EnumMap should be of the same enum type. In EnumMap , key can’t be null and any it will throw NullPointerException.
As per java docs −
EnumMap internally using as array... | [
{
"code": null,
"e": 1329,
"s": 1062,
"text": "EnumMap is introduced in JDK5. It is designed to use Enum as key in the Map. It is also the implementation of the Map interface. All of the key in the EnumMap should be of the same enum type. In EnumMap , key can’t be null and any it will throw NullPoin... |
Java - max() Method | This method gives the maximum of the two arguments. The argument can be int, float, long, double.
This method has the following variants −
double max(double arg1, double arg2)
float max(float arg1, float arg2)
int max(int arg1, int arg2)
long max(long arg1, long arg2)
Here is the detail of parameters −
This method acc... | [
{
"code": null,
"e": 2475,
"s": 2377,
"text": "This method gives the maximum of the two arguments. The argument can be int, float, long, double."
},
{
"code": null,
"e": 2516,
"s": 2475,
"text": "This method has the following variants −"
},
{
"code": null,
"e": 2647,
... |
Python program to check credit card number is valid or not | Suppose we have a credit card number. We have to check whether the card number is valid or not. The card numbers have certain properties −
It will start with 4, 5 and 6
It will start with 4, 5 and 6
It will be 16 digits’ long
It will be 16 digits’ long
Numbers must contain only digits
Numbers must contain only digits
I... | [
{
"code": null,
"e": 1201,
"s": 1062,
"text": "Suppose we have a credit card number. We have to check whether the card number is valid or not. The card numbers have certain properties −"
},
{
"code": null,
"e": 1231,
"s": 1201,
"text": "It will start with 4, 5 and 6"
},
{
... |
How to use HTML5 GeoLocation API with Google Maps? | HTML5 Geolocation API lets you share your location with your favorite websites. A Javascript can capture your latitude and longitude and can be sent to backend web server and do fancy location-aware things like finding local businesses or showing your location on a map. The geolocation coordinates specify the geographi... | [
{
"code": null,
"e": 1408,
"s": 1062,
"text": "HTML5 Geolocation API lets you share your location with your favorite websites. A Javascript can capture your latitude and longitude and can be sent to backend web server and do fancy location-aware things like finding local businesses or showing your l... |
Bajaj Finserv Interview Experience for Data Engineer - GeeksforGeeks | 26 Aug, 2021
Round 1 (API Round):
The first round was the challenge round where we were asked to upload our name, email, college, and other details by using the open API given by the company. A maximum of 10 chances was given to get a success message.
Round 2 (Coding round):
After two hours we got the shortlisted stud... | [
{
"code": null,
"e": 25078,
"s": 25050,
"text": "\n26 Aug, 2021"
},
{
"code": null,
"e": 25099,
"s": 25078,
"text": "Round 1 (API Round):"
},
{
"code": null,
"e": 25318,
"s": 25099,
"text": "The first round was the challenge round where we were asked to upload... |
Program to find GCD or HCF of two numbers in C++ | In this tutorial, we will be discussing a program to find GCD and HCF of two numbers.
For this we will be provided with two numbers. Our task is to find the GCD or HCF (highest common factor) for those given two numbers.
Live Demo
#include <iostream>
using namespace std;
int gcd(int a, int b){
if (a == 0)
ret... | [
{
"code": null,
"e": 1148,
"s": 1062,
"text": "In this tutorial, we will be discussing a program to find GCD and HCF of two numbers."
},
{
"code": null,
"e": 1283,
"s": 1148,
"text": "For this we will be provided with two numbers. Our task is to find the GCD or HCF (highest commo... |
Fibonacci Coding | 18 Oct, 2021
Fibonacci coding encodes an integer into binary number using Fibonacci Representation of the number. The idea is based on Zeckendorf’s Theorem which states that every positive integer can be written uniquely as a sum of distinct non-neighboring Fibonacci numbers (0, 1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89, 14... | [
{
"code": null,
"e": 54,
"s": 26,
"text": "\n18 Oct, 2021"
},
{
"code": null,
"e": 376,
"s": 54,
"text": "Fibonacci coding encodes an integer into binary number using Fibonacci Representation of the number. The idea is based on Zeckendorf’s Theorem which states that every positiv... |
p5.js camera() Method | 04 Mar, 2021
The camera() function in p5.js is used to set the virtual camera’s position on a 3D sketch. This can be used to simulate the position of the camera as it would move around the scene making it possible to view objects from various angles.
The parameters of this function include setting the position for the ... | [
{
"code": null,
"e": 54,
"s": 26,
"text": "\n04 Mar, 2021"
},
{
"code": null,
"e": 292,
"s": 54,
"text": "The camera() function in p5.js is used to set the virtual camera’s position on a 3D sketch. This can be used to simulate the position of the camera as it would move around th... |
Perform DDoS attack using Torshammer | 11 Jul, 2022
There are very few methods available which claim to be successful for DDoS or any type of network loss. Let’s see one of such method to perform DDoS attack. This attack is really powerful and requires the only skill that you should know how to operate commands on Kali Linux Operating System.
First of all, ... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n11 Jul, 2022"
},
{
"code": null,
"e": 345,
"s": 52,
"text": "There are very few methods available which claim to be successful for DDoS or any type of network loss. Let’s see one of such method to perform DDoS attack. This attack is re... |
Built-in Objects in Python-builtins | 26 Mar, 2020
This Python module provides direct access to all ‘built-in’ identifiers of Python. For example, builtins.open is the full name for the built-in function open(). This module is not normally accessed explicitly by most applications, but can be useful in modules that provide objects with the same name as a bu... | [
{
"code": null,
"e": 53,
"s": 25,
"text": "\n26 Mar, 2020"
},
{
"code": null,
"e": 429,
"s": 53,
"text": "This Python module provides direct access to all ‘built-in’ identifiers of Python. For example, builtins.open is the full name for the built-in function open(). This module i... |
Python | Smile detection using OpenCV | 26 May, 2021
Emotion detectors are used in many industries, one being the media industry where it is important for the companies to determine the public reaction to their products. In this article, we are going to build a smile detector using OpenCV which takes in live feed from webcam. The smile/happiness detector tha... | [
{
"code": null,
"e": 54,
"s": 26,
"text": "\n26 May, 2021"
},
{
"code": null,
"e": 518,
"s": 54,
"text": "Emotion detectors are used in many industries, one being the media industry where it is important for the companies to determine the public reaction to their products. In thi... |
Python | Make pair from two list such that elements are not same in pairs | 28 Feb, 2019
Given two lists, the task is to create pairs of elements (pairs can be repeated) from two list such that elements are not same in pairs.
Examples:
Input : list1 = [100, 20, 30, 400]
list2 = [400, 2, 30]
Output:
[[100, 400], [100, 2], [100, 30],
[20, 400], [20, 2], [20, 30],
[30, 400], [30, 2], [4... | [
{
"code": null,
"e": 54,
"s": 26,
"text": "\n28 Feb, 2019"
},
{
"code": null,
"e": 191,
"s": 54,
"text": "Given two lists, the task is to create pairs of elements (pairs can be repeated) from two list such that elements are not same in pairs."
},
{
"code": null,
"e": ... |
How to create Price Range Selector in ReactJS? | 22 Jan, 2021
Price Range Selector means the user is able to select the range between the given values. Material UI for React has this component available for us and it is very easy to integrate. Price Ranges Selectors is a very popular feature for filter the results on the basis of the range selected by the user.
Creat... | [
{
"code": null,
"e": 53,
"s": 25,
"text": "\n22 Jan, 2021"
},
{
"code": null,
"e": 355,
"s": 53,
"text": "Price Range Selector means the user is able to select the range between the given values. Material UI for React has this component available for us and it is very easy to int... |
numpy.log() in Python | 04 Dec, 2020
The numpy.log() is a mathematical function that helps user to calculate Natural logarithm of x where x belongs to all the input array elements.Natural logarithm log is the inverse of the exp(), so that log(exp(x)) = x. The natural logarithm is log in base e.
Syntax :numpy.log(x[, out] = ufunc ‘log1p’)Param... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n04 Dec, 2020"
},
{
"code": null,
"e": 311,
"s": 52,
"text": "The numpy.log() is a mathematical function that helps user to calculate Natural logarithm of x where x belongs to all the input array elements.Natural logarithm log is the in... |
Hyperlink Vs Hypertext | 19 Oct, 2021
Both the term are twins to each other and perform with each other basically complete each other. But few times we get confused about which one is the which one really. To clear that confusion, we will discuss the specificness of both in detail with the proper example and explain the differences as well. Bo... | [
{
"code": null,
"e": 54,
"s": 26,
"text": "\n19 Oct, 2021"
},
{
"code": null,
"e": 411,
"s": 54,
"text": "Both the term are twins to each other and perform with each other basically complete each other. But few times we get confused about which one is the which one really. To cle... |
Kotlin Standard Input/Output | 04 Aug, 2021
In this article, we will discuss here how to take input and how to display the output on the screen in Kotlin. Kotlin standard I/O operations are performed to flow sequence of bytes or byte streams from input device such as Keyboard to the main memory of the system and from main memory to output device suc... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n04 Aug, 2021"
},
{
"code": null,
"e": 374,
"s": 52,
"text": "In this article, we will discuss here how to take input and how to display the output on the screen in Kotlin. Kotlin standard I/O operations are performed to flow sequence o... |
Python | Delete elements with frequency atmost K | 15 Apr, 2019
There are many methods that can be employed to perform the deletion in the list. Be it remove function, pop function and many other functions. But most of the times, we usually don’t deal with the simple deletion, but with certain constraints. This article discusses certain ways in which we can delete only... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n15 Apr, 2019"
},
{
"code": null,
"e": 383,
"s": 28,
"text": "There are many methods that can be employed to perform the deletion in the list. Be it remove function, pop function and many other functions. But most of the times, we usuall... |
Snake Water Gun game using Python and C | 12 Jan, 2022
Snake Water Gun is one of the famous two-player game played by many people. It is a hand game in which the player randomly chooses any of the three forms i.e. snake, water, and gun. Here, we are going to implement this game using python.
This python project is to build a game for a single player that play... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n12 Jan, 2022"
},
{
"code": null,
"e": 291,
"s": 52,
"text": "Snake Water Gun is one of the famous two-player game played by many people. It is a hand game in which the player randomly chooses any of the three forms i.e. snake, water, a... |
Print shortest path to print a string on screen - GeeksforGeeks | 16 Jun, 2021
Given a screen containing alphabets from A-Z, we can go from one character to another characters using a remote. The remote contains left, right, top and bottom keys.Find shortest possible path to type all characters of given string using the remote. Initial position is top left and all characters of input... | [
{
"code": null,
"e": 26167,
"s": 26139,
"text": "\n16 Jun, 2021"
},
{
"code": null,
"e": 26519,
"s": 26167,
"text": "Given a screen containing alphabets from A-Z, we can go from one character to another characters using a remote. The remote contains left, right, top and bottom ke... |
Implementation of Binomial Heap | Set - 2 (delete() and decreseKey()) - GeeksforGeeks | 17 Feb, 2018
In previous post i.e. Set 1 we have discussed that implements these below functions:
insert(H, k): Inserts a key ‘k’ to Binomial Heap ‘H’. This operation first creates a Binomial Heap with single key ‘k’, then calls union on H and the new Binomial heap.getMin(H): A simple way to getMin() is to traverse the... | [
{
"code": null,
"e": 25733,
"s": 25705,
"text": "\n17 Feb, 2018"
},
{
"code": null,
"e": 25818,
"s": 25733,
"text": "In previous post i.e. Set 1 we have discussed that implements these below functions:"
},
{
"code": null,
"e": 26542,
"s": 25818,
"text": "inser... |
Resize Multiple Images using OpenCV-Python - GeeksforGeeks | 26 Sep, 2021
In this article, we are going to write a python script using the OpenCV library to Resize Multiple Images and save them as an image file. Resizing the image refers to the growth of the images. Measurement works best in the use of multiple images and in machine learning applications. It helps to reduce the ... | [
{
"code": null,
"e": 25563,
"s": 25535,
"text": "\n26 Sep, 2021"
},
{
"code": null,
"e": 26102,
"s": 25563,
"text": "In this article, we are going to write a python script using the OpenCV library to Resize Multiple Images and save them as an image file. Resizing the image refers... |
Argument Coercion in C/C++ - GeeksforGeeks | 26 Dec, 2018
Argument coercion is a feature of function prototypes by which the compiler implicitly converts the datatype of the arguments passed during the function call to match the datatype in the definition of the function.
It follows Argument promotion rules. Therefore a lower datatype maybe converted into a highe... | [
{
"code": null,
"e": 25478,
"s": 25450,
"text": "\n26 Dec, 2018"
},
{
"code": null,
"e": 25693,
"s": 25478,
"text": "Argument coercion is a feature of function prototypes by which the compiler implicitly converts the datatype of the arguments passed during the function call to ma... |
Encode given string by replacing substrings with prefix same as itself with * - GeeksforGeeks | 29 Dec, 2021
Given string str of size N containing only lowercase English letters. The task is to encrypt the string such that the substrings having same prefix as itself are replaced by a *. Generate the encrypted string.
Note: If the string can be encrypted in multiple ways, find the smallest encrypted string.
Examp... | [
{
"code": null,
"e": 27535,
"s": 27507,
"text": "\n29 Dec, 2021"
},
{
"code": null,
"e": 27745,
"s": 27535,
"text": "Given string str of size N containing only lowercase English letters. The task is to encrypt the string such that the substrings having same prefix as itself are r... |
Executable Comments in Java - GeeksforGeeks | 18 Apr, 2019
A comment is a statement that is not executed by the compiler or the interpreter, but before the lexical transformation of the program in the compiler, the contents of the program are encoded into ASCII to make the processing easier. Consider this program:
class Main{ public static void main(String[] ... | [
{
"code": null,
"e": 25249,
"s": 25221,
"text": "\n18 Apr, 2019"
},
{
"code": null,
"e": 25506,
"s": 25249,
"text": "A comment is a statement that is not executed by the compiler or the interpreter, but before the lexical transformation of the program in the compiler, the content... |
Common Memory/Pointer Related bug in C Programs - GeeksforGeeks | 01 Oct, 2018
Dereferencing an unknown memory location : C programmers mostly use scanf() function to take input, but sometimes a small mistake can bring a bug or even crash whole program.The syntax for scanf() is scanf(“%d”, &a);. It might be possible to miss a & and write &a as a so now scanf(“%d”, a); is dereferencin... | [
{
"code": null,
"e": 25477,
"s": 25449,
"text": "\n01 Oct, 2018"
},
{
"code": null,
"e": 26025,
"s": 25477,
"text": "Dereferencing an unknown memory location : C programmers mostly use scanf() function to take input, but sometimes a small mistake can bring a bug or even crash who... |
Data Structures | Heap | Question 1 - GeeksforGeeks | 07 Nov, 2019
What is the time complexity of Build Heap operation. Build Heap is used to build a max(or min) binary heap from a given array. Build Heap is used in Heap Sort as a first step for sorting.(A) O(nLogn)(B) O(n^2)(C) O(Logn)(D) O(n)Answer: (D)Explanation: Following is algorithm for building a Heap of an input ... | [
{
"code": null,
"e": 26097,
"s": 26069,
"text": "\n07 Nov, 2019"
},
{
"code": null,
"e": 26413,
"s": 26097,
"text": "What is the time complexity of Build Heap operation. Build Heap is used to build a max(or min) binary heap from a given array. Build Heap is used in Heap Sort as a... |
Find the equation of plane which passes through two points and parallel to a given axis - GeeksforGeeks | 27 Mar, 2022
Given two points A(x1, y1, z1) and B(x2, y2, z2) and a set of points (a, b, c) which represent the axis (ai + bj + ck), the task is to find the equation of plane which passes through the given points A and B and parallel to the given axis.
Examples:
Input: x1 = 1, y1 = 2, z1 = 3, x2 = 3, y2 = 4, z2 = 5, a... | [
{
"code": null,
"e": 26561,
"s": 26533,
"text": "\n27 Mar, 2022"
},
{
"code": null,
"e": 26801,
"s": 26561,
"text": "Given two points A(x1, y1, z1) and B(x2, y2, z2) and a set of points (a, b, c) which represent the axis (ai + bj + ck), the task is to find the equation of plane w... |
Python - Find all duplicate characters in string - GeeksforGeeks | 19 Feb, 2021
Given a string, find all the duplicate characters which are similar to each others.
Let’s look at the example.Examples:
Input : hello
Output : l
Input : geeksforgeeeks
Output : e g k s
We have discussed a solution in below post.Print all the duplicates in the input string
We can solve this problem quickl... | [
{
"code": null,
"e": 25493,
"s": 25465,
"text": "\n19 Feb, 2021"
},
{
"code": null,
"e": 25577,
"s": 25493,
"text": "Given a string, find all the duplicate characters which are similar to each others."
},
{
"code": null,
"e": 25613,
"s": 25577,
"text": "Let’s ... |
Place plots side by side in Matplotlib - GeeksforGeeks | 19 Aug, 2021
Matplotlib is the most popular Python library for plotting graphs and visualizing our data. In Matplotlib we can create multiple plots by calling them once. To create multiple plots we use the subplot function of pyplot module in Matplotlib.
Syntax: plt.subplot(nrows, .ncolumns, index)
Parameters:
nrows is... | [
{
"code": null,
"e": 25537,
"s": 25509,
"text": "\n19 Aug, 2021"
},
{
"code": null,
"e": 25779,
"s": 25537,
"text": "Matplotlib is the most popular Python library for plotting graphs and visualizing our data. In Matplotlib we can create multiple plots by calling them once. To cre... |
LinkedList set() Method in Java - GeeksforGeeks | 10 Dec, 2018
The Java.util.LinkedList.set() method is used to replace any particular element in the linked list created using the LinkedList class with another element. This can be done by specifying the position of the element to be replaced and the new element in the parameter of the set() method.
Syntax:
LinkedList.... | [
{
"code": null,
"e": 25719,
"s": 25691,
"text": "\n10 Dec, 2018"
},
{
"code": null,
"e": 26007,
"s": 25719,
"text": "The Java.util.LinkedList.set() method is used to replace any particular element in the linked list created using the LinkedList class with another element. This ca... |
Iterator Pattern - GeeksforGeeks | 08 Apr, 2022
Iterator Pattern is a relatively simple and frequently used design pattern. There are a lot of data structures/collections available in every language. Each collection must provide an iterator that lets it iterate through its objects. However while doing so it should make sure that it does not expose its i... | [
{
"code": null,
"e": 25803,
"s": 25775,
"text": "\n08 Apr, 2022"
},
{
"code": null,
"e": 26393,
"s": 25803,
"text": "Iterator Pattern is a relatively simple and frequently used design pattern. There are a lot of data structures/collections available in every language. Each collec... |
Subarrays with sum K | Practice | GeeksforGeeks | Given an unsorted array of integers, find the number of continuous subarrays having sum exactly equal to a given number k.
Example 1:
Input:
N = 5
Arr = {10 , 2, -2, -20, 10}
k = -10
Output: 3
Explaination:
Subarrays: arr[0...3], arr[1...4], arr[3..4]
have sum exactly equal to -10.
Example 2:
Input:
N = 6
Arr = {9, ... | [
{
"code": null,
"e": 361,
"s": 238,
"text": "Given an unsorted array of integers, find the number of continuous subarrays having sum exactly equal to a given number k."
},
{
"code": null,
"e": 373,
"s": 361,
"text": "\nExample 1:"
},
{
"code": null,
"e": 523,
"s":... |
Network Analysis of the Romance of Three Kingdoms | by Dimitris Manolidis | Towards Data Science | Recently, I posted an article about the social networks of the 14th-century novel Romance of Three Kingdoms. In the article, I discuss the social networks which emerge when analyzing the interactions of the characters of the novel. Furthermore, with the use of centrality measures, I determine who the most influential c... | [
{
"code": null,
"e": 588,
"s": 171,
"text": "Recently, I posted an article about the social networks of the 14th-century novel Romance of Three Kingdoms. In the article, I discuss the social networks which emerge when analyzing the interactions of the characters of the novel. Furthermore, with the u... |
C library function - isgraph() | The C library function int isgraph(int c) checks if the character has graphical representation.
The characters with graphical representations are all those characters that can be printed except for whitespace characters (like ' '), which is not considered as isgraph characters.
Following is the declaration for isgraph(... | [
{
"code": null,
"e": 2103,
"s": 2007,
"text": "The C library function int isgraph(int c) checks if the character has graphical representation."
},
{
"code": null,
"e": 2286,
"s": 2103,
"text": "The characters with graphical representations are all those characters that can be pri... |
\nrightarrow - Tex Command | \nrightarrow - Used to create nrightarrow symbol.
{ \nrightarrow}
\nrightarrow command draws nrightarrow symbol.
\nrightarrow
↛
\nrightarrow
↛
\nrightarrow
14 Lectures
52 mins
Ashraf Said
11 Lectures
1 hours
Ashraf Said
9 Lectures
1 hours
Emenwa Global, Ejike IfeanyiCh... | [
{
"code": null,
"e": 8036,
"s": 7986,
"text": "\\nrightarrow - Used to create nrightarrow symbol."
},
{
"code": null,
"e": 8052,
"s": 8036,
"text": "{ \\nrightarrow}"
},
{
"code": null,
"e": 8099,
"s": 8052,
"text": "\\nrightarrow command draws nrightarrow sym... |
PHP | preg_replace() Function - GeeksforGeeks | 26 Jul, 2019
The preg_replace() function is an inbuilt function in PHP which is used to perform a regular expression for search and replace the content.
Syntax:
preg_replace( $pattern, $replacement, $subject, $limit, $count )
Parameters: This function accepts five parameters as mention above and describe below.
$patter... | [
{
"code": null,
"e": 26293,
"s": 26265,
"text": "\n26 Jul, 2019"
},
{
"code": null,
"e": 26433,
"s": 26293,
"text": "The preg_replace() function is an inbuilt function in PHP which is used to perform a regular expression for search and replace the content."
},
{
"code": n... |
re.MatchObject.group() function in Python Regex - GeeksforGeeks | 27 May, 2021
re.MatchObject.group() method returns the complete matched subgroup by default or a tuple of matched subgroups depending on the number of arguments
Syntax: re.MatchObject.group([group])
Parameter:
group: (optional) group defaults to zero (meaning that it it will return the complete matched string). Return ... | [
{
"code": null,
"e": 25718,
"s": 25690,
"text": "\n27 May, 2021"
},
{
"code": null,
"e": 25866,
"s": 25718,
"text": "re.MatchObject.group() method returns the complete matched subgroup by default or a tuple of matched subgroups depending on the number of arguments"
},
{
"... |
How to get cookies from curl into a variable in PHP ? - GeeksforGeeks | 31 Dec, 2019
The cURL standing for Client URL refers to a library for transferring data using various protocols supporting cookies, HTTP, FTP, IMAP, POP3, HTTPS (with SSL Certification), etc. This example will illustrate how to get cookies from a PHP cURL into a variable. The functions provide an option to set a callba... | [
{
"code": null,
"e": 25743,
"s": 25715,
"text": "\n31 Dec, 2019"
},
{
"code": null,
"e": 26254,
"s": 25743,
"text": "The cURL standing for Client URL refers to a library for transferring data using various protocols supporting cookies, HTTP, FTP, IMAP, POP3, HTTPS (with SSL Certi... |
How to Remove Column from HTML Table using JavaScript ? - GeeksforGeeks | 20 May, 2020
Given an HTML table and the task is to remove the certain column from the HTML table. There are two approaches that are discussed below:
Approach 1: First, select the table and also get the rows of table using table.rows. Get the number of columns of a row and go through each one of the columns. Use str.se... | [
{
"code": null,
"e": 26033,
"s": 26005,
"text": "\n20 May, 2020"
},
{
"code": null,
"e": 26170,
"s": 26033,
"text": "Given an HTML table and the task is to remove the certain column from the HTML table. There are two approaches that are discussed below:"
},
{
"code": null... |
Google Search Automation with Python Selenium | We can perform Google search automation with Selenium webdriver in Python. First of all, we shall locate the Google search box with the help of any of the locators like id, css, xpath, class, or name.
Then simulate the action of pressing the ENTER key with the help of Keys.ENTER/Keys.RETURN. To perform this operation, ... | [
{
"code": null,
"e": 1263,
"s": 1062,
"text": "We can perform Google search automation with Selenium webdriver in Python. First of all, we shall locate the Google search box with the help of any of the locators like id, css, xpath, class, or name."
},
{
"code": null,
"e": 1581,
"s": ... |
Generate Sports Rankings with Data Science | by Percy Jaiswal | Towards Data Science | In this tutorial, we will go through one very popular algorithm used in generating rankings for sports teams. The method which we will be studying is called Colley Ratings.
Before going into depth, lets first understand why are these ranking systems required. Will a simple win-loss ratio not be enough? To answer this, ... | [
{
"code": null,
"e": 344,
"s": 171,
"text": "In this tutorial, we will go through one very popular algorithm used in generating rankings for sports teams. The method which we will be studying is called Colley Ratings."
},
{
"code": null,
"e": 661,
"s": 344,
"text": "Before going ... |
What are the differences between current_window_handle and window_handles methods in Selenium with python? | There are differences between current_window_handle and window_handles methods in Selenium. Both are methods to handle multiple windows. They differences are listed below −
current_window_handleThis method fetches the handle of the present window. Thus it deals with the window in focus at the moment. It returns the win... | [
{
"code": null,
"e": 1235,
"s": 1062,
"text": "There are differences between current_window_handle and window_handles methods in Selenium. Both are methods to handle multiple windows. They differences are listed below −"
},
{
"code": null,
"e": 1415,
"s": 1235,
"text": "current_w... |
How to create bubble maps in Python with Geospatial data | by Abdishakur | Towards Data Science | Ever thought how you can create bubble maps in Python with Geospatial data? I will show you how you can easily make a bubble maps both in a static format as well as an interactive one.
A bubble map uses size as an encoding variable. The size of the circle represents a numeric value on a Geographic area.
We often use Ch... | [
{
"code": null,
"e": 357,
"s": 172,
"text": "Ever thought how you can create bubble maps in Python with Geospatial data? I will show you how you can easily make a bubble maps both in a static format as well as an interactive one."
},
{
"code": null,
"e": 477,
"s": 357,
"text": "A... |
Logstash - Output Stage | Output is the last stage in Logstash pipeline, which send the filter data from input logs to a specified destination. Logstash offers multiple output plugins to stash the filtered log events to various different storage and searching engines.
Logstash can store the filtered logs in a File, Elasticsearch Engine, stdout,... | [
{
"code": null,
"e": 2298,
"s": 2055,
"text": "Output is the last stage in Logstash pipeline, which send the filter data from input logs to a specified destination. Logstash offers multiple output plugins to stash the filtered log events to various different storage and searching engines."
},
{
... |
First-Fit Allocation in Operating Systems - GeeksforGeeks | 28 Aug, 2020
For both fixed and dynamic memory allocation schemes, the operating system must keep list of each memory location noting which are free and which are busy. Then as new jobs come into the system, the free partitions must be allocated.
These partitions may be allocated by 4 ways:
1. First-Fit Memory Allocati... | [
{
"code": null,
"e": 24196,
"s": 24168,
"text": "\n28 Aug, 2020"
},
{
"code": null,
"e": 24430,
"s": 24196,
"text": "For both fixed and dynamic memory allocation schemes, the operating system must keep list of each memory location noting which are free and which are busy. Then as... |
How to Create a vector of specific type and length in R ? | 05 Apr, 2021
In this article, we will see how to create a vector of specified type and length in R programming language. To create a vector of specified data type and length in R we make use of function vector(). vector() function is also used to create empty vector.
Syntax:
vector(class of the data object, length of t... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n05 Apr, 2021"
},
{
"code": null,
"e": 283,
"s": 28,
"text": "In this article, we will see how to create a vector of specified type and length in R programming language. To create a vector of specified data type and length in R we make u... |
Publish Websites on GitHub Pages with a Custom Domain | 11 Feb, 2021
Publishing websites can sometimes be very tricky and could cost you some bucks as well but with GitHub Pages, the entire process is so seamless and easy that it just takes a few minutes to get your website live onto the internet. Although the process in itself is quite easy yet having a step-by-step guide ... | [
{
"code": null,
"e": 54,
"s": 26,
"text": "\n11 Feb, 2021"
},
{
"code": null,
"e": 389,
"s": 54,
"text": "Publishing websites can sometimes be very tricky and could cost you some bucks as well but with GitHub Pages, the entire process is so seamless and easy that it just takes a ... |
Slim Framework | Installation and Configuration | 10 May, 2022
Slim is a lightweight, easy to use and fast PHP framework used to develop the powerful website quickly with ease. Like other PHP frameworks, slim also supports routers, middlewares, bodyparser, page templates, encrypted cookies and much more. Prerequisites:
PHP installation on windowsEnvironment Setup To R... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n10 May, 2022"
},
{
"code": null,
"e": 286,
"s": 28,
"text": "Slim is a lightweight, easy to use and fast PHP framework used to develop the powerful website quickly with ease. Like other PHP frameworks, slim also supports routers, middle... |
PHP - Validation Example | Required field will check whether the field is filled or not in the proper way. Most of cases we will use the * symbol for required field.
Validation means check the input submitted by the user. There are two types of validation are available in PHP. They are as follows −
Client-Side Validation − Validation is performe... | [
{
"code": null,
"e": 3030,
"s": 2891,
"text": "Required field will check whether the field is filled or not in the proper way. Most of cases we will use the * symbol for required field."
},
{
"code": null,
"e": 3164,
"s": 3030,
"text": "Validation means check the input submitted ... |
Transpose graph | 03 Jun, 2022
Transpose of a directed graph G is another directed graph on the same set of vertices with all of the edges reversed compared to the orientation of the corresponding edges in G. That is, if G contains an edge (u, v) then the converse/transpose/reverse of G contains an edge (v, u) and vice versa. Given a gr... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n03 Jun, 2022"
},
{
"code": null,
"e": 470,
"s": 52,
"text": "Transpose of a directed graph G is another directed graph on the same set of vertices with all of the edges reversed compared to the orientation of the corresponding edges in... |
Python program to convert seconds into hours, minutes and seconds | 28 Jan, 2019
Given an integer n (in seconds), convert it into hours, minutes and seconds.
Examples:
Input : 12345
Output : 3:25:45
Input : 3600
Output : 1:00:00
Approach #1 : Naive
This approach is simply a naive approach to get the hours, minutes and seconds by simple mathematical calculations.
# Python Program to C... | [
{
"code": null,
"e": 54,
"s": 26,
"text": "\n28 Jan, 2019"
},
{
"code": null,
"e": 131,
"s": 54,
"text": "Given an integer n (in seconds), convert it into hours, minutes and seconds."
},
{
"code": null,
"e": 141,
"s": 131,
"text": "Examples:"
},
{
"cod... |
Pass the value from child process to parent process | 06 Dec, 2019
Prerequisite: Pipe() and Fork() BasicWrite a C program in which the child process takes an input array and send it to the parent process using pipe() and fork() and then print it in the parent process.
Examples: Suppose we have an array a[]={1, 2, 3, 4, 5} in child process, then output should be 1 2 3 4 5.... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n06 Dec, 2019"
},
{
"code": null,
"e": 230,
"s": 28,
"text": "Prerequisite: Pipe() and Fork() BasicWrite a C program in which the child process takes an input array and send it to the parent process using pipe() and fork() and then print... |
Python - Sending Email using SMTP | Simple Mail Transfer Protocol (SMTP) is a protocol, which handles sending e-mail and routing e-mail between mail servers.
Python provides smtplib module, which defines an SMTP client session object that can be used to send mail to any Internet machine with an SMTP or ESMTP listener daemon.
Here is a simple syntax to cr... | [
{
"code": null,
"e": 2500,
"s": 2378,
"text": "Simple Mail Transfer Protocol (SMTP) is a protocol, which handles sending e-mail and routing e-mail between mail servers."
},
{
"code": null,
"e": 2669,
"s": 2500,
"text": "Python provides smtplib module, which defines an SMTP client... |
View the list of all variables in Google Chrome Console using JavaScript | 20 Sep, 2019
All the variables in Google Chrome can be listed for the use of debugging. There are two approaches to list all variables:
Method 1: Iterating through properties of the window object: The window object in JavaScript represents the current browser’s window. The properties of this object can be used to find ... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n20 Sep, 2019"
},
{
"code": null,
"e": 151,
"s": 28,
"text": "All the variables in Google Chrome can be listed for the use of debugging. There are two approaches to list all variables:"
},
{
"code": null,
"e": 534,
"s": 1... |
Difference between BeautifulSoup and Scrapy crawler | 16 Mar, 2021
Web scraping is a technique to fetch data from websites. While surfing on the web, many websites don’t allow the user to save data for personal use. One way is to manually copy-paste the data, which both tedious and time-consuming. Web Scraping is the automation of the data extraction process from websites... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n16 Mar, 2021"
},
{
"code": null,
"e": 600,
"s": 28,
"text": "Web scraping is a technique to fetch data from websites. While surfing on the web, many websites don’t allow the user to save data for personal use. One way is to manually cop... |
How to Get Current Date and Time in Various Format in Golang? | 17 Dec, 2021
Package “time” in Golang provides functionality for measuring and displaying time. The calendrical calculations always assume a Gregorian calendar, with no leap seconds. Using the “time.Now()” function you can get the date and time in the “yyyy-mm-dd hh:mm:ss.milliseconds timezone” format. This is simplest... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n17 Dec, 2021"
},
{
"code": null,
"e": 381,
"s": 28,
"text": "Package “time” in Golang provides functionality for measuring and displaying time. The calendrical calculations always assume a Gregorian calendar, with no leap seconds. Using... |
Python | Create a digital clock using Tkinter | 28 Apr, 2022
As we know Tkinter is used to create a variety of GUI (Graphical User Interface) applications. In this article we will learn how to create a Digital clock using Tkinter.
Prerequisites: -> Python functions -> Tkinter basics (Label Widget) -> Time module
How to Create a Digital Clock Using Python? | Ge... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n28 Apr, 2022"
},
{
"code": null,
"e": 224,
"s": 52,
"text": "As we know Tkinter is used to create a variety of GUI (Graphical User Interface) applications. In this article we will learn how to create a Digital clock using Tkinter. "
... |
JavaScript SyntaxError – Invalid regular expression flag “x” | 24 Jul, 2020
This JavaScript exception invalid regular expression flag occurs if the flags, written after the second slash in RegExp literal, are not from either of (g, i, m, s, u, or y).
Message:
SyntaxError: Syntax error in regular expression (Edge)
SyntaxError: invalid regular expression flag "x" (Firefox)
SyntaxEr... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n24 Jul, 2020"
},
{
"code": null,
"e": 203,
"s": 28,
"text": "This JavaScript exception invalid regular expression flag occurs if the flags, written after the second slash in RegExp literal, are not from either of (g, i, m, s, u, or y)."... |
How to calculate MOVING AVERAGE in a Pandas DataFrame? | 15 Jun, 2022
In this article, we will be looking at how to calculate the moving average in a pandas DataFrame. Moving Average is calculating the average of data over a period of time. The moving average is also known as the rolling mean and is calculated by averaging data of the time series within k periods of time.
S... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n15 Jun, 2022"
},
{
"code": null,
"e": 358,
"s": 52,
"text": "In this article, we will be looking at how to calculate the moving average in a pandas DataFrame. Moving Average is calculating the average of data over a period of time. The... |
C# | is Operator Keyword - GeeksforGeeks | 05 Aug, 2021
In the development of the software, typecasting is an inescapable thing. In many cases, one needs to convert an object(Type) into another object(Type) and sometimes got InvalidCastException. So, to overcome such types of exception C# provides is operator. The is operator is used to check if the run-time ty... | [
{
"code": null,
"e": 23914,
"s": 23886,
"text": "\n05 Aug, 2021"
},
{
"code": null,
"e": 24409,
"s": 23914,
"text": "In the development of the software, typecasting is an inescapable thing. In many cases, one needs to convert an object(Type) into another object(Type) and sometime... |
Longest common prefix | Practice | GeeksforGeeks | Given two strings str1 and str2 of the same length. Find the longest prefix of str1 which is common in str2.
Example 1:
Input:
str1 = "geeks"
str2 = "dgeek"
Output: 0 3
Explanation:
Longest prefix from str1
present in str2 is "geek"
starting at index 0 in str1
and ending at index 3.
Example 2:
Input:
str1 = "prac... | [
{
"code": null,
"e": 349,
"s": 238,
"text": "Given two strings str1 and str2 of the same length. Find the longest prefix of str1 which is common in str2. "
},
{
"code": null,
"e": 361,
"s": 349,
"text": "\nExample 1:"
},
{
"code": null,
"e": 528,
"s": 361,
"t... |
Connecting Cities With Minimum Cost in Python
| Suppose there are N cities numbered from 1 to N. We have connections, where each connection [i] is [city1, city2, cost] this represents the cost to connect city1 and city2 together. We have to find the minimum cost so that for every pair of cities, there exists a path of connections (possibly of length 1) that connects... | [
{
"code": null,
"e": 1498,
"s": 1062,
"text": "Suppose there are N cities numbered from 1 to N. We have connections, where each connection [i] is [city1, city2, cost] this represents the cost to connect city1 and city2 together. We have to find the minimum cost so that for every pair of cities, ther... |
GATE | GATE-CS-2017 (Set 1) | Question 15 - GeeksforGeeks | 28 Jun, 2021
The following functional dependencies hold true for the relational schema R{V, W, X, Y, Z}:
V -> W
VW -> X
Y -> VX
Y -> Z
Which of the following is irreducible equivalent for this set of functional dependencies?
(A) A(B) B(C) C(D) DAnswer: (A)Explanation: Given
V -> W
VW -> X
Y -> VX
Y -> Z
We need to fin... | [
{
"code": null,
"e": 24322,
"s": 24294,
"text": "\n28 Jun, 2021"
},
{
"code": null,
"e": 24414,
"s": 24322,
"text": "The following functional dependencies hold true for the relational schema R{V, W, X, Y, Z}:"
},
{
"code": null,
"e": 24445,
"s": 24414,
"text":... |
Tryit Editor v3.7 | Tryit: Bottom tooltip with top arrow | [] |
How to calculate the Percentage of a column in Pandas ? - GeeksforGeeks | 28 Jul, 2020
A Percentage is calculated by the mathematical formula of dividing the value by the sum of all the values and then multiplying the sum by 100. This is also applicable in Pandas Dataframes. Here, the pre-defined sum() method of pandas series is used to compute the sum of all the values of a column.
Syntax: ... | [
{
"code": null,
"e": 26288,
"s": 26260,
"text": "\n28 Jul, 2020"
},
{
"code": null,
"e": 26587,
"s": 26288,
"text": "A Percentage is calculated by the mathematical formula of dividing the value by the sum of all the values and then multiplying the sum by 100. This is also applica... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.