Sunday, January 27, 2008

Screen Rotation Shortcut For Vista

Supported OS: Windows XP Tablet Edition

Supported Graphic Card: Intel Graphic Card

Note: "complementary with ..." means if the combination does not function, try the other combination after "with".


Ctrl-Alt-Up: -180 degress (complementary with Ctrl-Alt-Down)

Ctrl-Alt-Right: 90 degrees (complementary with Ctrl-Alt-Left)

Ctrl-Alt-Down: +180 degrees (complementary with Ctrl-Alt-Up)

Ctrl-Alt-Left: 270 degree (complementary with Ctrl-Alt-Right)


To disable it:

On XP: Start >> Control Panel >> Display >> Settings >> Advanced >> Intel Graphics >> Graphics Properties >> Hot Keys >> Disable the combination

On Vista : Start >> Control Panel >> Personalization >> Display Settings >> Advanced Settings >> Intel Graphics >> Graphics Properties >> Hot Keys >> Disable the combination

Reference: Link

The Flaws Of Macbook Air

The main problems:

1. Exclusive Price?
You do not know how much you will pay for Apple's products after Macbook Air. The accessory purchases, software purchases, and iTunes rentals, and you have to buy all of them exclusively in Apple Store. Many of these flaws can only be fixed or alleviated with more investment of money and time.

2. Device or Computer?
Parts, Ram and Battery are not interchangeable. So this computer is more like a human artifact than a tool?


Battery
Not user Replaceable
129 for a battery replacement(installation included)

No Optical Drive
True wireless productivity? Or is it more like iTunes dependency? Why?

Remote Disc ---not yet an alternative
1. Can't install OS via Remote Disc.
2.Remote CD/DVD host may not always be available when needed. (You need to bring your remote disc software when you're on the road too)

Hard drive
Slow ---only 4,200rpm
2GB of RAM only
No option to upgrade

MacAir-only External Optical Drive
The $99 external Superdrive is only exclusive for Macbook Air, not compatible with any other laptops.

Convert Integer to Byte in Java

I have been working on the Huffman Encode/Decode and this has been the most annoying part of the Encoder piece of the program----Converting an integer into a 3-byte or 4-byte representation.


private static int[] generateByte(int integer, int byteLength) {
int[] byteStr = null;
if (byteLength==4){
byteStr=new int[4];
byteStr[0]=(byte)((integer & 0xff000000)>>>24);
byteStr[1]=(byte)((integer & 0x00ff0000)>>>16);
byteStr[2]=(byte)((integer & 0x0000ff00)>>>8);
byteStr[3]=(byte)((integer & 0x000000ff));
}

if (byteLength==3){
byteStr=new int[3];
byteStr[0]=(byte)((integer & 0x00ff0000)>>>16);
byteStr[1]=(byte)((integer & 0x0000ff00)>>>8);
byteStr[2]=(byte)((integer & 0x000000ff));
}
return byteStr;
}

Reference:
1. Java Forum Post: Convert integer to 4 byte[ ] array and back to integer value
2. Java Quick Reference: Operators and Assignments - Binary/Octal/Hex and Decimal Number Systems

Saturday, January 26, 2008

Y! Mash Invite Share

According to the Mash Blog:

Y!Mash is a new approach to your profile that brings your people together and keeps things interesting. Mash is invite-only right now, so ask a friend who’s in to get you in.

In Mash, you can:
- Find and connect with your old and new friends
- Comment and make conversation on the page
- Add page modules to style the your page up.
- And so much more yet to come

If anyone wants an invite, please leave your email in the comments. That's all.