configuration-files

Config files vs database tables

喜欢而已 提交于 2019-12-04 03:06:08
The scenario I am particularly interested is multiple servers having daemons that run on certain configuration parameters. (since, this is a learning exercise. i welcome any thought beyond this particular case) The question is, where should the configuration parameters sit. A. a central database table B. a config file pushed to each of the boxes These are the most common I've come across. The notable others being, in code constants (needs recompile to deploy. so bad option unless they really are constants), config file mounted on a shared location. Just wanted to know from the community on how

Why there's no configuration file at all for dependency injection with Google Guice?

落花浮王杯 提交于 2019-12-04 02:14:05
I am checking out Google Guice as DI framework but I am a bit puzzled: why there's no configuration file at all? I found a partial explanation on this question but it is still not clear how I would be able to set my component roles (or any other thing I need to use a switch) without a config file. Any help appreciated! The configuration is in the code instead of config files, which is a valid decision for many scenarios. Yes, it means that you have to rebuild (possibly just the modules) if you want to release a different way of plumbing your application - although of course you could still get

What order of reading configuration values?

一曲冷凌霜 提交于 2019-12-03 23:48:26
For the python program I am writing I would like to give the opportunity of configuring it in three different ways. Environment variables, configuration files and command line arguments. Logically I think command line arguments should always have the highest priority. I am a bit doubting whether environment variables should have precedence over configuration files? And will it matter whether configuration files are system wide, user specific or given as argument on the command line? (Note that my platform is Unix/Linux) The standard that I know is first look for a command line parameter, if

How do I open a file with the default text editor?

倾然丶 夕夏残阳落幕 提交于 2019-12-03 22:06:26
问题 I want to open a *.conf file. I want to open this file with the standard Windows editor (e.g., notepad.exe). I currently have this ShellExecute code: var sPath, conf: String; begin try sPath := GetCurrentDir + '\conf\'; conf := 'nginx.conf'; ShellExecute(Application.Handle, 'open', PChar(conf), '', Pchar(sPath+conf), SW_SHOW); except ShowMessage('Invalid config path.'); end; end; But nothing happens. So what should I change? 回答1: The main problem is that you use nginx.conf as the file name.

C/C++ Unix configuration file library [closed]

限于喜欢 提交于 2019-12-03 21:18:36
Closed. This question is off-topic. It is not currently accepting answers. Learn more . Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed last year . Where can I find a C or C++ library for reading and manipulating Unix configuration files ( format: name=value\n )? Hubert Kario For plain C, libconfuse is quite good I will advice you to use boost::property_tree library for C++. It has quiet detailed manual. Further I'll advice you to use "info" config file. Example of config file: ; this is just comment line firstParamSection { stringParam "string"

PHP mail() on Windows: no errors, the email isn't sent

浪尽此生 提交于 2019-12-03 15:58:48
I'm currently trying to debug an Elgg-based website (I didn't develop it) and I would like to send the emails directly from local development machine (WinXP). I'm running WAMP with Apache 2.2.11 and PHP 5.3.0 After some searching, the simplest solution that I've come across is using fake sendmail to forward it to my GMail/Google apps account via SMTP and let it do the sending. The problem is that I get no errors whatsoever, but the email isn't being sent. Here's what I did: Copied the sendmail.exe and sendmail.ini to a subfolder in WAMP Configured it via sendmail.ini (the configuration

Simple linux command line command to modify an option in a INI like config file

↘锁芯ラ 提交于 2019-12-03 15:01:16
I am looking for a generic command line solution that would allow me to add or modify a configuration option inside a config file (ini like format). Most linux configuration files use a INI like format, with # and ; as comment and with option=value. Mainly I am looking for something that would take filename, option and value, and that will change the config to match this. I want to use this to write some auto-deployment scripts. I have no problem on using tools that are not installed by default on Debian or Ubuntu as long they do exist in the default distribution repositories (as I can do an

Bash Parse Arrays From Config File

喜夏-厌秋 提交于 2019-12-03 14:35:47
问题 I need to have an array for each "section" in the file containing: [array0] value1=asdf value2=jkl [array1] value1=1234 value2=5678 I want to be able to retrieve these values like this: echo ${array0[value1]} echo ${array0[value2]} echo ${array1[value1]} echo ${array1[value2]} Any thoughts on how to accomplish this? (Explanations would be a bonus) I've already read these anwsers but none do exactly what I want to do. Read a config file in BASH without using "source" BASH Parsing variables

In the Pyramid web framework, how do I source sensitive settings into development.ini / production.ini from an external file?

北城以北 提交于 2019-12-03 11:44:56
问题 I'd like to keep development.ini and production.ini under version control, but for security reason would not want the sqlalchemy.url connection string to be stored, as this would contain the username and password used for the database connection. What's the canonical way, in Pyramid, of sourcing this setting from an additional external file? Edit In addition to solution using the environment variable, I came up with this solution after asking around on #pyramid: def main(global_config, *

When setting up a WCF client and server, how synchronized does the config files must be?

若如初见. 提交于 2019-12-03 11:44:37
Most of the WCF examples out there show you how to configure WCF client and server. Now, what happens if you differ the configuration slightly between them? I mean, who has the final word? Let's take this client configuration for example: <configuration> <system.serviceModel> <bindings> <wsHttpBinding> <binding name="WSHttpBinding_ISampleService" closeTimeout="00:01:00" openTimeout="00:01:00" receiveTimeout="00:01:00" sendTimeout="00:01:00" bypassProxyOnLocal="false" transactionFlow="false" hostNameComparisonMode="StrongWildcard" maxBufferPoolSize="524288" maxReceivedMessageSize="65536"