java导入excle表格,并且对表格进行相应的修改,并对表格数据进行整理,最后导出本地表格等一系列...
1.首先创建一个java项目
完成效果如下图所示
2.导入以下jar包
3.代码如下
其中行和列的操作是根据需求自动划分的
复制代码
1 public class auto_date {
2 private static List<List<String>> readExcel(File file) throws Exception {
3 // 创建输入流,读取Excel
4 InputStream is = new FileInputStream(file.getAbsolutePath());
5 // jxl提供的Workbook类
6 Workbook wb = Workbook.getWorkbook(is);
7 // 只有一个sheet,直接处理
8 //创建一个Sheet对象
9 Sheet sheet = wb.getSheet(0);
10 // 得到所有的行数
11 int rows = sheet.getRows();
12 // 所有的数据
13 List<List<String>> allData = new ArrayList<List<String>>();
14 // 越过第一行 它是列名称
15 for (int j = 1; j < rows; j++) {
16 List<String> oneData = new ArrayList<String>();
17 // 得到每一行的单元格的数据
18 Cell[] cells = sheet.getRow(j);
19 for (int k = 0; k < cells.length; k++) {
20 oneData.add(cells[k].getContents().trim());
21 }
22 // 存储每一条数据
23 allData.add(oneData);
24 // 打印出每一条数据
25 //System.out.println(oneData);
26 }
27 return allData;
28 }
29 public static void main(String[] args) {
30 File file = new File("F://m//1.xls");
31 //42列
32 //3337行
33 try {
34 List<List<String>> allData=readExcel(file);
35 //System.out.println("总数:"+allData.size());//总行数
36 /*
37 创建excle表格
38 */
39 // 第一步,创建一个webbook,对应一个Excel文件
40 HSSFWorkbook wb = new HSSFWorkbook();
41 // 第二步,在webbook中添加一个sheet,对应Excel文件中的sheet
42 HSSFSheet sheet = wb.createSheet("小麦特性表");
43 // 第三步,在sheet中添加表头第0行,注意老版本poi对Excel的行数列数有限制short
44 HSSFRow row = sheet.createRow((int) 0);
45 // 第四步,创建单元格,并设置值表头 设置表头居中
46 //HSSFCellStyle style = wb.createCellStyle();
47 //style.setAlignment(HSSFCellStyle.ALIGN_CENTER); // 创建一个居中格式
48 // HSSFRow row1 = sheet.createRow(0);
49 HSSFCell cell = row.createCell((short) 0);
50 cell.setCellValue("所有小麦特征表");
51 sheet.addMergedRegion(new CellRangeAddress(0,0,0,20));
52 HSSFRow row2 = sheet.createRow(1);
53 row2.createCell(0).setCellValue("品种名称");
54 row2.createCell(1).setCellValue("生态类型");
55 row2.createCell(2).setCellValue("生育期");
56 row2.createCell(3).setCellValue("苗性");
57 row2.createCell(4).setCellValue("叶色");
58 row2.createCell(5).setCellValue("分蘖力");
59 row2.createCell(6).setCellValue("株型");
60 row2.createCell(7).setCellValue("株高");
61 row2.createCell(8).setCellValue("株高");
62 row2.createCell(9).setCellValue("穗形");
63 row2.createCell(10).setCellValue("芒");
64 row2.createCell(11).setCellValue("壳色");
65 row2.createCell(12).setCellValue("粒色");
66 row2.createCell(13).setCellValue("硬度");
67 row2.createCell(14).setCellValue("籽粒饱满度");
68 row2.createCell(15).setCellValue("亩穗数");
69 row2.createCell(16).setCellValue("穗粒数");
70 row2.createCell(17).setCellValue("千粒重");
71 row2.createCell(18).setCellValue("熟相");
72 row2.createCell(19).setCellValue("抗倒性");
73 row2.createCell(20).setCellValue("抗旱性");
74 row2.createCell(21).setCellValue("抗寒性1");
75 row2.createCell(22).setCellValue("抗寒性2");
76 row2.createCell(23).setCellValue("粗蛋白质");
77 row2.createCell(24).setCellValue("湿面筋");
78 row2.createCell(25).setCellValue("降落数值");
79 row2.createCell(26).setCellValue("沉淀指数");
80 row2.createCell(27).setCellValue("吸水量");
81 row2.createCell(28).setCellValue("形成时间");
82 row2.createCell(29).setCellValue("稳定时间");
83 row2.createCell(30).setCellValue("弱化度");
84 row2.createCell(31).setCellValue("出粉率");
85 row2.createCell(32).setCellValue("延伸性");
86 row2.createCell(33).setCellValue("拉伸能量");
87 row2.createCell(34).setCellValue("拉伸面积");
88 row2.createCell(35).setCellValue("最大拉伸阻力");
89 row2.createCell(36).setCellValue("容重");
90 row2.createCell(37).setCellValue("节水性指数1");
91 row2.createCell(38).setCellValue("节水性指数2");
92 row2.createCell(39).setCellValue("节水性1");
93 row2.createCell(40).setCellValue("节水性2");
94 row2.createCell(41).setCellValue("抗病性1");
95 row2.createCell(42).setCellValue("抗病性2");
96
97
98
99
100
101 /
102 导出txt文件
103 /
104 // File writename = new File("G://2.txt"); // 相对路径,如果没有则要建立一个新的output。txt文件
105 // writename.createNewFile(); // 创建新文件
106 // BufferedWriter out = new BufferedWriter(new FileWriter(writename));
107 // out.write("写入文件\r\n"); // \r\n即为换行
108
109
110
111 //System.out.println(allData);//输出全部
112 for (int i = 0; i < allData.size(); i++) {
113 List<String> list=allData.get(i);
114 HSSFRow row3 = sheet.createRow(i+2);
115 HSSFCell col0 = row3.createCell(0);
116 col0.setCellValue(list.get(0));
117 /
118 导出txt文件
119 /
120 // out.write("**"+"\r\n");
121 // out.write("第 "+i+" 个"+"品种名称: "+list.get(0)+"\r\n");
122 //*****
123 //System.out.println(allData.get(i));//逐条输出
124 //System.out.println(list.get(0));
125 for (int j = 0; j <list.size(); j++) {
126 String str=list.get(j);
127
128 String newstr=str.replace(",", "。");
129 String newstr1=newstr.replace(";","。");
130 String newstr2=newstr1.replace("、","。");
131 String newstr3=newstr2.replace(";","。");
132 String newstr4=newstr3.replace(",","。");
133 //System.out.println(newstr1);
134 String[] temp;
135 String delimeter = "。"; // 指定分割字符
136 temp = newstr4.split(delimeter); // 分割字符串
137 // 普通 for 循环
138 for(int q =0; q < temp.length ; q++){
139 String disease="";
140 //生态类型
141 HSSFCell col11 = row3.createCell(1);
142 //生育周期
143 HSSFCell col12 = row3.createCell(2);
144 //苗性
145 HSSFCell col13 = row3.createCell(3);
146 //叶色
147 HSSFCell col14 = row3.createCell(4);
148 //分蘖力
149 HSSFCell col15 = row3.createCell(5);
150 //穗形
151 HSSFCell col16 = row3.createCell(6);
152 //芒
153 HSSFCell col17 = row3.createCell(7);
154 //壳色
155 HSSFCell col18 = row3.createCell(8);
156 //芒
157 HSSFCell col19 = row3.createCell(9);
158 //壳
159 HSSFCell col110 = row3.createCell(10);
160 //粒色
161 HSSFCell col111 = row3.createCell(11);
162 //硬度
163 HSSFCell col112 = row3.createCell(12);
164 //籽粒饱满度
165 HSSFCell col113 = row3.createCell(13);
166 //亩穗数
167 HSSFCell col114 = row3.createCell(14);
168 //穗粒数
169 HSSFCell col115 = row3.createCell(15);
170 //千粒重
171 HSSFCell col116 = row3.createCell(16);
172 //熟相
173 HSSFCell col117 = row3.createCell(17);
174 //抗倒性
175 HSSFCell col118 = row3.createCell(18);
176 //抗旱性
177 HSSFCell col119 = row3.createCell(19);
178 //抗寒性
179 HSSFCell col120 = row3.createCell(20);
180 HSSFCell col121 = row3.createCell(21);
181 HSSFCell col122 = row3.createCell(22);
182 HSSFCell col123 = row3.createCell(23);
183 HSSFCell col124 = row3.createCell(24);
184 HSSFCell col125 = row3.createCell(25);
185 HSSFCell col126 = row3.createCell(26);
186 HSSFCell col127 = row3.createCell(27);
187 HSSFCell col128 = row3.createCell(28);
188 HSSFCell col129 = row3.createCell(29);
189 HSSFCell col130 = row3.createCell(30);
190 HSSFCell col131 = row3.createCell(31);
191 HSSFCell col132 = row3.createCell(32);
192 HSSFCell col133 = row3.createCell(33);
193 HSSFCell col134 = row3.createCell(34);
194 HSSFCell col135 = row3.createCell(35);
195 HSSFCell col136 = row3.createCell(36);
196 HSSFCell col137 = row3.createCell(37);
197 HSSFCell col138 = row3.createCell(38);
198 HSSFCell col139 = row3.createCell(39);
199 HSSFCell col140 = row3.createCell(40);
200 HSSFCell col141 = row3.createCell(41);
201 HSSFCell col142 = row3.createCell(42);
202 HSSFCell col143 = row3.createCell(43);
203 for(int r =0; r < temp.length ; r++){
204 if (temp[r].contains("春性")==true||temp[r].contains("冬性")==true) {
205
206 col11.setCellValue(temp[r]);
207 }
208 if (temp[r].contains("生育期")==true) {
209 col12.setCellValue(temp[r]);
210 }
211 if (temp[r].contains("幼苗")==true) {
212 col13.setCellValue(temp[r]);
213 }
214 if (temp[r].contains("叶色")==true) {
215 col14.setCellValue(temp[r]);
216 }
217 if (temp[r].contains("分蘖力")==true) {
218 col15.setCellValue(temp[r]);
219 }
220 if (temp[r].contains("株型")==true) {
221 col16.setCellValue(temp[r]);
222 }
223 if (temp[r].contains("株高")==true) {
224 col17.setCellValue(temp[r]);
225 }
226 if (temp[r].contains("穗纺锤")==true||temp[r].contains("穗长方")==true||temp[r].contains("穗棍棒")==true
227 ||temp[r].contains("纺锤型")==true||temp[r].contains("棍棒形")==true
228 ||temp[r].contains("穗型长方形")==true||temp[r].contains("长方穗型")==true) {
229 col19.setCellValue(temp[r]);
230 }
231 if (temp[r].contains("芒")==true) {
232 col110.setCellValue(temp[r]);
233 }
234 if (temp[r].contains("壳")==true) {
235 col111.setCellValue(temp[r]);
236 }
237 if (temp[r].contains("红粒")==true||temp[r].contains("蓝粒")==true||
238 temp[r].contains("白粒")==true||temp[r].contains("黑粒")==true||temp[r].contains("粒红")==true
239 ||temp[r].contains("粒黑")==true||temp[r].contains("粒白")==true) {
240 col112.setCellValue(temp[r]);
241 }
242 if (temp[r].contains("硬质")==true) {
243 col113.setCellValue(temp[r]);
244 }
245 if (temp[r].contains("饱满")==true) {
246 col114.setCellValue(temp[r]);
247 }
248 if (temp[r].contains("亩穗数")==true) {
249 col115.setCellValue(temp[r]);
250 }
251 if (temp[r].contains("穗粒数")==true) {
252 col116.setCellValue(temp[r]);
253 }
254 if (temp[r].contains("千粒重")==true) {
255 col117.setCellValue(temp[r]);
256 }
257 if (temp[r].contains("熟相")==true) {
258 col118.setCellValue(temp[r]);
259 }
260 if (temp[r].contains("抗倒性")==true) {
261 col119.setCellValue(temp[r]);
262 }
263 if (temp[r].contains("抗旱性")==true) {
264 col120.setCellValue(temp[r]);
265 }
266 if (temp[r].contains("抗寒性")==true) {
267 col121.setCellValue(temp[r]);
268 }
269 // if (temp[r].contains("抗寒性")==true) {
270 // col122.setCellValue(temp[r]);
271 // }
272 if (temp[r].contains("粗蛋白质")==true) {
273 col123.setCellValue(temp[r]);
274 }
275 if (temp[r].contains("湿面筋")==true) {
276 col124.setCellValue(temp[r]);
277 }
278 if (temp[r].contains("降落数值")==true) {
279 col125.setCellValue(temp[r]);
280 }
281 if (temp[r].contains("沉淀指数")==true) {
282 col126.setCellValue(temp[r]);
283 }
284 if (temp[r].contains("吸水量")==true||temp[r].contains("吸水率")==true) {
285 col127.setCellValue(temp[r]);
286 }
287 if (temp[r].contains("形成时间")==true) {
288 col128.setCellValue(temp[r]);
289 }
290 if (temp[r].contains("稳定时间")==true) {
291 col129.setCellValue(temp[r]);
292 }
293 if (temp[r].contains("弱化度")==true) {
294 col130.setCellValue(temp[r]);
295 }
296 if (temp[r].contains("出粉率")==true) {
297 col131.setCellValue(temp[r]);
298 }
299 if (temp[r].contains("延伸性")==true) {
300 col132.setCellValue(temp[r]);
301 }
302 if (temp[r].contains("拉伸能量")==true) {
303 col133.setCellValue(temp[r]);
304 }
305 if (temp[r].contains("拉伸面积")==true) {
306 col134.setCellValue(temp[r]);
307 }
308 if (temp[r].contains("最大拉伸阻力")==true) {
309 col135.setCellValue(temp[r]);
310 }
311 if (temp[r].contains("容重")==true) {
312 col136.setCellValue(temp[r]);
313 }
314 if (temp[r].contains("节水指数")==true) {
315 col137.setCellValue(temp[r]);
316 }
317 // if (temp[r].contains("节水指数2")==true) {
318 // col138.setCellValue(temp[r]);
319 // }
320 if (temp[r].contains("节水性")==true) {
321 col139.setCellValue(temp[r]);
322 }
323 // if (temp[r].contains("节水性2")==true) {
324 // col140.setCellValue(temp[r]);
325 // }
326 /
327 各种病症
328 /
329 if(temp[r].contains("抗病鉴定")==true){
330 disease+=temp[r]+":";
331 }
332 if(temp[r].contains("叶锈病")==true){
333 disease+=temp[r]+",";
334 }
335 if(temp[r].contains("条锈病")==true){
336 disease+=temp[r]+",";
337 }
338 if(temp[r].contains("×××病")==true){
339 disease+=temp[r]+",";
340 }
341 if(temp[r].contains("赤霉病")==true){
342 disease+=temp[r]+",";
343 }
344 if(temp[r].contains("抗条锈病")==true){
345 disease+=temp[r];
346 }
347 if(temp[r].contains("纹枯病")==true){
348 disease+=temp[r];
349 }
350 if(temp[r].contains("黄花叶病")==true){
351 disease+=temp[r];
352 }
353 if(temp[r].contains("根腐病")==true){
354 disease+=temp[r];
355 }
356 if(temp[r].contains("秆锈病")==true){
357 disease+=temp[r];
358 }
359 if(temp[r].contains("株期感病")==true){
360 disease+=temp[r];
361 }
362 if(temp[r].contains("株期抗病")==true){
363 disease+=temp[r];
364 }
365 if(temp[r].contains("抗赤霉")==true){
366 disease+=temp[r];
367 }
368 if(temp[r].contains("抗赤霉")==true){
369 disease+=temp[r];
370 }
371 if(true){
372 col141.setCellValue(disease);
373 //System.out.println(disease);
374 }
375
376
377
378 // if (temp[r].contains("抗病性2")==true) {
379 // col142.setCellValue(temp[r]);
380 // }
381
382
383 /
384 导出txt文件
385 /
386 // out.write("属性: "+temp[r]+"\r\n");
387
388 //System.out.println(temp[r]);//输出字符串
389 }
390 }
391 }
392 //System.out.println(list.get(1));
393 }
394
395
396
397 // 第五步,将文件存到指定位置
398 FileOutputStream fout = new FileOutputStream("F://m//2.xls");
399 wb.write(fout);
400 fout.close();
401 /*
402 关闭txt流
403 */
404 // out.flush(); // 把缓存区内容压入文件
405 // out.close(); // 最后记得关闭文件
406 } catch (Exception e) {
407 // TODO Auto-generated catch block
408 e.printStackTrace();
409 }
410 }
411 }
复制代码
4.做成效果如下图所示
转载于:https://blog.51cto.com/14084556/2322718
相关文章:

RetinaFace,最强开源人脸检测算法
作者 | CV君 来源 | 我爱计算机视觉(ID:aicvmlaicvmlaicvml)人脸检测为目标检测的特例,是商业化最早的目标检测算法,也是目前几乎各大 CV 方向 AI 公司的必争之地。WIDER FACE 数据集是由香港中文大学发布的大型人脸数…

OpenCV中cvBlobsLib的编译与使用
OpenCV的cvBlobsLib库的作用类似于matlab中的regionprops函数。 cvBlobsLib库的编译: 首先从http://opencv.willowgarage.com/wiki/cvBlobsLib#Blobextractionlibrary下载最新的v8.3版本的源代码,其次机子上要装有OpenCV1.0的环境,从http:/…

AWS开源Firecracker,一种运行多租户容器服务的新虚拟化技术
现在的技术环境下,容器具有快速启动时间和高密度,VM可以对硬件虚拟化,具有更好的安全性,并对工作负载具有更好的隔离性。容器和VM的特性现在还不可兼得。 现在AWS开源了Firecracker,一种利用KVM的新虚拟化技术…

python urllib2 开启调试
2019独角兽企业重金招聘Python工程师标准>>> 发一段在网上看见. USING HTTPLIB.HTTPCONNECTION.SET_DEBUGLEVEL() WITH URLLIB2 Posted on October 1, 2007, 9:52 pm, by jamiegrove, under python. I’ve been trying to get the debug level turned on in urll…

从发展滞后到不断突破,NLP已成为AI又一燃爆点?
作者 | 刘家俊,一览群智CTO责编 | Jane出品 | AI科技大本营(ID :rgznai100)自然语言处理:人工智能连接主义复兴浪潮中的下一个突破口AI 行业应用是一片新的大陆,深度学习作为新大陆的基石,经历了…

matlab最小分类错误全局二值化算法
转自:http://download.csdn.net/detail/hupeng810/1511870 function imagBW kittlerMet(imag) % KITTLERMET binarizes a gray scale image imag into a binary image % Input: % imag: the gray scale image, with black foreground(0), and white % bac…

XShell连接Deepin
为什么80%的码农都做不了架构师?>>> 先让deepin安装openssh sudo apt-get install openssh-serverchkconfig ssh on 转载于:https://my.oschina.net/enzo/blog/110518

第三届“达观杯”文本智能信息抽取挑战赛丰厚奖金,群英集结,等你来战!...
近日,第三届“达观杯”文本智能信息抽取挑战赛正式上线启动(点击阅读原文,跳转报名页面),6月28日至8月31日,面向所有参赛选手开放竞赛结果提交。本届“达观杯”的任务是信息抽取。“达观杯”大赛由国内文本…

Spline interpolation and Savitzki-Golay smoothing
转自:http://octave.1599824.n4.nabble.com/Spline-interpolation-and-Savitzki-Golay-smoothing-td1675136.html ## natural-cubic-spline interpolation ## usage: yspline spline(x,y,xspline) ## example: ## x 0:10; y sin(x); ## xspline 0:0.1:10; y…

SpringBoot实现热部署(修改class不需要重启)
热部署: devtools可以实现页面热部署(即页面修改后会立即生效, 这个可以直接在application.properties文件中配置spring.thymeleaf.cachefalse来实现) 实现类文件热部署(类文件修改后不会立即生效),实现对属性文件的热部署。 注意:因为采用的虚拟机机制&…

Oracle中查看表空间的使用率的脚本
如题: select f.tablespace_name tablespace_name, round((d.sumbytes / 1024 / 1024 / 1024), 2) total_g, round(f.sumbytes / 1024 / 1024 / 1024, 2) free_g, round((d.sumbytes - f.sumbytes) / 1024 / 1024 / 1024, 2) used_g, round((d.sumbytes - f.sumbyte…

vue实现多个元素或多个组件之间动画效果
2019独角兽企业重金招聘Python工程师标准>>> 多个元素的过渡 <style>.v-enter,.v-leave-to{opacity: 0;}.v-enter-acitve,.v-leave-active{opacity: opacity 1s;} </style> <div idapp><transition><div v-ifshow>hello world</di…

干货 | 20个教程,掌握时间序列的特征分析(附代码)
作者 | Selva Prabhakaran 译者 | Tianyu责编 | Jane出品 | AI科技大本营(ID: rgznai100)【导语】时间序列是指以固定时间为间隔的序列值。本篇教程将教大家用 Python 对时间序列进行特征分析。1、什么是时间序列?时间序列是指以固定时间为间…

利用OpenCV求取图像的重心
转自:http://blog.csdn.net/lxiaoxiaot/article/details/6539834 不规则区域的矩,表示把一个归一化的灰度级图像函数理解为一个二维随机变量的概率密度。 这个随机变量的属性可以用统计特征--矩(Moments)来描述。通过假设非零的像…

C++中Ansi、Unicode、UTF8字符串之间的转换和写入
转自: http://dark0729.blogbus.com/logs/51496111.html Ansi字符串我们最熟悉,英文占一个字节,汉字2个字节,以一个\0结尾,常用于txt文本文件 Unicode字符串,每个字符(汉字、英文字母)都占2个字节,以2个连…

MyBatis的扩展点(plugins)
2019独角兽企业重金招聘Python工程师标准>>> 1、mybatis扩展点plugins mybatis的扩展是通过拦截器Interceptor来实现的,本质上就是JDK的动态代理,所以它只能对接口进行拦截,mybatis可以对以下四个接口类型进行拦截,也就…

linux中使用CST时间
GMT(Greenwich Mean Time,格林威治标准时间): 是指位于英国伦敦郊区的格林尼治天文台的标准时间,因为本初子午线被定义在通过那里的经线。 UTC(Universal Time/Temps Cordonn 世界标准时间)CST(Central Standard Time 國家標準時間,一說中原標…

到「黄埔学院」去:打造AI首席架构师,第二期限量招募!
今年 1 月,百度联合“深度学习技术及应用国家工程实验室”成立黄埔学院,旨在为产业培养第一批“首席AI架构师”。黄埔学院一期学员历时半年的学习和交流,6 月 16 日,黄埔学院一期学员迎来了毕业典礼,并在 7 月百度 AI开…

linux守护进程的创建
下面的完成了这样一个功能,创建一个守护进程,每个一秒在/tmp目录下的文件peng.txt中记录当前系统时间。 一、守护进程 守护进程是linux中的后台服务进程,在系统启动时开始运行,在系统关闭时终止。Linux系统中的大多数服务进程都是…

tesseract3.01的训练和使用
相关源码、资源下载:http://code.google.com/p/tesseract-ocr/downloads/list 训练步骤: 1、 Generate Training Images:生成tif图像文件(简单的几个汉字); 如:ABC.Roman.exp0.tif([lang].[fontname].exp[num].tif)…

旷视推出鼻纹识别,用AI寻找丢失宠物
来源 | 转载自旷视城市大脑(ID:MEGVII_CityBrain)导读:随着人工智能技术(AI)的大热,基于深度学习方法的人脸识别技术已成熟落地,在解锁、支付、认证、摄像等生活方方面面,各个大厂推…
Qt浅谈之一:内存泄露(总结)
一、简介 Qt内存管理机制:Qt 在内部能够维护对象的层次结构。对于可视元素,这种层次结构就是子组件与父组件的关系;对于非可视元素,则是一个对象与另一个对象的从属关系。在 Qt 中,在 Qt 中,删除父对…

LINUX新手入门-1.装系统
LINUX新手入门-1.装系统首先我们用虚拟机模拟 装linux系统,然后下一步下一步,然后完成后,编辑一些设置,把镜像放上面就可以了选第一项,安装系统,查看镜像是否能运行,直接跳过,选择语…

Log4cplus1.04的使用
首先,从http://sourceforge.net/projects/log4cplus/files/log4cplus-stable/下载最新的版本,解压缩,用vs2008打开msvc8文件夹下的log4cplus.sln,并按照提示转换。在Solution Configurations下拉列表框中,会有Debug、D…

FRVT赛程全纪录:格灵深瞳全球排名前五
作者 | 张德兵,格灵深瞳首席科学家&算法部负责人来源 | 转载自知乎张德兵最近两个月,格灵深瞳首席科学家&算法部负责人张德兵与算法团队参加了全球人脸识别算法测试(FRVT、Face Recognition Vendor Test)。虽然是第一次参加此比赛,格…

反转比特位(文章最后有干货)【转】
转自:https://blog.csdn.net/wuxianglonghaohao/article/details/21602305 http://www.newhottopic.com/2014/03/20/reverse-bits/ 把一个无符号整数的比特位反转顺序。有很多种方法来实现这个。我们这里给出一个算法:通过异或运算来交换,然后…

过关斩将打进Kaggle竞赛Top 0.3%,我是这样做的
作者 | Lavanya Shukla译者 | Monanfei责编 | 夕颜出品 | AI科技大本营(id:rgznai100)导读:刚开始接触数据竞赛时,我们可能会被一些高大上的技术吓到。各界大佬云集,各种技术令人眼花缭乱,新手们…

JavaBean规范
2019独角兽企业重金招聘Python工程师标准>>> (1)JavaBean 类必须是一个公共类,并将其访问属性设置为 public (2)JavaBean 类必须有一个空的构造函数:类中必须有一个不带参数的公用构造器&#x…

vigra1.8.0的使用
VIGRA stands for "Vision with Generic Algorithms". Its a novel computer vision library that puts its main emphasis oncustomizablealgorithms and data structures. 1、首先,从http://hci.iwr.uni-heidelberg.de/vigra/下载最新源代码࿰…
17个Python小窍门
python中相对不常见却很实用的小窍门。 空谈不如来码代码吧: 交换变量值 给列表元素创建新的分隔符 找列表中出现次数最多的元素 核对两个字符是否为回文 反向输出字符串 反向输出列表 转置2维数组 链式比较 我刚整理了一套2018最新的0基础入门和进阶教程࿰…