码迷,mamicode.com
首页 >  
搜索关键字:chan    ( 331个结果
golang 速度限制,time.Tick(time.Second*2) channel,隔2秒后继续执行
package mainimport ( "fmt" "time")func main() { requests := make(chan int, 5) for i := 1; i <= 2; i++ { requests <- i } close...
分类:其他好文   时间:2015-04-17 15:15:35    阅读次数:174
mount local yum source
system: CentOS 6.6 two steps: 1.  mkdir /root/repo cp /etc/yum.repos.d/* /root/repo/ rm -rf /etc/yum.repos.d/* cp /root/repos/CentOS-Media.repo /etc/yum.repos.d/ vim Centos-Media.repo chan...
分类:其他好文   时间:2015-04-16 19:58:22    阅读次数:127
golang并发例子
package?main import?( "fmt" "math/rand" "time" ) func?main()?{ fmt.Println("start") chn?:=?make(chan?int,?5) rand.Seed(time.Now().UnixNano()) for?i?:=?0;?i?<?5;?i++?{ x?...
分类:其他好文   时间:2015-03-31 11:01:51    阅读次数:248
代理环境下 xcode submit 失败解决
Go to Application Loader java folder : /Applications/Xcode.app/Contents/Applications/Application Loader.app/Contents/MacOS/itms/java/lib Open net.properties file with “sublime text” or “text mate” Chan...
分类:其他好文   时间:2015-03-31 10:54:50    阅读次数:145
go语言怎样开多进程图文讲解。
今天给大家讲解下go语言开多进程。package mainimport ( "fmt" "time" )var c chan intfunc main() { c = make(chan int) go waiting("coffee", 1) go waiting("tea", 2) fmt.Println("I,am waiting") /...
分类:编程语言   时间:2015-03-20 14:32:34    阅读次数:320
channel _ buffering
By default channels are unbuffered, meaning that they will only accept sends(chan <-) if there is a corresponding receive (<- chan) ready to receive t...
分类:其他好文   时间:2015-03-15 16:31:15    阅读次数:118
hdu2476 String painter(区间dp)
Problem Description There are two strings A and B with equal length. Both strings are made up of lower case letters. Now you have a powerful string painter. With the help of the painter, you can chan...
分类:其他好文   时间:2015-02-23 09:40:33    阅读次数:167
LeetCode 027 Remove Element
题目要求:Remove ElementGiven an array and a value, remove all instances of that value in place and return the new length.The order of elements can be chan...
分类:其他好文   时间:2015-02-07 17:11:25    阅读次数:146
Unsupported compiler 'com.apple.compilers.llvmgcc42' selected for architecture 'armv7'
Unsupported compiler 'com.apple.compilers.llvmgcc42' selected for architecture 'armv7'分类:c++oc2014-01-25 17:121225人阅读评论(0)收藏举报XCode5 编译出错的问题:解决方法:Chan...
分类:移动开发   时间:2015-02-03 16:52:33    阅读次数:427
Android通过StickyBroadcast进行低电量检测提示
逻辑不难,主要代码如下 /** ?*?通过粘性广播检测电量 ?*/ private?void?checkBattery() { //通过粘性广播读取电量 IntentFilter?intentFilter?=?new?IntentFilter(Intent.ACTION_BATTERY_CHAN...
分类:移动开发   时间:2015-02-01 12:18:23    阅读次数:600
331条   上一页 1 ... 27 28 29 30 31 ... 34 下一页
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!