云自無心水自閑

          天平山上白云泉,云自無心水自閑。何必奔沖山下去,更添波浪向人間!
          posts - 288, comments - 524, trackbacks - 0, articles - 6
            BlogJava :: 首頁 :: 新隨筆 :: 聯系 :: 聚合  :: 管理

          日歷

          <2017年6月>
          28293031123
          45678910
          11121314151617
          18192021222324
          2526272829301
          2345678

          隨筆檔案

          積分與排名

          • 積分 - 1125968
          • 排名 - 27

          最新評論

          2017年6月15日

          1. java zip 多個文件時,如果先添加了一個excel文件,然后再想添加其他的文件時會出現 steam is closed的錯誤。這是因為work.write(outputSteam)后,出調用outputSteam.close(),關閉輸出流。
          解決方法:
          將原來的程序:
                      ZipEntry entry = new ZipEntry( "file3.txt" );
                      zos.putNextEntry( entry );
                      workbook.write( zos );
                      zos.closeEntry();
          改為:
                      ZipEntry entry = new ZipEntry( "file3.txt" );
                      zos.putNextEntry( entry );
                      workbook.write( new NonCloseableOutputStream( zos ) );
                      zos.closeEntry();

          其中 NonCloseableOutputStream 定義如下:
          public class NonCloseableOutputStream extends java.io.FilterOutputStream {
              public NonCloseableOutputStream(OutputStream out) {
                  super(out);
              }
              @Override public void close() throws IOException {
                  flush();
              }
          }



          2. 使用binary使得mysql區分大小寫
          select * from table1 where binary field1 = 'abc';

          posted @ 2017-08-09 19:52 云自無心水自閑 閱讀(432) | 評論 (0)編輯 收藏

          https://notepad-plus-plus.org/community/topic/13661/plugin-manager-x64-available-submit-your-plugins

          posted @ 2017-06-26 09:33 云自無心水自閑 閱讀(400) | 評論 (0)編輯 收藏

          move Git Server to a new IP/URL:

          you can just edit 
          .git/config and change the URLs there

          也可以在git視圖中,右鍵點擊項目,選擇屬性,然后修改url中的地址

          posted @ 2017-06-15 08:40 云自無心水自閑 閱讀(325) | 評論 (0)編輯 收藏

          主站蜘蛛池模板: 新巴尔虎左旗| 东乌珠穆沁旗| 南投县| 遵义市| 宜川县| 香格里拉县| 贵州省| 讷河市| 阜南县| 米林县| 安国市| 佳木斯市| 资兴市| 漳平市| 沐川县| 广州市| 灵宝市| 莱阳市| 赤城县| 商南县| 孟州市| 富阳市| 新密市| 额济纳旗| 玉树县| 滁州市| 名山县| 屏山县| 桃园县| 濮阳县| 麻江县| 巩留县| 闽侯县| 东莞市| 什邡市| 贵州省| 象州县| 东明县| 武宁县| 明水县| 三门县|