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
import React from 'react'; | |
import Form from 'react-bootstrap/Form'; | |
import Button from 'react-bootstrap/Button'; | |
const Home = () => ( | |
<Form> | |
<h4>Monthly Wages</h4> | |
<Form.Group controlId="wages"> | |
<h5>Salary:</h5> |
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
TypeError: User.findById is not a function | |
at passport.deserializeUser (/Users/Michael/bloc/wiki/src/config/passport-config.js:32:14) | |
at pass (/Users/Michael/bloc/wiki/node_modules/passport/lib/authenticator.js:357:9) | |
at Authenticator.deserializeUser (/Users/Michael/bloc/wiki/node_modules/passport/lib/authenticator.js:362:5) | |
at SessionStrategy.authenticate (/Users/Michael/bloc/wiki/node_modules/passport/lib/strategies/session.js:60:10) | |
at attempt (/Users/Michael/bloc/wiki/node_modules/passport/lib/middleware/authenticate.js:361:16) | |
at authenticate (/Users/Michael/bloc/wiki/node_modules/passport/lib/middleware/authenticate.js:362:7) | |
at Layer.handle [as handle_request] (/Users/Michael/bloc/wiki/node_modules/express/lib/router/layer.js:95:5) | |
at trim_prefix (/Users/Michael/bloc/wiki/node_modules/express/lib/router/index.js:317:13) | |
at /Users/Michael/bloc/wiki/node_modules/express/lib/router/index.js:284:7 |
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
Michaels-MacBook-Pro:bloccit Michael$ npm test | |
> bloccit@1.0.0 test /Users/Michael/bloc/bloccit | |
> export NODE_ENV=test && jasmine | |
Started | |
server is listening for requests on port 3000 | |
.......{ SequelizeValidationError: notNull Violation: Post.userId cannot be null | |
at Promise.all.then (/Users/Michael/bloc/bloccit/node_modules/sequelize/lib/instance-validator.js:77:15) | |
at tryCatcher (/Users/Michael/bloc/bloccit/node_modules/bluebird/js/release/util.js:16:23) |
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. What is a Node module? | |
A node module is a set of function that is included in your application. | |
2.What is the main difference between exports and module.exports? | |
module.exports is the object returned from require(). It is an object that can | |
be reassigned into anything. | |
Exports is a reference to module.exports. It cannot reassign module.exports. |
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.How do you find related data held in two separate data tables? | |
By using join statements to view data from different tables. You can also use | |
NATURAL to view tables based on shared columns. | |
2.Explain, in your own words, the difference between an INNER JOIN, LEFT OUTER | |
JOIN, and RIGHT OUTER JOIN. Give a real-world example for each. | |
INNER JOIN combines rows from tables based on common rows. LEFT OUTER JOIN uses | |
the first tables rows as a base, and then combines matching rows from the second table. |
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. Write out a generic SELECT statement. | |
SELECT name | |
FROM spacecrafts | |
WHERE name LIKE '%Op%'; | |
2. Create a fun way to remember the order of operations in a SELECT statement, such | |
as a mnemonic. | |
SFWAE (SELECT FROM WHERE add extras) |
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.List the commands for adding, updating, and deleting data. | |
For adding we use INSERT INTO (column name or table name) VALUES (values) | |
For updating we use UPDATE (table name) SET (value) WHERE (condition) | |
and statements can also be added to conditions. | |
For deleting we use DELETE FROM (table name) WHERE(condition) | |
and statements can also be added to conditions |
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
library=# SELECT * FROM books; | |
id | title | author | |
------+------------------------------------------+--------------------- | |
1259 | Eloquent Ruby | Russell A. Olson | |
1593 | JavaScript: The Good Parts | Douglas Crockford | |
8982 | Designing Object-Oriented Software | Rebecca Wirfs-Brock | |
7265 | Practical Object-Oriented Design in Ruby | Sandi Metz | |
(4 rows) | |
library=# |
NewerOlder