hardcoded

C - alternative to #ifdef

I'm trying to streamline large chunk of legacy C code in which, even today, before doing the build guy who maintains it takes a source file(s) and manually modifies the following section before the compilation based on the various types of environment. The example follows but here's the question. I'm rusty on my C but I do recall that ...

Best way for storing a static password on an automated client

I'm building a system that consists of many clients connecting to a server. The clients automatically push data to the server via a web service call. I've built an authentication mechanism in order for the clients to authenticate with the server so only authenticated clients can upload data. The problem is that I've hardcoded the passw...

Are there solutions for streamlining the update of legacy code in multiple places?

I'm working in some old code which was originally designed for handling two different kinds of files. I was recently tasked with adding a new kind of file to this code. Most of my problems were solved by filling out an extensive XML file with a new entry that handled everything from what lists were named to how the file is written in plu...

will my apps work on iphone OS4?

Screen resolution has increased in iphone OS4. Since lot of UI stuff have hardcoded co-ordinates, will my app run properly on OS4? I still haven't got Snow Leopard, so cant test run the simulator for OS4. ...

save php variables permanently without database

In the admin area of my site there is a form which is for the hostname, username and password for the mysql database that the site uses. Currently these values are hardcoded into a php class. But who can I link it so the form can edit the variables in the php class (and keep the results on the server, in other words the variables are har...

adding and maintaining named strings in a seperate class file in asp.net

I have developed an asp.net web application containing 40-50 pages. I have implemented logger using Log4net and each of my pages has this in its page_load event protected void Page_Load(object sender, EventArgs e) { try { log.Debug("In Page Load Function"); if (!IsPostBack) { ...

Replacing an asp control at runtime

I have an existing .NET 1.1 dll that I do not have the source code for. It contains the code-behind for a asp.net page containing various form controls including a third party text editor that I no longer want to use. I want to replace the text editor with a simple asp:Textbox but the existing textbox is baked into the old assembly. How ...