// checkCairoFeatures gathers the supported cairo features by checking
// pkg-config --exists.
197027
func checkCairoFeatures(features ...string) []string {
	supported := []string{}
	for _, feature := range features {
		cmd := exec.Command("pkg-config", "--exists", feature)
		cmd.Stderr = os.Stderr
		err := cmd.Run()
		if err == nil {
			supported = append(supported, feature)
		}
	}
	return supported
}
447045
func NewFeaturesGetValuesBatchResult(Values []*FeatureValue) *FeaturesGetValuesBatchResult {
	s := new(FeaturesGetValuesBatchResult)
	s.Values = Values
	return s
}
1211870
func (d *Parser) SprintFeatures(features []int) string {
	// tabcount := int(atomic.LoadUint32(&TABCOUNT))

	var buf bytes.Buffer

	for i := 0; i < 18; i++ {
		number := features[i]
		id := number - wordFeatsStartAt
		word, _ := d.corpus.Word(id)

		if word == "" {
			word = "-NULL-"
		}

		buf.WriteString(fmt.Sprintf("%d, %q, %d \n", feature(i), word, number))
	}

	for i := 0; i < 18; i++ {
		number := features[i+18]

		buf.WriteString(fmt.Sprintf("%d, %v, %d\n", feature(i+18), lingo.POSTag(number), number))
	}

	for i := 0; i < 12; i++ {
		number := features[i+36]
		id := number - labelFeatsStartAt

		buf.WriteString(fmt.Sprintf("%d, %v, %d\n", feature(i+36), lingo.DependencyType(id), number))
	}

	return buf.String()
}
283351
func getFeatures(b []byte, r *regexp.Regexp) []Feature {
	words := r.FindAll(b, -1)
	features := make([]Feature, len(words))
	for i, w := range words {
		features[i] = NewFeature(w)
	}
	return features
}
916144
func (r *GormWorkItemTypeGroupRepository) CheckExists(ctx context.Context, id uuid.UUID) error {
	defer goa.MeasureSince([]string{"goa", "db", "workitemtypegroup", "exists"}, time.Now())
	log.Debug(ctx, map[string]interface{}{"witg_id": id}, "checking if work item type group exists")
	return repository.CheckExists(ctx, r.db, WorkItemTypeGroup{}.TableName(), id)
}
1048358
func (v *HandshakeResponse) GetFeatures() (o []Feature) {
	if v != nil {
		o = v.Features
	}
	return
}
176825
func (d *Descriptor) Check() error {
	if d.Pack < 1 || d.Pack > 4 {
		return fmt.Errorf("invalid pack value %v", d.Pack)
	}
	for i := 0; i < d.Planes; i++ {
		h := d.GetHeight(i)
		if d.Interlaced && h%2 != 0 && h != d.Height {
			return fmt.Errorf("invalid interlaced input height %v", d.Height)
		}
	}
	return nil
}
986874
func isCAASModelFacade(facadeName string) bool {
	return caasModelFacadeNames.Contains(facadeName) ||
		commonModelFacadeNames.Contains(facadeName) ||
		commonFacadeNames.Contains(facadeName)
}
773842
func (daemon *Daemon) reloadFeatures(conf *config.Config, attributes map[string]string) {
	// update corresponding configuration
	// note that we allow features option to be entirely unset
	daemon.configStore.Features = conf.Features

	// prepare reload event attributes with updatable configurations
	attributes["features"] = fmt.Sprintf("%v", daemon.configStore.Features)
}
408068
func ensureFeatureDisabled(id string) error {
	pattern := "/sys/devices/bone_capemgr.*/slots"
	file, err := embd.FindFirstMatchingFile(pattern)
	if err != nil {
		return err
	}
	slots, err := os.OpenFile(file, os.O_RDWR, os.ModeExclusive)
	if err != nil {
		return err
	}
	defer slots.Close()
	scanner := bufio.NewScanner(slots)
	for scanner.Scan() {
		text := scanner.Text()
		if !strings.Contains(text, id) {
			continue
		}
		// Extract the id from the line
		idx := strings.Index(text, ":")
		if idx < 0 {
			// Something is off, bail
			continue
		}
		dis := strings.TrimSpace(text[:idx])
		slots.Seek(0, 0)
		_, err = slots.WriteString("-" + dis)
		return err
	}
	// Could not disable the feature
	return fmt.Errorf("embd: could not disable feature %q", id)
}
861225
func (c *Client) GetAudioFeatures(ids ...ID) ([]*AudioFeatures, error) {
	url := fmt.Sprintf("%saudio-features?ids=%s", c.baseURL, strings.Join(toStringSlice(ids), ","))

	temp := struct {
		F []*AudioFeatures `json:"audio_features"`
	}{}

	err := c.get(url, &temp)
	if err != nil {
		return nil, err
	}

	return temp.F, nil
}
947858
func (s *StartDeviceSyncInput) SetFeatures(v []*string) *StartDeviceSyncInput {
	s.Features = v
	return s
}
277137
func checkControllerInheritedConfig(attrs attrValues) error {
	disallowedCloudConfigAttrs := append(disallowedModelConfigAttrs[:], config.AgentVersionKey)
	for _, attr := range disallowedCloudConfigAttrs {
		if _, ok := attrs[attr]; ok {
			return errors.Errorf("local cloud config cannot contain " + attr)
		}
	}
	for attrName := range attrs {
		if controller.ControllerOnlyAttribute(attrName) {
			return errors.Errorf("local cloud config cannot contain controller attribute %q", attrName)
		}
	}
	return nil
}
1331537
func NewFeature(geom Geometry, properties map[string]interface{},
	id interface{}) *Feature {
	return &Feature{Type: "Feature",
		Geometry:   geom,
		Properties: properties,
		Id:         id}
}
892276
func (l *License) GetFeatured() bool {
	if l == nil || l.Featured == nil {
		return false
	}
	return *l.Featured
}
1279975
func (o *Me) VCenterEAMConfigs(info *bambou.FetchingInfo) (VCenterEAMConfigsList, *bambou.Error) {

	var list VCenterEAMConfigsList
	err := bambou.CurrentSession().FetchChildren(o, VCenterEAMConfigIdentity, &list, info)
	return list, err
}
1224684
func ReadFeatureProbes(filename string) {
	f, err := os.Open(filename)
	if err != nil {
		// Should not happen; the caller ensured that the file exists
		log.WithFields(logrus.Fields{
			logfields.Path: filename,
		}).WithError(err).Fatal("Failed to read feature probes")
	}
	defer f.Close()
	scanner := bufio.NewScanner(f)
	for scanner.Scan() {
		for mapType := MapTypeHash; mapType < MapTypeMaximum; mapType++ {
			featureString := mapTypeToFeatureString(mapType)
			if featureString != "" &&
				bytes.Compare(scanner.Bytes(), []byte(featureString)) == 0 {
				log.Debugf("Detected support for map type %s", mapType.String())
				supportedMapTypes[mapType] = true
			}
		}
	}

	for mapType := MapTypeHash; mapType < MapTypeMaximum; mapType++ {
		if mapTypeToFeatureString(mapType) == "" {
			log.Debugf("Skipping support detection for map type %s", mapType.String())
		} else if _, probed := supportedMapTypes[mapType]; !probed {
			log.Debugf("Detected no support for map type %s", mapType.String())
			supportedMapTypes[mapType] = false
		}
	}
}