Initialize handlers for desktop browser.
165101
private void initializeForDesktop() {
		logger.log(Level.FINE, "ZoomControl ->initializeForDesktop()");
		StopPropagationHandler preventWeirdBehaviourHandler = new StopPropagationHandler();
		addDomHandler(preventWeirdBehaviourHandler, MouseDownEvent.getType());
		addDomHandler(preventWeirdBehaviourHandler, MouseUpEvent.getType());
		addDomHandler(preventWeirdBehaviourHandler, ClickEvent.getType());
		addDomHandler(preventWeirdBehaviourHandler, DoubleClickEvent.getType());

		final ViewPort viewPort = mapPresenter.getViewPort();

		// Zoom in button:
		zoomInElement.addDomHandler(new ClickHandler() {

			public void onClick(ClickEvent event) {
				logger.log(Level.FINE, "ZoomControl -> zoomInElement onClick()");
				int index = viewPort.getResolutionIndex(viewPort.getResolution());
				if (index < viewPort.getResolutionCount() - 1) {
					viewPort.registerAnimation(NavigationAnimationFactory.createZoomIn(mapPresenter));
				}
				event.stopPropagation();
			}
		}, ClickEvent.getType());

		// Zoom out button:
		zoomOutElement.addDomHandler(new ClickHandler() {

			public void onClick(ClickEvent event) {
				logger.log(Level.FINE, "ZoomControl -> zoomOutElement onClick()");
				int index = viewPort.getResolutionIndex(viewPort.getResolution());
				if (index > 0) {
					viewPort.registerAnimation(NavigationAnimationFactory.createZoomOut(mapPresenter));
				}
				event.stopPropagation();
			}
		}, ClickEvent.getType());
	}
3848
protected function _init() {
		parent::_init();

		if (!$this->_context) {
			return;
		}
		$this->_context->strings($this->_strings);

		if ($this->_config['handlers']) {
			$this->_context->handlers($this->_config['handlers']);
		}
	}
532589
function setupHandlers() {

    function terminate(err) {
        util.log('Uncaught Error: ' + err.message);
        console.log(err.stack);
        if (proc.shutdownHook) {
            proc.shutdownHook(err, gracefulShutdown);
        }
    }

    process.on('uncaughtException', terminate);

    process.addListener('SIGINT', gracefulShutdown);

    process.addListener('SIGHUP', function () {
        util.log('RECIEVED SIGHUP signal, reloading log files...');
        reload(argv);
    });

}
1057980
function initialize() {
    if (global.isVinn) {
      tr.isVinn = true;
    } else if (global.process && global.process.versions.node) {
      tr.isNode = true;
    } else {
      tr.isVinn = false;
      tr.isNode = false;
      tr.doc = document;

      tr.isMac = /Mac/.test(navigator.platform);
      tr.isWindows = /Win/.test(navigator.platform);
      tr.isChromeOS = /CrOS/.test(navigator.userAgent);
      tr.isLinux = /Linux/.test(navigator.userAgent);
    }
    tr.isHeadless = tr.isVinn || tr.isNode;
  }
1081743
def init_handler(args):
    
    try:
        initialize_repository(pathlib.Path.cwd())
    except ValueError as exc:
        print(exc, file=sys.stderr)
        return ExitCode.DATAERR

    return ExitCode.OK
319825
def init_handler(self):
        
        assert self.options.get('host') and self.options.get('port'), "Invalid options"
        assert self.options.get('to'), 'Recipients list is empty. SMTP disabled.'
        if not isinstance(self.options['to'], (list, tuple)):
            self.options['to'] = [self.options['to']]
949298
def do_init(self, handler):
        
        self.waiting = True
        self.exc_info = None
        self.handler = handler
1248206
def init_extensions(self):
        """"""
        extensions.redis.init_app(self)
        extensions.mail.init_app(self)
        extensions.deferred_js.init_app(self)
        extensions.upstream_info.extension.init_app(self)
        actions.init_app(self)

        # auth_service installs a `before_request` handler (actually it's
        # flask-login). We want to authenticate user ASAP, so that sentry and
        # logs can report which user encountered any error happening later,
        # in particular in a before_request handler (like csrf validator)
        auth_service.init_app(self)

        # webassets
        self.setup_asset_extension()
        self.register_base_assets()

        # Babel (for i18n)
        babel = abilian.i18n.babel
        # Temporary (?) workaround
        babel.locale_selector_func = None
        babel.timezone_selector_func = None

        babel.init_app(self)
        babel.add_translations("wtforms", translations_dir="locale", domain="wtforms")
        babel.add_translations("abilian")
        babel.localeselector(abilian.i18n.localeselector)
        babel.timezoneselector(abilian.i18n.timezoneselector)

        # Flask-Migrate
        Migrate(self, db)

        # CSRF by default
        if self.config.get("WTF_CSRF_ENABLED"):
            extensions.csrf.init_app(self)
            self.extensions["csrf"] = extensions.csrf
            extensions.abilian_csrf.init_app(self)

        self.register_blueprint(csrf.blueprint)

        # images blueprint
        from .web.views.images import blueprint as images_bp

        self.register_blueprint(images_bp)

        # Abilian Core services
        security_service.init_app(self)
        repository_service.init_app(self)
        session_repository_service.init_app(self)
        audit_service.init_app(self)
        index_service.init_app(self)
        activity_service.init_app(self)
        preferences_service.init_app(self)
        conversion_service.init_app(self)
        vocabularies_service.init_app(self)
        antivirus.init_app(self)

        from .web.preferences.user import UserPreferencesPanel

        preferences_service.register_panel(UserPreferencesPanel(), self)

        from .web.coreviews import users

        self.register_blueprint(users.blueprint)

        # Admin interface
        Admin().init_app(self)

        # Celery async service
        # this allows all shared tasks to use this celery app
        if getattr(self, "celery_app_cls", None):
            celery_app = self.extensions["celery"] = self.celery_app_cls()
            # force reading celery conf now - default celery app will
            # also update our config with default settings
            celery_app.conf  # noqa
            celery_app.set_default()

        # dev helper
        if self.debug:
            # during dev, one can go to /http_error/403 to see rendering of 403
            http_error_pages = Blueprint("http_error_pages", __name__)

            @http_error_pages.route("/<int:code>")
            def error_page(code):
                """Helper for development to show 403, 404, 500..."""
                abort(code)

            self.register_blueprint(http_error_pages, url_prefix="/http_error")
396462
def handlers(self):
        """"""
        if getattr(self, '_http'):
            yield from self.http.handlers()
        if getattr(self, '_cli'):
            yield from self.cli.handlers()
172067
protected void init()
    {
        // "support for SSL"
        String handlerPkgs = System.getProperty("java.protocol.handler.pkgs");
        if ((handlerPkgs != null) && !(handlerPkgs.isEmpty())) {
            handlerPkgs = handlerPkgs + "|com.sun.net.ssl.internal.www.protocol";
        } else {
        	handlerPkgs = "com.sun.net.ssl.internal.www.protocol";
        }
        System.setProperty("java.protocol.handler.pkgs", handlerPkgs);

        java.security.Security
                .addProvider(new com.sun.net.ssl.internal.ssl.Provider());

        // Create custom EditorKit if needed
        if (swingBoxEditorKit == null) {
            swingBoxEditorKit = new SwingBoxEditorKit();
        }

        setEditable(false);
        setContentType("text/html");

        activateTooltip(true);

        Caret caret = getCaret();
        if (caret instanceof DefaultCaret)
        	((DefaultCaret) caret).setUpdatePolicy(DefaultCaret.NEVER_UPDATE);
    }
1000019
protected void initIncidentHandlers() {
    if (incidentHandlers == null) {
      incidentHandlers = new HashMap<String, IncidentHandler>();

      DefaultIncidentHandler failedJobIncidentHandler = new DefaultIncidentHandler(Incident.FAILED_JOB_HANDLER_TYPE);
      incidentHandlers.put(failedJobIncidentHandler.getIncidentHandlerType(), failedJobIncidentHandler);

      DefaultIncidentHandler failedExternalTaskIncidentHandler = new DefaultIncidentHandler(Incident.EXTERNAL_TASK_HANDLER_TYPE);
      incidentHandlers.put(failedExternalTaskIncidentHandler.getIncidentHandlerType(), failedExternalTaskIncidentHandler);
    }
    if (customIncidentHandlers != null) {
      for (IncidentHandler incidentHandler : customIncidentHandlers) {
        incidentHandlers.put(incidentHandler.getIncidentHandlerType(), incidentHandler);
      }
    }
  }
836049
private void initialize() {
		this.setJMenuBar(getMainMenuBar());
		this.setContentPane(getPaneContent());
    	this.setPreferredSize(new Dimension(1000, 800));
		this.setDefaultCloseOperation(WindowConstants.DO_NOTHING_ON_CLOSE);
		this.addWindowListener(new WindowAdapter() {
			@Override
			public void windowClosing(WindowEvent e) {
				getMainMenuBar().getMenuFileControl().exit();
			}
		});

		this.setVisible(false);
	}
1146670
public void initImpl()
    throws ConfigException
  {
    if (_handler != null) {
    }
    else if (_pathHandler != null) {
    }
    else {
      setPath(Paths.get("."));
    }

    /*
    if (_formatter instanceof ELFormatter) {
      ((ELFormatter)_formatter).init();
    }
    */

    if (_formatter != null) {
    }
    else if (_handler != null && _handler.getFormatter() != null) {
    }
    else {
      _formatter = new PatternFormatter(PatternFormatter.DEFAULT_PATTERN);
    }
    
    if (_pathHandler != null) {
      _pathHandler.init();

      _handler = _pathHandler;
    }
    
    if (_handler == null) {
      throw new ConfigException(L.l("<log-handler> requires a configured log handler"));
    }
    
    // env/02s9
    if (_level != null) {
      _handler.setLevel(_level);
    }

    /* JDK defaults to Level.ALL
    if (_level != null)
      _handler.setLevel(_level);
    else
      _handler.setLevel(Level.INFO);
    */

    if (_formatter != null) {
      _handler.setFormatter(_formatter);
    }

    if (_filter != null) {
      _handler.setFilter(_filter);
    }
    
    if (_names.size() == 0) {
      _names.add("");
    }

    for (String name : _names) {
      Logger logger = Logger.getLogger(name);

      if (! (logger instanceof EnvironmentLogger)) {
        if (_handler instanceof AutoCloseable) {
          EnvLoader.addCloseListener((AutoCloseable) _handler);
        }
      }

      logger.addHandler(_handler);
    }
  }
1331861
async function init () {
    // initialze logging
    initLogging(this.immutableApp)
    // initialize global dir config by merging module configs
    initDir(this.immutableApp)
    // initalize handlebars
    initHandlebars(this.immutableApp)
    // initalize express request handling - bodyParser, cookieParser, etc
    initExpress(this.immutableApp)
    // initialize app
    initApp(this.immutableApp)
    // add error handler after all other middleware and routers
    initErrorHandler(this.immutableApp)
    // initialize models
    await initModels(this.immutableApp)
    // intialize components after models since they may use models
    initComponents(this.immutableApp)
    // initialize services after models since they may use models
    await initServices(this.immutableApp)
    // set initialize flag to true
    this.immutableApp.initialized = true
    // debug
    debug('init', this.immutableApp)
}
168852
private void initialize(Handler callbackHandler) {
		int processors = Runtime.getRuntime().availableProcessors();
		mDownloadDispatchers = new DownloadDispatcher[processors];
		mDelivery = new CallBackDelivery(callbackHandler);
	}
709102
def setup(self):
        
        self.pre_handlers = pre_handlers = {}
        self.post_handlers = post_handlers = {}
        for name in sorted(vars(type(self))):
            if name.startswith('init_'):
                getattr(self, name)()
            elif name.startswith('pre_'):
                pre_handlers[name[4:]] = getattr(self, name)
            elif name.startswith('post_'):
                post_handlers[name[5:]] = getattr(self, name)
788047
function initialise() {

	    DOMReady(function () {

	    	for (var i = 0; i < 10; i++) {
				createCommandHtml(true);
	    	}

			// var rellax = new Rellax('.rellax');

	    });

	    document.addEventListener('webkitAnimationEnd', onAnimationEnded);

	}