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
| <script> | |
| (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){ | |
| (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o), | |
| m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m) | |
| })(window,document,'script','//www.google-analytics.com/analytics.js','ga'); | |
| ga('create', 'XX-XXXXXXX-XX', 'auto'); | |
| if (/\/FBIOS;/.test(navigator.userAgent) === true) { | |
| ga('set', 'referrer', 'http://www.facebook.com/__ios_webview__'); |
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 OfflineTrack, | |
| __bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; }; | |
| OfflineTrack = (function() { | |
| function OfflineTrack(dataSendFunc) { | |
| var e; | |
| this.dataSendFunc = dataSendFunc; | |
| this.pageVisibilityChanged = __bind(this.pageVisibilityChanged, this); | |
| this.doOnlineOfflineCheck = __bind(this.doOnlineOfflineCheck, this); | |
| this.sendData = __bind(this.sendData, this); |
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 OfflineTrack | |
| constructor: (@dataSendFunc) -> | |
| # dataSendFunc is a function passed in to OfflineTrack to actually store | |
| # this offline tracking data remotely - basically, I wanted to abstract this | |
| # out so that anyone can use whatever tracking system they wish. | |
| try |
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
| using System; | |
| using System.Drawing; | |
| using MonoTouch.Foundation; | |
| using MonoTouch.UIKit; | |
| using MonoTouch.JavaScriptCore; | |
| namespace jscoretest | |
| { | |
| public partial class jscore_testViewController : UIViewController | |
| { |
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
| SELECT d.unit, d.scp, d.dt, | |
| (SELECT s.dt FROM stats s WHERE s."desc" = 'REGULAR' AND s.unit = d.unit AND date(s.dt) = d.dt AND s.scp = d.scp AND EXTRACT(hour from s.dt) >= 3 ORDER BY s.dt LIMIT 1) AS start_time, | |
| (SELECT s.exits FROM stats s WHERE s."desc" = 'REGULAR' AND s.unit = d.unit AND date(s.dt) = d.dt AND s.scp = d.scp AND EXTRACT(hour from s.dt) >= 3 ORDER BY s.dt LIMIT 1) AS start_exits, | |
| (SELECT s.dt FROM stats s WHERE s."desc" = 'REGULAR' AND s.unit = d.unit AND date(s.dt) = d.dt AND s.scp = d.scp AND EXTRACT(hour from s.dt) >= 11 ORDER BY s.dt LIMIT 1) AS midday_time, | |
| (SELECT s.exits FROM stats s WHERE s."desc" = 'REGULAR' AND s.unit = d.unit AND date(s.dt) = d.dt AND s.scp = d.scp AND EXTRACT(hour from s.dt) >= 11 ORDER BY s.dt LIMIT 1) AS midday_exits | |
| FROM | |
| (SELECT DISTINCT stats.unit, stats.scp, date(stats.dt) AS dt FROM stats) | |
| as d |
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
| # As the following indicates, this script replies on the csv and async npm modules. | |
| # It reads all the files placed inside a "csvs" directory, in the same directory as this file. | |
| csv = require "csv" | |
| fs = require "fs" | |
| async = require "async" | |
| columns = ["C/A","UNIT","SCP","DATE1","TIME1","DESC1","ENTRIES1","EXITS1","DATE2","TIME2","DESC2","ENTRIES2","EXITS2","DATE3","TIME3","DESC3","ENTRIES3","EXITS3","DATE4","TIME4","DESC4","ENTRIES4","EXITS4","DATE5","TIME5","DESC5","ENTRIES5","EXITS5","DATE6","TIME6","DESC6","ENTRIES6","EXITS6","DATE7","TIME7","DESC7","ENTRIES7","EXITS7","DATE8","TIME8","DESC8","ENTRIES8","EXITS8"] | |
| outputArray = ['"ca","unit","scp","dt","desc","entries", "exits"'] |
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 hashChange = function() { | |
| var el = document.getElementById(window.location.hash.substr(1)); | |
| $(".activeTr").removeClass("activeTr").find("td").css({ | |
| "background":"", | |
| "color":"" | |
| }); | |
| $(el).parent().addClass("activeTr").find("td").css({ | |
| "background":"#08c", | |
| "color":"#fff" |
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 baseWindow = Titanium.UI.createWindow({ | |
| title: "", | |
| barColor: "#232323", | |
| title: "Front Page", | |
| backgroundImage: "images/bgpattern_dark.png" | |
| }); | |
| var mainWebView = Ti.UI.createWebView({ | |
| url:"html/index.html", | |
| backgroundColor: "transparent", |
NewerOlder