Click here to Skip to main content
11,718,589 members (86,456 online)

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, embarrasing 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: How To Use Session Variables Pin
Bob100020-Jun-13 4:44
memberBob100020-Jun-13 4:44 
GeneralRe: How To Use Session Variables Pin
Sitalkes20-Jun-13 3:25
memberSitalkes20-Jun-13 3:25 
GeneralRe: How To Use Session Variables Pin
RafagaX20-Jun-13 4:44
memberRafagaX20-Jun-13 4:44 
GeneralRe: How To Use Session Variables Pin
Member 882490521-Jun-13 3:28
memberMember 882490521-Jun-13 3:28 
GeneralRe: How To Use Session Variables Pin
AnalogNerd21-Jun-13 4:01
memberAnalogNerd21-Jun-13 4:01 
GeneralA Brilliant Replacement of float.toFixed(2) Pin
TNCaver17-Jun-13 9:25
memberTNCaver17-Jun-13 9:25 
GeneralRe: A Brilliant Replacement of float.toFixed(2) Pin
Lloyd Atkinson17-Jun-13 9:33
memberLloyd Atkinson17-Jun-13 9:33 
GeneralRe: A Brilliant Replacement of float.toFixed(2) Pin
Marc Clifton18-Jun-13 5:30
protectorMarc Clifton18-Jun-13 5:30 
GeneralRe: A Brilliant Replacement of float.toFixed(2) Pin
Amitosh Swain18-Jun-13 17:17
memberAmitosh Swain18-Jun-13 17:17 
GeneralRe: A Brilliant Replacement of float.toFixed(2) Pin
Brisingr Aerowing19-Jun-13 3:08
professionalBrisingr Aerowing19-Jun-13 3:08 
GeneralRe: A Brilliant Replacement of float.toFixed(2) Pin
TNCaver20-Jun-13 5:06
memberTNCaver20-Jun-13 5:06 
GeneralRe: A Brilliant Replacement of float.toFixed(2) Pin
Bob100020-Jun-13 4:46
memberBob100020-Jun-13 4:46 
GeneralRe: A Brilliant Replacement of float.toFixed(2) Pin
TNCaver20-Jun-13 5:12
memberTNCaver20-Jun-13 5:12 
GeneralDatetimes in java (again) Pin
V.13-Jun-13 1:22
professionalV.13-Jun-13 1:22 
GregorianCalendar date = new GregorianCalendar(1888, 0, 1, 0, 0, 0);
SimpleDateFormat sdf = new SimpleDateFormat("YYYY");
String convertedstring = sdf.format(date.getTime());
System.out.println(convertedstring);

output: 1887 (on my laptop anayway)

GregorianCalendar date = new GregorianCalendar(1888, 0, 1, 0, 0, 0);
SimpleDateFormat sdf = new SimpleDateFormat("yyyy");
String convertedstring = sdf.format(date.getTime());
System.out.println(convertedstring);

output: 1888

For those who didn't notice, in sample 1 I put "YYYY", in sample 2 "yyyy".
I couldn’t immediately find something in the docs or google explaining this…

GeneralRe: Datetimes in java (again) Pin
BotCar13-Jun-13 1:38
memberBotCar13-Jun-13 1:38 
GeneralRe: Datetimes in java (again) Pin
Brisingr Aerowing13-Jun-13 2:58
professionalBrisingr Aerowing13-Jun-13 2:58 
GeneralRe: Datetimes in java (again) Pin
Rob Grainger18-Jun-13 1:00
memberRob Grainger18-Jun-13 1:00 
QuestionMessage Automatically Removed Pin
12-Jun-13 21:44
memberToywarrior12-Jun-13 21:44 
AnswerRe: HTML 5 Application. Pin
Amitosh Swain12-Jun-13 21:53
memberAmitosh Swain12-Jun-13 21:53 
GeneralRe: HTML 5 Application. Pin
Toywarrior12-Jun-13 21:57
memberToywarrior12-Jun-13 21:57 
GeneralRe: HTML 5 Application. Pin
Amitosh Swain12-Jun-13 22:02
memberAmitosh Swain12-Jun-13 22:02 
GeneralRe: HTML 5 Application. Pin
Toywarrior12-Jun-13 22:16
memberToywarrior12-Jun-13 22:16 
GeneralRe: HTML 5 Application. Pin
Amitosh Swain12-Jun-13 22:21
memberAmitosh Swain12-Jun-13 22:21 
GeneralRe: HTML 5 Application. Pin
Toywarrior12-Jun-13 22:24
memberToywarrior12-Jun-13 22:24 
GeneralRe: HTML 5 Application. Pin
Amitosh Swain12-Jun-13 22:32
memberAmitosh Swain12-Jun-13 22:32 
JokeRe: HTML 5 Application. Pin
jim lahey17-Jun-13 10:15
memberjim lahey17-Jun-13 10:15 
AnswerRe: HTML 5 Application. Pin
Amitosh Swain18-Jun-13 17:09
memberAmitosh Swain18-Jun-13 17:09 
GeneralBug of the Day (2) Pin
Rob Grainger12-Jun-13 4:47
memberRob Grainger12-Jun-13 4:47 
GeneralRe: Bug of the Day (2) Pin
Brisingr Aerowing12-Jun-13 6:30
professionalBrisingr Aerowing12-Jun-13 6:30 
JokeRe: Bug of the Day (2) Pin
richcb17-Jun-13 10:43
memberrichcb17-Jun-13 10:43 
GeneralRe: Bug of the Day (2) Pin
Rob Grainger18-Jun-13 1:01
memberRob Grainger18-Jun-13 1:01 
JokeRe: Bug of the Day (2) Pin
richcb18-Jun-13 4:01
memberrichcb18-Jun-13 4:01 
GeneralBug of the day Pin
Delphi4ever12-Jun-13 4:18
memberDelphi4ever12-Jun-13 4:18 
GeneralRe: Bug of the day Pin
Richard Deeming12-Jun-13 4:25
professionalRichard Deeming12-Jun-13 4:25 
GeneralRe: Bug of the day Pin
BobJanova12-Jun-13 4:37
memberBobJanova12-Jun-13 4:37 
GeneralRe: Bug of the day Pin
Klaus-Werner Konrad12-Jun-13 22:39
memberKlaus-Werner Konrad12-Jun-13 22:39 
GeneralRe: Bug of the day Pin
BobJanova12-Jun-13 23:39
memberBobJanova12-Jun-13 23:39 
GeneralRe: Bug of the day Pin
Jacek Gajek14-Jun-13 1:13
memberJacek Gajek14-Jun-13 1:13 
GeneralRe: Bug of the day Pin
Klaus-Werner Konrad14-Jun-13 2:35
memberKlaus-Werner Konrad14-Jun-13 2:35 
GeneralRe: Bug of the day Pin
BobJanova14-Jun-13 3:31
memberBobJanova14-Jun-13 3:31 
GeneralRe: Bug of the day Pin
BobJanova14-Jun-13 3:30
memberBobJanova14-Jun-13 3:30 
GeneralRe: Bug of the day Pin
Jacek Gajek14-Jun-13 4:31
memberJacek Gajek14-Jun-13 4:31 
GeneralRe: Bug of the day Pin
Ravi Bhavnani12-Jun-13 5:42
professionalRavi Bhavnani12-Jun-13 5:42 
GeneralRe: Bug of the day Pin
ProgramFOX14-Jun-13 2:23
member ProgramFOX14-Jun-13 2:23 
GeneralRe: Bug of the day Pin
anton_l12-Jun-13 19:53
memberanton_l12-Jun-13 19:53 
GeneralRe: Bug of the day Pin
KP Lee13-Jun-13 20:45
memberKP Lee13-Jun-13 20:45 
GeneralRe: Bug of the day Pin
YvesDaoust12-Jun-13 21:08
memberYvesDaoust12-Jun-13 21:08 
GeneralRe: Bug of the day Pin
Gary Wheeler13-Jun-13 0:13
memberGary Wheeler13-Jun-13 0:13 
GeneralRe: Bug of the day Pin
BobJanova13-Jun-13 0:54
memberBobJanova13-Jun-13 0:54 
GeneralRe: Bug of the day Pin
Gary Wheeler13-Jun-13 1:08
memberGary Wheeler13-Jun-13 1:08 

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

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


Advertise | Privacy | Mobile
Web01 | 2.8.150901.1 | Last Updated 4 Sep 2015
Copyright © CodeProject, 1999-2015
All Rights Reserved. Terms of Service
Layout: fixed | fluid