场景:
长时间数据库操作致使DB会话超时,多发在后台脚本,可以预估脚本执行时间,在每次执行前重新获取DB预防程序中断
/**
* Get new mysql conn
* @param $timeout int default 1440s optional
* @return object
**/
public static...
分类:
数据库 时间:
2015-05-07 16:44:19
阅读次数:
162
https://www.englishforums.com/English/WentOrHaveGone/vdcl/post.htmI went to the store.I have gone to the store.Which is correct and what is the differ...
分类:
其他好文 时间:
2015-05-07 00:50:49
阅读次数:
160
DescriptionFarmer John has gone to town to buy some farm supplies. Being a very efficient man, he always pays for his goods in such a way that the sma...
分类:
其他好文 时间:
2015-05-01 16:00:49
阅读次数:
165
DescriptionBessie has gone to the mall's jewelry store and spies a charm bracelet. Of course, she'd like to fill it with the best charms possible from...
分类:
其他好文 时间:
2015-04-30 21:38:11
阅读次数:
124
The Modern JavaScript Developer’s ToolboxPosted by David Haney on Mar 09, 2015The Web Platform has gone a long way since HTML5 was first made popular ...
分类:
编程语言 时间:
2015-04-27 00:05:14
阅读次数:
201
在自定义view中打log,view的显示共有三种,visible、invisible和gone,分别看一下log:goneonVisibilityChangedconstruct 2 parametersonFinishInflateonVisibilityChangedonVisibilityC...
分类:
移动开发 时间:
2015-04-25 22:31:18
阅读次数:
255
Charm BraceletTime Limit: 1 SecMemory Limit: 256 MB题目连接http://poj.org/problem?id=3624DescriptionBessie has gone to the mall's jewelry store and spies ...
分类:
其他好文 时间:
2015-04-25 13:37:10
阅读次数:
98
android view的setVisibility方法值的意思
有三个值 visibility One of VISIBLE, INVISIBLE, or GONE.
常量值为0,意思是可见的
常量值为4,意思是不可见的
常量值为8,意思是不可见的,而且不占用布局空间
Java代码
// 设置显示
tv_main_title.se...
分类:
移动开发 时间:
2015-04-22 18:31:23
阅读次数:
157
【题目链接】:Click
here~~
【题目大意】:
一个人去钓鱼,在一条单向路上的旁边有n个湖,并且从湖i到湖i+1需要ti的时间,每个湖里面有fi条鱼,每钓一次鱼,鱼会减少di条。在给定时间T内,问如何才能使钓的鱼最多,并记录在各个湖上停留的时间。
【解题思路】
此题细节处理好多麻烦,一定要认真看清题意,POJ WA了无数遍,纠结一天。参考了别人的题解,思路如下:
首先须注...
分类:
其他好文 时间:
2015-04-14 21:42:07
阅读次数:
178
写了一个python程序,采用阻塞方式获取redis队列信息,这个队列信息可能好几天才会有新的队列信息put到队列中。在获取到队列信息后,会将获取到的队列信息通过MySQLdb模块写入MySQL数据库中。如果长时间没有队列中没有信息的话,比如1天以上,在1天之后,有队列信息抵达redis队..
分类:
数据库 时间:
2015-04-07 19:56:49
阅读次数:
205