How to disable shortcuts at android without rooted?

It's so nice to see android has keyboard shortcuts feature with keyboard attached[1]. But it may be a little annoying that we want to use those keys to do what we want. John Hu had created another open source project called shun-feng-er which is a tool for eye impaired person. During this project, we need to override the behavior of those shortcuts.

Different Indentation on Different Languages in Sublime Text

While writing programs in pyopencl, we should face the indentation of python and CL. According to the coding convention, python uses 4 spaces as the indentation and C uses 2 spaces as the indentation. So, we may want to configure our IDE to have different indentation on different programming languages.

As a user of Sublime Text, I found that the Syntax Specific is the correct place to configure it. If we want to configure C to use 2 spaces as its default indentation, we can do the followings:


The Cost of Open CL

One of my workmate had experiences on Open CL. We had a discussion on the improvement of histogram. And I learned that we should calculate the cost of Open CL before applying Open CL to a topic. The cost of Open CL is the time that we prepared everything for running Open CL. If the cost is larger than sequence code, we would never get any improvement with Open CL. But in most of cases, we will introduce a lot of calculation to Open CL. So, I wrote a program to measure the cost.

The program is pretty simple. We only measure the followings:

Open CL Histogram - Improvement Attempt

As we known, it is faster to use local memory or private memory in Open CL. To compare them, I had made a test on it. Before doing that, we may find the time elapsed of each part:

  • Open CL usage: about 0.9s (look fair)
  • Merging semiResult to finalResult: 18s (too bad)

It is very clear that the bottleneck is merging semiResult to finalResult.

If we use Python Image Library's histogram function, the elapsed time only took: 1.5s with the same picture, images/7728x4354.jpg.

The about:credits page in Firefox


There is a special URL in Firefox. If you type the about:credits in your Firefox, you may see a list of contributors. So many people help Mozilla to improe their/our products. As a paied contributor, my name is on the list, finally. That means my contribution is significant to Mozilla. That's a good news to me.

If you also want to be listed, just fix lots bugs. That's what I did.




Playing Real Basketbll

Are you playing Real Basketball? No matter what, I am. This is a awesome game. If you don't play it, you should try it. But I am not a good play honestly. So, I want to hire someone to swipe the phone for me. It sounds not make sense to hire someone. So, I wrote a small shellscript to do that for me. I called it RealBasketballBot. You may find it at my github repo: It's easy to use it: just plug the USB line and type the command [./ 400 1280 400 600 0.2] .