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
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
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
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语言开多进程。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
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
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
题目要求: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'分类:c++oc2014-01-25 17:121225人阅读评论(0)收藏举报XCode5 编译出错的问题:解决方法:Chan...
分类:
移动开发 时间:
2015-02-03 16:52:33
阅读次数:
427
逻辑不难,主要代码如下 /**
?*?通过粘性广播检测电量
?*/
private?void?checkBattery()
{
//通过粘性广播读取电量
IntentFilter?intentFilter?=?new?IntentFilter(Intent.ACTION_BATTERY_CHAN...
分类:
移动开发 时间:
2015-02-01 12:18:23
阅读次数:
600