Files that configure the initial settings for some computer programs.
Questions tagged [configuration-files]
2246 questions
59
votes
6 answers
Pros and cons for different configuration formats?
I've seen people using *.cfg (Python Buildout), *.xml (Gnome), *.json (Chrome extension), *.yaml (Google App Engine), *.ini and even *.py for app configuration files (like Django).
My question is: why there are so many different configuration file…

Somebody still uses you MS-DOS
- 13,029
- 20
- 64
- 103
57
votes
8 answers
Modify config file using bash script
I'm writing a bash script to modify a config file which contains a bunch of key/value pairs. How can I read the key and find the value and possibly modify it?

Progress Programmer
- 7,076
- 14
- 49
- 54
55
votes
13 answers
Registry vs. INI file for storing user configurable application settings
I'm a new Windows programmer and I'm not sure where I should store user configurable application settings. I understand the need to provide a user friendly means for the user to change application settings, like an Edit | Settings form or similar. …

Kurt W. Leucht
- 4,725
- 8
- 33
- 45
55
votes
3 answers
Does spring boot support using both properties and yml files at the same time?
I have a spring boot application and I want to use both a yml file for my application properties and also a plain application-${profile}.properties file set to configure my application.
So my question is can this be done and if so, how do you…

Scott C.
- 3,672
- 4
- 18
- 20
54
votes
3 answers
Could string comparisons really differ based on culture when the string is guaranteed not to change?
I'm reading encrypted credentials/connection strings from a config file. Resharper tells me, "String.IndexOf(string) is culture-specific here" on this line:
if (line.Contains("host=")) {
_host = line.Substring(line.IndexOf(
"host=") +…

B. Clay Shannon-B. Crow Raven
- 8,547
- 144
- 472
- 862
53
votes
3 answers
IntelliJ - Import configuration from old version after first run
I recently installed version 2017.2 of IntelliJ IDEA. I would like to keep my settings from my old 2017.1 version. IntelliJ's support site shows the following dialog box that is supposed to show up when you run the newly installed version for the…

Andrew Mairose
- 10,615
- 12
- 60
- 102
53
votes
8 answers
Mercurial: How to ignore changes to a tracked file
I have a file with database settings in my project which I have set to some defaults. The file is tracked by Mercurial and checked in. Since this file will be edited with different values various developer machines, is there a way I can tell…

Svish
- 152,914
- 173
- 462
- 620
53
votes
3 answers
How to read a configuration file in Java
I am doing a project to build thread pooled web server, in which I have to set
the port number on which server listens.
How many threads are there in thread pool
Absolute Path of the root directory, and so many points.
One way is to hard code all…

devsda
- 4,112
- 9
- 50
- 87
50
votes
11 answers
How to programmatically modify WCF app.config endpoint address setting?
I'd like to programmatically modify my app.config file to set which service file endpoint should be used. What is the best way to do this at runtime? For reference:

alchemical
- 13,559
- 23
- 83
- 110
49
votes
5 answers
How can I make shift+spacebar page up in Vim?
I have an entry in my .vimrc which makes it page down the viewport when I hit the spacebar. It looks like this:
map
I want to create another key mapping which pages the viewport up when holding shift and hitting the spacebar. I…

jerodsanto
- 9,726
- 8
- 29
- 23
48
votes
2 answers
Correct implementation of a custom config section with nested collections?
In a web application, I want to be able to define some mapping using a config section like this:

Steve B
- 36,818
- 21
- 101
- 174
48
votes
4 answers
Android configuration file
What is the best way and how do I set up a configuration file for a application?
I want the application to be able to look into a text file on the SD card and pick out certain information that it requires.

Beginner
- 28,539
- 63
- 155
- 235
45
votes
4 answers
Equivalents of XDG_CONFIG_HOME and XDG_DATA_HOME on Mac OS X?
I am planning to develop a cross-platform script. On Linux and other operating systems, it will store configuration in XDG_CONFIG_HOME and data files (specifically, downloaded plugins) in XDG_DATA_HOME. On Windows, it will use APPDATA for both…

LeafStorm
- 3,057
- 4
- 24
- 28
45
votes
9 answers
How to set authorization in mongodb config file?
I run mongod.exe in server with this option in cmd.exe:
mongod.exe --dbpath=path --auth
And now, how can I do this in a config file?
my mongod.cfg:
dbpath=D:\Program Files\MongoDB 2.6 Standard\data
security=
authorization= enabled
I get this…

mlibre
- 2,460
- 3
- 23
- 32
44
votes
8 answers
How can I store a binary file in a Kubernetes ConfigMap?
Can one store a binary file in a Kubernetes ConfigMap and then later read the same content from a volume that mounts this ConfigMap? For example, if directory /etc/mycompany/myapp/config contains binary file keystore.jks, will
kubectl create…

Derek Mahar
- 27,608
- 43
- 124
- 174