2014年6月4日

erlang record

摘要: record的定义-record(useinfo,{id,name,pass}).%动态的传值和取值,这里的Record是{useinfo,1,lvn,123456}。put_record(Record) -> Name = Record#userinfo.name, Name. %% #u... 阅读全文

posted @ 2014-06-04 11:26 Vinlan 阅读(236) 评论(0) 推荐(0)

2014年5月29日

随笔

摘要: mnesia:create_table(test, [{disc_copies, [node()]}, {attributes, record_info(fields, test)}]).-mnesiadir'"/erl_sql/game"'-snamegame_server 阅读全文

posted @ 2014-05-29 17:18 Vinlan 阅读(103) 评论(0) 推荐(0)

2014年5月6日

erlang lists模块函数使用大全(copy)

摘要: 一,带函数Pred 1, all(Pred, List) -> boolean()如果List中的每个元素作为Pred函数的参数执行,结果都返回true,那么all函数返回true, 否则返回false例子:lists:all(fun(E) -> true end,[1,2,3,4]).结果true... 阅读全文

posted @ 2014-05-06 18:09 Vinlan 阅读(5096) 评论(0) 推荐(0)

2014年4月28日

mysql cmd 安装

摘要: 1.下载Mysql安装包:mysql-5.6.12-win32.zip;2.解压安装到D:\__dev下;3.添加环境变量,创建MYSQL_HOME变量; MYSQL_HOME=D:\_dev\mysql-5.6.12-win324.配置Path路径,、bin; %MYSQL_HOME%\bin... 阅读全文

posted @ 2014-04-28 20:05 Vinlan 阅读(1022) 评论(0) 推荐(0)

关于erlang中的进程字典(process dictionary)的新理解及其访问速度 (copy来的)

摘要: 之前对于erlang的进程字典了解的不够清楚,只是知道put()、get()函数,即存值和取值,而每个put、get中都有自己的一对Key——Value(键值对)与之对应。一个Key对应一个Value.在erlang中,启动进程节点之后,进程字典的put、get的值是对缓存的处理,而对数据库的操作,... 阅读全文

posted @ 2014-04-28 17:36 Vinlan 阅读(887) 评论(0) 推荐(0)

2014年3月28日

erlang技术2014 3 28 复合函数

摘要: Test = fun(X) -> (fun(Y) -> Y * X end) end.Test(3). //定义了外层的fun(X).Result = Test(3).Result(2). //定义了fun(Y).%shop.erlcost(apple)->1;cost(orange) ->2;co... 阅读全文

posted @ 2014-03-28 14:51 Vinlan 阅读(96) 评论(0) 推荐(0)

导航