if you screw up a branch, go back to master, create a new branch
Create new branch and switch over to new branch: git checkout -b simon-changes
to check currently working branch: git branch
to switch to simon branch: git checkout simon
function confirmEnding(str, target) { | |
return str.substr(target.length) === target; | |
} | |
confirmEnding("sesame", "same"); | |
// why does the code above return "FALSE"? | |
// I originally thought, since (-target.length = -4) | |
// that "does substr(-target.length) === target?" meant does 'same' = the last 4 characters of str? but (-4) is actually an index, so you start at -4th letter, which is 's' and you go to the end, which gives you "same". | |
/* | |
function confirmEnding(str, target) { |
8/14/2017 | |
** Git Commands ** | |
git status (to check which files are ready to be added) | |
git add -A (for all files) | |
git commit -m "Hello World" (commit file to repo) | |
git log (notes for the file git) | |
** Design and Technical Wireframes ** |
if you screw up a branch, go back to master, create a new branch
Create new branch and switch over to new branch: git checkout -b simon-changes
to check currently working branch: git branch
to switch to simon branch: git checkout simon
Mon 8/28/17
Lab Day
Tue 8/29/17
Lab Day
Wed 8/30/17
Install PostgreSQL
Thu 8/31/17
Try SQL course (from codeschool.com)
SELECT title
FROM movies
WHERE id = 2;
SELECT *
FROM movies
WHERE title = 'The Kid';
Tuesday:
We worked on our app modules.
Discussed the anatomy of HTTP transaction.
We tested our API endpoints in PostMan and created tables in PostgreSQL
One of the things we learned today: in Sequelize, to define mappings between a model and a table, we use the define method.
Wednesday:
we continued working on our modules
We discussed Routes, bCrypt, and Validation
// Object oriented programming (from Khan Academy) | |
// 2 object literals | |
var winstonTeen = { | |
"nickname": "Winsteen", | |
"age": 15, | |
"x": 20, | |
"y": 50 | |
}; | |
var winstonAdult = { | |
"nickname": "Mr. Winst-a-lot", |
Monday
to deploy to Heroku:
heroku login
git push heroku master
Tuesday
JavaScript Prototypes | |
What's a Prototype? | |
Instance vs Prototype Properties | |
Changing a Function's Prototype | |
Multiple Levels of Ineritance |
function: (presentational concept) simplest form. receives object of properties (props)
class: also has a function that has a private internal state. when state changes React will auto re-render that component.
Class components extend the React.Component class.
state vs. props:
state can be changed. props are fixed