AuthorAlex

C# Ternary conditional operator – Question mark in an if statement

C

I’m all for shortening the amount of code we write, if it makes it more readable. One enhancement I make use of in C# is the ternary conditional operator. Consider the following block of code: string input = "hi"; bool saidHello; if (input = "hello") { saidHello = true; } else { saidHello = false; } In this example, we can see, the saidHello boolean value would be false,  as the input string...

Fitting a backlit keyboard to a Dell E6400

F

Both of the Dell E6400 laptops I’ve owned came without the backlit keyboard (first one was stolen in Ibiza) So, both times, I have retro-fitted a backlit keyboard. The process is simple, and I’ll show you how below. They don’t need any drivers – they light up when you press a key, and dim to save battery after a minute or so. Dell provides a Service Manual, with good instructions on doing this...

Problem with Firefox 3.5.2 and Facebook

P

After upgrading to Firefox 3.5.2, I’ve been having trouble with Facebook – certain pages would take ages to load (if load at all) The photos page was a particular problem. At first, I thought the problem could of been with Facebook – some of their AJAX user interface getting carried away or something, however I narrowed down the problem to Firefox by trying the site in IE. I did some Googling...

Eco-Disc Stuck In Slot Loading Drive

E

AVG kindly provided us with an Eco-Disc of their software – so we began installing it on one of our Dell XPS laptops – with a slot loading drive. Everything worked fine, until it came to eject it – or at least try to! Because the CD’s are so thin, there isn’t enough thickness for the rollers to push it out of the drive. After a bit of Googling, it seems we are not alone – Macs are having the same...

JoeBlogs – Typo in dummy URL fixed

J

I’ve recently had a few comments that the JoeBlogs wrapper wasn’t working – and they were getting an “invalid response” or more specifically “Response XML not valid XML-RPC – missing methodResponse element.” It seems that I had a typo in my comments in JoeBlogs.TestHarness/Program.cs on line 15: //typically (if your wordpress blog is installed in root dir) The problem, is the xmlprc.php – this...

Yahoo Term Extractor API Discontinued

Y

A couple of days ago Yahoo announced two of its search services will be discontinued on August 31st 2009. Annoyingly, one of those is the Term Extraction API Which means my Windows Live Writer Auto Tag Generator plug-in will simply cease to work. Important Announcement: The Term Extraction Web Search service will be discontinued on August 31, 2 So, what can you do. Well, according to a few posts...

Fake Ed Hardy Belt On Ebay

F

I’m a recent fan of Ed Hardy “stuff” T-shirts, and belts mainly. As with every latest trend, these are obviously available on eBay, however a lot of items offered here are fake. I generally try to be careful when purchasing clothing on eBay. For example, I’ll always email the seller for verification that the item is genuine. I wanted an Ed Hardy belt. Apart from www.edhardyshop.com, there...

Reverse GeoCoding with Google API and C#

R

I needed to write a function to get a set of co-ordinates from an address, supplied as a string. Using the Google API, I came up with this: First, I created a struct, to represent the lat and lon co-ordinates: public struct Coordinate { private double _latitude; private double _longitude; public Coordinate(double latitude, double longitude) { _latitude = latitude; _longitude = longitude; } public...

NTLM / Windows Authentication with Firefox

N

Firefox, my browser of choice, doesn’t support NTLM “out of the box” What that means is, if you visit a site on your domain (for example ) that you should have access to, you’re presented with a username and password box. Visit the same site in IE, and it lets you straight through, based on your credentials. What you need to do, is explicitly set the allowed URIs that Firefox is allowed to pass...

Fake Lottery – Game Corner International

F

I received another fake lottery thing today, this time from Deborah Shiemke – dispatch@mailonetoday.co.cc Here’s the body of the email We congratulate you this day as you have emerged a winner in the Game Corner International Lottery Organization. See attachment for claims procedure. Thank you...

Could not load file or assembly ‘ChilkatDotNet2’ or one of its dependencies. An attempt was made to load a program with an incorrect format.

C

Whilst setting up an application to run on my local machine (running Vista 64bit) I encountered this error: Could not load file or assembly ‘ChilkatDotNet2’ or one of its dependencies. An attempt was made to load a program with an incorrect format.   Obviously, the application uses ChilKat components, but it would seem that the version we are using, is only the 32bit version. To...

Globai Gathering – Wristband Error?

G

I went to Global Gathering (24th & 25th July 2009)
Upon collecting my wristband, I noticed an error – instead of being printed with Global Gathering (as it has in previous years) it said Globai Gathering!
A deliberate error? To aid in spotting fakes?? Or a clumsy mis-print?

Removing a previous version of Windows

R

If you have installed a newer version of Windows Vista (for example 64 bit instead of 32 bit), and didn’t format your HD first (like I just did) it simply installs the new version, over the top of the old version. The old version will continue to take up space (around 4gb in my case) while go unused. If you want to remove it, follow these steps: Click Start. Type “Disk” Select Disk Cleanup In the...

Windows 7 – Sticky Notes

W

This is a sticky note!
 
This is something I will use all the time!
Windows 7 has a feature called “Sticky Notes” – basically, these little notes are like post it notes – they stick to your desktop!
You can change the colour, resize, move them around etc… So simple, yet so useful!

How to get Messenger to run in the TaskBar in Windows 7

H

After installing the Windows 7 RC, I installed the latest Windows Live Messenger. After using it, it appears that it does not run in the task bar, as it used to in Vista! This is pretty annoying, as I only keep it open to use now and again. There is a way around this however… you need to set it to run in Compatibility Mode for Windows Vista. To do this, first exit Messenger, then locate msnmsgr...

Windows Azure Pricing Announced

W

Microsoft has finally released their pricing model for the forthcoming Windows Azure Windows Azure: Compute = $0.12 / hour Storage = $0.15 / GB stored / month Storage Transactions = $0.01 / 10K Bandwidth = $0.10 in / $0.15 out / GB SQL Azure: Web Edition – Up to 1 GB relational database = $9.99 Business Edition – Up to 10 GB relational database = $99.99 Bandwidth = $0.10 in / $0.15 out / GB .Net...

Using JoeBlogs -metaWeblog API Wrapper

U

Step 1 Download the latest release of JoeBlogs from Codeplex (Click the Downloads tab, and select the latest download) Step 2 Unzip the contents of the downloaded zip file. (I usually copy DLLs I am going to use into a “lib” folder at the root of my solution) Step 3 Add a reference to BOTH CookComputing.XmlRpcV2.dll AND JoeBlogs.dll Include AlexJamesBrown.JoeBlogs in your class, with using /...

Why Are Interfaces Useful?

W

Interfaces, usually prefixed by “I” are useful in software engineering, for a number of reasons. Primarily, they allow you to create “pluggable” code. By this, I mean that your code is easier to manage, easier to maintain, easier to change the way certain parts of your application work, without changing the entire way it works. Lets look at an example. Our application is an photo sharing web...

Specify XML-RPC Endpoints at Run Time With CookComputing XMLRPC.net

S

A common question when using Cook Computing XML RPC.net to talk to blogs etc… is how to specify a blog / endpoint at runtime? Most of the examples seem to specify the details in an attribute… not much use if you’re trying to develop a wrapper. To enable me to create JoeBlogs, I made use of the IXmlRpcProxy Proxy classes… I created my interface, implementing IXmlRpcProxy: We define the method as...

Auto Tag Generator Plug-In for Windows Live Writer

A

Auto Tag Generator is a plug in for Windows Live Writer that enables tags to be generated from a block of text (or the whole of the post) Download: Project can be downloaded from Codeplex here Usage: To generate tags, simply highlight all of the text (or a relevant section) and press “Inert Auto Generated Tags” in the Insert menu on the right hand side.The tags are then displayed in a...

Missing Files from DotNetNuke 4.9.4 Starter Kit causing error

M

I downloaded the latest release of the Dot Net Nuke Starter Kit (Version 4.9.4  released on 23rd June 2009) I followed the instructions to install the Visual Studio templates etc… as found here They are a little outdated, but the same process still applies. Upon installing it, loading a new website, I selected the DotNetNuke Web Application Framework (pictured below) The template began...

Location of Visual Studio Templates Directory

L

The location of the Visual Studio Templates Directory (when installed on Vista) is as follows:
C:\Users\<user>\Documents\Visual Studio <version>\Templates
Replace <user> with your username <version> with the version of VS (in my case its 2008) so my path is:
C:\Users\ABrown\Documents\Visual Studio 2008\Templates