DonationCoder.com Software > Finished Programs
DONE: Delete double lines (all but the first) in a text file
jgpaiva:
It's algorithm is quite good, but ahk is a script language, so, it takes more time than C, for sure.-jgpaiva (March 06, 2006, 05:57 PM)
--- End quote ---
-Gerome (March 16, 2006, 01:42 PM)
--- End quote ---
Can you read?
I do know that can't handle a big input file.
And i also know that the same script in C would take about 10 seconds to solve that problem.
Implemented with an hash table in C, probably would take even less.
And i also know how to implement it in C, i even have the code, because i did it for school.
I could even use the solution that PhilKC presented.
If I wanted to do that search in an efficient way, i'd code it in C, and use it under linux.
My problem is that i've never compiled any C program in windows, and the original post on this thread required something that i thought ahk could solve.
Many thanks to jgpaiva for the new program mod.-TWmailrec (March 15, 2006, 10:53 PM)
--- End quote ---
And it did.
The question here, is that noone else presented a better solution. I presented mine.
I did the best thing I can do in windows. It sure does run faster than other executable presented at this thread.
Gerome:
Hey!
If you did it under linux, you can then compile it the same way under windows.
Simply compile with GCC and it'll work same way...
TWmailrec:
To jgpaiva from TW
No, what I meant was the message box now works fine,
but the blank lines are still stripped out of the output file.
Was this supposed to happen?
I was hoping to preserve the blank lines in the output file, (repeated or not). I cant see why they are stripped out but they are:
TW
jgpaiva:
To jgpaiva from TW
No, what I meant was the message box now works fine,
but the blank lines are still stripped out of the output file.
Was this supposed to happen?
I was hoping to preserve the blank lines in the output file, (repeated or not). I cant see why they are stripped out but they are:
-TWmailrec (March 16, 2006, 02:31 PM)
--- End quote ---
They are because I thought that was what you wanted ;)
I'll make it copy blank lines. :D
@Gerome I can't install gcc under windows, only through cygwin, and that's not worth the effort..
Gerome:
Hi,
@Gerome I can't install gcc under windows, only through cygwin, and that's not worth the effort..
--- End quote ---
????????????
Install MinGW or alike : DevCPP does this for you excellently...
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version