Updates the value of the given key in the file.

        Args:
            key (str): Key of the property to update.
            value (str): New value of the property.

        Return:
            bool: Indicates whether or not a change was made.
972106
def set(self, key, value):
        

        changed = super().set(key=key, value=value)

        if not changed:
            return False

        self._log.info('Saving configuration to "%s"...', self._filename)

        with open(self._filename, 'w') as stream:
            stream.write(self.content)
            self._log.info('Saved configuration to "%s".', self._filename)

        return True
1229052
def set(self, key, value):
        
        d = self.data.data
        keys = key.split('.')
        latest = keys.pop()
        for k in keys:
            d = d.setdefault(k, {})

        schema = Schema().load(self.schema_file)

        self.data.internal = schema.internal
        self.parse_value(d, '', key, value, schema.get(key))
        self.data.save(self.data_file)
1077225
def update(self, data):
        
        for key, value in data.items():
            setattr(self, key, value)
198904
def update_metadata(self, key, value):
        
        old_value = self.contents['metadata'].get(key)
        self.contents['metadata'][key] = value
        self._log('Updated metadata: %s=%s' % (key, value))
        return old_value
89329
public boolean updateOrigKey(Map<String,Object> propOrig, String strKey, String strOrigValue, String strNewValue, boolean bOrigChange)
    {
            if (((strNewValue != null) && (!strNewValue.equals(strOrigValue)))
                || ((strNewValue == null) && (strOrigValue != null)))
        {   // If I am using the read value now (and it has changed from the orig value) change the orig value to the read value.
            bOrigChange = true;
            if (strNewValue != null)    
                propOrig.put(strKey, strNewValue);  // Original must reflect the read value in case it changes again.
            else
                propOrig.remove(strKey);  // Original must reflect the read value in case it changes again.
        }
        return bOrigChange;
    }
82882
def increment_key(key):
    
    pipe = REDIS_SERVER.pipeline()
    pipe.incr(key, 1)
    if config.COOLOFF_TIME:
        pipe.expire(key, config.COOLOFF_TIME)
    new_value = pipe.execute()[0]
    return new_value
253874
def set_property(self, key, value):
        
        self.properties[key] = value
        self.sync_properties()
779403
def update_index(self, key, value):
        ""
        for k, v in value.items():
            if k in self.indexes:
                # A non-string index value switches it into a lazy one.
                if not isinstance(v, six.string_types):
                    self.index_defs[k]['type'] = 'lazy'
                if v not in self.indexes[k]:
                    self.indexes[k][v] = set([])
                self.indexes[k][v].add(key)
240890
def update(self, data):
        
        result = None
        if data:
            _dumps = self._dumps
            data = {
                key: _dumps(value)
                for key, value in data.items()}
            result = self._client.hmset(self.key_prefix, data)
        return result
999763
public void update(final String key, final U value) {
    update(Util.stringToByteArray(key), value);
  }
446415
def update_experiment(self, id, key, value):
        ''''''
        if id not in self.experiments:
            return False
        self.experiments[id][key] = value
        self.write_file()
        return True
121083
public function update(string $key, $value): bool
    {
        if ($this->hasNot($key)) {
            return false;
        }

        $this->set($key, $value);

        return true;
    }
706817
def set_value_for_key(self, key, value):
        
        if key in self.options:
            self.options[key]['value'] = value
553584
def _update_data(self, datapoint, key, new_data):
        
        if new_data:
            try:
                self.data[datapoint].update({key: new_data})
            except KeyError:
                self.data[datapoint] = {key: new_data}
544924
def save(self, key, kw):
        
        if key not in self:
            obj = hdf5.LiteralAttrs()
        else:
            obj = self[key]
        vars(obj).update(kw)
        self[key] = obj
        self.flush()
844738
public static Update update(String key, Object value) {
    return new Update().set(key, value);
  }
69279
def set(key, value, overwrite: true)
      result = if overwrite
        self.connection.hset(@key, key, value)
      else
        self.connection.hsetnx(@key, key, value)
      end

      return coerce_bool(result)
    end