I got nothing on chaining, but I have some opinions about the
prototype concept.
The prototyping concept in general is similar to using a static
member in Java. A function prototype in JavaScript is a member that
is common to all instances of that function (read: class). If one
instance d
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
I must say that both techniques *can* lead to hell when debugging.
The idea of adding new methods ontop of existing classes is usually not
safe if not documented well. The one thing I liked about the
verbose-ness of Java is the fact that I always kne
Partially. Once I find all the zip codes within an x-mile radius I
have to find all records in a db table that match any of those zip codes.
Load an array of zip codes within an x-mail radius, Let's assume
$ZipArray. Next.
$Subselect = "(" . implode('",",$ZipArray) , '")';
Let's addition
A lot of the methods in the Zend Framework classes use object chaining.
It requires PHP5. In terms of the prototype concept... javascript
doesn't have a traditional object implementation -- you can't say "class
A extends class B" -- and the lines are pretty blurred between what a
function is
On 1/22/07, Cliff Hirsch <[EMAIL PROTECTED]> wrote:
I wonder how these techniques work in the PHP world. Does anyone use
chaining effectively? Is there a PHP equivalent to the prototype concept?
Javascript is an beautiful, powerful language. I never thought I would
say that, and I think Netsca
I have been digging into JavaScript and jQuery, and am intrigued by
several concepts.
1. jQuery uses chaining, whereby every method within jQuery returns the
query object itself.
2. JavaScript's prototype method is an interesting concept for adding
methods to existing classes.
I wonder how th
Partially. Once I find all the zip codes within an x-mile radius I have to
find all records in a db table that match any of those zip codes.
>Date: Mon, 22 Jan 2007 01:14:51 -0500
>From: Urb LeJeune <[EMAIL PROTECTED]>
>Subject: Re: [nyphp-talk] Radial Zip Code Search
>To: NYPHP Talk
>Message-I
Thanks for the info, I'll check it out.
Urb
You almost certainly want to use the Haversine formula for this task
(calculating distances to points that are quite close on a sphere).
http://en.wikipedia.org/wiki/Great-circle_distance
The basic Great Circle formula gives *incorrect* res
On Monday 22 January 2007 9:39 am, Urb LeJeune wrote:
> >There are 8 Zip codes withing a 5 miles radius of 05701
> >They are:
> >05251 Dorset, VT 0.85 miles
> >05701 Rutland, VT 0.00 miles
> >05702 Rutland, VT 0.00 miles
> >05736 Center Rutland, VT 2.59 miles
> >05744 Florence, VT 3.57 miles
> >05
There are 8 Zip codes withing a 5 miles radius of 05701
They are:
05251 Dorset, VT 0.85 miles
05701 Rutland, VT 0.00 miles
05702 Rutland, VT 0.00 miles
05736 Center Rutland, VT 2.59 miles
05744 Florence, VT 3.57 miles
05759 North Clarendon, VT 2.13 miles
05765 Proctor, VT 4.57 miles
05777 West R
That's a nice setup but something is wrong there
There are 8 Zip codes withing a 5 miles radius of 05701
They are:
05251 Dorset, VT 0.85 miles
05701 Rutland, VT 0.00 miles
05702 Rutland, VT 0.00 miles
05736 Center Rutland, VT 2.59 miles
05744 Florence, VT 3.57 miles
05759 North Clarendon, VT 2.13
11 matches
Mail list logo