15,901,122 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.

 Re: Cursed Project: WasmWinforms Gary R. Wheeler22-Nov-21 13:53 Gary R. Wheeler 22-Nov-21 13:53
 Re: Cursed Project: WasmWinforms den2k8822-Nov-21 21:46 den2k88 22-Nov-21 21:46
 Re: Cursed Project: WasmWinforms Eddy Vluggen23-Nov-21 13:52 Eddy Vluggen 23-Nov-21 13:52
 Odd Behavior With gethostbyname Rick York4-Oct-21 19:57 Rick York 4-Oct-21 19:57
 Re: Odd Behavior With gethostbyname Peter_in_27804-Oct-21 20:08 Peter_in_2780 4-Oct-21 20:08
 Re: Odd Behavior With gethostbyname YahiaEQ5-Oct-21 21:12 YahiaEQ 5-Oct-21 21:12
 Re: Odd Behavior With gethostbyname englebart1-Sep-22 15:37 englebart 1-Sep-22 15:37
 Reversing a logical ( OR ) albert_redditt2-Sep-21 11:31 albert_redditt 2-Sep-21 11:31
 I was told that there's no way to undo an OR as it loses value in the output.. I fumbled upon a formula , to undo an OR v1 or or_val = ( v1 xor or_val ) + ( v1 and or_val ) 100 or 5 = ( (100 or 5) xor 5 ) + ( 100 and 5 ) 100 or 10 = ( (100 or 10) xor 10 ) + ( 100 and 10 ) 255 or 12 = ( (255 or 12) xor 12 ) + ( 255 and 12 )
 Re: Reversing a logical ( OR ) PIEBALDconsult2-Sep-21 12:13 PIEBALDconsult 2-Sep-21 12:13
 Re: Reversing a logical ( OR ) Jon McKee2-Sep-21 13:11 Jon McKee 2-Sep-21 13:11
 Re: Reversing a logical ( OR ) Matias Lopez18-Oct-21 11:11 Matias Lopez 18-Oct-21 11:11
 Re: Reversing a logical ( OR ) Rick York2-Sep-21 14:43 Rick York 2-Sep-21 14:43
 Re: Reversing a logical ( OR ) jschell5-Sep-21 9:24 jschell 5-Sep-21 9:24
 Re: Reversing a logical ( OR ) James Curran24-Sep-21 5:53 James Curran 24-Sep-21 5:53
 Re: Reversing a logical ( OR ) harold aptroot5-Oct-21 21:09 harold aptroot 5-Oct-21 21:09
 Re: Reversing a logical ( OR ) Phil Hodgkins5-Oct-21 22:28 Phil Hodgkins 5-Oct-21 22:28
 Re: Reversing a logical ( OR ) Rob Grainger14-Oct-21 10:06 Rob Grainger 14-Oct-21 10:06
 Re: Reversing a logical ( OR ) Richard Deeming14-Oct-21 23:17 Richard Deeming 14-Oct-21 23:17
 That's one way to do it Kent Sharkey17-Aug-21 10:21 Kent Sharkey 17-Aug-21 10:21
 Re: That's one way to do it Mike Hankey17-Aug-21 10:38 Mike Hankey 17-Aug-21 10:38
 Re: That's one way to do it PIEBALDconsult17-Aug-21 10:50 PIEBALDconsult 17-Aug-21 10:50
 Re: That's one way to do it Jon McKee17-Aug-21 11:18 Jon McKee 17-Aug-21 11:18
 Re: That's one way to do it den2k885-Oct-21 21:17 den2k88 5-Oct-21 21:17
 Re: That's one way to do it Dan Neely29-Nov-21 3:23 Dan Neely 29-Nov-21 3:23
 Re: That's one way to do it Jon McKee17-Aug-21 11:10 Jon McKee 17-Aug-21 11:10
 Last Visit: 31-Dec-99 18:00     Last Update: 19-May-24 1:34 Refresh ᐊ Prev1...27282930313233343536 Next ᐅ

General    News    Suggestion    Question    Bug    Answer    Joke    Praise    Rant    Admin

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