- 博客(15)
- 收藏
- 关注
原创 Python中time.strptime支持的timezone
今天想用python中的time.strptime来parse一个带时区信息的时间,strptime("2008-05-26PST", "%Y-%m-%d%Z");结果显示parse error,好几种时区格式都不行,支持的只有GMT和UTC。最后看了看实现发现python回去读取系统的TZ,因此如果TZ=PST,支持的timezone就是GMT, UTC, PST。问题算是暂时解决了,只是不知道
2008-05-27 23:57:00
5372
原创 Cron job 的day saving问题
Changing the effective date to switch to DST If you wish to change the date or time at which the system switches to DST and back to Standard Time from the defaults for your zone, edit the TZ line in /
2008-05-26 12:01:00
822
原创 HTML redirect
(ZZ from Instant Web Site Tools)One of the most requested items we get is "How do I make an html redirect page".Strangely enough this is one of the easiest things to accomplish, but then anything
2007-10-26 11:45:00
8154
原创 Linux中/proc目录下文件详解
声明:可以自由转载本文,但请务必保留本文的完整性。作者:张子坚email:zhangzijian@163.com说明:本文所涉及示例均在fedora core3下得到。--------------------------------------------------------------------------------/proc文件系统下的多种文件提供的系统信息不是针对某个特定进程的,而是
2007-06-14 13:58:00
2598
原创 九月份之前要看的书
技术类1. Advanced Programming in the UNIX Environment(Required)2.Code Complete Version2(Required)3.Addison.Wesley.Pattern.Oriented.Software.Architecture,.Volume.1(Required)4.Design Patterns gof(R
2006-06-04 21:28:00
900
转载 DOS批处理脚本语言简介
一.简单批处理内部命令简介 1.Echo 命令 打开回显或关闭请求回显功能,或显示消息。如果没有任何参数,echo 命令将显示当前回显设置。 语法 echo [{on off}] [message] Sample:@echo off / echo hello world 在实际应用中我们会把这条命令和重定向符号(也称为管道符号,一般用> >> ^)结合来实现输入一些命令到特定格式的文件
2006-05-29 01:48:00
11799
原创 CAFE IN JAVA
JAVA常常被称为咖啡。其实咖啡一直就存在于JAVA之中。随便用UE打开一个.class文件,发现.class的前四个字节的十六制码就是CAFE BABE。CAFEBABE正是一个咖啡品牌。
2006-05-26 13:52:00
990
原创 Ant中设置JVM的最大内存
用ant跑一堆Junit的测试,大概是测试太多的缘故吧,跑到后来就出现OutOfMemory Exception。心想大概是JVM的内存不足(默认只有64M),于是想设置到256M网上查了一些资料说是设置ANT_OPTS的环境变量 -Xmx256M发现还是不行在单元测试里加了句System.out.println(Runtime.getRuntime().maxMemory);
2006-05-23 11:13:00
7673
原创 Java中Process的stdout, stderr的重定向,自己想的,不知道有没有更好的办法
Process ps = RunTime.getRuntime().exec("Command");InputStream out = ps.getInputStream(); //获取进程的stdout,并作为输入InputStream err = ps.getInputStream(); //获取进程的stderr,并作为输入// 为了能同时输出out 与 err,起用两个线
2006-05-23 01:45:00
6074
原创 Oracle 10g OracleOraDb10g_home1TNSListener 服务启动异常
现象:运行LSNRCTL.EXE start显示适配器错误 原因:服务OracleOraDb10g_home1TNSListener 注册表的中ImagePath键值丢失。解决方案:在注册表项KEY_LOCAL_MACHINE/SYSTEM/CurrentControlSet/Services/OracleOraDb10g_home1TNSListener中添加
2006-05-23 01:29:00
1963
原创 一个mozilla mail 收邮件的问题
今天被mozilla mail搞得半死,在linux下装了个mozilla mail只能发邮件不能收邮件后来在windows下面装了个thunderbird同样不能收邮件而且问题是一样的,下面提示host contacted, sending login inforation然后就没有下文了用ethereal 侦听,发现mozilla mail在登陆pop邮件服务器时多发了一条CAPA的命令,而我
2005-06-10 14:58:00
2113
原创 A hack for detecting stack vs heap allocated addr
Here is a simple hack that can tell whether the given address representsa stack address or a heap address. This is not portable, but variationsof it will work on many machines.boolean fromHeap (void*
2005-06-03 19:07:00
1123
原创 Sun的一个面试题(zz from newsmth)
问题描述:发信人: gpliu (云之飞扬), 信区: Programming标 题: sun的一个面试题发信站: 水木社区 (Tue May 31 17:26:03 2005), 站内/* file1.c */char buff[128];/* file2.c */extern char *buff; /* Notice: extern char buff[] */int main(){
2005-06-01 18:53:00
1650
3
原创 Java NIO Chapter1 Learning Tips
1.java.io效率低的原因But in most cases, Java applications have not truly been I/O bound in the sense that the operating system couldnt shuttle data fast enough to keep them busy. Instead, the JVMs have not
2004-10-15 08:45:00
1106
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人