var trs = document.getElementsByTagName("tr");trs[0].className="color2"; //设置css样式。 不兼容火狐!兼容火狐,ie的写法为:var cls = trs[0].getAttribute('class');// 添加clas...
分类:
Web程序 时间:
2014-07-08 23:54:03
阅读次数:
366
#!/bin/bashbackdir=/home/shaowei/dbbakdbuser='dbusername'dbpass='dbpasswd'dblist=$(ls -p /var/lib/mysql | grep / | tr -d /)today=$(date +%Y%m%d)mkdir ...
分类:
数据库 时间:
2014-07-06 23:25:17
阅读次数:
301
在对数据库的操作中,有时一个操作往往涉及到多张表,为了避免出现向5张表中插入记录,结果插入到第三张的时候出错,结果最后导致第一二张表已插入数据,而后面三张没有插入所带来的数据不一致的情况,我们在写代码的时候需要用事务来约束。如下: //事物,保证数据的一致性 using (Tr...
分类:
其他好文 时间:
2014-07-06 21:44:46
阅读次数:
184
/×width:expression(this.width>100&&this.width>this.height?100:true);height:expression(this.height>100?100:true);width:expression(this.width>100?100:tr...
分类:
Web程序 时间:
2014-07-06 19:53:57
阅读次数:
228
http://www.w3.org/TR/html4/loose.dtd"> this----$(this)区别 摘自:http://blog.csdn.net/lushuaiyin/article/details/7609389
分类:
Web程序 时间:
2014-07-06 18:44:38
阅读次数:
185
一、智能指针
tr1::shared_ptr和tr1::weak_ptr。前者的作用有如内置指针,但会记录有多少个tr::shared_ptrs共同指向同一个对象,这便是所谓的引用计数。一旦最后一个这样的指针被销毁,也就是一旦某一个对象的引用计数为0,这个对象会被自动删除。这在非环形数据结构中防止资源泄露很有帮助,但如果两个或多个对象内含tr1::shared_ptrs并形成环状,...
分类:
其他好文 时间:
2014-07-06 11:43:58
阅读次数:
186
class BTNode:
def __init__(self, val):
self.left = None
self.right = None
self.val = val
'''
@ construct tree by inorder & preorder
'''
def constructByInPre(inorder, instart, inend, preorde...
分类:
其他好文 时间:
2014-07-06 00:34:00
阅读次数:
234
1 2 $("#pwd").live("click",function(){//① 3 $(this).parents("tr").find("#a_cannel").text("取消"); 4 user=$(this).parents("tr").fin...
分类:
其他好文 时间:
2014-07-05 18:35:49
阅读次数:
397
http://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&page=show_problem&category=&problem=4147
题意:给定一个字符串,以及若干单词,求有几种方式能用单词组成字符串
我先是dp方程推得有问题不知怎么修改搞得卡了很久,然后就是数组开得太小一直RE
tr...
分类:
其他好文 时间:
2014-07-04 07:40:01
阅读次数:
278
Given inorder and postorder traversal of a tree, construct the binary tree.
分类:
其他好文 时间:
2014-07-03 19:13:08
阅读次数:
187