Pooya Karimian

Blog Archive March 2005

« February 2005 | Main | April 2005 »

Sony Ericsson's Motion Camera

[Sony Ericsson ROB-1]It's a small robot with a VGA camera, running Linux and can be controlled over bluetooth. I can think of using that for different robotic/computer vision researchs. I will suggest buying one to my professors when it becomes available.

- Sony Ericsson ROB-1
- Announced in CeBIT
- LinuxDevices.com article
- Robots.net article

Posted to Research by pooya at 07:31 PM | Comments (0)

Coding for fun

[wxWidgets]A presentation, an assignment, RA works, lab works, course project, and a final exam soon, that's why I'm working with DEV-C++, an open source C/C++ IDE for Windows which is by default comes with MinGW. It is fun writing cross platform GUI applications with wxWidgets in that environment, striping it and compressing it with UPX to make a less than 500k binary.

wxBasic seems cool too.

I have done many of my good codes on exam nights!

Posted to Programming by pooya at 12:50 AM | Comments (0)

Keyevents in Firefox

FarsiI posted about the new PersianJS code in the Persian Computing mailing list. What I've done is to change the code to work in Firefox/Mozilla browsers besides IE, this means allowing Linux/Mac users to use it too.

For catching keypress events and changing them to another key with javascript in Internet Explorer, there's a variable named window.event.keyCode that can both be used both for reading the pressed key and also for changing it to another key.

In Mozilla/Firefox the key code is in a variable named event.which which is defined only in the context of event handler.

The following examples only work in Firefox/Mozilla. The first one shows how to read the key value:

<input type="text" size=20 onkeypress="alert(event.which);">
And the next one is an example of changing the keypress to another key:
<script type="text/javascript">
 function newKey(event) {
     if (event.which==0x23) return;
     var new_event=document.createEvent("KeyEvents");
     new_event.initKeyEvent("keypress", false, true, document.defaultView, false, false, false, false, 0, 0x23);
<form action=""><input type="text" size="20" onkeypress="newKey(event)"></form>

Using a simple method for detecting browser type, such as testing for the existance of window.event object, it is possible to write multibrowser codes. PersianJS is a complete example.

Update Aug 5, 2005: Seems like because of a vulnerability initKeyEvent is disabled from Firefox 1.0.6 as you can see in bug #289940. I'm too busy but I will try to write a complete description and comment on that bug hoping that this feature return back to Firefox.

Update March 1, 2007: It's been a while that the bug is fixed. But the syntax for initKeyEvent is changed. You can no longer change the current event but instead you can create a new event and cancel the old one. I fixed the above code to reflect that.

Posted to Programming by pooya at 09:49 AM | Comments (7)


Fusemail.com is now switched to version 2.0 of its webmail. It is great. I'm having a basic plan with them and I'm happy with it. It gives quite large storage space, IMAP/Webmail access, and tons of features you will never find in any other place or any mail client.
It can fuse (fetch) mails from other servers even from Yahoo and Hotmail. You can subscribe to RSS feeds. Different secure ports for those behind a firewall. Aliases and rule system which will help those receiving large number of emails everyday. Specially if you have you own domain name I really suggest it and if you don't fusemail itself provide you with many different choices.
I myself have different aliases @pooyak.com which I use for different tasks and email received by each of these aliases automatically go to corresponding folder.

Try the user:demo pass:demo in Version 2.0 web interface. Right click on folders and emails to see how good it is.

And they give me free months if I refer you to them. My promotional code is 29374.

- Fusemail.com Get yourself an account there now.

Posted to Network by pooya at 10:19 AM | Comments (4)
« February 2005 | Main | April 2005 »
[Tuesday 2017-02-21] [Updated Saturday 2013-11-30]