If you have a problem or need to report a bug please email : support@dsprobotics.com
There are 3 sections to this support area:
DOWNLOADS: access to product manuals, support files and drivers
HELP & INFORMATION: tutorials and example files for learning or finding pre-made modules for your projects
USER FORUMS: meet with other users and exchange ideas, you can also get help and assistance here
NEW REGISTRATIONS - please contact us if you wish to register on the forum
Users are reminded of the forum rules they sign up to which prohibits any activity that violates any laws including posting material covered by copyright
finding duplicates in array
10 posts
• Page 1 of 1
finding duplicates in array
How to automatically find/remove duplicated entries witin an array?
Can be with sorting, but... doable without sorting?
Can be with sorting, but... doable without sorting?
Need to take a break? I have something right for you.
Feel free to donate. Thank you for your contribution.
Feel free to donate. Thank you for your contribution.
- tester
- Posts: 1786
- Joined: Wed Jan 18, 2012 10:52 pm
- Location: Poland, internet
Re: finding duplicates in array
As a module with input and output to connect something - it could help. Could you make it?
Need to take a break? I have something right for you.
Feel free to donate. Thank you for your contribution.
Feel free to donate. Thank you for your contribution.
- tester
- Posts: 1786
- Joined: Wed Jan 18, 2012 10:52 pm
- Location: Poland, internet
Re: finding duplicates in array
tester wrote:As a module with input and output to connect something - it could help. Could you make it?
Not following you here
The link I posted was to highlight the 'UNIQ' command.
'Returns a new array by removing duplicate values in self.'
There are several variations too.
Unless I'm misunderstanding
- RJHollins
- Posts: 1571
- Joined: Thu Mar 08, 2012 7:58 pm
Re: finding duplicates in array
I have no idea how to compile working ruby module in FS from that thing. I'm not kidding I really don't get the ruby part yet, and my head is offline on that.
- Attachments
-
- and-then-what.fsm
- (327 Bytes) Downloaded 910 times
Need to take a break? I have something right for you.
Feel free to donate. Thank you for your contribution.
Feel free to donate. Thank you for your contribution.
- tester
- Posts: 1786
- Joined: Wed Jan 18, 2012 10:52 pm
- Location: Poland, internet
Re: finding duplicates in array
just that
- Attachments
-
- and-then-what.fsm
- (385 Bytes) Downloaded 917 times
-
Nubeat7 - Posts: 1347
- Joined: Sat Apr 14, 2012 9:59 am
- Location: Vienna
Re: finding duplicates in array
Now you killeed me...
It looks that my thinking is just too complex. I tried various things (none worked of course). But not this one.
Thanks!
It looks that my thinking is just too complex. I tried various things (none worked of course). But not this one.
Thanks!
Need to take a break? I have something right for you.
Feel free to donate. Thank you for your contribution.
Feel free to donate. Thank you for your contribution.
- tester
- Posts: 1786
- Joined: Wed Jan 18, 2012 10:52 pm
- Location: Poland, internet
Re: finding duplicates in array
Yes - those API documents are "auto-created" from the Ruby interpreter's source code, so they take some getting used to!
The thing to look for is the "#=>" - that's not any kind of special Ruby code; "#" just means that the rest of the line is a programmer's comment (i.e. ignored by Ruby). But in the doc's they often write "#=>" to mean "Here's the result of that example".
The thing to look for is the "#=>" - that's not any kind of special Ruby code; "#" just means that the rest of the line is a programmer's comment (i.e. ignored by Ruby). But in the doc's they often write "#=>" to mean "Here's the result of that example".
All schematics/modules I post are free for all to use - but a credit is always polite!
Don't stagnate, mutate to create!
Don't stagnate, mutate to create!
-
trogluddite - Posts: 1730
- Joined: Fri Oct 22, 2010 12:46 am
- Location: Yorkshire, UK
Re: finding duplicates in array
Yep, and every language has their own scheme of marking and explaining things. These rubyish examples should be converted into FS pieces of simple codes, with addidional simple comments on that. Like the old SM-style user packs. I read these descriptions, and make very big eyes, trying to figure out what the writer of that wanted to say....
Need to take a break? I have something right for you.
Feel free to donate. Thank you for your contribution.
Feel free to donate. Thank you for your contribution.
- tester
- Posts: 1786
- Joined: Wed Jan 18, 2012 10:52 pm
- Location: Poland, internet
Re: finding duplicates in array
I hear ya !
When I look for a RUBY solution, I hit GOOGLE to find related topics.
If there is a related solution, some of them can be 'way out there', and other RUBY guys will post different solutions or optimizations. It can be most helpful, AND confusing ... but at least it gets me started.
Just typing in the code in FS is helpful to a nube as me ... it forces me to think about the syntax and logic. I'm still at a snails pace understanding ... but a little success spurs me on
Just got to keep at it. There are definately things RUBY brings to a possible solution that would take many primitives to replicate. It can really clean up a schematic. It may not be for everything, but when I have gone the RUBY route ... it was very much worth it.
Thanks for all the Guys here who help with ALL of this FS stuff ... my project ideas have become a reality
When I look for a RUBY solution, I hit GOOGLE to find related topics.
If there is a related solution, some of them can be 'way out there', and other RUBY guys will post different solutions or optimizations. It can be most helpful, AND confusing ... but at least it gets me started.
Just typing in the code in FS is helpful to a nube as me ... it forces me to think about the syntax and logic. I'm still at a snails pace understanding ... but a little success spurs me on
Just got to keep at it. There are definately things RUBY brings to a possible solution that would take many primitives to replicate. It can really clean up a schematic. It may not be for everything, but when I have gone the RUBY route ... it was very much worth it.
Thanks for all the Guys here who help with ALL of this FS stuff ... my project ideas have become a reality
- RJHollins
- Posts: 1571
- Joined: Thu Mar 08, 2012 7:58 pm
10 posts
• Page 1 of 1
Who is online
Users browsing this forum: No registered users and 105 guests