Toggles the timer for updating frozen cells
195638
def OnTimerToggle(self, event):
        """"""

        if self.grid.timer_running:
            # Stop timer
            self.grid.timer_running = False
            self.grid.timer.Stop()
            del self.grid.timer

        else:
            # Start timer
            self.grid.timer_running = True
            self.grid.timer = wx.Timer(self.grid)
            self.grid.timer.Start(config["timer_interval"])
855941
def UnfreezeTimestamp(self):
    """"""
    if not self.prev_frozen_timestamps:
      raise RuntimeError("Unbalanced UnfreezeTimestamp call.")
    self.frozen_timestamp = self.prev_frozen_timestamps.pop()
73392
def _execute_cell_code(self, row, col, grid):
        """"""

        key = row, col, grid.current_table
        grid.code_array[key]

        grid.ForceRefresh()
758173
function resetTimer() {
              if( cancelTimer ) {
                cancelTimer();
                cancelTimer = null;
              }
              if( start && Date.now() - start > maxWait ) {
                if(!runScheduledForNextTick){
                  runScheduledForNextTick = true;
                  utils.compile(runNow);
                }
              }
              else {
                if( !start ) { start = Date.now(); }
                cancelTimer = utils.wait(runNow, wait);
              }
            }
1038145
def setVisible(self, value):
        """"""
        if self.timer is not None:
            if value:
                self.timer.start(self._interval)
            else:
                self.timer.stop()
        super(BaseTimerStatus, self).setVisible(value)
288344
function switchToHourMode(surpressAnimation) {
				if (selectionMode == 'HOUR') return;
				enteredDigits = '';
				repaintClockHourCanvas();
				if (surpressAnimation) {
					clockMinuteCanvas.css('display', 'none');
				}
				else {
					clockMinuteCanvas.css('zIndex', 2).stop().animate({opacity: 0, zoom:'80%', left:'10%', top:'10%'}, settings.modeSwitchSpeed, function() {
						clockMinuteCanvas.css('display', 'none');
					});
				}
				clockHourCanvas.stop().css('zoom', '100%')
									  .css('left', '0px')
									  .css('top', '0px')
									  .css('display', 'block')
									  .css('opacity', 1)
									  .css('zIndex', 1);
				selectionMode = 'HOUR';
				settings.onModeSwitch.call(element.get(0), selectionMode);
			}
397476
function GameTimer(node, options) {
        options = options || {};

        // ## Public properties

        /**
         * ### node
         *
         * Internal reference to node
         */
        this.node = node;

        /**
         * ### name
         *
         * Internal name of the timer
         */
        this.name = options.name || 'timer_' + J.randomInt(0, 1000000);

        /**
         * ### GameTimer.status
         *
         * Numerical index keeping the current the state of the GameTimer obj
         */
        this.status = GameTimer.UNINITIALIZED;

        /**
         * ### GameTimer.options
         *
         * The current settings for the GameTimer
         */
        this.options = options;

        /**
         * ### GameTimer.timerId
         *
         * The ID of the javascript interval
         */
        this.timerId = null;

        /**
         * ### GameTimer.timeLeft
         *
         * Total running time of timer
         */
        this.milliseconds = null;

        /**
         * ### GameTimer.timeLeft
         *
         * Milliseconds left before time is up
         */
        this.timeLeft = null;

        /**
         * ### GameTimer.timeLeft
         *
         * Milliseconds left when the last stop was called
         */
        this.timeLeftAtStop = null;

        /**
         * ### GameTimer.timePassed
         *
         * Milliseconds already passed from the start of the timer
         */
        this.timePassed = 0;

        /**
         * ### GameTimer.timePassed
         *
         * Milliseconds already passed when the last stop was called
         */
        this.timePassedAtStop = null;

        /**
         * ### GameTimer.update
         *
         * The frequency of update for the timer (in milliseconds)
         */
        this.update = undefined;

        /**
         * ### GameTimer.updateRemaining
         *
         * Milliseconds remaining for current update
         */
        this.updateRemaining = 0;

        /**
         * ### GameTimer.updateStart
         *
         * Timestamp of the start of the last update
         */
        this.updateStart = 0;

        /**
         * ### GameTimer.startPaused
         *
         * Whether to enter the pause state when starting
         */
        this.startPaused = null;

        /**
         * ### GameTimer.timeup
         *
         * Event string or function to fire when the time is up
         *
         * @see GameTimer.fire
         */
        this.timeup = 'TIMEUP';

        /**
         * ### GameTimer.hooks
         *
         * Array of hook functions to fire at every update
         *
         * The array works as a LIFO queue
         *
         * @see GameTimer.fire
         */
        this.hooks = [];

        /**
         * ### GameTimer.hookNames
         *
         * Object containing all names used for the hooks
         *
         * @see GameTimer.hooks
         */
        this.hookNames = {};

        /**
         * ### GameTimer.hookNames
         *
         * The name of the event emitter where the timer was registered
         *
         * @see EventEmitter
         */
        this.eventEmitterName = null;

        /**
         * ## GameTimer.stagerSync
         *
         * TRUE if the timer is synced with stager
         *
         * It will use GameTimer.stagerProperty to sync
         *
         * @see GameTimer.stagerProperty
         * @see GameTimer.syncWithStager
         */
        this.stagerSync = false;

        /**
         * ## GameTimer.stagerProperty
         *
         * The name of the property used to sync with the stager
         *
         * @see GameTimer.stagerSync
         */
        this.stagerProperty = 'timer';

        // Init!
        this.init(this.options);
    }
520328
function _onClick(d) {
  if(!_scheduledClickId) {
    _scheduledClickId = setTimeout(_scheduledClick.bind(this, d, d3.event.target), 200);
  }
}
168349
function Timer(timer, clear, duration, fn) {
          this.start = +(new Date());
          this.duration = duration;
          this.clear = clear;
          this.timer = timer;
          this.fns = [fn];
        }
394525
void toggleTable(Button toggleButton) {

        I_CmsToggleTable table = (I_CmsToggleTable)m_table;
        table.toggle(!CmsVaadinUtils.isButtonPressed(toggleButton));
        CmsVaadinUtils.toggleButton(toggleButton);
        if (!CmsStringUtil.isEmptyOrWhitespaceOnly(m_filterTable.getValue())) {
            filterTable(m_filterTable.getValue());
        }
        updateInfoButton();
    }
1056752
def OnTableChanged(self, event):
        """"""

        if hasattr(event, 'updated_cell'):
            # Event posted by cell edit widget.  Even more up to date
            #  than the current cell's contents
            self.ignore_changes = True
            try:
                self.SetValue(event.updated_cell)

            except TypeError:
                # None instead of string present
                pass
            self.ignore_changes = False

        else:
            current_cell = self.main_window.grid.actions.cursor
            current_cell_code = self.main_window.grid.code_array(current_cell)

            if current_cell_code is None:
                self.SetValue(u"")
            else:
                self.SetValue(current_cell_code)

        event.Skip()
578576
function flushCurrentCell() {
        if (currentCell.children.length > 0) {
            cells.push(currentCell);
            currentCell = N.tag("div");
            cellsWeights.push(1);
            totalWeight++;
        }
    }
753957
def setLastArgs(self, args):
        ''
        # only set if not already set (second input usually confirmation)
        if self.currentActiveRow is not None:
            if not self.currentActiveRow.input:
                self.currentActiveRow.input = args
622743
function(count, opts, cb) {
  this.count = count;
  this.cb = cb;
  var self = this;
  if (opts.timeout) {
    this.timerId = setTimeout(function() {
      self.cb(true);
    }, opts.timeout);
  }
}
132342
def OnDeleteRows(self, event):
        """"""

        bbox = self.grid.selection.get_bbox()

        if bbox is None or bbox[1][0] is None:
            # Insert rows at cursor
            del_point = self.grid.actions.cursor[0]
            no_rows = 1
        else:
            # Insert at lower edge of bounding box
            del_point = bbox[0][0]
            no_rows = self._get_no_rowscols(bbox)[0]

        with undo.group(_("Delete rows")):
            self.grid.actions.delete_rows(del_point, no_rows)

        self.grid.GetTable().ResetView()

        # Update the default sized cell sizes
        self.grid.actions.zoom()

        event.Skip()
420510
public void toggleState()
    {
        if (m_iCurrentState == ON)
            m_iCurrentState = NULL;
        else if (m_iCurrentState == OFF)
            m_iCurrentState = ON;
        else
            m_iCurrentState = OFF;
        this.updateImage();
    }
606422
def on_timer(self, event=None):
        
        # Smoothly update center and magnification properties of the transform
        k = np.clip(100. / self.mag.mag, 10, 100)
        s = 10**(-k * event.dt)
            
        c = np.array(self.mag.center)
        c1 = c * s + self.mouse_pos * (1-s)
        
        m = self.mag.mag * s + self.mag_target * (1-s)
        
        # If changes are very small, then it is safe to stop the timer.
        if (np.all(np.abs((c - c1) / c1) < 1e-5) and 
                (np.abs(np.log(m / self.mag.mag)) < 1e-3)):
            self.timer.stop()
            
        self.mag.center = c1
        self.mag.mag = m
            
        self._update_transform()