php-general Digest 9 Aug 2009 10:06:11 -0000 Issue 6275
Topics (messages 296493 through 296504):
Re: ZCE Question
296493 by: Eddie Drapkin
296503 by: Richard Heyes
Re: PHP programming strategy
296494 by: Clancy
Readline Thread Safety Question
296495 by: MIke Alaimo
use preg_replace to nix and line with "display: none"
296496 by: Rob Gould
296497 by: LinuxManMikeC
296498 by: Michael A. Peters
296499 by: Rob Gould
296500 by: Rob Gould
296501 by: LinuxManMikeC
APC optimization in CLI
296502 by: Matic Meznar
296504 by: Robert Cummings
Administrivia:
To subscribe to the digest, e-mail:
php-general-digest-subscr...@lists.php.net
To unsubscribe from the digest, e-mail:
php-general-digest-unsubscr...@lists.php.net
To post to the list, e-mail:
php-gene...@lists.php.net
----------------------------------------------------------------------
--- Begin Message ---
On Sat, Aug 8, 2009 at 4:18 PM, Augusto Flavio<afla...@gmail.com> wrote:
> Has someone an clue about this zce question:
>
> The following is a common XML structure used in service oriented
> architectures, what does it represent?
>
>
> <?xml version="1.0"?>
> <methodCall>
> <methodName>myMethod</methodName>
> <params>
> <param>
> <value><string>HI!</string></value>
> </param>
> </params>
> </methodCall>
>
>
> Answer...
> None of the above
> A fragment of a complete SOAP request
> XML-RPC
> REST
> SOAP
>
>
> i think the answer is: SOAP
>
>
> some idea?
>
>
> thanks
>
> Augusto Morais
>
Looks like XMLRPC to me.
--- End Message ---
--- Begin Message ---
Hi,
> Looks like XMLRPC to me.
Agreed - it's not gibberish so it can't be SOAP...
--
Richard Heyes
HTML5 graphing: RGraph - www.rgraph.net (updated 8th August)
Lots of PHP and Javascript code - http://www.phpguru.org
--- End Message ---
--- Begin Message ---
On Sat, 8 Aug 2009 07:53:42 -0400, tedd.sperl...@gmail.com (tedd) wrote:
....
>You don't need the width="210" height="300". For example, this works:
>
><div class="pfm">
> <img src="Images/Nxxxxx.jpg">
> <p class="nrmltextn">Yanni Nxxxxx </p>
> <p class="notetextn">Sally Riordan Scholarship, 2007- </p>
></div>
I have read that if you omit the dimensions you will sometimes see the page
reshuffle
itself as it loads, because the browser starts loading, then finds the
dimensions are
incompatible with it's initial assumptions. I don't know how serious a problem
this is,
but if the dimensions prevent it happening I am happy to provide them.
In my scheme of things <p> has normal paragraph spacing, 'nrmltxtn' has zero
spacing, and
'notetxtn' is a size smaller, also with zero line spacing.
>Also, if you use first-child, it could be taken down to:
>
><div class="pfm">
> <img src="Images/Nxxxxx.jpg">
> <p>Yanni Nxxxxx </p>
> <p>Sally Riordan Scholarship, 2007- </p>
></div>
Except that line 2 is smaller than line 1. In my scheme of things <p> has
normal
paragraph spacing, 'nrmltxtn' has zero spacing, and 'notetxtn' is a size
smaller, also
with zero line spacing.
I could redefine <p> & <h4> for this class (provided I never want to use the
normal values
in it), but there is something to be said for having a standard set of fonts,
and always
knowing what I will get, rather than having <p> mean something different every
time I use
it.
And, as others have pointed out, a few thousand bytes more or less is totally
immaterial.
--- End Message ---
--- Begin Message ---
Hello,
I am using PHP 5.3 with readline support. I read that PHP readline is
never thread safe.
I do not use the readline functions in a web application. What
implications does this warning of thread safety have with respect to
running normal web applications using apache2?
Thank You,
Mike
--- End Message ---
--- Begin Message ---
I have a bunch of bullets in a list coming from a previous post, and I
need to eliminate any line from this string that contains "display:
none"
<li id="bullet_ug1_col2_9" style="display: list-item;">Reserved
Frontstretch Tower Ticket to the Camping World 300 on Saturday </li>
<li id="bullet_2_9" style="display: list-item;">Reserved Frontstretch
Tower Ticket to the Daytona 500 on Sunday </li>
<li id="bullet_addon_col2_9" style="display: none;"/>
<li id="bullet_addon3_9" style="display: none;"/>
<li id="bullet_option2_col4_9" style="display: none;"/>
<li id="bullet_option2_col3_9" style="display: none;"/>
<li id="bullet_option2_col2_9" style="display: none;"/>
<li id="bullet_option2_col1_9" style="display: none;"/>
<li id="bullet_option3_col4_9" style="display: none;"/>
<li id="bullet_option3_col3_9" style="display: none;"/>
<li id="bullet_option3_col2_9" style="display: none;"/>
<li id="bullet_option3_col1_9" style="display: none;"/>
<li id="bullet_option4_col4_9" style="display: none;"/>
<li id="bullet_option4_col3_9" style="display: none;"/>
<li id="bullet_option4_col2_9" style="display: none;"/>
<li id="bullet_option4_col1_9" style="display: none;"/>
<li id="bullet_option5_col4_9" style="display: none;"/>
<li id="bullet_option5_col3_9" style="display: none;"/>
<li id="bullet_option5_col2_9" style="display: none;"/>
<li id="bullet_option5_col1_9" style="display: none;"/>
<li id="bullet_5_9">Official Daytona 500 Race Week Program </li>
<li id="bullet_6_9">Benchwarmer Sports Souvenir Ticket Protector and
Lanyard </li>
<li id="bullet_7_9">On Site Benchwarmer Tour Staff </li>
<li id="bullet_8_9">All Taxes and Service Charges</li>
I'm CLOSE, but since the style = "display:[space]none" my preg_replace
doesn't catch it. Can anyone help me determine the correct
preg_replace pattern to do this?
$bl = $_POST['bulletlist'];
$pattern = '|^.+?display:none.+?$|mi';
$bl = preg_replace($pattern,'',$bl);
--- End Message ---
--- Begin Message ---
On Sat, Aug 8, 2009 at 11:14 PM, Rob Gould<gould...@mac.com> wrote:
> I have a bunch of bullets in a list coming from a previous post, and I need
> to eliminate any line from this string that contains "display: none"
>
>
> <li id="bullet_ug1_col2_9" style="display: list-item;">Reserved Frontstretch
> Tower Ticket to the Camping World 300 on Saturday </li>
> <li id="bullet_2_9" style="display: list-item;">Reserved Frontstretch Tower
> Ticket to the Daytona 500 on Sunday </li>
> <li id="bullet_addon_col2_9" style="display: none;"/>
> <li id="bullet_addon3_9" style="display: none;"/>
> <li id="bullet_option2_col4_9" style="display: none;"/>
> <li id="bullet_option2_col3_9" style="display: none;"/>
> <li id="bullet_option2_col2_9" style="display: none;"/>
> <li id="bullet_option2_col1_9" style="display: none;"/>
> <li id="bullet_option3_col4_9" style="display: none;"/>
> <li id="bullet_option3_col3_9" style="display: none;"/>
> <li id="bullet_option3_col2_9" style="display: none;"/>
> <li id="bullet_option3_col1_9" style="display: none;"/>
> <li id="bullet_option4_col4_9" style="display: none;"/>
> <li id="bullet_option4_col3_9" style="display: none;"/>
> <li id="bullet_option4_col2_9" style="display: none;"/>
> <li id="bullet_option4_col1_9" style="display: none;"/>
> <li id="bullet_option5_col4_9" style="display: none;"/>
> <li id="bullet_option5_col3_9" style="display: none;"/>
> <li id="bullet_option5_col2_9" style="display: none;"/>
> <li id="bullet_option5_col1_9" style="display: none;"/>
> <li id="bullet_5_9">Official Daytona 500 Race Week Program </li>
> <li id="bullet_6_9">Benchwarmer Sports Souvenir Ticket Protector and Lanyard
> </li>
> <li id="bullet_7_9">On Site Benchwarmer Tour Staff </li>
> <li id="bullet_8_9">All Taxes and Service Charges</li>
>
>
>
>
> I'm CLOSE, but since the style = "display:[space]none" my preg_replace
> doesn't catch it. Can anyone help me determine the correct preg_replace
> pattern to do this?
>
> $bl = $_POST['bulletlist'];
> $pattern = '|^.+?display:none.+?$|mi';
> $bl = preg_replace($pattern,'',$bl);
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
I found your use of ? rather... creative... Anyway, just add the
condition "0 or more whitespace" to your regex.
$pattern = '|^.+display:\w*none.+$|';
--- End Message ---
--- Begin Message ---
Rob Gould wrote:
I have a bunch of bullets in a list coming from a previous post, and I
need to eliminate any line from this string that contains "display: none"
<li id="bullet_ug1_col2_9" style="display: list-item;">Reserved
Frontstretch Tower Ticket to the Camping World 300 on Saturday </li>
<li id="bullet_2_9" style="display: list-item;">Reserved Frontstretch
Tower Ticket to the Daytona 500 on Sunday </li>
<li id="bullet_addon_col2_9" style="display: none;"/>
<li id="bullet_addon3_9" style="display: none;"/>
<li id="bullet_option2_col4_9" style="display: none;"/>
<li id="bullet_option2_col3_9" style="display: none;"/>
<li id="bullet_option2_col2_9" style="display: none;"/>
<li id="bullet_option2_col1_9" style="display: none;"/>
<li id="bullet_option3_col4_9" style="display: none;"/>
<li id="bullet_option3_col3_9" style="display: none;"/>
<li id="bullet_option3_col2_9" style="display: none;"/>
<li id="bullet_option3_col1_9" style="display: none;"/>
<li id="bullet_option4_col4_9" style="display: none;"/>
<li id="bullet_option4_col3_9" style="display: none;"/>
<li id="bullet_option4_col2_9" style="display: none;"/>
<li id="bullet_option4_col1_9" style="display: none;"/>
<li id="bullet_option5_col4_9" style="display: none;"/>
<li id="bullet_option5_col3_9" style="display: none;"/>
<li id="bullet_option5_col2_9" style="display: none;"/>
<li id="bullet_option5_col1_9" style="display: none;"/>
<li id="bullet_5_9">Official Daytona 500 Race Week Program </li>
<li id="bullet_6_9">Benchwarmer Sports Souvenir Ticket Protector and
Lanyard </li>
<li id="bullet_7_9">On Site Benchwarmer Tour Staff </li>
<li id="bullet_8_9">All Taxes and Service Charges</li>
I'm CLOSE, but since the style = "display:[space]none" my preg_replace
doesn't catch it. Can anyone help me determine the correct preg_replace
pattern to do this?
$bl = $_POST['bulletlist'];
$pattern = '|^.+?display:none.+?$|mi';
$bl = preg_replace($pattern,'',$bl);
Easy to do with xml tools if your input is easily manipulated by xml
tools, but try this:
$pattern = '/<li[^>]*style="display: none[^>]*>/';
not tried myself.
--- End Message ---
--- Begin Message ---
I wish I could say this works, but I'm not having success with this
pattern. All the lines with display: none are still in the $bl string.
On Aug 9, 2009, at 1:50 AM, LinuxManMikeC wrote:
<li id="bullet_ug1_col2_9" style="display: list-item;">Reserved
Frontstretch
Tower Ticket to the Camping World 300 on Saturday </li>
<li id="bullet_2_9" style="display: list-item;">Reserved
Frontstretch Tower
Ticket to the Daytona 500 on Sunday </li>
<li id="bullet_addon_col2_9" style="display: none;"/>
<li id="bullet_addon3_9" style="display: none;"/>
<li id="bullet_option2_col4_9" style="display: none;"/>
<li id="bullet_option2_col3_9" style="display: none;"/>
<li id="bullet_option2_col2_9" style="display: none;"/>
<li id="bullet_option2_col1_9" style="display: none;"/>
<li id="bullet_option3_col4_9" style="display: none;"/>
<li id="bullet_option3_col3_9" style="display: none;"/>
<li id="bullet_option3_col2_9" style="display: none;"/>
<li id="bullet_option3_col1_9" style="display: none;"/>
<li id="bullet_option4_col4_9" style="display: none;"/>
<li id="bullet_option4_col3_9" style="display: none;"/>
<li id="bullet_option4_col2_9" style="display: none;"/>
<li id="bullet_option4_col1_9" style="display: none;"/>
<li id="bullet_option5_col4_9" style="display: none;"/>
<li id="bullet_option5_col3_9" style="display: none;"/>
<li id="bullet_option5_col2_9" style="display: none;"/>
<li id="bullet_option5_col1_9" style="display: none;"/>
<li id="bullet_5_9">Official Daytona 500 Race Week Program </li>
<li id="bullet_6_9">Benchwarmer Sports Souvenir Ticket Protector
and Lanyard
</li>
<li id="bullet_7_9">On Site Benchwarmer Tour Staff </li>
<li id="bullet_8_9">All Taxes and Service Charges</li>
I'm CLOSE, but since the style = "display:[space]none" my
preg_replace
doesn't catch it. Can anyone help me determine the correct
preg_replace
pattern to do this?
$bl = $_POST['bulletlist'];
$pattern = '|^.+?display:none.+?$|mi';
$bl = preg_replace($pattern,'',$bl);
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
I found your use of ? rather... creative... Anyway, just add the
condition "0 or more whitespace" to your regex.
$pattern = '|^.+display:\w*none.+$|';
I found your use of ? rather... creative... Anyway, just add the
condition "0 or more whitespace" to your regex.
$pattern = '|^.+display:\w*none.+$|';
--- End Message ---
--- Begin Message ---
Yay! That worked. Thanks!
On Aug 9, 2009, at 1:53 AM, Michael A. Peters wrote:
Rob Gould wrote:
I have a bunch of bullets in a list coming from a previous post,
and I need to eliminate any line from this string that contains
"display: none"
<li id="bullet_ug1_col2_9" style="display: list-item;">Reserved
Frontstretch Tower Ticket to the Camping World 300 on Saturday </li>
<li id="bullet_2_9" style="display: list-item;">Reserved
Frontstretch Tower Ticket to the Daytona 500 on Sunday </li>
<li id="bullet_addon_col2_9" style="display: none;"/>
<li id="bullet_addon3_9" style="display: none;"/>
<li id="bullet_option2_col4_9" style="display: none;"/>
<li id="bullet_option2_col3_9" style="display: none;"/>
<li id="bullet_option2_col2_9" style="display: none;"/>
<li id="bullet_option2_col1_9" style="display: none;"/>
<li id="bullet_option3_col4_9" style="display: none;"/>
<li id="bullet_option3_col3_9" style="display: none;"/>
<li id="bullet_option3_col2_9" style="display: none;"/>
<li id="bullet_option3_col1_9" style="display: none;"/>
<li id="bullet_option4_col4_9" style="display: none;"/>
<li id="bullet_option4_col3_9" style="display: none;"/>
<li id="bullet_option4_col2_9" style="display: none;"/>
<li id="bullet_option4_col1_9" style="display: none;"/>
<li id="bullet_option5_col4_9" style="display: none;"/>
<li id="bullet_option5_col3_9" style="display: none;"/>
<li id="bullet_option5_col2_9" style="display: none;"/>
<li id="bullet_option5_col1_9" style="display: none;"/>
<li id="bullet_5_9">Official Daytona 500 Race Week Program </li>
<li id="bullet_6_9">Benchwarmer Sports Souvenir Ticket Protector
and Lanyard </li>
<li id="bullet_7_9">On Site Benchwarmer Tour Staff </li>
<li id="bullet_8_9">All Taxes and Service Charges</li>
I'm CLOSE, but since the style = "display:[space]none" my
preg_replace doesn't catch it. Can anyone help me determine the
correct preg_replace pattern to do this?
$bl = $_POST['bulletlist'];
$pattern = '|^.+?display:none.+?$|mi';
$bl = preg_replace($pattern,'',$bl);
Easy to do with xml tools if your input is easily manipulated by xml
tools, but try this:
$pattern = '/<li[^>]*style="display: none[^>]*>/';
not tried myself.
--- End Message ---
--- Begin Message ---
On Sun, Aug 9, 2009 at 12:17 AM, Rob Gould<gould...@mac.com> wrote:
> I wish I could say this works, but I'm not having success with this pattern.
> All the lines with display: none are still in the $bl string.
>
> On Aug 9, 2009, at 1:50 AM, LinuxManMikeC wrote:
>
> <li id="bullet_ug1_col2_9" style="display: list-item;">Reserved Frontstretch
>
> Tower Ticket to the Camping World 300 on Saturday </li>
>
> <li id="bullet_2_9" style="display: list-item;">Reserved Frontstretch Tower
>
> Ticket to the Daytona 500 on Sunday </li>
>
> <li id="bullet_addon_col2_9" style="display: none;"/>
>
> <li id="bullet_addon3_9" style="display: none;"/>
>
> <li id="bullet_option2_col4_9" style="display: none;"/>
>
> <li id="bullet_option2_col3_9" style="display: none;"/>
>
> <li id="bullet_option2_col2_9" style="display: none;"/>
>
> <li id="bullet_option2_col1_9" style="display: none;"/>
>
> <li id="bullet_option3_col4_9" style="display: none;"/>
>
> <li id="bullet_option3_col3_9" style="display: none;"/>
>
> <li id="bullet_option3_col2_9" style="display: none;"/>
>
> <li id="bullet_option3_col1_9" style="display: none;"/>
>
> <li id="bullet_option4_col4_9" style="display: none;"/>
>
> <li id="bullet_option4_col3_9" style="display: none;"/>
>
> <li id="bullet_option4_col2_9" style="display: none;"/>
>
> <li id="bullet_option4_col1_9" style="display: none;"/>
>
> <li id="bullet_option5_col4_9" style="display: none;"/>
>
> <li id="bullet_option5_col3_9" style="display: none;"/>
>
> <li id="bullet_option5_col2_9" style="display: none;"/>
>
> <li id="bullet_option5_col1_9" style="display: none;"/>
>
> <li id="bullet_5_9">Official Daytona 500 Race Week Program </li>
>
> <li id="bullet_6_9">Benchwarmer Sports Souvenir Ticket Protector and Lanyard
>
> </li>
>
> <li id="bullet_7_9">On Site Benchwarmer Tour Staff </li>
>
> <li id="bullet_8_9">All Taxes and Service Charges</li>
>
>
>
>
> I'm CLOSE, but since the style = "display:[space]none" my preg_replace
>
> doesn't catch it. Can anyone help me determine the correct preg_replace
>
> pattern to do this?
>
> $bl = $_POST['bulletlist'];
>
> $pattern = '|^.+?display:none.+?$|mi';
>
> $bl = preg_replace($pattern,'',$bl);
>
> --
>
> PHP General Mailing List (http://www.php.net/)
>
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
>
> I found your use of ? rather... creative... Anyway, just add the
> condition "0 or more whitespace" to your regex.
>
> $pattern = '|^.+display:\w*none.+$|';
> I found your use of ? rather... creative... Anyway, just add the
> condition "0 or more whitespace" to your regex.
>
> $pattern = '|^.+display:\w*none.+$|';
>
>
>
Sorry... my bad... its \s. I need some sleep.
$pattern = '|^.+display:\s*none.+$|';
Also, if you're certain you'll only ever have one space there, you can
just say that explicitly.
$pattern = '|^.+display: none.+$|';
But I prefer to leave things open for robustness.
--- End Message ---
--- Begin Message ---
Hi,
When running a PHP script from CLI, does APC optimize it before execution,
or does APC only provide the apc_*() functions when runing in CLI mode?
Happy day,
Matic
--- End Message ---
--- Begin Message ---
Matic Meznar wrote:
Hi,
When running a PHP script from CLI, does APC optimize it before execution,
or does APC only provide the apc_*() functions when runing in CLI mode?
If I recall correctly, none of the accelerators work in CLI mode.
Cheers,
Rob.
--
http://www.interjinn.com
Application and Templating Framework for PHP
--- End Message ---