From 9ce991b9dfd7c646b37d6ad7fb28410651936e68 Mon Sep 17 00:00:00 2001 From: Branden Byers Date: Mon, 23 Feb 2015 21:37:57 -0600 Subject: [PATCH 1/4] Update bonfire challenge description Clarified the description on the Return Largest Numbers in Arrays challenge. --- seed_data/bonfires.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/seed_data/bonfires.json b/seed_data/bonfires.json index b95c4ba83c6..b90a25a1a93 100644 --- a/seed_data/bonfires.json +++ b/seed_data/bonfires.json @@ -110,7 +110,7 @@ "name": "Return Largest Numbers in Arrays", "difficulty": "1.06", "description": [ - "Return an array consisting of the largest numbers in the provided array. The array will contain 4 sub-arrays.", + "Return an array consisting of the largest number from each provided sub-array. For simplicity, the provided array will contain exactly 4 sub-arrays.", "Remember, you can iterate through an array with a simple for loop, and access each member with array syntax arr[i] .", "If you are writing your own Chai.js tests, be sure to use a deep equal statement instead of an equal statement when comparing arrays." ], From d446dbbd53c47abc8890e1100a3229f639712809 Mon Sep 17 00:00:00 2001 From: "A. Drake" Date: Tue, 24 Feb 2015 13:10:34 -0500 Subject: [PATCH 2/4] Updated description for Sorted Union bonfire for clarity. --- seed_data/bonfires.json | 1 + 1 file changed, 1 insertion(+) diff --git a/seed_data/bonfires.json b/seed_data/bonfires.json index 2f9da459a1c..fee5fc0303e 100644 --- a/seed_data/bonfires.json +++ b/seed_data/bonfires.json @@ -311,6 +311,7 @@ "difficulty": "2.07", "description": [ "Write a function that takes two or more arrays and returns a new array of unique values in the order of the original provided arrays.", + "In other words, all values present from all arrays should be included in their original order, but with no duplicates in the final array." "The unique numbers should be sorted by their original order, but the final array should not be sorted in numerical order.", "Check the assertion tests for examples." ], From 8acf44ed8678c5e3b791723cfd3c87167dab94e3 Mon Sep 17 00:00:00 2001 From: Nathan Leniz Date: Thu, 26 Feb 2015 19:42:47 +0900 Subject: [PATCH 3/4] Updated bonfires, added new challenge binary agents --- seed_data/bonfires.json | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/seed_data/bonfires.json b/seed_data/bonfires.json index 832b707edaa..b247caafff8 100644 --- a/seed_data/bonfires.json +++ b/seed_data/bonfires.json @@ -309,7 +309,7 @@ "difficulty": "2.07", "description": [ "Write a function that takes two or more arrays and returns a new array of unique values in the order of the original provided arrays.", - "In other words, all values present from all arrays should be included in their original order, but with no duplicates in the final array." + "In other words, all values present from all arrays should be included in their original order, but with no duplicates in the final array.", "The unique numbers should be sorted by their original order, but the final array should not be sorted in numerical order.", "Check the assertion tests for examples." ], @@ -439,6 +439,20 @@ "assert.deepEqual(steamroller([1, [], [3, [[4]]]]), [1, 3, 4], 'should work with empty arrays');" ] }, + { + "_id": "a8d97bd4c764e91f9d2bda01", + "name": "Binary Agents", + "difficulty": "2.15", + "description": [ + "Return an English translated sentence of the passed binary string.", + "The binary string will be space separated." + ], + "challengeSeed": "function binaryAgent(str) {\n return str;\r\n}\n\nbinaryAgent('01000001 01110010 01100101 01101110 00100111 01110100 00100000 01100010 01101111 01101110 01100110 01101001 01110010 01100101 01110011 00100000 01100110 01110101 01101110 00100001 00111111');", + "tests": [ + "expect(binaryAgent('01000001 01110010 01100101 01101110 00100111 01110100 00100000 01100010 01101111 01101110 01100110 01101001 01110010 01100101 01110011 00100000 01100110 01110101 01101110 00100001 00111111')).to.equal(\"Aren't bonfires fun!?\");", + "expect(binaryAgent('01001001 00100000 01101100 01101111 01110110 01100101 00100000 01000110 01110010 01100101 01100101 01000011 01101111 01100100 01100101 01000011 01100001 01101101 01110000 00100001')).to.equal(\"I love FreeCodeCamp!\");" + ] + }, { "_id": "a3f503de51cf954ede28891d", "name": "Symmetric Difference", @@ -506,7 +520,7 @@ "You can read about orbital periods on wikipedia.", "The values should be rounded to the nearest whole number. Assume the body being orbited is Earth." ], - "challengeSeed": "function orbitalPeriod(arr) {\n return arr;\r\n}\r\n\r\norbitalPeriod([{name : \"sputkin\", avgAlt : 35873.5553}]);", + "challengeSeed": "function orbitalPeriod(arr) {\n\/\/Use 398600.4418 for GM. Look up any other values on wolfram alpha\n return arr;\r\n}\r\n\r\norbitalPeriod([{name : \"sputkin\", avgAlt : 35873.5553}]);", "tests": [ "expect(orbitalPeriod([{name : \"sputkin\", avgAlt : 35873.5553}])).to.eqls([{name: \"sputkin\", orbitalPeriod: 86400}]);", "expect(orbitalPeriod([{name: \"iss\", avgAlt: 413.6}, {name: \"hubble\", avgAlt: 556.7}, {name: \"moon\", avgAlt: 378632.553}])).to.eqls([{name : \"iss\", orbitalPeriod: 5557}, {name: \"hubble\", orbitalPeriod: 5734}, {name: \"moon\", orbitalPeriod: 2377399}]);" From 2cc469e293a96e47490b099ebbffd4df0f3a45ba Mon Sep 17 00:00:00 2001 From: Nathan Leniz Date: Fri, 27 Feb 2015 05:02:52 +0900 Subject: [PATCH 4/4] Refactor undefined check for mainjs, add a challengeName to email signup page --- public/js/main.js | 2 +- views/account/email-signup.jade | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/public/js/main.js b/public/js/main.js index 7976c4f6d17..aa5b28a9131 100644 --- a/public/js/main.js +++ b/public/js/main.js @@ -1,5 +1,5 @@ $(document).ready(function() { - challengeName = challengeName || 'Untitled'; + challengeName = typeof challengeName !== undefined ? challengeName : 'Untitled'; if (challengeName) { ga('send', 'event', 'Challenge', 'load', challengeName); } diff --git a/views/account/email-signup.jade b/views/account/email-signup.jade index 0a5f2f46878..ab3f821f950 100644 --- a/views/account/email-signup.jade +++ b/views/account/email-signup.jade @@ -66,3 +66,5 @@ block content br br br + script. + var challengeName = 'Email Signup'