Click here to Skip to main content
11,415,390 members (83,665 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.

GeneralXPath oddity Pin
PIEBALDconsult3-Jul-14 9:15
memberPIEBALDconsult3-Jul-14 9:15 
GeneralRe: XPath oddity Pin
Richard Deeming3-Jul-14 9:39
professionalRichard Deeming3-Jul-14 9:39 
GeneralRe: XPath oddity Pin
PIEBALDconsult3-Jul-14 10:21
memberPIEBALDconsult3-Jul-14 10:21 
GeneralComparisons... Pin
jan larsen1-Jul-14 0:30
memberjan 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
    info(strFmt("bus.BusRelAccount == bus.TopLevelAccount: %1", i));
    i = 0;
    while select bus where
        bus.TopLevelAccount == bus.BusRelAccount
    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
"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... Pin
Bernhard Hiller1-Jul-14 21:56
professionalBernhard Hiller1-Jul-14 21:56 
GeneralRe: Comparisons... Pin
jan larsen4-Jul-14 3:46
memberjan larsen4-Jul-14 3:46 
GeneralRe: Comparisons... Pin
Bernhard Hiller4-Jul-14 4:15
professionalBernhard Hiller4-Jul-14 4:15 
GeneralRe: Comparisons... Pin
jan larsen9-Jul-14 23:28
memberjan larsen9-Jul-14 23:28 
GeneralIIF to the rescue... Pin
Sander Rossel30-Jun-14 6:29
professionalSander Rossel30-Jun-14 6:29 
GeneralRe: IIF to the rescue... Pin
Bernhard Hiller30-Jun-14 21:38
professionalBernhard Hiller30-Jun-14 21:38 

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
Web03 | 2.8.150427.4 | Last Updated 28 Apr 2015
Copyright © CodeProject, 1999-2015
All Rights Reserved. Terms of Service
Layout: fixed | fluid