Winmail.dat in Thunderbird

I am puzzled a lot when I got emails with winmail.dat attachment, which is unknown file type attachment in my Thunderbird. Here is the solution for this annoying winmail.dat:

Go to https://addons.mozilla.org/en-US/thunderbird/addon/4433, follow it instructions to download the “LookOut” add-on for Thunderbird, and attached files inside winmail.dat will be listed and be recognized and be opened with existed programs.

Posted in Uncategorized | Leave a comment

Challenging Myself: Find 1st k-Digits Prime Number

Here is a task to challenge myself: Find the first k digits prime number. And k would be 16, 32, 64, 256, 1024, 8096, 65536, or even bigger.

And the most challenging thing would be most of key calculations will be performed in JavaScript engine hosted inside browsers. And a distributed algorithm will be designed. Algorithm which is similar to Google’s Map/Reduce will be designed. And Apache Hadoop’s Map/Reduce is also in references.

Any comments about this challenge? Or join me to design the algorithm! Or join the distributed computing game.

Keep tuned for how big the number k would be!

PS: After searching around Internet for existed prime number theories, I find out that k=16 is already a challenge for me! There are algorithms to find prime number in format of 2^p+1, whose digits may be bigger than 1000000. But there are not the 1st k-digits algorithms. According to theories, I should have to find out all prime numbers less than given n. But the count of prime numbers less than n is about n / ln (n), which is huge number already for k=16! So my first challenge would be 16.

Posted in AJAX, Challenge, Java, JavaScript | Leave a comment

Google Talk Client’s Java SWT Desktop Copy

Actually, Google Talk Client’s Java SWT desktop copy is the original source for Google Talk Client’s JavaScript copy.

And now it is available for download. Please take a trial.

Sources of Java2Script Google Talk will be available in the next week. Keep tuned.

Posted in AJAX, Google Talk, Java, Java2Script | 8 Comments

Debug into rt.jar

If you ever use Eclipse trying to debug into Java’s system APIs, such as java.lang.String or java.math.BigInteger, you may find that even you can step over or step in, or have the correct source file open and the correct line of codes highlighted, you still could not see the local variables’ value and method’s parameters are shown in pattern of “arg0″, “arg1″ and so on.

Yes, you are already using JDK instead of JRE. But you still have the above problem. What’s wrong? It’s not a bug of Eclipse. It is all about the rt.jar along with the JDK (1.5 or 1.6). In Sun’s official JDK release, debug symbols are already packed into the rt.jar. But local variables’ debug information is not packed. Sun may consider that it is not OK to includes those local variables’ debugging information. That is the source of problem.

To solve this problem, you may need to upgrade to JDK 1.6. Download DEBUG jar file from
http://download.java.net/jdk6/binaries/
Double click it to install a new JDK. And configure your Eclipse to use the new JDK.

For JDK 1.5, recompiling rt.jar by yourself, or other information, please visit
http://forums.java.net/jive/thread.jspa?threadID=399&tstart=0
for a detailed discussion.

Posted in Debug, Java | Leave a comment

Google Talk Client’s JavaScript Copy

http://demo.java2script.org/gtalk/

Here is the screenshot:

Click for Large Screenshot: Google Talk Client’s JavaScript Copy

En, in beta …

Posted in AJAX, Google Talk, Java2Script | 5 Comments

Ridiculous mod_jk Problem with Flush Method

I am writing Java2Script’s Google Talk, and it uses a mode of continuation (also known as “Comet” application). In order to implement continuum data transfer between browser and server ( Tomcat in the backend ), I kept the HTTP connection blocked waiting for data to be available. In the middle, Apache httpd server is used and mod_jk is used to connect the two server.

But I met a ridiculous problem between servlet container and http server. When the browser is assigned to connect servlet directly, it can obtain data from the connection, but it can not obtain a bit when it is piped through Apache httpd server.

I tried to add “Transfer-Encoding: chunked” or “Content-length: 0″ but with no helps. And I modified jk.conf with “JkOptions +FlushPackets”, still with no helps. Finally, I remove a line of “writer.flush();” from my servlet source, and things all went correctly.

The line of “writer.flush();” was located in the the line when there is no data written to the response. And I considered that when there are no data in the response, calling flush method will hang mod_jk connector up. And the whole later data transfer will be disturbed.

More details about mod_jk, I recommend you to read “Tunning apache and tomcat for web 2.0 comet application“.

Update:
Finally I found out that “JkOptions +FlushPackets” works for me. #flush method problem is a fake problem. Only after I restart both Tomcat and Apache server do “JkOptions +FlushPackets” begin to work.

Posted in AJAX, Tomcat, httpd | Leave a comment

Busy Days on Java2Script Google Talk

Ya, these days were very busy.

I had spent more than a month on rewriting Java2Script Google Talk. And today, it was almost finished. You can check it out right now.

More works are required to make it robuster and faster. Maybe Java2Script Google Talk will be publicly released in the next week.

And next release of Java2Script is on the way too. It will be a 1.0.0 RC release. Four months was a long long time since last release.

Posted in Google Talk, Java2Script | 2 Comments

Executing is VERY Important

Finally, I realized that ideas is much less important than executing.

You may have some brilliant ideas, but you can’t work it out? Or you can’t make your guys to work it out in a short time? You ideas will wane away.

Colleague is much important for both company’s future and one’s job career. To choose a company, one must also take partners as a factor that one should consider.

Smart people should not spend their times trying to fix the bugs left by normal or dummy people. Or your times will be wasted.

Posted in Project Management | Leave a comment

Transferring Data Between Two Human Minds

In Steve Pavlina’s article 10 Weaknesses of Human Intelligence, he mentioned one thing:

Poor networking capabilities – Transferring data between two human minds is slow, tedious, and error-prone, and the protocols are beyond confusing. It’s a safe bet that Microsoft is involved.

It is not mentioning “Microsoft” the reason I quoted his thoughts. I think not only Microsoft is trying to improve the capabilities for transferring data between two human minds, lots of other companies are also devoting in such works. For example, QQ (tencent.com in China), MSN, AOL, Google Talk and other instant messenger company are trying to help people communicate with each other. And these days, lots of social network websites are online helping people to have a better relationship online or offline. I could say that this is a big direction for IT future.

And I am thinking about in which ways there are needs of innovations for transferring data between two human minds. IMHO, some big companies may already be on their ways.

Posted in Uncategorized | Leave a comment

QT Jambi

I just tested QT Jambi. It is cool of QT widgets in Java. I like it. And it is very fast and the QT Designer is good but not as good as WindowBuilder Pro‘s SWT Designer, IMO.

But there is a nasty bug for QT Jambi integration with Eclipse. QT Jambi will add a com.trolltech.qtjambi.juicBuilder to each projects in my workspace. And these modifications will mark all of my projects as SVN modified. I have to disable it and restore all my .project files! This bug is really nasty!

Posted in Jambi, QT | Leave a comment