configuration-files

Adding a body to a HttpWebRequest that is being used with the azure service mgmt api

随声附和 提交于 2019-12-22 03:15:29
问题 How would i go about adding to the body of a HttpWebRequest? The body needs to be made up of the following <?xml version="1.0" encoding="utf-8"?> <ChangeConfiguration xmlns="http://schemas.microsoft.com/windowsazure"> <Configuration>base-64-encoded-configuration-file</Configuration> <TreatWarningsAsError>true|false</TreatWarningsAsError> <Mode>Auto|Manual</Mode> </ChangeConfiguration> Any help is much appreciated 回答1: byte[] buf = Encoding.UTF8.GetBytes(xml); request.Method = "POST"; request

How to parse config file with erlang?

♀尐吖头ヾ 提交于 2019-12-22 02:22:05
问题 i am developing one program with erlang, which need to read config file when starting, then load the config data to database. originally, using Ruby or C i can load YAML file or conf file. I want to know, in erlang's world, is there any good way to load config file? thanks! This is the YAML-Style file I need to load, and i do not care the style of the config file a: a1: a2: 1 a3: 2 b: b1: b2: 3 b3: 4 回答1: If you store the config data as Erlang terms you can use the built-in file:consult/1

MAMP MySQL not recognizing my.cnf values in OSX

人走茶凉 提交于 2019-12-21 20:20:53
问题 Trying to go UTF8 permanently and can't get MAMP's install of MySQL to recognize my.cnf values. MAMP Version 2.0.5 (2.0.5) MySQL 5.5.9 my.cnf file: [client] default-character-set=utf8 [mysql] default-character-set=utf8 [mysqld] default-character-set=utf8 default-collation=utf8_general_ci collation_server=utf8_general_ci character_set_server=utf8 init-connect='SET NAMES utf8' Location of file: /Applications/MAMP/Library/Conf/ MySQL varibles on startup: mysql> show variables where variable_name

MAMP MySQL not recognizing my.cnf values in OSX

霸气de小男生 提交于 2019-12-21 20:20:05
问题 Trying to go UTF8 permanently and can't get MAMP's install of MySQL to recognize my.cnf values. MAMP Version 2.0.5 (2.0.5) MySQL 5.5.9 my.cnf file: [client] default-character-set=utf8 [mysql] default-character-set=utf8 [mysqld] default-character-set=utf8 default-collation=utf8_general_ci collation_server=utf8_general_ci character_set_server=utf8 init-connect='SET NAMES utf8' Location of file: /Applications/MAMP/Library/Conf/ MySQL varibles on startup: mysql> show variables where variable_name

Export with alphabetical sort in Python ConfigParser

你离开我真会死。 提交于 2019-12-21 12:30:13
问题 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 回答1: 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

How to use partial config files

混江龙づ霸主 提交于 2019-12-21 12:04:16
问题 I am involved in a project where development and testing is going on in different locations. There are a few entries in the app.config that are "local" to the different locations (hence, "config"). Therefore, everyone tends to keep his own app.config, which always makes it difficult for a new setting to be introduced. I'm looking for an idea, something like partial classes, where the bulk of an app.config can be in one place, and a few items in another, and yet all wind up in the proper exe

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

丶灬走出姿态 提交于 2019-12-21 03:33:32
问题 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"

Playframework settings depending on environment

泪湿孤枕 提交于 2019-12-20 10:42:36
问题 I'm using playframework 2.1-RC2. First of all I've seen all the similar questions, so I followed the common instruction of separating application.conf file per environment. So I have application.test.conf and I run tests this way: play -Dconfig.file=./conf/application.test.conf "test" I tried different combinations, like play -Dconfig.file=./conf/application.test.conf ~test or play -Dconfig.file=conf/application.test.conf ~test Still no luck, it just does not get picked, default one

How to get Grails application name within Config.groovy?

眉间皱痕 提交于 2019-12-20 10:39:40
问题 I want to include the Grails application name in some of my configuration settings in grails-app/Config.groovy . I've tried many ways without success. For example, if I have the following in my Config.groovy , edu.appname1 = "${grailsApplication.metadata.'app.name'}" edu.appname2 = "${application.metadata.'app.name'}" edu.appname3 = "${metadata.'app.name'}" edu.appname4 = "${app.name}" I can run these statements in the Grails console def edu = grailsApplication.config.edu println "${'''$

Finding out the name of the original repository you cloned from in Git

夙愿已清 提交于 2019-12-20 08:06:09
问题 When you do your first clone using the syntax git clone username@server:gitRepo.git Is it possible using your local repository to find the name of that initial clone? (So in the above example, find gitRepo.git .) 回答1: In the repository root, the .git/config file holds all information about remote repositories and branches. In your example, you should look for something like: [remote "origin"] fetch = +refs/heads/*:refs/remotes/origin/* url = server:gitRepo.git Also, the Git command git remote