This file contains hidden or 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 | |
// {APP}/controllers/exapmle_controller.php | |
class ExampleController extends AppController { | |
var $name = 'Example'; | |
var $uses = null; | |
function index() { | |
// 1. ClassRegistryでUserモデルを生成します。 | |
$User = ClassRegistry::init('User'); |
This file contains hidden or 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
function print(s) { WScript.Echo(s) } |
This file contains hidden or 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
Name Value Value(binary) | |
---- ----- ------------- | |
None 0 00000000000000000000000000000000 | |
LButton 1 00000000000000000000000000000001 | |
RButton 2 00000000000000000000000000000010 | |
Cancel 3 00000000000000000000000000000011 | |
MButton 4 00000000000000000000000000000100 | |
XButton1 5 00000000000000000000000000000101 | |
XButton2 6 00000000000000000000000000000110 | |
Back 8 00000000000000000000000000001000 |
This file contains hidden or 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 | |
require_once 'PHPExcel.php'; | |
$filename = 'Book1.xls'; | |
$sheet_name = 'Sheet1'; | |
$reader = PHPExcel_IOFactory::createReader('EXCEL5'); | |
$reader->setReadDataOnly(true); | |
$reader->setLoadSheetsOnly(array($sheet_name)); |
This file contains hidden or 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 | |
/** | |
* カスタムモジュールスタイルを定義します。 | |
* {JoomlaのROOTパス}/templates/{テンプレートフォルダ}/html/modules.php | |
* に配置して下さい。 | |
*/ | |
// no direct access | |
defined('_JEXEC') or die('Restricted access'); |
This file contains hidden or 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 UsersController extends AppController { | |
var $name = 'Users'; | |
// 1. ページネーションの既定の設定を行います。 | |
var $paginate = array( | |
'limit' => 10, | |
// optionsを設定してoptions['limit']を設定しないと |
This file contains hidden or 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. メニューの Commands > Zen Coding > Edit this bundle を選択して | |
Zen Codingプロジェクトを表示させる | |
2. lib/zencoding/my_zen_settings.py を編集する | |
3. lib/zencoding/zen_settings.py を下記のように編集する | |
a. my_zen_settingsをimportする(冒頭) | |
b. zen_settingsとmy_zen_settingsをマージする関数を定義する(冒頭) | |
c. zen_settingsとmy_zen_settingsをマージする (一番最後) | |
これで一応my_zen_settingsの設定が有効になります。もっと普通の方法は…? |
This file contains hidden or 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 | |
error_reporting(E_ALL); | |
// 通常の取得 | |
// 配列のキーに値がない場合、Notice: Undefined index が発生します。 | |
$foo = $_GET['foo']; | |
$bar = $_GET['bar']; | |
$baz = $_GET['baz']; |
This file contains hidden or 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 | |
/* | |
* QdmailComponentをコントローラの$componentsで初期化できるようにしたコンポーネントです(実験的)。 | |
* | |
* 使用例 (コントローラ内) | |
* var $components = array('XQdmail' => array( | |
'smtp' => true, | |
'smtpServer' => array( | |
'host' => 'ssl://smtp.gmail.com' , | |
'port' => '465', |
This file contains hidden or 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
// CSS3 Extended color keywords (http://www.w3.org/TR/2010/PR-css3-color-20101028) | |
$aliceblue : #F0F8FF; | |
$antiquewhite : #FAEBD7; | |
$aqua : #00FFFF; | |
$aquamarine : #7FFFD4; | |
$azure : #F0FFFF; | |
$beige : #F5F5DC; | |
$bisque : #FFE4C4; | |
$black : #000000; |