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
| for change in list(changes['in']): | |
| match = stratParmExp.match(change) | |
| if match: | |
| for outChange in list(changes['out']): | |
| outMatch = stratParmExp.match(outChange) | |
| if outMatch: | |
| if outMatch.group(1) == match.group(1) and \ | |
| outMatch.group(2) == match.group(2): | |
| finalChanges.append(change) | |
| changes['out'].remove(outChange) |
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
| # ideal inputs/output | |
| changesIn = [ | |
| "<UpdateECBAttribute Compound='15CP31_STA' ECB='STATION' ParmName='CFGOPT' ParmValue='1280'/>", | |
| "<UpdateECBAttribute Compound='15CP31_STA' ECB='STATION' ParmName='MARCY' ParmValue='0'/>", | |
| "<UpdateBlockAttribute Strategy='15E11_CE1' Block='HMI' ParmName='IN_6' ParmValue='0'/>", | |
| "<UpdateBlockAttribute Strategy='15E11_CE1' Block='HMI' ParmName='IN_3' ParmValue='0'/>", | |
| "<UpdateBlockAttribute Strategy='15E11_CE1' Block='HMI' ParmName='IN_4' ParmValue='0'/>" | |
| ] |
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
| <!DOCTYPE HTML> | |
| <html> | |
| <head> | |
| <script type="text/javascript" src="kinetic.js"></script> | |
| <script type="text/javascript" src="map.js"></script> | |
| </head> | |
| <body> | |
| <div id="container"></div> | |
| <script type="text/javascript" src="kinetictest.js"></script> | |
| </body> |
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
| var map = [ | |
| { | |
| "x": 0, | |
| "y": 0, | |
| "terrain": "occupied", | |
| "village": { | |
| "name": "Greece", | |
| "level": 4 | |
| } | |
| }, |
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
| <!DOCTYPE HTML> | |
| <html> | |
| <head> | |
| <script type="text/javascript" src="kinetic.js"></script> | |
| <script type="text/javascript" src="map.js"></script> | |
| </head> | |
| <body> | |
| <div id="container"></div> | |
| <script type="text/javascript" src="kinetictest.js"></script> | |
| </body> |
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
| <table id="report"> | |
| <thead> | |
| <th></th> | |
| <th colspan="3" class="collheader">Change #1</th> | |
| <th colspan="3" class="collheader">Change #2</th> | |
| <th colspan="3" class="collheader">Change #3</th> | |
| </thead> | |
| <tbody> | |
| <tr id="header"> | |
| <th></th> |
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
| class ReportsController < ApplicationController | |
| def index | |
| end | |
| def village | |
| @village = Village.find(params[:id]) | |
| @changes = @village.changes_with_score | |
| @resource = @village |
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
| <table id="report"> | |
| <thead> | |
| <th></th> | |
| <th colspan="3" class="collheader">Change #1</th> | |
| <th colspan="3" class="collheader">Change #2</th> | |
| <th colspan="3" class="collheader">Change #3</th> | |
| </thead> | |
| <tbody> | |
| <tr id="header"> | |
| <th></th> |
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
| class Change < ActiveRecord::Base | |
| before_validation { |change| change.name.capitalize! } | |
| has_many :conversations, dependent: :destroy | |
| has_many :discussions, through: :conversations | |
| has_many :groups, through: :discussions | |
| validates :name, presence: true, uniqueness: true | |
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
| # SQLite version 3.x | |
| # gem install sqlite3 | |
| # | |
| # Ensure the SQLite 3 gem is defined in your Gemfile | |
| # gem 'sqlite3' | |
| development: | |
| adapter: postgresql | |
| encoding: UTF-8 | |
| database: OTIS_development | |
| pool: 5 |