text:
' Copyright (c) Microsoft.  All Rights Reserved.  Licensed under the Apache License, Version 2.0.  See License.txt in the project root for license information.

Imports System.Threading.Tasks

Namespace Microsoft.CodeAnalysis.Editor.UnitTests.IntelliSense

    <[UseExportProvider]>
    Public Class CSharpCompletionCommandHandlerTests_InternalsVisibleTo

        <WpfFact, Trait(Traits.Feature, Traits.Features.Completion)>
        Public Async Function CodeCompletionContainsOtherAssembliesOfSolution() As Task
            Using state = TestState.CreateTestStateFromWorkspace(
                <Workspace>
                    <Project Language="C#" CommonReferences="true" AssemblyName="ClassLibrary1"/>
                    <Project Language="C#" CommonReferences="true" AssemblyName="ClassLibrary2"/>
                    <Project Language="C#" CommonReferences="true" AssemblyName="ClassLibrary3"/>
                    <Project Language="C#" CommonReferences="true" AssemblyName="TestAssembly">
                        <Document FilePath="C.cs">
[assembly: System.Runtime.CompilerServices.InternalsVisibleTo("$$
                        </Document>
                    </Project>
                </Workspace>)
                state.SendInvokeCompletionList()
                Await state.AssertCompletionSession()
                Assert.True(state.CompletionItemsContainsAll({"ClassLibrary1", "ClassLibrary2", "ClassLibrary3"}))
            End Using
        End Function

        <WpfFact, Trait(Traits.Feature, Traits.Features.Completion)>
        Public Async Function CodeCompletionContainsOtherAssemblyIfAttributeSuffixIsPresent() As Task
            Using state = TestState.CreateTestStateFromWorkspace(
                <Workspace>
                    <Project Language="C#" CommonReferences="true" AssemblyName="ClassLibrary1"/>
                    <Project Language="C#" CommonReferences="true" AssemblyName="TestAssembly">
                        <Document FilePath="C.cs">
[assembly: System.Runtime.CompilerServices.InternalsVisibleToAttribute("$$
                        </Document>
                    </Project>
                </Workspace>)
                state.SendInvokeCompletionList()
                Await state.AssertCompletionSession()
                Assert.True(state.CompletionItemsContainsAll({"ClassLibrary1"}))
            End Using
        End Function

        <WpfFact, Trait(Traits.Feature, Traits.Features.Completion)>
        Public Async Function CodeCompletionIsTriggeredWhenDoubleQuoteIsEntered() As Task
            Using state = TestState.CreateTestStateFromWorkspace(
                <Workspace>
                    <Project Language="C#" CommonReferences="true" AssemblyName="ClassLibrary1"/>
                    <Project Language="C#" CommonReferences="true" AssemblyName="TestAssembly">
                        <Document FilePath="C.cs">
[assembly: System.Runtime.CompilerServices.InternalsVisibleTo($$
                        </Document>
                    </Project>
                </Workspace>)
                Await state.AssertNoCompletionSession()
                state.SendTypeChars(""""c)
                Await state.AssertCompletionSession()
                Assert.True(state.CompletionItemsContainsAll({"ClassLibrary1"}))
            End Using
        End Function

        <WpfFact, Trait(Traits.Feature, Traits.Features.Completion)>
        Public Async Function CodeCompletionIsEmptyUntilDoubleQuotesAreEntered() As Task
            Using state = TestState.CreateTestStateFromWorkspace(
                <Workspace>
                    <Project Language="C#" CommonReferences="true" AssemblyName="ClassLibrary1"/>
                    <Project Language="C#" CommonReferences="true" AssemblyName="TestAssembly">
                        <Document FilePath="C.cs">
[assembly: System.Runtime.CompilerServices.InternalsVisibleTo$$
                        </Document>
                    </Project>
                </Workspace>)
                Await state.AssertNoCompletionSession()
                state.SendInvokeCompletionList()
                Await state.WaitForAsynchronousOperationsAsync()
                Assert.False(state.CompletionItemsContainsAny({"ClassLibrary1"}))
                state.SendTypeChars("("c)
                Await state.AssertNoCompletionSession()
                state.SendInvokeCompletionList()
                Await state.WaitForAsynchronousOperationsAsync()
                Assert.False(state.CompletionItemsContainsAny({"ClassLibrary1"}))
                state.SendTypeChars(""""c)
                Await state.AssertCompletionSession()
                Assert.True(state.CompletionItemsContainsAll({"ClassLibrary1"}))
            End Using
        End Function

        <WpfFact, Trait(Traits.Feature, Traits.Features.Completion)>
        Public Async Function CodeCompletionIsTriggeredWhenCharacterIsEnteredAfterOpeningDoubleQuote() As Task
            Using state = TestState.CreateTestStateFromWorkspace(
                <Workspace>
                    <Project Language="C#" CommonReferences="true" AssemblyName="ClassLibrary1"/>
                    <Project Language="C#" CommonReferences="true" AssemblyName="TestAssembly">
                        <Document FilePath="C.cs">
[assembly: System.Runtime.CompilerServices.InternalsVisibleTo("$$")]
                        </Document>
                    </Project>
                </Workspace>)
                Await state.AssertNoCompletionSession()
                state.SendTypeChars("a"c)
                Await state.AssertCompletionSession()
                Assert.True(state.CompletionItemsContainsAll({"ClassLibrary1"}))
            End Using
        End Function

        <WpfFact, Trait(Traits.Feature, Traits.Features.Completion)>
        Public Async Function CodeCompletionIsNotTriggeredWhenCharacterIsEnteredThatIsNotRightBesideTheOpeniningDoubleQuote() As Task
            Using state = TestState.CreateTestStateFromWorkspace(
                <Workspace>
                    <Project Language="C#" CommonReferences="true" AssemblyName="ClassLibrary1"/>
                    <Project Language="C#" CommonReferences="true" AssemblyName="TestAssembly">
                        <Document FilePath="C.cs">
[assembly: System.Runtime.CompilerServices.InternalsVisibleTo("a$$")]
                        </Document>
                    </Project>
                </Workspace>)
                Await state.AssertNoCompletionSession()
                state.SendTypeChars("b"c)
                Await state.AssertNoCompletionSession()
            End Using
        End Function

        <WpfFact, Trait(Traits.Feature, Traits.Features.Completion)>
        Public Async Function CodeCompletionIsNotTriggeredWhenDoubleQuoteIsEnteredAtStartOfFile() As Task
            Using state = TestState.CreateTestStateFromWorkspace(
                <Workspace>
                    <Project Language="C#" CommonReferences="true" AssemblyName="ClassLibrary1"/>
                    <Project Language="C#" CommonReferences="true" AssemblyName="TestAssembly">
                        <Document FilePath="C.cs">$$
                        </Document>
                    </Project>
                </Workspace>)
                Await state.AssertNoCompletionSession()
                state.SendTypeChars("a"c)
                Await state.WaitForAsynchronousOperationsAsync()
                Assert.False(state.CompletionItemsContainsAny({"ClassLibrary1"}))
            End Using
        End Function

        <WpfFact, Trait(Traits.Feature, Traits.Features.Completion)>
        Public Async Function CodeCompletionIsNotTriggeredByArrayElementAccess() As Task
            Using state = TestState.CreateTestStateFromWorkspace(
                <Workspace>
                    <Project Language="C#" CommonReferences="true" AssemblyName="ClassLibrary1"/>
                    <Project Language="C#" CommonReferences="true" AssemblyName="TestAssembly">
                        <Document FilePath="C.cs"><![CDATA[
namespace A
{
    public class C
    {
        public void M()
        {
            var d = new System.Collections.Generic.Dictionary<string, string>();
            var v = d$$;
        }
    }
}
]]>
                        </Document>
                    </Project>
                </Workspace>)
                Dim AssertNoCompletionAndCompletionDoesNotContainClassLibrary1 As Func(Of Task) =
                    Async Function()
                        Await state.AssertNoCompletionSession()
                        state.SendInvokeCompletionList()
                        Await state.WaitForAsynchronousOperationsAsync()
                        Assert.True(
                            state.CurrentCompletionPresenterSession Is Nothing OrElse
                            Not state.CompletionItemsContainsAny({"ClassLibrary1"}))
                    End Function
                Await AssertNoCompletionAndCompletionDoesNotContainClassLibrary1()
                state.SendTypeChars("["c)
                Await AssertNoCompletionAndCompletionDoesNotContainClassLibrary1()
                state.SendTypeChars(""""c)
                Await AssertNoCompletionAndCompletionDoesNotContainClassLibrary1()
            End Using
        End Function

        Private Async Function AssertCompletionListHasItems(code As String, hasItems As Boolean) As Task
            Using state = TestState.CreateTestStateFromWorkspace(
                <Workspace>
                    <Project Language="C#" CommonReferences="true" AssemblyName="ClassLibrary1"/>
                    <Project Language="C#" CommonReferences="true" AssemblyName="TestAssembly">
                        <Document FilePath="C.cs">
using System.Runtime.CompilerServices;
using System.Reflection;
<%= code %>
                        </Document>
                    </Project>
                </Workspace>)
                state.SendInvokeCompletionList()
                Await state.WaitForAsynchronousOperationsAsync()
                If hasItems Then
                    Await state.AssertCompletionSession()
                    Assert.True(state.CompletionItemsContainsAll({"ClassLibrary1"}))
                Else
                    Await state.AssertNoCompletionSession
                End If
            End Using
        End Function

        <WpfFact, Trait(Traits.Feature, Traits.Features.Completion)>
        Public Async Function AssertCompletionListHasItems_AfterSingleDoubleQuoteAndClosing() As Task
            Await AssertCompletionListHasItems("[assembly: InternalsVisibleTo(""$$)]", True)
        End Function

        <WpfFact, Trait(Traits.Feature, Traits.Features.Completion)>
        Public Async Function AssertCompletionListHasItems_AfterText() As Task
            Await AssertCompletionListHasItems("[assembly: InternalsVisibleTo(""Test$$)]", True)
        End Function

        <WpfFact, Trait(Traits.Feature, Traits.Features.Completion)>
        Public Async Function AssertCompletionListHasItems_IfCursorIsInSecondParameter() As Task
            Await AssertCompletionListHasItems("[assembly: InternalsVisibleTo(""Test"", ""$$", True)
        End Function

        <WpfFact, Trait(Traits.Feature, Traits.Features.Completion)>
        Public Async Function AssertCompletionListHasNoItems_IfCursorIsClosingDoubleQuote1() As Task
            Await AssertCompletionListHasItems("[assembly: InternalsVisibleTo(""Test""$$", False)
        End Function

        <WpfFact, Trait(Traits.Feature, Traits.Features.Completion)>
        Public Async Function AssertCompletionListHasNoItems_IfCursorIsClosingDoubleQuote2() As Task
            Await AssertCompletionListHasItems("[assembly: InternalsVisibleTo(""""$$", False)
        End Function

        <WpfFact, Trait(Traits.Feature, Traits.Features.Completion)>
        Public Async Function AssertCompletionListHasItems_IfNamedParameterIsPresent() As Task
            Await AssertCompletionListHasItems("[assembly: InternalsVisibleTo(""$$, AllInternalsVisible = true)]", True)
        End Function

        <WpfFact, Trait(Traits.Feature, Traits.Features.Completion)>
        Public Async Function AssertCompletionListHasItems_IfNamedParameterAndNamedPositionalParametersArePresent() As Task
            Await AssertCompletionListHasItems("[assembly: InternalsVisibleTo(assemblyName: ""$$, AllInternalsVisible = true)]", True)
        End Function

        <WpfFact, Trait(Traits.Feature, Traits.Features.Completion)>
        Public Async Function AssertCompletionListHasNoItems_IfNumberIsEntered() As Task
            Await AssertCompletionListHasItems("[assembly: InternalsVisibleTo(1$$2)]", False)
        End Function

        <WpfFact, Trait(Traits.Feature, Traits.Features.Completion)>
        Public Async Function AssertCompletionListHasNoItems_IfNotInternalsVisibleToAttribute() As Task
            Await AssertCompletionListHasItems("[assembly: AssemblyVersion(""$$"")]", False)
        End Function

        <WpfFact, Trait(Traits.Feature, Traits.Features.Completion)>
        Public Async Function AssertCompletionListHasItems_IfOtherAttributeIsPresent1() As Task
            Await AssertCompletionListHasItems("[assembly: AssemblyVersion(""1.0.0.0""), InternalsVisibleTo(""$$", True)
        End Function

        <WpfFact, Trait(Traits.Feature, Traits.Features.Completion)>
        Public Async Function AssertCompletionListHasItems_IfOtherAttributeIsPresent2() As Task
            Await AssertCompletionListHasItems("[assembly: InternalsVisibleTo(""$$""), AssemblyVersion(""1.0.0.0"")]", True)
        End Function

        <WpfFact, Trait(Traits.Feature, Traits.Features.Completion)>
        Public Async Function AssertCompletionListHasItems_IfOtherAttributesAreAhead() As Task
            Await AssertCompletionListHasItems("
                [assembly: AssemblyVersion(""1.0.0.0"")]
                [assembly: InternalsVisibleTo(""$$", True)
        End Function

        <WpfFact, Trait(Traits.Feature, Traits.Features.Completion)>
        Public Async Function AssertCompletionListHasItems_IfOtherAttributesAreFollowing() As Task
            Await AssertCompletionListHasItems("
            [assembly: InternalsVisibleTo(""$$
            [assembly: AssemblyVersion(""1.0.0.0"")]
            [assembly: AssemblyCompany(""Test"")]", True)
        End Function

        <WpfFact, Trait(Traits.Feature, Traits.Features.Completion)>
        Public Async Function AssertCompletionListHasItems_IfNamespaceIsFollowing() As Task
            Await AssertCompletionListHasItems("
            [assembly: InternalsVisibleTo(""$$
            namespace A {
                public class A { }
            }", True)
        End Function

        <WpfFact, Trait(Traits.Feature, Traits.Features.Completion)>
        Public Async Function CodeCompletionHasItemsIfInteralVisibleToIsReferencedByTypeAlias() As Task
            Using state = TestState.CreateTestStateFromWorkspace(
                <Workspace>
                    <Project Language="C#" CommonReferences="true" AssemblyName="ClassLibrary1"/>
                    <Project Language="C#" CommonReferences="true" AssemblyName="TestAssembly">
                        <Document FilePath="C.cs">
using IVT = System.Runtime.CompilerServices.InternalsVisibleToAttribute;
[assembly: IVT("$$
                        </Document>
                    </Project>
                </Workspace>)
                state.SendInvokeCompletionList()
                Await state.AssertCompletionSession()
                Assert.True(state.CompletionItemsContainsAll({"ClassLibrary1"}))
            End Using
        End Function

        <WpfFact, Trait(Traits.Feature, Traits.Features.Completion)>
        Public Async Function CodeCompletionDoesNotContainCurrentAssembly() As Task
            Using state = TestState.CreateTestStateFromWorkspace(
                <Workspace>
                    <Project Language="C#" CommonReferences="true" AssemblyName="ClassLibrary1"/>
                    <Project Language="C#" CommonReferences="true" AssemblyName="TestAssembly">
                        <Document FilePath="C.cs">
[assembly: System.Runtime.CompilerServices.InternalsVisibleTo("$$")]
                        </Document>
                    </Project>
                </Workspace>)
                state.SendInvokeCompletionList()
                Await state.AssertCompletionSession()
                Assert.False(state.CompletionItemsContainsAny({"TestAssembly"}))
            End Using
        End Function

        <WpfFact, Trait(Traits.Feature, Traits.Features.Completion)>
        Public Async Function CodeCompletionInsertsAssemblyNameOnCommit() As Task
            Using state = TestState.CreateTestStateFromWorkspace(
                <Workspace>
                    <Project Language="C#" CommonReferences="true" AssemblyName="ClassLibrary1">
                    </Project>
                    <Project Language="C#" CommonReferences="true" AssemblyName="TestAssembly">
                        <Document>
[assembly: System.Runtime.CompilerServices.InternalsVisibleTo("$$")]
                        </Document>
                    </Project>
                </Workspace>)
                state.SendInvokeCompletionList()
                Await state.AssertSelectedCompletionItem("ClassLibrary1")
                state.SendTab()
                Await state.WaitForAsynchronousOperationsAsync()
                state.AssertMatchesTextStartingAtLine(1, "[assembly: System.Runtime.CompilerServices.InternalsVisibleTo(""ClassLibrary1"")]")
            End Using
        End Function

        <WpfFact, Trait(Traits.Feature, Traits.Features.Completion)>
        Public Async Function CodeCompletionInsertsPublicKeyOnCommit() As Task
            Using state = TestState.CreateTestStateFromWorkspace(
                <Workspace>
                    <Project Language="C#" CommonReferences="true" AssemblyName="ClassLibrary1">
                        <CompilationOptions
                            CryptoKeyFile=<%= SigningTestHelpers.PublicKeyFile %>
                            StrongNameProvider=<%= SigningTestHelpers.s_defaultDesktopProvider.GetType().AssemblyQualifiedName %>/>
                    </Project>
                    <Project Language="C#" CommonReferences="true" AssemblyName="TestAssembly">
                        <Document>
[assembly: System.Runtime.CompilerServices.InternalsVisibleTo("$$")]
                        </Document>
                    </Project>
                </Workspace>)
                state.SendInvokeCompletionList()
                Await state.AssertSelectedCompletionItem("ClassLibrary1")
                state.SendTab()
                Await state.WaitForAsynchronousOperationsAsync()
                state.AssertMatchesTextStartingAtLine(1, "[assembly: System.Runtime.CompilerServices.InternalsVisibleTo(""ClassLibrary1, PublicKey=00240000048000009400000006020000002400005253413100040000010001002b986f6b5ea5717d35c72d38561f413e267029efa9b5f107b9331d83df657381325b3a67b75812f63a9436ceccb49494de8f574f8e639d4d26c0fcf8b0e9a1a196b80b6f6ed053628d10d027e032df2ed1d60835e5f47d32c9ef6da10d0366a319573362c821b5f8fa5abc5bb22241de6f666a85d82d6ba8c3090d01636bd2bb"")]")
            End Using
        End Function

        <WpfFact, Trait(Traits.Feature, Traits.Features.Completion)>
        Public Async Function CodeCompletionContainsPublicKeyIfKeyIsSpecifiedByAttribute() As Task
            Using state = TestState.CreateTestStateFromWorkspace(
                <Workspace>
                    <Project Language="C#" CommonReferences="true" AssemblyName="ClassLibrary1">
                        <CompilationOptions
                            StrongNameProvider=<%= SigningTestHelpers.s_defaultDesktopProvider.GetType().AssemblyQualifiedName %>/>
                        <Document>
                            [assembly: System.Reflection.AssemblyKeyFile("<%= SigningTestHelpers.PublicKeyFile.Replace("\", "\\") %>")]
                        </Document>
                    </Project>
                    <Project Language="C#" CommonReferences="true" AssemblyName="TestAssembly">
                        <Document>
    [assembly: System.Runtime.CompilerServices.InternalsVisibleTo("$$")]
                        </Document>
                    </Project>
                </Workspace>)
                state.SendInvokeCompletionList()
                Await state.AssertSelectedCompletionItem("ClassLibrary1")
                state.SendTab()
                Await state.WaitForAsynchronousOperationsAsync()
                state.AssertMatchesTextStartingAtLine(1, "[assembly: System.Runtime.CompilerServices.InternalsVisibleTo(""ClassLibrary1, PublicKey=00240000048000009400000006020000002400005253413100040000010001002b986f6b5ea5717d35c72d38561f413e267029efa9b5f107b9331d83df657381325b3a67b75812f63a9436ceccb49494de8f574f8e639d4d26c0fcf8b0e9a1a196b80b6f6ed053628d10d027e032df2ed1d60835e5f47d32c9ef6da10d0366a319573362c821b5f8fa5abc5bb22241de6f666a85d82d6ba8c3090d01636bd2bb"")]")
            End Using
        End Function

        <WpfFact, Trait(Traits.Feature, Traits.Features.Completion)>
        Public Async Function CodeCompletionContainsPublicKeyIfDelayedSigningIsEnabled() As Task
            Using state = TestState.CreateTestStateFromWorkspace(
                <Workspace>
                    <Project Language="C#" CommonReferences="true" AssemblyName="ClassLibrary1">
                        <CompilationOptions
                            CryptoKeyFile=<%= SigningTestHelpers.PublicKeyFile %>
                            StrongNameProvider=<%= SigningTestHelpers.s_defaultDesktopProvider.GetType().AssemblyQualifiedName %>
                            DelaySign="True"/>
                    </Project>
                    <Project Language="C#" CommonReferences="true" AssemblyName="TestAssembly">
                        <Document>
[assembly: System.Runtime.CompilerServices.InternalsVisibleTo("$$")]
                        </Document>
                    </Project>
                </Workspace>)
                state.SendInvokeCompletionList()
                Await state.AssertSelectedCompletionItem("ClassLibrary1")
                state.SendTab()
                Await state.WaitForAsynchronousOperationsAsync()
                state.AssertMatchesTextStartingAtLine(1, "[assembly: System.Runtime.CompilerServices.InternalsVisibleTo(""ClassLibrary1, PublicKey=00240000048000009400000006020000002400005253413100040000010001002b986f6b5ea5717d35c72d38561f413e267029efa9b5f107b9331d83df657381325b3a67b75812f63a9436ceccb49494de8f574f8e639d4d26c0fcf8b0e9a1a196b80b6f6ed053628d10d027e032df2ed1d60835e5f47d32c9ef6da10d0366a319573362c821b5f8fa5abc5bb22241de6f666a85d82d6ba8c3090d01636bd2bb"")]")
            End Using
        End Function

        <WpfFact, Trait(Traits.Feature, Traits.Features.Completion)>
        Public Async Function CodeCompletionListIsEmptyIfAttributeIsNotTheBCLAttribute() As Task
            Using state = TestState.CreateTestStateFromWorkspace(
                <Workspace>
                    <Project Language="C#" CommonReferences="true" AssemblyName="ClassLibrary1"/>
                    <Project Language="C#" CommonReferences="true" AssemblyName="TestAssembly">
                        <Document FilePath="C.cs">
[assembly: Test.InternalsVisibleTo("$$")]
namespace Test
{
    [System.AttributeUsage(System.AttributeTargets.Assembly)]
    public sealed class InternalsVisibleToAttribute: System.Attribute
    {
        public InternalsVisibleToAttribute(string ignore)
        {

        }
    }
}
                        </Document>
                    </Project>
                </Workspace>)
                state.SendInvokeCompletionList()
                Await state.AssertNoCompletionSession()
            End Using
        End Function

        <WpfFact, Trait(Traits.Feature, Traits.Features.Completion)>
        Public Async Function CodeCompletionContainsOnlyAssembliesThatAreNotAlreadyIVT() As Task
            Using state = TestState.CreateTestStateFromWorkspace(
                <Workspace>
                    <Project Language="C#" CommonReferences="true" AssemblyName="ClassLibrary1"/>
                    <Project Language="C#" CommonReferences="true" AssemblyName="ClassLibrary2"/>
                    <Project Language="C#" CommonReferences="true" AssemblyName="ClassLibrary3"/>
                    <Project Language="C#" CommonReferences="true" AssemblyName="TestAssembly">
                        <Document FilePath="C.cs">
[assembly: System.Runtime.CompilerServices.InternalsVisibleTo("ClassLibrary1")]
[assembly: System.Runtime.CompilerServices.InternalsVisibleTo("ClassLibrary2")]
[assembly: System.Runtime.CompilerServices.InternalsVisibleTo("$$
                        </Document>
                    </Project>
                </Workspace>)
                state.SendInvokeCompletionList()
                Await state.AssertCompletionSession()
                Assert.False(state.CompletionItemsContainsAny({"ClassLibrary1", "ClassLibrary2"}))
                Assert.True(state.CompletionItemsContainsAll({"ClassLibrary3"}))
            End Using
        End Function

        <WpfFact, Trait(Traits.Feature, Traits.Features.Completion)>
        Public Async Function CodeCompletionContainsOnlyAssembliesThatAreNotAlreadyIVTIfAssemblyNameIsAConstant() As Task
            Using state = TestState.CreateTestStateFromWorkspace(
                <Workspace>
                    <Project Language="C#" CommonReferences="true" AssemblyName="ClassLibrary1"/>
                    <Project Language="C#" CommonReferences="true" AssemblyName="ClassLibrary2"/>
                    <Project Language="C#" CommonReferences="true" AssemblyName="ClassLibrary3"/>
                    <Project Language="C#" CommonReferences="true" AssemblyName="TestAssembly">
                        <MetadataReferenceFromSource Language="C#" CommonReferences="true">
                            <Document FilePath="ReferencedDocument.cs">
namespace A {
    public static class Constants
    {
        public const string AssemblyName1 = "ClassLibrary1";
    }
}
                            </Document>
                        </MetadataReferenceFromSource>
                        <Document FilePath="C.cs">
[assembly: System.Runtime.CompilerServices.InternalsVisibleTo(A.Constants.AssemblyName1)]
[assembly: System.Runtime.CompilerServices.InternalsVisibleTo("ClassLibrary2")]
[assembly: System.Runtime.CompilerServices.InternalsVisibleTo("$$
                        </Document>
                    </Project>
                </Workspace>)
                state.SendInvokeCompletionList()
                Await state.AssertCompletionSession()
                Assert.False(state.CompletionItemsContainsAny({"ClassLibrary1", "ClassLibrary2"}))
                Assert.True(state.CompletionItemsContainsAll({"ClassLibrary3"}))
            End Using
        End Function

        <WpfFact, Trait(Traits.Feature, Traits.Features.Completion)>
        Public Async Function CodeCompletionContainsOnlyAssembliesThatAreNotAlreadyIVTForDifferentSyntax() As Task
            Using state = TestState.CreateTestStateFromWorkspace(
                <Workspace>
                    <Project Language="C#" CommonReferences="true" AssemblyName="ClassLibrary1"/>
                    <Project Language="C#" CommonReferences="true" AssemblyName="ClassLibrary2"/>
                    <Project Language="C#" CommonReferences="true" AssemblyName="ClassLibrary3"/>
                    <Project Language="C#" CommonReferences="true" AssemblyName="ClassLibrary4"/>
                    <Project Language="C#" CommonReferences="true" AssemblyName="ClassLibrary5"/>
                    <Project Language="C#" CommonReferences="true" AssemblyName="ClassLibrary6"/>
                    <Project Language="C#" CommonReferences="true" AssemblyName="ClassLibrary7"/>
                    <Project Language="C#" CommonReferences="true" AssemblyName="ClassLibrary8"/>
                    <Project Language="C#" CommonReferences="true" AssemblyName="ClassLibrary9"/>
                    <Project Language="C#" CommonReferences="true" AssemblyName="TestAssembly">
                        <Document FilePath="C.cs">
// Code comment
using System.Runtime.CompilerServices;
using System.Reflection;
using IVT = System.Runtime.CompilerServices.InternalsVisibleToAttribute;
// Code comment
[assembly: InternalsVisibleTo("ClassLibrary1", AllInternalsVisible = true)]
[assembly: InternalsVisibleTo(assemblyName: "ClassLibrary2", AllInternalsVisible = true)]
[assembly: AssemblyVersion("1.0.0.0"), InternalsVisibleTo("ClassLibrary3")]
[assembly: InternalsVisibleTo("ClassLibrary4"), AssemblyCopyright("Copyright")]
[assembly: AssemblyDescription("Description")]
[assembly: InternalsVisibleTo("ClassLibrary5")]
[assembly: InternalsVisibleTo("ClassLibrary6, PublicKey=00240000048000009400000006020000002400005253413100040000010001002b986f6b5ea5717d35c72d38561f413e267029efa9b5f107b9331d83df657381325b3a67b75812f63a9436ceccb49494de8f574f8e639d4d26c0fcf8b0e9a1a196b80b6f6ed053628d10d027e032df2ed1d60835e5f47d32c9ef6da10d0366a319573362c821b5f8fa5abc5bb22241de6f666a85d82d6ba8c3090d01636bd2bb")]
[assembly: InternalsVisibleTo("ClassLibrary" + "7")]
[assembly: IVT("ClassLibrary8")]
[assembly: InternalsVisibleTo("$$
namespace A {
    public class A { }
}
                        </Document>
                    </Project>
                </Workspace>)
                state.SendInvokeCompletionList()
                Await state.AssertCompletionSession()
                Assert.False(state.CompletionItemsContainsAny({"ClassLibrary1", "ClassLibrary2", "ClassLibrary3", "ClassLibrary4", "ClassLibrary5", "ClassLibrary6", "ClassLibrary7", "ClassLibrary8"}))
                Assert.True(state.CompletionItemsContainsAll({"ClassLibrary9"}))
            End Using
        End Function

        <WpfFact, Trait(Traits.Feature, Traits.Features.Completion)>
        Public Async Function CodeCompletionContainsOnlyAssembliesThatAreNotAlreadyIVTWithSyntaxError() As Task
            Using state = TestState.CreateTestStateFromWorkspace(
                <Workspace>
                    <Project Language="C#" CommonReferences="true" AssemblyName="ClassLibrary1"/>
                    <Project Language="C#" CommonReferences="true" AssemblyName="TestAssembly">
                        <Document FilePath="C.cs">
using System.Runtime.CompilerServices;
using System.Reflection;

[assembly: InternalsVisibleTo("ClassLibrary" + 1)] // Not a constant
[assembly: InternalsVisibleTo("$$
                        </Document>
                    </Project>
                </Workspace>)
                state.SendInvokeCompletionList()
                Await state.AssertCompletionSession()
                ' ClassLibrary1 must be listed because the existing attribute argument can't be resolved to a constant.
                Assert.True(state.CompletionItemsContainsAll({"ClassLibrary1"}))
            End Using
        End Function

        <WpfFact, Trait(Traits.Feature, Traits.Features.Completion)>
        Public Async Function CodeCompletionContainsOnlyAssembliesThatAreNotAlreadyIVTWithMoreThanOneDocument() As Task
            Using state = TestState.CreateTestStateFromWorkspace(
                <Workspace>
                    <Project Language="C#" CommonReferences="true" AssemblyName="ClassLibrary1"/>
                    <Project Language="C#" CommonReferences="true" AssemblyName="ClassLibrary2"/>
                    <Project Language="C#" CommonReferences="true" AssemblyName="TestAssembly">
                        <Document FilePath="OtherDocument.cs">
using System.Runtime.CompilerServices;
using System.Reflection;
[assembly: InternalsVisibleTo("ClassLibrary1")]
[assembly: AssemblyDescription("Description")]
                        </Document>
                        <Document FilePath="C.cs">
using System.Runtime.CompilerServices;
using System.Reflection;
[assembly: InternalsVisibleTo("$$
                        </Document>
                    </Project>
                </Workspace>)
                state.SendInvokeCompletionList()
                Await state.AssertCompletionSession()
                Assert.False(state.CompletionItemsContainsAny({"ClassLibrary1"}))
                Assert.True(state.CompletionItemsContainsAll({"ClassLibrary2"}))
            End Using
        End Function
    End Class
End Namespace

redpajama_set_name: RedPajamaGithub


text:
/* Write/edit page: Article image group */
#image_group {display:none !important;}


text:
var rfr = require('rfr');
var Lab = require('lab');
var lab = exports.lab = Lab.script();
var Code = require('code');

var Router = rfr('app/Router');
var Authenticator = rfr('app/policies/Authenticator');
var TestUtils = rfr('test/TestUtils');

var testAccount = {userId: 1, username: 'bob', password: 'abc',
                   scope: Authenticator.SCOPE.USER};

lab.experiment('Router Tests', function () {
  lab.test('root request', function (done) {
    Router.inject({url: '/', credentials: testAccount}, function (res) {
      Code.expect(res.result).to.equal('Welcome to WorldScope');
      done();
    });
  });

  lab.test('missing scope authorization', function (done) {
    var account = TestUtils.copyObj(testAccount,
                                  ['userId', 'username', 'password']);
    Router.inject({url: '/', credentials: account}, function (res) {
      Code.expect(res.statusCode).to.equal(403);
      done();
    });
  });
});


text:
This is a basic python script using scapy to monitor for new mac addresses on
a network. I wrote this as I was tired of arpwatch emailing me
when a device that had already been detected re-appeared on the
network with a different ip address.

### Requirements
This script requires scapy and netaddr in order to work.
These dependencies can be installed by running the following command

	pip install -r requirements.txt
or on debian/ubuntu by the following command

	apt-get install python-scapy python-netaddr

## Usage
After installing the required dependencies launch the watcher through

	sudo python watcher.py

To output the stored mac address information run

	sudo python watcher.py -s

It is possible to run the script as a non-root user on linux through 'setcap' (granting CAP_NET_RAW and CAP_NET_ADMIN).


text:
(function() {

'use strict';

// define global variale dynamic by context
var global = this;

/**
 * Base queue function
 * ------------------------------------------------------------
 * @name jedQ
 * @param {Function} function for call first
 * @return {Object} jedQ core instance
 */

function jedQ(cb) {
  return new jedQCore(cb);
}

// define curret version
jedQ.version = '0.2.0';

/**
 * Core queue function
 * ------------------------------------------------------------
 * @name jedQCore
 * @param {Function} function for call first
 */

function jedQCore(_callback) {
  this.stacks = [{
    _callback: _callback
  }];
}

/**
 * Stack callback function into queue
 * ------------------------------------------------------------
 * @name jedQ.then
 * @param {Function} callback function for add to queue
 * @return {Object} jedQCore object for chaining method
 */

jedQCore.prototype.then = function(callback) {
  // add to stack
  this.stacks.push({
    _callback: callback
  });

  return this;
};

/**
 * Execute all callback in queue
 * ------------------------------------------------------------
 * @name jedQ.done
 */

jedQCore.prototype.done = function() {

  var allStacks = this.stacks;

  /**
   * Create sub function for execute all callback function in queue
   * by recursive function
   * (this is `next` first argument of `then` method)
   * ------------------------------------------------------------
   * @name _resolveStack
   * @param {Any} data for pass to next queue
   */

  var _resolveStack = function(data) {

    // get first callback stack
    var stack = allStacks.shift();

    if (stack != null && typeof stack._callback === 'function') {
      // execute queue
      stack._callback(_resolveStack, data);
    }

    return _resolveStack;

  };
  _resolveStack();

};

/**
 * ------------------------------------------------------------
 * Exports jedQ
 * ------------------------------------------------------------
 */

// check CommonJS first
if (typeof module != null && typeof module.exports != null) {
  module.exports = jedQ;
}
else if (typeof window != null) {
  // in browser `global` it must be `window` object
  global.jedQ = jedQ;
}

}).call(this);


text:
create index ZSTG_GENE_KW_GENE_ID on ZSTG_GENE_KW(GENE_ID) PARALLEL NOLOGGING tablespace CABIO_MAP_FUT;
create index ZSTG_GENE_KW_KEYWORD on ZSTG_GENE_KW(KEYWORD) PARALLEL NOLOGGING tablespace CABIO_MAP_FUT;
create index ZSTG_GENE_KW_LIBRARY_ID on ZSTG_GENE_KW(LIBRARY_ID) PARALLEL NOLOGGING tablespace CABIO_MAP_FUT;
create index ZSTG_GENE_KW_CLUSTER_NU on ZSTG_GENE_KW(CLUSTER_NUMBER) PARALLEL NOLOGGING tablespace CABIO_MAP_FUT;

--EXIT;


text:
using System;
using DungeonsAndCodeWizards.Models.Bags;

namespace DungeonsAndCodeWizards.Models.Characters
{
    public class Warrior : Character, IAttackable
    {
        private const double  WarriorHealth = 100.0;
        private const double  WarriorArmor = 50.0;
        private const double WarriorAbilityPoints = 40.0;

        public Warrior(string name, Faction faction)
            : base(name, WarriorHealth, WarriorArmor, WarriorAbilityPoints, new Satchel(), faction)
        {
        }

        public void Attack(Character character)
        {
            if (!this.IsAlive)
            {
                throw new InvalidOperationException("Must be alive to perform this action!");
            }

            if (!character.IsAlive)
            {
                throw new InvalidOperationException("Must be alive to perform this action!");
            }

            if (this == character)
            {
                throw new InvalidOperationException("Cannot attack self!");
            }

            if (this.Faction == character.Faction)
            {
                throw new ArgumentException($"Friendly fire! Both characters are from {this.Faction} faction!");
            }

            character.TakeDamage(this.AbilityPoints);
        }
    }
}


text:
/* vim: set sw=4 sts=4 et foldmethod=syntax : */

#ifndef PARASOLS_GUARD_MAX_BICLIQUE_ALGORITHMS_HH
#define PARASOLS_GUARD_MAX_BICLIQUE_ALGORITHMS_HH 1

#include <max_biclique/naive_max_biclique.hh>
#include <max_biclique/ccd_max_biclique.hh>
#include <max_biclique/dccd_max_biclique.hh>
#include <max_biclique/cpo_max_biclique.hh>
#include <max_biclique/tcpo_max_biclique.hh>

#include <utility>

namespace parasols
{
    auto max_biclique_algorithms = {
        std::make_pair( std::string{ "naiven" },      naive_max_biclique<BicliqueSymmetryRemoval::None> ),
        std::make_pair( std::string{ "naiver" },      naive_max_biclique<BicliqueSymmetryRemoval::Remove> ),

        std::make_pair( std::string{ "ccdn" },        ccd_max_biclique<BicliqueSymmetryRemoval::None> ),
        std::make_pair( std::string{ "ccdr" },        ccd_max_biclique<BicliqueSymmetryRemoval::Remove> ),

        std::make_pair( std::string{ "dccdn" },       dccd_max_biclique<BicliqueSymmetryRemoval::None>),
        std::make_pair( std::string{ "dccdr" },       dccd_max_biclique<BicliqueSymmetryRemoval::Remove>),

        std::make_pair( std::string{ "cponn" },       cpo_max_biclique<CCOPermutations::None, BicliqueSymmetryRemoval::None> ),
        std::make_pair( std::string{ "cponr" },       cpo_max_biclique<CCOPermutations::None, BicliqueSymmetryRemoval::Remove> ),
        std::make_pair( std::string{ "cpons" },       cpo_max_biclique<CCOPermutations::None, BicliqueSymmetryRemoval::Skip> ),
        std::make_pair( std::string{ "cpodn" },       cpo_max_biclique<CCOPermutations::Defer1, BicliqueSymmetryRemoval::None> ),
        std::make_pair( std::string{ "cpodr" },       cpo_max_biclique<CCOPermutations::Defer1, BicliqueSymmetryRemoval::Remove> ),

        std::make_pair( std::string{ "tcponn" },      tcpo_max_biclique<CCOPermutations::None, BicliqueSymmetryRemoval::None> ),
        std::make_pair( std::string{ "tcponr" },      tcpo_max_biclique<CCOPermutations::None, BicliqueSymmetryRemoval::Remove> ),
        std::make_pair( std::string{ "tcpons" },      tcpo_max_biclique<CCOPermutations::None, BicliqueSymmetryRemoval::Skip> ),
        std::make_pair( std::string{ "tcpodn" },      tcpo_max_biclique<CCOPermutations::Defer1, BicliqueSymmetryRemoval::None> ),
        std::make_pair( std::string{ "tcpodr" },      tcpo_max_biclique<CCOPermutations::Defer1, BicliqueSymmetryRemoval::Remove> )
    };
}

#endif


text:
/**
 * API for the users module.
 * @module usersAPI
 * @inner
 */

import express = require('express');
import user = require('./models/user');
import userLib = require('./libs/users');
import groupLib = require('./libs/groups');

import configurationsAPI = require('../configurations/configurationsAPI');

import loader = require('../../core/loader');

//name definition of the configuration object
const _USERS_CONFIG_ = "UsersModule";

/**
 * Helper object containing information about an user level.
 * @typedef {Object} userLevel
 * @property {string} name              the name of the level
 * @property {number} val               the value of the level
 */
 function hackForTheDocumentation() {}
 /**
  *
  */
export interface userLevel {
    name:string,
    val:number
}

var __config;
var loginFailureRedirect = '/users/login';
var loginSuccessRedirect;
var signupFailureRedirect = '/users/signup';
var signupSuccessRedirect;
var forgotPasswordRedirect;
var changePasswordRedirect;
var jwtSecret = 'luca_gabriele_88_jelly_dottie';

function initConfig(callback:(err, config)=>void) {
    var conf = {
        "usersLevels": [],
        "general": {
            "default_role": 0,
            "default_groups": [],
            "onlyMail": false,
            "activationTemplate": {
                "text": "Hello {{username}}!\n\nPlease complete the registration:\nhttp://localhost:8080{{uri}}",
                "html": "Hello {{username}}!
\n
\nPlease complete the registration:\nhttp://localhost:8080{{uri}}",
                "sender": "PortalTS <noreply@portalts.it>",
                "subject": "PortalTS Registration"
            },
            "forgotTemplate": {
                "text": "Hello {{username}},\n\nthe new password is:\n{{password}}",
                "html": "Hello {{username}},\n\nthe new password is:\n{{password}}",
                "sender": "PortalTS <noreply@portalts.it>",
                "subject": "New password request"
            },
            "sendConfirmationMail": false,
            "confirmationTemplate": {
                "text": "Welcome!",
                "html": "Welcome!",
                "sender": "PortalTS <noreply@portalts.it>",
                "subject": "Welcome to PortalTS, {{username}}!"
            },
            "sendActivationMail": false
        }
    };
    conf.usersLevels.push({
        name: 'standard',
        val: 0
    });
    conf.usersLevels.push({
        name: 'admin',
        val: 1000
    });
    __config = conf;
    configurationsAPI.saveConfigruation(_USERS_CONFIG_, conf, (err) => {
        if (callback) callback(err, conf);
    });
}

function _getConfig(callback:(err, config)=>void) {
    configurationsAPI.getConfiguration(_USERS_CONFIG_, (err, config) => {
        if (err) return callback(err, null);
        if (!config) return initConfig(callback);
        __config = config;
        callback(err, config);
    });
}

setTimeout(()=>{
    _getConfig((err)=>{});
}, 1000);

/**
 * isAuth - middleware function that can be used on Express route. It verifies that the request
 * comes from a registered user.
 *
 * @param  {express.Request} req            standard express request
 * @param  {express.Response} res           standard express response
 * @param  {function} next                  standard next function
 * @return {void}
 */
export function isAuth(req: express.Request, res: express.Response, next) {
    if (req.isAuthenticated()) return next();
    if (req.user) return next();
    return res.redirect('/');
}

/**
 * isAdminSync - function to check if the role value is an admin or not.
 *
 * @param  {number} role    the role level
 * @return {boolean}        true if the user is an admin, false otherwise
 */
export function isAdminSync(role):boolean {
    if (!__config) return false;
    var levels:userLevel[] =  <userLevel[]> __config.usersLevels;
    var found = 0;
    for (var i = 1; i<levels.length; i++) {
        if (levels[i].val>levels[found].val) found = i;
    }
    if (role==levels[found].val) return true;
    return false;
}

/**
 * mustNotLogged - middleware function that can be used on Express route. It verify that the request
 * comes from a unregistered user.
 *
 * @param  {express.Request} req            standard express request
 * @param  {express.Response} res           standard express response
 * @param  {function} next                  standard next function
 * @return {void}
 */
export function mustNotLogged(req: express.Request, res: express.Response, next) {
    if (!req.isAuthenticated()) return next();
    if (!req.user) return next();
    res.redirect('/');
}

/**
 * isAdmin - middleware function that can be used on Express route. It verify that the request
 * comes from a registered user that is also an Administrator.
 *
 * @param  {express.Request} req            standard express request
 * @param  {express.Response} res           standard express response
 * @param  {function} next                  standard next function
 * @return {void}
 */
export function isAdmin(req: express.Request, res: express.Response, next) {
    getUserLevelAdmin((err, ul) => {
        if (err || !ul) return res.redirect('/');
        if (!req.user) return res.redirect('/');
        if (req.user.role == ul.val) return next();
        res.redirect('/');
    })
}

/**
 * @callback userLevelsCallback
 * @param {any} err
 * @param {userLevel[]} levels
 */

/**
 * getUserLevels - this method returns the user levels available
 *
 * @param  {levelsCallback} callback          standard callback function, returns error (if any) and an array of userLevel
 */
export function getUserLevels(callback:(err:any, levels:userLevel[])=>void) {
    _getConfig((err, config) => {
        if (err) return callback(err, null);
        return callback(null, config.usersLevels);
    });
}

/**
 * @callback userLevelCallback
 * @param {any} err
 * @param {userLevel} levels
 */

/**
 * getUserLevelStandard - obtain the standard user level
 *
 * @param  {userLevelCallback} callback         standard callback function, returns error (if any) and the standard userLevel
 */
export function getUserLevelStandard(callback:(err:any, ul:userLevel)=>void) {
    getUserLevels((err, levels:userLevel[]) => {
        if (err) return callback(err, null);
        if (!levels) return callback(null, null);
        var found = 0;
        for (var i = 1; i<levels.length; i++) {
            if (levels[i].val<levels[found].val) {
                found = i;
            }
        }
        return callback(null, levels[found]);
    });
}

/**
 * getUserLevelAdmin - obtain the administration user level
 *
 * @param  {userLevelCallback} callback         standard callback function, returns error (if any) and the standard userLevel
 */
export function getUserLevelAdmin(callback:(err:any, ul:userLevel)=>void) {
    getUserLevels((err, levels:userLevel[]) => {
        if (err) return callback(err, null);
        if (!levels) return callback(null, null);
        var found = 0;
        for (var i = 1; i<levels.length; i++) {
            if (levels[i].val>levels[found].val) {
                found = i;
            }
        }
        return callback(null, levels[found]);
    });
}

export function getConfig(callback:(err, config)=>void): void {
    _getConfig((err, c) => {
        if (err) return callback(err, null);
        callback(null, c.general);
    });
}

export function saveConfig(config, callback:(err)=>void): void {
    _getConfig((err, c) => {
        if (err) return callback(err);
        c.general = config;
        configurationsAPI.saveConfigruation(_USERS_CONFIG_, c, callback);
    });
}

/**
 * getLoginFailureRedirect - get the login failure redirect path
 *
 * @return {string}  the path
 */
export function getLoginFailureRedirect(): string {
    return loginFailureRedirect;
}

/**
 * setLoginFailureRedirect - set the login failure redirect path
 *
 * @param  {string} path      the new path
 * @return {void}
 */
export function setLoginFailureRedirect(path: string): void {
    loginFailureRedirect = path;
}

/**
 * getLoginSuccessRedirect - get the login success redirect path
 *
 * @return {string}  the path
 */
export function getLoginSuccessRedirect(): string {
    return loginSuccessRedirect;
}

/**
 * setLoginSuccessRedirect - set the login suceess redirect path
 *
 * @param  {string} path    the new path
 * @return {void}
 */
export function setLoginSuccessRedirect(path: string): void {
    loginSuccessRedirect = path;
}

/**
 * getSignupFailureRedirect - get the signup failure redirect path
 *
 * @return {string}  the path
 */
export function getSignupFailureRedirect(): string {
    return signupFailureRedirect;
}

/**
 * setSignupFailureRedirect - set the signup failure redirect path
 *
 * @param  {string} path    the new path
 * @return {void}
 */
export function setSignupFailureRedirect(path: string): void {
    signupFailureRedirect = path;
}

/**
 * getSignupSucessRedirect - get the signup success redirect path
 *
 * @return {string}  the path
 */
export function getSignupSuccessRedirect(): string {
    return signupSuccessRedirect;
}

/**
 * setSignupSuccessRedirect - set the signup success redirect path
 *
 * @param  {string} path    the new path
 * @return {void}
 */
export function setSignupSuccessRedirect(path: string): void {
    signupSuccessRedirect = path;
}

/**
 * getForgotPasswordRedirect - get the forgot password redirect path
 *
 * @return {string}  the path
 */
export function getForgotPasswordRedirect(): string {
    return forgotPasswordRedirect;
}

/**
 * setForgotPasswordRedirect - set the forgot password redirect path
 *
 * @param  {string} path    the new path
 * @return {void}
 */
export function setForgotPasswordRedirect(path: string): void {
    forgotPasswordRedirect = path;
}

/**
 * getChangePasswordRedirect - get the change password redirect path
 *
 * @return {string}  the path
 */
export function getChangePasswordRedirect(): string {
    return changePasswordRedirect;
}

/**
 * setChangePasswordRedirect - set the change password redirect path
 *
 * @param  {string} path    the new path
 * @return {void}
 */
export function setChangePasswordRedirect(path: string): void {
    changePasswordRedirect = path;
}

/**
 * getJWTSecret - get the JWT (JSON Web Token) secret
 *
 * @return {string}  the JWT secret
 */
export function getJWTSecret(): string {
    return jwtSecret;
}

/**
 * setJWTSecret - Set a new value for the JWT secret token
 *
 * @param  {string} secret      the JWT secret
 * @return {void}
 */
export function setJWTSecret(secret: string): void {
    jwtSecret = secret;
}

/**
 * getUserModel - returns the user model
 *
 * @return the user model interface
 */
export function getUserModel() {
    return user;
}

/**
 * getUserLib - returns the user library
 *
 * @return  the user library
 */
export function getUserLib() {
    return userLib;
}

/**
 * getGroupLib - returns the group library
 *
 * @return the group library
 */
export function getGroupLib() {
    return groupLib;
}


text:
namespace boost {

#if defined( BOOST_CODEGEARC )
template <class T> struct is_pointer : public integral_constant<bool, __is_pointer(T)>{};
#else
template <class T> struct is_pointer : public false_type{};
template <class T> struct is_pointer<T*> : public true_type{};
template <class T> struct is_pointer<T*const> : public true_type{};
template <class T> struct is_pointer<T*const volatile> : public true_type{};
template <class T> struct is_pointer<T*volatile> : public true_type{};

#ifdef BOOST_MSVC
template <class T> struct is_pointer<T const> : public is_pointer<T>{};
template <class T> struct is_pointer<T const volatile> : public is_pointer<T>{};
template <class T> struct is_pointer<T volatile> : public is_pointer<T>{};
#endif

#endif

} // namespace boost

#endif // BOOST_TT_IS_POINTER_HPP_INCLUDED


text:
// ======================================================================
/*!
 * \brief Settings for numeric labels
 */
// ======================================================================

#pragma once

#include <boost/optional.hpp>
#include <boost/shared_ptr.hpp>
#include <json/json.h>
#include <sstream>
#include <string>

namespace SmartMet
{
namespace Plugin
{
namespace Dali
{
class Config;
class State;

class Label
{
 public:
  void init(const Json::Value& theJson, const Config& theConfig);
  std::size_t hash_value(const State& theState) const;
  std::string print(double theValue) const;

  // Offset from actual image position
  int dx = 0;
  int dy = 0;

  std::string orientation = "horizontal";  // horizontal, auto

 private:
  // Value conversion
  std::string unit_conversion;
  double multiplier = 1.0;
  double offset = 0.0;

  // Printing
  std::string missing = "-";
  int precision = 0;

  double multiple = 0;                 // used if non-zero
  std::string rounding = "tonearest";  // tonearest|upward|downward|towardzero

  std::string prefix;
  std::string suffix;
  // Signed prefixes
  std::string plusprefix;   // for numbers >= 0
  std::string minusprefix;  // for numbers < 0

  void setLocale(const std::string& theLocale);
  // shared because otherwise the compiler would force definitions for all constructors
  boost::shared_ptr<std::ostringstream> formatter{new std::ostringstream};

};  // class Label

}  // namespace Dali
}  // namespace Plugin
}  // namespace SmartMet


text:
package com.jaquadro.minecraft.gardencore.block.support;

import com.jaquadro.minecraft.gardencore.api.block.garden.ISlotProfile;
import com.jaquadro.minecraft.gardencore.api.plant.PlantItem;
import com.jaquadro.minecraft.gardencore.api.plant.PlantSize;
import com.jaquadro.minecraft.gardencore.api.plant.PlantType;
import net.minecraft.entity.player.InventoryPlayer;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.AxisAlignedBB;
import net.minecraft.world.IBlockAccess;

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

public class BasicSlotProfile implements ISlotProfile
{
    public static class Slot {
        public int slot;
        public List<PlantType> validTypeClasses = new ArrayList<PlantType>();
        public List<PlantSize> validSizeClasses = new ArrayList<PlantSize>();

        public Slot (int slot, PlantType[] typeClasses, PlantSize[] sizeClasses) {
            this.slot = slot;

            for (int i = 0; i < typeClasses.length; i++)
                validTypeClasses.add(typeClasses[i]);
            for (int i = 0; i < sizeClasses.length; i++)
                validSizeClasses.add(sizeClasses[i]);
        }
    }

    private static AxisAlignedBB[] defaultClippingBounds = new AxisAlignedBB[] { AxisAlignedBB.getBoundingBox(0, 0, 0, 1, 1, 1) };

    protected Slot[] slots;
    protected int[] slotIndexes;

    protected BasicSlotProfile () { }

    public BasicSlotProfile (Slot[] slots) {
        this.slots = slots;

        slotIndexes = new int[slots.length];
        for (int i = 0; i < slots.length; i++)
            slotIndexes[i] = slots[i].slot;
    }

    @Override
    public int[] getPlantSlots () {
        return slotIndexes;
    }

    @Override
    public boolean isPlantValidForSlot (IBlockAccess blockAccess, int x, int y, int z, int slot, PlantItem plant) {
        if (slots == null || slot < 0 || slot >= slots.length)
            return false;
        if (slots[slot] == null)
            return false;

        if (!slots[slot].validTypeClasses.contains(plant.getPlantTypeClass()))
            return false;
        if (!slots[slot].validSizeClasses.contains(plant.getPlantSizeClass()))
            return false;

        return true;
    }

    @Override
    public float getPlantOffsetX (IBlockAccess blockAccess, int x, int y, int z, int slot) {
        return 0;
    }

    @Override
    public float getPlantOffsetY (IBlockAccess blockAccess, int x, int y, int z, int slot) {
        return 0;
    }

    @Override
    public float getPlantOffsetZ (IBlockAccess blockAccess, int x, int y, int z, int slot) {
        return 0;
    }

    @Override
    public Object openPlantGUI (InventoryPlayer playerInventory, TileEntity gardenTile, boolean client) {
        return null;
    }

    @Override
    public AxisAlignedBB[] getClippingBounds (IBlockAccess blockAccess, int x, int y, int z, int slot) {
        return defaultClippingBounds;
    }

    /*@Override
    public int getNextAvailableSlot (IBlockAccess blockAccess, int x, int y, int z, int slot, PlantItem plant) {
        return -1;
    }

    @Override
    public SlotMapping[] getSharedSlotMap (int slot) {
        return null;
    }*/
}


text:
import { SampleDataEvent } from "../common/Types";

const REQUEST_INTERVAL = 50; // msec

export abstract class AudioExport {
    protected tID: number;
    protected bufferId: number;
    protected onrequestbuffer: (e: SampleDataEvent) => void;

    protected static crop (value: number): number {
        return value > 1.0 ? 1.0 : value < -1.0 ? -1.0 : value;
    }

    constructor() {
        this.bufferId = 1;
    }

    protected onRequest(): void {
        this.onrequestbuffer({ bufferId: this.bufferId });
    }

    beginRequest(onrequestbuffer?: (e: SampleDataEvent) => void): void {
        if (onrequestbuffer) this.onrequestbuffer = onrequestbuffer;
        self.clearInterval(this.tID);
        this.tID = self.setInterval(() => { this.onRequest(); }, REQUEST_INTERVAL);
    }

    request(buffer: Float32Array[] = null): void {
        this.beginRequest();
        self.setTimeout(() => {
            this.onrequestbuffer({ retBuf: buffer, bufferId: this.bufferId });
        }, 0);
    }

    abstract process(buffer: Float32Array[]): void;
    abstract complete(): ArrayBuffer[];
}


text:
#ifndef _IPXE_FC_H
#define _IPXE_FC_H

/**
 * @file
 *
 * Fibre Channel
 *
 */

FILE_LICENCE ( GPL2_OR_LATER );

#include <stdint.h>
#include <ipxe/refcnt.h>
#include <ipxe/list.h>
#include <ipxe/tables.h>
#include <ipxe/interface.h>
#include <ipxe/retry.h>
#include <ipxe/socket.h>

/******************************************************************************
 *
 * Fibre Channel Names and identifiers
 *
 ******************************************************************************
 */

/** A Fibre Channel name */
struct fc_name {
	uint8_t bytes[8];
} __attribute__ (( packed ));

/** Length of Fibre Channel name text */
#define FC_NAME_STRLEN 23 /* "xx:xx:xx:xx:xx:xx:xx:xx" */

/** A Fibre Channel port identifier */
struct fc_port_id {
	uint8_t bytes[3];
} __attribute__ (( packed ));

/** Length of Fibre Channel port identifier next */
#define FC_PORT_ID_STRLEN 9 /* "xx.xx.xx" */

/**
 * Fibre Channel socket address
 */
struct sockaddr_fc {
	/** Socket address family (part of struct @c sockaddr)
	 *
	 * Always set to @c AF_FC for Fibre Channel addresses
	 */
	sa_family_t sfc_family;
	/** Port ID */
	struct fc_port_id sfc_port_id;
	/** Padding
	 *
	 * This ensures that a struct @c sockaddr_tcpip is large
	 * enough to hold a socket address for any TCP/IP address
	 * family.
	 */
	char pad[ sizeof ( struct sockaddr ) - sizeof ( sa_family_t )
					     - sizeof ( struct fc_port_id ) ];
} __attribute__ (( may_alias ));

extern struct fc_port_id fc_empty_port_id;
extern struct fc_port_id fc_f_port_id;
extern struct fc_port_id fc_gs_port_id;
extern struct fc_port_id fc_ptp_low_port_id;
extern struct fc_port_id fc_ptp_high_port_id;

extern const char * fc_id_ntoa ( const struct fc_port_id *id );
extern int fc_id_aton ( const char *id_text, struct fc_port_id *id );
extern const char * fc_ntoa ( const struct fc_name *wwn );
extern int fc_aton ( const char *wwn_text, struct fc_name *wwn );
extern struct sockaddr * fc_fill_sockaddr ( struct sockaddr_fc *sa_fc,
					    struct fc_port_id *id );

/******************************************************************************
 *
 * Fibre Channel link state
 *
 ******************************************************************************
 */

/** Delay between failed link-up attempts */
#define FC_LINK_RETRY_DELAY ( 2 * TICKS_PER_SEC )

/** A Fibre Channel link state nonitor */
struct fc_link_state {
	/** Retry timer */
	struct retry_timer timer;
	/** Link state */
	int rc;
	/** Examine link state
	 *
	 * @v link		Fibre Channel link state monitor
	 */
	void ( * examine ) ( struct fc_link_state *link );
};

/**
 * Check Fibre Channel link state
 *
 * @v link		Fibre Channel link state monitor
 * @ret link_up		Link is up
 */
static inline __attribute__ (( always_inline )) int
fc_link_ok ( struct fc_link_state *link ) {
	return ( link->rc == 0 );
}

/******************************************************************************
 *
 * Fibre Channel packet formats and exchanges
 *
 ******************************************************************************
 */

/** A Fibre Channel Frame Header */
struct fc_frame_header {
	/** Routing control
	 *
	 * This is the bitwise OR of one @c fc_r_ctl_routing value and
	 * one @c fc_r_ctl_info value.
	 */
	uint8_t r_ctl;
	/** Destination ID */
	struct fc_port_id d_id;
	/** Class-specific control / Priority */
	uint8_t cs_ctl_prio;
	/** Source ID */
	struct fc_port_id s_id;
	/** Data structure type */
	uint8_t type;
	/** Frame control - exchange and sequence */
	uint8_t f_ctl_es;
	/** Frame control - acknowledgements  */
	uint8_t f_ctl_ack;
	/** Frame control - miscellaneous */
	uint8_t f_ctl_misc;
	/** Sequence ID */
	uint8_t seq_id;
	/** Data field control */
	uint8_t df_ctl;
	/** Sequence count */
	uint16_t seq_cnt;
	/** Originator exchange ID */
	uint16_t ox_id;
	/** Responder exchange ID */
	uint16_t rx_id;
	/** Parameter
	 *
	 * Contains the relative offset when @c FC_F_CTL_MISC_REL_OFF
	 * is set.
	 */
	uint32_t parameter;
} __attribute__ (( packed ));

/** Fibre Channel Routing Control Routing */
enum fc_r_ctl_routing {
	FC_R_CTL_DATA = 0x00,		/**< Device Data */
	FC_R_CTL_ELS = 0x20,		/**< Extended Link Services */
	FC_R_CTL_FC4_LINK = 0x30,	/**< FC-4 Link Data */
	FC_R_CTL_VIDEO = 0x40,		/**< Video Data */
	FC_R_CTL_EH = 0x50,		/**< Extended Headers */
	FC_R_CTL_BLS = 0x80,		/**< Basic Link Services */
	FC_R_CTL_LINK_CTRL = 0xc0,	/**< Link Control */
	FC_R_CTL_EXT_ROUTE = 0xf0,	/**< Extended Routing */
};

/** Fibre Channel Routing Control Routing mask */
#define FC_R_CTL_ROUTING_MASK 0xf0

/** Fibre Channel Routing Control Information */
enum fc_r_ctl_info {
	FC_R_CTL_UNCAT = 0x00,		/**< Uncategorized */
	FC_R_CTL_SOL_DATA = 0x01,	/**< Solicited Data */
	FC_R_CTL_UNSOL_CTRL = 0x02,	/**< Unsolicited Control */
	FC_R_CTL_SOL_CTRL = 0x03,	/**< Solicited Control */
	FC_R_CTL_UNSOL_DATA = 0x04,	/**< Unsolicited Data */
	FC_R_CTL_DATA_DESC = 0x05,	/**< Data Descriptor */
	FC_R_CTL_UNSOL_CMD = 0x06,	/**< Unsolicited Command */
	FC_R_CTL_CMD_STAT = 0x07,	/**< Command Status */
};

/** Fibre Channel Routing Control Information mask */
#define FC_R_CTL_INFO_MASK 0x07

/** Fibre Channel Data Structure Type */
enum fc_type {
	FC_TYPE_BLS = 0x00,		/**< Basic Link Service */
	FC_TYPE_ELS = 0x01,		/**< Extended Link Service */
	FC_TYPE_FCP = 0x08,		/**< Fibre Channel Protocol */
	FC_TYPE_CT  = 0x20,		/**< Common Transport */
};

/** Fibre Channel Frame Control - Exchange and Sequence */
enum fc_f_ctl_es {
	FC_F_CTL_ES_RESPONDER = 0x80,	/**< Responder of Exchange */
	FC_F_CTL_ES_RECIPIENT = 0x40,	/**< Sequence Recipient */
	FC_F_CTL_ES_FIRST = 0x20,	/**< First Sequence of Exchange */
	FC_F_CTL_ES_LAST = 0x10,	/**< Last Sequence of Exchange */
	FC_F_CTL_ES_END = 0x08,		/**< Last Data Frame of Sequence */
	FC_F_CTL_ES_TRANSFER = 0x01,	/**< Transfer Sequence Initiative */
};

/** Fibre Channel Frame Control - Miscellaneous */
enum fc_f_ctl_misc {
	FC_F_CTL_MISC_REL_OFF = 0x08,	/**< Relative Offset Present */
};

/** Responder exchange identifier used before first response */
#define FC_RX_ID_UNKNOWN 0xffff

struct fc_port;

extern int fc_xchg_originate ( struct interface *parent, struct fc_port *port,
			       struct fc_port_id *peer_port_id,
			       unsigned int type );

/** A Fibre Channel responder */
struct fc_responder {
	/** Type */
	unsigned int type;
	/** Respond to exchange
	 *
	 * @v xchg		Exchange interface
	 * @v port		Fibre Channel port
	 * @v port_id		Local port ID
	 * @v peer_port_id	Peer port ID
	 * @ret rc		Return status code
	 */
	int ( * respond ) ( struct interface *xchg, struct fc_port *port,
			    struct fc_port_id *port_id,
			    struct fc_port_id *peer_port_id );
};

/** Fibre Channel responder table */
#define FC_RESPONDERS __table ( struct fc_responder, "fc_responders" )

/** Declare a Fibre Channel responder */
#define __fc_responder __table_entry ( FC_RESPONDERS, 01 )

/******************************************************************************
 *
 * Fibre Channel ports
 *
 ******************************************************************************
 */

/** A Fibre Channel port */
struct fc_port {
	/** Reference count */
	struct refcnt refcnt;
	/** List of all ports */
	struct list_head list;
	/** Name of this port */
	char name[8];

	/** Transport interface */
	struct interface transport;
	/** Node name */
	struct fc_name node_wwn;
	/** Port name */
	struct fc_name port_wwn;
	/** Local port ID */
	struct fc_port_id port_id;
	/** Flags */
	unsigned int flags;

	/** Link state monitor */
	struct fc_link_state link;
	/** FLOGI interface */
	struct interface flogi;
	/** Link node name */
	struct fc_name link_node_wwn;
	/** Link port name */
	struct fc_name link_port_wwn;
	/** Link port ID (for point-to-point links only) */
	struct fc_port_id ptp_link_port_id;

	/** Name server PLOGI interface */
	struct interface ns_plogi;

	/** List of active exchanges */
	struct list_head xchgs;
};

/** Fibre Channel port flags */
enum fc_port_flags {
	/** Port is attached to a fabric */
	FC_PORT_HAS_FABRIC = 0x0001,
	/** Port is logged in to a name server */
	FC_PORT_HAS_NS = 0x0002,
};

/**
 * Get reference to Fibre Channel port
 *
 * @v port		Fibre Channel port
 * @ret port		Fibre Channel port
 */
static inline __attribute__ (( always_inline )) struct fc_port *
fc_port_get ( struct fc_port *port ) {
	ref_get ( &port->refcnt );
	return port;
}

/**
 * Drop reference to Fibre Channel port
 *
 * @v port		Fibre Channel port
 */
static inline __attribute__ (( always_inline )) void
fc_port_put ( struct fc_port *port ) {
	ref_put ( &port->refcnt );
}

extern struct list_head fc_ports;

extern int fc_port_login ( struct fc_port *port, struct fc_port_id *port_id,
			   const struct fc_name *link_node_wwn,
			   const struct fc_name *link_port_wwn,
			   int has_fabric );
extern void fc_port_logout ( struct fc_port *port, int rc );
extern int fc_port_open ( struct interface *transport,
			  const struct fc_name *node_wwn,
			  const struct fc_name *port_wwn,
			  const char *name );
extern struct fc_port * fc_port_find ( const char *name );

/******************************************************************************
 *
 * Fibre Channel peers
 *
 ******************************************************************************
 */

/** A Fibre Channel peer */
struct fc_peer {
	/** Reference count */
	struct refcnt refcnt;
	/** List of all peers */
	struct list_head list;

	/** Port name */
	struct fc_name port_wwn;

	/** Link state monitor */
	struct fc_link_state link;
	/** PLOGI interface */
	struct interface plogi;
	/** Fibre Channel port, if known */
	struct fc_port *port;
	/** Peer port ID, if known */
	struct fc_port_id port_id;

	/** List of upper-layer protocols */
	struct list_head ulps;
	/** Active usage count
	 *
	 * A peer (and attached ULPs) may be created in response to
	 * unsolicited login requests received via the fabric.  We
	 * track our own active usage count independently of the
	 * existence of the peer, so that if the peer becomes logged
	 * out (e.g. due to a link failure) then we know whether or
	 * not we should attempt to relogin.
	 */
	unsigned int usage;
};

/**
 * Get reference to Fibre Channel peer
 *
 * @v peer		Fibre Channel peer
 * @ret peer		Fibre Channel peer
 */
static inline __attribute__ (( always_inline )) struct fc_peer *
fc_peer_get ( struct fc_peer *peer ) {
	ref_get ( &peer->refcnt );
	return peer;
}

/**
 * Drop reference to Fibre Channel peer
 *
 * @v peer		Fibre Channel peer
 */
static inline __attribute__ (( always_inline )) void
fc_peer_put ( struct fc_peer *peer ) {
	ref_put ( &peer->refcnt );
}

extern struct list_head fc_peers;

extern struct fc_peer * fc_peer_get_wwn ( const struct fc_name *port_wwn );
extern struct fc_peer *
fc_peer_get_port_id ( struct fc_port *port,
		      const struct fc_port_id *peer_port_id );
extern int fc_peer_login ( struct fc_peer *peer,
			   struct fc_port *port,
			   struct fc_port_id *port_id );
extern void fc_peer_logout ( struct fc_peer *peer, int rc );

/******************************************************************************
 *
 * Fibre Channel upper-layer protocols
 *
 ******************************************************************************
 */

/** A Fibre Channel upper-layer protocol */
struct fc_ulp {
	/** Reference count */
	struct refcnt refcnt;
	/** Fibre Channel peer */
	struct fc_peer *peer;
	/** List of upper-layer protocols */
	struct list_head list;

	/** Type */
	unsigned int type;
	/** Flags */
	unsigned int flags;

	/** Link state monitor */
	struct fc_link_state link;
	/** PRLI interface */
	struct interface prli;
	/** Service parameters, if any */
	void *param;
	/** Service parameter length */
	size_t param_len;

	/** Active users of this upper-layer protocol
	 *
	 * As with peers, an upper-layer protocol may be created in
	 * response to an unsolicited login request received via the
	 * fabric.  This list records the number of active users of
	 * the ULP; the number of entries in the list is equivalent to
	 * the peer usage count.
	 */
	struct list_head users;
};

/** Fibre Channel upper-layer protocol flags */
enum fc_ulp_flags {
	/** A login originated by us has succeeded */
	FC_ULP_ORIGINATED_LOGIN_OK = 0x0001,
};

/** A Fibre Channel upper-layer protocol user */
struct fc_ulp_user {
	/** Fibre Channel upper layer protocol */
	struct fc_ulp *ulp;
	/** List of users */
	struct list_head list;
	/** Containing object reference count, or NULL */
	struct refcnt *refcnt;
	/** Examine link state
	 *
	 * @v user		Fibre Channel upper-layer-protocol user
	 */
	void ( * examine ) ( struct fc_ulp_user *user );
};

/**
 * Get reference to Fibre Channel upper-layer protocol
 *
 * @v ulp		Fibre Channel upper-layer protocol
 * @ret ulp		Fibre Channel upper-layer protocol
 */
static inline __attribute__ (( always_inline )) struct fc_ulp *
fc_ulp_get ( struct fc_ulp *ulp ) {
	ref_get ( &ulp->refcnt );
	return ulp;
}

/**
 * Drop reference to Fibre Channel upper-layer protocol
 *
 * @v ulp		Fibre Channel upper-layer protocol
 */
static inline __attribute__ (( always_inline )) void
fc_ulp_put ( struct fc_ulp *ulp ) {
	ref_put ( &ulp->refcnt );
}

/**
 * Get reference to Fibre Channel upper-layer protocol user
 *
 * @v user		Fibre Channel upper-layer protocol user
 * @ret user		Fibre Channel upper-layer protocol user
 */
static inline __attribute__ (( always_inline )) struct fc_ulp_user *
fc_ulp_user_get ( struct fc_ulp_user *user ) {
	ref_get ( user->refcnt );
	return user;
}

/**
 * Drop reference to Fibre Channel upper-layer protocol user
 *
 * @v user		Fibre Channel upper-layer protocol user
 */
static inline __attribute__ (( always_inline )) void
fc_ulp_user_put ( struct fc_ulp_user *user ) {
	ref_put ( user->refcnt );
}

/**
 * Initialise Fibre Channel upper-layer protocol user
 *
 * @v user		Fibre Channel upper-layer protocol user
 * @v examine		Examine link state method
 * @v refcnt		Containing object reference count, or NULL
 */
static inline __attribute__ (( always_inline )) void
fc_ulp_user_init ( struct fc_ulp_user *user,
		   void ( * examine ) ( struct fc_ulp_user *user ),
		   struct refcnt *refcnt ) {
	user->examine = examine;
	user->refcnt = refcnt;
}

extern struct fc_ulp * fc_ulp_get_wwn_type ( const struct fc_name *port_wwn,
					     unsigned int type );
extern struct fc_ulp *
fc_ulp_get_port_id_type ( struct fc_port *port,
			  const struct fc_port_id *peer_port_id,
			  unsigned int type );
extern void fc_ulp_attach ( struct fc_ulp *ulp, struct fc_ulp_user *user );
extern void fc_ulp_detach ( struct fc_ulp_user *user );
extern int fc_ulp_login ( struct fc_ulp *ulp, const void *param,
			  size_t param_len, int originated );
extern void fc_ulp_logout ( struct fc_ulp *ulp, int rc );

#endif /* _IPXE_FC_H */


text:
//
//  scene3DLayer.h
//  HelloCpp
//
//  Created by Yang Chao (wantnon) on 13-11-6.
//
//

#ifndef __HelloCpp___scene3DLayer__
#define __HelloCpp___scene3DLayer__

#include <iostream>
#include "cocos2d.h"
using namespace cocos2d;

#include "c3dToolKit.h"
class Cscene3DLayer : public CCLayer
{
public:
	Cscene3DLayer() {
        m_r=6;
        m_A=0;
        m_B=0;
        m_eyePos.init(0, 0, m_r, 1);
        m_eyeTg.init(0, 0, 0, 1);

        m_mosPos=CCPoint(0,0);
        m_mosPosf=CCPoint(0,0);

        m_scene=NULL;

    }
	virtual ~Cscene3DLayer(){
    };
    bool init();
public:
    //touch
	virtual void ccTouchesBegan(cocos2d::CCSet* touches , cocos2d::CCEvent* event);
	virtual void ccTouchesMoved(cocos2d::CCSet* touches , cocos2d::CCEvent* event);
	virtual void ccTouchesEnded(cocos2d::CCSet* touches , cocos2d::CCEvent* event);
public:
    Cc3dVector4 m_eyePos;
    Cc3dVector4 m_eyeTg;
    float m_r;//distance from eyePos to eyeTg
    float m_A;//angle in XZ plane
    float m_B;//angle vertical
    void updateEyePos();

    CCPoint m_mosPos;//trace mouse position
    CCPoint m_mosPosf;//mouse position of previous frame

    Cc3dScene*m_scene;//3D scene root node

    vector<Cc3dSprite*> m_spriteList;//list of 3D sprite

};

#endif /* defined(__HelloCpp___scene3DLayer__) */


text:
/// <amd-module name="@angular/compiler-cli/src/ngcc/src/analysis/module_with_providers_analyzer" />

import * as ts from 'typescript';
import { ReferencesRegistry } from '../../../ngtsc/annotations';
import { Declaration } from '../../../ngtsc/host';
import { NgccReflectionHost } from '../host/ngcc_host';
export interface ModuleWithProvidersInfo {
    /**
     * The declaration (in the .d.ts file) of the function that returns
     * a `ModuleWithProviders object, but has a signature that needs
     * a type parameter adding.
     */
    declaration: ts.MethodDeclaration | ts.FunctionDeclaration;
    /**
     * The NgModule class declaration (in the .d.ts file) to add as a type parameter.
     */
    ngModule: Declaration;
}
export declare type ModuleWithProvidersAnalyses = Map<ts.SourceFile, ModuleWithProvidersInfo[]>;
export declare const ModuleWithProvidersAnalyses: MapConstructor;
export declare class ModuleWithProvidersAnalyzer {
    private host;
    private referencesRegistry;
    constructor(host: NgccReflectionHost, referencesRegistry: ReferencesRegistry);
    analyzeProgram(program: ts.Program): ModuleWithProvidersAnalyses;
    private getRootFiles;
    private getDtsDeclaration;
}