java
Enumã§æ½è±¡ã¡ã½ãããå®ç¾©ãã¦ããããå®æ°ãã¨ã«Overrideã§ããã£ã¦ãã¨ããä»æ¥Effective Javaèªãã§ã¯ããã¦ç¥ãã¾ããã å®æ°åºæã¡ã½ããå®è£ ã¨ãããããããã£ããããå ·ä½çã«ã¯ãããªæ¸ãæ¹ãã§ããã package jp.ne.hatena.syoko_sasaki; public eâ¦
wicketã§ã¤ãã£ããã¼ã¸ãããã¦ã³ãã¼ãããcsvãã¡ã¤ã«ã®ä¸èº«ãæ³å®éããã©ãã確ããããã¹ãï¼ï¼ï¼mainã®ããã±ã¼ã¸ã«ç½®ããshokos.csvããã¦ã³ãã¼ããã¦ãtestã®ããã±ã¼ã¸ã«ç½®ããã¾ã£ããåãå 容ã®expected.csvã¨æ¯è¼ãããã¹ããæ¸ãã¾ãããã¡ã¤â¦
ãä»äºã§ä½ã£ã¦ããwebã¢ããªã±ã¼ã·ã§ã³ã¯Ajaxããã£ããåãå ¥ãã¦ããã®ã§ãããæ®å¿µãªããWicketTesterã§Ajaxã¾ããã®ãã¹ãã¯ã§ããªãã®ã§ããSeleniumãªãã§ããããªã¼ã¨æã£ã¦å®é¨ãã¦ã¿ãã®ã ãã©ããã£ãããã§ããªãã£ã話ãTextFieldã«ãããæ°åâ¦
æ¥åèªååè¨ç»ãã®ï¼ãseleniumç°¡åãªå°å ¥æ¹æ³ããï¼ã¾ãã¯pom.xmlã®è¨å® <dependency> <groupId>org.seleniumhq.selenium.server</groupId> <artifactId>selenium-server</artifactId> <version>1.0.1</version> </dependency> <dependency> <groupId>org.seleniumhq.selenium.client-drivers</groupId> <artifactId>selenium-java-client-driver</artifactid></dependency>
ããã¨é«é »åº¦ã§æ¼«ç»ãè²·ã£ã¦ãããããã§ããçºå£²æ¥å½æ¥ã«æ¬å±ããã§è²·ããªãã¨æ°ãæ¸ã¾ãªãæ§æ ¼ãªã®ã§ãã³ããã¯ããã·ã¥ï¼ - 漫ç»(ãã³ã¬)ãã³ããã¯ã®èµæ¸ç®¡çã¨æ°åçºå£²æ¥ã®ãã§ãã¯ããµãã¼ãããç·åãµã¤ã | ã³ããã¯ããã·ã¥ï¼ã§ç®¡çãã¦ãã漫ç»ã®â¦
åºæ¬çã«ãã¼ã«ã«ã§webä½æ¥ããã¨ãã¯eclipseã§jettyèµ·åãã¦ãã¾ããããTomcatã使ãæ©ä¼ãåºã¦ãã¾ãããwarä½ã£ã¦webappsã®ä¸ã«ããã¦Tomcatèµ·åãããã©ããããã¦ãã¦ãã¼ã«ãªã£ã¦ãTwitterã§eclipseããèµ·åã§ããªãã®ã¼ï¼ï¼ã£ã¦èããããããããªãâ¦
æè¿ãããã°ã©ãã³ã°æ¸ã以å¤ã®ãä»äºãå¢ãã¦ãã¾ãããï¼è¨¼è·¡æ®ãããï¼ ããã©ãããããªã®ã§è²ã èªååãã¦ãããããªã¼ã¨æããã¡ããã¡ããã¹ã¯ãªããæ¸ãã¦ãã¾ãããã使ããããªãã®ç¬¬ä¸å¼¾ãHTMLã®ã¿ã°ãé¤å»ããã package jp.ne.hatena.syoko_saâ¦
Wicketã¯ãããªã«ãããããã¹ããæ¸ããã¨ãã§ãããã ãï¼ å¸¸ã ããWicketã®ãã¹ãã®å å®ãï¼Ajaxã¾ããé¤ãï¼ã«å©ãããã¦ããã®ã§ãã©ããªãã¨ãã§ããã®ãä¸é¨ãç´¹ä»ãã¾ãã package jp.ne.hatena.syoko_sasaki; import java.awt.Label; import junit.â¦
Wicketã§ã¹ãã¼ã¿ã¹ã³ã¼ããæå®ãã¦ã¬ã¹ãã³ã¹ããæ¹æ³ããè¶ ãã£ããï¼WebPageãextendsããclassã§configureResponseãä¸è¨ã®ããã«Overrideããã @Override protected void configureResponse() { super.configureResponse(); if (getWebRequestCycle()â¦
å®æããã®ã§è¼ãã¾ãã¼ãBIASED-RANDOMã«ï¼ååãåãããããã¨ãã1,0ãè¿ã£ã¦ãã確ç=0,1ãè¿ã£ã¦ãã確çã¨ãªãã®ã§ããããå©ç¨ãã¾ããã1,1ã¨0,0ã ã£ããããç´ãããä»æ§ã§ãã public static int get0or1(double p) { if (p <= 0 || p >= 1) throâ¦
ãã¡ãã®æ¬ãåå¼·ãã¯ããã¾ããï¼amazon:ã¢ã«ã´ãªãºã ã¤ã³ãããã¯ã·ã§ã³ç¬¬ï¼ç« ã®ç·´ç¿åé¡ã解ãã¦ã¿ã¾ããããåé¡ã RANDOM(0,1)ã«å¯¾ããå¼ã³åºãã ããç¨ãã¦ãæç¶ãRANDOM(a,b)ãå®ç¾ããã â»RANDOM(a, b)ã¨ã¯ãaãbã®æ´æ°ã®ãã¨ã package jp.ne.hateâ¦
ååãç´¹ä»ãããã¢ã«ã´ãªãºã ã¤ã³ãããã¯ã·ã§ã³ã«ã®ã£ã¦ããã第ï¼ç« ã®ç·´ç¿åé¡5.1-3ã«ææ¦ã æ¯åãã¾ãèªåã§èãã¦ã®ãã¢ãããã¦ããã³ãããã£ããæãã¦ããã£ãããã¦è§£ãã¦ãã¾ãã ããã°ããããï¼ ããã¦æãã¦ãããåªãããå ããã«æè¬ï¼å®â¦
ãã¡ã®ããã¸ã§ã¯ãã¯ãORãããã³ã°ãã¼ã«ã¯cayenneã使ã£ã¦ãã¾ãã ä»æ¥ã¡ããã£ã¨ããã£ãã¨ããããã£ãã®ã§ã¡ã¢ãã»ããããã㨠Aãã¼ãã«ã®hogeã«ã©ã ã"foo"ã®ãã®ãåãåããããã Bãã¼ãã«ã®hogeã«ã©ã ã§ã½ã¼ããããï¼ASCã§ï¼ãªã«ãèããã«â¦
ãããã®ãããã¼ã ã¯ï¼ï¼æéåãªã®ã§ãããéã¾ãããã¾ãããããã¾ããã ï¼ï¼æåãããã«ãåºç¤¾ãã¦ããªãå 輩ã«ãâ¯â¯ããèµ·ãã¦ãã¾ããï¼ãã¨ã¡ã¼ã«ã â è¿ä¿¡ãæ¥ããIRCã«ãâ¯â¯ããä»èµ·ããããã§ãï¼ãã¨æ¸ãããã ã¨ãã£ãæ¥åããã¼ãã ãããæ¯â¦
ãããã¯ä¹ ãã¶ãã«javaã®æ¥è¨ï¼ï¼ï¼ï¼ï¼ï¼ï¼ï¼ï¼ï¼ï¼ï¼ï¼ï¼ï¼CSVåºåã®æ¹æ³ãæ¸ãã¾ããsupercsvã使ãã¾ãã SuperCSV API ã¾ãã¯supercsvããã¦ã³ãã¼ãããã¤ãã®ããã«ããã¸ã§ã¯ãã®pom.xmlã«ä»¥ä¸ã追å ãã¦ãmvn eclipse:eclipse <dependency> <groupId>net.sourceforge.su</groupid></dependency>â¦
ãµã¶ã¨ããã¨ã¿ã¡ã«ãªãã¾ãã調åããã¦ãã@shokos ãèªçæ¥ããã§ã¨ãã ã£ã¦@ãé£ãã§ããã ã@hoge ãããã¨ãã ã£ã¦è¿ãããã°ã©ãã³ã°ãæ¸ããã¤ããã§å®è¡ããã¨ãããç大ã«å¤±æãã¦éå»ã®@ã«å¯¾ãã¦ç¡æ¡ä»¶ã«ãããã¨ãã£ã¦è¿ãã¦ãã¾ãã¾ããããâ¦
ãã¼ã¸ãããããããããã®ã§æ¹æ³ã¡ã¢ 失æããã¨ãã®å½±é¿ç¯å²ãèããã¨ï½ï½ï½ï½ãã¾ãã ãã©ã³ã¯ã§æ´æ°ããä½æ¥ããã©ã³ãã«ãã¼ã¸ããæ¹æ³ï¼ãã©ã³ãã«ã¹ã¤ãããã ï¼ãã©ã³ã¯ã®ä½æ¥å 容ããã¼ã¸ããï¼ã³ããããã°ã確èªããªããï¼ãã¼ã¸ããã¨ãã«äºâ¦
Formã®ãã¿ã³ã«setDefaultFormProcessing(false)ãã¤ããã¨ãããªãã¼ã·ã§ã³ãç¡å¹ã«ãªããããï¼Formã«submitãã¿ã³ã®ä»ã«ãªã³ã¯ãããªãã¦ãã¿ã³ãå¿ è¦ãªã¨ãã«ä½¿ãããªã¨æãã¾ããã ããªãã¼ã·ã§ã³ã¯ç¡å¹ã«ãªãããã©ãã¢ãã«ã«å¤ã¯ã¡ããã¨ã»ãããã¦â¦
ããã©ã«ãã³ã³ã¹ãã©ã¯ã¿ã«ã¤ãã¦ç¥ã£ãã®ã§ã¡ã¢classãã³ã³ã¹ãã©ã¯ã¿ãªãã§å®£è¨ããã¨ãå¼æ°ãªãã®ããã©ã«ãã³ã³ã¹ãã©ã¯ã¿ãåæã«ã§ãããã³ã³ã¹ãã©ã¯ã¿ã宣è¨ããã¨ããã©ã«ãã³ã³ã¹ãã©ã¯ã¿ã¯ãªããªã£ã¦ãã¾ãã public class ConstructorTest { puâ¦
ãã¹ãåã¨IPã®åå¾ã®ä»æ¹ String hostName = InetAddress.getLocalHost().getHostName(); String ip = InetAddress.getLocalHost().getHostAddress();
ãã®ãæ¸ããequalsã®å®è£ ã ã¨ãä¸è¨ã®å®è¡çµæãfalseã«ãªã£ã¦ãã¾ãã¾ãã Bean b1 = new Bean(1L, "a"); Bean b2 = new Bean(2L, new String("a")); System.out.println(b1.equals(b2)); ãªã®ã§ãªãã¡ã¯ã¿ãªã³ã° @Override public boolean equals(Object â¦
ãã¨ãã°idã¨nameããã¤ãããªã¯ã©ã¹ããã£ãã¨ã㦠class Bean { private Long id; private String name; public Bean(Long id, String name) { this.id = id; this.name = name; } public Long getId() { return id; } public String getName() { return nâ¦
ã¨ãã転è·ãµã¤ãã«ã®ã£ã¦ããåé¡ãã¨ãã¦ã¿ã¾ãã247ãªã©ã®æ´æ°ã渡ãã¨2+4+7ããã¦ããã¨ããåé¡ã§ã public static int plus(int num) { int result = 0; for (int i = num ; i ! = 0 ; i = i / 10) { result += i % 10; } return result; } ãªã«ã調ã¹â¦