finds filter class
338904
private function getFilterClass($name)
	{
		if (isset($this->extensions[$name]))
			return $this->extensions[$name];

		if (class_exists($class = 'Sprockets\Filter\\' . ucfirst($name)))
			return $class;

		return false;
	}
1328945
def match(cls, pattern, inverse=False):
        """"""
        string_pattern = pattern
        invert_search = inverse

        class DefinedStringFilter(cls):
            pattern = string_pattern
            inverse = invert_search
        return DefinedStringFilter
14498
static private Class findClassFor(String s) throws ClassNotFoundException
	{ 
		int endClassIndex = s.indexOf('[');
		if (endClassIndex>=0) s = s.substring(0,endClassIndex);
		try {
			return Class.forName(s);
		} catch (ClassNotFoundException e) {
			return Class.forName("com.wcohen.ss."+s);
		}
	}
563918
def _wrapper_find_one(self, filter_=None, *args, **kwargs):
        
        return self.__collect.find_one(filter_, *args, **kwargs)
193082
def class_filter(classes, class_name):
    
    result_classes = classes
    if isinstance(class_name, list):
        if set(class_name) <= set(classes):
            result_classes = class_name
    return result_classes
1363781
def get(cls, filter=None, **kwargs):
        
        document = cls(cls.find_one(filter, **kwargs))
        return document if document.document else None
166744
public function find($filter = null)
    {
        if (is_string($filter)) {
            json_decode($filter);
            $isJson = (json_last_error() === JSON_ERROR_NONE) ? true :false;
            if ($isJson) {
                $filter = new Filter($filter);
                return $this->_getObjectsByFilter($filter);
            } else {
                return $this->_getObject($filter);
            }
        } else if (is_object($filter) && $filter instanceof Filter) {
            return $this->_getObjectsByFilter($filter);
        }
        return [];
    }
546569
public function find($filter)
    {
        if (is_null($this->settings)) {
            $this->settings();
        }

        return $this->settings[$filter];
    }
640848
def match_classes(self, el, classes):
        """"""

        current_classes = self.get_classes(el)
        found = True
        for c in classes:
            if c not in current_classes:
                found = False
                break
        return found
1130003
function getElementIndexOfParent(element, filter) {
  const parentNode = element.parentNode;
  const children = parentNode.children;
  let index = 0;
  for (let i = 0, len = children.length; i < len; i++) {
    if (filter && children[i].classList.contains(filter)) {
      continue;
    }
    if (children[i] === element) {
      return index;
    }
    index++;
  }
  return -1;
}
933830
def find_class(self, name):
        """"""
        defclass = lib.EnvFindDefclass(self._env, name.encode())
        if defclass == ffi.NULL:
            raise LookupError("Class '%s' not found" % name)

        return Class(self._env, defclass)
1139880
function filterfrom(filter, o) {
		var t = filter(o);
		if (gui.Type.isConstructor(t)) {
			t = constructas(t, o);
		} else if (edb.Type.is(t) || t === null) {
			t = t;
		} else {
			fail(
				'edb.Type constructor or instance',
				gui.Type.of(t),
				'return null for nothing'
			);
		}
		return t;
	}
887589
def get_filters(self):
        
        if self._filters:
            filters_list = self._filters
            if isinstance(filters_list[-1], Enum):
                filters_list = filters_list[:-1]
            return ' '.join(
                [fs.value if isinstance(fs, Enum) else fs[1] for fs in
                 filters_list]).strip()
        else:
            return None
867284
def find_class(self):
        """"""
        classes = {1: InstructionGotoTable, 2: InstructionWriteMetadata,
                   3: InstructionWriteAction, 4: InstructionApplyAction,
                   5: InstructionClearAction, 6: InstructionMeter}
        return classes.get(self.value, None)
303806
function(attrs, first) {
      if (!attrs || !Object.keys(attrs).length) return first ? void 0 : [];
      return this[first ? 'find' : 'filter'](function(model) {
        for (var key in attrs) {
          if (attrs[key] !== model.get(key)) return false;
        }
        return true;
      });
    }
1205844
def classes(
            self,
            name=None,
            function=None,
            header_dir=None,
            header_file=None,
            recursive=None,
            allow_empty=None):
        """"""
        return (
            self._find_multiple(
                self._impl_matchers[scopedef_t.class_],
                name=name,
                function=function,
                decl_type=self._impl_decl_types[
                    scopedef_t.class_],
                header_dir=header_dir,
                header_file=header_file,
                recursive=recursive,
                allow_empty=allow_empty)
        )
111077
protected function getClassNameWithParams($filter)
    {
        $pattern = explode(':', $filter);

        $className = trim($pattern[0]);

        $params = [];

        if(isset($pattern[1])) {
            $params = array_map('trim', explode(',', $pattern[1]));
        }

        return [$className, $params];
    }