Time of Update: 2018-07-27
題目: Given a non-negative integer num, repeatedly add all its digits until the result has only one digit. For example: Given num = 38, the process is like: 3 + 8 = 11, 1 + 1 = 2. Since 2 has only one digit, return it. public class Solution258
Time of Update: 2018-07-27
在maven多模組項目中,做統一版本管理的時候通常在父類pom檔案中定義《dependencyManagement》節點,該節點類申明的《dependencies》節點內容都是關於統一定義的資源版本,直接定義的《dependencies》節點裡面的資源無需再引入版本相關的內容,舉例如下: <dependencyManagement>
Time of Update: 2018-07-27
最近在一個測試載入器的項目開發中,需要用到swt的tree控制項構建一棵樹來組織測試案例,swt本身提供了tree控制項來開發樹形結構,我所要做的就是把資料按照商務邏輯關係組織成一個xml檔案,通過解析xml來構建這棵樹,xml代碼如下: <?xml version="1.0" encoding="GB2312" standalone="no"?><configs><project
Time of Update: 2018-07-27
求職簡曆 李勝釗 三年以上工作經驗 | 男 | 26歲(1987年1月) 居住地:成都 電 話:133-****-1107(手機) E-mail:monkeyk1987@gmail.com 求職意向 工作性質: 全職 希望行業: 電腦軟體(JAVA方面) 目標地點: 成都 期望月薪: 面議/月 目標職能: 中進階JAVA開發工程師,專案管理
Time of Update: 2018-07-27
// js 驗證檔案/** * 驗證手機號碼格式 * @param {Object} id */function checkMobile(id) { var val = $("#" + id).val(); var reg = /^1[3|4|5|8][0-9]\d{8}$/; if(!(reg.test(val))) { $("#" + id).val(""); $("#
Time of Update: 2018-07-27
基於xxl-job(文章地址:https://segmentfault.com/a/1190000008597164)改造,推介的文章當中關於調度有詳細的說明。接下來我只說下我如何把這個分布式任務調度整合到自己的項目當中。環境說明:tomcat7、jdk6、mysql5.6、jetty8、maven 整合步驟如下: 第一步:下載demo,地址:http://download.csdn.net/download/u013294278/9941555
Time of Update: 2018-07-27
Not so Mobile Time Limit:3000MS Memory Limit:Unknown 64bit IO Format:%lld & %llu Submit Status Description Before being an ubiquous communications
Time of Update: 2018-07-27
轉自: http://wentao365.iteye.com/blog/616396 Java代碼 System.out.println("-------------------------"); Properties p = System.getProperties();
Time of Update: 2018-07-27
裝配bean(基於註解) l 註解:就是一個類,使用@註解名稱 l 開發中:使用註解 取代 xml設定檔。 l 註解使用前提,添加命名空間,讓spring掃描含有註解類 1. @Component @Component取代<bean class=""> @Component("id")取代
Time of Update: 2018-07-27
使用ant指令碼前的準備 1、下載一個ant安裝包。如:apache-ant-1.8.4-bin.zip。解壓到E盤。 2、配置環境變數。新增ANT_HOME:E:\apache-ant-1.8.4;PATH增加:E:\apache-ant-1.8.4\bin。 3、檢查ant是否配置完成。運行->cmd輸入:ant -version。查看是否列印ant的版本號碼。 打包的實質 產生jar包的實質 1、編譯工程src檔案夾下的java檔案,產生相應的class檔案。
Time of Update: 2018-07-27
package com.cqhope.read;import java.awt.image.BufferedImage;import java.io.ByteArrayInputStream;import java.io.ByteArrayOutputStream;import java.io.File;import java.io.IOException;import javax.imageio.ImageIO;/** * 操作圖片檔案類。 * @author yanghaitao
Time of Update: 2018-07-27
題目 Given an array of size n, find the majority element. The majority element is the element that appears more than ⌊ n/2 ⌋ times. You may assume that the array is non-empty and the majority element always exist in the array. public class
Time of Update: 2018-07-27
一般大家都知道ArrayList和LinkedList的大致區別: 1.ArrayList是實現了基於動態數組的資料結構,LinkedList基於鏈表的資料結構。 2.對於隨機訪問get和set,ArrayList覺得優於LinkedList,因為LinkedList要移動指標。 3.對於新增和刪除操作add和remove,LinedList比較佔優勢,因為ArrayList要移動資料。 這一點要看實際情況的。
Time of Update: 2018-07-27
在spring batch中,我們經常使用spring提供的jdbcTemplate進行資料庫操作。 假設有一張表People.我們需要插入多條資料。處理的方法有兩種: 第一種方法是對每一個資料,都執行一直insert命令: jdbcTemplate.update(INSERT_PEOPLE_QUERY, people.getFirstName(), people.getLastName()); 第二種方法是使用batchUpdate的方法:
Time of Update: 2018-07-27
在本書的前面所介紹的內容中,所處理的都是純文 本檔案。但是事實上,人們用於儲存資訊的檔案並不是純文字格式。現在比較流行的檔案儲存體格式有Adobe公司的PDF和Microsoft的Word、 Excel等。在處理這些檔案的時候,不能簡單的從檔案讀取字元,需要根據他們特殊的格式提取內容。本章就將對比較流行的PDF、Word和Excel格 式的處理工具逐一進行介紹。 7.1 使用PDFBox處理PDF文檔 PDF全稱Portable Document
Time of Update: 2018-07-27
在啟動tomcat以後,控制台發現“Offending class: javax/servlet/Servlet.class”資訊: Using CATALINA_HOME: "D:\apache-tomcat-7.0.52" Using CATALINA_TMPDIR: "D:\apache-tomcat-7.0.52\temp" Using JRE_HOME:
Time of Update: 2018-07-27
這題不難,記錄的原因是:該題我用到了HashMap來記錄每個出現的數字以及出現的次數。在一些筆試面試中,總會出現 類似問題,但都會告訴你數組超大,有成千上萬的資料量(網易雲音樂播放熱門排行榜、百度搜尋熱門排行榜等等),此時用HashMap來解決實在完美,在這裡有點大材小用了。。。。。。。 題目描述
Time of Update: 2018-07-27
常用的Regex大全:http://blog.csdn.net/onebigday/article/details/5429868 Regex在資訊的匹配,驗證上起很大的作用。 深入理解Regexhttp://www.cnblogs.com/China3S/archive/2013/11/30/3451971.html 這裡記錄一下學習js實現註冊驗證的小例子。新手勿噴【捂臉】。 一:css樣式檔案 *{ margin: 0px;
Time of Update: 2018-07-27
官方文檔:http://ant.apache.org/manual/Tasks/mail.html 1,先需要把javax.mail.jar添加到ant_home的lib目錄下 2,配置build.xml 主要stmp伺服器位址,連接埠,使用者名稱,密碼 一般郵件的設定裡都有這些參數。 以163為例,如下 <target name="mail" ><mail
Time of Update: 2018-07-27
範例程式碼: public class VariableParameter { public static int add(int x, int...args) { int sum = x; for (int i = 0; i < args.length; i++) { sum += args[i]; } return sum; } public static void