03 2015 档案

摘要:1.MySQLdb模块,建立完连接,创建cursor的时候,可以指定cursor的类型默认类型的cursor,也就是下面这种方式cursor = conn.cursor()在用select语句选择一些row出来之后,不能用column的名称来引用值,只能用位置序号,比如下面的selectselect... 阅读全文
posted @ 2015-03-18 13:52 Truezion
摘要:1.>>>操作符为无符号右移参考LeetCode 191 阅读全文
posted @ 2015-03-17 22:49 Truezion
摘要:TIME_WAIT这个状态出现在主动断开链接的一端用netstat -alntp查看的时候,会发现处于TIME_WAIT状态的连接,一般都没有程序名,如下所示tcp 0 0 192.168.201.114:49410 192.168.201.101:3306 TIME_WAIT... 阅读全文
posted @ 2015-03-16 16:25 Truezion
摘要:关于计算资源调度器(Capacity Scheduler)For providing the necessary elasticity, the Capacity Scheduler allocates free resources to any queue beyond its guarantee... 阅读全文
posted @ 2015-03-11 15:47 Truezion
摘要:箴言: The key is to implement the solution cleanly without dealing with each edge case separately. (关键是要清晰的实现,而不是针对每种边界情况都特殊处理)写了这么多程序,总结出以下容易出错的地方溢出,... 阅读全文
posted @ 2015-03-07 17:20 Truezion
摘要:这个问题很常见了,只要找到最优子结构就好办了最优子结构为max[i] = Math.max(max[i-1] + num[i], num[i])其中max[i]为以第i个元素为右边界的子数组的最大值,num为输入的int数组下面给出解法public int maxSumArray(int[] num... 阅读全文
posted @ 2015-03-02 17:07 Truezion