This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Collections.Generic; | |
public static class ImmediatelyReservoirShuffling | |
{ | |
/// <summary> | |
/// Резервуарное перетасовывание с возможностью регулировки ускорения. | |
/// Возвращает элементы лениво через yield. | |
/// </summary> | |
/// <param name="source">Исходная последовательность (поток данных).</param> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System.ComponentModel.DataAnnotations; | |
using System.Globalization; | |
namespace ComponentModel.DataAnnotations; | |
/// <summary> | |
/// Атрибут для сравнения значения свойства с другим свойством модели | |
/// </summary> | |
/// <remarks> | |
/// Примеры использования: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// VKScript rand implementation | |
// VK API random in widget | |
// ## Генератор псевдослучайных чисел через Friends API ## | |
// Получаем полный список друзей (для эталонного порядка) | |
// Используем стабильный аккаунт с большим количеством друзей | |
var friends_ids = API.friends.get({ user_id: 3972090, count: 10000 }); // user_id можно заменить на другой | |
// Количество случайных значений (для выбора категории и элемента) |