Find all

@param string selector
@param string results
@param array arguments

@return array results
336329
public function findAll($selector, $function, $arguments = array())
    {
        if (!$this->parser) {
            return;
        }

        $nodes = $this->parser->find($selector);

        if (!$nodes) {
            return;
        }

        if (!is_array($arguments)) {
            $arguments = array($arguments);
        }

        $results = array();

        foreach ($nodes as $node) {
            $results[] = call_user_func_array(array($node, $function), $arguments);
        }

        return $results;
    }
1356538
private function search(&$search, $idx, $selectors, $level, $search_level = 0) {
		if ($search_level >= $level) {
			$rs = $this->seek($search, $selectors, $level - 1);
			if ($rs !== FALSE && $idx !== NULL) {
				if ($idx == count($this->_lFind)) {
					$this->_lFind[] = new self($rs);
					return TRUE;
				} else {
					$this->_lFind[] = new self($rs);
				}
			} elseif ($rs !== FALSE) {
				$this->_lFind[] = new self($rs);
			}
		}
		if (!empty($search->childNodes)) {
			foreach ($search->childNodes as $val) {
				if ($this->search($val, $idx, $selectors, $level, $search_level + 1)) {
					return TRUE;
				}
			}
		}
		return FALSE;
	}
954264
function resolveSelectorHelper(selector, opts, resultArr) {
  if (selector !== null && typeof selector === 'object') {
    if (typeof selector._resolveSelectorHelper === 'function') {
      selector._resolveSelectorHelper(opts, resultArr);
      return;
    }
    if (Array.isArray(selector)) {
      for (var i = 0; i < selector.length; i++) {
        resolveSelectorHelper(selector[i], opts, resultArr);
      }
      return;
    }
  }

  // Handle scalar case
  var intInds;
  switch (opts.resolveMode) {
    case RESOLVE_MODE.INT:
      resultArr.push(resolveIntIdx(selector, opts.maxLen));
      break;
    case RESOLVE_MODE.COL:
      if (isNumber(selector)) {
        resultArr.push(resolveIntIdx(selector, opts.maxLen));
      } else if (isString(selector) || selector === null) {
        intInds = opts.index.lookupKey([selector]);
        processLookupResults(intInds, selector, opts, resultArr);
      } else {
        throw new Error('expected integer or string selector but got: ' +
          selector);
      }
      break;
    case RESOLVE_MODE.KEY:
      if (opts.index.arity === 1) {
        var expectedDtype = opts.index.initVectors[0].dtype;
        validateScalarIsDtype(selector, expectedDtype);
        intInds = opts.index.lookupKey([selector]);
        processLookupResults(intInds, selector, opts, resultArr);
      } else {
        // TODO
        throw new Error('unimplemented case (TODO)');
      }
      break;
    default:
      throw new Error('Unrecognized RESOLVE_MODE: ' + opts.resolveMode);
  }
}
467766
function (selector) {
        var match = this.match;

        function compileNameFilter(name) {
          if (name) {
            name = name.toLowerCase();

            return function (item) {
              return name === '*' || item.type === name;
            };
          }
        }

        function compileIdFilter(id) {
          if (id) {
            return function (item) {
              return item._name === id;
            };
          }
        }

        function compileClassesFilter(classes) {
          if (classes) {
            classes = classes.split('.');

            return function (item) {
              var i = classes.length;

              while (i--) {
                if (!item.classes.contains(classes[i])) {
                  return false;
                }
              }

              return true;
            };
          }
        }

        function compileAttrFilter(name, cmp, check) {
          if (name) {
            return function (item) {
              var value = item[name] ? item[name]() : '';

              return !cmp ? !!check :
                cmp === "=" ? value === check :
                  cmp === "*=" ? value.indexOf(check) >= 0 :
                    cmp === "~=" ? (" " + value + " ").indexOf(" " + check + " ") >= 0 :
                      cmp === "!=" ? value != check :
                        cmp === "^=" ? value.indexOf(check) === 0 :
                          cmp === "$=" ? value.substr(value.length - check.length) === check :
                            false;
            };
          }
        }

        function compilePsuedoFilter(name) {
          var notSelectors;

          if (name) {
            name = /(?:not\((.+)\))|(.+)/i.exec(name);

            if (!name[1]) {
              name = name[2];

              return function (item, index, length) {
                return name === 'first' ? index === 0 :
                  name === 'last' ? index === length - 1 :
                    name === 'even' ? index % 2 === 0 :
                      name === 'odd' ? index % 2 === 1 :
                        item[name] ? item[name]() :
                          false;
              };
            }

            // Compile not expression
            notSelectors = parseChunks(name[1], []);

            return function (item) {
              return !match(item, notSelectors);
            };
          }
        }

        function compile(selector, filters, direct) {
          var parts;

          function add(filter) {
            if (filter) {
              filters.push(filter);
            }
          }

          // Parse expression into parts
          parts = expression.exec(selector.replace(whiteSpace, ''));

          add(compileNameFilter(parts[1]));
          add(compileIdFilter(parts[2]));
          add(compileClassesFilter(parts[3]));
          add(compileAttrFilter(parts[4], parts[5], parts[6]));
          add(compilePsuedoFilter(parts[7]));

          // Mark the filter with pseudo for performance
          filters.pseudo = !!parts[7];
          filters.direct = direct;

          return filters;
        }

        // Parser logic based on Sizzle by John Resig
        function parseChunks(selector, selectors) {
          var parts = [], extra, matches, i;

          do {
            chunker.exec("");
            matches = chunker.exec(selector);

            if (matches) {
              selector = matches[3];
              parts.push(matches[1]);

              if (matches[2]) {
                extra = matches[3];
                break;
              }
            }
          } while (matches);

          if (extra) {
            parseChunks(extra, selectors);
          }

          selector = [];
          for (i = 0; i < parts.length; i++) {
            if (parts[i] != '>') {
              selector.push(compile(parts[i], [], parts[i - 1] === '>'));
            }
          }

          selectors.push(selector);

          return selectors;
        }

        this._selectors = parseChunks(selector, []);
      }
923691
function querySelector(selector) {
    init();
    if (!selector) {
      return tokens;
    }
    var match = selector.match(
      /^\s*([\w_-]*)((\s*\[[\w_-]+\s*=\s*("([^\\"]*(\\.)*)*"|'([^\\']*(\\.)*)*'|[^\[\]]*)\])*)\s*(\*?)$/
    );
    if (!match) {
      console.warn(colors.blue('Invalid selector expressions %j.'), selector);
      return;
    }
    var tag = match[1];
    var attributes = [];
    var all = match[9] === '*';
    match[2].replace(/\s*\[([\w_-]+)\s*=\s*("([^\\"]*(\\.)*)*"|'([^\\']*(\\.)*)*'|[^\[\]]*)\]/g,
      function (match, name, value) {
        if (/^['"]/.test(value)) {
          /*jslint evil: true */
          value = new Function('return (' + value + ');')();
        }
        attributes.push({
          name: name,
          value: value
        });
      }
    );
    function check(node) {
      if (!node || !node.attrs) {
        return;
      }
      var flag;
      if (!tag || node.tag === tag) {
        flag = true;
        attributes.every(function (item) {
          if (item.value !== node.attrs[item.name]) {
            flag = false;
          }
          return flag;
        });
      }
      return flag;
    }
    var items;
    function scan(node) {
      if (check(node)) {
        if (items) {
          items.push(node);
        }
        return node;
      }
      var result;
      if (node.nodes) {
        node.nodes.every(function (item) {
          result = scan(item);
          return items || !result;
        });
      }
      return result;
    }
    if (all) {
      items = [];
      scan(tokens);
      return items;
    }
    else {
      return scan(tokens);
    }
  }
1242150
def findall(self, string, *args, **kwargs):
        """"""

        return self._pattern.findall(string, *args, **kwargs)
349594
function findAndRemove($selector, $idx = null ,$excludes = array())
    {
        if (empty($excludes)) return $this->find($selector,$idx);

        foreach ($excludes as $exclude) {
            foreach ($this->find($exclude) as $node) {
                $node->outertext = '';
            }
        }
        $this->load($this->save());
        return $this->find($selector,$idx);
    }
557023
function find(selector) {
  var arr = [], $ = this.air, slice = this.slice;
  this.each(function(el) {
    arr = arr.concat(slice.call($(selector, el).dom));
  });
  return $(arr);
}
593130
public function fetchAll($as = 'array', $arguments = '')
    {

        $rows = array();
        $style = array(
            "array" => "fetchAssoc",
            "numeric" => "fetch",
            "object" => "fetchObject"
        );

        $as = !array_key_exists((string)$as, $style) ? "array" : (string)$as;

        //Getting all as an array
        while ($row = $this->$style[$as]($arguments)) {
            $rows[] = $row;
        }

        //Return the resultset;
        return $rows;
    }
160178
public function findAll($query = null) {
        if ($query === null) {
            $mapping = $this->getMapping();
            $table = $this->escapeIdentifier($mapping['table']);
            $query = 'select * from '.$table;
        }
        return $this->getWorker()->findAll($query);
    }
1156442
public @NotNull <T> List<T> findAll(@NotNull RowMapper<T> rowMapper, @NotNull @SQL String sql, Object... args) {
        return findAll(rowMapper, SqlQuery.query(sql, args));
    }
492737
function findElementSelectors() {
	/* jshint validthis:true */
	var self = this;

	// reset selectors
	this.selectors = [];

	this.testFiles.forEach(function(item) {
		self.selectors = self.selectors.concat(findSelectors.init(item));
	});

	checkSelectorViewMatches.call(this);
}
232086
public function findAll()
	{
		$elements = array();

		foreach ( $this->getSelectors() as $selector ) {
			$elements = array_merge($elements, $this->searchContext->findAll('se', $selector));
		}

		$element_count = count($elements);

		if ( $element_count > 1 && !$this->property->isDataTypeArray() && !$this->property->isDataTypeCollection() ) {
			throw new ElementException(
				sprintf(
					'The "%s" used on "%s" property expects finding 1 element, but %s elements were found.',
					$this->property->getRawDataType(),
					$this->property,
					$element_count
				),
				ElementException::TYPE_MULTIPLE_ELEMENTS_FOUND
			);
		}

		return $elements;
	}
557722
function selectorQuerySpy(results, selector) {
        var context = phantomas.getDOMPath(this);

        phantomas.incrMetric('DOMqueriesByQuerySelectorAll');
        phantomas.addOffender('DOMqueriesByQuerySelectorAll', {selector, node: context});
        querySpy('selector', selector, 'querySelectorAll', context, (results === null || results.length === 0));
    }
475139
@Override
  public void findAll(Result<Iterable<byte[]>> result,
                      byte []tableKey,
                      String sql, 
                      Object[] args)
  {
    try {
      TableKraken table = _tableManager.getTable(tableKey);
      
      if (table == null) {
        throw new QueryException(L.l("'{0}' is an unknown table.",
                                     Hex.toShortHex(tableKey)));
      }
      
      QueryBuilderKraken builder = QueryParserKraken.parse(_tableManager, sql);
      
      QueryKraken query = builder.build();
      
      query.findAllLocalKeys(result, args);
    } catch (Throwable e) {
      result.fail(e);
    }
  }
327146
function findAll (el, node) {
  return [].slice.call(node ? el.querySelectorAll(node) : $.querySelectorAll(el))
}
1248604
public function children($selector=null)
    {
        $result = $this->createChildInstance();

        if (isset($this->document) && $this->length > 0) {
            if (isset($this->root_instance) || $this->getXpathQuery()) {
                foreach ($this->nodes as $node) {
                    if ($node->hasChildNodes()) {
                        $result->loadDomNodeList($node->childNodes);
                    }
                }
            } else {
                $result->loadDomNodeList($this->document->childNodes);
            }

            if ($selector !== false) { // filter out text nodes
                $filtered_elements = array();
                foreach ($result->getElements() as $result_elm) {
                    $filtered_elements[] = $result_elm;
                }
                $result->nodes = $filtered_elements;
                $result->length = \count($result->nodes);
            }

            if ($selector) {
                $result = $result->filter($selector);
            }
        }

        return $result;
    }