Indexes on the left, other fields in alphabetical order on the right.
164316
def _nice_fieldnames(all_columns, index_columns):
    ""
    non_index_columns = set(all_columns).difference(index_columns)
    return index_columns + sorted(non_index_columns)
186453
private void moveIndex() {
		int i = rightmostIndexBelowMax();
		if (i >= 0) {
			index[i] = index[i]+1; 
			for (int j = i+1; j<r; j++)
				index[j] = index[j-1] + 1;
		}
		else hasNext = false;
	}
992651
function IndexEntrySee($txta, $txtb)
	{
		if ($this->directionality == 'rtl') { // *OTL*
			// ONLY DO THIS IF NOT IN TAGS
			if ($txta == strip_tags($txta)) {
				$txta = str_replace(':', ' - ', $txta); // *OTL*
			}
			if ($txtb == strip_tags($txtb)) {
				$txtb = str_replace(':', ' - ', $txtb); // *OTL*
			}
		} // *OTL*
		else { // *OTL*
			if ($txta == strip_tags($txta)) {
				$txta = str_replace(':', ', ', $txta);
			}
			if ($txtb == strip_tags($txtb)) {
				$txtb = str_replace(':', ', ', $txtb);
			}
		} // *OTL*
		$this->Reference[] = ['t' => $txta . ' - see ' . $txtb, 'p' => []];
	}
1221305
def index_field(self, index=Index()):
        
        # Set field index
        # Note: Updates the field alignment offset as well
        self.index = index

        # Bit offset for the next field
        byte, bit, address, base, update = index
        bit += self.bit_size

        # Field group size
        group_size, offset = divmod(bit, 8)

        # End of field group?
        if self.alignment.byte_size == group_size:
            # Bad aligned field group?
            if offset is not 0:
                raise FieldGroupSizeError(self, index,
                                          Alignment(group_size + 1,
                                                    self.alignment.bit_offset))
            else:
                # Move byte index for the next field group
                byte += self.alignment.byte_size
                # Reset bit offset for the next field group
                bit = 0
                # Move address for the next field group
                address += self.alignment.byte_size
        # Index for the next field
        return Index(byte, bit, address, base, update)
318431
def selected_indexes(self, ):
        
        i = self.model().index(self.currentIndex(), 0, self.rootModelIndex())
        return [i]
354483
def _index(self, item):
        ''''''
        index = bisect.bisect_left(self._members, item)
        if index != len(self) and self._members[index] == item:
            return index

        return -1
82483
function (left, right) {
    var result = [];
    var leftIndex = 0;
    var rightIndex = 0;

    while (leftIndex < left.length && rightIndex < right.length) {
        if (dependencyComparator(left[leftIndex], right[rightIndex]) < 1) {
            result.push(left[leftIndex++]);
        } else {
            result.push(right[rightIndex++]);
        }
    }

    return result.
    concat(left.slice(leftIndex)).
    concat(right.slice(rightIndex));
}
871507
private void createIndex() {
        try {
            client.createIndex(name(), workspace, columns.mappings(workspace));
            client.flush(name());
        } catch (IOException e) {
            throw new EsIndexException(e);
        }
    }
682537
def get_ordering_fields_lookups(self):
        
        ordering_field = []
        for field_name in self.get_ordering_fields():
            ordering_field.append(self._get_ordering_field_lookup(field_name))
        return ordering_field
1222850
def get_sorted_fields(self):
        
        inf = float("inf")
        order = self.get_field_order()

        def field_cmp(field1, field2):
            _n1 = field1.getName()
            _n2 = field2.getName()
            _i1 = _n1 in order and order.index(_n1) + 1 or inf
            _i2 = _n2 in order and order.index(_n2) + 1 or inf
            return cmp(_i1, _i2)

        return sorted(self.get_fields(), cmp=field_cmp)
832345
private void quicksort(short[] a, int[] indexes, int left, int right) {
        if (right <= left)
            return;
        int i = partition(a, indexes, left, right);
        quicksort(a, indexes, left, i - 1);
        quicksort(a, indexes, i + 1, right);
    }
941485
function _sortByAlpha(topics) {
            return topics
                .map(d => d)
                .sort((a, b) => {
                    if (a.name > b.name) return 1;
                    if (a.name === b.name) return 0;

                    return -1;
                });

            let otherIndex = topics.map(({ name }) => name).indexOf('Other');

            if (otherIndex >= 0) {
                let other = topics.splice(otherIndex, 1);

                topics = topics.concat(other);
            }
        }
313737
function findMatchingIndexes(selector, userFields, sortOrder, indexes) {

  return indexes.reduce(function (res, index) {
    var indexMatches = checkIndexMatches(index, sortOrder, userFields, selector);
    if (indexMatches) {
      res.push(index);
    }
    return res;
  }, []);
}
1058759
private void insertionSort(int left, int right) {
        for (int p = left + 1; p <= right; p++) {
            byte[] tmpRange = ranges[p];
            String tmpFilename = filenames[p];

            int j;
            for (j = p; j > left && KeyUtils.compareKey(tmpRange, ranges[j - 1]) < 0; j--) {
                ranges[j] = ranges[j - 1];
                filenames[j] = filenames[j - 1];
            }
            ranges[j] = tmpRange;
            filenames[j] = tmpFilename;
        }
    }
541006
def sortable_fields_for(model)
      if model.respond_to?(:sortable_fields)
        model.sortable_fields.map(&:to_sym)
      elsif model.respond_to?(:column_names)
        model.column_names.map(&:to_sym)
      else
        []
      end
    end
804623
def todict(self):
        """"""
        return OrderedDict((name, self[i]) for i, name in enumerate(self._fields))
607217
def _BuildIndex(self):
        """"""
        self._index = {}
        for i, k in enumerate(self._keys):
            self._index[k] = i