2013年12月6日
摘要: use xml.dom.minidom 注释xml元素和去除xml注释。code is: #!/usr/bin/env pythonfrom xml.dom import minidomimport sys'''get the first web system element, like: Note, should have only one web system element, if have multiple, the other will be ignored.'''def getWebSystemElement(xmlPath): do 阅读全文
posted @ 2013-12-06 17:23 lpthread 阅读(1221) 评论(0) 推荐(0) 编辑
  2013年12月5日
摘要: 转载:http://stackoverflow.com/questions/8764017/commenting-and-uncommenting-xml-via-python 1 from xml.dom import minidom 2 3 xml = """\ 4 5 6 7 8 9 """10 11 def comment_node(node):12 comment = node.ownerDocument.createComment(node.toxml())13 node.parentNode.replaceChild(c 阅读全文
posted @ 2013-12-05 18:13 lpthread 阅读(385) 评论(0) 推荐(0) 编辑
  2013年12月1日
摘要: 转载数据准备createtablestudent( snovarchar2(10)primarykey, snamevarchar2(20), sagenumber(3), ssexvarchar2(5));createtableteacher(tnovarchar2(10)primarykey,tnamevarchar2(20));createtablecourse( cnovarchar2(10), cnamevarchar2(20), tnovarchar2(20), constraintpk_courseprimarykey(cno,tno));createtablesc( snova 阅读全文
posted @ 2013-12-01 10:17 lpthread 阅读(609) 评论(0) 推荐(0) 编辑
  2013年11月30日
摘要: 在默认安装情况下,oracle的内存分配是按系统内存的大小比例分配的,内存比较大的情况下,oracle所占的内存也大,该情况下,我们一般要修改sga值来减少系统中oracle的内存过大问题。用dba身份进入oracle,笔者在plsql中对数据库进行管理:show parameter sga; --显示内存分配情况alter system set sga_max_size=200m scope=spfile; --修改占用内存的大小 阅读全文
posted @ 2013-11-30 23:05 lpthread 阅读(293) 评论(0) 推荐(0) 编辑
摘要: 什么是脏数据,脏读,不可重复读,幻觉读?以下几个术语常见于数据库文章、论文。操作系统分析中亦有涉及。 脏读就是指当一个事务正在访问数据,并且对数据进行了修改,而这种修改还没有提交到数据库中,这时,另外一个事务也访问这个数据,然后使用了这个数据。因为这个数据是还没有提交的数据,那么另外一个事务读到的这个数据是脏数据,依据脏数据所做的操作可能是不正确的。 不可重复读是指在一个事务内,多次读同一数据。在这个事务还没有结束时,另外一个事务也访问该同一数据。那么,在第一个事务中的两次读数据之间,由于第二个事务的修改,那么第一个事务两次读到的数据可能是不一样的。这样就发生了在一个事务内两次读到的数据是不一 阅读全文
posted @ 2013-11-30 21:56 lpthread 阅读(364) 评论(0) 推荐(0) 编辑
摘要: 转载:Spring 自从2003年发布以来,一直是Java开源框架的奇迹之一。从2000年开始,伴随着B/S架构逐渐引入企业应用软件开发的领域,Java就逐渐成为企业应用开发的主流技术,一直到2003年,Struts+EJB一直是Java技术架构的不二选择,然而这一切随着2003年Spring以 without EJB的面目出现之后,一切都开始改变。大概从2003年下半年开始,Spring+Hibernate就开始甚嚣尘上,似乎那时候的Spring和Hibernate尚且不足以动摇J2EE规范以EJB为核心的领袖地位。但是2004年5月份,吸收了 Spring/Hibernate框架优点的EJ 阅读全文
posted @ 2013-11-30 21:12 lpthread 阅读(667) 评论(0) 推荐(0) 编辑
  2013年11月15日
摘要: 1 ''' 2 merge two configure files, basic file is aFile 3 insert the added content of bFile compare to aFile 4 for example, 'bbb' is added content 5 ----------------------------------------------------------- 6 a file content | b file content | c merged file content 7 111 | 111... 阅读全文
posted @ 2013-11-15 14:30 lpthread 阅读(244) 评论(0) 推荐(0) 编辑
  2013年11月6日
摘要: show current session id select sid from v$mystat where rownum=1;show blocking session select blocking_session,sid,serial#,wait_class,seconds_in_wait fromv$sessionwhereblocking_session is not NULLorder byblocking_session; 阅读全文
posted @ 2013-11-06 14:32 lpthread 阅读(474) 评论(0) 推荐(0) 编辑
摘要: Basic operationsu - oracle sqlplus / as sysdba show parameter background show parameteruser_dump_dest background_dump_dest: path_to_trace_file deadlook error code is:ORA-00060Refer to dead lock article http://asktom.oracle.com/pls/asktom/f?p=100:11:0::::P11_QUESTION_ID:1528515465282one examp... 阅读全文
posted @ 2013-11-06 14:14 lpthread 阅读(366) 评论(0) 推荐(0) 编辑
摘要: 问题 ThreadA invoke ThreadB, and then update DB ThreadB read DB, expect the update DB is finished by ThreadA But in some condition, Thread A update DB is slow, ThreadB have finished and update DB is not started.解决 UseReentrantLock 阅读全文
posted @ 2013-11-06 11:21 lpthread 阅读(170) 评论(0) 推荐(0) 编辑