代码注释比较详细:
#include
#include
using namespace std;
struct Node{
int data;
Node* next;
};
Node* head = NULL;
bool create() {
head = (Node*)malloc(sizeof(Node));
if(NULL == head) return false;...
分类:
其他好文 时间:
2014-07-08 21:05:05
阅读次数:
238
环境:10.2.0.4集群数据库zlm10g(双节点,zlm10g1,zlm10g2)
系统:Windows 2003 Server 64Bit
内存:2G RAM
存储:ASM
目标:把集群数据库从10.2.0.4升级到10.2.0.5,包括集群软件和OEM的Patch安装
一、升级前准备:
1.查看是否存在无效对象
SQL> select object_name,statu...
Singleton is one design pattern in the software engineering. Ruby has its own special feature to declare singleton class...
分类:
其他好文 时间:
2014-07-08 18:05:25
阅读次数:
213
区间颜色不一致就更新到底,否则lazy标记
#include
#include
#include
#include
using namespace std;
#define lc l,m,index<<1
#define rc m+1,r,index<<1|1
#define N 100005
#define ll __int64
struct node
{
bool same;
ll c...
分类:
其他好文 时间:
2014-07-08 18:00:56
阅读次数:
226
尽管C语言的数组会让新手感到麻烦,然而C语言中数组的这种特别的设计正是其最大优势所在。要理解这一点,以下是一些简单解释。
在所有常见的程序设计错误中,最难于察觉的一类是“栏杆错误”,也常被称为“差一错误”(off-by-one error)。例如这个问题:100英尺长的围栏每隔10英尺需要一根支撑用的栏杆,一共需要多少根栏杆呢?如果不加思索,大家会容易以为是100除以10,即为10...
分类:
编程语言 时间:
2014-07-08 17:00:16
阅读次数:
269
Method 1: Add one list into the other list.
For example, if list1is {22, 33, 44, 55} and list2 is {66, 77, 88, 99},then append(list1, list2)will change list1to {22, 33, 44, 55, 44, 66, 77, 88, 99}.
...
分类:
其他好文 时间:
2014-07-08 16:18:22
阅读次数:
196
Hibernate One-to-One Mappings 一对一关系映射
关键:一对一关系映射和多对一关系映射很像,只是 column 属性值为 unique
例子:一个员工只能有一个地址。
Hibernate框架的使用步骤:
1、创建Hibernate的配置文件(hibernate.cfg.xml)
2、创建持久化类,即其实例需要保存到数据库中的类...
分类:
移动开发 时间:
2014-07-08 15:46:47
阅读次数:
285
def MirroRecursively(root):
# root is None or just one node, return root
if None == root or None == root.left and None == root.right:
return root
root.left, root.right = root.right, root.left
Mi...
分类:
其他好文 时间:
2014-07-08 14:26:08
阅读次数:
221
Method 4: Gets the value of element number i
For example, if list is {22, 33, 44, 55, 66, 77, 88, 99}, then get(list, 2) will return 44.
Solution 1:
static int get(Node list, int i) {
if (i < 0) ...
分类:
其他好文 时间:
2014-07-08 14:07:52
阅读次数:
262
Hibernate One-to-Many Mappings 一对多关系映射
关键点:一对多关系使用 Set 实现,
例子:一个员工可以有多个学证书。
Hibernate框架的使用步骤:
1、创建Hibernate的配置文件(hibernate.cfg.xml)
2、创建持久化类,即其实例需要保存到数据库中的类(Employee.java)
3、创建对象-关...
分类:
移动开发 时间:
2014-07-08 13:21:02
阅读次数:
306