Click here to Skip to main content
15,887,442 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.

 
GeneralRe: C++ Gem Pin
VentsyV12-Nov-08 9:11
VentsyV12-Nov-08 9:11 
JokeRe: C++ Gem Pin
Emil - Gabriel20-Nov-08 1:03
Emil - Gabriel20-Nov-08 1:03 
GeneralSQL Server trigger code Pin
Bernard Laplace10-Nov-08 1:16
Bernard Laplace10-Nov-08 1:16 
GeneralRe: SQL Server trigger code Pin
Thomas Weller10-Nov-08 4:37
Thomas Weller10-Nov-08 4:37 
GeneralRe: SQL Server trigger code Pin
Bernard Laplace10-Nov-08 5:37
Bernard Laplace10-Nov-08 5:37 
GeneralRe: SQL Server trigger code Pin
Paul Conrad10-Nov-08 17:20
professionalPaul Conrad10-Nov-08 17:20 
GeneralRe: SQL Server trigger code Pin
Thomas Weller10-Nov-08 5:38
Thomas Weller10-Nov-08 5:38 
GeneralWhat will you call this??? Pin
AhsanS7-Nov-08 2:38
AhsanS7-Nov-08 2:38 
Assume that pTimeText is containing 2 dates seperated by space.
Like
pTimeText = "31/12/2008 15:36 29/12/2008 15:36"

this.txtTime.Text = Convert.ToDateTime(pTimeText.Substring(0, pTimeText.IndexOf(":") + 3)).ToString(Logic.DateConfigurer.DateFormatWithTime) + Environment.NewLine + Convert.ToDateTime(pTimeText.Substring(pTimeText.IndexOf(":") + 3)).ToString(Logic.DateConfigurer.DateFormatWithTime);


Guess what will above code return.

I found it in a file.

Ahsan Ullah
Senior Software Engineer

GeneralRe: What will you call this??? Pin
Maximilien7-Nov-08 2:50
Maximilien7-Nov-08 2:50 
GeneralRe: What will you call this??? Pin
Dr.Walt Fair, PE7-Nov-08 3:21
professionalDr.Walt Fair, PE7-Nov-08 3:21 
GeneralRe: What will you call this??? Pin
Thomas Weller7-Nov-08 3:26
Thomas Weller7-Nov-08 3:26 
GeneralRe: What will you call this??? Pin
AhsanS7-Nov-08 8:10
AhsanS7-Nov-08 8:10 
GeneralRe: What will you call this??? Pin
Thomas Weller7-Nov-08 8:43
Thomas Weller7-Nov-08 8:43 
GeneralRe: What will you call this??? Pin
AhsanS7-Nov-08 9:11
AhsanS7-Nov-08 9:11 
GeneralRe: What will you call this??? Pin
Thomas Weller7-Nov-08 9:42
Thomas Weller7-Nov-08 9:42 
GeneralRe: What will you call this??? Pin
vlebed0110-Nov-08 7:35
vlebed0110-Nov-08 7:35 
GeneralRe: What will you call this??? Pin
PIEBALDconsult7-Nov-08 3:40
mvePIEBALDconsult7-Nov-08 3:40 
GeneralRe: What will you call this??? Pin
AhsanS7-Nov-08 8:06
AhsanS7-Nov-08 8:06 
GeneralRe: What will you call this??? Pin
PIEBALDconsult7-Nov-08 10:47
mvePIEBALDconsult7-Nov-08 10:47 
GeneralRe: What will you call this??? Pin
RubensFarias10-Nov-08 8:33
RubensFarias10-Nov-08 8:33 
GeneralRe: What will you call this??? Pin
PIEBALDconsult11-Nov-08 4:21
mvePIEBALDconsult11-Nov-08 4:21 
GeneralRe: What will you call this??? Pin
AhsanS11-Nov-08 22:03
AhsanS11-Nov-08 22:03 
GeneralRe: What will you call this??? Pin
PIEBALDconsult12-Nov-08 3:14
mvePIEBALDconsult12-Nov-08 3:14 
GeneralRe: What will you call this??? Pin
CPallini7-Nov-08 7:09
mveCPallini7-Nov-08 7:09 
GeneralRe: What will you call this??? Pin
AhsanS7-Nov-08 8:08
AhsanS7-Nov-08 8:08 

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.