class ProfOrg
{
private Union _union;
public ProfOrg(Union union)
{
_union = union;
}
public void AddEvent(UnionEvent unionEvent)
{
_union.Events.Add(unionEvent);
}
}
class Union
{
private ProfOrg _profOrg;
private List<UnionEvent> _events;
public List<UnionEvent> Events { get { return _events; } }
public ProfOrg ProfOrg { get{ return _profOrg; }
public Union()
{
events = new List<UnionEvent>();
profOrg = new ProfOrg(this);
}
}
var array = new List<int> { 1, 2, 3, 4, 5, 6, 7, 8, 9 };
Console.WriteLine(string.Join(" ", array));
var last = array.Last(); //берем последний элемент
array.Remove(last); //удаляем его
array.Insert(0, last); //и добавляем в начало, все элементы сдвигаются и, соответственно, меняют четность позиции
Console.WriteLine(string.Join(" ", array));
var array = new List<int> { 1, 2, 3, 4, 5, 6, 7, 8, 9 };
Console.WriteLine(string.Join(" ", array));
for (int i = 0; i < array.Count - 1; i += 2)
{
//Меняем соседние элементы местами
array[i] ^= array[i + 1];
array[i + 1] ^= array[i];
array[i] ^= array[i + 1];
}
Console.WriteLine(string.Join(" ", array));
string[] words = { "Hello", "World!" };
(from word in words from letter in word select letter)
.ToList().ForEach(Console.WriteLine);
string[] words = { "Hello", "World!" };
foreach(var letter in (from word in words
from letter in word
select letter))
Console.WriteLine(letter);
string[] words = { "Привет", "мир"};
foreach(var word in words)
{
foreach(var letter in word)
Console.WriteLine(letter);
Console.WriteLine();
}
$("body").on('click', '[href*="#"]', function(e){
var fixed_offset = 100;
$('html,body').stop().animate({ scrollTop: $(this.hash).offset().top - fixed_offset }, 1000);
e.preventDefault();
});
Options +FollowSymLinks
IndexIgnore */*
RewriteEngine on
RewriteCond %{REQUEST_URI} !^/(web)
RewriteRule ^assets/(.*)$ /web/assets/$1 [L]
RewriteRule ^css/(.*)$ web/css/$1 [L]
RewriteRule ^js/(.*)$ web/js/$1 [L]
RewriteRule ^images/(.*)$ web/images/$1 [L]
RewriteRule (.*) /web/$1
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /web/index.php
'baseUrl'=> '',