上一页 1 ··· 14 15 16 17 18 19 20 21 22 ··· 29 下一页
摘要: 原文http://www.cnblogs.com/stephen-liu74/archive/2012/06/06/2312759.html一、概述: PL/pgSQL函数在第一次被调用时,其函数内的源代码(文本)将被解析为二进制指令树,但是函数内的表达式和SQL命令只有在首次用到它们的时候,PL/pgSQL解释器才会为其创建一个准备好的执行规划,随后对该表达式或SQL命令的访问都将使用该规划。如果在一个条件语句中,有部分SQL命令或表达式没有被用到,那么PL/pgSQL解释器在本次调用中将不会为其准备执行规划,这样的好处是可以有效地减少为PL/pgSQL函数里的语句生成分析和执行规划的总时间 阅读全文
posted @ 2012-08-23 15:46 Leo Forest 阅读(907) 评论(0) 推荐(0) 编辑
摘要: http://djangobook.py3k.cn/2.0/ 阅读全文
posted @ 2012-08-22 21:46 Leo Forest 阅读(118) 评论(0) 推荐(0) 编辑
摘要: 原文:http://www.cnblogs.com/goodhacker/archive/2011/07/20/2111996.htmlC风格的强制类型转换(Type Cast)很简单,不管什么类型的转换统统是:TYPE b = (TYPE)a。C++风格的类型转换提供了4种类型转换操作符来应对不同场合的应用。const_cast,字面上理解就是去const属性。static_cast,命名上理解是静态类型转换。如int转换成char。dynamic_cast,命名上理解是动态类型转换。如子类和父类之间的多态类型转换。reinterpret_cast,仅仅重新解释类型,但没有进行二进制的转换。 阅读全文
posted @ 2012-08-16 11:28 Leo Forest 阅读(138) 评论(0) 推荐(0) 编辑
摘要: 转自:http://www.linuxeden.com/html/develop/20100113/70060.html 经常看到一些脚本中, 做一些简单的字符串处理/计算字符串长度,也动用管道+ awk/sed/cut等相对重量级工具:),其实大可不必, 因为bash本身就自带一些简单字符串处理功能, 这样至少可以减少重新fork一个进程来做字符串处理的开销, 也算为服务器减排co2做一些贡献吧:)# 定义几个变量用于测试目的FILE_NAME="/usr/local/app/world.txt"TIME_NOW="`date +"%Y%m%d%H%M 阅读全文
posted @ 2012-08-16 10:02 Leo Forest 阅读(242) 评论(0) 推荐(0) 编辑
摘要: 原文:http://www.spongeliu.com/linux/unixlinux%E4%B8%8B%E7%9A%84stdoutstdin%E5%90%8Cstderr/stdout, stdin, stderr的中文名字分别是标准输出,标准输入和标准错误。在Linux下,当一个用户进程被创建的时候,系统会自动为该进程创建三个数据流,也就是题目中所提到的这三个。那么什么是数据流呢(stream)?我们知道,一个程序要运行,需要有输入、输出,如果出错,还要能表现出自身的错误。这是就要从某个地方读入数据、将数据输出到某个地方,这就够成了数据流。因此,一个进程初期所拥有的这么三个数据流,就分别 阅读全文
posted @ 2012-08-16 08:59 Leo Forest 阅读(487) 评论(0) 推荐(0) 编辑
摘要: http://tclap.sourceforge.net/一个官方demo:test1.cpp#include <string>#include <iostream>#include <algorithm>#include "tclap/CmdLine.h"using namespace TCLAP;using namespace std;int main(int argc, char** argv){ // Wrap everything in a try block. Do this every time, // because ex 阅读全文
posted @ 2012-08-07 22:29 Leo Forest 阅读(2704) 评论(0) 推荐(0) 编辑
摘要: #hdparm -i /dev/sda 阅读全文
posted @ 2012-08-03 21:55 Leo Forest 阅读(283) 评论(0) 推荐(0) 编辑
摘要: service postgresql start只有[faild],没提示错误信息,查看一下日志 less /var/lib/pgsql/pgstartup.log还好日志很详细The files belonging to this database system will be owned by user "postgres".This user must also own the server process.The database cluster will be initialized with locale en_US.UTF-8.The default data 阅读全文
posted @ 2012-08-01 21:23 Leo Forest 阅读(1287) 评论(0) 推荐(0) 编辑
摘要: 32位arch#pacman -Syu提示错误error: failed to commit transaction (conflicting files)glibc: /lib exists in filesystemErrors occurred, no packages were upgraded.上网看看据说是/lib迁移到/usr/lib引起的#cd /lib && pacman -Qo *发现./modules目录不属于glibc先把glibc略过,升级其他包#pacman -Syu --ingnore glibc然后在进/lib看看,果然modules目录转移到/ 阅读全文
posted @ 2012-07-31 22:13 Leo Forest 阅读(1244) 评论(0) 推荐(0) 编辑
摘要: 首先找到文件的节点号:ls -i###########用find的删之,find . -inum 节点号 -exec rm {}\; 阅读全文
posted @ 2012-07-30 20:50 Leo Forest 阅读(347) 评论(0) 推荐(0) 编辑
上一页 1 ··· 14 15 16 17 18 19 20 21 22 ··· 29 下一页