title stringlengths 3 221 | text stringlengths 17 477k | parsed listlengths 0 3.17k |
|---|---|---|
C Programming - Online Quiz | Following quiz provides Multiple Choice Questions (MCQs) related to C Programming Framework. You will have to read all the given answers and click over the correct answer. If you are not sure about the answer then you can check the answer using Show Answer button. You can use Next Quiz button to check new set of questi... | [
{
"code": null,
"e": 2421,
"s": 2084,
"text": "Following quiz provides Multiple Choice Questions (MCQs) related to C Programming Framework. You will have to read all the given answers and click over the correct answer. If you are not sure about the answer then you can check the answer using Show Ans... |
scanf() and fscanf() in C | The function scanf() is used to read formatted input from stdin in C language. It returns the whole number of characters written in it otherwise, returns a negative value.
Here is the syntax of scanf() in C language,
int scanf(const char *characters_set)
Here is an example of scanf() in C language,
Live Demo
#include ... | [
{
"code": null,
"e": 1234,
"s": 1062,
"text": "The function scanf() is used to read formatted input from stdin in C language. It returns the whole number of characters written in it otherwise, returns a negative value."
},
{
"code": null,
"e": 1279,
"s": 1234,
"text": "Here is th... |
Accessing index and value in a Python list | When we use a Python list, will be required to access its elements at different positions. In this article we will see how to get the index of specific elements in a list.
The below program sources the index value of different elements in given list. We supply the value of the element as a parameter and the index funct... | [
{
"code": null,
"e": 1234,
"s": 1062,
"text": "When we use a Python list, will be required to access its elements at different positions. In this article we will see how to get the index of specific elements in a list."
},
{
"code": null,
"e": 1430,
"s": 1234,
"text": "The below ... |
Python program to print all odd numbers in a range | In this article, we will learn about the solution and approach to solve the given problem statement.
Given a range, we need to print all the odd numbers in the given range.
The brute-force approach is discussed below −
Here we apply a range-based for loop which provides all the integers available in the input interval.... | [
{
"code": null,
"e": 1163,
"s": 1062,
"text": "In this article, we will learn about the solution and approach to solve the given problem statement."
},
{
"code": null,
"e": 1235,
"s": 1163,
"text": "Given a range, we need to print all the odd numbers in the given range."
},
{... |
10 quick Numpy tricks that will make life easier for a data scientist | by Harsh Maheshwari | Towards Data Science | Numpy was the only thing that made me, a die-hard C++ coder, shift to python in the first place. Mind you, this was before my data science learning curve, where no one can survive without python! (No offense, please, just stating my opinion, all the R lovers, I respect you guys all the same). But if one library can cha... | [
{
"code": null,
"e": 572,
"s": 172,
"text": "Numpy was the only thing that made me, a die-hard C++ coder, shift to python in the first place. Mind you, this was before my data science learning curve, where no one can survive without python! (No offense, please, just stating my opinion, all the R lov... |
Vectorization Implementation in Machine Learning | by Yang Liu | Towards Data Science | In machine learning filed, advanced players have the need to write their own cost function or optimization algorithm in achieving a more customized model, not just using existing machine learning libraries. In order to fully take advantage of computation power of today’s computers, the state of art of implementation of... | [
{
"code": null,
"e": 780,
"s": 172,
"text": "In machine learning filed, advanced players have the need to write their own cost function or optimization algorithm in achieving a more customized model, not just using existing machine learning libraries. In order to fully take advantage of computation ... |
Create a list of tuples from given list having number and its cube in each tuple using Python | When it is required to create a list from a given list that have a number and its cube, the list comprehension can be used.
Below is the demonstration of the same −
Live Demo
my_list = [32, 54, 47, 89]
print("The list is ")
print(my_list)
my_result = [(val, pow(val, 3)) for val in my_list]
print("The result is ")
pri... | [
{
"code": null,
"e": 1186,
"s": 1062,
"text": "When it is required to create a list from a given list that have a number and its cube, the list comprehension can be used."
},
{
"code": null,
"e": 1227,
"s": 1186,
"text": "Below is the demonstration of the same −"
},
{
"co... |
Tryit Editor v3.6 - Show Python | myclient = pymongo.MongoClient('mongodb://localhost:27017/')
mydb = myclient['mydatabase']
mycol = mydb["customers"]
mydict = { "name": "John", "address": "Highway 37" }
x = mycol.insert_one(mydict) | [
{
"code": null,
"e": 78,
"s": 17,
"text": "myclient = pymongo.MongoClient('mongodb://localhost:27017/')"
},
{
"code": null,
"e": 108,
"s": 78,
"text": "mydb = myclient['mydatabase']"
},
{
"code": null,
"e": 134,
"s": 108,
"text": "mycol = mydb[\"customers\"]"
... |
How To Avoid Snackbar Overlap Floating Action Button in Android? - GeeksforGeeks | 16 Oct, 2021
Prerequisite:
Floating Action Button (FAB) in Android with Example
How to add a Snackbar in Android
If one has implemented the Floating Action Button (FAB) in his android application and also there exists a Snackbar implementation in the same application, then the Snackbar is definitely going to overlap t... | [
{
"code": null,
"e": 24725,
"s": 24697,
"text": "\n16 Oct, 2021"
},
{
"code": null,
"e": 24740,
"s": 24725,
"text": "Prerequisite: "
},
{
"code": null,
"e": 24793,
"s": 24740,
"text": "Floating Action Button (FAB) in Android with Example"
},
{
"code": ... |
What is Pointer operator * in C++? | C++ provides two pointer operators, which are Address of Operator (&) and Indirection Operator (*). A pointer is a variable that contains the address of another variable or you can say that a variable that contains the address of another variable is said to "point to" the other variable. A variable can be any data type... | [
{
"code": null,
"e": 1439,
"s": 1062,
"text": "C++ provides two pointer operators, which are Address of Operator (&) and Indirection Operator (*). A pointer is a variable that contains the address of another variable or you can say that a variable that contains the address of another variable is sai... |
C++ Program to Implement Map in STL | A Map is an associative container that store elements in a mapped fashion. Each element has a key value and a mapped value. No two mapped values can have same key values.
Functions are used here:
m::find() – Returns an iterator to the element with key value ‘b’ in the map if found, else returns the iterator to end.
m::... | [
{
"code": null,
"e": 1233,
"s": 1062,
"text": "A Map is an associative container that store elements in a mapped fashion. Each element has a key value and a mapped value. No two mapped values can have same key values."
},
{
"code": null,
"e": 1258,
"s": 1233,
"text": "Functions a... |
ASP.NET - First Example | An ASP.NET page is made up of a number of server controls along with HTML controls, text, and images. Sensitive data from the page and the states of different controls on the page are stored in hidden fields that form the context of that page request.
ASP.NET runtime controls the association between a page instance and... | [
{
"code": null,
"e": 2599,
"s": 2347,
"text": "An ASP.NET page is made up of a number of server controls along with HTML controls, text, and images. Sensitive data from the page and the states of different controls on the page are stored in hidden fields that form the context of that page request."
... |
How does Query.prototype.elemMatch() work in Mongoose ? - GeeksforGeeks | 17 Mar, 2021
The Query.prototype.elemMatch() function is used to specify the $elemMatch condition. It matches the documents that contain an array field with at least single or one element that will matches all the specified query criteria.
Syntax:
Query.prototype.elemMatch()
Parameters: This function has two parameters... | [
{
"code": null,
"e": 25002,
"s": 24974,
"text": "\n17 Mar, 2021"
},
{
"code": null,
"e": 25229,
"s": 25002,
"text": "The Query.prototype.elemMatch() function is used to specify the $elemMatch condition. It matches the documents that contain an array field with at least single or ... |
How to add API function to a simple PHP Page ? - GeeksforGeeks | 28 Jan, 2020
Application Programming Interface is a system that contains a set of rules or protocols or tools which help in providing interaction between two applications or software by standard data access. It is very much similar to a web service used in developing web pages or mobile apps. One application can call o... | [
{
"code": null,
"e": 24796,
"s": 24768,
"text": "\n28 Jan, 2020"
},
{
"code": null,
"e": 25316,
"s": 24796,
"text": "Application Programming Interface is a system that contains a set of rules or protocols or tools which help in providing interaction between two applications or so... |
How to Install Ghost_Eye Tool in Kali Linux ? - GeeksforGeeks | 28 Jul, 2021
GhostEye is an information gathering, footprinting, scanner, and Reconnaissance tool built with Python 3. It captures information about the target and gives us detailed information about our objectives.
It only requires a domain or IP address. GhostEye is compatible with all Linux distributions.
It is a us... | [
{
"code": null,
"e": 24406,
"s": 24378,
"text": "\n28 Jul, 2021"
},
{
"code": null,
"e": 24609,
"s": 24406,
"text": "GhostEye is an information gathering, footprinting, scanner, and Reconnaissance tool built with Python 3. It captures information about the target and gives us det... |
Possible arrangement of persons waiting to sit in a hall - GeeksforGeeks | 21 Jun, 2021
Given an integer N, a binary string S and an array W[]. S denotes the sequence of N * 2 persons entering the hall, where 0 denotes a boy and 1 denotes a girl. W[] denotes the width of seats in each row, where each row consists of exactly 2 seats. The task is to find a possible arrangement of the persons en... | [
{
"code": null,
"e": 25153,
"s": 25125,
"text": "\n21 Jun, 2021"
},
{
"code": null,
"e": 25522,
"s": 25153,
"text": "Given an integer N, a binary string S and an array W[]. S denotes the sequence of N * 2 persons entering the hall, where 0 denotes a boy and 1 denotes a girl. W[] ... |
Split First name and Last name using JavaScript? | Let’s say the following is our string with name −
var studentFullName="John Smith";
Use split() to split the first name and last name. Following is the code −
var studentFullName="John Smith";
var details=[]
var details=studentFullName.split(' ');
console.log("StudentFirstName="+details[0])
console.log("StudentLastName... | [
{
"code": null,
"e": 1112,
"s": 1062,
"text": "Let’s say the following is our string with name −"
},
{
"code": null,
"e": 1146,
"s": 1112,
"text": "var studentFullName=\"John Smith\";"
},
{
"code": null,
"e": 1221,
"s": 1146,
"text": "Use split() to split the ... |
Configure PHP in CentOS Linux | PHP is the one of the most prolific web languages in use today. Installing a LAMP Stack on CentOS is something every system administrator will need to perform, most likely sooner than later.
A traditional LAMP Stack consists of (L)inux (A)pache (M)ySQL (P)HP.
There are three main components to a LAMP Stack on CentOS −
... | [
{
"code": null,
"e": 2448,
"s": 2257,
"text": "PHP is the one of the most prolific web languages in use today. Installing a LAMP Stack on CentOS is something every system administrator will need to perform, most likely sooner than later."
},
{
"code": null,
"e": 2517,
"s": 2448,
... |
PLSQL | LTRIM Function - GeeksforGeeks | 24 Sep, 2019
The PLSQL LTRIM function is used for removing all specified characters from the left-hand side of a string. The PLSQL LTRIM function accepts two parameters which are input_string and trim_string.
If the user does not specify trim_string, it defaults to a single blank.
If char is a character literal, then y... | [
{
"code": null,
"e": 24025,
"s": 23997,
"text": "\n24 Sep, 2019"
},
{
"code": null,
"e": 24221,
"s": 24025,
"text": "The PLSQL LTRIM function is used for removing all specified characters from the left-hand side of a string. The PLSQL LTRIM function accepts two parameters which a... |
An Intro to Graph Theory. Graph Theory is the study of graphs... | by Steven Dye | Towards Data Science | Graph Theory is the study of graphs which are mathematical structures used to model pairwise relations between objects. These graphs are made up of nodes (also called points and vertices) which usually represent an object or a person, and edges (also called lines or links) which represent the relationship between the n... | [
{
"code": null,
"e": 736,
"s": 171,
"text": "Graph Theory is the study of graphs which are mathematical structures used to model pairwise relations between objects. These graphs are made up of nodes (also called points and vertices) which usually represent an object or a person, and edges (also call... |
A Guide to Panel Data Regression: Theoretics and Implementation with Python. | by Bernhard Brugger | Towards Data Science | Panel data regression is a powerful way to control dependencies of unobserved, independent variables on a dependent variable, which can lead to biased estimators in traditional linear regression models. In this article, I want to share the most important theoretics behind this topic and how to build a panel data regres... | [
{
"code": null,
"e": 540,
"s": 171,
"text": "Panel data regression is a powerful way to control dependencies of unobserved, independent variables on a dependent variable, which can lead to biased estimators in traditional linear regression models. In this article, I want to share the most important ... |
How to use regular expressions (Regex) to filter valid emails in a Pandas series? | A regular expression is a sequence of characters that define a search pattern. In this program, we will use these regular expressions to filter valid and invalid emails.
We will define a Pandas series with different emails and check which email is valid. We will also use a python library called re which is used for reg... | [
{
"code": null,
"e": 1232,
"s": 1062,
"text": "A regular expression is a sequence of characters that define a search pattern. In this program, we will use these regular expressions to filter valid and invalid emails."
},
{
"code": null,
"e": 1395,
"s": 1232,
"text": "We will defi... |
C program to compute linear regression | Write a program to implement linear regression algorithm.
User has to enter total number of values.
The solution to compute the linear regression in C programming language is as follows −
Linear regression finds the relationship between two variables by connecting a linear equation to the observed data. One variable is... | [
{
"code": null,
"e": 1120,
"s": 1062,
"text": "Write a program to implement linear regression algorithm."
},
{
"code": null,
"e": 1162,
"s": 1120,
"text": "User has to enter total number of values."
},
{
"code": null,
"e": 1250,
"s": 1162,
"text": "The solutio... |
Tryit Editor v3.7 | Tryit: HTML round cell borders | [] |
How to change line color in EditText | In some situations, we should change edit text bottom line color according to background color. This example demonstrate about how to change line color in EditText.
Step 1 − Create a new project in Android Studio, go to File ⇒ New Project and fill all required details to create a new project.
Step 2 − Add the following... | [
{
"code": null,
"e": 1227,
"s": 1062,
"text": "In some situations, we should change edit text bottom line color according to background color. This example demonstrate about how to change line color in EditText."
},
{
"code": null,
"e": 1356,
"s": 1227,
"text": "Step 1 − Create a... |
Tryit Editor v3.7 | Tryit: SVG rectangle | [] |
Detailed Explanation of Simple Linear Regression, Assessment and, Inference with ANOVA | by Rashida Nasrin Sucky | Towards Data Science | A linear relationship between two variables is very common. So, a lot of mathematical and statistical models have been developed to use this phenomenon and extract more information about the data. This article will explain the very popular methods in statistics Simple Linear Regression (SLR).
Development of a Simple Li... | [
{
"code": null,
"e": 465,
"s": 171,
"text": "A linear relationship between two variables is very common. So, a lot of mathematical and statistical models have been developed to use this phenomenon and extract more information about the data. This article will explain the very popular methods in stat... |
C# | Create HashSet from another collection - GeeksforGeeks | 01 Feb, 2019
A HashSet is an unordered collection of the unique elements. It comes under System.Collections.Generic namespace. It is used in a situation where we want to prevent duplicates from being inserted in the collection. As far as performance is concerned, it is better in comparison to the list. You can create a... | [
{
"code": null,
"e": 25547,
"s": 25519,
"text": "\n01 Feb, 2019"
},
{
"code": null,
"e": 25966,
"s": 25547,
"text": "A HashSet is an unordered collection of the unique elements. It comes under System.Collections.Generic namespace. It is used in a situation where we want to preven... |
Output of Java Programs | Set 48 (Static keyword) - GeeksforGeeks | 10 Oct, 2017
Prerequisite : Static keyword in Java
Question 1. what is the output of this question?
class Test1 {public static void main(String[] args) { int x = 20; System.out.println(x); } static { int x = 10; System.out.print(x + " "); }}
OptionA) 10 20B) 20 10C) 10 10D)... | [
{
"code": null,
"e": 25797,
"s": 25769,
"text": "\n10 Oct, 2017"
},
{
"code": null,
"e": 25835,
"s": 25797,
"text": "Prerequisite : Static keyword in Java"
},
{
"code": null,
"e": 25884,
"s": 25835,
"text": "Question 1. what is the output of this question?"
... |
Python program to extract Strings between HTML Tags - GeeksforGeeks | 29 Dec, 2020
Given a String and HTML tag, extract all the strings between the specified tag.
Input : ‘<b>Gfg</b> is <b>Best</b>. I love <b>Reading CS</b> from it.’ , tag = “br” Output : [‘Gfg’, ‘Best’, ‘Reading CS’]Explanation : All strings between “br” tag are extracted.
Input : ‘<h1>Gfg</h1> is <h1>Best</h1> I love ... | [
{
"code": null,
"e": 26309,
"s": 26281,
"text": "\n29 Dec, 2020"
},
{
"code": null,
"e": 26389,
"s": 26309,
"text": "Given a String and HTML tag, extract all the strings between the specified tag."
},
{
"code": null,
"e": 26570,
"s": 26389,
"text": "Input : ‘... |
Radius of a circle having area equal to the sum of area of the circles having given radii - GeeksforGeeks | 04 May, 2021
Given two integers r1 and r2, representing the radius of two circles, the task is to find the radius of the circle having area equal to the sum of the area of the two circles having given radii.
Examples:
Input:r1 = 8r2 = 6Output:10Explanation:Area of circle with radius 8 = 201.061929 Area of a circle with... | [
{
"code": null,
"e": 27089,
"s": 27061,
"text": "\n04 May, 2021"
},
{
"code": null,
"e": 27284,
"s": 27089,
"text": "Given two integers r1 and r2, representing the radius of two circles, the task is to find the radius of the circle having area equal to the sum of the area of the ... |
Recursive function to delete k-th node from linked list - GeeksforGeeks | 11 Nov, 2021
Given a singly linked list, delete a node at the kth position without using the loop.
Examples:
Input : list = 9->8->3->5->2->1
k = 4
Output : 9->8->3->2->1
Input : list = 0->0->1->6->2->3
k = 3
Output : 0->0->6->2->3
We recursively reduce the value of k. When k reaches 1, we ... | [
{
"code": null,
"e": 25803,
"s": 25775,
"text": "\n11 Nov, 2021"
},
{
"code": null,
"e": 25889,
"s": 25803,
"text": "Given a singly linked list, delete a node at the kth position without using the loop."
},
{
"code": null,
"e": 25900,
"s": 25889,
"text": "Exam... |
KeyStore aliases() method in Java with Examples - GeeksforGeeks | 11 Aug, 2021
The aliases() method of java.security.KeyStore class provides alias name associated with this keystore object.
Syntax:
public final Enumeration aliases()
throws KeyStoreException
Return Value: This method returns the list of all alias associated with this keystore object as an Enum object.Exception: ... | [
{
"code": null,
"e": 26287,
"s": 26259,
"text": "\n11 Aug, 2021"
},
{
"code": null,
"e": 26400,
"s": 26287,
"text": "The aliases() method of java.security.KeyStore class provides alias name associated with this keystore object. "
},
{
"code": null,
"e": 26410,
"s... |
How to change angle of 3D plot in Python? - GeeksforGeeks | 03 Jan, 2021
Prerequisites: Matplotlib, NumPy
In this article, we will see how can we can view our graph from different angles, Here we use three different methods to plot our graph. Before starting let’s see some basic concepts of the required module for this objective.
Matplotlib is a multi-platform data visualizatio... | [
{
"code": null,
"e": 31573,
"s": 31545,
"text": "\n03 Jan, 2021"
},
{
"code": null,
"e": 31606,
"s": 31573,
"text": "Prerequisites: Matplotlib, NumPy"
},
{
"code": null,
"e": 31832,
"s": 31606,
"text": "In this article, we will see how can we can view our grap... |
ArrayBlockingQueue take() method in Java - GeeksforGeeks | 26 Nov, 2018
ArrayBlockingQueue is bounded, blocking queue that stores the elements internally backed by an array.
ArrayBlockingQueue class is a member of the Java Collections Framework.
Bounded means it will have a fixed size, you can not store number the elements more than the capacity of the queue.
The queue also fo... | [
{
"code": null,
"e": 24973,
"s": 24945,
"text": "\n26 Nov, 2018"
},
{
"code": null,
"e": 25075,
"s": 24973,
"text": "ArrayBlockingQueue is bounded, blocking queue that stores the elements internally backed by an array."
},
{
"code": null,
"e": 25147,
"s": 25075,
... |
Minimum product subset of an array - GeeksforGeeks | 20 Apr, 2022
Given an array a, we have to find the minimum product possible with the subset of elements present in the array. The minimum product can be a single element also.
Examples:
Input : a[] = { -1, -1, -2, 4, 3 }
Output : -24
Explanation : Minimum product will be ( -2 * -1 * -1 * 4 * 3 ) = -24
Input : a[] = {... | [
{
"code": null,
"e": 25875,
"s": 25847,
"text": "\n20 Apr, 2022"
},
{
"code": null,
"e": 26038,
"s": 25875,
"text": "Given an array a, we have to find the minimum product possible with the subset of elements present in the array. The minimum product can be a single element also."... |
Node.js - Interview Questions | Dear readers, these Node.JS Interview Questions have been designed specially to get you acquainted with the nature of questions you may encounter during your interview for the subject of Node.JS. As per my experience good interviewers hardly plan to ask any particular question during your interview, normally questions ... | [
{
"code": null,
"e": 2456,
"s": 2018,
"text": "Dear readers, these Node.JS Interview Questions have been designed specially to get you acquainted with the nature of questions you may encounter during your interview for the subject of Node.JS. As per my experience good interviewers hardly plan to ask... |
Get Unique Values from ArrayList in Java - GeeksforGeeks | 11 Dec, 2020
Let’s see how to get unique values from ArrayList. Convert ArrayList to HashSet to insert duplicate values in ArrayList but on the other hand, HashSet is not allowing to insert any duplicate value. While converting ArrayList to HashSet all the duplicate values are removed and as a result, unique values are... | [
{
"code": null,
"e": 24462,
"s": 24434,
"text": "\n11 Dec, 2020"
},
{
"code": null,
"e": 24780,
"s": 24462,
"text": "Let’s see how to get unique values from ArrayList. Convert ArrayList to HashSet to insert duplicate values in ArrayList but on the other hand, HashSet is not allow... |
C# Program to check if a number is Positive, Negative, Odd, Even, Zero | Check for the following conditions −
For odd and even, check for the remainder when the number is divided by 2 −
// checking for odd/ even
if(n % 2 == 0) {
Console.WriteLine("Even");
} else {
Console.WriteLine("Odd");
}
For positive, negative and checking whether a number is 0 or not −
if (n < 0) {
Console.WriteL... | [
{
"code": null,
"e": 1099,
"s": 1062,
"text": "Check for the following conditions −"
},
{
"code": null,
"e": 1175,
"s": 1099,
"text": "For odd and even, check for the remainder when the number is divided by 2 −"
},
{
"code": null,
"e": 1288,
"s": 1175,
"text":... |
Create a procedure to find out the factorial of a number? | It can be created with the help of the following query −
mysql> Delimiter //
mysql> CREATE PROCEDURE fact(IN x INT)
-> BEGIN
-> DECLARE result INT;
-> DECLARE i INT;
-> SET result = 1;
-> SET i = 1;
-> WHILE i <= x DO
-> SET result = result * i;
-> SET i = i + 1;
-> END WHILE;
->... | [
{
"code": null,
"e": 1119,
"s": 1062,
"text": "It can be created with the help of the following query −"
},
{
"code": null,
"e": 1474,
"s": 1119,
"text": "mysql> Delimiter //\nmysql> CREATE PROCEDURE fact(IN x INT)\n -> BEGIN\n -> DECLARE result INT;\n -> DECLARE i INT;\... |
Parrot - Programming Examples | Parrot programing is similar to assembly language programing and you get a chance to work at lower level. Here is the list of programming examples to make you aware of the various aspects of Parrot Programming.
Classic Hello world!
Classic Hello world!
Using registers
Using registers
Summing squares
Summing squares
Fi... | [
{
"code": null,
"e": 1981,
"s": 1769,
"text": "Parrot programing is similar to assembly language programing and you get a chance to work at lower level. Here is the list of programming examples to make you aware of the various aspects of Parrot Programming."
},
{
"code": null,
"e": 2002... |
Java While Loop | Loops can execute a block of code as long as a specified condition is reached.
Loops are handy because they save time, reduce errors, and they make code more readable.
The while loop loops through a block of code as long as a specified condition is true:
while (condition) {
// code block to be executed
}
In the exam... | [
{
"code": null,
"e": 79,
"s": 0,
"text": "Loops can execute a block of code as long as a specified condition is reached."
},
{
"code": null,
"e": 168,
"s": 79,
"text": "Loops are handy because they save time, reduce errors, and they make code more readable."
},
{
"code": ... |
Check if a number is divisible by 8 using bitwise operators - GeeksforGeeks | 05 Apr, 2021
Given a number n, check if it is divisible by 8 using bitwise operators. Examples:
Input : 16
Output :YES
Input :15
Output :NO
Approach: Result = (((n >> 3) << 3) == n). First we shift the 3 bit right then we shift the 3 bit left and then compare the number with the given number if the number is equal... | [
{
"code": null,
"e": 26139,
"s": 26111,
"text": "\n05 Apr, 2021"
},
{
"code": null,
"e": 26224,
"s": 26139,
"text": "Given a number n, check if it is divisible by 8 using bitwise operators. Examples: "
},
{
"code": null,
"e": 26269,
"s": 26224,
"text": "Input... |
How to Generate Pattern Password in Android? - GeeksforGeeks | 21 Jan, 2021
Pattern Password for the device is one of the necessities to keep our device private and protected. Nowadays in most apps, we get to see this password applied in many applications such as Mutual Funds or Stock Market apps to keep our financial details private. In this article, we are going to see how to im... | [
{
"code": null,
"e": 26405,
"s": 26377,
"text": "\n21 Jan, 2021"
},
{
"code": null,
"e": 26923,
"s": 26405,
"text": "Pattern Password for the device is one of the necessities to keep our device private and protected. Nowadays in most apps, we get to see this password applied in m... |
Adding error bars to a line graph with ggplot2 in R - GeeksforGeeks | 14 Feb, 2022
ggplot2 is an R language plotting package that creates complex plots from data in a data frame. It describes what variables to plot, how they are displayed, and general visual properties. It can add error bars, crossbars, line range, point range in our graph. This article is solely dedicated to adding erro... | [
{
"code": null,
"e": 26621,
"s": 26593,
"text": "\n14 Feb, 2022"
},
{
"code": null,
"e": 26951,
"s": 26621,
"text": "ggplot2 is an R language plotting package that creates complex plots from data in a data frame. It describes what variables to plot, how they are displayed, and ge... |
Java Program to write an array of strings to a file | Here’s our file −
FileWriter writer = new FileWriter("E:/demo.txt");
Now, consider a string array −
String arr[] = { "ONE", "TWO", "THREE", "FOUR", "FIVE", "SIX", "SEVEN", "EIGHT", "NINE" };
Write the above array to the file “demo.txt” −
int len = arr.length;
for (int i = 0; i < len; i++) {
writer.write(arr[i] + "-"... | [
{
"code": null,
"e": 1080,
"s": 1062,
"text": "Here’s our file −"
},
{
"code": null,
"e": 1131,
"s": 1080,
"text": "FileWriter writer = new FileWriter(\"E:/demo.txt\");"
},
{
"code": null,
"e": 1162,
"s": 1131,
"text": "Now, consider a string array −"
},
{... |
Adding and Subtracting Matrices in Python - GeeksforGeeks | 30 Dec, 2020
In this article, we will discuss how to add and subtract elements of the matrix in Python.
Example:
Suppose we have two matrices A and B.
A = [[1,2],[3,4]]
B = [[4,5],[6,7]]
then we get
A+B = [[5,7],[9,11]]
A-B = [[-3,-3],[-3,-3]]
Now let us try to implement this using Python
1. Adding elements of the... | [
{
"code": null,
"e": 25941,
"s": 25913,
"text": "\n30 Dec, 2020"
},
{
"code": null,
"e": 26033,
"s": 25941,
"text": "In this article, we will discuss how to add and subtract elements of the matrix in Python. "
},
{
"code": null,
"e": 26042,
"s": 26033,
"text":... |
How to read only 5 last line of the text file in PHP? | To read only 5 last lines of the text file, the code is as follows −
$file = file("filename.txt");
for ($i = max(0, count($file)-6); $i < count($file); $i++) {
echo $file[$i] . "\n";
}
This will produce the following output −
Given that the file has more than 5 lines of text, the last 5 lines of the text file will b... | [
{
"code": null,
"e": 1131,
"s": 1062,
"text": "To read only 5 last lines of the text file, the code is as follows −"
},
{
"code": null,
"e": 1250,
"s": 1131,
"text": "$file = file(\"filename.txt\");\nfor ($i = max(0, count($file)-6); $i < count($file); $i++) {\n echo $file[$i] ... |
How to Build a Python package? - GeeksforGeeks | 30 May, 2021
In this article, we will learn how to develop the package in Python. Packages are nothing but a collection of programs designed to perform a certain set of task(s). Packages are of two types, namely
Built-in Packages like collection, datetime, sqlite, etc.
External packages like flask, django, tensorflow, ... | [
{
"code": null,
"e": 25647,
"s": 25619,
"text": "\n30 May, 2021"
},
{
"code": null,
"e": 25846,
"s": 25647,
"text": "In this article, we will learn how to develop the package in Python. Packages are nothing but a collection of programs designed to perform a certain set of task(s)... |
SQL – SELECT RANDOM | 21 Jul, 2021
RANDOM( ) in SQL is generally used to return a random row from a table present in the database. It has many applications in real life.
For example :
There are a lot of employees in an organization. Suppose, if the event manager wants to mail any ten random employees then he/she can use the RANDOM( ) in S... | [
{
"code": null,
"e": 54,
"s": 26,
"text": "\n21 Jul, 2021"
},
{
"code": null,
"e": 190,
"s": 54,
"text": "RANDOM( ) in SQL is generally used to return a random row from a table present in the database. It has many applications in real life. "
},
{
"code": null,
"e": 2... |
Extended Floating Action Button in Android with Example | 19 Feb, 2021
Prerequisite: Floating Action Button (FAB) in Android with Example
In the Floating Action Button (FAB) article, we have discussed on Normal/Regular Floating Action Button and Mini Floating Action Button. In this article, let’s discuss and implement an Extended Floating Action Button in android which extend... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n19 Feb, 2021"
},
{
"code": null,
"e": 95,
"s": 28,
"text": "Prerequisite: Floating Action Button (FAB) in Android with Example"
},
{
"code": null,
"e": 676,
"s": 95,
"text": "In the Floating Action Button (FAB) artic... |
Python | Split dictionary keys and values into separate lists | 15 Nov, 2019
Given a dictionary, the task is to split that dictionary into keys and values into different lists. Let’s discuss the different ways we can do this.
Method #1: Using built-in functions
# Python code to demonstrate# to split dictionary# into keys and values # initialising _dictionaryini_dict = {'a' : 'aksh... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n15 Nov, 2019"
},
{
"code": null,
"e": 177,
"s": 28,
"text": "Given a dictionary, the task is to split that dictionary into keys and values into different lists. Let’s discuss the different ways we can do this."
},
{
"code": null... |
std::string::front() in C++with Examples | 28 May, 2019
This function returns a direct reference to the first character of the string. This shall only be used on non-empty strings.This can be used to access the first character of the string as well as to insert a character at the start of the string. Length of the string remains same after inserting a character... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n28 May, 2019"
},
{
"code": null,
"e": 383,
"s": 28,
"text": "This function returns a direct reference to the first character of the string. This shall only be used on non-empty strings.This can be used to access the first character of t... |
OpenCV – Counting the number of black and white pixels in the image | 22 Jan, 2021
In this article, we will discuss counting the number of black pixels and white pixels in the image using OpenCV and NumPy.
Prerequisites:
OpenCV
NumPy
The image we are using for the demonstration is shown below:
To display OpenCV provides the imshow() method for displaying the image we have recently read.... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n22 Jan, 2021"
},
{
"code": null,
"e": 152,
"s": 28,
"text": "In this article, we will discuss counting the number of black pixels and white pixels in the image using OpenCV and NumPy. "
},
{
"code": null,
"e": 167,
"s": ... |
Remove Outliers from Data Set in R | 14 Sep, 2021
In this article, we will be looking at the approach to remove the Outliers from the data set using the in-built functions in the R programming language.
Outliers are data points that don’t fit the pattern of the rest of the data set. The best way to detect the outliers in the given data set is to plot the ... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n14 Sep, 2021"
},
{
"code": null,
"e": 181,
"s": 28,
"text": "In this article, we will be looking at the approach to remove the Outliers from the data set using the in-built functions in the R programming language."
},
{
"code": ... |
Python – Import module outside directory | 22 Mar, 2022
Modules are simply a python .py file from which we can use functions, classes, variables in another file. To use these things in another file we need to first import that module into that file. If the module exists in the same directory as the file, we can directly import it using the syntax import module_... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n22 Mar, 2022"
},
{
"code": null,
"e": 520,
"s": 28,
"text": "Modules are simply a python .py file from which we can use functions, classes, variables in another file. To use these things in another file we need to first import that modu... |
SQL | DIVISION | 21 Mar, 2018
Division is typically required when you want to find out entities that are interacting with all entities of a set of different type entities.The division operator is used when we have to evaluate queries which contain the keyword ‘all’.
Some instances where division operator is used are:
Which person has a... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n21 Mar, 2018"
},
{
"code": null,
"e": 289,
"s": 52,
"text": "Division is typically required when you want to find out entities that are interacting with all entities of a set of different type entities.The division operator is used whe... |
Python 3 - Number log10() Method | The log10() method returns base-10 logarithm of x for x > 0.
Following is the syntax for log10() method −
import math
math.log10( x )
Note − This function is not accessible directly, so we need to import the math module and then we need to call this function using the math static object.
x − This is a numeric express... | [
{
"code": null,
"e": 2535,
"s": 2474,
"text": "The log10() method returns base-10 logarithm of x for x > 0."
},
{
"code": null,
"e": 2580,
"s": 2535,
"text": "Following is the syntax for log10() method −"
},
{
"code": null,
"e": 2610,
"s": 2580,
"text": "impor... |
PostgreSQL – Function Parameters | 28 Aug, 2020
PostgreSQL has 4 types of function parameters as listed below:
IN
OUT
INOUT
VARIADIC
To better understand these function parameters let’s first define a function on which we will experiment with the above-mentioned function parameters as below:
CREATE OR REPLACE FUNCTION get_sum(
a NUMERIC,
b NUME... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n28 Aug, 2020"
},
{
"code": null,
"e": 91,
"s": 28,
"text": "PostgreSQL has 4 types of function parameters as listed below:"
},
{
"code": null,
"e": 94,
"s": 91,
"text": "IN"
},
{
"code": null,
"e": 98,
... |
Uploading files on Google Drive using Python | 16 Jul, 2020
In the modern era of the internet, a large number of mundane or work-related tasks are carried out over the internet. Compromise of data stored on a device could cause massive harm to an individual/company. Considering the rise in the number of malware, viruses, worms, trojan horse etc the security of data... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n16 Jul, 2020"
},
{
"code": null,
"e": 382,
"s": 28,
"text": "In the modern era of the internet, a large number of mundane or work-related tasks are carried out over the internet. Compromise of data stored on a device could cause massive... |
Section formula (Point that divides a line in given ratio) | 18 Jun, 2022
Given two coordinates (x1, y1) and (x2, y2), and m and n, find the co-ordinates that divides the line joining (x1, y1) and (x2, y2) in the ratio m : n
Examples:
Input : x1 = 1, y1 = 0, x2 = 2 y2 = 5,
m = 1, n = 1
Output : (1.5, 2.5)
Explanation: co-ordinates (1.5, 2.5)
divides the line in ratio ... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n18 Jun, 2022"
},
{
"code": null,
"e": 204,
"s": 52,
"text": "Given two coordinates (x1, y1) and (x2, y2), and m and n, find the co-ordinates that divides the line joining (x1, y1) and (x2, y2) in the ratio m : n "
},
{
"code": ... |
Quad Tree | 07 Feb, 2018
Quadtrees are trees used to efficiently store data of points on a two-dimensional space. In this tree, each node has at most four children.We can construct a quadtree from a two-dimensional area using the following steps:
Divide the current two dimensional space into four boxes.If a box contains one or mor... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n07 Feb, 2018"
},
{
"code": null,
"e": 274,
"s": 52,
"text": "Quadtrees are trees used to efficiently store data of points on a two-dimensional space. In this tree, each node has at most four children.We can construct a quadtree from a ... |
Dilworth’s Theorem | 12 Aug, 2018
Let S be a finite partially ordered set. The size of a maximal antichain equals the size of a minimal chain cover of S. This is called the Dilworth’s theorem. It is named after the mathematician Robert P. Dilworth(1950).
The width of a finite partially ordered set S is the maximum size of an antichain in S... | [
{
"code": null,
"e": 54,
"s": 26,
"text": "\n12 Aug, 2018"
},
{
"code": null,
"e": 275,
"s": 54,
"text": "Let S be a finite partially ordered set. The size of a maximal antichain equals the size of a minimal chain cover of S. This is called the Dilworth’s theorem. It is named aft... |
Timer in C++ using system calls | 05 Jul, 2021
The task is to create timer without using any graphics or animation. The timer will be made using system calls wherever necessary. Timer in this context means a stopwatch with up-counting of time.The timer is created in Linux. Following system calls of Linux are used: sleep() : It will make the program sle... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n05 Jul, 2021"
},
{
"code": null,
"e": 503,
"s": 28,
"text": "The task is to create timer without using any graphics or animation. The timer will be made using system calls wherever necessary. Timer in this context means a stopwatch with... |
GATE | GATE CS 2010 | Question 22 - GeeksforGeeks | 28 Jun, 2021
What is the appropriate pairing of items in the two columns listing various activities encountered in a software life cycle?
P. Requirements Capture 1.Module Development and Integration
Q. Design 2.Domain Analysis
R. Implementation 3.Structural and Behavioral Modeling
S. Maintenance ... | [
{
"code": null,
"e": 24404,
"s": 24376,
"text": "\n28 Jun, 2021"
},
{
"code": null,
"e": 24529,
"s": 24404,
"text": "What is the appropriate pairing of items in the two columns listing various activities encountered in a software life cycle?"
},
{
"code": null,
"e": 2... |
Partition array to K subsets | Practice | GeeksforGeeks | Given an integer array a[ ] of N elements and an integer K, the task is to check if the array a[ ] could be divided into K non-empty subsets with equal sum of elements.
Note: All elements of this array should be part of exactly one partition.
Example 1:
Input:
N = 5
a[] = {2,1,4,5,6}
K = 3
Output:
1
Explanation: we c... | [
{
"code": null,
"e": 481,
"s": 238,
"text": "Given an integer array a[ ] of N elements and an integer K, the task is to check if the array a[ ] could be divided into K non-empty subsets with equal sum of elements.\nNote: All elements of this array should be part of exactly one partition."
},
{
... |
Convert.ToBoolean Method in C# | The Convert.ToBoolean method is used to convert a specified value to an equivalent Boolean value.
The following is our double type.
double doubleNum = 329.34;
To convert it to Boolean, use the Convert.ToBoolean() method.
bool boolNum;
boolNum = System.Convert.ToBoolean(doubleNum);
Let us see another example.
Live Demo... | [
{
"code": null,
"e": 1160,
"s": 1062,
"text": "The Convert.ToBoolean method is used to convert a specified value to an equivalent Boolean value."
},
{
"code": null,
"e": 1194,
"s": 1160,
"text": "The following is our double type."
},
{
"code": null,
"e": 1221,
"s"... |
4 Python Pandas Functions That Serve Better With Dictionaries | by Soner Yıldırım | Towards Data Science | Pandas is arguably the most popular data analysis and manipulation library in the data science ecosystem. First and foremost, it is easy to learn and offers an intuitive syntax.
With that being said, we will focus on a different great feature of Pandas: Flexibility.
The capabilities of Pandas functions can be extended ... | [
{
"code": null,
"e": 225,
"s": 47,
"text": "Pandas is arguably the most popular data analysis and manipulation library in the data science ecosystem. First and foremost, it is easy to learn and offers an intuitive syntax."
},
{
"code": null,
"e": 314,
"s": 225,
"text": "With that... |
Database - Second Normal Form (2NF) | The Second Normal Form states that it should meet all the rules for 1NF and there must be no partial dependences of any of the columns on the primary key −
Consider a customer-order relation and you want to store customer ID, customer name, order ID and order detail and the date of purchase −
CREATE TABLE CUSTOMERS(
... | [
{
"code": null,
"e": 2609,
"s": 2453,
"text": "The Second Normal Form states that it should meet all the rules for 1NF and there must be no partial dependences of any of the columns on the primary key −"
},
{
"code": null,
"e": 2747,
"s": 2609,
"text": "Consider a customer-order ... |
Aurelia - Event Aggregator | Event aggregator should be used when your events need to be attached to more listeners or when you need to observe some functionality of your app and wait for the data update.
Aurelia event aggregator has three methods. The publish method will fire off events and can be used by multiple subscribers. For subscribing to ... | [
{
"code": null,
"e": 2341,
"s": 2165,
"text": "Event aggregator should be used when your events need to be attached to more listeners or when you need to observe some functionality of your app and wait for the data update."
},
{
"code": null,
"e": 2639,
"s": 2341,
"text": "Aureli... |
Median in a stream of integers (running integers) - GeeksforGeeks | 12 May, 2022
Given that integers are read from a data stream. Find median of elements read so for in an efficient way. For simplicity assume, there are no duplicates. For example, let us consider the stream 5, 15, 1, 3 ...
After reading 1st element of stream - 5 -> median - 5
After reading 2nd element of stream - 5, ... | [
{
"code": null,
"e": 42629,
"s": 42601,
"text": "\n12 May, 2022"
},
{
"code": null,
"e": 42841,
"s": 42629,
"text": "Given that integers are read from a data stream. Find median of elements read so for in an efficient way. For simplicity assume, there are no duplicates. For examp... |
Queue - Linked List Implementation - GeeksforGeeks | 06 Aug, 2021
In the previous post, we introduced Queue and discussed array implementation. In this post, linked list implementation is discussed. The following two main operations must be implemented efficiently.In a Queue data structure, we maintain two pointers, front and rear. The front points the first item of queu... | [
{
"code": null,
"e": 37856,
"s": 37828,
"text": "\n06 Aug, 2021"
},
{
"code": null,
"e": 38361,
"s": 37856,
"text": "In the previous post, we introduced Queue and discussed array implementation. In this post, linked list implementation is discussed. The following two main operati... |
Check for string rotation in Java - GeeksforGeeks | 11 Dec, 2018
Given two strings s1 and s2, write a snippet to check whether s2 is a rotation of s1. Strings may contain duplicates.
Examples:
Input : s1 = "ABCD", s2 = "CDAB"
Output : True
String s1 is rotation of s2.
Input : s1 = "ABAD", s2 = "ADAB"
Output : True
Input : s1 = ABCD, and s2 = ACBD
Output : False
On... | [
{
"code": null,
"e": 24114,
"s": 24086,
"text": "\n11 Dec, 2018"
},
{
"code": null,
"e": 24232,
"s": 24114,
"text": "Given two strings s1 and s2, write a snippet to check whether s2 is a rotation of s1. Strings may contain duplicates."
},
{
"code": null,
"e": 24242,
... |
Statistical - AVERAGE Function | The AVERAGE function returns the average (arithmetic mean) of the arguments.
AVERAGE (number1, [number2] ...)
Arguments can either be numbers or names, ranges, or cell references that contain numbers.
Arguments can either be numbers or names, ranges, or cell references that contain numbers.
Logical values and text rep... | [
{
"code": null,
"e": 1931,
"s": 1854,
"text": "The AVERAGE function returns the average (arithmetic mean) of the arguments."
},
{
"code": null,
"e": 1965,
"s": 1931,
"text": "AVERAGE (number1, [number2] ...)\n"
},
{
"code": null,
"e": 2056,
"s": 1965,
"text": ... |
PHP | rsort() Function - GeeksforGeeks | 05 Nov, 2020
The rsort() is an inbuilt function in PHP and is used to sort the array in descending order i.e, greatest to smallest. It sorts the actual array and hence changes are reflected in the array itself. The function provides us with 6 sorting types, according to which the array can be sorted.
Syntax:
rsort($a... | [
{
"code": null,
"e": 26217,
"s": 26189,
"text": "\n05 Nov, 2020"
},
{
"code": null,
"e": 26507,
"s": 26217,
"text": "The rsort() is an inbuilt function in PHP and is used to sort the array in descending order i.e, greatest to smallest. It sorts the actual array and hence changes ... |
For each element in 1st array count elements less than or equal to it in 2nd array - GeeksforGeeks | 13 Feb, 2022
Given two unsorted arrays arr1[] and arr2[]. They may contain duplicates. For each element in arr1[] count elements less than or equal to it in array arr2[].Source: Amazon Interview Experience | Set 354 (For SDE-2)Examples:
Input : arr1[] = [1, 2, 3, 4, 7, 9]
arr2[] = [0, 1, 2, 1, 1, 4]
Output : ... | [
{
"code": null,
"e": 26731,
"s": 26703,
"text": "\n13 Feb, 2022"
},
{
"code": null,
"e": 26957,
"s": 26731,
"text": "Given two unsorted arrays arr1[] and arr2[]. They may contain duplicates. For each element in arr1[] count elements less than or equal to it in array arr2[].Source... |
Audio Recorder in Android with Example - GeeksforGeeks | 10 May, 2022
In Android for recording audio or video, there is a built-in class called MediaRecorder. This class in Android helps to easily record video and audio files. The Android multimedia framework provides built-in support for capturing and encoding common audio and video formats. In android for recording audio, ... | [
{
"code": null,
"e": 26381,
"s": 26353,
"text": "\n10 May, 2022"
},
{
"code": null,
"e": 26940,
"s": 26381,
"text": "In Android for recording audio or video, there is a built-in class called MediaRecorder. This class in Android helps to easily record video and audio files. The An... |
How to implement our own Vector Class in C++? - GeeksforGeeks | 11 Nov, 2021
The given task is to implement a class in C++ which behaves just like the Vector class.Vectors are the same as dynamic arrays with the ability to resize themselves automatically when an element is inserted or deleted, with their storage being handled automatically by the container. Vector elements are plac... | [
{
"code": null,
"e": 26019,
"s": 25991,
"text": "\n11 Nov, 2021"
},
{
"code": null,
"e": 26710,
"s": 26019,
"text": "The given task is to implement a class in C++ which behaves just like the Vector class.Vectors are the same as dynamic arrays with the ability to resize themselves... |
Remove characters from string that appears strictly less than K times - GeeksforGeeks | 21 Jul, 2021
Given a string of lowercase letters and a number K. The task is to reduce it by removing the characters which appears strictly less than K times in the string.Examples:
Input : str = "geeksforgeeks", K = 2
Output : geeksgeeks
Input : str = "geeksforgeeks", K = 3
Output : eeee
Approach :
Create a hash t... | [
{
"code": null,
"e": 26525,
"s": 26497,
"text": "\n21 Jul, 2021"
},
{
"code": null,
"e": 26695,
"s": 26525,
"text": "Given a string of lowercase letters and a number K. The task is to reduce it by removing the characters which appears strictly less than K times in the string.Exam... |
PyQt5 - Adding action to the ComboBox - GeeksforGeeks | 22 Apr, 2020
In this article we will see how we can add action to the combo box. Action is basically a method called by the combo box when it gets changes these changes can be new item get inserted by user or any item get selected by the user.
In order to do this we will use activated.connect method.
Syntax : combo_box... | [
{
"code": null,
"e": 26241,
"s": 26213,
"text": "\n22 Apr, 2020"
},
{
"code": null,
"e": 26472,
"s": 26241,
"text": "In this article we will see how we can add action to the combo box. Action is basically a method called by the combo box when it gets changes these changes can be ... |
Create a Voice Recorder using Python - GeeksforGeeks | 09 Sep, 2020
Python can be used to perform a variety of tasks. One of them is creating a voice recorder. We can use python’s sounddevice module to record and play audio. This module along with the wavio or the scipy module provides the way to save recorded audio.
sounddevice: This module provides functions to play and ... | [
{
"code": null,
"e": 25916,
"s": 25888,
"text": "\n09 Sep, 2020"
},
{
"code": null,
"e": 26167,
"s": 25916,
"text": "Python can be used to perform a variety of tasks. One of them is creating a voice recorder. We can use python’s sounddevice module to record and play audio. This m... |
Program to check for a Valid IMEI Number - GeeksforGeeks | 02 Jun, 2021
International Mobile Equipment Identity (IMEI) is a number, usually unique, to identify mobile phones, as well as some satellite phones. It is usually found printed inside the battery compartment of the phone, but can also be displayed on-screen on most phones by entering *#06# on the dialpad, or alongside... | [
{
"code": null,
"e": 26097,
"s": 26069,
"text": "\n02 Jun, 2021"
},
{
"code": null,
"e": 26830,
"s": 26097,
"text": "International Mobile Equipment Identity (IMEI) is a number, usually unique, to identify mobile phones, as well as some satellite phones. It is usually found printe... |
How to make a Twitter Bot in Python? - GeeksforGeeks | 22 Jul, 2021
Twitter is an American microblogging and social networking service on which users post and interact with messages known as “tweets“. In this article we will make a Twitter Bot using Python.
Python as well as Javascript can be used to develop an automatic Twitter bot that can do many tasks by its own such a... | [
{
"code": null,
"e": 25727,
"s": 25699,
"text": "\n22 Jul, 2021"
},
{
"code": null,
"e": 25917,
"s": 25727,
"text": "Twitter is an American microblogging and social networking service on which users post and interact with messages known as “tweets“. In this article we will make a... |
How to clone a JavaScript object? - GeeksforGeeks | 27 Mar, 2019
Cloning a JavaScript object is a task that is used mostly because we do not want to create the same object if the same object already exists.There are few ways.
By iterate through each property and copy them to new object.
Using JSON method as the source object MUST be JSON safe. So it need exception handl... | [
{
"code": null,
"e": 26543,
"s": 26515,
"text": "\n27 Mar, 2019"
},
{
"code": null,
"e": 26704,
"s": 26543,
"text": "Cloning a JavaScript object is a task that is used mostly because we do not want to create the same object if the same object already exists.There are few ways."
... |
Get emotions of images using Microsoft emotion API in Python - GeeksforGeeks | 16 Jul, 2020
The emotions of images like happy, sad, neutral, surprise, etc. can be extracted using Microsoft emotion API for any development purpose.
It is very simple to use and can be called via API through terminal or any of languages like Python or PHP. Microsoft provides free subscription of 30 days for making to... | [
{
"code": null,
"e": 25927,
"s": 25899,
"text": "\n16 Jul, 2020"
},
{
"code": null,
"e": 26065,
"s": 25927,
"text": "The emotions of images like happy, sad, neutral, surprise, etc. can be extracted using Microsoft emotion API for any development purpose."
},
{
"code": nul... |
Pair plots using Scatter matrix in Pandas - GeeksforGeeks | 25 Aug, 2020
Checking for collinearity among attributes of a dataset, is one of the most important steps in data preprocessing. A good way to understand the correlation among the features, is to create scatter plots for each pair of attributes. Pandas has a function scatter_matrix(), for this purpose. scatter_matrix() ... | [
{
"code": null,
"e": 26289,
"s": 26261,
"text": "\n25 Aug, 2020"
},
{
"code": null,
"e": 26815,
"s": 26289,
"text": "Checking for collinearity among attributes of a dataset, is one of the most important steps in data preprocessing. A good way to understand the correlation among t... |
Presentation Layer in OSI model - GeeksforGeeks | 12 Jan, 2022
Prerequisite : OSI Model
Introduction : Presentation Layer is the 6th layer in the Open System Interconnection (OSI) model. This layer is also known as Translation layer, as this layer serves as a data translator for the network. The data which this layer receives from the Application Layer is extracted an... | [
{
"code": null,
"e": 25779,
"s": 25751,
"text": "\n12 Jan, 2022"
},
{
"code": null,
"e": 25804,
"s": 25779,
"text": "Prerequisite : OSI Model"
},
{
"code": null,
"e": 26438,
"s": 25804,
"text": "Introduction : Presentation Layer is the 6th layer in the Open Sy... |
How to use a div as content for Twitter's Popover? - GeeksforGeeks | 17 Feb, 2020
Twitter’s Popover is a bootstrap component somewhat similar to tool-tip where the highlighting difference is that it is triggered whenever the user clicks on the specified selector. Before we use <div> as the content inside the popover, let us have a look on DOM structure of the popover:
Program: DOM struc... | [
{
"code": null,
"e": 25383,
"s": 25355,
"text": "\n17 Feb, 2020"
},
{
"code": null,
"e": 25672,
"s": 25383,
"text": "Twitter’s Popover is a bootstrap component somewhat similar to tool-tip where the highlighting difference is that it is triggered whenever the user clicks on the s... |
How to Calculate Mean Absolute Percentage Error in Excel? - GeeksforGeeks | 09 Jul, 2021
In statistics, we often use Forecasting Accuracy which denotes the closeness of a quantity to the actual value of that particular quantity. The actual value is also known as the true value. It basically denotes the degree of closeness or a verification process that is highly used by business professionals ... | [
{
"code": null,
"e": 26173,
"s": 26145,
"text": "\n09 Jul, 2021"
},
{
"code": null,
"e": 26646,
"s": 26173,
"text": "In statistics, we often use Forecasting Accuracy which denotes the closeness of a quantity to the actual value of that particular quantity. The actual value is als... |
Node.js Console - GeeksforGeeks | 13 Oct, 2021
Node.js console module is a global object that provides a simple debugging console similar to JavaScript to display different levels of message. It is provided by web browsers. The console module contains two components:
Console class: The console class methods are console.log(), console.error() and consol... | [
{
"code": null,
"e": 38501,
"s": 38473,
"text": "\n13 Oct, 2021"
},
{
"code": null,
"e": 38722,
"s": 38501,
"text": "Node.js console module is a global object that provides a simple debugging console similar to JavaScript to display different levels of message. It is provided by ... |
Async Hooks in Node.js - GeeksforGeeks | 12 Jun, 2020
Async_hooks module is used because it provides an API to register callbacks tracking the lifetime of asynchronous resources created inside a Node.js application.
Features:
You can capture any asynchronous activity in a Node.js process.
Minimal performance overhead.
Powerful and flexible API.
These resource... | [
{
"code": null,
"e": 26143,
"s": 26115,
"text": "\n12 Jun, 2020"
},
{
"code": null,
"e": 26305,
"s": 26143,
"text": "Async_hooks module is used because it provides an API to register callbacks tracking the lifetime of asynchronous resources created inside a Node.js application."
... |
How to create pagination in Node.js using skip and limit ? - GeeksforGeeks | 10 Jun, 2021
Nodejs is an open-source and cross-platform runtime environment for executing JavaScript code outside the browser. It is widely used in developing APIs and microservices from small to large companies. It is a great tool as this enables developers to use JavaScript both on the server and client sides.
What ... | [
{
"code": null,
"e": 26292,
"s": 26264,
"text": "\n10 Jun, 2021"
},
{
"code": null,
"e": 26594,
"s": 26292,
"text": "Nodejs is an open-source and cross-platform runtime environment for executing JavaScript code outside the browser. It is widely used in developing APIs and microse... |
Image Resizing using OpenCV | Python - GeeksforGeeks | 15 Mar, 2021
Image resizing refers to the scaling of images. Scaling comes in handy in many image processing as well as machine learning applications. It helps in reducing the number of pixels from an image and that has several advantages e.g. It can reduce the time of training of a neural network as more is the number... | [
{
"code": null,
"e": 42713,
"s": 42685,
"text": "\n15 Mar, 2021"
},
{
"code": null,
"e": 43341,
"s": 42713,
"text": "Image resizing refers to the scaling of images. Scaling comes in handy in many image processing as well as machine learning applications. It helps in reducing the ... |
Apply uppercase to a column in Pandas dataframe - GeeksforGeeks | 06 Dec, 2018
Analyzing a real world data is some what difficult because we need to take various things into consideration. Apart from getting the useful data from large datasets, keeping data in required format is also very important.
One might encounter a situation where we need to uppercase each letter in any specifi... | [
{
"code": null,
"e": 26151,
"s": 26123,
"text": "\n06 Dec, 2018"
},
{
"code": null,
"e": 26373,
"s": 26151,
"text": "Analyzing a real world data is some what difficult because we need to take various things into consideration. Apart from getting the useful data from large dataset... |
Reading specific columns of a CSV file using Pandas - GeeksforGeeks | 24 Oct, 2020
Let us see how to read specific columns of a CSV file using Pandas. This can be done with the help of the pandas.read_csv() method. We will pass the first parameter as the CSV file and the second parameter the list of specific columns in the keyword usecols. It will return the data of the CSV file of speci... | [
{
"code": null,
"e": 25537,
"s": 25509,
"text": "\n24 Oct, 2020"
},
{
"code": null,
"e": 25857,
"s": 25537,
"text": "Let us see how to read specific columns of a CSV file using Pandas. This can be done with the help of the pandas.read_csv() method. We will pass the first paramete... |
Re-rendering Components in ReactJS - GeeksforGeeks | 23 Sep, 2021
As we know React JS is an open source JavaScript library that is used for building user interfaces specifically for single-page applications. It is also known for providing fast user experience by only updating the parts of the UI that have changed. Rendering components is not in user hands, it is a part o... | [
{
"code": null,
"e": 26067,
"s": 26039,
"text": "\n23 Sep, 2021"
},
{
"code": null,
"e": 26676,
"s": 26067,
"text": "As we know React JS is an open source JavaScript library that is used for building user interfaces specifically for single-page applications. It is also known for ... |
Number of occurrences of 2 as a digit in numbers from 0 to n - GeeksforGeeks | 24 Aug, 2021
Count the number of 2s as digit in all numbers from 0 to n.
Examples :
Input : 22
Output : 6
Explanation: Total 2s that appear as digit
from 0 to 22 are (2, 12, 20,
21, 22);
Input : 100
Output : 20
Explanation: total 2's comes between 0 to 100
are (2, 12, 20, 21, 22..29, 32, 4... | [
{
"code": null,
"e": 26405,
"s": 26377,
"text": "\n24 Aug, 2021"
},
{
"code": null,
"e": 26466,
"s": 26405,
"text": "Count the number of 2s as digit in all numbers from 0 to n. "
},
{
"code": null,
"e": 26478,
"s": 26466,
"text": "Examples : "
},
{
"co... |
Tensorflow.js tf.squeeze() Function - GeeksforGeeks | 31 May, 2021
Tensorflow.js is an open-source library that is developed by Google for running machine learning models as well as deep learning neural networks in the browser or node environment.
The .squeeze() function is used to discard the dimensions of length one out of the shape of a stated tf.Tensor.
Syntax :
tf.... | [
{
"code": null,
"e": 25895,
"s": 25867,
"text": "\n31 May, 2021"
},
{
"code": null,
"e": 26076,
"s": 25895,
"text": "Tensorflow.js is an open-source library that is developed by Google for running machine learning models as well as deep learning neural networks in the browser or ... |
HTML | DOM Location hostname Property - GeeksforGeeks | 23 Jul, 2019
The Location hostname property in HTML is used to return the hostname of the current URL. The Location hostname property returns a string which contains the domain name, or the IP address of a URL.
Syntax:
It returns the hostname property.location.hostname
location.hostname
It is used to set the hostname p... | [
{
"code": null,
"e": 25228,
"s": 25200,
"text": "\n23 Jul, 2019"
},
{
"code": null,
"e": 25426,
"s": 25228,
"text": "The Location hostname property in HTML is used to return the hostname of the current URL. The Location hostname property returns a string which contains the domain... |
C# | How to get Second Element of the Tuple? - GeeksforGeeks | 30 Apr, 2019
Tuple is a data structure which gives you the easiest way to represent a data set which has multiple values that may/may not be related to each other. Item2 Property is used to get the second element of the given tuple. It is not applicable on 1-Tuple and applicable on all other remaining tuples.
Syntax:
p... | [
{
"code": null,
"e": 25893,
"s": 25865,
"text": "\n30 Apr, 2019"
},
{
"code": null,
"e": 26191,
"s": 25893,
"text": "Tuple is a data structure which gives you the easiest way to represent a data set which has multiple values that may/may not be related to each other. Item2 Proper... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.