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
package com.onavo.android.common.ui; | |
import android.view.View; | |
import android.view.ViewGroup; | |
import java.util.LinkedList; | |
import java.util.List; | |
/** | |
* Based on http://stackoverflow.com/a/8831593/37020 by by Shlomi Schwartz |
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
package ; | |
abstract JsonMap<T>({ }) from {} { | |
public function new() this = {}; | |
public function exists(key:String) return Reflect.hasField(this, key); | |
public function get(key:String) return Reflect.field(this, key); | |
public function set(key:String, value:T) Reflect.setField(this, key, value); | |
public function keys():Array<String> return Reflect.fields(this); | |
public function remove(key:String) return Reflect.deleteField(this, key); | |
public function iterator():Iterator<T> { |
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
/** | |
* stats.hx | |
* http://github.com/mrdoob/stats.as | |
* | |
* Released under MIT license: | |
* http://www.opensource.org/licenses/mit-license.php | |
* | |
* How to use: | |
* | |
* addChild( new Stats(engine) ); |
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
// helpers | |
function areEnemies(robot, sighted) { | |
var sightedIsChild = (robot.id == sighted.parentId); | |
var sightedIsParent = (robot.parentId == sighted.id); | |
return !(sightedIsChild || sightedIsParent); | |
}; | |
function baseStep(robot) { |
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
Index: include/hx/StdLibs.h | |
=================================================================== | |
--- include/hx/StdLibs.h (revision 559) | |
+++ include/hx/StdLibs.h (working copy) | |
@@ -32,6 +32,7 @@ | |
void __hxcpp_print(Dynamic &inV); | |
void __hxcpp_println(Dynamic &inV); | |
void __trace(Dynamic inPtr, Dynamic inData); | |
+void __hxcpp_stdlibs_boot(); | |