Eclipse debugger tips – the “Display” view

Window -> Show View -> Display.

Type some code into this view, highlight it and then press the “J” button in the top right of the frame.  This will execute the code and return the results.

I’ve been using Eclipse for over three years and I only found about this feature the other day.  Oh well, we live and learn.

Comments (2)

SquirrelMail filters

Do you use SquirrelMail as your webmail client?  I do.  Recently I signed up to a mailing list that generates about a hundred e-mails a day.  Tired of having to manually clean my inbox, I decided to set up a mail filter to do it for me.  Here’s how to do it.

Firstly, you need to log into your Mailbox Manager.  This is seperate from the SquirrelMail site, and, for Dreamhost account, can be found at mailboxes.yourdomain.com.  The SquirrelMail login page links to it for me, but your milage may vary.

Once in the Mailbox Manager, you need to set up two mail filters.  Why two, you ask?  Simple.  One rule to move the messages to where you want them and a second rule to delete the messages from your inbox.  Wait, wait – move and then delete?  For some reason, SquirrelMail treats “move” as “copy”.  When you add a new rule you can choose the “Move it to folder” option.  Back in the Mailbox Manager this rule appears as “copy emails”, though, which I didn’t pick up on for a few days.  No wonder it didn’t work!

Oh, and your first rule needs to be set as “execute and continue” and your second one as “execute and stop.”  The first rule needs to be set like that to ensure that the second rule is actually run after copying the e-mails.  The second rule has to be set like that – you aren’t allowed to delete and e-mail and then carry on running filters on it :)

One final thing – when you specify the folder to move the e-mail to you don’t need to give the full path if it’s a subfolder of inbox.  E.g, if your target is Inbox->MyFolder, then just write “MyFolder”.  If your target is Inbox->MyFolder->MyOtherFolder, then you need to write “MyFolder.MyOtherFolder”.  Entering “Inbox.MyFolder” will create a folder with the path Inbox->Inbox->MyFolder.

The Mailbox Manager tells you that the folder needs to exist before the filters can move messages to it, but the existence of Inbox->Inbox->MyFolder on my system rather proves that wrong…

Comments

Bring to front

Have you ever “lost” a window?  You click on it on the taskbar but it won’t reappear.  You have no choice but to kill the program, losing anything that you hadn’t saved.

Well, here’s a tip for you – bring up the Task Manager (press ctrl+shift+esc, right
click on the taskbar and click “Task Manager” or press ctrl+alt+del followed by t),
navigate to the Applications tab, right click on the program that you can’t bring up
and click “Bring To Front.” No more losing a half-written email before you save it!
No more disappearing online bingo games. No more losing your work. I hope that this saves you some time and frustration. Sorted!

From my experience, this problem generally happens when you minimise a window just before it pops up a dialog box.  Using the task bar won’t restore the application as it can’t change its window state until you’ve responded to the dialog.  Shame you can’t actually see the dialog box…

Comments (4)

First post from my T-Mobile G1

It’s all in the title, really. I now have a G1.

I’ll write more about it once I’ve got a bit more used to it.

Comments

Webcomic

“We’re always talking about wanting to make a webcomic – why don’t we actually make one?”

“Yeah, alright…”

 

So I’m now making a webcomic with my sister. I’m not going to link to it from here, since this is meant to be my more professional blog, but I want to briefly talk about it. I just spent a few hours hacking together a website for the comic using PHP, along with an upload page and a mini-blog for each individual comic. I’ve learnt how to do a few new things in PHP that I’ve never needed to do before, so I’d say that it was a productive evening.

Comments (2)

The mistakes of one’s youth…

So I decided to stalk myself for a few minutes and see what I could find.

Read the rest of this entry »

Comments

Online stalking

Recently I got called a stalker by someone I know at work. They changed their mind a minute later, but even so I feel the need to point out how easy it can be to go from only having a small bit of personal information to having quite a bit.

Some people might consider this a bit of a creepy post – it’s not intended to be at all. It’s merely meant to show that you should be careful with your personal information. Also, that putting someone’s name into Google and following the obvious trail of results is not stalking :)

Read the rest of this entry »

Comments

Wait, what?

I’m deleting three months of spam comments at the moment.

I’m pretty sure I just deleted one entitled “Indian Herpes Dating”.

Who would want such a thing?! Is there even a target audience for such spam?

Comments

Where have you been, Brian?

It’s been far too long since I last wrote anything here. Let me give you a quick summary of what I’ve been up for the last few months…

Read the rest of this entry »

Comments

NerdKit

My NerdKit arrived last week. I haven’t had as much time to play with it as I’d have liked, but it’s still awesome. I’ve built the first two examples, a temperature sensor and a binary adder. I’ve modded the adder to light up a couple of LEDs depending on the sum, which taught me how to set pins as output and drive them high or low. It’s all done with bitshifting and logical operators. The variables that control things like input or output are stored in 16 bit integers (if I recall correctly). Each bit stores a boolean value referring to a single pin or setting. With some nice logical operations, it’s possible to retrieve a single bit, or change a single bit to a 1 or a 0. I might write a guide about this someday.

 

So, what should I tackle next? Should I upgrade the binary adder into the binary RPN calculator that I talked about before (this would require buying some more switches) or should I try to drive the piezoelectric buzzer at frequencies corresponding to musical notes and make music? How can I choose?!

Comments (9)

« Previous entries Next Page » Next Page »