This file contains 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
version: '2' | |
services: | |
api: | |
volumes: | |
- "nfsmount:${CONTAINER_DIR}" | |
volumes: | |
nfsmount: | |
driver: local | |
driver_opts: |
This file contains 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
$(document).ready(function(){ | |
// Array to store all feed sources | |
var SOURCES = [ | |
{ | |
displayName: "Reddit", | |
url: "https://www.reddit.com/r/worldnews/top/.json", | |
proxyRequired: true, | |
defaultSource: true, // You can have only one default source | |
formatResponse: function(response) { |
This file contains 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
//we create an object called _ | |
var _ = { | |
//the first property is called map it's a method that takes two arguments | |
//the first argument is list, the second is a call back function | |
map: function(list, cbFn) { | |
//this funciton creates a new array | |
var newArray = []; | |
//it uses a forEach loop to go through list returning the element i'm not sure what index is doing? | |
list.forEach(function(elem, index) { |
This file contains 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
// This is the creation of a variable called "_" which is a method | |
// Stephen: Not a method. variable '_' is an object. | |
var _ = { | |
// on this line the first key value is function (so a function within the variable method). | |
// This function will take to params: list and cbFn | |
// Stephen: this map() function is a property of '_' object that takes an array and a function reference as their params. | |
map: function(list, cbFn) { | |
// within the method's function, there is a new local variable, newArray, which is an empty array | |
// Stephen: We establish 'newArray', which is an empty array to store the result from forEach() below. | |
var newArray = []; |
This file contains 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
// curious what this is doing? https://learn.jquery.com/using-jquery-core/document-ready/ | |
//bn notes: kind of a mess, lots of notes by myself you can ignore, couldn't get focus to work??? :/ | |
$(document).ready(function() { | |
// write your code here | |
/*You should be working in `app.js` in `homeworks/homework-02/js`. I commented out the | |
predefined list items in index.html because the todolist is empty when | |
the page starts. You need to use those list items as a reference for | |
the html that's to be inserted onto the page. | |
*/ |
This file contains 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
// Homework 1 | |
// Hint: You may need SOME of these array iterator methods: | |
// .map(), .filter(), .forEach() , .some(), .every() | |
// Hint: You may also need SOME of the following methods: | |
// Number(), .reverse(), typeof(), .join() | |
// Let's say we have an array of prices named `prices`. | |
var prices = ['100', '125', '129', '37', '38', '75', '87', '94', '300', '301', | |
'305', '50', '0.30', '0.01', '0.5', '5', '15', '24', '35', '1041', '1', '17', |