Re: [PHP] Algorithm Help

2013-10-20 Thread German Geek
You don't need to maintain the history of which kids stay where unless you want to for other reasons. You just need to find the children that have staid the least amount of time together, which this approach would do for you. So, when 4 children stay together you say 1 together with 2 1 together w

Re: [PHP] Algorithm Help

2013-10-20 Thread Ayush Ladia
Hi, Indeed making and maintaining the graph looks like the best approach here to tackle this problem , but what does not seem clear to me is this -- "Suppose a family can host 5 children , then you need to find the set of 5 such nodes out of the total no. of nodes(assume 10) such that the total we

Re: [PHP] Algorithm Help

2013-10-03 Thread Nickolas Whiting
Round Robin algorithm should solve this and is a fairly quick alogrithm ... http://en.wikipedia.org/wiki/Round-robin An example can be found http://forrst.com/posts/PHP_Round_Robin_Algorithm-2zm On Tue, Oct 1, 2013 at 2:51 PM, Floyd Resler wrote: > Here's my task: A group of kids is going to b

Re: [PHP] Algorithm Help

2013-10-03 Thread Floyd Resler
On Oct 2, 2013, at 6:23 PM, Tamara Temple wrote: > > On Oct 2, 2013, at 9:05 AM, Marc Guay wrote: > >> If you have the technology handy, it could also just be easier to wipe >> the children's memories after each stay. >> >> Marc >> >> -- >> PHP General Mailing List (http://www.php.net/) >

Re: [PHP] Algorithm Help

2013-10-02 Thread Tamara Temple
On Oct 2, 2013, at 9:05 AM, Marc Guay wrote: > If you have the technology handy, it could also just be easier to wipe > the children's memories after each stay. > > Marc > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > Well play

Re: [PHP] Algorithm Help

2013-10-02 Thread Marc Guay
If you have the technology handy, it could also just be easier to wipe the children's memories after each stay. Marc -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Algorithm Help

2013-10-02 Thread Floyd Resler
On Oct 2, 2013, at 9:51 AM, Tamara Temple wrote: > > On Oct 1, 2013, at 1:51 PM, Floyd Resler wrote: > >> Here's my task: A group of kids is going to be staying with different host >> families throughout the next 8 months. The number of kids staying with a >> host family can range from 2

Re: [PHP] Algorithm Help

2013-10-02 Thread Serge Fonville
It also depends on the amount of kids, families and stays. If the numbers are low, by hand may be a lot easier and faster Kind regards/met vriendelijke groet, Serge Fonville http://www.sergefonville.nl 2013/10/2 Tamara Temple > > On Oct 1, 2013, at 1:51 PM, Floyd Resler wrote: > > > Here's

Re: [PHP] Algorithm Help

2013-10-02 Thread Stuart Dallas
On 1 Oct 2013, at 19:51, Floyd Resler wrote: > Here's my task: A group of kids is going to be staying with different host > families throughout the next 8 months. The number of kids staying with a > host family can range from 2 to 10. When deciding which kids should stay > together at a host

Re: [PHP] Algorithm Help

2013-10-02 Thread Tamara Temple
On Oct 1, 2013, at 1:51 PM, Floyd Resler wrote: > Here's my task: A group of kids is going to be staying with different host > families throughout the next 8 months. The number of kids staying with a > host family can range from 2 to 10. When deciding which kids should stay > together at a

Re: [PHP] Algorithm Help

2013-10-01 Thread Serge Fonville
Assuming you don't have to be exact, somthing similar to this might work. Assign each kid to a host family randomly for each kid, check how frequently it has been combined with the kids in its assigned family. if it is too close, swap with a different family when all kids in that family are proces

Re: [PHP] Algorithm Help

2013-10-01 Thread Floyd Resler
m 1375 GLENDALE MILFORD RD., CINCINNATI, OH 45215 On Oct 1, 2013, at 3:14 PM, Ashley Sheridan wrote: > On Tue, 2013-10-01 at 15:09 -0400, Aziz Saleh wrote: > >> DB or flatfile? >> >> I would create a matrix of all kids crossed with every kid. Everytime a kid >> is put in a home with another k

Re: [PHP] Algorithm Help

2013-10-01 Thread Ashley Sheridan
On Tue, 2013-10-01 at 15:09 -0400, Aziz Saleh wrote: > DB or flatfile? > > I would create a matrix of all kids crossed with every kid. Everytime a kid > is put in a home with another kid, ++ that index. When dispatching kids, > sort by index ASC. > > Aziz > > > On Tue, Oct 1, 2013 at 3:01 PM,

Re: [PHP] Algorithm Help

2013-10-01 Thread Aziz Saleh
DB or flatfile? I would create a matrix of all kids crossed with every kid. Everytime a kid is put in a home with another kid, ++ that index. When dispatching kids, sort by index ASC. Aziz On Tue, Oct 1, 2013 at 3:01 PM, John Meyer wrote: > On 10/1/2013 12:51 PM, Floyd Resler wrote: > >> Here'

Re: [PHP] Algorithm Help

2013-10-01 Thread John Meyer
On 10/1/2013 12:51 PM, Floyd Resler wrote: Here's my task: A group of kids is going to be staying with different host families throughout the next 8 months. The number of kids staying with a host family can range from 2 to 10. When deciding which kids should stay together at a host family, t

RE: [PHP] algorithm of pages beaking

2008-03-19 Thread Edward Kay
> Hi, > > I am working in page breaking (dividing the result of > a select query in multiple pages). > > Now my problem is not with the php code, but with the > algorithm that organize the links to the pages. I want > to do something like google, the pages numbers at the > bottom of the page mus

Re: [PHP] algorithm of pages beaking

2008-03-19 Thread tedd
At 9:01 AM -0700 3/19/08, It Maq wrote: I am working in page breaking (dividing the result of a select query in multiple pages). Now my problem is not with the php code, but with the algorithm that organize the links to the pages. I want to do something like google, the pages numbers at the bott

Re: [PHP] algorithm of pages beaking

2008-03-19 Thread Daniel Brown
On Wed, Mar 19, 2008 at 12:01 PM, It Maq <[EMAIL PROTECTED]> wrote: > Hi, > > I am working in page breaking (dividing the result of > a select query in multiple pages). It's more commonly referred to as "pagination." You'll get more accurate results with the proper terminology. > Now my p

RE: [PHP] Algorithm....

2004-02-16 Thread Martin Towell
Hiya, Work out the start array position, keep incrementing by 1 until you find a "yes" >From this you'll know the allowable end times. HTH Martin > -Original Message- > From: Bob Eldred [mailto:[EMAIL PROTECTED] > Sent: Tuesday, 17 February 2004 4:04 PM > To: [EMAIL PROTECTED] > Subject:

Re: [PHP] Algorithm: Limiting Large Numbers of Pages to 10 visible

2001-12-21 Thread Dimitris Kossikidis
Or you can use this simply class from Manuel Lemos's site. It works with Mysql only. http://phpclasses.upperdesign.com/browse.html/package/366 > Hi, > > I need an algorithm for paging. If I have 100 pages of results, I only > want to show > << Prev 1 2 3 4 5 6 7 8 9 10 Next >> > > Where I limit

RE: [PHP] Algorithm for repeating calendar events

2001-07-13 Thread Matthew Loff
/code/Date_Calc/ Good luck! -Original Message- From: Michael Hall [mailto:[EMAIL PROTECTED]] Sent: Friday, July 13, 2001 9:13 AM To: [EMAIL PROTECTED] Subject: RE: [PHP] Algorithm for repeating calendar events This libmcal sounds like something I've been needing for another project. Unf

RE: [PHP] Algorithm for repeating calendar events

2001-07-13 Thread Michael Hall
-Original Message- > From: Matthew Loff [mailto:[EMAIL PROTECTED]] > Sent: Thursday, July 12, 2001 1:43 PM > To: 'Rasmus Lerdorf'; 'Reuben D Budiardja' > Cc: 'php php' > Subject: RE: [PHP] Algorithm for repeating calendar events > > > >

RE: [PHP] Algorithm for repeating calendar events

2001-07-12 Thread Matthew Loff
From: Rasmus Lerdorf [mailto:[EMAIL PROTECTED]] Sent: Thursday, July 12, 2001 2:28 PM To: Reuben D Budiardja Cc: php php Subject: Re: [PHP] Algorithm for repeating calendar events Not quite live yet. You'll see it when it goes live. By the way, there is a very complete date class in PEA

Re: [PHP] Algorithm for repeating calendar events

2001-07-12 Thread Rasmus Lerdorf
Not quite live yet. You'll see it when it goes live. By the way, there is a very complete date class in PEAR that has pretty much everything you would need to build a calendar app. See pear/Date/Calc.php -Rasmus On Thu, 12 Jul 2001, Reuben D Budiardja wrote: > Great, I'd like to steal it too

Re: [PHP] Algorithm for repeating calendar events

2001-07-12 Thread Reuben D Budiardja
Great, I'd like to steal it too then :). I just check php.net, but couldn't find it. In what section would you put it? Thanks. Reuben D. Budiardja On Tuesday 10 July 2001 05:34 pm, Rasmus Lerdorf wrote: > > Have any of you seen those calendar applications that let you program > > events that r

Re: [PHP] Algorithm for repeating calendar events

2001-07-10 Thread Rasmus Lerdorf
> Have any of you seen those calendar applications that let you program > events that repeat periodically? You can set it to repeat every > thursday, every week, every third week, every six months, and so on? > > I am developing such an application in PHP and I know that the client > will ask for