上一页 1 2 3 4 5 6 7 8 9 10 ··· 15 下一页

[erlang] mnesia orm

摘要: 使用mneisa存储数据不想每次mneisa:table的调用 所以写了个简单的orm只有查询defined.hrl1 %% 定义记录结构2 -record(shop,{item,quantity,cost}).3 -record(cost,{name,price}).init_data.erl 1 -module(init_data). 2 -compile(export_all). 3 4 -include("defined.hrl"). 5 -include_lib("stdlib/include/qlc.hrl"). 6 7 8 start() 阅读全文
posted @ 2012-06-13 19:41 bluefrog 阅读(1540) 评论(1) 推荐(0)

[erlang] 合并list

摘要: nodes() 获取所有节点名称(除自己)node() 获取自己节点名称如果要在所有的节点上创建mnesia表的话,要传入所有的node listlists:append([nodes(),[node()]]). 阅读全文
posted @ 2012-06-12 16:32 bluefrog 阅读(784) 评论(0) 推荐(0)

[linux] 查看网络丢包信息

摘要: mtr yourdomainwindows下可以 试试tracert yourdomain 阅读全文
posted @ 2012-06-11 11:29 bluefrog 阅读(3808) 评论(0) 推荐(0)

[linux] 快速查看系统进行的进程

摘要: strings -f /proc/[0-9]*/cmdline 阅读全文
posted @ 2012-06-09 03:56 bluefrog 阅读(238) 评论(0) 推荐(0)

[haskell] haskell helloworld

摘要: 安装(Glasgow Haskell Compiler)sudo apt-get install ghc进入shellghci hello.hsmodule Main whereimport System.Environment main :: IO ()main = do args <- getArgs putStrLn ("Hello, " ++ args !! 0)compiler & exec$ ghc -o hello --make hello.hs [1 of 1] Compiling Main ( hello.hs, hello.o ... 阅读全文
posted @ 2012-06-03 21:32 bluefrog 阅读(503) 评论(0) 推荐(0)

[php] php curl smtp发送邮件

摘要: 公司的云平台把fsockopen关掉了,如果要使用smtp外网的邮箱来发送邮件的话 只能试试使用curl来进行了先google了一下,发现很多问相关问题的但没有相关的解答,在phpclasses里也没有找到相关的类于是自己边看stmp的相关协议边开始尝试curlSMTP协议这个在网上可以找到多相关的例子,可以自己实验一下使用telnet去连接mail服务器$ telnet 邮箱SMTP服务地址 25Trying 邮箱服务IP地址...Connected to 邮箱SMTP服务地址.Escape character is '^]'.220 exchange邮箱服务器地址 Micr 阅读全文
posted @ 2012-06-02 15:32 bluefrog 阅读(3283) 评论(0) 推荐(0)

[linux] ubuntu gnome 控制面板恢复

摘要: gconftool --recursive-unset /apps/panel rm -rf ~/.gconf/apps/panel pkill gnome-panel 阅读全文
posted @ 2012-06-01 12:27 bluefrog 阅读(480) 评论(0) 推荐(0)

[linux] grub修改

摘要: 用U盘安装centos成功后 发现grub出问题了grub> root (hd0,0)grub> setup (hd0)grub> reboot 阅读全文
posted @ 2012-05-31 16:56 bluefrog 阅读(277) 评论(0) 推荐(0)

[linux] 修改主机名称

摘要: # debian系统vim /etc/hostname# rh系统vim /etc/sysconfig/newowork# 修改HOSTNAME# 然后记得修改 /etc/hosts127.0.0.1 <hostname> localhost 阅读全文
posted @ 2012-05-31 13:01 bluefrog 阅读(168) 评论(0) 推荐(0)

[c/c++] linux c生成静态库&共享库

摘要: 静态库libdemo.h1 // libdemo.h2 #ifndef _LIBDEMO_H3 #define _LIBDEMO_H4 5 void demo_call(char *msg);6 7 #endiflibdemo.c1 // libdemo.c2 #include "libdemo.h"3 #include <stdio.h>4 5 void demo_call(char *msg)6 {7 printf("%s\n",msg);8 }编译库文件# 编辑成目标文件gcc -c libdemo.c -o libdemo.o# 创建 阅读全文
posted @ 2012-05-31 00:53 bluefrog 阅读(1953) 评论(0) 推荐(0)
上一页 1 2 3 4 5 6 7 8 9 10 ··· 15 下一页