I use M$ Excel to help with project time-sheeting and billing. My bills are really simple and contain project id, project title and time spent in hours and minutes (h:mm). The project id and project title can be looked up on the issue tracker and filtered on the dates so there is no need to include all that lengthy information in the invoice. This produces a table of results. I have been trying to sum the time’s column, but each time it rolled over 24 hours it reset the clock and loss the information. For example 23:00 + 2:00 became 1:00 instead of 25:00. I had to count it up by hand, it was a good job I had to do all that time maths for my 11+! I had a bit of a hunt and found the solution on the Micro$oft knowledge base. Just do the summation as normal but format the cells to be in the format [h]:mm and the “h” part will handle the overflow. Simple in the end!
Been having a look at OpenID. It seems like a really good idea. I have loads of user names and passwords to all the support sites on the internet. You try and pick the same one on each but occasionally there is another joebloggs out there who steals your user name so you have to select another like joebloggs2. And because that web site has a different policy for their password security your usual 8-letter password is now not enough because they want at least 10 with some punctuation. So you have all these user names and all these passwords and the only thing you can do to remember them is write them all down on a post-it and stick it to your monitor! Not very secure! OpenID tries to address the problem of decentralised authentication. It is trying to create a single sign-on for the internet. Being a Paranoid Penguin, I don’t want to entrust a corporate giant, with access to all my other accounts, so I had a hunt for an OpenID implementation that I could set up on my own server. I discovered phpMyID. phpMyID is a single user OpenID server. The package consists of just 2 PHP files!. It doesn’t need access to a database or anything really! It’s just the 2 files! There is a README file with some easy to follow instructions but I’ll outline the salient points and the problems I had.
- It goes without saying that you make sure that your web server has PHP running in your domain!
- Go to a convenient place under your document root and create a folder to put your configuration files.
- Create a directory for the installation:
$root/openid, where $root is your document root.
- Go into it and download the program body:
- Now create a folder for each user:
- Go into each folder and download the configuration file:
- Next configure each user.
- Load the configuration file (
MyID.config.php) into your favourite text editor and change the last line from
- In your web browser goto http://www.example.co.uk/openid/mrn/MyID.config.php and make a note of the Realm
- Now we have to create our user name and password. On the command line enter:
echo -n ‘username:realm:password’ | openssl md5where username is your username, realm is the Realm you made a note of earlier and password is your password. This gives you an MD5 hashed encoded string.
- Edit the user’s
MyID.config.phpand change the auth_username to the user name you have just invented and the auth_password to the hashed password you have just created.
- Now we must test our login mechanism. From your web browser goto:
http://www.bigsoft.co.uk/openid/mrn/MyID.config.phpand click Login.
- Under Plesk I get the message
Missing expected authorization header.so I need to configure the web server to allow the PHP variable
PHP_AUTH_DIGESTto be set by the web server.
- Download the example
htaccessfile from the phpMyID site and place it in
- Edit the
.htacessfile and uncomment option 3 (mod_setenvif)
- Finally we need to set up a url location that tells the OpenID mechanism where the
- In our user’s directory
$root/openid/mrncreate a file called
index.htmland fill it with the following:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en"> <head> <link rel="openid.server" href="http://www.bigsoft.co.uk/openid/mrn/MyID.config.php"/> <link rel="openid.delegate" href="http://www.bigsoft.co.uk/openid/mrn/MyID.config.php"/> </head> <body> Nothing to see here, move along. </body> </html>
- Now go to the web site that supports OpenID and login with the url
- You will be presented with a login from your server asking you to login. Enter the username and password that you used in step 10 and away you go.
In order to avoid full file-system paths in a Tomcat configuration, you make all the file references point to elements on the classpath. The classpath is an environment variable which is set outside of Tomcat, and is the search path that the class loader uses in order to find classes. When importing another bean definition file you would be far better off using something along the lines of the following, instead of a
<import resource="classpath:uk/co/bigsoft/beans.xml"/>Under Eclipse (3.4 Ganymede (but I’m sure this applies to all versions of Eclipse)) you can link projects together and create project dependencies. Creating a dependency means that when you open a project, it will open the projects it depends on. Also, when you run the project it incorporates the classpath of the dependant projects into its own classpath. If you do this and run Tomcat you will get an error similar to:
class org.springframework.web.context.ContextLoaderListener org.springframework.beans.factory.parsing.BeanDefinitionParsingException: Configuration problem: Failed to import bean definitions from URL location [classpath:uk/co/bigsoft/proj/dino.live.xml] Offending resource: ServletContext resource [/WEB-INF/sitemanager-webapp-config.xml]; nested exception is org.springframework.beans.factory.BeanDefinitionStoreException: IOException parsing XML document from class path resource [uk/co/bigsoft/proj/dino.live.xml]; nested exception is java.io.FileNotFoundException: class path resource [uk/co/bigsoft/proj/dino.live.xml] cannot be opened because it does not existThis problem occurs because Tomcat is running as a separate application with its own environment - an environment that does not include classpath links to your other Eclipse projects (even though you have linked them together in Eclipse). There follows a step-by-step guide to adding multiple Eclipse projects to Tomcat classpath. This follows on from the Configuring Eclipse to use Tomcat and the Spring Framework article I wrote earlier.
- After attaching the project to the Tomcat server, double click the Tomcat v6.0 Server at localhost to popup the Tomcat server configuration window.
- Click General Information->Open launch configuration
- Select Classpath tab
- Highlight User Entries (buttons will become enabled)
- Click Add projects… button
- Check the boxes of the projects you want to include.
- Click ok….ok….etc
Been trying to get rid of this error message in my Spring container for a while and I have finally built up enough periphery knowledge to figure out the solution myself, so I thought I’d share it with you - I’m nice like that! The offending message in Eclipse is:
cvc-id.1: There is no ID/IDREF binding for IDREF ‘transactionManager’After a search I found: http://documentation.softwareag.com/crossvision/ins441/messages/imsg.htm Which provided the very helpful advice:
The document contains an IDREF value which does not exist as an ID value. Modify your document.In my example it was moaning about the transactionManager but in your case it could be anything. Inside my containers xml configuration I had a bean which uses a reference to a local bean called transactionManager. Local here is the important bit. Local means that it is defined within the scope of this document - not in a linked or imported document, but in this one. In my case it was defined like this:
In order to fix the problem, I changed the transactionManager bean reference to not be local:
<bean id="mybeanid" class="uk.co.bigsoft.proj"> <property name="transactionManager"> <ref local="transactionManager"/> </property> </bean>
And the problem went away!
<bean id="mybeanid" class="uk.co.bigsoft.proj"> <property name="transactionManager" ref="transactionManager"/> </bean>
I am officially a SnowHead now. I went on my first Skiing trip with them to Xscape, in Milton Keynes which is an indoor real snow dome. SnowHeads is an internet club of skiers who meet up and go skiing together. SnowHeads organises events in the UK and in Europe. So if you like skiing (you don’t even have to be any good), then come along and give it a try. I went with a network architect buddy of mine. On one of the breaks, in the middle, he tells me that the SnowHead people are having trouble with MySQL locking issues inside the SnowHead’s bulletin board system, and if I spoke to their head man he could explain it better. After the event, I went to see the head of SnowHeads to thank him for organising a great evening, and said: “my buddy tells me you are having trouble with your MySQL installation - well I am MySQL-man and could give you a hand". He looks over to my buddy and said: “bloody hell, that is what I call networking". By the sounds of things, Head of SnowHeads and my buddy were discussing the problem together over a beer a couple of days ago, and the next time they met my buddy had produced a fixer as a new member of SnowHeads - Me!