The JavaScript InfoVis Toolkit provides tools for creating Interactive Data Visualizations for the Web.
The JavaScript InfoVis Toolkit provides tools for creating Interactive Data Visualizations for the Web.
昔から買い続けた雑誌や書籍に部屋を侵略され続けて早○年。いい加減部屋を広げなければならないと、一念発起してドキュメントスキャナと裁断機を購入して、せっせと雑誌を裁断 → ドキュメントスキャナでPDF化にいそしんでます。 おかげで今月もAmazonの請求が7万を超えてしまいました。こんにちはtodaです。 さて、最近仕事でJavaScriptを書く機会が増えましたが、PHPなどの(まがりなりにも)クラスベースのオブジェクト指向言語とは似て非なるところが多くて、その挙動の違いに驚かされます。 今回はJavaScriptを書いていて、ハマったポイントとその解決法をを紹介します。 JavaScriptで、あるクラスを作っていて、そのメソッド内でAjax.Reuqest()で通信した結果をオブジェクトの変数に格納したいことがあります。 以下のPersonクラスはコンストラクタで名前を受け取り、身長を
文字列操作の比較表: Ruby, Python, JavaScript, Perl, C++ Ruby, Python, JavaScript, Perl, C++ の文字列操作の比較表を作りました。配列操作の比較表の続編です。間違いなどがあったらご指摘いただけると助かります。 Ruby (String) Python (str) JavaScript (String) Perl C++ (std::string)
HTML Drag and Drop APIDataTransferConstructorDataTransfer()Instance propertiesdropEffecteffectAllowedfilesitemstypesInstance methodsaddElement() Experimental Non-standard clearData()getData()setData()setDragImage()Related pages for HTML Drag and Drop APIDataTransferItemDataTransferItemListDragEvent The DataTransfer object is used to hold any data transferred between contexts, such as a drag and dr
先日公開した「投稿スラッグ(Post slug)が空白なら警告してくれるWordPress用Greasemonkeyスクリプト」を開発しているときに、JavaScriptでのイベントのキャンセルまわりで見事にハマってしまいました。そのときに調べてわかったことをまとめてみようと思います。(間違いがあれば是非ご指摘ください!) やりたかったこと WordPressの投稿画面で「公開(Publish)」ボタンをクリックしたときに、「投稿スラッグ(Post slug)」のテキストボックスに値が入っていなければ、確認ダイアログを出す。そこで「キャンセル」ボタンが押されたら、フォームの submit を中止する。 最初に思いついた方法 まず頭に浮かんだのは、submit ボタンに対して HTML でイベントハンドラを記述するという、とても古典的な方法でした。
前回の記事に以下の質問がありました。 質問なのですがバイナリデータはsendでは送れないのでは? 自分も同じようなことをしているのですがFireFox限定のsendAsBinaryでないと無理でした。 どのようにして転送してるのでしょうか? えーと。。。(・Θ・;)。。。あの、その。。。うかれててサーバ側を考えてませんでした。すみませんm(_ _)m ■クライアント側のコード 前回のコードとおなじ。 function dragStart(e){ //e.preventDefault(); } function dragEnter(e){ //e.preventDefault(); } function dragOver(e){ e.preventDefault(); } function drop(e){ var files = e.dataTransfer.files; for(var
Previously I experimented with drag and drop file upload with Google Gears. Recently FireFox 3.6 (codenamed Namoroka) was the first to implement File API. It enables JavaScript to interact with local files. Correction: Ionut G. Stan pointed out that File API was actually available already in FireFox 3.0. What Namoroka introduced is the drag and drop interface for the files. Sorry for the confusion
The CSS Ninja is a personal blog and playground where I can put my skills and ideas out into the public. 5以降のバージョンのChromeを使っているのであれば、Gmailにおけるファイルのアップロードやダウンロードは、デスクトップ間でのドラッグ&ドロップで操作できる。こうした機能を実現するには、これまではエクステンションやプラグインのインストールが必要だった。ChromeではJavaScriptとHTMLのみでこうした機能を実現できる。 Gmail、ドラッグ&ドロップで添付ファイルのダウンロードが可能に Gmail、メール文中の画像挿入がドラッグ&ドロップで可能に Gmail、ドラッグ&ドロップでファイル添付が可能に もっとも最近Gmailに追加された機能はドラッグ&ドロップによるファ
はじめに JavaScriptはオブジェクト指向言語です。しかし、そのオブジェクトの性質は、他に良く知られているオブジェクト指向言語のJavaやC++と大きく異なっています。 そこでこの記事では、なぜそのような違いがあるのか、JavaScriptにおけるオブジェクト指向の言語思想を見ていくと共に、その違いの根幹であるプロトタイプについて解説していきたいと思います。 なお、この記事はJavaScriptの解説ですが、その内容は、標準仕様のECMAScriptで扱われる範囲に基づいています。従って、同じくECMAScriptを元にしている言語(JScript、ActionScript)でも通じる内容になっています。 対象読者 プログラミングの基本的な知識、ならびにオブジェクトやメソッドと言った基礎的な概念については、ここでは解説しません。最低限、オブジェクト指向プログラミングについて理解をして
De vorige eigenaar van de website had hier een JSON Editor, met de volgende boodschap. “This editor allows for easy editing of json strings, after loading a sample from the dropdown list click ‘build tree’, expand the tree, click nodes and start changing! Also try the xml2json functions for quickly converting xml to json.” Je kunt de oude hier nog in werking zien: https://web.archive.org/web/20150
Developer's Guide Version 2.0 Protocol Basics Protocol Reference Common Elements Version 1.0 Protocol Basics Protocol Reference Common Elements JSON Alt Type Batch Processing More Resources Authentication Overview ClientLogin OAuth AuthSub Using AuthSub In JavaScript In ActionScript Client Library Using JavaScript Resumable Upload Using the JavaScript Client Library (v2.0) This document describes
Javascriptで優れたインターフェースを実装したい。 そんなあなたにおすすめなのが、『75 (Really) Useful JavaScript Techniques』。まじで使えるJavascriptライブラリ75選だ。 以下にいくつかご紹介。 » Lightview スムーズに画像を拡大してくれる » FancyUpload アップロード中のプログレスを表示してくれる » SWFObject Javascriptを使ったFlashプレーヤ » JavaScript tabifier 簡単にJavascriptで切り替えられるタブインターフェースが作れる » FancyZoom 1.1 簡単なエンベッドでスムーズに画像を拡大してくれる » SimpleModal オーバーレイするクールなモーダルダイアログ » A Mac OS X-style Dock In JavaScript
最近気づいたんですが、jQuery.dataが結構便利だと思うので紹介してみたいと思います。 (function($) { var name_space = 'name_space'; $.fn[name_space] = function(options) { var elements = this; var settings = $.extend({ }, options); elements.each(function() { var t = this; $.data(t, name_space, {}); $(t).hover(function () { var obj = $.data(this, name_space); obj.status = 'over'; $.data(self, name_space, obj); }, function () { var obj =
無名関数のメリット 前回の記事では、無名関数を関数リテラルに割り当てるという操作を紹介した。なぜ、このような記法により関数を定義するのだろうか。 まず、無名関数を採用するメリットには、「命名する必要の無い関数をシンプルに記述できる」「(複数ファイルのJavaScriptライブラリを読み込んでいるときなどにおいて)、既存の関数/変数名との衝突を回避できる」という点が挙げられる。 前回の冒頭で述べた通り、JavaScript関連ライブラリが数多く存在し、多くのシーンでそれを活用している今日、既存のライブラリやソースコードと名前が衝突しない事がどれだけ重要であるかは想像に難くないだろう。 それでは、命名する必要の無い関数とはどのようなものだろうか。また、無名関数だと変数名の有効範囲はどのように決まっているのだろうか。ここで、前回に引き続きFirebugで以下のコマンドを実行し、動作を確認してみよ
「商業利用もOK! Google Mapsについて知りたいこと」に続くGoogle Mapsインタビューの後編は、数多く存在するGoogle Maps関連のAPIや機能のうち、あまり知られていないものや新しいものをグーグルのソフトウェアエンジニア、淺川浩紀さんに聞いた。 Code Playgroundでオンライン編集 まずは、即効性のあるものからいこう。 Googleが持つ多くのAPIは、Webブラウザ上からJavaScriptによって呼び出せる。JavaScriptはコンパイルの手順なしに書けば実行できるので手軽である。しかし、だからAPIを試すのも簡単だとは限らない。例えば、Google Maps APIなら正しいGoogle Maps APIキーを用意したり、適切な文書にプログラムを埋め込んだりする作業を行い、それをWebブラウザで開かねばならない。
リリース、障害情報などのサービスのお知らせ
最新の人気エントリーの配信
処理を実行中です
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く