I often find myself copying and pasting. Perhaps from an internal website such as Bugzilla, and when I paste into a word document or e-mail I often find I've brought along some additional text formatting that I didn't want, such as differing fonts and colour.
I used to use Edit->Paste Special->Unformatted Text to avoid this, or if I was in Outlook I might paste it first into the subject box, then copy and paste it into the e-mail.
However, there seems to be a little known keyboard shortcut that can easily strip formatting in most MS applications such as Word and Outlook that does just this job! Ctrl-Space!
As a test, copy the below the paragraph into your nearest app, and try it for yourself.
The quick brown fox
jumps over the lazy dog
Tuesday, 27 April 2010
Monday, 26 April 2010
Disabling the Windows Command Prompt Beep
I, like most people where I work, have my computer speakers muted. I don't want my PC to make noise and bother other people every time I get an e-mail and the like, and they do the same.
Have you ever been working in the office on the command-line, or run a tool that uses it, hit an error, and suddenly your PC is beeping like you've just poked it in the eye while it's taking a nap? Maybe it's not been you, but you know of other people in your team that start to beep every now and again? Ooo it bugs me! And its twice as embarrassing if it's your own code! :-)
If you don't know what I'm talking about, open a new command prompt, press Ctrl-G, and hit enter.
The problem is that the windows system beep normally comes from the motherboard's own speaker, rather than your 'normal' stereo speakers, and therefore isn't controlled by the system volume.
Luckily there is a very quick and painless solution posted by Gina Trapani. Apply it to your own machine, or send it on to colleagues. My team has been happily without the windows beep for some time!
Have you ever been working in the office on the command-line, or run a tool that uses it, hit an error, and suddenly your PC is beeping like you've just poked it in the eye while it's taking a nap? Maybe it's not been you, but you know of other people in your team that start to beep every now and again? Ooo it bugs me! And its twice as embarrassing if it's your own code! :-)
If you don't know what I'm talking about, open a new command prompt, press Ctrl-G, and hit enter.
The problem is that the windows system beep normally comes from the motherboard's own speaker, rather than your 'normal' stereo speakers, and therefore isn't controlled by the system volume.
Luckily there is a very quick and painless solution posted by Gina Trapani. Apply it to your own machine, or send it on to colleagues. My team has been happily without the windows beep for some time!
Copying and pasting on the command prompt (Quick Edit Mode)
Most IT people at some point find themselves opening up a windows command prompt (cmd), and you may also want to Copy and Paste, which you can do. BUT the command prompt's interface for copying and pasting can only be accessed via its rather hidden Edit menu, which can be seen below.
If you knew you could do this, you probably would agree that this is a rather tedious process, and you can't even select the text the way you want to either. Now luckily windows can make this easier for you, but (for some reason!), it doesn't do this by default. If on the above menu, you select properties, you can then enable Quick Edit Mode, as shown.
Quick Edit Mode is much more intuitive and easier to use than the command prompt's default behaviour. Simply use the left mouse button to drag and select text, and then the right mouse button to Copy. From the clipboard you can paste it as normal, or if you want to paste it back into a command prompt, simply right click!
When saving this change, you can have it only effect your current session, or choose to "Save properties for future windows with the same title".
I like to go one step further, and have Quick Edit mode on by default in any command prompt I open (i.e. VS command prompt), which you can do with a simple registry tweak.
Hope that helps make your time on the command prompt a bit easier!
If you knew you could do this, you probably would agree that this is a rather tedious process, and you can't even select the text the way you want to either. Now luckily windows can make this easier for you, but (for some reason!), it doesn't do this by default. If on the above menu, you select properties, you can then enable Quick Edit Mode, as shown.
Quick Edit Mode is much more intuitive and easier to use than the command prompt's default behaviour. Simply use the left mouse button to drag and select text, and then the right mouse button to Copy. From the clipboard you can paste it as normal, or if you want to paste it back into a command prompt, simply right click!
When saving this change, you can have it only effect your current session, or choose to "Save properties for future windows with the same title".
I like to go one step further, and have Quick Edit mode on by default in any command prompt I open (i.e. VS command prompt), which you can do with a simple registry tweak.
Hope that helps make your time on the command prompt a bit easier!
An error occurred while validating. HRESULT = '80004005'
Visual Studio Setup projects are not great, and I personally have a number of issues with them - but, they do have their uses, and are a common tool in many .NET solutions.
Today I encountered the above error message while building my new Setup project. Now a quick google gives many answer to address this problem, but the gist of it is that your installer contains a Primary Output from another project, that has a Project Reference to one or more other projects. One of these projects being referenced is missing something, for example a file listed in the project is not located on your local disk, or one of the project references is no longer included in the solution.
However, in my case none of the answers I found helped. Then a colleague suggested cleaning the solution, and restarting VS - and that worked!
So I don't know what was the problem in my case, but if you've tried the common solutions you can find via Google and they haven't worked for you, you may as well try a clean and a restart!
Good luck!
Today I encountered the above error message while building my new Setup project. Now a quick google gives many answer to address this problem, but the gist of it is that your installer contains a Primary Output from another project, that has a Project Reference to one or more other projects. One of these projects being referenced is missing something, for example a file listed in the project is not located on your local disk, or one of the project references is no longer included in the solution.
However, in my case none of the answers I found helped. Then a colleague suggested cleaning the solution, and restarting VS - and that worked!
So I don't know what was the problem in my case, but if you've tried the common solutions you can find via Google and they haven't worked for you, you may as well try a clean and a restart!
Good luck!
Monday, 19 April 2010
Tool: String Functions Online
While getting SyntaxHighlighter to work I saw a reference to a handy online utility to encode text into valid HTML. Saves having to do it manually, or push it through your favourite API!
Nosey fellow I am, I looked around the www.string-functions.com website and saw that it has a number of other useful functions such as URL encode/decode.
Worth a bookmark in my book!
Nosey fellow I am, I looked around the www.string-functions.com website and saw that it has a number of other useful functions such as URL encode/decode.
Worth a bookmark in my book!
Tool: SyntaxHighlighter on Blogger
Now we're getting serious. I'm looking to post some code on my blog, and as many have found before, just pasting your code in as bland text is just boring, it just doesn't feel like real code until its been parsed into pretty colours that start to give it some structure. (and yes, I am British, and I will stick to correct English "colour", even if CSS doesn't like it!)
So, not one to reinvent the wheel I did some surfing, and came across SyntaxHighlighter, and from there some wonderful, Blogger specific, and up to date instructions!
I had a failed attempt with an older version of SyntaxHighlighter not working with Google Chrome (my browser of choice), but the above was clear and concise, and uses the current version.
So now, to prove it works!
C#
XML
So there we have it! Thanks to Alex Gorbatchev and Shalabhsneha Katdare
So, not one to reinvent the wheel I did some surfing, and came across SyntaxHighlighter, and from there some wonderful, Blogger specific, and up to date instructions!
I had a failed attempt with an older version of SyntaxHighlighter not working with Google Chrome (my browser of choice), but the above was clear and concise, and uses the current version.
So now, to prove it works!
C#
XML
So there we have it! Thanks to Alex Gorbatchev and Shalabhsneha Katdare
Labels:
blogger,
syntax-highlighting,
SyntaxHighlighter,
tool
Sunday, 18 April 2010
Behind the scenes of PsExec
PsExec is a free tool, available from sysinternals, that allows you to run an executable on a remote machine, in the remote machine's local context. This is a great tool and has many potential uses, and for those of you unfamiliar with sysinternals, it's worth having a look at the other tools they offer such as Process Monitor.
One of the systems I work with had 2 components on a server that interfaced via an executable, and due to that dependency had to be on the same server. Then, on a quiet Friday afternoon a week before the software is demonstrated on the Live hardware, I receive a call basically asking me to separate the dependency so they can be installed on separate servers, and create a new release by the end of the day(!). Now I thought, I can't properly create another WCF web service, and get it tested, in such a short time. I was however familiar with PsExec - but - I did not know how it actually worked, and whether or not it would work in our target environment, which is quite security concious.
As PsExec is not an officially supported tool, there is no detailed documentation, and the best detailed account from the author is only viewable at a cost.
The best explanation I found for how PsExec actually works can be found here
But in summary, I found that PsExec has the following pre-requisites:
- The user on the source system, must be in the local administrators group on the remote system (that's the doozie)
- The \\remotesystem\ADMIN$ share must be available
- File sharing must be allowed between the two systems
- Ports 445 and 139 must be open
The requirement on the administrators group is the biggest issue, and one that I feel makes PsExec unsuitable in secure environments.
Don't I get a birthday?
Anyone working in IT development knows the problems we can get with the intricacies of working with Dates and Times. One of those issues are Leap Year's, which I'm assuming everyone is somewhat familar with. Although how many of you think 2100 is a leap year? ;)
Now I am one of those unfortunate souls (insert violin), born on a leap year, on the 29th February. This means that 3 years out of four, I don't get a real birthday, but have to celebrate my birthday on the 28th February, or 1st March. As well as being slightly awkward in a social sense, this can also be a problem when working with computers.
Nowadays this is something that is handled very well by 99% of the computer systems out there, and so I'd like to thank the industry for making allowances for the awkward bunch we are.
However, these is still that 1% that treat us differently, and I was surprised to find that Blogger was one of them!
I wanted to enter my DOB on my profile, but hide my age (I'm shy like that), which Blogger says I may do by omitting the year. Great! However, upon entering 29/02, and attempting to save, I am then told "Invalid date". Lies!!
Therefore blogger have denied me the feature to include my correct DOB, without the year. So for those of you that did view my profile, my birthday is 29/02, and not 28/02 as you may have seen.
Gripe over, thank you for your patience!
Now I am one of those unfortunate souls (insert violin), born on a leap year, on the 29th February. This means that 3 years out of four, I don't get a real birthday, but have to celebrate my birthday on the 28th February, or 1st March. As well as being slightly awkward in a social sense, this can also be a problem when working with computers.
Nowadays this is something that is handled very well by 99% of the computer systems out there, and so I'd like to thank the industry for making allowances for the awkward bunch we are.
However, these is still that 1% that treat us differently, and I was surprised to find that Blogger was one of them!
I wanted to enter my DOB on my profile, but hide my age (I'm shy like that), which Blogger says I may do by omitting the year. Great! However, upon entering 29/02, and attempting to save, I am then told "Invalid date". Lies!!
Therefore blogger have denied me the feature to include my correct DOB, without the year. So for those of you that did view my profile, my birthday is 29/02, and not 28/02 as you may have seen.
Gripe over, thank you for your patience!
Introducing
Welcome to the first post, in my first blog!
I'm starting this blog to share the issues I face and hopefully overcome, while working in the IT industry, or in my personal computer endeavours.
I'm hoping that over time I will keep posting with the things I have found really useful and this will become a good resource for myself, and others of you in the IT community.
Subscribe to:
Posts (Atom)

