Friday 25 November 2011

GhostDoc configuration

Finally fixed an issue with GhostDoc that's annoyed me for years.

When you document a method that begins with the word SetupXXX then typically a GhostDoc out of the box would give you something rubbish along the lines of "Setups The ". If you add this rule in manually in the Tools, GhostDoc, Configure GhostDoc options, then you can fix this to be a little more grammatically correct.

(P.S. Back in the day John Rayner started GhostDoc top 10, to name and shame places in the code where people had clearly relied on automatic documentation, and this one I think used to come with in the top 3 most of the time).

8clip_image001

Thursday 17 November 2011

How to route network traffic with two or more network adapters

Use route /? from a command line to discover the answer...

  1. Get the destination ip address from comparing the tcp receive port number from a PROCMON filter on operation begins with TCP, and the name of the process that you're running e.g. chrome.exe
  2. netstat -n | findstr /i "port number here" - this will give you the destination ip address
  3. route print - to get the interface card number
  4. route add destination.ip.address.here MASK 255.255.255.255 default.gateway.ip.here IF interfacecardnumber

e.g.

> route ADD 157.0.0.0 MASK 255.0.0.0  157.55.80.1 METRIC 3 IF 2
         destination^      ^mask      ^gateway     metric^    ^
                                                     Interface^
  If IF is not given, it tries to find the best interface for a given
  gateway.

Your computer might already be using both connections. It really depends on the topology of the networks, and where the various services lie.
If you are on windows and go to the command line and run "route print" you'll see a table that the operating system uses to decide which interface to send packets out on to a given destination IP address.

If you run "netstat -n" it will show open TCP connections on your computer. The left hand column will show the local IP addressed being used. If you see more than one local address used (besides 127.0.0.1) then your computer is probably already using both connections.
There are similar commands on the Mac, but I'm not sure what they are.

What you'd do, I think, is figure out the outbound IP addresses that matter to you what subnet they're routed through. Route those that way and have the default routing set the other way. Obviously you can route ranges of IP addresses. Whichever is easiest to specify is what you'll specify.

Wednesday 16 November 2011

How to change your MS Exchange password for Android 2.3 (Gingerbread)

Struggled to find this setting today after changing my corporate password, actually ended up finding it here..

Settings, Accounts and Sync, (Select your account from manage accounts section), Account Settings, Incoming Settings (from the Server settings section).

Tuesday 15 November 2011

Create auto playlists in Windows Media Player

Was looking the other day to find a way to automatically have a play list for recently added tracks to my library in windows media player. Finally discovered this handy little feature that works very much in the same way that outlook rules work in terms of the user interface, for generating dynamic play lists that update every time you open windows media player

image

image

Fixing a corrupt Windows Media Player library

Just followed the steps here to fix up my windows media player library, as it wasn't letting me create auto play lists today.

http://www.hack7mc.com/2009/02/fix-corrupt-windows-media-player.html

Have included the steps below in case the above web site stops running...

Sometimes a Windows Media Player database can become corrupt for any number of reasons. This will obviously also effect Media Center since it runs off the same database for videos and music. Luckily fixing the problem isn’t too difficult.

WMP Library Delete

First thing that needs to be done is to stop the Windows Media Player Network Sharing Service. This service controls media sharing over your network but it also locks the database file so it can’t be deleted by the user. To stop this service enter task manager (crtl+alt+del) and select the services tab. Find “WMPNetworkSvc” in the list then right-click and select “Stop Service”. If you receive a denied error you can also stop the service from the “Services” button at the bottom.

WMP Network Sharing Service

Once the service has been stopped open Windows Explorer and go to “\Users\YOUR USERNAME\AppData\Local\Microsoft\Media Player”. It may be hidden so you won’t be able to see it but you can type it into the address bar to access the location. Alternatively, you can also enable hidden folders to be shown on your pc by going to Control Panel > Folder Options and enabling showing hidden folders.

Show Hidden Folders

Once you’re in the folder, locate the “CurrentDatabase_371.wmdb” file and delete it. If you receive a permission denied error the “WMPNetworksvc” may not have been stopped or you may need to restart your machine and start again.

Once the wmdb file has been deleted, restart Windows Media Player and the database should begin to repopulate. It may take some time to complete depending on the number of files. That should be all there is to fixing your corrupt Windows Media Player database.

Thursday 10 November 2011

Javascript tutorial

Excellent online javascript tutorial written as a presentation / wizard format in javascript. (Nice)

http://ejohn.org/apps/learn/

Wednesday 9 November 2011

The case of the shrinking Tesco's product

One on the left is from last week, and this week hey presto 5cm off the diameter, but same barcode, and same price!!! Shocking stuff.

image

Price last week = £1.35

image

Price this week = £1.35

image

and yet you receive less product, and also smaller packaging as well, which I'm sure saves Tesco a bit of money on top!

_____

Had a reply from Tesco today about this...

From: customer.service@tesco.co.uk
Sent: 12 November 2011 15:00
Subject: TES651915NI: Re your recent enquiry

Dear Merrick
Thank you for your recent email.
Having investigated this matter I can confirm that the size of the tortillas has been decreased to meet the Light Choices criteria (calories and points). We were due to increase the price of this product as the cost in production has increased, however as the product was due to be reduced in size, we have left the price at the same amount.
Hopefully this has sufficiently answered your query, but if you do have any further comments then please don't hesitate to contact me.
Kind Regards
Sian Hackwood
Tesco Customer Service

clip_image001

How to find the last interactive logons in Windows using PowerShell

Use the following powershell script to find the last users to login to a box since a given date, in this case the 21st April 2022 at 12pm un...