常用属性name:映射类属性的名字column:对应数据库表的字段名 默认值为属性名 type:字段的类型 update:update操作时是否包含本字段的数据 默认值为true (设置为false则hibernate执行update语句时会把这个字段忽略)insert:insert操作时是...
分类:
系统相关 时间:
2014-07-19 18:32:41
阅读次数:
270
在做曲线工厂的程序的时候,我写了一行代码是这样的:AllLines.at(cruveSecions).p1().setY(20);AllLines是QList类型的,cruveSections是int类型的,这里我犯了一个很低级但是很容易犯的错误,我本是图个方便,然后导致AllLines里面的数据老...
分类:
其他好文 时间:
2014-07-19 18:32:26
阅读次数:
184
It is often useful to swap the values of two variables. With conventional assignments, you have to use a temporary variable. This solution is cumberso...
分类:
其他好文 时间:
2014-07-19 18:32:06
阅读次数:
243
第一次dfs求出每个点的最大和次大长度,由下向上更新第二次由上向下更新。第二次dfs是为了处理某个点,最大长度不是向子节点延伸的长度,而是从父亲节点过来的 1 #include 2 #include 3 #include 4 #include 5 #include 6 #include ...
分类:
其他好文 时间:
2014-07-19 18:31:43
阅读次数:
243
Strictly speaking, a function can only return one value, but if the value is a tuple, the effect is the same as returning multiple values. For example...
分类:
其他好文 时间:
2014-07-19 18:31:23
阅读次数:
208
Linked List Cycle IIGiven a linked list, return the node where the cycle begins. If there is no cycle, returnnull.Follow up:Can you solve it without u...
分类:
其他好文 时间:
2014-07-19 18:18:51
阅读次数:
270
题目意思:有n个人,他们的关系是一棵树,每个人有一个欢乐度,举行一个聚会,邀请个人里的一些人,但是如果两个人的关系是上下级,他们最多一个被邀请int dp[][2] dp[][0]表示不邀请这个人得到的最大欢乐度,dp[][1]表示邀请这个人得到的最大欢乐度 1 #include 2 #incl.....
分类:
其他好文 时间:
2014-07-19 18:18:30
阅读次数:
235
程序每次读入一个正3位数,然后输出按位逆序的数字。注意:当输入的数字含有结尾的0时,输出不应带有前导的0。比如输入700,输出应该是7。输入格式:每个测试是一个3位的正整数。输出格式:输出按位逆序的数。输入样例:123输出样例:321 1 #include 2 3 int main() 4 { .....
分类:
其他好文 时间:
2014-07-19 18:17:48
阅读次数:
169
bfs,用数组来构建队列,用front指针来连接每一步输出的时候注意(0, 0)逗号后又一个空格。。。。被坑了一次#include using namespace std;struct step{ int x,y; step *front; void init(int xx,int yy){ x=x...
分类:
其他好文 时间:
2014-07-19 18:17:27
阅读次数:
260
最近几天都在学习quick 一直也在查找资料。 本来这篇文章在昨晚就能写好的。可是昨晚环境遇到点问题自己没想通。正题:首先是环境配置:由于我在mac下 所以在网上找了很多资料提前看了。 我之前也在电脑里安装了cocos2d-x2.2 去年装的。一直也在用所以也没换。 最近由于没事 把系统升级了 。M...
分类:
其他好文 时间:
2014-07-19 18:16:28
阅读次数:
178