configuration-files

At what point does a config file become a programming language?

≯℡__Kan透↙ 提交于 2019-12-04 07:21:10
问题 I have been mulling over config files and their relationship to code for a while now and depending on the day and direction of the wind my opinions seem to change. More and more though I keep coming back to the realization I first had while learning Lisp: there is little difference between data and code. This seems doubly true for config files. When looked at in the right light a Perl script is little more than a config file for perl. This tends to have fairly heavy consequences for tasks

Managing web.config files

☆樱花仙子☆ 提交于 2019-12-04 06:46:29
I have 3 environments: Dev, QA, Prod on .NET 4. Each has a unique web.config file. We have been having problems managing all three versions. Its easy to overlook something critical when manually merging web.config files in TFS. More than once we have ended up with a connection string pointing to QA on Prod. So, I read up on web.config transformations. These appear to require MSBUILD. We have no build server so I'm not sure how I can attempt to use this solution. Is there a way to make transformations work with a normal web publish? Do you have any alternative suggestions for managing 3 web

Using config files written in Python [closed]

落花浮王杯 提交于 2019-12-04 06:41:07
Closed . This question is opinion-based. It is not currently accepting answers. Learn more . Want to improve this question? Update the question so it can be answered with facts and citations by editing this post . Closed 5 years ago . I've noticed a few Python packages that use config files written in Python. Apart from the obvious privilege escalation, what are the pros and cons of this approach? Is there much of a precedence for this? Are there any guides as to the best way to implement this? Just to clarify: In my particular use case, this will only be used by programmers or people who know

Ultra-portable, small complex config file library in ANSI C?

落花浮王杯 提交于 2019-12-04 05:46:00
I'm looking for a very portable, minimalistic/small XML/configuration language library in ANSI C with no external dependencies (or very few), compiling down to less than 100K. I need it for a moderately complex configuration file, and it must support Unicode. Some more requirements: OK to use/embed/statically link into proprietary code . Credit will always will be given where credit is due. Not necessarily XML. Really, clean code /no weird or inconsistent string handling. UTF-8 . Thank you fellas. karlphillip This is somehow similar to this question: Is there a good tiny XML parser for an

Export with alphabetical sort in Python ConfigParser

微笑、不失礼 提交于 2019-12-04 05:22:29
Is there any solution to force the RawConfigParser.write() method to export the config file with an alphabetical sort? Even if the original/loaded config file is sorted, the module mixes the section and the options into the sections arbitrarily, and is really annoying to edit manually a huge unsorted config file. PD: I'm using python 2.6 Three solutions: Pass in a dict type (second argument to the constructor) which returns the keys in your preferred sort order. Extend the class and overload write() (just copy this method from the original source and modify it). Copy the file ConfigParser.py

Implementing custom configuration section handler

泄露秘密 提交于 2019-12-04 05:19:21
问题 gleanings from a variety of sources (including stackOverlflow), however when I come to use it, I get the following error message "The Configuration property 'deviceconfig' may not be derived from ConfigurationSection." I have been struggling with this for the better part of a day now, and am no nearer a solution, so any help in the matter would be greatly appreciated. I am a newbie in implementing custom config sections so please treat me gently :-) The app.config file looks like this: <?xml

How to change configs in Spring.Net

谁都会走 提交于 2019-12-04 04:34:01
问题 An advantage of an IoC container is that you can swap in a mock service at the bottom of your object graph. However this seems much harder to do in Spring.Net than in other IoC Containers. Here's some code that does it in Unity and has Spring.Net code; namespace IocSpringDemo { using Microsoft.Practices.Unity; using NUnit.Framework; using Spring.Context; using Spring.Context.Support; public interface ISomeService { string DoSomething(); } public class ServiceImplementationA : ISomeService {

What generates the In/Out CellLabels in Mathematica and how can I add automatic Timing to them?

♀尐吖头ヾ 提交于 2019-12-04 04:22:41
When Mathematica evaluates a cell, it gives the Input cell and Output cell the CellLabel s In[$Line]:= and Out[$Line]= where $Line is a counter that gets incremented on each evaluated input. If you input something like TraditionalForm[expr] or TeXForm[expr] (or any other *Form from $OutputForms ) then the name of the form also gets added to the Output cell's label. eg Out[1]//TraditionalForm= . I can't find any way of customising these labels. They can be disabled in the Preferences dialog. They don't seem to be in the StyleSheet options for Input and Output cells - although the options

Getting a list from a config file with ConfigParser

試著忘記壹切 提交于 2019-12-04 03:48:09
I have something like this in my config file (a config option that contains a list of strings): [filters] filtersToCheck = ['foo', '192.168.1.2', 'barbaz'] Is there a more elegant (built-in) way to get a list from filtersToCheck instead of removing the brackets, single-quotes, spaces and then using split() to do that? Maybe a different module? (Using python3.) You cannot use the python object like a list in the value for the config file. But you can ofcourse have them as comma separated values and once you get it do a split [filters] filtersToCheck = foo,192.168.1.2,barbaz and do

Celery: ignoring BROKER_URL in config file

一世执手 提交于 2019-12-04 03:07:04
问题 My question is a duplicate of this one, but more detailed. The problem is that I have a BROKER_URL set in my Celery config file, but that isn't reflected in and I am loading the config: I checked, and it is being loaded - in fact, other constants defined there are being set, just not BROKER_URL . This appears to be a bug, but I wanted to be sure. celeryconfig.py : BROKER_URL = "amqp://user:password@remote.server.com:5672//vhost" CELERY_TASK_SERIALIZER = 'json' CELERY_RESULT_SERIALIZER = 'json