Skip to content

Instantly share code, notes, and snippets.

View automata's full-sized avatar

Vilson Vieira automata

View GitHub Profile
loadGraph({
"id": "ti6yn",
"project": "",
"properties": {
"name": "photobooth",
"environment": {
"runtime": "html",
"src": "preview/iframe.html",
"width": 300,
"height": 300,
public static void foobar(String s) {
Window.alert(s);
}
public static native void exportStaticMethod() /*-{
$wnd.foobar = $entry(@de.cau.klay.gwt.client.layout.KlayExampleLayouter::foobar(Ljava/lang/String));
}-*/;
@automata
automata / foo.js
Created February 3, 2014 21:05
smallest noflo JSON graph to testing
window.foobar('{"processes": {"dom/GetElement_f4nkd": {"component": "dom/GetElement", "metadata": {"x": 324,"y": 144,"label": "startButton"}},"interaction/ListenMouse_1w3vt": {"component": "interaction/ListenMouse","metadata": {"x": 324,"y": 288,"label": "clickStart"}}}, "connections": [{"src": {"process": "dom/GetElement_f4nkd","port": "element"},"tgt": {"process": "interaction/ListenMouse_1w3vt","port": "element"},"metadata": {"route": "10"}}]}')
{"id":"root","children":[{"id":"interaction/ListenMouse_1w3vt","labels":[{"text":"clickStart"}],"width":92,"height":72,"ports":[{"id":"interaction/ListenMouse_1w3vt_element","width":10,"height":10,"properties":{"de.cau.cs.kieler.portSide":"NORTH"}},{"id":"interaction/ListenMouse_1w3vt_click","width":10,"height":10,"properties":{"de.cau.cs.kieler.portSide":"SOUTH"}}]},{"id":"gum/GetUserMedia_9e9i4","labels":[{"text":"webCam"}],"width":92,"height":72,"ports":[{"id":"gum/GetUserMedia_9e9i4_start","width":10,"height":10,"properties":{"de.cau.cs.kieler.portSide":"NORTH"}},{"id":"gum/GetUserMedia_9e9i4_url","width":10,"height":10,"properties":{"de.cau.cs.kieler.portSide":"SOUTH"}}]},{"id":"dom/SetAttribute_uto4k","labels":[{"text":"setVideoSrc"}],"width":92,"height":72,"ports":[{"id":"dom/SetAttribute_uto4k_value","width":10,"height":10,"properties":{"de.cau.cs.kieler.portSide":"NORTH"}},{"id":"dom/SetAttribute_uto4k_element","width":10,"height":10,"properties":{"de.cau.cs.kieler.portSide":"NORTH"}}]},{"id":"seriou
java.lang.ArrayIndexOutOfBoundsException: 38
at de.cau.cs.kieler.klay.layered.p1cycles.GreedyCycleBreaker.updateNeighbors(GreedyCycleBreaker.java:257)
at de.cau.cs.kieler.klay.layered.p1cycles.GreedyCycleBreaker.process(GreedyCycleBreaker.java:188)
at de.cau.cs.kieler.klay.layered.KlayLayered.layout(KlayLayered.java:642)
at de.cau.cs.kieler.klay.layered.KlayLayered.doLayout(KlayLayered.java:142)
at de.cau.klay.gwt.client.layout.JsonGraphImporter.recLayout(JsonGraphImporter.java:131)
at de.cau.klay.gwt.client.layout.JsonGraphImporter.recLayout(JsonGraphImporter.java:124)
at de.cau.klay.gwt.client.layout.JsonGraphImporter.layout(JsonGraphImporter.java:108)
at de.cau.klay.gwt.client.KlayGWT.layout(KlayGWT.java:77)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[{
"children": [
{
"height": 72,
"id": "interaction/ListenMouse_1w3vt",
"labels": [{
"height": 0,
"text": "clickStart",
"width": 0,
"x": 0,
@automata
automata / noflo.json
Last active August 29, 2015 13:56
photobooth graph demo
{
"id": "ti6yn",
"project": "",
"properties": {
"name": "photobooth",
"environment": {
"runtime": "html",
"src": "preview/iframe.html",
"width": 300,
"height": 300,
//function klayinit () {
(function () {
"use strict";
Array.prototype.clean = function() {
for (var i = 0; i < this.length; i++) {
if (this[i] === null) {
this.splice(i, 1);
i--;
}
@automata
automata / kgraph.json
Created March 5, 2014 17:55
KGraph for photobooth NoFlo Graph
{"id":"photobooth","children":[{"id":"interaction/ListenMouse_1w3vt","labels":[{"text":"clickStart"}],"width":72,"height":108,"ports":[{"id":"interaction/ListenMouse_1w3vt_element","width":10,"height":10,"properties":{"de.cau.cs.kieler.portSide":"WEST"}},{"id":"interaction/ListenMouse_1w3vt_click","width":10,"height":10,"properties":{"de.cau.cs.kieler.portSide":"EAST"}}]},{"id":"gum/GetUserMedia_9e9i4","labels":[{"text":"webCam"}],"width":72,"height":108,"ports":[{"id":"gum/GetUserMedia_9e9i4_start","width":10,"height":10,"properties":{"de.cau.cs.kieler.portSide":"WEST"}},{"id":"gum/GetUserMedia_9e9i4_url","width":10,"height":10,"properties":{"de.cau.cs.kieler.portSide":"EAST"}}]},{"id":"dom/SetAttribute_uto4k","labels":[{"text":"setVideoSrc"}],"width":72,"height":108,"ports":[{"id":"dom/SetAttribute_uto4k_attribute","width":10,"height":10,"properties":{"de.cau.cs.kieler.portSide":"WEST"}},{"id":"dom/SetAttribute_uto4k_value","width":10,"height":10,"properties":{"de.cau.cs.kieler.portSide":"WEST"}},{"id":"dom
"$klay.layout error:" {type: "de.cau.cs.kieler.klay.gwt.client.layout.UnsupportedJsonGraphException", text: "All elements of the 'edges' property must be objects.", value: 4, context: Object, stacktrace: "Unknown.on(Unknown Source)
Unknown.CA(Unknown Source)
Unknown.uE(Unknown Source)
Unknown.TD(Unknown Source)
Unknown.JD(Unknown Source)
Unknown.oE(Unknown Source)
Unknown.DD(Unknown Source)
Unknown.Kn(Unknown Source)
Unknown.On(Unknown Source)
Unknown.Nn/<(Unknown Source)