转自:http://www.cnblogs.com/futuredo/archive/2012/10/26/2737644.html Functions 1  Pattern matching 模式匹配 Pattern matching in function head and in case and receive clauses are optimized by the compiler. With a few exceptions, there is nothing to gain by…
ubuntu忘记root密码怎么办?如果普通用户忘记了怎么办 ### 第一种方法:无论你是否申请了root帐号,或是普通账号密码忘记了都没有问题的! 1. 重启ubuntu,随即长按shift进入grub菜单: 2. 选择recovery mode,按"e"键进入编辑页面: 3. 将ro single替换为rw single init=/bin/bash: 4. 按ctrl+x进入单用户模式,当前用户即为root: 5. 到/etc目录下修改sudoers权限:chmod 0440 s…
转自:http://www.cnblogs.com/futuredo/archive/2012/10/22/2734186.html List handling 1  Creating a list 创建一个列表 Lists can only be built starting from the end and attaching list elements at the beginning. If you use the ++ operator like this 列表只能从尾端开始创建,从头…
转自:http://www.cnblogs.com/futuredo/archive/2012/10/19/2727204.html Constructing and matching binaries Erlang/OTP R15B02 In R12B, the most natural way to write binary construction and matching is now significantly faster than in earlier releases. 在R12…
转自:http://www.cnblogs.com/futuredo/archive/2012/10/17/2726416.html Common Caveats(常见注意事项) Erlang/OTP R15B02 Here we list a few modules and BIFs to watch out for, and not only from a performance point of view. 这里我们列出了需要注意的一些模块和内置函数,不仅仅是从性能的角度来看. 1  Th…
转自:http://www.cnblogs.com/futuredo/archive/2012/10/16/2725770.html The Eight Myths of Erlang Performance Erlang/OTP R15B02 1  Myth: Funs are slow Fun函数很慢(这里应该是指Module:Function(Arguments)这种形式的函数,其中M,F,A可以是变量类型,值不是固定的) Yes, funs used to be slow. Very s…
(转载)http://blog.csdn.net/facevoid/article/details/5338048 创建列表sample_list = ['a',1,('a','b')] Python 列表操作sample_list = ['a','b',0,1,3] 得到列表中的某一个值value_start = sample_list[0]end_value = sample_list[-1] 删除列表的第一个值del sample_list[0] 在列表中插入一个值sample_list[…
erlang程序优化点的总结(持续更新) 转自:http://wqtn22.iteye.com/blog/1820587 转载请注明出处 注意,这里只是给出一个总结,具体性能需要根据实际环境和需要来确定 霸爷指出,新的erlang虚拟机有很多调优启动参数,今后现在这个方面深挖一下. 1. 进程标志设置: 消息和binary内存:erlang:process_flag(min_bin_vheap_size, 1024*1024),减少大量消息到达或处理过程中产生大量binary时的gc次数 堆内存…
可以通过以下方式有效地构建二进制: my_list_to_binary(List) -> my_list_to_binary(List, <<>>). ​ my_list_to_binary([H|T], Acc) -> my_list_to_binary(T, <<Acc/binary,H>>); my_list_to_binary([], Acc) -> Acc. 二进制可以像这样有效地匹配: my_binary_to_list(<…
Link and Monitor differences 原文地址 Introduction link/1 and monitor/2 are 2 different ways of notifying (or know) that a process died. Thing is, these are really very different in nature and these differences are not widely understood by beginners. So…