-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
241b0b8
commit 9b64cbb
Showing
172 changed files
with
2,829 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
"BrainF*ck" interpreter sample implementation by PHP. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
Acme_Hyde - Hyde Calculator | ||
[http://search.cpan.org/~nozzzzz/Acme-Hyde-0.04/] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
アイドルマスターのアイドルを管理します。 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
phpcon 2008 での takesako さんの一言から openpear への野望は始まった訳です。 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
PHPでAOPを可能とするライブラリです。 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
[http://auth.hatena.ne.jp/:title=はてな認証API]を利用する為のライブラリ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
こねこでコメントスパムを防ぐライブラリ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
WSSE認証のパッケージです。 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
IO_Bit に移行しました。 | ||
当パッケージは近々削除されます。 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
PHP5専用フレームワーク | ||
|
||
http://cassisorange.com/ | ||
|
||
09.02.12 ドキュメント追加しました |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
CSVファイル(ref:[http://www.ietf.org/rfc/rfc4180.txt:title=RFC4180])をイテレートするためのクラスです。 | ||
外国産の同様のクラスでは、fgetcsvを利用しているため文字エンコード周りで不具合があるのでその点を考慮したものを目指しています。 | ||
UTF-16でエンコードされたファイルにも対応しています。 | ||
|
||
|
||
CSV_Iterator allows to iterate CSV format(ref:[http://www.ietf.org/rfc/rfc4180.txt:title=RFC4180]) file. | ||
Using fgetcsv, some other similar packages has bugs related on character encoding. On the other hand, this package uses original code regarding multibyte encodings and UTF-16. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
10進数の数値を任意(HOGE)進数に変換します。 | ||
|
||
|
||
|
||
用途は下記を想定しております。 | ||
・連番のユーザーIDをそのまま表示したくない | ||
・AUTO_INCREMENT番号をURIなどで使用する | ||
・ユーザーごとに連番でないユニークなIDがほしい | ||
|
||
|
||
|
||
使用法・詳細等は下記より | ||
http://wiki.dinoz.jp/PHP%B4%D8%CF%A2/function/Code_HogeNumber.php/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
CyclicValueProducerは、指定された配列の値を循環的に出力するようなSPLイテレータです。 | ||
|
||
デフォルトではイテレータとして無限に動作し続けますが、上限値を設定することもできます。 | ||
|
||
|
||
* 何の役に立つのか | ||
|
||
- あまり実用的ではないと思います | ||
- IteratorAggregateインターフェースの典型的な実装例として | ||
-- 複数のイテレータの組み合わせに対して名前をつけたくなった場合に | ||
|
||
|
||
* サンプル | ||
|
||
>|| | ||
<?php | ||
|
||
require_once('CyclicValueProducer.php'); | ||
|
||
$it = new CyclicValueProducer(array('びんぼう','だいじん','おおだいじん'), 7); | ||
|
||
foreach ($it as $value) { | ||
echo $value, "\n"; | ||
} | ||
|
||
/* | ||
Results: | ||
びんぼう | ||
だいじん | ||
おおだいじん | ||
びんぼう | ||
だいじん | ||
おおだいじん | ||
びんぼう | ||
*/ | ||
||< | ||
|
||
|
||
* 依存関係 | ||
|
||
PHP5.1.0以降で利用できる、以下のSPLのイテレータクラスを利用しています。 | ||
|
||
|
||
- [http://www.php.net/~helly/php/ext/spl/classArrayIterator.html:title=ArrayIterator] | ||
- [http://www.php.net/~helly/php/ext/spl/classInfiniteIterator.html:title=InfiniteIterator] | ||
- [http://www.php.net/~helly/php/ext/spl/classLimitIterator.html:title=LimitIterator] | ||
|
||
|
||
* ソースコード | ||
|
||
[http://openpear.org/repository/CyclicValueProducer/trunk/src/CyclicValueProducer.php] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
serialize関数を利用した簡易データベースです。オブジェクトデータベースに似ているかもしれません。 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
和暦変換をするライブラリです。 | ||
Peal の Date::Japanese::Era をポーティングしたもの。 | ||
|
||
>|| | ||
<?php | ||
$era = new Date_Japanese_Era(array(2009, 7, 11)); | ||
echo $era->name; // 平成 | ||
echo $era->gengou; // name のエイリアス | ||
echo $era->year; // 21 | ||
echo $era->nameAscii; // heisei | ||
|
||
$era = new Date_Japanese_Era(array('平成', 21)); | ||
echo $era->gregorianYear; // 2009 | ||
||< |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
Db_Fixture はデータベース絡みのテストを行う際に設定したファイルからテストデータを読み込み、データベースに投入します。 | ||
|
||
|
||
必要な環境 | ||
-データベースへの接続には PDO を使用します。 | ||
-Fixture を記述するファイルには json 形式をサポートしています。 | ||
-PHP 組み込みの json を使用します。 | ||
|
||
|
||
テストコードを実行するにあたって | ||
-テストコードは lime にて記述しているので、 lime が必要です。 | ||
-データベースに、 test ユーザ(パスワードは testtest) を作成し、Create, Drop, Select, Insert Delete 権限を付与して下さい。 | ||
-データベースに test という データベースを作成して下さい。 | ||
-テストコードを実行すると、自動的に test1, test2 というテーブルを作成します。 | ||
-テストが完了すると、自動的に test1, test2 というテーブルは削除されます。 | ||
|
||
|
||
更新履歴 | ||
-2009/11/16 setPdo() を実装。Pdo オブジェクトを外部から注入可能にしました。 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
あとで書く |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
[http://diggin.musicrider.com/:title=Diggin]はスクレイピング&スパイダリングライブラリ群です。 | ||
|
||
[http://diggin.googlecode.com/svn/standard/trunk/:title=最新のソース(Google Code)] | ||
[http://code.google.com/p/diggin/source/list:title=更新履歴] | ||
[http://diggin.musicrider.com/manual/diggin.index.html:title=リファレンス] | ||
|
||
現在のコンポーネントは以下のとおりです。 | ||
*Diggin_Scraper | ||
Web::Scraperライクなスクレイピングを可能にします。 | ||
* Diggin_Service_Wedata | ||
WedataのAPI操作 | ||
* Diggin_Service_Tumblr | ||
TumblrのAPI操作 | ||
* Diggin_Tool | ||
Zend_Toolの拡張 | ||
* Diggin_Http_CookieJar_Loader | ||
CookieJarローダー | ||
* others | ||
Diggin_Http_Client_Adapter_SocketProgressBar, Diggin_Felica_Adapter_Sfcpeep, Diggin_CDDB_Application_CDex, Diggin_Console_Wizard | ||
... | ||
|
||
* Coming soon.. | ||
-- Diggin_RobotRules([https://github.com/sasezaki/Diggin_RobotRules:title=https://github.com/sasezaki/Diggin_RobotRules]) | ||
-- Diggin_WWW_Download(Download Framework kit) | ||
|
||
|
||
* Integration(他のライブラリとの統合について) | ||
- spizer(Zend Frameworkを用いたスパイダリングKit) | ||
[https://github.com/sasezaki/spizer:title=https://github.com/sasezaki/spizer] | ||
- Goute(Symfony2) | ||
[https://github.com/sasezaki/Goutte:title=https://github.com/sasezaki/Goutte] | ||
|
||
|
||
|
||
デモやテストコードは | ||
[http://diggin.googlecode.com/svn/standard/trunk/:title=http://diggin.googlecode.com/svn/standard/trunk] | ||
を参照ください。 | ||
|
||
|
||
Http通信を行うものについてはZend Framework(1.6以上)が必要です。 | ||
また、Diggin_Scraperを使うにはtidyモジュール・Net_Url2が動作することも望ましいです。 | ||
|
||
|
||
*不具合報告 | ||
[http://code.google.com/p/diggin/wiki/JapaneseComment:title=http://code.google.com/p/diggin/wiki/JapaneseComment] | ||
[http://code.google.com/p/diggin/issues/list:title=http://code.google.com/p/diggin/issues/list] | ||
まで |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
@depricate | ||
このパッケージは非推奨です。(2010/06/08) | ||
|
||
Diggin_Http_Response_Charsetに移行中です。 | ||
http://openpear.org/package/Diggin_Http_Response_Charset | ||
|
||
なお、Diggin 0.6ブランチではDiggin_Http_Response_Encodingを使っているため、Digginパッケージをお使いの方は、この非推奨以降への影響はありません。 | ||
|
||
|
||
|
||
|
||
---- | ||
HttpレスポンスからUTF-8へ自動変換を行うのを目的としたものです。 | ||
|
||
|
||
エンコードの取得はHttpレスポンスヘッダ、metaタグ、(mbstringが利用可能な場合)レスポンスボディの順に行います。 | ||
|
||
各レスポンスインスタンスから、getBodyされたときにUTF-8に自動変換するためのラッパーを用意しています。(現在はZend_Http_Responseのみ) | ||
|
||
*HTMLScraping Classをベースにしております。 | ||
|
||
|
||
参考コード: | ||
>|| | ||
$client = new Zend_Http_Client($url); | ||
$response = $client->request(); | ||
|
||
$wrapper = Diggin_Http_Response_CharactorEncoding::createWrapper($response); | ||
var_dump($wrapper instanceof Zend_Http_Response); //true | ||
var_dump($wrapper->getBody()); //UTF-8 | ||
||< |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
強欲にヘッダーやメタタグのContent-Typeや文字列から文字コードを推測し、レスポンスボディ(HTML)をUTF-8にエンコーディングします。 | ||
|
||
説明: | ||
http://d.hatena.ne.jp/sasezaki/20100627/p2 | ||
|
||
旧 Diggin_Http_Response_CharactorEncoding | ||
の強化版です。LGPL |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
Digginライブラリ((http://diggin.musicrider.com/))のスクレイパーでのアダプターの一つです。 | ||
ライセンスの関係上、HTMLScrapingライブラリ((http://www.rcdtokyo.com/etc/htmlscraping/)))から改変したものをこのパッケージにてまとめています。 | ||
|
||
Diggin_Http_Response_Charsetに依存します。 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
Ethna_Plugin_Debugtoolbar になりました。 | ||
|
||
このパッケージはもうメンテされていません。 | ||
|
||
|
||
-[http://openpear.org/package/Ethna_Plugin_Debugtoolbar] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
Ethna Debugtoolbar Plugin | ||
|
||
|
||
使い方などは以下参照。 | ||
-[http://d.hatena.ne.jp/sotarok/20090703/ethna_plugin_debugtoolbar_0_9_0:title=Ethna_Plugin_Debugtoolbar 0.9.0 をリリース] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
Ethnaで[http://hatotech.org/runemaster/:title=RuneMaster]テンプレートエンジンを使用するためのプラグインです。 | ||
RuneMaster自体は同梱されていないので上記サイトからダウンロードしてください。 | ||
|
||
*インストール方法 | ||
-RuneMaster本体をEthnaプロジェクトのlib以下に入れます。(lib/Rune/Master.phpという感じ) | ||
-[プロジェクト名]_Controller.phpのrequire_onceが沢山あるところに以下を追加してください | ||
>|| | ||
require_once 'Rune/Master.php'; | ||
require_once ETHNA_BASE.'/class/Renderer/Ethna_Renderer_RuneMaster.php'; | ||
||< | ||
-テンプレートをRuneMasterのフォーマットで書いてください。 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
[http://hyperestraier.sourceforge.net/:title=HyperEstraier] で使われるファイルフォーマットをパースします。 | ||
|
||
現在サポートされているファイルフォーマットは次の通り: | ||
- 文書ドラフト | ||
- estmaster から得られる検索結果 | ||
|
||
* 文書ドラフトをパースする例 | ||
>|| | ||
require_once('File/HyperEstraier/Draft.php'); | ||
$txt=file_get_contents('hoge.est'); | ||
$doc = new File_HyperEstraier_Draft($txt); | ||
echo $doc->getAttribute('@uri'); | ||
||< | ||
|
||
* 検索結果をパースする例 | ||
>|| | ||
require_once('File/HyperEstraier/SearchResult.php'); | ||
$txt=file_get_contents('http://192.168.2.1:1978/node/test/search?phrase=hogehoge'); | ||
$res = new File_HyperEstraier_SearchResult($txt); | ||
foreach($res as $r){ | ||
echo $r->getAttribute('@uri'); | ||
} | ||
||< | ||
|
||
* 背景 | ||
HTTP通信部分はcurl_multi_execなどによる並列化や冗長化が可能なので、その部分をライブラリに含めないことが重要でした。本ライブラリはファイルフォーマットに特化することで分離しています。 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
ギターのタブ譜を画像で出力するライブラリです。 | ||
画像生成には[http://www.php.net/manual/ja/book.image.php:title=GDライブラリ]を利用しています。 | ||
このライブラリは[http://search.cpan.org/dist/GD-Tab-Guitar/:title=GD::Tab::Guitar]にインスパイアされています。 | ||
それでは、簡単な使い方です。 | ||
|
||
|
||
インスタンス生成 | ||
>|| | ||
$gtr = new GD_Tab_Guitar(); | ||
||< | ||
|
||
|
||
コードを出力 | ||
>|| | ||
echo $gtr->chord('A7(#9)')->png(); | ||
||< | ||
|
||
|
||
指板を指定して出力 | ||
>|| | ||
echo $gtr->generate('Bb/A', '5x333x')->png(); | ||
||< | ||
|
||
|
||
JPEG、GIFの出力 | ||
>|| | ||
echo $gtr->chord('G')->jpeg(); | ||
echo $gtr->chord('G')->gif(); | ||
||< | ||
|
||
|
||
ファイルに出力 | ||
>|| | ||
$gtr->chord('G')->png('hoge.png'); | ||
||< | ||
|
||
|
||
その他の設定 | ||
>|| | ||
// 文字(ライン)の色をRGBで設定 | ||
$gtr->setColor(255, 0, 0); | ||
|
||
// 背景色をRGBで設定 | ||
$gtr->setBgcolor(200, 200, 200); | ||
|
||
// 背景の透過色設定をOFFにする | ||
$gtr->setInterlaced(false); | ||
||< | ||
|
||
|
||
全てのコードをファイルに保存する | ||
>|| | ||
foreach ($gtr->allChords() as $chord) { | ||
$gtr->chord($chord)->png("$chord.png"); | ||
} | ||
||< | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
Google サイトマップを作るコードをなんとかかんとか、簡単に作ることを目指す。 | ||
|
||
元エントリ。 | ||
|
||
http://d.hatena.ne.jp/takuya_1st/20090130/1233288765 | ||
|
||
で開発していたものをOpenPEARが面白そうなので、持ってきました。 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
このライブラリは、 | ||
- <link>タグからの外部CSS | ||
- <script></script>タグ内記述CSS | ||
- スクリプト上からの外部ファイル | ||
とかとかCSSファイル/記述を展開し、inlineのstyle要素に埋め込んでくれます。 | ||
|
||
これからどんどんupして行って、ケータイのHTML/CSSのバッドノウハウを吸収できる緩衝材になればいいなと思って作ってます。 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
CSSセレクタをXPathに変換します | ||
このライブラリは[http://search.cpan.org/dist/HTML-Selector-XPath/lib/HTML/Selector/XPath.pm:title=HTML::Selector::XPath]のPHP移殖版となります。 | ||
|
||
This library converts css selector to XPath. | ||
This is the PHP port of [http://search.cpan.org/dist/HTML-Selector-XPath/lib/HTML/Selector/XPath.pm:title=HTML::Selector::XPath] |
Oops, something went wrong.