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
Converted about PHP files from dos format to unix format: | |
for file in $(find . -name *.php); do dos2unix $file; done; | |
Expanded all multi-line use statements. | |
for file in $(find . -name "*.php"); do php -r 'file_put_contents($argv[1],preg_replace_callback("(use (\s*[a-zA-Z0-9\\\\]+(\s*as[\sa-zA-Z0-9]+)?[,;])+)",function($m){return preg_replace("(,\s*([^,;]+))",";\nuse \\1",$m[0]);},file_get_contents($argv[1])));' $file; done; | |
Removed all trailing whitespaces. |
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
sudo add-apt-repository ppa:ondrej/php5 | |
sudo apt-get update | |
sudo apt-get install php5 |
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
/** | |
* @Inject | |
*/ | |
public function __construct(HttpRequest $request) | |
{ | |
$this->request = request; | |
} | |
/** | |
* @PostConstruct |
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
sudo cp /usr/local/mysql/support-files/my-huge.cnf /etc/my.cnf |
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
# | |
# Use name-based virtual hosting. | |
# | |
NameVirtualHost *:80 | |
# | |
# VirtualHost example: | |
# Almost any Apache directive may go into a VirtualHost container. | |
# The first VirtualHost section is used for all requests that do not | |
# match a ServerName or ServerAlias in any <VirtualHost> block. |
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
/Applications/eclipse/Eclipse.app/Contents/MacOS/eclipse -initialize | |
/Applications/eclipse/Eclipse.app/Contents/MacOS/eclipse -clean & |
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
/** | |
* @Inject | |
*/ | |
public function setSession(Session $session) | |
{ | |
$this->session = $session | |
} | |
@Injectで受け取るこのコードはtraitにする。 | |
利用コードはこのように |
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
1) AI programing in PHP | |
IDS/BFS/IDDFS/A*(A star)等AI探索プログラムの基礎をPHP組み込みのDLL(双方向リンクスト)クラスを使った例で紹介します。 | |
PHPは競技プログラミングに最高最適の言語ではないかもしれませんが十分に楽しめます。 | |
2) パフォーマンス指向アーキテクチャ | |
パフォーマスは機会であり、コストであり、またユーザー体験です。 | |
Webアプリケーションのパフォーマンス改善を実装レベルではなく、アプリケーションアーキテクチャレベルでPHP/HTTP双方を対象に考察します。 |
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
/** | |
* Determines if an array is associative | |
* | |
* @param array $array Array to check | |
* | |
* @return bool | |
*/ | |
private function isAssoc(array $array) | |
{ | |
return (bool) count(array_filter(array_keys($array), 'is_string')); |
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
drop this file onto dropins folder. | |
http://www.eclipse.org/downloads/download.php?file=/tools/pdt/updates/2.2/milestones/plugins/org.eclipse.php.ui_2.2.1.v20101001-2300.jar | |
restart eclipse option with -clean | |
that's it. |