2014-09-01ãã1ã¶æéã®è¨äºä¸è¦§
åãã« http://blogs.yahoo.co.jp/dk521123/34052743.html ã®ãµã³ãã«ã使ã£ã¦ãèªåçã«Webã¢ããªã®ãã¹ããè¡ã ããã㨠[1] ãã«ã [2] warãã¡ã¤ã«ä½æ [3] ããã㤠[4] Tomcatèµ·å [5] åä½è©¦é¨ [6] Tomcatåæ¢ ãµã³ãã« http://blogs.yahoo.co.jp/dkâ¦
äºåæºå è¨å®æé [1] 以ä¸ã®ãµã¤ããããã¦ã³ãã¼ãããï¼ä»åã¯ãhttpunit-1.7.zipãï¼ http://httpunit.sourceforge.net/ [2] ãã¦ã³ãã¼ããããã¡ã¤ã«ã解åãã以ä¸ã®ãã¡ã¤ã«ãEclipseã«ã¤ã³ãã¼ããã * httpunit.jar * js-1.6R5.jar * jtidy-4aug2â¦
Observerãã¿ã¼ã³ã«ã¤ã㦠* Javaã«ã¯ã以ä¸ã®ã¯ã©ã¹ãäºåã«ç¨æããã¦ãã 1) java.util.Observableã¯ã©ã¹ 2) java.util.Observerã¤ã³ã¿ã¼ãã§ã¼ã¹ ⻠使ç¨ããå ´åã¯ãjava.util.Observableã¯ã©ã¹ãç¶æ¿ããå¿ è¦ãããã ãã®ããã観å¯å¯¾è±¡ã®ã¯ã©ã¹ããæ¢â¦
â Apache Turbine * èªã¿æ¹ã¯ãã¢ãããã»ã¿ã¼ãã³ã * Webã¢ããªã±ã¼ã·ã§ã³ãæ§ç¯ããããã®ãµã¼ãã¬ããã«ãããã¬ã¼ã ã¯ã¼ã¯ * Strutsã¨æ¯è¼ããå¤æ©è½ã ãè¤é * æ å ±ãå°ãªãï¼è±èªãµã¤ãã§ããï¼ â ãã¦ã³ãã¼ãå * ãªã³ã¯ãApache Mirror Systemããâ¦
â condition APIä»æ§ http://www.jajakarta.org/ant/ant-1.6.1/docs/ja/manual/CoreTasks/conditions.html ãµã³ãã«1-1 <project basedir="." default="sample" name="SampleJavaCodes"> <property name="value" value="hello" /> <target name="sample"> </target></property></project>
â ã¯ããã« ããã°ã©ã ã®æåãªæ ¼è¨ãçºãã ç®æ¬¡ ãï¼ãç¥èª ï¼ï¼KISS (Keep it simple, stupid) ï¼ï¼DRY (Don't Repeat Yourself) ï¼ï¼YAGNI (ã¤ã°ããYou Aren't Gonna to Need It.) ï¼ï¼TSTTCPW (The Simplest Thing That Could Possibly Work) ãï¼ãUNâ¦
â Javaã³ã³ãã¤ã« http://blogs.yahoo.co.jp/dk521123/33973954.html ã§ãã£ã¦ãã復ç¿ã¨ãã¦ã ãµã³ãã« <project basedir="." default="compile" name="SampleJavaCodes"> <property name="class.path" value="./class" /> <property name="java.path" value="./src" /> </property></property></project>
â ã¯ããã« ãã³ã¡ã³ããæ¸ãæ´¾ãã¨ãã³ã¡ã³ããæ¸ããªãæ´¾ããããã å人çã«ã¯ãã³ã¡ã³ãã¯æ¸ããæ¹ãããã¨æããããã³ã¡ã³ããæ¸ããªãæ¹ãããæ´¾ããè¨ãå㯠以ä¸ã®ãããªæè¦ãèããã ãã³ã¡ã³ããæ¸ããªãæ¹ãããæ´¾ãã®æè¦ [1] å¯èªæ§ã®ãããâ¦
â ã¯ããã« http://blogs.yahoo.co.jp/dk521123/13687446.html ã«ãã String.format() ã¯ãç©åãæ´»ç¨ã§ããã¡ã½ããã§ããã 以ä¸ã®ãããªåé¡ç¹ãããããã®ä»£ããã«ãªãã®ã MessageFormat ã§ãã String.format() ã®åé¡ç¹ * ã%ãåä½ã§ä½¿ããªã â ã%â¦
â List * ãã«ãã¹ã¬ããã«å¯¾å¿ããã®ã«é©ããæ¹æ³ãèãã [1] Collections.synchronizedList()ãå©ç¨ãã List<String> list = Collections.synchronizedList(new ArrayList<String>()); åèæç® http://www.symmetric.co.jp/blog/archives/29 http://karetta.jp/book-nod</string></string>â¦
ãµã³ãã«ï¼ : JUnitãã¹ãåä½ãå®è¡ãã build.xml <project basedir="." default="CalcTest" name="SampleJavaCodes"> <property name="ECLIPSE_HOME" value="../../eclipse/"/> <property name="junit.output.dir" value="junit"/> </property></property></project>
â ant * å¥ãã¡ã¤ã«ã«è¨è¿°ããã¿ã¹ã¯ãå¼ã³åºããã¨ãã§ãã âãµã³ãã«ã®ã<ant inheritAll="false" antfile="build_tomcat.xml" target="stop_tomcat" />ãé¨åã ä»æ§ http://www.jajakarta.org/ant/ant-1.6.1/docs/ja/manual/CoreTasks/ant.html ãµã³ãã« http://blogs.yahoo.co.jp/dk521123/34057119.html ããæç²(ä¸é¨ãä¿®æ£) buil</ant>â¦
â delete / copy / mkdir / fileset * delete : ãã¡ã¤ã«ã»ãã£ã¬ã¯ããªã®åé¤ * copy : ãã¡ã¤ã«ã»ãã£ã¬ã¯ããªã®ã³ãã¼ * mkdir : ãã£ã¬ã¯ããªã®ä½æ * fileset :ãã¡ã¤ã«ã®éåãå®ç¾© ãµã³ãã« ä¾ï¼ * mkdir / delete build.xml classãã£ã¬ã¯ããªã®åé¤â¦
åãã« <property name="key1" value="Hello world" /> ã§ãå¤ãè¨å®ã§ããããbuild.xml å ã«ããã®ã§ã å¯å¤ã«ãªãé¨åã¯å¤åºããã¨ããæ¹ã便å©ãã¨æãã ã§ãããããã£ã»ãã¡ã¤ã«(.properties)ããå¤ãåå¾ã§ããã®ã§ ç°¡åãªãµã³ãã«ãä½æãã¨ãã [1] ããããã£ã»ãã¡ã¤ã«(.properties)ããå¤ã</property>â¦
â ã¯ããã« * éçºç°å¢è¨å®ããã¹ããã¼ã¿ä½æã®éã« ãã¡ãã¡ä½ã£ããããã®ãé¢åãªã®ã§ã ãã¡ã¤ã«ã«ãã¦æ®ãã¦ããã°ãèªåã ããããªã å¥ã®éçºã¡ã³ãã¼ã«ãå½¹ç«ã¤ã®ã§ ãã¡ã¤ã«ããSQLæãä¸æ¬ã§å®è¡ããæ¹æ³ã調ã¹ã¦ã¿ãã è£è¶³ï¼pdql ã³ãã³ã 以ä¸â¦
ç¾è±¡è©³ç´° * Java ã§ä»¥ä¸ã®ãµã³ãã«ã®ãããªãSystem.getProperty("javax.net.ssl.xxxxxx")ãã§ã null ãè¿ã£ã¦ãã ãµã³ãã« String keyStore = System.getProperty("javax.net.ssl.keyStore"); String keyStorePassword = System.getProperty("javax.net.sâ¦
ãµã³ãã« [1] Javaã³ã³ãã¤ã« / Javaã®å®è¡(javac/java) com.ant.sample.AntSample.java package com.ant.sample; public class AntSample { public static void main(String[] args) { for (String arg : args) { System.out.println("Hello world, " + argâ¦
â Version `Version`ã³ã¼ããã¼ã åè 06squeezeãã¹ã¯ã¤ãºãï¼æå³ã¯ãçµããï¼ 07wheezyãã¯ã£ã¼ãºã£ãï¼æå³ã¯ãï¼å¼å¸ãï¼ãããããããï¼ 08jessieãã¸ã§ã·ã¼ã(2015/04/25ãªãªã¼ã¹) 09stretchéçºä¸(As of 2015/05/27) 10buster(?)éçºä¸(As of 2015/â¦
Eclipseã«SOAPMonitorãè¨å®ãã æé [1] Eclipse ã® [Window]-[Preferences]-[Run/Debug]-[TCP/IP Monitor]ãé¸æ [2] ãShow the TCP/IP Monitor view then there is activityãã«ãã§ãã¯ãã¤ãã [3] ãAddããã¿ã³ãæ¼ä¸ãã¦ã以ä¸ãåèã«å ¥åãããOâ¦
äºåç¥è â 確èªããã³ãã³ã * ã¾ãã¯ãç°å¢ã« gcc / g++ ãã¤ã³ã¹ãã¼ã«ããã¦ããã確èªãã gcc / g++ ã®ãã¼ã¸ã§ã³ç¢ºèª # ãgccããã¤ã³ã¹ãã¼ã«ãããç¢ºèª gcc -v g++ -v # 以ä¸ã®æ¹æ³ã§ããã gcc --version g++ --version ã¤ã³ã¹ãã¼ã«ããã¦ããgccâ¦
HOSTæ å ± ãåçã«åå¾ããã«ã¯ * HostInfo ã® ãADDR4ãã使ç¨ãã(以ä¸ã®ä»æ§ãåç §) https://ant.apache.org/manual/Tasks/hostinfo.html æ§æ <hostinfo prefix="ãå¤æ°åã" (ä»»æ host="ããã¹ãåã")/> âå¾ã¯ãã${ãå¤æ°åã.ADDR4}ãã§ä½¿ç¨ãã ãµã³ãã« : build.xml ä¾1ï¼hostã«localhostãæå® </hostinfo>
â ã¯ããã« ã¹ãã¢ã ï½ UPDATE or INSERT ãè¡ã ï½ https://dk521123.hatenablog.com/entry/2014/09/01/224134 ã§ãINSERT / UPDATEãè¡ãäºã¯ã§ãããã ãã以å¤ã®ãã¼ã¿ã¯ã´ãã«ãªãã®ã§åé¤ãããã ãï¼ã解決ç * 対象ã®ãã¼ãã«ã«ãæ´æ°æ¥æãã«ãâ¦
UUID ãµã³ãã« PreparedStatement statement = connection.prepareStatement("SELECT * FROM Person WHERE id=?"); statement.setObject(1, java.util.UUID.randomUUID()); åèæç® http://crafted-software.blogspot.jp/2013/03/uuid-values-from-jdbc-to-â¦
â ã¯ããã« ãUPDATEãã¦ã¬ã³ã¼ãããªãã£ãããINSERTããããã¹ãã¢ããä½æãã ãï¼ãæºå ãã¼ãã«ãpersonã -- ããã©ã«ãã«ãããã¼ãã«ã ãã© CREATE TABLE person ( id character(8) NOT NULL, name character varying(100), sex character(1), upâ¦