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
// start tracing to "/sdcard/calc.trace" | |
Debug.startMethodTracing("calc"); | |
// stop tracing | |
Debug.stopMethodTracing(); | |
//copy to host | |
adb pull /sdcard/calc.trace /tmp | |
//view |
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
/* source: | |
Martin Jespersen | |
http://stackoverflow.com/questions/4671031/print-function-log-stack-trace-for-entire-program-using-firebug | |
*/ | |
function logStackTrace(levels) { | |
var callstack = []; | |
var isCallstackPopulated = false; | |
try { | |
i.dont.exist += 0; //doesn't exist- that's the point |
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
<!DOCTYPE HTML> | |
<html> | |
<head> | |
<meta charset="utf-8"> | |
<script src="plugins/plugin-loader.js"></script> | |
<link rel="stylesheet" href="plugins/plugin-loader.css"> | |
<script> | |
var PORT = 3000; | |
var ROOT_DIRECTORY = "client/" | |
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
Application = function(){}; | |
Application.prototype = new EventDispatcher(); | |
window.App = new Application(); |
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
window.App.httpServer = {}; | |
var PORT = 3000; | |
var ROOT_DIRECTORY = "client/" | |
var httpServer = new monaca.HttpServer(ROOT_DIRECTORY, PORT); | |
App.httpServer.start = function(){ | |
httpServer.start(function(response){ | |
App.trigger('httpServer:started', response); |
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
window.App.webSocketServer = {}; | |
var PORT = 3001; | |
var socketServer = new monaca.WebSocketServer(PORT); | |
socketServer.onClientConnected = function(client){ | |
App.trigger('client:connected', client); | |
}; | |
socketServer.onClientDisconnected = function(client){ |
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 host = window.location.hostname; | |
var port = 3001; | |
var serverAddress = host + ":" + port; | |
console.log('serverAddress:' + serverAddress); | |
var websocket = new WebSocket("ws:" + serverAddress); | |
websocket.onmessage = function(message){ | |
console.log('onmessage: ', message); | |
if(message.data === "jump"){ |
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
<my-widget> | |
<p>This is my paragraph text.</p> | |
</my-widget> | |
var app = angular.module("MyApp", []); | |
app.directive("myWidget", function() { | |
return { | |
restrict: "E", | |
transclude: true, | |
template: "<h3>Heading</h3>" |
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
open -a Google\ Chrome --args --disable-web-security |
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 game = new Phaser.Game(800, 600, Phaser.AUTO, 'phaser-example', { preload: preload, create: create }); | |
var emitter; | |
function preload() { | |
game.load.image('diamond', 'assets/sprites/diamond.png'); | |
} |
OlderNewer