[PHP] Re: PHP Books - A poll of sorts

2007-08-15 Thread Man-wai Chang To Die
 We all have our favorite PHP books and resources but there is one tome
 that seems to be missing from the group...a best practices book. We

PHP, being server-side, is not difficult. I think the client-side stuff
deserves some books (DOM, Javascript, CSS, XHTML, XML, ) if you want
to save time.

-- 
  @~@   Might, Courage, Vision, SINCERITY.
 / v \  Simplicity is Beauty! May the Force and Farce be with you!
/( _ )\ (Xubuntu 7.04)  Linux 2.6.22.2
  ^ ^   19:44:01 up 5 days 6:30 0 users load average: 0.05 0.06 0.02
news://news.3home.net news://news.hkpcug.org news://news.newsgroup.com.hk

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] PHP and nCurses

2007-08-02 Thread Man-wai Chang

Anyone ever coded a full business app using PHP and nCurses?

-- 
  @~@   Might, Courage, Vision, SINCERITY.
 / v \  Simplicity is Beauty! May the Force and Farce be with you!
/( _ )\ (Xubuntu 7.04)  Linux 2.6.22.1
  ^ ^   15:43:01 up 21 days 17:47 2 users load average: 0.01 0.04 0.00
news://news.3home.net news://news.hkpcug.org news://news.newsgroup.com.hk

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Flash 8 UI controls

2007-07-31 Thread Man-wai Chang

From a Flash 8 ActionScript book I glanced this afternoon, I couldn't
find a table input type, nor a grid class. How does Flash name them?

-- 
  @~@   Might, Courage, Vision, SINCERITY.
 / v \  Simplicity is Beauty! May the Force and Farce be with you!
/( _ )\ (Xubuntu 7.04)  Linux 2.6.22.1
  ^ ^   17:56:01 up 19 days 20:00 2 users load average: 0.11 0.03 0.01
news://news.3home.net news://news.hkpcug.org news://news.newsgroup.com.hk

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Re: DOM

2007-07-27 Thread Man-wai Chang

Thanks to all.

--
  @~@   Might, Courage, Vision, SINCERITY.
 / v \  Simplicity is Beauty! May the Force and Farce be with you!
/( _ )\ (Xubuntu 7.04)  Linux 2.6.22.1
  ^ ^   17:35:01 up 15 days 19:39 1 user load average: 0.03 0.03 0.00
news://news.3home.net news://news.hkpcug.org news://news.newsgroup.com.hk

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] appendChild(), removeChild()

2007-07-26 Thread Man-wai Chang

If the child refers to a file, is it client-side only? I meant it's
nothing like AJAX, right?

-- 
  @~@   Might, Courage, Vision, SINCERITY.
 / v \  Simplicity is Beauty! May the Force and Farce be with you!
/( _ )\ (Xubuntu 7.04)  Linux 2.6.22.1
  ^ ^   18:44:01 up 14 days 20:48 1 user load average: 0.04 0.05 0.05
news://news.3home.net news://news.hkpcug.org news://news.newsgroup.com.hk

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Re: appendChild(), removeChild()

2007-07-26 Thread Man-wai Chang
JavaScript (The main part of AJAX) runs on the client. Using AJAX you 
can have it call stuff on your server, but mainly it is client side only.




THX

--
  @~@   Might, Courage, Vision, SINCERITY.
 / v \  Simplicity is Beauty! May the Force and Farce be with you!
/( _ )\ (Xubuntu 7.04)  Linux 2.6.22.1
  ^ ^   20:20:01 up 14 days 22:24 1 user load average: 0.00 0.01 0.00
news://news.3home.net news://news.hkpcug.org news://news.newsgroup.com.hk

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Re: appendChild(), removeChild()

2007-07-26 Thread Man-wai Chang

If the child refers to a file, is it client-side only? I meant it's
nothing like AJAX, right?

Since JS runs on the client, yes.


... or unless the file was cached, right?

I am reading about these stuffs lately. :)

--
  @~@   Might, Courage, Vision, SINCERITY.
 / v \  Simplicity is Beauty! May the Force and Farce be with you!
/( _ )\ (Xubuntu 7.04)  Linux 2.6.22.1
  ^ ^   19:15:01 up 14 days 21:19 1 user load average: 0.02 0.06 0.01
news://news.3home.net news://news.hkpcug.org news://news.newsgroup.com.hk

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Re: DOM

2007-07-26 Thread Man-wai Chang

Does Web 2.0 or maybe 3.0 offer some new input types, say something
like a real grid, or maybe a modal child popup?


Java is just a specialized DOM... in my opinion.

--
  @~@   Might, Courage, Vision, SINCERITY.
 / v \  Simplicity is Beauty! May the Force and Farce be with you!
/( _ )\ (Xubuntu 7.04)  Linux 2.6.22.1
  ^ ^   21:13:01 up 14 days 23:17 1 user load average: 0.02 0.03 0.00
news://news.3home.net news://news.hkpcug.org news://news.newsgroup.com.hk

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] DOM

2007-07-26 Thread Man-wai Chang

Out of curiosity, is there any effort in creating a new DOM that's
easier for application builders (something like Visual Foxpro)?

Does Web 2.0 or maybe 3.0 offer some new input types, say something
like a real grid, or maybe a modal child popup?

-- 
  @~@   Might, Courage, Vision, SINCERITY.
 / v \  Simplicity is Beauty! May the Force and Farce be with you!
/( _ )\ (Xubuntu 7.04)  Linux 2.6.22.1
  ^ ^   20:36:01 up 14 days 22:40 1 user load average: 0.00 0.00 0.00
news://news.3home.net news://news.hkpcug.org news://news.newsgroup.com.hk

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Smarty template for parent-child form

2007-07-24 Thread Man-wai Chang

Is there a template that presents a parent-child
forms, for example, an invoice object which has a header(invoice no,
date, customer code, invoice total) and multiple items (item no, item
name, quantity, price, amount)?


-- 
  @~@   Might, Courage, Vision, SINCERITY.
 / v \  Simplicity is Beauty! May the Force and Farce be with you!
/( _ )\ (Xubuntu 7.04)  Linux 2.6.22.1
  ^ ^   19:12:01 up 12 days 21:16 1 user load average: 0.06 0.06 0.02
news://news.3home.net news://news.hkpcug.org news://news.newsgroup.com.hk

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Re: Smarty template for parent-child form

2007-07-24 Thread Man-wai Chang

What you do is assign the items to an array called, say, items. Then you
use foreach in the template to iterate the array, just like you would
in PHP itself. Example 7-8 (Contacts) is pretty close to what you're doing.


Need to take a look first. Thank you. I sincerely want to know how 
experts do it. :)


--
  @~@   Might, Courage, Vision, SINCERITY.
 / v \  Simplicity is Beauty! May the Force and Farce be with you!
/( _ )\ (Xubuntu 7.04)  Linux 2.6.22.1
  ^ ^   21:02:01 up 12 days 23:06 1 user load average: 0.03 0.06 0.01
news://news.3home.net news://news.hkpcug.org news://news.newsgroup.com.hk

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] PHP parent-child form

2007-07-21 Thread Man-wai Chang

Is there a good book that shows good techniques in coding parent-child
forms, for example, an invoice object which has a header(invoice no,
date, customer code, invoice total) and multiple items (item no, item
name, quantity, price, amount)?

-- 
  @~@   Might, Courage, Vision, SINCERITY.
 / v \  Simplicity is Beauty! May the Force and Farce be with you!
/( _ )\ (Xubuntu 7.04)  Linux 2.6.22.1
  ^ ^   16:47:01 up 9 days 18:51 0 users load average: 1.01 1.03 1.00
news://news.3home.net news://news.hkpcug.org news://news.newsgroup.com.hk

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Re: no default value

2007-07-18 Thread Man-wai Chang
 E_ALL includes E_NOTICE which is off by default which is just plain
 daft, if you ask me...

Thank you.

-- 
  @~@   Might, Courage, Vision, SINCERITY.
 / v \  Simplicity is Beauty! May the Force and Farce be with you!
/( _ )\ (Xubuntu 7.04)  Linux 2.6.22.1
  ^ ^   17:52:01 up 6 days 19:56 1 user load average: 0.01 0.01 0.00
news://news.3home.net news://news.hkpcug.org news://news.newsgroup.com.hk

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Re: Pirate PHP books online?

2007-07-18 Thread Man-wai Chang
 I have a book case next to me that has three three-foot shelves filled 
 with just php, mysql, javascript, css, ajax, html, and accessibility books.
 I could not function without my reference library -- that's why I hate 
 job interviews.

I could write a foxpro program in a short period of time without tje
need to read a manual or book. It's all in my brain. Too bad Foxpro is
going to disappear.

Now if I could flush my Foxpro memory and replace the brain cells with
PHP books and manuals. :)

-- 
  @~@   Might, Courage, Vision, SINCERITY.
 / v \  Simplicity is Beauty! May the Force and Farce be with you!
/( _ )\ (Xubuntu 7.04)  Linux 2.6.22.1
  ^ ^   19:17:02 up 6 days 21:21 1 user load average: 0.37 0.21 0.12
news://news.3home.net news://news.hkpcug.org news://news.newsgroup.com.hk

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Re: Pirate PHP books online?

2007-07-18 Thread Man-wai Chang
 Now if I could flush my Foxpro memory and replace the brain cells with
 PHP books and manuals. :)

Oh... forgot the mess of HTML, XML, Javascript and CSS. This one is a
hard nut to crack

-- 
  @~@   Might, Courage, Vision, SINCERITY.
 / v \  Simplicity is Beauty! May the Force and Farce be with you!
/( _ )\ (Xubuntu 7.04)  Linux 2.6.22.1
  ^ ^   19:31:01 up 6 days 21:35 1 user load average: 0.00 0.04 0.07
news://news.3home.net news://news.hkpcug.org news://news.newsgroup.com.hk

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Re: Pirate PHP books online?

2007-07-17 Thread Man-wai Chang
[EMAIL PROTECTED] wrote:
 I don't see why people need to buy the books. I learned PHP buy
 borrowing one book from the library, then using php.net for more
 advanced functions.

I am basically on the same route, peeking codes from experienced. But I
still wanna believe that there is/was really a good book on PHP. :)
Anyway, I have bought about 4 PHP books.

-- 
  @~@   Might, Courage, Vision, SINCERITY.
 / v \  Simplicity is Beauty! May the Force and Farce be with you!
/( _ )\ (Xubuntu 7.04)  Linux 2.6.22.1
  ^ ^   19:15:01 up 5 days 21:19 0 users load average: 0.01 0.05 0.01
news://news.3home.net news://news.hkpcug.org news://news.newsgroup.com.hk

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] no default value

2007-07-17 Thread Man-wai Chang

Is there a parameter in php.ini that requires all variables to be
explicitly initialized, rather than being automatically assigned the
value of false?

-- 
  @~@   Might, Courage, Vision, SINCERITY.
 / v \  Simplicity is Beauty! May the Force and Farce be with you!
/( _ )\ (Xubuntu 7.04)  Linux 2.6.22.1
  ^ ^   20:00:01 up 5 days 22:04 0 users load average: 0.00 0.00 0.00
news://news.3home.net news://news.hkpcug.org news://news.newsgroup.com.hk

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Re: no default value

2007-07-17 Thread Man-wai Chang

Thank you. This is horrible as a simple typing mistake ($sucess rather
than $success) would waste me some time hunting down the problem. Foxpro
isn't like this

-- 
  @~@   Might, Courage, Vision, SINCERITY.
 / v \  Simplicity is Beauty! May the Force and Farce be with you!
/( _ )\ (Xubuntu 7.04)  Linux 2.6.22.1
  ^ ^   21:10:01 up 5 days 23:14 0 users load average: 0.00 0.01 0.00
news://news.3home.net news://news.hkpcug.org news://news.newsgroup.com.hk

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] mysql question

2007-07-16 Thread Man-wai Chang

I tried to post to mysql.general, but the message never appeared. So I
am trying my luck here.

How could I build an index for a table created using the  CREATE
TEMPORARY TABLE ... SELECT ... FROM ... syntax, using an account
without the privilege to use ALTER TABLE?

-- 
  .~.   Might. Courage. Vision. Sincerity. http://www.linux-sxs.org
 / v \  Simplicity is Beauty! May the Force and Farce be with you!
/( _ )\ (Fedora Core 4)  Linux 2.6.17-1.2142_FC4
  ^ ^   16:49:01 up 165 days 33 min 3 users load average: 0.01 0.21 0.30

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Re: mysql question

2007-07-16 Thread Man-wai Chang
 You didn't send much info along, so I assume you're using some version
 of MySQL 5.0.

Thanks. I figured it out (doesn't need 5.0):

CREATE TEMPORARY haha ( KEY (field1), KEY (field2) )
AS
SELECT  po_no, po_date, item_no FROM . WHERE 

Then I don't need the privilege for ALTER TABLE.


-- 
  .~.   Might. Courage. Vision. Sincerity. http://www.linux-sxs.org
 / v \  Simplicity is Beauty! May the Force and Farce be with you!
/( _ )\ (Fedora Core 4)  Linux 2.6.17-1.2142_FC4
  ^ ^   17:33:02 up 165 days 1:17 1 user load average: 0.03 0.08 0.08

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Re: mysql question

2007-07-16 Thread Man-wai Chang
 CREATE TEMPORARY haha ( KEY (field1), KEY (field2) )
 AS
 SELECT  po_no, po_date, item_no FROM . WHERE 
 Then I don't need the privilege for ALTER TABLE.

I meant I could build index on a temp table without
the privilege to use ALTER TABLE by making the index
definitions as part of the CREATE TEMPORARY statement.

-- 
  .~.   Might. Courage. Vision. Sincerity. http://www.linux-sxs.org
 / v \  Simplicity is Beauty! May the Force and Farce be with you!
/( _ )\ (Fedora Core 4)  Linux 2.6.17-1.2142_FC4
  ^ ^   17:40:01 up 165 days 1:24 1 user load average: 0.02 0.04 0.06

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Re: Pirate PHP books online?

2007-07-16 Thread Man-wai Chang
 All I'm really saying is that there are a lot of questionable things out
 there, be it pirated software, books, movies and music, or other even
 more deplorable things. These problems will never, ever be solved by
 locking away the means there has to be the desire to not reach that end.

Remember the shareware? I still believe good books would always get
bought by people that found their content useful.

-- 
  @~@   Might, Courage, Vision, SINCERITY.
 / v \  Simplicity is Beauty! May the Force and Farce be with you!
/( _ )\ (Xubuntu 7.04)  Linux 2.6.22.1
  ^ ^   18:51:01 up 4 days 20:55 0 users load average: 0.06 0.02 0.00
news://news.3home.net news://news.hkpcug.org news://news.newsgroup.com.hk

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Re: Pirate PHP books online?

2007-07-16 Thread Man-wai Chang
I have to agree with Col on this one. Books are not shareware, freeware 
or open source. They are written for profit and anyone wanting to pirate 


Not really. You could open a sample book in bookstores, scan the 
chapters to decide whether you are gonna buy it. It's not porn magazines 
wrapped in plastic bag, with a label 18-year-old or more.


There are bookstores that don't customers to preview the books. For me, 
I would not buy a book by just looking at the cover. You gotta kidding 
me or you were too greedy.



--
  .~.   Might. Courage. Vision. Sincerity. http://www.linux-sxs.org
 / v \  Simplicity is Beauty! May the Force and Farce be with you!
/( _ )\ (Fedora Core 4)  Linux 2.6.17-1.2142_FC4
  ^ ^   10:36:01 up 165 days 18:20 1 user load average: 0.00 0.00 0.02

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Re: Pirate PHP books online?

2007-07-16 Thread Man-wai Chang

You have to draw the line between:

1. a book
2. a secret

By not allowing customers to sample the book in a bookstore, you would 
be selling secrets.


--
  .~.   Might. Courage. Vision. Sincerity. http://www.linux-sxs.org
 / v \  Simplicity is Beauty! May the Force and Farce be with you!
/( _ )\ (Fedora Core 4)  Linux 2.6.17-1.2142_FC4
  ^ ^   10:39:01 up 165 days 18:23 1 user load average: 0.00 0.00 0.00

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Re: what trick is this? How to do it?

2007-07-13 Thread Man-wai Chang
 http://xsojix.imeem.com/music/1zyLl7y9/lost_my_music/
 How did he/she do it? I meant the modal login window...

I just found that linux.com is using the same trick. :)

-- 
  @~@   Might, Courage, Vision, SINCERITY.
 / v \  Simplicity is Beauty! May the Force and Farce be with you!
/( _ )\ (Xubuntu 7.04)  Linux 2.6.22.1
  ^ ^   20:03:01 up 1 day 22:07 0 users load average: 0.00 0.01 0.00
news://news.3home.net news://news.hkpcug.org news://news.newsgroup.com.hk

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Re: getting the next element of an associative array

2007-07-12 Thread Man-wai Chang

let's say we have the following associative array:
$array = array(
 red = ferrari,
 yellow = volkswagen,
 green = mercedes,
 blue = volvo
);
now: how do i get the key of the next array element (in this case green)?
$next = ?


Why not define your array with number index as well in the first place?

--
  .~.   Might. Courage. Vision. Sincerity. http://www.linux-sxs.org
 / v \  Simplicity is Beauty! May the Force and Farce be with you!
/( _ )\ (Fedora Core 4)  Linux 2.6.17-1.2142_FC4
  ^ ^   14:26:01 up 160 days 22:10 2 users load average: 0.00 0.02 0.00

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] what trick is this? How to do it?

2007-07-07 Thread Man-wai Chang
http://xsojix.imeem.com/music/1zyLl7y9/lost_my_music/

How did he/she do it? I meant the modal login window...

-- 
  @~@   Might, Courage, Vision, SINCERITY. http://www.linux-sxs.org
 / v \  Simplicity is Beauty! May the Force and Farce be with you!
/( _ )\ (Xubuntu 7.04)  Linux 2.6.21.5
  ^ ^   16:39:01 up 19 days 6:11 0 users load average: 1.08 1.05 1.00
news://news.3home.net news://news.hkpcug.org news://news.newsgroup.com.hk

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Re: what trick is this? How to do it?

2007-07-07 Thread Man-wai Chang
 I'm listening to the song now without logging in, just running this in
 the URL bar:
 javascript:floatingWindow.hide();
 and the login window is gone :)

So is there a proper way to create a modal window inside a browser?

-- 
  @~@   Might, Courage, Vision, SINCERITY. http://www.linux-sxs.org
 / v \  Simplicity is Beauty! May the Force and Farce be with you!
/( _ )\ (Xubuntu 7.04)  Linux 2.6.21.6
  ^ ^   18:44:06 up 5 min 0 users load average: 1.54 1.07 0.47
news://news.3home.net news://news.hkpcug.org news://news.newsgroup.com.hk

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Re: what trick is this? How to do it?

2007-07-07 Thread Man-wai Chang
 On a sidenote, this has nothing whatsoever to do with PHP, it's
 presentation in a client-browser we're looking at.

I asked here because I believe good PHP programmers are usually
well-versed in client-side stuffs. :)

-- 
  @~@   Might, Courage, Vision, SINCERITY. http://www.linux-sxs.org
 / v \  Simplicity is Beauty! May the Force and Farce be with you!
/( _ )\ (Xubuntu 7.04)  Linux 2.6.21.6
  ^ ^   20:58:01 up 2:19 0 users load average: 1.01 1.02 1.00
news://news.3home.net news://news.hkpcug.org news://news.newsgroup.com.hk

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Re: Redirecting to a parent page

2007-06-13 Thread Man-wai Chang

Im using this instruction
header( refresh:'3'; url=./file3.php);
But I got the error that in http://localhost/file3.php does not exists any
page


What's the absolute path to file3.php? If it's in DocumentRoot, then use 
/file3.php (no dot).


--
  @~@   Might, Courage, Vision, SINCERITY. http://www.linux-sxs.org
 / v \  Simplicity is Beauty! May the Force and Farce be with you!
/( _ )\ (Xubuntu 7.04)  Linux 2.6.21.5
  ^ ^   20:30:01 up 23:58 0 users load average: 0.03 0.03 0.00
news://news.3home.net news://news.hkpcug.org news://news.newsgroup.com.hk

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Re: php-cli vs python

2007-06-08 Thread Man-wai Chang
Micro$oft expressed interest in Python. But I don't know whether it's a 
trap or bait... :)




I said these because of Foxpro. Micro$oft bought it, improved it. But 
now that Micro$oft wanan go .NET, Visual Foxpro was discontinued.


Same thing could happen to Python, since it's not a tool invented, 
designed and patented by the genes of Micro$oft.


--
  .~.   Might. Courage. Vision. Sincerity. http://www.linux-sxs.org
 / v \  Simplicity is Beauty! May the Force and Farce be with you!
/( _ )\ (Fedora Core 4)  Linux 2.6.17-1.2142_FC4
  ^ ^   13:50:01 up 126 days 21:34 1 user load average: 0.00 0.00 0.00

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Re: php-cli vs python

2007-06-08 Thread Man-wai Chang

   Interesting reading:
   http://wiki.w4py.org/python-vs-php.html


I don't understand those python-over-php advantages at all... possibly 
not important. For now, I stick with PHP.


--
  .~.   Might. Courage. Vision. Sincerity. http://www.linux-sxs.org
 / v \  Simplicity is Beauty! May the Force and Farce be with you!
/( _ )\ (Fedora Core 4)  Linux 2.6.17-1.2142_FC4
  ^ ^   13:48:01 up 126 days 21:32 1 user load average: 0.00 0.00 0.00

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Re: php-cli vs python

2007-06-07 Thread Man-wai Chang
Otherwise you have to start again from scratch in python code (creating 
more places for bugs to hide and making the whole thing more complicated).
While they can access the same database, there's nothing else they can 
share.
Micro$oft expressed interest in Python. But I don't know whether it's a 
trap or bait... :)


--
  @~@   Might, Courage, Vision, SINCERITY. http://www.linux-sxs.org
 / v \  Simplicity is Beauty! May the Force and Farce be with you!
/( _ )\ (Xubuntu 7.04)  Linux 2.6.21.3
  ^ ^   19:46:01 up 11 days 3:19 0 users load average: 0.00 0.00 0.00
news://news.3home.net news://news.hkpcug.org news://news.newsgroup.com.hk

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Re: Unsuscribe !!!!!

2007-05-12 Thread Man-wai Chang

yeoh sock yee wrote:

Please unsuscribe me from receving all the PHP email!


Which list?

--
  .~.   Might, Courage, Vision, SINCERITY. http://www.linux-sxs.org
 / v \  Simplicity is Beauty! May the Force and Farce be with you!
/( _ )\ (Ubuntu 6.10)  Linux 2.6.21.1
  ^ ^   17:07:01 up 14 days 2:00 0 users load average: 0.03 0.01 0.00
news://news.3home.net news://news.hkpcug.org news://news.newsgroup.com.hk

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] PHP screen generator?

2007-05-11 Thread Man-wai Chang


I meant I could drop some controls into a form freely and the tool would 
automatically generate the HTML+CSS to produce the screen.


--
  .~.   Might, Courage, Vision, SINCERITY. http://www.linux-sxs.org
 / v \  Simplicity is Beauty! May the Force and Farce be with you!
/( _ )\ (Ubuntu 6.10)  Linux 2.6.21.1
  ^ ^   19:19:01 up 13 days 4:12 0 users load average: 0.00 0.01 0.00
news://news.3home.net news://news.hkpcug.org news://news.newsgroup.com.hk

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] Re: PHP screen generator?

2007-05-11 Thread Man-wai Chang

you have a screen design image file and you want html and css created
from that? if yes, then I don't think you'll find an automated software
doing that... it's just too complicated - for example how can a software


Doesn't have to use an image as a starting point, but something like 
this in dBase:


@1,2 say input your name: get m.name picture @!
@3,2 say input your age: get m.age picture @!
@5,2 say input your gender: get m.gender choices male,female
read

Doesn't have to be table. How about CSS?

--
  .~.   Might, Courage, Vision, SINCERITY. http://www.linux-sxs.org
 / v \  Simplicity is Beauty! May the Force and Farce be with you!
/( _ )\ (Ubuntu 6.10)  Linux 2.6.21.1
  ^ ^   22:55:01 up 13 days 7:48 0 users load average: 0.00 0.00 0.00
news://news.3home.net news://news.hkpcug.org news://news.newsgroup.com.hk

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Re: PHP screen generator?

2007-05-11 Thread Man-wai Chang

Zoltán Németh wrote:

what screen? you mean the client's screen? I think that's basically
nonsense since php is server side.

if I misunderstood what you want then please explain it more clearly


I don't know whether there is a php project that generates codes from 
screen designer. :)


--
  .~.   Might, Courage, Vision, SINCERITY. http://www.linux-sxs.org
 / v \  Simplicity is Beauty! May the Force and Farce be with you!
/( _ )\ (Ubuntu 6.10)  Linux 2.6.21.1
  ^ ^   22:47:01 up 13 days 7:40 0 users load average: 0.00 0.00 0.00
news://news.3home.net news://news.hkpcug.org news://news.newsgroup.com.hk

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Re: Sockets as a module or a separate PHP CLI instance?

2007-05-02 Thread Man-wai Chang

[EMAIL PROTECTED] wrote:

I need to do some socket work on a production machine that is constantly
busy so I don't dare re-compile php. Anybody know if it's possible to load
the socket functions dynamically, maybe as if they were in a module?


I think both Fedora Core and Ubuntu do it. Check out their RPM/DEB spec 
file for compiling the packages.


--
  .~.   Might, Courage, Vision, SINCERITY. http://www.linux-sxs.org
 / v \  Simplicity is Beauty! May the Force and Farce be with you!
/( _ )\ (Ubuntu 6.10)  Linux 2.6.21.1
  ^ ^   19:58:01 up 4 days 4:51 0 users load average: 0.06 0.11 0.04
news://news.3home.net news://news.hkpcug.org news://news.newsgroup.com.hk

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Re: What does mean?

2007-05-01 Thread Man-wai Chang

 END
 some code
END

It's heredoc syntax.
http://us2.php.net/manual/en/language.types.string.php#language.types.string.syntax.heredoc 



Bash redirection... :)

--
  .~.   Might, Courage, Vision, SINCERITY. http://www.linux-sxs.org
 / v \  Simplicity is Beauty! May the Force and Farce be with you!
/( _ )\ (Ubuntu 6.10)  Linux 2.6.21.1
  ^ ^   20:40:01 up 3 days 5:33 0 users load average: 1.00 1.02 1.00
news://news.3home.net news://news.hkpcug.org news://news.newsgroup.com.hk

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Re: What does mean?

2007-05-01 Thread Man-wai Chang

 END
 some code
END

Bash redirection... :)

Syntax error ;)


Bash uses only 2. PHP uses 3. And I am using this:

$sql=
  select ...
from 
left join ...
  on 
where .
;

--
  .~.   Might, Courage, Vision, SINCERITY. http://www.linux-sxs.org
 / v \  Simplicity is Beauty! May the Force and Farce be with you!
/( _ )\ (Ubuntu 6.10)  Linux 2.6.21.1
  ^ ^   21:53:01 up 3 days 6:46 0 users load average: 1.00 1.01 1.00
news://news.3home.net news://news.hkpcug.org news://news.newsgroup.com.hk

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Re: php + db2

2007-04-26 Thread Man-wai Chang

build test failed. Please check the config.log for details.
You need to source your DB2 environment before running PHP configure:
# . $IBM_DB2/db2profile


so where is your db2profile?

--
  .~.   Might. Courage. Vision. Sincerity. http://www.linux-sxs.org
 / v \  Simplicity is Beauty! May the Force and Farce be with you!
/( _ )\ (Fedora Core 4)  Linux 2.6.17-1.2142_FC4
  ^ ^   17:56:01 up 84 days 1:40 1 user load average: 0.00 0.00 0.00

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Re: php + db2

2007-04-26 Thread Man-wai Chang
Man-wai Chang wrote:
 build test failed. Please check the config.log for details.
 You need to source your DB2 environment before running PHP configure:
 # . $IBM_DB2/db2profile
 
 so where is your db2profile?
 

did you `export IBM_DB2=x`?

-- 
  .~.   Might, Courage, Vision, SINCERITY. http://www.linux-sxs.org
 / v \  Simplicity is Beauty! May the Force and Farce be with you!
/( _ )\ (Ubuntu 6.10)  Linux 2.6.20.7
  ^ ^   19:48:02 up 7 days 34 min 1 user load average: 3.57 3.86 3.34
news://news.3home.net news://news.hkpcug.org news://news.newsgroup.com.hk

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] ${}

2007-04-25 Thread Man-wai Chang

where can I find the documentation about this symbol?

-- 
  .~.   Might, Courage, Vision, SINCERITY. http://www.linux-sxs.org
 / v \  Simplicity is Beauty! May the Force and Farce be with you!
/( _ )\ (Ubuntu 6.10)  Linux 2.6.20.7
  ^ ^   21:22:01 up 6 days 2:08 0 users load average: 1.00 1.00 1.00
news://news.3home.net news://news.hkpcug.org news://news.newsgroup.com.hk

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Re: ${}

2007-04-25 Thread Man-wai Chang
Buesching, Logan J wrote:
 Heh, lucky me I was just looking into that earlier today.
 http://us.php.net/manual/en/language.types.string.php
 Around the Simple Syntax area.

Thanks. Foxpro called this macro substitution.

-- 
  .~.   Might, Courage, Vision, SINCERITY. http://www.linux-sxs.org
 / v \  Simplicity is Beauty! May the Force and Farce be with you!
/( _ )\ (Ubuntu 6.10)  Linux 2.6.20.7
  ^ ^   22:14:01 up 6 days 3:00 0 users load average: 1.02 1.03 1.00
news://news.3home.net news://news.hkpcug.org news://news.newsgroup.com.hk

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Re: ${}

2007-04-25 Thread Man-wai Chang
 Heh, lucky me I was just looking into that earlier today.
 http://us.php.net/manual/en/language.types.string.php
 Around the Simple Syntax area.

Foxpro called this Macro Substitution. There is also a eval() function
that works the same.



-- 
  .~.   Might, Courage, Vision, SINCERITY. http://www.linux-sxs.org
 / v \  Simplicity is Beauty! May the Force and Farce be with you!
/( _ )\ (Ubuntu 6.10)  Linux 2.6.20.7
  ^ ^   22:19:01 up 6 days 3:05 0 users load average: 0.28 0.76 0.91
news://news.3home.net news://news.hkpcug.org news://news.newsgroup.com.hk

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Re: ${}

2007-04-25 Thread Man-wai Chang
 $var1 = Something  + PHP Notice
 $var2 = Something Hmmm_that;

I wonder whether Smarty's way of specifying variables is based on this...

-- 
  .~.   Might, Courage, Vision, SINCERITY. http://www.linux-sxs.org
 / v \  Simplicity is Beauty! May the Force and Farce be with you!
/( _ )\ (Ubuntu 6.10)  Linux 2.6.20.7
  ^ ^   22:18:02 up 6 days 3:04 0 users load average: 0.58 0.91 0.96
news://news.3home.net news://news.hkpcug.org news://news.newsgroup.com.hk

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] PHP RAD framework

2007-04-13 Thread Man-wai Chang

Any recommendation? Smarty Templates help a bit, but still need lots of
coding...

-- 
  .~.   Might, Courage, Vision, SINCERITY. http://www.linux-sxs.org
 / v \  Simplicity is Beauty! May the Force and Farce be with you!
/( _ )\ (Ubuntu 6.10)  Linux 2.6.20.6
  ^ ^   22:26:01 up 6 days 5:17 0 users load average: 1.00 1.03 1.00
news://news.3home.net news://news.hkpcug.org news://news.newsgroup.com.hk

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Re: 0x9f54

2007-04-11 Thread Man-wai Chang
how do you do string comparison in utf-8? say the user entered a chinese
string the browser and you need to search for the string in the MySQL
table using PHP.

-- 
  .~.   Might, Courage, Vision, SINCERITY. http://www.linux-sxs.org
 / v \  Simplicity is Beauty! May the Force and Farce be with you!
/( _ )\ (Ubuntu 6.10)  Linux 2.6.20.6
  ^ ^   19:46:01 up 4 days 2:37 0 users load average: 1.00 1.00 1.00
news://news.3home.net news://news.hkpcug.org news://news.newsgroup.com.hk

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Re: 0x9f54

2007-04-10 Thread Man-wai Chang
 On the other hand, I remember you talked about the type of that
 column to be char(2).  Have you specified what encoding it's using?
 Moreover, I hope you're not using legacy encoding like Big5 or GB.  Use
 Unicode (UTF-8) if your database is a brand new one.

Unfortunately, I am still using Big5. you need a longer field to store
utf-8 codes for the same big5 string right?

-- 
  .~.   Might, Courage, Vision, SINCERITY. http://www.linux-sxs.org
 / v \  Simplicity is Beauty! May the Force and Farce be with you!
/( _ )\ (Ubuntu 6.10)  Linux 2.6.20.6
  ^ ^   19:11:01 up 3 days 2:02 0 users load average: 1.23 1.12 1.03
news://news.3home.net news://news.hkpcug.org news://news.newsgroup.com.hk

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Re: 0x9f54

2007-04-10 Thread Man-wai Chang
 Well, show us a part of your code. Do var_dump($value) before you
 enter it into the database, and see if it still says 0x9f54.

The error:

string(2) 
Duplicate entry '' for key 1

-- 
  .~.   Might, Courage, Vision, SINCERITY. http://www.linux-sxs.org
 / v \  Simplicity is Beauty! May the Force and Farce be with you!
/( _ )\ (Ubuntu 6.10)  Linux 2.6.20.6
  ^ ^   19:14:01 up 3 days 2:05 1 user load average: 2.24 1.42 1.14
news://news.3home.net news://news.hkpcug.org news://news.newsgroup.com.hk
?
class MYSQL {
private $fhandle;
var $row;
function MYSQL($host,$db,$usr,$pwd) {
$this-fhandle=new mysqli($host,$usr,$pwd,$db)
or die(mysqli_error($this-fhandle));
$this-query(set names 'big5');
}
function query($sql_str) {
$this-row=mysqli_query($this-fhandle, $sql_str) or 
die(mysqli_error($this-fhandle));
}
function affected_rows() {
return mysqli_affected_rows($this-row);
}
function num_rows() {
return mysqli_num_rows($this-row);
}
function fetch_assoc() {
return mysqli_fetch_assoc($this-row);
}
function __destruct() {
mysqli_close($this-fhandle);
}
function begin_tran() {
mysqli_autocommit($this-fhandle, FALSE);
}
function commit() {
mysqli_commit($this-fhandle);
mysqli_autocommit($this-fhandle, TRUE);
}
function rollback() {
mysqli_rollback($this-fhandle);
mysqli_autocommit($this-fhandle, TRUE);
}
}

function showcode($cChar) {
return 
[.dechex(ord(substr($cChar,0,1)))...dechex(ord(substr($cChar,1,1))).];
}


$target=new MYSQL(localhost,testing,root,testing);

$fhandle=dbase_open(/home/bt/canton.DBF,0);
if ($fhandle) {
$reccount=dbase_numrecords($fhandle);
echo input count: .$reccount.\n;
$target-query(show tables like 'canton';);
if ($target-num_rows()0)
$target-query(drop table canton);
$target-query(
create table canton (
.  big5 char(2) not null,
.  thekey char(6),
.  canton char(10),
.  changjei char(10),
.  touched integer,
.  primary key (big5)
.  ) character set big5;
);
for ($ii=1; $ii=$reccount; $ii++) {
$row=dbase_get_record_with_names($fhandle,$ii);
$ss=$row['BIG5'];
echo var_dump($ss);
$target-query(select * from canton where big5='.$ss.');
$yy = $target-num_rows();
if ($yy0) {
$query=update canton set touched=
. $row[TOUCHED]
.  where big5=' . $ss . ';;
}
else {
$query=insert into canton (
.  big5,
.  thekey,
.  changjei,
.  canton,
.  touched 
. ) values (
. '$ss',
. '.$row[THEKEY].',
. '.$row[CHANGJEI].',
. '.$row[CANTON].',
. $row[TOUCHED]
. );;
}
$result=$target-query($query);
if (! $target-row)
echo showcode($ss);
}
$result=$target-query(select count(*) as cnt from canton);
$yy = $target-fetch_assoc();
echo output count: .$yy['cnt'].\n;
dbase_close($fhandle);
}
?
-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Re: 0x9f54

2007-04-10 Thread Man-wai Chang
screenshot of the error:

-- 
  .~.   Might, Courage, Vision, SINCERITY. http://www.linux-sxs.org
 / v \  Simplicity is Beauty! May the Force and Farce be with you!
/( _ )\ (Ubuntu 6.10)  Linux 2.6.20.6
  ^ ^   19:25:01 up 3 days 2:16 1 user load average: 1.03 1.08 1.08
news://news.3home.net news://news.hkpcug.org news://news.newsgroup.com.hk

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] finding the index name of an associative array

2007-04-01 Thread Man-wai Chang
myarray=array()
myarray['a']=1
myarray['b']=1
myarray['c']=1

Is there an iterative way to find out the array index values ('a', 'b'
and 'c') of myarray?

-- 
  .~.   Might, Courage, Vision, SINCERITY. http://www.linux-sxs.org
 / v \  Simplicity is Beauty! May the Force and Farce be with you!
/( _ )\ (Ubuntu 6.10)  Linux 2.6.20.4
  ^ ^   15:58:01 up 8 days 3:10 0 users load average: 1.00 1.00 1.00
news://news.3home.net news://news.hkpcug.org news://news.newsgroup.com.hk

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Re: finding the index name of an associative array

2007-04-01 Thread Man-wai Chang
Jake McHenry wrote:
 foreach ($myarray as $key = $value)
 {
   echo $key = $value;
 }

Thanks. I just found that there is an array_key() function.

-- 
  .~.   Might, Courage, Vision, SINCERITY. http://www.linux-sxs.org
 / v \  Simplicity is Beauty! May the Force and Farce be with you!
/( _ )\ (Ubuntu 6.10)  Linux 2.6.20.4
  ^ ^   17:09:01 up 8 days 4:21 1 user load average: 1.10 1.03 1.01
news://news.3home.net news://news.hkpcug.org news://news.newsgroup.com.hk

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] why would these few statements writes the array?

2007-04-01 Thread Man-wai Chang
$array = array(1,2,3);
foreach( $array as $item );
foreach( $array as $item );
print_r( $array );

foreach is a read, not a write, isn't it?

-- 
  .~.   Might, Courage, Vision, SINCERITY. http://www.linux-sxs.org
 / v \  Simplicity is Beauty! May the Force and Farce be with you!
/( _ )\ (Ubuntu 6.10)  Linux 2.6.20.4
  ^ ^   17:09:01 up 8 days 4:21 1 user load average: 1.10 1.03 1.01
news://news.3home.net news://news.hkpcug.org news://news.newsgroup.com.hk

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Re: why would these few statements writes the array?

2007-04-01 Thread Man-wai Chang
Man-wai Chang wrote:
 $array = array(1,2,3);
 foreach( $array as $item );
 foreach( $array as $item );
 print_r( $array );
 
 foreach is a read, not a write, isn't it?

I got it...

-- 
  .~.   Might, Courage, Vision, SINCERITY. http://www.linux-sxs.org
 / v \  Simplicity is Beauty! May the Force and Farce be with you!
/( _ )\ (Ubuntu 6.10)  Linux 2.6.20.4
  ^ ^   19:33:01 up 8 days 6:45 0 users load average: 1.00 1.02 1.00
news://news.3home.net news://news.hkpcug.org news://news.newsgroup.com.hk

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Re: finding the index name of an associative array

2007-04-01 Thread Man-wai Chang
itoctopus wrote:
 Note, however, that array_keys is not recursive.

foreach is recursive??? thanks.

-- 
  .~.   Might, Courage, Vision, SINCERITY. http://www.linux-sxs.org
 / v \  Simplicity is Beauty! May the Force and Farce be with you!
/( _ )\ (Ubuntu 6.10)  Linux 2.6.20.4
  ^ ^   20:44:01 up 8 days 7:56 0 users load average: 1.00 1.00 1.00
news://news.3home.net news://news.hkpcug.org news://news.newsgroup.com.hk

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Re: 0x9f54

2007-03-31 Thread Man-wai Chang
 MySQL? MSSQL? PgSQL?
 Tijnema
 It seems he wanted to insert a Chinese character with that hex value.

Yes... I tried the insert with PHP, including the use of
mysql_real_escape_string(), but MySQL still gave me a blank only.

-- 
  .~.   Might, Courage, Vision, SINCERITY. http://www.linux-sxs.org
 / v \  Simplicity is Beauty! May the Force and Farce be with you!
/( _ )\ (Ubuntu 6.10)  Linux 2.6.20.4
  ^ ^   13:34:01 up 8 days 46 min 0 users load average: 1.04 1.01 1.00
news://news.3home.net news://news.hkpcug.org news://news.newsgroup.com.hk

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] 0x9f54

2007-03-29 Thread Man-wai Chang
Anyone knew how to insert this value into a char(2) column?

-- 
  .~.   Might, Courage, Vision, SINCERITY. http://www.linux-sxs.org
 / v \  Simplicity is Beauty! May the Force and Farce be with you!
/( _ )\ (Ubuntu 6.10)  Linux 2.6.20.4
  ^ ^   22:19:01 up 5 days 9:31 0 users load average: 1.04 1.19 1.16
news://news.3home.net news://news.hkpcug.org news://news.newsgroup.com.hk

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Re: newbie question about storing big5 codes into mysql-5.0.24a

2007-03-25 Thread Man-wai Chang
 queries in the command-line MySQL client. If it works there but not
 through mysqli_query() then you might have a case for asking here.

For the 13081 chinese alphabets I tried, only 1 one failed, and it's
0x9f54. mysqli_query() should have escaped the string for me. So ...

I suppose most PHP programmers are also experts in MySQL (they are
basically tied). SO I tried my luck here. :)

-- 
  .~.   Might, Courage, Vision, SINCERITY. http://www.linux-sxs.org
 / v \  Simplicity is Beauty! May the Force and Farce be with you!
/( _ )\ (Ubuntu 6.10)  Linux 2.6.20.4
  ^ ^   21:24:01 up 1 day 8:36 0 users load average: 1.00 1.02 1.00
news://news.3home.net news://news.hkpcug.org news://news.newsgroup.com.hk

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] newbie question about storing big5 codes into mysql-5.0.24a

2007-03-24 Thread Man-wai Chang

create table temp ( big5 char(2) ) character set big5 collate big5_bin;
insert into temp ( big5 ) values ( 0x9f54 );
insert into temp ( big5 ) values ( 0x9f53 );

The 2nd query will report duplicated key. How should I fix the problem?

-- 
  .~.   Might, Courage, Vision, SINCERITY. http://www.linux-sxs.org
 / v \  Simplicity is Beauty! May the Force and Farce be with you!
/( _ )\ (Ubuntu 6.10)  Linux 2.6.20.4
  ^ ^   15:46:01 up 2:58 1 user load average: 2.32 1.73 1.48
news://news.3home.net news://news.hkpcug.org news://news.newsgroup.com.hk

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Re: newbie question about storing big5 codes into mysql-5.0.24a

2007-03-24 Thread Man-wai Chang
 create table temp ( big5 char(2) ) character set big5 collate big5_bin;
 insert into temp ( big5 ) values ( 0x9f54 );
 insert into temp ( big5 ) values ( 0x9f53 );
 The 2nd query will report duplicated key. How should I fix the problem?
 What does this has to do with PHP?
 First of all I don't see any PHP code, and second this is an error in
 your SQL query, so you should be on the MySQL list.

I used mysqli_query() to send the SQL. How could I make it work?

-- 
  .~.   Might, Courage, Vision, SINCERITY. http://www.linux-sxs.org
 / v \  Simplicity is Beauty! May the Force and Farce be with you!
/( _ )\ (Ubuntu 6.10)  Linux 2.6.20.4
  ^ ^   14:43:01 up 1 day 1:55 0 users load average: 1.01 1.02 1.00
news://news.3home.net news://news.hkpcug.org news://news.newsgroup.com.hk

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Re: install php 5.2.1 with checkinstall

2007-03-18 Thread Man-wai Chang
 # rpm -ivh php-5.2.1-1.i386.rpm 
 file /etc/pear.conf from install of php-5.2.1-1 conflicts with file 
 from package php-pear-1.4.9-4
 file /usr/share/pear/.channels/pear.php.net.reg from install of
 php-5.2.1-1 conflicts with file from package php-pear-1.4.9-4
 file /usr/share/pear/.depdb from install of php-5.2.1-1 conflicts 
 with file from package php-pear-1.4.9-4

I suggest you use `rpm -r` to remove the original php package in your linux.

-- 
  .~.   Might, Courage, Vision, SINCERITY. http://www.linux-sxs.org
 / v \  Simplicity is Beauty! May the Force and Farce be with you!
/( _ )\ (Ubuntu 6.10)  Linux 2.6.20.3
  ^ ^   19:00:01 up 5:18 0 users load average: 1.00 1.00 1.00
news://news.3home.net news://news.hkpcug.org news://news.newsgroup.com.hk

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Re: install php 5.2.1 with checkinstall

2007-03-18 Thread Man-wai Chang
In case you want a full ./configure line...

#!/bin/bash

./configure \
--prefix=/usr \
--sysconfdir=/etc \
--with-config-file-path=/etc \
--enable-track-vars \
--enable-ftp \
--enable-sysvsem \
--enable-sysvshm \
--enable-sockets \
--enable-gd-native-ttf \
--enable-memory-limit \
--enable-trans-sid \
--enable-magic-quotes \
--enable-exif \
--enable-inline-optimization \
--enable-dbase \
--enable-mbstring \
--enable-embedded-mysqli \
--with-mysqli \
--with-gettext \
--with-gd \
--with-calendar=shared \
--with-apxs2=`which apxs2` \
--with-imap \
--with-ncurses \
--with-zlib-dir=/usr \
--with-jpeg-dir=/usr \
--with-png-dir=/usr \
--with-xpm-dir=/usr \
--with-openssl=/usr \
--with-freetype-dir=/usr/include \
--with-mysql=/usr \
--with-kerberos \
--with-imap-ssl

#
# --with-ldap \
# --with-ttf=/usr/X11R6 \
# --with-mm=/usr/mm-1.1.3 \
# --with-pgsql=/usr/local/pgsql \
# --with-pdflib=/usr/local \
#

make

echo -n Remember to back up /etc/apache/httpd.conf first
exit
# make install



-- 
  .~.   Might, Courage, Vision, SINCERITY. http://www.linux-sxs.org
 / v \  Simplicity is Beauty! May the Force and Farce be with you!
/( _ )\ (Ubuntu 6.10)  Linux 2.6.20.3
  ^ ^   19:57:01 up 6:15 0 users load average: 1.10 1.05 1.01
news://news.3home.net news://news.hkpcug.org news://news.newsgroup.com.hk

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] CONTACT ...

2007-02-01 Thread Man-wai Chang
Alberto Ferreira wrote:
 Teste 
 


-- 
  .~.   Might, Courage, Vision, SINCERITY. http://www.linux-sxs.org
 / v \  Simplicity is Beauty! May the Force and Farce be with you!
/( _ )\ (Ubuntu 6.10)  Linux 2.6.19.2
  ^ ^   19:27:01 up 20 days 22:39 0 users load average: 1.07 1.02 1.00
news://news.3home.net news://news.hkpcug.org news://news.newsgroup.com.hk

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Re: WebMail client

2006-10-02 Thread Man-wai Chang
 Do you have any suggestion on WebMail clients written in PHP that is good
 and easy to install?

do a search in http://freshmeat.net

-- 
  .~.   Might, Courage, Vision, SINCERITY. http://www.linux-sxs.org
 / v \  Simplicity is Beauty! May the Force and Farce be with you!
/( _ )\ (Ubuntu 6.06)  Linux 2.6.18
  ^ ^   18:53:01 up 11 days 21:18 0 users load average: 1.00 1.00 1.00
news://news.3home.net news://news.hkpcug.org news://news.newsgroup.com.hk

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Hylafax: nweb2fax

2006-09-20 Thread Man-wai Chang

Anyone got an updated and bug-fixed version? The one I got seems to have
many serious bugs.

-- 
  .~.   Might, Courage, Vision, SINCERITY. http://www.linux-sxs.org
 / v \  Simplicity is Beauty! May the Force and Farce be with you!
/( _ )\ (Ubuntu 6.06)  Linux 2.6.17.13
  ^ ^   19:50:01 up 11 days 44 min 0 users load average: 1.07 1.04 1.01
news://news.3home.net news://news.hkpcug.org news://news.newsgroup.com.hk

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Pre-printed forms

2006-09-14 Thread Man-wai Chang

How do you guys and gals use PHP+HTML+CSS to print a report to
preprinted forms with precision?

if the report is to be printed at client side, how do you do it? Via
networked printer?

-- 
  .~.   Might, Courage, Vision, SINCERITY. http://www.linux-sxs.org
 / v \  Simplicity is Beauty! May the Force and Farce be with you!
/( _ )\ (Ubuntu 6.06)  Linux 2.6.17.13
  ^ ^   19:34:01 up 5 days 28 min 0 users load average: 1.00 1.02 1.00
news://news.3home.net news://news.hkpcug.org news://news.newsgroup.com.hk

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Re: Pre-printed forms

2006-09-14 Thread Man-wai Chang
 You'd probably have better luck using PHP+PDF Generation Classes of some
 sort if you need precision layouts for printing... With HTML+CSS it will
 still vary depending on the render used...

Not a bad idea. But is there free PHP class to do it?

-- 
  .~.   Might, Courage, Vision, SINCERITY. http://www.linux-sxs.org
 / v \  Simplicity is Beauty! May the Force and Farce be with you!
/( _ )\ (Ubuntu 6.06)  Linux 2.6.17.13
  ^ ^   21:31:01 up 5 days 2:25 0 users load average: 1.03 0.98 0.99
news://news.3home.net news://news.hkpcug.org news://news.newsgroup.com.hk

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Re: How could I make the browser to send a command to a cash register...

2006-09-11 Thread Man-wai Chang
 That 100% depends on how the cash register works.  Is it an NT cash
 register, or an propitiatory one?  Is it rs232 or on a network?
 Basically, find out how the cash register can be controlled, then make a
 php script that can fire that control.

Thanks.

It's a RS232 serial register. PHP, running at the server side, could
talk to the hardware at the client side? Or is it ActiveX?


-- 
  .~.   Might, Courage, Vision, SINCERITY. http://www.linux-sxs.org
 / v \  Simplicity is Beauty! May the Force and Farce be with you!
/( _ )\ (Ubuntu 6.06)  Linux 2.6.17.13
  ^ ^   23:31:01 up 2 days 4:25 0 users load average: 0.04 0.07 0.05
news://news.3home.net news://news.hkpcug.org news://news.newsgroup.com.hk

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] How could I make the browser to send a command to a cash register...

2006-09-10 Thread Man-wai Chang
to open its drawer?

-- 
  .~.   Might, Courage, Vision, SINCERITY. http://www.linux-sxs.org
 / v \  Simplicity is Beauty! May the Force and Farce be with you!
/( _ )\ (Ubuntu 6.06)  Linux 2.6.17.13
  ^ ^   21:43:01 up 1 day 2:37 0 users load average: 0.02 0.03 0.00
news://news.3home.net news://news.hkpcug.org news://news.newsgroup.com.hk

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Re: Simulating a POST

2006-06-15 Thread Man-wai Chang

body onload=document.myform.submit()

It says : everytime page loads submit the form.
And since submitting a form is like reloading a page it will go over and
over again.


Then how could I make it happen once only? I already had a 
if..then..else to separate the 2 sections of codes.


--
  .~.   Might, Courage, Vision, SINCERITY. http://www.linux-sxs.org
 / v \  Simplicity is Beauty! May the Force and Farce be with you!
/( _ )\ (Ubuntu 6.06)  Linux 2.6.16.20
  ^ ^   16:45:02 up 9 days 2:28 0 users load average: 1.07 1.07 1.01
news://news.3home.net news://news.hkpcug.org news://news.newsgroup.com.hk

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Re: Simulating a POST

2006-06-15 Thread Man-wai Chang

Here is the new version:

--
  .~.   Might, Courage, Vision, SINCERITY. http://www.linux-sxs.org
 / v \  Simplicity is Beauty! May the Force and Farce be with you!
/( _ )\ (Ubuntu 6.06)  Linux 2.6.16.20
  ^ ^   16:48:01 up 9 days 2:31 1 user load average: 1.02 1.04 1.00
news://news.3home.net news://news.hkpcug.org news://news.newsgroup.com.hk
?php

function getLocationCaidaNetGeo($ip)
{ 
$NetGeoURL = http://netgeo.caida.org/perl/netgeo.cgi?target=.$ip; 
if($NetGeoFP = fopen($NetGeoURL,r))
{ 
ob_start();
fpassthru($NetGeoFP);
$NetGeoHTML = ob_get_contents();
ob_end_clean();
fclose($NetGeoFP);
}
return $NetGeoHTML;
}

if ($HTTP_POST_VARS['btnsubmit']) {
print_r(getLocationCaidaNetGeo($_POST['ip']));
} else {
?
htmlhead/head
body onload=document.myform.submit()
form method=post enctype=multipart/form-data name=myform
input type=text name=ip
input type=submit name=btnsubmit value=submit
/form
/body/html
?php
}
?

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Re: Simulating a POST

2006-06-15 Thread Man-wai Chang


Here is the new version:



--
  .~.   Might, Courage, Vision, SINCERITY. http://www.linux-sxs.org
 / v \  Simplicity is Beauty! May the Force and Farce be with you!
/( _ )\ (Ubuntu 6.06)  Linux 2.6.16.20
  ^ ^   16:48:01 up 9 days 2:31 1 user load average: 1.02 1.04 1.00
news://news.3home.net news://news.hkpcug.org news://news.newsgroup.com.hk

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Simulating a POST

2006-06-14 Thread Man-wai Chang

I hit the script by http://server/netgeo.post.php?ip=192.168.1.1

But the script entered an endless loop. What's wrong?

-- 
  .~.   Might, Courage, Vision, SINCERITY. http://www.linux-sxs.org
 / v \  Simplicity is Beauty! May the Force and Farce be with you!
/( _ )\ (Ubuntu 6.06)  Linux 2.6.16.20
  ^ ^   11:47:02 up 8 days 21:30 0 users load average: 1.09 1.06 1.21
news://news.3home.net news://news.hkpcug.org news://news.newsgroup.com.hk


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Simulating a POST

2006-06-14 Thread Man-wai Chang

I hit the script by http://server/haha.php?ip=192.168.1.1

But the script entered an endless loop. What's wrong?

-- 
  .~.   Might, Courage, Vision, SINCERITY. http://www.linux-sxs.org
 / v \  Simplicity is Beauty! May the Force and Farce be with you!
/( _ )\ (Ubuntu 6.06)  Linux 2.6.16.20
  ^ ^   11:48:01 up 8 days 21:31 0 users load average: 1.06 1.06 1.20
news://news.3home.net news://news.hkpcug.org news://news.newsgroup.com.hk
htmlhead/head
body onload=document.myform.submit()
?php

function getLocationCaidaNetGeo($ip)
{ 
$NetGeoURL = http://netgeo.caida.org/perl/netgeo.cgi?target=.$ip; 
if($NetGeoFP = fopen($NetGeoURL,r))
{ 
ob_start();
fpassthru($NetGeoFP);
$NetGeoHTML = ob_get_contents();
ob_end_clean();
fclose($NetGeoFP);
}
return $NetGeoHTML;
}

if ($HTTP_POST_VARS['btnsubmit']) {
print_r(getLocationCaidaNetGeo($_POST['ip']));
} else {
?
form method=post enctype=multipart/form-data name=myform action=?php 
echo($PHP_SELF); ?
input type=text name=ip
input type=submit name=btnsubmit action=submit
/form
?php
}
?
/body/html
-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] PHP MySQL

2006-01-02 Thread Man-wai Chang
A table with a column big5 char(2) not null primary key.

  $target-query(delete from canton);
  for ($ii=0; $ii256; $ii++) {
for ($jj=0; $jj256; $jj++) {
  echo $ii ... $jj . \n;
  $query=insert into canton ( big5 ) values ( '
  . mysql_real_escape_string(chr($ii).chr($jj))
  . ' );
  $target-query($query);
}
  }

The program died with this output:

0.92
0.93
0.94
0.95
0.96
0.97
Duplicate entry '' for key 1

The character strings shouldn't be repeated. Why did it stop at (0,97)?

-- 
  .~.Might, Courage, Vision. SINCERITY. http://www.linux-sxs.org
 / v \
/( _ )\  (Ubuntu 5.10)  Linux 2.6.14.4
  ^ ^22:15:01 up 8 days 11:12 load average: 0.02 0.06 0.10

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php