|
Neohapsis is currently accepting applications for employment. For more information, please visit our website www.neohapsis.com or email hr@neohapsis.com |
php-general-digest-help
lists.php.net
Date: Tue Apr 15 2008 - 01:49:10 CDT
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
php-general Digest 15 Apr 2008 06:49:10 -0000 Issue 5405
Topics (messages 272985 through 272998):
Re: Need a simple one time search utility
272985 by: Daniel Brown
272987 by: Wolf
272988 by: Nathan Nobbe
272989 by: Daniel Brown
272990 by: Daniel Brown
272991 by: Nathan Nobbe
272992 by: Daniel Brown
272993 by: tedd
272994 by: tedd
Re: SERVER_PORT always at 80 ?
272986 by: mike
Re: Quarters
272995 by: tedd
272996 by: Andrew Ballard
What is the practical use of "abstract" and "interface"?
272997 by: Daevid Vincent
272998 by: Iñigo Medina García
Administrivia:
To subscribe to the digest, e-mail:
php-general-digest-subscribe
lists.php.net
To unsubscribe from the digest, e-mail:
php-general-digest-unsubscribe
lists.php.net
To post to the list, e-mail:
php-general
lists.php.net
----------------------------------------------------------------------
attached mail follows:
On Mon, Apr 14, 2008 at 2:48 PM, Philip Thompson <philthathril
gmail.com> wrote:
>
> <?php
> $stringSoMyStatsWillIncrease = "
> I know it's only a demo, but there is a small error. You have this string
> spit out:
>
> Sorry, for this demo, only the word `pilopig` is allowed as a search string.
>
> However, in the if() statement, you test for 'pilotpig'. Small misspelling.
> =D
> ";
> ?>
I disabled some of the code tracking until I can stop you fools
from flooding the stats! ;-P
Thanks for the heads-up on the typo, Phil. Is typing the name of
one of your own companies incorrectly as bad as misspelling the name
of your own child? God, I hope so....
--
</Daniel P. Brown>
Ask me about:
Dedicated servers starting
$59.99/mo., VPS starting
$19.99/mo.,
and shared hosting starting
$2.50/mo.
Unmanaged, managed, and fully-managed!
attached mail follows:
---- Daniel Brown <parasane
gmail.com> wrote:
> On Mon, Apr 14, 2008 at 2:48 PM, Philip Thompson <philthathril
gmail.com> wrote:
> >
> > <?php
> > $stringSoMyStatsWillIncrease = "
> > I know it's only a demo, but there is a small error. You have this string
> > spit out:
> >
> > Sorry, for this demo, only the word `pilopig` is allowed as a search string.
> >
> > However, in the if() statement, you test for 'pilotpig'. Small misspelling.
> > =D
> > ";
> > ?>
>
> I disabled some of the code tracking until I can stop you fools
> from flooding the stats! ;-P
>
> Thanks for the heads-up on the typo, Phil. Is typing the name of
> one of your own companies incorrectly as bad as misspelling the name
> of your own child? God, I hope so....
Dang Dan!
Between you and Tedd having basic coding/spelling issues, I sure hope it's because you were at the Van Halen Concert!! ;)
Tsk, tsk.
And to think, your search even came back with the right term, you must have it aliased or something... ;)
Wolf
attached mail follows:
On Mon, Apr 14, 2008 at 12:54 PM, Daniel Brown <parasane
gmail.com> wrote:
> On Mon, Apr 14, 2008 at 2:48 PM, Philip Thompson <philthathril
gmail.com>
> wrote:
> >
> > <?php
> > $stringSoMyStatsWillIncrease = "
> > I know it's only a demo, but there is a small error. You have this
> string
> > spit out:
> >
> > Sorry, for this demo, only the word `pilopig` is allowed as a search
> string.
> >
> > However, in the if() statement, you test for 'pilotpig'. Small
> misspelling.
> > =D
> > ";
> > ?>
>
> I disabled some of the code tracking until I can stop you fools
> from flooding the stats! ;-P
>
damn; not after i posted that nice fat class :O
Thanks for the heads-up on the typo, Phil. Is typing the name of
> one of your own companies incorrectly as bad as misspelling the name
> of your own child? God, I hope so....
let me ask my kids... whoops still single ;)
-nathan
attached mail follows:
On Mon, Apr 14, 2008 at 3:07 PM, Wolf <lonewolf
nc.rr.com> wrote:
>
> Dang Dan!
>
> Between you and Tedd having basic coding/spelling issues, I sure hope it's because you were at the Van Halen Concert!! ;)
>
> Tsk, tsk.
>
> And to think, your search even came back with the right term, you must have it aliased or something... ;)
What Philip mentioned was in response to a if()/die() block I put
into the online demo to force a stop on people checking for passwords,
et cetera, in case I missed anything in the code. It was typed up in
haste to provide a simple, workable solution for the OP.
As a result, it was typed in /too much/ haste.... and as a result,
made me look like a moron --- even moreso than normal! However, it
also led me to add in a case-insensitive search option.
--
</Daniel P. Brown>
Ask me about:
Dedicated servers starting
$59.99/mo., VPS starting
$19.99/mo.,
and shared hosting starting
$2.50/mo.
Unmanaged, managed, and fully-managed!
attached mail follows:
On Mon, Apr 14, 2008 at 3:07 PM, Nathan Nobbe <quickshiftin
gmail.com> wrote:
>
> > I disabled some of the code tracking until I can stop you fools
> > from flooding the stats! ;-P
> >
>
> damn; not after i posted that nice fat class :O
I just double-checked, and your code count was included. I put in
a temporary algorithm, and - in the spirit of Google - I'm not going
to disclose what it is, so as not to allow people to exploit it. So
there! -(8^B)
> > Thanks for the heads-up on the typo, Phil. Is typing the name of
> > one of your own companies incorrectly as bad as misspelling the name
> > of your own child? God, I hope so....
>
> let me ask my kids... whoops still single ;)
Keep it that way as long as possible. In going through the
calendar a few moments ago, I realized that I have two months and two
weeks left of my [relatively] happy life. After that, take note of
the tone of all of my emails. I'll bet dollars to doughnuts that
they're noticeably different.
Oh, and it'll also be interesting to see how I rank in the
PostTrack that following week, while I'm on my honeymoon. I probably
won't be any higher than fifth place. ;-P
--
</Daniel P. Brown>
Ask me about:
Dedicated servers starting
$59.99/mo., VPS starting
$19.99/mo.,
and shared hosting starting
$2.50/mo.
Unmanaged, managed, and fully-managed!
attached mail follows:
On Mon, Apr 14, 2008 at 1:11 PM, Daniel Brown <parasane
gmail.com> wrote:
> As a result, it was typed in /too much/ haste.... and as a result,
> made me look like a moron --- even moreso than normal! However, it
> also led me to add in a case-insensitive search option.
grep -rin
is my favorite :) and --color is the shit too! i wanted to add some more
options to mine, but i was trying to prove a point sort-of and get something
out the door as quickly as possible, based on OPs complaint (not being rude
here, just sayin' is all). i think it took me 20-30 minutes. mainly
because i was goofing up the regex syntax like a newb at first, then just
juggling around some array functions and turning it into a class.
im planning to spruce it up and add stdin support.
-nathan
attached mail follows:
On Mon, Apr 14, 2008 at 3:31 PM, Nathan Nobbe <quickshiftin
gmail.com> wrote:
>
> grep -rin
>
> is my favorite :) and --color is the shit too! i wanted to add some more
> options to mine, but i was trying to prove a point sort-of and get something
> out the door as quickly as possible, based on OPs complaint (not being rude
> here, just sayin' is all). i think it took me 20-30 minutes. mainly
> because i was goofing up the regex syntax like a newb at first, then just
> juggling around some array functions and turning it into a class.
>
> im planning to spruce it up and add stdin support.
foreach($argv as $k => $v) is your friend!
Then, all you have to do is remember to
str_pad('l',3,'-',STR_PAD_BOTH) and strstr(strtolower('I'),'.').
--
</Daniel P. Brown>
Ask me about:
Dedicated servers starting
$59.99/mo., VPS starting
$19.99/mo.,
and shared hosting starting
$2.50/mo.
Unmanaged, managed, and fully-managed!
attached mail follows:
At 3:16 PM -0400 4/14/08, Daniel Brown wrote:
>... while I'm on my honeymoon. I probably
>won't be any higher than fifth place. ;-P
On my honeymoon, I couldn't help but place first. ;-)
Cheers,
tedd
--
-------
http://sperling.com http://ancientstones.com http://earthstones.com
attached mail follows:
At 3:07 PM -0400 4/14/08, Wolf wrote:
>Between you and Tedd having basic coding/spelling issues, I sure
>hope it's because you were at the Van Halen Concert!! ;)
>
>Tsk, tsk.
Just you wait until the next time you post. Tsk, tsk indeed. ;-)
Cheers,
tedd
--
-------
http://sperling.com http://ancientstones.com http://earthstones.com
attached mail follows:
you should try Perl or another language. See if you can isolate it to Apache.
.
Or, you could try to track it down inside of the PHP source and see if
for some reason it is hardcoded or incorrectly set. (However, I still
think it's from Apache)
On 4/14/08, Julien Pauli <doctorrock83
gmail.com> wrote:
> Ok I did that, but it's the same.
> HTTP_HOST says myhost:81 , but SERVER_PORT still says 80....
>
> Cheers
> Julien.P
>
> 2008/4/14 mike <mike503
gmail.com>:
>
> > I would think PHP is just passing through what it receives from
> > Apache. I assume it's just passing through environment variables it
> > gets from the server.
> >
> > Can you disable all the other ports and only have :81 running to
> > ensure there is no confusion?
> >
> >
> >
> >
> > On 4/14/08, Julien Pauli <doctorrock83
gmail.com> wrote:
> > > Yes it runs on 5.3 on 81 and 5.2 on 80, both phpinfo() show port 80....
> > >
> > > Regards, Julien.P
> >
>
>
attached mail follows:
>Really? I was starting to think that the secret was the coins that
>kept magically reappearing. I gave up. (That was in IE, bearing
>through the JavaScript error alert boxes.)
>
>Andrew
Andrew:
Try it again:
http://webbytedd.com/quarters/
The js errors have been fixed.
Cheers,
tedd
--
-------
http://sperling.com http://ancientstones.com http://earthstones.com
attached mail follows:
On Mon, Apr 14, 2008 at 6:34 PM, tedd <tedd.sperling
gmail.com> wrote:
> > Really? I was starting to think that the secret was the coins that
> > kept magically reappearing. I gave up. (That was in IE, bearing
> > through the JavaScript error alert boxes.)
> >
> > Andrew
> >
>
> Andrew:
>
> Try it again:
>
> http://webbytedd.com/quarters/
>
> The js errors have been fixed.
>
> Cheers,
>
> tedd
Yeah, it seemed to be fixed the last time I tried it. Nice job.
Andrew
attached mail follows:
I've had at least three job interviews in the past two weeks, and each one has asked me this rather "text book academic" question regarding the difference between "abstract" vs. "interface". I've been coding for nearly 20 years, and at least 10 of those have been in PHP and another 3 in J++. I have NEVER used either of these concepts/keywords? Am I missing some exciting tool/feature?
All the reading I've done tonight just reinforces my thoughts that these are, for the most part useless. Unless you're building some HUGE project that has an API and there are teams of people that are going to extend your framework, then what good are they?
This DB wrapper is the closest to an answer I've come across.
http://www.developer.com/lang/php/article.php/3604111
But that still doesn't explain the difference between abstract and interface, it only illustrates the possible need for a 'template' so others know which methods they must implement. In my mind, it just seems like overhead, as if you were going to write another DB wrapper using this one, then wouldn't you just look at their code (example) and implement those same methods anyways? I mean, you'd have to look at the abstract/interface to find out the required methods, so why not skip that and just look at the actual class instead?
Here are two more pages that still don't seem to answer why there are both and when you'd use one over the other?
http://www.hiteshagrawal.com/php/oops-in-php5/oops-in-php5-tutorial-abstract-class
http://www.hiteshagrawal.com/php/oops-in-php5/oops-in-php5-using-interface
And then this completely absurd over the top use of them for a HelloWorld example, which seems to use them just for the sake of using them...
http://marc.info/?l=php-general&m=115950654928311&w=2
Lastly was this page:
http://www.phpro.org/tutorials/Object-Oriented-Programming-with-PHP.html
Which seems to only really provide a "hack" (printerFax) to circumvent the lack of multiple inheritance.
Can someone clear this up for me?
Daevid.
http://daevid.com
attached mail follows:
Daevid Vincent wrote:
> I've had at least three job interviews in the past two weeks, and each one has asked me this rather "text book academic" question regarding the difference between "abstract" vs. "interface". I've been coding for nearly 20 years, and at least 10 of those have been in PHP and another 3 in J++. I have NEVER used either of these concepts/keywords? Am I missing some exciting tool/feature?
>
> All the reading I've done tonight just reinforces my thoughts that these are, for the most part useless. Unless you're building some HUGE project that has an API and there are teams of people that are going to extend your framework, then what good are they?
>
> This DB wrapper is the closest to an answer I've come across.
>
> http://www.developer.com/lang/php/article.php/3604111
>
> But that still doesn't explain the difference between abstract and interface, it only illustrates the possible need for a 'template' so others know which methods they must implement. In my mind, it just seems like overhead, as if you were going to write another DB wrapper using this one, then wouldn't you just look at their code (example) and implement those same methods anyways? I mean, you'd have to look at the abstract/interface to find out the required methods, so why not skip that and just look at the actual class instead?
>
> Here are two more pages that still don't seem to answer why there are both and when you'd use one over the other?
>
> http://www.hiteshagrawal.com/php/oops-in-php5/oops-in-php5-tutorial-abstract-class
> http://www.hiteshagrawal.com/php/oops-in-php5/oops-in-php5-using-interface
>
> And then this completely absurd over the top use of them for a HelloWorld example, which seems to use them just for the sake of using them...
>
> http://marc.info/?l=php-general&m=115950654928311&w=2
>
> Lastly was this page:
>
> http://www.phpro.org/tutorials/Object-Oriented-Programming-with-PHP.html
>
> Which seems to only really provide a "hack" (printerFax) to circumvent the lack of multiple inheritance.
>
>
> Can someone clear this up for me?
Look at this url:
http://www.codeproject.com/KB/cs/abstractsvsinterfaces.aspx
Iñigo
> Daevid.
> http://daevid.com
>
>
--
--------
Iñigo Medina García
Librería Díaz de Santos Madrid (Spain)
imedina
diazdesantos.es facilmejor
gmail.com
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]