1、创建Dao接口。
package com.ljh.jasonnews.server.dao;
import java.sql.Connection;
public interface Dao {
public Connection getConnection() throws DaoException;
}
2、创建BaseDao类,实现Dao接口,主要完成数据库的打开与关闭...
分类:
数据库 时间:
2014-07-22 23:02:55
阅读次数:
483
XMPP/Smack/Openfire javax.net.ssl.SSLException:
Received fatal alert:
internal_error解决:1、在链接openfire服务器后,线程休眠一段时间,再进行登录login操作。connection.connect();Th...
分类:
其他好文 时间:
2014-05-10 19:39:25
阅读次数:
349
在java中使用sqlite,先下载sqlite的jdbc驱动sqlite-jdbc-3.7.2.jar,在Myeclipse中添加到Build
Path中,然后就可以在项目中使用。package cn.hitech.sqlite;import java.sql.Connection;impor.....
分类:
数据库 时间:
2014-05-05 23:08:01
阅读次数:
486
这道题,采用动态规划算法。from top to
down,把到每个节点的最小路径和都求出来。下面是AC代码: 1 /** 2 * Given a triangle, find the minimum path
sum from top to bottom. 3 * Each ...
分类:
其他好文 时间:
2014-05-02 12:19:23
阅读次数:
382
Instructionshereare not great.First shut down
ST2.Make sure you use absolute paths for symlink:e.g.$ curl -kL
http://xrl.us/pythonbrewinstall | bash$ ...
分类:
其他好文 时间:
2014-05-02 11:01:23
阅读次数:
382
Android C编程技巧运行模拟器 emulator -console *
将文件写入到模拟器的userdata.img文件中 adb push *将一个目录拷贝到模拟器中,包括子目录 adb push * 将一个目录从模拟器中拷出来
adb pull * 使得模拟器可以运行arm...
分类:
移动开发 时间:
2014-05-02 00:22:43
阅读次数:
509
package 动态连接数据库;import
java.lang.reflect.InvocationHandler;import java.lang.reflect.Method;import
java.lang.reflect.Proxy;import java.sql.Connection;i...
分类:
数据库 时间:
2014-05-01 22:30:11
阅读次数:
536
这道题我一开始想到用递归方法,可以把规模大的问题变成规模小的问题,但是觉得递归的时间复杂度很高,因为它会把相同的问题进行重复计算,然后我想是不是有什么down-up的方法,先把所有的子问题的结果保存起来,但是发现问题的最优解并不能由子问题的最优解推导出来。最后就想到买股票的时候,我们在一个局部极小的...
分类:
其他好文 时间:
2014-05-01 19:24:02
阅读次数:
250
Command对象主要用于对数据源执行SQL命令并返回结果。
ADO.NET提供了Connection来连接数据库,同时也提供了Command对象来查询数据库。同Connection对象一样,Command也有两种:OleDbCommand和SqlCommand.其区别同Connection对象。
Command对象有一个属性:CommandType(sql...
分类:
数据库 时间:
2014-05-01 18:27:35
阅读次数:
287
作者 : 万境绝尘 转载请著名出处eclipse 自带的 LogCat 工具太垃圾了, 开始用 adb logcat 在终端查看日志;1. 解析 adb logcat 的帮助信息在命令行中输入 adb logcat --help 命令, 就可以显示该命令的帮助信息;octopus@octopus:~$ adb logcat --help
Usage: logcat [options] [filt...
分类:
移动开发 时间:
2014-04-30 22:27:38
阅读次数:
448