<rt id="bn8ez"></rt>
<label id="bn8ez"></label>

  • <span id="bn8ez"></span>

    <label id="bn8ez"><meter id="bn8ez"></meter></label>

    云自無心水自閑

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

    2016年8月12日

    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 云自無心水自閑 閱讀(428) | 評論 (0)編輯 收藏

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

    posted @ 2017-06-26 09:33 云自無心水自閑 閱讀(396) | 評論 (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 云自無心水自閑 閱讀(320) | 評論 (0)編輯 收藏

    autohotkey
    listary
    cmder可以split screen,在一個窗口中同時運行數個cmd

    posted @ 2017-05-24 07:13 云自無心水自閑 閱讀(17853) | 評論 (0)編輯 收藏

    官網地址:autohotkey.com

    ; fill password
    ^Numpad2::
    Send, root{tab}root{enter}
    Return
    ^Numpad3::
    IfWinExist, ahk_exe OUTLOOK.EXE
    {
        WinActivate ahk_exe OUTLOOK.EXE ; Automatically uses the window found above.
        ; WinMaximize  ; same
        ;Send, Some text.{Enter}
    msgbox Outlook is running.
    }
    Return

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

    <html>
    <head>
        <script src="https://unpkg.com/vue/dist/vue.js"></script>
        <script>
            window.onload = function () {
                var app = new Vue({
                    el: '#app',
                    data: {
                        message: 'Hello Vue!'
                    }
                });
            }    
        </script>
    </head>

    <body>
        <div id="app">
          {{ message }}
        </div>
    </body>
    </html>

    posted @ 2017-02-09 07:41 云自無心水自閑 閱讀(402) | 評論 (0)編輯 收藏


    String[] splits=someString.split("a,b,c,d", ",");
    logger.debug( "array: {}", (Object) splits );

    這里要注意的就是要把數組的數據類型強制轉換為Object 

    posted @ 2016-12-29 11:51 云自無心水自閑 閱讀(1619) | 評論 (0)編輯 收藏

    在windows環境中,可以用如下方法重置root密碼

    1、先停止mysql數據庫

    2、保存密碼重置sql文件
         5.7.6(包括)以后的版本:ALTER USER 'root'@'localhost' IDENTIFIED BY 'MyNewPass';
         5.7.5(包括)以前的版本:SET PASSWORD FOR 'root'@'localhost' = PASSWORD('MyNewPass');
    假設保存到文件: c:\reset.txt

    3、以管理員身份打開命令行窗口,運行
    C:\> cd "C:\Program Files\MySQL\MySQL Server 5.5\bin"
    C:\> mysqld --init-file=C:\reset.txt

    4、啟動后,還不能馬上用新密碼連接數據庫,需要重啟mysql數據庫

    posted @ 2016-12-21 07:12 云自無心水自閑 閱讀(370) | 評論 (0)編輯 收藏

    This is a general step that happens when m2e/m2eclipse (Maven integration for Eclipse) is installed, whether projects are actively using it or not.
    這是因為m2eclipse(maven插件)要在啟動時需要進行的一個步驟。

    This step can be disabled through the Eclipse preferences: Window / Preferences / Maven / "Download repository index updates on startup". This option is on the main "Maven" preference page (not a child page). Just uncheck the box to prevent this from happening.
    我們可以停止這個動作。方法:Windows -> Preferences -> Maven 取消勾選 Download repository index updates on startup

    posted @ 2016-11-29 08:38 云自無心水自閑 閱讀(1310) | 評論 (0)編輯 收藏

    有好幾個java library都可以實現這個功能,但是從pdf提取文本的一個問題是,提取出來的文本沒有固定的順序,不容易比較好的還原其格式。

    我的做法是使用pdfclown來進行這項工作。官方網站是:https://pdfclown.org/ 先下載其最新版本。
    參考其示例代碼:https://pdfclown.org/2010/01/02/upcoming-0-0-8-whats-going-to-be-new/#more-30

    使用這段代碼,我們不僅可以得到文本的字符串,還能得到文本的頁數和相對坐標。
    我的思路是先把所有文本的字符串和坐標提取出來。然后排序,排序的順序是縱坐標,然后橫坐標。
    這樣排序完畢后,就能比較好的解決文本格式問題。

    posted @ 2016-11-28 11:03 云自無心水自閑 閱讀(385) | 評論 (0)編輯 收藏


    1, 先定義一個input, 做為datepicker的容器。
    <input type='text' class="form-control" id="dateTo" name="dateTo" required/>

    2, 在后面加上glyphicon, 注意關鍵是label 中的for的id需要是前面定義的容器的id, 這樣點擊glyphicon的時候就會觸發彈出日期選擇框。
    <label for="dateTo" class="input-group-addon"><span class="glyphicon glyphicon-time"></span></label>

    posted @ 2016-10-10 19:57 云自無心水自閑 閱讀(219) | 評論 (0)編輯 收藏

    在日志文件中看到這個錯誤信息
    Cause: java.sql.SQLException: #HY000

    后來才知道這是因為數據庫中有個別字段要求不能為空, 但是insert語句中沒有提供數據,造成了這個錯誤。

    關鍵是錯誤信息不明確直觀,不容易知道是這個原因


    posted @ 2016-09-28 13:13 云自無心水自閑 閱讀(1067) | 評論 (0)編輯 收藏

        public void afterJFinalStart(){
            Configuration config = FreeMarkerRender.getConfiguration();
            config.setTemplateUpdateDelayMilliseconds( 2 );
            config.setAPIBuiltinEnabled( true );
        }

    posted @ 2016-09-21 14:02 云自無心水自閑 閱讀(239) | 評論 (0)編輯 收藏


    中文版地址  https://angular.cn/

    posted @ 2016-09-16 13:13 云自無心水自閑 閱讀(2108) | 評論 (0)編輯 收藏

    1, call ##002# to cancel "call diversion"

    2, call 121600, choose option "2" to cancel "Active call catcher"

    posted @ 2016-08-25 12:58 云自無心水自閑 閱讀(154) | 評論 (0)編輯 收藏

    1. 格式化XML的插件
    可以安裝“XML Tools", 安裝完畢后,選擇 插件->XML Tools->Pretty Print(XML Only - with line breaks)

    2. 格式化JSON的插件
    可以安裝”JSON Viewer", 安裝完畢后,選擇 插件->JSON Viewer->Format JSON

    3. 格式化SQL的插件
    可以安裝“Poor man's T-Sql Formatter", 選擇 插件->Poor man's T-Sql Formatter->Format T-Sql Code

    posted @ 2016-08-12 15:14 云自無心水自閑 閱讀(1052) | 評論 (0)編輯 收藏

    主站蜘蛛池模板: 国产免费内射又粗又爽密桃视频| 91香蕉国产线在线观看免费| 无码人妻一区二区三区免费视频| 午夜免费福利小电影| 亚洲Av无码专区国产乱码DVD | 久久久久国产精品免费免费搜索| 亚洲春色另类小说| 麻豆高清免费国产一区| 亚洲福利视频网址| 又黄又爽又成人免费视频| 中文字幕亚洲综合小综合在线| 一个人看的www在线观看免费| 国产.亚洲.欧洲在线| 在线精品免费视频| 亚洲欧美日韩一区二区三区| 日日AV拍夜夜添久久免费| 妇女自拍偷自拍亚洲精品| 亚洲AV无码成H人在线观看| 一级毛片aa高清免费观看| 亚洲色成人中文字幕网站| 日本视频在线观看永久免费| 日本一道本高清免费| 曰批免费视频播放在线看片二| 暖暖免费中文在线日本| 最近高清中文字幕免费| 女人被男人桶得好爽免费视频| 亚洲精品美女久久久久| 成人免费毛片内射美女-百度| 亚洲性无码AV中文字幕| 四虎影视在线永久免费看黄| 一级女人18片毛片免费视频| 国产亚洲精品xxx| 蜜臀AV免费一区二区三区| 亚洲综合久久精品无码色欲| 国产男女猛烈无遮挡免费网站| 一级做a爱过程免费视| 久久精品国产亚洲AV网站| 亚洲免费福利在线视频| 亚洲AV成人一区二区三区观看| 亚洲一区无码精品色| 久久久99精品免费观看|