Scientific research is like sex

"Physics is like sex: sure, it may give some practical results, but that's not why we do it." — Richard P. Feynman

It seems that everything can be built some analogy to sex, in most cases I guess, there are more than one analogy you can make.

To test the statement, I hereby give an example on my current work, science research. Just make it for fun, not for specific points.

  1. Scientific research is like sex: Time is used to assess one's ability to do it, of course it is bias. 
  2. Scientific research is like sex: You can gain pleasure by thinking of it. 
  3. Scientific research is like sex: Although you can do it by yourself, things will go better when you have a partner. But when you have lots of partners, especially at the same time, situations will not easy to control. 
  4. Scientific research is like sex: As is demanded in most of cases, It's preferable to have a 'PhD'. (Hint: pretty huge dick).
  5. Scientific research is like sex: In some specific cases, animal can also be the object to try. 

Map An Image on A Surface

I've been always wondering how to create some interesting profile photos, so as to show off  to the guys on facebook or twitter. Of course the photo should be different with others, which should not be simply photoshoped. Here comes a simple idea: why not spread a photo on a surface?

With matlab, it's definitely not hard to make one.  I referred to the matlab document , at Coloring mesh and Surface Plots.  The "surf" function is a classic tool to plot surface. Inputting a meshgrid matrix with certain spatial shape, it will plot the surface out. Then we can play with the color property of the surface, so that the color accord with the our photo property.

The procedure goes like this:
  1. Import a graph to matlab, transform the RGB image to an index image. 
  2. Create a surface you want, like sphere, cylinder, you name one.
  3. Use "surf" function to plot the surface.
  4. Change the"Texture mapping" properties of the surface, with the image. 
Here are the codes:


G= imread('filepath & file name'); % load an image
[X,map] = rgb2ind(G,256); % Convert RGB image to indexed image
% Create a surface
[theta,~]=meshgrid([-pi:0.1:pi,pi],[-pi:0.1:pi,pi]);
%[x,y]=meshgrid(10*cos(theta),10*sin(theta));
x=10*cos(theta);
y=10*sin(theta);
[~,z]=meshgrid(1:length(x));
surf(x,y,z) %plot the surface
h = findobj('Type','surface'); % get the object of the surface 
set(h,'CData',flipud(X),'FaceColor','texturemap','EdgeColor','none') % Change the surface property
colormap(map) % change colormap 
rotate3d on






A Zotero Problem running on openoffice, fixed

I fixed a Problem when using Zotero in openoffice.

The Error information is :

Firefox could not load the component required to communicate with your word processor.

Here is my software settings:
  • Ubuntu 9.10 64-bit
  • Firefox 3.6.3
  • Zotero 2.0.2
  • Zotero integral for Openoffice 3.07
  • Openoffice 3.1

Zotero official support categorizes the problem as "
OpenOffice component loading error". They said this error is usually caused by a non-functioning Java installation. (For more, see this link: http://www.zotero.org/support/word_processor_plugin_troubleshooting )

It took me a lot of time to solve this. To my experience, the solution could be 3 steps in general.

1. Install Java 6.

To check weather Java for firefox works, you can do by the link:(http://www.java.com/en/download/installed.jsp) . For Firefox 3.6, It need Java 6 Update 10 and above. Reason see below:
http://www.java.com/en/downaload/faq/firefox_newplugin.xml

2.Enable java in firefox.

Usually the way is just simply click "enable Java" in firefox preference. However I didn't find the "Enable Java" on Edit>Preference>Content. The reason is that "Enable Java" checkbox has been removed from the Content panel. And we can enable and disable Java using the Add-ons window. But the wired thing is that I can't find Java item in Plugins in Add-ons window. So, I have to go to step 3.


3.Manual Installation and Registration of Java Plugin for Linux

The key is to Create a symbolic link to the Java Plugin libnpjp2.so file in the Firefox plugins directory.
the command is :
cd (Firefox)/plugins
ln -s (JRE)/lib/i386/libnpjp2.so

Since I'm using 64-bit ubuntu , so the command should be:
cd (Firefox)/plugins
ln -s (JRE)/lib/amd64/libnpjp2.so
For detail see this link: http://java.sun.com/javase/6/webnotes/install/jre/manual-plugin-install-linux.html

The Na'vi beauty in Avatar

After I saw the 'Avatar', I found the alien Na'vi girl, Jake' GF, is very beautiful! Kind of exotic beauty.
Also, I'm very interested in the Na'vi language. It's similar with Klingon. lol.


Oh, Missionary Again

When I got out of subway, a tall young white guy, looking at me from long distance, stepped directly close to me. After google in memory, I started to make sure that I don't know him, totally. But he opened his mouth and say to me, in French. I shrugged and asked him if he speak English. And then he speak in fluent English, "My name is &*%^$(I don't remember that), I'm a missionary, coming from England..." I suddenly realize why he, a stranger, talk to me so actively. I don't want to hurt them, because I know they are nice person. I know they are different from annoying promotion man. So I said is sorry and thanks.

This is the second time I met a missionary in a month. I 'm thinking, do other people also met missionary so often like me? Is this because I have some special quality or something else that make missionary like to choose me in a bunch of crowd people? Do I look nice that tend to accept them? Or Do I seem like evil that need to save?

Anyway, I wish them good luck and do not choose me again.

Matlab on Ubuntu

I finally installed Matlab on my Ubuntu system. lol.
That is indeed not easy. Several days ago, I always fail to set up Matlab R14 to ubuntu 9.04. The problem is as below:

An error status was returned by the program 'xsetup',
the X Window System version of 'install'. The following
messages were written to standard error:

Segmentation fault

Attempt to fix the problem and try again. If X is not available
or 'xsetup' cannot be made to work then try the terminal
version of 'install' using the command:

install* -t or INSTALL* -t

-------------------------------------------------------------------
.: 15: Can't open /tmp/5892tmwinstall/update/install/cleanup.sh


I searched for technical aid, but none of the tip helps. I think the problem may caused by pulsevidio or java. Because I just installed the two software before I try to install matlab.

So I downloaded Version 2009b. This time I succeed without big trouble. An important procedure before start matlab is to start the licence magager server (/etc/lmstart) in the first place.

Enjoy my screenshot:

Blogger is blocked

As blooger and facebook are blocked by GFW, It's less and less for me to update the blogs. I hate the damned GFW! But I guess the situation would get better when I arrive in Canada in several weeks latter.

Of course it is just an excuse. Acturally I have much more important thing to do.

Another excuse. Haha.