便便代码人生

关注技术, 偶尔动动手

bianbian.org

[转]百合十周年庆

Posted by bianbian on 2007-01-04 15:22


本文Tags: ,

lily-10-years.jpg

标签: ,

遵守创作共用协议,转载请链接形式注明来自http://bianbian.org 做人要厚道

相关日志

Posted in Not IT | No Comments »

[呜]最近在挤论文

Posted by bianbian on 2006-12-30 21:05


本文Tags:

好久没看技术文章了,偶尔熟悉一下Symbian的程序。

挤论文真是痛苦,可能张艺谋挤乳沟也挤得比较痛苦。

马上元旦了,祝所有要挤的朋友,不管挤什么都挤得顺利~

标签:

遵守创作共用协议,转载请链接形式注明来自http://bianbian.org 做人要厚道

相关日志

Posted in Not IT | No Comments »

[哈]圣诞节奖了个数码相机,^_^

Posted by bianbian on 2006-12-25 15:11


本文Tags: ,

嗯,宣布的时候好紧张啊,尤其是只有一个一等奖名额。。。这里是报道
啥也不说了,上图,眼泪哗哗地。。。。
奖了个sony DSC-50W
型号是sony DSC-50W,正在专研说明书中。。。sony的说明书就是厉害,厚厚一本,看了半天不知道在说啥。。。

标签: ,

遵守创作共用协议,转载请链接形式注明来自http://bianbian.org 做人要厚道

相关日志

Posted in Entertainment, Not IT | 7 Comments »

[原]用内嵌IE做软件界面的几点体会

Posted by bianbian on 2006-12-22 22:48


本文Tags: , , ,

做人要厚道,转载请用链接形式标明出处,谢谢合作。

内嵌IE做软件界面是比较方便和流行的,如.NET 2003的安装程序(好像2005也是,不太记得了)。主要是随便插入图片阿、字体阿什么的。不过因为是内嵌IE,保持了大部分IE的特性,但是这些特性稍不注意,在软件界面看起来却是BUG(或者换句话说,用户很明显地发觉这是个网页…)。比如.NET 2003的安装程序,右键点击会出现IE浏览网页时的右键菜单就是个BUG:
.NET 2003 setup
或者呢,按住Shift,点击网页内那些链接,会发现新开了个IE窗口显示,这样连存放的文件名也暴露了。

当然了,BUG还不仅如此:虽然这个主要的内嵌IE不支持文件拖入(会显示禁止drop的图标),但是安装时右上角不停变化的图片处其实也是个内嵌IE——这里Microsoft显然遗漏了禁止drop的处理——你用鼠标拖个htm文件过去,会发现是可以drop的(直接用PrintScreen截的,没有鼠标,不过能看到拖过去的htm图标),如图:
dotnet2003-2.JPG

那么针对这些问题,我说一下用内嵌IE做软件界面的几点体会:
(1)避免script error。(今天没有空,内容待补充,下同)
(2)去掉右键菜单。
(3)禁止拖入。
(4)禁止打开新窗口。
(5)往内嵌IE里写入数据。
(6)截获页面跳转执行相应的代码,换句话说就是和主程序交互。
(7)这点可能是Delphi 7特有的bug,Delphi自带的TWebBrowser不支持键盘:如回车键提交表单等。

标签: , , ,

遵守创作共用协议,转载请链接形式注明来自http://bianbian.org 做人要厚道

相关日志

Posted in Delphi, Technology | 3 Comments »

[原]C语言连接postgres的实例 – libpq使用

Posted by bianbian on 2006-12-20 15:28


本文Tags: ,

看过长篇文档后,啥废话也不说了,来个实例总结:

  1. char *sql = "SELECT userid,password FROM users WHERE ....";
  2. PGconn *conn = PQconnectdb("host=localhost user=postgres password= dbname=db port=5432");
  3. if (PQstatus(conn) == CONNECTION_OK)
  4. {
  5.   PQsetClientEncoding(conn, "UNICODE");
  6.   PGresult *res = PQexec(conn, sql);
  7.   if (res != null)
  8.   {
  9.     int status = PQresultStatus(res);
  10.     if (status == PGRES_COMMAND_OK || status == PGRES_TUPLES_OK)
  11.     {
  12.       char *res_userid = PQgetvalue(res, 0, 0);
  13.       char *res_password = PQgetvalue(res, 0, 1);
  14.       ....
  15.     }
  16.     PQclear(res);
  17.   }
  18. }
  19. PQfinish(conn);
标签: ,

遵守创作共用协议,转载请链接形式注明来自http://bianbian.org 做人要厚道

相关日志

Posted in C/C++, Database, Technology | 2 Comments »

[原]涂鸦板oekakibbs和Shi-PainterPRO数据格式分析

Posted by bianbian on 2006-12-19 06:33


本文Tags: ,

去年用C语言实现的涂鸦板:http://bbs.nju.edu.cn/pntmain
想当年,一夜没睡,不停地debug、截获网络数据,分析涂鸦板oekakibbs和Shi-PainterPRO的数据格式。
最后保存成功带给我的喜悦我是终身难忘。这也是我喜欢编程的部分原因吧。呵呵
oekakibbs和Shi-PainterPRO是比较有名的涂鸦板程序(实际是Java Applet程序),通过http协议和自定义的数据格式往后台提交数据。解析数据网络上比较多的是php和asp的代码,但是因为和彼此自己的系统结合,所以看起来比较费尽。不过从来没有数据格式说明文档。
今天偶然又翻了一下这些代码,顺便在blog里记一下。要是能给其他人省点力气,也算功德一件。呵呵

  1. /*
  2. 解析涂鸦板传过来的数据并保存图片
  3. Net@Lilybbs, 2005-11-14 7:18
  4. /////////////////////////////
  5. 参数传递:pntupload?临时key_工具名
  6. ====================================
  7. oekakibbs数据格式:
  8. -------------------------------
  9. ...Content-type:string
  10.  
  11. Content-type:string
  12.  
  13. Content-type:image/0
  14.  
  15. {PNG图片数据}
  16. Content-type:animation/
  17.  
  18. {oekakibbs动画数据}
  19. ====================================
  20. Shi-PainterPRO数据格式:
  21. -------------------------------
  22. S0000000000{当前PNG图片的字节数}
  23. {PNG图片数据}{pch长度}{pch文件内容}
  24. -------------------------------
  25. //以下是pch文件内容:
  26. layer_count=3
  27. layer_max=35
  28. layer_last=35
  29. image_width=300
  30. image_height=300
  31. count_lines=25
  32. quality=1
  33.  
  34. {其他信息}
  35. -------------------------------
  36. */
  37. #include "www.h"
  38.  
  39. int pntupload_main()
  40. {
  41.     int n, i, j, key=0;
  42.     char tmp[80], *buf, tool[30], *p;
  43.     FILE *fp;
  44.  
  45.     chdir(BBSHOME);
  46.     http_header(200);
  47.     printf("Content-type: text/html; charset=gb2312\n\n");
  48.     n = atoi(getsenv("CONTENT_LENGTH"));
  49.     if (n<0 || n>3000000)
  50.         http_fatal("too big");
  51.     buf = malloc(n);
  52.     if(buf==0) http_fatal("out of memory");
  53.     fread(buf, 1, n, stdin); //读入buf
  54. /*
  55.     fp = fopen("paint/data", "w");
  56.     fwrite(buf, 1, n, fp);
  57.     fclose(fp);
  58. */
  59.     //-------- 获得_U_KEY
  60.     key = atoi(getsenv("QUERY_STRING"));
  61.     //-------- 获得tool
  62.     p = strchr(getsenv("QUERY_STRING"), '_');
  63.     strsncpy(tool, p+1, 20);
  64.  
  65.     //-------- 根据不同tool, 不同处理数据
  66.     //oekakibbs和oekakibbs2的处理是一样的
  67.     if(!strncmp("oekakibbs", tool, 9))
  68.     {
  69.         //-------- 获得图片
  70.         i = memstr(buf, n, "Content-type:image/0");
  71.         j = memstr(buf+i+24, n, "Content-type:animation/"); //24是"Content-type:image/0\r\n\r\n"的长度
  72.         sprintf(tmp, "paint/tmp/%d.png", key);
  73.         fp = fopen(tmp, "w");
  74.         fwrite(buf + i + 24, 1, j, fp); //j实际是png的长度
  75.         fclose(fp);
  76.         //-------- 获得动画
  77.         j += i+24; //j现在是从buf开始指向Content-type:animation的偏移量
  78.         sprintf(tmp, "paint/tmp/%d.oeb", key);
  79.         fp = fopen(tmp, "w");
  80.         fwrite(buf+j+27, 1, n - j - 27, fp); //p2-buf是长度,27是"Content-type:animation/\r\n\r\n"的长度
  81.         fclose(fp);
  82.         //需要输出success告诉applet保存成功
  83.         printf("success");
  84.     }
  85.     else if(!strcmp("Shi-Painter", tool))
  86.     {
  87.         //png 头:HEX 89 50 4E 47 0D 0A
  88.         //png 尾:HEX 49 45 4E 44 AE 42 60 82
  89.         //unsigned char pngend[] = {0x49, 0x45, 0x4E, 0x44, 0xAE, 0x42, 0x60, 0x82};
  90.         i = memstr(buf, n, "\r\n"); //第2行开始就是PNG图片
  91.         j = atoi(buf+1); //buf[0]固定是S,之后就是PNG的长度
  92.         sprintf(tmp, "paint/tmp/%d.png", key);
  93.         fp = fopen(tmp, "w");
  94.         fwrite(buf+i+2, 1, j, fp);
  95.         fclose(fp);
  96.         //-------- 获得动画
  97.         j += i+2; //j现在是从buf开始指向PNG末尾的偏移量
  98.         i = memstr(buf+j, n, "layer_count="); //这里的i就相当于oekakibbs里面的27:就是PNG末尾到layer_count的长度
  99.         sprintf(tmp, "paint/tmp/%d.oeb", key);
  100.         fp = fopen(tmp, "w");
  101.         fwrite(buf+j+i, 1, n-j-i, fp);
  102.         fclose(fp);
  103.     }
  104.     exit(0);
  105. }
标签: ,

遵守创作共用协议,转载请链接形式注明来自http://bianbian.org 做人要厚道

相关日志

Posted in C/C++, Technology | 2 Comments »

[译]JSON的C语言实现: JSON-C – A JSON implementation in C

Posted by bianbian on 2006-12-17 15:44


本文Tags:

[翻译] JSON-C能让你在C语言里轻松创建JSON对象,输出JSON字符串,解析JSON字符串成JSON对象。
test1.c的部分实例代码:

  1. struct json_object *my_array;
  2.   my_array = json_object_new_array();
  3.   json_object_array_add(my_array, json_object_new_int(1));
  4.   json_object_array_add(my_array, json_object_new_int(2));
  5.   json_object_array_add(my_array, json_object_new_int(3));
  6.   json_object_array_put_idx(my_array, 4, json_object_new_int(5));
  7.   printf("my_array=\n");
  8.   for(i=0; i < json_object_array_length(my_array); i++) {
  9.     struct json_object *obj = json_object_array_get_idx(my_array, i);
  10.     printf("\t[%d]=%s\n", i, json_object_to_json_string(obj));
  11.   }
  12.   printf("my_array.to_string()=%s\n", json_object_to_json_string(my_array));

地址: http://oss.metaparadigm.com/json-c/

[Original] JSON-C implements a reference counting object model that allows you to easily construct JSON objects in C, output them as JSON formatted strings and parse JSON formatted strings back into the C representation of JSON objects.

Copyright Metaparadigm Pte. Ltd. 2004, 2005. Michael Clark

如果不清楚JSON,请参考:http://www.json.org

标签:

遵守创作共用协议,转载请链接形式注明来自http://bianbian.org 做人要厚道

相关日志

Posted in C/C++, Technology | 5 Comments »

[原]DBBalancer: 连接池, 负载均衡, 数据库同步的中间层解决方案

Posted by bianbian on 2006-12-15 17:51


本文Tags:

不过这是很老的开源项目了,2001以后都没有更新。。。。。我只是了解一下除了Java做连接池外还有没有其他办法。
[原创翻译] DBBalancer是数据库服务器和客户端(C/C++, TCL, Java JDBC, Perl DBI等)之间的中间层. 尽管目前只支持PostgreSQL, 但是这个架构以后可以推广到其他数据库. 它最大的优点(恕我直言 ;-) )就是不需要改变任何一行现有代码, 因为负载均衡是在Postgres的协议层完成的.
DBBalancer有很多功能:
它是一个连接池…. 能完成负载均衡…. 数据库同步….. 而且能同时做这些事情.
http://dbbalancer.sourceforge.net/

[Original] DBBalancer is some sort of middleware that would sit in between of database clients, like C, C++, TCL, Java JDBC, Perl DBI, and a database server. Currently the only server supported is Postgres, but the architecture is open to embrace more servers in a future. One of his strongest (IMHO ;-) ) points is that it can be tried or used without changing a line of the existing code, because the balancing is done at Postgres protocol level.

DBBalancer can do different things.

It’s a connection pool…
… a load balancer,
.. and a database replicator.
And can be used any combination of these things at the same time.

标签:

遵守创作共用协议,转载请链接形式注明来自http://bianbian.org 做人要厚道

相关日志

Posted in Database, Technology | 1 Comment »

[译]volatile关键字有什么用?

Posted by bianbian on 2006-12-13 19:52


本文Tags: ,

最近看LumaQQ的源码发现一个volatile(中文意思是“可变的、不稳定的”),找了篇英文介绍。抽空我翻译了一下,翻错了大家不要见笑。。。

volatile关键字有什么用?
  恐怕比较一下volatile和synchronized的不同是最容易解释清楚的。volatile是变量修饰符,而synchronized则作用于一段代码或方法;看如下三句get代码:

  1. int i1;              int geti1() {return i1;}
  2. volatile int i2;              int geti2() {return i2;}
  3.          int i3; synchronized int geti3() {return i3;}

  geti1()得到存储在当前线程中i1的数值。多个线程有多个i1变量拷贝,而且这些i1之间可以互不相同。换句话说,另一个线程可能已经改变了它线程内的i1值,而这个值可以和当前线程中的i1值不相同。事实上,Java有个思想叫“主”内存区域,这里存放了变量目前的“准确值”。每个线程可以有它自己的变量拷贝,而这个变量拷贝值可以和“主”内存区域里存放的不同。因此实际上存在一种可能:“主”内存区域里的i1值是1,线程1里的i1值是2,线程2里的i1值是3——这在线程1和线程2都改变了它们各自的i1值,而且这个改变还没来得及传递给“主”内存区域或其他线程时就会发生。
  而geti2()得到的是“主”内存区域的i2数值。用volatile修饰后的变量不允许有不同于“主”内存区域的变量拷贝。换句话说,一个变量经volatile修饰后在所有线程中必须是同步的;任何线程中改变了它的值,所有其他线程立即获取到了相同的值。理所当然的,volatile修饰的变量存取时比一般变量消耗的资源要多一点,因为线程有它自己的变量拷贝更为高效。
  既然volatile关键字已经实现了线程间数据同步,又要synchronized干什么呢?呵呵,它们之间有两点不同。首先,synchronized获得并释放监视器——如果两个线程使用了同一个对象锁,监视器能强制保证代码块同时只被一个线程所执行——这是众所周知的事实。但是,synchronized也同步内存:事实上,synchronized在“主”内存区域同步整个线程的内存。因此,执行geti3()方法做了如下几步:
1. 线程请求获得监视this对象的对象锁(假设未被锁,否则线程等待直到锁释放)
2. 线程内存的数据被消除,从“主”内存区域中读入(Java虚拟机能优化此步。。。[后面的不知道怎么表达,汗])
3. 代码块被执行
4. 对于变量的任何改变现在可以安全地写到“主”内存区域中(不过geti3()方法不会改变变量值)
5. 线程释放监视this对象的对象锁
  因此volatile只是在线程内存和“主”内存间同步某个变量的值,而synchronized通过锁定和解锁某个监视器同步所有变量的值。显然synchronized要比volatile消耗更多资源。

附英文原文:
What does volatile do?

This is probably best explained by comparing the effects that volatile and synchronized have on a method. volatile is a field modifier, while synchronized modifies code blocks and methods. So we can specify three variations of a simple accessor using those two keywords:

  1. int i1;              int geti1() {return i1;}
  2. volatile int i2;              int geti2() {return i2;}
  3.          int i3; synchronized int geti3() {return i3;}

geti1() accesses the value currently stored in i1 in the current thread. Threads can have local copies of variables, and the data does not have to be the same as the data held in other threads. In particular, another thread may have updated i1 in it’s thread, but the value in the current thread could be different from that updated value. In fact Java has the idea of a “main” memory, and this is the memory that holds the current “correct” value for variables. Threads can have their own copy of data for variables, and the thread copy can be different from the “main” memory. So in fact, it is possible for the “main” memory to have a value of 1 for i1, for thread1 to have a value of 2 for i1 and for thread2 to have a value of 3 for i1 if thread1 and thread2 have both updated i1 but those updated value has not yet been propagated to “main” memory or other threads.

On the other hand, geti2() effectively accesses the value of i2 from “main” memory. A volatile variable is not allowed to have a local copy of a variable that is different from the value currently held in “main” memory. Effectively, a variable declared volatile must have it’s data synchronized across all threads, so that whenever you access or update the variable in any thread, all other threads immediately see the same value. Of course, it is likely that volatile variables have a higher access and update overhead than “plain” variables, since the reason threads can have their own copy of data is for better efficiency.

Well if volatile already synchronizes data across threads, what is synchronized for? Well there are two differences. Firstly synchronized obtains and releases locks on monitors which can force only one thread at a time to execute a code block, if both threads use the same monitor (effectively the same object lock). That’s the fairly well known aspect to synchronized. But synchronized also synchronizes memory. In fact synchronized synchronizes the whole of thread memory with “main” memory. So executing geti3() does the following:

1. The thread acquires the lock on the monitor for object this (assuming the monitor is unlocked, otherwise the thread waits until the monitor is unlocked).
2. The thread memory flushes all its variables, i.e. it has all of its variables effectively read from “main” memory (JVMs can use dirty sets to optimize this so that only “dirty” variables are flushed, but conceptually this is the same. See section 17.9 of the Java language specification).
3. The code block is executed (in this case setting the return value to the current value of i3, which may have just been reset from “main” memory).
4. (Any changes to variables would normally now be written out to “main” memory, but for geti3() we have no changes.)
5. The thread releases the lock on the monitor for object this.

So where volatile only synchronizes the value of one variable between thread memory and “main” memory, synchronized synchronizes the value of all variables between thread memory and “main” memory, and locks and releases a monitor to boot. Clearly synchronized is likely to have more overhead than volatile.

标签: ,

遵守创作共用协议,转载请链接形式注明来自http://bianbian.org 做人要厚道

相关日志

Posted in Java, Technology | 4 Comments »

[原]把认证码的输入框和图片(input和img)垂直对齐

Posted by bianbian on 2006-12-09 23:38


本文Tags:

认证码的输入框和图片垂直对齐是个小问题,却能反应网页制作者的专业精神。
不过试了margin-top,不顶用:

  1. <input name="code" size="4" /> <img src="/jsp/image.jsp" style="margin-top:6px" />

img支持align属性。可能我的认证码刚好和input输入框的高度差不多,所以用了absmiddle属性就对齐了:

  1. <input name="code" size="4" /> <img src="/jsp/image.jsp" align="absmiddle" />
标签:

遵守创作共用协议,转载请链接形式注明来自http://bianbian.org 做人要厚道

相关日志

Posted in Technology | 4 Comments »

[原]ogame自动FS v2.2

Posted by bianbian on 2006-12-04 19:22


本文Tags: , ,

去年的这时候写的吧,当时一伙人玩ogame;历经多次改进和实践检验。不过后来玩得少了,月球FS还没有做。看反馈情况吧,如果实在需要,我就抽空完善一下。不过玩家donate一下哦。
解压后先把ogameFS.default.ini改名为ogameFS.ini,然后运行TermNewsPass.exe加密您的密码(填入配置文件的是加密后的密码)。详细说明就见ogameFS.ini吧,一般需要设定Host、ID、PW三个值。
下载ogameFS。下面是部分WhatsNew:
v2.2
====================================
内置浏览器可以响应回车键了

v2.1
====================================
修正导致假死状态的bug(倒计时为0)

v2.0
====================================
FS后检查是否FS成功,若失败则再次FS

v1.9
====================================
Happy New Year!
修正可能导致FS失败的bug

v1.8
====================================
屏蔽脚本错误,不再弹出脚本错误框
预定义任务取消Count参数,直接编写即可
加入直接“View Ini”功能

v1.7
====================================
修复一个严重bug:此bug可能导致FS失败
是否FS和预定义任务改为1分钟检查一次
预定义任务执行后加入日志

v1.6
====================================
解决程序失去响应的bug

v1.5
====================================
支持预定义操作,可自动升级建筑或研究

v1.4
====================================
一些bug修正
可设置读取系统事件的间隔时间

v1.3
====================================
断线自动重新登录
攻击结束后自动召回舰队

v1.2
====================================
一大堆bug修正
截取页面load完毕事件,取消延时设置
多波攻击按最早到达时间选择FS

v1.1
====================================
速度自动设为10%
按重氢、晶体、金属最多顺序装船
按同太阳系、同银河系顺序选择FS目的地
可以复制网页内容

v1.0
====================================
先改配置文件:ogameFS.ini

ID需要先登记才能用
密码需要用TermNewsPass.exe生成

bianbian
05.12.11

标签: , ,

遵守创作共用协议,转载请链接形式注明来自http://bianbian.org 做人要厚道

相关日志

Posted in Technology | 26 Comments »

[呜]我是电器杀手

Posted by bianbian on 2006-12-03 19:57


本文Tags:

笔记本硬盘坏了、电池废了、显示屏拆了然后出问题,那是很早很早以前的事了
实验室的显示器烧了,主机挂了,那是很早以前的事了(一个星期前?)
mp3摔了,可怜的M6刮花了,那是几天前的事了
然而今天,可怜的Nokia 6600,那可怜的1、4、7三个键废了,于是沦落为只能接电话和打电话本里的号码了
唯一完好的psp,好像还是因为被噓噓抢去了逃过此劫。。。。。。
搜了一下,发现一个好帖子,引用一下:

故障二:
[故障现象] 某几个按键同时失灵(包括2,5,8键;1,4,7键;通话,挂机,0,C键的同时失灵);
[故障原因] 排线尾插接触点处有灰尘或由于手机遭到剧烈碰撞造成接触点出现变形或错位
[解决办法] 仔细观察图B的1处的接触弹簧是否有变形,如果有,可用尖嘴钳矫正;另外用酒精棉花棒小心清洗图B的1和2处,清洗时注意不要留下棉花纤维,待干后将两块部件垂直合上,捎微用力按几下,这样有助于磨除氧化物,使接触点更紧密.然后按照拆机的反程序装好,螺丝拧紧即可.
[防灰技巧] 我们可以发现手机尾部的排线尾插处其实很容易进灰,我们可以在装机前在那地方预先贴一片双面胶,再把该部件卡入手机外壳内上再螺丝,这样可以有效防止灰尘入侵.

全文在这里:我用6600出现过的故障现象和维修方法 (作者bluebox)

22:35补记:拆开来擦了擦灰,好了!哈哈哈。想起小时候拆收音机装回去多个零件也能用。。。哈哈

标签:

遵守创作共用协议,转载请链接形式注明来自http://bianbian.org 做人要厚道

相关日志

Posted in Not IT | 3 Comments »

[原]Java正则表达式获取匹配结果

Posted by bianbian on 2006-12-02 22:41


本文Tags: ,

  1. Pattern p = Pattern.compile("正则表达式");
  2. Matcher m = p.matcher("预匹配的字符串");
  3. if(m.matches()) {
  4.     m.group(1); //匹配第1项
  5.     m.group(2); //匹配第2项
  6. }

有关正则表达式语法,请参考:文档 Document

标签: ,

遵守创作共用协议,转载请链接形式注明来自http://bianbian.org 做人要厚道

相关日志

Posted in Java, Technology | No Comments »

[呜]最近真是背,咳。。。。

Posted by bianbian on 2006-11-27 17:16


本文Tags:

先是显示器烧了;然后主机挂了,拿去修好回来打不到车,在风雨中抖了一小时。
更郁闷的是,申请招行信用卡被拒了;young卡又像被阉的信用卡(甚至丢了被他人消费损失都是自己的,已经不是信用卡了)不想办。。。。
工行网银又那么不安全,还得自己掏钱买U盾,去死吧。。。。
。。。。。。
命背不能怪社会,喝水没呛着,谢天谢地。。。。

标签:

遵守创作共用协议,转载请链接形式注明来自http://bianbian.org 做人要厚道

相关日志

Posted in Not IT | 5 Comments »

[原]postgreSQL 数据库备份和恢复

Posted by bianbian on 2006-11-19 17:30


本文Tags: , , ,

备份:
./pg_dump -U 用户名 -c -Fp 数据库名 -f 文件.sql
恢复:
./psql -U 用户名 < 文件.sql

标签: , , ,

遵守创作共用协议,转载请链接形式注明来自http://bianbian.org 做人要厚道

相关日志

Posted in Database, Technology | No Comments »

Page 12 of 15«123456789101112131415»