存档

2009年7月 的存档

An Example of Mercurial Being a Distributed Version Control System

2009年7月30日 davidzhao 没有评论

We internally use mercurial as the source version control system.
Mercurial is a very useful and powerful source control system, the difference
from cvs/svn is that, mercurial is a distributed source control system, see
its official doc for more information about this feature. 阅读全文…

分类: Berkeley DB, David Zhao 标签:

Berkeley DB Xml 入门系列之二: 在Linux下编译和使用Berkeley DB Xml

2009年7月22日 蔡瀛 9 条评论

在前面的文章《Berkeley DB Xml 入门系列之一: 简介与”query”示例程序详解》我们已经知道了Berkeley DB Xml程序的一些基本流程和概念。在文章《使用Visual C++ 2008 Express Edition 编译Oracle Berkeley DB XML》介绍了如何使用Visual Studio 在Windows平台上编译Berkeley DB Xml,本文将介绍在Linux或者类Unix的操作系统上如何编译和使用Berkeley DB Xml。

阅读全文…

Berkeley DB Xml 入门系列之一: 简介与”query”示例程序详解

2009年7月22日 蔡瀛 26 条评论

Oracle Berkeley DB XML 是一个可嵌入的开源 XML 数据库(Embedded Native Xml Database),可基于 XQuery 访问存储在容器中的文档,并对其内容进行索引。Oracle Berkeley DB XML 构建于 Oracle Berkeley DB 之上,并继承了其丰富的特性和属性(包括 环境,各个级别的事务,Replication等)。与Oracle Berkeley DB 一样,它通过应用程序运 行,无需人为管理。Oracle Berkeley DB XML 主要功能模块包括有文档分析器、XML索引 器以及 XQuery 引擎,实现了最快速、最高效的Xml数据检索。

本文是Berkeley DB Xml入门系列文章的第一篇,此系列将会详细介绍Berkeley DB Xml的 使用和编程,并探讨一些Berkeley DB Xml 编程中的高级内容,欢迎大家关注。在这篇文章里面我们通过一个最简单查询例子,介绍最基本Berkeley DB Xml的编程流程,并介绍 Berkeley DB Xml 中的一些基本概念。 阅读全文…

完全使用Linux工作

2009年7月10日 davidzhao 4 条评论

工作后很久以来,我一直在Linux环境下工作,除了偶尔的需要在Windows 上面使用MSVC编译运行一些测试和示例程序之外。不过我是在Windows XP上面使用cygwin来模拟Linux环境的,外加ssh到一个Linux服务器做一部分工作。Cygwin几乎可以完全地模拟Linux环境,但是偶尔还是会感到不方便。而我之前没有在laptop上面安装和使用 Linux是因为我偶尔需要使用qq,以及有些网站不用IE无法正确地使用。 阅读全文…

分类: David Zhao, 生活圆桌 标签:

Berkeley DB Performance Test

2009年7月10日 davidzhao 4 条评论

各位读者,很抱歉这篇文章是英文的,我当初做笔记的时候,写成英文了,这样才可以在同事之间交流。而现在确实没时间翻译过来了,还望大家理解,谢谢!

In this article I’d like to talk about the caveats and how-to’s when doing performance test with Berkeley DB, when the data volume is huge. For legal reasons I can not publish the result of my test without further approval, so I decided not to do so.

I. Context

I need to insert 10 billion key/data pairs to a btree database, each key item is 768 bytes, with no duplicate keys, and keys are inserted increasing only; each data item varies between KB/2 to 1KB. Thus each key/data pair varies between 1.25KB to 2KB.

阅读全文…

gcc4.4 issues

2009年7月10日 davidzhao 没有评论

各位读者,很抱歉这篇文章是英文的,我当初做笔记的时候,写成英文了,这样才可以在同事之间交流。 而现在确实没时间翻译过来了,还望大家理解,谢谢!

If your code builds well using gcc4.3 and below, it may not build with gcc4.4, which was released in April 2009.

Following are some of the changes that violates c/c++ standard:

1. gcc4.4 does not by default #include stdio.h, or stdlib.h, no header files are by default included, all header files of standard c/c++ libraries need to be explicitly included.

阅读全文…

C++ Template Corner Cases

2009年7月10日 davidzhao 没有评论

各位读者,很抱歉这篇文章是英文的,我当初做笔记的时候,写成英文了,这样才可以在同事之间交流。而现在确实没时间翻译过来了,还望大家理解,谢谢!

Following are some corner cases of C++ template features. A lot of the text is simply extracted from “C++ Templates: The Complete Guide”, with some of my personal understanding. These features are trivial and easily neglected, but you should have some impression to them in case you run into troubles caused by the neglect.

I made my notes in English, and I don’t bother to translate them into Chinese, forgive my laziness. :)

0. use “typename” to extract type defined within a type parameter, like this: typename T::iterator itr; otherwise the ‘itr’ is treated as a data member of T.

1. zero initialization
When using a var x of type T, we MUST initialize it like this: T x = T(); so that when T is a primitive type, x can also be initialized with 0, or NULL (when T is a pointer type). Of course we must make sure
when T is a class type, it has a default constructor. Simply using T x; can’t initialize x when T is a primitive type. 阅读全文…

分类: David Zhao, 程序设计 标签:
Դ