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
-- $ ./autotest.lua test579.scxml | |
enterStates( enabledTransitions:{ <transition target='s0' external> } ) | |
computeEntrySet( transitions:{ <transition target='s0' external> }, ... ) | |
addDescendantStatesToEnter( state:<state id=s0>, ... ) | |
statesToEnter:add( <state id=s0> ) | |
getEffectiveTargetStates( transition:<transition target='sh1' external> ) | |
getEffectiveTargetStates( transition:<transition target='s01' external> ) | |
-- getEffectiveTargetStates result: { <state id=s01> } | |
-- getEffectiveTargetStates result: { <state id=s01> } | |
addDescendantStatesToEnter( state:<state id=s01>, ... ) |
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
USAGE = <<ENDUSAGE | |
Usage: | |
docubot [-h] [-v] [create [-s shell] [-f]] directory [-w writer] [-o output_file] [-n] [-l log_file] | |
ENDUSAGE | |
HELP = <<ENDHELP | |
-h, --help Show this help. | |
-v, --version Show the version number (#{DocuBot::VERSION}). | |
create Create a starter directory filled with example files; | |
also copies the template for easy modification, if desired. |
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
peers = { | |
node1: :node2, | |
node2: :node1, | |
node3: :node4, | |
node4: :node3 | |
} | |
describe 'peers' do | |
peers.each do |a,b| | |
it "should have #{b} as a peer", if: Socket.gethostname=="#{a}.vagrantup.com" do |
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
puts :bar1 | |
require_relative '../lib' | |
puts :bar2 |
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 Ancestor | |
@props = {a:1, b:1, c:1} | |
def self.merged | |
(ancestors[1].respond_to?(:merged) ? ancestors[1].merged : {}).merge(@props) | |
end | |
end | |
class Child < Ancestor | |
@props = {a:2} | |
end |
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
Rammy:RUIC phrogz$ gem help build | |
Usage: gem build GEMSPEC_FILE [options] | |
[...] | |
Common Options: | |
[...] | |
-q, --quiet Silence commands | |
[...] | |
Rammy:RUIC phrogz$ gem build ruic.gemspec -q | |
Successfully built RubyGem |
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
A wrapper contains "elements" (think of an XML element). | |
A wrapper has "slides" (variations on the elements within it). | |
An element might exist on every slide of the wrapper (on the 'master slide'), | |
or it might exist only on one of the slides. | |
An element has attributes. | |
* When an element exists only on a particular slide, the attributes also exist | |
only on that slide. There is only one value for each attribute. |
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
# Returns a hash mapping image paths to arrays of the assets referencing them | |
def image_usage | |
{}.tap do |usage| | |
asset_types = app.metadata.by_name.values + @class_by_ref.values | |
image_properties_by_type = asset_types.flat_map do |type| | |
type.properties.values | |
.select{ |property| property.type=='Image' || property.type == 'Texture' } | |
.map{ |property| [type,property] } | |
end.group_by(&:first).tap{ |x| x.each{ |t,a| a.map!(&:last) } } |
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 Person | |
attr_reader :firstname, :lastname | |
def initialize( first, last ) | |
@firstname, @lastname = first, last | |
end | |
def say_hi | |
puts "Hello, my name is #{@firstname} #{@lastname}" | |
end | |
end |
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 lang='en'><head> | |
<meta charset='utf-8'> | |
<title>RB3Jay</title> | |
<script src='/jquery.min.js'></script> | |
<script src='/rb3jay.js'></script> | |
<script src='/faye/client.js'></script> | |
</head><body> | |
<div id='playing'> |