View this code at http://livecoding.io/9160291
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
#pragma once | |
#include <array> | |
#include <random> | |
#include <limits> | |
#include <iostream> | |
#include <algorithm> | |
namespace GA{ |
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
if Meteor.isClient | |
Template.EditText = UI.Component.extend | |
kind: "Edit" | |
init: ()-> | |
self = this | |
self.textDep = new Deps.Dependency | |
self.getText = ()-> | |
self.textDep.depend() | |
self.text |
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
if Meteor.isServer | |
Meteor.publish "collection", (limit)-> | |
return collection.find({}, {limit: limit}) | |
if Meteor.isClient | |
length = 0 | |
Deps.autorun ()-> | |
count = collection.find({}).count() | |
if length <= count then length++ else length = count |