Client extension hook for show.
491452
def show_ext(self, path, id, **_params):
        """"""
        return self.get(path % id, params=_params)
1002592
function addHookByType(ctx, type, methodNames, fn) {
  let i = methodNames.length;

  // If no hook specified, add wildcard
  if (i === 0) {
    methodNames = ['*'];
    i = 1;
  }

  let hookType = `${type}Hooks`;

  if (!ctx[hookType]) ctx[hookType] = {};

  while (i--) {
    let methodName = methodNames[i];
    // for array method names
    if (Array.isArray(methodName)) {
      addHookByType(ctx, type, methodName, fn);
    } else {
      if (!ctx[hookType][methodName]) {
        ctx[hookType][methodName] = [fn];
      } else {
        ctx[hookType][methodName].push(fn);
      }
    }
  }
}
269769
def watched_extension(extension):
    """"""
    for ext in hamlpy.VALID_EXTENSIONS:
        if extension.endswith('.' + ext):
            return True
    return False
1235717
function hook() {
      var comp = hook.proxy.apply(null, arguments);
      for(var i = 0;i < hooks.length;i++) {
        hooks[i].apply(comp, arguments);
      }
      return comp;
    }
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")
564188
public function hookCallback()
    {
        $name = $this->getModel()->getName();

        // Check Ajax referer
        check_ajax_referer($name, 'nonce');

        // Call custom callback function
        $data = $this->callback();

        // Build JSON data
        wp_send_json_success($data);

        // Stops everything
        wp_die();
    }
388089
def views_preview(self, data, **kwargs):
        ""
        api_path = "/api/v2/views/preview.json"
        return self.call(api_path, method="POST", data=data, **kwargs)
1347654
function showTooltipBind() {
              if(hasEnableExp && !scope.$eval(attrs[prefix+'Enable'])) {
                return;
              }
              if ( scope.tt_popupDelay ) {
                popupTimeout = $timeout( show, scope.tt_popupDelay, false );
                popupTimeout.then(function(reposition){reposition();});
              } else {
                show()();
              }
            }
621060
def Show(self, value = True):
  """"""
  self.Bind(wx.EVT_BUTTON, lambda event: self.Close(True), wx.Button(self.pane, label = '&Cancel')) # Add a cancel button
  ok = wx.Button(self.pane, label = '&OK') # Add the ok button
  ok.SetDefault() # When the user presses enter, this is the button which gets activated
  self.Bind(wx.EVT_BUTTON, self.onOk, ok) # Bind it
  self.Bind(wx.EVT_BUTTON, self.apply, wx.Button(self.pane, label = '&Apply')) # Apply the configuration changes to the ConfigParser object, but don't close the window
  help = wx.Button(self.pane, label = '&Help')
  if not callable(self.config.helpFunc):
   help.Disable()
  help.Bind(wx.EVT_BUTTON, self.config.helpFunc) # Add a help button
  return super(ConfFrame, self).Show(value)
1261177
def show_and_run(self):
        """"""
        self.display_widget = gtk.Window()
        self.display_widget.add(self.widget)
        self.display_widget.show()
        BaseDelegate.show_and_run(self)
906802
def _run_hooked_methods(self, hook: str):
        
        for method in self._potentially_hooked_methods:
            for callback_specs in method._hooked:
                if callback_specs['hook'] != hook:
                    continue

                when = callback_specs.get('when')

                if when:
                    if self._check_callback_conditions(callback_specs):
                        method()
                else:
                    method()
1003421
def dispatch_hook(key, hooks, hook_data):
    """"""

    hooks = hooks or dict()

    if key in hooks:
        try:
            return hooks.get(key).__call__(hook_data) or hook_data

        except Exception, why:
            warnings.warn(str(why))

    return hook_data
1266816
def cmd(send, *_):
    
    hooklist = ', '.join([str(x) for x in hook_registry.get_known_hooks()])
    send('Loaded hooks: %s' % (hooklist))
639333
def extend(func):
    """"""
    def callback(context, name, ob):
        obj = context.context
        if info.scope == 'class':
            @functools.wraps(func)
            def f(self, *args, **kwargs):
                plugin = obj.get_plugin(ob)
                return getattr(plugin, func.__name__)(*args, **kwargs)
            setattr(obj, func.__name__, f.__get__(obj, obj.__class__))
        else:
            setattr(obj, func.__name__, func.__get__(obj, obj.__class__))
    info = venusian.attach(func, callback, category='irc3d.extend')
    return func
306840
def show_inputs(client, workflow):
    """"""
    for input_ in workflow.inputs:
        click.echo(
            '{id}: {default}'.format(
                id=input_.id,
                default=_format_default(client, input_.default),
            )
        )
    sys.exit(0)
418642
def eval_hooks(self):
        
        logging.debug("Evaluating hooks")
        if self.get_edge_triggered():
            logging.debug("Hook triggered")
            for hook in [h for h in self.edge_hooks if h.is_ready()]:
                logging.debug("Hook invoked")
                hook.invoke()
1007533
function(data) {
            var mode = bs.options.get("mode");
            var open = bs.options.get("open");

            if (
                mode === "proxy" ||
                mode === "server" ||
                open === "ui" ||
                open === "ui-external"
            ) {
                utils.openBrowser(data.url, bs.options, bs);
            }

            // log about any file watching
            if (bs.watchers) {
                bs.events.emit("file:watching", bs.watchers);
            }
        }