mysql -h genome-mysql.cse.ucsc.edu -A -u genome -D hg19

kendoit 發表在 痞客邦 留言(0) 人氣()

請先注意看:
http://www.mirbase.org/blog/2011/04/whats-in-a-name/
 
miRBase 17 已於2011/4/26 released

kendoit 發表在 痞客邦 留言(0) 人氣()

五月是報稅的季節
似乎大股東會賣出手中部份持股轉現金

kendoit 發表在 痞客邦 留言(0) 人氣()

寫個註解好了,以免之後又要重新google
 
實例:
在Apple上新增NFS分享的路徑(/Volumes/Raid1/L15_1),並mount到自己的機器上 (/NFS)

kendoit 發表在 痞客邦 留言(0) 人氣()

原文
http://pwwang.com/technology/svm/libsvm-288中文文档tools/
=================================================
 

kendoit 發表在 痞客邦 留言(0) 人氣()

fileread_memory.png
方法一:執行時間較短,但耗費記憶體 (readlines)
f = open(filename,'r')
for line in f.readlines():
if condition:
do something
f.close()
方法二:省記憶體,執行時間較久 - 適合開大檔

kendoit 發表在 痞客邦 留言(0) 人氣()


 
FirePHP for CakePHP 安裝 - 阿凱隨手紀
FirePHP,是 FireBug 的一個擴充,可以讓 FireBug 處理 FirePHPCore librar 輸出的錯誤訊息……

kendoit 發表在 痞客邦 留言(0) 人氣()

FireFox插件XPath checker畫面
Eric Lo 於他的blog 發表了一篇文章「抓取網頁的最佳語言 : Python」
基本流程 是 先抓取網頁    (urllib, urllib2 or Twisted)

kendoit 發表在 痞客邦 留言(0) 人氣()


在安裝PHPExcel時,出現一行錯誤訊息
PHP Warning:  preg_match(): Compilation failed: support for \P, \p, and \X has not ........
原來是因為我的CentOS的正規沒有支援unicode (可以先下 pcretest -C,看看是否有出現 'No Unicode properties support')
解決方式如下,此為轉自網路某人的解法:
I talked about how to get the most out of running
regular expressions in PHP. The reason that I needed to dig in deep on
regular expression syntax with PHP is because I needed to write some
regular expressions that deal with Unicode characters.
After much reading, I believed that I knew everything that I needed. I
started writing some regex strings and testing the code.
Unfortunately, every time I ran a test with a string that contained
Unicode characters, the match failed. When I removed the Unicode
characters from the string and tested again, it would work. I was
baffled.
Finding the Problem
I had the regex testing characters (‘\X’, ‘\pL’, etc) inside of a
character class, such as ‘[\X-]‘, since I was creating a regex to test
for domains. I wrote a really simple rule by simply looking for ‘/^\X$/’
and testing the regex with a single Unicode character. Amazingly,
having the ‘\X’ outside of the square brackets changed everything as I
now received the following very concerning warning:
PHP Warning:  preg_match(): Compilation failed: support for \P,
\p, and \X has not been compiled at offset 2 in
wp-content/plugins/dnsyogi/testunicode.php on line 4
Since PHP uses the PCRE engine to run regular expressions, I started
to dig into it. I found out that I could query PCRE directly. I ended
up with something very similar:








1


$ pcregrep ‘/\X*/u’ character.txt


pcregrep: Error in command-line regex at offset 2: support for \P, \p, and \X has not been compiled
It looked like the error was coming from PCRE itself. I searched
around for a while thinking that I could simply install a new package
using yum. I hoped to find something like pcre-utf8, pcre-unicode,
php-pcre-unicode, or something to make it simple and quick to add this
support since I much prefer using package management tools rather than
compiling and installing from source.
Unfortunately, no such package exists. This support is something that
must be an option that PCRE is compiled with, and my CentOS repository
only has packages that don’t include that support. After much digging
around, I found that this isn’t necessarily CentOS’s fault as this
package has carried over from the RHEL (Red Hat Enterprice Linux) side
of things.
A great way of checking to see if this is an issue on your system is by running the following:








1
2
3
4
5
6
7
8
9
10
11


$ pcretest -C
PCRE version 6.6 06-Feb-2006
Compiled with
UTF-8 support
No Unicode properties support
Newline character is LF
Internal link size = 2
POSIX malloc threshold = 10
Default match limit = 10000000
Default recursion depth limit = 10000000
Match recursion uses stack


This is the output that I received. Notice the “UTF-8 support” and
the “No Unicode properties support” lines. This means that PRCE was
compiled with the “–enable-utf8″ configure option which allows PCRE to
recognize and work with UTF-8 encoded strings. However, it wasn’t
compiled with the “–enable-unicode-properties” configure option which
works in conjunction with the enable-utf8 option to add support for the
‘\p’, ‘\P’, and ‘\X’ character classes.
This seems to have been an oversight when the rpm file was first put together. Fortunately, there is a way to fix it.
Fixing the Problem
Since I’m sure that many of you are like me and would rather not
manually compile and install software outside of the package management
system, the solution is to update the rpm to have the option that it
needs and install it.
I had never done this before. Fortunately, I found a very helpful guide that details this process out very nicely: How to patch and rebuild an RPM package.
I have provided the new rpm file that I have built at the bottom of
this post. If you don’t care about all this jibber-jabber, you can skip
down there and grab the file. However, if you would like to learn how
to address this issue yourself or have a system that my file will not
support, please read on to see how I rebuilt the rpm with the new
option.
Rebuilding the rpm
  • The first thing I did is set up my ~/.rpmmacros file and src/rpm folder structure as detailed in the Setup section of the guide that I’m following. I’ll simply refer you over there as it doesn’t need repeating here.

  • I needed to grab the source rpm for the current version of PCRE on
    my platform. I’m on CentOS 5.2 with version 6.6 of PCRE. I found the
    matching source rpm file (pcre-6.6-2.el5_1.7.src.rpm) here.

  • I then installed the source rpm in order to gain access to its files:









    1


    $ rpm -ivh pcre-6.6-2.el5_1.7.src.rpm



    This put the necessary files into my ~/src/rpm/SOURCES and ~/src/rpm/SPECS folders.



  • I opened up the ~/src/rpm/SPECS/pcre.spec file and found the following line:
    Wrote: ~/src/rpm/SRPMS/pcre-6.6-2.7.src.rpm
    Wrote: ~/src/rpm/RPMS/x86_64/pcre-6.6-2.7.x86_64.rpm
    Wrote: ~/src/rpm/RPMS/x86_64/pcre-devel-6.6-2.7.x86_64.rpm
    Wrote: ~/src/rpm/RPMS/x86_64/pcre-debuginfo-6.6-2.7.x86_64.rpm

    This tells me exactly where I can find my new source rpm and rpm files.


    Updated rpm File for CentOS 5.2 64-bit <--這是我所用的方法


    If you are running a 64-bit version of CentOS 5.2, the following file
    should work for you. If you have a different architecture, Linux
    distro, or encounter any errors when trying to install this file, then
    you should follow the instructions above to build an rpm that is
    suitable for your distribution.


    pcre-6.6-2.7.x86_64.rpm – PCRE 6.6 for CentOS 5.2 64-bit



    Thanks Robin for providing a 32-bit version: pcre-6.6-2.7.i386.rpm


    Installing New rpm


    Now that I have my new rpm file, I just need to install it. Since I
    already have a pcre package installed, I need to tell the rpm command to
    update rather than install. The following command does this for me:











    1


    # rpm -Uvh ~/src/rpm/RPMS/x86_64/pcre-6.6-2.7.x86_64.rpm



    Notice that I need to be root to run this command.


    Finally, to verify that everything worked, I ran the pcrecheck program again:











    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11


    <pre>$ pcretest -C
    PCRE version 6.6 06-Feb-2006
    Compiled with
    UTF-8 support
    Unicode properties support
    Newline character is LF
    Internal link size = 2
    POSIX malloc threshold = 10
    Default match limit = 10000000
    Default recursion depth limit = 10000000
    Match recursion uses stack



    Looks good.




  • kendoit 發表在 痞客邦 留言(0) 人氣()

    本篇出自:GaryLee


    kendoit 發表在 痞客邦 留言(0) 人氣()

     PHPExcel 及 PHPPowerPoint。它們分別可以很簡單地透過 PHP 讀取及寫入 Excel 2007 及 PowerPoint 2007 的檔案。
     

    kendoit 發表在 痞客邦 留言(0) 人氣()

    網路安裝CentOS
    Linux除了可以以光碟DVD-iso安裝外,也可以使用網路安裝
    尤其是那種老舊電腦,只有CD-Rom光碟機,沒有DVD光碟機
    就可以使用網路來安裝
    首先先到義守大學的檔案伺服器去download網路安裝開機ISO檔燒成光碟
    http://ftp.isu.edu.tw/pub/Linux/CentOS/5.5/isos/i386/CentOS-5.5-i386-netinstall.iso
    接著將開機光碟放入光碟機中,使用光碟開機
    依照提示先設定好IP後,再指定安裝來源
    安裝來源選擇HTTP或FTP,接著輸入伺服器名稱和位址
    如http來源設定為
    ftp.isu.edu.tw/pub/Linux/CentOS/5.5/isos/i386/
    接著依照提示下一步設定要安裝的套件後即可完成安裝,網路愈快當然安裝的愈快囉~~
    另外,若要是電腦老舊到連CD-Rom也沒有怎麼辦!
    還可以使用USB隨身碟來安裝Linux,不過電腦得先support USB開機
    先利用UNetbootin這支程式來建立USB開機檔
    http://unetbootin.sourceforge.net/  (只能使用網路安裝,或預先把映像檔放在硬碟中)
    建立好後,使用USB隨身碟開機後,再如同上面的步驟使用網路安裝即可

    kendoit 發表在 痞客邦 留言(0) 人氣()

    Blog Stats
    ⚠️

    成人內容提醒

    本部落格內容僅限年滿十八歲者瀏覽。
    若您未滿十八歲,請立即離開。

    已滿十八歲者,亦請勿將內容提供給未成年人士。