Older blog entries for xcyber (starting at number 28)

10 Jul 2001 (updated 10 Jul 2001 at 05:49 UTC) »

Lunch

Now having a japanese style lunchbox.It contains roasted chicken,roasted eel and egg with rice.

Do you love asian food?

9 Jul 2001 (updated 11 Jul 2001 at 06:35 UTC) »

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

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

<study>

Going to year2 at CUHK,declared as a CS minor student.

Can i attend M.Sc. course of CS after graduated as a biology student?

This bothers me!

</study>

<work>

My original task is to dump 1.3 Millions row of data from 200 tables containg over 150 fields from various databases living in Oracle and MSSQL using ACCESS.

Do you guys think it is possible to do so?

2 weeks before,

i have suggested to my manager that it is impratical and stupid to do so.He refused to comment on it.

3 days later,he quitted the company.

Today,
i am told that the task was out-sourced to outside company.

I have not received any prior notification.I acted like an idiot in my company.

Although i am just a summer job worker,i think it is a matter of courtesy and they should treat me like a member of their freaking team.

</work>

<hacking>

Get assigned as a web developer to make the website of linux.org.hk.

My task is to make a collaboration site,e.g. SF for linux.org.hk tech team .

The deadline is 2 weeks later,is it possible?

Opinions are welcome!DO you think that SF is good and useful?

</hacking>

</Xcyber_Diary>

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?

19 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!