一、自定义校验使用 validate 方法传入一个同名方法的 Symbol 即可。validate :my_validationprivatedef my_validation if name =~ /foo/ errors[:name] << "can not be foo" ...
分类:
其他好文 时间:
2014-08-21 13:16:14
阅读次数:
266
1 gcc attribute weak & alias应用
alias ("target")
The alias attribute causesthe declaration to be emitted as an alias for another symbol, which must bespecified. For instance,
voi...
分类:
其他好文 时间:
2014-08-21 11:35:34
阅读次数:
214
一些第三方库里对系统库的类加了category,
这时,就需要使用编译参数:-ObjC,这样第三方库中对系统类作的扩展方法才能在工程中使用。
但是使用-Objc后,会产生两个问题:
1、undefined symbols
2、duplicate symbol
undefined symbols
说明工程中没有引入第三方库引用的库。
如果不加-ObjC参数,则...
分类:
其他好文 时间:
2014-08-20 16:25:13
阅读次数:
175
libidn.a(stringprep.o), in section __TEXT,__text reloc 8: indirect symbol index out of range for architecture i386
clang: error: linker command failed with exit code 1 (use -v to see invocation)
libidn.a...
分类:
移动开发 时间:
2014-08-19 16:40:44
阅读次数:
212
初次使用masmplus 其中在 codesg segment 使用了 start 标记, 并在end处标明了:end start 但是默认的masmplus 会提示 start 为 不认识的 external symbol,如下图 那怎么办, 原来是连接器不同造成的, 这里如果使用了类似的star...
分类:
其他好文 时间:
2014-08-17 18:21:52
阅读次数:
186
xcode引入第三方静态类库 duplicate symbol _OBJC_XXX 重复编译错误一:场景 xcode 同时引入了 libA.a, libB.a 两个静态类库,如果 这两个静态类库之中,都打包了,相同的库,方法之类的, 且 xcode 的other link flag 为 -a...
分类:
其他好文 时间:
2014-08-17 15:26:32
阅读次数:
173
Qracle11gduplicate功能不用备份源库,通过网络复制出standby库1.在standby上grid用户配置listener注意是指定oracle用户的家目录:监听状态:[grid@dg~]$lsnrctlLSNRCTLforLinux:Version11.2.0.4.0-Productionon19-MAY-201418:46:15Copyright(c)1991,2013,Oracle.Allrightsrese..
分类:
数据库 时间:
2014-08-14 03:54:08
阅读次数:
492
In an attempt to remove duplicate elements from list, I go to the lengths to take advantage of methods in the java api. After investiagting the document of java api, the result is so satisfying that ...
分类:
编程语言 时间:
2014-08-14 01:30:17
阅读次数:
256
Given a sorted linked list, delete all nodes that have duplicate numbers, leaving only distinct numbers from the original list.For example, Given 1->2...
分类:
其他好文 时间:
2014-08-14 01:01:07
阅读次数:
230
mbiguous operators need parentheses -----------不明确的运算需要用括号括起 Ambiguous symbol ''xxx'' ----------------不明确的符号 Argument list syntax error --------------...
分类:
编程语言 时间:
2014-08-13 18:01:16
阅读次数:
236