文件名:gencdr.py
作用:在指定的时间里每秒向testcdr.txt文件中写N行记录,N为随机数。模拟access.log。 # -*- coding: utf-8 -*- """
zhangbo2012 http://www.cnblogs.com/zhangbo2012/"""impor...
分类:
编程语言 时间:
2014-05-01 11:35:02
阅读次数:
473
环境:Ubuntu11.10,Python2.7,Mysql5.0.95在Ubuntu终端输入命令安装Python的Mysql模块sudo apt-get
install python-mysqldb就这么简单;运行一下脚本:#!/usr/bin/python#-*-coding=utf-8##im...
分类:
数据库 时间:
2014-05-01 10:54:23
阅读次数:
474
原题地址:http://oj.leetcode.com/problems/lru-cache/题意:设计LRU
Cache参考文献:http://blog.csdn.net/hexinuaa/article/details/6630384 这篇博文总结的很到位。
https://github...
分类:
编程语言 时间:
2014-05-01 10:47:16
阅读次数:
501
原题地址:http://oj.leetcode.com/problems/linked-list-cycle/题意:判断链表中是否存在环路。解题思路:快慢指针技巧,slow指针和fast指针开始同时指向头结点head,fast每次走两步,slow每次走一步。如果链表不存在环,那么fast或者fast...
分类:
编程语言 时间:
2014-05-01 10:33:38
阅读次数:
426
不干胶材料结构不干胶材料通常以基材的厚度来标识标签的厚度,50#消银龙是指面材厚度是0.05mm(2mil)标签选用应考虑的因素使用要求:永久性还是可移除性粘胶剂?
使用环境:清洁,阳光直射,化学药剂腐蚀? 基材成份:PVC,瓦楞纸箱,玻璃? 基材表面:粗糙,光滑? 基材形状:平面,圆,曲面,复杂的...
分类:
其他好文 时间:
2014-05-01 10:13:29
阅读次数:
304
Intellectual blocks result in an inefficient
choice of mental tactics or a shortage of intellectual ammunition.Expressive
blocks inhibit your vital ab...
分类:
其他好文 时间:
2014-05-01 08:26:33
阅读次数:
317
原题地址:http://oj.leetcode.com/problems/linked-list-cycle-ii/题意:如果链表中存在环路,找到环路的起点节点。解题思路:这道题有点意思。首先使用快慢指针技巧,如果fast指针和slow指针相遇,则说明链表存在环路。具体技巧参见上一篇http://w...
分类:
编程语言 时间:
2014-05-01 08:19:31
阅读次数:
340
A_byte_of_Python-v192-for_Python_3.0-中文版.pdf
中的一道题:练习题: 检测一个文本是否为回文应该忽略标点,空格和大小写。 例如”Rise to vote,
sir.”同样是一个回文,但是我们当前的例子无法识别它。你能改善这个例子让它做都这点吗?代码有点挫,莫...
分类:
其他好文 时间:
2014-05-01 06:52:33
阅读次数:
359
原题地址:http://oj.leetcode.com/problems/swap-nodes-in-pairs/题意:将链表中的节点两两交换。Given1->2->3->4,
you should return the list as2->1->4->3.解题思路:这题主要涉及到链表的操作,没什么...
分类:
编程语言 时间:
2014-05-01 06:44:21
阅读次数:
339
原题地址:http://oj.leetcode.com/problems/remove-nth-node-from-end-of-list/题意:Given
a linked list, remove thenthnode from the end of list and return its he...
分类:
编程语言 时间:
2014-05-01 06:42:15
阅读次数:
332