`
文章列表
内存爆掉,crashdump: General Information   Help Slogan    eheap_alloc: Cannot allocate 26550341040 bytes of memory (of type "heap"). Node name    'loadgen_huawei7879@f3s13' Crashdump created on    Fri Sep 7 07:44:37 2012 System version    Erlang R14B03 (erts-5.8.4) [source] [64-bit] [smp:4:4] ...

emacs的org-mode

主要说明下时间管理:   1、在org文件中记录TODO等项 2、使用C-c C-s/C-d 加入时间点 3、在.emacs中加入到org-agenda-files中:   (setq org-agenda-files (list "~/doc/org/linux.org" "~/doc/org/work.org" "~/doc/org/home.org")) 4、M-x org-agenda a,则能够看到一周的计划    
格式化: fdisk /dev/sdb p 打印分区表 n 创建分区   分区: mkfs -t ext4 /dev/sdb1   查看uuid: blkid   修改/etc/fstab:      
1、Transfer-Encoding = chunked2、Content-Length = integer()3、undefined | 0mochiweb_request.erl     %% @spec body_length() -> undefined | chunked | unknown_transfer_encoding | integer() %% @doc Infer body length from transfer-encoding and content-length headers. body_length() -> case ge ...

mochiweb

看mochiweb的代码,感觉很绕,纳闷为什么不搞成清晰的recv、send,搞了一堆回调。。。   http://www.iteye.com/topic/348379 http://www.pagefault.info/?p=395       Req:ok() mochiweb_request:ok() mochiweb_request:respond(): mochiweb_request:start_raw_response() send(Response头和头域) send(Body), ...
  -module(my_test, [A]). -export([test/0]). test() -> io:format("~p, ~p~n", [A, THIS]).  13> A = my_test:new(1). {my_test,1} 14> {my_test,1}:test(). 1, {my_test,1} ok 15> {my_test,2}:test(). 2, {my_test,2} ok 16> {my_test,1234556}:test(). 1234556, {my_te ...

xmerl的使用

1、感觉比较复杂 使用的都是#xmlElement{}等结构表示,不太直观。 看了erlsom的DOM例子之后感觉很清爽: http://www.cnblogs.com/me-sa/archive/2012/07/20/erlang_xml.html   9> erlsom:simple_form(Xml). {ok,{"shopping",[], [{"item", [{"price","2.50"},{"quantity","3" ...

rebar的问题

  rebar的问题   1、如果管理LoadGen、SimpleGen、HTTP、XMPP等多个application间的关系 2、如何制作成一个独立的节点/rel? https://github.com/basho/rebar/wiki/Release-handling reltool.config 这几个app分开使用rebar管理; 针对LoadGen/SimpleGen管理ReleaseHandling:   1、创建rel,rebar create-node...修改rel.config,让reltool能找到app   2、修改rebar.config,把rel ...

erlang的痛

erlang的fail fast,是好是坏??? 自己使用的过程中,总觉得不是特别稳定。   erlang进程之错 http://erlangdisplay.iteye.com/blog/433843 提了3种方案:1、复制进程,2、提升优先级,3、分node   第一种方案详细说明:创建gen_server组解决单process瓶颈 http://erlangdisplay.iteye.com/blog/397422   最好是不是还需要增加流控?否则短时间高峰还可能有问题。。。     此外,还可以用memsup的system_memory_high_water_mar ...

erlang rebar

1、eunit https://github.com/basho/rebar/wiki/Getting-started a、代码中增加eunit b、rebar compile eunit进行编译+单元测试 c、在rebar.config中增加{cover_enabled, true},再rebar compile eunit,则生成myapp/.eunit/index.html覆盖度检查结果   2、dialyzer   3、xref   D:\project\erlang\rebar_test\myapp>rebar compile xref ==> mya ...
  erlang binary:   container     1 refc(reference-counted) binaries       1 ProcBin: link list, to garbage collect       2 binary object: outside all process heaps     2 heap binaries: up to 64B, process heap, copied when sent   reference     1 sub binaries: a reference to a part of refc or h ...

libev

文档:http://pod.tst.eu/http://cvs.schmorp.de/libev/ev.pod     WHAT TO READ WHEN IN A HURRY This manual tries to be very detailed, but unfortunately, this also makes it very long. If you just want to know the basics of libev, I suggest reading ANATOMY OF A WATCHER, then the EXAMPLE PROGRAM abov ...
  Including the EUnit header file -include("eunit/include/eunit.hrl"). test/0, xxx_test(), xxx_test_() Writing simple test functions Use exceptions to signal failures Using assert macros Running EUnit eunit:test(Module) <==> Module:test() Putting tests in seperate ...
目前调试一个模块时比较麻烦,需要重新编译成调试版本,即增加DEBUG宏或debug_info等信息重新编译。   想要达到这种效果:想调试某个模块时直接调用test:debug()自动转换成调试模式,这样方便一点。 即效果如下:   Eshell V5.8.3 (abort with ^G) 1> c(test). {ok,test} 2> test:test(1). 2 3> test:debug(). {ok,test} 4> test:test(1). test(1) = 2 2 5>       于是可以这样写: ...

[emacs].emacs

通用设置   ;; 缩进 (setq c-default-style "linux" c-basic-offset 4) ;; 不使用tab (setq-default indent-tabs-mode nil) ;; turn on highlighting current line (global-hl-line-mode 1) ;; 显示行号和列号 (global-linum-mode t) ;; (tool-bar-mode -1) (setq-default cursor-type 'bar) ; 设置光标为竖线 ...
Global site tag (gtag.js) - Google Analytics