//track.updateNowPlaying
171561
func (api trackApi) UpdateNowPlaying(args map[string]interface{}) (result TrackUpdateNowPlaying, err error) {
	defer func() { appendCaller(err, "lastfm.Track.UpdateNowPlaying") }()
	err = callPost("track.updatenowplaying", api.params, args, &result, P{
		"plain": []string{"artist", "track", "album", "trackNumber", "context", "mbid", "duration", "albumArtist"},
	})
	return
}
741481
func go_playlist_state_changed(sp_playlist unsafe.Pointer, userdata unsafe.Pointer) {
	(*Playlist)(userdata).cbStateChanged()
}
198606
func (s *SessionStatsCollector) Update(id int64, delta int64, count int64, colSize *map[int64]int64) {
	s.Lock()
	defer s.Unlock()
	s.mapper.update(id, delta, count, colSize)
}
986751
func Play(s ...beep.Streamer) {
	mu.Lock()
	mixer.Add(s...)
	mu.Unlock()
}
347500
func (p *displayPool) update(e *EventDisplays) {
	p.m.Lock()
	defer p.m.Unlock()
	var ids = make(map[int64]bool)
	for _, o := range e.All {
		ids[*o.ID] = true
		var primary bool
		if *o.ID == *e.Primary.ID {
			primary = true
		}
		if d, ok := p.d[*o.ID]; ok {
			d.primary = primary
			*d.o = *o
		} else {
			p.d[*o.ID] = newDisplay(o, primary)
		}
	}
	for id := range p.d {
		if _, ok := ids[id]; !ok {
			delete(p.d, id)
		}
	}
}
1339280
func (s *sharedPullerState) Updated() time.Time {
	s.mut.RLock()
	t := s.updated
	s.mut.RUnlock()
	return t
}
613115
func (su *StatusUpdater) Update(status interface{}) {
	su.Status = status.(string)

	// initialize event ID
	if su.EventID == 0 {
		su.EventID = time.Now().UnixNano()
	}
}
559441
func Playing(listener func(*vecty.Event)) *vecty.EventListener {
	return &vecty.EventListener{Name: "playing", Listener: listener}
}
985761
func (m *Monitor) Update(n int) int {
	m.mu.Lock()
	m.update(n)
	m.mu.Unlock()
	return n
}
177322
func (b *Uniform) Update(arm, reward int) {
	// Update the frequency
	b.counts[arm]++
	n := float64(b.counts[arm])

	value := b.values[arm]
	b.values[arm] = ((n-1)/n)*value + (1/n)*float64(reward)
}
245365
func (q *Queue) UpdateString(id uint64, newValue string) (*Item, error) {
	return q.Update(id, []byte(newValue))
}
48691
func (c *TrackerController) Update(ctx *app.UpdateTrackerContext) error {
	_, err := login.ContextIdentity(ctx)
	if err != nil {
		return jsonapi.JSONErrorResponse(ctx, goa.ErrUnauthorized(err.Error()))
	}
	err = validateUpdateTrackerPayload(ctx)
	if err != nil {
		return jsonapi.JSONErrorResponse(ctx, err)
	}
	var trkr *remoteworkitem.Tracker
	err = application.Transactional(c.db, func(appl application.Application) error {
		trkr, err = appl.Trackers().Load(ctx.Context, *ctx.Payload.Data.ID)
		if err != nil {
			return err
		}
		if &ctx.Payload.Data.Attributes.URL != nil {
			trkr.URL = ctx.Payload.Data.Attributes.URL
		}
		if &ctx.Payload.Data.Attributes.Type != nil {
			trkr.Type = ctx.Payload.Data.Attributes.Type
		}
		_, err = appl.Trackers().Save(ctx.Context, trkr)
		return err
	})
	accessTokens := GetAccessTokens(c.configuration) //configuration.GetGithubAuthToken()
	c.scheduler.ScheduleAllQueries(ctx, accessTokens)
	res := &app.TrackerSingle{
		Data: ConvertTracker(ctx.Request, *trkr),
	}
	return ctx.OK(res)
}
1097950
func (lobby *Lobby) UpdateStats() {
	db.DB.Preload("Slots").First(lobby, lobby.ID)

	for _, slot := range lobby.Slots {
		p, _ := player.GetPlayerByID(slot.PlayerID)

		db.DB.Preload("Stats").First(p, slot.PlayerID)
		p.Stats.PlayedCountIncrease(lobby.Type)
		p.Stats.IncreaseClassCount(lobby.Type, slot.Slot)
		p.Save()
	}
	lobby.OnChange(false)
}
1109722
func (w *Watch) update(newRevision int64){
	w.rwl.Lock()
	defer w.rwl.Unlock()
	w.revision = newRevision
	close(w.cond)
	w.cond = make(chan struct{})
}
1290221
func (c *Client) Track(msg *Track) error {
	if msg.Event == "" {
		return errors.New("You must pass 'event'.")
	}

	if msg.UserId == "" && msg.AnonymousId == "" {
		return errors.New("You must pass either an 'anonymousId' or 'userId'.")
	}

	msg.Type = "track"
	c.queue(msg)

	return nil
}
894125
func NewServeReplay(t *testing.T) *ServeReplay {
	return &ServeReplay{
		t:            t,
		Handlers:     make([]http.Handler, 0),
		NoneLeftFunc: defaultNoneLeftFunc,
	}
}
421536
func (c Column) UpdateString() string {
	return fmt.Sprintf("%s = :%s", c.Name, c.Name)
}