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
<!DOCTYPE html> | |
<html lang="zh-TW" manifest="test642.manifest"> | |
<head> | |
<meta http-equiv="Content-Type" content="text/html; charset=utf8"> | |
<script src="test642.js"></script> | |
</head> | |
<body> | |
<input type="button" value="game" id="game"><input type="button" value="update" id="update"> | |
<div id="data"></div> | |
<div id="panel"></div> |
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
<!DOCTYPE html> | |
<html lang="zh-TW"> | |
<head> | |
<meta http-equiv="Content-Type" content="text/html; charset=utf8"> | |
<style> | |
div.info { | |
border: solid 2px #336699; | |
margin: 10px; | |
padding: 5px; | |
border-radius: 5px; |
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
<!DOCTYPE html> | |
<html lang="zh-TW"> | |
<head> | |
<meta http-equiv="Content-Type" content="text/html; charset=utf8"> | |
<style> | |
div { | |
border: solid 2px #336699; | |
margin: 10px; | |
padding: 5px; | |
border-radius: 5px; |
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
onmessage = function(global) { | |
return function(e) { | |
if(e.data.indexOf('start') > -1) { | |
var str = '<table width="100%" border="1" cellspacing="0" cellpadding="2">\n'; | |
for (var i in global) { | |
if(i!=='onmessage') { | |
str += '<tr><td style="background: #AABBCC">' + i + '</td><td style="background: #DDEEFF">' + global[i] + '</td></tr>\n'; | |
} else { | |
str += '<tr><td style="background: #AABBCC">' + i + '</td><td style="background: #DDEEFF">onmessage eventHandler</td></tr>\n'; | |
} |
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
(function(global){ | |
function handleConnect(e) { | |
try { | |
if(e.ports && e.ports[0]) { | |
e.ports[0].onmessage = handleMessage(e.ports[0]); | |
} | |
} catch(e) { | |
} | |
} |
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
function Point (_x, _y) { | |
this.x = _x; | |
this.y = _y; | |
} | |
function getLine (_points) { | |
if (_points.length != 2) { | |
return false; | |
} | |
var points = new Array(); |
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
<!DOCTYPE html> | |
<html><head><meta charset="utf-8"></head> | |
<style> | |
div { | |
background: #AACCEE; | |
border: solid 1px #336699; | |
margin: 10px; | |
padding: 5px; | |
border-radius: 5px; | |
display: inline-block; |
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 http = require('http'); | |
http.createServer(function (req, res) { | |
res.writeHead(200, { | |
'Content-Type': 'text/plain', | |
'Access-Control-Allow-Origin': 'http://localhost' | |
}); | |
res.end('Hello World\n'); | |
}).listen(1337, "127.0.0.1"); | |
console.log('Server running at http://127.0.0.1:1337/ with CORS.'); |
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
function Wait(fns, done) { | |
var count = 0; | |
var results = []; | |
this.getCallback = function(index) { | |
count++; | |
return (function(waitback) { | |
return function() { | |
var i=0,args=[]; | |
for(;i<arguments.length;i++) { | |
args.push(arguments[i]); |
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
<!DOCTYPE HTML"> | |
<html> | |
<head> | |
<meta charset="utf-8" /> | |
<!-- jQuery --> | |
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.6.4/jquery.min.js"></script> | |
<!-- CSS --> | |
<style type="text/css"> |