Click here to Skip to main content
15,891,943 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: How many values between 0 and 0? Pin
Stuart Dootson19-Dec-19 7:52
professionalStuart Dootson19-Dec-19 7:52 
GeneralRe: How many values between 0 and 0? Pin
raddevus19-Dec-19 8:24
mvaraddevus19-Dec-19 8:24 
GeneralRe: How many values between 0 and 0? Pin
Bohdan Stupak15-Feb-20 5:49
professionalBohdan Stupak15-Feb-20 5:49 
GeneralTo get a %age divide the number by the number of decimal places defined on the column Pin
CHill6013-Dec-19 1:20
mveCHill6013-Dec-19 1:20 
GeneralRe: To get a %age divide the number by the number of decimal places defined on the column Pin
phil.o13-Dec-19 1:38
professionalphil.o13-Dec-19 1:38 
GeneralRe: To get a %age divide the number by the number of decimal places defined on the column Pin
CHill6013-Dec-19 1:42
mveCHill6013-Dec-19 1:42 
GeneralRe: To get a %age divide the number by the number of decimal places defined on the column Pin
Marc Clifton13-Dec-19 2:39
mvaMarc Clifton13-Dec-19 2:39 
GeneralRe: To get a %age divide the number by the number of decimal places defined on the column Pin
Nelek13-Dec-19 3:04
protectorNelek13-Dec-19 3:04 
Marc Clifton wrote:
And yes, only in Financial Services. Roll eyes | :rolleyes:
I disagree...
In the Automation world, this is used pretty often.

I.E.

you get analog inputs i.e. [0, 10](V) transformed into decimal (depending on manufacturer or configurations 0 to 27658 or 0 to 32768)
to save data transferred into de bus (i.E. for the SCADA Visualization) is usual to send the int16 or Word and say in the panel, this variable contains 2 decimals (1234 = 12.34) or 4 decimals (1234 = 0.1234)
This is because the float / double would be 32 bits long, which means you save 2 bytes per variable using this method.
And this is still actual because (one of the reasons) the standard "Profi-Bus" speed is 1.5 mbit/s, saving that much bytes still helps.
M.D.V. Wink | ;)

If something has a solution... Why do we have to worry about?. If it has no solution... For what reason do we have to worry about?
Help me to understand what I'm saying, and I'll explain it better to you
Rating helpful answers is nice, but saying thanks can be even nicer.


modified 13-Dec-19 9:14am.

GeneralRe: To get a %age divide the number by the number of decimal places defined on the column Pin
Marc Clifton13-Dec-19 4:05
mvaMarc Clifton13-Dec-19 4:05 
GeneralRe: To get a %age divide the number by the number of decimal places defined on the column Pin
Nelek13-Dec-19 4:11
protectorNelek13-Dec-19 4:11 
GeneralRe: To get a %age divide the number by the number of decimal places defined on the column Pin
CHill6013-Dec-19 5:07
mveCHill6013-Dec-19 5:07 
GeneralRe: To get a %age divide the number by the number of decimal places defined on the column Pin
Nelek13-Dec-19 3:08
protectorNelek13-Dec-19 3:08 
GeneralRe: To get a %age divide the number by the number of decimal places defined on the column Pin
Tiger1250619-Dec-19 15:33
Tiger1250619-Dec-19 15:33 
GeneralRe: To get a %age divide the number by the number of decimal places defined on the column Pin
CHill6019-Dec-19 21:08
mveCHill6019-Dec-19 21:08 
GeneralDev time waster ala JSON dialect PinPopular
raddevus9-Dec-19 10:24
mvaraddevus9-Dec-19 10:24 
GeneralRe: Dev time waster ala JSON dialect Pin
Jon McKee9-Dec-19 13:13
professionalJon McKee9-Dec-19 13:13 
GeneralRe: Dev time waster ala JSON dialect Pin
raddevus10-Dec-19 3:32
mvaraddevus10-Dec-19 3:32 
GeneralRe: Dev time waster ala JSON dialect Pin
kmoorevs10-Dec-19 6:36
kmoorevs10-Dec-19 6:36 
GeneralRe: Dev time waster ala JSON dialect Pin
raddevus11-Dec-19 2:40
mvaraddevus11-Dec-19 2:40 
GeneralRe: Dev time waster ala JSON dialect Pin
Sander Rossel11-Dec-19 2:10
professionalSander Rossel11-Dec-19 2:10 
GeneralRe: Dev time waster ala JSON dialect Pin
raddevus11-Dec-19 2:46
mvaraddevus11-Dec-19 2:46 
GeneralRe: Dev time waster ala JSON dialect Pin
Sander Rossel11-Dec-19 3:42
professionalSander Rossel11-Dec-19 3:42 
GeneralRe: Dev time waster ala JSON dialect Pin
raddevus11-Dec-19 4:32
mvaraddevus11-Dec-19 4:32 
GeneralRe: Dev time waster ala JSON dialect Pin
Sander Rossel11-Dec-19 4:37
professionalSander Rossel11-Dec-19 4:37 
GeneralRe: Dev time waster ala JSON dialect Pin
F-ES Sitecore11-Dec-19 3:47
professionalF-ES Sitecore11-Dec-19 3:47 

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.