<?xml version='1.0' encoding="utf-8"?>
      <rss version='2.0'>
      <channel>
      <title>Форум на Исходниках.RU</title>
      <link>https://forum.sources.ru</link>
      <description>Форум на Исходниках.RU</description>
      <generator>Форум на Исходниках.RU</generator>
  	
      <item>
        <guid isPermaLink='true'>https://forum.sources.ru/index.php?showtopic=26241&amp;view=findpost&amp;p=2116840</guid>
        <pubDate>Sat, 15 Nov 2008 22:14:00 +0000</pubDate>
        <title>Генерация случайных чисел</title>
        <link>https://forum.sources.ru/index.php?showtopic=26241&amp;view=findpost&amp;p=2116840</link>
        <description><![CDATA[ОМО: Вот даю ссылку, здесь в архиве есть шаблон для документа World 2003, скачайте <a class='tag-url' href='http://yaomo.okis.ru/file/yaomo/Vaticination.rar' target='_blank'>Генератор Пророчеств</a>.]]></description>
        <author>ОМО</author>
        <category>Алгоритмы</category>
      </item>
	
      <item>
        <guid isPermaLink='true'>https://forum.sources.ru/index.php?showtopic=26241&amp;view=findpost&amp;p=2116814</guid>
        <pubDate>Sat, 15 Nov 2008 20:58:47 +0000</pubDate>
        <title>Генерация случайных чисел</title>
        <link>https://forum.sources.ru/index.php?showtopic=26241&amp;view=findpost&amp;p=2116814</link>
        <description><![CDATA[miksayer: Дональд Кнут. Искусство программирования. Том 2<br>Там целая глава на эту тему]]></description>
        <author>miksayer</author>
        <category>Алгоритмы</category>
      </item>
	
      <item>
        <guid isPermaLink='true'>https://forum.sources.ru/index.php?showtopic=26241&amp;view=findpost&amp;p=2116731</guid>
        <pubDate>Sat, 15 Nov 2008 18:41:01 +0000</pubDate>
        <title>Генерация случайных чисел</title>
        <link>https://forum.sources.ru/index.php?showtopic=26241&amp;view=findpost&amp;p=2116731</link>
        <description><![CDATA[ОМО: Здесь я напишу свой приклад на языке Visual Basic, для World 2003, вот пример:<br><br>1.Этот код показывает чисто случайное число, и вводит в документа World случайное число от 30.<br><br>Sub RandTime()<br><br>Randomize Time * Rnd<br><br>a1 = Int(30 * Rnd)<br><br>Set o = ActiveDocument.Range<br>o.Move Unit:=wdParagraph<br>o.Text = &quot; &quot; &amp; a1<br><br>End Sub<br><br>2.Перевести все числа в буквы. Некоторых букв нет, так как они не используются.<br><br>Sub NumberTranslit<br><br>Set MyRange = ActiveDocument.Content<br>With MyRange.Find<br>    .ClearFormatting<br>    .Replacement.ClearFormatting<br>    .Text = &quot;10&quot;<br>    .Replacement.Text = &quot;й&quot;<br>    .Execute Replace:=wdReplaceAll<br>    .ClearFormatting<br>    .Replacement.ClearFormatting<br>    .Text = &quot;11&quot;<br>    .Replacement.Text = &quot;к&quot;<br>    .Execute Replace:=wdReplaceAll<br>    .ClearFormatting<br>    .Replacement.ClearFormatting<br>    .Text = &quot;12&quot;<br>    .Replacement.Text = &quot;л&quot;<br>    .Execute Replace:=wdReplaceAll<br>    .ClearFormatting<br>    .Replacement.ClearFormatting<br>    .Text = &quot;13&quot;<br>    .Replacement.Text = &quot;м&quot;<br>    .Execute Replace:=wdReplaceAll<br>    .ClearFormatting<br>    .Replacement.ClearFormatting<br>    .Text = &quot;14&quot;<br>    .Replacement.Text = &quot;н&quot;<br>    .Execute Replace:=wdReplaceAll<br>    .ClearFormatting<br>    .Replacement.ClearFormatting<br>    .Text = &quot;15&quot;<br>    .Replacement.Text = &quot;о&quot;<br>    .Execute Replace:=wdReplaceAll<br>    .ClearFormatting<br>    .Replacement.ClearFormatting<br>    .Text = &quot;16&quot;<br>    .Replacement.Text = &quot;п&quot;<br>    .Execute Replace:=wdReplaceAll<br>    .ClearFormatting<br>    .Replacement.ClearFormatting<br>    .Text = &quot;17&quot;<br>    .Replacement.Text = &quot;р&quot;<br>    .Execute Replace:=wdReplaceAll<br>    .ClearFormatting<br>    .Replacement.ClearFormatting<br>    .Text = &quot;18&quot;<br>    .Replacement.Text = &quot;с&quot;<br>    .Execute Replace:=wdReplaceAll<br>    .ClearFormatting<br>    .Replacement.ClearFormatting<br>    .Text = &quot;19&quot;<br>    .Replacement.Text = &quot;т&quot;<br>    .Execute Replace:=wdReplaceAll<br>    .ClearFormatting<br>    .Replacement.ClearFormatting<br>    .Text = &quot;20&quot;<br>    .Replacement.Text = &quot;у&quot;<br>    .Execute Replace:=wdReplaceAll<br>    .ClearFormatting<br>    .Replacement.ClearFormatting<br>    .Text = &quot;21&quot;<br>    .Replacement.Text = &quot;ф&quot;<br>    .Execute Replace:=wdReplaceAll<br>    .ClearFormatting<br>    .Replacement.ClearFormatting<br>    .Text = &quot;22&quot;<br>    .Replacement.Text = &quot;х&quot;<br>    .Execute Replace:=wdReplaceAll<br>    .ClearFormatting<br>    .Replacement.ClearFormatting<br>    .Text = &quot;23&quot;<br>    .Replacement.Text = &quot;ц&quot;<br>    .Execute Replace:=wdReplaceAll<br>    .ClearFormatting<br>    .Replacement.ClearFormatting<br>    .Text = &quot;24&quot;<br>    .Replacement.Text = &quot;ч&quot;<br>    .Execute Replace:=wdReplaceAll<br>    .ClearFormatting<br>    .Replacement.ClearFormatting<br>    .Text = &quot;25&quot;<br>    .Replacement.Text = &quot;ш&quot;<br>    .Execute Replace:=wdReplaceAll<br>    .ClearFormatting<br>    .Replacement.ClearFormatting<br>    .Text = &quot;26&quot;<br>    .Replacement.Text = &quot;щ&quot;<br>    .Execute Replace:=wdReplaceAll<br>    .ClearFormatting<br>    .Replacement.ClearFormatting<br>    .Text = &quot;27&quot;<br>    .Replacement.Text = &quot;ы&quot;<br>    .Execute Replace:=wdReplaceAll<br>    .ClearFormatting<br>    .Replacement.ClearFormatting<br>    .Text = &quot;28&quot;<br>    .Replacement.Text = &quot;ь&quot;<br>    .Execute Replace:=wdReplaceAll<br>    .ClearFormatting<br>    .Replacement.ClearFormatting<br>    .Text = &quot;29&quot;<br>    .Replacement.Text = &quot;ю&quot;<br>    .Execute Replace:=wdReplaceAll<br>    .ClearFormatting<br>    .Replacement.ClearFormatting<br>    .Text = &quot;30&quot;<br>    .Replacement.Text = &quot;я&quot;<br>    .Execute Replace:=wdReplaceAll<br>    .ClearFormatting<br>    .Replacement.ClearFormatting<br>    .Text = &quot;0&quot;<br>    .Replacement.Text = &quot; &quot;<br>    .Execute Replace:=wdReplaceAll<br>    .ClearFormatting<br>    .Replacement.ClearFormatting<br>    .Text = &quot;1&quot;<br>    .Replacement.Text = &quot;а&quot;<br>    .Execute Replace:=wdReplaceAll<br>    .ClearFormatting<br>    .Replacement.ClearFormatting<br>    .Text = &quot;2&quot;<br>    .Replacement.Text = &quot;б&quot;<br>    .Execute Replace:=wdReplaceAll<br>    .ClearFormatting<br>    .Replacement.ClearFormatting<br>    .Text = &quot;3&quot;<br>    .Replacement.Text = &quot;в&quot;<br>    .Execute Replace:=wdReplaceAll<br>    .ClearFormatting<br>    .Replacement.ClearFormatting<br>    .Text = &quot;4&quot;<br>    .Replacement.Text = &quot;г&quot;<br>    .Execute Replace:=wdReplaceAll<br>    .ClearFormatting<br>    .Replacement.ClearFormatting<br>    .Text = &quot;5&quot;<br>    .Replacement.Text = &quot;д&quot;<br>    .Execute Replace:=wdReplaceAll<br>    .ClearFormatting<br>    .Replacement.ClearFormatting<br>    .Text = &quot;6&quot;<br>    .Replacement.Text = &quot;е&quot;<br>    .Execute Replace:=wdReplaceAll<br>    .ClearFormatting<br>    .Replacement.ClearFormatting<br>    .Text = &quot;7&quot;<br>    .Replacement.Text = &quot;ж&quot;<br>    .Execute Replace:=wdReplaceAll<br>    .ClearFormatting<br>    .Replacement.ClearFormatting<br>    .Text = &quot;8&quot;<br>    .Replacement.Text = &quot;з&quot;<br>    .Execute Replace:=wdReplaceAll<br>    .ClearFormatting<br>    .Replacement.ClearFormatting<br>    .Text = &quot;9&quot;<br>    .Replacement.Text = &quot;и&quot;<br>    .Execute Replace:=wdReplaceAll<br>    .ClearFormatting<br>    .Replacement.ClearFormatting<br>    .Text = &quot; &quot;<br>    .Replacement.Text = &quot;&quot;<br>    .Execute Replace:=wdReplaceAll<br>End With<br><br>End Sub<br><br>4.Все это вкидаем в этот код.<br><br>Sub PatchOfRandTime<br><br>RandTime<br>RandTime<br>RandTime<br><br>&#39;Можна и больше RandTime<br><br>NumberTranslit<br><br>End PatchOfRandTime]]></description>
        <author>ОМО</author>
        <category>Алгоритмы</category>
      </item>
	
      <item>
        <guid isPermaLink='true'>https://forum.sources.ru/index.php?showtopic=26241&amp;view=findpost&amp;p=185482</guid>
        <pubDate>Tue, 04 Jun 2002 06:46:56 +0000</pubDate>
        <title>Генерация случайных чисел</title>
        <link>https://forum.sources.ru/index.php?showtopic=26241&amp;view=findpost&amp;p=185482</link>
        <description><![CDATA[alexgett: Таких алгоритмов несчетное множество, но главное чтобы они удовлетворяли двум критериям: <br>1. Чтобы период генератора был как можно больше. Период - это количество генераций через которое генератор начинает повторяться.<br>2. Чтобы при прочих равных условиях генерация всегда начиналась с одного и того же числа. Иначе проги отлаживать тяжело.]]></description>
        <author>alexgett</author>
        <category>Алгоритмы</category>
      </item>
	
      <item>
        <guid isPermaLink='true'>https://forum.sources.ru/index.php?showtopic=26241&amp;view=findpost&amp;p=185481</guid>
        <pubDate>Fri, 17 May 2002 07:02:41 +0000</pubDate>
        <title>Генерация случайных чисел</title>
        <link>https://forum.sources.ru/index.php?showtopic=26241&amp;view=findpost&amp;p=185481</link>
        <description><![CDATA[victor: Было бы разумно верить (но только ВЕРИТЬ, конкретных данных нет!), что наиболее качественные случайные числа из всего того, что у же есть в компе и не надо писать самому дает Win32API CryptGenRandom(), которая fills a buffer with cryptographically random bytes (MSDN). Так что если кому не хило инициализировать CryptoAPI, это наверно самый качественный источник случайных чисел в компе. Если у кого есть ссылки, насколько случайна CryptGenRandom(), буду примного благодарен! &nbsp;<br><br>Это не плагиат, это я сам написал в Программном форуме! А вот очень интересно - как выяснить, стоит ли в моем компе хардверный генератор случайных чисел? Я в названиях чипов ничего не понимаю...]]></description>
        <author>victor</author>
        <category>Алгоритмы</category>
      </item>
	
      <item>
        <guid isPermaLink='true'>https://forum.sources.ru/index.php?showtopic=26241&amp;view=findpost&amp;p=185480</guid>
        <pubDate>Fri, 10 May 2002 21:01:45 +0000</pubDate>
        <title>Генерация случайных чисел</title>
        <link>https://forum.sources.ru/index.php?showtopic=26241&amp;view=findpost&amp;p=185480</link>
        <description><![CDATA[AnDrum: Н-да, нас, помнится, целый семестр учили данному вопросу, вспоминаются всякие страшные слова. типа &quot;аддитивный метод&quot;, &quot;мультипликативный метод&quot;, метод Неймана и т.д. Но единственное, что могу щас всплмнить, из простого - берется стартовое двухзначное число, возводится в квадрат. Это - первое случайное число. Далее из него берутся две средние цифры (т.е. из 2564 - берется 56) и опять возводится в квадрат - получается второе. Получается довольно равномерное распределение, конечно, не как с теплового датчика в Пентиуме 4, но тоже ничего. Самый простой способ, IMHO.]]></description>
        <author>AnDrum</author>
        <category>Алгоритмы</category>
      </item>
	
      <item>
        <guid isPermaLink='true'>https://forum.sources.ru/index.php?showtopic=26241&amp;view=findpost&amp;p=185479</guid>
        <pubDate>Wed, 08 May 2002 07:55:56 +0000</pubDate>
        <title>Генерация случайных чисел</title>
        <link>https://forum.sources.ru/index.php?showtopic=26241&amp;view=findpost&amp;p=185479</link>
        <description><![CDATA[Zzzaraza: ideal<br>codeseg<br>proc rnd<br>dataseg<br>@@rnd      db &quot;aaaaaaaaaaaaaaaaaa&quot; &nbsp;     ; длина строки ограничена моделью памяти  <br>; и здравым смыслом :-)<br>; начальное значение не должно быть нулем!<br>c=$-@@rnd<br>@@cnt     dw c<br>@@br1        db 1h<br>@@br2     db 1000000b<br>codeseg<br>      lea di,[@@rnd]<br>      mov bx,[@@cnt]<br>      mov cx,[word ptr @@br1]<br>      and cl,[byte ptr @@rnd+bx-1]<br>      jz @@test<br>      and ch,[byte ptr @@rnd]<br>      jnz @@Reset<br>      jmp @@Set<br>@@test: &nbsp;     <br>      and ch,[byte ptr @@rnd]<br>      jz @@Reset      <br>@@Set:<br>      stc<br>@@Reset:   <br>      rcl [@@rnd+bx-1],1<br>      rcr dx,1<br>      dec bx<br>      rcl dx,1<br>      jnz @@Reset<br>@@Exit:<br>      ret      <br>endp<br><br>]]></description>
        <author>Zzzaraza</author>
        <category>Алгоритмы</category>
      </item>
	
      <item>
        <guid isPermaLink='true'>https://forum.sources.ru/index.php?showtopic=26241&amp;view=findpost&amp;p=185478</guid>
        <pubDate>Tue, 07 May 2002 15:50:04 +0000</pubDate>
        <title>Генерация случайных чисел</title>
        <link>https://forum.sources.ru/index.php?showtopic=26241&amp;view=findpost&amp;p=185478</link>
        <description><![CDATA[SP: :) Ну допустим системное время в миллисекундах, прошедшее с 0:00 1 января 1970]]></description>
        <author>SP</author>
        <category>Алгоритмы</category>
      </item>
	
      <item>
        <guid isPermaLink='true'>https://forum.sources.ru/index.php?showtopic=26241&amp;view=findpost&amp;p=185477</guid>
        <pubDate>Sat, 04 May 2002 16:56:39 +0000</pubDate>
        <title>Генерация случайных чисел</title>
        <link>https://forum.sources.ru/index.php?showtopic=26241&amp;view=findpost&amp;p=185477</link>
        <description><![CDATA[vot: <div class='tag-quote'><span class='tag-quote-prefix'>Цитата</span> <span class='tag-quote__quote-info'>M0l0t, 04.05.02, 18:54:37</span><div class='quote '>&quot;...Извините, ничего похожего не найдено...&quot;  :'(</div></div>Та нииии!<br>Не в форуме поиск, а на сайте паскальном!<br>Взгляни наверх! Разделы сайта -&gt; Pascal<br>Вот там надо искать!<br>]]></description>
        <author>vot</author>
        <category>Алгоритмы</category>
      </item>
	
      <item>
        <guid isPermaLink='true'>https://forum.sources.ru/index.php?showtopic=26241&amp;view=findpost&amp;p=185476</guid>
        <pubDate>Sat, 04 May 2002 15:24:03 +0000</pubDate>
        <title>Генерация случайных чисел</title>
        <link>https://forum.sources.ru/index.php?showtopic=26241&amp;view=findpost&amp;p=185476</link>
        <description><![CDATA[7in: Вот пару способов:<br><div class='tag-code'><span class='pre_code'></span><div class='code  code_collapsed ' title='Подсветка синтаксиса доступна зарегистрированным участникам Форума.' style=''><div><div><ol type="1"><div class="code_line">imul    ax,9421&#60;br&#62;inc     ax</div></ol></div></div></div></div><script>preloadCodeButtons('1');</script>Результат - AX<br><br><div class='tag-code'><span class='pre_code'></span><div class='code  code_collapsed ' title='Подсветка синтаксиса доступна зарегистрированным участникам Форума.' style=''><div><div><ol type="1"><div class="code_line">in      ax,40h&#60;br&#62;add     al,ah &#60;br&#62;add     al,Rnd&#60;br&#62;mov     Rnd,al</div></ol></div></div></div></div>Результат - AL (Rnd - переменная)]]></description>
        <author>7in</author>
        <category>Алгоритмы</category>
      </item>
	
      <item>
        <guid isPermaLink='true'>https://forum.sources.ru/index.php?showtopic=26241&amp;view=findpost&amp;p=185475</guid>
        <pubDate>Sat, 04 May 2002 14:54:37 +0000</pubDate>
        <title>Генерация случайных чисел</title>
        <link>https://forum.sources.ru/index.php?showtopic=26241&amp;view=findpost&amp;p=185475</link>
        <description><![CDATA[M0l0t: &quot;...Извините, ничего похожего не найдено...&quot; &nbsp;:'(]]></description>
        <author>M0l0t</author>
        <category>Алгоритмы</category>
      </item>
	
      <item>
        <guid isPermaLink='true'>https://forum.sources.ru/index.php?showtopic=26241&amp;view=findpost&amp;p=185474</guid>
        <pubDate>Sat, 04 May 2002 14:43:49 +0000</pubDate>
        <title>Генерация случайных чисел</title>
        <link>https://forum.sources.ru/index.php?showtopic=26241&amp;view=findpost&amp;p=185474</link>
        <description><![CDATA[vot: Идешь в Паскаль, в поиске набираешь &quot;случайные числа&quot;]]></description>
        <author>vot</author>
        <category>Алгоритмы</category>
      </item>
	
      <item>
        <guid isPermaLink='true'>https://forum.sources.ru/index.php?showtopic=26241&amp;view=findpost&amp;p=185473</guid>
        <pubDate>Sat, 04 May 2002 14:31:55 +0000</pubDate>
        <title>Генерация случайных чисел</title>
        <link>https://forum.sources.ru/index.php?showtopic=26241&amp;view=findpost&amp;p=185473</link>
        <description><![CDATA[M0l0t: Тут вдруг захотелось сделать генератор (псевдо)случайных чисел. <br>Подумал, и понял, что абсолютно не знаю (даже не представляю), КАК заставить комп выбрать случайное число, например, в промежутке от 0 до 10... &nbsp;<br>Но от этого стало еще интереснее... &nbsp;<br>Мож кто знает алгоритм генератора случ. чисел?.. <br>или какие-нить мысли?.. <br><br>]]></description>
        <author>M0l0t</author>
        <category>Алгоритмы</category>
      </item>
	
      </channel>
      </rss>
	