001 - Multiples of 3 and 5 - Project Euler Challenge - JavaScript freeCodeCamp
If we list all the natural numbers below 10 that are multiples of 3 or 5, we get 3, 5, 6 and 9. The sum of these multiples is 23. Find the sum of all the multiples of 3 or 5 below the provided parameter value number.
00:00 - Introduction 01:32 - Working 06:00 - Solution
-————————————————————————————————————- Project Euler (named after Leonhard Euler) is a website dedicated to a series of computational problems intended to be solved with computer programs. The project attracts adults and students interested in mathematics and computer programming. Since its creation in 2001 by Colin Hughes, Project Euler has gained notability and popularity worldwide. It includes over 700 problems, with a new one added once every one or two weeks. Problems are of varying difficulty, but each is solvable in less than a minute of CPU time using an efficient algorithm on a modestly powered computer. As of 5 April 2020, Project Euler has more than 1,000,000 users, from all over the world, who have solved at least one problem.
NOTE: I am not a teacher by any means, these videos are just to help me improve my understanding.
This is a full walkthrough for the File Metadata Microservice project on freeCodeCamp. We can install an npm package called multer to grab files from file upload inputs. We do this by mounting multer's single() method as a middleware for the POST request on the form.
Link to Project : https://www.freecodecamp.org/learn/apis-and-microservices/apis-and-microservices-projects/file-metadata-microservice
Written Guide and Source Code : https://www.notion.so/ganeshh123/File-Metadata-Microservice-961a61693f7944808af6bbfa09a32961
Timestamps:
0:00 - Project Setup
01:42 - Install and Set Up Multer
03:22 - Set up the File Upload POST route
09:10 - Styling and Final Touches
-————————————————————————————————————-
Node.js is an open-source, cross-platform, JavaScript runtime environment that executes JavaScript code outside a web browser. Node.js lets developers use JavaScript to write command line tools and for server-side scripting—running scripts server-side to produce dynamic web page content before the page is sent to the user's web browser.
The Node Package Manager (npm) is a command-line tool used by developers to share and control modules (or packages) of JavaScript code written for use with Node.js.
Express.js, or simply Express, is a web application framework for Node.js. It is designed for building web applications and APIs. It has been called the de facto standard server framework for Node.js. Express runs between the server created by Node.js and the frontend pages of a web application. Express also handles an application's routing.
MongoDB is a cross-platform document-oriented database program. Classified as a NoSQL database program, MongoDB uses JSON-like documents with optional schemas. MongoDB is developed by MongoDB Inc. and licensed under the Server Side Public License (SSPL).
Mongoose is an Object Data Modeling (ODM) library for MongoDB and Node.js. It manages relationships between data, provides schema validation, and is used to translate between objects in code and the representation of those objects in MongoDB.
freeCodeCamp (also referred to as “Free Code Camp”) is a non-profit organization that consists of an interactive learning web platform, an online community forum, chat rooms, online publications and local organizations that intend to make learning web development accessible to anyone. Beginning with tutorials that introduce students to HTML, CSS and JavaScript, students progress to project assignments that they complete either alone or in pairs. Upon completion of all project tasks, students are partnered with other nonprofits to build web applications, giving the students practical development experience.
Thanks for Watching!
...
https://www.youtube.com/watch?v=rqV7lRPPSL4
To be able to log in users using a username and password, we have to set up a 'strategy' so that we can use these details to authenticate and obtain the user's information.
Link to Challenge : https://www.freecodecamp.org/learn/quality-assurance/advanced-node-and-express/authentication-strategies
Written Guide: https://www.notion.so/ganeshh123/Authentication-Strategies-85cf3fac514f478d802b76da23858dbe
Full Playlist for this course : https://www.youtube.com/playlist?list=PLhGp6N0DI_1RL9djhgSH65pZhJ6xSyKX8
All Writen Guides for this course : https://www.notion.so/ganeshh123/ccf6039186334f83a54c1c9216f30e3c
All My Tutorials can be found at : https://www.notion.so/Tutorials-Ganesh-H-293ea420d34a464f9a1907e0405b5f26
00:00 - Introduction
00:18 - Installing passport-local
01:18 - Creating a Local Strategy
02:02 - Getting the User's Document from the Database - db.collection.findOne()
Returns one document that satisfies the specified query criteria on the collection or view. If multiple documents satisfy the query, this method returns the first document according to the natural order which reflects the order of documents on the disk.
https://docs.mongodb.com/manual/reference/method/db.collection.findOne/
06:02 - Making Passport Use the Strategy - passport.use()
Configure a strategy. Strategies have a "default name" assigned to them, so you don't have to give them a name.
https://github.com/jwalton/passport-api-docs#passportusestrategyname-strategy
07:00 - Challenge Solution
-————————————————————————————————————-
Node.js is an open-source, cross-platform, JavaScript runtime environment that executes JavaScript code outside a web browser. Node.js lets developers use JavaScript to write command line tools and for server-side scripting—running scripts server-side to produce dynamic web page content before the page is sent to the user's web browser.
Express.js, or simply Express, is a web application framework for Node.js. It is designed for building web applications and APIs. It has been called the de facto standard server framework for Node.js. Express runs between the server created by Node.js and the frontend pages of a web application. Express also handles an application's routing.
freeCodeCamp (also referred to as “Free Code Camp”) is a non-profit organization that consists of an interactive learning web platform, an online community forum, chat rooms, online publications and local organizations that intend to make learning web development accessible to anyone. Beginning with tutorials that introduce students to HTML, CSS and JavaScript, students progress to project assignments that they complete either alone or in pairs. Upon completion of all project tasks, students are p
...
https://www.youtube.com/watch?v=fA36I8CYFf0
Now that we've written our Serialize/Deserialize functions, the next step is to connect up the database to make them work!
Link to Challenge : https://www.freecodecamp.org/learn/quality-assurance/advanced-node-and-express/implement-the-serialization-of-a-passport-user
Written Guide: https://www.notion.so/ganeshh123/Implement-the-Serialization-of-a-Passport-User-acbb175c91434f3c831583a9d7fd0fa3
Full Playlist for this course : https://www.youtube.com/playlist?list=PLhGp6N0DI_1RL9djhgSH65pZhJ6xSyKX8
All Writen Guides for this course : https://www.notion.so/ganeshh123/ccf6039186334f83a54c1c9216f30e3c
All My Tutorials can be found at : https://www.notion.so/Tutorials-Ganesh-H-293ea420d34a464f9a1907e0405b5f26
00:00 - Introduction
00:08 - Creating a database on MongoDB Atlas
01:00 - Getting the Connection URI
02:05 - Importing the MongoDB Javascript Client
02:34 - Connecting to the Database - mongodb.connect()
Creates a connection to a MongoDB instance and returns the reference to the database.
https://docs.mongodb.com/manual/reference/method/connect/
03:45 - Order of Code Flow
05:12 - Challenge Solution
-————————————————————————————————————-
Node.js is an open-source, cross-platform, JavaScript runtime environment that executes JavaScript code outside a web browser. Node.js lets developers use JavaScript to write command line tools and for server-side scripting—running scripts server-side to produce dynamic web page content before the page is sent to the user's web browser.
Express.js, or simply Express, is a web application framework for Node.js. It is designed for building web applications and APIs. It has been called the de facto standard server framework for Node.js. Express runs between the server created by Node.js and the frontend pages of a web application. Express also handles an application's routing.
freeCodeCamp (also referred to as “Free Code Camp”) is a non-profit organization that consists of an interactive learning web platform, an online community forum, chat rooms, online publications and local organizations that intend to make learning web development accessible to anyone. Beginning with tutorials that introduce students to HTML, CSS and JavaScript, students progress to project assignments that they complete either alone or in pairs. Upon completion of all project tasks, students are partnered with other nonprofits to build web applications, giving the students practical development experience.
freeCodeCamp (also referred to as “Free Code Camp”) is a non-profit organization that consists of an interactive learning web platform, an online community forum, chat rooms, online publications and local organizations that intend to make learning web develo
...
https://www.youtube.com/watch?v=uk0DjTKdlMg
Since hashing is so computationally expensive, we should use async methods with callback functions to not block connections while they are taking place. bcrypt methods are async by default, and we can provide a callback function to continue after completion.
Link to Challenge : https://www.freecodecamp.org/learn/information-security/information-security-with-helmetjs/hash-and-compare-passwords-asynchronously
Written Guide: https://www.notion.so/ganeshh123/Hash-and-Compare-Passwords-Asynchronously-2389ec5d63bb47a5af1f277232ffd4fc
Full Playlist for this course : https://www.youtube.com/playlist?list=PLhGp6N0DI_1TeEsQOdf1JmV8PnkQfEpQ4
All Writen Guides for this course : https://www.notion.so/ganeshh123/8ba82d9d1ff84c4583d6e9418ebe426b
All My Tutorials can be found at : https://www.notion.so/Tutorials-Ganesh-H-293ea420d34a464f9a1907e0405b5f26
00:00 - Introduction
00:16 - Why we should hash asynchronously
00:37 - Hashing Asynchronously - bcrypt.hash()
Generates a hash for the given input with the number of rounds, or salt specified. Runs asynchronously, and the callback function provided is executed after with the result.
https://www.npmjs.com/package/bcrypt#to-hash-a-password
03:10 - Check a password Asynchronously - bcrypt.compare()
Checks that the given hash (second argument) is valid for the given input (first argument). The number of salt rounds can be obtained from the hash. Runs asynchronously, and the callback function provided is executed after with the result.
https://www.npmjs.com/package/bcrypt#to-check-a-password
05:35 - Challenge Solution
-————————————————————————————————————-
HelmetJS is a type of middleware for Express-based applications that automatically sets HTTP headers to prevent sensitive information from unintentionally being passed between the server and client. While HelmetJS does not account for all situations, it does include support for common ones like Content Security Policy, XSS Filtering, and HTTP Strict Transport Security, among others. HelmetJS can be installed on an Express project from npm, after which each layer of protection can be configured to best fit the project.
freeCodeCamp (also referred to as “Free Code Camp”) is a non-profit organization that consists of an interactive learning web platform, an online community forum, chat rooms, online publications and local organizations that intend to make learning web development accessible to anyone. Beginning with tutorials that introduce students to HTML, CSS and JavaScript, students progress to project assignments that they complete either alone or in pairs. Upon completion of all project tasks, students are partnered with other nonprofits to build web applications, giving the students pr
...
https://www.youtube.com/watch?v=vNfXPf-Ey8U
A Pythagorean triplet is a set of three natural numbers, a less than b less than c, for which, a^2 + b^2 = c^2. There exists exactly one Pythagorean triplet for which a + b + c = 1000. Find the product abc such that a + b + c = n.
Link to Challenge : https://www.freecodecamp.org/learn/coding-interview-prep/project-euler/problem-9-special-pythagorean-triplet
Written Guide and Source Code : https://www.notion.so/ganeshh123/Special-Pythagorean-triplet-b1df186a5c6a4e7f8e9def5a74085f82
Full Playlist: https://www.youtube.com/playlist?list=PLhGp6N0DI_1RQjG0wIOi2afjuh9iIeHU6
Project Euler Written Guides : https://www.notion.so/ganeshh123/62598b647b6040f88843b33b46faa309
All My Tutorials can be found at : https://www.notion.so/Tutorials-Ganesh-H-293ea420d34a464f9a1907e0405b5f26
00:00 - Introduction
02:06 - Working
10:55 - Solution
-————————————————————————————————————-
Project Euler (named after Leonhard Euler) is a website dedicated to a series of computational problems intended to be solved with computer programs. The project attracts adults and students interested in mathematics and computer programming. Since its creation in 2001 by Colin Hughes, Project Euler has gained notability and popularity worldwide. It includes over 700 problems, with a new one added once every one or two weeks. Problems are of varying difficulty, but each is solvable in less than a minute of CPU time using an efficient algorithm on a modestly powered computer. As of 5 April 2020, Project Euler has more than 1,000,000 users, from all over the world, who have solved at least one problem.
NOTE: I am not a teacher by any means, these videos are just to help me improve my understanding.
Thanks for Watching!
...
https://www.youtube.com/watch?v=dZJ0coRKxEI
Linear Scales allow us to scale our SVG elements. This maintains the proportions of the graph and re-scales it when the dimensions of our areas, or our array values change. You specify a domain (range of inputs) and a range (range of outputs). The scale can then be called as a method to return a value mapped in correct range in a given domain.
Link to challenge : https://www.freecodecamp.org/learn/data-visualization/data-visualization-with-d3/create-a-linear-scale-with-d3
Concepts:
d3.scaleLinear([[domain, ]range])
Constructs a new continuous scale with the specified domain and range, the default interpolator and clamping disabled. If either domain or range are not specified, each defaults to [0, 1]. Linear scales are a good default choice for continuous quantitative data because they preserve proportional differences. Each range value y can be expressed as a function of the domain value x: y = mx + b.
https://github.com/d3/d3-scale#linear-scales
continuous.domain([domain])
If domain is specified, sets the scale’s domain to the specified array of numbers. The array must contain two or more elements. If the elements in the given array are not numbers, they will be coerced to numbers. If domain is not specified, returns a copy of the scale’s current domain.
https://github.com/d3/d3-scale#continuous_domain
continuous.range([range])
If range is specified, sets the scale’s range to the specified array of values. The array must contain two or more elements. Unlike the domain, elements in the given array need not be numbers; any value that is supported by the underlying interpolator will work, though note that numeric ranges are required for invert. If range is not specified, returns a copy of the scale’s current range. See continuous.interpolate for more examples.
https://github.com/d3/d3-scale#continuous_range
-————————————————————————————————————-
D3.js (also known as D3, short for Data-Driven Documents) is a JavaScript library for producing dynamic, interactive data visualizations in web browsers. It makes use of Scalable Vector Graphics (SVG), HTML5, and Cascading Style Sheets (CSS) standards.
freeCodeCamp (also referred to as “Free Code Camp”) is a non-profit organization that consists of an interactive learning web platform, an online community forum, chat rooms, online publications and local organizations that intend to make learning web development accessible to anyone. Beginning with tutorials that introduce students to HTML, CSS and JavaScript, students progress to project assignments that they complete either alone or in pairs. Upon completion of all project tasks, students are partnered with other nonprofits to build web applications, giving the students pr
...
https://www.youtube.com/watch?v=fm-gsMmAwB4
IMPORTANT: You must use Helmet version 3.2.0 to pass this test!
We can protect our sites against protocol downgrate attacks by setting a header, which outright denies connections not seccured through HTTPS.
Link to Challenge : https://www.freecodecamp.org/learn/information-security/information-security-with-helmetjs/ask-browsers-to-access-your-site-via-https-only-with-helmet-hsts
Written Guide: https://www.notion.so/ganeshh123/Ask-Browsers-to-Access-Your-Site-via-HTTPS-Only-with-helmet-hsts-ebdf3136256344bcb037ff021384dcea
Full Playlist for this course : https://www.youtube.com/playlist?list=PLhGp6N0DI_1TeEsQOdf1JmV8PnkQfEpQ4
All Writen Guides for this course : https://www.notion.so/ganeshh123/8ba82d9d1ff84c4583d6e9418ebe426b
All My Tutorials can be found at : https://www.notion.so/Tutorials-Ganesh-H-293ea420d34a464f9a1907e0405b5f26
00:00 - Introduction
00:03 - Protocol Downgrade Attack
A downgrade attack or version rollback attack is a form of cryptographic attack on a computer system or communications protocol that makes it abandon a high-quality mode of operation (e.g. an encrypted connection) in favor of an older, lower-quality mode of operation (e.g. cleartext) that is typically provided for backward compatibility with older systems.
https://en.wikipedia.org/wiki/Downgrade_attack
00:16 - Example
02:07 - Strict-Transport-Security Header
The HTTP Strict-Transport-Security response header (often abbreviated as HSTS) lets a web site tell browsers that it should only be accessed using HTTPS, instead of using HTTP.
https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Strict-Transport-Security
02:35 - Use Helmet version 3.2.0
03:50 - Setting the Header - helmet.hsts()
helmet.hsts sets the Strict-Transport-Security header which tells browsers to prefer HTTPS over insecure HTTP.
https://github.com/helmetjs/helmet/tree/master/middlewares/strict-transport-security
05:23 - Testing
-————————————————————————————————————-
HelmetJS is a type of middleware for Express-based applications that automatically sets HTTP headers to prevent sensitive information from unintentionally being passed between the server and client. While HelmetJS does not account for all situations, it does include support for common ones like Content Security Policy, XSS Filtering, and HTTP Strict Transport Security, among others. HelmetJS can be installed on an Express project from npm, after which each layer of protection can be configured to best fit the project.
freeCodeCamp (also referred to as “Free Code Camp”) is a non-profit organization that consists of an interactive learning web platform, an online community forum, chat rooms, online publications and local organizations that intend to make learn
...
https://www.youtube.com/watch?v=rVtbNBte35s
To dynamically changed styles, we can use a function as the value argument in the style method, which can take in an item from the data set and return a value based on that.
Link to challenge : https://www.freecodecamp.org/learn/data-visualization/data-visualization-with-d3/change-styles-based-on-data
Concepts:
selection.style(name[, value[, priority]])
If a value is specified, sets the style property with the specified name to the specified value on the selected elements and returns this selection. If the value is a constant, then all elements are given the same style property value; otherwise, if the value is a function, it is evaluated for each selected element, in order, being passed the current datum (d), the current index (i), and the current group (nodes), with this as the current DOM element (nodes[i]). The function’s return value is then used to set each element’s style property. A null value will remove the style property. An optional priority may also be specified, either as null or the string important (without the exclamation point).
If a value is not specified, returns the current value of the specified style property for the first (non-null) element in the selection. The current value is defined as the element’s inline value, if present, and otherwise its computed value. Accessing the current style value is generally useful only if you know the selection contains exactly one element.
https://github.com/d3/d3-selection/blob/v1.4.1/README.md#selection_style
-————————————————————————————————————-
D3.js (also known as D3, short for Data-Driven Documents) is a JavaScript library for producing dynamic, interactive data visualizations in web browsers. It makes use of Scalable Vector Graphics (SVG), HTML5, and Cascading Style Sheets (CSS) standards.
freeCodeCamp (also referred to as “Free Code Camp”) is a non-profit organization that consists of an interactive learning web platform, an online community forum, chat rooms, online publications and local organizations that intend to make learning web development accessible to anyone. Beginning with tutorials that introduce students to HTML, CSS and JavaScript, students progress to project assignments that they complete either alone or in pairs. Upon completion of all project tasks, students are partnered with other nonprofits to build web applications, giving the students practical development experience.
Thanks for Watching!
...
https://www.youtube.com/watch?v=j1gm9-bXfbQ
Grand Theft Auto 5 Online is notorious for banning modded installations, and the only way to get a clean game is to reinstall or delete mod files individually. This tool allows you to clean your game of mods for GTA Online and then restore them for Single Player.
-----------------------------------------------------------------------------------------------
Links:
GTA 5 Cleaner Download: https://app.nesh.gq/gta5-cleaner/
-----------------------------------------------------------------------------------------------
Commands:
clean
restore
-----------------------------------------------------------------------------------------------
Music:
Spectre by Alan Walker - https://www.youtube.com/watch?v=AOeY-nDp7hI
---------------------------------------------------------------------------------------------
Grand Theft Auto V is a 2013 action-adventure game developed by Rockstar North and published by Rockstar Games. It is the first main entry in the Grand Theft Auto series since 2008's Grand Theft Auto IV. Set within the fictional state of San Andreas, based on Southern California, the single-player story follows three protagonists—retired bank robber Michael De Santa, street gangster Franklin Clinton, and drug dealer and arms smuggler Trevor Philips—and their efforts to commit heists while under pressure from a corrupt government agency and powerful crime figures. The open world design lets players freely roam San Andreas' open countryside and the fictional city of Los Santos, based on Los Angeles.
https://www.rockstargames.com/V/
---------------------------------------------------------------------------------------------
Thanks for Watching!
...
https://www.youtube.com/watch?v=zXaj4TfBQY8