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 haxe.macro.Context; | |
import haxe.macro.Expr; | |
using haxe.macro.ExprTools; | |
using haxe.macro.MacroStringTools; | |
using StringTools; | |
class Test { | |
static function replace(e:Expr,symbol:String) { |
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 js.Browser; | |
@:build(com.dongxiguo.continuation.Continuation.cpsByMeta(":async")) | |
@:tink class AsyncFlow { | |
static inline function sleep(n:Int,next:Void->Void) untyped setTimeout(next,n); | |
static inline function rq(fn:Void->Void,next:Void->Void) { | |
Browser.window.requestAnimationFrame(function(b) { | |
fn(); | |
next(); |
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
JSONPANEL(function() { | |
return { | |
initialize: function(element) { | |
var logo = veespo.get.custom().panel.logo; | |
html = ""; | |
html += '<div id="logo" style="background-image: url('+logo+');position: absolute;top: 5px;margin-left: auto;width: 100%;height: 216px;z-index: -1;background-repeat: no-repeat;margin-right: auto;background-position: 50% 50%;"></div>'; | |
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
/* | |
The widget use jsonp for loading the code of the panel. | |
The object panel consist of 2 methods: | |
initialize: | |
initialize the panel. The unique parameter is the reference to the dom elememnt of the panel. This method is used to start the parts of the panel (dependencies,render,...) | |
render: | |
called for every vote. | |
This method has 2 params: | |
element: the DOM element of the panel | |
response: a javascript object with the properties: |
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
using Lambda; | |
import js.html.*; | |
enum Select { | |
cssClass(className:String); | |
tag(tagName:String); | |
query(selector:String); | |
} | |
@:forward |
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
/* | |
The widget use jsonp for loading the code of the panel. | |
The object panel consist of 2 methods: | |
initialize: | |
initialize the panel. The unique parameter is the reference to the dom elememnt of the panel. This method is used to start the parts of the panel (dependencies,render,...) | |
render: | |
called for every vote. | |
This method has 2 params: | |
element: the DOM element of the panel | |
response: a javascript object with the properties: |
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
<div id="counter1">0</div> | |
<div id="counter2">0</div> | |
<div id="counter3">0</div> |
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
<div id="counter1"></div> | |
<span id="counter2"></span> | |
<span id="incr">[+]</span> |
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
lib = do | |
sum: ([a,b], callback) -> callback a + b | |
square: (a) -> a * a | |
stream = (worker) -> (message,...params) -> Bacon.from-promise worker[message](params) | |
stream-pool = (workers) -> | |
cnt = 0 | |
max = workers.length - 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
<div id="list"></div> |