Click here to Skip to main content

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: Uncheck this if you are not a bot Pinmember d@nish 6-Jul-14 1:20 
GeneralRe: Uncheck this if you are not a bot PinmemberPIEBALDconsult6-Jul-14 5:36 
GeneralRe: Uncheck this if you are not a bot PinprofessionalBernhard Hiller6-Jul-14 22:17 
GeneralRe: Uncheck this if you are not a bot PinprofessionalDennis_E7-Jul-14 0:43 
GeneralRe: Uncheck this if you are not a bot Pinmemberjesarg7-Jul-14 4:38 
GeneralRe: Uncheck this if you are not a bot PinmemberPIEBALDconsult7-Jul-14 8:29 
GeneralRe: Uncheck this if you are not a bot PinprofessionalDennis_E7-Jul-14 10:25 
GeneralRe: Uncheck this if you are not a bot PinmemberjasonHall7-Jul-14 11:20 
GeneralRe: Uncheck this if you are not a bot Pinmemberjesarg7-Jul-14 11:49 
GeneralRe: Uncheck this if you are not a bot PinprotectorOriginalGriff8-Jul-14 2:38 
GeneralXPath oddity PinmemberPIEBALDconsult3-Jul-14 9:15 
GeneralRe: XPath oddity PinprofessionalRichard Deeming3-Jul-14 9:39 
GeneralRe: XPath oddity PinmemberPIEBALDconsult3-Jul-14 10:21 
GeneralComparisons... Pinmemberjan larsen1-Jul-14 0:30 
Found an interesting feature in Microsoft Dynamics Ax 2012 R2:
static void Job40(Args _args)
{
    smmBusRelTable              bus;
    int                         i;
 
    select count(RecId) from bus where
        bus.BusRelAccount == bus.TopLevelAccount
    ;
 
    info(strFmt("From count: %1", bus.RecId));
 
    i = 0;
    while select bus where
        bus.BusRelAccount == bus.TopLevelAccount
    {
        i++;
    }
 
    info(strFmt("bus.BusRelAccount == bus.TopLevelAccount: %1", i));
 
    i = 0;
    while select bus where
        bus.TopLevelAccount == bus.BusRelAccount
    {
        i++;
    }
 
    info(strFmt("bus.TopLevelAccount == bus.BusRelAccount: %1", i));
}
 
Running the job results in this output:
From count: 31597
bus.BusRelAccount == bus.TopLevelAccount: 1
bus.TopLevelAccount == bus.BusRelAccount: 31597
OMG | :OMG:
"God doesn't play dice" - Albert Einstein
 
"God not only plays dice, He sometimes throws the dices where they cannot be seen" - Niels Bohr

GeneralRe: Comparisons... PinprofessionalBernhard Hiller1-Jul-14 21:56 
GeneralRe: Comparisons... Pinmemberjan larsen4-Jul-14 3:46 
GeneralRe: Comparisons... PinprofessionalBernhard Hiller4-Jul-14 4:15 
GeneralRe: Comparisons... Pinmemberjan larsen9-Jul-14 23:28 
GeneralIIF to the rescue... PinprofessionalSander Rossel30-Jun-14 6:29 
GeneralRe: IIF to the rescue... PinprofessionalBernhard Hiller30-Jun-14 21:38 
GeneralRe: IIF to the rescue... PinprofessionalSander Rossel30-Jun-14 21:56 
GeneralRe: IIF to the rescue... PinprofessionalBernhard Hiller30-Jun-14 22:35 
GeneralRe: IIF to the rescue... PinprofessionalSander Rossel30-Jun-14 22:56 
GeneralRe: IIF to the rescue... PinprofessionalBernhard Hiller1-Jul-14 21:57 
GeneralRe: IIF to the rescue... PinprofessionalSander Rossel2-Jul-14 1:58 
GeneralRe: IIF to the rescue... PinprofessionalNagy Vilmos1-Jul-14 0:43 
GeneralRe: IIF to the rescue... PinprofessionalSander Rossel1-Jul-14 1:16 
GeneralRe: IIF to the rescue... PinprofessionalRichard Deeming1-Jul-14 3:33 
GeneralRe: IIF to the rescue... PinmemberPaulLinton2-Jul-14 16:14 
GeneralRe: IIF to the rescue... PinprofessionalSander Rossel2-Jul-14 20:31 
GeneralRe: IIF to the rescue... [modified] PinprofessionalJörgen Andersson5-Jul-14 21:02 
GeneralStarting to page OS to disk! PinmemberDavid O'Neil27-Jun-14 11:22 
GeneralChecking for empty guid PinmemberStepan Kobzey26-Jun-14 11:04 
GeneralRe: Checking for empty guid PinmemberPIEBALDconsult26-Jun-14 11:13 
GeneralRe: Checking for empty guid PinmemberStepan Kobzey26-Jun-14 11:16 
GeneralRe: Checking for empty guid PinmemberPIEBALDconsult26-Jun-14 11:37 
GeneralRe: Checking for empty guid PinprofessionalSander Rossel26-Jun-14 11:51 
GeneralRe: Checking for empty guid PinmemberPIEBALDconsult26-Jun-14 12:05 
GeneralRe: Checking for empty guid PinprofessionalSander Rossel26-Jun-14 13:32 
GeneralRe: Checking for empty guid PinprotectorOriginalGriff26-Jun-14 12:11 
GeneralRe: Checking for empty guid PinprofessionalSander Rossel26-Jun-14 13:32 
GeneralRe: Checking for empty guid PinmemberPIEBALDconsult27-Jun-14 5:37 
GeneralRe: Checking for empty guid PinmemberHomerTheGreat26-Jun-14 12:19 
GeneralRe: Checking for empty guid PinprofessionalBernhard Hiller27-Jun-14 1:11 
GeneralRe: Checking for empty guid PinmemberPIEBALDconsult27-Jun-14 5:37 
GeneralRe: Checking for empty guid PinprofessionalBernhard Hiller27-Jun-14 1:06 
GeneralRe: Checking for empty guid PinmemberPIEBALDconsult27-Jun-14 5:38 
GeneralRe: Checking for empty guid PinprofessionalNagy Vilmos27-Jun-14 2:59 
GeneralRe: Checking for empty guid PinprofessionalRichard Deeming27-Jun-14 3:36 
GeneralRe: Checking for empty guid [modified] PinmemberPIEBALDconsult27-Jun-14 4:11 

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
Web04 | 2.8.1411023.1 | Last Updated 27 Nov 2014
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid