[PHP] Re: What the hell is Begacom?

2013-08-04 Thread Jonesy
On Sun, 4 Aug 2013 14:02:07 +0200, Camilo Sperberg wrote:

 Sent from my iPhone 6 Beta [Confidential use only]

You need not apologize. :-)


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



[PHP] Re: What wrong am I doing now?

2013-07-24 Thread Jim Giner

On 7/24/2013 8:19 AM, Karl-Arne Gjersøyen wrote:

mysql SELECT DATE_FORMAT(dato, '%e-%c-%Y') FROM transportdokument WHERE
dato = '2013-07-20' AND dato = '2013-07-24' GROUP BY dato DESC;
+---+
| DATE_FORMAT(dato, '%e-%c-%Y') |
+---+
| 24-7-2013 |
| 23-7-2013 |
+---+
2 rows in set (0.00 sec)

mysql


// My PHP code looks like this.
// -
$sql = SELECT DATE_FORMAT(dato, '%e-%c-%Y') FROM transportdokument WHERE
dato = '2013-07-20' AND dato = '2013-07-24' GROUP BY dato DESC;
$resultat = mysql_query($sql, $tilkobling) or die(mysql_error());

while($rad = mysql_fetch_array($resultat)){
$dato = $rad['dato'];
var_dump($dato);

I gott NULL,NULL here and believe it is something with my PHP Source that
is wrong when using DATE_FORMAT. As you see above it work in terminal.

I hope this not is off-topic for the list. If so, I am sorry for it and
hope you can give me advice about a good MySQL list for newbie's.

Thanks again for your help!

Karl


Add a check on the query result to be sure your query actually ran.
 $resultat = mysql_query($sql, $tilkobling) or die(mysql_error());

if (!$resultat)
{
   echo Query failed to run - .mysql_error();
   exit();
}
 while($rad = mysql_fetch_array($resultat)){

...


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



Re: [PHP] Re: What wrong am I doing now?

2013-07-24 Thread Matijn Woudt
On Wed, Jul 24, 2013 at 2:45 PM, Jim Giner jim.gi...@albanyhandball.comwrote:

 On 7/24/2013 8:19 AM, Karl-Arne Gjersøyen wrote:

 mysql SELECT DATE_FORMAT(dato, '%e-%c-%Y') FROM transportdokument WHERE
 dato = '2013-07-20' AND dato = '2013-07-24' GROUP BY dato DESC;
 +-**--+
 | DATE_FORMAT(dato, '%e-%c-%Y') |
 +-**--+
 | 24-7-2013 |
 | 23-7-2013 |
 +-**--+
 2 rows in set (0.00 sec)

 mysql


 // My PHP code looks like this.
 // --**---
 $sql = SELECT DATE_FORMAT(dato, '%e-%c-%Y') FROM transportdokument WHERE
 dato = '2013-07-20' AND dato = '2013-07-24' GROUP BY dato DESC;
 $resultat = mysql_query($sql, $tilkobling) or die(mysql_error());

 while($rad = mysql_fetch_array($resultat)){
 $dato = $rad['dato'];
 var_dump($dato);

 I gott NULL,NULL here and believe it is something with my PHP Source that
 is wrong when using DATE_FORMAT. As you see above it work in terminal.

 I hope this not is off-topic for the list. If so, I am sorry for it and
 hope you can give me advice about a good MySQL list for newbie's.

 Thanks again for your help!

 Karl

  Add a check on the query result to be sure your query actually ran.

  $resultat = mysql_query($sql, $tilkobling) or die(mysql_error());
 
 if (!$resultat)
 {
echo Query failed to run - .mysql_error();
exit();
 }
  while($rad = mysql_fetch_array($resultat)){
 
 ...


Jim,

He already has that...

- Matijn


Re: [PHP] Re: What wrong am I doing now?

2013-07-24 Thread Jim Giner



Jim,

He already has that...

- Matijn


oops

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



[PHP] Re: What do you call the end-user?

2012-07-24 Thread Shawn McKenzie
On 07/19/2012 12:26 PM, Tedd Sperling wrote:
 Hi gang:
 
 I can't wait for tomorrow -- so here's my off-topic post today.
 
 First question:
 
 What do you call the people who ultimately use your code?

Many times I would call them dumb asses.  Especially many of the users
of free software.  Even with clear detailed user guides and the fact
that it is free, they are indignant about a missing feature or having to
look in the docs for anything.

-- 
Thanks!
-Shawn
http://www.spidean.com

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



Re: [PHP] Re: What do you call the end-user?

2012-07-24 Thread Paul M Foster
On Tue, Jul 24, 2012 at 10:12:34AM -0500, Shawn McKenzie wrote:

 On 07/19/2012 12:26 PM, Tedd Sperling wrote:
  Hi gang:
  
  I can't wait for tomorrow -- so here's my off-topic post today.
  
  First question:
  
  What do you call the people who ultimately use your code?
 
 Many times I would call them dumb asses.  Especially many of the users
 of free software.  Even with clear detailed user guides and the fact
 that it is free, they are indignant about a missing feature or having to
 look in the docs for anything.

Very true. Also, apparently in some quarters, free == worthless. But
in the case of FOSS, nothing could be further from the truth.

Paul

-- 
Paul M. Foster
http://noferblatz.com
http://quillandmouse.com

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



Re: [PHP] Re: What would you like to see in most in a text editor?

2011-09-16 Thread tamouse mailing lists
On Wed, Sep 14, 2011 at 5:07 PM, Jonesy gm...@jonz.net wrote:
 On Wed, 14 Sep 2011 14:08:09 +0100, Richard Quadling wrote:
 On 14 September 2011 13:18, Tim Streater t...@clothears.org.uk wrote:
 On 14 Sep 2011 at 12:40, Richard Quadling rquadl...@gmail.com wrote:
 On 14 September 2011 01:23, tamouse wrote:
 On Tue, Sep 13, 2011 at 3:35 PM, Robert Cummings wrote:
 I'm a big fan of editors that work in the terminal.

 You'll get my emacs when you pry it out of my cold dead hands.

 Pah! You and your full screen editor.

 EDLIN is the way to go.

 Is that more or less terse than TECO?


 TECO - OUCH.

 heh.  I built my first website with WordStar 6.0 under OS/2.

 Jonesy -- yup, I've used TECO, too -- on an ASR-35 TTY

I declare a winner.

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



[PHP] Re: What would you like to see in most in a text editor?

2011-09-14 Thread Jonesy
On Wed, 14 Sep 2011 14:08:09 +0100, Richard Quadling wrote:
 On 14 September 2011 13:18, Tim Streater t...@clothears.org.uk wrote:
 On 14 Sep 2011 at 12:40, Richard Quadling rquadl...@gmail.com wrote:
 On 14 September 2011 01:23, tamouse wrote:
 On Tue, Sep 13, 2011 at 3:35 PM, Robert Cummings wrote:
 I'm a big fan of editors that work in the terminal.

 You'll get my emacs when you pry it out of my cold dead hands.

 Pah! You and your full screen editor.

 EDLIN is the way to go.

 Is that more or less terse than TECO?


 TECO - OUCH.

heh.  I built my first website with WordStar 6.0 under OS/2.

Jonesy -- yup, I've used TECO, too -- on an ASR-35 TTY
-- 
  Marvin L Jones| jonz  | W3DHJ  | linux
   38.24N  104.55W  |  @ config.com | Jonesy |  OS/2
* Killfiling google  banter.com: jonz.net/ng.htm


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



[PHP] Re: What do you get for ...

2011-06-07 Thread Geoff Lane
On Tuesday, June 7, 2011, Richard Quadling wrote:

 What do you get for ...

 php -r var_dump(realpath(null));

PHP 5.3.5-1ubuntu7.2 on Ubuntu 11.04 kernel 2.6.18 returns the same
value as __DIR__

However, PHP 5.1.6 on CentOS 5.6 kernel 2.6.18 returns bool(false).
Doing php -r var_dump(__DIR__); on this machine shows that __DIR__
is undefined. Executing both commands in an intranet-visible, php
script shows the same thing.

HTH,

-- 
Geoff


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



Re: [PHP] Re: What do you get for ...

2011-06-07 Thread Richard Quadling
On 7 June 2011 13:04, Geoff Lane ge...@gjctech.co.uk wrote:
 On Tuesday, June 7, 2011, Richard Quadling wrote:

 What do you get for ...

 php -r var_dump(realpath(null));

 PHP 5.3.5-1ubuntu7.2 on Ubuntu 11.04 kernel 2.6.18 returns the same
 value as __DIR__

 However, PHP 5.1.6 on CentOS 5.6 kernel 2.6.18 returns bool(false).

__DIR__ was introduced in PHP5.3.0.

When I mentioned it, I meant the value would be the directory of the
script path.

dirname(__FILE__) or __DIR__. Same difference.


But the surprising issue is that your 5.1.6 returns bool(false). So
far, that's the only report I've got that shows inconsistent behaviour
for PHP5+

-- 
Richard Quadling
Twitter : EE : Zend : PHPDoc
@RQuadling : e-e.com/M_248814.html : bit.ly/9O8vFY : bit.ly/lFnVea

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



[PHP] Re: What do you get for ...

2011-06-07 Thread Geoff Lane
On Tuesday, June 7, 2011, Richard Quadling wrote:

 But the surprising issue is that your 5.1.6 returns bool(false). So
 far, that's the only report I've got that shows inconsistent
 behaviour for PHP5+

I too was surprised, which is why I took the time to report. AFAICT,
I've got the standard LAMP stack for CentOS 5.6 from the time I
developed the first application on it. The output from
print_r($_SERVER) contains the expected script-related paths and I
don't get issues running PHP scripts on this server either via Apache
or via cron (as shell scripts).

If specific output from this server would help, I may be able to give
this to you off-list.

HTH,

-- 
Geoff


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



RE: [PHP] Re: what is php4 popularity?

2009-12-14 Thread Angelo Zanetti


-Original Message-
From: Eric Bauman [mailto:baum...@livejournal.dk] 
Sent: 08 October 2009 02:39 PM
To: php-general@lists.php.net; Paul M.
Subject: [PHP] Re: what is php4 popularity?

On 8/10/2009 4:28 PM, Paul M. wrote:
 Hey guys, does anyone have a good link for an article where php4
 popularity trends are examined? The best way for me to know php4 % and
 php5 %. I appreciate any good suggestions.

Here's a pretty graph comparing PHP version usage and time: 
http://www.nexen.net/images/stories/phpversion/200810/evolution.milieu.png

Source (French): http://www.nexen.net/chiffres_cles/phpversion/

Thanks for the graph Eric, I know a lot of servers don't support PHP4. but
it of course depends on the hosting company.

Angelo

http://www.elemental.co.za
http://www.wapit.co.za



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



[PHP] Re: What method is best for generating thumbnails in PHP from PDF's?

2009-11-12 Thread O. Lavell
Chris Payne wrote:

 Hi Everyone,
 
 I have been asked to create thumbnails from the first page of a PDF
 document on the fly with PHP, I have looked online but am confused as
 there doesn't seem 1 simple solution.
 
 What would you all recommend as an easy way to do this?
 
 Any help would be really appreciated.

I think I would just call an external program to do it, like convert 
from Image Magick:

exec(convert -thumbnail 300x300 document001.pdf[0] thumbnail001.png);


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



Re: [PHP] Re: What method is best for generating thumbnails in PHP from PDF's?

2009-11-12 Thread Joseph Masoud

 On 12/11/09 17:44, O. Lavell wrote:

Chris Payne wrote:


Hi Everyone,

I have been asked to create thumbnails from the first page of a PDF
document on the fly with PHP, I have looked online but am confused as
there doesn't seem 1 simple solution.

What would you all recommend as an easy way to do this?

Any help would be really appreciated.

I think I would just call an external program to do it, like convert
from Image Magick:

exec(convert -thumbnail 300x300 document001.pdf[0] thumbnail001.png);


If you're going to use ImageMagick, make sure you have the latest 
ghostscript library, otherwise not all thumbnails will render properly.


I don't recommend CentOS for this task.  If this is your server OS, I 
recommend considering this rpm:


http://www.clearfield.com/ghostscript.8.64/ghostscript.html

Good luck.

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



[PHP] Re: What PHP version are you using?

2009-11-04 Thread Nathan Rixham

Israel Ekpo wrote:

Hi Guys,

I just want to conduct a quick survey to find out what version of PHP people
are using in their production environments.

I have a PHP extension for Solr that I have set the minimum required version
as 5.2.11.

http://pecl.php.net/package/solr/

However, most of the PHP users that want to use it are unable to do so
because the PHP version in the PROD environments is below 5.2.11

They are also nervous about upgrading to newer versions as it will require
some regression testing.

In my production environment I am using 5.3.0 and most of the people that I
have contacted seems to be running 5.2.10

When I released the extension, I did all my regression tests against PHP
5.2.11 and now I am considering doing regression tests against 5.2.4
(released 30 August 2007)  and newer versions so that I can set the minimum
required version to 5.2.4 in order to accommodate more people.

I cannot go below 5.2.0 though but I am thinking about starting at 5.2.4 and
newer.

I would really appreciate some feedback as it will be useful in helping me
determine which PHP version numbers to do my regression tests against.

Thanks.



PHP 5.2.4-2 on most production boxes
mixed 5.1.6, 5.2 and 5.3's in dev environments

+ interesting release; wish I'd known spent part of the first week in 
october doing a SOLR integration in PHP *sigh* - on to virtuoso now


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



Re: [PHP] Re: What PHP version are you using?

2009-11-04 Thread Ashley Sheridan
On Wed, 2009-11-04 at 14:37 +, Nathan Rixham wrote:

 Israel Ekpo wrote:
  Hi Guys,
  
  I just want to conduct a quick survey to find out what version of PHP people
  are using in their production environments.
  
  I have a PHP extension for Solr that I have set the minimum required version
  as 5.2.11.
  
  http://pecl.php.net/package/solr/
  
  However, most of the PHP users that want to use it are unable to do so
  because the PHP version in the PROD environments is below 5.2.11
  
  They are also nervous about upgrading to newer versions as it will require
  some regression testing.
  
  In my production environment I am using 5.3.0 and most of the people that I
  have contacted seems to be running 5.2.10
  
  When I released the extension, I did all my regression tests against PHP
  5.2.11 and now I am considering doing regression tests against 5.2.4
  (released 30 August 2007)  and newer versions so that I can set the minimum
  required version to 5.2.4 in order to accommodate more people.
  
  I cannot go below 5.2.0 though but I am thinking about starting at 5.2.4 and
  newer.
  
  I would really appreciate some feedback as it will be useful in helping me
  determine which PHP version numbers to do my regression tests against.
  
  Thanks.
  
 
 PHP 5.2.4-2 on most production boxes
 mixed 5.1.6, 5.2 and 5.3's in dev environments
 
 + interesting release; wish I'd known spent part of the first week in 
 october doing a SOLR integration in PHP *sigh* - on to virtuoso now
 
 


5.2.9 on my home laptop and main box (used for devel)
4.4.7 on my own site (stupid hosting company are useless!)
and a mix of 5.x's on the sites I develop

Thanks,
Ash
http://www.ashleysheridan.co.uk




RE: [PHP] Re: What PHP version are you using?

2009-11-03 Thread Bob McConnell
From: Lester Caine
 Israel Ekpo wrote:
 On Mon, Nov 2, 2009 at 2:15 PM, John Black
s...@network-technologies.orgwrote:
 
 Bob McConnell wrote:

 I just checked the Red Hat 5.4 manifest and it shows
php-5.1.6-23.el5 -
 php-5.1.6-23.2.el5_3. CentOS simply repackages the Red Hat kit
without
 the proprietary bits. I don't understand why they are so far behind
on a
 build that was just released last month, but our hosting service
only
 provides what's in the official release.

 I just check the CentOS repo and the repo lists
 php-5.1.6-23.2.el5_3.x86_64.rpm as latest.
 So CentOS is as upto date as RedHat, the way it should be.
 
 That is not good.
 5.1.6 was released in August 2006.
 More than 3 years ago. There are a lot of bug fixes since then
 http://www.php.net/ChangeLog-5.php
 It looks like the php libraries are not maintained in CentOS and Red
Hat
 Repositories.
 
 There are very good reasons why a 'long time supported' build does not

 keep replacing packages all the time. It is gauranteed NOT to change 
 them, so compatibility problems introduced by PHP such as the 'date' 
 problem will not come up and bit ANY of their customers.
 
 I believe that there is a new version due on a couple of 'long time 
 supported' distributions, but the current 'instability' with PHP5.3 
 potentially requiring changes to deployed applications is the sort of 
 thing that these builds are supposed to avoid. I'll be staying with 
 5.2.x for a while simply because I know that is stable with my current

 code base.
 
 So it IS good that a stable and understood build of PHP is used as no 
 one would gaurantee that later builds will not introduce problems - 
 especially following a change of minor versions.

I agree that stability is good, but at some point reality must enter the
picture. Continuing to distribute an obsolete package that is no longer
supported nor maintained is not good for anyone, least of all the users
of those systems. First, the distribution must also include the obsolete
documentation to match the versions it includes, since that is no longer
available elsewhere and is difficult to identify when it does. In
addition, newer features are assumed by many of the other tools,
frameworks and applications that are used on or with those systems, none
of which are likely to work with these old versions.

In our case we require our hosting service to install 5.2.10, which
costs us extra in both time and money. But several of the other third
party components used with our applications assume the availability of
features in that release. They simply won't work with older versions.
That minimum is reviewed every time we consider adding new capabilities
to our systems, which generally happens every other month. We already
have developers looking forward to 5.3 and drooling over the
possibilities. I'm just happy that we will finally rid ourselves of some
of the magic features.

Bob McConnell

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



Re: [PHP] Re: What PHP version are you using?

2009-11-02 Thread Israel Ekpo
On Mon, Nov 2, 2009 at 2:15 PM, John Black s...@network-technologies.orgwrote:

 Bob McConnell wrote:

 I just checked the Red Hat 5.4 manifest and it shows php-5.1.6-23.el5 -
 php-5.1.6-23.2.el5_3. CentOS simply repackages the Red Hat kit without
 the proprietary bits. I don't understand why they are so far behind on a
 build that was just released last month, but our hosting service only
 provides what's in the official release.


 I just check the CentOS repo and the repo lists
 php-5.1.6-23.2.el5_3.x86_64.rpm as latest.
 So CentOS is as upto date as RedHat, the way it should be.

 --
 John
 Define: Ubuntard = The drivel this guy spews is inane and forgettable
 stuff, characterized by comments that treat Ubuntu as if it is the only
 distribution in existence.


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



That is not good.

5.1.6 was released in August 2006.

More than 3 years ago. There are a lot of bug fixes since then

http://www.php.net/ChangeLog-5.php

It looks like the php libraries are not maintained in CentOS and Red Hat
Repositories.
-- 
Good Enough is not good enough.
To give anything less than your best is to sacrifice the gift.
Quality First. Measure Twice. Cut Once.


Re: [PHP] Re: What PHP version are you using?

2009-11-02 Thread John Black

Israel Ekpo wrote:

That is not good.
5.1.6 was released in August 2006.
More than 3 years ago. There are a lot of bug fixes since then
http://www.php.net/ChangeLog-5.php
It looks like the php libraries are not maintained in CentOS and Red Hat
Repositories.


I posted the current RHEL version because, personally, I would look at 
the latest release of one of the biggest Enterprise class Linux vendors 
before deciding on a PHP version.


The larger distros only tend to upgrade packages when required because 
other packages need them or when a security issues has been discovered.

Other times they will patch in security fixes applied to packages.
The tradeoff here is that you get something older but the system you 
receive is solid.


I run ARCH Linux on my home system because I like to test the latest 
releases BUT I want stable software on my servers.


--
John
They hurt you at home and they hit you at school,
They hate you if you're clever and they despise a fool,
Till you're so fucking crazy you can't follow their rules...
[John Lennon]

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



Re: [PHP] Re: What PHP version are you using?

2009-11-02 Thread Lester Caine

Israel Ekpo wrote:

On Mon, Nov 2, 2009 at 2:15 PM, John Black s...@network-technologies.orgwrote:


Bob McConnell wrote:


I just checked the Red Hat 5.4 manifest and it shows php-5.1.6-23.el5 -
php-5.1.6-23.2.el5_3. CentOS simply repackages the Red Hat kit without
the proprietary bits. I don't understand why they are so far behind on a
build that was just released last month, but our hosting service only
provides what's in the official release.


I just check the CentOS repo and the repo lists
php-5.1.6-23.2.el5_3.x86_64.rpm as latest.
So CentOS is as upto date as RedHat, the way it should be.


That is not good.
5.1.6 was released in August 2006.
More than 3 years ago. There are a lot of bug fixes since then
http://www.php.net/ChangeLog-5.php
It looks like the php libraries are not maintained in CentOS and Red Hat
Repositories.


There are very good reasons why a 'long time supported' build does not 
keep replacing packages all the time. It is gauranteed NOT to change 
them, so compatibility problems introduced by PHP such as the 'date' 
problem will not come up and bit ANY of their customers.


I believe that there is a new version due on a couple of 'long time 
supported' distributions, but the current 'instability' with PHP5.3 
potentially requiring changes to deployed applications is the sort of 
thing that these builds are supposed to avoid. I'll be staying with 
5.2.x for a while simply because I know that is stable with my current 
code base.


So it IS good that a stable and understood build of PHP is used as no 
one would gaurantee that later builds will not introduce problems - 
especially following a change of minor versions.


--
Lester Caine - G8HFL
-
Contact - http://lsces.co.uk/wiki/?page=contact
L.S.Caine Electronic Services - http://lsces.co.uk
EnquirySolve - http://enquirysolve.com/
Model Engineers Digital Workshop - http://medw.co.uk//
Firebird - http://www.firebirdsql.org/index.php

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



[PHP] Re: What PHP version are you using?

2009-10-29 Thread Shawn McKenzie
Israel Ekpo wrote:
 Hi Guys,
 
 I just want to conduct a quick survey to find out what version of PHP people
 are using in their production environments.
 
 I have a PHP extension for Solr that I have set the minimum required version
 as 5.2.11.
 
 http://pecl.php.net/package/solr/
 
 However, most of the PHP users that want to use it are unable to do so
 because the PHP version in the PROD environments is below 5.2.11
 
 They are also nervous about upgrading to newer versions as it will require
 some regression testing.
 
 In my production environment I am using 5.3.0 and most of the people that I
 have contacted seems to be running 5.2.10
 
 When I released the extension, I did all my regression tests against PHP
 5.2.11 and now I am considering doing regression tests against 5.2.4
 (released 30 August 2007)  and newer versions so that I can set the minimum
 required version to 5.2.4 in order to accommodate more people.
 
 I cannot go below 5.2.0 though but I am thinking about starting at 5.2.4 and
 newer.
 
 I would really appreciate some feedback as it will be useful in helping me
 determine which PHP version numbers to do my regression tests against.
 
 Thanks.
 
Home/Dev: 5.2.15
Web: 5.1.6 (probably should update)

-- 
Thanks!
-Shawn
http://www.spidean.com

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



[PHP] Re: What PHP version are you using?

2009-10-29 Thread Shawn McKenzie
Shawn McKenzie wrote:

 Home/Dev: 5.2.15
 Web: 5.1.6 (probably should update)
 

O.K. so 5.2.15 doesn't exist :-(  That is the Zend debugger version I
have.  I actually have Home/Dev: 5.2.4.

-- 
Thanks!
-Shawn
http://www.spidean.com

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



[PHP] Re: What would stop header(Location...) from working?

2009-10-28 Thread Mark Cilissen

tedd schreef:

Hi gang:

I just had a script stop following this statement:

   header(Location:users.php);

It *was* working, but now instead of running users.php, it defaults to 
the parent script.


When I place exit() after it, such as:

   header(Location:users.php);
   exit();

The script simply exits. It does not continue to users.php -- BUT -- it 
did.


What would stop this statement from working?

Thanks,

tedd



If ANYTHING is output before header(), it stops working. Did you turn 
off error reporting? You might want to double-check, because it returns 
an error if anything is output.


--
Kind regards,
Mark Cilissen / Pixlism

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



[PHP] Re: what is php4 popularity?

2009-10-08 Thread Eric Bauman

On 8/10/2009 4:28 PM, Paul M. wrote:

Hey guys, does anyone have a good link for an article where php4
popularity trends are examined? The best way for me to know php4 % and
php5 %. I appreciate any good suggestions.


Here's a pretty graph comparing PHP version usage and time: 
http://www.nexen.net/images/stories/phpversion/200810/evolution.milieu.png


Source (French): http://www.nexen.net/chiffres_cles/phpversion/

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



[PHP] Re: what is php4 popularity?

2009-10-08 Thread Paul M.

Eric Bauman wrote:

On 8/10/2009 4:28 PM, Paul M. wrote:

Hey guys, does anyone have a good link for an article where php4
popularity trends are examined? The best way for me to know php4 % and
php5 %. I appreciate any good suggestions.


Here's a pretty graph comparing PHP version usage and time: 
http://www.nexen.net/images/stories/phpversion/200810/evolution.milieu.png


Source (French): http://www.nexen.net/chiffres_cles/phpversion/


This research is done on October 2008. Does anyone has newer research?
And thanks Eric!

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



Re: [PHP] Re: What makes _SERVER stop working (RESOLVED)

2009-08-04 Thread Miller, Terion



On 8/3/09 7:44 PM, Shawn McKenzie nos...@mckenzies.net wrote:

Miller, Terion wrote:
 All of a sudden this stopped working and keeps defaulting to A again

  if ($_SERVER['SCRIPT_FILENAME'] = browse.php ) {

 $default = A;

  }


 else {

 $default = ;

   }


It stopped working or never worked because your if statement is wrong ==


--
Thanks!
-Shawn
http://www.spidean.com

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


Right, I need to mark this one resolved I finally got it to work with this:

// Main controller which page to show. if (isset($_GET['letter'])) {   
browse($_GET['letter']); } elseif (basename($_SERVER['SCRIPT_FILENAME']) == 
browse.php ) {   browse('A'); } else {index();}

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



[PHP] Re: What makes _SERVER stop working

2009-08-03 Thread Ollisso
On Mon, 03 Aug 2009 20:26:35 +0300, Miller, Terion  
tmil...@springfi.gannett.com wrote:



All of a sudden this stopped working and keeps defaulting to A again

 if ($_SERVER['SCRIPT_FILENAME'] = browse.php ) {

$default = A;
}

else {
$default = ;
 }


it should be:
 if ($_SERVER['SCRIPT_FILENAME'] == browse.php ) {
...

--
Using Opera's revolutionary e-mail client: http://www.opera.com/mail/

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



[PHP] Re: What makes _SERVER stop working

2009-08-03 Thread Ben Dunlap
Miller, Terion wrote:
  if ($_SERVER['SCRIPT_FILENAME'] = browse.php ) {

You're using the assignment operator above ('=') instead of the comparison
('=='). If that's not simply a typo that entered the code when you composed
your email, then that's the source of your problem.

You might consider putting the literal side of your comparisons on the left of
the operator. Using the example above you could write:

if (browse.php == $_SERVER['SCRIPT_FILENAME']) {

This way if you accidentally use the assignment operator, PHP will give you a
parse error before it even tries to execute the script.

Ben

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



Re: [PHP] Re: What makes _SERVER stop working

2009-08-03 Thread Miller, Terion



On 8/3/09 1:40 PM, Ollisso olli...@fromru.com wrote:

On Mon, 03 Aug 2009 20:26:35 +0300, Miller, Terion
tmil...@springfi.gannett.com wrote:

 All of a sudden this stopped working and keeps defaulting to A again

  if ($_SERVER['SCRIPT_FILENAME'] = browse.php ) {

 $default = A;
 }

 else {
 $default = ;
  }

it should be:
  if ($_SERVER['SCRIPT_FILENAME'] == browse.php ) {
...

--
Using Opera's revolutionary e-mail client: http://www.opera.com/mail/

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



Thanks but it still doesn't work, it defaults to 'A' and I want it to default 
to show 'A only on browse.php all other pages should show NO default 
selections.
'

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



Re: [PHP] Re: What makes _SERVER stop working

2009-08-03 Thread Ollisso
On Mon, 03 Aug 2009 21:48:08 +0300, Miller, Terion  
tmil...@springfi.gannett.com wrote:






Thanks but it still doesn't work, it defaults to 'A' and I want it to  
default to show 'A only on browse.php all other pages should show NO  
default selections.

'


Create file with this content:
?php phpinfo()?

and run it with browser.

and then check - do you have what you need there ?



--

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



Re: [PHP] Re: What makes _SERVER stop working

2009-08-03 Thread Miller, Terion



On 8/3/09 2:22 PM, Ollisso olli...@fromru.com wrote:

On Mon, 03 Aug 2009 21:48:08 +0300, Miller, Terion
tmil...@springfi.gannett.com wrote:




 Thanks but it still doesn't work, it defaults to 'A' and I want it to
 default to show 'A only on browse.php all other pages should show NO
 default selections.
 '

Create file with this content:
?php phpinfo()?

and run it with browser.

and then check - do you have what you need there ?



--
It's there, could it be I have it in the wrong place in the script?
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




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



[PHP] Re: What is this called?

2009-07-06 Thread Shawn McKenzie
Miller, Terion wrote:
 Ok, say you have a database with 16000 records in it, but you only want to
 call out say 2000 records at a time as the search/query is performed, then
 store the first 2000 in a session and then retrieve the next 2000 etc etc as
 a way to minimize server strain?
 
 (I'm tasked to do this and )
 1. don't know what this is called to google it...partioning results/data ???
 
 2. Is there a better way to deal with retrieval of large amounts of data
 from a large table without choking the server.
 
 3. Is it possible at all
 
 Basically I need to know what it is I'm looking to do, it's not getting
 explained in an understandable way herewhich makes google useless
 
 I love my job, I love my jobI love...my job...monday Monday monday
 
 

It's called a bad idea.  Instead of doing one query to get your data,
you're going to do eight?

-- 
Thanks!
-Shawn
http://www.spidean.com

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



[PHP] Re: What was the unix timestamp of last week, Monday 12:00 am?

2009-04-14 Thread Shawn McKenzie
René Fournier wrote:
 I'm trying to write a [simple] function, such that:
 
 function earlier_unix_timestamp () {   
 $now = mktime();
 [...]
 return $then;  // e.g., 1238983107
 }
 
 Anyone have something already made? There seem to be many ways to skin
 this cat, with date() arithmetic, etc., but the exceptions (Jan 1, first
 day of the month, etc.) are driving me crazy.
 
 ...Rene

1239598800

-- 
Thanks!
-Shawn
http://www.spidean.com

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



[PHP] Re: =.='' what wrong ? just simple code, however error.

2009-01-03 Thread Martin Zvarík

It works as expected on my PHP 5.2.4


LKSunny napsal(a):

?
$credithold = 100;
for($i=1;$i=1000;$i++){
 $credithold -= 0.1;
 echo $creditholdbr /;
}
//i don't know why, when run this code, on 91.3  after expect is 91.2, 
however..91.2001

//who can help me ? and tell me why ?

//Thank You.
?




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



Re: [PHP] Re: What font/size do you use for programming?

2008-07-17 Thread Yi Wang
On Sat, Jul 12, 2008 at 12:40 AM, Eric Butera [EMAIL PROTECTED] wrote:
 On Thu, Jul 10, 2008 at 5:29 PM, Philip Thompson [EMAIL PROTECTED] wrote:
 On Jul 10, 2008, at 3:35 PM, Omar Noppe wrote:

 Is there any reason to pick a black background en white fonts in your
 editor (for example writability)?

 I think a black background is much easier on the eyes

 I use a big font on a black background because it doesn't strain my
 eyes as much.  I started out with Monaco 9pt (or bitstream vera sans
 mono 9pt on linux) on white.  Slowly though I kept getting more
 frequent headaches.  Now I use black with big fonts and I'm fine.  I
 have really good vision and all that, but just hours of coding will
 get to me.

 As a side bonus, using a bigger font also helps me adhere to wrapping
 at the 80 character margin too.

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



Consolas 14pt editplus on server 2008

-- 
Regards,
Wang Yi

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



Re: [PHP] Re: What font/size do you use for programming?

2008-07-11 Thread Eric Butera
On Thu, Jul 10, 2008 at 5:29 PM, Philip Thompson [EMAIL PROTECTED] wrote:
 On Jul 10, 2008, at 3:35 PM, Omar Noppe wrote:

 Is there any reason to pick a black background en white fonts in your
 editor (for example writability)?

 I think a black background is much easier on the eyes

I use a big font on a black background because it doesn't strain my
eyes as much.  I started out with Monaco 9pt (or bitstream vera sans
mono 9pt on linux) on white.  Slowly though I kept getting more
frequent headaches.  Now I use black with big fonts and I'm fine.  I
have really good vision and all that, but just hours of coding will
get to me.

As a side bonus, using a bigger font also helps me adhere to wrapping
at the 80 character margin too.

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



[PHP] Re: What font/size do you use for programming?

2008-07-10 Thread Peter Ford

tedd wrote:

Hi gang:

I'm running a Mac (so I know mine is a bit different size wise) but I'm 
currently using Veranda at 14 point for coding.


Just out of curiosity, what font and size do you ppls use for your 
programming?


Cheers,

tedd



I'd love to be coding on the Veranda, but it's raining horizontally at the 
moment and my keyboard hates being wet.


I'm using Lucida Sans for code these days - I finally figured that it didn't 
really have to be a fixed-width font, since I couldn't find one that wasn't ugly.


--
Peter Ford  phone: 01580 89
Developer   fax:   01580 893399
Justcroft International Ltd., Staplehurst, Kent

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



[PHP] Re: What font/size do you use for programming?

2008-07-10 Thread Colin Guthrie

tedd wrote:
Just out of curiosity, what font and size do you ppls use for your 
programming?


I've got a lot of projects so I always use a really small font to save 
on disk space



Col


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



Re: [PHP] Re: What font/size do you use for programming?

2008-07-10 Thread Eric Butera
Here's how I roll. :)  Consolas is the font.

http://refraxion.com/pdt-eclipse.png

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



Re: [PHP] Re: What font/size do you use for programming?

2008-07-10 Thread Daniel Brown
On Thu, Jul 10, 2008 at 9:46 AM, Eric Butera [EMAIL PROTECTED] wrote:
 Here's how I roll. :)  Consolas is the font.

 http://refraxion.com/pdt-eclipse.png

Reminds me of Comic Sans Bold.  ;-P

-- 
/Daniel P. Brown
Dedicated Servers - Intel 2.4GHz w/2TB bandwidth/mo. starting at just
$59.99/mo. with no contract!
Dedicated servers, VPS, and hosting from $2.50/mo.

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



Re: [PHP] Re: What font/size do you use for programming?

2008-07-10 Thread Daniel Brown
On Thu, Jul 10, 2008 at 5:07 AM, Peter Ford [EMAIL PROTECTED] wrote:

 I'm running a Mac (so I know mine is a bit different size wise) but I'm
 currently using Veranda at 14 point for coding.

 I'd love to be coding on the Veranda, but it's raining horizontally at the
 moment and my keyboard hates being wet.

Ha!  Nice catch with the spelling, Pete.  That actually almost
made me spit coffee on my many thousands of monitors (they're
multiplying like rabbits now).

-- 
/Daniel P. Brown
Dedicated Servers - Intel 2.4GHz w/2TB bandwidth/mo. starting at just
$59.99/mo. with no contract!
Dedicated servers, VPS, and hosting from $2.50/mo.

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



Re: [PHP] Re: What font/size do you use for programming?

2008-07-10 Thread Daniel Brown
On Thu, Jul 10, 2008 at 6:12 AM, Colin Guthrie [EMAIL PROTECTED] wrote:
 tedd wrote:

 Just out of curiosity, what font and size do you ppls use for your
 programming?

 I've got a lot of projects so I always use a really small font to save on
 disk space

That doesn't work, dummy!  You still have to save only half of
your files.  ;-P

-- 
/Daniel P. Brown
Dedicated Servers - Intel 2.4GHz w/2TB bandwidth/mo. starting at just
$59.99/mo. with no contract!
Dedicated servers, VPS, and hosting from $2.50/mo.

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



Re: [PHP] Re: What font/size do you use for programming?

2008-07-10 Thread Philip Thompson

On Jul 10, 2008, at 4:07 AM, Peter Ford wrote:


tedd wrote:

Hi gang:
I'm running a Mac (so I know mine is a bit different size wise) but  
I'm currently using Veranda at 14 point for coding.
Just out of curiosity, what font and size do you ppls use for your  
programming?

Cheers,
tedd


I'd love to be coding on the Veranda, but it's raining horizontally  
at the moment and my keyboard hates being wet.


I'm using Lucida Sans for code these days - I finally figured that  
it didn't really have to be a fixed-width font, since I couldn't  
find one that wasn't ugly.


Are you sure you're a *coder*? =D I've looked at some code in a non  
fixed-width font before and it hurt my eyes! I bet you use tabs  
instead of spaces too. ;)


~Phil


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



[PHP] Re: What font/size do you use for programming?

2008-07-10 Thread Colin Guthrie

Daniel Brown wrote:

On Thu, Jul 10, 2008 at 6:12 AM, Colin Guthrie [EMAIL PROTECTED] wrote:

tedd wrote:

Just out of curiosity, what font and size do you ppls use for your
programming?

I've got a lot of projects so I always use a really small font to save on
disk space


That doesn't work, dummy!  You still have to save only half of
your files.  ;-P


Yeah you're right... well most of my lines are short so I'll try only 
saving the left hand side of each file and see if that helps save space :p


Col


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



Re: [PHP] Re: What font/size do you use for programming?

2008-07-10 Thread Jason Pruim


On Jul 10, 2008, at 10:44 AM, Colin Guthrie wrote:


Daniel Brown wrote:
On Thu, Jul 10, 2008 at 6:12 AM, Colin Guthrie  
[EMAIL PROTECTED] wrote:

tedd wrote:

Just out of curiosity, what font and size do you ppls use for your
programming?
I've got a lot of projects so I always use a really small font to  
save on

disk space

   That doesn't work, dummy!  You still have to save only half of
your files.  ;-P


Yeah you're right... well most of my lines are short so I'll try  
only saving the left hand side of each file and see if that helps  
save space :p



No wonder my files are so large... I have been saving them at 20 point  
type... Easier to read from aways away :P



--

Jason Pruim
Raoset Inc.
Technology Manager
MQC Specialist
11287 James St
Holland, MI 49424
www.raoset.com
[EMAIL PROTECTED]





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



Re: [PHP] Re: What font/size do you use for programming?

2008-07-10 Thread Daniel Brown
On Thu, Jul 10, 2008 at 10:53 AM, Jason Pruim [EMAIL PROTECTED] wrote:

 No wonder my files are so large... I have been saving them at 20 point
 type... Easier to read from aways away :P

aways = 37.126 feet  ;-P

-- 
/Daniel P. Brown
Dedicated Servers - Intel 2.4GHz w/2TB bandwidth/mo. starting at just
$59.99/mo. with no contract!
Dedicated servers, VPS, and hosting from $2.50/mo.

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



Re: [PHP] Re: What font/size do you use for programming?

2008-07-10 Thread Dan Joseph
On Thu, Jul 10, 2008 at 10:53 AM, Jason Pruim [EMAIL PROTECTED] wrote:


 On Jul 10, 2008, at 10:44 AM, Colin Guthrie wrote:

  Daniel Brown wrote:

 On Thu, Jul 10, 2008 at 6:12 AM, Colin Guthrie [EMAIL PROTECTED]
 wrote:

 tedd wrote:

 Just out of curiosity, what font and size do you ppls use for your
 programming?

 I've got a lot of projects so I always use a really small font to save
 on
 disk space

   That doesn't work, dummy!  You still have to save only half of
 your files.  ;-P


 Yeah you're right... well most of my lines are short so I'll try only
 saving the left hand side of each file and see if that helps save space :p



 No wonder my files are so large... I have been saving them at 20 point
 type... Easier to read from aways away :P


 --

 Jason Pruim
 Raoset Inc.
 Technology Manager
 MQC Specialist
 11287 James St
 Holland, MI 49424
 www.raoset.com
 [EMAIL PROTECTED]





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


All of this reminds me of a conversation I overheard at a previous job
between our deployment manager and his new worker.

We did credit card processing.  They deployed the terminals to customers.
They'd load the customer's data onto them, box, ship 'em.  Her job was to
ship them.  He had a chart of how much each type of terminal weighed.  She
said they were ripping off UPS because the data is never the same, and some
have more data, and will weigh more.  They went back and forth for 10
minutes.  She became hostile about it.  A couple of our other IT guys tried
to explain data had no weight.  She ended up getting fired over it.  Just
hilarious.

-- 
-Dan Joseph

www.canishosting.com - Plans start @ $1.99/month.

Build a man a fire, and he will be warm for the rest of the day.
Light a man on fire, and will be warm for the rest of his life.


[PHP] Re: What font/size do you use for programming?

2008-07-10 Thread tedd

At 11:12 AM +0100 7/10/08, Colin Guthrie wrote:

tedd wrote:
Just out of curiosity, what font and size do you ppls use for your 
programming?


I've got a lot of projects so I always use a really small font to 
save on disk space


Col


LOL

Why is it that I always have to read your post twice to get it?

Cheers,

tedd

--
---
http://sperling.com  http://ancientstones.com  http://earthstones.com

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



[PHP] Re: What font/size do you use for programming?

2008-07-10 Thread tedd

At 10:07 AM +0100 7/10/08, Peter Ford wrote:

tedd wrote:

Hi gang:

I'm running a Mac (so I know mine is a bit different size wise) but 
I'm currently using Veranda at 14 point for coding.


Just out of curiosity, what font and size do you ppls use for your 
programming?


Cheers,

tedd



I'd love to be coding on the Veranda, but it's raining horizontally 
at the moment and my keyboard hates being wet.


I'm using Lucida Sans for code these days - I finally figured that 
it didn't really have to be a fixed-width font, since I couldn't 
find one that wasn't ugly.


--
Peter Ford



Peter:

Good catch -- sometimes I hate spelling checkers.

Cheers,

tedd

--
---
http://sperling.com  http://ancientstones.com  http://earthstones.com

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



Re: [PHP] Re: What font/size do you use for programming?

2008-07-10 Thread tedd

At 12:24 PM -0400 7/10/08, Robert Cummings wrote:

On Thu, 2008-07-10 at 11:47 -0400, tedd wrote:

 At 11:12 AM +0100 7/10/08, Colin Guthrie wrote:
 tedd wrote:
 Just out of curiosity, what font and size do you ppls use for your
 programming?
 
 I've got a lot of projects so I always use a really small font to
 save on disk space
 
 Col

 LOL

 Why is it that I always have to read your post twice to get it?


Increase your font size Tedd, that way you have bigger understanding.

Cheers,
Rob.


Yeah, but I can't get the larger fonts into my head -- my eyes are too small.

Cheers,

tedd



--
---
http://sperling.com  http://ancientstones.com  http://earthstones.com

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



Re: [PHP] Re: What font/size do you use for programming?

2008-07-10 Thread Robert Cummings
On Thu, 2008-07-10 at 11:47 -0400, tedd wrote:
 At 11:12 AM +0100 7/10/08, Colin Guthrie wrote:
 tedd wrote:
 Just out of curiosity, what font and size do you ppls use for your 
 programming?
 
 I've got a lot of projects so I always use a really small font to 
 save on disk space
 
 Col
 
 LOL
 
 Why is it that I always have to read your post twice to get it?

Increase your font size Tedd, that way you have bigger understanding.

Cheers,
Rob.
-- 
http://www.interjinn.com
Application and Templating Framework for PHP


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



Re: [PHP] Re: What font/size do you use for programming?

2008-07-10 Thread tedd

At 9:40 AM -0500 7/10/08, Philip Thompson wrote:

On Jul 10, 2008, at 4:07 AM, Peter Ford wrote:
I'm using Lucida Sans for code these days - I finally figured that 
it didn't really have to be a fixed-width font, since I couldn't 
find one that wasn't ugly.


Are you sure you're a *coder*? =D I've looked at some code in a non 
fixed-width font before and it hurt my eyes! I bet you use tabs 
instead of spaces too. ;)


~Phil


~Phil:

As I wrote to Ted off-list.

A fixed width is not easier for me. After years of being forced to 
use a command, light on dark, and one font, it's a relief to pick 
what I want.


All my correspondence, email, notes, and coding is done in one font. 
The only time I change fonts is in final 
formal-presentations/publications and web sites.


For me, consistency between me and the computer screen is paramount 
in all my writing, including coding. I don't want to see the same 
word presented differently based upon what application I'm using.


As far as alignment of brackets and whatnot, I have absolutely no 
problem with the weird-ass style I use, which I use for ALL 
languages, namely:


php/javascript

whatever()
   {
   whatever;
   }

and html

whatever
   whatever
/whatever

and css

.whatever
   {
   whatever: whatever;
   }

and whatever else (i.e., actionscript, perl, c, c++, FB, and more 
than I want to remember).


A tab is consistent regardless of the type of font you use. I could 
not imagine putting spaces in my code when tabs work exceedingly well.


Cheers,

tedd
--
---
http://sperling.com  http://ancientstones.com  http://earthstones.com

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



Re: [PHP] Re: What font/size do you use for programming?

2008-07-10 Thread Philip Thompson

On Jul 10, 2008, at 9:53 AM, Jason Pruim wrote:


On Jul 10, 2008, at 10:44 AM, Colin Guthrie wrote:


Daniel Brown wrote:
On Thu, Jul 10, 2008 at 6:12 AM, Colin Guthrie  
[EMAIL PROTECTED] wrote:

tedd wrote:

Just out of curiosity, what font and size do you ppls use for your
programming?
I've got a lot of projects so I always use a really small font to  
save on

disk space

  That doesn't work, dummy!  You still have to save only half of
your files.  ;-P


Yeah you're right... well most of my lines are short so I'll try  
only saving the left hand side of each file and see if that helps  
save space :p



No wonder my files are so large... I have been saving them at 20  
point type... Easier to read from aways away :P


I think if you don't use indentation and unneeded spaces, you could  
save lots of space too...


?php
function aFunction($a,$b)
{
if($a-$b0){
while($a+$b0){
if($c){
$c++;
}else{
$c++;
}
}
return 'negative';
}else{
return 'possitive';
}
}
?

I can't tell you how much HDD space I've saved doing this!! ;P

~Phil

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



Re: [PHP] Re: What font/size do you use for programming?

2008-07-10 Thread Dan Joseph
On Thu, Jul 10, 2008 at 2:43 PM, Philip Thompson [EMAIL PROTECTED]
wrote:

 On Jul 10, 2008, at 9:53 AM, Jason Pruim wrote:

  On Jul 10, 2008, at 10:44 AM, Colin Guthrie wrote:

  Daniel Brown wrote:

 On Thu, Jul 10, 2008 at 6:12 AM, Colin Guthrie [EMAIL PROTECTED]
 wrote:

 tedd wrote:

 Just out of curiosity, what font and size do you ppls use for your
 programming?

 I've got a lot of projects so I always use a really small font to save
 on
 disk space

  That doesn't work, dummy!  You still have to save only half of
 your files.  ;-P


 Yeah you're right... well most of my lines are short so I'll try only
 saving the left hand side of each file and see if that helps save space :p



 No wonder my files are so large... I have been saving them at 20 point
 type... Easier to read from aways away :P


 I think if you don't use indentation and unneeded spaces, you could save
 lots of space too...

 ?php
 function aFunction($a,$b)
 {
 if($a-$b0){
 while($a+$b0){
 if($c){
 $c++;
 }else{
 $c++;
 }
 }
 return 'negative';
 }else{
 return 'possitive';
 }
 }
 ?

 I can't tell you how much HDD space I've saved doing this!! ;P

 ~Phil


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


You could probably save even more if you didn't use those unneeded returns
also:

?php function
aFunction($a,$b){if($a-$b0){while($a+$b0){if($c){$c++;}else{$c++;}}return
'negative';}else{return 'possitive';}} ?

I think that's still perfectly legible.

-- 
-Dan Joseph

www.canishosting.com - Plans start @ $1.99/month.

Build a man a fire, and he will be warm for the rest of the day.
Light a man on fire, and will be warm for the rest of his life.


Re: [PHP] Re: What font/size do you use for programming?

2008-07-10 Thread Eric Butera
On Thu, Jul 10, 2008 at 2:43 PM, Philip Thompson [EMAIL PROTECTED] wrote:
 I think if you don't use indentation and unneeded spaces, you could save
 lots of space too...

 ?php
 function aFunction($a,$b)
 {
 if($a-$b0){
 while($a+$b0){
 if($c){
 $c++;
 }else{
 $c++;
 }
 }
 return 'negative';
 }else{
 return 'possitive';
 }
 }
 ?

 I can't tell you how much HDD space I've saved doing this!! ;P

 ~Phil

Don't forget line returns!

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



RE: [PHP] Re: What font/size do you use for programming?

2008-07-10 Thread Jay Blanchard
[snip]
...
[/snip]

220, 221whatever it takes

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



Re: [PHP] Re: What font/size do you use for programming?

2008-07-10 Thread Omar Noppe
Is there any reason to pick a black background en white fonts in your  
editor (for example writability)?




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





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



Re: [PHP] Re: What font/size do you use for programming?

2008-07-10 Thread Philip Thompson

On Jul 10, 2008, at 3:35 PM, Omar Noppe wrote:

Is there any reason to pick a black background en white fonts in  
your editor (for example writability)?


I think a black background is much easier on the eyes

~Philip


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



Re: [PHP] Re: What font/size do you use for programming?

2008-07-10 Thread Daniel Brown
On Thu, Jul 10, 2008 at 5:29 PM, Philip Thompson [EMAIL PROTECTED] wrote:
 On Jul 10, 2008, at 3:35 PM, Omar Noppe wrote:

 Is there any reason to pick a black background en white fonts in your
 editor (for example writability)?

 I think a black background is much easier on the eyes

Blkbkgrnd69:  You're not so bad yourself, hot stuff.

-- 
/Daniel P. Brown
Dedicated Servers - Intel 2.4GHz w/2TB bandwidth/mo. starting at just
$59.99/mo. with no contract!
Dedicated servers, VPS, and hosting from $2.50/mo.

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



[PHP] Re: What font/size do you use for programming?

2008-07-10 Thread Colin Guthrie

Dan Joseph wrote:

You could probably save even more if you didn't use those unneeded returns
also:

?php function
aFunction($a,$b){if($a-$b0){while($a+$b0){if($c){$c++;}else{$c++;}}return
'negative';}else{return 'possitive';}} ?

I think that's still perfectly legible.



And that looks like a suspiciously unnecessary  ? at the end 
there I wonder what I'll spend my 24 bits on that could be 
1/1000 of a nipple in a grainy jpeg ;)


Col


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



Re: [PHP] Re: What font/size do you use for programming?

2008-07-10 Thread Robert Cummings
On Thu, 2008-07-10 at 12:33 -0400, tedd wrote:
 At 12:24 PM -0400 7/10/08, Robert Cummings wrote:
 On Thu, 2008-07-10 at 11:47 -0400, tedd wrote:
   At 11:12 AM +0100 7/10/08, Colin Guthrie wrote:
   tedd wrote:
   Just out of curiosity, what font and size do you ppls use for your
   programming?
   
   I've got a lot of projects so I always use a really small font to
   save on disk space
   
   Col
 
   LOL
 
   Why is it that I always have to read your post twice to get it?
 
 Increase your font size Tedd, that way you have bigger understanding.
 
 Cheers,
 Rob.
 
 Yeah, but I can't get the larger fonts into my head -- my eyes are too small.

Try an alternate route... bite on the monitor.

Cheers,
Rob.
-- 
http://www.interjinn.com
Application and Templating Framework for PHP


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



Re: [PHP] Re: What font/size do you use for programming?

2008-07-10 Thread Robert Cummings
On Thu, 2008-07-10 at 16:29 -0500, Philip Thompson wrote:
 On Jul 10, 2008, at 3:35 PM, Omar Noppe wrote:
 
  Is there any reason to pick a black background en white fonts in  
  your editor (for example writability)?
 
 I think a black background is much easier on the eyes

And on the environment since the energy needed to sustain it is lower.

Cheers,
Rob.
-- 
http://www.interjinn.com
Application and Templating Framework for PHP


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



Re: [PHP] Re: What font/size do you use for programming?

2008-07-10 Thread Robert Cummings
On Thu, 2008-07-10 at 23:47 +0100, Colin Guthrie wrote:
 Dan Joseph wrote:
  You could probably save even more if you didn't use those unneeded returns
  also:
  
  ?php function
  aFunction($a,$b){if($a-$b0){while($a+$b0){if($c){$c++;}else{$c++;}}return
  'negative';}else{return 'possitive';}} ?
  
  I think that's still perfectly legible.
 
 
 And that looks like a suspiciously unnecessary  ? at the end 
 there I wonder what I'll spend my 24 bits on that could be 
 1/1000 of a nipple in a grainy jpeg ;)

You only want to sharpen that image if the rest is easy on the eyes too.
Some things are better left grainy.

Cheers,
Rob.
-- 
http://www.interjinn.com
Application and Templating Framework for PHP


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



Re: [PHP] Re: What font/size do you use for programming?

2008-07-10 Thread dg

On Jul 10, 2008, at 9:33 PM, Robert Cummings wrote:


On Thu, 2008-07-10 at 16:29 -0500, Philip Thompson wrote:

On Jul 10, 2008, at 3:35 PM, Omar Noppe wrote:


Is there any reason to pick a black background en white fonts in
your editor (for example writability)?


I think a black background is much easier on the eyes


And on the environment since the energy needed to sustain it is lower.

Cheers,
Rob.


I find if I read stuff on a black background, I start seeing fuzzy  
streaks.  I do use a light grey to edit in though.


Be cool to see screenshots of people's set-ups.  The light grey is the  
only alteration I've ever made from BBedit's default settings.


-dg



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



Re: [PHP] Re: What font/size do you use for programming?

2008-07-10 Thread Robert Cummings
On Thu, 2008-07-10 at 21:45 -0700, dg wrote:

 Be cool to see screenshots of people's set-ups.  The light grey is the  
 only alteration I've ever made from BBedit's default settings.

http://www.interjinn.com/bleh/snapshot.20080711.png

Cheers,
Rob.
-- 
http://www.interjinn.com
Application and Templating Framework for PHP


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



Re: [PHP] Re: What font/size do you use for programming?

2008-07-10 Thread dg


On Jul 10, 2008, at 10:31 PM, Robert Cummings wrote:


http://www.interjinn.com/bleh/snapshot.20080711.png


very kewl. Maybe I'll ask Rich Siegel to pose shirtless for my BBedit  
background...


I'm used to line numbers along the side, especially given all my  
errors, how do you zoom in on them without seeing them there?


-dg


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



Re: [PHP] Re: What font/size do you use for programming?

2008-07-10 Thread Robert Cummings
On Thu, 2008-07-10 at 22:49 -0700, dg wrote:
 On Jul 10, 2008, at 10:31 PM, Robert Cummings wrote:
 
  http://www.interjinn.com/bleh/snapshot.20080711.png
 
 very kewl. Maybe I'll ask Rich Siegel to pose shirtless for my BBedit  
 background...
 
 I'm used to line numbers along the side, especially given all my  
 errors, how do you zoom in on them without seeing them there?

CTRL+K L, input line number

Also the line the cursor is currently on is displayed at the top right
corner.

Cheers,
Rob.
-- 
http://www.interjinn.com
Application and Templating Framework for PHP


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



[PHP] Re: What font/size do you use for programming?

2008-07-09 Thread tedd

At 11:54 PM -0500 7/8/08, Shawn McKenzie wrote:

Font: Agent Orange
Size: 64pt


64pt!

And I thought I my eyesight was poor at 14pt.

Cheers,

tedd

--
---
http://sperling.com  http://ancientstones.com  http://earthstones.com

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



Re: [PHP] Re: What font/size do you use for programming?

2008-07-09 Thread Shawn McKenzie

tedd wrote:

At 11:54 PM -0500 7/8/08, Shawn McKenzie wrote:

Font: Agent Orange
Size: 64pt


64pt!

And I thought I my eyesight was poor at 14pt.

Cheers,

tedd

Just kidding...  Seriously, I just use what ever is default for the app 
I'm using.  I used to use zend, now I use Aptana or kate for single files.


-Shawn

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



[PHP] Re: What font/size do you use for programming?

2008-07-09 Thread Jonesy
On Tue, 8 Jul 2008 19:23:49 -0400, tedd wrote:

 I'm running a Mac (so I know mine is a bit different size wise) but 
 I'm currently using Veranda at 14 point for coding.

 Just out of curiosity, what font and size do you ppls use for your 
 programming?

I've always found that my bash and php scripts run fastest when written 
in Nimbu Mono at 10 pt.

Jonesy


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



[PHP] Re: What font/size do you use for programming?

2008-07-08 Thread Shawn McKenzie

tedd wrote:

Hi gang:

I'm running a Mac (so I know mine is a bit different size wise) but I'm 
currently using Veranda at 14 point for coding.


Just out of curiosity, what font and size do you ppls use for your 
programming?


Cheers,

tedd


Font: Agent Orange
Size: 64pt

19 Westinghouse flatscreen.  My wife bought it for me 2 Christmases 
ago, this weekend she got a widescreen Samsung :-(


-Shawn

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



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

2007-07-13 Thread tg-php
View the source and trace through the javascript.

Looks like it has to do with:

function openLogin()

Which calls:

dojo.require(dojo.widget.Dialog);

and..

floatingWindow = dojo.widget.createWidget(Dialog, properties, node);

and..

floatingWindow.setContent(iframe (bunch of stuff)/iframe);


Don't have time right now, but I'd dig deeper into dojo.widget.Dialog (in this 
specific case.. don't know about Linux.com).

-TG

= = = Original message = = =

 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


___
Sent by ePrompter, the premier email notification software.
Free download at http://www.ePrompter.com.

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



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

2007-07-13 Thread Daniel Brown

On 7/13/07, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote:

View the source and trace through the javascript.

Looks like it has to do with:

function openLogin()

Which calls:

dojo.require(dojo.widget.Dialog);

and..

floatingWindow = dojo.widget.createWidget(Dialog, properties, node);

and..

floatingWindow.setContent(iframe (bunch of stuff)/iframe);


Don't have time right now, but I'd dig deeper into dojo.widget.Dialog (in this 
specific case.. don't know about Linux.com).

-TG

= = = Original message = = =

 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


___
Sent by ePrompter, the premier email notification software.
Free download at http://www.ePrompter.com.

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




   It looks nice and all, but it doesn't work.  I'm still able to
click any link I want to, play the music, et cetera, without logging
in.  Plus, simply stopping the page before it loads all the way blocks
the dimming of the background, disabling of page properties, and the
popup of the login window.

   Not sure if it's the same for everyone, but it is for me here at
work (Mandriva Linux 2006.0 Community, KDE 3.4, Firefox 2.0.0.4).

--
Daniel P. Brown
[office] (570-) 587-7080 Ext. 272
[mobile] (570-) 766-8107

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



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

2007-07-09 Thread clive
Man-wai Chang wrote:
 I asked here because I believe good PHP programmers are usually
 well-versed in client-side stuffs. :)
 

That comment reeks of NLP :)

clive

-- 
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 Colin Guthrie
Man-wai Chang wrote:
 http://xsojix.imeem.com/music/1zyLl7y9/lost_my_music/
 
 How did he/she do it? I meant the modal login window...
 

Just simple Javascript stuff. Just create a large div block that is
absolutely positioned over the top of everything and spans the whole
width/height of the page.

The either use alpha levels or a small 2x2 gif/png image that produces
the greyed out effect

0X
X0


Then draw your login in the middle of your div.

Not PHP, but it does look nice :)

Col

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



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

2007-07-07 Thread Tijnema

On 7/7/07, Colin Guthrie [EMAIL PROTECTED] wrote:

Man-wai Chang wrote:
 http://xsojix.imeem.com/music/1zyLl7y9/lost_my_music/

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


Just simple Javascript stuff. Just create a large div block that is
absolutely positioned over the top of everything and spans the whole
width/height of the page.

The either use alpha levels or a small 2x2 gif/png image that produces
the greyed out effect

0X
X0


Then draw your login in the middle of your div.

Not PHP, but it does look nice :)

Col


If you also want users to login first, don't do it like this ;)

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 :)

Tijnrma

--
Vote for PHP Color Coding in Gmail! - http://gpcc.tijnema.info

--
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 M. Sokolewicz
Man-wai Chang wrote:
 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?
 

There is no proper way. You have various tools to make one with,
namely pretty much all client-side scripting languages that work in
browsers. There are no standards dictating how it should be done, it's
all left up to the developer, there are just 'options' :)

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

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



Re: [PHP] Re: What does mean?

2007-05-02 Thread Richard Lynch
On Tue, May 1, 2007 12:55 pm, Robert Cummings wrote:
 Are there perhaps editors that would DISPLAY multi-line quoted
 strings
 indented to the correct level without inserting extra spaces? Some
 editors wrap lines to the correct level, which is also much more
 readable, so what I'm thinking of is a bit similar to that.

 Then you'd have an editor that presents something other than what is
 actually there. Go see Microsoft, I'm sure they create rubbish like
 that.

All editors display something other than what is actually there, to
some degree... :-)

That said...

The problem with the editor auto-indenting lines that aren't indented
is what to do with lines that ARE indented...

True Source:
$email = EOM
  This is a paragraph that has been indented and
hard line-wrapped with something not unlike:
http://php.net/wordwrap
http://php.net/wordwrap
and has had URLs embedded in ways to make sure ALL
email clients will present at least ONE clickable link,
even the dreaded AOL 4.0
  Yes, I still have code that is hanging around
from when AOL 4.0 was new.
  Sorry.
EOM;

So what would your nifty editor do with that?

Indent it to match PHP indenting, and then add the whitespace of the
actual message?

I think that might work well, though lead to a lot of un-readable
right-shifted long text lines instead of the ugly indentation.

One think you could consider to avoid the ugliness is to put the
heredoc into a one-use function or in an incldue file that doesn't
have enough indenting for it to look ugly in the first place. :-)

-- 
Some people have a gift link here.
Know what I want?
I want you to buy a CD from some indie artist.
http://cdbaby.com/browse/from/lynch
Yeah, I get a buck. So?

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



Re: [PHP] Re: What does mean?

2007-05-02 Thread Edward Vermillion


On May 2, 2007, at 3:59 PM, Richard Lynch wrote:

[snip]




One think you could consider to avoid the ugliness is to put the
heredoc into a one-use function or in an incldue file that doesn't
have enough indenting for it to look ugly in the first place. :-)



That's what I do with 'em, and that's exactly why. Can't stand to  
have things not look right, even if it does cost a function call.


At least until costing a function call matters more than being able  
to change things without going cross-eyed.


Ed

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



Re: [PHP] Re: What does mean?

2007-05-01 Thread Robert Cummings
On Tue, 2007-05-01 at 20:40 +0800, Man-wai Chang wrote:
   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... :)

Syntax error ;)

Cheers,
Rob.
-- 
..
| InterJinn Application Framework - http://www.interjinn.com |
::
| An application and templating framework for PHP. Boasting  |
| a powerful, scalable system for accessing system services  |
| such as forms, properties, sessions, and caches. InterJinn |
| also provides an extremely flexible architecture for   |
| creating re-usable components quickly and easily.  |
`'

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



RE: [PHP] Re: What does mean?

2007-05-01 Thread Edward Kay
  END
  some code
 END
 Bash redirection... :)

 Syntax error ;) 

Key stuck on keyboardd :)

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



RE: [PHP] Re: What does mean?

2007-05-01 Thread Robert Cummings
On Tue, 2007-05-01 at 15:01 +0100, Edward Kay wrote:
   END
   some code
  END
  Bash redirection... :)
 
  Syntax error ;) 
 
 Key stuck on keyboardd :)

*lol*


-- 
..
| InterJinn Application Framework - http://www.interjinn.com |
::
| An application and templating framework for PHP. Boasting  |
| a powerful, scalable system for accessing system services  |
| such as forms, properties, sessions, and caches. InterJinn |
| also provides an extremely flexible architecture for   |
| creating re-usable components quickly and easily.  |
`'

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



Re: [PHP] Re: What does mean?

2007-05-01 Thread Mattias Thorslund
Man-wai Chang wrote:

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

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


Exactly. I never saw the point in complicating my life with heredocs
when both single- and double-quoted strings can contain multiple lines
anyway.

One thing that does bother me a little with multi-line strings of either
variety is that if I want to avoid inserting extra spaces in the string
at the beginning of each line after the first, I have to left-align the
whole thing and cannot indent it with the rest of my code:

if($something){
if($something_else){
   $myID = intval($_GET['rowID']);
   $sql_pretty =
SELECT
field1,
field2
 FROM
mytable
 WHERE
rowID = $myID;
$sql_ugly =
SELECT
field1,
field2
FROM
mytable
WHERE
rowID = $myID;
}
}

Are there perhaps editors that would DISPLAY multi-line quoted strings
indented to the correct level without inserting extra spaces? Some
editors wrap lines to the correct level, which is also much more
readable, so what I'm thinking of is a bit similar to that.

Mattias

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



Re: [PHP] Re: What does mean?

2007-05-01 Thread Robert Cummings
On Tue, 2007-05-01 at 08:36 -0700, Mattias Thorslund wrote:
 Man-wai Chang wrote:
 
  Bash uses only 2. PHP uses 3. And I am using this:
 
  $sql=
select ...
  from 
  left join ...
on 
  where .
  ;
 
 
 Exactly. I never saw the point in complicating my life with heredocs
 when both single- and double-quoted strings can contain multiple lines
 anyway.
 
 One thing that does bother me a little with multi-line strings of either
 variety is that if I want to avoid inserting extra spaces in the string
 at the beginning of each line after the first, I have to left-align the
 whole thing and cannot indent it with the rest of my code:
 
 if($something){
 if($something_else){
$myID = intval($_GET['rowID']);
$sql_pretty =
 SELECT
 field1,
 field2
  FROM
 mytable
  WHERE
 rowID = $myID;
 $sql_ugly =
 SELECT
 field1,
 field2
 FROM
 mytable
 WHERE
 rowID = $myID;
 }
 }
 
 Are there perhaps editors that would DISPLAY multi-line quoted strings
 indented to the correct level without inserting extra spaces? Some
 editors wrap lines to the correct level, which is also much more
 readable, so what I'm thinking of is a bit similar to that.

Then you'd have an editor that presents something other than what is
actually there. Go see Microsoft, I'm sure they create rubbish like
that.

Cheers,
Rob.
-- 
..
| InterJinn Application Framework - http://www.interjinn.com |
::
| An application and templating framework for PHP. Boasting  |
| a powerful, scalable system for accessing system services  |
| such as forms, properties, sessions, and caches. InterJinn |
| also provides an extremely flexible architecture for   |
| creating re-usable components quickly and easily.  |
`'

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



Re: [PHP] Re: What does mean?

2007-05-01 Thread Mattias Thorslund
Robert Cummings wrote:
 On Tue, 2007-05-01 at 08:36 -0700, Mattias Thorslund wrote:
   
 Man-wai Chang wrote:
 
 Bash uses only 2. PHP uses 3. And I am using this:

 $sql=
   select ...
 from 
 left join ...
   on 
 where .
 ;
   
 Exactly. I never saw the point in complicating my life with heredocs
 when both single- and double-quoted strings can contain multiple lines
 anyway.

 One thing that does bother me a little with multi-line strings of either
 variety is that if I want to avoid inserting extra spaces in the string
 at the beginning of each line after the first, I have to left-align the
 whole thing and cannot indent it with the rest of my code:

 if($something){
 if($something_else){
$myID = intval($_GET['rowID']);
$sql_pretty =
 SELECT
 field1,
 field2
  FROM
 mytable
  WHERE
 rowID = $myID;
 $sql_ugly =
 SELECT
 field1,
 field2
 FROM
 mytable
 WHERE
 rowID = $myID;
 }
 }

 Are there perhaps editors that would DISPLAY multi-line quoted strings
 indented to the correct level without inserting extra spaces? Some
 editors wrap lines to the correct level, which is also much more
 readable, so what I'm thinking of is a bit similar to that.
 

 Then you'd have an editor that presents something other than what is
 actually there. Go see Microsoft, I'm sure they create rubbish like
 that.

 Cheers,
 Rob.
   

something other than what is actually there

Not at all, Rob! Have you seen how many editors dynamically wrap lines
(Quanta on KDE for instance)? Instead of placing the wrapped line right
smach along the left edge, it indents the following lines under the
first line. It is visually clear that there is no extra white space
because the extra indent has a different background color.

Like this (I used +'s to indicate a different background color, telling
you this isn't whitespace in your code):

if($something){
   $variable = This text message goes on and on and ever on and and
+++would run right off the edge of my screen but thankfully my editor
+++is smart enough to wrap the lines in a way that also does not
+++ruin the indentation.\n;
}

Now, I would wish for my editor to also indent multi-line strings in the
same fashion. Essentially, the lines of $sql_ugly in my example above
should be displayed in alignment with the indentation:

if($something){
   if($something_else){
  $myID = intval($_GET['rowID']);
  $sql =
++SELECT
++   field1,
++   field2
++FROM
++   mytable
++WHERE
++   rowID = $myID;
}
}

I doubt Microsoft develops an editor that I could use on my Linux system
for this...

Cheers,

Mattias

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



Re: [PHP] Re: What does mean?

2007-05-01 Thread Robert Cummings
On Tue, 2007-05-01 at 12:28 -0700, Mattias Thorslund wrote:
 Robert Cummings wrote:

 Now, I would wish for my editor to also indent multi-line strings in the
 same fashion. Essentially, the lines of $sql_ugly in my example above
 should be displayed in alignment with the indentation:
 
 if($something){
if($something_else){
   $myID = intval($_GET['rowID']);
   $sql =
 ++SELECT
 ++   field1,
 ++   field2
 ++FROM
 ++   mytable
 ++WHERE
 ++   rowID = $myID;
 }
 }

Aaaah, I see... still looks terrible :)

 I doubt Microsoft develops an editor that I could use on my Linux system
 for this...

Probably not.

Cheers,
Rob.
-- 
..
| InterJinn Application Framework - http://www.interjinn.com |
::
| An application and templating framework for PHP. Boasting  |
| a powerful, scalable system for accessing system services  |
| such as forms, properties, sessions, and caches. InterJinn |
| also provides an extremely flexible architecture for   |
| creating re-usable components quickly and easily.  |
`'

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



Re: [PHP] Re: What does mean?

2007-05-01 Thread Tijnema !

I doubt Microsoft develops an editor that I could use on my Linux system
for this...

Cheers,

Mattias


You could use a silly editor from Microsoft, and then run it using Wine.

Tijnema

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



[PHP] Re: What sripts,helpers to use for AJAX

2007-03-08 Thread Mikey

Otto Wyss wrote:
I want to add some AJAX communication to my pages and would like to 
know, what scripts, helpers you would recommend. I don't want to use a 
full featured framework, just something to do the AJAX work. So far I've 
come across the following solutions


http://prajax.sourceforge.net/
http://sanjer.berlios.de/

yet they both doesn't seem very much used. Does anybody know these or 
knows better alternatives?


O. Wyss


Scriptaculous - you get a whole heap of other stuff for free too.

http://script.aculo.us/

Mikey

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



RE: [PHP] Re: What sripts,helpers to use for AJAX

2007-03-08 Thread Edward Kay

 Otto Wyss wrote:
  I want to add some AJAX communication to my pages and would like to 
  know, what scripts, helpers you would recommend. I don't want to use a 
  full featured framework, just something to do the AJAX work. So 
 far I've 
  come across the following solutions
  
  http://prajax.sourceforge.net/
  http://sanjer.berlios.de/
  
  yet they both doesn't seem very much used. Does anybody know these or 
  knows better alternatives?
  
  O. Wyss
 

Take a look at YUI:
http://developer.yahoo.com/yui/

Edward

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



Re: [PHP] Re: What sripts,helpers to use for AJAX

2007-03-08 Thread benifactor

im using http://www.prototypejs.org/ and have had no problems thus far.
- Original Message - 
From: Mikey [EMAIL PROTECTED]

To: php-general@lists.php.net
Sent: Thursday, March 08, 2007 10:02 AM
Subject: [PHP] Re: What sripts,helpers to use for AJAX



Otto Wyss wrote:
I want to add some AJAX communication to my pages and would like to know, 
what scripts, helpers you would recommend. I don't want to use a full 
featured framework, just something to do the AJAX work. So far I've come 
across the following solutions


http://prajax.sourceforge.net/
http://sanjer.berlios.de/

yet they both doesn't seem very much used. Does anybody know these or 
knows better alternatives?


O. Wyss


Scriptaculous - you get a whole heap of other stuff for free too.

http://script.aculo.us/

Mikey

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



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



[PHP] Re: What is $this-

2007-02-19 Thread Dick Richard
Thanks for the responses. Searching the web for $this- provided no help at
all. Your explainations got me on track and now I can find the right manual
to read!

Dick
Dick Richard [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
 Can someone explain what $this- does and means. For example what does
this
 bit ot php code mean?

 $this-SetFont('Arial','B',15);

 Thanks

 [EMAIL PROTECTED]

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



[PHP] RE: What search algorithm does in_array() use?

2007-01-30 Thread Ken Dozier
BINGO!  I just tried your array_flip() suggestion, Greg.  Awesome!  Thanks
for the tip; I wouldn't have thought of that.

Ken. 

-Original Message-
From: Gregory Beaver [mailto:[EMAIL PROTECTED] 
Sent: Monday, January 29, 2007 4:54 PM
To: Ken Dozier
Cc: php-general@lists.php.net
Subject: Re: What search algorithm does in_array() use?

Ken Dozier wrote:
 Does in_array() use a search algorithm (i.e., binary search), or does 
 it check sequentially each element in the array?
 
 I am using in_array() within a while{} loop to check query results 
 against an access-list array to produce a third array containing items 
 that successfully passed the comparison test.  Because the two 
 starting arrays in the worst-case scenario can have 8,000 items each, the
loop is timing out.
 Advice or alternative methods are appreciated.
 
 Code Sample:
 ?php
 function check_results($results, $access_list) { # Check for $results 
 in array $access_list and
   # add matches to array $match.
 
   $result = false;
   $match = array();
 
   while ($r = mysql_fetch_row($results))
   { if ( in_array($r[0], $access_list) )
 { $match[] = $r; }
   }
 
   if ( count($match)  0 ) { $result = $match; }
 
   return $result;
 }
 ?

Hi Ken,

Since arrays are hash tables in PHP, it would be far faster to use an
associative array.  How?

$access_list = array_flip($access_list);

then

if (isset($access_list[$r[0]]))

However, this sounds more like a design issue with the SQL that creates
$results.  You can do the in_array natively in SQL with WHERE otherthing IN
(thing1, thing2,...) which would automatically filter out the
non-matches in a far more efficient manner, perhaps increasing requests per
second by an exponential factor.  Of course, if $access_list is from
external input (user input), you will need to escape the output, make sure
you have the proper encoding, etc. so you can avoid SQL injection attacks
and other nastiness, but that is another topic.

If you are getting $access_list from another query, you could also try using
a sub-query as in WHERE otherthing IN (SELECT ...) but this of course
assumes you are are using MySQL = version 4.1.

In any case, you are definitely going to want to revisit the design of your
queries before even starting with reworking your PHP.

Good luck,
Greg

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



[PHP] Re: What search algorithm does in_array() use?

2007-01-29 Thread Gregory Beaver
Ken Dozier wrote:
 Does in_array() use a search algorithm (i.e., binary search), or does it
 check sequentially each element in the array?
 
 I am using in_array() within a while{} loop to check query results against
 an access-list array to produce a third array containing items that
 successfully passed the comparison test.  Because the two starting arrays in
 the worst-case scenario can have 8,000 items each, the loop is timing out.
 Advice or alternative methods are appreciated.
 
 Code Sample:
 ?php
 function check_results($results, $access_list)
 { # Check for $results in array $access_list and
   # add matches to array $match.
 
   $result = false;
   $match = array();
 
   while ($r = mysql_fetch_row($results))
   { if ( in_array($r[0], $access_list) )
 { $match[] = $r; }
   }
 
   if ( count($match)  0 ) { $result = $match; }
 
   return $result;
 }
 ?

Hi Ken,

Since arrays are hash tables in PHP, it would be far faster to use an
associative array.  How?

$access_list = array_flip($access_list);

then

if (isset($access_list[$r[0]]))

However, this sounds more like a design issue with the SQL that creates
$results.  You can do the in_array natively in SQL with WHERE
otherthing IN (thing1, thing2,...) which would automatically filter
out the non-matches in a far more efficient manner, perhaps increasing
requests per second by an exponential factor.  Of course, if
$access_list is from external input (user input), you will need to
escape the output, make sure you have the proper encoding, etc. so you
can avoid SQL injection attacks and other nastiness, but that is another
topic.

If you are getting $access_list from another query, you could also try
using a sub-query as in WHERE otherthing IN (SELECT ...) but this of
course assumes you are are using MySQL = version 4.1.

In any case, you are definitely going to want to revisit the design of
your queries before even starting with reworking your PHP.

Good luck,
Greg

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



[PHP] Re: What makes a PHP expert

2007-01-18 Thread Colin Guthrie
Answer, nothing, PHP doesn't need Makefiles as it's an interpreted
language :p

hahahaha


Sorry, I'll get my coat.

Col.

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



Re: [PHP] Re: What makes a PHP expert

2007-01-18 Thread Robert Cummings
On Thu, 2007-01-18 at 14:25 +, Colin Guthrie wrote:
 Answer, nothing, PHP doesn't need Makefiles as it's an interpreted
 language :p

Ummm, I build PHP from source. There is definitely a makefile :)

 hahahaha

 Sorry, I'll get my coat.

Don't let the door hit you on the way out ;)

Cheers,
Rob.
-- 
..
| InterJinn Application Framework - http://www.interjinn.com |
::
| An application and templating framework for PHP. Boasting  |
| a powerful, scalable system for accessing system services  |
| such as forms, properties, sessions, and caches. InterJinn |
| also provides an extremely flexible architecture for   |
| creating re-usable components quickly and easily.  |
`'

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



  1   2   3   >