Update the info from the last position recorded under the cursor.
481122
def _showxy(self, viewer, data_x, data_y):
        
        self._cursor_last_update = time.time()
        try:
            image = viewer.get_image()
            if (image is None) or not isinstance(image, BaseImage.BaseImage):
                # No compatible image loaded for this channel
                return

            settings = viewer.get_settings()
            info = image.info_xy(data_x, data_y, settings)

            # Are we reporting in data or FITS coordinates?
            off = self.settings.get('pixel_coords_offset', 0.0)
            info.x += off
            info.y += off

        except Exception as e:
            self.logger.warning(
                "Can't get info under the cursor: %s" % (str(e)))
            return

        # TODO: can this be made more efficient?
        chname = self.get_channel_name(viewer)
        channel = self.get_channel(chname)

        self.make_callback('field-info', channel, info)

        self.update_pending()
        return True
985610
def get_remembered_position(self):
        """"""
        if not self._able_to_format:
            return self._original_position
        accrued_input_index = 0
        current_output_index = 0
        while (accrued_input_index < self._position_to_remember and
               current_output_index < len(self._current_output)):
            if (self._accrued_input_without_formatting[accrued_input_index] ==
                self._current_output[current_output_index]):
                accrued_input_index += 1
            current_output_index += 1
        return current_output_index
289727
private function restoreLastUserInput()
    {
        $this->userInput = $this->lastInput;
        $this->cursorPosition = mb_strlen($this->userInput);
    }
1020497
def __update_information(self):
        """"""

        info = {}

        info["actions_count"] = Action.objects.count()
        
        info["creation_times"] = []
        info["deletion_times"] = []

        info["content_type"] = None

        # Find object type and when it was created

        for ccommit in CreationCommit.objects.filter(object_uid=self.uid):
            info["creation_times"].append(ccommit.action.id)
        info["creation_times"].sort()

        for dcommit in DeletionCommit.objects.filter(object_uid=self.uid):
            info["deletion_times"].append(dcommit.action.id)
        info["deletion_times"].sort()

        try:
            info["content_type"] = ccommit.content_type
        except NameError:
            raise DisciplineException("You tried to make a TimeMachine out of"
                               " an object that doesn't exist!")

        self.info = info

        for key in info.keys():
            setattr(self, key, info[key])
945581
def updateAltHistory(self):
        ''''''
        self.altHist.append(self.relAlt)
        self.timeHist.append(self.relAltTime)
        
        # Delete entries older than x seconds
        histLim = 10
        currentTime = time.time()
        point = 0
        for i in range(0,len(self.timeHist)):
            if (self.timeHist[i] > (currentTime - 10.0)):
                break
        # Remove old entries
        self.altHist = self.altHist[i:]
        self.timeHist = self.timeHist[i:]
        
        # Transform Data
        x = []
        y = []
        tmin = min(self.timeHist)
        tmax = max(self.timeHist)
        x1 = self.leftPos+(self.vertSize/10.0)
        y1 = -0.25
        altMin = 0
        altMax = max(self.altHist)
        # Keep alt max for whole mission
        if altMax > self.altMax:
            self.altMax = altMax
        else:
            altMax = self.altMax
        if tmax != tmin:
            mx = 0.5/(tmax-tmin)
        else:
            mx = 0.0
        if altMax != altMin:
            my = 0.5/(altMax-altMin)
        else:
            my = 0.0
        for t in self.timeHist:
            x.append(mx*(t-tmin)+x1)
        for alt in self.altHist:
            val = my*(alt-altMin)+y1
            # Crop extreme noise
            if val < -0.25:
                val = -0.25
            elif val > 0.25:
                val = 0.25
            y.append(val)
        # Display Plot
        self.altHistRect.set_x(self.leftPos+(self.vertSize/10.0))
        self.altPlot.set_data(x,y)
        self.altMarker.set_data(self.leftPos+(self.vertSize/10.0)+0.5,val)
        self.altText2.set_position((self.leftPos+(4*self.vertSize/10.0)+0.5,val))
        self.altText2.set_size(self.fontSize)
        self.altText2.set_text('%.f m' % self.relAlt)
783816
def update(self):
        """"""
        expire_time = time.time() - self.max_time
        while self.row_deque and self.time_deque[0] < expire_time:
            self.row_deque.popleft()  # FIFO
            self.time_deque.popleft()
629673
function( cb ){
              if( ! self.positionField ){
                cb( null );
              } else {

                // If repositioning is required, do it
                if( self.positionField ){
                  var where, beforeId;
                  if( ! options.position ){
                    where = 'end';
                  } else {
                    where = options.position.where;
                    beforeId = options.position.beforeId;
                  }
                  self.reposition( recordWithLookups, where, beforeId, cb );
                }
              }
            }
150711
public function updateLastAction ()
	{
		
		$arr	= $this->getSessionData ();
		
		$this->lastAction		= time ();
		$arr['last_action']		= $this->lastAction;
		
		$this->session ()->set (get_called_class (), serialize ($arr));
		
	}
812136
void updateCount() {
		if (this.hasChanged) {
			this.positionArray = ArrayUtils.toPrimitive(getPositionList()
					.toArray(new Long[0]));
			this.hasChanged = false;
		}
	}
695570
def _update(self, data):
      '''
      '''
      self.orderby = data['orderby']
      self.revision = data['revisionid']
      self.title = data['title']
      self.lines = [Line(self.guideid, self.stepid, line['lineid'], data=line)
                    for line in data['lines']]
      # TODO: Support video.
      if data['media']['type'] == 'image':
         self.media = []
         for image in data['media']['data']:
            self.media.append(Image(image['id']))
126908
def update(self):
        
        for s in self.sensors:
            s.position = self.io.get_object_position(object_name=s.name)
            s.orientation = self.io.get_object_orientation(object_name=s.name)
384220
def update(self, value=None):
        ''

        if value is not None and value is not UnknownLength:
            if (self.maxval is not UnknownLength
                and not 0 <= value <= self.maxval):

                raise ValueError('Value out of range')

            self.currval = value


        if not self._need_update(): return
        if self.start_time is None:
            raise RuntimeError('You must call "start" before calling "update"')

        now = time.time()
        self.seconds_elapsed = now - self.start_time
        self.next_update = self.currval + self.update_interval
        self.fd.write(self._format_line() + '\r')
        self.last_update_time = now
77414
def _sincedb_update_position(self, lines=0, force_update=False):
        
        if not self._sincedb_path:
            return False

        self._line_count = self._line_count + lines
        old_count = self._line_count_sincedb
        lines = self._line_count

        current_time = int(time.time())
        if not force_update:
            if self._last_sincedb_write and current_time - self._last_sincedb_write <= self._sincedb_write_interval:
                return False

            if old_count == lines:
                return False

        self._sincedb_init()

        self._last_sincedb_write = current_time

        self._log_debug('updating sincedb to {0}'.format(lines))

        conn = sqlite3.connect(self._sincedb_path, isolation_level=None)
        cursor = conn.cursor()
        query = 'insert or replace into sincedb (fid, filename) values (:fid, :filename);'
        cursor.execute(query, {
            'fid': self._fid,
            'filename': self._filename
        })

        query = 'update sincedb set position = :position where fid = :fid and filename = :filename'
        cursor.execute(query, {
            'fid': self._fid,
            'filename': self._filename,
            'position': lines,
        })
        conn.close()

        self._line_count_sincedb = lines

        return True
816443
def last_position(self):
        
        return self._old_x, self._old_y, self._old_width, self._old_height
872168
private void updateLastMapLocalityLevel(JobInProgress job,
      Task mapTaskLaunched, TaskTrackerStatus tracker) {
    JobInfo info = infos.get(job);
    LocalityLevel localityLevel = localManager.taskToLocalityLevel(
        job, mapTaskLaunched, tracker);
    info.lastMapLocalityLevel = localityLevel;
    info.timeWaitedForLocalMap = 0;
  }
1049882
private void updateLastForce()
    {
        if (Double.compare(fhLast, fhDest) != 0)
        {
            fhLast = fhDest;
            arrivedH = false;
        }
        if (Double.compare(fvLast, fvDest) != 0)
        {
            fvLast = fvDest;
            arrivedV = false;
        }
    }
79346
def update(self, duration):
        """"""
        if duration >= 0:
            self.histogram.update(duration)
            self.meter.mark()