Is it possible to get an approximation to a seed based on a finite sequence of pseudo random numbers?

StackOverflow https://stackoverflow.com/questions/2145554

  •  23-09-2019
  •  | 
  •  

문제

suppose I have some numbers that form a series for example: 652,328,1,254 and I want to get a seed that if I, for example, do

srand(my_seed);

I will get some kind of approximation with bounded error to my origonal sequence, when all numbers appearing in the same order.

도움이 되었습니까?

해결책

이 방법을 사용하여 일부 JavaScript를 호출 할 수 있습니다.

http://blogs.msdn.com/B / InfoPath / Archive / 2005 / 06 / 17 / 430347.aspx

호출 할 스크립트는 이와 같을 것입니다 (제거 할 버튼에 맞게 편집) :

<script type="text/javascript">

    function HideDeleteOption() 
    {
        try {
document.getElementById("Ribbon.ContextualTabs.InfoPathListDisplayTab.Manage.Controls.btnDelete-Medium").style.display = "none";
        }
        catch (ex) 
        {
        }
    }

    function HideEditDeleteOption() 
    {
        try {                
  document.getElementById("Ribbon.ContextualTabs.InfoPathListTab.Actions").style.display = "none"
        }
        catch (ex) 
        {
        }
    }

    setTimeout("HideDeleteOption();", 100);
    setTimeout("HideEditDeleteOption();", 100);
.

다른 팁

You can't have an error bound in general. Either your algorithm works or it doesn't. The reason for this is that a reasonable error bound is obviously much smaller that RAND_MAX. That in turn means that the the low bits are not as random as the higher bits. But a good PRNG makes certain that all bits are equally random.

Consider this slow but mathematically sound example of an RNG algorithm:

int rand() {
  state = AES_encrypt(state);
  return state % RAND_MAX;
}
void srand(int seed) {
  state = AES_encrypt(seed);
}

If you can find any significant correlation between the output sequence and the previous state, the AES algorithm should be considered broken.

Check out this question.

Like Justin says, it's possible to backtrack a linear congruent generator (which rand() implementations often are) when you have a sequence of generated numbers. I guess the problem is to know which one of the previous values is the original seed...

사용자 정의 양식 템플릿 사용자 지정 listfielditerator . 이렇게하면 양식이 렌더링되는 방식보다 완전한 Controle이 있고 Bewer의 코드에서 C #을 사용할 수 있습니다.

컨트롤은 형식 내에서 디스플레이에 대한 항목 필드를 열거하는 데 사용됩니다. 이 컨트롤은 % ProgramFiles % \ Common Files \ Microsoft Shared \ Web Server Extensions \ 14 \ 14 \ 템플릿 \ Contrypemlates 디렉토리에있는 % ProgramFiles.Ascx 파일에있는 DefaultTemplates.Ascx 파일에 정의 된 일련의 중첩 된 제어 템플릿을 통해 목록 항목 양식에 삽입됩니다.

Nice 자습서 사용자 정의 listfielditerator ~ http://msdn.microsoft.com/en-us/library /aa543922%28v=office.14%29.aspx "rel="nofollow "> 유효성 검사, 렌더링, 수영렬 etc

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top