| ofs | hex dump | ascii |
|---|
| 0000 | 89 50 4e 47 0d 0a 1a 0a 00 00 00 0d 49 48 44 52 00 00 01 90 00 00 02 14 08 06 00 00 00 34 76 7a | .PNG........IHDR.............4vz |
| 0020 | 9f 00 00 00 01 73 52 47 42 00 ae ce 1c e9 00 00 00 04 67 41 4d 41 00 00 b1 8f 0b fc 61 05 00 00 | .....sRGB.........gAMA......a... |
| 0040 | 00 09 70 48 59 73 00 00 40 f3 00 00 40 f3 01 72 63 37 d4 00 00 00 58 74 45 58 74 43 6f 70 79 72 | ..pHYs..@...@..rc7....XtEXtCopyr |
| 0060 | 69 67 68 74 00 43 43 30 20 50 75 62 6c 69 63 20 44 6f 6d 61 69 6e 20 44 65 64 69 63 61 74 69 6f | ight.CC0.Public.Domain.Dedicatio |
| 0080 | 6e 20 68 74 74 70 3a 2f 2f 63 72 65 61 74 69 76 65 63 6f 6d 6d 6f 6e 73 2e 6f 72 67 2f 70 75 62 | n.http://creativecommons.org/pub |
| 00a0 | 6c 69 63 64 6f 6d 61 69 6e 2f 7a 65 72 6f 2f 31 2e 30 2f c6 e3 bd f9 00 00 00 19 74 45 58 74 53 | licdomain/zero/1.0/........tEXtS |
| 00c0 | 6f 66 74 77 61 72 65 00 70 61 69 6e 74 2e 6e 65 74 20 34 2e 30 2e 31 37 33 6e 9f 63 00 00 ff 1c | oftware.paint.net.4.0.173n.c.... |
| 00e0 | 49 44 41 54 78 5e ec 9d 07 b8 1d 55 d5 fe ff 7e d2 41 9a 28 20 0a 02 16 54 04 45 6c a8 14 bb a8 | IDATx^.....U...~.A.(....T.El.... |
| 0100 | 9f 15 fd ac a8 a4 dd f4 4a 7a 6e 7a 6f 90 84 54 4a 08 81 00 01 42 02 04 02 09 bd 88 22 8a 82 0a | ........Jznzo..TJ....B......"... |
| 0120 | 16 f0 fb 94 12 12 d2 fb 3d f3 7f d7 5a 7b ed d9 7b 66 cf 9c 39 f7 9e 5b 02 67 9e e7 7d 4e ca bd | ........=...Z{..{f..9..[.g..}N.. |
| 0140 | e7 cc ec b2 7e fb 5d 6b cf 9c ff 57 3b 6a 47 ed a8 1d b5 a3 76 d4 8e da 51 3b 6a 47 ed a8 1d b5 | ....~.]k...W;jG.....v...Q;jG.... |
| 0160 | a3 76 d4 8e da 51 3b 6a 47 ed a8 1d b5 a3 76 d4 8e da 51 3b 6a 47 ed a8 1d b5 a3 76 d4 8e da 51 | .v...Q;jG.....v...Q;jG.....v...Q |
| 0180 | 3b 6a 47 ed a8 1d b5 a3 76 d4 8e da 51 3b 6a 47 ed a8 1d b5 a3 76 d4 8e da 51 3b 6a 47 ed a8 1d | ;jG.....v...Q;jG.....v...Q;jG... |
| 01a0 | b5 a3 76 d4 8e da 51 3b 6a 47 ed a8 1d b5 a3 76 d4 8e da b1 f7 1e 17 5c 70 c3 9b 3b 74 a8 3f a8 | ..v...Q;jG.....v.......\p..;t.?. |
| 01c0 | ae 6e dc 11 9d 3b d7 1f d3 bb f7 a8 77 75 ef 3e f2 bd bd 7a 8d fb 70 af ae a3 3f d1 ab db 88 73 | .n...;......wu.>...z..p...?....s |
| 01e0 | 7a 76 1b f5 e5 9e dd 46 7f b3 67 cf 91 df ef d9 73 d4 4f 7a 75 1f f5 cb 9e dd 47 77 c0 9f bb f4 | zv.....F..g.....s.Ozu.....Gw.... |
| 0200 | e8 31 ba 67 ef 9e a3 fa f6 ea 36 7a 60 af 1e a3 86 f4 ec 39 ba 1e af 23 7b f5 18 3d a6 77 cf 31 | .1.g......6z`......9...#{..=.w.1 |
| 0220 | 63 f1 3a ae 67 f7 31 13 43 a2 ff 33 3f 33 86 7e c7 fc ee 10 fc db 00 7e 4f bc 37 7d 06 7d 16 7d | c.:.g.1.C..3?3.~.......~O.7}.}.} |
| 0240 | 66 af ee 63 7e 2c e7 80 73 c1 39 d1 b9 f1 39 d2 b9 f6 1a fb 1e 39 f7 31 47 d3 b5 d0 35 d1 b5 99 | f..c~,..s.9...9......9.1G...5... |
| 0260 | cb ac 1d b5 a3 76 d4 8e da e1 1e 51 14 bd a9 be be 7e 1f 68 bf 5e bd ea 8f ec d9 73 dc 49 08 ae | .....v.....Q.....~.h.^.....s.I.. |
| 0280 | 67 20 88 7e 89 02 2d 82 ee 45 3d 7a 8c ea dd ab c7 98 e1 3d bb 8f 9a d6 b3 c7 e8 05 f8 b7 1b 11 | g..~..-..E=z.......=............ |
| 02a0 | 98 57 41 8f f7 ec 31 ea af 08 d8 2f f4 ec 31 e6 5f f8 f3 ff e1 df fe 0d bd 68 d5 53 35 c6 0a c1 | .WA...1..../..1._........h.S5... |
| 02c0 | dd 68 f4 4b 2d 2f f9 6c f7 7c ec 39 c6 e7 fc 6f b9 96 31 ff c2 df 71 6d 74 8d a3 1f 87 56 e1 fa | .h.K-/.l.|.9...o..1...qmt....V.. |
| 02e0 | 6f a0 36 a0 b6 a0 36 e9 d1 0d 6d 83 36 ea d9 6d cc f7 bb 77 1f f1 25 e8 e3 fd 00 cf de bd eb 8f | o.6...6...m.6..m...w..%......... |
| 0300 | pre { line-height: 125%; }
td.linenos .normal { color: inherit; background-color: transparent; padding-left: 5px; padding-right: 5px; }
span.linenos { color: inherit; background-color: transparent; padding-left: 5px; padding-right: 5px; }
td.linenos .special { color: #000000; background-color: #ffffc0; padding-left: 5px; padding-right: 5px; }
span.linenos.special { color: #000000; background-color: #ffffc0; padding-left: 5px; padding-right: 5px; }
.highlight .hll { background-color: #ffffcc }
.highlight .c { color: #888888 } /* Comment */
.highlight .err { color: #a61717; background-color: #e3d2d2 } /* Error */
.highlight .k { color: #008800; font-weight: bold } /* Keyword */
.highlight .ch { color: #888888 } /* Comment.Hashbang */
.highlight .cm { color: #888888 } /* Comment.Multiline */
.highlight .cp { color: #cc0000; font-weight: bold } /* Comment.Preproc */
.highlight .cpf { color: #888888 } /* Comment.PreprocFile */
.highlight .c1 { color: #888888 } /* Comment.Single */
.highlight .cs { color: #cc0000; font-weight: bold; background-color: #fff0f0 } /* Comment.Special */
.highlight .gd { color: #000000; background-color: #ffdddd } /* Generic.Deleted */
.highlight .ge { font-style: italic } /* Generic.Emph */
.highlight .ges { font-weight: bold; font-style: italic } /* Generic.EmphStrong */
.highlight .gr { color: #aa0000 } /* Generic.Error */
.highlight .gh { color: #333333 } /* Generic.Heading */
.highlight .gi { color: #000000; background-color: #ddffdd } /* Generic.Inserted */
.highlight .go { color: #888888 } /* Generic.Output */
.highlight .gp { color: #555555 } /* Generic.Prompt */
.highlight .gs { font-weight: bold } /* Generic.Strong */
.highlight .gu { color: #666666 } /* Generic.Subheading */
.highlight .gt { color: #aa0000 } /* Generic.Traceback */
.highlight .kc { color: #008800; font-weight: bold } /* Keyword.Constant */
.highlight .kd { color: #008800; font-weight: bold } /* Keyword.Declaration */
.highlight .kn { color: #008800; font-weight: bold } /* Keyword.Namespace */
.highlight .kp { color: #008800 } /* Keyword.Pseudo */
.highlight .kr { color: #008800; font-weight: bold } /* Keyword.Reserved */
.highlight .kt { color: #888888; font-weight: bold } /* Keyword.Type */
.highlight .m { color: #0000DD; font-weight: bold } /* Literal.Number */
.highlight .s { color: #dd2200; background-color: #fff0f0 } /* Literal.String */
.highlight .na { color: #336699 } /* Name.Attribute */
.highlight .nb { color: #003388 } /* Name.Builtin */
.highlight .nc { color: #bb0066; font-weight: bold } /* Name.Class */
.highlight .no { color: #003366; font-weight: bold } /* Name.Constant */
.highlight .nd { color: #555555 } /* Name.Decorator */
.highlight .ne { color: #bb0066; font-weight: bold } /* Name.Exception */
.highlight .nf { color: #0066bb; font-weight: bold } /* Name.Function */
.highlight .nl { color: #336699; font-style: italic } /* Name.Label */
.highlight .nn { color: #bb0066; font-weight: bold } /* Name.Namespace */
.highlight .py { color: #336699; font-weight: bold } /* Name.Property */
.highlight .nt { color: #bb0066; font-weight: bold } /* Name.Tag */
.highlight .nv { color: #336699 } /* Name.Variable */
.highlight .ow { color: #008800 } /* Operator.Word */
.highlight .w { color: #bbbbbb } /* Text.Whitespace */
.highlight .mb { color: #0000DD; font-weight: bold } /* Literal.Number.Bin */
.highlight .mf { color: #0000DD; font-weight: bold } /* Literal.Number.Float */
.highlight .mh { color: #0000DD; font-weight: bold } /* Literal.Number.Hex */
.highlight .mi { color: #0000DD; font-weight: bold } /* Literal.Number.Integer */
.highlight .mo { color: #0000DD; font-weight: bold } /* Literal.Number.Oct */
.highlight .sa { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Affix */
.highlight .sb { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Backtick */
.highlight .sc { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Char */
.highlight .dl { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Delimiter */
.highlight .sd { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Doc */
.highlight .s2 { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Double */
.highlight .se { color: #0044dd; background-color: #fff0f0 } /* Literal.String.Escape */
.highlight .sh { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Heredoc */
.highlight .si { color: #3333bb; background-color: #fff0f0 } /* Literal.String.Interpol */
.highlight .sx { color: #22bb22; background-color: #f0fff0 } /* Literal.String.Other */
.highlight .sr { color: #008800; background-color: #fff0ff } /* Literal.String.Regex */
.highlight .s1 { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Single */
.highlight .ss { color: #aa6600; background-color: #fff0f0 } /* Literal.String.Symbol */
.highlight .bp { color: #003388 } /* Name.Builtin.Pseudo */
.highlight .fm { color: #0066bb; font-weight: bold } /* Name.Function.Magic */
.highlight .vc { color: #336699 } /* Name.Variable.Class */
.highlight .vg { color: #dd7700 } /* Name.Variable.Global */
.highlight .vi { color: #3333bb } /* Name.Variable.Instance */
.highlight .vm { color: #336699 } /* Name.Variable.Magic */
.highlight .il { color: #0000DD; font-weight: bold } /* Literal.Number.Integer.Long */// Copyright (c) AlphaSierraPapa for the SharpDevelop Team (for details please see \doc\copyright.txt)
// This code is distributed under the GNU LGPL (for details please see \doc\license.txt)
using System;
using System.Collections.Generic;
using System.Diagnostics;
namespace Tango.Scripting.Editors.Utils
{
/// <summary>
/// Double-ended queue.
/// </summary>
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Naming", "CA1710:IdentifiersShouldHaveCorrectSuffix")]
[Serializable]
public sealed class Deque<T> : ICollection<T>
{
T[] arr = Empty<T>.Array;
int size, head, tail;
/// <inheritdoc/>
public int Count {
get { return size; }
}
/// <inheritdoc/>
public void Clear()
{
arr = Empty<T>.Array;
size = 0;
head = 0;
tail = 0;
}
/// <summary>
/// Gets/Sets an element inside the deque.
/// </summary>
public T this[int index] {
get {
ThrowUtil.CheckInRangeInclusive(index, "index", 0, size - 1);
return arr[(head + index) % arr.Length];
}
set {
ThrowUtil.CheckInRangeInclusive(index, "index", 0, size - 1);
arr[(head + index) % arr.Length] = value;
}
}
/// <summary>
/// Adds an element to the end of the deque.
/// </summary>
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Naming", "CA1702:CompoundWordsShouldBeCasedCorrectly", MessageId = "PushBack")]
public void PushBack(T item)
{
if (size == arr.Length)
SetCapacity(Math.Max(4, arr.Length * 2));
arr[tail++] = item;
if (tail == arr.Length) tail = 0;
size++;
}
/// <summary>
/// Pops an element from the end of the deque.
/// </summary>
public T PopBack()
{
if (size == 0)
throw new InvalidOperationException();
if (tail == 0)
tail = arr.Length - 1;
else
tail--;
T val = arr[tail];
arr[tail] = default(T); // allow GC to collect the element
size--;
return val;
}
/// <summary>
/// Adds an element to the front of the deque.
/// </summary>
public void PushFront(T item)
{
if (size == arr.Length)
SetCapacity(Math.Max(4, arr.Length * 2));
if (head == 0)
head = arr.Length - 1;
else
head--;
arr[head] = item;
size++;
}
/// <summary>
/// Pops an element from the end of the deque.
/// </summary>
public T PopFront()
{
if (size == 0)
throw new InvalidOperationException();
T val = arr[head];
arr[head] = default(T); // allow GC to collect the element
head++;
if (head == arr.Length) head = 0;
size--;
return val;
}
void SetCapacity(int capacity)
{
T[] newArr = new T[capacity];
CopyTo(newArr, 0);
head = 0;
tail = (size == capacity) ? 0 : size;
arr = newArr;
}
/// <inheritdoc/>
public IEnumerator<T> GetEnumerator()
{
if (head < tail) {
for (int i = head; i < tail; i++)
yield return arr[i];
} else {
for (int i = head; i < arr.Length; i++)
yield return arr[i];
for (int i = 0; i < tail; i++)
yield return arr[i];
}
}
System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator()
{
return this.GetEnumerator();
}
bool ICollection<T>.IsReadOnly {
get { return false; }
}
void ICollection<T>.Add(T item)
{
PushBack(item);
}
/// <inheritdoc/>
public bool Contains(T item)
{
EqualityComparer<T> comparer = EqualityComparer<T>.Default;
foreach (T element in this)
if (comparer.Equals(item, element))
return true;
return false;
}
/// <inheritdoc/>
public void CopyTo(T[] array, int arrayIndex)
{
if (array == null)
throw new ArgumentNullException("array");
if (head < tail) {
Array.Copy(arr, head, array, arrayIndex, tail - head);
} else {
int num1 = arr.Length - head;
Array.Copy(arr, head, array, arrayIndex, num1);
Array.Copy(arr, 0, array, arrayIndex + num1, tail);
}
}
bool ICollection<T>.Remove(T item)
{
throw new NotSupportedException();
}
}
}