代码改变世界

简述Javascript中call apply

2011-12-30 22:19 by chen.simon, 249 阅读, 0 推荐, 收藏, 编辑
摘要:1 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> 2 <html> 3 <head> 4 <meta http-equiv="Content-Type" content="text/html; charset=GB18030"> 5 <title>Insert title here</titl 阅读全文

python 解析XML expat方式

2011-12-07 22:42 by chen.simon, 902 阅读, 0 推荐, 收藏, 编辑
摘要:python 解析XML expat方式将xml转换成python对象树今天项目组一个同事要写这样的代码,他之前都是写Java 没用过python,我回来翻了下pythonCookBook这个书449页有讲贴代码# -*- codeing:utf-8 -*- '''Created on 2011-12-7@author: simon'''from xml.parsers import expatclass Element(object): ''' element ''' def __init__(s 阅读全文

Struts2源码分析 初步2--Dispatcher初始化细节(1)

2011-11-29 00:35 by chen.simon, 590 阅读, 0 推荐, 收藏, 编辑
摘要:Struts2源码初步学习—Dispatcher初始化细节先贴代码 12345678910111213141516171819202122232425262728293031323334/*** Load configurations, including both XML and zero-configuration strategies,* and update optional settings, including whether to reload configurations and resource files.*/publicvoidinit(... 阅读全文

Struts2源码分析 初步1 --如何入手以及做了哪些初始化

2011-11-29 00:26 by chen.simon, 842 阅读, 0 推荐, 收藏, 编辑
摘要:前一阵写了个struts 源码阅读环境的搭建(struts2 src study 准备工作) 但是一直没有写阅读心得 最近将之逐渐完成那个阅读源码环境搭建的文章 也适合其他框架的源码阅读struts2基本流程The Struts 2 Request Flowhttp://struts.apache.org/2.0.8/docs/the-struts-2-request-flow.html其实这就是struts2的架构对于一次请求 更详细的流程 ,暂时看不懂的可以先跳过来自http://www.xuecs.com/blog/?p=98从web.xml说起在http://struts.apache 阅读全文

tomato固件 路由简单玩 BT 电驴 amule highId python 其实dd wrt也一样 含 amule_2.2.6-1_mipsel.ipk下载

2011-11-27 20:23 by chen.simon, 1630 阅读, 0 推荐, 收藏, 编辑
摘要:tomato固件 其实dd wrt也一样1. 安装软件(python为例)拷贝路由etc的所有文件及,目录道 移动硬盘的etcmount -o bind <移动硬盘etc路径> /tmp/etcmount -o bind <移动硬盘opt路径> /opt解压缩opt.tar.gz(在http://code.google.com/p/oleg-for-mss-base/downloads/list 下载)找到ipkgipkg装好后再装pythonroot@tomato:/tmp/mnt/MD2/route_sw/opt/program/python26# ipkg ins 阅读全文

ubuntu eclipse easyexplore 替代品 open explorer

2011-10-22 18:01 by chen.simon, 384 阅读, 0 推荐, 收藏, 编辑
摘要:ubuntu eclipse easyexplore 替代品 open explorer在win上有easyexplore但是在ubuntu 上 要设置target 我发现我的10.4 设置target为 nautilus还是么有效果后来发现https://github.com/samsonw/OpenExplorer/downloadshttps://github.com/downloads/samsonw/OpenExplorer/OpenExplorer_1.5.0.v201108051513.jar可以搞定 阅读全文

正则表达式基础 多选结构 加不加括号大不同

2011-09-24 22:27 by chen.simon, 425 阅读, 0 推荐, 收藏, 编辑
摘要:/^\d{1,2}|1\d{2}$//^(\d{1,2}|1\d{2})$/这两组正则表达式 加不加括号效果是不一样的测试代码<html><head><title>Test reg</title></head><body><input type="text" id="test_input" value=""><input type="button" value="test reg" onclick=&quo 阅读全文

css tips 1(不太正规,随手记)

2011-05-14 22:41 by chen.simon, 387 阅读, 0 推荐, 收藏, 编辑
摘要:1. debug 技巧 去除之前引入的css文件 去除不必要的dtd(诸如eclipse建的jsp文件自带的dtd声明,会引发一些问题) netbeans 能自动提示 能告诉你非标准标签 能找到你缺的半边div 或者table之类的 (举个例子 就是你有4个<div> 但是你只有3个</div> 当你页面上的元素很多 几百行时 找起来就困难了 用netbeans就很容易发现 他会提示的)2. 块级元素 线性元素 display none block inline3. document.getElementById("testdiv").style.d 阅读全文

Ubuntu10.10 下usb鼠标不动了

2011-04-28 22:19 by chen.simon, 1468 阅读, 0 推荐, 收藏, 编辑
摘要:Ubuntu10.10 下usb鼠标不动了昨天晚上回来发现鼠标不动了1. 尝试对BIOS放电,没有效果。lsusb如下Bus 005 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hubBus 004 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hubBus 003 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hubBus 002 Device 001: ID 1d6b:0001 Linux Foundation 1.1 阅读全文

struts2 src study 准备工作 和 略谈 如何读开源代码(Java)

2011-03-05 22:12 by chen.simon, 765 阅读, 0 推荐, 收藏, 编辑
摘要:第一个最简单的struts2工程,将xworks-core和struts-core的lib包替换成源码,然后需要的jar包有:E:\simon\debug_workspace_0225\s2-src-study\WebContent\WEB-INF\lib>tree /f卷 新加卷 的文件夹 PATH 列表卷序列号为 DC32-D1F0E:. asm-3.0.jar asm-commons-3.0.jar commons-collections-3.2.jar commons-fileupload-1.2.1.jar commons-io-1.3.2.jar commons-lang-2 阅读全文