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
/* | |
* Copyright (c) 2010 Home Box Office, Inc. as an unpublished | |
* work. Neither this material nor any portion hereof may be copied | |
* or distributed without the express written consent of Home Box Office, Inc. | |
* | |
* This material also contains proprietary and confidential information | |
* of Home Box Office, Inc. and its suppliers, and may not be used by or | |
* disclosed to any person, in whole or in part, without the prior written | |
* consent of Home Box Office, Inc. | |
*/ |
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
score = 0; | |
function getScore() | |
return score | |
end | |
function setScore(value) | |
score = value | |
Runtime:dispatchEvent({name="onScoreChanged"}) | |
end |
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
var test = { | |
foo: function() | |
{ | |
console.debug("I'm foo."); | |
}, | |
bar: function() | |
{ | |
console.debug("I'm bar."); | |
console.debug("calling foo: ", test.foo()); | |
} |
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
void getToken() | |
{ | |
print("getToken"); | |
getTokenService = new GetTokenService(); | |
getTokenService.getToken().then((ServiceEvent event) | |
{ | |
login(); | |
}); | |
} |
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
function stop() | |
if circlespawner ~= nil then | |
timer.cancel(spawnCircle) | |
circlespawner = nil | |
end | |
end | |
function start() | |
stop() | |
circlespawner = timer.performWithDelay(1000, spawnCircle,0) |
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
Remote Address:127.0.0.1:8000 | |
Request URL:http://localhost:8000/workoutapi/get_token | |
Request Method:GET | |
Status Code:200 OK | |
Request Headersview source | |
Accept:*/* | |
Accept-Encoding:gzip,deflate,sdch | |
Accept-Language:en-US,en;q=0.8,es;q=0.6 | |
Cache-Control:no-cache | |
Connection:keep-alive |
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
Remote Address:127.0.0.1:8000 | |
Request URL:http://localhost:8000/workoutapi/login_user | |
Request Method:OPTIONS | |
Status Code:200 OK | |
Request Headersview source | |
Accept:*/* | |
Accept-Encoding:gzip,deflate,sdch | |
Accept-Language:en-US,en;q=0.8,es;q=0.6 | |
Access-Control-Request-Headers:x-csrftoken, content-type | |
Access-Control-Request-Method:POST |
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
Remote Address:127.0.0.1:8000 | |
Request URL:http://localhost:8000/workoutapi/login_user | |
Request Method:POST | |
Status Code:403 FORBIDDEN | |
Request Headersview source | |
Accept:*/* | |
Accept-Encoding:gzip,deflate,sdch | |
Accept-Language:en-US,en;q=0.8,es;q=0.6 | |
Cache-Control:no-cache | |
Connection:keep-alive |
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
List myList = new List(); | |
Stream myStream = new Stream.fromIterable(myList); | |
StreamController controller = new StreamController(); | |
controller.stream.listen((_) | |
{ | |
print("stream listen, data: $_"); | |
}); | |
controller.addStream(myStream) | |
.then((_) |
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
List myList = new List(); | |
Stream myStream = new Stream.fromIterable(myList); | |
StreamController controller = new StreamController.broadcast(); | |
controller.addStream(myStream) | |
.then((_) | |
{ | |
print("ready"); | |
myList.add("sup"); | |
}) |