Remove chunk at index.

        Doesn't actually delete data, copies last chunk's data over data to be
        removed, and decreases the count
356879
def remove(self, index):
        """"""
        assert index < self.count
        last_index = self.count - 1
        data = self.get(index)

        if index == last_index:
            # easy case - nothing to do except zero last chunk
            last_data = data
            moved = None
        else:
            last_data = self.get(last_index)
            # copy the last chunk's data over the data to be deleted
            data[0:self.chunk_size] = last_data
            moved = last_index

        # zero last chunk's data
        last_data[0:self.chunk_size] = [0] * self.chunk_size
        self.count -= 1

        # provide which index has now moved
        return moved
527745
def _flush_index(self):
        
        data = {'version': self.version, 'index': self._index}
        with open(self._get_path('index.json'), 'w') as f:
            json.dump(data, f)
        self.__index = None
836180
def delete_at(index = @entries.index { |e| e })
      yield(@entries[index]) if block_given?
      if size > 1
        entries = @entries.dup
        child = @children[index]
        if child
          children = @children.dup
          children[index] = child.delete_at do |entry|
            entries[index] = entry
          end
        else
          entries[index] = nil
        end
        Trie.new(@significant_bits, @size - 1, entries, children || @children)
      end
    end
718929
public int remove(int index) {
        if (index < 0 || index >= size) {
            throw new IndexOutOfBoundsException(String.valueOf(index));
        }

        int old = get(index);
        
        if (index == 0) {
            // data at the front
            System.arraycopy(data, 1, data, 0, size - 1);
        } else if (size - 1 == index) {
            // no copy to make, decrementing pos "deletes" values at
            // the end
        } else {
            // data in the middle
            System.arraycopy(data, index + 1, data, index, size - (index + 1));
        }
        
        size--;
        return old;
    }
618282
def remove_index(self, index):
        ''
        index_rm, single = convert_key_to_index(force_list(self.indices.keys()), index)
        if single:
            index_rm = [index_rm]

        index_new = [i for i in range(len(self.indices)) if i not in index_rm]

        if not index_new: # no index left
            self.clear(True)
            return

        names = mget_list(force_list(self.indices.keys()), index_new)
        items = [mget_list(i, index_new) for i in self.items()]
        self.clear(True)
        _MI_init(self, items, names)
1006339
def drop_index(index_name)
			transaction {
				ODBA.storage.drop_index(index_name)
				self.delete(self.indices[index_name]) 
			}
		end
808104
function removePart(summary, index) {
    var parts = summary.getParts().remove(index);
    return indexLevels(summary.set('parts', parts));
}
1221947
def swap(self, old_chunks, new_chunk):
    
    indexes = [self.index(chunk) for chunk in old_chunks]
    del self[indexes[0]:indexes[-1] + 1]
    self.insert(indexes[0], new_chunk)
377603
def remove_and_append(self, index):
        """"""
        while index in self:
            self.remove(index)
        self.append(index)
965845
function (index, count) {
    var newItems = Array.prototype.slice.call(arguments, 2),
    oldItems     = this.source.splice.apply(this.source, arguments);

    this._updateInfo();

    // DEPRECATED
    this.emit("replace", newItems, oldItems, index);
    this.emit("update", { insert: newItems, remove: oldItems });
  }
251250
void removeIndex(Index idx, boolean preserveData) {
        this.getSchema().getTopology().lock();
        if (!uncommittedRemovedIndexes.contains(idx.getName())) {
            uncommittedRemovedIndexes.add(idx.getName());
            TopologyManager.removeIndex(this.sqlgGraph, idx);
            if (!preserveData) {
                idx.delete(sqlgGraph);
            }
            this.getSchema().getTopology().fire(idx, "", TopologyChangeAction.DELETE);
        }
    }
176963
def remove(self, *args):
        

        args = self.prepare_args(args)

        for index in self._indexes:
            index.remove(*args)
1256343
def removeTab(self, index):
        
        curr_index = self.currentIndex()
        items = list(self.items())

        item = items[index]
        item.close()
        if index <= curr_index:
            self._currentIndex -= 1
52885
public void repairIndex() throws IOException {
        byte[] currentLargestKey = new byte[keySize];
        int maxChunk = getChunkIndex(getFilledUpFromContentStart());
        for (int currentChunkId = 0; currentChunkId <= maxChunk; currentChunkId++) {
            long currentOffset = (currentChunkId + 1) * getChunkSize() - elementSize;
            if (currentOffset < getFilledUpFromContentStart()) {
                read(currentOffset, currentLargestKey);
            } else {
                read(getFilledUpFromContentStart() - elementSize, currentLargestKey);
            }
            getIndex().setLargestKey(currentChunkId, currentLargestKey);
        }
    }
1276843
def delete_row(self, index):
        "
        body = {
            "requests": [{
                "deleteDimension": {
                    "range": {
                      "sheetId": self.id,
                      "dimension": "ROWS",
                      "startIndex": index - 1,
                      "endIndex": index
                    }
                }
            }]
        }

        return self.spreadsheet.batch_update(body)
292151
def drop_index(self, keep_model=True):
        """"""
        modelstr = "" if keep_model else "and model "
        logger.info("deleting similarity index " + modelstr + "from %s" % self.basename)

        # delete indexes
        for index in [self.fresh_index, self.opt_index]:
            if index is not None:
                index.terminate()
        self.fresh_index, self.opt_index = None, None

        # delete payload
        if self.payload is not None:
            self.payload.close()

            fname = self.location('payload')
            try:
                if os.path.exists(fname):
                    os.remove(fname)
                    logger.info("deleted %s" % fname)
            except Exception, e:
                logger.warning("failed to delete %s" % fname)
        self.payload = SqliteDict(self.location('payload'), autocommit=True, journal_mode=JOURNAL_MODE)

        # optionally, delete the model as well
        if not keep_model and self.model is not None:
            self.model.close()
            fname = self.location('model')
            try:
                if os.path.exists(fname):
                    os.remove(fname)
                    logger.info("deleted %s" % fname)
            except Exception, e:
                logger.warning("failed to delete %s" % fname)
            self.model = None
        self.flush(save_index=True, save_model=True, clear_buffer=True)
1114428
def remove_from_queue(self, index):
        
        # TODO: what do these parameters actually do?
        updid = '0'
        objid = 'Q:0/' + str(index + 1)
        self.avTransport.RemoveTrackFromQueue([
            ('InstanceID', 0),
            ('ObjectID', objid),
            ('UpdateID', updid),
        ])