摘要: //文件的打开import java.awt.FileDialog;import java.awt.event.*;import java.io.*;import java.io.File;import java.io.FileReader;public class FileOpen { private FileDialog filedialog_open; private String fileopen = null, filename = null;// 用于存放打开文件地址 和文件名 private File file1; // 文件字节流对象 private FileReader fi 阅读全文
posted @ 2010-05-15 23:54 hibernate3例子 阅读(427) 评论(1) 推荐(0) 编辑
摘要: #include<iostream>#include<stdlib.h>#include<string.h>using namespace std;typedef struct{ int weight; int parent,lchild,rchild; int asc;}HTNode,*HuffmanTree; //定义赫夫曼存储结构struct node{ int ASCII; int n;};struct node a[127];struct node w[127]; //一些全局变量int count;HTNode H_T[250];char... 阅读全文
posted @ 2010-05-15 23:49 hibernate3例子 阅读(179) 评论(0) 推荐(0) 编辑
摘要: //哈弗曼编码的实现类public class HffmanCoding { private int charsAndWeight[][];// [][0]是 字符,[][1]存放的是字符的权值(次数) private int hfmcoding[][];// 存放哈弗曼树 private int i = 0;// 循环变量 private String hcs[]; public HffmanCoding(int[][] chars) { // TODO 构造方法 charsAndWeight = new int[chars.length][2]; charsAndWeight = c... 阅读全文
posted @ 2010-05-15 23:35 hibernate3例子 阅读(334) 评论(0) 推荐(0) 编辑