Set the element in a chunk as missing given a 0-based chunk local index.
542743
public final boolean setNA0(int idx) {
    setWrite();
    if( _chk2.setNA_impl(idx) ) return true;
    (_chk2 = inflate_impl(new NewChunk(this))).setNA_impl(idx);
    return true;
  }
559053
void setChainUserIndex(int chain, int index, int value) {
		int i = getChainIndex_(chain);
		AttributeStreamOfInt32 stream = m_chainIndices.get(index);
		if (stream.size() <= i)
			stream.resize(m_chainData.size(), -1);

		stream.write(i, value);
	}
105396
def p_block_empty(self, p):
        ''
        p[0] = Block((), lineno=p.lineno(1))
        p.set_lineno(0, p.lineno(1))
594983
public CSTNode set( int index, CSTNode element ) 
    {
        
        if( elements == null ) 
        {
            throw new GroovyBugError( "attempt to set() on a EMPTY Reduction" );
        }

        if( index == 0 && !(element instanceof Token) ) 
        {

            //
            // It's not the greatest of design that the interface allows this, but it
            // is a tradeoff with convenience, and the convenience is more important.

            throw new GroovyBugError( "attempt to set() a non-Token as root of a Reduction" );
        }


        //
        // Fill slots with nulls, if necessary.

        int count = elements.size();
        if( index >= count ) 
        {
            for( int i = count; i <= index; i++ ) 
            {
                elements.add( null );
            }
        }

        //
        // Then set in the element.

        elements.set( index, element );

        return element;
    }
676579
def set_block(self, x,y,z, id, data=0):
        """"""
        offset = y + z*128 + x*128*16
        self.blocksList[offset] = id
        if (offset % 2 == 1):
            # offset is odd
            index = (offset-1)//2
            b = self.dataList[index]
            self.dataList[index] = (b & 240) + (data & 15) # modify lower bits, leaving higher bits in place
        else:
            # offset is even
            index = offset//2
            b = self.dataList[index]
            self.dataList[index] = (b & 15) + (data << 4 & 240)
452067
private void updateIndex(
			long key,
			int hashCode,
			long address,
			int size,
			MemorySegment dataSegment,
			int currentPositionInSegment) throws IOException {
		assert (numKeys <= numBuckets / 2);
		int bucketId = hashCode & numBucketsMask;

		// each bucket occupied 16 bytes (long key + long pointer to data address)
		int bucketOffset = bucketId * SPARSE_BUCKET_ELEMENT_SIZE_IN_BYTES;
		MemorySegment segment = buckets[bucketOffset >>> segmentSizeBits];
		int segOffset = bucketOffset & segmentSizeMask;
		long currAddress;

		while (true) {
			currAddress = segment.getLong(segOffset + 8);
			if (segment.getLong(segOffset) != key && currAddress != INVALID_ADDRESS) {
				// hash conflicts, the bucket is occupied by another key

				// TODO test Conflict resolution:
				// now:    +1 +1 +1... cache friendly but more conflict, so we set factor to 0.5
				// other1: +1 +2 +3... less conflict, factor can be 0.75
				// other2: Secondary hashCode... less and less conflict, but need compute hash again
				bucketId = (bucketId + 1) & numBucketsMask;
				if (segOffset + SPARSE_BUCKET_ELEMENT_SIZE_IN_BYTES < segmentSize) {
					// if the new bucket still in current segment, we only need to update offset
					// within this segment
					segOffset += SPARSE_BUCKET_ELEMENT_SIZE_IN_BYTES;
				} else {
					// otherwise, we should re-calculate segment and offset
					bucketOffset = bucketId * 16;
					segment = buckets[bucketOffset >>> segmentSizeBits];
					segOffset = bucketOffset & segmentSizeMask;
				}
			} else {
				break;
			}
		}
		if (currAddress == INVALID_ADDRESS) {
			// this is the first value for this key, put the address in array.
			segment.putLong(segOffset, key);
			segment.putLong(segOffset + 8, address);
			numKeys += 1;
			// dataSegment may be null if we only have to rehash bucket area
			if (dataSegment != null) {
				dataSegment.putLong(currentPositionInSegment, toAddrAndLen(INVALID_ADDRESS, size));
			}
			if (numKeys * 2 > numBuckets) {
				resize();
			}
		} else {
			// there are some values for this key, put the address in the front of them.
			dataSegment.putLong(currentPositionInSegment, toAddrAndLen(currAddress, size));
			segment.putLong(segOffset + 8, address);
		}
	}
96897
public void setContentLength(int len)
    {
        if (_chunking && len>=0 && getExpectContinues()==null)
            throw new IllegalStateException("Chunking");
        _realIn.setByteLimit(len);
    }
1202486
function lset(index, value) {
  if(index < 0) index = this._data.length + index;
  // command should validate the index
  if(index < 0 || index >= this._data.length) return null;
  this._data[index] = value;
}
978801
@Override
  public Short set(int index, Short element) {
    return set(index, element.shortValue());
  }
282888
private static void setRawElem(Context cx, Scriptable target, long index,
                                   Object value) {
        if (value == NOT_FOUND) {
            deleteElem(target, index);
        } else {
            setElem(cx, target, index, value);
        }
    }
254917
public T set(int index, T element)
    {
        if (index == 0)
        {
            T previousElement = this.element1;
            this.element1 = element;
            return previousElement;
        }
        throw new IndexOutOfBoundsException("Index: " + index + ", Size: " + this.size());
    }
411650
function chunk (array, size) {
  var index
  var result = []
  var arrLen = size >> 0 || 1
  if (baseExports.isArray(array)) {
    if (arrLen >= 0 && array.length > arrLen) {
      index = 0
      while (index < array.length) {
        result.push(array.slice(index, index + arrLen))
        index += arrLen
      }
    } else {
      result = array.length ? [array] : array
    }
  }
  return result
}
502432
def _maybe_append_chunk(chunk_info, line_index, column, contents, chunks):
    """"""
    if chunk_info:
        chunks.append(_chunk_from_ranges(contents,
                                         chunk_info[0],
                                         chunk_info[1],
                                         line_index,
                                         column))
822973
def set(self, data, size):
        
        return lib.zchunk_set(self._as_parameter_, data, size)
295470
private void addMissingBlanks(final int index) {
        if (this.capacity <= index) {
            this.capacity = index * 2;
            final E[] newArr = (E[]) new Object[this.capacity];
            System.arraycopy(this.arr, 0, newArr, 0, this.size);
            this.arr = newArr;
        }
        if (this.blankElement != null) {
            Arrays.fill(this.arr, this.size, index, this.blankElement);
        }
        this.size = index + 1;
    }
600271
private function ensureChunksIndex()
    {
        foreach ($this->chunksCollection->listIndexes() as $index) {
            if ($index->isUnique() && $index->getKey() === ['files_id' => 1, 'n' => 1]) {
                return;
            }
        }

        $this->chunksCollection->createIndex(['files_id' => 1, 'n' => 1], ['unique' => true]);
    }
473806
public Object set(int index, Object element) {

        if (index >= elementCount) {
            throw new IndexOutOfBoundsException("Index out of bounds: "
                                                + index + " >= "
                                                + elementCount);
        }

        if (index < 0) {
            throw new IndexOutOfBoundsException("Index out of bounds: "
                                                + index + " < 0");
        }

        Object replacedObj = elementData[index];

        elementData[index] = element;

        return replacedObj;
    }