Guruvayoor - To see lord guruvayoorappan

No comments :

Guruvayoor temple(about 23km from thrissur - the cultural capital of kerala) is one of the places I always wants to visit. This is a sacred place in kerala where we can feel the presence of lord Krishna(guruvayoorappan). This is my third visit to guruvayoor. This time I am alone. Main reason for my visit is to attend my friend's marriage at thriprayar, a place near guruvayoor. My last visit was with him. The moment he informed about his marriage, I decided that I all be attenting his marriage and will visit guruvayoor.

Read More

C Code to find endianness (little endian or big endian)

1 comment :

Endianness tells how multiple byte variables are stored in the RAM or handled in a particular format. In normal cases, endianness will be transparent to the user. That means the programmer do not need to worry about how the variables are handled. Every thing happens at the hardware of the processor or will be managed by the compiler.
But if we are trying to access the value of variable directly from the memory, then there is a problem. For this we should know in what order individual bytes in the variable are kept in memory.

Example Code
#include <stdio.h>

int main()
    unsigned short int Var1 = 0xAA55;
    unsigned char *p = (unsigned char *)&Var1;
    printf("Lower byte = 0x%02X\n", *p);
    printf("Higher byte = 0x%02X\n", *(p+1));

In the source code,Var1 is a 2-bytes variable which contains 0xAA55. Now  p is declared as pointer to an unsigned character of size 1-byte. Since p is initialized to the address of the variable Var1, it is now pointing to the first memory location which contains Var1. For example(see the figures shown below), if variable Var1 is in the address 0x1035 then it will be occupying the addresses 0x1035 and 0x1036. Depending on the endianness the order in which higher byte and lower bytes are stored in these memory locations. By printing *p we will know what is there in the first address ie, 0x1035 and by printing *(p + 1) we will know what is there in the second memory location.
Memory map in case of Little Endian Architecture

Memory map in case of Big Endian Architecture
Pasted below is the output of the program compiled and executed on my netbook running on Intel atom processor.
G:\Working\c_programs>gcc EndiannessCheck.c

Lower byte = 0x55
Higher byte = 0xAA


Here you can see that first byte printed using the pointer p is 0x55 and second byte is 0xAA. Since lower byte lies in the lower address it is Little endian architecture.

Read More

Ameya-yokocho Market (Ameyoko), Ueno-Okachimachi, Tokyo, Japan

No comments :

Ameya-yokocho Market[Ameyoko] is a very busy market in Ueno-Okachimachi. Here you can find any thing for shopping. Some of the items are Jewels, Precious Stones, Gems, Perls, Fashion items, Leather products, Clothes, Spices, Cereals, Green tea, Fish/Sea food, restaurants, food stalls etc etc the list goes on.

These are some pictures which I took during my visit to this market on 10th October 2010.

These are some other webpages about this market

Ameya Yokocho or briefly known as Ameyoko is a bustle market street paralleling Yamanote Line tracks between Okachimachi and Ueno Station. Shops, restaurants, outdoor food stalls or what the local called as 'Yatai' are practically operating from sunrise till dark takes over under a stretch of concrete train tracks.

Ameyko Market from
This is one of the best Asian Bazaars, here you will find a little bit of everything, and much of it at bargain basement prices, once a black market, it has become one of Tokyo’s most vibrant places with a huge array of food, clothing, jewellery, toys and cosmetics. you can buy anything from the latest pair of jeans to seaweed or pickled octopus tentacles.

Tokyo Travel: Ameyko from
Ameyoko is a busy market street along the Yamanote line tracks between Okachimachi and Ueno Station, the site of a black market after World War Two.
Ueno Okachimachi from
 Ameyoko, located in the area between Ueno and Okachimachi, is a busy bazaar-style market. It has hundreds of stalls for about 400 meters alongside and under the elevated track that runs between JR Okachimachi Station and JR Ueno Station. Ameyoko is famous for its unique atmosphere - jam packed stores, buyers bargaining and negotiating with the sellers, and vendors out-shouting each other at the top of their lungs to attract buyers.

Okachimachi is the biggest and most famous permanent open-air market in Tokyo(pics). From Louis Vuitton bags and Gucci belts to Yakitori meals on the street, anything can be found.

Some videos found on youtube and other sites

Ameyoko Market in Tokyo

Ameyoko Market

Ameya Yokocho: An Amazing Shopping District in Tokyo!

JAPAN TRIP - Let's walk Tokyo, Ameya Yokocho of Ueno together 

Tokyo Ameyoko Ueno Best Market in Town  

Read More

Repartioning dell Notebook hard disk

No comments :

I have a Dell Inspiron Mini 10 Netbook which I bought for reading and surfing internet while I am travelling. When I started using my new netbook, I felt difficult to organise my files because there is only one partition aveilable for use. So I decided to partition the hard disk.
First I checked the windows disk mangager which comes with windows 7 to partition the hard disk. But it has lot of limitations and it creates primary partitions. So only a maximum of four partitions can be made(maximum possible primary partitions which can be created is four). Out of this four three are already in use, because dell has a hidden recovery partition and a windows 7 boot partition. This limits us to create only one more new partition, also the size of the new partition has limitations.
After searching, I found the application gparted. Gparted provides a bootable iso image which can be used to boot from CD or USB flash drive. After booting from the image file downloaded, we will be able to edit the partition. So the C drive can be shrinked to generate free space and we can create any number of logical partition by creating a new extented partition.
Steps will be
  1. Download bootable iso from the gparted download page.
  2. Write it to a CD or use unetbootin to make a bootable USB from the image(Click here to donwload).
  3. Defragment the os partition, so that free space is available. (This will make resizeing faster and minimize risk of data loss)
  4. Boot from the Gparted live boot CD/USB disk
  5. After booting gparted will be available at the desktop(It starts up automatically at time of booting).
  6. Now resize the os partition.
  7. Create an extented partition in the free space created by resizeing.
  8. Create logical partitions as required.
  9. When everything is done, Click apply button to write changes to the disk.
Note: If you are following these steps, then take a backup of your data before proceeding. And do at your own risk.

    Creating Gparted USB Using Unetbootin

    Following screenshots are taken with Gparted live boot CD running from a Qemu virtual machine.

    Gparted live CD - Boot Screen

    Gparted live cd - Desktop

    Gpared - Resize ntfs os partition
    Gparted - Create new Exetented partion

    Gparted - Creating logical partitions
    Gparted - After creating the partitions, Click Apply

    Gparted - Writing changes to the disk

    Read More

    Tarakeshwar temple, Yerwada, Pune

    No comments :

    Tarakeshwar temple is an old temple in Yerwada, Pune where Lord Shiva is the main god. This temple is situated at the top of a small hill near Yerwada bridge.

    Some pictures of the temple

    Temple gate near main road
    Path to the temple

    Temple entrance

    Tarakeshwar Temple

    Read More

    View of Pune city near tarakeshwar temple, yerwada

    No comments :

    Photos taken on 13th May 2011

    Busy traffic on old yerwada bridge and new bridge under construction

    Photo taken on 19th June 2011
    Yerwada bridge - Old and new one under construction

    Read More

    Recovering data from hard disk with corrupted partition table


    Last weekend I accidently overwritten the partition table of my dell inspiron mini 10 while trying to install the grub4dos mbr.
    I was trying to dual boot windows 7(default OS which came with the Netbook) and windows xp operating systems. Since Windows XP was installed after Windows 7, my netbook was not able to log in to windows 7. I did some experiments like using easyBCD, windows 7 recovery from USB drive etc to boot windows 7. But it did not work.
    After doing some research with the help of different tools, I found that problem is due to having different primary partitions. While booting, bios will check for a partition with boot flag set and loads the boot code from that partition. When windows XP is installed, it updated the boot flag such that partition with windows XP is bootable. So the recovery tools were updating the windows 7 boot partition, but the boot flag was set for the XP partition. So only Windows XP was booting.
    While I was trying different tools, I have erased the boot partition of Windows 7. So I decided to install grub4dos with its files on the boot partition.
    My plan was to create a bootable USB disk using and then install grub4dos from the commandline interface of grub boot menu displayed by the.
    But unknowingly I typed
    dd if=(fd0)/grldr.mbr of=(hd0)     => Wrong method 

    Instead of doing the steps 
    dd if=(fd0)/grldr.mbr of=(sd0) bs=440 count=1
    dd if=(fd0)/grldr.mbr of=(sd0) skip=1 seek=1
    which will leave the partition inforamtion and write only the mbr. 
    Partition Layout - Before writing mbr wrongly
    Partition Layout - After writing mbr wrongly

    Because of the wrong command, partition table is overwritten by grldr.mbr. When I rebooted, grub4dos was giving error that it cannot find the grldr because of the corroupted partition table. While trying commands root (hd0,0) grub reported that the partitions cannot be found. When I checked with the gparted live boot CD, it reported hard disk to be empty.
    Eventhough the partition table is erased, data contained in the disk is available. Fortunately I had a multiboot CD containing Bart PE. With getdataback NTFS software, I was able to recover the data from hard disk.
    Steps involved are
    1. Booting the Bart PE CD from external CD drive(Can be done from a USB flash drive also). While booting, also connect an external disk drive big enough to hold the recovered data.
    2. Scanning the hard disk using the getdataback NTFS(or FAT depending on the partition types).
    3. Getdataback software will list the possible partitions after the scanning.
    4. Save the scan data at this stage so that it can be loaded again for restoring another partition. This will help saving the time need for scanning the disk agiain.
    5. Select the correct partition from the list. Correct one can be identified by checking of size of the partition.
    6. Copy data to the external disk drive.
    7. Repeat the steps for another parititions. 
    Screenshots of using getdataback

    Read More

    Diagnostic Trouble Codes(DTC) - Lets you know health of your car/vehicle

    No comments :

    These days more people are aware of the global warming and CO2 emission, governments are imposing strict standards for Automotive manufacturers to follow. One of the standard which is widely in use in the automotive industry is OBD-II which defnes the vehicle's self diagnosis and reporting capability. It provides a list of vehicle parameters to monitor and how to encode the data. Here DTC or Diagnostic Trouble Code tells the fault which is detected in the self diagnosis.

    Modern vehicles
    Modern vehicles are equiped with more electronic parts which gives it intelligence and better capabilities. A car might contain 10s of microcomputer units inside it which is called as ECU (Electronic Control Unit). These ECUs can take input from the sensors and act upon those information and can also control some actuators(Depending on the function of the ECU). For example in Electric Vehicles there will be a separate ECU for monitoring the Battery pack and separate ECU for controlling the charging.
    Now these ECUs are interconnected using a network called as CAN (Analogus to ethernet in computers). ECUs passes information between them in the form of CAN messages. 

     DTC - Diagnostic Trouble Codes
    Whenever the vehicle is in operation, the ECUs keeps doing self diagnosis. Self diagnosis includes checking of the sensors, input signals, communication, on boards devices etc. Results of the diagnosis will be saved in the ECU, depending on the importance of the unit for which diagnosis and the type of the unit and ECU data sotred will vary. Each diagnosis unit in the velicle will be associated with a unique identification code of 3bytes called as Diagnostic Trouble Code.Conventions are followed in associating a DTC with a diagnosis unit.
    Powertrain Trouble Codes      P0xxx, P2xxx, P34xx - P39xx
    Body Trouble Codes     B0xxx, B3xxx
    Chassis Trouble Codes     C0xxx, C3xxx
    Network Trouble Codes     U0xxx, U3xxx

    DTC database for various vehicles can be found in the internet.
    In some vehicles with display pannel, the DTC information readout will be available.
    These DTC related infromations helps in finding problems in the vehicle and for repairing it.

    OBD Data Link Connector
    OBD Data Link Connecotors are used to connect an external scan tool to the vehicle, usually located under the dashboard. The scan tools can now access the CAN netowrk and then communicate with the ECU. Lot of scan tools are available in the market. Scan tools uses special protocol to communicate with the ECU(KWP 2000, DiagOnCAN etc)
    These scan tools will search all the ECUs for the stored diagnostic results. ECUs will send the DTCs for which the some problem was detected. 

    Some videos from youtube - OBD II DTC reading

    Read More