Time of Update: 2018-07-25
編譯時間遇到下面這個問題。一直搞不懂是什麼意思 Microsoft Windows [版本 6.1.7601]著作權 (c) 2009 Microsoft Corporation。著作權所有,並保留一切權利。C:\Users\Administrator>f:F:\>cd workspace2\IM\bin\intimeMessageF:\workspace2\IM\bin\intimeMessage>java
Time of Update: 2018-07-25
java.lang.NumberFormatException: For input string: "2013-01-03 15:16:21" java.lang.NumberFormatException.forInputString(NumberFormatException.java:48) java.lang.Long.parseLong(Long.java:412)
Time of Update: 2018-07-25
Struts Problem Report Struts has detected an unhandled exception: Messages: javax.transaction.SystemException javax/transaction/SystemException File:
Time of Update: 2018-07-25
GAE Java 應用效能最佳化 轉載請保留作者資訊: 作者:88250 日期:2011 年 2 月 8 日 本文是作者開發 GAE 應用的效能最佳化經驗談,主要從架構、緩衝、非同步呼叫等方面介紹了如何進行高效能 GAE 應用的設計及最佳化。 ToC 使用 Memcache 進行緩衝 HTML 頁面 資料查詢結果
Time of Update: 2018-07-25
最近在做Mp3 ID3標籤的提取,又遇到了中文字元編碼的問題。記得以前從一個文字檔中讀取中文字內容時,如下方法所示: /** * 按行對去讀取文字檔內容 * @param
Time of Update: 2018-07-25
http://www.cnblogs.com/jdksummer/articles/2851551.html 2013-01-08 15:37:19,565 WARN org.apache.hadoop.ipc.HBaseServer: IPC Server listener on 60000: readAndProcess threw exception java.io.IOException: Connection reset by peer. Count of
Time of Update: 2018-07-25
import java.io.BufferedReader;import java.io.BufferedWriter;import java.io.File;import java.io.FileReader;import java.io.FileWriter;/** *根據需求,直接調用靜態方法start來執行操作 參數: rows 為多少行一個檔案 int 類型 sourceFilePath 為源檔案路徑 String * 類型 targetDirectoryPath
Time of Update: 2018-07-25
import java.io.FileOutputStream;import java.io.InputStream;import java.io.OutputStream;import java.net.URL;import java.net.URLConnection;/** * 下載圖片 * @author vinegar */public class DownImage {public static void download(String urlString, String
Time of Update: 2018-07-25
import java.io.File;import java.io.FileOutputStream;import java.io.InputStream;import java.io.OutputStream;import java.net.URL;import java.net.URLConnection;/** * 下載檔案 * @author vinegar */public class DownFile {public static void download(String
Time of Update: 2018-07-25
import java.io.File;import java.util.Arrays;/** * 輸出某檔案夾下的所有檔案名稱 * * @ClassName: PrintFileName * @author vinegar * @date 2012-7-8 下午07:42:20 * */public class PrintFileName {/*** 把檔案夾下所有檔案名稱全部輸出來* * @Title: printFileName* @param @param file*
Time of Update: 2018-07-25
關於對象的執行個體化過程: 1.檢查類是否載入,如果沒有載入就載入這個類,要載入所有父類; 懶式載入(按需載入):如果第一次用到載入,只載入一下.通過ClassPath制定的路徑尋找類檔案(.class) 載入以後是一個對象,類型是class.獲得這個類對象:student.class-->class執行個體 2.在記憶體堆中指派至空間.遞迴分配所有父類和子類屬性空間.先父類型再子類型,屬性預設自動初始化.自動初始化為"0"值;
Time of Update: 2018-07-25
查看下面的代碼,寫出可以使程式正常執行的修改方法 1.public class MyClass { 2. static String s1; 3. String s2; 4. public static void main(String args[]) { 5. String s3; 6. System.out.println("s1 =" + s1); 7. System.out.println("s2
Time of Update: 2018-07-25
用到了pinyin4j-2.5.0.jar這樣一個jar包;具體實現代碼如下:import net.sourceforge.pinyin4j.PinyinHelper;import net.sourceforge.pinyin4j.format.HanyuPinyinCaseType;import net.sourceforge.pinyin4j.format.HanyuPinyinOutputFormat;import
Time of Update: 2018-07-25
public static void main(String[] args) {// TODO Auto-generated method stubInteger a = new Integer(1);Integer b = new Integer(1);int c=1;Integer e =
Time of Update: 2018-07-25
parseInt(String s )方法是類Integer的靜態方法,它的作用就是將形參 s 轉化為整數,比如:Interger.parseInt("1")=1;Integer.parseInt("20")=20;Integer.parseInt("324")=324;當然,s 表示的整數必須合法,不然是會拋異常的。valueOf(String s )也是Integer類的靜態方法,它的作用是將形參 s
Time of Update: 2018-07-25
java.lang包中的Integer類是我們比較常用的類,比如以下代碼: Integer a=new Integer(1) Integer a=Integer.valueOf(1); 兩個都是得到一個Integer對象,但是Integer.valueOf的效率高。為什麼呢。因為Integer.valueOf用到了緩衝機制。 其中Integer.valueOf方法代碼如下: public static Integer valueOf(int i) {final int
Time of Update: 2018-07-25
Error!]the type java.lang.String cannot be resolved. it is indirectly referenced from required .class files 有時候用myeclipse匯入一個外來的工程時會出現以上錯誤,這主要是因為你的電腦上安裝了多個版本的jdk,解決的辦法是:操作步驟: project->properties->Java Bulid Path
Time of Update: 2018-07-25
在程式開發過程當中,往往存在這樣一種情況,程式首先執行完method1得到結果result1之後,在執行method2獲得結果result2,然後再按照result1和result2的結果來判定程式下一步的執行。在這裡method1和method2是相互不關聯的,即method1的執行和method2的執行位置可以調整,而不影響程式的執行結果。 1、串列程式
Time of Update: 2018-07-25
HiveServer2支援多用戶端的並發訪問,使用ZooKeeper來管理Hive表的讀寫鎖。實際環境中,遇到了HiveServer2串連ZooKeeper出現Too many connections的問題,這裡是對這一問題的排查和解決過程。 問題描述 HiveServer2服務無法執行hive命令,日誌中提示如下錯誤: 2013-03-2212:54:43,946 WARN zookeeper.ClientCnxn(ClientCnxn.java:run(1089
Time of Update: 2018-07-25
使用Spring data jpa時,建立自己的interface,並實現它,分別命名為: interface:ModuleDaoCustom implement:ModuleDaoCustomImpl 然後建立ModuleDao extends PagingAndSortingRepository<T, Long>, ModuleDaoCustom 結果就報錯:java.lang.IllegalArgumentException: No property find