Category: Development

  • Facebook Usernames

    In the last couple of weeks, Facebook has finally started supporting usernames… So instead of giving people long urls, with your user id (a long number) you will now be able to give: www.facebook.com/alexjamesbrown (like the way MySpace did it from the outset) To get yours, go to: www.facebook.com/username

    Continue reading

  • How to stop your new Facebook friend additions being posted to your wall

    By default, when you accept a friend request, or someone accepts your friend request, a “story” is published to your wall. To stop this, you can edit your privacy settings. 1) First, hover over settings, in the top right menu (next to the search box) Click “Privacy Settings” 2) On the Privacy Settings page, click…

    Continue reading

  • C# WordPress Wrapper

    Ok, I’ve barely finished this as a stable release, but I thought I’d post this up any way…. A little open source project I’m working on – Joe Blogs. In a nutshell, it allows easy communication to your WordPress (or other blog) via an xml-rpc interface. Big thanks to the work by Charles Cook at…

    Continue reading

  • TinyURL API

    The popular url shortening service, TinyUrl has an API. This is probably the most simple API I’ve come across: http://tinyurl.com/api-create.php?url=http://www.alexjamesbrown.com (obviously, you can replace http://www.alexjamesbrown.com with any URL)

    Continue reading

  • String.EndsWithAny and StartsWithAny Extension Method

    It frustrated me that while String provides the StartsWith and EndWith method, it doesn’t provide an EndWithAny. So, if I wanted to see if a particular string started or ended with any specified string, I would have to create my own method to return a true or false. Whilst this is fine, it’s a little…

    Continue reading

  • Base checksum mismatch – A solution for TortoiseSVN users.

    I recently had the misfortune to get a Base Checksum Mismatch error, when I tried to check in files to my repository. The problem occurs when the files svn data has become corrupted. There are many solutions to this problem, but here’s how I solved it simply (I only had 2 files that had this…

    Continue reading

  • Copying tables across databases with SQL Server

    So, you’ve got a requirement to move or copy a table from one database to the other? Including data? Use SELECT INTO. For example, we have a database called “MyDatabase” We also have another database – “MyNewDatabase” MyDatabase contains the table “Customers” – with a bunch of data that we want to preserve. You need…

    Continue reading

  • Windows Azure – Firefox & “Port Restricted for Security Reasons”

    I’ve been starting to delve into the world of Windows Azure this week. After getting the Azure Samples loaded, I tried running one of them (just by hitting F5 in VS) and, as Firefox is my default browser, got a “Port Restricted For Security Reasons” error. Of course, it worked fine in IE Here is…

    Continue reading

  • Fix for Mail Enable – %1 is not a valid Win32 application.

    As mentioned in a previous post, I am in the middle of changing my hosting, from a reseller account, to my own VPS. After working closely with eHosting support, I’ve managed to beat into submission the large majority of the features required. One thing however, was the installation of MailEnable Standard (the free one) It…

    Continue reading

  • Currency Display In C#

    In classic ASP we had FormatCurrency to take a value (number) and display it as a formatted currency. In C#, how do we achieve the same? To map a SQL 205 Money datatype to a C# class property, I use Decimal Data Type – which gives you the precision you need. A simple .ToString() on…

    Continue reading

  • Session_Start event not firing

    I’ve been scratching my head about this one for sometime… As I’m sure your aware (or you wouldn’t be reading this) in the Global.asax file, we have the following method: protected void Session_Start(object sender, EventArgs e) { } Placing a breakpoint on this method, I attached the debugger, ran up my application, and the breakpoint…

    Continue reading

  • Using Microsoft OneNote Across Multiple PC’s using Amazon S3

    Technorati Tags: OneNote,Amazon S3,Microsoft Office,Cloud I love Microsoft OneNote, and use it on a daily basis to record any ideas I have, things I find on the Internet etc… The issue is, that, whilst using it at home is great, I sometimes also have "brain waves" when I’m out and about on my laptop, or…

    Continue reading

  • Trimming in SQL Server

    If you have imported a large amount of data, or had some rogue users, helpfully putting a space at the beginning and / or end of a string, then this simple update will clear that out: UPDATE TableName SET ColumnName = RTRIM(ColumnName) Of course, if you only want to select the data, you could also:…

    Continue reading