You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session. You switched accounts on another tab or window. Reload to refresh your session. Dismiss alert
node.js ã®å®è£ ãå¸ã libuv ã使ã£ã¦Cè¨èªã®ã¢ããªã±ã¼ã·ã§ã³ãæ¸ãã¦ããã¨ãã³ã¼ã«ããã¯é¢æ°ãå¢ãã¦ãããã¾ãããã¯è´ãæ¹ãªãäºãªãã ãã©ãããã§é¢åãªã®ãã«ã¼ããæ¢ããæ¹æ³ãlibuv ã¯ä½ã£ããã³ãã«ãå ¨ã¦éããããã¨åæã« uv_run ãçµäºããä»çµã¿ã«ãªã£ã¦ãããã ãã©ãä¾ãã°å¦çå ã«2ã¤ãã³ãã«ããã£ã¦ããã¤éãããã¨ããç®æãå¥ã®ã³ã¼ã«ããã¯å¦çå ã«ããã¨ãã³ãã«ãã°ãã¼ãã«å¤æ°ã«ããã uv_timer_t timer1; uv_timer_t timer2; void exit_cb(void* data) { uv_close(timer1); uv_close(timer2); } æ§é ä½ã«æ ¼ç´ãã¦å¼ãããåããªããã°ãªããªãã typedef struct { uv_timer_t timer1; uv_timer_t timer2; } THE_TI
JavaScript Advent Calendar 2011 (Node.js/WebSocketsã³ã¼ã¹) ã® 13 æ¥ç®ã®è¨äºã§ãï¼ Node ã¨ããã°éåæããã°ã©ãã³ã°ã§ããï¼ãã®ã¹ã¿ã¤ã«ã¯å¤§éæã«ãã㦠2 種é¡ããã¾ãï¼ä¸ã¤ç®ã¯ fs ã¢ã¸ã¥ã¼ã«ãªã©ã§ä½¿ããã¦ããã³ã¼ã«ããã¯é¢æ°ã®ã¹ã¿ã¤ã«ï¼ fs.readFile(path, function(err, content) { if (err) { // ã¨ã©ã¼æã®å¦ç return; } // æåæã®å¦ç });ãã®ã¹ã¿ã¤ã«ã¯ï¼ä½ããã®è¦æ±ã«å¯¾ããçµæãä¸çºã§åãåã (è¦æ±ã¨çµæã 1 対 1) å ´åã«ä½¿ããã¾ãï¼ããã¦ï¼ã³ã¼ã«ããã¯é¢æ°ã®ç¬¬1å¼æ°ã§ã¨ã©ã¼ã®æç¡ãéç¥ããã¾ãï¼ã¨ã©ã¼ããªããã° nullï¼ã¨ã©ã¼ããã£ãå ´å㯠Error ãªãã¸ã§ã¯ãã¨ããã®ãååã®ãããªæ°ããã¾ããï¼undefined ã渡ãããããã
ãªãªã¼ã¹ãé害æ å ±ãªã©ã®ãµã¼ãã¹ã®ãç¥ãã
ææ°ã®äººæ°ã¨ã³ããªã¼ã®é ä¿¡
å¦çãå®è¡ä¸ã§ã
j次ã®ããã¯ãã¼ã¯
kåã®ããã¯ãã¼ã¯
lãã¨ã§èªã
eã³ã¡ã³ãä¸è¦§ãéã
oãã¼ã¸ãéã
{{#tags}}- {{label}}
{{/tags}}