Initialize the realtime plugin
@param   {Object} config     The config object
@param   {string} config.url The URL to connect to for realtime events
@param {Function} [EventSource] EventSource constructor to use (for testing purposes)
@returns {void}
340243
function (config, EventSource) {
            var url = config.url;
            if (url) {
                realtime = new Crocodoc.Realtime(url, EventSource || window.EventSource);

                // force the viewer to think conversion is not complete
                // @TODO: ideally this wouldn't have to make an extra trip to
                // the server just to find out the doc is already done
                // converting, so we should have an indicator of the doc status
                // in the session endpoint response
                viewerConfig.conversionIsComplete = false;
                registerBoxViewPageEventHandlers();
            }
        }
351879
function init(){

    eventDataPairs = 0;
    currentSession = sessionManager.createSession();
    lastRequestTime = utils.getUnixTimeInSeconds();
    mediaPlaying = false;

    // checks if time since last request has exceeded the maximum request time
    if (timeSinceRequestChecker){

        clearInterval(timeSinceRequestChecker);
        timeSinceRequestChecker = null;

    }

    timeSinceRequestChecker = setInterval(
        () => {
            const currentTime = utils.getUnixTimeInSeconds();
            if (currentTime - lastRequestTime > config.getDataPostTimeInterval()){

                _createDataRequest();

            }
        }, 
        1000);

}
730723
function (parent,config,modulePath,npmPath,classesSource)
	{
		this.e.log&&this.e.log('Constructing new `'+this.className+'`...','system');

		if (modulePath==undefined)
			modulePath = cwd;

		try {
			this.setParent(parent);
		} catch (e)
		{
			if (e)
				console.log(this);
		}

		this.setModulePath(path.resolve(path.resolve(parent.modulePath,modulePath))+'/');

		this.preinit.apply(this,arguments); 

		this.npmPath = npmPath || [];
		this.importClasses(classesSource);

		var defaultConfig = cwd+sourcePath+'config/'+className.split('_')[0]+'Config.json';
		if (fs.existsSync(defaultConfig))
			this.configureFromFile(defaultConfig);
		if (fs.existsSync(this.modulePath + this.configFile))
			this.configureFromFile(this.modulePath + this.configFile);
		if (config)
			this.setConfig(config);

		_debug = this.getConfig('debug')===true;

		this.importPackages();
		this.importFromConfig();

		Object.defineProperty(this,'c',{ value: this.getComponent('classBuilder').classes, enumerable:false, writable: false });
		this.c.module = self;

		this.preloadEvents();
		this.preloadComponents();

		this.setEvents({ 'ready': {} });
		var ready=this.getEvent('ready');
		ready.once(function (e) {
			self.startComponents();
			self.prepareModels();
			self.prepareScripts();

			self.init.apply(self,arguments);
			self.run.apply(self,arguments);
			_initialized=true;
		});
	}
252768
function(updateEventConfiguration) {
      var validStringConfig = _.isString(updateEventConfiguration);
      var validObjectConfig = _.isObject(updateEventConfiguration) && _.keys(updateEventConfiguration).length > 0;
      if (!validStringConfig && !validObjectConfig) {
        throw new Error('Not a valid updateEvent configuration.  Update events need to either be strings or objects with a single property: ' + JSON.stringify(updateEventConfiguration));
      }
    }
932259
function init ($container, elementSelector, eventSelectors, handler) {
      $container = $container || $(document.body)

      // Handle control clicks
      function deferred () {
        var $control = $(this)
        handler($control, getToggledContent($control))
      }

      // Prepare ARIA attributes
      var $controls = $(elementSelector)
      $controls.each(initToggledContent)

      // Handle events
      $.each(eventSelectors, function (idx, eventSelector) {
        $container.on('click.' + selectors.namespace, eventSelector, deferred)
      })

      // Any already :checked on init?
      if ($controls.is(':checked')) {
        $controls.filter(':checked').each(deferred)
      }
    }
661770
function(suppliedConfig) {
    // Handle config and defaults
    try {
      config.parseAndUpdate(suppliedConfig);
    } catch (e) {
      render.triggerError(e);
      return this
    }

    utils.logDebug(['Final config:', getConfig()]);

    try {
      return startRender();
    } catch (e) {
      render.triggerError(e);
      return this
    }
  }
866773
@Override
	public void contextInitialized(ServletContextEvent evt) {
		ServletContext sc = evt.getServletContext();

		// Initialize Jawr JS servlet
		ServletRegistration.Dynamic sr = sc.addServlet("JavascriptServlet",
				"net.jawr.web.servlet.JawrServlet");
		sr.setInitParameter("configLocation", "/jawr.properties");
		sr.addMapping("*.js");
		sr.setLoadOnStartup(0);

		// Initialize Jawr CSS servlet
		sr = sc.addServlet("CssServlet", "net.jawr.web.servlet.JawrServlet");
		sr.setInitParameter("configLocation", "/jawr.properties");
		sr.setInitParameter("type", JawrConstant.CSS_TYPE);
		sr.addMapping("*.css");
		sr.setLoadOnStartup(1);

		// Initialize Jawr Binary servlet
		sr = sc.addServlet("BinaryServlet", "net.jawr.web.servlet.JawrServlet");
		sr.setInitParameter("configLocation", "/jawr.properties");
		sr.setInitParameter("type", JawrConstant.BINARY_TYPE);
		sr.addMapping("*.jpg", "*.png", "*.gif", "*.woff", "*.ttf", "*.svg", "*.eot");
		sr.setLoadOnStartup(0);
	}
1285165
function YouTubeModal(config) {
  this.config = config;
  this.parentElement = document.querySelector(this.config.parentSelector);
  this.closeEventListener_ = this.setActive_.bind(this, false);
  this.popstateListener_ = this.onHistoryChange_.bind(this);
  this.el_ = null;
  this.closeEl_ = null;
  this.attributionEl_ = null;
  this.initDom_();
  this.lastActiveVideoId_ = null;
  this.scrollY = 0;

  this.delegatedListener_ = function(targetEl) {
    var data = 'data-' + this.config.className + '-video-id';
    var videoId = targetEl.getAttribute(data);
    var startDataAttribute = 'data-' + this.config.className + '-video-start-seconds';
    var startTime = +targetEl.getAttribute(startDataAttribute);
    var attributionAttribute = 'data-' + this.config.className + '-attribution';
    var attribution = targetEl.getAttribute(attributionAttribute);
    if (videoId) {
      this.play(videoId, true /* opt_updateState */, startTime, attribution);
    }
  }.bind(this);

  // Loads YouTube iframe API.
  events.addDelegatedListener(document, 'click', this.delegatedListener_);

  // Only add the script tag if it doesn't exist
  var scriptTag =
    document.querySelector('script[src="https://www.youtube.com/iframe_api"]');
  if (!scriptTag) {
    var tag = document.createElement('script');
    tag.setAttribute('src', 'https://www.youtube.com/iframe_api');
    this.parentElement.appendChild(tag);
  }
}
999280
private boolean initEventSource() {
        boolean success = false;
        try {
            eventSource = ServerCache.cacheUnit.createEventSource(cacheConfig.useListenerContext, cacheName);
        } catch (Exception ex) {
            com.ibm.ws.ffdc.FFDCFilter.processException(ex, "com.ibm.ws.cache.Cache.initEventSource", "3289", this);
        }
        if (eventSource != null) {
            success = true;
        }
        return success;
    }
1077679
@PostConstruct
  @Override
  public void init()
    throws ConfigException
  {
    try {
      _codeSource = new CodeSource(new URL(_path.getURL()),
                                   (Certificate []) null);
    } catch (Exception e) {
      log.log(Level.FINE, e.toString(), e);
    }
    
    super.init();

    getClassLoader().addURL(_path, _isScanned);
  }
938493
public static void init(com.typesafe.config.Config conf) {
		try {
			config = ConfigFactory.load().getConfig(PARA);

			if (conf != null) {
				config = conf.withFallback(config);
			}

			configMap = new HashMap<>();
			for (Map.Entry<String, ConfigValue> con : config.entrySet()) {
				if (con.getValue().valueType() != ConfigValueType.LIST) {
					configMap.put(con.getKey(), config.getString(con.getKey()));
				}
			}
		} catch (Exception ex) {
			logger.warn("Para configuration file 'application.(conf|json|properties)' is missing from classpath.");
			config = com.typesafe.config.ConfigFactory.empty();
		}
	}
671266
function resolveEventConfig(ringpop, traceEvent) {
    var tracerConfig = tracerConfigMap[traceEvent];
    if (!tracerConfig) {
        return null;
    }
    var sourcePath = tracerConfig.sourcePath;

    // subtle but important -- if we resolve here, then the underlying object
    // can never change. if we do latent resolution, there may be a resource
    // leak when we try to remove listener from something that is out of our
    // reachable scope.
    var emitter = getIn(ringpop, sourcePath.slice(0, -1));
    var event = _.last(sourcePath);

    return emitter && _.defaults(
        {},
        {
            sourceEmitter: emitter,
            sourceEvent: event,
            traceEvent: traceEvent
        },
        tracerConfig
    );
}
961893
function (element, options) {
    this.element  = element;
    this.options  = options;
    this.$overlay = $(options.overlayTemplate);

    if (options.source === '') {
      throw new Error('Source url was not defined. Please specify a url in your BoxRefresh source option.');
    }

    this._setUpListeners();
    this.load();
  }
1167243
function init(theConfig) {
        exports.config = theConfig;

        Inspector.on("error", _onError);
        Inspector.Inspector.on("detached", _onDetached);

        // Only listen for styleSheetAdded
        // We may get interim added/removed events when pushing incremental updates
        CSSAgent.on("styleSheetAdded.livedev", _styleSheetAdded);

        MainViewManager
            .on("currentFileChange", _onFileChanged);
        DocumentManager
            .on("documentSaved", _onDocumentSaved)
            .on("dirtyFlagChange", _onDirtyFlagChange);
        ProjectManager
            .on("beforeProjectClose beforeAppClose", close);

        // Initialize exports.status
        _setStatus(STATUS_INACTIVE);
    }
1056810
@Override
  public void init(PlayerConfig config) throws InitializationFailedException {
    super.init(config);
    esBaseUrl = config.get(ES_BASE_URL_KEY);
    indexName = config.get(ES_INDEX_NAME_KEY);
    if (esBaseUrl == null || "".equals(esBaseUrl.trim())) {
      throw new IllegalArgumentException(this.getClass().getName() + " expects configuration property "
          + ES_BASE_URL_KEY);
    }
    if (indexName == null || "".equals(indexName.trim())) {
      throw new IllegalArgumentException(this.getClass().getName() + " expects configuration property "
          + ES_INDEX_NAME_KEY);
    }
  }
749746
function(config) {

      var x, style;

      // save config
      hashedit.config = config;

      // set path
      if (config.path != null) {
        hashedit.path = config.path;
      }

      // set login
      if (config.login != null) {
        hashedit.loginUrl = config.login;
      }

      // set grid
      if (config.grid != null) {
        hashedit.grid = config.grid;
      }

      // create container
      hashedit.current.container = document.createElement('div');
      hashedit.current.container.setAttribute('class', 'hashedit-container');
      hashedit.current.container.setAttribute('id', 'hashedit-container');

      // set stylesheet
      if (config.stylesheet !== null) {
        hashedit.stylesheet = config.stylesheet;
      }

      // set url
      if (config.url !== null) {
        hashedit.url = config.url;
      }

      // append container to body
      document.body.appendChild(hashedit.current.container);

      // create style
      style = document.createElement('style');

      // append scoped stylesheet to container
      for (x = 0; x < hashedit.stylesheet.length; x++) {
        style.innerHTML += '@import url(' + hashedit.stylesheet[x] + ');';
      }

      hashedit.current.container.appendChild(style);

      // check auth
      if (config.demo === true) {

        hashedit.demo = true;

        // init hashedit
        hashedit.setActive();
        hashedit.setupView();
        hashedit.setupSortable();
        hashedit.setupBlocks();
        hashedit.setContentEditable();
        hashedit.setupContentEditableEvents();
        hashedit.setupMenu(config.path);
        hashedit.setupToast();
        hashedit.createMenu(config.path);
        hashedit.loadHTML(config.path);
        hashedit.translate();

      }
      else {

        // set default auth
        var obj = {
          credentials: 'include'
        }

        // enable token based auth
        if(hashedit.useToken) {

          // set obj headers
          obj = {
            headers: {}
          };

          obj.headers[hashedit.authHeader] = hashedit.authHeaderPrefix + ' ' + localStorage.getItem(hashedit.tokenName);
        }

        // check auth
        fetch(hashedit.authUrl, obj)
          .then(function(response) {

            if (response.status !== 200) {
              hashedit.showAuth();
            }
            else {

              // init hashedit
              hashedit.setActive();
              hashedit.setupView();
              hashedit.setupSortable();
              hashedit.setupBlocks();
              hashedit.setContentEditable();
              hashedit.setupContentEditableEvents();
              hashedit.setupMenu(config.path);
              hashedit.setupToast();
              hashedit.createMenu(config.path);
              hashedit.loadHTML(config.path);
              hashedit.translate();

              // setup loaded event
              var event = new Event('hashedit.loaded');
              document.dispatchEvent(event);

            }

          });
      }

    }
229015
function (config) {
    config = config || {};
    Appender.call(this, config);

    /**
     * Log file name, initialized from the configuration. Folders up to the
     * file must exist beforehand.
     */
    this.fileName = config.fileName;

    /**
     * Append log events to the end of the file when true, clear the file
     * before writing the first log event otherwise.
     */
    this.appendToFile = (typeof config.append !== 'undefined') ?
      !!config.append :
      true;

    /**
     * True to log strings instead of objects
     */
    this.appendStrings = (typeof config.appendStrings !== 'undefined') ?
      config.appendStrings :
      true;

    /**
     * The file stream, initialized by the "start" function
     */
    this.stream = null;
  }