curl -s https://raw.github.com/gist/2467484/oop.js | node
This file contains 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
<scxml initial="p"> | |
<parallel id="p"> | |
<history id="h"> | |
<transition target="A.2 B.2"/> | |
</history> | |
<state id="A" initial="A.1"> | |
<state id="A.1"/> |
This file contains 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
procedure addStatesToEnter(s,root,statesToEnter,statesForDefaultEntry): | |
if isHistoryState(s): | |
if historyValue[s.id]: | |
for s0 in historyValue[s.id]: | |
addStatesToEnter(s0,getParent(s),statesToEnter,statesForDefaultEntry) | |
else: | |
for t in s.transition: | |
for s0 in getTargetStates(t.target): | |
addStatesToEnter(s0,getParent(s),statesToEnter,statesForDefaultEntry) | |
else: |
This file contains 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
<scxml xmlns="http://www.w3.org/2005/07/scxml" profile="ecmascript" version="1.0" name="scxmlRoot"> | |
<initial> | |
<transition target="A2 B2"/> | |
</initial> | |
<parallel id="P"> | |
<state id="A" initial="A1"> | |
<state id="A1"/> |
This file contains 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
<scxml xmlns="http://www.w3.org/2005/07/scxml" profile="ecmascript" version="1.0" name="scxmlRoot"> | |
<initial> | |
<transition target="P"/> | |
</initial> | |
<parallel id="P"> | |
<history id="H" type="deep"/> | |
<state id="A" initial="A1"> | |
<state id="A1"> |
This file contains 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
procedure enterStates(enabledTransitions): | |
statesToEnter = new OrderedSet() | |
statesForDefaultEntry = new OrderedSet() | |
for t in enabledTransitions: | |
if t.target: | |
LCA = findLCA([t.source].append(getTargetStates(t.target))) | |
addStatesToEnter(getTargetStates(t.target),LCA,statesToEnter,statesForDefaultEntry) | |
if isParallelState(LCA): |
This file contains 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
From 5aaf3c0a528f9863b19c7a1d99ae8a48fbc8ce64 Mon Sep 17 00:00:00 2001 | |
From: jbeard4 <[email protected]> | |
Date: Thu, 3 Mar 2011 14:24:31 -0800 | |
Subject: [PATCH] | |
--- | |
gistfile1.py | 29 +++++++++++++++++++++++++---- | |
1 files changed, 25 insertions(+), 4 deletions(-) | |
diff --git a/gistfile1.py b/gistfile1.py |
This file contains 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 PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" | |
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> | |
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en" id="facebook" class=" no_js"> | |
<head> | |
<meta http-equiv="Content-type" content="text/html; charset=utf-8" /> | |
<meta http-equiv="Content-language" content="en" /> | |
<script type="text/javascript"> | |
//<![CDATA[ | |
CavalryLogger=false;window._is_quickling_index=""; window._script_path = "\/authorize.php";window._EagleEyeSeed="cmm4";__rm = {}; | |
//]]> |
This file contains 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
<?xml version="1.0" encoding="UTF-8"?> | |
<scxml | |
xmlns="http://www.w3.org/2005/07/scxml" | |
version="1.0"> | |
<initial> | |
<transition target="a"/> | |
</initial> | |
<state id="a"></state> |
This file contains 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
import org.mozilla.javascript.Scriptable; | |
import org.mozilla.javascript.Function; | |
import org.mozilla.javascript.Context; | |
import org.mozilla.javascript.ScriptableObject; | |
import test.Reduced; | |
class TestReduced { | |
public static void main(String[] args){ | |
Reduced reduced = new Reduced(); |
OlderNewer