configuration

Best way to create custom config options for my Rails app?

I need to create one config option for my Rails application. It can be the same for all environments. I found that if I set it in environment.rb, it's available in my views, which is exactly what I want... environment.rb AUDIOCAST_URI_FORMAT = http://blablalba/blabbitybla/yadda Works great. However, I'm a little uneasy. Is this a go...

Sharing single application across a 2 subdomains in IIS7

I have an application that is currently deployed (ex. www.example.com ). However, now we have a "secure" subdomain, which will take all of the requests that need to be encrypted (ex. secure.example.com). The site that is at www.example.com is currently mapped to C:\inetpub\example.com\wwwroot\, and I've mapped secure.example.com to C:\...

Having spring bean properties refreshed automatically from properties file

I'm using Spring 2.5.6. I have a bean whose properties are being assign from a property file via a PropertyPlaceholderConfigurer. I'm wondering whether its possible to have the property of the bean updated when the property file is modified. There would be for example some periodic process which checks the last modified date of the pro...

With Apache httpd, how do I configure no caching for a given UserAgent?

I have Apache HTTPD configured to add a cache header to requests for most static content: ExpiresActive On ExpiresDefault "access plus 1 year" # Force JNLP and BSH files to expire immediately so updates are checked for # and seen (We need this so we see changes in the dynamic content in both) ExpiresByType application/x-java-jnlp-file ...

How do I port forward a MediaTemple server to redirect a port to a directory?

I've just become a proud owner of a MediaTemple virtual-dedicated server. My question is: How can I forward a port to redirect it to a directory? For example, I would like to redirect port 6783 (e.g., http://www.imagreedybastard.com:6783) to the directory /usr/directories/admin/ ...

Splitting applicationContext to multiple files

What is the correct way to split Spring's configuration to multiple xml files? At the moment I have /WEB-INF/foo-servlet.xml /WEB-INF/foo-service.xml /WEB-INF/foo-persistence.xml My web.xml has the following: <servlet> <description>Spring MVC Dispatcher Servlet</description> <servlet-name>intrafest</servlet-name> <servlet-class> ...

How can I hide .SVN directories from PHP

Hi, I am using SVN to manage a copy of my web site. The site runs a typo3 installation, which uses PHP to create the backend. The problem is, all the stupid .SVN folders show up in the directory listing of PHP. I DO NOT mean the build in apache listing. I mean a directoy listing created by the PHP backend. So, is there any way to hide ...

Using Settings with Complex Types

I am using the Settings class in my .NET project. I notice in the editor that only certain types are available to be used as types for the individual properties in the Settings class. What if I wanted to have a property that was an enumeration from my code or a generic collection for instance? How would I implement that? I'm guessing ...

Spring PropertyPlaceholderConfigurer for .NET web.config/app.config

Is there an equivalent for the Sprint PropertyPlaceholderConfigurer for .NET app.config or web.config files? We are currently using different version of app.config for different environments (web.prod.config, web.qa.config, etc.) which get renamed when the app is deployed. However, most of the config file is the same for each environme...

How to specify the exact location of an assembly in a config file

I've got a web application and a corresponding web.config. The application depends upon assemblies, which are located on the system in a specific path (e.g. c:\programms\myprog\bla.dll) but not registered in the GAC. How can I tell my web application where to find these assemblies it depends upon? I guess I can do that somewhere in the w...

How do I configure my sys.path variable in linux?

I want to automatically add entries to python's sys.path variable when run by my user in linux. Is there something I can tweak in my home directory to get it done? ...

How to read an INI file in ruby

How do I read/write an ini file in ruby. I have an ini file that I need to read change an entry write out to a different location How would I do that in ruby? The documentation on this is bleak. ...

Any Suggestions for Log4Net Configuration Gui?

Does anyone have any suggestions for a Gui for editing the log4net config files. We have people in the field who need to be able to increase, decrease, or specialize logging but don't have the background to mess in the XML. ...

can't add .php mapping for php on iis6 in multi server environment

I have a multi-server environment ( all windows 2003 ). I manually installed php 5 on the appserver. I also plan to install mySQL on the appserver. on the webserver, which is DMZ'd, I added the php5isapi.dll extension under iis6 > web service extensions. I was able to do that by giving the unc path to the isapi dll on the appserver...

Retrieving expired objects in Ehcache

I'd like to implement the following algorythm above Ehcache : try to get an element from the cache if the element is not expired serve the value else serve the expired value refresh the element in the background But I never get an expired element (Element.isExpired()). I tried to play with my cache configuration (especially TimeT...

PHP.ini does not work

I opened the notepad, inserted 3 lines in it, saved it as php.ini, and uploaded it in public_html, but I am still getting an error that requires to first switch the magic quotes off. The syntax of the three lines is as following: magic_quotes_gpc = 0 magic_quotes_runtime = 0 magic_quotes_sybase = 0 What am I doing wrong? ...

Configuring Installer before Distribution

We develop a product which is distributed by our clients to their customers. We need to allow the administrator at the client company to make configuration changes to the installer before he sends it out to the end-user. Configuration changes in this case means a couple of registry entries to be made on the end-users computer. How do I d...

ThreadContext property does not write to AdoNetAppender

I am using log4net 1.2.10.0. I have extended ILog and LogManager to include a new level, 'AUDIT'. I want to use an AdoNetAppender to log the %message to a database. I need other information logged and I tried using log4net.ThreadContext.Properties. I get no output when I try to use a context property as a value for a SQL parameter. <lo...

Why am I getting this error on my local database and not on my live database?

when I am querying the local database instead of live database I get the following error: Cannot use a CONTAINS or FREETEXT predicate on table or indexed view 'Shop' because it is not full-text indexed. Why is this happening? ...

Programatically adding sections to the configuration read from app.config

I am working on a component/assembly that is to be distributed to other developers and included in their systems. In order to minimize the work they have to do, all configuration is done in a seperate file (my.config). My current problem is that a library I am using requires configuration to be added to the app.config file of the appli...