[PHP] PEAR & PHP

2011-01-29 Thread Ethan Rosenberg

Dear list -

I enter the command pear list, and get errors.  See below --

ethan@rosenberg:/usr/lib/php5$ ls -l
total 12
drwxr-xr-x 2 root root 4096 Jan  6 00:53 20090626+lfs
drwxr-xr-x 2 root root 4096 Jul 18  2010 libexec
-rwxr-xr-x 1 root root  596 Jan  5 08:09 maxlifetime

ethan@rosenberg:/usr/lib/php5$ pear list
PHP Warning:  PHP Startup: Unable to load dynamic library 
'/usr/lib/php5/20090626+lfs/msql.so' - 
/usr/lib/php5/20090626+lfs/msql.so: cannot open shared object file: 
No such file or directory in Unknown on line 0


Warning: PHP Startup: Unable to load dynamic library 
'/usr/lib/php5/20090626+lfs/msql.so' - 
/usr/lib/php5/20090626+lfs/msql.so: cannot open shared object file: 
No such file or directory in Unknown on line 0

Installed packages, channel pear.php.net:
=
Package  Version State
Archive_Tar  1.3.7   stable
Console_Getopt   1.2.3   stable
PEAR 1.9.1   stable
Structures_Graph 1.0.3   stable
Validate_US  0.5.4   beta
XML_Util 1.2.1   stable

ethan@rosenberg:/usr/lib/php5$ cd 20090626+lfs

ethan@rosenberg:/usr/lib/php5/20090626+lfs$ ls -l
total 560
-rw-r--r-- 1 root root  95596 Jan  5 08:09 gd.so
-rw-r--r-- 1 root root  38272 Jan  5 08:09 mcrypt.so
-rw-r--r-- 1 root root 109220 Jan  5 08:09 mysqli.so
-rw-r--r-- 1 root root  42352 Jan  5 08:09 mysql.so
-rw-r--r-- 1 root root  26116 Jan  5 08:09 pdo_mysql.so
-rw-r--r-- 1 root root  87588 Jan  5 08:09 pdo.so
-rw-r--r-- 1 root root 141336 Aug 19 04:04 suhosin.so

ethan@rosenberg:/usr/lib/php5/20090626+lfs$

Help and advice, please.

Thanks.

Ethan

MySQL 5.1  PHP 5.3.3-6  Linux [Debian (sid)] 




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



[PHP] Re: "public static" or "static public"?

2011-01-29 Thread Colin Guthrie
'Twas brillig, and David Harkness at 28/01/11 18:41 did gyre and gimble:
> On Fri, Jan 28, 2011 at 10:35 AM, Mujtaba Arshad wrote:
> 
>> Having learned java before even knowing what php was (yeah I'm a noob in
>> both) I prefer scope static function.
> 
> 
> I learned Java first, too, and also prefer the scope first. I place a scope
> on every method, so I'd rather the first word always be the scope rather
> than sometimes scope, sometimes static. I also think of it as a "static
> function" that happens to be "public." Finally, I prefer to group static
> members at the top of the class to differentiate them as a separate API for
> the class itself.

Well that wasn't even vaguely controversial! Was hoping that some people
would have some more "creative" reasoning for both sides!

Ahh well, this all ties in with my view, so I'm not really complaining :D

Cheers for the insights.

Col

-- 

Colin Guthrie
gmane(at)colin.guthr.ie
http://colin.guthr.ie/

Day Job:
  Tribalogic Limited [http://www.tribalogic.net/]
Open Source:
  Mageia Contributor [http://www.mageia.org/]
  PulseAudio Hacker [http://www.pulseaudio.org/]
  Trac Hacker [http://trac.edgewall.org/]


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



Re: [PHP] 95th percentile of an array.

2011-01-29 Thread Paul Halliday
On Sat, Jan 29, 2011 at 2:28 PM, Adam Richardson  wrote:
> For the nearest rank computation, you could use the following:
>
> $arr =
> array(12,89,65,23,90,99,9,15,56,67,3,52,78,12,10,88,77,77,77,77,77,77,77);
> sort($arr);
> $score_representing_95th_percentile = $arr[round((95/100) * count($arr) -
> .5)];
> echo $score_representing_95th_percentile; // 90
>

Perfect, exactly what I was looking for.

thank you.

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



Re: [PHP] 95th percentile of an array.

2011-01-29 Thread Adam Richardson
For the nearest rank computation, you could use the following:

$arr =
array(12,89,65,23,90,99,9,15,56,67,3,52,78,12,10,88,77,77,77,77,77,77,77);
sort($arr);
$score_representing_95th_percentile = $arr[round((95/100) * count($arr) -
.5)];
echo $score_representing_95th_percentile; // 90

That said, there are many ways to calculate percentile (I tend to think in
Z-scores, myself), and nearest rank has its issues, depending on your needs:
http://en.wikipedia.org/wiki/Percentile

Hopefully the example and the link
give you enough to get what you need working.

Adam

On Sat, Jan 29, 2011 at 11:15 AM, Paul Halliday wrote:

> What is the quickest way to do this? Will stats_stat_percentile work?
> If so, does anyone have examples of its operation?
>
> Keep in mind that my math is terrible. Use small words :)
>
> Thanks.
>
> --
> Paul Halliday
> http://www.pintumbler.org
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>


-- 
Nephtali:  A simple, flexible, fast, and security-focused PHP framework
http://nephtaliproject.com


[PHP] 95th percentile of an array.

2011-01-29 Thread Paul Halliday
What is the quickest way to do this? Will stats_stat_percentile work?
If so, does anyone have examples of its operation?

Keep in mind that my math is terrible. Use small words :)

Thanks.

-- 
Paul Halliday
http://www.pintumbler.org

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