Returns if certain feature is supported by model
516984
public function supports($feature)
    {
        if (!$this->controller) {
            return false;
        }

        $s = 'support'.$feature;

        return $this->controller->$s;
    }
721732
function(feature) {

        var interactive = joint.util.isFunction(this.options.interactive)
            ? this.options.interactive(this)
            : this.options.interactive;

        return (joint.util.isObject(interactive) && interactive[feature] !== false) ||
                (joint.util.isBoolean(interactive) && interactive !== false);
    }
564269
public boolean supported(Object element) {
      for (Class c : getSupportedClasses()) {
         if (c.isAssignableFrom(element.getClass())) {
            if (log.isLoggable(Level.FINE)) {
               log.fine(element.getClass().getName() + " will be styled, it is assignable from " + c.getName());
            }
            return true;
         }
      }
      return false;
   }
730828
def supports_tagging(obj):
    
    if isinstance(obj, type):
        return issubclass(obj, SupportTagging)

    if not isinstance(obj, SupportTagging):
        return False

    if obj.id is None:
        return False

    return True
244672
def supported_operations(self):
        
        return tuple(op for op in backend.CAM_OPS
                     if self._abilities.operations & op)
1068335
def get_for_model(self, model):
        
        return self.filter(content_type=ContentType.objects.get_for_model(model))
1228102
def supports_attachments(obj):
    
    if isinstance(obj, type):
        return issubclass(obj, SupportAttachment)

    if not isinstance(obj, SupportAttachment):
        return False

    if obj.id is None:
        return False

    return True
1112435
def is_active(feature):
  

  if current_app:
    feature_flagger = current_app.extensions.get(EXTENSION_NAME)
    if feature_flagger:
      return feature_flagger.check(feature)
    else:
      raise AssertionError("Oops. This application doesn't have the Flask-FeatureFlag extention installed.")

  else:
    log.warn(u"Got a request to check for {feature} but we're running outside the request context. Check your setup. Returning False".format(feature=feature))
    return False
1237843
def is_disabled_action(view):
    
    if not isinstance(view, core_views.ActionsViewSet):
        return False

    action = getattr(view, 'action', None)
    return action in view.disabled_actions if action is not None else False
23612
def attached_to_model(self):
        """"""
        try:
            if not bool(self.model):
                return False
        except AttributeError:
            return False
        else:
            try:
                return not bool(self.instance)
            except AttributeError:
                return True
76957
function supports(feature) {
		var root = document.documentElement;
		var fixt = feature[0].toUpperCase() + feature.substring(1);
		return !["", "Webkit", "Moz", "O", "ms"].every(function(prefix) {
			return root.style[prefix ? prefix + fixt : feature] === undefined;
		});
	}
119953
protected final boolean supportsDataField(final String name) throws CouldNotPerformException {
        try {
            Descriptors.FieldDescriptor findFieldByName = dataBuilder.getDescriptorForType().findFieldByName(name);
            return findFieldByName != null;
        } catch (NullPointerException ex) {
            return false;
        }
    }
1368876
def has_field(cls, field_name):
        
        if super(ModelWithDynamicFieldMixin, cls).has_field(field_name):
            return True

        try:
            cls._get_dynamic_field_for(field_name)
        except ValueError:
            return False
        else:
            return True
277673
def has_hints(self):
        
        for acc in ["low", "normal", "high"]:
            try:
                if self.hint_for_accuracy(acc) is None:
                    return False
            except KeyError:
                return False
        return True
766328
def check_dependencies(model, model_queue, avaliable_models):
    
    # A list of allowed links: existing fields, itself and the special case ContentType
    allowed_links = [m.model.__name__ for m in model_queue] + [model.__name__, 'ContentType']

    # For each ForeignKey or ManyToMany field, check that a link is possible

    for field in model._meta.fields:
        if not field.remote_field:
            continue
        if field.remote_field.model.__name__ not in allowed_links:
            if field.remote_field.model not in avaliable_models:
                continue
            return False

    for field in model._meta.many_to_many:
        if not field.remote_field:
            continue
        if field.remote_field.model.__name__ not in allowed_links:
            return False

    return True
935585
protected function support_views() {
        foreach ($this->get_module_names() as $modname => $modfullname) {
            if (!plugin_supports('mod', $modname, FEATURE_COMPLETION_TRACKS_VIEWS, false)) {
                return false;
            }
        }
        return true;
    }
180489
public function supportsFeature($feature)
    {
        switch ($feature) {
            case self::FEATURE_NX:
                return ($this->getDriver() instanceof common_persistence_KeyValue_Nx);
            default:
                throw new common_exception_Error('Unknown feature '.$feature);
        }
        return false;
    }