确保结果个数小于等于n
@param n
559382
public void assertSize(int n) {
		while(labels.size()>n){
			labels.removeLast();
			scores.removeLast();
			if(evidences.size()>n)
				evidences.removeLast();
		}

	}
784578
public String shortOrdinal(Long n) {
        return (n == null) ? null : shortOrdinal(n.longValue());
    }
1270130
void addLower(MutableBigInteger addend, int n) {
        MutableBigInteger a = new MutableBigInteger(addend);
        if (a.offset + a.intLen >= n) {
            a.offset = a.offset + a.intLen - n;
            a.intLen = n;
        }
        a.normalize();
        add(a);
    }
673696
public void putback(byte[] bytes, int p, int n) {
        if (numTranscoders == 0 || n == 0) return;
        Transcoding transcoding = elements[0].transcoding;
        System.arraycopy(transcoding.readBuf, transcoding.recognizedLength + transcoding.readAgainLength - n, bytes, p, n);
        transcoding.readAgainLength -= n;
    }
446420
public void skip(long n) throws IllegalArgumentException, NoSuchElementException
   {
      if (n < 0)
      {
         throw new IllegalArgumentException("skip(" + n + ")");
      }

      for (long i = 0; i < n; i++)
      {
         next();
      }
   }
481745
public void rTrim(int n) {
        super.rTrim(n);
        this.setQuality(this.quality.substring(0, this.quality.length() - n));
    }
101536
private void ensureSize(int minsize) {
    if(minsize <= store.length) {
      return;
    }
    int asize = store.length;
    while(asize < minsize) {
      asize = (asize >>> 1) + asize;
    }
    final int[] prev = store;
    store = new int[asize];
    System.arraycopy(prev, 0, store, 0, size);
  }
842064
def _n(name):
    """"""
    n = name.encode('ascii', errors='ignore').decode('ascii')
    n = re.sub('[^A-Za-z0-9_]', '_', n)
    n = re.sub(r'(^[0-9].*)', r'p\1', n)
    return n
468057
public long nextLong(final long n) 
        {
        if (n<=0)
            throw new IllegalArgumentException("n must be > 0");
        
        long bits, val;
        do 
            {
            bits = (nextLong() >>> 1);
            val = bits % n;
            } 
        while(bits - val + (n-1) < 0);
        return val;
        }
862654
function compact(value, keepNewlines) {
  var check = keepNewlines ? / +/g : /\s+/g;
  return value.replace(check, ' ');
}
722879
private void resize(int s) {
        int[] n;
        int count;

        n = new int[s];
        count = (s < data.length)? s : data.length;
        System.arraycopy(data, 0, n, 0, count);
        data = n;
    }
693793
@Override
  public long skip(long n) throws IOException {
    return n > 0 ? (long) inner.skip(Math.min(n, remaining)) : 0;
  }
1094836
public void encodeNBitUnsignedInteger(int b, int n) throws IOException {
		if (b < 0 || n < 0) {
			throw new IllegalArgumentException(
					"Encode negative value as unsigned integer is invalid!");
		}
		assert (b >= 0);
		assert (n >= 0);

		ostream.writeBits(b, n);
	}
381911
public void fromShort(short n) {
    Bits[] v = Bits.values();
    set(v[(n >>> 6) & 7], v[(n >>> 3) & 7], v[n & 7]);
  }
1172387
public void inc(E e, long n) {
    if (counters != null && counters.containsKey(e)) {
      counters.get(e).inc(n);
    }
  }
348670
def truncate(self, n):
        """"""
        # Current byte position - (n * data_size)
        size = self.size - n * self.__strct.size

        # Erase [size] bytes from file.tell()
        self.__file.truncate(size)
1049511
@Override
    public long skip(final long n) {
        if (n < 0) {
            throw new IllegalArgumentException(
                    "Number of characters to skip is less than zero: " + n);
        }
        if (idx >= charSequence.length()) {
            return EOF;
        }
        final int dest = (int)Math.min(charSequence.length(), idx + n);
        final int count = dest - idx;
        idx = dest;
        return count;
    }