Jump to content

jgcode

LabVIEW Tools Network
  • Posts

    2,397
  • Joined

  • Last visited

  • Days Won

    66

Posts posted by jgcode

  1. It's a pity that my missus isn't a member of LAVA.

    I think I can help with that - stay tuned.

    Right, and I'm totally enthusiastic to see more of them - in general, custom controls (XControls or otherwise) is an area that's under represented in OpenG IMHO, and I'd love to see what people come up with as submissions.

    Here, here

  2. I think including more XControls in OpenG is a great idea - but I don't think that a separate XControl package is the right way to go: I prefer my XControls to be in the packages that their technologies support (eg: an IP address XControl in a networking package). That said, I'm open to others' ideas...

    OpenG accepts all types of re-use components as possible submissions.

    Crelf is correct (when is the man ever wrong?), it would be distributed by function-type (or part of an API) not by component-type (e.g. an X-controls only package).

  3. I agree with Neil here - I would start by learning encapsulation before moving onto inheritence and polymorphism.

    I learnt LVOOP by starting to use it in my projects for encapsulation, replacing code I would have otherwise passed around as clusters.

    I also worked through the shipping examples - they were helpful too.

  4. The real cool feature of Single Element Queues is that you can use them as a kind of global variable!

    It comes with an integrated semaphore mechanism which helps prevent race conditions (in fact it's the other way round: take a look at LV's semaphore VIs and you will see that they are using Qs internally).

    And it can help you to minimize data copies!

    Imagine you have an array of one million double value inside an SEQ and you want to read one element from it.

    Using the standard dequeue-enqueue mechanism will only make a copy of the extracted element, not of the complete array, since the array buffer can be reused.

    Reusing the buffer is only possible in Qs, not in notifiers, since in a notifier the data has to stay inside it in case another process wants to read it afterwards.

    Of course the same is true for "Preview Queue Element", so you should not use this if you only want to read a part of the data inside the SEQ.

    Wouldn't DVR's and IPE be better suited to this task (i.e. easier).

  5. If you feel the need for speed there is one more step you can take. It obfuscates the process a bit, but you can generate a lookup table which is indexed by the byte array. Simply put true at values which correspond to whitespace and index it.

    Here are the relative times after I integrated this VI into the test framework.

    post-10325-0-60690000-1314085367.png

    Very impressive speed increase.

    IMHO I don't think the obfuscation warrants not implementing it, we can add comments on the BD (your description above made enough sense to me to understand it straight away) and we can even made a support VI which creates the lookup and save that.

    So the question is - can anyone make it faster? :cool:

  6. Like Jon said.

    Of course, vip files are not editable using text editor due to checksum, but an opg file certainly would be updatable easily for newer versions... Not that I would do that: it would be faster to simply change the install requirements and repackage it as you suggest.

    As a side note we did that on the OpenG 4.x release to e.g. update a link to the new palette folder in some.ogp files.

    It worked just fine (and we had to do it this way rather than repackage for some other reasons).

  7. The idea of a creator is that I'm generating a new object, not modifying an existing one, so a class input terminal doesn't make sense. (The one exception is with plug-ins where the application needs to create an unknown child object from disk.)

    post-10325-0-94145800-1314058052_thumb.p

    The reason for the Class input terminal is so that a Child may call the Parent's Constructor as e.g. part of it's Constructor.

    It is not a Dynamic Dispatch input, but rather a Static input however, as it is LVOOP a Child will be passed out of the Parent's Constructor method if one is wired in.

  8. I have a similar version except that I use the Lexical Class comparison (which also sets my definition of white space). My guess (no hard data) is that it is a wee bit faster than the array search. Rearranging my code to match the above image gives me this.

    Note to all: it is more helpful to post VIs to this thread than snippets as CP and VI settings are lost.

    Nice one! - Yes ,the Lexical Class primitive is faster at searching than the Search Array primitive in this case.

    Below is the new proposed version.

    We will add you to the copyright for your contribution.

    Please post here or PM me your full name (or company name) and email address which is required for copyright.

    Trim New time is from VI above.

    post-10325-0-56877000-1314057094.png

    post-10325-0-20279700-1314057121_thumb.p

    Trim Whitespace NEW.vi

    I created a VI from Darin's snippet and tested it in the performance framework to get the above times:

    Trim Whitespace.zip

  9. But I think the second 0xD in the arrays needs to be a 0xB if it is considered a white-space

    In the array constant there is two D's! Is that right?

    Ha - just making sure you are all paying attention :shifty:

    (This is now just now personal taste, I always like to eliminate unnecessary bends and crossings if simple to do).

    Cheers!

    On the contrary, I like to code the index in the bottom LHS and the condition in the bottom RHS.

    However, I did try to do less bends on the last bit of code for you :)

    post-10325-0-64129000-1314001887_thumb.p

    ...(personally, I don't think 0xB and 0xC are...but that's probably a judgement call).

    This is inline with original OpenG version.

    Trim Whitespace.zip

  10. Thanks!

    I like the user interface in Opera. It is a little more intuitive and quicker to use. That said, I use both Chrome and Opera on my phone and Firefox and Chrome on my PC (I gave up on IE9).

    Cool.

    Firefox has some great add-ins some for web-development but I use Chrome exclusively because I just find it so fast (I view a lot of media in my browser).

    I have never really dug into Opera, maybe I should check it out more.

    Like you I gave up on IE a while ago too... lol.

  11. You wouldn't have to make a totally new package - once the functionality is confirmed in the new version, then you'd just need to update the old package to support the new version, right?

    I took François to mean that i.e. new version of the same package (therefore, new package).

    Does VIPM allow selection of different versions? Say, 2009 and 2010 only?

    This is an example of the options:

    post-10325-0-37199400-1313963804_thumb.p

  12. Hi David

    If interested, there is another thread running here that discusses mobile browsers and the new site.

    By the way, there seems to be a few people who prefer Opera.

    I use it for only when testing to check web page compatibly - but prefer Chrome for everything else (or forced to use Safari on iPhone).

    Why do people like using it?

    Cheers

    -JG

  13. Also, if people make a significant contribution, we should be sure to include them in the copyright notice, so they receive credit for helping.

    Will do.

    Another thought is that it would be helpful if the original post gets updated with status and decisions, so that people know what stage in the process things are at. For example, after the review process is over, it should be obvious that that review/comments period for a given proposal has ended.

    Done!

    I have added a Status to the top of the post.

    When the review is final, I will create a summary post and add a link in the OP under the Status.

    I will then lock the topic so there are no more posts, forming an archive for the review.

    As this change will be submitted (and consequently published as a package), any further discussion of the VI would warrant a new review for new changes.

  14. So I'm not a fan of the new color scheme, but I do loved the features of the mobile version of the site! Most of my interaction with LAVA is from the RSS feed, then the site through IE, but now Ki can do almost anything {including admin stuff) on my Droid X2 :-)

    Yer, the iPhone App has some Mod functions too.

    I accidentally deleted someones post (went to hit Quote but obviously missed!) but had to get to a PC to restore it.

×
×
  • Create New...

Important Information

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