Saves the inputed key to the inputed value.
        
        :param      key | <str>
                    value | <variant>
330585
def setValue(self, key, value):
        
        parts = nativestring(key).split('/')
        curr = self._xstack[-1]
        for part in parts[:-1]:
            next = curr.find(part)
            if next is None:
                next = ElementTree.SubElement(curr, part)
            curr = next
        
        xval = curr.find(parts[-1])
        if xval is None:
            xval = ElementTree.SubElement(curr, parts[-1])
        
        self.storeValue(xval, value)
1171521
public void put(String key, int value)
  {
    put(key.toCharArray(), key.length(), value);
  }
1187595
def use(self, key, value):
        
        old_value = self[key]
        try:
            self[key] = value
            yield self
        finally:
            self[key] = old_value
49201
function(key, value, callback) {
        if (this.get(key) == value) {
            return;
        }

        this.set(key, value);
        clearTimeout(this._saveTimeout);
        this._saveTimeout = setTimeout(_.bind(function() {
            fs.writeFile(this._stateFile, JSON.stringify(this.attributes, null, '\t'), _.bind(function() {
                logger.info(key + ' saved to ' + path.join(process.cwd(), this._stateFile));
                while (this._callbacks && this._callbacks.length) {
                    this._callbacks.shift()();
                }
            }, this));
        }, this), 1000);

        if (callback) {
            if (!this._callbacks) {
                this._callbacks = [];
            }

            this._callbacks.push(callback);
        }
    }
1095931
def set(self, key, value):
        """"""
        self.store[key]=value
        return self.store
232423
def set_item(self, key, value):
        
        keys = list(self.keys())

        # if it exists, update
        if key in keys:
            self.set_value(1,keys.index(key),str(value))

        # otherwise we have to add an element
        else:
            self.set_value(0,len(self),   str(key))
            self.set_value(1,len(self)-1, str(value))
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
851456
def set(self, key, value, *args, **kwargs):
        
        if self.cfg.jsonpickle:
            value = jsonpickle.encode(value)
        return self.conn.set(key, value, *args, **kwargs)
465179
def __store(key,value=nil)
      pair = (JsonPair === key ? key : JsonPair.new(key, value))
      (@stack[@level] ||= JsonObject.new).add(pair)
    end
706817
def set_value_for_key(self, key, value):
        
        if key in self.options:
            self.options[key]['value'] = value
604730
def save(self, key, data):
        
        self._db[key] = json.dumps(data)
        self._db.sync()
1087400
public static void put(final String key, final String value) {
		try {
			systemRoot.put(fixKey(key), value);
		} catch (final Exception e) {
			System.err.print(e);
		}
	}
199137
def add(self, key, value):
        # type: (Hashable, Any) -> None
        
        dict.setdefault(self, key, []).append(value)
1043127
def put(self, key, value):
    '''
    '''
    if value is None:
      self.delete(key)
    else:
      self._collection(key)[key] = value
867135
public void put(K key, V value) {
    mMap.compute(key, (k, entry) -> {
      onPut(key, value);
      if (entry == null && cacheIsFull()) {
        writeToBackingStore(key, value);
        return null;
      }
      if (entry == null || entry.mValue == null) {
        onCacheUpdate(key, value);
        return new Entry(key, value);
      }
      entry.mValue = value;
      entry.mReferenced = true;
      entry.mDirty = true;
      return entry;
    });
    wakeEvictionThreadIfNecessary();
  }
650612
def set(self, key, value):
        
        if not self.subsystem.is_cut:
            super().set(key, value)
1334675
def set_key(key: str, value: str) -> dict:
    
    if not _conf.path:
        return {}

    if "toml" in _conf.path:
        with open(_conf.path, "r") as f:
            parser = parse(f.read())
        parser["tool"]["commitizen"][key] = value
        with open(_conf.path, "w") as f:
            f.write(parser.as_string())
    else:
        parser = configparser.ConfigParser()
        parser.read(_conf.path)
        parser["commitizen"][key] = value
        with open(_conf.path, "w") as f:
            parser.write(f)

    return _conf.config