Removes all elements from the collection and resets the error handling
198835
def clear(self):
        "
        self.bad = False
        self.errors = {}
        self._collection.clear()
1277131
def delete(collection_name, spec, safe, last_error_args):
    
    data = __ZERO
    data += bson._make_c_string(collection_name)
    data += __ZERO
    data += bson.BSON.encode(spec)
    if safe:
        (_, remove_message) = __pack_message(2006, data)
        (request_id, error_message) = __last_error(last_error_args)
        return (request_id, remove_message + error_message)
    else:
        return __pack_message(2006, data)
434374
def cleanup(self):
        
        empty_keys = [k for k, v in self.items() if not v]

        for k in empty_keys:
            del self[k]
892407
def remove_duplicates(errors):
    
    passed = defaultdict(list)
    for error in errors:
        key = error.linter, error.number
        if key in DUPLICATES:
            if key in passed[error.lnum]:
                continue
            passed[error.lnum] = DUPLICATES[key]
        yield error
893336
def reset(cls):
        
        cls.input_el.value = ""
        cls.subconspect_el.html = ""
        cls.show_error(False)
402586
protected void cleanup(Iterable<? extends K> keys, StoreAccessException from) {
    try {
      store.obliterate(keys);
    } catch (StoreAccessException e) {
      inconsistent(keys, from, e);
      return;
    }
    recovered(keys, from);
  }
266715
@Override
    public void clear() {
        RocksIterator iterator = db.newIterator();
        while (iterator.isValid())
            try {
                db.remove(iterator.key());
            } catch (RocksDBException e) {
                throw new RuntimeException(e);
            }
        iterator.close();
        size = 0;
    }
868535
public void cleanup() {
    keys.cleanup();
    counts.cleanup();
    dictionary.cleanup();
    // Decrement the dictionary memory by the total size of all the elements
    memoryEstimate.decrementDictionaryMemory(SizeOf.SIZE_OF_LONG * numElements);
  }
196138
def reset(self):
        """"""
        if self.collname not in self.current_kv_names():
            return # nothing to do
        # we'll simply delete the entire collection and then re-create it.
        r = self.request('delete',
                         self.url+"storage/collections/data/"+self.collname)
        r.raise_for_status()
        self.initialize()
176628
protected function clearPreviousCollection(Collection $collection)
    {
        if ($collection->count()) {
            foreach ($collection as $item) {
                $collection->removeElement($item);
            }
        }
    }
618165
public void removeAllElements() {
		if (View.isInitialised() && !EventQueue.isDispatchThread()) {
			EventQueue.invokeLater(new Runnable() {

				@Override
				public void run() {
					removeAllElements();
				}
			});

			return;
		}

		sessions.clear();
		sessions.trimToSize();
		fireTableDataChanged();
	}
1156703
function clearValue() {
      clearSelectedItem();
      setInputClearButton();
      if (self.parentForm && self.parentForm !== null) {
        self.parentForm.$setDirty();
      }
    }
619824
public void reset() {
		Element e = first;
		while( e != null ) {
			Element n = e.next;
			e.clear();
			available.add( e );
			e = n;
		}
		first = last = null;
		size = 0;
	}
678751
public function resetCustomStyle()
    {
        $db = Loader::db();
        $c = $this->getBlockCollectionObject();
        $cvID = $c->getVersionID();
        $db->Execute(
            'delete from CollectionVersionBlockStyles where cID = ? and cvID = ? and arHandle = ? and bID = ?',
            [
                $this->getBlockCollectionID(),
                $cvID,
                $this->getAreaHandle(),
                $this->getBlockID(),
            ]
        );
        $this->issID = 0;
    }
1119179
function error() {
                reject(new TypeError());
                doc.removeEventListener(api.events.error, error, false);
            }
94370
function removeElements(collection, newCollection, index) {
        if (index === void 0) { index = 'id'; }
        var oldLength = collection.length;
        _.remove(collection, function (item) { return !_.some(newCollection, function (c) { return c[index] === item[index]; }); });
        return collection.length !== oldLength;
    }
1276329
public void clear() {
		//clear each collection to make previously returned lists empty
		for (List<V> value : map.values()) {
			value.clear();
		}
		map.clear();
	}