configuration-files

AppSettings on a different .config file not being updated

拟墨画扇 提交于 2019-12-23 10:05:07
问题 I am trying to do the exact same thing mentioned on this recent previous question. In essence, here's the case (which is exactly my same situation): My plan is to have these (appSettings) in their own file (Settings.config), to which I will grant modify permissions to the web process user account, and store all editable settings in this file (e.g. forum title, description, etc). The problem is that the solution accepted in that question doesn't work for me because instead of saving the

Is there some common way to write and read config files?

为君一笑 提交于 2019-12-23 07:49:48
问题 I need my program to create and edit a config file, which would contain information about set of objects, and than read it at every execution. Is there some sort of guideline for config style that i can use? I'm using C++ on windows. 回答1: It largely depends on the language, platform and the scope of your config files. There's for example the properties files in Java world for configuration, and others already mentioned here such as YAML. XML is generally frowned upon for configuration, since

what would be a quick way to read a property file in python?

让人想犯罪 __ 提交于 2019-12-23 07:33:29
问题 I have a file with the format VarName=Value . . I want to read it into a hash such that H("VarName") will return the value. What would be a quick way? (read a set of strings, split all of them where the equality sign is, and then put it into a hash? I am working with python. 回答1: The oneliner answer: H = dict(line.strip().split('=') for line in open('filename.txt')) (optionally use .split() with maxsplit=1 if the values could also contain the "=" character) 回答2: Maybe ConfigParser can help

unable to save applicationHost.config file

别等时光非礼了梦想. 提交于 2019-12-23 06:49:55
问题 I could not save applicationHost.config file, it says "save failed and it is open in another programs" while I stop IIS service and closed visual studio, any idea? 回答1: If you're on a 64-bit architecture and trying to edit with a 32-bit editor (e.g. Notepad++) apparently you can't save the file. Try editing your file with the regular notepad that is shipped with Windows. To be absolutely sure, also run Notepad as an Administrator 回答2: You do not have sufficient priviledge to modify the file.

How can I use relative-paths in Flash Builder's “-load-config=…” compiler argument?

好久不见. 提交于 2019-12-23 04:43:33
问题 Not sure if this is a Windows 8/8.1 issue only, but seems like any "../" relative-paths gets stripped out of the resolved path when Flash Builder attempts to compile a project. Is there a special syntax to include relative paths? Is there one way to set it so it works both on a Mac and Windows system? 回答1: I'm not sure if this was pre-configured by another developer on our team, but seems like this Linked-Resource path is auto-generated PER projects (not created at the Workspace level), so

Again, user config files C#

放肆的年华 提交于 2019-12-23 02:58:14
问题 I have a large config file (user) that i needed to go to the right location and have some default values. Since i have a installer class, i added some parameter setting to the config file in it, but created the config files in the installers folder. What is the best way to ensure these default parameters will be written only once, and in the right location? 回答1: A standard way of using defaults in the app.config. For example, here's a default value per version I use to ensure the code copies

How to keep Netbeans from automatically copying configuration files to private folder?

瘦欲@ 提交于 2019-12-23 02:36:16
问题 In Netbeans it is possible to create specific run configurations (main class, parameters) through the "Project Properties"->"Run" settings. Such configuration files are then stored in the nbproject/configs folder. Now, whenever I open and save the project properties, this configuration is "copied" to nbproject/private/configs. Can I keep Netbeans from creating these private configuration files? The problem is that the files are not copied exactly. If my original config looks like: main.class=

Add entry to dictionary in child object

允我心安 提交于 2019-12-23 01:47:34
问题 How is it possible to add entry to dictionary, defined in parent object, from the child object? * UPDATED I edit my config as follows: <object id="ParentType" singleton="false" type="SomeType"> <property name="FieldNameMap"> <dictionary key-type="string" value-type="string" > <entry key="Title" value="TitleName"/> </dictionary> </property> </object> <object id="ChildType" singleton="false" type="SomeType" parent="ParentType"> <property name="FieldNameMap"> <dictionary merge="true"> <!-- this

Updating config file and updating the values in application

假如想象 提交于 2019-12-22 08:34:22
问题 I am currently updating a few settings in a rather large *.exe.config file via the *.exe executable by using XLinq to navigate the directories and read / write the values. The problem with updating this way is that changes only take effect after restarting the executable, but I would like the changes to take effect instantaneously. Is there a way to tell the executable to reload the *.exe.config file after I make the changes? All help is appreciated and thanks in advance! Exoskeleton for app

Edit configuration file through python

馋奶兔 提交于 2019-12-22 04:42:57
问题 I need to edit a configuration file through python and i tried searching on stackoverflow and google and they don't cover my situation, since i need to replace lines in the file and perform matches in my search. Also, what i found covers how to do it for one line, i will be performing at least 8 line replacements in the file and I would like to know if there is a cleaner and more elegant way of doing this than putting 10 replace(foo, bar) lines altogether. I need to "match" lines like