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
$config = array( | |
'appId' => APPID, | |
'secret' => SECRET | |
); | |
$facebook = new Facebook($config); | |
$facebook->setExtendedAccessToken(); | |
$longToken = $facebook->getAccessToken(); |
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
class Controller_Base extends Controller_Template | |
{ | |
public function before() | |
{ | |
parent::before(); | |
//header.phpをテンプレートの$headerとbindさせる。 | |
$this->template->header = View::forge('parts/header'); | |
//footer.phpをテンプレートの$footerとbindさせる。 | |
$this->template->footer = View::forge('parts/footer'); | |
} |
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
<script type="text/javascript" src="http://localhost/fuelphp/assets/js/test.js?1398130262"></script> | |
<script type="text/javascript" src="http://localhost/fuelphp/assets/js/hello.js?1398130262"></script> |
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
* Set this to 'index.php if you don't use URL rewriting | |
*/ | |
- //'index_file' => false, | |
+ 'index_file' => false, |
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
class Board { | |
String board() { | |
StringBuffer buf = new StringBuffer(); | |
for (int i = 0; i < 10; i++) { | |
for (int j = 0; j < 10; j++) { | |
buf.append(data[i][j]); | |
} | |
buf.append("\n"); | |
} | |
return buf.toString(); |
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
C:\xampp\htdocs\PhpProject1>php ./single.php | |
1 | |
string(1) "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
<?php | |
//テスト配列 | |
$array = array('test1', 'test2', 'test1', 'test3', 'test2', 'test'); | |
//配列で重複している物を削除する | |
$unique = array_unique($array); | |
//キーが飛び飛びになっているので、キーを振り直す |
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
# /etc/anacrontab: configuration file for anacron | |
# See anacron(8) and anacrontab(5) for details. | |
SHELL=/bin/sh | |
PATH=/sbin:/bin:/usr/sbin:/usr/bin | |
MAILTO=root | |
# the maximal random delay added to the base delay of the jobs | |
RANDOM_DELAY=45 | |
# the jobs will be started during the following hours only |
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
//emailの入力の検証 | |
$val->add('email', 'email') | |
->add_rule('required') | |
->add_rule('match_field','email_re'); | |
//emailの確認用の入力の検証 | |
$val->add('email_re', '確認用') | |
->add_rule('required'); | |
//バリデーションメッセージは下記で設定。param: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
//$list = array(5, 50, 56); | |
$list = array(50, 2, 1, 9); | |
usort($list, 'comp'); | |
echo '<pre>'; | |
print_r(implode('', $list)); | |
echo '</pre>'; | |
function comp($int1, $int2) { | |
$str1 = (string)$int1; |
OlderNewer