Friday, May 8, 2009

What is a MATLAB mex file?

A mex file is a matlab source type file
that allows the user to compile partial code
as C/C++ code. MATLAB runs an interpreter
for running the code. Since code interpretation
is usually slower as compared to running
pre-compiled binaries on a machine, MATLAB
provides an approach to do this by using the
built in mcc tool.

These mex files define certain entry points
in a standard matlab code where, a function
call is translated to a C/C++ code and later
accept values from the computed results.
Such an approach finds a lot of application with
compute intensive operations such as graph
search or image recognition which can be done
better with optimized C code.

Thursday, May 7, 2009

Difference between Cell Broadcast and MBMS

Both services are a part of the GSM standard. However,
MBMS is also used with UMTS.

Cell broadcast is a part of the GSM standard
and is used to send a broadcast message to
all subscribers from a particular cell. This service
is a pseudonym for the SMS-CB - Short message
service - Carrier broadcast. The other version of this
service - SMS-PP - point to point link is the version
used with the standard SMSs. SMS-CB was designed
for emergency purposes where the provider can
send emergency message to all users within a cell.

With Multimedia broadcast multicast the architecture
provides a means for the users of the service to interact
with the service provider. Along with the standard broadcast
service MBMS provides the advantage of having a
two way multicast.

Possible DNS spoofing detected

This is a typical warning thrown in an ssh session that
occurs when the public key for the remote machine that
you are either trying to log onto or scp onto has been
changed. Typical error seen is on this lines -
misfit@mufasa:~/ ssh misfit@

The RSA host key for node1-1 has changed,
and the key for the corresponding IP address
is unknown. This could either mean that
DNS SPOOFING is happening or the IP address for the host
and its host key have changed at the same time.
Someone could be eavesdropping on you right now (man-in-the-middle attack)!
It is also possible that the RSA host key has just been changed.
The fingerprint for the RSA key sent by the remote host is
Please contact your system administrator.
Add correct host key in /home/misfit/.ssh/known_hosts to get rid of this message.
Offending key in /home/misfit/.ssh/known_hosts:
RSA host key for node1-1 has changed and you have requested strict checking.
Host key verification failed.

The solution to this is as posted in the message, either
the user can clean the known_hosts file and try to login
again. The known_hosts file is located in the .ssh folder
in the home directory or alternately just changing the
entry corresponding to the remote machine in the known
_hosts file.

Tuesday, May 5, 2009

What is inside the .ssh folder

To go to your .ssh directory do the following -
misfit@mufasa:~/$ cd .ssh
After reaching inside the .ssh directory list the contents -

misfit@mufasa:~/.ssh$ ls -ltr -a
total 64
-rw-r--r-- 1 misfit far_away 622 2006-09-29 11:15
-rw------- 1 misfit far_away 668 2006-09-29 11:15 id_dsa
-rw-r--r-- 1 misfit far_away 415 2008-09-03 17:28
-rw------- 1 misfit far_away 1751 2008-09-03 17:28 id_rsa
drwxr-xr-x 60misfit far_away 36864 2009-04-29 17:48 ..
-rw-r--r-- 1 misfit far_away 1082 2009-05-05 14:27 known_hosts
-rw-r--r-- 1 misfit far_away 622 2009-05-05 14:30 authorized_keys
drwx------ 2 misfit far_away 4096 2009-05-05 14:30 .
The *.pub entries are the public keys that may be generated by you.
The id_* files are your private keys and are usually with permissions 600.
The file authorized_keys has information on the public keys for allowing
password less logging to this machine. The known_hosts file has
information about machines you had previously logged onto (including
public keys). Since machines change their public keys from time to time,
the public key entries in this file change and need to be amended.
Typical entry in a known_hosts file looks like -

misfit@mufasa:~/$more .ssh/known_hosts
node1-1, ssh-rsa AAAAB3NzaC1yc2EAAA

Hope this was useful. If a public key is no longer valid.
Remove the appropriate entry from this file and re-login
to repopulate this entry.

Monday, May 4, 2009

Comparison between google's Bigtable and amazon simpledb

Recently I have seen a lot of disucssion relating to
the comparison between the much touted Google
Bigtable database and the Amazon SimpleDB solution.
The BT (bigtable) is an internal database system used
for different projects which could be made open to public.

Amazon's simpleDB solution is currently available to
customers who sign up for the web service. The first
level of comparison shows up in terms of pricing of
the service. Some articles such as this and a
couple of others discuss the pricing issue.
Some even contemplated the Google service being

Another factor is the ease of use. Some articles contemplate
and debate that the Google approach would not only
try to compete based on size but also on the basis
of functionality. Since Amazon is known to provide
bare bones services in most cases, (sometimes
requiring third parties to develope and build on it),
the users are expecting google to provide a better
usability model.

An approach to give a shot to the google's bigtable service as a
testride is available here -
This provides a web interface for working and creating tables
that can be accessed from the web.

A possible plus working with the amazon solution could be
easy integration with other services like the amazon ec2 and
(elastic cloud computing) and the amazon s3 (storage).

Sunday, May 3, 2009

Maximum number of security cameras - Airport

Recently read a web article which said that
London's Heathrow international airport
had the maximum number of surveillance
cameras. I got reminded of the fact when
I read another related news story that talked
about security cameras that could see through
clothes. Not surprisingly this news was from
London too. The camera - ThruVision T5000
can see through clothes of ppl up to 25m away
and is based on imaging using the Terahertz
(T-ray) technology. Not bad!

Difference between IP camera and a USB webcam

IP cams are closed circuit tv cameras that were built
with the primary purpose of monitoring and surveillance.
These cameras are capable of working in areas with little
light and good at detecting change in the environment.
Typical resolution with such cameras ranges from 420
to 560 tv lines. These cameras can be connected over
a fast ethernet link to a controlling stations where their
feed could either be displayed on a closed circuit tv or
fed to software for presence detection/analysis. Alternately
their feeds are also recorded and archived for
analysis after a particular incident such as theft/

Web cams are devices that can be used for computer
systems and are used for personal purposes such as
video conferencing (or video chatting for individuals).
Most web cams come with a USB connection for use
with computers. Thes cameras are capable of use in a
well lit environment and for objects in fair focus. It
is important to note that some of the newer webcam
devices are also being considered and used as security
cameras that archive and send videos over the network
when they detect motion/sound/both.

Resolution of commercial grade security cameras

Some of the latest security CC cameras like the
HDC518 High Resolution Day/Night Security Camera
have a resolution of 560 lines. Other models like
the Swann Model SW-C-BDOGC come with 420 lines
tv quality. Most cameras come in the range of
about $100 to $500.