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
:~ piontekle$ createdb -U postgres -w library | |
:~ piontekle$ psql -f bloc/database_module_bloc/library-data.sql library postgres | |
CREATE TABLE | |
INSERT 0 4 | |
:~ piontekle$ psql library postgres | |
psql (11.1) | |
Type "help" for help. | |
library=# SELECT * FROM books; | |
id | title | author |
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
2019-03-01 13:46:08.314 EST [64814] ERROR: relation "Topics" does not exist at character 68 | |
2019-03-01 13:46:08.314 EST [64814] STATEMENT: SELECT "id", "title", "description", "createdAt", "updatedAt" FROM "Topics" AS "Topic"; | |
F | |
Failures: | |
1) routes : topics GET /topics should return a status code 200 and all topics | |
Message: | |
Error: Timeout - Async callback was not invoked within timeout specified by jasmine.DEFAULT_TIMEOUT_INTERVAL. | |
Stack: | |
Error: Timeout - Async callback was not invoked within timeout specified by jasmine.DEFAULT_TIMEOUT_INTERVAL. |
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
:bloccit piontekle$ npm test | |
> bloccit@1.0.0 test /Users/piontekle/bloc/bloccit | |
> export NODE_ENV=test && jasmine | |
Started | |
server is listening for requests on port 3000 | |
...2019-03-01 14:27:13.754 EST [65268] ERROR: relation "Topic" does not exist | |
2019-03-01 14:27:13.754 EST [65268] STATEMENT: CREATE TABLE IF NOT EXISTS "Banners" ("id" SERIAL , "source" VARCHAR(255), "description" VARCHAR(255), "topicId" INTEGER REFERENCES "Topic" ("id") ON DELETE CASCADE ON UPDATE CASCADE, "createdAt" TIMESTAMP WITH TIME ZONE NOT NULL, "updatedAt" TIMESTAMP WITH TIME ZONE NOT NULL, PRIMARY KEY ("id")); | |
Unhandled rejection SequelizeDatabaseError: relation "Topic" does not exist |
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
DEBUG: ERROR at 'topicController#index' | |
{ SequelizeDatabaseError: relation "Topics" does not exist | |
at Query.formatError (/Users/piontekle/bloc/bloccit/node_modules/sequelize/lib/dialects/postgres/query.js:363:16) | |
at query.catch.err (/Users/piontekle/bloc/bloccit/node_modules/sequelize/lib/dialects/postgres/query.js:86:18) | |
at tryCatcher (/Users/piontekle/bloc/bloccit/node_modules/bluebird/js/release/util.js:16:23) | |
at Promise._settlePromiseFromHandler (/Users/piontekle/bloc/bloccit/node_modules/bluebird/js/release/promise.js:512:31) | |
at Promise._settlePromise (/Users/piontekle/bloc/bloccit/node_modules/bluebird/js/release/promise.js:569:18) | |
at Promise._settlePromise0 (/Users/piontekle/bloc/bloccit/node_modules/bluebird/js/release/promise.js:614:10) | |
at Promise._settlePromises (/Users/piontekle/bloc/bloccit/node_modules/bluebird/js/release/promise.js:690:18) | |
at _drainQueueStep (/Users/piontekle/bloc/bloccit/node_modules/bluebird/js/release/async.js:138:12) |
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
TypeError: Class constructor ApplicationPolicy cannot be invoked without 'new' | |
at new (/Users/piontekle/bloc/bloccit/src/controllers/postController.js:7:24) | |
at Layer.handle [as handle_request] (/Users/piontekle/bloc/bloccit/node_modules/express/lib/router/layer.js:95:5) | |
at next (/Users/piontekle/bloc/bloccit/node_modules/express/lib/router/route.js:137:13) | |
at Route.dispatch (/Users/piontekle/bloc/bloccit/node_modules/express/lib/router/route.js:112:3) | |
at Layer.handle [as handle_request] (/Users/piontekle/bloc/bloccit/node_modules/express/lib/router/layer.js:95:5) | |
at /Users/piontekle/bloc/bloccit/node_modules/express/lib/router/index.js:281:22 | |
at param (/Users/piontekle/bloc/bloccit/node_modules/express/lib/router/index.js:354:14) | |
at param (/Users/piontekle/bloc/bloccit/node_modules/express/lib/router/index.js:365:14) | |
at Function.process_params (/Users/piontekle/bloc/bloccit/node_modules/express/lib/router/index.js:410:3) |
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
Started | |
server is listening for requests on port 3000 | |
.....VOTE: | |
Vote { | |
dataValues: | |
{ id: 1, | |
value: 1, | |
postId: 1, | |
userId: 1, | |
createdAt: 2019-03-14T21:20:25.302Z, |
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
Unhandled rejection TypeError: Cannot read property 'wiki' of undefined | |
at wikiQueries.getWiki (/Users/piontekle/bloc/bloccipedia/src/controllers/wikiController.js:82:24) | |
at Collaborator.scope.findAll.then.catch (/Users/piontekle/bloc/bloccipedia/src/db/queries.wikis.js:31:11) | |
at tryCatcher (/Users/piontekle/bloc/bloccipedia/node_modules/bluebird/js/release/util.js:16:23) | |
at Promise._settlePromiseFromHandler (/Users/piontekle/bloc/bloccipedia/node_modules/bluebird/js/release/promise.js:512:31) | |
at Promise._settlePromise (/Users/piontekle/bloc/bloccipedia/node_modules/bluebird/js/release/promise.js:569:18) | |
at Promise._settlePromise0 (/Users/piontekle/bloc/bloccipedia/node_modules/bluebird/js/release/promise.js:614:10) | |
at Promise._settlePromises (/Users/piontekle/bloc/bloccipedia/node_modules/bluebird/js/release/promise.js:690:18) | |
at _drainQueueStep (/Users/piontekle/bloc/bloccipedia/node_modules/bluebird/js/release/async.js:138:12) | |
at _drainQueue (/Users/piontekle/bloc/blocci |
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
//Fizzbuzz | |
for (i=1; i<=100; i++) { | |
if (i%15 === 0) console.log ("FizzBuzz"); | |
else if (i%3 === 0) console.log ("Fizz"); | |
else if (i%5 === 0) console.log("Buzz"); | |
else console.log(i); | |
} | |
//********************************************************************************************* | |
//Subarray Sum Equals K | |
//Given an array of integers and an integer k, you need to find the total number of continuous subarrays whose sum equals to k. |
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
handleSubmit(e) { | |
e.preventDefault(); | |
const { url, name, email, subject, message } = this.state; | |
axios.post(`${url}/sendMail`, { | |
name, | |
email, | |
subject, | |
message | |
}) | |
.then((res) => { |
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
=begin | |
Given an array, find the int that appears an odd number of times. | |
There will always be only one integer that appears an odd number of times. | |
967 ms | |
=end | |
def find_it(seq) | |
#your code here | |
counts = Hash.new(0) | |
OlderNewer