// See: http://duktape.org/api.html#duk_is_bound_function
194453
func (d *Context) IsBoundFunction(index int) bool {
	return int(C.duk_is_bound_function(d.duk_context, C.duk_idx_t(index))) == 1
}
1291922
func interpolationFuncContains() ast.Function {
	return ast.Function{
		ArgTypes:   []ast.Type{ast.TypeList, ast.TypeString},
		ReturnType: ast.TypeBool,
		Callback: func(args []interface{}) (interface{}, error) {
			_, err := interpolationFuncIndex().Callback(args)
			if err != nil {
				return false, nil
			}
			return true, nil
		},
	}
}
12312
func isUnbound(device string) bool {
	modulePath, err := filepath.EvalSymlinks(filepath.Join(sysFsPCIDevicesPath, device, "driver", "module"))
	if os.IsNotExist(err) {
		log.Infof("%v is not bound to any driver", device)
		return true
	}
	module := filepath.Base(modulePath)
	if module == "pci_stub" || module == "vfio_pci" {
		log.Infof("%v is bound to a stub module: %v", device, module)
		return true
	}
	log.Infof("%v is bound to a non-stub module: %v", device, module)
	return false
}
194885
func (e *Event) Dur(key string, d time.Duration) *Event {
	if e == nil {
		return e
	}
	e.buf = enc.AppendDuration(enc.AppendKey(e.buf, key), d, DurationFieldUnit, DurationFieldInteger)
	return e
}
271538
func (c *Context) BindJSON(obj interface{}) error {
	return c.MustBindWith(obj, binding.JSON)
}
729655
func BindVariablesEqual(x, y map[string]*querypb.BindVariable) bool {
	return proto.Equal(&querypb.BoundQuery{BindVariables: x}, &querypb.BoundQuery{BindVariables: y})
}
1269593
func clippedEdgeBound(a, b r2.Point, clip r2.Rect) r2.Rect {
	bound := r2.RectFromPoints(a, b)
	if b1, intersects := clipEdgeBound(a, b, clip, bound); intersects {
		return b1
	}
	return r2.EmptyRect()
}
633435
func (d *Context) RequireFunction(index int) {
	C.duk_require_function(d.duk_context, C.duk_idx_t(index))
}
797663
func (txt *Text) BoundsOf(s string) pixel.Rect {
	dot := txt.Dot
	prevR := txt.prevR
	bounds := pixel.Rect{}

	for _, r := range s {
		var control bool
		dot, control = txt.controlRune(r, dot)
		if control {
			continue
		}

		var b pixel.Rect
		_, _, b, dot = txt.Atlas().DrawRune(prevR, r, dot)

		if bounds.W()*bounds.H() == 0 {
			bounds = b
		} else {
			bounds = bounds.Union(b)
		}

		prevR = r
	}

	return bounds
}
1052655
func functions(decl *cc.Declarator) bool {
	if !strings.HasPrefix(bindgen.NameOf(decl), "cudnn") {
		return false
	}
	if decl.Type.Kind() == cc.Function {
		return true
	}
	return false

}
600257
func (tskr *RegisterTask) IsDone() (bool, error) {
	command := "udf-list"
	nodes := tskr.cluster.GetNodes()
	done := false

	for _, node := range nodes {
		responseMap, err := node.requestInfoWithRetry(&tskr.cluster.infoPolicy, 5, command)
		if err != nil {
			return false, err
		}

		for _, response := range responseMap {
			find := "filename=" + tskr.packageName
			index := strings.Index(response, find)

			if index < 0 {
				return false, nil
			}
			done = true
		}
	}
	return done, nil
}
1175830
func (v *TextBuffer) GetSelectionBounds(be, en *TextIter) bool {
	return gobool(C.gtk_text_buffer_get_selection_bounds(v.GTextBuffer, &be.GTextIter, &en.GTextIter))
}
622105
func (d *Context) IsLightfunc(index int) bool {
	return int(C.duk_is_lightfunc(d.duk_context, C.duk_idx_t(index))) == 1
}
1358519
func (d *Context) IsString(index int) bool {
	return int(C.duk_is_string(d.duk_context, C.duk_idx_t(index))) == 1
}
538551
func (f Float64) If(fn func(float64)) {
	if f.Present() {
		fn(*f.value)
	}
}
626446
func (d *Context) IsEcmascriptFunction(index int) bool {
	return int(C.duk_is_ecmascript_function(d.duk_context, C.duk_idx_t(index))) == 1
}
604205
func (d Display) Bounds() Rectangle {
	return Rectangle{
		Position: Position{X: *d.o.Bounds.X, Y: *d.o.Bounds.Y},
		Size:     Size{Height: *d.o.Bounds.Height, Width: *d.o.Bounds.Width},
	}
}