1. HTTP1.1 服务器var http = require('http');var server = http.createServer(function(req,rsp){ req.on('data',function(data){ }); req.on('end',function(){ ...
分类:
Web程序 时间:
2015-11-01 15:15:13
阅读次数:
237
Array.prototype.shuffle = function() {var len = this.length;var i = len;while (i--) { var p = parseInt(Math.random() * len); var t = this[i]; this[i] ...
分类:
编程语言 时间:
2015-11-01 15:12:15
阅读次数:
151
update: function() { // Update all entities and BackgroundMaps this.parent(); // screen follows the player var player = this.getEntitiesByType( Entity...
分类:
其他好文 时间:
2015-11-01 15:10:08
阅读次数:
126
1. TCP和UDP1.1 TCP服务端var net = require('net');var server = net.createServer();server.on('connection',function(socket){ socket.setEncoding('utf8'); sock...
分类:
Web程序 时间:
2015-11-01 15:07:39
阅读次数:
337
collideWith: function(other, axis) { if (other.touches(this)) { other.kill(); } }
分类:
其他好文 时间:
2015-11-01 15:03:07
阅读次数:
159
function serialize(form){ var part=[], field=null, i, len, option, optLen, optValue; for(i=0,len=form....
分类:
其他好文 时间:
2015-11-01 12:42:09
阅读次数:
266
举例有一个js方法,接收参数:function f1(myValue){ alert(myValue); }有一个变量:var passValue="Hello World";在调用这个方法的时候(我是出现在Ajax提交的时候):@Ajax.ActionLink("文本","控制器",new{参数}...
分类:
Web程序 时间:
2015-11-01 12:40:57
阅读次数:
229
$('#example').click(function(){$("#exampleBox").toggle();})改为$('#example').click(function(){if($("#exampleBox").is(":visible")){ $("#exampleBox").hid....
分类:
Web程序 时间:
2015-11-01 12:39:39
阅读次数:
194
水水的计数题,关键在细节。 1 import java.math.BigInteger; 2 import java.util.Scanner; 3 import java.io.*; 4 5 public class Main { 6 BigInteger n0 = BigI...
分类:
其他好文 时间:
2015-11-01 12:38:33
阅读次数:
115
//文件上传页面 //ajax 实现文件上传 function ajaxFileUpload() {var picpath=""; $.ajaxFileUplo...
分类:
编程语言 时间:
2015-11-01 12:37:30
阅读次数:
194