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 | |
// PHPExcel_Cell::rangeBoundaries | |
var_dump(PHPExcel_Cell::coordinateFromString("A1")); // array("A","1"); | |
var_dump(PHPExcel_Cell::getRangeBoundaries("A1:Z1")); // array( array("A","1"),array("Z","1") | |
var_dump(PHPExcel_Cell::rangeBoundaries("A1:BA1")); // array( array(1, "1"),array(53, "1")) | |
var_dump(PHPExcel_Cell::rangeBoundaries("B2:BA3")); // array( array(2, "2"),array(53, "3")) | |
var_dump(PHPExcel_Cell::rangeBoundaries("AF10")); // array( array(32, "10"),array(32, "10")) | |
var_dump(PHPExcel_Cell::rangeDimension("A1:BA1")); // array( 53, 1 ) | |
var_dump(PHPExcel_Cell::rangeDimension("B2:BA3")); // array( 52, 2 ) | |
var_dump(PHPExcel_Cell::splitRange("A1:BA1,AF2")); // array( array("A1","BA1"), array("AF2") ) |
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 | |
/** | |
* セルの書式を指定位置にコピーする | |
* @param $from_cells コピー元のセル範囲 | |
* @param $to_cell コピー先の左上のセル | |
* @param $copycount コピーを繰り返す回数(下へコピーするのみ) | |
*/ | |
public function copy_cells_format($from_cells, $to_cell, $copycount=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 | |
public function set_value_with_style($pCoordinate = 'A1', $pValue = null, $sheet = null) { | |
$save_cell = 'A1'; // よっぽどA1に値が入っていることはないと想定してA1にスタイルを退避させる | |
if($sheet == null) $sheet = $this->current_sheet; | |
// A1セルに一旦スタイルを保存してから値を設定する | |
$sheet->duplicateStyle( $sheet->getStyle( $pCoordinate ), $save_cell ); |
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
body { | |
background-image: linear-gradient( | |
0deg, | |
#e7f5fb 25%, | |
#ddf1fa 25%, #ddf1fa 50%, | |
#e7f5fb 50%, #e7f5fb 75%, | |
#ddf1fa 75%, #ddf1fa | |
); | |
} |
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
# MKLINK [[/D] | [/H] | [/J]] [リンク先] [リンク元] | |
# /D シンボリック・リンク | |
# /H ハードリンク | |
# /J ジャンクションリンク |
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
mysql -h 127.0.0.1 -u aaXXXXXXX -p |
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
# hogehoge.tar.gzという名前でhogeフォルダを圧縮する | |
tar cvzf hogehoge.tar.gz hoge | |
# hogehoge.tar.gzを解凍する | |
tar vxzf hogehoge.tar.gz |
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
mysqldump -h 127.0.0.1 -u USERNAME -p DBNAME > dump.sql |
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 | |
/** | |
* ユーザアーカイブページにコメント機能を付けたくて実装してみた。 | |
* 特定権限のユーザならば、コメント専用投稿タイプの記事を1記事だけ追加する。 | |
* ユーザ削除時にはその記事を削除するという動きをしてます。 | |
* ただ、結局この機能は実装しなくなったので詳細の詰めがもっと必要だと思います\(^o^)/ | |
*/ | |
// 権限チェック関数 | |
function oc_is_member($authorid) { | |
return user_can($authorid, "gold_member") || user_can($authorid, "free_member"); |
OlderNewer