Older blog entries for xcyber (starting at number 26)

7 Jul 2001 (updated 9 Jul 2001 at 18:22 UTC) »

Are there anyone studying biology,biochem,bioinfo or related stuff here?

<?xml version="1.0" encoding="ISO-8859-1" ?>

<Xcyber_Diary xmlns:Xcyber_Diary="http://xcyber.org/Xcyber_Diary.dtd">

<Article>

Finished my article of transforming XML to HTML using PHP- Sablotron in chinese.I will post it up to linuxfab.cx later.
</Article>

<Job>

<Solved Problems>
Wrote a php snippnet,which trim out all the white space in a CSV file.But why a CSV file have unnecessary whitespace between eash csv-ed data?

Hint:The file is exported from a windows SQL database 
dump program.

After "normalizing" those csv files,i have managed to insert them to MySQL without errors.

Be careful,always load the data files to your filesystem,DO NOT use phpMyadmin to do it,or you will get a serious performance hit.

Why do i need to waste 3 minutes to wait for the text files being transferred to php-apache-mysql,when i can do i simple local mysql insert in 0.3sec?

</Solved Problems>

<Problems>

Two tables in database,contain similar records,need to compare them and print out the differences.

Will try php in_array,but we are talking about 50000 records, 50000*50000=2500000000 comparisons

1.)loading those 100,000 data to 2 arrays take time

2.)the comparsion EAT time!

Now thinking of a better way,any suggestions?

</Problems>
</Job>
</Xcyber_Diary>
PHP-XSLT
Trying hard to make php work with xslt using the sablotron extension.

You will need :

  1. gcc
  2. g++
  3. flex
  4. libstdc++2.9-glibc2.1
  5. google.com
  6. expat
  7. sablotron
  8. php
  9. apache,probably apxs

Steps:

  1. compile and install expat
    #wget http://download.sourceforge.net/expat/expat-
    1.95.1.tar.gz
    #tar zxvf Sablot-0.60.tar.gz
    #cd Sablot-0.60
    #./configure
    #make
    #make install
    
  2. compile and install sablotron
    #wget http://www.gingerall.com/perl/rd?url=sablot/Sablot-
    0.60.tar.gz
    #tar zxvf Sablot-0.60.tar.gz
    #./configure
    #make
    #make install
    

  3. configure apache
    #wget 
    http://httpd.apache.org/dist/httpd/apache_1.3.19.tar.gz
    #tar zxvf apache_1.3.19.tar.gz
    #cd apache_1.3.19
    #./configure --prefix=/usr/local/apache
    
  4. configure php
    #wget 
    http://www.php.net/do_download.php?download_file=php-
    4.0.5.tar.gz&source_site=php.xcyber.org
    #tar zxvf php-4.0.5.tar.gz
    #cd php-4.0.5
    #./configure --with-xml \
    --with-apache=../apache_1.3.19 \
    --enable-track-vars \
    --with-sablot \
    --with-mysql 
    

  5. compile and install php
    #cd apache_1.3.19
    #make
    #make install
    
  6. compile and install apache
    #make
    #make install
    
Reference:
http://www.onlamp.com/topics/php/building_compiling http://www.devshed.com/Server_Side/PHP/SoothinglySeamless/pr int.html
For debian distro:
apt-get install php4-sablotron apache apache-common 

That's why i love debian!

hackingmicrosoftaccessandvba.

mygoalistoretreiveabout700000rowofdatafrommssqlusingaccess.

ihavesuggestedtousephporanythingelsewhichsupporodbctoreplaceaccess,butgotrefused.

thereasonissimple,"asadesktopuser,irefuseeverythingexceptaccess."

iamnowlearninghowtousevbatowriteaprogram,whichupdatethetables'namesmonthly,how?noclues.

shameonyou,microsoft.

duncanm
Thank you for the suggestions.After 3 days of struggling,my article is done.
I refused to translate global variable,function,element,tag,data to chinese,but i took all of your suggestions.
Thank you very much.
article
Just done the article "Transforming XML to HTML using PHP" for LinuxHall in Chinese.

article #2

Will do another article about apachetoolbox for LinuxHall in Chinese.
Still have 3 days to go.

article #3

Will do yet another Step-by-Step introductory installation walk-thru with load of screenshots about either Mandrake or cle for PCHome in Chinese.
Still have 3 days to go.(again)
Will there be a cert for journalist ?
PHP and XML
Now writing a little article in chinese for a local linux magazine in Hongkong.

The topic is about parsing xml stuffs like this using PHP.

2 difficulties:
  1. How to present techincal term like "validation,parser" in chinese?
  2. DOM or SAX?
Eazel is dead
Chinese
Any chinese hackers here?
Where do you live?
Hongkong/taiwan/china?
Exam
Molecular Genetics,IBM (introduction to biomolecules),Cell biology.

ALL done.

Teaching
Will start teaching xml and java in the coming weeks.

Hacking
Resume the phpbookreview project tomorrow.

I really need more sleep.

Microsoft,Do you know english?
"The GPL asserts that any product derived from source code licensed under it becomes subject to the GPL itself. When the resulting software product is distributed, the creator must make all of the source code available, at no additional charge. This effectively makes it impossible for commercial software companies to include source code that is licensed under the GPL into their products, since by doing so, they are constrained to give away the fruits of their labor. As we think about technology, IP rights, and the public sector of knowledge, we need an intellectual model that encourages interaction, not a model that drives them apart. We believe that a shared source model, coupled with continuing contributions to public standards, provides a path that is preferable to the open source approach founded on the GPL",Craig Mundie, Microsoft Senior Vice President

Typical mis-interpretation of GPL by newbie to Free software.

Reaons:
    From the GPL,

  1. When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for this service if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs; and that you know you can do these things.
  2. You may charge a fee for the physical act of transferring a copy, and you may at your option offer warranty protection in exchange for a fee.
Free softwares != Open sources softwares

Some OSS,which use BSD licenses,can be re-distributed without a copy of human-readable source.

OSS movement,is a hijack of Free software movement by an self-proclaimed "hacker",Eric S Raymond.(For more coverage of this STUPID guy,read the book "The Cathedral & the Bazaar")

Craig Mundie, Microsoft Senior Vice President,If you do not mind retaking K3 english ,we can raise funds for you.Upon the completion of that english course,please read the GPL again and give us a better interpretation.

FUD will not work on smart geeks,but will work on windows idiots,including you.

17 older entries...

New Advogato Features

New HTML Parser: The long-awaited libxml2 based HTML parser code is live. It needs further work but already handles most markup better than the original parser.

Keep up with the latest Advogato features by reading the Advogato status blog.

If you're a C programmer with some spare time, take a look at the mod_virgule project page and help us with one of the tasks on the ToDo list!