The Changelogs of Node.js from v0.5.0 to v0.6.9.
What does this code print out? Assume that console.log logs to the console. Experiment #1: For loop console.log('For loop'); for(var i = 0; i < 5; i++) { console.log(i); }0, 1, 2, 3, 4 - easy, right? What about this code? Experiment #2: setTimeout console.log('setTimeout'); for(var i = 0; i < 5; i++) { setTimeout(function() {console.log('st:'+i)}, 0); }The result is 5, 5, 5, 5, 5.What about
package.json { "name": "http-server", "preferGlobal": "true", "version": "0.3.0", "author": "Nodejitsu <support@nodejitsu.com>", "description": "a simple zero-configuration command-line http server", "bin": { "http-server": "./bin/http-server" }, "scripts": { "start": "node ./bin/http-server", "test": "vows --spec --isolate" }, "main": "./lib/http-server", "repository": { "type": "git", "url": "ht
I would like to document an emerging set of programming conventions, philosophies, and values that I see evolving in the node.js community. I call this the node aesthetic. callback austerity The very first example of node you are likely to see is on the node.js home page. This snippet is exemplary of the the radical simplicity pioneered by projects like sinatra. var http = require('http'); http.cr
TechHUB.jp Node.js 入門 第3回資料 Node.js で作るリアルタイム投票アプリ Last Update: 2011/12/21 Author: Kazuyuki Honda @hakobera 前書き この資料は、2011年12月11日に開催された TechHUB.jp の Node.js 入門の3回目の講義の補足資料です。当日、講師である私の準備、検証不足もあり、色々と想定していた内容までたどり着かなかったので、そのお詫びを兼ねて、資料としてまとめてみました。 なるべく細かいところまで記述したつもりですが、本題と関係ない部分は一部省略、または参考資料へのリンクで済ましている部分があるので、その点はご容赦ください。 また、この資料は受講者のほとんどが Mac だったため、Mac OS X Lion (多分、Snow Leopard 10.6.7 以降なら同じはず)を前
npm is the node package manager. It helps you manage your node.js modules and dependencies. Here is a quick cheatsheet of all my favorite npm commands: Installing npm Update npm Search for npm packages View details of a npm package Installing a npm package locally Installing a npm package into an application Understanding Global versus Local installs in npm Global Package Installation Uninstallin
Fork me on GitHub! Feel awesome! There are a lot of template languages available for Node.js. But how do you pick the right one? This page aims to help you choose the template language that's best for you and your project. Template Languages (alphabetical) CoffeeKup - Markup as CoffeeScript. EJS - Embedded JavaScript templates Haml-js - Haml ported to server-side Javascript. This is a traditional
100ミリ秒のウェイトが入るHelloWorldPHP<?php usleep(100000); echo "Hello World"; ?> Node.jsvar http = require('http') server = http.createServer() server.on('request', function(req, res){ setTimeout(function(){ res.writeHead(200, {'Content-Type': 'text/plain'}); res.write('Hello World'); res.end() }, 100) }) server.listen(3000, '127.0.0.1'); console.log('Server running at http://127.0.0.1:3000/'); 実行を忘れずに
UPDATE (3/3/12) – there’s a much easier way of doing this now – see ‘Specifying a version of Node.js / npm‘ in the Heroku Dev Center. The mechanism described below still works, but you should only go to all this trouble if you want something really custom. Here’s a completely unofficial, unsupported recipe for running your own Node.js version on Heroku. These instructions are based on those at the
Node.js v0.6 の新機能として cluster モジュール が導入されました.cluster モジュールは,HTTP を含めた TCP 接続を複数の子プロセス (ワーカプロセス) で処理することにより,特にマルチコア環境でのスループット (リクエスト/秒) を向上するための機能です. しかし,ドキュメントにはその使い方が書かれているだけで,どのように実現されているかは書かれていないので,ここで簡単に紹介しておきます. Node.js のクラスタ機能は v0.5.10 で突然コマンドラインオプションとして導入されましたが,直後の「東京 Node 学園祭 2011」が行われた頃にはコマンドラインオプションは廃止されて cluster モジュールによって API が提供されるようになり,その翌週の v0.6.0 リリース数時間前にはその API が変更されるというドタバタぶりでした
Node v0.5 ryan@joyent.com July 26, 2011 Currently we are deep in a rewrite of the core OS binding layer. The goal is Complete API compatibility on Windows and Zero performance degradation on Unix (Linux, Macintosh, Solaris) With the support of Microsoft, Cloudkick, and Joyent we have four person team sponsored to complete the project. The ultimate result will be an official node.exe distribution.
The realtime web is right around the corner, and JavaScript is here to help, both on the server and the client side. The WebSocket protocol promises to solve the problem of bidirectional communication once and for all, but can we leverage it today?Socket.IO ;provides an API that enables WebSocket for every browser (IE5.5, IE6, IE7, IE8, Safari, Chrome, Firefox 3-4, Opera 10) and multiple mobile de
「実のところ、全てを備えていない言語 の方がプログラミングは簡単である」 デニス・リッチー “A language that doesn’t have everything is actually easier to program in than some that do.” – Dennis Ritchie 1 ソフトウェアスタックはどんどん 深くなっています。 The software stack is growing ever deeper. 2 プログラマのキャリアはローレイヤの 周辺だけに留まらなくなりました。か といって、LLなどのハイレイヤだけが それにとって変わったわけではありま せん。 そう、今は「ブラウザ」という領域が あるのです。 Programmers can spend an entire career in not just user-space... no
モバイルゲーム 物凄い勢いで勃興したモバイルゲーム業界は、いろいろな課題や問題に直面しながらも巨大化し、今日の時点でのスマートフォン向けゲームの市場へと継承されていきます。 モバイルゲームの歴史 2001 Javaアプリと3Dゲームの登場 Javaが利用できるようになったことにより、ダウンロード型のゲームが供給できるようになりました。 2002 携帯電話端末の大容量化・3D化競争 Java搭載携帯電話端末が登場してからごく僅か1年の間に、アプリのサイズに関しては10倍に広大化し、表現方法も2Dから3Dにシフトし始めました。J-PHONEは『ゼビウス』や『スペースハリアー』などといった昔のアーケードゲームを、ドコモはSIMCITYなどパソコンで世界的規模のヒットを飛ばしたゲームを主力商品としていました。 2003 モバイルゲームの一般化 メモリの制限が厳しいJava仮想マシン上ではなく、OS
リリース、障害情報などのサービスのお知らせ
最新の人気エントリーの配信
処理を実行中です
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く