Re: Tuple Array Sorting

2017-12-15 Thread Biotronic via Digitalmars-d-learn
On Friday, 15 December 2017 at 17:24:33 UTC, Vino wrote: Hi Biotronic, I was able to find a solution using container array and also date formatting, below is the code, please do let me know if you find any issue, as i have tested the script and it is working as expected. Program: import

Re: Tuple Array Sorting

2017-12-15 Thread Vino via Digitalmars-d-learn
On Tuesday, 12 December 2017 at 19:00:01 UTC, Biotronic wrote: On Tuesday, 12 December 2017 at 15:19:35 UTC, Vino wrote: import std.algorithm: filter, map, sort; import std.container.array; import std.file: SpanMode, dirEntries, isDir ; import std.stdio: writefln; import std.typecons: Tuple,

Re: Tuple Array Sorting

2017-12-13 Thread Vino via Digitalmars-d-learn
On Tuesday, 12 December 2017 at 19:00:01 UTC, Biotronic wrote: On Tuesday, 12 December 2017 at 15:19:35 UTC, Vino wrote: import std.algorithm: filter, map, sort; import std.container.array; import std.file: SpanMode, dirEntries, isDir ; import std.stdio: writefln; import std.typecons: Tuple,

Re: Tuple Array Sorting

2017-12-12 Thread Biotronic via Digitalmars-d-learn
On Tuesday, 12 December 2017 at 15:19:35 UTC, Vino wrote: import std.algorithm: filter, map, sort; import std.container.array; import std.file: SpanMode, dirEntries, isDir ; import std.stdio: writefln; import std.typecons: Tuple, tuple; import std.datetime.systime: SysTime; void main () { auto

Re: Tuple Array Sorting

2017-12-12 Thread Vino via Digitalmars-d-learn
On Monday, 11 December 2017 at 20:58:31 UTC, Biotronic wrote: On Monday, 11 December 2017 at 19:46:04 UTC, Vino wrote: import std.algorithm; import std.container.array; import std.file: SpanMode, dirEntries, isDir ; import std.stdio: writefln, writeln; import std.typecons: Tuple, tuple; import

Re: Tuple Array Sorting

2017-12-11 Thread Biotronic via Digitalmars-d-learn
On Monday, 11 December 2017 at 19:46:04 UTC, Vino wrote: import std.algorithm; import std.container.array; import std.file: SpanMode, dirEntries, isDir ; import std.stdio: writefln, writeln; import std.typecons: Tuple, tuple; import std.range: chain; void main () { auto FFs =

Re: Tuple Array Sorting

2017-12-11 Thread Vino via Digitalmars-d-learn
On Monday, 11 December 2017 at 19:23:40 UTC, Seb wrote: On Monday, 11 December 2017 at 16:15:14 UTC, Vino wrote: On Monday, 11 December 2017 at 15:54:11 UTC, Biotronic wrote: [...] Hi Biotronic, I tried your code with multiple folder's , but no luck the output is not sorted. Program:

Re: Tuple Array Sorting

2017-12-11 Thread Seb via Digitalmars-d-learn
On Monday, 11 December 2017 at 16:15:14 UTC, Vino wrote: On Monday, 11 December 2017 at 15:54:11 UTC, Biotronic wrote: [...] Hi Biotronic, I tried your code with multiple folder's , but no luck the output is not sorted. Program: import std.algorithm: filter, map, sort; import

Re: Tuple Array Sorting

2017-12-11 Thread Vino via Digitalmars-d-learn
On Monday, 11 December 2017 at 15:54:11 UTC, Biotronic wrote: On Monday, 11 December 2017 at 15:33:08 UTC, Vino wrote: On Monday, 11 December 2017 at 15:15:47 UTC, Biotronic wrote: [...] Hi, I tired that but no luck, below is the output, in your code you have one folder "auto folders =

Re: Tuple Array Sorting

2017-12-11 Thread Biotronic via Digitalmars-d-learn
On Monday, 11 December 2017 at 15:33:08 UTC, Vino wrote: On Monday, 11 December 2017 at 15:15:47 UTC, Biotronic wrote: On Monday, 11 December 2017 at 14:52:35 UTC, Vino wrote: Example Program and Output import std.algorithm: filter, map, sort; import std.container.array; import std.file:

Re: Tuple Array Sorting

2017-12-11 Thread Biotronic via Digitalmars-d-learn
On Monday, 11 December 2017 at 15:33:08 UTC, Vino wrote: I tired that but no luck, below is the output, in your code you have one folder "auto folders = ["D:\\Dev"];" if you have multiple folder then output is not sorted. Works on my machine. Of course, since time toSimpleString returns

Re: Tuple Array Sorting

2017-12-11 Thread Vino via Digitalmars-d-learn
On Monday, 11 December 2017 at 15:15:47 UTC, Biotronic wrote: On Monday, 11 December 2017 at 14:52:35 UTC, Vino wrote: Example Program and Output import std.algorithm: filter, map, sort; import std.container.array; import std.file: SpanMode, dirEntries, isDir ; import std.range: chain; import

Re: Tuple Array Sorting

2017-12-11 Thread Biotronic via Digitalmars-d-learn
On Monday, 11 December 2017 at 14:52:35 UTC, Vino wrote: Example Program and Output import std.algorithm: filter, map, sort; import std.container.array; import std.file: SpanMode, dirEntries, isDir ; import std.range: chain; import std.stdio: writefln; import std.typecons: Tuple, tuple; void

Re: Tuple Array Sorting

2017-12-11 Thread Vino via Digitalmars-d-learn
On Monday, 11 December 2017 at 14:25:16 UTC, Vino wrote: On Monday, 11 December 2017 at 13:58:49 UTC, Vino wrote: Hi All, Request your help in tuple array sorting, I have a function which returns tuple values as below so how do i sort this type of array based on the time stamp(Acceding

Re: Tuple Array Sorting

2017-12-11 Thread Vino via Digitalmars-d-learn
On Monday, 11 December 2017 at 13:58:49 UTC, Vino wrote: Hi All, Request your help in tuple array sorting, I have a function which returns tuple values as below so how do i sort this type of array based on the time stamp(Acceding order) . Eg: C:\Temp\EXPORT\dir2 2017-Sep-06 16:06:58