2013-08-19 uupaa's pure JavaScript module pattern pure JavaScript ã§è¨è¿°ããBrowser, WebWorker, Node.js ã§ä½¿ããã¢ã¸ã¥ã¼ã«å®ç¾©ãã¿ã¼ã³ã®ãç´¹ä»ã uupaa 2013-08-19 18:05 åã®è¨äº
2013-08-19 uupaa's pure JavaScript module pattern pure JavaScript ã§è¨è¿°ããBrowser, WebWorker, Node.js ã§ä½¿ããã¢ã¸ã¥ã¼ã«å®ç¾©ãã¿ã¼ã³ã®ãç´¹ä»ã uupaa 2013-08-19 18:05 åã®è¨äº
ã¾ãã¯ã³ã¼ã1ãè¦ã¦ãã ããã // ã³ã¼ã1 def copyFile() = { val in = new FileInputStream(new File("foo.txt")) val out = new FileOutputStream(new File("bar.txt")) val buf = new Array[Byte](1024) var len = 0; while ({ len = in.read(buf); len != -1 }) { out.write(buf, 0, len) } in.close() out.close() } ãªãã®ã¸ãã¦ã¤ããªããã¡ã¤ã«ã³ãã¼(foo.txt -> bar.txt)ã®ã³ã¼ãã§ãã å¥ã«ããã§ããã£ã¡ãããã®ã§ããããããã£ãã³ã¼ãã®å ´åãcloseãå¿ãããæ®å¿µãªãã¨ãèµ·ããå¾ã¾ãã using ã¨ãã訳ã§ããããæ¢åºã§
ãªãªã¼ã¹ãé害æ å ±ãªã©ã®ãµã¼ãã¹ã®ãç¥ãã
ææ°ã®äººæ°ã¨ã³ããªã¼ã®é ä¿¡
å¦çãå®è¡ä¸ã§ã
j次ã®ããã¯ãã¼ã¯
kåã®ããã¯ãã¼ã¯
lãã¨ã§èªã
eã³ã¡ã³ãä¸è¦§ãéã
oãã¼ã¸ãéã
{{#tags}}- {{label}}
{{/tags}}