validate that we can store the multi-index; reset and return the
        new object
543320
def validate_multiindex(self, obj):
        
        levels = [l if l is not None else "level_{0}".format(i)
                  for i, l in enumerate(obj.index.names)]
        try:
            return obj.reset_index(), levels
        except ValueError:
            raise ValueError("duplicate names/columns in the multi-index when "
                             "storing as a table")
277810
def sparse_reindex(self, new_index):
        
        if not isinstance(new_index, splib.SparseIndex):
            raise TypeError("new index must be a SparseIndex")
        values = self.values
        values = values.sp_index.to_int_index().reindex(
            values.sp_values.astype('float64'), values.fill_value, new_index)
        values = SparseArray(values,
                             sparse_index=new_index,
                             fill_value=self.values.fill_value)
        return self._constructor(values, index=self.index).__finalize__(self)
899377
def _create_old_return_value(payload, num_ints, buff):
    """"""

    parsed = {'ints': payload[:num_ints], 'buffer': None, 'error': 'No Error',
              'is_error': False, 'return_value': 0}

    if buff:
        parsed['buffer'] = bytearray(payload[-1])

    return parsed
1158594
function regenerate(root, holder, current, seen, retrieve, undry_paths, old, current_path) {

	var temp;

	if (current && typeof current == 'object') {
		// Remember this object has been regenerated already
		seen.set(current, true);

		if (current instanceof Array) {
			return regenerateArray(root, holder, current, seen, retrieve, undry_paths, old, current_path);
		}

		if (current instanceof String) {

			if (current.length > -1) {
				current = current.toString();

				if (temp = undry_paths.get(current)) {
					if (typeof temp.undried != 'undefined') {
						return temp.undried;
					}

					if (!holder) {
						throw new Error('Unable to resolve recursive reference');
					}

					undry_paths.extra_pass.push([holder, temp, current_path]);

					return temp;
				}

				if (retrieve.hasOwnProperty(current)) {
					temp = retrieve[current];
				} else {
					temp = retrieve[current] = retrieveFromPath(root, current.split(special_char));

					if (typeof temp == 'undefined') {
						temp = retrieve[current] = getFromOld(old, current.split(special_char));
					}
				}

				// Because we always regenerate parsed objects first
				// (JSON-dry parsing goes from string » object » regenerated object)
				// keys of regular objects can appear out-of-order, so we need to parse them
				if (temp && temp instanceof String) {
					// Unset the String as a valid result
					retrieve[current] = null;

					// Regenerate the string again
					// (We have to create a new instance, because it's already been "seen")
					temp = retrieve[current] = regenerate(root, holder, new String(temp), seen, retrieve, undry_paths, old, current_path);
				}

				return temp;
			} else {
				return root;
			}
		}

		return regenerateObject(root, holder, current, seen, retrieve, undry_paths, old, current_path);
	}

	return current;
}
673512
public void reset() {
		this.location = 0;
		this.first_created = 0;
		this.expiration = -1;
		this.validatorExpiration = -1;  // LI4537-24
		this.tableid = 0;
		this.key = null;
		this.value = null;
		this.next = 0;
		this.previous = 0;
		this.valuelen = -1;
		this.hash = 0;
		this.index = 0;
        this.size = -1;
        this.serializedKey        = null;
        this.serializedCacheValue = null;
        this.cacheValueSize = 0;
        this.cacheValueHashcode = 0;  // LI4337-17
        this.bAliasId = false;
        this.bValidHashcode = true;  // LI4337-17
	}
236308
def _reset(self, command, *args, **kwargs):
        
        if self.indexable:
            self.deindex()
        result = self._traverse_command(command, *args, **kwargs)
        if self.indexable:
            self.index()
        return result
1356115
function InMemoryStorage() {

	var store = {};
    var self = this;

	this.getItem = function(key) {
		return store[key] || null;
	};

	this.setItem = function(key, value) {
		store[key] = value;
        updateLength();
	};

	this.removeItem = function(key) {
		delete store[key];
        updateLength();
	};

	this.clear = function() {
		store = {};
        updateLength();
	};

    function updateLength() {
        self.length = Object.keys(store).length
    }

    updateLength();
}
300821
def reload(self, *fields, **kw):
		""""""
		
		Doc, collection, query, options = self._prepare_find(id=self.id, projection=fields, **kw)
		result = collection.find_one(query, **options)
		
		if fields:  # Refresh only the requested data.
			for k in result:  # TODO: Better merge algorithm.
				if k == ~Doc.id: continue
				self.__data__[k] = result[k]
		else:
			self.__data__ = result
		
		return self
1066817
def _clone(self, **attrs):
        

        with xact():
            # Gather objs we'll need save after
            old_m2ms = self._gather_m2ms()
            old_reverses = self._gather_reverses()

            for k, v in attrs.items():
                setattr(self, k, v)

            # Do the clone
            self.prep_for_clone()
            self.validate_unique()
            # Prevent last save from changing
            self.save(last_save=self.last_save)

            # save m2ms
            self._set_m2ms(old_m2ms)
            # Prevent last save from changing
            self.save(last_save=self.last_save)

            # save reverses
            self._clone_reverses(old_reverses)
546260
def reset(self, indices=None):
    
    return tf.cond(
        tf.cast(tf.reduce_sum(indices + 1), tf.bool),
        lambda: self._reset_non_empty(indices),
        lambda: tf.cast(0, self.observ_dtype))
1315780
def load_or_create idx
      return from_redis(idx) if exists?(idx)
      obj = from_index idx
      obj.save
      obj
    end
149406
function reset(method, key) {
    if (exports.results.has(method)) {
        if (key)
            return exports.results.get(method).del(key);
        else
            return exports.results.get(method).reset();
    }
}
77089
def copy(self, old_name, new_name, index=None):
        
        if index is None:
            index = len(self)
        self._copy(old_name, new_name, index)
        return self[new_name]
74173
def reindex(self, new_index_name: str, identifier_key: str, **kwargs) -> 'ElasticIndex':
        
        if 'url' not in kwargs:
            kwargs['url'] = self.url
        if 'doc_type' not in kwargs:
            kwargs['doc_type'] = self.doc_type
        if 'mapping' not in kwargs:
            kwargs['mapping'] = self.mapping
        new_index = ElasticIndex(new_index_name, **kwargs)

        for results in self.scroll(size=500):
            new_index.bulk(results, identifier_key)
        return new_index
1043938
function(new_indices) {

		var i = 0,
			result = this._createHelperStorage(),
			index,
			verification = {};

		if (Lava.schema.DEBUG && new_indices.length != this._count) throw "reorder: new item count is less than current";

		for (; i < this._count; i++) {

			index = new_indices[i];
			result.push(this._data_uids[index], this._data_values[index], this._data_names[index]);

			if (Lava.schema.DEBUG) {
				// duplicate UIDs may break a lot of functionality, in this class and outside
				if (index in verification) Lava.t("Malformed index array");
				verification[index] = null;
			}

		}

		this._assignStorage(result);
		this._fire('collection_changed');

	}
38233
def refresh(self):
        
        self._changed = False
        self.es.indices.refresh(index=self.index)
549544
def create_or_update(cls, object_version, key, value):
        """"""
        assert len(key) < 256
        assert len(value) < 256
        obj = cls.get(object_version, key)
        if obj:
            obj.value = value
            db.session.merge(obj)
        else:
            obj = cls.create(object_version, key, value)
        return obj