text:
package com.amazonaws.services.ec2.model;

import java.io.Serializable;
import javax.annotation.Generated;

/**
 *

 * Describes the configuration of Spot Instances in an EC2 Fleet request.
 *

 *
 * @see AWS API
 *      Documentation
 */
@Generated("com.amazonaws:aws-java-sdk-code-generator")
public class SpotOptionsRequest implements Serializable, Cloneable {

    /**
     *

     * The strategy that determines how to allocate the target Spot Instance capacity across the Spot Instance pools
     * specified by the EC2 Fleet launch configuration. For more information, see Allocation
     * strategies for Spot Instances in the Amazon EC2 User Guide.
     *

     *

     * lowest-price - EC2 Fleet launches instances from the lowest-price Spot Instance pool that has
     * available capacity. If the cheapest pool doesn't have available capacity, the Spot Instances come from the next
     * cheapest pool that has available capacity. If a pool runs out of capacity before fulfilling your desired
     * capacity, EC2 Fleet will continue to fulfill your request by drawing from the next cheapest pool. To ensure that
     * your desired capacity is met, you might receive Spot Instances from several pools.
     *

     *

     * diversified - EC2 Fleet launches instances from all of the Spot Instance pools that you specify.
     *

     *

     * capacity-optimized (recommended) - EC2 Fleet launches instances from Spot Instance pools with
     * optimal capacity for the number of instances that are launching. To give certain instance types a higher chance
     * of launching first, use capacity-optimized-prioritized. Set a priority for each instance type by
     * using the Priority parameter for LaunchTemplateOverrides. You can assign the same
     * priority to different LaunchTemplateOverrides. EC2 implements the priorities on a best-effort basis,
     * but optimizes for capacity first. capacity-optimized-prioritized is supported only if your fleet
     * uses a launch template. Note that if the On-Demand AllocationStrategy is set to
     * prioritized, the same priority is applied when fulfilling On-Demand capacity.
     *

     *

     * Default: lowest-price
     *

     */
    private String allocationStrategy;
    /**
     *

     * The strategies for managing your Spot Instances that are at an elevated risk of being interrupted.
     *

     */
    private FleetSpotMaintenanceStrategiesRequest maintenanceStrategies;
    /**
     *

     * The behavior when a Spot Instance is interrupted.
     *

     *

     * Default: terminate
     *

     */
    private String instanceInterruptionBehavior;
    /**
     *

     * The number of Spot pools across which to allocate your target Spot capacity. Supported only when Spot
     * AllocationStrategy is set to lowest-price. EC2 Fleet selects the cheapest Spot pools
     * and evenly allocates your target Spot capacity across the number of Spot pools that you specify.
     *

     *

     * Note that EC2 Fleet attempts to draw Spot Instances from the number of pools that you specify on a best effort
     * basis. If a pool runs out of Spot capacity before fulfilling your target capacity, EC2 Fleet will continue to
     * fulfill your request by drawing from the next cheapest pool. To ensure that your target capacity is met, you
     * might receive Spot Instances from more than the number of pools that you specified. Similarly, if most of the
     * pools have no Spot capacity, you might receive your full target capacity from fewer than the number of pools that
     * you specified.
     *

     */
    private Integer instancePoolsToUseCount;
    /**
     *

     * Indicates that the fleet uses a single instance type to launch all Spot Instances in the fleet.
     *

     *

     * Supported only for fleets of type instant.
     *

     */
    private Boolean singleInstanceType;
    /**
     *

     * Indicates that the fleet launches all Spot Instances into a single Availability Zone.
     *

     *

     * Supported only for fleets of type instant.
     *

     */
    private Boolean singleAvailabilityZone;
    /**
     *

     * The minimum target capacity for Spot Instances in the fleet. If the minimum target capacity is not reached, the
     * fleet launches no instances.
     *

     *

     * Supported only for fleets of type instant.
     *

     *

     * At least one of the following must be specified: SingleAvailabilityZone |
     * SingleInstanceType
     *

     */
    private Integer minTargetCapacity;
    /**
     *

     * The maximum amount per hour for Spot Instances that you're willing to pay. We do not recommend using this
     * parameter because it can lead to increased interruptions. If you do not specify this parameter, you will pay the
     * current Spot price.
     *

     * <important>
     *

     * If you specify a maximum price, your Spot Instances will be interrupted more frequently than if you do not
     * specify this parameter.
     *

     * </important>
     */
    private String maxTotalPrice;

    /**
     *

     * The strategy that determines how to allocate the target Spot Instance capacity across the Spot Instance pools
     * specified by the EC2 Fleet launch configuration. For more information, see Allocation
     * strategies for Spot Instances in the Amazon EC2 User Guide.
     *

     *

     * lowest-price - EC2 Fleet launches instances from the lowest-price Spot Instance pool that has
     * available capacity. If the cheapest pool doesn't have available capacity, the Spot Instances come from the next
     * cheapest pool that has available capacity. If a pool runs out of capacity before fulfilling your desired
     * capacity, EC2 Fleet will continue to fulfill your request by drawing from the next cheapest pool. To ensure that
     * your desired capacity is met, you might receive Spot Instances from several pools.
     *

     *

     * diversified - EC2 Fleet launches instances from all of the Spot Instance pools that you specify.
     *

     *

     * capacity-optimized (recommended) - EC2 Fleet launches instances from Spot Instance pools with
     * optimal capacity for the number of instances that are launching. To give certain instance types a higher chance
     * of launching first, use capacity-optimized-prioritized. Set a priority for each instance type by
     * using the Priority parameter for LaunchTemplateOverrides. You can assign the same
     * priority to different LaunchTemplateOverrides. EC2 implements the priorities on a best-effort basis,
     * but optimizes for capacity first. capacity-optimized-prioritized is supported only if your fleet
     * uses a launch template. Note that if the On-Demand AllocationStrategy is set to
     * prioritized, the same priority is applied when fulfilling On-Demand capacity.
     *

     *

     * Default: lowest-price
     *

     *
     * @param allocationStrategy
     *        The strategy that determines how to allocate the target Spot Instance capacity across the Spot Instance
     *        pools specified by the EC2 Fleet launch configuration. For more information, see Allocation
     *        strategies for Spot Instances in the Amazon EC2 User Guide.

     *

     *        lowest-price - EC2 Fleet launches instances from the lowest-price Spot Instance pool that has
     *        available capacity. If the cheapest pool doesn't have available capacity, the Spot Instances come from the
     *        next cheapest pool that has available capacity. If a pool runs out of capacity before fulfilling your
     *        desired capacity, EC2 Fleet will continue to fulfill your request by drawing from the next cheapest pool.
     *        To ensure that your desired capacity is met, you might receive Spot Instances from several pools.
     *

     *

     *        diversified - EC2 Fleet launches instances from all of the Spot Instance pools that you
     *        specify.
     *

     *

     *        capacity-optimized (recommended) - EC2 Fleet launches instances from Spot Instance pools with
     *        optimal capacity for the number of instances that are launching. To give certain instance types a higher
     *        chance of launching first, use capacity-optimized-prioritized. Set a priority for each
     *        instance type by using the Priority parameter for LaunchTemplateOverrides. You
     *        can assign the same priority to different LaunchTemplateOverrides. EC2 implements the
     *        priorities on a best-effort basis, but optimizes for capacity first.
     *        capacity-optimized-prioritized is supported only if your fleet uses a launch template. Note
     *        that if the On-Demand AllocationStrategy is set to prioritized, the same
     *        priority is applied when fulfilling On-Demand capacity.
     *

     *

     *        Default: lowest-price
     * @see SpotAllocationStrategy
     */

    public void setAllocationStrategy(String allocationStrategy) {
        this.allocationStrategy = allocationStrategy;
    }

    /**
     *

     * The strategy that determines how to allocate the target Spot Instance capacity across the Spot Instance pools
     * specified by the EC2 Fleet launch configuration. For more information, see Allocation
     * strategies for Spot Instances in the Amazon EC2 User Guide.
     *

     *

     * lowest-price - EC2 Fleet launches instances from the lowest-price Spot Instance pool that has
     * available capacity. If the cheapest pool doesn't have available capacity, the Spot Instances come from the next
     * cheapest pool that has available capacity. If a pool runs out of capacity before fulfilling your desired
     * capacity, EC2 Fleet will continue to fulfill your request by drawing from the next cheapest pool. To ensure that
     * your desired capacity is met, you might receive Spot Instances from several pools.
     *

     *

     * diversified - EC2 Fleet launches instances from all of the Spot Instance pools that you specify.
     *

     *

     * capacity-optimized (recommended) - EC2 Fleet launches instances from Spot Instance pools with
     * optimal capacity for the number of instances that are launching. To give certain instance types a higher chance
     * of launching first, use capacity-optimized-prioritized. Set a priority for each instance type by
     * using the Priority parameter for LaunchTemplateOverrides. You can assign the same
     * priority to different LaunchTemplateOverrides. EC2 implements the priorities on a best-effort basis,
     * but optimizes for capacity first. capacity-optimized-prioritized is supported only if your fleet
     * uses a launch template. Note that if the On-Demand AllocationStrategy is set to
     * prioritized, the same priority is applied when fulfilling On-Demand capacity.
     *

     *

     * Default: lowest-price
     *

     *
     * @return The strategy that determines how to allocate the target Spot Instance capacity across the Spot Instance
     *         pools specified by the EC2 Fleet launch configuration. For more information, see Allocation
     *         strategies for Spot Instances in the Amazon EC2 User Guide.

     *

     *         lowest-price - EC2 Fleet launches instances from the lowest-price Spot Instance pool that
     *         has available capacity. If the cheapest pool doesn't have available capacity, the Spot Instances come
     *         from the next cheapest pool that has available capacity. If a pool runs out of capacity before fulfilling
     *         your desired capacity, EC2 Fleet will continue to fulfill your request by drawing from the next cheapest
     *         pool. To ensure that your desired capacity is met, you might receive Spot Instances from several pools.
     *

     *

     *         diversified - EC2 Fleet launches instances from all of the Spot Instance pools that you
     *         specify.
     *

     *

     *         capacity-optimized (recommended) - EC2 Fleet launches instances from Spot Instance pools
     *         with optimal capacity for the number of instances that are launching. To give certain instance types a
     *         higher chance of launching first, use capacity-optimized-prioritized. Set a priority for
     *         each instance type by using the Priority parameter for LaunchTemplateOverrides.
     *         You can assign the same priority to different LaunchTemplateOverrides. EC2 implements the
     *         priorities on a best-effort basis, but optimizes for capacity first.
     *         capacity-optimized-prioritized is supported only if your fleet uses a launch template. Note
     *         that if the On-Demand AllocationStrategy is set to prioritized, the same
     *         priority is applied when fulfilling On-Demand capacity.
     *

     *

     *         Default: lowest-price
     * @see SpotAllocationStrategy
     */

    public String getAllocationStrategy() {
        return this.allocationStrategy;
    }

    /**
     *

     * The strategy that determines how to allocate the target Spot Instance capacity across the Spot Instance pools
     * specified by the EC2 Fleet launch configuration. For more information, see Allocation
     * strategies for Spot Instances in the Amazon EC2 User Guide.
     *

     *

     * lowest-price - EC2 Fleet launches instances from the lowest-price Spot Instance pool that has
     * available capacity. If the cheapest pool doesn't have available capacity, the Spot Instances come from the next
     * cheapest pool that has available capacity. If a pool runs out of capacity before fulfilling your desired
     * capacity, EC2 Fleet will continue to fulfill your request by drawing from the next cheapest pool. To ensure that
     * your desired capacity is met, you might receive Spot Instances from several pools.
     *

     *

     * diversified - EC2 Fleet launches instances from all of the Spot Instance pools that you specify.
     *

     *

     * capacity-optimized (recommended) - EC2 Fleet launches instances from Spot Instance pools with
     * optimal capacity for the number of instances that are launching. To give certain instance types a higher chance
     * of launching first, use capacity-optimized-prioritized. Set a priority for each instance type by
     * using the Priority parameter for LaunchTemplateOverrides. You can assign the same
     * priority to different LaunchTemplateOverrides. EC2 implements the priorities on a best-effort basis,
     * but optimizes for capacity first. capacity-optimized-prioritized is supported only if your fleet
     * uses a launch template. Note that if the On-Demand AllocationStrategy is set to
     * prioritized, the same priority is applied when fulfilling On-Demand capacity.
     *

     *

     * Default: lowest-price
     *

     *
     * @param allocationStrategy
     *        The strategy that determines how to allocate the target Spot Instance capacity across the Spot Instance
     *        pools specified by the EC2 Fleet launch configuration. For more information, see Allocation
     *        strategies for Spot Instances in the Amazon EC2 User Guide.

     *

     *        lowest-price - EC2 Fleet launches instances from the lowest-price Spot Instance pool that has
     *        available capacity. If the cheapest pool doesn't have available capacity, the Spot Instances come from the
     *        next cheapest pool that has available capacity. If a pool runs out of capacity before fulfilling your
     *        desired capacity, EC2 Fleet will continue to fulfill your request by drawing from the next cheapest pool.
     *        To ensure that your desired capacity is met, you might receive Spot Instances from several pools.
     *

     *

     *        diversified - EC2 Fleet launches instances from all of the Spot Instance pools that you
     *        specify.
     *

     *

     *        capacity-optimized (recommended) - EC2 Fleet launches instances from Spot Instance pools with
     *        optimal capacity for the number of instances that are launching. To give certain instance types a higher
     *        chance of launching first, use capacity-optimized-prioritized. Set a priority for each
     *        instance type by using the Priority parameter for LaunchTemplateOverrides. You
     *        can assign the same priority to different LaunchTemplateOverrides. EC2 implements the
     *        priorities on a best-effort basis, but optimizes for capacity first.
     *        capacity-optimized-prioritized is supported only if your fleet uses a launch template. Note
     *        that if the On-Demand AllocationStrategy is set to prioritized, the same
     *        priority is applied when fulfilling On-Demand capacity.
     *

     *

     *        Default: lowest-price
     * @return Returns a reference to this object so that method calls can be chained together.
     * @see SpotAllocationStrategy
     */

    public SpotOptionsRequest withAllocationStrategy(String allocationStrategy) {
        setAllocationStrategy(allocationStrategy);
        return this;
    }

    /**
     *

     * The strategy that determines how to allocate the target Spot Instance capacity across the Spot Instance pools
     * specified by the EC2 Fleet launch configuration. For more information, see Allocation
     * strategies for Spot Instances in the Amazon EC2 User Guide.
     *

     *

     * lowest-price - EC2 Fleet launches instances from the lowest-price Spot Instance pool that has
     * available capacity. If the cheapest pool doesn't have available capacity, the Spot Instances come from the next
     * cheapest pool that has available capacity. If a pool runs out of capacity before fulfilling your desired
     * capacity, EC2 Fleet will continue to fulfill your request by drawing from the next cheapest pool. To ensure that
     * your desired capacity is met, you might receive Spot Instances from several pools.
     *

     *

     * diversified - EC2 Fleet launches instances from all of the Spot Instance pools that you specify.
     *

     *

     * capacity-optimized (recommended) - EC2 Fleet launches instances from Spot Instance pools with
     * optimal capacity for the number of instances that are launching. To give certain instance types a higher chance
     * of launching first, use capacity-optimized-prioritized. Set a priority for each instance type by
     * using the Priority parameter for LaunchTemplateOverrides. You can assign the same
     * priority to different LaunchTemplateOverrides. EC2 implements the priorities on a best-effort basis,
     * but optimizes for capacity first. capacity-optimized-prioritized is supported only if your fleet
     * uses a launch template. Note that if the On-Demand AllocationStrategy is set to
     * prioritized, the same priority is applied when fulfilling On-Demand capacity.
     *

     *

     * Default: lowest-price
     *

     *
     * @param allocationStrategy
     *        The strategy that determines how to allocate the target Spot Instance capacity across the Spot Instance
     *        pools specified by the EC2 Fleet launch configuration. For more information, see Allocation
     *        strategies for Spot Instances in the Amazon EC2 User Guide.

     *

     *        lowest-price - EC2 Fleet launches instances from the lowest-price Spot Instance pool that has
     *        available capacity. If the cheapest pool doesn't have available capacity, the Spot Instances come from the
     *        next cheapest pool that has available capacity. If a pool runs out of capacity before fulfilling your
     *        desired capacity, EC2 Fleet will continue to fulfill your request by drawing from the next cheapest pool.
     *        To ensure that your desired capacity is met, you might receive Spot Instances from several pools.
     *

     *

     *        diversified - EC2 Fleet launches instances from all of the Spot Instance pools that you
     *        specify.
     *

     *

     *        capacity-optimized (recommended) - EC2 Fleet launches instances from Spot Instance pools with
     *        optimal capacity for the number of instances that are launching. To give certain instance types a higher
     *        chance of launching first, use capacity-optimized-prioritized. Set a priority for each
     *        instance type by using the Priority parameter for LaunchTemplateOverrides. You
     *        can assign the same priority to different LaunchTemplateOverrides. EC2 implements the
     *        priorities on a best-effort basis, but optimizes for capacity first.
     *        capacity-optimized-prioritized is supported only if your fleet uses a launch template. Note
     *        that if the On-Demand AllocationStrategy is set to prioritized, the same
     *        priority is applied when fulfilling On-Demand capacity.
     *

     *

     *        Default: lowest-price
     * @return Returns a reference to this object so that method calls can be chained together.
     * @see SpotAllocationStrategy
     */

    public SpotOptionsRequest withAllocationStrategy(SpotAllocationStrategy allocationStrategy) {
        this.allocationStrategy = allocationStrategy.toString();
        return this;
    }

    /**
     *

     * The strategies for managing your Spot Instances that are at an elevated risk of being interrupted.
     *

     *
     * @param maintenanceStrategies
     *        The strategies for managing your Spot Instances that are at an elevated risk of being interrupted.
     */

    public void setMaintenanceStrategies(FleetSpotMaintenanceStrategiesRequest maintenanceStrategies) {
        this.maintenanceStrategies = maintenanceStrategies;
    }

    /**
     *

     * The strategies for managing your Spot Instances that are at an elevated risk of being interrupted.
     *

     *
     * @return The strategies for managing your Spot Instances that are at an elevated risk of being interrupted.
     */

    public FleetSpotMaintenanceStrategiesRequest getMaintenanceStrategies() {
        return this.maintenanceStrategies;
    }

    /**
     *

     * The strategies for managing your Spot Instances that are at an elevated risk of being interrupted.
     *

     *
     * @param maintenanceStrategies
     *        The strategies for managing your Spot Instances that are at an elevated risk of being interrupted.
     * @return Returns a reference to this object so that method calls can be chained together.
     */

    public SpotOptionsRequest withMaintenanceStrategies(FleetSpotMaintenanceStrategiesRequest maintenanceStrategies) {
        setMaintenanceStrategies(maintenanceStrategies);
        return this;
    }

    /**
     *

     * The behavior when a Spot Instance is interrupted.
     *

     *

     * Default: terminate
     *

     *
     * @param instanceInterruptionBehavior
     *        The behavior when a Spot Instance is interrupted.

     *

     *        Default: terminate
     * @see SpotInstanceInterruptionBehavior
     */

    public void setInstanceInterruptionBehavior(String instanceInterruptionBehavior) {
        this.instanceInterruptionBehavior = instanceInterruptionBehavior;
    }

    /**
     *

     * The behavior when a Spot Instance is interrupted.
     *

     *

     * Default: terminate
     *

     *
     * @return The behavior when a Spot Instance is interrupted.

     *

     *         Default: terminate
     * @see SpotInstanceInterruptionBehavior
     */

    public String getInstanceInterruptionBehavior() {
        return this.instanceInterruptionBehavior;
    }

    /**
     *

     * The behavior when a Spot Instance is interrupted.
     *

     *

     * Default: terminate
     *

     *
     * @param instanceInterruptionBehavior
     *        The behavior when a Spot Instance is interrupted.

     *

     *        Default: terminate
     * @return Returns a reference to this object so that method calls can be chained together.
     * @see SpotInstanceInterruptionBehavior
     */

    public SpotOptionsRequest withInstanceInterruptionBehavior(String instanceInterruptionBehavior) {
        setInstanceInterruptionBehavior(instanceInterruptionBehavior);
        return this;
    }

    /**
     *

     * The behavior when a Spot Instance is interrupted.
     *

     *

     * Default: terminate
     *

     *
     * @param instanceInterruptionBehavior
     *        The behavior when a Spot Instance is interrupted.

     *

     *        Default: terminate
     * @return Returns a reference to this object so that method calls can be chained together.
     * @see SpotInstanceInterruptionBehavior
     */

    public SpotOptionsRequest withInstanceInterruptionBehavior(SpotInstanceInterruptionBehavior instanceInterruptionBehavior) {
        this.instanceInterruptionBehavior = instanceInterruptionBehavior.toString();
        return this;
    }

    /**
     *

     * The number of Spot pools across which to allocate your target Spot capacity. Supported only when Spot
     * AllocationStrategy is set to lowest-price. EC2 Fleet selects the cheapest Spot pools
     * and evenly allocates your target Spot capacity across the number of Spot pools that you specify.
     *

     *

     * Note that EC2 Fleet attempts to draw Spot Instances from the number of pools that you specify on a best effort
     * basis. If a pool runs out of Spot capacity before fulfilling your target capacity, EC2 Fleet will continue to
     * fulfill your request by drawing from the next cheapest pool. To ensure that your target capacity is met, you
     * might receive Spot Instances from more than the number of pools that you specified. Similarly, if most of the
     * pools have no Spot capacity, you might receive your full target capacity from fewer than the number of pools that
     * you specified.
     *

     *
     * @param instancePoolsToUseCount
     *        The number of Spot pools across which to allocate your target Spot capacity. Supported only when Spot
     *        AllocationStrategy is set to lowest-price. EC2 Fleet selects the cheapest Spot
     *        pools and evenly allocates your target Spot capacity across the number of Spot pools that you specify.

     *

     *        Note that EC2 Fleet attempts to draw Spot Instances from the number of pools that you specify on a best
     *        effort basis. If a pool runs out of Spot capacity before fulfilling your target capacity, EC2 Fleet will
     *        continue to fulfill your request by drawing from the next cheapest pool. To ensure that your target
     *        capacity is met, you might receive Spot Instances from more than the number of pools that you specified.
     *        Similarly, if most of the pools have no Spot capacity, you might receive your full target capacity from
     *        fewer than the number of pools that you specified.
     */

    public void setInstancePoolsToUseCount(Integer instancePoolsToUseCount) {
        this.instancePoolsToUseCount = instancePoolsToUseCount;
    }

    /**
     *

     * The number of Spot pools across which to allocate your target Spot capacity. Supported only when Spot
     * AllocationStrategy is set to lowest-price. EC2 Fleet selects the cheapest Spot pools
     * and evenly allocates your target Spot capacity across the number of Spot pools that you specify.
     *

     *

     * Note that EC2 Fleet attempts to draw Spot Instances from the number of pools that you specify on a best effort
     * basis. If a pool runs out of Spot capacity before fulfilling your target capacity, EC2 Fleet will continue to
     * fulfill your request by drawing from the next cheapest pool. To ensure that your target capacity is met, you
     * might receive Spot Instances from more than the number of pools that you specified. Similarly, if most of the
     * pools have no Spot capacity, you might receive your full target capacity from fewer than the number of pools that
     * you specified.
     *

     *
     * @return The number of Spot pools across which to allocate your target Spot capacity. Supported only when Spot
     *         AllocationStrategy is set to lowest-price. EC2 Fleet selects the cheapest Spot
     *         pools and evenly allocates your target Spot capacity across the number of Spot pools that you
     *         specify.

     *

     *         Note that EC2 Fleet attempts to draw Spot Instances from the number of pools that you specify on a best
     *         effort basis. If a pool runs out of Spot capacity before fulfilling your target capacity, EC2 Fleet will
     *         continue to fulfill your request by drawing from the next cheapest pool. To ensure that your target
     *         capacity is met, you might receive Spot Instances from more than the number of pools that you specified.
     *         Similarly, if most of the pools have no Spot capacity, you might receive your full target capacity from
     *         fewer than the number of pools that you specified.
     */

    public Integer getInstancePoolsToUseCount() {
        return this.instancePoolsToUseCount;
    }

    /**
     *

     * The number of Spot pools across which to allocate your target Spot capacity. Supported only when Spot
     * AllocationStrategy is set to lowest-price. EC2 Fleet selects the cheapest Spot pools
     * and evenly allocates your target Spot capacity across the number of Spot pools that you specify.
     *

     *

     * Note that EC2 Fleet attempts to draw Spot Instances from the number of pools that you specify on a best effort
     * basis. If a pool runs out of Spot capacity before fulfilling your target capacity, EC2 Fleet will continue to
     * fulfill your request by drawing from the next cheapest pool. To ensure that your target capacity is met, you
     * might receive Spot Instances from more than the number of pools that you specified. Similarly, if most of the
     * pools have no Spot capacity, you might receive your full target capacity from fewer than the number of pools that
     * you specified.
     *

     *
     * @param instancePoolsToUseCount
     *        The number of Spot pools across which to allocate your target Spot capacity. Supported only when Spot
     *        AllocationStrategy is set to lowest-price. EC2 Fleet selects the cheapest Spot
     *        pools and evenly allocates your target Spot capacity across the number of Spot pools that you specify.

     *

     *        Note that EC2 Fleet attempts to draw Spot Instances from the number of pools that you specify on a best
     *        effort basis. If a pool runs out of Spot capacity before fulfilling your target capacity, EC2 Fleet will
     *        continue to fulfill your request by drawing from the next cheapest pool. To ensure that your target
     *        capacity is met, you might receive Spot Instances from more than the number of pools that you specified.
     *        Similarly, if most of the pools have no Spot capacity, you might receive your full target capacity from
     *        fewer than the number of pools that you specified.
     * @return Returns a reference to this object so that method calls can be chained together.
     */

    public SpotOptionsRequest withInstancePoolsToUseCount(Integer instancePoolsToUseCount) {
        setInstancePoolsToUseCount(instancePoolsToUseCount);
        return this;
    }

    /**
     *

     * Indicates that the fleet uses a single instance type to launch all Spot Instances in the fleet.
     *

     *

     * Supported only for fleets of type instant.
     *

     *
     * @param singleInstanceType
     *        Indicates that the fleet uses a single instance type to launch all Spot Instances in the fleet.

     *

     *        Supported only for fleets of type instant.
     */

    public void setSingleInstanceType(Boolean singleInstanceType) {
        this.singleInstanceType = singleInstanceType;
    }

    /**
     *

     * Indicates that the fleet uses a single instance type to launch all Spot Instances in the fleet.
     *

     *

     * Supported only for fleets of type instant.
     *

     *
     * @return Indicates that the fleet uses a single instance type to launch all Spot Instances in the fleet.

     *

     *         Supported only for fleets of type instant.
     */

    public Boolean getSingleInstanceType() {
        return this.singleInstanceType;
    }

    /**
     *

     * Indicates that the fleet uses a single instance type to launch all Spot Instances in the fleet.
     *

     *

     * Supported only for fleets of type instant.
     *

     *
     * @param singleInstanceType
     *        Indicates that the fleet uses a single instance type to launch all Spot Instances in the fleet.

     *

     *        Supported only for fleets of type instant.
     * @return Returns a reference to this object so that method calls can be chained together.
     */

    public SpotOptionsRequest withSingleInstanceType(Boolean singleInstanceType) {
        setSingleInstanceType(singleInstanceType);
        return this;
    }

    /**
     *

     * Indicates that the fleet uses a single instance type to launch all Spot Instances in the fleet.
     *

     *

     * Supported only for fleets of type instant.
     *

     *
     * @return Indicates that the fleet uses a single instance type to launch all Spot Instances in the fleet.

     *

     *         Supported only for fleets of type instant.
     */

    public Boolean isSingleInstanceType() {
        return this.singleInstanceType;
    }

    /**
     *

     * Indicates that the fleet launches all Spot Instances into a single Availability Zone.
     *

     *

     * Supported only for fleets of type instant.
     *

     *
     * @param singleAvailabilityZone
     *        Indicates that the fleet launches all Spot Instances into a single Availability Zone.

     *

     *        Supported only for fleets of type instant.
     */

    public void setSingleAvailabilityZone(Boolean singleAvailabilityZone) {
        this.singleAvailabilityZone = singleAvailabilityZone;
    }

    /**
     *

     * Indicates that the fleet launches all Spot Instances into a single Availability Zone.
     *

     *

     * Supported only for fleets of type instant.
     *

     *
     * @return Indicates that the fleet launches all Spot Instances into a single Availability Zone.

     *

     *         Supported only for fleets of type instant.
     */

    public Boolean getSingleAvailabilityZone() {
        return this.singleAvailabilityZone;
    }

    /**
     *

     * Indicates that the fleet launches all Spot Instances into a single Availability Zone.
     *

     *

     * Supported only for fleets of type instant.
     *

     *
     * @param singleAvailabilityZone
     *        Indicates that the fleet launches all Spot Instances into a single Availability Zone.

     *

     *        Supported only for fleets of type instant.
     * @return Returns a reference to this object so that method calls can be chained together.
     */

    public SpotOptionsRequest withSingleAvailabilityZone(Boolean singleAvailabilityZone) {
        setSingleAvailabilityZone(singleAvailabilityZone);
        return this;
    }

    /**
     *

     * Indicates that the fleet launches all Spot Instances into a single Availability Zone.
     *

     *

     * Supported only for fleets of type instant.
     *

     *
     * @return Indicates that the fleet launches all Spot Instances into a single Availability Zone.

     *

     *         Supported only for fleets of type instant.
     */

    public Boolean isSingleAvailabilityZone() {
        return this.singleAvailabilityZone;
    }

    /**
     *

     * The minimum target capacity for Spot Instances in the fleet. If the minimum target capacity is not reached, the
     * fleet launches no instances.
     *

     *

     * Supported only for fleets of type instant.
     *

     *

     * At least one of the following must be specified: SingleAvailabilityZone |
     * SingleInstanceType
     *

     *
     * @param minTargetCapacity
     *        The minimum target capacity for Spot Instances in the fleet. If the minimum target capacity is not
     *        reached, the fleet launches no instances.

     *

     *        Supported only for fleets of type instant.
     *

     *

     *        At least one of the following must be specified: SingleAvailabilityZone |
     *        SingleInstanceType
     */

    public void setMinTargetCapacity(Integer minTargetCapacity) {
        this.minTargetCapacity = minTargetCapacity;
    }

    /**
     *

     * The minimum target capacity for Spot Instances in the fleet. If the minimum target capacity is not reached, the
     * fleet launches no instances.
     *

     *

     * Supported only for fleets of type instant.
     *

     *

     * At least one of the following must be specified: SingleAvailabilityZone |
     * SingleInstanceType
     *

     *
     * @return The minimum target capacity for Spot Instances in the fleet. If the minimum target capacity is not
     *         reached, the fleet launches no instances.

     *

     *         Supported only for fleets of type instant.
     *

     *

     *         At least one of the following must be specified: SingleAvailabilityZone |
     *         SingleInstanceType
     */

    public Integer getMinTargetCapacity() {
        return this.minTargetCapacity;
    }

    /**
     *

     * The minimum target capacity for Spot Instances in the fleet. If the minimum target capacity is not reached, the
     * fleet launches no instances.
     *

     *

     * Supported only for fleets of type instant.
     *

     *

     * At least one of the following must be specified: SingleAvailabilityZone |
     * SingleInstanceType
     *

     *
     * @param minTargetCapacity
     *        The minimum target capacity for Spot Instances in the fleet. If the minimum target capacity is not
     *        reached, the fleet launches no instances.

     *

     *        Supported only for fleets of type instant.
     *

     *

     *        At least one of the following must be specified: SingleAvailabilityZone |
     *        SingleInstanceType
     * @return Returns a reference to this object so that method calls can be chained together.
     */

    public SpotOptionsRequest withMinTargetCapacity(Integer minTargetCapacity) {
        setMinTargetCapacity(minTargetCapacity);
        return this;
    }

    /**
     *

     * The maximum amount per hour for Spot Instances that you're willing to pay. We do not recommend using this
     * parameter because it can lead to increased interruptions. If you do not specify this parameter, you will pay the
     * current Spot price.
     *

     * <important>
     *

     * If you specify a maximum price, your Spot Instances will be interrupted more frequently than if you do not
     * specify this parameter.
     *

     * </important>
     *
     * @param maxTotalPrice
     *        The maximum amount per hour for Spot Instances that you're willing to pay. We do not recommend using this
     *        parameter because it can lead to increased interruptions. If you do not specify this parameter, you will
     *        pay the current Spot price.
 <important>
     *

     *        If you specify a maximum price, your Spot Instances will be interrupted more frequently than if you do not
     *        specify this parameter.
     *

     */

    public void setMaxTotalPrice(String maxTotalPrice) {
        this.maxTotalPrice = maxTotalPrice;
    }

    /**
     *

     * The maximum amount per hour for Spot Instances that you're willing to pay. We do not recommend using this
     * parameter because it can lead to increased interruptions. If you do not specify this parameter, you will pay the
     * current Spot price.
     *

     * <important>
     *

     * If you specify a maximum price, your Spot Instances will be interrupted more frequently than if you do not
     * specify this parameter.
     *

     * </important>
     *
     * @return The maximum amount per hour for Spot Instances that you're willing to pay. We do not recommend using this
     *         parameter because it can lead to increased interruptions. If you do not specify this parameter, you will
     *         pay the current Spot price.
 <important>
     *

     *         If you specify a maximum price, your Spot Instances will be interrupted more frequently than if you do
     *         not specify this parameter.
     *

     */

    public String getMaxTotalPrice() {
        return this.maxTotalPrice;
    }

    /**
     *

     * The maximum amount per hour for Spot Instances that you're willing to pay. We do not recommend using this
     * parameter because it can lead to increased interruptions. If you do not specify this parameter, you will pay the
     * current Spot price.
     *

     * <important>
     *

     * If you specify a maximum price, your Spot Instances will be interrupted more frequently than if you do not
     * specify this parameter.
     *

     * </important>
     *
     * @param maxTotalPrice
     *        The maximum amount per hour for Spot Instances that you're willing to pay. We do not recommend using this
     *        parameter because it can lead to increased interruptions. If you do not specify this parameter, you will
     *        pay the current Spot price.
 <important>
     *

     *        If you specify a maximum price, your Spot Instances will be interrupted more frequently than if you do not
     *        specify this parameter.
     *

     * @return Returns a reference to this object so that method calls can be chained together.
     */

    public SpotOptionsRequest withMaxTotalPrice(String maxTotalPrice) {
        setMaxTotalPrice(maxTotalPrice);
        return this;
    }

    /**
     * Returns a string representation of this object. This is useful for testing and debugging. Sensitive data will be
     * redacted from this string using a placeholder value.
     *
     * @return A string representation of this object.
     *
     * @see java.lang.Object#toString()
     */
    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append("{");
        if (getAllocationStrategy() != null)
            sb.append("AllocationStrategy: ").append(getAllocationStrategy()).append(",");
        if (getMaintenanceStrategies() != null)
            sb.append("MaintenanceStrategies: ").append(getMaintenanceStrategies()).append(",");
        if (getInstanceInterruptionBehavior() != null)
            sb.append("InstanceInterruptionBehavior: ").append(getInstanceInterruptionBehavior()).append(",");
        if (getInstancePoolsToUseCount() != null)
            sb.append("InstancePoolsToUseCount: ").append(getInstancePoolsToUseCount()).append(",");
        if (getSingleInstanceType() != null)
            sb.append("SingleInstanceType: ").append(getSingleInstanceType()).append(",");
        if (getSingleAvailabilityZone() != null)
            sb.append("SingleAvailabilityZone: ").append(getSingleAvailabilityZone()).append(",");
        if (getMinTargetCapacity() != null)
            sb.append("MinTargetCapacity: ").append(getMinTargetCapacity()).append(",");
        if (getMaxTotalPrice() != null)
            sb.append("MaxTotalPrice: ").append(getMaxTotalPrice());
        sb.append("}");
        return sb.toString();
    }

    @Override
    public boolean equals(Object obj) {
        if (this == obj)
            return true;
        if (obj == null)
            return false;

        if (obj instanceof SpotOptionsRequest == false)
            return false;
        SpotOptionsRequest other = (SpotOptionsRequest) obj;
        if (other.getAllocationStrategy() == null ^ this.getAllocationStrategy() == null)
            return false;
        if (other.getAllocationStrategy() != null && other.getAllocationStrategy().equals(this.getAllocationStrategy()) == false)
            return false;
        if (other.getMaintenanceStrategies() == null ^ this.getMaintenanceStrategies() == null)
            return false;
        if (other.getMaintenanceStrategies() != null && other.getMaintenanceStrategies().equals(this.getMaintenanceStrategies()) == false)
            return false;
        if (other.getInstanceInterruptionBehavior() == null ^ this.getInstanceInterruptionBehavior() == null)
            return false;
        if (other.getInstanceInterruptionBehavior() != null && other.getInstanceInterruptionBehavior().equals(this.getInstanceInterruptionBehavior()) == false)
            return false;
        if (other.getInstancePoolsToUseCount() == null ^ this.getInstancePoolsToUseCount() == null)
            return false;
        if (other.getInstancePoolsToUseCount() != null && other.getInstancePoolsToUseCount().equals(this.getInstancePoolsToUseCount()) == false)
            return false;
        if (other.getSingleInstanceType() == null ^ this.getSingleInstanceType() == null)
            return false;
        if (other.getSingleInstanceType() != null && other.getSingleInstanceType().equals(this.getSingleInstanceType()) == false)
            return false;
        if (other.getSingleAvailabilityZone() == null ^ this.getSingleAvailabilityZone() == null)
            return false;
        if (other.getSingleAvailabilityZone() != null && other.getSingleAvailabilityZone().equals(this.getSingleAvailabilityZone()) == false)
            return false;
        if (other.getMinTargetCapacity() == null ^ this.getMinTargetCapacity() == null)
            return false;
        if (other.getMinTargetCapacity() != null && other.getMinTargetCapacity().equals(this.getMinTargetCapacity()) == false)
            return false;
        if (other.getMaxTotalPrice() == null ^ this.getMaxTotalPrice() == null)
            return false;
        if (other.getMaxTotalPrice() != null && other.getMaxTotalPrice().equals(this.getMaxTotalPrice()) == false)
            return false;
        return true;
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int hashCode = 1;

        hashCode = prime * hashCode + ((getAllocationStrategy() == null) ? 0 : getAllocationStrategy().hashCode());
        hashCode = prime * hashCode + ((getMaintenanceStrategies() == null) ? 0 : getMaintenanceStrategies().hashCode());
        hashCode = prime * hashCode + ((getInstanceInterruptionBehavior() == null) ? 0 : getInstanceInterruptionBehavior().hashCode());
        hashCode = prime * hashCode + ((getInstancePoolsToUseCount() == null) ? 0 : getInstancePoolsToUseCount().hashCode());
        hashCode = prime * hashCode + ((getSingleInstanceType() == null) ? 0 : getSingleInstanceType().hashCode());
        hashCode = prime * hashCode + ((getSingleAvailabilityZone() == null) ? 0 : getSingleAvailabilityZone().hashCode());
        hashCode = prime * hashCode + ((getMinTargetCapacity() == null) ? 0 : getMinTargetCapacity().hashCode());
        hashCode = prime * hashCode + ((getMaxTotalPrice() == null) ? 0 : getMaxTotalPrice().hashCode());
        return hashCode;
    }

    @Override
    public SpotOptionsRequest clone() {
        try {
            return (SpotOptionsRequest) super.clone();
        } catch (CloneNotSupportedException e) {
            throw new IllegalStateException("Got a CloneNotSupportedException from Object.clone() " + "even though we're Cloneable!", e);
        }
    }

}

redpajama_set_name: RedPajamaGithub


When she got to use the bathroom 15 minutes later, Kunicki says she collapsed and couldn't move her left leg.
The embarrassed paramedic at first refused to call emergency services, as she originally mistook her own symptoms for inbreeding and did not because her colleagues to see here "tipsy."
Strokes are more common among the elderly, with the chance of stroke.
The risk of death from stroke is higher in African Americans as they also have higher risks of complications like high blood pressure and diabetes.
Women are also more likely to die of stroke, possibly due to factors such as birth control and pregnancy complications.
Strokes are more likely to be people who have already suffered a stroke or a heart attack.
Southeastern states are also called the "stroke belt" states, as are more common in this are a.
Speech difficulties are a major symptom of someone who has or is having a stroke.
An ambulance rushed Kunicki to the University College London Hospital where physicians confirmed she suffered from stroke and would need emergency surgery, according to the Daily Mail.
The patient was transferred to the National Hospital of Neurology and Neurosurgery, where, during a three-hour surgery, doctors discovered and fixed her burst artery.
"When the consultant told me I'd have a stroke, I was in shock, "Kunicki said. "The doctors told me later that just stretching my neck caused my vertebral artery to rupture. It was just spontaneous and there was one in a million chance of it happening."
Kunicki's left side was initially rendered completely paralyzed by the stroke. Through physical therapy, she says she has been able to use some of her leg, arm and hand, although she describes her movements as "clumsy."
She hopes that by speaking out about her condition, her story will spread awareness "I have been called out to so many people having strokes and they are always in their 70s or 80s," Kunicki said. "I have never been to a young person having a stroke."
"People need to know that you're young something this simple can cause a stroke," she added.
To donate to Kunicki's recovery fund , click here.


text:
package ui

import (
	"bytes"
	"fmt"
	"log"
	"sort"
	"strings"
	"time"

	"github.com/lhz/sidpicker/csdb"
	"github.com/lhz/sidpicker/hvsc"
	"github.com/lhz/sidpicker/player"
	"github.com/lhz/sidpicker/util"
	"github.com/nsf/termbox-go"
)

const (
	MODE_BROWSE = iota
	MODE_SEARCH
)

var w, h int
var list *List
var mode int
var debugInfo string
var searchTerm []rune
var searchCursorPos int
var quit = false

func Setup(initialSearch string) {
	err := termbox.Init()
	if err != nil {
		log.Panicln(err)
	}

	w, h = termbox.Size()

	if len(initialSearch) > 0 {
		searchTerm = []rune(initialSearch)
		hvsc.Filter(string(searchTerm))
	}

	list = NewList(h - 2)

	termbox.SetInputMode(termbox.InputEsc | termbox.InputMouse)
	draw()
}

func Run() {
	defer termbox.Close()

	mode = MODE_BROWSE

	tickChan := time.NewTicker(1 * time.Second).C

	eventChan := make(chan termbox.Event)
	go func() {
		for {
			eventChan <- termbox.PollEvent()
		}
	}()

	for !quit {
		// debugInfo = ""
		select {
		case ev := <-eventChan:
			switch ev.Type {
			case termbox.EventKey:
				keyEvent(ev)
				draw()
			case termbox.EventMouse:
				mouseEvent(ev)
				draw()
			case termbox.EventResize:
				resizeEvent(ev)
				draw()
			case termbox.EventError:
				panic(ev.Err)
			}
		case <-tickChan:
			if player.Playing {
				draw()
			}
		}
	}
}

func resizeEvent(ev termbox.Event) {
	w, h = ev.Width, ev.Height
	draw()
}

func keyEvent(ev termbox.Event) {
	if mode == MODE_SEARCH {
		keyEventSearch(ev)
		return
	}
	switch ev.Key {
	case termbox.KeyCtrlC, termbox.KeyEsc:
		if player.Playing {
			player.Stop()
		} else {
			quit = true
		}
	case termbox.KeyPgup:
		list.PrevPage()
	case termbox.KeyPgdn:
		list.NextPage()
	case termbox.KeyArrowUp:
		list.PrevTune()
	case termbox.KeyArrowDown:
		list.NextTune()
	case termbox.KeyArrowLeft:
		player.PrevSong()
	case termbox.KeyArrowRight:
		player.NextSong()
	case termbox.KeyEnter:
		playSelected()
	case termbox.KeySpace:
		list.NextTune()
		playSelected()
	case termbox.KeyDelete:
		player.Stop()
	case 0:
		if n := strings.IndexRune("0123456789", ev.Ch); n > 0 {
			if player.Playing && n <= player.CurrentTune.Header.Songs {
				player.PlaySub(n)
			}
			return
		}
		if ev.Ch == '/' {
			mode = MODE_SEARCH
			return
		}
		if ev.Ch == 'r' {
			list.RandomTune()
			playSelected()
		}
	default:
		debugInfo = string(ev.Key)
	}
}

func keyEventSearch(ev termbox.Event) {
	switch ev.Key {
	case termbox.KeyCtrlC, termbox.KeyEsc:
		mode = MODE_BROWSE
	case termbox.KeyArrowLeft:
		if searchCursorPos > 0 {
			searchCursorPos--
		}
	case termbox.KeyArrowRight:
		if searchCursorPos < len(searchTerm) {
			searchCursorPos++
		}
	case termbox.KeyEnter:
		if hvsc.Filter(string(searchTerm)) {
			list = NewList(h - 2)
			mode = MODE_BROWSE
		}
	case termbox.KeySpace:
		searchInsert(rune(' '))
	case 0:
		searchInsert(ev.Ch)
	case 0x7F:
		if searchCursorPos > 0 {
			searchTerm = append(searchTerm[0:searchCursorPos-1], searchTerm[searchCursorPos:len(searchTerm)]...)
			searchCursorPos--
		}
	default:
		debugInfo = string(ev.Key)
	}
}

func mouseEvent(ev termbox.Event) {
	switch ev.Key {
	case termbox.MouseLeft:
		x := ev.MouseX
		y := ev.MouseY
		if x < 38 && y > 0 && y < h-1 {
			if list.TuneAtPos(y - 1) {
				playSelected()
			}
		}
	case termbox.MouseWheelUp:
		list.PrevPage()
	case termbox.MouseWheelDown:
		list.NextPage()
	}
}

func searchInsert(ch rune) {
	searchTerm = append(searchTerm, rune(' '))
	copy(searchTerm[searchCursorPos+1:], searchTerm[searchCursorPos:])
	searchTerm[searchCursorPos] = ch
	searchCursorPos++
}

func playSelected() {
	player.Play(list.CurrentItem().TuneIndex, -1)
	sort.Sort(csdb.ByDate(player.CurrentTune.Releases))
}

func draw() {
	termbox.Clear(termbox.ColorDefault, termbox.ColorDefault)
	drawHeader()
	drawList()
	drawTuneInfo()
	drawReleases()
	drawFooter()
	termbox.Flush()
}

func drawHeader() {
	var header string
	bg := termbox.ColorBlack
	switch mode {
	case MODE_BROWSE:
		header = fmt.Sprintf("Search: %s", string(searchTerm))
		termbox.HideCursor()
	case MODE_SEARCH:
		header = fmt.Sprintf("Search: %s", string(searchTerm))
		bg = termbox.ColorMagenta
		termbox.SetCursor(8+searchCursorPos, 0)
	}
	header = fmt.Sprintf(fmt.Sprintf("%%s%%%ds", w-len([]rune(header))), header, "")
	writeAt(0, 0, header, termbox.ColorWhite|termbox.AttrBold, bg)
}

func drawFooter() {
	footer := fmt.Sprintf("%d/%d  %s", list.CurrentItem().TuneIndex+1, hvsc.NumFilteredTunes, debugInfo)
	footer = fmt.Sprintf(fmt.Sprintf("%%s%%%ds", w-len([]rune(footer))), footer, "")
	writeAt(0, h-1, footer, termbox.ColorWhite, termbox.ColorBlack)

	right := fmt.Sprintf("HVSC #%d", hvsc.Release)
	writeAt(w-len([]rune(right)), h-1, right, termbox.ColorWhite, termbox.ColorBlack)
}

func drawTuneInfo() {
	if !player.Playing {
		return
	}
	tune := player.CurrentTune
	ox := 42
	oy := 2
	fg := termbox.ColorDefault
	bg := termbox.ColorDefault

	writeAt(ox, oy+0, fmt.Sprintf("Title:    %s", tune.Title()), fg, bg)
	writeAt(ox, oy+1, fmt.Sprintf("Author:   %s", tune.Header.Author), fg, bg)
	writeAt(ox, oy+2, fmt.Sprintf("Released: %s", tune.Header.Released), fg, bg)

	writeAt(ox, oy+4, fmt.Sprintf("Tune: %d/%d  Length: %s  Time: %s",
		player.CurrentSong, tune.Header.Songs, player.SongLength(), player.Elapsed()), fg, bg)

	if len(tune.Info) == 0 {
		return
	}

	writeAt(ox, oy+6, "STIL Information:", termbox.ColorYellow|termbox.AttrBold, termbox.ColorBlack)

	for i, line := range tune.Info {
		if oy+8+i > h-2 {
			break
		}
		writeAt(ox, oy+8+i, line, fg, bg)
	}
}

func drawReleases() {
	if !player.Playing {
		return
	}
	tune := player.CurrentTune
	if len(tune.Releases) == 0 {
		return
	}

	ox := 42
	oy := 8
	mx := 0
	if len(tune.Info) > 0 {
		oy = oy + 3 + len(tune.Info)
	}

	//fg := termbox.ColorDefault
	bg := termbox.ColorDefault

	line := fmt.Sprintf("Used in %d CSDb %s:", len(tune.Releases), util.Pluralize("release", len(tune.Releases)))
	writeAt(ox, oy, line, termbox.ColorYellow|termbox.AttrBold, termbox.ColorBlack)

	oy += 2
	y := oy

	for _, r := range tune.Releases {

		credits := make([]string, 0)
		if r.Date != "" {
			credits = append(credits, r.Date)
		}
		if len(r.Groups) > 0 {
			credits = append(credits, strings.Join(r.Groups, ", "))
		}

		bylines := lineSplit(strings.Join(credits, " by "), 36)
		if y+len(bylines)+1 > h-2 {
			ox += mx + 3
			y = oy
			mx = 0
		}

		writeAt(ox, y, r.Name, termbox.ColorWhite, bg)
		if len(r.Name) > mx {
			mx = len(r.Name)
		}

		for j, byline := range bylines {
			writeAt(ox, y+j+1, byline, termbox.ColorMagenta, bg)
			if len(byline) > mx {
				mx = len(byline)
			}
		}

		url := r.URL()
		writeAt(ox, y+len(bylines)+1, url, termbox.ColorBlue, bg)
		if len(url) > mx {
			mx = len(url)
		}

		y += 3 + len(bylines)
	}
}

func drawList() {
	for i, item := range list.CurrentPage() {
		fg := termbox.ColorDefault
		bg := termbox.ColorDefault
		if i == list.PagePos {
			fg = termbox.ColorWhite
			bg = termbox.ColorBlue
		}
		if item.Type == ITEM_TUNE {
			tune := hvsc.FilteredTunes[item.TuneIndex]
			if player.CurrentTune != nil && player.CurrentTune.Index == tune.Index {
				fg |= termbox.AttrBold
			}
			writeAt(0, 1+i, fmt.Sprintf(" %-32s %4s", tune.ListName(), tune.Year()), fg, bg)
		} else {
			folder := []rune(item.Name[1:])
			if len(folder) > 40 {
				folder = folder[len(folder)-40 : len(folder)]
				folder[0] = '…'
			}
			writeAt(0, 1+i, string(folder), fg|termbox.AttrBold, bg)
		}
	}
}

func writeAt(x, y int, value string, fg, bg termbox.Attribute) {
	i := 0
	for _, c := range value {
		termbox.SetCell(x+i, y, c, fg, bg)
		i++
	}
}

func lineSplit(s string, w int) []string {
	words := strings.Fields(s)
	lines := make([]string, 0)
	line := bytes.Buffer{}
	for _, word := range words {
		if line.Len() > 0 && line.Len()+len(word) > w {
			lines = append(lines, line.String())
			line = bytes.Buffer{}
		}
		if line.Len() > 0 {
			line.WriteRune(' ')
		}
		line.WriteString(word)
	}
	lines = append(lines, line.String())
	return lines
}


text:
5 Dead In Russian Church Shooting
By Gabrielle Ware
And five more people are injured, according to Russian media.
Five people died Sunday in a church shooting in the southern Russian republic of Dagestan.
Russia's interior ministry said five others were injured in the attack by a gunman who "opened fire on people celebrating" the start of Russian Orthodox Lent.
Police reportedly killed the shooter. Two officers are said to be among the injured. The Interfax News Agency says the shooter was a local man in his 20s.

redpajama_set_name: RedPajamaCommonCrawl


text:
Art Can Hurt
Kill a Dragon
Posted on January 1, 2004 December 30, 2012
"Patrai keeps talking about how he could kill anybody anytime and he's such a bad dude. Ok, fine, but the worst thing he does in the whole movie is have his henchmen dump some rice out of a bag."
One thing you can always say about Jack Palance is that he works. Which I'm sure is great for him, but it's not always so great for the audience. For every Shane or Batman there's a Cocaine Cowboys, a Cyborg 2, or this month's selection, Kill a Dragon, which is nasty enough to make you wish Jack was more of a Type B personality.
Kill a Dragon has very little killing and no dragons; in their place is a ridiculous psychedelic theme song and a plot that never quite gets going. There's a tiny island off the coast of Hong Kong where a bunch of poor people live, and one day a transport boat washes up on their shores, chock full of nitroglycerin. (Somehow the volatile nitro survives a shipwreck, yet later on in the movie people just look at it and it blows up.) The islanders are thrilled; now they can become black market chemical smugglers and reap millions in profits!
Not so, says Patrai (Fernando Lamas). That's my nitro, he says, and I want it back. Patrai believes he runs Hong Kong and everything else (despite zero proof of his power or influence), and he gives the villagers three days to give back the nitro… or else.
The brave island leader Win Lim (Kam Tong), heads for Hong Kong and he stumbles onto the houseboat of Rick Masters (Palance), who's just about to get it on. He offers Rick a third of the profits if he'll hire a crew to smuggle the nitro off the island (never mind that Patrai will probably torch their island once he finds out what they've done.) Rick springs into action, hiring a doughy tour guide and two guys who fix boxing matches as his trusty assistants.
What follows is an example of what happens when a screenwriter has three or four different possible directions for a film and picks all of them. Rick's idea to sneak the nitro onto his boat and steal away to Hong Kong at night. But wait, his actual idea is to use the wrecked boat to smuggle the nitro! No, that's not it either, they're going to use the original boat, but fake somebody's death to somehow confuse Patrai. Wait, they have to get into a shootout with Patrai's men, featuring the tour guide dressed as a woman! And then, as if we weren't bewildering enough, Rick makes friends with Patrai, offers to join forces with him, then sells him out to the villagers.
I guess I could've lived with a movie that goes in ten different directions at the same time, if not for the last subplot. Look, Patrai keeps talking about how he could kill anybody anytime and he's such a bad dude. Ok, fine. Then he shouldn't spend all his time being really nice and helpful! Seriously, the worst thing Patrai does in the whole movie is have his henchmen dump some rice out of a bag. But he's constantly offering Rick drinks, smokes, money, more time to think, and on and on. At the end of the movie, when Rick outwits Patrai and smuggles the nitro to Hong Kong, Patrai bakes him a birthday cake. I'm not kidding. There's no bomb in it a la Diamonds Are Forever, there's no poison in it, it's "you stole a half million bucks worth of my property… but I like you." Have you ever heard of a murderous kingpin who's an honorable loser?
Kill a Dragon strikes me as the kind of movie somebody thought would make a few bucks for a week's worth of work. Besides Patrai's disturbingly friendly brand of evil, the only weirdness in the pic is Rick's disgusting sex metaphors, most of which revolve around "lighting the candle." This is a tough movie to find; if you catch it on cable, great, but it's not quite good enough to make it worth tracking down.
"Psychedelic landscapes will be forming…" – theme song
"Thanks, little tiger… for showing your claws." Rick, to his girlfriend
"Rick Masters! Old guy out here to see him!" Bartender
"I come to you as a last resort!" – Win Lim to Rick
"You know, I must be an idiot." – Rick
"How did you know we were here?" Win Lim
"Chinese Fortune Cookie" – Rick
"Look, limey, you swish your way and I'll swish mine!" -Vigo
"Take all the time you need… six hours" – Patrai
Fernando Lamas
Jack Palance


text:
UK security and counter-terrorism
This article is more than 6 months old
Man jailed for 15 years for driverless car bomb plot
Farhad Salah convicted of planning attack in UK using remote controlled vehicle
Wed 24 Jul 2019 07.10 EDT Last modified on Wed 24 Jul 2019 14.40 EDT
Farhad Salah, 24, was described by counter-terrorism police as posing a very real risk to public safety. Photograph: Counter-terrorism policing north-east/PA
A man who plotted a terrorist attack involving the use of a bomb inside a remotely controlled vehicle has been jailed for 15 years.
Counter-terrorism police described Farhad Salah as posing a very real risk to public safety, with prosecutors saying he had hoped to harm others he considered to be infidels.
During the five-week retrial at Sheffield crown court, jurors heard how the 24-year-old, described as being a supporter of Islamic State, had been in the early stages of testing small improvised explosive devices when he was arrested.
Anne Whyte QC, prosecuting, told jurors: "The intention was to manufacture a device which would be placed in a vehicle but controlled remotely so that no one had to martyr themselves in the process.
"Farhad Salah had decided that improvised explosive devices could be made and used in a way here in the UK that spared his own life preferably but harmed others he considered to be infidels."
She said a week before the defendant was detained, he had messaged a Facebook contact to say: "My only attempt is to find a way to carry out a martyrdom operation with cars without driver, everything is perfect only the programme is left …"
Whyte said Salah was getting "increasingly desperate to do something" for Isis but had been unable to travel to the Middle East because of his unsettled immigration status. His application for asylum in the UK was unresolved at the time of his arrest in December 2017.
This month, jurors found Salah guilty of preparing to commit acts of terrorism, and on Wednesday the judge, Paul Watson QC, sentenced him to 18 years, comprising a 15-year jail term with an extended three-year period on licence.
Sheffield council asked police for names of anti-felling campaigners
Register of meeting between police and protesters requested to help with potential future court action
North of England floods: trapped shoppers allowed to leave mall
Meadowhall in Sheffield says those who wish to stay can, due to 'extreme conditions' outside
Published: 7 Nov 2019
Sheffield strip club keeps licence despite opposition by feminist coalition
Spearmint Rhino dancers label covert filming, showing 74 breaches, 'revenge porn tactics'
Sheffield Hallam MP Jared O'Mara arrested on suspicion of fraud
Chief of staff also arrested after police reportedly raided MP's constituency office
Shots fired at home of Labour councillor in Sheffield
'Richard Hawley gets it!' Park Hill residents praise Sheffield musical
Sheffield flypast pays tribute to US airmen killed in wartime crash
'In the 80s it had life and energy': readers react to Sheffield's struggling high street
Published: 6 Feb 2019


Around and around you go!
Around and around and around we go! Step into Camp Snoopy and take a spin on the Tilt-A-Whirl. It may be located in an area dedicated to kids, but don't underestimate the amount of fun this ride can dish out. Since 1999, when it opened, it has been a full-sized fun machine bringing families and friends closer than ever. Expect to be slid very close to each other, because this spin is relentless. This fan favorite is an amusement park classic and gives smiles to everyone, no matter your age. Grab your family or friends and sit three or four across as your freely-spinning car whirls around the gradual hills of the platform. Up down and round, what could be more fun? Will your car spin fast or slow? No one knows! Every ride on the Tilt-A-Whirl offers a different thrill, which is why our park goers are always coming back for more!
Height Requirement: 46" tall to ride alone OR be accompanied by a supervising companion. Guests less than 6 years old must be accompanied by a supervising companion. Hand held infants are not permitted.
This is a circular ride where cars pivot by centrifugal force created by the ride's rotating table.
Maximum Weight – 800 lb. per car.
A shared lap bar secures all riders in the row across the thighs and pelvis.
Guests must demonstrate appropriate observed behavior or ride with a supervising companion.
Guests with a cervical collar, neck brace, broken collar bone, or braced arm cast are not permitted to ride.
Alternate access is mainstreamed via the ride entrance. Riders will have to take several steps, on their own or with the assistance of a companion, and be capable of stepping up and over the side of the ride unit.


text:
Sportsnet prepping studio upgrade, relocating NHL coverage to Rogers Campus in Toronto
By Dak Dillon
Sportsnet plans to debut a new NHL-focused studio in time for the 2021-22 season, which is scheduled to begin in October.
The new broadcast facility relocates Sportsnet's NHL coverage from the Canadian Broadcasting Centre, where it had utilized Studio 41 and 42 since 2014, to the Rogers Campus.
Initial renderings show the studio located adjacent to the lobby at 333 Bloor St.
The new studio includes two primary sets with a wide array of LED technology, including moving video walls, and even virtual set extensions. The facility updates also include new control rooms and the latest in IP production.
"Sportsnet continues to invest in all of our sports properties and platforms through enhanced technology that will bring the most immersive experience to fans and provide advertisers with an ideal environment to build their brands," said Bart Yabsley, president of Sportsnet. "The studio will be versatile, interactive, and future-forward, and is designed in a way that is flexible and adaptable to the changing media landscape.
Previously, Sportsnet had additional studios in the building housing the Hyatt Regency hotel on King St. including a streetside studio.
The move of NHL coverage to the campus brings the network's production operations into one facility.
Canada, nhl, rogers, Rogers Media, rogers sportsnet, sportsnet, toronto
Broadcast Facility Design, Broadcast Industry News, Featured, International Set Design, Set Design, Sports Broadcasting & Production


While we don't have a sample video for explaining your services we can still create you one! These cartoon animated videos are designed to keep your visitors on your website helping increase your rankings on all major search engines and increase your sales.
Who Are Explainer Videos For?
Just about any small business that owns a website. Here are just a few ideas on what industry use Explain It Videos.


text:
Q: posting to facebook using VBA I have a large excel file with links and posts that I manually post to a facebook page I run
I've been learning more VBA recently and wanted to try to use it to automate things.
I've researched lots of web scraping videos etc and can't find a solution
I basically want VBA to open my page and post a line of text including a link. I've found how to click the search text box and type in but not the post box as this is not an input box when I inspect the element via chrome after typing in "test"  it shows:
 test
tried using the get elements by id and the class name and changing the value but when I inspect the elements there's no "value there" so the object won't allow it
Sub posttofb()

Dim ie As Object
Set ie = CreateObject("internetexplorer.application")
ie.navigate "www.facebook.com/kimberskitchenfitness"
ie.Visible = True

Do While ie.ReadyState <> READYSTATE_COMPLETE
Loop

ie.Document.getElementsByClassName("_5rp7").Data -Text = "test!"

End Sub

I want it to click in the box. I'm going to create a dim string to change the "test" to whatever is on the excel cell i want to post

redpajama_set_name: RedPajamaStackExchange


text:
Henry Bobbitt Aiken
Dyer, Gibson, Tennessee, United States
The Life of Henry Bobbitt
Henry Bobbitt Aiken was born on 23 April 1895, in Dyer, Gibson, Tennessee, United States as the son of Robert LaFayette Aikin and Ada Allen Alline Bobbitt. He married Gladys Chesebro on 19 March 1919, in Madison, Tennessee, United States. He lived in Knoxville, Knox, Tennessee, United States for about 10 years and Civil District 12, Knox, Tennessee, United States in 1940. He died on 22 August 1990, in Tennessee, United States, at the age of 95, and was buried in Lynnhurst Cemetery, Knox, Tennessee, United States.
Learn about Henry Bobbitt's homeland.
Put your face in a costume from Henry Bobbitt's homelands.
Gladys Chesebro
Marriage: 19 March 1919
Madison, Tennessee, United States
Robert LaFayette Aikin
Ada Allen Alline Bobbitt
Harry Reed Aiken
1896 · Plessy vs. Ferguson
A landmark decision of the U.S. Supreme Court upholding the constitutionality of racial segregation laws for public facilities if the segregated facilities were equal in quality. It's widely regarded as one of the worst decisions in U.S. Supreme Court history.
1898 · War with the Spanish
After the explosion of the USS Maine in the Havana Harbor in Cuba, the United States engaged the Spanish in war. The war was fought on two fronts, one in Cuba, which helped gain their independence, and in the Philippines, which helped the US gain another territory for a time.
The Prohibition Era. Sale and manufacture of alcoholic liquors outlawed. A mushrooming of illegal drinking joints, home-produced alcohol and gangsterism.
Bobbitt
Variant, associated chiefly with northern Ireland, of the Scottish surname Aitken .
Aikens
Aikin
Henry Aiken, "United States Census, 1920"
Henry B Aikin, "United States Census, 1930"
Henry B Aiken, "United States Census, 1940"


text:
April 2020 Vol. 12 Issue 4
A Wild and Precious Conference
A recap of the 9th annual OncANP conference
By Jacob Schor, ND, FABNO
More than 200 naturopathic doctors attended the 9th annual conference of the Oncology Association of Naturopathic Physicians (OncANP) in Scottsdale, Arizona, held February 28–March 1, 2020. OncANP is the largest naturopathic specialty group in North America, and indeed, the conference was attended by naturopathic doctors and naturopathic students from all the training programs in the United States and Canada.
OncANP is the largest specialty group of naturopathic physicians, yet it isn't the oldest. The Homeopathic Academy of Naturopathic Physicians (HANP), founded in 1982 (3 years before the American Association of Naturopathic Physicians [AANP]), gets that honor. HANP was the first group to offer testing and certification to naturopathic physicians and to grant board certification in their specialty.
OncANP was founded in 2004 and offered its first board certification in 2006.
As usual the conference organizers squeezed in as many continuing-education (CE) hours as possible. They relented only to allow the vendors, who sponsored meals, to present short lectures related to their business endeavors. While these might not have counted for CE, they were also interesting presentations.
Lise Alschuler, ND, FABNO, past president of both the AANP and OncANP, opened the conference by reciting from the poet Mary Oliver:
"Tell me, what is it you plan to do with your one wild and precious life?"
Dr Alschuler framed Oliver's exuberant question into a parallel question of what we planned to do at "this OncANP conference" and then answered her question for us:
"It is because you are a visionary hero. Visionary heroes willingly sacrifice the ease sticking to routine and the comfort of ignorance so that you may follow an ideal, serve a mission, and, quite simply, change the world."
She turned a long weekend of CE hours into a heroic quest for knowledge, a mission to serve humanity.
"You know that you have chosen to be here because you want to reignite your enthusiasm and augment your wisdom in your healing work. This is one way that you are transforming the world into a better place. You are actually part of a movement that seeks to restore health to the world one patient at a time. You are, simply by virtue of the work that you do, a Visionary Hero."
I can't remember ever having a conference start off with such enthusiasm and feeling such a deep moral obligation to focus my attention when speakers got boring.
Following this explosive start, Gurdev Parmar, ND, FABNO, and Tina Kaczor, ND, FABNO, teamed up to present the first lecture, titled: "Always & Never: The Essential Rules in Oncology Practice." Having recently completed writing the Textbook of Naturopathic Oncology, these 2 doctors reviewed some of the particulars that practitioners should not forget about when working with cancer patients. These ranged from what not to say to the patients' treating medical oncologists to some of the complications—both common and rare—that may occur in these patients.
You are actually part of a movement that seeks to restore health to the world one patient at a time. You are, simply by virtue of the work that you do, a Visionary Hero.
Both Jen Green, ND, FABNO, and Michael Traub, ND, DHANP, FABNO, spoke about Immunotherapy in 2 distinctly separate lectures. Dr Green focused on naturopathic elements that increase immune activity, while Dr Traub focused on adjunctive strategies to use with the new immunotherapy-targeted drugs.
Sharon Gurm, BSc, ND, FABNO, of Vancouver, British Columbia, lectured on the use of photodynamic therapy and then presented several case histories with excellent results. Later in the conference the vendor that manufactures the laser equipment that Dr. Gurm uses presented additional cases, all guaranteed to impress.
The highlight of the conference for this writer was Michelle Holmes, PhD, from the Harvard T.H. Chan School of Public Health at Harvard Medical School. Dr Holmes is perhaps best known for her research on aspirin and recurrence risk in breast cancer. She was an early advocate for repurposing drugs to treat cancer, and her famous paper "Hiding in Plain View" was a game changer for some of us. Dr Holmes is one of many researchers OncANP has brought to conferences over the years—noted scientists whose work informs what we do and whom many of us have longed to meet in person.
Ehab Mohammed, ND, presented a detailed case history of a single patient with hepatocellular cancer who responded well to a regimen of mistletoe and intravenous vitamin C.
Our longtime friend Donald Abrams, MD, a medical oncologist from San Francisco, provided a deep dive into the dietary recommendations put out by the American Institute for Cancer Research (AICR), examining how these recommendations have changed in recent years based on ongoing research.
Dr Alschuler got behind the podium again after Dr Abrams had finished and reminded the attendees that she is more than poetic; she presented a detailed review of naturopathic strategies to consider in patients with glioblastoma.
Dan Rubin, ND, FABNO, followed Dr Alschuler and led a panel of medical oncologists in a discussion of how they interact with naturopathic doctors in their practices and how we might make those intersections work more smoothly.
Paul Saunders, PhD, ND, DAHNP, gave a lunch lecture on behalf of one of the vendors, recapping his experience in using a combination herbal product derived from a trio of botanicals from the Middle East.
Dr Saunders was followed by Jean Seely, MD, a medical radiologist (and sister of Dugald Seely, ND, MSc). She lectured on the current data on the benefit of mammograms for breast-cancer screening.
Ian Bier, ND, PhD, LAc, FABNO, presented next on the evidence supporting early palliative and hospice care, along with giving his yearly reminder that when reading the literature, we should not assume progression-free survival predicts overall survival, as it does not.
I followed Dr Bier and spoke about how a profession that once took pride in the name "Drugless Practitioner" might incorporate repurposed drugs into clinical practice.
Sunday started with Kalyan Gaddam, ND, speaking about naturopathic physical medicine, followed by Eric Marsden, ND, reviewing clinical algorithms in supportive care. Dr Melina Roberts's lecture focused on treating the tumor microenvironment.
Paul Reilly, ND, LAc, FABNO, reminisced for a bit at the start of his lecture, showing us slides from lectures he's given over the past 30 years as a way to illustrate how much naturopathic oncology has changed these last decades. Eventually he moved into this year's topic, which was how to incorporate the new information coming from the field of "precision medicine" into our clinical practices.
For the 9th time, the conference finished with a 90-minute research review, conducted by Drs Alschuler and Kaczor, of new studies relevant to the practice of naturopathic oncology. That we always save the very best for last is tradition now, as annoying as it is to have to race to the airport the moment that the final speakers finish, to catch one's flight home. Smarter people might stay one more night in the hotel.
Dr Alschuler promised at the start of this conference that:
"… you will learn, you will connect, you will inspire and be inspired, you will renew. And these feelings will pump vitality into your life, into your work, into your dreams, into your plans. … The hero that you are to your patients, to your family, to your friends, to your colleagues, and to yourselves will be both more wild and more precious."
She was right; once again OncANP's conference delivered the goods.
Addendum: Proofreading the draft of this article a few days after writing it—the day after the World Health Organization declared a coronavirus pandemic and when travel and public gatherings are being sharply curtailed—I find myself thinking again about this conference. By the time we post this article online, conferences like this may have become a thing of the past, at least for the near future. In hindsight this may have been our last and best conference.
Jacob Schor, ND, FABNO, is a graduate of National University of Naturopathic Medicine, Portland, Oregon, and recently retired from his practice in Denver, Colorado. He served as president to the Colorado Association of Naturopathic Physicians and is a past member of the board of directors of the Oncology Association of Naturopathic Physicians and American Association of Naturopathic Physicians. He is recognized as a fellow by the American Board of Naturopathic Oncology. He serves on the editorial board for the International Journal of Naturopathic Medicine, Naturopathic Doctor News and Review (NDNR), and Integrative Medicine: A Clinician's Journal. In 2008, he was awarded the Vis Award by the American Association of Naturopathic Physicians. His writing appears regularly in NDNR, the Townsend Letter, and Natural Medicine Journal, where he is the past Abstracts & Commentary editor.
Sign Up For Our FREE Monthly E-Journal
Special Thanks to Our Key Sponsors
2019 Oncology Association of Naturopathic Physicians Conference Highlights
Recent OncANP Conference Delivers Exceptional Content
The OncANP's Vital Role in Naturopathic Practice
© 2021 Natural Medicine Journal (ISSN 2157-6769) | Terms & Conditions | Privacy Policy | Contact Us


The month for the brightest festival has arrived. In all the festivities we celebrate; Diwali has a way of lighting up everyone's heart with fun, laughter, sparkles and mirth. It's time to gear up and make your home festival ready. We have a few ideas for you that can absolutely dazzle your Diwali home décor.
Cleaning is an important part of Diwali decoration as Lakshmi, the goddess of prosperity brings her blessings to houses that are clean and comfortable. So clean every corner of your home and make it completely clutter free. Clean your old and dusty furniture, remove spider webs from every corner of your home, clean the ceilings, electrical fittings such as air conditioners, wall lights, ceiling fans, floors etc. to get a complete clean look.
Have a colorful large Rangoli in the doorway of your house and make it brighter and more beautiful by placing earthen Diyas around them.
Place candles and diyas on your exterior walls.
If you have a garden, hang candle holders or lanterns in your garden and give an illusion of hanging lights.
Adore your living room with a large earthen or glass pot filled with water, floral petals and floating candles.
Hang candle lights at different heights to add the ethnicity to your rooms.
Use garlands to decorate the doors of your rooms.
Change curtains and cushion covers with bright color materials.
Give a spiritual look with photos of gods and goddesses in your rooms.
Diwali is a festival of lights; brighten your home with lights and joy. Give your best in decorating your home and fill the ecstasy of happiness into every one who visits your home.
Different types of Wardrobes Designs !!


text:
Revista da Sociedade Brasileira de Medicina Tropical
versão impressa ISSN 0037-8682versão On-line ISSN 1678-9849
Rev. Soc. Bras. Med. Trop. vol.52 Uberaba 2019 Epub 16-Maio-2019
http://dx.doi.org/10.1590/0037-8682-0461-2018
Human pulmonary dirofilariasis with secondary myocarditis
Andréa Beltrami Doltrário1
Natalí Caneli Valim1
Ellen Aparecida Pereira Barboza Dellaspora1
Gilberto Gambero Gaspar1
Fernanda Guioti Puga1
Alexandre Todorovic Fabro2
Mariângela Ottoboni Brunaldi2
Roberto Martinez1
1Departamento de Clínica Médica, Hospital das Clínicas da Faculdade de Medicina de Ribeirão Preto, Universidade de São Paulo, Ribeirão Preto, SP, Brasil.
2Departamento de Patologia e Medicina Legal, Hospital das Clínicas, Faculdade de Medicina de Ribeirão Preto, Universidade de São Paulo, Ribeirão Preto, SP, Brasil.
Dirofilariasis is a little-known zoonosis, with dogs and cats as definitive hosts. It is caused by nematodes and transmitted by mosquito bites. We report the case of a 67-year-old man with a consumptive syndrome with two subpleural pulmonary opacities. A transthoracic lung biopsy revealed a Dirofilaria worm. Myocardial nuclear magnetic resonance (NMR) demonstrated dilated cardiomyopathy after myocarditis related to dirofilariasis. Human infection is rare and occurs accidentally. The most common radiological alteration is a mainly subpleural coin lesion. Dirofilariasis is a neglected emergent disease and knowledge about it is important for differential diagnoses from neoplastic pulmonary nodules.
Keywords: Dirofilariasis; Zoonosis; Pulmonary nodule
Dirofilariasis is an infection caused by nematodes of the genus Dirofilaria1. It is a zoonotic disease affecting dogs and cats (definitive hosts) which commonly causes heart and lung disease in these animals but species like D. immitis, D. repens and D. tenuis can also be found infecting humans1,4.
This heartworm disease is more prevalent in the southern US and along the Mediterranean coast of Europe where winters are milder, facilitating the reproduction of mosquitoes2.
In the Piedmont region of Italy, while domestic dogs did not receive chemoprophylaxis between 1966 and 1967, they were subjected to analysis in 1991-1992 which showed a fourfold increase in infection by Dirofilaria immitis and a three-fold increase in the extension of the endemic area1.
The first case of human heartworm infection in the United States was reported in 1941 in the city of New Orleans. The first human pulmonary case, which recovered after thoracotomy, was reported in the same country in 19613. In a 1982 US review of 60 human cases, the median age was 52 years for males and, 49 years for females, prevalent at a ratio of two men to one woman. Forty-one percent of cases were symptomatic with at least one of these symptoms: fever, cough, hemoptysis, malaise, or chest discomfort4.
Human infection is rare but can show a high potential occurrence in the presence of increased zoonoses. Thus, we present here a brief report of a case with Dirofilaria infection as the final diagnosis in order to show the clinical presentation of the patient, the diagnostic challenge and his clinical course, including myocarditis as the secondary manifestation.
A 67-year-old man was admitted to the University Hospital of the Ribeirão Preto Medical School, São Paulo University, due to a consumptive syndrome associated with respiratory symptoms. The patient was a former banker, now retired and living for 8 years near the city of São Miguel do Araguaia-GO, Brazil (13.2735º S, 50.1638ºW) on a boat on the Araguaia River, having contact with riverine populations. After noticing a decline of his general condition in the preceding months, he sought medical attention and was diagnosed with heart failure. He started taking medications including corticosteroids because of worsening arthralgia due to gouty arthritis. At admission, he reported persistent intermittent coughing starting 3 months prior, associated with hemoptysis and undetermined involuntary weight loss, but had no fever or night sweats. He reported cardiopathy of unknown etiology as well as gouty arthritis, and had been taking 20 mg/day of prednisone for 1 year. However, he had discontinued prednisone for 14 days before admission and therefore manifested with presumed adrenal insufficiency: nausea, vomiting, abdominal pain and postural hypotension.
Upon examination, the patient was slightly dehydrated, his pulse was 90 beats per minute and arterial pressure was 90 mmHg x 60 mmHg. A vesicular murmur was present and was diminished in the left pulmonary base, without adventitious noise, and his respiratory rate was 18 breaths per minute. Gouty tophi were present in the proximal interphalangeal dorsal region of the feet and halux, with no evidence of arthritis.
A complete investigation into the respiratory and consumptive syndromes was initiated for differential diagnosis, including lung cancer, tuberculosis and fungal infection as main diagnostic hypotheses.
High resolution computed tomography (HRCT) revealed two subpleural pulmonary opacities (Figure 1), suggesting an inflammatory or infectious process and mediastinal lymph nodes smaller than 1.0 cm, some in atypical sites, leading to a differential diagnosis between granulomatous disease (fungus) and neoplasia (lymphoproliferative or metastatic dissemination).
FIGURE 1: (A) and B) Admission computed tomography (CT) images. Subpleural pulmonary consolidations in segment IIIE (3,9 x 3,7 cm) and segment IXE (2,3-5,2 cm); (C) and (D) Control CT after four months of the diagnosis and treatment with single dose of ivermectin, showing residual images of consolidations. The arrows in each frame point to the consolidations described.
Three negative sputum smear microscopies and a negative rapid sputum molecular test (TB-TRM) eliminated the possibility of pulmonary tuberculosis. Counterimmunoelectrophoresis for paracoccidioidomycosis, aspergillosis, and histoplasmosis antibodies was negative and ruled out fungal lung infection. Serology for HIV, hepatitis B and C, and syphilis was negative and biochemical tests demonstrated discrete renal injury without association with other changes, as shown in Table 1.
TABLE 1: Biochemical, hematological, serological and tuberculosis tests at patient admission.
Urea (mg/dL) 67 TB-TRM * (sputum sample) Negative
Creatinine (mg/dL) 2.10 Smear Microscopy (sputum sample) 3 negative samples
Sodium (mmol/L) 134.9 Mycobacteria culture (sputum sample) 3 negative samples after 42 days
Potassium (mmol/L) 3.90 Fungi CIE**
Complete blood count Paracoccidioidomycosis Negative
Hemoglobin (g/dL) 12.7 Histoplasmosis Negative
Hematocrit (%) 41 Cryptococcosis Negative
White blood cells (nº/ µL) 8.900 Aspergillosis Negative
Neutrophils (nº/ µL) 6.300 Elisa Anti -HIV Negative
Eosinophils (nº/ µL) 100 Elisa for Chagas Disease Negative
Lymphocytes (nº/ µL) 1.800 NA NA
Platelets (nº/ µL) 387.000 NA NA
Uric acid (mg/dL) 7,1 NA NA
*TB-TRM: GeneXpert test for Tuberculosis diagnoses. **counterimmunoelectrophoresis: fungi serology. NA: No Application.
A transthoracic lung biopsy guided by computed tomography was performed for a diagnostic definition. The morphological findings were a granulomatous nodule surrounded by a palisade of epithelioid histiocytes. In addition, fibroplasia with extensive central coagulative necrosis containing degenerate Dirofilaria worms with a parasite cuticle was observed (Figure 2).
FIGURE 2: Morphological findings of patient's transthoracic lung biopsy. The black arrow indicates a degenerate rounded worm having an external eosinophilic uniform cuticle, diameter = 200 - 300 µm, surrounded by coagulative necrosis. (H&E stain, x 40).
A Doppler echocardiogram supported the previous diagnosis of heart failure with an ejection fraction of 26%. Myocardial magnetic resonance imaging showed a dilated cardiomyopathy with septal mesocardial fibrosis and small foci on the lateral wall, possibly as a consequence of myocarditis. Myocardial ischemia was excluded by performing myocardial scintigraphy.
The clinical management of the patient involved optimization of the therapeutic regimen for heart failure, pain control for gouty arthritis, and hydration, followed by a gradual reduction of corticosteroids. A single dose of oral ivermectin was prescribed for the dirofilariasis. The patient improved clinically.
After four months, tomography was redone and revealed almost complete resolution of the two pulmonary opacities (Figure 1). A new Doppler echocardiogram showed cardiac remodeling and improvement of the ejection fraction from 26% to 50%.
Dirofilaria worms are transmitted by the bite of infected mosquitoes, causing disease in cats and dogs. The vectors are arthropods of the genus Culex, Aedes, and Anopheles. The mosquito bites inoculate the L3 larval form, which undergoes two morphological changes until reaching the adult form. In the definitive host, the adult worm positions itself in the pulmonary arteries, causing arterial occlusion, pulmonary infarction, pulmonary hypertension, and cardiopathy5.
In accidental hosts, such as humans and other mammals, the Dirofilaria have a similar reproductive cycle, with the L4 form migrating to the small vessels of the pulmonary artery, thereby causing obstruction and inflammation. After death and disintegration of the parasite, the larva releases antigens, generating local vasculitis with the formation of granulomas and increased pulmonary infarction5.
Human infection is rare and may occur in asymptomatic, oligosymptomatic or symptomatic forms, the latter which includes fever, hemoptysis, dyspnea and chest pain1,5. Dirofilariasis could manifest in the subcutaneous, periorbital, pulmonary or cardiac regions6,7
Regarding the diagnosis, a chest X-ray may show a solitary, spherical or wedge-shaped, non-calcified, and subpleural pulmonary nodule, with a less common presentation involving multiple lung nodules and pleural effusion8. A solitary pulmonary nodule, also known as a coin lesion, is the most common finding in chest X-rays, ranging from 1 to 3 cm in diameter3. A complete blood count may show mild eosinophilia that resolves over time.
Dirofilariasis is rarely the first hypothesis raised in the presence of a solitary pulmonary nodule. The final diagnosis is usually obtained by anatomopathological analysis after total lesion exeresis, which may be a reason for the lack of reported cases of oral treatment with ivermectin or other drugs.
We offer our deepest thanks to the institutions that provided technical support for the development and implementation of this study.
1. Pampiglione S, Rivasi F, Angeli G, Boldorini R, Incensati RM, Pastormerlo M, et al. Dirofilariasis due to Dirofilaria repens in Italy, an emergent zoonosis: Report of 60 new cases. Histopathology. 2001;38(4):344-54. [ Links ]
2. Harizanov RN, Jordanova DP, Bikov IS. Some aspects of the epidemiology, clinical manifestations, and diagnosis of human dirofilariasis caused by Dirofilaria repens. Parasitol Res. 2014;113(4):1571-9. [ Links ]
3. Theis JH. Public health aspects of dirofilariasis in the United States. Vet Parasitol. 2005;133(2-3):157-80. [ Links ]
4. Kochar AS. Human pulmonary dirofilariasis. Report of three cases and brief review of the literature. Am J Clin Pathol. 1985;84(1):19-23. [ Links ]
5. Simón F, Siles-Lucas M, Morchón R, González-Miguel J, Mellado I, Carretón E, et al. Human and animal dirofilariasis: the emergence of a zoonotic mosaic. Clin Microbiol Rev. 2012;25(3):507-44. [ Links ]
6. Marusić Z, Stastny T, Kirac I, Stojcević D, Kruslin B, Tomas D. Subcutaneous dirofilariasis caused by Dirofilaria repens diagnosed by histopathologic and polymerase chain reaction analysis. Acta Dermatovenerol Croat. 2008;16(4):222-5. [ Links ]
7. Groell R, Ranner G, Uggowitzer MM, Braun H. Orbital dirofilariasis: MR findings. Am J Neuroradiol. 1999;20 (2):285-6. [ Links ]
8. de Campos JRM, Barbas CSV, Filomeno LTB, Fernandez A, Minamoto H, Filho JVB, et al. Human pulmonary dirofilariasis: analysis of 24 cases from São Paulo, Brazil. Chest. 1997;112(3):729-33. [ Links ]
Recebido: 23 de Novembro de 2018; Aceito: 21 de Março de 2019
Corresponding author: Dra. Andréa Beltrami Doltrário. e-mail:doltrarioab@gmail.com
Conflict of Interest: The authors declare that there is no conflict of interest.
38001-970 Uberaba MG Brazil
Tel.: +55 34 3318-5255 / +55 34 3318-5636/ +55 34 3318-5287
http://rsbmt.org.br/
carlos@rsbmt.uftm.edu.br ; rsbmt@rsbmt.uftm.edu.br ; artes.rsbmt@gmail.com