实现了javax.sql.DataSource的才是标准的数据库连接池,按照字面意思,一般称之为数据源。 对于一个已知类的某个方法进行功能上的改变有以下三种方式: 1、定义子类,扩展父类的某个功能。(此处行不通) 2、利用包装设计模式改写原有的类的功能
a、编写一个类实现与被改写类(com.my.....
分类:
其他好文 时间:
2014-05-26 08:25:11
阅读次数:
387
my @a=("a","b","c","d","e");my
@b=("b","g","f","e");my %a=map{$_=>1} @a;my %b=map{$_=>1} @b;# 交集@A =
grep( $a{$_}, @b ) ;# 补集@B1=grep(!defined $a{$_},...
分类:
其他好文 时间:
2014-05-26 08:02:22
阅读次数:
269
决解乱码费了我好些时间啊!
乱码原因有
1.mysql未设置为支持汉字
2.没有发送头信息
3.使用的编译器不符合相应的编码
决解的方法是
在mysql里
我用的是Wanmp Server
1.在mysql目录下找到my.ini,在[client]新增default-character-set=utf8
[client]
#password = your_passwor...
分类:
数据库 时间:
2014-05-26 04:39:31
阅读次数:
273
AlienTech for better life!~...
分类:
编程语言 时间:
2014-05-26 04:35:51
阅读次数:
389
#include
#include
#include
using namespace std;
const int m=(int)1E8;
string s1,s2;
int f[2][5001]={0},g[2][5001]={0};
void init();
void work();
int my_max(int,int);
int main()
{
freopen("lcs.in","r"...
分类:
其他好文 时间:
2014-05-26 04:07:17
阅读次数:
305
一,Linux篇
1,停掉mysql服务:service mysql stop;
2,修改my.cnf文件,可以通过find / -name my.cnf来找到文件,里面内容包含[mysqld]
datadir=/var/lib/mysql
socket=/var/lib/mysql/mysql.sock
user=mysql即是我们要找的文件,在user-mysql下加入:skip-grant-...
分类:
数据库 时间:
2014-05-26 04:06:14
阅读次数:
346
问题 C: Repeat Number
时间限制: 1 Sec 内存限制: 128 MB
提交: 23 解决: 7
[提交][状态][论坛]
题目描述
Definition: a+b = c, if all the digits of c are same ( c is more than ten),then we call a and b are Repeat Number. My...
分类:
其他好文 时间:
2014-05-26 04:03:34
阅读次数:
228
例1: 批量 查询部门号为 "10" 号的并把它们打印出来 . DECLARE TYPE
emp_table_type IS TABLE OF my_emp%ROWTYPE INDEX BY BINARY_INTEGER; v_emp_table
emp_table_type;BEGIN SELE....
分类:
数据库 时间:
2014-05-26 01:26:47
阅读次数:
356
引自
http://my.oschina.net/wangguolongnk/blog/1113491.
支持向量机的目的是什么?对于用于分类的支持向量机来说,给定一个包含正例和反例(正样本点和负样本点)的样本集合,支持向量机的目的是寻找一个超平面来对样本进行分割,把样本中的正例和反例用超平面分开,...
分类:
其他好文 时间:
2014-05-24 09:25:03
阅读次数:
328
getApplicationContext()Application context is
associated with the Applicaition and will always be the same throughout the life
cycle.getBasecontext()s...
分类:
移动开发 时间:
2014-05-24 09:23:43
阅读次数:
249