Change value of key
@param {string} key
@param {?} value
343478
function set(key, value) {
        if (global.localStorage) {
            var _value;
            try {
                _value = JSON.stringify(value);
                global.localStorage.setItem(key, _value);
                $(exports).triggerHandler("change", [key, value]);
            } catch (e) {
                console.error("[PreferenceManager] Failed to write preference value of key: " + key);
            }
        }
    }
706817
def set_value_for_key(self, key, value):
        
        if key in self.options:
            self.options[key]['value'] = value
594205
public void put(final String key, final String value) {
        if (StringUtils.isBlank(value)) {
            this.properties.remove(key);
        } else {
            this.properties.put(key, value);
        }
    }
861954
public void set(String key, String value)
    {
        if(key == null)
            throw new IllegalArgumentException("Null keys not allowed.");

        if(value == null)
            throw new IllegalArgumentException("Null values not allowed.");

        ArrayList<String> vals = new ArrayList<String>();
        vals.add(value);
        map.put(key,vals);

    }
1334977
public void set(String key, Object value) {
		if (globalVar == null) globalVar = new HashMap<String, Object>();
		globalVar.put(key, value);
	}
1003321
function(key, value, oldValue) {
      if (oldValue) {
        self.trigger('styleValueChanged', key, value, oldValue);
      } else {
        self.trigger('styleValueChanged', key, value);
      }
    }
407704
def set(self, key, value):
        
        value_encoded = encode(value, self.get_change_trigger(key))

        if key in self.data and self.data[key] == value_encoded:
            return self

        self.data[key] = value_encoded
        return self.trigger_changed(key)
371566
function (key, value) {
            if (!base.isString(key)) {
                var l = this.__heap.push(this.__makeNode(key, value));
                this.__upHeap(l - 1);
            } else {
                throw new TypeError("Invalid key");
            }
        }
109493
def setValue(self, key, value):
        
        curr = self._stack[-1]
        curr[key] = value
918027
protected function setKey($key, $value)
    {
        if ($key == $this->_keyName) {
            $this->_keyValue = $value;
            $this->_key['value'] = $value;
        }
    }
626188
function (key, value) {
        assertNotNull(key);

        var index = binarySearch(this.slot.keys, 0, this.slot.size, key, this.slot.comparer.compare);

        if (index >= 0) {
            error(ERROR_DUPLICATE_KEY);
        }

        this.insert(~index, key, value);
    }
1006607
public final void put(String key, int value)
  {

    if ((m_firstFree + 1) >= m_mapSize)
    {
      m_mapSize += m_blocksize;

      String newMap[] = new String[m_mapSize];

      System.arraycopy(m_map, 0, newMap, 0, m_firstFree + 1);

      m_map = newMap;

      int newValues[] = new int[m_mapSize];

      System.arraycopy(m_values, 0, newValues, 0, m_firstFree + 1);

      m_values = newValues;
    }

    m_map[m_firstFree] = key;
    m_values[m_firstFree] = value;

    m_firstFree++;
  }
226839
function (key, value) {
        var index = this.indexOfKey(key);

        if (index >= 0) {
            this.slot.values[index] = value;
            return;
        }

        this.insert(~index, key, value);
    }
1171521
public void put(String key, int value)
  {
    put(key.toCharArray(), key.length(), value);
  }
1215048
function _set (object, key, value) {
  const keyParts = key.split('.')

  let walking = object
  keyParts.forEach((key, index) => {
    // Create the nested object if it does not exist
    if (!walking[key]) {
      walking[key] = {}
    }

    // If we reached the last part, set the value and exit out
    if (index === keyParts.length - 1) {
      walking[key] = value
      return
    }

    // Set the next part of the key
    walking = walking[key]
  })
}
652499
function updateVariable(key, value) {
            variableService.addOrUpdate({key: key, value: value}, function () {
                vm.variables[key] = value;
                vm.variable = {
                    key: undefined,
                    value: undefined
                };
            });
        }
482798
public void put(T key, Object value) {
        data.put(key, ensureValueCorrectness(key, value));
    }