Click here to Skip to main content
15,899,679 members

The Weird and The Wonderful

   

The Weird and The Wonderful forum is a place to post Coding Horrors, Worst Practices, and the occasional flash of brilliance.

We all come across code that simply boggles the mind. Lazy kludges, embarrassing mistakes, horrid workarounds and developers just not quite getting it. And then somedays we come across - or write - the truly sublime.

Post your Best, your worst, and your most interesting. But please - no programming questions . This forum is purely for amusement and discussions on code snippets. All actual programming questions will be removed.

 
RantRe: Convert double to fixed point integer format - hard way versus easy way... Pin
killabyte6-Jul-08 13:16
killabyte6-Jul-08 13:16 
GeneralRe: Convert double to fixed point integer format - hard way versus easy way... PinPopular
Rob Grainger4-Jul-08 1:23
Rob Grainger4-Jul-08 1:23 
GeneralRe: Convert double to fixed point integer format - hard way versus easy way... Pin
PIEBALDconsult4-Jul-08 3:56
mvePIEBALDconsult4-Jul-08 3:56 
GeneralRe: Convert double to fixed point integer format - hard way versus easy way... Pin
DQNOK9-Jul-08 3:23
professionalDQNOK9-Jul-08 3:23 
GeneralRe: Convert double to fixed point integer format - hard way versus easy way... Pin
geoffs9-Jul-08 5:04
geoffs9-Jul-08 5:04 
GeneralDoes this qualify as horror? Pin
Megidolaon30-Jun-08 23:09
Megidolaon30-Jun-08 23:09 
GeneralRe: Does this qualify as horror? Pin
PIEBALDconsult1-Jul-08 4:50
mvePIEBALDconsult1-Jul-08 4:50 
GeneralRe: Does this qualify as horror? Pin
Megidolaon1-Jul-08 21:39
Megidolaon1-Jul-08 21:39 
PIEBALDconsult wrote:
string XMLCommand = string.Format

What is string.Format?
PIEBALDconsult wrote:
But that still doesn't explain the extra less-than; you should find out what the problem is.

I explained in in my first post already, it's because CodeProject only displays half the code without it.
s_mon wrote:
XmlDocument xmlDocument = new XmlDocument();
xmlDocument.AppendChild = xmlDocument.CreateElement("evil");

I know, I know.
I wrote the code before knowing any XML classes and just been too lazy to change it now.

Also, I don't think it's necessary to create a new XMLDoc and append an element and Attribute just so I'll pass the OuterXml to the send method anyway.
It's quick & dirty but it does it's job and for a single line of XML I think it's ok.
I use the proper classes when building larger XML.
GeneralRe: Does this qualify as horror? Pin
PIEBALDconsult2-Jul-08 12:48
mvePIEBALDconsult2-Jul-08 12:48 
GeneralRe: Does this qualify as horror? Pin
PIEBALDconsult2-Jul-08 12:52
mvePIEBALDconsult2-Jul-08 12:52 
JokeRe: Does this qualify as horror? PinPopular
Paul Conrad1-Jul-08 17:22
professionalPaul Conrad1-Jul-08 17:22 
GeneralRe: Does this qualify as horror? Pin
Stephen Hewitt1-Jul-08 18:24
Stephen Hewitt1-Jul-08 18:24 
GeneralRe: Does this qualify as horror? Pin
StM0n1-Jul-08 19:31
StM0n1-Jul-08 19:31 
GeneralRe: Does this qualify as horror? Pin
Paul Conrad1-Jul-08 19:34
professionalPaul Conrad1-Jul-08 19:34 
GeneralRe: Does this qualify as horror? Pin
Spacix One2-Jul-08 4:49
Spacix One2-Jul-08 4:49 
GeneralRe: Does this qualify as horror? Pin
supercat92-Jul-08 7:40
supercat92-Jul-08 7:40 
Questionread file from bottom Pin
vineeshV30-Jun-08 19:09
vineeshV30-Jun-08 19:09 
AnswerRe: read file from bottom Pin
Lee Humphries30-Jun-08 19:31
professionalLee Humphries30-Jun-08 19:31 
RantRe: read file from bottom Pin
KarstenK30-Jun-08 21:08
mveKarstenK30-Jun-08 21:08 
AnswerRe: read file from bottom Pin
Baconbutty30-Jun-08 21:54
Baconbutty30-Jun-08 21:54 
JokeRe: read file from bottom PinPopular
Mladen Janković1-Jul-08 1:15
Mladen Janković1-Jul-08 1:15 
GeneralGreat! Pin
CPallini1-Jul-08 2:15
mveCPallini1-Jul-08 2:15 
AnswerRe: read file from bottom [modified] PinPopular
killabyte30-Jun-08 23:48
killabyte30-Jun-08 23:48 
GeneralRe: read file from bottom Pin
jamie5501-Jul-08 1:16
jamie5501-Jul-08 1:16 
GeneralRe: read file from bottom Pin
Yusuf1-Jul-08 5:44
Yusuf1-Jul-08 5:44 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.