スキップしてメイン コンテンツに移動

投稿

6月, 2012の投稿を表示しています

ActionScript 3.0: Hit Youtube API

I wrote a tiny program for getting Youtube video information by hitting Youtube API in ActionScript 3.0. Some generic classes or methods might be missing but I think you can easily guess what they are doing and can add them easily yourself. Example Usage Ok, starting from the example usage. package utils.video { import flash.display.Sprite; import utils.file.SyncFileSaveDownLoader; import utils.ITaskProgressCounter; import utils.TaskProgressCounter; import utils.video.youtube.YoutubeAPI; import utils.video.YoutubeFLVURLGetEvent; import utils.video.youtube.YoutubeLocalCacheManager; import utils.video.youtube.YoutubeVideoEntryDispatcher; import utils.video.youtube.YoutubeVideoEntryEvent; public class Tester extends Sprite { private var downloader:SyncFileSaveDownLoader = new SyncFileSaveDownLoader(); private var youtubeLocalCacheManager:YoutubeLocalCacheManager = new YoutubeLocalCacheManager("c:\\temp\\youtube&qu

Webアプリケーション開発のためのリンク集

Webアプリケーション全般 OpenSpace : Webアプリの開発に関する非常に有用な情報が満載です! Webアプリケーション開発講座 WEB API 活用 WWWの基礎 とほほのWWW入門 http://x68000.q-e-d.net/~68user/net/ : ネットワークプログラミングを基礎から解説しています。 PHP phpthumb() : PHPでサムネイルを生成するためのソフトウェア cairo-php : PHPで画像処理をするためのCairo Graphics Libraryを利用した拡張モジュール Windows 7 で PHP の開発・実行環境を整える! :少し古い記事ですが、XAMPも含めて設定の仕方が書いてあるので参考になりました。 HTML Tag index : HTMLのタグについての解説サイト CSS Less : CSSをよりプログラムチックに扱うためのライブラリ。ただしLessファイルをCSSにコンパイルする必要があります。 Web API AmazonのProduct APIを使った開発については、 ここ が参考になります。私も早くチャレンジせねば。。。 Ruby Ruby Installer for Windows アクセスランキング解析 言わずと知れた Alexa のサイトです。 認証 Kerberos

PHP: Grouping Elements in Array by Specific Key Field

This is the code for grouping elements in array by specific key field of the element. Code <?php function groupBySpecificKey(array& $source, $key){ $map = array(); foreach($source as $elem){ $groupKey = $elem[$key]; if(is_null($groupKey)) continue; $map[$groupKey][] = $elem; } return $map; } Example $result = groupBySpecificKey($source, 'country'); var_dump($result); $source = array( array('id' => 1, 'name' =>'Joe', 'country' => 'China'), array('id' => 2, 'name' =>'Chris', 'country' => 'USA'), array('id' => 3, 'name' =>'Tod', 'country' => 'USA'), ); The result is below. array(2) { ["China"]=> array(1) { [0]=> array(3) { ["id"]=> int(1) ["name"]=> string(3) "Joe"