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
/* | |
** | |
** Copyright 2009, The Android Open Source Project | |
** | |
** Licensed under the Apache License, Version 2.0 (the "License"); | |
** you may not use this file except in compliance with the License. | |
** You may obtain a copy of the License at | |
** | |
** http://www.apache.org/licenses/LICENSE-2.0 | |
** |
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
static public native void onFBEvent( String jsEvName , String javaArg1 , String javaArg2 ); | |
static{ | |
System.loadLibrary( "HypFacebook" ); | |
} | |
private static GLSurfaceView _mSurface = (GLSurfaceView) GameActivity.getInstance().getCurrentFocus(); | |
private void onFBEventWrapper( final String arg0, final String arg1, final String arg2 ) { | |
_mSurface.queueEvent(new Runnable() { | |
@Override | |
public void run() { |
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
var QueryString = function () { | |
// This function is anonymous, is executed immediately and | |
// the return value is assigned to QueryString! | |
var query_string = {}; | |
var query = window.location.search.substring(1); | |
var vars = query.split("&"); | |
for (var i=0;i<vars.length;i++) { | |
var pair = vars[i].split("="); | |
// If first entry with this name | |
if (typeof query_string[pair[0]] === "undefined") { |
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
Options -MultiViews | |
RewriteEngine On | |
RewriteBase /website | |
RewriteCond %{REQUEST_FILENAME} !-f | |
RewriteRule ^(.*)$ web/$1 [QSA,L] |
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 | |
* | |
* NME port by fermmm | |
* http://fermmm.wordpress.com/ | |
* | |
* Released under MIT license: | |
* http://www.opensource.org/licenses/mit-license.php | |
* |
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
var Robot = function(robot) { | |
robot.ahead(100); | |
robot.clone(); | |
}; | |
Robot.prototype.onIdle = function(ev) { | |
var robot = ev.robot; | |
robot.ahead(50); | |
robot.rotateCannon(45); | |
}; |
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) { |