From 8c376a5b32d3908c08c2d3714642cc78fe5682e3 Mon Sep 17 00:00:00 2001 From: Andre Alonzo Date: Sun, 20 Mar 2016 06:45:18 -0700 Subject: [PATCH 1/9] updated to check for spaces before and after class name --- .../01-front-end-development-certification/jquery.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/seed/challenges/01-front-end-development-certification/jquery.json b/seed/challenges/01-front-end-development-certification/jquery.json index ab5571e2a8..881b6bca42 100644 --- a/seed/challenges/01-front-end-development-certification/jquery.json +++ b/seed/challenges/01-front-end-development-certification/jquery.json @@ -342,7 +342,7 @@ "assert(code.match(/\\$\\s*?\\(\\s*?(?:'|\")\\s*?button\\s*?(?:'|\")/gi), 'message: Use the $(\"button\") selector.');", "assert(code.match(/\\$\\s*?\\(\\s*?(?:'|\")\\s*?\\.btn\\s*?(?:'|\")/gi), 'message: Use the $(\".btn\") selector.');", "assert(code.match(/\\$\\s*?\\(\\s*?(?:'|\")\\s*?#target1\\s*?(?:'|\")/gi), 'message: Use the $(\"#target1\") selector.');", - "assert(code.match(/addClass/g) && code.match(/addClass\\(\\s*?('|\")[\\w-]+\\1\\s*?\\)/g).length > 2, 'message: Only add one class with each of your three selectors.');", + "assert(code.match(/addClass/g) && code.match(/addClass\\(\\s*?('|\")\\s*?[\\w-]+\\s*?\\1\\s*?\\)/g).length > 2, 'message: Only add one class with each of your three selectors.');", "assert($(\"#target1\").hasClass(\"animated\") && $(\"#target1\").hasClass(\"shake\") && $(\"#target1\").hasClass(\"btn-primary\"), 'message: Your #target1 element should have the classes animatedshake and btn-primary.');", "assert(!code.match(/class.*animated/g), 'message: Only use jQuery to add these classes to the element.');" ], From ab6e3feb788d2e7b42fa57afd6d66221cc5002d3 Mon Sep 17 00:00:00 2001 From: Hallaathrad Date: Sun, 20 Mar 2016 19:11:52 -0400 Subject: [PATCH 2/9] Input resets --- client/commonFramework/update-preview.js | 50 ++++++++++++++++++++++++ 1 file changed, 50 insertions(+) diff --git a/client/commonFramework/update-preview.js b/client/commonFramework/update-preview.js index 14c6ef7329..db6888cadf 100644 --- a/client/commonFramework/update-preview.js +++ b/client/commonFramework/update-preview.js @@ -37,6 +37,56 @@ window.common = (function(global) { /> `; const codeDisabledError = ` From 2498f1fa883d30a376e3b9b1254e312e19f9fe77 Mon Sep 17 00:00:00 2001 From: Eric Leung Date: Mon, 21 Mar 2016 10:26:24 -0700 Subject: [PATCH 3/9] Make Where Do I Belong function name unique --- .../basic-bonfires.json | 24 +++++++++---------- 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/seed/challenges/01-front-end-development-certification/basic-bonfires.json b/seed/challenges/01-front-end-development-certification/basic-bonfires.json index 62f4e71028..630dcbe61e 100644 --- a/seed/challenges/01-front-end-development-certification/basic-bonfires.json +++ b/seed/challenges/01-front-end-development-certification/basic-bonfires.json @@ -644,31 +644,31 @@ "title": "Where do I belong", "description": [ "Return the lowest index at which a value (second argument) should be inserted into an array (first argument) once it has been sorted.", - "For example, where([1,2,3,4], 1.5) should return 1 because it is greater than 1 (index 0), but less than 2 (index 1).", - "Likewise, where([20,3,5], 19) should return 2 because once the array has been sorted it will look like [3,5,20] and 19 is less than 20 (index 2) and greater than 5 (index 1).", + "For example, getIndexToIns([1,2,3,4], 1.5) should return 1 because it is greater than 1 (index 0), but less than 2 (index 1).", + "Likewise, getIndexToIns([20,3,5], 19) should return 2 because once the array has been sorted it will look like [3,5,20] and 19 is less than 20 (index 2) and greater than 5 (index 1).", "Remember to use Read-Search-Ask if you get stuck. Write your own code." ], "challengeSeed": [ - "function where(arr, num) {", + "function getIndexToIns(arr, num) {", " // Find my place in this sorted array.", " return num;", "}", "", - "where([40, 60], 50);" + "getIndexToIns([40, 60], 50);" ], "tests": [ - "assert(where([10, 20, 30, 40, 50], 35) === 3, 'message: where([10, 20, 30, 40, 50], 35) should return 3.');", - "assert(where([10, 20, 30, 40, 50], 30) === 2, 'message: where([10, 20, 30, 40, 50], 30) should return 2.');", - "assert(where([40, 60], 50) === 1, 'message: where([40, 60], 50) should return 1.');", - "assert(where([3, 10, 5], 3) === 0, 'message: where([3, 10, 5], 3) should return 0.');", - "assert(where([5, 3, 20, 3], 5) === 2, 'message: where([5, 3, 20, 3], 5) should return 2.');", - "assert(where([2, 20, 10], 19) === 2, 'message: where([2, 20, 10], 19) should return 2.');", - "assert(where([2, 5, 10], 15) === 3, 'message: where([2, 5, 10], 15) should return 3.');" + "assert(getIndexToIns([10, 20, 30, 40, 50], 35) === 3, 'message: getIndexToIns([10, 20, 30, 40, 50], 35) should return 3.');", + "assert(getIndexToIns([10, 20, 30, 40, 50], 30) === 2, 'message: getIndexToIns([10, 20, 30, 40, 50], 30) should return 2.');", + "assert(getIndexToIns([40, 60], 50) === 1, 'message: getIndexToIns([40, 60], 50) should return 1.');", + "assert(getIndexToIns([3, 10, 5], 3) === 0, 'message: getIndexToIns([3, 10, 5], 3) should return 0.');", + "assert(getIndexToIns([5, 3, 20, 3], 5) === 2, 'message: getIndexToIns([5, 3, 20, 3], 5) should return 2.');", + "assert(getIndexToIns([2, 20, 10], 19) === 2, 'message: getIndexToIns([2, 20, 10], 19) should return 2.');", + "assert(getIndexToIns([2, 5, 10], 15) === 3, 'message: getIndexToIns([2, 5, 10], 15) should return 3.');" ], "type": "bonfire", "isRequired": true, "solutions": [ - "function where(arr, num) {\n arr = arr.sort(function(a, b){return a-b;});\n for (var i = 0; i < arr.length; i++) {\n if (arr[i] >= num)\n {\n return i;\n }\n }\n return arr.length;\n}" + "function getIndexToIns(arr, num) {\n arr = arr.sort(function(a, b){return a-b;});\n for (var i = 0; i < arr.length; i++) {\n if (arr[i] >= num)\n {\n return i;\n }\n }\n return arr.length;\n}" ], "MDNlinks": [ "Array.sort()" From eda7b3e255bcd5949df544a73b4689e6d106c64b Mon Sep 17 00:00:00 2001 From: Mrugesh Mohapatra Date: Tue, 22 Mar 2016 01:15:41 +0530 Subject: [PATCH 4/9] Move Sign out and Send Email to User Page This commit moves the Sign out from Free Code Camp and the Email us buttons to the User page as they are not related to the accounts page. Tested Locally. --- server/views/account/settings.jade | 6 ------ server/views/account/show.jade | 6 ++++++ 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/server/views/account/settings.jade b/server/views/account/settings.jade index f7b8d70b05..27817f1eb9 100644 --- a/server/views/account/settings.jade +++ b/server/views/account/settings.jade @@ -29,12 +29,6 @@ block content a.btn.btn-lg.btn-block.btn-google-plus.btn-link-social(href='/link/google') i.fa.fa-google-plus | Add my Google+ to my portfolio - .col-xs-12 - a.btn.btn-lg.btn-block.btn-primary.btn-link-social(href='/logout') - | Sign me out of Free Code Camp - .col-xs-12 - a.btn.btn-lg.btn-block.btn-primary.btn-link-social(href='mailto:team@freecodecamp.com') - | Email us at team@freecodecamp.com .spacer h2.text-center Account Settings .row diff --git a/server/views/account/show.jade b/server/views/account/show.jade index 9297d4cc60..c9e773e70a 100644 --- a/server/views/account/show.jade +++ b/server/views/account/show.jade @@ -12,6 +12,12 @@ block content .col-xs-12 a.btn.btn-lg.btn-block.btn-primary.btn-link-social(href='/settings') | Update your settings + .col-xs-12 + a.btn.btn-lg.btn-block.btn-primary.btn-link-social(href='/logout') + | Sign me out of Free Code Camp + .col-xs-12 + a.btn.btn-lg.btn-block.btn-primary.btn-link-social(href='mailto:team@freecodecamp.com') + | Email us at team@freecodecamp.com .spacer h1.text-center #{username}'s code portfolio hr From e146a4bce59f9319f9d2f1d3608fae7e2b112a62 Mon Sep 17 00:00:00 2001 From: Eric Leung Date: Wed, 23 Mar 2016 20:48:37 -0500 Subject: [PATCH 5/9] Clarify Drop It instructions on using 2nd argument --- .../intermediate-bonfires.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/seed/challenges/01-front-end-development-certification/intermediate-bonfires.json b/seed/challenges/01-front-end-development-certification/intermediate-bonfires.json index 12977a899e..258e6c9bba 100644 --- a/seed/challenges/01-front-end-development-certification/intermediate-bonfires.json +++ b/seed/challenges/01-front-end-development-certification/intermediate-bonfires.json @@ -684,7 +684,8 @@ "id": "a5deed1811a43193f9f1c841", "title": "Drop it", "description": [ - "Drop the elements of an array (first argument), starting from the front, until the predicate (second argument) returns true.", + "Drop the elements of an array (first argument), starting from the front, until the predicate (second argument) returns true.", + "The second argument, func, is a function you'll use to test the first elements of the array to decide if you should drop it or not.", "Return the rest of the array, otherwise return an empty array.", "Remember to use Read-Search-Ask if you get stuck. Try to pair program. Write your own code." ], From f07bc582307fcfe725d52278603c45a779392d53 Mon Sep 17 00:00:00 2001 From: elazzabi Date: Thu, 24 Mar 2016 22:36:14 +0000 Subject: [PATCH 6/9] Translating Claim Your Data Visualization Certificate to French. --- .../data-visualization-certificate.json | 29 ++++++++++++++++++- 1 file changed, 28 insertions(+), 1 deletion(-) diff --git a/seed/challenges/02-data-visualization-certification/data-visualization-certificate.json b/seed/challenges/02-data-visualization-certification/data-visualization-certificate.json index 3d5a21327f..5433dab284 100644 --- a/seed/challenges/02-data-visualization-certification/data-visualization-certificate.json +++ b/seed/challenges/02-data-visualization-certification/data-visualization-certificate.json @@ -118,7 +118,34 @@ "" ] ], - "titleEs": "Reclama tu certificado de Visualización de datos" + "titleEs": "Reclama tu certificado de Visualización de datos", + "descriptionFr": [ + [ + "//i.imgur.com/Et3iD74.jpg", + "Une image de note Certificat de Visualisation de données", + "Ce défi vous permettra d’avoir votre Certificat de Visualisation de données vérifiée. Avant de vous donner votre certificat, il faut s’assurer que vous avez bien accomplie tous les projets de React et D3.js et il faut que vous acceptiez notre Academic Honesty Pledge. Cliquez sur le bouton si dessous pour démarrer le processus.", + "" + ], + [ + "//i.imgur.com/HArFfMN.jpg", + "Une définition du plagiat : Plagiat (nom) – copier le travail d’un autre et le présenter comme étant le tien, sans mention de l’auteur original", + "En cliquant si dessous, je garantie que tout le code que j’ai présenté A) est mon propre code ou celui de mon collaborateur, B) vient d’un projet open-source comme jQuery, ou C) contient les mentions nécessaires des auteurs. Vous nous donnez aussi la permission de vérifier vos solutions et de révoquer votre certificat en cas de détection de plagiat.", + "#" + ], + [ + "//i.imgur.com/14F2Van.jpg", + "Une image du texte \"Data Visualization Certificate requirements\"", + "On va confirmer maintenant que vous avez bien terminé nos projets de React et D3.js. Cliquez sur le bouton si dessous pour vérifier cela.", + "#" + ], + [ + "//i.imgur.com/16SIhHO.jpg", + "Une image du mot \"Congratulations\"", + "Félicitations! On vient d’ajouter votre Certificat de Visualisation de données à votre profile. Cette certificat est public et vérifiable, mais vous pouvez le cacher si vous désirer.", + "" + ] + ], + "titleFr":"Réclamer votre Certificat de Visualisation de données" } ] } From a483f57c48fc5dca7f4d1cf807435f3b5ac00729 Mon Sep 17 00:00:00 2001 From: Mrugesh Mohapatra Date: Sun, 27 Mar 2016 13:49:45 +0530 Subject: [PATCH 7/9] Fix Compound Assignment Challenges This commit updates the Compound assignment challenges: * Compound Assignment With += * Compound Assignment With -= * Compound Assignment With *= * Compound Assignment With \= to * Compound Assignment With Augmented Addition * Compound Assignment With Augmented Substraction * Compound Assignment With Augmented Multiplication * Compound Assignment With Augmented Division Tested locally --- .../basic-javascript.json | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/seed/challenges/01-front-end-development-certification/basic-javascript.json b/seed/challenges/01-front-end-development-certification/basic-javascript.json index 7dda2fd78a..45d0cbad79 100644 --- a/seed/challenges/01-front-end-development-certification/basic-javascript.json +++ b/seed/challenges/01-front-end-development-certification/basic-javascript.json @@ -651,7 +651,7 @@ }, { "id": "56533eb9ac21ba0edf2244af", - "title": "Compound Assignment With +=", + "title": "Compound Assignment With Augmented Addition", "description": [ "In programming, it is common to use assignments to modify the contents of a variable. Remember that everything to the right of the equals sign is evaluated first, so we can say:", "myVar = myVar + 5;", @@ -702,7 +702,7 @@ }, { "id": "56533eb9ac21ba0edf2244b0", - "title": "Compound Assignment With -=", + "title": "Compound Assignment With Augmented Subtraction", "description": [ "Like the += operator, -= subtracts a number from a variable.", "myVar = myVar - 5;", @@ -752,7 +752,7 @@ }, { "id": "56533eb9ac21ba0edf2244b1", - "title": "Compound Assignment With *=", + "title": "Compound Assignment With Augmented Multiplication", "description": [ "The *= operator multiplies a variable by a number.", "myVar = myVar * 5;", @@ -802,7 +802,7 @@ }, { "id": "56533eb9ac21ba0edf2244b2", - "title": "Compound Assignment With /=", + "title": "Compound Assignment With Augmented Division", "description": [ "The /= operator divides a variable by another number.", "myVar = myVar / 5;", From ab1a440622d67a8de040f04064a0e3b591da8c28 Mon Sep 17 00:00:00 2001 From: Michael Ro Date: Sun, 27 Mar 2016 12:33:57 -0700 Subject: [PATCH 8/9] Adds switch statement MDN link --- seed/bonfireMDNlinks.js | 3 +++ .../basic-javascript.json | 3 +++ 2 files changed, 6 insertions(+) diff --git a/seed/bonfireMDNlinks.js b/seed/bonfireMDNlinks.js index d3beb5908d..43e382a176 100644 --- a/seed/bonfireMDNlinks.js +++ b/seed/bonfireMDNlinks.js @@ -79,6 +79,9 @@ var links = { "Array.splice()": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/splice", "Array.toString()": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/toString", + // ======== STATEMENTS AND DECLARATIONS + "Switch Statement": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/switch", + // ======== MATH METHODS "Math.max()": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/max", "Math.min()": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/min", diff --git a/seed/challenges/01-front-end-development-certification/basic-javascript.json b/seed/challenges/01-front-end-development-certification/basic-javascript.json index 45d0cbad79..c50be7961e 100644 --- a/seed/challenges/01-front-end-development-certification/basic-javascript.json +++ b/seed/challenges/01-front-end-development-certification/basic-javascript.json @@ -3446,6 +3446,9 @@ "solutions": [ "function myTest(val) {\n var answer = \"\";\n\n switch (val) {\n case 1:\n answer = \"alpha\";\n break;\n case 2:\n answer = \"beta\";\n break;\n case 3:\n answer = \"gamma\";\n break;\n case 4:\n answer = \"delta\";\n }\n return answer; \n}" ], + "MDNlinks": [ + "Switch Statement" + ], "tests": [ "assert(myTest(1) === \"alpha\", 'message: myTest(1) should have a value of \"alpha\"');", "assert(myTest(2) === \"beta\", 'message: myTest(2) should have a value of \"beta\"');", From 784092f38b10a7393fe9061b3c94b381b006a9d7 Mon Sep 17 00:00:00 2001 From: Apoorv Nandan Date: Mon, 28 Mar 2016 04:12:04 +0530 Subject: [PATCH 9/9] Fix LobsterDefault HTML code on Lobster font --- .../01-front-end-development-certification/bootstrap.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/seed/challenges/01-front-end-development-certification/bootstrap.json b/seed/challenges/01-front-end-development-certification/bootstrap.json index 733e1af296..3cf9d1bb58 100644 --- a/seed/challenges/01-front-end-development-certification/bootstrap.json +++ b/seed/challenges/01-front-end-development-certification/bootstrap.json @@ -17,7 +17,7 @@ "To get started, we should nest all of our HTML in a div element with the class container-fluid." ], "challengeSeed": [ - "", + "", "