text:
#nullable disable
using System;
using System.Collections;
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;

namespace PasPasPas.Infrastructure.Utils {

    /// <summary>
    ///     A dictionary object that allows rapid hash lookups using keys, but also
    ///     maintains the key insertion order so that values can be retrieved by
    ///     key index.
    /// </summary>
    /// <remarks>
    ///     Similar to the way a DataColumn is indexed by column position and by column name, this
    ///     advanced dictionary construct allows for a very natural and robust handling of indexed
    ///     structured data.
    /// </remarks>
    [DebuggerDisplay("Count = {Count}")]
    public sealed class OrderedDictionary<TKey, TValue> : IOrderedDictionary<TKey, TValue> {

        private DelegateKeyedCollection<TKey, KeyValuePair<TKey, TValue>> _keyedCollection;

        /// <summary>
        ///     Gets or sets the value associated with the specified key.
        /// </summary>
        /// <param name="key">The key associated with the value to get or set.</param>
        public TValue this[TKey key] {
            get => GetValue(key);
            set => SetValue(key, value);
        }

        /// <summary>
        ///     Gets or sets the value at the specified index.
        /// </summary>
        /// <param name="index">The index of the value to get or set.</param>
        public TValue this[int index] {
            get => GetItem(index).Value;
            set => SetItem(index, value);
        }

        /// <summary>
        ///     Gets the number of items in the dictionary
        /// </summary>
        public int Count
            => _keyedCollection.Count;

        /// <summary>
        ///     Gets all the keys in the ordered dictionary in their proper order.
        /// </summary>
        public ICollection<TKey> Keys
            => _keyedCollection.Select(x => x.Key).ToList();

        /// <summary>
        ///     Gets all the values in the ordered dictionary in their proper order.
        /// </summary>
        public ICollection<TValue> Values
            => _keyedCollection.Select(x => x.Value).ToList();

        /// <summary>
        /// Gets the key comparer for this dictionary
        /// </summary>
        public IEqualityComparer<TKey> Comparer {
            get;
            private set;
        }

        /// <summary>
        ///     create a new ordered dictionary
        /// </summary>
        public OrderedDictionary()
            => Initialize();

        /// <summary>
        ///
        /// </summary>
        /// <param name="comparer"></param>
        public OrderedDictionary(IEqualityComparer<TKey> comparer)
            => Initialize(comparer);

        /// <summary>
        ///
        /// </summary>
        /// <param name="dictionary"></param>
        public OrderedDictionary(IOrderedDictionary<TKey, TValue> dictionary) {
            Initialize();
            foreach (var pair in dictionary) {
                _keyedCollection.Add(pair);
            }
        }

        /// <summary>
        ///
        /// </summary>
        /// <param name="dictionary"></param>
        /// <param name="comparer"></param>
        public OrderedDictionary(IOrderedDictionary<TKey, TValue> dictionary, IEqualityComparer<TKey> comparer) {
            Initialize(comparer);
            foreach (var pair in dictionary) {
                _keyedCollection.Add(pair);
            }
        }

        /// <summary>
        ///
        /// </summary>
        /// <param name="items"></param>
        public OrderedDictionary(IEnumerable<KeyValuePair<TKey, TValue>> items) {
            Initialize();
            foreach (var pair in items) {
                _keyedCollection.Add(pair);
            }
        }

        /// <summary>
        ///
        /// </summary>
        /// <param name="items"></param>
        /// <param name="comparer"></param>
        public OrderedDictionary(IEnumerable<KeyValuePair<TKey, TValue>> items, IEqualityComparer<TKey> comparer) {
            Initialize(comparer);
            foreach (var pair in items) {
                _keyedCollection.Add(pair);
            }
        }

        private void Initialize(IEqualityComparer<TKey> comparer = null) {
            Comparer = comparer;
            if (comparer != null) {
                _keyedCollection = new DelegateKeyedCollection<TKey, KeyValuePair<TKey, TValue>>(x => x.Key, comparer);
            }
            else {
                _keyedCollection = new DelegateKeyedCollection<TKey, KeyValuePair<TKey, TValue>>(x => x.Key);
            }
        }

        /// <summary>
        ///     Adds the specified key and value to the dictionary.
        /// </summary>
        /// <param name="key">The key of the element to add.</param>
        /// <param name="value">The value of the element to add.  The value can be null for reference types.</param>
        public void Add(TKey key, TValue value)
            => _keyedCollection.Add(new KeyValuePair<TKey, TValue>(key, value));

        /// <summary>
        /// Removes all keys and values from this object.
        /// </summary>
        public void Clear()
            => _keyedCollection.Clear();

        /// <summary>
        /// Inserts a new key-value pair at the index specified.
        /// </summary>
        /// <param name="index">The insertion index.  This value must be between 0 and the count of items in this object.</param>
        /// <param name="key">A unique key for the element to add</param>
        /// <param name="value">The value of the element to add.  Can be null for reference types.</param>
        public void Insert(int index, TKey key, TValue value) => _keyedCollection.Insert(index, new KeyValuePair<TKey, TValue>(key, value));

        /// <summary>
        /// Gets the index of the key specified.
        /// </summary>
        /// <param name="key">The key whose index will be located</param>
        /// <returns>Returns the index of the key specified if found.  Returns -1 if the key could not be located.</returns>
        public int IndexOf(TKey key) {
            if (_keyedCollection.Contains(key)) {
                return _keyedCollection.IndexOf(_keyedCollection[key]);
            }
            else {
                return -1;
            }
        }

        /// <summary>
        /// Determines whether this object contains the specified value.
        /// </summary>
        /// <param name="value">The value to locate in this object.</param>
        /// <returns>True if the value is found.  False otherwise.</returns>
        public bool ContainsValue(TValue value)
            => Values.Contains(value);

        /// <summary>
        /// Determines whether this object contains the specified value.
        /// </summary>
        /// <param name="value">The value to locate in this object.</param>
        /// <param name="comparer">The equality comparer used to locate the specified value in this object.</param>
        /// <returns>True if the value is found.  False otherwise.</returns>
        public bool ContainsValue(TValue value, IEqualityComparer<TValue> comparer)
            => Values.Contains(value, comparer);

        /// <summary>
        /// Determines whether this object contains the specified key.
        /// </summary>
        /// <param name="key">The key to locate in this object.</param>
        /// <returns>True if the key is found.  False otherwise.</returns>
        public bool ContainsKey(TKey key) => _keyedCollection.Contains(key);

        /// <summary>
        /// Returns the KeyValuePair at the index specified.
        /// </summary>
        /// <param name="index">The index of the KeyValuePair desired</param>
        /// <exception cref="ArgumentOutOfRangeException">
        /// Thrown when the index specified does not refer to a KeyValuePair in this object
        /// </exception>
        public KeyValuePair<TKey, TValue> GetItem(int index) {
            if (index < 0 || index >= _keyedCollection.Count) {
                throw new ArgumentException(StringUtils.Invariant($"The index was outside the bounds of the dictionary: {index}"));
            }
            return _keyedCollection[index];
        }

        /// <summary>
        /// Sets the value at the index specified.
        /// </summary>
        /// <param name="index">The index of the value desired</param>
        /// <param name="value">The value to set</param>
        /// <exception cref="ArgumentOutOfRangeException">
        /// Thrown when the index specified does not refer to a KeyValuePair in this object
        /// </exception>
        public void SetItem(int index, TValue value) {
            if (index < 0 || index >= _keyedCollection.Count) {
                throw new ArgumentException(StringUtils.Invariant($"The index is outside the bounds of the dictionary: {index}"));
            }
            var kvp = new KeyValuePair<TKey, TValue>(_keyedCollection[index].Key, value);
            _keyedCollection[index] = kvp;
        }

        /// <summary>
        /// Returns an enumerator that iterates through all the KeyValuePairs in this object.
        /// </summary>
        public IEnumerator<KeyValuePair<TKey, TValue>> GetEnumerator() => _keyedCollection.GetEnumerator();

        /// <summary>
        /// Removes the key-value pair for the specified key.
        /// </summary>
        /// <param name="key">The key to remove from the dictionary.</param>
        /// <returns>True if the item specified existed and the removal was successful.  False otherwise.</returns>
        public bool Remove(TKey key) => _keyedCollection.Remove(key);

        /// <summary>
        /// Removes the key-value pair at the specified index.
        /// </summary>
        /// <param name="index">The index of the key-value pair to remove from the dictionary.</param>
        public void RemoveAt(int index) {
            if (index < 0 || index >= _keyedCollection.Count) {
                throw new ArgumentException(StringUtils.Invariant($"The index was outside the bounds of the dictionary: {index}"));
            }
            _keyedCollection.RemoveAt(index);
        }

        /// <summary>
        /// Gets the value associated with the specified key.
        /// </summary>
        /// <param name="key">The key associated with the value to get.</param>
        public TValue GetValue(TKey key) {
            if (_keyedCollection.Contains(key) == false) {
                throw new ArgumentException(StringUtils.Invariant($"The given key is not present in the dictionary: {key}"));
            }
            var kvp = _keyedCollection[key];
            return kvp.Value;
        }

        /// <summary>
        /// Sets the value associated with the specified key.
        /// </summary>
        /// <param name="key">The key associated with the value to set.</param>
        /// <param name="value">The value to set.</param>
        public void SetValue(TKey key, TValue value) {
            var kvp = new KeyValuePair<TKey, TValue>(key, value);
            var idx = IndexOf(key);
            if (idx > -1) {
                _keyedCollection[idx] = kvp;
            }
            else {
                _keyedCollection.Add(kvp);
            }
        }

        /// <summary>
        /// Tries to get the value associated with the specified key.
        /// </summary>
        /// <param name="key">The key of the desired element.</param>
        /// <param name="value">
        /// When this method returns, contains the value associated with the specified key if
        /// that key was found.  Otherwise it will contain the default value for parameter's type.
        /// This parameter should be provided uninitialized.
        /// </param>
        /// <returns>True if the value was found.  False otherwise.</returns>
        /// <remarks></remarks>
        public bool TryGetValue(TKey key, out TValue value) {

            if (key == null) {
                value = default;
                return false;
            }

            if (_keyedCollection.Contains(key)) {
                value = _keyedCollection[key].Value;
                return true;
            }
            else {
                value = default;
                return false;
            }
        }

        /// <summary>
        ///
        /// </summary>
        public void SortKeys() => _keyedCollection.SortByKeys();

        /// <summary>
        ///
        /// </summary>
        /// <param name="comparer"></param>
        public void SortKeys(IComparer<TKey> comparer) => _keyedCollection.SortByKeys(comparer);

        /// <summary>
        ///
        /// </summary>
        /// <param name="comparison"></param>
        public void SortKeys(Comparison<TKey> comparison) => _keyedCollection.SortByKeys(comparison);

        /// <summary>
        ///
        /// </summary>
        public void SortValues() {
            var comparer = Comparer<TValue>.Default;
            SortValues(comparer);
        }

        /// <summary>
        ///
        /// </summary>
        /// <param name="comparer"></param>
        public void SortValues(IComparer<TValue> comparer) => _keyedCollection.Sort((x, y) => comparer.Compare(x.Value, y.Value));

        /// <summary>
        ///
        /// </summary>
        /// <param name="comparison"></param>
        public void SortValues(Comparison<TValue> comparison) => _keyedCollection.Sort((x, y) => comparison(x.Value, y.Value));

        void IDictionary<TKey, TValue>.Add(TKey key, TValue value) => Add(key, value);

        bool IDictionary<TKey, TValue>.ContainsKey(TKey key) => ContainsKey(key);

        ICollection<TKey> IDictionary<TKey, TValue>.Keys => Keys;

        bool IDictionary<TKey, TValue>.Remove(TKey key) => Remove(key);

        bool IDictionary<TKey, TValue>.TryGetValue(TKey key, out TValue value) => TryGetValue(key, out value);

        ICollection<TValue> IDictionary<TKey, TValue>.Values => Values;

        TValue IDictionary<TKey, TValue>.this[TKey key] {
            get => this[key];
            set => this[key] = value;
        }

        void ICollection<KeyValuePair<TKey, TValue>>.Add(KeyValuePair<TKey, TValue> item) => _keyedCollection.Add(item);

        void ICollection<KeyValuePair<TKey, TValue>>.Clear() => _keyedCollection.Clear();

        bool ICollection<KeyValuePair<TKey, TValue>>.Contains(KeyValuePair<TKey, TValue> item) => _keyedCollection.Contains(item);

        void ICollection<KeyValuePair<TKey, TValue>>.CopyTo(KeyValuePair<TKey, TValue>[] array, int arrayIndex) => _keyedCollection.CopyTo(array, arrayIndex);

        int ICollection<KeyValuePair<TKey, TValue>>.Count => _keyedCollection.Count;

        bool ICollection<KeyValuePair<TKey, TValue>>.IsReadOnly => false;

        bool ICollection<KeyValuePair<TKey, TValue>>.Remove(KeyValuePair<TKey, TValue> item) => _keyedCollection.Remove(item);

        IEnumerator<KeyValuePair<TKey, TValue>> IEnumerable<KeyValuePair<TKey, TValue>>.GetEnumerator() => GetEnumerator();

        IEnumerator IEnumerable.GetEnumerator() => GetEnumerator();

        IDictionaryEnumerator IOrderedDictionary.GetEnumerator() => new DictionaryEnumerator<TKey, TValue>(this);

        void IOrderedDictionary.Insert(int index, object key, object value) => Insert(index, (TKey)key, (TValue)value);

        void IOrderedDictionary.RemoveAt(int index) => RemoveAt(index);

        object IOrderedDictionary.this[int index] {
            get => this[index];
            set => this[index] = (TValue)value;
        }

        void IDictionary.Add(object key, object value) => Add((TKey)key, (TValue)value);

        void IDictionary.Clear() => Clear();

        bool IDictionary.Contains(object key) => _keyedCollection.Contains((TKey)key);

        IDictionaryEnumerator IDictionary.GetEnumerator() => new DictionaryEnumerator<TKey, TValue>(this);

        bool IDictionary.IsFixedSize => false;

        bool IDictionary.IsReadOnly => false;

        ICollection IDictionary.Keys
            => (ICollection)Keys;

        void IDictionary.Remove(object key) => Remove((TKey)key);

        ICollection IDictionary.Values
            => (ICollection)Values;

        object IDictionary.this[object key] {
            get => this[(TKey)key];
            set => this[(TKey)key] = (TValue)value;
        }

        void ICollection.CopyTo(Array array, int index) => ((ICollection)_keyedCollection).CopyTo(array, index);

        int ICollection.Count => ((ICollection)_keyedCollection).Count;

        bool ICollection.IsSynchronized => ((ICollection)_keyedCollection).IsSynchronized;

        object ICollection.SyncRoot => ((ICollection)_keyedCollection).SyncRoot;

    }
}


text:
<?xml version="1.0" encoding="utf-8" ?>
<c2layout>
    <name>Storage</name>
    <sid>7830949967673832</sid>
    <event-sheet></event-sheet>
    <size>
        <width>1708</width>
        <height>960</height>
    </size>
    <margins>
        <horizontal>500</horizontal>
        <vertical>500</vertical>
    </margins>
    <unbounded-scrolling>0</unbounded-scrolling>
    <layers>
        <layer name="Layer 0" sid="3003282698327826">
            <initially-visible>1</initially-visible>
            <background-color>255,255,255</background-color>
            <transparent>0</transparent>
            <parallax>
                <x>1</x>
                <y>1</y>
            </parallax>
            <zoom-rate>1</zoom-rate>
            <opacity>1</opacity>
            <force-own-texture>0</force-own-texture>
            <global>0</global>
            <use-render-cells>0</use-render-cells>
            <blend-mode>0</blend-mode>
            <effect-fallback>0</effect-fallback>
            <instances>
                <instance type="switch" uid="17">
                    <properties>
                        <initial-visibility>Visible</initial-visibility>
                        <initial-animation>Default</initial-animation>
                        <initial-frame>0</initial-frame>
                        <collisions>Enabled</collisions>
                    </properties>
                    <instance-variables>
                        <switch>0</switch>
                        <active>false</active>
                        <buffer>false</buffer>
                        <points>1000</points>
                    </instance-variables>
                    <blend-mode>0</blend-mode>
                    <effect-fallback>0</effect-fallback>
                    <world>
                        <x>682</x>
                        <y>59</y>
                        <z>0</z>
                        <width>32</width>
                        <height>32</height>
                        <depth>0</depth>
                        <hotspotX>0.5</hotspotX>
                        <hotspotY>0.5</hotspotY>
                        <angle>0</angle>
                        <opacity>1</opacity>
                    </world>
                </instance>
                <instance type="treasureSpot" uid="15">
                    <properties>
                        <initial-visibility>Invisible</initial-visibility>
                        <hotspot>Center</hotspot>
                    </properties>
                    <instance-variables>
                        <treasure>false</treasure>
                        <switch>false</switch>
                        <valid>true</valid>
                    </instance-variables>
                    <blend-mode>0</blend-mode>
                    <effect-fallback>0</effect-fallback>
                    <world>
                        <x>626</x>
                        <y>190</y>
                        <z>0</z>
                        <width>32</width>
                        <height>32</height>
                        <depth>0</depth>
                        <hotspotX>0.5</hotspotX>
                        <hotspotY>0.5</hotspotY>
                        <angle>0</angle>
                        <opacity>1</opacity>
                    </world>
                </instance>
                <instance type="butterfly" uid="13">
                    <properties>
                        <initial-visibility>Visible</initial-visibility>
                        <initial-animation>Default</initial-animation>
                        <initial-frame>0</initial-frame>
                        <collisions>Disabled</collisions>
                    </properties>
                    <behavior-instances>
                        <behavior-instance type="8Direction">
                            <properties>
                                <max-speed>200</max-speed>
                                <acceleration>600</acceleration>
                                <deceleration>500</deceleration>
                                <directions>8 directions</directions>
                                <set-angle>360 degree (smooth)</set-angle>
                                <default-controls>No</default-controls>
                                <initial-state>Enabled</initial-state>
                            </properties>
                        </behavior-instance>
                        <behavior-instance type="Sine">
                            <properties>
                                <active-on-start>Yes</active-on-start>
                                <movement>Horizontal</movement>
                                <wave>Sine</wave>
                                <period>4</period>
                                <period-random>0</period-random>
                                <period-offset>0</period-offset>
                                <period-offset-random>0</period-offset-random>
                                <magnitude>50</magnitude>
                                <magnitude-random>0</magnitude-random>
                            </properties>
                        </behavior-instance>
                    </behavior-instances>
                    <blend-mode>0</blend-mode>
                    <effect-fallback>0</effect-fallback>
                    <world>
                        <x>395</x>
                        <y>90</y>
                        <z>0</z>
                        <width>5</width>
                        <height>3</height>
                        <depth>0</depth>
                        <hotspotX>0.600000024</hotspotX>
                        <hotspotY>0.666666687</hotspotY>
                        <angle>0</angle>
                        <opacity>1</opacity>
                    </world>
                </instance>
                <instance type="treasure" uid="18">
                    <properties>
                        <initial-visibility>Visible</initial-visibility>
                        <initial-animation>Default</initial-animation>
                        <initial-frame>0</initial-frame>
                        <collisions>Disabled</collisions>
                    </properties>
                    <instance-variables>
                        <points>0</points>
                    </instance-variables>
                    <behavior-instances>
                        <behavior-instance type="Bullet">
                            <properties>
                                <speed>100</speed>
                                <acceleration>0</acceleration>
                                <gravity>0</gravity>
                                <bounce-off-solids>No</bounce-off-solids>
                                <set-angle>No</set-angle>
                                <initial-state>Enabled</initial-state>
                            </properties>
                        </behavior-instance>
                        <behavior-instance type="Sine">
                            <properties>
                                <active-on-start>Yes</active-on-start>
                                <movement>Vertical</movement>
                                <wave>Sine</wave>
                                <period>1</period>
                                <period-random>0</period-random>
                                <period-offset>0</period-offset>
                                <period-offset-random>0</period-offset-random>
                                <magnitude>-25</magnitude>
                                <magnitude-random>0</magnitude-random>
                            </properties>
                        </behavior-instance>
                        <behavior-instance type="Flash" />
                    </behavior-instances>
                    <blend-mode>0</blend-mode>
                    <effect-fallback>0</effect-fallback>
                    <world>
                        <x>320</x>
                        <y>-75</y>
                        <z>0</z>
                        <width>16</width>
                        <height>16</height>
                        <depth>0</depth>
                        <hotspotX>0.5</hotspotX>
                        <hotspotY>0.5</hotspotY>
                        <angle>0</angle>
                        <opacity>1</opacity>
                    </world>
                </instance>
                <instance type="treasureCount" uid="19">
                    <properties>
                        <initial-visibility>Visible</initial-visibility>
                        <initial-animation>Default</initial-animation>
                        <initial-frame>0</initial-frame>
                        <collisions>Enabled</collisions>
                    </properties>
                    <behavior-instances>
                        <behavior-instance type="Flash" />
                    </behavior-instances>
                    <blend-mode>0</blend-mode>
                    <effect-fallback>0</effect-fallback>
                    <world>
                        <x>493</x>
                        <y>-101</y>
                        <z>0</z>
                        <width>16</width>
                        <height>16</height>
                        <depth>0</depth>
                        <hotspotX>0.5</hotspotX>
                        <hotspotY>0.5</hotspotY>
                        <angle>0</angle>
                        <opacity>1</opacity>
                    </world>
                </instance>
                <instance type="Character" uid="5">
                    <properties>
                        <initial-visibility>Visible</initial-visibility>
                        <initial-animation>Dikdik</initial-animation>
                        <initial-frame>0</initial-frame>
                        <collisions>Enabled</collisions>
                    </properties>
                    <instance-variables>
                        <currCharacter>Dikdik</currCharacter>
                        <inAction>false</inAction>
                        <currTileX>0</currTileX>
                        <currTileY>0</currTileY>
                        <lastX>0</lastX>
                        <lastY>0</lastY>
                        <noMapChange>false</noMapChange>
                        <facing>right</facing>
                        <lastTileX>0</lastTileX>
                        <lastTileY>0</lastTileY>
                        <lasttimer>0</lasttimer>
                        <active>false</active>
                    </instance-variables>
                    <behavior-instances>
                        <behavior-instance type="Pin" />
                        <behavior-instance type="8Direction">
                            <properties>
                                <max-speed>200</max-speed>
                                <acceleration>1000</acceleration>
                                <deceleration>2000</deceleration>
                                <directions>8 directions</directions>
                                <set-angle>No</set-angle>
                                <default-controls>No</default-controls>
                                <initial-state>Enabled</initial-state>
                            </properties>
                        </behavior-instance>
                        <behavior-instance type="Timer" />
                    </behavior-instances>
                    <blend-mode>0</blend-mode>
                    <effect-fallback>0</effect-fallback>
                    <world>
                        <x>354</x>
                        <y>236</y>
                        <z>0</z>
                        <width>40</width>
                        <height>40</height>
                        <depth>0</depth>
                        <hotspotX>0.5</hotspotX>
                        <hotspotY>0.5</hotspotY>
                        <angle>0</angle>
                        <opacity>1</opacity>
                    </world>
                </instance>
                <instance type="hitboxR" uid="28">
                    <properties>
                        <initial-visibility>Invisible</initial-visibility>
                        <initial-animation>Default</initial-animation>
                        <initial-frame>0</initial-frame>
                        <collisions>Enabled</collisions>
                    </properties>
                    <behavior-instances>
                        <behavior-instance type="Pin" />
                    </behavior-instances>
                    <blend-mode>0</blend-mode>
                    <effect-fallback>0</effect-fallback>
                    <world>
                        <x>69</x>
                        <y>61</y>
                        <z>0</z>
                        <width>16</width>
                        <height>32</height>
                        <depth>0</depth>
                        <hotspotX>0.5</hotspotX>
                        <hotspotY>0.5</hotspotY>
                        <angle>0</angle>
                        <opacity>1</opacity>
                    </world>
                </instance>
                <instance type="hitboxL" uid="31">
                    <properties>
                        <initial-visibility>Invisible</initial-visibility>
                        <initial-animation>Default</initial-animation>
                        <initial-frame>0</initial-frame>
                        <collisions>Enabled</collisions>
                    </properties>
                    <behavior-instances>
                        <behavior-instance type="Pin" />
                    </behavior-instances>
                    <blend-mode>0</blend-mode>
                    <effect-fallback>0</effect-fallback>
                    <world>
                        <x>133</x>
                        <y>61</y>
                        <z>0</z>
                        <width>16</width>
                        <height>32</height>
                        <depth>0</depth>
                        <hotspotX>0.5</hotspotX>
                        <hotspotY>0.5</hotspotY>
                        <angle>0</angle>
                        <opacity>1</opacity>
                    </world>
                </instance>
            </instances>
            <effects />
        </layer>
    </layers>
    <nonworld-instances />
    <effects />
</c2layout>

redpajama_set_name: RedPajamaGithub


text:
package org.jetbrains.plugins.scala.lang.autoImport

import org.jetbrains.plugins.scala.autoImport.quickFix.ScalaImportGlobalMemberFix
import org.jetbrains.plugins.scala.lang.psi.api.expr.ScReferenceExpression

class ImportStableMemberFixTest extends ImportElementFixTestBase[ScReferenceExpression] {
  override def createFix(element: ScReferenceExpression) =
    ScalaImportGlobalMemberFix.fixWithoutPrefix(element)

  def testNextInt(): Unit = checkElementsToImport(
    s"""
       |object Test {
       |  ${CARET}nextInt()
       |}
       |""".stripMargin,

    "scala.util.Random.nextInt"
  )

  def testEmptyList(): Unit = checkElementsToImport(
    s"""
       |class Foo {
       |  ${CARET}emptyList
       |}
     """.stripMargin,

    "java.util.Collections.emptyList"
  )

  def testConstant(): Unit = checkElementsToImport(
    s"""
       |class Test {
       |  ${CARET}PositiveInfinity
       |}
       |""".stripMargin,

    "scala.Double.PositiveInfinity",
    "scala.Float.PositiveInfinity",
  )

  def testConstantAsPattern(): Unit = doTest(
    fileText =
      s"""
         |class Test {
         |  0.0 match {
         |    case ${CARET}PositiveInfinity =>
         |  }
         |}
         |""".stripMargin,
    expectedText =
      """
        |import scala.Double.PositiveInfinity
        |
        |class Test {
        |  0.0 match {
        |    case PositiveInfinity =>
        |  }
        |}
        |""".stripMargin,

    selected = "scala.Double.PositiveInfinity"
  )

  def testNoPrivateMethod(): Unit = checkNoImportFix(
    s"""
       |object A {
       |  private def myFoo(): Unit = ???
       |}
       |
       |object Test {
       |  ${CARET}myFoo()
       |}
       |""".stripMargin)

  def testNoInstanceMethod(): Unit = checkNoImportFix(
    s"""
       |class A {
       |  def foo(): Int = 1
       |}
       |object Test {
       |  ${CARET}foo()
       |}
       |""".stripMargin)

  def testTooManyCandidates(): Unit = checkNoImportFix(
    s"""
       |class Test {
       |  ${CARET}empty
       |}
       |""".stripMargin
  )

  def testViaInheritors(): Unit = checkElementsToImport(
    s"""trait Base[T] {
       |  def foo(t: T): Int = 1
       |}
       |class A[T] extends Base[T]
       |object B extends A[Int]
       |
       |object C extends Base[Long]
       |
       |object Test {
       |  ${CARET}foo()
       |}
       |""".stripMargin,

    "B.foo", "C.foo"
  )

  def testSingleOptionIfNonParameterizedInheritance(): Unit = checkElementsToImport(
    s"""
       |trait Base {
       |  def foo(): Int = 1
       |}
       |class A extends Base
       |object B extends A
       |
       |object C extends Base
       |
       |object Test {
       |  ${CARET}foo()
       |}
       |""".stripMargin,

    "B.foo"
  )

  def testCompanionObjectValue(): Unit = doTest(
    fileText =
      s"""
         |trait Foo {
         |  ${CARET}foo
         |}
         |
         |object Foo {
         |  val (_, foo) = ???
         |}""".stripMargin,
    expectedText =
      s"""
         |import Foo.foo
         |
         |trait Foo {
         |  foo
         |}
         |
         |object Foo {
         |  val (_, foo) = ???
         |}""".stripMargin,

    selected = "Foo.foo"
  )

  def testCompanionObjectMethod(): Unit = doTest(
    fileText =
      s"""
         |class Foo {
         |  ${CARET}foo
         |}
         |
         |object Foo {
         |  def foo(): Unit = {}
         |}
         |""".stripMargin,
    expectedText =
      """
        |import Foo.foo
        |
        |class Foo {
        |  foo
        |}
        |
        |object Foo {
        |  def foo(): Unit = {}
        |}""".stripMargin,
    selected = "Foo.foo"
  )

  def testPrivateThisCompanionObjectMethod(): Unit = checkNoImportFix(
    s"""
       |class Foo {
       |  ${CARET}foo
       |}
       |
       |object Foo {
       |  private[this] def foo(): Unit = {}
       |}""".stripMargin
  )

  def testPrivateCompanionObjectMethod(): Unit = checkElementsToImport(
    s"""
       |class Foo {
       |  ${CARET}foo
       |}
       |
       |object Foo {
       |  private def foo(): Unit = {}
       |}""".stripMargin,

    "Foo.foo"
  )

  def testMethodFromVal(): Unit = checkElementsToImport(
    s"""
       |trait MyMethods {
       |  def myMethod(): Unit = ???
       |}
       |
       |trait Abc {
       |  trait API extends MyMethods
       |  val api: API
       |}
       |
       |trait Abc2 extends Abc {
       |  trait API extends super.API
       |  val api: API = ???
       |}
       |
       |object AbcImpl extends Abc2
       |
       |object Test {
       |  ${CARET}myMethod()
       |}""".stripMargin,

    "AbcImpl.api.myMethod"
  )

  def testExcludedClass(): Unit = {
    withExcluded("scala.util.Random") {
      checkNoImportFix(
        s"""object Test {
          |  ${CARET}nextInt()
          |}
          |""".stripMargin)
      checkNoImportFix(
        s"""object Test {
           |  ${CARET}Random.nextInt()
           |}
           |""".stripMargin)
    }
  }

  def testExcludedMethod(): Unit = {
    withExcluded("scala.util.Random.nextInt") {
      checkNoImportFix(
        s"""object Test {
           |  ${CARET}nextInt()
           |}
           |""".stripMargin)
    }
  }

}


text:
package org.bitcoins.node.models

import org.bitcoins.server.BitcoinSAppConfig
import org.bitcoins.testkit.BitcoinSTestAppConfig
import org.bitcoins.testkit.Implicits._
import org.bitcoins.testkit.core.gen.TransactionGenerators
import org.bitcoins.testkit.fixtures.NodeDAOFixture

class BroadcastAbleTransactionDAOTest extends NodeDAOFixture {

  /** Wallet config with data directory set to user temp directory */
  implicit override protected def config: BitcoinSAppConfig =
    BitcoinSTestAppConfig.getSpvTestConfig()

  behavior of "BroadcastAbleTransactionDAO"

  it must "write a TX and read it back" in { daos =>
    val txDAO = daos.txDAO
    val tx = TransactionGenerators.transaction.sampleSome

    for {
      created <- txDAO.create(BroadcastAbleTransaction(tx))
      read <- txDAO.read(created.id.get)
    } yield assert(read.contains(created))

  }
}


text:
<!DOCTYPE html>

        <meta charset="UTF-8">
        <title>Demo</title>

Simple initalization with default settings

        <canvas></canvas>


text:
<!DOCTYPE html>

		<meta charset="utf-8" />
		<title>Smarty - Multipurpose + Admin</title>
		<meta name="keywords" content="HTML5,CSS3,Template" />
		<meta name="description" content="" />
		<meta name="Author" content="Dorin Grigoras [www.stepofweb.com]" />

		<meta name="viewport" content="width=device-width, maximum-scale=1, initial-scale=1, user-scalable=0" />

		<link href="https://fonts.googleapis.com/css?family=Open+Sans:300,400%7CRaleway:300,400,500,600,700%7CLato:300,400,400italic,600,700" rel="stylesheet" type="text/css" />

		<link href="assets/plugins/bootstrap/css/bootstrap.min.css" rel="stylesheet" type="text/css" />

		<link href="assets/css/essentials.css" rel="stylesheet" type="text/css" />
		<link href="assets/css/layout.css" rel="stylesheet" type="text/css" />

		<link href="assets/css/header-1.css" rel="stylesheet" type="text/css" />
		<link href="assets/css/color_scheme/green.css" rel="stylesheet" type="text/css" id="color_scheme" />

						<button class="btn btn-mobile" data-toggle="collapse" data-target=".nav-main-collapse">

						</button>

									<form action="page-search-result-1.html" method="get">

											<input type="text" name="src" placeholder="Search" class="form-control" />

												<button class="btn btn-primary" type="submit">Search</button>

									</form>

									2

Shop Cart

2x RED BAG WITH HUGE POCKETS

											$37.21

2x THIS IS A VERY LONG TEXT AND WILL BE TRUNCATED

											$17.18

										VIEW CART
										TOTAL: $54.39

											HOME

													HOME CORPORATE

CORPORATE LAYOUT 1

CORPORATE LAYOUT 2

CORPORATE LAYOUT 3

CORPORATE LAYOUT 4

CORPORATE LAYOUT 5

CORPORATE LAYOUT 6

CORPORATE LAYOUT 7

													HOME PORTFOLIO

PORTFOLIO LAYOUT 1

PORTFOLIO LAYOUT 2

PORTFOLIO MASONRY

													HOME BLOG

BLOG LAYOUT 1

BLOG LAYOUT 2

BLOG LAYOUT 3

BLOG LAYOUT 4

													HOME SHOP

SHOP LAYOUT 1

SHOP LAYOUT 2

SHOP LAYOUT 3

SHOP LAYOUT 4

SHOP LAYOUT 5

													HOME MAGAZINE

MAGAZINE LAYOUT 1

MAGAZINE LAYOUT 2

													HOME LANDING PAGE

LANDING PAGE LAYOUT 1

LANDING PAGE LAYOUT 2

LANDING PAGE LAYOUT 3

LANDING PAGE LAYOUT 4

LANDING PAGE LAYOUT 5

													HOME FULLSCREEN

FULLSCREEN - REVOLUTION

FULLSCREEN - YOUTUBE

FULLSCREEN - LOCAL VIDEO

FULLSCREEN - IMAGE

FULLSCREEN - TEXT ROTATOR

													HOME ONE PAGE

ONE PAGE - DEFAULT

ONE PAGE - REVOLUTION

ONE PAGE - IMAGE

ONE PAGE - PARALLAX

ONE PAGE - YOUTUBE

ONE PAGE - TEXT ROTATOR

new MORE LAYOUTS

													HOME - THEMATICS

HOME - RESTAURANT

HOME - EDUCATION

HOME - CONSTRUCTION

HOME - MEDICAL

HOME - CHURCH

HOME - FASHION

HOME - WEDDING

HOME - EVENTS

hot PROPOSE THEMATIC

new 32 MORE LAYOUTS

HOME SIMPLE - REVOLUTION

HOME SIMPLE - LAYERSLIDER

HOME SIMPLE - PARALLAX

HOME SIMPLE - YOUTUBE

											PAGES

													ABOUT

ABOUT US - LAYOUT 1

ABOUT US - LAYOUT 2

ABOUT US - LAYOUT 3

ABOUT US - LAYOUT 4

ABOUT US - LAYOUT 5

ABOUT ME - LAYOUT 1

ABOUT ME - LAYOUT 2

													TEAM

TEAM - LAYOUT 1

TEAM - LAYOUT 2

													SERVICES

SERVICES - LAYOUT 1

SERVICES - LAYOUT 2

SERVICES - LAYOUT 3

SERVICES - LAYOUT 4

													FAQ

FAQ - LAYOUT 1

FAQ - LAYOUT 2

FAQ - LAYOUT 3

FAQ - LAYOUT 4

													CONTACT

CONTACT - LAYOUT 1

CONTACT - LAYOUT 2

CONTACT - LAYOUT 3

CONTACT - LAYOUT 4

CONTACT - LAYOUT 5

													ERROR

ERROR 404 - LAYOUT 1

ERROR 404 - LAYOUT 2

ERROR 404 - LAYOUT 3

ERROR 404 - LAYOUT 4

ERROR 404 - LAYOUT 5

ERROR 404 - LAYOUT 6

ERROR 404 - LAYOUT 7

ERROR 404 - LAYOUT 8

ERROR 500 - LAYOUT 1

ERROR 500 - LAYOUT 2

													SIDEBAR

SIDEBAR LEFT

SIDEBAR RIGHT

SIDEBAR BOTH

NO SIDEBAR

SIDEBAR LEFT - DARK

SIDEBAR RIGHT - DARK

SIDEBAR BOTH - DARK

NO SIDEBAR - DARK

													LOGIN/REGISTER

LOGIN - LAYOUT 1

LOGIN - LAYOUT 2

LOGIN - LAYOUT 3

LOGIN - LAYOUT 4

LOGIN - LAYOUT 5

LOGIN + REGISTER 1

LOGIN + REGISTER 2

LOGIN + REGISTER 3

REGISTER - LAYOUT 1

REGISTER - LAYOUT 2

													CLIENTS

CLIENTS 1 - SIDEBAR RIGHT

CLIENTS 1 - SIDEBAR LEFT

CLIENTS 1 - FULLWIDTH

CLIENTS 2 - SIDEBAR RIGHT

CLIENTS 2 - SIDEBAR LEFT

CLIENTS 2 - FULLWIDTH

													SEARCH RESULT

LAYOUT 1 - LEFT SIDEBAR

LAYOUT 1 - RIGHT SIDEBAR

LAYOUT 1 - FULLWIDTH

LAYOUT 2 - LEFT SIDEBAR

LAYOUT 2 - RIGHT SIDEBAR

LAYOUT 3 - TABLE SEARCH

													PROFILE

USER PROFILE

USER PROJECTS

USER COMMENTS

USER HISTORY

USER SETTINGS

													MAINTENANCE

MAINTENANCE - LAYOUT 1

MAINTENANCE - LAYOUT 2

													COMING SOON

COMING SOON - LAYOUT 1

COMING SOON - LAYOUT 2

													FORUM

FORUM - HOME

FORUM - TOPIC

FORUM - POST

CAREERS

SITEMAP

BLANK PAGE

											FEATURES

													 SLIDERS

														REVOLUTION SLIDER 4.x

FULLSCREEN

FULL WIDTH

FIXED WIDTH

KENBURNS EFFECT

HTML5 VIDEO

CAPTIONS

THUMB SMALL

THUMB LARGE

NAV PREVIEW 1

NAV PREVIEW 2

NAV PREVIEW 3

NAV PREVIEW 4

NAV THEME DEFAULT

														LAYER SLIDER

FULLWIDTH

FIXED WIDTH

CAPTIONS

CAROUSEL

2D & 3D TRANSITIONS

THUMB NAV

														FLEX SLIDER

FULL WIDTH

CONTENT

WITH THUMBS

														OWL SLIDER

FULL WIDTH

FIXED WIDTH

FIXED + PROGRESS

BASIC CAROUSEL

EFFECT - FADE

EFFECT - BACKSLIDE

EFFECT - GODOWN

EFFECT - FADE UP

														SWIPE SLIDER

FULLSCREEN

FIXED HEIGHT

AUTOPLAY

FADE TRANSITION

SLIDE TRANSITION

COVERFLOW TRANSITION

HTML5 VIDEO

3 COLUMNS

4 COLUMNS

NIVO SLIDER

CAMERA SLIDER

ELASTIC SLIDER

													 HEADERS

HEADER - LIGHT

HEADER - DARK

														HEADER - HEIGHT

LARGE (96px)

MEDIUM (70px)

SMALL (60px)

														HEADER - SHADOW

SHADOW 1 - AFTER

SHADOW 1 - BEFORE

SHADOW 2 - AFTER

SHADOW 2 - BEFORE

SHADOW 3 - AFTER

SHADOW 3 - BEFORE

SHADOW - DARK PAGE EXAMPLE

HEADER - TRANSPARENT

HEADER - TRANSP+LINE

HEADER - TRANSLUCENT

														HEADER - BOTTOM

BOTTOM LIGHT

BOTTOM DARK

BOTTOM TRANSPARENT

														HEADER - LEFT SIDE

FIXED

OPEN ON CLICK

DARK

														HEADER - RIGHT SIDE

FIXED

OPEN ON CLICK

DARK

														HEADER - STATIC

STATIC TOP - LIGHT

STATIC TOP - DARK

STATIC BOTTOM - LIGHT

STATIC BOTTOM - DARK

HEADER - NO STICKY

													 FOOTERS

FOOTER - LAYOUT 1

FOOTER - LAYOUT 2

FOOTER - LAYOUT 3

FOOTER - LAYOUT 4

FOOTER - LAYOUT 5

FOOTER - LAYOUT 6

FOOTER - LAYOUT 7

FOOTER - LAYOUT 8 (light)

FOOTER - STICKY

													 MENU STYLES

MENU - OVERLAY

MENU - STYLE 1

MENU - STYLE 2

MENU - STYLE 3

MENU - STYLE 4

MENU - STYLE 5

MENU - STYLE 6

MENU - STYLE 7

MENU - STYLE 8

MENU - STYLE 9

MENU - STYLE 10

													 MENU DROPDOWN

DROPDOWN - LIGHT

DROPDOWN - DARK

DROPDOWN - COLOR

													 PAGE TITLES

ALIGN LEFT

ALIGN RIGHT

ALIGN CENTER

LIGHT

DARK

WITH TABS

BREADCRUMBS ONLY

														PARALLAX

PARALLAX SMALL

PARALLAX MEDIUM

PARALLAX LARGE

PARALLAX 2x LARGE

TRANSPARENT HEADER

TRANSPARENT HEADER - LARGE

SHORT HEIGHT

ROTATIVE TEXT

													 PAGE SUBMENU

PAGE SUBMENU - LIGHT

PAGE SUBMENU - DARK

PAGE SUBMENU - COLOR

PAGE SUBMENU - TRANSPARENT

PAGE SUBMENU - BELOW PAGE TITLE

PAGE SUBMENU - SCROLLTO

													 ICONS

FONTAWESOME

GLYPHICONS

ET LINE

FLAGS

													 BACKGROUNDS

CONTENT - SIMPLE GREY

CONTENT - GRAIN GREY

CONTENT - GRAIN BLUE

CONTENT - GRAIN GREEN

CONTENT - GRAIN ORANGE

CONTENT - GRAIN YELLOW

													 SEARCH LAYOUTS

SEARCH - DEFAULT

SEARCH - FULLSCREEN LIGHT

SEARCH - FULLSCREEN DARK

SEARCH - HEADER LIGHT

SEARCH - HEADER DARK

 ANIMATIONS

 GRID

 ESSENTIALS

 CHANGELOG

													 SIDE PANEL

SIDE PANEL - DARK - RIGHT

SIDE PANEL - DARK - LEFT

SIDE PANEL - LIGHT - RIGHT

SIDE PANEL - LIGHT - LEFT

SIDE PANEL - COLOR - RIGHT

SIDE PANEL - COLOR - LEFT

BONUS ADMIN PANEL

											PORTFOLIO

GRID

1 COLUMN

2 COLUMNS

3 COLUMNS

4 COLUMNS

5 COLUMNS

6 COLUMNS

MASONRY

2 COLUMNS

3 COLUMNS

4 COLUMNS

5 COLUMNS

6 COLUMNS

SINGLE

EXTENDED ITEM

PARALLAX IMAGE

SLIDER GALLERY

HTML5 VIDEO

MASONRY THUMBS

EMBED VIDEO

LAYOUT

DEFAULT

LEFT SIDEBAR

RIGHT SIDEBAR

BOTH SIDEBAR

FULL WIDTH (100%)

TAB FILTER & PAGINATION

LOADING

PAGINATION

JQUERY PAGINATION

INFINITE SCROLL

AJAX IN PAGE

AJAX IN MODAL

											BLOG

													DEFAULT

LEFT SIDEBAR

RIGHT SIDEBAR

BOTH SIDEBAR

FULL WIDTH

													GRID

2 COLUMNS

3 COLUMNS

4 COLUMNS

LEFT SIDEBAR

RIGHT SIDEBAR

													MASONRY

2 COLUMNS

3 COLUMNS

4 COLUMNS

FULLWIDTH

													TIMELINE

LEFT SIDEBAR

RIGHT SIDEBAR

RIGHT + TIMELINE RIGHT

LEFT + TIMELINE RIGHT

FULL WIDTH - LEFT

FULL WIDTH - RIGHT

													SMALL IMAGE

LEFT SIDEBAR

RIGHT SIDEBAR

BOTH SIDEBAR

FULL WIDTH

ALTERNATE 1

ALTERNATE 2

													SINGLE

DEFAULT

LEFT SIDEBAR

RIGHT SIDEBAR

FULL WIDTH

SMALL IMAGE - LEFT

SMALL IMAGE - RIGHT

BIG IMAGE

FULLWIDTH IMAGE

													COMMENTS

BORDERED COMMENTS

DEFAULT COMMENTS

FACEBOOK COMMENTS

DISQUS COMMENTS

											SHOP

													1 COLUMN

LEFT SIDEBAR

RIGHT SIDEBAR

BOTH SIDEBAR

FULL WIDTH

													2 COLUMNS

LEFT SIDEBAR

RIGHT SIDEBAR

BOTH SIDEBAR

													3 COLUMNS

LEFT SIDEBAR

RIGHT SIDEBAR

FULL WIDTH

													4 COLUMNS

LEFT SIDEBAR

RIGHT SIDEBAR

FULL WIDTH

													SINGLE PRODUCT

LEFT SIDEBAR

RIGHT SIDEBAR

BOTH SIDEBAR

FULL WIDTH

COMPARE

CART

CHECKOUT

ORDER PLACED

											SHORTCODES

ANIMATIONS

BUTTONS

CAROUSEL

GRAPHS

CLIENTS

GRID & COLUMNS

COUNTERS

FORM ELEMENTS

DIVIDERS

BOXES & ICONS

GALLERIES

HEADING STYLES

ICON LISTS

LABELS & BADGES

LIGHTBOX

HTML EDITORS

LIST & PANNELS

MAPS

MEDIA EMBEDS

MODAL / POPOVER / NOTIF

NAVIGATIONS

PAGINATIONS

PROGRESS BARS

WIDGETS

PRICING BOXES

PROCESS STEPS

CALLOUTS

INFO BARS

BLOCKQUOTES

RESPONSIVE

SECTIONS

SOCIAL ICONS

ALERTS

STYLED ICONS

TABLES

TABS

TESTIMONIALS

THUMBNAILS

TOGGLES

CHANGELOG

Home

Pages

Changelog

							News, Bugfixes, Updates - all of them will be added here!

							If you find a bug, we do really appreciate if you can report it at: stepofweb[at]gmail.com

							Version: 1.2.0

							Date: Pending / No ETA

waiting for suggestions at stepofeb@gmail.com

							Version: 1.1.2

							Date: Sunday, September 20, 2015

New: Flot Charts

Fix: Various small fixes

							Version: 1.1.1

							Date: Friday, September 18, 2015

New: Corporate Page 7

Update: Documentation - Revolution Slider 5 Local File

Fix: Admin left menu after browser resize

Fix: Admin content resize

Fix: Revolution Slider v5 arrows bottom position

							Version: 1.1.0

							Date: Monday, September 14, 2015

New: Revolution Slider Plugin V5.0.8 (V4.x still available)

New: 32 Revolution Slider Examples

New: RS Page - Carousel Highlight (added: rs-1.html)

New: RS Page - Carousel Instagram (added: rs-2.html)

New: RS Page - Carousel Media (added: rs-3.html)

New: RS Page - Carousel Classic(added: rs-4.html)

New: RS Page - Carousel Showcase (added: rs-5.html)

New: RS Page - Carousel Photography (added: rs-6.html)

New: RS Page - Rotating Words (added: rs-7.html)

New: RS Page - Big Bold (added: rs-8.html)

New: RS Page - Slider Fashion (added: rs-9.html)

New: RS Page - Slider Gym (added: rs-10.html)

New: RS Page - Slider Restaurant (added: rs-11.html)

New: RS Page - Slider Product Dark (added: rs-12.html)

New: RS Page - SliderProduct Light (added: rs-13.html)

New: RS Page - Slider Classic (added: rs-14.html)

New: RS Page - Gallery Light (added: rs-15.html)

New: RS Page - Gallery Dark (added: rs-16.html)

New: RS Page - Slider Fancy Text (added: rs-17.html)

New: RS Page - Slider Highlight (added: rs-18.html)

New: RS Page - Slider Media (added: rs-19.html)

New: RS Page - Slider News (added: rs-20.html)

New: RS Page - Slider Vimeo (added: rs-21.html)

New: RS Page - Slider Youtube (added: rs-22.html)

New: RS Page - Slider Travel (added: rs-23.html)

New: RS Page - Hero Image (added: rs-24.html)

New: RS Page - Hero News (added: rs-25.html)

New: RS Page - Hero Newsletter (added: rs-26.html)

New: RS Page - Hero Search (added: rs-27.html)

New: RS Page - Hero Sports (added: rs-28.html)

New: RS Page - Hero Vimeo (added: rs-29.html)

New: RS Page - Hero Youtube (added: rs-30.html)

New: RS Page - Premium Content Zoom (added: rs-31.html)

New: RS Page - Premium Food Carousel (added: rs-32.html)

New: Hover Buttons [shortcode-buttons-2.html]

Update: Fontawesome to V4.4.0

							Version: 1.0.2

							Date: Monday, September 07, 2015

New: About Us - Layout 5

New: Documentation more info

New: optional css file to rewite the default fonts fonts

New: Parallax enabled by default on mobile devices

Fix: RTL Sliders/Carousels

Fix: header-side container width for < 1600px resolution

							Version: 1.0.1

							Date: Thursday, September 03, 2015

Added: Documentation more info

Added: admin fullcalendar language example

Update: Layer Slider to 5.6.0

Fix: newsletter php code

Fix: transparent header color on mobile

Fix: education template - mobile menu color

Fix: Various small fixes

							Version: 1.0.0

							Date: Sunday, May 31, 2015

Initial Release

					The most complete Template!
					Purchase now »

Integer posuere erat a ante venenatis dapibus posuere velit aliquet.

							<address>

										PO Box 21132

										Here Weare St, Melbourne

										Vivas 2355 Australia

										Phone: 1-800-565-2390

										support@yourname.com

							</address>

LATEST NEWS

									Donec sed odio dui. Nulla vitae elit libero, a pharetra augue
									29 June 2015

									Nullam id dolor id nibh ultricies
									29 June 2015

									Duis mollis, est non commodo luctus
									29 June 2015

EXPLORE SMARTY

Home

About Us

Our Services

Our Clients

Our Pricing

Smarty Tour

Contact Us

KEEP IN TOUCH

Subscribe to Our Newsletter to get Important News & Offers

							<form class="validate" action="php/newsletter.php" method="post" data-success="Subscribed! Thank you!" data-toastr-position="bottom-right">

									<input type="email" id="email" name="email" class="form-control required" placeholder="Enter your Email">

										<button class="btn btn-success" type="submit">Subscribe</button>

							</form>

Terms & Conditions

•

Privacy

						© All Rights Reserved, Company LTD


text:
package buffer

// The maximum read size that we expect to ever see from the kernel, used for
// calculating the size of out messages.
//
// For 4 KiB pages, this is 1024 KiB (cf. https://github.com/torvalds/linux/blob/15db16837a35d8007cb8563358787412213db25e/fs/fuse/fuse_i.h#L38-L40)
const MaxReadSize = 1 << 20


text:
<?php

namespace Faker\Provider\he_IL;

class Company extends \Faker\Provider\Company
{
    protected static $formats = array(
        '{{lastName}} {{companySuffix}}',
        '{{lastName}} את {{lastName}} {{companySuffix}}',
        '{{lastName}} ו{{lastName}}'
    );

    protected static $companySuffix = array('בע"מ', 'ובניו', 'סוכנויות', 'משווקים');
}


text:
```uml
@startuml

package facotory {
    abstract Item {
        +caption
        +Item(String caption)
        {abstract} +makeHTML()
    }
    abstract Link {
        +url
        +Link(String caption, String url)
        {abstract} +makeHTML()
    }
    abstract Tray {
        +tray
        +Tray(String caption)
        +add(Item item)
        {abstract} +makeHTML()
    }
    abstract Page {
        +title
        +author
        +Page(String title, String author)
        +add(Item item)
        +output()
        {abstract} +makeHTML()
    }
    abstract Factory {
        {abstract} +getFactory()
        {abstract} +createLink()
        {abstract} +createTray()
        {abstract} +createPage()
    }
}

package listfactory {

    class ListLink {
        +ListLink(String caption, String url)
        +makeHTML()
    }
    class ListTray {
        +ListTray(String caption)
        +makeHTML()
    }
    class ListPage {
        +ListPage(String title, String author)
        +makeHTML()
    }
    class ListFactory {
        +createLink(String caption, String url)
        +createTray(String caption)
        +createPage(String title, String author)
    }
}

Link -up-|> Item
Tray -up-|> Item
Tray o-up-> Item
Factory -up-> Link: Creates
Factory -up-> Tray: Creates
Factory -up-> Page: Creates

ListFactory -up-> ListLink: Creates
ListFactory -up-> ListTray: Creates
ListFactory -up-> ListPage: Creates
ListFactory --up--|> Factory
ListLink --up--|> Link
ListTray --up--|> Tray
ListPage --up--|> Page

@enduml
```


text:
title: Learn More
---


text:
A simple Windows command line tool to get the IIS log files for a specified date range in a handy ZIP file.

# Development

This tool is build using the [D Programming Language](https://dlang.org/) using the [dub](https://code.dlang.org/getting_started) build tool.

If you want to compile this on your own, simply download and install a recent D package (on Windows you can use [Chocolately](https://chocolatey.org/) to do so), and run the following command

```bash
dub build
```

to compile the tool. The compiled binary will be in the `build` directory.

# Usage

Example: run `iislogretriever.exe --start "2016-11-01" --end "2017-01-31"` to get all the IIS logs for all websites between Nov 1st 2016 and Jan 31st 2017.

The log file folder is assumed to be in `%SystemDrive%\inetpub\logs\LogFiles` if not specified as argument (`--logfolder`). Additional parameters are as follows:

```bash
--start     The start date (YYYY-MM-DD).
--end       The end date (YYYY-MM-DD).
--logfolder The log files root folder.
--out       The output folder.
```

Out of these only `--start` must be set. Everything else is optional.

## Known Issues / Limits

* If the default IIS log files folder was changed, you will need to specify with the command line argument `--logfolder`.
* If you set up individual log folders for sites, you will need to run the tool separately on those. There is no autodetection for this (yet).
* You may need an elevated command prompt (aka `Run As Administrator`) to execute this tool on Windows, so you don't get any read permission errors on the logs folders and files.

# Contributions

Feel free to submit a PR if you'd like to contribute. I'll likely accept it.

# Copyright

Copyright (c) 2017 by Daniel Kurashige-Gollub <daniel@kurashige-gollub.de>

# License

Licensed under MIT license. See LICENSE file.


text:
package org.droidparts.inner.converter;

import java.util.Iterator;
import java.util.LinkedHashMap;
import java.util.Map;

import org.json.JSONObject;

import org.droidparts.inner.ConverterRegistry;
import org.droidparts.inner.TypeHelper;

import static org.droidparts.inner.ReflectionUtils.newInstance;
import static org.droidparts.inner.TypeHelper.isInterface;

public class MapConverter extends Converter<Map<?, ?>> {

	@Override
	public boolean canHandle(Class<?> cls) {
		return TypeHelper.isMap(cls);
	}

	@Override
	public String getDBColumnType() {
		return BLOB;
	}

	@Override
	@SuppressWarnings("unchecked")
	public <G1, G2> Map<G1, G2> readFromJSON(Class<Map<?, ?>> valType, Class<G1> genericArg1, Class<G2> genericArg2,
	                                         JSONObject obj, String key) throws Exception {
		JSONObject jo = ConverterRegistry.getConverter(JSONObject.class).readFromJSON(JSONObject.class, genericArg1,
				genericArg2, obj, key);
		Converter<G1> keyConv = ConverterRegistry.getConverter(genericArg1);
		Converter<G2> valConv = ConverterRegistry.getConverter(genericArg2);
		Map<G1, G2> map;
		if (isInterface(valType)) {
			map = new LinkedHashMap<G1, G2>();
		} else {
			map = (Map<G1, G2>) newInstance(valType);
		}
		Iterator<String> it = jo.keys();
		while (it.hasNext()) {
			String ks = it.next();
			G1 k = keyConv.parseFromString(genericArg1, null, null, ks);
			G2 v = valConv.readFromJSON(genericArg2, null, null, jo, ks);
			map.put(k, v);
		}
		return map;
	}

	@Override
	@SuppressWarnings("unchecked")
	public <G1, G2> void putToJSON(Class<Map<?, ?>> valType, Class<G1> genericArg1, Class<G2> genericArg2,
	                               JSONObject obj, String key, Map<?, ?> val) throws Exception {
		JSONObject o = new JSONObject();
		Converter<G2> valConv = ConverterRegistry.getConverter(genericArg2);
		for (Object k : val.keySet()) {
			String ks = k.toString();
			G2 v = (G2) val.get(k);
			valConv.putToJSON(genericArg2, null, null, o, ks, v);
		}
		obj.put(key, o);
	}

}


text:
package com.secucard.connect.product.services.model;

import com.fasterxml.jackson.annotation.JsonProperty;
import com.secucard.connect.product.common.model.SecuObject;
import com.secucard.connect.product.general.model.Merchant;
import java.util.Date;

public class Contract extends SecuObject {

  @JsonProperty("redirect_url_success")
  private String redirectUrlSuccess;

  @JsonProperty("redirect_url_failed")
  private String redirectUrlFailed;

  @JsonProperty("push_url")
  private String pushUrl;

  private Date created;

  private Merchant merchant;

  public String getRedirectUrlSuccess() {
    return redirectUrlSuccess;
  }

  public void setRedirectUrlSuccess(String redirectUrlSuccess) { this.redirectUrlSuccess = redirectUrlSuccess; }

  public String getRedirectUrlFailed() {
    return redirectUrlFailed;
  }

  public void setRedirectUrlFailed(String redirectUrlFailed) { this.redirectUrlFailed = redirectUrlFailed; }

  public String getPushUrl() {
    return pushUrl;
  }

  public void setPushUrl(String pushUrl) { this.pushUrl = pushUrl; }

  public Date getCreated() {
    return created;
  }

  public void setCreated(Date created) { this.created = created; }

  public Merchant getMerchant() {
    return merchant;
  }

  public void setMerchant(Merchant merchant) { this.merchant = merchant; }

  @Override
  public String toString() {
    return "Contract{" + "redirectUrlSuccess=" + redirectUrlSuccess + ", redirectUrlFailed=" + redirectUrlFailed + ", pushUrl=" + pushUrl
        + ", created=" + created + ", merchant=" + merchant + ", " + super.toString() + '}';
  }
}


text:
package org.spc.ofp.project.mfcl.doit.flag;

import javafx.collections.FXCollections;
import javafx.collections.ObservableMap;

/**
 * Defines a fish(ery) flag.
 * @author Fabrice Bouyé (fabriceb@spc.int)
 */
public final class FishFlag extends FlagBase {

    /**
     * Creates a new instance.
     * @param id The id of this flag.
     * @throws IllegalArgumentException If {@code id} ≤ 0.
     */
    public FishFlag(final int id) throws IllegalArgumentException {
        super(FlagType.FISH, id);
    }

    /**
    * Values for each groups in this flag.
    */
    private final ObservableMap<FisheryGroup, Number> values = FXCollections.observableHashMap();

    public final ObservableMap<FisheryGroup, Number> getValues() {
        return values;
    }

}


text:
/* @flow */
import type { Server } from 'transport'
import { createSecureServer } from 'http2'
import getPort from 'get-port'
import { nextEvent } from 'conversion'

export default async function(options: {
  port?: ?number,
  certificate: string,
  privateKey: string
}): Promise<Server> {
  const port = typeof options.port === 'number' ? options.port : await getPort()

  const httpServer = createSecureServer({
    cert: options.certificate,
    key: options.privateKey
  })

  httpServer.listen(port)
  await nextEvent('listening', httpServer)

  return { httpServer, port }
}


text:
module Doorkeeper
  module OAuth
    describe PasswordAccessTokenRequest do
      let(:server) do
        double(
          :server,
          default_scopes: Doorkeeper::OAuth::Scopes.new,
          access_token_expires_in: 2.hours,
          refresh_token_enabled?: false,
          custom_access_token_expires_in: ->(_app) { nil }
        )
      end
      let(:credentials) { Client::Credentials.new(client.uid, client.secret) }
      let(:client) { FactoryBot.create(:application) }
      let(:owner)  { double :owner, id: 99 }

      subject do
        PasswordAccessTokenRequest.new(server, credentials, owner)
      end

      it 'adds jwt validation which fails with :invalid_grant' do
        expect(subject).to receive(:validate_jwt_secret)

        subject.validate

        expect(subject.error).to be :invalid_grant
      end

      describe 'methods' do
        describe '#validate_jwt_secret' do
          it 'validates JWT Secret' do
            expect_any_instance_of(ApiGuardian::Configuration).to(
              receive(:jwt_secret).and_return(nil)
            )

            expect { subject.validate_jwt_secret }.to(
              raise_error(ApiGuardian::Errors::InvalidJwtSecret)
            )

            expect_any_instance_of(ApiGuardian::Configuration).to(
              receive(:jwt_secret).and_return('changeme')
            )

            expect { subject.validate_jwt_secret }.to(
              raise_error(ApiGuardian::Errors::InvalidJwtSecret)
            )

            expect_any_instance_of(ApiGuardian::Configuration).to(
              receive(:jwt_secret).and_return('valid')
            )

            expect { subject.validate_jwt_secret }.not_to raise_error
          end
        end
      end
    end
  end
end


text:
using pb = global::Google.ProtocolBuffers;
using pbc = global::Google.ProtocolBuffers.Collections;
using pbd = global::Google.ProtocolBuffers.Descriptors;
using scg = global::System.Collections.Generic;
namespace DolphinServer.ProtoEntity {

  namespace Proto {

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
    public static partial class A1018Response {

      #region Extension registration
      public static void RegisterAllExtensions(pb::ExtensionRegistry registry) {
      }
      #endregion
      #region Static variables
      internal static pbd::MessageDescriptor internal__static_A1018Response__Descriptor;
      internal static pb::FieldAccess.FieldAccessorTable<global::DolphinServer.ProtoEntity.A1018Response, global::DolphinServer.ProtoEntity.A1018Response.Builder> internal__static_A1018Response__FieldAccessorTable;
      #endregion
      #region Descriptor
      public static pbd::FileDescriptor Descriptor {
        get { return descriptor; }
      }
      private static pbd::FileDescriptor descriptor;

      static A1018Response() {
        byte[] descriptorData = global::System.Convert.FromBase64String(
            string.Concat(
              "ChFBMTAxOFJlc3BvbnNlLnR4dCJDCg1BMTAxOFJlc3BvbnNlEhEKCUVycm9y",
              "SW5mbxgBIAEoCRIRCglFcnJvckNvZGUYAiABKAUSDAoEQ2FyZBgEIAEoBUIc",
            "qgIZRG9scGhpblNlcnZlci5Qcm90b0VudGl0eQ=="));
        pbd::FileDescriptor.InternalDescriptorAssigner assigner = delegate(pbd::FileDescriptor root) {
          descriptor = root;
          internal__static_A1018Response__Descriptor = Descriptor.MessageTypes[0];
          internal__static_A1018Response__FieldAccessorTable =
              new pb::FieldAccess.FieldAccessorTable<global::DolphinServer.ProtoEntity.A1018Response, global::DolphinServer.ProtoEntity.A1018Response.Builder>(internal__static_A1018Response__Descriptor,
                  new string[] { "ErrorInfo", "ErrorCode", "Card", });
          pb::ExtensionRegistry registry = pb::ExtensionRegistry.CreateInstance();
          RegisterAllExtensions(registry);
          return registry;
        };
        pbd::FileDescriptor.InternalBuildGeneratedFileFrom(descriptorData,
            new pbd::FileDescriptor[] {
            }, assigner);
      }
      #endregion

    }
  }
  #region Messages
  [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  public sealed partial class A1018Response : pb::GeneratedMessage<A1018Response, A1018Response.Builder> {
    private A1018Response() { }
    private static readonly A1018Response defaultInstance = new A1018Response().MakeReadOnly();
    private static readonly string[] _a1018ResponseFieldNames = new string[] { "Card", "ErrorCode", "ErrorInfo" };
    private static readonly uint[] _a1018ResponseFieldTags = new uint[] { 32, 16, 10 };
    public static A1018Response DefaultInstance {
      get { return defaultInstance; }
    }

    public override A1018Response DefaultInstanceForType {
      get { return DefaultInstance; }
    }

    protected override A1018Response ThisMessage {
      get { return this; }
    }

    public static pbd::MessageDescriptor Descriptor {
      get { return global::DolphinServer.ProtoEntity.Proto.A1018Response.internal__static_A1018Response__Descriptor; }
    }

    protected override pb::FieldAccess.FieldAccessorTable<A1018Response, A1018Response.Builder> InternalFieldAccessors {
      get { return global::DolphinServer.ProtoEntity.Proto.A1018Response.internal__static_A1018Response__FieldAccessorTable; }
    }

    public const int ErrorInfoFieldNumber = 1;
    private bool hasErrorInfo;
    private string errorInfo_ = "";
    public bool HasErrorInfo {
      get { return hasErrorInfo; }
    }
    public string ErrorInfo {
      get { return errorInfo_; }
    }

    public const int ErrorCodeFieldNumber = 2;
    private bool hasErrorCode;
    private int errorCode_;
    public bool HasErrorCode {
      get { return hasErrorCode; }
    }
    public int ErrorCode {
      get { return errorCode_; }
    }

    public const int CardFieldNumber = 4;
    private bool hasCard;
    private int card_;
    public bool HasCard {
      get { return hasCard; }
    }
    public int Card {
      get { return card_; }
    }

    public override bool IsInitialized {
      get {
        return true;
      }
    }

    public override void WriteTo(pb::ICodedOutputStream output) {
      CalcSerializedSize();
      string[] field_names = _a1018ResponseFieldNames;
      if (hasErrorInfo) {
        output.WriteString(1, field_names[2], ErrorInfo);
      }
      if (hasErrorCode) {
        output.WriteInt32(2, field_names[1], ErrorCode);
      }
      if (hasCard) {
        output.WriteInt32(4, field_names[0], Card);
      }
      UnknownFields.WriteTo(output);
    }

    private int memoizedSerializedSize = -1;
    public override int SerializedSize {
      get {
        int size = memoizedSerializedSize;
        if (size != -1) return size;
        return CalcSerializedSize();
      }
    }

    private int CalcSerializedSize() {
      int size = memoizedSerializedSize;
      if (size != -1) return size;

      size = 0;
      if (hasErrorInfo) {
        size += pb::CodedOutputStream.ComputeStringSize(1, ErrorInfo);
      }
      if (hasErrorCode) {
        size += pb::CodedOutputStream.ComputeInt32Size(2, ErrorCode);
      }
      if (hasCard) {
        size += pb::CodedOutputStream.ComputeInt32Size(4, Card);
      }
      size += UnknownFields.SerializedSize;
      memoizedSerializedSize = size;
      return size;
    }
    public static A1018Response ParseFrom(pb::ByteString data) {
      return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed();
    }
    public static A1018Response ParseFrom(pb::ByteString data, pb::ExtensionRegistry extensionRegistry) {
      return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed();
    }
    public static A1018Response ParseFrom(byte[] data) {
      return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed();
    }
    public static A1018Response ParseFrom(byte[] data, pb::ExtensionRegistry extensionRegistry) {
      return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed();
    }
    public static A1018Response ParseFrom(global::System.IO.Stream input) {
      return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed();
    }
    public static A1018Response ParseFrom(global::System.IO.Stream input, pb::ExtensionRegistry extensionRegistry) {
      return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry)).BuildParsed();
    }
    public static A1018Response ParseDelimitedFrom(global::System.IO.Stream input) {
      return CreateBuilder().MergeDelimitedFrom(input).BuildParsed();
    }
    public static A1018Response ParseDelimitedFrom(global::System.IO.Stream input, pb::ExtensionRegistry extensionRegistry) {
      return CreateBuilder().MergeDelimitedFrom(input, extensionRegistry).BuildParsed();
    }
    public static A1018Response ParseFrom(pb::ICodedInputStream input) {
      return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed();
    }
    public static A1018Response ParseFrom(pb::ICodedInputStream input, pb::ExtensionRegistry extensionRegistry) {
      return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry)).BuildParsed();
    }
    private A1018Response MakeReadOnly() {
      return this;
    }

    public static Builder CreateBuilder() { return new Builder(); }
    public override Builder ToBuilder() { return CreateBuilder(this); }
    public override Builder CreateBuilderForType() { return new Builder(); }
    public static Builder CreateBuilder(A1018Response prototype) {
      return new Builder(prototype);
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
    public sealed partial class Builder : pb::GeneratedBuilder<A1018Response, Builder> {
      protected override Builder ThisBuilder {
        get { return this; }
      }
      public Builder() {
        result = DefaultInstance;
        resultIsReadOnly = true;
      }
      internal Builder(A1018Response cloneFrom) {
        result = cloneFrom;
        resultIsReadOnly = true;
      }

      private bool resultIsReadOnly;
      private A1018Response result;

      private A1018Response PrepareBuilder() {
        if (resultIsReadOnly) {
          A1018Response original = result;
          result = new A1018Response();
          resultIsReadOnly = false;
          MergeFrom(original);
        }
        return result;
      }

      public override bool IsInitialized {
        get { return result.IsInitialized; }
      }

      protected override A1018Response MessageBeingBuilt {
        get { return PrepareBuilder(); }
      }

      public override Builder Clear() {
        result = DefaultInstance;
        resultIsReadOnly = true;
        return this;
      }

      public override Builder Clone() {
        if (resultIsReadOnly) {
          return new Builder(result);
        } else {
          return new Builder().MergeFrom(result);
        }
      }

      public override pbd::MessageDescriptor DescriptorForType {
        get { return global::DolphinServer.ProtoEntity.A1018Response.Descriptor; }
      }

      public override A1018Response DefaultInstanceForType {
        get { return global::DolphinServer.ProtoEntity.A1018Response.DefaultInstance; }
      }

      public override A1018Response BuildPartial() {
        if (resultIsReadOnly) {
          return result;
        }
        resultIsReadOnly = true;
        return result.MakeReadOnly();
      }

      public override Builder MergeFrom(pb::IMessage other) {
        if (other is A1018Response) {
          return MergeFrom((A1018Response) other);
        } else {
          base.MergeFrom(other);
          return this;
        }
      }

      public override Builder MergeFrom(A1018Response other) {
        if (other == global::DolphinServer.ProtoEntity.A1018Response.DefaultInstance) return this;
        PrepareBuilder();
        if (other.HasErrorInfo) {
          ErrorInfo = other.ErrorInfo;
        }
        if (other.HasErrorCode) {
          ErrorCode = other.ErrorCode;
        }
        if (other.HasCard) {
          Card = other.Card;
        }
        this.MergeUnknownFields(other.UnknownFields);
        return this;
      }

      public override Builder MergeFrom(pb::ICodedInputStream input) {
        return MergeFrom(input, pb::ExtensionRegistry.Empty);
      }

      public override Builder MergeFrom(pb::ICodedInputStream input, pb::ExtensionRegistry extensionRegistry) {
        PrepareBuilder();
        pb::UnknownFieldSet.Builder unknownFields = null;
        uint tag;
        string field_name;
        while (input.ReadTag(out tag, out field_name)) {
          if(tag == 0 && field_name != null) {
            int field_ordinal = global::System.Array.BinarySearch(_a1018ResponseFieldNames, field_name, global::System.StringComparer.Ordinal);
            if(field_ordinal >= 0)
              tag = _a1018ResponseFieldTags[field_ordinal];
            else {
              if (unknownFields == null) {
                unknownFields = pb::UnknownFieldSet.CreateBuilder(this.UnknownFields);
              }
              ParseUnknownField(input, unknownFields, extensionRegistry, tag, field_name);
              continue;
            }
          }
          switch (tag) {
            case 0: {
              throw pb::InvalidProtocolBufferException.InvalidTag();
            }
            default: {
              if (pb::WireFormat.IsEndGroupTag(tag)) {
                if (unknownFields != null) {
                  this.UnknownFields = unknownFields.Build();
                }
                return this;
              }
              if (unknownFields == null) {
                unknownFields = pb::UnknownFieldSet.CreateBuilder(this.UnknownFields);
              }
              ParseUnknownField(input, unknownFields, extensionRegistry, tag, field_name);
              break;
            }
            case 10: {
              result.hasErrorInfo = input.ReadString(ref result.errorInfo_);
              break;
            }
            case 16: {
              result.hasErrorCode = input.ReadInt32(ref result.errorCode_);
              break;
            }
            case 32: {
              result.hasCard = input.ReadInt32(ref result.card_);
              break;
            }
          }
        }

        if (unknownFields != null) {
          this.UnknownFields = unknownFields.Build();
        }
        return this;
      }

      public bool HasErrorInfo {
        get { return result.hasErrorInfo; }
      }
      public string ErrorInfo {
        get { return result.ErrorInfo; }
        set { SetErrorInfo(value); }
      }
      public Builder SetErrorInfo(string value) {
        pb::ThrowHelper.ThrowIfNull(value, "value");
        PrepareBuilder();
        result.hasErrorInfo = true;
        result.errorInfo_ = value;
        return this;
      }
      public Builder ClearErrorInfo() {
        PrepareBuilder();
        result.hasErrorInfo = false;
        result.errorInfo_ = "";
        return this;
      }

      public bool HasErrorCode {
        get { return result.hasErrorCode; }
      }
      public int ErrorCode {
        get { return result.ErrorCode; }
        set { SetErrorCode(value); }
      }
      public Builder SetErrorCode(int value) {
        PrepareBuilder();
        result.hasErrorCode = true;
        result.errorCode_ = value;
        return this;
      }
      public Builder ClearErrorCode() {
        PrepareBuilder();
        result.hasErrorCode = false;
        result.errorCode_ = 0;
        return this;
      }

      public bool HasCard {
        get { return result.hasCard; }
      }
      public int Card {
        get { return result.Card; }
        set { SetCard(value); }
      }
      public Builder SetCard(int value) {
        PrepareBuilder();
        result.hasCard = true;
        result.card_ = value;
        return this;
      }
      public Builder ClearCard() {
        PrepareBuilder();
        result.hasCard = false;
        result.card_ = 0;
        return this;
      }
    }
    static A1018Response() {
      object.ReferenceEquals(global::DolphinServer.ProtoEntity.Proto.A1018Response.Descriptor, null);
    }
  }

  #endregion

}

#endregion Designer generated code


text:
package manager

import (
	"reflect"
	"testing"
	"time"

	"github.com/google/cadvisor/container"
	"github.com/google/cadvisor/info"
	itest "github.com/google/cadvisor/info/test"
	stest "github.com/google/cadvisor/storage/test"
)

func createManagerAndAddContainers(
	driver *stest.MockStorageDriver,
	containers []string,
	f func(*container.MockContainerHandler),
	t *testing.T,
) *manager {
	if driver == nil {
		driver = &stest.MockStorageDriver{}
	}
	container.ClearContainerHandlerFactories()
	mif, err := New(driver)
	if err != nil {
		t.Fatal(err)
	}
	if ret, ok := mif.(*manager); ok {
		for _, name := range containers {
			mockHandler := container.NewMockContainerHandler(name)
			ret.containers[name], err = newContainerData(name, driver, mockHandler, false)
			if err != nil {
				t.Fatal(err)
			}
			f(mockHandler)
		}
		return ret
	}
	t.Fatal("Wrong type")
	return nil
}

// Expect a manager with the specified containers and query. Returns the manager, map of ContainerInfo objects,
// and map of MockContainerHandler objects.}
func expectManagerWithContainers(containers []string, query *info.ContainerInfoRequest, t *testing.T) (*manager, map[string]*info.ContainerInfo, map[string]*container.MockContainerHandler) {
	infosMap := make(map[string]*info.ContainerInfo, len(containers))
	handlerMap := make(map[string]*container.MockContainerHandler, len(containers))

	for _, container := range containers {
		infosMap[container] = itest.GenerateRandomContainerInfo(container, 4, query, 1*time.Second)
	}

	driver := &stest.MockStorageDriver{}
	m := createManagerAndAddContainers(
		driver,
		containers,
		func(h *container.MockContainerHandler) {
			cinfo := infosMap[h.Name]
			stats := cinfo.Stats
			spec := cinfo.Spec
			driver.On(
				"RecentStats",
				h.Name,
				query.NumStats,
			).Return(
				stats,
				nil,
			)

			h.On("ListContainers", container.ListSelf).Return(
				[]info.ContainerReference(nil),
				nil,
			)
			h.On("GetSpec").Return(
				spec,
				nil,
			)
			handlerMap[h.Name] = h
		},
		t,
	)

	return m, infosMap, handlerMap
}

func TestGetContainerInfo(t *testing.T) {
	containers := []string{
		"/c1",
		"/c2",
	}

	query := &info.ContainerInfoRequest{
		NumStats: 256,
	}

	m, infosMap, handlerMap := expectManagerWithContainers(containers, query, t)

	returnedInfos := make(map[string]*info.ContainerInfo, len(containers))

	for _, container := range containers {
		cinfo, err := m.GetContainerInfo(container, query)
		if err != nil {
			t.Fatalf("Unable to get info for container %v: %v", container, err)
		}
		returnedInfos[container] = cinfo
	}

	for container, handler := range handlerMap {
		handler.AssertExpectations(t)
		returned := returnedInfos[container]
		expected := infosMap[container]
		if !reflect.DeepEqual(returned, expected) {
			t.Errorf("returned unexpected info for container %v; returned %+v; expected %+v", container, returned, expected)
		}
	}

}

func TestSubcontainersInfo(t *testing.T) {
	containers := []string{
		"/c1",
		"/c2",
	}

	query := &info.ContainerInfoRequest{
		NumStats: 64,
	}

	m, _, _ := expectManagerWithContainers(containers, query, t)

	result, err := m.SubcontainersInfo("/", query)
	if err != nil {
		t.Fatalf("expected to succeed: %s", err)
	}
	if len(result) != len(containers) {
		t.Errorf("expected to received containers: %v, but received: %v", containers, result)
	}
	for _, res := range result {
		found := false
		for _, name := range containers {
			if res.Name == name {
				found = true
				break
			}
		}
		if !found {
			t.Errorf("unexpected container %q in result, expected one of %v", res.Name, containers)
		}
	}
}

func TestDockerContainersInfo(t *testing.T) {
	containers := []string{
		"/docker/c1",
	}

	query := &info.ContainerInfoRequest{
		NumStats: 2,
	}

	m, _, _ := expectManagerWithContainers(containers, query, t)

	result, err := m.DockerContainersInfo("c1", query)
	if err != nil {
		t.Fatalf("expected to succeed: %s", err)
	}
	if len(result) != len(containers) {
		t.Errorf("expected to received a containers %v, but received: %v", containers, result)
	}
	if result[0].Name != containers[0] {
		t.Errorf("Unexpected container %q in result. Expected container %q", result[0].Name, containers[0])
	}
}

func TestNew(t *testing.T) {
	manager, err := New(&stest.MockStorageDriver{})
	if err != nil {
		t.Fatalf("Expected manager.New to succeed: %s", err)
	}
	if manager == nil {
		t.Fatalf("Expected returned manager to not be nil")
	}
}

func TestNewNilManager(t *testing.T) {
	_, err := New(nil)
	if err == nil {
		t.Fatalf("Expected nil manager to return error")
	}
}


text:
<?xml version="1.0" encoding="ascii"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
          "DTD/xhtml1-transitional.dtd">

  <title>rcssmin</title>
  <link rel="stylesheet" href="epydoc.css" type="text/css" />

         Home

         Trees

         Indices

         Help

Visit rcssmin Online

        Module rcssmin

Module rcssmin

source code

CSS Minifier.

The minifier is based on the semantics of the YUI compressor, which
itself is based on the rule list by Isaac Schlueter.

This module is a re-implementation aiming for speed instead of maximum
compression, so it can be used at runtime (rather than during a preprocessing
step). RCSSmin does syntactical compression only (removing spaces, comments
and possibly semicolons). It does not provide semantic compression (like
removing empty blocks, collapsing redundant properties etc). It does, however,
support various CSS hacks (by keeping them working as intended).

Here's a feature list:

Strings are kept, except that escaped newlines are stripped

Space/Comments before the very end or before various characters are
stripped: <tt class="rst-docutils literal">:{});=>],!</tt> (The colon (<tt class="rst-docutils literal">:</tt>) is a special case, a single
space is kept if it's outside a ruleset.)

Space/Comments at the very beginning or after various characters are
stripped: <tt class="rst-docutils literal">{}(=:>[,!</tt>

Optional space after unicode escapes is kept, resp. replaced by a simple
space

whitespaces inside <tt class="rst-docutils literal">url()</tt> definitions are stripped

Comments starting with an exclamation mark (<tt class="rst-docutils literal">!</tt>) can be kept optionally.

All other comments and/or whitespace characters are replaced by a single
space.

Multiple consecutive semicolons are reduced to one

The last semicolon within a ruleset is stripped

CSS Hacks supported:

IE7 hack (<tt class="rst-docutils literal">>/**/</tt>)

Mac-IE5 hack (<tt class="rst-docutils literal">/*\*/.../**/</tt>)

The boxmodelhack is supported naturally because it relies on valid CSS2
strings

Between <tt class="rst-docutils literal">:first-line</tt> and the following comma or curly brace a space is
inserted. (apparently it's needed for IE6)

Same for <tt class="rst-docutils literal">:first-letter</tt>

rcssmin.c is a reimplementation of rcssmin.py in C and improves runtime up to
factor 100 or so (depending on the input). docs/BENCHMARKS in the source
distribution contains the details.

Both python 2 (>= 2.4) and python 3 are supported.

Copyright:
        Copyright 2011 - 2015
André Malo or his licensors, as applicable

License:

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

Version:
        1.0.6

Author:
        André Malo

    Functions

      <tt class="rst-docutils literal">str</tt>

          cssmin(style,
        keep_bang_comments=False)

      Minify CSS.

            source code

    Function Details

cssmin(style,
        keep_bang_comments=False)

  	source code

  Minify CSS.

Parameters:

style (<tt class="rst-docutils literal">str</tt>) - CSS to minify

keep_bang_comments (<tt class="rst-docutils literal">bool</tt>) - Keep comments starting with an exclamation mark? (<tt class="rst-docutils literal">/*!...*/</tt>)

Returns: <tt class="rst-docutils literal">str</tt>

Minified style

         Home

         Trees

         Indices

         Help

Visit rcssmin Online


text:
require 'active_support'
require "filterize/version"
require "filterize/helpers"
#require "filterize/railtie" if defined? Rails

module Filterize

end


text:
author: "B. Maniymaran and M. Maheswaran"
title: "On the Benefits of Profile-Based Naming for Large Network Computing Systems"
journal: "16th International Conference on Parallel and Distributed Computing and Systems (PDCS 2004)"
location: "Cambridge, Massachusetts, USA"
date: 2004-11-01
---