ãæ¬åå¼·ä¼ã¯ããã£ãªãã£ã¤ãã³ãã¨ãªãã¾ããåå æã®ä»£ããã«ç¾©æ´éã®ååããé¡ããã¦ããã¾ããããããããäºæ¿ã®ä¸ããç³ãè¾¼ã¿ãã ããã ã©ãã®çµç¹ã§ããã©ãã®ãµã¼ãã¹ã§ãå½ããåã®ããã«è¡ããã¦ããããã¹ã¯ã¼ãã®å®æå¤æ´ãã¿ãªããã¯ããã®ã«ã¼ã«ã«çããæã£ããã¨ã¯ããã¾ããã? ãæ¬å½ã«æå³ãããã®ããªãã®ã?ãããããã¨ãããªãã°ã©ã®ç¨åº¦ãªã®ã?ã æ»æè¦ç¹ã®ã»ãã¥ãªãã£ãµã¼ãã¹ã§ãããããã¬ã¼ã·ã§ã³ãã¹ãã«å¾äºãã¦ãããã»ãã¥ãªãã£ã»ãã¼ã¯ãã¤ããã®çè ãé£è¼è¨äºã«äºä¾ãå ã解説ãã¾ãã ç´60åéã®è¬æ¼ã®å¾ãQ&Aã®æéããã£ã·ãã¨è¨ãã¾ãããã²ãã®æ©ä¼ã«è¶³ããéã³ãã ããã ã»ãã¥ãªãã£ã¨ã³ã¸ãã¢ã¨ãã¦ã主ã«ãããã¬ã¼ã·ã§ã³æ¤æ»ãªã©ã«å¾äºãã¦ãããæ°éä¼æ¥ãå®å ¬åºåããå¤ãã®æ¤æ»å®ç¸¾ãæã¤ã 趣å³ã¨ãã¦ãèªå® ã§ã®ããã¼ãããéç¨ãIDSã«ããç£è¦ãªã©ãè¡ãã âé£è¼ä¸ã®è¨äºï¼ã»ã
æè¿å ãã£ãããã«è¦ãã¦å®ã¯ãããæããåå¨ãã¦ãã java.lang.ref.Reference ã¨ãã®å®è£ ã¯ã©ã¹ã§ãã PhantomReference, SoftReference, WeakReference ã® 3 ã¤ãä»æ¥ã¯ããã¤ãã®åä½ã«ã¤ãã¦è»½ãè¦ã¦ããã ãã ãã®åã«ãjava6 ã®å¹¾ã¤ãããã¯ã·ã©ã³ãã© jvisualvm ãªã jvm ã®æåã GUI ã§è¦ãããã¼ã«ãæä¾ããã¦ããã ã¨ãããããä¸è¨ã®ä½ã®æå³ãç¡ãã³ã¼ããèµ°ãããã¨ãã® jvisualvm ã®æåã¯ãããªæãã long c = 0; List<BigDecimal> list = new ArrayList<BigDecimal>(); while (true) { Random r = new Random(); long l = r.nextLong(); list.add(new Big
çãä¸ãã£ã¦ãSleep sortã åãã©ã®è¨èªãã§å®è£ ãããã¨æã£ããã©ããè²ã ãããã¦ãã¦æããã®ã§ã¾ã¨ãã¦ã¿ãã éææ´æ°ã ããããã®çºç«¯ 4chan BBS â Genius sorting algorithm: Sleep sort ï¼æ¬å®¶ï¼ 常èãè¦ãã½ã¼ãã¢ã«ã´ãªãºã ï¼ãã®åãâsleep sortâï¼ â Islands in the byte stream bash 4chan BBS â Genius sorting algorithm: Sleep sort ï¼æ¬å®¶ï¼ 4chan BBS â Genius sorting algorithm: Sleep sort C# 4chan BBS â Genius sorting algorithm: Sleep sort JavaScript 話é¡ã®ã½ã¼ãã¢ã«ã´ãªãºã ãsleep sortããJavascriptã§å®
sleep sortã®ä»æ§ï¼4chan BBS - Genius sorting algorithm: Sleep sort 以ä¸ãå®è£ ãã³ã³ãã¤ã«ããéãã¦ããªãã®ã§ãæ£ããåããã©ããã¯ä¸æãC++0xæºæ ã®STLã欲ããã #include <iostream> #include <vector> #include <thread> #include <chrono> // åã ã®è¦ç´ ã®ã½ã¼ããã¨ããã表示é 延 void sort_element( unsigned int elem ) { std::this_thread::sleep_for( std::chrono::duration<unsigned int>( elem ) ) ; std::cout << elem << std::endl ; } // ã¤ãã¬ã¼ã¿ã¼ã®åç §çµæã¯unsigned intåã«å¤æã§ããåã§
ãããã便å©ãããããããã³ã¼ãæ¸ãããã ãã©ã¬ãã¥ã¼ãã¦ãããªãããªããã¨ããã¨ãã«ä½¿ãããã ã Chopã®ä½¿ãæ¹ã¯ç°¡åã ãã¾ãã¯ã¬ãã¥ã¼ãããã³ã¼ãããã¡ãã§è²¼ãä»ããã¨ç¹æ®ãªURLãããããã¨ãã§ããã ãã¨ã¯ãã®URLãã¬ãã¥ã¢ã¼éã§å ±æãããã£ã¦ããã£ã¦ã³ã¡ã³ããã¤ãã¦ããã ãã ã ãã¶ã¤ã³çã«ãç´ æµã ããæ¥æ¬èªãã°ã£ã¡ããªã®ã§ã¡ãã£ã¨ããç¥èã®å ±æã«å½¹ç«ã¤ãããããªãã ã³ã¼ãã¬ãã¥ã¼ããããã人ã¯æ¤è¨ãã¦ã¿ã¦ã¯ãããã ãããã
Pythonãªãçãæ¸ãããã¹ãªããã½ããã¯ãã¿ã¨ãã¦é¢ç½ããå®ç¨æ§ã¯çç¡ã ã ãã©ãmultiprocessingã¯ã¬ãã§å®ç¨çãªã¢ã¸ã¥ã¼ã«ã(Python2.6以éã®æ¨æºã©ã¤ãã©ãª) #!/usr/bin/env python from time import sleep from multiprocessing import Pool from random import randint num = 20 def sleep_sort(n): sleep(n) print(n) Pool(num).map( sleep_sort, [randint(1, num) for i in xrange(num)] ) Pool#mapã®è¿ãå¤ã¯ããããã®å®è¡çµæã®ãªã¹ããªãã ãã©ãsleep sortã§ã¯å½¹ã«ç«ããªãã®ã§å²æ 常èãè¦ãã½ã¼ãã¢ã«ã´ãªãºã ï¼ãã®åã"sleep sort"ï¼
ãsleep sortãã«ã¤ãã¦ã¯ä»¥ä¸ã®ãªã³ã¯ãè¦ã¦ãããã¨ã㦠4chan BBS - Genius sorting algorithm: Sleep sort常èãè¦ãã½ã¼ãã¢ã«ã´ãªãºã ï¼ãã®åã"sleep sort"ï¼ - Islands in the byte streamã¯ã¦ãªããã°Big Sky :: Sleep sort in Go ã¾ãæ¬é¡ã®ã³ã¼ã function sleepSort(array, callback, f){ var l = array.length, result = []; var i = l; if(f == null) f = Number; while(i--) (function(value){ setTimeout(function(){ result.push(value); if(--l === 0) callback(result);
å人ã§Webãµã¼ãã¹ãä½ãéã®èå¯ã«é¢ãã以ä¸ã®è¨äºããã¨ã¦ãèå³æ·±ãé¢ç½ãã£ããããã«æ¸ãã¦ãããã¨ã¯ã ãããåæã§ãèªåãå®è·µãããã¨æããã¨ã°ããã å人ã§Webãµã¼ãã¹ãè¶ é«éã§ã¤ãã人ãã¡ã®ä½ãæ¹ãèå¯ã â ã¢ãã¥ããããã° æ ªå¼ä¼ç¤¾8bitã®ã¹ã¿ããããã°ã§ã ã§ãè¨äºã®æå¾ã«å·çè ãèãã¦ã¿ãããã¨ã¨ãã¦ãå人Webãµã¼ãã¹ã®å ´åãä»æ§æ¸ã¯ã©ããã¦ãã®ï¼ãã¨å¼ã³ããã¦ããã®ã§ãåè¶ãªããèªåãéå»ã«ä½ã£ãWebãµã¼ãã¹ã®ä»æ§æ¸ï¼Evernoteã«æ¸ããã¡ã¢ï¼ãå ¬éãã¦ã¿ããå ¬éããã®ã¯Nekostagramã¨ã¯ã¦ãªã¹ã¿ã¼ã«ã¦ã³ã¿ã¼ã®ãã®ã ä»æ§æ¸ï¼TODOãªã¹ãï¼ã®æ¸ãæ¹ èªåã®å ´åãWebãµã¼ãã¹ãä½ãã¨ãã«æ¸ããã®ã¯ãä»æ§æ¸ããªã©ã¨å¼ã¹ããããªã¡ããã¨ããã·ãã¢ãã§ã¯ãªããEvernoteã«æãã¤ãããã¨ãã©ãã©ããªã¹ãã¢ãããã¦ããã ããããããTODOãªã¹ãã§ããã
é£è¼ç®æ¬¡ã¸ 以ä¸ã®JavaScriptã³ã¼ããæå³ããåä½ãããªãã®ã¯ï¼ãªãã§ãããï¼å¶éæéï¼åï¼ ããããäºï¼ tenki.htmlã®ä¸ã«ï¼å¤©æ°ãæ¸ããã¦ããã index.htmlã®ã¤ã³ã©ã¤ã³ãã¬ã¼ã å ã« tenki.html ã表示ãã¦ï¼ãã®å 容ã解æããã â»ï¼ã¤ã®HTMLã¯ï¼åããã©ã«ãä¸ã«ããã index.html <input type="button" value="ã¯ãªãã¯ãã¦å¤©æ°ã表示" onClick="f()"> <br> <!-- ããã« tenki.html ã表示ãã¾ãã --> <iframe id="ifr"></iframe> <script language="JavaScript"> function f() { // iframeãåå¾ var e_ifr = document.getElementById( "ifr" ); // ifram
æ¥æ¬ã§ã®ä»äºå ´ç°å¢ä½ãã®è©±ã¯ãã¡ãã Impress BB Watchã®ãã¹ã¯ãããç¾æ¯ã§Macä¸ã®ãã¹ã¯ããããç´¹ä»ãã¦é ããã®ã§ãé£åãã¦ãªã¢ã«ãªãã¹ã¯ãããã®è©±ã§ãã ç§ã¯å®¶ã§ä»äºããã¦ãã¾ãããä»äºé¨å±ãè¨ããã®ã§ã¯ãªãããªãã³ã°ã«æºãç½®ãã¦ä»äºããã¦ãã¾ãã ä¸æ¥ã®æéã®ã»ã¨ãã©ãPCã«åãã£ã¦ããã®ã§ãä¸çªåºãé¨å±ã使ããªãã®ã¯ãã£ãããªãã®ã§ãã ä»äºæºãç½®ãã®ã«å¿ è¦ãªã¹ãã¼ã¹ã¯å¤§ä½2ç³ç¨åº¦ã§ãããªãã³ã°ãåºãã ã¨ãæã£ãããå§è¿«æã¯åºãªãã¨æãã¾ãããªã®ã§ããã¡ã§ã¯ã1LDKã§åºãé¨å±ã®ç©ä»¶ãæ¢ãã¾ããããã¾ä½ãã§ãã家ã1LDKã§ãã ã¢ã¡ãªã«ã«å¼ã£è¶ãã¦ã¾ãè¡ã£ãå ´æã¯IKEAãä»åã®å¼ã£è¶ãã§ã¯ãã¢ã¼ãã³ä»¥å¤ã®å®¶å ·é¡ã¯å ¨é¨å¦åãã¦ãã¦ãã¾ã£ãã®ã§ãä»äºæºãæ£ãå ¨é¨è²·ãç´ãã§ãã ç§ã¯ã17ã¤ã³ã2æã¨ã24ã¤ã³ã1æã®ãã£ã¹ãã¬ã¤ãã¢ã¼ã ã§åºå®ãã¦ãã¾ããã¢ã¼ã ã使ã
ãªãªã¼ã¹ãé害æ å ±ãªã©ã®ãµã¼ãã¹ã®ãç¥ãã
ææ°ã®äººæ°ã¨ã³ããªã¼ã®é ä¿¡
j次ã®ããã¯ãã¼ã¯
kåã®ããã¯ãã¼ã¯
lãã¨ã§èªã
eã³ã¡ã³ãä¸è¦§ãéã
oãã¼ã¸ãéã
{{#tags}}- {{label}}
{{/tags}}