text:
namespace Sitecore.Ecommerce
{
    using System;
    using System.Collections.Generic;
    using System.Web;
    using Diagnostics;
    using Microsoft.Practices.Unity;
    using Pipelines.GetConfiguration;
    using Sitecore.Ecommerce.Unity;
    using Sitecore.Pipelines;

    /// <summary>
    /// The IoC Container.
    /// </summary>
    public class IoCContainer : IIoCContainer
    {
        /// <summary>
        /// Inner container instance.
        /// </summary>
        private readonly IUnityContainer innerContainer;

        /// <summary>
        /// Is set to true when instance is disposed.
        /// </summary>
        private bool isDisposed;

        /// <summary>
        /// Initializes a new instance of the <see cref="IoCContainer"/> class.
        /// </summary>
        public IoCContainer()
            : this(new UnityContainer())
        {
        }

        /// <summary>
        /// Initializes a new instance of the <see cref="IoCContainer"/> class.
        /// </summary>
        /// <param name="unityContainer">The unity container.</param>
        public IoCContainer(IUnityContainer unityContainer)
        {
            this.innerContainer = unityContainer;
            this.innerContainer.RegisterExtension<TypeTrackingExtension>();
        }

        /// <summary>
        /// Gets the inner container.
        /// </summary>
        public virtual IUnityContainer InnerContainer
        {
            get { return this.innerContainer; }
        }

        /// <summary>
        /// Gets the parent of this container.
        /// </summary>
        /// <value>
        /// The parent container, or null if this container doesn't have one.
        /// </value>
        public IUnityContainer Parent
        {
            get { return this.innerContainer.Parent; }
        }

        /// <summary>
        /// Gets a sequence of <see cref="T:Microsoft.Practices.Unity.ContainerRegistration"/> that describe the current state
        /// of the container.
        /// </summary>
        public IEnumerable<ContainerRegistration> Registrations
        {
            get { return this.innerContainer.Registrations; }
        }

        /// <summary>
        /// Gets the entity instance.
        /// </summary>
        /// <typeparam name="T">The entity contract.</typeparam>
        /// <returns>The entity instance.</returns>
        public virtual T GetConfiguration<T>() where T : class
        {
            var entityName = string.Format("{0}_{1}", Sitecore.Context.Site.Name, Sitecore.Context.Database.Name);

            try
            {
                var args = new ConfigurationPipelineArgs(typeof(T)) { EntityName = entityName };
                CorePipeline.Run("getConfiguration", args);

                Assert.IsNotNull(args.ConfigurationItem, typeof(T), "Unable to resolve '\"{0}\"' configuration.", typeof(T).Name);

                this.innerContainer.RegisterInstance(entityName, (T)args.ConfigurationItem);

                return (T)args.ConfigurationItem;
            }
            catch (Exception exception)
            {
                Log.Warn(exception.Message, exception);

                lock (this)
                {
                    return UnityContainerExtensions.Resolve<T>(this);
                }
            }
        }

        /// <summary>
        /// Sets the entity instance.
        /// </summary>
        /// <param name="entity">The entity instance.</param>
        /// <typeparam name="T">The entity contract.</typeparam>
        public virtual void SetInstance<T>(T entity)
        {
            Assert.ArgumentNotNull(entity, "entity");

            var entityName = this.GenerateEntityName<T>();

            if (HttpContext.Current == null || HttpContext.Current.Session == null)
            {
                this.RegisterInstance(typeof(T), string.Empty, entity, new ContainerControlledLifetimeManager());
                return;
            }

            if (HttpContext.Current.Session[entityName] == null)
            {
                HttpContext.Current.Session[entityName] = entity;
            }
            else
            {
                var storedEntity = (T)HttpContext.Current.Session[entityName];

                if (!storedEntity.Equals(entity))
                {
                    HttpContext.Current.Session[entityName] = entity;
                }
            }
        }

        /// <summary>
        /// Gets the entity instance.
        /// </summary>
        /// <typeparam name="T">The entity contract.</typeparam>
        /// <returns>The entity instance.</returns>
        public virtual T GetInstance<T>()
        {
            var entityName = this.GenerateEntityName<T>();

            if (HttpContext.Current == null || HttpContext.Current.Session == null)
            {
                lock (this)
                {
                    return (T)this.innerContainer.Resolve(typeof(T), null);
                }
            }

            var entityObject = HttpContext.Current.Session[entityName];
            T entity;

            if (entityObject == null)
            {
                lock (this)
                {
                    entity = (T)this.innerContainer.Resolve(typeof(T), null);
                }
            }
            else
            {
                entity = (T)entityObject;
            }

            this.SetInstance(entity);

            return entity;
        }

        /// <summary>
        /// Register a type mapping with the container, where the created instances will use
        /// the given <see cref="T:Microsoft.Practices.Unity.LifetimeManager"/>.
        /// </summary>
        /// <param name="from"><see cref="T:System.Type"/> that will be requested.</param>
        /// <param name="to"><see cref="T:System.Type"/> that will actually be returned.</param>
        /// <param name="name">Name to use for registration, null if a default registration.</param>
        /// <param name="lifetimeManager">The <see cref="T:Microsoft.Practices.Unity.LifetimeManager"/> that controls the lifetime
        /// of the returned instance.</param>
        /// <param name="injectionMembers">Injection configuration objects.</param>
        /// <returns>
        /// The <see cref="T:Microsoft.Practices.Unity.UnityContainer"/> object that this method was called on (this in C#, Me in Visual Basic).
        /// </returns>
        public IUnityContainer RegisterType(Type from, Type to, string name, LifetimeManager lifetimeManager, params InjectionMember[] injectionMembers)
        {
            return this.innerContainer.RegisterType(from, to, name, lifetimeManager, injectionMembers);
        }

        /// <summary>
        /// Registers the instance.
        /// </summary>
        /// <param name="type">
        /// The type.
        /// </param>
        /// <param name="name">
        /// The name.
        /// </param>
        /// <param name="instance">
        /// The instance.
        /// </param>
        /// <param name="lifetime">
        /// The lifetime.
        /// </param>
        /// <returns>
        /// The unity container instance.
        /// </returns>
        public IUnityContainer RegisterInstance(Type type, string name, object instance, LifetimeManager lifetime)
        {
            return this.innerContainer.RegisterInstance(type, name, instance, lifetime);
        }

        /// <summary>
        /// Resolves the specified type.
        /// </summary>
        /// <param name="type">The type.</param>
        /// <param name="name">The name.</param>
        /// <param name="resolverOverrides">The resolver overrides.</param>
        /// <returns>
        /// The object.
        /// </returns>
        public object Resolve(Type type, string name, params ResolverOverride[] resolverOverrides)
        {
            return this.innerContainer.Resolve(type, name, resolverOverrides);
        }

        /// <summary>
        /// Resolves all.
        /// </summary>
        /// <param name="type">The type.</param>
        /// <param name="resolverOverrides">The resolver overrides.</param>
        /// <returns>
        /// The all.
        /// </returns>
        public IEnumerable<object> ResolveAll(Type type, params ResolverOverride[] resolverOverrides)
        {
            return this.innerContainer.ResolveAll(type, resolverOverrides);
        }

        /// <summary>
        /// Builds up.
        /// </summary>
        /// <param name="type">The type.</param>
        /// <param name="existing">The existing.</param>
        /// <param name="name">The name.</param>
        /// <param name="resolverOverrides">The resolver overrides.</param>
        /// <returns>
        /// The up.
        /// </returns>
        public object BuildUp(Type type, object existing, string name, params ResolverOverride[] resolverOverrides)
        {
            return this.innerContainer.BuildUp(type, existing, name, resolverOverrides);
        }

        /// <summary>
        /// Run an existing object through the container, and clean it up.
        /// </summary>
        /// <param name="o">The object to tear down.</param>
        public void Teardown(object o)
        {
            this.innerContainer.Teardown(o);
        }

        /// <summary>
        /// Add an extension object to the container.
        /// </summary>
        /// <param name="extension"><see cref="T:Microsoft.Practices.Unity.UnityContainerExtension"/> to add.</param>
        /// <returns>
        /// The <see cref="T:Microsoft.Practices.Unity.UnityContainer"/> object that this method was called on (this in C#, Me in Visual Basic).
        /// </returns>
        public IUnityContainer AddExtension(UnityContainerExtension extension)
        {
            return this.innerContainer.AddExtension(extension);
        }

        /// <summary>
        /// Resolve access to a configuration interface exposed by an extension.
        /// </summary>
        /// <param name="configurationInterface"><see cref="T:System.Type"/> of configuration interface required.</param>
        /// <returns>
        /// The requested extension's configuration interface, or null if not found.
        /// </returns>
        public object Configure(Type configurationInterface)
        {
            return this.innerContainer.Configure(configurationInterface);
        }

        /// <summary>
        /// Remove all installed extensions from this container.
        /// </summary>
        /// <returns>
        /// The <see cref="T:Microsoft.Practices.Unity.UnityContainer"/> object that this method was called on (this in C#, Me in Visual Basic).
        /// </returns>
        public IUnityContainer RemoveAllExtensions()
        {
            return this.innerContainer.RemoveAllExtensions();
        }

        /// <summary>
        /// Create a child container.
        /// </summary>
        /// <returns>
        /// The new child container.
        /// </returns>
        public IUnityContainer CreateChildContainer()
        {
            if (this.innerContainer == null)
            {
                return null;
            }

            var child = this.innerContainer.CreateChildContainer();
            child.RegisterExtension<TypeTrackingExtension>();

            return child;
        }

        /// <summary>
        /// Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
        /// </summary>
        public void Dispose()
        {
            this.Dispose(true);
            GC.SuppressFinalize(this);
        }

        /// <summary>
        /// Releases unmanaged and - optionally - managed resources.
        /// </summary>
        /// <param name="disposing"><c>true</c> to release both managed and unmanaged resources; <c>false</c> to release only unmanaged resources.</param>
        protected virtual void Dispose(bool disposing)
        {
            if (this.isDisposed)
            {
                return;
            }

            if (disposing)
            {
                if (null != this.innerContainer)
                {
                    this.innerContainer.Dispose();
                }
            }

            this.isDisposed = true;
        }

        /// <summary>
        /// Gets the entity name for the site based entity.
        /// </summary>
        /// <param name="name">The name.</param>
        /// <returns>The entity name.</returns>
        [AllowNull("*")]
        protected string GetSiteBasedName(string name)
        {
            if (string.IsNullOrEmpty(name))
            {
                return null;
            }

            var contextSite = Sitecore.Context.Site;
            if (contextSite == null || string.IsNullOrEmpty(contextSite.Name))
            {
                return name;
            }

            var siteName = contextSite.Name;

            return name.StartsWith(siteName) ? name : string.Concat(siteName, "_", name);
        }

        /// <summary>
        /// Gets the name of entity in the session.
        /// </summary>
        /// <typeparam name="T">The entity type</typeparam>
        /// <returns>The name of entity in the session.</returns>
        protected virtual string GenerateEntityName<T>()
        {
            return typeof(T).Name;
        }
    }
}


text:
import React from 'react';
import withStyles from 'isomorphic-style-loader/lib/withStyles';
import s from './Header.css';
import Link from '../Link';
import Navigation from '../Navigation';
import logoUrl from './logo-small.png';
import logoUrl2x from './logo-small@2x.png';

class Header extends React.Component {
  render() {
    return (

          {/* <Link className={s.brand} to="/"> */}
            {/* <img src={logoUrl} srcSet={`${logoUrl2x} 2x`} width="38" height="38" alt="React" /> */}
            {/* Sentient Solutions */}
          {/* </Link> */}

            <Link className={s.bannerTitle} to="/">
              ORDERED OPTIONS
            </Link>

Identify and control your options investments

              <Navigation className={s.nav} />

    );
  }
}

export default withStyles(s)(Header);

redpajama_set_name: RedPajamaGithub


text:
function [ otherDigit ] = getOtherRandDigit( digit )
%GETOTHERRANDDIGIT Get a digit other than 'digit' argument

    while 1
        otherDigit = randi([0,9],1,1);
        if(otherDigit ~= digit)
            break
        end
    end

end


text:
<!DOCTYPE html>

error title

error description


text:
namespace RealArtists.Slack.Wire {
  using Types;

  public class UsersInfoResponse : SlackResponse {
    public User User { get; set; }
  }
}


text:
namespace ExampleApp
{
    namespace SettingsMenu
    {
        namespace View
        {
            class SettingsMenuView : public Menu::View::MenuView
            {
                typedef std::vector<Menu::View::IMenuSectionViewModel*> TSections;

            private:
                Eegeo::Helpers::CallbackCollection1<const std::string&> m_callbacks;

            public:
                SettingsMenuView(WindowsNativeState& nativeState,
                                  const std::string& viewClassName,
                                  bool isInKioskMode);

                 bool IsTableAnimating() const;

                 void UpdateTableAnimation(float dt);

                 void SetTableCanInteract(bool canInteract);
            };
        }
    }
}


text:
/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package org.wakatime.netbeans.plugin;

import java.beans.PropertyChangeListener;
import java.beans.PropertyChangeSupport;
import javax.swing.JComponent;
import javax.swing.SwingUtilities;
import org.netbeans.spi.options.OptionsPanelController;
import org.openide.util.HelpCtx;
import org.openide.util.Lookup;

@OptionsPanelController.TopLevelRegistration(
        categoryName = "#OptionsCategory_Name_WakaTime",
        iconBase = "org/wakatime/netbeans/plugin/wakatime-32.png",
        keywords = "#OptionsCategory_Keywords_WakaTime",
        keywordsCategory = "WakaTime"
)
@org.openide.util.NbBundle.Messages({"OptionsCategory_Name_WakaTime=WakaTime", "OptionsCategory_Keywords_WakaTime=wakatime"})
public final class WakaTimeOptionsPanelController extends OptionsPanelController {

    private WakaTimePanel panel;
    private final PropertyChangeSupport pcs = new PropertyChangeSupport(this);
    private boolean changed;

    public void update() {
        getPanel().load();
        changed = false;
    }

    public void applyChanges() {
        SwingUtilities.invokeLater(new Runnable() {
            @Override
            public void run() {
                getPanel().store();
                changed = false;
            }
        });
    }

    public void cancel() {
        // need not do anything special, if no changes have been persisted yet
    }

    public boolean isValid() {
        return getPanel().valid();
    }

    public boolean isChanged() {
        return changed;
    }

    public HelpCtx getHelpCtx() {
        return null; // new HelpCtx("...ID") if you have a help set
    }

    public JComponent getComponent(Lookup masterLookup) {
        return getPanel();
    }

    public void addPropertyChangeListener(PropertyChangeListener l) {
        pcs.addPropertyChangeListener(l);
    }

    public void removePropertyChangeListener(PropertyChangeListener l) {
        pcs.removePropertyChangeListener(l);
    }

    private WakaTimePanel getPanel() {
        if (panel == null) {
            panel = new WakaTimePanel(this);
        }
        return panel;
    }

    void changed() {
        if (!changed) {
            changed = true;
            pcs.firePropertyChange(OptionsPanelController.PROP_CHANGED, false, true);
        }
        pcs.firePropertyChange(OptionsPanelController.PROP_VALID, null, null);
    }

}


text:
#pragma once
#include <aws/emr-serverless/EMRServerless_EXPORTS.h>
#include <aws/emr-serverless/EMRServerlessRequest.h>
#include <aws/core/utils/memory/stl/AWSString.h>
#include <aws/core/utils/memory/stl/AWSMap.h>
#include <aws/emr-serverless/model/MaximumAllowedResources.h>
#include <aws/emr-serverless/model/AutoStartConfig.h>
#include <aws/emr-serverless/model/AutoStopConfig.h>
#include <aws/emr-serverless/model/NetworkConfiguration.h>
#include <aws/emr-serverless/model/Architecture.h>
#include <aws/emr-serverless/model/InitialCapacityConfig.h>
#include <utility>
#include <aws/core/utils/UUID.h>

namespace Aws
{
namespace EMRServerless
{
namespace Model
{

  /**
   */
  class AWS_EMRSERVERLESS_API CreateApplicationRequest : public EMRServerlessRequest
  {
  public:
    CreateApplicationRequest();

    // Service request name is the Operation name which will send this request out,
    // each operation should has unique request name, so that we can get operation's name from this request.
    // Note: this is not true for response, multiple operations may have the same response name,
    // so we can not get operation's name from response.
    inline virtual const char* GetServiceRequestName() const override { return "CreateApplication"; }

    Aws::String SerializePayload() const override;

    /**
     *
The name of the application.

     */
    inline const Aws::String& GetName() const{ return m_name; }

    /**
     *
The name of the application.

     */
    inline bool NameHasBeenSet() const { return m_nameHasBeenSet; }

    /**
     *
The name of the application.

     */
    inline void SetName(const Aws::String& value) { m_nameHasBeenSet = true; m_name = value; }

    /**
     *
The name of the application.

     */
    inline void SetName(Aws::String&& value) { m_nameHasBeenSet = true; m_name = std::move(value); }

    /**
     *
The name of the application.

     */
    inline void SetName(const char* value) { m_nameHasBeenSet = true; m_name.assign(value); }

    /**
     *
The name of the application.

     */
    inline CreateApplicationRequest& WithName(const Aws::String& value) { SetName(value); return *this;}

    /**
     *
The name of the application.

     */
    inline CreateApplicationRequest& WithName(Aws::String&& value) { SetName(std::move(value)); return *this;}

    /**
     *
The name of the application.

     */
    inline CreateApplicationRequest& WithName(const char* value) { SetName(value); return *this;}

    /**
     *
The EMR release version associated with the application.

     */
    inline const Aws::String& GetReleaseLabel() const{ return m_releaseLabel; }

    /**
     *
The EMR release version associated with the application.

     */
    inline bool ReleaseLabelHasBeenSet() const { return m_releaseLabelHasBeenSet; }

    /**
     *
The EMR release version associated with the application.

     */
    inline void SetReleaseLabel(const Aws::String& value) { m_releaseLabelHasBeenSet = true; m_releaseLabel = value; }

    /**
     *
The EMR release version associated with the application.

     */
    inline void SetReleaseLabel(Aws::String&& value) { m_releaseLabelHasBeenSet = true; m_releaseLabel = std::move(value); }

    /**
     *
The EMR release version associated with the application.

     */
    inline void SetReleaseLabel(const char* value) { m_releaseLabelHasBeenSet = true; m_releaseLabel.assign(value); }

    /**
     *
The EMR release version associated with the application.

     */
    inline CreateApplicationRequest& WithReleaseLabel(const Aws::String& value) { SetReleaseLabel(value); return *this;}

    /**
     *
The EMR release version associated with the application.

     */
    inline CreateApplicationRequest& WithReleaseLabel(Aws::String&& value) { SetReleaseLabel(std::move(value)); return *this;}

    /**
     *
The EMR release version associated with the application.

     */
    inline CreateApplicationRequest& WithReleaseLabel(const char* value) { SetReleaseLabel(value); return *this;}

    /**
     *
The type of application you want to start, such as Spark or Hive.

     */
    inline const Aws::String& GetType() const{ return m_type; }

    /**
     *
The type of application you want to start, such as Spark or Hive.

     */
    inline bool TypeHasBeenSet() const { return m_typeHasBeenSet; }

    /**
     *
The type of application you want to start, such as Spark or Hive.

     */
    inline void SetType(const Aws::String& value) { m_typeHasBeenSet = true; m_type = value; }

    /**
     *
The type of application you want to start, such as Spark or Hive.

     */
    inline void SetType(Aws::String&& value) { m_typeHasBeenSet = true; m_type = std::move(value); }

    /**
     *
The type of application you want to start, such as Spark or Hive.

     */
    inline void SetType(const char* value) { m_typeHasBeenSet = true; m_type.assign(value); }

    /**
     *
The type of application you want to start, such as Spark or Hive.

     */
    inline CreateApplicationRequest& WithType(const Aws::String& value) { SetType(value); return *this;}

    /**
     *
The type of application you want to start, such as Spark or Hive.

     */
    inline CreateApplicationRequest& WithType(Aws::String&& value) { SetType(std::move(value)); return *this;}

    /**
     *
The type of application you want to start, such as Spark or Hive.

     */
    inline CreateApplicationRequest& WithType(const char* value) { SetType(value); return *this;}

    /**
     *
The client idempotency token of the application to create. Its value must be
     * unique for each request.

     */
    inline const Aws::String& GetClientToken() const{ return m_clientToken; }

    /**
     *
The client idempotency token of the application to create. Its value must be
     * unique for each request.

     */
    inline bool ClientTokenHasBeenSet() const { return m_clientTokenHasBeenSet; }

    /**
     *
The client idempotency token of the application to create. Its value must be
     * unique for each request.

     */
    inline void SetClientToken(const Aws::String& value) { m_clientTokenHasBeenSet = true; m_clientToken = value; }

    /**
     *
The client idempotency token of the application to create. Its value must be
     * unique for each request.

     */
    inline void SetClientToken(Aws::String&& value) { m_clientTokenHasBeenSet = true; m_clientToken = std::move(value); }

    /**
     *
The client idempotency token of the application to create. Its value must be
     * unique for each request.

     */
    inline void SetClientToken(const char* value) { m_clientTokenHasBeenSet = true; m_clientToken.assign(value); }

    /**
     *
The client idempotency token of the application to create. Its value must be
     * unique for each request.

     */
    inline CreateApplicationRequest& WithClientToken(const Aws::String& value) { SetClientToken(value); return *this;}

    /**
     *
The client idempotency token of the application to create. Its value must be
     * unique for each request.

     */
    inline CreateApplicationRequest& WithClientToken(Aws::String&& value) { SetClientToken(std::move(value)); return *this;}

    /**
     *
The client idempotency token of the application to create. Its value must be
     * unique for each request.

     */
    inline CreateApplicationRequest& WithClientToken(const char* value) { SetClientToken(value); return *this;}

    /**
     *
The capacity to initialize when the application is created.

     */
    inline const Aws::Map<Aws::String, InitialCapacityConfig>& GetInitialCapacity() const{ return m_initialCapacity; }

    /**
     *
The capacity to initialize when the application is created.

     */
    inline bool InitialCapacityHasBeenSet() const { return m_initialCapacityHasBeenSet; }

    /**
     *
The capacity to initialize when the application is created.

     */
    inline void SetInitialCapacity(const Aws::Map<Aws::String, InitialCapacityConfig>& value) { m_initialCapacityHasBeenSet = true; m_initialCapacity = value; }

    /**
     *
The capacity to initialize when the application is created.

     */
    inline void SetInitialCapacity(Aws::Map<Aws::String, InitialCapacityConfig>&& value) { m_initialCapacityHasBeenSet = true; m_initialCapacity = std::move(value); }

    /**
     *
The capacity to initialize when the application is created.

     */
    inline CreateApplicationRequest& WithInitialCapacity(const Aws::Map<Aws::String, InitialCapacityConfig>& value) { SetInitialCapacity(value); return *this;}

    /**
     *
The capacity to initialize when the application is created.

     */
    inline CreateApplicationRequest& WithInitialCapacity(Aws::Map<Aws::String, InitialCapacityConfig>&& value) { SetInitialCapacity(std::move(value)); return *this;}

    /**
     *
The capacity to initialize when the application is created.

     */
    inline CreateApplicationRequest& AddInitialCapacity(const Aws::String& key, const InitialCapacityConfig& value) { m_initialCapacityHasBeenSet = true; m_initialCapacity.emplace(key, value); return *this; }

    /**
     *
The capacity to initialize when the application is created.

     */
    inline CreateApplicationRequest& AddInitialCapacity(Aws::String&& key, const InitialCapacityConfig& value) { m_initialCapacityHasBeenSet = true; m_initialCapacity.emplace(std::move(key), value); return *this; }

    /**
     *
The capacity to initialize when the application is created.

     */
    inline CreateApplicationRequest& AddInitialCapacity(const Aws::String& key, InitialCapacityConfig&& value) { m_initialCapacityHasBeenSet = true; m_initialCapacity.emplace(key, std::move(value)); return *this; }

    /**
     *
The capacity to initialize when the application is created.

     */
    inline CreateApplicationRequest& AddInitialCapacity(Aws::String&& key, InitialCapacityConfig&& value) { m_initialCapacityHasBeenSet = true; m_initialCapacity.emplace(std::move(key), std::move(value)); return *this; }

    /**
     *
The capacity to initialize when the application is created.

     */
    inline CreateApplicationRequest& AddInitialCapacity(const char* key, InitialCapacityConfig&& value) { m_initialCapacityHasBeenSet = true; m_initialCapacity.emplace(key, std::move(value)); return *this; }

    /**
     *
The capacity to initialize when the application is created.

     */
    inline CreateApplicationRequest& AddInitialCapacity(const char* key, const InitialCapacityConfig& value) { m_initialCapacityHasBeenSet = true; m_initialCapacity.emplace(key, value); return *this; }

    /**
     *
The maximum capacity to allocate when the application is created. This is
     * cumulative across all workers at any given point in time, not just when an
     * application is created. No new resources will be created once any one of the
     * defined limits is hit.

     */
    inline const MaximumAllowedResources& GetMaximumCapacity() const{ return m_maximumCapacity; }

    /**
     *
The maximum capacity to allocate when the application is created. This is
     * cumulative across all workers at any given point in time, not just when an
     * application is created. No new resources will be created once any one of the
     * defined limits is hit.

     */
    inline bool MaximumCapacityHasBeenSet() const { return m_maximumCapacityHasBeenSet; }

    /**
     *
The maximum capacity to allocate when the application is created. This is
     * cumulative across all workers at any given point in time, not just when an
     * application is created. No new resources will be created once any one of the
     * defined limits is hit.

     */
    inline void SetMaximumCapacity(const MaximumAllowedResources& value) { m_maximumCapacityHasBeenSet = true; m_maximumCapacity = value; }

    /**
     *
The maximum capacity to allocate when the application is created. This is
     * cumulative across all workers at any given point in time, not just when an
     * application is created. No new resources will be created once any one of the
     * defined limits is hit.

     */
    inline void SetMaximumCapacity(MaximumAllowedResources&& value) { m_maximumCapacityHasBeenSet = true; m_maximumCapacity = std::move(value); }

    /**
     *
The maximum capacity to allocate when the application is created. This is
     * cumulative across all workers at any given point in time, not just when an
     * application is created. No new resources will be created once any one of the
     * defined limits is hit.

     */
    inline CreateApplicationRequest& WithMaximumCapacity(const MaximumAllowedResources& value) { SetMaximumCapacity(value); return *this;}

    /**
     *
The maximum capacity to allocate when the application is created. This is
     * cumulative across all workers at any given point in time, not just when an
     * application is created. No new resources will be created once any one of the
     * defined limits is hit.

     */
    inline CreateApplicationRequest& WithMaximumCapacity(MaximumAllowedResources&& value) { SetMaximumCapacity(std::move(value)); return *this;}

    /**
     *
The tags assigned to the application.

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

    /**
     *
The tags assigned to the application.

     */
    inline bool TagsHasBeenSet() const { return m_tagsHasBeenSet; }

    /**
     *
The tags assigned to the application.

     */
    inline void SetTags(const Aws::Map<Aws::String, Aws::String>& value) { m_tagsHasBeenSet = true; m_tags = value; }

    /**
     *
The tags assigned to the application.

     */
    inline void SetTags(Aws::Map<Aws::String, Aws::String>&& value) { m_tagsHasBeenSet = true; m_tags = std::move(value); }

    /**
     *
The tags assigned to the application.

     */
    inline CreateApplicationRequest& WithTags(const Aws::Map<Aws::String, Aws::String>& value) { SetTags(value); return *this;}

    /**
     *
The tags assigned to the application.

     */
    inline CreateApplicationRequest& WithTags(Aws::Map<Aws::String, Aws::String>&& value) { SetTags(std::move(value)); return *this;}

    /**
     *
The tags assigned to the application.

     */
    inline CreateApplicationRequest& AddTags(const Aws::String& key, const Aws::String& value) { m_tagsHasBeenSet = true; m_tags.emplace(key, value); return *this; }

    /**
     *
The tags assigned to the application.

     */
    inline CreateApplicationRequest& AddTags(Aws::String&& key, const Aws::String& value) { m_tagsHasBeenSet = true; m_tags.emplace(std::move(key), value); return *this; }

    /**
     *
The tags assigned to the application.

     */
    inline CreateApplicationRequest& AddTags(const Aws::String& key, Aws::String&& value) { m_tagsHasBeenSet = true; m_tags.emplace(key, std::move(value)); return *this; }

    /**
     *
The tags assigned to the application.

     */
    inline CreateApplicationRequest& AddTags(Aws::String&& key, Aws::String&& value) { m_tagsHasBeenSet = true; m_tags.emplace(std::move(key), std::move(value)); return *this; }

    /**
     *
The tags assigned to the application.

     */
    inline CreateApplicationRequest& AddTags(const char* key, Aws::String&& value) { m_tagsHasBeenSet = true; m_tags.emplace(key, std::move(value)); return *this; }

    /**
     *
The tags assigned to the application.

     */
    inline CreateApplicationRequest& AddTags(Aws::String&& key, const char* value) { m_tagsHasBeenSet = true; m_tags.emplace(std::move(key), value); return *this; }

    /**
     *
The tags assigned to the application.

     */
    inline CreateApplicationRequest& AddTags(const char* key, const char* value) { m_tagsHasBeenSet = true; m_tags.emplace(key, value); return *this; }

    /**
     *
The configuration for an application to automatically start on job
     * submission.

     */
    inline const AutoStartConfig& GetAutoStartConfiguration() const{ return m_autoStartConfiguration; }

    /**
     *
The configuration for an application to automatically start on job
     * submission.

     */
    inline bool AutoStartConfigurationHasBeenSet() const { return m_autoStartConfigurationHasBeenSet; }

    /**
     *
The configuration for an application to automatically start on job
     * submission.

     */
    inline void SetAutoStartConfiguration(const AutoStartConfig& value) { m_autoStartConfigurationHasBeenSet = true; m_autoStartConfiguration = value; }

    /**
     *
The configuration for an application to automatically start on job
     * submission.

     */
    inline void SetAutoStartConfiguration(AutoStartConfig&& value) { m_autoStartConfigurationHasBeenSet = true; m_autoStartConfiguration = std::move(value); }

    /**
     *
The configuration for an application to automatically start on job
     * submission.

     */
    inline CreateApplicationRequest& WithAutoStartConfiguration(const AutoStartConfig& value) { SetAutoStartConfiguration(value); return *this;}

    /**
     *
The configuration for an application to automatically start on job
     * submission.

     */
    inline CreateApplicationRequest& WithAutoStartConfiguration(AutoStartConfig&& value) { SetAutoStartConfiguration(std::move(value)); return *this;}

    /**
     *
The configuration for an application to automatically stop after a certain
     * amount of time being idle.

     */
    inline const AutoStopConfig& GetAutoStopConfiguration() const{ return m_autoStopConfiguration; }

    /**
     *
The configuration for an application to automatically stop after a certain
     * amount of time being idle.

     */
    inline bool AutoStopConfigurationHasBeenSet() const { return m_autoStopConfigurationHasBeenSet; }

    /**
     *
The configuration for an application to automatically stop after a certain
     * amount of time being idle.

     */
    inline void SetAutoStopConfiguration(const AutoStopConfig& value) { m_autoStopConfigurationHasBeenSet = true; m_autoStopConfiguration = value; }

    /**
     *
The configuration for an application to automatically stop after a certain
     * amount of time being idle.

     */
    inline void SetAutoStopConfiguration(AutoStopConfig&& value) { m_autoStopConfigurationHasBeenSet = true; m_autoStopConfiguration = std::move(value); }

    /**
     *
The configuration for an application to automatically stop after a certain
     * amount of time being idle.

     */
    inline CreateApplicationRequest& WithAutoStopConfiguration(const AutoStopConfig& value) { SetAutoStopConfiguration(value); return *this;}

    /**
     *
The configuration for an application to automatically stop after a certain
     * amount of time being idle.

     */
    inline CreateApplicationRequest& WithAutoStopConfiguration(AutoStopConfig&& value) { SetAutoStopConfiguration(std::move(value)); return *this;}

    /**
     *
The network configuration for customer VPC connectivity.

     */
    inline const NetworkConfiguration& GetNetworkConfiguration() const{ return m_networkConfiguration; }

    /**
     *
The network configuration for customer VPC connectivity.

     */
    inline bool NetworkConfigurationHasBeenSet() const { return m_networkConfigurationHasBeenSet; }

    /**
     *
The network configuration for customer VPC connectivity.

     */
    inline void SetNetworkConfiguration(const NetworkConfiguration& value) { m_networkConfigurationHasBeenSet = true; m_networkConfiguration = value; }

    /**
     *
The network configuration for customer VPC connectivity.

     */
    inline void SetNetworkConfiguration(NetworkConfiguration&& value) { m_networkConfigurationHasBeenSet = true; m_networkConfiguration = std::move(value); }

    /**
     *
The network configuration for customer VPC connectivity.

     */
    inline CreateApplicationRequest& WithNetworkConfiguration(const NetworkConfiguration& value) { SetNetworkConfiguration(value); return *this;}

    /**
     *
The network configuration for customer VPC connectivity.

     */
    inline CreateApplicationRequest& WithNetworkConfiguration(NetworkConfiguration&& value) { SetNetworkConfiguration(std::move(value)); return *this;}

    /**
     *
The CPU architecture of an application.

     */
    inline const Architecture& GetArchitecture() const{ return m_architecture; }

    /**
     *
The CPU architecture of an application.

     */
    inline bool ArchitectureHasBeenSet() const { return m_architectureHasBeenSet; }

    /**
     *
The CPU architecture of an application.

     */
    inline void SetArchitecture(const Architecture& value) { m_architectureHasBeenSet = true; m_architecture = value; }

    /**
     *
The CPU architecture of an application.

     */
    inline void SetArchitecture(Architecture&& value) { m_architectureHasBeenSet = true; m_architecture = std::move(value); }

    /**
     *
The CPU architecture of an application.

     */
    inline CreateApplicationRequest& WithArchitecture(const Architecture& value) { SetArchitecture(value); return *this;}

    /**
     *
The CPU architecture of an application.

     */
    inline CreateApplicationRequest& WithArchitecture(Architecture&& value) { SetArchitecture(std::move(value)); return *this;}

  private:

    Aws::String m_name;
    bool m_nameHasBeenSet = false;

    Aws::String m_releaseLabel;
    bool m_releaseLabelHasBeenSet = false;

    Aws::String m_type;
    bool m_typeHasBeenSet = false;

    Aws::String m_clientToken;
    bool m_clientTokenHasBeenSet = false;

    Aws::Map<Aws::String, InitialCapacityConfig> m_initialCapacity;
    bool m_initialCapacityHasBeenSet = false;

    MaximumAllowedResources m_maximumCapacity;
    bool m_maximumCapacityHasBeenSet = false;

    Aws::Map<Aws::String, Aws::String> m_tags;
    bool m_tagsHasBeenSet = false;

    AutoStartConfig m_autoStartConfiguration;
    bool m_autoStartConfigurationHasBeenSet = false;

    AutoStopConfig m_autoStopConfiguration;
    bool m_autoStopConfigurationHasBeenSet = false;

    NetworkConfiguration m_networkConfiguration;
    bool m_networkConfigurationHasBeenSet = false;

    Architecture m_architecture;
    bool m_architectureHasBeenSet = false;
  };

} // namespace Model
} // namespace EMRServerless
} // namespace Aws


text:
package com.hazelcast.core;

import com.hazelcast.test.AssertTask;
import com.hazelcast.test.HazelcastParallelClassRunner;
import com.hazelcast.test.SplitBrainTestSupport;
import com.hazelcast.test.annotation.ParallelTest;
import com.hazelcast.test.annotation.QuickTest;
import org.junit.experimental.categories.Category;
import org.junit.runner.RunWith;

import static org.junit.Assert.assertEquals;

@RunWith(HazelcastParallelClassRunner.class)
@Category({QuickTest.class, ParallelTest.class})
public class ProxySplitBrainTest extends SplitBrainTestSupport {

    @Override
    protected void onAfterSplitBrainCreated(HazelcastInstance[] firstBrain, HazelcastInstance[] secondBrain) {
        HazelcastInstance isolatedInstance = secondBrain[0];
        isolatedInstance.getLock("isolatedLock");
        assertDistributedObjectCountEventually(1, isolatedInstance);

        for (HazelcastInstance hz : firstBrain) {
            String name = generateKeyOwnedBy(hz);
            hz.getLock(name);
        }

        for (HazelcastInstance hz : firstBrain) {
            int expectedCount = firstBrain.length;
            assertDistributedObjectCountEventually(expectedCount, hz);
        }
    }

    @Override
    protected void onAfterSplitBrainHealed(HazelcastInstance[] allInstances) {
        for (HazelcastInstance hz : allInstances) {
            assertDistributedObjectCountEventually(allInstances.length, hz);
        }
    }

    private static void assertDistributedObjectCountEventually(final int expectedCount, final HazelcastInstance hz) {
        assertTrueEventually(new AssertTask() {
            @Override
            public void run() {
                int actualSize = hz.getDistributedObjects().size();
                assertEquals(expectedCount, actualSize);
            }
        });
    }
}


text:
// Check the syntax of gotables files.
package main

import (
	"fmt"
	"os"

	"github.com/urban-wombat/gotables"
	"github.com/urban-wombat/util"
	// "github.com/pkg/profile"	// Only for when profiling.
)

func main() {

	// defer profile.Start(profile.CPUProfile, profile.ProfilePath(".")).Stop()
	// After running: $ go tool pprof -http=:8080 cpu.pprof
	// defer profile.Start(profile.CPUProfile, profile.ProfilePath(".")).Stop()
	// After running: $ go tool pprof -http=:8080 mem.pprof

	var err error
	var fileName string
	var tables *gotables.TableSet
	var exitVal int = 0

	if len(os.Args) <= 1 {
		// No fileName arguments provided.
		printUsage()
		exitVal = 4
		os.Exit(exitVal)
	}

	/*	Let's remember how to do this.
		var file *os.File
		var fileInfo os.FileInfo
		var fileMode os.FileMode
		var isRegular bool
	*/
	for i := 1; i < len(os.Args); i++ {
		fileName = os.Args[i]
		/*		Let's remember how to do this.
				file, err = os.Open(fileName)
				fileInfo, err = file.Stat()
				fileMode = fileInfo.Mode()
				isRegular = fileMode.IsRegular()
		*/
		tables, err = gotables.NewTableSetFromFile(fileName)
		if err != nil {
			fmt.Fprintf(os.Stderr, "error    %v\n", err)
			exitVal = 3
		} else {
			tableCount := tables.TableCount()
			if tableCount == 1 {
				table0, err := tables.TableByTableIndex(0)
				if err != nil {
					fmt.Fprintf(os.Stderr, "SYSTEM ERROR: %v\n", err)
					exitVal = 2
				}
				rowCount := table0.RowCount()
				fmt.Printf("ok       %s (%d table%s with %d row%s)\n",
					fileName, tableCount, plural(tableCount), rowCount, plural(rowCount))
			} else {
				fmt.Printf("ok       %s      (%d table%s)\n", fileName, tableCount, plural(tableCount))
			}
			if tableCount == 0 {
				fmt.Fprintf(os.Stderr, "warning  %s (WARNING: file has 0 tables)\n", fileName)
				exitVal = 1
			}
		}
	}

	os.Exit(exitVal)
}

// TODO: List exitVal meanings.
func printUsage() {
	fmt.Fprintf(os.Stderr, "usage: gotsyntax <gotables-files>\n")
	fmt.Fprintf(os.Stderr, "%s\n", util.BuildDateTime())
}

func plural(items int) string {
	if items == 1 || items == -1 {
		// Singular
		return ""
	} else {
		// Plural
		return "s"
	}
}

func maxInt(a int, b int) int {
	if a > b {
		return a
	} else {
		return b
	}
}