2008-06-01ãã1ã¶æéã®è¨äºä¸è¦§
Mavenã使ã£ã¦Scalaã®ã½ã¼ã¹ã³ã¼ããã³ã³ãã¤ã«ããç°¡åãªãµã³ãã«ã§ããmaven-scala-pluginã使ã£ã¦ããã£ã¨ã³ã³ãã¤ã«ã§ãã¾ãã Scalaã®ã½ã¼ã¹ã³ã¼ãç½®ãå ´ãä½æããã½ã¼ã¹ã³ã¼ããé ç½® pom.xmlã«maven-scalaãã©ã°ã¤ã³ã®åå¾å ã¨ããscalaã§ã³ã³ãã¤ã«â¦
ãªãã¸ã§ã¯ããæå®ã®åã«ãã£ã¹ãããã«ã¯ãAny#asInstanceOfã使ãã¾ããã¾ããæå®ããåã¨äºææ§ããããè©ä¾¡ããã«ã¯Any#isInstanceOfã使ãã¾ãã ã©ã¡ããAnyã®ã¡ã½ããã§ãã åãã©ã¡ã¼ã¿ã¨ãã¦ãå¤æorè©ä¾¡ãããåã渡ãã¾ãã var i = 10 var stâ¦
abstractãªclass or trait ã«ãåæå®ã®ãªãååã ãã®type aliasãæ¸ãã¨ãæ´¾çã¯ã©ã¹ã§ãã®type aliasã®å®ç¾©ãå¼·å¶ãããã¨ãã§ãã¾ãã abstract class Foo( ) { // æ´¾çã¯ã©ã¹ã§æ示ããå¿ è¦ãããtype alias // ãã®ã¯ã©ã¹ã®æ´¾çã¯ã©ã¹ã§ã¯ãXã®type alâ¦
type <åå> = <å> ã§ãåã«å¥åãã¤ãããã¨ãã§ãã¾ãã å¥åãã¤ããåã¯ãå¥åã§ãã©ã¡ã¼ã¿ã®åæå®ãªã©ã«ä½¿ãã¾ãã è¤éãªåãã©ã¡ã¼ã¿ãæã¤åãè¤æ°å使ããããªå ´åã«ä¾¿å©ã // ãArray[Int]ãã®å¥åã¨ãã¦Xãä½ãã type X = Array[Int] // Xåã®â¦
Javaã®Concurrentãã¬ã¼ã ã¯ã¼ã¯ã§éåæä¾å¤ãçºçããæã«ãéåæã¹ã¬ããå ã®ãã¬ã¼ã¹ã«å ãã¦å¼ã³åºãå ã®ã¹ã¿ãã¯ãã¬ã¼ã¹ãè¿ãFutureã®ãã³ã¬ã¼ã¿ãä½ã£ã¦ã¿ã¾ãããä¾ãã°ã次ã®ãããªã³ã¼ããå®è¡ããå ´åã // éåæå¦ç Callable<Void> c = new Calla</void>â¦
javaclassã®ãµã³ãã«ãã®2ãæå®ããJavaBeanã®assertEqualsãããã£ã¨ä½ãã¹ã¯ãªããã§ãã equals()ãå®è£ ããã¦ããªãã¦ãassertEquals(Object, Object)ã§åç´ã«æ¯è¼ã§ããªãJavaBeanã®å ´åããã£ã¼ã«ãã1ã¤ã¥ã¤åãåºãã¦è©ä¾¡ããå¿ è¦ããã£ã¦é¢åã§ãâ¦
åºç¾½ããã° - åæ¨è«ã®S2Containerã©ããã¼ããã以ä¸ã®æé ã§ãæ¨è«ãããåãã©ã¡ã¼ã¿ãããã®Classãå¾ããã¨ãã§ãã¾ãã åãã©ã¡ã¼ã¿ãTããåãåãããã«ãã¦ãåæ¨è«ã«ããå®è¡æã«ãTããç¹å®ãããããã«ãã¾ãã ããã«ãå¯å¤é·å¼æ°ã§ãTãã®é â¦
é åã®å é ããè¤æ°ã®è¦ç´ ãåãåºãã¦è¿ãã åãåºããè¦ç´ ã¯é åããæ¶ãã è¦ã¯ãArray#shiftã®è¤æ°åå¾çãä½ããã!å ´åã«ã¯ããArray#slice!ãã使ãã®ãã¹ãã¼ãããªã class Array # é åã®å é ããæå®ãããæ°ã ãè¦ç´ ãåå¾ãã¦è¿ãã # è¿å´ãâ¦
jarå ã®ã¯ã©ã¹ã®åé層ã表示ããã¹ã¯ãªããã§ãããã¨ãã°aopalliance.jarã対象ã«å®è¡ããã¨ãâã®ãããªããªã¼ã表示ãã¾ãã --- interface org.aopalliance.aop.Advice âinterface org.aopalliance.intercept.Interceptor âinterface org.aopalliance.inâ¦
ãã¼ãç¡äºãåæ ¼ãã¾ãããã¨ãããã¨ã§ãä»æ¥ããæ å ±ã»ãã¥ãªãã£ã¨ã³ã¸ãã¢ã§ã!ããã¨ãããã»ã©ã¹ãã«ãã¤ããã¨ã¯å°åºæãã¾ããããã¾ããSQLã¤ã³ã¸ã§ã¯ã·ã§ã³ã¨ããXSSã¨ãã常èã¨ãã¦ç¥ã£ã¦ããã¹ããã¨ã¯ç¢ºèªã§ãããã¨ããã¨ããããã°ã«åå¼·ãâ¦
ãã¼ã«ã«ã«ããéMaven製ã®jarããªã¢ã¼ããªãã¸ããªã«ãããã¤ããã³ãã³ãã§ããMavenã§ãã«ããã¦ããã°ãmvn deployãã§ãããã¤å¯è½ã§ãããä»ãã¼ã ããªãªã¼ã¹ããjarãªã©ã§Ant製ã®ããã£ããããã¨pom.xmlããªãã®ã§ä½¿ãã¾ããããã¨ãã£ã¦pom.xmlãç¨â¦
MailBoxã¯ãè¤æ°ã¹ã¬ããéã§ã®åæå¶å¾¡ã¨ã¡ãã»ã¼ã¸ã®éåä¿¡ãããã£ã¨ã§ããããã«ããã¦ã¼ãã£ãªãã£ã¯ã©ã¹ã§ãã è¦ã¯ãJavaã«ãããjava.util.concurrent.BlockingQueueã§ããã¡ãã»ã¼ã¸éä»å´ã¯ãããã¯ããªããããªã®ã§ã容éå¶éã®ãªãjava.util.conâ¦
synchronizedã§è¤æ°ã¹ã¬ããã®åæå®è¡å¶å¾¡ãã§ãã¾ãã æ©è½ã¯Javaã®synchronizedã¨åãã§ãæå®ãããå¦çãã1ã¹ã¬ããããã®ã¿å®è¡ãããããã«ãªãã¾ããåæã«è¤æ°ã¹ã¬ããããå®è¡ããããã¨ã¯ããã¾ããã Javaã¨éã£ã¦ããã¹ã¦ã®åç §åã®åºåºã¯ã©ã¹â¦
scala.concurrent.opsã§å®ç¾©ããã¦ããspawnã¡ã½ããã使ã£ã¦ãä»»æã®å¦çãå¥ã¹ã¬ããã§ä¸¦åã«å®è¡ããããã¨ãã§ãã¾ãã å¦çã¯å¼æ°ã§æ¸¡ãã¾ãã å é¨çã«ã¯ãå¦çãå®è¡ããã ãã®å°ç¨ã®ã¹ã¬ããã1ã¤çæãããããã§ããã¹ã¬ããã¯å¦çã®å®è¡å®äºå¾ã«â¦
rubikitchããããããtestrbãã¨ãããã¼ã«ãæãã¦é ããã®ã§(ãããã¨ããããã¾ã!)ãæ©é使ã£ã¦ã¿ã¾ãã åºæ¬ã®ä½¿ãæ¹ ãtestrbãã®åºæ¬ã®ä½¿ãæ¹ã¯æ¬¡ã®éãã å¼æ°ã§ãã¡ã¤ã«ã¾ãã¯ãã©ã«ããæå®ã§ãã ãã¡ã¤ã«ãæå®ããå ´åããã®ãã¡ã¤ã«ã«å«ã¾ãâ¦
以ä¸ã®ãããªãã¹ãã±ã¼ã¹ãfoo-test.rbã,ãhoge-test.rbããããã¨ãã¦ã require 'test/unit' class FooTest < Test::Unit::TestCase def test_A ... end def test_B ... end end ããã両æ¹ã®ãã¹ããå®è¡ãããããªãã¹ãã¹ã¤ã¼ãã¯ã次ã®ããã«æ¸ãã¾â¦
ãã°ããæ´æ°ãã¦ãªãã£ãJavaã¯ã©ã¹è§£ææ©ã§ãããå¯ãã«ãã¹ãã±ã¼ã¹ãªãããæ¸ãã¦ããã®ã§ã!ã¾ã ã¾ã TODOã¯å¤ãã§ãããç¾å¨ã®ãã¼ã¸ã§ã³ãgithubã«ã¢ãããã¼ããã¦ã¿ã¾ãããâhttp://github.com/unageanu/javaclass/tree/masterããã¡ãã£ã¨å½¢ã«ãªã£â¦
WebDAVã§pushã§ããGitãªãã¸ããªãä½ã£ãã®ã§ã¡ã¢ã 以ä¸ã¯ã ãã«ã¼ã«ã«ããGitãªãã¸ããªãhogeããã WebDAVã§pushã§ããGitãªãã¸ããªã¨ãã¦ãhttp://foo.com/git/hoge.gitãã§å ¬éããã! å ´åã®ä½æ¥æé ã§ãã ç°å¢ 使ç¨ããç°å¢ã¯æ¬¡ã®éãã ã¯ã©ã¤â¦
Rubyã®Hashã¯EnumerableãMixinãã¦ãã®ã ãã©ãEnumerable#findã®ãããã¯ã«æ¸¡ãããå¼æ°ã¯1ã¤ãã¨ãªã£ã¦ããããã ãHashãªããã¼ã¨å¤ãæã¤ã®ã«ä½ã§1ã¤?Hash#eachã¯2ã¤ããã!ã¨ãã²ããã«çåã«æã£ã¦ããã®ã ãã©ãä»æ¥è§£æ±ºãã¾ããã { :a=>"aa", :b=>â¦
ä»æ´ã§ãããä¸çã®ããã¢ãã« Scala ã§ææ¦ãã¦ã¿ã¾ããã Scalaã ã¨ã <ã¬ã·ã¼ã> <ã¡ã½ãã> <å¼æ°>ã§ã¡ã½ãããå¼ã³åºãããã§ããã®ã§ãã.ãã¨ãã()ãã¨ããæé¤ã§ãã¦ãã°ããã¨ã«ãªããããã!ã¨æã£ã¦å§ããã®ã ãã©ã0ã«ããã®ã¯ç¡çã§ããã impâ¦
Regexã使ãã®ããããã§ãã 使ãæ¹ã¯APIããã¥ã¡ã³ããè¦ãã°ã ãããããããã¨ã ãªããå¤ãScalaã«ã¯å«ã¾ãã¦ããªãã®ã§æ³¨æãscala-2.7.0ã«ã¯å ¥ã£ã¦ããããscala-2.7.1.finalãè½ã¨ãã¦ããã¨å ¥ã£ã¦ã¾ããã 以ä¸ã¯ç°¡åãªãµã³ãã«ã§ãã // æ£è¦è¡¨ç¾ â¦
Sun Community Source Licensing (SCSL) - Java 2 Platform, Standard Edition (J2SE)ã§JDKã®ã½ã¼ã¹ã³ã¼ããåå¾ã§ãã¾ãã sunããã±ã¼ã¸ã®ã¯ã©ã¹ã®ã½ã¼ã¹ nativeã®ã³ã¼ã JVM JavapãJvmstatã®ã³ã¼ã ãªãããå ¥ã£ã¦ã¾ããä¸è¦ã®ä¾¡å¤ã¯ãããã¨ãã¡ãªã¿ã«â¦
OpenIDã§èªè¨¼ããCGIã®ãµã³ãã«ã§ããtaslamã®æ¥è¨ - èªè¨¼APIãããããRubyã§ä½¿ããåèã«(ã¨ãããã»ã¨ãã©ã³ããã§ãã)ä½æããã¦é ãã¾ããã OpenIDã¨ã¯? @IT - OpenIDã®ä»æ§ã¨æè¡ãåç §ã OpenIDã§ã®èªè¨¼ã®æµã ãµã¼ãã¹ãHogeãã®å©ç¨ãOpenIDã§èªâ¦
ã»ãã·ã§ã³ã使ãCGIã®ç°¡åãªãµã³ãã«ãæ¸ãã¦ã¿ã¾ããã CGI::Sessionã使ã£ã¦ç°¡åã«ä½¿ãã¾ãã ãã¼ã¿ã®æ ¼ç´å ãå½¢å¼ããªãã·ã§ã³ã§ããããå¤æ´ã§ãã¾ãã詳細ã¯CGI::Sessionã®è§£èª¬ãåç §ã 以ä¸ã®ä¾ã§ã¯ãç¹ã«ãªãã·ã§ã³ã¯æå®ããããã©ã«ãã§ä½¿ã£ã¦ã¾â¦
ãã¼ã«ã«ã®JavaVMä¸è¦§ã表示ãããã¼ã«ãä½ã£ã¦ã¿ãã jvmstatã®APIãå¼ã³åºãã¦æ å ±ãåå¾ã表示ãã¾ãã ãªã®ã§ãå®è¡æã«tools.jarãã¯ã©ã¹ãã¹ã«éãå¿ è¦ãããã¾ãã å±æ§ã¯ã¨ããããå ¨é¨è¡¨ç¤ºããããã«ãã¦ã¿ãã import java.net.URISyntaxExceptionâ¦
æ¨æ¥ã®ç¶ãããcloseããã½ã±ãããTIME_WAITç¶æ ã«ãªã£ã¦ãã°ãã使ããªãã件ã§ãããTCPã®ä»æ§çã«ä½¿ããªãããã§ãã TCPã³ãã¯ã·ã§ã³ã®ç ´æ£å¦çã§ã¯ãåæãéå§ããå´ã®ãã¹ãã¯ãèªèº«ã®Closeããã³ç¸æã®Closeãå®äºããå¾ããä¸å®æéæ¥ç¶ãç¶æããªâ¦
Windows XPç°å¢ã§ã次ã®ã³ã¼ããå®è¡ããã¨ã for ( int i = 0 ; i < 20000; i++ ) { System.out.println( i ); Socket s = null; try { s = new Socket("hogehoge.com", 80); } finally { if (s != null) { s.close(); } } } 4000åç®ãããã§ä»¥ä¸ã®ã¨ã©ã¼â¦
ãæé»ãã·ãªã¼ãº3ã¤ããåãã©ã¡ã¼ã¿ã®æå®ã§ [<åãã©ã¡ã¼ã¿å> <% <ã¯ã©ã¹>] ä¾) [X <% String] ã¨ãããã¨ã§ããã«æé»çã«å¤æå¯è½ãªãªã«ãããåãä»ããé¢æ°ãä½æã§ãã¾ãã ä¸ã®ä¾ã ã¨ãXã¯ãStringã«å¤æå¯è½ãªä½ããã«ãªãã¾ãã ãªã®ã§ãå®è¡æâ¦
ä»æ¥ããClick証å¸-ã·ã¹ãã¬FXã°ã©ã³ããªã®ãã¢åå¼ãµã¤ãã«ã¢ã¯ã»ã¹å¯è½ã«ãªãã¾ãã!ã¨ãããã¨ã§ãæ©éClickClientãå©ç¨ãã¦ãã¢ãµã¤ãã«æ¥ç¶ããã¬ã¼ãä¸è¦§ãåå¾ãããµã³ãã«ãæ¸ãã¦ã¿ã¾ãã! ãã¢åå¼ã§ãæ¢åã®FXåå¼Webãµã¼ãã¹ã¨åçã®ãµã¼ãã¹ãâ¦
ãæé»ãã·ãªã¼ãºäºã¤ãããimplicitããã¤ããåå¤æç¨é¢æ°ãå®ç¾©ãããã¨ãæé»ã®åå¤æãè¡ãããããã«ãªãã¾ãã åå¤æã¯ãå¿ è¦ãªã¨ãã«èªåçã«å¤æé¢æ°ãå®è¡ããããã¨ã§è¡ããã¾ãã åå¤æç¨ã®é¢æ°ã¯ãimplicitããã¤ãã¦å®ç¾©ãã¦ããå¿ è¦ãããâ¦