text:
<?xml version="1.0" encoding="utf-8"?>
<CoverageSession xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
  <Summary numSequencePoints="20" visitedSequencePoints="17" numBranchPoints="18" visitedBranchPoints="14" sequenceCoverage="85" branchCoverage="77.78" maxCyclomaticComplexity="5" minCyclomaticComplexity="1" />
  <Modules>
    <Module skippedDueTo="Filter" hash="F2-B7-6C-91-B2-2A-27-1D-84-DA-D8-01-19-1B-74-D3-A8-5B-ED-15">
      <FullName>C:\Windows\Microsoft.Net\assembly\GAC_32\mscorlib\v4.0_4.0.0.0__b77a5c561934e089\mscorlib.dll</FullName>
      <ModuleName>mscorlib</ModuleName>
      <Classes />
    </Module>
    <Module hash="8D-12-08-0D-1C-B4-CF-39-8C-5D-12-63-E9-70-23-A3-D5-4E-72-61">
      <Summary numSequencePoints="20" visitedSequencePoints="17" numBranchPoints="18" visitedBranchPoints="14" sequenceCoverage="85" branchCoverage="77.78" maxCyclomaticComplexity="5" minCyclomaticComplexity="1" />
      <FullName>C:\elemez-ce\tools\ThirdParty\opencover.4.5.1604\Samples\x86\OpenCover.Simple.Target.exe</FullName>
      <ModuleName>OpenCover.Simple.Target</ModuleName>
      <Files>
        <File uid="1" fullPath="c:\Projects\opencover.git\working\main\OpenCover.Simple.Target\Other.cs" />
        <File uid="2" fullPath="c:\Projects\opencover.git\working\main\OpenCover.Simple.Target\Program.cs" />
      </Files>
      <Classes>
        <Class>
          <Summary numSequencePoints="0" visitedSequencePoints="0" numBranchPoints="0" visitedBranchPoints="0" sequenceCoverage="0" branchCoverage="0" maxCyclomaticComplexity="0" minCyclomaticComplexity="0" />
          <FullName><Module></FullName>
          <Methods />
        </Class>
        <Class>
          <Summary numSequencePoints="3" visitedSequencePoints="0" numBranchPoints="2" visitedBranchPoints="0" sequenceCoverage="0" branchCoverage="0" maxCyclomaticComplexity="1" minCyclomaticComplexity="1" />
          <FullName>Namespace.Other</FullName>
          <Methods>
            <Method visited="false" cyclomaticComplexity="1" sequenceCoverage="0" branchCoverage="0" isConstructor="false" isStatic="false" isGetter="true" isSetter="false">
              <Summary numSequencePoints="0" visitedSequencePoints="0" numBranchPoints="0" visitedBranchPoints="0" sequenceCoverage="0" branchCoverage="0" maxCyclomaticComplexity="1" minCyclomaticComplexity="1" />
              <MetadataToken>100663298</MetadataToken>
              <Name>System.Int32 Namespace.Other::get_Data()</Name>
              <SequencePoints />
              <BranchPoints />
              <MethodPoint vc="0" uspid="1" ordinal="0" offset="0" />
            </Method>
            <Method visited="false" cyclomaticComplexity="1" sequenceCoverage="0" branchCoverage="0" isConstructor="false" isStatic="false" isGetter="false" isSetter="true">
              <Summary numSequencePoints="0" visitedSequencePoints="0" numBranchPoints="0" visitedBranchPoints="0" sequenceCoverage="0" branchCoverage="0" maxCyclomaticComplexity="1" minCyclomaticComplexity="1" />
              <MetadataToken>100663299</MetadataToken>
              <Name>System.Void Namespace.Other::set_Data(System.Int32)</Name>
              <SequencePoints />
              <BranchPoints />
              <MethodPoint vc="0" uspid="2" ordinal="0" offset="0" />
            </Method>
            <Method visited="false" cyclomaticComplexity="1" sequenceCoverage="0" branchCoverage="0" isConstructor="false" isStatic="false" isGetter="true" isSetter="false">
              <Summary numSequencePoints="1" visitedSequencePoints="0" numBranchPoints="1" visitedBranchPoints="0" sequenceCoverage="0" branchCoverage="0" maxCyclomaticComplexity="1" minCyclomaticComplexity="1" />
              <MetadataToken>100663300</MetadataToken>
              <Name>System.Int32 Namespace.Other::get_X()</Name>
              <FileRef uid="1" />
              <SequencePoints>
                <SequencePoint vc="0" uspid="3" ordinal="0" offset="0" sl="18" sc="30" el="18" ec="40" />
              </SequencePoints>
              <BranchPoints />
              <MethodPoint xsi:type="SequencePoint" vc="0" uspid="3" ordinal="0" offset="0" sl="18" sc="30" el="18" ec="40" />
            </Method>
            <Method visited="false" cyclomaticComplexity="1" sequenceCoverage="0" branchCoverage="0" isConstructor="true" isStatic="false" isGetter="false" isSetter="false">
              <Summary numSequencePoints="2" visitedSequencePoints="0" numBranchPoints="1" visitedBranchPoints="0" sequenceCoverage="0" branchCoverage="0" maxCyclomaticComplexity="1" minCyclomaticComplexity="1" />
              <MetadataToken>100663297</MetadataToken>
              <Name>System.Void Namespace.Other::.ctor()</Name>
              <FileRef uid="1" />
              <SequencePoints>
                <SequencePoint vc="0" uspid="4" ordinal="0" offset="0" sl="10" sc="9" el="10" ec="23" />
                <SequencePoint vc="0" uspid="5" ordinal="1" offset="6" sl="12" sc="9" el="12" ec="10" />
              </SequencePoints>
              <BranchPoints />
              <MethodPoint xsi:type="SequencePoint" vc="0" uspid="4" ordinal="0" offset="0" sl="10" sc="9" el="10" ec="23" />
            </Method>
          </Methods>
        </Class>
        <Class>
          <Summary numSequencePoints="14" visitedSequencePoints="14" numBranchPoints="11" visitedBranchPoints="9" sequenceCoverage="100" branchCoverage="81.82" maxCyclomaticComplexity="5" minCyclomaticComplexity="1" />
          <FullName>OpenCover.Simple.Target.Program</FullName>
          <Methods>
            <Method visited="true" cyclomaticComplexity="5" sequenceCoverage="100" branchCoverage="77.78" isConstructor="false" isStatic="true" isGetter="false" isSetter="false">
              <Summary numSequencePoints="12" visitedSequencePoints="12" numBranchPoints="9" visitedBranchPoints="7" sequenceCoverage="100" branchCoverage="77.78" maxCyclomaticComplexity="5" minCyclomaticComplexity="5" />
              <MetadataToken>100663301</MetadataToken>
              <Name>System.Void OpenCover.Simple.Target.Program::Main(System.String[])</Name>
              <FileRef uid="2" />
              <SequencePoints>
                <SequencePoint vc="1" uspid="6" ordinal="0" offset="0" sl="19" sc="13" el="19" ec="121" />
                <SequencePoint vc="1" uspid="7" ordinal="1" offset="30" sl="22" sc="13" el="22" ec="28" />
                <SequencePoint vc="1" uspid="8" ordinal="2" offset="38" sl="25" sc="13" el="25" ec="94" />
                <SequencePoint vc="1" uspid="9" ordinal="3" offset="68" sl="28" sc="13" el="28" ec="36" />
                <SequencePoint vc="1" uspid="10" ordinal="4" offset="76" sl="30" sc="18" el="30" ec="28" />
                <SequencePoint vc="1000" uspid="11" ordinal="5" offset="81" sl="32" sc="22" el="32" ec="32" />
                <SequencePoint vc="12000" uspid="12" ordinal="6" offset="86" sl="34" sc="21" el="34" ec="53" />
                <SequencePoint vc="12000" uspid="13" ordinal="7" offset="99" sl="32" sc="41" el="32" ec="44" />
                <SequencePoint vc="13000" uspid="14" ordinal="8" offset="105" sl="32" sc="33" el="32" ec="39" />
                <SequencePoint vc="1000" uspid="15" ordinal="9" offset="111" sl="30" sc="39" el="30" ec="42" />
                <SequencePoint vc="1001" uspid="16" ordinal="10" offset="117" sl="30" sc="29" el="30" ec="37" />
                <SequencePoint vc="1" uspid="17" ordinal="11" offset="126" sl="38" sc="9" el="38" ec="10" />
              </SequencePoints>
              <BranchPoints>
                <BranchPoint vc="1" uspid="18" ordinal="0" offset="5" path="0" />
                <BranchPoint vc="0" uspid="19" ordinal="1" offset="5" path="1" />
                <BranchPoint vc="1" uspid="20" ordinal="2" offset="43" path="0" />
                <BranchPoint vc="0" uspid="21" ordinal="3" offset="43" path="1" />
                <BranchPoint vc="1000" uspid="22" ordinal="4" offset="109" path="0" />
                <BranchPoint vc="12000" uspid="23" ordinal="5" offset="109" path="1" />
                <BranchPoint vc="1" uspid="24" ordinal="6" offset="124" path="0" />
                <BranchPoint vc="1000" uspid="25" ordinal="7" offset="124" path="1" />
              </BranchPoints>
              <MethodPoint xsi:type="SequencePoint" vc="1" uspid="6" ordinal="0" offset="0" sl="19" sc="13" el="19" ec="121" />
            </Method>
            <Method visited="false" cyclomaticComplexity="1" sequenceCoverage="0" branchCoverage="0" isConstructor="true" isStatic="false" isGetter="false" isSetter="false">
              <Summary numSequencePoints="0" visitedSequencePoints="0" numBranchPoints="0" visitedBranchPoints="0" sequenceCoverage="0" branchCoverage="0" maxCyclomaticComplexity="1" minCyclomaticComplexity="1" />
              <MetadataToken>100663302</MetadataToken>
              <Name>System.Void OpenCover.Simple.Target.Program::.ctor()</Name>
              <SequencePoints />
              <BranchPoints />
              <MethodPoint vc="0" uspid="26" ordinal="0" offset="0" />
            </Method>
            <Method visited="true" cyclomaticComplexity="1" sequenceCoverage="100" branchCoverage="100" isConstructor="false" isStatic="true" isGetter="false" isSetter="false">
              <Summary numSequencePoints="1" visitedSequencePoints="1" numBranchPoints="1" visitedBranchPoints="1" sequenceCoverage="100" branchCoverage="100" maxCyclomaticComplexity="1" minCyclomaticComplexity="1" />
              <MetadataToken>100663303</MetadataToken>
              <Name>System.Func`2<System.Func`2<System.Func`2<System.Int32,System.Int32>,System.Func`2<System.Int32,System.Int32>>,System.Func`2<System.Int32,System.Int32>> OpenCover.Simple.Target.Program::<Main>b__0(OpenCover.Simple.Target.Program/SelfApplicable`1<System.Func`2<System.Func`2<System.Func`2<System.Int32,System.Int32>,System.Func`2<System.Int32,System.Int32>>,System.Func`2<System.Int32,System.Int32>>>)</Name>
              <FileRef uid="2" />
              <SequencePoints>
                <SequencePoint vc="78001" uspid="27" ordinal="0" offset="13" sl="19" sc="97" el="19" ec="120" />
              </SequencePoints>
              <BranchPoints />
              <MethodPoint vc="78001" uspid="28" ordinal="0" offset="0" />
            </Method>
            <Method visited="true" cyclomaticComplexity="1" sequenceCoverage="100" branchCoverage="100" isConstructor="false" isStatic="true" isGetter="false" isSetter="false">
              <Summary numSequencePoints="1" visitedSequencePoints="1" numBranchPoints="1" visitedBranchPoints="1" sequenceCoverage="100" branchCoverage="100" maxCyclomaticComplexity="1" minCyclomaticComplexity="1" />
              <MetadataToken>100663304</MetadataToken>
              <Name>System.Func`2<System.Int32,System.Int32> OpenCover.Simple.Target.Program::<Main>b__3(System.Func`2<System.Int32,System.Int32>)</Name>
              <FileRef uid="2" />
              <SequencePoints>
                <SequencePoint vc="78000" uspid="29" ordinal="0" offset="13" sl="25" sc="61" el="25" ec="93" />
              </SequencePoints>
              <BranchPoints />
              <MethodPoint vc="78000" uspid="30" ordinal="0" offset="0" />
            </Method>
          </Methods>
        </Class>
        <Class>
          <Summary numSequencePoints="0" visitedSequencePoints="0" numBranchPoints="0" visitedBranchPoints="0" sequenceCoverage="0" branchCoverage="0" maxCyclomaticComplexity="0" minCyclomaticComplexity="0" />
          <FullName>OpenCover.Simple.Target.Program/SelfApplicable`1</FullName>
          <Methods>
            <Method visited="false" cyclomaticComplexity="0" sequenceCoverage="0" branchCoverage="0" isConstructor="true" isStatic="false" isGetter="false" isSetter="false">
              <Summary numSequencePoints="0" visitedSequencePoints="0" numBranchPoints="0" visitedBranchPoints="0" sequenceCoverage="0" branchCoverage="0" maxCyclomaticComplexity="1" minCyclomaticComplexity="1" />
              <MetadataToken>100663305</MetadataToken>
              <Name>System.Void OpenCover.Simple.Target.Program/SelfApplicable`1::.ctor(System.Object,System.IntPtr)</Name>
              <SequencePoints />
              <BranchPoints />
              <MethodPoint vc="0" uspid="31" ordinal="0" offset="0" />
            </Method>
            <Method visited="false" cyclomaticComplexity="0" sequenceCoverage="0" branchCoverage="0" isConstructor="false" isStatic="false" isGetter="false" isSetter="false">
              <Summary numSequencePoints="0" visitedSequencePoints="0" numBranchPoints="0" visitedBranchPoints="0" sequenceCoverage="0" branchCoverage="0" maxCyclomaticComplexity="1" minCyclomaticComplexity="1" />
              <MetadataToken>100663306</MetadataToken>
              <Name>T OpenCover.Simple.Target.Program/SelfApplicable`1::Invoke(OpenCover.Simple.Target.Program/SelfApplicable`1<T>)</Name>
              <SequencePoints />
              <BranchPoints />
              <MethodPoint vc="0" uspid="32" ordinal="0" offset="0" />
            </Method>
            <Method visited="false" cyclomaticComplexity="0" sequenceCoverage="0" branchCoverage="0" isConstructor="false" isStatic="false" isGetter="false" isSetter="false">
              <Summary numSequencePoints="0" visitedSequencePoints="0" numBranchPoints="0" visitedBranchPoints="0" sequenceCoverage="0" branchCoverage="0" maxCyclomaticComplexity="1" minCyclomaticComplexity="1" />
              <MetadataToken>100663307</MetadataToken>
              <Name>System.IAsyncResult OpenCover.Simple.Target.Program/SelfApplicable`1::BeginInvoke(OpenCover.Simple.Target.Program/SelfApplicable`1<T>,System.AsyncCallback,System.Object)</Name>
              <SequencePoints />
              <BranchPoints />
              <MethodPoint vc="0" uspid="33" ordinal="0" offset="0" />
            </Method>
            <Method visited="false" cyclomaticComplexity="0" sequenceCoverage="0" branchCoverage="0" isConstructor="false" isStatic="false" isGetter="false" isSetter="false">
              <Summary numSequencePoints="0" visitedSequencePoints="0" numBranchPoints="0" visitedBranchPoints="0" sequenceCoverage="0" branchCoverage="0" maxCyclomaticComplexity="1" minCyclomaticComplexity="1" />
              <MetadataToken>100663308</MetadataToken>
              <Name>T OpenCover.Simple.Target.Program/SelfApplicable`1::EndInvoke(System.IAsyncResult)</Name>
              <SequencePoints />
              <BranchPoints />
              <MethodPoint vc="0" uspid="34" ordinal="0" offset="0" />
            </Method>
          </Methods>
        </Class>
        <Class>
          <Summary numSequencePoints="1" visitedSequencePoints="1" numBranchPoints="1" visitedBranchPoints="1" sequenceCoverage="100" branchCoverage="100" maxCyclomaticComplexity="1" minCyclomaticComplexity="1" />
          <FullName>OpenCover.Simple.Target.Program/<>c__DisplayClass7</FullName>
          <Methods>
            <Method visited="true" cyclomaticComplexity="1" sequenceCoverage="0" branchCoverage="0" isConstructor="true" isStatic="false" isGetter="false" isSetter="false">
              <Summary numSequencePoints="0" visitedSequencePoints="0" numBranchPoints="0" visitedBranchPoints="0" sequenceCoverage="0" branchCoverage="0" maxCyclomaticComplexity="1" minCyclomaticComplexity="1" />
              <MetadataToken>100663309</MetadataToken>
              <Name>System.Void OpenCover.Simple.Target.Program/<>c__DisplayClass7::.ctor()</Name>
              <SequencePoints />
              <BranchPoints />
              <MethodPoint vc="78001" uspid="35" ordinal="0" offset="0" />
            </Method>
            <Method visited="true" cyclomaticComplexity="1" sequenceCoverage="100" branchCoverage="100" isConstructor="false" isStatic="false" isGetter="false" isSetter="false">
              <Summary numSequencePoints="1" visitedSequencePoints="1" numBranchPoints="1" visitedBranchPoints="1" sequenceCoverage="100" branchCoverage="100" maxCyclomaticComplexity="1" minCyclomaticComplexity="1" />
              <MetadataToken>100663310</MetadataToken>
              <Name>System.Func`2<System.Int32,System.Int32> OpenCover.Simple.Target.Program/<>c__DisplayClass7::<Main>b__1(System.Func`2<System.Func`2<System.Int32,System.Int32>,System.Func`2<System.Int32,System.Int32>>)</Name>
              <FileRef uid="2" />
              <SequencePoints>
                <SequencePoint vc="78001" uspid="36" ordinal="0" offset="20" sl="19" sc="102" el="19" ec="120" />
              </SequencePoints>
              <BranchPoints />
              <MethodPoint vc="78001" uspid="37" ordinal="0" offset="0" />
            </Method>
          </Methods>
        </Class>
        <Class>
          <Summary numSequencePoints="1" visitedSequencePoints="1" numBranchPoints="1" visitedBranchPoints="1" sequenceCoverage="100" branchCoverage="100" maxCyclomaticComplexity="1" minCyclomaticComplexity="1" />
          <FullName>OpenCover.Simple.Target.Program/<>c__DisplayClass7/<>c__DisplayClass9</FullName>
          <Methods>
            <Method visited="true" cyclomaticComplexity="1" sequenceCoverage="0" branchCoverage="0" isConstructor="true" isStatic="false" isGetter="false" isSetter="false">
              <Summary numSequencePoints="0" visitedSequencePoints="0" numBranchPoints="0" visitedBranchPoints="0" sequenceCoverage="0" branchCoverage="0" maxCyclomaticComplexity="1" minCyclomaticComplexity="1" />
              <MetadataToken>100663311</MetadataToken>
              <Name>System.Void OpenCover.Simple.Target.Program/<>c__DisplayClass7/<>c__DisplayClass9::.ctor()</Name>
              <SequencePoints />
              <BranchPoints />
              <MethodPoint vc="78001" uspid="38" ordinal="0" offset="0" />
            </Method>
            <Method visited="true" cyclomaticComplexity="1" sequenceCoverage="100" branchCoverage="100" isConstructor="false" isStatic="false" isGetter="false" isSetter="false">
              <Summary numSequencePoints="1" visitedSequencePoints="1" numBranchPoints="1" visitedBranchPoints="1" sequenceCoverage="100" branchCoverage="100" maxCyclomaticComplexity="1" minCyclomaticComplexity="1" />
              <MetadataToken>100663312</MetadataToken>
              <Name>System.Int32 OpenCover.Simple.Target.Program/<>c__DisplayClass7/<>c__DisplayClass9::<Main>b__2(System.Int32)</Name>
              <FileRef uid="2" />
              <SequencePoints>
                <SequencePoint vc="78000" uspid="39" ordinal="0" offset="0" sl="19" sc="107" el="19" ec="120" />
              </SequencePoints>
              <BranchPoints />
              <MethodPoint xsi:type="SequencePoint" vc="78000" uspid="39" ordinal="0" offset="0" sl="19" sc="107" el="19" ec="120" />
            </Method>
          </Methods>
        </Class>
        <Class>
          <Summary numSequencePoints="1" visitedSequencePoints="1" numBranchPoints="3" visitedBranchPoints="3" sequenceCoverage="100" branchCoverage="100" maxCyclomaticComplexity="2" minCyclomaticComplexity="1" />
          <FullName>OpenCover.Simple.Target.Program/<>c__DisplayClassb</FullName>
          <Methods>
            <Method visited="true" cyclomaticComplexity="1" sequenceCoverage="0" branchCoverage="0" isConstructor="true" isStatic="false" isGetter="false" isSetter="false">
              <Summary numSequencePoints="0" visitedSequencePoints="0" numBranchPoints="0" visitedBranchPoints="0" sequenceCoverage="0" branchCoverage="0" maxCyclomaticComplexity="1" minCyclomaticComplexity="1" />
              <MetadataToken>100663313</MetadataToken>
              <Name>System.Void OpenCover.Simple.Target.Program/<>c__DisplayClassb::.ctor()</Name>
              <SequencePoints />
              <BranchPoints />
              <MethodPoint vc="78000" uspid="40" ordinal="0" offset="0" />
            </Method>
            <Method visited="true" cyclomaticComplexity="2" sequenceCoverage="100" branchCoverage="100" isConstructor="false" isStatic="false" isGetter="false" isSetter="false">
              <Summary numSequencePoints="1" visitedSequencePoints="1" numBranchPoints="3" visitedBranchPoints="3" sequenceCoverage="100" branchCoverage="100" maxCyclomaticComplexity="2" minCyclomaticComplexity="2" />
              <MetadataToken>100663314</MetadataToken>
              <Name>System.Int32 OpenCover.Simple.Target.Program/<>c__DisplayClassb::<Main>b__4(System.Int32)</Name>
              <FileRef uid="2" />
              <SequencePoints>
                <SequencePoint vc="78000" uspid="41" ordinal="0" offset="0" sl="25" sc="66" el="25" ec="93" />
              </SequencePoints>
              <BranchPoints>
                <BranchPoint vc="66000" uspid="42" ordinal="0" offset="1" path="0" />
                <BranchPoint vc="12000" uspid="43" ordinal="1" offset="1" path="1" />
              </BranchPoints>
              <MethodPoint xsi:type="SequencePoint" vc="78000" uspid="41" ordinal="0" offset="0" sl="25" sc="66" el="25" ec="93" />
            </Method>
          </Methods>
        </Class>
      </Classes>
    </Module>
  </Modules>
</CoverageSession>


text:
// --------------------------------------------------------------------------------------------------------------------
// <copyright file="GameClientPeer.cs" company="Exit Games GmbH">
//   Copyright (c) Exit Games GmbH.  All rights reserved.
// </copyright>
// <summary>
//   Defines the GamePeer type.
// </summary>
// --------------------------------------------------------------------------------------------------------------------

namespace Photon.LoadBalancing.GameServer
{
    #region using directives

    using System;

    using ExitGames.Logging;

    using Lite;
    using Lite.Caching;
    using Lite.Messages;
    using Lite.Operations;

    using Photon.LoadBalancing.Operations;
    using Photon.LoadBalancing.Common;
    using Photon.SocketServer;
    using Photon.SocketServer.Rpc.Protocols;

    using OperationCode = Photon.LoadBalancing.Operations.OperationCode;

    #endregion

    public class GameClientPeer : LitePeer
    {
        #region Constants and Fields

        private static readonly ILogger log = LogManager.GetCurrentClassLogger();

        private readonly GameApplication application;

        #endregion

        #region Constructors and Destructors

        public GameClientPeer(InitRequest initRequest, GameApplication application)
            : base(initRequest.Protocol, initRequest.PhotonPeer)
        {
            this.application = application;
            this.PeerId = string.Empty;

            if (GameApplication.Instance.AppStatsPublisher != null)
            {
                GameApplication.Instance.AppStatsPublisher.IncrementPeerCount();
            }
        }

        #endregion

        #region Properties

        public string PeerId { get; protected set; }

        public DateTime LastActivity { get; protected set; }

        public byte LastOperation { get; protected set; }

        #endregion

        #region Public Methods

        public void OnJoinFailed(ErrorCode result)
        {
            this.RequestFiber.Enqueue(() => this.OnJoinFailedInternal(result));
        }

        public override string ToString()
        {
            return string.Format(
                "{0}: {1}",
                this.GetType().Name,
                string.Format(
                    "PID {0}, IsConnected: {1}, IsDisposed: {2}, Last Activity: Operation {3} at UTC {4} in Room {7}, IP {5}:{6}, ",
                    this.ConnectionId,
                    this.Connected,
                    this.Disposed,
                    this.LastOperation,
                    this.LastActivity,
                    this.RemoteIP,
                    this.RemotePort,
                    this.RoomReference == null ? string.Empty : this.RoomReference.Room.Name));
        }

        #endregion

        #region Methods

        protected override RoomReference GetRoomReference(JoinRequest joinRequest)
        {
            throw new NotSupportedException("Use TryGetRoomReference or TryCreateRoomReference instead.");
        }

        protected virtual void HandleCreateGameOperation(OperationRequest operationRequest, SendParameters sendParameters)
        {
            // The JoinRequest from the Lite application is also used for create game operations to support all feaures
            // provided by Lite games.
            // The only difference is the operation code to prevent games created by a join operation.
            // On "LoadBalancing" game servers games must by created first by the game creator to ensure that no other joining peer
            // reaches the game server before the game is created.
            var createRequest = new JoinRequest(this.Protocol, operationRequest);
            if (this.ValidateOperation(createRequest, sendParameters) == false)
            {
                return;
            }

            // remove peer from current game
            this.RemovePeerFromCurrentRoom();

            // try to create the game
            RoomReference gameReference;
            if (this.TryCreateRoom(createRequest.GameId, out gameReference) == false)
            {
                var response = new OperationResponse
                    {
                        OperationCode = (byte)OperationCode.CreateGame,
                        ReturnCode = (short)ErrorCode.GameIdAlreadyExists,
                        DebugMessage = "Game already exists"
                    };

                this.SendOperationResponse(response, sendParameters);
                return;
            }

            // save the game reference in the peers state
            this.RoomReference = gameReference;

            // finally enqueue the operation into game queue
            gameReference.Room.EnqueueOperation(this, operationRequest, sendParameters);
        }

        /// <summary>
        ///   Handles the <see cref = "JoinRequest" /> to enter a <see cref = "Game" />.
        ///   This method removes the peer from any previously joined room, finds the room intended for join
        ///   and enqueues the operation for it to handle.
        /// </summary>
        /// <param name = "operationRequest">
        ///   The operation request to handle.
        /// </param>
        /// <param name = "sendParameters">
        ///   The send Parameters.
        /// </param>
        protected virtual void HandleJoinGameOperation(OperationRequest operationRequest, SendParameters sendParameters)
        {
            // create join operation
            var joinRequest = new JoinRequest(this.Protocol, operationRequest);
            if (this.ValidateOperation(joinRequest, sendParameters) == false)
            {
                return;
            }

            // remove peer from current game
            this.RemovePeerFromCurrentRoom();

            // try to get the game reference from the game cache
            RoomReference gameReference;
            if (this.TryGetRoomReference(joinRequest.GameId, out gameReference) == false)
            {
                this.OnRoomNotFound(joinRequest.GameId);

                var response = new OperationResponse
                    {
                        OperationCode = (byte)OperationCode.JoinGame,
                        ReturnCode = (short)ErrorCode.GameIdNotExists,
                        DebugMessage = "Game does not exists"
                    };

                this.SendOperationResponse(response, sendParameters);
                return;
            }

            // save the game reference in the peers state
            this.RoomReference = gameReference;

            // finally enqueue the operation into game queue
            gameReference.Room.EnqueueOperation(this, operationRequest, sendParameters);
        }

        protected virtual void HandleDebugGameOperation(OperationRequest operationRequest, SendParameters sendParameters)
        {
            var debugRequest = new DebugGameRequest(this.Protocol, operationRequest);
            if (this.ValidateOperation(debugRequest, sendParameters) == false)
            {
                return;
            }

            string debug = string.Format("DebugGame called from PID {0}. {1}", this.ConnectionId, this.GetRoomCacheDebugString(debugRequest.GameId));
            operationRequest.Parameters.Add((byte)ParameterCode.Info, debug);

            if (this.RoomReference == null)
            {
                Room room;
                // get a room without obtaining a reference:
                if (!this.TryGetRoomWithoutReference(debugRequest.GameId, out room))
                {
                    var response = new OperationResponse
                        {
                            OperationCode = (byte)OperationCode.DebugGame,
                            ReturnCode = (short)ErrorCode.GameIdNotExists,
                            DebugMessage = "Game does not exist in RoomCache"
                        };

                    this.SendOperationResponse(response, sendParameters);
                    return;
                }

                room.EnqueueOperation(this, operationRequest, sendParameters);
            }
            else
            {
                this.RoomReference.Room.EnqueueOperation(this, operationRequest, sendParameters);
            }
        }

        protected virtual void OnRoomNotFound(string gameId)
        {
            this.application.MasterPeer.RemoveGameState(gameId);
        }

        protected override void OnDisconnect(PhotonHostRuntimeInterfaces.DisconnectReason reasonCode, string reasonDetail)
        {
            if (log.IsDebugEnabled)
            {
                log.DebugFormat("OnDisconnect: conId={0}, reason={1}, detail={2}", this.ConnectionId, reasonCode, reasonDetail);
            }

            if (GameApplication.Instance.AppStatsPublisher != null)
            {
                GameApplication.Instance.AppStatsPublisher.DecrementPeerCount();
            }

            if (this.RoomReference == null)
            {
                return;
            }

            var message = new RoomMessage((byte)GameMessageCodes.RemovePeerFromGame, this);
            this.RoomReference.Room.EnqueueMessage(message);
            this.RoomReference.Dispose();
            this.RoomReference = null;
        }

        protected override void OnOperationRequest(OperationRequest request, SendParameters sendParameters)
        {
            if (log.IsDebugEnabled)
            {
                if (request.OperationCode != (byte)Lite.Operations.OperationCode.RaiseEvent)
                {
                    log.DebugFormat("OnOperationRequest: conId={0}, opCode={1}", this.ConnectionId, request.OperationCode);
                }
            }

            this.LastActivity = DateTime.UtcNow;
            this.LastOperation = request.OperationCode;

            switch (request.OperationCode)
            {
                case (byte)OperationCode.Authenticate:
                    this.HandleAuthenticateOperation(request, sendParameters);
                    return;

                case (byte)OperationCode.CreateGame:
                    this.HandleCreateGameOperation(request, sendParameters);
                    return;

                case (byte)OperationCode.JoinGame:
                    this.HandleJoinGameOperation(request, sendParameters);
                    return;

                case (byte)Lite.Operations.OperationCode.Leave:
                    this.HandleLeaveOperation(request, sendParameters);
                    return;

                case (byte)Lite.Operations.OperationCode.Ping:
                    this.HandlePingOperation(request, sendParameters);
                    return;

                case (byte)OperationCode.DebugGame:
                    this.HandleDebugGameOperation(request, sendParameters);
                    return;

                case (byte)Lite.Operations.OperationCode.RaiseEvent:
                case (byte)Lite.Operations.OperationCode.GetProperties:
                case (byte)Lite.Operations.OperationCode.SetProperties:
                case (byte)Lite.Operations.OperationCode.ChangeGroups:
                    this.HandleGameOperation(request, sendParameters);
                    return;
            }

            string message = string.Format("Unknown operation code {0}", request.OperationCode);
            var response = new OperationResponse { ReturnCode = (short)ErrorCode.OperationDenied, DebugMessage = message, OperationCode = request.OperationCode };
            this.SendOperationResponse(response, sendParameters);
        }

        protected virtual bool TryCreateRoom(string gameId, out RoomReference roomReference)
        {
            return GameCache.Instance.TryCreateRoom(gameId, this, out roomReference);
        }

        protected virtual bool TryGetRoomReference(string gameId, out RoomReference roomReference)
        {
            return GameCache.Instance.TryGetRoomReference(gameId, this, out roomReference);
        }

        protected virtual bool TryGetRoomWithoutReference(string gameId, out Room room)
        {
            return GameCache.Instance.TryGetRoomWithoutReference(gameId, out room);
        }

        public virtual string GetRoomCacheDebugString(string gameId)
        {
            return GameCache.Instance.GetDebugString(gameId);
        }

        protected virtual void HandleAuthenticateOperation(OperationRequest operationRequest, SendParameters sendParameters)
        {
            var request = new AuthenticateRequest(this.Protocol, operationRequest);
            if (this.ValidateOperation(request, sendParameters) == false)
            {
                return;
            }

            if (request.UserId != null)
            {
                this.PeerId = request.UserId;
            }

            var response = new OperationResponse { OperationCode = operationRequest.OperationCode };
            this.SendOperationResponse(response, sendParameters);
        }

        private void OnJoinFailedInternal(ErrorCode result)
        {
            if (log.IsDebugEnabled)
            {
                log.DebugFormat("OnJoinFailed: {0}", result);
            }

            // if join operation failed -> release the refrence to the room
            if (result != ErrorCode.Ok && this.RoomReference != null)
            {
                this.RoomReference.Dispose();
                this.RoomReference = null;
            }
        }
        #endregion
    }
}

redpajama_set_name: RedPajamaGithub


text:
package io.pebbletemplates.spring.extension.function.bindingresult;

import io.pebbletemplates.pebble.template.EvaluationContext;
import io.pebbletemplates.pebble.template.PebbleTemplate;
import java.util.ArrayList;
import java.util.List;
import java.util.Locale;
import java.util.Map;
import org.springframework.context.MessageSource;
import org.springframework.validation.BindingResult;
import org.springframework.validation.FieldError;

/**
 * <p>
 * Function available to templates in Spring MVC applications in order to access the BindingResult
 * of a form
 * </p>
 *
 * @author Eric Bussieres
 */
public class GetFieldErrorsFunction extends BaseBindingResultFunction {

  public static final String FUNCTION_NAME = "getFieldErrors";

  private final MessageSource messageSource;

  public GetFieldErrorsFunction(MessageSource messageSource) {
    super(PARAM_FORM_NAME, PARAM_FIELD_NAME);
    this.messageSource = messageSource;
  }

  @Override
  public Object execute(Map<String, Object> args, PebbleTemplate self, EvaluationContext context,
      int lineNumber) {
    String formName = (String) args.get(PARAM_FORM_NAME);
    String field = (String) args.get(PARAM_FIELD_NAME);

    if (field == null) {
      throw new IllegalArgumentException("Field parameter is required in GetFieldErrorsFunction");
    }

    Locale locale = context.getLocale();
    BindingResult bindingResult = this.getBindingResult(formName, context);

    return this.constructErrorMessages(field, locale, bindingResult);
  }

  private List<String> constructErrorMessages(String field, Locale locale,
      BindingResult bindingResult) {
    List<String> errorMessages = new ArrayList<>();
    if (bindingResult != null) {
      for (FieldError error : bindingResult.getFieldErrors(field)) {
        String msg = this.messageSource.getMessage(error, locale);
        errorMessages.add(msg);
      }
    }
    return errorMessages;
  }
}


text:
package io.fabric8.kubernetes.client.impl;

import io.fabric8.kubernetes.client.dsl.MetricAPIGroupDSL;
import io.fabric8.kubernetes.client.dsl.internal.NodeMetricOperationsImpl;
import io.fabric8.kubernetes.client.dsl.internal.PodMetricOperationsImpl;
import io.fabric8.kubernetes.client.extension.ClientAdapter;

public class MetricAPIGroupClient extends ClientAdapter<MetricAPIGroupClient> implements MetricAPIGroupDSL {

  @Override
  public PodMetricOperationsImpl pods() {
    return new PodMetricOperationsImpl(this);
  }

  @Override
  public NodeMetricOperationsImpl nodes() {
    return new NodeMetricOperationsImpl(this);
  }

  @Override
  public MetricAPIGroupClient newInstance() {
    return new MetricAPIGroupClient();
  }

}


text:
/**

 */
#import "SVGKSource.h"

@interface SVGKSourceString : SVGKSource

@property (nonatomic, retain) NSString* rawString;

+ (SVGKSource*)sourceFromContentsOfString:(NSString*)rawString;

@end


text:
using System;
using System.Linq;
using Mono.Cecil;
using Mono.Cecil.Cil;

public class IlGeneratedByDependencyReader
{
    TypeNode node;
    Func<MethodReference, MethodDefinition, bool> methodComparer;
    Func<FieldReference, FieldDefinition, bool> fieldComparer;

    public IlGeneratedByDependencyReader(TypeNode node)
    {
        this.node = node;
    }

    public void Process()
    {
        if (node.TypeDefinition.HasGenericParameters)
        {
            methodComparer = GenericMethodComparer;
            fieldComparer = GenericFieldComparer;
        }
        else
        {
            methodComparer = NonGenericMethodComparer;
            fieldComparer = NonGenericFieldComparer;
        }
        foreach (var property in node.TypeDefinition.Properties)
        {
            if (!property.CustomAttributes.ContainsAttribute("PropertyChanged.DoNotNotifyAttribute"))
            {
                ProcessGet(property);
            }
        }
    }

    static bool GenericMethodComparer(MethodReference methodReference, MethodDefinition methodDefinition)
    {
        return methodDefinition == methodReference.Resolve();
    }
    static bool NonGenericMethodComparer(MethodReference methodReference, MethodDefinition methodDefinition)
    {
        return methodDefinition == methodReference;
    }
    static bool GenericFieldComparer(FieldReference fieldReference, FieldDefinition fieldDefinition)
    {
        return fieldDefinition == fieldReference.Resolve();
    }
    static bool NonGenericFieldComparer(FieldReference fieldReference, FieldDefinition fieldDefinition)
    {
        return fieldDefinition == fieldReference;
    }
    void ProcessGet(PropertyDefinition property)
    {
        var getMethod = property.GetMethod;

        //Exclude when no get
        if (getMethod == null)
        {
            return;
        }
        //Exclude when abstract
        if (getMethod.IsAbstract)
        {
            return;
        }
        var recursiveIlFinder = new RecursiveIlFinder(property.DeclaringType);
        recursiveIlFinder.Execute(getMethod);
        foreach (var instruction in recursiveIlFinder.Instructions)
        {
            ProcessInstructionForGet(property, instruction);
        }
    }

    void ProcessInstructionForGet(PropertyDefinition property, Instruction instruction)
    {
        PropertyDefinition usedProperty;
        if (IsPropertyGetInstruction(instruction, out usedProperty) || IsFieldGetInstruction(instruction, out usedProperty))
        {
            if (usedProperty == property)
            {
                //skip where self reference
                return;
            }
            var dependency = new PropertyDependency
                                 {
                                     ShouldAlsoNotifyFor = property,
                                     WhenPropertyIsSet = usedProperty
                                 };
            node.PropertyDependencies.Add(dependency);
        }
    }

    public bool IsPropertyGetInstruction(Instruction instruction, out PropertyDefinition propertyDefinition)
    {
        if (instruction.OpCode.IsCall())
        {
            var methodReference = instruction.Operand as MethodReference;
            if (methodReference != null)
            {
                var mapping = node.Mappings.FirstOrDefault(x => methodComparer(methodReference, x.PropertyDefinition.GetMethod));
                if (mapping != null)
                {
                    propertyDefinition = mapping.PropertyDefinition;
                    return true;
                }
            }
        }
        propertyDefinition = null;
        return false;
    }

    public bool IsFieldGetInstruction(Instruction instruction, out PropertyDefinition propertyDefinition)
    {
        if (instruction.OpCode.Code == Code.Ldfld)
        {
            var fieldReference = instruction.Operand as FieldReference;
            if (fieldReference != null)
            {
                var mapping = node.Mappings.FirstOrDefault(x => fieldComparer(fieldReference, x.FieldDefinition));
                if (mapping != null)
                {
                    propertyDefinition = mapping.PropertyDefinition;
                    return true;
                }
            }
        }
        propertyDefinition = null;
        return false;
    }

}


text:
package org.optaplanner.constraint.streams.bavet.tri;

import static org.optaplanner.constraint.streams.bavet.tri.Group0Mapping3CollectorTriNode.mergeCollectors;
import static org.optaplanner.constraint.streams.bavet.tri.Group1Mapping0CollectorTriNode.createGroupKey;

import org.optaplanner.constraint.streams.bavet.common.TupleLifecycle;
import org.optaplanner.constraint.streams.bavet.quad.QuadTuple;
import org.optaplanner.constraint.streams.bavet.quad.QuadTupleImpl;
import org.optaplanner.core.api.function.TriFunction;
import org.optaplanner.core.api.score.stream.tri.TriConstraintCollector;
import org.optaplanner.core.impl.util.Triple;

final class Group1Mapping3CollectorTriNode<OldA, OldB, OldC, A, B, C, D, ResultContainerB_, ResultContainerC_, ResultContainerD_>
        extends
        AbstractGroupTriNode<OldA, OldB, OldC, QuadTuple<A, B, C, D>, QuadTupleImpl<A, B, C, D>, A, Object, Triple<B, C, D>> {

    private final int outputStoreSize;

    public Group1Mapping3CollectorTriNode(TriFunction<OldA, OldB, OldC, A> groupKeyMapping, int groupStoreIndex,
            TriConstraintCollector<OldA, OldB, OldC, ResultContainerB_, B> collectorB,
            TriConstraintCollector<OldA, OldB, OldC, ResultContainerC_, C> collectorC,
            TriConstraintCollector<OldA, OldB, OldC, ResultContainerD_, D> collectorD,
            TupleLifecycle<QuadTuple<A, B, C, D>> nextNodesTupleLifecycle, int outputStoreSize) {
        super(groupStoreIndex, tuple -> createGroupKey(groupKeyMapping, tuple),
                mergeCollectors(collectorB, collectorC, collectorD), nextNodesTupleLifecycle);
        this.outputStoreSize = outputStoreSize;
    }

    @Override
    protected QuadTupleImpl<A, B, C, D> createOutTuple(A a) {
        return new QuadTupleImpl<>(a, null, null, null, outputStoreSize);
    }

    @Override
    protected void updateOutTupleToResult(QuadTupleImpl<A, B, C, D> outTuple, Triple<B, C, D> result) {
        outTuple.factB = result.getA();
        outTuple.factC = result.getB();
        outTuple.factD = result.getC();
    }

}


text:
// Copyright 2014 The Bazel Authors. 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.
package com.google.devtools.build.lib.runtime;

import com.google.devtools.build.lib.util.OptionsUtils;
import com.google.devtools.build.lib.vfs.PathFragment;
import com.google.devtools.common.options.Converter;
import com.google.devtools.common.options.Converters;
import com.google.devtools.common.options.Option;
import com.google.devtools.common.options.OptionsBase;
import com.google.devtools.common.options.OptionsParser.OptionUsageRestrictions;
import com.google.devtools.common.options.OptionsParsingException;
import java.util.List;
import java.util.Map;
import java.util.logging.Level;

/**
 * Options common to all commands.
 */
public class CommonCommandOptions extends OptionsBase {
  /**
   * A class representing a blazerc option. blazeRc is serial number of the rc
   * file this option came from, option is the name of the option and value is
   * its value (or null if not specified).
   */
  public static class OptionOverride {
    final int blazeRc;
    final String command;
    final String option;

    public OptionOverride(int blazeRc, String command, String option) {
      this.blazeRc = blazeRc;
      this.command = command;
      this.option = option;
    }

    @Override
    public String toString() {
      return String.format("%d:%s=%s", blazeRc, command, option);
    }
  }

  /**
   * Converter for --default_override. The format is:
   * --default_override=blazerc:command=option.
   */
  public static class OptionOverrideConverter implements Converter<OptionOverride> {
    static final String ERROR_MESSAGE = "option overrides must be in form "
      + " rcfile:command=option, where rcfile is a nonzero integer";

    public OptionOverrideConverter() {}

    @Override
    public OptionOverride convert(String input) throws OptionsParsingException {
      int colonPos = input.indexOf(':');
      int assignmentPos = input.indexOf('=');

      if (colonPos < 0) {
        throw new OptionsParsingException(ERROR_MESSAGE);
      }

      if (assignmentPos <= colonPos + 1) {
        throw new OptionsParsingException(ERROR_MESSAGE);
      }

      int blazeRc;
      try {
        blazeRc = Integer.valueOf(input.substring(0, colonPos));
      } catch (NumberFormatException e) {
        throw new OptionsParsingException(ERROR_MESSAGE);
      }

      if (blazeRc < 0) {
        throw new OptionsParsingException(ERROR_MESSAGE);
      }

      String command = input.substring(colonPos + 1, assignmentPos);
      String option = input.substring(assignmentPos + 1);

      return new OptionOverride(blazeRc, command, option);
    }

    @Override
    public String getTypeDescription() {
      return "blazerc option override";
    }
  }

  // To create a new incompatible change, see the javadoc for AllIncompatibleChangesExpansion.
  @Option(
    name = "all_incompatible_changes",
    defaultValue = "null",
    category = "misc",
    expansionFunction = AllIncompatibleChangesExpansion.class,
    help =
        "Enables all options of the form --incompatible_*. Use this option to find places where "
            + "your build may break in the future due to deprecations or other changes."
  )
  public Void allIncompatibleChanges;

  @Option(
    name = "config",
    defaultValue = "",
    category = "misc",
    allowMultiple = true,
    help =
        "Selects additional config sections from the rc files; for every <command>, it "
            + "also pulls in the options from <command>:<config> if such a section exists; "
            + "if the section does not exist, this flag is ignored. "
            + "Note that it is currently only possible to provide these options on the "
            + "command line, not in the rc files. The config sections and flag combinations "
            + "they are equivalent to are located in the tools/*.blazerc config files."
  )
  public List<String> configs;

  @Option(
    name = "logging",
    defaultValue = "3", // Level.INFO
    category = "verbosity",
    converter = Converters.LogLevelConverter.class,
    help = "The logging level."
  )
  public Level verbosity;

  @Option(
    name = "client_env",
    defaultValue = "",
    optionUsageRestrictions = OptionUsageRestrictions.HIDDEN,
    converter = Converters.AssignmentConverter.class,
    allowMultiple = true,
    help = "A system-generated parameter which specifies the client's environment"
  )
  public List<Map.Entry<String, String>> clientEnv;

  @Option(
    name = "ignore_client_env",
    defaultValue = "false",
    optionUsageRestrictions = OptionUsageRestrictions.HIDDEN,
    deprecationWarning = "Deprecated, no-op.",
    help = "Deprecated, no-op."
  )
  // TODO(laszlocsomor, dslomov) 2017-03-07: remove this flag after 2017-06-01 (~3 months from now)
  // and all of its occurrences.
  public boolean ignoreClientEnv;

  @Option(
    name = "client_cwd",
    defaultValue = "",
    optionUsageRestrictions = OptionUsageRestrictions.HIDDEN,
    converter = OptionsUtils.PathFragmentConverter.class,
    help = "A system-generated parameter which specifies the client's working directory"
  )
  public PathFragment clientCwd;

  @Option(
    name = "announce_rc",
    defaultValue = "false",
    category = "verbosity",
    help = "Whether to announce rc options."
  )
  public boolean announceRcOptions;

  /**
   * These are the actual default overrides. Each value is a pair of (command name, value).
   *
   * <p>For example: "--default_override=build=--cpu=piii"
   */
  @Option(
    name = "default_override",
    defaultValue = "",
    allowMultiple = true,
    optionUsageRestrictions = OptionUsageRestrictions.HIDDEN,
    converter = OptionOverrideConverter.class,
    help = ""
  )
  public List<OptionOverride> optionsOverrides;

  /** This is the filename that the Blaze client parsed. */
  @Option(
    name = "rc_source",
    defaultValue = "",
    allowMultiple = true,
    optionUsageRestrictions = OptionUsageRestrictions.HIDDEN,
    help = ""
  )
  public List<String> rcSource;

  @Option(
    name = "always_profile_slow_operations",
    defaultValue = "true",
    optionUsageRestrictions = OptionUsageRestrictions.UNDOCUMENTED,
    help = "Whether profiling slow operations is always turned on"
  )
  public boolean alwaysProfileSlowOperations;

  @Option(
    name = "profile",
    defaultValue = "null",
    category = "misc",
    converter = OptionsUtils.PathFragmentConverter.class,
    help =
        "If set, profile Blaze and write data to the specified "
            + "file. Use blaze analyze-profile to analyze the profile."
  )
  public PathFragment profilePath;

  @Option(
    name = "record_full_profiler_data",
    defaultValue = "false",
    optionUsageRestrictions = OptionUsageRestrictions.UNDOCUMENTED,
    help =
        "By default, Blaze profiler will record only aggregated data for fast but numerous "
            + "events (such as statting the file). If this option is enabled, profiler will record "
            + "each event - resulting in more precise profiling data but LARGE performance "
            + "hit. Option only has effect if --profile used as well."
  )
  public boolean recordFullProfilerData;

  @Option(
    name = "memory_profile",
    defaultValue = "null",
    optionUsageRestrictions = OptionUsageRestrictions.UNDOCUMENTED,
    converter = OptionsUtils.PathFragmentConverter.class,
    help = "If set, write memory usage data to the specified " + "file at phase ends."
  )
  public PathFragment memoryProfilePath;

  @Option(
    name = "gc_watchdog",
    defaultValue = "false",
    optionUsageRestrictions = OptionUsageRestrictions.UNDOCUMENTED,
    deprecationWarning = "Ignoring: this option is no longer supported",
    help = "Deprecated."
  )
  public boolean gcWatchdog;

  @Option(
    name = "startup_time",
    defaultValue = "0",
    optionUsageRestrictions = OptionUsageRestrictions.HIDDEN,
    help = "The time in ms the launcher spends before sending the request to the blaze server."
  )
  public long startupTime;

  @Option(
    name = "extract_data_time",
    defaultValue = "0",
    optionUsageRestrictions = OptionUsageRestrictions.HIDDEN,
    help = "The time in ms spent on extracting the new blaze version."
  )
  public long extractDataTime;

  @Option(
    name = "command_wait_time",
    defaultValue = "0",
    optionUsageRestrictions = OptionUsageRestrictions.HIDDEN,
    help = "The time in ms a command had to wait on a busy Blaze server process."
  )
  public long waitTime;

  @Option(
    name = "tool_tag",
    defaultValue = "",
    category = "misc",
    help = "A tool name to attribute this Blaze invocation to."
  )
  public String toolTag;

  @Option(
    name = "restart_reason",
    defaultValue = "no_restart",
    optionUsageRestrictions = OptionUsageRestrictions.HIDDEN,
    help = "The reason for the server restart."
  )
  public String restartReason;

  @Option(
    name = "binary_path",
    defaultValue = "",
    optionUsageRestrictions = OptionUsageRestrictions.HIDDEN,
    help = "The absolute path of the blaze binary."
  )
  public String binaryPath;

  @Option(
    name = "experimental_allow_project_files",
    defaultValue = "false",
    optionUsageRestrictions = OptionUsageRestrictions.HIDDEN,
    help = "Enable processing of +<file> parameters."
  )
  public boolean allowProjectFiles;

  @Option(
    name = "block_for_lock",
    defaultValue = "true",
    optionUsageRestrictions = OptionUsageRestrictions.HIDDEN,
    help =
        "If set (the default), a command will block if there is another one running. If "
            + "unset, these commands will immediately return with an error."
  )
  public boolean blockForLock;

}


text:
package sg.ncl.service.analytics.data.jpa;

import org.springframework.data.jpa.repository.JpaRepository;

import java.util.List;

public interface ProjectDetailsRepository extends JpaRepository<ProjectDetailsEntity, Long> {

    List<ProjectDetailsEntity> findByProjectName(String projectName);
}


text:
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://maven.apache.org/POM/4.0.0" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">

  <modelVersion>4.0.0</modelVersion>

  <parent>
    <groupId>org.openhab.binding</groupId>
    <artifactId>pom</artifactId>
    <version>2.0.0-SNAPSHOT</version>
  </parent>

  <groupId>org.openhab.binding</groupId>
  <artifactId>org.openhab.binding.gumyns</artifactId>
  <version>2.0.0-SNAPSHOT</version>

  <name>Gumyns Binding</name>
  <packaging>eclipse-plugin</packaging>

</project>


text:
A web application that:

- Pushes personally relevant information on infrastructure, city planning and real estate developments

- Provides a channel for direct feedback to appropriate stakeholders

### [Our Webiste](http://inmybackyard.phpfogapp.com)


text:
/**
 * A store for sequences.
 *
 * This is used to store and retrieve reference data.
 *
 * @flow
 */
'use strict';

import type Interval from './Interval';
import type ContigInterval from './ContigInterval';

import _ from 'underscore';

import {altContigName} from './utils';

// Store sequences of this many base pairs together in a single string.
const CHUNK_SIZE = 1000;

type SeqMap = {[key: number]: string};
type ChunkWithOffset = {
  chunkStart: number;
  offset: number;
  length: number;
};

// This class stores sequences efficiently.
class SequenceStore {
  // contig --> start of chunk --> sequence of chunk
  contigMap: {[key: string]: SeqMap};

  constructor() {
    this.contigMap = {};
  }

  /**
   * Set a range of the genome to the particular sequence.
   * This overwrites any existing data.
   */
  setRange(range: ContigInterval<string>, sequence: string) {
    if (range.length() === 0) return;
    if (range.length() != sequence.length) {
      throw 'setRange length mismatch';
    }

    var seqs = this._getSequences(range.contig);
    if (!seqs) {
      seqs = this.contigMap[range.contig] = {};
    }

    for (var chunk of this._chunkForInterval(range.interval)) {
      var pos = chunk.chunkStart + chunk.offset - range.start();
      this._setChunk(seqs, chunk, sequence.slice(pos, pos + chunk.length));
    }
  }

  /**
   * Retrieve a range of sequence data.
   * If any portions are unknown, they will be set to '.'.
   */
  getAsString(range: ContigInterval<string>): string {
    const seqs = this._getSequences(range.contig);
    if (!seqs) {
      return '.'.repeat(range.length());
    }

    var chunks = this._chunkForInterval(range.interval);
    var result = '';
    for (var chunk of chunks) {
      var seq = seqs[chunk.chunkStart];
      if (!seq) {
        result += '.'.repeat(chunk.length);
      } else if (chunk.offset === 0 && chunk.length == seq.length) {
        result += seq;
      } else {
        result += seq.slice(chunk.offset, chunk.offset + chunk.length);
      }
    }
    return result;
  }

  /**
   * Like getAsString(), but returns a less efficient object representation:
   * {'chr1:10': 'A', 'chr1:11': 'C', ...}
   */
  getAsObjects(range: ContigInterval<string>): {[key:string]: ?string} {
    return _.object(_.map(this.getAsString(range),
                          (base, i) => [range.contig + ':' + (range.start() + i),
                                        base == '.' ? null : base]));
  }

  // Retrieve a chunk from the sequence map.
  _getChunk(seqs: SeqMap, start: number): string {
    return seqs[start] || '.'.repeat(CHUNK_SIZE);
  }

  // Split an interval into chunks which align with the store.
  _chunkForInterval(range: Interval): ChunkWithOffset[] {
    var offset = range.start % CHUNK_SIZE,
        chunkStart = range.start - offset;
    var chunks = [{
      chunkStart,
      offset,
      length: Math.min(CHUNK_SIZE - offset, range.length())
    }];
    chunkStart += CHUNK_SIZE;
    for (; chunkStart <= range.stop; chunkStart += CHUNK_SIZE) {
      chunks.push({
        chunkStart,
        offset: 0,
        length: Math.min(CHUNK_SIZE, range.stop - chunkStart + 1)
      });
    }
    return chunks;
  }

  // Set a (subset of a) chunk to the given sequence.
  _setChunk(seqs: SeqMap, chunk: ChunkWithOffset, sequence: string) {
    // First: the easy case. Total replacement.
    if (chunk.offset === 0 && sequence.length == CHUNK_SIZE) {
      seqs[chunk.chunkStart] = sequence;
      return;
    }

    // We need to merge the new sequence with the old.
    var oldChunk = this._getChunk(seqs, chunk.chunkStart);
    seqs[chunk.chunkStart] = oldChunk.slice(0, chunk.offset) +
                       sequence +
                       oldChunk.slice(chunk.offset + sequence.length);
  }

  // Get the sequences for a contig, allowing chr- mismatches.
  _getSequences(contig: string): ?SeqMap {
    return this.contigMap[contig] ||
           this.contigMap[altContigName(contig)] ||
           null;
  }
}

module.exports = SequenceStore;


text:
using System.Web.Mvc;

namespace Cinotam.AbpModuleZero.Web.Areas.SysAdmin
{
    public class SysAdminAreaRegistration : AreaRegistration
    {
        public override string AreaName
        {
            get
            {
                return "SysAdmin";
            }
        }

        public override void RegisterArea(AreaRegistrationContext context)
        {
            context.MapRoute(
                "SysAdmin_default",
                "SysAdmin/{controller}/{action}/{id}",
                new { action = "Index", id = UrlParameter.Optional }, new[] { "Cinotam.AbpModuleZero.Web.Areas.SysAdmin.Controllers" }
            );
        }
    }
}


text:
package org.pepstock.charba.client.utils.toast;

import org.pepstock.charba.client.commons.Checker;
import org.pepstock.charba.client.commons.Key;
import org.pepstock.charba.client.utils.RegExp;
import org.pepstock.charba.client.utils.RegExpResult;
import org.pepstock.charba.client.utils.Utilities;

/**
 * Checks if the name passed to create {@link IsToastType} or {@link IsProgressBarType} must be acceptable.
 *
 * @author Andrea "Stock" Stocchero
 *
 */
final class NameChecker {

	// regexp pattern to have a correct CSS tag
	private static final String REGEXP_NAME_PATTERN = "[a-zA-Z]+[_a-zA-Z0-9-]*";
	// Regular expression to check if a string can be used as CSS tag
	private static final RegExp REGEXP_NAME = new RegExp(REGEXP_NAME_PATTERN);
	// exception template instance
	private static final String EXCEPTION_TEMPLATE = "Unable to create a custom toast object because the name '{0}' is invalid";

	/**
	 * To avoid any instantiation
	 */
	private NameChecker() {
		// do nothing
	}

	/**
	 * Checks if the name passed as argument is consistent to be a toast object.
	 *
	 * @param name the name to be checked if consistent to be a toast object
	 */
	static void checkName(Key name) {
		// check if key is consistent
		Key.checkIfValid(name);
		final String exception = Utilities.applyTemplate(EXCEPTION_TEMPLATE, name.value());
		// checks name by regexp
		RegExpResult result = REGEXP_NAME.exec(name.value());
		Checker.assertCheck(result.length() == 1, exception);
		Checker.assertCheck(name.value().equals(result.get(0)), exception);
	}

}


text:
import rospy
from std_msgs.msg import String
from std_msgs.msg import Float32MultiArray

class CreateSpeech:

    def __init__(self):

        # init node
        rospy.init_node('create_speech')

        # Publisher
        self.pub = rospy.Publisher('speech', String, queue_size=1)

        # Subscriber
        rospy.Subscriber('objects', Float32MultiArray, self.callback)

    def callback(self, msg):

        if len(msg.data):
            rospy.loginfo('object found.')
        else:
            rospy.loginfo('object NOT found.')

def main():

    speech = CreateSpeech()

    # loop rate [Hz]
    r = rospy.Rate(0.3)

    while not rospy.is_shutdown():
        r.sleep()

if __name__ == '__main__':
    try:
        main()
    except rospy.ROSInterruptException:
        pass


text:
NSString *kCAGradientLayerRadial=@"kCAGradientLayerRadial";

@implementation CAGradientLayer (Radial)

- (void)drawInContext:(CGContextRef)ctx
{
    [super drawInContext:ctx];
    if ([self.type isEqualToString:kCAGradientLayerRadial])
    {
        size_t count = self.locations.count;
        CGColorSpaceRef colorSpace = NULL;
        if (self.colors.count>0)
        {
            CGColorRef colorRef = (__bridge CGColorRef)self.colors.firstObject;
            colorSpace = CGColorGetColorSpace(colorRef);
            CGFloat locs[count];
            for (int i = 0; i < count; ++i)
            {
                locs[i] = [self.locations[i] floatValue];
            }
            CGGradientRef gradient = CGGradientCreateWithColors(colorSpace, (__bridge CFArrayRef) self.colors, locs);
            CGContextSetAlpha(ctx, self.opacity);
            CGContextDrawRadialGradient(ctx, gradient, self.startPoint, [[self valueForKey:@"startRadius"] floatValue], self.endPoint, [[self valueForKey:@"endRadius"] floatValue], kCGGradientDrawsAfterEndLocation);
            CGGradientRelease(gradient);

        }
    }else if (!CGRectIsEmpty(self.bounds))
    {
        [super drawInContext:ctx];
    }
}

@end


text:
<?php

namespace CountLang\Tests\Integration;

use CountLang\Tests\BaseTestCase;

/**
 * Basic class for integration tests.
 *
 * @author    Andrii Bibena <countlang@gmail.com>
 * @copyright 2017 Andrii Bibena <countlang@gmail.com>
 * @license   http://www.opensource.org/licenses/mit-license.php MIT
 *
 * @package   countlang/Tests
 * @link      http://github.com/countlang/countlang
 */
abstract class IntegrationTestCase extends BaseTestCase
{

}


text:
using namespace triagens::wal;

// -----------------------------------------------------------------------------
// --SECTION--                                      constructors and destructors
// -----------------------------------------------------------------------------

////////////////////////////////////////////////////////////////////////////////
/// @brief create the logfile
////////////////////////////////////////////////////////////////////////////////

Logfile::Logfile (Logfile::IdType id,
                  TRI_datafile_t* df,
                  StatusType status)
  : _id(id),
    _users(0),
    _df(df),
    _status(status),
    _collectQueueSize(0) {
}

////////////////////////////////////////////////////////////////////////////////
/// @brief destroy the logfile
////////////////////////////////////////////////////////////////////////////////

Logfile::~Logfile () {
  if (_df != nullptr) {
    TRI_CloseDatafile(_df);
    TRI_FreeDatafile(_df);
  }
}

// -----------------------------------------------------------------------------
// --SECTION--                                             public static methods
// -----------------------------------------------------------------------------

////////////////////////////////////////////////////////////////////////////////
/// @brief create a new logfile
////////////////////////////////////////////////////////////////////////////////

Logfile* Logfile::createNew (std::string const& filename,
                             Logfile::IdType id,
                             uint32_t size) {
  TRI_datafile_t* df = TRI_CreateDatafile(filename.c_str(), id, static_cast<TRI_voc_size_t>(size), false);

  if (df == nullptr) {
    int res = TRI_errno();

    if (res != TRI_ERROR_NO_ERROR) {
      LOG_ERROR("unable to create logfile '%s': %s",
                filename.c_str(),
                TRI_errno_string(res));
      return nullptr;
    }
  }

  return new Logfile(id, df, StatusType::EMPTY);
}

////////////////////////////////////////////////////////////////////////////////
/// @brief open an existing logfile
////////////////////////////////////////////////////////////////////////////////

Logfile* Logfile::openExisting (std::string const& filename,
                                Logfile::IdType id,
                                bool wasCollected,
                                bool ignoreErrors) {
  TRI_datafile_t* df = TRI_OpenDatafile(filename.c_str(), ignoreErrors);

  if (df == nullptr) {
    int res = TRI_errno();

    if (res != TRI_ERROR_NO_ERROR) {
      LOG_ERROR("unable to open logfile '%s': %s",
                filename.c_str(),
                TRI_errno_string(res));
      return nullptr;
    }

    // cannot figure out the type of error
    LOG_ERROR("unable to open logfile '%s'",
              filename.c_str());
    return nullptr;
  }

  StatusType status = StatusType::OPEN;

  if (df->_isSealed) {
    status = StatusType::SEALED;
  }

  if (wasCollected) {
    // the logfile was already collected
    status = StatusType::COLLECTED;
  }

  Logfile* logfile = new Logfile(id, df, status);
  return logfile;
}

////////////////////////////////////////////////////////////////////////////////
/// @brief whether or not a logfile is empty
////////////////////////////////////////////////////////////////////////////////

int Logfile::judge (std::string const& filename) {
  off_t filesize = basics::FileUtils::size(filename);

  if (filesize == 0) {
    // empty logfile
    return TRI_ERROR_ARANGO_DATAFILE_EMPTY;
  }

  if (filesize < static_cast<off_t>(256 * sizeof(uint64_t))) {
    // too small
    return TRI_ERROR_ARANGO_DATAFILE_UNREADABLE;
  }

  int fd = TRI_OPEN(filename.c_str(), O_RDWR | TRI_O_CLOEXEC);

  if (fd < 0) {
    return TRI_ERROR_ARANGO_DATAFILE_UNREADABLE;
  }

  uint64_t buffer[256];

  if (! TRI_ReadPointer(fd, &buffer, 256 * sizeof(uint64_t))) {
    TRI_CLOSE(fd);
    return TRI_ERROR_ARANGO_DATAFILE_UNREADABLE;
  }

  uint64_t* ptr = buffer;
  uint64_t* end = buffer + 256;

  while (ptr < end) {
    if (*ptr != 0) {
      TRI_CLOSE(fd);
      return TRI_ERROR_NO_ERROR;
    }
    ++ptr;
  }

  TRI_CLOSE(fd);
  return TRI_ERROR_ARANGO_DATAFILE_EMPTY;
}

// -----------------------------------------------------------------------------
// --SECTION--                                                    public methods
// -----------------------------------------------------------------------------

////////////////////////////////////////////////////////////////////////////////
/// @brief reserve space and update the current write position
////////////////////////////////////////////////////////////////////////////////

char* Logfile::reserve (size_t size) {
  size = TRI_DF_ALIGN_BLOCK(size);

  char* result = _df->_next;

  _df->_next += size;
  _df->_currentSize += (TRI_voc_size_t) size;

  return result;
}

////////////////////////////////////////////////////////////////////////////////
/// @brief create a header marker
////////////////////////////////////////////////////////////////////////////////

TRI_df_header_marker_t Logfile::getHeaderMarker () const {
  TRI_df_header_marker_t header;
  size_t const size = sizeof(TRI_df_header_marker_t);
  TRI_InitMarkerDatafile((char*) &header, TRI_DF_MARKER_HEADER, size);

  header._version     = TRI_DF_VERSION;
  header._maximalSize = static_cast<TRI_voc_size_t>(allocatedSize());
  header._fid         = static_cast<TRI_voc_fid_t>(_id);

  return header;
}

////////////////////////////////////////////////////////////////////////////////
/// @brief create a footer marker
////////////////////////////////////////////////////////////////////////////////

TRI_df_footer_marker_t Logfile::getFooterMarker () const {
  TRI_df_footer_marker_t footer;
  size_t const size = sizeof(TRI_df_footer_marker_t);
  TRI_InitMarkerDatafile((char*) &footer, TRI_DF_MARKER_FOOTER, size);

  return footer;
}

// -----------------------------------------------------------------------------
// --SECTION--                                                       END-OF-FILE
// -----------------------------------------------------------------------------

// Local Variables:
// mode: outline-minor
// outline-regexp: "/// @brief\\|/// {@inheritDoc}\\|/// @page\\|// --SECTION--\\|/// @\\}"
// End:


text:
"use strict";
var webpack = require('webpack');
var WebpackDevServer = require('webpack-dev-server');
var config = require('../_config/dashboard.webpack');
var port = config.serverConfig.port;
var env = config.serverConfig.env;
var messages = {
  hot: 'Hot-reloading development server listening at localhost:' + port,
  dev: 'Development server listening at localhost:' + port
}
// Webpack-dev-server
new WebpackDevServer(webpack(config), config.serverConfig)
.listen(port, 'localhost', function (err, result) {
  if (err) {
    console.log(err);
  }
  if (env.hot) console.log(messages.hot);
  if (env.dev) console.log(messages.dev);
});


text:
require 'grooveshark'
require 'thread'
require 'active_support/all'

class PIGSTuner
  def initialize
    init_grooveshark
    @read_io, @write_io = IO.pipe
    @child = nil
    @mutex = Mutex.new
  end

  def init_grooveshark
    puts "Initializing new Grooveshark session"
    @expiration_date = Time.now + (24*60*60)
    @grooveshark_client = Grooveshark::Client.new
    @grooveshark_session = @grooveshark_client.session
  end

  def session_expired?
    return Time.now > @expiration_date
  end

  # Asks Grooveshark for a song url and plays it
  # Returns JSON encoded success message
  def play_song_with_id(id)
    # Check if we need a new Grooveshark session
    if session_expired?
      init_grooveshark
    end

    begin
      @mutex.synchronize do
        unless @child.nil? then
          execute_tuner_command("stop")
        end
        while !@child.nil? do
          sleep 1
        end
        url = @grooveshark_client.get_song_url_by_id(id)
        @child = fork do
          STDIN.reopen(@read_io)
          `mplayer -really-quiet "#{url}"`
          exit
        end
        Thread.new {
          Process.waitpid(@child)
          @child = nil
        }
      end
    rescue Exception
      return {"success" => false}.to_json
    end
    return {"success" => true}.to_json
  end

  # Search for a Grooveshark track
  # Returns a JSON array of the results, or nil
  def search(query)
    # Check if we need a new Grooveshark session
    if session_expired?
      init_grooveshark
    end
    query.strip!

    songs = []
    begin
      songs = @grooveshark_client.search_songs(query)
    rescue Exception
    end

    unless songs.length == 0
      return songs.to_json
    else
      return nil
    end
  end

  # Searches Grooveshark and plays the first result
  # Returns JSON object of song playing, or nil
  def im_feeling_lucky(query)
    # Check if we need a new Grooveshark session
    if session_expired?
      init_grooveshark
    end
    query.strip!

    # Ask Grooveshark for a song
    songs = []
    begin
      songs = @grooveshark_client.search_songs(query)
    rescue Exception
    end
    song = songs.first

    # If we got a song, play it
    unless song.nil?
      play_song_with_id(song.id)
      return song.to_json
    else
      return nil
    end
  end

  # Playback controls
  # Returns JSON encoded success message
  def execute_tuner_command(command)
    commands = {
      "pause_unpause" => " ",
      "stop" => "q",
      "volume_up" => "0",
      "volume_down" => "9"
    }
    if commands.has_key?(command)
      @write_io.write "#{commands[command]}"
      return {"success" => true}.to_json
    else
      return {"success" => false}.to_json
    end
  end
end


text:
(function() {

  $().ready(function() {
    return $.getJSON('/stats.json', {}, function(data) {
      var graph, legend, offsetForm, palette, x_axis, y_axis;
      palette = new Rickshaw.Color.Palette();
      graph = new Rickshaw.Graph({
        element: document.querySelector("#chart"),
        width: 800,
        height: 400,
        renderer: 'line',
        series: data.map(function(e) {
          e.color = palette.color();
          return e;
        })
      });
      x_axis = new Rickshaw.Graph.Axis.Time({
        graph: graph
      });
      y_axis = new Rickshaw.Graph.Axis.Y({
        graph: graph,
        orientation: 'left',
        tickFormat: Rickshaw.Fixtures.Number.formatKMBT,
        element: document.getElementById('y_axis')
      });
      legend = new Rickshaw.Graph.Legend({
        element: document.querySelector('#legend'),
        graph: graph
      });
      offsetForm = document.getElementById('offset_form');
      offsetForm.addEventListener('change', (function(e) {
        var offsetMode;
        offsetMode = e.target.value;
        if (offsetMode === 'lines') {
          graph.setRenderer('line');
          graph.offset = 'zero';
        } else {
          graph.setRenderer('stack');
          graph.offset = offsetMode;
        }
        return graph.render();
      }), false);
      return graph.render();
    });
  });

}).call(this);


text:
.. _webapiguide:

=============
Web API Guide
=============

REST API 2.0
============

This is the modern API first made available in Review Board 1.5.

.. toctree::
   :maxdepth: 2

   2.0/overview
   2.0/authenticating
   2.0/resources/resource-tree
   2.0/resources/index
   2.0/errors/index
   2.0/glossary

REST API 1.0 (deprecated)
=========================

This version of the API was first used in Review Board 1.0. It exists
in 1.5 but has been removed in 1.6. All programs should be updated to
use the new API.

Documentation for the old API is `still available
<http://www.reviewboard.org/docs/manual/1.5/webapi/1.0/>`_.

.. comment: Some hidden toctrees for building the structure properly.

.. toctree::
   :hidden:

   2.0/index


text:
#ifndef _PageTest_H
#define _PageTest_H

#include "TestCase.h"
#include "Context.h"

class PageTest : public testframework::TestCase
{
public:
	//--- constructors

	//!TestCase constructor
	//! \param name name of the test
	PageTest(TString tstrName);

	//!destroys the test case
	~PageTest();

	//--- public api

	//!builds up a suite of testcases for this test
	static Test *suite ();

	//!sets the environment for this test
	void setUp ();

	//!describe this testcase
	void FinishTest();
	//!describe this testcase
	void PrepareTest();

protected:
	Anything fActionConfig;
	Context fCtx;
};

#endif


text:
class ThreeDAPIObserver : public content::GpuDataManagerObserver {
 public:
  ThreeDAPIObserver();
  virtual ~ThreeDAPIObserver();

 private:
  virtual void DidBlock3DAPIs(const GURL& url,
                              int render_process_id,
                              int render_view_id,
                              content::ThreeDAPIType requester) OVERRIDE;

  DISALLOW_COPY_AND_ASSIGN(ThreeDAPIObserver);
};

#endif  // CHROME_BROWSER_THREE_D_API_OBSERVER_H_


text:
var Class = require('../../utils/Class');
var Components = require('./components');
var Image = require('../../gameobjects/image/Image');

var ImpactImage = new Class({

    Extends: Image,

    Mixins: [
        Components.Acceleration,
        Components.BodyScale,
        Components.BodyType,
        Components.Bounce,
        Components.CheckAgainst,
        Components.Collides,
        Components.Debug,
        Components.Friction,
        Components.Gravity,
        Components.Offset,
        Components.SetGameObject,
        Components.Velocity
    ],

    initialize:

    //  x/y is the center of the Image / Body, just like other default Game Objects
    function ImpactImage (world, x, y, texture, frame)
    {
        Image.call(this, world.scene, x, y, texture, frame);

        this.body = world.create(x - this.frame.centerX, y - this.frame.centerY, this.width, this.height);

        this.body.parent = this;
        this.body.gameObject = this;

        //  Local references to the Body properties
        this.size = this.body.size;
        this.offset = this.body.offset;
        this.vel = this.body.vel;
        this.accel = this.body.accel;
        this.friction = this.body.friction;
        this.maxVel = this.body.maxVel;
    }

});

module.exports = ImpactImage;


text:
<?php
# Generated by the protocol buffer compiler.  DO NOT EDIT!
# source: google/longrunning/operations.proto

namespace Google\LongRunning;

use Google\Protobuf\Internal\GPBType;
use Google\Protobuf\Internal\RepeatedField;
use Google\Protobuf\Internal\GPBUtil;

/**
 * The response message for [Operations.ListOperations][google.longrunning.Operations.ListOperations].
 *
 * Generated from protobuf message google.longrunning.ListOperationsResponse
 */
class ListOperationsResponse extends \Google\Protobuf\Internal\Message
{
    /**
     * A list of operations that matches the specified filter in the request.
     *
     * Generated from protobuf field repeated .google.longrunning.Operation operations = 1;
     */
    private $operations;
    /**
     * The standard List next-page token.
     *
     * Generated from protobuf field string next_page_token = 2;
     */
    private $next_page_token = '';

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type array<\Google\LongRunning\Operation>|\Google\Protobuf\Internal\RepeatedField $operations
     *           A list of operations that matches the specified filter in the request.
     *     @type string $next_page_token
     *           The standard List next-page token.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Longrunning\Operations::initOnce();
        parent::__construct($data);
    }

    /**
     * A list of operations that matches the specified filter in the request.
     *
     * Generated from protobuf field repeated .google.longrunning.Operation operations = 1;
     * @return \Google\Protobuf\Internal\RepeatedField
     */
    public function getOperations()
    {
        return $this->operations;
    }

    /**
     * A list of operations that matches the specified filter in the request.
     *
     * Generated from protobuf field repeated .google.longrunning.Operation operations = 1;
     * @param array<\Google\LongRunning\Operation>|\Google\Protobuf\Internal\RepeatedField $var
     * @return $this
     */
    public function setOperations($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\LongRunning\Operation::class);
        $this->operations = $arr;

        return $this;
    }

    /**
     * The standard List next-page token.
     *
     * Generated from protobuf field string next_page_token = 2;
     * @return string
     */
    public function getNextPageToken()
    {
        return $this->next_page_token;
    }

    /**
     * The standard List next-page token.
     *
     * Generated from protobuf field string next_page_token = 2;
     * @param string $var
     * @return $this
     */
    public function setNextPageToken($var)
    {
        GPBUtil::checkString($var, True);
        $this->next_page_token = $var;

        return $this;
    }

}


text:
/**
 * Created by Luis Montero on 7/12/2016.
 */
(function () {
  'use strict';
  angular
    .module('person')
    .factory('personRestService', personRestService);

  personRestService.$inject = [
    '$resource',
    'BASE_URL'
  ];

  function personRestService($resource, BASE_URL) {
    var url = BASE_URL + '/people';

    function getAllPeople() {
      var peopleResource = $resource(url, {}, {
        get: {
          method: 'GET',
          headers: { 'Content-Type': 'application/json' },
          data: null
        }
      });

      return peopleResource.get().$promise;
    }

    function postPerson(person) {
      var peopleResource = $resource(url, {}, {
        post: {
          method: 'POST',
          headers: { 'Content-Type': 'application/json' }
        }
      });

      return peopleResource.post(person).$promise;
    }

    return {
      getList: getAllPeople,
      post: postPerson
    };
  }
})();


text:
#pragma once
#include <aws/cognito-identity/CognitoIdentity_EXPORTS.h>
#include <aws/cognito-identity/CognitoIdentityRequest.h>
#include <aws/core/utils/memory/stl/AWSString.h>
#include <aws/core/utils/memory/stl/AWSMap.h>

namespace Aws
{
namespace CognitoIdentity
{
namespace Model
{

  /**
   * Input to the GetId action.
   */
  class AWS_COGNITOIDENTITY_API GetIdRequest : public CognitoIdentityRequest
  {
  public:
    GetIdRequest();
    Aws::String SerializePayload() const override;

    Aws::Http::HeaderValueCollection GetRequestSpecificHeaders() const override;

    /**
     * A standard AWS account ID (9+ digits).
     */
    inline const Aws::String& GetAccountId() const{ return m_accountId; }

    /**
     * A standard AWS account ID (9+ digits).
     */
    inline void SetAccountId(const Aws::String& value) { m_accountIdHasBeenSet = true; m_accountId = value; }

    /**
     * A standard AWS account ID (9+ digits).
     */
    inline void SetAccountId(Aws::String&& value) { m_accountIdHasBeenSet = true; m_accountId = value; }

    /**
     * A standard AWS account ID (9+ digits).
     */
    inline void SetAccountId(const char* value) { m_accountIdHasBeenSet = true; m_accountId.assign(value); }

    /**
     * A standard AWS account ID (9+ digits).
     */
    inline GetIdRequest& WithAccountId(const Aws::String& value) { SetAccountId(value); return *this;}

    /**
     * A standard AWS account ID (9+ digits).
     */
    inline GetIdRequest& WithAccountId(Aws::String&& value) { SetAccountId(value); return *this;}

    /**
     * A standard AWS account ID (9+ digits).
     */
    inline GetIdRequest& WithAccountId(const char* value) { SetAccountId(value); return *this;}

    /**
     * An identity pool ID in the format REGION:GUID.
     */
    inline const Aws::String& GetIdentityPoolId() const{ return m_identityPoolId; }

    /**
     * An identity pool ID in the format REGION:GUID.
     */
    inline void SetIdentityPoolId(const Aws::String& value) { m_identityPoolIdHasBeenSet = true; m_identityPoolId = value; }

    /**
     * An identity pool ID in the format REGION:GUID.
     */
    inline void SetIdentityPoolId(Aws::String&& value) { m_identityPoolIdHasBeenSet = true; m_identityPoolId = value; }

    /**
     * An identity pool ID in the format REGION:GUID.
     */
    inline void SetIdentityPoolId(const char* value) { m_identityPoolIdHasBeenSet = true; m_identityPoolId.assign(value); }

    /**
     * An identity pool ID in the format REGION:GUID.
     */
    inline GetIdRequest& WithIdentityPoolId(const Aws::String& value) { SetIdentityPoolId(value); return *this;}

    /**
     * An identity pool ID in the format REGION:GUID.
     */
    inline GetIdRequest& WithIdentityPoolId(Aws::String&& value) { SetIdentityPoolId(value); return *this;}

    /**
     * An identity pool ID in the format REGION:GUID.
     */
    inline GetIdRequest& WithIdentityPoolId(const char* value) { SetIdentityPoolId(value); return *this;}

    /**
     *
A set of optional name-value pairs that map provider names to provider
     * tokens.

The available provider names for Logins are as
     * follows:

Facebook: graph.facebook.com

Google:
     * accounts.google.com

Amazon:
     * www.amazon.com

Twitter: api.twitter.com

     *
Digits: www.digits.com

     */
    inline const Aws::Map<Aws::String, Aws::String>& GetLogins() const{ return m_logins; }

    /**
     *
A set of optional name-value pairs that map provider names to provider
     * tokens.

The available provider names for Logins are as
     * follows:

Facebook: graph.facebook.com

Google:
     * accounts.google.com

Amazon:
     * www.amazon.com

Twitter: api.twitter.com

     *
Digits: www.digits.com

     */
    inline void SetLogins(const Aws::Map<Aws::String, Aws::String>& value) { m_loginsHasBeenSet = true; m_logins = value; }

    /**
     *
A set of optional name-value pairs that map provider names to provider
     * tokens.

The available provider names for Logins are as
     * follows:

Facebook: graph.facebook.com

Google:
     * accounts.google.com

Amazon:
     * www.amazon.com

Twitter: api.twitter.com

     *
Digits: www.digits.com

     */
    inline void SetLogins(Aws::Map<Aws::String, Aws::String>&& value) { m_loginsHasBeenSet = true; m_logins = value; }

    /**
     *
A set of optional name-value pairs that map provider names to provider
     * tokens.

The available provider names for Logins are as
     * follows:

Facebook: graph.facebook.com

Google:
     * accounts.google.com

Amazon:
     * www.amazon.com

Twitter: api.twitter.com

     *
Digits: www.digits.com

     */
    inline GetIdRequest& WithLogins(const Aws::Map<Aws::String, Aws::String>& value) { SetLogins(value); return *this;}

    /**
     *
A set of optional name-value pairs that map provider names to provider
     * tokens.

The available provider names for Logins are as
     * follows:

Facebook: graph.facebook.com

Google:
     * accounts.google.com

Amazon:
     * www.amazon.com

Twitter: api.twitter.com

     *
Digits: www.digits.com

     */
    inline GetIdRequest& WithLogins(Aws::Map<Aws::String, Aws::String>&& value) { SetLogins(value); return *this;}

    /**
     *
A set of optional name-value pairs that map provider names to provider
     * tokens.

The available provider names for Logins are as
     * follows:

Facebook: graph.facebook.com

Google:
     * accounts.google.com

Amazon:
     * www.amazon.com

Twitter: api.twitter.com

     *
Digits: www.digits.com

     */
    inline GetIdRequest& AddLogins(const Aws::String& key, const Aws::String& value) { m_loginsHasBeenSet = true; m_logins[key] = value; return *this; }

    /**
     *
A set of optional name-value pairs that map provider names to provider
     * tokens.

The available provider names for Logins are as
     * follows:

Facebook: graph.facebook.com

Google:
     * accounts.google.com

Amazon:
     * www.amazon.com

Twitter: api.twitter.com

     *
Digits: www.digits.com

     */
    inline GetIdRequest& AddLogins(Aws::String&& key, const Aws::String& value) { m_loginsHasBeenSet = true; m_logins[key] = value; return *this; }

    /**
     *
A set of optional name-value pairs that map provider names to provider
     * tokens.

The available provider names for Logins are as
     * follows:

Facebook: graph.facebook.com

Google:
     * accounts.google.com

Amazon:
     * www.amazon.com

Twitter: api.twitter.com

     *
Digits: www.digits.com

     */
    inline GetIdRequest& AddLogins(const Aws::String& key, Aws::String&& value) { m_loginsHasBeenSet = true; m_logins[key] = value; return *this; }

    /**
     *
A set of optional name-value pairs that map provider names to provider
     * tokens.

The available provider names for Logins are as
     * follows:

Facebook: graph.facebook.com

Google:
     * accounts.google.com

Amazon:
     * www.amazon.com

Twitter: api.twitter.com

     *
Digits: www.digits.com

     */
    inline GetIdRequest& AddLogins(Aws::String&& key, Aws::String&& value) { m_loginsHasBeenSet = true; m_logins[key] = value; return *this; }

    /**
     *
A set of optional name-value pairs that map provider names to provider
     * tokens.

The available provider names for Logins are as
     * follows:

Facebook: graph.facebook.com

Google:
     * accounts.google.com

Amazon:
     * www.amazon.com

Twitter: api.twitter.com

     *
Digits: www.digits.com

     */
    inline GetIdRequest& AddLogins(const char* key, Aws::String&& value) { m_loginsHasBeenSet = true; m_logins[key] = value; return *this; }

    /**
     *
A set of optional name-value pairs that map provider names to provider
     * tokens.

The available provider names for Logins are as
     * follows:

Facebook: graph.facebook.com

Google:
     * accounts.google.com

Amazon:
     * www.amazon.com

Twitter: api.twitter.com

     *
Digits: www.digits.com

     */
    inline GetIdRequest& AddLogins(Aws::String&& key, const char* value) { m_loginsHasBeenSet = true; m_logins[key] = value; return *this; }

    /**
     *
A set of optional name-value pairs that map provider names to provider
     * tokens.

The available provider names for Logins are as
     * follows:

Facebook: graph.facebook.com

Google:
     * accounts.google.com

Amazon:
     * www.amazon.com

Twitter: api.twitter.com

     *
Digits: www.digits.com

     */
    inline GetIdRequest& AddLogins(const char* key, const char* value) { m_loginsHasBeenSet = true; m_logins[key] = value; return *this; }

  private:
    Aws::String m_accountId;
    bool m_accountIdHasBeenSet;
    Aws::String m_identityPoolId;
    bool m_identityPoolIdHasBeenSet;
    Aws::Map<Aws::String, Aws::String> m_logins;
    bool m_loginsHasBeenSet;
  };

} // namespace Model
} // namespace CognitoIdentity
} // namespace Aws