text:
//------------------------------------------------------------------------------
// <auto-generated>
//     This code was generated by a tool.
//     Runtime Version:4.0.30319.17929
//
//     Changes to this file may cause incorrect behavior and will be lost if
//     the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------

//
// This code was auto-generated by Microsoft.Silverlight.ServiceReference, version 4.0.60310.0
//
namespace EspaceClient.BackOffice.Silverlight.Infrastructure.ServiceCaching {

    [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")]
    [System.ServiceModel.ServiceContractAttribute(ConfigurationName="ServiceCaching.IServiceCaching")]
    public interface IServiceCaching {

        [System.ServiceModel.OperationContractAttribute(AsyncPattern=true, Action="http://tempuri.org/IServiceCaching/GetHashCode", ReplyAction="http://tempuri.org/IServiceCaching/GetHashCodeResponse")]
        System.IAsyncResult BeginGetHashCode(EspaceClient.BackOffice.Infrastructure.Context.WebContext context, System.AsyncCallback callback, object asyncState);

        string EndGetHashCode(System.IAsyncResult result);

        [System.ServiceModel.OperationContractAttribute(AsyncPattern=true, Action="http://tempuri.org/IServiceCaching/Clear", ReplyAction="http://tempuri.org/IServiceCaching/ClearResponse")]
        System.IAsyncResult BeginClear(EspaceClient.BackOffice.Infrastructure.Context.WebContext context, System.AsyncCallback callback, object asyncState);

        void EndClear(System.IAsyncResult result);

        [System.ServiceModel.OperationContractAttribute(AsyncPattern=true, Action="http://tempuri.org/IServiceCaching/ClearFOCache", ReplyAction="http://tempuri.org/IServiceCaching/ClearFOCacheResponse")]
        System.IAsyncResult BeginClearFOCache(EspaceClient.BackOffice.Infrastructure.Context.WebContext context, string token, System.AsyncCallback callback, object asyncState);

        bool EndClearFOCache(System.IAsyncResult result);

        [System.ServiceModel.OperationContractAttribute(AsyncPattern=true, Action="http://tempuri.org/IServiceCaching/ClearFORoutes", ReplyAction="http://tempuri.org/IServiceCaching/ClearFORoutesResponse")]
        System.IAsyncResult BeginClearFORoutes(EspaceClient.BackOffice.Infrastructure.Context.WebContext context, string token, System.AsyncCallback callback, object asyncState);

        bool EndClearFORoutes(System.IAsyncResult result);
    }

    [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")]
    public interface IServiceCachingChannel : EspaceClient.BackOffice.Silverlight.Infrastructure.ServiceCaching.IServiceCaching, System.ServiceModel.IClientChannel {
    }

    [System.Diagnostics.DebuggerStepThroughAttribute()]
    [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")]
    public partial class GetHashCodeCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs {

        private object[] results;

        public GetHashCodeCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) :
                base(exception, cancelled, userState) {
            this.results = results;
        }

        public string Result {
            get {
                base.RaiseExceptionIfNecessary();
                return ((string)(this.results[0]));
            }
        }
    }

    [System.Diagnostics.DebuggerStepThroughAttribute()]
    [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")]
    public partial class ClearFOCacheCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs {

        private object[] results;

        public ClearFOCacheCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) :
                base(exception, cancelled, userState) {
            this.results = results;
        }

        public bool Result {
            get {
                base.RaiseExceptionIfNecessary();
                return ((bool)(this.results[0]));
            }
        }
    }

    [System.Diagnostics.DebuggerStepThroughAttribute()]
    [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")]
    public partial class ClearFORoutesCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs {

        private object[] results;

        public ClearFORoutesCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) :
                base(exception, cancelled, userState) {
            this.results = results;
        }

        public bool Result {
            get {
                base.RaiseExceptionIfNecessary();
                return ((bool)(this.results[0]));
            }
        }
    }

    [System.Diagnostics.DebuggerStepThroughAttribute()]
    [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")]
    public partial class ServiceCachingClient : System.ServiceModel.ClientBase<EspaceClient.BackOffice.Silverlight.Infrastructure.ServiceCaching.IServiceCaching>, EspaceClient.BackOffice.Silverlight.Infrastructure.ServiceCaching.IServiceCaching {

        private BeginOperationDelegate onBeginGetHashCodeDelegate;

        private EndOperationDelegate onEndGetHashCodeDelegate;

        private System.Threading.SendOrPostCallback onGetHashCodeCompletedDelegate;

        private BeginOperationDelegate onBeginClearDelegate;

        private EndOperationDelegate onEndClearDelegate;

        private System.Threading.SendOrPostCallback onClearCompletedDelegate;

        private BeginOperationDelegate onBeginClearFOCacheDelegate;

        private EndOperationDelegate onEndClearFOCacheDelegate;

        private System.Threading.SendOrPostCallback onClearFOCacheCompletedDelegate;

        private BeginOperationDelegate onBeginClearFORoutesDelegate;

        private EndOperationDelegate onEndClearFORoutesDelegate;

        private System.Threading.SendOrPostCallback onClearFORoutesCompletedDelegate;

        private BeginOperationDelegate onBeginOpenDelegate;

        private EndOperationDelegate onEndOpenDelegate;

        private System.Threading.SendOrPostCallback onOpenCompletedDelegate;

        private BeginOperationDelegate onBeginCloseDelegate;

        private EndOperationDelegate onEndCloseDelegate;

        private System.Threading.SendOrPostCallback onCloseCompletedDelegate;

        public ServiceCachingClient() {
        }

        public ServiceCachingClient(string endpointConfigurationName) :
                base(endpointConfigurationName) {
        }

        public ServiceCachingClient(string endpointConfigurationName, string remoteAddress) :
                base(endpointConfigurationName, remoteAddress) {
        }

        public ServiceCachingClient(string endpointConfigurationName, System.ServiceModel.EndpointAddress remoteAddress) :
                base(endpointConfigurationName, remoteAddress) {
        }

        public ServiceCachingClient(System.ServiceModel.Channels.Binding binding, System.ServiceModel.EndpointAddress remoteAddress) :
                base(binding, remoteAddress) {
        }

        public System.Net.CookieContainer CookieContainer {
            get {
                System.ServiceModel.Channels.IHttpCookieContainerManager httpCookieContainerManager = this.InnerChannel.GetProperty<System.ServiceModel.Channels.IHttpCookieContainerManager>();
                if ((httpCookieContainerManager != null)) {
                    return httpCookieContainerManager.CookieContainer;
                }
                else {
                    return null;
                }
            }
            set {
                System.ServiceModel.Channels.IHttpCookieContainerManager httpCookieContainerManager = this.InnerChannel.GetProperty<System.ServiceModel.Channels.IHttpCookieContainerManager>();
                if ((httpCookieContainerManager != null)) {
                    httpCookieContainerManager.CookieContainer = value;
                }
                else {
                    throw new System.InvalidOperationException("Unable to set the CookieContainer. Please make sure the binding contains an HttpC" +
                            "ookieContainerBindingElement.");
                }
            }
        }

        public event System.EventHandler<GetHashCodeCompletedEventArgs> GetHashCodeCompleted;

        public event System.EventHandler<System.ComponentModel.AsyncCompletedEventArgs> ClearCompleted;

        public event System.EventHandler<ClearFOCacheCompletedEventArgs> ClearFOCacheCompleted;

        public event System.EventHandler<ClearFORoutesCompletedEventArgs> ClearFORoutesCompleted;

        public event System.EventHandler<System.ComponentModel.AsyncCompletedEventArgs> OpenCompleted;

        public event System.EventHandler<System.ComponentModel.AsyncCompletedEventArgs> CloseCompleted;

        [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)]
        System.IAsyncResult EspaceClient.BackOffice.Silverlight.Infrastructure.ServiceCaching.IServiceCaching.BeginGetHashCode(EspaceClient.BackOffice.Infrastructure.Context.WebContext context, System.AsyncCallback callback, object asyncState) {
            return base.Channel.BeginGetHashCode(context, callback, asyncState);
        }

        [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)]
        string EspaceClient.BackOffice.Silverlight.Infrastructure.ServiceCaching.IServiceCaching.EndGetHashCode(System.IAsyncResult result) {
            return base.Channel.EndGetHashCode(result);
        }

        private System.IAsyncResult OnBeginGetHashCode(object[] inValues, System.AsyncCallback callback, object asyncState) {
            EspaceClient.BackOffice.Infrastructure.Context.WebContext context = ((EspaceClient.BackOffice.Infrastructure.Context.WebContext)(inValues[0]));
            return ((EspaceClient.BackOffice.Silverlight.Infrastructure.ServiceCaching.IServiceCaching)(this)).BeginGetHashCode(context, callback, asyncState);
        }

        private object[] OnEndGetHashCode(System.IAsyncResult result) {
            string retVal = ((EspaceClient.BackOffice.Silverlight.Infrastructure.ServiceCaching.IServiceCaching)(this)).EndGetHashCode(result);
            return new object[] {
                    retVal};
        }

        private void OnGetHashCodeCompleted(object state) {
            if ((this.GetHashCodeCompleted != null)) {
                InvokeAsyncCompletedEventArgs e = ((InvokeAsyncCompletedEventArgs)(state));
                this.GetHashCodeCompleted(this, new GetHashCodeCompletedEventArgs(e.Results, e.Error, e.Cancelled, e.UserState));
            }
        }

        public void GetHashCodeAsync(EspaceClient.BackOffice.Infrastructure.Context.WebContext context) {
            this.GetHashCodeAsync(context, null);
        }

        public void GetHashCodeAsync(EspaceClient.BackOffice.Infrastructure.Context.WebContext context, object userState) {
            if ((this.onBeginGetHashCodeDelegate == null)) {
                this.onBeginGetHashCodeDelegate = new BeginOperationDelegate(this.OnBeginGetHashCode);
            }
            if ((this.onEndGetHashCodeDelegate == null)) {
                this.onEndGetHashCodeDelegate = new EndOperationDelegate(this.OnEndGetHashCode);
            }
            if ((this.onGetHashCodeCompletedDelegate == null)) {
                this.onGetHashCodeCompletedDelegate = new System.Threading.SendOrPostCallback(this.OnGetHashCodeCompleted);
            }
            base.InvokeAsync(this.onBeginGetHashCodeDelegate, new object[] {
                        context}, this.onEndGetHashCodeDelegate, this.onGetHashCodeCompletedDelegate, userState);
        }

        [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)]
        System.IAsyncResult EspaceClient.BackOffice.Silverlight.Infrastructure.ServiceCaching.IServiceCaching.BeginClear(EspaceClient.BackOffice.Infrastructure.Context.WebContext context, System.AsyncCallback callback, object asyncState) {
            return base.Channel.BeginClear(context, callback, asyncState);
        }

        [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)]
        void EspaceClient.BackOffice.Silverlight.Infrastructure.ServiceCaching.IServiceCaching.EndClear(System.IAsyncResult result) {
            base.Channel.EndClear(result);
        }

        private System.IAsyncResult OnBeginClear(object[] inValues, System.AsyncCallback callback, object asyncState) {
            EspaceClient.BackOffice.Infrastructure.Context.WebContext context = ((EspaceClient.BackOffice.Infrastructure.Context.WebContext)(inValues[0]));
            return ((EspaceClient.BackOffice.Silverlight.Infrastructure.ServiceCaching.IServiceCaching)(this)).BeginClear(context, callback, asyncState);
        }

        private object[] OnEndClear(System.IAsyncResult result) {
            ((EspaceClient.BackOffice.Silverlight.Infrastructure.ServiceCaching.IServiceCaching)(this)).EndClear(result);
            return null;
        }

        private void OnClearCompleted(object state) {
            if ((this.ClearCompleted != null)) {
                InvokeAsyncCompletedEventArgs e = ((InvokeAsyncCompletedEventArgs)(state));
                this.ClearCompleted(this, new System.ComponentModel.AsyncCompletedEventArgs(e.Error, e.Cancelled, e.UserState));
            }
        }

        public void ClearAsync(EspaceClient.BackOffice.Infrastructure.Context.WebContext context) {
            this.ClearAsync(context, null);
        }

        public void ClearAsync(EspaceClient.BackOffice.Infrastructure.Context.WebContext context, object userState) {
            if ((this.onBeginClearDelegate == null)) {
                this.onBeginClearDelegate = new BeginOperationDelegate(this.OnBeginClear);
            }
            if ((this.onEndClearDelegate == null)) {
                this.onEndClearDelegate = new EndOperationDelegate(this.OnEndClear);
            }
            if ((this.onClearCompletedDelegate == null)) {
                this.onClearCompletedDelegate = new System.Threading.SendOrPostCallback(this.OnClearCompleted);
            }
            base.InvokeAsync(this.onBeginClearDelegate, new object[] {
                        context}, this.onEndClearDelegate, this.onClearCompletedDelegate, userState);
        }

        [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)]
        System.IAsyncResult EspaceClient.BackOffice.Silverlight.Infrastructure.ServiceCaching.IServiceCaching.BeginClearFOCache(EspaceClient.BackOffice.Infrastructure.Context.WebContext context, string token, System.AsyncCallback callback, object asyncState) {
            return base.Channel.BeginClearFOCache(context, token, callback, asyncState);
        }

        [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)]
        bool EspaceClient.BackOffice.Silverlight.Infrastructure.ServiceCaching.IServiceCaching.EndClearFOCache(System.IAsyncResult result) {
            return base.Channel.EndClearFOCache(result);
        }

        private System.IAsyncResult OnBeginClearFOCache(object[] inValues, System.AsyncCallback callback, object asyncState) {
            EspaceClient.BackOffice.Infrastructure.Context.WebContext context = ((EspaceClient.BackOffice.Infrastructure.Context.WebContext)(inValues[0]));
            string token = ((string)(inValues[1]));
            return ((EspaceClient.BackOffice.Silverlight.Infrastructure.ServiceCaching.IServiceCaching)(this)).BeginClearFOCache(context, token, callback, asyncState);
        }

        private object[] OnEndClearFOCache(System.IAsyncResult result) {
            bool retVal = ((EspaceClient.BackOffice.Silverlight.Infrastructure.ServiceCaching.IServiceCaching)(this)).EndClearFOCache(result);
            return new object[] {
                    retVal};
        }

        private void OnClearFOCacheCompleted(object state) {
            if ((this.ClearFOCacheCompleted != null)) {
                InvokeAsyncCompletedEventArgs e = ((InvokeAsyncCompletedEventArgs)(state));
                this.ClearFOCacheCompleted(this, new ClearFOCacheCompletedEventArgs(e.Results, e.Error, e.Cancelled, e.UserState));
            }
        }

        public void ClearFOCacheAsync(EspaceClient.BackOffice.Infrastructure.Context.WebContext context, string token) {
            this.ClearFOCacheAsync(context, token, null);
        }

        public void ClearFOCacheAsync(EspaceClient.BackOffice.Infrastructure.Context.WebContext context, string token, object userState) {
            if ((this.onBeginClearFOCacheDelegate == null)) {
                this.onBeginClearFOCacheDelegate = new BeginOperationDelegate(this.OnBeginClearFOCache);
            }
            if ((this.onEndClearFOCacheDelegate == null)) {
                this.onEndClearFOCacheDelegate = new EndOperationDelegate(this.OnEndClearFOCache);
            }
            if ((this.onClearFOCacheCompletedDelegate == null)) {
                this.onClearFOCacheCompletedDelegate = new System.Threading.SendOrPostCallback(this.OnClearFOCacheCompleted);
            }
            base.InvokeAsync(this.onBeginClearFOCacheDelegate, new object[] {
                        context,
                        token}, this.onEndClearFOCacheDelegate, this.onClearFOCacheCompletedDelegate, userState);
        }

        [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)]
        System.IAsyncResult EspaceClient.BackOffice.Silverlight.Infrastructure.ServiceCaching.IServiceCaching.BeginClearFORoutes(EspaceClient.BackOffice.Infrastructure.Context.WebContext context, string token, System.AsyncCallback callback, object asyncState) {
            return base.Channel.BeginClearFORoutes(context, token, callback, asyncState);
        }

        [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)]
        bool EspaceClient.BackOffice.Silverlight.Infrastructure.ServiceCaching.IServiceCaching.EndClearFORoutes(System.IAsyncResult result) {
            return base.Channel.EndClearFORoutes(result);
        }

        private System.IAsyncResult OnBeginClearFORoutes(object[] inValues, System.AsyncCallback callback, object asyncState) {
            EspaceClient.BackOffice.Infrastructure.Context.WebContext context = ((EspaceClient.BackOffice.Infrastructure.Context.WebContext)(inValues[0]));
            string token = ((string)(inValues[1]));
            return ((EspaceClient.BackOffice.Silverlight.Infrastructure.ServiceCaching.IServiceCaching)(this)).BeginClearFORoutes(context, token, callback, asyncState);
        }

        private object[] OnEndClearFORoutes(System.IAsyncResult result) {
            bool retVal = ((EspaceClient.BackOffice.Silverlight.Infrastructure.ServiceCaching.IServiceCaching)(this)).EndClearFORoutes(result);
            return new object[] {
                    retVal};
        }

        private void OnClearFORoutesCompleted(object state) {
            if ((this.ClearFORoutesCompleted != null)) {
                InvokeAsyncCompletedEventArgs e = ((InvokeAsyncCompletedEventArgs)(state));
                this.ClearFORoutesCompleted(this, new ClearFORoutesCompletedEventArgs(e.Results, e.Error, e.Cancelled, e.UserState));
            }
        }

        public void ClearFORoutesAsync(EspaceClient.BackOffice.Infrastructure.Context.WebContext context, string token) {
            this.ClearFORoutesAsync(context, token, null);
        }

        public void ClearFORoutesAsync(EspaceClient.BackOffice.Infrastructure.Context.WebContext context, string token, object userState) {
            if ((this.onBeginClearFORoutesDelegate == null)) {
                this.onBeginClearFORoutesDelegate = new BeginOperationDelegate(this.OnBeginClearFORoutes);
            }
            if ((this.onEndClearFORoutesDelegate == null)) {
                this.onEndClearFORoutesDelegate = new EndOperationDelegate(this.OnEndClearFORoutes);
            }
            if ((this.onClearFORoutesCompletedDelegate == null)) {
                this.onClearFORoutesCompletedDelegate = new System.Threading.SendOrPostCallback(this.OnClearFORoutesCompleted);
            }
            base.InvokeAsync(this.onBeginClearFORoutesDelegate, new object[] {
                        context,
                        token}, this.onEndClearFORoutesDelegate, this.onClearFORoutesCompletedDelegate, userState);
        }

        private System.IAsyncResult OnBeginOpen(object[] inValues, System.AsyncCallback callback, object asyncState) {
            return ((System.ServiceModel.ICommunicationObject)(this)).BeginOpen(callback, asyncState);
        }

        private object[] OnEndOpen(System.IAsyncResult result) {
            ((System.ServiceModel.ICommunicationObject)(this)).EndOpen(result);
            return null;
        }

        private void OnOpenCompleted(object state) {
            if ((this.OpenCompleted != null)) {
                InvokeAsyncCompletedEventArgs e = ((InvokeAsyncCompletedEventArgs)(state));
                this.OpenCompleted(this, new System.ComponentModel.AsyncCompletedEventArgs(e.Error, e.Cancelled, e.UserState));
            }
        }

        public void OpenAsync() {
            this.OpenAsync(null);
        }

        public void OpenAsync(object userState) {
            if ((this.onBeginOpenDelegate == null)) {
                this.onBeginOpenDelegate = new BeginOperationDelegate(this.OnBeginOpen);
            }
            if ((this.onEndOpenDelegate == null)) {
                this.onEndOpenDelegate = new EndOperationDelegate(this.OnEndOpen);
            }
            if ((this.onOpenCompletedDelegate == null)) {
                this.onOpenCompletedDelegate = new System.Threading.SendOrPostCallback(this.OnOpenCompleted);
            }
            base.InvokeAsync(this.onBeginOpenDelegate, null, this.onEndOpenDelegate, this.onOpenCompletedDelegate, userState);
        }

        private System.IAsyncResult OnBeginClose(object[] inValues, System.AsyncCallback callback, object asyncState) {
            return ((System.ServiceModel.ICommunicationObject)(this)).BeginClose(callback, asyncState);
        }

        private object[] OnEndClose(System.IAsyncResult result) {
            ((System.ServiceModel.ICommunicationObject)(this)).EndClose(result);
            return null;
        }

        private void OnCloseCompleted(object state) {
            if ((this.CloseCompleted != null)) {
                InvokeAsyncCompletedEventArgs e = ((InvokeAsyncCompletedEventArgs)(state));
                this.CloseCompleted(this, new System.ComponentModel.AsyncCompletedEventArgs(e.Error, e.Cancelled, e.UserState));
            }
        }

        public void CloseAsync() {
            this.CloseAsync(null);
        }

        public void CloseAsync(object userState) {
            if ((this.onBeginCloseDelegate == null)) {
                this.onBeginCloseDelegate = new BeginOperationDelegate(this.OnBeginClose);
            }
            if ((this.onEndCloseDelegate == null)) {
                this.onEndCloseDelegate = new EndOperationDelegate(this.OnEndClose);
            }
            if ((this.onCloseCompletedDelegate == null)) {
                this.onCloseCompletedDelegate = new System.Threading.SendOrPostCallback(this.OnCloseCompleted);
            }
            base.InvokeAsync(this.onBeginCloseDelegate, null, this.onEndCloseDelegate, this.onCloseCompletedDelegate, userState);
        }

        protected override EspaceClient.BackOffice.Silverlight.Infrastructure.ServiceCaching.IServiceCaching CreateChannel() {
            return new ServiceCachingClientChannel(this);
        }

        private class ServiceCachingClientChannel : ChannelBase<EspaceClient.BackOffice.Silverlight.Infrastructure.ServiceCaching.IServiceCaching>, EspaceClient.BackOffice.Silverlight.Infrastructure.ServiceCaching.IServiceCaching {

            public ServiceCachingClientChannel(System.ServiceModel.ClientBase<EspaceClient.BackOffice.Silverlight.Infrastructure.ServiceCaching.IServiceCaching> client) :
                    base(client) {
            }

            public System.IAsyncResult BeginGetHashCode(EspaceClient.BackOffice.Infrastructure.Context.WebContext context, System.AsyncCallback callback, object asyncState) {
                object[] _args = new object[1];
                _args[0] = context;
                System.IAsyncResult _result = base.BeginInvoke("GetHashCode", _args, callback, asyncState);
                return _result;
            }

            public string EndGetHashCode(System.IAsyncResult result) {
                object[] _args = new object[0];
                string _result = ((string)(base.EndInvoke("GetHashCode", _args, result)));
                return _result;
            }

            public System.IAsyncResult BeginClear(EspaceClient.BackOffice.Infrastructure.Context.WebContext context, System.AsyncCallback callback, object asyncState) {
                object[] _args = new object[1];
                _args[0] = context;
                System.IAsyncResult _result = base.BeginInvoke("Clear", _args, callback, asyncState);
                return _result;
            }

            public void EndClear(System.IAsyncResult result) {
                object[] _args = new object[0];
                base.EndInvoke("Clear", _args, result);
            }

            public System.IAsyncResult BeginClearFOCache(EspaceClient.BackOffice.Infrastructure.Context.WebContext context, string token, System.AsyncCallback callback, object asyncState) {
                object[] _args = new object[2];
                _args[0] = context;
                _args[1] = token;
                System.IAsyncResult _result = base.BeginInvoke("ClearFOCache", _args, callback, asyncState);
                return _result;
            }

            public bool EndClearFOCache(System.IAsyncResult result) {
                object[] _args = new object[0];
                bool _result = ((bool)(base.EndInvoke("ClearFOCache", _args, result)));
                return _result;
            }

            public System.IAsyncResult BeginClearFORoutes(EspaceClient.BackOffice.Infrastructure.Context.WebContext context, string token, System.AsyncCallback callback, object asyncState) {
                object[] _args = new object[2];
                _args[0] = context;
                _args[1] = token;
                System.IAsyncResult _result = base.BeginInvoke("ClearFORoutes", _args, callback, asyncState);
                return _result;
            }

            public bool EndClearFORoutes(System.IAsyncResult result) {
                object[] _args = new object[0];
                bool _result = ((bool)(base.EndInvoke("ClearFORoutes", _args, result)));
                return _result;
            }
        }
    }
}


text:
package com.topie.spi.store;

import javax.activation.DataSource;

import com.topie.api.store.StoreDTO;

import com.topie.core.store.StoreHelper;
import com.topie.core.store.StoreResult;

public class LocalInternalStoreConnector implements InternalStoreConnector {
    private StoreHelper storeHelper;

    public StoreDTO saveStore(String model, DataSource dataSource,
            String tenantId) throws Exception {
        StoreResult storeResult = storeHelper.saveStore(tenantId + "/" + model,
                dataSource);

        return this.convertStoreDto(storeResult);
    }

    public StoreDTO saveStore(String model, String key, DataSource dataSource,
            String tenantId) throws Exception {
        StoreResult storeResult = storeHelper.saveStore(tenantId + "/" + model,
                key, dataSource);

        return this.convertStoreDto(storeResult);
    }

    public StoreDTO getStore(String model, String key, String tenantId)
            throws Exception {
        StoreResult storeResult = storeHelper.getStore(tenantId + "/" + model,
                key);

        if (storeResult == null) {
            return null;
        }

        return this.convertStoreDto(storeResult);
    }

    public void removeStore(String model, String key, String tenantId)
            throws Exception {
        storeHelper.removeStore(tenantId + "/" + model, key);
    }

    public StoreDTO convertStoreDto(StoreResult storeResult) {
        StoreDTO storeDto = new StoreDTO();
        storeDto.setModel(storeResult.getModel());
        storeDto.setKey(storeResult.getKey());
        storeDto.setDataSource(storeResult.getDataSource());
        storeDto.setDisplayName(storeResult.getKey());

        return storeDto;
    }

    public void setStoreHelper(StoreHelper storeHelper) {
        this.storeHelper = storeHelper;
    }
}

redpajama_set_name: RedPajamaGithub


text:
QStatusBar
{
    background-color: #b90000;
    color: #d9d9d9;
}

QDockWidget
{
	color: #d9d9d9;
	font: bold;
}

QDockWidget:title
{
	padding: 5px;
	background-color: #555;
}

QMainWindow
{
	background-color: #222;
}

QTabBar::tab
{
	background-color: transparent;
	color: #ddd;
}

QTabBar::tab:selected
{
	background-color: #c33;
}

QToolBar
{
	border: 0;
	spacing: 5px;
}

QToolButton, QPushButton
{
	color: #ddd;
	background-color: #444;
}

QToolButton:checked, QPushButton:checked
{
	background-color: #c33;
}

QComboBox
{
	background-color: #444;
	border: 1px solid #222;
	color: #ddd;
	min-width: 80px;
	min-height: 20px;
}

QListView
{
	background-color: #191919;
	border: 1px solid #222;
	color: #ddd;
}

QComboBox QAbstractItemView
{
	outline: 0px;
	selection-background-color: #c22;
}

#Background
{
	background-color: #191919;
}

#Picking_List
{
	background-color: #292929;
	border: 1px solid #444;
	outline: 0px;
	color: #ddd;
}

#Picking_List::item:hover
{
	background-color: #c22;
}

#Picking_List::item:selected
{
	background-color: #191919;
	color: #ddd;
}

QCheckBox::indicator:unchecked, QComboBox QAbstractItemView::indicator:unchecked
{
	background-color: #444;
	border: 1px solid #090909;
}

QCheckBox::indicator:checked, QComboBox QAbstractItemView::indicator:checked
{
	background-color: #c22;
	border: 1px solid #090909;
}

QMenu
{
	background-color: #444;
	color: #d9d9d9;
}

QMenu::item:selected
{
	background-color: #c22;
	color: #ddd;
}

QMenuBar, QMenuBar::item
{
	background-color: #444;
	color: #d9d9d9;
}

QScrollBar
{
	background: #090909;
}

QScrollBar:vertical
{
	margin: 16px 0 16px 0;
	width: 15px;
}

QScrollBar:horizontal
{
	margin: 0 16px 0 16px;
	height: 15px;
}

QScrollBar::add-page, QScrollBar::sub-page
{
	background: none;
}

QScrollBar::handle
{
	border: 1px solid #555;
	background: #222;
}

QScrollBar::handle:vertical
{
	min-height: 20px;
}

QScrollBar::handle:horizontal
{
	min-width: 20px;
}

QScrollBar::handle:pressed,
QScrollBar::add-line:pressed,
QScrollBar::sub-line:pressed
{
	border: 1px solid #f22;
}

QScrollBar::add-line, QScrollBar::sub-line
{
	border: 1px solid #555;
	background: #222;
	subcontrol-origin: margin;
}

QScrollBar::add-line:vertical
{
	height: 16px;
	subcontrol-position: bottom;
}

QScrollBar::add-line:horizontal
{
	width: 16px;
	subcontrol-position: right;
}

QScrollBar::sub-line:vertical
{
	height: 16px;
	subcontrol-position: top;
}

QScrollBar::sub-line:horizontal
{
	width: 16px;
	subcontrol-position: left;
}

QScrollBar::up-arrow,
QScrollBar::down-arrow,
QScrollBar::left-arrow,
QScrollBar::right-arrow
{
	width: 3px;
	height: 3px;
	background-color: #ddd;
}


text:
namespace extensions {

class ShellExtensionsAPIClient : public ExtensionsAPIClient {
 public:
  ShellExtensionsAPIClient();

  // ExtensionsAPIClient implementation.
  void AttachWebContentsHelpers(content::WebContents* web_contents) const
      override;
  AppViewGuestDelegate* CreateAppViewGuestDelegate() const override;
};

}  // namespace extensions

#endif  // EXTENSIONS_SHELL_BROWSER_SHELL_EXTENSIONS_API_CLIENT_H_


text:
<?php

namespace PanicHD\PanicHD\Controllers;

use App\Http\Controllers\Controller;
use Cache;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\Session;
use PanicHD\PanicHD\Helpers\LaravelVersion;
use PanicHD\PanicHD\Models;
use PanicHD\PanicHD\Models\Category;
use PanicHD\PanicHD\Models\Tag;

class CategoriesController extends Controller
{
    /**
     * Display a listing of the resource.
     *
     * @return Response
     */
    public function index()
    {
        $categories = Category::with('closingReasons')->with('tags')->get();

        return view('panichd::admin.category.index', compact('categories'));
    }

    /**
     * Show the form for creating a new resource.
     *
     * @return Response
     */
    public function create()
    {
        $status_lists = $this->Statuses();

        return view('panichd::admin.category.create', compact('status_lists'));
    }

    /**
     * Store a newly created resource in storage.
     *
     * @param Request $request
     *
     * @return Response
     */
    public function store(Request $request)
    {
        list($request, $reason_rules, $reason_messages, $a_reasons) = $this->add_reasons_to($request);

        list($request, $tag_rules, $tag_messages, $a_tags_new, $a_tags_update) = $this->add_tags_to($request);

        // Do Laravel validation
        $this->do_validate($request, array_merge($reason_rules, $tag_rules), array_merge($reason_messages, $tag_messages));

        $category = new Category();

        $category->name = $request->name;
        $category->color = $request->color;
        $category = $this->category_email_fields($request, $category);
        $category->create_level = $request->create_level;

        $category->save();

        $this->sync_reasons($request, $category, $a_reasons);

        $this->sync_category_tags($request, $category, $a_tags_new, $a_tags_update);

        Session::flash('status', trans('panichd::lang.category-name-has-been-created', ['name' => $request->name]));

        \Cache::forget('panichd::categories');

        return redirect()->action('\PanicHD\PanicHD\Controllers\CategoriesController@index');
    }

    /**
     * Display the specified resource.
     *
     * @param int $id
     *
     * @return Response
     */
    public function show($id)
    {
        return 'All category related agents here';
    }

    /**
     * Show the form for editing the specified resource.
     *
     * @param int $id
     *
     * @return Response
     */
    public function edit($id)
    {
        $category = Category::with([
            'tags'=> function ($q) {
                $q->withCount('tickets');
            },
        ])->with('closingReasons.status')->findOrFail($id);

        $status_lists = $this->Statuses();

        return view('panichd::admin.category.edit', compact('category', 'status_lists'));
    }

    /**
     * Returns statuses list
     * Decouple it with list().
     *
     * @return array
     */
    protected function Statuses()
    {
        $statuses = Cache::remember('panichd::statuses', 60, function () {
            return Models\Status::all();
        });

        if (LaravelVersion::min('5.3.0')) {
            return $statuses->pluck('name', 'id');
        } else {
            return $statuses->lists('name', 'id');
        }
    }

    /**
     * Update the specified resource in storage.
     *
     * @param Request $request
     * @param int     $id
     *
     * @return \Illuminate\Http\RedirectResponse
     */
    public function update(Request $request, $id)
    {
        list($request, $reason_rules, $reason_messages, $a_reasons) = $this->add_reasons_to($request);

        list($request, $tag_rules, $tag_messages, $a_tags_new, $a_tags_update) = $this->add_tags_to($request);

        // Do Laravel validation
        $this->do_validate($request, array_merge($reason_rules, $tag_rules), array_merge($reason_messages, $tag_messages));

        $category = Category::findOrFail($id);

        $category->name = $request->name;
        $category->color = $request->color;
        $category = $this->category_email_fields($request, $category);
        $category->create_level = $request->create_level;

        $category->save();

        $this->sync_reasons($request, $category, $a_reasons);

        $this->sync_category_tags($request, $category, $a_tags_new, $a_tags_update);

        Session::flash('status', trans('panichd::lang.category-name-has-been-modified', ['name' => $request->name]));

        \Cache::forget('panichd::categories');

        return redirect()->action('\PanicHD\PanicHD\Controllers\CategoriesController@index');
    }

    /**
     * Adds reason fields to $request.
     *
     * @param Request $request
     *
     * Return Array
     */
    protected function add_reasons_to($request)
    {
        $reason_rules = $reason_messages = $a_new = $a_update = $a_delete = [];
        $regex_text = trans('panichd::lang.regex-text-inline');

        $min_chars = '5';

        if ($request->exists('reason_ordering')) {
            foreach ($request->input('reason_ordering') as $ordering=>$i) {
                if ($request->input('jquery_delete_reason_'.$i) != '') {
                    $a_delete[] = $request->input('jquery_reason_id_'.$i);
                } elseif ($request->input('jquery_reason_id_'.$i) != '') {
                    $reason = [
                        'ordering'=> $ordering,
                    ];
                    if ($request->exists('jquery_reason_text_'.$i)) {
                        $reason['text'] = $request->input('jquery_reason_text_'.$i);
                        $reason_rules['jquery_reason_text_'.$i] = "required|min:$min_chars|regex:".$regex_text;

                        // Reason message
                        $reason_messages['jquery_reason_text_'.$i.'.required'] = trans('panichd::admin.category-reason-is-empty', ['number' => $i + 1]);
                        $reason_messages['jquery_reason_text_'.$i.'.min'] = trans('panichd::admin.category-reason-too-short', ['number' => $i + 1, 'name'=>$reason['text'], 'min' => $min_chars]);
                    }

                    if ($request->exists('jquery_reason_status_id_'.$i)) {
                        $reason['status_id'] = $request->input('jquery_reason_status_id_'.$i);
                        $reason_rules['jquery_reason_status_id_'.$i] = 'required|exists:panichd_statuses,id';

                        // Reason message
                        $reason_messages['jquery_reason_status_id_'.$i.'.required'] = trans('panichd::admin.category-reason-no-status', ['number' => $i + 1, 'name'=>$reason['text']]);
                    }

                    if ($request->input('jquery_reason_id_'.$i) == 'new') {
                        $a_new[] = $reason;
                    } else {
                        $a_update[$request->input('jquery_reason_id_'.$i)] = $reason;
                    }
                }
            }
        }

        $a_reasons = ['new'=>$a_new, 'update'=>$a_update, 'delete'=>$a_delete];

        return [$request, $reason_rules, $reason_messages, $a_reasons];
    }

    /**
     * Adds tag fields to $request.
     *
     * @param Request $request
     *
     * Return Array
     */
    protected function add_tags_to($request)
    {
        $a_kept_tags = $a_key_names = $a_names = $tag_rules = $tag_messages = [];

        // Allow alphanumeric and the following: ? @ / - _
        $tag_rule = 'required|regex:'.trans('panichd::admin.tag-regex');

        $c_tags = Tag::all();

        $a_tags_update = [];
        for ($i = 0; $i < $request->input('tags_count'); $i++) {
            $tag = $c_tags->first(function ($q) use ($request, $i) {
                return $q->id == $request->{'jquery_tag_id_'.$i};
            });

            if ($request->has('jquery_tag_id_'.$i) and !$request->has('jquery_delete_tag_'.$i) and !is_null($tag)) {
                // Tag has been kept in category
                $a_kept_tags[$i] = $tag;

                if ($request->exists('jquery_tag_name_'.$i)) {
                    // Add new name for rule preparation
                    $a_key_names[$i] = $request->{'jquery_tag_name_'.$i};
                } else {
                    // Add current name (has not changed) for rule preparation
                    $a_key_names[$i] = $tag->name;
                }
            }
        }

        // Names for new tags rule preparation
        $a_names = array_values($a_key_names);

        foreach ($a_kept_tags as $i => $tag) {
            // Add validation for renamed tags
            if ($request->exists('jquery_tag_name_'.$i)) {
                // New tag name
                $new_name = $request->input('jquery_tag_name_'.$i);

                $request->merge(['jquery_tag_name_'.$i=>$new_name]);
                $a_tags_update[$request->input('jquery_tag_id_'.$i)]['name'] = $new_name;
                $request['jquery_tag_name_'.$i] = $new_name;

                // Rule for an updated tag
                $a_this_not_in = $a_key_names;
                unset($a_this_not_in[$i]);
                $tag_rules['jquery_tag_name_'.$i] = $tag_rule.($a_this_not_in ? '|not_in:'.implode(',', array_values($a_this_not_in)) : '');

                // Add specific validation error messages
                $tag_messages['jquery_tag_name_'.$i.'.required'] = trans('panichd::admin.update-tag-validation-empty', ['name' => $tag->name]);
                $tag_messages['jquery_tag_name_'.$i.'.regex'] = trans('panichd::admin.category-tag-not-valid-format', ['tag'=>$new_name]);
                $tag_messages['jquery_tag_name_'.$i.'.not_in'] = trans('panichd::admin.tag-validation-two', ['name' => $new_name]);
            }

            // Add colors for tag update
            if ($request->input('jquery_tag_color_'.$i) != '') {
                $a_tags_update[$request->input('jquery_tag_id_'.$i)]['color'] = $request->input('jquery_tag_color_'.$i);
            }
        }

        // Add validation for new tags
        $a_tags_new = [];
        if ($request->filled('new_tags')) {
            foreach ($request->input('new_tags') as $id) {
                if (!$request->has('jquery_delete_tag_'.$id)) {
                    // Rule for new tag
                    $tag_rules['jquery_tag_name_'.$id] = $tag_rule.($a_names ? '|not_in:'.implode(',', $a_names) : '');

                    // Add tag name to array
                    $a_names[] = $request->{'jquery_tag_name_'.$id};

                    // Add specific validation error messages
                    $tag_messages['jquery_tag_name_'.$id.'.required'] = trans('panichd::admin.new-tag-validation-empty');
                    $tag_messages['jquery_tag_name_'.$id.'.regex'] = trans('panichd::admin.category-tag-not-valid-format', ['tag' => $request->{'jquery_tag_name_'.$id}]);
                    $tag_messages['jquery_tag_name_'.$id.'.not_in'] = trans('panichd::admin.tag-validation-two', ['name' => $request->{'jquery_tag_name_'.$id}]);

                    $a_tags_new[] = [
                        'name'  => $request->{'jquery_tag_name_'.$id},
                        'color' => $request->{'jquery_tag_color_'.$id},
                    ];
                }
            }
        }

        return [$request, $tag_rules, $tag_messages, $a_tags_new, $a_tags_update];
    }

    /**
     * Does the request validation.
     *
     * @param Request $request
     */
    protected function do_validate($request, $rules, $reason_messages)
    {
        $rules = array_merge($rules, [
            'name'         => 'required',
            'color'        => 'required',
            'create_level' => 'required|in:1,2,3',
        ]);

        if ($request->email_scope != 'default') {
            $rules = array_merge($rules, [
                'email_name'   => 'required|string',
                'email'        => 'required|email',
            ]);
        }

        $this->validate($request, $rules, $reason_messages);
    }

    /*
     * Returns category instance with email fields updated in object
    */
    protected function category_email_fields($request, $category)
    {
        if ($request->email_scope != 'default' and $request->input('email_name') != '' and $request->input('email') != '') {
            $category->email_name = $request->email_name;
            $category->email = $request->email;

            if ($request->email_replies == 1) {
                $category->email_replies = 1;
            } else {
                $category->email_replies = 0;
            }
        } else {
            $category->email_name = null;
            $category->email = null;
            $category->email_replies = 0;
        }

        return $category;
    }

    /**
     * Syncs reasons for category.
     *
     * @param $request
     * @param $a_tags_new Array
     * @param $category instance of PanicHD\PanicHD\Models\Category
     */
    protected function sync_reasons($request, $category, $a_reasons)
    {
        // Add new reasons
        foreach ($a_reasons['new'] as $fields) {
            $new = new Models\Closingreason();
            $new->text = $fields['text'];
            $new->status_id = $fields['status_id'];
            $new->category_id = $category->id;
            $new->ordering = $fields['ordering'];
            $new->save();
        }

        // Update reasons
        foreach ($a_reasons['update'] as $id=>$fields) {
            $reason = Models\Closingreason::where('id', $id)->first();
            $update = false;
            if (isset($fields['text'])) {
                $reason->text = $fields['text'];
                $update = true;
            }
            if (isset($fields['status_id'])) {
                $reason->status_id = $fields['status_id'];
                $update = true;
            }
            if ($reason->ordering != $fields['ordering']) {
                $reason->ordering = $fields['ordering'];
                $update = true;
            }

            if ($update) {
                $reason->save();
            }
        }

        // Delete marked reasons
        if ($a_reasons['delete']) {
            Models\Closingreason::destroy($a_reasons['delete']);
        }
    }

    /**
     * Syncs tags for category instance.
     *
     * @param $request
     * @param $a_tags_new Array
     * @param $category instance of PanicHD\PanicHD\Models\Category
     */
    protected function sync_category_tags($request, $category, $a_tags_new, $a_tags_update)
    {
        // Update renamed tags
        foreach ($a_tags_update as $id=>$fields) {
            $tag = Tag::where('id', $id)->first();
            if (isset($fields['name'])) {
                $tag->name = $fields['name'];
            }
            if (isset($fields['color'])) {
                $a_colors = explode('_', $fields['color']);
                $tag->bg_color = $a_colors[0];
                $tag->text_color = $a_colors[1];
            }
            $tag->save();
        }

        // Get category tags
        $tags = $category->tags();
        $tags = version_compare(app()->version(), '5.3.0', '>=') ? $tags->pluck('id')->toArray() : $tags->lists('id')->toArray();

        // Detach checked tags to delete
        $a_detach = $a_rename = [];
        for ($i = 0; $i < $request->input('tags_count'); $i++) {
            if ($request->input('jquery_delete_tag_'.$i) != '') {
                // Exclude for sync
                $a_detach[] = $request->input('jquery_delete_tag_'.$i);
            }
        }
        if ($a_detach) {
            // Detach on categories
            $tags = array_diff($tags, $a_detach);
        }

        // Add new tags
        foreach ($a_tags_new as $a_tag) {
            $a_colors = explode('_', $a_tag['color']);

            $new_tag = Tag::create([
                'name'       => $a_tag['name'],
                'bg_color'   => $a_colors[0],
                'text_color' => $a_colors[1],
            ]);

            $tags[] = $new_tag->id;
        }

        // Sync all category tags
        $category->tags()->sync($tags);

        // Detach deleted tags that have Tickets
        Tag::whereIn('id', $a_detach)->each(function ($tag) {
            $tag->tickets()->detach();
        });

        // Delete orphan tags (Without any related categories or tickets)
        Tag::doesntHave('categories')->doesntHave('tickets')->delete();
    }

    /**
     * Remove the specified resource from storage.
     *
     * @param int $id
     *
     * @return Response
     */
    public function destroy($id)
    {
        $category = Category::findOrFail($id);
        $name = $category->name;
        $category->delete();

        // Delete orphan tags (Without any related categories or tickets)
        Tag::doesntHave('categories')->doesntHave('tickets')->delete();

        Session::flash('status', trans('panichd::lang.category-name-has-been-deleted', ['name' => $name]));

        \Cache::forget('panichd::categories');

        return redirect()->action('\PanicHD\PanicHD\Controllers\CategoriesController@index');
    }
}


text:
package observerPattern;
/*
|==============================================================
|
|--------------------------------------------------------------
|	The Administrator is the 'Subject' in this pattern
|--------------------------------------------------------------
|
|==============================================================
|
*/
public interface Administrator {
	User user = null;

	public void registerUser(User user);

	public void removeUser(User user);

	public void notifyUser();

}


text:
@class QHCSubTagModel;
@interface QHCSubTagCell : UITableViewCell

@property(nonatomic, strong) QHCSubTagModel *subTagModel;

+ (instancetype)cellWithTableView:(UITableView *)tableView;
@end


text:
namespace Microsoft.Azure.Management.DataFactory.Models
{
    using Newtonsoft.Json;
    using System.Collections;
    using System.Collections.Generic;
    using System.Linq;

    /// <summary>
    /// A copy activity source for SAP Cloud for Customer source.
    /// </summary>
    public partial class SapCloudForCustomerSource : TabularSource
    {
        /// <summary>
        /// Initializes a new instance of the SapCloudForCustomerSource class.
        /// </summary>
        public SapCloudForCustomerSource()
        {
            CustomInit();
        }

        /// <summary>
        /// Initializes a new instance of the SapCloudForCustomerSource class.
        /// </summary>
        /// <param name="additionalProperties">Unmatched properties from the
        /// message are deserialized this collection</param>
        /// <param name="sourceRetryCount">Source retry count. Type: integer
        /// (or Expression with resultType integer).</param>
        /// <param name="sourceRetryWait">Source retry wait. Type: string (or
        /// Expression with resultType string), pattern:
        /// ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])).</param>
        /// <param name="maxConcurrentConnections">The maximum concurrent
        /// connection count for the source data store. Type: integer (or
        /// Expression with resultType integer).</param>
        /// <param name="queryTimeout">Query timeout. Type: string (or
        /// Expression with resultType string), pattern:
        /// ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])).</param>
        /// <param name="additionalColumns">Specifies the additional columns to
        /// be added to source data. Type: array of objects (or Expression with
        /// resultType array of objects).</param>
        /// <param name="query">SAP Cloud for Customer OData query. For
        /// example, "$top=1". Type: string (or Expression with resultType
        /// string).</param>
        /// <param name="httpRequestTimeout">The timeout (TimeSpan) to get an
        /// HTTP response. It is the timeout to get a response, not the timeout
        /// to read response data. Default value: 00:05:00. Type: string (or
        /// Expression with resultType string), pattern:
        /// ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])).</param>
        public SapCloudForCustomerSource(IDictionary<string, object> additionalProperties = default(IDictionary<string, object>), object sourceRetryCount = default(object), object sourceRetryWait = default(object), object maxConcurrentConnections = default(object), object queryTimeout = default(object), IList<AdditionalColumns> additionalColumns = default(IList<AdditionalColumns>), object query = default(object), object httpRequestTimeout = default(object))
            : base(additionalProperties, sourceRetryCount, sourceRetryWait, maxConcurrentConnections, queryTimeout, additionalColumns)
        {
            Query = query;
            HttpRequestTimeout = httpRequestTimeout;
            CustomInit();
        }

        /// <summary>
        /// An initialization method that performs custom operations like setting defaults
        /// </summary>
        partial void CustomInit();

        /// <summary>
        /// Gets or sets SAP Cloud for Customer OData query. For example,
        /// "$top=1". Type: string (or Expression with resultType string).
        /// </summary>
        [JsonProperty(PropertyName = "query")]
        public object Query { get; set; }

        /// <summary>
        /// Gets or sets the timeout (TimeSpan) to get an HTTP response. It is
        /// the timeout to get a response, not the timeout to read response
        /// data. Default value: 00:05:00. Type: string (or Expression with
        /// resultType string), pattern:
        /// ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])).
        /// </summary>
        [JsonProperty(PropertyName = "httpRequestTimeout")]
        public object HttpRequestTimeout { get; set; }

    }
}


text:
import networkx as nx
import random
import scipy as sp

from gat.core.sna import ergm

def resilience(cliques_found, ergm_iters=3000):
    scaledResilience = {}
    scaledBaseline = {}
    toScale = []
    baselinesToScale = []
    traces = []
    formatted_traces = {}
    cliques, selected = cliques_found
    # Find resilience of subgraphs
    for clique in cliques:
        initShortestPath = nx.average_shortest_path_length(clique)
        baselinesToScale.append(initShortestPath)
        # creating perturbation by removing random 10% of nodes and averaging result of x iterations
        G = clique.copy()  # percent of nodes removed can be changed here
        rSample = random.sample(G.nodes(), int(G.number_of_nodes() * 0.1))
        G.remove_nodes_from(rSample)
        coefs, new_trace = ergm.resilience(G, ergm_iters, mu=initShortestPath*.2)
        toScale.append(coefs["aspl"])
        traces.append(new_trace["aspl"].tolist())

    # scale resilience measures on a normal scale
    for i in range(len(cliques)):
        scaledResilience[selected[i]] = toScale[i]
        scaledBaseline[selected[i]] = sp.stats.percentileofscore(baselinesToScale, baselinesToScale[i])
        formatted_traces[selected[i]] = traces[i]

    return scaledBaseline, scaledResilience, formatted_traces


text:
        Register Team
        Sport Event Information System NPIC

<a href="<?php echo site_url('adm')?>">Dashboard

<a href="<?php echo site_url('adm/manage/team')?>">Team

<a href="<?php echo site_url('adm/manage/team/'.$dtt->team_id)?>">List Member

<a href="<?php echo site_url('adm/team/member/'.$dtt->team_id.'/edit/'.$dtm->member_id)?>">Edit Member

Here

  <?php echo $this->session->flashdata('response'); ?>

    <?php
    	echo form_open_multipart(site_url('adm/team/member/'.$dtt->team_id.'/edit/'.$dtm->member_id.'/confirm'));
    ?>

<?php echo 'Edit Member '.$dtm->member_id.' from Team '.$dtt->team_name; ?>

		<?php
			$majorList = array(
	            'AE' => 'Automobile Engineering',
	            'CAD' => 'CAD/CAM (High Diploma Degree)',
	            'CE' => 'Civil Engineering',
	            'CA' => 'Culinary Arts',
	            'ELC' => 'Electronic Engineering',
	            'ELE' => 'Electrical Engineering',
	            'CS' => 'Computer Science',
	            'GME' => 'General Mechanical Engineering',
	            'TH' => 'Tourism and Hospitality'
          	);
			echo '
';
		    echo form_upload('ava', set_value('ava'), 'id=\'avatar-2\' required');
		    echo '
';
		    echo '
';
			echo form_label('Team ID', 'team');
			echo form_input('team', $dtt->team_id, 'class=\'form-control\' disabled');
			echo form_label('Member ID', 'member');
			echo form_input('member', $dtm->member_id, 'class=\'form-control\' disabled');
			echo '
';
		    echo '
';
			echo form_label('Member Name', 'mName');
			echo form_input('mName', $dtm->member_name, 'class=\'form-control\' placeholder=\'Member Name\'');
			echo form_error('mName');
			echo form_label('Member Email', 'mMail');
			echo form_input('mMail', $dtm->member_email, 'class=\'form-control\' placeholder=\'Member Email\'');
			echo form_error('mMail');
			echo form_label('Date of Birth', 'dob');
			echo form_input('dob', set_value('dob'), 'class=\'form-control dob\' placeholder=\'Date of Birth\'');
			echo form_error('dob');
			echo form_label('Major', 'mMajor');
			echo form_dropdown('mMajor', $majorList, $dtm->major, 'class=\'form-control\'');
			echo form_error('mMajor');
			echo form_label('Year', 'mYear');
			echo form_input('mYear', $dtm->year, 'class=\'form-control\' placeholder=\'Year\'');
			echo form_error('mYear');
			echo '
';
		?>

    	<?php
			echo form_submit('update','Save','class=\'btn btn-default pull-right\'');
			echo anchor(site_url('adm/manage/team/'.$dtt->team_id), 'Cancel', 'class=\'btn btn-warning\'');
			echo form_close();
		?>


text:
@interface ViewController ()<UITableViewDataSource, UITableViewDelegate>

@property (nonatomic, strong) UITableView *mainTableView;

@end

@implementation ViewController

#pragma mark - Life Cycle

- (void)didReceiveMemoryWarning {
	[super didReceiveMemoryWarning];
	// Dispose of any resources that can be recreated.
}

- (void)viewDidLoad {
	[super viewDidLoad];

	[self.view addSubview:self.mainTableView];
}

#pragma mark - TableView Delegate & Datasource

- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section {
	return 20;
}

- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {

	RSDemoTableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:[RSDemoTableViewCell cellIdentifier] forIndexPath:indexPath];

	cell.textLabel.text = @"Hello, nice to meet you!";

	return cell;
}

- (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath {
	return [RSDemoTableViewCell cellHeight];
}

#pragma mark - Setter & Getter

- (UITableView *)mainTableView {
	if (!_mainTableView) {
		_mainTableView = [[UITableView alloc] initWithFrame:[UIScreen mainScreen].bounds style:UITableViewStylePlain];
		_mainTableView.dataSource = self;
		_mainTableView.delegate = self;

		[RSDemoTableViewCell registerClassToTableView:_mainTableView];
	}
	return _mainTableView;
}

@end


text: My work for PHYS 202 (Computing in Physics)


text:
.. _writing_extensions:

Writing Extensions
==================

Structure
---------

Extensions should subclass :class:`nameko.extensions.Extension`. This base class provides the basic structure for an extension, in particular the following methods which can be overridden to add functionality:

.. sidebar:: Binding

    An extension in a service class is merely a declaration. When a service is :ref:`hosted <running_services>` by a :ref:`service container <containers>` its extensions are "bound" to the container.

    The binding process is transparent to a developer writing new extensions. The only consideration should be that :meth:`~nameko.extensions.Extension.__init__` is called in :meth:`~nameko.extensions.Extensions.bind` as well as at service class declaration time, so you should avoid side-effects in this method and use :meth:`~nameko.extensions.Extensions.setup` instead.

.. automethod:: nameko.extensions.Extension.setup

.. automethod:: nameko.extensions.Extension.start

.. automethod:: nameko.extensions.Extension.stop

Dependency Providers
--------------------

It's likely that even a modest Nameko application will need to define its own dependencies -- maybe to interface with a database for which there is no :ref:`community extension <community_extensions>` or to communicate with a :ref:`specific web service <travis>`.

Dependency providers should subclass :class:`nameko.extensions.DependencyProvider` and implement a :meth:`~nameko.extensions.DependencyProvider.get_dependency` method that returns an object to be injected into service workers.

Dependency providers may also hook into the *worker lifecycle*. The following three methods are called on all dependency providers for every worker:

.. automethod:: nameko.extensions.DependencyProvider.worker_setup

.. automethod:: nameko.extensions.DependencyProvider.worker_result

.. automethod:: nameko.extensions.DependencyProvider.worker_teardown


text:
//  Copyright 2020 Google Inc. All Rights Reserved.
//
//  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.

using System;
using System.Runtime.InteropServices;

namespace NtApiDotNet.Win32.Security.Native
{
    [StructLayout(LayoutKind.Sequential)]
    internal struct LSAPR_ACCOUNT_ENUM_BUFFER
    {
        public int EntriesRead;
        public IntPtr Information; // PLSAPR_ACCOUNT_INFORMATION
    }
}


text:
// ***********************************************************************
// Copyright (c) 2008 Charlie Poole
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
// "Software"), to deal in the Software without restriction, including
// without limitation the rights to use, copy, modify, merge, publish,
// distribute, sublicense, and/or sell copies of the Software, and to
// permit persons to whom the Software is furnished to do so, subject to
// the following conditions:
//
// The above copyright notice and this permission notice shall be
// included in all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
// ***********************************************************************

using NUnit.Framework.Interfaces;
using NUnit.Framework.Constraints;
using NUnit.Framework.Internal;
using NUnit.TestData;
using NUnit.TestUtilities;

#if NET_4_0 || NET_4_5 || PORTABLE
using System;
using System.Threading.Tasks;
#endif

#if NET_4_0
using Task = System.Threading.Tasks.TaskEx;
#endif

namespace NUnit.Framework.Assertions
{
    using System;

    [TestFixture]
    public class AssertThatTests
    {
        [Test]
        public void AssertionPasses_Boolean()
        {
            Assert.That(2 + 2 == 4);
        }

        [Test]
        public void AssertionPasses_BooleanWithMessage()
        {
            Assert.That(2 + 2 == 4, "Not Equal");
        }

        [Test]
        public void AssertionPasses_BooleanWithMessageAndArgs()
        {
            Assert.That(2 + 2 == 4, "Not Equal to {0}", 4);
        }

        [Test]
        public void AssertionPasses_BooleanWithMessageStringFunc()
        {
            Func<string> getExceptionMessage = () => string.Format("Not Equal to {0}", 4);
            Assert.That(2 + 2 == 4, getExceptionMessage);
        }

        [Test]
        public void AssertionPasses_BooleanWithMessageConstraintResultFunc()
        {
            Func<ConstraintResult, string> getExceptionMessage = result => result.ToString();
            Assert.That(2 + 2 == 4, getExceptionMessage);
        }

        [Test]
        public void AssertionPasses_ActualAndConstraint()
        {
            Assert.That(2 + 2, Is.EqualTo(4));
        }

        [Test]
        public void AssertionPasses_ActualAndConstraintWithMessage()
        {
            Assert.That(2 + 2, Is.EqualTo(4), "Should be 4");
        }

        [Test]
        public void AssertionPasses_ActualAndConstraintWithMessageAndArgs()
        {
            Assert.That(2 + 2, Is.EqualTo(4), "Should be {0}", 4);
        }

        [Test]
        public void AssertionPasses_ActualAndConstraintWithMessageStringFunc()
        {
            Func<string> getExceptionMessage = () => string.Format("Not Equal to {0}", 4);
            Assert.That(2 + 2, Is.EqualTo(4), getExceptionMessage);
        }

        [Test]
        public void AssertionPasses_ActualAndConstraintWithMessageConstraintResultFunc()
        {
            Func<ConstraintResult, string> getExceptionMessage = result => result.ToString();
            Assert.That(2 + 2, Is.EqualTo(4), getExceptionMessage);
        }

#if !NET_2_0
        [Test]
        public void AssertionPasses_ActualLambdaAndConstraint()
        {
            Assert.That(() => 2 + 2, Is.EqualTo(4));
        }

        [Test]
        public void AssertionPasses_ActualLambdaAndConstraintWithMessage()
        {
            Assert.That(() => 2 + 2, Is.EqualTo(4), "Should be 4");
        }

        [Test]
        public void AssertionPasses_ActualLambdaAndConstraintWithMessageAndArgs()
        {
            Assert.That(() => 2 + 2, Is.EqualTo(4), "Should be {0}", 4);
        }

        [Test]
        public void AssertionPasses_ActualLambdaAndConstraintWithMessageStringFunc()
        {
            Func<string> getExceptionMessage = () => string.Format("Not Equal to {0}", 4);
            Assert.That(() => 2 + 2, Is.EqualTo(4), getExceptionMessage);
        }

        [Test]
        public void AssertionPasses_ActualLambdaAndConstraintWithMessageConstraintResultFunc()
        {
            Func<ConstraintResult, string> getExceptionMessage = result => result.ToString();
            Assert.That(() => 2 + 2, Is.EqualTo(4), getExceptionMessage);
        }
#endif

        [Test]
        public void AssertionPasses_DelegateAndConstraint()
        {
            Assert.That(new ActualValueDelegate<int>(ReturnsFour), Is.EqualTo(4));
        }

        [Test]
        public void AssertionPasses_DelegateAndConstraintWithMessage()
        {
            Assert.That(new ActualValueDelegate<int>(ReturnsFour), Is.EqualTo(4), "Message");
        }

        [Test]
        public void AssertionPasses_DelegateAndConstraintWithMessageAndArgs()
        {
            Assert.That(new ActualValueDelegate<int>(ReturnsFour), Is.EqualTo(4), "Should be {0}", 4);
        }

        [Test]
        public void AssertionPasses_DelegateAndConstraintWithMessageStringFunc()
        {
            Func<string> getExceptionMessage = () => string.Format("Not Equal to {0}", 4);
            Assert.That(new ActualValueDelegate<int>(ReturnsFour), Is.EqualTo(4), getExceptionMessage);
        }

        [Test]
        public void AssertionPasses_DelegateAndConstraintWithMessageConstraintResultFunc()
        {
            Func<ConstraintResult, string> getExceptionMessage = result => result.ToString();
            Assert.That(new ActualValueDelegate<int>(ReturnsFour), Is.EqualTo(4), getExceptionMessage);
        }

        private int ReturnsFour()
        {
            return 4;
        }

        [Test]
        public void FailureThrowsAssertionException_Boolean()
        {
            Assert.Throws<AssertionException>(() => Assert.That(2 + 2 == 5));
        }

        [Test]
        public void FailureThrowsAssertionException_BooleanWithMessage()
        {
            var ex = Assert.Throws<AssertionException>(() => Assert.That(2 + 2 == 5, "message"));
            Assert.That(ex.Message, Does.Contain("message"));
        }

        [Test]
        public void FailureThrowsAssertionException_BooleanWithMessageAndArgs()
        {
            var ex = Assert.Throws<AssertionException>(() => Assert.That(2 + 2 == 5, "got {0}", 5));
            Assert.That(ex.Message, Does.Contain("got 5"));
        }

        [Test]
        public void FailureThrowsAssertionException_BooleanWithMessageStringFunc()
        {
            Func<string> getExceptionMessage = () => string.Format("Not Equal to {0}", 4);
            var ex = Assert.Throws<AssertionException>(() => Assert.That(2 + 2 == 5, getExceptionMessage));
            Assert.That(ex.Message, Does.Contain("Not Equal to 4"));
        }

        [Test]
        public void FailureThrowsAssertionException_BooleanWithMessageConstraintResultFunc()
        {
            Func<ConstraintResult, string> getExceptionMessage = result => string.Format("Result was: {0}", result.ToString());
            var ex = Assert.Throws<AssertionException>(() => Assert.That(2 + 2 == 5, getExceptionMessage));
            Assert.That(ex.Message, Does.Contain("Result was:"));
        }

        [Test]
        public void FailureThrowsAssertionException_ActualAndConstraint()
        {
            Assert.Throws<AssertionException>(() => Assert.That(2 + 2, Is.EqualTo(5)));
        }

        [Test]
        public void FailureThrowsAssertionException_ActualAndConstraintWithMessage()
        {
            var ex = Assert.Throws<AssertionException>(() => Assert.That(2 + 2, Is.EqualTo(5), "Error"));
            Assert.That(ex.Message, Does.Contain("Error"));
        }

        [Test]
        public void FailureThrowsAssertionException_ActualAndConstraintWithMessageAndArgs()
        {
            var ex = Assert.Throws<AssertionException>(() => Assert.That(2 + 2, Is.EqualTo(5), "Should be {0}", 5));
            Assert.That(ex.Message, Does.Contain("Should be 5"));
        }

        [Test]
        public void FailureThrowsAssertionException_ActualAndConstraintWithMessageStringFunc()
        {
            Func<string> getExceptionMessage = () => "error";
            var ex = Assert.Throws<AssertionException>(() => Assert.That(2 + 2, Is.EqualTo(5), getExceptionMessage));
            Assert.That(ex.Message, Does.Contain("error"));
        }

        [Test]
        public void FailureThrowsAssertionException_ActualAndConstraintWithMessageConstraintResultFunc()
        {
            Func<ConstraintResult, string> getExceptionMessage = result => string.Format("Result was: {0}", result.ToString());
            var ex = Assert.Throws<AssertionException>(() => Assert.That(2 + 2, Is.EqualTo(5), getExceptionMessage));
            Assert.That(ex.Message, Does.Contain("Result was:"));
        }

#if !NET_2_0
        [Test]
        public void FailureThrowsAssertionException_ActualLambdaAndConstraint()
        {
            Assert.Throws<AssertionException>(() => Assert.That(() => 2 + 2, Is.EqualTo(5)));
        }

        [Test]
        public void FailureThrowsAssertionException_ActualLambdaAndConstraintWithMessage()
        {
            var ex = Assert.Throws<AssertionException>(() => Assert.That(() => 2 + 2, Is.EqualTo(5), "Error"));
            Assert.That(ex.Message, Does.Contain("Error"));
        }

        [Test]
        public void FailureThrowsAssertionException_ActualLambdaAndConstraintWithMessageAndArgs()
        {
            var ex = Assert.Throws<AssertionException>(() => Assert.That(() => 2 + 2, Is.EqualTo(5), "Should be {0}", 5));
            Assert.That(ex.Message, Does.Contain("Should be 5"));
        }

        [Test]
        public void FailureThrowsAssertionException_ActualLambdaAndConstraintWithMessageStringFunc()
        {
            Func<string> getExceptionMessage = () => "error";
            var ex = Assert.Throws<AssertionException>(() => Assert.That(() => 2 + 2, Is.EqualTo(5), getExceptionMessage));
            Assert.That(ex.Message, Does.Contain("error"));
        }

        [Test]
        public void FailureThrowsAssertionException_ActualLambdaAndConstraintWithMessageConstraintResultFunc()
        {
            Func<ConstraintResult, string> getExceptionMessage = result => string.Format("Result was: {0}", result.ToString());
            var ex = Assert.Throws<AssertionException>(() => Assert.That(() => 2 + 2, Is.EqualTo(5), getExceptionMessage));
            Assert.That(ex.Message, Does.Contain("Result was:"));
        }
#endif

        [Test]
        public void FailureThrowsAssertionException_DelegateAndConstraint()
        {
            Assert.Throws<AssertionException>(() => Assert.That(new ActualValueDelegate<int>(ReturnsFive), Is.EqualTo(4)));
        }

        [Test]
        public void FailureThrowsAssertionException_DelegateAndConstraintWithMessage()
        {
            var ex = Assert.Throws<AssertionException>(() => Assert.That(new ActualValueDelegate<int>(ReturnsFive), Is.EqualTo(4), "Error"));
            Assert.That(ex.Message, Does.Contain("Error"));
        }

        [Test]
        public void FailureThrowsAssertionException_DelegateAndConstraintWithMessageAndArgs()
        {
            var ex = Assert.Throws<AssertionException>(() => Assert.That(new ActualValueDelegate<int>(ReturnsFive), Is.EqualTo(4), "Should be {0}", 4));
            Assert.That(ex.Message, Does.Contain("Should be 4"));
        }

        [Test]
        public void FailureThrowsAssertionException_DelegateAndConstraintWithMessageStringFunc()
        {
            Func<string> getExceptionMessage = () => "error";
            var ex = Assert.Throws<AssertionException>(() => Assert.That(new ActualValueDelegate<int>(ReturnsFive), Is.EqualTo(4), getExceptionMessage));
            Assert.That(ex.Message, Does.Contain("error"));
        }

        [Test]
        public void FailureThrowsAssertionException_DelegateAndConstraintWithMessageConstraintResultFunc()
        {
            Func<ConstraintResult, string> getExceptionMessage = result => string.Format("Result was: {0}", result.ToString());
            var ex = Assert.Throws<AssertionException>(() => Assert.That(new ActualValueDelegate<int>(ReturnsFive), Is.EqualTo(4), getExceptionMessage));
            Assert.That(ex.Message, Does.Contain("Result was:"));
        }

        [Test]
        public void AssertionsAreCountedCorrectly()
        {
            ITestResult result = TestBuilder.RunTestFixture(typeof(AssertCountFixture));

            int totalCount = 0;
            foreach (TestResult childResult in result.Children)
            {
                int expectedCount = childResult.Name == "ThreeAsserts" ? 3 : 1;
                Assert.That(childResult.AssertCount, Is.EqualTo(expectedCount), "Bad count for {0}", childResult.Name);
                totalCount += expectedCount;
            }

            Assert.That(result.AssertCount, Is.EqualTo(totalCount), "Fixture count is not correct");
        }

        [Test]
        public void PassingAssertion_DoesNotCallExceptionStringFunc()
        {
            // Arrange
            var funcWasCalled = false;
            Func<string> getExceptionMessage = () =>
                {
                    funcWasCalled = true;
                    return "Func was called";
                };

            // Act
            Assert.That(0 + 1 == 1, getExceptionMessage);

            // Assert
            Assert.That(!funcWasCalled, "The getExceptionMessage function was called when it should not have been.");
        }

        [Test]
        public void PassingAssertion_DoesNotCallExceptionConstraintResultFunc()
        {
            // Arrange
            var funcWasCalled = false;
            Func<ConstraintResult, string> getExceptionMessage = result =>
                {
                    funcWasCalled = true;
                    return "Func was called";
                };

            // Act
            Assert.That(0 + 1 == 1, getExceptionMessage);

            // Assert
            Assert.That(!funcWasCalled, "The getExceptionMessage function was called when it should not have been.");
        }

        [Test]
        public void FailingAssertion_CallsExceptionStringFunc()
        {
            // Arrange
            var funcWasCalled = false;
            Func<string> getExceptionMessage = () =>
                {
                    funcWasCalled = true;
                    return "Func was called";
                };

            // Act
            var ex = Assert.Throws<AssertionException>(() => Assert.That(1 + 1 == 1, getExceptionMessage));

            // Assert
            Assert.That(ex.Message, Does.Contain("Func was called"));
            Assert.That(funcWasCalled, "The getExceptionMessage function was not called when it should have been.");
        }

        [Test]
        public void FailingAssertion_CallsExceptionConstraintResultFunc()
        {
            // Arrange
            var funcWasCalled = false;
            Func<ConstraintResult, string> getExceptionMessage = result =>
            {
                funcWasCalled = true;
                return "Func was called";
            };

            // Act
            var ex = Assert.Throws<AssertionException>(() => Assert.That(1 + 1 == 1, getExceptionMessage));

            // Assert
            Assert.That(ex.Message, Does.Contain("Func was called"));
            Assert.That(funcWasCalled, "The getExceptionMessage function was not called when it should have been.");
        }

        private int ReturnsFive()
        {
            return 5;
        }

#if NET_4_0 || NET_4_5 || PORTABLE
        [Test]
        public void AssertThatSuccess()
        {
            Assert.That(async () => await AsyncReturnOne(), Is.EqualTo(1));
        }

        [Test]
        public void AssertThatFailure()
        {
            Assert.Throws<AssertionException>(() =>
                Assert.That(async () => await AsyncReturnOne(), Is.EqualTo(2)));
        }

#if !PORTABLE
        [Test, Platform(Exclude="Linux", Reason="Intermittent failures on Linux")]
        public void AssertThatErrorTask()
        {
#if NET_4_5
            var exception =
#endif
            Assert.Throws<InvalidOperationException>(() =>
                Assert.That(async () => await ThrowInvalidOperationExceptionTask(), Is.EqualTo(1)));

#if NET_4_5
            Assert.That(exception.StackTrace, Does.Contain("ThrowInvalidOperationExceptionTask"));
#endif
        }
#endif

        [Test]
        public void AssertThatErrorGenericTask()
        {
#if NET_4_5
            var exception =
#endif
            Assert.Throws<InvalidOperationException>(() =>
                Assert.That(async () => await ThrowInvalidOperationExceptionGenericTask(), Is.EqualTo(1)));

#if NET_4_5
        Assert.That(exception.StackTrace, Does.Contain("ThrowInvalidOperationExceptionGenericTask"));
#endif
        }

        [Test]
        public void AssertThatErrorVoid()
        {
#if NET_4_5
            var exception =
#endif
            Assert.Throws<InvalidOperationException>(() =>
                Assert.That(async () => { await ThrowInvalidOperationExceptionGenericTask(); }, Is.EqualTo(1)));

#if NET_4_5
        Assert.That(exception.StackTrace, Does.Contain("ThrowInvalidOperationExceptionGenericTask"));
#endif
        }

        private static Task<int> AsyncReturnOne()
        {
            return Task.Run(() => 1);
        }

        private static async Task<int> ThrowInvalidOperationExceptionGenericTask()
        {
            await AsyncReturnOne();
            throw new InvalidOperationException();
        }

        private static async System.Threading.Tasks.Task ThrowInvalidOperationExceptionTask()
        {
            await AsyncReturnOne();
            throw new InvalidOperationException();
        }
#endif

#if !NET_2_0
        [Test]
        public void AssertThatWithLambda()
        {
            Assert.That(() => true);
        }

        [Test]
        public void AssertThatWithFalseLambda()
        {
            var ex = Assert.Throws<AssertionException>(() => Assert.That(() => false, "Error"));
            Assert.That(ex.Message, Does.Contain("Error"));
        }
#endif
    }
}


text:
package net.malisis.demo.stargate;

import net.malisis.demo.IDemo;
import net.minecraftforge.fml.common.registry.GameRegistry;

/**
 * This demo is designed to show how complex animations can be handled when rendering.
 *
 * @author Ordinastie
 *
 */
public class Stargate implements IDemo
{
	public static StargateBlock sgBlock;

	@Override
	public void preInit()
	{
		//create and register the block
		sgBlock = new StargateBlock();
		sgBlock.register();

		//register the TileEntity
		GameRegistry.registerTileEntity(StargateTileEntity.class, "stargateTileEntity");
	}

	@Override
	public void init()
	{}
}


text:
<!DOCTYPE html>

    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
    <title>{gooraye:$info['title']}</title>
    <meta name="viewport" content="width=device-width,height=device-height,inital-scale=1.0,maximum-scale=1.0,user-scalable=no,target-densitydpi=device-dpi, width=device-width"/>
    <meta name="apple-mobile-web-app-capable" content="yes" />
    <meta name="apple-mobile-web-app-status-bar-style" content="black" />
    <meta name="format-detection" content="telephone=no" />
    <meta charset="utf-8" />
    <link rel="stylesheet" href="{gooraye::STATICS}/education/flaticon.css"/>
    <link rel="stylesheet" href="{gooraye::STATICS}/schools/css/idangerous.swiper.css" />
    <link href="{gooraye::STATICS}/schools/css/iscroll.css" rel="stylesheet" type="text/css" />
    <link rel="stylesheet" href="{gooraye::STATICS}/schools/css/plugmenu.css" />
    <link rel="Stylesheet" href="{gooraye::STATICS}/schools/css/moban.css" type="text/css" />
    <link href="{gooraye::STATICS}/schools/css/cate.css" rel="stylesheet" type="text/css" />

{gooraye:$shareScript}

        <volist name="flash" id="vo">

        </volist>

← prev

next →

<if condition="$info['musicurl'] neq ''">

            <audio src="{gooraye:$info['musicurl']}" loop id="audio"></audio>

</if>
<link rel="stylesheet" href="{gooraye::STATICS}/schools/css/idangerous.swiper.css">

 $token,'wecha_id'=>$wecha_id,'cid'=>$info['menu1_id']))}">

                                {gooraye:$info['menu1']|default='学校简介'}

$token,'wecha_id'=>$wecha_id,'cid'=>$info['menu2_id'],'type'=>'assess'))}">

                                {gooraye:$info['menu2']|default='教师风采'}

$token,'wecha_id'=>$wecha_id,'cid'=>$info['menu3_id']))}">

                                {gooraye:$info['menu3']|default='同学天地'}

$token,'wecha_id'=>$wecha_id,'cid'=>$info['menu4_id']))}">

                                {gooraye:$info['menu4']|default='课程介绍'}

 $token,'wecha_id'=>$wecha_id,'type'=>'school'))}">

                                {gooraye:$info['menu5']|default='食谱安排'}

$token,'wecha_id'=>$wecha_id,'cid'=>$info['menu6_id']))}">

                                {gooraye:$info['menu6']|default='校园公告'}

$token,'wecha_id'=>$wecha_id))}">

                                {gooraye:$info['menu7']|default='成绩查询'}

$token,'wecha_id'=>$wecha_id))}">

                                {gooraye:$info['menu8']|default='家长建议'}

    <if condition="$iscopyright eq 1">
    {gooraye:$homeInfo.copyright}
    <else/>
    {gooraye:$siteCopyright}
    </if>

<include file="Index:styleInclude"/><include file="$cateMenuFileName"/>


text:
package ru.st.selenium.pages;

import org.openqa.selenium.WebDriver;
import org.openqa.selenium.support.PageFactory;
import org.openqa.selenium.support.pagefactory.AjaxElementLocatorFactory;

public class PageManager {

  private WebDriver driver;

  public LoginPage loginPage;
  public InternalPage internalPage;
  public UserProfilePage userProfilePage;
  public UserManagementPage userManagementPage;
  public FilmListPage filmListPage;
  public FilmAddPage filmAddPage;
  public FilmViewPage filmViewPage;

  public PageManager(WebDriver driver) {
    this.driver = driver;
    loginPage = initElements(new LoginPage(this));
    internalPage = initElements(new InternalPage(this));
    userProfilePage = initElements(new UserProfilePage(this));
    userManagementPage = initElements(new UserManagementPage(this));
    filmListPage = initElements(new FilmListPage(this));
    filmAddPage = initElements (new FilmAddPage(this));
    filmViewPage = initElements (new FilmViewPage(this));
  }

  private <T extends Page> T initElements(T page) {
    //PageFactory.initElements(driver, page);
    //PageFactory.initElements(new AjaxElementLocatorFactory(driver, 10), page);
    PageFactory.initElements(new DisplayedElementLocatorFactory(driver, 10), page);
    return page;
  }

  public WebDriver getWebDriver() {
    return driver;
  }

}


text:
<menu xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    xmlns:tools="http://schemas.android.com/tools"
    tools:context=".Sheet_view">
    <item
        android:id="@+id/action_add"
        android:icon="@android:drawable/ic_input_add"
        android:title="@string/action_add"
        app:showAsAction="ifRoom" />
    <item
        android:id="@+id/action_settings"
        android:orderInCategory="100"
        android:title="@string/action_settings"
        app:showAsAction="never" />
</menu>


text:
namespace device {

namespace {

static const uint64_t kPredictionTimeWithoutVsyncNanos = 50000000;

}  // namespace

GvrDevice::GvrDevice(GvrDeviceProvider* provider, GvrDelegate* delegate)
    : VRDevice(), delegate_(delegate), gvr_provider_(provider) {}

GvrDevice::~GvrDevice() {}

mojom::VRDisplayInfoPtr GvrDevice::GetVRDevice() {
  TRACE_EVENT0("input", "GvrDevice::GetVRDevice");

  mojom::VRDisplayInfoPtr device = mojom::VRDisplayInfo::New();

  device->index = id();

  device->capabilities = mojom::VRDisplayCapabilities::New();
  device->capabilities->hasOrientation = true;
  device->capabilities->hasPosition = false;
  device->capabilities->hasExternalDisplay = false;
  device->capabilities->canPresent = true;
  device->capabilities->hasPassThroughCamera = false;

  device->leftEye = mojom::VREyeParameters::New();
  device->rightEye = mojom::VREyeParameters::New();
  mojom::VREyeParametersPtr& left_eye = device->leftEye;
  mojom::VREyeParametersPtr& right_eye = device->rightEye;

  left_eye->fieldOfView = mojom::VRFieldOfView::New();
  right_eye->fieldOfView = mojom::VRFieldOfView::New();

  left_eye->offset.resize(3);
  right_eye->offset.resize(3);

  // Set the render target size to "invalid" to indicate that
  // we can't render into it yet. Other code uses this to check
  // for valid state.
  gvr::Sizei render_target_size = kInvalidRenderTargetSize;
  left_eye->renderWidth = render_target_size.width / 2;
  left_eye->renderHeight = render_target_size.height;

  right_eye->renderWidth = left_eye->renderWidth;
  right_eye->renderHeight = left_eye->renderHeight;

  gvr::GvrApi* gvr_api = GetGvrApi();
  if (!gvr_api) {
    // We may not be able to get an instance of GvrApi right away, so
    // stub in some data till we have one.
    device->displayName = "Unknown";

    left_eye->fieldOfView->upDegrees = 45;
    left_eye->fieldOfView->downDegrees = 45;
    left_eye->fieldOfView->leftDegrees = 45;
    left_eye->fieldOfView->rightDegrees = 45;

    right_eye->fieldOfView->upDegrees = 45;
    right_eye->fieldOfView->downDegrees = 45;
    right_eye->fieldOfView->leftDegrees = 45;
    right_eye->fieldOfView->rightDegrees = 45;

    left_eye->offset[0] = -0.0;
    left_eye->offset[1] = -0.0;
    left_eye->offset[2] = -0.03;

    right_eye->offset[0] = 0.0;
    right_eye->offset[1] = 0.0;
    right_eye->offset[2] = 0.03;

    // Tell the delegate not to draw yet, to avoid a race condition
    // (and visible wobble) on entering VR.
    if (delegate_) {
      delegate_->SetWebVRRenderSurfaceSize(kInvalidRenderTargetSize.width,
          kInvalidRenderTargetSize.height);
    }

    return device;
  }

  // In compositor mode, we have to use the current compositor window's
  // surface size. Would be nice to change it, but that needs more browser
  // internals to be modified. TODO(klausw,crbug.com/655722): remove this once
  // we can pick our own surface size.
  gvr::Sizei compositor_size = delegate_->GetWebVRCompositorSurfaceSize();
  left_eye->renderWidth = compositor_size.width / 2;
  left_eye->renderHeight = compositor_size.height;
  right_eye->renderWidth = left_eye->renderWidth;
  right_eye->renderHeight = left_eye->renderHeight;

  std::string vendor = gvr_api->GetViewerVendor();
  std::string model = gvr_api->GetViewerModel();
  device->displayName = vendor + " " + model;

  gvr::BufferViewportList gvr_buffer_viewports =
      gvr_api->CreateEmptyBufferViewportList();
  gvr_buffer_viewports.SetToRecommendedBufferViewports();

  gvr::BufferViewport eye_viewport = gvr_api->CreateBufferViewport();
  gvr_buffer_viewports.GetBufferViewport(GVR_LEFT_EYE, &eye_viewport);
  gvr::Rectf eye_fov = eye_viewport.GetSourceFov();
  left_eye->fieldOfView->upDegrees = eye_fov.top;
  left_eye->fieldOfView->downDegrees = eye_fov.bottom;
  left_eye->fieldOfView->leftDegrees = eye_fov.left;
  left_eye->fieldOfView->rightDegrees = eye_fov.right;

  eye_viewport = gvr_api->CreateBufferViewport();
  gvr_buffer_viewports.GetBufferViewport(GVR_RIGHT_EYE, &eye_viewport);
  eye_fov = eye_viewport.GetSourceFov();
  right_eye->fieldOfView->upDegrees = eye_fov.top;
  right_eye->fieldOfView->downDegrees = eye_fov.bottom;
  right_eye->fieldOfView->leftDegrees = eye_fov.left;
  right_eye->fieldOfView->rightDegrees = eye_fov.right;

  gvr::Mat4f left_eye_mat = gvr_api->GetEyeFromHeadMatrix(GVR_LEFT_EYE);
  left_eye->offset[0] = -left_eye_mat.m[0][3];
  left_eye->offset[1] = -left_eye_mat.m[1][3];
  left_eye->offset[2] = -left_eye_mat.m[2][3];

  gvr::Mat4f right_eye_mat = gvr_api->GetEyeFromHeadMatrix(GVR_RIGHT_EYE);
  right_eye->offset[0] = -right_eye_mat.m[0][3];
  right_eye->offset[1] = -right_eye_mat.m[1][3];
  right_eye->offset[2] = -right_eye_mat.m[2][3];

  if (delegate_) {
    delegate_->SetWebVRRenderSurfaceSize(2 * left_eye->renderWidth,
        left_eye->renderHeight);
  }

  return device;
}

mojom::VRPosePtr GvrDevice::GetPose() {
  TRACE_EVENT0("input", "GvrDevice::GetSensorState");

  mojom::VRPosePtr pose = mojom::VRPose::New();

  pose->timestamp = base::Time::Now().ToJsTime();

  // Increment pose frame counter always, even if it's a faked pose.
  pose->poseIndex = ++pose_index_;

  pose->orientation.emplace(4);

  gvr::GvrApi* gvr_api = GetGvrApi();
  if (!gvr_api) {
    // If we don't have a GvrApi instance return a static forward orientation.
    pose->orientation.value()[0] = 0.0;
    pose->orientation.value()[1] = 0.0;
    pose->orientation.value()[2] = 0.0;
    pose->orientation.value()[3] = 1.0;

    return pose;
  }

  if (!delegate_)
    return nullptr;

  gvr::ClockTimePoint target_time = gvr::GvrApi::GetTimePointNow();
  target_time.monotonic_system_time_nanos += kPredictionTimeWithoutVsyncNanos;

  gvr::Mat4f head_mat =
      gvr_api->GetHeadSpaceFromStartSpaceRotation(target_time);
  head_mat = gvr_api->ApplyNeckModel(head_mat, 1.0f);

  gfx::Transform inv_transform(
      head_mat.m[0][0], head_mat.m[0][1], head_mat.m[0][2], head_mat.m[0][3],
      head_mat.m[1][0], head_mat.m[1][1], head_mat.m[1][2], head_mat.m[1][3],
      head_mat.m[2][0], head_mat.m[2][1], head_mat.m[2][2], head_mat.m[2][3],
      head_mat.m[3][0], head_mat.m[3][1], head_mat.m[3][2], head_mat.m[3][3]);

  gfx::Transform transform;
  if (inv_transform.GetInverse(&transform)) {
    gfx::DecomposedTransform decomposed_transform;
    gfx::DecomposeTransform(&decomposed_transform, transform);

    pose->orientation.value()[0] = decomposed_transform.quaternion[0];
    pose->orientation.value()[1] = decomposed_transform.quaternion[1];
    pose->orientation.value()[2] = decomposed_transform.quaternion[2];
    pose->orientation.value()[3] = decomposed_transform.quaternion[3];

    pose->position.emplace(3);
    pose->position.value()[0] = decomposed_transform.translate[0];
    pose->position.value()[1] = decomposed_transform.translate[1];
    pose->position.value()[2] = decomposed_transform.translate[2];
  }

  // Save the underlying GVR pose for use by rendering. It can't use a
  // VRPosePtr since that's a different data type.
  delegate_->SetGvrPoseForWebVr(head_mat, pose_index_);

  return pose;
}

void GvrDevice::ResetPose() {
  gvr::GvrApi* gvr_api = GetGvrApi();

  // Should never call RecenterTracking when using with Daydream viewers. On
  // those devices recentering should only be done via the controller.
  if (gvr_api && gvr_api->GetViewerType() == GVR_VIEWER_TYPE_CARDBOARD)
    gvr_api->RecenterTracking();
}

mojom::VRPassThroughCameraPtr GvrDevice::GetPassThroughCamera()
{
  return nullptr;
}

std::vector<mojom::VRHitPtr> GvrDevice::HitTest(float x, float y)
{
  std::vector<mojom::VRHitPtr> hits;
  return hits;
}

mojom::VRPlaneDeltasPtr GvrDevice::GetPlaneDeltas() {
  mojom::VRPlaneDeltasPtr planes = nullptr;
  return planes;
}

mojom::VRAnchorPtr GvrDevice::AddAnchor(
    const std::vector<float>& modelMatrix) {
  return nullptr;
}

void GvrDevice::RemoveAnchor(uint32_t identifier) {
}

std::vector<mojom::VRMarkerPtr> GvrDevice::GetMarkers(unsigned markerType, float markerSize) {
  std::vector<mojom::VRMarkerPtr> markers;
  return markers;
}

void GvrDevice::RequestPresent(const base::Callback<void(bool)>& callback) {
  gvr_provider_->RequestPresent(callback);
}

void GvrDevice::SetSecureOrigin(bool secure_origin) {
  secure_origin_ = secure_origin;
  if (delegate_)
    delegate_->SetWebVRSecureOrigin(secure_origin_);
}

void GvrDevice::ExitPresent() {
  gvr_provider_->ExitPresent();
  OnExitPresent();
}

void GvrDevice::SubmitFrame(mojom::VRPosePtr pose) {
  if (delegate_)
    delegate_->SubmitWebVRFrame();
}

void GvrDevice::UpdateLayerBounds(mojom::VRLayerBoundsPtr left_bounds,
    mojom::VRLayerBoundsPtr right_bounds) {
  if (!delegate_)
    return;

  gvr::Rectf left_gvr_bounds;
  left_gvr_bounds.left = left_bounds->left;
  left_gvr_bounds.top = 1.0f - left_bounds->top;
  left_gvr_bounds.right = left_bounds->left + left_bounds->width;
  left_gvr_bounds.bottom = 1.0f - (left_bounds->top + left_bounds->height);

  gvr::Rectf right_gvr_bounds;
  right_gvr_bounds.left = right_bounds->left;
  right_gvr_bounds.top = 1.0f - right_bounds->top;
  right_gvr_bounds.right = right_bounds->left + right_bounds->width;
  right_gvr_bounds.bottom = 1.0f - (right_bounds->top + right_bounds->height);

  delegate_->UpdateWebVRTextureBounds(left_gvr_bounds, right_gvr_bounds);
}

void GvrDevice::SetDelegate(GvrDelegate* delegate) {
  delegate_ = delegate;

  // Notify the clients that this device has changed
  if (delegate_) {
    delegate_->SetWebVRSecureOrigin(secure_origin_);
    OnChanged();
  }
}

gvr::GvrApi* GvrDevice::GetGvrApi() {
  if (!delegate_)
    return nullptr;

  return delegate_->gvr_api();
}

}  // namespace device


text:
UCLASS(minimalapi)
class AWavesGameMode : public AGameMode
{
	GENERATED_BODY()

public:
	AWavesGameMode();
};