岡村 直樹(にゃるら)『輝かしい青春』なんて失なかった人。 2023年10月現在、アルバイトが退職となったので次に備えて待機中。 ※なおゲームのシナリオ・企画を担当された『にゃるら』さんとは別の人間です 略歴1988 年代の早生まれ。『輝かしい青春』なんて失なかった人。 2003 年代後半の高校生時代、自滅的にメンタルを病み、そこから 2023年 10月現在も治療中。 とはいえ 2019年 9月頃に N 高等学校を卒業し、 その後 2022年 8月から 2023年 9月末まで Web アプリケーションエンジニアとしてアルバイト就職をするなどした。 2023年 10月現在、次回の備えて精神科でリハビリに通う日々を送っている。 プログラミングスキルは 2005 年頃、 blosxom のために Perl を扱う事を通じて修得し、 そこから 2023年 10月に至るまで継続して腕を磨いている。
JavaScriptはプロトタイプOO言語ということで、インスタンスコピーによる継承とカスタマイズを用いるのが素直な方法なのだと思う。JavaScriptでは、単純にインスタンスを丸々コピーする方法では効率が悪いということで、 prototype による非対称スコープチェーンを用いる方法と、prototypeへのプロパティのコピーを用いる方法がよく用いられている。 しかしながら、サイトによって良い悪いがばらばらで、結局これらの方法のどれを使うのが良いのかよく分からなかったので、どういう違いがあるのか調べてみた。 prototypeスコープチェーンを操作 参考文書: http://faces.bascule.co.jp/inheritance.html プログラマのためのJavaScript (11):継承についてもう少し - 檜山正幸のキマイラ飼育記 (はてなBlog) [鏡] C/C++
UPDATE! Development progress for Animator.js: 14-Nov-2006: Removed the dependency on prototype.js 16-Nov-2006: Added more transitions - check out the new bouncy and elastic transitions 9-Dec-2006: Allow people to specify CSS class names in CSSStyleSubject. 18 March 2007: improvements to AnimatorChain: seekTo() method (thanks Tim Stone) and resetOnPlay option (thanks Kaspar Fischer); 19 March 2007:
<body> <h1>Prototype Window Classリファレンス</h1>
書き上げた後に元記事の続きが出ているのに気づいたが、方向性が違うようなのでそのまま掲載。 404 Blog Not Found:javascript - プロトタイプ的継承 (元記事: Prototypal Inheritance) より。継承という言葉は意味が広いので、この操作に対してはチャイルドの作成といったほうが個人的にはわかりやすい。 さて、元記事で紹介されているコードではプリミティブ値からのチャイルドの作成 (継承) ができなかった。これはなぜかといえば、オブジェクト作成の際、プリミティブ値をプロトタイプ ([[Prototype]] 内部プロパティ、__proto__ プロパティ) に設定することはできないからである。 そこで、プリミティブ値が渡された場合は、それをラッパオブジェクトに変換することにする。といっても場合分けの必要はない。Object 関数を使えば、プリミティブ値
最近、プロトタイプ的継承の話しが盛り上がっています。 http://blog.livedoor.jp/dankogai/archives/50662064.html http://labs.cybozu.co.jp/blog/kazuho/archives/2006/10/javascript_string.php http://blog.livedoor.jp/dankogai/archives/50662606.html 最終形がやたら複雑になっています でも、実際はあそこまで複雑に書かなくても、できると思います ^^; そう思う理由 P 関数は object 関数の中でローカルのものである。コンストラクタとして使える必要はない。なので、 Atomic な場合でも P は function(){} でいい。 method 関数では P.prototype のプロパティに関数が代入されて
2006年10月18日21:00 カテゴリLightweight Languages javascript - プロトタイプ的継承完全版 Kazuho@Cybozuさま、いつもありがとうございます。 Kazuho@Cybozu Labs: JavaScript の String 型を継承する 結論から言うと、String 型も継承っぽいことができます。こんな感じ。 おかげでプロトタイプ的継承モデルの完全版が出来ました。 AtomicなObjectを継承 これは、以下のように包括的に出来ます。 var Atomic = function(C){ var P = function(v){ this._v = v; }; P.prototype = new C; P.prototype.valueOf = function(){ return this._v.valueOf(); } P.pro
IE 以外のブラウザは HTML 要素(Element)の prototype がとれる prototype とはクラスの定義のようなもの。 具体的には 以下のようにとれる ブラウザ 方法 Opera HTMLElement.prototype Firefox HTMLElement.prototype OR document.documentElement.__proto__.__proto__ Konqueror (たぶんSafariも(情報求む)) document.documentElement.__proto__ prototype を書き換えるとそれと繋がるオブジェクトは全て書き換わる これはおもしろい。 例のごとく IE だけ取れないので 動作が違う関数はすべて IE に合わせてやればいいんじゃない!?(ヒラメキ!)と思った たとえば。。。 Ptototype.js の Ev
With so much discussion happening recently about the state of Prototype, it’s great to see some updates finally rolling in. Hopefully this is only the beginning of what’s to come. Here is the changelog as of around 7:00 CST: Make destructive Element, Form, and Form.Element methods return their first argument, so that multiple calls can be chained together. [sam] ex. $(“sidebar”).addClassName(“sele
Traversing the DOM can be a painful beast at times, but we can remove a lot of that pain by writing a simple set of iterators that will allow us to pick it apart at will. When you ask for the childNodes of an element, most of the time you’re just wanting the element nodes only and you’d like to completely ignore the text nodes. Using Prototype, you could write something like the code below: elemen
Love them or loathe them, JavaScript libraries are making a huge impact in the area of DOM Scripting. As AJAX matures, and the complexity of the scripts required to support its expanding use increases, it becomes much less feasible to produce custom code from scratch for every project. In addition, the growth of AJAX and the burgeoning interest in Web 2.0 applications is bringing many new people t
javascriptの”クラス”の作り方としていくつかの方法があるが function class1(){ } class1.prototype={ prop:1 }こういう書き方がある。なんだか記述量が減って素敵な気がするのだが function class2(){ } class2.prototype.prop = 1;実は、こういう作り方と微妙に違うのである。何が違うかというと、class1の方法の場合、本来受け継がれるべき暗黙のプロパティーが消されているのだ。 alert((new class1()).constructor); alert((new class2()).constructor);class1のconstructorはobject関数(組み込み)を返し、class2のconstructorはclass2関数を返す。 constructorは、そのオブジェクトが何のク
リリース、障害情報などのサービスのお知らせ
最新の人気エントリーの配信
処理を実行中です
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く