configuration-files

Add .mf & .xml files in META-INF directory inside a Maven built EAR

依然范特西╮ 提交于 2019-12-13 13:33:26
问题 I have arbitrary .xml & .mf files that i have to add in the META-INF folder inside the ear itself. Build is done using maven2.2.1. Simply adding those files under ${basedir}/src/main/application/META-INF/ works fine, but it doesn't fit my needs. Is there another way to do such thing? I tried: <build> <resources> <resource> <directory>G:/WS/vermeg/ear2/XML's</directory> <targetPath>META-INF</targetPath> </resource> </resources> </build> but this doesn't add my xml files under the EAR itself. I

Log4J2 Log Level precedence

痴心易碎 提交于 2019-12-13 08:07:10
问题 I have the log4j2.xml which is partially configured as: <Loggers> <Root level="debug" includeLocation="true"> <AppenderRef ref="FileInfo" level="info" /> <AppenderRef ref="FileDebug" level="debug" /> </Root> <Logger name="com.mycompany.domain.XYZ" level="TRACE" /> <Logger name="com.mycompany.domain.ABC" level="TRACE" /> </Loggers> However, the TRACE messages doesn't come in either of the File appenders (FileInfo/FileDebug). When I change the FileDebug log level = "TRACE", then TRACE messages

Add hardcoded configuration without app.config file to some assembly

主宰稳场 提交于 2019-12-13 02:23:10
问题 I need to add configuration information to the assembly itself without including its app.config file with it. How can i do it? EDIT: I need something like this string config = @"<?xml version='1.0' encoding='utf-8'?> <configuration> . . . . </configuration>"; Set this hardcoded string configuration as current assembly configuration 回答1: Configuration settings be it user or application settings have their default values "hardcoded" in the assembly by default. They can be overriden by including

Parsing a config file in php to variables

淺唱寂寞╮ 提交于 2019-12-12 19:16:38
问题 -- Background -- So I am working on a installer script for local dev machines and its for installing word press, What I am trying to do is have it so that the user would select a specific plug in from a drop down box and then from there select which version they want to install. -- Issue -- So I need to be able to parse the .cfg file and store all the values into variables dynamically so that way if we add more plugins it won't break. How do I go about doing this? 回答1: Couple of ways,

Config for WCF MSMQ in workgroup mode

允我心安 提交于 2019-12-12 17:15:51
问题 In trying to deploy a service I have found that it won't start because MSMQ is in workgroup mode. I have created a private queue instead and changed the config files to refer to it, but the WCF service host refuses to start with this message: Binding validation failed because the binding's MsmqAuthenticationMode property is set to WindowsDomain but MSMQ is installed with Active Directory integration disabled. Can anyone tell me how to specify workgroup mode in the config file? The information

Automatically read configuration values in Python

故事扮演 提交于 2019-12-12 14:57:01
问题 I would like to read a configuration file in Python completely into a data structure without explicitly 'getting' each value. The reason for doing so is that I intend to modify these values programatically (for instance, I'll have a variable that says I want to modify [Foo] Bar = 1 to be [Foo] Bar = 2 ), with the intention of writing a new configuration file based on my changes. At present, I'm reading all the values by hand: parser = SafeConfigParser() parser.read(cfgFile) foo_bar1 = int

Python configuration file generator

落爺英雄遲暮 提交于 2019-12-12 14:32:28
问题 I want to use Python to make a configuration file generator. My roughly idea is feeding input with template files and some XML files with the real settings. Then use the program to generate the real configuration files. Example: [template file] server_IP = %serverip% server_name = %servername% [XML file] <serverinfo> <server ip="x.x.x.x" name="host1" /> <server ip="x.x.x.x" name="host2" /> </serverinfo> and then get output configuration file like this [server.ini] [server1] server_IP = x.x.x

Hadoop Configuration Property Returns Null

烈酒焚心 提交于 2019-12-12 09:27:25
问题 I wrote a simple code to test how to set configuration in Hadoop. public static void main(String[] args) { Configuration conf = new Configuration(); conf.addResource("~/conf.xml"); System.out.println(conf); System.out.println(conf.get("color")); } The output of above program is: Configuration: core-default.xml, core-site.xml, ~/conf.xml null Thus conf.get("color") returns null . However, I have explicitly set that property in conf.xml as follows: <property> <name>color</name> <value>yellow<

Is it possible to get a value from view.yml in an action

老子叫甜甜 提交于 2019-12-12 08:59:27
问题 I'm wondering if it's possible to get the name of a stylesheet from view.yml in an action, ideally using something as simple as: sfConfig::get('......'); I'd like to access the existing declaration in view.yml instead of hardcoding it or duplicating it somewhere like app.yml. Thanks. 回答1: If you want to access the current Module's Config, you can use: sfViewConfigHandler::getConfiguration(array(dirname(__DIR__) . '/config/view.yml')); It should return something like this: Array (

Save Configuration Settings to XML file in QT?

有些话、适合烂在心里 提交于 2019-12-12 08:47:13
问题 I want to Save Configuration Settings to XML file in QT and read it from there ? What is best approach to do this in QT ? Any sample/ideas are highly appreciated. Thanks. 回答1: You can register your XML file format with QSettings::registerFormat Here's a sample implementation of the readXmlFile and writeXmlFile 回答2: There is Qt examples for XML. Also you can use QSettings to store your settings. 回答3: Here is my code for exporting settings to XML. What you need is to call ExportSettingsToXml()