<html> <head> <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js"></script> <script src="http://ajax.microsoft.com/ajax/jquery.templates/beta1/jquery.tmpl.min.js"></script> <style> .title{ widt... 続きを読む
翻訳: ”命令型のコールバック、関数型のプロミス: Node が逸した最大の機会” by James Coglan Original: "Callbacks are imperative, promises are functional: Node's biggest missed opportunity" by James Coglan Translated by Yuta Okamoto (@okapies) N... 続きを読む
JSでのUA条件分岐便利スニペット jQuery.supportだけで代表的なブラウザの判別を行うことができなくなってしまったので、UA情報には依存しないブラウザがサポートしている機能だけでブラウザ判別を行う試みです。 実験!あなたのブラウザを判別 正解しています... 続きを読む
jQuery 1.9 になってとうとう $.browser が使えなくなってしまいましたね。 もともと非推奨ということもあり、個人的にはプラグインを実装する時などは極力使用しないようにしてましたが、実際使えなくなってしまうと、動かなくなってしまうプラグインって結構... 続きを読む
自分のお気に入りのTシャツ画像を集めてシェアするサイト「Stussy My Tee」がOPEN! 続きを読む
JavaScriptNodeListやHTMLCollectionを配列(Array)に変換する方法の一つに、Array.prototype.sliceを使う方法がある。 var array = Array.prototype.slice.call(document.getElementsByTagName('A')); でも、最近の実装であればArray.applyもその用途に使える。... 続きを読む
GitHubのコメントでは@と入力するとカーソルの下に入力補完が出現する。さらっとやっているが、実はこれが結構難しい。なぜ難しいのかというと、JavaScriptではカーソルが何文字目にいるかは分かるが、 カーソルのXY座標を取得するAPIが存在しない からだ。カー... 続きを読む
All slide content and descriptions are owned by their creators. 続きを読む
jQuery#triggerのテスト describe('jQuery#trigger', function() { it('イベントハンドラに値を渡せること', function(done) { var $el = $('<div>'); $el.bind('foo', function(event, val) { expect(val).to.be('bar'); done(); }); $el.trigger('foo', 'bar'... 続きを読む
2013-04-30 第38回 HTML5とか勉強会でテストについて話しました。 先週の4/26に開催された第38回HTML5とか勉強会「Webアプリ×テスト最新事情」で、JavaScriptのテストについて話させてもらいました。 発表資料はこちら。 JavaScript Unit Test Why? What? How? ... 続きを読む
https://developer.mozilla.org/ja/docs/DOM/XMLHttpRequest/Sending_and_Receiving_Binary_Data辞書を見ずに勢いだけで翻訳したので精度は多分低いです。おかしい所は指摘してもらえると嬉しいです。すぐ直します恥ずかしいので。JavaScriptのTyped Arrayを使... 続きを読む
generators + promises = tasks task.js makes sequential, blocking I/O simple and beautiful, using the power of JavaScript’s new yield operator. Tasks run concurrently like threads, and can block on promises with yield. Here’s an example usin... 続きを読む
今日のスケッチ蝶蝶がいっぱい。 processing.js だいたい理解した。 蝶の群れだけど、boidというよりは、perlin noiseによるフォースフィールドの復習。 定番ですがperlin noiseで作った雲状bitpmapのR値とG値を、XY方向の気流の力として適用する・・・ってアレ... 続きを読む
Change Wind Stop Snowing Latest Changes Script moved into one file (snowstorm.js) for simplicity addEventHandler and PNG support functions updated Executive Summary So, you want Javascript snow on your web site, eh? SnowStorm is a Javascript-... 続きを読む
制限 すべてのOSで「表示開始時にアプリがインストールされているかを判断して表示を変える」事はできない iOS6 以下の方法で画面上部にバナー(Smart App Banner)を出せる <meta name="apple-itunes-app" content="app-id=405548206"> 以下の形式でパラメータ... 続きを読む
TitaniumのユーザーBBSで、ChatWork のiPhoneアプリの挙動が話題になっています。 ChatWork の謎 | Don't Fall - Titanium Mobileユーザー会サポートBBS ChatWorkアプリでは、facebook認証でアプリを使うことが出来るのですが、これまでよく使われていたWebView... 続きを読む
The Principle of Least Power Tim Berners-Lee on the Principle of Least Power: Computer Science spent the last forty years making languages which were as powerful as possible. Nowadays we have to appreciate the reasons for picking not the most... 続きを読む
お客様が developerWorks に初めてサインインすると、プロフィールが作成されます。プロフィールで選択した情報は公開されますが、いつでもその情報を編集できます。お客様の姓名(非表示設定にしていない限り)とディスプレイ・ネームは、投稿するコンテンツと... 続きを読む
Chardin.js - Better introductions for websites and features with a step-by-step guide for your projects. 続きを読む
2012-01-29 What is {} + {} in JavaScript? Labels: dev, javascript, jsguide Recently, the lightning talk “Wat” by Gary Bernhardt pointed out an interesting JavaScript quirk: You get unexpected results when you add objects and/or arrays. This... 続きを読む