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> | |
html, body, div, span, applet, object, iframe, | |
h1, h2, h3, h4, h5, h6, p, blockquote, pre, | |
a, abbr, acronym, address, big, cite, code, | |
del, dfn, em, img, ins, kbd, q, s, samp, | |
small, strike, strong, sub, sup, tt, var, |
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 WebSocketServer = require('websocket').server; | |
var http = require('http'); | |
var server = http.createServer(function(request, response) { | |
console.log((new Date()) + ' Received request for ' + request.url); | |
response.writeHead(404); | |
response.end(); | |
}); | |
server.listen(8000, function() { |
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 FwAjax3(host, cb) { | |
var req = function() { | |
try{ return new XMLHttpRequest();} catch(e){} | |
try{ return new ActiveXObject("Msxml2.XMLHTTP.6.0") }catch(e){} | |
try{ return new ActiveXObject("Msxml2.XMLHTTP.3.0") }catch(e){} | |
try{ return new ActiveXObject("Msxml2.XMLHTTP") }catch(e){} | |
try{ return new ActiveXObject("Microsoft.XMLHTTP") }catch(e){} | |
return null; | |
}(), | |
boundary = function () { |
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
<html> | |
<body> | |
<input id="msg" type="text"> | |
<input id="send" type="button" value="send"> | |
<input id="file" type="file"> | |
<div id="panel" style="border:solid 1px #336699"></div> | |
<div id="info" style="border:solid 1px #336699"></div> | |
<div id="img"><img id="imgtarget"></div> | |
</body> | |
</html> |
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 ObjectId(str) { | |
return str; | |
} | |
var Subject = { | |
"data": { | |
"4f5ca201e7a3792f5e000003": { | |
"_id": ObjectId("4f5ca201e7a3792f5e000003"), | |
"childId": ObjectId("4f5ca5939da509475e000003"), | |
"name": "資產類", |
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
<html> | |
<head> | |
<meta http-equiv="Content-Type" content="text/html; charset=utf8"> | |
<title>按 Alt 鍵,對 Div 裡的 Label 文字進行多選,一起移動、改變字型大小(IE only)</title> | |
<style type="text/css"> | |
.drag{ | |
position:relative; | |
cursor:pointer; | |
cursor:hand\9; | |
} |
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 input = 2011, | |
output = 2012, | |
depthLimit = 30, | |
countLimit = 100000; | |
count = 0, | |
depth = 0, | |
comp = [ | |
function(x){return x+7}, | |
function(x){return x/2}, | |
function(x){return x*3}, |
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"> |
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
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.'); |