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
| CREATE TABLE users ( | |
| id serial PRIMARY KEY, | |
| first_name text, | |
| last_name text, | |
| email text NOT NULL, | |
| screen_name text NOT NULL | |
| ); | |
| CREATE TABLE posts ( | |
| id serial PRIMARY KEY, |
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
| 1. Get all restaurants | |
| //Write a query that returns all of the restaurants, with all of the fields. | |
| SELECT * FROM restaurants; | |
| 2. Get Italian restaurants | |
| //Write a query that returns all of the Italian restaurants, with all of the fields | |
| SELECT * FROM restaurants WHERE cuisine='Italian'; | |
| 3. Get 10 Italian restaurants, subset of fields | |
| //Write a query that gets 10 Italian restaurants, returning only the id and name fields. |
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
| STEP 1: OBTAINING A REQUEST TOKEN | |
| POST https://api.twitter.com/oauth/request_token | |
| OAuth { | |
| oauth_nonce, | |
| oauth_callback, | |
| oauth_signature_method: "HMAC-SHA1", | |
| oauth_consumer_key, | |
| oauth_signature, | |
| oauth_version: "1.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
| //Find the command that retrieves all restaurants. | |
| > db.restaurants.find(); | |
| //Find the command that makes the first 10 restaurants appear when | |
| //db.restaurants is alphabetically sorted by the name property. | |
| > db.restaurants.find().sort({name: 1}).limit(10); | |
| //Retrieve a single restaurant by _id from the restaurants collection. | |
| //This means you'll first need to get the _id for one of the restaurants imported into the database. | |
| > db.restaurants.findOne({}, {_id: 1}); |
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
| Mad Libs - https://glitch.com/edit/#!/subdued-aries?path=server.js:15:51 | |
| AB Test - https://glitch.com/edit/#!/tan-oxygen?path=server.js:11:34 |
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
| There needs to be a brief description of the app. Users so far tend to be a little confused of the point of the app. It can go right below h1. | |
| The form can also be a litter bigger. I observed that most users' eyes go straight to the preset buttons and they don't realize that they can also search for a location. | |
| Once users get a feel for the app they seem to like it. |
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
| Photo sent directly to mentor. |
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
| An app that allows users to search data from the Foursquare API and then get a randomly-generated Ron Swanson quote with a Cat GIF when they view the Tips/Reviews. |
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
| Cat Carousel - https://jsbin.com/vanayam/edit?html,js,console,output | |
| Fizz Buzz - https://jsbin.com/hapusoc/3/edit?html,js,output | |
| Lightbulb - https://jsbin.com/wolubo/edit?html,js,output |
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
| Lines 1-4: A function that takes a string and removes the special characters and upper case letters so that may be attached to a word. | |
| Line 6: Begins the function | |
| Line 7: Runs the text inputted into the function into the getTokens function so that everything is lowercase and the special characters are removed. The result will be a new variable which will be used for the mostFrequentWord function | |
| Line 8: Creates an empty object in which all of the words will be placed | |
| Lines 9-16: A function in which each word in the variable "words" will be passed through. If that word is not already a key in the object wordFrequencies, the value will be 1. If the word is already in wordFrequencies, the value will be +=1. | |
| Line 17: a new variable in which we will store the word with the most frequent iterations from the object wordFrequencies | |
| Line 18: A new variable which keeps track of the current "maximum word" based on the object key |