IBM Developer is your one-stop location for getting hands-on training and learning in-demand skills on relevant technologies such as generative AI, data science, AI, and open source.
FileSaver.jsはクライアントサイドでデータを生成しダウンロードするJavaScriptライブラリです。 Webアプリケーションが増える中、Webブラウザ上で作ったコンテンツをそのままエクスポートする時に使えるライブラリがFileSaver.jsです。 まず画像を保存するデモです。 こんな感じに適当にマウスで文字を書きます。 ファイル名をつけて保存ボタンを押すと保存が実行されます(ウィンドウ下部にダウンロードファイルがあります)。 ダウンロードされたファイルです。内容が動的に生成されているのが分かります。 同様にテキストの保存もできます。 テキストファイルの内容も動的です。UTF-8で作成されます。 HTMLファイルの保存もできます。 FileSaver.jsはコンテンツをCanvasタグにレンダリングし、それをダウンロードしているようです。HTML5対応ブラウザに限定されますが、
There are three ways to read a binary file from the browser. The first one is to download the file through XHR with charset=x-user-defined. You get the file as a String, convert it to byte Array and you have to rewrite all the decoding and encoding functions (getUint16, getFloat32, ...). All the browsers support this. Then browsers that implemented Canvas also added CanvasPixelArray as part of Ima
Whether we like it or not, more and more developers are being introduced to the world of JavaScript through jQuery first. In many ways, these newcomers are the lucky ones. They have access to a plethora of new JavaScript APIs, which make the process of DOM traversal (something that many folks depend on jQuery for) considerably easier. Unfortunately, they don't know about these APIs! In this articl
Badass JavaScriptA showcase of awesome JavaScript that pushes the boundaries of what's possible on the web, by @devongovett. Ever spent hours in PhotoBooth just playing around with the cool live video filters and effects? Now you can do that in your browser as well thanks to Paul Neave’s cool HTML5 video effects demo! While you can’t yet use an actual webcam and perform the effects on your own i
JsTemplate ã¯ã©ã¤ã¢ã³ãå´ãã³ãã¬ã¼ã ã·ã¹ãã ãã¼ã ããã¥ã¡ã³ã ãã¦ã³ãã¼ã ã¹ã¿ã¼ã ã¬ã¤ã ã¯ã¤ã㯠ãµã³ãã«ã«ç®ãéãã¾ãã æ¹æ³ãåç §ãã¾ãã JsTemplate ã使ç¨ããªãããå¦çå½ä»¤ãªãã¡ã¬ã³ã¹ãåç §ãã¾ãã JsTemplate ã«ã¤ã㦠JsTemplateï¼ç縮形㯠Jstï¼ã¯ãã¯ã©ã¤ã¢ã³ãå´ã§ HTML ãã³ã
Engineer @ Google. Working on Chrome & the web. Github: github.com/ebidel | Twitter: @ebidel I’ve been using App Engine for many years to develop web apps at Google. Most of the open source projects I’ve worked on use it for its simplicity and scalability. A couple of examples are the Google I/O web app, the Chrome team’s Chromestatus.com, Polymer’s site, developers.chrome.com, and WebFundamentals
2011年12月18日15:30 カテゴリLightweight Languages javascript - Function.prototype.bindを無理矢理捕縛してみた +1。 Function.prototype.bindは何がいいのか - 枕を欹てて聴く というわけでFunction.prototype.bindは単なる簡単な追加機能とか補足みたいなのじゃなくて, 凄まじい新機能(call, applyに匹敵)で, かつ非常に奥が深いのでした. なのにSafariとiOSとAndroidでサポートしてないなんて。あんまりだよ、こんなのってないよ。 Prototype.jsにあった、ような… Prototype.jsのころはこんな感じでした。 var oBind = Function.prototype.bind; /* preserve the original */ Fu
Zlib You can access this module with: var zlib = require('zlib'); This provides bindings to Gzip/Gunzip, Deflate/Inflate, and DeflateRaw/InflateRaw classes. Each class takes the same options, and is a readable/writable Stream. Examples # Compressing or decompressing a file can be done by piping an fs.ReadStream into a zlib stream, then into an fs.WriteStream. var gzip = zlib.createGzip(); var fs =
最近またLocal Player (Chrome Player)を実装しなおしています. 一応説明しておくと, Local Playerは, 完全にローカルで動作する音楽プレイヤーです. シンプルさを求め(実装がめんどくさいだけ), 操作しやすく(これは大事), 良い感じのプレイヤーです. 半年前に, ソースコードがスパゲッティになって, 開発を中断していましたが, 最近また書きなおし始めたのです. 音楽プレイヤーをブラウザー上で実装するのには, 音楽ファイルをJavaScriptで読み込まなければなりません. そこでHTML5ですよ!!! <audio src="url/to/musicfile.mp3" type="audio/mp3" /> みたいな感じで, 音楽を再生できます. 詳細は他のページに譲ります. さて, 音楽ファイルを再生するには, ローカルファイルからurlをaudi
米Yahoo!がJavaScriptフレームワーク「Mojito」と、Node.jsのホスティング環境「Manhattan」発表。同一コードをブラウザ、サーバ、iOSアプリで実行可能 JavaScriptでアプリケーションを1つ書けば、それがPCでも、クラウドでも、モバイルデバイスでも動作する。米Yahoo!が発表した「Cocktails」(カクテル)が実現するのは、すべてをWeb標準で実現したクロスプラットフォーム/クロスデバイスのアプリケーション環境です。 マルチプラットフォームを実現する「Mojito」 Cocktailsの核となるのが、JavaScriptフレームワークの「Mojito」(モヒート)。 Mojitoベースのコードは、ブラウザでもサーバでも動作すると説明されています。 With Mojito, developers will no longer have to wri
twihelp.me 2019 Copyright. All Rights Reserved. The Sponsored Listings displayed above are served automatically by a third party. Neither the service provider nor the domain owner maintain any relationship with the advertisers. In case of trademark issues please contact the domain owner directly (contact information can be found in whois). Privacy Policy
jQuery Templatesプラグインが面白い jQuery TemplatesプラグインはjQuery公式のテンプレートエンジンです。元々マイクロソフトのASP.NET Ajax Libraryで実装されていた機能を切り出したものらしい。 jQuery Templates, Data Link, globalization が公式 jQuery プラグインに加わりました - THE TRUTH IS OUT THERE - Site Home - MSDN Blogs 現在は1.0.0pre。そろそろ出るjQuery 1.5には標準で入る模様です。preですがマイクロソフトのCDNが利用出来ます。 配列を渡すと自動的にループして出力されるなど、JSONをそのまま渡して動くように意識されているところが面白いと思いました。 <ul id="name-list"></ul> <script
と呟いていたら、 id:caisui さんが と教えてくれた。 広範囲にイベントを取得して、イベント発生元がどの要素に含まれるかで処理を変えたい時があって、そんな時は親ノードを辿って調べるという面倒なことをしていた。これとはおさらばしたいということで、compareDocumentPositionについて調べてみた。 Node.compareDocumentPosition - MDC Doc Center The return value is a bitmask with the following values: DOCUMENT_POSITION_DISCONNECTED = 0x01; DOCUMENT_POSITION_PRECEDING = 0x02; DOCUMENT_POSITION_FOLLOWING = 0x04; DOCUMENT_POSITION_CONTAINS
button + onclick a + onclick + return false; a + onclick + javascript:void(0); span + onclick span + onclick + tabindex span + onclick + tabindex + onkeypress span + onclick + tabindex + key event span + onclick + tabindex + key event + role
nodejitsu.com 2010.9.24のエントリ jsdom + jQuery in 5 lines with node.js node.jsでスクレイピング jsdom使うと取得したhtmlへDOMが使えるようになる 慣れ親しんだjqueryのセレクターapi使ってスクレイピング request/http-agentモジュール使って標準モジュール(=http)だけで書くよりもコードすっきり という内容のエントリ サンプルコード修正しないと動かない 以下斜め読んだ内容 スクレイピング たいていの言語がライブラリ色々用意されてる Ruby hpricot nokogiri Python beautiful-soup scrapy Perl pQuery PHP PHP DOM バグなくhtml/css/javascriptをハンドリングするのが難しい サーバーサイドjsにおけるスクレ
This video is the second in a series of videos for the Google HTML/CSS/Javascript from the Ground Up class. Are you looking for a basic understanding of how UIs are created on the web or do you want to brush up outdated UI development knowledge? Or maybe you'd like to learn more about the medium you're designing for and gain basic tools for prototyping designs? Do you want a better understanding
Hey there, it looks like you're using Microsoft's Internet Explorer. Microsoft hates the Web and doesn't support HTML5 :( To play this game you need a good Browser, like Opera, Chrome, Firefox or Safari. Jump: X, Shoot: C, Move: Arrow Keys Browser Compatibility Opera 10.61:Perfect Safari 5.0 (Mac):Perfect Firefox 4 Beta 3:Perfect Firefox 3.6:Sound issues; slow Chrome 7:Sound issues IE 9 Preview:So
Speeding up JavaScript: Working with the DOM Author: KeeKim Heng, Google Web Developer When working with Rich Internet Applications, we write JavaScript that updates the page by changing elements or adding new ones. This is done by working with the DOM, or Document Object Model, and how we do this can affect the speed of our applications. Working with the DOM can cause browser reflow, which is the
リリース、障害情報などのサービスのお知らせ
最新の人気エントリーの配信
処理を実行中です
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く