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; | |
var rnd = new Random(Guid.NewGuid().GetHashCode()); | |
Func<int, bool> predicat = x => x > 3; | |
var arr = new[] {1, 3, 7, 4, 5}; | |
var check = new bool[arr.Length]; | |
int count = arr.Length; | |
while(count > 0) | |
{ |
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.ComponentModel.DataAnnotations; | |
namespace ComponentModel.DataAnnotations | |
{ | |
/// <summary> | |
/// Реализация CompareTo в качестве атрибута валидации. | |
/// </summary> | |
public class CompareToAttribute : ValidationAttribute | |
{ |
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 | |
//Получение случайных числел | |
//Используем id проверенного человека с большим колличеством друзей | |
var friends_ids = API.friends.get({ user_id: 3972090, count: 10000 }); | |
var count_of_randoms = 2; | |
var rnd_ids = API.friends.get({ user_id: 3972090, order:"random", count: count_of_randoms }).items; | |
var rnd_values = []; | |
var i = 0; |