解答・コメントを送る方法
コメントを送るには2つの方法があります。
- 匿名でコメントを書くログインせずにコメントを書くことができます。 名前は「匿名」となります。
- アカウントを作成してコメントを書くアカウントを作成すると、記名での投稿ができます。 また、プロフィールページが作成され、 簡単なプロフィールや 統計情報が表示されるようになります。
投稿ボタンを押す前に以下の文章を確認してください
- 当サイトへの投稿は クリエイティブ・コモンズ・ライセンス BY(表示)および、その解釈に同意するものとみなされます。各ページには下のようにライセンス表示が行われます。
- あなたの投稿したコード・コメント・トピックが再利用・添削されることを望まない場合は、投稿をお控えください。
- 自分が書いていない、ウェブサイトや書籍などからの無断コピーは著作権の侵害です。著作権者の了解を得るか、自分で0から書いてください。
- 著作権の侵害、名誉毀損、など投稿内容に問題がある場合、削除することがあります。
- これらのことにあなたはあらかじめ同意したものとみなされます。
Post comment
Post a comment to the following challenge:
ファイル更新の監視
(Nested
Flatten)
As a reply to the following comment: zigorou: Cc, Ciはそれぞれ const...(#395) [show]

zigorou #395() [ XUL ] Rating0/0=0.00
var FileWatch = function(filename, duration) { this.file = Cc["@mozilla.org/file/local;1"].createInstance(Ci.nsILocalFile); this.file.initWithPath(filename); this.duration = duration; }; FileWatch.prototype = { iid: null, lastTime: null, watch: function() { this.lastTime = (new Date()).getTime(); var self = this; this.iid = setInterval(function() { self.watchFile(); }, this.duration * 1000); }, watchFile: function() { if (this.file.lastModifiedTime - this.lastTime > 0) { this.log("modified"); } this.lastTime = (new Date()).getTime(); }, log: function(message) { Cc["@mozilla.org/consoleservice;1"].getService(Ci.nsIConsoleService).logStringMessage(message); }, unwatch: function() { clearInterval(this.iid); } };Rating0/0=0.00-0+
[ reply ]