configuration

Multiple commands in an alias for bash

I'd like to define an alias that runs the following two commands consecutively. gnome-screensaver gnome-screensaver-command --lock Right now I've added alias lock='gnome-screensaver-command --lock' to my .bashrc but since I lock my workstation so often it would be easier to just type one command. ...

Custom app.config Config Section Handler

What is the correct way to pick up the list of "pages" via a class that inherits from System.Configuration.Section if I used a app.config like this? <?xml version="1.0" encoding="utf-8" ?> <configuration> <configSections> <section name="XrbSettings" type="Xrb.UI.XrbSettings,Xrb.UI" /> </configSections> <XrbSettings> <pag...

How do you "refactor" ant build.xml files ?

I'm working on a large C++ system built with ant+cpptasks. It works well enough, but the build.xml file is getting out of hand, due to standard operating procedure for adding a new library or executable target being to copy-and-paste another lib/exe's rules (which are already quite large). If this was "proper code", it'd be screaming o...

Any suggestions on server configuration for my web server?

I am setting up a web server for a client. They will be using a web app (PHP/LAMP) that I am building. The server will be sitting within their network locally. There will also be a MySQL database on the same server. The load on the server will only be 20-25 concurrent users, but uptime and performance is still very important. The app...

How to configure multiple log4j for different wars in a single EAR?

I have a EAR with structures like: APP.ear - APP1.war - WEB-INF/classes/log4j.properties - APP2.war - WEB-INF/classes/log4j.properties - app1-ejb.jar - app2-ejb.jar - log4j.jar - spring.jar - commons-lang.jar (...and other jar) I want each WAR to have their own application log. But it seems the above configuration does not wo...

postfix: How to send emails to users

I run a webserver on debian lenny. How to setup postfix to send emails to users for user registration, forgot password? How to configure the system? I don't want the system to receive any emails from outside world, including user reply. ...

web service reference in DLL

hi all, hope someone can help with something that is really budding me. i have a smart client, a couple of web services and some DLL's. the dll's are essentially forms and controls. the dll's reference the web services within themselves. the problem i have is how to change the references to the web services IN THE DLL's dynamically as ...

What does your .conkerorrc look like?

Conkeror has changed the way I browse the web: it's basically Emacs + Firefox with javascript based configuration in .conkerrorc rather than elisp configuration in .emacs. I've built up a huge library of .emacs customizations over the years by getting little bits and pieces from others. I'm just starting with Conkeror but the fact that...

What's the most appropriate exception to throw if a required app/web.config configuration setting is not present?

(Asked by @tomhollander on Twitter) What's the most appropriate exception to throw if a required app/web.config configuration setting is not present? ...

Representing application navigation

I have a complex application with many pages. Each page can have many possible routes to other pages: 'A' can go to 'B' or 'C', 'B' can go to 'A' but not 'C'. etc. Rather than embed this "where to go to next" logic in each page (horror!) I of course want to encapsulate it in a main point of control. 'A' doesn't need to know about 'B' ...

How do you configure WCF known types programmatically?

My client/server application is using WCF for communication, which has been great. However one shortcoming of the current architecture is that I must use known type configuration for certain transmitted types. I'm using an in-house Pub/Sub mechanism and this requirement is unavoidable. The problem is that it's easy to forget to add th...

Reusable Components, database connections and different environments

I am wondering what would be considered best practice when setting up reusable components / libraries in .net. I have a webservice that utilizes a library that contains a few database connection for interacting with databases. I am wondering how I should set my library up when it comes to specifying the connection strings. I need to be...

How to read app.config from a custom location, i.e. from a database in .NET

I am trying to override the ApplyConfiguration method in my custom ServiceHost to read the configuration from a database instead of app.config. Ideally I would want to be able to do something like this: Configuration config = GetConfigFromMyDatabase(...); ServiceModelSectionGroup serviceModel = ServiceModelSectionGroup.GetSectionGroup(...

Configure XAMPP with MySQL4

Can we configure MySQL 4 with XAMPP? The latest version of XAMPP comes with MySQL5 ...

Custom Configuration for ASP.NET Apps (use of Application Settings or other frameworks)

I know how to create custom configuration handlers for my .NET application. There are plenty of posts on StackOverflow that cover what needs to be done. I've spent most of the day knocking out classes that derive from ConfigurationElement. I'm getting worried that this approach involves a lot of work - more work than I was expecting. I'...

Setting a custom 404 error page programmatically

In a regular ASP.NET application, you might have a customErrors section like the following: <customErrors mode="On"> <error statusCode="404" redirect="Nice-FileNotFound-Page.aspx"/> </customErrors> Is it possible to set the 404 error programmatically at Application_Start? Something like the following: // Figure out which page shou...

Terracotta - Cannot cast to com.tc.object.bytecode.TransparentAccess

I have a rather large spring application, and all I'm trying to share is a single Map (using util.ConcurrentMap as implementation). To do this, I created a bean in my appContext, and I tried to use the following tc-config line: */applicationContext.xml Must I do something else to enable this to work? MyClass is a rather s...

Avoid web.config inheritance in child web application using inheritInChildApplications

I am trying to add <location inheritInChildApplications="false"> to my parent web application's web.config but it doesn't seem to be working. My parent's web.config has: <configuration> <configSections> </configSections> // 10 or so custom config sections like log4net, hibernate, <connectionStrings> </connectio...

How to delay the dispatch of an e-mail? Click button to send NOW but wait until 6.00pm until the email gets actually sent.

I have a php script that does some processing (creates remittance advice PDFs, self-billing invoices, Sage CSV file etc...) and at the end outputs a screen with a form, in which the names and e-mail addresses of the people paid appear. User makes a selection of names by clicking check boxes and then there is a Send button which sends out...

.Net and default settings

If I am to have connectionstrings read from a config file in my application and I need to be able to change the connectionstrings as the application is moved from dev to uat to prod should I be using settings files at all as there the connection strings are compiled into the assembly which I will be moving from environment to environment...