April 11, 2008

Google Summer of Code

Come again Google summer of code is here, I'm a little bit late to join being a mentor. Work has been driving me a little crazy here. But I did try to provide myself as mentor for openSUSE project. I will try to get my blog update more in the near future.

March 6, 2008

Universal Encoding Detector

After looking at all the Python, Rudy port of the Mozilla encoding detection engine. I really want to see a C library which get more flexible way of detecting encoding. So I port this extension to C and make a plugable model out of it. You can find out more in the google project home. Looking forward for you to join in and help.

January 18, 2008

How VMWare grabing Ctrl-Alt-F1 from X!

From the first look, it seem very simple. since XKB already provide lot of plug to getting in the Keyboard information. However, when you look closer. Ctrl-Alt-Fn key are really handle specially, and when X see this keysym it will not even pass it over to the client. This end up you even grabbing every key, but Ctrl-Alt-Fn will not able to grab by the client.
Then how vmware actually doing this? First look we using xev to check what kind of info we could get while clicking into VMware, we discover there is MappingNotification being send out will getting into VMware and getting out of VMware. Now we look at the XKB spec and see lot of functions is actually generating this Notification. So we need to recreate what vmware could do. Then we find xtrace. Which generate a very high detail and volume X trace log. It does really help alot. But if it could even control start and stop logging which will help even more. Then I'm pretty sure XSetModifierMapping is the functions to use.
What happen is when VMware being clicked, VMware will call XGrabKeyboard and then XGetModifierMapping for restore in future. And XSetModifierMapping to empty, so Ctrl-Alt-F1 will no longer being filter and F1 key will rather the Vmware client correctly.

November 10, 2007

ChinaFoo Camp

I just get back from the first ChinaFoo Camp, lot of peoples and lots of cool idea. I'm very excited to see so many start up in China, many creative and brave people working hard toward their goal. All in all, it is fun. Even though lot of people don't really know the format and what to do in a Foo Camp, I think next year will be better.

July 8, 2007

Fund and ETF

Since I'm living in China, Stock trading is like a comment flu nowaday. You see people talking about it everyday. I started stock trade since I make my first pay check in the 96. I never did make lot of money, but I havn't loss any either. The fact in china is, may company are still not very open and you never know their profile is 100% true or just a story they make up. But the hard fact is it grown like crazy, so everybody feel missing out when they are not in it. Lot of people think ( including myself ) Fund and ETF index will able to reduce risk in a long term investment point of view. ( I still believe that ) But how much of the investment growth are you expecting, what kind of return are you looking for. Setting a year 100% growth in last couple year seem to be very easy, however, in my book 30% growth is already high high return. When I look around and people start planning on double or even tripling their investment, I started to think they are just gambling rather then investing.

May 22, 2007

MoJo in Boston.

After 13 hours flight from Beijing to JFK, another hour flight from JFK to Boston. I get to Boston alive and in one piece. I'm staying in not the best side of the town. Homeless people and broken glass from a stolen car left on the ground are not so difficult to find. Reading the morning news paper seeing the mid-income for the 30s and net worth in the state are not much different from me, a guy in china, which make me feel safe but sad at the same time. Talking to a college kid from LeHigh while flying in JFK, knowing their tuition fee cost 50k a year kind of make me wonder how and who can going to school like that, not to mention ivy lead university out there. Of course that also make me feel better since I only pay 5k when I go to UNT. Which is only ten years ago :) ... I guess I'm really getting old or the inflation are just too high. Back to work, after a all day meeting. We took the metro and had dinner around Harvard square, the Mr. Bartley's Burger Cottage, it has been a while since my last real American style burger. Greasy smelt, used book bring back some college memory of course.

May 14, 2007

YaST是朋友还是敌人?

YaST friend or foe?
When you can almost do everything with YaST, it is great when it does what you wanted right? What if it doesn't? Coming close and working with SUSE Linux does give me a great benefit of learning how this tools work. Discover yourself you can go to the forge ftp and see it yourself. It is open source, so you can already make this tool work for your own distribution. However you will also have to learn the YaST's language to able to do that. And I'm no expert in this area, but good thing is most of the logic and work flow of different YaST modules are control by some xml file. So you can just play with it and get what you wanted. Let's take a look at the yast2-installation module. But updating the /etc/YaST/control.xml file you can make a customized SecondStage call becaues doing the reconfiguration for the network and video card etc in a very short time. Which lead us to a removable storage distribution.

May 11, 2007

Banshee插件第一课

当大家从Windows移MP3到Linux平台时,很多时候会出现乱码问题,有见及此看看能不能在Banshee内做一插件把有关问题解决.本来的想法很简单以为一天可以弄好,后来发现要再进一步才能全解.
第一课:在播放例表上本来就有改动ID3的Widget,只要在插件上把菜单加上,再连到己选列表再把ID3内容给用户选用不同的码如GB18030转到UTF8就可以了.基本上是可以的,但在列表上保留的ID3内容是从TagLib读完后保留下来的,因此已经转了一次码,那只可以直接再用TagLib把ID3的内容从读从转从写才可以...下回分解
Banshee Plugin take one
When someone move their MP3 files to Linux platform, most of the time will appear to be wrong encoded. So let see we can make a plugin in Banshee to solve this problem one and for all. At first it look like a simple enough idea that could be done in a day or two, however the story keep on coming.
First: Select the wrong encoded song in the play list, then we can put up a new menu item in the pop up menu. Signal it back to the convert function which could be select the original encoding by the user configuration, or just may be GB18030 ( for chinese ) and then convert to UTF8. Basically that is it and you are done. However, when I use the TagLib information from Banshee, it already get the data converted once. Which is not correct, so I need to read it directly from the media file and then convert it... Let's do that in the next session.

May 10, 2007

Linux下的Firefox不能看网上点播

如果你问我的话,我会告诉你这是网站开发人员的问题,他们不应该以单一平台为他们的开发和测试环境,当然作为Linux我们有一定的办法去解决不同的多媒体问题.例如MPlayerVLC等工具,当然很多人还不是很了解如何安装这些多媒体工具, SUSE用户可以到openSUSE的用户Xenmaster的网页http://en.opensuse.org/User:Xenmaster看看或直接加上安装源Packman, 如果你是用Debian或Ubuntu可以到Ubuntu Forums. 当大家安装好你们的播放器但还是看到Firefox内的点播如何办. 可以用凤凰网卫视做例子,在Firefox不能放是JavaScript和ActiveX的问题,简单的做法就是用GreaseMonkey把再以下的腳本安裝就可以看到了.

Firefox in Linux could not view online boardcast
If you ask me, I will tell you it is all the web developers problem, they should not just using single platform for development and testing. Of course in Linux we much get some mojo to get this kind of multimedia problem fix. Let say MPlayer and VLC different kind of media player to help save the day. But lot of people still do not know how to install those kind of player because of the codec problem. If you are a SUSE user you can go check out Xenmaster homepage in openSUSE http://en.opensuse.org/User:Xenmaster or you can directly add the install source from Packman, if you are a Debian or Ubuntu user go to Ubuntu Forums. After you get your media player and plugin all install but some how the firefox still won't able to play the online video then you can look at this example 凤凰网卫视, the firefox won't able to play because of the JavaScript or ActiveX problem, you can simply use GreaseMonkey and then download this script then you can see it.

May 8, 2007

Ubuntu UDS-Sevilla

This week I get invited to attend the Ubuntu UDS in Sevilla. A lot of people there this time. The schedule are very busy. Many new idea coming in from different groups. The question for me in this meeting is how am I able to help the China team to growth. It look to me that translation and input method are missing support people.