text:
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.

namespace Microsoft.CodeAnalysis.CSharp
{
#pragma warning disable CA1200 // Avoid using cref tags with a prefix - The prefix is required since this file is referenced in projects that can't access syntax nodes
    // DO NOT CHANGE NUMBERS ASSIGNED TO EXISTING KINDS OR YOU WILL BREAK BINARY COMPATIBILITY
    public enum SyntaxKind : ushort
    {
        None = 0,
        List = GreenNode.ListKind,

        // punctuation
        /// Represents <c>~</c> token.
        TildeToken = 8193,
        /// Represents <c>!</c> token.
        ExclamationToken = 8194,
        /// Represents <c>$</c> token.
        /// <remarks>This is a debugger special punctuation and not related to string interpolation.</remarks>
        DollarToken = 8195,
        /// Represents <c>%</c> token.
        PercentToken = 8196,
        /// Represents <c>^</c> token.
        CaretToken = 8197,
        /// Represents <c>&</c> token.
        AmpersandToken = 8198,
        /// Represents <c>*</c> token.
        AsteriskToken = 8199,
        /// Represents <c>(</c> token.
        OpenParenToken = 8200,
        /// Represents <c>)</c> token.
        CloseParenToken = 8201,
        /// Represents <c>-</c> token.
        MinusToken = 8202,
        /// Represents <c>+</c> token.
        PlusToken = 8203,
        /// Represents <c>=</c> token.
        EqualsToken = 8204,
        /// Represents <c>{</c> token.
        OpenBraceToken = 8205,
        /// Represents <c>}</c> token.
        CloseBraceToken = 8206,
        /// Represents <c>[</c> token.
        OpenBracketToken = 8207,
        /// Represents <c>]</c> token.
        CloseBracketToken = 8208,
        /// Represents <c>|</c> token.
        BarToken = 8209,
        /// Represents <c>\</c> token.
        BackslashToken = 8210,
        /// Represents <c>:</c> token.
        ColonToken = 8211,
        /// Represents <c>;</c> token.
        SemicolonToken = 8212,
        /// Represents <c>"</c> token.
        DoubleQuoteToken = 8213,
        /// Represents <c>'</c> token.
        SingleQuoteToken = 8214,
        /// Represents <c><</c> token.
        LessThanToken = 8215,
        /// Represents <c>,</c> token.
        CommaToken = 8216,
        /// Represents <c>></c> token.
        GreaterThanToken = 8217,
        /// Represents <c>.</c> token.
        DotToken = 8218,
        /// Represents <c>?</c> token.
        QuestionToken = 8219,
        /// Represents <c>#</c> token.
        HashToken = 8220,
        /// Represents <c>/</c> token.
        SlashToken = 8221,
        /// Represents <c>..</c> token.
        DotDotToken = 8222,

        // additional xml tokens
        /// Represents <c>/></c> token.
        SlashGreaterThanToken = 8232, // xml empty element end
        /// Represents <c></</c> token.
        LessThanSlashToken = 8233, // element end tag start token
        /// Represents <c><!--</c> token.
        XmlCommentStartToken = 8234, //
        /// Represents <c><![CDATA[</c> token.
        XmlCDataStartToken = 8236, // <![CDATA[
        /// Represents <c>]]></c> token.
        XmlCDataEndToken = 8237, // ]]>
        /// Represents <c><?</c> token.
        XmlProcessingInstructionStartToken = 8238, // <?
        /// Represents <c>?></c> token.
        XmlProcessingInstructionEndToken = 8239, // ?>

        // compound punctuation
        /// Represents <c>||</c> token.
        BarBarToken = 8260,
        /// Represents <c>&&</c> token.
        AmpersandAmpersandToken = 8261,
        /// Represents <c>--</c> token.
        MinusMinusToken = 8262,
        /// Represents <c>++</c> token.
        PlusPlusToken = 8263,
        /// Represents <c>::</c> token.
        ColonColonToken = 8264,
        /// Represents <c>??</c> token.
        QuestionQuestionToken = 8265,
        /// Represents <c>-></c> token.
        MinusGreaterThanToken = 8266,
        /// Represents <c>!=</c> token.
        ExclamationEqualsToken = 8267,
        /// Represents <c>==</c> token.
        EqualsEqualsToken = 8268,
        /// Represents <c>=></c> token.
        EqualsGreaterThanToken = 8269,
        /// Represents <c><=</c> token.
        LessThanEqualsToken = 8270,
        /// Represents <c><<</c> token.
        LessThanLessThanToken = 8271,
        /// Represents <c><<=</c> token.
        LessThanLessThanEqualsToken = 8272,
        /// Represents <c>>=</c> token.
        GreaterThanEqualsToken = 8273,
        /// Represents <c>>></c> token.
        GreaterThanGreaterThanToken = 8274,
        /// Represents <c>>>=</c> token.
        GreaterThanGreaterThanEqualsToken = 8275,
        /// Represents <c>/=</c> token.
        SlashEqualsToken = 8276,
        /// Represents <c>*=</c> token.
        AsteriskEqualsToken = 8277,
        /// Represents <c>|=</c> token.
        BarEqualsToken = 8278,
        /// Represents <c>&=</c> token.
        AmpersandEqualsToken = 8279,
        /// Represents <c>+=</c> token.
        PlusEqualsToken = 8280,
        /// Represents <c>-=</c> token.
        MinusEqualsToken = 8281,
        /// Represents <c>^=</c> token.
        CaretEqualsToken = 8282,
        /// Represents <c>%=</c> token.
        PercentEqualsToken = 8283,
        /// Represents <c>??=</c> token.
        QuestionQuestionEqualsToken = 8284,

        // Keywords
        /// Represents <see langword="bool"/>.
        BoolKeyword = 8304,
        /// Represents <see langword="byte"/>.
        ByteKeyword = 8305,
        /// Represents <see langword="sbyte"/>.
        SByteKeyword = 8306,
        /// Represents <see langword="short"/>.
        ShortKeyword = 8307,
        /// Represents <see langword="ushort"/>.
        UShortKeyword = 8308,
        /// Represents <see langword="int"/>.
        IntKeyword = 8309,
        /// Represents <see langword="uint"/>.
        UIntKeyword = 8310,
        /// Represents <see langword="long"/>.
        LongKeyword = 8311,
        /// Represents <see langword="ulong"/>.
        ULongKeyword = 8312,
        /// Represents <see langword="double"/>.
        DoubleKeyword = 8313,
        /// Represents <see langword="float"/>.
        FloatKeyword = 8314,
        /// Represents <see langword="decimal"/>.
        DecimalKeyword = 8315,
        /// Represents <see langword="string"/>.
        StringKeyword = 8316,
        /// Represents <see langword="char"/>.
        CharKeyword = 8317,
        /// Represents <see langword="void"/>.
        VoidKeyword = 8318,
        /// Represents <see langword="object"/>.
        ObjectKeyword = 8319,
        /// Represents <see langword="typeof"/>.
        TypeOfKeyword = 8320,
        /// Represents <see langword="sizeof"/>.
        SizeOfKeyword = 8321,
        /// Represents <see langword="null"/>.
        NullKeyword = 8322,
        /// Represents <see langword="true"/>.
        TrueKeyword = 8323,
        /// Represents <see langword="false"/>.
        FalseKeyword = 8324,
        /// Represents <see langword="if"/>.
        IfKeyword = 8325,
        /// Represents <see langword="else"/>.
        ElseKeyword = 8326,
        /// Represents <see langword="while"/>.
        WhileKeyword = 8327,
        /// Represents <see langword="for"/>.
        ForKeyword = 8328,
        /// Represents <see langword="foreach"/>.
        ForEachKeyword = 8329,
        /// Represents <see langword="do"/>.
        DoKeyword = 8330,
        /// Represents <see langword="switch"/>.
        SwitchKeyword = 8331,
        /// Represents <see langword="case"/>.
        CaseKeyword = 8332,
        /// Represents <see langword="default"/>.
        DefaultKeyword = 8333,
        /// Represents <see langword="try"/>.
        TryKeyword = 8334,
        /// Represents <see langword="catch"/>.
        CatchKeyword = 8335,
        /// Represents <see langword="finally"/>.
        FinallyKeyword = 8336,
        /// Represents <see langword="lock"/>.
        LockKeyword = 8337,
        /// Represents <see langword="goto"/>.
        GotoKeyword = 8338,
        /// Represents <see langword="break"/>.
        BreakKeyword = 8339,
        /// Represents <see langword="continue"/>.
        ContinueKeyword = 8340,
        /// Represents <see langword="return"/>.
        ReturnKeyword = 8341,
        /// Represents <see langword="throw"/>.
        ThrowKeyword = 8342,
        /// Represents <see langword="public"/>.
        PublicKeyword = 8343,
        /// Represents <see langword="private"/>.
        PrivateKeyword = 8344,
        /// Represents <see langword="internal"/>.
        InternalKeyword = 8345,
        /// Represents <see langword="protected"/>.
        ProtectedKeyword = 8346,
        /// Represents <see langword="static"/>.
        StaticKeyword = 8347,
        /// Represents <see langword="readonly"/>.
        ReadOnlyKeyword = 8348,
        /// Represents <see langword="sealed"/>.
        SealedKeyword = 8349,
        /// Represents <see langword="const"/>.
        ConstKeyword = 8350,
        /// Represents <see langword="fixed"/>.
        FixedKeyword = 8351,
        /// Represents <see langword="stackalloc"/>.
        StackAllocKeyword = 8352,
        /// Represents <see langword="volatile"/>.
        VolatileKeyword = 8353,
        /// Represents <see langword="new"/>.
        NewKeyword = 8354,
        /// Represents <see langword="override"/>.
        OverrideKeyword = 8355,
        /// Represents <see langword="abstract"/>.
        AbstractKeyword = 8356,
        /// Represents <see langword="virtual"/>.
        VirtualKeyword = 8357,
        /// Represents <see langword="event"/>.
        EventKeyword = 8358,
        /// Represents <see langword="extern"/>.
        ExternKeyword = 8359,
        /// Represents <see langword="ref"/>.
        RefKeyword = 8360,
        /// Represents <see langword="out"/>.
        OutKeyword = 8361,
        /// Represents <see langword="in"/>.
        InKeyword = 8362,
        /// Represents <see langword="is"/>.
        IsKeyword = 8363,
        /// Represents <see langword="as"/>.
        AsKeyword = 8364,
        /// Represents <see langword="params"/>.
        ParamsKeyword = 8365,
        /// Represents <see langword="__arglist"/>.
        ArgListKeyword = 8366,
        /// Represents <see langword="__makeref"/>.
        MakeRefKeyword = 8367,
        /// Represents <see langword="__reftype"/>.
        RefTypeKeyword = 8368,
        /// Represents <see langword="__refvalue"/>.
        RefValueKeyword = 8369,
        /// Represents <see langword="this"/>.
        ThisKeyword = 8370,
        /// Represents <see langword="base"/>.
        BaseKeyword = 8371,
        /// Represents <see langword="namespace"/>.
        NamespaceKeyword = 8372,
        /// Represents <see langword="using"/>.
        UsingKeyword = 8373,
        /// Represents <see langword="class"/>.
        ClassKeyword = 8374,
        /// Represents <see langword="struct"/>.
        StructKeyword = 8375,
        /// Represents <see langword="interface"/>.
        InterfaceKeyword = 8376,
        /// Represents <see langword="enum"/>.
        EnumKeyword = 8377,
        /// Represents <see langword="delegate"/>.
        DelegateKeyword = 8378,
        /// Represents <see langword="checked"/>.
        CheckedKeyword = 8379,
        /// Represents <see langword="unchecked"/>.
        UncheckedKeyword = 8380,
        /// Represents <see langword="unsafe"/>.
        UnsafeKeyword = 8381,
        /// Represents <see langword="operator"/>.
        OperatorKeyword = 8382,
        /// Represents <see langword="explicit"/>.
        ExplicitKeyword = 8383,
        /// Represents <see langword="implicit"/>.
        ImplicitKeyword = 8384,

        // contextual keywords
        /// Represents <see langword="yield"/>.
        YieldKeyword = 8405,
        /// Represents <see langword="partial"/>.
        PartialKeyword = 8406,
        /// Represents <see langword="alias"/>.
        AliasKeyword = 8407,
        /// Represents <see langword="global"/>.
        GlobalKeyword = 8408,
        /// Represents <see langword="assembly"/>.
        AssemblyKeyword = 8409,
        /// Represents <see langword="module"/>.
        ModuleKeyword = 8410,
        /// Represents <see langword="type"/>.
        TypeKeyword = 8411,
        /// Represents <see langword="field"/>.
        FieldKeyword = 8412,
        /// Represents <see langword="method"/>.
        MethodKeyword = 8413,
        /// Represents <see langword="param"/>.
        ParamKeyword = 8414,
        /// Represents <see langword="property"/>.
        PropertyKeyword = 8415,
        /// Represents <see langword="typevar"/>.
        TypeVarKeyword = 8416,
        /// Represents <see langword="get"/>.
        GetKeyword = 8417,
        /// Represents <see langword="set"/>.
        SetKeyword = 8418,
        /// Represents <see langword="add"/>.
        AddKeyword = 8419,
        /// Represents <see langword="remove"/>.
        RemoveKeyword = 8420,
        /// Represents <see langword="where"/>.
        WhereKeyword = 8421,
        /// Represents <see langword="from"/>.
        FromKeyword = 8422,
        /// Represents <see langword="group"/>.
        GroupKeyword = 8423,
        /// Represents <see langword="join"/>.
        JoinKeyword = 8424,
        /// Represents <see langword="into"/>.
        IntoKeyword = 8425,
        /// Represents <see langword="let"/>.
        LetKeyword = 8426,
        /// Represents <see langword="by"/>.
        ByKeyword = 8427,
        /// Represents <see langword="select"/>.
        SelectKeyword = 8428,
        /// Represents <see langword="orderby"/>.
        OrderByKeyword = 8429,
        /// Represents <see langword="on"/>.
        OnKeyword = 8430,
        /// Represents <see langword="equals"/>.
        EqualsKeyword = 8431,
        /// Represents <see langword="ascending"/>.
        AscendingKeyword = 8432,
        /// Represents <see langword="descending"/>.
        DescendingKeyword = 8433,
        /// Represents <see langword="nameof"/>.
        NameOfKeyword = 8434,
        /// Represents <see langword="async"/>.
        AsyncKeyword = 8435,
        /// Represents <see langword="await"/>.
        AwaitKeyword = 8436,
        /// Represents <see langword="when"/>.
        WhenKeyword = 8437,
        /// Represents <see langword="or"/>.
        OrKeyword = 8438,
        /// Represents <see langword="and"/>.
        AndKeyword = 8439,
        /// Represents <see langword="not"/>.
        NotKeyword = 8440,

        // Don't use 8441. It corresponds to a deleted kind (DataKeyword) that was previously shipped.

        /// Represents <see langword="with"/>.
        WithKeyword = 8442,
        /// Represents <see langword="init"/>.
        InitKeyword = 8443,
        /// Represents <see langword="record"/>.
        RecordKeyword = 8444,
        /// Represents <see langword="managed"/>.
        ManagedKeyword = 8445,
        /// Represents <see langword="unmanaged"/>.
        UnmanagedKeyword = 8446,

        // when adding a contextual keyword following functions must be adapted:
        // <see cref="SyntaxFacts.GetContextualKeywordKinds"/>
        // <see cref="SyntaxFacts.IsContextualKeyword(SyntaxKind)"/>
        // <see cref="SyntaxFacts.GetContextualKeywordKind(string)"/>
        // <see cref="SyntaxFacts.GetText(SyntaxKind)"/>

        // keywords with an enum value less than ElifKeyword are considered i.a. contextual keywords
        // additional preprocessor keywords
        /// Represents <see langword="elif"/>.
        ElifKeyword = 8467,
        /// Represents <see langword="endif"/>.
        EndIfKeyword = 8468,
        /// Represents <see langword="region"/>.
        RegionKeyword = 8469,
        /// Represents <see langword="endregion"/>.
        EndRegionKeyword = 8470,
        /// Represents <see langword="define"/>.
        DefineKeyword = 8471,
        /// Represents <see langword="undef"/>.
        UndefKeyword = 8472,
        /// Represents <see langword="warning"/>.
        WarningKeyword = 8473,
        /// Represents <see langword="error"/>.
        ErrorKeyword = 8474,
        /// Represents <see langword="line"/>.
        LineKeyword = 8475,
        /// Represents <see langword="pragma"/>.
        PragmaKeyword = 8476,
        /// Represents <see langword="hidden"/>.
        HiddenKeyword = 8477,
        /// Represents <see langword="checksum"/>.
        ChecksumKeyword = 8478,
        /// Represents <see langword="disable"/>.
        DisableKeyword = 8479,
        /// Represents <see langword="restore"/>.
        RestoreKeyword = 8480,
        /// Represents <see langword="r"/>.
        ReferenceKeyword = 8481,

        /// Represents <c>$"</c> token.
        InterpolatedStringStartToken = 8482,            // $"
        /// Represents <c>"</c> token that is closing <c>$"</c>.
        InterpolatedStringEndToken = 8483,              // "
        /// Represents <c>$@</c> or <c>@$</c> token.
        InterpolatedVerbatimStringStartToken = 8484,    // $@" or @$"

        // additional preprocessor keywords (continued)
        /// Represents <see langword="load"/>.
        LoadKeyword = 8485,
        /// Represents <see langword="nullable"/>.
        NullableKeyword = 8486,
        /// Represents <see langword="enable"/>.
        EnableKeyword = 8487,

        // targets for #nullable directive
        /// Represents <see langword="warnings"/>.
        WarningsKeyword = 8488,
        /// Represents <see langword="annotations"/>.
        AnnotationsKeyword = 8489,

        // Other
        /// Represents <see langword="var"/>.
        VarKeyword = 8490,
        /// Represents <c>_</c> token.
        UnderscoreToken = 8491,
        /// Represents that nothing was specified as a type argument.
        /// <remarks>For example <c>Dictionary<,></c> which has <see cref="OmittedTypeArgumentToken"/> as a child of <see cref="T:Microsoft.CodeAnalysis.CSharp.Syntax.OmittedTypeArgumentSyntax"/> before and after the <see cref="CommaToken"/>.</remarks>
        OmittedTypeArgumentToken = 8492,
        /// Represents that nothing was specified as an array size.
        /// <remarks>For example <c>int[,]</c> which has <see cref="OmittedArraySizeExpressionToken"/> as a child of <see cref="T:Microsoft.CodeAnalysis.CSharp.Syntax.OmittedArraySizeExpressionSyntax"/> before and after the <see cref="CommaToken"/>.</remarks>
        OmittedArraySizeExpressionToken = 8493,
        /// Represents a token that comes after the end of a directive such as <c>#endif</c>.
        EndOfDirectiveToken = 8494,
        /// Represents the end of a triple-slash documentation comment.
        EndOfDocumentationCommentToken = 8495,
        /// Represents the end of a file.
        EndOfFileToken = 8496, //NB: this is assumed to be the last textless token

        // tokens with text
        BadToken = 8507,
        IdentifierToken = 8508,
        NumericLiteralToken = 8509,
        CharacterLiteralToken = 8510,
        StringLiteralToken = 8511,
        XmlEntityLiteralToken = 8512,  // < > " & ' or &name; or &#nnnn; or &#xhhhh;
        XmlTextLiteralToken = 8513,    // xml text node text
        XmlTextLiteralNewLineToken = 8514,

        InterpolatedStringToken = 8515,                 // terminal for a whole interpolated string $" ... { expr } ..."
                                                        // This only exists in transient form during parsing.
        InterpolatedStringTextToken = 8517,             // literal text that is part of an interpolated string

        // trivia
        EndOfLineTrivia = 8539,
        WhitespaceTrivia = 8540,
        SingleLineCommentTrivia = 8541,
        MultiLineCommentTrivia = 8542,
        DocumentationCommentExteriorTrivia = 8543,
        SingleLineDocumentationCommentTrivia = 8544,
        MultiLineDocumentationCommentTrivia = 8545,
        DisabledTextTrivia = 8546,
        PreprocessingMessageTrivia = 8547,
        IfDirectiveTrivia = 8548,
        ElifDirectiveTrivia = 8549,
        ElseDirectiveTrivia = 8550,
        EndIfDirectiveTrivia = 8551,
        RegionDirectiveTrivia = 8552,
        EndRegionDirectiveTrivia = 8553,
        DefineDirectiveTrivia = 8554,
        UndefDirectiveTrivia = 8555,
        ErrorDirectiveTrivia = 8556,
        WarningDirectiveTrivia = 8557,
        LineDirectiveTrivia = 8558,
        PragmaWarningDirectiveTrivia = 8559,
        PragmaChecksumDirectiveTrivia = 8560,
        ReferenceDirectiveTrivia = 8561,
        BadDirectiveTrivia = 8562,
        SkippedTokensTrivia = 8563,
        ConflictMarkerTrivia = 8564,

        // xml nodes (for xml doc comment structure)
        XmlElement = 8574,
        XmlElementStartTag = 8575,
        XmlElementEndTag = 8576,
        XmlEmptyElement = 8577,
        XmlTextAttribute = 8578,
        XmlCrefAttribute = 8579,
        XmlNameAttribute = 8580,
        XmlName = 8581,
        XmlPrefix = 8582,
        XmlText = 8583,
        XmlCDataSection = 8584,
        XmlComment = 8585,
        XmlProcessingInstruction = 8586,

        // documentation comment nodes (structure inside DocumentationCommentTrivia)
        TypeCref = 8597,
        QualifiedCref = 8598,
        NameMemberCref = 8599,
        IndexerMemberCref = 8600,
        OperatorMemberCref = 8601,
        ConversionOperatorMemberCref = 8602,
        CrefParameterList = 8603,
        CrefBracketedParameterList = 8604,
        CrefParameter = 8605,

        // names & type-names
        IdentifierName = 8616,
        QualifiedName = 8617,
        GenericName = 8618,
        TypeArgumentList = 8619,
        AliasQualifiedName = 8620,
        PredefinedType = 8621,
        ArrayType = 8622,
        ArrayRankSpecifier = 8623,
        PointerType = 8624,
        NullableType = 8625,
        OmittedTypeArgument = 8626,

        // expressions
        ParenthesizedExpression = 8632,
        ConditionalExpression = 8633,
        InvocationExpression = 8634,
        ElementAccessExpression = 8635,
        ArgumentList = 8636,
        BracketedArgumentList = 8637,
        Argument = 8638,
        NameColon = 8639,
        CastExpression = 8640,
        AnonymousMethodExpression = 8641,
        SimpleLambdaExpression = 8642,
        ParenthesizedLambdaExpression = 8643,
        ObjectInitializerExpression = 8644,
        CollectionInitializerExpression = 8645,
        ArrayInitializerExpression = 8646,
        AnonymousObjectMemberDeclarator = 8647,
        ComplexElementInitializerExpression = 8648,
        ObjectCreationExpression = 8649,
        AnonymousObjectCreationExpression = 8650,
        ArrayCreationExpression = 8651,
        ImplicitArrayCreationExpression = 8652,
        StackAllocArrayCreationExpression = 8653,
        OmittedArraySizeExpression = 8654,
        InterpolatedStringExpression = 8655,
        ImplicitElementAccess = 8656,
        IsPatternExpression = 8657,
        RangeExpression = 8658,
        ImplicitObjectCreationExpression = 8659,

        // binary expressions
        AddExpression = 8668,
        SubtractExpression = 8669,
        MultiplyExpression = 8670,
        DivideExpression = 8671,
        ModuloExpression = 8672,
        LeftShiftExpression = 8673,
        RightShiftExpression = 8674,
        LogicalOrExpression = 8675,
        LogicalAndExpression = 8676,
        BitwiseOrExpression = 8677,
        BitwiseAndExpression = 8678,
        ExclusiveOrExpression = 8679,
        EqualsExpression = 8680,
        NotEqualsExpression = 8681,
        LessThanExpression = 8682,
        LessThanOrEqualExpression = 8683,
        GreaterThanExpression = 8684,
        GreaterThanOrEqualExpression = 8685,
        IsExpression = 8686,
        AsExpression = 8687,
        CoalesceExpression = 8688,
        SimpleMemberAccessExpression = 8689,  // dot access:   a.b
        PointerMemberAccessExpression = 8690,  // arrow access:   a->b
        ConditionalAccessExpression = 8691,    // question mark access:   a?.b , a?[1]

        // binding expressions
        MemberBindingExpression = 8707,
        ElementBindingExpression = 8708,

        // binary assignment expressions
        SimpleAssignmentExpression = 8714,
        AddAssignmentExpression = 8715,
        SubtractAssignmentExpression = 8716,
        MultiplyAssignmentExpression = 8717,
        DivideAssignmentExpression = 8718,
        ModuloAssignmentExpression = 8719,
        AndAssignmentExpression = 8720,
        ExclusiveOrAssignmentExpression = 8721,
        OrAssignmentExpression = 8722,
        LeftShiftAssignmentExpression = 8723,
        RightShiftAssignmentExpression = 8724,
        CoalesceAssignmentExpression = 8725,

        // unary expressions
        UnaryPlusExpression = 8730,
        UnaryMinusExpression = 8731,
        BitwiseNotExpression = 8732,
        LogicalNotExpression = 8733,
        PreIncrementExpression = 8734,
        PreDecrementExpression = 8735,
        PointerIndirectionExpression = 8736,
        AddressOfExpression = 8737,
        PostIncrementExpression = 8738,
        PostDecrementExpression = 8739,
        AwaitExpression = 8740,
        IndexExpression = 8741,

        // primary expression
        ThisExpression = 8746,
        BaseExpression = 8747,
        ArgListExpression = 8748,
        NumericLiteralExpression = 8749,
        StringLiteralExpression = 8750,
        CharacterLiteralExpression = 8751,
        TrueLiteralExpression = 8752,
        FalseLiteralExpression = 8753,
        NullLiteralExpression = 8754,
        DefaultLiteralExpression = 8755,

        // primary function expressions
        TypeOfExpression = 8760,
        SizeOfExpression = 8761,
        CheckedExpression = 8762,
        UncheckedExpression = 8763,
        DefaultExpression = 8764,
        MakeRefExpression = 8765,
        RefValueExpression = 8766,
        RefTypeExpression = 8767,
        // NameOfExpression = 8768, // we represent nameof(x) as an invocation expression

        // query expressions
        QueryExpression = 8774,
        QueryBody = 8775,
        FromClause = 8776,
        LetClause = 8777,
        JoinClause = 8778,
        JoinIntoClause = 8779,
        WhereClause = 8780,
        OrderByClause = 8781,
        AscendingOrdering = 8782,
        DescendingOrdering = 8783,
        SelectClause = 8784,
        GroupClause = 8785,
        QueryContinuation = 8786,

        // statements
        Block = 8792,
        LocalDeclarationStatement = 8793,
        VariableDeclaration = 8794,
        VariableDeclarator = 8795,
        EqualsValueClause = 8796,
        ExpressionStatement = 8797,
        EmptyStatement = 8798,
        LabeledStatement = 8799,

        // jump statements
        GotoStatement = 8800,
        GotoCaseStatement = 8801,
        GotoDefaultStatement = 8802,
        BreakStatement = 8803,
        ContinueStatement = 8804,
        ReturnStatement = 8805,
        YieldReturnStatement = 8806,
        YieldBreakStatement = 8807,
        ThrowStatement = 8808,

        WhileStatement = 8809,
        DoStatement = 8810,
        ForStatement = 8811,
        ForEachStatement = 8812,
        UsingStatement = 8813,
        FixedStatement = 8814,

        // checked statements
        CheckedStatement = 8815,
        UncheckedStatement = 8816,

        UnsafeStatement = 8817,
        LockStatement = 8818,
        IfStatement = 8819,
        ElseClause = 8820,
        SwitchStatement = 8821,
        SwitchSection = 8822,
        CaseSwitchLabel = 8823,
        DefaultSwitchLabel = 8824,
        TryStatement = 8825,
        CatchClause = 8826,
        CatchDeclaration = 8827,
        CatchFilterClause = 8828,
        FinallyClause = 8829,

        // statements that didn't fit above
        LocalFunctionStatement = 8830,

        // declarations
        CompilationUnit = 8840,
        GlobalStatement = 8841,
        NamespaceDeclaration = 8842,
        UsingDirective = 8843,
        ExternAliasDirective = 8844,

        // attributes
        AttributeList = 8847,
        AttributeTargetSpecifier = 8848,
        Attribute = 8849,
        AttributeArgumentList = 8850,
        AttributeArgument = 8851,
        NameEquals = 8852,

        // type declarations
        ClassDeclaration = 8855,
        StructDeclaration = 8856,
        InterfaceDeclaration = 8857,
        EnumDeclaration = 8858,
        DelegateDeclaration = 8859,

        BaseList = 8864,
        SimpleBaseType = 8865,
        TypeParameterConstraintClause = 8866,
        ConstructorConstraint = 8867,
        ClassConstraint = 8868,
        StructConstraint = 8869,
        TypeConstraint = 8870,
        ExplicitInterfaceSpecifier = 8871,
        EnumMemberDeclaration = 8872,
        FieldDeclaration = 8873,
        EventFieldDeclaration = 8874,
        MethodDeclaration = 8875,
        OperatorDeclaration = 8876,
        ConversionOperatorDeclaration = 8877,
        ConstructorDeclaration = 8878,

        BaseConstructorInitializer = 8889,
        ThisConstructorInitializer = 8890,
        DestructorDeclaration = 8891,
        PropertyDeclaration = 8892,
        EventDeclaration = 8893,
        IndexerDeclaration = 8894,
        AccessorList = 8895,
        GetAccessorDeclaration = 8896,
        SetAccessorDeclaration = 8897,
        AddAccessorDeclaration = 8898,
        RemoveAccessorDeclaration = 8899,
        UnknownAccessorDeclaration = 8900,
        ParameterList = 8906,
        BracketedParameterList = 8907,
        Parameter = 8908,
        TypeParameterList = 8909,
        TypeParameter = 8910,
        IncompleteMember = 8916,
        ArrowExpressionClause = 8917,
        Interpolation = 8918, // part of an interpolated string
        InterpolatedStringText = 8919,
        InterpolationAlignmentClause = 8920,
        InterpolationFormatClause = 8921,

        ShebangDirectiveTrivia = 8922,
        LoadDirectiveTrivia = 8923,
        // Changes after C# 6

        // tuples
        TupleType = 8924,
        TupleElement = 8925,
        TupleExpression = 8926,
        SingleVariableDesignation = 8927,
        ParenthesizedVariableDesignation = 8928,
        ForEachVariableStatement = 8929,

        // patterns (for pattern-matching)
        DeclarationPattern = 9000,
        ConstantPattern = 9002,
        CasePatternSwitchLabel = 9009,
        WhenClause = 9013,
        DiscardDesignation = 9014,

        // added along with recursive patterns
        RecursivePattern = 9020,
        PropertyPatternClause = 9021,
        Subpattern = 9022,
        PositionalPatternClause = 9023,
        DiscardPattern = 9024,
        SwitchExpression = 9025,
        SwitchExpressionArm = 9026,
        VarPattern = 9027,

        // new patterns added in C# 9.0
        ParenthesizedPattern = 9028,
        RelationalPattern = 9029,
        TypePattern = 9030,
        OrPattern = 9031,
        AndPattern = 9032,
        NotPattern = 9033,

        // Kinds between 9000 and 9039 are "reserved" for pattern matching.

        DeclarationExpression = 9040,
        RefExpression = 9050,
        RefType = 9051,
        ThrowExpression = 9052,
        ImplicitStackAllocArrayCreationExpression = 9053,
        SuppressNullableWarningExpression = 9054,
        NullableDirectiveTrivia = 9055,

        FunctionPointerType = 9056,
        FunctionPointerParameter = 9057,
        FunctionPointerParameterList = 9058,
        FunctionPointerCallingConvention = 9059,

        InitAccessorDeclaration = 9060,

        WithExpression = 9061,
        WithInitializerExpression = 9062,
        RecordDeclaration = 9063,

        DefaultConstraint = 9064,

        PrimaryConstructorBaseType = 9065,

        FunctionPointerUnmanagedCallingConventionList = 9066,
        FunctionPointerUnmanagedCallingConvention = 9067,

        RecordStructDeclaration = 9068,

        ExpressionColon = 9069,
    }
}


text:
package cn.nec.nlc.example.jamesli.servicetest05intentservice;

import android.app.Activity;
import android.content.BroadcastReceiver;
import android.content.ComponentName;
import android.content.Context;
import android.content.Intent;
import android.content.IntentFilter;
import android.content.ServiceConnection;
import android.os.Bundle;
import android.os.IBinder;
import android.view.Menu;
import android.view.MenuItem;
import android.view.View;
import android.widget.Button;
import android.widget.TextView;
import android.widget.Toast;

public class MainActivity extends Activity {
    private TextView textViewStatus;
    private Button buttonServiceOn;
    private Button buttonServiceOff;
    private DirectionView mDirectionView;
    private float markedDirectionAngle; // take 0 as example
    private int counterUiUpdates;

    // we use sendBroadcast for communication for the time being, mGyroListenerService will be
    // tested later, i.e. access through ServiceConnection
    private GyroListenerService mGyroListenerService;
    private boolean isServiceBound;

    // for service communication
    private Intent mServiceIntent;
    private ServiceConnection mConnection = new ServiceConnection() {
        @Override
        public void onServiceConnected(ComponentName componentName, IBinder iBinder) {
            GyroListenerService.MyBinder myBinder = (GyroListenerService.MyBinder) iBinder;
            mGyroListenerService = myBinder.getService();
        }
        @Override
        public void onServiceDisconnected(ComponentName componentName) {
            mGyroListenerService = null;
        }
    };
    // define BroadcastReceiver for receiving UI updates from Service
    private BroadcastReceiver receiverUiUpdates = new BroadcastReceiver() {
        @Override
        public void onReceive(Context context, Intent intent) {
            Bundle bundle = intent.getExtras();
            if (bundle != null) {
                // TO-DO: retrieve current direction on x-y plane (object-space)
                int resultCode = bundle.getInt(GyroListenerService.RESULT);
                if (resultCode == RESULT_OK) {
                    float thetaForDrawing = bundle.getFloat(GyroListenerService.CURRENT_DIRECTION);
                    mDirectionView.myDraw(thetaForDrawing -
                            (float) Math.toRadians(markedDirectionAngle));
                    textViewStatus.setText("UI has been updated by " + (counterUiUpdates++) +
                            " times");
                } else {    // RESULT_CANCELLED
                    textViewStatus.setText("Failed to get Gyro updates from Service");
                }
            }
        }
    };

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);

        textViewStatus = (TextView) findViewById(R.id.textViewStatus);
        buttonServiceOn = (Button) findViewById(R.id.buttonServiceOn);
        buttonServiceOff = (Button) findViewById(R.id.buttonServiceOff);
        mDirectionView = (DirectionView) findViewById(R.id.directionView);

        isServiceBound = false;     // service bind flag = false

        buttonServiceOn.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View view) {
                mServiceIntent = new Intent(MainActivity.this, GyroListenerService.class);
//                MainActivity.this.startService(mServiceIntent);
                MainActivity.this.bindService(mServiceIntent, mConnection, Context.BIND_AUTO_CREATE);
                    // BIND_AUTO_CREATE: create service as long as binding exists
                isServiceBound = true;
                Toast.makeText(MainActivity.this, "Gyro Listener Service Connected!",
                        Toast.LENGTH_LONG).show();
            }
        });
        buttonServiceOff.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View view) {
                if (isServiceBound) {
                    MainActivity.this.unbindService(mConnection);
                    isServiceBound = false;
                }
                Toast.makeText(MainActivity.this, "Gyro Listener Service Disconnected!",
                        Toast.LENGTH_LONG).show();
            }
        });
    }

    @Override
    protected void onResume() {
        super.onResume();
        counterUiUpdates = 0;
        markedDirectionAngle = 0;   // in degrees rather than radians
        registerReceiver(receiverUiUpdates, new IntentFilter(GyroListenerService.NOTIFICATION));
    }

    @Override
    protected void onPause() {
        super.onPause();
        unregisterReceiver(receiverUiUpdates);
    }

    @Override
    public boolean onCreateOptionsMenu(Menu menu) {
        // Inflate the menu; this adds items to the action bar if it is present.
        getMenuInflater().inflate(R.menu.menu_main, menu);
        return true;
    }

    @Override
    public boolean onOptionsItemSelected(MenuItem item) {
        // Handle action bar item clicks here. The action bar will
        // automatically handle clicks on the Home/Up button, so long
        // as you specify a parent activity in AndroidManifest.xml.
        int id = item.getItemId();

        //noinspection SimplifiableIfStatement
        if (id == R.id.action_settings) {
            return true;
        }

        return super.onOptionsItemSelected(item);
    }
}

redpajama_set_name: RedPajamaGithub


text:
class CreateEphemeraFields < ActiveRecord::Migration[5.0]
  def change
    create_table :ephemera_fields do |t|
      t.string :name
      t.integer :ephemera_project_id
      t.references :vocabulary, foreign_key: true

      t.timestamps
    end
  end
end


text:
#ifndef DATASET_H_
#define DATASET_H_

namespace repast {

/**
 * Interface for recording and writing data.
 */
class DataSet {

public:
	virtual ~DataSet() {}

	/**
	 * Records the data.
	 */
	virtual void record() = 0;

	/**
	 * Writes the data.
	 */
	virtual void write() = 0;

	/**
	 * Closes the dataset, after which it must be recreated to be used.
	 */
	virtual void close() = 0;
};

}

#endif /* DATASET_H_ */


text:
package org.biopax.paxtools.pattern.util;

import org.biopax.paxtools.controller.PathAccessor;
import org.biopax.paxtools.model.level3.*;

import java.util.HashSet;
import java.util.Set;

/**
 * This class takes two PhysicalEntity objects linked with generic or complex member relationships,
 * and prepares an array of PEs that link those.
 *
 * @author Ozgun Babur
 */
public class PhysicalEntityChain
{
	/**
	 * Array that links two ends of the chain.
	 */
	public PhysicalEntity[] pes;

	/**
	 * Accessor to the modification term.
	 */
	protected static final PathAccessor PE2TERM =
		new PathAccessor("PhysicalEntity/feature:ModificationFeature/modificationType/term");

	/**
	 * Accessor to the modification term.
	 */
	protected static final PathAccessor PE2FEAT =
		new PathAccessor("PhysicalEntity/feature:ModificationFeature");

	/**
	 * Constructor with endpoints. The end points are differentiated with the terms small and big.
	 * This refers to a hierarchy in the relation. Small means you will get to this end while going
	 * towards MEMBER direction, and big means this end is at the COMPLEX direction. To understand
	 * this please see the directions in LinkedPE.
	 * @param small member end of the chain
	 * @param big complex end of the chain
	 * @see org.biopax.paxtools.pattern.constraint.LinkedPE
	 */
	public PhysicalEntityChain(PhysicalEntity small, PhysicalEntity big)
	{
		pes = fillArray(big, small, 1, 0);

		if (pes == null)
		{
			throw new IllegalArgumentException("No link found between small PE = " +
				small.getRDFId() + " and big PE = " + big.getRDFId());
		}
		assert !containsNull(pes);
	}

	/**
	 * Checks if any element in the chain is null.
	 * @param pes element array
	 * @return true if null found
	 */
	private boolean containsNull(PhysicalEntity[] pes)
	{
		for (PhysicalEntity pe : pes)
		{
			if (pe == null) return true;
		}
		return false;
	}

	/**
	 * Creates the chain that links the given endpoints.
	 * @param parent current element
	 * @param target target at the member end
	 * @param depth current depth
	 * @param dir current direction to traverse homologies
	 * @return array of entities
	 */
	protected PhysicalEntity[] fillArray(PhysicalEntity parent, PhysicalEntity target, int depth,
		int dir)
	{
		if (parent == target)
		{
			PhysicalEntity[] pes = new PhysicalEntity[depth];
			pes[0] = target;
			return pes;
		}

		if (parent instanceof Complex)
		{
			for (PhysicalEntity mem : ((Complex) parent).getComponent())
			{
				PhysicalEntity[] pes = fillArray(mem, target, depth + 1, 0);
				if (pes != null)
				{
					pes[pes.length - depth] = parent;
					return pes;
				}
			}
		}

		if (dir <= 0)
		for (PhysicalEntity mem : parent.getMemberPhysicalEntity())
		{
			PhysicalEntity[] pes = fillArray(mem, target, depth + 1, -1);
			if (pes != null)
			{
				pes[pes.length - depth] = parent;
				return pes;
			}
		}

		if (dir >= 0)
		for (PhysicalEntity grand : parent.getMemberPhysicalEntityOf())
		{
			PhysicalEntity[] pes = fillArray(grand, target, depth + 1, 1);
			if (pes != null)
			{
				pes[pes.length - depth] = parent;
				return pes;
			}
		}

		return null;
	}

	/**
	 * Retrieves the cellular location of the PhysicalEntity.
	 * @return cellular location of the PhysicalEntity
	 */
	public String getCellularLocation()
	{
		for (PhysicalEntity pe : pes)
		{
			CellularLocationVocabulary voc = pe.getCellularLocation();
			if (voc != null)
			{
				for (String term : voc.getTerm())
				{
					if (term != null && term.length() > 0) return term;
				}
			}
		}
		return null;
	}

	/**
	 * Checks if two chains intersect without ignoring endpoint intersection.
	 * @param rpeh second chain
	 * @return true if they intersect
	 */
	public boolean intersects(PhysicalEntityChain rpeh)
	{
		return intersects(rpeh, false);
	}

	/**
	 * Checks if two chains intersect.
	 * @param rpeh second chain
	 * @param ignoreEndPoints flag to ignore intersections at the endpoints of the chains
	 * @return true if they intersect
	 */
	public boolean intersects(PhysicalEntityChain rpeh, boolean ignoreEndPoints)
	{
		for (PhysicalEntity pe1 : pes)
		{
			for (PhysicalEntity pe2 : rpeh.pes)
			{
				if (pe1 == pe2)
				{
					if (ignoreEndPoints)
					{
						if ((pes[0] == pe1 || pes[pes.length-1] == pe1) &&
							(rpeh.pes[0] == pe2 || rpeh.pes[rpeh.pes.length-1] == pe2))
						{
							continue;
						}
					}

					return true;
				}
			}
		}
		return false;
	}

	/**
	 * Checks if the chain has a member with an activity label.
	 * @return the activity status found
	 */
	public Activity checkActivityLabel()
	{
		boolean active = false;
		boolean inactive = false;

		for (PhysicalEntity pe : pes)
		{
			for (Object o : PE2TERM.getValueFromBean(pe))
			{
				String s = (String) o;
				if (s.contains("inactiv")) inactive = true;
				else if (s.contains("activ")) active = true;
			}

			for (String s : pe.getName())
			{
				if (s.contains("inactiv")) inactive = true;
				else if (s.contains("activ")) active = true;
			}
		}

		if (active) if (inactive) return Activity.BOTH; else return Activity.ACTIVE;
		else if (inactive) return Activity.INACTIVE; else return Activity.NONE;
	}

	/**
	 * Values for activity.
	 */
	enum Activity
	{
		ACTIVE,
		INACTIVE,
		BOTH,
		NONE
	}

	/**
	 * Collects modifications from the elements of the chain.
	 * @return modifications
	 */
	public Set<ModificationFeature> getModifications()
	{
		Set<ModificationFeature> set = new HashSet<ModificationFeature>();

		for (PhysicalEntity pe : pes)
		{
			set.addAll(PE2FEAT.getValueFromBean(pe));
		}
		return set;
	}
}


text:
"""Generate NQ gold cache data."""

import os
import pickle

from absl import app
from absl import flags
from absl import logging
from natural_questions import eval_utils

flags.DEFINE_string(
    'gold_path', None, 'Path to the gzip JSON data. For '
    'multiple files, should be a glob '
    'pattern (e.g. "/path/to/files-*"')

flags.DEFINE_integer('num_threads', 10, 'Number of threads for reading.')

FLAGS = flags.FLAGS

def main(_):
  cache_path = os.path.join(os.path.dirname(FLAGS.gold_path), 'cache')
  nq_gold_dict = eval_utils.read_annotation(
      FLAGS.gold_path, n_threads=FLAGS.num_threads)
  logging.info('Caching gold data to: %s', format(cache_path))
  pickle.dump(nq_gold_dict, open(cache_path, 'wb'))

if __name__ == '__main__':
  flags.mark_flag_as_required('gold_path')
  app.run(main)


text:
<?xml version="1.0" encoding="utf-8"?>
<extension version="3.1" type="plugin" group="system" method="upgrade">
	<name>plg_system_debug</name>
	<author>Joomla! Project</author>
	<creationDate>December 2006</creationDate>
	<copyright>Copyright (C) 2005 - 2015 Open Source Matters. All rights reserved.</copyright>
	<license>GNU General Public License version 2 or later; see LICENSE.txt</license>
	<authorEmail>admin@joomla.org</authorEmail>
	<authorUrl>www.joomla.org</authorUrl>
	<version>3.0.0</version>
	<description>PLG_DEBUG_XML_DESCRIPTION</description>
	<files>
		<filename plugin="debug">debug.php</filename>
	</files>
	<languages>
		<language tag="en-GB">en-GB.plg_system_debug.ini</language>
		<language tag="en-GB">en-GB.plg_system_debug.sys.ini</language>
	</languages>
	<config>
		<fields name="params">
			<fieldset name="basic">
				<field name="filter_groups" type="usergrouplist"
					description="PLG_DEBUG_FIELD_ALLOWED_GROUPS_DESC"
					label="PLG_DEBUG_FIELD_ALLOWED_GROUPS_LABEL"
					multiple="true"
					size="10"
				/>

				<field name="profile" type="radio"
					class="btn-group btn-group-yesno"
					default="1"
					description="PLG_DEBUG_FIELD_PROFILING_DESC"
					label="PLG_DEBUG_FIELD_PROFILING_LABEL"
				>
					<option value="1">JYES</option>
					<option value="0">JNO</option>
				</field>

				<field name="queries" type="radio"
					class="btn-group btn-group-yesno"
					default="1"
					description="PLG_DEBUG_FIELD_QUERIES_DESC"
					label="PLG_DEBUG_FIELD_QUERIES_LABEL"
				>
					<option value="1">JYES</option>
					<option value="0">JNO</option>
				</field>

				<field name="query_types" type="radio"
					class="btn-group btn-group-yesno"
					default="1"
					description="PLG_DEBUG_FIELD_QUERY_TYPES_DESC"
					label="PLG_DEBUG_FIELD_QUERY_TYPES_LABEL"
				>
					<option value="1">JYES</option>
					<option value="0">JNO</option>
				</field>

				<field name="memory" type="radio"
					class="btn-group btn-group-yesno"
					default="1"
					description="PLG_DEBUG_FIELD_MEMORY_DESC"
					label="PLG_DEBUG_FIELD_MEMORY_LABEL"
				>
					<option value="1">JYES</option>
					<option value="0">JNO</option>
				</field>

				<field name="logs" type="radio"
					class="btn-group btn-group-yesno"
					default="1"
					description="PLG_DEBUG_FIELD_LOGS_DESC"
					label="PLG_DEBUG_FIELD_LOGS_LABEL"
				>
					<option value="1">JYES</option>
					<option value="0">JNO</option>
				</field>

				<field name="log_priorities" type="list" multiple="true" default="all"
					label="PLG_DEBUG_FIELD_LOG_PRIORITIES_LABEL"
					description="PLG_DEBUG_FIELD_LOG_PRIORITIES_DESC"
				>
					<option value="all">PLG_DEBUG_FIELD_LOG_PRIORITIES_ALL</option>
					<option value="emergency">PLG_DEBUG_FIELD_LOG_PRIORITIES_EMERGENCY</option>
					<option value="alert">PLG_DEBUG_FIELD_LOG_PRIORITIES_ALERT</option>
					<option value="critical">PLG_DEBUG_FIELD_LOG_PRIORITIES_CRITICAL</option>
					<option value="error">PLG_DEBUG_FIELD_LOG_PRIORITIES_ERROR</option>
					<option value="warning">PLG_DEBUG_FIELD_LOG_PRIORITIES_WARNING</option>
					<option value="notice">PLG_DEBUG_FIELD_LOG_PRIORITIES_NOTICE</option>
					<option value="info">PLG_DEBUG_FIELD_LOG_PRIORITIES_INFO</option>
					<option value="debug">PLG_DEBUG_FIELD_LOG_PRIORITIES_DEBUG</option>
				</field>

				<field name="log_categories" type="text" size="60" default=""
					label="PLG_DEBUG_FIELD_LOG_CATEGORIES_LABEL"
					description="PLG_DEBUG_FIELD_LOG_CATEGORIES_DESC"
				/>

				<field name="log_category_mode" type="radio" default="0" class="btn-group btn-group-yesno"
					label="PLG_DEBUG_FIELD_LOG_CATEGORY_MODE_LABEL"
					description="PLG_DEBUG_FIELD_LOG_CATEGORY_MODE_DESC"
				>
					<option value="0">PLG_DEBUG_FIELD_LOG_CATEGORY_MODE_INCLUDE</option>
					<option value="1">PLG_DEBUG_FIELD_LOG_CATEGORY_MODE_EXCLUDE</option>
				</field>
			</fieldset>

			<fieldset name="language"
				label="PLG_DEBUG_LANGUAGE_FIELDSET_LABEL">

				<field name="language_errorfiles" type="radio"
					class="btn-group btn-group-yesno"
					default="1"
					description="PLG_DEBUG_FIELD_LANGUAGE_ERRORFILES_DESC"
					label="PLG_DEBUG_FIELD_LANGUAGE_ERRORFILES_LABEL"
				>
					<option value="1">JYES</option>
					<option value="0">JNO</option>
				</field>

				<field name="language_files" type="radio"
					class="btn-group btn-group-yesno"
					default="1"
					description="PLG_DEBUG_FIELD_LANGUAGE_FILES_DESC"
					label="PLG_DEBUG_FIELD_LANGUAGE_FILES_LABEL"
				>
					<option value="1">JYES</option>
					<option value="0">JNO</option>
				</field>

				<field name="language_strings" type="radio"
					class="btn-group btn-group-yesno"
					default="1"
					description="PLG_DEBUG_FIELD_LANGUAGE_STRING_DESC"
					label="PLG_DEBUG_FIELD_LANGUAGE_STRING_LABEL"
				>
					<option value="1">JYES</option>
					<option value="0">JNO</option>
				</field>

				<field name="strip-first" type="radio"
					class="btn-group btn-group-yesno"
					default="1"
					description="PLG_DEBUG_FIELD_STRIP_FIRST_DESC"
					label="PLG_DEBUG_FIELD_STRIP_FIRST_LABEL"
				>
					<option value="1">JYES</option>
					<option value="0">JNO</option>
				</field>

				<field name="strip-prefix" type="textarea"
					cols="30"
					description="PLG_DEBUG_FIELD_STRIP_PREFIX_DESC"
					label="PLG_DEBUG_FIELD_STRIP_PREFIX_LABEL"
					rows="4"
				/>

				<field name="strip-suffix" type="textarea"
					cols="30"
					description="PLG_DEBUG_FIELD_STRIP_SUFFIX_DESC"
					label="PLG_DEBUG_FIELD_STRIP_SUFFIX_LABEL"
					rows="4"
				/>
			</fieldset>

			<fieldset name="logging"
				label="PLG_DEBUG_LOGGING_FIELDSET_LABEL">

				<field name="log-deprecated" type="radio"
					class="btn-group btn-group-yesno"
					default="0"
					description="PLG_DEBUG_FIELD_LOG_DEPRECATED_DESC"
					label="PLG_DEBUG_FIELD_LOG_DEPRECATED_LABEL"
				>
					<option value="1">JYES</option>
					<option value="0">JNO</option>
				</field>

				<field name="log-everything" type="radio"
					class="btn-group btn-group-yesno"
					default="0"
					description="PLG_DEBUG_FIELD_LOG_EVERYTHING_DESC"
					label="PLG_DEBUG_FIELD_LOG_EVERYTHING_LABEL"
				>
					<option value="1">JYES</option>
					<option value="0">JNO</option>
				</field>

				<field name="log-executed-sql" type="radio"
					class="btn-group btn-group-yesno"
					default="0"
					description="PLG_DEBUG_FIELD_EXECUTEDSQL_DESC"
					label="PLG_DEBUG_FIELD_EXECUTEDSQL_LABEL"
				>
					<option value="1">JYES</option>
					<option value="0">JNO</option>
				</field>
			</fieldset>
		</fields>
	</config>
</extension>


text:
        现在就加入 Deal。

    <form name="form" ng-submit="submit()" novalidate shake-focus-submit>

            <input type="text" ng-model="user.username" name="username" class="form-control" placeholder="用户名"
                   autocomplete="off"
                   ng-model-options="{ updateOn: 'default blur', debounce: {'default': 300, 'blur': 0} }"
                   ng-maxlength="20"
                   ng-required="true"
                   ng-pattern=""
                   valid-unique-username
                   valid-letter-num-not-pure-num>

用户名必填

长度不能超过20

用户名只能包含字母数字,并且必须包含字母

用户名已被占用!

正在验证...

            <input type="password" ng-model="user.password" name="password" class="form-control" placeholder="密码"
                   autocomplete="off"
                   xxxmaxlength="20"
                   ng-model-options="{ updateOn: 'default blur', debounce: {'default': 400, 'blur': 0} }"
                   ng-maxlength="20"
                   ng-minlength="6"
                   ng-required="true">

密码必填。

密码不能超过20位。

密码最少6位。

            <input type="password" ng-model="user.repassword" name="repassword" class="form-control"
                   placeholder="确认密码"
                   autocomplete="off"
                   ng-maxlength="20"
                   ng-model-options="{ updateOn: 'default blur', debounce: {'default': 400, 'blur': 0} }"
                   ng-required="true"
                   repeat-confirmed="form.password">

密码必填

长度不能超过20

两次密码必须一致

            <input type="email" ng-model="user.email" name="email" class="form-control" placeholder="邮箱"
                   autocomplete="off"
                   ng-required="true"
                   ng-model-options="{ updateOn: 'default blur', debounce: {'default': 400, 'blur': 0} }"
                   valid-unique-email
                   valid-email>

留个邮箱吧!

不像是有效的电子邮箱。

该邮件地址已被注册。

正在验证...

        <button type="submit" class="btn-submit btn btn-default">注册</button>

    </form>


text:
package org.apache.archiva.repository.base;

import org.apache.archiva.components.registry.RegistryException;
import org.apache.archiva.configuration.model.AbstractRepositoryConfiguration;
import org.apache.archiva.configuration.model.Configuration;
import org.apache.archiva.configuration.provider.IndeterminateConfigurationException;
import org.apache.archiva.event.Event;
import org.apache.archiva.event.BasicEventManager;
import org.apache.archiva.event.EventType;
import org.apache.archiva.repository.EditableRepository;
import org.apache.archiva.repository.Repository;
import org.apache.archiva.repository.RepositoryException;
import org.apache.archiva.repository.RepositoryHandler;
import org.apache.archiva.repository.RepositoryProvider;
import org.apache.archiva.repository.RepositoryState;
import org.apache.archiva.repository.RepositoryType;
import org.apache.archiva.repository.event.LifecycleEvent;
import org.apache.archiva.repository.validation.CheckedResult;
import org.apache.archiva.repository.validation.CombinedValidator;
import org.apache.archiva.repository.validation.RepositoryChecker;
import org.apache.archiva.repository.validation.RepositoryValidator;
import org.apache.archiva.repository.validation.ValidationError;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import java.util.Collection;
import java.util.Collections;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.stream.Collectors;

/**
 * Base abstract class for repository handlers.
 *
 * @author Martin Stockhammer <martin_s@apache.org>
 */
public abstract class AbstractRepositoryHandler<R extends Repository, C extends AbstractRepositoryConfiguration> implements RepositoryHandler<R, C>
{

    private static final Logger log = LoggerFactory.getLogger( AbstractRepositoryHandler.class );

    protected final Map<RepositoryType, RepositoryProvider> providerMap = new HashMap<>( );
    private CombinedValidator<R> combinedValidator;
    private final Class<R> repositoryClazz;
    private final Class<C> configurationClazz;
    private final BasicEventManager eventManager;
    private final Map<String, R> repositoryMap  = new HashMap<>(  );
    private final ConfigurationHandler configurationHandler;

    public AbstractRepositoryHandler(Class<R> repositoryClazz, Class<C> configurationClazz, ConfigurationHandler configurationHandler) {
        this.repositoryClazz = repositoryClazz;
        this.configurationClazz = configurationClazz;
        this.eventManager = new BasicEventManager( this );
        this.configurationHandler = configurationHandler;
    }

    protected List<RepositoryValidator<R>> initValidators( Class<R> clazz, List<RepositoryValidator<? extends Repository>> repositoryGroupValidatorList )
    {
        if ( repositoryGroupValidatorList != null && repositoryGroupValidatorList.size( ) > 0 )
        {
            return repositoryGroupValidatorList.stream( ).filter(
                v -> v.isFlavour( clazz )
            ).map( v -> v.narrowTo( clazz ) ).collect( Collectors.toList( ) );
        }
        else
        {
            return Collections.emptyList( );
        }
    }

    protected CombinedValidator<R> getCombinedValidator( Class<R> clazz, List<RepositoryValidator<? extends Repository>> repositoryGroupValidatorList )
    {
        return new CombinedValidator<>( clazz, initValidators( clazz, repositoryGroupValidatorList ) );
    }

    protected void setLastState( R repo, RepositoryState state )
    {
        RepositoryState currentState = repo.getLastState( );
        if ( repo instanceof EditableRepository )
        {
            if ( state.getOrderNumber( ) > repo.getLastState( ).getOrderNumber( ) )
            {
                ( (EditableRepository) repo ).setLastState( state );
            }
        }
        else
        {
            log.error( "Found a not editable repository instance: {}, {}", repo.getId( ), repo.getClass( ).getName( ) );
        }
        if (state == RepositoryState.REGISTERED && state != currentState ) {
            pushEvent( LifecycleEvent.REGISTERED,  repo );
        } else if (state == RepositoryState.UNREGISTERED && state != currentState) {
            pushEvent( LifecycleEvent.UNREGISTERED, repo );
        }
    }

    @Override
    public void setRepositoryProviders( List<RepositoryProvider> providers )
    {
        if ( providers != null )
        {
            for ( RepositoryProvider provider : providers )
            {
                for ( RepositoryType type : provider.provides( ) )
                {
                    providerMap.put( type, provider );
                }
            }
        }
    }

    protected RepositoryProvider getProvider(RepositoryType type) {
        return providerMap.get( type );
    }

    @Override
    public void setRepositoryValidator( List<RepositoryValidator<? extends Repository>> repositoryValidatorList )
    {
        this.combinedValidator = getCombinedValidator( repositoryClazz, repositoryValidatorList );
    }

    protected CombinedValidator<R> getCombinedValidator() {
        return this.combinedValidator;
    }

    @Override
    public Class<R> getFlavour( )
    {
        return this.repositoryClazz;
    }

    @Override
    public Class<C> getConfigurationFlavour( )
    {
        return this.configurationClazz;
    }

    @Override
    public void processOtherVariantRemoval( Repository repository )
    {
        // Default: do nothing
    }

    protected void pushEvent( Event event )
    {
        eventManager.fireEvent( event );
    }

    protected void pushEvent(EventType<? extends LifecycleEvent> event, R repo) {
        pushEvent( new LifecycleEvent( event, this, repo ) );
    }

    protected Map<String, R> getRepositories() {
        return repositoryMap;
    }

    protected ConfigurationHandler getConfigurationHandler() {
        return configurationHandler;
    }

    @Override
    public void activateRepository( R repository )
    {
        //
    }

    @Override
    public void deactivateRepository( R repository )
    {
        repository.close();
    }

    @Override
    public abstract R newInstance( C repositoryConfiguration ) throws RepositoryException;

    @Override
    public <D> CheckedResult<R, D> putWithCheck( C repositoryConfiguration, RepositoryChecker<R, D> checker ) throws RepositoryException
    {
        final String id = repositoryConfiguration.getId( );
        R currentRepository = getRepositories().get( id );
        R managedRepository = newInstance( repositoryConfiguration );
        CheckedResult<R, D> result;
        if ( currentRepository == null )
        {
            result = checker.apply( managedRepository );
        }
        else
        {
            result = checker.applyForUpdate( managedRepository );
        }
        if ( result.isValid( ) )
        {
            put( result.getRepository() );
        }
        return result;

    }

    @Override
    public CheckedResult<R, Map<String, List<ValidationError>>> putWithCheck( C repositoryConfiguration ) throws RepositoryException
    {
        return putWithCheck( repositoryConfiguration, getValidator( ) );
    }

    protected abstract C findRepositoryConfiguration( Configuration configuration, String id);

    protected abstract void removeRepositoryConfiguration(Configuration configuration, C repoConfiguration );

    protected abstract void addRepositoryConfiguration( Configuration configuration, C repoConfiguration );

    /**
     * Removes a repository group from the registry and configuration, if it exists.
     * The change is saved to the configuration immediately.
     *
     * @param id the id of the repository group to remove
     * @throws RepositoryException if an error occurs during configuration save
     */
    @Override
    public void remove( String id ) throws RepositoryException
    {
        R repo = get( id );
        if ( repo != null )
        {
            try
            {
                repo = getRepositories().remove( id );
                if ( repo != null )
                {
                    deactivateRepository( repo );
                    Configuration configuration = this.configurationHandler.getBaseConfiguration( );
                    C cfg = findRepositoryConfiguration( configuration, id );
                    if ( cfg != null )
                    {
                        removeRepositoryConfiguration( configuration, cfg );
                    }
                    this.configurationHandler.save( configuration, ConfigurationHandler.REGISTRY_EVENT_TAG );
                    setLastState( repo, RepositoryState.UNREGISTERED );
                }

            }
            catch ( RegistryException | IndeterminateConfigurationException e )
            {
                // Rollback
                log.error( "Could not save config after repository removal: {}", e.getMessage( ), e );
                getRepositories().put( repo.getId( ), repo );
                throw new RepositoryException( "Could not save configuration after repository removal: " + e.getMessage( ) );
            }
        }
    }

    @Override
    public void remove( String id, Configuration configuration ) throws RepositoryException
    {
        R repo = getRepositories().get( id );
        if ( repo != null )
        {
            repo = getRepositories().remove( id );
            if ( repo != null )
            {
                deactivateRepository( repo );
            }
            setLastState( repo, RepositoryState.UNREGISTERED );
        }
        C cfg = findRepositoryConfiguration(configuration, id );
        if ( cfg != null )
        {
            removeRepositoryConfiguration(configuration, cfg );
        }
    }

    @Override
    public R get( String groupId )
    {
        return getRepositories().get( groupId );
    }

    @Override
    public Collection<R> getAll( )
    {
        return Collections.unmodifiableCollection( getRepositories( ).values( ) );
    }

    @Override
    public RepositoryValidator<R> getValidator( )
    {
        return getCombinedValidator();
    }

    @Override
    public CheckedResult<R, Map<String, List<ValidationError>>> validateRepository( R repository )
    {
        return getCombinedValidator(  ).apply( repository );

    }

    @Override
    public CheckedResult<R,Map<String, List<ValidationError>>> validateRepositoryForUpdate( R repository )
    {
        return getCombinedValidator().applyForUpdate( repository );
    }
    @Override
    public boolean hasRepository( String id )
    {
        return getRepositories().containsKey( id );
    }

    @Override
    public void close( )
    {
        for ( R repository : getRepositories().values( ) )
        {
            try
            {
                deactivateRepository( repository );
            }
            catch ( Throwable e )
            {
                log.error( "Could not close repository {}: {}", repository.getId( ), e.getMessage( ) );
            }
        }
        getRepositories().clear( );
    }

    protected void registerNewRepository( C repositoryGroupConfiguration, R currentRepository, Configuration configuration, boolean updated ) throws IndeterminateConfigurationException, RegistryException, RepositoryException
    {
        final String id = repositoryGroupConfiguration.getId( );
        getConfigurationHandler().save( configuration, ConfigurationHandler.REGISTRY_EVENT_TAG );
        updateReferences( currentRepository, repositoryGroupConfiguration );
        if (!updated )
        {
            setLastState( currentRepository, RepositoryState.REFERENCES_SET );
        }
        activateRepository( currentRepository );
        getRepositories().put( id, currentRepository );
        setLastState( currentRepository, RepositoryState.REGISTERED );
    }

    protected void rollback( Configuration configuration, R oldRepository, Exception e, C oldCfg ) throws RepositoryException
    {
        final String id = oldRepository.getId( );
        replaceOrAddRepositoryConfig( oldCfg, configuration );
        try
        {
            getConfigurationHandler().save( configuration, ConfigurationHandler.REGISTRY_EVENT_TAG );
        }
        catch ( IndeterminateConfigurationException | RegistryException indeterminateConfigurationException )
        {
            log.error( "Fatal error, config save during rollback failed: {}", e.getMessage( ), e );
        }
        updateReferences( oldRepository, oldCfg );
        setLastState( oldRepository, RepositoryState.REFERENCES_SET );
        activateRepository( oldRepository );
        getRepositories().put( id, oldRepository );
        setLastState( oldRepository, RepositoryState.REGISTERED );
    }

    protected void replaceOrAddRepositoryConfig( C repositoryGroupConfiguration, Configuration configuration )
    {
        C oldCfg = findRepositoryConfiguration( configuration, repositoryGroupConfiguration.getId( ) );
        if ( oldCfg != null )
        {
            removeRepositoryConfiguration(configuration, oldCfg );
        }
        addRepositoryConfiguration( configuration, repositoryGroupConfiguration );
    }

}


text:
var ObserverClass = Ember.Object.extend({

  _keysBefore: null,
  _keys: null,
  _values: null,
  _before : null,
  _after: null,

  isEnabled: true,

  init: function() {
    this._super();
    this.reset();
  },

  propertyWillChange: function(target, key) {
    if (this._keysBefore[key] === undefined) { this._keysBefore[key] = 0; }
    this._keysBefore[key]++;
  },

  /**
    Invoked when the property changes.  Just records the parameters for
    later analysis.
  */
  propertyDidChange: function(target, key, value) {
    if (this._keys[key] === undefined) { this._keys[key] = 0; }
    this._keys[key]++;
    this._values[key] = value;
  },

  /**
    Resets the recorded results for another run.

    @returns {Object} receiver
  */
  reset: function() {
    this._keysBefore = {};
    this._keys = {};
    this._values = {};
    this._before = null;
    this._after = null;
    return this;
  },

  observeBefore: function(obj) {
    if (obj.addBeforeObserver) {
      var keys = Array.prototype.slice.call(arguments, 1),
          loc  = keys.length;
      while(--loc>=0) obj.addBeforeObserver(keys[loc], this, 'propertyWillChange');
    }
    return this;
  },

  /**
    Begins observing the passed key names on the passed object.  Any changes
    on the named properties will be recorded.

    @param {Ember.Enumerable} obj
      The enumerable to observe.

    @returns {Object} receiver
  */
  observe: function(obj) {
    if (obj.addObserver) {
      var keys = Array.prototype.slice.call(arguments, 1),
          loc  = keys.length;
      while(--loc>=0) obj.addObserver(keys[loc], this, 'propertyDidChange');
    } else {
      this.isEnabled = false;
    }
    return this;
  },

  /**
    Returns true if the passed key was invoked.  If you pass a value as
    well then validates that the values match.

    @param {String} key
      Key to validate

    @param {Object} value
      (Optional) value

    @returns {Boolean}
  */
  validate: function(key, value) {
    if (!this.isEnabled) return true;
    if (!this._keys[key]) return false;
    if (arguments.length>1) return this._values[key] === value;
    else return true;
  },

  /**
    Returns times the before observer as invoked.

    @param {String} key
      Key to check
  */
  timesCalledBefore: function(key) {
    return this._keysBefore[key] || 0;
  },

  /**
    Returns times the observer as invoked.

    @param {String} key
      Key to check
  */
  timesCalled: function(key) {
    return this._keys[key] || 0;
  },

  /**
    begins acting as an enumerable observer.
  */
  observeEnumerable: function(obj) {
    obj.addEnumerableObserver(this);
    return this;
  },

  stopObserveEnumerable: function(obj) {
    obj.removeEnumerableObserver(this);
    return this;
  },

  enumerableWillChange: function() {
    equal(this._before, null, 'should only call once');
    this._before = Array.prototype.slice.call(arguments);
  },

  enumerableDidChange: function() {
    equal(this._after, null, 'should only call once');
    this._after = Array.prototype.slice.call(arguments);
  }

});

/**
  Defines a test suite that can be used to test any object for compliance
  with any enumerable.  To use, extend this object and define the required
  methods to generate new object instances for testing, etc.

  You can also add your own tests by defining new methods beginning with the
  word 'test'
*/
var EnumerableTests = Ember.Object.extend({

  /**
    Define a name for these tests - all modules are prefixed w/ it.

    @type String
  */
  name: Ember.required(String),

  /**
    Implement to return a new enumerable object for testing.  Should accept
    either no parameters, a single number (indicating the desired length of
    the collection) or an array of objects.

    @param {Array} content
      An array of items to include in the enumerable optionally.

    @returns {Ember.Enumerable} a new enumerable
  */
  newObject: Ember.required(Function),

  /**
    Implement to return a set of new fixture objects that can be applied to
    the enumerable.  This may be passed into the newObject method.

    @param {Number} count
      The number of items required.

    @returns {Array} array of items
  */
  newFixture: function(cnt) {
    var ret = [];
    while(--cnt>=0) ret.push(Ember.generateGuid());
    return ret;
  },

  /**
    Implement accept an instance of the enumerable and return an array
    containing the objects in the enumerable.  This is used only for testing
    so performance is not important.

    @param {Ember.Enumerable} enumerable
      The enumerable to convert.

    @returns {Array} array of items
  */
  toArray: Ember.required(Function),

  /**
    Implement this method if your object can mutate internally (even if it
    does not support the MutableEnumerable API).  The method should accept
    an object of your desired type and modify it somehow.  Suite tests will
    use this to ensure that all appropriate caches, etc. clear when the
    mutation occurs.

    If you do not define this optional method, then mutation-related tests
    will be skipped.

    @param {Ember.Enumerable} enumerable
      The enumerable to mutate

    @returns {void}
  */
  mutate: function() {},

  /**
    Becomes true when you define a new mutate() method, indicating that
    mutation tests should run.  This is calculated automatically.

    @type Boolean
  */
  canTestMutation: Ember.computed(function() {
    return this.mutate !== EnumerableTests.prototype.mutate;
  }),

  /**
    Invoked to actually run the test - overridden by mixins
  */
  run: function() {},

  /**
    Creates a new observer object for testing.  You can add this object as an
    observer on an array and it will record results anytime it is invoked.
    After running the test, call the validate() method on the observer to
    validate the results.
  */
  newObserver: function(obj) {
    var ret = Ember.get(this, 'observerClass').create();
    if (arguments.length>0) ret.observeBefore.apply(ret, arguments);
    if (arguments.length>0) ret.observe.apply(ret, arguments);
    return ret;
  },

  observerClass: ObserverClass

});

EnumerableTests.reopenClass({

  plan: null,

  run: function() {
    var C = this;
    return new C().run();
  },

  module: function(desc, opts) {
    if (!opts) opts = {};
    var setup = opts.setup, teardown = opts.teardown;
    this.reopen({
      run: function() {
        this._super();
        var title = Ember.get(this,'name')+': '+desc, ctx = this;
        module(title, {
          setup: function() {
            if (setup) setup.call(ctx);
          },

          teardown: function() {
            if (teardown) teardown.call(ctx);
          }
        });
      }
    });
  },

  test: function(name, func) {
    this.reopen({
      run: function() {
        this._super();
        var ctx = this;
        if (!func) test(name); // output warning
        else test(name, function() { func.call(ctx); });
      }
    });
  },

  // convert to guids to minimize logging.
  same: function(actual, exp, message) {
    actual = (actual && actual.map) ? actual.map(function(x) { return Ember.guidFor(x); }) : actual;
    exp = (exp && exp.map) ? exp.map(function(x) { return Ember.guidFor(x); }) : exp;
    return deepEqual(actual, exp, message);
  },

  // easy way to disable tests
  notest: function() {}

});

Ember.EnumerableTests = EnumerableTests;
Ember.EnumerableTests.ObserverClass = ObserverClass;

require('ember-runtime/~tests/suites/enumerable/compact');
require('ember-runtime/~tests/suites/enumerable/contains');
require('ember-runtime/~tests/suites/enumerable/every');
require('ember-runtime/~tests/suites/enumerable/filter');
require('ember-runtime/~tests/suites/enumerable/find');
require('ember-runtime/~tests/suites/enumerable/firstObject');
require('ember-runtime/~tests/suites/enumerable/forEach');
require('ember-runtime/~tests/suites/enumerable/mapProperty');
require('ember-runtime/~tests/suites/enumerable/invoke');
require('ember-runtime/~tests/suites/enumerable/lastObject');
require('ember-runtime/~tests/suites/enumerable/map');
require('ember-runtime/~tests/suites/enumerable/reduce');
require('ember-runtime/~tests/suites/enumerable/reject');
require('ember-runtime/~tests/suites/enumerable/some');
require('ember-runtime/~tests/suites/enumerable/toArray');
require('ember-runtime/~tests/suites/enumerable/uniq');
require('ember-runtime/~tests/suites/enumerable/without');