fix: spelling errors (#265)
This commit is contained in:
committed by
Mrugesh Mohapatra
parent
ce8b08623e
commit
e32cc56411
@ -1,6 +1,6 @@
|
||||
import { createAction, handleActions } from 'redux-actions';
|
||||
|
||||
import { createTypes } from '../../../../utils/stateManagment';
|
||||
import { createTypes } from '../../../../utils/stateManagement';
|
||||
|
||||
const ns = 'map';
|
||||
|
||||
|
@ -7,7 +7,7 @@ superBlock: APIs and Microservices
|
||||
|
||||
MongoDB is a database that stores data records (documents) for use by an application. Mongo is a non-relational, "NoSQL" database. This means Mongo stores all data associated within one record, instead of storing it across many preset tables as in a SQL database. Some benefits of this storage model are:
|
||||
|
||||
- Scalability: by default, non-relational databases are split (or "sharded") across many systems instead of only one. This makes it easier to improve performance at a lower cost.
|
||||
- Scalability: by default, non-relational databases are split (or "shared") across many systems instead of only one. This makes it easier to improve performance at a lower cost.
|
||||
- Flexibility: new datasets and properties can be added to a document without the need to make a new table for that data.
|
||||
- Replication: copies of the database run in parallel so if one goes down, one of the copies becomes the new primary data source.
|
||||
|
||||
@ -15,7 +15,7 @@ While there are many non-relational databases, Mongo's use of JSON as its docume
|
||||
|
||||
Mongoose.js is an npm module for Node.js that allows you to write objects for Mongo as you would in JavaScript. This can make is easier to construct documents for storage in Mongo.
|
||||
|
||||
Working on these challenges will involve you writing your code on Glitch on our starter project. After completing each challenge you can copy your public glitch url (to the homepage of your app) into the challenge screen to test it! Optionally you may choose to write your project on another platform but it must be publicaly visible for our testing.
|
||||
Working on these challenges will involve you writing your code on Glitch on our starter project. After completing each challenge you can copy your public glitch url (to the homepage of your app) into the challenge screen to test it! Optionally you may choose to write your project on another platform but it must be publicly visible for our testing.
|
||||
|
||||
Start this project on Glitch using [this link](https://glitch.com/#!/import/github/freeCodeCamp/boilerplate-mongomongoose/) or clone [this repository](https://github.com/freeCodeCamp/boilerplate-mongomongoose/) on GitHub! If you use Glitch, remember to save the link to your project somewhere safe!
|
||||
|
||||
|
@ -7,5 +7,5 @@ superBlock: Information Security and Quality Assurance
|
||||
|
||||
*Authentication* is the process or action of verifying the identity of a user or process. Up to this point you have not been able to create an app utilizing this key concept.
|
||||
|
||||
The most common and easiest to use authentication middleware for Node.js is [Passport](http://passportjs.org/). It is easy to learn, light-weight, and extremely flexible allowing for many *strategies*, which we will talk about in later challenges. In addition to authentication we will also look at template engines which allow for use of *Pug* and web sockets which allow for real time communication between all your clients and your server. Working on these challenges will involve you writing your code on Glitch on our starter project. After completing each challenge you can copy your public glitch url (to the homepage of your app) into the challenge screen to test it! Optionally you may choose to write your project on another platform but it must be publicaly visible for our testing.
|
||||
The most common and easiest to use authentication middleware for Node.js is [Passport](http://passportjs.org/). It is easy to learn, light-weight, and extremely flexible allowing for many *strategies*, which we will talk about in later challenges. In addition to authentication we will also look at template engines which allow for use of *Pug* and web sockets which allow for real time communication between all your clients and your server. Working on these challenges will involve you writing your code on Glitch on our starter project. After completing each challenge you can copy your public glitch url (to the homepage of your app) into the challenge screen to test it! Optionally you may choose to write your project on another platform but it must be publicly visible for our testing.
|
||||
Start this project on Glitch using [this link](https://glitch.com/#!/import/github/freeCodeCamp/boilerplate-advancednode/) or clone [this repository](https://github.com/freeCodeCamp/boilerplate-advancednode/) on GitHub! If you use Glitch, remember to save the link to your project somewhere safe
|
@ -7,6 +7,6 @@ superBlock: Information Security and Quality Assurance
|
||||
|
||||
As your programs become more complex, you need to test them often to make sure any new code you add doesn't break the program's original functionality. Chai is a JavaScript testing library that helps you check that your program still behaves the way you expect it to after you make changes. Using Chai, you can write tests that describe your program's requirements and see if your program meets them.
|
||||
|
||||
Working on these challenges will involve you writing your code on Glitch on our starter project. After completing each challenge you can copy your public glitch url (to the homepage of your app) into the challenge screen to test it! Optionally you may choose to write your project on another platform but it must be publicaly visible for our testing.
|
||||
Working on these challenges will involve you writing your code on Glitch on our starter project. After completing each challenge you can copy your public glitch url (to the homepage of your app) into the challenge screen to test it! Optionally you may choose to write your project on another platform but it must be publicly visible for our testing.
|
||||
|
||||
Start this project on Glitch using [this link](https://glitch.com/#!/import/github/freeCodeCamp/boilerplate-mochachai/) or clone [this repository](https://github.com/freeCodeCamp/boilerplate-mochachai/) on GitHub! If you use Glitch, remember to save the link to your project somewhere safe!
|
@ -6,6 +6,6 @@ superBlock: JavaScript Algorithms and Data Structures
|
||||
## Introduction to the Debugging Challenges
|
||||
|
||||
Debugging is a valuable and (unfortunately) necessary tool for programmers. It follows the testing phase of checking if your code works as intended, and discovering it does not. Debugging is the process of finding exactly what isn't working and fixing it.
|
||||
After spending time creating a brilliant block of code, it is tough realizing it may have errors. These issues generally come in three forms: 1) syntax errors that prevent a program from running, 2) runtime errors when code fails to execute or has unexpected behavior, and 3) semantic (or logical) errors when code doesn't do what it's meant to.<br><br>Modern code editors (and experience) can help identify syntax errors. Semantic and runtime errors are harder to find. They may cause your program to crash, make it run forever, or give incorrect output. Think of debugging as trying to understand why your code is behaving the way it is.<br><br>Example of a syntax error - often detected by the code editor:<br><br><blockquote>funtion willNotWork( {<br> console.log("Yuck");<br>}<br>// "function" keyword is misspelled and there's a missing parenthesis</blockquote><br><br>Here's an example of a runtime error - often detected while the program executes:<br><br><blockquote>function loopy() {<br> while(true) {<br> console.log("Hello, world!");<br> }<br>}<br>// Calling loopy starts an infinite loop, which may crash your browser</blockquote><br><br>Example of a semantic error - often detected after testing code output:<br><br><blockquote>function calcAreaOfRect(w, h) {<br> return w + h; // This should be w * h<br>}<br>let myRectArea = calcAreaOfRect(2, 3);<br>// Correct syntax and the program executes, but this gives the wrong answer</blockquote>
|
||||
After spending time creating a brilliant block of code, it is tough realizing it may have errors. These issues generally come in three forms: 1) syntax errors that prevent a program from running, 2) runtime errors when code fails to execute or has unexpected behavior, and 3) semantic (or logical) errors when code doesn't do what it's meant to.<br><br>Modern code editors (and experience) can help identify syntax errors. Semantic and runtime errors are harder to find. They may cause your program to crash, make it run forever, or give incorrect output. Think of debugging as trying to understand why your code is behaving the way it is.<br><br>Example of a syntax error - often detected by the code editor:<br><br><blockquote>function willNotWork( {<br> console.log("Yuck");<br>}<br>// "function" keyword is misspelled and there's a missing parenthesis</blockquote><br><br>Here's an example of a runtime error - often detected while the program executes:<br><br><blockquote>function loopy() {<br> while(true) {<br> console.log("Hello, world!");<br> }<br>}<br>// Calling loopy starts an infinite loop, which may crash your browser</blockquote><br><br>Example of a semantic error - often detected after testing code output:<br><br><blockquote>function calcAreaOfRect(w, h) {<br> return w + h; // This should be w * h<br>}<br>let myRectArea = calcAreaOfRect(2, 3);<br>// Correct syntax and the program executes, but this gives the wrong answer</blockquote>
|
||||
Debugging is frustrating, but it helps to develop (and follow) a step-by-step approach to review your code. This means checking the intermediate values and types of variables to see if they are what they should be. You can start with a simple process of elimination.<br><br>For example, if function A works and returns what it's supposed to, then function B may have the issue. Or start checking values in a block of code from the middle to try to cut the search space in half. A problem in one spot indicates a bug in the first half of the code. If not, it's likely in the second.<br><br>This section will cover a couple helpful tools to find bugs, and some of the common forms they take. Fortunately, debugging is a learnable skill that just requires a little patience and practice to master.
|
||||
|
||||
|
@ -17,7 +17,7 @@ import {
|
||||
defaultIfEmpty,
|
||||
mapTo
|
||||
} from 'rxjs/operators';
|
||||
import { jwt } from '../cookieVaules';
|
||||
import { jwt } from '../cookieValues';
|
||||
|
||||
function fetchUserEpic(action$, _, { services }) {
|
||||
const fetchUser = action$.pipe(
|
||||
|
@ -1,14 +1,14 @@
|
||||
import { createAction, handleActions } from 'redux-actions';
|
||||
import { uniqBy } from 'lodash';
|
||||
|
||||
import { createTypes } from '../../../utils/stateManagment';
|
||||
import { createTypes } from '../../../utils/stateManagement';
|
||||
import { types as challenge } from '../../templates/Challenges/redux';
|
||||
import fecthUserEpic from './fetch-user-epic';
|
||||
import fetchUserEpic from './fetch-user-epic';
|
||||
import hardGoToEpic from './hard-go-to-epic';
|
||||
|
||||
const ns = 'app';
|
||||
|
||||
export const epics = [fecthUserEpic, hardGoToEpic];
|
||||
export const epics = [fetchUserEpic, hardGoToEpic];
|
||||
|
||||
export const types = createTypes(
|
||||
[
|
||||
|
@ -16,7 +16,7 @@ import {
|
||||
} from '../templates/Challenges/redux';
|
||||
import { reducer as map } from '../components/Map/redux';
|
||||
import servicesCreator from './createServices';
|
||||
import { _csrf } from './cookieVaules';
|
||||
import { _csrf } from './cookieValues';
|
||||
|
||||
const serviceOptions = {
|
||||
context: _csrf ? { _csrf } : {},
|
||||
|
@ -12,11 +12,11 @@ import {
|
||||
import { ofType } from 'redux-observable';
|
||||
import { navigate } from 'gatsby';
|
||||
|
||||
import { _csrf as csrfToken } from '../../../redux/cookieVaules';
|
||||
import { _csrf as csrfToken } from '../../../redux/cookieValues';
|
||||
|
||||
import {
|
||||
backendFormValuesSelector,
|
||||
projectFormVaulesSelector,
|
||||
projectFormValuesSelector,
|
||||
submitComplete,
|
||||
types,
|
||||
challengeMetaSelector,
|
||||
@ -84,7 +84,7 @@ function submitProject(type, state) {
|
||||
return empty();
|
||||
}
|
||||
|
||||
const { solution, githubLink } = projectFormVaulesSelector(state);
|
||||
const { solution, githubLink } = projectFormValuesSelector(state);
|
||||
const { id, challengeType } = challengeMetaSelector(state);
|
||||
const { username } = userSelector(state);
|
||||
const challengeInfo = { id, challengeType, solution };
|
||||
|
@ -7,7 +7,7 @@ import {
|
||||
currentChallengeIdSelector
|
||||
} from '../../../redux/app';
|
||||
import { postJSON$ } from '../utils/ajax-stream';
|
||||
import { _csrf } from '../../../redux/cookieVaules';
|
||||
import { _csrf } from '../../../redux/cookieValues';
|
||||
import { of } from 'rxjs/observable/of';
|
||||
|
||||
function currentChallengeEpic(action$, { getState }) {
|
||||
|
@ -1,8 +1,7 @@
|
||||
import { createAction, handleActions } from 'redux-actions';
|
||||
|
||||
import { reducer as reduxFormReducer } from 'redux-form';
|
||||
|
||||
import { createTypes } from '../../../../utils/stateManagment';
|
||||
import { createTypes } from '../../../../utils/stateManagement';
|
||||
import { createPoly } from '../utils/polyvinyl';
|
||||
import challengeModalEpic from './challenge-modal-epic';
|
||||
import completionEpic from './completion-epic';
|
||||
@ -31,7 +30,7 @@ const initialState = {
|
||||
video: false,
|
||||
reset: false
|
||||
},
|
||||
projectFormVaules: {},
|
||||
projectFormValues: {},
|
||||
successMessage: 'Happy Coding!'
|
||||
};
|
||||
|
||||
@ -145,8 +144,8 @@ export const isJSEnabledSelector = state => state[ns].isJSEnabled;
|
||||
export const successMessageSelector = state => state[ns].successMessage;
|
||||
|
||||
export const backendFormValuesSelector = state => state.form[backendNS];
|
||||
export const projectFormVaulesSelector = state =>
|
||||
state[ns].projectFormVaules || {};
|
||||
export const projectFormValuesSelector = state =>
|
||||
state[ns].projectFormValues || {};
|
||||
|
||||
export const reducer = handleActions(
|
||||
{
|
||||
@ -231,7 +230,7 @@ export const reducer = handleActions(
|
||||
}),
|
||||
[types.updateProjectFormValues]: (state, { payload }) => ({
|
||||
...state,
|
||||
projectFormVaules: payload
|
||||
projectFormValues: payload
|
||||
}),
|
||||
|
||||
[types.lockCode]: state => ({
|
||||
|
@ -19,7 +19,7 @@ export function _fetchScript({
|
||||
const script = ajax$({ url, crossDomain })
|
||||
.do(res => {
|
||||
if (res.status !== 200) {
|
||||
throw new Error('Request errror: ' + res.status);
|
||||
throw new Error('Request error: ' + res.status);
|
||||
}
|
||||
})
|
||||
.map(({ response }) => response)
|
||||
|
Reference in New Issue
Block a user