Categories
annoyances programming

Char Array to String in VB.NET 2.0

You will be surprised, but the obvious

Dim arrChars(10) As Char
Dim strString As String
strString = "ABCDEFGHIK"
arrChars = strString.ToCharArray
strString = arrChars.ToString

Will not yield the same string as there was before. It will, rather, return “Char[]” response. To get your string back from Char Array (at least in VB.NET 2.0) you will need to call CStr on array:

Dim arrChars(10) As Char
Dim strString As String
strString = "ABCDEFGHIK"
arrChars = strString.ToCharArray
strString = Cstr(arrChars)

Funny, isn’t it? And totally counter-intuitive 🙂

Categories
blog

Hacking WordPress theme – external URL for post title

Sometimes something weird happens – I demand something that isn’t available. With software it’s easy (that’s how I got into computers), you dig in the code and you tweak and hack around until it does what you want.

When I just started this blog on Blogger quite a while ago, there was this feature that allowed to set up a link for your title – in case if you don’t want the title of the post to link to external resource. Why would you do it – whole another story, but it was just possible. With WordPress, even matured to version 2.3, it is still not.

I have decided to dig in and figure out how to do it with as least effort as possible. I have no idea how to build a WordPress plugin yet and I didn’t really have time to figure that out. So I decided to go hacking. Through various resources on the web I figured what needed to be hacked and how. Initial idea was to leave core files untouched and hack the theme only, so any time you upgrade your WordPress installation the feature remained untouched.

The only two places you will need to touch are functions.php and main index file of your template. This is such an easy process that almost any can do it in under 15 minutes.

Categories
microsoft

Life gets a little better…

As it turns out, with the MSDN subscription one of our clients has, we get Visual Studio 2008 Professional Edition. They aren’t going to use it on a current project (unfortunaltely), but we get to play with it and see what’s new. Of course, the main beauties are LINQ and .NET 3.5