Converting a unix timestamp for use in Excel

So, I’ve got this cron job running to log the results of the uptime command every 5 or 10 minutes. Well, it does a timestamp and then adds in the three load values in a tab separated format. Then I can load this into excel for pretty graphs and stuff and see why over night jobs slowed down at certain points.

It is the loading into Excel point where I come a cropper. After all, windows and unix timestamps differ wildly. Although luckily for us not is a cryptic way. So that leaves two options. Store the values in the csv file as a windows value, or simple apply the following formula:

=(A1 / 86400) + 25569

And here this post comes to a sudden end…

Technorati Tags: , , , ,

Could not find ParserDetails.ini in C:/Perl/site/lib/XML/SAX

Cursed damnation. The problem is caused I think by the ActiveState installation for XML::SAX. So you’ll need to uninstall it from the using ppm tool. I had to uninstall in this order:

  • XML-SAX-Writer
  • XML-Filter-BufferText
  • XML-SAX-Simple
  • XML-SAX-Machines
  • XML-SAX

Then try to install in that order using the cpan shell:

perl -MCPAN -e shell

But that didn’t work on my machines, so you could download the packages from CPAN and drag the files over to your c:\perl\site\lib folders or reinstall over PPM and forget about the error… if you can’t find the needed packages from your default set up then look into installing them from another server.

Not much help to my own problems, am I?! :)

Microsoft Excel - Is it possible to design anything more annoying?

Each day Excel finds a whole brand new way to wind me up. It’s like it knows me and it’s trying to make me scream at it. I’m ranting here, so I hope some of it is coherent! Things that annoy me include (and are in no way limited to):

  • That multiple clipboard thing that pops up and JUST GETS IN THE DAMN WAY ALL THE TIME.
  • It crashes if you undo too far. Far too often.
  • There’s no keyboard shortcut to edit the contents to a cell. Yay, you can press F2… Thanks Cesar!
  • If you go to double click on a cell to edit it and miss slightly it sends you to the bottom of the file. Why?!? Why could anyone consider that to be useful behaviour.
  • Sometimes it sends you to the top too!
  • It is near impossible to click in a cell that contains a hyperlink that you actually didn’t want to be clickable in the first place.
  • It has a completely bizarre window / task bar management that no other application implements… including the rest of the Office suite meaning that you close one sheet and they all damn close, Word doesn’t do this. Outlook doesn’t do this. Powerpoint does, but then you’re under no illusion that you’re actually just closing that single window because it doesn’t spawn another task bar tab.
  • If I’ve got a spreadsheet with multiple worksheets and I want to save out as a tab delimited file DON’T RENAME THE DAMN TAB that I’ve saved as the file name DON’T LOSE SIGHT of the fact that there are other tabs open - it’s okay to assume that I’m still editing a whole workbook so when I press ctrl-s to save don’t FORGET WHO YOU ARE!!!
  • Why can’t I save out all the worksheet tabs as separate tab files/csvs in one go?
  • Why are you the only application that gets confused by XDesk and other virtual desktop tools that actually make windows manageable.
  • Why when I highlight some text to end of the sentance in that cell do you hightlight to the end of the cell? I don’t what anything other than what I’ve highlighted - you can leave the rest of the cell alone. Still, at least you’re better than Word when it comes to cell highlighing when it comes to pre-assuming what you actually meant!
  • Why can’t I zoom to more than 100% using ctrl and the mouse wheel?
  • Why do you automatically lock the file from being edited by me because someone, somewhere else has the file open and has gone home for the day. There’s much better ways to ensure files don’t get overwritten.
  • Why can I copy and paste as much as I like, but if I cut something out I can only paste it once?
  • Why can’t I continue to edit the document when something as simple as a find in document dialogue is open?

Why do you hate me?

If, by some off reason, you’re reading this and you can think of more ways to annoy myself in Excel, please do let me know!

Technorati Tags: , , ,

Clipboard stack for Windows, please.

One feature that I’d find most useful in Windows (or indeed any operating system) would be the ability for the clipboard to act as a stack. It would work simply as such: each time I press control-c the highlighted item go to the top of the stack ready for the next control-v where it would leave the stack and enter the document I’m in.

Also handy would be if pasting from the clipboard it did so without all the formatting crap that comes along with it. I never Never NEVER EVER want all that gumph. I just want the text I’ve highlighted! Perhaps you could leave it as an option when ctrl-shift-v is pressed. But not always.

And also, you’d need an option to leave the item that you’re pasting from the stack where it is, for those times that you need to paste the same thing over and over. Which happens to me more often than I’d like to admit.

p.s. Microsoft Office’s BLOODY USELESS multiple clipboard tool which serves the purpose soley of getting in the damn way and telling you it’s full up. IS NOT WHAT I MEAN.

Technorati Tags: , ,

Fixing errors on a disk.

Yesterday I took out an old 8 Gig harddisk that I was using for linux and replaced it with a 120 Gig drive from an old PC we’re not using any more. A simple task you’d think! Well, not so. After an entire evening trying to get rid of the Grub boot loader that was causing the boot process to hang without the 8 gig drive there everything was fine…

Cannot delete…actually, no it wasn’t! Now the old PC doesn’t want to boot any more and this one won’t boot without running chkdsk for about an hour each time. So I’m gonna fix the damn thing, hopefully I won’t have to reformat it but I will if I have to.

Right then, I get lost of errors like this:

CHKDSK is verifying files (stage 1 of 3)...
File record segment 3152 is unreadable.
File record segment 3153 is unreadable.
File record segment 3154 is unreadable.
File record segment 3155 is unreadable.

…and…

CHKDSK is recovering lost files.
Recovering orphaned file TOOLBAR.BMP (129929) into directory file 126219.
Recovering orphaned file IADVSNK2.CPP (133980) into directory file 126625.
Recovering orphaned file SIMPDND.DEF (136912) into directory file 126496.
Recovering orphaned file COMCLASS.H (140996) into directory file 125301.
Recovering orphaned file CONTAI~1.H (141080) into directory file 126323.

So why’s that happening. Perhaps I’ll do a delete on these files… well that don’t seem to work. Hmm, looks like a format coming on (…to be continued)