Did you, with a straight face, ask what colour LINQ you should use?
BillC
@BillC
Best posts made by BillC
Latest posts made by BillC
-
RE: Lynn-Queue
-
RE: Reporter WTF
@ComputerForumUser said:
The sentence under the headline says average, and the rest of the article states more specifically the median, as opposed to the more commonly assumed mean?
Actually, the "average" refers to the percentage drop of the "median" price, and the comparison is of the fall in that area compared to the national average fall.
By fall I mean drop, not the season, of course.
-
RE: Survey already supports AI
@bstorer said:
@savar said:
The third option says "I am an avid computer" instead of "I am an avid computer user". It's funny because computers can't be avid!*ahem* the people who used to do sums with desk calculators were sometimes called "computers" because, well, they computed. Just like actors act, jugglers juggle, etc. An avid computer is someone who can't wait to get stuck into a nice, difficult long division or Taylor Series expansion.
-
RE: Ass is not allowed!
@everythingdaniel said:
So I was registering at a website yesterday and an intresting error came up....
http://img440.imageshack.us/img440/2158/tallahassee.png
thats a screen capture of what happened. Apparently ass is not allowed for a location!
--Daniel L
Of course. Try entering Tallahbuttee.
-
RE: Opaque? What does that mean?
@DaveK said:
@CDarklock said:
Er. Not to me it doesn't, but I guess YMMV. I already answered ten what: ten post-text/binary-mode-translation characters. The offset, being relative, is not opaque in the way that the filepos is, being absolute.@DaveK said:
The filepos itself, OTOH, is opaque, and not for the reasons that you mention, but more subtle problems. Think about a file open in text mode: a CR or an LF counts as "one" in these units, but so does a "CR-LF" pair. It gets even more complicated when you involve unicode, locale, and variable-length multi-byte representations.
As opposed to what Andy said, which was...
@AndyCanfield said:
Adding offset to the current file position should advance the file position by ten. Ten what?
Um... that looks like EXACTLY the reason he mentioned.
But that's the problem. Ten "post translation" characters may not be ten in the file. So you may have to actually do the equivalent of *actually reading ten characters* to get to the right place, then save the "current offset".
No reason that couldn't be done in a custom += method, except that the type they're using is obviously defined outside the code involved, and probably can't be changed.
-
RE: OO - The *other* end of the spectrum
@BillC said:
in an array?
OK, the contents of that array entry may be the head of a linked list. But it's still an array entry.
-
RE: OO - The *other* end of the spectrum
@morbiuswilters said:
Wow, that is totally incorrect. The fact that you didn't know hash tables don't work that way shows your ignorance.
Dude, you're usually quite funny, but this ... wow. You didn't understand that a hash table stores its entries in an array?
-
RE: OO - The *other* end of the spectrum
@amischiefr said:
@LordOfThePigs said:
Granted this could have been made faster by using an array instead of a HashMap to make the lookup trivial, but that really doesn't make me want to cry out wtf.
Did you just suggest that they could use an Array over a HashMap for retrieval? You honestly believe that lookup is "faster" in an Array over a HashMap? Right there you lost the argument and whatever else you said is not even worth reading. Please go back to class and stop ditching Introduction to Programming 101 just to post on here.
Did you not actually learn to *think* in your "Programming 101" class?
-
RE: Opaque? What does that mean?
@Qwerty said:
I'm still not entirely clear what the WTF is here.
-
The programmer who used "+" to add the offset without realising that there was another function that should have been used instead?
-
The person who wrote the class and didn't provide an overloaded "+" operator?
-
Could the class-writer have prevented the "+" operator from working on their object, when it is on a system that uses an integer?
-
Did the class-writer modify the machine-specific type in their class? The code doesn't seem to show that but I'm not a C programmer.
The WTF is mostly in the title: it's an opaque type, and should have no assumptions made about it.
Point 2 is valid, although the better option might have been (and this answers point 3 too) to provide a private operator+ and operator +=, and not implement them.
Can't answer point 4 :o)
-
-
RE: Opaque? What does that mean?
@mallard said:
@BillC said:
@SlyEcho said:
Um, maybe you could try += ?
It's a structure ...
So? You can define operators for any user-defined type in C++...
... and if you use native C++ libraries, you get std::streamoff, which is "long long" or "int64_t" with libstdc++ on Linux. But this is obviously referring to fpos_t, which is a structure, because it carries "multibyte character" state information.