01 2012 档案

erlang 入门(1)
摘要:erl- 命令以.结尾- %为注释- 变量必须大写开头 X = 12.- [1,3.4,true] is a list and {person, 25, "Jason"} is a tuple. - tuple赋值orpattern match{ip, IP} = {ip, "192.168.0.1"}.{Atom, IP} = {ip, "192.168.0.1"}. -variable 和atom ,前者大写开头,后者小写开头- loops are done through recursion如下例-module(factoria 阅读全文

posted @ 2012-01-18 23:07 cutepig 阅读(998) 评论(1) 推荐(0) 编辑

使用google-perftools的tcmalloc
摘要:使用google-perftools的tcmalloc安装使用export LD_PRELOAD="/usr/local/lib/libtcmalloc.so"cat testMalloc.cpp & g++ testMalloc.cpp & ./a.out#include <stdio.h>#include <memory.h>#include <stdlib.h>int main(){ void *p=malloc(100); printf("stop here\n"); getchar(); fr 阅读全文

posted @ 2012-01-14 00:20 cutepig 阅读(722) 评论(0) 推荐(0) 编辑

memcached安装及测试
摘要:Memcache协议http://web2.0coder.com/archives/199python clients:http://sendapatch.se/projects/pylibmc/down fwom here: http://pypi.python.org/pypi/pylibmc#downloads介绍各个客户端,以及pylibmc的安装http://code.google.com/p/memcached/wiki/Clientshttp://iyouf.info/memcached-client-pylibmc.htmlpylibmc 安装过程pylibmc安装过程就像个递 阅读全文

posted @ 2012-01-13 01:33 cutepig 阅读(1990) 评论(0) 推荐(0) 编辑

twisted: echo server
摘要:from twisted.internet import protocol, reactorclass Echo(protocol.Protocol): def dataReceived(self, data): self.transport.write(data)class EchoFactory(protocol.Factory): def buildProtocol(self, addr): return Echo()reactor.listenTCP(1234, EchoFactory())reactor.run()run server:python testTwisted.pyrun 阅读全文

posted @ 2012-01-13 00:51 cutepig 阅读(341) 评论(0) 推荐(0) 编辑

using mschart
摘要:using mschartdllscopy /y mschrt20.ocx C:\WINDOWS\system32\mschrt20.ocxregsvr32 mschrt20.ocxregs:Windows Registry Editor Version 5.00[HKEY_CLASSES_ROOT\Licenses\12B142A4-BD51-11d1-8C08-0000F8754DA1]@="aadhgafabafajhchnbchehfambfbbachmfmb"HKEY_CLASSES_ROOT\Licenses = Licensing: Copying the k 阅读全文

posted @ 2012-01-12 19:22 cutepig 阅读(580) 评论(0) 推荐(0) 编辑

iostream很慢??
摘要:在这里,我不得不纠正大家以为iostream很慢的这样一个以讹传讹流毒无穷的错误观念。大家观察到的iostream慢,通常都是因为C++需要保持对C的IO Library兼容,所以C++的io library是没有buffer的,而且必须一个字符一个字符来读取!比如说有人蛋疼这么写:getline(cin, s);scanf("%d", &i);这 里getline只能一个字符一个字符读取,假如它一次读了100个字符,只用到了10个,剩下的90个没办法放回stdin里面,这样下面的scanf 就是从错误的位置读取的。所以C++的library为了兼容C,不得不一个字 阅读全文

posted @ 2012-01-08 23:25 cutepig 阅读(964) 评论(0) 推荐(0) 编辑

My Bookmarks
摘要:新闻bbs类欢迎莅临水木社区126网易免费邮--你的专业电子邮局网易126免费邮箱--专业电子邮局。容量自动翻倍,支持50兆附件,280M网盘。支持各种客户端软件收发,垃圾邮件拦截率超过98%。未名空间(mitbbs.com) - 海外华人第一门户未名空间(mitbbs.com) - 海外华人第一门户,创建于1996年,拥有数十万海外注册用户,为服务全球华人的综合性网站、人气最旺的网络社区字典Google 翻譯学习Mirror Paradises – 514#'s Blog » Windows7字体替换最佳解决方案Mirror Paradise,514#'s Blog 阅读全文

posted @ 2012-01-05 22:16 cutepig 阅读(1146) 评论(0) 推荐(0) 编辑

导航

< 2025年3月 >
23 24 25 26 27 28 1
2 3 4 5 6 7 8
9 10 11 12 13 14 15
16 17 18 19 20 21 22
23 24 25 26 27 28 29
30 31 1 2 3 4 5
点击右上角即可分享
微信分享提示