- set up an account on Amazon Web Services to store uploaded images inside AWS S3
- set up rails app to handle file uploads
- understand the how and why, of a rails model with an image attribute
We're going to use what we've learned already about searching with SQL commands, and apply it to chase down and capture an elusive and world-reknowned thief, Carmen Sandiego. Follow the clues, use the interweb - write down both the SQL commands /queries you used and your answers to the clues - and figure out where Carmen's headed, so we can catch her and bring her in.
After this lesson, SWBAT:
- Describe the relationship between tables, rows, and columns
- Draw entity relationship diagrams (ERDs) with crow's foot notation for ideas for web apps
- Describe how tables relate to each other using foreign keys
- Explain the different relationship types – one to one, one to many, many to many
What is a Callback?
A reference to executable code, or a piece of executable code, that is passed as an argument to other code.
All a callback is, is a function that takes a function as an argument.
Here is an example
function mySandwich(param1, param2, callback) {
alert('Started eating my sandwich.\n\nIt has: ' + param1 + ', ' + param2);
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
/* | |
1. Counting Sheep | |
Consider an array of sheep where some sheep may be missing from their place. | |
We need a function that counts the number of sheep present in the array (true means present). | |
*/ | |
var arr = [true, true, true, false, | |
true, true, true, true , | |
true, false, true, false, | |
true, false, false, true , | |
true, true, true, true , |
NewerOlder