Skip to content

Instantly share code, notes, and snippets.

@kenwebb
Last active June 6, 2023 12:13
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kenwebb/933bd9a79cd5350f05e1d69f94c6487e to your computer and use it in GitHub Desktop.
Save kenwebb/933bd9a79cd5350f05e1d69f94c6487e to your computer and use it in GitHub Desktop.
Broccoli
<?xml version="1.0" encoding="UTF-8"?>
<!--Xholon Workbook http://www.primordion.com/Xholon/gwt/ MIT License, Copyright (C) Ken Webb, Mon Jun 05 2023 15:32:46 GMT-0400 (Eastern Daylight Saving Time)-->
<XholonWorkbook>
<Notes><![CDATA[
Xholon
------
Title: Broccoli
Description:
Url: http://www.primordion.com/Xholon/gwt/
InternalName: 933bd9a79cd5350f05e1d69f94c6487e
Keywords:
My Notes
--------
5 June 2023
Project with Andrea
References
----------
(1) nutritionfacts.org
]]></Notes>
<_-.XholonClass>
<PhysicalSystem/>
<Food>
<Broccoli/>
<MustardPowder/>
</Food>
<Cell/>
<Enzyme>
<Myrosinase/>
</Enzyme>
<Sulforaphane/>
<SulforaphanePrecursor>
<Glucoraphanin/>
</SulforaphanePrecursor>
</_-.XholonClass>
<xholonClassDetails>
<!--<Block>
<port name="height" connector="Height"/>
</Block>-->
</xholonClassDetails>
<PhysicalSystem>
<Cell>
<Glucoraphanin count="1000"/>
<Myrosinase multiplicity="1"/>
<Sulforaphane count="0"/>
</Cell>
</PhysicalSystem>
<Blockbehavior implName="org.primordion.xholon.base.Behavior_gwtjs"><![CDATA[
var a = 123;
var b = 456;
var c = a * b;
if (console) {
console.log(c);
}
//# sourceURL=Blockbehavior.js
]]></Blockbehavior>
<Myrosinasebehavior implName="org.primordion.xholon.base.Behavior_gwtjs"><![CDATA[
var me, pre, product;
var beh = {
postConfigure: function() {
me = this.cnode.parent();
pre = me.prev();
product = me.next();
pre.count = Number(pre.count);
product.count = Number(product.count);
},
act: function() {
me.println(me.name());
me.println(`${pre.count} -> ${product.count}`);
pre.count--;
product.count += 1;
}
}
//# sourceURL=Myrosinasebehavior.js
]]></Myrosinasebehavior>
<Brickbehavior implName="org.primordion.xholon.base.Behavior_gwtjs"><![CDATA[
$wnd.xh.Brickbehavior = function Brickbehavior() {}
$wnd.xh.Brickbehavior.prototype.postConfigure = function() {
this.brick = this.cnode.parent();
this.iam = " red brick";
};
$wnd.xh.Brickbehavior.prototype.act = function() {
this.brick.println("I am a" + this.iam);
};
//# sourceURL=Brickbehavior.js
]]></Brickbehavior>
<Brickbehavior implName="org.primordion.xholon.base.Behavior_gwtjs"><![CDATA[
console.log("I'm another brick behavior");
]]></Brickbehavior>
<SvgClient><Attribute_String roleName="svgUri"><![CDATA[data:image/svg+xml,
<svg width="100" height="50" xmlns="http://www.w3.org/2000/svg">
<g>
<title>Block</title>
<rect id="PhysicalSystem/Block" fill="#98FB98" height="50" width="50" x="25" y="0"/>
<g>
<title>Height</title>
<rect id="PhysicalSystem/Block/Height" fill="#6AB06A" height="50" width="10" x="80" y="0"/>
</g>
</g>
</svg>
]]></Attribute_String><Attribute_String roleName="setup">${MODELNAME_DEFAULT},${SVGURI_DEFAULT}</Attribute_String></SvgClient>
</XholonWorkbook>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment