text:
package ecsiface

import (
	"github.com/aws/aws-sdk-go/aws"
	"github.com/aws/aws-sdk-go/aws/request"
	"github.com/aws/aws-sdk-go/service/ecs"
)

// ECSAPI provides an interface to enable mocking the
// ecs.ECS service client's API operation,
// paginators, and waiters. This make unit testing your code that calls out
// to the SDK's service client's calls easier.
//
// The best way to use this interface is so the SDK's service client's calls
// can be stubbed out for unit testing your code with the SDK without needing
// to inject custom request handlers into the SDK's request pipeline.
//
//    // myFunc uses an SDK service client to make a request to
//    // Amazon EC2 Container Service.
//    func myFunc(svc ecsiface.ECSAPI) bool {
//        // Make svc.CreateCapacityProvider request
//    }
//
//    func main() {
//        sess := session.New()
//        svc := ecs.New(sess)
//
//        myFunc(svc)
//    }
//
// In your _test.go file:
//
//    // Define a mock struct to be used in your unit tests of myFunc.
//    type mockECSClient struct {
//        ecsiface.ECSAPI
//    }
//    func (m *mockECSClient) CreateCapacityProvider(input *ecs.CreateCapacityProviderInput) (*ecs.CreateCapacityProviderOutput, error) {
//        // mock response/functionality
//    }
//
//    func TestMyFunc(t *testing.T) {
//        // Setup Test
//        mockSvc := &mockECSClient{}
//
//        myfunc(mockSvc)
//
//        // Verify myFunc's functionality
//    }
//
// It is important to note that this interface will have breaking changes
// when the service model is updated and adds new API operations, paginators,
// and waiters. Its suggested to use the pattern above for testing, or using
// tooling to generate mocks to satisfy the interfaces.
type ECSAPI interface {
	CreateCapacityProvider(*ecs.CreateCapacityProviderInput) (*ecs.CreateCapacityProviderOutput, error)
	CreateCapacityProviderWithContext(aws.Context, *ecs.CreateCapacityProviderInput, ...request.Option) (*ecs.CreateCapacityProviderOutput, error)
	CreateCapacityProviderRequest(*ecs.CreateCapacityProviderInput) (*request.Request, *ecs.CreateCapacityProviderOutput)

	CreateCluster(*ecs.CreateClusterInput) (*ecs.CreateClusterOutput, error)
	CreateClusterWithContext(aws.Context, *ecs.CreateClusterInput, ...request.Option) (*ecs.CreateClusterOutput, error)
	CreateClusterRequest(*ecs.CreateClusterInput) (*request.Request, *ecs.CreateClusterOutput)

	CreateService(*ecs.CreateServiceInput) (*ecs.CreateServiceOutput, error)
	CreateServiceWithContext(aws.Context, *ecs.CreateServiceInput, ...request.Option) (*ecs.CreateServiceOutput, error)
	CreateServiceRequest(*ecs.CreateServiceInput) (*request.Request, *ecs.CreateServiceOutput)

	CreateTaskSet(*ecs.CreateTaskSetInput) (*ecs.CreateTaskSetOutput, error)
	CreateTaskSetWithContext(aws.Context, *ecs.CreateTaskSetInput, ...request.Option) (*ecs.CreateTaskSetOutput, error)
	CreateTaskSetRequest(*ecs.CreateTaskSetInput) (*request.Request, *ecs.CreateTaskSetOutput)

	DeleteAccountSetting(*ecs.DeleteAccountSettingInput) (*ecs.DeleteAccountSettingOutput, error)
	DeleteAccountSettingWithContext(aws.Context, *ecs.DeleteAccountSettingInput, ...request.Option) (*ecs.DeleteAccountSettingOutput, error)
	DeleteAccountSettingRequest(*ecs.DeleteAccountSettingInput) (*request.Request, *ecs.DeleteAccountSettingOutput)

	DeleteAttributes(*ecs.DeleteAttributesInput) (*ecs.DeleteAttributesOutput, error)
	DeleteAttributesWithContext(aws.Context, *ecs.DeleteAttributesInput, ...request.Option) (*ecs.DeleteAttributesOutput, error)
	DeleteAttributesRequest(*ecs.DeleteAttributesInput) (*request.Request, *ecs.DeleteAttributesOutput)

	DeleteCluster(*ecs.DeleteClusterInput) (*ecs.DeleteClusterOutput, error)
	DeleteClusterWithContext(aws.Context, *ecs.DeleteClusterInput, ...request.Option) (*ecs.DeleteClusterOutput, error)
	DeleteClusterRequest(*ecs.DeleteClusterInput) (*request.Request, *ecs.DeleteClusterOutput)

	DeleteService(*ecs.DeleteServiceInput) (*ecs.DeleteServiceOutput, error)
	DeleteServiceWithContext(aws.Context, *ecs.DeleteServiceInput, ...request.Option) (*ecs.DeleteServiceOutput, error)
	DeleteServiceRequest(*ecs.DeleteServiceInput) (*request.Request, *ecs.DeleteServiceOutput)

	DeleteTaskSet(*ecs.DeleteTaskSetInput) (*ecs.DeleteTaskSetOutput, error)
	DeleteTaskSetWithContext(aws.Context, *ecs.DeleteTaskSetInput, ...request.Option) (*ecs.DeleteTaskSetOutput, error)
	DeleteTaskSetRequest(*ecs.DeleteTaskSetInput) (*request.Request, *ecs.DeleteTaskSetOutput)

	DeregisterContainerInstance(*ecs.DeregisterContainerInstanceInput) (*ecs.DeregisterContainerInstanceOutput, error)
	DeregisterContainerInstanceWithContext(aws.Context, *ecs.DeregisterContainerInstanceInput, ...request.Option) (*ecs.DeregisterContainerInstanceOutput, error)
	DeregisterContainerInstanceRequest(*ecs.DeregisterContainerInstanceInput) (*request.Request, *ecs.DeregisterContainerInstanceOutput)

	DeregisterTaskDefinition(*ecs.DeregisterTaskDefinitionInput) (*ecs.DeregisterTaskDefinitionOutput, error)
	DeregisterTaskDefinitionWithContext(aws.Context, *ecs.DeregisterTaskDefinitionInput, ...request.Option) (*ecs.DeregisterTaskDefinitionOutput, error)
	DeregisterTaskDefinitionRequest(*ecs.DeregisterTaskDefinitionInput) (*request.Request, *ecs.DeregisterTaskDefinitionOutput)

	DescribeCapacityProviders(*ecs.DescribeCapacityProvidersInput) (*ecs.DescribeCapacityProvidersOutput, error)
	DescribeCapacityProvidersWithContext(aws.Context, *ecs.DescribeCapacityProvidersInput, ...request.Option) (*ecs.DescribeCapacityProvidersOutput, error)
	DescribeCapacityProvidersRequest(*ecs.DescribeCapacityProvidersInput) (*request.Request, *ecs.DescribeCapacityProvidersOutput)

	DescribeClusters(*ecs.DescribeClustersInput) (*ecs.DescribeClustersOutput, error)
	DescribeClustersWithContext(aws.Context, *ecs.DescribeClustersInput, ...request.Option) (*ecs.DescribeClustersOutput, error)
	DescribeClustersRequest(*ecs.DescribeClustersInput) (*request.Request, *ecs.DescribeClustersOutput)

	DescribeContainerInstances(*ecs.DescribeContainerInstancesInput) (*ecs.DescribeContainerInstancesOutput, error)
	DescribeContainerInstancesWithContext(aws.Context, *ecs.DescribeContainerInstancesInput, ...request.Option) (*ecs.DescribeContainerInstancesOutput, error)
	DescribeContainerInstancesRequest(*ecs.DescribeContainerInstancesInput) (*request.Request, *ecs.DescribeContainerInstancesOutput)

	DescribeServices(*ecs.DescribeServicesInput) (*ecs.DescribeServicesOutput, error)
	DescribeServicesWithContext(aws.Context, *ecs.DescribeServicesInput, ...request.Option) (*ecs.DescribeServicesOutput, error)
	DescribeServicesRequest(*ecs.DescribeServicesInput) (*request.Request, *ecs.DescribeServicesOutput)

	DescribeTaskDefinition(*ecs.DescribeTaskDefinitionInput) (*ecs.DescribeTaskDefinitionOutput, error)
	DescribeTaskDefinitionWithContext(aws.Context, *ecs.DescribeTaskDefinitionInput, ...request.Option) (*ecs.DescribeTaskDefinitionOutput, error)
	DescribeTaskDefinitionRequest(*ecs.DescribeTaskDefinitionInput) (*request.Request, *ecs.DescribeTaskDefinitionOutput)

	DescribeTaskSets(*ecs.DescribeTaskSetsInput) (*ecs.DescribeTaskSetsOutput, error)
	DescribeTaskSetsWithContext(aws.Context, *ecs.DescribeTaskSetsInput, ...request.Option) (*ecs.DescribeTaskSetsOutput, error)
	DescribeTaskSetsRequest(*ecs.DescribeTaskSetsInput) (*request.Request, *ecs.DescribeTaskSetsOutput)

	DescribeTasks(*ecs.DescribeTasksInput) (*ecs.DescribeTasksOutput, error)
	DescribeTasksWithContext(aws.Context, *ecs.DescribeTasksInput, ...request.Option) (*ecs.DescribeTasksOutput, error)
	DescribeTasksRequest(*ecs.DescribeTasksInput) (*request.Request, *ecs.DescribeTasksOutput)

	DiscoverPollEndpoint(*ecs.DiscoverPollEndpointInput) (*ecs.DiscoverPollEndpointOutput, error)
	DiscoverPollEndpointWithContext(aws.Context, *ecs.DiscoverPollEndpointInput, ...request.Option) (*ecs.DiscoverPollEndpointOutput, error)
	DiscoverPollEndpointRequest(*ecs.DiscoverPollEndpointInput) (*request.Request, *ecs.DiscoverPollEndpointOutput)

	ListAccountSettings(*ecs.ListAccountSettingsInput) (*ecs.ListAccountSettingsOutput, error)
	ListAccountSettingsWithContext(aws.Context, *ecs.ListAccountSettingsInput, ...request.Option) (*ecs.ListAccountSettingsOutput, error)
	ListAccountSettingsRequest(*ecs.ListAccountSettingsInput) (*request.Request, *ecs.ListAccountSettingsOutput)

	ListAttributes(*ecs.ListAttributesInput) (*ecs.ListAttributesOutput, error)
	ListAttributesWithContext(aws.Context, *ecs.ListAttributesInput, ...request.Option) (*ecs.ListAttributesOutput, error)
	ListAttributesRequest(*ecs.ListAttributesInput) (*request.Request, *ecs.ListAttributesOutput)

	ListAttributesPages(*ecs.ListAttributesInput, func(*ecs.ListAttributesOutput, bool) bool) error
	ListAttributesPagesWithContext(aws.Context, *ecs.ListAttributesInput, func(*ecs.ListAttributesOutput, bool) bool, ...request.Option) error

	ListClusters(*ecs.ListClustersInput) (*ecs.ListClustersOutput, error)
	ListClustersWithContext(aws.Context, *ecs.ListClustersInput, ...request.Option) (*ecs.ListClustersOutput, error)
	ListClustersRequest(*ecs.ListClustersInput) (*request.Request, *ecs.ListClustersOutput)

	ListClustersPages(*ecs.ListClustersInput, func(*ecs.ListClustersOutput, bool) bool) error
	ListClustersPagesWithContext(aws.Context, *ecs.ListClustersInput, func(*ecs.ListClustersOutput, bool) bool, ...request.Option) error

	ListContainerInstances(*ecs.ListContainerInstancesInput) (*ecs.ListContainerInstancesOutput, error)
	ListContainerInstancesWithContext(aws.Context, *ecs.ListContainerInstancesInput, ...request.Option) (*ecs.ListContainerInstancesOutput, error)
	ListContainerInstancesRequest(*ecs.ListContainerInstancesInput) (*request.Request, *ecs.ListContainerInstancesOutput)

	ListContainerInstancesPages(*ecs.ListContainerInstancesInput, func(*ecs.ListContainerInstancesOutput, bool) bool) error
	ListContainerInstancesPagesWithContext(aws.Context, *ecs.ListContainerInstancesInput, func(*ecs.ListContainerInstancesOutput, bool) bool, ...request.Option) error

	ListServices(*ecs.ListServicesInput) (*ecs.ListServicesOutput, error)
	ListServicesWithContext(aws.Context, *ecs.ListServicesInput, ...request.Option) (*ecs.ListServicesOutput, error)
	ListServicesRequest(*ecs.ListServicesInput) (*request.Request, *ecs.ListServicesOutput)

	ListServicesPages(*ecs.ListServicesInput, func(*ecs.ListServicesOutput, bool) bool) error
	ListServicesPagesWithContext(aws.Context, *ecs.ListServicesInput, func(*ecs.ListServicesOutput, bool) bool, ...request.Option) error

	ListTagsForResource(*ecs.ListTagsForResourceInput) (*ecs.ListTagsForResourceOutput, error)
	ListTagsForResourceWithContext(aws.Context, *ecs.ListTagsForResourceInput, ...request.Option) (*ecs.ListTagsForResourceOutput, error)
	ListTagsForResourceRequest(*ecs.ListTagsForResourceInput) (*request.Request, *ecs.ListTagsForResourceOutput)

	ListTaskDefinitionFamilies(*ecs.ListTaskDefinitionFamiliesInput) (*ecs.ListTaskDefinitionFamiliesOutput, error)
	ListTaskDefinitionFamiliesWithContext(aws.Context, *ecs.ListTaskDefinitionFamiliesInput, ...request.Option) (*ecs.ListTaskDefinitionFamiliesOutput, error)
	ListTaskDefinitionFamiliesRequest(*ecs.ListTaskDefinitionFamiliesInput) (*request.Request, *ecs.ListTaskDefinitionFamiliesOutput)

	ListTaskDefinitionFamiliesPages(*ecs.ListTaskDefinitionFamiliesInput, func(*ecs.ListTaskDefinitionFamiliesOutput, bool) bool) error
	ListTaskDefinitionFamiliesPagesWithContext(aws.Context, *ecs.ListTaskDefinitionFamiliesInput, func(*ecs.ListTaskDefinitionFamiliesOutput, bool) bool, ...request.Option) error

	ListTaskDefinitions(*ecs.ListTaskDefinitionsInput) (*ecs.ListTaskDefinitionsOutput, error)
	ListTaskDefinitionsWithContext(aws.Context, *ecs.ListTaskDefinitionsInput, ...request.Option) (*ecs.ListTaskDefinitionsOutput, error)
	ListTaskDefinitionsRequest(*ecs.ListTaskDefinitionsInput) (*request.Request, *ecs.ListTaskDefinitionsOutput)

	ListTaskDefinitionsPages(*ecs.ListTaskDefinitionsInput, func(*ecs.ListTaskDefinitionsOutput, bool) bool) error
	ListTaskDefinitionsPagesWithContext(aws.Context, *ecs.ListTaskDefinitionsInput, func(*ecs.ListTaskDefinitionsOutput, bool) bool, ...request.Option) error

	ListTasks(*ecs.ListTasksInput) (*ecs.ListTasksOutput, error)
	ListTasksWithContext(aws.Context, *ecs.ListTasksInput, ...request.Option) (*ecs.ListTasksOutput, error)
	ListTasksRequest(*ecs.ListTasksInput) (*request.Request, *ecs.ListTasksOutput)

	ListTasksPages(*ecs.ListTasksInput, func(*ecs.ListTasksOutput, bool) bool) error
	ListTasksPagesWithContext(aws.Context, *ecs.ListTasksInput, func(*ecs.ListTasksOutput, bool) bool, ...request.Option) error

	PutAccountSetting(*ecs.PutAccountSettingInput) (*ecs.PutAccountSettingOutput, error)
	PutAccountSettingWithContext(aws.Context, *ecs.PutAccountSettingInput, ...request.Option) (*ecs.PutAccountSettingOutput, error)
	PutAccountSettingRequest(*ecs.PutAccountSettingInput) (*request.Request, *ecs.PutAccountSettingOutput)

	PutAccountSettingDefault(*ecs.PutAccountSettingDefaultInput) (*ecs.PutAccountSettingDefaultOutput, error)
	PutAccountSettingDefaultWithContext(aws.Context, *ecs.PutAccountSettingDefaultInput, ...request.Option) (*ecs.PutAccountSettingDefaultOutput, error)
	PutAccountSettingDefaultRequest(*ecs.PutAccountSettingDefaultInput) (*request.Request, *ecs.PutAccountSettingDefaultOutput)

	PutAttributes(*ecs.PutAttributesInput) (*ecs.PutAttributesOutput, error)
	PutAttributesWithContext(aws.Context, *ecs.PutAttributesInput, ...request.Option) (*ecs.PutAttributesOutput, error)
	PutAttributesRequest(*ecs.PutAttributesInput) (*request.Request, *ecs.PutAttributesOutput)

	PutClusterCapacityProviders(*ecs.PutClusterCapacityProvidersInput) (*ecs.PutClusterCapacityProvidersOutput, error)
	PutClusterCapacityProvidersWithContext(aws.Context, *ecs.PutClusterCapacityProvidersInput, ...request.Option) (*ecs.PutClusterCapacityProvidersOutput, error)
	PutClusterCapacityProvidersRequest(*ecs.PutClusterCapacityProvidersInput) (*request.Request, *ecs.PutClusterCapacityProvidersOutput)

	RegisterContainerInstance(*ecs.RegisterContainerInstanceInput) (*ecs.RegisterContainerInstanceOutput, error)
	RegisterContainerInstanceWithContext(aws.Context, *ecs.RegisterContainerInstanceInput, ...request.Option) (*ecs.RegisterContainerInstanceOutput, error)
	RegisterContainerInstanceRequest(*ecs.RegisterContainerInstanceInput) (*request.Request, *ecs.RegisterContainerInstanceOutput)

	RegisterTaskDefinition(*ecs.RegisterTaskDefinitionInput) (*ecs.RegisterTaskDefinitionOutput, error)
	RegisterTaskDefinitionWithContext(aws.Context, *ecs.RegisterTaskDefinitionInput, ...request.Option) (*ecs.RegisterTaskDefinitionOutput, error)
	RegisterTaskDefinitionRequest(*ecs.RegisterTaskDefinitionInput) (*request.Request, *ecs.RegisterTaskDefinitionOutput)

	RunTask(*ecs.RunTaskInput) (*ecs.RunTaskOutput, error)
	RunTaskWithContext(aws.Context, *ecs.RunTaskInput, ...request.Option) (*ecs.RunTaskOutput, error)
	RunTaskRequest(*ecs.RunTaskInput) (*request.Request, *ecs.RunTaskOutput)

	StartTask(*ecs.StartTaskInput) (*ecs.StartTaskOutput, error)
	StartTaskWithContext(aws.Context, *ecs.StartTaskInput, ...request.Option) (*ecs.StartTaskOutput, error)
	StartTaskRequest(*ecs.StartTaskInput) (*request.Request, *ecs.StartTaskOutput)

	StopTask(*ecs.StopTaskInput) (*ecs.StopTaskOutput, error)
	StopTaskWithContext(aws.Context, *ecs.StopTaskInput, ...request.Option) (*ecs.StopTaskOutput, error)
	StopTaskRequest(*ecs.StopTaskInput) (*request.Request, *ecs.StopTaskOutput)

	SubmitAttachmentStateChanges(*ecs.SubmitAttachmentStateChangesInput) (*ecs.SubmitAttachmentStateChangesOutput, error)
	SubmitAttachmentStateChangesWithContext(aws.Context, *ecs.SubmitAttachmentStateChangesInput, ...request.Option) (*ecs.SubmitAttachmentStateChangesOutput, error)
	SubmitAttachmentStateChangesRequest(*ecs.SubmitAttachmentStateChangesInput) (*request.Request, *ecs.SubmitAttachmentStateChangesOutput)

	SubmitContainerStateChange(*ecs.SubmitContainerStateChangeInput) (*ecs.SubmitContainerStateChangeOutput, error)
	SubmitContainerStateChangeWithContext(aws.Context, *ecs.SubmitContainerStateChangeInput, ...request.Option) (*ecs.SubmitContainerStateChangeOutput, error)
	SubmitContainerStateChangeRequest(*ecs.SubmitContainerStateChangeInput) (*request.Request, *ecs.SubmitContainerStateChangeOutput)

	SubmitTaskStateChange(*ecs.SubmitTaskStateChangeInput) (*ecs.SubmitTaskStateChangeOutput, error)
	SubmitTaskStateChangeWithContext(aws.Context, *ecs.SubmitTaskStateChangeInput, ...request.Option) (*ecs.SubmitTaskStateChangeOutput, error)
	SubmitTaskStateChangeRequest(*ecs.SubmitTaskStateChangeInput) (*request.Request, *ecs.SubmitTaskStateChangeOutput)

	TagResource(*ecs.TagResourceInput) (*ecs.TagResourceOutput, error)
	TagResourceWithContext(aws.Context, *ecs.TagResourceInput, ...request.Option) (*ecs.TagResourceOutput, error)
	TagResourceRequest(*ecs.TagResourceInput) (*request.Request, *ecs.TagResourceOutput)

	UntagResource(*ecs.UntagResourceInput) (*ecs.UntagResourceOutput, error)
	UntagResourceWithContext(aws.Context, *ecs.UntagResourceInput, ...request.Option) (*ecs.UntagResourceOutput, error)
	UntagResourceRequest(*ecs.UntagResourceInput) (*request.Request, *ecs.UntagResourceOutput)

	UpdateClusterSettings(*ecs.UpdateClusterSettingsInput) (*ecs.UpdateClusterSettingsOutput, error)
	UpdateClusterSettingsWithContext(aws.Context, *ecs.UpdateClusterSettingsInput, ...request.Option) (*ecs.UpdateClusterSettingsOutput, error)
	UpdateClusterSettingsRequest(*ecs.UpdateClusterSettingsInput) (*request.Request, *ecs.UpdateClusterSettingsOutput)

	UpdateContainerAgent(*ecs.UpdateContainerAgentInput) (*ecs.UpdateContainerAgentOutput, error)
	UpdateContainerAgentWithContext(aws.Context, *ecs.UpdateContainerAgentInput, ...request.Option) (*ecs.UpdateContainerAgentOutput, error)
	UpdateContainerAgentRequest(*ecs.UpdateContainerAgentInput) (*request.Request, *ecs.UpdateContainerAgentOutput)

	UpdateContainerInstancesState(*ecs.UpdateContainerInstancesStateInput) (*ecs.UpdateContainerInstancesStateOutput, error)
	UpdateContainerInstancesStateWithContext(aws.Context, *ecs.UpdateContainerInstancesStateInput, ...request.Option) (*ecs.UpdateContainerInstancesStateOutput, error)
	UpdateContainerInstancesStateRequest(*ecs.UpdateContainerInstancesStateInput) (*request.Request, *ecs.UpdateContainerInstancesStateOutput)

	UpdateService(*ecs.UpdateServiceInput) (*ecs.UpdateServiceOutput, error)
	UpdateServiceWithContext(aws.Context, *ecs.UpdateServiceInput, ...request.Option) (*ecs.UpdateServiceOutput, error)
	UpdateServiceRequest(*ecs.UpdateServiceInput) (*request.Request, *ecs.UpdateServiceOutput)

	UpdateServicePrimaryTaskSet(*ecs.UpdateServicePrimaryTaskSetInput) (*ecs.UpdateServicePrimaryTaskSetOutput, error)
	UpdateServicePrimaryTaskSetWithContext(aws.Context, *ecs.UpdateServicePrimaryTaskSetInput, ...request.Option) (*ecs.UpdateServicePrimaryTaskSetOutput, error)
	UpdateServicePrimaryTaskSetRequest(*ecs.UpdateServicePrimaryTaskSetInput) (*request.Request, *ecs.UpdateServicePrimaryTaskSetOutput)

	UpdateTaskSet(*ecs.UpdateTaskSetInput) (*ecs.UpdateTaskSetOutput, error)
	UpdateTaskSetWithContext(aws.Context, *ecs.UpdateTaskSetInput, ...request.Option) (*ecs.UpdateTaskSetOutput, error)
	UpdateTaskSetRequest(*ecs.UpdateTaskSetInput) (*request.Request, *ecs.UpdateTaskSetOutput)

	WaitUntilServicesInactive(*ecs.DescribeServicesInput) error
	WaitUntilServicesInactiveWithContext(aws.Context, *ecs.DescribeServicesInput, ...request.WaiterOption) error

	WaitUntilServicesStable(*ecs.DescribeServicesInput) error
	WaitUntilServicesStableWithContext(aws.Context, *ecs.DescribeServicesInput, ...request.WaiterOption) error

	WaitUntilTasksRunning(*ecs.DescribeTasksInput) error
	WaitUntilTasksRunningWithContext(aws.Context, *ecs.DescribeTasksInput, ...request.WaiterOption) error

	WaitUntilTasksStopped(*ecs.DescribeTasksInput) error
	WaitUntilTasksStoppedWithContext(aws.Context, *ecs.DescribeTasksInput, ...request.WaiterOption) error
}

var _ ECSAPI = (*ecs.ECS)(nil)


text:
package util

import (
	"fmt"
	"runtime"
)

// VersionString returns a version string that should be printed with the -v
// or the --version flag. It gets the components from the following keys from
// the options:
// program-name
// program-version
// program-timestamp
func VersionString(opts Options) string {
	progName := opts.Get("program-name", "undefined")
	progVersion := opts.Get("program-version", "undefined")
	progTimestamp := opts.Get("program-timestamp", "undefined")

	rest := ""
	if opts.IsSet("program-buildgoos") {
		rest = fmt.Sprintf("\nBuilt on %s/%s",
			opts.Get("program-buildgoos", ""),
			opts.Get("program-buildgoarch", ""))
	}

	return fmt.Sprintf("%s: %s\nBuilt %v with: %s/%s for %s/%s%s",
		progName, progVersion, progTimestamp, runtime.Compiler,
		runtime.Version(), runtime.GOOS, runtime.GOARCH, rest)
}

redpajama_set_name: RedPajamaGithub


text: package org.apache.pulsar.structuredeventlog.slf4j;


text:
<?xml version="1.0"?>
<!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD 3.0//EN"
        "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">

<hibernate-mapping>
    <class name="com.alev.entity.User" table="user" catalog="mydbtest">
        <id name="userId" type="java.lang.Integer">
            <column name="USER_ID" />
            <generator class="identity" />
        </id>
        <property name="firstName" type="string">
            <column name="FIRST_NAME" length="20" not-null="true" unique="true" />
        </property>
        <property name="lastName" type="string">
            <column name="LAST_NAME" length="20" not-null="true" unique="true" />
        </property>
    </class>
</hibernate-mapping>


text:
struct XsVersion;
struct XsString;

#ifdef __cplusplus
extern "C" {
#endif

XDA_DLL_API void xdaDllVersion(struct XsVersion* version);
XDA_DLL_API void xdaDllPath(struct XsString* path);
XDA_DLL_API void xdaSetLogPath(const struct XsString* path);

#ifdef __cplusplus
}
#endif

#endif	// file guard


text:
import { shallowMount } from '@vue/test-utils'
import VueSelect from '../src/components/Select.vue'
import Vue from 'vue'

/**
 * Trigger a submit event on the search
 * input with a provided search text.
 *
 * @param Wrapper {Wrapper<Vue>}
 * @param searchText
 */
export const searchSubmit = async (Wrapper, searchText = false) => {
  const search = Wrapper.findComponent({ ref: 'search' })
  await search.trigger('focus')

  if (searchText) {
    Wrapper.vm.search = searchText
    await Wrapper.vm.$nextTick()
  }

  await search.trigger('keydown.enter')
  await Wrapper.vm.$nextTick()
}

/**
 * Focus the input, enter some search text, hit return.
 * @param Wrapper {Wrapper<Vue>}
 * @param searchText
 * @return {Promise<void>}
 */
export const selectTag = async (Wrapper, searchText) => {
  Wrapper.vm.$refs.search.focus()
  await Wrapper.vm.$nextTick()

  Wrapper.vm.search = searchText
  await Wrapper.vm.$nextTick()

  Wrapper.findComponent({ ref: 'search' }).trigger('keydown.enter')
  await Wrapper.vm.$nextTick()
}

/**
 * Create a new VueSelect instance with
 * a provided set of props.
 * @param propsData
 * @returns {Wrapper<Vue>}
 */
export const selectWithProps = (propsData = {}) => {
  return shallowMount(VueSelect, { propsData })
}

/**
 * Returns a Wrapper with a v-select component.
 * @param props
 * @param options
 * @return {Wrapper<Vue>}
 */
export const mountDefault = (props = {}, options = {}) => {
  return shallowMount(VueSelect, {
    propsData: {
      options: ['one', 'two', 'three'],
      ...props,
    },
    ...options,
  })
}

/**
 * Returns a v-select component directly.
 * @param props
 * @param options
 * @return {Vue | Element | Vue[] | Element[]}
 */
export const mountWithoutTestUtils = (props = {}, options = {}) => {
  return new Vue({
    components: { VueSelect },
    render: (createEl) =>
      createEl('vue-select', {
        ref: 'select',
        props: { options: ['one', 'two', 'three'], ...props },
        ...options,
      }),
  }).$mount().$refs.select
}


text:
'use strict'

// Field svg (a field that contains a pure svg)

// TODOs:
//  - add margins

BB.FieldSvg = BB.Field.prototype.create({
  constructor: function(svg, parent, options)  {
    BB.Field.prototype.constructor.call(this, 'Svg');
    this.children = [];
    this.container = null; // contains attached elements(border) and SVG document
    this.childContainer = null; // svg group that contains all children
    this.root = null;
    if (svg && typeof(svg) == 'object') {
      this.svg = svg;
    } else {
      throw 'Svg must be a valid SVG.js object';
      return;
    }
    if (parent) {
      this.parent = parent;
    }
    if (!options) {
      return;
    }
    if (options.render) {
      this.render();
    }
  },

  render: function(){
    if (!this.parent) {
      throw 'FieldSvg must have a parent to be rendered';
      return;
    }
    if (!this.rendered_) {
      this.container = this.parent.container.group();
      this.container.add(this.svg);
    }
    if (this.parent.attachDraggable) {
      this.parent.attachDraggable.push(this.container); // This text can drag all parent
    }
    this.rendered_ = true;
  }
});


text:
package com.android.volley.mock;

import com.android.volley.NetworkResponse;
import com.android.volley.Request;
import com.android.volley.Response;

import java.util.concurrent.PriorityBlockingQueue;
import java.util.concurrent.Semaphore;
import java.util.concurrent.TimeUnit;
import java.util.concurrent.TimeoutException;

// TODO: the name of this class sucks
@SuppressWarnings({"serial", "rawtypes"})
public class WaitableQueue extends PriorityBlockingQueue<Request> {
    private final Request<?> mStopRequest = new MagicStopRequest();
    private final Semaphore mStopEvent = new Semaphore(0);

    // TODO: this isn't really "until empty" it's "until next call to take() after empty"
    public void waitUntilEmpty(long timeoutMillis) throws TimeoutException, InterruptedException {
        add(mStopRequest);
        if (!mStopEvent.tryAcquire(timeoutMillis, TimeUnit.MILLISECONDS)) {
            throw new TimeoutException();
        }
    }

    @Override
    public Request<?> take() throws InterruptedException {
        Request<?> item = super.take();
        if (item == mStopRequest) {
            mStopEvent.release();
            return take();
        }
        return item;
    }

    private static class MagicStopRequest extends Request<Object> {
        public MagicStopRequest() {
            super("", null);
        }

        @Override
        public Priority getPriority() {
            return Priority.LOW;
        }

        @Override
        protected Response<Object> parseNetworkResponse(NetworkResponse response) {
            return null;
        }

        @Override
        protected void deliverResponse(Object response) {
        }
    }
}


text:
 var lostBasketApp = angular.module('lostBasketApp', []);

 lostBasketApp.controller('lostBasketController', function ($scope, $http){
   $http.get('inputs.json').success(function(data) {
     $scope.inputs = data;

   $scope.selected = [];

   $scope.exist = function (selectedItem) {
   return $scope.selected.indexOf(selectedItem) > -1;
   }

   $scope.select = function(selectedItem) {
   var index = $scope.selected.indexOf(selectedItem);
   if ( index > -1) {
   $scope.selected.splice( index, 1);
   } else {
   $scope.selected.push(selectedItem);
   }
   }
 });

    });


text:
moba
====

MOBA made in JavaScript


text:
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
  <modelVersion>4.0.0</modelVersion>
  <groupId>org.codehaus.mojo.aspectj.it</groupId>
  <artifactId>MASPECTJ-99</artifactId>
  <version>0.0.1-SNAPSHOT</version>
  <description>Verifies that the absence of code and aspect do not crash the plugin.</description>

  <dependencies>
    <dependency>
      <groupId>org.aspectj</groupId>
      <artifactId>aspectjrt</artifactId>
      <version>@aspectjVersion@</version>
    </dependency>
  </dependencies>

  <build>
    <plugins>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-compiler-plugin</artifactId>
        <configuration>
          <source>1.8</source>
          <target>1.8</target>
        </configuration>
      </plugin>
      <plugin>
        <groupId>org.codehaus.mojo</groupId>
        <artifactId>aspectj-maven-plugin</artifactId>
        <version>@project.version@</version>
        <executions>
          <execution>
            <goals>
              <goal>compile</goal>
            </goals>
          </execution>
        </executions>
      </plugin>
    </plugins>
  </build>
</project>


text:
<!DOCTYPE html>

    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <title>DATIM Data Submission</title>

    <link href="css/font-awesome.min.css" rel="stylesheet" />

    <link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet"/>
    <link href='https://fonts.googleapis.com/css?family=Roboto:400,300,500,700' rel='stylesheet' type='text/css'/>


text:
<title>Object Property: isDerivedBy</title>
<meta http-equiv='content-type' content='text/html;charset=utf8'>
<link rel='stylesheet' href='../default.css' type='text/css' />

Object Property: isDerivedBy

http://purl.org/minim/minim#isDerivedBy

Annotations (2)

comment "Indicates a rule that, when its test evaluates to True, indicates that a requirement is satisfied." ()

label "is derived by" ()

Domains (1)

Requirement

Ranges (1)

Rule

Usage (2)

ObjectProperty: isDerivedBy

Requirement ≡ isDerivedBy exactly 1 Rule and seq only string


text:
An [Entity Framework 6](https://msdn.com/data/ef) based SQL provider-neutral job storage implementation for [Hangfire](http://hangfire.io) developed by Sergey Odinokov.

Please note that Hangfire.EntityFramework is currently under development and should **NOT** be used in production.

## License

Hangfire.EntityFramework licensed under the [MIT License](https://raw.githubusercontent.com/sergezhigunov/Hangfire.EntityFramework/master/LICENSE).


text:
class Mailer < ActionMailer::Base
  include Roadie::Rails::Automatic

  helper :application
end


text:
/*
 * DO NOT EDIT THIS CODE BY HAND! It has been generated with jsvcgen.
 */
package com.solidfire.element.api;

import com.solidfire.gson.Gson;
import com.solidfire.core.client.Attributes;
import com.solidfire.gson.annotations.SerializedName;
import com.solidfire.core.annotation.Since;
import com.solidfire.core.javautil.Optional;
import java.io.Serializable;
import java.util.Arrays;
import java.util.HashMap;
import java.util.Objects;

/**
 * ModifyClusterAdminRequest
 * You can use ModifyClusterAdmin to change the settings for a cluster admin, LDAP cluster admin,
 * or third party Identity Provider (IdP) cluster admin.  You cannot change access for the
 * administrator cluster admin account.
 **/

public class ModifyClusterAdminRequest implements Serializable {

    public static final long serialVersionUID = 1920948106655815200L;
    @SerializedName("clusterAdminID") private Long clusterAdminID;
    @SerializedName("password") private Optional<String> password;
    @SerializedName("access") private Optional<String[]> access;
    @SerializedName("attributes") private Optional<Attributes> attributes;
    // empty constructor
    @Since("7.0")
    public ModifyClusterAdminRequest() {}

    // parameterized constructor
    @Since("7.0")
    public ModifyClusterAdminRequest(
        Long clusterAdminID,
        Optional<String> password,
        Optional<String[]> access,
        Optional<Attributes> attributes
    )
    {
        this.clusterAdminID = clusterAdminID;
        this.password = (password == null) ? Optional.<String>empty() : password;
        this.access = (access == null) ? Optional.<String[]>empty() : access;
        this.attributes = (attributes == null) ? Optional.<Attributes>empty() : attributes;
    }

    /**
     * ClusterAdminID for the cluster admin, LDAP cluster admin, or IdP cluster admin to modify.
     **/
    public Long getClusterAdminID() { return this.clusterAdminID; }

    public void setClusterAdminID(Long clusterAdminID) {
        this.clusterAdminID = clusterAdminID;
    }
    /**
     * Password used to authenticate this cluster admin.
     * This parameter does not apply for an LDAP or IdP cluster admin.
     **/
    public Optional<String> getPassword() { return this.password; }

    public void setPassword(Optional<String> password) {
        this.password = (password == null) ? Optional.<String>empty() : password;
    }
    /**
     * Controls which methods this cluster admin can use. For more details, see Access Control in the Element API Reference Guide.
     **/
    public Optional<String[]> getAccess() { return this.access; }

    public void setAccess(Optional<String[]> access) {
        this.access = (access == null) ? Optional.<String[]>empty() : access;
    }
    /**
     * List of name-value pairs in JSON object format.
     **/
    public Optional<Attributes> getAttributes() { return this.attributes; }

    public void setAttributes(Optional<Attributes> attributes) {
        this.attributes = (attributes == null) ? Optional.<Attributes>empty() : attributes;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;

        ModifyClusterAdminRequest that = (ModifyClusterAdminRequest) o;

        return
            Objects.equals(clusterAdminID, that.clusterAdminID) &&
            Objects.equals(password, that.password) &&
            Objects.equals(access, that.access) &&
            Objects.equals(attributes, that.attributes);
    }

    @Override
    public int hashCode() {
        return Objects.hash( clusterAdminID,password,access,attributes );
    }

    public java.util.Map<String, Object> toMap() {
        java.util.Map<String, Object> map = new HashMap<>();
        map.put("clusterAdminID", clusterAdminID);
        map.put("password", password);
        map.put("access", access);
        map.put("attributes", attributes);
        return map;
    }

    @Override
    public String toString() {
        final StringBuilder sb = new StringBuilder();
        Gson gson = new Gson();
        sb.append( "{ " );

        sb.append(" clusterAdminID : ").append(gson.toJson(clusterAdminID)).append(",");
        if(null != password && password.isPresent()){
            sb.append(" password : ").append(gson.toJson(password)).append(",");
        }
        else{
            sb.append(" password : ").append("null").append(",");
        }
        if(null != access && access.isPresent()){
            sb.append(" access : ").append(gson.toJson(access)).append(",");
        }
        else{
            sb.append(" access : ").append("null").append(",");
        }
        if(null != attributes && attributes.isPresent()){
            sb.append(" attributes : ").append(gson.toJson(attributes)).append(",");
        }
        else{
            sb.append(" attributes : ").append("null").append(",");
        }
        sb.append( " }" );

        if(sb.lastIndexOf(", }") != -1)
            sb.deleteCharAt(sb.lastIndexOf(", }"));

        return sb.toString();
    }

    public static Builder builder() {
        return new Builder();
    }

    public final Builder asBuilder() {
        return new Builder().buildFrom(this);
    }

    public static class Builder {
        private Long clusterAdminID;
        private Optional<String> password;
        private Optional<String[]> access;
        private Optional<Attributes> attributes;

        private Builder() { }

        public ModifyClusterAdminRequest build() {
            return new ModifyClusterAdminRequest (
                         this.clusterAdminID,
                         this.password,
                         this.access,
                         this.attributes);
        }

        private ModifyClusterAdminRequest.Builder buildFrom(final ModifyClusterAdminRequest req) {
            this.clusterAdminID = req.clusterAdminID;
            this.password = req.password;
            this.access = req.access;
            this.attributes = req.attributes;

            return this;
        }

        public ModifyClusterAdminRequest.Builder clusterAdminID(final Long clusterAdminID) {
            this.clusterAdminID = clusterAdminID;
            return this;
        }

        public ModifyClusterAdminRequest.Builder optionalPassword(final String password) {
            this.password = (password == null) ? Optional.<String>empty() : Optional.of(password);
            return this;
        }

        public ModifyClusterAdminRequest.Builder optionalAccess(final String[] access) {
            this.access = (access == null) ? Optional.<String[]>empty() : Optional.of(access);
            return this;
        }

        public ModifyClusterAdminRequest.Builder optionalAttributes(final Attributes attributes) {
            this.attributes = (attributes == null) ? Optional.<Attributes>empty() : Optional.of(attributes);
            return this;
        }

    }
}


text:
using UnityEngine;
using System.Collections;
using UnityEngine.UI;

public class AI_Bubble : MonoBehaviour {

    public float maxLife = 2;

    private float currentLife = 0;
    private float MoveSpeed = 1f;

    public Vector3 initialWorldPosition;

    // Use this for initialization
    void Start () {
        transform.rotation = Quaternion.identity;
    }

	// Update is called once per frame
	void Update ()
    {
        if (currentLife > maxLife)
        {
            Destroy(gameObject);
        }

        currentLife += Time.deltaTime;

        initialWorldPosition += transform.up * Time.deltaTime * MoveSpeed;
        transform.position = Camera.main.WorldToScreenPoint(initialWorldPosition);

        // Make it smaller as its life extends
        //transform.localScale = (1-(currentLife / maxLife))* initialSize;
        //transform.localScale = new Vector3(scale, scale, scale);

        changeImageAlpha(transform);
    }

    private void changeImageAlpha(Transform transform)
    {
        Image image = transform.GetComponent<Image>();
        if (image != null)
        {
            image.color = new Color(image.color.r, image.color.g, image.color.b, (1 - (currentLife / maxLife)));
        }

        foreach(Transform t in transform)
        {
            changeImageAlpha(t);
        }
    }
}


text:
using System;
using System.Collections.Immutable;
using System.Threading.Tasks;

namespace RoverMob.Messaging
{
    public class NoOpMessageStore : IMessageStore
    {
        private ImmutableDictionary<Guid, ImmutableList<Message>> _messagesByObjectId =
            ImmutableDictionary<Guid, ImmutableList<Message>>.Empty;

        public Task<ImmutableList<Message>> LoadAsync(Guid objectId)
        {
            var messages = _messagesByObjectId.GetValueOrDefault(
                objectId, ImmutableList<Message>.Empty);
            return Task.FromResult(messages);
        }

        public void Save(Message message)
        {
            var objectId = message.ObjectId;
            var messages = _messagesByObjectId.GetValueOrDefault(
                objectId, ImmutableList<Message>.Empty);
            _messagesByObjectId = _messagesByObjectId.SetItem(
                objectId, messages.Add(message));
        }

        public Task<Guid?> GetUserIdentifierAsync(string role)
        {
            return Task.FromResult((Guid?)Guid.NewGuid());
        }

        public void SaveUserIdentifier(string role, Guid userIdentifier)
        {
        }
    }
}


text:
// Copyright 2000-2021 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
package com.intellij.xdebugger.impl.ui.tree.nodes;

import com.intellij.openapi.application.ApplicationManager;
import com.intellij.openapi.editor.Document;
import com.intellij.openapi.fileEditor.FileDocumentManager;
import com.intellij.openapi.util.Comparing;
import com.intellij.openapi.util.NlsSafe;
import com.intellij.openapi.util.registry.Registry;
import com.intellij.openapi.util.text.StringUtil;
import com.intellij.openapi.vfs.VirtualFile;
import com.intellij.ui.ColoredTextContainer;
import com.intellij.ui.SimpleTextAttributes;
import com.intellij.util.ThreeState;
import com.intellij.xdebugger.XDebugSession;
import com.intellij.xdebugger.XDebuggerBundle;
import com.intellij.xdebugger.XExpression;
import com.intellij.xdebugger.XSourcePosition;
import com.intellij.xdebugger.frame.*;
import com.intellij.xdebugger.frame.presentation.XValuePresentation;
import com.intellij.xdebugger.impl.frame.XDebugView;
import com.intellij.xdebugger.impl.frame.XValueMarkers;
import com.intellij.xdebugger.impl.frame.XVariablesView;
import com.intellij.xdebugger.impl.inline.XDebuggerInlayUtil;
import com.intellij.xdebugger.impl.pinned.items.PinToTopUtilKt;
import com.intellij.xdebugger.impl.pinned.items.actions.XDebuggerPinToTopAction;
import com.intellij.xdebugger.impl.ui.DebuggerUIUtil;
import com.intellij.xdebugger.impl.ui.XDebuggerUIConstants;
import com.intellij.xdebugger.impl.ui.tree.ValueMarkup;
import com.intellij.xdebugger.impl.ui.tree.XDebuggerTree;
import com.intellij.xdebugger.settings.XDebuggerSettingsManager;
import org.jetbrains.annotations.NonNls;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
import org.jetbrains.concurrency.Promise;

import javax.swing.*;
import java.awt.event.MouseEvent;
import java.util.Comparator;

public class XValueNodeImpl extends XValueContainerNode<XValue> implements XValueNode, XCompositeNode, XValueNodePresentationConfigurator.ConfigurableXValueNode, RestorableStateNode {
  public static final Comparator<XValueNodeImpl> COMPARATOR = (o1, o2) -> StringUtil.naturalCompare(o1.getName(), o2.getName());

  private static final int MAX_NAME_LENGTH = 100;

  @NlsSafe
  private final String myName;
  @Nullable
  private String myRawValue;
  private XFullValueEvaluator myFullValueEvaluator;
  private boolean myChanged;
  private XValuePresentation myValuePresentation;

  //todo[nik] annotate 'name' with @NotNull
  public XValueNodeImpl(XDebuggerTree tree, @Nullable XDebuggerTreeNode parent, String name, @NotNull XValue value) {
    super(tree, parent, true, value);
    myName = name;

    value.computePresentation(this, XValuePlace.TREE);

    // add "Collecting" message only if computation is not yet done
    if (!isComputed()) {
      if (myName != null) {
        myText.append(myName, XDebuggerUIConstants.VALUE_NAME_ATTRIBUTES);
        myText.append(XDebuggerUIConstants.EQ_TEXT, SimpleTextAttributes.REGULAR_ATTRIBUTES);
      }
      myText.append(XDebuggerUIConstants.getCollectingDataMessage(), XDebuggerUIConstants.COLLECTING_DATA_HIGHLIGHT_ATTRIBUTES);
    }
  }

  @Override
  public void setPresentation(@Nullable Icon icon, @NonNls @Nullable String type, @NonNls @NotNull String value, boolean hasChildren) {
    XValueNodePresentationConfigurator.setPresentation(icon, type, value, hasChildren, this);
  }

  @Override
  public void setPresentation(@Nullable Icon icon, @NonNls @Nullable String type, @NonNls @NotNull String separator,
                              @NonNls @Nullable String value, boolean hasChildren) {
    XValueNodePresentationConfigurator.setPresentation(icon, type, separator, value, hasChildren, this);
  }

  @Override
  public void setPresentation(@Nullable Icon icon, @NotNull XValuePresentation presentation, boolean hasChildren) {
    XValueNodePresentationConfigurator.setPresentation(icon, presentation, hasChildren, this);
  }

  @Override
  public void applyPresentation(@Nullable Icon icon, @NotNull XValuePresentation valuePresentation, boolean hasChildren) {
    // extra check for obsolete nodes - tree root was changed
    // too dangerous to put this into isObsolete - it is called from anywhere, not only EDT
    if (isObsolete()) return;

    setIcon(icon);
    boolean refresh = myValuePresentation != null;
    myValuePresentation = valuePresentation;
    myRawValue = XValuePresentationUtil.computeValueText(valuePresentation);
    if (XDebuggerSettingsManager.getInstance().getDataViewSettings().isShowValuesInline()) {
      updateInlineDebuggerData(refresh);
    }
    updateText();
    setLeaf(!hasChildren);
    fireNodeChanged();
    myTree.nodeLoaded(this, myName);
  }

  private void updateInlineDebuggerData(boolean refresh) {
    if (refresh) {
      if (!Registry.is("debugger.show.values.use.inlays")) {
        myTree.updateEditor();
      }
      return;
    }
    try {
      XDebugSession session = XDebugView.getSession(getTree());
      final XSourcePosition debuggerPosition = session == null ? null : session.getCurrentPosition();
      if (debuggerPosition == null) {
        return;
      }

      final XInlineDebuggerDataCallback callback = new XInlineDebuggerDataCallback() {
        @Override
        public void computed(XSourcePosition position) {
          if (isObsolete() || position == null) return;
          VirtualFile file = position.getFile();
          // filter out values from other files
          if (!Comparing.equal(debuggerPosition.getFile(), file)) {
            return;
          }
          final Document document = FileDocumentManager.getInstance().getDocument(file);
          if (document == null) return;

          XVariablesView.InlineVariablesInfo data = XVariablesView.InlineVariablesInfo.get(session);
          if (data == null) {
            return;
          }

          if (!showAsInlay(session, position, document)) {
            data.put(file, position, XValueNodeImpl.this, document.getModificationStamp());

            myTree.updateEditor();
          }
        }
      };

      if (getValueContainer().computeInlineDebuggerData(callback) == ThreeState.UNSURE) {
        getValueContainer().computeSourcePosition(callback::computed);
      }
    }
    catch (Exception ignore) {
    }
  }

  private boolean showAsInlay(XDebugSession session, XSourcePosition position, Document document) {
    if (Registry.is("debugger.show.values.use.inlays")) {
      if (position.getLine() >= 0 &&
          XDebuggerInlayUtil.getInstance(session.getProject()).createLineEndInlay(this, session, position, document)) {
        return true;
      }
    }

    return false;
  }

  @Override
  public void setFullValueEvaluator(@NotNull final XFullValueEvaluator fullValueEvaluator) {
    invokeNodeUpdate(() -> {
      myFullValueEvaluator = fullValueEvaluator;
      fireNodeChanged();
    });
  }

  public void clearFullValueEvaluator() {
    myFullValueEvaluator = null;
  }

  private void updateText() {
    myText.clear();
    XValueMarkers<?, ?> markers = myTree.getValueMarkers();
    if (markers != null) {
      ValueMarkup markup = markers.getMarkup(getValueContainer());
      if (markup != null) {
        myText.append("[" + markup.getText() + "] ", new SimpleTextAttributes(SimpleTextAttributes.STYLE_BOLD, markup.getColor()));
      }
    }
    if (myValuePresentation.isShowName()) {
      appendName();
    }
    buildText(myValuePresentation, myText);
  }

  private void appendName() {
    if (!StringUtil.isEmpty(myName)) {
      SimpleTextAttributes attributes = myChanged ? XDebuggerUIConstants.CHANGED_VALUE_ATTRIBUTES : XDebuggerUIConstants.VALUE_NAME_ATTRIBUTES;
      XValuePresentationUtil.renderValue(myName, myText, attributes, MAX_NAME_LENGTH, null);
    }
  }

  public static void buildText(@NotNull XValuePresentation valuePresenter, @NotNull ColoredTextContainer text) {
    buildText(valuePresenter, text, true);
  }

  public static void buildText(@NotNull XValuePresentation valuePresenter, @NotNull ColoredTextContainer text, boolean appendSeparator) {
    if (appendSeparator) {
      XValuePresentationUtil.appendSeparator(text, valuePresenter.getSeparator());
    }
    String type = valuePresenter.getType();
    if (type != null) {
      text.append("{" + type + "} ", XDebuggerUIConstants.TYPE_ATTRIBUTES);
    }
    valuePresenter.renderValue(new XValueTextRendererImpl(text));
  }

  @Override
  public void markChanged() {
    if (myChanged) return;

    ApplicationManager.getApplication().assertIsDispatchThread();
    myChanged = true;
    if (myName != null && myValuePresentation != null) {
      updateText();
      fireNodeChanged();
    }
  }

  /** always compute evaluate expression from the base value container to avoid recalculation for watches
   * @see com.intellij.xdebugger.impl.ui.tree.nodes.WatchNodeImpl#getValueContainer()
   */
  @NotNull
  public final Promise<XExpression> calculateEvaluationExpression() {
    return myValueContainer.calculateEvaluationExpression();
  }

  @Nullable
  public XFullValueEvaluator getFullValueEvaluator() {
    return myFullValueEvaluator;
  }

  @Nullable
  @Override
  public XDebuggerTreeNodeHyperlink getLink() {
    if (myFullValueEvaluator != null) {
      return new XDebuggerTreeNodeHyperlink(myFullValueEvaluator.getLinkText()) {
        @Override
        public boolean alwaysOnScreen() {
          return true;
        }

        @Override
        public void onClick(MouseEvent event) {
          if (myFullValueEvaluator.isShowValuePopup()) {
            DebuggerUIUtil.showValuePopup(myFullValueEvaluator, event, myTree.getProject(), null);
          }
          else {
            new HeadlessValueEvaluationCallback(XValueNodeImpl.this).startFetchingValue(myFullValueEvaluator);
          }
          event.consume();
        }
      };
    }
    return null;
  }

  @Override
  @Nullable
  public String getName() {
    return myName;
  }

  @Nullable
  public XValuePresentation getValuePresentation() {
    return myValuePresentation;
  }

  @Override
  @Nullable
  public String getRawValue() {
    return myRawValue;
  }

  @Override
  public boolean isComputed() {
    return myValuePresentation != null;
  }

  public void setValueModificationStarted() {
    ApplicationManager.getApplication().assertIsDispatchThread();
    myRawValue = null;
    myText.clear();
    appendName();
    XValuePresentationUtil.appendSeparator(myText, myValuePresentation.getSeparator());
    myText.append(XDebuggerUIConstants.getModifyingValueMessage(), XDebuggerUIConstants.MODIFYING_VALUE_HIGHLIGHT_ATTRIBUTES);
    setLeaf(true);
    fireNodeStructureChanged();
  }

  @Override
  public String toString() {
    return getName();
  }

  @Nullable
  @Override
  public Object getIconTag() {
    if (!getTree().getPinToTopManager().isEnabled()) {
        return null;
    }

    if (!PinToTopUtilKt.canBePinned(this))
      return null;

    return new XDebuggerTreeNodeHyperlink(XDebuggerBundle.message("xdebugger.pin.to.top.action")) {
      @Override
      public void onClick(MouseEvent event) {
        XDebuggerPinToTopAction.Companion.pinToTopField(event, XValueNodeImpl.this);
      }
    };
  }
}


text:
package com.sksamuel.elastic4s.bulk

import java.util.concurrent.TimeUnit

import com.sksamuel.elastic4s.delete.{DeleteByIdDefinition, DeleteExecutables}
import com.sksamuel.elastic4s.index.IndexExecutables
import com.sksamuel.elastic4s.indexes.IndexDefinition
import org.elasticsearch.client.Client

import scala.concurrent.duration._
import scala.concurrent.{Future, Promise}
import scala.util.control.NonFatal

class BulkProcessor(c: Client, processor: org.elasticsearch.action.bulk.BulkProcessor) {

  private val execs = new IndexExecutables with DeleteExecutables {}

  def add(index: IndexDefinition) = processor.add(execs.IndexDefinitionExecutable.builder(c, index).request())
  def add(delete: DeleteByIdDefinition) = processor.add(execs.DeleteByIdDefinitionExecutable.builder(c, delete).request())

  def close(duration: FiniteDuration): Boolean = processor.awaitClose(duration.toNanos, TimeUnit.NANOSECONDS)

  def flush() = processor.flush()

  def close(): Future[Unit] = {
    val promise = Promise[Unit]
    new Thread(new Runnable {
      override def run(): Unit = {
        try {
          close(Integer.MAX_VALUE.days)
          promise.success(())
        } catch {
          case NonFatal(e) =>
            promise.failure(e)
        }
      }
    }).start()
    promise.future
  }
}


text:
layout: post
title: Gilt Featured at Brand Innovators Fashion Week
date: '2014-09-11T11:37:49-04:00'
tags:
- Gilt
- Gilt Groupe
- Gilt Tech
- gilttech
- Dominique Essig
- Product Management
- Brand Innovators Fashion Week
- nyfw 2014
- NYFW
- Brand Innovators
tumblr_url: http://tech.gilt.com/post/97224213059/gilt-featured-at-brand-innovators-fashion-week
---

Gilt VP Product Management and User Experience Dominique Essig is one of the featured speakers at tomorrow’s Brand Innovators Fashion Week: a summit for brand marketers and managers, media directors and others in the digital marketing world. Dom will be a panelist at “Technology Rocks the Runway," a panel on how fashion and beauty brands are using cutting-edge technologies to engage with consumers. Go here to register!


text:
package io.github.gefangshuai.springbootapp;

import io.github.gefangshuai.springbootbase.core.AppApplicationContext;
import io.github.gefangshuai.springbootapp.core.AppSettings;
import org.apache.shiro.SecurityUtils;
import org.apache.shiro.subject.Subject;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.builder.SpringApplicationBuilder;
import org.springframework.boot.context.properties.EnableConfigurationProperties;
import org.springframework.boot.context.web.SpringBootServletInitializer;
import org.springframework.context.ApplicationContext;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.ModelAttribute;
import org.springframework.web.bind.annotation.RequestMapping;

import javax.annotation.Resource;

@SpringBootApplication
@EnableConfigurationProperties({AppSettings.class})
@Controller
public class SpringdemoApplication extends SpringBootServletInitializer {

    @Resource
    private AppSettings appSettings;

    @ModelAttribute
    public void setAppSettings(Model model) {
        model.addAttribute("appSettings", appSettings);
    }

    @RequestMapping("/")
    public String greeting(Model model) {
        return "index";
    }

    @RequestMapping(value = "/login")
    public String login() {
        Subject subject = SecurityUtils.getSubject();
        if (subject.isAuthenticated()) {
            return "redirect:/";
        } else {
            return "login";
        }
    }

    @RequestMapping("logout")
    public String logout() {
        SecurityUtils.getSubject().logout();
        return "redirect:/login";
    }

    @RequestMapping("/404")
    public String error404() {
        return "error/404";
    }

    public static void main(String[] args) {
        ApplicationContext ctx = SpringApplication.run(SpringdemoApplication.class, args);
        AppApplicationContext.getInstance().setApplicationContext(ctx);
    }

    @Override
    protected SpringApplicationBuilder configure(SpringApplicationBuilder application) {
        return application.sources(applicationClass);
    }

    private static Class<SpringdemoApplication> applicationClass = SpringdemoApplication.class;
}


text:
import {getExistingServiceForWindow} from './service';

/**
 * @param {!Window} window
 * @return {!./service/template-impl.Templates}
 */
export function templatesFor(window) {
  return /** @type {!./service/template-impl.Templates} */ (
      getExistingServiceForWindow(window, 'templates'));
};


text:
from django.core.management.base import BaseCommand

from attachments.models import Attachment, get_file_suffix, \
        is_img

class Command(BaseCommand):
    help = "update attachment's base info."

    def handle(self, **options):
        attachments = Attachment.objects.all()
        for o in attachments:
            if o.file.storage.exists(o.file.name):
                o.suffix = get_file_suffix(o.file.name)
                o.is_img = is_img(o.suffix)
                o.file_size = o.file.size
                o.save()
            else:
                o.file_size = -1
                o.save()


text:
<?php

namespace Part\AdvLayNav\Block\LayeredNavigation;

/**
 * Class RangeSlider
 * @SuppressWarnings(PHPMD.CamelCasePropertyName)
 */
class RangeSlider extends AbstractRenderLayered
{
    // @codingStandardsIgnoreStart
    /**
     * The template file for our RenderLayered.
     *
     * @var string
     */
    protected $_template = 'Part_AdvLayNav::product/layered/rangeslider.phtml';
    // @codingStandardsIgnoreEnd

    /**
     * The maximum value of the attribute.
     *
     * @var float
     */
    private $maxValue;

    /**
     * The minimum value of the attribute.
     *
     * @var float
     */
    private $minValue;

    /**
     * The left value of the attribute slider.
     *
     * @var flaot
     */
    private $leftValue;

    /**
     * The right value of the attribute slider.
     *
     * @var flaot
     */
    private $rightValue;

    /**
     * Returns the minimum value of the attribute for the current product collection.
     *
     * @return float
     */
    public function getMinValue()
    {
        $items = $this->filter->getItems();
        return $items['min'];
    }

    /**
     * Returns the maximum value of the attribute for the current product collection.
     *
     * @return float
     */
    public function getMaxValue()
    {
        $items = $this->filter->getItems();
        return $items['max'];
    }

    /**
     * Returns the left value of the slider.
     *
     * @return float
     */
    public function getLeftValue()
    {
        $items = $this->filter->getItems();
        return $items['from'];
    }

    /**
     * Returns the right value of the slider.
     *
     * @return flaot
     */
    public function getRightValue()
    {
        $items = $this->filter->getItems();
        return $items['to'];
    }

    /**
     * Builds a url for the current attribute with option_id_placeholder as placeholder.
     *
     * @return string
     */
    public function getOptionsPlaceholderUrl()
    {
        $query = [$this->filter->getRequestVar() => 'option_id_placeholder'];
        return $this->_urlBuilder->getUrl('*/*/*', ['_current' => true, '_use_rewrite' => true, '_query' => $query]);
    }

    /**
     * Builds url without the current attribute.
     *
     * @return string
     */
    public function getRemoveUrl()
    {
        $query = [$this->filter->getRequestVar() => $this->filter->getResetValue()];
        return $this->_urlBuilder->getUrl('*/*/*', ['_current' => true, '_use_rewrite' => true, '_query' => $query]);
    }
}


text:
package org.apache.flink.table.functions;

import org.apache.flink.annotation.PublicEvolving;
import org.apache.flink.table.api.TableException;
import org.apache.flink.table.catalog.DataTypeFactory;
import org.apache.flink.table.types.inference.TypeInference;
import org.apache.flink.util.Collector;

/**
 * Base class for user-defined table aggregates.
 *
 *
The behavior of a {@link TableAggregateFunction} can be defined by implementing a series of
 * custom methods. A {@link TableAggregateFunction} needs at least three methods:
 *

 *
createAccumulator

 *
accumulate

 *
emitValue or emitUpdateWithRetract

 *

 *
 *
There is another method that can be optional to have:
 *

 *
retract

 *

 *
 *
All these methods must be declared publicly, not static, and named exactly as the names
 * mentioned above. The method {@link #createAccumulator()} is defined in
 * the {@link UserDefinedAggregateFunction} functions, while other methods are explained below.
 *
 *

 * {@code
 * Processes the input values and update the provided accumulator instance. The method
 * accumulate can be overloaded with different custom types and arguments. A TableAggregateFunction
 * requires at least one accumulate() method.
 *
 * param: accumulator           the accumulator which contains the current aggregated results
 * param: [user defined inputs] the input value (usually obtained from a new arrived data).
 *
 * public void accumulate(ACC accumulator, [user defined inputs])
 * }
 *

 *
 *

 * {@code
 * Retracts the input values from the accumulator instance. The current design assumes the
 * inputs are the values that have been previously accumulated. The method retract can be
 * overloaded with different custom types and arguments.
 *
 * param: accumulator           the accumulator which contains the current aggregated results
 * param: [user defined inputs] the input value (usually obtained from a new arrived data).
 *
 * public void retract(ACC accumulator, [user defined inputs])
 * }
 *

 *
 *

 * {@code
 * Called every time when an aggregation result should be materialized. The returned value could
 * be either an early and incomplete result (periodically emitted as data arrive) or the final
 * result of the aggregation.
 *
 * param: accumulator           the accumulator which contains the current aggregated results
 * param: out                   the collector used to output data.
 *
 * public void emitValue(ACC accumulator, Collector<T> out)
 * }
 *

 *
 *

 * {@code
 * Called every time when an aggregation result should be materialized. The returned value could
 * be either an early and incomplete result (periodically emitted as data arrive) or the final
 * result of the aggregation.
 *
 * Different from emitValue, emitUpdateWithRetract is used to emit values that have been updated.
 * This method outputs data incrementally in retract mode, i.e., once there is an update, we have
 * to retract old records before sending new updated ones. The emitUpdateWithRetract method will be
 * used in preference to the emitValue method if both methods are defined in the table aggregate
 * function, because the method is treated to be more efficient than emitValue as it can output
 * values incrementally.
 *
 * param: accumulator           the accumulator which contains the current aggregated results
 * param: out                   the retractable collector used to output data. Use collect method
 *                              to output(add) records and use retract method to retract(delete)
 *                              records.
 *
 * public void emitUpdateWithRetract(ACC accumulator, RetractableCollector<T> out)
 * }
 *

 *
 * @param <T>   the type of the table aggregation result
 * @param <ACC> the type of the table aggregation accumulator. The accumulator is used to keep the
 *              aggregated values which are needed to compute an aggregation result.
 *              TableAggregateFunction represents its state using accumulator, thereby the state of
 *              the TableAggregateFunction must be put into the accumulator.
 */
@PublicEvolving
public abstract class TableAggregateFunction<T, ACC> extends UserDefinedAggregateFunction<T, ACC> {

	/**
	 * Collects a record and forwards it. The collector can output retract messages with the retract
	 * method. Note: only use it in {@code emitUpdateWithRetract}.
	 */
	public interface RetractableCollector<T> extends Collector<T> {

		/**
		 * Retract a record.
		 *
		 * @param record The record to retract.
		 */
		void retract(T record);
	}

	@Override
	public final FunctionKind getKind() {
		return FunctionKind.TABLE_AGGREGATE;
	}

	@Override
	public TypeInference getTypeInference(DataTypeFactory typeFactory) {
		throw new TableException("Table aggregate functions are not updated to the new type system yet.");
	}
}


text:
package sample;

import java.util.Date;

/*
 * Output message sent to client.
 *
 * @Author Jay Sridhar
 */
public class OutputMessage
{
    private String from;
    private String message;
    private String topic;
    private Date time = new Date();

    public OutputMessage() {}

    public OutputMessage(String from,String message,String topic)
    {
	this.from = from;
	this.message = message;
	this.topic = topic;
    }

    public String getFrom()
    {
        return from;
    }

    public void setFrom(String from)
    {
        this.from = from;
    }

    public String getMessage()
    {
        return message;
    }

    public void setMessage(String message)
    {
        this.message = message;
    }

    public String getTopic()
    {
        return topic;
    }

    public void setTopic(String topic)
    {
        this.topic = topic;
    }

    public Date getTime()
    {
        return time;
    }
}


text:
#include "nrf_log.h"
#include "nrf_log_ctrl.h"
#include "nrf_log_default_backends.h"

#include "nrf_log_backend_uart.h"
#include "coredev/iopincfg.h"
#include "board.h"

int nRFUartEvthandler(UARTDEV *pDev, UART_EVT EvtId, uint8_t *pBuffer, int BufferLen);

#define FIFOSIZE			CFIFO_MEMSIZE(64)

uint8_t g_TxBuff[FIFOSIZE];

static IOPINCFG s_UartPins[] = {
	{UART_RX_PORT, UART_RX_PIN, UART_RX_PINOP, IOPINDIR_INPUT, IOPINRES_NONE, IOPINTYPE_NORMAL},	// RX
	{UART_TX_PORT, UART_TX_PIN, UART_TX_PINOP, IOPINDIR_OUTPUT, IOPINRES_NONE, IOPINTYPE_NORMAL},	// TX
	{UART_CTS_PORT, UART_CTS_PIN, UART_CTS_PINOP, IOPINDIR_INPUT, IOPINRES_NONE, IOPINTYPE_NORMAL},	// CTS
	{UART_RTS_PORT, UART_RTS_PIN, UART_RTS_PINOP, IOPINDIR_OUTPUT, IOPINRES_NONE, IOPINTYPE_NORMAL},// RTS
};

// UART configuration data
static const UARTCFG s_UartCfg = {
	.DevNo = 0,
	.pIOPinMap = s_UartPins,
	.NbIOPins = sizeof(s_UartPins) / sizeof(IOPINCFG),
	.Rate = 1000000,			// Rate
	.DataBits = 8,
	.Parity = UART_PARITY_NONE,
	.StopBits = 1,					// Stop bit
	.FlowControl = UART_FLWCTRL_HW,
	.bIntMode = true,
	.IntPrio = 1, 					// use APP_IRQ_PRIORITY_LOW with Softdevice
	.EvtCallback = nRFUartEvthandler,
	.bFifoBlocking = true,				// fifo blocking mode
	.RxMemSize = 0,
	.pRxMem = NULL,
	.TxMemSize = 0,//FIFOSIZE,
	.pTxMem = NULL,//g_TxBuff,
	.bDMAMode = false,
};

UART g_Uart;

int nRFUartEvthandler(UARTDEV *pDev, UART_EVT EvtId, uint8_t *pBuffer, int BufferLen)
{
	int cnt = 0;
	uint8_t buff[20];

	switch (EvtId)
	{
		case UART_EVT_RXTIMEOUT:
		case UART_EVT_RXDATA:

			break;
		case UART_EVT_TXREADY:
			break;
		case UART_EVT_LINESTATE:
			break;
	}

	return cnt;
}

//
// Print a greeting message on standard output and exit.
//
// On embedded platforms this might require semi-hosting or similar.
//
// For example, for toolchains derived from GNU Tools for Embedded,
// to enable semi-hosting, the following was added to the linker:
//
// --specs=rdimon.specs -Wl,--start-group -lgcc -lc -lc -lm -lrdimon -Wl,--end-group
//
// Adjust it for other toolchains.
//

int main()
{
	g_Uart.Init(s_UartCfg);
	nrf_log_uart_init(g_Uart);

	NRF_LOG_INIT(NULL);
	NRF_LOG_DEFAULT_BACKENDS_INIT();

	while (1)
	{
	    NRF_LOG_RAW_INFO("NRF_LOG Uart example started.\r\n\r\n");
	    NRF_LOG_FLUSH();
	}

	return 0;
}