title stringlengths 3 221 | text stringlengths 17 477k | parsed listlengths 0 3.17k |
|---|---|---|
Facial recognition login system using Deep learning + ReactJS | by Dhruvil Shah | Towards Data Science | You must have seen a facial recognition login system in apps or websites. If you are an app developer or a website developer you may want to add facial recognition as a login phase in your system. Here, we are going to build a very easy-to-adapt login system from scratch that you can integrate into any app or system fo... | [
{
"code": null,
"e": 509,
"s": 172,
"text": "You must have seen a facial recognition login system in apps or websites. If you are an app developer or a website developer you may want to add facial recognition as a login phase in your system. Here, we are going to build a very easy-to-adapt login sys... |
WebRTC - Voice Demo | In this chapter, we are going to build a client application that allows two users on separate devices to communicate using WebRTC audio streams. Our application will have two pages. One for login and the other for making an audio call to another user.
The two pages will be the div tags. Most input is done through simpl... | [
{
"code": null,
"e": 2139,
"s": 1887,
"text": "In this chapter, we are going to build a client application that allows two users on separate devices to communicate using WebRTC audio streams. Our application will have two pages. One for login and the other for making an audio call to another user."
... |
How to read and write a file using Javascript? | You cannot read or write files in JS on client side(browsers). This can be done on serverside using the fs module in Node.js. It provides sync and async functions to read and write files on the file system. Let us look at the exmaples of reading and writing files using the fs module on node.js
Let us create a js file n... | [
{
"code": null,
"e": 1357,
"s": 1062,
"text": "You cannot read or write files in JS on client side(browsers). This can be done on serverside using the fs module in Node.js. It provides sync and async functions to read and write files on the file system. Let us look at the exmaples of reading and wri... |
Grouping Matching in Perl | From a regular-expression point of view in Perl, there is no difference between the following two expressions except that the former is slightly clearer.
$string =~ /(\S+)\s+(\S+)/;
and
$string =~ /\S+\s+\S+/;
However, the benefit of grouping is that it allows us to extract a sequence from a regular expression. Groupin... | [
{
"code": null,
"e": 1216,
"s": 1062,
"text": "From a regular-expression point of view in Perl, there is no difference between the following two expressions except that the former is slightly clearer."
},
{
"code": null,
"e": 1272,
"s": 1216,
"text": "$string =~ /(\\S+)\\s+(\\S+)... |
Tryit Editor v3.7 | Tryit: HTML responsive page | [] |
How to gray out (disable) a Tkinter Frame? | A Tkinter frame widget can contain a group of widgets. We can change the state of widgets in the frame by enabling or disabling the state of its underlying frame. To disable all the widgets inside that particular frame, we have to select all the children widgets that are lying inside that frame using winfor_children() ... | [
{
"code": null,
"e": 1451,
"s": 1062,
"text": "A Tkinter frame widget can contain a group of widgets. We can change the state of widgets in the frame by enabling or disabling the state of its underlying frame. To disable all the widgets inside that particular frame, we have to select all the childre... |
How to know the current position within a file in Python? | You can get the current position of the file object using the tell method. For example, if there is a file called my_file with text Hello\nworld,
f = open('my_file.txt', 'r')
f.readline()
print f.tell()
f.close()
The above code will give the output as 6 as it would be pointing just at the beginning of the word 'world'. | [
{
"code": null,
"e": 1208,
"s": 1062,
"text": "You can get the current position of the file object using the tell method. For example, if there is a file called my_file with text Hello\\nworld,"
},
{
"code": null,
"e": 1275,
"s": 1208,
"text": "f = open('my_file.txt', 'r')\nf.rea... |
Program to find amount of water in a given glass - GeeksforGeeks | 14 Feb, 2022
There are some glasses with equal capacity as 1 litre. The glasses are kept as follows:
1
2 3
4 5 6
7 8 9 10
You can put water to the only top glass. If you put more than 1-litre water to 1st glass, water overflows and fills equ... | [
{
"code": null,
"e": 24223,
"s": 24195,
"text": "\n14 Feb, 2022"
},
{
"code": null,
"e": 24312,
"s": 24223,
"text": "There are some glasses with equal capacity as 1 litre. The glasses are kept as follows: "
},
{
"code": null,
"e": 24411,
"s": 24312,
"text": " ... |
Convert a number into negative base representation in C++ | In this tutorial, we will be discussing a program to convert a number into its negative base representation.
For this we will be provided with a number and the corresponding negative base. Our task is to convert the given number into its negative base equivalent. We are allowing only values between -2 and -10 for negat... | [
{
"code": null,
"e": 1171,
"s": 1062,
"text": "In this tutorial, we will be discussing a program to convert a number into its negative base representation."
},
{
"code": null,
"e": 1399,
"s": 1171,
"text": "For this we will be provided with a number and the corresponding negative... |
Tryit Editor v3.7 | Tryit: HTML table - striped rows and columns | [] |
MongoDB query to return only embedded document? | It is not possible to return only embedded document. However, it will return all the documents from a collection. Let us first implement the following query to create a collection with documents
>db.queryToEmbeddedDocument.insertOne({"UserName":"Larry","PostDetails":[{"UserMessage":"Hello","UserLikes":8},{"UserMessage"... | [
{
"code": null,
"e": 1257,
"s": 1062,
"text": "It is not possible to return only embedded document. However, it will return all the documents from a collection. Let us first implement the following query to create a collection with documents"
},
{
"code": null,
"e": 1578,
"s": 1257,
... |
Creating animations using Transformations in OpenGL - GeeksforGeeks | 31 Oct, 2019
Animation is the illusion of making us think that an object is really moving on the screen. But underneath they are just complex algorithms updating and drawing different objects.
Aim: A complex animation of a walking dinosaur in 2D.Method: Using Transformations of individual body parts.See this Video:
Alg... | [
{
"code": null,
"e": 24928,
"s": 24900,
"text": "\n31 Oct, 2019"
},
{
"code": null,
"e": 25108,
"s": 24928,
"text": "Animation is the illusion of making us think that an object is really moving on the screen. But underneath they are just complex algorithms updating and drawing di... |
Fortran - Strings | The Fortran language can treat characters as single character or contiguous strings.
A character string may be only one character in length, or it could even be of zero length. In Fortran, character constants are given between a pair of double or single quotes.
The intrinsic data type character stores characters and st... | [
{
"code": null,
"e": 2231,
"s": 2146,
"text": "The Fortran language can treat characters as single character or contiguous strings."
},
{
"code": null,
"e": 2408,
"s": 2231,
"text": "A character string may be only one character in length, or it could even be of zero length. In Fo... |
How to specify Decimal Precision and scale number in MySQL database using PHPMyAdmin? | You need to select a database when you are creating a table. Right now, I have a sample database. The snapshot is as follows:
Now you need to give the table name as well as the number of columns you want:
After that you need to press Go button. Now, the following section would be visible:
The DECIMAL requires two param... | [
{
"code": null,
"e": 1188,
"s": 1062,
"text": "You need to select a database when you are creating a table. Right now, I have a sample database. The snapshot is as follows:"
},
{
"code": null,
"e": 1267,
"s": 1188,
"text": "Now you need to give the table name as well as the numbe... |
Divide 1 to n into two groups with minimum sum difference - GeeksforGeeks | 28 Apr, 2021
Given a positive integer n such that n > 2. Divide numbers from 1 to n in two groups such that absolute difference of sum of each group is minimum. Print any two groups with their size in first line and in next line print elements of that group.Examples:
Input : 5
Output : 2
5 2
3
... | [
{
"code": null,
"e": 25240,
"s": 25212,
"text": "\n28 Apr, 2021"
},
{
"code": null,
"e": 25497,
"s": 25240,
"text": "Given a positive integer n such that n > 2. Divide numbers from 1 to n in two groups such that absolute difference of sum of each group is minimum. Print any two g... |
7 Examples to Master SQL Joins. A comprehensive practical guide | by Soner Yıldırım | Towards Data Science | SQL is a programming language used by most relational database management systems (RDBMS) to manage data stored in tabular form (i.e. tables). A relational database consists of multiple tables that relate to each other. The relation between tables is formed with shared columns.
When we are to retrieve data from a relat... | [
{
"code": null,
"e": 451,
"s": 172,
"text": "SQL is a programming language used by most relational database management systems (RDBMS) to manage data stored in tabular form (i.e. tables). A relational database consists of multiple tables that relate to each other. The relation between tables is form... |
The Floyd-Warshall algorithm in Javascript | Djikstra's algorithm is used to find distance/path of the shortest path from one node to all other nodes. There are cases where we need to find shortest paths from all nodes to all other nodes. This is where the All pairs shortest path algorithms come in handy. The most used all pairs shortest path algorithm is Floyd W... | [
{
"code": null,
"e": 1401,
"s": 1062,
"text": "Djikstra's algorithm is used to find distance/path of the shortest path from one node to all other nodes. There are cases where we need to find shortest paths from all nodes to all other nodes. This is where the All pairs shortest path algorithms come i... |
Building a Color Recognizer in Python | by Behic Guven | Towards Data Science | In this post, I will show you how to build your own color recognizer using Python. This process is also known as “Color Detection”. We will create a basic application that will help us to detect the colors in an image. The program will also return as the RGB values of the colors, which is really helpful. Many graphic d... | [
{
"code": null,
"e": 650,
"s": 172,
"text": "In this post, I will show you how to build your own color recognizer using Python. This process is also known as “Color Detection”. We will create a basic application that will help us to detect the colors in an image. The program will also return as the ... |
Decimal to Binary conversion using C Programming | How to convert a decimal number to a binary number by using the function in the C programming language?
In this program, we are calling a function to binary in main(). The called function to binary will perform actual conversion.
The logic we are using is called function to convert decimal number to binary number is as... | [
{
"code": null,
"e": 1166,
"s": 1062,
"text": "How to convert a decimal number to a binary number by using the function in the C programming language?"
},
{
"code": null,
"e": 1292,
"s": 1166,
"text": "In this program, we are calling a function to binary in main(). The called fun... |
How to clear screen using Java? | Following is the code to clear screen using Java −
Live Demo
public class Demo{
public static void main(String[] args){
System.out.print("\033[H\033[2J");
System.out.flush();
}
}
The screen would be cleared
A class named Demo contains the main function. Here, the ANSI escape code is written, that cle... | [
{
"code": null,
"e": 1113,
"s": 1062,
"text": "Following is the code to clear screen using Java −"
},
{
"code": null,
"e": 1124,
"s": 1113,
"text": " Live Demo"
},
{
"code": null,
"e": 1260,
"s": 1124,
"text": "public class Demo{\n public static void main(St... |
Math of Q-Learning — Python. Understand where the Bellman equation... | by Omar Aflak | Towards Data Science | Q-Learning is a type of Reinforcement Learning which is a type of Machine Learning. Reinforcement learning has been used lately (typically) to teach an AI to play a game (Google DeepMind Atari, etc). Our goal is to understand a simple version of Reinforcement learning called Q-Learning, and write a program that will le... | [
{
"code": null,
"e": 539,
"s": 171,
"text": "Q-Learning is a type of Reinforcement Learning which is a type of Machine Learning. Reinforcement learning has been used lately (typically) to teach an AI to play a game (Google DeepMind Atari, etc). Our goal is to understand a simple version of Reinforce... |
The Simplest Data Science Project Using Pandas & Matplotlib | by Shivangi Sareen | Towards Data Science | We try so hard to find the perfect dataset to test out and improve our skills. But the truth is that no dataset is perfect. You make it perfect or at least improve it by preprocessing the data — an essential part of any data related project.
So, just pick up any dataset and get working! I experimented and the journey w... | [
{
"code": null,
"e": 414,
"s": 172,
"text": "We try so hard to find the perfect dataset to test out and improve our skills. But the truth is that no dataset is perfect. You make it perfect or at least improve it by preprocessing the data — an essential part of any data related project."
},
{
... |
Redux - Store | A store is an immutable object tree in Redux. A store is a state container which holds the application’s state. Redux can have only a single store in your application. Whenever a store is created in Redux, you need to specify the reducer.
Let us see how we can create a store using the createStore method from Redux. One... | [
{
"code": null,
"e": 2054,
"s": 1815,
"text": "A store is an immutable object tree in Redux. A store is a state container which holds the application’s state. Redux can have only a single store in your application. Whenever a store is created in Redux, you need to specify the reducer."
},
{
... |
getchar_unlocked() – Faster Input in C/C++ For Competitive Programming - GeeksforGeeks | 08 Feb, 2022
getchar_unlocked() is similar to getchar() with the exception that it is not thread-safe. This function can be securely used in a multi-threaded program if and only if they are invoked when the invoking thread possesses the (FILE*) object, as is the situation after calling flockfile() or ftrylockfile().
Sy... | [
{
"code": null,
"e": 24437,
"s": 24409,
"text": "\n08 Feb, 2022"
},
{
"code": null,
"e": 24742,
"s": 24437,
"text": "getchar_unlocked() is similar to getchar() with the exception that it is not thread-safe. This function can be securely used in a multi-threaded program if and onl... |
BabylonJS - WireFrame | With wireframe, you get the skeleton of the 3D model with only lines and vertices. Let us now see how to apply wireframe for any shape.
materialforbox.wireframe = true;
<!doctype html>
<html>
<head>
<meta charset = "utf-8">
<title>BabylonJs - Basic Element-Creating Scene</title>
<script src = "bab... | [
{
"code": null,
"e": 2319,
"s": 2183,
"text": "With wireframe, you get the skeleton of the 3D model with only lines and vertices. Let us now see how to apply wireframe for any shape."
},
{
"code": null,
"e": 2353,
"s": 2319,
"text": "materialforbox.wireframe = true;\n"
},
{
... |
How to filter String list by starting value in Java? | Let’s first create a String list −
List list = new ArrayList<>();
list.add("wxy");
list.add("zabc");
list.add("ddd2");
list.add("def");
list.add("ghi");
list.add("wer");
list.add("uij");
list.add("wqy");
To filter String list by starting value, use filter() and startsWith() −
list.stream().filter((b) -> b.startsWith("w... | [
{
"code": null,
"e": 1097,
"s": 1062,
"text": "Let’s first create a String list −"
},
{
"code": null,
"e": 1266,
"s": 1097,
"text": "List list = new ArrayList<>();\nlist.add(\"wxy\");\nlist.add(\"zabc\");\nlist.add(\"ddd2\");\nlist.add(\"def\");\nlist.add(\"ghi\");\nlist.add(\"we... |
Using networkD3 in R to create simple and clear Sankey diagrams | by Keith McNulty | Towards Data Science | I find Sankey diagrams super useful for illustrating flows of people or preferences. The networkD3 package in R offers a straightforward way to generate these diagrams without needing to know the ins and outs of the actual D3 code.
To show you what I mean, I generated a Sankey diagram to show how the twelve regions of ... | [
{
"code": null,
"e": 404,
"s": 172,
"text": "I find Sankey diagrams super useful for illustrating flows of people or preferences. The networkD3 package in R offers a straightforward way to generate these diagrams without needing to know the ins and outs of the actual D3 code."
},
{
"code": n... |
Tryit Editor v3.7 | Tryit: Responsive form | [] |
A Time Complexity Question - GeeksforGeeks | 27 Dec, 2021
What is the time complexity of following function fun()? Assume that log(x) returns log value in base 2.
C++
C
Java
Python3
C#
Javascript
void fun(){ int i, j; for (i = 1; i <= n; i++) for (j = 1; j <= log(i); j++) cout << "GeeksforGeeks";} // This code is contributed by SHUBHAMSIN... | [
{
"code": null,
"e": 24186,
"s": 24158,
"text": "\n27 Dec, 2021"
},
{
"code": null,
"e": 24292,
"s": 24186,
"text": "What is the time complexity of following function fun()? Assume that log(x) returns log value in base 2. "
},
{
"code": null,
"e": 24296,
"s": 2429... |
Difference between Context Free Grammar and Regular Grammar - GeeksforGeeks | 31 May, 2021
Noam Chomsky has divided grammar into four types :
Type
Name
0
1
2
3
Chomsky Hierarchy
1. Context Free Grammar :
Language generated by Context Free Grammar is accepted by Pushdown Automata
It is a subset of Type 0 and Type 1 grammar and a superset of Type 3 grammar.
Also called phase structured grammar.
D... | [
{
"code": null,
"e": 24450,
"s": 24419,
"text": " \n31 May, 2021\n"
},
{
"code": null,
"e": 24501,
"s": 24450,
"text": "Noam Chomsky has divided grammar into four types :"
},
{
"code": null,
"e": 24506,
"s": 24501,
"text": "Type"
},
{
"code": null,
... |
Angular forms formatCurrency Directive - GeeksforGeeks | 02 Jun, 2021
In this article, we are going to see what is formatCurrency in Angular 10 and how to use it. The formatCurrency is used to format a number as currency using locale rules.
Syntax:
formatCurrency(value, locale, currency, currencyCode, digitsInfo)
Parameters:
value: The number to format.
locale: A locale code... | [
{
"code": null,
"e": 26354,
"s": 26326,
"text": "\n02 Jun, 2021"
},
{
"code": null,
"e": 26525,
"s": 26354,
"text": "In this article, we are going to see what is formatCurrency in Angular 10 and how to use it. The formatCurrency is used to format a number as currency using locale... |
Class getFields() method in Java with Examples - GeeksforGeeks | 25 Jan, 2022
The getFields() method of java.lang.Class class is used to get the fields of this class, which are the fields that are public and its members. The method returns the fields of this class in the form of array of Field objects. Syntax:
public Field[] getFields()
Parameter: This method does not accept any p... | [
{
"code": null,
"e": 25667,
"s": 25639,
"text": "\n25 Jan, 2022"
},
{
"code": null,
"e": 25903,
"s": 25667,
"text": "The getFields() method of java.lang.Class class is used to get the fields of this class, which are the fields that are public and its members. The method returns t... |
Java Program for Binary Insertion Sort - GeeksforGeeks | 28 Jun, 2021
We can use binary search to reduce the number of comparisons in normal insertion sort. Binary Insertion Sort find use binary search to find the proper location to insert the selected item at each iteration.In normal insertion, sort it takes O(i) (at ith iteration) in worst case. we can reduce it to O(logi)... | [
{
"code": null,
"e": 26762,
"s": 26734,
"text": "\n28 Jun, 2021"
},
{
"code": null,
"e": 27094,
"s": 26762,
"text": "We can use binary search to reduce the number of comparisons in normal insertion sort. Binary Insertion Sort find use binary search to find the proper location to ... |
ReactJS Evergreen TextInput Component - GeeksforGeeks | 11 Jun, 2021
React Evergreen is a popular front-end library with a set of React components for building beautiful products as this library is flexible, sensible defaults, and User friendly. TextInput Component allows the user to type the input text through a text input field. We can use the following approach in ReactJ... | [
{
"code": null,
"e": 25232,
"s": 25204,
"text": "\n11 Jun, 2021"
},
{
"code": null,
"e": 25583,
"s": 25232,
"text": "React Evergreen is a popular front-end library with a set of React components for building beautiful products as this library is flexible, sensible defaults, and U... |
Handling Plot Axis Spines in Python | by Elena Kosourova | Towards Data Science | Axis spines are the lines confining the plot area. Depending on the situation, we may want to remove some (or all) of them, change their color, make them less visible, regulate their width/style, or change their position. In this article, we’ll explore some handy approaches for dealing with axis spines.
In many cases, ... | [
{
"code": null,
"e": 476,
"s": 171,
"text": "Axis spines are the lines confining the plot area. Depending on the situation, we may want to remove some (or all) of them, change their color, make them less visible, regulate their width/style, or change their position. In this article, we’ll explore so... |
What is the difference between re.findall() and re.finditer() methods available in Python? | The re.findall() helps to get a list of all matching patterns. It searches from start or end of the given string. If we use method findall to search for a pattern in a given string it will return all occurrences of the pattern. While searching a pattern, it is recommended to use re.findall() always, it works like re.se... | [
{
"code": null,
"e": 1410,
"s": 1062,
"text": "The re.findall() helps to get a list of all matching patterns. It searches from start or end of the given string. If we use method findall to search for a pattern in a given string it will return all occurrences of the pattern. While searching a pattern... |
C# | Get value of the bit at a specific position in BitArray - GeeksforGeeks | 01 Feb, 2019
The BitArray class manages a compact array of bit values, which are represented as Booleans, where true indicates that the bit is on i.e, 1 and false indicates the bit is off i.e, 0. This class is contained in System.Collections namespace.BitArray.Get(Int32) method is used to get the value of the bit at a ... | [
{
"code": null,
"e": 24368,
"s": 24340,
"text": "\n01 Feb, 2019"
},
{
"code": null,
"e": 24710,
"s": 24368,
"text": "The BitArray class manages a compact array of bit values, which are represented as Booleans, where true indicates that the bit is on i.e, 1 and false indicates the... |
F# - Discriminated Unions | Unions, or discriminated unions allows you to build up complex data structures representing well-defined set of choices. For example, you need to build an implementation of a choice variable, which has two values yes and no. Using the Unions tool, you can design this.
Discriminated unions are defined using the followin... | [
{
"code": null,
"e": 2430,
"s": 2161,
"text": "Unions, or discriminated unions allows you to build up complex data structures representing well-defined set of choices. For example, you need to build an implementation of a choice variable, which has two values yes and no. Using the Unions tool, you c... |
Merge Overlapping Intervals using C++. | Given a set of time intervals in any order, merge all overlapping intervals into one and output the result which should have only mutually exclusive intervals
Given set of interval is {{12, 14}, {11, 13}, {20, 22}, {21, 23}} then
Interval {12, 14} and {11, 13} overlap with each other hence merge them as {11, 14}
Interv... | [
{
"code": null,
"e": 1221,
"s": 1062,
"text": "Given a set of time intervals in any order, merge all overlapping intervals into one and output the result which should have only mutually exclusive intervals"
},
{
"code": null,
"e": 1292,
"s": 1221,
"text": "Given set of interval i... |
How do nested functions work in Python? | To learn about nested function, refer the following code. In the code, you can see Inner functions can access variables from the enclosing scope, which is the local variable.
def mulFunc(num1):
def mul(num2):
return num1 * num2
return mul
res = mulFunc(15)
// The following prints 300 i.e. 20*15
print(res(20... | [
{
"code": null,
"e": 1237,
"s": 1062,
"text": "To learn about nested function, refer the following code. In the code, you can see Inner functions can access variables from the enclosing scope, which is the local variable."
},
{
"code": null,
"e": 1385,
"s": 1237,
"text": "def mul... |
Different ways to iterate over a set in C++ - GeeksforGeeks | 10 Dec, 2021
Sets are a type of associative container in which each element has to be unique because the value of the element identifies it. The values are stored in a specific order.
Syntax:
set<datatype> setname;
Here,Datatype: Set can take any data type depending on the values, e.g. int, char, float, etc.
This arti... | [
{
"code": null,
"e": 24018,
"s": 23990,
"text": "\n10 Dec, 2021"
},
{
"code": null,
"e": 24190,
"s": 24018,
"text": "Sets are a type of associative container in which each element has to be unique because the value of the element identifies it. The values are stored in a specific... |
Number of times a number can be replaced by the sum of its digits until it only contains one digit - GeeksforGeeks | 16 Apr, 2021
Count the number of times a number can be replaced by the sum of its digits until it only contains one digit and number can be very large.Examples:
Input : 10
Output : 1
1 + 0 = 1, so only one times
an number can be replaced by its sum .
Input : 991
Output : 3
9 + 9 + 1 = 19, 1 + 9 = 10, 1 + 0 = 1
hen... | [
{
"code": null,
"e": 24719,
"s": 24691,
"text": "\n16 Apr, 2021"
},
{
"code": null,
"e": 24869,
"s": 24719,
"text": "Count the number of times a number can be replaced by the sum of its digits until it only contains one digit and number can be very large.Examples: "
},
{
... |
How to insert blank row into dataframe in R ? - GeeksforGeeks | 17 Dec, 2021
In this article, we will discuss how to insert blank rows in dataframe in R Programming Language.
The nrow() method in R is used to return the number of rows in a dataframe. A new row can be inserted at the end of the dataframe using the indexing technique. The new row is assigned a vector NA, in order to ... | [
{
"code": null,
"e": 24834,
"s": 24806,
"text": "\n17 Dec, 2021"
},
{
"code": null,
"e": 24932,
"s": 24834,
"text": "In this article, we will discuss how to insert blank rows in dataframe in R Programming Language."
},
{
"code": null,
"e": 25212,
"s": 24932,
"... |
How to use filter within controllers in AngularJS ? | 29 Jan, 2020
Filters are used to format the value of an expression and display to the user. It can be used in HTML Previews, Controllers or Services, and directives. AngularJS has many built-in filters, but we can easily define our own filter.
Built-in filters:
AngularJS filter Filter:
AngularJS currency Filter:
Angula... | [
{
"code": null,
"e": 54,
"s": 26,
"text": "\n29 Jan, 2020"
},
{
"code": null,
"e": 285,
"s": 54,
"text": "Filters are used to format the value of an expression and display to the user. It can be used in HTML Previews, Controllers or Services, and directives. AngularJS has many bu... |
Express.js | app.render() Function | 18 Jun, 2020
The app.render() function is used to rendered HTML of a view via the callback function. This function returns the html in the callback function.
Syntax:
app.render(view, [locals], callback)
Parameters:
view: It is the name of the HTML page which is to be rendered.locals: It is an optional parameter that wh... | [
{
"code": null,
"e": 54,
"s": 26,
"text": "\n18 Jun, 2020"
},
{
"code": null,
"e": 199,
"s": 54,
"text": "The app.render() function is used to rendered HTML of a view via the callback function. This function returns the html in the callback function."
},
{
"code": null,
... |
Python Tkinter – Entry Widget | 01 Feb, 2021
Python offers multiple options for developing a GUI (Graphical User Interface). Out of all the GUI methods, Tkinter is the most commonly used method. Python with Tkinter is the fastest and easiest way to create GUI applications. Creating a GUI using Tkinter is an easy task.In Python3 Tkinter is come preins... | [
{
"code": null,
"e": 54,
"s": 26,
"text": "\n01 Feb, 2021"
},
{
"code": null,
"e": 420,
"s": 54,
"text": "Python offers multiple options for developing a GUI (Graphical User Interface). Out of all the GUI methods, Tkinter is the most commonly used method. Python with Tkinter is t... |
Maximize array sum after K negations | Set 1 | 05 Jul, 2022
Given an array of size n and a number k. We must modify array K a number of times. Here modify array means in each operation we can replace any array element arr[i] by -arr[i]. We need to perform this operation in such a way that after K operations, the sum of the array must be maximum?
Examples :
Input :... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n05 Jul, 2022"
},
{
"code": null,
"e": 340,
"s": 52,
"text": "Given an array of size n and a number k. We must modify array K a number of times. Here modify array means in each operation we can replace any array element arr[i] by -arr[i... |
How to generate a simple popup using jQuery ? | 27 Jan, 2021
The task is to generate a popup using jQuery. Popups are useful to splash important information to the visitors of a website.
Approach: A simple pop can be made by using toggle() method of jQuery which toggles between hide() and show() function of jQuery i.e. it checks the visibility of the selector used. ... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n27 Jan, 2021"
},
{
"code": null,
"e": 178,
"s": 52,
"text": "The task is to generate a popup using jQuery. Popups are useful to splash important information to the visitors of a website."
},
{
"code": null,
"e": 465,
"s... |
std::set_difference in C++ | 28 Apr, 2022
The difference of two sets is formed by the elements that are present in the first set, but not in the second one. The elements copied by the function come always from the first range, in the same order. The elements in the both the ranges shall already be ordered.
1. Comparing elements using “<“:
Syntax... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n28 Apr, 2022"
},
{
"code": null,
"e": 295,
"s": 28,
"text": "The difference of two sets is formed by the elements that are present in the first set, but not in the second one. The elements copied by the function come always from the fir... |
enable and disable command in Linux | 05 Nov, 2019
Enables and disables are the built-in shell commands. enable command is used to start the printers or classes whereas the disable command is used to stop the printers or classes.
Syntax For enable Command:
enable [-a] [-dnps] [-f filename][name ...]
Syntax For disable Command:
disable [-c] [-W] [ -r [ rea... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n05 Nov, 2019"
},
{
"code": null,
"e": 207,
"s": 28,
"text": "Enables and disables are the built-in shell commands. enable command is used to start the printers or classes whereas the disable command is used to stop the printers or class... |
Queries on Left and Right Circular shift on array | 17 Jun, 2022
Given an array A of N integers. There are three types of commands:
1 x : Right Circular Shift the array x times. If an array is a[0], a[1], ...., a[n – 1], then after one right circular shift the array will become a[n – 1], a[0], a[1], ...., a[n – 2].
2 y : Left Circular Shift the array y times. If an arr... | [
{
"code": null,
"e": 54,
"s": 26,
"text": "\n17 Jun, 2022"
},
{
"code": null,
"e": 122,
"s": 54,
"text": "Given an array A of N integers. There are three types of commands: "
},
{
"code": null,
"e": 307,
"s": 122,
"text": "1 x : Right Circular Shift the array ... |
Sleeping Barber problem in Process Synchronization | 14 Aug, 2019
Prerequisite – Inter Process CommunicationProblem : The analogy is based upon a hypothetical barber shop with one barber. There is a barber shop which has one barber, one barber chair, and n chairs for waiting for customers if there are any to sit on the chair.
If there is no customer, then the barber slee... | [
{
"code": null,
"e": 54,
"s": 26,
"text": "\n14 Aug, 2019"
},
{
"code": null,
"e": 316,
"s": 54,
"text": "Prerequisite – Inter Process CommunicationProblem : The analogy is based upon a hypothetical barber shop with one barber. There is a barber shop which has one barber, one bar... |
How to detect HTTP or HTTPS then force redirect to HTTPS in JavaScript ? | 12 Dec, 2021
HTTPS stands for Hypertext Transfer Protocol Secure. As its name implies, it creates a secure, encrypted connection between the user’s browser and the server they are trying to access. Since it is an encrypted connection, it prevents malicious hackers from stealing data that is transmitted from the user’s ... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n12 Dec, 2021"
},
{
"code": null,
"e": 949,
"s": 28,
"text": "HTTPS stands for Hypertext Transfer Protocol Secure. As its name implies, it creates a secure, encrypted connection between the user’s browser and the server they are trying t... |
Why we should use set.seed in R? | The use of set.seed is to make sure that we get the same results for randomization. If we
randomly select some observations for any task in R or in any statistical software it
results in different values all the time and this happens because of randomization. If we
want to keep the values that are produced at first ran... | [
{
"code": null,
"e": 1553,
"s": 1062,
"text": "The use of set.seed is to make sure that we get the same results for randomization. If we\nrandomly select some observations for any task in R or in any statistical software it\nresults in different values all the time and this happens because of random... |
How to order an alphanumeric column in MySQL? | To order an alphanumeric column with values like “100X, “2Z”, etc. use the ORDER BY. Let us first create a table −
mysql> create table DemoTable
-> (
-> StudentId varchar(100)
-> );
Query OK, 0 rows affected (0.52 sec)
Insert some records in the table using insert command −
mysql> insert into DemoTable values('2X');
Qu... | [
{
"code": null,
"e": 1177,
"s": 1062,
"text": "To order an alphanumeric column with values like “100X, “2Z”, etc. use the ORDER BY. Let us first create a table −"
},
{
"code": null,
"e": 1281,
"s": 1177,
"text": "mysql> create table DemoTable\n-> (\n-> StudentId varchar(100)\n-> ... |
Bootstrap Collapsible button | The collapsible button is used in Bootstrap to create a collapsible that can be shown or hidden on click.
You can try to run the following code to create a collapsible button:
Live Demo
<!DOCTYPE html>
<html>
<head>
<title>Bootstrap Example</title>
<link href = "/bootstrap/css/bootstrap.min.css" rel = "s... | [
{
"code": null,
"e": 1168,
"s": 1062,
"text": "The collapsible button is used in Bootstrap to create a collapsible that can be shown or hidden on click."
},
{
"code": null,
"e": 1238,
"s": 1168,
"text": "You can try to run the following code to create a collapsible button:"
},
... |
Python Program For Finding The Length Of Loop In Linked List - GeeksforGeeks | 21 Jan, 2022
Write a function detectAndCountLoop() that checks whether a given Linked List contains loop and if loop is present then returns count of nodes in loop. For example, the loop is present in below-linked list and length of the loop is 4. If the loop is not present, then the function should return 0.
Approach:... | [
{
"code": null,
"e": 24854,
"s": 24826,
"text": "\n21 Jan, 2022"
},
{
"code": null,
"e": 25152,
"s": 24854,
"text": "Write a function detectAndCountLoop() that checks whether a given Linked List contains loop and if loop is present then returns count of nodes in loop. For example... |
Convert a list into tuple of lists in Python | Converting one data container into another in python is a frequent requirement. In this article we will take a list and convert into a tuple where each element of the tuple is also a list.
We can apply the tuple function straight to the list. But we have to also put a for loop in place so that each element is enclosed ... | [
{
"code": null,
"e": 1251,
"s": 1062,
"text": "Converting one data container into another in python is a frequent requirement. In this article we will take a list and convert into a tuple where each element of the tuple is also a list."
},
{
"code": null,
"e": 1391,
"s": 1251,
"t... |
Bootstrap 5 Spinners - GeeksforGeeks | 18 Nov, 2021
In this article, we will implement spinners in the website using Bootstrap & will also see the implementation of different types of spinners through the example. The spinners are used to specify the loading state of a component or webpage. Bootstrap facilitates the various classes for creating different st... | [
{
"code": null,
"e": 25227,
"s": 25199,
"text": "\n18 Nov, 2021"
},
{
"code": null,
"e": 25601,
"s": 25227,
"text": "In this article, we will implement spinners in the website using Bootstrap & will also see the implementation of different types of spinners through the example. T... |
Heap Data Structure - GeeksQuiz | 07 Nov, 2019
BUILD-HEAP(A)
heapsize := size(A);
for i := floor(heapsize/2) downto 1
do HEAPIFY(A, i);
end for
END
9
/ | \
/ | \
5 6 8
... | [
{
"code": null,
"e": 27530,
"s": 27502,
"text": "\n07 Nov, 2019"
},
{
"code": null,
"e": 27656,
"s": 27530,
"text": "BUILD-HEAP(A) \n heapsize := size(A); \n for i := floor(heapsize/2) downto 1 \n do HEAPIFY(A, i); \n end for \nEND"
},
{
"code": null,
... |
Python | Pandas Timestamp.toordinal - GeeksforGeeks | 27 Jan, 2019
Python is a great language for doing data analysis, primarily because of the fantastic ecosystem of data-centric python packages. Pandas is one of those packages and makes importing and analyzing data much easier.
Pandas Timestamp.toordinal() function return proleptic Gregorian ordinal. January 1 of year 1... | [
{
"code": null,
"e": 24643,
"s": 24615,
"text": "\n27 Jan, 2019"
},
{
"code": null,
"e": 24857,
"s": 24643,
"text": "Python is a great language for doing data analysis, primarily because of the fantastic ecosystem of data-centric python packages. Pandas is one of those packages a... |
How to record a video in Selenium webdriver? | We can record a video with Selenium. There is no default technique in Selenium to record videos. The videos can be captured in the below processes−
ATUTestRecorder.jar and ATUReporter_Selenium_testNG.jar files need to be downloaded and saved within the project folder.
ATUTestRecorder.jar and ATUReporter_Selenium_testNG... | [
{
"code": null,
"e": 1210,
"s": 1062,
"text": "We can record a video with Selenium. There is no default technique in Selenium to record videos. The videos can be captured in the below processes−"
},
{
"code": null,
"e": 1331,
"s": 1210,
"text": "ATUTestRecorder.jar and ATUReporte... |
How to key in values in input text box with Javascript executor in Selenium with python? | We can key in values inside an input text box with a Javascript executor in Selenium. Javascript is a language used for scripting and runs on the client side (on the browser). Selenium gives default methods to work with Javascript.
javaScript = "document.getElementsByClassName('gsc-input')[0].value = 'T' ")
driver.exec... | [
{
"code": null,
"e": 1294,
"s": 1062,
"text": "We can key in values inside an input text box with a Javascript executor in Selenium. Javascript is a language used for scripting and runs on the client side (on the browser). Selenium gives default methods to work with Javascript."
},
{
"code":... |
Extract Author's information from Geeksforgeeks article using Python - GeeksforGeeks | 25 Aug, 2021
In this article, we are going to write a python script to extract author information from GeeksforGeeks article.
bs4: Beautiful Soup(bs4) is a Python library for pulling data out of HTML and XML files. This module does not come built-in with Python. To install this type the below command in the terminal.
p... | [
{
"code": null,
"e": 24780,
"s": 24752,
"text": "\n25 Aug, 2021"
},
{
"code": null,
"e": 24893,
"s": 24780,
"text": "In this article, we are going to write a python script to extract author information from GeeksforGeeks article."
},
{
"code": null,
"e": 25086,
"s... |
Finding LCM of more than two (or array) numbers without using GCD in C++ | We have an array A, we have to find the LCM of all elements without using the GCD operation. If the array is like {4, 6, 12, 24, 30}, then the LCM will be 120.
The LCM can be calculated easily for two numbers. We have to follow this algorithm to get the LCM.
getLCM(a, b) −
begin
if a > b, then m := a, otherwise m :=... | [
{
"code": null,
"e": 1222,
"s": 1062,
"text": "We have an array A, we have to find the LCM of all elements without using the GCD operation. If the array is like {4, 6, 12, 24, 30}, then the LCM will be 120."
},
{
"code": null,
"e": 1321,
"s": 1222,
"text": "The LCM can be calcula... |
Python | Pandas Dataframe.pop() | 30 Dec, 2021
Python is a great language for doing data analysis, primarily because of the fantastic ecosystem of data-centric python packages. Pandas is one of those packages and makes importing and analyzing data much easier.Pandas Pop() method is common in most of the data structures but pop() method is a little bit ... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n30 Dec, 2021"
},
{
"code": null,
"e": 540,
"s": 28,
"text": "Python is a great language for doing data analysis, primarily because of the fantastic ecosystem of data-centric python packages. Pandas is one of those packages and makes imp... |
JavaScript | Adding minutes to Date object | 23 May, 2019
Given a date and the task is to add minutes to it. To add minutes to the date object in javascript, some methods are used which are listed below:
JavaScript getMinutes() Method: This method returns the Minutes (from 0 to 59) of the provided date and time.Syntax:Date.getMinutes()
Return value: It returns a ... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n23 May, 2019"
},
{
"code": null,
"e": 174,
"s": 28,
"text": "Given a date and the task is to add minutes to it. To add minutes to the date object in javascript, some methods are used which are listed below:"
},
{
"code": null,
... |
Frequency Reuse | 16 May, 2020
Frequency Reuse is the scheme in which allocation and reuse of channels throughout a coverage region is done. Each cellular base station is allocated a group of radio channels or Frequency sub-bands to be used within a small geographic area known as a cell. The shape of the cell is Hexagonal. The process o... | [
{
"code": null,
"e": 54,
"s": 26,
"text": "\n16 May, 2020"
},
{
"code": null,
"e": 514,
"s": 54,
"text": "Frequency Reuse is the scheme in which allocation and reuse of channels throughout a coverage region is done. Each cellular base station is allocated a group of radio channel... |
Convert Infix To Prefix Notation | 23 Jun, 2022
While we use infix expressions in our day to day lives. Computers have trouble understanding this format because they need to keep in mind rules of operator precedence and also brackets. Prefix and Postfix expressions are easier for a computer to understand and evaluate. Given two operands and and an opera... | [
{
"code": null,
"e": 54,
"s": 26,
"text": "\n23 Jun, 2022"
},
{
"code": null,
"e": 702,
"s": 54,
"text": "While we use infix expressions in our day to day lives. Computers have trouble understanding this format because they need to keep in mind rules of operator precedence and al... |
Harmonic Progression | 06 Jul, 2022
A sequence of numbers is called a Harmonic progression if the reciprocal of the terms are in AP. In simple terms, a, b, c, d, e, f are in HP if 1/a, 1/b, 1/c, 1/d, 1/e, 1/f are in AP. For example, 1/a, 1/(a+d), 1/(a+2d), and so on are in HP because a, a + d, a + 2d are in AP.
Fact about Harmonic Progress... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n06 Jul, 2022"
},
{
"code": null,
"e": 331,
"s": 52,
"text": "A sequence of numbers is called a Harmonic progression if the reciprocal of the terms are in AP. In simple terms, a, b, c, d, e, f are in HP if 1/a, 1/b, 1/c, 1/d, 1/e, 1/f a... |
Taking multiple inputs from user in Python | 08 Jul, 2022
The developer often wants a user to enter multiple values or inputs in one line. In C++/C user can take multiple inputs in one line using scanf but in Python user can take multiple values or inputs in one line by two methods.
Using split() method
Using List comprehension
Using split() method : This functi... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n08 Jul, 2022"
},
{
"code": null,
"e": 279,
"s": 52,
"text": "The developer often wants a user to enter multiple values or inputs in one line. In C++/C user can take multiple inputs in one line using scanf but in Python user can take mu... |
Python | Positional Index | 13 Sep, 2021
This article talks about building an inverted index for an information retrieval (IR) system. However, in a real-life IR system, we not only encounter single-word queries (such as “dog”, “computer”, or “alex”) but also phrasal queries (such as “winter is coming”, “new york”, or “where is kevin”). To handle... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n13 Sep, 2021"
},
{
"code": null,
"e": 394,
"s": 28,
"text": "This article talks about building an inverted index for an information retrieval (IR) system. However, in a real-life IR system, we not only encounter single-word queries (suc... |
Binary Search (bisect) in Python | Here we will see the bisect in Python. The bisect is used for binary search. The binary search technique is used to find elements in sorted list. The bisect is one library function.
We will see three different task using bisect in Python.
The bisect.bisect_left(a, x, lo = 0, hi = len(a)) this function is used to return... | [
{
"code": null,
"e": 1369,
"s": 1187,
"text": "Here we will see the bisect in Python. The bisect is used for binary search. The binary search technique is used to find elements in sorted list. The bisect is one library function."
},
{
"code": null,
"e": 1426,
"s": 1369,
"text": "... |
jQuery - children( [selector]) Method | The children( [selector] ) method gets a set of elements containing all of the unique immediate children of each of the matched set of elements.
Here is the simple syntax to use this method −
selector.children( [selector] )
Here is the description of all the parameters used by this method −
selector − This is an optio... | [
{
"code": null,
"e": 2934,
"s": 2789,
"text": "The children( [selector] ) method gets a set of elements containing all of the unique immediate children of each of the matched set of elements."
},
{
"code": null,
"e": 2981,
"s": 2934,
"text": "Here is the simple syntax to use this... |
How to call an API continuously from server side itself in Node.js/Express.js ? | 06 Oct, 2021
Calling an API endpoint is the core functionality of modern internet technology. Usually, we call API from the browser. Sometimes we need to call API endpoint from the server itself to fetch data, load dependencies, etc.
There are many ways to call API from NodeJS server itself, depending on the abstractio... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n06 Oct, 2021"
},
{
"code": null,
"e": 249,
"s": 28,
"text": "Calling an API endpoint is the core functionality of modern internet technology. Usually, we call API from the browser. Sometimes we need to call API endpoint from the server ... |
What is Register Renaming? | Register renaming is a standard approach for eliminating false data dependencies, such as WAR and WAW dependencies, between register data. It was first suggested by Tjaden and Flynn in 1970.
They intended to use register renaming for a definite set of instructions that compare more or less to the class of load instruct... | [
{
"code": null,
"e": 1378,
"s": 1187,
"text": "Register renaming is a standard approach for eliminating false data dependencies, such as WAR and WAW dependencies, between register data. It was first suggested by Tjaden and Flynn in 1970."
},
{
"code": null,
"e": 1672,
"s": 1378,
... |
ReactJS | Icons | 22 Jun, 2020
A built-in library of icons is provided by React, by using it we can include any number of icons in our project. We just have to import module in our app.js file by mentioning library name and icon name which we want to add.
Prerequisites:
Basics of ReactJS
NodeJS:Installation of Node.js on WindowsInstal... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n22 Jun, 2020"
},
{
"code": null,
"e": 253,
"s": 28,
"text": "A built-in library of icons is provided by React, by using it we can include any number of icons in our project. We just have to import module in our app.js file by mentioning... |
List in C++ Standard Template Library (STL) | 06 Jul, 2022
Lists are sequence containers that allow non-contiguous memory allocation. As compared to vector, the list has slow traversal, but once a position has been found, insertion and deletion are quick. Normally, when we say a List, we talk about a doubly linked list. For implementing a singly linked list, we us... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n06 Jul, 2022"
},
{
"code": null,
"e": 446,
"s": 52,
"text": "Lists are sequence containers that allow non-contiguous memory allocation. As compared to vector, the list has slow traversal, but once a position has been found, insertion a... |
Python | Pandas Series.asfreq() | 27 Feb, 2019
Pandas series is a One-dimensional ndarray with axis labels. The labels need not be unique but must be a hashable type. The object supports both integer- and label-based indexing and provides a host of methods for performing operations involving the index.
Pandas Series.asfreq() function is used to convert... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n27 Feb, 2019"
},
{
"code": null,
"e": 285,
"s": 28,
"text": "Pandas series is a One-dimensional ndarray with axis labels. The labels need not be unique but must be a hashable type. The object supports both integer- and label-based index... |
Test Case Prioritization in Software Testing | 11 Aug, 2020
As the name suggests, test case prioritization refers to prioritizing test cases in test suite on basis of different factors. Factors could be code coverage, risk/critical modules, functionality, features, etc.
Why should test cases be prioritized?As the size of software increases, test suite also grows bi... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n11 Aug, 2020"
},
{
"code": null,
"e": 263,
"s": 52,
"text": "As the name suggests, test case prioritization refers to prioritizing test cases in test suite on basis of different factors. Factors could be code coverage, risk/critical mo... |
Stack of Pair in C++ STL with Examples | 25 Mar, 2020
Stack in STL Stacks are a type of container adaptors with LIFO(Last In First Out) type of working, where a new element is added at one end and (top) an element is removed from that end only.
Pair in STL The pair container is a simple container defined in header consisting of two data elements or objects. T... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n25 Mar, 2020"
},
{
"code": null,
"e": 243,
"s": 52,
"text": "Stack in STL Stacks are a type of container adaptors with LIFO(Last In First Out) type of working, where a new element is added at one end and (top) an element is removed fro... |
Optional get() method in Java with examples | 30 Jul, 2019
The get() method of java.util.Optional class in Java is used to get the value of this Optional instance. If there is no value present in this Optional instance, then this method throws NullPointerException.
Syntax:
public T get()
Parameters: This method do not accept any parameter.
Return value: This meth... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n30 Jul, 2019"
},
{
"code": null,
"e": 235,
"s": 28,
"text": "The get() method of java.util.Optional class in Java is used to get the value of this Optional instance. If there is no value present in this Optional instance, then this meth... |
How to generate a drop down list of timezone using PHP ? | 11 Oct, 2019
The timezone_identifiers_list() function is used to generate a dropdown list of timezone with PHP. This function is used to return an indexed array containing all the timezone identifiers. The datetimezone object is sent as a parameter to the timezone_identifiers_list() function and it returns an indexed a... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n11 Oct, 2019"
},
{
"code": null,
"e": 625,
"s": 28,
"text": "The timezone_identifiers_list() function is used to generate a dropdown list of timezone with PHP. This function is used to return an indexed array containing all the timezone... |
Sorting without comparison of elements | 06 May, 2021
Given an array with integer elements in small range, sort the array. We need to write a non-comparison based sorting algorithm with following assumptions about input.
All the entries in the array are integers.The difference between the maximum value and the minimum value in the array is less than or equal... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n06 May, 2021"
},
{
"code": null,
"e": 220,
"s": 52,
"text": "Given an array with integer elements in small range, sort the array. We need to write a non-comparison based sorting algorithm with following assumptions about input. "
},
... |
What are the various timing features of Node.js ? | 20 May, 2020
The timer modules in Node.js consists of functions that help to control the timings of code execution. It includes setTimeout(), setImmediate(), and setInterval() methods.
1. setTimeout() Method: The setTimeout() method is used to schedule code execution after a designated amount of milliseconds. The speci... | [
{
"code": null,
"e": 54,
"s": 26,
"text": "\n20 May, 2020"
},
{
"code": null,
"e": 226,
"s": 54,
"text": "The timer modules in Node.js consists of functions that help to control the timings of code execution. It includes setTimeout(), setImmediate(), and setInterval() methods."
... |
One bit memory cell (or Basic Bistable element) | 22 Aug, 2019
One Bit memory cell is also called Basic Bistable element. It has two cross-coupled inverters, 2 outputs Q and Q’. It is called “Bistable” as the basic bistable element circuit has two stable states logic 0 and logic 1.
The following diagram shows the Basic Bistable element:
(A) when A=0,
(i) In inverter1,... | [
{
"code": null,
"e": 53,
"s": 25,
"text": "\n22 Aug, 2019"
},
{
"code": null,
"e": 273,
"s": 53,
"text": "One Bit memory cell is also called Basic Bistable element. It has two cross-coupled inverters, 2 outputs Q and Q’. It is called “Bistable” as the basic bistable element circu... |
Kotlin Inheritance | 01 Oct, 2021
Inheritance is one of the more important features in object-oriented programming. Inheritance enables code re-usability, it allows all the features from an existing class(base class) to be inherited by a new class(derived class). In addition, the derived class can also add some features of its own.
Syntax ... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n01 Oct, 2021"
},
{
"code": null,
"e": 352,
"s": 52,
"text": "Inheritance is one of the more important features in object-oriented programming. Inheritance enables code re-usability, it allows all the features from an existing class(bas... |
How to Communicate with PC using Android? | 06 Jun, 2021
In this article, we would be discussing one of the basic ways of communication between a program on a PC and an Android device. Here we will use the concept of Socket programming. We know communication takes place between a sender and a receiver, Socket programming involves a Client-Server setup, where a c... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n06 Jun, 2021"
},
{
"code": null,
"e": 497,
"s": 28,
"text": "In this article, we would be discussing one of the basic ways of communication between a program on a PC and an Android device. Here we will use the concept of Socket programm... |
Java Program to Store Even & Odd Elements of an Array into Separate Arrays | 13 Apr, 2022
Given an array with N numbers and separate those numbers into two arrays by odd numbers or even numbers. The complete operation required O(n) time complexity in the best case. For optimizing the memory uses, the first traverse through an array and calculate the total number of even and odd numbers in it. C... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n13 Apr, 2022"
},
{
"code": null,
"e": 438,
"s": 52,
"text": "Given an array with N numbers and separate those numbers into two arrays by odd numbers or even numbers. The complete operation required O(n) time complexity in the best case... |
How to check the current runtime environment is a browser in JavaScript ? | 18 Apr, 2021
In this article, we will see how to detect the runtime environment in which our JavaScript code is running. Suppose you are building an application in Node.js and need to include that code in a webpage that would be run on a browser. This would cause some functions of a Node application not to work on brow... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n18 Apr, 2021"
},
{
"code": null,
"e": 356,
"s": 28,
"text": "In this article, we will see how to detect the runtime environment in which our JavaScript code is running. Suppose you are building an application in Node.js and need to incl... |
C++ program to Convert a Matrix to Sparse Matrix | 15 Mar, 2021
Given a matrix with most of its elements as 0, convert this matrix to sparse matrix in C++Examples:
Input: Matrix:
0 1 1
1 2 2
2 1 3
3 2 5
4 3 4
Output: Sparse Matrix:
0 1 0 0
0 0 2 0
0 3 0 0
0 0 5 0
0 0 0 4
Explanation:
Here the Sparse matrix is represented
in the form Row Column Value
Hence the ro... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n15 Mar, 2021"
},
{
"code": null,
"e": 153,
"s": 52,
"text": "Given a matrix with most of its elements as 0, convert this matrix to sparse matrix in C++Examples: "
},
{
"code": null,
"e": 429,
"s": 153,
"text": "Inpu... |
How to use Bootstrap Datepicker to get date on change event ? | 30 Nov, 2021
In this article, we will learn how to use Bootstrap Datepicker to get a date on changes of events. Bootstrap Datepicker is an open-source repository that provides an API to integrate date time picker into the frontend of the website. One should have a basic knowledge of HTML, CSS, jQuery, and Bootstrap.
Ap... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n30 Nov, 2021"
},
{
"code": null,
"e": 333,
"s": 28,
"text": "In this article, we will learn how to use Bootstrap Datepicker to get a date on changes of events. Bootstrap Datepicker is an open-source repository that provides an API to in... |
Modify the string by swapping continuous vowels or consonants | 12 May, 2021
Given a string str. The task is to modify the string by swapping two adjacent characters if both of them are vowels or both of them are consonants.Examples:
Input: str = “geeksforgeeks” Output: geesfkogreesk The alphabets ‘e’ and ‘e’ in geeksforgeeks are vowels so they are swapped so the string becomes g... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n12 May, 2021"
},
{
"code": null,
"e": 211,
"s": 52,
"text": "Given a string str. The task is to modify the string by swapping two adjacent characters if both of them are vowels or both of them are consonants.Examples: "
},
{
"... |
How to Detect Long Press in Android? | 23 Feb, 2021
A Long Press refers to pressing a physical button or tap a virtual button on a touchscreen and holding it down for a second or two. Employed on touchscreens, smartphones, tablets, and smartwatches, the long press or long tap increases the user interface’s flexibility. The typical “short press” or “short ta... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n23 Feb, 2021"
},
{
"code": null,
"e": 550,
"s": 28,
"text": "A Long Press refers to pressing a physical button or tap a virtual button on a touchscreen and holding it down for a second or two. Employed on touchscreens, smartphones, tabl... |
Rooted and Binary Tree | A rooted tree G is a connected acyclic graph with a special node that is called the root of the tree and every edge directly or indirectly originates from the root. An ordered rooted tree is a rooted tree where the children of each internal vertex are ordered. If every internal vertex of a rooted tree has not more than... | [
{
"code": null,
"e": 1572,
"s": 1062,
"text": "A rooted tree G is a connected acyclic graph with a special node that is called the root of the tree and every edge directly or indirectly originates from the root. An ordered rooted tree is a rooted tree where the children of each internal vertex are o... |
Powershell - Get System Time | Get-Date cmdlet is used to get System Date-Time.
In this example, we're using Get-Date without any parameter
Type the following command in PowerShell ISE Console
Get-Date
You can see following output in PowerShell console.
Get-Date
Wednesday, April 04, 2018 5:24:51 PM
In this example, we're using -DisplayHint to print... | [
{
"code": null,
"e": 2083,
"s": 2034,
"text": "Get-Date cmdlet is used to get System Date-Time."
},
{
"code": null,
"e": 2143,
"s": 2083,
"text": "In this example, we're using Get-Date without any parameter"
},
{
"code": null,
"e": 2196,
"s": 2143,
"text": "Ty... |
CoffeeScript - Classes and Inheritance | JavaScript does not provide the class keyword. We can achieve inheritance in JavaScript using objects and their prototypes. Every object have their own prototype and they inherit functions and properties from their prototypes. Since the prototype is also an object, it also has its own prototype.
Though the prototypal i... | [
{
"code": null,
"e": 2606,
"s": 2309,
"text": "JavaScript does not provide the class keyword. We can achieve inheritance in JavaScript using objects and their prototypes. Every object have their own prototype and they inherit functions and properties from their prototypes. Since the prototype is als... |
Naïve Bayes from Scratch using Python only— No Fancy Frameworks | by Aisha Javed | Towards Data Science | So in my previous blog post of Unfolding Naïve Bayes from Scratch! Take-1 🎬, I tried to decode the rocket science behind the working of The Naïve Bayes (NB) ML algorithm, and after going through it’s algorithmic insights, you too must have realized that it’s quite a painless algorithm. In this blog post, we will wal... | [
{
"code": null,
"e": 700,
"s": 172,
"text": "So in my previous blog post of Unfolding Naïve Bayes from Scratch! Take-1 🎬, I tried to decode the rocket science behind the working of The Naïve Bayes (NB) ML algorithm, and after going through it’s algorithmic insights, you too must have realized tha... |
Assertive Programming in R. Your code should work as intended or... | by Denis Gontcharov | Towards Data Science | You might be familiar with unit testing using the testthat package. The goal of unit tests is to check if your function is developed correctly. An assertion checks if your function is used correctly.
Unit tests are meant for the developer and are executed on command. Assertions are meant for the user and are executed a... | [
{
"code": null,
"e": 372,
"s": 172,
"text": "You might be familiar with unit testing using the testthat package. The goal of unit tests is to check if your function is developed correctly. An assertion checks if your function is used correctly."
},
{
"code": null,
"e": 515,
"s": 372,... |
How to iterate any Map in Java - GeeksforGeeks | 13 May, 2022
There are generally five ways of iterating over a Map in Java. In this article, we will discuss all of them and also look at their advantages and disadvantages.First of all, we cannot iterate a Map directly using iterators, because Map are not Collection. Also before going further, you must know a little-b... | [
{
"code": null,
"e": 25453,
"s": 25425,
"text": "\n13 May, 2022"
},
{
"code": null,
"e": 25952,
"s": 25453,
"text": "There are generally five ways of iterating over a Map in Java. In this article, we will discuss all of them and also look at their advantages and disadvantages.Fir... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.