// CreateRichMenu method
559588
func (client *Client) CreateRichMenu(richMenu RichMenu) *CreateRichMenuCall {
	return &CreateRichMenuCall{
		c:        client,
		richMenu: richMenu,
	}
}
71821
func (o *KeyServerMonitor) CreateKeyServerMonitorSEK(child *KeyServerMonitorSEK) *bambou.Error {

	return bambou.CurrentSession().CreateChild(o, child)
}
1095290
func (z *zookeeperKV) createFullPath(key string, ephemeral bool) error {
	key = z.domain + normalize(key)
	path := strings.Split(strings.TrimPrefix(key, "/"), "/")

	for i := 1; i <= len(path); i++ {
		newPath := "/" + strings.Join(path[:i], "/")

		if i == len(path) {
			flags := int32(0)
			if ephemeral {
				flags = zk.FlagEphemeral
			}
			_, err := z.client.Create(newPath, []byte{},
				flags, zk.WorldACL(zk.PermAll))
			return err
		}

		_, err := z.client.Create(newPath, []byte{},
			0, zk.WorldACL(zk.PermAll))
		if err != nil && err != zk.ErrNodeExists {
			return err
		}
	}
	return nil
}
820228
func CreateResource(r rest.Creater, scope *RequestScope, admission admission.Interface) http.HandlerFunc {
	return createHandler(&namedCreaterAdapter{r}, scope, admission, false)
}
110386
func (this *Weixinmp) CreateCustomMenu(btn *[]Button) error {
	var menu struct {
		Button *[]Button `json:"button"`
	}
	menu.Button = btn
	data, err := json.Marshal(&menu)
	if err != nil {
		return err
	}
	buf := bytes.NewBuffer(data)
	url := fmt.Sprintf("%smenu/create?access_token=", UrlPrefix)
	// retry
	for i := 0; i < retryNum; i++ {
		token, err := this.AccessToken.Fresh()
		if err != nil {
			if i < retryNum-1 {
				continue
			}
			return err
		}
		if _, err := post(url+token, "text/plain", buf); err != nil {
			if i < retryNum-1 {
				continue
			}
			return err
		}
		break // success
	}
	return nil
}
530338
func (r *Registry) createPriceOracle() {
	sp := &StreamerPrices{
		registry: r,
	}
	sp.priceMatrix = map[reflect.Type]*protocols.Price{
		reflect.TypeOf(ChunkDeliveryMsgRetrieval{}): {
			Value:   sp.getChunkDeliveryMsgRetrievalPrice(), // arbitrary price for now
			PerByte: true,
			Payer:   protocols.Receiver,
		},
		reflect.TypeOf(RetrieveRequestMsg{}): {
			Value:   sp.getRetrieveRequestMsgPrice(), // arbitrary price for now
			PerByte: false,
			Payer:   protocols.Sender,
		},
	}
	r.prices = sp
}
202446
func CreateResource(scheme, u string) (string, error) {
	scheme = strings.ToLower(scheme)

	if scheme == "http" || scheme == "https" || scheme == "http*" || scheme == "*" {
		return u, nil
	}

	if scheme == "rtmp" {
		parsed, err := url.Parse(u)
		if err != nil {
			return "", fmt.Errorf("unable to parse rtmp URL, err: %s", err)
		}

		rtmpURL := strings.TrimLeft(parsed.Path, "/")
		if parsed.RawQuery != "" {
			rtmpURL = fmt.Sprintf("%s?%s", rtmpURL, parsed.RawQuery)
		}

		return rtmpURL, nil
	}

	return "", fmt.Errorf("invalid URL scheme must be http, https, or rtmp. Provided: %s", scheme)
}
777536
func CreateDropMenu(title string, options []string, x, y, width, height int, fg, bg, cursorFg, cursorBg termbox.Attribute) *DropMenu {
	c := DropMenu{
		title: title,
		x:     x, y: y, width: width, height: height,
		fg: fg, bg: bg, activeFg: fg, activeBg: bg,
		cursorFg: fg, cursorBg: bg,
	}
	c.menu = CreateMenu("", options, x, y+2, width, height, fg, bg)
	return &c
}
139216
func createDelegatingStrategy(options Options) *delegatingStrategy {
	v := &delegatingStrategy{
		options: options,
	}
	v.replace = createReplaceStrategy(options, v)
	v.merge = createMergeStrategy(options, v)
	v.retainKeys = createRetainKeysStrategy(options, v)
	return v
}
759118
func (o *Me) CreateAllRedundancyGroup(child *AllRedundancyGroup) *bambou.Error {

	return bambou.CurrentSession().CreateChild(o, child)
}
682004
func (menu *Menu) AddSeparator() {
	command := Command{
		Method: "add_separator",
	}
	menuItem := MenuItem{
		Type:   "separator",
		Parent: menu,
	}
	menu.Items = append(menu.Items, &menuItem)
	menu.CallWhenReady(&command)
}
250431
func (menu *Menu) GetMenu() (resMenu ResMenu, err error) {
	var accessToken string
	accessToken, err = menu.GetAccessToken()
	if err != nil {
		return
	}
	uri := fmt.Sprintf("%s?access_token=%s", menuGetURL, accessToken)
	var response []byte
	response, err = util.HTTPGet(uri)
	if err != nil {
		return
	}
	err = json.Unmarshal(response, &resMenu)
	if err != nil {
		return
	}
	if resMenu.ErrCode != 0 {
		err = fmt.Errorf("GetMenu Error , errcode=%d , errmsg=%s", resMenu.ErrCode, resMenu.ErrMsg)
		return
	}
	return
}
97047
func (client *Client) UploadRichMenuImage(richMenuID, imgPath string) *UploadRichMenuImageCall {
	return &UploadRichMenuImageCall{
		c:          client,
		richMenuID: richMenuID,
		imgPath:    imgPath,
	}
}
1091908
func CreateFragment(html string) *js.Object {
	//if we are not in a browser,panic
	panicBrowserDetect()

	//we need to use innerhtml but DocumentFragments dont have that so we use
	//a discardable div

	// div := doc.CreateElement("div")
	div := jsutils.CreateElement("div")

	//build up the html right in the div
	jsutils.SetInnerHTML(div, html)

	//unwrap all the special Text UnknownELement we are using
	// jsutils.UnWrapSpecialTextElements(div)

	//create the document fragment
	fragment := jsutils.CreateDocumentFragment()

	//add the nodes from the div into the fragment
	nodes := jsutils.ChildNodeList(div)

	jsutils.AppendChild(fragment, nodes...)

	//unwrap all the special Text UnknownELement we are using
	// jsutils.UnWrapSpecialTextElements(fragment)

	return fragment
}
512156
func (stub *MockStub) CreateCompositeKey(objectType string, attributes []string) (string, error) {
	return createCompositeKey(objectType, attributes)
}
681804
func NewConsumerFromClient(client Client) (Consumer, error) {
	// For clients passed in by the client, ensure we don't
	// call Close() on it.
	cli := &nopCloserClient{client}
	return newConsumer(cli)
}
223012
func (d *Dock) NewMenu(i []*MenuItemOptions) *Menu {
	return newMenu(d.ctx, d.id, i, d.c, d.d, d.i, d.w)
}