Handler for show
434406
function show() {
    var parsed = ensureConfig();
    function showRollbacks() {
        var rollbacks = mu.getRollbacks();
        var keys = Object.keys(rollbacks);
        var padBtm = [0, 0, 1, 0];
        var ui = pargv.ui(105);
        var i = keys.length;
        var hdrNo = { text: " ", width: 5 };
        var hdrId = { text: "" + chalk.underline.gray('ID'), width: 20 };
        var hdrTs = { text: "" + chalk.underline.gray('Timestamp'), width: 30 };
        var hdrCt = { text: "" + chalk.underline.gray('Count'), width: 10 };
        var hdrTpl = { text: "" + chalk.underline.gray('Templates'), width: 35, padding: padBtm };
        ui.div(hdrNo, hdrId, hdrTs, hdrCt, hdrTpl);
        while (i--) {
            var key = keys[i];
            var rb = rollbacks[key];
            var no = { text: i + 1 + ")", width: 5 };
            var id = { text: "" + chalk.cyan(rb.id), width: 20 };
            var ts = { text: "" + chalk.yellow(rb.timestamp), width: 30 };
            var ct = { text: "" + chalk.green(rb.count + ''), width: 10 };
            var tpl = { text: "" + chalk.magenta(rb.templates.join(', ')), width: 35 };
            ui.div(no, id, ts, ct, tpl);
        }
        ui.show();
    }
    switch (parsed.name) {
        case 'r':
            showRollbacks();
            break;
        case 'rollbacks':
            showRollbacks();
            break;
        default:
            break;
    }
}
68906
def show_event_handlers(self, stream=sys.stdout, verbose=0):
        """"""
        lines = ["List of event handlers installed:"]
        for handler in self.event_handlers:
            if verbose:
                lines.extend(handler.__class__.cls2str().split("\n"))
            else:
                lines.extend(str(handler).split("\n"))

        stream.write("\n".join(lines))
        stream.write("\n")
1152439
def on_event(event_handler = nil, &block)
      event_handler ||= block
      raise ArgumentError, "no event_handler provided" if event_handler.nil?
      @event_handler = event_handler
    end
518837
function tryRender(view, options, callback) {
  try {
    view.render(options, callback);
  } catch (err) {
    callback(err);
  }
}
886391
function render(handler, define, parameter) {

  handler.res.render(define.template, Object.assign(parameter, define.parameter), (err, str) => {
    if (err) {
      return handler.req.next(err);
    }

    str = str.replace(/(src=\"\/static\/.*)\"/g, `$1?stamp=${config.app.stamp}"`);
    str = str.replace(/(href=\"\/static\/.*)\"/g, `$1?stamp=${config.app.stamp}"`);
    handler.res.send(str);
  });
}
132395
function () {
            this._handler = $B.bind( function (e) {
                var evt = {target: this, img: this.img, data: this._data};
    
                switch (e.type) {
                    case 'load':
                        evt.type = 'complete';
                        this._isComplete = true;
                        this.dispatch( 'complete', evt );
                        break;
                    case 'error':
                        this.dispatch( 'error', evt );
                        break;
                }
    
                this._removeEvents();
            }, this);
        }
1281714
function show() {
    var _this3 = this;

    if (this[_show]) return this[_show];
    var originalDisplay = this.attr('__originalDisplay') || '';
    var originalState = this.attr('__originalState') || 'default';
    var states = this.attr('states');

    if (states.show) {
      var _st = ['show', originalState];

      if (states.beforeShow) {
        _st.unshift('beforeShow');
      }

      var deferred = this.resolveStates(_st, function () {
        var state = _this3.attr('state');

        if (state === 'hide') {
          _this3.once('state-from-hide', function () {
            _this3.attr('display', originalDisplay);
          });
        }
      });
      deferred.promise = deferred.promise.then(function () {
        if (!_this3[_hide]) {
          delete _this3.__attr.__originalDisplay;
          delete _this3.__attr.__originalState;

          if (states.show.__default) {
            delete states.show;

            _this3.attr('states', states);
          }
        }

        delete _this3[_show];
      });
      this[_show] = deferred;
      return deferred;
    }

    var rs = this[_resolveState];

    if (rs) {
      rs.resolve();
      rs.promise.then(function () {
        _this3.attr('state', originalState);

        _this3.attr('display', originalDisplay);
      });
      return rs;
    }

    this.attr('state', originalState);
    this.attr('display', originalDisplay);
    return this;
  }
67494
function() {
        this.fireEvent('showing');

        var show = false;

        this.count++;

        if (this.count === 1) {
            this.element.reveal();
            show = true;
        }

        this.showLoader();

        this.fireEvent('shown', [show]);
    }
584085
def on_click(self, handler):
        ''' 

        '''
        self.on_event(ButtonClick, handler)
        self.on_event(MenuItemClick, handler)
443117
def _on_enter(self, event):
        """"""
        self._id = self.master.after(int(self._timeout * 1000), func=self.show)
711546
public function __HANDLER()
    {
        // Create query to get users
        $query = dbQuery('user')->Active(1)->order_by('UserID');

        // Create generic table for users
        $table = new Table($query);

        // Установим представление
        m()->view('main/index')->title(t('Пользователи системы', true))
            ->all_materials(true)
            // Установим шаблон таблицы пользователей
            ->user_table($table->render());
    }
153704
def showEvent(self, event):
        """"""
        selected = self.paramList.selectedIndexes()
        model = self.paramList.model()

        self.visibilityChanged.emit(1)
        if len(selected) > 0:
            # select the correct components in the StimulusView
            self.paramList.parameterChanged.emit(model.selection(selected[0]))
            self.hintRequested.emit('Select parameter to edit. \n\nParameter must have selected components in order to edit fields')
        elif model.rowCount() > 0:
            # just select first item
            self.paramList.selectRow(0)
            self.paramList.parameterChanged.emit(model.selection(model.index(0,0)))
            self.hintRequested.emit('Select parameter to edit. \n\nParameter must have selected components in order to edit fields')
        else:
            model.emptied.emit(True)
            self.hintRequested.emit('To add a parameter, Drag "Add" onto empty auto-parameter table')
176494
def handler ( method )
      raise TypeError,  error_message(method, __method__) unless method.instance_of? Method
      @handler = method
    end
986094
def _on_request(self, name, args):
        """"""
        if IS_PYTHON3:
            name = decode_if_bytes(name)
        handler = self._request_handlers.get(name, None)
        if not handler:
            msg = self._missing_handler_error(name, 'request')
            error(msg)
            raise ErrorResponse(msg)

        debug('calling request handler for "%s", args: "%s"', name, args)
        rv = handler(*args)
        debug("request handler for '%s %s' returns: %s", name, args, rv)
        return rv
1072687
function Handler(level) {
	level = level || Logger.NOTSET;

	if (Logger.getLevelName(level) === '') {
		throw new Error('Argument 1 of Handler.constructor has unsupported'
			+ ' value \'' + level + '\'');
	}

	Filterer.call(this);

	/**
	 * @private
	 * @type {number}
	 */
	this._level = level;

	/**
	 * @private
	 * @type {Object}
	 */
	this._formatter = null;
}
329642
def show():
    """"""
    items = list(collection.find())
    # JSON conversion chokes on the _id objects, so we convert
    # them to strings here
    for i in items:
        i['_id'] = str(i['_id'])
    return items
1306506
def handle(self, handler_name, request, suffix=''):
        """"""
        return self.runtime.handle(self, handler_name, request, suffix)