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
[{"name":"posts","color":"Red","position":{"x":100,"y":99},"increment":true,"timestamp":true,"softdelete":true,"column":[{"name":"title","type":"string","length":"","defaultvalue":"","enumvalue":"","ai":false,"pk":false,"nu":false,"ui":false,"in":false,"un":false,"fillable":true,"guarded":false,"visible":false,"hidden":false,"colid":"c58","order":0},{"name":"content","type":"text","length":"","defaultvalue":"","enumvalue":"","ai":false,"pk":false,"nu":false,"ui":false,"in":false,"un":false,"fillable":true,"guarded":false,"visible":false,"hidden":false,"colid":"c66","order":1}],"relation":[],"seeding":[[{"colid":"c58","content":"post 1"},{"colid":"c66","content":"test seed"}],[{"colid":"c58","content":"post 2"},{"colid":"c66","content":"swssss"}]]}] |
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 obj implements arrayaccess { | |
private $container = array(); | |
//設定 $container | |
public function __construct() { | |
$this->container = array( | |
"one" => 1, | |
"two" => 2, | |
"three" => 3, |
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 | |
use Illuminate\Database\Seeder; | |
class CategoriesTableSeeder extends Seeder | |
{ | |
/** | |
* Run the database seeds. | |
* | |
* @return void |
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 | |
namespace App; | |
use Illuminate\Database\Eloquent\Model; | |
class Category extends Model | |
{ | |
// 定義 self relation,用來處理子分類 |
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 | |
namespace App\Http\Middleware; | |
use Closure; | |
use Illuminate\Http\Request; | |
use Illuminate\Http\Response; | |
use Symfony\Component\DomCrawler\Crawler; | |
class PjaxMiddleware |
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
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
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
<app-counter-button [step]="-2" (changed)="change($event)"></app-counter-button> | |
{{ counter }} | |
<app-counter-button [step]="5" (changed)="change($event)"></app-counter-button> |
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
<div class="color" | |
[ngStyle]="{'background-color': myStyle}" | |
(click)="picked.emit(myStyle)"></div> | |
<div *ngIf="show; else edit" class="tweak"> | |
<input type="range" min="0" max="255" [(ngModel)]="r"> | |
<span style="color: red">{{ r }}</span><br /> | |
<input type="range" min="0" max="255" [(ngModel)]="g"> | |
<span style="color: green">{{ g }}</span><br /> | |
<input type="range" min="0" max="255" [(ngModel)]="b"> |
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
.main { | |
width: 100%; | |
height: 200px; | |
border: 1px solid gray; | |
margin-bottom: 20px; | |
} |
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
(function(){ | |
var a; | |
a = b = 3; | |
})(); | |
/* | |
a => 為 function 的區域變數,IIFE 執行完回收,ReferenceError: a is not define | |
b => 未用 var 宣告,所以會在 window 添加 b 屬性,其值為 3,IIFE 執行完依然存在 | |
*/ |
OlderNewer