How std::random_device generate non-deterministic random numbers? [closed] - c++

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 3 years ago.
Improve this question
Why std::random_device generate non-deterministic random numbers? What is the seed in this generator? It's not a time, so what?

It is not specified. Implementation is supposed to provide suitable ways of doing this, and usually they would recourse to OS-provided tools.
For example, on Linux there are /dev/[u]random devices which will provide entropy from a system state.

Related

how to generrate array of integers (exact same every time)? [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 6 years ago.
Improve this question
I am trying to generate array of integers within specific limit using random number generator but I want exact same array every time .
Seed your generator with the same seed value every time and it will produce the same sequence of numbers (true for most generators).

Turning a string that contains a equation into an integer [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 6 years ago.
Improve this question
I would like to be able to convert a string such as "(5+6)*6" and get the resulting integer from that equation. It is important that it starts out as a string.
You can use library fastmathparser for c++.
In link is example how use this library.
If you really want write alone this parser, I recomended use Shunting-yard algorithm

how to implement any genetic ant finding food in Push,Clojush,Clojure? [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 7 years ago.
Improve this question
I am trying to use Push,Clojush,Clojure to implement an ant finding food in a 2d map, but I am not sure how to represent map? Could someone give me a example? Thank you.
You have a whole implementation of an ant simulation in Clojure at https://github.com/juliangamble/clojure-ants-simulation
To your specific question, it uses a vector of vectors:
https://github.com/juliangamble/clojure-ants-simulation/blob/master/src/ants.clj#L36

How do programmers add huge values such as those seen in RC5/RC6 encryption [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 7 years ago.
Improve this question
So as part of RC6 encryption, the key size can be up to 256 bytes and operations are performed on the key throughout the encryption process. How do programmers store such huge values and perform operations on them? Specifically in C++?

Roslyn C# Code Generator [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 8 years ago.
Improve this question
I want to write a compiler or code generator that will read CI from compiled C# code assembly and return all the classes together with entire syntax tree.
How can I do this using Roslyn?
No, you cannot. Roslyn cannot take a compiled assembly and convert that back into source code. It's a compiler, not a decompiler.