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
require 'dm-core' | |
DataMapper.setup(:default, 'sqlite::memory:') | |
class Project | |
include DataMapper::Resource | |
property :id, Serial | |
has n, :members | |
has n, :users, :through => :members |
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
% Run a Monty Hall problem simulation with the following parameters: | |
% | |
% changeDoors: boolean determining whether the contestant should change | |
% doors | |
% | |
% doors: the number of doors in the problem, with a minimum of 2 | |
% | |
% N: the number of problem simulations to perform, with a minimum | |
% of 1 | |
% |
NewerOlder