Time of Update: 2016-01-10
LeetCode,leetcodeoj題目:Given two binary trees, write a function to check if they are equal or not.Two binary trees are considered equal if they are structurally identical and the nodes have the same value.思路:遞迴package tree;public class SameTree {
Time of Update: 2016-01-11
Hibernate4 clob欄位存取,hibernate4clob欄位domain的欄位: private Clob content;hibernate的xml映射 <property name="content" type="clob"> <column name="CONTENT" > <comment>內容</comment>
Time of Update: 2016-01-11
Spring學習筆記(1)——資源載入,spring學習筆記<!-- 占坑,遲點補充底層原理
Time of Update: 2016-01-11
webservice入門(2)開發ws程式,webservicews因為webservice分為服務端和用戶端,所以如果要學習的話,那麼肯定是包括這兩部分的了。1.開發服務端的webservice: 使用jdk開發ws其實很簡單,只是需要一些註解:最重要的是@WebService,@WebMethod這兩個註解,分類在類和方法上面註解。註明這是一個ws介面,然後在實現就可以了,下面是例子:/** * SEI 介面 * @author Hotusm * */@WebServicepublic
Time of Update: 2016-01-10
Spring 整合jedis使用的是maven,所以直接上依賴包了pom檔案 Web pom檔案 4.0.0com.tgbdui1dui.parent0.0.1-SNAPSHOT../dui1dui.parent/pom.xmldui1dui.user.webwarjunitjunit
Time of Update: 2016-01-09
LeetCode,leetcodeoj題目:Given n, generate all structurally unique BST's (binary search trees) that store values 1...n. For example,Given n = 3, your program should return all 5 unique BST's shown below. 1 3 3 2 1 \ /
Time of Update: 2016-01-09
演算法篇---java經典問題!!!,演算法---java經典部落格地址:http://www.cnblogs.com/oumyye/問題一:==與equal的區別?==和 equals 都是比較的,而前者是運算子,後者則是一個方法,基礎資料型別 (Elementary Data Type)和引用資料類型都可以使用運算子==,而只有參考型別資料才可以使用
Time of Update: 2016-01-09
IO流01--畢向東JAVA基礎教程視頻學習筆記,01--畢向東 提要01 IO流(BufferedWriter)02 IO流(BufferedReader)03 IO流(通過緩衝區複製文字檔)04 IO流(readLine的原理)05 IO流(MyBufferedReader)06 IO流(裝飾設計模式)07 IO流(裝飾和繼承的區別)01
Time of Update: 2016-01-07
從頭認識java-16.2 遍曆檔案夾這一章節我們討論一下遍曆檔案夾。1.通過遞迴遍曆,遍曆項目的根目錄 package com.ray.ch16;import java.io.File;public class Test {public static void showAllFiles(String path) {File root = new File(path);File[] files = root.listFiles();for (File file : files)
Time of Update: 2016-01-07
String和StringBuffer、StringBuilder的區別,stringbuffer目錄:1、String類的不可變性2、用String的時候需要注意什麼3、String與StringBuilder的區別4、StringBuilder和StringBuffer的區別String類的不可變性: 這個不可變性需要看源碼,String類中有幾個成員變數: private final char[] value;
Time of Update: 2016-01-06
2.2.1 建立一個 Path,2.2.1建立pathDemo:import java.nio.file.Path;import java.nio.file.Paths;/** * @author jinxing * @系統 MAC OS X * @用例1 [使用]絕對路徑 * @用例2 [使用]相對路徑 * @用例3 相對路徑[轉換成]絕對路徑 * @結論1 [使用]相對路徑,相對的是[..當前檔案所屬專案檔/下檔案]; * @結論2 最後不論加否[/反斜線]結果都一樣;(不如不加)
Time of Update: 2016-01-07
JavaScript基本概念(四)---操作符,javascript操作符操作符1.一元操作符 只能操作一個值的操作符叫做一元操作符,一元操作符有遞增(遞減)操作符以及一元加(減)操作符。 遞增遞減操作符分為前置遞增(遞減)操作符和後置遞增(遞減)操作符,不管是前置還是後置的遞增(遞減)操作符,其使用方式與java中的遞增遞減操作符一樣,有區別的地方就是javascript中的遞增遞減操作符可以對非數字類型的值進行操作,看下面的例子: a.對包含有效數字字元的字串執行遞增遞減操作時
Time of Update: 2016-01-06
2.2.2 從 Path 中擷取資訊,2.2.2pathDemo:import java.nio.file.Path;import java.nio.file.Paths;public class PathInfoTest { public static void main(String[] args) { // 建立絕對路徑(位置) Path listing =
Time of Update: 2016-01-05
JavaScript基本概念(二)--- 變數,javascript基本概念變數1、 變數定義Javascript中使用var來定義變數,具體格式如下所示:var name = 1;如果只聲明了變數而沒有對變數進行初始化,那麼此時變數的值就是undefined;(為什麼是undefined請看變數第三節)當然,也可以一次定義多個變數,如下所示:var a1 = 1, a2 = true, a3 =
Time of Update: 2016-01-05
1.3.6 簡化變參方法調用,1.3.6簡化調用...說實話,我沒太懂……import java.util.Collection;import java.util.HashMap;public class CoinChangeParams { @SuppressWarnings("unused") public static void main(String[] args) { /* *
Time of Update: 2016-01-04
使用MyBatis+Spring+CXF+ExtJS進行公司專屬應用程式開發的開發心得(一),mybatiscxf1.在使用ExtJS在Server端進行網頁開發時,常常會出現關鍵字對應錯誤的問題。例如app\store\xxx\XXX.js中的totalProperty:'XXX',XXX對應的是Action中resultMap.put("aaa",bbb)的aaa。這個是固定的頁面統計條數的方法。root:'XXX',XXX對應的是具體的資料傳參。也需要在Action中有相同名的result
Time of Update: 2016-01-02
JDBC(資料庫的串連和使用),jdbc資料庫一、JDBC的簡介快速入門 準備工作:二、編碼階段:資料庫連接流程詳解開發中一般使用反射的方式來註冊驅動。好處有兩點,一:驅動只註冊一次,提高了效率。二:可以將驅動的全包名提取成設定檔 解耦合 方便後期維護串連資料庫格式:Connection conn = DriverManager.getConnection(url,name,password);url:資料庫的地址
Time of Update: 2016-01-02
Java項目打包部署war檔案,java項目部署war1.選中要打包的項目,按右鍵,選擇“Export-->WAR File”,在彈出的對話方塊中選擇Destination、Server runtime等選項,點擊Finish;2.可以看到指定目錄下已經產生了一個war檔案,將該檔案複製到Tomcat安裝目錄下的webapps檔案夾下面;3.重新啟動Tomcat伺服器,在瀏覽器中訪問,可見部署成功。
Time of Update: 2016-01-02
LeetCode,leetcodeoj題目:Given a string S and a string T, find the minimum window in S which will contain all the characters in T in complexity O(n). For example,S = "ADOBECODEBANC"T = "ABC"Minimum window is "BANC".Note:If there is no such window in S
Time of Update: 2016-01-02
LeetCode,leetcodeoj題目:Given a set of distinct integers, nums, return all possible subsets.Note:Elements in a subset must be in non-descending order.The solution set must not contain duplicate subsets.For example,If nums = [1,2,3], a solution is:[ [3