Fired on system init
766524
static function init() {
		elgg_register_event_handler('pagesetup', 'system', array(__CLASS__, 'pagesetup'));
		
		elgg_register_plugin_hook_handler('register', "menu:admin_control_panel", array(__CLASS__, 'handlerAdminButtonsMenuRegister'));
		
		elgg_register_action('backup/db/save', 
			elgg_get_config('pluginspath') . __CLASS__ . '/actions/backup/db/save.php', 'admin');
		elgg_register_action('backup/db/load', 
			elgg_get_config('pluginspath') . __CLASS__ . '/actions/backup/db/load.php', 'admin');
	}
591350
protected function onInit()
    {
        if (is_array($this->params)) {
            $this->override = Utility::get($this->params, "{override}", false);
        }

    }
363927
function init (router) {
  router.use((err, req, res, next) => {
    console.error(err.stack || err.message)

    res.statusCode = err.statusCode || 500
    res.end()
  })
}
953367
@PostConstruct
    public void init() {

        bindAction(burger1);
        bindAction(burger2);
        bindAction(burger3);
        bindAction(burger4);

        snackbar = new JFXSnackbar(root);
        snackbar.setPrefWidth(300);

        badge1.setOnMouseClicked((click) -> {
            int value = Integer.parseInt(badge1.getText());
            if (click.getButton() == MouseButton.PRIMARY) {
                value++;
            } else if (click.getButton() == MouseButton.SECONDARY) {
                value--;
            }

            if (value == 0) {
                badge1.setEnabled(false);
            } else {
                badge1.setEnabled(true);
            }
            badge1.setText(String.valueOf(value));

            // trigger snackbar
            if (count++ % 2 == 0) {
                snackbar.fireEvent(new SnackbarEvent(new JFXSnackbarLayout("Toast Message " + count)));
            } else {
                if (count % 4 == 0) {
                    JFXButton button = new JFXButton("CLOSE");
                    button.setOnAction(action -> snackbar.close());
                    snackbar.fireEvent(new SnackbarEvent(
                        new JFXSnackbarLayout("Snackbar Message Persistent " + count, "CLOSE", action -> snackbar.close()),
                        Duration.INDEFINITE, null));

                } else {
                    snackbar.fireEvent(new SnackbarEvent(
                        new JFXSnackbarLayout("Snackbar Message" + count, "UNDO", null),
                        Duration.millis(3000), null));
                }
            }
        }
1295922
private function init()
    {
        $this->cwd = getcwd();
        $this->installedPaths = array();

        $this->processExecutor = new ProcessExecutor($this->io);
        $this->filesystem = new Filesystem($this->processExecutor);
    }
686464
def run_initializer(initializer, initargs):
    """"""
    try:
        initializer(*initargs)
        return True
    except Exception as error:
        logging.exception(error)
        return False
110918
@Override
    public void afterInitialized(BaseComponent comp) {
        root = (BaseUIComponent) comp;
        this.comp = root;
        comp.setAttribute(Constants.ATTR_COMPOSER, this);
        comp.addEventListener(ThreadEx.ON_THREAD_COMPLETE, threadCompletionListener);
        appContext = SpringUtil.getAppContext();
        appFramework = FrameworkUtil.getAppFramework();
        eventManager = EventManager.getInstance();
        initialize();
    }
467198
public static void initialize() {
		if (isInitialized) {
			return;
		}
		isInitialized = true;
		printLogo();
		try {
			logger.info("--- Para.initialize() [{}] ---", Config.ENVIRONMENT);

			for (InitializeListener initListener : INIT_LISTENERS) {
				if (initListener != null) {
					initListener.onInitialize();
					logger.debug("Executed {}.onInitialize().", initListener.getClass().getName());
				}
			}
			logger.info("Instance #{} initialized.", Config.WORKER_ID);
		} catch (Exception e) {
			logger.error("Failed to initialize Para.", e);
		}
	}
1106831
def init():
    '''  '''
    globals()["sock"] = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
    globals()["sockfd"] = globals()["sock"].fileno()
433122
def OnInit(self):
        """"""
        wx.Image.AddHandler(self.handler)
        frame = MainFrame( config_parser = load_config())
        frame.Show(True)
        self.SetTopWindow(frame)
        if sys.argv[1:]:
            wx.CallAfter( frame.load_memory, sys.argv[1] )
        else:
            log.warn( 'No memory file specified' )
        return True
1364965
@Command(name = INIT_CMD)
    public synchronized void initCmd() throws DevFailed {
        xlogger.entry();
        // if init is already in progress, do nothing

        if (!isInitializing) {
            isInitializing = true;
            isCorrectlyInit.set(false);
            deleteDevice();
            doInit();
            try {
                pushInterfaceChangeEvent(false);
            } catch (final DevFailed e) {
                // ignore
                logger.error("error pushing event", e);
            }
        }
        xlogger.exit();
    }
699680
def execute(self, args):
        """"""
        _run_atstart()
        hook_name = os.path.basename(args[0])
        if hook_name in self._hooks:
            try:
                self._hooks[hook_name]()
            except SystemExit as x:
                if x.code is None or x.code == 0:
                    _run_atexit()
                raise
            _run_atexit()
        else:
            raise UnregisteredHookError(hook_name)
30602
protected static function init()
    {
        // Start file.
        $backtrace        = debug_backtrace();
        self::$_startFile = $backtrace[count($backtrace) - 1]['file'];

        // Pid file.
        if (empty(self::$pidFile)) {
            self::$pidFile = __DIR__ . "/../" . str_replace('/', '_', self::$_startFile) . ".pid";
        }

        // Log file.
        if (empty(self::$logFile)) {
            self::$logFile = __DIR__ . '/../workerman.log';
        }
        $log_file = (string)self::$logFile;
        if (!is_file($log_file)) {
            touch($log_file);
            chmod($log_file, 0622);
        }

        // State.
        self::$_status = self::STATUS_STARTING;

        // For statistics.
        self::$_globalStatistics['start_timestamp'] = time();
        self::$_statisticsFile                      = sys_get_temp_dir() . '/workerman.status';

        // Process title.
        self::setProcessTitle('WorkerMan: master process  start_file=' . self::$_startFile);

        // Init data for worker id.
        self::initId();

        // Timer init.
        Timer::init();
    }
1327532
def init(name, runtime):
    """"""
    runtime = click.unstyle(runtime)

    stdout.write(
        style.format_command(
            'Initializing',
            '%s %s %s' % (name, style.gray('@'), style.green(runtime))
        )
    )

    config = Config(os.getcwd())
    config.set('runtime', runtime)
    config.save()

    generate.main(['init', name], standalone_mode=False)
    run.main(['python', 'manage.py', 'migrate'])
76151
private void tryInitialize(boolean checkTermination) {
        if (runState == 0) { // bootstrap by locking static field
            int p = config & SMASK;
            int n = (p > 1) ? p - 1 : 1; // ensure at least 2 slots
            n |= n >>> 1;    // create workQueues array with size a power of two
            n |= n >>> 2;
            n |= n >>> 4;
            n |= n >>> 8;
            n |= n >>> 16;
            n = ((n + 1) << 1) & SMASK;
            AuxState aux = new AuxState();
            WorkQueue[] ws = new WorkQueue[n];
            synchronized (modifyThreadPermission) { // double-check
                if (runState == 0) {
                    workQueues = ws;
                    auxState = aux;
                    runState = STARTED;
                }
            }
        }
        if (checkTermination && runState < 0) {
            tryTerminate(false, false); // help terminate
            throw new RejectedExecutionException();
        }
    }
1070949
function onInit(output) {
    return Promise(output)
    .then(prepareI18n)
    .then(prepareResources)
    .then(copyPluginAssets);
}
77072
static void init() {
		initialContextFactory = System.getProperty(Context.INITIAL_CONTEXT_FACTORY);
		System.setProperty(Context.INITIAL_CONTEXT_FACTORY,
				MonitoringInitialContextFactory.class.getName());
	}