// AddHoliday adds a holiday to the calendar's list.
196772
func (c *Calendar) AddHoliday(h ...Holiday) {
	for _, hd := range h {
		c.holidays[hd.Month] = append(c.holidays[hd.Month], hd)
	}
}
350210
func (c *LRUCache) AddWithTTL(key Key, value interface{}, TTL time.Duration) bool {
	expireAt := time.Now().UTC().Add(TTL)
	return c.addRecord(&cacheRecord{
		key:      key,
		value:    value,
		expireAt: &expireAt,
	})
}
710256
func (u *User) AddToManyIDs(name string, IDs []string) error {
	if name == "sweets" {
		u.ChocolatesIDs = append(u.ChocolatesIDs, IDs...)
		return nil
	}

	return errors.New("There is no to-many relationship with the name " + name)
}
864877
func AddDutchHolidays(c *Calendar) {
	c.AddHoliday(
		NLNieuwjaar,
		NLGoedeVrijdag,
		NLPaasMaandag,
		NLKoningsDag,
		NLBevrijdingsDag,
		NLHemelvaart,
		NLPinksterMaandag,
		NLEersteKerstdag,
		NLTweedeKerstdag,
	)
}
666565
public function addHolidays($holidays)
    {
        foreach ($holidays as $holiday) {
            if ($holiday instanceof DateRange) {
                $this->addHolidays($holiday);

                continue;
            }

            $this->addHoliday($holiday);
        }
    }
737857
func NewCalendar() *Calendar {
	c := &Calendar{}
	for i := range c.holidays {
		c.holidays[i] = make([]Holiday, 0, 2)
	}
	c.workday[time.Monday] = true
	c.workday[time.Tuesday] = true
	c.workday[time.Wednesday] = true
	c.workday[time.Thursday] = true
	c.workday[time.Friday] = true
	return c
}
243195
func (node *Union) AddOrder(order *Order) {
	node.OrderBy = append(node.OrderBy, order)
}
960250
func (sd *structDef) addSingleInheritance(apiDef *raml.APIDefinition, strType string) {
	// check if parent is user defined type
	if _, ok := apiDef.Types[strType]; ok {
		strType = strings.Title(strType)
	}

	fd := fieldDef{
		Name:          strType,
		IsComposition: true,
	}
	sd.Fields[strType] = fd

}
486052
func AddUsHolidays(cal *Calendar) {
	cal.AddHoliday(
		USNewYear,
		USMLK,
		USPresidents,
		USMemorial,
		USIndependence,
		USLabor,
		USColumbus,
		USVeterans,
		USThanksgiving,
		USChristmas,
	)
}
567097
func (q *graceTerminateRSList) add(rs *listItem) bool {
	q.lock.Lock()
	defer q.lock.Unlock()

	uniqueRS := rs.String()
	if _, ok := q.list[uniqueRS]; ok {
		return false
	}

	klog.V(5).Infof("Adding rs %v to graceful delete rsList", rs)
	q.list[uniqueRS] = rs
	return true
}
1290414
func (c *Cron) Add(s Schedule, j Job) {

	entry := &Entry{
		Schedule: s,
		Job:      j,
	}

	if !c.running {
		c.entries = append(c.entries, entry)
		return
	}
	c.add <- entry
}
702431
func (h *HLL) Add(value string) {
	hash := h.Hasher(value)
	h.AddHash(hash)
}
708143
func (ro *renameOp) AddSelfUpdate(ptr data.BlockPointer) {
	ro.AddUpdate(ptr, ptr)
}
1157574
def isholiday(self, date):
        
        date = parsefun(date)
        if self.holidays:
            # i is the index of first holiday >= date
            i = bisect.bisect_left(self.holidays, date)
            if i == 0 and date < self.holidays[0]:
                warn('Holiday list exhausted at start, ' \
                     'isholiday(%s) output may be incorrect.' % date)
            elif i == len(self.holidays):
                warn('Holiday list exhausted at end, ' \
                     'isholiday(%s) output may be incorrect.' % date)
            elif self.holidays[i] == date:
                return True
        return False
187847
func (h *RevelHeader) Add(key, value string) {
	if h.Server != nil {
		h.Server.Add(key, value)
	}
}
170945
func (s *SeriesIDSet) AddMany(ids ...SeriesID) {
	if len(ids) == 0 {
		return
	}

	a32 := make([]uint32, len(ids))
	for i := range ids {
		a32[i] = uint32(ids[i].RawID())
	}

	s.Lock()
	defer s.Unlock()
	s.bitmap.AddMany(a32)
}
1308004
func (z *Dec) Add(x, y *Dec) *Dec {
	xx, yy := upscale(x, y)
	z.SetScale(xx.Scale())
	z.UnscaledBig().Add(xx.UnscaledBig(), yy.UnscaledBig())
	return z
}