From ceed3c4877fb1b85051d50990d188d840232675f Mon Sep 17 00:00:00 2001 From: benmcmahon100 Date: Wed, 5 Aug 2015 15:38:54 +0100 Subject: [PATCH 1/8] Fix some typos --- seed/challenges/basic-javascript.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/seed/challenges/basic-javascript.json b/seed/challenges/basic-javascript.json index ab30786d54..0325880343 100644 --- a/seed/challenges/basic-javascript.json +++ b/seed/challenges/basic-javascript.json @@ -601,7 +601,7 @@ ], "challengeSeed": [ "var myArray = ['John', 23, ['dog', 3]];", - "var removed = myArray;//This should be ['John'] and myArray should now be ['John', 23]", + "var removed = myArray;//This should be ['John'] and myArray should now be [23, ['dog', 3]]", "", "", "(function(y, z){return('myArray = ' + JSON.stringify(y) + ' & removed = ' + JSON.stringify(z));})(myArray, removed);" @@ -752,7 +752,7 @@ " \"friends\": []", "};", "", - "//Let's add the property age to myDog", + "//Let's add the property bark to myDog", "", "", "//Now delete the property tails", From e7cac3ccf9d9d34479ee03e5175e6847beb1191c Mon Sep 17 00:00:00 2001 From: benmcmahon100 Date: Wed, 5 Aug 2015 16:54:57 +0100 Subject: [PATCH 2/8] fix https://github.com/FreeCodeCamp/freecodecamp/issues/1559 --- seed/challenges/basic-javascript.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/seed/challenges/basic-javascript.json b/seed/challenges/basic-javascript.json index 0325880343..15397ea2f1 100644 --- a/seed/challenges/basic-javascript.json +++ b/seed/challenges/basic-javascript.json @@ -1027,7 +1027,7 @@ ], "tests":[ "assert(test === 2, 'Your RegEx should have found two numbers in the testString');", - "assert(editorValue.match(/\\/\\\\d\\+\\//gi), 'You should be using the following expression /\\d+/gi to find the numbers in the testString');" + "assert(editor.getValue().match(/\\/\\\\d\\+\\//gi), 'You should be using the following expression /\\d+/gi to find the numbers in the testString');" ], "challengeSeed":[ "var test = (function(){", @@ -1058,7 +1058,7 @@ ], "tests":[ "assert(test === 7, 'Your RegEx should have found seven spaces in the testString');", - "assert(editorValue.match(/\\/\\\\s\\+\\//gi), 'You should be using the following expression /\\s+/gi to find the spaces in the testString');" + "assert(editor.getValue().match(/\\/\\\\s\\+\\//gi), 'You should be using the following expression /\\s+/gi to find the spaces in the testString');" ], "challengeSeed":[ "var test = (function(){", @@ -1087,7 +1087,7 @@ ], "tests":[ "assert(test === 36, 'Your RegEx should have found seven spaces in the testString');", - "assert(editorValue.match(/\\/\\\\S\\/gi/gi), 'You should be using the following expression /\\S+/gi to find the spaces in the testString');" + "assert(editor.getValue().match(/\\/\\\\S\\/gi/gi), 'You should be using the following expression /\\S+/gi to find the spaces in the testString');" ], "challengeSeed":[ "var test = (function(){", From 91c7bce758987e02cf4e345fa9bb44bc318efaa9 Mon Sep 17 00:00:00 2001 From: benmcmahon100 Date: Wed, 5 Aug 2015 17:04:02 +0100 Subject: [PATCH 3/8] Font on submit buttons should be correct now --- public/css/main.less | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/public/css/main.less b/public/css/main.less index 7773265028..c828412661 100644 --- a/public/css/main.less +++ b/public/css/main.less @@ -1152,6 +1152,10 @@ hr { shape-rendering: crispEdges; } +#submitButton { + font: normal normal normal 14px/1 FontAwesome !important; +} + //uncomment this to see the dimensions of all elements outlined in red //* { // border-color: red; From 61c8eb15956607838972d2a41dc2d3c0769fad50 Mon Sep 17 00:00:00 2001 From: "Cristian V. Nica" Date: Wed, 5 Aug 2015 19:08:49 +0300 Subject: [PATCH 4/8] Trying to fix issue #1562 In Use Bracket Notation to Find the Nth to Last Character in a String: There is a mistake in the code sample: It should be: var thirdToLastLetterOfFirstName = firstName[firstName.length - 3]; but is: var thirdToLastLetterOfFirstName = firstName[firstName.length - 2]; --- seed/challenges/basic-javascript.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/seed/challenges/basic-javascript.json b/seed/challenges/basic-javascript.json index 0325880343..f03ada50f4 100644 --- a/seed/challenges/basic-javascript.json +++ b/seed/challenges/basic-javascript.json @@ -259,7 +259,7 @@ "challengeSeed": [ "var firstName = \"Madeline\";", "", - "var thirdToLastLetterOfFirstName = firstName[firstName.length - 2];", + "var thirdToLastLetterOfFirstName = firstName[firstName.length - 3];", "", "var lastName = \"Chen\";", "", From f68c6d0fa3f5ecc8bfe4f1a0b256b9374264dadd Mon Sep 17 00:00:00 2001 From: benmcmahon100 Date: Wed, 5 Aug 2015 17:31:42 +0100 Subject: [PATCH 5/8] Changed the object lessons to use dot notation instead of bracket Fix https://github.com/FreeCodeCamp/freecodecamp/issues/1564 --- seed/challenges/basic-javascript.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/seed/challenges/basic-javascript.json b/seed/challenges/basic-javascript.json index 15397ea2f1..84a02c37f1 100644 --- a/seed/challenges/basic-javascript.json +++ b/seed/challenges/basic-javascript.json @@ -259,7 +259,7 @@ "challengeSeed": [ "var firstName = \"Madeline\";", "", - "var thirdToLastLetterOfFirstName = firstName[firstName.length - 2];", + "var thirdToLastLetterOfFirstName = firstName[firstName.length - 3];", "", "var lastName = \"Chen\";", "", @@ -725,9 +725,9 @@ "", "Now that we have an objects we need to know how to add and remove properties from it", "We add properties to objects like this", - "myObject['myProperty'] = \"myValue\";", + "myObject.myProperty = \"myValue\";", "They can also be deleted like this", - "delete(myObject[\"myProperty\"]);", + "delete(myObject.myProperty);", "Let's add the property bark", "" ], From f656311b3e2c320af7174ceb6c3fc36e2b4d976c Mon Sep 17 00:00:00 2001 From: Berkeley Martinez Date: Wed, 5 Aug 2015 10:47:08 -0700 Subject: [PATCH 6/8] remove comments from migration --- seed/loopbackMigration.js | 28 +++++----------------------- 1 file changed, 5 insertions(+), 23 deletions(-) diff --git a/seed/loopbackMigration.js b/seed/loopbackMigration.js index f6b98b8b7b..9754b4f8d9 100644 --- a/seed/loopbackMigration.js +++ b/seed/loopbackMigration.js @@ -38,13 +38,13 @@ function createConnection(URI) { } function createQuery(db, collection, options, batchSize) { - return Rx.Observable.create(function (observer) { + return Rx.Observable.create(function(observer) { var cursor = db.collection(collection).find({}, options); cursor.batchSize(batchSize || 20); // Cursor.each will yield all doc from a batch in the same tick, // or schedule getting next batch on nextTick debug('opening cursor for %s', collection); - cursor.each(function (err, doc) { + cursor.each(function(err, doc) { if (err) { return observer.onError(err); } @@ -55,7 +55,7 @@ function createQuery(db, collection, options, batchSize) { observer.onNext(doc); }); - return Rx.Disposable.create(function () { + return Rx.Disposable.create(function() { debug('closing cursor for %s', collection); cursor.close(); }); @@ -161,33 +161,15 @@ var storyCount = dbObservable }) .count(); -var commentCount = dbObservable - .flatMap(function(db) { - return createQuery(db, 'comments', {}); - }) - .bufferWithCount(20) - .withLatestFrom(dbObservable, function(comments, db) { - return { - comments: comments, - db: db - }; - }) - .flatMap(function(dats) { - return insertMany(dats.db, 'comment', dats.comments, { w: 1 }); - }) - .count(); - Rx.Observable.combineLatest( userIdentityCount, userSavesCount, storyCount, - commentCount, - function(userIdentCount, userCount, storyCount, commentCount) { + function(userIdentCount, userCount, storyCount) { return { userIdentCount: userIdentCount * 20, userCount: userCount * 20, - storyCount: storyCount * 20, - commentCount: commentCount * 20 + storyCount: storyCount * 20 }; }) .subscribe( From 71ca6b1b5b5edb8a749075928f4e27d24e194f07 Mon Sep 17 00:00:00 2001 From: Berkeley Martinez Date: Wed, 5 Aug 2015 11:22:14 -0700 Subject: [PATCH 7/8] mark if user is github cool during migration --- seed/loopbackMigration.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/seed/loopbackMigration.js b/seed/loopbackMigration.js index 9754b4f8d9..333629438a 100644 --- a/seed/loopbackMigration.js +++ b/seed/loopbackMigration.js @@ -86,13 +86,13 @@ var users = dbObservable .map(function(user) { // flatten user assign(user, user.portfolio, user.profile); - return user; - }) - .map(function(user) { if (user.username) { return user; } user.username = 'fcc' + uuid.v4().slice(0, 8); + if (user.github) { + user.isGithubCool = true; + } return user; }) .shareReplay(); @@ -122,7 +122,7 @@ var userIdentityCount = users return { provider: provider, externalId: user[provider], - userId: user.id + userId: user._id || user.id }; }) .filter(function(ident) { From 7f9c3b46cdc16ad5a66384fa4917840ea243e53b Mon Sep 17 00:00:00 2001 From: Berkeley Martinez Date: Wed, 5 Aug 2015 11:48:12 -0700 Subject: [PATCH 8/8] fix typo directory should be plural --- LICENSE.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/LICENSE.md b/LICENSE.md index 99cafafc5b..8b5a0650f6 100644 --- a/LICENSE.md +++ b/LICENSE.md @@ -16,7 +16,7 @@ With respect to the computer software contained in this repository: # Curricular Content -With respect to the curricular content contained in this repository, as in the `./seed/challenges` and subdirectory and our wiki: +With respect to the curricular content contained in this repository, as in the `./seed/challenges` and subdirectories and our wiki: > By exercising the Licensed Rights (defined below), You accept and agree to be bound by the terms and conditions of this Creative Commons Attribution-ShareAlike 4.0 International Public License ("Public License"). To the extent this Public License may be interpreted as a contract, You are granted the Licensed Rights in consideration of Your acceptance of these terms and conditions, and the Licensor grants You such rights in consideration of benefits the Licensor receives from making the Licensed Material available under these terms and conditions. >