1001. Fibonacci 2DescriptionIn the Fibonacci integer sequence, F0 = 0, F1 = 1, and Fn = Fn-1 + Fn-2 for n ≥ 2. For examp...
分类:
其他好文 时间:
2014-09-27 22:58:30
阅读次数:
209
[plain]
view plaincopyprint?
#! /bin/sh while true; do i=`df -h | egrep '/mnt/yourpath'| awk '{print $5}' | cut -d "%" -f1 -`
if [ "$i" -ge 90 ] then echo "disk nearly full" cd /mnt/your...
分类:
系统相关 时间:
2014-09-27 09:35:19
阅读次数:
240
一、变量的作用域要理解闭包,首先必须理解Javascript特殊的变量作用域。变量的作用域无非就是两种:全局变量和局部变量。Javascript语言的特殊之处,就在于函数内部可以直接读取全局变量。1 var n=999;2 function f1(){3 alert(n);4 }...
分类:
编程语言 时间:
2014-09-26 21:52:28
阅读次数:
224
前面提到的上下文环境和作用域的知识,除了了解这些知识之外,还是理解闭包的基础。至于“闭包”这个词的概念的文字描述,确实不好解释,我看过很多遍,但是现在还是记不住。但是你只需要知道应用的两种情况即可——函数作为返回值,函数作为参数传递。第一,函数作为返回值如上代码,bar函数作为返回值,赋值给f1变量...
分类:
编程语言 时间:
2014-09-26 09:04:48
阅读次数:
270
MySql数据库如何根据时间查询前一天的数据?本文整理了几个解决方法,有需要的朋友参考下。本节内容:用MySql怎么根据时间查询前一天的数据。例1:代码示例:select * from tt where f1=DATE_ADD(now(),INTERVAL -1 day)例2:代码示例:select...
分类:
数据库 时间:
2014-09-24 18:50:37
阅读次数:
311
原文地址:http://www.phpthinking.com/archives/427
登录到你的服务器以root用户执行下面的命令,使用它你可以检查你的服务器是在DDOS攻击与否:
netstat -anp |grep 'tcp\|udp' | awk '{print $5}' |
cut -d: -f1 | sort | uniq -c | sort –n
该命令将显示已登录的...
分类:
系统相关 时间:
2014-09-24 01:35:15
阅读次数:
407
E431系列USB启动问题1、将U盘做成Pe,开机按F12,找到U盘启动项,选中后按enter没有任何反应。2、按F1进入BIOS,在Start up设置USB作为第一启动项,在F12的列表中也是现实USB为第一启动项,但是电脑照旧是进入系统,没有任何变化。(U盘已经写入Win PE)usb识别到了...
分类:
其他好文 时间:
2014-09-22 14:58:12
阅读次数:
325
首先暴力打表就很容易发现有循环节,于是一开始的写法是直接暴力找循环节,结果一直WA,
原因是有的循环并不是从1,1开始的,详细有证明戳这里:http://acm.hdu.edu.cn/discuss/problem/post/reply.php?postid=19818&messageid=1&deep=0
于是借鉴了大神的思路,因为%7,故可用v[7][7]来记录 f(n) = (A * f...
分类:
其他好文 时间:
2014-09-21 11:56:10
阅读次数:
222
#! /bin/sh
while true;
do
i=`df -h | egrep '/mnt/D'| awk '{print $5}' | cut -d "%" -f1 -`
if [ "$i" -ge 90 ]
then
echo "disk nearly full"
cd /mnt/D/files/
for file1day in `ls -d */ | sort -n...
分类:
系统相关 时间:
2014-09-21 00:00:59
阅读次数:
276
To list all users you can use:cut -d: -f1 /etc/passwdTo add a new user you can use:sudo adduser new_usernameTo remove/delete a user, first you can use...
分类:
其他好文 时间:
2014-09-20 23:51:19
阅读次数:
325