04-11-2016 01:08 AM
@BowenM wrote:I just ran in to this gem while going through someone else's source code... I actually had to drop probes before I realized what he was doing with all of the multiplication.
Wow! Just ... Wow!
I found something even bigger that after some analysis (and referring to the filename) proved to be a HexString to number. That could be replaced with 2 or three blocks, if memory serves. 🙂
/Y
04-14-2016 03:55 PM - edited 04-14-2016 03:56 PM
The typical Select Function to choose True vs. False, or False vs. True.
But also timeout event structures that only execute once. (zero vs. infinite timeout). And 1 execution while loops that are based on an odd comparison of an inner For loop and its auto-indexed array of iteration values compared to an array of constants.
04-14-2016 05:16 PM - edited 04-14-2016 05:16 PM
What's the opposite of Rube Goldberg? A post that is reduced to a few unreadable pixels!
04-14-2016 05:49 PM
@altenbach wrote:What's the opposite of Rube Goldberg? A post that is reduced to a few unreadable pixels!
1/rube
04-15-2016 08:07 AM
@altenbach wrote:What's the opposite of Rube Goldberg? A post that is reduced to a few unreadable pixels!
To be fair, it probably was done that way to be nice to the people who skim the thread. It least NI always stores the original size: For example the links to the pictures show:
/t5/image/serverpage/image-id/181928i28E347BD044A009D/image-size/small?v=lz-1&px=200
/t5/image/serverpage/image-id/181929iDD5D2EEB10B9FB79/image-size/small?v=lz-1&px=200
/t5/image/serverpage/image-id/181931i35E41C43A1B8B755/image-size/small?v=lz-1&px=200
You can easily cut the /image-size/ part to the end off and get the full size of each
/t5/image/serverpage/image-id/181928i28E347BD044A009D
/t5/image/serverpage/image-id/181929iDD5D2EEB10B9FB79
/t5/image/serverpage/image-id/181931i35E41C43A1B8B755
"I won't be wronged. I won't be insulted. I won't be laid a-hand on. I don't do these things to other people, and I require the same from them." John Bernard Books
04-15-2016 08:13 AM
@bsvare wrote:
You can easily cut the /image-size/ part to the end off and get the full size of each
/t5/image/serverpage/image-id/181928i28E347BD044A009D
/t5/image/serverpage/image-id/181929iDD5D2EEB10B9FB79
/t5/image/serverpage/image-id/181931i35E41C43A1B8B755
That's really cool, I had no idea that you could do that.
04-15-2016 10:08 AM - edited 04-15-2016 10:17 AM
Typically, we can right-click an image...open image in new tab, and then easily zoom there. In this case, the "200" is retained and we need to edit the URL in the new tab to see the full size. That seems to be a browser or forum flaw. You would think that opening an image in a new tab or window should strip the formatting.
At least the forum should turn each picture into a link and show it full size when clicked (like over in the community). I would consider the current behavior a bug.
04-26-2016 03:51 PM
I happened upon this beauty today. I think I've seen a similar one in this thread.
05-07-2016 01:36 PM
Some ways to turn a path into an array of strings. Arguably some are simpler and more universal than others. :D)
05-10-2016 09:36 AM
With the permission of my intern: What do you do if you write a nice QMH program and then move it to RT, where there are no events? Of course: Generate User Events, every 200 ms or when the RIO gets around to it...
So how do we improve on that? Easy: We replace the data type of the User Event with Array, to make it more scalable.
Or we could get rid of the event structure altogether and queue in the top loop since the process is not time critical at all...