text:
package elb_test

import (
	"fmt"
	"strings"
	"time"

	"github.com/aws/aws-sdk-go/aws"
	"github.com/aws/aws-sdk-go/aws/awserr"
	"github.com/aws/aws-sdk-go/aws/session"
	"github.com/aws/aws-sdk-go/service/elb"
)

var _ time.Duration
var _ strings.Reader
var _ aws.Config

func parseTime(layout, value string) *time.Time {
	t, err := time.Parse(layout, value)
	if err != nil {
		panic(err)
	}
	return &t
}

// To add tags to a load balancer
//
// This example adds two tags to the specified load balancer.
func ExampleELB_AddTags_shared00() {
	svc := elb.New(session.New())
	input := &elb.AddTagsInput{
		LoadBalancerNames: []*string{
			aws.String("my-load-balancer"),
		},
		Tags: []*elb.Tag{
			{
				Key:   aws.String("project"),
				Value: aws.String("lima"),
			},
			{
				Key:   aws.String("department"),
				Value: aws.String("digital-media"),
			},
		},
	}

	result, err := svc.AddTags(input)
	if err != nil {
		if aerr, ok := err.(awserr.Error); ok {
			switch aerr.Code() {
			case elb.ErrCodeAccessPointNotFoundException:
				fmt.Println(elb.ErrCodeAccessPointNotFoundException, aerr.Error())
			case elb.ErrCodeTooManyTagsException:
				fmt.Println(elb.ErrCodeTooManyTagsException, aerr.Error())
			case elb.ErrCodeDuplicateTagKeysException:
				fmt.Println(elb.ErrCodeDuplicateTagKeysException, aerr.Error())
			default:
				fmt.Println(aerr.Error())
			}
		} else {
			// Print the error, cast err to awserr.Error to get the Code and
			// Message from an error.
			fmt.Println(err.Error())
		}
		return
	}

	fmt.Println(result)
}

// To associate a security group with a load balancer in a VPC
//
// This example associates a security group with the specified load balancer in a VPC.
func ExampleELB_ApplySecurityGroupsToLoadBalancer_shared00() {
	svc := elb.New(session.New())
	input := &elb.ApplySecurityGroupsToLoadBalancerInput{
		LoadBalancerName: aws.String("my-load-balancer"),
		SecurityGroups: []*string{
			aws.String("sg-fc448899"),
		},
	}

	result, err := svc.ApplySecurityGroupsToLoadBalancer(input)
	if err != nil {
		if aerr, ok := err.(awserr.Error); ok {
			switch aerr.Code() {
			case elb.ErrCodeAccessPointNotFoundException:
				fmt.Println(elb.ErrCodeAccessPointNotFoundException, aerr.Error())
			case elb.ErrCodeInvalidConfigurationRequestException:
				fmt.Println(elb.ErrCodeInvalidConfigurationRequestException, aerr.Error())
			case elb.ErrCodeInvalidSecurityGroupException:
				fmt.Println(elb.ErrCodeInvalidSecurityGroupException, aerr.Error())
			default:
				fmt.Println(aerr.Error())
			}
		} else {
			// Print the error, cast err to awserr.Error to get the Code and
			// Message from an error.
			fmt.Println(err.Error())
		}
		return
	}

	fmt.Println(result)
}

// To attach subnets to a load balancer
//
// This example adds the specified subnet to the set of configured subnets for the specified
// load balancer.
func ExampleELB_AttachLoadBalancerToSubnets_shared00() {
	svc := elb.New(session.New())
	input := &elb.AttachLoadBalancerToSubnetsInput{
		LoadBalancerName: aws.String("my-load-balancer"),
		Subnets: []*string{
			aws.String("subnet-0ecac448"),
		},
	}

	result, err := svc.AttachLoadBalancerToSubnets(input)
	if err != nil {
		if aerr, ok := err.(awserr.Error); ok {
			switch aerr.Code() {
			case elb.ErrCodeAccessPointNotFoundException:
				fmt.Println(elb.ErrCodeAccessPointNotFoundException, aerr.Error())
			case elb.ErrCodeInvalidConfigurationRequestException:
				fmt.Println(elb.ErrCodeInvalidConfigurationRequestException, aerr.Error())
			case elb.ErrCodeSubnetNotFoundException:
				fmt.Println(elb.ErrCodeSubnetNotFoundException, aerr.Error())
			case elb.ErrCodeInvalidSubnetException:
				fmt.Println(elb.ErrCodeInvalidSubnetException, aerr.Error())
			default:
				fmt.Println(aerr.Error())
			}
		} else {
			// Print the error, cast err to awserr.Error to get the Code and
			// Message from an error.
			fmt.Println(err.Error())
		}
		return
	}

	fmt.Println(result)
}

// To specify the health check settings for your backend EC2 instances
//
// This example specifies the health check settings used to evaluate the health of your
// backend EC2 instances.
func ExampleELB_ConfigureHealthCheck_shared00() {
	svc := elb.New(session.New())
	input := &elb.ConfigureHealthCheckInput{
		HealthCheck: &elb.HealthCheck{
			HealthyThreshold:   aws.Int64(2),
			Interval:           aws.Int64(30),
			Target:             aws.String("HTTP:80/png"),
			Timeout:            aws.Int64(3),
			UnhealthyThreshold: aws.Int64(2),
		},
		LoadBalancerName: aws.String("my-load-balancer"),
	}

	result, err := svc.ConfigureHealthCheck(input)
	if err != nil {
		if aerr, ok := err.(awserr.Error); ok {
			switch aerr.Code() {
			case elb.ErrCodeAccessPointNotFoundException:
				fmt.Println(elb.ErrCodeAccessPointNotFoundException, aerr.Error())
			default:
				fmt.Println(aerr.Error())
			}
		} else {
			// Print the error, cast err to awserr.Error to get the Code and
			// Message from an error.
			fmt.Println(err.Error())
		}
		return
	}

	fmt.Println(result)
}

// To generate a stickiness policy for your load balancer
//
// This example generates a stickiness policy that follows the sticky session lifetimes
// of the application-generated cookie.
func ExampleELB_CreateAppCookieStickinessPolicy_shared00() {
	svc := elb.New(session.New())
	input := &elb.CreateAppCookieStickinessPolicyInput{
		CookieName:       aws.String("my-app-cookie"),
		LoadBalancerName: aws.String("my-load-balancer"),
		PolicyName:       aws.String("my-app-cookie-policy"),
	}

	result, err := svc.CreateAppCookieStickinessPolicy(input)
	if err != nil {
		if aerr, ok := err.(awserr.Error); ok {
			switch aerr.Code() {
			case elb.ErrCodeAccessPointNotFoundException:
				fmt.Println(elb.ErrCodeAccessPointNotFoundException, aerr.Error())
			case elb.ErrCodeDuplicatePolicyNameException:
				fmt.Println(elb.ErrCodeDuplicatePolicyNameException, aerr.Error())
			case elb.ErrCodeTooManyPoliciesException:
				fmt.Println(elb.ErrCodeTooManyPoliciesException, aerr.Error())
			case elb.ErrCodeInvalidConfigurationRequestException:
				fmt.Println(elb.ErrCodeInvalidConfigurationRequestException, aerr.Error())
			default:
				fmt.Println(aerr.Error())
			}
		} else {
			// Print the error, cast err to awserr.Error to get the Code and
			// Message from an error.
			fmt.Println(err.Error())
		}
		return
	}

	fmt.Println(result)
}

// To generate a duration-based stickiness policy for your load balancer
//
// This example generates a stickiness policy with sticky session lifetimes controlled
// by the specified expiration period.
func ExampleELB_CreateLBCookieStickinessPolicy_shared00() {
	svc := elb.New(session.New())
	input := &elb.CreateLBCookieStickinessPolicyInput{
		CookieExpirationPeriod: aws.Int64(60),
		LoadBalancerName:       aws.String("my-load-balancer"),
		PolicyName:             aws.String("my-duration-cookie-policy"),
	}

	result, err := svc.CreateLBCookieStickinessPolicy(input)
	if err != nil {
		if aerr, ok := err.(awserr.Error); ok {
			switch aerr.Code() {
			case elb.ErrCodeAccessPointNotFoundException:
				fmt.Println(elb.ErrCodeAccessPointNotFoundException, aerr.Error())
			case elb.ErrCodeDuplicatePolicyNameException:
				fmt.Println(elb.ErrCodeDuplicatePolicyNameException, aerr.Error())
			case elb.ErrCodeTooManyPoliciesException:
				fmt.Println(elb.ErrCodeTooManyPoliciesException, aerr.Error())
			case elb.ErrCodeInvalidConfigurationRequestException:
				fmt.Println(elb.ErrCodeInvalidConfigurationRequestException, aerr.Error())
			default:
				fmt.Println(aerr.Error())
			}
		} else {
			// Print the error, cast err to awserr.Error to get the Code and
			// Message from an error.
			fmt.Println(err.Error())
		}
		return
	}

	fmt.Println(result)
}

// To create an HTTP load balancer in a VPC
//
// This example creates a load balancer with an HTTP listener in a VPC.
func ExampleELB_CreateLoadBalancer_shared00() {
	svc := elb.New(session.New())
	input := &elb.CreateLoadBalancerInput{
		Listeners: []*elb.Listener{
			{
				InstancePort:     aws.Int64(80),
				InstanceProtocol: aws.String("HTTP"),
				LoadBalancerPort: aws.Int64(80),
				Protocol:         aws.String("HTTP"),
			},
		},
		LoadBalancerName: aws.String("my-load-balancer"),
		SecurityGroups: []*string{
			aws.String("sg-a61988c3"),
		},
		Subnets: []*string{
			aws.String("subnet-15aaab61"),
		},
	}

	result, err := svc.CreateLoadBalancer(input)
	if err != nil {
		if aerr, ok := err.(awserr.Error); ok {
			switch aerr.Code() {
			case elb.ErrCodeDuplicateAccessPointNameException:
				fmt.Println(elb.ErrCodeDuplicateAccessPointNameException, aerr.Error())
			case elb.ErrCodeTooManyAccessPointsException:
				fmt.Println(elb.ErrCodeTooManyAccessPointsException, aerr.Error())
			case elb.ErrCodeCertificateNotFoundException:
				fmt.Println(elb.ErrCodeCertificateNotFoundException, aerr.Error())
			case elb.ErrCodeInvalidConfigurationRequestException:
				fmt.Println(elb.ErrCodeInvalidConfigurationRequestException, aerr.Error())
			case elb.ErrCodeSubnetNotFoundException:
				fmt.Println(elb.ErrCodeSubnetNotFoundException, aerr.Error())
			case elb.ErrCodeInvalidSubnetException:
				fmt.Println(elb.ErrCodeInvalidSubnetException, aerr.Error())
			case elb.ErrCodeInvalidSecurityGroupException:
				fmt.Println(elb.ErrCodeInvalidSecurityGroupException, aerr.Error())
			case elb.ErrCodeInvalidSchemeException:
				fmt.Println(elb.ErrCodeInvalidSchemeException, aerr.Error())
			case elb.ErrCodeTooManyTagsException:
				fmt.Println(elb.ErrCodeTooManyTagsException, aerr.Error())
			case elb.ErrCodeDuplicateTagKeysException:
				fmt.Println(elb.ErrCodeDuplicateTagKeysException, aerr.Error())
			case elb.ErrCodeUnsupportedProtocolException:
				fmt.Println(elb.ErrCodeUnsupportedProtocolException, aerr.Error())
			default:
				fmt.Println(aerr.Error())
			}
		} else {
			// Print the error, cast err to awserr.Error to get the Code and
			// Message from an error.
			fmt.Println(err.Error())
		}
		return
	}

	fmt.Println(result)
}

// To create an HTTP load balancer in EC2-Classic
//
// This example creates a load balancer with an HTTP listener in EC2-Classic.
func ExampleELB_CreateLoadBalancer_shared01() {
	svc := elb.New(session.New())
	input := &elb.CreateLoadBalancerInput{
		AvailabilityZones: []*string{
			aws.String("us-west-2a"),
		},
		Listeners: []*elb.Listener{
			{
				InstancePort:     aws.Int64(80),
				InstanceProtocol: aws.String("HTTP"),
				LoadBalancerPort: aws.Int64(80),
				Protocol:         aws.String("HTTP"),
			},
		},
		LoadBalancerName: aws.String("my-load-balancer"),
	}

	result, err := svc.CreateLoadBalancer(input)
	if err != nil {
		if aerr, ok := err.(awserr.Error); ok {
			switch aerr.Code() {
			case elb.ErrCodeDuplicateAccessPointNameException:
				fmt.Println(elb.ErrCodeDuplicateAccessPointNameException, aerr.Error())
			case elb.ErrCodeTooManyAccessPointsException:
				fmt.Println(elb.ErrCodeTooManyAccessPointsException, aerr.Error())
			case elb.ErrCodeCertificateNotFoundException:
				fmt.Println(elb.ErrCodeCertificateNotFoundException, aerr.Error())
			case elb.ErrCodeInvalidConfigurationRequestException:
				fmt.Println(elb.ErrCodeInvalidConfigurationRequestException, aerr.Error())
			case elb.ErrCodeSubnetNotFoundException:
				fmt.Println(elb.ErrCodeSubnetNotFoundException, aerr.Error())
			case elb.ErrCodeInvalidSubnetException:
				fmt.Println(elb.ErrCodeInvalidSubnetException, aerr.Error())
			case elb.ErrCodeInvalidSecurityGroupException:
				fmt.Println(elb.ErrCodeInvalidSecurityGroupException, aerr.Error())
			case elb.ErrCodeInvalidSchemeException:
				fmt.Println(elb.ErrCodeInvalidSchemeException, aerr.Error())
			case elb.ErrCodeTooManyTagsException:
				fmt.Println(elb.ErrCodeTooManyTagsException, aerr.Error())
			case elb.ErrCodeDuplicateTagKeysException:
				fmt.Println(elb.ErrCodeDuplicateTagKeysException, aerr.Error())
			case elb.ErrCodeUnsupportedProtocolException:
				fmt.Println(elb.ErrCodeUnsupportedProtocolException, aerr.Error())
			default:
				fmt.Println(aerr.Error())
			}
		} else {
			// Print the error, cast err to awserr.Error to get the Code and
			// Message from an error.
			fmt.Println(err.Error())
		}
		return
	}

	fmt.Println(result)
}

// To create an HTTPS load balancer in a VPC
//
// This example creates a load balancer with an HTTPS listener in a VPC.
func ExampleELB_CreateLoadBalancer_shared02() {
	svc := elb.New(session.New())
	input := &elb.CreateLoadBalancerInput{
		Listeners: []*elb.Listener{
			{
				InstancePort:     aws.Int64(80),
				InstanceProtocol: aws.String("HTTP"),
				LoadBalancerPort: aws.Int64(80),
				Protocol:         aws.String("HTTP"),
			},
			{
				InstancePort:     aws.Int64(80),
				InstanceProtocol: aws.String("HTTP"),
				LoadBalancerPort: aws.Int64(443),
				Protocol:         aws.String("HTTPS"),
				SSLCertificateId: aws.String("arn:aws:iam::123456789012:server-certificate/my-server-cert"),
			},
		},
		LoadBalancerName: aws.String("my-load-balancer"),
		SecurityGroups: []*string{
			aws.String("sg-a61988c3"),
		},
		Subnets: []*string{
			aws.String("subnet-15aaab61"),
		},
	}

	result, err := svc.CreateLoadBalancer(input)
	if err != nil {
		if aerr, ok := err.(awserr.Error); ok {
			switch aerr.Code() {
			case elb.ErrCodeDuplicateAccessPointNameException:
				fmt.Println(elb.ErrCodeDuplicateAccessPointNameException, aerr.Error())
			case elb.ErrCodeTooManyAccessPointsException:
				fmt.Println(elb.ErrCodeTooManyAccessPointsException, aerr.Error())
			case elb.ErrCodeCertificateNotFoundException:
				fmt.Println(elb.ErrCodeCertificateNotFoundException, aerr.Error())
			case elb.ErrCodeInvalidConfigurationRequestException:
				fmt.Println(elb.ErrCodeInvalidConfigurationRequestException, aerr.Error())
			case elb.ErrCodeSubnetNotFoundException:
				fmt.Println(elb.ErrCodeSubnetNotFoundException, aerr.Error())
			case elb.ErrCodeInvalidSubnetException:
				fmt.Println(elb.ErrCodeInvalidSubnetException, aerr.Error())
			case elb.ErrCodeInvalidSecurityGroupException:
				fmt.Println(elb.ErrCodeInvalidSecurityGroupException, aerr.Error())
			case elb.ErrCodeInvalidSchemeException:
				fmt.Println(elb.ErrCodeInvalidSchemeException, aerr.Error())
			case elb.ErrCodeTooManyTagsException:
				fmt.Println(elb.ErrCodeTooManyTagsException, aerr.Error())
			case elb.ErrCodeDuplicateTagKeysException:
				fmt.Println(elb.ErrCodeDuplicateTagKeysException, aerr.Error())
			case elb.ErrCodeUnsupportedProtocolException:
				fmt.Println(elb.ErrCodeUnsupportedProtocolException, aerr.Error())
			default:
				fmt.Println(aerr.Error())
			}
		} else {
			// Print the error, cast err to awserr.Error to get the Code and
			// Message from an error.
			fmt.Println(err.Error())
		}
		return
	}

	fmt.Println(result)
}

// To create an HTTPS load balancer in EC2-Classic
//
// This example creates a load balancer with an HTTPS listener in EC2-Classic.
func ExampleELB_CreateLoadBalancer_shared03() {
	svc := elb.New(session.New())
	input := &elb.CreateLoadBalancerInput{
		AvailabilityZones: []*string{
			aws.String("us-west-2a"),
		},
		Listeners: []*elb.Listener{
			{
				InstancePort:     aws.Int64(80),
				InstanceProtocol: aws.String("HTTP"),
				LoadBalancerPort: aws.Int64(80),
				Protocol:         aws.String("HTTP"),
			},
			{
				InstancePort:     aws.Int64(80),
				InstanceProtocol: aws.String("HTTP"),
				LoadBalancerPort: aws.Int64(443),
				Protocol:         aws.String("HTTPS"),
				SSLCertificateId: aws.String("arn:aws:iam::123456789012:server-certificate/my-server-cert"),
			},
		},
		LoadBalancerName: aws.String("my-load-balancer"),
	}

	result, err := svc.CreateLoadBalancer(input)
	if err != nil {
		if aerr, ok := err.(awserr.Error); ok {
			switch aerr.Code() {
			case elb.ErrCodeDuplicateAccessPointNameException:
				fmt.Println(elb.ErrCodeDuplicateAccessPointNameException, aerr.Error())
			case elb.ErrCodeTooManyAccessPointsException:
				fmt.Println(elb.ErrCodeTooManyAccessPointsException, aerr.Error())
			case elb.ErrCodeCertificateNotFoundException:
				fmt.Println(elb.ErrCodeCertificateNotFoundException, aerr.Error())
			case elb.ErrCodeInvalidConfigurationRequestException:
				fmt.Println(elb.ErrCodeInvalidConfigurationRequestException, aerr.Error())
			case elb.ErrCodeSubnetNotFoundException:
				fmt.Println(elb.ErrCodeSubnetNotFoundException, aerr.Error())
			case elb.ErrCodeInvalidSubnetException:
				fmt.Println(elb.ErrCodeInvalidSubnetException, aerr.Error())
			case elb.ErrCodeInvalidSecurityGroupException:
				fmt.Println(elb.ErrCodeInvalidSecurityGroupException, aerr.Error())
			case elb.ErrCodeInvalidSchemeException:
				fmt.Println(elb.ErrCodeInvalidSchemeException, aerr.Error())
			case elb.ErrCodeTooManyTagsException:
				fmt.Println(elb.ErrCodeTooManyTagsException, aerr.Error())
			case elb.ErrCodeDuplicateTagKeysException:
				fmt.Println(elb.ErrCodeDuplicateTagKeysException, aerr.Error())
			case elb.ErrCodeUnsupportedProtocolException:
				fmt.Println(elb.ErrCodeUnsupportedProtocolException, aerr.Error())
			default:
				fmt.Println(aerr.Error())
			}
		} else {
			// Print the error, cast err to awserr.Error to get the Code and
			// Message from an error.
			fmt.Println(err.Error())
		}
		return
	}

	fmt.Println(result)
}

// To create an internal load balancer
//
// This example creates an internal load balancer with an HTTP listener in a VPC.
func ExampleELB_CreateLoadBalancer_shared04() {
	svc := elb.New(session.New())
	input := &elb.CreateLoadBalancerInput{
		Listeners: []*elb.Listener{
			{
				InstancePort:     aws.Int64(80),
				InstanceProtocol: aws.String("HTTP"),
				LoadBalancerPort: aws.Int64(80),
				Protocol:         aws.String("HTTP"),
			},
		},
		LoadBalancerName: aws.String("my-load-balancer"),
		Scheme:           aws.String("internal"),
		SecurityGroups: []*string{
			aws.String("sg-a61988c3"),
		},
		Subnets: []*string{
			aws.String("subnet-15aaab61"),
		},
	}

	result, err := svc.CreateLoadBalancer(input)
	if err != nil {
		if aerr, ok := err.(awserr.Error); ok {
			switch aerr.Code() {
			case elb.ErrCodeDuplicateAccessPointNameException:
				fmt.Println(elb.ErrCodeDuplicateAccessPointNameException, aerr.Error())
			case elb.ErrCodeTooManyAccessPointsException:
				fmt.Println(elb.ErrCodeTooManyAccessPointsException, aerr.Error())
			case elb.ErrCodeCertificateNotFoundException:
				fmt.Println(elb.ErrCodeCertificateNotFoundException, aerr.Error())
			case elb.ErrCodeInvalidConfigurationRequestException:
				fmt.Println(elb.ErrCodeInvalidConfigurationRequestException, aerr.Error())
			case elb.ErrCodeSubnetNotFoundException:
				fmt.Println(elb.ErrCodeSubnetNotFoundException, aerr.Error())
			case elb.ErrCodeInvalidSubnetException:
				fmt.Println(elb.ErrCodeInvalidSubnetException, aerr.Error())
			case elb.ErrCodeInvalidSecurityGroupException:
				fmt.Println(elb.ErrCodeInvalidSecurityGroupException, aerr.Error())
			case elb.ErrCodeInvalidSchemeException:
				fmt.Println(elb.ErrCodeInvalidSchemeException, aerr.Error())
			case elb.ErrCodeTooManyTagsException:
				fmt.Println(elb.ErrCodeTooManyTagsException, aerr.Error())
			case elb.ErrCodeDuplicateTagKeysException:
				fmt.Println(elb.ErrCodeDuplicateTagKeysException, aerr.Error())
			case elb.ErrCodeUnsupportedProtocolException:
				fmt.Println(elb.ErrCodeUnsupportedProtocolException, aerr.Error())
			default:
				fmt.Println(aerr.Error())
			}
		} else {
			// Print the error, cast err to awserr.Error to get the Code and
			// Message from an error.
			fmt.Println(err.Error())
		}
		return
	}

	fmt.Println(result)
}

// To create an HTTP listener for a load balancer
//
// This example creates a listener for your load balancer at port 80 using the HTTP
// protocol.
func ExampleELB_CreateLoadBalancerListeners_shared00() {
	svc := elb.New(session.New())
	input := &elb.CreateLoadBalancerListenersInput{
		Listeners: []*elb.Listener{
			{
				InstancePort:     aws.Int64(80),
				InstanceProtocol: aws.String("HTTP"),
				LoadBalancerPort: aws.Int64(80),
				Protocol:         aws.String("HTTP"),
			},
		},
		LoadBalancerName: aws.String("my-load-balancer"),
	}

	result, err := svc.CreateLoadBalancerListeners(input)
	if err != nil {
		if aerr, ok := err.(awserr.Error); ok {
			switch aerr.Code() {
			case elb.ErrCodeAccessPointNotFoundException:
				fmt.Println(elb.ErrCodeAccessPointNotFoundException, aerr.Error())
			case elb.ErrCodeDuplicateListenerException:
				fmt.Println(elb.ErrCodeDuplicateListenerException, aerr.Error())
			case elb.ErrCodeCertificateNotFoundException:
				fmt.Println(elb.ErrCodeCertificateNotFoundException, aerr.Error())
			case elb.ErrCodeInvalidConfigurationRequestException:
				fmt.Println(elb.ErrCodeInvalidConfigurationRequestException, aerr.Error())
			case elb.ErrCodeUnsupportedProtocolException:
				fmt.Println(elb.ErrCodeUnsupportedProtocolException, aerr.Error())
			default:
				fmt.Println(aerr.Error())
			}
		} else {
			// Print the error, cast err to awserr.Error to get the Code and
			// Message from an error.
			fmt.Println(err.Error())
		}
		return
	}

	fmt.Println(result)
}

// To create an HTTPS listener for a load balancer
//
// This example creates a listener for your load balancer at port 443 using the HTTPS
// protocol.
func ExampleELB_CreateLoadBalancerListeners_shared01() {
	svc := elb.New(session.New())
	input := &elb.CreateLoadBalancerListenersInput{
		Listeners: []*elb.Listener{
			{
				InstancePort:     aws.Int64(80),
				InstanceProtocol: aws.String("HTTP"),
				LoadBalancerPort: aws.Int64(443),
				Protocol:         aws.String("HTTPS"),
				SSLCertificateId: aws.String("arn:aws:iam::123456789012:server-certificate/my-server-cert"),
			},
		},
		LoadBalancerName: aws.String("my-load-balancer"),
	}

	result, err := svc.CreateLoadBalancerListeners(input)
	if err != nil {
		if aerr, ok := err.(awserr.Error); ok {
			switch aerr.Code() {
			case elb.ErrCodeAccessPointNotFoundException:
				fmt.Println(elb.ErrCodeAccessPointNotFoundException, aerr.Error())
			case elb.ErrCodeDuplicateListenerException:
				fmt.Println(elb.ErrCodeDuplicateListenerException, aerr.Error())
			case elb.ErrCodeCertificateNotFoundException:
				fmt.Println(elb.ErrCodeCertificateNotFoundException, aerr.Error())
			case elb.ErrCodeInvalidConfigurationRequestException:
				fmt.Println(elb.ErrCodeInvalidConfigurationRequestException, aerr.Error())
			case elb.ErrCodeUnsupportedProtocolException:
				fmt.Println(elb.ErrCodeUnsupportedProtocolException, aerr.Error())
			default:
				fmt.Println(aerr.Error())
			}
		} else {
			// Print the error, cast err to awserr.Error to get the Code and
			// Message from an error.
			fmt.Println(err.Error())
		}
		return
	}

	fmt.Println(result)
}

// To create a policy that enables Proxy Protocol on a load balancer
//
// This example creates a policy that enables Proxy Protocol on the specified load balancer.
func ExampleELB_CreateLoadBalancerPolicy_shared00() {
	svc := elb.New(session.New())
	input := &elb.CreateLoadBalancerPolicyInput{
		LoadBalancerName: aws.String("my-load-balancer"),
		PolicyAttributes: []*elb.PolicyAttribute{
			{
				AttributeName:  aws.String("ProxyProtocol"),
				AttributeValue: aws.String("true"),
			},
		},
		PolicyName:     aws.String("my-ProxyProtocol-policy"),
		PolicyTypeName: aws.String("ProxyProtocolPolicyType"),
	}

	result, err := svc.CreateLoadBalancerPolicy(input)
	if err != nil {
		if aerr, ok := err.(awserr.Error); ok {
			switch aerr.Code() {
			case elb.ErrCodeAccessPointNotFoundException:
				fmt.Println(elb.ErrCodeAccessPointNotFoundException, aerr.Error())
			case elb.ErrCodePolicyTypeNotFoundException:
				fmt.Println(elb.ErrCodePolicyTypeNotFoundException, aerr.Error())
			case elb.ErrCodeDuplicatePolicyNameException:
				fmt.Println(elb.ErrCodeDuplicatePolicyNameException, aerr.Error())
			case elb.ErrCodeTooManyPoliciesException:
				fmt.Println(elb.ErrCodeTooManyPoliciesException, aerr.Error())
			case elb.ErrCodeInvalidConfigurationRequestException:
				fmt.Println(elb.ErrCodeInvalidConfigurationRequestException, aerr.Error())
			default:
				fmt.Println(aerr.Error())
			}
		} else {
			// Print the error, cast err to awserr.Error to get the Code and
			// Message from an error.
			fmt.Println(err.Error())
		}
		return
	}

	fmt.Println(result)
}

// To create a public key policy
//
// This example creates a public key policy.
func ExampleELB_CreateLoadBalancerPolicy_shared01() {
	svc := elb.New(session.New())
	input := &elb.CreateLoadBalancerPolicyInput{
		LoadBalancerName: aws.String("my-load-balancer"),
		PolicyAttributes: []*elb.PolicyAttribute{
			{
				AttributeName:  aws.String("PublicKey"),
				AttributeValue: aws.String("MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAwAYUjnfyEyXr1pxjhFWBpMlggUcqoi3kl+dS74kj//c6x7ROtusUaeQCTgIUkayttRDWchuqo1pHC1u+n5xxXnBBe2ejbb2WRsKIQ5rXEeixsjFpFsojpSQKkzhVGI6mJVZBJDVKSHmswnwLBdofLhzvllpovBPTHe+o4haAWvDBALJU0pkSI1FecPHcs2hwxf14zHoXy1e2k36A64nXW43wtfx5qcVSIxtCEOjnYRg7RPvybaGfQ+v6Iaxb/+7J5kEvZhTFQId+bSiJImF1FSUT1W1xwzBZPUbcUkkXDj45vC2s3Z8E+Lk7a3uZhvsQHLZnrfuWjBWGWvZ/MhZYgEXAMPLE"),
			},
		},
		PolicyName:     aws.String("my-PublicKey-policy"),
		PolicyTypeName: aws.String("PublicKeyPolicyType"),
	}

	result, err := svc.CreateLoadBalancerPolicy(input)
	if err != nil {
		if aerr, ok := err.(awserr.Error); ok {
			switch aerr.Code() {
			case elb.ErrCodeAccessPointNotFoundException:
				fmt.Println(elb.ErrCodeAccessPointNotFoundException, aerr.Error())
			case elb.ErrCodePolicyTypeNotFoundException:
				fmt.Println(elb.ErrCodePolicyTypeNotFoundException, aerr.Error())
			case elb.ErrCodeDuplicatePolicyNameException:
				fmt.Println(elb.ErrCodeDuplicatePolicyNameException, aerr.Error())
			case elb.ErrCodeTooManyPoliciesException:
				fmt.Println(elb.ErrCodeTooManyPoliciesException, aerr.Error())
			case elb.ErrCodeInvalidConfigurationRequestException:
				fmt.Println(elb.ErrCodeInvalidConfigurationRequestException, aerr.Error())
			default:
				fmt.Println(aerr.Error())
			}
		} else {
			// Print the error, cast err to awserr.Error to get the Code and
			// Message from an error.
			fmt.Println(err.Error())
		}
		return
	}

	fmt.Println(result)
}

// To create a backend server authentication policy
//
// This example creates a backend server authentication policy that enables authentication
// on your backend instance using a public key policy.
func ExampleELB_CreateLoadBalancerPolicy_shared02() {
	svc := elb.New(session.New())
	input := &elb.CreateLoadBalancerPolicyInput{
		LoadBalancerName: aws.String("my-load-balancer"),
		PolicyAttributes: []*elb.PolicyAttribute{
			{
				AttributeName:  aws.String("PublicKeyPolicyName"),
				AttributeValue: aws.String("my-PublicKey-policy"),
			},
		},
		PolicyName:     aws.String("my-authentication-policy"),
		PolicyTypeName: aws.String("BackendServerAuthenticationPolicyType"),
	}

	result, err := svc.CreateLoadBalancerPolicy(input)
	if err != nil {
		if aerr, ok := err.(awserr.Error); ok {
			switch aerr.Code() {
			case elb.ErrCodeAccessPointNotFoundException:
				fmt.Println(elb.ErrCodeAccessPointNotFoundException, aerr.Error())
			case elb.ErrCodePolicyTypeNotFoundException:
				fmt.Println(elb.ErrCodePolicyTypeNotFoundException, aerr.Error())
			case elb.ErrCodeDuplicatePolicyNameException:
				fmt.Println(elb.ErrCodeDuplicatePolicyNameException, aerr.Error())
			case elb.ErrCodeTooManyPoliciesException:
				fmt.Println(elb.ErrCodeTooManyPoliciesException, aerr.Error())
			case elb.ErrCodeInvalidConfigurationRequestException:
				fmt.Println(elb.ErrCodeInvalidConfigurationRequestException, aerr.Error())
			default:
				fmt.Println(aerr.Error())
			}
		} else {
			// Print the error, cast err to awserr.Error to get the Code and
			// Message from an error.
			fmt.Println(err.Error())
		}
		return
	}

	fmt.Println(result)
}

// To delete a load balancer
//
// This example deletes the specified load balancer.
func ExampleELB_DeleteLoadBalancer_shared00() {
	svc := elb.New(session.New())
	input := &elb.DeleteLoadBalancerInput{
		LoadBalancerName: aws.String("my-load-balancer"),
	}

	result, err := svc.DeleteLoadBalancer(input)
	if err != nil {
		if aerr, ok := err.(awserr.Error); ok {
			switch aerr.Code() {
			default:
				fmt.Println(aerr.Error())
			}
		} else {
			// Print the error, cast err to awserr.Error to get the Code and
			// Message from an error.
			fmt.Println(err.Error())
		}
		return
	}

	fmt.Println(result)
}

// To delete a listener from your load balancer
//
// This example deletes the listener for the specified port from the specified load
// balancer.
func ExampleELB_DeleteLoadBalancerListeners_shared00() {
	svc := elb.New(session.New())
	input := &elb.DeleteLoadBalancerListenersInput{
		LoadBalancerName: aws.String("my-load-balancer"),
		LoadBalancerPorts: []*int64{
			aws.Int64(80),
		},
	}

	result, err := svc.DeleteLoadBalancerListeners(input)
	if err != nil {
		if aerr, ok := err.(awserr.Error); ok {
			switch aerr.Code() {
			case elb.ErrCodeAccessPointNotFoundException:
				fmt.Println(elb.ErrCodeAccessPointNotFoundException, aerr.Error())
			default:
				fmt.Println(aerr.Error())
			}
		} else {
			// Print the error, cast err to awserr.Error to get the Code and
			// Message from an error.
			fmt.Println(err.Error())
		}
		return
	}

	fmt.Println(result)
}

// To delete a policy from your load balancer
//
// This example deletes the specified policy from the specified load balancer. The policy
// must not be enabled on any listener.
func ExampleELB_DeleteLoadBalancerPolicy_shared00() {
	svc := elb.New(session.New())
	input := &elb.DeleteLoadBalancerPolicyInput{
		LoadBalancerName: aws.String("my-load-balancer"),
		PolicyName:       aws.String("my-duration-cookie-policy"),
	}

	result, err := svc.DeleteLoadBalancerPolicy(input)
	if err != nil {
		if aerr, ok := err.(awserr.Error); ok {
			switch aerr.Code() {
			case elb.ErrCodeAccessPointNotFoundException:
				fmt.Println(elb.ErrCodeAccessPointNotFoundException, aerr.Error())
			case elb.ErrCodeInvalidConfigurationRequestException:
				fmt.Println(elb.ErrCodeInvalidConfigurationRequestException, aerr.Error())
			default:
				fmt.Println(aerr.Error())
			}
		} else {
			// Print the error, cast err to awserr.Error to get the Code and
			// Message from an error.
			fmt.Println(err.Error())
		}
		return
	}

	fmt.Println(result)
}

// To deregister instances from a load balancer
//
// This example deregisters the specified instance from the specified load balancer.
func ExampleELB_DeregisterInstancesFromLoadBalancer_shared00() {
	svc := elb.New(session.New())
	input := &elb.DeregisterInstancesFromLoadBalancerInput{
		Instances: []*elb.Instance{
			{
				InstanceId: aws.String("i-d6f6fae3"),
			},
		},
		LoadBalancerName: aws.String("my-load-balancer"),
	}

	result, err := svc.DeregisterInstancesFromLoadBalancer(input)
	if err != nil {
		if aerr, ok := err.(awserr.Error); ok {
			switch aerr.Code() {
			case elb.ErrCodeAccessPointNotFoundException:
				fmt.Println(elb.ErrCodeAccessPointNotFoundException, aerr.Error())
			case elb.ErrCodeInvalidEndPointException:
				fmt.Println(elb.ErrCodeInvalidEndPointException, aerr.Error())
			default:
				fmt.Println(aerr.Error())
			}
		} else {
			// Print the error, cast err to awserr.Error to get the Code and
			// Message from an error.
			fmt.Println(err.Error())
		}
		return
	}

	fmt.Println(result)
}

// To describe the health of the instances for a load balancer
//
// This example describes the health of the instances for the specified load balancer.
func ExampleELB_DescribeInstanceHealth_shared00() {
	svc := elb.New(session.New())
	input := &elb.DescribeInstanceHealthInput{
		LoadBalancerName: aws.String("my-load-balancer"),
	}

	result, err := svc.DescribeInstanceHealth(input)
	if err != nil {
		if aerr, ok := err.(awserr.Error); ok {
			switch aerr.Code() {
			case elb.ErrCodeAccessPointNotFoundException:
				fmt.Println(elb.ErrCodeAccessPointNotFoundException, aerr.Error())
			case elb.ErrCodeInvalidEndPointException:
				fmt.Println(elb.ErrCodeInvalidEndPointException, aerr.Error())
			default:
				fmt.Println(aerr.Error())
			}
		} else {
			// Print the error, cast err to awserr.Error to get the Code and
			// Message from an error.
			fmt.Println(err.Error())
		}
		return
	}

	fmt.Println(result)
}

// To describe the attributes of a load balancer
//
// This example describes the attributes of the specified load balancer.
func ExampleELB_DescribeLoadBalancerAttributes_shared00() {
	svc := elb.New(session.New())
	input := &elb.DescribeLoadBalancerAttributesInput{
		LoadBalancerName: aws.String("my-load-balancer"),
	}

	result, err := svc.DescribeLoadBalancerAttributes(input)
	if err != nil {
		if aerr, ok := err.(awserr.Error); ok {
			switch aerr.Code() {
			case elb.ErrCodeAccessPointNotFoundException:
				fmt.Println(elb.ErrCodeAccessPointNotFoundException, aerr.Error())
			case elb.ErrCodeLoadBalancerAttributeNotFoundException:
				fmt.Println(elb.ErrCodeLoadBalancerAttributeNotFoundException, aerr.Error())
			default:
				fmt.Println(aerr.Error())
			}
		} else {
			// Print the error, cast err to awserr.Error to get the Code and
			// Message from an error.
			fmt.Println(err.Error())
		}
		return
	}

	fmt.Println(result)
}

// To describe a policy associated with a load balancer
//
// This example describes the specified policy associated with the specified load balancer.
func ExampleELB_DescribeLoadBalancerPolicies_shared00() {
	svc := elb.New(session.New())
	input := &elb.DescribeLoadBalancerPoliciesInput{
		LoadBalancerName: aws.String("my-load-balancer"),
		PolicyNames: []*string{
			aws.String("my-authentication-policy"),
		},
	}

	result, err := svc.DescribeLoadBalancerPolicies(input)
	if err != nil {
		if aerr, ok := err.(awserr.Error); ok {
			switch aerr.Code() {
			case elb.ErrCodeAccessPointNotFoundException:
				fmt.Println(elb.ErrCodeAccessPointNotFoundException, aerr.Error())
			case elb.ErrCodePolicyNotFoundException:
				fmt.Println(elb.ErrCodePolicyNotFoundException, aerr.Error())
			default:
				fmt.Println(aerr.Error())
			}
		} else {
			// Print the error, cast err to awserr.Error to get the Code and
			// Message from an error.
			fmt.Println(err.Error())
		}
		return
	}

	fmt.Println(result)
}

// To describe a load balancer policy type defined by Elastic Load Balancing
//
// This example describes the specified load balancer policy type.
func ExampleELB_DescribeLoadBalancerPolicyTypes_shared00() {
	svc := elb.New(session.New())
	input := &elb.DescribeLoadBalancerPolicyTypesInput{
		PolicyTypeNames: []*string{
			aws.String("ProxyProtocolPolicyType"),
		},
	}

	result, err := svc.DescribeLoadBalancerPolicyTypes(input)
	if err != nil {
		if aerr, ok := err.(awserr.Error); ok {
			switch aerr.Code() {
			case elb.ErrCodePolicyTypeNotFoundException:
				fmt.Println(elb.ErrCodePolicyTypeNotFoundException, aerr.Error())
			default:
				fmt.Println(aerr.Error())
			}
		} else {
			// Print the error, cast err to awserr.Error to get the Code and
			// Message from an error.
			fmt.Println(err.Error())
		}
		return
	}

	fmt.Println(result)
}

// To describe one of your load balancers
//
// This example describes the specified load balancer.
func ExampleELB_DescribeLoadBalancers_shared00() {
	svc := elb.New(session.New())
	input := &elb.DescribeLoadBalancersInput{
		LoadBalancerNames: []*string{
			aws.String("my-load-balancer"),
		},
	}

	result, err := svc.DescribeLoadBalancers(input)
	if err != nil {
		if aerr, ok := err.(awserr.Error); ok {
			switch aerr.Code() {
			case elb.ErrCodeAccessPointNotFoundException:
				fmt.Println(elb.ErrCodeAccessPointNotFoundException, aerr.Error())
			case elb.ErrCodeDependencyThrottleException:
				fmt.Println(elb.ErrCodeDependencyThrottleException, aerr.Error())
			default:
				fmt.Println(aerr.Error())
			}
		} else {
			// Print the error, cast err to awserr.Error to get the Code and
			// Message from an error.
			fmt.Println(err.Error())
		}
		return
	}

	fmt.Println(result)
}

// To describe the tags for a load balancer
//
// This example describes the tags for the specified load balancer.
func ExampleELB_DescribeTags_shared00() {
	svc := elb.New(session.New())
	input := &elb.DescribeTagsInput{
		LoadBalancerNames: []*string{
			aws.String("my-load-balancer"),
		},
	}

	result, err := svc.DescribeTags(input)
	if err != nil {
		if aerr, ok := err.(awserr.Error); ok {
			switch aerr.Code() {
			case elb.ErrCodeAccessPointNotFoundException:
				fmt.Println(elb.ErrCodeAccessPointNotFoundException, aerr.Error())
			default:
				fmt.Println(aerr.Error())
			}
		} else {
			// Print the error, cast err to awserr.Error to get the Code and
			// Message from an error.
			fmt.Println(err.Error())
		}
		return
	}

	fmt.Println(result)
}

// To detach a load balancer from a subnet
//
// This example detaches the specified load balancer from the specified subnet.
func ExampleELB_DetachLoadBalancerFromSubnets_shared00() {
	svc := elb.New(session.New())
	input := &elb.DetachLoadBalancerFromSubnetsInput{
		LoadBalancerName: aws.String("my-load-balancer"),
		Subnets: []*string{
			aws.String("subnet-0ecac448"),
		},
	}

	result, err := svc.DetachLoadBalancerFromSubnets(input)
	if err != nil {
		if aerr, ok := err.(awserr.Error); ok {
			switch aerr.Code() {
			case elb.ErrCodeAccessPointNotFoundException:
				fmt.Println(elb.ErrCodeAccessPointNotFoundException, aerr.Error())
			case elb.ErrCodeInvalidConfigurationRequestException:
				fmt.Println(elb.ErrCodeInvalidConfigurationRequestException, aerr.Error())
			default:
				fmt.Println(aerr.Error())
			}
		} else {
			// Print the error, cast err to awserr.Error to get the Code and
			// Message from an error.
			fmt.Println(err.Error())
		}
		return
	}

	fmt.Println(result)
}

// To disable an Availability Zone for a load balancer
//
// This example removes the specified Availability Zone from the set of Availability
// Zones for the specified load balancer.
func ExampleELB_DisableAvailabilityZonesForLoadBalancer_shared00() {
	svc := elb.New(session.New())
	input := &elb.DisableAvailabilityZonesForLoadBalancerInput{
		AvailabilityZones: []*string{
			aws.String("us-west-2a"),
		},
		LoadBalancerName: aws.String("my-load-balancer"),
	}

	result, err := svc.DisableAvailabilityZonesForLoadBalancer(input)
	if err != nil {
		if aerr, ok := err.(awserr.Error); ok {
			switch aerr.Code() {
			case elb.ErrCodeAccessPointNotFoundException:
				fmt.Println(elb.ErrCodeAccessPointNotFoundException, aerr.Error())
			case elb.ErrCodeInvalidConfigurationRequestException:
				fmt.Println(elb.ErrCodeInvalidConfigurationRequestException, aerr.Error())
			default:
				fmt.Println(aerr.Error())
			}
		} else {
			// Print the error, cast err to awserr.Error to get the Code and
			// Message from an error.
			fmt.Println(err.Error())
		}
		return
	}

	fmt.Println(result)
}

// To enable an Availability Zone for a load balancer
//
// This example adds the specified Availability Zone to the specified load balancer.
func ExampleELB_EnableAvailabilityZonesForLoadBalancer_shared00() {
	svc := elb.New(session.New())
	input := &elb.EnableAvailabilityZonesForLoadBalancerInput{
		AvailabilityZones: []*string{
			aws.String("us-west-2b"),
		},
		LoadBalancerName: aws.String("my-load-balancer"),
	}

	result, err := svc.EnableAvailabilityZonesForLoadBalancer(input)
	if err != nil {
		if aerr, ok := err.(awserr.Error); ok {
			switch aerr.Code() {
			case elb.ErrCodeAccessPointNotFoundException:
				fmt.Println(elb.ErrCodeAccessPointNotFoundException, aerr.Error())
			default:
				fmt.Println(aerr.Error())
			}
		} else {
			// Print the error, cast err to awserr.Error to get the Code and
			// Message from an error.
			fmt.Println(err.Error())
		}
		return
	}

	fmt.Println(result)
}

// To enable cross-zone load balancing
//
// This example enables cross-zone load balancing for the specified load balancer.
func ExampleELB_ModifyLoadBalancerAttributes_shared00() {
	svc := elb.New(session.New())
	input := &elb.ModifyLoadBalancerAttributesInput{
		LoadBalancerAttributes: &elb.LoadBalancerAttributes{
			CrossZoneLoadBalancing: &elb.CrossZoneLoadBalancing{
				Enabled: aws.Bool(true),
			},
		},
		LoadBalancerName: aws.String("my-load-balancer"),
	}

	result, err := svc.ModifyLoadBalancerAttributes(input)
	if err != nil {
		if aerr, ok := err.(awserr.Error); ok {
			switch aerr.Code() {
			case elb.ErrCodeAccessPointNotFoundException:
				fmt.Println(elb.ErrCodeAccessPointNotFoundException, aerr.Error())
			case elb.ErrCodeLoadBalancerAttributeNotFoundException:
				fmt.Println(elb.ErrCodeLoadBalancerAttributeNotFoundException, aerr.Error())
			case elb.ErrCodeInvalidConfigurationRequestException:
				fmt.Println(elb.ErrCodeInvalidConfigurationRequestException, aerr.Error())
			default:
				fmt.Println(aerr.Error())
			}
		} else {
			// Print the error, cast err to awserr.Error to get the Code and
			// Message from an error.
			fmt.Println(err.Error())
		}
		return
	}

	fmt.Println(result)
}

// To enable connection draining
//
// This example enables connection draining for the specified load balancer.
func ExampleELB_ModifyLoadBalancerAttributes_shared01() {
	svc := elb.New(session.New())
	input := &elb.ModifyLoadBalancerAttributesInput{
		LoadBalancerAttributes: &elb.LoadBalancerAttributes{
			ConnectionDraining: &elb.ConnectionDraining{
				Enabled: aws.Bool(true),
				Timeout: aws.Int64(300),
			},
		},
		LoadBalancerName: aws.String("my-load-balancer"),
	}

	result, err := svc.ModifyLoadBalancerAttributes(input)
	if err != nil {
		if aerr, ok := err.(awserr.Error); ok {
			switch aerr.Code() {
			case elb.ErrCodeAccessPointNotFoundException:
				fmt.Println(elb.ErrCodeAccessPointNotFoundException, aerr.Error())
			case elb.ErrCodeLoadBalancerAttributeNotFoundException:
				fmt.Println(elb.ErrCodeLoadBalancerAttributeNotFoundException, aerr.Error())
			case elb.ErrCodeInvalidConfigurationRequestException:
				fmt.Println(elb.ErrCodeInvalidConfigurationRequestException, aerr.Error())
			default:
				fmt.Println(aerr.Error())
			}
		} else {
			// Print the error, cast err to awserr.Error to get the Code and
			// Message from an error.
			fmt.Println(err.Error())
		}
		return
	}

	fmt.Println(result)
}

// To register instances with a load balancer
//
// This example registers the specified instance with the specified load balancer.
func ExampleELB_RegisterInstancesWithLoadBalancer_shared00() {
	svc := elb.New(session.New())
	input := &elb.RegisterInstancesWithLoadBalancerInput{
		Instances: []*elb.Instance{
			{
				InstanceId: aws.String("i-d6f6fae3"),
			},
		},
		LoadBalancerName: aws.String("my-load-balancer"),
	}

	result, err := svc.RegisterInstancesWithLoadBalancer(input)
	if err != nil {
		if aerr, ok := err.(awserr.Error); ok {
			switch aerr.Code() {
			case elb.ErrCodeAccessPointNotFoundException:
				fmt.Println(elb.ErrCodeAccessPointNotFoundException, aerr.Error())
			case elb.ErrCodeInvalidEndPointException:
				fmt.Println(elb.ErrCodeInvalidEndPointException, aerr.Error())
			default:
				fmt.Println(aerr.Error())
			}
		} else {
			// Print the error, cast err to awserr.Error to get the Code and
			// Message from an error.
			fmt.Println(err.Error())
		}
		return
	}

	fmt.Println(result)
}

// To remove tags from a load balancer
//
// This example removes the specified tag from the specified load balancer.
func ExampleELB_RemoveTags_shared00() {
	svc := elb.New(session.New())
	input := &elb.RemoveTagsInput{
		LoadBalancerNames: []*string{
			aws.String("my-load-balancer"),
		},
		Tags: []*elb.TagKeyOnly{
			{
				Key: aws.String("project"),
			},
		},
	}

	result, err := svc.RemoveTags(input)
	if err != nil {
		if aerr, ok := err.(awserr.Error); ok {
			switch aerr.Code() {
			case elb.ErrCodeAccessPointNotFoundException:
				fmt.Println(elb.ErrCodeAccessPointNotFoundException, aerr.Error())
			default:
				fmt.Println(aerr.Error())
			}
		} else {
			// Print the error, cast err to awserr.Error to get the Code and
			// Message from an error.
			fmt.Println(err.Error())
		}
		return
	}

	fmt.Println(result)
}

// To update the SSL certificate for an HTTPS listener
//
// This example replaces the existing SSL certificate for the specified HTTPS listener.
func ExampleELB_SetLoadBalancerListenerSSLCertificate_shared00() {
	svc := elb.New(session.New())
	input := &elb.SetLoadBalancerListenerSSLCertificateInput{
		LoadBalancerName: aws.String("my-load-balancer"),
		LoadBalancerPort: aws.Int64(443),
		SSLCertificateId: aws.String("arn:aws:iam::123456789012:server-certificate/new-server-cert"),
	}

	result, err := svc.SetLoadBalancerListenerSSLCertificate(input)
	if err != nil {
		if aerr, ok := err.(awserr.Error); ok {
			switch aerr.Code() {
			case elb.ErrCodeCertificateNotFoundException:
				fmt.Println(elb.ErrCodeCertificateNotFoundException, aerr.Error())
			case elb.ErrCodeAccessPointNotFoundException:
				fmt.Println(elb.ErrCodeAccessPointNotFoundException, aerr.Error())
			case elb.ErrCodeListenerNotFoundException:
				fmt.Println(elb.ErrCodeListenerNotFoundException, aerr.Error())
			case elb.ErrCodeInvalidConfigurationRequestException:
				fmt.Println(elb.ErrCodeInvalidConfigurationRequestException, aerr.Error())
			case elb.ErrCodeUnsupportedProtocolException:
				fmt.Println(elb.ErrCodeUnsupportedProtocolException, aerr.Error())
			default:
				fmt.Println(aerr.Error())
			}
		} else {
			// Print the error, cast err to awserr.Error to get the Code and
			// Message from an error.
			fmt.Println(err.Error())
		}
		return
	}

	fmt.Println(result)
}

// To replace the policies associated with a port for a backend instance
//
// This example replaces the policies that are currently associated with the specified
// port.
func ExampleELB_SetLoadBalancerPoliciesForBackendServer_shared00() {
	svc := elb.New(session.New())
	input := &elb.SetLoadBalancerPoliciesForBackendServerInput{
		InstancePort:     aws.Int64(80),
		LoadBalancerName: aws.String("my-load-balancer"),
		PolicyNames: []*string{
			aws.String("my-ProxyProtocol-policy"),
		},
	}

	result, err := svc.SetLoadBalancerPoliciesForBackendServer(input)
	if err != nil {
		if aerr, ok := err.(awserr.Error); ok {
			switch aerr.Code() {
			case elb.ErrCodeAccessPointNotFoundException:
				fmt.Println(elb.ErrCodeAccessPointNotFoundException, aerr.Error())
			case elb.ErrCodePolicyNotFoundException:
				fmt.Println(elb.ErrCodePolicyNotFoundException, aerr.Error())
			case elb.ErrCodeInvalidConfigurationRequestException:
				fmt.Println(elb.ErrCodeInvalidConfigurationRequestException, aerr.Error())
			default:
				fmt.Println(aerr.Error())
			}
		} else {
			// Print the error, cast err to awserr.Error to get the Code and
			// Message from an error.
			fmt.Println(err.Error())
		}
		return
	}

	fmt.Println(result)
}

// To replace the policies associated with a listener
//
// This example replaces the policies that are currently associated with the specified
// listener.
func ExampleELB_SetLoadBalancerPoliciesOfListener_shared00() {
	svc := elb.New(session.New())
	input := &elb.SetLoadBalancerPoliciesOfListenerInput{
		LoadBalancerName: aws.String("my-load-balancer"),
		LoadBalancerPort: aws.Int64(80),
		PolicyNames: []*string{
			aws.String("my-SSLNegotiation-policy"),
		},
	}

	result, err := svc.SetLoadBalancerPoliciesOfListener(input)
	if err != nil {
		if aerr, ok := err.(awserr.Error); ok {
			switch aerr.Code() {
			case elb.ErrCodeAccessPointNotFoundException:
				fmt.Println(elb.ErrCodeAccessPointNotFoundException, aerr.Error())
			case elb.ErrCodePolicyNotFoundException:
				fmt.Println(elb.ErrCodePolicyNotFoundException, aerr.Error())
			case elb.ErrCodeListenerNotFoundException:
				fmt.Println(elb.ErrCodeListenerNotFoundException, aerr.Error())
			case elb.ErrCodeInvalidConfigurationRequestException:
				fmt.Println(elb.ErrCodeInvalidConfigurationRequestException, aerr.Error())
			default:
				fmt.Println(aerr.Error())
			}
		} else {
			// Print the error, cast err to awserr.Error to get the Code and
			// Message from an error.
			fmt.Println(err.Error())
		}
		return
	}

	fmt.Println(result)
}
//Added a line for testing
//Adding another line for Git event testing part 2
//Adding another line for Git event testing part 2.1
//Adding another line for Git event testing part 2.2


text:
@import 'fira.css';
@import '../../vendor/components/jqueryui/themes/cupertino/jquery-ui.min.css';

html, body {
  margin: 0;
  padding: 0;
  min-height: 100%;
  min-width: 100%;
  background-color: #d5dbde !important;
}

ul {
  list-style: none;
}

@media print { /* Quick style sheet for printing. */
  body * {
    visibility: hidden;
  }

  /* Everything under the print class elements will be printed. */
  .print,.print * {
    visibility: visible;
  }

  /* Position elements at the beginning of the page. */
  .print {
    position: absolute;
    left: 0;
    top: 0;
  }
}

section {
  position: relative;
  width: 95%;
  margin: 0 auto;
  margin-bottom: 20px;
}

.spinner {
  display:inline-block;
  width: 25px;
  height: 25px;
  margin-left: 5px;
  vertical-align: middle;
  background:url("../pics/spinner.gif") no-repeat transparent;
}

/* topbar styles
 ***************************/

.topbar {
  height: 50px;
  margin-bottom: 20px;
}

.topbar > a {
  position: absolute;
}

.topbar-white {
  background-color: #ffffff;
}

#service-name {
  left: 30px;
  margin: 0;
  position: absolute;
  line-height: 50px;
}

.topbar-white > #language, .topbar-white > #navigation {
  background: #ffffff;
}

#language {
  float: right;
  height: 50px;
  width: auto;
  padding-left: 0px;
  padding-right: 2.5%;
  text-align: right;
  overflow: hidden;
  line-height: 70px;
}

#navigation {
  padding-right: 25px;
  height: 50px;
  min-width: 0px;
  max-width: 530px;
  width: auto;
  overflow: hidden;
  float: right;
  line-height: 70px;
}

#navigation *, #language * {
  margin: auto 4px;
}

#language-en {
  margin-right: 0;
}

#navigation .link-bg {
  height: 60px;
  float: left;
}

#navi4 {
  cursor: default;
}

#navi4 > span {
  border-bottom: 2px dotted #cfcfcf;
}

/* headerbar stuff
 *************************/

#lang-dropdown-toggle .caret, .multiselect span > .caret {
  border-top-color: #ffffff !important;
}

.navbar-form .dropdown-menu {
  border-radius: 0 !important;
  padding: 0 !important;
  margin-top: 0 !important;
  top: 40px !important;
}

.header-float > .navbar-form {
  box-shadow: none;
}

ul.dropdown-menu > li:last-child > input {
  display: none;
}

.multiselect-container {
  border-radius: 0 !important;
}

.multiselect-container > li.active > a, .multiselect-container > li > a:focus, .dropdown-menu > li:hover > a {
  background-color: #00748F !important;
  color: #ffffff !important;
}

.multiselect-container > li > a > label {
   padding: 3px 20px 3px 25px !important;
   word-wrap: break-word;
   white-space: pre-line;
}

.headerbar {
  position: relative;
  width: 95%;
  height: 50px;
  margin: 0 auto;
  margin-bottom: 20px;
}

.headerbar-coloured {
  background-color: #00748F;
}

.header-left {
  float: left;
}

.header-left > h1 {
  background-color: #00748F;
  position: absolute;
  line-height: 50px;
  margin: 0 0 0 15px;
}

.header-left > h1 > a {
  display: block;
  color: #ffffff !important;
  height: 50px;
  overflow: hidden;
}

.header-float {
  float: right;
}

.header-float > .btn-group {
  vertical-align: baseline;
  float: left;
}

.header-float > .btn-group > button {
  width: 150px;
  overflow: hidden;
}

.headerbar-coloured > .header-float > p {
  color: #ffffff !important;
}

.topbar a.navigation-font:hover {
  text-decoration: underline;
}

.navbar-form {
  display: inline-block;
  float: right;
  padding: 0 !important;
  border: 0 !important;
  margin: 5px 0 !important;
}

.search-result-listing {
  background-color: #ffffff;
}

.search-result-listing > p:last-of-type {
  margin-left: 15px;
}

.search-result-listing > .search-result:last-of-type {
  margin-bottom: 10px;
}

#search-from-all-vocabularies-radio-buttons {
  display: none;
}

#search-all-button {
  background-color: #394554;
  border: medium none !important;
  border-radius: 0 !important;
  height: 40px;
  margin-left: 0 !important;
}

.search-vocab-text {
  margin: 15px 5px 5px 5px;
  display: inline-block !important;
  float: left;
  text-align: right;
}

.search-vocab-text > p {
  color: #fff;
  height: 18px;
  margin: 0;
}

.search-hint {
  display: inline-block !important;
  text-align: bottom;
  border-bottom: 2px dotted #d6d6d6;
}

#example {
  background-color: #fff !important;
}

#example > button {
  color: #000 !important;
  line-height: 50px;
  margin-right: 4px;
}

.search-count {
  text-align: right;
}

.search-result-listing .no-results {
  margin: 15px;
}

.search-result-listing .search-count {
  text-align: left;
  margin-left: 15px;
}

.search-limited {
  padding-right: 140px !important;
}

#remove-limits {
  border-radius: 0;
}

#remove-limits:hover {
  background-color: #FFFFFF;
}

.search-result-listing .prefLabel {
  font-weight: bold !important;
}

.notation {
  margin-right: 12px;
}

.search-result > .notation {
  margin-right: 6px;
}

.search-result-listing .search-result {
  margin: 20px 15px ;
}

.search-result-listing {
  padding: 5px 0;
}

.search-result > div > span.uri-input-box {
  font-size: 12px;
  color: #006621;
}

.search-result {
  border: 1px solid transparent;
}

#lang-dropdown-toggle, .multiselect {
  background-color: #394554 !important;
  border: medium none;
  border-radius: 0 !important;
  box-shadow: none !important;
  color: #FFFFFF !important;
  height: 40px;
  padding-left: 10px !important;
  padding-right: 6px !important;
}

.multiselect {
  border: 0 !important;
  margin: 5px 0 0 0 !important;
}

.multiselect > span {
  float: right;
}

#selected-vocabs {
  display: none;
}

.navbar-left > .btn-group {
  float: left;
}

#search-field {
  background-color: #FFFFFF;
  border: medium none;
  border-radius: 0;
  display: block;
  font-family: Tahoma,Geneva,sans-serif;
  font-size: 14px;
  font-weight: bold;
  height: 40px;
  padding-left: 8px !important;
  padding-right: 22px !important;
  box-shadow: none !important;
}

#search-field:focus {
  box-shadow: none !important;
}

.input-group {
  display: table;
}

.form-control {
  display: table-cell;
}

.input-group-btn {
  width: 50px !important;
}

.qtip-skosmos {
  background-color: #1E1E1E !important;
  border-radius: 0 !important;
  margin-top: 2px;
}

.qtip-skosmos * {
  font-size: 14px;
  font-weight: 400;
  border: 3px solid #75889F;
}

/* front page stuff
 ***************************/
.welcome-box, .right-box, #vocabulary-list {
  vertical-align: top;
}

.welcome-box {
  background-color: #ffffff;
  padding: 15px;
  display: inline-block;
}

.welcome-box > h1, .right-box > h1 {
  margin-top: 0;
}

.right-box {
  background-color: #ffffff;
  width: 240px;
  padding: 15px;
  position: absolute;
  right: 0;
  top: 0;
}

.right-box {
  display: none;
}

.vocabulary-separator {
  width: 125px;
  border-bottom: 2px solid #666666 !important;
  margin-bottom: 10px;
  margin-left: 28%;
}

#vocabulary-list {
  background-color: #ffffff !important;
  display: inline-block;
}

#vocabulary-list > div > h2 {
  padding: 15px 0 15px 10px;
  margin-top: 0 !important;
  margin-bottom: 0px;
}

ul.vocab-category {
  display: inline-block;
  padding-left: 0 !important;
  width: 100%;
}

.vocab-category > ul > li, .vocab-category > li {
  display: inline-block;
}

.vocab-category > ul > li {
  display: block;
}

.vocab-category > ul {
  display: inline-block;
  width: 72%;
  float: right;
  padding-left: 0 !important;
}

.vocab-category > li > h2 {
  margin-top: 0 !important;
  margin-bottom: 5px !important;
}

.vocab-category > li {
  display: inline-block;
  padding: 0 !important;
  width: 25%;
  float: left;
}

.vocabularies {
  padding: 0 10px;
}

/* feedback page
 ***************************/
.missing-value {
  border: 1px solid red !important;
}

#message {
  height: 150px;
}

#feedback-fields > input:last-of-type {
  display: none;
}

.feedback-logo {
  position: absolute;
  min-width: 84px;
  display: block;
  left: 200px;
  border-bottom: 2px solid #394554;
  padding-top: 80px;
}

.feedback-box {
  border-top: 2px solid #394554;
  min-height: 140px !important;
}

.feedback-box * {
  border-radius: 0 !important;
  margin-bottom: 0;
  box-shadow: none !important;
}

.feedback-box > p {
  line-height: 50px;
}

.feedback-box > div > span {
  display: block;
  margin: 15px 0;
}

.feedback-box input, .feedback-box select, .feedback-box textarea {
  border: none;
  color: #00748f !important;
  margin-bottom: 10px;
  background-color: #f6f7f8;
  resize: none;
}

.feedback-thanks {
  margin-top: 15px;
}

::-webkit-input-placeholder { /* WebKit browsers */
  color: #00748f !important;
}
:-moz-placeholder { /* Mozilla Firefox 4 to 18 */
  color: #00748f !important;
}
::-moz-placeholder { /* Mozilla Firefox 19+ */
  color: #00748f !important;
}
:-ms-input-placeholder { /* Internet Explorer 10+ */
  color: #00748f !important;
}

#send-feedback {
  background-color: #394554;
  border: none;
  float:right;
  margin: 5px 0 15px 0;
}

#send-feedback:hover {
  background-color: #0098ff !important;
}

/* about page
 ***************************/
#about {
  width: 500px;
  background-color: #ffffff;
  padding-bottom: 15px;
  margin-bottom: 15px;
  border-top: 2px solid #394554;
}

.about-content {
  margin: 0 15px;
}

.about-content > p > a {
  margin: 0 5px;
}

.special-container {
  position: absolute;
  left: 0px;
  margin-left: 200px;

}

.credits {
  width: 500px;
  border-top: 2px solid #394554;
}

/* sidebar styles
 ***************************/

#sidebar {
  position: absolute;
  width: 320px;
  height: 100%;
}

.sidebar-grey {
  background-color: #f6f7f8;
  height: 100%;
  height: calc(100% - 42px) !important;
  overflow-y: auto;
}

.sidebar-grey ul, .sidebar-grey p {
  padding-left: 0;
}

#sidebar hr {
  border: 1px solid #666666 !important;
  margin: 0 0 0 15px;
  width: 125px;
}

#sidebar .multiselect > span, #sidebar .multiselect > span > b.caret {
  color: #474b4f !important;
  border-top-color: #474b4f !important;
}

.search-options > .input-group > .btn-group {
  display: block;
}

.search-options > .input-group > .btn-group > .multiselect {
  background-color: #fff !important;
  border: 1px solid #ccc !important;
  overflow-y: hidden;
}

.search-options > .input-group > .btn-group > .multiselect-container {
  top: 44px;
}

.search-options > .input-group > .btn-group > .multiselect-container > li:first-of-type > * {
  height: 26px;
}

.multiselect-container li {
  min-height: 26px !important;
}

.multiselect-container li > a > label.checkbox {
  margin: 0;
  padding: 3px 5px 3px 25px;
  height: 100% !important;
}

.multiselect-container li > a > label.checkbox > input {
  margin-top: 2px;
  padding: 0;
}

.search-options .multiselect > span {
  float: left;
  width: 252px;
  overflow: hidden;
  text-align: left;
}

.search-options .multiselect > .caret {
  color: #474b4f !important;
  float: right;
  position: absolute;
  right: 5px;
  top: 16px;
  display: inline-block;
}

.fixed {
  position: fixed !important;
  height: 95%;
  height: calc(100% - 2px) !important;
  top: 2px;
}

.search-options > .btn-default:hover {
  border: 1px solid #ccc;
}

.btn-active, .btn:active, .btn-default:active {
  -webkit-box-shadow: none !important;
     -moz-box-shadow: none !important;
       -o-box-shadow: none !important;
          box-shadow: none !important;
}

.preflabel-spacer {
  height: 18px !important;
  background: url('../pics/stripe.png') repeat-x 50% center !important;
}

hr {
  border: 1px solid transparent !important;
  background: url('../pics/stripe.png') !important;
  margin-top: 5px !important;
  margin-bottom: 15px !important;
}

div#sidebar-grey > div > div > form.search-options {
  margin-right: 0px !important;
}

.search-options {
  padding-left: 15px;
}

.search-options > .input-group * {
  border-radius: 0;
}

.search-options > .btn-default {
  border-radius: 0;
}

.search-result-listing .btn-default {
  position: absolute;
  right: 10px;
  top: 10px;
}

.search-options .mCSB_container > li > a > .radio {
  padding-left: 25px;
  margin: 0;
}

.search-options .mCSB_container > li > a > label {
  font-weight: 400;
}

form.search-options > .input-group > .form-control {
  width: 280px !important;
}

form.search-options div.input-group:first-child {
  padding-top: 5px;
}

form.search-options div.input-group {
  padding-bottom: 15px;
}

div.input-group > .input-group-addon {
  min-width: 65px !important;
}

.alphabetical-search-results li, .group-container > p, .group-container > ul {
  font-size: 14px;
  line-height: 15px;
  list-style-type: none;
}

#alphabetical-menu {
  margin: 15px 0 0 15px;
}

.activated-concept, .jstree-clicked {
  color: #474b4f !important;
  font-weight: 600 !important;
  background-color: transparent !important;
  border: 0 !important;
}

.group-container {
  margin: 15px 0 5px 15px;
}

li.sub-group {
  margin-left: 25px;
}

/* scrollbars
 ****************************/
.mCSB_container {
  margin-right: 15px !important;
}

.mCSB_scrollTools {
  opacity: 1 !important;
  width: 14px !important;
}

.mCSB_draggerRail {
  background-color: #b9c1c6 !important;
  border-radius: 0 !important;
  width: 14px !important;
}

.mCSB_dragger {
  background-color: #474b4f !important;
  border-radius: 0 !important;
  width: 14px !important;
}

.mCSB_dragger_bar {
  display: none !important;
}

.sidebar-grey-alpha .mCSB_dragger {
  height: 50px !important;
}

/* tables
 ****************************/

th, td {
  border-top: none !important;
}

tr {
  border-image: '../pics/stripe.png' 20 20 repeat;
}

/* vocabulary
 ****************************/
.container {
  background-color: #ffffff;
  width: auto !important;
}

.download-links {
  margin-bottom: 15px;
}

/* alerts
 ****************************/
.alert {
  background-color: #ed0d6c !important;
  border-radius: 0 !important;
  border: none !important;
  color: white !important;
}

.alert-lang {
  background-color: #D4EDEB !important;
  color: #474b4f !important;
}

.frontpage-alert {
  display: inline-block;
}

.alert h2 {
  margin: 5px 0 5px 0;
}

.alert-replaced a {
  color: #ffffff !important;
  display: inline-block;
  margin-left: 5px;
  text-decoration: underline !important;
}

#lang-info * {
  color: #ffffff;
}

#lang-info > h1 {
  float: left;
  font-size: 48px !important;
  margin: -5px 15px 0 0;
}

.errors {
  color: red;
}

/* concept
 ****************************/
.concept-info {
  background-color: #ffffff;
  margin-bottom: 20px;
}

.deprecated-concept * {
  color: #888888 !important;
}

.concept-info li, .concept-info ul {
  list-style: none;
  padding-left: 0;
  margin-bottom: 0;
}

.concept-info div > table > tbody > tr > td:first-child {
  max-width: 225px;
  width: 225px;
}

.concept-info p {
  margin: 0 !important;
}

.concept-appendix {
  background-color: #edf0f2 !important;
  padding: 15px;
}

.concept-main {
  margin: 0 15px;
  padding: 15px 0;
}

.appendix-values.table {
  background-color: transparent !important;
  margin-bottom: 0;
}

.appendix-values.table > tbody > tr > td {
  padding: 0 !important;
  border-bottom: 0;
}

.appendix-vocab-label {
  font-size: 12px;
  line-height: 21px;
}

.concept-main > table, .concept-appendix > table {
  margin-bottom: 0;
}

.hidden-breadcrumb, .hidden-path {
  display: none;
}

.restore-breadcrumbs {
  background-color: #fff;
  float: right;
}

.crumb-path {
  float:left;
  width: 100%;
}

.field-label {
  vertical-align: top !important;
}

.foundby {
  margin-left: 225px;
}

.preflabel-container, .preflabel-container hr {
  margin: 10px 0 5px 0 !important;
}

.preflabel-container > td {
  border: 0 !important;
}

.preflabel-desc > span {
  position: relative;
  top: 11px;
}

.search-results-property-table {
  margin-bottom: 5px;
}

.search-results-property-table td {
  padding: 5px 0 0 0 !important;
}

.search-results-property-table td.preflabel-spacer {
  border-bottom: 1px solid transparent !important;
  padding: 0 !important;
  margin-bottom: 10px;
}

.search-results-property-table td:last-child {
  border-bottom: 2px solid #d4edeb;
}

.search-results-property-table tr.other-languages > td:last-child {
  border-bottom: none !important;
}

.search-results-property-table > tbody > tr:last-child > td {
  border-bottom: 0 !important;
}

.search-results-property-table tr.other-languages > td {
  border: none;
  vertical-align: top;
}

.other-languages > td:first-of-type {
}

.other-languages > td:last-of-type {
  vertical-align: top;
}

.other-languages > td {
  padding-top: 0px !important;
}

.other-languages > td:last-of-type > * {
  padding-left: 15px;
}

.search-results-property-table > tbody > tr > td.empty {
  border: none;
}

.search-results-property-table tr.first-of-language > td {
  padding-top: 0px !important;
}

.search-results-property-table tbody > tr > td:first-of-type {
  word-wrap: break-word;
}

.search-results-property-table tbody > tr.first-of-language:first-child > td {
  padding-top: 0px !important;
}

.search-results-property-table td.versal-pref, .group-container > p.versal-pref {
  font-weight: 500 !important;
}

.property {
  display: block;
  width: 100%;
}

.property-values {
  display: inline-block;
  width: 95%;
  width: calc(100% - 24px);
}

.shortened-property {
  display: inline-block;
  height: 18px !important;
  overflow: hidden;
  position: relative;
  white-space: nowrap;
  width: 95%;
  width: calc(100% - 24px);
}

.property-click {
  display: inline-block;
  vertical-align: top;
}

.property-click > img {
  vertical-align: top;
}

.help-box.property-click > img {
  vertical-align: middle;
}

.shortened-symbol {
  display: inline-block;
  height: 20px;
  padding: 0 0 0 2px;
  right: 10px;
  position: absolute;
  background-color: #ffffff;
}

.global-content .shortened-symbol {
  right: 160px;
}

td > .property-click {
  border-bottom: 2px dotted #CFCFCF;
}

.concept-appendix .property-click {
  border-bottom: 2px dotted #C9C7C7;
}

.help-box {
  background-color : #F0F0F0;
  border-bottom: none !important;
  padding: 2px 4px;
}

.help-box img {
  margin-top: -1px !important;
  border-right: 2px dotted #888888;
  padding-right: 5px !important;
}

.help-box > span.versal {
  display: inline-block;
  margin-left: 5px !important;
}

tr .property-hover {
  margin-left: 5px;
  margin-bottom: 2px;
}

tr.replaced-by > td > span {
  color: #474b4f !important;
  font-weight: bold !important;
}

tr.replaced-by > td > ul > li > a {
  color: #00748f !important;
  font-weight: bold !important;
}

.subvalue {
  margin-left: 15px;
}

.property-divider {
  position: absolute;
  width: 14%;
  border-bottom: 2px solid #666666;
  margin: -20px 0 0 0 !important;
}

.property-divider hr {
  border-bottom: 2px solid #3bc2bd !important;
  width: 125px;
  position: absolute;
}

.table th {
  padding-left: 0 !important;
}

.concept-main > .search-results-property-table {
  margin-top: 10px;
  margin-bottom: 5px;
}

#statistics { max-width: 450px; }

#statistics .property-divider {
  margin: 0 !important;
}

#statistics td, #statistics th {
  padding: 0 !important;
}

.pagination > li > a, .pagination > li > span {
  border: 0 !important;
  background-color: transparent !important;
  padding: 4px 8px !important;
}

.pagination > li:last-child > a, .pagination > li:last-child > span {
  border-radius: 0 !important;
}

.pagination > li:first-child > a {
  border-radius: 0 !important;
  margin-left: -1px !important;
}

.pagination > li > a {
  width: 25px;
}

.pagination > li:last-child > a {
  width: auto;
}

.pagination {
  background-color: #F6F7F8;
  border-radius: 0 !important;
  border-bottom: 1px solid #999999;
  margin: 0 0 -5px 0 !important;
  width: 310px;
  padding: 0 0 0 10px !important;
}

.nav-tabs, #groups > a {
  background-color: #e0e4e7;
  border-bottom: none !important;
}

ul.nav-tabs > li {
  margin-bottom: 0;
  outline: none;
}

.nav-tabs > li > a, .nav-tabs > li > p {
  background-color: #e6e9eb;
  border-radius: 0 !important;
  border: 0 !important;
  text-align: center;
  padding: 10px 15px;
  margin: 0 !important;
  outline: none;
}

#limit {
  margin-top: -1px;
  width: 33%;
}

.nav-tabs > li {
  width: 33%;
}

#alpha {
  width: 34% !important;
}

.nav-tabs > li > a:hover {
  background-color: #ffffff !important;
}

.nav-tabs > li.active > a {
  background-color: #f6f7f8 !important;
}

.content {
  margin-left: 350px;
}

.global-content {
  margin-left: 150px;
  margin-right: 150px;
}

.date-info > p {
  font-size: 12px;
}

td.date-info {
  border-bottom: none !important;
}

/* typeahead.js
 ***********************************/

.typeahead,
.tt-query,
.tt-hint {
  width: 396px;
  font-size: 14px;
  line-height: 20px;
  border: 2px solid #ccc;
  border-radius: 0 !important;
  outline: none;
}

.typeahead {
  background-color: #fff;
}

.typeahead:focus {
  border: 2px solid #75889F;
}

.tt-hint {
  color: #999
}

.tt-dropdown-menu {
  width: 100%; //fallback
  width: calc(100% + 50px) !important;
  min-width: calc(100% + 50px) !important;
  right: 0px !important;
  top: 40px !important;
  max-height:302px;
  overflow-y: auto;
  background-color: #F9F9F9;
  border: 1px solid #ccc;
  border: 1px solid rgba(0, 0, 0, 0.2);
  border-radius: 0 !important;
}

.twitter-typeahead {
  display: block !important;
}

.tt-dropdown-menu.mCustomScrollbar {
  border-right: 0 !important;
}

.tt-suggestion p {
  display: inline-block;
  padding-right: 2px;
}

.tt-suggestion p:last-of-type {
  padding-right: 0;
}

.tt-suggestion:last-of-type {
  border-bottom: none;
}

.autocomplete-no-results {
  margin: 0 0 0 6px !important;
}

.tt-suggestion {
  cursor: pointer;
  padding: 2px 8px;
  font-size: 14px !important;
  line-height: 20px;
  border-bottom: 1px solid #cccccc;
}

.tt-suggestion:last-of-type {
  border-bottom: none !important;
}

.tt-suggestion.tt-cursor {
  background-color: #EEEEEE;
}

.twitter-typeahead > .form-control {
  height: 30px;
  border-radius: 0;
}

.navbar-form > .input-group > .input-group-btn {
  vertical-align: top;
}

.tt-suggestion p {
  margin: 0;
}

.twitter-typeahead > .clear-search {
  color: #CCCCCC !important;
  font-size: 24px !important;
  top: 4px;
  cursor: pointer;
  position: absolute !important;
  right: 8px;
  z-index: 9001;
}

.clear-search-dark {
  color: #555555 !important;
}

.gist {
  font-size: 14px;
}

.search-options > div.input-group > .twitter-typeahead, .search-options > div.input-group > .twitter-typeahead > .tt-dropdown-menu, .search-options > .input-group > .btn-group > * {
  width: 280px;
}

.vocab, .concept-type {
  font-size: 12px !important;
}

.type {
  float: right;
}

.tt-suggestion > .concept-type {
  height: auto;
  float: right;
}

.tt-suggestion {
  overflow: hidden;
}

p.autocomplete-label {
  color: #00748f !important;
}

/* jsTree customization
 *****************************************/
.jstree-leaf > .jstree-ocl {
  width: 13px !important;
}

.jstree-closed > .jstree-ocl {
  width: 24px !important;
}

.jstree-clicked, .jstree-hovered {
  box-shadow: none !important;
}

.jstree-default .jstree-node, .jstree-default .jstree-anchor {
    line-height: 18px !important;
    min-height: 18px !important;
}

.jstree-default .jstree-icon {
    line-height: 18px !important;
    height: 18px !important;
    width: 18px !important;
}

.jstree-default.jstree-rtl .jstree-node {
    margin-right: 18px !important;
}

.jstree-default .jstree-wholerow {
    min-height: 18px !important;
}

.jstree-open > .jstree-anchor, .jstree-closed > .jstree-anchor {
  line-height: 18px !important;
}

.jstree-anchor {
  padding: 0 18px 0 1px !important;
}

.jstree-node {
  margin-left: 10px !important;
}

.jstree-container-ul > .jstree-node {
  margin-left: 2px !important;
}

.jstree-default a { white-space:normal !important; height: auto !important; }
.jstree-default li > ins { vertical-align:top; }

.sidebar-grey .jstree-closed > .jstree-ocl {
  background-position: -100px -8px !important;
}

.sidebar-grey .jstree-open > .jstree-ocl {
  background-position: -132px -8px !important;
}

.jstree-default .jstree-leaf > .jstree-ocl {
  background-position: -68px -8px !important;
}

.yso-concept {
  color: #474b4f !important;
}

.group {
  font-weight: bold;
}

/* Font definitions
 *****************************************/
li {
  font-family: 'Fira Sans' !important;
  font-size: 14px !important;
}

h1, .prefLabel, .prefLabelLang, .notation {
  font-family: 'Fira Sans' !important;
  font-size: 27px !important;
  font-weight: 400 !important;
}

.prefLabel, .prefLabelLang, .notation {
  font-weight: 500 !important;
}

.prefLabelLang {
  color: #474b4f;
}

h1#service-name {
  font-size: 27px !important;
  font-family: 'Fira Sans' !important;
  font-weight: bold !important;
}

a {
  color: #00748f !important;
}

h2 {
  font-family: 'Fira Sans' !important;
  font-style: bold !important;
  font-size: 16px !important;
}

.navigation-font {
  font-family: 'Fira Sans';
  font-size: 16px;
  color: black;
}

.multiselect span, .multiselect a, .dropdown-toggle, #search-all-button, .qtip-skosmos * {
  font-family: 'Fira Sans';
}

.topbar a.navigation-font, .topbar span {
  color: #394554 !important;
}

p {
  font-family: 'Fira Sans';
  font-size: 14px;
  color: #474b4f;
}

.bread-crumb {
  font-family: 'Fira Sans';
  font-size: 14px;
}

.versal {
  font-family: 'Fira Sans';
  font-size: 14px;
  font-weight: 400 !important;
  color: #474b4f;
}

.versal-bold {
  font-family: 'Fira Sans';
  font-size: 14px;
  font-weight: bold;
}

.loading-spinner {
  margin: 10px 0 0 15px;
}

.replaced {
  font-style: italic;
}

a:link,a:visited,a:active,a:hover,a:focus {
  /* Improves link handling by removing focus borders. Sorry keyboard users! */
  text-decoration: none;
  border: 0;
  outline: none;
}

a:hover {
  text-decoration: underline;
  /* All text links have underlining when hovered. */
}

#service-logo {
  max-width: 450px;
}

/* Fix for a nasty chromium bug causing the fonts not to render before a redraw.
 * https://code.google.com/p/chromium/issues/detail?id=336476
 ************************************/

body, .versal, h1, h2, p, .versal-bold {
  -webkit-animation-delay: 0.1s;
  -webkit-animation-name: fontfix;
  -webkit-animation-duration: 0.1s;
  -webkit-animation-iteration-count: 1;
  -webkit-animation-timing-function: linear;
}

@-webkit-keyframes fontfix {
  from { opacity: 1; }
  to   { opacity: 1; }
}

/* mediaquery
 ***********************************/
@media (max-width: 800px) {
  section, .headerbar {
    width: 95% !important;
  }

  .headerbar {
    margin-bottom: 15px !important;
  }

  .navbar-form {
    max-width: 300px !important;
  }

  .feedback-logo, .about-logo {
    left: 10px !important;
  }

  .feedback-box, #about {
    margin-left: 120px !important;
    width: 500px !important;
  }

  p.search-vocab-text {
    text-indent: -100%;
    white-space: nowrap;
    overflow: hidden;
  }

  .tt-dropdown {
    max-width: 240px !important;
  }

  .content {
    margin-left: 300px;
  }

  #sidebar {
    width: 270px !important;
  }

  .property-divider {
    width: 17%;
  }

  h1 {
    font-size: 22px !important;
  }

  #sidebar {
    display: none;
  }

  .content, .global-content {
    margin: 0 auto;
  }

  .welcome-box, .right-box {
    width: 200px !important;
    float: left;
  }

  #vocabulary-list {
    position: relative;
    float: right;
    width: calc(100% - 220px) !important;
    margin-left: 15px;
  }

  .vocab-category > ul, .vocab-category > li {
    left: 0;
    width: 100%;
  }

  .vocabulary-separator {
    margin-left: 0;
  }

}

@media (max-width: 400px) {
  #navi3 {
    display: none;
  }
}

@media (max-width: 550px) {

  #navigation {
    left: 3.5%;
  }

  .topbar > a {
    display: none;
  }

  .topbar.frontpage > a {
    display: inline;
  }

}

@media (max-width: 640px) {

  .welcome-box, .right-box {
    display: none !important;
  }

  #vocabulary-list {
    width: 100% !important;
    margin: 0 !important;
  }

  .headerbar {
    width: 95% !important;
  }

  .content {
    overflow: hidden;
  }

  .search-vocab-text{
    display: none !important;
  }

}

@media (max-width: 500px) {

}

@media (max-width: 800px) {
  input#search-field {
    max-width: 130px;
  }

}

@media (max-width: 700px) {
  .topbar {
    position: relative;
  }

  #navi1, #navi2, #navi3, #navi4 {
    background-image: none !important;
    padding-left: 0 !important;
  }

  #navigation {
    width: auto !important;
    left: 2.5%;
  }

  #navigation > a, #language > a, #navi4 > span {
    margin: 2px;
    font-weight: 500;
  }

  .frontpage #language {
    position: absolute;
    right: 2.5%;
    text-align: left;
    padding-right: 0;
  }

  #service-logo {
    height: 200px !important;
    position: absolute;
    right: 3%;
  }

  .frontpage-spacing .header-float {
    float: left;
    width: 100%;
  }

  section.frontpage {
    top: 10px;
    overflow: hidden;
  }

  #navigation {
    padding-right: 0 !important;
    position: absolute;
  }

  input#search-field {
    max-width: none;
  }

  .btn-group {
    width: 100%;
  }

  .btn-group > .btn {
    width: 100% !important;
  }

  .navbar-form, .input-group, #search-field {
    width: 100% !important;
  }

  .frontpage-logo .navbar-form {
    max-width: none !important;
  }
}

@media (min-width: 640px) {
  #service-logo {
    display: inline !important;
  }

  .right-box {
    display: inline !important;
    top: 425px !important;
    left: 0;
  }

  .crumb-path:first-of-type {
    max-width: calc(100% - 180px);
  }

}

@media (min-width: 801px) {
  .right-box {
    top: 435px !important;
  }

  .frontpage-alert {
    margin-left: 20px;
    width: calc(100% - 375px);
  }

  .nav > li > a {
    padding: 10px 10px !important;
  }

  .input-group {
    max-width: 350px !important;
  }

  .frontpage-logo .input-group {
    max-width: 450px !important;
  }

  .tt-dropdown-menu {
    width: 234px;
  }

  #navigation > a {
    margin: auto 10px;
  }

  #service-logo {
    position: absolute;
    display: normal !important;
  }

  .feedback-box, #about {
    width: 500px !important;
  }

  .content {
    margin-left: 330px;
  }

  #sidebar {
    width: 310px !important;
  }

  .property-divider {
    width: 17%;
  }

  .welcome-box, .right-box {
    width: 200px !important;
  }

  #vocabulary-list {
    margin-left: 20px;
    width: auto;
    width: calc(100% - 225px) !important;
  }

  h1 {
    font-size: 24px !important;
  }

}

@media (max-width: 900px) {
  .global-content {
    margin-right: 0 !important;
  }
}

@media (max-width: 1259px) {

  .search-result-listing .prefLabel, .search-result-listing .notation {
    font-size: 14px !important;
  }

}

@media (min-width: 1260px) {
  section, .headerbar, .topbar {
    width: 1190px !important;
  }

  #service-name {
    left: 0 !important;
  }

  .frontpage-alert {
    width: calc(100% - 610px);
  }

  .sidebar-grey-alpha {
    height: calc(100% - 150px) !important;
  }

  .search-options .multiselect {
    width: 370px !important;
  }

  .search-options .multiselect > span, .search-options .multiselect-container {
    width: 370px !important;
  }

  .pagination {
    width: 400px;
    top: 183px !important;
    padding: 6px 10px !important;
  }

  .pagination > li > a {
    width: 26px;
  }

  .topbar {
    position: relative;
    margin: 0 auto;
    margin-bottom: 20px;
  }

  #language {
    right: 0;
    padding-right: 0;
    padding-left: 25px;
  }

  #navigation {
    position: relative;
    padding-right: 0;
  }

  .welcome-box, .right-box {
    width: 210px !important;
  }

  .right-box {
    display: inline-block;
    top: 0 !important;
    left: auto !important;
  }

  .feedback-box, #about {
    width: 600px !important;
  }

  .tt-dropdown-menu {
    width: 310px;
  }

  .global-content {
    margin-left: 180px;
    margin-right: 245px;
  }

  .global-content .shortened-symbol {
    right: 255px;
  }

  .content {
    margin-left: 425px;
  }

  input#search-field {
    width: 260px !important;
  }

  #vocabulary-list {
    position: relative;
    display: inline-block;
    width: 720px !important;
  }

  #sidebar {
    width: 400px !important;
  }

  h1 {
    font-size: 27px !important;
  }

  li, .versal, .versal-bold, p, .search-result > .prefLabel, .search-result > .notation {
    font-size: 16px !important;
  }

  .search-result > div > span.uri-input-box {
    font-size: 14px !important;
  }

  .appendix-vocab-label {
    font-size: 14px !important;
    line-height: 23px;
  }

  .date-info > p {
    font-size: 14px !important;
  }

  .search-options > div.input-group > .twitter-typeahead, .search-options > div.input-group > .twitter-typeahead > .tt-dropdown-menu {
    width: 370px;
  }

}

@media (min-width: 1520px) {

  section, .headerbar, .topbar {
    width: 1240px !important;
  }

  .frontpage-alert {
    width: calc(100% - 530px);
  }

  #vocabulary-list {
    position: relative;
    display: inline-block;
    width: 710px !important;
  }

  .right-box {
    width: 240px !important;
  }

  .welcome-box {
    margin-left: 0 !important;
    width: 240px !important;
  }

  #sidebar {
    width: 400px !important;
  }
}

<!--[if IE]>
#vocab-info hr {
  border: 2px dashed #62729f !important;
}
<![endif]-->

redpajama_set_name: RedPajamaGithub


text:
var gulp = require('gulp');
var nodemon = require('gulp-nodemon');

gulp.task('nodemon', function () {
	nodemon({
		script: 'server.js'
	});
})


text:
// Copyright (c) Lex Li. All rights reserved.
//
// Licensed under the MIT license. See LICENSE file in the project root for full license information.

namespace JexusManager.Features.Authentication
{
    using System;
    using System.ComponentModel;
    using System.Windows.Forms;

    using Microsoft.Web.Management.Client.Win32;
    using System.Reactive.Linq;
    using System.Reactive.Disposables;
    using Microsoft.Web.Management.Client.Extensions;

    public partial class BasicEditDialog : DialogForm
    {
        public BasicEditDialog(IServiceProvider serviceProvider, BasicItem existing, AuthenticationFeature feature)
            : base(serviceProvider)
        {
            InitializeComponent();
            var container = new CompositeDisposable();
            FormClosed += (sender, args) => container.Dispose();

            txtDomain.Text = existing.Domain;
            txtRealm.Text = existing.Realm;

            container.Add(
                Observable.FromEventPattern<EventArgs>(btnOK, "Click")
                .ObserveOn(System.Threading.SynchronizationContext.Current)
                .Subscribe(evt =>
                {
                    existing.Domain = txtDomain.Text;
                    existing.Realm = txtRealm.Text;
                    existing.Apply();
                    DialogResult = DialogResult.OK;
                }));

            container.Add(
                Observable.FromEventPattern<CancelEventArgs>(this, "HelpButtonClicked")
                .ObserveOn(System.Threading.SynchronizationContext.Current)
                .Subscribe(EnvironmentVariableTarget =>
                {
                    feature.ShowHelp();
                }));
        }
    }
}


text:
package testclock

import (
	"time"

	"github.com/luci/luci-go/common/clock"
	"golang.org/x/net/context"
)

// UseTime instantiates a TestClock and returns a Context that is configured to
// use that clock, as well as the instantiated clock.
func UseTime(ctx context.Context, now time.Time) (context.Context, TestClock) {
	tc := New(now)
	return clock.Set(ctx, tc), tc
}


text:
require "basic_site/engine"

module BasicSite
end


text:
using System;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using Sophos.Commands;

namespace CommandLibTests
{
    [TestClass]
    public class DelayCommandTests
    {
        [TestMethod]
        public void DelayCommand_TestAbort()
        {
            AbortTest.Run(new DelayCommand(TimeSpan.FromDays(1)), null, 10);
        }

        [TestMethod]
        public void DelayCommand_TestHappyPath()
        {
            HappyPathTest.Run(new DelayCommand(TimeSpan.FromMilliseconds(1)), null, true);

            using (var shortDelay = new DelayCommand(TimeSpan.FromMilliseconds(100)))
            {
                shortDelay.AsyncExecute(new CmdListener(CmdListener.CallbackType.Succeeded, null));
                HappyPathTest.Run(new PauseCommand(TimeSpan.MaxValue, shortDelay.DoneEvent), null, null);
            }
        }
    }
}


text:
import { Routes } from '@angular/router';
import { AppComponent } from './app.component';
import { TaskComponent } from './task.component';
import { AllTasksComponent } from './allTasks.component';
import { SearchByTagComponent } from './searchByTag.component';
import { ManageTagsComponent } from './manageTags.component';

import { DataResolver } from './app.resolver';

export const ROUTES: Routes = [
  { path: 'new',  component: TaskComponent, },
  { path: 'edit/:id',  component: TaskComponent, },
  { path: 'all',  component: AllTasksComponent },
  { path: 'search',  component: SearchByTagComponent },
  { path: 'manage-tags', component: ManageTagsComponent },
  { path: '', redirectTo: '/new', pathMatch: 'full'}

];


text:
<!doctype html>

		<title>Zabuun - Learn Egyptian Arabic for English speakers</title>
		<meta name="description" content="">
		<?php include $_SERVER['DOCUMENT_ROOT'].'/layout/head.php';?>

		<?php include $_SERVER['DOCUMENT_ROOT'].'/layout/ie8.php';?>
		<?php include $_SERVER['DOCUMENT_ROOT'].'/layout/header.php';?>

			<?php include $_SERVER['DOCUMENT_ROOT'].'/layout/side.php';?>

Essays > Sunset Boulevard and Hollywood

						Expand All | Collapse All

Sunset Boulevard and Hollywood

Just north of Sunset Blvd lies Hollywood Blvd, which is a major tourist attraction. One of the greatest features of Hollywood Blvd is the Walk of Fame, which distinguishes Hollywood Blvd from any other street in the country. It features memorial plaques embedded into the cement on the sidewalk. The plagues are stars with names of famous movie actors and actresses, from the past to the present. It is considered a great honor to have a star on streets of Hollywood.

		<?php include $_SERVER['DOCUMENT_ROOT'].'/layout/footer.php';?>
		<?php include $_SERVER['DOCUMENT_ROOT'].'/layout/scripts.php';?>


text:
/**
 * <!-- Package description. -->
 * Contains annotations for Dynamic MBeans.
 */
package org.apache.ignite.mxbean;


text:
 /**
 * This package provides HTML support the View  templating system: {@link divconq.web.dcui}.
 */
package w3.html;


text:
package csvutil

import (
	"io"
	"strings"

	"github.com/icrowley/fake"
	"github.com/pkg/errors"
)

var mobileEmailDomains = []string{
	"docomo.ne.jp",
	"ezweb.ne.jp",
	"softbank.ne.jp",
	"i.softbank.ne.jp",
	"ymobile.ne.jp",
	"emobile.ne.jp",
}

// EmailOption is option holder for Email.
type EmailOption struct {
	// Source file does not have header line. (default false)
	NoHeader bool
	// Encoding of source file. (default utf8)
	Encoding string
	// Encoding for output.
	OutputEncoding string
	// Target column symbol.
	Column string
	// Rate of output mobile email address.
	MobileRate int
}

func (o EmailOption) validate() error {
	if o.Column == "" {
		return errors.New("no column")
	}
	if o.NoHeader {
		if !isDigit(o.Column) {
			return errors.New("not number column symbol")

		}
	}
	if o.MobileRate < 0 || 100 < o.MobileRate {
		return errors.New("invalid mobile rate (0 <= rate <= 100)")
	}
	return nil
}

func (o EmailOption) outputEncoding() string {
	if o.OutputEncoding != "" {
		return o.OutputEncoding
	}
	return o.Encoding
}

// Email overwrite value of given column by dummy email address.
func Email(r io.Reader, w io.Writer, o EmailOption) error {
	if err := o.validate(); err != nil {
		return errors.Wrap(err, "invalid option")
	}

	cr, bom := reader(r, o.Encoding)
	cw := writer(w, bom, o.outputEncoding())
	defer cw.Flush()

	var col *column
	csvp := NewCSVProcessor(cr, cw)
	if o.NoHeader {
		csvp.SetPreBodyRead(func() error {
			col = newColumnWithIndex(o.Column, nil)
			return col.err
		})
	} else {
		csvp.SetHeaderHanlder(func(hdr []string) ([]string, error) {
			col = newColumnWithIndex(o.Column, hdr)
			return hdr, col.err
		})
	}
	csvp.SetRecordHandler(func(rec []string) ([]string, error) {
		if lot(o.MobileRate) {
			rec[col.index] = fakeMobileEmail()
		} else {
			rec[col.index] = fakeEmail()
		}
		return rec, nil
	})

	return csvp.Process()
}

func fakeEmail() string {
	return strings.ToLower(fake.EmailAddress())
}

func fakeMobileEmail() string {
	return strings.ToLower(fake.UserName()) + "@" + sampleString(mobileEmailDomains)
}


text: default_app_config = 'd4s2_api.apps.D4S2ApiConfig'


text:
package com.uwetrottmann.shopr.algorithm.model;

import java.util.Arrays;

import com.uwetrottmann.shopr.algorithm.model.Attributes.AttributeValue;

public class Sex extends GenericAttribute {

	public static final String ID = "gender";

	public enum Value implements AttributeValue {
		FEMALE("Female", "female", Colors.PINK),
		MALE("Male", "male", Colors.BLUE);
		//UNISEX("Unisex", "unisex", Colors.GREEN);

		private String mDescriptor;
		private String mColor;
        private String mSimpleName;
        private String simpleNamePrefix = "gender_";

        Value(String name, String simpleName, String color) {
            mDescriptor = name;
            mSimpleName = simpleNamePrefix + simpleName;
            mColor = color;
        }

		@Override
		public String descriptor() {
			return mDescriptor;
		}

        @Override
        public String simpleName() {
            return mSimpleName;
        }

		@Override
		public int index() {
			return ordinal();
		}

		@Override
		public String color() {
			return mColor;
		}

		@Override
		public String explanatoryDescriptor() {
			return mDescriptor + " items";
		}
	}

	public Sex() {
		int numValues = Value.values().length;
		mValueWeights = new double[numValues];
		Arrays.fill(mValueWeights, 1.0 / numValues);
	}

	public Sex(Value value) {
		setWeights(value);
	}

	/**
	 * Tries to match the given string with a {@link Sex.Value}.
	 */
	public Sex(String value) {
		if ("Weiblich".equals(value)) {
			setWeights(Sex.Value.FEMALE);
		} else if ("Männlich".equals(value) || "M�nnlich".equals(value)) {
			setWeights(Sex.Value.MALE);
		} /*else if ("Beide".equals(value)) {
			setWeights(Sex.Value.UNISEX);
		}*/
	}

	private void setWeights(Value value) {
		mValueWeights = new double[Value.values().length];
		Arrays.fill(mValueWeights, 0.0);
		mValueWeights[value.ordinal()] = 1.0;
		currentValue(value);
	}

	@Override
	public String id() {
		return ID;
	}

	@Override
	public AttributeValue[] getValueSymbols() {
		return Value.values();
	}

	@Override
	public AttributeValue[] getAttributeValues() {
		return Value.values();
	}
}


text:
/***************************************************************************

    Atari Toobin' hardware

****************************************************************************/

#include "emu.h"
#include "machine/atarigen.h"
#include "video/atarimo.h"
#include "includes/toobin.h"

/*************************************
 *
 *  Tilemap callbacks
 *
 *************************************/

static TILE_GET_INFO( get_alpha_tile_info )
{
	toobin_state *state = machine.driver_data<toobin_state>();
	UINT16 data = state->m_alpha[tile_index];
	int code = data & 0x3ff;
	int color = (data >> 12) & 0x0f;
	SET_TILE_INFO(2, code, color, (data >> 10) & 1);
}

static TILE_GET_INFO( get_playfield_tile_info )
{
	toobin_state *state = machine.driver_data<toobin_state>();
	UINT16 data1 = state->m_playfield[tile_index * 2];
	UINT16 data2 = state->m_playfield[tile_index * 2 + 1];
	int code = data2 & 0x3fff;
	int color = data1 & 0x0f;
	SET_TILE_INFO(0, code, color, TILE_FLIPYX(data2 >> 14));
	tileinfo->category = (data1 >> 4) & 3;
}

/*************************************
 *
 *  Video system start
 *
 *************************************/

VIDEO_START( toobin )
{
	static const atarimo_desc modesc =
	{
		1,					/* index to which gfx system */
		1,					/* number of motion object banks */
		1,					/* are the entries linked? */
		0,					/* are the entries split? */
		0,					/* render in reverse order? */
		1,					/* render in swapped X/Y order? */
		0,					/* does the neighbor bit affect the next object? */
		1024,				/* pixels per SLIP entry (0 for no-slip) */
		0,					/* pixel offset for SLIPs */
		0,					/* maximum number of links to visit/scanline (0=all) */

		0x100,				/* base palette entry */
		0x100,				/* maximum number of colors */
		0,					/* transparent pen index */

		{{ 0,0,0x00ff,0 }},	/* mask for the link */
		{{ 0 }},			/* mask for the graphics bank */
		{{ 0,0x3fff,0,0 }},	/* mask for the code index */
		{{ 0 }},			/* mask for the upper code index */
		{{ 0,0,0,0x000f }},	/* mask for the color */
		{{ 0,0,0,0xffc0 }},	/* mask for the X position */
		{{ 0x7fc0,0,0,0 }},	/* mask for the Y position */
		{{ 0x0007,0,0,0 }},	/* mask for the width, in tiles*/
		{{ 0x0038,0,0,0 }},	/* mask for the height, in tiles */
		{{ 0,0x4000,0,0 }},	/* mask for the horizontal flip */
		{{ 0,0x8000,0,0 }},	/* mask for the vertical flip */
		{{ 0 }},			/* mask for the priority */
		{{ 0 }},			/* mask for the neighbor */
		{{ 0x8000,0,0,0 }},	/* mask for absolute coordinates */

		{{ 0 }},			/* mask for the special value */
		0,					/* resulting value to indicate "special" */
		0					/* callback routine for special entries */
	};
	toobin_state *state = machine.driver_data<toobin_state>();

	/* initialize the playfield */
	state->m_playfield_tilemap = tilemap_create(machine, get_playfield_tile_info, tilemap_scan_rows,  8,8, 128,64);

	/* initialize the motion objects */
	atarimo_init(machine, 0, &modesc);

	/* initialize the alphanumerics */
	state->m_alpha_tilemap = tilemap_create(machine, get_alpha_tile_info, tilemap_scan_rows,  8,8, 64,48);
	tilemap_set_transparent_pen(state->m_alpha_tilemap, 0);

	/* allocate a playfield bitmap for rendering */
	state->m_pfbitmap = auto_bitmap_alloc(machine, machine.primary_screen->width(), machine.primary_screen->height(), BITMAP_FORMAT_INDEXED16);

	state->save_item(NAME(state->m_brightness));
}

/*************************************
 *
 *  Palette RAM write handler
 *
 *************************************/

WRITE16_HANDLER( toobin_paletteram_w )
{
	toobin_state *state = space->machine().driver_data<toobin_state>();
	int newword;

	COMBINE_DATA(&space->machine().generic.paletteram.u16[offset]);
	newword = space->machine().generic.paletteram.u16[offset];

	{
		int red =   (((newword >> 10) & 31) * 224) >> 5;
		int green = (((newword >>  5) & 31) * 224) >> 5;
		int blue =  (((newword      ) & 31) * 224) >> 5;

		if (red) red += 38;
		if (green) green += 38;
		if (blue) blue += 38;

		palette_set_color(space->machine(), offset & 0x3ff, MAKE_RGB(red, green, blue));
		if (!(newword & 0x8000))
			palette_set_pen_contrast(space->machine(), offset & 0x3ff, state->m_brightness);
		else
			palette_set_pen_contrast(space->machine(), offset & 0x3ff, 1.0);
	}
}

WRITE16_HANDLER( toobin_intensity_w )
{
	toobin_state *state = space->machine().driver_data<toobin_state>();
	int i;

	if (ACCESSING_BITS_0_7)
	{
		state->m_brightness = (double)(~data & 0x1f) / 31.0;

		for (i = 0; i < 0x400; i++)
			if (!(space->machine().generic.paletteram.u16[i] & 0x8000))
				palette_set_pen_contrast(space->machine(), i, state->m_brightness);
	}
}

/*************************************
 *
 *  X/Y scroll handlers
 *
 *************************************/

WRITE16_HANDLER( toobin_xscroll_w )
{
	toobin_state *state = space->machine().driver_data<toobin_state>();
	UINT16 oldscroll = *state->m_xscroll;
	UINT16 newscroll = oldscroll;
	COMBINE_DATA(&newscroll);

	/* if anything has changed, force a partial update */
	if (newscroll != oldscroll)
		space->machine().primary_screen->update_partial(space->machine().primary_screen->vpos());

	/* update the playfield scrolling - hscroll is clocked on the following scanline */
	tilemap_set_scrollx(state->m_playfield_tilemap, 0, newscroll >> 6);
	atarimo_set_xscroll(0, newscroll >> 6);

	/* update the data */
	*state->m_xscroll = newscroll;
}

WRITE16_HANDLER( toobin_yscroll_w )
{
	toobin_state *state = space->machine().driver_data<toobin_state>();
	UINT16 oldscroll = *state->m_yscroll;
	UINT16 newscroll = oldscroll;
	COMBINE_DATA(&newscroll);

	/* if anything has changed, force a partial update */
	if (newscroll != oldscroll)
		space->machine().primary_screen->update_partial(space->machine().primary_screen->vpos());

	/* if bit 4 is zero, the scroll value is clocked in right away */
	tilemap_set_scrolly(state->m_playfield_tilemap, 0, newscroll >> 6);
	atarimo_set_yscroll(0, (newscroll >> 6) & 0x1ff);

	/* update the data */
	*state->m_yscroll = newscroll;
}

/*************************************
 *
 *  X/Y scroll handlers
 *
 *************************************/

WRITE16_HANDLER( toobin_slip_w )
{
	int oldslip = atarimo_0_slipram_r(space, offset, mem_mask);
	int newslip = oldslip;
	COMBINE_DATA(&newslip);

	/* if the SLIP is changing, force a partial update first */
	if (oldslip != newslip)
		space->machine().primary_screen->update_partial(space->machine().primary_screen->vpos());

	/* update the data */
	atarimo_0_slipram_w(space, offset, data, mem_mask);
}

/*************************************
 *
 *  Main refresh
 *
 *************************************/

SCREEN_UPDATE( toobin )
{
	toobin_state *state = screen->machine().driver_data<toobin_state>();
	bitmap_t *priority_bitmap = screen->machine().priority_bitmap;
	const rgb_t *palette = palette_entry_list_adjusted(screen->machine().palette);
	atarimo_rect_list rectlist;
	bitmap_t *mobitmap;
	int x, y;

	/* draw the playfield */
	bitmap_fill(priority_bitmap, cliprect, 0);
	tilemap_draw(state->m_pfbitmap, cliprect, state->m_playfield_tilemap, 0, 0);
	tilemap_draw(state->m_pfbitmap, cliprect, state->m_playfield_tilemap, 1, 1);
	tilemap_draw(state->m_pfbitmap, cliprect, state->m_playfield_tilemap, 2, 2);
	tilemap_draw(state->m_pfbitmap, cliprect, state->m_playfield_tilemap, 3, 3);

	/* draw and merge the MO */
	mobitmap = atarimo_render(0, cliprect, &rectlist);
	for (y = cliprect->min_y; y <= cliprect->max_y; y++)
	{
		UINT32 *dest = BITMAP_ADDR32(bitmap, y, 0);
		UINT16 *mo = BITMAP_ADDR16(mobitmap, y, 0);
		UINT16 *pf = BITMAP_ADDR16(state->m_pfbitmap, y, 0);
		UINT8 *pri = BITMAP_ADDR8(priority_bitmap, y, 0);
		for (x = cliprect->min_x; x <= cliprect->max_x; x++)
		{
			UINT16 pix = pf[x];
			if (mo[x])
			{
				/* not verified: logic is all controlled in a PAL

                   factors: LBPRI1-0, LBPIX3, ANPIX1-0, PFPIX3, PFPRI1-0,
                            (~LBPIX3 & ~LBPIX2 & ~LBPIX1 & ~LBPIX0)
               */

				/* only draw if not high priority PF */
				if (!pri[x] || !(pix & 8))
					pix = mo[x];

				/* erase behind ourselves */
				mo[x] = 0;
			}
			dest[x] = palette[pix];
		}
	}

	/* add the alpha on top */
	tilemap_draw(bitmap, cliprect, state->m_alpha_tilemap, 0, 0);
	return 0;
}