Selasa, 28 September 2010

Download And Build 0xdroid On Unix

Q: I am trying to download and build 0xlab's Android distribution on Unix but am facing many issues. Please help!

Specifically I am trying to download and build from scratch 0xlab's Android on Ubuntu 10.04. 0xdroid is customized Android that runs on Beagleboard, which is a low-cost fan-less single board computer which features OMAP3530 processor that delivers laptop like performance at handheld power levels. You can find out more at http://beagleboard.org/.

Let's get down to installing 0xdroid on Unix! Keep in mind many issues you face here may occur when you download and build the original Android source. So this post may help those who are building the original Android too! Questions?

Copy the following text to /etc/apt/sources.list

deb http://tw.archive.ubuntu.com/ubuntu/ lucid main restricted
deb-src http://tw.archive.ubuntu.com/ubuntu/ lucid main restricted

## Major bug fix updates produced after the final release of the
## distribution.
deb http://tw.archive.ubuntu.com/ubuntu/ lucid-updates main restricted
deb-src http://tw.archive.ubuntu.com/ubuntu/ lucid-updates main restricted

## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu
## team. Also, please note that software in universe WILL NOT receive any
## review or updates from the Ubuntu security team.
deb http://tw.archive.ubuntu.com/ubuntu/ lucid universe
deb-src http://tw.archive.ubuntu.com/ubuntu/ lucid universe
deb http://tw.archive.ubuntu.com/ubuntu/ lucid-updates universe
deb-src http://tw.archive.ubuntu.com/ubuntu/ lucid-updates universe

## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu
## team, and may not be under a free licence. Please satisfy yourself as to
## your rights to use the software. Also, please note that software in
## multiverse WILL NOT receive any review or updates from the Ubuntu
## security team.
deb http://tw.archive.ubuntu.com/ubuntu/ lucid multiverse
deb-src http://tw.archive.ubuntu.com/ubuntu/ lucid multiverse
deb http://tw.archive.ubuntu.com/ubuntu/ lucid-updates multiverse
deb-src http://tw.archive.ubuntu.com/ubuntu/ lucid-updates multiverse
deb http://us.archive.ubuntu.com/ubuntu/ karmic-updates multiverse
deb-src http://us.archive.ubuntu.com/ubuntu/ karmic-updates multiverse

## Uncomment the following two lines to add software from Canonical's
## 'partner' repository.
## This software is not part of Ubuntu, but is offered by Canonical and the
## respective vendors as a service to Ubuntu users.
deb http://cz.archive.ubuntu.com/ubuntu jaunty-updates main multiverse
deb http://security.ubuntu.com/ubuntu lucid-security main restricted
deb-src http://security.ubuntu.com/ubuntu lucid-security main restricted
deb http://security.ubuntu.com/ubuntu lucid-security universe
deb-src http://security.ubuntu.com/ubuntu lucid-security universe
deb http://security.ubuntu.com/ubuntu lucid-security multiverse
deb-src http://security.ubuntu.com/ubuntu lucid-security multiverse


This sets up necessary packages for downloading and building Android from scratch. Questions?

Update 'apt' and install tools as necessary via 'apt-get'

Execute 'sudo apt-get update' to update apt since you've changed /etc/apt/sources.list. On my unix machine I needed to install 'curl' via 'sudo apt-get install curl' before moving on. If you have curl skip this step. Along the way of following this tutorial if you get a message saying "xxx command not found" then install it via 'sudo apt-get install xxx'.

Install packages to build Android source

- Follow instructions on http://source.android.com/source/download.html (refer to http://www.stata.com/support/faqs/win/64bit.html to find out whether you are 32 bit or 64 bit) to install required packages to build Android source files. MAKE SURE you are following the correct instructions based on whether your Ubuntu Linux is 32-bit x86 or 64-bit x86.

- Follow instructions on http://code.google.com/p/0xdroid/wiki/Source to set up the building environment, how to download 0xdroid source code and how to build it from scratch.

Here are some of the errors you may get and how to resolve them: Questions?

Errors that may occur and how to resolve them

Error #1
============================================
bin/bash: prebuilt/linux-x86/toolchain/arm-eabi-4.4.0/bin/arm-eabi-gcc: No such file or directory
/bin/bash: line 0: cd: sdk/layoutopt/app/src/resources: No such file or directory
host C: acp <= build/tools/acp/acp.cIn file included from /usr/include/features.h:378, from /usr/include/stdlib.h:25, from build/tools/acp/acp.c:11:/usr/include/gnu/stubs.h:7:27: error: gnu/stubs-32.h: No such file or directorymake: *** [out/host/linux-x86/obj/EXECUTABLES/acp_intermediates/acp.o] Error 1============================================

Solution: Execute 'sudo apt-get install libc6-dev-i386'


Error #2
============================================
/bin/bash: line 0: cd: sdk/layoutopt/app/src/resources: No such file or directory
host C: acp <= build/tools/acp/acp.chost C++: libhost <= build/libs/host/pseudolocalize.cpphost C: libhost <= build/libs/host/CopyFile.chost StaticLib: libhost (out/host/linux-x86/obj/STATIC_LIBRARIES/libhost_intermediates/libhost.a)ar crs out/host/linux-x86/obj/STATIC_LIBRARIES/libhost_intermediates/libhost.a out/host/linux-x86/obj/STATIC_LIBRARIES/libhost_intermediates/pseudolocalize.o out/host/linux-x86/obj/STATIC_LIBRARIES/libhost_intermediates/CopyFile.ohost Executable: acp (out/host/linux-x86/obj/EXECUTABLES/acp_intermediates/acp)/usr/bin/ld: skipping incompatible /usr/lib/gcc/x86_64-linux-gnu/4.4.3/libstdc++.so when searching for -lstdc++/usr/bin/ld: skipping incompatible /usr/lib/gcc/x86_64-linux-gnu/4.4.3/libstdc++.a when searching for -lstdc++/usr/bin/ld: skipping incompatible /usr/lib/gcc/x86_64-linux-gnu/4.4.3/libstdc++.so when searching for -lstdc++/usr/bin/ld: skipping incompatible /usr/lib/gcc/x86_64-linux-gnu/4.4.3/libstdc++.a when searching for -lstdc++/usr/bin/ld: cannot find -lstdc++collect2: ld returned 1 exit statusmake: *** [out/host/linux-x86/obj/EXECUTABLES/acp_intermediates/acp] Error 1============================================

Solution: install libraries according to http://source.android.com/source/download.html and you should be good to go. My error was caused by not executing "sudo apt-get install git-core gnupg flex bison gperf build-essential zip curl sun-java5-jdk zlib1g-dev gcc-multilib g++-multilib libc6-dev-i386 lib32ncurses5-dev ia32-libs x11proto-core-dev libx11-dev lib32readline5-dev lib32z-dev"


Error #3
============================================
Target system fs image (ubifs): out/target/product/beagleboard/obj/PACKAGING/systemimage_unopt_intermediates/system.img
Making ubifs
/bin/bash: .repo/repo/repo: No such file or directory
/bin/bash: .repo/repo/repo: No such file or directory
make: *** [out/target/product/beagleboard/obj/PACKAGING/systemimage_unopt_intermediates/system.img] Error 127
============================================

Solution: Did you move your beagle source code from their original directory to another directory? for example perhaps you did "repo sync" somewhere you didn't want and realized it later, then you moved them in the correct directory which is beagle-donut/. If so make sure you copy all hidden files as well. Use this command to copy hidden files: 'sudo cp -r .[a-zA-Z0-9]* beagle-donut/'


Hope that resolves any issues you encounter during downloading and building Android source code. Questions? Let me know!

Happy playing with Android!

Eclipse Content Assist Is Not Working In Unix

Q: I CANNOT uses Content Assist in Eclipse while pressing Control + Space. Why?? It's driving me nuts!!

More specifically I installed Eclipse IDE for C/C++ Developers Helios Version on my Linux machine which is running 64 bit Ubuntu 10.04 LTS. Pressing Control + Space in Eclipse should activate content assist so that it helps me finish what I want to type. It works in Eclipse installed on Windows OS and Mac OS. How comes it doesn't work in Eclipse installed on Unix?

There are several possible causes. Here they are in the descending order of probability:

* Make sure your bound keys are Control + Space: As funny as it sounds in Eclipse C/C++ IDE Helios running on 64-bit Unix Ubuntu, the keys bound to activate content assist by default are Alt + / (forward slash) not Control + Space! Therefore simply open Windows -> Preferences window and go to C/C++ -> Editors -> Content Assist -> Advanced and here's the window you should see:

Eclipse Content Assist Advanced Window

Then click on Keys link at the right (or simply go to General -> Keys). Then you'll see a window allowing you to change binding keys of any available command like the following:

Eclipse Command Binding Keys Window

* Make sure Control + Space is not used by another application: The most common one is Windows text input function. If you enable English and another language as input languages make sure they are not using Control + Space to change between them.


That's it! Questions? Let me know!

Selasa, 14 September 2010

COMPLETE Guide To Install IE6 On Windows 7 Home Premium

The need to install Internet Explorer 6 on a PC with Windows 7 Home OS is a common one for web developers as pointed out by Cross Browser Compatibility Tutorial. However you'll face many issues. I've found various guides that solve a part of the problem. Together they solve them all. It's about time someone wrote a post on how to solve this problem from start to finish, with no guesswork and no questions along the way!

The following is a screen shot of Windows Virtual PC running Windows XP SP3 with IE6 installed, our goal for today:
Windows Virtual PC Screenshot

Let's get to each problem you may face and how you can resolve it!

Problem #1: You CANNOT install IE6 directly on Windows 7 Home Premium OS. One way to get around this issue is you need to use some sort of virtual PC to run Windows XP and then run Internet Explorer 6 in that environment.

Problem #2: However, Windows XP Mode and Windows Virtual PC are available ONLY on Windows 7 Professional and Windows 7 Ultimate as this website suggests:

http://www.microsoft.com/windows/virtual-pc/

That's convenient It says nothing about how one can do the same thing with Windows 7 Home edition :-( Lucky you! I've figured it out by myself. To get around this issue install Windows Virtual PC. You can download Virtual PC for Windows 7 at the following URL. If your PC is 64-bit download
Windows6.1-KB958559-x64.msu. If your PC is 32-bit download
Windows6.1-KB958559-x86.msu.

http://www.microsoft.com/downloads/details.aspx?FamilyID=2b6d5c18-1441-47ea-8309-2545b08e11dd

Note: Do NOT install Microsoft Virtual PC. You'll get a compatibility error when you try to run it. Questions?


Problem #3: Your PC needs to support HAV, short for Hardware-assisted virtualization. To know whether your PC supports HAV download the HAV detection tool at

http://go.microsoft.com/fwlink/?LinkId=163321

If your computer does not have hardware-assisted virtualization, you'll get an error while creating a virtual PC. To get around this issue, download and install a hot fix at

http://support.microsoft.com/default.aspx?scid=kb;EN-US;977206

Questions?


Problem #4: You need to have license to a genuine Windows XP image. But nobody would want to shell out hundreds of dollars to get Windows XP just so they can test IE6 right? There's an alternative that costs you NOTHING. There's a place where you can download hard disk images for testing websites with different Internet Explorer versions on Windows XP and Windows Vista. Download IE6-on-XP-SP3.exe at

http://www.microsoft.com/downloads/details.aspx?FamilyId=21EABB90-958F-4B64-B5F1-73D0A413C8EF&displaylang=en

Run IE6-on-XP-SP3.exe to get IE6 on XP SP3.vhd. Note where it's installed as you'll need it in the following step.

The problem is that the image has an expiration date of several months. This should be fine. When the disk image expires simply download the same file again at the same website. Questions?


Now you've gone through all the issues and resolutions. Let's create a virtual pc and run it! Go to Start menu and pick 'Windows Virtual PC' from 'All Programs' and you should see the following window.

Windows Virtual PC Window Screenshot

Click on Create virtual machine and fill in 'ie6' in Name field. For Location field fill in the path to the disk image you just downloaded and executed. For example mine is C:\Users\michael\Desktop\software\IE6 on XP SP3.vhd.

Your virtual machine should be up and running. If you don't get Internet in the virtual machine then read on. When you open 'Windows Virtual PC' again you'll see ie6.vmcx in the list like the following:

Windows Virtual PC Window with One Virtual Machine

Right click on it and pick Settings and you should see the following window:

Windows Virtual PC Settings

Click on Networking and select the wireless network adapter installed on your PC in 'Adapter 1' field. If you are not sure simply try each option and start the virtual machine until you get internet in the virtual machine.

TIP: Click on Integration Features and uncheck 'Enable at startup' because I don't find it useful and it takes a long time to run when enabled.

TIP again: Another thing is if you leave the virtual machine on idle you may be prompted to enter the password for the account. If you forgot your password while creating the virtual machine simply restart the virtual machine and create a Guest account in 'User Accounts' in 'Control Panel'. Then use that Guest account! Your purpose is to test IE6 anyway :)

TIP again twice: If you want to set up Internet Explorer 6 simply because you'd like to test your website, refer to How To Install Internet Explorer 6 so You Can Test Your Website On IE6!


Questions? Let me know!

Beautiful Origami Swan Examples

MenuOrigami Swan Tutorial
Making Origami Swan Basic Procedure
Making Origami Swan Basic Part
Beautiful Origami Swan Examples
Here are some origami swan examples I made. The first photo below is the basic swan origami I started off with. After I was done I put a red bow on its neck! This swan is not as detailed as you can see - each round only has 17 pieces. The second and the third swans each has 21 pieces making them appear more detailed and meticulous!

Origami SwanWhite Origami SwanCute Origami Swan

The origami swan is easy to make, but it is quite time-consuming How much time it takes depends on people, but in general I'd say it takes about 10 hours. It also depends on how big and how detailed you want to make it. For example, you can make the girth of the swan larger, but it requires a lot more pieces for each round. To start off each round can consist of 17 pieces. Once you get the hang of it, you can make another swan where each round has 25 to 30 pieces, and the swan will look much more detailed!

You should be able to see from the photo how it's made. Questions? Let me know!

Once you get used to it, you can get creative and make much more complicated models. Sky is the limit! You can add small decorative elements on your work. Here is a more advanced swan origami I made for my aunt who did so much for me. I would never have made it here if it wasn't for her help. I am not sure what a phoenix looks like, but I'll just call this one an origami phoenix. Any objections

Origami Phoenix

Here is a picture of the origami swan and origami phoenix together.

Origami Swan and Phoenix

Aren't they beautiful?

I like taking the time making something for someone important to me, and it really manifests my gratitude in a way that things you buy can't. Of course it really depends on the recipient. If they are materialistic, they probably would feel happier if you bought them something nice. If they are spiritual, a paper swan you made with sweat and blood would make a great gift. But in either case, you can learn how to make it in case the need arises

◀ Making Origami Swan Basic Part

Making Origami Swan Basic Procedure

MenuOrigami Swan Tutorial
Making Origami Swan Basic Procedure
Making Origami Swan Basic Part
Beautiful Origami Swan Examples
Cute Origami SwanHere is the general procedure of making an easy origami swan like the one in the photo:

* Get materials. A swan is white, so white paper is generally enough. If you want to go for a different color you can. The beak of the swan should be of a different color, like red. When you get good at this you can also add bells and whistles to your work. For example, you can add fake eyes and glitter

* Measure and cut paper. The goal here is to cut paper into rectangular pieces that you will be folding into basic parts. You need at least 150 basic parts to make a swan. For each basic part, the proportion of width versus height is 3 : 2. If you want to make a small swan, each part can measure 4.5cm by 3cm. If you want to make a bigger one, you can go 6cm by 4cm or even bigger.

* Make basic parts. You fold each piece of paper into the basic part which is the basic construction piece. How many depends on your design and size. I'd say you need at least 150 pieces. If you want to do something elaborate it can go up to 1000 pieces.

* Assemble the basic pieces into a swan. You don't need to glue the body, but you need to glue the neck and maybe the top part of the wings to make them stay. I use white glue, but you can use any glue you want!

* Post process: This is purely personal and depends on your design. You can decorate it by putting some things on the body such as glitter, whistles, fake eyes, etc. If you do be careful not to overdo it because it may look too fancy! A swan should be simple and white shouldn't it?

◀ Origami Swan TutorialMaking Origami Swan Basic Part ▶

Making Origami Swan Basic Part

MenuOrigami Swan Tutorial
Making Origami Swan Basic Procedure
Making Origami Swan Basic Part
Beautiful Origami Swan Examples
Cute Origami SwanHere are step-by-step visual instructions of making a basic piece that you'll use to make the swan origami in the picture:

Lay the piece of paper on the desk (ratio of width to height is 3 : 2).


Fold it in half.


Fold it in half again.


Unfold it and observe the crease.


Fold the left side.


Fold the right side. Note I leave a small split between the two flaps to make the next step easier.


Turn it over.


Fold the left corner. Note I leave a small split to make folding easier.


Fold the right corner. Note I leave a small split to make folding easier.


Fold the bottom part up.


Fold the whole thing in half.


Here is what it looks like from another angle.


That's it! Easy isn't it? If you haven't got it, let me know!

It's easy to make just one, but you gotta make hundreds and hundreds before you can make a swan! Make them while watching TV, listening to music or the radio, waiting for the bus, etc. There are plenty of occasions where you can fold these little pieces while not wasting any time. Go Go Go! You are almost there!

◀ Making Origami Swan Basic ProcedureBeautiful Origami Swan Examples ▶

Sabtu, 04 September 2010

How To Remove Paint From Concrete Floor

Q: I just finished painting my kitchen walls and now I am having a hard time cleaning paint stains off the floor. Any tips?

First of all it's a great idea to duck tape newspaper on the floor before you paint so that you won't get any paint on the floor when you are done. Next time you know

That said if are trying to get paint stains off the floor or any concrete surface, try the following two tools. I've found them especially effective:

Steel sponges: They are EXTREMELY effective in removing random sloshes and strips of paint stains. They look like:

Stainless Steel Sponges for Removing Paint


Steel Scrapers: They are great for removing sizable drops of paint stains. A small stainless steel scraper looks like this:

Steel Scraper

The blade of a steel scraper works wonders when it comes to removing dry, bulging drops of paint! If you can't find one you can use a steel shovel or chisel or treaded spade. A steel chisel looks like:

Steel Chisel for Removing Paint

And a steel treaded spade looks like:

Steel Treaded Spade for Removing Paint

As you can see their blades are GREAT for scraping the paint off any surface! Just scrub and scrape the stains switching between steel sponges and steel scraper and you'll see how effective a team they make


Now you should be able to remove the toughest paint stains from the concrete surface or any hard floor surface! Once you remove the paint stains simply sweep them up and throw them away.

Questions? Let me know!
 
support by: infomediaku.com