2008-10-01ãã1ã¶æéã®è¨äºä¸è¦§
ãã¨ã¤ãã®ä¸å ·åã®å¯¾å¿æ¡ã¨ãã¦æãããå¤é¨çµåã使ãæ¡ãã¨ããµãã¯ã¨ãªã使ãæ¡ãã§ã©ã£ã¡ãæ©ãã試ãã¦ã¿ãã ç°å¢/æ¡ä»¶ç DBã¯MySQLã§ã¯ãªãå®éç¨ã§ä½¿ãDB2ã使ç¨ã ãã¼ãã«ã¯ä»¥ä¸ããã¨ã¤ãã®ãµã³ãã«ããã«ã©ã ãå°ãå¢ããã¦ã¾ãã create tableâ¦
ActionScript3ã®ãfor inãã§ã¯ãã¯ã©ã¹ã®ã¡ã½ããããã£ã¼ã«ãã¯åæãããªã
ActionScript3ã®ãfor .. inãã§ã¯ãéçã«å®ç¾©ããã¯ã©ã¹ã®ã¡ã½ãã/ãã£ã¼ã«ãã¯åæããã¾ããã ã¯ã©ã¹ãã£ã¼ã«ããã¤ã³ã¹ã¿ã³ã¹ãã£ã¼ã«ãã¨ãã Dynamicã¯ã©ã¹ãéçã«å®ç¾©ããã¡ã½ããããã£ã¼ã«ãã¯åæããã¾ããã ãã ããåçã«è¿½å ããå±æ§ã¯åâ¦
ã ãã¶åã«Scalaã§æ¸ããæ§è½è¨æ¸¬ã¦ã¼ãã£ãªãã£ãçºæãã¾ãããScalaãªã®ã§Javaã¯ã©ã¹ã®æ§è½è¨æ¸¬ã§ä½¿ãã¾ãã以ä¸ã¯ãµã³ãã«ã // é¢æ°ã5åå®è¡ãã¦ãå¦çæéã®å¹³åã»æ大ã»æå°ãåºåããã print( Perf.perf( "test", 5 ) { Thread.sleep(500); }.toStâ¦
âã¿ãããªãã¼ãã«ããã£ã¦ã create table A ( id BIGINT NOT NULL AUTO_INCREMENT, name VARCHAR(20) NOT NULL DEFAULT '', PRIMARY KEY(id) ); create table B ( id BIGINT NOT NULL AUTO_INCREMENT, a_id BIGINT NOT NULL, name VARCHAR(20) NOT NULL DEâ¦
instanceofã§ã¯ã åãã©ã¡ã¼ã¿ãã¤ãã¦ããªãå(ä¾:List) ä¸éorä¸éã®æå®ã®ãªãã¯ã¤ã«ãã«ã¼ããæå®ãããå(ä¾:List) ã®ãããããæå®ã§ãã¾ãã å ·ä½çãªåããã©ã¡ã¼ã¿ã¨ãã¦æã¤ãã®(extendsãsuperãå«ã)ã¯æå®ã§ãã¾ããã âããã¯ãå®è¡æã«åâ¦
ruby-jsonã§ã¯Objectã®to_jsonã¯ããªãã¸ã§ã¯ããto_sããæååã®JSON表ç¾ããè¿ãã®ã§ã以ä¸ã®ãããªã¢ã¸ã¥ã¼ã«ãæ¸ãã¦ã¿ã¾ãããã¤ã³ã¹ã¿ã³ã¹å¤æ°ãããã·ã¥ã®ããã«åºåãã¾ãã module JsonSupport def to_json instance_variables.inject({}) { |h, nâ¦
VAIO Type Zãå±ããã®ã§ãæ©éãã©ãã¬ãã¥ã¼ãã°ã ç®± ç®±ãéããã¨ãã å³ä¸ã«è¦ããã®ãæ¬ä½ãæè¿ã¯ãªã«ããªã¼CDã¨ãã¤ãã¦ãªãã®ããªã Let's Note R3ã¨ä¸¦ã¹ã¦ã¿ã ä»ä½¿ã£ã¦ããLet's Note R3ã¨ä¸¦ã¹ã¦ã¿ããæ¨ªå¹ ãã ãã¶åºãã ãã¼ãã¼ã Macã£ã½ãæâ¦
ãã¼ã¿ãã¼ã¹ã使ã£ã¦ãéç¨ä¸ã«åçã«å±æ§ãæ¡å¼µã§ãããããªä»çµã¿ãä½ãããå ´åã®è¨è¨ã¡ã¢ã§ãã æ¡å¼µå±æ§ã«å¯¾å¿ããããã¼ãã¨ãå¤ãã®ãã¼ãã«ã追å ã§ç¨æãã¦ã æ¡å¼µå ã®ãã¼ãã«ã¨é¢é£ã¥ãã æãã§å®ç¾ãã¾ãã ãã¼ãã«è¨è¨ kittenãã¼ãã«ã®å±æ§â¦
ãã¶ã¤ã³ã失æãã¦ãã¾ãçç±ããã¶ã¤ã³ãããåã«ååã®ãã¼ã¿åæãããªããã¶ã¤ãã¼ãã¨ãæãããã¦ããã©ããã¡ã®ä¼ç¤¾ã®å ´åãã以åã«ãã¼ã¿åæããã¶ã¤ãã¼ã®ä»äºã«ãªã£ã¦ãªããã ããªããã¶ããããã¸ã§ã¯ãã®æå¾ã®æ¹ã«ã¡ãã£ã¨å¼ã°ãã¦ç»é¢ã«è²â¦
Needleã§ä½¿ããåæå®è¡æå¶ã¤ã³ã¿ã¼ã»ãã¿ãæ¸ãã¾ãããMutex#synchronizedã§åãIDãæã¤ã¤ã³ã¿ã¼ã»ãã¿ãè¨å®ãããã¡ã½ããéã®åæå®è¡ãæå¶ãã¾ãã require 'thread' require 'set' # åæå®è¡æå¶ã¤ã³ã¿ã¼ã»ãã¿ class SynchronizeInterceptor @@pâ¦
rubyæ·»ä»ã®set.rbãçºãã¦ãã¦çºè¦ã ... ã©ã¤ãã©ãªã®ã½ã¼ã¹ if $0 == __FILE__ eval DATA.read, nil, $0, __LINE__+4 end __END__ ... ã©ã¤ãã©ãªã®ãµã³ãã«(ã¨ããããã¹ãã±ã¼ã¹ã ãã©ã) ã¨ãããã¨ã§ãã©ã¤ãã©ãªãrubyã§ç´æ¥å®è¡ãããå ´åã®ã¿__END_â¦
âã®ãããªä¸å¤ãªã¯ã©ã¹ã import java.util.HashSet; import java.util.Set; /** * ååã®éåãä¸å¤ã§ãã */ class NameSet { private final Set<String> set; /** * ã³ã³ã¹ãã©ã¯ã¿ * @param names åå */ NameSet( String... names ) { this.set = new HashSet<String>(</string></string>â¦
mx.collections.ArrayCollectionã使ãã¨é åã®å¤æ´ãã¤ãã³ããªã¹ãã¼ã®ä»çµã¿ã§æ¤ç¥ãããã¨ãã§ãã¾ãã ã³ã³ã¹ãã©ã¯ã¿ã§ã½ã¼ã¹ã¨ãªãé åãæå®ãã¦ArrayCollectionãä½æãã ã¤ãã³ããªã¹ãã¼ãè¨å®ããä¸ã§ã ArrayCollectionã®APIãå¼ã³åºãã¦é åâ¦
3æ¥ã»ã©æ©ãã çµæãVAIO Type Z ã«ãã¾ããã MacBookã®ã¢ã«ãããã£ã¯é åçã ãã© å代iBookãæã£ã¦ããã©ãããªã«ã¼ããã¼ãã¯å·ãä»ãã¨ãã£ãæªããã ããã ã¹ããã¯çã«ã¯ãã¾ãã¡ã±ã£ã¨ããªãããªã¨ã ããã¯FRNCãåæ§ã ã¨ãããVAIO Type Zã®ç»â¦
generic array creationãããåãã©ã¡ã¼ã¿ã§ç¤ºãããåã®é åãä½ãããå ´åãæ®éã«newãã¦ä½ããã¨ã¯ã§ããªãã®ã§ãªãã¬ã¯ã·ã§ã³ã使ã£ã¦ä½ã£ã¦ããã®ã ãã©ã // aã¨bã®é åãä½ãããã X a = null; X b = null; // ããã¯ã¨ã©ã¼ã«ãªãã®ã§ã»ã» // X[] â¦
æ¨è«ã®å ã«ãªãå¼æ°ãè¤æ°ããå ´åãå ±éã®è¦ªã¯ã©ã¹ã使ãããã®ã§ããã±ãããã使ã£ã¦è¤æ°ã®ãªãã¸ã§ã¯ãã®å ±éã®è¦ªã¯ã©ã¹ãå¾ããã¨ãã§ããã®ã§ã¯!ã¨ã²ãããã¦ãã¾ã£ãã // å¼æ°ã®å ±éã®è¦ªã¯ã©ã¹ãè¿ãã static <X> Class test( X... args ) { return ar</x>â¦
ãªãã¾ããã®ãã
ãã¡ã¤ã«ã®ä¸èº«ãä¸è¡ãã¤åãåºãã¨ããæã©ããã§è¦ããµã³ãã«ã«ç¿ã£ã¦âã®ããã«æ¸ãã¦ãããã©ã # ãã¡ã¤ã«ã®ä¸èº«ãä¸è¡ãã¤åãåºã open( "./test.txt" ) {|f| while line = f.gets puts line end } IO#eachã¨ãããã®ãã»ã»ã»ã # ãã¡ã¤ã«ã®ä¸èº«ãä¸â¦
DB2ã§ã¯ãã½ã¼ãæã«NULLå¤ããã£ãå ´åãæ大å¤ãã¨ãã¦æ±ããã¾ãã æé ã§ã¯æå¾ã«ãéé ã§ã¯æåã«ãã¾ãã Integer,Date,Timestampã§å®éã«ç¢ºèªã ãªãã¡ã¬ã³ã¹ã§ã¯ãDB2 9.1 Information Center - å¯é¸æã®ãorder-by-clauseãã¨ããã«è¨è¿°ãããã¾ããâ¦
Sprite#maskã使ã£ã¦ãã¹ãã©ã¤ããåãæã(ã¹ãã©ã¤ãã®ç¹å®ç¯å²ã®ã¿è¡¨ç¤ºãã)ãã¨ãã§ãã¾ããSprite#maskå±æ§å¤ã¨ãã¦ä»»æã®DisplayObjectãè¨å®ããã°OKã package { import mx.utils.*; import flash.display.*; import flash.text.*; import flash.exâ¦
FlexããJavaScripté¢æ°ãå¼ã³åºãå ´åã¨åæ§ãExternalInterfaceã使ãã¾ãã å¼ã³åºãããå´ã®swf : package { import mx.utils.*; import flash.display.*; import flash.text.*; import flash.external.*; // JavaScriptããã®ã¡ã½ããå¼ã³åºããåãä»â¦
åãã©ã¡ã¼ã¿ãåãåãã¡ã½ããã§åãã©ã¡ã¼ã¿ãæ示ããå ´åãã¡ã½ããå¼ã³åºãã®åã«ãããã¤ããã°OKã§ããããã¼ã«ã«ã®ã¡ã½ããã®å¼ã³åºãã§æ示ããå ´åããthis.ãã¨ããå¿ è¦ãããã¾ãã class Sample { // åãã©ã¡ã¼ã¿ãåãåãã¡ã½ãã <X> void te</x>â¦
以ä¸ã®ãããªé¢æ°ã§ã¯ãåãã©ã¡ã¼ã¿Xã®åã¯å¼æ°ã«ãã£ã¦æ¨è«ããã¦æ±ºã¾ãã¾ãã // åãã©ã¡ã¼ã¿ã§æå®ãããXãå¼æ°ã§è¤æ°åãåãé¢æ°ã // 渡ãããå¼æ°ã«ããXã決å®ããã static <X> X test( X a, X b ) { return a; } ããã§ãã±ã£ã¨ã¿ãå¼æ°a,bã®åã¯</x>â¦
ãlsããããªãã¦ãfindãã®çµæãforã§åãã°OKã #!/bin/sh # 第ä¸å¼æ°ã§æå®ãããã£ã¬ã¯ããªé ä¸ã®ããã¹ããã¡ã¤ã«ãä¸è¦§è¡¨ç¤ºããã for file in `find $1 -name "*.txt"`; do echo "$file" done å®è¡çµæã§ãã $ ./file-list.sh ./ ./b.txt ./c.txt .â¦
ã¡ã½ãããã¹ãã¼ããä¾å¤ãåãã©ã¡ã¼ã¿ã§æå®ãããã¨ãã§ããããã¾ãã // åãã©ã¡ã¼ã¿ã§ã¹ãã¼ããä¾å¤ãæå®ã§ããã¯ã©ã¹ class Proc<E extends Exception> { void call() throws E {} } Proc<IOException> a = null; Proc<IllegalArgumentException> b = null; // aã¯IOExceptionãã¹ãã¼ããã®ã§ãã£ããããªãã¨</illegalargumentexception></ioexception></e>â¦
åãã©ã¡ã¼ã¿ã®ãå¢çã¯ã¤ã«ãã«ã¼ããã使ç¨ããã¨ãæ¡ä»¶ãæºããåãã©ã¡ã¼ã¿ãæã¤ãªãã¸ã§ã¯ããä»£å ¥å¯è½ãªå¤æ°ãä½ã£ããã§ãã¾ãããå¢çã¯ã¤ã«ãã«ã¼ããæã¤åãåãã©ã¡ã¼ã¿å ã§ä½¿ãã¨ãã¯ãä»£å ¥äºææ§ã¯å¤±ããã¦ãã¾ãã¾ãã // åãã©ã¡ã¼ã¿æå®â¦
âã®ãããªååã§å¼æ°ã®éãé¢æ°ããã£ã¦ã static void test( Object... rest ) { System.out.println( "test( Object... rest )" ); } static void test( List<Object> list ) { System.out.println( "test( List<Object> list )" ); } ããã®ãtest( List list )ãã®æ¹ãå®</object></object>â¦
ã¡ã¤ã³PCãè²·ãæããããã¨ç»çä¸ã è¦ä»¶ ãã¼ãPCã§ãããã¨ã ããã¤ã®ä¸ã¨ãå¸å£ã®ä¸ã§ä½¿ãããå¿ é ãããããå¯ããªãããã ä½åãªãã®ã§ããªãã¹ãå°ããã¦è»½ãã¤ãã ãããªãã®ã¹ããã¯ããããã¨ã FireFox,Eclipse,FireWorksã並åã§èµ·åãã¦ããâ¦
Timerã使ã£ã¦å®æçã«å¦çãå®è¡ãããµã³ãã«ã§ããTimerã®åºæ¬çãªä½¿ãæ¹ã¯æ¬¡ã®éãã å¼æ°ã§ã次ã®å¼ã³åºãã¾ã§ã®å¾ ã¡æé(ããªç§)ãã¨ãå®è¡åæ°ããæå®ãã¦Timerãä½æãã¾ãã ãå®è¡åæ°ãã0ã«ããã¨ç¡éã«å®è¡ããã¾ãã ãaddEventListenerãã§å®â¦
JavaBeanãMapã«å¤æããã復å ãããããã¦ã¼ãã£ãªãã£ãæ¸ãã¾ãããæ¢ãã°ãã£ã±ããããããªã®ã§ããã ãã©ã 使ãæ¹ é©å½ãªJavaBeanãããã¨ãã¦ã // ãã¹ãç¨ã®JavaBean public static class Kitten { private String name; private int age; publicâ¦