Instantiates a bit array with given size.
@param {number} [size = 0] the size of the bit array
@return {void}
3943
function(size){
  this.data = [];
  if(typeof size === 'undefined'){
    return; // Empty instance of a bit array
  }
  if(typeof size !== 'number'){
    size = shred(size);
  }
  for(var i=0; i<Math.ceil(size/INTEGER_SIZE); ++i){
    this.data.push(0);
  }
}
316183
function(arrayBuffer, sliceSize) {
		var segments= [],
			fi = 0;
		while(fi * sliceSize < arrayBuffer.byteLength){
			segments.push(arrayBuffer.slice(fi * sliceSize, (fi + 1) * sliceSize));
			fi++;
		}
		return segments;
	}
1186146
private static int[] createIntArray(int size, int initialValue)
    {
        int[] array = new int[size];

        for (int i = 0; i < size; ++i)
        {
            array[i] = initialValue;
        }

        return array;
    }
56660
private static BitSet randomBitSet(int size, int cardinality, Random random) {
        BitSet result = new BitSet(size);
        int[] chosen = new int[cardinality];

        for (int i = 0; i < cardinality; ++i) {
            chosen[i] = i;
            result.set(i);
        }
        for (int i = cardinality; i < size; ++i) {
            int j = random.nextInt(i+1);
            if (j < cardinality) {
                result.clear(chosen[j]);
                result.set(i);
                chosen[j] = i;
            }
        }
        return result;
    }
284802
function(size) {
		if (typeof(size) !== 'string') {
			return size;
		}
		
		var muls = {
				t: 1099511627776,
				g: 1073741824,
				m: 1048576,
				k: 1024
			},
			mul;

		size = /^([0-9]+)([mgk]?)$/.exec(size.toLowerCase().replace(/[^0-9mkg]/g, ''));
		mul = size[2];
		size = +size[1];
		
		if (muls.hasOwnProperty(mul)) {
			size *= muls[mul];
		}
		return size;
	}
1267101
public static IntArray getInstance(int size, int bitCount, ByteOrder order)
    {
        switch (bitCount)
        {
            case 8:
                return getInstance(new byte[size], bitCount, order);
            case 16:
                return getInstance(new byte[2*size], bitCount, order);
            case 32:
                return new InArray(size);
            default:
                throw new UnsupportedOperationException(bitCount+" not supported");
        }
    }
162068
function(size) {
      return this.put(new SVG.Circle).rx(new SVG.Number(size).divide(2)).move(0, 0)
    }
1181687
def newarray(self, length, value=0):
        """"""
        if self.bitdepth > 8:
            return array('H', [value] * length)
        else:
            return bytearray([value] * length)
1183109
function(size) {
        if (this.array_size >= this.max_size) return;

        var newsize = Math.min(size, this.max_size);

        var newAttributeArray = new Float32Array(newsize * 4 * this.stride);
        var newIndexArray = new Uint16Array(6 * newsize);

        newAttributeArray.set(this._attributeArray);
        newIndexArray.set(this._indexArray);

        this._attributeArray = newAttributeArray;
        this._indexArray = newIndexArray;
        this.array_size = newsize;
    }
1252654
function (str, size, ch) {
                str = String(str);
                if (str.length > size) {
                    return str.slice(str.length - size);
                }
                return new Array(size - str.length + 1).join(ch || '0') + str;
            }
134442
private static String[][] resizeArray(String[][] array, int size)
    {
        if (array.length == size) return array;
        String[][] nArray = new String[size][];
        System.arraycopy(array, 0, nArray, 0, size);
        return nArray;
    }
210589
function (bytes) {
    var out = [], i, tmp=0;
    for (i=0; i<bytes.length; i++) {
      tmp = tmp << 8 | bytes[i];
      if ((i&3) === 3) {
        out.push(tmp);
        tmp = 0;
      }
    }
    if (i&3) {
      out.push(sjcl.bitArray.partial(8*(i&3), tmp));
    }
    return out;
  }
1224054
function (name, size, type) {
        this.name = name || '';
        this.size = size || 0;
        this.type = type || null;
    }
553776
function bitSize(x) {
  var j, z, w;
  for (j=x.length-1; (x[j]==0) && (j>0); j--);
  for (z=0, w=x[j]; w; (w>>=1), z++);
  z+=bpe*j;
  return z;
}
129331
function(msgs) {
  var size = 0;
  _.each(msgs, function(msg) {
    size += 8 + 4;
    size += messageByteSize(msg);
  });
  return size;
}
544532
function makeArray( length ) {
    var res = new Array( length );
    var i = -1;

    while( ++i < length ) {
        res[i] = _bluebird2.default.resolve( i );
    }

    return res;
}
450083
function split(arr, size) {
  var out = [];
  var sizes = [];
  var where = size - 1;
  var ptr = 0;
  var i, j;

  for (i = arr.length - 1; i >= 0; i--) {
    sizes[where] = (sizes[where] || 0) + 1;
    if (--where === -1) where = size - 1;
  }

  for (i = 0; i < size; i++) {
    for (j = 0; j < sizes[i]; j++) {
      if (j === 0) out[i] = [arr[ptr]];
      else out[i].push(arr[ptr]);
      ptr++;
    }
  }

  return out;
}