This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // Bonfire: Mutations | |
| // Author: @fcc0208647c | |
| // Challenge: http://www.freecodecamp.com/challenges/bonfire-mutations# | |
| // Learn to Code at Free Code Camp (www.freecodecamp.com) | |
| function mutation(arr) { | |
| firstElement = arr[0].toLowerCase().split(''); | |
| secondElement = arr[1].toLowerCase().split(''); | |
| for (var i=0; i<secondElement.length; i++) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // Bonfire: Falsy Bouncer | |
| // Author: @fcc0208647c | |
| // Challenge: http://www.freecodecamp.com/challenges/bonfire-falsy-bouncer# | |
| // Learn to Code at Free Code Camp (www.freecodecamp.com) | |
| function bouncer(arr) { | |
| trues = arr.filter(Boolean); | |
| return trues; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // Bonfire: Seek and Destroy | |
| // Author: @fcc0208647c | |
| // Challenge: http://www.freecodecamp.com/challenges/bonfire-seek-and-destroy# | |
| // Learn to Code at Free Code Camp (www.freecodecamp.com) | |
| function destroyer(arr) { | |
| var slicedArgs = Array.prototype.slice.call(arguments, 1); | |
| console.log(slicedArgs + " are my args"); | |
| mylist = arguments[0]; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // Bonfire: Where do I belong | |
| // Author: @fcc0208647c | |
| // Challenge: http://www.freecodecamp.com/challenges/bonfire-where-do-i-belong# | |
| // Learn to Code at Free Code Camp (www.freecodecamp.com) | |
| function where(arr, num) { | |
| myarr = arr.sort(function(a,b) {return a - b;}); | |
| console.log(myarr); | |
| minval = Math.min.apply(Math, myarr); | |
| maxval = Math.max.apply(Math, myarr); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // Bonfire: Sum All Numbers in a Range | |
| // Author: @fcc0208647c | |
| // Challenge: http://www.freecodecamp.com/challenges/bonfire-sum-all-numbers-in-a-range | |
| // Learn to Code at Free Code Camp (www.freecodecamp.com) | |
| function sumAll(arr) { | |
| arr.sort(); | |
| start = Math.min.apply(Math, arr); | |
| end = Math.max.apply(Math, arr); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // Bonfire: Diff Two Arrays | |
| // Author: @fcc0208647c | |
| // Challenge: http://www.freecodecamp.com/challenges/bonfire-diff-two-arrays | |
| // Learn to Code at Free Code Camp (www.freecodecamp.com) | |
| function diff(arr1, arr2) { | |
| arr3 = arr1.concat(arr2); | |
| final = arr3.filter(function(val, index, arr){ | |
| console.log(arr3.indexOf(val),arr3.lastIndexOf(val),val); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Reverse for 'password_change_done' with arguments '()' and keyword arguments '{}' not found. 0 pattern(s) tried: [] | |
| Make sure in your main urls.py folder you include: or else this error may persist. | |
| urlpatterns = [ | |
| url('^', include('django.contrib.auth.urls')), |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| if (document.getElementsByClassName("HeaderPrice")[0]) { | |
| var rooms_avail_omtr = document.getElementsByClassName("HeaderPrice").length; | |
| s.eVar51 = rooms_avail_omtr; | |
| } else if (jQuery('.NoAvailMsg')[0]) { | |
| s.eVar51 = "No Results Available"; | |
| } else { | |
| s.eVar51 = "Some Other Condition Has Occurred"; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| var data = [ | |
| { | |
| "_id": "56db20d2d9944c0932ecd1c8", | |
| "index": 0, | |
| "guid": "e054234d-c7ab-4e50-bf5b-b30dc93397ab", | |
| "isActive": false, | |
| "balance": "$1,172.10", | |
| "picture": "http://placehold.it/32x32", | |
| "age": 27, | |
| "eyeColor": "green", |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function main() { | |
| // Set-up dates for lookback period control | |
| // | |
| Number.prototype.padZero= function(len){ | |
| var s= String(this), c= '0'; | |
| len= len || 2; | |
| while(s.length < len) s= c + s; | |
| return s; | |
| } |