You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
I figured it out, it was the field shift in the structure, not the whole structure...
If the structure is a simple type, it should work.
Another nuance. I have proved that my algorithm works correctly. I printed out the values that I got after the function was executed. How well the other algorithms work is a mystery.
The checksum seems to prove correct though.
ZS. You did make one mistake when writing the function according to my solution, though:
My function is not
а
But thanks anyway.
ZS. You did make one mistake when writing the function according to my solution, though:
My function is not
а
in your code it's the same as
No, I didn't make a mistake, I corrected yours. Think well, what does your line do? It doesn't do anything. Just try and change it and you'll see. It will be the wrong checksum and the wrong size.
The result is exactly the same. There is no error.
Yes, it doesn't do anything. But it makes more sense with it. ))
in your code, it equals
Yes.
Yes.
Oh yeah, sorry.
I remembered.
Your code was taken from here.
Your line wasn't there and I remember that line I had to add to make it work properly.
But it makes more sense with it. ))
There's an extra mathematical operation in it. ))
Question. Why in this code, after changing the size of the array, it still prints the same as before the change?
This calls into question the validity of the checksum checking algorithms. So, when we calculate the checksum, we make a loop through the array that still keeps its previous elements?
I suggest checking the algorithms my way. By outputting an array of 20 values.
This will be a check for correctness, not speed.Question. Why in this code, after changing the size of the array, it still prints the same as before the change?
This calls into question the validity of the checksum checking algorithms. So, when we calculate the checksum, we make a loop through the array that still keeps its previous elements?
I suggest checking the algorithms my way. By outputting an array of 20 values.
This will be a test of correctness, not speed.I suggest a million, since there are a million in the test. Let all sit and compare))).
The checksum is not calculated correctly.
Check it yourself. It counts the elements that remain in the deleted part of the array.
Of course, this is not yet proof that the check is wrong, but there is already some doubt.
The checksum is calculated from the elements of that row:
And the last 6 elements were previously deletedby ArrayResize.
But the function still counts them anyway.