2008-01-01ãã1å¹´éã®è¨äºä¸è¦§
ç»é¢ãã¯ãªãã¯ãããã¨ã«ãã¿ã³ãããããªãããåºããæ¶ãããããããã°ã©ã ãæ¸ãã¦ããã®ã ããã¨ãã Image ã removeChild ãã¦ã表示ãæ¶ããªãã¦å°ã£ããvisible ã false ã«ãããã表示ä½ç½®ããããã¦ã¿ããããã®ã ãã¾ã£ããå¤åããªãããremoâ¦
Safari 㧠Opera ã®ãã㪠navigate ããããã£ãã®ã§æ¸ãã¾ããã(http://d.hatena.ne.jp/mzp/20081121 ã«è§¦çºããã¦) ãããããid:hiru926 ã navigate ã®æ¬¡ã®è¡ãå ã表示ã§ããã°ä½¿ããããã®ã«ãã¨è¨ã£ã¦ããã®ã§é©å½ã«å®è£ ãã¦ã¿ã¾ãããshift ãã¼ãâ¦
ä¹ ãã¶ãã®æ¥è¨ãä»æ¥ã¯é£²ã¿ä¼ã§æãç©ã°ã£ããé£ã¹ã¦ãããããã®ãã¨ã©ã¼ã¡ã³ã¾ã§é£ã¹ãã¨ããæ´æã«ã§ãã®ã§ãè ¹ã®èª¿åã大å¤ãããªãã®ã§ãããä»æ¥ã®æ¼éã«é©å½ã«æ¸ãã prolog å¦çç³»ã£ã½ããã®ãã¯ã£ã¦ããã ç¾ç¶ã§ã¯ãã¼ãµã¨ãã¯ã¾ã£ãããªãã®ã§ãâ¦
iui ã使ã£ã¦ãiPod ãã del.icio.us ã®ããã¯ãã¼ã¯ã«ç°¡åã«ã¢ã¯ã»ã¹ã§ããããã¯ãã¼ã¯ã¬ãããä½ãããããã§ã del.icio.us ãè¿ã json ã¯ãæ大ã§ãææ°ã®ããã¯ãã¼ã¯100åã¾ã§ã¨ããå¶éãããã®ã§ãããã¯ãã¼ã¯ã®ä¸è¦§ãåå¾ã§ããªã*1ã ããã¯ãâ¦
Flex ã§æååãæãè¿ãããããã£ã¯ wordWrapãããã true ã«ãã¦ããã¨æååãé·éããå ´åã«æãè¿ãã¦ãããã DataGrid ã®ä¸ã® DataGridColumn ã§ä½¿ãå ´åã¯æ³¨æãå¿ è¦ã§ãããæåã®1è¡ç®ã®è¦ç´ ãæãè¿ããªãã¨ããã以éã®è¡ã§æååãé·ããªã£ã¦â¦
VMware Fusion ã®ãã¼ã¸ã§ã³ã 2 ã«ããã WindowsXP ã®èµ·åããããé ããªã£ã¦æ³£ãããã ã£ãã®ã ãã©ããããã¯ã©ããã 3D ã®é«éåæ©è½ã¿ãããªãã¤ãããã©ã«ãã§æå¹ã«ãªã£ã¦ãããããç¡å¹ã«ãããåã®é度ã«æ»ã£ãã®ã§ãã§ãããã§ãããMacBook ã§â¦
大å¦å ã®ãããªãã¯ãªç¡ç·ãããã¯ã¼ã¯ã«ã¤ãªãã«ã¯ãã©ã¦ã¶ãããã¹ã¯ã¼ããå ¥åããå¿ è¦ããããiPod ã® Safari ã ã¨ãã¹ã¯ã¼ããè¨æ¶ãã¦ãããªãã®ã§ããã©ããã®ä¸ãªãããªã®ã§ããã¯ãã¼ã¯ã¬ããã«ããã¨ããä¼ç»ãããã¯æãããã«ã ããããã£ã¦ããâ¦
ãµãããªã使ããããã«ããã©ãã«ã£ã½ãã¯ã©ã¹ãHBox ã¨ãã«é©å½ã« addChild ãããªãã¸ã§ã¯ãã® x ã y ãè¨å®ãããªãã£ãã®ã§ãæåæ°ã¨ãããç¡çç¢çå ´æãè¨ç®ããããã¦ãããæ¸ãã®ã«ç¡é§ã«æéãããã£ã¦ãã¾ã£ãâ¦ããããå¾åã¯ç²ãã¦ãã¾ãèãâ¦
Flex Builder 3 ã§ãããã¸ã§ã¯ãå ã§ãã¡ã¤ã«ãå¥ã®ãã£ã¬ã¯ããªã«ç§»åãããã¨ã internal build error ã¨è¨ããã¦ã©ããããããªããªã(ãã¨ããã)ãé»ã£ã¦å ã®ä½ç½®ã«ãã¡ã¤ã«ãæ»ãã°ã¨ã©ã¼ã¯æ¶ãããå°ãã
"upTo(1,5) => List(1,2,3,4,5)"ã¿ãããªé¢æ° upTo ãå®ç¾©ãããã¨ãã¦æããããInt 㨠BigInt ã§ä½¿ããããã«ãããã£ããã ãã©ã ãã㯠OKã object UpTo { def upToInt(x:Int,y:Int):List[Int] = { def up(n:Int):List[Int] = if (y==n) List(n) else â¦
ååã®ãã¤ã¯ã¹ã¿ãã¯ãªã¼ãã¼ããã¼ããã®ã§ scala ã§é©å½ã«æ¸ãç´ããã²ã©ãã³ã¼ãã ãªãã ä»åã®ã§"(1 to 5)"ã¨ãæ¸ãããã¨ãç¥ã£ãã object Problem41 { val digit : Int = 9 val end : Int = List.range(digit,1-1,-1).foldLeft(0)((x,y) => x*10+y)â¦
pandigital ã®ä¸ã§æ大ã®ç´ æ°ãæ±ããã1æ¡ãã9æ¡ã¾ã§ã® pandigital ã¯40ä¸åãããããã®ã¾ã¾ã ã¨ã¹ã¿ãã¯ãªã¼ãã¼ããã¼ããã import Data.List pandigitals 0 _ = return 0 pandigitals n xs = do x <- xs xs' <- pandigitals (n-1) (filter (/=x) xs) â¦
æ®å¿µãªããæ»ã¬ã»ã©æ±ããã ãã©â¦ã object Problem38 { def isPandigital(x:String):Boolean = { for (c <- x) if (c=='0') return false var a=0 var b=0 while (a<8) { b = a+1 while (b<9) { if (x(a)==x(b)) return false b += 1 } a += 1 } return truâ¦
(macports ã®å ´å) ffmpeg ã faac ã®ããªã¢ã³ãä»ãã§ã³ã³ãã¤ã«ããå¿ è¦ãããã $ ffmpeg -i source.flv -f mp4 -vcodec mpeg4 -b 250k -s 320x240 -acodec libfaac -ar 22050 -ab 64k target.m4v
Haskell ãã C è¨èªã§æ¸ããé¢æ°ãå¼ã¶ã«ã¯ãhttp://haskell.g.hatena.ne.jp/jmk/20060622/1150947486ãè¦ãã°å®ç§ã ããã¨ããããããã ãã§ããããã¨ããæå°ãµã³ãã«çãªæå³ã§ã¡ã¢ã factorial.hs {-# LANGUAGE ForeignFunctionInterface #-} import â¦
JavaScript ãã ActionScript ããActionScript ãã JavaScript ãå¯è½ã ããã¨ãããã JavaScript ãã ActionScript ã®é¢æ°ãå¼ã³åºãæ¹æ³ãã¡ã¢ã ã¾ã㯠ActionScript å´ã§ãJavaScript ããå¼ã³åºããããã«ãããé¢æ°ãç»é²ããã以ä¸ã®ããã« addCâ¦
ãã¦ã¹ãã¤ã¼ã«ãåãã¦ãã¤ãã³ããçºçããªãã®ãåé¡ãªãã ã¨æã£ã¦ããã®ã ããã©ãããèªå㧠MOUSE_WHEEL ã¤ãã³ããçºçããã¦ããã¾ãåä½ããªãã£ã½ããåã§ãããã¡ããã¨åä½ãã¾ããã <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute" initialize="init();"> <mx:Label id="counter" text="0" /> <mx:Script> </mx:script></mx:label></mx:application>
èªåèªèº«ã«å¯¾ã㦠click ã¤ãã³ããçºçãããã«ã¯ä»¥ä¸ã®ããã«ããã this.dispatchEvent(new MouseEvent(MouseEvent.CLICK));
以åã« id:suer ããã«è¦ãã¦ããã£ã¦æ°ã«ãªã£ã¦ãããã®ãã¡ã¢ã¡ã¢ã éãã¿ã°ã®ãªãé¨åã®ãã以ä¸ã®ãã㪠HTML ã <p>test string1 <p>test string2<statement>test string1</statement> <statement>test string2</statement>次ã¿ãã㪠XML ã«ãæ軽ã«å¤æãããï¼ã¿ãããªå ´åã«ãã ã£ã¦ sed ã¨ã使ãæ¹ãã</p></p>â¦
ã¯ã¦ãªãã¤ã¢ãªã¼ã£ã¦æ®éã« HTML ã®ã¿ã°ã使ããã®ãï¼ Google ã¸ã®ãªã³ã¯ãèªåã§ä½ãããã â¦ããã常èï¼
mxml ã£ã¦ãåã«ã¯ã©ã¹å®ç¾©ã®å¥ã®ãããããªã®ãã¨æã£ã¦ããã ãã©ãéããã ãã¼ãã <mx:Canvas xmlns:mx="http://www.adobe.com/2006/mxml"> <mx:VBox textAlign="center" id="hello"> <mx:Label id="statement" click="test(null);"> </mx:Label> </mx:VBox> <mx:Script> </mx:script></mx:canvas>
Scala ã® id é¢æ°(ã¨ããã polymorphic ãªé¢æ°)ã¯ä»¥ä¸ã®ããã«æ¸ããJava ã£ã½ãã scala> def id[T](x:T) : T = x id: [T](T)T scala> id:yoshihiro503 ããã«ãid(id) ãã§ãããã©ãããã£ã¦ã¿ã¨è¨ããã¦ãã®ã§ã scala> id(id) <console>:6: error: missing argu</console>â¦
næ¡ã®æ°ã¨9!*nãæ¯ã¹ã¦ã9!*nã追ãã¤ããªããªãnãã¾ãè¦ã¤ãããããã¨nã¯7ã ã¨ãããã®ã§ã7æ¡ã¾ã§æ¢ãã°ååã /* 9!*1 = 362880 9!*2 = 725760 ... 9!*7 = 2540160 (7keta) 9!*8 = 2903040 (7keta) */ object Problem34 { def fact(n:int) : int = if (nâ¦
ããã¼ããªã¹ãã®è¦ç´ ãããæ¡ä»¶ã§2ã¤ã«ãããããã©çµ¶å¯¾ããã©ã¤ãã©ãªã«ãããã¼ååãªãã ããã¼ã¨ããã¨ãã®ããã«åãã¦ã Opera ã®æ¤ç´¢ã¨ã³ã¸ã³ã«ä»¥ä¸ãå ãããããã http://www.haskell.org/hoogle/?hoogle=%s ã¤ã¾ãããã ï¼ ããã£ããã¢ãï¼ ç â¦
Scala ã§ã®ãã¹ãã«ã¯ãSUnit 㨠ScalaCheck ã¨ãããã®ããããSUnit ã¯æ®éã®ã¦ããããã¹ãã§ãScalaCheck 㯠Haskell ã® QuickCheck ã¿ãããªãã®ã§ãããä»æ¥ã¯ ScalaCheck ã使ã£ã¦ã¿ããã¨ãããã ãã©ããã¾ããããªãã£ãã ã¾ã ScalaCheck ãã¤ã³â¦
æè¿ãã¹ããã¡ã¼ã¹ãçãªãã®ã試ãã¦ããã®ã§ãHaskell ã® HUnit ã使ã£ã¦ã¡ãã£ã¨éãã§ã¿ããã¨ããããå®æ½ãããã¹ããé¸ã¶ã®ãããã©ããå ·ä½çã«ã¯ãããªæãã(HUnit 1.0 User's Guide) test1 = TestCase (assertEqual "for (foo 3)," (1,2) (foo 3â¦
Ruby 㧠Test First ãªããã°ã©ãã³ã°ãä½é¨ããã¹ãã ruby-growl ã使ã£ã¦éãã§ã¿ããä½ã£ãã®ã¯ todo ãªã¹ãã®ä¸ããã²ã¨ã¤ãã©ã³ãã ã«é¸ãã§ãããã¢ãããããã¨ããæ°è¡ã§ã§ããè¶ ç°¡åãªãã®ã ãã§ãã¾ãæåã«ãã¹ããæ¸ããã¨ãããã ãã©ãããâ¦
import Data.List main = print $ length $ nub [a^b | a <- [2..100], b <- [2..100]]
5ä¹ã®åã®å ´åã«ã¯ãnæ¡ã®æ°å¤ãèãã㨠9^5*n ã¾ã§ã®æ°å¤ããä½ããªãã 9^5 * 1 = 59049 9^5 * 2 = 118098 9^5 * 3 = 177147 9^5 * 4 = 236196 9^5 * 5 = 295245 9^5 * 6 = 354294 9^5 * 7 = 413343 ... 5ä¹ã®åã®å´ã§ã¯7æ¡ä»¥ä¸ã®æ°å¤ã¯ä½ããªãããªã®ã§6â¦
ææ¸ãããã¤ã® BigInt çããªããä¸ç¬ã§è§£ãããBigInt ããã¼ãã object Problem45 { class Generator (gen : BigInt => BigInt) extends Iterator[BigInt] { val this.gen = gen; var n = 0; def hasNext : Boolean = true; def next : BigInt = { n += â¦