Java连接各种数据库的实例

1、Oracle8/8i/9i数据库(thin模式)
Class.forName("oracle.jdbc.driver.OracleDriver").newInstance();
String url="jdbc:oracle:thin:@localhost:1521:orcl";
//orcl为数据库的SID
String user="test";
String password="test";
Connection conn= DriverManager.getConnection(url,user,password);
2、DB2数据库
Class.forName("com.ibm.db2.jdbc.app.DB2Driver ").newInstance();
String url="jdbc:db2://localhost:5000/sample";
//sample为你的数据库名
String user="admin";
String password="";
Connection conn= DriverManager.getConnection(url,user,password);
3、Sql Server7.0/2000数据库
Class.forName("com.microsoft.jdbc.sqlserver.SQLServerDriver").newInstance();
String url="jdbc:microsoft:sqlserver://localhost:1433;DatabaseName=mydb";
//mydb为数据库
String user="sa";
String password="";
Connection conn= DriverManager.getConnection(url,user,password);
4、Sybase数据库
Class.forName("com.sybase.jdbc.SybDriver").newInstance();
String url =" jdbc:sybase:Tds:localhost:5007/myDB";
//myDB为你的数据库名
Properties sysProps = System.getProperties();
SysProps.put("user","userid");
SysProps.put("password","user_password");
Connection conn= DriverManager.getConnection(url, SysProps);
5、Informix数据库
Class.forName("com.informix.jdbc.IfxDriver").newInstance();
String url =
"jdbc:informix-sqli://123.45.67.89:1533/myDB:INFORMIXSERVER=myserver;
user=testuser;password=testpassword";
//myDB为数据库名
Connection conn= DriverManager.getConnection(url);
6、MySQL数据库
Class.forName("org.gjt.mm.mysql.Driver").newInstance(); //mm驱动
Class.forName("com.mysql.jdbc.Driver");//Connector/J 3.0驱动,两个驱动选其一
String url ="jdbc:mysql://localhost/myDB?user=soft&password=soft1234&useUnicode=true&characterEncoding=8859_1" ;
//myDB为数据库名
Connection conn= DriverManager.getConnection(url);


Connection con = DriverManager.getConnection("jdbc:mysql://host:port/database","user","password");
7、PostgreSQL数据库
Class.forName("org.postgresql.Driver").newInstance();
String url ="jdbc:postgresql://localhost/myDB"
//myDB为数据库名
String user="myuser";
String password="mypassword";
Connection conn= DriverManager.getConnection(url,user,password);
In order to perform many signal processing tasks such as classification,pattern recognition and coding, it is helpful to specify a signal model interms of meaningful signal structures. In general, designing such a modelis complicated and for many signals it is not feasible to specify the appropriatestructure. Adaptive models overcome this problem by learningstructures from a set of signals. Such adaptive models need to be generalenough, so that they can represent relevant structures. However, moregeneral models often require additional constraints to guide the learningprocedure.In this thesis a sparse coding model is used to model time-series. Relevantfeatures can often occur at arbitrary locations and the model has to beable to reflect this uncertainty, which is achieved using a shift-invariantsparse coding formulation. In order to learn model parameters, we useBayesian statistical methods, however, analytic solutions to this learningproblem are not available and approximations have to be introduced. Inthis thesis we study three approximations, one based on an analyticalintegral approximation and two based on Monte Carlo approximations.But even with these approximations, a solution to the learning problemis computationally too expensive for the applications under investigation.Therefore, we introduce further approximations by subset selection.Music signals are highly structured time-series and offer an ideal testbedfor the studied model. We show the emergence of note- and score-like featuresfrom a polyphonic piano recording and compare the results to thoseobtained with a different model suggested in the literature. Furthermore,we show that the model finds structures that can be assigned to an individualsource in a mixture. This is shown with an example of a mixturecontaining guitar and vocal parts for which blind source separation canbe performed based on the shift-invariant sparse coding model.
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值