core : { check_callback : function (op, obj, par, pos, more) {
if(more.dnd && more.pos !== "i") { return false; }
}
That's as per an answer given by Jstree author himself, Ivan Bozhanov:https://groups.google.com/forum/#!topic/jstree/nn5GaA6WhXE
apikeys: build: ./api_keys image_name: "dbonev/apikeys" container_name: "apikeys" ports: - "4343:4343" data_api: build: ./data_collection image_name: "dbonev/data_api" container_name: "data_api" ports: - "4242:4242"Using docker-compose up/build on this file would then create an image tagged with dbonev/apikeys, ready to be pushed into the dbonev/apikeys repository.
db@db-VirtualBox:~/node/proton$ docker images REPOSITORY TAG IMAGE ID CREATED VIRTUAL SIZE dbonev/apikeys latest 7c8c510b33b9 7 seconds ago 434.1 MB dbonev/data_api latest 15537693d7e8 35 hours ago 437 MBUnfortunately, compose doesn't offer such ability as of the time of this writing. As I am using the tool on a daily basis, I slightly tweaked docker-compose code to allow this.
this.a * this.band not
this.Square.a * this.balthough this would also work fine. In other words, syntactically and semantically, it's very similar to what we achieve with inheritance in traditional OO languages.
package main
import (
"fmt"
"math"
)
func main(){
cir := new(Circle);
cir.rad = 10;
calc_area(cir);
square := new(Square);
square.a = 100;
calc_area(square);
rect := new(Rect);
rect.a = 10;
rect.b = 50;
calc_area(rect);
}
// common interface for all shapes
type Shape interface {
area() float32
}
type Circle struct {
rad float32
}
// just for convenience square and rectangle are inverted
// i.e. a rectangle is a square which is probably not that
// right from purist OO standpoint but makes the code more clear
type Square struct {
a float32
}
// rectangle is a square with additional piece of information
// regarding side
type Rect struct {
Square
b float32
}
// 'polymorphic' methods in action
func (this *Circle) area() float32{
return math.Pi * this.rad * this.rad;
}
func (this *Square) area() float32 {
return this.a * this.a;
}
func (this *Rect) area() float32 {
return this.a * this.b;
}
func calc_area(this Shape){
fmt.Println(this.area());
}