MDA/MDD/TDD/DDD/DDDDDDD
          posts - 536, comments - 111, trackbacks - 0, articles - 0
            BlogJava :: 首頁 :: 新隨筆 :: 聯(lián)系 :: 聚合  :: 管理

          The Jakarta Commons team is glad to announce the availability of commons-fileupload 1.2. Commons Fileupload is a framework for handling HTTP file upload requests in servlets, portlets, and similar server side Java applications.
          Compared to the previous version 1.1.1, the following notable changes have been made:
          ??? * A streaming API has been added. The streaming API allows to handle arbitrarily large files without intermediary files while still keeping an extremely low memory profile.
          ??? * The presence of a content-length header is no longer required.
          ??? * Added support for progress listeners.
          ??? * Added support for header continuation lines.
          ??? * Added support for limiting the actual file size, as opposed to the request size.

          posted @ 2008-09-27 12:34 leekiang 閱讀(357) | 評論 (0)編輯 收藏

          How to exclude DLLs from the distribution

          Sometimes, Python extensions require supporting DLLs from the system. One example of this is cx_Oracle, which requires the Oracle client software in order to do its job. Because cx_Oracle.pyd depends on the Oracle OCI library, py2exe's dependency tracking includes the file OCI.dll from the Oracle distribution in the distribution directory.

          However, it is not appropriate to include OCI.dll with your software, as it is specific to the version of the Oracle client software on the target machine, and is not useful in isolation.

          So, you need to tell py2exe to exclude this DLL from the resulting distribution. The dll_excludes option lets you do this (it's documented in the docstring for the py2exe module). It does not work from the command line, but you can include it in your setup.py as described in PassingOptionsToPy2Exe
          setup(
          options = {"py2exe": { "dll_excludes": ["oci.dll"]}},
          ...
          )
          來源:http://www.py2exe.org/index.cgi/ExcludingDlls

          posted @ 2008-09-27 12:20 leekiang 閱讀(741) | 評論 (0)編輯 收藏

          tomcat里配p6spy,如果tomcat在program files下,會報找不到驅(qū)動的錯誤,看來目錄名不能有空格

          posted @ 2008-09-26 22:32 leekiang 閱讀(319) | 評論 (0)編輯 收藏

          1,突然發(fā)現(xiàn)有些老外的軟件里remove和delete區(qū)分得很清楚,而我們一律翻譯為"刪除"

          posted @ 2008-09-26 16:08 leekiang 閱讀(225) | 評論 (0)編輯 收藏

          1,用filezilla服務(wù)器時可以方便的給一個用戶分配多個目錄,先設(shè)置一個主目錄,別的目錄可以用別名(必須以"/"符號開頭),這樣別的目錄就虛擬為主目錄下的子目錄了。不知道支不支持設(shè)置局域網(wǎng)里的其他機(jī)器的文件夾,要是支持就更好了。

          2,ftp 文件上傳服務(wù)器設(shè)置的幾點經(jīng)驗和竅門!
          http://hi.baidu.com/wgzx/blog/item/554976affaa3d1fffbed5098.html

          3,FileZilla FTP Server安裝設(shè)置教程
          FileZilla Server Interface-->edit-->settings-->general settings-->Max.Number of users(允許最大并發(fā)連接客戶端的數(shù)量)

          4,http://www.aygfsteel.com/yegucheng/archive/2007/10/26/156008.html
          在使用apache的net包處理Serv-U和x-lighgt時遇到的幾點不同
          進(jìn)入一個空目錄:
          ?在serv-U下,調(diào)用fTPClient.changeWorkingDirectory("")方法沒有任何問題(指向一個空的目錄)
          ?在x-light下,調(diào)用方法,會返回501信息
          當(dāng)下載完文件后:
          ?使用 fTPClient.retrieveFileStream(url)方法下載文件,在serv-U下,可以直接下載下一個文件
          ?但是在x-light下,調(diào)用 fTPClient.retrieveFileStream(url)方法后,
          ?必須執(zhí)行 fTPClient.completePendingCommand()方法,關(guān)閉當(dāng)前下載操作,
          ?才能執(zhí)行下一個下載任務(wù)(在net包的API中有相關(guān)的規(guī)定)。

          5,摘自http://blog.csdn.net/wangjian5748/archive/2008/11/28/3404619.aspx
          commons-net的FTPClient,在使用public InputStream retrieveFileStream(String remote)
          方法時需要特別注意,在調(diào)用這個接口后,一定要手動close掉返回的InputStream,然后再調(diào)用completePendingCommand方法,若不是按照這個順序,則不對,偽代碼:
          1. InputStream?is?=?ftpClient.retrieveFileStream(remote);
          2. is.close();
          3. ftpClient.completePendingCommand();
          retrieveFileStream的API文檔說的有點羅嗦,還可以使用下列方法來替換上述使用方式
          使用一個中間文件來做一個轉(zhuǎn)接,這種方式比上述方法的好處就是自己容易控制,不容易出問題。偽代碼如下:
          1. File?localFile?=?new?File(localPath,?localFileName);
          2. OutputStream?output?=?new?FileOutputStream(localFile);
          3. ftpClient.retrieveFile(remoteFileName,?output);
          4. output.close();
          5. InputStream?input?=?new?FileInputStream(localFile);
          關(guān)于原因這里有比較具體的分析:http://marc.info/?l=jakarta-commons-user&m=110443645016720&w=2
          簡單來說:completePendingCommand()會一直在等FTP Server返回226 Transfer complete,但是FTP Server只有在接受到InputStream執(zhí)行close方法時,才會返回。所以先要執(zhí)行close方法

          6,
          Java實現(xiàn)的ftp服務(wù)器 源代碼

          7,java ftp
          http://hi.baidu.com/montaojavahome/blog/item/d8d2691e1236241940341722.html

          使用J-FTP上傳下載



          posted @ 2008-09-26 16:02 leekiang 閱讀(994) | 評論 (0)編輯 收藏

          1,以下是一些零碎的記錄,不全。
          //字段為java.sql.Blob類型
          Fj?fj?=?new?Fj();
          fj.setAttblob(Hibernate.createBlob(
          new?byte[1]));//用empty_blob()替換?
          session.save(fj);
          session.flush();
          session.refresh(fj,?LockMode.UPGRADE);
          org.hibernate.blob.SerializableBlob?sb?
          =
          (org.hibernate.blob.SerializableBlob)?fj.getAttblob();
          oracle.sql.BLOB?blob?
          =?(oracle.sql.BLOB)?sb.getWrappedBlob();
          OutputStream?os?
          =?blob.getBinaryOutputStream();
          //------

          2,用jdbc讀取CLOB
          http://hi.baidu.com/xh28025/blog/item/f61c2df1ef8130c47831aa70.html
          String?description?=?""
          ???query?
          =?"select?picstr?from?clobtest_table?where?id?=?'001'";
          pstmt?
          =?con.prepareStatement(query);
          ResultSet?result?
          =?pstmt.executeQuery();
          if(result.next()){
          ???oracle.jdbc.driver.OracleResultSet?ors?
          =
          ???(oracle.jdbc.driver.OracleResultSet)result;
          ???oracle.sql.CLOB?clobtmp?
          =?(oracle.sql.CLOB)?ors.getClob(1);

          ???
          if(clobtmp==null?||?clobtmp.length()==0){
          ???System.out.println(
          "======CLOB對象為空?");
          ???description?
          =?"";
          ???}
          else{
          ???description
          =clobtmp.getSubString((long)1,(int)clobtmp.length());//從1開始?
          ???System.out.println(
          "======字符串形式?"+description);
          ???}
          }


          posted @ 2008-09-24 14:01 leekiang 閱讀(512) | 評論 (0)編輯 收藏

          1,commons-net ftpclient 怎么判斷服務(wù)器是否存在文件A?
          FTPFile[] ? ftpFiles ? = ? ftp.listFiles("a"); ?
          ? System.out.println(ftpFiles.length);

          2,http://www.aygfsteel.com/sterning/archive/2007/10/22/154861.html

          3,亂碼問題.
          應(yīng)用服務(wù)器在unix上,ftp在window上,下載時換行處可能有問題,
          ?解決:將文件傳輸類型設(shè)置為二進(jìn)制
          ???? ftpClient.setFileType(
          FTP.BINARY_FILE_TYPE);
          ?見
          public InputStreamretrieveFileStream(String path)方法的注釋:
          If the current file type is ASCII, the returned InputStream will convert line separators in the file to
          the local representation.
          commons.net包中的FTPClient.listFiles()方法返回null的問題及其解決方案
          http://hi.baidu.com/3seefans/blog/item/667e32afa0a58bc97cd92aa2.html
          http://hi.baidu.com/hzwei206/blog/item/7c901d2debf7e136359bf7cd.html
          ?
          6,
          http://zjsoft.javaeye.com/blog/189874
          http://topic.csdn.net/t/20050820/13/4220332.html
          http://www.cnblogs.com/swingboat/archive/2005/05/31/165613.html
          http://www.onflex.org/ted/2007/05/flexftp-ftp-client-in-flex-using.php
          http://tech.it168.com/j/2007-10-18/200710182058687.shtml
          http://hi.baidu.com/3seefans/blog/item/667e32afa0a58bc97cd92aa2.html

          posted @ 2008-09-22 04:03 leekiang 閱讀(486) | 評論 (0)編輯 收藏

          1,MySQL刪除表中大批量的數(shù)據(jù)
          有1800萬條,直接執(zhí)行 DELETE FROM osc_logs WHERE status=1 會發(fā)現(xiàn)刪除失敗,lock wait timeout exceed。可以分批來刪除,比如每10000條進(jìn)行刪除

          DELETE FROM osc_logs WHERE status=1 ORDER BY log_id LIMIT 10000;

          然后分多次執(zhí)行就可以把這1800萬條記錄成功刪除。

          來源:http://www.javayou.com/diary/146633154?catalog=4


          posted @ 2008-09-20 02:01 leekiang 閱讀(95) | 評論 (0)編輯 收藏

          1,B 樹、 B- 樹、 B+ 樹、 B* 樹都是什么
          http://www.cppblog.com/qiujian5628/articles/42190.html

          2,紅黑樹
          http://baike.baidu.com/view/133754.htm

          3,AVL樹
          http://zh.wikipedia.org/wiki/AVL%E6%A0%91

          4,分析代碼的時空復(fù)雜度(圖n最短路徑算法)

          posted @ 2008-09-20 01:54 leekiang 閱讀(261) | 評論 (0)編輯 收藏

          除了fckeditor,又發(fā)現(xiàn)一款可能更好的tinymce
          TinyMCE 和 FCKEditor的差別和好壞之處在哪?

          posted @ 2008-09-20 01:32 leekiang 閱讀(204) | 評論 (0)編輯 收藏

          僅列出標(biāo)題
          共54頁: First 上一頁 31 32 33 34 35 36 37 38 39 下一頁 Last 
          主站蜘蛛池模板: 体育| 镇雄县| 高平市| 藁城市| 南雄市| 嘉义县| 亳州市| 开封县| 通道| 珲春市| 台前县| 黑水县| 六枝特区| 渭源县| 大足县| 始兴县| 谷城县| 太湖县| 灵丘县| 盐亭县| 徐闻县| 虹口区| 罗平县| 寻乌县| 葵青区| 剑川县| 长兴县| 简阳市| 泽普县| 江陵县| 万山特区| 明星| 闵行区| 定陶县| 天峨县| 云林县| 沙田区| 府谷县| 望谟县| 丹棱县| 茌平县|