• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Sorting arrays nightmare
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Sorting arrays nightmare


  • Subject: Re: Sorting arrays nightmare
  • From: Louis Demers <email@hidden>
  • Date: Sun, 20 Feb 2011 21:46:51 -0500

On 2011-02-20, at 21:39 , Louis Demers wrote:

> Please note that the sorting on the NSTimestamp seems to work, it's just that the sort on the primary does not when it's in reverse..
>

let me add that according to what I'm trying to do the latest should be the record with larger primary key on the same date
sot it should be last transaction on 2011-01-20

<35478>

and not

<35472> which is the first on 2011-01-20 ....


>
>
> Here is the updated output
>
> getttime = 1294686456000 <35474>  2011-01-10 19:07:36 Etc/GMT  Q: 1/1
> getttime = 1294686456000 <35475>  2011-01-10 19:07:36 Etc/GMT  Q: 1/2
> getttime = 1295550456000 <35472>  2011-01-20 19:07:36 Etc/GMT  Q: 1/3
> getttime = 1295550456000 <35473>  2011-01-20 19:07:36 Etc/GMT  Q: 1/4
> getttime = 1295550456000 <35478>  2011-01-20 19:07:36 Etc/GMT  Q: 1/5
> getttime = 1296414456000 <35476>  2011-01-30 19:07:36 Etc/GMT  Q: 1/6
> getttime = 1296414456000 <35477>  2011-01-30 19:07:36 Etc/GMT  Q: 1/7
>
>
> latest before 2011-01-25 19:07:36 Etc/GMT  getttime = 1295550456000 <35472>  2011-01-20 19:07:36 Etc/GMT  Q: 1/3
>
> Thanks for feedback
>
>
> On 2011-02-20, at 18:11 , Q wrote:
>
>>
>> On 21/02/2011, at 6:01 AM, Louis Demers wrote:
>> ....
>>>
>>> Here is sample debug output when enumerating in chronological order <> are primary keys
>>>
>>> <35474> 2011-01-10 19:07:36 Etc/GMT  Q: 1/1
>>> <35475> 2011-01-10 19:07:36 Etc/GMT  Q: 1/2
>>> <35472> 2011-01-20 19:07:36 Etc/GMT  Q: 1/3
>>> <35473> 2011-01-20 19:07:36 Etc/GMT  Q: 1/4
>>> <35478> 2011-01-20 19:07:36 Etc/GMT  Q: 1/5
>>> <35476> 2011-01-30 19:07:36 Etc/GMT  Q: 1/6
>>> <35477> 2011-01-30 19:07:36 Etc/GMT  Q: 1/7
>>>
>>> and if I print the latest
>>>
>>> latest before 2011-01-25 19:07:36 Etc/GMT  <35472>2011-01-20 19:07:36 Etc/GMT Q: 1/3
>>
>> Try rerunning these two operations but print out the timestamp values using NSTimestamp.getTime() at well.
>>
>> --
>> Seeya...Q
>>
>> Quinton Dolan - email@hidden
>> Gold Coast, QLD, Australia (GMT+10)
>>
>>
>>
>>
>
> Louis Demers eng.
> www.obzerv.com
>
>
> _______________________________________________
> Do not post admin requests to the list. They will be ignored.
> Webobjects-dev mailing list      (email@hidden)
> Help/Unsubscribe/Update your Subscription:
>
> This email sent to email@hidden

Louis Demers eng.
www.obzerv.com


 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Follow-Ups:
    • Re: Sorting arrays nightmare (Solved by luck !)
      • From: Louis Demers <email@hidden>
References: 
 >Sorting arrays nightmare (From: Louis Demers <email@hidden>)
 >Re: Sorting arrays nightmare (From: Q <email@hidden>)
 >Re: Sorting arrays nightmare (From: Louis Demers <email@hidden>)

  • Prev by Date: Re: Sorting arrays nightmare
  • Next by Date: Re: Sorting arrays nightmare (Solved by luck !)
  • Previous by thread: Re: Sorting arrays nightmare
  • Next by thread: Re: Sorting arrays nightmare (Solved by luck !)
  • Index(es):
    • Date
    • Thread