定位单词位置
来源:互联网 发布:nero刻录软件怎样下载 编辑:程序博客网 时间:2024/05/22 00:37
文件1中形式:
T1 Protein 401 420 bcr-abl fusion gene
T2 Protein 480 496 interferon alpha
T3 Protein 498 507 IFN-alpha
T4 Protein 683 713 interferon regulatory factor 4
T5 Protein 715 720 IRF-4
文件2:就是普通的 txt 文本,
问题:文件1已经给出了字符串及其开始字符和结束字符的位置,在文件2中找出来:
for(int i = 0; i < fi.length; i++){ name = fi[i].getName(); m = name.lastIndexOf("."); if(name.substring(m + 1).equals("a1")){ fileR = new FileReader("E:\\test\\" + name); buffR = new BufferedReader(fileR); fileW = new FileWriter("E:\\tessm\\" + name); buffW = new BufferedWriter(fileW); char c[] = mp.paraprint(); List mylist = mp.char_list(c); String temp; int y = 0; while((temp = buffR.readLine()) != null){ //读的是 a1 文件 String str[] = temp.split(" "); int a = (Integer) Integer.parseInt(str[2]); int b = (Integer) Integer.parseInt(str[3]); //int num =(b-a); //String text = ""; for(int x = 0; x < mylist.size(); x++){ if(x == a){ for(int j = 0; j < num; j++){ text = text + mylist.get(x+j); } buffW.write("[" + text + "]"); buffW.newLine(); buffW.flush();*/ } } //System.out.println("[" + text + "]"); } mp.list_string(mylist); } }
0 0
- 定位单词位置
- 定位单词在字符串数组中的位置
- 定位内存泄漏位置
- IOS 地图位置定位
- CLLocationManager 位置定位
- CLLocationManager 位置定位
- wifi位置定位
- IOS 地图位置定位
- ListView 定位位置;
- div位置定位问题
- html5位置定位
- [前端] 定位光标位置
- // 定位光标位置
- GetLocation 位置定位
- listview 定位位置
- 用户位置定位
- 【HUSTOJ】1111: 单词调换位置
- 1986-指定位置插入单词
- 1. vs2012创建live555工程
- 茶与水的缘;
- 【LeetCode】Swap Nodes in Pairs
- IOS:Size Classes
- Android应用资源---字符串资源类型(String)
- 定位单词位置
- 日本二手服装生意火爆,你看到商机了吗?
- nginx web安全二
- svn中有文件status是S的问题解决
- IOS笔记(1)20141210 [项目环境搭建之CocoaPods的安装和使用]
- 有一种情怀,淡香如茶
- Android中主要资源文件及文件夹介绍
- 单遍历取等概率随机数问题
- 一行代码让App运行时iPhone不会进入锁屏待机状态