积累日常生活的点滴,开发过程的心得。

GDataXMLDocument使用XPath查询带有名字空间的XML

参见http://matthewcarriere.github.com/

当xml中使用了名字空间之后,我们的XPath查询语句必须包含名字空间,GDataXMLDocument默认会将名字空间注册为_def_ns

对于有名字空间的查询的要写成下面的形式。

NSArray* entries = [doc nodesForXPath:@"/_def_ns:playlist/_def_ns:trackList/_def_ns:track" error:&error];

对于Fork的Repository 最佳的合并策略

git pull --rebase upstream master

解决冲突后

git rebase --continue

单机游戏下载网站

游民星空 游侠网 3dm

让MacPort创建I386的library

 

The solution is to tell Macports to build universal binaries. This can be done by adding +universal to the command line, for example:

sudo port install jpeg +universal

A more general solution is to add this “variant” to the Macports config. Simply add +universal to the file /opt/local/etc/macports/variants.conf. The file is read-only, even for root, so make sure to force-write the file (:wq! in vi).

And if you want to rebuild everything universal, sledgehammer approach:

C++ Builder 2040 Declaration terminated incorrectly错误的解决办法

将出错的地方添加  {$EXTERNALSYM xxx}指令,让头文件不生成相应的定义

const
  {$EXTERNALSYM EDEADLOCK}
  EDEADLOCK = 36 ;

Delphi 组件在C++Builder中不显示的问题

在编译Delphi组件时,我们需要设置Delphi Compiler Option的C/C++ Output的C/C++ Output file generation 为Generate all C++Builder files (including package libs)。

 

 

C++ Builder Mac OSX的问题

function avutil_version()  :Cardinal;
  cdecl; external av__util;
即便上面的代码根本没有被用到,C++ Builder Mac OSX上编译时会报错,报告unresolved external xxx的错误,Windows上就没有这个问题,只好把没用的代码都注释掉

gmail中使用邮件模板

登录进帐号后,点击settings菜单,然后选择 Lab页,将Canned Responses这个插件设为可用.

免费的私有Git托管服务

objective-c 中定义const int的方法

enum {
kRadioDownload = 0,
kRadioRecord = 1
};

同步内容