title stringlengths 3 221 | text stringlengths 17 477k | parsed listlengths 0 3.17k |
|---|---|---|
Keras - Modules | As we learned earlier, Keras modules contains pre-defined classes, functions and variables which are useful for deep learning algorithm. Let us learn the modules provided by Keras in this chapter.
Let us first see the list of modules available in the Keras.
Initializers β Provides a list of initializers function. We ca... | [
{
"code": null,
"e": 2248,
"s": 2051,
"text": "As we learned earlier, Keras modules contains pre-defined classes, functions and variables which are useful for deep learning algorithm. Let us learn the modules provided by Keras in this chapter."
},
{
"code": null,
"e": 2309,
"s": 2248... |
SLF4J - Migrator | If you have a project in Jakarta Commons Logging (JCL) or, log4j or, java.util.logging (JUL) and you want to convert these projects to SLF4J, you can do so using the migrator tool provided in the SLF4J distribution.
SLF4J is a simple single jar file (slf4j-migrator.jar) and you can run it using the java βjar command.
T... | [
{
"code": null,
"e": 2001,
"s": 1785,
"text": "If you have a project in Jakarta Commons Logging (JCL) or, log4j or, java.util.logging (JUL) and you want to convert these projects to SLF4J, you can do so using the migrator tool provided in the SLF4J distribution."
},
{
"code": null,
"e": ... |
What is the difference between $.closest() and $.parents() methods in jQuery? | The jQuery closest and parents method is used to set or get the first or all ancestor element, matching the selector. Let's see the difference below:
The closest() method begins with the current element and returns only the first ancestors matching the passed expression. This returned jQuery object has zero or one elem... | [
{
"code": null,
"e": 1212,
"s": 1062,
"text": "The jQuery closest and parents method is used to set or get the first or all ancestor element, matching the selector. Let's see the difference below:"
},
{
"code": null,
"e": 1387,
"s": 1212,
"text": "The closest() method begins with... |
vector insert() function in C++ STL | vector insert() function in C++ STL helps to increase the size of a container by inserting the new elements before the elements at the specified position.
It is a predefined function in C++ STL.
We can insert values with three types of syntaxes
1. Insert values by mentioning only the position and value:
vector_name.ins... | [
{
"code": null,
"e": 1217,
"s": 1062,
"text": "vector insert() function in C++ STL helps to increase the size of a container by inserting the new elements before the elements at the specified position."
},
{
"code": null,
"e": 1257,
"s": 1217,
"text": "It is a predefined function... |
How to access ExpressJS env variables in an API endpoint ? - GeeksforGeeks | 04 May, 2021
Using environmental values allows one to configure values in a software/application from outside the software/application itself. This ensures that one doesnβt have to store sensitive data in the code itself. It also helps in reconfiguring the settings in an application without redeploying it.
In this arti... | [
{
"code": null,
"e": 25002,
"s": 24974,
"text": "\n04 May, 2021"
},
{
"code": null,
"e": 25297,
"s": 25002,
"text": "Using environmental values allows one to configure values in a software/application from outside the software/application itself. This ensures that one doesnβt hav... |
The Basic Building Block of Neural Networks | by Agnis Liukis | Towards Data Science | The Dense layer (a regular fully-connected layer) is probably the most widely used and well-known Neural Networks layer. It is the basic building block of many Neural Networks architectures.
Understanding the Dense layer gives a solid base for further exploring other types of layers and more complicated network archite... | [
{
"code": null,
"e": 363,
"s": 172,
"text": "The Dense layer (a regular fully-connected layer) is probably the most widely used and well-known Neural Networks layer. It is the basic building block of many Neural Networks architectures."
},
{
"code": null,
"e": 573,
"s": 363,
"tex... |
Zuma Game in C++ | Let us consider about the Zuma Game. Suppose we have a row of balls on the table, these balls are colored as red(R), yellow(Y), blue(B), green(G), and white(W). We also have several balls with us.
Now, each time, we may choose a ball from our side, and insert it into the row. Then, if there is a group of 3 or more ball... | [
{
"code": null,
"e": 1259,
"s": 1062,
"text": "Let us consider about the Zuma Game. Suppose we have a row of balls on the table, these balls are colored as red(R), yellow(Y), blue(B), green(G), and white(W). We also have several balls with us."
},
{
"code": null,
"e": 1477,
"s": 1259... |
Why a Constructor can not be final, static or abstract in Java? - GeeksforGeeks | 31 Mar, 2022
Prerequisite: Inheritance in Java
Constructor in java is a special type of method which is different from normal java methods/ordinary methods. Constructors are used to initialize an object. Automatically a constructor is called when an object of a class is created. It is syntactically similar to a method ... | [
{
"code": null,
"e": 23581,
"s": 23553,
"text": "\n31 Mar, 2022"
},
{
"code": null,
"e": 23615,
"s": 23581,
"text": "Prerequisite: Inheritance in Java"
},
{
"code": null,
"e": 23974,
"s": 23615,
"text": "Constructor in java is a special type of method which is... |
Add given timestamps by overloading + operator in C++ Time Class - GeeksforGeeks | 30 Aug, 2021
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.
In this article, we will overload an operator β+β in the Time class so that we can concatenate two t... | [
{
"code": null,
"e": 24161,
"s": 24133,
"text": "\n30 Aug, 2021"
},
{
"code": null,
"e": 24368,
"s": 24161,
"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... |
Java - String getChars() Method | This method copies characters from this string into the destination character array.
Here is the syntax of this method β
public void getChars(int srcBegin, int srcEnd, char[] dst, int dstBegin)
Here is the detail of parameters β
srcBegin β index of the first character in the string to copy.
srcBegin β index of the fi... | [
{
"code": null,
"e": 2462,
"s": 2377,
"text": "This method copies characters from this string into the destination character array."
},
{
"code": null,
"e": 2498,
"s": 2462,
"text": "Here is the syntax of this method β"
},
{
"code": null,
"e": 2573,
"s": 2498,
... |
Matplotlib.axis.Axis.set_units() function in Python - GeeksforGeeks | 08 Jun, 2020
Matplotlib is a library in Python and it is numerical β mathematical extension for NumPy library. It is an amazing visualization library in Python for 2D plots of arrays and used for working with the broader SciPy stack.
The Axis.set_units() function in axis module of matplotlib library is used to set the ... | [
{
"code": null,
"e": 24292,
"s": 24264,
"text": "\n08 Jun, 2020"
},
{
"code": null,
"e": 24513,
"s": 24292,
"text": "Matplotlib is a library in Python and it is numerical β mathematical extension for NumPy library. It is an amazing visualization library in Python for 2D plots of ... |
How to build recommender systems using Spotlight. | Towards Data Science | In my previous article, I demonstrated how to build shallow recommender systems based on techniques such as matrix factorization using Surprise.
towardsdatascience.com
But what if you want to build a recommender system that uses techniques that are more sophisticated than simple matrix factorization? What if you want t... | [
{
"code": null,
"e": 192,
"s": 47,
"text": "In my previous article, I demonstrated how to build shallow recommender systems based on techniques such as matrix factorization using Surprise."
},
{
"code": null,
"e": 215,
"s": 192,
"text": "towardsdatascience.com"
},
{
"code... |
Visualizing browser-based model training process using TensorFlow visualizer | by Sushrut Ashtikar | Towards Data Science | While training your model in python, the tensorboard library makes it possible to do visualization. Similarly, if you are training your model on a browser with tensorflowjs, you will require something for watching the training process. It is possible using the tensorflowjs visualizer. Using this, we can visualize the t... | [
{
"code": null,
"e": 646,
"s": 172,
"text": "While training your model in python, the tensorboard library makes it possible to do visualization. Similarly, if you are training your model on a browser with tensorflowjs, you will require something for watching the training process. It is possible usin... |
Is it possible to assign a numeric value to an enum in Java? | Yes, it's possible to assign a numeric value to an enum.
Enum in Java is used to represent a list of predefined values. Most of the time, we probably not care about the associated value of an enum. However, there might be some times when we need to assign specific values to an enum.
import java.util.Enumeration;
import... | [
{
"code": null,
"e": 1119,
"s": 1062,
"text": "Yes, it's possible to assign a numeric value to an enum."
},
{
"code": null,
"e": 1346,
"s": 1119,
"text": "Enum in Java is used to represent a list of predefined values. Most of the time, we probably not care about the associated va... |
Java Examples - Create directories recursively | How to create directories recursively ?
Following example shows how to create directories recursively with the help of file.mkdirs() methods of File class.
import java.io.File;
public class Main {
public static void main(String[] args) {
String directories = "D:\\a\\b\\c\\d\\e\\f\\g\\h\\i";
File file = ... | [
{
"code": null,
"e": 2108,
"s": 2068,
"text": "How to create directories recursively ?"
},
{
"code": null,
"e": 2224,
"s": 2108,
"text": "Following example shows how to create directories recursively with the help of file.mkdirs() methods of File class."
},
{
"code": null... |
Java Program to calculate Compound Interest | Following is the program to calculate Compound Interest in Java β
Live Demo
import java.io.*;
public class Demo{
public static void main(String args[]){
double princ = 456000, rt = 9.75, tm = 7;
double comp_int = princ *(Math.pow((1 + rt / 100), tm));
System.out.println("The compound interest for ... | [
{
"code": null,
"e": 1128,
"s": 1062,
"text": "Following is the program to calculate Compound Interest in Java β"
},
{
"code": null,
"e": 1139,
"s": 1128,
"text": " Live Demo"
},
{
"code": null,
"e": 1457,
"s": 1139,
"text": "import java.io.*;\npublic class De... |
HTTP - Quick Guide | The Hypertext Transfer Protocol (HTTP) is an application-level protocol for distributed, collaborative, hypermedia information systems. This is the foundation for data communication for the World Wide Web (ie. internet) since 1990. HTTP is a generic and stateless protocol which can be used for other purposes as well us... | [
{
"code": null,
"e": 2162,
"s": 1779,
"text": "The Hypertext Transfer Protocol (HTTP) is an application-level protocol for distributed, collaborative, hypermedia information systems. This is the foundation for data communication for the World Wide Web (ie. internet) since 1990. HTTP is a generic and... |
Number of ways to get even sum by choosing three numbers from 1 to N - GeeksforGeeks | 27 Apr, 2021
Given an integer N, find the number of ways we can choose 3 numbers from {1, 2, 3 ..., N} such that their sum is even. Examples:
Input : N = 3
Output : 1
Explanation: Select 1, 2 and 3
Input : N = 4
Output : 2
Either select (1, 2, 3) or (1, 3, 4)
Recommended: Please solve it on βPRACTICEβ first, be... | [
{
"code": null,
"e": 25612,
"s": 25584,
"text": "\n27 Apr, 2021"
},
{
"code": null,
"e": 25743,
"s": 25612,
"text": "Given an integer N, find the number of ways we can choose 3 numbers from {1, 2, 3 ..., N} such that their sum is even. Examples: "
},
{
"code": null,
... |
Style every disabled <input> element with CSS | To style every disabled <input> element, use the CSS :disabled selector. You can try to run the following code to style disabled element β
Live Demo
<!DOCTYPE html>
<html>
<head>
<style>
input:enabled {
background: blue;
}
input:disabled {
background: red;
... | [
{
"code": null,
"e": 1201,
"s": 1062,
"text": "To style every disabled <input> element, use the CSS :disabled selector. You can try to run the following code to style disabled element β"
},
{
"code": null,
"e": 1211,
"s": 1201,
"text": "Live Demo"
},
{
"code": null,
"... |
Count Derangements (Permutation such that no element appears in its original position) in C++ | Derangement is permutation of N numbers such that no number appears at original position. For
example one possible derangement of { 1,2,3 } is { 2,1,3 }. No element in this is at its original
position. The goal here is to count the possible derangements for N numbers.
We will do this using a recursive solution. For fol... | [
{
"code": null,
"e": 1331,
"s": 1062,
"text": "Derangement is permutation of N numbers such that no number appears at original position. For\nexample one possible derangement of { 1,2,3 } is { 2,1,3 }. No element in this is at its original\nposition. The goal here is to count the possible derangemen... |
Cast string to date in specific format in SAP HANA | I think you just need to use βTO_VARCHARβ and βTO_DATEβ functions.
SELECT TO_VARCHAR(TO_DATE(<your field>, 'YYYYMMDD'), 'YYYY-MM-DD') FROM <Table> | [
{
"code": null,
"e": 1129,
"s": 1062,
"text": "I think you just need to use βTO_VARCHARβ and βTO_DATEβ functions."
},
{
"code": null,
"e": 1209,
"s": 1129,
"text": "SELECT TO_VARCHAR(TO_DATE(<your field>, 'YYYYMMDD'), 'YYYY-MM-DD') FROM <Table>"
}
] |
The Queue Class in Javascript | Here is the complete implementation of the Queue class β
class Queue {
constructor(maxSize) {
// Set default max size if not provided
if (isNaN(maxSize)) {
maxSize = 10;
}
this.maxSize = maxSize;
// Init an array that'll contain the queue values.
this.container = [];
... | [
{
"code": null,
"e": 1119,
"s": 1062,
"text": "Here is the complete implementation of the Queue class β"
},
{
"code": null,
"e": 2309,
"s": 1119,
"text": "class Queue {\n constructor(maxSize) {\n // Set default max size if not provided\n if (isNaN(maxSize)) {\n ... |
Natural Language Processing with Spacy in Node.js | by Jeff Flynt | Towards Data Science | Many use cases exist for Natural Language Processing to be used in the browser with JavaScript but unfortunately not many tools exist in this space. To go beyond regular expressions and manipulation of strings, youβd want to leverage a good NLP framework. SpaCy which bills itself as Industrial-Strength Natural Language... | [
{
"code": null,
"e": 623,
"s": 172,
"text": "Many use cases exist for Natural Language Processing to be used in the browser with JavaScript but unfortunately not many tools exist in this space. To go beyond regular expressions and manipulation of strings, youβd want to leverage a good NLP framework.... |
How to create a combination of pairs from a vector in R? | To create a combination of pairs, we can use the combn function. This function will be helpful to use the vector length and the value 2 that represents a pair to create the combinations. Although, this is enough but we can transpose the output to get a betterβlooking output.
Live Demo
x1<βrpois(6,5)
x1
[1] 5 3 7 4 8 2... | [
{
"code": null,
"e": 1338,
"s": 1062,
"text": "To create a combination of pairs, we can use the combn function. This function will be helpful to use the vector length and the value 2 that represents a pair to create the combinations. Although, this is enough but we can transpose the output to get a ... |
ES6 - Array Method every() | every method tests whether all the elements in an array passes the test implemented by the provided function.
array.every(callback[, thisObject]);
callback β Function to test for each element.
callback β Function to test for each element.
thisObject β Object to use as this when executing callback.
thisObject β Object... | [
{
"code": null,
"e": 2387,
"s": 2277,
"text": "every method tests whether all the elements in an array passes the test implemented by the provided function."
},
{
"code": null,
"e": 2426,
"s": 2387,
"text": "array.every(callback[, thisObject]); \n"
},
{
"code": null,
... |
Convert a Character Object to Integer in R Programming - as.integer() Function - GeeksforGeeks | 16 Jun, 2020
as.integer() function in R Language is used to convert a character object to integer object.
Syntax: as.integer(x)
Parameters:x: Character Object
Example 1:
# R program to convert a character object# to an integer object # Calling as.integer() functionas.integer("4")as.integer("1.6")as.integer("-3.2")as.i... | [
{
"code": null,
"e": 24231,
"s": 24203,
"text": "\n16 Jun, 2020"
},
{
"code": null,
"e": 24324,
"s": 24231,
"text": "as.integer() function in R Language is used to convert a character object to integer object."
},
{
"code": null,
"e": 24346,
"s": 24324,
"text"... |
How to display star for significance in base R boxplot? | To display the star for significance in a base R boxplot, we can use text function. The text function will be helpful in defining the star sign (that is asterisk or *). If the significance is high then three stars are used and the significance is low then a single star is used. We need to use the appropriate position u... | [
{
"code": null,
"e": 1403,
"s": 1062,
"text": "To display the star for significance in a base R boxplot, we can use text function. The text function will be helpful in defining the star sign (that is asterisk or *). If the significance is high then three stars are used and the significance is low th... |
Estimating Probabilities with Bayesian Modeling in Python | by Will Koehrsen | Towards Data Science | It started, as the best projects always do, with a few tweets:
This may seem like a simple problem β the prevalences are simply the same as the observed data (50% lions, 33% tigers and 17% bears) right? If you believe observations we make are a perfect representation of the underlying truth, then yes, this problem coul... | [
{
"code": null,
"e": 235,
"s": 172,
"text": "It started, as the best projects always do, with a few tweets:"
},
{
"code": null,
"e": 609,
"s": 235,
"text": "This may seem like a simple problem β the prevalences are simply the same as the observed data (50% lions, 33% tigers and 1... |
Generating a unique random 10 character string using MySQL? | In order to generate a 10 character string, we can use inbuilt functions βrand()β and βchar()β. The following is the query to generate random 10 character string.
mysql> SELECT concat(
- > char(round(rand()*25)+97),
- > char(round(rand()*25)+97),
- > char(round(rand()*25)+97),
- > char(round(rand()*25)+97)... | [
{
"code": null,
"e": 1225,
"s": 1062,
"text": "In order to generate a 10 character string, we can use inbuilt functions βrand()β and βchar()β. The following is the query to generate random 10 character string."
},
{
"code": null,
"e": 1623,
"s": 1225,
"text": "mysql> SELECT conc... |
Design and Analysis Spanning Tree | A spanning tree is a subset of an undirected Graph that has all the vertices connected by minimum number of edges.
If all the vertices are connected in a graph, then there exists at least one spanning tree. In a graph, there may exist more than one spanning tree.
A spanning tree does not have any cycle.
Any vertex can ... | [
{
"code": null,
"e": 2714,
"s": 2599,
"text": "A spanning tree is a subset of an undirected Graph that has all the vertices connected by minimum number of edges."
},
{
"code": null,
"e": 2863,
"s": 2714,
"text": "If all the vertices are connected in a graph, then there exists at ... |
C Program to check if a number belongs to a particular base or not | Given a number as a string and a base; the task is to check whether the given number of is of that given base or not.
We have to check the number and the base according to the number system in which there are bases like 2 for a binary number, 8 for an octal number, 10 for decimal number and 16 for a Hexadecimal number.... | [
{
"code": null,
"e": 1180,
"s": 1062,
"text": "Given a number as a string and a base; the task is to check whether the given number of is of that given base or not."
},
{
"code": null,
"e": 1607,
"s": 1180,
"text": "We have to check the number and the base according to the number... |
Smallest factorial number | Practice | GeeksforGeeks | Given a number n. The task is to find the smallest number whose factorial contains at least n trailing zeroes.
Example 1:
Input:
n = 1
Output: 5
Explanation : 5! = 120 which has at
least 1 trailing 0.
Example 2:
Input:
n = 6
Output: 25
Explanation : 25! has at least
6 trailing 0.
User Task:
Complete the function find... | [
{
"code": null,
"e": 349,
"s": 238,
"text": "Given a number n. The task is to find the smallest number whose factorial contains at least n trailing zeroes."
},
{
"code": null,
"e": 360,
"s": 349,
"text": "Example 1:"
},
{
"code": null,
"e": 439,
"s": 360,
"tex... |
Generate a corpus of public βtweetsβ containing a subject/keyword of interest | by Daniel Ellis | Towards Data Science | It is often hard to conduct research into peoples interest, with poll and survey results often being skewed, or there being unintentionally loaded questions. It, therefore, means that the βtruestβ method of understanding peoples interests lies in what they wish to share or talk about without any external influences. Th... | [
{
"code": null,
"e": 595,
"s": 172,
"text": "It is often hard to conduct research into peoples interest, with poll and survey results often being skewed, or there being unintentionally loaded questions. It, therefore, means that the βtruestβ method of understanding peoples interests lies in what the... |
How can I represent an infinite number in Python? | A number equivalent to infinity can be assigned to a float variable by putting 'inf' as argument to float() function
>>> a=float('inf')
>>> a
inf
It is also possible to achieve same effect by assigning inf constant in math module
>>> import math
>>> a=math.inf
>>> a
inf | [
{
"code": null,
"e": 1179,
"s": 1062,
"text": "A number equivalent to infinity can be assigned to a float variable by putting 'inf' as argument to float() function"
},
{
"code": null,
"e": 1208,
"s": 1179,
"text": ">>> a=float('inf')\n>>> a\ninf"
},
{
"code": null,
"e... |
Themes to spice up visualizations with ggplot2 | by Abhinav Malasi | Towards Data Science | On a single glance, when you look at a visualization, few things pop out, which may vary from person to person. Those eye-catching features can be the charts or images, colors used, text style, or even the background. If you are into data visualization and familiar with principles for creating good visualization. Then ... | [
{
"code": null,
"e": 712,
"s": 172,
"text": "On a single glance, when you look at a visualization, few things pop out, which may vary from person to person. Those eye-catching features can be the charts or images, colors used, text style, or even the background. If you are into data visualization an... |
14 Must-Know pip Commands For Data Scientists and Engineers | Towards Data Science | Even though Python standard library offers a wide range of tools and functionality, developers still need to use external (to the standard library) packages that are widely available. Most programming languages have their standard package managers that allow users to manage the dependencies of their projects.
The most ... | [
{
"code": null,
"e": 483,
"s": 172,
"text": "Even though Python standard library offers a wide range of tools and functionality, developers still need to use external (to the standard library) packages that are widely available. Most programming languages have their standard package managers that al... |
How to get all the Get-Process properties using PowerShell? | Get-Process shows the default properties only. To get all the properties of Get-Process, we need to pipeline Format-List * (fl *).
Get-Process | Format-List *
Name : AcroRd32
Id : 8052
PriorityClass : Normal
FileVersion : 11.0.23.22
HandleCount ... | [
{
"code": null,
"e": 1193,
"s": 1062,
"text": "Get-Process shows the default properties only. To get all the properties of Get-Process, we need to pipeline Format-List * (fl *)."
},
{
"code": null,
"e": 1221,
"s": 1193,
"text": "Get-Process | Format-List *"
},
{
"code": n... |
HTML DOM onload Event | 15 Nov, 2021
The DOM onload event in HTML occurs when an object has been loaded. The onload event is mostly used within the <body> tag, in order to run the script on the web page that will load all the content completely. The onload event can be used to check the userβs browser type and browser version, and load the ve... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n15 Nov, 2021"
},
{
"code": null,
"e": 431,
"s": 28,
"text": "The DOM onload event in HTML occurs when an object has been loaded. The onload event is mostly used within the <body> tag, in order to run the script on the web page that will... |
How to reverse an animation on mouse out after hover? | 31 Jan, 2020
CSS Animations lets various elements on a web page to gradually change from one style to another. These make the website look more attractive and interesting reversing an animation means playing it backward.
Approach 1: This example illustrates reversing an animation using @keyframes from to @keyframes to ... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n31 Jan, 2020"
},
{
"code": null,
"e": 236,
"s": 28,
"text": "CSS Animations lets various elements on a web page to gradually change from one style to another. These make the website look more attractive and interesting reversing an anim... |
How to Shift Inline Elements When Text Bold on Hover using CSS ? | 08 Feb, 2022
When we will use a:hover pseudo-class to add a bold effect to the inline elements then we observe that whenever we hover over elements with the mouse, the elements to the right side of the mouse gets shifted to the right. This is not a good user experience thus needs to be removed. We can use the letter-sp... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n08 Feb, 2022"
},
{
"code": null,
"e": 707,
"s": 28,
"text": "When we will use a:hover pseudo-class to add a bold effect to the inline elements then we observe that whenever we hover over elements with the mouse, the elements to the righ... |
Minification of CSS files | 31 Jul, 2019
Minifying a CSS file implies the removal of unnecessary characters in the source code to reduce the file size and facilitate faster loading of the site. When a user requests a webpage, the minified version is sent instead of the full version, resulting in faster response times and lower bandwidth costs. It... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n31 Jul, 2019"
},
{
"code": null,
"e": 424,
"s": 28,
"text": "Minifying a CSS file implies the removal of unnecessary characters in the source code to reduce the file size and facilitate faster loading of the site. When a user requests a... |
Types of Vectors in R Programming | 28 Jul, 2020
Vectors in R programming are the same as the arrays in C language which are used to hold multiple data values of the same type. One major key point is that in R the indexing of the vector will start from β1β and not from β0β. Vectors are the most basic data types in R. Even a single object created is also ... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n28 Jul, 2020"
},
{
"code": null,
"e": 589,
"s": 28,
"text": "Vectors in R programming are the same as the arrays in C language which are used to hold multiple data values of the same type. One major key point is that in R the indexing o... |
How to iterate over the elements of an std::tuple in C++ | 20 May, 2021
A C++ tuple is a container that can store multiple values of multiple types in it. We can access the elements of the tuple using std::get(), but std::get() always takes a constant variable parameter, so we can not simply iterate through it using a loop. For tasks that require iterating through all elements... | [
{
"code": null,
"e": 54,
"s": 26,
"text": "\n20 May, 2021"
},
{
"code": null,
"e": 404,
"s": 54,
"text": "A C++ tuple is a container that can store multiple values of multiple types in it. We can access the elements of the tuple using std::get(), but std::get() always takes a con... |
How to find Index of Element in Vector in R ? | 16 May, 2021
In this article, we will discuss How to find the index of element in vector in the R programming language. We can find the index of the element by the following functions β
which()
match()
Method 1: by using which()
which() function basically returns the vector of indexes that satisfies the argument given ... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n16 May, 2021"
},
{
"code": null,
"e": 201,
"s": 28,
"text": "In this article, we will discuss How to find the index of element in vector in the R programming language. We can find the index of the element by the following functions β"
... |
JavaScript Date setDate() Method | 01 Jul, 2020
Below is the example of Date setDate() method.
Example:<script> // Here a date has been assigned // while creating Date object var dateobj = new Date('October 13, 1996 05:35:32'); // new date 15 of the month is being set // in above Date Object with the help of // setDate() method dateo... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n01 Jul, 2020"
},
{
"code": null,
"e": 75,
"s": 28,
"text": "Below is the example of Date setDate() method."
},
{
"code": null,
"e": 540,
"s": 75,
"text": "Example:<script> // Here a date has been assigned // whil... |
Find first and last digits of a number | 09 Jun, 2022
Given a number and to find first and last digit of a number.Examples:
Input : 12345
Output : First digit: 1
last digit : 5
Input : 98562
Output : First digit: 9
last digit : 2
To find last digit of a number, we use modulo operator %. When modulo divided by 10 returns its last digit.... | [
{
"code": null,
"e": 53,
"s": 25,
"text": "\n09 Jun, 2022"
},
{
"code": null,
"e": 125,
"s": 53,
"text": "Given a number and to find first and last digit of a number.Examples: "
},
{
"code": null,
"e": 251,
"s": 125,
"text": "Input : 12345 \nOutput : First di... |
watch command in Linux with Examples | 27 May, 2019
watch command in Linux is used to execute a program periodically, showing output in fullscreen. This command will run the specified command in the argument repeatedly by showing its output and errors. By default, the specified command will run every 2 seconds and watch will run until interrupted.
Syntax:
w... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n27 May, 2019"
},
{
"code": null,
"e": 326,
"s": 28,
"text": "watch command in Linux is used to execute a program periodically, showing output in fullscreen. This command will run the specified command in the argument repeatedly by showi... |
XOR Linked List β A Memory Efficient Doubly Linked List | Set 2 | 03 Jul, 2022
In the previous post, we discussed how a Doubly Linked can be created using only one space for the address field with every node. In this post, we will discuss the implementation of memory-efficient doubly linked list. We will mainly discuss the following two simple functions.
A function to insert a new no... | [
{
"code": null,
"e": 54,
"s": 26,
"text": "\n03 Jul, 2022"
},
{
"code": null,
"e": 332,
"s": 54,
"text": "In the previous post, we discussed how a Doubly Linked can be created using only one space for the address field with every node. In this post, we will discuss the implementa... |
ML | Non-Linear SVM | 09 May, 2019
Prerequisite: Classifying data using SVM
In Linear SVM, the two classes were linearly separable, i.e a single straight line is able to classify both the classes. But imagine if you have three classes, obviously they will not be linearly separable. Therefore, Non-linear SVMβs come handy while handling these... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n09 May, 2019"
},
{
"code": null,
"e": 69,
"s": 28,
"text": "Prerequisite: Classifying data using SVM"
},
{
"code": null,
"e": 392,
"s": 69,
"text": "In Linear SVM, the two classes were linearly separable, i.e a singl... |
Sort an array of 0s, 1s and 2s | Dutch National Flag problem | 11 Jul, 2022
Given an array A[] consisting only 0s, 1s and 2s. The task is to write a function that sorts the given array. The functions should put all 0s first, then all 1s and all 2s in last.
This problem is also the same as the famous βDutch National Flag problemβ. The problem was proposed by Edsger Dijkstra. The pr... | [
{
"code": null,
"e": 54,
"s": 26,
"text": "\n11 Jul, 2022"
},
{
"code": null,
"e": 235,
"s": 54,
"text": "Given an array A[] consisting only 0s, 1s and 2s. The task is to write a function that sorts the given array. The functions should put all 0s first, then all 1s and all 2s in... |
How to enable CORS headers in your Django Project? - GeeksforGeeks | 26 Nov, 2020
When site A wants to access content from another site B, it is called a Cross-Origin request. As it is disabled for security reasons, B sends an Access-Control-Allow-Origin header in the response. By default, a domain is not allowed to access an API hosted on another domain. If we want to allow our REST A... | [
{
"code": null,
"e": 25563,
"s": 25535,
"text": "\n26 Nov, 2020"
},
{
"code": null,
"e": 26054,
"s": 25563,
"text": "When site A wants to access content from another site B, it is called a Cross-Origin request. As it is disabled for security reasons, B sends an Access-Control-All... |
Find a string which matches all the patterns in the given array - GeeksforGeeks | 15 Oct, 2020
Given an array of strings arr[] which contains patterns of characters and β*β denoting any set of characters including the empty string. The task is to find a string that matches all the patterns in the array.Note: If there is no such possible pattern, print -1. Examples:
Input: arr[] = {βpq*du*qβ, βpq*ab... | [
{
"code": null,
"e": 26697,
"s": 26669,
"text": "\n15 Oct, 2020"
},
{
"code": null,
"e": 26971,
"s": 26697,
"text": "Given an array of strings arr[] which contains patterns of characters and β*β denoting any set of characters including the empty string. The task is to find a stri... |
How to Add an Empty Column to DataFrame in R? - GeeksforGeeks | 28 Nov, 2021
In this article, we will discuss how to add an empty column to the dataframe in R Programming Language.
Here we are going to add an empty column to the dataframe by assigning to column values as NA.
Syntax:
dataframe[ , 'column_name'] = NA
where,
dataframe is the input dataframe
column_name is the new col... | [
{
"code": null,
"e": 26487,
"s": 26459,
"text": "\n28 Nov, 2021"
},
{
"code": null,
"e": 26591,
"s": 26487,
"text": "In this article, we will discuss how to add an empty column to the dataframe in R Programming Language."
},
{
"code": null,
"e": 26686,
"s": 26591,... |
Choice of Area - GeeksforGeeks | 04 Mar, 2022
Consider a game, in which you have two types of powers, A and B and there are 3 types of Areas X, Y and Z. Every second you have to switch between these areas, each area has specific properties by which your power A and power B increase or decrease. We need to keep choosing areas in such a way that our sur... | [
{
"code": null,
"e": 25911,
"s": 25883,
"text": "\n04 Mar, 2022"
},
{
"code": null,
"e": 26326,
"s": 25911,
"text": "Consider a game, in which you have two types of powers, A and B and there are 3 types of Areas X, Y and Z. Every second you have to switch between these areas, eac... |
JavaScript | Window innerWidth and innerHeight Properties - GeeksforGeeks | 14 Feb, 2019
The innerWidth property in JavaScript returns the width and innerHeight property returns the height of window content area.
Syntax:
window.innerWidth
window.innerHeight
Parameter: It doesnβt required any parameters.
Return Value: It Returns a number, Representing the Width and Height of the windowβs conten... | [
{
"code": null,
"e": 26388,
"s": 26360,
"text": "\n14 Feb, 2019"
},
{
"code": null,
"e": 26512,
"s": 26388,
"text": "The innerWidth property in JavaScript returns the width and innerHeight property returns the height of window content area."
},
{
"code": null,
"e": 26... |
Python SQLite - Working with Date and DateTime - GeeksforGeeks | 20 Sep, 2021
SQLite does not support built-in DateTime storage a class, but SQLite allows us to work with timestamp types. We can store and retrieve Python date and datetime information stored in the SQLite database tables by converting them to Python date and datetime types and vice-versa.
While inserting the datetime... | [
{
"code": null,
"e": 26088,
"s": 26060,
"text": "\n20 Sep, 2021"
},
{
"code": null,
"e": 26367,
"s": 26088,
"text": "SQLite does not support built-in DateTime storage a class, but SQLite allows us to work with timestamp types. We can store and retrieve Python date and datetime in... |
Serialization of Lambda Expression in Java - GeeksforGeeks | 18 Jan, 2022
Here we will be discussing serialization in java and the problems related to the lambda function without the serialization alongside discussing some ways due to which we require serialization alongside proper implementation as in clean java programs with complete serialization and deserialization process u... | [
{
"code": null,
"e": 25263,
"s": 25235,
"text": "\n18 Jan, 2022"
},
{
"code": null,
"e": 25599,
"s": 25263,
"text": "Here we will be discussing serialization in java and the problems related to the lambda function without the serialization alongside discussing some ways due to wh... |
The Celebrity Problem - GeeksforGeeks | 24 Apr, 2022
In a party of N people, only one person is known to everyone. Such a person may be present in the party, if yes, (s)he doesnβt know anyone in the party. We can only ask questions like βdoes A know B? β. Find the stranger (celebrity) in the minimum number of questions.We can describe the problem input as an... | [
{
"code": null,
"e": 26922,
"s": 26894,
"text": "\n24 Apr, 2022"
},
{
"code": null,
"e": 27434,
"s": 26922,
"text": "In a party of N people, only one person is known to everyone. Such a person may be present in the party, if yes, (s)he doesnβt know anyone in the party. We can onl... |
Making a Handwritten Digit Recogniser program using nearest neighbour classifier | by Salil Jain | Towards Data Science | Nearest neighbour classifier is one of the most basic algorithm in machine learning. This tutorial describes a very basic method to make a digit recognizer program. Weβll not use any python machine learning library here. So lets get started
from sklearn import datasetsimport matplotlib.pyplot as pltimport numpy as np
s... | [
{
"code": null,
"e": 412,
"s": 171,
"text": "Nearest neighbour classifier is one of the most basic algorithm in machine learning. This tutorial describes a very basic method to make a digit recognizer program. Weβll not use any python machine learning library here. So lets get started"
},
{
... |
Top 4 Python Modules For Engineering & Research | Towards Data Science | Python is perfect for a beginner as the syntax is easy to grasp and simple to understand. With this perk, it is already a leading programming language in the engineering and research fields. As engineers, we are tasked to βapply the principles of science and mathematics to develop economical solutions to technical prob... | [
{
"code": null,
"e": 498,
"s": 171,
"text": "Python is perfect for a beginner as the syntax is easy to grasp and simple to understand. With this perk, it is already a leading programming language in the engineering and research fields. As engineers, we are tasked to βapply the principles of science ... |
Guide to Coding a Custom Convolutional Neural Network in TensorFlow Core | by Andrew Kruger | Towards Data Science | The following demonstrates how to use the low-level TensorFlow Core to create Convolutional Neural Network (ConvNet) models without high-level APIs such as Keras. The goal of this tutorial is to provide a better understanding of the background processes in a deep neural network and to demonstrate concepts on how use Te... | [
{
"code": null,
"e": 524,
"s": 172,
"text": "The following demonstrates how to use the low-level TensorFlow Core to create Convolutional Neural Network (ConvNet) models without high-level APIs such as Keras. The goal of this tutorial is to provide a better understanding of the background processes i... |
Array.Clear() Method in C# | The Array.Clear() method in C# is used to clear the elements in an array and set them to its default. The elements are cleared in a range. The syntax is as follows β
public static void Clear (Array arr, int index, int len);
Here, arr is the array whose elements are to be cleared, the index is the beginning index of the... | [
{
"code": null,
"e": 1228,
"s": 1062,
"text": "The Array.Clear() method in C# is used to clear the elements in an array and set them to its default. The elements are cleared in a range. The syntax is as follows β"
},
{
"code": null,
"e": 1286,
"s": 1228,
"text": "public static vo... |
How to Find and Remove Duplicate Files on Linux? | 16 Feb, 2021
Most of us have a habit of downloading many types of stuff (songs, files, etc) from the internet and that is why we may often find we have downloaded the same mp3 files, PDF files, and other extensions. Your disk spaces are unnecessarily wasted by Duplicate files and if you want the same files on a differe... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n16 Feb, 2021"
},
{
"code": null,
"e": 833,
"s": 52,
"text": "Most of us have a habit of downloading many types of stuff (songs, files, etc) from the internet and that is why we may often find we have downloaded the same mp3 files, PDF ... |
Top 5 Skills You Must Know Before You Learn ReactJS | 15 Jun, 2022
Do you know enough javascript before jumping into React??Do you know how to use the map() method to loop through an array in javascript or ReactJS??If you are learning React and you get stuck on these kinds of above questions then definitely you are doing mistakes in your learning process. There is no doub... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n15 Jun, 2022"
},
{
"code": null,
"e": 937,
"s": 52,
"text": "Do you know enough javascript before jumping into React??Do you know how to use the map() method to loop through an array in javascript or ReactJS??If you are learning React ... |
Conversion Operators in C++ | 20 Dec, 2021
In C++, the programmer abstracts real-world objects using classes as concrete types. Sometimes, it is required to convert one concrete type to another concrete type or primitive type implicitly. Conversion operators play an important role in such situations. It is similar to the operator overloading functi... | [
{
"code": null,
"e": 54,
"s": 26,
"text": "\n20 Dec, 2021"
},
{
"code": null,
"e": 510,
"s": 54,
"text": "In C++, the programmer abstracts real-world objects using classes as concrete types. Sometimes, it is required to convert one concrete type to another concrete type or primit... |
Combine two DataFrames in R with different columns | 23 May, 2021
In this article, we will discuss how to combine two dataframes with different columns in R Programming Language.
The βplyrβ package in R is used to work with data, including its enhancements and manipulations. It can be loaded and installed into the working space by the following command :
install.packages... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n23 May, 2021"
},
{
"code": null,
"e": 141,
"s": 28,
"text": "In this article, we will discuss how to combine two dataframes with different columns in R Programming Language."
},
{
"code": null,
"e": 319,
"s": 141,
"t... |
Correlation between two numeric columns in a Pandas DataFrame | We can use pandas.DataFrame.corr to compute pairwise correlation of columns, excluding NULL values. The correlation coefficient indicates the strength of the linear association between two variables. The coefficient ranges between -1 and 1.
To get the correlation between two numeric columns in a Pandas dataframe, we ca... | [
{
"code": null,
"e": 1303,
"s": 1062,
"text": "We can use pandas.DataFrame.corr to compute pairwise correlation of columns, excluding NULL values. The correlation coefficient indicates the strength of the linear association between two variables. The coefficient ranges between -1 and 1."
},
{
... |
Backtracking | Introduction - GeeksforGeeks | 19 Apr, 2022
Prerequisites :
Recursion
Complexity Analysis
Backtracking is an algorithmic-technique for solving problems recursively by trying to build a solution incrementally, one piece at a time, removing those solutions that fail to satisfy the constraints of the problem at any point of time (by time, here, is ref... | [
{
"code": null,
"e": 24972,
"s": 24944,
"text": "\n19 Apr, 2022"
},
{
"code": null,
"e": 24989,
"s": 24972,
"text": "Prerequisites : "
},
{
"code": null,
"e": 24999,
"s": 24989,
"text": "Recursion"
},
{
"code": null,
"e": 25019,
"s": 24999,
... |
How to Read JSON Files with Pandas? - GeeksforGeeks | 22 Nov, 2021
In this article, we are going to see how to read JSON Files with Pandas.
To read the files, we use read_json() function and through it, we pass the path to the JSON file we want to read. Once we do that, it returns a βDataFrameβ( A table of rows and columns) that stores data. If we want to read a file that... | [
{
"code": null,
"e": 24292,
"s": 24264,
"text": "\n22 Nov, 2021"
},
{
"code": null,
"e": 24365,
"s": 24292,
"text": "In this article, we are going to see how to read JSON Files with Pandas."
},
{
"code": null,
"e": 24692,
"s": 24365,
"text": "To read the files... |
Generate Word Clouds Of Any Shape In Python - GeeksforGeeks | 10 Dec, 2021
In this article, we will discuss how to create word clouds of any shape in Python.
The term WordCloud refers to a data visualization technique for showing text data in which the size of each word indicates its frequency or relevance. To create a word cloud of any shape, use Pythonβs Matplotlib, word cloud... | [
{
"code": null,
"e": 24292,
"s": 24264,
"text": "\n10 Dec, 2021"
},
{
"code": null,
"e": 24376,
"s": 24292,
"text": "In this article, we will discuss how to create word clouds of any shape in Python. "
},
{
"code": null,
"e": 24626,
"s": 24376,
"text": "The te... |
Interactive Ruby (irb) | Interactive Ruby or irb is an interactive programming environment that comes with Ruby. It was written by Keiju Ishitsuka.
To invoke it, type irb at a shell or command prompt, and begin entering Ruby statements and expressions. Use exit or quit to exit irb.
$ irb[.rb] [options] [programfile] [arguments]
Here is a comp... | [
{
"code": null,
"e": 2417,
"s": 2294,
"text": "Interactive Ruby or irb is an interactive programming environment that comes with Ruby. It was written by Keiju Ishitsuka."
},
{
"code": null,
"e": 2552,
"s": 2417,
"text": "To invoke it, type irb at a shell or command prompt, and be... |
Get the QR factorization of a given NumPy array - GeeksforGeeks | 29 Aug, 2020
In this article, we will discuss QR decomposition or QR factorization of a matrix. QR factorization of a matrix is the decomposition of a matrix say βAβ into βA=QRβ where Q is orthogonal and R is an upper-triangular matrix. We factorize the matrix using numpy.linalg.qr() function.
Syntax : numpy.linalg.qr(... | [
{
"code": null,
"e": 23785,
"s": 23757,
"text": "\n29 Aug, 2020"
},
{
"code": null,
"e": 24067,
"s": 23785,
"text": "In this article, we will discuss QR decomposition or QR factorization of a matrix. QR factorization of a matrix is the decomposition of a matrix say βAβ into βA=QR... |
Ruby - Methods | Ruby methods are very similar to functions in any other programming language. Ruby methods are used to bundle one or more repeatable statements into a single unit.
Method names should begin with a lowercase letter. If you begin a method name with an uppercase letter, Ruby might think that it is a constant and hence can... | [
{
"code": null,
"e": 2458,
"s": 2294,
"text": "Ruby methods are very similar to functions in any other programming language. Ruby methods are used to bundle one or more repeatable statements into a single unit."
},
{
"code": null,
"e": 2643,
"s": 2458,
"text": "Method names shoul... |
How to sort a boxplot by the median values in Pandas? | To sort a boxplot by the median values in Pandas, we can take the following steps
Set the figure size and adjust the padding between and around the subplots.
Set the figure size and adjust the padding between and around the subplots.
Create a Pandas dataframe of two-dimensional, size-mutable, potentially heterogeneous ... | [
{
"code": null,
"e": 1144,
"s": 1062,
"text": "To sort a boxplot by the median values in Pandas, we can take the following steps"
},
{
"code": null,
"e": 1220,
"s": 1144,
"text": "Set the figure size and adjust the padding between and around the subplots."
},
{
"code": nu... |
Cheapest Flights Within K Stops in C++ | Suppose we have n cities connected by m flights. Each flight starts from u and arrives at v with a price w. If we have all the cities and flights, together with starting city src and the destination dst, here our task is to find the cheapest price from src to dst with up to k stops. If there is no such route, then retu... | [
{
"code": null,
"e": 1389,
"s": 1062,
"text": "Suppose we have n cities connected by m flights. Each flight starts from u and arrives at v with a price w. If we have all the cities and flights, together with starting city src and the destination dst, here our task is to find the cheapest price from ... |
C# | Method Parameters - GeeksforGeeks | 13 Oct, 2019
Methods in C# are generally the block of codes or statements in a program which gives the user the ability to reuse the same code which ultimately saves the excessive use of memory, acts as a time saver and more importantly, it provides better readability of the code. So you can say a method is a collectio... | [
{
"code": null,
"e": 25304,
"s": 25276,
"text": "\n13 Oct, 2019"
},
{
"code": null,
"e": 25946,
"s": 25304,
"text": "Methods in C# are generally the block of codes or statements in a program which gives the user the ability to reuse the same code which ultimately saves the excess... |
Python 3 - String find() Method | The find() method determines if the string str occurs in string, or in a substring of string if the starting index beg and ending index end are given.
Following is the syntax for find() method β
str.find(str, beg = 0 end = len(string))
str β This specifies the string to be searched.
str β This specifies the string to ... | [
{
"code": null,
"e": 2491,
"s": 2340,
"text": "The find() method determines if the string str occurs in string, or in a substring of string if the starting index beg and ending index end are given."
},
{
"code": null,
"e": 2535,
"s": 2491,
"text": "Following is the syntax for fin... |
TypeScript | String replace() Method - GeeksforGeeks | 18 Jun, 2020
The replace() is an inbuilt function in TypeScript which is used to find a match between a regular expression and a string, and replaces the matched substring with a new substring. Syntax:
string.replace(regexp/substr, newSubStr/function[, flags]);
Parameter: This method accept five parameter as mentioned ... | [
{
"code": null,
"e": 24450,
"s": 24422,
"text": "\n18 Jun, 2020"
},
{
"code": null,
"e": 24639,
"s": 24450,
"text": "The replace() is an inbuilt function in TypeScript which is used to find a match between a regular expression and a string, and replaces the matched substring with... |
Merge two array fields in MongoDB? | To merge, use $setUnion operator. Let us first create a collection with documents β
> db.mergeTwoArrayFieldDemo.insertOne({"NaturalNumbers":[1,2,3,8,10,20,30],"WholeNumbers":[0,1,2,63,78,20,45]});
{
"acknowledged" : true,
"insertedId" : ObjectId("5cd68e4057806ebf1256f11d")
}
Following is the query to display all ... | [
{
"code": null,
"e": 1146,
"s": 1062,
"text": "To merge, use $setUnion operator. Let us first create a collection with documents β"
},
{
"code": null,
"e": 1344,
"s": 1146,
"text": "> db.mergeTwoArrayFieldDemo.insertOne({\"NaturalNumbers\":[1,2,3,8,10,20,30],\"WholeNumbers\":[0,1... |
How to pass JavaScript variables to PHP? | You can easily get the JavaScript variable value on the same page in PHP. Try the following codeL.
<script>
var res = "success";
</script>
<?php
echo "<script>document.writeln(res);</script>";
?> | [
{
"code": null,
"e": 1161,
"s": 1062,
"text": "You can easily get the JavaScript variable value on the same page in PHP. Try the following codeL."
},
{
"code": null,
"e": 1264,
"s": 1161,
"text": "<script>\n var res = \"success\";\n</script>\n<?php\n echo \"<script>document.w... |
C Program for simple interest? | Simple Interest is the product of principal amount, rate of interest and the time duration (in years) by 100.
Example,
Input β p=5, r=4, t=5
Output β 1
Explanation: Simple Interest = (Principal Amount * Rate of Interest * Number of years) / 100
SI= 5*4*5/100 = 1
#include<iostream>
#include <stdio.h>
using namespace std... | [
{
"code": null,
"e": 1172,
"s": 1062,
"text": "Simple Interest is the product of principal amount, rate of interest and the time duration (in years) by 100."
},
{
"code": null,
"e": 1181,
"s": 1172,
"text": "Example,"
},
{
"code": null,
"e": 1203,
"s": 1181,
"... |
C++ Iterator Library - reverse_iterator | It is an iterator adaptor that reverses the direction of a given iterator.
Following is the declaration for std::reverse_iterator.
template <class Iterator> class reverse_iterator;
Iterator β It is a bidirectional iterator type.
none
If x somehow throws while applying the unary operator& to it, this function never thr... | [
{
"code": null,
"e": 2678,
"s": 2603,
"text": "It is an iterator adaptor that reverses the direction of a given iterator."
},
{
"code": null,
"e": 2734,
"s": 2678,
"text": "Following is the declaration for std::reverse_iterator."
},
{
"code": null,
"e": 2785,
"s":... |
Inference using EM algorithm. Learn in-depth about the magic of EM... | by Rishabh Misra | Towards Data Science | The goal of this post is to explain a powerful algorithm in statistical analysis: the Expectation-Maximization (EM) algorithm. It is powerful in the sense that it has the ability to deal with missing data and unobserved features, the use-cases for which come up frequently in many real-world applications.
Upon finishing... | [
{
"code": null,
"e": 478,
"s": 172,
"text": "The goal of this post is to explain a powerful algorithm in statistical analysis: the Expectation-Maximization (EM) algorithm. It is powerful in the sense that it has the ability to deal with missing data and unobserved features, the use-cases for which c... |
How to create a responsive image gallery with CSS | To create a responsive image gallery with CSS, you can try to run the following code
<!DOCTYPE html>
<html>
<head>
<style>
div.myGallery {
border: 2px solid orange;
}
div.myGallery:hover {
border: 1px solid blue;
}
div.myGallery img {
... | [
{
"code": null,
"e": 1147,
"s": 1062,
"text": "To create a responsive image gallery with CSS, you can try to run the following code"
},
{
"code": null,
"e": 3696,
"s": 1147,
"text": "<!DOCTYPE html>\n<html>\n <head>\n <style>\n div.myGallery {\n border: ... |
Generalised Fibonacci numbers | Practice | GeeksforGeeks | Consider the generalized Fibonacci number G, which is dependent on a, b and c as follows :-
G(1) = 1, G(2) = 1. G(n) = aG(n-1) + bG(n-2) + c.
Your task is to calculate G(n)%m for given values of n and m.
Example 1:
Input:
a = 3, b = 3, c = 3, n = 3, m = 5
Output:
4
Explanation:
G(3) = 3*G(2) + 3*G(1) + 3 = 9%5 = 4
Ex... | [
{
"code": null,
"e": 442,
"s": 238,
"text": "Consider the generalized Fibonacci number G, which is dependent on a, b and c as follows :-\nG(1) = 1, G(2) = 1. G(n) = aG(n-1) + bG(n-2) + c.\nYour task is to calculate G(n)%m for given values of n and m."
},
{
"code": null,
"e": 455,
"s"... |
C++ Memory Library - shared_ptr | It is an instrumental class and allows certain conversions that allow auto_ptr objects to be passed to and returned from functions.
Following is the declaration for std::shared_ptr function.
template <class T> class shared_ptr;
template <class T> class shared_ptr;
T β It is a managed object.
Print
Add Notes
Bookmark... | [
{
"code": null,
"e": 2735,
"s": 2603,
"text": "It is an instrumental class and allows certain conversions that allow auto_ptr objects to be passed to and returned from functions."
},
{
"code": null,
"e": 2794,
"s": 2735,
"text": "Following is the declaration for std::shared_ptr f... |
click() element method - Selenium Python - GeeksforGeeks | 27 Apr, 2020
Seleniumβs Python Module is built to perform automated testing with Python. Selenium Python bindings provides a simple API to write functional/acceptance tests using Selenium WebDriver. To open a webpage using Selenium Python, checkout β Navigating links using get method β Selenium Python. Just being able ... | [
{
"code": null,
"e": 24620,
"s": 24592,
"text": "\n27 Apr, 2020"
},
{
"code": null,
"e": 25177,
"s": 24620,
"text": "Seleniumβs Python Module is built to perform automated testing with Python. Selenium Python bindings provides a simple API to write functional/acceptance tests usi... |
How to Kill a Process by Name in Linux? | This article shows you how to use the Linux pkill command to kill running processes within Linux by using a name. Pkill (see pgrep) is a command-line utility while Solaris 7 process is running. pkill works on a currently active running process and lists down process IDβs which matches with the criteria.
To kill a proce... | [
{
"code": null,
"e": 1367,
"s": 1062,
"text": "This article shows you how to use the Linux pkill command to kill running processes within Linux by using a name. Pkill (see pgrep) is a command-line utility while Solaris 7 process is running. pkill works on a currently active running process and lists... |
JqueryUI - Button | jQueryUI provides button() method to transform the HTML elements (like buttons, inputs and anchors) into themeable buttons, with automatic management of mouse movements on them, all managed transparently by jQuery UI.
In order to group radio buttons, Button also provides an additional widget, called Buttonset. Buttonse... | [
{
"code": null,
"e": 2482,
"s": 2264,
"text": "jQueryUI provides button() method to transform the HTML elements (like buttons, inputs and anchors) into themeable buttons, with automatic management of mouse movements on them, all managed transparently by jQuery UI."
},
{
"code": null,
"e"... |
Python pass Statement | It is used when a statement is required syntactically but you do not want any command or code to execute.
The pass statement is a null operation; nothing happens when it executes. The pass is also useful in places where your code will eventually go, but has not been written yet (e.g., in stubs for example) β
pass
#!/u... | [
{
"code": null,
"e": 2350,
"s": 2244,
"text": "It is used when a statement is required syntactically but you do not want any command or code to execute."
},
{
"code": null,
"e": 2554,
"s": 2350,
"text": "The pass statement is a null operation; nothing happens when it executes. Th... |
Differences between Interface and Class in Java - GeeksforGeeks | 13 Jul, 2021
This article highlights the differences between a class and an interface in Java. They seem syntactically similar, both containing methods and variables, but they are different in many aspects.Class:A class is a user-defined blueprint or prototype from which objects are created. It represents the set of p... | [
{
"code": null,
"e": 24424,
"s": 24396,
"text": "\n13 Jul, 2021"
},
{
"code": null,
"e": 24869,
"s": 24424,
"text": "This article highlights the differences between a class and an interface in Java. They seem syntactically similar, both containing methods and variables, but they ... |
Data Analytics in E-Commerce Retail | Towards Data Science | βΆ
I recently helped Colgate-Palmolive optimize the product strategy for its online catalog on Amazon. I applied data science methods to forecast the e-commerce sales, predict the profitability of the products at a granular level, and optimize the profit of the firm. And finally, the project achieved buy-in for operatio... | [
{
"code": null,
"e": 173,
"s": 171,
"text": "βΆ"
},
{
"code": null,
"e": 555,
"s": 173,
"text": "I recently helped Colgate-Palmolive optimize the product strategy for its online catalog on Amazon. I applied data science methods to forecast the e-commerce sales, predict the profita... |
Java Enums | An enum is a special "class" that represents a group of
constants (unchangeable variables, like final variables).
To create an enum, use the enum keyword (instead of class or interface), and separate
the constants with a comma. Note that they should be in uppercase letters:
enum Level {
LOW,
MEDIUM,
HIGH
}
You... | [
{
"code": null,
"e": 115,
"s": 0,
"text": "An enum is a special \"class\" that represents a group of \nconstants (unchangeable variables, like final variables)."
},
{
"code": null,
"e": 277,
"s": 115,
"text": "To create an enum, use the enum keyword (instead of class or interface... |
Lagrangeβs Interpolation in C++ | In this tutorial, we are going to write a program that finds the result for lagranges's interpolation formula.
You don't have write any logic for the program. Just convert the formula into code. Let's see the code.
Live Demo
#include<bits/stdc++.h>
using namespace std;
struct Data {
int x, y;
};
double interpolate(... | [
{
"code": null,
"e": 1173,
"s": 1062,
"text": "In this tutorial, we are going to write a program that finds the result for lagranges's interpolation formula."
},
{
"code": null,
"e": 1277,
"s": 1173,
"text": "You don't have write any logic for the program. Just convert the formul... |
Preventing Directory Traversal Vulnerability - GeeksforGeeks | 18 Oct, 2021
Directory Traversal is a vulnerability that allows attackers to access files that are present outside the root directory or outside the home directory of that web server. The root directory has some internal files which are not accessible by the user. This vulnerability can be found in web servers or web a... | [
{
"code": null,
"e": 25755,
"s": 25727,
"text": "\n18 Oct, 2021"
},
{
"code": null,
"e": 26141,
"s": 25755,
"text": "Directory Traversal is a vulnerability that allows attackers to access files that are present outside the root directory or outside the home directory of that web ... |
GATE | GATE CS 1997 | Question 49 - GeeksforGeeks | 22 Apr, 2020
For a database relation R(a,b,c,d), where the domains a, b, c, d include only atomic values, only the following functional dependencies and those that can be inferred from them hold:
{ a β c, b β d }
This relation is(A) in first normal form but not in second normal form(B) in second normal form but not in... | [
{
"code": null,
"e": 25719,
"s": 25691,
"text": "\n22 Apr, 2020"
},
{
"code": null,
"e": 25902,
"s": 25719,
"text": "For a database relation R(a,b,c,d), where the domains a, b, c, d include only atomic values, only the following functional dependencies and those that can be infer... |
Ordered Set and GNU C++ PBDS - GeeksforGeeks | 19 Nov, 2019
Prerequisite :Basic knowledge of STL and Sets Data structure.
About ordered set
Ordered set is a policy based data structure in g++ that keeps the unique elements in sorted order. It performs all the operations as performed by the set data structure in STL in log(n) complexity and performs two additional o... | [
{
"code": null,
"e": 25855,
"s": 25827,
"text": "\n19 Nov, 2019"
},
{
"code": null,
"e": 25917,
"s": 25855,
"text": "Prerequisite :Basic knowledge of STL and Sets Data structure."
},
{
"code": null,
"e": 25935,
"s": 25917,
"text": "About ordered set"
},
{
... |
Python - Change Keys Case in Dictionary - GeeksforGeeks | 10 May, 2020
Sometimes, while working with Python dictionaries, we can have a problem in which we need to perform manipulation of cases of keys. This can have possible application in many domains including school programming and data domains. Lets discuss a way to solve this task.
Input : test_dict = {βGfgβ : {βaβ : 5,... | [
{
"code": null,
"e": 25537,
"s": 25509,
"text": "\n10 May, 2020"
},
{
"code": null,
"e": 25806,
"s": 25537,
"text": "Sometimes, while working with Python dictionaries, we can have a problem in which we need to perform manipulation of cases of keys. This can have possible applicat... |
Minimum palindromic subarray removals to make array Empty - GeeksforGeeks | 11 Nov, 2021
Given an array arr[] consisting of N elements, the task is to find the minimum palindromic subarray removals required to remove all elements from the array.Examples:
Input: arr[] = {1, 3, 4, 1, 5}, N = 5 Output: 3 Explanation: Removal of 4 from the array leaves {1, 3, 1, 5}. Removal of {1, 3, 1} leaves {... | [
{
"code": null,
"e": 26065,
"s": 26037,
"text": "\n11 Nov, 2021"
},
{
"code": null,
"e": 26233,
"s": 26065,
"text": "Given an array arr[] consisting of N elements, the task is to find the minimum palindromic subarray removals required to remove all elements from the array.Example... |
Python | Pandas Series.str.match() - GeeksforGeeks | 27 Mar, 2019
Series.str can be used to access the values of the series as strings and apply several methods to it. Pandas Series.str.match() function is used to determine if each string in the underlying data of the given series object matches a regular expression.
Syntax: Series.str.match(pat, case=True, flags=0, na=n... | [
{
"code": null,
"e": 25537,
"s": 25509,
"text": "\n27 Mar, 2019"
},
{
"code": null,
"e": 25790,
"s": 25537,
"text": "Series.str can be used to access the values of the series as strings and apply several methods to it. Pandas Series.str.match() function is used to determine if ea... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.