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
//npm i body-parser express pg pg-hstore sequelize | |
//postgres - RDBMS - our database server for handeling SQL over TCP/IP | |
//PG - our connection between postgress and PG | |
//Sequelize - our ORM that behind the scenes uses pg but gives us the power of javascript objects to use our database with properties and methods | |
const express = require('express'); | |
//Create instance of express | |
const app = express(); | |
//To help us turn the body from a request into a JS object | |
const bodyParser = require('body-parser'); | |
const sequelize = require('sequelize'); |
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
//trying to find ou issues with sim performance. | |
//Chris Collins 1/14/2017 | |
(function() { | |
var _this = this; | |
// The url of the macro | |
var STAT_GOOGLE_SCRIPT_URL = "https://script.google.com/macros/s/AKfycbxxphmPhZHAL9rwckMPrJp6bOsJYRiRCeLZkefyINnGZaxA8cY/exec"; | |
// Send the data every: |
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
var lastMouseX; | |
var lastMouseY; | |
// Record the last mousePressEvent | |
function mousePressEvent(event) { | |
lastMouseX = event.x; | |
lastMouseY = event.y; | |
} | |
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
var entitiesWithServerScripts = 0 | |
function callbackClosure(i, callback) { | |
return function() { | |
return callback(i); | |
} | |
} | |
var interval = Script.setInterval(function() { | |
console.log("Checks pending:", entitiesWithServerScripts) |