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
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>Conway's Game of Life</title> | |
</head> | |
<body> | |
<canvas width="300" height="300" id="grid"></canvas> | |
<button id="start">Start</button> |
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
# reset root password | |
sudo su | |
service mysql stop | |
/usr/sbin/mysqld --skip-grant-tables --skip-networking | |
mysql | |
FLUSH PRIVILEGES; | |
SET PASSWORD FOR 'root'@'localhost' = PASSWORD('newpass'); | |
/etc/init.d/mysql stop | |
/etc/init.d/mysql start | |
# create user for database |
- Create
collections/policies
&models/policies
. Look for previously created collections and models for example. - Create appropriate relationship for
models/company
initialize: function() {
this.buildRelation('policies', require('collections/policies'));
}
- Create
views/collection.models/policy
,views/app/collections/policies
,views/app/layouts/ policies
. Also create appropriate templates for these views. Look for previously created views and templates for example. - Create
routes/app
route
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
{ | |
"Human": "Man", | |
"Man": { | |
"home": "Home", | |
"office": "Office" | |
}, | |
"Home": ["Building.homeFactory", { | |
"kitchen": "ManHomeKitchen#clean" | |
}] | |
, |
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
import Header from './components/header'; | |
import TeamCity from 'promise!./services/teamcity'; | |
Promise.all([TeamCity]).then(function(TeamCity) { | |
// module code | |
}); |
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
[{ | |
"a": "hahaha" | |
}] |
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
from scipy.optimize import linprog | |
c = [-6, -3, 2, 1, 14] # x_1 + x_2 - 2x_3 - x_4 -> max | |
# Ax <= b | |
A = [[0, 0, 0, 1, 2], [3, 0, 2, 0, -4], [0, -1, 3, 0, 0]] | |
b = [-4, 25, 6] | |
x0_bounds = (1, 4) | |
x1_bounds = (-1, 3) | |
x2_bounds = (-2, 2) | |
x3_bounds = (1, 4) | |
x4_bounds = (-3, 1) |
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
maximize (6a+3b-2c-d-14e) if ((d+2e)=-4; (3a+2c-4e)=25; (-b+3c)=6; 1<=a<=4; -1<=b<=3; -2<=c<=2 ; 1<=d<=4; -3<=e<=1) |
OlderNewer