title
stringlengths
3
221
text
stringlengths
17
477k
parsed
listlengths
0
3.17k
Linear Regression With Bootstrapping | by James Andrew Godwin | Towards Data Science
This article builds on my Linear Regression and Bootstrap Resampling pieces. For the literary-minded among my readers, the subtitle is a quote from ‘Ulysses’ 1922, by James Joyce! The origin of the term “bootstrap” is in literature, though not from Joyce. The usage denotes: to better oneself by one’s own efforts — furt...
[ { "code": null, "e": 249, "s": 172, "text": "This article builds on my Linear Regression and Bootstrap Resampling pieces." }, { "code": null, "e": 652, "s": 249, "text": "For the literary-minded among my readers, the subtitle is a quote from ‘Ulysses’ 1922, by James Joyce! The or...
C++ program to check for ISBN
Given with the sequence and the task is to identify whether the given sequence is sa ISBN number or not. ISBN stands for International Standard Book Number is a 10 digit number till December 2006 and now it is revised to 13 digit number from 1 January 2007. Given below is the implementation of 10 digits ISBN. ISBN digi...
[ { "code": null, "e": 1167, "s": 1062, "text": "Given with the sequence and the task is to identify whether the given sequence is sa ISBN number or not." }, { "code": null, "e": 1373, "s": 1167, "text": "ISBN stands for International Standard Book Number is a 10 digit number till ...
Where should secret keys should be stored for a Node.js app ?
27 Apr, 2021 Securing the sensitive data/credentials like 3rd Party API credentials, Session Secret Key, DB Connection Credentials, Security Token, Encryption/Decryption Keys is extremely important as publicly exposing the credentials can result in your account being compromised, which could lead to unexpected charges ...
[ { "code": null, "e": 28, "s": 0, "text": "\n27 Apr, 2021" }, { "code": null, "e": 673, "s": 28, "text": "Securing the sensitive data/credentials like 3rd Party API credentials, Session Secret Key, DB Connection Credentials, Security Token, Encryption/Decryption Keys is extremely ...
HashMap in Scala
09 Aug, 2019 HashMap is a part of Scala Collection’s. It is used to store element and return a map. A HashMap is a combination of key and value pairs which are stored using a Hash Table data structure. It provides the basic implementation of Map. Syntax: var hashMapName = HashMap("key1"->"value1", "key2"->"value2", "ke...
[ { "code": null, "e": 28, "s": 0, "text": "\n09 Aug, 2019" }, { "code": null, "e": 262, "s": 28, "text": "HashMap is a part of Scala Collection’s. It is used to store element and return a map. A HashMap is a combination of key and value pairs which are stored using a Hash Table da...
How to run Java package program
Let us look at an example that creates a package called animals. It is a good practice to use names of packages with lower case letters to avoid any conflicts with the names of classes and interfaces. Following package example contains interface named animals − /* File name : Animal.java */ package animals; interface A...
[ { "code": null, "e": 1388, "s": 1187, "text": "Let us look at an example that creates a package called animals. It is a good practice to use names of packages with lower case letters to avoid any conflicts with the names of classes and interfaces." }, { "code": null, "e": 1449, "s": ...
Number of positions with Same address in row major and column major order
24 May, 2021 Given a 2D array of size M x N. Calculate count of positions in 2D array where address as per row-major order equals to address as per column-major order. Examples: Input : 3 5 Output : 3 Row major address is same as column major for following i, j pairs (1, 1), (2, 3) & (3, 5) Input : 4 4 Output : 4 ...
[ { "code": null, "e": 54, "s": 26, "text": "\n24 May, 2021" }, { "code": null, "e": 221, "s": 54, "text": "Given a 2D array of size M x N. Calculate count of positions in 2D array where address as per row-major order equals to address as per column-major order. Examples: " }, ...
Node.js - Event Emitter
Many objects in a Node emit events, for example, a net.Server emits an event each time a peer connects to it, an fs.readStream emits an event when the file is opened. All objects which emit events are the instances of events.EventEmitter. As we have seen in the previous section, EventEmitter class lies in the events mo...
[ { "code": null, "e": 2391, "s": 2152, "text": "Many objects in a Node emit events, for example, a net.Server emits an event each time a peer connects to it, an fs.readStream emits an event when the file is opened. All objects which emit events are the instances of events.EventEmitter." }, { ...
Average of given numbers in Bash
30 Jun, 2021 Program to compute average in bash.Examples: Input : 1 2 3 4 5 Output : average : 3.0 Input : 1 2 3 4 10 Output : average : 5.0 Program to compute average is simple. It is also called as Mean. Formula: (sum of all elements) / (total no. of elements) The extension for bash programs end with .sh. El...
[ { "code": null, "e": 52, "s": 24, "text": "\n30 Jun, 2021" }, { "code": null, "e": 99, "s": 52, "text": "Program to compute average in bash.Examples: " }, { "code": null, "e": 185, "s": 99, "text": "Input : 1 2 3 4 5\nOutput : average : 3.0\n\nInput : 1 2 3...
LINQ | How to find the sum of the given Sequence? - GeeksforGeeks
21 May, 2019 In LINQ, you can find the sum of the given numeric elements by using the Sum() method. This method calculates the sum of the numeric value present in the given sequence. It does not support query syntax in C#, but it supports in VB.NET. It is available in both Enumerable and Queryable classes in C#. It can...
[ { "code": null, "e": 23911, "s": 23883, "text": "\n21 May, 2019" }, { "code": null, "e": 24295, "s": 23911, "text": "In LINQ, you can find the sum of the given numeric elements by using the Sum() method. This method calculates the sum of the numeric value present in the given seq...
Count Balanced Binary Trees of Height h
28 Mar, 2022 Given a height h, count and return the maximum number of balanced binary trees possible with height h. A balanced binary tree is one in which for every node, the difference between heights of left and right subtree is not more than 1.Examples : Input : h = 3 Output : 15 Input : h = 4 Output : 315 Foll...
[ { "code": null, "e": 54, "s": 26, "text": "\n28 Mar, 2022" }, { "code": null, "e": 301, "s": 54, "text": "Given a height h, count and return the maximum number of balanced binary trees possible with height h. A balanced binary tree is one in which for every node, the difference b...
How to increase the X-axis labels font size using ggplot2 in R?
To increase the X-axis labels font size using ggplot2, we can use axis.text.x argument of theme function where we can define the text size for axis element. This might be required when we want viewers to critically examine the X-axis labels and especially in situations when we change the scale for X-axis. Check out the...
[ { "code": null, "e": 1494, "s": 1187, "text": "To increase the X-axis labels font size using ggplot2, we can use axis.text.x argument of theme function where we can define the text size for axis element. This might be required when we want viewers to critically examine the X-axis labels and especial...
CSS | inset Property
19 Jun, 2020 The inset property in CSS is used to define physical offset, not for the inline offset or logical block. This property can apply to any writing-mode property. Syntax: inset: length|percentage|auto|inherit|initial|unset; Property values: length: It sets a fixed value defined in px, cm, pt etc. Negative valu...
[ { "code": null, "e": 28, "s": 0, "text": "\n19 Jun, 2020" }, { "code": null, "e": 187, "s": 28, "text": "The inset property in CSS is used to define physical offset, not for the inline offset or logical block. This property can apply to any writing-mode property." }, { "c...
How to Extract Script and CSS Files from Web Pages in Python ?
08 Sep, 2021 Prerequisite: Requests BeautifulSoup File Handling in Python In this article, we will discuss how to extract Script and CSS Files from Web Pages using Python. For this, we will be downloading the CSS and JavaScript files that were attached to the source code of the website during its coding process. Firstl...
[ { "code": null, "e": 28, "s": 0, "text": "\n08 Sep, 2021" }, { "code": null, "e": 42, "s": 28, "text": "Prerequisite:" }, { "code": null, "e": 51, "s": 42, "text": "Requests" }, { "code": null, "e": 65, "s": 51, "text": "BeautifulSoup" },...
Computer Programming - Environment
Though Environment Setup is not an element of any Programming Language, it is the first step to be followed before setting on to write a program. When we say Environment Setup, it simply implies a base on top of which we can do our programming. Thus, we need to have the required software setup, i.e., installation on ou...
[ { "code": null, "e": 2420, "s": 2274, "text": "Though Environment Setup is not an element of any Programming Language, it is the first step to be followed before setting on to write a program." }, { "code": null, "e": 2770, "s": 2420, "text": "When we say Environment Setup, it si...
Python - Tkinter Radiobutton
This widget implements a multiple-choice button, which is a way to offer many possible selections to the user and lets user choose only one of them. In order to implement this functionality, each group of radiobuttons must be associated to the same variable and each one of the buttons must symbolize a single value. You...
[ { "code": null, "e": 2527, "s": 2378, "text": "This widget implements a multiple-choice button, which is a way to offer many possible selections to the user and lets user choose only one of them." }, { "code": null, "e": 2763, "s": 2527, "text": "In order to implement this functi...
ML – Saving a Deep Learning model in Keras
17 May, 2020 Training a neural network/deep learning model usually takes a lot of time, particularly if the hardware capacity of the system doesn’t match up to the requirement. Once the training is done, we save the model to a file. To reuse the model at a later point of time to make predictions, we load the saved mode...
[ { "code": null, "e": 28, "s": 0, "text": "\n17 May, 2020" }, { "code": null, "e": 390, "s": 28, "text": "Training a neural network/deep learning model usually takes a lot of time, particularly if the hardware capacity of the system doesn’t match up to the requirement. Once the tr...
p5.js | int() function
11 Feb, 2021 The int() function in p5.js is used to convert the given boolean, integer, and float value into its integer representation. Syntax: int(ns) or int(n, radix) Parameters: This function accepts three types of the parameter which are listed below: n: It stores the value which needs to converts into integer....
[ { "code": null, "e": 28, "s": 0, "text": "\n11 Feb, 2021" }, { "code": null, "e": 152, "s": 28, "text": "The int() function in p5.js is used to convert the given boolean, integer, and float value into its integer representation." }, { "code": null, "e": 161, "s": ...
Draw a circle without floating point arithmetic
21 Jun, 2022 Given a radius of a circle, draw the circle without using floating point arithmetic.Following program uses a simple concept. Let the radius of the circle be r. Consider a square of size (2r+1)*(2r+1) around the circle to be drawn. Now walk through every point inside the square. For every point (x,y), if (...
[ { "code": null, "e": 52, "s": 24, "text": "\n21 Jun, 2022" }, { "code": null, "e": 446, "s": 52, "text": "Given a radius of a circle, draw the circle without using floating point arithmetic.Following program uses a simple concept. Let the radius of the circle be r. Consider a squ...
m-Way Search Tree | Set-2 | Insertion and Deletion
20 Jun, 2022 The insertion in an m-Way search tree is similar to binary trees but there should be no more than m-1 elements in a node. If the node is full then a child node will be created to insert the further elements. Let us see the example given below to insert an element in an m-Way search tree.Example: To inser...
[ { "code": null, "e": 54, "s": 26, "text": "\n20 Jun, 2022" }, { "code": null, "e": 353, "s": 54, "text": "The insertion in an m-Way search tree is similar to binary trees but there should be no more than m-1 elements in a node. If the node is full then a child node will be create...
Password Authentication Protocol (PAP)
30 Jun, 2022 There are simply two methods to authenticate PPP links namely Password Authentication Protocol (PAP) and Challenge Handshake Authentication Protocol (CHAP). From these two authentication protocols, PAP is less secured as the password is sent in clear text and is performed only at the initial link establis...
[ { "code": null, "e": 28, "s": 0, "text": "\n30 Jun, 2022" }, { "code": null, "e": 186, "s": 28, "text": "There are simply two methods to authenticate PPP links namely Password Authentication Protocol (PAP) and Challenge Handshake Authentication Protocol (CHAP). " }, { "co...
Ruby | Array combination() operation
10 Feb, 2020 Array#combination() : combination() is an Array class method which invokes with a block yielding all combinations of length ‘n’ of elements of the array. Syntax: Array.combination() Parameter: Arrays in which we want elements to be invoked Return: all combinations of length 'n' of elements of the arra...
[ { "code": null, "e": 28, "s": 0, "text": "\n10 Feb, 2020" }, { "code": null, "e": 182, "s": 28, "text": "Array#combination() : combination() is an Array class method which invokes with a block yielding all combinations of length ‘n’ of elements of the array." }, { "code":...
Pass list as command line argument in Python
30 Jan, 2020 The arguments that are given after the name of the program in the command line shell of the operating system are known as Command Line Arguments. Python provides various ways of dealing with these types of arguments. One of them is sys module. A module is a file containing Python definitions and statements...
[ { "code": null, "e": 28, "s": 0, "text": "\n30 Jan, 2020" }, { "code": null, "e": 272, "s": 28, "text": "The arguments that are given after the name of the program in the command line shell of the operating system are known as Command Line Arguments. Python provides various ways ...
Docker – ARG Instruction
28 Oct, 2020 You can use the ARG command inside a Dockerfile to define the name of a parameter and its default value. This default value can also be overridden using a simple option with the Docker build command. The difference between ENV and ARG is that after you set an environment variable using ARG, you will not be...
[ { "code": null, "e": 28, "s": 0, "text": "\n28 Oct, 2020" }, { "code": null, "e": 407, "s": 28, "text": "You can use the ARG command inside a Dockerfile to define the name of a parameter and its default value. This default value can also be overridden using a simple option with t...
How to Install GNU Octave in Linux?
06 Oct, 2021 Octave is open-source, free available for many of the platforms. It is actually a High-level Language. It comes up with a text interface along with an experimental graphical interface. It is also used for various Machine Learning algorithms for solving various numeric problems. You can say that it is simil...
[ { "code": null, "e": 53, "s": 25, "text": "\n06 Oct, 2021" }, { "code": null, "e": 397, "s": 53, "text": "Octave is open-source, free available for many of the platforms. It is actually a High-level Language. It comes up with a text interface along with an experimental graphical ...
SVG text-anchor Attribute
31 Mar, 2022 The text-anchor attribute is used to align a text which is auto-wrapped or pre-formatted. The wrapping area is decided from the inline-size property with respect to a given point. In case of multiple line text, the alignment is made for each line. It has effect only on the following elements <altGlyph>, <t...
[ { "code": null, "e": 28, "s": 0, "text": "\n31 Mar, 2022" }, { "code": null, "e": 373, "s": 28, "text": "The text-anchor attribute is used to align a text which is auto-wrapped or pre-formatted. The wrapping area is decided from the inline-size property with respect to a given po...
Matplotlib.pyplot.tick_params() in Python
19 Apr, 2020 Matplotlib is a visualization library in Python for 2D plots of arrays. Matplotlib is a multi-platform data visualization library built on NumPy arrays and designed to work with the broader SciPy stack. matplotlib.pyplot.tick_params() is used to change the appearance of ticks, tick labels, and gridlines. S...
[ { "code": null, "e": 28, "s": 0, "text": "\n19 Apr, 2020" }, { "code": null, "e": 231, "s": 28, "text": "Matplotlib is a visualization library in Python for 2D plots of arrays. Matplotlib is a multi-platform data visualization library built on NumPy arrays and designed to work wi...
How to get the first element of List in Scala
19 Nov, 2021 In Scala, list is defined under scala.collection.immutable package. A list is a collection of same type elements which contains immutable data. Let’s see how to get the first element of given List in Scala.List in Scala contains many suitable methods to perform simple operations like head(), tail(), isEmpt...
[ { "code": null, "e": 28, "s": 0, "text": "\n19 Nov, 2021" }, { "code": null, "e": 469, "s": 28, "text": "In Scala, list is defined under scala.collection.immutable package. A list is a collection of same type elements which contains immutable data. Let’s see how to get the first ...
Python PyTorch from_numpy()
22 Apr, 2020 PyTorch is an open-source machine learning library developed by Facebook. It is used for deep neural network and natural language processing purposes. The function torch.from_numpy() provides support for the conversion of a numpy array into a tensor in PyTorch. It expects the input as a numpy array (numpy....
[ { "code": null, "e": 28, "s": 0, "text": "\n22 Apr, 2020" }, { "code": null, "e": 179, "s": 28, "text": "PyTorch is an open-source machine learning library developed by Facebook. It is used for deep neural network and natural language processing purposes." }, { "code": nu...
Python – Convert List to List of dictionaries
05 Jan, 2022 Given list values and keys list, convert these values to key value pairs in form of list of dictionaries. Input : test_list = [“Gfg”, 3, “is”, 8], key_list = [“name”, “id”]Output : [{‘name’: ‘Gfg’, ‘id’: 3}, {‘name’: ‘is’, ‘id’: 8}]Explanation : Values mapped by custom key, “name” -> “Gfg”, “id” -> 3. Inpu...
[ { "code": null, "e": 54, "s": 26, "text": "\n05 Jan, 2022" }, { "code": null, "e": 160, "s": 54, "text": "Given list values and keys list, convert these values to key value pairs in form of list of dictionaries." }, { "code": null, "e": 357, "s": 160, "text": ...
MongoDB query which represents not equal to null or empty?
To set a query for not equal to null or empty, use the $nin operator. The syntax is as follows db.yourCollectionName.find({yourFieldName:{$nin:[null,""]}}); Let us create a collection with documents > db.notEqualToNullOrEmptyDemo.insertOne({"UserName":"Larry","UserAge":24}); { "acknowledged" : true, "insertedId" ...
[ { "code": null, "e": 1157, "s": 1062, "text": "To set a query for not equal to null or empty, use the $nin operator. The syntax is as follows" }, { "code": null, "e": 1219, "s": 1157, "text": "db.yourCollectionName.find({yourFieldName:{$nin:[null,\"\"]}});" }, { "code": n...
Assembly - Quick Guide
Each personal computer has a microprocessor that manages the computer's arithmetical, logical, and control activities. Each family of processors has its own set of instructions for handling various operations such as getting input from keyboard, displaying information on screen and performing various other jobs. These ...
[ { "code": null, "e": 2204, "s": 2085, "text": "Each personal computer has a microprocessor that manages the computer's arithmetical, logical, and control activities." }, { "code": null, "e": 2469, "s": 2204, "text": "Each family of processors has its own set of instructions for h...
What is the best day to invest?. Save early, save regularly. All good so... | by Jean-Frederic Plante | Towards Data Science
Save early, save regularly. Great. You are scheduling regular deposits to some indexed investment maybe an ETF, maybe through a robo-advisor like Betterment, WealthFront, etc. Recurring deposits hedge your bets on market timing. In my case, I set a weekly deposit to a robo-advisor and wondered if there was a weekly pat...
[ { "code": null, "e": 348, "s": 172, "text": "Save early, save regularly. Great. You are scheduling regular deposits to some indexed investment maybe an ETF, maybe through a robo-advisor like Betterment, WealthFront, etc." }, { "code": null, "e": 597, "s": 348, "text": "Recurring ...
Cypress - Checkbox
The commands check and uncheck are used to work with checkbox. In the html code, a checkbox has an input tag and its type attribute has the value as checkbox. The checkbox related Cypress commands is as follows − The command used to click all the checkboxes is as follows − The command used to click all the checkboxes i...
[ { "code": null, "e": 2656, "s": 2497, "text": "The commands check and uncheck are used to work with checkbox. In the html code, a checkbox has an input tag and its type attribute has the value as checkbox." }, { "code": null, "e": 2710, "s": 2656, "text": "The checkbox related Cy...
Python program to sort a list of tuples by second Item
When it is required to sort a list of tuples based on the second item, the lambda function and ‘sorted’ method can be used. A list can be used to store heterogeneous values (i.e data of any data type like integer, floating point, strings, and so on). A list of tuple basically contains tuples enclosed in a list. Anonymo...
[ { "code": null, "e": 1186, "s": 1062, "text": "When it is required to sort a list of tuples based on the second item, the lambda function and ‘sorted’ method can be used." }, { "code": null, "e": 1375, "s": 1186, "text": "A list can be used to store heterogeneous values (i.e data...
C library function - strncat()
The C library function char *strncat(char *dest, const char *src, size_t n) appends the string pointed to by src to the end of the string pointed to by dest up to n characters long. Following is the declaration for strncat() function. char *strncat(char *dest, const char *src, size_t n) dest − This is pointer to the de...
[ { "code": null, "e": 2189, "s": 2007, "text": "The C library function char *strncat(char *dest, const char *src, size_t n) appends the string pointed to by src to the end of the string pointed to by dest up to n characters long." }, { "code": null, "e": 2242, "s": 2189, "text": "...
SAP ABAP - Formatting Data
ABAP offers various types of formatting options to format the output of programs. For example, you can create a list that includes various items in different colors or formatting styles. The WRITE statement is a formatting statement used to display data on a screen. There are different formatting options for the WRITE ...
[ { "code": null, "e": 3085, "s": 2898, "text": "ABAP offers various types of formatting options to format the output of programs. For example, you can create a list that includes various items in different colors or formatting styles." }, { "code": null, "e": 3268, "s": 3085, "tex...
C Program for Anagram Substring Search
In this problem, we are given two string one text of size n and other a pattern of size m. Our task is to create a program for Anagram substring search. Here, we have to find all the occurrence of pattern and all its permutations (anagrams) in the text. Let’s take an example to understand the problem, text = “xyztrwqyz...
[ { "code": null, "e": 1215, "s": 1062, "text": "In this problem, we are given two string one text of size n and other a pattern of size m. Our task is to create a program for Anagram substring search." }, { "code": null, "e": 1316, "s": 1215, "text": "Here, we have to find all the...
Check for perfect square without using Math libraries - JavaScript
We are required to write a JavaScript function that takes in a number and returns a boolean based on the fact whether or not the number is a perfect square. Examples of perfect square numbers − 4, 16, 81, 441, 256, 729, 9801 Let’s write the code for this function − const num = 81; const isPerfectSquare = num => { le...
[ { "code": null, "e": 1219, "s": 1062, "text": "We are required to write a JavaScript function that takes in a number and returns a boolean based on the fact whether or not the number is a perfect square." }, { "code": null, "e": 1256, "s": 1219, "text": "Examples of perfect squar...
How to print all the keys of a dictionary in Python?
Dictionary object possesses keys() method which does this job for us. >>> D1 = {1:'a', 2:'b',3:'c'} >>> D1.keys() dict_keys([1, 2, 3]) >>> list(D1.keys()) [1, 2, 3] iterable list object can be traversed using for loop >>> L1 = list(D1.keys()) >>> for i in L1: print (i) 1 2 3
[ { "code": null, "e": 1132, "s": 1062, "text": "Dictionary object possesses keys() method which does this job for us." }, { "code": null, "e": 1230, "s": 1132, "text": ">>> D1 = {1:'a', 2:'b',3:'c'}\n>>> D1.keys()\ndict_keys([1, 2, 3])\n>>> list(D1.keys())\n [1, 2, 3]" }, { ...
Count subsequence of length three in a given string - GeeksforGeeks
04 May, 2021 Given a string of length n and a subsequence of length 3. Find the total number of occurrences of the subsequence in this string. Examples : Input : string = "GFGFGYSYIOIWIN", subsequence = "GFG" Output : 4 Explanation : There are 4 such subsequences as shown: GFGFGYSYIOIWIN ...
[ { "code": null, "e": 24854, "s": 24826, "text": "\n04 May, 2021" }, { "code": null, "e": 24984, "s": 24854, "text": "Given a string of length n and a subsequence of length 3. Find the total number of occurrences of the subsequence in this string." }, { "code": null, "...
MySQL Tryit Editor v1.0
SELECT IFNULL(NULL, "W3Schools.com"); ​ Edit the SQL Statement, and click "Run SQL" to see the result. This SQL-Statement is not supported in the WebSQL Database. The example still works, because it uses a modified version of SQL. Your browser does not support WebSQL. Your are now using a light-version of the ...
[ { "code": null, "e": 38, "s": 0, "text": "SELECT IFNULL(NULL, \"W3Schools.com\");" }, { "code": null, "e": 40, "s": 38, "text": "​" }, { "code": null, "e": 112, "s": 49, "text": "Edit the SQL Statement, and click \"Run SQL\" to see the result." }, { "c...
What to use @SerializedName annotation using Gson in Java?
The @SerializedName annotation can be used to serialize a field with a different name instead of an actual field name. We can provide the expected serialized name as an annotation attribute, Gson can make sure to read or write a field with the provided name. @Retention(value=RUNTIME) @Target(value={FIELD,METHOD}) publi...
[ { "code": null, "e": 1321, "s": 1062, "text": "The @SerializedName annotation can be used to serialize a field with a different name instead of an actual field name. We can provide the expected serialized name as an annotation attribute, Gson can make sure to read or write a field with the provided ...
C Program for simple interest - GeeksforGeeks
07 Feb, 2018 Simple interest formula is given by:Simple Interest = (P x T x R)/100Where,P is the principle amountT is the time andR is the rate Examples: EXAMPLE1: Input : P = 10000 R = 5 T = 5 Output :2500 We need to find simple interest on Rs. 10,000 at the rate of 5% for 5 units of time. EXAMPLE2:...
[ { "code": null, "e": 24930, "s": 24902, "text": "\n07 Feb, 2018" }, { "code": null, "e": 25061, "s": 24930, "text": "Simple interest formula is given by:Simple Interest = (P x T x R)/100Where,P is the principle amountT is the time andR is the rate" }, { "code": null, ...
Implement your own Python Pre-commit Hooks | by Edward Krueger | Towards Data Science
By: Edward Krueger and Douglas Franklin. Here is the template for this project. We use poetry for package management. This article is focused on writing custom pre-commit hooks. github.com For more introductory information on Python pre-commit Hooks, check out this article. towardsdatascience.com Pre-commit-hooks are a...
[ { "code": null, "e": 213, "s": 172, "text": "By: Edward Krueger and Douglas Franklin." }, { "code": null, "e": 350, "s": 213, "text": "Here is the template for this project. We use poetry for package management. This article is focused on writing custom pre-commit hooks." }, ...
What are circular references in C#?
Circular reference occurs when two or more interdependent resources cause lock condition. This makes the resource unusable. To handle the problem of circular references in C#, you should use garbage collection. It detects and collects circular references. The garbage collector begins with local and static and it marks ...
[ { "code": null, "e": 1186, "s": 1062, "text": "Circular reference occurs when two or more interdependent resources cause lock condition. This makes the resource unusable." }, { "code": null, "e": 1438, "s": 1186, "text": "To handle the problem of circular references in C#, you sh...
How to Implement Visitor Counter in Node.js ? - GeeksforGeeks
10 Oct, 2021 We are going to implement Visitor Counter using express and mongoose in nodeJS. The benefit of using mongoose for storing the count in the MongoDB database would be that the count would not be lost when we restart the server. Each time when the browser would get that page the count of visitors would increm...
[ { "code": null, "e": 25002, "s": 24974, "text": "\n10 Oct, 2021" }, { "code": null, "e": 25359, "s": 25002, "text": "We are going to implement Visitor Counter using express and mongoose in nodeJS. The benefit of using mongoose for storing the count in the MongoDB database would b...
Operator Overloading in C++ - GeeksforGeeks
21 Jan, 2022 In C++, we can make operators to work for user defined classes. This means C++ has the ability to provide the operators with a special meaning for a data type, this ability is known as operator overloading. For example, we can overload an operator ‘+’ in a class like String so that we can concatenate two s...
[ { "code": null, "e": 26962, "s": 26934, "text": "\n21 Jan, 2022" }, { "code": null, "e": 27417, "s": 26962, "text": "In C++, we can make operators to work for user defined classes. This means C++ has the ability to provide the operators with a special meaning for a data type, thi...
Why is my model performing poorly? | by Martin Šiklar | Towards Data Science
Are you sometimes struggling with your model performance? Is your model performing well during training but when you apply it to new data, it fails? Or do you even struggle finding a good model in the first place because it just doesn’t seem to learn enough from the data you provided? If any of the statements above app...
[ { "code": null, "e": 458, "s": 172, "text": "Are you sometimes struggling with your model performance? Is your model performing well during training but when you apply it to new data, it fails? Or do you even struggle finding a good model in the first place because it just doesn’t seem to learn enou...
Python os.listdir() Method
Python method listdir() returns a list containing the names of the entries in the directory given by path. The list is in arbitrary order. It does not include the special entries '.' and '..' even if they are present in the directory. Following is the syntax for listdir() method − os.listdir(path) path − This is the d...
[ { "code": null, "e": 2479, "s": 2244, "text": "Python method listdir() returns a list containing the names of the entries in the directory given by path. The list is in arbitrary order. It does not include the special entries '.' and '..' even if they are present in the directory." }, { "cod...
HTML <meta> charset Attribute
The charset attribute of the <meta> element is used to specify the character encoding for the HTML document. You can use the charset attribute on <meta> as well as <script> element. Different charsets include ASCII, ANSI, ISO-8859-1, UTF-8, etc. ISO-8859-1 supports 256 different character codes. ASCII defined 128 diffe...
[ { "code": null, "e": 1244, "s": 1062, "text": "The charset attribute of the <meta> element is used to specify the character encoding for the HTML document. You can use the charset attribute on <meta> as well as <script> element." }, { "code": null, "e": 1501, "s": 1244, "text": "...
ArrayList Operation | Practice | GeeksforGeeks
Given an ArrayList of N lowercase characters. The task is to count the frequency of elements in the list. Note: use add() to append element in the list and contains() to check an element is present or not in the list and Collections.frequency() to find the frequency of the element in the list. Input Format: The first l...
[ { "code": null, "e": 332, "s": 226, "text": "Given an ArrayList of N lowercase characters. The task is to count the frequency of elements in the list." }, { "code": null, "e": 521, "s": 332, "text": "Note: use add() to append element in the list and contains() to check an element...
How to update many documents with one query in MongoDB?
To update many documents with a single query, use bulkWrite() in MongoDB. Let us create a collection with documents − > db.demo760.insertOne({id:1,details:{Value1:100,Value2:50}}); { "acknowledged" : true, "insertedId" : ObjectId("5eb0309f5637cd592b2a4aee") } > db.demo760.insertOne({id:2,details:{Value1:60,Value2...
[ { "code": null, "e": 1180, "s": 1062, "text": "To update many documents with a single query, use bulkWrite() in MongoDB. Let us create a collection with documents −" }, { "code": null, "e": 1622, "s": 1180, "text": "> db.demo760.insertOne({id:1,details:{Value1:100,Value2:50}});\n...
CodeIgniter - Session Management
When building websites, we often need to track user’s activity and state and for this purpose, we have to use session. CodeIgniter has session class for this purpose. Sessions data are available globally through the site but to use those data we first need to initialize the session. We can do that by executing the foll...
[ { "code": null, "e": 2486, "s": 2319, "text": "When building websites, we often need to track user’s activity and state and for this purpose, we have to use session. CodeIgniter has session class for this purpose." }, { "code": null, "e": 2666, "s": 2486, "text": "Sessions data a...
How to select domain name from email address in MySQL?
To select domain name from email address, you can use in-built SUBSTRING_INDEX() function from MySQL. To understand the concept, let us create a table. The following is the query to create a table. mysql> create table selectDomainNameOnly −> ( −> UserEmailAddress varchar(200) −> ); Query OK, 0 rows affected (0...
[ { "code": null, "e": 1164, "s": 1062, "text": "To select domain name from email address, you can use in-built SUBSTRING_INDEX() function from MySQL." }, { "code": null, "e": 1260, "s": 1164, "text": "To understand the concept, let us create a table. The following is the query to ...
How to connect MySQL DB with Python - onlinetutorialspoint
PROGRAMMINGJava ExamplesC Examples Java Examples C Examples C Tutorials aws JAVAEXCEPTIONSCOLLECTIONSSWINGJDBC EXCEPTIONS COLLECTIONS SWING JDBC JAVA 8 SPRING SPRING BOOT HIBERNATE PYTHON PHP JQUERY PROGRAMMINGJava ExamplesC Examples Java Examples C Examples C Tutorials aws In this tutorial, we’ll see a step by step gu...
[ { "code": null, "e": 158, "s": 123, "text": "PROGRAMMINGJava ExamplesC Examples" }, { "code": null, "e": 172, "s": 158, "text": "Java Examples" }, { "code": null, "e": 183, "s": 172, "text": "C Examples" }, { "code": null, "e": 195, "s": 183, ...
Minimal Pandas Subset for Data Scientists on GPU | by Rahul Agarwal | Towards Data Science
Data manipulation is a breeze with pandas, and it has become such a standard for it that a lot of parallelization libraries like Rapids and Dask are being created in line with Pandas syntax. Sometimes back, I wrote about the subset of Pandas functionality I end up using often. In this post, I will talk about handling m...
[ { "code": null, "e": 363, "s": 172, "text": "Data manipulation is a breeze with pandas, and it has become such a standard for it that a lot of parallelization libraries like Rapids and Dask are being created in line with Pandas syntax." }, { "code": null, "e": 560, "s": 363, "tex...
Select a Random Node from a Singly Linked List - GeeksforGeeks
28 Feb, 2022 Given a singly linked list, select a random node from linked list (the probability of picking a node should be 1/N if there are N nodes in list). You are given a random number generator.Below is a Simple Solution 1) Count number of nodes by traversing the list. 2) Traverse the list again and select every n...
[ { "code": null, "e": 24579, "s": 24551, "text": "\n28 Feb, 2022" }, { "code": null, "e": 25157, "s": 24579, "text": "Given a singly linked list, select a random node from linked list (the probability of picking a node should be 1/N if there are N nodes in list). You are given a r...
log4j - Logging Levels
The org.apache.log4j.Level levels. You can also define your custom levels by sub-classing the Level class. A log request of level p in a logger with level q is enabled if p >= q. This rule is at the heart of log4j. It assumes that levels are ordered. For the standard levels, we have ALL < DEBUG < INFO < WARN < ERROR < ...
[ { "code": null, "e": 1933, "s": 1826, "text": "The org.apache.log4j.Level levels. You can also define your custom levels by sub-classing the Level class." }, { "code": null, "e": 2160, "s": 1933, "text": "A log request of level p in a logger with level q is enabled if p >= q. Thi...
How to build Animated Charts like Hans Rosling — doing it all in R | by Tristan Ganry | Towards Data Science
Hans Rosling was a statistics guru. He spent his entire life promoting the use of data with animated charts to explore development issues and to share a fact-based view of the world. His most popular TED Talk: “The best stats you’ve ever seen” counts more than 12 million views. It’s also one of the Top 100 most viewed ...
[ { "code": null, "e": 515, "s": 172, "text": "Hans Rosling was a statistics guru. He spent his entire life promoting the use of data with animated charts to explore development issues and to share a fact-based view of the world. His most popular TED Talk: “The best stats you’ve ever seen” counts more...
SWING - JTextField Class
The class JTextField is a component which allows the editing of a single line of text. Following is the declaration for javax.swing.JTextField class − public class JTextField extends JTextComponent implements SwingConstants Following are the fields for javax.swing.JList class − static String notifyAction − Na...
[ { "code": null, "e": 1850, "s": 1763, "text": "The class JTextField is a component which allows the editing of a single line of text." }, { "code": null, "e": 1914, "s": 1850, "text": "Following is the declaration for javax.swing.JTextField class −" }, { "code": null, ...
How to Fix 'android.os.NetworkOnMainThreadException'? - GeeksforGeeks
23 Jun, 2021 While working on some serious project in Android Studio you might’ve happened to come across this nasty error in the above line and all the worlds tried to tear apart. Well, this article has the perfect solution on how to get rid of that ‘android.os.NetworkOnMainThreadException’ error! Read to fix it! Beli...
[ { "code": null, "e": 24725, "s": 24697, "text": "\n23 Jun, 2021" }, { "code": null, "e": 25028, "s": 24725, "text": "While working on some serious project in Android Studio you might’ve happened to come across this nasty error in the above line and all the worlds tried to tear ap...
Building a Convolutional Neural Network to Recognize Shaved vs UnShaved Faces | by Jacob Tadesse | Towards Data Science
In this tutorial, we will use an image dataset created by scrapping free stock photo sites. The image set contains about 2,000 images of individual people labeled as “shaved” or “unshaved”. We will combine computer vision and machine learning to classify images using a Convolutional Neural Network (CNN). By the end of ...
[ { "code": null, "e": 478, "s": 172, "text": "In this tutorial, we will use an image dataset created by scrapping free stock photo sites. The image set contains about 2,000 images of individual people labeled as “shaved” or “unshaved”. We will combine computer vision and machine learning to classify ...
Dynamic Convex hull | Adding Points to an Existing Convex Hull - GeeksforGeeks
15 Mar, 2022 Given a convex hull, we need to add a given number of points to the convex hull and print the convex hull after every point addition. The points should be in anti-clockwise order after addition of every point. Examples: Input : Convex Hull : (0, 0), (3, -1), (4, 5), (-1, 4) Point to add : (100, 100) Ou...
[ { "code": null, "e": 24908, "s": 24880, "text": "\n15 Mar, 2022" }, { "code": null, "e": 25130, "s": 24908, "text": "Given a convex hull, we need to add a given number of points to the convex hull and print the convex hull after every point addition. The points should be in anti-...
Hide Matplotlib descriptions in Jupyter notebook
To hide matplotlib descriptions of an instance while calling plot() method, we can take the following steps − Open Ipython instance. Open Ipython instance. import numpy as np import numpy as np from matplotlib, import pyplot as plt from matplotlib, import pyplot as plt Create points for x, i.e., np.linspace(1, 10, 1000...
[ { "code": null, "e": 1172, "s": 1062, "text": "To hide matplotlib descriptions of an instance while calling plot() method, we can take the following steps −" }, { "code": null, "e": 1195, "s": 1172, "text": "Open Ipython instance." }, { "code": null, "e": 1218, "s...
C++ Library - <deque>
Deque is acronym for Double Ended Queue. It is a sequence container that can change it's size runtime. Container is an object that holds data of same type. Sequence containers store elements strictly in linear sequence. Elements of deque can be scattered in different chunks of memory. Container stores necessary informa...
[ { "code": null, "e": 2823, "s": 2603, "text": "Deque is acronym for Double Ended Queue. It is a sequence container that can change it's size runtime. Container is an object that holds data of same type. Sequence containers store elements strictly in linear sequence." }, { "code": null, "...
How to make Wind Rose and Polar Bar Charts in Plotly – Python?
01 Oct, 2020 A Plotly is a Python library that is used to design graphs, especially interactive graphs. It can plot various graphs and charts like histogram, barplot, boxplot, spreadplot, and many more. It is mainly used in data analysis as well as financial analysis. plotly is an interactive visualization library. The...
[ { "code": null, "e": 28, "s": 0, "text": "\n01 Oct, 2020" }, { "code": null, "e": 332, "s": 28, "text": "A Plotly is a Python library that is used to design graphs, especially interactive graphs. It can plot various graphs and charts like histogram, barplot, boxplot, spreadplot, ...
Orthogonal and Orthonormal Vectors in Linear Algebra
01 Apr, 2022 Orthogonal Vectors: Two vectors are orthogonal to each other when their dot product is 0. How do we define the dot product? Dot product(scalar product) of two n-dimensional vectors A and B, is given by this expression.Thus the vectors A and B are orthogonal to each other if and only ifNote: In a compact fo...
[ { "code": null, "e": 54, "s": 26, "text": "\n01 Apr, 2022" }, { "code": null, "e": 605, "s": 54, "text": "Orthogonal Vectors: Two vectors are orthogonal to each other when their dot product is 0. How do we define the dot product? Dot product(scalar product) of two n-dimensional v...
Select numbers in such way to maximize the amount of money
16 Jun, 2022 Given two arrays A1 and A2 of N numbers. There are two people A and B who select numbers out of N. If A selects i-th number, then he will be paid A1[i] amount of money and if B selects i-th number then he will be paid A2[i] amount of money but A cannot select more than X numbers and B cannot select more th...
[ { "code": null, "e": 54, "s": 26, "text": "\n16 Jun, 2022" }, { "code": null, "e": 496, "s": 54, "text": "Given two arrays A1 and A2 of N numbers. There are two people A and B who select numbers out of N. If A selects i-th number, then he will be paid A1[i] amount of money and if...
Python | Count of Matching i, j index elements
17 Dec, 2019 Sometimes, while programming, we can have a problem in which we need to check for ith and jth character of each string. We may require to extract count of all strings with similar ith and jth characters. Let’s discuss certain ways in which this task can be performed. Method #1 : Using loopThis is brute for...
[ { "code": null, "e": 28, "s": 0, "text": "\n17 Dec, 2019" }, { "code": null, "e": 296, "s": 28, "text": "Sometimes, while programming, we can have a problem in which we need to check for ith and jth character of each string. We may require to extract count of all strings with sim...
What is Sublist3r and How to Use it?
15 Jul, 2020 Sublister is a tool designed in python and uses OSINT in order to enumerate subdomains of websites. It helps pen-testers in collecting and gathering subdomains for a domain which is their target. In order to fetch the accurate results, sublilster uses many search engines like Google, Yahoo, etc. and even t...
[ { "code": null, "e": 54, "s": 26, "text": "\n15 Jul, 2020" }, { "code": null, "e": 398, "s": 54, "text": "Sublister is a tool designed in python and uses OSINT in order to enumerate subdomains of websites. It helps pen-testers in collecting and gathering subdomains for a domain w...
How to Select Multiple Files using HTML Input Tag ?
16 Aug, 2021 Using the input tag to upload multiple files has become possible after the release of HTML 5. Since many of us, work on HTML and still use tags such as <input> tag for taking input from the user and <form> tag for using forms on our website, it is necessary to know how to implement multiple files feature u...
[ { "code": null, "e": 28, "s": 0, "text": "\n16 Aug, 2021" }, { "code": null, "e": 422, "s": 28, "text": "Using the input tag to upload multiple files has become possible after the release of HTML 5. Since many of us, work on HTML and still use tags such as <input> tag for taking ...
Storage Classes and Type Qualifiers in C- GeeksQuiz
09 Sep, 2021 Which of the following is not a storage class specifier in C? auto register static extern volatile volatile is not a storage class specifier. volatile and const are type qualifiers. fun() called first time: num = 16 // for loop initialization done; In test condition, compiler checks for non zero va...
[ { "code": null, "e": 29577, "s": 29549, "text": "\n09 Sep, 2021" }, { "code": null, "e": 29640, "s": 29577, "text": "Which of the following is not a storage class specifier in C? " }, { "code": null, "e": 29646, "s": 29640, "text": "auto " }, { "code":...
Trick for modular division ( (x1 * x2 .... xn) / b ) mod (m)
26 May, 2022 Given integers x1, x2, x3......xn, b, and m, we are supposed to find the result of ((x1*x2....xn)/b)mod(m). Example 1: Suppose that we are required to find (55C5)%(1000000007) i.e ((55*54*53*52*51)/120)%1000000007 Naive Method : Simply calculate the product (55*54*53*52*51)= say x,Divide x by 120 and then...
[ { "code": null, "e": 52, "s": 24, "text": "\n26 May, 2022" }, { "code": null, "e": 282, "s": 52, "text": "Given integers x1, x2, x3......xn, b, and m, we are supposed to find the result of ((x1*x2....xn)/b)mod(m). Example 1: Suppose that we are required to find (55C5)%(1000000007...
How to Zoom in/Zoom out using React-PDF in ReactJS ?
01 Jun, 2021 We can easily do zoom in / zoom out using React-PDF in ReactJS by passing a prop named scale inside <page /> component. Scale prop takes value only in a decimal form that means even if you want to pass an integer value you should put decimal after it. A value greater than 1 will zoom in on the page and a v...
[ { "code": null, "e": 54, "s": 26, "text": "\n01 Jun, 2021" }, { "code": null, "e": 402, "s": 54, "text": "We can easily do zoom in / zoom out using React-PDF in ReactJS by passing a prop named scale inside <page /> component. Scale prop takes value only in a decimal form that mea...
Node.js crypto.createHmac() Method
27 May, 2022 The crypto.createHmac() method is used to create an Hmac object that uses the stated ‘algorithm’ and ‘key’. Syntax: crypto.createHmac( algorithm, key, options ) Parameters: This method accept three parameters as mentioned above and described below: algorithm: It is dependent on the accessible algorithms wh...
[ { "code": null, "e": 28, "s": 0, "text": "\n27 May, 2022" }, { "code": null, "e": 144, "s": 28, "text": "The crypto.createHmac() method is used to create an Hmac object that uses the stated ‘algorithm’ and ‘key’. Syntax:" }, { "code": null, "e": 189, "s": 144, ...
How to pass data into a bootstrap modal?
29 Jul, 2021 Bootstrap is a CSS framework used for designing web pages. Bootstrap v4.5 is the latest release. Bootstrap along with HTML and JavaScript can be used to build responsive web pages. A modal is a popup or dialog box that requires some action to be performed. A modal. Bootstrap has inbuilt modal component. T...
[ { "code": null, "e": 52, "s": 24, "text": "\n29 Jul, 2021" }, { "code": null, "e": 234, "s": 52, "text": "Bootstrap is a CSS framework used for designing web pages. Bootstrap v4.5 is the latest release. Bootstrap along with HTML and JavaScript can be used to build responsive web ...
Serializing Data Using the pickle and cPickle Modules
25 Feb, 2021 Serialization is a process of storing an object as a stream of bytes or characters in order to transmit it over a network or store it on the disk to recreate it along with its state whenever required. The reverse process is called deserialization. In Python, the Pickle module provides us the means to seri...
[ { "code": null, "e": 52, "s": 24, "text": "\n25 Feb, 2021" }, { "code": null, "e": 301, "s": 52, "text": "Serialization is a process of storing an object as a stream of bytes or characters in order to transmit it over a network or store it on the disk to recreate it along with it...
Time tuple in Python
30 Jan, 2020 Prerequisites: Python datetime module with examples In Python, the datetime module is used to operate with date and time objects. This module has different functions and classes for working with date and time parsing, formatting and arithmetic operations. The datetime module has various constants such as M...
[ { "code": null, "e": 28, "s": 0, "text": "\n30 Jan, 2020" }, { "code": null, "e": 80, "s": 28, "text": "Prerequisites: Python datetime module with examples" }, { "code": null, "e": 574, "s": 80, "text": "In Python, the datetime module is used to operate with d...
How to add a colored border to a button with CSS?
To add colored border, use the CSS border property. You can try to run the following code to add a colored border. <!DOCTYPE html> <html> <head> <style> .button { background-color: yellow; color: black; text-align: center; font-size: 15px; pa...
[ { "code": null, "e": 1114, "s": 1062, "text": "To add colored border, use the CSS border property." }, { "code": null, "e": 1177, "s": 1114, "text": "You can try to run the following code to add a colored border." }, { "code": null, "e": 1637, "s": 1177, "text...
Arduino - Communication
Hundreds of communication protocols have been defined to achieve this data exchange. Each protocol can be categorized into one of the two categories: parallel or serial. Parallel connection between the Arduino and peripherals via input/output ports is the ideal solution for shorter distances up to several meters. Howev...
[ { "code": null, "e": 3040, "s": 2870, "text": "Hundreds of communication protocols have been defined to achieve this data exchange. Each protocol can be categorized into one of the two categories: parallel or serial." }, { "code": null, "e": 3554, "s": 3040, "text": "Parallel con...
Reports Parameters
The main input for filling a report are − report template, parameters, and data sources. This chapter will describe the parameters and in the next chapter we will discuss the data sources. Parameters are the object references, those are passed during report-filling operations to the report engine. The data which cannot...
[ { "code": null, "e": 2443, "s": 2254, "text": "The main input for filling a report are − report template, parameters, and data sources. This chapter will describe the parameters and in the next chapter we will discuss the data sources." }, { "code": null, "e": 2813, "s": 2443, "t...
Polymorphism in Java
Polymorphism is the ability of an object to take on many forms. The most common use of polymorphism in OOP occurs when a parent class reference is used to refer to a child class object. Any Java object that can pass more than one IS-A test is considered to be polymorphic. In Java, all Java objects are polymorphic since...
[ { "code": null, "e": 1248, "s": 1062, "text": "Polymorphism is the ability of an object to take on many forms. The most common use of polymorphism in OOP occurs when a parent class reference is used to refer to a child class object." }, { "code": null, "e": 1463, "s": 1248, "text...
Java Examples - Collection Size
How to get size of a collection ? Following example shows how to get the size of a collection by the use of collection.add() to add new data and collection.size() to get the size of the collection of Collections class. import java.util.*; public class CollectionTest { public static void main(String [] args) { ...
[ { "code": null, "e": 2102, "s": 2068, "text": "How to get size of a collection ?" }, { "code": null, "e": 2287, "s": 2102, "text": "Following example shows how to get the size of a collection by the use of collection.add() to add new data and collection.size() to get the size of ...
What is $(document).ready() equivalent in JavaScript?
In jQuery, if you want an event to work on your page, you should call it inside the $(document).ready() function. Everything inside it will load as soon as the DOM is loaded and before the page contents are loaded. $(document).ready(function() { alert(“Document loaded successful!"); }); In JavaScript, to achieve the...
[ { "code": null, "e": 1277, "s": 1062, "text": "In jQuery, if you want an event to work on your page, you should call it inside the $(document).ready() function. Everything inside it will load as soon as the DOM is loaded and before the page contents are loaded." }, { "code": null, "e": 1...
Java Regular Expressions
A regular expression is a sequence of characters that forms a search pattern. When you search for data in a text, you can use this search pattern to describe what you are searching for. A regular expression can be a single character, or a more complicated pattern. Regular expressions can be used to perform all types of...
[ { "code": null, "e": 186, "s": 0, "text": "A regular expression is a sequence of characters that forms a search pattern.\nWhen you search for data in a text, you can use this search pattern to describe what you\nare searching for." }, { "code": null, "e": 265, "s": 186, "text": "...
crypto.generateKeyPair() Method in Node.js
The crypto.generateKeyPair() can be used to generate a new asymmetric key pair of the specified type. Supported types for generating key pair are: RSA, DSA, EC, Ed25519, Ed448, X25519, X448 and DH. The function behaves as if keyObject.export has been called on its result when a publicKeyEncoding or privateKeyEncoding i...
[ { "code": null, "e": 1446, "s": 1062, "text": "The crypto.generateKeyPair() can be used to generate a new asymmetric key pair of the specified type. Supported types for generating key pair are: RSA, DSA, EC, Ed25519, Ed448, X25519, X448 and DH. The function behaves as if keyObject.export has been ca...
C# program to check if two matrices are identical
To check whether the matrices are identical or not, you need to first check whether the matrixes can be compared or not, since for comparison at least the dimensions of the two matrices should be the same. if (row1 != row2 &amp;&amp; col1 != col2) { Console.Write("Matrices can't be compared:\n"); } Now, under else c...
[ { "code": null, "e": 1268, "s": 1062, "text": "To check whether the matrices are identical or not, you need to first check whether the matrixes can be compared or not, since for comparison at least the dimensions of the two matrices should be the same." }, { "code": null, "e": 1365, ...
What is the conditional operator ?: in Java?
The conditional operator is also known as the ternary operator. This operator consists of three operands and is used to evaluate Boolean expressions. The goal of the operator is to decide; which value should be assigned to the variable. The operator is written as: variable x = (expression)? value if true: value if fals...
[ { "code": null, "e": 1327, "s": 1062, "text": "The conditional operator is also known as the ternary operator. This operator consists of three operands and is used to evaluate Boolean expressions. The goal of the operator is to decide; which value should be assigned to the variable. The operator is ...
Vertical sum | Practice | GeeksforGeeks
Given a Binary Tree, find vertical sum of the nodes that are in same vertical line. Print all sums through different vertical lines starting from left-most vertical line to right-most vertical line. Example 1: Input: 1 / \ 2 3 / \ / \ 4 5 6 7 Output: Explanation: The tree has 5 vertical li...
[ { "code": null, "e": 437, "s": 238, "text": "Given a Binary Tree, find vertical sum of the nodes that are in same vertical line. Print all sums through different vertical lines starting from left-most vertical line to right-most vertical line." }, { "code": null, "e": 448, "s": 437, ...
Spring JDBC - Read Query
Following example will demonstrate how to read a query using Spring JDBC. We'll read available records in Student Table. String selectQuery = "select * from Student"; List <Student> students = jdbcTemplateObject.query(selectQuery, new StudentMapper()); Where, selectQuery − Select query to read students. selectQuery − ...
[ { "code": null, "e": 2517, "s": 2396, "text": "Following example will demonstrate how to read a query using Spring JDBC. We'll read available records in Student Table." }, { "code": null, "e": 2650, "s": 2517, "text": "String selectQuery = \"select * from Student\";\nList <Studen...
HTML5 Canvas and select / drag-and-drop features in a JS library?
If you want to use HTML5 canvas to draw shapes, texts and curves and also want to attach traditional DOM events like onClick or drag and drop functions, a crossbar framework Raphael is used for doing drag and drop or touch events. This technology uses SVG and XML for older versions of IE. Drag and drag using HTML is s...
[ { "code": null, "e": 1293, "s": 1062, "text": "If you want to use HTML5 canvas to draw shapes, texts and curves and also want to attach traditional DOM events like onClick or drag and drop functions, a crossbar framework Raphael is used for doing drag and drop or touch events." }, { "code": ...
array::size() in C++ STL - GeeksforGeeks
15 Jan, 2018 Array classes are generally more efficient, light-weight and reliable than C-style arrays. The introduction of array class from C++11 has offered a better alternative for C-style arrays. size() function is used to return the size of the list container or the number of elements in the list container. Syntax...
[ { "code": null, "e": 24666, "s": 24638, "text": "\n15 Jan, 2018" }, { "code": null, "e": 24853, "s": 24666, "text": "Array classes are generally more efficient, light-weight and reliable than C-style arrays. The introduction of array class from C++11 has offered a better alternat...
Passing a function as a parameter in JavaScript - GeeksforGeeks
02 May, 2019 Passing a function as an argument to the function is quite similar to the passing variable as an argument to the function. Below examples describes to passing a function as a parameter to another function. Example 1: This example passes a function geeks_inner to the function geeks_outer as an argument. <!D...
[ { "code": null, "e": 37579, "s": 37551, "text": "\n02 May, 2019" }, { "code": null, "e": 37785, "s": 37579, "text": "Passing a function as an argument to the function is quite similar to the passing variable as an argument to the function. Below examples describes to passing a fu...
Brand Marketing on Facebook using Statistical Analysis | by Rohit Lokwani | Towards Data Science
Tips and tricks to promote brands and gain insights from data Suppose, some day you think of starting a company. In this age and time, one of the most important things is the reach of your company. If the company is formed on certain products which are used by people in day-to-day life, then it is likely that you alrea...
[ { "code": null, "e": 234, "s": 172, "text": "Tips and tricks to promote brands and gain insights from data" }, { "code": null, "e": 968, "s": 234, "text": "Suppose, some day you think of starting a company. In this age and time, one of the most important things is the reach of yo...
How to change color of PNG image using CSS?
12 Feb, 2019 Given an image and the task is to change the image color using CSS. Use filter function to change the png image color. Filter property is mainly used to set the visual effect to the image. There are many property value exist to the filter function. filter: none|blur()|brightness()|contrast()|drop-shadow()|...
[ { "code": null, "e": 53, "s": 25, "text": "\n12 Feb, 2019" }, { "code": null, "e": 302, "s": 53, "text": "Given an image and the task is to change the image color using CSS. Use filter function to change the png image color. Filter property is mainly used to set the visual effect...
Xv6 Operating System -adding a new system call
21 Aug, 2020 Prerequisite – Xv6 Operating System -add a user program In last post we got to know how to add user program in Xv6 Operating System. Now here you will see how to add new system call in Xv6 Operating System. Adding new system call to xv6 :A system call is way for programs to interact with operating system. ...
[ { "code": null, "e": 52, "s": 24, "text": "\n21 Aug, 2020" }, { "code": null, "e": 108, "s": 52, "text": "Prerequisite – Xv6 Operating System -add a user program" }, { "code": null, "e": 259, "s": 108, "text": "In last post we got to know how to add user progr...
Check length of a string is equal to the number appended at its last
06 Jul, 2022 Given a string that (may) be appended with a number at last. You need to find whether the length of string excluding that number is equal to that number. For example for “helloworld10”, answer is True as helloworld consist of 10 letters. Length of String is less than 10, 000. Examples : Input: str = "gee...
[ { "code": null, "e": 53, "s": 25, "text": "\n06 Jul, 2022" }, { "code": null, "e": 330, "s": 53, "text": "Given a string that (may) be appended with a number at last. You need to find whether the length of string excluding that number is equal to that number. For example for “hel...
How to change the color of an image to black and white using CSS ?
30 Sep, 2021 The approach of this article is to change the color of an image to black and white using a filter property in CSS. It is used to set the visual effect of an element. This property is mostly used in image content. Basically we use a grayscale() method to convert the element colors into black and white. Th...
[ { "code": null, "e": 28, "s": 0, "text": "\n30 Sep, 2021" }, { "code": null, "e": 243, "s": 28, "text": "The approach of this article is to change the color of an image to black and white using a filter property in CSS. It is used to set the visual effect of an element. This prop...
Program to find the Type of Triangle from the given Coordinates
20 Jun, 2022 We are given coordinates of a triangle. The task is to classify this triangle on the basis of sides and angle.Examples: Input: p1 = (3, 0), p2 = (0, 4), p3 = (4, 7) Output: Right Angle triangle and Isosceles Input: p1 = (0, 0), p2 = (1, 1), p3 = (1, 2); Output: Triangle is obtuse and Scalene Approach: ...
[ { "code": null, "e": 52, "s": 24, "text": "\n20 Jun, 2022" }, { "code": null, "e": 174, "s": 52, "text": "We are given coordinates of a triangle. The task is to classify this triangle on the basis of sides and angle.Examples: " }, { "code": null, "e": 348, "s": 1...
Difference between ALTER and UPDATE Command in SQL
14 Aug, 2020 1. ALTER Command : ALTER SQL command is a DDL (Data Definition Language) statement. ALTER is used to update the structure of the table in the database (like add, delete, modify the attributes of the tables in the database). Syntax : // add a column to the existing table ALTER TABLE tableName ADD columnNa...
[ { "code": null, "e": 28, "s": 0, "text": "\n14 Aug, 2020" }, { "code": null, "e": 47, "s": 28, "text": "1. ALTER Command :" }, { "code": null, "e": 252, "s": 47, "text": "ALTER SQL command is a DDL (Data Definition Language) statement. ALTER is used to update ...