Retrieve list alphabetically by name test order parameter
505647
function getAlphabetical() {
      try {
        storeBeingTested.getList(test.list, {}, {name: 1}, function (list, error) {
          if (typeof error != 'undefined') {
            callback(error);
            return;
          }
          // Verify each move returns true when move succeeds
          test.shouldBeTrue(list.moveFirst(), 'moveFirst');
          test.shouldBeTrue(!list.movePrevious(), 'movePrevious');
          test.shouldBeTrue(list.get('name') == 'Al Pacino', 'AP');
          test.shouldBeTrue(list.moveLast(), 'moveLast');
          test.shouldBeTrue(!list.moveNext(), 'moveNext');
          test.shouldBeTrue(list.get('name') == 'Tom Hanks', 'TH');
          callback(true);
        });
      }
      catch (err) {
        callback(err);
      }
    }
804623
def todict(self):
        """"""
        return OrderedDict((name, self[i]) for i, name in enumerate(self._fields))
395283
def list_names(cls):
        """"""
        response = subwrap.run(['lxc-ls'])
        output = response.std_out
        return map(str.strip, output.splitlines())
854872
def order_search(self, search):
        
        ordering = self.get_query_param('ordering', self.ordering)
        if not ordering:
            return search

        sort_fields = []
        for raw_ordering in ordering.split(','):
            ordering_field = raw_ordering.lstrip('-')
            if ordering_field not in self.ordering_fields:
                raise ParseError('Ordering by `{}` is not supported.'.format(ordering_field))

            ordering_field = self.ordering_map.get(ordering_field, ordering_field)
            direction = '-' if raw_ordering[0] == '-' else ''
            sort_fields.append('{}{}'.format(direction, ordering_field))

        return search.sort(*sort_fields)
1230976
def order_items(params={})
      order_items = get("/orders/#{id}/order_items")
      if order_items
        order_items["order_items"].map { |data| FetchAppAPI::OrderItem.new(data) }
      end
    end
265997
public static function byNames(
        Client $client,
        array $names,
        string $orderBy = self::ORDER_NAME,
        bool $hideEmpty = true
    ): array {
        if (!self::isValidOrderingMethod($orderBy)) {
            throw new InvalidArgumentException('Invalid order method');
        }

        $query = [
            'search' => [
                'order' => $orderBy,
                'hide_empty' => $hideEmpty === true ? 'yes' : 'no',
                'name' => implode(',', $names),
            ],
        ];

        $tagsAsArrays = $client->sendRequest(
            self::ENDPOINT,
            $query
        );

        return array_map(function (array $tag): self {
            return self::fromArray($tag);
        }, $tagsAsArrays);
    }
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)
934062
def _list_handle(self, listmatch):
        """"""
        out = []
        name = listmatch.group(1)
        args = listmatch.group(2)
        for arg in self._list_members.findall(args):
            out.append(self._unquote(arg))
        return name, out
364089
def getIndexes(cls) :
		""
		con = RabaConnection(cls._raba_namespace)
		idxs = []
		for idx in con.getIndexes(rabaOnly = True) :
			if idx[2] == cls.__name__ :
				idxs.append(idx)
			else :
				for k in cls.columns :
					if RabaFields.isRabaListField(getattr(cls, k)) and idx[2] == con.makeRabaListTableName(cls.__name__, k) :
						idxs.append(idx)
		return idxs
1079437
public static Result list(int page, String sortBy, String order, String filter) {
        return ok(
            list.render(
                Computer.page(page, 10, sortBy, order, filter),
                sortBy, order, filter
            )
        );
    }
990200
def order_by(self, *colnames):
        
        if len(colnames) == 0:
            clone = copy.deepcopy(self)
            clone._order = []
            return clone

        conditions = []
        for colname in colnames:
            conditions.append('"{}" {}'.format(*self._get_ordering_condition(colname)))

        clone = copy.deepcopy(self)
        clone._order.extend(conditions)
        return clone
994174
def _order_queries(self):
        """"""
        from .condition import Order
        order = []
        for column in self.columns:
            if column.order_by:
                o = Order(self.cls, column.attr, column.order_by)
                order.append(o.__query__())
        if not order:
            k = self.columns[0].attr
            o = Order(self.cls, k)
            self.columns[0].order_by = o.order
            order.append(o.__query__())
        return order
1066220
def get_order_args():
    
    orders = {}
    for arg in request.args:
        re_match = re.findall("_oc_(.*)", arg)
        if re_match:
            order_direction = request.args.get("_od_" + re_match[0])
            if order_direction in ("asc", "desc"):
                orders[re_match[0]] = (request.args.get(arg), order_direction)
    return orders
154328
public List/*< String >*/ getParameters( String name )
    {
        if ( _parameters == null || !_parameters.hasParameters())
            return Collections.EMPTY_LIST;
        else {

            List parameters = _parameters.getParameterValues(name);
            if(parameters == null)
                return Collections.EMPTY_LIST;
            else return Collections.unmodifiableList(parameters);
        }
    }
1264480
function getJavaScriptCallbackParameterListSimple(parameters) {
    var result = []

    parameters.forEach(function(parameter){
        if (!parameter.out) return
        result.push("/*" + getIdlType(parameter.type) + "*/ "+ parameter.name)
    })

    return result.join(", ")
}
337300
def _get_names(dirs):
  """"""
  alphabets = set()
  label_names = {}
  for d in dirs:
    for example in _walk_omniglot_dir(d):
      alphabet, alphabet_char_id, label, _ = example
      alphabets.add(alphabet)
      label_name = "%s_%d" % (alphabet, alphabet_char_id)
      if label in label_names:
        assert label_names[label] == label_name
      else:
        label_names[label] = label_name
  label_names = [label_names[k] for k in sorted(label_names)]
  return alphabets, label_names
703337
static function fetchListByOrder( $orderID, $asObject = true )
    {
        $db = eZDB::instance();

        $orderID = (int)$orderID;
        $rows = $db->arrayQuery(  "SELECT ezorder_status_history.*, ezorder_status.name AS status_name " .
                                  "FROM ezorder_status_history, ezorder_status " .
                                  "WHERE order_id = $orderID AND" .
                                  "      ezorder_status.status_id = ezorder_status_history.status_id " .
                                  "ORDER BY ezorder_status_history.modified DESC" );

        return eZPersistentObject::handleRows( $rows, 'eZOrderStatusHistory', $asObject );
    }