Jump to content

ShaunR

Members
  • Posts

    4,883
  • Joined

  • Days Won

    296

Everything posted by ShaunR

  1. No-eyed-deer. This is purely a mismatch in the URI which chrome resricts by default (firefox, Safari and explorer don't exhibit this behaviour). I have only had this problem with websockets since I have never had the need to send cookies from labview. So I guess if your cookie issue works in the other browsers but not in chrome, then maybe it will solve it- you tell me
  2. I noticed that you had this in your JS I'm guessing this comment is because you get a x-server script error when using chrome to access a "file://" URI (i.e a local file rather than an "http://" URI). You can override this limitation by launching chrome with the command-line switch "-allow-file-access-from-files". You should then be able to connect after opening an html file on the local file system without an error.
  3. This is a simple example of the sort of thing I do with initilising/launching sub processes. The top example is fully synchronous and will launch the vi and wait until it gets the feedback from that VI before proceding to the next. The bottom one is the sort of thing I do mostly since it launches and initialises all the vis and then just waits until it gets the responses back. You can make it as complicated as you wish (check the responses rather than just waiting for a set number as I have shown or "gathering" them in a while loop instead of a for loop) however I think you can see the pattern. You will notice I am not talking about a "controller" here because it depends where you are using this. Generally, the UI will talk to a controller (you may have more than one e.g IO controller or sequence engine) and the controller will use this to launch its sub vis.
  4. I quite like the first comment from the link that Phillip posted
  5. "Fairness Doctrine"? Never heard of it (can't look it up on Wikipedia either )
  6. That is a misnomer (and a common one) since foreign sites are not bound by US laws. The only thing realistically that can be achieved (as they do in Thailand) is restrict access to those sites from US governed territories. Good luck with extradition on SOPA grounds too. For example. In the UK they have introduced a law that any business web site must provide a notice that you will be setting cookies on a users machine and only do so with their consent (opt-in). Does it apply to NI sites in the US? Nope. Does the US care? Nope. I get really tired of the "Axis of Evil" arguments to stir up nationalism (not directed at you, just it's always the justification for anything unpopular both here in the UK and in the US). Politicians can no longer promise us dreams, so they promise protection from nightmares. It's the cold war mentality that really belongs in the 20th century and has done nothing for a safer world. Rather, it has ridden rough-shot over civil rights because we have believed it.
  7. I find it a bit bizarre that the link you posted keeps saying "even those in the U.S". It is a proposed U.S. law, is it not? Therefore it is "Only in the U.S". But this is just the tip of the iceberg IMHO. It's not about IP or copyright. It is about control over the information to the masses and the excuse is IP/copyright. The quicker the US and Europe gets rid of it's NeoCons. The happier everyone will be.
  8. Usually, each "module" will have it's own command queue and they will all use a common "status" queue rather than separate queues to feedback to the master. The thing to bear in mind is the topology. Queues are "Many-to-one". So for the commands, you can have many modules/controllers/whatever placing commands on that one modules queue. In reverse, you also have a "many-to-one", but now it is many modules placing status info on the controllers queue. Another way is to use a single "Control" notifier (a notifier is a "One-to Many") for the modules and each module filters the command sent. This has the advantage that you can "broadcast" to all modules things like Start, Stop, Pause etc which are global to all modules, but still enable defined commands for single modules which the module responds to. It has the downside that you can only have 1 command in the pipe at any-one time so for sequencing you have to arrange for some other mechanism. But the difference in this case is responsibility. The module is responsible for actioning the messages (shutting down, starting up etc) and the "Controller" just becomes the orchestrator. This is what I term "Autonomous Modules" and greatly simplifies the upper hierarchy at the expense of more complicated modules. You can also use a combination of both. for example, I may have a command "Queue" but broadcast back information via a notifier (great for UI stuff)
  9. I haven't had any certifications for about 10 years now. There's plenty of code and entire applications I've written out there if people wish to judge my abilities (or not as the case may be). CVs and certs are no substitute for "been there, done that, look at the code". However, in the absence of such, they are the only measure.
  10. To me it kinda makes sense. It is a symptom of having no way to destroy an object. The by-val way of creating a pseudo-destroy method is as you describe in No3 since you can clear the array which is a surrogate for destroying the objects. You then pray to the great god MemMan and hope that the garbage collection will get rid of allocations (or at the very least, reused). The by-ref is a way of achieving the same pseudo-destroy, since you can destroy a ref (and just ignore what it returns). The difference in the destroying is that the owner is responsible for destroying the objects, rather than a function of whatever object you want to get rid of. In LV it's not a biggie because you have no control over de-allocations anyway, but in other languages you may have several different de-allocation procedures to satisfy that the owner may not be aware of.
  11. Well. I'm no expert on US law (nor care much about it) but to qualify for safe harbour policies in most countries, they require some sort of condemnation and clear statements that it will not be tolerated (this is what the T&Cs are for). Nope. They can't do what they like with it. Their T&Cs only allow them to admonish distribution. You are not granting any license, that requires a document.
  12. It is available in 2009. It just isn't in any of the palettes (it's in vi.lib/utility/traverseref.llb).
  13. I think that would be a pain. It should be sufficient that they have to check a checkbox that they agree to the sites T&Cs for software uploads (of course, the T&Cs have to exist ;p ). The fact is that stopping it all is neigh on impossible (thinking about posting other peoples code). It's just the "arse covering" for Lavag that's important since it will be the first in line for the lawsuits if you do get a shirty uploader.
  14. Ton. For your path example, I would have gone for something like this. Has one other advantage over the BFI method in that paths like "c:\temp\//test//text.txt" where you have multiple separators back-to-back, are also catered for. Slightly more complicated than it needed to be really, due to the regex escape char being the same as the windows path char. I'm sure this can be improved upon though.
  15. Show me. The string version (which I already have - see Passa Mak for a rough idea how) is about 15 VIs. If you can do even just a chart in less than 50 hand made VIs with LVPOOP I'd be surprised (It got ugly very quickly, but maybe you have a better grasp on an approach without re-inventing every property and method for every object in LV). Back OT. I see what you are saying with a JSON object (I think). By adding an extra layer of abstraction, you can take advantage of the dynamic despatch so that type checking isn't required. But inside it is still the same. You still need to create the individual objects (from the string as said), but unless you are prepared to re-code every property and method that LV has in your child classes, you are no better off apart from if you want to substitute an XML version instead. It will still be a monster. If you can type check the object, then you can reduce the properties and methods of your children and get away from the linear escalation of the VIs.
  16. Lets say you have a JSON stream where each element is an object (which is what JSON is). So it comes in via TCPIP and you create an object of that type using simple string/case detection so that it can be shoehorned into a class ASAP. Depending on what that type is (histogram, chart,value etc) you need to check it's type and do the appropriate processing for that class (e.g. update a chart display).Sooner or later you will need to test the equivalence (since you can't just wire a class to a case structure as you can with strings). To do this you would use the "typeof" in JavaScript if roles were reversed. I'm all ears on a "better" architecture apart from (of course) not using classes at all - where it becomes trivial.
  17. I'm not a fan of the "brute force and ignorance" method of resolving stuff. I think it is an anti-pattern. If you know what the options are, then there is nearly always a way of detecting and using the correct method/case without incurring the potentially long pauses whilst the VI "searches" for the correct solution. I do. however, use it for exiting a VI early if, for example, I'm doing a linear search and find the answer. In your example, wouldn't the "Scan String For Tokens" allow you to find which path separator is being used and choose accordingly? Try Multiple Type-casts.
  18. Exactly! But I bet the latter never happens and you are in danger of the copyright holder coming-a-chasing with "Shaftya & Yermom Lawyers inc" But how many times have people posted someone elses code in the vein of "I found this by joe bloggs to be really useful and will solve your problem".
  19. Or if the actual path gives problems, maybe use the Get LV Class Info. lol. Posted too soon. It's going to be hard to beat 0 ms
  20. Not when it comes to licenses. Asking for permission is free. Forgiveness is very expensive and involves lawyers. PM me with your email address, and we'll sort out a commercial usage waiver to remove all doubt.
  21. http://lavag.org/topic/14001-get-system-power-state/
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.