How do I use bash for loop to repeat certain task under Linux / UNIX operating system? How do I set infinite loops using for statement? How do I use t...
分类:
其他好文 时间:
2014-10-14 05:05:07
阅读次数:
249
voidngx_process_events_and_timers(ngx_cycle_t*cycle){ngx_uint_tflags;ngx_msec_ttimer,delta;if(ngx_timer_resolution){timer=NGX_TIMER_INFINITE;flags=0;}...
分类:
其他好文 时间:
2014-10-10 13:18:24
阅读次数:
167
题目:求从s开始的递增序列(每次加1),求出他们加和不小于D的那个最后的加数。
分析:数学题,分治。s + s+1 + ... + n = n*(n+1)/2 - s*(s-1)/2 = (n+s)*(n-s+1)/2。
直接二分答案即可(二分范围0~10^8)。
说明:(⊙_⊙)。
#include
#include
using namespace st...
分类:
其他好文 时间:
2014-09-29 20:56:21
阅读次数:
275
rsyslog分为服务端和客户端客户端rsyslog配置文件配置一下几条比较有用$ActionQueueTypeLinkedList#useasynchronousprocessing开启缓存队列$ActionQueueFileNamebackup_local#setfilename,alsoenablesdiskmode如果客户端挂了,缓存队列写到本地backup_local这个变量上面已经定..
分类:
其他好文 时间:
2014-09-23 13:22:04
阅读次数:
407
网上有很多方法来禁用系统的默认效果,这里贴上来我认为最简单的方法。
overridePendingTransition(Animation.INFINITE, Animation.INFINITE);
这句话一般是我们用来替换自己的自定义的activity效果。
直接用Animation类下的infinity即可。
就看不到系统那个突突的切换效果了。
好了,小伙伴们开始愉快的...
分类:
移动开发 时间:
2014-09-18 23:50:34
阅读次数:
227
题目链接:点击打开链接
#include
#include
typedef unsigned long long ll;
const int key = (int)(1e9) + 7;
const int N = 150010;
char b[N], a[N + N];
ll xp[N], h[N + N];
int len;
void get() {
char ch;
wh...
分类:
其他好文 时间:
2014-09-18 16:31:24
阅读次数:
170
Description
Assume the coasting is an infinite straight line. Land is in one side of coasting, sea in the other. Each small island is a point locating in the sea side. And any radar installation, l...
分类:
其他好文 时间:
2014-09-18 14:53:34
阅读次数:
213
NaN&INF定义
在一些情况会出现无效的浮点数,例如除0,例如负数求平方根等,像这类情况,获取到的浮点数的值是无效的。
NaN 即 Not a Number 非数字
INF 即 Infinite 无穷大...
分类:
其他好文 时间:
2014-09-10 14:17:40
阅读次数:
908
无限滚动(Infinite Scroll)也成为自动分页、滚动分页和无限分页。常用在图片、文章或其它列表形式的网页中,用来在滚动网页的时候自动加载下一页的内容。Infinite Scroll 这款 jQuery & WordPress 无限滚动插件可以帮助你轻松实现这个效果。
分类:
Web程序 时间:
2014-09-09 15:39:18
阅读次数:
210
Alternating Sum
Time Limit: 2 Seconds Memory Limit: 65536 KB
There is a digit string S with infinite length. In addition, S is periodic and it can be formed by concatenating infinite re...
分类:
其他好文 时间:
2014-09-09 13:28:48
阅读次数:
210