Tuesday, August 30, 2011

Conversion between signed & unsigned byte

Convert byte value from signed to unsigned

Use '&' operation with 0xFF  as follows.
Suppose signed byte value is byt (-120,64,....).

    byt & 0xFF

Above will convert signed to unsigned and return unsigned value.

Convert byte value from unsigned to signed

    ByteBuffer byteBuff = ByteBuffer.allocate(4);
    by[i] = byteBuff.get(3);

Above code convert  unsigned values to sign byte values.

Sunday, August 21, 2011

How to get System information in windows

  • Open command prompt
  • Type "systeminfo" command
  • Run the command
This will get a few seconds to load information.

Thursday, August 11, 2011

View Linux version using command

Use following command to get linux version.

uname -a

Monday, August 8, 2011

Mysql set auto increment start value

In default, auto increment values are started in 0(zero). Suppose you, want to start value auto increment with 1234, use the following command after table creation.