text:
using System;
using System.Runtime.InteropServices;
using System.Collections.Generic;
using System.Text;
using System.Threading;
using OpenHome.Net.Core;
using OpenHome.Net.ControlPoint;

namespace OpenHome.Net.ControlPoint.Proxies
{
    public interface ICpProxyAvOpenhomeOrgSender1 : ICpProxy, IDisposable
    {
        void SyncPresentationUrl(out String aValue);
        void BeginPresentationUrl(CpProxy.CallbackAsyncComplete aCallback);
        void EndPresentationUrl(IntPtr aAsyncHandle, out String aValue);
        void SyncMetadata(out String aValue);
        void BeginMetadata(CpProxy.CallbackAsyncComplete aCallback);
        void EndMetadata(IntPtr aAsyncHandle, out String aValue);
        void SyncAudio(out bool aValue);
        void BeginAudio(CpProxy.CallbackAsyncComplete aCallback);
        void EndAudio(IntPtr aAsyncHandle, out bool aValue);
        void SyncStatus(out String aValue);
        void BeginStatus(CpProxy.CallbackAsyncComplete aCallback);
        void EndStatus(IntPtr aAsyncHandle, out String aValue);
        void SyncAttributes(out String aValue);
        void BeginAttributes(CpProxy.CallbackAsyncComplete aCallback);
        void EndAttributes(IntPtr aAsyncHandle, out String aValue);
        void SetPropertyPresentationUrlChanged(System.Action aPresentationUrlChanged);
        String PropertyPresentationUrl();
        void SetPropertyMetadataChanged(System.Action aMetadataChanged);
        String PropertyMetadata();
        void SetPropertyAudioChanged(System.Action aAudioChanged);
        bool PropertyAudio();
        void SetPropertyStatusChanged(System.Action aStatusChanged);
        String PropertyStatus();
        void SetPropertyAttributesChanged(System.Action aAttributesChanged);
        String PropertyAttributes();
    }

    internal class SyncPresentationUrlAvOpenhomeOrgSender1 : SyncProxyAction
    {
        private CpProxyAvOpenhomeOrgSender1 iService;
        private String iValue;

        public SyncPresentationUrlAvOpenhomeOrgSender1(CpProxyAvOpenhomeOrgSender1 aProxy)
        {
            iService = aProxy;
        }
        public String Value()
        {
            return iValue;
        }
        protected override void CompleteRequest(IntPtr aAsyncHandle)
        {
            iService.EndPresentationUrl(aAsyncHandle, out iValue);
        }
    };

    internal class SyncMetadataAvOpenhomeOrgSender1 : SyncProxyAction
    {
        private CpProxyAvOpenhomeOrgSender1 iService;
        private String iValue;

        public SyncMetadataAvOpenhomeOrgSender1(CpProxyAvOpenhomeOrgSender1 aProxy)
        {
            iService = aProxy;
        }
        public String Value()
        {
            return iValue;
        }
        protected override void CompleteRequest(IntPtr aAsyncHandle)
        {
            iService.EndMetadata(aAsyncHandle, out iValue);
        }
    };

    internal class SyncAudioAvOpenhomeOrgSender1 : SyncProxyAction
    {
        private CpProxyAvOpenhomeOrgSender1 iService;
        private bool iValue;

        public SyncAudioAvOpenhomeOrgSender1(CpProxyAvOpenhomeOrgSender1 aProxy)
        {
            iService = aProxy;
        }
        public bool Value()
        {
            return iValue;
        }
        protected override void CompleteRequest(IntPtr aAsyncHandle)
        {
            iService.EndAudio(aAsyncHandle, out iValue);
        }
    };

    internal class SyncStatusAvOpenhomeOrgSender1 : SyncProxyAction
    {
        private CpProxyAvOpenhomeOrgSender1 iService;
        private String iValue;

        public SyncStatusAvOpenhomeOrgSender1(CpProxyAvOpenhomeOrgSender1 aProxy)
        {
            iService = aProxy;
        }
        public String Value()
        {
            return iValue;
        }
        protected override void CompleteRequest(IntPtr aAsyncHandle)
        {
            iService.EndStatus(aAsyncHandle, out iValue);
        }
    };

    internal class SyncAttributesAvOpenhomeOrgSender1 : SyncProxyAction
    {
        private CpProxyAvOpenhomeOrgSender1 iService;
        private String iValue;

        public SyncAttributesAvOpenhomeOrgSender1(CpProxyAvOpenhomeOrgSender1 aProxy)
        {
            iService = aProxy;
        }
        public String Value()
        {
            return iValue;
        }
        protected override void CompleteRequest(IntPtr aAsyncHandle)
        {
            iService.EndAttributes(aAsyncHandle, out iValue);
        }
    };

    /// <summary>
    /// Proxy for the av.openhome.org:Sender:1 UPnP service
    /// </summary>
    public class CpProxyAvOpenhomeOrgSender1 : CpProxy, IDisposable, ICpProxyAvOpenhomeOrgSender1
    {
        private OpenHome.Net.Core.Action iActionPresentationUrl;
        private OpenHome.Net.Core.Action iActionMetadata;
        private OpenHome.Net.Core.Action iActionAudio;
        private OpenHome.Net.Core.Action iActionStatus;
        private OpenHome.Net.Core.Action iActionAttributes;
        private PropertyString iPresentationUrl;
        private PropertyString iMetadata;
        private PropertyBool iAudio;
        private PropertyString iStatus;
        private PropertyString iAttributes;
        private System.Action iPresentationUrlChanged;
        private System.Action iMetadataChanged;
        private System.Action iAudioChanged;
        private System.Action iStatusChanged;
        private System.Action iAttributesChanged;
        private Mutex iPropertyLock;

        /// <summary>
        /// Constructor
        /// </summary>
        /// <remarks>Use CpProxy::[Un]Subscribe() to enable/disable querying of state variable and reporting of their changes.</remarks>
        /// <param name="aDevice">The device to use</param>
        public CpProxyAvOpenhomeOrgSender1(CpDevice aDevice)
            : base("av-openhome-org", "Sender", 1, aDevice)
        {
            OpenHome.Net.Core.Parameter param;
            List<String> allowedValues = new List<String>();

            iActionPresentationUrl = new OpenHome.Net.Core.Action("PresentationUrl");
            param = new ParameterString("Value", allowedValues);
            iActionPresentationUrl.AddOutputParameter(param);

            iActionMetadata = new OpenHome.Net.Core.Action("Metadata");
            param = new ParameterString("Value", allowedValues);
            iActionMetadata.AddOutputParameter(param);

            iActionAudio = new OpenHome.Net.Core.Action("Audio");
            param = new ParameterBool("Value");
            iActionAudio.AddOutputParameter(param);

            iActionStatus = new OpenHome.Net.Core.Action("Status");
            allowedValues.Add("Enabled");
            allowedValues.Add("Disabled");
            allowedValues.Add("Blocked");
            param = new ParameterString("Value", allowedValues);
            iActionStatus.AddOutputParameter(param);
            allowedValues.Clear();

            iActionAttributes = new OpenHome.Net.Core.Action("Attributes");
            param = new ParameterString("Value", allowedValues);
            iActionAttributes.AddOutputParameter(param);

            iPresentationUrl = new PropertyString("PresentationUrl", PresentationUrlPropertyChanged);
            AddProperty(iPresentationUrl);
            iMetadata = new PropertyString("Metadata", MetadataPropertyChanged);
            AddProperty(iMetadata);
            iAudio = new PropertyBool("Audio", AudioPropertyChanged);
            AddProperty(iAudio);
            iStatus = new PropertyString("Status", StatusPropertyChanged);
            AddProperty(iStatus);
            iAttributes = new PropertyString("Attributes", AttributesPropertyChanged);
            AddProperty(iAttributes);

            iPropertyLock = new Mutex();
        }

        /// <summary>
        /// Invoke the action synchronously
        /// </summary>
        /// <remarks>Blocks until the action has been processed
        /// on the device and sets any output arguments</remarks>
        /// <param name="aValue"></param>
        public void SyncPresentationUrl(out String aValue)
        {
            SyncPresentationUrlAvOpenhomeOrgSender1 sync = new SyncPresentationUrlAvOpenhomeOrgSender1(this);
            BeginPresentationUrl(sync.AsyncComplete());
            sync.Wait();
            sync.ReportError();
            aValue = sync.Value();
        }

        /// <summary>
        /// Invoke the action asynchronously
        /// </summary>
        /// <remarks>Returns immediately and will run the client-specified callback when the action
        /// later completes.  Any output arguments can then be retrieved by calling
        /// EndPresentationUrl().</remarks>
        /// <param name="aCallback">Delegate to run when the action completes.
        /// This is guaranteed to be run but may indicate an error</param>
        public void BeginPresentationUrl(CallbackAsyncComplete aCallback)
        {
            Invocation invocation = iService.Invocation(iActionPresentationUrl, aCallback);
            int outIndex = 0;
            invocation.AddOutput(new ArgumentString((ParameterString)iActionPresentationUrl.OutputParameter(outIndex++)));
            iService.InvokeAction(invocation);
        }

        /// <summary>
        /// Retrieve the output arguments from an asynchronously invoked action.
        /// </summary>
        /// <remarks>This may only be called from the callback set in the above Begin function.</remarks>
        /// <param name="aAsyncHandle">Argument passed to the delegate set in the above Begin function</param>
        /// <param name="aValue"></param>
        public void EndPresentationUrl(IntPtr aAsyncHandle, out String aValue)
        {
            uint code;
            string desc;
            if (Invocation.Error(aAsyncHandle, out code, out desc))
            {
                throw new ProxyError(code, desc);
            }
            uint index = 0;
            aValue = Invocation.OutputString(aAsyncHandle, index++);
        }

        /// <summary>
        /// Invoke the action synchronously
        /// </summary>
        /// <remarks>Blocks until the action has been processed
        /// on the device and sets any output arguments</remarks>
        /// <param name="aValue"></param>
        public void SyncMetadata(out String aValue)
        {
            SyncMetadataAvOpenhomeOrgSender1 sync = new SyncMetadataAvOpenhomeOrgSender1(this);
            BeginMetadata(sync.AsyncComplete());
            sync.Wait();
            sync.ReportError();
            aValue = sync.Value();
        }

        /// <summary>
        /// Invoke the action asynchronously
        /// </summary>
        /// <remarks>Returns immediately and will run the client-specified callback when the action
        /// later completes.  Any output arguments can then be retrieved by calling
        /// EndMetadata().</remarks>
        /// <param name="aCallback">Delegate to run when the action completes.
        /// This is guaranteed to be run but may indicate an error</param>
        public void BeginMetadata(CallbackAsyncComplete aCallback)
        {
            Invocation invocation = iService.Invocation(iActionMetadata, aCallback);
            int outIndex = 0;
            invocation.AddOutput(new ArgumentString((ParameterString)iActionMetadata.OutputParameter(outIndex++)));
            iService.InvokeAction(invocation);
        }

        /// <summary>
        /// Retrieve the output arguments from an asynchronously invoked action.
        /// </summary>
        /// <remarks>This may only be called from the callback set in the above Begin function.</remarks>
        /// <param name="aAsyncHandle">Argument passed to the delegate set in the above Begin function</param>
        /// <param name="aValue"></param>
        public void EndMetadata(IntPtr aAsyncHandle, out String aValue)
        {
            uint code;
            string desc;
            if (Invocation.Error(aAsyncHandle, out code, out desc))
            {
                throw new ProxyError(code, desc);
            }
            uint index = 0;
            aValue = Invocation.OutputString(aAsyncHandle, index++);
        }

        /// <summary>
        /// Invoke the action synchronously
        /// </summary>
        /// <remarks>Blocks until the action has been processed
        /// on the device and sets any output arguments</remarks>
        /// <param name="aValue"></param>
        public void SyncAudio(out bool aValue)
        {
            SyncAudioAvOpenhomeOrgSender1 sync = new SyncAudioAvOpenhomeOrgSender1(this);
            BeginAudio(sync.AsyncComplete());
            sync.Wait();
            sync.ReportError();
            aValue = sync.Value();
        }

        /// <summary>
        /// Invoke the action asynchronously
        /// </summary>
        /// <remarks>Returns immediately and will run the client-specified callback when the action
        /// later completes.  Any output arguments can then be retrieved by calling
        /// EndAudio().</remarks>
        /// <param name="aCallback">Delegate to run when the action completes.
        /// This is guaranteed to be run but may indicate an error</param>
        public void BeginAudio(CallbackAsyncComplete aCallback)
        {
            Invocation invocation = iService.Invocation(iActionAudio, aCallback);
            int outIndex = 0;
            invocation.AddOutput(new ArgumentBool((ParameterBool)iActionAudio.OutputParameter(outIndex++)));
            iService.InvokeAction(invocation);
        }

        /// <summary>
        /// Retrieve the output arguments from an asynchronously invoked action.
        /// </summary>
        /// <remarks>This may only be called from the callback set in the above Begin function.</remarks>
        /// <param name="aAsyncHandle">Argument passed to the delegate set in the above Begin function</param>
        /// <param name="aValue"></param>
        public void EndAudio(IntPtr aAsyncHandle, out bool aValue)
        {
            uint code;
            string desc;
            if (Invocation.Error(aAsyncHandle, out code, out desc))
            {
                throw new ProxyError(code, desc);
            }
            uint index = 0;
            aValue = Invocation.OutputBool(aAsyncHandle, index++);
        }

        /// <summary>
        /// Invoke the action synchronously
        /// </summary>
        /// <remarks>Blocks until the action has been processed
        /// on the device and sets any output arguments</remarks>
        /// <param name="aValue"></param>
        public void SyncStatus(out String aValue)
        {
            SyncStatusAvOpenhomeOrgSender1 sync = new SyncStatusAvOpenhomeOrgSender1(this);
            BeginStatus(sync.AsyncComplete());
            sync.Wait();
            sync.ReportError();
            aValue = sync.Value();
        }

        /// <summary>
        /// Invoke the action asynchronously
        /// </summary>
        /// <remarks>Returns immediately and will run the client-specified callback when the action
        /// later completes.  Any output arguments can then be retrieved by calling
        /// EndStatus().</remarks>
        /// <param name="aCallback">Delegate to run when the action completes.
        /// This is guaranteed to be run but may indicate an error</param>
        public void BeginStatus(CallbackAsyncComplete aCallback)
        {
            Invocation invocation = iService.Invocation(iActionStatus, aCallback);
            int outIndex = 0;
            invocation.AddOutput(new ArgumentString((ParameterString)iActionStatus.OutputParameter(outIndex++)));
            iService.InvokeAction(invocation);
        }

        /// <summary>
        /// Retrieve the output arguments from an asynchronously invoked action.
        /// </summary>
        /// <remarks>This may only be called from the callback set in the above Begin function.</remarks>
        /// <param name="aAsyncHandle">Argument passed to the delegate set in the above Begin function</param>
        /// <param name="aValue"></param>
        public void EndStatus(IntPtr aAsyncHandle, out String aValue)
        {
            uint code;
            string desc;
            if (Invocation.Error(aAsyncHandle, out code, out desc))
            {
                throw new ProxyError(code, desc);
            }
            uint index = 0;
            aValue = Invocation.OutputString(aAsyncHandle, index++);
        }

        /// <summary>
        /// Invoke the action synchronously
        /// </summary>
        /// <remarks>Blocks until the action has been processed
        /// on the device and sets any output arguments</remarks>
        /// <param name="aValue"></param>
        public void SyncAttributes(out String aValue)
        {
            SyncAttributesAvOpenhomeOrgSender1 sync = new SyncAttributesAvOpenhomeOrgSender1(this);
            BeginAttributes(sync.AsyncComplete());
            sync.Wait();
            sync.ReportError();
            aValue = sync.Value();
        }

        /// <summary>
        /// Invoke the action asynchronously
        /// </summary>
        /// <remarks>Returns immediately and will run the client-specified callback when the action
        /// later completes.  Any output arguments can then be retrieved by calling
        /// EndAttributes().</remarks>
        /// <param name="aCallback">Delegate to run when the action completes.
        /// This is guaranteed to be run but may indicate an error</param>
        public void BeginAttributes(CallbackAsyncComplete aCallback)
        {
            Invocation invocation = iService.Invocation(iActionAttributes, aCallback);
            int outIndex = 0;
            invocation.AddOutput(new ArgumentString((ParameterString)iActionAttributes.OutputParameter(outIndex++)));
            iService.InvokeAction(invocation);
        }

        /// <summary>
        /// Retrieve the output arguments from an asynchronously invoked action.
        /// </summary>
        /// <remarks>This may only be called from the callback set in the above Begin function.</remarks>
        /// <param name="aAsyncHandle">Argument passed to the delegate set in the above Begin function</param>
        /// <param name="aValue"></param>
        public void EndAttributes(IntPtr aAsyncHandle, out String aValue)
        {
            uint code;
            string desc;
            if (Invocation.Error(aAsyncHandle, out code, out desc))
            {
                throw new ProxyError(code, desc);
            }
            uint index = 0;
            aValue = Invocation.OutputString(aAsyncHandle, index++);
        }

        /// <summary>
        /// Set a delegate to be run when the PresentationUrl state variable changes.
        /// </summary>
        /// <remarks>Callbacks may be run in different threads but callbacks for a
        /// CpProxyAvOpenhomeOrgSender1 instance will not overlap.</remarks>
        /// <param name="aPresentationUrlChanged">The delegate to run when the state variable changes</param>
        public void SetPropertyPresentationUrlChanged(System.Action aPresentationUrlChanged)
        {
            lock (iPropertyLock)
            {
                iPresentationUrlChanged = aPresentationUrlChanged;
            }
        }

        private void PresentationUrlPropertyChanged()
        {
            lock (iPropertyLock)
            {
                ReportEvent(iPresentationUrlChanged);
            }
        }

        /// <summary>
        /// Set a delegate to be run when the Metadata state variable changes.
        /// </summary>
        /// <remarks>Callbacks may be run in different threads but callbacks for a
        /// CpProxyAvOpenhomeOrgSender1 instance will not overlap.</remarks>
        /// <param name="aMetadataChanged">The delegate to run when the state variable changes</param>
        public void SetPropertyMetadataChanged(System.Action aMetadataChanged)
        {
            lock (iPropertyLock)
            {
                iMetadataChanged = aMetadataChanged;
            }
        }

        private void MetadataPropertyChanged()
        {
            lock (iPropertyLock)
            {
                ReportEvent(iMetadataChanged);
            }
        }

        /// <summary>
        /// Set a delegate to be run when the Audio state variable changes.
        /// </summary>
        /// <remarks>Callbacks may be run in different threads but callbacks for a
        /// CpProxyAvOpenhomeOrgSender1 instance will not overlap.</remarks>
        /// <param name="aAudioChanged">The delegate to run when the state variable changes</param>
        public void SetPropertyAudioChanged(System.Action aAudioChanged)
        {
            lock (iPropertyLock)
            {
                iAudioChanged = aAudioChanged;
            }
        }

        private void AudioPropertyChanged()
        {
            lock (iPropertyLock)
            {
                ReportEvent(iAudioChanged);
            }
        }

        /// <summary>
        /// Set a delegate to be run when the Status state variable changes.
        /// </summary>
        /// <remarks>Callbacks may be run in different threads but callbacks for a
        /// CpProxyAvOpenhomeOrgSender1 instance will not overlap.</remarks>
        /// <param name="aStatusChanged">The delegate to run when the state variable changes</param>
        public void SetPropertyStatusChanged(System.Action aStatusChanged)
        {
            lock (iPropertyLock)
            {
                iStatusChanged = aStatusChanged;
            }
        }

        private void StatusPropertyChanged()
        {
            lock (iPropertyLock)
            {
                ReportEvent(iStatusChanged);
            }
        }

        /// <summary>
        /// Set a delegate to be run when the Attributes state variable changes.
        /// </summary>
        /// <remarks>Callbacks may be run in different threads but callbacks for a
        /// CpProxyAvOpenhomeOrgSender1 instance will not overlap.</remarks>
        /// <param name="aAttributesChanged">The delegate to run when the state variable changes</param>
        public void SetPropertyAttributesChanged(System.Action aAttributesChanged)
        {
            lock (iPropertyLock)
            {
                iAttributesChanged = aAttributesChanged;
            }
        }

        private void AttributesPropertyChanged()
        {
            lock (iPropertyLock)
            {
                ReportEvent(iAttributesChanged);
            }
        }

        /// <summary>
        /// Query the value of the PresentationUrl property.
        /// </summary>
        /// <remarks>This function is threadsafe and can only be called if Subscribe() has been
        /// called and a first eventing callback received more recently than any call
        /// to Unsubscribe().</remarks>
        /// <returns>Value of the PresentationUrl property</returns>
        public String PropertyPresentationUrl()
        {
            PropertyReadLock();
            String val;
            try
            {
                val = iPresentationUrl.Value();
            }
            finally
            {
                PropertyReadUnlock();
            }
            return val;
        }

        /// <summary>
        /// Query the value of the Metadata property.
        /// </summary>
        /// <remarks>This function is threadsafe and can only be called if Subscribe() has been
        /// called and a first eventing callback received more recently than any call
        /// to Unsubscribe().</remarks>
        /// <returns>Value of the Metadata property</returns>
        public String PropertyMetadata()
        {
            PropertyReadLock();
            String val;
            try
            {
                val = iMetadata.Value();
            }
            finally
            {
                PropertyReadUnlock();
            }
            return val;
        }

        /// <summary>
        /// Query the value of the Audio property.
        /// </summary>
        /// <remarks>This function is threadsafe and can only be called if Subscribe() has been
        /// called and a first eventing callback received more recently than any call
        /// to Unsubscribe().</remarks>
        /// <returns>Value of the Audio property</returns>
        public bool PropertyAudio()
        {
            PropertyReadLock();
            bool val;
            try
            {
                val = iAudio.Value();
            }
            finally
            {
                PropertyReadUnlock();
            }
            return val;
        }

        /// <summary>
        /// Query the value of the Status property.
        /// </summary>
        /// <remarks>This function is threadsafe and can only be called if Subscribe() has been
        /// called and a first eventing callback received more recently than any call
        /// to Unsubscribe().</remarks>
        /// <returns>Value of the Status property</returns>
        public String PropertyStatus()
        {
            PropertyReadLock();
            String val;
            try
            {
                val = iStatus.Value();
            }
            finally
            {
                PropertyReadUnlock();
            }
            return val;
        }

        /// <summary>
        /// Query the value of the Attributes property.
        /// </summary>
        /// <remarks>This function is threadsafe and can only be called if Subscribe() has been
        /// called and a first eventing callback received more recently than any call
        /// to Unsubscribe().</remarks>
        /// <returns>Value of the Attributes property</returns>
        public String PropertyAttributes()
        {
            PropertyReadLock();
            String val;
            try
            {
                val = iAttributes.Value();
            }
            finally
            {
                PropertyReadUnlock();
            }
            return val;
        }

        /// <summary>
        /// Must be called for each class instance.  Must be called before Core.Library.Close().
        /// </summary>
        public void Dispose()
        {
            lock (this)
            {
                if (iHandle == IntPtr.Zero)
                    return;
                DisposeProxy();
                iHandle = IntPtr.Zero;
            }
            iActionPresentationUrl.Dispose();
            iActionMetadata.Dispose();
            iActionAudio.Dispose();
            iActionStatus.Dispose();
            iActionAttributes.Dispose();
            iPresentationUrl.Dispose();
            iMetadata.Dispose();
            iAudio.Dispose();
            iStatus.Dispose();
            iAttributes.Dispose();
        }
    }
}


text:
import StringIO
import unittest

from webkitpy.common.host_mock import MockHost

from webkitpy.layout_tests.models import test_expectations
from webkitpy.layout_tests.models import test_failures
from webkitpy.layout_tests.models import test_run_results
from webkitpy.layout_tests.models import test_run_results
from webkitpy.layout_tests.models import test_run_results_unittest
from webkitpy.layout_tests.views import buildbot_results

class BuildBotPrinterTests(unittest.TestCase):
    def assertEmpty(self, stream):
        self.assertFalse(stream.getvalue())

    def assertNotEmpty(self, stream):
        self.assertTrue(stream.getvalue())

    def get_printer(self):
        stream = StringIO.StringIO()
        printer = buildbot_results.BuildBotPrinter(stream, debug_logging=True)
        return printer, stream

    def test_print_unexpected_results(self):
        port = MockHost().port_factory.get('test')
        printer, out = self.get_printer()

        # test everything running as expected
        DASHED_LINE = "-" * 78 + "\n"
        summary = test_run_results_unittest.summarized_results(port, expected=True, passing=False, flaky=False)
        printer.print_unexpected_results(summary)
        self.assertEqual(out.getvalue(), DASHED_LINE)

        # test failures
        printer, out = self.get_printer()
        summary = test_run_results_unittest.summarized_results(port, expected=False, passing=False, flaky=False)
        printer.print_unexpected_results(summary)
        self.assertNotEmpty(out)

        # test unexpected flaky
        printer, out = self.get_printer()
        summary = test_run_results_unittest.summarized_results(port, expected=False, passing=False, flaky=True)
        printer.print_unexpected_results(summary)
        self.assertNotEmpty(out)
        self.assertNotIn('failures/expected/crash.html', out.getvalue())

        printer, out = self.get_printer()
        summary = test_run_results_unittest.summarized_results(port, expected=False, passing=False, flaky=False)
        printer.print_unexpected_results(summary)
        self.assertNotEmpty(out)

        printer, out = self.get_printer()
        summary = test_run_results_unittest.summarized_results(port, expected=False, passing=False, flaky=False)
        printer.print_unexpected_results(summary)
        self.assertNotEmpty(out)

        printer, out = self.get_printer()
        summary = test_run_results_unittest.summarized_results(port, expected=False, passing=True, flaky=False)
        printer.print_unexpected_results(summary)
        output = out.getvalue()
        self.assertTrue(output)
        self.assertTrue(output.find('Skip') == -1)

    def test_print_unexpected_results_fail_on_retry_also(self):
        port = MockHost().port_factory.get('test')
        printer, out = self.get_printer()
        summary = test_run_results_unittest.summarized_results(
            port, expected=False, passing=False, flaky=False, fail_on_retry=True)
        printer.print_unexpected_results(summary)
        output = out.getvalue()
        self.assertIn('Regressions: Unexpected crashes (1)\n  failures/expected/audio.html [ Crash Leak Leak Leak ]', output)
        self.assertIn('Regressions: Unexpected text-only failures (1)\n  failures/expected/timeout.html [ Failure Failure Crash Leak ]', output)

    def test_print_results(self):
        port = MockHost().port_factory.get('test')
        printer, out = self.get_printer()
        initial_results = test_run_results_unittest.run_results(port)
        full_summary = test_run_results_unittest.summarized_results(port, expected=False, passing=True, flaky=False)
        failing_summary = test_run_results_unittest.summarized_results(port, expected=False, passing=True, flaky=False, only_include_failing=True)
        details = test_run_results.RunDetails(failing_summary['num_regressions'], full_summary, failing_summary, initial_results, None)
        printer.print_results(details)
        self.assertTrue(out.getvalue().find('but passed') != -1)

redpajama_set_name: RedPajamaGithub


text:
export default function deprecationWarning(oldname, newname, link) {
  if (process.env.NODE_ENV !== 'production') {
    if ((typeof console === 'undefined') || (typeof console.warn !== 'function')) {
      return;
    }

    let message = `${oldname} is deprecated. Use ${newname} instead.`;
    console.warn(message);

    if (link) {
      console.warn(`You can read more about it at ${link}`);
    }
  }
}


text:
<menu xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:tools="http://schemas.android.com/tools"
    tools:context="com.partymanager.activity.CreaEventoActivity">

    <item
        android:id="@+id/action_settings"
        android:title="@string/action_settings"
        android:orderInCategory="100"
        android:showAsAction="never" />
</menu>


text:
@interface LTLSearchSuggestWords : NSObject

@property (nonatomic, assign) NSInteger albumTotalCount;
@property (nonatomic, strong) NSArray * albums;
@property (nonatomic, assign) NSInteger keywordTotalCount;
@property (nonatomic, strong) NSArray * keywords;

-(instancetype)initWithDictionary:(NSDictionary *)dictionary;

-(NSDictionary *)toDictionary;
@end


text:
package com.google.inject.internal;

import static com.google.inject.internal.Preconditions.checkNotNull;
import java.io.IOException;
import java.util.Arrays;
import java.util.Iterator;
import java.util.Map;

/**
 * Utility for joining pieces of text separated by a delimiter. It can handle
 * iterators, collections, arrays, and varargs, and can append to any
 * {@link Appendable} or just return a {@link String}. For example,
 * {@code join(":", "a", "b", "c")} returns {@code "a:b:c"}.
 *
 *
All methods of this class throw {@link NullPointerException} when a value
 * of {@code null} is supplied for any parameter. The elements within the
 * collection, iterator, array, or varargs parameter list may be null --
 * these will be represented in the output by the string {@code "null"}.
 *
 * @author Kevin Bourrillion
 */
public final class Join {
  private Join() {}

  /**
   * Returns a string containing the {@code tokens}, converted to strings if
   * necessary, separated by {@code delimiter}. If {@code tokens} is empty, it
   * returns an empty string.
   *
   *
Each token will be converted to a {@link CharSequence} using
   * {@link String#valueOf(Object)}, if it isn't a {@link CharSequence} already.
   * Note that this implies that null tokens will be appended as the
   * four-character string {@code "null"}.
   *
   * @param delimiter a string to append between every element, but not at the
   *     beginning or end
   * @param tokens objects to append
   * @return a string consisting of the joined elements
   */
  public static String join(String delimiter, Iterable<?> tokens) {
    return join(delimiter, tokens.iterator());
  }

  /**
   * Returns a string containing the {@code tokens}, converted to strings if
   * necessary, separated by {@code delimiter}. If {@code tokens} is empty, it
   * returns an empty string.
   *
   *
Each token will be converted to a {@link CharSequence} using
   * {@link String#valueOf(Object)}, if it isn't a {@link CharSequence} already.
   * Note that this implies that null tokens will be appended as the
   * four-character string {@code "null"}.
   *
   * @param delimiter a string to append between every element, but not at the
   *     beginning or end
   * @param tokens objects to append
   * @return a string consisting of the joined elements
   */
  public static String join(String delimiter, Object[] tokens) {
    return join(delimiter, Arrays.asList(tokens));
  }

  /**
   * Returns a string containing the {@code tokens}, converted to strings if
   * necessary, separated by {@code delimiter}.
   *
   *
Each token will be converted to a {@link CharSequence} using
   * {@link String#valueOf(Object)}, if it isn't a {@link CharSequence} already.
   * Note that this implies that null tokens will be appended as the
   * four-character string {@code "null"}.
   *
   * @param delimiter a string to append between every element, but not at the
   *     beginning or end
   * @param firstToken the first object to append
   * @param otherTokens subsequent objects to append
   * @return a string consisting of the joined elements
   */
  public static String join(
      String delimiter, @Nullable Object firstToken, Object... otherTokens) {
    checkNotNull(otherTokens);
    return join(delimiter, Lists.newArrayList(firstToken, otherTokens));
  }

  /**
   * Returns a string containing the {@code tokens}, converted to strings if
   * necessary, separated by {@code delimiter}. If {@code tokens} is empty, it
   * returns an empty string.
   *
   *
Each token will be converted to a {@link CharSequence} using
   * {@link String#valueOf(Object)}, if it isn't a {@link CharSequence} already.
   * Note that this implies that null tokens will be appended as the
   * four-character string {@code "null"}.
   *
   * @param delimiter a string to append between every element, but not at the
   *     beginning or end
   * @param tokens objects to append
   * @return a string consisting of the joined elements
   */
  public static String join(String delimiter, Iterator<?> tokens) {
    StringBuilder sb = new StringBuilder();
    join(sb, delimiter, tokens);
    return sb.toString();
  }

  /**
   * Returns a string containing the contents of {@code map}, with entries
   * separated by {@code entryDelimiter}, and keys and values separated with
   * {@code keyValueSeparator}.
   *
   *
Each key and value will be converted to a {@link CharSequence} using
   * {@link String#valueOf(Object)}, if it isn't a {@link CharSequence} already.
   * Note that this implies that null tokens will be appended as the
   * four-character string {@code "null"}.
   *
   * @param keyValueSeparator a string to append between every key and its
   *     associated value
   * @param entryDelimiter a string to append between every entry, but not at
   *     the beginning or end
   * @param map the map containing the data to join
   * @return a string consisting of the joined entries of the map; empty if the
   *     map is empty
   */
  public static String join(
      String keyValueSeparator, String entryDelimiter, Map<?, ?> map) {
    return join(new StringBuilder(), keyValueSeparator, entryDelimiter, map)
        .toString();
  }

  /**
   * Appends each of the {@code tokens} to {@code appendable}, separated by
   * {@code delimiter}.
   *
   *
Each token will be converted to a {@link CharSequence} using
   * {@link String#valueOf(Object)}, if it isn't a {@link CharSequence} already.
   * Note that this implies that null tokens will be appended as the
   * four-character string {@code "null"}.
   *
   * @param appendable the object to append the results to
   * @param delimiter a string to append between every element, but not at the
   *     beginning or end
   * @param tokens objects to append
   * @return the same {@code Appendable} instance that was passed in
   * @throws JoinException if an {@link IOException} occurs
   */
  public static <T extends Appendable> T join(
      T appendable, String delimiter, Iterable<?> tokens) {
    return join(appendable, delimiter, tokens.iterator());
  }

  /**
   * Appends each of the {@code tokens} to {@code appendable}, separated by
   * {@code delimiter}.
   *
   *
Each token will be converted to a {@link CharSequence} using
   * {@link String#valueOf(Object)}, if it isn't a {@link CharSequence} already.
   * Note that this implies that null tokens will be appended as the
   * four-character string {@code "null"}.
   *
   * @param appendable the object to append the results to
   * @param delimiter a string to append between every element, but not at the
   *     beginning or end
   * @param tokens objects to append
   * @return the same {@code Appendable} instance that was passed in
   * @throws JoinException if an {@link IOException} occurs
   */
  public static <T extends Appendable> T join(
      T appendable, String delimiter, Object[] tokens) {
    return join(appendable, delimiter, Arrays.asList(tokens));
  }

  /**
   * Appends each of the {@code tokens} to {@code appendable}, separated by
   * {@code delimiter}.
   *
   *
Each token will be converted to a {@link CharSequence} using
   * {@link String#valueOf(Object)}, if it isn't a {@link CharSequence} already.
   * Note that this implies that null tokens will be appended as the
   * four-character string {@code "null"}.
   *
   * @param appendable the object to append the results to
   * @param delimiter a string to append between every element, but not at the
   *     beginning or end
   * @param firstToken the first object to append
   * @param otherTokens subsequent objects to append
   * @return the same {@code Appendable} instance that was passed in
   * @throws JoinException if an {@link IOException} occurs
   */
  public static <T extends Appendable> T join(T appendable, String delimiter,
      @Nullable Object firstToken, Object... otherTokens) {
    checkNotNull(otherTokens);
    return join(appendable, delimiter, Lists.newArrayList(firstToken, otherTokens));
  }

  /**
   * Appends each of the {@code tokens} to {@code appendable}, separated by
   * {@code delimiter}.
   *
   *
Each token will be converted to a {@link CharSequence} using
   * {@link String#valueOf(Object)}, if it isn't a {@link CharSequence} already.
   * Note that this implies that null tokens will be appended as the
   * four-character string {@code "null"}.
   *
   * @param appendable the object to append the results to
   * @param delimiter a string to append between every element, but not at the
   *     beginning or end
   * @param tokens objects to append
   * @return the same {@code Appendable} instance that was passed in
   * @throws JoinException if an {@link IOException} occurs
   */
  public static <T extends Appendable> T join(
      T appendable, String delimiter, Iterator<?> tokens) {

    /* This method is the workhorse of the class */

    checkNotNull(appendable);
    checkNotNull(delimiter);
    if (tokens.hasNext()) {
      try {
        appendOneToken(appendable, tokens.next());
        while (tokens.hasNext()) {
          appendable.append(delimiter);
          appendOneToken(appendable, tokens.next());
        }
      } catch (IOException e) {
        throw new JoinException(e);
      }
    }
    return appendable;
  }

  /**
   * Appends the contents of {@code map} to {@code appendable}, with entries
   * separated by {@code entryDelimiter}, and keys and values separated with
   * {@code keyValueSeparator}.
   *
   *
Each key and value will be converted to a {@link CharSequence} using
   * {@link String#valueOf(Object)}, if it isn't a {@link CharSequence} already.
   * Note that this implies that null tokens will be appended as the
   * four-character string {@code "null"}.
   *
   * @param appendable the object to append the results to
   * @param keyValueSeparator a string to append between every key and its
   *     associated value
   * @param entryDelimiter a string to append between every entry, but not at
   *     the beginning or end
   * @param map the map containing the data to join
   * @return the same {@code Appendable} instance that was passed in
   */
  public static <T extends Appendable> T join(T appendable,
      String keyValueSeparator, String entryDelimiter, Map<?, ?> map) {
    checkNotNull(appendable);
    checkNotNull(keyValueSeparator);
    checkNotNull(entryDelimiter);
    Iterator<? extends Map.Entry<?, ?>> entries = map.entrySet().iterator();
    if (entries.hasNext()) {
      try {
        appendOneEntry(appendable, keyValueSeparator, entries.next());
        while (entries.hasNext()) {
          appendable.append(entryDelimiter);
          appendOneEntry(appendable, keyValueSeparator, entries.next());
        }
      } catch (IOException e) {
        throw new JoinException(e);
      }
    }
    return appendable;
  }

  private static void appendOneEntry(
      Appendable appendable, String keyValueSeparator, Map.Entry<?, ?> entry)
      throws IOException {
    appendOneToken(appendable, entry.getKey());
    appendable.append(keyValueSeparator);
    appendOneToken(appendable, entry.getValue());
  }

  private static void appendOneToken(Appendable appendable, Object token)
      throws IOException {
    appendable.append(toCharSequence(token));
  }

  private static CharSequence toCharSequence(Object token) {
    return (token instanceof CharSequence)
        ? (CharSequence) token
        : String.valueOf(token);
  }

  /**
   * Exception thrown in response to an {@link IOException} from the supplied
   * {@link Appendable}. This is used because most callers won't want to
   * worry about catching an IOException.
   */
  public static class JoinException extends RuntimeException {
    private JoinException(IOException cause) {
      super(cause);
    }

    private static final long serialVersionUID = 1L;
  }
}


text:
package io.github.marioluan.datastructures.graph.sort;

import io.github.marioluan.datastructures.graph.Graph;
import io.github.marioluan.datastructures.stack.LinkedList;

/**
 * Implementation of Topological Sort algorithm using {@link io.github.marioluan.datastructures.graph.search.DepthFirstSearch}. <br>
 * Constraint: graph MUST be a DAG (Directed Acyclic Graph).
 * Category: topoligical sort in a DAG.
 */
public class TopologicalSort {
    private Graph graph;
    private LinkedList<Integer> reversePost;
    private boolean[] marked;

    /**
     * Performs a DFS and sort graph's vertices in topological order.
     *
     * @param graph the graph to be sorted
     */
    public TopologicalSort(Graph graph) {
        // TODO: validate if graph is acyclic (it cannot have cycles)
        this.graph = graph;
        reversePost = new LinkedList<>();
        marked = new boolean[graph.V()];

        search();
    }

    /**
     * Performs a DFS from each vertex in the graph.
     */
    private void search() {
        for (int s = 0; s < graph.V(); s++)
            // do not traverse the same vertex twice
            if (!marked[s])
                search(s);
    }

    /**
     * Performs a DFS from vertex s to its adjacent vertices.
     *
     * @param s source vertex
     */
    private void search(int s) {
        // tell the world, we already visited it
        marked[s] = true;

        // go deep into its adjacent vertices
        for (int v : graph.adj(s))
            // repeat the same process for its adjacent vertex
            // only if we have not done it before
            if (!marked[v])
                search(v);

        // when we reached the last adjacent vertex of s
        reversePost.push(s);
    }

    /**
     * Returns the vertices in reverse postorder.
     *
     * @return the vertices in reverse postorder
     */
    public Iterable<Integer> reversePost() {
        return reversePost;
    }
}


text:
package pl.kodujdlapolski.na4lapy.model;

import lombok.Getter;
import lombok.Setter;

@Getter
@Setter
public class UserPreferences {

    private boolean typeDog;
    private boolean typeCat;
    private boolean typeOther;
    private boolean genderWoman;
    private boolean genderMan;
    private int ageMin;
    private int ageMax;
    private boolean sizeSmall;
    private boolean sizeMedium;
    private boolean sizeLarge;
    private boolean activityLow;
    private boolean activityHigh;

    public UserPreferences() {
        typeDog = false;
        typeCat = false;
        typeOther = false;
        genderWoman = false;
        genderMan = false;
        ageMin = 0;
        ageMax = 20;
        sizeSmall = false;
        sizeMedium = false;
        sizeLarge = false;
        activityLow = false;
        activityHigh = false;
    }
}


text:
using System;
using System.Collections;
using System.Diagnostics;
using System.IO;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using Sep.Git.Tfs.Core;
using Sep.Git.Tfs.Core.TfsInterop;

namespace Sep.Git.Tfs.Test.Core
{
    [TestClass]
    public class ExtTests
    {
        #region Action.And()

        [TestMethod]
        public void ShouldCombineActionsInOne_And_Call()
        {
            var action1 = new Action<IDictionary>(d => d["action1"] = true);
            var action2 = new Action<IDictionary>(d => d["action2"] = true);
            var action3 = new Action<IDictionary>(d => d["action3"] = true);
            var combinedAction = action1.And(action2, action3);
            var record = new Hashtable();
            combinedAction(record);
            Assert.AreEqual(true, record["action1"], "action1 should have been executed.");
            Assert.AreEqual(true, record["action2"], "action2 should have been executed.");
            Assert.AreEqual(true, record["action3"], "action3 should have been executed.");
        }

        [TestMethod]
        public void ShouldCombineActionsInAChainOfAndCalls()
        {
            var action1 = new Action<IDictionary>(d => d["action1"] = true);
            var action2 = new Action<IDictionary>(d => d["action2"] = true);
            var action3 = new Action<IDictionary>(d => d["action3"] = true);
            var combinedAction = action1.And(action2).And(action3);
            var record = new Hashtable();
            combinedAction(record);
            Assert.AreEqual(true, record["action1"], "action1 should have been executed.");
            Assert.AreEqual(true, record["action2"], "action2 should have been executed.");
            Assert.AreEqual(true, record["action3"], "action3 should have been executed.");
        }

        #endregion

        #region ProcessStartInfo.SetArguments()

        [TestMethod]
        public void ShouldSetProcessStartInfoArguments()
        {
            var info = new ProcessStartInfo();
            info.SetArguments("a", "b", "c");
            Assert.AreEqual("a b c", info.Arguments);
        }

        [TestMethod]
        public void ShouldQuoteSpacesInProcessStartInfoArguments()
        {
            var info = new ProcessStartInfo();
            info.SetArguments("a", "b c");
            Assert.AreEqual("a \"b c\"", info.Arguments);
        }

        #endregion

        #region CombinePaths()

        [TestMethod]
        public void ShouldReturnSingleArgumentWhenProvided()
        {
            Assert.AreEqual("a", Ext.CombinePaths("a"));
        }

        [TestMethod]
        public void ShouldCombineSeveralPaths()
        {
            Assert.AreEqual("a\\b\\c", Ext.CombinePaths("a", "b", "c"));
        }

        [TestMethod]
        public void ShouldIgnorePathPartsBeforeAbsolute()
        {
            Assert.AreEqual("c:\\x\\y", Ext.CombinePaths("a", "b", "c:\\x", "y"));
        }

        #endregion

        #region FormatForGit()

        [TestMethod]
        public void ShouldFormatDateForGit()
        {
            var date = new DateTime(2000, 1, 2, 12, 34, 56);
            Assert.AreEqual("2000-01-02T12:34:56Z", date.ToLocalTime().FormatForGit());
        }

        #endregion

        #region Stream.CopyTo()

        [TestMethod]
        public void ShouldCopyOneStreamToAnother()
        {
            var input = new MemoryStream(new byte[] { 0x00, 0x01, 0x02, 0x03, 0x04, 0xfe, 0xff });
            var output = new MemoryStream();
            input.CopyTo(output);
            CollectionAssert.AreEqual(new byte[] { 0x00, 0x01, 0x02, 0x03, 0x04, 0xfe, 0xff }, output.ToArray());
        }
        #endregion

        #region ChangeType.IncludesOneOf()

        [TestMethod]
        public void ShouldNotDetectUnincludedChangeTypes()
        {
            Assert.IsFalse(TfsChangeType.Add.IncludesOneOf(TfsChangeType.Branch, TfsChangeType.Delete, TfsChangeType.Edit, TfsChangeType.Encoding, TfsChangeType.Lock, TfsChangeType.Merge, TfsChangeType.None, TfsChangeType.Rename, TfsChangeType.Undelete));
        }

        [TestMethod]
        public void ShouldNotDetectUnincludedChangeType()
        {
            var everythingExceptAdd = TfsChangeType.Branch | TfsChangeType.Delete | TfsChangeType.Edit |
                                      TfsChangeType.Encoding | TfsChangeType.Lock | TfsChangeType.Merge |
                                      TfsChangeType.None | TfsChangeType.Rename | TfsChangeType.Undelete;
            Assert.IsFalse(everythingExceptAdd.IncludesOneOf(TfsChangeType.Add));
        }

        [TestMethod]
        public void ShouldDetectIncludedChangeTypeForExactMatch()
        {
            Assert.IsTrue(TfsChangeType.Add.IncludesOneOf(TfsChangeType.Add));
        }

        [TestMethod]
        public void ShouldDetectIncludedChangeTypeForOneOfSeveral()
        {
            Assert.IsTrue(TfsChangeType.Add.IncludesOneOf(TfsChangeType.Branch, TfsChangeType.Add));
        }

        [TestMethod]
        public void ShouldDetectIncludedChangeTypeForMultivalue()
        {
            Assert.IsTrue((TfsChangeType.Add | TfsChangeType.Branch).IncludesOneOf(TfsChangeType.Branch));
        }

        [TestMethod]
        public void ShouldNotDetectMultivaluesThatIntersectWithoutBeingSubset()
        {
            Assert.IsFalse((TfsChangeType.Add | TfsChangeType.Branch).IncludesOneOf(TfsChangeType.Branch | TfsChangeType.Edit));
        }

        [TestMethod]
        public void ShouldDetectMultivaluesThatIntersectAndAreASubset()
        {
            Assert.IsTrue((TfsChangeType.Add | TfsChangeType.Branch | TfsChangeType.Edit).IncludesOneOf(TfsChangeType.Branch | TfsChangeType.Edit));
        }

        #endregion
    }
}


text:
title: Behind the Veil, The Complete Guide to Conscious Sleep
---

![](https://images-na.ssl-images-amazon.com/images/S/compressed.photo.goodreads.com/books/1528919452i/40524272.jpg)

# Behind the Veil: The Complete Guide to Conscious Sleep

> If you're exercising Body, Mind, and Soul, you're a complete human being; and as
> long as you're capable of smoothly transitioning from your Gross to Subtle to
> Causal Bodies you're a Veiler!

> (Delta). However, it's possible, and even easy after a while, to remain alert
> even in this state of deep dreamless sleep. The Vedantists refer to this state
> as Turiya.

> one of the most potent techniques for inducing Lucidity is to imagine yourself
> at a point in space opposite that of your sleeping body ("Phasing").

> our overall consciousness is like the sky in which the changing weather occurs.
> The problem is that we tend to identify with the changing weather and forget
> that we're the unchanged sky.

> it ceases to be something that you do and becomes something that you are.

> One of the functions of dreaming is to inform the conscious mind of important
> issues happening below the threshold of awareness.

> "predicting the future" is just an expanded view of the present moment.

> take note of what you feel more than what you think about what you feel.

> What you're driven to do versus how you believe you should conduct yourself is a
> source of tremendous waste of psychic energy. There's a lot of truth in that old
> saying of Jesus: "If thine eye be single then thy whole body shall be filled
> with light."

> fear is just a mask worn by wonder to test your readiness to enjoy her.

> you must pass through the Dream Plane to get to the Astral Plane. You're making
> these transitions consciously and are therefore exposed to the phenomena of
> these liminal states.

> Unless you rewire yourself to make it happen, you won't succeed.

> Like all trauma, one may sincerely wish to gain or regain access to the
> subtle-realms, but the reaction of fear can be so primal and visceral that any
> behind the Veil encounter is reflexively rejected by the very core of one's
> self. Neurons that fire together wire together.

> The ability to remain conscious throughout the sleep cycle holds the key to all
> the treasures hidden behind the Veil!

> Huperzine before bedtime.

> Mugwort or Calea Zacatechichi just before bed can be an incredibly powerful OOBE

> Another great exercise for increasing memory requires nothing more than a rubber
> band and a commitment to practice. Place a rubber band on the wrist of your
> non-dominant hand. Next, choose a thought, word, or behavior that you tend to
> employ often, and make a mental note that you'll avoid saying, thinking, or
> doing the chosen thing. Now, every time you slip, sharply snap the rubber band
> on your wrist. Not too hard! We're not trying to punish ourselves. Rather, the
> goal here is to use this biofeedback device to encourage vigilance of mind. I've
> used this method for years and I promise that it works wonders!

> mentally retrace your steps in reverse, starting with putting away the groceries
> and ending with the trip to the store. It's important to imagine as vividly as
> possible and to include all five senses in the visualization.

> while still lying in bed, gently turn your thoughts toward the prior night's
> dreams. Please note the word "gently"! Dreams are composed of Etheric energy.
> Like all Etheric energy, if you become aggressive or tense, it will stagnate and
> prevent Dream Recall. Lastly, get out of bed gracefully with your mind still on
> last night's dreams, and sit down comfortably with your journal.

> No detail is too small or insignificant that it shouldn't be included in your
> journal entries.
> same holds true for Astral Projection.

> Similarly, if you consistently tell yourself before going to sleep that you must
> remain Lucid in your dreams, then you'll eventually succeed in doing so. The
> same holds true for Astral Projection. It's your consistent and firm intention
> to step behind the Veil that unlocks the mysteries behind the it!

> Zazen is usually translated as "sitting for Zen." What exactly is Zen? Well, to
> put it plainly, Zen is the state where there's no separation between what you're
> doing, what you want to be doing, and who and where you are.

> The state of Trance is like a flame of attention burning in a windless room.

> intention isn't the same thing as effort. An intention carries its own energy,
> and that energy has a movement all its own. Effort, on the other hand, is a form
> of tension. Obviously, there's a place where effort is needed, but when it comes
> to attaining Trance, manipulating Qi, or going Astral, effort only gets in the
> way.

> notice that you're not your thoughts. Rather, you're the space in which thoughts
> are arising.

> the state of Trance is just deep dreamless sleep, but with one major exception:
> You're aware! The Indian Sage, Ramana Maharshi, used to say of the search for
> the true Self that if it's not present in deep dreamless sleep then it's not
> real.

> first learn to have a complete in the body experience.

> Your Astral Body is intimately connected with your emotions.

> Channeling Intensity could rightly be called the art of just feeling.

> start by being vigilant and alert to yourself, particularly to your feeling
> self. I don't just mean your emotions, but all your feeling.

> Next, don't criticize, censor, or otherwise label what you're feeling. Just
> allow it to be fully present without any preconceived idea of what you should or
> shouldn't be feeling and how it should be dealt with. Also, notice your
> knee-jerk reactions to your feelings. Notice the almost instantaneous desire to
> repress, blame, express, hide, or excuse what you're feeling. Simply let all of
> those reactions flower and self-liberate in your inner space. Metaphorically
> speaking, this is how you take the base lead of raw emotion and turn it into the
> gold of refined awareness.

> more space between you and this energy.


text:
require "active_support/core_ext/module/delegation"

module PgSearch
  module Features
    class Feature
      delegate :connection, :quoted_table_name, :to => :'@model'

      def initialize(query, options, all_columns, model, normalizer)
        @query = query
        @options = options || {}
        @all_columns = all_columns
        @model = model
        @normalizer = normalizer
      end

      private

      attr_reader :query, :options, :all_columns, :model, :normalizer

      def document
        columns.map { |column| column.to_sql }.join(" || ' ' || ")
      end

      def columns
        if options[:only]
          all_columns.select do |column|
            Array.wrap(options[:only]).map(&:to_s).include? column.name
          end
        else
          all_columns
        end
      end

      def normalize(expression)
        normalizer.add_normalization(expression)
      end
    end
  end
end


text:
define([
	"../core",
	"./var/rsingleTag",
	"../traversing/findFilter"
], function( chadQuery, rsingleTag ) {

// A central reference to the root chadQuery(document)
var rootchadQuery,

	// A simple way to check for HTML strings
	// Prioritize #id over <tag> to avoid XSS via location.hash (#9521)
	// Strict HTML recognition (#11290: must start with <)
	rquickExpr = /^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]*))$/,

	init = chadQuery.fn.init = function( selector, context ) {
		var match, elem;

		// HANDLE: $(""), $(null), $(undefined), $(false)
		if ( !selector ) {
			return this;
		}

		// Handle HTML strings
		if ( typeof selector === "string" ) {
			if ( selector[0] === "<" && selector[ selector.length - 1 ] === ">" && selector.length >= 3 ) {
				// Assume that strings that start and end with <> are HTML and skip the regex check
				match = [ null, selector, null ];

			} else {
				match = rquickExpr.exec( selector );
			}

			// Match html or make sure no context is specified for #id
			if ( match && (match[1] || !context) ) {

				// HANDLE: $(html) -> $(array)
				if ( match[1] ) {
					context = context instanceof chadQuery ? context[0] : context;

					// scripts is true for back-compat
					// Intentionally let the error be thrown if parseHTML is not present
					chadQuery.merge( this, chadQuery.parseHTML(
						match[1],
						context && context.nodeType ? context.ownerDocument || context : document,
						true
					) );

					// HANDLE: $(html, props)
					if ( rsingleTag.test( match[1] ) && chadQuery.isPlainObject( context ) ) {
						for ( match in context ) {
							// Properties of context are called as methods if possible
							if ( chadQuery.isFunction( this[ match ] ) ) {
								this[ match ]( context[ match ] );

							// ...and otherwise set as attributes
							} else {
								this.attr( match, context[ match ] );
							}
						}
					}

					return this;

				// HANDLE: $(#id)
				} else {
					elem = document.getElementById( match[2] );

					// Check parentNode to catch when Blackberry 4.6 returns
					// nodes that are no longer in the document #6963
					if ( elem && elem.parentNode ) {
						// Inject the element directly into the chadQuery object
						this.length = 1;
						this[0] = elem;
					}

					this.context = document;
					this.selector = selector;
					return this;
				}

			// HANDLE: $(expr, $(...))
			} else if ( !context || context.chadquery ) {
				return ( context || rootchadQuery ).find( selector );

			// HANDLE: $(expr, context)
			// (which is just equivalent to: $(context).find(expr)
			} else {
				return this.constructor( context ).find( selector );
			}

		// HANDLE: $(DOMElement)
		} else if ( selector.nodeType ) {
			this.context = this[0] = selector;
			this.length = 1;
			return this;

		// HANDLE: $(function)
		// Shortcut for document ready
		} else if ( chadQuery.isFunction( selector ) ) {
			return typeof rootchadQuery.ready !== "undefined" ?
				rootchadQuery.ready( selector ) :
				// Execute immediately if ready is not present
				selector( chadQuery );
		}

		if ( selector.selector !== undefined ) {
			this.selector = selector.selector;
			this.context = selector.context;
		}

		return chadQuery.makeArray( selector, this );
	};

// Give the init function the chadQuery prototype for later instantiation
init.prototype = chadQuery.fn;

// Initialize central reference
rootchadQuery = chadQuery( document );

return init;

});


text:
package org.apache.kerby.xdr;

import org.apache.kerby.xdr.type.AbstractXdrType;
import org.apache.kerby.xdr.type.XdrBoolean;
import org.apache.kerby.xdr.type.XdrEnumerated;
import org.apache.kerby.xdr.type.XdrInteger;
import org.apache.kerby.xdr.type.XdrString;
import org.apache.kerby.xdr.type.XdrType;
import org.apache.kerby.xdr.type.XdrUnion;
import org.apache.kerby.xdr.type.XdrUnsignedInteger;

enum FileKind implements EnumType {
    TEXT,
    DATA,
    EXEC;

    public int getValue() {
        return ordinal();
    }

    public String getName() {
        return name();
    }
}

class FileKindEnumeratedInstance extends XdrEnumerated<FileKind> {

    FileKindEnumeratedInstance() {
        super(null);
    }

    FileKindEnumeratedInstance(FileKind value) {
        super(value);
    }
    @Override
    protected EnumType[] getAllEnumValues() {
        return FileKind.values();
    }

}

class UnionFileTypeSwitch {
    FileKind fileKind;
    Object arm;
    UnionFileTypeSwitch(FileKind fileKind) {
        this.fileKind = fileKind;
        switch (fileKind) {
            case TEXT:
                arm = null;
                break;
            case DATA:
                arm = "creator";
                break;
            case EXEC:
                arm = "lisp";
                break;
        }
    }

    XdrDataType getFileKind() {
        return XdrDataType.ENUM;
    }

    FileKind getFileValue() {
        return fileKind;
    }

    XdrDataType getArmKind() {
        XdrDataType xdrDataType = XdrDataType.UNKNOWN;
        switch (fileKind) {
            case TEXT:
                xdrDataType = XdrDataType.UNKNOWN;
                break;
            case DATA:
                xdrDataType = XdrDataType.STRING;
                break;
            case EXEC:
                xdrDataType = XdrDataType.STRING;
                break;
        }
        return xdrDataType;
    }

    Object getArmValue() {
        return arm;
    }
}

public class XdrUnionInstance extends XdrUnion {

    public XdrUnionInstance() {
        super(XdrDataType.UNION);
    }

    public XdrUnionInstance(XdrFieldInfo[] fieldInfos) {
        super(XdrDataType.UNION, fieldInfos);
    }

    @Override
    protected void getUnionInstance(XdrType[] fields, XdrFieldInfo[] fieldInfos) {
        switch (fieldInfos[0].getDataType()) {
            case INTEGER:
                fields[0] = new XdrInteger((Integer) fieldInfos[0].getValue());
                break;
            case UNSIGNED_INTEGER:
                fields[0] = new XdrUnsignedInteger((Long) fieldInfos[0].getValue());
                break;
            case BOOLEAN:
                fields[0] = new XdrBoolean((Boolean) fieldInfos[0].getValue());
                break;
            case ENUM:
                fields[0] = new FileKindEnumeratedInstance((FileKind) fieldInfos[0].getValue());
                break;
            default:
                throw new RuntimeException("Wrong discriminant type for union: " + fieldInfos[0].getDataType());
        }

        switch (fieldInfos[1].getDataType()) {
            case INTEGER:
                fields[1] = new XdrInteger((Integer) fieldInfos[1].getValue());
                break;
            case UNSIGNED_INTEGER:
                fields[1] = new XdrUnsignedInteger((Long) fieldInfos[1].getValue());
                break;
            case BOOLEAN:
                fields[1] = new XdrBoolean((Boolean) fieldInfos[1].getValue());
                break;
            case STRING:
                fields[1] = new XdrString((String) fieldInfos[1].getValue());
                break;
            default:
                fields[1] = null;
        }
    }

    @Override
    protected XdrUnion fieldsToValues(AbstractXdrType[] fields) {
        XdrFieldInfo[] fieldInfos = {new XdrFieldInfo(0, XdrDataType.ENUM, fields[0].getValue()),
                new XdrFieldInfo(1, XdrDataType.STRING, fields[1].getValue())};
        return new XdrUnionInstance(fieldInfos);
    }

    @Override
    protected AbstractXdrType[] getAllFields() {
        AbstractXdrType[] fields = new AbstractXdrType[2];
        fields[0] = new FileKindEnumeratedInstance();
        fields[1] = new XdrString();
        return fields;
    }
}


text:
namespace Microsoft.Msagl.Core.DataStructures
{

  /// <summary>
  /// Size structure
  /// </summary>
  public struct Size
  {
    double width;
    /// <summary>
    /// width
    /// </summary>
    public double Width
    {
      get { return width; }
      set { width = value; }
    }
    double height;
    /// <summary>
    /// Height
    /// </summary>
    public double Height
    {
      get { return height; }
      set { height = value; }
    }

    /// <summary>
    /// constructor
    /// </summary>
    /// <param name="width"></param>
    /// <param name="height"></param>
    public Size(double width, double height)
    {
      this.width = width;

      this.height = height;

    }

    /// <summary>
    ///
    /// </summary>
    /// <param name="s"></param>
    /// <param name="d"></param>
    /// <returns></returns>
    public static Size operator /(Size s, double d) { return new Size(s.Width / d, s.Height / d); }

    /// <summary>
    ///
    /// </summary>
    /// <param name="s"></param>
    /// <param name="d"></param>
    /// <returns></returns>
    public static Size operator *(Size s, double d) { return new Size(s.Width * d, s.Height * d); }

      /// <summary>
      /// padding the size ( from both sides!)
      /// </summary>
      /// <param name="padding"></param>
      public void Pad(double padding) {
          width += 2*padding;
          height += 2*padding;
      }
  }

}


text:
import {NgModule} from '@angular/core'
import {CommonModule} from '@angular/common'
import {SlideComponent} from './slide/slide.component'
import {PresentationComponent} from './presentation.component'
import {SlideColumnComponent} from './slide-column/slide-column.component'
import {TitleSlideComponent} from './title-slide/title-slide.component'
import {UiModule} from '../ui/ui.module'
import {RouterModule} from '@angular/router'
import {QuestionsSlideComponent} from './questions-slide/questions-slide.component'
import {ThankYouSlideComponent} from './thank-you-slide/thank-you-slide.component'
import {SlideControlsComponent} from './slide-controls/slide-controls.component'
import {TableOfContentsComponent} from './table-of-contents/table-of-contents.component'
import {
  PresentationMissingInputBaseErrorComponent,
  PresentationNoSectionsFoundWarningComponent,
  PresentationNotEnoughSectionsWarningComponent,
  PresentationWithoutAuthorErrorComponent,
  PresentationWithoutEmailErrorComponent,
  StraySlideErrorComponent,
  UntitledPresentationErrorComponent,
  UntitledSlideWarningComponent,
} from './errors'
import {CodeModule} from '../code/code.module'
import {LoggerModule} from '../logger/logger.module'

const errorComponents = [
  PresentationWithoutAuthorErrorComponent,
  PresentationWithoutEmailErrorComponent,
  UntitledPresentationErrorComponent,
]

const warningComponents = [
  PresentationNoSectionsFoundWarningComponent,
  PresentationNotEnoughSectionsWarningComponent,
  UntitledSlideWarningComponent,
  StraySlideErrorComponent,
]

@NgModule({
  imports: [
    CommonModule,
    RouterModule,
    UiModule,
    CodeModule,
    LoggerModule,
  ],
  declarations: [
    PresentationComponent,
    SlideComponent,
    SlideColumnComponent,
    TitleSlideComponent,
    QuestionsSlideComponent,
    ThankYouSlideComponent,
    SlideControlsComponent,
    TableOfContentsComponent,
    PresentationMissingInputBaseErrorComponent,
    ...errorComponents,
    ...warningComponents,
  ],
  exports: [
    PresentationComponent,
    SlideComponent,
    SlideColumnComponent,
    TitleSlideComponent,
  ],
  entryComponents: [
    TitleSlideComponent,
    TableOfContentsComponent,
    ...errorComponents,
    ...warningComponents,
  ],
})
export class PresentationModule {
}


text:
NS_OPODB_BEGIN

OpOQuery::OpOQuery(OpOCollection *collection)
{
    m_collection = collection;
}

OpOCollection*
OpOQuery::getCollection()
{
    return m_collection;
}

OpOQuery*
OpOQuery::queryAndEqual(const std::string *indexName,
                        const std::string *value)
{
    return nullptr;
}

OpOQuery*
OpOQuery::queryAndNotEqual(const std::string *indexName,
                           const std::string *value)
{
    return nullptr;
}

OpOQuery*
OpOQuery::queryAndLess(const std::string *indexName,
                       const std::string *value)
{
    return nullptr;
}

OpOQuery*
OpOQuery::queryAndLessEqual(const std::string *indexName,
                            const std::string *value)
{
    return nullptr;
}

OpOQuery*
OpOQuery::queryAndGreater(const std::string *indexName,
                          const std::string *value)
{
    return nullptr;
}

OpOQuery*
OpOQuery::queryAndGreaterEqual(const std::string *indexName,
                               const std::string *value)
{
    return nullptr;
}

OpOQuery*
OpOQuery::queryAndLike(const std::string *indexName,
                       const std::string *value)
{
    return nullptr;
}

OpOQuery*
OpOQuery::queryOrAll()
{
    return nullptr;
}

OpOQuery*
OpOQuery::queryOrEqual(const std::string *indexName,
                       const std::string *value)
{
    return nullptr;
}

OpOQuery*
OpOQuery::queryOrNotEqual(const std::string *indexName,
                          const std::string *value)
{
    return nullptr;
}

OpOQuery*
OpOQuery::queryOrLess(const std::string *indexName,
                      const std::string *value)
{
    return nullptr;
}

OpOQuery*
OpOQuery::queryOrLessEqual(const std::string *indexName,
                           const std::string *value)
{
    return nullptr;
}

OpOQuery*
OpOQuery::queryOrGreater(const std::string *indexName,
                         const std::string *value)
{
    return nullptr;
}

OpOQuery*
OpOQuery::queryOrGreaterEqual(const std::string *indexName,
                              const std::string *value)
{
    return nullptr;
}

OpOQuery*
OpOQuery::queryOrLike(const std::string *indexName,
                      const std::string *value)
{
    return nullptr;
}

OpOQuery*
OpOQuery::orderByIndexName(const std::string *indexName)
{
    return nullptr;
}

OpOQuery*
OpOQuery::orderByDESC(const std::string *indexName)
{
    return nullptr;
}

u_int32_t
OpOQuery::count()
{
    return 0;
}

std::list<std::string *>*
OpOQuery::fetch()
{
    return nullptr;
}

std::list<std::string *>*
OpOQuery::fetch(u_int32_t limit)
{
    return nullptr;
}

std::list<std::string *>*
OpOQuery::fetch(u_int32_t limit, u_int32_t skip)
{
    return nullptr;
}

std::map<std::string *, std::string *>*
OpOQuery::fetchFirst()
{
    return nullptr;
}

void
OpOQuery::remove()
{

}

OpOQuery::~OpOQuery()
{
    m_collection->release();
    delete m_queries;
    this->release();
}

NS_OPODB_END


text:
  Saint-Salvy-de-la-Balme est
       un village
       situé dans le département de Tarn en Midi-Pyrénées. On dénombrait 574 habitants en 2008.

Si vous pensez emmenager à Saint-Salvy-de-la-Balme, vous pourrez facilement trouver une maison à acheter.

À coté de Saint-Salvy-de-la-Balme sont situées les communes de
Cambounès située à 4 km, 348 habitants,
Lasfaillades située à 9 km, 71 habitants,
Valdurenque localisée à 8 km, 670 habitants,
Noailhac située à 5 km, 796 habitants,
Vabre à 9 km, 832 habitants,
Saint-Agnan localisée à 7 km, 211 habitants,
 entre autres. De plus, Saint-Salvy-de-la-Balme est située à seulement douze km de Castres.

À Saint-Salvy-de-la-Balme, la valeur moyenne à l'achat d'un appartement s'évalue à zero € du m² en vente. La valeur moyenne d'une maison à l'achat se situe à 1 533 € du m². À la location la valorisation moyenne se situe à 7,73 € du m² par mois.

La ville propose quelques  aménagements, elle dispose, entre autres, de un terrain de tennis, un terrain de sport et une boucle de randonnée.

Le nombre d'habitations, à Saint-Salvy-de-la-Balme, était réparti en 2011 en cinq appartements et 341 maisons soit
 un marché relativement équilibré.


text:
using Microsoft.EntityFrameworkCore;

using Stove.Domain.Entities;
using Stove.Domain.Repositories;

namespace Stove.EntityFrameworkCore.Repositories
{
    public class EfCoreRepositoryBase<TDbContext, TEntity> : EfCoreRepositoryBase<TDbContext, TEntity, int>, IRepository<TEntity>
        where TEntity : class, IEntity<int>
        where TDbContext : DbContext
    {
        public EfCoreRepositoryBase(IDbContextProvider<TDbContext> dbContextProvider)
            : base(dbContextProvider)
        {
        }
    }
}


text:
[![NPM](https://nodei.co/npm/remote-content.png?downloads=true)](https://nodei.co/npm/remote-content/)

> Get remote content.

## Install

Install with [npm](https://npmjs.org/package/remote-content)

```
npm install --save remote-content
```

## Usage

```js
var getRemoteContent = require('remote-content');

getRemoteContent(remotePath, function (err, contents) {
    console.log(contents);
});
```

## Credit

The code for this module was originally taken from the [Juice](https://github.com/Automattic/juice) library.

## License

MIT


text:
require 'desk_api/error/client_error'

module DeskApi
  class Error
    # Raised when desk.com returns the HTTP status code 406
    class NotAcceptable < DeskApi::Error::ClientError
      HTTP_STATUS_CODE = 406
    end
  end
end


text:
from __future__ import unicode_literals

from django.apps import apps
from django.apps import AppConfig
from django.conf import settings
from django.contrib.admin.sites import AlreadyRegistered
from django.core.checks import register
from django.core.checks import Error
# from django.core.exceptions import ImproperlyConfigured
from django.utils.module_loading import module_has_submodule
from django.utils.module_loading import import_module

from djangobmf.conf import settings as bmfsettings

import logging
logger = logging.getLogger(__name__)

class BMFConfig(AppConfig):
    name = 'djangobmf'
    label = bmfsettings.APP_LABEL
    verbose_name = "Django BMF"

    def __init__(self, *args, **kwargs):
        super(BMFConfig, self).__init__(*args, **kwargs)
        self._modules = {}
        self._dashboard = {}

    def ready(self):
        # Autoloader
        for module in ['bmf_module', 'bmf_relation']:
            for app_config in apps.get_app_configs():
                # app_config.bmfconfig = self
                try:
                    import_module('%s.%s' % (app_config.name, module))
                except:
                    if module_has_submodule(app_config.module, module):
                        raise

    def get_module(self, model):
        """
        returs a module instance when called with a model class
        """
        try:
            return self._modules[model]
        except:
            raise

    def has_module(self, model):
        """
        returs a module instance when called with a model class
        """
        return model in self._modules

    def register_module(self, module):
        """
        register a module with the framework
        """
        if self.has_module(module.model):
            raise AlreadyRegistered(
                'The module %s is already registered' % module.model.__name__
            )
        self._modules[module.model] = module(self)

class ModuleTemplate(AppConfig):
    pass

#   bmf_label = bmfsettings.APP_LABEL

#   def ready(self):
#       # if ready was already called
#       if hasattr(self, 'bmf_config'):  # pragma: no cover
#           return True

#       self.bmf_config = apps.get_app_config(self.bmf_label)

#       if not hasattr(self.bmf_config, 'site'):  # pragma: no cover
#           raise ImproperlyConfigured(
#               "Can not find a site attribute in %(cls)s. "
#               "Please import the BMF-Framework before you "
#               "import any BMF-Modules in your INSTALLED_APPS." % {
#                   'cls': self.bmf_config.__class__.__name__
#               }
#           )

#       # autodiscover bmf modules ============================================
#       if module_has_submodule(self.module, "bmf_module"):  # pragma: no branch

#           # load instructions of bmf_module.py
#           import_module('%s.%s' % (self.name, "bmf_module"))

#       logger.debug('App "%s" (%s) is ready' % (
#           self.verbose_name,
#           self.label,
#       ))

class ContribTemplate(ModuleTemplate):
    verbose_name = "Django BMF Contrib"

class CurrencyTemplate(ModuleTemplate):
    verbose_name = "Django BMF Currency"

class ReportTemplate(ModuleTemplate):
    verbose_name = "Django BMF Report"

# Checks
@register()
def checks(app_configs, **kwargs):  # noqa
    errors = []

    if not apps.is_installed('django.contrib.admin'):  # pragma: no cover
        errors.append(Error(
            'django.contrib.admin not found',
            hint="Put 'django.contrib.admin' in your INSTALLED_APPS setting",
            id='djangobmf.E001',
        ))

    if not apps.is_installed('django.contrib.contenttypes'):  # pragma: no cover
        errors.append(Error(
            'django.contrib.contenttypes not found',
            hint="Put 'django.contrib.contenttypes' in your INSTALLED_APPS setting",
            id='djangobmf.E002',
        ))

    if 'django.contrib.auth.context_processors.auth' not in settings.TEMPLATE_CONTEXT_PROCESSORS:  # pragma: no cover
        errors.append(Error(
            'django.contrib.auth.context_processors not found',
            hint="Put 'django.contrib.auth.context_processors' in your TEMPLATE_CONTEXT_PROCESSORS setting",
            id='djangobmf.E003',
        ))

    return errors


text: module.exports = require("./lib/async-auto-adapter");


text:
namespace ServiceRegister.Store.CodeFirst.Migrations
{
    using System;
    using System.Data.Entity.Migrations;

    public partial class MoreLengthToDescriptiveColumns : DbMigration
    {
        public override void Up()
        {
            AlterColumn("organizationlanguagespecification", "description", c => c.String(maxLength: 4000));
            AlterColumn("servicekeyword", "keyword", c => c.String(nullable: false, maxLength: 4000));
            AlterColumn("servicelanguagespecification", "description", c => c.String(maxLength: 4000));
            AlterColumn("servicelanguagespecification", "shortdescription", c => c.String(maxLength: 4000));
            AlterColumn("servicelanguagespecification", "userinstructions", c => c.String(maxLength: 4000));
            AlterColumn("servicelanguagespecification", "requirements", c => c.String(maxLength: 4000));
        }

        public override void Down()
        {
            AlterColumn("servicelanguagespecification", "requirements", c => c.String(maxLength: 1000));
            AlterColumn("servicelanguagespecification", "userinstructions", c => c.String(maxLength: 1000));
            AlterColumn("servicelanguagespecification", "shortdescription", c => c.String(maxLength: 1000));
            AlterColumn("servicelanguagespecification", "description", c => c.String(maxLength: 1000));
            AlterColumn("servicekeyword", "keyword", c => c.String(nullable: false, maxLength: 500));
            AlterColumn("organizationlanguagespecification", "description", c => c.String(maxLength: 1000));
        }
    }
}


text:
import torch
import torch.nn as nn
import torch.nn.modules.conv as conv

class AddCoords(nn.Module):
    def __init__(self, rank, with_r=False):
        super(AddCoords, self).__init__()
        self.rank = rank
        self.with_r = with_r

    def forward(self, input_tensor):
        """
        :param input_tensor: shape (N, C_in, H, W)
        :return:
        """
        if self.rank == 1:
            batch_size_shape, channel_in_shape, dim_x = input_tensor.shape
            xx_range = torch.arange(dim_x, dtype=torch.int32)
            xx_channel = xx_range[None, None, :]

            xx_channel = xx_channel.float() / (dim_x - 1)
            xx_channel = xx_channel * 2 - 1
            xx_channel = xx_channel.repeat(batch_size_shape, 1, 1)

            if torch.cuda.is_available:
                input_tensor = input_tensor.cuda()
                xx_channel = xx_channel.cuda()
            out = torch.cat([input_tensor, xx_channel], dim=1)

            if self.with_r:
                rr = torch.sqrt(torch.pow(xx_channel - 0.5, 2))
                out = torch.cat([out, rr], dim=1)

        elif self.rank == 2:
            batch_size_shape, channel_in_shape, dim_y, dim_x = input_tensor.shape
            xx_ones = torch.ones([1, 1, 1, dim_x], dtype=torch.int32)
            yy_ones = torch.ones([1, 1, 1, dim_y], dtype=torch.int32)

            xx_range = torch.arange(dim_y, dtype=torch.int32)
            yy_range = torch.arange(dim_x, dtype=torch.int32)
            xx_range = xx_range[None, None, :, None]
            yy_range = yy_range[None, None, :, None]

            xx_channel = torch.matmul(xx_range, xx_ones)
            yy_channel = torch.matmul(yy_range, yy_ones)

            # transpose y
            yy_channel = yy_channel.permute(0, 1, 3, 2)

            xx_channel = xx_channel.float() / (dim_y - 1)
            yy_channel = yy_channel.float() / (dim_x - 1)

            xx_channel = xx_channel * 2 - 1
            yy_channel = yy_channel * 2 - 1

            xx_channel = xx_channel.repeat(batch_size_shape, 1, 1, 1)
            yy_channel = yy_channel.repeat(batch_size_shape, 1, 1, 1)

            if torch.cuda.is_available:
                input_tensor = input_tensor.cuda()
                xx_channel = xx_channel.cuda()
                yy_channel = yy_channel.cuda()
            out = torch.cat([input_tensor, xx_channel, yy_channel], dim=1)

            if self.with_r:
                rr = torch.sqrt(torch.pow(xx_channel - 0.5, 2) + torch.pow(yy_channel - 0.5, 2))
                out = torch.cat([out, rr], dim=1)

        elif self.rank == 3:
            batch_size_shape, channel_in_shape, dim_z, dim_y, dim_x = input_tensor.shape
            xx_ones = torch.ones([1, 1, 1, 1, dim_x], dtype=torch.int32)
            yy_ones = torch.ones([1, 1, 1, 1, dim_y], dtype=torch.int32)
            zz_ones = torch.ones([1, 1, 1, 1, dim_z], dtype=torch.int32)

            xy_range = torch.arange(dim_y, dtype=torch.int32)
            xy_range = xy_range[None, None, None, :, None]

            yz_range = torch.arange(dim_z, dtype=torch.int32)
            yz_range = yz_range[None, None, None, :, None]

            zx_range = torch.arange(dim_x, dtype=torch.int32)
            zx_range = zx_range[None, None, None, :, None]

            xy_channel = torch.matmul(xy_range, xx_ones)
            xx_channel = torch.cat([xy_channel + i for i in range(dim_z)], dim=2)

            yz_channel = torch.matmul(yz_range, yy_ones)
            yz_channel = yz_channel.permute(0, 1, 3, 4, 2)
            yy_channel = torch.cat([yz_channel + i for i in range(dim_x)], dim=4)

            zx_channel = torch.matmul(zx_range, zz_ones)
            zx_channel = zx_channel.permute(0, 1, 4, 2, 3)
            zz_channel = torch.cat([zx_channel + i for i in range(dim_y)], dim=3)

            if torch.cuda.is_available:
                input_tensor = input_tensor.cuda()
                xx_channel = xx_channel.cuda()
                yy_channel = yy_channel.cuda()
                zz_channel = zz_channel.cuda()
            out = torch.cat([input_tensor, xx_channel, yy_channel, zz_channel], dim=1)

            if self.with_r:
                rr = torch.sqrt(torch.pow(xx_channel - 0.5, 2) +
                                torch.pow(yy_channel - 0.5, 2) +
                                torch.pow(zz_channel - 0.5, 2))
                out = torch.cat([out, rr], dim=1)
        else:
            raise NotImplementedError

        return out

class CoordConv1d(conv.Conv1d):
    def __init__(self, in_channels, out_channels, kernel_size, stride=1,
                 padding=0, dilation=1, groups=1, bias=True, with_r=False):
        super(CoordConv1d, self).__init__(in_channels, out_channels, kernel_size,
                                          stride, padding, dilation, groups, bias)
        self.rank = 1
        self.addcoords = AddCoords(self.rank, with_r)
        self.conv = nn.Conv1d(in_channels + self.rank + int(with_r), out_channels,
                              kernel_size, stride, padding, dilation, groups, bias)

    def forward(self, input_tensor):
        """
        input_tensor_shape: (N, C_in,H,W)
        output_tensor_shape: N,C_out,H_out,W_out)
        :return: CoordConv2d Result
        """
        out = self.addcoords(input_tensor)
        out = self.conv(out)

        return out

class CoordConv2d(conv.Conv2d):
    def __init__(self, in_channels, out_channels, kernel_size, stride=1,
                 padding=0, dilation=1, groups=1, bias=True, with_r=False):
        super(CoordConv2d, self).__init__(in_channels, out_channels, kernel_size,
                                          stride, padding, dilation, groups, bias)
        self.rank = 2
        self.addcoords = AddCoords(self.rank, with_r)
        self.conv = nn.Conv2d(in_channels + self.rank + int(with_r), out_channels,
                              kernel_size, stride, padding, dilation, groups, bias)

    def forward(self, input_tensor):
        """
        input_tensor_shape: (N, C_in,H,W)
        output_tensor_shape: N,C_out,H_out,W_out)
        :return: CoordConv2d Result
        """
        out = self.addcoords(input_tensor)
        out = self.conv(out)

        return out

class CoordConv3d(conv.Conv3d):
    def __init__(self, in_channels, out_channels, kernel_size, stride=1,
                 padding=0, dilation=1, groups=1, bias=True, with_r=False):
        super(CoordConv3d, self).__init__(in_channels, out_channels, kernel_size,
                                          stride, padding, dilation, groups, bias)
        self.rank = 3
        self.addcoords = AddCoords(self.rank, with_r)
        self.conv = nn.Conv3d(in_channels + self.rank + int(with_r), out_channels,
                              kernel_size, stride, padding, dilation, groups, bias)

    def forward(self, input_tensor):
        """
        input_tensor_shape: (N, C_in,H,W)
        output_tensor_shape: N,C_out,H_out,W_out)
        :return: CoordConv2d Result
        """
        out = self.addcoords(input_tensor)
        out = self.conv(out)

        return out


text:
<?php  namespace Hex\Events;

interface EventInterface {

    /**
     * Return the event name
     * @return string
     */
    public function name();
}