传统的使用jdbc来访问数据库的流程为:Class.forName(“com.mysql.jdbc.Driver”);String url = “jdbc:mysql://localhost:3306/test?user=root&password=123456″;Connection con = ...
分类:
数据库 时间:
2015-06-14 18:30:38
阅读次数:
116
保存一个对象到数据库中目录结构hibernate.cfg.xml com.mysql.jdbc.Driver jdbc:mysql://localhost:3306/Lesson7_Hibernate3_Demo1 root ...
分类:
Web程序 时间:
2015-06-14 18:29:59
阅读次数:
99
Given a binary tree, find its maximum depth.The maximum depth is the number of nodes along the longest path from the root node down to the farthest le...
分类:
其他好文 时间:
2015-06-14 16:30:11
阅读次数:
79
构建一个递归函数treeToList(Node root),将一棵已排序的二叉树,调整内部指针,使之从外面看起来,是一个循环双向链表。其中前向指针存储在"small"区域,后向指针存储在"large"区域。链表需要进行调整进行升序排序,并返回链表头指针。
下面的这篇文章详细解释了这个转换的过程。
http://cslibrary.stanford.edu/109/TreeListRecursi...
分类:
编程语言 时间:
2015-06-14 15:14:41
阅读次数:
167
问题:写了一个程序,尝试在843端口监听,结果在执行bind的时候失败了原来,系统不允许用户程序在1-1024端口监听,因为他们是知名端口。解决办法: 换成root用户,即可成功bind。(ubuntu下命令为:sudo su ,然后输入密码回车即可切换用户。)sudo java -jar
分类:
系统相关 时间:
2015-06-14 12:09:22
阅读次数:
395
一、free命令[root@xen_202_12 /]# free -m total used free shared buffers cachedMem: 3072 2459 612 0 207 1803-/+ buffers/cache:...
分类:
系统相关 时间:
2015-06-14 10:51:35
阅读次数:
143
1.逻辑备份 mysql中的逻辑备份就是将数据库中的数据备份为一个文本文件, 且此文本文件可以查看和编辑 mysqldump [root@server2 ~]# mysqldump Usage: mysqldump [OPTIONS] database [tables] OR mysqldump [...
分类:
数据库 时间:
2015-06-14 10:46:16
阅读次数:
144
1、修改ip地址、网关、主机名、DNS等12345678910111213141516171819202122232425262728293031 [root@localhost ~]# vi /etc/sysconfig/network-scripts/ifcfg-eth0DEVICE=eth.....
分类:
其他好文 时间:
2015-06-14 10:42:36
阅读次数:
162
1. rpm包安装 [root@server2 Packages]# ls mysql* mysql-5.1.61-4.el6.i686.rpm mysql-devel-5.1.61-4.el6.i686.rpm mysql-bench-5.1.61-4.el6.i686.rpm m...
分类:
数据库 时间:
2015-06-14 10:41:40
阅读次数:
241
1.在Linux里面,任何一个文件都具有『User, Group及Others』三种身份的个别权限。
以王三毛为例,王三毛这个『文件』的User为王三毛,他属于王大毛这个Group, 而张小猪相对于王三毛,则只是一个『others』而已。无所不能的天神则是root。
在我们Linux系统当中,默认的情况下,所有的系统上的账号与一般身份使用者,还有那个root的相关信息...
分类:
系统相关 时间:
2015-06-14 09:29:08
阅读次数:
183