Sets a hash by key.
16153
def []=(key, value)
      @lock.synchronize do
        @indexes = {}
        if value.id_changed?
          hash.delete value.to_id(true)
        end
        saved = hash[key] = value.to_hash.freeze
        adapter.save_database if @options[:sync]
        saved
      end
    end
128235
public static <K, V> void putIntoValueHashSet(Map<K, Set<V>> map, K key, V value) {
    CollectionFactory<V> factory = CollectionFactory.hashSetFactory();
    putIntoValueCollection(map, key, value, factory);
  }
671126
def set(key , value)
      index = key_index(key)
      if( index )
        i_values.set(index , value)
      else
        i_keys.push(key)
        i_values.push(value)
      end
      value
    end
1268076
function toMap(hash) {
  let m = new Map;
  for (let key in hash) {
    if (hash.hasOwnProperty(key)) {
      m.set(key, hash[key]);
    }
  }
  return m;
}
466862
def key_hash_algo(self, value):
        

        if value not in set(['sha1', 'sha256']):
            raise ValueError(_pretty_message(
                '''
                hash_algo must be one of "sha1", "sha256", not %s
                ''',
                repr(value)
            ))

        self._key_hash_algo = value
493568
def set_attr(self, key: str, value):
        """"""
        self.attr_setter(self, key, value)
497616
def setnx(self, key, value):
        """"""
        return self.set(key, value, nx=True)
1145278
def assoc(self, key, value):
        ''''''
        copydict = ImmutableDict()
        copydict.tree = self.tree.assoc(hash(key), (key, value))
        copydict._length = self._length + 1
        return copydict
559302
function hashSet(hash, key, value) {
        hash[key] = nativeCreate && value === undefined ? HASH_UNDEFINED : value;
      }
1151221
def update(key, value):
    '''
    
    '''
    store = load()
    store[key] = value
    dump(store)
    return True
413703
def set_value(self, key, field, value):
        """"""
        self._db.hset(key, field, value)
433247
def set_evercookie(key, value)
      session[Evercookie.hash_name_for_saved] = {} unless
        session[Evercookie.hash_name_for_saved].present?
      session[Evercookie.hash_name_for_saved][key] = value
    end
421803
def set(self, key, value, **kw):
        

        self.impl.set(key, value, **self._get_cache_kw(kw, None))
312368
def set(key, opts = nil)
      fail ArgumentError, 'Second argument must be a hash' unless opts.is_a?(Hash)
      path  = key_endpoint + key
      payload = {}
      [:ttl, :value, :dir, :prevExist, :prevValue, :prevIndex].each do |k|
        payload[k] = opts[k] if opts.key?(k)
      end
      response = api_execute(path, :put, params: payload)
      Response.from_http_response(response)
    end
242251
def hset(self, key, value):
        
        return self.r.hset(self.hash, key, value)
852755
def set(self, key, value):
        
        validate_is_bytes(key)
        validate_is_bytes(value)

        self.root_hash = self._set(self.root_hash, encode_to_bin(key), value)
464214
def hash_key(self, key):
        
        for i, destination_key in enumerate(self._dict):
            if key < destination_key:
                return destination_key

        return key