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
kejyun@kejyun-VirtualBox:~$ composer create-project laravel/laravel | |
Installing laravel/laravel (v4.0.0) | |
- Installing laravel/laravel (v4.0.0) | |
Loading from cache | |
Created project in /home/kejyun/laravel | |
Loading composer repositories with package information | |
Installing dependencies | |
- Installing symfony/translation (2.3.x-dev v2.3.0-RC1) | |
Cloning v2.3.0-RC1 |
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
[ | |
// Tab轉空白 | |
{ "keys": ["ctrl+shift+alt+1"], "command": "expand_tabs", "args" : {"set_translate_tabs" : true} }, | |
// 空白轉Tab | |
{ "keys": ["ctrl+shift+alt+2"], "command": "unexpand_tabs", "args" : {"set_translate_tabs" : true} } | |
] |
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 | |
// 控制器 Controller | |
// controller/pages.php | |
class PagesController extends BaseController { | |
protected $layout = 'layouts.master'; | |
public function index() | |
{ | |
// 方法一 | |
$this->layout->title_methed1= '要顯示的標題'; |
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 | |
return array( | |
// Mail Driver | |
'driver' => 'smtp', | |
// SMTP Host Address : 郵件寄送伺服器 | |
'host' => 'smtp.gmail.com', | |
// SMTP Host Port | |
'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
<?php | |
return array( | |
// Mail Driver | |
'driver' => 'smtp', | |
// SMTP Host Address : 郵件寄送伺服器 | |
'host' => 'smtp.gmail.com', | |
// SMTP Host Port | |
'port' => 587, | |
// 寄件人資訊 |
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 | |
// 路由 Route | |
// app/routes.php | |
Route::get('mail_test', function() | |
{ | |
// 傳送給郵件view的變數資料 | |
$template_data = array( | |
'name'=> 'KeJyun' | |
); | |
// 收件者資料 |
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
[ | |
// 縮排區塊 | |
{ "keys": ["ctrl+shift+["], "command": "fold" }, | |
// 復原區塊 | |
{ "keys": ["ctrl+shift+]"], "command": "unfold" }, | |
// 縮排全部第1階層區塊 | |
{ "keys": ["ctrl+k", "ctrl+1"], "command": "fold_by_level", "args": {"level": 1} }, | |
// 縮排全部第2階層區塊 | |
{ "keys": ["ctrl+k", "ctrl+2"], "command": "fold_by_level", "args": {"level": 2} }, | |
// 縮排全部第3階層區塊 |
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 | |
// 連線到MongoDB | |
$m = new MongoClient("mongodb://帳號:密碼@localhost"); | |
// 選擇資料庫 | |
$db = $m->test; | |
// 選擇資料集 (collection) | |
$collection = $db->test; | |
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
// 中心點:台北車站 | |
db.lbs_test.save({name:"捷運台北車站", loc:{lat:25.046084,long:121.517542} , time:1}); | |
// 台北車站附近:藍線 | |
db.lbs_test.save({name:"捷運西門站", loc:{lat:25.042157,long:121.508272} , time:2}); | |
db.lbs_test.save({name:"捷運龍山寺站", loc:{lat:25.035877,long:121.499945} , time:3}); | |
db.lbs_test.save({name:"捷運江子翠站", loc:{lat:25.030064,long:121.472329} , time:4}); | |
db.lbs_test.save({name:"捷運善導寺站", loc:{lat:25.044898,long:121.523374} , time:5}); | |
db.lbs_test.save({name:"捷運忠孝新生站", loc:{lat:25.042332,long:121.532686} , time:6}); | |
db.lbs_test.save({name:"捷運忠孝復興站", loc:{lat:25.04171,long:121.543758} , time:7}); |
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
// 建立索引 | |
db.lbs_test.ensureIndex({loc:"2d" , time : 1}); |