configuration-files

How to Create a configuration File For MongoDB

淺唱寂寞╮ 提交于 2019-11-27 00:35:33
问题 I have installed mongodb for mac os through 10gen and I have gone through the documentation to do so. Everything seems fine apart from the configuration file. I can not see it in /etc/mongod.config. Do I have to manually create this config file? And if so how can I go about it? cheers 回答1: Unless you have installed a packaged version of MongoDB (for example, using Homebrew or Mac Ports) you will have to create a config file manually, or just pass the appropriate command line parameters when

create your own settings in xml

拈花ヽ惹草 提交于 2019-11-26 23:17:40
问题 I'm in a ASP.NET project where I need to give several parameters to the administrator that is going to install the website, like: AllowUserToChangePanelLayout AllowUserToDeleteCompany etc... My question is, will be a good thing to add this into the web.config file, using my own configSession or add as a profile varibles? or should I create a XML file for this? What do you do and what are the cons and favs? I originally thought about web.config but I then realized that I should mess up with

2 php.ini files

孤人 提交于 2019-11-26 22:24:26
I have found that: When I type the following on terminal: php -i | grep php.ini I get the output: The Loaded Configuration file is @ /etc/php5/cli/php.ini However, from phpinfo() , I get to see: The loaded ini file is @ /etc/php5/apache2/php.ini Which one of these is working right now? How is it possible to have two php.ini files ? Tatu Ulmanen Depends on where you are running PHP from. If you run it from command line, it uses the cli/php.ini and apache2/php.ini when run through apache. You are executing phpinfo() through the browser, hence you get /etc/php5/apache2/php.ini as the answer.

How to manage configuration files when collaborating?

心不动则不痛 提交于 2019-11-26 21:55:17
I'm writing a short script with a few simple variables at the top of the page. I want to work on them with a friend, but we aren't sure how to manage the variables needing to be changed after pulling each time for one of us, adding unnecessary junk to git status. I thought about just creating different named branches for each of us, and then the master will just have example usernames set, but it seems silly to have to do all that extra work merging. We could have the variables passed to the script as options, but that isn't desired, nor is separating it out to another separate configuration

Storing connection strings in machine.config vs storing them in web.config

天涯浪子 提交于 2019-11-26 21:37:18
问题 For a dedicated server, is it better to store the connection string in web.config or machine.config? what's the advantages and disadvantages of each approach? Thanks Edit: I'm concerned about security here, so, the question is about which approach is more secure. 回答1: I would always go with web.config on the grounds that that is where everyone would expect it to be. There is no point in giving the person that has to maintain the web site any more difficulty by storing connection strings in an

Controlling a project with Maven and Spring: How to set Spring config file using Maven profiles?

时间秒杀一切 提交于 2019-11-26 20:46:03
问题 I am trying to configure a Spring configuration file with database information based on whether a certain Maven profile is active. I've seen pieces of answers to this but I'm having trouble putting it all together. I have a Maven profile like this: <profiles> <profile> <id>production</id> <activation> <property> <name>environment.type</name> <value>prod</value> </property> </activation> </profile> <profile> <id>development</id> <activation> <property> <name>environment.type</name> <value>dev<

Calling a Python function from a shell script

柔情痞子 提交于 2019-11-26 20:36:25
问题 I am trying to figure out how to call a Python function from a shell script. I have a Python file with multiple functions and I need to use the values returned by them in my shell script. Is there a way to do it. I am doing this in order to read a config file using Python and getting the values in shell. Is there any other better way to achieve this. test.py contains: import ConfigParser config = ConfigParser.ConfigParser() config.read("test.conf") def get_foo(): return config.get("locations"

Registry vs. INI file for storing user configurable application settings

风流意气都作罢 提交于 2019-11-26 19:33:40
问题 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. But where should I store the values after the user hits the Apply button on that form? What are the pros and cons of storing settings in the Windows registry vs. storing them in a local INI file or config file or similar? 回答1: Pros of config file:

How to reference a file for variables using Bash?

帅比萌擦擦* 提交于 2019-11-26 18:17:56
I want to call a settings file for a variable, how can I do this in bash? So the settings file will define the variables (eg: CONFIG.FILE) : production="liveschool_joe" playschool="playschool_joe" And the script will use those variables in it #!/bin/bash production="/REFERENCE/TO/CONFIG.FILE" playschool="/REFERENCE/TO/CONFIG.FILE" sudo -u wwwrun svn up /srv/www/htdocs/$production sudo -u wwwrun svn up /srv/www/htdocs/$playschool How can I get bash to do something like that? Will I have to use awk/sed etc...? The short answer Use the source command. An example using source For example: config

Where is the user's Subversion config file stored on the major operating systems?

人盡茶涼 提交于 2019-11-26 17:37:36
问题 For Subversion 1.7, where is the SVN "config" file located on the various major operating systems (specifically on Windows, Mac OS X and Linux)? 回答1: ~/.subversion/config or /etc/subversion/config for Mac/Linux and %appdata%\subversion\config for Windows 回答2: In windows 7, 8, and 10 you can find at the following location C:\Users\<user>\AppData\Roaming\Subversion If you enter the following in the Windows Explorer address bar, it will take you right there. %appdata%\Subversion 回答3: Not sure