<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 :: 首頁 :: 新隨筆 :: 聯(lián)系 :: 聚合  :: 管理

    2016年5月31日

    1. java zip 多個(gè)文件時(shí),如果先添加了一個(gè)excel文件,然后再想添加其他的文件時(shí)會出現(xiàn) steam is closed的錯(cuò)誤。這是因?yàn)閣ork.write(outputSteam)后,出調(diào)用outputSteam.close(),關(guān)閉輸出流。
    解決方法:
    將原來的程序:
                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區(qū)分大小寫
    select * from table1 where binary field1 = 'abc';

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

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

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

    move Git Server to a new IP/URL:

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

    也可以在git視圖中,右鍵點(diǎn)擊項(xiàng)目,選擇屬性,然后修改url中的地址

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

    autohotkey
    listary
    cmder可以split screen,在一個(gè)窗口中同時(shí)運(yùn)行數(shù)個(gè)cmd

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

    官網(wǎng)地址: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 云自無心水自閑 閱讀(380) | 評論 (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 云自無心水自閑 閱讀(416) | 評論 (0)編輯 收藏


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

    這里要注意的就是要把數(shù)組的數(shù)據(jù)類型強(qiáng)制轉(zhuǎn)換為Object 

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

    在windows環(huán)境中,可以用如下方法重置root密碼

    1、先停止mysql數(shù)據(jù)庫

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

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

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

    posted @ 2016-12-21 07:12 云自無心水自閑 閱讀(384) | 評論 (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.
    這是因?yàn)閙2eclipse(maven插件)要在啟動時(shí)需要進(jìn)行的一個(gè)步驟。

    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.
    我們可以停止這個(gè)動作。方法:Windows -> Preferences -> Maven 取消勾選 Download repository index updates on startup

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

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

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

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

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


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

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

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

    在日志文件中看到這個(gè)錯(cuò)誤信息
    Cause: java.sql.SQLException: #HY000

    后來才知道這是因?yàn)閿?shù)據(jù)庫中有個(gè)別字段要求不能為空, 但是insert語句中沒有提供數(shù)據(jù),造成了這個(gè)錯(cuò)誤。

    關(guān)鍵是錯(cuò)誤信息不明確直觀,不容易知道是這個(gè)原因


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

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

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


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

    posted @ 2016-09-16 13:13 云自無心水自閑 閱讀(2111) | 評論 (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 云自無心水自閑 閱讀(160) | 評論 (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 云自無心水自閑 閱讀(1058) | 評論 (0)編輯 收藏

     
    使用的工具

    1. Apache HttpClient
    2. Firefox + FireBug
    3. Burp Suite ( https://portswigger.net/burp ) + Firefox FoxyProxy

    Firefox + FireBug 主要用于查看渲染出的頁面中的信息(比如:表單項(xiàng)的名稱,節(jié)點(diǎn)ID等等)
    Burp Suite 主要用于動態(tài)攔截頁面的交互,查看Ajax的調(diào)用。
    HttpClient 用于最后程序的編制。搞清楚了網(wǎng)頁交互的過程,就可以自主決定程序需要包含的內(nèi)容。
    在實(shí)際網(wǎng)頁中,可能需要點(diǎn)開數(shù)級菜單,才能最后看到需要的內(nèi)容。
    但是在程序中,可以直接跳到最后一步。

    posted @ 2016-06-05 19:00 云自無心水自閑 閱讀(206) | 評論 (0)編輯 收藏

    1. 表格文字右對齊 
     <table>
    <tr>
        <td><p style="text-align:right;margin:0;padding:0">文字右對齊</p></td>
        <td>文字左對齊</td>
    </tr>
    </table>

    2. 表格邊緣的margin 需要在表格外再套一個(gè)div
    <div style="margin:10px">
        <table>
        ......
        </table>
    </div>

    3. btn-toolbar class can put a margin between 2 "pull-right" buttons
            <div class="row">
                <div class="col-md-2"></div>
                <div class="col-md-8 btn-toolbar">
                    <input type="submit" class="btn btn-warning pull-right" value="Submit">
                    <input type="button" id="profilePassBackBtn" class="btn btn-info pull-right" value="Back">
                </div>
                <div class="col-md-2">
                </div>
            </div>

    posted @ 2016-05-31 11:39 云自無心水自閑 閱讀(392) | 評論 (0)編輯 收藏

    主站蜘蛛池模板: 久热综合在线亚洲精品| 免费在线看片网站| 亚洲特级aaaaaa毛片| 久久福利青草精品资源站免费| 亚洲熟妇少妇任你躁在线观看无码 | 亚洲人成免费网站| 337p日本欧洲亚洲大胆艺术| 美丽姑娘免费观看在线观看中文版| 亚洲色欲久久久综合网东京热| 国产精品免费一区二区三区| 亚洲一区精品无码| 久久免费动漫品精老司机| 4444亚洲国产成人精品| 大地资源二在线观看免费高清 | 国产高清不卡免费视频| 久久亚洲中文字幕精品有坂深雪| 亚洲香蕉免费有线视频| 亚洲 欧洲 日韩 综合在线| 成人人观看的免费毛片| 高潮毛片无遮挡高清免费视频| heyzo亚洲精品日韩| 99免费精品视频| 亚洲美女免费视频| 天天拍拍天天爽免费视频| 在线观看亚洲专区| 亚洲欧洲日产国码无码网站| 久久ww精品w免费人成| 亚洲国产精品一区二区三区在线观看| 免费的一级黄色片| 久久久久久av无码免费看大片 | 久久精品九九亚洲精品天堂| 最近中文字幕无免费| 亚洲aⅴ天堂av天堂无码麻豆| 亚洲AV无码乱码在线观看牲色| 精品一区二区三区高清免费观看| 亚洲视频在线观看免费| 成人特黄a级毛片免费视频| h片在线观看免费| 亚洲午夜未满十八勿入| 免费国产高清视频| 18禁黄网站禁片免费观看不卡|