text:
package net.runelite.api;

/**
 * Represents the buffer containing all messages in the chatbox.
 */
public interface ChatLineBuffer
{
	/**
	 * Gets an array of message nodes currently in the chatbox.
	 *
	 * @return messages in the chatbox
	 */
	MessageNode[] getLines();

	/**
	 * Gets the length of the {@link #getLines()} array.
	 *
	 * @return the length
	 */
	int getLength();

	/**
	 * Removes a message node.
	 *
	 * This method modifies the underlying MessageNode array. If removing multiple MessageNodes at a time,
	 * clone the original {@link #getLines()} array; as items in the array will get modified and be left in an
	 * inconsistent state.
	 *
	 * @param node the {@link MessageNode} to remove
	 */
	void removeMessageNode(MessageNode node);
}


text:
package org.apache.derby.impl.sql.compile;

import org.apache.derby.iapi.error.StandardException;
import org.apache.derby.iapi.sql.compile.Visitable;
import org.apache.derby.iapi.sql.compile.Visitor;

/**
 * Replaces a source expression with a target
 * expression.
 *
 */
class SubstituteExpressionVisitor implements Visitor
{
	private ValueNode source;
	private ValueNode target;
    private Class<?>  skipOverClass;

	SubstituteExpressionVisitor(
            ValueNode s, ValueNode t, Class<?> skipThisClass)
	{
		source = s;
		target = t;
		skipOverClass = skipThisClass;
	}

	/**
	 * used by GroupByNode to process expressions by complexity level.
	 */
    ValueNode getSource()
	{
		return source;
	}

	public Visitable visit(Visitable node) throws StandardException
	{
		if (!(node instanceof ValueNode))
		{
			return node;
		}

		ValueNode nd = (ValueNode)node;
		if (nd.isEquivalent(source))
		{
			return target;
		}
		else
		{
			return node;
		}
	}

	public boolean stopTraversal()
	{
		return false;
	}

	public boolean skipChildren(Visitable node)
	{
		return (skipOverClass == null) ?
				false:
				skipOverClass.isInstance(node);
	}

	public boolean visitChildrenFirst(Visitable node)
	{
		return false;
	}
}

redpajama_set_name: RedPajamaGithub


text:
using System;
using System.Collections.Generic;
using System.Drawing;
using System.Linq;
using MetroRadiance.Interop;

namespace SylphyHorn.Interop
{
	public static class IconHelper
	{
		public static Icon GetIconFromResource(Uri uri)
		{
			var streamResourceInfo = System.Windows.Application.GetResourceStream(uri);
			if (streamResourceInfo == null) throw new ArgumentException("Resource not found.", nameof(uri));

			var dpi = PerMonitorDpi.GetDpi(IntPtr.Zero); // get desktop dpi

			using (var stream = streamResourceInfo.Stream)
			{
				return new Icon(stream, new Size((int)(16 * dpi.ScaleX), (int)(16 * dpi.ScaleY)));
			}
		}
	}
}


text:
#pragma warning disable 0472,0414
using System;
using System.Text;
using System.IO;
using System.Collections;
using System.ComponentModel;
using System.Collections.Generic;
using System.Collections.Specialized;
using System.Linq;
using System.Xml.Serialization;
using BLToolkit.Aspects;
using BLToolkit.DataAccess;
using BLToolkit.EditableObjects;
using BLToolkit.Data;
using BLToolkit.Data.DataProvider;
using BLToolkit.Mapping;
using BLToolkit.Reflection;
using bv.common.Configuration;
using bv.common.Enums;
using bv.common.Core;
using bv.model.BLToolkit;
using bv.model.Model;
using bv.model.Helpers;
using bv.model.Model.Extenders;
using bv.model.Model.Core;
using bv.model.Model.Handlers;
using bv.model.Model.Validators;
using eidss.model.Core;
using eidss.model.Enums;

namespace eidss.model.Schema
{

    [XmlType(AnonymousType = true)]
    public abstract partial class UserGroupListItem :
        EditableObject<UserGroupListItem>
        , IObject
        , IDisposable
        , ILookupUsage
        {

        [MapField(_str_idfEmployeeGroup), NonUpdatable, PrimaryKey]
        public abstract Int64 idfEmployeeGroup { get; set; }

        [LocalizedDisplayName(_str_idfsEmployeeGroupName)]
        [MapField(_str_idfsEmployeeGroupName)]
        public abstract Int64? idfsEmployeeGroupName { get; set; }
        protected Int64? idfsEmployeeGroupName_Original { get { return ((EditableValue<Int64?>)((dynamic)this)._idfsEmployeeGroupName).OriginalValue; } }
        protected Int64? idfsEmployeeGroupName_Previous { get { return ((EditableValue<Int64?>)((dynamic)this)._idfsEmployeeGroupName).PreviousValue; } }

        [LocalizedDisplayName("strGroupName")]
        [MapField(_str_strName)]
        public abstract String strName { get; set; }
        protected String strName_Original { get { return ((EditableValue<String>)((dynamic)this)._strName).OriginalValue; } }
        protected String strName_Previous { get { return ((EditableValue<String>)((dynamic)this)._strName).PreviousValue; } }

        [LocalizedDisplayName(_str_strDescription)]
        [MapField(_str_strDescription)]
        public abstract String strDescription { get; set; }
        protected String strDescription_Original { get { return ((EditableValue<String>)((dynamic)this)._strDescription).OriginalValue; } }
        protected String strDescription_Previous { get { return ((EditableValue<String>)((dynamic)this)._strDescription).PreviousValue; } }

        #region Set/Get values
        #region filed_info definifion
        protected class field_info
        {
            internal string _name;
            internal string _formname;
            internal string _type;
            internal Func<UserGroupListItem, object> _get_func;
            internal Action<UserGroupListItem, string> _set_func;
            internal Action<UserGroupListItem, UserGroupListItem, CompareModel, DbManagerProxy> _compare_func;
        }
        internal const string _str_Parent = "Parent";
        internal const string _str_IsNew = "IsNew";

        internal const string _str_idfEmployeeGroup = "idfEmployeeGroup";
        internal const string _str_idfsEmployeeGroupName = "idfsEmployeeGroupName";
        internal const string _str_strName = "strName";
        internal const string _str_strDescription = "strDescription";
        private static readonly field_info[] _field_infos =
        {

            new field_info {
              _name = _str_idfEmployeeGroup, _formname = _str_idfEmployeeGroup, _type = "Int64",
              _get_func = o => o.idfEmployeeGroup,
              _set_func = (o, val) => { var newval = ParsingHelper.ParseInt64(val); if (o.idfEmployeeGroup != newval) o.idfEmployeeGroup = newval; },
              _compare_func = (o, c, m, g) => {
                if (o.idfEmployeeGroup != c.idfEmployeeGroup || o.IsRIRPropChanged(_str_idfEmployeeGroup, c))
                  m.Add(_str_idfEmployeeGroup, o.ObjectIdent + _str_idfEmployeeGroup, o.ObjectIdent2 + _str_idfEmployeeGroup, o.ObjectIdent3 + _str_idfEmployeeGroup, "Int64",
                    o.idfEmployeeGroup == null ? "" : o.idfEmployeeGroup.ToString(),
                  o.IsReadOnly(_str_idfEmployeeGroup), o.IsInvisible(_str_idfEmployeeGroup), o.IsRequired(_str_idfEmployeeGroup));
                  }
              },

            new field_info {
              _name = _str_idfsEmployeeGroupName, _formname = _str_idfsEmployeeGroupName, _type = "Int64?",
              _get_func = o => o.idfsEmployeeGroupName,
              _set_func = (o, val) => { var newval = ParsingHelper.ParseInt64Nullable(val); if (o.idfsEmployeeGroupName != newval) o.idfsEmployeeGroupName = newval; },
              _compare_func = (o, c, m, g) => {
                if (o.idfsEmployeeGroupName != c.idfsEmployeeGroupName || o.IsRIRPropChanged(_str_idfsEmployeeGroupName, c))
                  m.Add(_str_idfsEmployeeGroupName, o.ObjectIdent + _str_idfsEmployeeGroupName, o.ObjectIdent2 + _str_idfsEmployeeGroupName, o.ObjectIdent3 + _str_idfsEmployeeGroupName, "Int64?",
                    o.idfsEmployeeGroupName == null ? "" : o.idfsEmployeeGroupName.ToString(),
                  o.IsReadOnly(_str_idfsEmployeeGroupName), o.IsInvisible(_str_idfsEmployeeGroupName), o.IsRequired(_str_idfsEmployeeGroupName));
                  }
              },

            new field_info {
              _name = _str_strName, _formname = _str_strName, _type = "String",
              _get_func = o => o.strName,
              _set_func = (o, val) => { var newval = ParsingHelper.ParseString(val); if (o.strName != newval) o.strName = newval; },
              _compare_func = (o, c, m, g) => {
                if (o.strName != c.strName || o.IsRIRPropChanged(_str_strName, c))
                  m.Add(_str_strName, o.ObjectIdent + _str_strName, o.ObjectIdent2 + _str_strName, o.ObjectIdent3 + _str_strName, "String",
                    o.strName == null ? "" : o.strName.ToString(),
                  o.IsReadOnly(_str_strName), o.IsInvisible(_str_strName), o.IsRequired(_str_strName));
                  }
              },

            new field_info {
              _name = _str_strDescription, _formname = _str_strDescription, _type = "String",
              _get_func = o => o.strDescription,
              _set_func = (o, val) => { var newval = ParsingHelper.ParseString(val); if (o.strDescription != newval) o.strDescription = newval; },
              _compare_func = (o, c, m, g) => {
                if (o.strDescription != c.strDescription || o.IsRIRPropChanged(_str_strDescription, c))
                  m.Add(_str_strDescription, o.ObjectIdent + _str_strDescription, o.ObjectIdent2 + _str_strDescription, o.ObjectIdent3 + _str_strDescription, "String",
                    o.strDescription == null ? "" : o.strDescription.ToString(),
                  o.IsReadOnly(_str_strDescription), o.IsInvisible(_str_strDescription), o.IsRequired(_str_strDescription));
                  }
              },

            new field_info()
        };
        #endregion

        private string _getType(string name)
        {
            var i = _field_infos.FirstOrDefault(n => n._name == name);
            return i == null ? "" : i._type;
        }
        private object _getValue(string name)
        {
            var i = _field_infos.FirstOrDefault(n => n._name == name);
            return i == null ? null : i._get_func(this);
        }
        private void _setValue(string name, string val)
        {
            var i = _field_infos.FirstOrDefault(n => n._name == name);
            if (i != null) i._set_func(this, val);
        }
        internal CompareModel _compare(IObject o, CompareModel ret)
        {
            if (ret == null) ret = new CompareModel();
            if (o == null) return ret;
            UserGroupListItem obj = (UserGroupListItem)o;
            using (DbManagerProxy manager = DbManagerFactory.Factory.Create(ModelUserContext.Instance))
            {
                Accessor.Instance(null)._LoadLookups(manager, obj);
                foreach (var i in _field_infos)
                    if (i != null && i._compare_func != null) i._compare_func(this, obj, ret, manager);
            }
            return ret;
        }
        #endregion

        private BvSelectList _getList(string name)
        {

            return null;
        }

        protected CacheScope m_CS;
        protected Accessor _getAccessor() { return Accessor.Instance(m_CS); }
        private IObjectPermissions m_permissions = null;
        internal IObjectPermissions _permissions { get { return m_permissions; } set { m_permissions = value; } }
        internal string m_ObjectName = "UserGroupListItem";

        #region Parent and Clone supporting
        [XmlIgnore]
        public IObject Parent
        {
            get { return m_Parent; }
            set { m_Parent = value; /*OnPropertyChanged(_str_Parent);*/ }
        }
        private IObject m_Parent;
        internal void _setParent()
        {

        }
        partial void Cloned();
        partial void ClonedWithSetup();
        private bool bIsClone;
        public override object Clone()
        {
            var ret = base.Clone() as UserGroupListItem;
            ret.bIsClone = true;
            ret.Cloned();
            ret.m_Parent = this.Parent;
            ret.m_IsMarkedToDelete = this.m_IsMarkedToDelete;
            ret.m_IsForcedToDelete = this.m_IsForcedToDelete;
            ret._setParent();
            if (this.IsDirty && !ret.IsDirty)
                ret.SetChange();
            else if (!this.IsDirty && ret.IsDirty)
                ret.RejectChanges();
            return ret;
        }
        public IObject CloneWithSetup(DbManagerProxy manager, bool bRestricted = false)
        {
            var ret = base.Clone() as UserGroupListItem;
            ret.m_Parent = this.Parent;
            ret.m_IsMarkedToDelete = this.m_IsMarkedToDelete;
            ret.m_IsForcedToDelete = this.m_IsForcedToDelete;
            ret.m_IsNew = this.IsNew;
            ret.m_ObjectName = this.m_ObjectName;

            Accessor.Instance(null)._SetupLoad(manager, ret, true);
            ret.ClonedWithSetup();
            ret.DeepAcceptChanges();
            ret._setParent();
            ret._permissions = _permissions;
            return ret;
        }
        public UserGroupListItem CloneWithSetup()
        {
            using (DbManagerProxy manager = DbManagerFactory.Factory.Create(ModelUserContext.Instance))
            {
                return CloneWithSetup(manager) as UserGroupListItem;
            }
        }
        #endregion

        #region IObject implementation
        public object Key { get { return idfEmployeeGroup; } }
        public string KeyName { get { return "idfEmployeeGroup"; } }
        public object KeyLookup { get { return idfEmployeeGroup; } }
        public string ToStringProp { get { return ToString(); } }
        private bool m_IsNew;
        public bool IsNew { get { return m_IsNew; } }
        [XmlIgnore]
        [LocalizedDisplayName("HasChanges")]
        public bool HasChanges
        {
            get
            {
                return IsDirty

                ;
            }
        }
        public new void RejectChanges()
        {

            base.RejectChanges();

        }
        public void DeepRejectChanges()
        {
            RejectChanges();

        }
        public void DeepAcceptChanges()
        {
            AcceptChanges();

        }
        private bool m_bForceDirty;
        public override void AcceptChanges()
        {
            m_bForceDirty = false;
            base.AcceptChanges();
        }
        [XmlIgnore]
        [LocalizedDisplayName("IsDirty")]
        public override bool IsDirty
        {
            get { return m_bForceDirty || base.IsDirty; }
        }
        public void SetChange()
        {
            m_bForceDirty = true;
        }
        public void DeepSetChange()
        {
            SetChange();

        }
        public bool MarkToDelete() { return _Delete(false); }
        public string ObjectName { get { return m_ObjectName; } }
        public string ObjectIdent { get { return ObjectName + "_" + Key.ToString() + "_"; } }

        public string ObjectIdent2 { get { return ObjectIdent; } }

        public string ObjectIdent3 { get { return ObjectIdent; } }

        public IObjectAccessor GetAccessor() { return _getAccessor(); }
        public IObjectPermissions GetPermissions() { return _permissions; }
        private IObjectEnvironment _environment;
        public IObjectEnvironment Environment { get { return _environment; } set { _environment = value; } }
        public bool IsValidObject { get { return _isValid; } }
        public bool ReadOnly { get { return _readOnly || !_isValid; } set { _readOnly = value; } }
        public bool IsReadOnly(string name) { return _isReadOnly(name); }
        public bool IsInvisible(string name) { return _isInvisible(name); }
        public bool IsRequired(string name) { return _isRequired(m_isRequired, name); }
        public bool IsHiddenPersonalData(string name) { return _isHiddenPersonalData(name); }
        public string GetType(string name) { return _getType(name); }
        public object GetValue(string name) { return _getValue(name); }
        public void SetValue(string name, string val) { _setValue(name, val); }
        public CompareModel Compare(IObject o) { return _compare(o, null); }
        public BvSelectList GetList(string name) { return _getList(name); }
        public event ValidationEvent Validation;
        public event ValidationEvent ValidationEnd;
        public event AfterPostEvent AfterPost;

        public Dictionary<string, string> GetFieldTags(string name)
        {
          return null;
        }
      #endregion

        private bool IsRIRPropChanged(string fld, UserGroupListItem c)
        {
            return IsReadOnly(fld) != c.IsReadOnly(fld) || IsInvisible(fld) != c.IsInvisible(fld) || IsRequired(fld) != c._isRequired(m_isRequired, fld);
        }
        private bool IsLookupContentChanged(DbManagerProxy manager, string fld, UserGroupListItem c)
        {
            var thisLookup = GetValue(fld + "Lookup") as IList;
            var thatLookup = c.GetValue(fld + "Lookup") as IList;
            bool bChangeLookupContent = thisLookup.Count != thatLookup.Count;
            if (!bChangeLookupContent)
            {
                for (int i = 0; i < thisLookup.Count; i++)
                {
                    if (((thisLookup[i] as IObject).Key as IComparable).CompareTo((thatLookup[i] as IObject).Key) != 0 &&
                        (thisLookup[i] as IObject).ToStringProp != null && ((thisLookup[i] as IObject).ToStringProp as IComparable).CompareTo((thatLookup[i] as IObject).ToStringProp) != 0)
                    {
                        bChangeLookupContent = true;
                        break;
                    }
                }
            }
            return bChangeLookupContent;
        }

        public UserGroupListItem()
        {

            m_permissions = new Permissions(this);

        }

        partial void Changed(string fieldName);
        partial void Created(DbManagerProxy manager);
        partial void Loaded(DbManagerProxy manager);
        partial void Deleted();
        partial void ParsedFormCollection(NameValueCollection form);
        partial void ParsingFormCollection(NameValueCollection form);

        private bool m_IsForcedToDelete;
        [LocalizedDisplayName("IsForcedToDelete")]
        public bool IsForcedToDelete { get { return m_IsForcedToDelete; } }

        private bool m_IsMarkedToDelete;
        [LocalizedDisplayName("IsMarkedToDelete")]
        public bool IsMarkedToDelete { get { return m_IsMarkedToDelete; } }

        public void _SetupMainHandler()
        {
            PropertyChanged += new System.ComponentModel.PropertyChangedEventHandler(UserGroupListItem_PropertyChanged);
        }
        public void _RevokeMainHandler()
        {
            PropertyChanged -= new System.ComponentModel.PropertyChangedEventHandler(UserGroupListItem_PropertyChanged);
        }
        private void UserGroupListItem_PropertyChanged(object sender, System.ComponentModel.PropertyChangedEventArgs e)
        {
            (sender as UserGroupListItem).Changed(e.PropertyName);

        }

        public bool ForceToDelete() { return _Delete(true); }
        internal bool _Delete(bool isForceDelete)
        {
            if (!_ValidateOnDelete()) return false;
            _DeletingExtenders();
            m_IsMarkedToDelete = true;
            m_IsForcedToDelete = m_IsForcedToDelete ? m_IsForcedToDelete : isForceDelete;
            OnPropertyChanged("IsMarkedToDelete");
            _DeletedExtenders();
            Deleted();
            return true;
        }
        private bool _ValidateOnDelete(bool bReport = true)
        {

            return true;

        }
        private void _DeletingExtenders()
        {
            UserGroupListItem obj = this;

        }
        private void _DeletedExtenders()
        {
            UserGroupListItem obj = this;

        }

        public bool OnValidation(ValidationModelException ex)
        {
            if (Validation != null)
            {
                var args = new ValidationEventArgs(ex.MessageId, ex.FieldName, ex.PropertyName, ex.Pars, ex.ValidatorType, ex.Obj, ex.ValidationType);
                Validation(this, args);
                return args.Continue;
            }
            return false;
        }
        public bool OnValidationEnd(ValidationModelException ex)
        {
            if (ValidationEnd != null)
            {
                var args = new ValidationEventArgs(ex.MessageId, ex.FieldName, ex.PropertyName, ex.Pars, ex.ValidatorType, ex.Obj, ex.ValidationType);
                ValidationEnd(this, args);
                return args.Continue;
            }
            return false;
        }

        public void OnAfterPost()
        {
            if (AfterPost != null)
            {
                AfterPost(this, EventArgs.Empty);
            }
        }

        public FormSize FormSize
        {
            get { return FormSize.Undefined; }
        }

        private bool _isInvisible(string name)
        {

            return false;

        }

        private bool _isReadOnly(string name)
        {

            return ReadOnly;

        }

        private bool m_isValid = true;
        internal bool _isValid
        {
            get { return m_isValid; }
            set
            {
                m_isValid = value;

            }
        }

        private bool m_readOnly;
        private bool _readOnly
        {
            get { return m_readOnly; }
            set
            {
                m_readOnly = value;

            }
        }

        internal Dictionary<string, Func<UserGroupListItem, bool>> m_isRequired;
        private bool _isRequired(Dictionary<string, Func<UserGroupListItem, bool>> isRequiredDict, string name)
        {
            if (isRequiredDict != null && isRequiredDict.ContainsKey(name))
                return isRequiredDict[name](this);
            return false;
        }

        public void AddRequired(string name, Func<UserGroupListItem, bool> func)
        {
            if (m_isRequired == null)
                m_isRequired = new Dictionary<string, Func<UserGroupListItem, bool>>();
            if (!m_isRequired.ContainsKey(name))
                m_isRequired.Add(name, func);
        }

    internal Dictionary<string, Func<UserGroupListItem, bool>> m_isHiddenPersonalData;
    private bool _isHiddenPersonalData(string name)
    {
      if (m_isHiddenPersonalData != null && m_isHiddenPersonalData.ContainsKey(name))
        return m_isHiddenPersonalData[name](this);
      return false;
    }

    public void AddHiddenPersonalData(string name, Func<UserGroupListItem, bool> func)
    {
      if (m_isHiddenPersonalData == null)
        m_isHiddenPersonalData = new Dictionary<string, Func<UserGroupListItem, bool>>();
      if (!m_isHiddenPersonalData.ContainsKey(name))
        m_isHiddenPersonalData.Add(name, func);
    }

        #region IDisposable Members
        private bool bIsDisposed;
        protected bool bNeedLookupRemove;
        ~UserGroupListItem()
        {
            Dispose();
        }
        public void Dispose()
        {
            if (!bIsDisposed)
            {
                bIsDisposed = true;
                m_Parent = null;
                m_permissions = null;

                this.ClearModelObjEventInvocations();

                if (bNeedLookupRemove)
                {

                }
            }
            GC.SuppressFinalize(this);
        }
        #endregion

        #region ILookupUsage Members
        public void ReloadLookupItem(DbManagerProxy manager, string lookup_object)
        {

        }
        #endregion

        public void ParseFormCollection(NameValueCollection form, bool bParseLookups = true, bool bParseRelations = true)
        {
            ParsingFormCollection(form);
            if (bParseLookups)
            {
                _field_infos.Where(i => i._type == "Lookup").ToList().ForEach(a => { if (form[ObjectIdent + a._formname] != null) a._set_func(this, form[ObjectIdent + a._formname]);} );
            }

            _field_infos.Where(i => i._type != "Lookup" && i._type != "Child" && i._type != "Relation" && i._type != null)
                .ToList().ForEach(a => { if (form.AllKeys.Contains(ObjectIdent + a._formname)) a._set_func(this, form[ObjectIdent + a._formname]);} );

            if (bParseRelations)
            {

            }
            ParsedFormCollection(form);
        }

        #region Class for web grid
        public class UserGroupListItemGridModel : IGridModelItem
        {
            public string ErrorMessage { get; set; }
            public long ItemKey { get; set; }

            public Int64 idfEmployeeGroup { get; set; }

            public String strName { get; set; }

            public String strDescription { get; set; }

        }
        public partial class UserGroupListItemGridModelList : List<UserGroupListItemGridModel>, IGridModelList, IGridModelListLoad
        {
            public long ListKey { get; protected set; }
            public List<string> Columns { get; protected set; }
            public List<string> Hiddens { get; protected set; }
            public Dictionary<string, string> Labels { get; protected set; }
            public Dictionary<string, ActionMetaItem> Actions { get; protected set; }
            public List<string> Keys { get; protected set; }
            public bool IsHiddenPersonalData(string name) { return Meta._isHiddenPersonalData(name); }
            public IObjectMeta ObjectMeta { get { return Accessor.Instance(null); } }
            public UserGroupListItemGridModelList()
            {
            }
            public void Load(long key, IEnumerable items, string errMes)
            {
                LoadGridModelList(key, items as IEnumerable<UserGroupListItem>, errMes);
            }
            public UserGroupListItemGridModelList(long key, IEnumerable items, string errMes)
            {
                LoadGridModelList(key, items as IEnumerable<UserGroupListItem>, errMes);
            }
            public UserGroupListItemGridModelList(long key, IEnumerable<UserGroupListItem> items)
            {
                LoadGridModelList(key, items, null);
            }
            public UserGroupListItemGridModelList(long key)
            {
                LoadGridModelList(key, new List<UserGroupListItem>(), null);
            }
            partial void filter(List<UserGroupListItem> items);
            private void LoadGridModelList(long key, IEnumerable<UserGroupListItem> items, string errMes)
            {
                ListKey = key;

                Columns = new List<string> {_str_strName,_str_strDescription};

                Hiddens = new List<string> {_str_idfEmployeeGroup};
                Keys = new List<string> {_str_idfEmployeeGroup};
                Labels = new Dictionary<string, string> {{_str_strName, "strGroupName"},{_str_strDescription, _str_strDescription}};
                Actions = new Dictionary<string, ActionMetaItem> {};
                UserGroupListItem.Meta.Actions.ForEach(a => Actions.Add("@" + a.Name, a));
                var list = new List<UserGroupListItem>(items);
                filter(list);
                AddRange(list.Where(c => !c.IsMarkedToDelete).Select(c => new UserGroupListItemGridModel()
                {
                    ItemKey=c.idfEmployeeGroup,strName=c.strName,strDescription=c.strDescription
                }));
                if (Count > 0)
                {
                    this.Last().ErrorMessage = errMes;
                }
            }
        }
        #endregion

        #region Accessor
        public abstract partial class Accessor
        : DataAccessor<UserGroupListItem>
            , IObjectAccessor
            , IObjectMeta
            , IObjectValidator

            , IObjectPermissions

            , IObjectCreator
            , IObjectCreator<UserGroupListItem>

            , IObjectSelectList
            , IObjectSelectList<UserGroupListItem>

            , IObjectPost

        {
            #region IObjectAccessor
            public string KeyName { get { return "idfEmployeeGroup"; } }
            #endregion

            public delegate void on_action(UserGroupListItem obj);
            private static Accessor g_Instance = CreateInstance<Accessor>();
            private CacheScope m_CS;
            public static Accessor Instance(CacheScope cs)
            {
                if (cs == null)
                    return g_Instance;
                lock(cs)
                {
                    object acc = cs.Get(typeof (Accessor));
                    if (acc != null)
                    {
                        return acc as Accessor;
                    }
                    Accessor ret = CreateInstance<Accessor>();
                    ret.m_CS = cs;
                    cs.Add(typeof(Accessor), ret);
                    return ret;
                }
            }

            public virtual List<UserGroupListItem> SelectListT(DbManagerProxy manager
                , FilterParams filters = null
                , KeyValuePair<string, ListSortDirection>[] sorts = null
                , bool serverSort = false
                )
            {
                return _SelectList(manager
                , null, null
                , filters
                , sorts
                , serverSort
                );
            }
            public virtual List<IObject> SelectList(DbManagerProxy manager
                , FilterParams filters = null
                , KeyValuePair<string, ListSortDirection>[] sorts = null
                , bool serverSort = false
                )
            {
                return _SelectList(manager
                , null, null
                , filters
                , sorts
                , serverSort
                ).Cast<IObject>().ToList();
            }

            protected virtual List<UserGroupListItem> _SelectList(DbManagerProxy manager
                , on_action loading, on_action loaded
                , FilterParams filters
                , KeyValuePair<string, ListSortDirection>[] sorts
                , bool serverSort = false
                )
            {
                if (filters == null) filters = new FilterParams();

                var sql = new StringBuilder();
                string maxtop = BaseSettings.SelectTopMaxCount.ToString();
                sql.Append(@"select ");

                sql.Append(@"top ");
                sql.Append(maxtop);
                sql.Append(@" dbo.fn_UserGroup_SelectList.* from dbo.fn_UserGroup_SelectList(@LangID
                    ) ");

                sql.Append(" where 0 = 0");

                if (filters.Contains("idfEmployeeGroup"))
                {
                    sql.AppendFormat(" and (");
                    for (int i = 0; i < filters.Count("idfEmployeeGroup"); i++)
                    {
                        if (i > 0)
                          sql.AppendFormat(filters.IsOr("idfEmployeeGroup") ? " or " : " and ");

                        if (filters.Operation("idfEmployeeGroup", i) == "&")
                          sql.AppendFormat("(isnull(fn_UserGroup_SelectList.idfEmployeeGroup,0) {0} @idfEmployeeGroup_{1} = @idfEmployeeGroup_{1})", filters.Operation("idfEmployeeGroup", i), i);
                        else
                          sql.AppendFormat("isnull(fn_UserGroup_SelectList.idfEmployeeGroup,0) {0} @idfEmployeeGroup_{1}", filters.Operation("idfEmployeeGroup", i), i);

                    }
                    sql.AppendFormat(")");
                }

                if (filters.Contains("idfsEmployeeGroupName"))
                {
                    sql.AppendFormat(" and (");
                    for (int i = 0; i < filters.Count("idfsEmployeeGroupName"); i++)
                    {
                        if (i > 0)
                          sql.AppendFormat(filters.IsOr("idfsEmployeeGroupName") ? " or " : " and ");

                        if (filters.Operation("idfsEmployeeGroupName", i) == "&")
                          sql.AppendFormat("(isnull(fn_UserGroup_SelectList.idfsEmployeeGroupName,0) {0} @idfsEmployeeGroupName_{1} = @idfsEmployeeGroupName_{1})", filters.Operation("idfsEmployeeGroupName", i), i);
                        else
                          sql.AppendFormat("isnull(fn_UserGroup_SelectList.idfsEmployeeGroupName,0) {0} @idfsEmployeeGroupName_{1}", filters.Operation("idfsEmployeeGroupName", i), i);

                    }
                    sql.AppendFormat(")");
                }

                if (filters.Contains("strName"))
                {
                    sql.AppendFormat(" and (");
                    for (int i = 0; i < filters.Count("strName"); i++)
                    {
                        if (i > 0)
                          sql.AppendFormat(filters.IsOr("strName") ? " or " : " and ");

                        sql.AppendFormat("fn_UserGroup_SelectList.strName {0} @strName_{1}", filters.Operation("strName", i), i);

                    }
                    sql.AppendFormat(")");
                }

                if (filters.Contains("strDescription"))
                {
                    sql.AppendFormat(" and (");
                    for (int i = 0; i < filters.Count("strDescription"); i++)
                    {
                        if (i > 0)
                          sql.AppendFormat(filters.IsOr("strDescription") ? " or " : " and ");

                        sql.AppendFormat("fn_UserGroup_SelectList.strDescription {0} @strDescription_{1}", filters.Operation("strDescription", i), i);

                    }
                    sql.AppendFormat(")");
                }

                if (serverSort && sorts != null && sorts.Length > 0)
                {
                    sql.Append(" order by");
                    bool bFirst = true;
                        foreach(var sort in sorts)
                        {
                            sql.Append((bFirst ? " " : ", ") + sort.Key + " " + (sort.Value == ListSortDirection.Ascending ? "ASC" : "DESC"));
                            bFirst = false;
                        }
                }

                bool bTransactionStarted = false;
                try
                {
                    if (!manager.IsTransactionStarted)
                    {
                        bTransactionStarted = true;
                        manager.BeginTransaction(System.Data.IsolationLevel.ReadUncommitted);
                    }

                    sql.Append(" option (OPTIMIZE FOR UNKNOWN)");
                    manager
                        .SetCommand(sql.ToString()
                            , manager.Parameter("@LangID", ModelUserContext.CurrentLanguage)

                        );

                    if (filters.Contains("idfEmployeeGroup"))
                        for (int i = 0; i < filters.Count("idfEmployeeGroup"); i++)
                            manager.SelectCommand.Parameters.Add(manager.InputParameter("@idfEmployeeGroup_" + i, ParsingHelper.CorrectLikeValue(filters.Operation("idfEmployeeGroup", i), filters.Value("idfEmployeeGroup", i))));

                    if (filters.Contains("idfsEmployeeGroupName"))
                        for (int i = 0; i < filters.Count("idfsEmployeeGroupName"); i++)
                            manager.SelectCommand.Parameters.Add(manager.InputParameter("@idfsEmployeeGroupName_" + i, ParsingHelper.CorrectLikeValue(filters.Operation("idfsEmployeeGroupName", i), filters.Value("idfsEmployeeGroupName", i))));

                    if (filters.Contains("strName"))
                        for (int i = 0; i < filters.Count("strName"); i++)
                            manager.SelectCommand.Parameters.Add(manager.InputParameter("@strName_" + i, ParsingHelper.CorrectLikeValue(filters.Operation("strName", i), filters.Value("strName", i))));

                    if (filters.Contains("strDescription"))
                        for (int i = 0; i < filters.Count("strDescription"); i++)
                            manager.SelectCommand.Parameters.Add(manager.InputParameter("@strDescription_" + i, ParsingHelper.CorrectLikeValue(filters.Operation("strDescription", i), filters.Value("strDescription", i))));

                    List<UserGroupListItem> objs = manager.ExecuteList<UserGroupListItem>();
                    if (bTransactionStarted)
                    {
                        manager.CommitTransaction();

                        // restore default isolation level for pool connection
                        manager.BeginTransaction();
                        manager.TestConnection();
                        manager.CommitTransaction();
                    }
                    ListSelected(manager, objs);
                    return objs;
                }
                catch(DataException e)
                {
                    if (bTransactionStarted)
                    {
                        manager.RollbackTransaction();

                        // restore default isolation level for pool connection
                        manager.BeginTransaction();
                        manager.TestConnection();
                        manager.RollbackTransaction();
                    }
                    throw DbModelException.Create(null, e);
                }
            }
            partial void ListSelected(DbManagerProxy manager, List<UserGroupListItem> objs);

            public virtual long? SelectCount(DbManagerProxy manager)
            {

                return _selectCount(manager);

            }

            [SprocName("spUserGroup_SelectCount")]
            protected abstract long? _selectCount(DbManagerProxy manager);

            internal void _SetupLoad(DbManagerProxy manager, UserGroupListItem obj, bool bCloning = false)
            {
                if (obj == null) return;

                // loading extenters - begin
                // loading extenters - end
                if (!bCloning)
                {

                }
                _LoadLookups(manager, obj);
                obj._setParent();

                // loaded extenters - begin
                // loaded extenters - end

                _SetupHandlers(obj);
                _SetupChildHandlers(obj, null);

                _SetPermitions(obj._permissions, obj);
                _SetupRequired(obj);
                _SetupPersonalDataRestrictions(obj);
                obj._SetupMainHandler();
                obj.AcceptChanges();
            }

            internal void _SetPermitions(IObjectPermissions permissions, UserGroupListItem obj)
            {
                if (obj != null)
                {
                    obj._permissions = permissions;
                    if (obj._permissions != null)
                    {

                    }
                }
            }

            private UserGroupListItem _CreateNew(DbManagerProxy manager, IObject Parent, int? HACode, on_action creating, on_action created, bool isFake = false)
            {
                UserGroupListItem obj = null;
                try
                {
                    obj = UserGroupListItem.CreateInstance();
                    obj.m_CS = m_CS;
                    obj.m_IsNew = true;
                    obj.Parent = Parent;

                    if (creating != null)
                        creating(obj);

                    // creating extenters - begin
                    // creating extenters - end

                    _LoadLookups(manager, obj);
                    _SetupHandlers(obj);
                    _SetupChildHandlers(obj, null);

                    obj._SetupMainHandler();
                    obj._setParent();

                    // created extenters - begin
                    // created extenters - end

                    if (created != null)
                        created(obj);
                    obj.Created(manager);
                    _SetPermitions(obj._permissions, obj);
                    _SetupRequired(obj);
                    _SetupPersonalDataRestrictions(obj);
                    return obj;
                }
                catch(DataException e)
                {
                    throw DbModelException.Create(obj, e);
                }
            }

            public UserGroupListItem CreateNewT(DbManagerProxy manager, IObject Parent, int? HACode = null)
            {
                return _CreateNew(manager, Parent, HACode, null, null);
            }
            public IObject CreateNew(DbManagerProxy manager, IObject Parent, int? HACode = null)
            {
                return _CreateNew(manager, Parent, HACode, null, null);
            }
            public UserGroupListItem CreateFakeT(DbManagerProxy manager, IObject Parent, int? HACode = null)
            {
                return _CreateNew(manager, Parent, HACode, null, null, true);
            }
            public IObject CreateFake(DbManagerProxy manager, IObject Parent, int? HACode = null)
            {
                return _CreateNew(manager, Parent, HACode, null, null, true);
            }

            public UserGroupListItem CreateWithParamsT(DbManagerProxy manager, IObject Parent, List<object> pars)
            {
                return _CreateNew(manager, Parent, null, null, null);
            }
            public IObject CreateWithParams(DbManagerProxy manager, IObject Parent, List<object> pars)
            {
                return _CreateNew(manager, Parent, null, null, null);
            }

            private void _SetupChildHandlers(UserGroupListItem obj, object newobj)
            {

            }

            private void _SetupHandlers(UserGroupListItem obj)
            {

            }

            internal void _LoadLookups(DbManagerProxy manager, UserGroupListItem obj)
            {

            }

            [SprocName("spUserGroupDetail_Delete")]
            protected abstract void _postDelete(DbManagerProxy manager
                , Int64? ID
                );
            protected void _postDeletePredicate(DbManagerProxy manager
                , Int64? ID
                )
            {

                _postDelete(manager, ID);

            }

            public bool Post(DbManagerProxy manager, IObject obj, bool bChildObject = false)
            {
                bool bSuccess = false;
                int iDeadlockAttemptsCount = BaseSettings.DeadlockAttemptsCount;
                for (int iAttemptNumber = 0; iAttemptNumber < iDeadlockAttemptsCount; iAttemptNumber++)
                {
                    bool bTransactionStarted = false;
                    try
                    {
                        UserGroupListItem bo = obj as UserGroupListItem;

                        if (!bo.IsNew && bo.IsMarkedToDelete) // delete
                        {
                            if (!CanDelete)
                                throw new PermissionException("UserGroup", "Delete");
                        }
                        else if (bo.IsNew && !bo.IsMarkedToDelete) // insert
                        {
                            if (!CanInsert)
                                throw new PermissionException("UserGroup", "Insert");
                        }
                        else if (!bo.IsMarkedToDelete && bo.HasChanges) // update
                        {
                            if (!CanUpdate)
                                throw new PermissionException("UserGroup", "Update");
                        }

                        long mainObject = bo.idfEmployeeGroup;

                        if (!bo.IsNew && bo.IsMarkedToDelete) // delete
                        {
                        }
                        else if (bo.IsNew && !bo.IsMarkedToDelete) // insert
                        {

                        }
                        else if (!bo.IsMarkedToDelete) // update
                        {

                        }

                        if (!manager.IsTransactionStarted)
                        {

                            eidss.model.Enums.AuditEventType auditEventType = eidss.model.Enums.AuditEventType.daeFreeDataUpdate;

                            if (!bo.IsNew && bo.IsMarkedToDelete) // delete
                            {

                                auditEventType = eidss.model.Enums.AuditEventType.daeDelete;

                            }
                            else if (bo.IsNew && !bo.IsMarkedToDelete) // insert
                            {

                                auditEventType = eidss.model.Enums.AuditEventType.daeCreate;

                            }
                            else if (!bo.IsMarkedToDelete) // update
                            {

                                auditEventType = eidss.model.Enums.AuditEventType.daeEdit;

                            }

                            eidss.model.Enums.EIDSSAuditObject objectType = eidss.model.Enums.EIDSSAuditObject.daoUserGroup;
                            eidss.model.Enums.AuditTable auditTable = eidss.model.Enums.AuditTable.tlbEmployeeGroup;
                            manager.AuditParams = new object[] { auditEventType, objectType, auditTable, mainObject };

                            bTransactionStarted = true;
                            manager.BeginTransaction();
                        }
                        bSuccess = _PostNonTransaction(manager, obj as UserGroupListItem, bChildObject);
                        if (bTransactionStarted)
                        {
                            if (bSuccess)
                            {
                                obj.DeepAcceptChanges();
                                manager.CommitTransaction();

                            }
                            else
                            {
                                manager.RollbackTransaction();
                            }

                        }
                        if (bSuccess && bo.IsNew && !bo.IsMarkedToDelete) // insert
                        {
                            bo.m_IsNew = false;
                        }
                        if (bSuccess && bTransactionStarted)
                        {
                            bo.OnAfterPost();
                        }

                        break;
                    }
                    catch(Exception e)
                    {
                        if (bTransactionStarted)
                        {
                            manager.RollbackTransaction();

                            if (DbModelException.IsDeadlockException(e))
                            {
                                System.Threading.Thread.Sleep(BaseSettings.DeadlockDelay);
                                continue;
                            }
                        }

                        if (e is DataException)
                        {
                            throw DbModelException.Create(obj, e as DataException);
                        }
                        if (e is System.Data.SqlClient.SqlException)
                        {
                            throw DbModelException.Create(obj, e as System.Data.SqlClient.SqlException);
                        }
                        else
                            throw;
                    }
                }
                return bSuccess;
            }
            private bool _PostNonTransaction(DbManagerProxy manager, UserGroupListItem obj, bool bChildObject)
            {
                bool bHasChanges = obj.HasChanges;
                if (!obj.IsNew && obj.IsMarkedToDelete) // delete
                {

                    if (!ValidateCanDelete(manager, obj)) return false;

                    _postDeletePredicate(manager
                        , obj.idfEmployeeGroup
                        );

                }
                else if (!obj.IsMarkedToDelete) // insert/update
                {
                    if (!bChildObject)
                        if (!Validate(manager, obj, true, true, true))
                            return false;

                }
                //obj.AcceptChanges();

                return true;
            }

            public bool ValidateCanDelete(UserGroupListItem obj)
            {
                using (DbManagerProxy manager = DbManagerFactory.Factory.Create(ModelUserContext.Instance))
                {
                    return ValidateCanDelete(manager, obj);
                }
            }
            public bool ValidateCanDelete(DbManagerProxy manager, UserGroupListItem obj)
            {

                return true;
            }

            protected ValidationModelException ChainsValidate(UserGroupListItem obj)
            {

                return null;
            }
            protected bool ChainsValidate(UserGroupListItem obj, bool bRethrowException)
            {
                ValidationModelException ex = ChainsValidate(obj);
                if (ex != null)
                {
                    if (bRethrowException)
                        throw ex;
                    if (!obj.OnValidation(ex))
                    {
                        obj.OnValidationEnd(ex);
                        return false;
                    }
                }
                return true;
            }

            public bool Validate(DbManagerProxy manager, IObject obj, bool bPostValidation, bool bChangeValidation, bool bDeepValidation, bool bRethrowException = false)
            {
                return Validate(manager, obj as UserGroupListItem, bPostValidation, bChangeValidation, bDeepValidation, bRethrowException);
            }
            public bool Validate(DbManagerProxy manager, UserGroupListItem obj, bool bPostValidation, bool bChangeValidation, bool bDeepValidation, bool bRethrowException = false)
            {
                if (!ChainsValidate(obj, bRethrowException))
                    return false;

                return true;
            }

            #region IObjectPermissions

            public bool CanSelect { get { return ModelUserContext.Instance == null ? true : ModelUserContext.Instance.CanDo("UserGroup.Select"); } }
            public bool CanUpdate { get { return ModelUserContext.Instance == null ? true : ModelUserContext.Instance.CanDo("UserGroup.Update"); } }
            public bool CanDelete { get { return ModelUserContext.Instance == null ? true : ModelUserContext.Instance.CanDo("UserGroup.Delete"); } }
            public bool CanInsert { get { return ModelUserContext.Instance == null ? true : ModelUserContext.Instance.CanDo("UserGroup.Insert"); } }

            public bool CanExecute(string permission) { return ModelUserContext.Instance == null ? true : ModelUserContext.Instance.CanDo(permission.Contains(".") ? permission : permission + ".Execute"); }
            public bool IsReadOnlyForEdit { get { return !CanUpdate; } }
            #endregion

            private void _SetupRequired(UserGroupListItem obj)
            {

            }

    private void _SetupPersonalDataRestrictions(UserGroupListItem obj)
    {

    }

            #region IObjectMeta
            public int? MaxSize(string name) { return Meta.Sizes.ContainsKey(name) ? (int?)Meta.Sizes[name] : null; }
            public bool RequiredByField(string name, IObject obj) { return Meta.RequiredByField.ContainsKey(name) ? Meta.RequiredByField[name](obj as UserGroupListItem) : false; }
            public bool RequiredByProperty(string name, IObject obj) { return Meta.RequiredByProperty.ContainsKey(name) ? Meta.RequiredByProperty[name](obj as UserGroupListItem) : false; }
            public List<SearchPanelMetaItem> SearchPanelMeta { get { return Meta.SearchPanelMeta; } }
            public List<GridMetaItem> GridMeta { get { return Meta.GridMeta; } }
            public List<ActionMetaItem> Actions { get { return Meta.Actions; } }
            public string DetailPanel { get { return "UserGroupListItemDetail"; } }
            public string HelpIdWin { get { return "User_Groups"; } }
            public string HelpIdWeb { get { return ""; } }
            public string HelpIdHh { get { return ""; } }
            public string SqlSortOrder { get { return Meta.sqlSortOrder; } }
            #endregion

        }

            #region IObjectPermissions
        internal class Permissions : IObjectPermissions
        {
            private UserGroupListItem m_obj;
            internal Permissions(UserGroupListItem obj)
            {
                m_obj = obj;
            }

            public bool CanSelect { get { return ModelUserContext.Instance == null ? true : ModelUserContext.Instance.CanDo("UserGroup.Select"); } }
            public bool CanUpdate { get { return ModelUserContext.Instance == null ? true : ModelUserContext.Instance.CanDo("UserGroup.Update"); } }
            public bool CanDelete { get { return ModelUserContext.Instance == null ? true : ModelUserContext.Instance.CanDo("UserGroup.Delete"); } }
            public bool CanInsert { get { return ModelUserContext.Instance == null ? true : ModelUserContext.Instance.CanDo("UserGroup.Insert"); } }

            public bool CanExecute(string permission) { return ModelUserContext.Instance == null ? true : ModelUserContext.Instance.CanDo(permission.Contains(".") ? permission : permission + ".Execute"); }
            public bool IsReadOnlyForEdit { get { return !(CanUpdate || (CanInsert && m_obj.IsNew)); } }
        }
            #endregion

        #region Meta
        public static class Meta
        {
            public static string spSelect = "fn_UserGroup_SelectList";
            public static string spCount = "spUserGroup_SelectCount";
            public static string spPost = "";
            public static string spInsert = "";
            public static string spUpdate = "";
            public static string spDelete = "spUserGroupDetail_Delete";
            public static string spCanDelete = "";
            public static string sqlSortOrder = "";
            public static Dictionary<string, int> Sizes = new Dictionary<string, int>();
            public static Dictionary<string, Func<UserGroupListItem, bool>> RequiredByField = new Dictionary<string, Func<UserGroupListItem, bool>>();
            public static Dictionary<string, Func<UserGroupListItem, bool>> RequiredByProperty = new Dictionary<string, Func<UserGroupListItem, bool>>();
            public static List<SearchPanelMetaItem> SearchPanelMeta = new List<SearchPanelMetaItem>();
            public static List<GridMetaItem> GridMeta = new List<GridMetaItem>();
            public static List<ActionMetaItem> Actions = new List<ActionMetaItem>();

    private static Dictionary<string, List<Func<bool>>> m_isHiddenPersonalData = new Dictionary<string, List<Func<bool>>>();
    internal static bool _isHiddenPersonalData(string name)
    {
      if (m_isHiddenPersonalData.ContainsKey(name))
          return m_isHiddenPersonalData[name].Aggregate(false, (s,c) => s | c());
      return false;
    }

    private static void AddHiddenPersonalData(string name, Func<bool> func)
    {
      if (!m_isHiddenPersonalData.ContainsKey(name))
          m_isHiddenPersonalData.Add(name, new List<Func<bool>>());
      m_isHiddenPersonalData[name].Add(func);
    }

            static Meta()
            {

                Sizes.Add(_str_strName, 2000);
                Sizes.Add(_str_strDescription, 200);
                SearchPanelMeta.Add(new SearchPanelMetaItem(
                    "strName",
                    EditorType.Text,
                    EditorControlWidth.Normal, true, true, false, false,
                    "strGroup",
                    null, null, c => false, false, SearchPanelLocation.Main, false, null, null, null, null, null, null,false
                    ));
                SearchPanelMeta.Add(new SearchPanelMetaItem(
                    "strDescription",
                    EditorType.Text,
                    EditorControlWidth.Normal, true, true, false, false,
                    "strDescription",
                    null, null, c => false, false, SearchPanelLocation.Main, false, null, null, null, null, null, null,false
                    ));
                GridMeta.Add(new GridMetaItem(
                    _str_idfEmployeeGroup,
                    _str_idfEmployeeGroup, null, false, false, true, true, true, null
                    ));
                GridMeta.Add(new GridMetaItem(
                    _str_strName,
                    "strGroupName", null, false, true, true, true, true, null
                    ));
                GridMeta.Add(new GridMetaItem(
                    _str_strDescription,
                    _str_strDescription, null, false, true, true, true, true, null
                    ));
                Actions.Add(new ActionMetaItem(
                    "SelectAll",
                    ActionTypes.SelectAll,
                    false,
                    String.Empty,
                    String.Empty,
                    (manager, c, pars) => new ActResult(true, c),
                    null,
                    new ActionMetaItem.VisualItem(
                        /*from BvMessages*/"strSelectAll_Id",
                        "selectall",
                        /*from BvMessages*/"tooltipSelectAll_Id",
                        /*from BvMessages*/"",
                        "",
                        /*from BvMessages*/"tooltipSelectAll_Id",
                        ActionsAlignment.Right,
                        ActionsPanelType.Top,
                        ActionsAppType.All
                      ),
                      false,
                      null,
                      null,
                      null,
                      null,
                      null,
                      false
                      ));

                Actions.Add(new ActionMetaItem(
                    "Select",
                    ActionTypes.Select,
                    false,
                    String.Empty,
                    String.Empty,
                    (manager, c, pars) => new ActResult(true, c),
                    null,
                    new ActionMetaItem.VisualItem(
                        /*from BvMessages*/"strSelect_Id",
                        "select",
                        /*from BvMessages*/"tooltipSelect_Id",
                        /*from BvMessages*/"",
                        "",
                        /*from BvMessages*/"tooltipSelect_Id",
                        ActionsAlignment.Right,
                        ActionsPanelType.Top,
                        ActionsAppType.All
                      ),
                      false,
                      null,
                      null,
                      null,
                      null,
                      null,
                      false
                      ));

                Actions.Add(new ActionMetaItem(
                    "Create",
                    ActionTypes.Create,
                    false,
                    String.Empty,
                    String.Empty,
                    (manager, c, pars) => new ActResult(true, ObjectAccessor.CreatorInterface<UserGroupDetail>().CreateNew(manager, c, pars == null ? null : (int?)pars[0])),
                    null,
                    new ActionMetaItem.VisualItem(
                        /*from BvMessages*/"strCreate_Id",
                        "add",
                        /*from BvMessages*/"tooltipCreate_Id",
                        /*from BvMessages*/"",
                        "",
                        /*from BvMessages*/"tooltipCreate_Id",
                        ActionsAlignment.Right,
                        ActionsPanelType.Top,
                        ActionsAppType.All
                      ),
                      false,
                      null,
                      null,
                      null,
                      null,
                      null,
                      false
                      ));

                Actions.Add(new ActionMetaItem(
                    "Edit",
                    ActionTypes.Edit,
                    false,
                    String.Empty,
                    String.Empty,
                    (manager, c, pars) => new ActResult(true, ObjectAccessor.SelectDetailInterface<UserGroupDetail>().SelectDetail(manager, pars[0])),
                    null,
                    new ActionMetaItem.VisualItem(
                        /*from BvMessages*/"strEdit_Id",
                        "edit",
                        /*from BvMessages*/"tooltipEdit_Id",
                        /*from BvMessages*/"strView_Id",
                        "View1",
                        /*from BvMessages*/"tooltipEdit_Id",
                        ActionsAlignment.Right,
                        ActionsPanelType.Top,
                        ActionsAppType.All
                      ),
                      false,
                      null,
                      null,
                      null,
                      null,
                      null,
                      false
                      ));

                Actions.Add(new ActionMetaItem(
                    "Delete",
                    ActionTypes.Delete,
                    false,
                    String.Empty,
                    String.Empty,
                    (manager, c, pars) =>
                        {
                            if (c == null)
                            {
                                c = ObjectAccessor.CreatorInterface<UserGroupListItem>().CreateWithParams(manager, null, pars);
                                ((UserGroupListItem)c).idfEmployeeGroup = (long)pars[0];
                                ((UserGroupListItem)c).m_IsNew = false;
                            }
                            return new ActResult(((UserGroupListItem)c).MarkToDelete() && ObjectAccessor.PostInterface<UserGroupListItem>().Post(manager, (UserGroupListItem)c), c);
                        }
                                            ,
                    null,
                    new ActionMetaItem.VisualItem(
                        /*from BvMessages*/"strDelete_Id",
                        "Delete_Remove",
                        /*from BvMessages*/"tooltipDelete_Id",
                        /*from BvMessages*/"",
                        "",
                        /*from BvMessages*/"tooltipDelete_Id",
                        ActionsAlignment.Right,
                        ActionsPanelType.Top,
                        ActionsAppType.All
                      ),
                      false,
                      null,
                      null,
                      null,
                      null,
                      null,
                      false
                      ));

                Actions.Add(new ActionMetaItem(
                    "Refresh",
                    ActionTypes.Refresh,
                    false,
                    String.Empty,
                    String.Empty,
                    (manager, c, pars) => new ActResult(true, c),
                    null,
                    new ActionMetaItem.VisualItem(
                        /*from BvMessages*/"strRefresh_Id",
                        "iconRefresh_Id",
                        /*from BvMessages*/"tooltipRefresh_Id",
                        /*from BvMessages*/"",
                        "",
                        /*from BvMessages*/"tooltipRefresh_Id",
                        ActionsAlignment.Right,
                        ActionsPanelType.Main,
                        ActionsAppType.All
                      ),
                      false,
                      null,
                      null,
                      null,
                      null,
                      null,
                      false
                      ));

                Actions.Add(new ActionMetaItem(
                    "Close",
                    ActionTypes.Close,
                    false,
                    String.Empty,
                    String.Empty,
                    (manager, c, pars) => new ActResult(true, c),
                    null,
                    new ActionMetaItem.VisualItem(
                        /*from BvMessages*/"strClose_Id",
                        "Close",
                        /*from BvMessages*/"tooltipClose_Id",
                        /*from BvMessages*/"",
                        "",
                        /*from BvMessages*/"tooltipClose_Id",
                        ActionsAlignment.Right,
                        ActionsPanelType.Main,
                        ActionsAppType.All
                      ),
                      false,
                      null,
                      null,
                      null,
                      null,
                      null,
                      false
                      ));

                _SetupPersonalDataRestrictions();
            }

    private static void _SetupPersonalDataRestrictions()
    {

    }

        }
        #endregion

        #endregion
        }

}


text:
var app = angular.module('app', ['ui.router']);

app.factory('getCSV', function($q) {
  return function(url, accessor) {
    var deferred = $q.defer();
    d3.csv(url, accessor, function(data) {
      deferred.resolve(data);
    });
    return deferred.promise;
  };
});

app.config(function($stateProvider, $urlRouterProvider) {
  $stateProvider
    .state('main', {
      controller: 'MainController',
      templateUrl: 'partials/main.html',
      url: '/',
      resolve: {
        scoreData: function(getCSV) {
          return getCSV('data/data.csv', function(row) {
            for (var attr in row) {
              row[attr] = +row[attr];
            }
            return row;
          });
        }
      }
    });

  $urlRouterProvider.otherwise('/');
});

app.filter('sumGame', function() {
  return function(game, keys) {
    return keys.reduce(function(sum, key) {
      return sum + game[key];
    }, 0);
  };
});

app.filter('sumTotal', function() {
  return function(data, key) {
    return data.reduce(function(sum, game) {
      return sum + game[key];
    }, 0);
  };
});

app.directive('chart', function() {
  return {
    restrict: 'EAC',
    scope: {
      keys: '=',
      values: '='
    },
    link: function(scope, element) {
      d3.select(element[0])
        .append('svg')
        .datum({
          keys: scope.keys,
          values: scope.values
        });

      scope.$watch('values', function() {
        d3.select('svg')
          .call(draw());
      }, true);
    }
  };

  function draw() {
    var verticalMargin = 30;
    var axisWidth = 50;
    var chartWidth = 500;
    var chartHeight = 400;
    var barWidth = 10;
    var colorScale = d3.scale.category10();

    return function(selection) {
      selection.each(function(data) {
        var svg = d3.select(this)
          .attr({
            width: chartWidth + axisWidth * 2,
            height: chartHeight + verticalMargin * 2
          });

        svg.selectAll('g.chart')
          .data([data])
          .enter()
          .call(initialize);

        svg.selectAll('g.chart')
          .call(drawBars)
          .call(drawLines);

        svg.selectAll('g.axis>path.domain')
          .style({
            fill: 'none',
            stroke: 'black'
          });
        svg.selectAll('g.axis>g.tick>line')
          .style('stroke', 'black');
      });
    };

    function initialize(selection) {
      var chart = selection
        .append('g')
        .classed('chart', true)
        .attr('transform', 'translate(' + axisWidth + ',' + (chartHeight / 2 + verticalMargin) + ')');

      chart.append('line')
        .attr({
          x1: 0,
          x2: chartWidth,
          y1: 0,
          y2: 0
        })
        .style({
          stroke: 'black'
        });

      chart.append('g')
        .classed('axis', true)
        .classed('left-axis', true);
      chart.append('g')
        .classed('axis', true)
        .classed('right-axis', true)
        .attr('transform', 'translate(' + chartWidth + ')');
    }

    function drawBars(selection) {
      selection.each(function(data) {
        var n = data.values.length;
        var keys = data.keys;
        var m = keys.length;

        var max = d3.max(data.values, function(game) {
          return d3.max(keys, function(key) {
            return game[key];
          });
        });
        var heightScale = d3.scale.linear()
          .domain([-max, max])
          .range([chartHeight / 2, -chartHeight / 2])
          .nice();

        selection.selectAll('g.game')
          .data(data.values)
          .enter()
          .append('g')
          .classed('game', true);
        var game = selection.selectAll('g.game');
        game.selectAll('rect.bar')
          .data(function(row) {
            return keys.map(function(key) {
              return row[key];
            });
          })
          .enter()
          .append('rect')
          .classed('bar', true)
          .attr({
            x: 0,
            y: 0,
            width: barWidth,
            height: 0,
          })
          .style('fill', function(d, i) {
            return colorScale(i);
          });

        game.selectAll('rect.bar')
          .attr('transform', function(d, i) {
            var t = 'translate(' + (i * barWidth) + ')';
            if (d >= 0) {
              t += 'rotate(180,' + (barWidth / 2) + ',0)';
            }
            return t;
          });

        var gameMargin = (chartWidth - barWidth * m * n) / (n + 1);
        var transition = selection.transition();
        transition.selectAll('g.game')
          .attr('transform', function(d, i) {
            var offset = (barWidth * m + gameMargin) * i + gameMargin;
            return 'translate(' + offset + ')';
          });
        transition.transition()
          .selectAll('rect.bar')
          .attr('height', function(d) {
            return -heightScale(Math.abs(d));
          });

        var leftAxis = d3.svg.axis()
          .scale(heightScale)
          .orient('left');
        selection.select('g.left-axis')
          .transition()
          .call(leftAxis);
      });
    }

    function drawLines(selection) {
      selection.each(function(data) {
        var n = data.values.length;
        var keys = data.keys;
        var m = keys.length;

        var lines = keys.map(function(key) {
          var line = data.values.map(function(game) {
            return +game[key];
          });
          for (var j = 1; j < n; ++j) {
            line[j] += line[j - 1];
          }
          return line;
        });
        var max = d3.max(lines, function(line) {
          return d3.max(line, Math.abs);
        });
        var heightScale = d3.scale.linear()
          .domain([-max, max])
          .range([chartHeight / 2, -chartHeight / 2])
          .nice();

        var gameMargin = (chartWidth - barWidth * m * n) / (n + 1);
        var line = d3.svg.line()
          .x(function(d, i) {
            return (barWidth * m + gameMargin) * i + gameMargin + barWidth * m / 2;
          })
          .y(function(d) {
            return heightScale(d);
          });

        selection.selectAll('path.line')
          .data(lines)
          .enter()
          .append('path')
          .classed('line', true)
          .style({
            fill: 'none',
            stroke: function(d, i) {
              return colorScale(i);
            }
          });
        selection.transition()
          .selectAll('path.line')
          .attr('d', function(l) {
            return line(l);
          });

        var rightAxis = d3.svg.axis()
          .scale(heightScale)
          .orient('right');
        selection.select('g.right-axis')
          .transition()
          .call(rightAxis);
      });
    }
  }
});

app.controller('MainController', function($scope, scoreData) {
  $scope.players = Object.keys(scoreData[0]);
  $scope.data = scoreData;

  $scope.add = function() {
    var game = {};
    $scope.players.forEach(function(player) {
      game[player] = 0;
    });
    $scope.data.push(game);
  };
});


text:
{
    var fs = require('fs');
    var __statement_ltbGjm, __expression_pGkJ62, __block_MQPv0d;
    var store = require('/home/tsoler/workspace/git/panel-embedded/node_modules/gulp-coverage/contrib/coverage_store.js');

    __statement_ltbGjm = function(i) {
        var fd = store.register('/home/tsoler/workspace/git/panel-embedded/app/scripts/uh.spec.js');
        fs.writeSync(fd, '{"statement": {"node": ' + i + '}},\n');
    };

    __expression_pGkJ62 = function(i) {
        var fd = store.register('/home/tsoler/workspace/git/panel-embedded/app/scripts/uh.spec.js');
        fs.writeSync(fd, '{"expression": {"node": ' + i + '}},\n');
    };

    __block_MQPv0d = function(i) {
        var fd = store.register('/home/tsoler/workspace/git/panel-embedded/app/scripts/uh.spec.js');
        fs.writeSync(fd, '{"block": ' + i + '},\n');
    };
    __intro_zaJ3G5 = function(id, obj) {
        // console.log('__intro: ', id, ', obj.__instrumented_miss: ', obj.__instrumented_miss, ', obj.length: ', obj.length);
        (typeof obj === 'object' || typeof obj === 'function') &&
            Object.defineProperty && Object.defineProperty(obj, '__instrumented_miss', {enumerable: false, writable: true});
        obj.__instrumented_miss = obj.__instrumented_miss || [];
        if ('undefined' !== typeof obj && null !== obj && 'undefined' !== typeof obj.__instrumented_miss) {
            if (obj.length === 0) {
                // console.log('interim miss: ', id);
                obj.__instrumented_miss[id] = true;
            } else {
                obj.__instrumented_miss[id] = false;
            }
        }
        return obj;
    };
    function isProbablyChainable(obj, id) {
        return obj &&
            obj.__instrumented_miss[id] !== undefined &&
            'number' === typeof obj.length;
    }
    __extro_zEzu41 = function(id, obj) {
        var fd = store.register('/home/tsoler/workspace/git/panel-embedded/app/scripts/uh.spec.js');
        // console.log('__extro: ', id, ', obj.__instrumented_miss: ', obj.__instrumented_miss, ', obj.length: ', obj.length);
        if ('undefined' !== typeof obj && null !== obj && 'undefined' !== typeof obj.__instrumented_miss) {
            if (isProbablyChainable(obj, id) && obj.length === 0 && obj.__instrumented_miss[id]) {
                // if the call was not a "constructor" - i.e. it did not add things to the chainable
                // and it did not return anything from the chainable, it is a miss
                // console.log('miss: ', id);
            } else {
                fs.writeSync(fd, '{"chain": {"node": ' + id + '}},\n');
            }
            obj.__instrumented_miss[id] = undefined;
        } else {
            fs.writeSync(fd, '{"chain": {"node": ' + id + '}},\n');
        }
        return obj;
    };
};
////////////////////////

// Instrumented Code
{
    __statement_ltbGjm(0);
    var jsdom = (__expression_pGkJ62(1), require('jsdom'));
}
{
    __statement_ltbGjm(2);
    const doc = __extro_zEzu41(3, __intro_zaJ3G5(3, jsdom).jsdom());
}
{
    __statement_ltbGjm(4);
    global['window'] = doc.defaultView;
}
{
    __statement_ltbGjm(5);
    global['document'] = doc;
}
{
    __statement_ltbGjm(6);
    __expression_pGkJ62(7), require('./uh.js');
}
{
    __statement_ltbGjm(8);
    __expression_pGkJ62(9), describe('window.uh - Namespace da aplicacao', function () {
        __block_MQPv0d(0);
        {
            __statement_ltbGjm(10);
            __expression_pGkJ62(11), it('Verifica se o objeto esta no formato esperado', function () {
                __block_MQPv0d(1);
                {
                    __statement_ltbGjm(12);
                    __extro_zEzu41(13, __intro_zaJ3G5(13, (__expression_pGkJ62(14), expect(window.uh))).toEqual(__extro_zEzu41(15, __intro_zaJ3G5(15, jasmine).any(Object))));
                }
            });
        }
        {
            __statement_ltbGjm(16);
            __expression_pGkJ62(17), it('Teste 2', function () {
                __block_MQPv0d(2);
                {
                    __statement_ltbGjm(18);
                    __extro_zEzu41(19, __intro_zaJ3G5(19, (__expression_pGkJ62(20), expect(window.uh))).toEqual(__extro_zEzu41(21, __intro_zaJ3G5(21, jasmine).any(Object))));
                }
            });
        }
    });
}


text:
package postgresql

import (
	"database/sql"
	"fmt"
	"strings"

	"github.com/hashicorp/vault/helper/strutil"
	"github.com/hashicorp/vault/logical"
	"github.com/hashicorp/vault/logical/framework"
	"github.com/lib/pq"
)

const SecretCredsType = "creds"

func secretCreds(b *backend) *framework.Secret {
	return &framework.Secret{
		Type: SecretCredsType,
		Fields: map[string]*framework.FieldSchema{
			"username": &framework.FieldSchema{
				Type:        framework.TypeString,
				Description: "Username",
			},

			"password": &framework.FieldSchema{
				Type:        framework.TypeString,
				Description: "Password",
			},
		},

		Renew:  b.secretCredsRenew,
		Revoke: b.secretCredsRevoke,
	}
}

func (b *backend) secretCredsRenew(
	req *logical.Request, d *framework.FieldData) (*logical.Response, error) {
	// Get the username from the internal data
	usernameRaw, ok := req.Secret.InternalData["username"]
	if !ok {
		return nil, fmt.Errorf("secret is missing username internal data")
	}
	username, ok := usernameRaw.(string)

	// Get our connection
	db, err := b.DB(req.Storage)
	if err != nil {
		return nil, err
	}

	// Get the lease information
	lease, err := b.Lease(req.Storage)
	if err != nil {
		return nil, err
	}
	if lease == nil {
		lease = &configLease{}
	}

	f := framework.LeaseExtend(lease.Lease, lease.LeaseMax, b.System())
	resp, err := f(req, d)
	if err != nil {
		return nil, err
	}

	// Make sure we increase the VALID UNTIL endpoint for this user.
	if expireTime := resp.Secret.ExpirationTime(); !expireTime.IsZero() {
		expiration := expireTime.Format("2006-01-02 15:04:05-0700")

		query := fmt.Sprintf(
			"ALTER ROLE %s VALID UNTIL '%s';",
			pq.QuoteIdentifier(username),
			expiration)
		stmt, err := db.Prepare(query)
		if err != nil {
			return nil, err
		}
		defer stmt.Close()
		if _, err := stmt.Exec(); err != nil {
			return nil, err
		}
	}

	return resp, nil
}

func (b *backend) secretCredsRevoke(
	req *logical.Request, d *framework.FieldData) (*logical.Response, error) {
	// Get the username from the internal data
	usernameRaw, ok := req.Secret.InternalData["username"]
	if !ok {
		return nil, fmt.Errorf("secret is missing username internal data")
	}
	username, ok := usernameRaw.(string)

	var revocationSQL string
	var resp *logical.Response

	roleNameRaw, ok := req.Secret.InternalData["role"]
	if ok {
		role, err := b.Role(req.Storage, roleNameRaw.(string))
		if err != nil {
			return nil, err
		}
		if role == nil {
			if resp == nil {
				resp = &logical.Response{}
			}
			resp.AddWarning(fmt.Sprintf("Role %q cannot be found. Using default revocation SQL.", roleNameRaw.(string)))
		} else {
			revocationSQL = role.RevocationSQL
		}
	}

	// Get our connection
	db, err := b.DB(req.Storage)
	if err != nil {
		return nil, err
	}

	switch revocationSQL {

	// This is the default revocation logic. If revocation SQL is provided it
	// is simply executed as-is.
	case "":
		// Check if the role exists
		var exists bool
		err = db.QueryRow("SELECT exists (SELECT rolname FROM pg_roles WHERE rolname=$1);", username).Scan(&exists)
		if err != nil && err != sql.ErrNoRows {
			return nil, err
		}

		if exists == false {
			return resp, nil
		}

		// Query for permissions; we need to revoke permissions before we can drop
		// the role
		// This isn't done in a transaction because even if we fail along the way,
		// we want to remove as much access as possible
		stmt, err := db.Prepare("SELECT DISTINCT table_schema FROM information_schema.role_column_grants WHERE grantee=$1;")
		if err != nil {
			return nil, err
		}
		defer stmt.Close()

		rows, err := stmt.Query(username)
		if err != nil {
			return nil, err
		}
		defer rows.Close()

		const initialNumRevocations = 16
		revocationStmts := make([]string, 0, initialNumRevocations)
		for rows.Next() {
			var schema string
			err = rows.Scan(&schema)
			if err != nil {
				// keep going; remove as many permissions as possible right now
				continue
			}
			revocationStmts = append(revocationStmts, fmt.Sprintf(
				`REVOKE ALL PRIVILEGES ON ALL TABLES IN SCHEMA %s FROM %s;`,
				pq.QuoteIdentifier(schema),
				pq.QuoteIdentifier(username)))

			revocationStmts = append(revocationStmts, fmt.Sprintf(
				`REVOKE USAGE ON SCHEMA %s FROM %s;`,
				pq.QuoteIdentifier(schema),
				pq.QuoteIdentifier(username)))
		}

		// for good measure, revoke all privileges and usage on schema public
		revocationStmts = append(revocationStmts, fmt.Sprintf(
			`REVOKE ALL PRIVILEGES ON ALL TABLES IN SCHEMA public FROM %s;`,
			pq.QuoteIdentifier(username)))

		revocationStmts = append(revocationStmts, fmt.Sprintf(
			"REVOKE ALL PRIVILEGES ON ALL SEQUENCES IN SCHEMA public FROM %s;",
			pq.QuoteIdentifier(username)))

		revocationStmts = append(revocationStmts, fmt.Sprintf(
			"REVOKE USAGE ON SCHEMA public FROM %s;",
			pq.QuoteIdentifier(username)))

		// get the current database name so we can issue a REVOKE CONNECT for
		// this username
		var dbname sql.NullString
		if err := db.QueryRow("SELECT current_database();").Scan(&dbname); err != nil {
			return nil, err
		}

		if dbname.Valid {
			revocationStmts = append(revocationStmts, fmt.Sprintf(
				`REVOKE CONNECT ON DATABASE %s FROM %s;`,
				pq.QuoteIdentifier(dbname.String),
				pq.QuoteIdentifier(username)))
		}

		// again, here, we do not stop on error, as we want to remove as
		// many permissions as possible right now
		var lastStmtError error
		for _, query := range revocationStmts {
			stmt, err := db.Prepare(query)
			if err != nil {
				lastStmtError = err
				continue
			}
			defer stmt.Close()
			_, err = stmt.Exec()
			if err != nil {
				lastStmtError = err
			}
		}

		// can't drop if not all privileges are revoked
		if rows.Err() != nil {
			return nil, fmt.Errorf("could not generate revocation statements for all rows: %s", rows.Err())
		}
		if lastStmtError != nil {
			return nil, fmt.Errorf("could not perform all revocation statements: %s", lastStmtError)
		}

		// Drop this user
		stmt, err = db.Prepare(fmt.Sprintf(
			`DROP ROLE IF EXISTS %s;`, pq.QuoteIdentifier(username)))
		if err != nil {
			return nil, err
		}
		defer stmt.Close()
		if _, err := stmt.Exec(); err != nil {
			return nil, err
		}

	// We have revocation SQL, execute directly, within a transaction
	default:
		tx, err := db.Begin()
		if err != nil {
			return nil, err
		}
		defer func() {
			tx.Rollback()
		}()

		for _, query := range strutil.ParseArbitraryStringSlice(revocationSQL, ";") {
			query = strings.TrimSpace(query)
			if len(query) == 0 {
				continue
			}

			stmt, err := tx.Prepare(Query(query, map[string]string{
				"name": username,
			}))
			if err != nil {
				return nil, err
			}
			defer stmt.Close()

			if _, err := stmt.Exec(); err != nil {
				return nil, err
			}
		}

		if err := tx.Commit(); err != nil {
			return nil, err
		}
	}

	return resp, nil
}


text:
function start(options) {
  var requestRendering = 0;
  var patch = options.patch;
  var model = options.model(dispatch);
  var view = options.view(model, dispatch);
  var old = null;

  function dispatch(type, data) {
    // console.log(type);
    setTimeout(function() {
      model.update(type, data);
      requestRendering++;
    });
  }
  function loop() {
    if(requestRendering) {
      // console.log(requestRendering);
      requestRendering = 0;
      var vnode = view.render();
      view.patch(old, vnode);
      old = vnode;
    }
    requestAnimationFrame(loop);
  };
  loop();

  dispatch('init');
}
module.exports = {
  start: start
};


text:
<?php

namespace Bpost\BpostApiClient\Exception;

use Bpost\BpostApiClient\BpostException;

/**
 * Class BpostXmlException
 * @package Bpost\BpostApiClient\Exception
 */
class BpostXmlException extends BpostException
{
}


text:
<?xml version="1.0" encoding="UTF-8"?>
<!--
  Copyright 1999-2005 The Apache Software Foundation

  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.
-->
<project name="ide">
	<description>IDE targets</description>

	<!-- Build the Eclipse customized project's files -->
	<target name="eclipse-project" depends="prepare" description="Generate the Eclipse customized project files (using local.block.properties).">
		<echo message="Building Eclipse Customized Project Files" />
		<xslt in="${gump.descriptor}" out="${build.temp}/blocks-eclipse.xml" style="${tools}/ide/eclipse/blocks-classpath.xsl" />
		<ant antfile="${build.temp}/blocks-eclipse.xml" inheritAll="true" inheritRefs="true" target="generate-customized-eclipse-project" />
	</target>
</project>


text:
/* $Id$ */

package org.apache.fop.render.rtf.rtflib.rtfdoc;

/*
 * This file is part of the RTF library of the FOP project, which was originally
 * created by Bertrand Delacretaz <bdelacretaz@codeconsult.ch> and by other
 * contributors to the jfor project (www.jfor.org), who agreed to donate jfor to
 * the FOP project.
 */

import java.io.Writer;
import java.io.IOException;

/** RtfContainer that encloses footers */
public class RtfAfter extends RtfAfterBeforeBase {
    /**RtfBefore attributes*/
    public static final String FOOTER = "footer";
    /** String array of footer attributes */
    public static final String[] FOOTER_ATTR = new String[]{
        FOOTER
    };

    RtfAfter(RtfSection parent, Writer w, RtfAttributes attrs) throws IOException {
        super(parent, w, attrs);
    }

    /**
     *
     * @throws IOException for I/O problems
     */
    protected void writeMyAttributes() throws IOException {
        writeAttributes(attrib, FOOTER_ATTR);
    }
}


text:
/*  This file is part of Openrouteservice.
 *
 *  Openrouteservice is free software; you can redistribute it and/or modify it under the terms of the
 *  GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1
 *  of the License, or (at your option) any later version.

 *  This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
 *  without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
 *  See the GNU Lesser General Public License for more details.

 *  You should have received a copy of the GNU Lesser General Public License along with this library;
 *  if not, see <https://www.gnu.org/licenses/>.
 */
package org.heigit.ors.routing.util.extrainfobuilders;

import com.graphhopper.util.PointList;
import org.heigit.ors.routing.RouteExtraInfo;

public abstract class RouteExtraInfoBuilder {
    protected RouteExtraInfo extraInfo;

    RouteExtraInfoBuilder(RouteExtraInfo extraInfo) {
    	if (extraInfo == null)
    		throw new NullPointerException("extraInfo");
    	this.extraInfo = extraInfo;
    }

    public abstract void addSegment(double value, long valueIndex, PointList geom, double dist, boolean lastEdge);

    public abstract void addSegment(double value, long valueIndex, PointList geom, double dist);

    public abstract void finish();
}


text:
[![NPM version][npm-image]][npm-url]
[![build status][travis-image]][travis-url]
[![Test coverage][codecov-image]][codecov-url]
[![Downloads][downloads-image]][downloads-url]
[![js-standard-style][standard-image]][standard-url]

Check if value is a server response (`res`).

## Installation
```bash
$ npm install is-server-response
```

## Usage
```js
const isRes = require('is-server-response')
const http = require('http')

http.createServer((req, res) => {
  isRes(res)
  // => true
})
```

## See Also
- [is-incoming-message](https://github.com/yoshuawuyts/is-incoming-message)

## License
[MIT](https://tldrlegal.com/license/mit-license)

[npm-image]: https://img.shields.io/npm/v/is-server-response.svg?style=flat-square
[npm-url]: https://npmjs.org/package/is-server-response
[travis-image]: https://img.shields.io/travis/yoshuawuyts/is-server-response/master.svg?style=flat-square
[travis-url]: https://travis-ci.org/yoshuawuyts/is-server-response
[codecov-image]: https://img.shields.io/codecov/c/github/yoshuawuyts/is-server-response/master.svg?style=flat-square
[codecov-url]: https://codecov.io/github/yoshuawuyts/is-server-response
[downloads-image]: http://img.shields.io/npm/dm/is-server-response.svg?style=flat-square
[downloads-url]: https://npmjs.org/package/is-server-response
[standard-image]: https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat-square
[standard-url]: https://github.com/feross/standard