// uncast removes a previously cast vote from the tally.
492337
func (s *Snapshot) uncast(address common.Address, authorize bool) bool {
	// If there's no tally, it's a dangling vote, just drop
	tally, ok := s.Tally[address]
	if !ok {
		return false
	}
	// Ensure we only revert counted votes
	if tally.Authorize != authorize {
		return false
	}
	// Otherwise revert the vote
	if tally.Votes > 1 {
		tally.Votes--
		s.Tally[address] = tally
	} else {
		delete(s.Tally, address)
	}
	return true
}
1156772
func (ms *TransformStack) Unwind(n int) error {
	if n > len(*ms)-1 {
		return errors.New("Cannot unwind a matrix to below 1 value")
	}

	(*ms) = (*ms)[:len(*ms)-n]
	return nil
}
1196047
func (c *Client) GetUnconfirmedBalance(account string) (btcutil.Amount, error) {
	return c.GetUnconfirmedBalanceAsync(account).Receive()
}
291850
func CastToBool(value interface{}) (bool, bool) {
	casted, ok := value.(bool)

	if !ok {
		castedStr := CastToString(value)

		castedBool, err := ParseBool(castedStr)
		if err != nil {
			return false, false
		}

		casted = castedBool
	}

	return casted, true
}
715797
func (h *Handle) Unset(ordinal uint64) error {
	if err := h.validateOrdinal(ordinal); err != nil {
		return err
	}
	_, err := h.set(ordinal, 0, 0, false, true, false)
	return err
}
866425
func (s *Bitset) Unset(index uint) *Bitset {
	s.extend(index)
	s.set[unitPos(index)] &= ^(1 << unitIndex(index))

	return s
}
689148
func (post *ProjectPost) VotesCount() (sum int) {
	Db().Model(ProjectPostVote{}).Select("COALESCE(sum(vote), 0)").Where(&ProjectPostVote{Hpid: post.ID()}).Scan(&sum)
	return
}
930864
func (s *Session) unpair() error {
	if !s.verified {
		return fmt.Errorf("Unpair requires that the PIN be verified")
	}
	return s.Channel.Unpair()
}
10716
func (s Sparse) Unset(i int) {
	ptrKey := int(uint(i) >> ptrShift)
	ptr, ok := s[ptrKey]
	if !ok {
		return
	}
	ptr &^= 1 << (uint(i) & ptrModMask)
	if ptr == 0 {
		delete(s, ptrKey)
	} else {
		s[ptrKey] = ptr
	}
}
1036301
func (h *Interface) runUnicast(jobs chan job, ip net.IP, ctx context.Context) {

	ListenAndServeIfUnicast(h.Name, h, jobs, ip, ctx)
}
104458
func (q *Queue) EventUnregister(e *Entry) {
	q.mu.Lock()
	q.list.Remove(e)
	q.mu.Unlock()
}
63857
func (self *Coder) Unmarshal(in []byte, data interface{}) error {
	return self.unmarshaller(in, data)
}
1260974
func (e *JSONEncoder) EncodeUnsubscribe(res *UnsubscribeResult) ([]byte, error) {
	return json.Marshal(res)
}
1197795
func (rs *Result) Broadcast() {
	rs.consolidator.mu.Lock()
	defer rs.consolidator.mu.Unlock()
	delete(rs.consolidator.queries, rs.query)
	rs.executing.Unlock()
}
950805
func Cast(buf []byte) (Multihash, error) {
	dm, err := Decode(buf)
	if err != nil {
		return Multihash{}, err
	}

	if !ValidCode(dm.Code) {
		return Multihash{}, ErrUnknownCode
	}

	return Multihash(buf), nil
}
1254356
func NewUnbind() Body {
	b := newUnbind(&Header{ID: UnbindID})
	b.init()
	return b
}
120134
func (s *ChannelsService) Unarchive(channel string) *ChannelsUnarchiveCall {
	var call ChannelsUnarchiveCall
	call.service = s
	call.channel = channel
	return &call
}