// Bookmarks returns a pointer to a slice of Bookmark
6582
func (post *UserPost) Bookmarks() *[]Bookmark {
	ret := []UserPostBookmark{}
	Db().Model(UserPostBookmark{}).Where(&UserPostBookmark{Hpid: post.ID()}).Scan(&ret)
	var retBookmarks []Bookmark
	for _, b := range ret {
		bookmark := b
		retBookmarks = append(retBookmarks, Bookmark(&bookmark))
	}

	return &retBookmarks
}
262702
func (s *ComparedFace) SetLandmarks(v []*Landmark) *ComparedFace {
	s.Landmarks = v
	return s
}
1126341
func (bookmark *UserPostBookmark) Reference() Reference {
	post, _ := NewUserPost(bookmark.Hpid)
	return post
}
293223
func Tickmarks(min, max float64) (list []float64, precision int) {
	if max > min {
		spread := niceNum(max-min, false)
		d := niceNum((spread / 4), true)
		graphMin := math.Floor(min/d) * d
		graphMax := math.Ceil(max/d) * d
		precision = TickmarkPrecision(d)
		for x := graphMin; x < graphMax+0.5*d; x += d {
			list = append(list, x)
		}
	}
	return
}
816376
func Bookmark(snapshot, bookmark string) error {
	cmd := newCmd("bookmark", snapshot, bookmark)
	return zExecNoOut(cmd)
}
1135451
func (b *MemoryBookmarks) Remove(name string) bool {
	if b.Has(name) {
		delete(b.bookmarks, name)
		return true
	}
	return false
}
377910
func (s *JobBookmarkEntry) SetJobBookmark(v string) *JobBookmarkEntry {
	s.JobBookmark = &v
	return s
}
185428
func (s *VideoParameters) SetWatermarks(v []*PresetWatermark) *VideoParameters {
	s.Watermarks = v
	return s
}
317933
func PostBookmarks() echo.HandlerFunc {

	// swagger:route GET /users/{id}/posts/{pid}/bookmarks users post bookmarks GetUserPostBookmarks
	//
	// List the bookmarks of the post
	//
	//	Produces:
	//	- application/json
	//
	//	Security:
	//		oauth: profile_messages:read
	//
	//	Responses:
	//		default: UsersIdPostsPidBookmarks

	return func(c echo.Context) error {
		if !rest.IsGranted("profile_messages:read", c) {
			return rest.InvalidScopeResponse("profile_messages:read", c)
		}
		bookmarks := c.Get("post").(*nerdz.UserPost).Bookmarks()
		if bookmarks == nil {
			errstr := "Unable to fetch bookmarks for the specified post"
			c.JSON(http.StatusBadRequest, &rest.Response{
				HumanMessage: errstr,
				Message:      "UserPost.Bookmarks() error",
				Status:       http.StatusBadRequest,
				Success:      false,
			})
			return errors.New(errstr)
		}

		var bookmarksTO []*nerdz.UserPostBookmarkTO
		me := c.Get("me").(*nerdz.User)
		for _, v := range *bookmarks {
			// bookmarks contains Boook elements
			// we need to convert back to a UserPostBookmark in order to get a correct UserPostBookmarkTO
			if userPostBookmark := v.(*nerdz.UserPostBookmark); userPostBookmark != nil {
				bookmarksTO = append(bookmarksTO, userPostBookmark.GetTO(me))
			}
		}
		return rest.SelectFields(bookmarksTO, c)
	}
}
1042384
func (s *ResourcetagsService) ListStorageTags(p *ListStorageTagsParams) (*ListStorageTagsResponse, error) {
	resp, err := s.cs.newRequest("listStorageTags", p.toURLValues())
	if err != nil {
		return nil, err
	}

	var r ListStorageTagsResponse
	if err := json.Unmarshal(resp, &r); err != nil {
		return nil, err
	}

	return &r, nil
}
673665
func (obj *Doc) DestroyBookmark(ctx context.Context, id string) (bool, error) {
	result := &struct {
		Success bool	`json:"qSuccess"`
	} {}
	err := obj.rpc(ctx, "DestroyBookmark", result, id)
	return result.Success, err 
}
718590
func (t *Tracer) Tags() []opentracing.Tag {
	tags := make([]opentracing.Tag, len(t.tags))
	for i, tag := range t.tags {
		tags[i] = opentracing.Tag{Key: tag.key, Value: tag.value}
	}
	return tags
}
376830
func (b *FileBookmarks) Remove(name string) bool {
	if b.Has(name) {
		delete(b.bookmarks, name)
		err := b.writeToFile()
		if err == nil {
			return true
		}
	}
	return false
}
64646
func (b *FileBookmarks) Read(name string) (string, error) {
	if !b.Has(name) {
		return "", errors.New(
			"A bookmark does not exist with the name '%s'.", name)
	}
	return b.bookmarks[name], nil
}
160299
func (bow *Browser) Bookmark(name string) error {
	return bow.bookmarks.Save(name, bow.ResolveUrl(bow.Url()).String())
}
536492
func (ms MetricsSlice) Points() (models.Points, error) {
	ps := make([]models.Point, len(ms))
	for mi, m := range ms {
		point, err := models.NewPoint(m.Name, models.NewTags(m.Tags), m.Fields, m.Timestamp)
		if err != nil {
			return ps, err
		}

		ps[mi] = point
	}
	return ps, nil
}
139789
func (r *Reference) Tags(fn func(t Tag, value string)) {
	if fn == nil {
		return
	}
	fn(refNameTag, r.Name())
	fn(refLengthTag, fmt.Sprint(r.lRef))
	if r.assemID != "" {
		fn(assemblyIDTag, r.assemID)
	}
	if r.md5 != "" {
		fn(md5Tag, fmt.Sprintf("%x", []byte(r.md5)))
	}
	if r.species != "" {
		fn(speciesTag, r.species)
	}
	if r.uri != nil {
		fn(uriTag, r.uri.String())
	}
	for _, tp := range r.otherTags {
		fn(tp.tag, tp.value)
	}
}