-
現場ニート約2週間で遊んでるのも辛くなってきたのでなにか勉強しようかなと思った。
-
経緯は忘れたけどLaravelというPHPフレームワークの存在を知った。(たぶんいつものはてブ巡回だと思う)
-
そういえばPHPフレームワークって前の案件でちょろっとZendFrameworkをちょっと使っただけでちゃんと使ったこと無い
- じゃぁ勉強してみるか?
- ていうかPHPフレームワーク大杉カオス
- じゃぁ勉強してみるか?
-
Laravel
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
<?php | |
class photosetToWordress { | |
/** APIキー */ | |
private $apiKey; | |
/** photosetのID */ | |
private $photosetId; | |
/** cache消去の有無 */ | |
private $cacheClear; | |
/** cacheの保存先 */ |
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
SELECT | |
* | |
FROM | |
table_a | |
LEFT OUTER JOIN | |
table_b | |
ON | |
(a_item_id = b_item_no and a_code = concat(b_x, b_y, b_z)) | |
WHERE | |
b.item_no IS NULL; |
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
SELECT | |
-- ↓先頭から1つ目の_の前まで | |
SUBSTRING_INDEX(product, '_', 1) as p1, | |
-- ↓先頭から2つ目の_の前までから、1つ目の_の前まで+_を''(空文字)に置き換えたもの | |
SUBSTRING(REPLACE(SUBSTRING_INDEX(product, '_', 2), SUBSTRING_INDEX(product, '_', 1), '') FROM 2) as p2, | |
-- ↓先頭から3つ目の_の前までから、2つ目の_の前まで+_を''(空文字)に置き換えたもの | |
SUBSTRING(REPLACE(SUBSTRING_INDEX(product, '_', 3), SUBSTRING_INDEX(product, '_', 2), '') FROM 2) as p3, | |
-- ↓先頭から4つ目の_の前までから、3つ目の_の前まで+_を''(空文字)に置き換えたもの | |
SUBSTRING(REPLACE(SUBSTRING_INDEX(product, '_', 4), SUBSTRING_INDEX(product, '_', 3), '') FROM 2) as p4 | |
FROM ( |
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
/* | |
<javascriptresource> | |
<name>一括比較明合成 for 20141214</name> | |
<type>automate</type> | |
<about>特定フォルダー内の画像を比較明合成する。ついでにタイムラプス動画用のシーケンス画像も書き出し。</about> | |
<enableinfo>true</enableinfo> | |
</javascriptresource> | |
*/ | |
/* | |
* TODO: ファイル名周りの整備(連番の桁数) |
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
<?php | |
/** | |
* array_unshift()とarray_reverse()はどっちが速いか? | |
* ま、やらなくてもわかってるんだけどさ。 | |
*/ | |
$LOOPCOUNT = 100000; | |
echo "----- array_unshift() -----" . PHP_EOL; |
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
<?php | |
// config ----- | |
$strArr = array( | |
'requestInfo', | |
'memGet', | |
'memGetInfo', | |
'apiInfo', | |
'memSetInfo', | |
'resInfo', |