Hi all,
If any of you own a Mac, you might have hit the sticky issue of trying to open an MHT file!
The problem is that MHT files are Mime Encoded HTML files, which are specifically a Microsoft format.
IE opens these files just fine, and there are a few plugins for Chrome/FireFox that perport to open them too.
I haven't had any success with the plugins, and by default, Word (Office for Mac 2011) tries to open MHT files, but always fails...
Here is the answer: Rename from .MHT to .EML.
Your default email client (Entourage or Outlook) will then open it as an email will all the formatting and graphics!
Hope that helps!
Tuesday, 20 December 2011
Thursday, 10 November 2011
Mac - Changing Network Locations
Hello all,
I have setup two network locations on my Mac - one for the Office, and one for Home.
Both use different DNS settings, and other minor differences...
To change locations in Mac OS X Lion, you simply click on the Apple menu, go down to Location, and select the location you want...
I have a requirement for my location changing to be automated in some way, and I discovered this little tidbit on the web, and thought I'd share it with all!
From the terminal (command-line), or in a bash script, you can use the following command to set the network location:
scselect "Location"
Where "Location" is the name of the network location.
You can wrap this in any logic you need, or even just assign a shortcut key to the bash script to make changing network locations easy!
Have fun!
I have setup two network locations on my Mac - one for the Office, and one for Home.
Both use different DNS settings, and other minor differences...
To change locations in Mac OS X Lion, you simply click on the Apple menu, go down to Location, and select the location you want...
I have a requirement for my location changing to be automated in some way, and I discovered this little tidbit on the web, and thought I'd share it with all!
From the terminal (command-line), or in a bash script, you can use the following command to set the network location:
scselect "Location"
Where "Location" is the name of the network location.
You can wrap this in any logic you need, or even just assign a shortcut key to the bash script to make changing network locations easy!
Have fun!
Friday, 28 October 2011
Visual Studio - Batch Build
In Visual Studio, there are different Configurations for development.
The most common are:
Have you ever been in a situation where you have just finished development and Alpha testing, and then gone to release to the client, only to discover that you haven't build the Release version, and have given them an old copy of Release?
Happens to me every now and again when I am in a rush to release, so I thought I'd share my little nugget of wisdom with you all...
In VS 2008, on the build menu, there is an option to "Batch Build". This will bring up a dialog that will allow you to specify which projects form your solution, and which *configurations* you want to compile!
I have hooked this up to a shortcut key, so I can quickly build *everything*:
This way, every time I build, I get both the Debug and Release builds going...
If you have any funky #IF DEBUG... compiler directives, it may affect the build results, so watch those, but apart form that, you can be confident that all binaries, whether in Debug or Release, are current...
Have fun now kids....
The most common are:
- Debug
- Release
The main difference, out of the box, is that the Release configuration doesn't include debug information (.PDB file), and also optimises code on compilation.
As a developer, this can be extended, so that different pre- and post- build events can be hooked up when in Debug than to release...
For example, when developing .NET services, my Debug configuration will stop the service, uninstall it, compile the project, then reinstall the service and start it up....
I also us the #IF DEBUG compiler directive to launch a debugger (VS 2008) when you run it in Debug mode.
My release profiles are always *clean* and don't include a lot of redundant steps I use in development.
Have you ever been in a situation where you have just finished development and Alpha testing, and then gone to release to the client, only to discover that you haven't build the Release version, and have given them an old copy of Release?
Happens to me every now and again when I am in a rush to release, so I thought I'd share my little nugget of wisdom with you all...
In VS 2008, on the build menu, there is an option to "Batch Build". This will bring up a dialog that will allow you to specify which projects form your solution, and which *configurations* you want to compile!
I have hooked this up to a shortcut key, so I can quickly build *everything*:
This way, every time I build, I get both the Debug and Release builds going...
If you have any funky #IF DEBUG... compiler directives, it may affect the build results, so watch those, but apart form that, you can be confident that all binaries, whether in Debug or Release, are current...
Have fun now kids....
Wednesday, 26 October 2011
Excel on a Mac - F2
Has anyone else moved from Windows to a Mac and thought - I almost got away from Microsoft?
WhenI moved to a Mac, I installed Microsoft Office 2011 so that I had zero incompatibilities with the poor folk in my organisation, and my clients,, who are shackled to Microsoft Office.
The good news is that it worked!
I had a lot of teething problems with Excel and Word crashing when I tried to copy/paste, but this was fixed in Service Pack 1.
Since then it has been smooth sailing - all my Excel/Word docs are 100% compatible with their Windows counterparts.
I have been frustrated by one issue in Excel though - in Windows, if you want to edit the current cell you are in - you just press F2, and you're away!
Not so on a Mac, however!
I have finally found the same shortcut on the Mac version of Excel and it has made using Excel that much quicker!
So here for all is the Mac version of the shortcut key to edit the current cell in Excel:
Ctrl+U - Control plus U.
I really hope this helps others as much as it has helped me - but I honestly don;t care if it doesn't - I'm happy again now... :)
WhenI moved to a Mac, I installed Microsoft Office 2011 so that I had zero incompatibilities with the poor folk in my organisation, and my clients,, who are shackled to Microsoft Office.
The good news is that it worked!
I had a lot of teething problems with Excel and Word crashing when I tried to copy/paste, but this was fixed in Service Pack 1.
Since then it has been smooth sailing - all my Excel/Word docs are 100% compatible with their Windows counterparts.
I have been frustrated by one issue in Excel though - in Windows, if you want to edit the current cell you are in - you just press F2, and you're away!
Not so on a Mac, however!
I have finally found the same shortcut on the Mac version of Excel and it has made using Excel that much quicker!
So here for all is the Mac version of the shortcut key to edit the current cell in Excel:
Ctrl+U - Control plus U.
I really hope this helps others as much as it has helped me - but I honestly don;t care if it doesn't - I'm happy again now... :)
Don't Upgrade to Tortoise SVN 7.1 !!!
Oh. My. God.
We use TortoiseSVN along with VisualSVN as our source code control system.
We heave *never* had a problem with TortoiseSVN before, and have even made donations in the past to support it - that's how happy we were with it.
As usual, every few months, a new version of Tortoise was released, and we upgraded to it as usual...
I didn't even think about what I was doing - I have updated Tortoise on so many occasions it was just a formality...
After performing the install, and consequently rebooting, I loaded up my project in VS 2008, and tried to look into the log for one of my files...
And what happened? This!
So, I upgraded from version 1.6 to 1.7, but all of a suddenly, anything in 1.6 is apparently too old to view!
So, how then do I see my history as everything IS in the version 1.6 format!
Sigh.
I decided to just carry on....
So, I made a raft of changes to my project over multiple files.
It hen built it and tidied up a bit, and thought - "Now is a good time to check in my code...", so I tried to run the SVN Commit.
Should have updated all modified files right? They should now be in 1.7 format?
Oh, if only it were that simple!
Here's what I get when I try to check in:
Nothing to do!
So, since upgrading, I can't access my source history, and I CAN'T CHECK IN ANY NEW CHANGES OR FILES!
Checking out the Tortoise SVN website (http://tortoisesvn.net/downloads.html) there is a big warning that if you are upgrading from version 1.6, you will have to run the installer twice!
Okay, so I tried this, and it made NO difference at all!
I'm now in the process of uninstalling and re-installing the 1.6 client...
You can find the older version at: sourceforge.net/projects/tortoisesvn/files
I am running Windows 7 (32-bit) with the latest updates and service packs.
This could just be me, a singular exception to the rule, however, I would seriously advise checking this out before you blindly upgrade - just in case it saves you some pain...
Hope this helps folks!
Mark
We use TortoiseSVN along with VisualSVN as our source code control system.
We heave *never* had a problem with TortoiseSVN before, and have even made donations in the past to support it - that's how happy we were with it.
As usual, every few months, a new version of Tortoise was released, and we upgraded to it as usual...
I didn't even think about what I was doing - I have updated Tortoise on so many occasions it was just a formality...
After performing the install, and consequently rebooting, I loaded up my project in VS 2008, and tried to look into the log for one of my files...
And what happened? This!
So, I upgraded from version 1.6 to 1.7, but all of a suddenly, anything in 1.6 is apparently too old to view!
So, how then do I see my history as everything IS in the version 1.6 format!
Sigh.
I decided to just carry on....
So, I made a raft of changes to my project over multiple files.
It hen built it and tidied up a bit, and thought - "Now is a good time to check in my code...", so I tried to run the SVN Commit.
Should have updated all modified files right? They should now be in 1.7 format?
Oh, if only it were that simple!
Here's what I get when I try to check in:
Nothing to do!
So, since upgrading, I can't access my source history, and I CAN'T CHECK IN ANY NEW CHANGES OR FILES!
Checking out the Tortoise SVN website (http://tortoisesvn.net/downloads.html) there is a big warning that if you are upgrading from version 1.6, you will have to run the installer twice!
Okay, so I tried this, and it made NO difference at all!
I'm now in the process of uninstalling and re-installing the 1.6 client...
You can find the older version at: sourceforge.net/projects/tortoisesvn/files
I am running Windows 7 (32-bit) with the latest updates and service packs.
This could just be me, a singular exception to the rule, however, I would seriously advise checking this out before you blindly upgrade - just in case it saves you some pain...
Hope this helps folks!
Mark
Tuesday, 25 October 2011
Visual Studio 2008 XML Comments...
Hi All,
I have just spent a very long time commenting a project in .NET using the XML comments available in VS 2008.
i.e. before each class, method or property declaration, you type three slashes (///), and VS will add a comment block for you that looks like this:
/// <summary>
///
/// </summary>
You then fill in a description, and when you build the project, a nice XML file is created containing the comments for you.
Using Sandcastle Help File Builder, you can then very quickly and easily create an MSDN style CHM/HTML file that will allow other developers to easily work with your code.
I digress...
The point I wanted to make was that in the service I am developing, there are two main projects:
i.e., for my settings project, the path was Bin\Debug\Settings.xml.
Right - I know, silly me for not changing the comments file output name then so it doesn't conflict with my own Settings.xml file (which resides in the project output folder as well...).
My moan is simple: Visual Studio 2008 found the existing Settings.xml, assumed it was the comments file from a previous build, and continued to replace it without prompting!
Had to recreate my settings file from a backup and fill in the missing bits...
Well - I hope this experience helps some of you out there who do the same - save yourself the pain - always append comments to your Comments XML file:
Mark
I have just spent a very long time commenting a project in .NET using the XML comments available in VS 2008.
i.e. before each class, method or property declaration, you type three slashes (///), and VS will add a comment block for you that looks like this:
/// <summary>
///
/// </summary>
You then fill in a description, and when you build the project, a nice XML file is created containing the comments for you.
Using Sandcastle Help File Builder, you can then very quickly and easily create an MSDN style CHM/HTML file that will allow other developers to easily work with your code.
I digress...
The point I wanted to make was that in the service I am developing, there are two main projects:
- Main Service
- Settings
The settings project is a Windows Forms application that allows the users to configure the settings for the service, and then saves them to an XML file that is consumed by the service.
In most cases, I name the settings file "Settings.XML" for convenience.
So, I had added all my wonderful comments to my projects, and then realised that I wasn't outputting the XML comments file for the projects.
I turned this on my going to the Project Properties, then the build tab, and then ticking the: "XMLDocumentation File" checkbox. This entered a default path and filename for the comments file.
It uses your BIN folder, then the build type [Debug, Release], then the project name followed by .xml.
i.e., for my settings project, the path was Bin\Debug\Settings.xml.
Right - I know, silly me for not changing the comments file output name then so it doesn't conflict with my own Settings.xml file (which resides in the project output folder as well...).
My moan is simple: Visual Studio 2008 found the existing Settings.xml, assumed it was the comments file from a previous build, and continued to replace it without prompting!
Had to recreate my settings file from a backup and fill in the missing bits...
Well - I hope this experience helps some of you out there who do the same - save yourself the pain - always append comments to your Comments XML file:
Mark
Thursday, 20 October 2011
Parallels 6 and Ubuntu 11.10 - Tools won't install
Right, so I have Parallels Desktop 6 on my Mac (OSX Lion), and I have installed Ubuntu 11.10 (Oneiric Ocelot).
Fine - no problems there.
I then tried to install the Parallels Tools to make the VM usable through my Mac (Just the same as installing VMWare tools or VirtualBox additions) and all the problems began!
The tools won't install due to an error that rolls back the whole installation.
The specific error is: "Error: Could not build Kernel modules."
I have spent hours over the past week looking through the Parallels Forums and scouring Google to find a solution with pretty mixed results.
Most people say it installs okay but there is a large number of people who are experiencing the same problem as me.
There a quite a lot of potential solutions floating around, but I have not found a solution that works for me yet!
I have tried all the simple stuff, like CHOWNing and CHMODing the files properly, copying the entire installation cd to a working folder in linux and trying again, etc... No Joy.
The solutions discuss patching the install files themselves, and although I have tried, the solutions didn't work for me.
One post suggests that upgrading to Parallels 7 and trying to install the tools, but the cynic in me won't accept that the Parallels Tools installer is so vastly different between version 6 and 7 - if at all, so I'm probably going to do that as a last resort.
As always with Parallels, they will eventually release an update that fixes this problem, but it is annoying that I can't use it just yet.
If I find a solution, I will post it here for prosperity!
And back to it...
[Edit] > Right - I have given up with 11.10 (besides, I REALLY don't like unity...).
I downloaded an image for 10.04 LTS (Long Term Support) - and it just worked out of the box, so to speak!
So, I am now happily using a very stable version of Ubuntu within Parallels - I may try to update to 11.10 again, when a Parallels patch comes out, but until then - I'm happy :)
Mac Screensaver Freezes - OS X Lion
Hi all,
I keep getting a random error with the Mac OS X Lion Screensaver in that from time to time when I try to get back to the desktop it will show then login prompt, then carry on playing the screen saver!
In other words, you can't get back to the desktop.
On the few occasions that this has happened, I have been able to bring up Mission Control with a gesture (three-fingers swipe up), then laboriously load the Activity Monitor.
Then you get back to the screen saver.
Then I entered Mission Control again, selecting the recently loaded Activity Monitor.
This takes you back to the screensaver, but the programs behind respond to keys events, so I pressed S to select the ScreenSaver process within the Activity Monitor.
Back to the ScreenSaver, then reopen Mission Control again.
Then I pressed Alt-Cmd-Q to quit the process.
Back to the ScreenSaver, then reopen Mission Control again.
I always had to select the Activity Monitor again, then press Left twice to select the "Force" option and press space.
Ta Da! Your desktop is back!
I got bored of this the third time I had to do it, so I created a simple bash script that will kill the screensaver process for me:
#!/bin/bash
killall -9 -c ScreenSaverEngine
I then used QUICKEYS to assign a keyboard shortcut to run this.
If you don't have QUICKEYS, try QuickSilver - very good shortcut/abbreviation programs.
Now, when the screensaver goes wonky, I just login, then press the keyboard shortcut to run the script, and the screensaver goes away!
Not perfect, and I'm sure Apple will fix this in a future patch, but for now it just might help you to carry on with your day...
Have fun!
VBScript - Still Useful? Yes! With VbsEdit....
A friend of mine from school got in touch with me today to say that his company had let him loose on the servers with VBScript to automate a lot of the jobs he does - this way then get run outside of business hours...
I immediately advised him to checkout an IDE called VbsEdit - this is an awesome app for doing VBScript.
There are two huge features that make it well worth while:
- Huge Library of samples
- Debugging
That's right folks! You can debug VBScript! this make it an unbelievably powerful tool, and coupled with the huge library of samples you should be set to run with VBScript for life!
The library of samples contains stuff that blew my mind when I first saw them - I honestly didn't know you could so much with VBScript!
I fell in love with this tool for doing house-keeping and out-of-hours processing, automating work-flow, etc...
Since moving to a Mac, I have found that Automator fills this niche, but not completely, I still have to resort to bash or perl scripts to do some clever stuff, and at these times I miss VbsEdit for the two reasons mentioned above...
So, I just wanted to really say that VBScript is still a very useful tool for Windows users, and that if you do get into it, you should definitely try VbsEdit.
Anyway....
Wednesday, 19 October 2011
Research & Development
Hi all,
I am just about to start designing a new module for our integration service, and it occurs to me that the hardest part of designing anything is actually starting.
I find that once I get going, it all seems to flow, but any interruption is usually fatal to the current work.
It is these interruptions that lead to aspects of the design being missed completely, or misunderstood - which will inevitably come back to get you in QA...
So my advice to you all is to make sure you can do significant sections of the design with minimum interruptions.
My preferred approach is to start with a template document that contains the various sections that need completing.
Once I have this, I will work on a section at a time. If any graphics are required in any of the sections, such as process flows, they should be left and completed later.
I always do the process flows and graphical work after I have completed the bulk of the design to make sure everything ties up nicely.
It's easy to change text to cater for modifications to the design, but going away and updating a raft of process flows is annoyingly laborious...
For example, I have completed the bulk of the document now for the design of the new module, but have yet to complete the process flows.
Anyway, back to the salt mines...
And so it begins...
I saw "The Social Network" at the weekend, and it truly inspired me to write a blog.
Given that whenever I need help with an issue, I usually find the answer in someone else's blog, I thought it was time to contribute myself!
As always, any problems - let me know...
Subscribe to:
Posts (Atom)