-
Posts
4,936 -
Joined
-
Days Won
304
Content Type
Profiles
Forums
Downloads
Gallery
Everything posted by ShaunR
-
Forgot all about your little project until I read Reading Json Just had another look (no errors now). I know it's in it's infancy, but I wasn't really sure how to use it if I wasn't using classes. Is the intention to only support classes?
- 7 replies
-
- serialization
- object persistence
-
(and 2 more)
Tagged with:
-
Intending to Use Event Structures to Manage "Pop Up" UIs, any warnings?
ShaunR replied to AlexA's topic in User Interface
I don't use refs at all The main reason I use named queues is that it is part of the message "routing". This is why queues are (IMHO) preferable under these particular circumstances since you don't miss messages and race conditions are alleviated (although not necessarily eliminated depending on your macro view). With queues you also have asynchronicity but you can also guarantee the order which, for control, is highly desirable.. Or you could begin sub-paneling (not quite sure if I'm understanding what this is correctly), send the shutdown and the sub-panel would appear then disappear as each element was removed (or you could flush it on the off chance it hasn't been enacted yet). I just think for this particular scenario, queues have many advantages over events, not least that you don't "lose" messages just because someone isn't listening. -
Intending to Use Event Structures to Manage "Pop Up" UIs, any warnings?
ShaunR replied to AlexA's topic in User Interface
Named queues But in a less confrontational aspect. The issue I have is with the idea of "stuffing". That you create a registration, maintain it and generate events, whilst not consuming. At least with a queue you can monitor the elements and even restrict the size (for the scenarios where you want to "stuff").. -
Intending to Use Event Structures to Manage "Pop Up" UIs, any warnings?
ShaunR replied to AlexA's topic in User Interface
Been there, done that; thrown it in the bin -
Intending to Use Event Structures to Manage "Pop Up" UIs, any warnings?
ShaunR replied to AlexA's topic in User Interface
So how is that any different from anything else (e.g.QE Messaging) except you can create memory leaks? -
Intending to Use Event Structures to Manage "Pop Up" UIs, any warnings?
ShaunR replied to AlexA's topic in User Interface
On the surface, it looks to me like an anti-pattern (maybe in the minority.....again....lol). The beauty of events is that you can fire them and they don't use resources unless there is something listening for them. That is one of their main advantages over queues This just seems to be trying to circumvent that feature to find a use (a singular use from what I can gather) and it doesn't really add anything to mitigate the drawbacks of events or, indeed, offer anything that cannot be achieved in other ways with more transparent foot-shooting opportunities. Can you give a real-world example where you might use it? -
Viewing Panel via Smart TV
ShaunR replied to Shazlan's topic in Remote Control, Monitoring and the Internet
Indeed. In fact, there are very few browsers now that do not support them. I've gone off Chrome at the moment though. Nothing to do with the features or the browser itself (which is arguably the best). More to do with it being so nosy and by default trying to track everything you do and put all your private info on their servers (as I found with my contacts list one day). Still. Not as bad as the iPhone. -
Does friendship force an item to load with the class library?
ShaunR replied to mje's topic in Object-Oriented Programming
Well. Consider you have a public function called "Calculate". This function ,amongst others, uses a "Check For Divide By Zero" private function. You can craft a test case that that can be applied to the public function that specifically supplies a calculation that will result (at some point) in a divide by zero. You are using your knowledge of the internal workings of the "Calculate" function to indirectly test the "Check For Divide By Zero" private function. This is "Grey-Box" testing. The major bonus to this approach is that your test case code can be generic (it only has to interface to the "Calculate" function) and just supply different calculations but test multiple paths through the private functions without having to create code for all-and-sundry. You can even do things like put thousands of your calculations in a file and just iterate through them, throwing them at the "Calculate" Function. The test code is not important, the tests data is what requires consideration and each piece of data can be crafted to test a path or target a specific private function within the public function. As an aside. The examples that ship with the SQLite API are, in fact, the test harnesses and provide 99% coverage of the API (not SQLite itself, by the way. that has it's own tests that the authors do). That is why the examples increase when there are new features -
Viewing Panel via Smart TV
ShaunR replied to Shazlan's topic in Remote Control, Monitoring and the Internet
Sweet! Any Android smartphone/Tablet (Like your Galaxy Tab)you can use Firefox, Safari, Azura, Opera Mini, Opera Mobile etc They all work with Websockets (as long as it is over a network rather than 3G). There is limited support in the Ice Cream 4.0 native browser but before that (Gingerbread etc) .... nope. iPhone/iPad uses Safari so that's not a problem. I'd be interested to find out more about the Bravia (what OS/browser etc). Sometimes websockets are supported but need enabling as they are off by default (like Opera). I think the issue with TVs will be purely down to being able to install apps if the native browser doesn't support them. So it looks like it's only the Sony Bravia that is the odd-one-out. I wonder also about the LG since most smart TV's have gone for either Linux or Android. Well. A bit more digging and it looks like the Bravia Smart TVs may be using Opera BRAVIA TV, Opera So it looks like that may be a go if you can enable it! N:B: I was mistaken earlier. Opera Mini doesn't support them but Opera Mobile does). -
Does friendship force an item to load with the class library?
ShaunR replied to mje's topic in Object-Oriented Programming
Well. There is white-box, grey-box and black-box testing. Testing the public interfaces is generally black-box (test the exposed functions without knowledge of the internal workings against a spec). Testing individual methods is generally white-box (full factorial testing with detailed understanding of the internal workings of the function). Testing public methods with specially considered test cases, crafted to exercise internal paths within the functions is grey-box (and also requires detailed knowledge of the internal workings). Positive black-box (i.e. test for what it should do) and negative grey-box (i.e test for what it shouldn't do) together will always give you the best test-cases vs coverage than any amount of white-box testing. If you want to write 3 times as much code to test as the original code and have a 95% confidence. Then black+white is the way forward. If you want to write a fraction of the original code in test cases and have a 90% confidence, then black+grey is the way (and you won't need to solve the problem ). -
LabVIEW Built Windows Applications - Preventing the "Not Responding" Label
ShaunR replied to mje's topic in LabVIEW General
Another thing you can do is set the subsystems execution system to something like "Other1" then dynamically launch it. This will force it into a different thread pool and the LV scheduler should do the rest. It will also give you better control over how much slice time it can consume by setting the different priorities (this assumes your DLL supports multi-threading and doesn't require the dreaded orange node). -
Symbio GDS unable to activate with community key
ShaunR replied to daal's topic in Object-Oriented Programming
Thanks Asbo. I just spat my coffee all over my keyboard -
Actually. There are more like 5 in total. Saphirs is fully commercial, mine is free for non-commercial and the others are free but generally have limited features and support on the various platforms (LabVIEW x64 for example). But all that is really for another thread (even though it is YOUR thread....lol).
-
Because a fast, self contained database is a superb and robust solution to many of LabVIEWs applications.
-
The commercial licencing is changing (check the site next week ). That won't stop you downloading and playing though.
-
Yup. The SQLite API For LabVIEW comes with an example of decimating a waveform in real-time with zooming.
-
Viewing Panel via Smart TV
ShaunR replied to Shazlan's topic in Remote Control, Monitoring and the Internet
OK. Sent. Have fun and let me know how you get on. -
Viewing Panel via Smart TV
ShaunR replied to Shazlan's topic in Remote Control, Monitoring and the Internet
Websockets are the technology and yes, both the Labsocket and the Websocket API For LabVIEW are 3rd party tools (although not the same - labsocket requires a STOMP server, I believe. Whereas the API is direct TCPIP so no server required). If you're interested, then I can PM you a link to the Websocket API live demo. You can then see if you can use it from a Sumsung Smart TV (because I would like to know too ). -
Viewing Panel via Smart TV
ShaunR replied to Shazlan's topic in Remote Control, Monitoring and the Internet
Apparently the Samsung 2012 models use a Maple browser which is Webkit based (Webkit supports websockets). There is a very brief comment of surprise on Google Groups that websockets are working so it could well be an option. -
Intending to Use Event Structures to Manage "Pop Up" UIs, any warnings?
ShaunR replied to AlexA's topic in User Interface
Yeah. I wasn't very clear in pointing out the caveats (and wasn't worded very well either-been up for 36 hrs already. I shouldn't really post). using_events_and_subpanels -
Intending to Use Event Structures to Manage "Pop Up" UIs, any warnings?
ShaunR replied to AlexA's topic in User Interface
The event structure. Events are handled in the owning vi. -
Viewing Panel via Smart TV
ShaunR replied to Shazlan's topic in Remote Control, Monitoring and the Internet
Websockets are only an option if the Samsung Browser supports them (or you can put a browser on there that does). -
Intending to Use Event Structures to Manage "Pop Up" UIs, any warnings?
ShaunR replied to AlexA's topic in User Interface
Can't think of any problems with what you have listed, but there are a couple that I can think of in terms of cons vs queues.. Cannot use them for subpanels (well, you can, but your events won't work). Cannot guarantee execution order (might not be a consideration for you). Cannot easily encapsulate (for the reason you mentioned about typdefs). -
Viewing Panel via Smart TV
ShaunR replied to Shazlan's topic in Remote Control, Monitoring and the Internet
Websockets? -
Releasing a queue doesn't destroy a queue unless the reference count falls to zero, you wire true to the "Force Destroy" input or all VIs that have references to the queue go out of memory (too many bullets in the gun to shoot yourself in the foot with IMHO). The obtain only returns a reference to a queue, not the queue itself (which can cause memory leaks). This means you have to be very aware of how many "obtains" to "releases" there are in your code and, if you pass the queue ref around to other VIs, ensure that you don't release it too many times and make the reference invalid. Since the VI obtains a new reference and releases it on every call if there is already a reference (which makes it atomic and ensures there is always 1 and only one ref), you only need to get rid of the last reference once you are finished with the queue completely and don't have to worry about matching release to obtains (i.e. it protects you from the ref count inadvertently falling to zero, vis going out of memory and invalidating a queue reference or leakage). The flush is purely so that when you destroy the queue you can see what was left in the queue (if anything). The upside to this is that you can throw the queue VI in any VI without all the wires and only need to destroy it once when you are finished with it (or, as I have used it in the example, to clear the queue).
- 74 replies
-
- qsm
- producer consumer
-
(and 1 more)
Tagged with: