// IsOccurring implements the Schedule interface.
359910
func (d Date) IsOccurring(t time.Time) bool {
	return beginningOfDay(time.Time(d)).Equal(beginningOfDay(t))
}
32540
func (m *ownerManager) IsOwner() bool {
	return atomic.LoadPointer(&m.elec) != unsafe.Pointer(nil)
}
1051899
func (t *Table) IsOutdated() bool {
	if t.Count > 0 && float64(t.ModifyCount)/float64(t.Count) > RatioOfPseudoEstimate.Load() {
		return true
	}
	return false
}
392572
func (b *BtcWallet) IsOurAddress(a btcutil.Address) bool {
	result, err := b.wallet.HaveAddress(a)
	return result && (err == nil)
}
1216990
func (c *Crontab) checkRecovering(rs loop.Recoverings) (loop.Recoverings, error) {
	if rs.Frequency(12, time.Minute) {
		logger.Errorf("crontab cannot be recovered: %v", rs.Last().Reason)
		return nil, errors.New(ErrCrontabCannotBeRecovered, errorMessages, rs.Last().Reason)
	}
	logger.Warningf("crontab recovered: %v", rs.Last().Reason)
	return rs.Trim(12), nil
}
467414
func (i *DocumentIndex) IsOrgAccessor(userID influxdb.ID, orgID influxdb.ID) error {
	f := influxdb.UserResourceMappingFilter{
		UserID:       userID,
		ResourceType: influxdb.OrgsResourceType,
		ResourceID:   orgID,
	}

	if i.writable {
		f.UserType = influxdb.Owner
	}

	ms, err := i.service.findUserResourceMappings(i.ctx, i.tx, f)
	if err != nil {
		return err
	}

	for _, m := range ms {
		switch m.UserType {
		case influxdb.Owner, influxdb.Member:
			return nil
		default:
			continue
		}
	}

	return &influxdb.Error{
		Code: influxdb.EUnauthorized,
		Msg:  "user is not org member",
	}
}
1298042
func isOperatorChar(c byte) bool {
	if c < 0 {
		return false
	}
	return bytes.IndexByte([]byte("+-*/%&|!<>=~^"), c) != -1
}
572587
func (s *ISOService) CopyIso(p *CopyIsoParams) (*CopyIsoResponse, error) {
	resp, err := s.cs.newRequest("copyIso", p.toURLValues())
	if err != nil {
		return nil, err
	}

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

	// If we have a async client, we need to wait for the async result
	if s.cs.async {
		b, err := s.cs.GetAsyncJobResult(r.JobID, s.cs.timeout)
		if err != nil {
			if err == AsyncTimeoutErr {
				return &r, err
			}
			return nil, err
		}

		b, err = getRawValue(b)
		if err != nil {
			return nil, err
		}

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

	return &r, nil
}
1201070
func (w *Writer) writePending() {
	if w.err != nil {
		return
	}
	if w.pending {
		w.fillHeader(true)
		w.pending = false
	}
	_, w.err = w.w.Write(w.buf[w.written:w.j])
	w.written = w.j
}
1309112
func (c *curvePoint) IsOnCurve() bool {
	yy := new(big.Int).Mul(c.y, c.y)
	xxx := new(big.Int).Mul(c.x, c.x)
	xxx.Mul(xxx, c.x)
	yy.Sub(yy, xxx)
	yy.Sub(yy, curveB)
	if yy.Sign() < 0 || yy.Cmp(P) >= 0 {
		yy.Mod(yy, P)
	}
	return yy.Sign() == 0
}
1175314
func (s *SetupService) IsOnboarding(ctx context.Context) (bool, error) {
	u, err := newURL(s.Addr, setupPath)
	if err != nil {
		return false, err
	}
	req, err := http.NewRequest("GET", u.String(), nil)
	if err != nil {
		return false, err
	}
	hc := newClient(u.Scheme, s.InsecureSkipVerify)
	resp, err := hc.Do(req)
	if err != nil {
		return false, err
	}
	if err := CheckError(resp); err != nil {
		return false, err
	}
	defer resp.Body.Close()
	var ir isOnboardingResponse
	if err := json.NewDecoder(resp.Body).Decode(&ir); err != nil {
		return false, err
	}
	return ir.Allowed, nil
}
167328
func (s *Service) IsOnboarding(ctx context.Context) (bool, error) {
	notSetup := true
	err := s.kv.View(ctx, func(tx Tx) error {
		bucket, err := tx.Bucket(onboardingBucket)
		if err != nil {
			return err
		}
		v, err := bucket.Get(onboardingKey)
		// If the sentinel onboarding key is not found, then, setup
		// has not been performed.
		if IsNotFound(err) {
			notSetup = true
			return nil
		}
		if err != nil {
			return err
		}
		// If the sentinel key has any bytes whatsoever, then,
		if len(v) > 0 {
			notSetup = false // this means that it is setup.  I hate bools.
		}
		return nil
	})
	return notSetup, err
}
1340127
func (m *MockInterface) Scheduling() v1beta110.SchedulingV1beta1Interface {
	ret := m.ctrl.Call(m, "Scheduling")
	ret0, _ := ret[0].(v1beta110.SchedulingV1beta1Interface)
	return ret0
}
1090740
func (d *Context) IsObjectCoercible(index int) bool {
	return int(C._duk_is_object_coercible(d.duk_context, C.duk_idx_t(index))) == 1
}
327548
func (p ResourcePersistence) getOnePending(resID, pendingID string) (resourceDoc, error) {
	logger.Tracef("querying db for resource %q (pending %q)", resID, pendingID)
	id := pendingResourceID(resID, pendingID)
	var doc resourceDoc
	if err := p.base.One(resourcesC, id, &doc); err != nil {
		return doc, errors.Trace(err)
	}
	return doc, nil
}
1129571
func (c *Client) IsOrganizationMember(organization, token string) (bool, error) {
	req, err := c.NewRequest("HEAD", fmt.Sprintf("/user/memberships/orgs/%s", organization), nil)
	if err != nil {
		return false, err
	}

	tokenAuth(req, token)

	resp, err := c.Do(req, nil)
	if err != nil {
		if resp != nil && resp.StatusCode == 404 {
			return false, nil
		}
		return false, err
	}

	return true, nil
}
73095
func (d *Context) IsObject(index int) bool {
	return int(C.duk_is_object(d.duk_context, C.duk_idx_t(index))) == 1
}