http://mongoid.org/en/mongoid/docs/querying.html#querieshttp://docs.mongodb.org/manual/reference/operator/query-comparison/gt大于, gte大于等于,lt小于, lte小于等于...
分类:
其他好文 时间:
2014-06-28 20:50:36
阅读次数:
238
主要问题是math.h这个头文件虽然在/lib/include下有定义,但是该文件内并没有sqrt()的定义。解决的办法是;在编译的时候在后面加上-lm,意思是链接到math函数库。在gcc下用到数学函数,如sqrt。在gcc时要加上-lm参数,这样告诉编译器我要用到数学函数了 。如:gcc a.c...
分类:
其他好文 时间:
2014-06-18 18:26:23
阅读次数:
175
Exception in thread "main" org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'articleDaoImpl': Injection of resou...
分类:
移动开发 时间:
2014-06-18 00:10:10
阅读次数:
923
打开你的工程,点击目录的工程文件,最顶端蓝色的,然后选择project下你的工程,还是蓝色那项,然后build Settings,然后往下拉,在Apple LLVM 5.0 - Language - Objective C 里有一个选项,Objective-C Automatic Reference...
分类:
其他好文 时间:
2014-06-17 15:53:20
阅读次数:
206
(一)
一定要避免传递一些references去指向其实并不存在的对象。
看下面这个类:
class Rational {
public:
Rational(int numerator = 0, int denominator = 1);
private:
int n, d;
friend const Rational operator*(const Rat...
分类:
编程语言 时间:
2014-06-16 19:09:14
阅读次数:
269
(一)
调用函数的时候如果传递参数pass-by-value,那么函数参数都是以实际实参的副本为初值,调用端所获得的亦是函数返回值的一个复件。
看下面代码:
class Person {
public:
Person();
virtual ~Person();
private:
string name;
string address;
};
...
分类:
编程语言 时间:
2014-06-16 14:57:30
阅读次数:
184
android提供了封装浏览器的接口,可以让开发者利用自己的view显示网页内容。今天又实现研究了一下,利用WebView显示浏览器内容,还可以利用 WebViewClient显示自己需要的内容。参考:http://developer.android.com/reference/android/we...
分类:
移动开发 时间:
2014-06-16 13:13:52
阅读次数:
209
lua有GC,细节无需太关注,知道些基本的就行,能local就一定不要global;
还有在数组里的对象,除非显式=nil,否则很难回收;
不过可以用弱引用表来告诉GC。外部引用为0,就不要管我,请del it。
weak table是通过元表实现,元表里的__mode字段包含k或者v;k表示key为弱引用;v表示value为弱引用。
1、首先看一个普通的例子:
a = {}
ke...
分类:
其他好文 时间:
2014-06-16 11:57:59
阅读次数:
306
H:/1007/01_多线程_大任务_MainViewController.m// MainViewController.m
// 多线程-01.大任务
// Created by apple on 13-10-7.
#import "MainViewController.h"
@interface MainViewController ()
@property (weak, nonatom...
分类:
移动开发 时间:
2014-06-15 20:14:40
阅读次数:
250
http://docs.mongodb.org/manual/reference/command/renameCollection/db.source-namespace.renameCollection( "target" )比如把users 替换成 all_usersdb.users.renam...
分类:
其他好文 时间:
2014-06-14 23:49:28
阅读次数:
570