JavaScript is everywhere. It’s a key component of today’s Web—a powerful, dynamic language with a rich ecosystem of professional-grade development tools, infrastructures, frameworks, and toolkits. This book will get you up to speed quickly and painlessly with the 35 key JavaScript tasks you need to know. Part of the Pragmatic Guide series There are a number of JavaScript books on the market today,
A few days ago, Stijn Debrouwere has disclosed Extendables, an unprecedented open source framework for Adobe ExtendScript. So exciting! This project will interest many script developers, especially those dealing with InDesign. “If you're doing any serious scripting, Extendables will definitely make your life easier,” Stijn said. “It includes some of the newer Javascript 1.6+ Array methods like for
選択したテキストオブジェクトや検索結果のテキストオブジェクトが何ページにある?はよく使うのですが、そのページの何行目?ってどうやるんだろうってことでテストしてみました。レポートをリスト出力するときとかみんなどうやってるんだろう? 色々考えてみて、 対象テキストの最初 LineObject の index と、その親 TextObject がもっている LinesObject(s) のそれぞれの index を比較していって、マッチしたところが何行目じゃないかと。(もっと簡単な方法ありますか?) 親を取得するのに parent を使うと連結テキストフレームの最初から数えた行数をだすので、代わりに parentTextFrames[0] を使うとテキストフレームごとになるとか、表組では親が CellObject になるので parent を使うとか、そんなこんなで割とすぐ出来たのでメモ。全
Table of Contents Collections each, map, inject, detect, select, reject, all, any, include, invoke, pluck, max, min, sortBy, sortedIndex, toArray, size Arrays first, last, compact, flatten, without, uniq, intersect, zip, indexOf Functions bind, bindAll, delay, defer, wrap Objects keys, values, extend, clone, isEqual, isElement, isArray, isFunction, isUndefined Utility uniqueId, template Collection
ここのところ、サーバー側(Google App Engine)のコードはPythonで書き、クライアント側のコードはiPhone/iPad 向けはObjective-Cで、ブラウザー向けはJavaScriptで書く、という毎日が続いている私である。 それぞれの言語は難しくないのだが、さすがにこの3つを頻繁に行き来していると、pythonのコードに間違ってセミコロンを付けてしまったり、PythonとJavaScriptのどっちがTrueでどっちがtrueだか混乱したりする。 ちょうど昨日は、以前JavaScriptで書いたコード(写真をアップロードするコード)をObjective-Cに移植する機会があったのだが、とても分かりやすい結果が出たので、ここで比較してみる。 まずは元の JavaScript のコード。 SNBinder.get("/blob/create_upload", {},
The document discusses JavaScript patterns. It begins by introducing the author and their motivation for learning patterns. It then covers essential patterns around scope, literals and constructors, functions, and code reuse. It discusses the single var pattern, constructor functions, private members, and classical versus prototypal inheritance. The document is an educational guide to common JavaS
InDesignのドキュメントのフォントだけ収集するスクリプト。Package機能の一部を使い、使い方に応じて何通りかの動作をするようにしてみました。 対象ドキュメント(doc_select_mode) モード0:フォルダ選択してその中のinddドキュメントを対象 モード1:開いているドキュメントを対象にする(保存してない場合は保存を促す) フォントの保存先(save_dir_mode) モード2:ドキュメントと同じ階層にフォルダを作成し、その中のFontsフォルダに収集 モード4:デスクトップにドキュメント名+αのフォルダを作成、その中のFontsフォルダに収集 本当はsave_dir_modeのモード3として複数ドキュメントのフォントを一つのフォルダにまとめるというのをやりたかったのですが、あまりいい案が思いつかなかったので次回挑戦したい。(一時的にブックを作成してパッケージ、フォン
『スクリプト言語間における「lexical closure」の違い』の整理。 http://d.hatena.ne.jp/karasuyamatengu/20101008/1286568265 http://d.hatena.ne.jp/karasuyamatengu/20101007/1286477371 matz 2010/10/09 16:07 えーとですね。まだ、言語ごとにやってることが違うんですよ。 つまり、PerlとRubyはブロック内だけで毎回新しい変数localvarを作ってる(の で、closure間で変数を共有していない)のに対して、Python(関数レベルしかス コープがない)などはもっと広いスコープでlocalvarが有効でclosure間で同じ 変数を共有しています。localvarのスコープがループの中だけの言語 (Ruby,Perl)とclosuresとloc
► 2025 (2) ► 9月 (2) ► 2022 (2) ► 10月 (1) ► 2月 (1) ► 2021 (51) ► 11月 (2) ► 10月 (2) ► 9月 (4) ► 8月 (4) ► 7月 (4) ► 6月 (4) ► 5月 (3) ► 4月 (10) ► 3月 (7) ► 2月 (4) ► 1月 (7) ► 2020 (155) ► 12月 (7) ► 11月 (10) ► 10月 (8) ► 9月 (8) ► 8月 (11) ► 7月 (21) ► 6月 (19) ► 5月 (14) ► 4月 (20) ► 3月 (13) ► 2月 (10) ► 1月 (14) ► 2019 (293) ► 12月 (11) ► 11月 (12) ► 10月 (24) ► 9月 (29) ► 8月 (27) ► 7月 (36) ► 6月 (40) ► 5月 (24) ► 4月 (3
Update 2010-11-05: I dove into the JavaScript a little and explained most of it. Sam Stephenson tweeted that Chalk is written in CoffeeScript and compiled on the fly when served using Brochure. That's hot! (for those unaware Sam Stephenson works at 37signals, and is also the man behind Prototype.) 37signals recently released a blackboard web app for iPad called Chalk. It includes Thomas Fuchs new
iPhoneやAndroid用のネイティブアプリがJavaScriptで作れる「Titanium Mobile」がすごいらしいです Tweet 2010/10/29 金曜日 matsui Posted in 記事紹介・リンク | 3 Comments » iPhoneやAndroid用のネイティブアプリがJavaScriptで作れる「Titanium Mobile」がすごいらしいです。 私が知ったのはこのエントリーがきっかけです。 → kurainの壺 Titaniumが楽しすぎてやばい [d.hatena.ne.jp] さらに元ネタをたどるとnaoyaさんのブログでした。 → naoyaのはてなダイアリー Titanium – JavaScript で iPhone/Android アプリを作る [d.hatena.ne.jp] → naoyaのはてなダイアリー Titanium Mob
iPhoneのSafariブラウザでJavaScriptプログラムの作成、テストが出来る「jsCoder」が最近、iPadにも対応した様です。 記号のエリアで指を横にスライドして選択する事が可能で、小さいスペースにも関わらず間違いなく選択出来る優れたUIに成っています。記号をココで入力出来るため、ソフトキーボードを記号入力用のものに切り替える事無く入力可能でユーザの事を良く考えた素晴らしいUIだと思います。 web.desktop.life http://webdesktoplife.com/day/2010/10/25 こちらにアクセスすると使えます。 jsCoder http://files.stefanlh.de/public/jscoder/
先日買ったJavaScript: The Good Partsの第5章、 5.4 関数型クラスの記述がどうにも引っ掛かって、何か反証はないもんかと探してたんだけど、なんのことはない。 MDCの関数についての項目にちゃんとあった。 JavaScript には prototype という概念(というか考え方・実装)があって、 プロトタイプチェーンという方法で、要求されたプロパティを"そのオブジェクト自身"が持っていない場合、 "そのオブジェクトのプロトタイプ"に探しに行き、そこにもなければ"そのオブジェクトの親のプロトタイプ"に...と、 祖先がある限り遡って探し続けるようになっている。 いろいろと詳細は省いて、要するに、あるオブジェクトにメソッドを持たせようとする時に、 そのメソッドの実装方法は大きく2つあって、そのオブジェクト自身に直接持たせるように設計する場合と、 そのオブジェクトのプ
というJavaScriptのライブラリを作りました。 GitHub - monjudoh/ExDate: JavaScript Date class wrapper for using conbination with Date libraly which leads to prototype pollution. 何をするライブラリか ExDateというclassを定義しています。 やっていることは、インスタンスを作成すると同じコンストラクタ引数でDate objectを作成し、 内部に抱えて、Date objectのメソッドを呼ばれると処理を丸投げするだけです。 何が嬉しいのか Datejs(GitHub - datejs/Datejs: A JavaScript Date and Time Library)という大変使い勝手のいいライブラリがあるのですが、 Date,Date.pro
リリース、障害情報などのサービスのお知らせ
最新の人気エントリーの配信
処理を実行中です
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く