Re: eliminate results
Piperita wrote:
>
I think the first is needed to generate temp, the second is the one
inside the function body.
Am I wrong?
How you fill `temp' is rather irrelevant to the solution. Suppose it
contains the results of the database query as you suggested, then you would
initialize `temp' with those results through a server-side script that
generates the constructor call or initializer literal.
However, if you are to increase efficiency, you would have the server-side
script generate the initializer appropriately using the presented algorithm
and no client-side script to filter for the maximum number of displayed
items. But then it might not even be a JS solution that is needed.
Please do not remove the attribution line.
PointedEars
Piperita wrote:
>I only see one `for' loop here. What would be the second one?
I think the first is needed to generate temp, the second is the one
inside the function body.
Am I wrong?
contains the results of the database query as you suggested, then you would
initialize `temp' with those results through a server-side script that
generates the constructor call or initializer literal.
However, if you are to increase efficiency, you would have the server-side
script generate the initializer appropriately using the presented algorithm
and no client-side script to filter for the maximum number of displayed
items. But then it might not even be a JS solution that is needed.
Please do not remove the attribution line.
PointedEars
Comment