發現java中容器遍曆的一個很方便方法比如有一個vector<string> vec;要遍曆該容器中的每一個元素,最簡單的方法可以用for(int i =0; i< vec.size(); i++){ do something on vec.elementat(i)}更簡單的寫法就是for (String temp : vec) {do something on
org.apache.ibatis.builder.IncompleteElementException: Could not find result map java.lang.Integer at org.apache.ibatis.builder.MapperBuilderAssistant.setStatementResultMap(MapperBuilderAssistant.java:354) at
This happens when you write to a TCP connection that has already beenclosed by the reading end. Depending on your application, you wouldeither treat it as an application protocol error or ignore it and giveup. In either case the socket is almost
java.io.CharConversionException: Not an ISO 8859-1 character: XXX這個問題可能是因為outputstream輸出中文字造成的影響。response.setContentType("text/html;charset=UTF-8");//response.getOutputStream().print("中文字"); //這行會出錯response.getWriter().print("中文字");
java ftpclient問題(sun.net.ftp.FtpClient) 1 sun.net.ftp.FtpProtocolException: PORT :501 PORT not allowed after EPSV ALL, active mode off 很多ftp伺服器傳輸時採用被動模式,可用命令ftpClient.sendServer("PASV")解決。後面不要int reply = ftpClient.readServerResponse();否則問題依舊。 2
java 擷取時間到毫秒 Calendar CD = Calendar.getInstance(); int YY = CD.get(Calendar.YEAR) ; int MM = CD.get(Calendar.MONTH)+1; int DD = CD.get(Calendar.DATE); int HH = CD.get(Calendar.HOUR_OF_DAY); int NN = CD.get(Calendar.MINUTE); int SS =