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.

using System;
using System.Collections.Generic;
using System.Collections.Immutable;
using System.Diagnostics;
using System.Linq;
using System.Runtime.CompilerServices;
using System.Threading;
using System.Threading.Tasks;
using Microsoft.CodeAnalysis.Collections;
using Roslyn.Utilities;

namespace Microsoft.CodeAnalysis.Diagnostics
{
    /// <summary>
    /// Driver to execute diagnostic analyzers for a given compilation.
    /// It uses a <see cref="AsyncQueue{TElement}"/> of <see cref="CompilationEvent"/>s to drive its analysis.
    /// </summary>
    internal abstract class AnalyzerDriver : IDisposable
    {
        internal static readonly ConditionalWeakTable<Compilation, SuppressMessageAttributeState> SuppressMessageStateByCompilation = new ConditionalWeakTable<Compilation, SuppressMessageAttributeState>();

        // Protect against vicious analyzers that provide large values for SymbolKind.
        private const int MaxSymbolKind = 100;

        private readonly ImmutableArray<DiagnosticAnalyzer> _analyzers;
        private readonly CancellationTokenRegistration _queueRegistration;
        protected readonly AnalyzerManager analyzerManager;

        // Lazy fields initialized in Initialize() API
        private Compilation _compilation;
        protected AnalyzerExecutor analyzerExecutor;
        internal AnalyzerActions analyzerActions;
        private ImmutableDictionary<DiagnosticAnalyzer, ImmutableArray<ImmutableArray<SymbolAnalyzerAction>>> _symbolActionsByKind;
        private ImmutableDictionary<DiagnosticAnalyzer, ImmutableArray<SemanticModelAnalyzerAction>> _semanticModelActionsMap;
        private ImmutableDictionary<DiagnosticAnalyzer, ImmutableArray<CompilationEndAnalyzerAction>> _compilationEndActionsMap;

        /// <summary>
        /// Primary driver task which processes all <see cref="CompilationEventQueue"/> events, runs analyzer actions and signals completion of <see cref="DiagnosticQueue"/> at the end.
        /// </summary>
        private Task _primaryTask;

        /// <summary>
        /// The compilation queue to create the compilation with via WithEventQueue.
        /// </summary>
        public AsyncQueue<CompilationEvent> CompilationEventQueue
        {
            get;
        }

        /// <summary>
        /// An async queue that is fed the diagnostics as they are computed.
        /// </summary>
        public AsyncQueue<Diagnostic> DiagnosticQueue
        {
            get;
        }

        /// <summary>
        /// Initializes the compilation for the analyzer driver.
        /// It also computes and initializes <see cref="analyzerActions"/> and <see cref="_symbolActionsByKind"/>.
        /// Finally, it initializes and starts the <see cref="_primaryTask"/> for the driver.
        /// </summary>
        /// <remarks>
        /// NOTE: This method must only be invoked from <see cref="AnalyzerDriver.Create(Compilation, ImmutableArray{DiagnosticAnalyzer}, AnalyzerOptions, AnalyzerManager, Action{Diagnostic}, out Compilation, CancellationToken)"/>.
        /// </remarks>
        private void Initialize(Compilation comp, AnalyzerExecutor analyzerExecutor, CancellationToken cancellationToken)
        {
            try
            {
                Debug.Assert(_compilation == null);
                Debug.Assert(comp.EventQueue == this.CompilationEventQueue);

                _compilation = comp;
                this.analyzerExecutor = analyzerExecutor;

                // Compute the set of effective actions based on suppression, and running the initial analyzers
                var analyzerActionsTask = GetAnalyzerActionsAsync(_analyzers, analyzerManager, analyzerExecutor);
                var initializeTask = analyzerActionsTask.ContinueWith(t =>
                {
                    this.analyzerActions = t.Result;
                    _symbolActionsByKind = MakeSymbolActionsByKind();
                    _semanticModelActionsMap = MakeSemanticModelActionsByAnalyzer();
                    _compilationEndActionsMap = MakeCompilationEndActionsByAnalyzer();
                }, cancellationToken);

                // create the primary driver task.
                cancellationToken.ThrowIfCancellationRequested();
                _primaryTask = Task.Run(async () =>
                    {
                        await initializeTask.ConfigureAwait(false);
                        await ProcessCompilationEventsAsync(cancellationToken).ConfigureAwait(false);
                        await ExecuteSyntaxTreeActions(cancellationToken).ConfigureAwait(false);
                    }, cancellationToken)
                    .ContinueWith(c => DiagnosticQueue.TryComplete(), cancellationToken, TaskContinuationOptions.ExecuteSynchronously, TaskScheduler.Default);
            }
            finally
            {
                if (_primaryTask == null)
                {
                    // Set primaryTask to be a cancelled task.
                    var tcs = new TaskCompletionSource<int>();
                    tcs.SetCanceled();
                    _primaryTask = tcs.Task;

                    // Try to set the DiagnosticQueue to be complete.
                    this.DiagnosticQueue.TryComplete();
                }
            }
        }

        private Task ExecuteSyntaxTreeActions(CancellationToken cancellationToken)
        {
            // Execute syntax tree analyzers in parallel.
            var tasks = ArrayBuilder<Task>.GetInstance();
            foreach (var tree in _compilation.SyntaxTrees)
            {
                var actionsByAnalyzers = this.analyzerActions.SyntaxTreeActions.GroupBy(action => action.Analyzer);
                foreach (var analyzerAndActions in actionsByAnalyzers)
                {
                    var task = Task.Run(() =>
                    {
                        // Execute actions for a given analyzer sequentially.
                        analyzerExecutor.ExecuteSyntaxTreeActions(analyzerAndActions.ToImmutableArray(), tree);
                    }, cancellationToken);

                    tasks.Add(task);
                }
            }

            return Task.WhenAll(tasks.ToArrayAndFree());
        }

        /// <summary>
        /// Create an <see cref="AnalyzerDriver"/> and attach it to the given compilation.
        /// </summary>
        /// <param name="compilation">The compilation to which the new driver should be attached.</param>
        /// <param name="analyzers">The set of analyzers to include in the analysis.</param>
        /// <param name="options">Options that are passed to analyzers.</param>
        /// <param name="analyzerManager">AnalyzerManager to manage analyzers for the lifetime of analyzer host.</param>
        /// <param name="addExceptionDiagnostic">Delegate to add diagnostics generated for exceptions from third party analyzers.</param>
        /// <param name="newCompilation">The new compilation with the analyzer driver attached.</param>
        /// <param name="cancellationToken">A cancellation token that can be used to abort analysis.</param>
        /// <returns>A newly created analyzer driver</returns>
        /// <remarks>
        /// Note that since a compilation is immutable, the act of creating a driver and attaching it produces
        /// a new compilation. Any further actions on the compilation should use the new compilation.
        /// </remarks>
        public static AnalyzerDriver Create(
            Compilation compilation,
            ImmutableArray<DiagnosticAnalyzer> analyzers,
            AnalyzerOptions options,
            AnalyzerManager analyzerManager,
            Action<Diagnostic> addExceptionDiagnostic,
            out Compilation newCompilation,
            CancellationToken cancellationToken)
        {
            if (compilation == null)
            {
                throw new ArgumentNullException(nameof(compilation));
            }

            if (analyzers.IsDefaultOrEmpty)
            {
                throw new ArgumentException(CodeAnalysisResources.ArgumentCannotBeEmpty, nameof(analyzers));
            }

            if (analyzers.Any(a => a == null))
            {
                throw new ArgumentException(CodeAnalysisResources.ArgumentElementCannotBeNull, nameof(analyzers));
            }

            Action<Exception, DiagnosticAnalyzer, Diagnostic> onAnalyzerException = (ex, analyzer, diagnostic) =>
            {
                if (addExceptionDiagnostic != null)
                {
                    addExceptionDiagnostic(diagnostic);
        }
            };
            return Create(compilation, analyzers, options, analyzerManager, onAnalyzerException, out newCompilation, cancellationToken: cancellationToken);
        }

        // internal for testing purposes
        internal static AnalyzerDriver Create(
            Compilation compilation,
            ImmutableArray<DiagnosticAnalyzer> analyzers,
            AnalyzerOptions options,
            AnalyzerManager analyzerManager,
            Action<Exception, DiagnosticAnalyzer, Diagnostic> onAnalyzerException,
            out Compilation newCompilation,
            CancellationToken cancellationToken)
        {
            options = options ?? AnalyzerOptions.Empty;
            AnalyzerDriver analyzerDriver = compilation.AnalyzerForLanguage(analyzers, analyzerManager, cancellationToken);
            newCompilation = compilation.WithEventQueue(analyzerDriver.CompilationEventQueue);

            var addDiagnostic = GetDiagnosticSinkWithSuppression(analyzerDriver.DiagnosticQueue.Enqueue, newCompilation);

            Action<Exception, DiagnosticAnalyzer, Diagnostic> newOnAnalyzerException;
            if (onAnalyzerException != null)
            {
                // Wrap onAnalyzerException to pass in filtered diagnostic.
                var comp = newCompilation;
                newOnAnalyzerException = (ex, analyzer, diagnostic) =>
                    onAnalyzerException(ex, analyzer, GetFilteredDiagnostic(diagnostic, comp));
            }
            else
            {
                // Add exception diagnostic to regular diagnostic bag.
                newOnAnalyzerException = (ex, analyzer, diagnostic) => addDiagnostic(diagnostic);
            }

            var analyzerExecutor = AnalyzerExecutor.Create(newCompilation, options, addDiagnostic, newOnAnalyzerException, cancellationToken);

            analyzerDriver.Initialize(newCompilation, analyzerExecutor, cancellationToken);

            return analyzerDriver;
        }

        /// <summary>
        /// Create an analyzer driver.
        /// </summary>
        /// <param name="analyzers">The set of analyzers to include in the analysis</param>
        /// <param name="analyzerManager">AnalyzerManager to manage analyzers for analyzer host's lifetime.</param>
        /// <param name="cancellationToken">a cancellation token that can be used to abort analysis</param>
        protected AnalyzerDriver(ImmutableArray<DiagnosticAnalyzer> analyzers, AnalyzerManager analyzerManager, CancellationToken cancellationToken)
        {
            _analyzers = analyzers;
            this.analyzerManager = analyzerManager;

            this.CompilationEventQueue = new AsyncQueue<CompilationEvent>();
            this.DiagnosticQueue = new AsyncQueue<Diagnostic>();
            _queueRegistration = cancellationToken.Register(() =>
            {
                this.CompilationEventQueue.TryComplete();
                this.DiagnosticQueue.TryComplete();
            });
        }

        /// <summary>
        /// Returns all diagnostics computed by the analyzers since the last time this was invoked.
        /// If <see cref="CompilationEventQueue"/> has been completed with all compilation events, then it waits for
        /// <see cref="WhenCompletedTask"/> task for the driver to finish processing all events and generate remaining analyzer diagnostics.
        /// </summary>
        public async Task<ImmutableArray<Diagnostic>> GetDiagnosticsAsync()
        {
            var allDiagnostics = DiagnosticBag.GetInstance();
            if (CompilationEventQueue.IsCompleted)
            {
                await this.WhenCompletedTask.ConfigureAwait(false);
            }

            Diagnostic d;
            while (DiagnosticQueue.TryDequeue(out d))
            {
                allDiagnostics.Add(d);
            }

            var diagnostics = allDiagnostics.ToReadOnlyAndFree();

            // Verify that the diagnostics are already filtered.
            Debug.Assert(_compilation == null ||
                diagnostics.All(diag => _compilation.FilterDiagnostic(diag)?.Severity == diag.Severity));

            return diagnostics;
        }

        /// <summary>
        /// Return a task that completes when the driver is done producing diagnostics.
        /// </summary>
        public Task WhenCompletedTask => _primaryTask;

        private ImmutableDictionary<DiagnosticAnalyzer, ImmutableArray<ImmutableArray<SymbolAnalyzerAction>>> MakeSymbolActionsByKind()
        {
            var builder = ImmutableDictionary.CreateBuilder<DiagnosticAnalyzer, ImmutableArray<ImmutableArray<SymbolAnalyzerAction>>>();
            var actionsByAnalyzers = this.analyzerActions.SymbolActions.GroupBy(action => action.Analyzer);
            foreach (var analyzerAndActions in actionsByAnalyzers)
            {
                var actionsByKindBuilder = new List<ArrayBuilder<SymbolAnalyzerAction>>();
                foreach (var symbolAction in analyzerAndActions)
                {
                    var kinds = symbolAction.Kinds;
                    foreach (int kind in kinds.Distinct())
                    {
                        if (kind > MaxSymbolKind) continue; // protect against vicious analyzers
                        while (kind >= actionsByKindBuilder.Count)
                        {
                            actionsByKindBuilder.Add(ArrayBuilder<SymbolAnalyzerAction>.GetInstance());
                        }

                        actionsByKindBuilder[kind].Add(symbolAction);
                    }
                }

                var actionsByKind = actionsByKindBuilder.Select(a => a.ToImmutableAndFree()).ToImmutableArray();
                builder.Add(analyzerAndActions.Key, actionsByKind);
            }

            return builder.ToImmutable();
        }

        private ImmutableDictionary<DiagnosticAnalyzer, ImmutableArray<SemanticModelAnalyzerAction>> MakeSemanticModelActionsByAnalyzer()
        {
            var builder = ImmutableDictionary.CreateBuilder<DiagnosticAnalyzer, ImmutableArray<SemanticModelAnalyzerAction>>();
            var actionsByAnalyzers = this.analyzerActions.SemanticModelActions.GroupBy(action => action.Analyzer);
            foreach (var analyzerAndActions in actionsByAnalyzers)
            {
                builder.Add(analyzerAndActions.Key, analyzerAndActions.ToImmutableArray());
            }

            return builder.ToImmutable();
        }

        private ImmutableDictionary<DiagnosticAnalyzer, ImmutableArray<CompilationEndAnalyzerAction>> MakeCompilationEndActionsByAnalyzer()
        {
            var builder = ImmutableDictionary.CreateBuilder<DiagnosticAnalyzer, ImmutableArray<CompilationEndAnalyzerAction>>();
            var actionsByAnalyzers = this.analyzerActions.CompilationEndActions.GroupBy(action => action.Analyzer);
            foreach (var analyzerAndActions in actionsByAnalyzers)
            {
                builder.Add(analyzerAndActions.Key, analyzerAndActions.ToImmutableArray());
            }

            return builder.ToImmutable();
        }

        private async Task ProcessCompilationEventsAsync(CancellationToken cancellationToken)
        {
            while (!CompilationEventQueue.IsCompleted || CompilationEventQueue.Count > 0)
            {
                CompilationEvent e;
                try
                {
                    e = await CompilationEventQueue.DequeueAsync(cancellationToken).ConfigureAwait(false);
                }
                catch (TaskCanceledException)
                {
                    // When the queue is completed with a pending DequeueAsync return then a
                    // TaskCanceledException will be thrown.  This just signals the queue is
                    // complete and we should finish processing it.
                    Debug.Assert(CompilationEventQueue.IsCompleted, "DequeueAsync should never throw unless the AsyncQueue<T> is completed.");
                    break;
                }

                if (e.Compilation != _compilation)
                {
                    Debug.Assert(false, "CompilationEvent with a different compilation then driver's compilation?");
                    continue;
                }

                try
                {
                    await ProcessEventAsync(e, cancellationToken).ConfigureAwait(false);
                }
                catch (OperationCanceledException)
                {
                    // when just a single operation is cancelled, we continue processing events.
                    // TODO: what is the desired behavior in this case?
                }
            }
        }

        private async Task ProcessEventAsync(CompilationEvent e, CancellationToken cancellationToken)
        {
            var symbolEvent = e as SymbolDeclaredCompilationEvent;
            if (symbolEvent != null)
            {
                await ProcessSymbolDeclaredAsync(symbolEvent, cancellationToken).ConfigureAwait(false);
                return;
            }

            var completedEvent = e as CompilationUnitCompletedEvent;
            if (completedEvent != null)
            {
                await ProcessCompilationUnitCompleted(completedEvent, cancellationToken).ConfigureAwait(false);
                return;
            }

            var endEvent = e as CompilationCompletedEvent;
            if (endEvent != null)
            {
                await ProcessCompilationCompletedAsync(endEvent, cancellationToken).ConfigureAwait(false);
                return;
            }

            if (e is CompilationStartedEvent)
            {
                // Ignore CompilationStartedEvent.
                return;
            }

            throw new InvalidOperationException("Unexpected compilation event of type " + e.GetType().Name);
        }

        private async Task ProcessSymbolDeclaredAsync(SymbolDeclaredCompilationEvent symbolEvent, CancellationToken cancellationToken)
        {
            // Create a task per-analyzer to execute analyzer actions.
            // We execute analyzers in parallel, but for a given analyzer we execute actions sequentially.
            var tasksMap = PooledDictionary<DiagnosticAnalyzer, Task>.GetInstance();

            try
            {
                var symbol = symbolEvent.Symbol;

                // Skip symbol actions for implicitly declared symbols.
                if (!symbol.IsImplicitlyDeclared)
                {
                    AddTasksForExecutingSymbolActions(symbolEvent, tasksMap, cancellationToken);
                }

                // Skip syntax actions for implicitly declared symbols, except for implicitly declared global namespace symbols.
                if (!symbol.IsImplicitlyDeclared ||
                    (symbol.Kind == SymbolKind.Namespace && ((INamespaceSymbol)symbol).IsGlobalNamespace))
                {
                    AddTasksForExecutingDeclaringReferenceActions(symbolEvent, tasksMap, cancellationToken);
                }

                // Execute all analyzer actions.
                await Task.WhenAll(tasksMap.Values).ConfigureAwait(false);
            }
            finally
            {
                tasksMap.Free();
                symbolEvent.FlushCache();
            }
        }

        private void AddTasksForExecutingSymbolActions(SymbolDeclaredCompilationEvent symbolEvent, IDictionary<DiagnosticAnalyzer, Task> taskMap, CancellationToken cancellationToken)
        {
            var symbol = symbolEvent.Symbol;
            Action<Diagnostic> addDiagnosticForSymbol = GetDiagnosticSinkWithSuppression(DiagnosticQueue.Enqueue, _compilation, symbol);

            foreach (var analyzerAndActions in _symbolActionsByKind)
            {
                var analyzer = analyzerAndActions.Key;
                var actionsByKind = analyzerAndActions.Value;

                Action executeSymbolActionsForAnalyzer = () =>
                    ExecuteSymbolActionsForAnalyzer(symbol, analyzer, actionsByKind, addDiagnosticForSymbol, cancellationToken);

                AddAnalyzerActionsExecutor(taskMap, analyzer, executeSymbolActionsForAnalyzer, cancellationToken);
            }
        }

        private void ExecuteSymbolActionsForAnalyzer(
            ISymbol symbol,
            DiagnosticAnalyzer analyzer,
            ImmutableArray<ImmutableArray<SymbolAnalyzerAction>> actionsByKind,
            Action<Diagnostic> addDiagnosticForSymbol,
            CancellationToken cancellationToken)
        {
            // Invoke symbol analyzers only for source symbols.
            var declaringSyntaxRefs = symbol.DeclaringSyntaxReferences;
            if ((int)symbol.Kind < actionsByKind.Length && declaringSyntaxRefs.Any(s => s.SyntaxTree != null))
            {
                analyzerExecutor.ExecuteSymbolActions(actionsByKind[(int)symbol.Kind], symbol, addDiagnosticForSymbol);
            }
        }

        protected static void AddAnalyzerActionsExecutor(IDictionary<DiagnosticAnalyzer, Task> map, DiagnosticAnalyzer analyzer, Action executeAnalyzerActions, CancellationToken cancellationToken)
        {
            Task currentTask;
            if (!map.TryGetValue(analyzer, out currentTask))
            {
                map[analyzer] = Task.Run(executeAnalyzerActions, cancellationToken);
            }
            else
            {
                map[analyzer] = currentTask.ContinueWith(_ => executeAnalyzerActions(), cancellationToken);
            }
        }

        protected abstract void AddTasksForExecutingDeclaringReferenceActions(SymbolDeclaredCompilationEvent symbolEvent, IDictionary<DiagnosticAnalyzer, Task> taskMap, CancellationToken cancellationToken);

        private Task ProcessCompilationUnitCompleted(CompilationUnitCompletedEvent completedEvent, CancellationToken cancellationToken)
        {
            // When the compiler is finished with a compilation unit, we can run user diagnostics which
            // might want to ask the compiler for all the diagnostics in the source file, for example
            // to get information about unnecessary usings.

            try
            {
                // Execute analyzers in parallel.
                var tasks = ArrayBuilder<Task>.GetInstance();

                var semanticModel = completedEvent.SemanticModel;
                foreach (var analyzerAndActions in _semanticModelActionsMap)
                {
                    var task = Task.Run(() =>
                    {
                        // Execute actions for a given analyzer sequentially.
                        analyzerExecutor.ExecuteSemanticModelActions(analyzerAndActions.Value, semanticModel);
                    }, cancellationToken);

                    tasks.Add(task);
                }

                return Task.WhenAll(tasks.ToArrayAndFree());
            }
            finally
            {
                completedEvent.FlushCache();
            }
        }

        private async Task ProcessCompilationCompletedAsync(CompilationCompletedEvent endEvent, CancellationToken cancellationToken)
        {
            try
            {
                // Execute analyzers in parallel.
                var tasks = ArrayBuilder<Task>.GetInstance();
                foreach (var analyzerAndActions in _compilationEndActionsMap)
                {
                    var task = Task.Run(() =>
                    {
                        // Execute actions for a given analyzer sequentially.
                        analyzerExecutor.ExecuteCompilationEndActions(analyzerAndActions.Value);
                    }, cancellationToken);

                    tasks.Add(task);
                }

                await Task.WhenAll(tasks.ToArrayAndFree()).ConfigureAwait(false);
            }
            finally
            {
                endEvent.FlushCache();
            }
        }

        internal static Action<Diagnostic> GetDiagnosticSinkWithSuppression(Action<Diagnostic> addDiagnosticCore, Compilation compilation, ISymbol symbolOpt = null)
        {
            return diagnostic =>
            {
                var filteredDiagnostic = GetFilteredDiagnostic(diagnostic, compilation, symbolOpt);
                if (filteredDiagnostic != null)
                {
                    addDiagnosticCore(filteredDiagnostic);
                }
            };
        }

        private static Diagnostic GetFilteredDiagnostic(Diagnostic diagnostic, Compilation compilation, ISymbol symbolOpt = null)
        {
                var filteredDiagnostic = compilation.FilterDiagnostic(diagnostic);
                if (filteredDiagnostic != null)
                {
                    var suppressMessageState = SuppressMessageStateByCompilation.GetValue(compilation, (c) => new SuppressMessageAttributeState(c));
                if (suppressMessageState.IsDiagnosticSuppressed(filteredDiagnostic, symbolOpt: symbolOpt))
                    {
                    return null;
                    }
                }

            return filteredDiagnostic;
        }

        private static Task<AnalyzerActions> GetAnalyzerActionsAsync(
            ImmutableArray<DiagnosticAnalyzer> analyzers,
            AnalyzerManager analyzerManager,
            AnalyzerExecutor analyzerExecutor)
        {
            return Task.Run(async () =>
            {
                AnalyzerActions allAnalyzerActions = new AnalyzerActions();
                foreach (var analyzer in analyzers)
                {
                    if (!IsDiagnosticAnalyzerSuppressed(analyzer, analyzerExecutor.Compilation.Options, analyzerManager, analyzerExecutor))
                    {
                        var analyzerActions = await analyzerManager.GetAnalyzerActionsAsync(analyzer, analyzerExecutor).ConfigureAwait(false);
                        allAnalyzerActions = allAnalyzerActions.Append(analyzerActions);
                    }
                }

                return allAnalyzerActions;
            }, analyzerExecutor.CancellationToken);
        }

        /// <summary>
        /// Returns true if all the diagnostics that can be produced by this analyzer are suppressed through options.
        /// </summary>
        internal static bool IsDiagnosticAnalyzerSuppressed(
            DiagnosticAnalyzer analyzer,
            CompilationOptions options,
            AnalyzerManager analyzerManager,
            AnalyzerExecutor analyzerExecutor)
        {
            return analyzerManager.IsDiagnosticAnalyzerSuppressed(analyzer, options, IsCompilerAnalyzer, analyzerExecutor);
        }

        private static bool IsCompilerAnalyzer(DiagnosticAnalyzer analyzer)
        {
            return analyzer is CompilerDiagnosticAnalyzer;
        }

        public void Dispose()
        {
            this.CompilationEventQueue.TryComplete();
            this.DiagnosticQueue.TryComplete();
            _queueRegistration.Dispose();
        }
    }

    /// <summary>
    /// Driver to execute diagnostic analyzers for a given compilation.
    /// It uses a <see cref="AsyncQueue{TElement}"/> of <see cref="CompilationEvent"/>s to drive its analysis.
    /// </summary>
    internal class AnalyzerDriver<TLanguageKindEnum> : AnalyzerDriver where TLanguageKindEnum : struct
    {
        private Func<SyntaxNode, TLanguageKindEnum> _getKind;
        private ImmutableDictionary<DiagnosticAnalyzer, ImmutableDictionary<TLanguageKindEnum, ImmutableArray<SyntaxNodeAnalyzerAction<TLanguageKindEnum>>>> _lazyNodeActionsByKind = null;
        private ImmutableDictionary<DiagnosticAnalyzer, ImmutableArray<CodeBlockStartAnalyzerAction<TLanguageKindEnum>>> _lazyCodeBlockStartActionsByAnalyzer = null;
        private ImmutableDictionary<DiagnosticAnalyzer, ImmutableArray<CodeBlockEndAnalyzerAction>> _lazyCodeBlockEndActionsByAnalyzer = null;

        /// <summary>
        /// Create an analyzer driver.
        /// </summary>
        /// <param name="analyzers">The set of analyzers to include in the analysis</param>
        /// <param name="getKind">A delegate that returns the language-specific kind for a given syntax node</param>
        /// <param name="analyzerManager">AnalyzerManager to manage analyzers for the lifetime of analyzer host.</param>
        /// <param name="cancellationToken">a cancellation token that can be used to abort analysis</param>
        internal AnalyzerDriver(ImmutableArray<DiagnosticAnalyzer> analyzers, Func<SyntaxNode, TLanguageKindEnum> getKind, AnalyzerManager analyzerManager, CancellationToken cancellationToken) : base(analyzers, analyzerManager, cancellationToken)
        {
            _getKind = getKind;
        }

        private ImmutableDictionary<DiagnosticAnalyzer, ImmutableDictionary<TLanguageKindEnum, ImmutableArray<SyntaxNodeAnalyzerAction<TLanguageKindEnum>>>> NodeActionsByKind
        {
            get
            {
                if (_lazyNodeActionsByKind == null)
                {
                    var nodeActions = this.analyzerActions.GetSyntaxNodeActions<TLanguageKindEnum>();
                    ImmutableDictionary<DiagnosticAnalyzer, ImmutableDictionary<TLanguageKindEnum, ImmutableArray<SyntaxNodeAnalyzerAction<TLanguageKindEnum>>>> analyzerActionsByKind;
                    if (nodeActions.Any())
                    {
                        var nodeActionsByAnalyzers = nodeActions.GroupBy(a => a.Analyzer);
                        var builder = ImmutableDictionary.CreateBuilder<DiagnosticAnalyzer, ImmutableDictionary<TLanguageKindEnum, ImmutableArray<SyntaxNodeAnalyzerAction<TLanguageKindEnum>>>>();
                        foreach (var analzerAndActions in nodeActionsByAnalyzers)
                        {
                            ImmutableDictionary<TLanguageKindEnum, ImmutableArray<SyntaxNodeAnalyzerAction<TLanguageKindEnum>>> actionsByKind;
                            if (analzerAndActions.Any())
                            {
                                actionsByKind = AnalyzerExecutor.GetNodeActionsByKind(analzerAndActions);
                            }
                            else
                            {
                                actionsByKind = ImmutableDictionary<TLanguageKindEnum, ImmutableArray<SyntaxNodeAnalyzerAction<TLanguageKindEnum>>>.Empty;
                            }

                            builder.Add(analzerAndActions.Key, actionsByKind);
                        }

                        analyzerActionsByKind = builder.ToImmutable();
                    }
                    else
                    {
                        analyzerActionsByKind = ImmutableDictionary<DiagnosticAnalyzer, ImmutableDictionary<TLanguageKindEnum, ImmutableArray<SyntaxNodeAnalyzerAction<TLanguageKindEnum>>>>.Empty;
                    }

                    Interlocked.CompareExchange(ref _lazyNodeActionsByKind, analyzerActionsByKind, null);
                }

                return _lazyNodeActionsByKind;
            }
        }

        private ImmutableDictionary<DiagnosticAnalyzer, ImmutableArray<CodeBlockStartAnalyzerAction<TLanguageKindEnum>>> CodeBlockStartActionsByAnalyer
        {
            get
            {
                if (_lazyCodeBlockStartActionsByAnalyzer == null)
                {
                    ImmutableDictionary<DiagnosticAnalyzer, ImmutableArray<CodeBlockStartAnalyzerAction<TLanguageKindEnum>>> codeBlockStartActionsByAnalyzer;
                    var codeBlockStartActions = this.analyzerActions.GetCodeBlockStartActions<TLanguageKindEnum>();
                    if (codeBlockStartActions.Any())
                    {
                        var builder = ImmutableDictionary.CreateBuilder<DiagnosticAnalyzer, ImmutableArray<CodeBlockStartAnalyzerAction<TLanguageKindEnum>>>();
                        var actionsByAnalyzer = codeBlockStartActions.GroupBy(action => action.Analyzer);
                        foreach (var analyzerAndActions in actionsByAnalyzer)
                        {
                            builder.Add(analyzerAndActions.Key, analyzerAndActions.ToImmutableArrayOrEmpty());
                        }

                        codeBlockStartActionsByAnalyzer = builder.ToImmutable();
                    }
                    else
                    {
                        codeBlockStartActionsByAnalyzer = ImmutableDictionary<DiagnosticAnalyzer, ImmutableArray<CodeBlockStartAnalyzerAction<TLanguageKindEnum>>>.Empty;
                    }

                    Interlocked.CompareExchange(ref _lazyCodeBlockStartActionsByAnalyzer, codeBlockStartActionsByAnalyzer, null);
                }

                return _lazyCodeBlockStartActionsByAnalyzer;
            }
        }

        private ImmutableDictionary<DiagnosticAnalyzer, ImmutableArray<CodeBlockEndAnalyzerAction>> CodeBlockEndActionsByAnalyer
        {
            get
            {
                if (_lazyCodeBlockEndActionsByAnalyzer == null)
                {
                    ImmutableDictionary<DiagnosticAnalyzer, ImmutableArray<CodeBlockEndAnalyzerAction>> codeBlockEndActionsByAnalyzer;
                    var codeBlockEndActions = this.analyzerActions.CodeBlockEndActions;
                    if (codeBlockEndActions.Any())
                    {
                        var builder = ImmutableDictionary.CreateBuilder<DiagnosticAnalyzer, ImmutableArray<CodeBlockEndAnalyzerAction>>();
                        var actionsByAnalyzer = codeBlockEndActions.GroupBy(action => action.Analyzer);
                        foreach (var analyzerAndActions in actionsByAnalyzer)
                        {
                            builder.Add(analyzerAndActions.Key, analyzerAndActions.ToImmutableArrayOrEmpty());
                        }

                        codeBlockEndActionsByAnalyzer = builder.ToImmutable();
                    }
                    else
                    {
                        codeBlockEndActionsByAnalyzer = ImmutableDictionary<DiagnosticAnalyzer, ImmutableArray<CodeBlockEndAnalyzerAction>>.Empty;
                    }

                    Interlocked.CompareExchange(ref _lazyCodeBlockEndActionsByAnalyzer, codeBlockEndActionsByAnalyzer, null);
                }

                return _lazyCodeBlockEndActionsByAnalyzer;
            }
        }

        protected override void AddTasksForExecutingDeclaringReferenceActions(
            SymbolDeclaredCompilationEvent symbolEvent,
            IDictionary<DiagnosticAnalyzer, Task> taskMap,
            CancellationToken cancellationToken)
        {
            var symbol = symbolEvent.Symbol;
            var executeSyntaxNodeActions = this.NodeActionsByKind.Any();
            var executeCodeBlockActions = AnalyzerExecutor.CanHaveExecutableCodeBlock(symbol) && (this.CodeBlockStartActionsByAnalyer.Any() || this.CodeBlockEndActionsByAnalyer.Any());

            if (executeSyntaxNodeActions || executeCodeBlockActions)
            {
                foreach (var decl in symbol.DeclaringSyntaxReferences)
                {
                    AddTasksForExecutingDeclaringReferenceActions(decl, symbolEvent, taskMap,
                        executeSyntaxNodeActions, executeCodeBlockActions, cancellationToken);
                }
            }
        }

        private void AddTasksForExecutingDeclaringReferenceActions(
            SyntaxReference decl,
            SymbolDeclaredCompilationEvent symbolEvent,
            IDictionary<DiagnosticAnalyzer, Task> taskMap,
            bool shouldExecuteSyntaxNodeActions,
            bool shouldExecuteCodeBlockActions,
            CancellationToken cancellationToken)
        {
            Debug.Assert(shouldExecuteSyntaxNodeActions || shouldExecuteCodeBlockActions);

            var symbol = symbolEvent.Symbol;
            SemanticModel semanticModel = symbolEvent.SemanticModel(decl);
            var declaringReferenceSyntax = decl.GetSyntax(cancellationToken);
            var syntax = semanticModel.GetTopmostNodeForDiagnosticAnalysis(symbol, declaringReferenceSyntax);

            // We only care about the top level symbol declaration and its immediate member declarations.
            int? levelsToCompute = 2;

            var declarationsInNode = semanticModel.GetDeclarationsInNode(syntax, getSymbol: syntax != declaringReferenceSyntax, cancellationToken: cancellationToken, levelsToCompute: levelsToCompute);

            // Execute stateless syntax node actions.
            if (shouldExecuteSyntaxNodeActions)
            {
                foreach (var analyzerAndActions in this.NodeActionsByKind)
                {
                    Action executeStatelessNodeActions = () =>
                        ExecuteStatelessNodeActions(analyzerAndActions.Value, syntax, symbol, declarationsInNode, semanticModel,
                            _getKind, analyzerExecutor);

                    AddAnalyzerActionsExecutor(taskMap, analyzerAndActions.Key, executeStatelessNodeActions, cancellationToken);
                }
            }

            // Execute code block actions.
            if (shouldExecuteCodeBlockActions)
            {
                // Compute the executable code blocks of interest.
                var executableCodeBlocks = ImmutableArray<SyntaxNode>.Empty;
                foreach (var declInNode in declarationsInNode)
                {
                    if (declInNode.DeclaredNode == syntax || declInNode.DeclaredNode == declaringReferenceSyntax)
                    {
                        executableCodeBlocks = declInNode.ExecutableCodeBlocks;
                        break;
                    }
                }

                if (executableCodeBlocks.Any())
                {
                    foreach (var analyzerAndActions in this.CodeBlockStartActionsByAnalyer)
                    {
                        Action executeCodeBlockActions = () =>
                        {
                            var codeBlockStartActions = analyzerAndActions.Value;
                            var codeBlockEndActions = this.CodeBlockEndActionsByAnalyer.ContainsKey(analyzerAndActions.Key) ?
                                this.CodeBlockEndActionsByAnalyer[analyzerAndActions.Key] :
                                ImmutableArray<CodeBlockEndAnalyzerAction>.Empty;

                            analyzerExecutor.ExecuteCodeBlockActions(codeBlockStartActions, codeBlockEndActions,
                                syntax, symbol, executableCodeBlocks, semanticModel, _getKind);
                        };

                        AddAnalyzerActionsExecutor(taskMap, analyzerAndActions.Key, executeCodeBlockActions, cancellationToken);
                    }

                    // Execute code block end actions for analyzers which don't have corresponding code block start actions.
                    foreach (var analyzerAndActions in this.CodeBlockEndActionsByAnalyer)
                    {
                        // skip analyzers executed above.
                        if (!CodeBlockStartActionsByAnalyer.ContainsKey(analyzerAndActions.Key))
                        {
                            Action executeCodeBlockActions = () =>
                            {
                                var codeBlockStartActions = ImmutableArray<CodeBlockStartAnalyzerAction<TLanguageKindEnum>>.Empty;
                                var codeBlockEndActions = analyzerAndActions.Value;

                                analyzerExecutor.ExecuteCodeBlockActions(codeBlockStartActions, codeBlockEndActions,
                                    syntax, symbol, executableCodeBlocks, semanticModel, _getKind);
                            };

                            AddAnalyzerActionsExecutor(taskMap, analyzerAndActions.Key, executeCodeBlockActions, cancellationToken);
                        }
                    }
                }
            }
        }

        private static void ExecuteStatelessNodeActions(
            IDictionary<TLanguageKindEnum, ImmutableArray<SyntaxNodeAnalyzerAction<TLanguageKindEnum>>> actionsByKind,
            SyntaxNode declaredNode,
            ISymbol declaredSymbol,
            IEnumerable<DeclarationInfo> declarationsInNode,
            SemanticModel semanticModel,
            Func<SyntaxNode, TLanguageKindEnum> getKind,
            AnalyzerExecutor analyzerExecutor)
        {
            // Eliminate syntax nodes for descendant member declarations within declarations.
            // There will be separate symbols declared for the members, hence we avoid duplicate syntax analysis by skipping these here.
            HashSet<SyntaxNode> descendantDeclsToSkip = null;
            bool first = true;
            foreach (var declInNode in declarationsInNode)
            {
                if (declInNode.DeclaredNode != declaredNode)
                {
                    // Might be a field declaration statement with multiple fields declared.
                    // If so, we execute syntax node analysis for entire field declaration (and its descendants)
                    // if we processing the first field and skip syntax actions for remaining fields in the declaration.
                    if (declInNode.DeclaredSymbol == declaredSymbol)
                    {
                        if (!first)
                        {
                            return;
                        }

                        break;
                    }

                    // Compute the topmost node representing the syntax declaration for the member that needs to be skipped.
                    var declarationNodeToSkip = declInNode.DeclaredNode;
                    var declaredSymbolOfDeclInNode = declInNode.DeclaredSymbol ?? semanticModel.GetDeclaredSymbol(declInNode.DeclaredNode, analyzerExecutor.CancellationToken);
                    if (declaredSymbolOfDeclInNode != null)
                    {
                        declarationNodeToSkip = semanticModel.GetTopmostNodeForDiagnosticAnalysis(declaredSymbolOfDeclInNode, declInNode.DeclaredNode);
                    }

                    descendantDeclsToSkip = descendantDeclsToSkip ?? new HashSet<SyntaxNode>();
                    descendantDeclsToSkip.Add(declarationNodeToSkip);
                }

                first = false;
            }

            var nodesToAnalyze = descendantDeclsToSkip == null ?
                declaredNode.DescendantNodesAndSelf(descendIntoTrivia: true) :
                declaredNode.DescendantNodesAndSelf(n => !descendantDeclsToSkip.Contains(n), descendIntoTrivia: true).Except(descendantDeclsToSkip);

            analyzerExecutor.ExecuteSyntaxNodeActions(nodesToAnalyze, actionsByKind, semanticModel, getKind);
        }
    }

    internal static class AnalyzerDriverResources
    {
        internal static string AnalyzerFailure => CodeAnalysisResources.CompilerAnalyzerFailure;
        internal static string AnalyzerThrows => CodeAnalysisResources.CompilerAnalyzerThrows;
        internal static string DiagnosticDescriptorThrows => CodeAnalysisResources.DiagnosticDescriptorThrows;
        internal static string ArgumentElementCannotBeNull => CodeAnalysisResources.ArgumentElementCannotBeNull;
        internal static string ArgumentCannotBeEmpty => CodeAnalysisResources.ArgumentCannotBeEmpty;
    }
}

redpajama_set_name: RedPajamaGithub


Our Client, a highly respected top tier Irish law firm, has an opportunity for an outstanding Capital Markets Lawyer to join their Capital Markets Group in their Dublin office.
Advising on a full range of capital markets, structured finance, cross-border financing and related issues.
Advising on a broad range of debt capital markets transactions including corporate and high-yield bonds, medium term note and commercial paper programmes.
Advising international lenders and Irish borrowers on cross border financing transactions and asset backed lending.
If you are a finance lawyer with NQ - 5 years PQE from a leading or boutique finance law firm in Ireland or overseas, then our client would love to meet you.
This is a truly exceptional opportunity to join a dynamic, driven team of experts in the field of finance and capital markets.
An excellent package is on offer for the right person.


Sterilization is the process that eliminates or destroys all forms of microbial life and transmissible agents such as spores and viruses; this is achieved through drastic methods such as use of high temperature, chemicals, filtration or by radiation. Sterilization destroys all surface microorganisms present on an article or in fluids to prevent spread of disease when such article or fluid come in contact with user. In medical field, sterilization is given utmost importance because, every year thousands of patients die or have to extend their stay at hospitals due to spread of infection from medical equipments that are not sterilized properly. Heat sterilization through use of steam has been the preferred method of sterilization in healthcare settings as most of the materials used are heat stable, however, due to improvement in technology and increasing complexity of instruments more devices are made of materials that are heat sensitive and many other modalities of sterilization such as low-temperature, filtration and radiation are being adopted to address this concern. Advanced technologies such as Supercritical Carbon-dioxide, pulsed electrical field sterilization and microwave energy sterilization are being introduced to address the increasing concern of ensuring sterilization in healthcare facilities. As estimated by IQ4I Research, the sterilization global market is estimated to grow at high single digit CAGR to reach $8,438.2 million by 2024.
Factors such as rise in incidences of hospital acquired infections (HAIs), number of surgeries performed are driving sterilization market growth. In addition, use of e-beam radiation sterilization through contract sterilization industry, advancements in technologies such as use of gas plasma, use of NO2, peracetic acid sterilization, e-beam, supercritical CO2, and improving healthcare infrastructure are providing new opportunities for growth to sterilization market. However, high cost of sterilization technology and capital expenditure to setup new facility and issues with handling of ethylene oxide is restraining market expansion. stringent regulations for ensuring sterilization and validation of sterile filtration methods and popularity of single-use products is threatening the market growth.
Based on Products, the sterilization global market is segmented into equipments, consumables and services where equipment market held the largest market revenue. However, increasing trend of outsourcing of the sterilization process to professional companies is driving services market to grow at high single digit CAGR from 2017 to 2024.
The equipments market is further segmented into, Heat, low-temperature, filtration and radiation sterilization equipments. Among which, heat sterilization segment commanded the largest share of in 2017 as heat sterilization is still the most preferred and affordable sterilization method and this market is projected to grow at high single digit CAGR from 2017 to 2024. However, due to increasing complexity of the instruments and advancement in materials used to manufacture surgical instrument and medical devices, low-temperature sterilization is expect to grow at high single digit CAGR from 2017 to 2024.
Heat sterilization is further segmented into moist heat and dry heat, where, moist heat commanded the largest share in 2017 and is the fastest growing segment. Similarly, In low-temperature sterilization, Ethylene oxide sterilization commanded the largest share in 2017 and is projected to grow at double digit CAGR from 2017 to 2024 due to high penetration of ethylene oxide to achieve sterilization even in finished products. Likewise, in radiation sterilization, ionizing radiation commanded the largest share in 2017.
In the sterilization consumables market, Sterility monitor segment commanded the largest share and is the fastest growing segment with projected mid single digit CAGR from 2017 to 2024. In the sterilization services market, the contract sterilization services commanded the largest share in 2017 it is projected to grow at double digit CAGR from 2017 to 2024 due to stringent sterilization requirement and high cost to setup new facilities.
In the sterilization end-user market, Hospitals market accounted largest share in 2017 and medical devices market is the fastest growing segment with projected high single digit CAGR from 2017 to 2024 due to stringent sterility requirements from regulatory agencies.
Technological advancements such as introduction of super critical carbon dioxide and ultrasonic sterilization where sound waves are used to clean surgical and dental instruments is expected the drive the market growth. Contract sterilization is emerging as the new trend in the market, where, existing equipment manufacturing companies are consolidation their competitive position by acquisitions, for instance, acquisition of Sterifast a Portuguese low temperature sterilization specialist by Belimed. Similarly, Sotera (Sterigenics) acquired Nelson Labs which provide sterilization validation services.
The geography market is divided into North America, Europe, Asia-Pacific and Rest of the world where North America region commanded the largest revenue in 2017. Presence of major medical device manufacturing companies and increase in the aging population are the major driving factors. However, Asia-Pacific region is expected to grow at highest CAGR from 2017 to 2024 due to increased public awareness and number of surgeries performed is driving the market growth.
Some of the other players in the sterilization market are Anderson Products, Inc (U.S.), Primus Sterilizer company (U.S.), Steri-tek (U.S.), ETC sterilization (U.S.), Sterile technologies, Inc (U.S.), Aseptico, Inc (U.S.), Medline Industries (U.S.), Sterlitech Corp (U.S.), Burkert (U.S.), Parket Hannifin Corp (U.S.), Apoza Enterprise Co. Ltd (Taiwan), St. Francis Medical Equipment Co. Ltd (Taiwan), Tex Year Industries, Inc (Taiwan), Rexmed Industries (Taiwan), Melag (Germany), TZMOI (Russia), Cisa (Italy), Fedegari S.p.A (Italy), Astell Scientific (U.K.), Anderson Products (U.S.), Steelco (Italy), DGM (Switzerland), Systec GmbH (Germany), Sakura (Japan), Renosem (Korea), Fountain Medical Equipments (Taiwan), De Lama (Italy), Consteril (U.S.), BMT Medical (Czech Republic), Hospisteril (South Africa), Echung Machinery (Taiwan), Yenchen Machinery (Taiwan), Fountain Medical Equipments (Taiwan), Equs (Taiwan), Eryigit Medical Devices Inc. (Turkey), Fona (Slovak Republic), Prohs (Portugal), Elektro-Mag (Turkey), Biobase (China), Runyes (Korea), Inoxtorres (Spain), Telstar (Spain) and MAAN (Sweden).


Inspirational Luxury Black And Gold Collection Also Charming Bedroom Decor Black And Gold Bedroom Decor Pics - The image above with the title Inspirational Luxury Black And Gold Collection Also Charming Bedroom Decor Black And Gold Bedroom Decor Pics, is part of Black And Gold Bedroom Decor picture gallery. Size for this image is 640 × 484, a part of Bedroom Designs category and tagged with black and gold bedroom decor, black and gold bedroom images, black and gold bedroom decorating ideas, black and gold bedroom wall decor, black and gold bedroom pictures published March 25th, 2018 09:43:37 AM by admrenv. Find or search for images related to "Inspirational Luxury Black And Gold Collection Also Charming Bedroom Decor Black And Gold Bedroom Decor Pics" in another posts. Back to: Black And Gold Bedroom Decor.


Emilio Pinedo was born in Mexico City. In 2010 he moved to Panama City where he was emerged into the world of photography. In Panama, Emilio took any opportunity he had to shoot, edit, and develop his creativity. In 2013 Emilio attended a summer program on film and directing. Here, he got the opportunity to write and direct 2 short films, as well as help in 8 others. He then moved back to Mexico and started working doing commercials and advertisements. Emilio then moved to Boston, where he is currently taking classes on photography, international affairs and media design. He plans to spend his summer traveling, reading and working on his photography.


In 2006, late-night American talk shows were completely unknowable to UK audiences. Like Oreos or cereal made with lard and marshmallows, it was a U.S-only institution that we could never hope to understand or enjoy.
But a lot's changed in the past decade. Oreos are now the most popular biscuit (don't @ us) in Britain; US cereals can now be purchased from any extortionate sweet shop, and we all waste the majority of our days binge-watching late night celeb-packed talk shows on YouTube.
And if we were to choose our favourite, it would have to be Jimmy Fallon – if just because he has the worst fake laugh in history, and he cracks it out every 0.3 seconds.


Available Monday – Thursday only.
• Beautiful 5 acre estate.
• Choice of ceremony locations.
• Private portrait session for bride and groom, ceremony coverage.
• $100 online credit for ordering custom lab prints, photo albums, canvas prints, etc.


The Psychology of "The Room," "The Disaster Artist" and a breakdown of the mind of Tommy Wisseau by two psychotherapists, Michael Drane, and Kirk Honda. Humberto and I joined these two at the Psychology in Seattle Podcast Studio to record a recap and commentary of both movies, as well as the curious mind of one Tommy Wisseau. Let us know what you thought of this episode and the movies!


OK, SO HERE I AM, sitting excessive up in the bleachers within the Stephens C. 'Connell Center arena at the University of Florida (GO GATORS) in Gainesville, FL watching the primary graduating senior stroll up the stairs to the stage in order to take their Walk; thus marking the completion of many years of arduous work main one of the singular achievements in a young individuals life. Dale developed a job description, budget, enterprise plan, and work plan to help his proposed place. There is a course of that you may go via with the business owner (or Business Broker if one is involved) that may establish the true earnings and money move of the business. ECPI University's program is designed to blend fashionable enterprise concept with real-world purposes, while providing particular emphasis on rising expertise.
According to their web site, the SBA is an independent company of the federal authorities to help, counsel, help and defend the pursuits of small business considerations, to protect free aggressive enterprise and to take care of and strengthen the general financial system of our nation. Students must notify Medicine Hat College of the program main changes by filling out the Program Major Change form.
Many extra-curricular organizations are related to this program, including Delta Sigma Pi, the skilled enterprise fraternity; Phi Alpha Delta, a pre-regulation fraternity; Toastmasters International; and the Elite Student Board. Business administration is a perform of organizational construction, the specified system of task allocation, coordination and supervision. Graduate Management Association of Australia carries out scores for Australian MBAs and yearly publishes Australian MBA Star Ratings.
Students actively registered in cohort delivered programs who take longer than the designed program size of time to complete their studies are accountable for completing any new or extra courses that may consequence resulting from modifications in the program of study. In this way, furthermore to accepting a unbelievable instruction from one among the country's head faculties, USD understudies square measure inundated in partner degree setting that is dedicated to making adjustment on a world scale. Andrew Tiger's research and instructing areas are in analytics and sensible administration science.
I'm not a tax accountant, but I have been an accountant at a non-profit agency since 1999, and earned my Bachelor's Degree in Business Administration with an emphasis in Accounting, so I've acquired the background that can assist you get started. There at the moment are three credentials that permit you to progress from a certificates to a diploma to an utilized diploma.


text:
HomeFASHIONNewsMore than the colour of my skin, it was about the relationship of my parents: Designer Masaba Gupta on bullying and racial discrimination
More than the colour of my skin, it was about the relationship of my parents: Designer Masaba Gupta on bullying and racial discrimination
By Malvika Mistry
on November 25, 2020 01:12:08 PM
Seems like it will take more than dropping 'fair' from a beauty product to fight racism in our country. The change has to come within, from society. Amidst the racism debate that has been going on for a while now, many of our B-town celebs opened up on the discrimination that they've faced for their skin colour. Recently Shah Rukh Khan's daughter Suhana Khan addressed the trolls that were targeted on her skin tone and shut them down, once and for all. Now, designer-actor Masaba Gupta opened up on her experiences of racism, bullying, and discrimination. Though she calls out the fat-shaming bullies and takes the social media trolls head-on, there was a time when she had been subjected to racism in her childhood.
Born to West Indian Cricketer Vivian Richards and Veteran actress Neena Gupta, Masaba was bullied because of her dark skin colour and diverse parents. In an interview with a leading daily, the designer said that this affected her as a child. "It was reactions of friends and acquaintances, people who you thought had your back that affected me. A friend of mine brought up the colour of my skin every time I asked her about what to wear, what subject to study or what sport I should play. I thought it was bizarre. However, more than the colour of my skin, it was about the relationship of my parents. I remember being called a b*stard child a lot. Lots of boys in my school will ask 'is she the ba**ard?' I didn't understand what it meant and I went and asked my mother when I was young and she explained it to me by the book. She said this is what it means and be prepared to get more of this," said Masaba.
A post shared by Masaba (@masabagupta)
Recommended Read: Today I see Kamala Harris and I know different is so good: Masaba Gupta congratulates the Vice President-elect of the US
Recalling the horrific incidents of racism, body-shaming and bullying, the designer shared yet another incident. " I played professional tennis in school and I was permitted to come late to the class as I was playing for the state. The boys in the class will open my bag, take out my underwear and toss it around. They would make fun of my shorts because I was a bigger girl. They would be like 'is it all black inside from the colour of her skin'. You think you outgrow it but you don't," she concluded.
However, the designer turned actress is quite successful at what she does and promotes body positivity with her designs and social media posts. She recently penned a heartfelt note on her ethnicity while congratulating US Vice President Kamala Harris. On the work front, the designer has also forayed into the acting arena with Netflix's slice of lime series 'Masaba Masaba' alongside actress-mother Neena and we can't wait for its season 2 already!
(Source- Spotboye)
BFF Kunal Rawal to design groom Varun Dhawan for actor's reported wedding; Manish Malhotra to dress up the Dhawan clan
Always believed you have to be a certain height, skin colour to be a star: Designer-actress Masaba Gupta on her preconceived notions about showbiz
The error was unintentional: Australian brand Zimmermann issues apology after being accused of plagiarism and cultural appropriation
Most of the negative comments were by women: Housewife-turned-Malayalam actress Rajini Chandy on getting trolled for 'sexy' photoshoot
Expanding his domain in the digital horizon, designer Manish Malhotra launches his virtual store

redpajama_set_name: RedPajamaCommonCrawl


text:
Tootsie Roll Industries (NYSE:TR) Seasonal Chart
TR Relative to the S&P 500
TR Relative to the Sector
% of Free Cash Flow Generated in Each Quarter
Analysis of the Tootsie Roll Industries (NYSE:TR) seasonal charts above shows that a Buy Date of January 8 and a Sell Date of April 15 has resulted in a geometric average return of 2.86% above the benchmark rate of the S&P 500 Total Return Index over the past 20 years. This seasonal timeframe has shown positive results compared to the benchmark in 14 of those periods. This is a good rate of success and the return strongly outperforms the relative buy-and-hold performance of the stock over the past 20 years by an average of 8.56% per year.
The seasonal timeframe correlates Poorly with the period of seasonal strength for the Consumer Staples sector, which runs from April 25 to November 23. The seasonal chart for the broad sector is available via the following link: Consumer Staples Sector Seasonal Chart.
Tootsie Roll Industries Inc manufactures and sells candy products. Notable varieties include Tootsie Roll and Tootsie Pops, Charms, Blow-Pops, Dots, Junior Mints, Sugar Daddy and Sugar Babies, Andes, Dubble Bubble, and Razzles. The company sells its products to wholesale distributors and directly to retail stores. Geographically, it generates a majority of its revenue from the United States.
To download TR seasonal chart data, please log in or Subscribe.
Stocks mentioned in this post: TR


A person who first saw my new bathroom remodel said to me: This looks like what you get in a premium priced hotel suite. The speaker makes his living evaluation premium hotel suites at hotels around the world!
From a more provincial viewpoint I will throw my own two cents in. You folks did what you promised-on time- on budget- and with comforting attention to the client's foibles.
Thanks for such a splendid effort. I would recommend you for any such job.


text:
Chapters One and Two
Chapters Three and Four
Chapters Five–Seven
Chapters Eight and Nine
Chapters Ten and Eleven
Chapters Twelve and Thirteen
Chapters Fourteen–Sixteen
Stingo
Sophie Zawistowska
Nathan Landau
William Styron and Sophie's Choice Background
Music appears as a motif that creates a juxtaposition between how humanity can be capable of creating beauty while simultaneously committing mass atrocities. Music has always been a passion and an integral part of Sophie's life, and she references music often when talking about her past in Europe. In New York, the music that Sophie plays in her room continues this motif and represents one of the few forms of continuity between her past and her new life in America. Even at her darkest moments, such as when Sophie is living in the Hoss household or as she prepares to commit suicide with Nathan, she is surrounded by music either by chance or by choice. Her love of music reveals that even after everything she has lived through, she has not entirely lost her capacity to admire beauty and creativity. Still, the motif of music suggests that art is insufficient to fully save anyone, even if it can provide some small comfort.
Suicide is a motif that highlights the impossibility of escaping the past and the futility of love when someone is tormented. Stingo loses three characters he loves to suicide over the course of the novel: Maria Hunt, Sophie, and Nathan. In some way, Stingo has fantasized about saving each of these individuals, and wanted to believe he could offer them a happy future. However, each of these characters was tormented by events of the past, and none of them was ultimately able to move forward. Their various tragedies (an abusive family, the horrors of the Holocaust, and mental illness) were far beyond what Stingo could help with. Even for someone like Sophie who had survived against all odds, the prospect of having to live with feelings resulting from past pain proved to be too much. Nothing Stingo could offer her for the future could take away the pain and suffering of her past, and only the oblivion of death seemed to promise relief.
Alcohol is a significant motif, reflecting how many characters have a desire for escapism and need a way to cope with their pain. When they are together, Nathan, Sophie, and Stingo all drink heavily. They use alcohol to lighten the mood and help them feel like they are having a good time, but in reality, all of them are using alcohol to hide from truths they don't want to admit to themselves or to others. Stingo drinks to cope with his insecurity and his unrequited love for Sophie; Nathan drinks to cope with his rage and suppress symptoms of mental illness; and Sophie drinks to try to forget her painful past. Later in the novel, Sophie switches to openly using alcohol as a coping mechanism when she begins to share some of the more horrifying details of her past with Stingo. Before she begins to tell him the story of how she was forced to choose between her children, she insists that she have a drink. Stingo also drinks copiously on the day he attends the funeral of Nathan and Sophie. In a novel where many characters are keeping secrets and trying to outrun their past, alcohol functions as a crutch that they use in their desperate attempts to drown out the suffering they are experiencing.
Popular pages: Sophie's Choice
Stingo: Character Analysis CHARACTERS


We at Nuline Windows are expert in providing high quality bifold doors, bifolding windows, aluminium bifolding doors, aluminium windows and a premium glazing system. At Nuline Windows, we believe in quality in everything we do. Our wide and extensive range of services includes aluminium windows, bi-folding windows, aluminium doors, glass bi-folding doors, slider doors and stacker doors. Our customers have rated us as highly responsive as we relentlessly pursue excellence in everything we do.


Genuine Samsung USB-C cable with Reversible Connector you can charge and sync your new Android phone to retain speedy speeds, high power output, and always a reliable charge.
I've bought other USB-C cables before but they worked just for charging. These work for data transfer too! Great quality and price!
Only a simple product, but does what is required at a good price. Also delivered quickly.


Storyline: In a seedy bar in a town ravaged by war, mysterious businessman Hunt hires ex-marine D.C. to assemble a crack team of ex-soldiers to protect him on a dangerous journey into no-man's land. To this gang of hardened warriors, battle-worn veterans and borderline criminals killing is just a job - and one they enjoy. Their mission - to scope out an old military bunker. It should be easy - 48 hours at the most. Lots of cash for little risk, or so he says. Once at the outpost, the men make a horrific discovery that turns their mission on its head - the scene of a bloody and gruesome series of experiments, carried out by the Nazis on their own soldiers during WWII. Amid the carnage, they find something even more disturbing - someone who's still alive.


price of 30 40 tph mobile crushing plant; ... Great WallHow much is stone crusher price in crushing plant Zimbabwe?The delivery time of stone jaw crusher is aboutworking days after payingin case it is not the fixed crushing place, then mobile crusher plant will take into account.
Price Of 30 40 Tph Mobile Crushing Plant: Price Of 30 40 Tph Mobile Crushing Plant Crushing equipment for aggregates, ARJA We supply the latest technologies in stone crushers, jaw crushers, screens, conveyor belts and washing plants, either i.
stone crusher zenith kap 40 tph mobile. Flotation Machine With the development of mining industry, investors present various requirements of the features of flotation machine.
cost of 80 tph stone crusher plant … price of 3040 TPH Mobile Crushing … to Match up Aggregate Quality as per MOST Specification Mobile … 100 TPH Crushing … MOBILE STONE CRUSHER PLANT 7580 SPECIFICATION.
stone crushing plant with capacity 40 60 tph stone crusher plant 40 tph capacity made in … 500 tph stone crusher price in india, is zenith made excellent, 510tph stone crushing plant, zenith stone crushing plant with capacity 40 60 TPH contains PE .
Jun 05, 2018· Price Of Stone Crushers 40tp H – price of stone crushers 40tph – ore crusher plant. 40 TPH Stone crushing plant of different scale Previous . 50t 2fh crushing plant price use of crushed sand in.
3040 tph stone crusher plant in India Tanzania Crusher. ... 40 tph crusher plant price in india 2013Price Of Trf 250tph Mobile Crushing And Screening PlantTRF 250tph Mobile Crushing and Screening Plant This.
40 tph crusher prices. 200 Tph Stone Crusher Plant zenith Heavy … 200 tph stone crusher plant General crusher crushing ratio does not exceed 10, and 200 tph stone crusher plant crushing than is generally 3040, up to 150.


G House Guesthouse Jongno, located in Gangbuk, Seoul, is a popular choice for travelers. From here, guests can enjoy easy access to all that the lively city has to offer. With its convenient location, the hotel offers easy access to the city's must-see destinations.
G House Guesthouse Jongno also offers many facilities to enrich your stay in Seoul. Guests of the hotel can enjoy on-site features like free Wi-Fi in all rooms, Wi-Fi in public areas, meeting facilities, BBQ facilities, shared lounge/TV area.
In addition, all guestrooms feature a variety of comforts. Many rooms even provide internet access – wireless, air conditioning, heating, television, satellite/cable TV to please the most discerning guest. Besides, the hotel's host of recreational offerings ensures you have plenty to do during your stay. G House Guesthouse Jongno is a smart choice for travelers to Seoul, offering a relaxed and hassle-free stay every time.
Click here for more information about G House Guesthouse Jongno location,customer reviews and how to book.


text:
Frans Francken der Jüngere (* 1581 in Antwerpen; † 6. Mai 1642 ebenda) war ein flämischer Maler und Zeichner des Barock. Er war das bekannteste und künstlerisch begabteste Mitglied der Malerfamilie Francken. Er war zunächst Schüler seines Vaters Frans I Francken , einem Schüler von Frans Floris. 1605 erfolgte die Freisprechung zum Meister. 1614/15 wurde er Dekan der Lukasgilde. Sein Sohn Frans III Francken (1607–1667) war ebenfalls Kunstmaler.

Sein Œuvre umfasst Allegorien, Kabinettbilder, Historienmalerei, Genredarstellungen, Stillleben, Kunstkammerbilder (Cabinet d'Amateur), Altarbilder und Bildergalerien. Francken II. wird sowohl die Etablierung der Kunstkammerbildergattung als auch der Genredarstellungen mit Affen zugeschrieben; beide wurden fortan in der flämischen Malerei populär. Charakteristisch sind die betonten Augensterne seiner Figuren. Häufig wiederholt er bestimmte Merkmale seiner Typen.

Werke (Auswahl)

Die Versuchung des Hl. Antonius, 1605
Die Bergpredigt, 1606. Das Gemälde war von den Nationalsozialisten für den Sonderauftrag Linz vorgesehen und wurde zum Restitutionsgut
Gastmahl im Hause des Bürgermeisters Rockox, um 1630/35, Alte Pinakothek
Die Großmut des Scipio, Öl auf Holz, 53 × 78 cm, 1634
Die Krönung Mariens (Werkstatt), Öl auf Holz, 64 × 48 cm
Ecce Homo,  Öl auf Holz, 29 × 35,5 cm
Ecce Homo, Öl auf Holz, 41 × 37 cm
Mit Hieronymus Francken III.: Triumphzug des Bacchus, Öl auf Holz, 50,2 × 74 cm
Verspottung Christi (Werkstatt), umrahmende Grisaillemalerei und Öl auf Kupfer, 35,5 × 28 cm.
Anbetung der Könige (zugeschrieben), Öl auf Kupfer, 35,5 × 29,5 cm,
Gefangennahme Christi,  Öl auf Eichenholz, 30 × 24 cm,
Das Gastmahl des Belsazar, Öl auf Holz, parkettiert, 74,5 × 107 cm,
Die Heilige Veronika, die dem kreuztragenden Christus das Schweißtuch reicht, Öl auf Holz, 49,5 × 64 cm
Huldigung an die Göttin Mephites, Öl auf Holz, parkettiert, 54 × 75 cm
Das Gastmahl (Werkstatt), Öl auf Kupfer, 36 × 44 cm
Hochzeit zu Kanaa,  Öl auf Holz, parkettiert, 44,4 × 61 cm.
Virgil im Korb, Öl auf Kupfer, 49 × 65 cm
Der Judaskuss (zugeschr.), 16,5 × 13 cm
Kalvarienberg (Umkreis), Öl auf Kupfer, 24,5 × 20 cm
Apollo unter den Musen, Öl auf Holz, 31 × 63,5 cm

Siehe auch
Liste flämischer Maler

Literatur
 Ursula Härting: Studien zur Kabinettbildmalerei des Frans Francken II. Ein repräsentativer Werkkatalog. (Studien zur Kunstgeschichte; 21). Hildesheim 1983, ISBN 978-3-487-07279-1 (zgl. Diss. Rheinische Friedrich-Wilhelms-Universität Bonn)
 Hans Vlieghe: Flemish Art and Architecture, 1585–1700. (Pelican History of Art). Yale University Press, New Haven 1998, ISBN 0-300-07038-1 (Auszüge bei Google Books)
 Kia Vahland: Die Bergpredigt aus Zelle 6. In München tauchte ein Meisterwerk auf, das Hildebrand Gurlitt 1943 Hitler verkaufte. In: Süddeutsche Zeitung, 12. Juli 2014

Weblinks

 artcyclopedia.com Überblick der Werke nach Sammlungen
 Werke im Kunsthistorischen Museum Wien

Einzelnachweise

Flämischer Maler
Maler des Barock
Historienmaler
Künstler (Antwerpen)
Stilllebenmaler
Geboren 1581
Gestorben 1642
Mann

redpajama_set_name: RedPajamaWikipedia


text:
/**
 * @fileoverview
 * @enhanceable
 * @public
 */
// GENERATED CODE -- DO NOT EDIT!

goog.provide('proto.tensorflow.tfprof.OptionsProto');

goog.require('jspb.Message');
goog.require('jspb.BinaryReader');
goog.require('jspb.BinaryWriter');

/**
 * Generated by JsPbCodeGenerator.
 * @param {Array=} opt_data Optional initial data array, typically from a
 * server response, or constructed directly in Javascript. The array is used
 * in place and becomes part of the constructed object. It is not cloned.
 * If no data is provided, the constructed object will be empty, but still
 * valid.
 * @extends {jspb.Message}
 * @constructor
 */
proto.tensorflow.tfprof.OptionsProto = function(opt_data) {
  jspb.Message.initialize(this, opt_data, 0, -1, proto.tensorflow.tfprof.OptionsProto.repeatedFields_, null);
};
goog.inherits(proto.tensorflow.tfprof.OptionsProto, jspb.Message);
if (goog.DEBUG && !COMPILED) {
  proto.tensorflow.tfprof.OptionsProto.displayName = 'proto.tensorflow.tfprof.OptionsProto';
}
/**
 * List of repeated fields within this message type.
 * @private {!Array<number>}
 * @const
 */
proto.tensorflow.tfprof.OptionsProto.repeatedFields_ = [8,9,10,11,12,14];

if (jspb.Message.GENERATE_TO_OBJECT) {
/**
 * Creates an object representation of this proto suitable for use in Soy templates.
 * Field names that are reserved in JavaScript and will be renamed to pb_name.
 * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
 * For the list of reserved names please see:
 *     com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS.
 * @param {boolean=} opt_includeInstance Whether to include the JSPB instance
 *     for transitional soy proto support: http://goto/soy-param-migration
 * @return {!Object}
 */
proto.tensorflow.tfprof.OptionsProto.prototype.toObject = function(opt_includeInstance) {
  return proto.tensorflow.tfprof.OptionsProto.toObject(opt_includeInstance, this);
};

/**
 * Static version of the {@see toObject} method.
 * @param {boolean|undefined} includeInstance Whether to include the JSPB
 *     instance for transitional soy proto support:
 *     http://goto/soy-param-migration
 * @param {!proto.tensorflow.tfprof.OptionsProto} msg The msg instance to transform.
 * @return {!Object}
 */
proto.tensorflow.tfprof.OptionsProto.toObject = function(includeInstance, msg) {
  var f, obj = {
    maxDepth: jspb.Message.getField(msg, 1),
    minBytes: jspb.Message.getField(msg, 2),
    minMicros: jspb.Message.getField(msg, 3),
    minParams: jspb.Message.getField(msg, 4),
    minFloatOps: jspb.Message.getField(msg, 5),
    minOccurrence: jspb.Message.getField(msg, 17),
    orderBy: jspb.Message.getField(msg, 7),
    accountTypeRegexesList: jspb.Message.getField(msg, 8),
    startNameRegexesList: jspb.Message.getField(msg, 9),
    trimNameRegexesList: jspb.Message.getField(msg, 10),
    showNameRegexesList: jspb.Message.getField(msg, 11),
    hideNameRegexesList: jspb.Message.getField(msg, 12),
    accountDisplayedOpOnly: jspb.Message.getField(msg, 13),
    selectList: jspb.Message.getField(msg, 14),
    output: jspb.Message.getField(msg, 15),
    dumpToFile: jspb.Message.getField(msg, 16)
  };

  if (includeInstance) {
    obj.$jspbMessageInstance = msg;
  }
  return obj;
};
}

/**
 * Deserializes binary data (in protobuf wire format).
 * @param {jspb.ByteSource} bytes The bytes to deserialize.
 * @return {!proto.tensorflow.tfprof.OptionsProto}
 */
proto.tensorflow.tfprof.OptionsProto.deserializeBinary = function(bytes) {
  var reader = new jspb.BinaryReader(bytes);
  var msg = new proto.tensorflow.tfprof.OptionsProto;
  return proto.tensorflow.tfprof.OptionsProto.deserializeBinaryFromReader(msg, reader);
};

/**
 * Deserializes binary data (in protobuf wire format) from the
 * given reader into the given message object.
 * @param {!proto.tensorflow.tfprof.OptionsProto} msg The message object to deserialize into.
 * @param {!jspb.BinaryReader} reader The BinaryReader to use.
 * @return {!proto.tensorflow.tfprof.OptionsProto}
 */
proto.tensorflow.tfprof.OptionsProto.deserializeBinaryFromReader = function(msg, reader) {
  while (reader.nextField()) {
    if (reader.isEndGroup()) {
      break;
    }
    var field = reader.getFieldNumber();
    switch (field) {
    case 1:
      var value = /** @type {number} */ (reader.readInt64());
      msg.setMaxDepth(value);
      break;
    case 2:
      var value = /** @type {number} */ (reader.readInt64());
      msg.setMinBytes(value);
      break;
    case 3:
      var value = /** @type {number} */ (reader.readInt64());
      msg.setMinMicros(value);
      break;
    case 4:
      var value = /** @type {number} */ (reader.readInt64());
      msg.setMinParams(value);
      break;
    case 5:
      var value = /** @type {number} */ (reader.readInt64());
      msg.setMinFloatOps(value);
      break;
    case 17:
      var value = /** @type {number} */ (reader.readInt64());
      msg.setMinOccurrence(value);
      break;
    case 7:
      var value = /** @type {string} */ (reader.readString());
      msg.setOrderBy(value);
      break;
    case 8:
      var value = /** @type {string} */ (reader.readString());
      msg.addAccountTypeRegexes(value);
      break;
    case 9:
      var value = /** @type {string} */ (reader.readString());
      msg.addStartNameRegexes(value);
      break;
    case 10:
      var value = /** @type {string} */ (reader.readString());
      msg.addTrimNameRegexes(value);
      break;
    case 11:
      var value = /** @type {string} */ (reader.readString());
      msg.addShowNameRegexes(value);
      break;
    case 12:
      var value = /** @type {string} */ (reader.readString());
      msg.addHideNameRegexes(value);
      break;
    case 13:
      var value = /** @type {boolean} */ (reader.readBool());
      msg.setAccountDisplayedOpOnly(value);
      break;
    case 14:
      var value = /** @type {string} */ (reader.readString());
      msg.addSelect(value);
      break;
    case 15:
      var value = /** @type {string} */ (reader.readString());
      msg.setOutput(value);
      break;
    case 16:
      var value = /** @type {string} */ (reader.readString());
      msg.setDumpToFile(value);
      break;
    default:
      reader.skipField();
      break;
    }
  }
  return msg;
};

/**
 * Serializes the message to binary data (in protobuf wire format).
 * @return {!Uint8Array}
 */
proto.tensorflow.tfprof.OptionsProto.prototype.serializeBinary = function() {
  var writer = new jspb.BinaryWriter();
  proto.tensorflow.tfprof.OptionsProto.serializeBinaryToWriter(this, writer);
  return writer.getResultBuffer();
};

/**
 * Serializes the given message to binary data (in protobuf wire
 * format), writing to the given BinaryWriter.
 * @param {!proto.tensorflow.tfprof.OptionsProto} message
 * @param {!jspb.BinaryWriter} writer
 */
proto.tensorflow.tfprof.OptionsProto.serializeBinaryToWriter = function(message, writer) {
  var f = undefined;
  f = /** @type {number} */ (jspb.Message.getField(message, 1));
  if (f != null) {
    writer.writeInt64(
      1,
      f
    );
  }
  f = /** @type {number} */ (jspb.Message.getField(message, 2));
  if (f != null) {
    writer.writeInt64(
      2,
      f
    );
  }
  f = /** @type {number} */ (jspb.Message.getField(message, 3));
  if (f != null) {
    writer.writeInt64(
      3,
      f
    );
  }
  f = /** @type {number} */ (jspb.Message.getField(message, 4));
  if (f != null) {
    writer.writeInt64(
      4,
      f
    );
  }
  f = /** @type {number} */ (jspb.Message.getField(message, 5));
  if (f != null) {
    writer.writeInt64(
      5,
      f
    );
  }
  f = /** @type {number} */ (jspb.Message.getField(message, 17));
  if (f != null) {
    writer.writeInt64(
      17,
      f
    );
  }
  f = /** @type {string} */ (jspb.Message.getField(message, 7));
  if (f != null) {
    writer.writeString(
      7,
      f
    );
  }
  f = message.getAccountTypeRegexesList();
  if (f.length > 0) {
    writer.writeRepeatedString(
      8,
      f
    );
  }
  f = message.getStartNameRegexesList();
  if (f.length > 0) {
    writer.writeRepeatedString(
      9,
      f
    );
  }
  f = message.getTrimNameRegexesList();
  if (f.length > 0) {
    writer.writeRepeatedString(
      10,
      f
    );
  }
  f = message.getShowNameRegexesList();
  if (f.length > 0) {
    writer.writeRepeatedString(
      11,
      f
    );
  }
  f = message.getHideNameRegexesList();
  if (f.length > 0) {
    writer.writeRepeatedString(
      12,
      f
    );
  }
  f = /** @type {boolean} */ (jspb.Message.getField(message, 13));
  if (f != null) {
    writer.writeBool(
      13,
      f
    );
  }
  f = message.getSelectList();
  if (f.length > 0) {
    writer.writeRepeatedString(
      14,
      f
    );
  }
  f = /** @type {string} */ (jspb.Message.getField(message, 15));
  if (f != null) {
    writer.writeString(
      15,
      f
    );
  }
  f = /** @type {string} */ (jspb.Message.getField(message, 16));
  if (f != null) {
    writer.writeString(
      16,
      f
    );
  }
};

/**
 * optional int64 max_depth = 1;
 * @return {number}
 */
proto.tensorflow.tfprof.OptionsProto.prototype.getMaxDepth = function() {
  return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0));
};

/** @param {number} value */
proto.tensorflow.tfprof.OptionsProto.prototype.setMaxDepth = function(value) {
  jspb.Message.setField(this, 1, value);
};

proto.tensorflow.tfprof.OptionsProto.prototype.clearMaxDepth = function() {
  jspb.Message.setField(this, 1, undefined);
};

/**
 * Returns whether this field is set.
 * @return {!boolean}
 */
proto.tensorflow.tfprof.OptionsProto.prototype.hasMaxDepth = function() {
  return jspb.Message.getField(this, 1) != null;
};

/**
 * optional int64 min_bytes = 2;
 * @return {number}
 */
proto.tensorflow.tfprof.OptionsProto.prototype.getMinBytes = function() {
  return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0));
};

/** @param {number} value */
proto.tensorflow.tfprof.OptionsProto.prototype.setMinBytes = function(value) {
  jspb.Message.setField(this, 2, value);
};

proto.tensorflow.tfprof.OptionsProto.prototype.clearMinBytes = function() {
  jspb.Message.setField(this, 2, undefined);
};

/**
 * Returns whether this field is set.
 * @return {!boolean}
 */
proto.tensorflow.tfprof.OptionsProto.prototype.hasMinBytes = function() {
  return jspb.Message.getField(this, 2) != null;
};

/**
 * optional int64 min_micros = 3;
 * @return {number}
 */
proto.tensorflow.tfprof.OptionsProto.prototype.getMinMicros = function() {
  return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0));
};

/** @param {number} value */
proto.tensorflow.tfprof.OptionsProto.prototype.setMinMicros = function(value) {
  jspb.Message.setField(this, 3, value);
};

proto.tensorflow.tfprof.OptionsProto.prototype.clearMinMicros = function() {
  jspb.Message.setField(this, 3, undefined);
};

/**
 * Returns whether this field is set.
 * @return {!boolean}
 */
proto.tensorflow.tfprof.OptionsProto.prototype.hasMinMicros = function() {
  return jspb.Message.getField(this, 3) != null;
};

/**
 * optional int64 min_params = 4;
 * @return {number}
 */
proto.tensorflow.tfprof.OptionsProto.prototype.getMinParams = function() {
  return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0));
};

/** @param {number} value */
proto.tensorflow.tfprof.OptionsProto.prototype.setMinParams = function(value) {
  jspb.Message.setField(this, 4, value);
};

proto.tensorflow.tfprof.OptionsProto.prototype.clearMinParams = function() {
  jspb.Message.setField(this, 4, undefined);
};

/**
 * Returns whether this field is set.
 * @return {!boolean}
 */
proto.tensorflow.tfprof.OptionsProto.prototype.hasMinParams = function() {
  return jspb.Message.getField(this, 4) != null;
};

/**
 * optional int64 min_float_ops = 5;
 * @return {number}
 */
proto.tensorflow.tfprof.OptionsProto.prototype.getMinFloatOps = function() {
  return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 5, 0));
};

/** @param {number} value */
proto.tensorflow.tfprof.OptionsProto.prototype.setMinFloatOps = function(value) {
  jspb.Message.setField(this, 5, value);
};

proto.tensorflow.tfprof.OptionsProto.prototype.clearMinFloatOps = function() {
  jspb.Message.setField(this, 5, undefined);
};

/**
 * Returns whether this field is set.
 * @return {!boolean}
 */
proto.tensorflow.tfprof.OptionsProto.prototype.hasMinFloatOps = function() {
  return jspb.Message.getField(this, 5) != null;
};

/**
 * optional int64 min_occurrence = 17;
 * @return {number}
 */
proto.tensorflow.tfprof.OptionsProto.prototype.getMinOccurrence = function() {
  return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 17, 0));
};

/** @param {number} value */
proto.tensorflow.tfprof.OptionsProto.prototype.setMinOccurrence = function(value) {
  jspb.Message.setField(this, 17, value);
};

proto.tensorflow.tfprof.OptionsProto.prototype.clearMinOccurrence = function() {
  jspb.Message.setField(this, 17, undefined);
};

/**
 * Returns whether this field is set.
 * @return {!boolean}
 */
proto.tensorflow.tfprof.OptionsProto.prototype.hasMinOccurrence = function() {
  return jspb.Message.getField(this, 17) != null;
};

/**
 * optional string order_by = 7;
 * @return {string}
 */
proto.tensorflow.tfprof.OptionsProto.prototype.getOrderBy = function() {
  return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 7, ""));
};

/** @param {string} value */
proto.tensorflow.tfprof.OptionsProto.prototype.setOrderBy = function(value) {
  jspb.Message.setField(this, 7, value);
};

proto.tensorflow.tfprof.OptionsProto.prototype.clearOrderBy = function() {
  jspb.Message.setField(this, 7, undefined);
};

/**
 * Returns whether this field is set.
 * @return {!boolean}
 */
proto.tensorflow.tfprof.OptionsProto.prototype.hasOrderBy = function() {
  return jspb.Message.getField(this, 7) != null;
};

/**
 * repeated string account_type_regexes = 8;
 * If you change this array by adding, removing or replacing elements, or if you
 * replace the array itself, then you must call the setter to update it.
 * @return {!Array.<string>}
 */
proto.tensorflow.tfprof.OptionsProto.prototype.getAccountTypeRegexesList = function() {
  return /** @type {!Array.<string>} */ (jspb.Message.getField(this, 8));
};

/** @param {!Array.<string>} value */
proto.tensorflow.tfprof.OptionsProto.prototype.setAccountTypeRegexesList = function(value) {
  jspb.Message.setField(this, 8, value || []);
};

/**
 * @param {!string} value
 * @param {number=} opt_index
 */
proto.tensorflow.tfprof.OptionsProto.prototype.addAccountTypeRegexes = function(value, opt_index) {
  jspb.Message.addToRepeatedField(this, 8, value, opt_index);
};

proto.tensorflow.tfprof.OptionsProto.prototype.clearAccountTypeRegexesList = function() {
  this.setAccountTypeRegexesList([]);
};

/**
 * repeated string start_name_regexes = 9;
 * If you change this array by adding, removing or replacing elements, or if you
 * replace the array itself, then you must call the setter to update it.
 * @return {!Array.<string>}
 */
proto.tensorflow.tfprof.OptionsProto.prototype.getStartNameRegexesList = function() {
  return /** @type {!Array.<string>} */ (jspb.Message.getField(this, 9));
};

/** @param {!Array.<string>} value */
proto.tensorflow.tfprof.OptionsProto.prototype.setStartNameRegexesList = function(value) {
  jspb.Message.setField(this, 9, value || []);
};

/**
 * @param {!string} value
 * @param {number=} opt_index
 */
proto.tensorflow.tfprof.OptionsProto.prototype.addStartNameRegexes = function(value, opt_index) {
  jspb.Message.addToRepeatedField(this, 9, value, opt_index);
};

proto.tensorflow.tfprof.OptionsProto.prototype.clearStartNameRegexesList = function() {
  this.setStartNameRegexesList([]);
};

/**
 * repeated string trim_name_regexes = 10;
 * If you change this array by adding, removing or replacing elements, or if you
 * replace the array itself, then you must call the setter to update it.
 * @return {!Array.<string>}
 */
proto.tensorflow.tfprof.OptionsProto.prototype.getTrimNameRegexesList = function() {
  return /** @type {!Array.<string>} */ (jspb.Message.getField(this, 10));
};

/** @param {!Array.<string>} value */
proto.tensorflow.tfprof.OptionsProto.prototype.setTrimNameRegexesList = function(value) {
  jspb.Message.setField(this, 10, value || []);
};

/**
 * @param {!string} value
 * @param {number=} opt_index
 */
proto.tensorflow.tfprof.OptionsProto.prototype.addTrimNameRegexes = function(value, opt_index) {
  jspb.Message.addToRepeatedField(this, 10, value, opt_index);
};

proto.tensorflow.tfprof.OptionsProto.prototype.clearTrimNameRegexesList = function() {
  this.setTrimNameRegexesList([]);
};

/**
 * repeated string show_name_regexes = 11;
 * If you change this array by adding, removing or replacing elements, or if you
 * replace the array itself, then you must call the setter to update it.
 * @return {!Array.<string>}
 */
proto.tensorflow.tfprof.OptionsProto.prototype.getShowNameRegexesList = function() {
  return /** @type {!Array.<string>} */ (jspb.Message.getField(this, 11));
};

/** @param {!Array.<string>} value */
proto.tensorflow.tfprof.OptionsProto.prototype.setShowNameRegexesList = function(value) {
  jspb.Message.setField(this, 11, value || []);
};

/**
 * @param {!string} value
 * @param {number=} opt_index
 */
proto.tensorflow.tfprof.OptionsProto.prototype.addShowNameRegexes = function(value, opt_index) {
  jspb.Message.addToRepeatedField(this, 11, value, opt_index);
};

proto.tensorflow.tfprof.OptionsProto.prototype.clearShowNameRegexesList = function() {
  this.setShowNameRegexesList([]);
};

/**
 * repeated string hide_name_regexes = 12;
 * If you change this array by adding, removing or replacing elements, or if you
 * replace the array itself, then you must call the setter to update it.
 * @return {!Array.<string>}
 */
proto.tensorflow.tfprof.OptionsProto.prototype.getHideNameRegexesList = function() {
  return /** @type {!Array.<string>} */ (jspb.Message.getField(this, 12));
};

/** @param {!Array.<string>} value */
proto.tensorflow.tfprof.OptionsProto.prototype.setHideNameRegexesList = function(value) {
  jspb.Message.setField(this, 12, value || []);
};

/**
 * @param {!string} value
 * @param {number=} opt_index
 */
proto.tensorflow.tfprof.OptionsProto.prototype.addHideNameRegexes = function(value, opt_index) {
  jspb.Message.addToRepeatedField(this, 12, value, opt_index);
};

proto.tensorflow.tfprof.OptionsProto.prototype.clearHideNameRegexesList = function() {
  this.setHideNameRegexesList([]);
};

/**
 * optional bool account_displayed_op_only = 13;
 * Note that Boolean fields may be set to 0/1 when serialized from a Java server.
 * You should avoid comparisons like {@code val === true/false} in those cases.
 * @return {boolean}
 */
proto.tensorflow.tfprof.OptionsProto.prototype.getAccountDisplayedOpOnly = function() {
  return /** @type {boolean} */ (jspb.Message.getFieldWithDefault(this, 13, false));
};

/** @param {boolean} value */
proto.tensorflow.tfprof.OptionsProto.prototype.setAccountDisplayedOpOnly = function(value) {
  jspb.Message.setField(this, 13, value);
};

proto.tensorflow.tfprof.OptionsProto.prototype.clearAccountDisplayedOpOnly = function() {
  jspb.Message.setField(this, 13, undefined);
};

/**
 * Returns whether this field is set.
 * @return {!boolean}
 */
proto.tensorflow.tfprof.OptionsProto.prototype.hasAccountDisplayedOpOnly = function() {
  return jspb.Message.getField(this, 13) != null;
};

/**
 * repeated string select = 14;
 * If you change this array by adding, removing or replacing elements, or if you
 * replace the array itself, then you must call the setter to update it.
 * @return {!Array.<string>}
 */
proto.tensorflow.tfprof.OptionsProto.prototype.getSelectList = function() {
  return /** @type {!Array.<string>} */ (jspb.Message.getField(this, 14));
};

/** @param {!Array.<string>} value */
proto.tensorflow.tfprof.OptionsProto.prototype.setSelectList = function(value) {
  jspb.Message.setField(this, 14, value || []);
};

/**
 * @param {!string} value
 * @param {number=} opt_index
 */
proto.tensorflow.tfprof.OptionsProto.prototype.addSelect = function(value, opt_index) {
  jspb.Message.addToRepeatedField(this, 14, value, opt_index);
};

proto.tensorflow.tfprof.OptionsProto.prototype.clearSelectList = function() {
  this.setSelectList([]);
};

/**
 * optional string output = 15;
 * @return {string}
 */
proto.tensorflow.tfprof.OptionsProto.prototype.getOutput = function() {
  return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 15, ""));
};

/** @param {string} value */
proto.tensorflow.tfprof.OptionsProto.prototype.setOutput = function(value) {
  jspb.Message.setField(this, 15, value);
};

proto.tensorflow.tfprof.OptionsProto.prototype.clearOutput = function() {
  jspb.Message.setField(this, 15, undefined);
};

/**
 * Returns whether this field is set.
 * @return {!boolean}
 */
proto.tensorflow.tfprof.OptionsProto.prototype.hasOutput = function() {
  return jspb.Message.getField(this, 15) != null;
};

/**
 * optional string dump_to_file = 16;
 * @return {string}
 */
proto.tensorflow.tfprof.OptionsProto.prototype.getDumpToFile = function() {
  return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 16, ""));
};

/** @param {string} value */
proto.tensorflow.tfprof.OptionsProto.prototype.setDumpToFile = function(value) {
  jspb.Message.setField(this, 16, value);
};

proto.tensorflow.tfprof.OptionsProto.prototype.clearDumpToFile = function() {
  jspb.Message.setField(this, 16, undefined);
};

/**
 * Returns whether this field is set.
 * @return {!boolean}
 */
proto.tensorflow.tfprof.OptionsProto.prototype.hasDumpToFile = function() {
  return jspb.Message.getField(this, 16) != null;
};


Ha Long Bay is a UNESCO World Heritage Site, and a popular travel destination, located in Quảng Ninh province, Vietnam. Administratively, the bay belongs to Ha Long City, Cẩm Phả town, and part of Van Don district. The bay features thousands of limestone karsts and isles in various sizes and shapes. Ha Long Bay is a center of a larger zone which includes Bái Tử Long bay to the northeast, and Cát Bà islands to the southwest.
This description uses material from the Wikipedia article on Halong Bay and is licensed under the Creative Commons Attribution-ShareAlike License (view authors). Image by macrider.
164 people want to do this. 28 people have done this.