Saturday, April 18, 2009

How to include HTML code in a blogger blog post

I noticed that posting html tags (specially misformed ones)
results in the blogger throwing an error or displays the
content wrongly.

There are two alternatives to resolve this issue -

1. The simple approach - It is easy to use this approach
if the lines of html code you want to put on your post are small.
The only thing that needs to be taken care of is the following
substitution - replace all less than, greater than signs that
are part of html tags with &ltsemi-colon and &gtsemi-colon.

E.g. Consider the following line of html code
<img alt="Photo" src="http://URL_to_my_image.gif" />

would be written as -
&ltsemi-colonimg alt="Photo" src="http://URL_to_my_image.gif" /&gtsemi-colon

in your post to show up correctly on the post.

Note in all of the above cases please replace the semi-colon with ;
I am not able to include the actual symbol as a single string since it
shows up as a < in my post.

2. The second approach - relies on using html framing.
You can edit the code in a way to include your html page as
a frame in the post. This is specially useful if you are posting
a large peice of html code.

Hope this works for you. If it does not, please feel free to post

How to create blogger gadgets?

The blogger gadgets are nothing but simple XML files.
Each of these xml files are composed of html and
optionally javascript code.

In this post I will show a simple example where a user
can create a simple gadget, include in her blog and then
eventually modify and submit the gadget to google so that
it could be made available worldwide to all users.

The following simple code is the test.xml file which you can
upload at your favorite webserver.

<?xml version="1.0" encoding="UTF-8" ?>
<ModulePrefs title="hello world example" />
<Content type="html">
Test, gadget!

Use the add a gadget on your google blog. At the bottom end
of the left hand side you will see an option that says add your own.
Use that option to enter the URL of place where you are hosting
this test.xml file. Adding the gadget from there on should be
as simple as adding any other gadget to your blog.

Inside a Blogger Gadget -

As shown in the code above, the gadget is just a simple xml
file that can include html and (optionally) javascript code.
This code is a vanilla html hello world program which can
be modified by adding other html tags such as the image
( <img> ) tag. In a simple followup to this example I will
add an <img> tag to the file to add an image that you
can use to display an image in your gadget -

<?xml version="1.0" encoding="UTF-8" ?>
<ModulePrefs title="hello world example" />
<Content type="html">
Test, gadget!
<img alt="Photo" src="http://URL_to_my_image.gif" />

In the above code please change src of the picture to
the place where the image is hosted. Upload the code
to any webserver and use that URL to add and test
the gadget as mentioned above.

Please post comments if you see any issues with
the same.

Friday, April 17, 2009

Wimax - Difference between Profile A, B and C Setups

There is a functional difference between the three profiles
for the Wimax technology. The main distinguishing features
can be highlighted as -

Profile A: The ASN is centralized with the functional
units like the BS and the ASN gateway are separated into
independent entities. The radio resource management (RRM)
is separated into two functional blocks - the RRC which operates
on the ASN GW and the RRA which operates on the Base station.

RRA - Radio resource agent
RRC - Radio resource controller.

Links between the BS and ASN-GW is established through the
R6 link.

Profile B: Considers a distributed ASN side and the BS and the
ASN GW functionalities are pushed to a single architecture. All
major functionality is a part of the ASN architecture.

Profile C: Has all the things as same as the Profile A setup,
except that the RRC is also pushed to the BS. There are other
minor differences with mobility and handover control, which
is moved from the GW to the BS.

These profiles are a part of the Release 1.

Tuesday, April 14, 2009

How to find debian distribution version

If you are not sure which distribution you are running - Eg
Debian, fedora, Ubuntu. You might need to run multiple steps
here. However if you know your distribution and just need to
check which version you are running distribution specific steps
would suffice -

1. Debian -
The following command should

misfit@mufasa:~/$ cat debian_version
This shows which version of debian I am running.

2. Other distributions - Redhat/Ubuntu
You could try the following command -

misfit@mufasa:~/$ cat /etc/*release*

Hopefully either of these option solve your issue.

How to remove eth0_rename linux

There are multiple approaches to eliminate this problem -

1. A GUI based approach - If you are using the Gnome
desktop which has the networking tool, the solution is
straight forward. Go to the System -> Network ->
Administration menu. Select the appropriate interface,
and rename it from using that tool.

2. A Command line approach - is as per the guidelines
listed in the post here. However to solve this specific problem
you need to follow the specific steps. Do a ifconfig on the
interface -

$> ifconfig eth0_rename

This should have some information like hw addr: aa:bb:cc:dd:ee:ff
Use this hardware address to search the entry within this
file -

vi /etc/udev/rules.d/70-persistent-net.rules

and change the name of that interface to whatever you want -
E.g. eth0. Please note that the name eth0_rename might have
come out due to wrong renaming of interfaces, and hence you might
see multiple entries with the same interface name in the file.

Save and quit the file. Reboot the machine and your woes will
be all gone.

Good day.

Monday, April 13, 2009

Umount / Umount2 device is busy

I was playing with a UML installation on debain, and after
finishing stuff needed for the installation, I needed to manually
unmount the partition. So I started with the simple umount -

$> umount /mnt/uml/
umount: /mnt/uml: device is busy

So I figured the issue could be solved by a forced unmount which led to -

node1-1:~/# umount -f /mnt/uml
umount2: Device or resource busy
umount: /mnt/uml: device is busy
umount2: Device or resource busy
umount: /mnt/uml: device is busy
Finally, after searching the only solution that seems to do the trick is
a lazy unmount -

node1-1:~/# umount -l /mnt/uml
Lazy unmounting works the smart way by detatching the filesystem from the
hierarchy as soon as the command is issued and does the reference cleanup as
soon as it detects that the device is not busy anymore. An alternative approach
to this may involve finding out what operation is causing the device to be busy
using utilities like fuser. However doing it the "lazy" way is always easier.

Difference between Fstab and Mtab

1. Is a configuration file provided on linux based machines for specifying how the file systems are to be mounted. Shows how the filesystems are currently mounted.

2. Fstab is an input file and mtab is a status or output file.

3. Fstab generally has rules which show how all the file-systems should be mounted. Mtab shows only those file systems that are currently mounted (Eliminates those FSes which were unmounted.)

Different ways to define primary key classes in EJB 3.0

When object relational mappings require a primary key to be composed 
of multiple persistent properties (i.e. composite key ) the JPA provides 
following two ways of mapping :
1) @javax.persistence.IdClass annotation
2) @javax.persistence.EmbeddedId annotation
  in conjection with @javax.persistence.Embeddable annotation

Sunday, April 12, 2009

Vista windows explorer green bar - How to remove it??

There are multiple posts on the net recommending different
ways to speed up windows explorer.

One of them included changing the views of the folders from
detailed to icons. This did not seem to make much difference to
the performance on my machine.

Another solution was to go to Tools menu -> Folder
Options -> General Tab, and selecting the windows classic
folder view. My machine was already having that and thus
did not contribute to removing the slow green bar at the
top of the screen. With classic I have the slow gray bar :)

3. The solution that works for me is - to start with the
windows explorer and go to the Tools menu -> Folder
Options -> View. Then go to the Advanced Settings
and select the “Always show icons, never thumbnails.

The final solution is the one that seems to work for me
and I think it will work for you too. This solution prevents
windows from trying to generate a thumbnail for each
video and picture file you are trying to browse through.

Please post comments and let me know if this works for

Best time to visit different parts of India

Agartala - October to April 
Agra - October to March  
Ajanta Ellora - All round the year  
  (Preferably October to March)  
Amarnath - July to August  
Andaman and Nicobar islands - October to May  
Ayodhya - July to September  
Badrinath - June to September  
Bangalore - All round the year  
  (Best suitable is durin balmy winter)  
Bhubaneshwar - September to March  
Bodhgaya - October to February  
Chennai - November to March  
Dadra Nagar Haveli - November to March  
Darjeeling - mid September to mid December  
  and from mid March to mid June 
Dehradun - All through the year  
Delhi - February to April and August to November 
Diu Daman - October - May  
Dwarka - October to March  
Gangotri - May-June and September to November  
  (The temple usually remains open from last week  
  of April to 2nd week of November)  
Gir - Mid October,Mid June, November and February  
Goa - October to March  
Golconda - September to March  
Gwalior - October to March  
Haridwar - October through March  
Haryana - October to March  
Hyderabad - October and March  
Kanyakumari - October to March  
Kashmir - March to October  
Kedarnath - May to October  
kerala - All season destination preferably August to March  
  (April to August is considered the best time for  
  getting Ayurvedic treatments)  
  (June & July for monsoons)  
Khajuraho - October to April  
kolkata - October to March  
Konark - October to March  
Kullu - May to October  
Lakshadweep - All round the year  
Leh Ladakh - June to September  
Lonavala - October and May  
Lucknow - October to March  
Madurai - October and March  
Mahabaleshwar - October to June  
Manali - May to October  
Mathura - October to March  
Mumbai - October to February  
Mussoorie - Aprilto June and September-October 
Mysore - October and March  
Nagarjuna Sagar - October to March  
Nainital - March to June  
Nalanda - October to March 
Panchgani - September to May  
Pondicherry - September to March  
Puri - Later part of March or early April  
Rajasthan - October to March  
Rishikesh - May-June and September to November  
Sanchi - October to March  
Simla - Any time  
Srinagar - April to June  
Tirupati - Any time in the year  
  (Ideal time is September to March)  
Vaishno Devi - March To July