gabehabe Cool blog, bro.

31Oct/093

wxWidgets: Threading, and using the Clipboard

wxWidgets: Threading, and using the Clipboard

Two for one in this tutorial. We're going to create a thread using wxWidgets, and make it monitor the clipboard for text. Then, if we detect a change, we're going to add the new contents to a list. It's a relatively simple process, but unfortunately wxWidgets isn't the most documented GUI toolkit out there. So, let's get started. I'm gonna pile all the code into a single file instead of breaking my classes up into seperate files, just for ease of navigation in this tutorial. The code is relatively short anyway, with only 62 lines. First off, as with any other program, we're going to want to get our includes done. We'll be needing three: The standard wx header, the clipboard header, and the thread header.
#include <wx/wx.h> // standard wx header
#include <wx/clipbrd.h> // clipboard - we'll monitor the clipboard for text
#include <wx/thread.h> // include threads!
The next thing we need to do is declare our ClipLogger class - this will inherit wxThread, and have two variables: One to hold the most recent text that we got from the clipboard, and one which is a pointer to a wxListBox object -- the object on the main window which we'll be updating.
class ClipLogger : public wxThread {
    public:
        ClipLogger(wxListBox*);
    private:
        void* Entry(); // the entry point to the thread
 
        wxString LatestText; // store the last text so we can check for changes
        wxListBox* list; // the list to update on a text change
};
The constructor is very simple. All it does is take a wxListBox*, and assign it to a variable stored by the class - this is the list that we want to update on clipboard text changes.
ClipLogger::ClipLogger(wxListBox* l) {
    this->list = l;
}
Next up is the main part of this tutorial. When we create a thread, we need to override the Entry() method of the class, like so:
void* ClipLogger::Entry() {
To save time and memory, rather than creating a variable every time we loop, we'll create it before and simply overwrite it inside the loop.
wxTextDataObject temp;
wxTextDataObject is the type of object that the clipboard will store. Next, since our thread is a constant "monitor" for the clipboard, we want it to loop.
while (true) {
Then, we need to think about how we can help our application not be CPU-hungry. The simple solution is to make the thread sleep each time it loops. We can do this with wxSleep(int time), where time is the length of time to sleep in seconds.
wxSleep(1);
The rest of the loop is the clipboard. It's very simple, so rather than break it up line-by-line, I've added comments along the way. We basically need to do the following: - Open the clipboard - If the clipboard is text, get it into our temp variable - Update the list and remember this is the most recent (so as not to constantly add the same data to the list) - Close the clipboard
        if (wxTheClipboard->Open()) { // try to open the clipboard
            if (wxTheClipboard->IsSupported(wxDF_TEXT)) { // if the clipboard contains text
                wxTheClipboard->GetData(temp); // get the data from the clipboard
                if (this->LatestText != temp.GetText()) { // if it's changed, we want to update
                    if (temp.GetText() != wxT("")) { // if it's not an empty string
                        this->LatestText = temp.GetText();  // update the "LatestText"
                        this->list->Append(temp.GetText()); // append to the list
                    }
                }
            }
        }
        wxTheClipboard->Close(); // close the clipboard
The last thing left to do in the thread is simply close it off, and close off the loop.
    }
}
Simple, huh? :) And that's our thread defined. Now all we need to do is create the app itself, which is a simple process. I hope that you already know how to do it, so we can blitz through the majority of it. Create the app:
class threaded_app : public wxApp {
    public:
        bool OnInit(void);
};
The beginning of the OnInit() should be nothing new at this point either.
bool threaded_app::OnInit(void) {
    // quickly create a wxFrame to display a window
    wxFrame* f = new wxFrame(NULL, wxID_ANY, wxT("Threaded App!"));
 
    // add a list to the frame we created
    wxListBox* list = new wxListBox(f, wxID_ANY);
 
    // display the frame
    f->Show(true);
The last part of OnInit() that we need to do is actually create an instance of our thread and run it, like so:
    // pass the list to the clipboard monitor so it knows what to update
    ClipLogger* cl = new ClipLogger(list); // construct our thread
    cl->Create(); // we have to create a thread before we can run it
    cl->Run(); // run our thread
And we can simply finish off the OnInit() and IMPLEMENT_APP:
    return true;
}
 
IMPLEMENT_APP(threaded_app)
And that's all there is to threading and using the clipboard in wxWidgets! Here's the complete code:
#include <wx/wx.h> // standard wx header
#include <wx/clipbrd.h> // clipboard - we'll monitor the clipboard for text
#include <wx/thread.h> // include threads!
 
class ClipLogger : public wxThread {
    public:
        ClipLogger(wxListBox*);
    private:
        void* Entry(); // the entry point to the thread
 
        wxString LatestText; // store the last text so we can check for changes
        wxListBox* list; // the list to update on a text change
};
 
ClipLogger::ClipLogger(wxListBox* l) {
    this->list = l;
}
 
void* ClipLogger::Entry() {
    wxTextDataObject temp; // create a "wxTextDataObject" to get the info from the clipboard
    while (true) { // our thread will loop
        wxSleep(1); // sleep for 1 second, make the thread less cpu-hungry
        if (wxTheClipboard->Open()) { // try to open the clipboard
            if (wxTheClipboard->IsSupported(wxDF_TEXT)) { // if the clipboard contains text
                wxTheClipboard->GetData(temp); // get the data from the clipboard
                if (this->LatestText != temp.GetText()) { // if it's changed, we want to update
                    if (temp.GetText() != wxT("")) { // if it's not an empty string
                        this->LatestText = temp.GetText();  // update the "LatestText"
                        this->list->Append(temp.GetText()); // append to the list
                    }
                }
            }
        }
        wxTheClipboard->Close(); // close the clipboard
    }
}
 
class threaded_app : public wxApp {
    public:
        bool OnInit(void);
};
 
bool threaded_app::OnInit(void) {
    // quickly create a wxFrame to display a window
    wxFrame* f = new wxFrame(NULL, wxID_ANY, wxT("Threaded App!"));
 
    // add a list to the frame we created
    wxListBox* list = new wxListBox(f, wxID_ANY);
 
    // display the frame
    f->Show(true);
 
    // pass the list to the clipboard monitor so it knows what to update
    ClipLogger* cl = new ClipLogger(list); // construct our thread
    cl->Create(); // we have to create a thread before we can run it
    cl->Run(); // run our thread
 
    return true;
}
 
IMPLEMENT_APP(threaded_app)
Happy coding! :)
30Oct/091

Google Chrome – Unknown Plugin: lolwut?

I certainly less than three google chrome, and today it proved just how great it is – even though it doesn’t know which plugin is unresponsive, it knows which one to kill!

chrome kill unknown plugin

30Oct/090

Arnold Schwarzenegger WIN!

I lol’d.

Arnold Schwazenegger "Fuck You"

To the Members of the California State Assembly:

I am returning Assembly Bill 1176 without my signature.

For some time now I have lamented the fact that major issues are overlooked while many
unnecessary bills come to me for consideration. Water reform, prison reform, and health
care are major issues my Administration has brought to the table, but the Legislature just
kicks the can down the alley.

Yet another legislative year has come and gone without the major reforms Californians
overwhelmingly deserve. In light of this, and after careful consideration, I believe it is
unnecessary to sign this measure at this time.

Sincerely,
Arnold Schwarzenegger

(Via TechCrunch)

Filed under: General No Comments
26Oct/0943

Post a comment – Win a Google Wave invite!

Google Wave is awesome. And as of today, I have some invites to dish out. So here’s a contest to win one.

Simple stuff really. Just post a comment. It asks for your email address, enter the email address you want the invite to go to. Subscribe to this post, and I’ll announce the winners in a comment on Friday 13th November, 2009.

One entry per email address. 3 up for grabs. Get commenting. :)

24Oct/090

Uncharted 2: Pure awesome.

Since this is more a tech blog than a game blog, I’m not going to go really in-depth about the game. If you want loads of in-depth and galleries, check out joystiq, a great blog dedicated to gaming.

What I will say, is that this game is insanely good. I’d even go so far as to say it was better than the first, something rarely achieved by a sequel, especially a sequel to something so awesome as Uncharted.

The game overall is actually fairly short. I managed to complete the game in around 6-7 hours gameplay. Though it has a great replay factor, and I barely found any of the 100 hidden treasures. :(

The scenery in-game really makes up for the short gameplay, there really are some breathtaking visuals.

I think the thing that makes Uncharted 2 so good is the fact that it’s much more real than other games. Characters tend to react how you’d expect them to react to demon sasquatches coming charging at them, as opposed to running in, guns blazing.

And yes, Nate even seems to find the time to draw a picture of them and explain that they’re scarier than Sully’s moustache and a slippery naked guy in his notebook.

22Oct/091

Monarch Recruitment: lolwut?

Got an email from Monarch Recruitment today, epic fail from a guy named Luke Osborne. (Yes, I’m hoping to get his name tied to the word “fail” in google)

First up, a bit of background:
About a year ago, I was looking for a job in IT. I tried everything, even putting my CV on some recruitment sites: bad idea.

I received a hell of a lot of spam, and have been added to agency spammailing lists. But generally, they will send them out to just one person at a time.

Not Monarch. They’ve outdone themselves as a fail agency this time.

Received an email which was addressed to 810 people. I’d also like to point out that I don’t recall getting my name changed to FIRST_NAME by Deed Poll.

This’ll do a damage to the vscroll on this site for a while, but it’s so worth it.

All email addresses have been changed to x@domain.com for privacy. (regex ftw!)

Original email:

x@gmail.com
Received: by 10.216.59.212 with SMTP id s62cs200799wec;
Thu, 22 Oct 2009 10:14:34 -0700 (PDT)
Received: by 10.210.7.23 with SMTP id 23mr10862003ebg.27.1256231673349;
Thu, 22 Oct 2009 10:14:33 -0700 (PDT)
x@monarchrecruitment.co.uk>
Received: from service37.mimecast.com (service37.mimecast.com [213.235.63.87])
by mx.google.com with SMTP id 28si6642383ewy.88.2009.10.22.10.14.32;
Thu, 22 Oct 2009 10:14:33 -0700 (PDT)
x@monarchrecruitment.co.uk) client-ip=213.235.63.87;
x@monarchrecruitment.co.uk
Received: from bhammail-srv01.monarch.local (78-33-40-66.static.enta.net [78.33.40.66])
by service37.mimecast.com;
Thu, 22 Oct 2009 18:14:21 +0100
X-MimeOLE: Produced By Microsoft Exchange V6.5
Content-class: urn:content-classes:message
MIME-Version: 1.0
Subject: Senior .Net developer role
Date: Thu, 22 Oct 2009 18:13:34 +0100
x@bhammail-srv01.monarch.local>
X-MS-Has-Attach:
X-MS-TNEF-Correlator:
Thread-Topic: Senior .Net developer role
thread-index: AcpTOv9pBHq7tlj0SgOJGBOSWSvH+A==
x@monarchrecruitment.co.uk>
x@BTInternet.com>,
<x@igsoftwaresolutions.co.uk>,
<x@militantsouth.com>,
<x@btinternet.com>,
<x@blueyonder.co.uk>,
<x@hotmail.com>,
<x@MSN.COM>,
<x@computerscienceltd.co.uk>,
<x@hotmail.com>,
<x@hotmail.com>,
<x@fastmail.fm>,
<x@hotmail.com>,
<x@yahoo.com>,
<x@hotmail.com>,
<x@gmail.com>,
<x@GoogleMail.com>,
<x@gmail.com>,
<x@dacservices.co.uk>,
<x@btinternet.com>,
<x@yahoo.com>,
<x@procensol.co.uk>,
<x@gmail.com>,
<x@yahoo.co.uk>,
<x@gmail.com>,
<x@yahoo.co.in>,
<x@blueyonder.co.uk>,
<x@ICTConsultant.co.uk>,
<x@yahoo.co.in>,
<x@hotmail.com>,
<x@jdw-techmanagement.co.uk>,
<x@softchrome.co.uk>,
<x@yahoo.com>,
<x@hotmail.co.uk>,
<x@btinternet.com>,
<x@blueyonder.co.uk>,
<x@swproj.com>,
<x@hotmail.com>,
<x@tiscali.co.uk>,
<x@hotmail.com>,
<x@gmail.com>,
<x@yahoo.co.uk>,
<x@hotmail.com>,
<x@hotmail.com>,
<x@swproj.com>,
<x@symtex.co.uk>,
<x@calidra.co.uk>,
<x@gmail.com>,
<x@freenet.co.uk>,
<x@gmail.com>,
<x@yahoo.co.uk>,
<x@hotmail.com>,
<x@hotmail.com>,
<x@gmail.com>,
<x@yahoo.com>,
<x@gmail.com>,
<x@hotmail.co.uk>,
<x@gayeshan.com>,
<x@gmail.com>,
<x@yahoo.com>,
<x@kitcat.f9.co.uk>,
<x@qpltd.com>,
<x@oomagic.com>,
<x@frequency7.co.uk>,
<x@hotmail.com>,
<x@sendo.co.uk>,
<x@btinternet.com>,
<x@blueyonder.co.uk>,
<x@btinternet.com>,
<x@hotmail.com>,
<x@stuartmassey.com>,
<x@tinyworld.co.uk>,
<x@authorsoftware.com>,
<x@hotmail.com>,
<x@btinternet.com>,
<x@vaudin.net>,
<x@mwbcomputing.co.uk>,
<x@yahoo.com>,
<x@blueyonder.co.uk>,
<x@cometx.com>,
<x@hotmail.com>,
<x@hotmail.com>,
<x@gavinsullivan.net>,
<x@vaudin.net>,
<x@gmail.com>,
<x@radas.co.uk>,
<x@yahoo.com>,
<x@bulldoghome.com>,
<x@gmail.com>,
<x@gmail.com>,
<x@hotmail.co.uk>,
<x@gmail.com>,
<x@yahoo.com>,
<x@hotmail.com>,
<x@mvps.org>,
<x@infotech.com.pk>,
<x@twoswans.f9.co.uk>,
<x@bcs.org>,
<x@yahoo.co.uk>,
<x@pwcsoftware.com>,
<x@retcorp.net>,
<x@yahoo.co.uk>,
<x@hotmail.com>,
<x@hotmail.com>,
<x@xansa.com>,
<x@hotmail.com>,
<x@gmail.com>,
<x@gmail.com>,
<x@gmail.com>,
<x@gmail.com>,
<x@gmail.com>,
<x@gmail.com>,
<x@yahoo.com>,
<x@btinternet.com>,
<x@yahoo.co.uk>,
<x@hotmail.co.uk>,
<x@gmail.com>,
<x@yahoo.com>,
<x@hotmail.com>,
<x@hotmail.co.uk>,
<x@hotmail.com>,
<x@sitescraper.co.uk>,
<x@USA.NET>,
<x@googlemail.com>,
<x@hotmail.com>,
<x@gmail.com>,
<x@wendtel.co.uk>,
<x@hotmail.co.uk>,
<x@jethwas.com>,
<x@live.co.uk>,
<x@btinternet.com>,
<x@yahoo.com>,
<x@gmail.com>,
<x@toucansurf.com>,
<x@blueyonder.co.uk>,
<x@blueyonder.co.uk>,
<x@hotmail.com>,
<x@aol.com>,
<x@yahoo.co.uk>,
<x@yahoo.co.uk>,
<x@virgin.net>,
<x@hancock14.freeserve.co.uk>,
<x@yahoo.co.uk>,
<x@hotmail.com>,
<x@hotmail.com>,
<x@centricore.co.uk>,
<x@wavecrestsoftware.co.uk>,
<x@btinternet.com>,
<x@phoenix3.co.uk>,
<x@ajmerphull.com>,
<x@microspherelimited.com>,
<x@hotmail.com>,
<x@hotmail.com>,
<x@webcite.co.uk>,
<x@auglobal.com>,
<x@woodstown.co.uk>,
<x@talk21.com>,
<x@gmail.com>,
<x@blueyonder.co.uk>,
<x@bt.com>,
<x@yahoo.com>,
<x@yahoo.co.uk>,
<x@hotmail.com>,
<x@hotmail.com>,
<x@gmail.com>,
<x@rediffmail.com>,
<x@hotmail.com>,
<x@yahoo.com>,
<x@yahoo.co.uk>,
<x@gmail.com>,
<x@tonyhales.co.uk>,
<x@gmail.com>,
<x@hotmail.co.uk>,
<x@hotmail.com>,
<x@yahoo.com>,
<x@hotmail.com>,
<x@gmail.com>,
<x@davejsmith.co.uk>,
<x@bcs.org.uk>,
<x@gmail.com>,
<x@lineone.net>,
<x@gmail.com>,
<x@davefield.org.uk>,
<x@gmail.com>,
<x@warriorsoftware.co.uk>,
<x@yahoo.com>,
<x@yahoo.com>,
<x@yahoo.com>,
<x@hotmail.com>,
<x@hotmail.com>,
<x@yahoo.com>,
<x@hotmail.com>,
<x@hotmail.com>,
<x@hotmail.com>,
<x@hotmail.com>,
<x@rediffmail.com>,
<x@yahoo.com>,
<x@rediffmail.com>,
<x@gmail.com>,
<x@hotmail.com>,
<x@hotmail.com>,
<x@hotmail.com>,
<x@gmail.com>,
<x@yahoo.com>,
<x@googlemail.com>,
<x@yahoo.co.uk>,
<x@yahoo.com>,
<x@yahoo.com>,
<x@gmail.com>,
<x@yahoo.co.uk>,
<x@yahoo.co.in>,
<x@hotmail.com>,
<x@hotmail.com>,
<x@hotmail.com>,
<x@hotmail.co.uk>,
<x@gmail.com>,
<x@yahoo.co.in>,
<x@3rdPlanetMedia.co.uk>,
<x@gmail.com>,
<x@gold-code.com>,
<x@hotmail.com>,
<x@gmail.com>,
<x@yahoo.co.uk>,
<x@3rdplanetmedia.co.uk>,
<x@gmail.com>,
<x@hotmail.co.uk>,
<x@yahoo.co.uk>,
<x@yahoo.com>,
<x@quickweb.co.uk>,
<x@yahoo.com>,
<x@googlemail.com>,
<x@hotmail.co.uk>,
<x@yahoo.co.uk>,
<x@yahoo.co.uk>,
<x@yahoo.com>,
<x@gmail.com>,
<x@googlemail.com>,
<x@cwassociates.fsbusiness.co.uk>,
<x@hotmail.co.uk>,
<x@googlemail.com>,
<x@googlemail.com>,
<x@googlemail.com>,
<x@btinternet.com>,
<x@gmail.com>,
<x@hotmail.com>,
<x@andrewbibby.info>,
<x@yahoo.co.uk>,
<x@wanjeet.freeserve.co.uk>,
<x@johnson-ashby.freeserve.co.uk>,
<x@btconnect.com>,
<x@hotmail.com>,
<x@sky.com>,
<x@matrixss.f9.co.uk>,
<x@nurvsoftware.co.uk>,
<x@hotmail.com>,
<x@hotmail.co.uk>,
<x@hotmail.com>,
<x@yahoo.co.uk>,
<x@sheerclass.net>,
<x@hotmail.com>,
<x@fallingdusk.f2s.com>,
<x@blueyonder.co.uk>,
<x@btinternet.com>,
<x@kidd.org.uk>,
<x@gothictech.co.uk>,
<x@xcoda.com>,
<x@psmason.com>,
<x@worcestershire.gov.uk>,
<x@hotmail.com>,
<x@gmail.com>,
<x@hotmail.com>,
<x@googlemail.com>,
<x@hotmail.com>,
<x@hotmail.com>,
<x@hotmail.com>,
<x@blueyonder.co.uk>,
<x@hotmail.com>,
<x@csharp-architect.com>,
<x@lineone.net>,
<x@virgin.net>,
<x@talk21.com>,
<x@nuttwood.co.uk>,
<x@gmail.com>,
<x@hotmail.com>,
<x@hotmail.com>,
<x@Hotmail.Com>,
<x@yahoo.com>,
<x@yahoo.co.uk>,
<x@hotmail.com>,
<x@hotmail.com>,
<x@dna-solutions.com>,
<x@liquidjelly.co.uk>,
<x@yahoo.com>,
<x@yahoo.co.uk>,
<x@hotmail.com>,
<x@hotmail.com>,
“x@monarchrecruitment.co.uk>,
<x@hotmail.com>,
<x@lineone.net>,
<x@creationof.net>,
<x@hotmail.com>,
<x@hotmail.com>,
<x@fastmail.fm>,
<x@hotmail.com>,
<x@gmail.com>,
<x@hotmail.com>,
<x@hotmail.com>,
<x@ukonline.co.uk>,
<x@yahoo.co.in>,
<x@robparker.me.uk>,
<x@yahoo.co.uk>,
<x@btinternet.com>,
<x@yahoo.co.uk>,
<x@blueyonder.co.uk>,
<x@hotmail.com>,
<x@bcs.org.uk>,
<x@rediffmail.com>,
<x@gmail.com>,
<x@talk21.com>,
<x@fastmail.fm>,
<x@papermill-farm.com>,
<x@blueyonder.co.uk>,
<x@msn.com>,
<x@guoping.net>,
<x@blueyonder.co.uk>,
<x@evesham.com>,
<x@GMAIL.COM>,
<x@yahoo.com>,
<x@yahoo.co.uk>,
<x@ntlworld.com>,
<x@hotmail.com>,
<x@hotmail.co.uk>,
<x@kibble.me.uk>,
<x@yasar.co.uk>,
<x@hotmail.com>,
<x@hotmail.com>,
<x@gmail.com>,
<x@dsl.pipex.com>,
<x@ntlworld.com>,
<x@hotmail.co.uk>,
<x@hotmail.com>,
<x@yahoo.com>,
<x@btinternet.com>,
<x@watkins.eclipse.co.uk>,
<x@blueyonder.co.uk>,
<x@yahoo.co.uk>,
<x@sympatico.ca>,
<x@googlemail.com>,
<x@gmail.com>,
<x@hotmail.com>,
<x@yahoo.co.uk>,
<x@blueyonder.co.uk>,
<x@tiscali.co.uk>,
<x@360software.co.uk>,
<x@yahoo.co.uk>,
<x@hotmail.com>,
<x@hotmail.com>,
<x@exservices.co.uk>,
<x@ntlworld.com>,
<x@yahoo.com>,
<x@hotmail.com>,
<x@blueyonder.co.uk>,
<x@sheerclass.net>,
<x@ntlworld.com>,
<x@yahoo.co.uk>,
<x@hotmail.com>,
<x@googlemail.com>,
<x@gmail.com>,
<x@hotmail.com>,
<x@blueyonder.co.uk>,
<x@googlemail.com>,
<x@yahoo.com>,
<x@hotmail.co.uk>,
<x@theheads.demon.co.uk>,
<x@gmail.com>,
<x@gmail.com>,
<x@hotmail.com>,
<x@blueyonder.co.uk>,
<x@btinternet.com>,
<x@yahoo.com>,
<x@btinternet.com>,
<x@yahoo.com>,
<x@gmail.com>,
<x@hotmail.com>,
<x@yahoo.co.uk>,
<x@gmail.com>,
<x@yahoo.co.uk>,
<x@hotmail.com>,
<x@yahoo.co.uk>,
<x@hotmail.com>,
<x@hotmail.com>,
<x@hotmail.com>,
<x@hotmail.com>,
<x@gmail.com>,
<x@yahoo.com>,
<x@rdeeson.com>,
<x@btinternet.com>,
<x@hotmail.com>,
<x@antonyclark.net>,
<x@mrsajidmahmood.com>,
<x@hotmail.com>,
<x@yahoo.com>,
<x@runbox.com>,
<x@msn.com>,
<x@hotmail.com>,
<x@gmail.com>,
<x@coolestbananas.co.uk>,
<x@Blueyonder.co.uk>,
<x@yahoo.com>,
<x@yahoo.com>,
<x@dustykeyboard.co.uk>,
<x@yahoo.com>,
<x@gmail.com>,
<x@yahoo.com>,
<x@hotmail.com>,
<x@gmail.com>,
<x@yahoo.com>,
<x@hotmail.com>,
<x@hotmail.com>,
<x@live.co.uk>,
<x@hotmail.co.uk>,
<x@yahoo.co.uk>,
<x@molloy1.plus.com>,
<x@yahoo.com>,
<x@googlemail.com>,
<x@gmail.com>,
<x@yahoo.co.in>,
<x@hotmail.com>,
<x@hotmail.com>,
<x@roberthancock.co.uk>,
<x@gmail.com>,
<x@imnotplayinganymore.co.uk>,
<x@hotmail.co.uk>,
<x@gmail.com>,
<x@tiscali.co.uk>,
<x@hotmail.com>,
<x@yahoo.com>,
<x@gmail.com>,
<x@hotmail.com>,
<x@hotmail.co.uk>,
<x@yahoo.co.uk>,
<x@gmail.com>,
<x@yahoo.com>,
<x@yahoo.co.uk>,
<x@hotmail.com>,
<x@hotmail.com>,
<x@yahoo.com>,
<x@blueyonder.co.uk>,
<x@sjllewellyn.com>,
<x@yahoo.co.in>,
<x@gmail.com>,
<x@gmail.com>,
<x@yahoo.com>,
<x@hotmail.co.uk>,
<x@googlemail.com>,
<x@gmail.com>,
<x@hotmail.co.uk>,
<x@live.co.uk>,
<x@hotmail.com>,
<x@gmail.com>,
<x@gmail.com>,
<x@gmail.com>,
<x@btinternet.com>,
<x@yahoo.com>,
<x@aol.com>,
<x@sheerclass.net>,
<x@hotmail.co.uk>,
<x@hotmail.co.uk>,
<x@hotmail.com>,
<x@rediffmail.com>,
<x@tesco.net>,
<x@gmail.com>,
<x@btconnect.com>,
<x@thebigbluehouse.co.uk>,
<x@iname.com>,
<x@hotmail.com>,
<x@gmail.com>,
<x@ThreeLionsConsulting.com>,
<x@fsmail.net>,
<x@yahoo.co.uk>,
<x@hotmail.com>,
<x@yahoo.com>,
<x@gmail.com>,
<x@blueyonder.co.uk>,
<x@gmail.com>,
<x@gridbag.co.uk>,
<x@gmail.com>,
<x@hotmail.com>,
<x@googlemail.com>,
<x@gmail.com>,
<x@ishware.co.uk>,
<x@zoom.co.uk>,
<x@think-uk.biz>,
<x@gofree.co.uk>,
<x@mcgovern.co.uk>,
<x@usa.net>,
<x@hotmail.com>,
<x@blueyonder.co.uk>,
<x@hotmail.com>,
<x@hotmail.com>,
<x@hotmail.com>,
<x@hotmail.com>,
<x@hotmail.co.uk>,
<x@hotmail.com>,
<x@sky.com>,
<x@bigfoot.com>,
<x@esdaniel.com>,
<x@hotmail.com>,
<x@adlz.co.uk>,
<x@googlemail.com>,
<x@gecko.org.uk>,
<x@hotmail.com>,
<x@yahoo.com>,
<x@northfieldbham.freeserve.co.uk>,
<x@Blueyonder.co.uk>,
<x@hotmail.com>,
<x@yahoo.co.uk>,
<x@hotmail.com>,
<x@dialstart.net>,
<x@aol.com>,
<x@yahoo.co.uk>,
<x@hotmail.com>,
<x@f2s.com>,
<x@mail.com>,
<x@hotmail.com>,
<x@homesyte.co.uk>,
<x@yahoo.co.uk>,
<x@gmail.com>,
<x@yahoo.co.uk>,
<x@yahoo.co.uk>,
<x@register-software.net>,
<x@blueyonder.co.uk>,
<x@dsherman.fsnet.co.uk>,
<x@hotmail.com>,
<x@uwclub.net>,
<x@blueyonder.co.uk>,
<x@blueyonder.co.uk>,
<x@yahoo.co.uk>,
<x@btinternet.com>,
<x@makeitdynamic.com>,
<x@hotmail.com>,
<x@HOTMAIL.COM>,
<x@pilkington.com>,
<x@blueyonder.co.uk>,
<x@hotmail.com>,
<x@hotmail.com>,
<x@hotmail.com>,
<x@johnstone79.demon.co.uk>,
<x@yahoo.co.uk>,
<x@hotmail.com>,
<x@JAKS-technology.co.uk>,
<x@yahoo.com>,
<x@stmail.staffs.ac.uk>,
<x@hotmail.com>,
<x@hotmail.com>,
<x@hotmail.co.uk>,
<x@yahoo.co.uk>,
<x@blueyonder.co.uk>,
<x@yahoo.co.uk>,
<x@btinternet.com>,
<x@ukonline.co.uk>,
<x@hotmail.com>,
<x@aol.com>,
<x@yahoo.co.uk>,
<x@hotmail.com>,
<x@yahoo.co.uk>,
<x@hotmail.com>,
<x@realworldbiker.com>,
<x@yahoo.co.uk>,
<x@yahoo.com>,
<x@gmail.com>,
<x@grahamabbiss.f2s.com>,
<x@ntlworld.com>,
<x@hotmail.co.uk>,
<x@hotmail.com>,
<x@blueyonder.co.uk>,
<x@blueyonder.co.uk>,
<x@zeeb-consulting.co.uk>,
<x@hotmail.com>,
<x@lloydspharmacy.co.uk>,
<x@dan-goodwin.co.uk>,
<x@huwbristow.co.uk>,
<x@rosandpete.co.uk>,
<x@neilbarnwell.co.uk>,
<x@londonmet.ac.uk>,
<x@bryth.com>,
<x@hotmail.co.uk>,
<x@austin1984.freeserve.co.uk>,
<x@hotmail.com>,
<x@wlv.ac.uk>,
<x@talk21.com>,
<x@aol.com>,
<x@yahoo.co.uk>,
<x@hotmail.com>,
<x@yahoo.com>,
<x@aim.com>,
<x@btinternet.com>,
<x@gmail.com>,
<x@gmail.com>,
<x@gmail.com>,
<x@yahoo.co.uk>,
<x@yahoo.com>,
<x@hotmail.co.uk>,
<x@tiscali.co.uk>,
<x@blueyonder.co.uk>,
<x@googlemail.com>,
<x@yahoo.co.uk>,
<x@yahoo.com>,
<x@hotmail.com>,
<x@blueyonder.co.uk>,
<x@hotmail.co.uk>,
<x@gavinlilley.com>,
<x@yahoo.com>,
<x@dreamz.worldonline.co.uk>,
<x@technologist.com>,
<x@blueyonder.co.uk>,
<x@hotmail.com>,
<x@yahoo.com>,
<x@gmail.com>,
<x@yahoo.co.uk>,
<x@hotmail.com>,
<x@hotmail.com>,
<x@hotmail.com>,
<x@yahoo.com>,
<x@yahoo.com>,
<x@yahoo.co.uk>,
<x@yahoo.co.uk>,
<x@hotmail.com>,
<x@yahoo.com>,
<x@googlemail.com>,
<x@gmail.com>,
<x@googlemail.com>,
<x@gmail.com>,
<x@hotmail.com>,
<x@yahoo.com>,
<x@hotmail.com>,
<x@googlemail.com>,
<x@oxborrow.biz>,
<x@blueyonder.co.uk>,
<x@rajvansh.co.uk>,
<x@hotmail.co.uk>,
<x@extreme-europe.com>,
<x@hotmail.com>,
<x@tiscali.co.uk>,
<x@hotmail.com>,
<x@gmail.com>,
<x@yahoo.com>,
<x@hotmail.com>,
<x@yahoo.com>,
<x@yahoo.co.uk>,
<x@mhcs.org.uk>,
<x@gmail.com>,
<x@yahoo.co.uk>,
<x@gmail.com>,
<x@aston.ac.uk>,
<x@hotmail.com>,
<x@gmail.com>,
<x@hotmail.co.uk>,
<x@gmail.com>,
<x@yahoo.co.uk>,
<x@gmail.com>,
<x@live.co.uk>,
<x@hotmail.com>,
<x@hotmail.co.uk>,
<x@hotmail.com>,
<x@hotmail.com>,
<x@wormpurple.com>,
<x@gmail.com>,
<x@hotmail.com>,
<x@jonathanandmary.co.uk>,
<x@blueyonder.co.uk>,
<x@hotmail.com>,
<x@hotmail.com>,
<x@yahoo.com>,
<x@yahoo.com>,
<x@alexjoyce.com>,
<x@hotmail.co.uk>,
<x@jamesdodd.com>,
<x@mcgraynor.freeserve.co.uk>,
<x@gmail.com>,
<x@hotmail.com>,
<x@hotmmail.com>,
<x@yahoo.com>,
<x@triolink.co.uk>,
<x@abs.me.uk>,
<x@blueyonder.co.uk>,
<x@yahoo.com>,
<x@hotmail.com>,
<x@hotmail.co.uk>,
<x@costatek.com>,
<x@sky.com>,
<x@hairthieves.com>,
<x@hotmail.com>,
<x@ntlworld.com>,
<x@hotmail.com>,
<x@hotmail.com>,
<x@hotmail.com>,
<x@yahoo.co.in>,
<x@hotmail.com>,
<x@gmail.com>,
<x@yahoo.co.in>,
<x@googlemail.com>,
<x@gmail.com>,
<x@yahoo.com>,
<x@gmail.com>,
<x@yahoo.co.uk>,
<x@googlemail.com>,
<x@targettesting.co.uk>,
<x@hotmail.co.uk>,
<x@hotmail.com>,
<x@gmail.com>,
<x@yahoo.com>,
<x@yahoo.com>,
<x@student.staffs.ac.uk>,
<x@tiscali.co.uk>,
<x@hotmail.co.uk>,
<x@googlemail.com>,
<x@gmail.com>,
<x@gmail.com>,
<x@hotmail.com>,
<x@googlemail.com>,
<x@hotmail.com>,
<x@acfdesign.com>,
<x@yahoo.com>,
<x@mslancashire.plus.com>,
<x@googlemail.com>,
<x@btinternet.com>,
<x@yahoo.co.uk>,
<x@gmail.com>,
<x@gmail.com>,
<x@hotmail.com>,
<x@hastilow.com>,
<x@blueyonder.co.uk>,
<x@hotmail.co.uk>,
<x@hotmail.co.uk>,
<x@hotmail.com>,
<x@hotmail.com>,
<x@f2s.com>,
<x@gmail.com>,
<x@hotmail.co.uk>,
<x@HOTMAIL.CO.UK>,
<x@Yahoo.co.uk>,
<x@hotmail.com>,
<x@YAHOO.COM>,
<x@yahoo.com>,
<x@yahoo.com>,
<x@googlemail.com>,
<x@yahoo.com>,
<x@gmail.com>,
<x@yahoo.co.uk>,
<x@gmail.com>,
<x@gmail.com>,
<x@sskosborn.co.uk>,
<x@blueyonder.co.uk>,
<x@gmail.com>,
<x@yahoo.co.in>,
<x@hotmail.com>,
<x@fastermail.com>,
<x@gmail.com>,
<x@goladderless.com>,
<x@wedontbyte.com>,
<x@tiscali.co.uk>,
<x@yahoo.com>,
<x@yahoo.com>,
<x@gmail.com>,
<x@googlemail.com>,
<x@hotmail.com>,
<x@yahoo.co.uk>,
<x@hotmail.com>,
<x@hotmail.com>,
<x@poyner.me.uk>,
<x@yahoo.co.uk>,
<x@gmail.com>,
<x@blueyonder.co.uk>,
<x@gmail.com>,
<x@gmail.com>,
<x@gmail.com>,
<x@msn.com>,
<x@ryanaldred.co.uk>,
<x@gmail.com>,
<x@hotmail.com>,
<x@blueyonder.co.uk>,
<x@gmail.com>,
<x@designdotworks.co.uk>,
<x@hotmail.com>,
<x@googlemail.com>,
<x@gmail.com>,
<x@hotmail.com>,
<x@gmail.com>,
<x@gmail.com>,
<x@yahoo.com>,
<x@hotmail.com>,
<x@rediffmail.com>,
<x@dpfoc.com>,
<x@gmail.com>,
<x@hotmail.co.uk>,
<x@yahoo.co.uk>,
<x@googlemail.com>,
<x@hotmail.com>,
<x@yahoo.com>,
<x@hotmail.co.uk>,
<x@hotmail.com>
X-MC-Unique: 109102218142100201
Content-Type: multipart/mixed;
boundary=”—-_=_NextPart_001_01CA533A.FF69C750″

This is a multi-part message in MIME format.

——_=_NextPart_001_01CA533A.FF69C750
Content-Type: multipart/related;
type=”multipart/alternative”;
boundary=”—-_=_NextPart_002_01CA533A.FF69C750″

——_=_NextPart_002_01CA533A.FF69C750
Content-Type: multipart/alternative;
boundary=”—-_=_NextPart_003_01CA533A.FF69C750″

——_=_NextPart_003_01CA533A.FF69C750
Content-Type: text/plain; charset=WINDOWS-1252
Content-Transfer-Encoding: quoted-printable

Dear FIRST_NAME,
=20
You have previously registered your CV with monarch as looking for role. An=
opportunity has arisen for an experienced senior .Net developer based in t=
he West Midlands, requiring extensive .Net, Vb.net, Asp.net and SQL experie=
nce. Should this role be of interest to you, and should you meet the requir=
ements and have the necessary experience, please do not hesitate to send me=
an updated CV, and state your interest in applying for this role.
=20
I look forward to hearing from you
=20
Kindest Regards=20
=20
Luke
=20
Luke Osborne
Recruitment Consultant
Monarch Recruitment Ltd
=20
Direct Dial 0121 237 3233
x@monarchrecruitment.co.uk x@monarchrecruitment.co.uk>=20
=20
=20
=20
=20
“Established in 1992 and employing 140+ consultants, we provide a fast recr=
uitment service tailored across the SME & corporate market place supplying =
permanent and contract I.T. professionals”
=20
Monarch Recruitment is an ISO9001:2000 certified company
=20
——_=_NextPart_003_01CA533A.FF69C750
Content-Type: text/html; charset=WINDOWS-1252
Content-Transfer-Encoding: quoted-printable







=20

Dear =3D”FIRST_NAME”>FIRST_NAME,
 
You have previously re=
gistered your CV with monarch as looking for role. An opportunity has arise=
n for an experienced senior .Net developer based in the West Midlands, requ=
iring extensive .Net, Vb.net, Asp.net and SQL experience. Should this role =
be of interest to you, and should you meet the requirements and have the ne=
cessary experience, please do not hesitate to send me an updated CV, and st=
ate your interest in applying for this role.
 
I look forward to hear=
ing from you
 
Kindest Regards >
 
Luke
 
ibri” size=3D3 color=3D”black”>Luke Osborne
i” size=3D3 color=3D”black”>Recruitment Consultant
i” size=3D3 color=3D”black”>Monarch Recruitment Ltd
 
i” size=3D3 color=3D”black”>Direct Dial      =
            &nb=
sp;     0121 237 3233
i” size=3D3 color=3D”black”>Email       =
            &nb=
sp;            =
:x@monarchrecru=
itment.co.uk
 
 
i” size=3D3 color=3D”black”>   th:2.07in;height:1.02in;”/>        =
      eight:1.02in;”/>
 
i” size=3D3 color=3D”gray”>"Established in 1992 and employing 140+ cons=
ultants, we provide a fast recruitment service tailored across the SME &amp=
; corporate market place supplying permanent and contract  I.T. profes=
sionals"
 
i” size=3D3 color=3D”gray”>Monarch Recruitment is an ISO9001:2000 certified=
company
 





tyle=3D”color: rgb(102, 102, 102);”>This message is intended solely for the=
use of the individual or organisation to whom it is addressed. It may cont=
ain privileged or confidential information.=20
If you have received this message in error, please notify the originator im=
mediately. If you are not the intended recipient, you should not use, copy,=
alter, or disclose the contents of this message.
All information or opinions expressed in this message and/or any attachment=
s are those of the author and are not necessarily those of Monarch Recruitm=
ent Ltd or its affiliates.=20
Monarch Recruitment Ltd accepts no responsibility for loss or damage arisin=
g from its use, including damage from virus.
If you wish to be removed from the database or feel this email has no busin=
ess with yourself, then please click on the following removal link to be re=
moved from our database. lick?account=3DC18A8&code=3Dddea0d311ecf4d3b78c6ee9298e82a0d”> =3D”font-family: Arial,Helvetica,sans-serif;” size=3D”2″>remove
<=
/font>

tyle=3D”color: rgb(102, 102, 102);”>Monarch Recruitment Ltd. 8th Floor, 1 M=
artineau Place, 44-80 Corporation Street,Birmingham, B2 4UW. Company Reg No=
: 2774106, VAT No. 806 6627 20.
=20


18Oct/090

Google Wave!

ZOMG I GOT MY INVITE TODAY!

I actually got it last night at about 3am when I went to bed, so I decided to wait until today to play with it. And… I luffs it!

In fact, you’ve probably noticed the widget on the right, which shows a wave that I set up just for my blog.

In case you can’t see it yet (you have to have a wave account, though the wave is public so I don’t need to add you for you to see it), here’s a screenshot of how it will look when you get on. (Note I said when, not if. There’s a bloody huge hype about this, I expect a hell of a lot of people, especially the type that read all my ramblings here, to have an account eventually!) ;)

google wave wordpress widget

In case you’re wondering how I did it, I added “embeddy@appspot.com” to the wave, and it gave me the code to embed the wave. Simple as that. :)

Now I’m just waiting to get the ability to send out invites. Can’t do it yet, but apparently you only get 8 and I’ve promised most of them to friends already, so no giveaways here I’m afraid!

Quick screenshot, nothing in-depth since I’m too lazy to do a massive writeup. :\

gabehabe google wave

If you have google wave, this is the wave on the right, just a bit bigger:


16Oct/090

Why is there a dead Pakistani on my couch?

…well? I certainly didn’t put it there.

Actually, I’ve heard it’s from Lost. Which is a terrible show.

I just found this amusing and thought I’d share.

Tagged as: , No Comments
16Oct/091

Office space to rent in Burntwood

what is this i dont even
office space to rent in burntwood

I’ve never posted anything like that here. If it was AmmNet, at work, I might understand since we do have office space to rent. But how has that reached my site? O.o

Though I realise that I’m now going to have a permalink with this text in, header tags and image alts, I will understand if I get those hits in the future.

Tagged as: , 1 Comment
10Oct/090

Developing for Android, Part V

Publishing your apps

No code in this tutorial… and this is actually the last in the series. But never fear! I’ll be writing more tutorials, I’ve simply written these 5 to get you familiarised with android. Hopefully, you’re feeling quite confident on some of the aspects now, and you could well be on your way to developing the next killer app!

With that said, I’m going to explain how you can publish your app. It’s a simple process, but you also have to sign your apk before you can publish it to the market.

First off, we need to create a keystore. To do this, you’ll need the JDK installed. Open up a command prompt, and change to whereever you want to save the keystore. Then, type the following:
keytool -genkey -v -keystore mykeystore.keystore -alias my_alias -keyalg RSA -validity 10000
NOTES:
- Replace mykeystore.keystore with whatever_you_want_to_call_it.keystore
- Replace my_alias with whatever alias you want to use (example, android)

Also, if you get this error:
'keytool' is not recognised as an internal or external command, operable program or batch file.
You may want to set the PATH variable. You can do it in the computer properties, but since this isn’t exactly a windows tutorial, I won’t go into that much detail. Instead, let’s do this:
PATH="C:\Program Files\Java\jdk1.6.0_14\bin"
then try the first command again.
NOTE: Replace the path with the path of wherever you installed Java. (Typically you’ll find it in C:\Program Files\Java\jdk%.%.%_%%\bin)
ANOTHER NOTE: This is of course a windows path. Depending on your operating system, this may vary.

After executing the keytool command, it will ask you for various details. Simply enter the values, and it will create your keystore. Make sure you take note of your alias and password, it will ask you for it every time you come to sign an app!

For reference, the questions it will ask are:

  • Enter keystore password:
  • Re-enter new password:
  • What is your first and last name?
  • What is the name of your organisational unit?
  • What is the name of your organisation?
  • What is the name of your City or Locality?
  • What is the name of your State or Province?
  • What is the two-letter country code for this unit?

You now have your keystore. When you want to sign an apk, you will need to use the following command:
jarsigner -verbose -keystore "/path/to/mykeystore.keystore" "/path/to/myapk.apk" my_alias
Enter your password, and you will see some output similar to this:

adding: META-INF/ALIAS_NA.SF
adding: META-INF/ALIAS_NA.RSA
signing: res/drawable/icon.png
signing: res/layout/main.xml
signing: AndroidManifest.xml
signing: resources.arsc
signing: classes.dex

Your apk file is now signed! (Note that you need to sign it every time before uploading, since building will reset it)

Publishing your app

The next step is of course publishing your newly signed apk file to the android market. Simply navigate your web browser to the market home and follow the steps to register as a developer. If you want to register to sell your apps, you will also need to go through an additional process to become a “registered seller”.

Once you’ve registered and logged in, you’ll reach the page which displays all your registered apps. Of course, if you’re following this tutorial, you probably don’t yet have any, so you won’t have a list of apps to see. :)
NOTE: This page uses a hell of a lot of javascript. Make sure it’s turned on.

When you’re ready, click on “Upload Application”. You will then be presented with a form where you can upload the apk and a maximum of two screenshots, a promotional graphic, and fill in various details such as the title, description and price.

As soon as you click publish, your application will be on the market — there’s no approval system like the iPhone’s app store, so as soon as you search in the market, you should see your app.

You are now officially a dev. Make me proud. :’)