`
文章列表

golang的http关闭问题

    博客分类:
  • go
 测试版本go1.4.2 resp, err := http.Get("http://example.com/") if resp != nil { defer resp.Body.Close() } if err != nil { fmt.Println("err: ", err) return } _, err = ioutil.ReadAll(resp.Body) //去掉这句,则主动关闭连接 ??? 从这里看到的解释: The orignal implementation for resp. ...
#文件存储在/root/my_registry docker run -d -p 5000:5000 -v /root/my_registry:/tmp/registry --name registry registry docker pull nginx docker tag nginx 172.16.41.200:5000/nginx docker push 172.16.41.200:5000/nginx   docker rmi 172.16.41.200:5000/nginx docker pull 172.16.41.200:5000/nginx   关于htt ...

golang misc

ch1 := make(chan string) fmt.Println("1@", time.Now()) for { select { case <-ch1: fmt.Println("2@", time.Now()) case <-time.After(time.Second * 3): fmt.Println("3@", time.Now()) return } } 1@ 2015-03-19 15:21:45.0547549 +0800 CST ...
TProfiler   同类对比

hbase rowkey

大数据性能调优之HBase的RowKey设计  

ios misc

    博客分类:
  • ios
gen_entitlements.py: No such file or directory http://blog.sina.com.cn/s/blog_63e26d560100ve0c.html   图标 https://developer.apple.com/library/ios/qa/qa1686/_index.html   百度定位(v2.4.1)ios8问题 http://blog.csdn.net/callmesen/article/details/39961795 http://www.it165.net/pro/html/201410/23574.html ...
win7 32位系统测试: Qt Creator向导创建GUI程序 增加libvlc播放代码 修改工程文件(pro)增加vlc头文件路径和lib libvlc.dll,libvlccore.dll,plugins拷贝到debug或release目录 运行 参考: http://blog.chinaunix.net/uid-26611383-id-3789962.html
http://coolshell.cn/articles/10910.html

android AlarmManager

http://developer.android.com/reference/android/app/AlarmManager.html   The Alarm Manager holds a CPU wake lock as long as the alarm receiver's onReceive() method is executing. This guarantees that the phone will not sleep until you have finished handling the broadcast. Once onReceive() returns, th ...

swig/java

 
摘自  http://www.swig.org/translations/chinese/tutorial.html   /* File : example.c */ #include <time.h> double My_variable = 3.0; int fact(int n) { if (n <= 1) return 1; else return n*fact(n-1); } int my_mod(int x, int y) { return (x%y); } char ...
LPSTR lpBuffer;      DWORD nErrorNo = GetLastError ( ); FormatMessage ( FORMAT_MESSAGE_ALLOCATE_BUFFER   |           FORMAT_MESSAGE_IGNORE_INSERTS   |           FORMAT_MESSAGE_FROM_SYSTEM,           NULL,          nErrorNo,           LANG_NEUTRAL,           (LPTSTR) & lpBuffer,          ...
<?php if( count($argv) < 2 ){ print "usage: $argv[0] filename"; return; } $filename = $argv[1]; $filesize = filesize( $filename ); $file = fopen( $filename, 'rb'); $contents = fread($file, filesize( $filename )); for($i=0;    $i <$filesize;    $i++) { printf( "%02x ...
/*       calculate the frame rate:       frame rate = (sample count * media time scale) / media duration */ frameRate = sampleCount*(double)timeScale/(double)duration;
org.codehaus.jackson.map.JsonMappingException: No serializer found for class org.hibernate.proxy.pojo.javassist.JavassistLazyInitializer and no properties discovered to create BeanSerializer (to avoid exception, disable SerializationConfig.Feature.FAIL_ON_EMPTY_BEANS) @JsonIgnoreProperties(value = ...
http://www.fourcc.org/
Global site tag (gtag.js) - Google Analytics