import java.io.File;import java.io.FileInputStream;import java.io.FileNotFoundException;import java.io.IOException; public class Demo4 { public static ...
分类:
其他好文 时间:
2016-12-05 19:15:04
阅读次数:
137
用java实现的简单管理系统 运行出来的状态 实现了新增、删除、借出、归还、排行榜简单的功能! 下面是简单的代码 首先定义一个书籍类,自己打开哦! 1 public class Book implements Comparable{ 2 3 String name; 4 String date; 5 ...
分类:
编程语言 时间:
2016-12-05 19:01:31
阅读次数:
215
with open('test.txt','r',encoding='utf8') as f: Exception:'encoding' is an invalid keyword argument for this function Reason:'encoding' is not suitabl ...
分类:
编程语言 时间:
2016-12-05 17:10:14
阅读次数:
216
There are n bulbs that are initially off. You first turn on all the bulbs. Then, you turn off every second bulb. On the third round, you toggle every ...
分类:
其他好文 时间:
2016-12-05 09:30:15
阅读次数:
186
Given an integers array A. Define B[i] = A[0] * ... * A[i-1] * A[i+1] * ... * A[n-1], calculate B WITHOUT divide operation. Have you met this question ...
分类:
编程语言 时间:
2016-12-05 01:52:03
阅读次数:
142
第一种: 写入的内容中利用\r\n进行换行 第二种: 利用BufferedWriter的newline()方法 但是newLine在使用中可能会出现问题: 不同系统的换行符: windows --> \r\n Linux --> \r mac --> \n 我们一般开发是在 windows 下开发, ...
分类:
编程语言 时间:
2016-12-05 01:28:42
阅读次数:
314
一、搭建环境与测试 1、web.xml文件,配置核心Filter 1: 2: 7: 8: struts2 9: org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter 10: 11: 12: struts2 13: ... ...
分类:
其他好文 时间:
2016-12-04 19:25:06
阅读次数:
279
wait notify 几个注意点: wait 与 notify/notifyAll 方法必须在同步代码块中使用,即要先对调用对象加锁。 当线程执行wait()时,会把当前的锁释放,然后让出CPU,进入等待状态。 当执行notify/notifyAll方法时,会唤醒一个处于等待该 对象锁 的线程,然 ...
分类:
编程语言 时间:
2016-12-04 17:30:46
阅读次数:
182
经常用到的上传: 头像上传,资料分享等 文件上传的步骤 1、指定表单类型为文件上传表单 enctype="multipart/form-data" 2、表单提交方式必须为:post(get方式只能提交1k大小的数据) 3、表单中存在文件域表单元素 如下: 一、手动实现文件上传 代码如下 之后启动服务 ...
分类:
编程语言 时间:
2016-12-03 23:35:44
阅读次数:
331
quartz.xml <?xml version="1.0" encoding="UTF-8"?><beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchem ...
分类:
编程语言 时间:
2016-12-03 18:31:25
阅读次数:
175