- 博客(31)
- 收藏
- 关注
原创 ImageMagic
convert -resize %dx%d %s %sconvert -composite -geometry +14+0 white_80.gif src.jpg target.jpgcomposite -gravity center src.jpg white_120.gif target.jpgcomposite -gravity center src.jpg white_120...
2009-12-04 17:54:16 191
原创 mod_python 配置
mod_python安装./configure --with-apxs=/home/apache/bin/apxs --with-python=/usr/local/bin/python2.5makemake install 安装mod_python错误:apxs:Error: Command failed with rc=65536 重新安装python :...
2009-09-01 15:23:32 114
原创 Nginx + Django + SQLalchemy + MySQL
Nginx 配置:http { include mime.types; default_type application/octet-stream; sendfile on; keepalive_timeout 0; gzip on; server { listen 80...
2009-09-01 15:13:36 142
原创 http://sandbox.leigeber.com/tinybox/
http://sandbox.leigeber.com/tinybox/
2009-05-27 09:07:41 109
原创 Resin Tomcat 的 访问 IP 限制
resin:http://www.caucho.com/resin-3.0/security/authorization.xtptomcat:http://jakarta.apache.org/tomcat/tomcat-5.0-doc/config/context.html
2009-05-05 09:54:31 116
原创 linux终端 字符界面 显示乱码
方法一:配置SSH工具SecureCRT中文版配置[全局选项]→[默认会话]→[编辑默认设置]→[终端]→[外观]→[字体]→[新宋体 10pt CHINESE_GB2312]→[字符编码 UTF-8]putty配置[window]→[Appearance]→[Font settings]→[Change]→[Fixedsys CHINESE_GB2312][window]...
2009-04-14 18:22:01 260
原创 Serlvet 生命周期
1, 服务器启动,loading Servlet class <load-on-startup>正数</load-on-startup>,服务器启动时创建 Servlet 实例,默认不创建2, 客户端发送请求,创建 Servlet 实例 获取 config,调用 inint (ServletConfig config) 设置 config,调用 init () ...
2009-03-15 16:08:33 107
原创 中医养生美容
http://jiaren.org/2009/02/20/chinese-traditional-medicine-health-preserving/
2009-02-23 09:21:54 338
原创 Django 下载
f = open("mm.jpg", "rb") data = f.read() f.close() response = HttpResponse(data,mimetype='application/octet-stream') response['Content-Disposition'] = 'attachment; filename=mm.jpg' return ...
2009-02-19 17:29:17 73
原创 治近视的秘方
每天喝龙眼茶,一千度近视降到只有两百度! 此方的提供者是一名执业中的中医师兼教授,他的爸爸也是中医师。 有一天一起泡茶聊天时,聊到了这一道药方。 他的外甥曾经近视一千度,他就叫他煮用以上这道药方,每天喝。八个月后外甥的近视降到只有两百度。 这也许这是一个经过亲身体验而成功过的药方。 药方:龙眼肉+龙眼核(即带核的龙眼)、枸杞 煮法:以上叁...
2009-02-18 13:09:13 217
原创 SQL 语句
竖着的横起来select distinct sid, (select score from sc as sc2 where sc.sid=sc2.sid and sc2.cid=1) as score1, (select score from sc as sc2 where sc.sid=sc2.sid and sc2.cid=2) as score2, ...
2009-02-04 21:22:26 73
原创 FAQ
1 上传Windows文件到Linux,出现 bad interpreter: No such file or directory 执行 dos2unix -o stop.sh 设置默认python sudo ln -sf /usr/local/bin/python2.5 /usr/bin/python...
2009-01-20 11:33:47 212
原创 模拟 marquee
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html><head><style>* { margin: 0; padding: 0;}#r...
2009-01-15 13:22:30 95
原创 收藏夹 侯用
1.Flex+PyAmf+Django+MySQL http://blog.eshangrao.com/2008/02/16/447/
2009-01-06 15:31:57 75
原创 安装软件
[code="java"]yum install gcc yum install xinetdyum install gcc gcc-c++[/code]
2009-01-05 16:03:34 78
原创 压缩解压
tar -cvf data.tar data/ 仅打包,不压缩tar -tvf data.tar 查看tar -xvf data.tar 解压 tar -zcvf data.tar.gz data/ 打包后,以 gzip 压缩tar -ztvf data.tar.gz 查看tar -zxvf data.tar.gz 解压 tar -jcvf data.tar.bz2 data/ 打...
2009-01-05 16:02:48 82
原创 防火墙
查看状态 /etc/init.d/iptables status 会得到一系列信息,说明防火墙开着。关闭 /etc/init.d/iptables stop永久关闭: chkconfig --level 35 iptables off
2009-01-05 16:02:10 87
原创 CSS 选择符
一.选择符模式 模式/含义/内容描述 * 匹配任意元素。(通用选择器) E 匹配任意元素 E (例如一个类型为 E 的元素)。(类型选择器) E F 匹配元素 E 的任意后代元素 F 。(后代选择器) E > F 匹配元素 E 的任意子元素 F 。(子选择器) E:first-child 当元素 E 是它的父元素中的第一个子元素时,匹配元素 E 。(:fir...
2009-01-02 22:32:24 110
原创 Div 遮挡 Flash
<div style="height: 97px; width: 255px; position: relative;"> <div style="height: 97px; width: 255px;"> <object height="97" width="255" data="/static/images/xnw/thelook/mo
2008-12-25 15:12:31 82
原创 MySQL 字符集
1.编译 MySQL 时,指定了一个默认的字符集,这个字符集是 latin1;这个是我们不能改变的。2.安装 MySQL 时,可以在配置文件 (my.ini) 中指定一个默认的的字符集,如果没指定,这个值继承自编译时指定的。3.启动 mysqld 时,可以在命令行参数中指定一个默认的的字符集,如果没指定,这个值继承自配置文件中的(my.ini)。4.此时 character_set_server ...
2008-12-20 14:39:32 102
瞅瞅谁在调用
class BackEyeTest { public void backeye() { StackTraceElement stack[] = (new Throwable()).getStackTrace(); for (int i=0; i<stack.length; i++) { StackTraceElement ste = ...
2008-10-04 22:19:40 75
原创 编码--整理
ISO8859-1(Latin-1) 属于单字节编码,最多能表示的字符范围是0-255,应用于英文系列ANSI: 使用2个字节来代表一个字符的各种汉字延伸编码方式,称为ANSI编码 在简体中文系统下,ANSI 编码代表 GB2312 编码 不同 ANSI 编码之间互不兼容ASCII(ISO-646) 一个ASCII码值占一个字节(8个二进制位),其最高位(b7)用作奇偶校验位。...
2008-10-04 21:19:57 175
struts学习
public void init() throws ServletException { initInternal(); // MessageResources, 初始化Struts框架内在的消息资源,如系统日志相关的通知、警告和错误消息 initOther(); // ConvertUtils 注册 initServlet(); initChain(); ModuleConfig m...
2008-10-04 19:41:14 73
struts-config.xml
struts-config.xml ( display-name?, description?, data-sources?, form-beans?, <!-- 属性 --> <!ELEMENT form-bean (icon?, display-name?, description?, set-property*, form-property*)> ...
2008-10-04 19:39:43 66
日期与字符串的转换
Date now = new Date(System.currentTimeMillis()); String s = "1985-2-14 1:2:0"; Timestamp t = Timestamp.valueOf(s); System.out.println(t); System.out.println(t.toString()); DateFormat...
2008-09-21 14:31:13 68
表单中的span标签中的字符不能完整显示问题
今天,填充页面,表单中的span标签中的字符不能完整显示(IE): 进入页面时,有时可以显示,有时不显示,点击“刷新”(ajax的)时,就不能显示;用鼠标圈选时,字符出现。最后发现是form标签的背景着色了,去掉form标签的背景色,就OK了。 也有可能是不规范的 float 使用方式造成的...
2008-03-20 23:09:21 1613
设置为首页
[code="js"]function setHomePage_me(obj) { //设置为首页 if (document.all) { obj.style.behavior='url(#default#homepage)';obj.setHomePage('http://www.xunSir.lee.com') } else { if...
2008-03-17 22:12:34 129
添加到收藏夹
[code="js"]function addBookmark(title,url) { //添加到收藏夹 if (window.sidebar) { window.sidebar.addPanel(title, url,""); } else if( document.all ) { window.external.AddFavor...
2008-03-17 22:06:12 78
页面图片显示(按比例缩放)
[code="js"]function scaleImage(ImgD, FitWidth, FitHeight){ var width = ImgD.width, height = ImgD.height; var w = width / FitWidth, h = height / FitHeight; if (w >= h) { //宽度固定,高度缩放 ...
2008-03-17 21:58:00 744
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人