Init file uploader
971274
function readFile(e) {
  const file = e.currentTarget.files && e.currentTarget.files[0];
  const reader = new FileReader();

  reader.onload = event => ArtBoard.loadANSI(event.target.result);
  if (file) reader.readAsText(file);
}
283853
protected function init()
    {
        if(!\extension_loaded('inotify'))
        {
            throw new \RuntimeException('the extension inotify is not installed');
        }
        $this->handler = \inotify_init();
        stream_set_blocking($this->handler, 0);

        $this->excludeRule = implode('|', array_map('\Imi\Util\Imi::parseRule', $this->excludePaths));
        foreach($this->includePaths as $path)
        {
            \inotify_add_watch($this->handler, $path, $this->mask);
            $directory = new \RecursiveDirectoryIterator($path, \FilesystemIterator::KEY_AS_PATHNAME | \FilesystemIterator::CURRENT_AS_FILEINFO);
            $iterator = new \RecursiveIteratorIterator($directory);
            if('' === $this->excludeRule)
            {
                foreach($iterator as $fileName => $fileInfo)
                {
                    $filePath = dirname($fileName);
                    if(!isset($this->paths[$filePath]))
                    {
                        $this->paths[$filePath] = \inotify_add_watch($this->handler, $filePath, $this->mask);
                    }
                }
            }
            else
            {
                $rule = "/^(?!{$this->excludeRule}).+$/i";
                $regex = new \RegexIterator($iterator, $rule, \RecursiveRegexIterator::GET_MATCH);
                foreach ($regex as $item)
                {
                    $filePath = dirname($item[0]);
                    if(!isset($this->paths[$filePath]))
                    {
                        $this->paths[$filePath] = \inotify_add_watch($this->handler, $filePath, $this->mask);
                    }
                }
            }
        }
    }
329297
function init(loader) {
  var loaderConfig = loaderUtils.getLoaderConfig(loader, 'web3Loader');
  web3 = require('./lib/web3')(loaderConfig.provider);
  config = mergeConfig(loaderConfig);
  isDebug = loader.debug;
}
425879
public void initialize() throws IOException {
    // Create a pipe such that its one end is connected to the input stream used by
    // the uploader and the other end is the write channel used by the caller.
    PipedInputStream pipeSource = new PipedInputStream(pipeBufferSize);
    OutputStream pipeSink = new PipedOutputStream(pipeSource);
    pipeSinkChannel = Channels.newChannel(pipeSink);

    // Connect pipe-source to the stream used by uploader.
    InputStreamContent objectContentStream = new InputStreamContent(contentType, pipeSource);
    // Indicate that we do not know length of file in advance.
    objectContentStream.setLength(-1);
    objectContentStream.setCloseInputStream(false);

    T request = createRequest(objectContentStream);
    request.setDisableGZipContent(true);

    // Change chunk size from default value (10MB) to one that yields higher performance.
    clientRequestHelper.setChunkSize(request, uploadChunkSize);

    // Given that the two ends of the pipe must operate asynchronous relative
    // to each other, we need to start the upload operation on a separate thread.
    uploadOperation = threadPool.submit(new UploadOperation(request, pipeSource));

    isInitialized = true;
  }
529338
function init(config) {
  var hydroConfig = config.hydro || {};
  var hydroJs = hydroConfig.path || dirname(dirname(require.resolve('hydro'))) + '/dist/hydro.js';
  var before = hydroConfig.before || [];

  config.files.unshift(createPattern(__dirname + '/adapter.js'));
  config.files.unshift(createPattern(hydroJs));

  before.reverse().forEach(function(file) {
    config.files.unshift(createPattern(path.resolve(file)));
  });
}
1189186
function uploadHandler (event) {
    const target = event.target;

    if (target.files && target.files[0]) {
      file = target.files[0];
      const reader = new FileReader();

      reader.addEventListener('load', loadHandler);

      reader.readAsDataURL(file);
    }
  }
1335851
public function init() {
        $attributes = $this->getAttributes();
        $fullPath = storage_path(
            $attributes['path']
        );

        if( Support\is_path_exists(
            $fullPath
        ) )
            $this->settings = Support\get_file_contents(
                $fullPath
            );
        else
            Support\dump_file($fullPath, json_encode([]));

        register_shutdown_function(function() use($fullPath) {
            Support\dump_file(
                $fullPath, $this->packData($this->settings)
            );
        });
    }
917584
public void initialise(File[] files, ClassLoader loader) throws MalformedURLException {
        _loader= loader;
        
        // TODO: remove this debugging stuff
        _filters= new LinkedList<IFilter>();
        _filters.add(new IgnoreFilter());
        _filters.add(new ServiceFilter());
//        _filters.add(new AgentElementFilter());
//        _filters.add(new NodeFilter());
//        _filters.add(new AgentFilter());
        
        // initialise enumerators
        _classEnumerations= new LinkedList<Enumeration<Class<?>>>();
        for(File current : files) {
            if(current.isDirectory()) {
                _classEnumerations.add(new DirectoryClassEnumerator(current, _loader));
            } else {
                _classEnumerations.add(new ArchiveClassEnumerator(current, _loader));
            }
        }
    }
1219689
public function init()
    {
        // Check filepath
        if (empty($this->filepath)) {
            return;
        }

        // Get configurations
        $settings = include $this->filepath;

        // Check
        if (empty($settings)) {
            return;
        }

        // Update
        $this->configs = $settings;

        // Enable backend~frontend actions
        if (OL_ZEUS_ISADMIN) {
            // Backend
            add_action('init', [$this, 'addShortcodesBackend']);
        } else {
            // Frontend
            add_action('init', [$this, 'addShortcodesFrontend']);
        }
    }
1293833
def init(plugin_manager, _, _2, config):
    
    submission_git_saver = SubmissionGitSaver(plugin_manager, config)
    submission_git_saver.daemon = True
    submission_git_saver.start()
902213
protected function constructUploadReceiver()
    {
        // Set Upload instance
        $this->setUpload(Upload::create());

        // filter out '' since this would be a regex problem on JS end
        $this->getValidator()->setAllowedExtensions(
            array_filter(File::config()->allowed_extensions)
        );

        // get the lower max size
        $maxUpload = File::ini2bytes(ini_get('upload_max_filesize'));
        $maxPost = File::ini2bytes(ini_get('post_max_size'));
        $this->getValidator()->setAllowedMaxFileSize(min($maxUpload, $maxPost));
    }
1071112
def init_logger_file(log_file, log_level='INFO'):
    
    log_level = LOG_LEVELS[log_level] if log_level in LOG_LEVELS.keys() else logging.INFO

    ROOT_LOG.setLevel(log_level)

    file_handle = logging.FileHandler(log_file)
    file_handle.setLevel(log_level)
    file_handle.setFormatter(formatter)
    ROOT_LOG.addHandler(file_handle)
784436
static function initialize()
    {
        $contentINI = eZINI::instance( 'content.ini' );
        foreach( array_unique( $contentINI->variable( 'EditSettings', 'ExtensionDirectories' ) ) as $extensionDirectory )
        {
            $fileName = eZExtension::baseDirectory() . '/' . $extensionDirectory . '/content/' . $extensionDirectory . 'handler.php';
            if ( file_exists( $fileName ) )
            {
                include_once( $fileName );
                $className = $extensionDirectory . 'Handler';
                $storeActionList = call_user_func_array( array( $className, 'storeActionList' ), array() );
                foreach( $storeActionList as $storeAction )
                {
                    eZContentObjectEditHandler::addStoreAction( $storeAction );
                }
            }
            else
            {
                eZDebug::writeError( 'Cound not find content object edit handler ( defined in content.ini ) : ' . $fileName );
            }
        }
    }
893109
public void init() throws ServletException {
        // Get the name of the upload directory.
        String uploadDirParam = getInitParameter("uploadDir");

        if (!StringUtil.isEmpty(uploadDirParam)) {
            try {
                URL uploadDirURL = getServletContext().getResource(uploadDirParam);
                uploadDir = FileUtil.toFile(uploadDirURL);
            }
            catch (MalformedURLException e) {
                throw new ServletException(e.getMessage(), e);
            }
        }

        if (uploadDir == null) {
            uploadDir = ServletUtil.getTempDir(getServletContext());
        }
    }
419133
public function init() {
		global $wp_customize;
		if ( ! $wp_customize ) {
			return;
		}
		// Allow disabling the custom loader using the kirki_config filter.
		$config = apply_filters( 'kirki_config', [] );
		if ( isset( $config['disable_loader'] ) && true === $config['disable_loader'] ) {
			return;
		}
		// Add the "loading" icon.
		add_action( 'wp_footer', [ $this, 'add_loader_to_footer' ] );
		add_action( 'wp_head', [ $this, 'add_loader_styles_to_header' ], 99 );
		$this->remove_default_loading_styles();
	}
366155
public function initializeUploadAssetAction()
    {
        $propertyMappingConfiguration = $this->arguments->getArgument('asset')->getPropertyMappingConfiguration();
        $propertyMappingConfiguration->allowAllProperties();
        $propertyMappingConfiguration->setTypeConverterOption(PersistentObjectConverter::class, PersistentObjectConverter::CONFIGURATION_CREATION_ALLOWED, true);
        $propertyMappingConfiguration->setTypeConverterOption(AssetInterfaceConverter::class, AssetInterfaceConverter::CONFIGURATION_ONE_PER_RESOURCE, true);
        $propertyMappingConfiguration->allowCreationForSubProperty('resource');
    }
1309864
public function init()
    {
        // Initializes the file service.
        $this->createClass('Brainworxx\\Krexx\\Service\\Misc\\File');
        // Initializes the messages.
        $this->createClass('Brainworxx\\Krexx\\View\\Messages');
        // Initialize the encoding service.
        $this->createClass('Brainworxx\\Krexx\\Service\\Misc\\Encoding');
        // Initializes the configuration.
        $this->createClass('Brainworxx\\Krexx\\Service\\Config\\Config');
        // Initialize the emergency handler.
        $this->createClass('Brainworxx\\Krexx\\Service\\Flow\\Emergency');
        // Initialize the recursionHandler.
        $this->createClass('Brainworxx\\Krexx\\Service\\Flow\\Recursion');
        // Initialize the code generation.
        $this->createClass('Brainworxx\\Krexx\\Analyse\\Code\\Codegen');
        // Initializes the chunks handler.
        $this->createClass('Brainworxx\\Krexx\\View\\Output\\Chunks');
        // Initializes the scope analysis.
        $this->createClass('Brainworxx\\Krexx\\Analyse\\Code\\Scope');
        // Initializes the routing.
        $this->createClass('Brainworxx\\Krexx\\Analyse\Routing\\Routing');
        // Initialize the event handler.
        $this->createClass('Brainworxx\\Krexx\\Service\\Factory\\Event');
        // Initializes the render class.
        $this->createClass($this->config->getSkinClass());
        // Check the environment and prepare the feedback, if necessary.
        $this->checkEnvironment();
    }