08-20-2010 07:57 AM
Imaginitive nonesense provided as a suggested solution to reset the 2nd LED
Not sure if this is a Rube Goldberg code or simply nonsense...
Found here: http://forums.ni.com/t5/LabVIEW/Simple-LED-question-from-a-beginner/m-p/1221974#M520877
08-20-2010 11:00 AM
@Ray.R wrote:
Imaginitive nonesense provided as a suggested solution to reset the 2nd LED
Not sure if this is a Rube Goldberg code or simply nonsense...
Haha I can't tell if they were joking around or if that was a serious proposed solution.
I think that beats the 'is boolean true?' trick.
08-20-2010 11:05 AM
And as long as the led 1 is true, how much CPU are we using?
"My computer is running really slow..."
Rob
08-20-2010 11:38 AM
LOL!! Good observation. It may be a good code to slow down the computer. I forgot to mention that benefit.. 😄
09-12-2010 12:48 PM - edited 09-12-2010 12:50 PM
The Sudoku solver posted here has a pretty front panel, but the code could probably be reduced to 10% of the current monstrosity of locals and stacked sequences.
Here's a quick example:
We need to copy a 9x9 Array to a different 9x9 Array. Here's an animation showing the current hard way and a possible alternative. 😄
09-29-2010 12:55 AM - edited 09-29-2010 12:56 AM
There are many ways to get the local IP address, here are two versions of varying complexity...
(The top version was spotted here).
(This was actually one problems at the 2010 NI week speed coding challenge. I wonder how long the upper versions would have taken to code from scratch :D))
Note also that the upper version is actually broken under Windows 7, because we would need to search for "IPv4 Address" and make some other adjustments.
10-05-2010 03:53 PM - edited 10-05-2010 03:54 PM
A common eyesore is the manipulation of paths via string operations. Why????
This particular example is also dangerous, because it will break on different OS where the delimiter is NOT "\".
10-05-2010 04:25 PM
10-09-2010 10:02 AM - edited 10-09-2010 10:03 AM
The art of indexing!
To get the first three elements of a given row, we can use either:
10-11-2010 03:42 AM
@broken Arrow wrote:
To sequentially index an array, so many people wire sequential numbers to individual Index Array functions rather than just expanding the function. I see it all the time, even by experienced wire slingers.
OK - What is wrong with that? If you want really quick traceability of a wire halfway down a large index array function that you are then going to bundle after performing an operation on it, coming back to the code in 6 months time it's really useful to see which index is connected to which wire. Then you KNOW you have done what you intended or can see what the original programmer intended without having to count e.g. 13 lines down the index funtion which indexes 24 lines of a 1x36 array starting at index 5.
James