Question: I have Zebra LP2824 printer. It is working properly on Windows XP, but It is not working properly on Windows 7. On windows 7 it prints the Test page on printer properties, but it is not printing in my application. It seems, that it can't find the port, the printer is using. On the same application, but on Windows XP it is printing. I am connecting the printer with USB.  

Does anyone knows what seems to be the problem?  

Thanks for help in advance. :)

Answer: 
The one thing you will want to make sure of here is that you have a sort on the query you wish to use to garnish your records. If no sort is used it will actually use find order, which is not `$natural` order.

Find order can differ between queries so if you run the query twice within the period of 2 minutes you might find that they don't return the same order. It does seem however that your query would be logically sorted on `tiem_difference`.

It should also by noted that this is not possible through normal querying. I also do not see an easy way doing this through the aggregation framework.

So already it seems the next plausible method is either using multiple queries or client side processing. Client side processing is probably the better here using a function like the one defined by @Marlon above.
One thing, I want to clear you. Unlike MYSQL, MongoDB is not give gurantee to the position. I mean, MongoDB will give you different sort at different time. So compare adjacent document may give different result, on every reading.

If you are fine with that and you want to compare then try with MongoDB's MapReduce <http://docs.mongodb.org/manual/applications/map-reduce/>