Finding files that have not been added to ClearCase
November 20th, 2008Clearcase is the best source controller I have ever used; and I have used most of them (free and commercial)!
One thing that I need to do quite often is look for files that have not been placed under source control yet. After a session of checkins I would ask my fellow developers to try and build to make sure I haven’t missed anything - which can be a bit time consuming. Generally, I have missed adding a file. The reason for this is usually that the un-added files do not show on the Find Checkouts view.
Un-added files in Clearcase speak are called View Private files, that is, they are private to your view.
There isn’t a tool which only finds View Private files, but the closest we can get is to View Private, Checked-out and Derived files. Issue the following cleartool command:
cleartool ls -recurse -view_only path\to\dir
or the short version:
cleartool ls -r -vie path\to\dir
You may want to use a command like grep to filter your results.
Move a window when its title bar is off the screen
November 19th, 2008Under Windows some applications remember where a window was positioned when it was last used. Sometimes that position can no longer be on the visible screen. There are various reasons how this might happen.
- Screen resolution is smaller than before.
- Computer used to have 2 monitors, and now only has one.
- Computer has 2 monitors which are now in a different order.
- Program bug.
So, how do we move the window back into a position where we see the title bar. (Once we have the title bar in view, we can use the mouse to do anything we want.)
- Open the title bar menu, by holding down alt + space.
- Select Move, by pressing the ‘M’.
- Use the arrow keys to move the window into a better position.
- When you are happy with the new location, press Return to finish.
- You can now use the mouse as usual.
Many thanks to Kevin for the first solution. Another solution is:
- Open the title bar menu, by holding down alt + space.
- Select Move, by pressing the ‘M’.
- Press the down arrow key and then move the mouse. The title bar will snap to under the mouse, where ever it is on the screen.
- Move the window to where ever you like and right click to drop it.
Install Spring IDE 2.2 under Eclipse 3.4 SR1 JEE
November 18th, 2008This blog is an addendum to Configuring Eclipse to use Tomcat and the Spring Framework but is solely related to Spring IDE 2.2.
- Install Eclipse 3.4.1 JEE Ganymede SR1
- Load Eclipse and goto Help->Software Updates…
- Select the Available Software tab and click Add Site
- In the Location enter http://dist.springframework.org/release/IDE then click Ok
- After a bit of flickering Spring IDE Update Site appears (twice!) and along with a couple of others sites
- If you right click on “http://download.eclipse.org/tools/mylyn/update/e3.4″, select Properties, Click Ok, then check and uncheck Include items that have already been installed then the “http://download.eclipse.org/tools/mylyn/update/e3.4″ site will change to Mylyn for Eclipse 3.4!
- Check Mylyn for Eclipse 3.4, one of the Spring IDE Update Site and http://download.eclipse.org/tools/ajdt/33/update/, click Install… - If the Install button is not enabled then uncheck and re-check the buttons until they are select and Install is enabled!
- You be taken to the Install screen, showing the size of the update as (40,518KB) and All details are ok. Click Next.
- Now you have to agree the Licenses, so check I accept the terms of the license agreement and click Finish.
- The software updater will start downloading and installing the updates. You can click the Details button to see what is going on.
- You must then restart the workbench
Summing an Excel time column and printing the results in hours
November 17th, 2008I 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!
Setup and install of multiuser phpMyID (OpenID) under Plesk
November 16th, 2008Been 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:
mkdir mrn
- Go into each folder and download the configuration file:
wget https://www.siege.org/svn/oss/phpMyID/trunk/MyID.config.php
- Next configure each user.
- Load the configuration file (
MyID.config.php) into your favourite text editor and change the last line from
torequire(’MyID.php’);
require(’../MyID.php’);
- In your web browser goto http://www.mydomain.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:
where 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.echo -n ‘username:realm:password’ | openssl md5
- 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:
and click Login.
- Under Plesk I get the message
so I need to configure the web server to allow the PHP variableMissing expected authorization header.
PHP_AUTH_DIGESTto be set by the web server. - Download the example
htaccessfile from the phpMyID site and place it in$root/openid/mrn/.htaccess. - 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
openid.serverandopenid.delegateare. In our user’s directory
$root/openid/mrncreate a file calledindex.htmland fill it with the following:XML:
<!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.