|
mmmmppphhhh.... must.....not....give in....to....obviously.....brainless.....insipid.....TROLLS!
Jeff Dickey
Seven Sigma Software and Services
Phone/SMS: +65 8333 4403
Yahoo! IM: jeff_dickey
MSN IM: jeff_dickey at hotmail.com
ICQ IM: 8053918
Skype: jeff_dickey
|
|
|
|
|
Jeff Dickey wrote: it violates the Thirty Second Rule (a single line of code shouldn't take that long to parse in your head)
Ummmm
List<vartiklcjenik> tablica = dc.vArtiklCjeniks.Where(sg => sg.StrankaID == s.StrankaID || (sg.StrankaID == null && dc.vArtiklCjeniks.Where(sg1 => sg1.ArtiklID == sg.ArtiklID && sg1.StrankaID == s.StrankaID).Count() == 0)).ToList();
How about that? Does this qualify as coding horror?
|
|
|
|
|
Not really
|
|
|
|
|
Did I hear someone say "Quine"?
Semicolons: The number one seller of ostomy bags world wide. - dan neely
|
|
|
|
|
Why didn't you do it this way:
return string.Format(exportField.FormatString, exportField.Value);
"Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997 ----- "...the staggering layers of obscenity in your statement make it a work of art on so many levels." - Jason Jystad, 10/26/2001
|
|
|
|
|
The format string for the export column doesn't contain the indexer for the composite format, i.e., I need "{0:0000.0000}" as a composite format, but the format string for the column doesn't care that it is format item with index 0, and is just "0000.0000".
Semicolons: The number one seller of ostomy bags world wide. - dan neely
|
|
|
|
|
I found this in one of my older projects:
if (DateTime.TryParse(TB_BuildYear.Text, out buildYear))
buildYear = buildYear;
else
error += "The build year you have entered is invalid\r\n";
One of these cases where not just using the variable but checking the value would have been better.
Alternatively I could have used empty curly brackets instead.
|
|
|
|
|
if (!DateTime.TryParse(TB_BuildYear.Text, out buildYear))
error += "The build year you have entered is invalid\r\n";
You mean this?
|
|
|
|
|
maybe it's like... you just want to be sure
(yes|no|maybe)*
|
|
|
|
|
This is some old code I wrote...old as in 2 days old
XmlDocument config = new XmlDocument();
config.LoadXml(new StreamReader(Application.ExecutablePath + ".config").ReadToEnd());
string connection = config.ChildNodes[1].ChildNodes[1].ChildNodes[0].Attributes["connectionString"].InnerText;
I dunno, app.config seems to hate me. No matter what I try, no matter how many tutorials I read, it never works.
|
|
|
|
|
Post this in the correct forum and I can help (hint: namespaces)
But in the meantime PLEASE do some checks on return values in each step. My eyes are watering just looking at it.
cheers,
Chris Maunder
CodeProject.com : C++ MVP
|
|
|
|
|
i am new to this message board
|
|
|
|
|
|
|
And spam is the best way to get started (note the irony)
Greetings.
--------
M.D.V.
If something has a solution... Why do we have to worry about?. If it has no solution... For what reason do we have to worry about?
Help me to understand what I'm saying, and I'll explain it better to you
“The First Rule of Program Optimization: Don't do it. The Second Rule of Program Optimization (for experts only!): Don't do it yet.” - Michael A. Jackson
Rating helpfull answers is nice, but saying thanks can be even nicer.
|
|
|
|
|
That doesn't forgive you the responsibility of becoming familiar with the rules before you start posting.
"Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997 ----- "...the staggering layers of obscenity in your statement make it a work of art on so many levels." - Jason Jystad, 10/26/2001
|
|
|
|
|
|
But fortunately we have the nanny-state politicians who can step in to protect us poor stupid consumers, most of whom would not know a JVM from a frozen chicken. Bruce Pierson Because programming is an art, not a science. Marc Clifton I gave up when I couldn't spell "egg". Justine Allen
|
|
|
|
|
Found this little gem in one of our apps at work ...
<br />
private bool IsBefore932()<br />
{<br />
if (Clock.Now.Hour < 9)<br />
{<br />
return true;<br />
}<br />
else if (Clock.Now.Hour == 9)<br />
{<br />
if (Clock.Now.Minute < 32)<br />
{<br />
return true;<br />
}<br />
else<br />
{<br />
return false;<br />
}<br />
}<br />
else<br />
{<br />
return false;<br />
}<br />
}<br />
|
|
|
|
|
So what did you do?
private static readonly O932 = new System.DateTime ( 9 , 32 , 00 ) ;
...
private bool IsBefore932()
{
return ( System.DateTime.Now.TimeOfDay <= O932 ) ;
}
(Or something like that, only better.)
|
|
|
|
|
Compiler error!
Wait… is that a zero or the letter O?
So the creationist says: Everything must have a designer. God designed everything.
I say: Why is God the only exception? Why not make the "designs" (like man) exceptions and make God a creation of man?
|
|
|
|
|
The letter O, of course.
|
|
|
|
|
It wasn't and you know it
My current favourite word is: I'm starting to run out of fav. words!
-SK Genius
Game Programming articles start - here[ ^]-
|
|
|
|
|
O0O0O0
O0O0O0... huh, I thought it was. I know I meant it to be, but the pre they look the same.
What kind of second-rate joint is this? I'm going to the suggestion forum next.
|
|
|
|
|
Actually I think it is an Oh. BUt like you said, they look the same. It's terrible, it's a disgrace, it's, it's... I don't really care anymore.
My current favourite word is: I'm starting to run out of fav. words!
-SK Genius
Game Programming articles start - here[ ^]-
|
|
|
|