|
OriginalGriff wrote: This guy can vote. Breed. Drive.
Not to nitpick, but his breeding ability has not been put to the ultimate test.
Freedom is the freedom to say that two plus two make four. If that is granted, all else follows.
-- 6079 Smith W.
|
|
|
|
|
I had to be at work all day yesterday. Don't ask.
I made good use of the time by finally implementing a StringComparer which yields my preferred sort order for strings such as the following:
In:
Bob.txt
bob010.txt
Bobby.txt
bob.txt
bob11.txt
bob1.txt
bob01.txt
bob100.txt
bob2.txt
bob20.txt
bob02.txt
bob020.txt
bobby.txt
bob0.txt
bob10.txt
bob111.txt
Out:
bob.txt
bob0.txt
bob1.txt
bob01.txt
bob2.txt
bob02.txt
bob10.txt
bob010.txt
bob11.txt
bob20.txt
bob020.txt
bob100.txt
bob111.txt
bobby.txt
Bob.txt
Bobby.txt
I may write an Article about it once I've lived with it a while.
|
|
|
|
|
It looks close to an explorer-style sort.
"They have a consciousness, they have a life, they have a soul! Damn you! Let the rabbits wear glasses! Save our brothers! Can I get an amen?"
|
|
|
|
|
So you prefer your own sort
|
|
|
|
|
Yes, otherwise I feel out of sorts.
|
|
|
|
|
When you run out of sorts what then?
Got my site back up after my time in the woods!
JaxCoder.com
|
|
|
|
|
Civil disorder.
Sent from my Amstrad PC 1640
Never throw anything away, Griff
Bad command or file name. Bad, bad command! Sit! Stay! Staaaay...
AntiTwitter: @DalekDave is now a follower!
|
|
|
|
|
It's of no use to me.
None of my files are called bob.
I wanna be a eunuchs developer! Pass me a bread knife!
|
|
|
|
|
I thought Bob was your uncle
|
|
|
|
|
He was, until the operation.
I wanna be a eunuchs developer! Pass me a bread knife!
|
|
|
|
|
|
Seeing "bob10.txt" appear before "bob010.txt" looks confusing to me. While the digits both "collapse" down to "10", I'd expect the one with the leading 0 to appear before the one without. That is what Explorer does. It looks to me like the choice was made based on the length of the string (longer should appear after, so long as the "value" of the numbers are equivalent - is that correct?)
Not criticizing, just point out how it's different than what I'd expect.
|
|
|
|
|
Yes.
Though I don't expect to be sorting file names with and without leading ZEROs together.
I also tried sorting strings with leading SPACEs -- as if they had leading ZEROs -- but it lead to inconsistencies when mixed within the sample set.
The expectation is that a typical set of strings would be consistent.
modified 10-Feb-19 15:25pm.
|
|
|
|
|
PIEBALDconsult wrote: The expectation is that a typical set of strings would be consistent.
If you can control that, then great...
|
|
|
|
|
The immediate need is for a set of files I'm generating.
|
|
|
|
|
If you're the one generating those files, wouldn't it have been simpler to change the code that creates those filenames so they're consistent?
|
|
|
|
|
They are consistent. With no leading zeroes.
|
|
|
|
|
Ah, natural sorting.
I have made one of those in SQL.
|
|
|
|
|
Hard to do anything string-related in SQL.
|
|
|
|
|
Indeed, but sometimes it's just more efficient to do the sorting in the database and add it to an index.
|
|
|
|
|
PIEBALDconsult wrote: I had to be at work all day yesterday.
It's a hard life eh?
|
|
|
|
|
Yeah, that sort of ruins the day, right?
CQ de W5ALT
Walt Fair, Jr., P. E.
Comport Computing
Specializing in Technical Engineering Software
|
|
|
|
|
I've been practicing for the AZ-203 exam and I've decided to just take a shot.
I've watched some videos on a Udemy course (formerly 70-532, which I have) and since there aren't any official learning resources I guess this is as good as it gets.
Initially, I wanted to go for AZ-202, but even though it's still on the Microsoft website I've heard it's retired since AZ-200 and AZ-201 are retired (after like two months) and it's just one exam again anyway.
So I go to the Microsoft website, plan the AZ-203 exam, check my account information, and click the "Go to Pearson VUE" button... AND NOTHING HAPPENS!
I check the console and there's a bug in the button click event handler
I tried registering directly at Pearson VUE, but they redirect me to the Microsoft site again.
You don't need clear certifications and learning resources if no one can register for the exam
|
|
|
|
|
For an exam which one of my programming teachers gave (back around 1990), the first task was to write a ROT-n program to decipher the exam.
Maybe these exam setters have done the same sort of thing?
|
|
|
|
|
and someone failed.
"They have a consciousness, they have a life, they have a soul! Damn you! Let the rabbits wear glasses! Save our brothers! Can I get an amen?"
|
|
|
|