Friday, September 7, 2012

Error: /usr/bin/ld: cannot find -lncurses

I was working with genometools with HMMER enabled. While compiling, I got the following error message:

$ make with-hmmer=yes threads=yes cairo=no
[check for HMMER3]
[build HMMER3]
[compile pdom.o]
[link libgenometools.a]
[link libgenometools.so]
[link skproto]
/usr/bin/ld: cannot find -lncurses
collect2: ld returned 1 exit status
make: *** [bin/skproto] Error 1

I checked that libncurses5 was already installed and updated. Anyway, I did
sudo apt-get install libncurses5-dev

again, but the error message was still there. Then I found a post (#23) on https://groups.google.com/group/android-building/tree/browse_frm/month/2010-10/6579583604439ab9?rnum=21&_done=/group/android-building/browse_frm/month/2010-10?&pli=1 and followed the suggestion and did 

sudo apt-get install lib32ncurses5-dev 

Now the error message is gone.

Sunday, July 8, 2012

Remote access ubuntu 11.10 from mac

http://mlepicki.com/2011/10/remote-vnc-login-to-ubuntu-11-10/



Remote VNC login to Ubuntu 11.10


Today I’ve installed Ubuntu 11.10 Oneiric Ocelot on my ASrock 100HT nettop. I’ve wanted to remotely control this box via VNC protocol.
My solution was x11vnc server, so I could share one one session between remote and physical access. I’ve found useful thread about x11vnc on Ubuntu 11.10 – I’ve just added some upstart magic to start x11vnc after lightdm.
First of all, I’ve installed x11vnc:
apt-get install x11vnc
Then, I’ve created /etc/init/x11vnc.conf file:
start on login-session-start
script
x11vnc -xkb -noxrecord -noxfixes -noxdamage -display :0 -auth /var/run/lightdm/root/:0 -forever -bg -o /var/log/x11vnc.log
end script
After restart, x11vnc shoud listen on vnc startard port – 5900.
This script is of course based on upstart event mechanism. Lightdm emits login-session-start event (you can find it in lightdm.conf), and we start x11vnc when this event is emited – that’s first line of x11vnc.conf file.



Then, here is a youtube video showing step by step how to use vnc viewer to connect to the ubuntu machine.
http://www.youtube.com/watch?v=GY75u6TthH4

Sunday, June 24, 2012

Compile BLAT on x86_64 Ubuntu 10.04



http://defsci.blogspot.com/2011/02/compile-blat-on-x8664-ubuntu-1004.html

Compile BLAT on x86_64 Ubuntu 10.04

Recently I needed to compile BLAT for x86_64 on Ubuntu 10.04 server. The BLAT pre-compiled binaries for linux are 32-bit. Here is how you do it:



  1. apt-get install build-essential
  2. Download  BLAT source
  3. remove the -Werror compiler flag to treat warnings as errors
  4. mkdir -p ~/bin/x86_64
  5. export MACHTYPE=x86_64
  6. make
Step (3) above requires editing the /inc/common.mk file, line 17 goes from     


HG_WARN_ERR = -DJK_WARN -Wall -Werror


to 

HG_WARN_ERR = -DJK_WARN -Wall

Make places the executables into ~/bin/x86_64 directory. Either add this to $PATH or copy the files to /usr/local/bin

Saturday, June 9, 2012

book notes

Chimps can pick up human sign language, teach it to younger chimps, and create new combinations of the signs to refer to new objects. They have "cross-modal transfer of information", i.e. relating their perception of an object through touching with things they see later. They have a long span of memory. They have concept of self. They can make plans, making tools for eating termites much before they find a termite mound.

Sunday, May 27, 2012

Multiple page pdf in latex

 Use this package to include multiple pages from one pdf file in latex document.

http://ctan.org/pkg/pdfpages

买车记

周六和Iris一起到Sudeep家做午饭吃,I同学做了Shakshuka , 我做了第三鲜,S同学做了用lentil熬的糊糊。S同学多才多艺, 弹吉他,唱歌,钢琴等等,他还介绍我们看了好多印度舞蹈,据说共有9种民族舞蹈,北方占一种,主要动作就是穿着长裙不停旋转,南方占8种,有一种舞蹈看起来特喜庆,就是和着节奏用一种步伐蹦来蹦去,群体舞蹈还能摆出很多造型。当然我们印象中的传统印度舞蹈也在其中,一般一个女舞蹈演员,兰花指,大眼睛,用眼神摄人心魄的那种。还有一种特诡异的舞蹈,叫Kathakali  去看视频吧,我就不描述了。

在他家玩的差不多,我们就去了他家附近的一个咖啡店,叫paper or plastic cafe ,我在这儿喝到了迄今为止我喝过最好喝的拿铁。他家旁边是一家芭蕾舞蹈室,里面的男生女生都好有气质呀。

晚上回来开始上craigslist继续找车,找到一辆04年的corolla LE,才跑了五十多K,和I,E,望舒去看了车,觉得不错就直接带去修车厂检查了,去的是washington上的pep boys,虽然规模看起来还挺正规的,但是服务确实不够周到,检查的report特别简单就是几个方框,几个勾。Mechanic 谈起来还挺有经验的,总归车况很好,没什么毛病,最多就是再过个8千迈最好去换一下timing belt。 我还是不会降价,Lina给出9300最低价,比kbb报价低个700多刀,我觉得已经挺值了。 周二去交钱办手续,希望一切顺利。

Friday, May 18, 2012

R barplot with error bar

Go check this blog.
http://monkeysuncle.stanford.edu/?p=485

 
arrows(x,y+upper, x, y-lower, angle=90, code=3, length=length, ...)