D
D
devilus2014-10-19 13:59:04
JavaScript
devilus, 2014-10-19 13:59:04

How to get such a sequence of numbers?

It is necessary to obtain a practical infinite series of numbers from a number.
Actually, you need to recreate the algorithm in JavaScript.
Example: There is a number 72201 from which the series 0, 6, 10, 12 was obtained.
UPD:
I assume that a cycle was originally used there.
Now I'm trying to deobfuscate the original code. I think this one will give an impetus to understanding this algorithm
. UPD:
The true number is 72021

Answer the question

In order to leave comments, you need to log in

8 answer(s)
D
devilus, 2014-10-19
@devilus

After many attempts at deobfuscation, the code that generated the following sequence was still revealed:

var p = 72021; //исходное число
function saqa(a) {
  return (Math.floor(Math.sin(a) * 4294967296) & 65535) / 65536;
};
var q = [];
for (var i = 0; i < 500; i += 2) {
  var s = saqa(p + i);
  if (s < 0.15 && q.length < 4) {
    q.push(s < 0.03 ? '<b>' + (i / 2) + '</b>' : (i / 2))
  };
};
console.log(q);

PS Thank you all so much ;-)

X
xmoonlight, 2014-10-19
@xmoonlight

72201
[5]=0
[1]-[5]=7-1=6
6+[2]+[3]=6+2+2=10
10+2*[5]=10+2=12
normal ?)

K
KorsaR-ZN, 2014-10-19
@KorsaR-ZN

1. Show the original code that makes such a series.
2. Do you have more information? i.e. what is it for, from what area, etc.
When answering the first two points, it will be much easier to help you, without this it is like poking a finger into the sky.
Because the sequence could be obtained, somehow, some tricky calculations, or permutations of numbers, or according to some distribution law, in general, there are a cloud of options ... but there are no examples and information :(

P
Puma Thailand, 2016-11-24
@bushart

Yes, no one decided, work the old way, in the worst case, you will go into the shadows.

J
Jacob E, 2016-11-24
@Zifix

There is an option to open a bank account where they do not require you to sign each time.

S
Sergey, 2016-11-25
@begemot_sun

My remark does not concern upwork. But still.
At one time, in the contract with the client, he wrote:
"Paying the invoice means the complete acceptance of the work by the customer, without any claims."
That now allows me to simply draw invoices for the client and send them to the bank when the money arrives.
That. no signed acts by the customer are required.
Very comfortably

M
Mikhail Neverov, 2016-12-07
@StivenLH

It all depends on the currency control in your bank.
I talked with the guys in Modula (Modulbank) for a long time on this topic - and they generally sorted it out for me why, even with all the moronic errors in the new Cos (Confirmation of Services) - it can and should be used.
Here are excerpts from the correspondence:
1) To the question of whether it is possible in the old way:
"...I understand you, now we are working according to the new rules from upwork. Namely:
Upwork has made changes to documents that can be generated when working through their system. .."
2) In response to a remark about the inconvenience of the approach
"... yes, they did not finalize the documents, there is little space for filling in the details. But this did not become a problem)"
3) In response to concerns about the legitimacy of the current version of CoS
"... Well, yes, they have mistakes ... Only from the point of view of a set of documents, this option is correct. Therefore, I think we can leave these documents with flaws for now, and when they finalize the content, just replace it.
"..Yes, you are right, in fact. It's just that for now we have to work as is, we hope that soon everything will be brought into line. The papers themselves do not go to the Central Bank, there are documents that we fill out on their basis. So we'll just replace them later."
Yes, at first you need to get a little worn out and fill out 5 docks, but then for each conclusion - just change the dates in the PDF of the act, print, scan and send. By the way - there are online services with convenient work with pdf, there you can merge the scan and pdf in 30 seconds and send it to the bank.

T
Think With Your Head, 2017-02-18
@thinkbrain2

I don’t know how relevant - here is the current instruction https://support.upwork.com/hc/en-us/articles/22710...
that is, you can work the old way

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question