text:
namespace FIX44
{

  class OrderCancelReplaceRequest : public Message
  {
  public:
    OrderCancelReplaceRequest() : Message(MsgType()) {}
    OrderCancelReplaceRequest(const FIX::Message& m) : Message(m) {}
    OrderCancelReplaceRequest(const Message& m) : Message(m) {}
    OrderCancelReplaceRequest(const OrderCancelReplaceRequest& m) : Message(m) {}
    static FIX::MsgType MsgType() { return FIX::MsgType("G"); }

    OrderCancelReplaceRequest(
      const FIX::OrigClOrdID& aOrigClOrdID,
      const FIX::ClOrdID& aClOrdID,
      const FIX::Side& aSide,
      const FIX::TransactTime& aTransactTime,
      const FIX::OrdType& aOrdType )
    : Message(MsgType())
    {
      set(aOrigClOrdID);
      set(aClOrdID);
      set(aSide);
      set(aTransactTime);
      set(aOrdType);
    }

    FIELD_SET(*this, FIX::OrderID);
    FIELD_SET_EX(std::string, OrderID);
    FIELD_SET(*this, FIX::NoPartyIDs);
    FIELD_SET_EX(int, NoPartyIDs);
    class NoPartyIDs: public FIX::Group
    {
    public:
    NoPartyIDs() : FIX::Group(453,448,FIX::message_order(448,447,452,802,0)) {}
      FIELD_SET(*this, FIX::PartyID);
      FIELD_SET_EX(std::string, PartyID);
      FIELD_SET(*this, FIX::PartyIDSource);
      FIELD_SET_EX(char, PartyIDSource);
      FIELD_SET(*this, FIX::PartyRole);
      FIELD_SET_EX(int, PartyRole);
      FIELD_SET(*this, FIX::NoPartySubIDs);
      FIELD_SET_EX(int, NoPartySubIDs);
      class NoPartySubIDs: public FIX::Group
      {
      public:
      NoPartySubIDs() : FIX::Group(802,523,FIX::message_order(523,803,0)) {}
        FIELD_SET(*this, FIX::PartySubID);
        FIELD_SET_EX(std::string, PartySubID);
        FIELD_SET(*this, FIX::PartySubIDType);
        FIELD_SET_EX(int, PartySubIDType);
      };
    };
    FIELD_SET(*this, FIX::TradeOriginationDate);
    FIELD_SET_EX(std::string, TradeOriginationDate);
    FIELD_SET(*this, FIX::TradeDate);
    FIELD_SET_EX(std::string, TradeDate);
    FIELD_SET(*this, FIX::OrigClOrdID);
    FIELD_SET_EX(std::string, OrigClOrdID);
    FIELD_SET(*this, FIX::ClOrdID);
    FIELD_SET_EX(std::string, ClOrdID);
    FIELD_SET(*this, FIX::SecondaryClOrdID);
    FIELD_SET_EX(std::string, SecondaryClOrdID);
    FIELD_SET(*this, FIX::ClOrdLinkID);
    FIELD_SET_EX(std::string, ClOrdLinkID);
    FIELD_SET(*this, FIX::ListID);
    FIELD_SET_EX(std::string, ListID);
    FIELD_SET(*this, FIX::OrigOrdModTime);
    FIELD_SET_EX(FIX::UtcTimeStamp, OrigOrdModTime);
    FIELD_SET(*this, FIX::ClAppID);
    FIELD_SET_EX(std::string, ClAppID);
    FIELD_SET(*this, FIX::Account);
    FIELD_SET_EX(std::string, Account);
    FIELD_SET(*this, FIX::AcctIDSource);
    FIELD_SET_EX(int, AcctIDSource);
    FIELD_SET(*this, FIX::AccountType);
    FIELD_SET_EX(int, AccountType);
    FIELD_SET(*this, FIX::DayBookingInst);
    FIELD_SET_EX(char, DayBookingInst);
    FIELD_SET(*this, FIX::BookingUnit);
    FIELD_SET_EX(char, BookingUnit);
    FIELD_SET(*this, FIX::PreallocMethod);
    FIELD_SET_EX(char, PreallocMethod);
    FIELD_SET(*this, FIX::AllocID);
    FIELD_SET_EX(std::string, AllocID);
    FIELD_SET(*this, FIX::SettlType);
    FIELD_SET_EX(std::string, SettlType);
    FIELD_SET(*this, FIX::SettlDate);
    FIELD_SET_EX(std::string, SettlDate);
    FIELD_SET(*this, FIX::CashMargin);
    FIELD_SET_EX(char, CashMargin);
    FIELD_SET(*this, FIX::ClearingFeeIndicator);
    FIELD_SET_EX(std::string, ClearingFeeIndicator);
    FIELD_SET(*this, FIX::HandlInst);
    FIELD_SET_EX(char, HandlInst);
    FIELD_SET(*this, FIX::ExecInst);
    FIELD_SET(*this, FIX::MinQty);
    FIELD_SET_EX(double, MinQty);
    FIELD_SET(*this, FIX::MaxFloor);
    FIELD_SET_EX(double, MaxFloor);
    FIELD_SET(*this, FIX::HiddenQty);
    FIELD_SET_EX(double, HiddenQty);
    FIELD_SET(*this, FIX::MaxVisibleQty);
    FIELD_SET_EX(double, MaxVisibleQty);
    FIELD_SET(*this, FIX::ExDestination);
    FIELD_SET(*this, FIX::Symbol);
    FIELD_SET_EX(std::string, Symbol);
    FIELD_SET(*this, FIX::SymbolSfx);
    FIELD_SET_EX(std::string, SymbolSfx);
    FIELD_SET(*this, FIX::SecurityID);
    FIELD_SET_EX(std::string, SecurityID);
    FIELD_SET(*this, FIX::SecurityIDSource);
    FIELD_SET_EX(std::string, SecurityIDSource);
    FIELD_SET(*this, FIX::Product);
    FIELD_SET_EX(int, Product);
    FIELD_SET(*this, FIX::CFICode);
    FIELD_SET_EX(std::string, CFICode);
    FIELD_SET(*this, FIX::SecurityType);
    FIELD_SET_EX(std::string, SecurityType);
    FIELD_SET(*this, FIX::SecuritySubType);
    FIELD_SET_EX(std::string, SecuritySubType);
    FIELD_SET(*this, FIX::MaturityMonthYear);
    FIELD_SET(*this, FIX::MaturityDate);
    FIELD_SET_EX(std::string, MaturityDate);
    FIELD_SET(*this, FIX::CouponPaymentDate);
    FIELD_SET_EX(std::string, CouponPaymentDate);
    FIELD_SET(*this, FIX::IssueDate);
    FIELD_SET_EX(std::string, IssueDate);
    FIELD_SET(*this, FIX::RepoCollateralSecurityType);
    FIELD_SET_EX(int, RepoCollateralSecurityType);
    FIELD_SET(*this, FIX::RepurchaseTerm);
    FIELD_SET_EX(int, RepurchaseTerm);
    FIELD_SET(*this, FIX::RepurchaseRate);
    FIELD_SET_EX(double, RepurchaseRate);
    FIELD_SET(*this, FIX::Factor);
    FIELD_SET_EX(double, Factor);
    FIELD_SET(*this, FIX::CreditRating);
    FIELD_SET_EX(std::string, CreditRating);
    FIELD_SET(*this, FIX::InstrRegistry);
    FIELD_SET_EX(std::string, InstrRegistry);
    FIELD_SET(*this, FIX::CountryOfIssue);
    FIELD_SET(*this, FIX::StateOrProvinceOfIssue);
    FIELD_SET_EX(std::string, StateOrProvinceOfIssue);
    FIELD_SET(*this, FIX::LocaleOfIssue);
    FIELD_SET_EX(std::string, LocaleOfIssue);
    FIELD_SET(*this, FIX::RedemptionDate);
    FIELD_SET_EX(std::string, RedemptionDate);
    FIELD_SET(*this, FIX::StrikePrice);
    FIELD_SET_EX(double, StrikePrice);
    FIELD_SET(*this, FIX::StrikeCurrency);
    FIELD_SET_EX(std::string, StrikeCurrency);
    FIELD_SET(*this, FIX::OptAttribute);
    FIELD_SET_EX(char, OptAttribute);
    FIELD_SET(*this, FIX::ContractMultiplier);
    FIELD_SET_EX(double, ContractMultiplier);
    FIELD_SET(*this, FIX::CouponRate);
    FIELD_SET_EX(double, CouponRate);
    FIELD_SET(*this, FIX::SecurityExchange);
    FIELD_SET(*this, FIX::Issuer);
    FIELD_SET_EX(std::string, Issuer);
    FIELD_SET(*this, FIX::EncodedIssuerLen);
    FIELD_SET_EX(int, EncodedIssuerLen);
    FIELD_SET(*this, FIX::EncodedIssuer);
    FIELD_SET_EX(std::string, EncodedIssuer);
    FIELD_SET(*this, FIX::SecurityDesc);
    FIELD_SET_EX(std::string, SecurityDesc);
    FIELD_SET(*this, FIX::EncodedSecurityDescLen);
    FIELD_SET_EX(int, EncodedSecurityDescLen);
    FIELD_SET(*this, FIX::EncodedSecurityDesc);
    FIELD_SET_EX(std::string, EncodedSecurityDesc);
    FIELD_SET(*this, FIX::Pool);
    FIELD_SET_EX(std::string, Pool);
    FIELD_SET(*this, FIX::ContractSettlMonth);
    FIELD_SET(*this, FIX::CPProgram);
    FIELD_SET_EX(int, CPProgram);
    FIELD_SET(*this, FIX::CPRegType);
    FIELD_SET_EX(std::string, CPRegType);
    FIELD_SET(*this, FIX::DatedDate);
    FIELD_SET_EX(std::string, DatedDate);
    FIELD_SET(*this, FIX::InterestAccrualDate);
    FIELD_SET_EX(std::string, InterestAccrualDate);
    FIELD_SET(*this, FIX::NoSecurityAltID);
    FIELD_SET_EX(int, NoSecurityAltID);
    class NoSecurityAltID: public FIX::Group
    {
    public:
    NoSecurityAltID() : FIX::Group(454,455,FIX::message_order(455,456,0)) {}
      FIELD_SET(*this, FIX::SecurityAltID);
      FIELD_SET_EX(std::string, SecurityAltID);
      FIELD_SET(*this, FIX::SecurityAltIDSource);
      FIELD_SET_EX(std::string, SecurityAltIDSource);
    };
    FIELD_SET(*this, FIX::NoEvents);
    FIELD_SET_EX(int, NoEvents);
    class NoEvents: public FIX::Group
    {
    public:
    NoEvents() : FIX::Group(864,865,FIX::message_order(865,866,867,868,0)) {}
      FIELD_SET(*this, FIX::EventType);
      FIELD_SET_EX(int, EventType);
      FIELD_SET(*this, FIX::EventDate);
      FIELD_SET_EX(std::string, EventDate);
      FIELD_SET(*this, FIX::EventPx);
      FIELD_SET_EX(double, EventPx);
      FIELD_SET(*this, FIX::EventText);
      FIELD_SET_EX(std::string, EventText);
    };
    FIELD_SET(*this, FIX::AgreementDesc);
    FIELD_SET_EX(std::string, AgreementDesc);
    FIELD_SET(*this, FIX::AgreementID);
    FIELD_SET_EX(std::string, AgreementID);
    FIELD_SET(*this, FIX::AgreementDate);
    FIELD_SET_EX(std::string, AgreementDate);
    FIELD_SET(*this, FIX::AgreementCurrency);
    FIELD_SET_EX(std::string, AgreementCurrency);
    FIELD_SET(*this, FIX::TerminationType);
    FIELD_SET_EX(int, TerminationType);
    FIELD_SET(*this, FIX::StartDate);
    FIELD_SET_EX(std::string, StartDate);
    FIELD_SET(*this, FIX::EndDate);
    FIELD_SET_EX(std::string, EndDate);
    FIELD_SET(*this, FIX::DeliveryType);
    FIELD_SET_EX(int, DeliveryType);
    FIELD_SET(*this, FIX::MarginRatio);
    FIELD_SET_EX(double, MarginRatio);
    FIELD_SET(*this, FIX::Side);
    FIELD_SET_EX(char, Side);
    FIELD_SET(*this, FIX::TransactTime);
    FIELD_SET_EX(FIX::UtcTimeStamp, TransactTime);
    FIELD_SET(*this, FIX::QtyType);
    FIELD_SET_EX(int, QtyType);
    FIELD_SET(*this, FIX::OrderQty);
    FIELD_SET_EX(double, OrderQty);
    FIELD_SET(*this, FIX::CashOrderQty);
    FIELD_SET_EX(double, CashOrderQty);
    FIELD_SET(*this, FIX::OrderPercent);
    FIELD_SET_EX(double, OrderPercent);
    FIELD_SET(*this, FIX::RoundingDirection);
    FIELD_SET_EX(char, RoundingDirection);
    FIELD_SET(*this, FIX::RoundingModulus);
    FIELD_SET_EX(double, RoundingModulus);
    FIELD_SET(*this, FIX::LeavesQty);
    FIELD_SET_EX(double, LeavesQty);
    FIELD_SET(*this, FIX::OrdType);
    FIELD_SET_EX(char, OrdType);
    FIELD_SET(*this, FIX::PriceType);
    FIELD_SET_EX(int, PriceType);
    FIELD_SET(*this, FIX::Price);
    FIELD_SET_EX(double, Price);
    FIELD_SET(*this, FIX::StopPx);
    FIELD_SET_EX(double, StopPx);
    FIELD_SET(*this, FIX::Spread);
    FIELD_SET(*this, FIX::BenchmarkCurveCurrency);
    FIELD_SET_EX(std::string, BenchmarkCurveCurrency);
    FIELD_SET(*this, FIX::BenchmarkCurveName);
    FIELD_SET_EX(std::string, BenchmarkCurveName);
    FIELD_SET(*this, FIX::BenchmarkCurvePoint);
    FIELD_SET_EX(std::string, BenchmarkCurvePoint);
    FIELD_SET(*this, FIX::BenchmarkPrice);
    FIELD_SET_EX(double, BenchmarkPrice);
    FIELD_SET(*this, FIX::BenchmarkPriceType);
    FIELD_SET_EX(int, BenchmarkPriceType);
    FIELD_SET(*this, FIX::BenchmarkSecurityID);
    FIELD_SET_EX(std::string, BenchmarkSecurityID);
    FIELD_SET(*this, FIX::BenchmarkSecurityIDSource);
    FIELD_SET_EX(std::string, BenchmarkSecurityIDSource);
    FIELD_SET(*this, FIX::YieldType);
    FIELD_SET_EX(std::string, YieldType);
    FIELD_SET(*this, FIX::Yield);
    FIELD_SET_EX(double, Yield);
    FIELD_SET(*this, FIX::YieldCalcDate);
    FIELD_SET_EX(std::string, YieldCalcDate);
    FIELD_SET(*this, FIX::YieldRedemptionDate);
    FIELD_SET_EX(std::string, YieldRedemptionDate);
    FIELD_SET(*this, FIX::YieldRedemptionPrice);
    FIELD_SET_EX(double, YieldRedemptionPrice);
    FIELD_SET(*this, FIX::YieldRedemptionPriceType);
    FIELD_SET_EX(int, YieldRedemptionPriceType);
    FIELD_SET(*this, FIX::PegOffsetValue);
    FIELD_SET_EX(double, PegOffsetValue);
    FIELD_SET(*this, FIX::PegMoveType);
    FIELD_SET_EX(int, PegMoveType);
    FIELD_SET(*this, FIX::PegOffsetType);
    FIELD_SET_EX(int, PegOffsetType);
    FIELD_SET(*this, FIX::PegLimitType);
    FIELD_SET_EX(int, PegLimitType);
    FIELD_SET(*this, FIX::PegRoundDirection);
    FIELD_SET_EX(int, PegRoundDirection);
    FIELD_SET(*this, FIX::PegScope);
    FIELD_SET_EX(int, PegScope);
    FIELD_SET(*this, FIX::DiscretionInst);
    FIELD_SET_EX(char, DiscretionInst);
    FIELD_SET(*this, FIX::DiscretionOffsetValue);
    FIELD_SET_EX(double, DiscretionOffsetValue);
    FIELD_SET(*this, FIX::DiscretionMoveType);
    FIELD_SET_EX(int, DiscretionMoveType);
    FIELD_SET(*this, FIX::DiscretionOffsetType);
    FIELD_SET_EX(int, DiscretionOffsetType);
    FIELD_SET(*this, FIX::DiscretionLimitType);
    FIELD_SET_EX(int, DiscretionLimitType);
    FIELD_SET(*this, FIX::DiscretionRoundDirection);
    FIELD_SET_EX(int, DiscretionRoundDirection);
    FIELD_SET(*this, FIX::DiscretionScope);
    FIELD_SET_EX(int, DiscretionScope);
    FIELD_SET(*this, FIX::TargetStrategy);
    FIELD_SET_EX(int, TargetStrategy);
    FIELD_SET(*this, FIX::TargetStrategyParameters);
    FIELD_SET_EX(std::string, TargetStrategyParameters);
    FIELD_SET(*this, FIX::ParticipationRate);
    FIELD_SET_EX(double, ParticipationRate);
    FIELD_SET(*this, FIX::ComplianceID);
    FIELD_SET_EX(std::string, ComplianceID);
    FIELD_SET(*this, FIX::SolicitedFlag);
    FIELD_SET_EX(bool, SolicitedFlag);
    FIELD_SET(*this, FIX::Currency);
    FIELD_SET_EX(std::string, Currency);
    FIELD_SET(*this, FIX::TimeInForce);
    FIELD_SET_EX(char, TimeInForce);
    FIELD_SET(*this, FIX::EffectiveTime);
    FIELD_SET_EX(FIX::UtcTimeStamp, EffectiveTime);
    FIELD_SET(*this, FIX::ExpireDate);
    FIELD_SET_EX(std::string, ExpireDate);
    FIELD_SET(*this, FIX::ExpireTime);
    FIELD_SET_EX(FIX::UtcTimeStamp, ExpireTime);
    FIELD_SET(*this, FIX::GTBookingInst);
    FIELD_SET_EX(int, GTBookingInst);
    FIELD_SET(*this, FIX::Commission);
    FIELD_SET_EX(double, Commission);
    FIELD_SET(*this, FIX::CommType);
    FIELD_SET_EX(char, CommType);
    FIELD_SET(*this, FIX::CommCurrency);
    FIELD_SET_EX(std::string, CommCurrency);
    FIELD_SET(*this, FIX::FundRenewWaiv);
    FIELD_SET_EX(char, FundRenewWaiv);
    FIELD_SET(*this, FIX::OrderCapacity);
    FIELD_SET_EX(char, OrderCapacity);
    FIELD_SET(*this, FIX::OrderRestrictions);
    FIELD_SET(*this, FIX::CustOrderCapacity);
    FIELD_SET_EX(int, CustOrderCapacity);
    FIELD_SET(*this, FIX::ForexReq);
    FIELD_SET_EX(bool, ForexReq);
    FIELD_SET(*this, FIX::SettlCurrency);
    FIELD_SET_EX(std::string, SettlCurrency);
    FIELD_SET(*this, FIX::BookingType);
    FIELD_SET_EX(int, BookingType);
    FIELD_SET(*this, FIX::Text);
    FIELD_SET_EX(std::string, Text);
    FIELD_SET(*this, FIX::EncodedTextLen);
    FIELD_SET_EX(int, EncodedTextLen);
    FIELD_SET(*this, FIX::EncodedText);
    FIELD_SET_EX(std::string, EncodedText);
    FIELD_SET(*this, FIX::SettlDate2);
    FIELD_SET_EX(std::string, SettlDate2);
    FIELD_SET(*this, FIX::OrderQty2);
    FIELD_SET_EX(double, OrderQty2);
    FIELD_SET(*this, FIX::Price2);
    FIELD_SET_EX(double, Price2);
    FIELD_SET(*this, FIX::PositionEffect);
    FIELD_SET_EX(char, PositionEffect);
    FIELD_SET(*this, FIX::CoveredOrUncovered);
    FIELD_SET_EX(int, CoveredOrUncovered);
    FIELD_SET(*this, FIX::MaxShow);
    FIELD_SET_EX(double, MaxShow);
    FIELD_SET(*this, FIX::LocateReqd);
    FIELD_SET_EX(bool, LocateReqd);
    FIELD_SET(*this, FIX::CancellationRights);
    FIELD_SET_EX(char, CancellationRights);
    FIELD_SET(*this, FIX::MoneyLaunderingStatus);
    FIELD_SET_EX(char, MoneyLaunderingStatus);
    FIELD_SET(*this, FIX::RegistID);
    FIELD_SET_EX(std::string, RegistID);
    FIELD_SET(*this, FIX::Designation);
    FIELD_SET_EX(std::string, Designation);
    FIELD_SET(*this, FIX::AccOrderType);
    FIELD_SET_EX(char, AccOrderType);
    FIELD_SET(*this, FIX::TakeProfit);
    FIELD_SET_EX(double, TakeProfit);
    FIELD_SET(*this, FIX::StopLoss);
    FIELD_SET_EX(double, StopLoss);
    FIELD_SET(*this, FIX::EncodedCommentLen);
    FIELD_SET_EX(int, EncodedCommentLen);
    FIELD_SET(*this, FIX::EncodedComment);
    FIELD_SET_EX(std::string, EncodedComment);
    FIELD_SET(*this, FIX::EncodedTagLen);
    FIELD_SET_EX(int, EncodedTagLen);
    FIELD_SET(*this, FIX::EncodedTag);
    FIELD_SET_EX(std::string, EncodedTag);
    FIELD_SET(*this, FIX::Magic);
    FIELD_SET_EX(int, Magic);
    FIELD_SET(*this, FIX::ImmediateOrCancelFlag);
    FIELD_SET_EX(bool, ImmediateOrCancelFlag);
    FIELD_SET(*this, FIX::InFlightMitigationFlag);
    FIELD_SET_EX(bool, InFlightMitigationFlag);
    FIELD_SET(*this, FIX::Slippage);
    FIELD_SET_EX(double, Slippage);
    FIELD_SET(*this, FIX::NoAllocs);
    FIELD_SET_EX(int, NoAllocs);
    class NoAllocs: public FIX::Group
    {
    public:
    NoAllocs() : FIX::Group(78,79,FIX::message_order(79,661,736,467,539,80,0)) {}
      FIELD_SET(*this, FIX::AllocAccount);
      FIELD_SET_EX(std::string, AllocAccount);
      FIELD_SET(*this, FIX::AllocAcctIDSource);
      FIELD_SET_EX(int, AllocAcctIDSource);
      FIELD_SET(*this, FIX::AllocSettlCurrency);
      FIELD_SET_EX(std::string, AllocSettlCurrency);
      FIELD_SET(*this, FIX::IndividualAllocID);
      FIELD_SET_EX(std::string, IndividualAllocID);
      FIELD_SET(*this, FIX::NoNestedPartyIDs);
      FIELD_SET_EX(int, NoNestedPartyIDs);
      class NoNestedPartyIDs: public FIX::Group
      {
      public:
      NoNestedPartyIDs() : FIX::Group(539,524,FIX::message_order(524,525,538,804,0)) {}
        FIELD_SET(*this, FIX::NestedPartyID);
        FIELD_SET_EX(std::string, NestedPartyID);
        FIELD_SET(*this, FIX::NestedPartyIDSource);
        FIELD_SET_EX(char, NestedPartyIDSource);
        FIELD_SET(*this, FIX::NestedPartyRole);
        FIELD_SET_EX(int, NestedPartyRole);
        FIELD_SET(*this, FIX::NoNestedPartySubIDs);
        FIELD_SET_EX(int, NoNestedPartySubIDs);
        class NoNestedPartySubIDs: public FIX::Group
        {
        public:
        NoNestedPartySubIDs() : FIX::Group(804,545,FIX::message_order(545,805,0)) {}
          FIELD_SET(*this, FIX::NestedPartySubID);
          FIELD_SET_EX(std::string, NestedPartySubID);
          FIELD_SET(*this, FIX::NestedPartySubIDType);
          FIELD_SET_EX(int, NestedPartySubIDType);
        };
      };
      FIELD_SET(*this, FIX::AllocQty);
      FIELD_SET_EX(double, AllocQty);
    };
    FIELD_SET(*this, FIX::NoTradingSessions);
    FIELD_SET_EX(int, NoTradingSessions);
    class NoTradingSessions: public FIX::Group
    {
    public:
    NoTradingSessions() : FIX::Group(386,336,FIX::message_order(336,625,0)) {}
      FIELD_SET(*this, FIX::TradingSessionID);
      FIELD_SET_EX(std::string, TradingSessionID);
      FIELD_SET(*this, FIX::TradingSessionSubID);
      FIELD_SET_EX(std::string, TradingSessionSubID);
    };
    FIELD_SET(*this, FIX::NoUnderlyings);
    FIELD_SET_EX(int, NoUnderlyings);
    class NoUnderlyings: public FIX::Group
    {
    public:
    NoUnderlyings() : FIX::Group(711,311,FIX::message_order(311,312,309,305,457,462,463,310,763,313,542,241,242,243,244,245,246,256,595,592,593,594,247,316,941,317,436,435,308,306,362,363,307,364,365,877,878,318,879,810,882,883,884,885,886,0)) {}
      FIELD_SET(*this, FIX::UnderlyingSymbol);
      FIELD_SET_EX(std::string, UnderlyingSymbol);
      FIELD_SET(*this, FIX::UnderlyingSymbolSfx);
      FIELD_SET_EX(std::string, UnderlyingSymbolSfx);
      FIELD_SET(*this, FIX::UnderlyingSecurityID);
      FIELD_SET_EX(std::string, UnderlyingSecurityID);
      FIELD_SET(*this, FIX::UnderlyingSecurityIDSource);
      FIELD_SET_EX(std::string, UnderlyingSecurityIDSource);
      FIELD_SET(*this, FIX::UnderlyingProduct);
      FIELD_SET_EX(int, UnderlyingProduct);
      FIELD_SET(*this, FIX::UnderlyingCFICode);
      FIELD_SET_EX(std::string, UnderlyingCFICode);
      FIELD_SET(*this, FIX::UnderlyingSecurityType);
      FIELD_SET_EX(std::string, UnderlyingSecurityType);
      FIELD_SET(*this, FIX::UnderlyingSecuritySubType);
      FIELD_SET_EX(std::string, UnderlyingSecuritySubType);
      FIELD_SET(*this, FIX::UnderlyingMaturityMonthYear);
      FIELD_SET(*this, FIX::UnderlyingMaturityDate);
      FIELD_SET_EX(std::string, UnderlyingMaturityDate);
      FIELD_SET(*this, FIX::UnderlyingCouponPaymentDate);
      FIELD_SET_EX(std::string, UnderlyingCouponPaymentDate);
      FIELD_SET(*this, FIX::UnderlyingIssueDate);
      FIELD_SET_EX(std::string, UnderlyingIssueDate);
      FIELD_SET(*this, FIX::UnderlyingRepoCollateralSecurityType);
      FIELD_SET_EX(int, UnderlyingRepoCollateralSecurityType);
      FIELD_SET(*this, FIX::UnderlyingRepurchaseTerm);
      FIELD_SET_EX(int, UnderlyingRepurchaseTerm);
      FIELD_SET(*this, FIX::UnderlyingRepurchaseRate);
      FIELD_SET_EX(double, UnderlyingRepurchaseRate);
      FIELD_SET(*this, FIX::UnderlyingFactor);
      FIELD_SET_EX(double, UnderlyingFactor);
      FIELD_SET(*this, FIX::UnderlyingCreditRating);
      FIELD_SET_EX(std::string, UnderlyingCreditRating);
      FIELD_SET(*this, FIX::UnderlyingInstrRegistry);
      FIELD_SET_EX(std::string, UnderlyingInstrRegistry);
      FIELD_SET(*this, FIX::UnderlyingCountryOfIssue);
      FIELD_SET(*this, FIX::UnderlyingStateOrProvinceOfIssue);
      FIELD_SET_EX(std::string, UnderlyingStateOrProvinceOfIssue);
      FIELD_SET(*this, FIX::UnderlyingLocaleOfIssue);
      FIELD_SET_EX(std::string, UnderlyingLocaleOfIssue);
      FIELD_SET(*this, FIX::UnderlyingRedemptionDate);
      FIELD_SET_EX(std::string, UnderlyingRedemptionDate);
      FIELD_SET(*this, FIX::UnderlyingStrikePrice);
      FIELD_SET_EX(double, UnderlyingStrikePrice);
      FIELD_SET(*this, FIX::UnderlyingStrikeCurrency);
      FIELD_SET_EX(std::string, UnderlyingStrikeCurrency);
      FIELD_SET(*this, FIX::UnderlyingOptAttribute);
      FIELD_SET_EX(char, UnderlyingOptAttribute);
      FIELD_SET(*this, FIX::UnderlyingContractMultiplier);
      FIELD_SET_EX(double, UnderlyingContractMultiplier);
      FIELD_SET(*this, FIX::UnderlyingCouponRate);
      FIELD_SET_EX(double, UnderlyingCouponRate);
      FIELD_SET(*this, FIX::UnderlyingSecurityExchange);
      FIELD_SET(*this, FIX::UnderlyingIssuer);
      FIELD_SET_EX(std::string, UnderlyingIssuer);
      FIELD_SET(*this, FIX::EncodedUnderlyingIssuerLen);
      FIELD_SET_EX(int, EncodedUnderlyingIssuerLen);
      FIELD_SET(*this, FIX::EncodedUnderlyingIssuer);
      FIELD_SET_EX(std::string, EncodedUnderlyingIssuer);
      FIELD_SET(*this, FIX::UnderlyingSecurityDesc);
      FIELD_SET_EX(std::string, UnderlyingSecurityDesc);
      FIELD_SET(*this, FIX::EncodedUnderlyingSecurityDescLen);
      FIELD_SET_EX(int, EncodedUnderlyingSecurityDescLen);
      FIELD_SET(*this, FIX::EncodedUnderlyingSecurityDesc);
      FIELD_SET_EX(std::string, EncodedUnderlyingSecurityDesc);
      FIELD_SET(*this, FIX::UnderlyingCPProgram);
      FIELD_SET_EX(std::string, UnderlyingCPProgram);
      FIELD_SET(*this, FIX::UnderlyingCPRegType);
      FIELD_SET_EX(std::string, UnderlyingCPRegType);
      FIELD_SET(*this, FIX::UnderlyingCurrency);
      FIELD_SET_EX(std::string, UnderlyingCurrency);
      FIELD_SET(*this, FIX::UnderlyingQty);
      FIELD_SET_EX(double, UnderlyingQty);
      FIELD_SET(*this, FIX::UnderlyingPx);
      FIELD_SET_EX(double, UnderlyingPx);
      FIELD_SET(*this, FIX::UnderlyingDirtyPrice);
      FIELD_SET_EX(double, UnderlyingDirtyPrice);
      FIELD_SET(*this, FIX::UnderlyingEndPrice);
      FIELD_SET_EX(double, UnderlyingEndPrice);
      FIELD_SET(*this, FIX::UnderlyingStartValue);
      FIELD_SET_EX(double, UnderlyingStartValue);
      FIELD_SET(*this, FIX::UnderlyingCurrentValue);
      FIELD_SET_EX(double, UnderlyingCurrentValue);
      FIELD_SET(*this, FIX::UnderlyingEndValue);
      FIELD_SET_EX(double, UnderlyingEndValue);
      FIELD_SET(*this, FIX::NoUnderlyingSecurityAltID);
      FIELD_SET_EX(int, NoUnderlyingSecurityAltID);
      class NoUnderlyingSecurityAltID: public FIX::Group
      {
      public:
      NoUnderlyingSecurityAltID() : FIX::Group(457,458,FIX::message_order(458,459,0)) {}
        FIELD_SET(*this, FIX::UnderlyingSecurityAltID);
        FIELD_SET_EX(std::string, UnderlyingSecurityAltID);
        FIELD_SET(*this, FIX::UnderlyingSecurityAltIDSource);
        FIELD_SET_EX(std::string, UnderlyingSecurityAltIDSource);
      };
    };
  };

}

#endif


text:
"""Module for all distribution implementations needed for the loss functions."""
import math
import jax
import jax.numpy as jnp

class MultivariateNormalDiag:
  """Multivariate normal distribution on `R^k`."""

  def __init__(
      self,
      loc: jnp.ndarray,
      scale_diag: jnp.ndarray):
    """Initializes a MultivariateNormalDiag distribution.

    Args:
      loc: Mean vector of the distribution. Can also be a batch of vectors.
      scale_diag: Vector of standard deviations.
    """
    super().__init__()
    self._loc = loc
    self._scale_diag = scale_diag

  @property
  def loc(self) -> jnp.ndarray:
    """Mean of the distribution."""
    return self._loc

  @property
  def scale_diag(self) -> jnp.ndarray:
    """Scale of the distribution."""
    return self._scale_diag

  def _num_dims(self) -> int:
    """Dimensionality of the events."""
    return self._scale_diag.shape[-1]

  def _standardize(self, value: jnp.ndarray) -> jnp.ndarray:
    return (value - self._loc) / self._scale_diag

  def log_prob(self, value: jnp.ndarray) -> jnp.ndarray:
    """See `Distribution.log_prob`."""
    log_unnormalized = -0.5 * jnp.square(self._standardize(value))
    log_normalization = 0.5 * math.log(2 * math.pi) + jnp.log(self._scale_diag)
    return jnp.sum(log_unnormalized - log_normalization, axis=-1)

  def mean(self) -> jnp.ndarray:
    """Calculates the mean."""
    return self.loc

  def sample(self, seed: jnp.ndarray) -> jnp.ndarray:
    """Samples an event.

    Args:
      seed: PRNG key or integer seed.

    Returns:
      A sample.
    """
    eps = jax.random.normal(seed, self.loc.shape)
    return self.loc + eps * self.scale_diag

redpajama_set_name: RedPajamaGithub


text:
sap.ui.define([
	"sap/base/util/merge",
	"sap/ui/fl/initial/_internal/connectors/LrepConnector"
], function(
	merge,
	LrepConnector
) {
	"use strict";
	/**
	 * Connector for requesting data from a Neo LRep based back end.
	 *
	 * @namespace sap.ui.fl.initial._internal.connectors.NeoLrepConnector
	 * @implements {sap.ui.fl.interfaces.BaseLoadConnector}
	 * @since 1.81
	 * @private
	 * @ui5-restricted sap.ui.fl.initial._internal.Storage, sap.ui.fl.write._internal.Storage
	 */
	return merge({}, LrepConnector, {});
});


text:
package org.hl7.fhir.instance.model.valuesets;

// Generated on Tue, Jul 21, 2015 10:37-0400 for FHIR v0.5.0

public enum V3EntityDeterminer {

        /**
         * Description:A determiner that specifies that the Entity object represents a particular physical thing (as opposed to a universal, kind, or class of physical thing).

                           Discussion: It does not matter whether an INSTANCE still exists as a whole at the point in time (or process) when we mention it, for example, a drug product lot is an INSTANCE even though it has been portioned out for retail purpose.
         */
        INSTANCE,
        /**
         * A determiner that specifies that the Entity object represents a particular collection of physical things (as opposed to a universal, kind, or class of physical thing).  While the collection may resolve to having only a single individual (or even no individuals), the potential should exist for it to cover multiple individuals.
         */
        GROUP,
        /**
         * Description:A determiner that specifies that the Entity object represents a universal, kind or class of physical thing (as opposed to a particular thing).
         */
        KIND,
        /**
         * A determiner that specifies that the Entity object represents a universal, kind or class of collections physical things.  While the collection may resolve to having only a single individual (or even no individuals), the potential should exist for it to cover multiple individuals.
         */
        GROUPKIND,
        /**
         * added to help the parsers
         */
        NULL;
        public static V3EntityDeterminer fromCode(String codeString) throws Exception {
            if (codeString == null || "".equals(codeString))
                return null;
        if ("INSTANCE".equals(codeString))
          return INSTANCE;
        if ("GROUP".equals(codeString))
          return GROUP;
        if ("KIND".equals(codeString))
          return KIND;
        if ("GROUPKIND".equals(codeString))
          return GROUPKIND;
        throw new Exception("Unknown V3EntityDeterminer code '"+codeString+"'");
        }
        public String toCode() {
          switch (this) {
            case INSTANCE: return "INSTANCE";
            case GROUP: return "GROUP";
            case KIND: return "KIND";
            case GROUPKIND: return "GROUPKIND";
            default: return "?";
          }
        }
        public String getSystem() {
          return "http://hl7.org/fhir/v3/EntityDeterminer";
        }
        public String getDefinition() {
          switch (this) {
            case INSTANCE: return "Description:A determiner that specifies that the Entity object represents a particular physical thing (as opposed to a universal, kind, or class of physical thing).\r\n\n                        \n                           Discussion: It does not matter whether an INSTANCE still exists as a whole at the point in time (or process) when we mention it, for example, a drug product lot is an INSTANCE even though it has been portioned out for retail purpose.";
            case GROUP: return "A determiner that specifies that the Entity object represents a particular collection of physical things (as opposed to a universal, kind, or class of physical thing).  While the collection may resolve to having only a single individual (or even no individuals), the potential should exist for it to cover multiple individuals.";
            case KIND: return "Description:A determiner that specifies that the Entity object represents a universal, kind or class of physical thing (as opposed to a particular thing).";
            case GROUPKIND: return "A determiner that specifies that the Entity object represents a universal, kind or class of collections physical things.  While the collection may resolve to having only a single individual (or even no individuals), the potential should exist for it to cover multiple individuals.";
            default: return "?";
          }
        }
        public String getDisplay() {
          switch (this) {
            case INSTANCE: return "specific";
            case GROUP: return "specific group";
            case KIND: return "described";
            case GROUPKIND: return "described group";
            default: return "?";
          }
    }

}


text:
package com.xmpp.chat.handler;

import android.app.Activity;
import android.app.ActivityManager;
import android.app.ActivityManager.RunningTaskInfo;
import android.content.Context;
import android.util.Log;

import com.xmpp.chat.dao.MessageItem;
import com.xmpp.chat.data.DatabaseHelper;
import com.xmpp.chat.framework.Notifications;
import com.xmpp.chat.xmpp.XMPP;

import org.jivesoftware.smack.StanzaListener;
import org.jivesoftware.smack.packet.ExtensionElement;
import org.jivesoftware.smack.packet.Message;
import org.jivesoftware.smack.packet.Message.Type;
import org.jivesoftware.smack.packet.PacketExtension;
import org.jivesoftware.smack.packet.Stanza;
import org.jivesoftware.smack.util.StringUtils;
import org.jivesoftware.smackx.delay.packet.DelayInformation;

import java.util.Calendar;
import java.util.List;

public class MessageHandler implements StanzaListener {
    Context context;
    DatabaseHelper db;

    public MessageHandler(Context paramContext) {
        this.context = paramContext;
        this.db = DatabaseHelper.getInstance(paramContext);
    }

    public void processPacket(Stanza paramPacket) {
        MessageItem messageItem = null;

        if ((paramPacket instanceof Message)) {
            Message localMessage = (Message) paramPacket;
            if (localMessage.getFrom().equals(XMPP.LIVESERVICE)) {
                return;
            }

            if ((localMessage.getBody() != null)
                    && (!localMessage.getBody().equals(""))) {

                messageItem = new MessageItem();
                messageItem.opponent = StringUtils.maybeToString(localMessage.getFrom().getLocalpartOrNull());
                messageItem.timestamp = Calendar.getInstance()
                        .getTimeInMillis();
                messageItem.message = localMessage.getBody();
                messageItem.isNewMessage = true;

                boolean newMessage = true;
                List<ExtensionElement> extnElements = localMessage.getExtensions();
                for (ExtensionElement ext : extnElements) {
                    if (ext instanceof DelayInformation) {
                        newMessage = false;
                        DelayInformation delay = (DelayInformation) ext;
                    }

                }
                // if (!newMessage) {
                // return;
                // }

                // if (localMessage.getBody().equals("ANONYMOUS REQUEST")) {
                // ContactItem contact = new ContactItem();
                // contact.username =
                // StringUtils.parseName(localMessage.getFrom());
                // VCard card = new VCard();
                // try {
                // card.load(XMPP.getInstance().getConnection(context),
                // StringUtils.parseBareAddress(localMessage.getFrom()));
                // } catch (Exception e) {
                // e.printStackTrace();
                // }
                // if (card == null || card.getNickName() == null) {
                // contact.displayName = "Anonymous user";
                // } else {
                // contact.displayName = card.getNickName();
                // }
                // contact.isShowHome = true;
                // contact.isRegistered = true;
                // contact.anonymous = true;
                // DatabaseHelper.getInstance(context).updateContact(contact);
                // // return;
                // }
                // boolean messageNew = true;
                List<ExtensionElement> paramPacketExtension = paramPacket.getExtensions();
                for (ExtensionElement ext : ((Message) paramPacket)
                        .getExtensions()) {
                    if (ext instanceof DelayInformation) {
                        newMessage = false;
                        DelayInformation delay = (DelayInformation) ext;
                    }
                }
                if (!newMessage) {
                    return;
                }
                // }

                if (!isAppRunning(context)) {

                    Notifications.showIncomingMessageNotification(
                            context,
                            localMessage.getType() == Type.groupchat,
//                            localMessage.getFrom(),
                            StringUtils.maybeToString(localMessage.getFrom().getLocalpartOrNull()),
                            messageItem.message,
                            DatabaseHelper.getInstance(context).getDisplayName(
                                    context,
                                    StringUtils.maybeToString(localMessage.getFrom().getLocalpartOrNull())));

//                    StringUtils.maybeToString(localMessage.getFrom().getLocalpartOrNull()),
////                                    StringUtils.parseBareAddress(localMessage.getBody()), StringUtils.parseBareAddress(localMessage.getFrom()));
//                            localMessage.getBody(), StringUtils.maybeToString(localMessage.getFrom().getLocalpartOrNull()));

                    Log.e("tag", "message is not AppRunning context chat"
                            + localMessage);

                } else {
                    Log.e("tag", "message came isAppRunning context"
                            + localMessage + "," + messageItem.opponent);

                }

            }
        }
    }

    public static boolean isAppRunning(Context context) {
        ActivityManager am = (ActivityManager) context
                .getSystemService(Activity.ACTIVITY_SERVICE);
        // The first in the list of RunningTasks is always the foreground task.
        RunningTaskInfo foregroundTaskInfo = am.getRunningTasks(1).get(0);
        String foregroundTaskPackageName = foregroundTaskInfo.topActivity
                .getPackageName();
        return foregroundTaskPackageName.equals(context.getPackageName());
    }
}


text:
@interface LLCommandCompiler ()
- (void)decreaseCompilingCounter;
- (void)doneCompiling;
- (void)compileValueFromOptionValuePrototype:(LLOptionValuePrototype *)optionValue;
- (void)setCompiledValue:(id)compiledValue;
- (void)onFailedCompilingValueWithError:(NSError *)error;
- (void)pasteboardOptionValue;
- (void)lastPhotoOptionValue;
- (void)pickPhotoOptionValue;
@end

@implementation LLCommandCompiler

- (void)decreaseCompilingCounter {
    BOOL done;

    @synchronized(self) {
        self.compilingCounter--;
        done = self.compilingCounter <= 0;
    }

    if (done) {
        [self doneCompiling];
    }
}

- (void)doneCompiling {
    [self.delegate onFinishedCompilingCommandPrototype:self.compilingCommandPrototype withCompiledValue:self.compilingCommand];
}

- (void)compile:(LLCommandPrototype *)commandPrototype withDelegate:(id<LLCommandCompilerDelegate>)delegate andViewController:(UIViewController *)viewController {
    self.delegate = delegate;
    self.viewController = viewController;
    self.compilingCommand = [LLCommandFactory commandForString:commandPrototype.command];

    // Init compiling counter first
    // Since compiling can be executed in multiple threads, we should do this first
    // so that the counter won't be misbehaved
    for (LLOptionPrototype *option in commandPrototype.options) {
        for (LLOptionValuePrototype *optionValue in option.possibleValues.allValues) {
            if (optionValue.selected) {
                self.compilingCounter++;
                if (option.dataType != DATA_ARRAY) {
                    continue;
                }
            }
        }
    }

    if (self.compilingCounter == 0) {
        [self doneCompiling];
        return;
    }

    for (LLOptionPrototype *option in commandPrototype.options) {
        for (LLOptionValuePrototype *optionValue in option.possibleValues.allValues) {
            if (optionValue.selected) {
                self.compilingOption = option;
                [self compileValueFromOptionValuePrototype:optionValue];
                if (option.dataType != DATA_ARRAY) {
                    continue;
                }
            }
        }
    }
}

- (void)compileValueFromOptionValuePrototype:(LLOptionValuePrototype *)optionValue {
    id compiledValue = optionValue.value;

    if (!compiledValue) {
        // If value is nil, it needs to be got at runtime.
        // Check and get it now
        if ([optionValue.key isEqualToString:OPTION_VALUE_PASTEBOARD]) {
            [self pasteboardOptionValue];
        } else if ([optionValue.key isEqualToString:OPTION_VALUE_CAMERA_ROLL]) {
            [self lastPhotoOptionValue];
        } else if ([optionValue.key isEqualToString:OPTION_VALUE_IMAGE_PICK_LATER]) {
            [self pickPhotoOptionValue];
        } else if([optionValue.key isEqualToString:OPTION_VALUE_SERVICE_TYPE_FACEBOOK]) {
            [self setCompiledValue:OPTION_VALUE_SERVICE_TYPE_FACEBOOK];
        } else if([optionValue.key isEqualToString:OPTION_VALUE_SERVICE_TYPE_TWITTER]) {
            [self setCompiledValue:OPTION_VALUE_SERVICE_TYPE_TWITTER];
        } else if ([optionValue.key isEqualToString:OPTION_VALUE_SERVICE_TYPE_GOOGLE_PLUS]) {
            [self setCompiledValue:OPTION_VALUE_SERVICE_TYPE_GOOGLE_PLUS];
        } else if ([optionValue.key isEqualToString:OPTION_VALUE_PREFILL] && self.compilingOption.valueType == TYPE_BOOLEAN) {
            // Boolean prefill option value doesn't have value, because it's state can be determined using selected state.
            // When it reaches this like, selected is YES, so let's set the value to YES as well.
            [self setCompiledValue:[NSNumber numberWithBool:YES]];
        }
    } else {
        // Value is already there, don't need to wait for compiling, set it now
        [self setCompiledValue:compiledValue];
    }
}

- (void)setCompiledValue:(id)compiledValue {
    [self.compilingCommand setValue:compiledValue forKey:self.compilingOption.key];
    [self decreaseCompilingCounter];
}

- (void)onFailedCompilingValueWithError:(NSError *)error {
    [self.delegate onFailedCompilingCommandPrototype:self.compilingCommandPrototype withError:error];
    // Still call decrease, so that onFinishedCompilingCommandPrototype:withCompiledValue is still called if the counter reaches 0, because we want to ignore any failure.
    [self decreaseCompilingCounter];
}

- (void)pasteboardOptionValue {
    // TODO: support TYPE_BOOLEAN and TYPE_FILE as well
    UIPasteboard *pastebboard = [UIPasteboard generalPasteboard];

    OptionValueType type = self.compilingOption.valueType;
    if ([LLUtils isStringOptionValueType:type]) {
        [self setCompiledValue:pastebboard.string];
    } else if (type == TYPE_IMAGE) {
        [self setCompiledValue:pastebboard.image];
    }
}

- (void)lastPhotoOptionValue {
    ALAssetsLibrary *library = [[ALAssetsLibrary alloc] init];

    //Enumerate just saved photos and videos group
    [library enumerateGroupsWithTypes:ALAssetsGroupSavedPhotos usingBlock:^(ALAssetsGroup *group, BOOL *stop) {
        if (group) {
            // Within the group, get all photos
            [group setAssetsFilter:[ALAssetsFilter allPhotos]];

            // Last photo is the one has the last index
            //@TODO handle the case when there is no photo
            NSIndexSet *indexes = [NSIndexSet indexSetWithIndex:([group numberOfAssets] - 1)];
            [group enumerateAssetsAtIndexes:indexes options:0 usingBlock:^(ALAsset *result, NSUInteger index, BOOL *stop) {
                // The end of enumeration is a null asset
                UIImage *image;
                if (result) {
                    ALAssetRepresentation *representation = [result defaultRepresentation];
                    image = [UIImage imageWithCGImage:[representation fullScreenImage]];
                }

                //@TODO: may handle error when image can't be loaded.
                [self setCompiledValue:image];
            }];
        }
    } failureBlock:^(NSError *error) {
        [self onFailedCompilingValueWithError:error];
    }];
}

#pragma mark - Pick image using UIImagePickerController

- (void)pickPhotoOptionValue {
    NSError *error;
    //@TODO invetigate this, it doesn't work :|
//    if ([UIImagePickerController isSourceTypeAvailable:UIImagePickerControllerSourceTypePhotoLibrary]) {
//        error = [NSError errorWithDomain:ERROR_DOMAIN code:1 userInfo:[NSDictionary dictionaryWithObjectsAndKeys:@"Photo library is not available", NSLocalizedDescriptionKey, nil]];
//    }
    if (!self.viewController) {
        error = [NSError errorWithDomain:ERROR_DOMAIN code:2 userInfo:[NSDictionary dictionaryWithObjectsAndKeys:@"ViewController is not available", NSLocalizedDescriptionKey, nil]];
    }
    if (error) {
        [self onFailedCompilingValueWithError:error];
        return;
    }

    ALAssetsLibrary *library = [[ALAssetsLibrary alloc] init];
    [library enumerateGroupsWithTypes:ALAssetsGroupSavedPhotos usingBlock:^(ALAssetsGroup *group, BOOL *stop) {
        if (group) {
            UIImagePickerController *imagePickerController = [[UIImagePickerController alloc] init];
            imagePickerController.sourceType = UIImagePickerControllerSourceTypePhotoLibrary;
            // Only interested in image
            imagePickerController.mediaTypes = [[NSArray alloc] initWithObjects:(NSString *)kUTTypeImage, nil];
            imagePickerController.allowsEditing = NO;
            imagePickerController.delegate = self;

            [self.viewController presentViewController:imagePickerController animated:YES completion:nil];
        }
    } failureBlock:^(NSError *error) {
        [self onFailedCompilingValueWithError:error];
    }];
}

#pragma mark - Image Picker Delegate

- (void)imagePickerControllerDidCancel:(UIImagePickerController *)picker {
    [self.viewController dismissViewControllerAnimated:YES completion:^(){
        picker.delegate = nil;
        [self setCompiledValue:nil];
    }];
}

- (void)imagePickerController:(UIImagePickerController *)picker didFinishPickingMediaWithInfo:(NSDictionary *)info {
    [self.viewController dismissViewControllerAnimated:YES completion:^(){
        picker.delegate = nil;

        UIImage *image = (UIImage *)[info objectForKey:UIImagePickerControllerOriginalImage];
        [self setCompiledValue:image];
    }];
}

@end


text:
package com.countrygamer.pvz.block.plant.tile;

import com.countrygamer.core.Base.common.tileentity.TileEntityBase;

public class TileEntityThreePeater extends TileEntityBase {

	public TileEntityThreePeater() {

	}

}


text:
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
{-# LANGUAGE TypeOperators #-}
{-# LANGUAGE TypeSynonymInstances #-}

import Criterion.Main

import Criterion.Types
import Control.DeepSeq
import Data.Set (Set)

import qualified Data.Map as Map

import System.Directory
import System.IO.Unsafe (unsafePerformIO)

import AG
import Dag
import Dag.Internal
import Dag.AG

import qualified RepminPAG as PAG

import qualified DagSimple as Simple
import qualified DagSimple.Internal as Simple
import qualified DagSimple.AG as Simple
import LeavesBelow
import TypeInf hiding (Exp(..))
import Repmin
import qualified Feldspar
import Feldspar (Feldspar (..),sizeInfS,sizeInfI,sizeInf,constFoldS,simplifier,simplify,renameFeld)

--------------------------------------------------------------------------------
-- * Setup
--------------------------------------------------------------------------------

class Functor f => NFDataF f
  where
    rnfF :: NFData a => f a -> ()

instance NFData Zero where
    rnf _ = ()

instance (NFData a, NFDataF f) => NFData (Free f a)
  where
    rnf (In f) = rnfF f
    rnf (Ret x) = rnf x `seq` ()

instance NFDataF f => NFDataF (Free f)
  where
    rnfF (In f) = rnfF f
    rnfF (Ret x) = rnf x `seq` ()

instance NFDataF f => NFData (Simple.Dag f)
  where
    rnf (Simple.Dag r es n) = rnf r `seq` rnf n `seq` rnf (fmap rnfF es)

instance NFDataF f => NFData (Dag f)
  where
    rnf (Dag r es n) = rnfF r `seq` rnf n `seq` rnf (fmap rnfF es)

instance NFDataF IntTreeF
  where
    rnfF (Leaf l)   = rnf l `seq` ()
    rnfF (Node a b) = rnf a `seq` rnf b `seq` ()

instance NFDataF Feldspar where
  rnfF (Var n) = rnf n `seq` ()
  rnfF (LitB b) = rnf b `seq` ()
  rnfF (LitI i) = rnf i `seq` ()
  rnfF (Add x y) = rnf x `seq` rnf y `seq` ()
  rnfF (Sub x y) = rnf x `seq` rnf y `seq` ()
  rnfF (Mul x y) = rnf x `seq` rnf y `seq` ()
  rnfF (Eq x y) = rnf x `seq` rnf y `seq` ()
  rnfF (Min x y) = rnf x `seq` rnf y `seq` ()
  rnfF (Max x y) = rnf x `seq` rnf y `seq` ()
  rnfF (If x y z) = rnf x `seq` rnf y `seq` rnf z `seq` ()
  rnfF (Let x y z) = rnf x `seq` rnf y `seq` rnf z `seq` ()
  rnfF (Arr x y z) = rnf x `seq` rnf y `seq` rnf z `seq` ()
  rnfF (Ix x y) = rnf x `seq` rnf y `seq` ()

instance NFData Type where
  rnf BoolType = ()
  rnf IntType = ()

instance NFDataF ExpF where
  rnfF (Var' n) = rnf n `seq` ()
  rnfF (LitB' b) = rnf b `seq` ()
  rnfF (LitI' i) = rnf i `seq` ()
  rnfF (Add' x y) = rnf x `seq` rnf y `seq` ()
  rnfF (Eq' x y) = rnf x `seq` rnf y `seq` ()
  rnfF (If' x y z) = rnf x `seq` rnf y `seq` rnf z `seq` ()
  rnfF (Iter' w x y z) = rnf w `seq` rnf x `seq` rnf y `seq` rnf z `seq` ()

expTree :: Int -> Tree IntTreeF
expTree 1 = In $ Leaf 10
expTree n = In $ Node (expTree (n-1)) (expTree (n-1))

expSimple :: Int -> Simple.Dag IntTreeF
expSimple = Simple.termTree . expTree

expDag :: Int -> Dag.Dag IntTreeF
expDag = Dag.termTree . expTree

linearSimple :: Int -> Simple.Dag IntTreeF
linearSimple n = Simple.mkDag 0 $
    [(k, Node (k+1) (k+1)) | k <- [0..n-2] ] ++ [(n-1, Leaf 10)]

linearDag :: Int -> Dag.Dag IntTreeF
linearDag n = mkDag (Node (Ret 0) (Ret 0))  $
    [(k, Node (Ret (k+1)) (Ret (k+1))) | k <- [0..n-3] ] ++ [(n-2, Leaf 10)]

--------------------------------------------------------------------------------
-- * Reduce
--------------------------------------------------------------------------------

-- This benchmark is designed to be as simple as possible: only integer
-- attributes and simple semantic functions. This is to make be able to test the
-- efficiency of the run functions themselves.
--
-- The benchmark is run with different AG implementations and dag
-- representations. The names of the benchmarks use "Dag" and "Simple"
-- to indicate that they use the "Dag" and "DagSimple" module,
-- respectively.  The benchmarks mentioned in the paper use the
-- mutable vector implementation.

newtype Value = Value Int deriving (Eq, Ord, Show, Num, Enum)
newtype Depth = Depth Int deriving (Eq, Ord, Show, Num, Enum)

value :: (Depth :< a) => Syn IntTreeF a Value
value (Leaf l) = Value (l+d)
  where
    Depth d = above
value (Node a b) = max (below a) (below b)

depth :: Inh IntTreeF a Depth
depth (Node a b) = a |-> d & b |-> d
  where
    d = above+1
depth _ = o

reduce :: Tree IntTreeF -> Int
reduce = fromEnum . runAG value depth (const 0)

reduceS :: Simple.Dag IntTreeF -> Int
reduceS = fromEnum . Simple.runAGDag max value depth (const 0)

reduceG :: Dag IntTreeF -> Int
reduceG = fromEnum . runAGDag max value depth (const 0)

bench' str f arg = rnf arg `seq` bench str (nf f arg)

reduce_expTree n = bgroup "Tree"
    [bench' (show n) reduce $ expTree n | n <- [startN..n]]
  -- Grows exponentially

reduce_expSimple n = bgroup "Simple"
    [bench' (show n) reduceS $ expSimple n | n <- [startN..n]]

reduce_expDag n = bgroup "Dag"
    [bench' (show n) reduceG $ expDag n | n <- [startN..n]]

reduce_linearSimple n = bgroup "Simple"
    [bench' (show n) reduceS $ linearSimple n | n <- [startN..n]]
  -- Grows linearly

reduce_linearDag n = bgroup "Dag"
    [bench' (show n) reduceG $ linearDag n | n <- [startN..n]]
  -- Grows linearly

reduce_linearSimpleBig n = bgroup "Simple"
    [bench' (show n) reduceS $ linearSimple n | n <- [100,200..n]]
  -- Grows linearly even for sizes that are out of reach for `reduce`

reduce_linearDagBig n = bgroup "Dag"
    [bench' (show n) reduceG $ linearDag n | n <- [100,200..n]]
  -- Grows linearly even for sizes that are out of reach for `reduce`

conf name = defaultConfig
    { reportFile      = Just $ "reports/" ++ name ++ ".html"
    , csvFile = Just $ "reports/" ++ name ++ ".csv"
    }

--------------------------------------------------------------------------------
-- * Repmin
--------------------------------------------------------------------------------

repminSimple :: Simple.Dag IntTreeF -> Simple.Tree IntTreeF
repminSimple =  snd . Simple.runAGDag const (minS |*| rep) minI init
  where init (MinS i,_) = MinI i

repminSimple' :: Simple.Dag IntTreeF -> Simple.Dag IntTreeF
repminSimple' = snd . Simple.runRewriteDag const minS minI rep' init
  where init (MinS i) = MinI i

-- The results for `repmin` are quite consistent with those for `reduce`. One
-- important difference is that `repmin` produces a tree as result, which means
-- that simply forcing a bit result takes some time.

repmin_expTreeAG n = bgroup "TreeAG"
    [bench' (show n) repmin $ expTree n | n <- [startN..n]]

repmin_expTreePAG n = bgroup "TreePAG"
    [bench' (show n) PAG.repmin $ expTree n | n <- [startN..n]]

repmin_expTree n = bgroup "Tree"
    [bench' (show n) repmin' $ expTree n | n <- [startN..n]]

repmin_expDagAG n = bgroup "DagAG"
    [bench' (show n) repminG $ expDag n | n <- [startN..n]]

repmin_expDagPAG n = bgroup "DagPAG"
    [bench' (show n) PAG.repminG $ expDag n | n <- [startN..n]]

repmin_expDag n = bgroup "Dag"
    [bench' (show n) repminG' $ expDag n | n <- [startN..n]]

repmin_expSimpleAG n = bgroup "SimpleAG"
    [bench' (show n) repminSimple $ expSimple n | n <- [startN..n]]

repmin_expSimple n = bgroup "Simple"
    [bench' (show n) repminSimple' $ expSimple n | n <- [startN..n]]

repmin_linearSimpleAG n = bgroup "SimpleAG"
    [bench' (show n) repminSimple $ linearSimple n | n <- [startN..n]]

repmin_linearSimple n = bgroup "Simple"
    [bench' (show n) repminSimple' $ linearSimple n | n <- [startN..n]]

repmin_linearDagAG n = bgroup "DagAG"
    [bench' (show n) repminG $ linearDag n | n <- [startN..n]]

repmin_linearDagPAG n = bgroup "DagPAG"
    [bench' (show n) PAG.repminG $ linearDag n | n <- [startN..n]]

repmin_linearDag n = bgroup "Dag"
    [bench' (show n) repminG' $ linearDag n | n <- [startN..n]]

repmin_linearDagBigPAG n = bgroup "DagPAG"
    [bench' (show n) PAG.repminG $ linearDag n | n <- [100,200..n]]

repmin_linearSimpleBig n = bgroup "Simple"
    [bench' (show n) repminSimple' $ linearSimple n | n <- [100,200..n]]

repmin_linearDagBig n = bgroup "Dag"
    [bench' (show n) repminG' $ linearDag n | n <- [100,200..n]]

------------------
-- repminDouble --
------------------

repDouble' ::  (MinI :< atts) => Rewrite IntTreeF atts IntTreeF
repDouble' (Leaf i)    =  In (Node (In (Leaf globMin)) (In (Leaf i)))
repDouble' (Node a b)  =  In (Node (Ret a) (Ret b))

repDouble ::  (MinI :< atts) => Syn IntTreeF atts (Tree IntTreeF)
repDouble (Leaf i)    =  In (Node (In (Leaf globMin)) (In (Leaf i)))
repDouble (Node a b)  =  In (Node (below a) (below b))

repminDoubleSimple' :: Simple.Dag IntTreeF -> Simple.Dag IntTreeF
repminDoubleSimple' = snd . Simple.runRewriteDag const minS minI repDouble' init
  where init (MinS i) = MinI i

repminDoubleSimple :: Simple.Dag IntTreeF -> Simple.Tree IntTreeF
repminDoubleSimple =  snd . Simple.runAGDag const (minS |*| repDouble) minI init
  where init (MinS i,_) = MinI i

repminDoubleG' :: Dag IntTreeF -> Dag IntTreeF
repminDoubleG' = snd . runRewriteDag const minS minI repDouble' init
  where init (MinS i) = MinI i

repminDouble' :: Tree IntTreeF -> Tree IntTreeF
repminDouble' = snd . runRewrite minS minI repDouble' init
  where init (MinS i) = MinI i

repminDouble :: Tree IntTreeF -> Tree IntTreeF
repminDouble = snd . runAG (minS |*| repDouble) minI init
  where init (MinS i,_) = MinI i

repminDoubleG :: Dag IntTreeF -> Tree IntTreeF
repminDoubleG =  snd . runAGDag const (minS |*| repDouble) minI init
  where init (MinS i,_) = MinI i

repminDouble_expTreeAG n = bgroup "TreeAG"
    [bench' (show n) repminDouble $ expTree n | n <- [startN..n]]

repminDouble_expTreePAG n = bgroup "TreePAG"
    [bench' (show n) PAG.repminDouble $ expTree n | n <- [startN..n]]

repminDouble_expTree n = bgroup "Tree"
    [bench' (show n) repminDouble' $ expTree n | n <- [startN..n]]

repminDouble_expDagAG n = bgroup "DagAG"
    [bench' (show n) repminDoubleG $ expDag n | n <- [startN..n]]

repminDouble_expDagPAG n = bgroup "DagPAG"
    [bench' (show n) PAG.repminDoubleG $ expDag n | n <- [startN..n]]

repminDouble_expDag n = bgroup "Dag"
    [bench' (show n) repminDoubleG' $ expDag n | n <- [startN..n]]

repminDouble_expSimpleAG n = bgroup "SimpleAG"
    [bench' (show n) repminDoubleSimple $ expSimple n | n <- [startN..n]]

repminDouble_expSimple n = bgroup "Simple"
    [bench' (show n) repminDoubleSimple' $ expSimple n | n <- [startN..n]]

repminDouble_linearSimpleAG n = bgroup "SimpleAG"
    [bench' (show n) repminDoubleSimple $ linearSimple n | n <- [startN..n]]

repminDouble_linearSimple n = bgroup "Simple"
    [bench' (show n) repminDoubleSimple' $ linearSimple n | n <- [startN..n]]

repminDouble_linearDagAG n = bgroup "DagAG"
    [bench' (show n) repminDoubleG $ linearDag n | n <- [startN..n]]

repminDouble_linearDagPAG n = bgroup "DagPAG"
    [bench' (show n) PAG.repminDoubleG $ linearDag n | n <- [startN..n]]

repminDouble_linearDag n = bgroup "Dag"
    [bench' (show n) repminDoubleG' $ linearDag n | n <- [startN..n]]

repminDouble_linearDagBigPAG n = bgroup "DagPAG"
    [bench' (show n) PAG.repminDoubleG $ linearDag n | n <- [100,200..n]]

repminDouble_linearSimpleBig n = bgroup "Simple"
    [bench' (show n) repminDoubleSimple' $ linearSimple n | n <- [100,200..n]]

repminDouble_linearDagBig n = bgroup "Dag"
    [bench' (show n) repminDoubleG' $ linearDag n | n <- [100,200..n]]

-----------------
-- leavesBelow --
-----------------

leavesBelowSimple :: Int -> Simple.Dag IntTreeF -> Set Int
leavesBelowSimple d = Simple.runAGDag min leavesBelowS leavesBelowI (const d)

leavesBelow_expTree n = bgroup "Tree"
    [bench' (show n) (leavesBelow' 20) $ expTree n | n <- [startN..n]]

leavesBelow_expSimple n = bgroup "Simple"
    [bench' (show n) (leavesBelowSimple 20) $ expSimple n | n <- [startN..n]]

leavesBelow_expDag n = bgroup "Dag"
    [bench' (show n) (leavesBelowG 20) $ expDag n | n <- [startN..n]]

leavesBelow_linearSimple n = bgroup "Simple"
    [bench' (show n) (leavesBelowSimple 20) $ linearSimple n | n <- [startN..n]]

leavesBelow_linearDag n = bgroup "Dag"
    [bench' (show n) (leavesBelowG 20) $ linearDag n | n <- [startN..n]]

leavesBelow_linearSimpleBig n = bgroup "Simple"
    [bench' (show n) (leavesBelowSimple 20) $ linearSimple n | n <- [100,200..n]]

leavesBelow_linearDagBig n = bgroup "Dag"
    [bench' (show n) (leavesBelowG 20) $ linearDag n | n <- [100,200..n]]

-----------------------
-- Feldspar simplify --
-----------------------

simplifySimple :: Simple.Dag Feldspar -> Simple.Dag Feldspar
simplifySimple
    = snd
    . Simple.runRewriteDag
        trueIntersection
        (sizeInfS |*| constFoldS)
        sizeInfI
        simplifier
        (const Map.empty)

simplifyDag :: Dag Feldspar -> Dag Feldspar
simplifyDag
    = snd
    . runRewriteDag
        trueIntersection
        (sizeInfS |*| constFoldS)
        sizeInfI
        simplifier
        (const Map.empty)

exTree :: [Tree Feldspar]
exTree = map Feldspar.unData [Feldspar.ex1, Feldspar.ex2, Feldspar.ex3]

exDag :: [Dag Feldspar]
{-# NOINLINE exDag #-}
exDag = map renameFeld $ unsafePerformIO $ mapM reifyDag exTree

exSimple :: [Simple.Dag Feldspar]
exSimple = map Simple.toSimple exDag

simplify_Tree = bgroup "Tree"
    [bench' (show n) simplify $ exTree !! n | n <- [0..length exTree -1]]

simplify_Dag = bgroup "Dag"
    [bench' (show n) simplifyDag $ exDag !! n | n <- [0..length exDag - 1 ]]

simplify_Simple = bgroup "Simple"
    [bench' (show n) simplifySimple $ exSimple !! n | n <- [0..length exSimple - 1]]

--------------------
-- type inference --
--------------------

typeInfSimple :: Env -> Simple.Dag ExpF -> Maybe Type
typeInfSimple env = Simple.runAGDag trueIntersection typeInfS typeInfI (const env)

exlTree :: [Tree ExpF]
exlTree = [gt1,gt2,gt3]

exlDag :: [Dag ExpF]
{-# NOINLINE exlDag #-}
exlDag = map rename' . unsafePerformIO $ mapM reifyDag exlTree

exlSimple :: [Simple.Dag ExpF]
exlSimple = map Simple.toSimple exlDag

typeInf_Tree = bgroup "Tree"
    [bench' (show n) (typeInf Map.empty) $ exlTree !! n | n <- [0..length exlTree -1]]

typeInf_Dag = bgroup "Dag"
    [bench' (show n) (typeInfG Map.empty) $ exlDag !! n | n <- [0..length exlDag - 1 ]]

typeInf_Simple = bgroup "Simple"
    [bench' (show n) (typeInfSimple Map.empty) $ exlSimple !! n | n <- [0..length exlSimple - 1]]

startN = 4

main = do
    createDirectoryIfMissing False "reports"

    defaultMainWith (conf "reduce_exp")          [reduce_expTree         16
                                                 ,reduce_expDag          16
                                                 ,reduce_expSimple       16]

    defaultMainWith (conf "reduce_linear")        [reduce_linearDag       16
                                                  ,reduce_linearSimple    16]

    defaultMainWith (conf "reduce_big_linear")    [reduce_linearDagBig    1000
                                                  ,reduce_linearSimpleBig 1000]

    defaultMainWith (conf "repmin_exp")          [repmin_expTreeAG       16
                                                 ,repmin_expTreePAG      16
                                                 ,repmin_expTree         16
                                                 ,repmin_expDagAG        16
                                                 ,repmin_expDagPAG       16
                                                 ,repmin_expDag          16
                                                 ,repmin_expSimpleAG     16
                                                 ,repmin_expSimple       16]

    defaultMainWith (conf "repmin_linear")        [repmin_linearDagAG     16
                                                  ,repmin_linearDagPAG    16
                                                  ,repmin_linearDag       16
                                                  ,repmin_linearSimpleAG  16
                                                  ,repmin_linearSimple    16]

    defaultMainWith (conf "repmin_big_linear") [repmin_linearSimpleBig 1000
                                               ,repmin_linearDagBigPAG 1000
                                               ,repmin_linearDagBig    1000]

    defaultMainWith (conf "repminDouble_exp")          [repminDouble_expTreeAG       16
                                                 ,repminDouble_expTreePAG      16
                                                 ,repminDouble_expTree         16
                                                 ,repminDouble_expDagAG        16
                                                 ,repminDouble_expDagPAG       16
                                                 ,repminDouble_expDag          16
                                                 ,repminDouble_expSimpleAG     16
                                                 ,repminDouble_expSimple       16]

    defaultMainWith (conf "repminDouble_linear")        [repminDouble_linearDagAG     16
                                                  ,repminDouble_linearDagPAG    16
                                                  ,repminDouble_linearDag       16
                                                  ,repminDouble_linearSimpleAG  16
                                                  ,repminDouble_linearSimple    16]

    defaultMainWith (conf "repminDouble_big_linear") [repminDouble_linearSimpleBig 1000
                                               ,repminDouble_linearDagBigPAG 1000
                                               ,repminDouble_linearDagBig    1000]

    defaultMainWith (conf "leavesBelow_exp")          [leavesBelow_expTree         16
                                                      ,leavesBelow_expDag          16
                                                      ,leavesBelow_expSimple       16]

    defaultMainWith (conf "leavesBelow_linear")        [leavesBelow_linearDag       16
                                                       ,leavesBelow_linearSimple    16]

    defaultMainWith (conf "leavesBelow_big_linear")    [leavesBelow_linearDagBig    1000
                                                        ,leavesBelow_linearSimpleBig 1000]

    defaultMainWith (conf "simplify")          [simplify_Tree
                                               ,simplify_Dag
                                               ,simplify_Simple]

    defaultMainWith (conf "typeInf")          [typeInf_Tree
                                              ,typeInf_Dag
                                              ,typeInf_Simple]


text:
var MrDoobStats = require('../../vendor/Stats');

var Stats = function( poem ) {

	this.poem = poem;

	this.stats = new MrDoobStats();
	this.stats.domElement.style.position = 'absolute';
	this.stats.domElement.style.top = '0px';
	$( this.poem.div ).append( this.stats.domElement );

	this.poem.on( 'update', this.stats.update.bind( this.stats ) );

};

module.exports = Stats;


text:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">

<title>org.apache.catalina (Apache Tomcat 8.0.14 API Documentation)</title>
<meta name="date" content="2014-09-24">
<link rel="stylesheet" type="text/css" href="../../../stylesheet.css" title="Style">

JavaScript is disabled on your browser.

Overview

Package

Class

Tree

Deprecated

Index

Help

Apache Tomcat 8.0.14

Prev Package

Next Package

Frames

No Frames

All Classes

Package org.apache.catalina

Interface Summary

Interface
Description

AccessLog

Intended for use by a Valve to indicate that the Valve
 provides access logging.

AsyncDispatcher

Authenticator

An Authenticator is a component (usually a Valve or Container) that
 provides some sort of authentication service.

Cluster

A Cluster works as a Cluster client/server for the local host
 Different Cluster implementations can be used to support different
 ways to communicate within the Cluster.

Contained

Decoupling interface which specifies that an implementing class is
 associated with at most one Container instance.

Container

A Container is an object that can execute requests received from
 a client, and return responses based on those requests.

ContainerListener

Interface defining a listener for significant Container generated events.

ContainerServlet

A ContainerServlet is a servlet that has access to Catalina
 internal functionality, and is loaded from the Catalina class loader
 instead of the web application class loader.

Context

A Context is a Container that represents a servlet context, and
 therefore an individual web application, in the Catalina servlet engine.

DistributedManager

Interface implemented by session managers that do not keep a complete copy
 of all sessions in memory but do know where every session is.

Engine

An Engine is a Container that represents the entire Catalina servlet
 engine.

Executor

Group

Abstract representation of a group of Users in a
 UserDatabase.

Host

A Host is a Container that represents a virtual host in the
 Catalina servlet engine.

InstanceListener

Interface defining a listener for significant events related to a
 specific servlet instance, rather than to the Wrapper component that
 is managing that instance.

JmxEnabled

This interface is implemented by components that will be registered with an
 MBean server when they are created and unregistered when they are destroyed.

Lifecycle

Common interface for component life cycle methods.

LifecycleListener

Interface defining a listener for significant events (including "component
 start" and "component stop" generated by a component that implements the
 Lifecycle interface.

Loader

A Loader represents a Java ClassLoader implementation that can
 be used by a Container to load class files (within a repository associated
 with the Loader) that are designed to be reloaded upon request, as well as
 a mechanism to detect whether changes have occurred in the underlying
 repository.

Manager

A Manager manages the pool of Sessions that are associated with a
 particular Container.

Pipeline

Interface describing a collection of Valves that should be executed
 in sequence when the invoke() method is invoked.

Realm

A Realm is a read-only facade for an underlying security realm
 used to authenticate individual users, and identify the security roles
 associated with those users.

Role

Abstract representation of a security role, suitable for use in
 environments like JAAS that want to deal with Principals.

Server

A Server element represents the entire Catalina
 servlet container.

Service

A Service is a group of one or more
 Connectors that share a single Container
 to process their incoming requests.

Session

A Session is the Catalina-internal facade for an
 HttpSession that is used to maintain state information
 between requests for a particular user of a web application.

SessionIdGenerator

SessionListener

Interface defining a listener for significant Session generated events.

Store

A Store is the abstraction of a Catalina component that provides
 persistent storage and loading of Sessions and their associated user data.

StoreManager

PersistentManager would have been a better name but that would have clashed
 with the implementation name.

ThreadBindingListener

Callback for establishing naming association when entering the application
 scope.

TomcatPrincipal

Defines additional methods implemented by Principals created by
 Tomcat's standard Realm implementations.

TrackedWebResource

User

Abstract representation of a user in a UserDatabase.

UserDatabase

Abstract representation of a database of Users and
 Groups that can be maintained by an application,
 along with definitions of corresponding Roles, and
 referenced by a Realm for authentication and access control.

Valve

A Valve is a request processing component associated with a
 particular Container.

WebResource

Represents a file or directory within a web application.

WebResourceRoot

Represents the complete set of resources for a web application.

WebResourceSet

Represents a set of resources that are part of a web application.

Wrapper

A Wrapper is a Container that represents an individual servlet
 definition from the deployment descriptor of the web application.

Class Summary

Class
Description

ContainerEvent

General event for notifying listeners of significant changes on a Container.

Globals

Global constants that are applicable to multiple packages within Catalina.

InstanceEvent

General event for notifying listeners of significant events related to
 a specific instance of a Servlet, or a specific instance of a Filter,
 as opposed to the Wrapper component that manages it.

LifecycleEvent

General event for notifying listeners of significant changes on a component
 that implements the Lifecycle interface.

SessionEvent

General event for notifying listeners of significant changes on a Session.

Enum Summary

Enum
Description

LifecycleState

The list of valid states for components that implement Lifecycle.

WebResourceRoot.ResourceSetType

Exception Summary

Exception
Description

LifecycleException

General purpose exception that is thrown to indicate a lifecycle related
 problem.

Overview

Package

Class

Tree

Deprecated

Index

Help

Apache Tomcat 8.0.14

Prev Package

Next Package

Frames

No Frames

All Classes

Copyright © 2000-2014 Apache Software Foundation. All Rights Reserved.


text:
package com.cyq.mvshow;

import android.app.Activity;
import android.app.Application;
import android.content.Context;
import android.os.Bundle;

import com.cyq.mvshow.server.TianGouDataLoader;
import com.cyq.mvshow.service.MyPushIntentService;
import com.cyq.mvshow.utils.LogUtil;
import com.facebook.drawee.backends.pipeline.Fresco;
import com.lzy.okgo.OkGo;
import com.lzy.okgo.cache.CacheMode;
import com.umeng.message.IUmengRegisterCallback;
import com.umeng.message.PushAgent;

import java.util.ArrayList;
import java.util.List;

/**
 * Created by win7 on 2016/9/19.
 */
public class MyApplication extends Application {
    private static MyApplication sVobotApplication;

    private List<Activity> activities = new ArrayList<Activity>();

    @Override
    public void onCreate() {
        super.onCreate();
        sVobotApplication = this;
        registerLifeCycleCallback();
        initOkGo();
        frescoInit(this.getInstance());
        TianGouDataLoader.init(this.getInstance());
        initPushSDK();

    }

    private void initPushSDK() {
        PushAgent mPushAgent = PushAgent.getInstance(this);
        //注册推送服务,每次调用register方法都会回调该接口
        mPushAgent.register(new IUmengRegisterCallback() {

            @Override
            public void onSuccess(String deviceToken) {
                //注册成功会返回device token
                LogUtil.d("mPushAgent","onSuccess");
            }

            @Override
            public void onFailure(String s, String s1) {
                LogUtil.e("mPushAgent","onFailure");

            }
        });
        //设置自定义接收消息
        mPushAgent.setPushIntentServiceClass(MyPushIntentService.class);
        if (BuildConfig.DEBUG) {
            //如果不是debug模式,则关闭日志
            mPushAgent.setDebugMode(false);
        }
    }

    private void frescoInit(Context context) {
        Fresco.initialize(context);
    }

    public static MyApplication getInstance() {
        return sVobotApplication;
    }

    private void addCreatedActivity(Activity activity) {
        activities.add(activity);
    }

    private void removeDestroyedActivity(Activity activity) {
        activities.remove(activity);
        if (activities.size() == 0) {
            onTerminate();
        }
    }

    @Override
    public void onTerminate() {
        super.onTerminate();

        for (Activity activity : activities) {
            activity.finish();
        }

        onDestroy();

        System.exit(0);
    }

    /**
     * 网络框架初始化
     */
    private void initOkGo() {
        //必须调用初始化
        OkGo.init(this);
        //---------这里给出的是示例代码,告诉你可以这么传,实际使用的时候,根据需要传,不需要就不传-------------//
//        HttpHeaders headers = new HttpHeaders();
//        headers.put("commonHeaderKey1", "commonHeaderValue1");    //header不支持中文
//        headers.put("commonHeaderKey2", "commonHeaderValue2");
//        HttpParams params = new HttpParams();
//        params.put("commonParamsKey1", "commonParamsValue1");     //param支持中文,直接传,不要自己编码
//        params.put("commonParamsKey2", "这里支持中文参数");
        //-----------------------------------------------------------------------------------//
        try {
            //以下都不是必须的,根据需要自行选择,一般来说只需要 debug,缓存相关,cookie相关的 就可以了
            OkGo.getInstance()

                    //打开该调试开关,控制台会使用 红色error 级别打印log,并不是错误,是为了显眼,不需要就不要加入该行
                    .debug("OkGo")

                    //如果使用默认的 60秒,以下三行也不需要传
                    .setConnectTimeout(OkGo.DEFAULT_MILLISECONDS)  //全局的连接超时时间
                    .setReadTimeOut(OkGo.DEFAULT_MILLISECONDS)     //全局的读取超时时间
                    .setWriteTimeOut(OkGo.DEFAULT_MILLISECONDS)    //全局的写入超时时间

                    //可以全局统一设置缓存模式,默认是不使用缓存,可以不传,具体其他模式看 github 介绍 https://github.com/jeasonlzy/
                    .setCacheMode(CacheMode.FIRST_CACHE_THEN_REQUEST)

                    //可以全局统一设置缓存时间,默认永不过期,具体使用方法看 github 介绍
                    .setCacheTime(1000 * 60 * 60 * 24 * 2);

            //如果不想让框架管理cookie,以下不需要
//                .setCookieStore(new MemoryCookieStore())                //cookie使用内存缓存(app退出后,cookie消失)
//                    .setCookieStore(new PersistentCookieStore())          //cookie持久化存储,如果cookie不过期,则一直有效

            //可以设置https的证书,以下几种方案根据需要自己设置,不需要不用设置
//                    .setCertificates()                                  //方法一:信任所有证书
//                    .setCertificates(getAssets().open("srca.cer"))      //方法二:也可以自己设置https证书
//                    .setCertificates(getAssets().open("aaaa.bks"), "123456", getAssets().open("srca.cer"))//方法三:传入bks证书,密码,和cer证书,支持双向加密

            //可以添加全局拦截器,不会用的千万不要传,错误写法直接导致任何回调不执行
//                .addInterceptor(new Interceptor() {
//                    @Override
//                    public Response intercept(Chain chain) throws IOException {
//                        return chain.proceed(chain.request());
//                    }
//                })

            //这两行同上,不需要就不要传
//                    .addCommonHeaders(headers)                                         //设置全局公共头
//                    .addCommonParams(params);                                          //设置全局公共参数
        } catch (Exception e) {
            e.printStackTrace();
        }
    }

    private void onDestroy() {
    }

    private void registerLifeCycleCallback() {
        this.registerActivityLifecycleCallbacks(new ActivityLifecycleCallbacks() {
            @Override
            public void onActivityCreated(Activity activity, Bundle savedInstanceState) {
                addCreatedActivity(activity);
            }

            @Override
            public void onActivityStarted(Activity activity) {

            }

            @Override
            public void onActivityResumed(Activity activity) {

            }

            @Override
            public void onActivityPaused(Activity activity) {

            }

            @Override
            public void onActivityStopped(Activity activity) {

            }

            @Override
            public void onActivitySaveInstanceState(Activity activity, Bundle outState) {

            }

            @Override
            public void onActivityDestroyed(Activity activity) {
                removeDestroyedActivity(activity);

            }
        });
    }
}


text:
Image::Image(unsigned int width, unsigned int height)
{
    pixels.resize(height);
    for(unsigned int i = 0; i < height; i++)
    {
        pixels[i].resize(width);
        for(unsigned int j = 0; j < width; j++)
            pixels[i][j].resize(4);
    }
}


text:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
		"http://www.w3.org/TR/html4/strict.dtd">

		<title>doh.robot Editor NewPage Plugin Test</title>


text:
/**
 \unit

 !!!Purpose

 Definition of a class for implementing a USB device CDC serial driver.

 !!!Usage

 -# Re-implement the USBDCallbacks_RequestReceived method to pass
    received requests to CDCDSerialDriver_RequestHandler. *This is
    automatically done unless the NOAUTOCALLBACK symbol is defined*.
 -# Initialize the CDC serial and USB drivers using
    CDCDSerialDriver_Initialize.
 -# Logically connect the device to the host using USBD_Connect.
 -# Send serial data to the USB host using CDCDSerialDriver_Write.
 -# Receive serial data from the USB host using CDCDSerialDriver_Read.
*/

#ifndef CDCDSERIALDRIVER_H
#define CDCDSERIALDRIVER_H

//------------------------------------------------------------------------------
//         Headers
//------------------------------------------------------------------------------

#include <usb/common/core/USBGenericRequest.h>
#include <usb/device/core/USBD.h>

//------------------------------------------------------------------------------
//         Definitions
//------------------------------------------------------------------------------

//------------------------------------------------------------------------------
/// \page "CDC Serial Port States"
/// This page lists the bit map for CDC Serial Port States.
///
/// !BitMaps
/// - CDCDSerialDriver_STATE_RXDRIVER
/// - CDCDSerialDriver_STATE_TXCARRIER
/// - CDCDSerialDriver_STATE_BREAK
/// - CDCDSerialDriver_STATE_RINGSIGNAL
/// - CDCDSerialDriver_STATE_FRAMING
/// - CDCDSerialDriver_STATE_PARITY
/// - CDCDSerialDriver_STATE_OVERRUN

/// Indicates the receiver carrier signal is present.
#define CDCDSerialDriver_STATE_RXDRIVER         (1 << 0)
/// Indicates the transmission carrier signal is present.
#define CDCDSerialDriver_STATE_TXCARRIER        (1 << 1)
/// Indicates a break has been detected.
#define CDCDSerialDriver_STATE_BREAK            (1 << 2)
/// Indicates a ring signal has been detected.
#define CDCDSerialDriver_STATE_RINGSIGNAL       (1 << 3)
/// Indicates a framing error has occured.
#define CDCDSerialDriver_STATE_FRAMING          (1 << 4)
/// Indicates a parity error has occured.
#define CDCDSerialDriver_STATE_PARITY           (1 << 5)
/// Indicates a data overrun error has occured.
#define CDCDSerialDriver_STATE_OVERRUN          (1 << 6)
//------------------------------------------------------------------------------

//------------------------------------------------------------------------------
//      Exported functions
//------------------------------------------------------------------------------

extern void CDCDSerialDriver_Initialize();

extern void CDCDSerialDriver_RequestHandler(const USBGenericRequest *request);

extern unsigned char CDCDSerialDriver_Write(
    void *data,
    unsigned int size,
    TransferCallback callback,
    void *argument);

extern unsigned char CDCDSerialDriver_Read(
    void *data,
    unsigned int size,
    TransferCallback callback,
    void *argument);

extern unsigned short CDCDSerialDriver_GetSerialState();

extern void CDCDSerialDriver_SetSerialState(unsigned short serialState);

#endif //#ifndef CDCSERIALDRIVER_H


text:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<title>cnf: AllocMemdiscard Class Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="search/search.css" rel="stylesheet" type="text/css"/>

<link href="doxygen.css" rel="stylesheet" type="text/css"/>

Main Page

Classes

Files

          <input type="text" id="MSearchField" value="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)"
               onblur="searchBox.OnSearchFieldFocus(false)"
               onkeyup="searchBox.OnSearchFieldChange(event)"/>

Class List

Class Index

Class Members

Public Member Functions

AllocMemdiscard Class Reference

#include <allocmd.h>

List of all members.

Public Member Functions

 	AllocMemdiscard (size_t)

void * 	alloc (size_t)

void 	reset ()

Detailed Description

written by kei.uchiumi implementated Memory Discard Strategy Copyright (C) 2010- Kei Uchiumi

Constructor & Destructor Documentation

          AllocMemdiscard::AllocMemdiscard
          (
          size_t
           heapsize
           )

Copyright (C) 2010- Kei Uchiumi

The documentation for this class was generated from the following files:

lib/allocmd.h

lib/allocmd.cpp

 All Classes Functions

<address class="footer">Generated on Sat Aug 14 2010 23:34:02 for cnf by

 1.7.1 </address>


text:
CREATE TABLE IF NOT EXISTS structure (
  id INTEGER AUTO_INCREMENT UNIQUE PRIMARY KEY,
  namespace varchar(100),
  code varchar(100) UNIQUE not null,
  title varchar(100),
  content text,
  created timestamp not null default CURRENT_TIMESTAMP,
  updated timestamp not null default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP,
  INDEX namespace_ (namespace)
) DEFAULT CHARACTER SET utf8 COLLATE utf8_swedish_ci;


text:
this.createdDate = new Date().getTime();
emit('happinesses:create', this);


text:
<?xml version="1.0" encoding="utf-8"?>

<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
	android:layout_width="fill_parent" android:layout_height="fill_parent">

	<TextView android:id="@+id/listViewItemText"
			  android:text=""
			  android:layout_alignParentLeft="true"
   			  android:layout_margin="10px"
		      android:layout_width="wrap_content"
		      android:layout_height="wrap_content" />

<!--    	<ImageView android:id="@+id/listViewArrow" -->
<!--   			   android:src="@drawable/rightarrow" -->
<!-- 			   android:layout_alignParentRight="true" -->
<!-- 			   android:layout_centerVertical="true" -->
<!-- 		       android:layout_margin="5px" -->
<!--                android:layout_width="wrap_content" -->
<!--                android:layout_height="wrap_content"/>	       -->

</RelativeLayout>


text:
<?php

use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class BlogPosts extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('blog_posts', function (Blueprint $table) {
            $table->increments('id');
            $table->string('title');
            $table->string('viewname');
            $table->mediumText('description');
            $table->string('author');
            $table->string('img')->nullable();
            $table->string('img_alt')->nullable();
            $table->timestamps();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::drop('blog_posts');
    }
}


text:
<!DOCTYPE html>

  <meta charset="UTF-8" />
  <title>Angular Parallax Demo</title>
  <meta name="viewport" content="width=device-width, initial-scale=1.0">

Responsive Angular.js Parallax Example

Bacon ipsum dolor sit amet sausage tail capicola ground round hamburger ham hock. Short ribs pig andouille meatball, pastrami tri-tip fatback ham hock shank kielbasa swine. Rump pancetta jerky kielbasa doner beef ribs tongue hamburger strip steak drumstick andouille shoulder shank flank. Swine drumstick meatball pig beef sausage strip steak.

Bacon strip steak ground round, tongue pastrami short ribs pork chop venison turducken sausage sirloin. Flank chicken pork chop capicola turkey turducken cow pork loin biltong meatball drumstick pancetta filet mignon ground round fatback. Ham hock jerky short ribs brisket. Meatloaf shoulder pork chop capicola, sirloin swine pig pork. Jerky ribeye hamburger pork loin sirloin kevin bresaola boudin chuck flank. Ham hock pork belly chicken jerky rump bresaola.

Shank fatback pastrami short loin, turkey jowl kielbasa ribeye chicken jerky drumstick flank ham. Swine shankle pork belly kielbasa shoulder flank jowl, sirloin doner. Kevin tri-tip bresaola leberkas. Swine ball tip cow strip steak. Ham filet mignon pork chop, pork fatback andouille pork loin shoulder jowl swine strip steak turducken prosciutto rump.

Tongue tri-tip pastrami, shoulder rump pork belly ground round. Ham hock chuck leberkas doner, strip steak corned beef tri-tip capicola. Rump turkey ham sausage shankle. Flank shankle pork chop ham hock. Shankle venison kielbasa, pancetta swine beef ball tip t-bone bacon hamburger ground round ribeye flank. Turducken bacon bresaola, chicken kevin boudin ball tip strip steak filet mignon pork turkey shank ground round. Kielbasa fatback prosciutto pork chop, jerky ground round leberkas boudin ball tip beef shankle shoulder swine brisket.

Shoulder cow tenderloin chuck, pork chop jerky doner leberkas. Chuck sausage hamburger, kevin beef pork chop pork shoulder ground round ball tip turducken flank. Bresaola tri-tip meatloaf, salami venison tail pig shank shankle jowl sausage brisket cow biltong turducken. Swine turducken hamburger ball tip short loin prosciutto kevin jowl tri-tip. Doner meatloaf pork brisket.


text:
package v2

import (
	"context"
	"os"
	"path/filepath"

	"github.com/containerd/containerd/log"
	"github.com/containerd/containerd/mount"
	"github.com/containerd/containerd/namespaces"
)

func (m *ShimManager) loadExistingTasks(ctx context.Context) error {
	nsDirs, err := os.ReadDir(m.state)
	if err != nil {
		return err
	}
	for _, nsd := range nsDirs {
		if !nsd.IsDir() {
			continue
		}
		ns := nsd.Name()
		// skip hidden directories
		if len(ns) > 0 && ns[0] == '.' {
			continue
		}
		log.G(ctx).WithField("namespace", ns).Debug("loading tasks in namespace")
		if err := m.loadShims(namespaces.WithNamespace(ctx, ns)); err != nil {
			log.G(ctx).WithField("namespace", ns).WithError(err).Error("loading tasks in namespace")
			continue
		}
		if err := m.cleanupWorkDirs(namespaces.WithNamespace(ctx, ns)); err != nil {
			log.G(ctx).WithField("namespace", ns).WithError(err).Error("cleanup working directory in namespace")
			continue
		}
	}
	return nil
}

func (m *ShimManager) loadShims(ctx context.Context) error {
	ns, err := namespaces.NamespaceRequired(ctx)
	if err != nil {
		return err
	}
	shimDirs, err := os.ReadDir(filepath.Join(m.state, ns))
	if err != nil {
		return err
	}
	for _, sd := range shimDirs {
		if !sd.IsDir() {
			continue
		}
		id := sd.Name()
		// skip hidden directories
		if len(id) > 0 && id[0] == '.' {
			continue
		}
		bundle, err := LoadBundle(ctx, m.state, id)
		if err != nil {
			// fine to return error here, it is a programmer error if the context
			// does not have a namespace
			return err
		}
		// fast path
		bf, err := os.ReadDir(bundle.Path)
		if err != nil {
			bundle.Delete()
			log.G(ctx).WithError(err).Errorf("fast path read bundle path for %s", bundle.Path)
			continue
		}
		if len(bf) == 0 {
			bundle.Delete()
			continue
		}

		var (
			runtime string
		)

		// If we're on 1.6+ and specified custom path to the runtime binary, path will be saved in 'shim-binary-path' file.
		if data, err := os.ReadFile(filepath.Join(bundle.Path, "shim-binary-path")); err == nil {
			runtime = string(data)
		} else if err != nil && !os.IsNotExist(err) {
			log.G(ctx).WithError(err).Error("failed to read `runtime` path from bundle")
		}

		// Query runtime name from metadata store
		if runtime == "" {
			container, err := m.containers.Get(ctx, id)
			if err != nil {
				log.G(ctx).WithError(err).Errorf("loading container %s", id)
				if err := mount.UnmountAll(filepath.Join(bundle.Path, "rootfs"), 0); err != nil {
					log.G(ctx).WithError(err).Errorf("failed to unmount of rootfs %s", id)
				}
				bundle.Delete()
				continue
			}
			runtime = container.Runtime.Name
		}

		runtime, err = m.resolveRuntimePath(runtime)
		if err != nil {
			bundle.Delete()
			log.G(ctx).WithError(err).Error("failed to resolve runtime path")
			continue
		}

		binaryCall := shimBinary(bundle,
			shimBinaryConfig{
				runtime:      runtime,
				address:      m.containerdAddress,
				ttrpcAddress: m.containerdTTRPCAddress,
				schedCore:    m.schedCore,
			})
		shim, err := loadShim(ctx, bundle, func() {
			log.G(ctx).WithField("id", id).Info("shim disconnected")

			cleanupAfterDeadShim(context.Background(), id, ns, m.shims, m.events, binaryCall)
			// Remove self from the runtime task list.
			m.shims.Delete(ctx, id)
		})
		if err != nil {
			cleanupAfterDeadShim(ctx, id, ns, m.shims, m.events, binaryCall)
			continue
		}
		m.shims.Add(ctx, shim)
	}
	return nil
}

func (m *ShimManager) cleanupWorkDirs(ctx context.Context) error {
	ns, err := namespaces.NamespaceRequired(ctx)
	if err != nil {
		return err
	}
	dirs, err := os.ReadDir(filepath.Join(m.root, ns))
	if err != nil {
		return err
	}
	for _, d := range dirs {
		// if the task was not loaded, cleanup and empty working directory
		// this can happen on a reboot where /run for the bundle state is cleaned up
		// but that persistent working dir is left
		if _, err := m.shims.Get(ctx, d.Name()); err != nil {
			path := filepath.Join(m.root, ns, d.Name())
			if err := os.RemoveAll(path); err != nil {
				log.G(ctx).WithError(err).Errorf("cleanup working dir %s", path)
			}
		}
	}
	return nil
}