|
That's right, this question does belong on the "Coding Horrors" board.
|
|
|
|
|
I've been frustrated the last couple of days trying to get multiple files to upload while still updating individual progress bars in a responsive WPF UI. I finished it this moring, and I came up with this oh so satisfying line:
<br />
fu.ui.UploadFile(fu.file);
I think that might be the coolest and most satisfying line of code I have ever written.
You might see this line in Coding Horrors the next time some other coder runs across it!
-- modified at 9:21 Wednesday 1st August, 2007
|
|
|
|
|
I had one the other night:
if (car is Missing) return null;
(it's valid C#!)
|
|
|
|
|
Missing? I can only find that in the Microsoft.JScript namespace, unless you have your own Missing. If the former, it's very tentatively valid C#.
|
|
|
|
|
System.Reflection.Missing
|
|
|
|
|
Just another glaring indictment of the perpetual impotence of MSDN indexing, finding only the most obscure occurrence of the Missing class.
|
|
|
|
|
|
No doubt. I always use Google to search MSDN, not their own search.
|
|
|
|
|
i didn't know it ws posssible to serach msdn with the built in search function
|
|
|
|
|
That makes for a good technical interview question:
"In the .NET Framework base class library, what is the Missing class?"
Very zen-like, a bit like the missing link...
|
|
|
|
|
else return car;
Greetings from Germany
|
|
|
|
|
else return (Missing)car;
|
|
|
|
|
|
I'm trying to figure out how an old C application work.
i = 0;
while(i <= 1024) {
if(RxData[i] == 13 && RxData[i+1] == 10 && RxData[i+2] == 13 && RxData[i+3] == 10)
break;
i++;
}
PosBD = i;
i = PosBD;
EDIT: PosBD and i are declared as int .
Although the while body might be quite clever because it's fast (who's brave enough to understand where the code is used?), I really don't get the 2 final lines...
-- modified at 13:25 Tuesday 31st July, 2007
If you truly believe you need to pick a mobile phone that "says something" about your personality, don't bother. You don't have a personality. A mental illness, maybe - but not a personality. - Charlie Brooker
My Blog - My Photos - ScrewTurn Wiki
|
|
|
|
|
Well it's checking for 2 line returns so the first thing that comes to mind is SMTP or HTTP :P
Last 2 lines are just plain stupid.
|
|
|
|
|
First thing that came to my mind too .. though only a 1k limit, bit of a kicker with a long POST request.
I'm largely language agnostic
After a while they all bug me
|
|
|
|
|
Steve Hansen wrote: HTTP
Bingo!
If you truly believe you need to pick a mobile phone that "says something" about your personality, don't bother. You don't have a personality. A mental illness, maybe - but not a personality. - Charlie Brooker
My Blog - My Photos - ScrewTurn Wiki
|
|
|
|
|
Mayyyyybe PosBD is some class that has some assignment operator overload that does some crazy stuff behind the scenes... or maybe not.
Edit: Although C doesn't support operator overloading
-- modified at 12:26 Tuesday 31st July, 2007
|
|
|
|
|
So the last two lines are daft unless as suggested that they do something behind the scenes, but is this possibly looking for 2 consectutive LineFeed Carrige Returns??
ie ascii characters 10 = LF and 13 = CR ??
<edit> Ok, just realised thats what the first post pointed out!
|
|
|
|
|
Must be software for aircraft controlling systems. I heard that they always make things redundant, just in case...
|
|
|
|
|
Rage wrote: Must be software for aircraft controlling systems.
Luckily, it's not that important.
If you truly believe you need to pick a mobile phone that "says something" about your personality, don't bother. You don't have a personality. A mental illness, maybe - but not a personality. - Charlie Brooker
My Blog - My Photos - ScrewTurn Wiki
|
|
|
|
|
5.... because thats halarious
|
|
|
|
|
I also hope that RxData has an array length of (at least) 1028, though somehow I doubt it.
Faith is a fine invention
For gentlemen who see;
But microscopes are prudent
In an emergency!
-Emily Dickinson
|
|
|
|
|
David Kentley wrote: though somehow I doubt it
If you truly believe you need to pick a mobile phone that "says something" about your personality, don't bother. You don't have a personality. A mental illness, maybe - but not a personality. - Charlie Brooker
My Blog - My Photos - ScrewTurn Wiki
|
|
|
|
|
<br />
PosBD = i; <br />
i = PosBD; <br />
I'd be suspicious that 'PosBD' doesn't hold the value of 1024 too well. But without seeing it's type, that's pure speculation.
Chris Meech
I am Canadian. [heard in a local bar]
|
|
|
|