自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(40)
  • 收藏
  • 关注

原创 linux shell date用法

使用date命令转换基础时间秒为年月日:命令为:date -d @1281161747注意一定不要忘记符号“@” #date 获取当前时间  #date -d "-1 week" +%Y%m%d 获取上周日期(day,month,year,hour)  #date --date="-24 hour" +%Y%m%d 同上  date_now=`date +%s` s...

2011-09-22 09:53:52 147

原创 VSFTPD全攻略

/etc/vsftpd/vsftpd.conf文件详解,分好类,方便大家查找与学习#################匿名权限控制###############anonymous_enable=YES   #是否启用匿名用户no_anon_password=YES   #匿名用户login时不询问口令下面这四个主要语句控制这文件和文件夹的上传、下载、创建、删除和重命名。ano...

2011-09-19 17:23:39 461

原创 linux下添加,删除,修改,查看用户和用户组

一,组操作1,创建组groupadd test增加一个test组2,修改组groupmod -n test2 test将test组的名子改成test23,删除组groupdel test2删除 组test24,查看组a),查看当前登录用户所在的组 groups,查看apacheuser所在组groups apacheuserb),查看所有组 ca...

2011-09-19 10:44:58 168

原创 VSFTP虚拟用户创建方法

yum -y install vsftpd*yum -y install pam*yum -y install db4*一、建立一个存放用户名和密码的文件vi mima.txt (记住路径,后面要用的着)在文件里输入用户名一密码一用户名二密码二用户名三密码三保存二、生成虚拟用户帐户数据库db_load -T -t hash -f /e...

2011-09-19 10:29:07 267

JSON datetime between Python and JavaScript

import json json.dumps(d.isoformat())var d = new Date("2011-05-25T13:34:05.787000");As of Javascript 1.8.5, Date objects have a toJSON method, which returns a string in a standard format. To ...

2011-09-05 09:56:28 126

原创 解决MySQL error 1036: table is read only

改变数据库文件的宿主权限sudo chown -R mysql:mysql /var/lib/mysql重启mysql服务sudo service mysqld restart

2011-05-05 22:37:14 747

原创 UI Development using jQueryMobile

Introduction to jQueryMobile Following is an extract from jQueryMobile site - jQuery Mobile: Touch-Optimized Web Framework for Smartphones & Tablets A unified user interf...

2011-03-20 14:49:21 122

原创 Draw Graph using Graphviz ¶

First Graph Set up 1. Download graphviz from here: http://www.graphviz.org/Download..php(for Mac, use this link: http://www.graphviz.org/Download_macos.php) 2. create a file name...

2011-02-25 13:38:45 183

原创 FaceBook Setup Issue

First use this url to ask user to add your facebook app(if user not login, facebook will redirect to login page and then go to this url) https://graph.facebook.com/oauth/authorize?redirect_uri=< htt...

2011-02-25 13:37:30 133

原创 xpath Tricks

how to find the text following "" tagfor example:html source code as below: Blood Substitutes (HBOCs): Is There a Downside? Small Animal &gt; Emergency Medicine &am...

2011-02-25 13:36:08 95

原创 SVN Tricks

1. svn propedit svn:externals . ---import extension package for example:utils2 http://synnex-svn.motherapp.com/svn/synnex/utils2/2. svn commitadded utils23. svn update4. svn add...

2011-02-25 13:35:45 139

原创 Ubuntu Command Line Trick ¶

grep -r mysite * | grep -v svn --- find out all files including "mysite" except svn folderscreen -R screenname --create a screen named screenname or entry a screen named screennametail -f xxx...

2011-02-25 13:34:29 131

原创 Update WSGI App without Restart Apache ¶

1. in the apace configuration page, add the two directives before WsgiScriptAlias? WSGIDaemonProcess bug-reporter threads=25 WSGIProcessGroup bug-reporter WSGIScriptAlias / /app/bug_...

2011-02-25 13:32:38 80

原创 Set up Admin Page In Apache

Modify the settings in apache, change the media root to the own python path like this:RewriteRule? /(media)($|(\/(.*))) /usr/local/lib/python2.6/site-packages/django/contrib/admin/$0 [L]

2011-02-25 13:32:07 195

原创 Set up Brand New Django Server

Set up Brand New Django Server ¶steps to set up django server (in linux): 1. make sure set up the path of /usr/local/bin before everything 1. install httpd (remember to set mod_rewrit...

2011-02-25 13:31:06 138

原创 Making a combo-box in Titanium Appcelerator – code and video

Sometimes we need a true combobox for our projects but iPhone SDK does not have a native one (at least from what I know) and of course neither has Titanium. So we will build one. A “true” iPhone o...

2010-12-28 13:51:31 117

原创 PHP取Mac地址和绝对IP

2010-06-21 10:14:31 250

原创 借助 unoconv 批量转 xls 到 pdf文件

因为公司的一些业务需求,我需要批量的将所有的xls文件转化为pdf文件,如果一个个的点击,借助于adobe,那么无疑会需要很长的时间;相信这样子的业务需要肯定有市场的,这也意味着肯定存在这样子的软件。 网上搜索了很多软件,竟然发现这样子的软件多数为收费软件,或者存在免费软件,但是批量转的文件数量受到限制,而且转的效果并不是十分理想。 想到openoffi...

2010-05-10 14:13:39 312 1

VMware中去掉Linux报警声

将/etc/inputrc中的set bell-style none 前的#去掉,之后重启系统即可。

2010-05-05 13:09:39 132

ubuntu中安装PHP,Apache,MySQL

1、安装Apache服务sudo apt-get install apache2然后按照提示即完成apahce的安装了。这里 可以打开http://127.0.0.1,即可看于是It works首先我直接用apt-get安装了apache2,php5,pear以及mysql5, 为了方便后续的安装,还加上了make和libmysqlclientsudo apt-get ...

2010-03-17 14:45:05 98

Django学习笔记

刚学Django不久,尝试把Django-cms部署到Apache下,配置文件如下[code="java"] setHandler python-program PythonPath "['E:/workarea/python','E:/workarea/python/mysite'] + sys.path" PythonHandler django.core.handlers.m...

2010-03-10 13:53:09 133

原创 Ajax传递数据对加号变空格的处理

采用Ajax传递数据时,通常会将数据整理为data="var1=abc&var2=def"。而当数据中存在加号(+)或是连接符(&)时,服务器端接收数据时会有部分数据丢失现象。分析一下Ajax传递数据的格式与Javascript的语法不难发现:1. "+"号:JavaScript解析为字符串连接符,所以服务器端接收数据时"+"会丢失。2. "&":JavaScript解析为...

2010-01-26 15:11:33 394

原创 php GZIP javascript

2009-12-31 17:58:37 73

原创 MySQL 字符串函数大全

DING | TRAILING] [remstr] FROM] str) 返回字符串str,其所有remstr前缀或后缀被删除了。如果没有修饰符BOTH、LEADING或TRAILING给出,BOTH被假定。如果remstr没被指定,空格被删除。 mysql> select TRIM(' bar '); -> 'bar'mysql> select TRIM(LEADING...

2009-12-18 17:29:54 99

原创 sybase字符串函数

长度和语法分析 datalength(char_expr) 在char_expr中返回字符的长度值,忽略尾空 substring(expression,start,length) 返回部分字符串 right(char_expr,int_expr) 返回char_expr右边的int_expr字符 基本字符串运算 upper(char_expr) ...

2009-12-18 12:56:49 163

json转为java的vo对象

[code="java"]String str = "[{'name':'hello',age:'21'},{'name':'hello2',age:'22'},{'name':'hello3',age:'23'}]";JSONArray jsonArray = JSONArray.fromObject(str);List list = new ArrayList();for ( in...

2009-12-17 11:29:08 679

Java 防SQL 注入函数

看了网上的几个版本,感觉比较别扭,为何不直接用replaceAll呢?[code="java"]public String removeSpecialSQLChars(String sql){ if(sql != null ){ sql = sql.replaceAll("\\'|\\band\\b|\\bexec\\b|\\binsert\\b|\\bselect\\b|\\b...

2009-12-09 16:34:21 117

原创 ANT-build.xml文件详解

Ant的概念 可能有些读者并不理解什么是Ant以及如何使用它,但只要使用过Linux系统的读者,应该知道make这个命令。当编译Linux内核及一些软件的源程序时,经常要用这个命令。Make命令其实就是一个项目管理工具,而Ant所实现功能与此类似。像make,gnumake和nmake这些编译工具都有一定的缺陷,但是Ant却克服了这些工具的缺陷。 最初Ant开发者在开发跨平台的...

2009-12-01 13:42:30 73

原创 Adobe Flex – JSON Schema Tree

Last night I noticed now Zend IDE has the Data Source Explorer set up like a tree of your database and tables, columns, keys, etc.I thought that was pretty cool, so I decided to do the same thing....

2009-11-30 10:51:04 101

原创 Class IOUtils

public class IOUtilsextends java.lang.ObjectGeneral IO stream manipulation utilities. This class provides static utility methods for input/output operations. closeQuietly - these methods close...

2009-11-26 09:03:02 67

原创 org.apache.commons.io使用实例

1.文件内容拷贝:import java.io.File;import java.io.FileWriter;import java.io.IOException;import java.io.InputStream;import java.io.Writer; import org.apache.commons.io.FileUtils;import org.ap...

2009-11-26 09:01:56 128

原创 Firefox 取 TextArea的值

用value代替innerHTML才取的到刚输入的值。之前竟然没有注意到这个问题,⊙﹏⊙b汗

2009-11-06 16:34:46 116

原创 css pre 自动换行的问题

本站文章中使用了 pre 格式输出 代码。 而浏览器默认是强制不换行输出 pre 里的内容。这样的话,代码一长就出现了撑到页面外部的样子。在之前我都是有意的在代码里强制换行... 累啊. 今天有意的google了下,找到了:pre {white-space: pre-wrap; /* css-3 */white-space: -moz-pre-wrap; /* Mozilla, s...

2009-11-05 12:24:36 1078

原创 自己用的参考手册,做个网络备份

css20.zip DHTML_手册flex样式表详解iBATIS-SqlMaps-2_cniBATIS.in.Action.Jan.2007.eBook-BBL.pdf.zip jQueryDocXML2CHM-090223.zip JScript.zipStruts中文帮助.zip spring2.0-reference_final_zh_cn.chmJST...

2009-11-03 13:06:22 93

原创 Apache配置Weblogic

LoadModule weblogic_module modules/mod_wl_22.so &lt;Location /ecexpress&gt; SetHandler weblogic-handler WebLogicCluster 192.168.85.76:7001,192.168.85.76:7002   Idempotent OFF   Order Allow,Deny   ...

2009-10-28 09:21:29 113

原创 实战 Comet 应用程序开发

 级别: 中级成 富 ([email protected]), 软件工程师, IBM 中国软件开发中心2008 年 7 月 15 日Comet 是一种新的 Web 应用架构。基于这种架构开发的应用中,服务器端会主动以异步的方式向客户端程序推送数据,而不需要客户端显式的发出请求。Comet 架构非常适合事件驱动的 Web 应用,以及对交互性和实时性要求很强的应用,如股票交易行情分析、...

2009-10-26 13:58:54 298

原创 Comet:基于 HTTP 长连接的“服务器推”技术

 周 婷 ([email protected]), 软件工程师, IBM 中国软件开发技术实验室2007 年 8 月 31 日很多应用譬如监控、即时通信、即时报价系统都需要将后台发生的变化实时传送到客户端而无须客户端不停地刷新、发送请求。本文首先介绍、比较了常用的“服务器推”方案,着重介绍了 Comet - 使用 HTTP 长连接、无须浏览器安装插件的两种“服务器推”方案:基于 AJA...

2009-10-26 13:49:13 72

原创 logic:itertae标签的使用

相关文章: Struts1.2.4学习心得!(七) 面试题目 struts学习笔记(标签二) 推荐圈子: struts2 更多相关推荐 logic:iterate logic:iterate标记用于在页面中创建一个循环,以此来遍历如数组,Collection,Map这样的对象。该标记的功能强大,在 Struts应用的页面中经常使用到。 对数组进行循环遍历 ...

2009-10-20 00:37:20 100

原创 Struts多行提交

ActionForm:[code="java"]public List checkResultList = new AutoArrayList(SourceCodeCheckResult.class); public List getCheckResultList() { return checkResultList; } public void setChec...

2009-10-19 16:38:00 79

原创 ibatis批量Update

[code="java"] public boolean updateCheckRusultList(final List updateData) { try{ getSqlMapClientTemplate().execute(new SqlMapClientCallback() { public Object doInSqlMapClient(SqlMapExecu...

2009-10-19 16:33:35 176

空空如也

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除