Saturday, June 30, 2007

mozilla & stumble

First of all, sorry for a lengthy inactive period

Second, I dono if somebody else has already reported this...

I tried installing Stumble on my yet unupdated Mozilla 1.5.0.1.2

It kept saying "Software installation is currently disabled. Click "edit options" on the right, enable it and then try again"

And it gave me a small edit options box...Clickin on it produced the "Contents" tab in Mozilla's preferences box. That didn't help too much. So googled it up and found the following :

Enabling software installs

Some users may have disabled the software installation option based on security issues which have since been resolved [1]. To re-enable:

Firefox 1.5: If you previously disabled this option and then updated to Firefox 1.5, the disabled setting will be carried over. Since the option to enable software installation no longer exists in the interface, you will need to:

  1. Type about:config in the Location Bar and hit enter.
  2. Type xpi in the Filter box and find xpinstall.enabled in the list.
  3. Make sure its value is set to "true" (double-click will toggle)
http://kb.mozillazine.org/Unable_to_install_themes_or_extensions_(Firefox)



You mite find some other raw config options in "about:config" ;)

Thursday, June 28, 2007

From PVR Cinemas.com

when i clicked on online booking, i get this

"Please wait....

PVRDB.Database.1 error '80020009'

Transaction (Process ID 67) was deadlocked on lock resources with another process and has been chosen as the deadlock victim. Rerun the transaction.

/pvr/include/login_redirect.asp, line 48 "

Thank you!

Sunday, June 24, 2007

Patching a Hardware Bug

What do you do when you find a bug in a software ? Simple ! Find a solution and release a patch. But what if a hardware has bug ? Again, find a solution and release the patch ! Surprised ?? Just read through this article posted on MIT Tech Review.

Operating Systems...

well, we have read many definitions of operating systems based on its role.
one, as a "facilitator" for applications development.
two, as a "manager" of hardware, core routines(processes/daemons,and hence software), imposing security/protection of itself and the hardware it manages.

here is one definition where the OS is defined based on its objective. Its from the Project Oberon notes...

"The fundamental objective of an operating system is to present the computer to the user and to the programmer at a certain level of abstraction."

phew!!! this one defines the complexity, role and the objective of an OS. This definition also gives the implementer freedom to design his OS the way he wants to, based on wat level of abstraction he wants to give his "user and programmer". Nice place to start building one!

Monday, June 11, 2007

Is this implementation of select() syscall in Linux correct?

Here is the code
linuxMachine:/tmp # uname -a
Linux linuxMachine 2.4.21-309.PTF.97199.1-smp #1 SMP Mon Jul 24 12:20:00 UTC 2006 i686 unknown
linuxMachine:/tmp # cat testSelectCall.c
#include "stdio.h"
#include "sys/time.h"
#include "sys/types.h"
#include "unistd.h"

int
main(void) {
fd_set rfds;
struct timeval tv;
int retval;


FD_ZERO(&rfds);
FD_SET(0, &rfds);

tv.tv_sec = 5;
tv.tv_usec = 0;

retval = select(1, &rfds, NULL, NULL, &tv);
/* Here is the tricky part! */

printf("tv.tv_sec=%i\n",tv.tv_sec);
printf("tv.tv_usec=%i\n",tv.tv_usec);
if (retval)
printf("Data is available now.\n");
else
printf("No data within five seconds.\n");

return 0;
}
linuxMachine:/tmp # !gcc
gcc testSelectCall.c
linuxMachine:/tmp # !time
time ./a.out
tv.tv_sec=0
tv.tv_usec=0

No data within five seconds.

real 0m5.000s
user 0m0.000s
sys 0m0.000s
linuxMachine:/tmp #

On a solaris box

solarisBox>uname -a
SunOS solarisBox 5.10 Generic_118835-02 sun4u sparc SUNW,Sun-Blade-100
solarisBox>gcc testSelectCall.c
solarisBox>!time
time ./a.out
tv.tv_sec=5
tv.tv_usec=0

No data within five seconds.

real 0m5.025s
user 0m0.003s
sys 0m0.010s
solarisBox>


Man Page has the following description
man 2 select

Some code calls select with all three sets empty, n zero, and a non-null
timeout as a fairly portable way to sleep with subsecond precision.

On Linux, the function select modifies timeout to reflect the amount of
time not slept; most other implementations do not do this. This causes
problems both when Linux code which reads timeout is ported to other
operating systems, and when code is ported to Linux that reuses a struct
timeval for multiple selects in a loop without reinitializing it. Con�
sider timeout to be undefined after select returns.

Monday, June 04, 2007

Microsoft announces surface

I am sure, many are aware of it. In case you haven't then check this out

http://www.microsoft.com/surface/