Function - Method for sorting an array of structures. Prize 10$ - page 7

 
Artyom Trishkin:

1) For you it's a couple dozens of obscure lines.
But for me it means dozens of working days, which were entirely spent for localization of detected problems, their reproduction, description, search for workarounds, and don't forget about re-testing upon release of a new build and report, so that nothing was lost...


2) About asking for improvements:

Bugs, bugs, questions

Sergey Dzyublik, 2019.05.23 13:52

Suggestions:
"Allow the ArrayCopy function to copy classes and "complex" structures, similar to how structures provide deep copy functionality for any type of object".


3) About sharing the work we've done:

Bugs, bugs, questions

Sergey Dzyublik, 2017.11.05 13:08

Problem: there is a year of freelancing, different non-standard tricks with WinApi etc... useful for community.
But I don't see the point in spending time to find them, process them, put them into kodobase - 0 profit.

Suggestion: provide the "Thank You" button in kodobase, through which you can thank the author for the provided code.
The money goes to MQL account, in turn MQ deducts a certain percentage for the service provided.

 
Sergey Dzyublik:

1) For you it is a couple of dozens of obscure strings.
But for me - dozens of working days, which wholly spent on the localization of detected problems, their reproduction, description, search for workarounds, as well do not forget about re-testing after the release of a new build and report creation, what would not get lost...


2) About asking for improvements:


3) About sharing your work:

  1. I won't say incomprehensible, but irrelevant. Excuse me, but who is forcing you? Did someone order you to do all this? Or by yourself? If you did it yourself, of your own free will, then why are you complaining - no one has forced you.
  2. That's good. I saw it. Sometimes the developers see better why there is a ban on this or that "improvement". And it happens for a number of reasons that the average "user" cannot guess.
  3. It's probably more useful to have them gathering dust on a shelf, they'll fade into oblivion faster. And the name is the same profit.
    Somewhere here on the forum you have already written "Think deeper".
 

Who would have doubted it. Anything uncomfortable to read is deleted.

Only a select few are allowed to speak out. The correctness of a statement is judged by the moderator depending on the mood and the weather.

Talk to yourselves.

 
Artyom Trishkin:
  1. I won't say incomprehensible, but irrelevant. Excuse me, but who is forcing you to do this? Did someone order you to do all this? Or by yourself? If you did it yourself, of your own free will, then why are you complaining - no one has forced you.
  2. That's good. I saw it. Sometimes developers see better why there is a ban on this or that "improvement". And it happens for a number of reasons that the average "user" cannot guess.
  3. The fact that you have them gathering dust on a shelf probably makes much more sense - they'll fade into oblivion faster. And the name is the same profit.
    Somewhere here on this forum you've already written "Think deeper".
  1. The man is trying to make this world a better place and he succeeds, for which he is grateful.
  2. -
  3. Honestly, if tomorrow Sergey will put in kodobase normal containers, with an iterator, with a macro that provides range-based for logic, what percentage of the local community will understand and appreciate it? And the time he's killed on it... That's why such things are promoted on pure enthusiasm, a teaspoon a year. And here the developers should attract people by a small or not so small kopeck, and then normal containers will appear and many other interesting things...
 

Vladimir Simakov:

Honestly, if Sergei were to put normal containers, with an iterator, with a macro that provides range-based for logic, what percentage of the local community would understand and appreciate it? And the time he's killed on it... That's why such things are promoted on pure enthusiasm, a teaspoon a year. And here the developers would have to attract people with a small or not so small kopeck, and then normal containers will appear and a lot more interesting things will happen...

all there is and everything works - write an article and get rewarded, surprisingly, Metaquotes is quite loyal to the subject of articles

or what are we talking about? an explosion of applause?

imho, "normality" of a program solution is something that cannot be evaluated, you can write about code brevity, readability, indian code, g...ocode trying to evaluate a creation but, imho, there is a reasonable criterion for evaluation - relevancy, but unfortunately, this evaluation will be available after publication.

Let him publish for free in the KB or write an article, "not show off like a girl".

 
Igor Makanu:

everything is there and everything works - write an article and get rewarded, surprisingly, Metacquotes is quite loyal to the subject matter of articles

or what are we talking about, an outburst of applause?

imho, "normality" of a program solution is something that cannot be evaluated, you can write about code brevity, readability, indian code, g...ocode trying to evaluate a creation, but, imho, there is a reasonable criterion for evaluation - relevancy, but unfortunately, this evaluation will be available after publication.

Let him publish for free in the KB or write an article, "not show off like a girl".

You should read the thread from the beginning, it seems you are judging by the last posts written not by Sergei.
 
Igor Makanu:

or what are we talking about, an outburst of applause?

About the fact that the people who replied on the topic and with a working code, were harassed on the spot.
Mentioned that he spent a lot of hours writing and testing, so does not lay out the extra plushies? Well, yes, cheapskate, should be banned to hell.

In general, everything was fine with the topic until a moderator came along with his view of the situation.

ps: strange, the second message was not deleted.

 

I've been reading the thread since day one.

the issue is resolved, but not as the topicstarter may use from his experience

about the "squeeze the code" - it's simple here - you either share or you don't share.... , also a moderator's "go to freelance" - last year I saw MQL5 issues in the thread ))))

If you do not remember, it's 2020, and 99% of solutions for elementary problems are freely available, while people come to the forum to save time or get the missing knowledge, but not for enlightening and enlightening stories with moral teachings... Which is what WE are doing now)))

 

Unfortunately now even the methods that fxsaber suggested don't work anymore.

And I'm looking for methods of sorting an array of structures. Does anyone have any working variants?

 
Vladimir Pastushak:

Unfortunately now even the methods that fxsaber suggested are no longer working.

And I'm looking for methods of sorting an array of structures. Does anyone have any working variants?

Personally, I've written myself a CStructWrapper class, inherited from CObject (CMyObject is actually the same, with additional debugging fields), and for sorting I use a standard function.

template <typename T>
class CStructWrapper:public CMyObject
{
protected:
   T  m_tObject;

public:
   CStructWrapper() {};
   CStructWrapper(T & tObj) { m_tObject = tObj; };
   ~CStructWrapper() {};

   // Копирование
   T CopyFrom(const T &tObj) { m_tObject = tObj; return (m_tObject); };
   T operator=(const T &tObj) { return (CopyFrom(tObj)); };
   T CopyFrom(const CStructWrapper<T> &tWObj) { m_tObject = tWObj.GetCoreObject(); return (m_tObject); };
   T operator=(const CStructWrapper<T> &tWObj) { return (CopyFrom(tWObj)); };

   // Возврат объекта   
   T GetCoreObject() const { return(m_tObject); };
};


If I need an array of structures, I declare a derived class based on this template. In it, I declare a function for comparing the necessary fields of the structure. And then - I use a standard class of an array of objects with sorting.

Created objects can be copied directly from structures using assignment operator. If necessary - I copy them.

Reason: