demexp-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Demexp-dev] [Web Client] Timestamps... again


From: David MENTRE
Subject: Re: [Demexp-dev] [Web Client] Timestamps... again
Date: Sat, 22 Mar 2008 22:03:09 +0100
User-agent: Gnus/5.110006 (No Gnus v0.6) Emacs/21.4 (gnu/linux)

Hello Lyu,

Lyu Abe <address@hidden> writes:

> Could someone explain how to manage timestamps to retrieve the following
> information:
> -new questions

You don't need timestamps for this. Just store somewhere the maximum
question id you have seen until now. When you get the new maximum
question id, compare it to the old one. Question ids increase strictly. 


> -updated questions
>   >new answers added
>   >winning answer changed

Store in a hash-table the timestamp for each question id. When you get
new question timestamps, check for each question if the new timestamp is
bigger than the old one stored in your hash-table. If this is true,
something has changed. 

However, you cannot currently know *what* has changed for a given
question, except by storing all the question fields and comparing one by
one the old field value with the new one.

Please not that for the test server, the timestamp of a question might
*not* be updated if the winning answer is changed. This was fixed later
in the development version.

>   >delegate changed the vote

Currently part of delegation is only implemented in the current dev
version and I can't remember what's happening when something change with
delegates. 

Yours,
d.
-- 
GPG/PGP key: A3AD7A2A David MENTRE <address@hidden>
 5996 CC46 4612 9CA4 3562  D7AC 6C67 9E96 A3AD 7A2A




reply via email to

[Prev in Thread] Current Thread [Next in Thread]