Monday, May 16, 2016

Android systrace "Could not find an importer for the provided eventData" error resolution

When opening a systrace generated html file, if you encounter error "Could not find an importer for the provided eventData", try this:

1. open chrome browser and go to "chrome://tracing"

2. in the tracing page, click load and select the systrace generated html file

This works for me.

Credit:
http://www.muzileecoding.com/androidoptimize/Android-Systrace.html

Friday, June 13, 2014

The type java.lang.Object cannot be resolved

see
http://dev-answers.blogspot.de/2009/06/eclipse-build-errors-javalangobject.html

Tuesday, June 11, 2013

multi-tab cygwin

Check  out "Console" at
http://sourceforge.net/projects/console/?source=dlp

Go to Edit -> Settings, set Shell to C:\cygwin\Cygwin.bat (or wherever your Cygwin path is)

Enjoy!

----------------------------
emacs: terminal type cygwin is not defined
I encounter such problem when using Console to ssh to a remote machine and emacs
Solution:
export TERM=ansi

----------------------------
Reference:
http://superuser.com/questions/30733/multi-tab-command-prompt-in-windows

Friday, June 7, 2013

Install emacs on Solari (SunOS) without root

Finally... done installing emacs on Solari without root -- really a painful process, so I decide to write this down and hopefully it can be helpful for people in same needs.


Normally, on a Unbuntu machine, install emacs without root would be easy. Suppose we want to install it in /home/xxx/emacs folder

1. Download the emacs source from http://www.gnu.org/software/emacs/ and untar the source to a folder

2. Go to the emacs source folder, run

    ./configure --prefix=/home/xxx/emacs
  make all
  make install

    in which --prefix=/home/xxx/emacs in configure command tells emacs to install everything to that folder.

3. Finally, add /home/xxx/emacs/bin to your PATH, done.

Simple and easy, right?


However, on Solari, everything got complicated (at least for me, a guy who first time use Solari), let me list the problems I encountered during the each step numbered above

1. First problem I find is that, "tar xzvf" is not working on Solari...
    Solution: use "gtar xzvf" instead

2. In the second step, first small problem is ./configure fails and says please add "--with-gif=no" option, that's  easy, just do it.

    The true problem comes when I find that typing gcc or make in terminal would result in "command not found"
    Solution: gcc is in /usr/sfw/bin or /usr/local/bin, make is in /usr/ccs/bin, add those three directory to PATH.
    Or, you can go to /usr and run
     find . -name gcc
  find . -name make
    to figure out where are those binaries then add it to PATH

    With PATH set properly, I try to make and install emacs 24.3, everything goes well. But after installing, when I try to run emacs, it won't boot and pop out an error message:
     Fatal error 6
     It turns out that the newest emacs 24 has some problem when running on older system (I don't remember the exact reason, something like emacs 24 does not support old version lisp)
     Solution: download emacs 23 instead, for me I used emacs 23.4

     Then repeat the same process. This time during make install, an error occurs:

chmod -R a+r /home/ding34/emacs/share/emacs/23.4/leim
for installuser in ${LOGNAME} ${USERNAME} ${USER} \
  `id -un 2> /dev/null`; do \
  [ -n "${installuser}" ] && break ; \
done ; \
find /home/ding34/emacs/share/emacs/23.4/leim -exec chown ${installuser} '{}' ';'
*** Error code 2
make: Fatal error: Command failed for target `install'
Current working directory /l/mobilityhome/ding34/emacs/tar/emacs-23.4/leim
*** Error code 1

     It turned out that the error is from the line
for installuser in ${LOGNAME} ${USERNAME} ${USER} \
  `id -un 2> /dev/null`; do \
     in leim/Makefile.
     The reason is the "id" command has different syntax on Solari compared to on Unbuntu, run "id -un 2" and it will tell you "id: illegal option -- u". Since the id command fails, the make will consider it as an error, report it, and exit.
     Solution: delete `id -un 2> /dev/null` part in the leim/Makefile, and re-run make install

     With one afternoon and one morning's effort, finally I got our lovely emacs working.

     Oh, one more thing, don't forget to put the emacs binary directory (which is /home/xxx/emacs/bin) into PATH!


     -----------------------
     Set up PATH:
     Edit ~/.bash_profile file (create it if it does not exist), and put all the export statement in it. It will take effect when you launch terminal next time. (So for the current terminal, you may still need to manually run export to set up PATH)

Thursday, June 6, 2013

cannot open google.com

This morning, I find my chrome cannot visit google.com -- it always says "the website is not available", while all other websites work well

Solution:
clear cookies
for Chrome, go to Settings -> Show advanced settings... -> content settings .. (under Privacy tab) -> All cookies and site data... -> remove all

And google works again.

Saturday, May 11, 2013

Friday, May 10, 2013

Missing "Developer Option" in CM 10.1

After flashing CM 10.1, find the developer option missing

Solution is here:
Settings -> About phone
click "Build number" for several times, the developer option will appear...

I know it sounds like a joke... but try it, it works...