こんにちは、太田です。前回はクロスブラウザのパターンについてまとめました。今回はより具体的にJavaScriptの基礎的な部分からそこそこJavaScriptに慣れた方でも間違いやすいポイントを中心に解説します。 JavaScriptの背景知識 JavaScriptは(未だに)誤解されがちな言語です。まずはJavaScriptの背景から解説していきます。 (広義の)JavaScriptとはEcma Internationalによって策定されているECMA-262という規格(ECMAScript)を実装した処理系で実行される言語を指します。遠回りな表現になっていますが、これはJavaScriptのややこしさの一端を表しています。つまり、JavaScriptそれ自体に仕様があるわけではない、ということです。ECMAScriptと呼ばれる言語の仕様があって、その仕様に準拠した言語を(広義の)Ja
自分が今、興味のあるプログラムを中心にプログラムの記事を書いていきます。 はてダ( http://d.hatena.ne.jp/nakamura001/ )などもやっているのでそちらで書いたものなどもこちらにまとめたりしようと思っています。
Download and open the 'Processing' application. Select something from the Examples. Hit the Run button. Lather, rinse, repeat as necessary. More information on using Processing itself is can be found in the environment section of the reference. To learn the Processing language, we recommend you try a few of the built-in examples, and check out the reference. A group of diverse books have been writ
システムの多機能化により、プログラムの内容が複雑化している。テクマトリックスの『Understand』は、プログラムの構造を可視化することで、ソースコードの解析時間を大幅に削減できる開発支援ツール。今回は同社の福永一寛氏に、Understandの機能や特徴について聞いた。 システムの多機能化により、プログラムの内容は複雑化している。既存コードの改修や多人数での開発における情報共有のためには、プログラム構造の理解が必須だが、ドキュメントと実装内容とが乖離している場合も多く、解析自体に工数がかかることもある。テクマトリックスの『Understand』は、プログラムの構造を可視化することで効率的なソフトウェア開発をサポートするソフトウェア開発環境。「組込みシステム開発技術展(ESEC)」にて、同社の福永一寛氏にその特徴を聞いた。 ソースコードの解析作業時間を大幅に削減する『Understand』
GPU Gems 3 is now available for free online. Chapters 1-7 are now available, with additional chapters coming online every week! Please visit our Recent Documents page to see all the latest whitepapers and conference presentations that can help you with your projects. Although pixels and pixel shaders often get the attention, geometry is "where it all starts." Without geometry, we would find ligh
第1章 はじめてのデザインパターン はじめに デザインパターンとは 特集の構成 すぐわかるオブジェクト指向 すぐわかるUML おわりに 第2章 逆引きカタログ ロジック編 Singleton (シングルトン) Factory/Factory Method (ファクトリ/ファクトリメソッド) Strategy (ストラテジ) Composite (コンポジット) Visiter (ビジタ) 第3章 逆引きカタログ J2EE編 Template Method (テンプレートメソッド) Facade (ファサード) ViewHelper (ビューヘルパ) DAO (Data Access Object) 第4章 逆引きカタログ その他 ユーティリティクラス 実行時例外を標準的に使う Nullオブジェクト 第5章 デザインパターン適用の勘所 はじめに アプリケーションの仕様 リファクタリング前のサ
数回にわたって動的計画法・メモ化再帰について解説してきましたが、今回は実践編として、ナップサック問題への挑戦を足がかりに、その長所と短所の紹介、理解度チェックシートなどを用意しました。特に、動的計画法について深く掘り下げ、皆さんを動的計画法マスターの道にご案内します。 もしあなたが知ってしまったなら――病みつきになる動的計画法の集中講義 前回の『アルゴリズマーの登竜門、「動的計画法・メモ化再帰」はこんなに簡単だった』で動的計画法とメモ化再帰を説明しましたが、前回の説明ではまだ勘所をつかめていない方がほとんどでしょう。そこで、これらを完全にマスターするため、今回はもう1つ具体例を挙げながら練習したいと思います。 どういった問題を採用するかは悩みましたが、非常に有名な「ナップサック問題」を取り上げて説明します。 ナップサック問題とは以下のような問題です。 幾つかの品物があり、この品物にはそれぞ
insertion sortは「挿入ソート」と訳される。(Wikipedia→ http://ja.wikipedia.org/wiki/%E6%8C%BF%E5%85%A5%E3%82%BD%E3%83%BC%E3%83%88 ) ■ 日本語版 Wikipediaの日本語のページのコードを引用すると次のようになっている。 for (i = 1; i < n; i++) { tmp = data[i]; for (j = i; j > 0 && data[j-1] > tmp; j--) { data[j] = data[j-1]; } data[j] = tmp; }上のコードでは、内側のループでinsertの必要がなかった場合でも最後にdata[j] = tmpでtmp変数をwrite backしており、しかも、insertの必要のなかった場合でもj=iが1回実行される。それらの意味に
プログラミング関連Blog 私の興味の端から端までをお届けします! 【免責事項】このサイトの情報は私の個人的な見解で、私以外の意見を代弁するものではありません。 【WPF】FrameworkElement.DataContextプロパティを無効にする方法 http://pro.art55.jp/?eid=1304213 前回は、DataContextに設定した値をクリアーし、親要素の値を再設定したい場合は、DependencyProperty.UnsetValueを設定するばよいという方法を紹介しましたが、今回はDataContextの値が変更されるタイミングを見ていきたいと思います。私の個人の意見としては、一度設定したDataContextの値を変えてしまうような実装は、WPFアプリケーションの設計としては、バグの元になりやすく、間違っていると思います。(伝搬して変更した子要素のData
6. 当時のゲーセン=ゲーマー交流の場 ● インターネットは無い時代 ● 情報伝達速度は今ほど早くは無い ● 「コミュニケーションノート」という雑記帳があった ● 馴れ合い、罵り合い、絵師の落書き etc... ● 今で言う掲示板 ● ノートを軸に常連客コミュニティが形成される 6 7. 熾烈なハイスコア競争が展開される ● 雑誌が全国のゲーセンのハイスコアを集計 ● 毎月全国TOPプレイヤを決定する仕組み ● 攻略法研究の遠方ゲーセン訪問が流行 ● 「遠征」という ● 他店の常連が遠征に来ると、スパられないよう(=スパイされな いようという意)ダンボール箱を被ってプレイする者が出現する ● エスカレートするスコア競争 ● スコアをめぐり、リアル抗争に発展する例も珍しくない 7
やねうらおさんによると、「広く知られているinsertion sortのコードは駄目すぎる」らしい。Wikipediaに載っているコード(2009.08.06版)を、 どこの馬鹿なアルゴリズムの教科書から引用してきたのかは知らないが、こんなものをサンプルとして掲載しないでもらいたい。 というのだから穏やかではない。 私の座右の書『コルメン』も、 一連の劣悪なコードはこいつが犯人かも知れない。 と非難されてしまっている。 実際のところ、どのくらいの性能差になるのか、実験してみた。 こんな感じ(codepad)。 C++の標準ライブラリ(std)のsortとWikipedia版、やねうらお版の比較。単位は秒。挿入ソートの2つ(つまりWikipedia版とやねうらお版)は、実行時間の比も計算した(1より小さい値はやねうらお版が速いことを意味する)。 size repetition std wik
分散KVS kumofs のコードは、全体で約2万行です。 そのうち、ネットワークI/Oやプロトコルに関するコードは約1万行で、全体の約半分を占めています。 並列イベント駆動I/Oフレームワーク「mpio」リリース ネットワークアプリケーションを実装する上で、もっとも大きな障壁は、ネットワークI/Oとプロトコルです。 では、それが両方ともフレームワークでサポートされ、コードを書く必要が無くなったらどうでしょうか? 54行で簡単な分散KVSを実装したり、140行で分散リアルタイム検索エンジンを実装することができます。すなわち、インデックス作成サーバ、検索サーバ、DBサーバなど、多数のサーバが連携し、スケールアウトの恩恵を得ることができるネットワークアプリケーションを、1台のホスト上で動作する並列アプリケーションとほぼ同じように書くことができます。 実装上の問題から解放されれば、並列性や耐障害
今まで買ってきた本の中で、iPhone開発者に オススメの本をご紹介。 とりあえずこれだけ持ってればなんとかなる。 iPhoneに関する本は、和書、洋書問わず買いまくってきた中からの選抜です。 読めばきっとその良さがわかるはずです。 自分が今書いてる本は、ここに載ってない内容も書いているので 是非買ってもらえるとうれしかったり。。。 そのまま使える iPhoneアプリプログラム 作者: 畑圭輔,岸川克己出版社/メーカー: 毎日コミュニケーションズ発売日: 2010/05/25メディア: 単行本(ソフトカバー)購入: 2人 クリック: 239回この商品を含むブログ (23件) を見る iOS4プログラミングブック 作者: 畑圭輔,加藤寛人,坂本一樹,藤川宏之,高橋啓治郎,沖田知彦,柳澤昇出版社/メーカー: インプレスジャパン発売日: 2011/01/27メディア: 単行本(ソフトカバー)購入
リリース、障害情報などのサービスのお知らせ
最新の人気エントリーの配信
処理を実行中です
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く