Add a value to the buffer.
961297
def add(self, value):
        
        ind = int(self._ind % self.shape)
        self._pos = self._ind % self.shape
        self._values[ind] = value
        if self._ind < self.shape:
            self._ind += 1  # fast fill
        else:
            self._ind += self._splitValue
            self._splitPos += self._splitValue
        self._cached = False
150920
def add(self, value):
        """"""
        self._data.append(value)
        if len(self._data) > self._max_count:
            self._data.popleft()
        return sum(self._data)/len(self._data)
516349
function fill(buffer, value) {
    $.checkArgumentType(buffer, 'Buffer', 'buffer');
    $.checkArgumentType(value, 'number', 'value');
    var length = buffer.length;
    for (var i = 0; i < length; i++) {
      buffer[i] = value;
    }
    return buffer;
  }
259866
public void addUnsignedShort( int value ) {

        if ( 2 + length < capacity ) {
            DynamicByteBufferHelper.unsignedShortTo( buffer, length, value );
        } else {
            buffer = DynamicByteBufferHelper.grow( buffer, buffer.length * 2 + 2 );
            capacity = buffer.length;

            DynamicByteBufferHelper.unsignedShortTo( buffer, length, value );
        }

        length += 2;


    }
823742
def addValue(self, source, value):
    """"""
    if self.source is None or self.fn(self.value, value):
      self.value = value
      self.source = source
525910
def update_value(self, offset, value):
        

        if offset + len(value) > self.total_size:
            return Error.INPUT_BUFFER_TOO_LONG

        if len(self.current_value) < offset:
            self.current_value += bytearray(offset - len(self.current_value))
        if len(self.current_value) > offset:
            self.current_value = self.current_value[:offset]

        self.current_value += bytearray(value)
        return 0
1296081
public void addValue(String value) {
        if (value == null)
            return;

        StringBuffer buffer = new StringBuffer();

        int l = value.length();
        State state = State.VALUE;
        boolean quoted = false;
        boolean sloshed = false;
        int nws_length = 0;
        int last_length = 0;
        int value_length = -1;
        int param_name = -1;
        int param_value = -1;

        for (int i = 0; i <= l; i++) {
            char c = i == l ? 0 : value.charAt(i);

            // Handle quoting https://tools.ietf.org/html/rfc7230#section-3.2.6
            if (quoted && c != 0) {
                if (sloshed)
                    sloshed = false;
                else {
                    switch (c) {
                        case '\\':
                            sloshed = true;
                            if (!_keepQuotes)
                                continue;
                            break;
                        case '"':
                            quoted = false;
                            if (!_keepQuotes)
                                continue;
                            break;
                    }
                }

                buffer.append(c);
                nws_length = buffer.length();
                continue;
            }

            // Handle common cases
            switch (c) {
                case ' ':
                case '\t':
                    if (buffer.length() > last_length) // not leading OWS
                        buffer.append(c);
                    continue;

                case '"':
                    quoted = true;
                    if (_keepQuotes) {
                        if (state == State.PARAM_VALUE && param_value < 0)
                            param_value = nws_length;
                        buffer.append(c);
                    } else if (state == State.PARAM_VALUE && param_value < 0)
                        param_value = nws_length;
                    nws_length = buffer.length();
                    continue;

                case ';':
                    buffer.setLength(nws_length); // trim following OWS
                    if (state == State.VALUE) {
                        parsedValue(buffer);
                        value_length = buffer.length();
                    } else
                        parsedParam(buffer, value_length, param_name, param_value);
                    nws_length = buffer.length();
                    param_name = param_value = -1;
                    buffer.append(c);
                    last_length = ++nws_length;
                    state = State.PARAM_NAME;
                    continue;

                case ',':
                case 0:
                    if (nws_length > 0) {
                        buffer.setLength(nws_length); // trim following OWS
                        switch (state) {
                            case VALUE:
                                parsedValue(buffer);
//                                value_length = buffer.length();
                                break;
                            case PARAM_NAME:
                            case PARAM_VALUE:
                                parsedParam(buffer, value_length, param_name, param_value);
                                break;
                        }
                        _values.add(buffer.toString());
                    }
                    buffer.setLength(0);
                    last_length = 0;
                    nws_length = 0;
                    value_length = param_name = param_value = -1;
                    state = State.VALUE;
                    continue;

                case '=':
                    switch (state) {
                        case VALUE:
                            // It wasn't really a value, it was a param name
                            value_length = param_name = 0;
                            buffer.setLength(nws_length); // trim following OWS
                            String param = buffer.toString();
                            buffer.setLength(0);
                            parsedValue(buffer);
                            value_length = buffer.length();
                            buffer.append(param);
                            buffer.append(c);
                            last_length = ++nws_length;
                            state = State.PARAM_VALUE;
                            continue;

                        case PARAM_NAME:
                            buffer.setLength(nws_length); // trim following OWS
                            buffer.append(c);
                            last_length = ++nws_length;
                            state = State.PARAM_VALUE;
                            continue;

                        case PARAM_VALUE:
                            if (param_value < 0)
                                param_value = nws_length;
                            buffer.append(c);
                            nws_length = buffer.length();
                            continue;
                    }
                    continue;

                default: {
                    switch (state) {
                        case VALUE: {
                            buffer.append(c);
                            nws_length = buffer.length();
                            continue;
                        }

                        case PARAM_NAME: {
                            if (param_name < 0)
                                param_name = nws_length;
                            buffer.append(c);
                            nws_length = buffer.length();
                            continue;
                        }

                        case PARAM_VALUE: {
                            if (param_value < 0)
                                param_value = nws_length;
                            buffer.append(c);
                            nws_length = buffer.length();
                        }
                    }
                }
            }
        }
    }
307213
public void insert(StringBuilder buffer, Object value, int index) {
        if (buffer == null) {
            throw new NullPointerException("buffer");
        }

        buffer.insert(index, value);
    }
1142357
public void add(String name, JsonBuffer value) {
		if (value != null && value != this && !value.isEmpty()) {
			this.content.put(name, value);
		}
	}
1107990
public void addDouble(double value) {
        data[endOffset] = value;
        endOffset++;
        
        // Grow the buffer if needed
        if (endOffset == data.length && !reachedMax)
            resize();
        
        // Loop over and advance the start point if needed
        if (endOffset == data.length) {
            endOffset = 0;
        }
        if (endOffset == startOffset)
            startOffset++;
        if (startOffset == data.length)
            startOffset = 0;
    }
13231
public void setValue(Object value) {
        if (logger.isDebugEnabled()) {
            logger.debug("Setting buffered value to '" + value + "'");
        }
        final Object oldValue = getValue();
        this.bufferedValue = value;
        updateBuffering();
        fireValueChange(oldValue, bufferedValue);
    }
501610
public synchronized boolean put(byte value) {
        if (available == capacity) {
            return false;
        }
        buffer[idxPut] = value;
        idxPut = (idxPut + 1) % capacity;
        available++;
        return true;
    }
113546
private void appendValueLength(int value, int index) {
    int previousValue = toIntUnsigned(getValue(index));
    int length = toIntUnsigned(getLength(index));
    int offset = value - previousValue;
    if (offset > length) {
      setLength(index, (short) offset);
    }
  }
196793
private static int put(byte[] block, int offset, ByteBuffer buf) {
    int len = Math.min(block.length - offset, buf.remaining());
    buf.get(block, offset, len);
    return len;
  }
634262
function fill(buffer, value, from, to) {
  for (let i = from; i < to; ++i) {
    buffer[i] = Number(value)
  }
}
636080
def add_val(self, val):
        """"""
        if not isinstance(val, type({})):
            raise ValueError(type({}))
        self.read()
        self.config.update(val)
        self.save()
278562
public synchronized void insert(double value) {
        buffer[bufferCount] = value;
        bufferCount++;

        if (bufferCount == buffer.length) {
            insertBatch();
            compress();
        }
    }