09 2012 档案

[erlang] gen_tcp传输文件原型(二进制)
摘要:1 -module(tcp). 2 -export([client/3,server/1]). 3 4 client(Port,SiteID,Deploy) -> 5 Host = "localhost", 6 DeployBin = list_to_binary(Deploy), 7 {ok,Sock} = gen_tcp:connect(Host,Port,[binary,{packet,4}]), 8 ok = gen_tcp:send(Sock,<<SiteID:32,DeployBin/binary>>), 9 receive_dat 阅读全文

posted @ 2012-09-14 16:22 bluefrog 阅读(1005) 评论(0) 推荐(0)

[android] ubuntu开发环境
摘要:# 下载安装eclipsehttp://www.eclipse.org/downloads/ # android sdkhttp://developer.android.com/sdk/index.htmltar zxvf android-sdk_r20.0.3-linux.tgzcd android-sdk-linux/tools/android update sdk# ADT安装(在eclipse里)https://dl-ssl.google.com/android/eclipse/ 在线http://developer.android.com/sdk/eclipse-adt.html . 阅读全文

posted @ 2012-09-12 00:07 bluefrog 阅读(360) 评论(0) 推荐(0)

[erlang] gen_tcp传输文件原型
摘要:有相关的代码需要使用gen_tcp传输文件 把写的原型发出来 1 -module(tcp). 2 -export([client/1,server/1]). 3 4 client(Port) -> 5 Host = "localhost", 6 {ok,Sock} = gen_tcp:connect(Host,Port,[binary,{packet,0}]), 7 ok = gen_tcp:send(Sock,"/tmp/ecstore.tar"), 8 receive_data(Sock,[]). 9 10 receive_data(Socke 阅读全文

posted @ 2012-09-10 17:13 bluefrog 阅读(1904) 评论(1) 推荐(0)

[linux] 查看目录/文件字节数
摘要:# 按byte查看du -b <dirname|filename># 按kb查看du -k <dirname|filename># 按mb查看du -m <dirname|filename> 阅读全文

posted @ 2012-09-04 14:18 bluefrog 阅读(6163) 评论(0) 推荐(0)