CategoryDevelopment

Facebook Usernames

F

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

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

H

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 “News Feed and Wall” 3) On the News Feed and...

C# WordPress Wrapper

C

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 Joe Blogs is currently hosted on CodePlex – I’ll be posting more info, tutorials, documentation...

TinyURL API

T

The popular url shortening service, TinyUrl has an API.
This is probably the most simple API I’ve come across:

(obviously, you can replace with any URL)

String.EndsWithAny and StartsWithAny Extension Method

S

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 clunky if I want to use it in various places in my application. For this reason, I...

Base checksum mismatch – A solution for TortoiseSVN users.

B

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 error) Check in everything except the files that are causing the issue. Take a fresh checkout to a...

Copying tables across databases with SQL Server

C

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 to move this into...

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

W

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 what to do – It turns out, that my application was trying to use port 87 on...

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

F

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 didn’t come with any form of web mail client. Some emailing...

Currency Display In C#

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 this, would display just that – the decimal, as a string. But what if you want to display a price...

Session_Start event not firing

S

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 was not hit… What I would of...

Using Microsoft OneNote Across Multiple PC’s using Amazon S3

U

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 at work. I needed a way to share my notebooks across the internet...

Trimming in SQL Server

T

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: SELECT RTRIM(ColumnName) FROM TableNames SQL Server 2005 has both a RTRIM and a LTRIM function...