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
/* we are using the assumption that every entity is constructed recursively as every child component is given an id of +1 | |
so it could be that my id is #5, but if I have 7 child components, the ID of my next neighbor (the next entity constructed by my parent, which is on the same tree level ) will be #13, because I will be constructed recursively to the lowest level first */ | |
public static void sendMessage(String methodName, Object args) | |
{ | |
int id = 5; | |
int parentId = 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
var c = "it ws a #nice and #sunny day in Berlin"; | |
c.match(/\B#\w*[a-zA-Z]\w*/g); //should return #nice and #sunny |
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 p = function() { | |
console.log("Executing the callback function"); | |
} | |
var c = function(callBack) { | |
console.log("Executing the wrapper function"); | |
} | |
c(p); |
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
#include <iostream> | |
using namespace std; | |
void theWrapperFunction(int (*fnc) ()) { | |
cout << fnc(); | |
} | |
int theCallBackFunction() { | |
return 12345; | |
} |
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
#include <iostream> | |
#include "pixel.h" | |
using namespace std; | |
typedef int (*FunctionFunc)(); // check that out!!! | |
void theWrapperFunction(FunctionFunc fnc) { | |
cout << fnc(); | |
} |
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
class TestClass { | |
var a:String; | |
public function new() { | |
this.p = "test1"; | |
} | |
} | |
.... |
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
class TestClass implements Dynamic { // this is the crucial part | |
var a:String; | |
public function new() { | |
this.p = "test1"; | |
} | |
} | |
.... |
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
#in the Extension folder: | |
haxelib run hxcpp Build.xml -Diphoneos #device | |
#or | |
haxelib run hxcpp Build.xml -Diphonesim #simulator | |
#or |
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 x = 2 // x gets a reference to the value of the scalar 2; | |
var y = x // also gets a reference to the value of the scalar 2; Please, note that y does not refer to x, but //to the value to which x refers. That will make more sense in the later examples. | |
x++; | |
y = ??? x = ??? // x == 3, while y==2, because x was given a new reference to the value of the scalar 3. Since //y points a reference to the value of the scalar 2, and not to x, it keeps the value |
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
SELECT uid,name,is_app_user FROM user WHERE is_app_user AND uid IN (SELECT uid2 FROM friend WHERE uid1 = me()) |