web
terry1989
这个作者很懒,什么都没留下…
展开
-
Filter for *.jsp
<br />package com.util;<br />import java.io.IOException;<br />import javax.servlet.Filter;<br />import javax.servlet.FilterChain;<br />import javax.servlet.FilterConfig;<br />import javax.servlet.ServletException;<br />import javax.servlet.ServletRequest;<原创 2011-03-30 08:26:00 · 327 阅读 · 0 评论 -
json type string 转 js json object.
1. eval(). function ConvertStringToJsonForJs() { var testJson = '{"family_name":"huang","family_mamber":[{"age":"12","name":"zheng"},{"age":"12","name":"yuen"}]}'; testJson原创 2013-01-07 16:32:53 · 310 阅读 · 0 评论 -
node.js learning example 2 (非阻塞)
1. index.js.var server = require("./server");var router = require("./router");var requestHandlers = require("./requestHandlers");var handle = {}handle["/"] = requestHandlers.begin;handle["/be原创 2013-01-10 18:19:25 · 361 阅读 · 0 评论 -
node.js learning example 1 (阻塞)
1.index.jsvar server = require("./server");var router = require("./router");var requestHandlers = require("./requestHandlers");var handle = {}handle["/"] = requestHandlers.begin;handle["/begi原创 2013-01-10 17:21:48 · 422 阅读 · 0 评论 -
JavaScript跨域 --待续
JSONP思路:尽管浏览器不允许页面中的脚本程序跨域读取数据,但却允许HTML引用跨域的资源,如图片,CSS和脚本程序。JSONP Client.JS. function jsonpCallback(result){ alert(result); alert(result[1].name); } <!--原创 2012-10-24 14:21:35 · 543 阅读 · 0 评论 -
json learning.
1. JSON 语法可以表示三种类型的值。简单值。(字符串,数值,布尔值,null。不支持undefined。)对象。数组。2. JSON对于字符串的标准是使用双引号。3. JSON对象字面量要给属性加双引号。4. JSON对象有两个方法stringify() 和 parse();stringify(‘JavaScript对象’,[过滤器],[字原创 2013-01-15 16:00:47 · 257 阅读 · 0 评论 -
java object 转 json
package com.***.at.******.delegate.taxinfo;import java.io.IOException;import java.util.ArrayList;import java.util.HashMap;import java.util.Map;import org.codehaus.jackson.JsonGenerationExceptio原创 2013-01-07 16:22:44 · 821 阅读 · 0 评论 -
iframe 待续
1. iframe add content.contaner.find('#alertDetailBox').contents().find('body').append(html);jQuery('#..).contents().find('body').append(content);原创 2013-03-21 15:51:13 · 496 阅读 · 0 评论 -
Eclipse debug 使用技巧
http://blog.csdn.net/niqinwen/article/details/8965340转载 2014-10-16 17:06:02 · 426 阅读 · 0 评论 -
Customizing chart bar color. Make the bar can filld with picture.
(function() { var idCounter = 0, base = Highcharts.Renderer.prototype.color; Highcharts.Renderer.prototype.color = function(color, elem, prop) { if (color && color.pattern原创 2012-10-18 15:58:40 · 696 阅读 · 0 评论 -
Highcharts set the min height for (column-stacked-and-grouped) chart.
The mian way.1.use axis.translate function to convert value to pixel and backwardpoint to pixel:plot_y = chart.yAxis[0].translate(point_y)pixel to point, simply add "true" as second para原创 2012-11-26 16:41:49 · 1143 阅读 · 0 评论 -
The Top 10 Javascript MVC Frameworks Reviewed
http://codebrief.com/2012/01/the-top-10-javascript-mvc-frameworks-reviewed/1. Ember.js转载 2012-08-13 18:30:12 · 472 阅读 · 0 评论 -
Filter过滤jsp实现自动登陆
<br />package com.util;<br />import java.io.IOException;<br />import javax.servlet.Filter;<br />import javax.servlet.FilterChain;<br />import javax.servlet.FilterConfig;<br />import javax.servlet.ServletException;<br />import javax.servlet.ServletRequest;<原创 2011-04-07 13:37:00 · 693 阅读 · 0 评论 -
js 实现 Privileged 方法
function Container(param) { function dec() { if (secret > 0) { secret -= 1; return true; } else { return false; } } thi原创 2012-03-12 16:57:06 · 394 阅读 · 0 评论 -
dojo 混入 miXin 例子
var plant = {};var fruit = dojo.mixin(plant,{location : 'china',color : 'red'});var apple = dojo.mixin(fruit,{name : 'apple',color : 'blue'});console.log(plant);console.log(fruit);原创 2012-03-13 11:39:03 · 736 阅读 · 0 评论 -
dojo 委托 delegate 例子
var Plant = {};var Fruit = dojo.mixin(Plant,{location : 'china',color : 'red',toString : function(){console.log("china red...");}});var Apple = dojo.delegate(Fruit,{name : 'apple',原创 2012-03-13 11:41:05 · 662 阅读 · 0 评论 -
js 调用 function 的多种方式
http://devlicious.com/blogs/sergio_pereira/archive/2009/02/09/javascript-5-ways-to-call-a-function.aspxJavaScript, 5 ways to call a functionThis post is part of a series called Jav转载 2012-03-13 10:48:57 · 2071 阅读 · 0 评论 -
js 实现继承功能(类似java extends)
Function.prototype.method = function (name, func) { this.prototype[name] = func; return this;};Function.method('inherits', function (parent) { var d = {}, p = (this.prototype = new转载 2012-03-13 11:15:49 · 1670 阅读 · 0 评论 -
Javascript Best Practices
http://www.javascripttoolbox.com/bestpractices/appreciate for additional !!!转载 2012-03-14 09:22:41 · 422 阅读 · 1 评论 -
js 递归 best practice
知识点.JS 函数内部有两个特殊对象 arguments 和 this.arguments 对象中有一个属性 callee. 该属性是一个指针,指向拥有这个arguments对象的函数。例子.function getJ(num){//Function expression 1. if(num <= 1){ return 1; }else{ return n原创 2012-06-21 15:17:41 · 425 阅读 · 0 评论 -
DOS批处理
dos批处理获取当前文件路径的两种方式:1.set pa=%~dp0 echo %pa%2.echo %cd%原创 2015-09-01 15:43:07 · 373 阅读 · 0 评论