Defining Eloquent model (will assume that DB table named is set as plural of class name and primary key named "id"):
class Shop extends Eloquent {}
Using custom table name
protected $table = 'my_shops';
<select name="state"> | |
<option value="ACT">Australian Capital Territory</option> | |
<option value="NSW">New South Wales</option> | |
<option value="NT ">Northern Territory</option> | |
<option value="QLD">Queensland</option> | |
<option value="SA ">South Australia</option> | |
<option value="TAS">Tasmania</option> | |
<option value="VIC">Victoria</option> | |
<option value="WA ">Western Australia</option> | |
</select> |
package main | |
import ( | |
"fmt" | |
"reflect" | |
) | |
//function types | |
type mapf func(interface{}) interface{} |
----- Esc ----- | |
Quick change directory: Esc + c | |
Quick change directory history: Esc + c and then Esc + h | |
Quick change directory previous entry: Esc + c and then Esc + p | |
Command line history: Esc + h | |
Command line previous command: Esc + p | |
View change: Esc + t (each time you do this shortcut a new directory view will appear) | |
Print current working directory in command line: Esc + a | |
Switch between background command line and MC: Ctrl + o | |
Search/Go to directory in active panel: Esc + s / Ctrl + s then start typing directory name |
<?php | |
// Watermark with Imagick | |
// load images | |
$image = new Imagick("image.jpg"); | |
$watermark = new Imagick("watermark.png"); | |
// translate named gravity to pixel position | |
$position = gravity2coordinates($image, $watermark, 'lowerRight', 5, 5); | |
// compose watermark onto image |
// Objective: demonstrate that there are more use cases | |
// for union types than previously thought. | |
// http://groups.google.com/group/golang-nuts/browse_thread/thread/fbde059a7cfd2fa9 | |
// | |
// Interface inference. | |
// We already have type inference, so this would be very Go-like: | |
type typeA int | |
func (x typeA) A() {} | |
func (x typeB) C() {} |