July 2006 - Posts
A few years ago I created a small application with which I can monitor what windows services are running on my machine while I'm working. Like many small utilities it evolved into something bigger as time went by and eventually it became a full utility with which you can monitor and control services - running in the system tray indicating what the state is of the currently selected service.
Recently I added the ability to connect to other machines so you can watch the services on those machines (provided you have the privilages) and even stop/start them.
The tool is provided as is. Those people that find it useful are welcome to use it if they like. It requires the .Net 2.0 framework to run.
About two years ago I signed up with Uninet as my service provider and was for the most part kind of happy with them. They had their off times but usually came back after a short while. The last couple of weeks it seems things have gone from ok'ish to just plain bad. The service interuptions are now regular and there is little to no after hour service available. The operators they seem to put on call sounds like they don't want to be there or you are interupting them while they are probably entertaining themselves (it is obvious since I can hear over the phone how things go crazy around there).
If something goes wrong after hours the only answer you get from them is 'oh we will try to fix it in the morning..." or something. That is if you get through at all.
Yesterday my 'transmitter' apparently just stopped working - at least that's what the after hours operator says. The only option is to have a technician came out and check it out but - yes, guess what, it can only happen during office hours. So I phone today and eventually got an appointment so that the technicians should come and have a look over lunch hour. Quess what, they did not pitch up, no phone call to say 'we're running late'. I had to phone their service centre to find out what is happening. Eventually I could not wait anymore (being a working person) and had to leave for work again. I phoned them one last time to tell them to come after six. They explained that they might not be able to do it that late. Apparently customer service is not on their priority list.
So now I have to hope they will make the effort and come sort out 'their' transmitter problem. Keep thumbs for me!
[Update: Well, I'm happy to report that things seem to have been sorted out although I'm still in the dark as to exactly what happend and why. When I got home after work I waited for the techies again. This time I spoke to someone on the phone who seems to be their foreman or manager. He tried explaining how busy they are etc. Out of desperation I tried connecting my router to the wireless transmitter again and all of a sudden it worked. I got a phone call from one of their service techncians or operators saying the techies might be a bit late (again). At least this time someone phoned to inform me. I explained that the connection was up again without my having to do or change anything on my side. Seems it is a bit of a mystery for them too how it can all of a sudden 'work' again. The only thing possibly related is that they apparently worked on another transmitter on their tower that does not point in my direction.]
After having a need to update a ListView control after an application loaded (forcing the selected item to be visible) I found that this was not working using the EnsureVisible() method of listviewitem. The application loaded the listview during the form load event and I suppose it was still 'busy' with a lot of other initializing stuff causing the specific listviewitem not to be visible after the whole process - I must admit that some form resizing also takes place during the form loading event that can influence the whole story.
What I needed was a way to run some code a fraction of a second later, preferably on another thread that was not influenced by the then busy main form thread. I've done this kind of thing before in VS2003 simply using a new thread that fired something like 500 milliseconds later to update the listviewitem.
This time around I wanted to be fancy (of course) and tried using anonymous methods avoiding having to write a whole separate function with declared delegates etc.
The first bit of code is easy creating a new thread that run some code using an anonymous delegate.
new System.Threading.Thread( delegate() { /* */ }).Start();
With this line you simply avoid having to declare a new Thread object, set the thread start parameters and then start it.
The tricky part is when you write the code for the updating the listviewitem from this new thread. It is still possible to declare a new delegate and then call the Invoke method of the control - the old way. However, I wanted to avoid having to declare or write any additional 'things' like variables, methods to achieve this. The immediate first thing to try was:
new System.Threading.Thread(delegate()
{
lvwServices.Invoke(delegate()
{
Thread.Sleep(500);
if (lvwServices.SelectedItems.Count > 0)
{
lvwServices.SelectedItems[0].EnsureVisible();
}
}
);
}
).Start();
Unfortunately this gives a compiler warning: "cannot convert from 'anonymous delegate' to 'System.Delegate'". The reason being as far as I can attain is that anonymous methods are not internally truly Delegates and thus cannot be cast automatically to the proper delegate type.
The solution after some digging around is to specifically cast the anonymous delegate:
new System.Threading.Thread(delegate()
{
lvwServices.Invoke((MethodInvoker)delegate()
{
Thread.Sleep(500);
if (lvwServices.SelectedItems.Count > 0)
{
lvwServices.SelectedItems[0].EnsureVisible();
}
}
);
}
).Start();
Using the BeginInvoke method will make the call asynchronous if you prefer that.
The IT world is a funny place - that is funny with a nasty twist. Just when you think you have achieved something... some manager decide "oh wait, we don't need this or that system anymore..." which just happen to be something crucial for the development project you were busy with.
Don't that just give you that warm and fussy feeling (to go and break their necks!). Why bother to allow the development project progress so far if there were no plans to use any of the work put into it in the first place...
They moan about productivity of employees, wants to save every little cent to help the business by not giving you the resources to be a happy employee - then they come and waste money like this. Of cource the excuse would be "this is a management decision and would save cost on the long run..." yeh right.
Oh well, lets just move along to the next project that will be canceled anyway...
I've been looking for a way to have the battery status of my Pocket PC phone display on the 'Today' screen so I don't have to go Start, Settings, System, Power every f*ing time just to see how much of the battery is left. Then today I came across a freeware tool that does just that plus much more. It also is a task manager - something Pocket PC 2003 really needs. Additionally it allows you to actually 'close' programs instead of just the default minimize.
I installed it on my IMate (QT2020) and it works very nice. Ruari, you should also try it out!
http://www.trancreative.com/mb.aspx
Having two operating systems installed on the same machine has always meant some kind of 'fun' sharing data or files between the different file systems. From the Linux side these is read-only support for ntfs (there is a way to make it read/write but it is not stable as far as I know). There is however another way - access your file that is on a Linux partition from Windows.
This driver allows read/write access from Windows. It supports the Ext2 and with some tweaks Ext3 partitions as well.
http://www.fs-driver.org/
A few days ago I received my Ubuntu cd's I ordered (free) from
shipit.ubuntu.comIt looks real good and may actually be used as a desktop OS replacement (not mentioning some popular desktop OS name here...hehe). This time they have combined the 'Live' CD and install into one making it easier to just boot up, first check that everything runs as you like it and then click on the 'Install' icon to actually install Ubuntu on your hard drive. Very nice!
Then if you want to add stuff to it there is a guide explaining step by step how to do it. It even has a section on Mono!
http://ubuntuguide.org/wiki/DapperNow I just need to find some more disk space to actually install it ;)
In a blast from the past I discovered one of my old creations (build from lego) and decided to take a couple of pictures of it. Originally the idea was to build a Enterprise D type of ship but the end result was something more in the line of Voyager or Enterprise E.
http://dotnet.org.za/photos/rudolf/category1394.aspxNow I just need a Dorg, I mean Borg cube to fight against! Resistance is futile. You will be Legoed....
Every now and then after doing some developing and testing on my local BizTalk dev box I need to get the bindings for a specific 'solution' that are not related to any specific assemblies. The usual way would have been running the whole deployment wizard selecting export bindings, no associations, clicking next, next etc.
Ok so I got lazy and simply created a batch file that produce an unassociated binding file. The command is simply:
btsdeploy EXPORT UNBOUNDPORTS BINDING="<wherever you want the file.xml>"
Then it is as simple as coping this file to the deployment directory of all the stuff I want to deploy and editing it stripping out all the stuff I don't need. It works for me.
I was reading through Channel 9 this morning and came across a question about when (or if) the service pack for Visual Studio 2003 would be released. There was one of the comments that made me start thinking just how bad things have become with Microsoft (and even in general) release dates.
To quote from this guy's response: "
Can't say I'm surprised. There are two things Microsoft does more nowadays than anything else: 1) Miss release dates and 2) Lie about future release dates. What a winning combination, eh? Needless to say, given Microsoft's latest round of screw-ups, it's no wonder my confidence in them is nearing an all time low nowadays."
I can't help thinking about the now notorious DNF (that is Duke Nukem Forever for those that has been out of this world for the past decade). It would seem that Microsoft is starting to have the same 'attitude' of 'we'll release it when its ready'. It would have been ok if this was for new and future products but when we start talking about service packs and patches then waiting around till its done only irritates people already using the buggy software. Worse still is the lying about release dates and not even making an attempt to apologise when the date slips past.
Channel 9 threadJust to clarify, I don't have anything (ok mostly) against Microsoft in general. It's a business like many others trying to make money and sometimes some of their products are actually quite good. Also, I'm not saying they should try to release everything asap full of more bugs just to have to release patches for the patches for the original screw-up.. :p
Then again they are not alone in this respect. Probably just a case of the highest tree getting the most wind.
Ok, perhaps I should start taking bets on whether Vista or DNF would be release first. Hell, DNF might actually stand a chance!
Just something interesting (and useful for travellers) I discovered. This web site gives you the current times around the world plus you can search for what the times is for lots of cities around the world.
http://www.worldtimezone.com/