Replace the data after the marked location with the specified data.
162898
def splice(self, mark, newdata):
        """"""
        self.jump_to(mark)
        self._data = self._data[:self._offset] + bytearray(newdata)
181309
function replaceAt(items, item, index) {
  var copy = items.slice();
  copy.splice(index, 1, item);
  return copy;
}
657798
protected void afterData() {
        final Set<StackState> state = scopeState.getFirst();
        state.add(StackState.WROTE_DATA);
    }
360541
public void replace(String what, Object with) {
    if (what.charAt(0)=='$')
      throw new RuntimeException("$ is now control char that denotes URL encoding!");
    for (Placeholder p : _placeholders.get(what))
      p.end.insertAndAdvance(with.toString());

    for (Placeholder p : _placeholders.get("$"+what))
      try {
        p.end.insertAndAdvance(URLEncoder.encode(with.toString(),"UTF-8"));
      } catch (IOException e) {
        p.end.insertAndAdvance(e.toString());
      }
  }
737503
def normalize(location_name, preserve_commas=False):
    """"""
    def replace(match):
        if preserve_commas and ',' in match.group(0):
            return ','
        return ' '
    return NORMALIZATION_RE.sub(replace, location_name).strip().lower()
993042
def insert_after(self, key, new_item, instance=0):
        """"""
        self._insert_item(key, new_item, instance, True)
1311345
@Override
  protected void updateLocations(final NumberedSplit<InputSplit> numberedSplit) {
    final String location = numberedSplit.getLocation();
    addLocationMapping(locationToSplits, numberedSplit, location);
    final String normalizedLocation = normalize(location);
    addLocationMapping(partialLocationsToSplits, numberedSplit, normalizedLocation);
    normalizedLocations.add(normalizedLocation);
  }
228337
def replace_values(in_m, out_m, map_from=(), map_to=()):
    '''
    
    '''
    for link in in_m.match():
        new_link = list(link)
        if map_from:
            if link[ORIGIN] in map_from: new_link[ORIGIN] = map_to[map_from.index(link[ORIGIN])]
        new_link[ATTRIBUTES] = link[ATTRIBUTES].copy()
        out_m.add(*new_link)
    return
1364901
def replace_data(self, chart_data):
        
        rewriter = SeriesXmlRewriterFactory(self.chart_type, chart_data)
        rewriter.replace_series_data(self._chartSpace)
        self._workbook.update_from_xlsx_blob(chart_data.xlsx_blob)
1203696
public function replace()
	{
		foreach($this->matches as $match)
		{
			$value = $this->extractValue($match);
			$this->insertValue($value, $match['raw']);
		}
	}
403624
def _update_inplace(self, result, verify_is_copy=True):
        
        # NOTE: This does *not* call __finalize__ and that's an explicit
        # decision that we may revisit in the future.

        self._reset_cache()
        self._clear_item_cache()
        self._data = getattr(result, '_data', result)
        self._maybe_update_cacher(verify_is_copy=verify_is_copy)
490029
def _copy_replace(src, dst, replacements):
    """"""
    with src.open() as infile, dst.open('w') as outfile:
        outfile.write(re.sub(
            '|'.join(re.escape(k) for k in replacements),
            lambda m: str(replacements[m.group(0)]),
            infile.read()
        ))
151925
async def _replace(self, key: Text, data: Dict[Text, Any]) -> None:
        

        with await self.pool as r:
            await r.set(self.register_key(key), ujson.dumps(data))
1262850
@Override
    public String replace(byte[] data, String flickrId, boolean async) throws FlickrException {
        Payload payload = new Payload(data, flickrId);
        return sendReplaceRequest(async, payload);
    }
754763
public static String replaceDataReferencesInString(final String input, final Map<String, Map<String, String>> data) {
        return replaceDataReferencesInString(input, data, null, false);
    }
528898
public function afterFind()
	{
		parent::afterFind();
		$this->_oldTags = $this->tags;		
		$this->created_at = gmdate("Y-m-d", $this->created_at);
	}
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}