Update this range
180999
def update(self):
        

        if not self._track_changes:
            return True  # there's nothing to update

        data = self.to_api_data(restrict_keys=self._track_changes)
        response = self.session.patch(self.build_url(''), data=data)
        if not response:
            return False

        data = response.json()

        for field in self._track_changes:
            setattr(self, snakecase(field), data.get(field))
        self._track_changes.clear()

        return True
1199136
private void updateTimeRange(long timestamp) {
        // update the timestamp ranges
        if (timestamp < startTime) {
            startTime = timestamp;
        } 
        if (timestamp > endTime) {
            endTime = timestamp;
        }
    }
689380
function setrange(key, offset, value, req) {
  var val = this.getKey(key, req)
    , str = typeof val === 'string'
    , len
    , buf;
  if(val && !(val instanceof Buffer)) val = new Buffer(val);
  if(typeof val === 'number') val = new Buffer('' + val);
  if(typeof value === 'string') {
    value = new Buffer(value);
  }
  offset = parseInt(offset);
  if(!val) {
    val = new Buffer('');
  }

  // zero pad where necessary
  while(val.length < offset) {
    val = Buffer.concat([val, new Buffer([0])], val.length + 1);
  }

  // slice the buffer to offset
  if(offset < val.length) {
    val = val.slice(0, offset);
  }

  val = Buffer.concat([val, value], val.length + value.length);

  // was a string, put back as a string
  if(str) {
    val = '' + val;
    len = Buffer.byteLength(val);
  // was a buffer
  }else{
    len = val.length;
  }
  this.setKey(key, val, undefined, undefined, undefined, req);
  return len;
}
713460
def increment(self, delta=1, text=None):
        """"""
        return self.update(value=min(self.max, self.value + delta), text=text)
657601
function addRange(start, finish, scope) {
                var i = 0;
                for (i = start; i <= finish; i++) {
                    var item = {
                        value: $sce.trustAsHtml(i.toString()),
                        liClass: scope.page == i ? scope.activeClass : 'waves-effect',
                        action: function() {
                            internalAction(scope, this.value);
                        }
                    };

                    scope.List.push(item);
                }
            }
1208626
def _update(self):
        """"""
        self.dataChanged.emit(self.createIndex(0, 0), self.createIndex(
            len(self.collection), len(self.header)))
447785
def update(self, *iterables):
        """"""
        _set = self._set
        values = set(chain(*iterables))
        if (4 * len(values)) > len(_set):
            _list = self._list
            _set.update(values)
            _list.clear()
            _list.update(_set)
        else:
            _add = self.add
            for value in values:
                _add(value)
        return self
1153938
def _update(self):
        '''
        
        '''
        self.decimal_degree = self._calc_decimaldegree(self.degree, self.minute, self.second)
        self.degree, self.minute, self.decimal_minute, self.second = self._calc_degreeminutes(self.decimal_degree)
244810
def set(self, start, stop, length=None, units='bytes'):
        """"""
        assert is_byte_range_valid(start, stop, length), \
            'Bad range provided'
        self._units = units
        self._start = start
        self._stop = stop
        self._length = length
        if self.on_update is not None:
            self.on_update(self)
305546
function(oldRange, newRange, oldText, newText)
    {
        if (!this._internalTextChangeMode)
            this._textModel.resetUndoStack();
        this._mainPanel.textChanged(oldRange, newRange);
        this._gutterPanel.textChanged(oldRange, newRange);
        this._updatePanelOffsets();
    }
1276593
public static int updateInteger(int value, int range) {
		range = range == 0 ? (int) (0.1 * value) : range;
		int min = value - range;
		int max = value + range;
		return nextInteger(min, max);
	}
1214340
def update(self, other, copy=True, *args, **kwargs):
        """"""

        if other:  # dirty hack for python2.6

            if isinstance(other, self.__class__):

                if copy:
                    other = other.copy(*args, **kwargs)

                for slot in other.__slots__:
                    attr = getattr(other, slot)
                    if attr is not None:
                        setattr(self, slot, attr)

            else:
                raise TypeError(
                    'Wrong element to update with {0}: {1}'.format(self, other)
                )

        return self
32802
def update_time_range(form_data):
    """"""
    if 'since' in form_data or 'until' in form_data:
        form_data['time_range'] = '{} : {}'.format(
            form_data.pop('since', '') or '',
            form_data.pop('until', '') or '',
        )
915447
def set_range(self, min_val, max_val):
        
        if min_val > max_val:
            max_val, min_val = min_val, max_val
        self.values = (((self.values * 1.0 - self.values.min()) /
                        (self.values.max() - self.values.min()))
                       * (max_val - min_val) + min_val)
52432
def setrange(self, key, offset, value):
        
        if not isinstance(offset, int):
            raise TypeError("offset argument must be int")
        if offset < 0:
            raise ValueError("offset must be greater equal 0")
        return self.execute(b'SETRANGE', key, offset, value)
404281
public double[][] updateRanges(Instance instance, double[][] ranges) {
    // updateRangesFirst must have been called on ranges
    for (int j = 0; j < ranges.length; j++) {
      double value = instance.value(j);
      if (!instance.isMissing(j)) {
        if (value < ranges[j][R_MIN]) {
          ranges[j][R_MIN] = value;
          ranges[j][R_WIDTH] = ranges[j][R_MAX] - ranges[j][R_MIN];
        } else {
          if (instance.value(j) > ranges[j][R_MAX]) {
            ranges[j][R_MAX] = value;
            ranges[j][R_WIDTH] = ranges[j][R_MAX] - ranges[j][R_MIN];
          }
        }
      }
    }
    
    return ranges;
  }
733116
function range(begin, end, interval = 1) {
  var a = [];

  for (let i = begin; i < (begin+end); i += interval) {
    a.push(i);
  }

  return a;
}