• 大小: 122KB
    文件类型: .rar
    金币: 1
    下载: 0 次
    发布日期: 2021-06-07
  • 语言: Java
  • 标签: FP  aprior  

资源简介

点击test.bat直接运行,数据集在sample.txt中 绝对好使

资源截图

代码片段和文件信息

package association.fptree;

import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.sql.Statement;

/**
 * 连接数据库
 */
public class ConnDB {
protected Connection connection;
 protected Statement statement;
 static ResultSet rs=null;

 public void Connect(){};
    public Connection getConn(){
     return connection;
    }
 public void disconnect(){
 try{
 if (rs!=null)
    rs.close(); 
 if (statement!=null)
    statement.close(); 
     if (connection!=null)
    connection.close();
 }
 catch(SQLException e){}
 }
}
//用JDBC连接SQL Server数据库
class SQLDB extends ConnDB{
public void Connect(){
    Connect(“““““foodmart“);
}
public void Connect(String DBName){
    Connect(““““DBName);
}
public void Connect(String userString pwString DBName){
String username;
String password;
try {
      
      Class.forName(“com.microsoft.jdbc.sqlserver.SQLServerDriver“).newInstance();
     }
     catch (Exception e) {
         System.out.println(
         “Unable to register the JDBC Driver.\n“ +
         “Make sure the JDBC driver is in the\n“ +
         “classpath.\n“);
         System.exit(1);
     }

     String url=“jdbc:microsoft:sqlserver://localhost:1433;DatabaseName=“+DBName; 
     username = “sa“;
     password = “990414“;
     try {
         connection = DriverManager.getConnection(url username password);
         statement=connection.createStatement();
         
   
     }
     catch (SQLException e) {
         System.out.println(
         “Unable to make a connection to the database.\n“ +
         “The reason: “ + e.getMessage());
         System.exit(1);
         return;
     }
    
}
}

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----

     文件        287  2006-09-23 22:06  fpgrowth(java)\about.txt

     文件       3122  2005-11-07 15:23  fpgrowth(java)\association\fptree\Algorithm Description

     文件       1289  2006-08-27 11:48  fpgrowth(java)\association\fptree\Comp.class

     文件        949  2006-08-27 11:48  fpgrowth(java)\association\fptree\ConnDB.class

     文件       7493  2006-08-27 13:01  fpgrowth(java)\association\fptree\CreateFPTree.class

     文件       2191  2006-08-27 13:10  fpgrowth(java)\association\fptree\FPGrowth.class

     文件       2565  2006-08-27 13:01  fpgrowth(java)\association\fptree\FPTree$ItemTb.class

     文件        601  2006-08-27 13:01  fpgrowth(java)\association\fptree\FPTree$Node$Cnode.class

     文件       1852  2006-08-27 13:01  fpgrowth(java)\association\fptree\FPTree$Node.class

     文件        581  2006-08-27 13:01  fpgrowth(java)\association\fptree\FPTree$Tree.class

     文件        806  2006-08-27 13:01  fpgrowth(java)\association\fptree\FPTree.class

     文件        536  2006-08-27 11:48  fpgrowth(java)\association\fptree\Item.class

     文件        976  2006-09-23 21:43  fpgrowth(java)\association\fptree\ITree$Node.class

     文件       4002  2006-09-23 21:43  fpgrowth(java)\association\fptree\ITree.class

     文件        691  2006-08-27 11:48  fpgrowth(java)\association\fptree\MyException.class

     文件       1735  2006-08-27 13:09  fpgrowth(java)\association\fptree\Print.class

     文件        703  2006-08-27 12:43  fpgrowth(java)\association\fptree\Queue$Elem.class

     文件       1496  2006-08-27 12:43  fpgrowth(java)\association\fptree\Queue.class

     文件       2651  2006-08-27 11:48  fpgrowth(java)\association\fptree\Sort.class

     文件       2101  2006-08-27 11:48  fpgrowth(java)\association\fptree\SQLDB.class

     文件        541  2006-08-27 11:48  fpgrowth(java)\association\fptree\Stack$Elem.class

     文件       1659  2006-08-27 11:48  fpgrowth(java)\association\fptree\Stack.class

     文件        798  2006-08-27 11:48  fpgrowth(java)\association\fptree\StackTest.class

     文件       1854  2006-09-23 22:04  fpgrowth(java)\association\fptree\Test.class

     文件      25070  2006-09-23 22:04  fpgrowth(java)\fpgrowth.jar

     文件         25  2006-09-23 22:04  fpgrowth(java)\meta-INF\MANIFEST.MF

     文件         72  2009-04-04 08:26  fpgrowth(java)\sample.txt

     文件         72  2009-04-04 08:22  fpgrowth(java)\sample.txt.bak

     文件     256242  2006-08-27 13:19  fpgrowth(java)\sample1.txt

     文件       3122  2005-11-07 15:23  fpgrowth(java)\source\fptree\Algorithm Description

............此处省略23个文件信息

评论

共有 条评论