打印SQL语句$this->dbRead->last_query(); 重映射方法正如上文所说,URI 的第二段通常决定控制器的哪个方法被调用。CodeIgniter 允许你使用 _remap() 方法来重写该规则: public function _remap($method){ if ($met ...
分类:
其他好文 时间:
2016-04-05 12:30:07
阅读次数:
113
利用浏览器缓存,可以使得页面加载速度提高,也减轻服务端压力。有几个比较重要点如下: 1. 浏览器是如何判断缓存是否过期? 2. 服务端如何判断缓存已失效? 3. 为什么有了Last-Modified还要Etag? 4. 200 OK( from cache )和 304 Not Modified的区 ...
分类:
其他好文 时间:
2016-04-04 22:26:03
阅读次数:
229
#include<stdio.h>
inthalf_search(intarr[],intfirst,intlast,intn)
{
intmid=0;
while(first<=last)
{
mid=(first+last)/2;
if(n<arr[mid])
{
last=mid-1;
}
elseif(n>arr[mid])
{
first=mid+1;
}
else
{
return1;
}
}
return-1;
}
intmain()
{
intarr[]={1,3..
分类:
其他好文 时间:
2016-04-04 13:24:22
阅读次数:
159
#netstat -n | awk ‘/^tcp/ {++S[$NF]} END {for(a in S) print a, S[a]}’ LAST_ACK 14SYN_RECV 348ESTABLISHED 70FIN_WAIT1 229FIN_WAIT2 30CLOSING 33TIME_WAI ...
分类:
其他好文 时间:
2016-04-04 13:09:36
阅读次数:
145
栈(stack) 是限定在表尾进行插入或删除操作的线性表,这是栈的定义,所有从本质上来说栈仍旧是线性表的特殊延伸。对栈来说,表尾端有特殊的含义,代表着栈顶(top),相应的,表头端为栈底(bottom)。如果一个栈不含元素,则称其为空栈。栈遵循的是后进先出LIFO结构,即Last In First ...
分类:
编程语言 时间:
2016-04-04 10:18:24
阅读次数:
251
将链表分成三段,中间一段reverse后再链接。 链表中节点位置从1开始计数。 注意m可能为1,所以要加上if(last == start) head = end; 不然会丢失数据,因为reverse后head是reverse一段的最后一节点,只返回head的话head之前的节点全部丢失。 4ms ...
分类:
其他好文 时间:
2016-04-03 23:30:50
阅读次数:
198
Defense Lines After the last war devastated your country, you - as the king of the land of Ardenia - decided it washigh time to improve the defense of ...
分类:
编程语言 时间:
2016-04-03 20:25:15
阅读次数:
233
HDU 4333 Description One day Silence is interested in revolving the digits of a positive integer. In the revolving operation, he can put several last ...
分类:
其他好文 时间:
2016-04-03 18:53:53
阅读次数:
196
背景:我们在做数据迁移或者拆分的时候,使用Tablespace transcation 这种解决方案时,很有可能就会遇到 从库复制出错,报: Last_SQL_Errno: 1146 那么具体错误内容可能会有如下: Last_SQL_Error: Error 'Table 'spider.tb_ci ...
分类:
数据库 时间:
2016-04-02 18:42:38
阅读次数:
1218
私货: Our integrity sells for so little, but it is all we really have. It is the very last inch of us. But within that inch we are free. 我们的正直诚实并不值钱,但却是 ...
分类:
编程语言 时间:
2016-04-02 17:26:48
阅读次数:
203