Removes all entries from c except for the bottom <code>num</code>
187265
public static <E> void retainBottom(Counter<E> c, int num) {
    int numToPurge = c.size() - num;
    if (numToPurge <= 0) {
      return;
    }

    List<E> l = Counters.toSortedList(c);
    for (int i = 0; i < numToPurge; i++) {
      c.remove(l.get(i));
    }
  }
238715
public void discard(int count) {
    assert elementsCount >= count;

    elementsCount -= count;
    /* #if ($TemplateOptions.KTypeGeneric) */
    Arrays.fill(buffer, elementsCount, elementsCount + count, null);
    /* #end */
  }
1084937
public void removeTrailingWhitespaces()
    {
        int last = -1;
        for (int i = text.length() - 1; i >= 0; i--)
        {
            if (isWhitespace(text.charAt(i)))
                last = i;
            else
                break;
        }
        if (last != -1)
        {
            text = text.substring(0, last);
            textStart = 0;
            textEnd = last;
        }
    }
1066754
def _remove_n(self):
        ''''''
        for i, result in enumerate(self.results):
            largest = max(str(result).split('N'), key=len)
            start = result.locate(largest)[0][0]
            stop = start + len(largest)
            if start != stop:
                self.results[i] = self.results[i][start:stop]
1044788
def remove_last_entry(self):
        """"""
        self.current_beat -= 1.0 / self.bar[-1][1]
        self.bar = self.bar[:-1]
        return self.current_beat
970242
public void removeLRU() {
        int removeCount = (int) Math.max((size() * trimFactor), 1);

        Iterator<Map.Entry<K, V>> entries = entrySet().iterator();
        while ((removeCount--) > 0 && entries.hasNext()) {
            entries.next();
            entries.remove();
        }
    }
170335
def _remove_empty_entries(entries):
    """"""
    valid_entries = []
    for entry in set(entries):
        if entry:
            valid_entries.append(entry)
    return sorted(valid_entries)
330488
protected void removeEntry(T entry) {
        T prev = entry.getPrev();
        T next = entry.getNext();
        if (prev != null) {
            prev.setNext(next);
        } else {
            head = next;
        }
        if (next != null) {
            next.setPrev(prev);
        } else {
            last = prev;
        }
        size--;
    }
140016
def discard_last(self, indices):
        """"""
        for i in indices:
            self.buffer_expire[i] = self.buffer_expire[i][:-1]
            self.buffer[i] = self.buffer[i][:-1]
1077275
private void removeLastEntry() {
    Entry<E> entry = indexToEntry.remove(size() - 1);
    keyToEntry.remove(entry.key);
  }
1215186
public void validateAndRemoveEmptyRows() {
		Iterator<List<?>> it = rows.iterator();
		int i = -1;
		while (it.hasNext()) {
			i++;
			List<?> lvRow = it.next();
			if (lvRow.size() != numberOfColumns) {
				if (lvRow.size() == 1 && lvRow.get(0).toString().trim().length() == 0) {
					it.remove();
				} else {
					throw new IllegalStateException("Row: " + i + " - expected number of columns: " + numberOfColumns + " but was " + lvRow.size() + " --> " + lvRow);
				}	
			}
		}
	}
502000
private void removeUseless() {
    Set<Map.Entry<String, PropertyNode>> entries = _children.entrySet();
    for (Iterator<Map.Entry<String, PropertyNode>> it = entries.iterator(); it.hasNext(); ) {
      Map.Entry<String, PropertyNode> entry = it.next();
      PropertyNode child = entry.getValue();
      child.removeUseless();
      if (child.isUseless()) {
        it.remove();
      }
    }
  }
288091
public final void removeElementAt(int i)
  {

    if (i > m_firstFree)
      System.arraycopy(m_map, i + 1, m_map, i, m_firstFree);
    else
      m_map[i] = java.lang.Integer.MIN_VALUE;

    m_firstFree--;
  }
619402
function lrem(count, value) {
  var ind, deleted = 0;
  if(count === 0) {
    while((ind = this.indexOf(value)) !== -1) {
      this._data.splice(ind, 1);
      deleted++;
    }
  }else if(count > 0) {
    while((ind = this.indexOf(value)) !== -1 && (deleted < count)) {
      this._data.splice(ind, 1);
      deleted++;
    }
  }else{
    count = Math.abs(count);
    while((ind = this.lastIndexOf(value)) !== -1 && (deleted < count)) {
      this._data.splice(ind, 1);
      deleted++;
    }
  }
  return deleted;
}
1287457
private synchronized void trim() {
        while (mCurrentSize > mSizeLimit) {
            byte[] buf = mBuffersByLastUse.remove(0);
            mBuffersBySize.remove(buf);
            mCurrentSize -= buf.length;
        }
    }
1121124
void skipMember() {
        bp = bp + 6;
        char ac = nextChar();
        for (int i = 0; i < ac; i++) {
            bp = bp + 2;
            int attrLen = nextInt();
            bp = bp + attrLen;
        }
    }
289397
private void removeEntry(EntryImpl<K, V> entry) {

    // Removes from bucket.
    EntryImpl<K, V> previous = entry._previous;
    EntryImpl<K, V> next = entry._next;
    if (previous != null) {
      previous._next = next;
      entry._previous = null;
    } else { // First in bucket.
      _entries[entry._index] = next;
    }
    if (next != null) {
      next._previous = previous;
      entry._next = null;
    } // Else do nothing, no last pointer.

    // Removes from collection.
    EntryImpl<K, V> before = entry._before;
    EntryImpl<K, V> after = entry._after;
    if (before != null) {
      before._after = after;
      entry._before = null;
    } else { // First in collection.
      _mapFirst = after;
    }
    if (after != null) {
      after._before = before;
    } else { // Last in collection.
      _mapLast = before;
    }

    // Clears value and key.
    entry._key = null;
    entry._value = null;

    // Recycles.
    entry._after = _poolFirst;
    _poolFirst = entry;

    // Updates size.
    _size--;
    sizeChanged();
  }