RATM vs JoeMcXFactor

Do we really care who wins the #1 spot this year? … No not really but at least this year its a bit more exciting than last year. The campaign to get Rage Against The Machine to #1 has gone a little bit insane, perhaps a little too insane, but on the plus side they are raising a shed load of money for Shelter (excuse the pun). So far they’ve raised £38,525. A tidy sum, so at the very least some people who wouldn’t otherwise of had a good Christmas now will.

I do feel a little sorry for Joe, who has done nothing to deserve this and is actually quite talented. I can’t believe I have just said that, quick soap in mouth, pah. With normality restored I do think the powers that be chose the wrong song for him though, far too wishy washy and didn’t show off his ability (In my very non expert opinion). Come on, a Miley Cyrus song? … who is she anyway! … I’m clearly not very in tune with popular culture.

As I am a self proclaimed music snob I am of course fully supporting RATM, not because its the best song in the world, its not. More because Christmas number 1’s are nearly always rubbish, and I include every X-Factor song in that along with Mr Blobby and god knows what else. But I refuse to buy anymore copies, two is enough for any man and to counter all bad said of X-Factor it does discover some very talented people and is watched/loved/liked by the gazillion. Just more guitars next year would be nice.

Too many pizza’s…

An email I sent yesterday to Tesco customer service department:
Hello,
I bought a couple of pizzas on your 2 for 4 quid deal. Both were supposed to be Ham & Pineapple. One of them was, I ate that yesterday. I came to eat the second one today (yes two pizza’s in two days isn’t the healthiest [...]

Stealing food

Radio Players - Ajax - Flash and all that jazz

Have been playing around with getting mp3 streams to play in flash. It turns out icecast streams are very easy to play but shoutcast ones aren’t so obviously easy, but when you know how they are. It turned out that simply appending ‘;stream.nsv&type=mp3′ to the end a shoutcast url would make it playable. Quite why [...]

The Weekend, planning is always unadvisable.

As always, planned things never go to plan. It’s a rule that I now have come to accept, it doesn’t apply to everyone, but certainly does to me. So Saturday morning my sister and I were due to get up reasonably early and head off to Farnham to visit our Grandad who had just got [...]

Make the Pogues #1 this Christmas

I was watching the news this morning and this bloke from HMV came on to give his view on who was going to be number one at Christmas. Now aparently for the last few years since its evil inception the X-Factor singles have on average got sales in the region of 100’s of thousands over [...]

Creating threads

June 18th, 2009

I struggled with this concept for a while so thought I would write a little post about it.

Is it possible to create a multi-threaded application in Visual C++ Express, which lacks ATL and MFC library support.

The answer is yes, you use the CreateThread API call and here’s how:

Make sure these headers are included:


#include <windows.h>
#include <stdio.h>

Now create your thread function, this function is what gets executed by the CreateThread API call. In my example I want to pass an object to the thread and then do something with it. In my case I am invoking my objects load function.

DWORD WINAPI LoadObject(LPVOID lpParameter)
{
MyObjectType* f;
f = (MyObjectType *) lpParameter;
f->load();
return 0;
}

Now we’re ready to create our thread from within our main code…


DWORD dwThreadId;

HANDLE hThread = CreateThread(
NULL, // pointer to security attributes
0, // initial thread stack size
LoadObject, // pointer to thread function
(LPVOID)&f, // argument for new thread
0, // creation flags (immediate)
&dwThreadId // pointer to receive thread ID
);

if (NULL == hThread) {
// error reporting here
exit(1);
}

// for example purposes, wait for the thread to complete and each second until it does print a '.' to the console.

while(TRUE) {
if (WaitForSingleObject(hThread, 1000)==WAIT_OBJECT_0) break;
printf(".");
}

// You then need to close your handle to the thread with

CloseHandle(hThread);

// That's it, obviously a very simple example and you will want to be creating multiple threads simultaniously etc.

viagra cheap less
Discount Viagra
taking viagra woman