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
この資料では、JavaScript でオブジェクト指向プログラミングを行う際に備えておくことが望ましい、基礎知識や概念について解説します。 【対象者】 ・JavaScript でアプリケーションを構築できる方 ・JavaScript におけるオブジェクト指向プログラミングの 実現手法や原理への理解を深めたい方 ・Java 的なクラスベースの言語との違いに違和感や混乱を 感じてらっしゃる方Read less
Ruby(Rails)や JavaScript を使うWeb系を想定して、あまり語られることの無い概念的な話を交えて包括的に関数を説明してみた。Read less
GWが始まりましたが、鎌倉のGWは観光客多すぎて逆に住民はげんなりして外に出なくなる感じです。とはいえ路地まで観光客が攻め込んでくることは少ないので、路地を散歩する分には天気がよくていい感じですね。ちなみに人力車のおにーさんはそういう味のある路地を知り尽くしているので人力車で移動するのはそこそこオススメです(ぼくは乗ったことないけど「こんなところも通るんだ!」ってところで見かけたりします)。 さて、jqというコマンドをご存じでしょうか。 jq jq is a lightweight and flexible command-line JSON processor. と書いてあるとおり、コマンドラインでJSONを扱うことができるコマンドです。で、今まさに仕事で巨大JSONと戦うことが多く、このコマンドが大活躍です。 とはいえ、ぼくの使い方としては「巨大JSONをキレイに整形して表示する」とい
Ternは入力補完や関数の引数表示と言った機能がついたJavaScript用プログラミング補助ライブラリです。 そろそろWebブラウザ上でコーディングを行える環境が整ってきたのではないでしょうか。プログラミングするためのエディタ環境として必要なのはハイライターなどの他にもたくさんあります。その幾つかを提供してくれるのがTernです。 入力補完。 文字を打つと絞り込まれていきます。 変数、クラスの定義を探します。 オブジェクトの種類を下に表示できます。 変数名を変更します。 名前空間に対応しているので余計なところは変更しません。 関数の引数を表示します。 デモ動画です。 Ternでは入力補完、変数やオブジェクトの定義元検索、関数の引数表示、変数名の一括変更と言った機能がサポートされています。いずれもローカルアプリケーションのプログラミングエディタには備わっている機能と言えるでしょう。しかしそ
こんにちは、開発担当の松本です。 前回のプラグイン紹介記事がわりと反響があったようですので、今回も便利プラグインをいくつか紹介します。 好みのテーマに変更できる: Simple Theme Plugin 左下のいつも出ている執事の顔が気になってくる人は多いと思います。 そんなときにはこのプラグイン。CSS と JavaScript を挿し込むだけの単純なプラグインながらその効果は絶大です。 利用するには、プラグイン導入後に Jenkins の管理 → システムの設定 → theme に追加する CSS と JS を指定するだけです。 プラグインのページにはサンプルのCSSファイルも用意されています。 とりあえず、執事の顔を消したいだけなら CSS に次のように記述すればよいです。 #main-table { background-image: none !important; } ページの
今日話さないこと JavaScriptの基礎知識、jQueryの導入 気持ちいいUIやUXがうんちゃら CanvasやWebGLを使ったリッチでイケてるゲームの作り方
jsPerf — JavaScript performance playground What is jsPerf? jsPerf aims to provide an easy way to create and share test cases, comparing the performance of different JavaScript snippets by running benchmarks. For more information, see the FAQ. Create a test case Login with GitHub to Create Test Cases
Google Analyticsが提供するJSは以下の様な初期化処理をおこなっている。 Google Analyticsに限らす外部JSを読み込むライブラリの場合、「初期化は非同期で行いたいが、APIの読み出しは同期で行いたい」という要望がある。 通常こういった要望を叶えるためには、メインのJSが読み込み済みかどうか監視して処理を呼び分けるような長い初期化処理を貼り付けタグとして発行し各サイトに埋め込んでもらう必要がある。 ただ、貼り付けタグが長くなるとコピペミスも増えるし、貼り付けタグ部分で問題が発生した時に対処できなくなるため、貼り付けタグはできるだけ短いほうが嬉しい。 そこで最初に紹介したGoogle Analyticsのタグを見ると、初期化処理は実質「var _gaq = _gaq || [];」だけということがわかる。 ではこの初期化処理だけでどうやって「初期化は非同期だけど、A
JavaScriptのthisは同じソースコードでも呼び出し元次第で意味が違ったりして複雑だと思われがちだけど、一回覚えてしまえば簡単だ。 JavaScriptにはthisが4種類ある これだけをしっかり覚えておけば、後は必要な時に 4種類って何があるんだっけ? と考えれば容易に思い出せる。 ちなみに、下記のコードはブラウザ上で実行することを想定している。(なのでwindowを使う) トップレベルのthis グローバルオブジェクトを指す。 var hoge = "fuga"; window.foo = "bar"; // fuga+bar と表示される console.log(this.hoge + "+" + this.foo); (function(){ // 同じくfuga+bar と表示される console.log(this.hoge + "+" + this.foo); })(
どんなに情報をまとめても、それを可視化して見ている人にうまく伝えるのは至難の技です。そんな時にデータをスタイリッシュかつ見やすいグラフにしてくれるのが、様々なデザインのJavascriptがダウンロード可能なライブラリ「D3.js」です。 D3.js - Data-Driven Documents http://d3js.org/ D3.jsを使って作ったグラフの事例を公式ギャラリーから見ることが可能で、これらのグラフにもとになる素材(スクリプトのソース)がGitHubで入手可能です。 Gallery · mbostock/d3 Wiki · GitHub デザインの一例は以下から。 ◆:Bubble Chart 作成例によっては、ページに直接コードが記載されているものもあります。 ◆:Four Ways to Slice Obama’s 2013 Budget Proposal - In
昨日, コリスさんの記事で紹介されていた reveal.js に一目惚れしてしまったので使い方をまとめてみました. reveal.js の使い方を reveal.js を使って解説しています. 簡単にオシャレでシンプルなプレゼンを作れるのでぜひ遊んでみてください. 追記: 『reveal.jsベースのプレゼンをWeb上で作れちゃうオンラインエディタ『rvl.io』の使い方をrvl.ioを使って解説してみた』というエントリーを公開しました. とても便利なので, よかったらこちらも参考にしてくださいな♪ Sample reveal.js を解説しているサンプルはこちらです. また, 最小サンプルも作ってみました.(こちら) Download 今回制作したサンプルはこちらでダウンロードできます. index.html が 解説しているサンプル, sample.html が最小サンプルになります.
MD5-Password-Cracker.jsはJavaScriptを使ってMD5のハッシュ値から元テキストを検索するソフトウェアです。 パスワードをハッシュ化して保存しておくのは基本と思われますが、その際によく使われるのがMD5ではないでしょうか。SHA-1/SHA-2のが良いと思うのですが、それをまざまざと知らしめてくれるのがMD5-Password-Cracker.jsです。 パスワードクラック開始!Web Workersが8つ使われています。 パスワードはheyaでした。1ワーカーあたり1秒間に約7万の解析が行われています。4文字のパスワードに対して23秒で解析されました。 網羅的に文字列を試しているので時間は要しますが、4文字程度のパスワードであればあっという間に解析されてしまうというのが分かるかと思います。パスワードの取り扱いについてはくれぐれもご注意を。 MD5-Passwo
JavaScriptなどのスクリプト言語は動作が遅く、最適なパフォーマンスを得るにはC/C++で実装しなければならないという常識に挑んだ講演が国内外で大きな話題になっています。 題材になったのはベルリンの開発者、Felix Geisendorfer氏によるNode.jsからMySQLに接続するためのバインディングの実装です。Node.jsからMySQLへ接続するためのバインディングはJavaScriptだけで実装されているもの、Cで実装されたライブラリ(libmysql)を使ったもの、MySQLからフォークしたデータベース、MariaDBのライブラリを使ったものなど複数が存在しています。 Felix氏はあくまでJavaScriptのみによる実装で、C言語で実装されたライブラリを使ったバインディングを越えるパフォーマンスの実現に挑戦しました。次々に登場するライブラリの高いパフォーマンスを見る
はじめに Rails アプリの JavaScript のテストは capybara(+capybara-webkit) を使えば一応できるけど、統合テストなのがね…。統合テストもちゃんと書くけど、やりたいのは JavaScript の単体テストなのに。 そこで Evergreen そんな中で最近知ったのが Evergreen っていう gem。 jnicklas/evergreen · GitHub こいつを簡単に説明すると、Rails に組み込める Jasmine テストランナー。Jasmine も同梱されてるので、インストールすればすぐに JavaScript のテストが書ける。 Evergreen のインストール Gemfile に group :test, :development do gem "evergreen", :require => "evergreen/rails"
[追記 dateTime="2007-12-07 夕刻"]あーっ、今ごろ気付いた。イライライって「イ」がひとつ多いや。タイトルを編集すると、なんか悪いことが起こったりしませんかね? うーん、いいや。typoしたままにしとこう。ちなみに、「イライライ」は回文になっているぞ。[/追記][追記 date = "2007-12-11"]http://d.hatena.ne.jp/keyword/%a5%a4%a5%e9%a5%a4%a5%e9%a5%a4 [/追記] いつか文句言ってやろうと思っていた件ですよ。長いぞ。 内容: 似てるけど少しずつ違うイベントモデル達 イベントターゲット イベントフロー EventTargetインターフェース イベントハンドラーとイベントリスナー リスナーとハンドラーについてもう少し イベント伝搬とハンドラー実行 イベントの通過または出現 イベントタイプ 「イベント
リリース、障害情報などのサービスのお知らせ
最新の人気エントリーの配信
処理を実行中です
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く