return all suitable-for-sortable elements in a guaranteed order
3519
function(element, options) {
    return Element.findChildren(
      element, options.only, options.tree ? true : false, options.tag);
  }
1337698
def get_order(self, codes):
        """"""
        return sorted(codes, key=lambda e: [self.ev2idx.get(e)])
562773
def flags(self, index):
        "
        return QtCore.Qt.ItemIsEditable | QtCore.Qt.ItemIsEnabled | QtCore.Qt.ItemIsSelectable
850489
public function sortedSet(): self
    {
        $obj = clone $this;
        usort($obj->_elements,
            function (Element $a, Element $b) {
                if ($a->typeClass() != $b->typeClass()) {
                    return $a->typeClass() < $b->typeClass() ? -1 : 1;
                }
                if ($a->tag() == $b->tag()) {
                    return 0;
                }
                return $a->tag() < $b->tag() ? -1 : 1;
            });
        return $obj;
    }
1187181
def _build_block_element_list(self):
        
        return sorted(
            [e for e in self.block_elements.values() if not e.virtual],
            key=lambda e: e.priority,
            reverse=True
        )
93044
def sort(input, property = nil)
      ary = InputIterator.new(input)

      return [] if ary.empty?

      if property.nil?
        ary.sort do |a, b|
          nil_safe_compare(a, b)
        end
      elsif ary.all? { |el| el.respond_to?(:[]) }
        begin
          ary.sort { |a, b| nil_safe_compare(a[property], b[property]) }
        rescue TypeError
          raise_property_error(property)
        end
      end
    end
1226286
def order_by(self, order_attribute):
        '''  '''
        to_return = []
        for f in sorted(self.items, key=lambda i: getattr(i, order_attribute)):
            to_return.append(f)
        return to_return
277882
def get_ordered_options(self, hidden=False):
        
        return [opt.as_dict() for opt in self.options.values() \
                                            if hidden or (not opt.hidden)]
723191
def get_sorting(self, request, **resources):
        
        sorting = []

        if not request.GET:
            return sorting

        prefix = self._meta.dyn_prefix + 'sort'
        return request.GET.getlist(prefix)
955482
private static List<ClasspathElement> orderClasspathElements(
            final Collection<Entry<Integer, ClasspathElement>> classpathEltsIndexed) {
        final List<Entry<Integer, ClasspathElement>> classpathEltsIndexedOrdered = new ArrayList<>(
                classpathEltsIndexed);
        CollectionUtils.sortIfNotEmpty(classpathEltsIndexedOrdered, INDEXED_CLASSPATH_ELEMENT_COMPARATOR);
        final List<ClasspathElement> classpathEltsOrdered = new ArrayList<>(classpathEltsIndexedOrdered.size());
        for (final Entry<Integer, ClasspathElement> ent : classpathEltsIndexedOrdered) {
            classpathEltsOrdered.add(ent.getValue());
        }
        return classpathEltsOrdered;
    }
779444
def sort_by_z(self):
        """"""
        return self.__class__(sorted(self, key=lambda p: p.Z))
219639
public static <K> Matcher<Iterable<K>> sorted(final Comparator<K> comparator) {
        return IsSortedIterableWithComparator.sorted(comparator);
    }
813050
def sort(iterable):
    
    ips = sorted(normalize_ip(ip) for ip in iterable)
    return [clean_ip(ip) for ip in ips]
699307
def get_ordered_children(self):
        
        ordered_keys = self.element.ordered_children if self.element.ordered_children is not None else []
        children = [self.indexes.get(k, None) for k in ordered_keys]
        return children
908940
def order(self):
        
        return [x.val for theclass in self.classes for x in theclass.items]
553443
def all(cls, sort=None, limit=None):
        
        return cls.where(sort=sort, limit=limit)
1354047
def get_ordering(self):
        """"""
        _, ordering = self.token_next_by(t=T.Keyword.Order)
        return ordering.normalized if ordering else None