End building the prepared script
@param config the configuration for the script to build
@return the new {@link LuaPreparedScript} instance
341456
public LuaPreparedScript endPreparedScript(LuaScriptConfig config) {
        if (!endsWithReturnStatement()) {
            add(new LuaAstReturnStatement());
        }
        String scriptText = buildScriptText();
        ArrayList<LuaKeyArgument> keyList = new ArrayList<>(keyArg2AstArg.keySet());
        ArrayList<LuaValueArgument> argvList = new ArrayList<>(valueArg2AstArg.keySet());
        if (config.isThreadSafe()) {
            return new ThreadSafeLuaPreparedScript(scriptText, keyList, argvList, config);
        } else {
            return new BasicLuaPreparedScript(scriptText, keyList, argvList, config);
        }
    }
9512
public Module getPlumbingModules(final Config config)
    {
        return new Module() {
            @Override
            public void configure(final Binder binder) {
                binder.install(new ConfigModule(config));
                binder.install(getLifecycleModule());

                binder.install(new JmxModule());
                binder.install(new JmxStarterModule(config));
                binder.install(new JmxLoggingModule(getServerType()));

                binder.install(new JvmPauseAlarmModule());
            }
        };
    }
302575
public static Javalin createStandalone(Consumer<JavalinConfig> config) {
        Javalin app = new Javalin(null, null);
        JavalinConfig.applyUserConfig(app, app.config, config); // mutates app.config and app (adds http-handlers)
        return app;
    }
104962
static public function createObject($type, array $config = [])
	{
		if (is_string($type)) {
			return static::container()->get($type, $config);
		} elseif (is_array($type) && isset($type['class'])) {
			$class = $type['class'];
			unset($type['class']);
			if ($config) $type = array_merge($type, $config); 
			return static::container()->get($class, $type);
		} elseif (is_callable($type, false)) {
			return call_user_func($type, $config);
		} elseif (is_object($type)) {
			return $type;
		} elseif (is_array($type)) {
			throw new InvalidConfigException('object configuration must be an array containing a "class" element.');
		} else {
			throw new InvalidConfigException("Unsupported configuration type: " . gettype($type));
		}
	}
1046751
public void load(FileConfiguration config) {
        this.config = config;
        
        try {
            parse();
        } catch (Exception e) {
            logger.error(e.getMessage(), e);
        }
    }
219779
function (config) {
    config = config || {};
    Appender.call(this, config);

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

    /**
     * Socket server connection point
     */
    this.url = config.url || 'http://localhost';

    /**
     * Socket handle when connection is established
     */
    this.socket = null;
  }
737821
public ChorusInterpreter buildAndConfigure(ConfigProperties config, SubsystemManager subsystemManager) {
        ChorusInterpreter chorusInterpreter = new ChorusInterpreter(listenerSupport);
        chorusInterpreter.setHandlerClassBasePackages(config.getValues(ChorusConfigProperty.HANDLER_PACKAGES));
        chorusInterpreter.setScenarioTimeoutMillis(Integer.valueOf(config.getValue(ChorusConfigProperty.SCENARIO_TIMEOUT)) * 1000);
        chorusInterpreter.setDryRun(config.isTrue(ChorusConfigProperty.DRY_RUN));
        chorusInterpreter.setSubsystemManager(subsystemManager);

        StepCatalogue stepCatalogue = createStepCatalogue(config);
        chorusInterpreter.setStepCatalogue(stepCatalogue);
        return chorusInterpreter;
    }
225933
public static TemplateEngine create(TemplateConfig config) {
		final TemplateEngine engine = doCreate(config);
		StaticLog.debug("Use [{}] Engine As Default.", StrUtil.removeSuffix(engine.getClass().getSimpleName(), "Engine"));
		return engine;
	}
823939
public static function create(Config $config)
    {
        if (php_sapi_name() === 'cli' || !(self::$instance instanceof self)) {
            self::$instance = new self($config);
        }

        return self::$instance;
    }
272897
public Config build() throws ConfigException {
		if (properties != null) {
			Config config = new Config("properties");
			config.setProperties(properties);
			return config;
		}

		try {
			Loader loader = new Loader();

			SAXParserFactory factory = SAXParserFactory.newInstance();
			SAXParser parser = factory.newSAXParser();
			XMLReader reader = parser.getXMLReader();
			reader.setContentHandler(loader);
			reader.parse(new InputSource(xmlStream));

			return loader.getConfig();
		} catch (Exception e) {
			throw new ConfigException(e);
		}
	}
1254081
async function compileConfig(config) {

  const linter = new Linter({
    resolver: new NodeResolver()
  });

  const resolvedRules = await linter.resolveConfiguredRules(config);

  // only process and serialize enabled rules
  const enabledRules = Object.keys(resolvedRules).reduce(function(enabledRules, key) {
    const value = resolvedRules[key];

    const { category } = linter.parseRuleValue(value);

    if (category !== 'off') {
      enabledRules[key] = value;
    }

    return enabledRules;
  }, {});

  const serializedRules = JSON.stringify(enabledRules, null, '  ');

  const preambleCode = `
var cache = {};

/**
 * A resolver that caches rules and configuration as part of the bundle,
 * making them accessible in the browser.
 *
 * @param {Object} cache
 */
function Resolver() {}

Resolver.prototype.resolveRule = function(pkg, ruleName) {

  const rule = cache[pkg + '/' + ruleName];

  if (!rule) {
    throw new Error('cannot resolve rule <' + pkg + '/' + ruleName + '>');
  }

  return rule;
};

Resolver.prototype.resolveConfig = function(pkg, configName) {
  throw new Error(
    'cannot resolve config <' + configName + '> in <' + pkg +'>'
  );
};

var resolver = new Resolver();

var rules = ${serializedRules};

var config = {
  rules: rules
};

var bundle = {
  resolver: resolver,
  config: config
};

export { resolver, config };

export default bundle;
`;

  const importCode = Object.keys(enabledRules).map((key, idx) => {

    const {
      pkg, ruleName
    } = linter.parseRuleName(key);

    return `
import rule_${idx} from '${pkg}/rules/${ruleName}';
cache['${pkg}/${ruleName}'] = rule_${idx};`;
  }).join('\n');

  return `${preambleCode}\n\n${importCode}`;
}
1121147
function _createScript(config, options, scope={}) {
  if (!isString(config.content)) return config.content;
  const stringScript = wrap(config.content.replace(/^\#\!.*/, ''), scope);
  try {
    return new vm.Script(stringScript, options);
  } catch(error) { // These are not squashed as not evaluation errors but something else.
    if (_runError(error, module)) throw error;
  }
}
1231662
MapWithProtoValuesFluentAssertion<M> usingConfig(FluentEqualityConfig newConfig) {
    Subject.Factory<MapWithMessageValuesSubject<K, M>, Map<K, M>> factory =
        mapWithProtoValues(newConfig);
    MapWithMessageValuesSubject<K, M> newSubject = check().about(factory).that(actual());
    if (internalCustomName() != null) {
      newSubject = newSubject.named(internalCustomName());
    }
    return new MapWithProtoValuesFluentAssertionImpl<>(newSubject);
  }
400525
public static IDataSource create(JsonObject config) throws DataSourceCreationException {
        String title = config.getAsJsonPrimitive("title").getAsString();
        String description = config.getAsJsonPrimitive("description").getAsString();
        String typeName = config.getAsJsonPrimitive("type").getAsString();
        
        JsonObject settings = config.getAsJsonObject("settings");

        final IDataSourceType type = DataSourceTypesRegistry.getType(typeName);
        if ( type == null )
            throw new UnknownDataSourceTypeException(typeName);

        return type.createDataSource( title, description, settings );
    }
604996
function(suppliedConfig) {
    suppliedConfig.sdk = prepareSdkConfig(suppliedConfig)
    return $.extend(true, {}, defaultConfig.primary, suppliedConfig);
  }
405690
function (config) {
      // Extend our config to out instance:
      if (config) {
        Thulium.Util.extend(this, config);
      }

      // Check for template value.
      if (!this.template) {
        console.warn('Warning, no template passed.');
      }

      this._initRegex();

      // return instance.
      return this;
    }
1244654
@Override
    public Screen createScreen(Config config)
    {
        Check.notNull(config);

        final Screen screen;
        if (config.isWindowed())
        {
            screen = new ScreenWindowedAwt(config);
        }
        else
        {
            screen = new ScreenFullAwt(config);
        }
        return screen;
    }