码迷,mamicode.com
首页 >  
搜索关键字:done    ( 2584个结果
node.js 多异步之间的协作方案
《深入浅出node.js》 P77 学习///用于处理多个事件对应一个侦听器的情况var count = 0;var results = {};var done = function (key, value){ results[key] = value; count++; if (...
分类:Web程序   时间:2015-10-14 12:33:15    阅读次数:188
docker 1.8+之后ubuntu安装指定版本docker-engine
这边记录ubuntu安装过程,首先是官网文档If you haven’t already done so, log into your Ubuntu instance.Open a terminal window.Add the newgpgkey.$ apt-key adv --keyserver...
分类:系统相关   时间:2015-10-13 16:49:17    阅读次数:239
Ubuntu下安装ncurses-devel
今天使用ubuntu编译mysql,在apt-getinstallncurses-devel报错:root@iZ25i4hcvpqZ:/usr/local/mysql-5.5.32#apt-getinstallncurses-devel Readingpackagelists...Done Buildingdependencytree Readingstateinformation...Done E:Unabletolocatepackagencurses-devel然后寻觅一..
分类:系统相关   时间:2015-10-13 12:22:25    阅读次数:426
Go之Channel详解
channel取数据时未被赋值将被阻塞,可以使用这一机制来完成事件的监听 wg := new(sync.WaitGroup) wg.Add(2) event := make(chan bool) //函数 go func() { defer wg.Done() for i := 0; i...
分类:其他好文   时间:2015-10-12 12:13:31    阅读次数:147
统计每分钟的流量
#!/bin/bashwhiletruedoRX=`ifconfig|awk‘NR==7{print$2}‘|cut-d":"-f2`TX=`ifconfig|awk‘NR==7{print$6}‘|cut-d":"-f2`ZX=`expr$RX+$TX`sleep60#foriin`seq120-11`#do#echo-n-e"\b$i"#sleep1#done#echo-n-e"\b"RX1=`ifconfig|awk‘NR==7{print$2}‘|cut-d":"-f2`TX1=`ifconfig|a..
分类:其他好文   时间:2015-10-12 02:04:02    阅读次数:229
for 循环用法
for循环结构语法1、for变量名in变量取值列表do指令集done提示:在此结构中“in变量取值列表”可省略,省略时相当于in“$@”使用fori就相当于使用foriin"$@"=========================语法2、类似C语言for((表达式1;表达式2;表达式3))do指令集done其中表达式1是初始变量表达式2..
分类:其他好文   时间:2015-10-10 12:38:35    阅读次数:205
while 循环用法
while循环1、while条件句语法while条件do指令集done###########################2、until条件句utill条件do指令集done##########################范例1每个5秒查看一下系统的负载情况[root@LAMP02]#viwhile.sh#!/bin/shwhiletruedouptime>>uptime.logsleep5done[root@LAM..
分类:其他好文   时间:2015-10-10 10:46:31    阅读次数:242
jQuery 源码: 延迟对象补充。
// Deferred helper (3132)when 是延迟对象 Deferred的一个辅助方法。 var dfd = $.Deferred(); //创建延迟对象 dfd。done(); dfd.fail(); //使用: $.when().don...
分类:Web程序   时间:2015-10-09 00:36:18    阅读次数:187
Modern Operating System --- Chap 5.5.2 Clock Software
All the clock hardware does is to generate interrupts at known intervals. Everythingelse involving time must be done by the software, the clock driver...
分类:其他好文   时间:2015-10-05 08:10:23    阅读次数:169
shell编程基础
for c in a b c d e f g;do echo $c; done 按顺序输出for c in a b c d e f g;do tar czvf install.log.$c.tar.gz install.log ; donefor c in {a..g}; do echo $c; d...
分类:系统相关   时间:2015-10-04 22:08:56    阅读次数:280
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!