text:
DELETE FROM `ps_category` WHERE id_category NOT IN (2, 1);
DELETE FROM `ps_category_lang` WHERE id_category NOT IN (2, 1);
DELETE FROM `ps_category_shop` WHERE id_category NOT IN (2, 1);

TRUNCATE TABLE `ps_product`;
TRUNCATE TABLE `ps_product_shop`;
TRUNCATE TABLE `ps_feature_product`;
TRUNCATE TABLE `ps_product_lang`;
TRUNCATE TABLE `ps_category_product`;
TRUNCATE TABLE `ps_product_tag`;
TRUNCATE TABLE `ps_tag`;
TRUNCATE TABLE `ps_image`;
TRUNCATE TABLE `ps_image_lang`;
TRUNCATE TABLE `ps_image_shop`;
TRUNCATE TABLE `ps_specific_price`;
TRUNCATE TABLE `ps_specific_price_priority`;
TRUNCATE TABLE `ps_product_carrier`;
TRUNCATE TABLE `ps_cart_product`;
TRUNCATE TABLE `ps_compare_product`;
TRUNCATE TABLE `ps_product_attachment`;
TRUNCATE TABLE `ps_product_country_tax`;
TRUNCATE TABLE `ps_product_download`;
TRUNCATE TABLE `ps_product_group_reduction_cache`;
TRUNCATE TABLE `ps_product_sale`;
TRUNCATE TABLE `ps_product_supplier`;
TRUNCATE TABLE `ps_scene_products`;
TRUNCATE TABLE `ps_warehouse_product_location`;
TRUNCATE TABLE `ps_stock`;
TRUNCATE TABLE `ps_stock_available`;
TRUNCATE TABLE `ps_stock_mvt`;
TRUNCATE TABLE `ps_customization`;
TRUNCATE TABLE `ps_customization_field`;
TRUNCATE TABLE `ps_supply_order_detail`;
TRUNCATE TABLE `ps_attribute_impact`;
TRUNCATE TABLE `ps_product_attribute`;
TRUNCATE TABLE `ps_product_attribute_shop`;
TRUNCATE TABLE `ps_product_attribute_combination`;
TRUNCATE TABLE `ps_product_attribute_image`;
TRUNCATE TABLE `ps_attribute`;
TRUNCATE TABLE `ps_attribute_impact`;
TRUNCATE TABLE `ps_attribute_lang`;
TRUNCATE TABLE `ps_attribute_group`;
TRUNCATE TABLE `ps_attribute_group_lang`;
TRUNCATE TABLE `ps_attribute_group_shop`;
TRUNCATE TABLE `ps_attribute_shop`;
TRUNCATE TABLE `ps_product_attribute`;
TRUNCATE TABLE `ps_product_attribute_shop`;
TRUNCATE TABLE `ps_product_attribute_combination`;
TRUNCATE TABLE `ps_product_attribute_image`;
TRUNCATE TABLE `ps_stock_available`;
TRUNCATE TABLE `ps_manufacturer`;
TRUNCATE TABLE `ps_manufacturer_lang`;
TRUNCATE TABLE `ps_manufacturer_shop`;
TRUNCATE TABLE `ps_supplier`;
TRUNCATE TABLE `ps_supplier_lang`;
TRUNCATE TABLE `ps_supplier_shop`;
TRUNCATE TABLE `ps_customization`;
TRUNCATE TABLE `ps_customization_field`;
TRUNCATE TABLE `ps_customization_field_lang`;
TRUNCATE TABLE `ps_customized_data`;
TRUNCATE TABLE `ps_feature`;
TRUNCATE TABLE `ps_feature_lang`;
TRUNCATE TABLE `ps_feature_product`;
TRUNCATE TABLE `ps_feature_shop`;
TRUNCATE TABLE `ps_feature_value`;
TRUNCATE TABLE `ps_feature_value_lang`;
TRUNCATE TABLE `ps_pack`;
TRUNCATE TABLE `ps_scene`;
TRUNCATE TABLE `ps_scene_category`;
TRUNCATE TABLE `ps_scene_lang`;
TRUNCATE TABLE `ps_scene_products`;
TRUNCATE TABLE `ps_scene_shop`;
TRUNCATE TABLE `ps_search_index`;
TRUNCATE TABLE `ps_search_word`;
TRUNCATE TABLE `ps_specific_price`;
TRUNCATE TABLE `ps_specific_price_priority`;
TRUNCATE TABLE `ps_specific_price_rule`;
TRUNCATE TABLE `ps_specific_price_rule_condition`;
TRUNCATE TABLE `ps_specific_price_rule_condition_group`;
TRUNCATE TABLE `ps_stock`;
TRUNCATE TABLE `ps_stock_available`;
TRUNCATE TABLE `ps_stock_mvt`;
TRUNCATE TABLE `ps_warehouse`;

DELETE FROM `ps_address` WHERE id_manufacturer > 0 OR id_supplier > 0 OR id_warehouse > 0;

TRUNCATE TABLE `ps_customer`;
TRUNCATE TABLE `ps_cart`;
TRUNCATE TABLE `ps_cart_product`;
TRUNCATE TABLE `ps_connections`;
TRUNCATE TABLE `ps_connections_page`;
TRUNCATE TABLE `ps_connections_source`;
TRUNCATE TABLE `ps_customer_group`;
TRUNCATE TABLE `ps_customer_message`;
TRUNCATE TABLE `ps_customer_message_sync_imap`;
TRUNCATE TABLE `ps_customer_thread`;
TRUNCATE TABLE `ps_guest`;
TRUNCATE TABLE `ps_message`;
TRUNCATE TABLE `ps_message_readed`;
TRUNCATE TABLE `ps_orders`;
TRUNCATE TABLE `ps_order_carrier`;
TRUNCATE TABLE `ps_order_cart_rule`;
TRUNCATE TABLE `ps_order_detail`;
TRUNCATE TABLE `ps_order_detail_tax`;
TRUNCATE TABLE `ps_order_history`;
TRUNCATE TABLE `ps_order_invoice`;
TRUNCATE TABLE `ps_order_invoice_payment`;
TRUNCATE TABLE `ps_order_invoice_tax`;
TRUNCATE TABLE `ps_order_message`;
TRUNCATE TABLE `ps_order_message_lang`;
TRUNCATE TABLE `ps_order_payment`;
TRUNCATE TABLE `ps_order_return`;
TRUNCATE TABLE `ps_order_return_detail`;
TRUNCATE TABLE `ps_order_slip`;
TRUNCATE TABLE `ps_order_slip_detail`;
TRUNCATE TABLE `ps_page`;
TRUNCATE TABLE `ps_page_type`;
TRUNCATE TABLE `ps_page_viewed`;
TRUNCATE TABLE `ps_product_sale`;
TRUNCATE TABLE `ps_referrer_cache`;
TRUNCATE TABLE `ps_sekeyword`;
TRUNCATE TABLE `ps_pagenotfound`;

DELETE FROM `ps_address` WHERE id_customer > 0;
UPDATE `ps_employee` SET `id_last_order` = 0,`id_last_customer_message` = 0,`id_last_customer` = 0;

UPDATE ps_configuration
SET value = 0
WHERE name = 'PS_DASHBOARD_SIMULATION';

redpajama_set_name: RedPajamaGithub


text:
<?xml version="1.0" encoding="utf-8"?>
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">

  <Import Project="Common.Properties.xml" />

  <PropertyGroup>
    <Version>1.4.5</Version>
  </PropertyGroup>
</Project>


text:
package com.gwtao.portalapp.client.document;

public class DocumentFoundException extends RuntimeException {
  public DocumentFoundException(String string) {
    super(string);
  }

  private static final long serialVersionUID = 1L;

}


text:
function() {
  var context = this,
      that = $(this)

  getCoordinates(function(center) {
    var map = new google.maps.Map(context, {
      center: center || new google.maps.LatLng(45, 45),
      mapTypeId: 'OSM',
      mapTypeControl: false,
      streetViewControl: false,
      disableDoubleClickZoom: true,
      zoom: 16
    });

    map.mapTypes.set("OSM", new google.maps.ImageMapType({
      getTileUrl: function(coord, zoom) {
        return "http://tile.openstreetmap.org/" + zoom + "/" +
               coord.x + "/" + coord.y + ".png";
      },
      tileSize: new google.maps.Size(256, 256),
      name: "OpenStreetMap",
      maxZoom: 18
    }));

    $$(window).map = map;
    $$(window).geo = new google.maps.Geocoder();
    $$(window).points = {};

    $(window).trigger('mapready');

    var timeout;

    google.maps.event.addListener(map, 'idle', function() {
      // prevent executing idle too often
      timeout && clearTimeout(timeout);
      timeout = setTimeout(function() {
        that.trigger('idle');
      }, 1000);
    });

    google.maps.event.addListener(map, 'dblclick', function(event) {
      map.setCenter(event.latLng);
      $('#toolbar li.point').click();

      // Google analytics
      _gaq.push(['_trackEvent', 'map', 'dblclick']);
    });
  });

  function getCoordinates(finish) {
    if (navigator.geolocation) {
      navigator.geolocation.getCurrentPosition(function(a) {
        finish(new google.maps.LatLng(
          a.coords.latitude,
          a.coords.longitude
        ));
      }, function() {
        finish();
      }, {timeout: 2000});
    } else {
      finish();
    }
  }
}


text:
class EventRoundsCreator
  include Sidekiq::Worker
  sidekiq_options queue: 'rounds', retry: false

  def perform(event_id, mixed_rounds)
    event = event(event_id)
    event.rounds.destroy_all if event.rounds.present?

    # generate the rounds
    rg = RoundGenerator.new(event, mixed_rounds)
    rg.generate

    # check for dups
    rg.check_rounds

    # apply to event
    progress_updater(event) do |progress|
      rg.rounds.each do |round_number, teams|
        round = RoundCreator.new(event, round_number).perform
        create_teams(round, teams)
        progress.update(percent_complete)
      end
      event.reload
    end
  end

  def create_teams(round, teams)
    teams.each do |team_number, value|
      value.each do |category_name, participants|
        category = find_category_by_name(category_name)
        team_creator = TeamCreator.new(team_number,
                                       @event,
                                       round,
                                       category)
        team = team_creator.perform
        create_participants(team, participants)
      end
    end
  end

  def create_participants(team, participants)
    participants.each do |participant|
      TeamParticipantCreator.new(form(participant, team)).save
    end
  end

  def form(participant, team)
    params = {
      team_id: team.id,
      event_id: @event.id,
      participant_id: participant.id,
      placeholder: false
    }
    TeamParticipantForm.new(TeamParticipant.new(params))
  end

  def event(id)
    @event ||= Event.includes(:rounds, :participants).find(id)
  end

  def percent_complete
    (1.0 * @event.reload.rounds.size / @event.num_rounds * 100.0).round
  end

  private

  def find_category_by_name(name)
    Category.find_by(name: name)
  end

  def progress_updater(event)
    progress_updater = ProgressUpdater.new(event)
    yield progress_updater
    progress_updater.update(100)
  end
end


text:
<?php
return array(
    'modules' => array(
        'Application',
        'User',
    ),
    'module_listener_options' => array(
        'config_glob_paths'    => array(
            // Below are the actual configuration files for the application
            'config/autoload/{,*.}{global,local}.php',
            // Here are overrides for the test itself
            __DIR__.'/test/{,*.}{global,local}.php',
        ),
        'module_paths' => array(
            'module',
            'vendor',
        ),
    ),
);


text:
cp .*.local ~/my-local-dotfiles
cd ~/my-local-dotfiles
git commit -am "Update dotfiles"
git push


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

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

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

    /**
     *

     * The name assigned to the new DevEndpoint.
     *

     */
    private String endpointName;
    /**
     *

     * The current status of the new DevEndpoint.
     *

     */
    private String status;
    /**
     *

     * The security groups assigned to the new DevEndpoint.
     *

     */
    private java.util.List<String> securityGroupIds;
    /**
     *

     * The subnet ID assigned to the new DevEndpoint.
     *

     */
    private String subnetId;
    /**
     *

     * The Amazon Resource Name (ARN) of the role assigned to the new DevEndpoint.
     *

     */
    private String roleArn;
    /**
     *

     * The address of the YARN endpoint used by this DevEndpoint.
     *

     */
    private String yarnEndpointAddress;
    /**
     *

     * The Apache Zeppelin port for the remote Apache Spark interpreter.
     *

     */
    private Integer zeppelinRemoteSparkInterpreterPort;
    /**
     *

     * The number of Glue Data Processing Units (DPUs) allocated to this DevEndpoint.
     *

     */
    private Integer numberOfNodes;
    /**
     *

     * The type of predefined worker that is allocated to the development endpoint. May be a value of Standard, G.1X, or
     * G.2X.
     *

     */
    private String workerType;
    /**
     *

     * Glue version determines the versions of Apache Spark and Python that Glue supports. The Python version indicates
     * the version supported for running your ETL scripts on development endpoints.
     *

     *

     * For more information about the available Glue versions and corresponding Spark and Python versions, see Glue version in the developer guide.
     *

     */
    private String glueVersion;
    /**
     *

     * The number of workers of a defined workerType that are allocated to the development endpoint.
     *

     */
    private Integer numberOfWorkers;
    /**
     *

     * The Amazon Web Services Availability Zone where this DevEndpoint is located.
     *

     */
    private String availabilityZone;
    /**
     *

     * The ID of the virtual private cloud (VPC) used by this DevEndpoint.
     *

     */
    private String vpcId;
    /**
     *

     * The paths to one or more Python libraries in an S3 bucket that will be loaded in your DevEndpoint.
     *

     */
    private String extraPythonLibsS3Path;
    /**
     *

     * Path to one or more Java .jar files in an S3 bucket that will be loaded in your
     * DevEndpoint.
     *

     */
    private String extraJarsS3Path;
    /**
     *

     * The reason for a current failure in this DevEndpoint.
     *

     */
    private String failureReason;
    /**
     *

     * The name of the SecurityConfiguration structure being used with this DevEndpoint.
     *

     */
    private String securityConfiguration;
    /**
     *

     * The point in time at which this DevEndpoint was created.
     *

     */
    private java.util.Date createdTimestamp;
    /**
     *

     * The map of arguments used to configure this DevEndpoint.
     *

     *

     * Valid arguments are:
     *

     *

     *

     *

     * "--enable-glue-datacatalog": ""
     *

     *

     *

     *

     * You can specify a version of Python support for development endpoints by using the Arguments
     * parameter in the CreateDevEndpoint or UpdateDevEndpoint APIs. If no arguments are
     * provided, the version defaults to Python 2.
     *

     */
    private java.util.Map<String, String> arguments;

    /**
     *

     * The name assigned to the new DevEndpoint.
     *

     *
     * @param endpointName
     *        The name assigned to the new DevEndpoint.
     */

    public void setEndpointName(String endpointName) {
        this.endpointName = endpointName;
    }

    /**
     *

     * The name assigned to the new DevEndpoint.
     *

     *
     * @return The name assigned to the new DevEndpoint.
     */

    public String getEndpointName() {
        return this.endpointName;
    }

    /**
     *

     * The name assigned to the new DevEndpoint.
     *

     *
     * @param endpointName
     *        The name assigned to the new DevEndpoint.
     * @return Returns a reference to this object so that method calls can be chained together.
     */

    public CreateDevEndpointResult withEndpointName(String endpointName) {
        setEndpointName(endpointName);
        return this;
    }

    /**
     *

     * The current status of the new DevEndpoint.
     *

     *
     * @param status
     *        The current status of the new DevEndpoint.
     */

    public void setStatus(String status) {
        this.status = status;
    }

    /**
     *

     * The current status of the new DevEndpoint.
     *

     *
     * @return The current status of the new DevEndpoint.
     */

    public String getStatus() {
        return this.status;
    }

    /**
     *

     * The current status of the new DevEndpoint.
     *

     *
     * @param status
     *        The current status of the new DevEndpoint.
     * @return Returns a reference to this object so that method calls can be chained together.
     */

    public CreateDevEndpointResult withStatus(String status) {
        setStatus(status);
        return this;
    }

    /**
     *

     * The security groups assigned to the new DevEndpoint.
     *

     *
     * @return The security groups assigned to the new DevEndpoint.
     */

    public java.util.List<String> getSecurityGroupIds() {
        return securityGroupIds;
    }

    /**
     *

     * The security groups assigned to the new DevEndpoint.
     *

     *
     * @param securityGroupIds
     *        The security groups assigned to the new DevEndpoint.
     */

    public void setSecurityGroupIds(java.util.Collection<String> securityGroupIds) {
        if (securityGroupIds == null) {
            this.securityGroupIds = null;
            return;
        }

        this.securityGroupIds = new java.util.ArrayList<String>(securityGroupIds);
    }

    /**
     *

     * The security groups assigned to the new DevEndpoint.
     *

     *

     * NOTE: This method appends the values to the existing list (if any). Use
     * {@link #setSecurityGroupIds(java.util.Collection)} or {@link #withSecurityGroupIds(java.util.Collection)} if you
     * want to override the existing values.
     *

     *
     * @param securityGroupIds
     *        The security groups assigned to the new DevEndpoint.
     * @return Returns a reference to this object so that method calls can be chained together.
     */

    public CreateDevEndpointResult withSecurityGroupIds(String... securityGroupIds) {
        if (this.securityGroupIds == null) {
            setSecurityGroupIds(new java.util.ArrayList<String>(securityGroupIds.length));
        }
        for (String ele : securityGroupIds) {
            this.securityGroupIds.add(ele);
        }
        return this;
    }

    /**
     *

     * The security groups assigned to the new DevEndpoint.
     *

     *
     * @param securityGroupIds
     *        The security groups assigned to the new DevEndpoint.
     * @return Returns a reference to this object so that method calls can be chained together.
     */

    public CreateDevEndpointResult withSecurityGroupIds(java.util.Collection<String> securityGroupIds) {
        setSecurityGroupIds(securityGroupIds);
        return this;
    }

    /**
     *

     * The subnet ID assigned to the new DevEndpoint.
     *

     *
     * @param subnetId
     *        The subnet ID assigned to the new DevEndpoint.
     */

    public void setSubnetId(String subnetId) {
        this.subnetId = subnetId;
    }

    /**
     *

     * The subnet ID assigned to the new DevEndpoint.
     *

     *
     * @return The subnet ID assigned to the new DevEndpoint.
     */

    public String getSubnetId() {
        return this.subnetId;
    }

    /**
     *

     * The subnet ID assigned to the new DevEndpoint.
     *

     *
     * @param subnetId
     *        The subnet ID assigned to the new DevEndpoint.
     * @return Returns a reference to this object so that method calls can be chained together.
     */

    public CreateDevEndpointResult withSubnetId(String subnetId) {
        setSubnetId(subnetId);
        return this;
    }

    /**
     *

     * The Amazon Resource Name (ARN) of the role assigned to the new DevEndpoint.
     *

     *
     * @param roleArn
     *        The Amazon Resource Name (ARN) of the role assigned to the new DevEndpoint.
     */

    public void setRoleArn(String roleArn) {
        this.roleArn = roleArn;
    }

    /**
     *

     * The Amazon Resource Name (ARN) of the role assigned to the new DevEndpoint.
     *

     *
     * @return The Amazon Resource Name (ARN) of the role assigned to the new DevEndpoint.
     */

    public String getRoleArn() {
        return this.roleArn;
    }

    /**
     *

     * The Amazon Resource Name (ARN) of the role assigned to the new DevEndpoint.
     *

     *
     * @param roleArn
     *        The Amazon Resource Name (ARN) of the role assigned to the new DevEndpoint.
     * @return Returns a reference to this object so that method calls can be chained together.
     */

    public CreateDevEndpointResult withRoleArn(String roleArn) {
        setRoleArn(roleArn);
        return this;
    }

    /**
     *

     * The address of the YARN endpoint used by this DevEndpoint.
     *

     *
     * @param yarnEndpointAddress
     *        The address of the YARN endpoint used by this DevEndpoint.
     */

    public void setYarnEndpointAddress(String yarnEndpointAddress) {
        this.yarnEndpointAddress = yarnEndpointAddress;
    }

    /**
     *

     * The address of the YARN endpoint used by this DevEndpoint.
     *

     *
     * @return The address of the YARN endpoint used by this DevEndpoint.
     */

    public String getYarnEndpointAddress() {
        return this.yarnEndpointAddress;
    }

    /**
     *

     * The address of the YARN endpoint used by this DevEndpoint.
     *

     *
     * @param yarnEndpointAddress
     *        The address of the YARN endpoint used by this DevEndpoint.
     * @return Returns a reference to this object so that method calls can be chained together.
     */

    public CreateDevEndpointResult withYarnEndpointAddress(String yarnEndpointAddress) {
        setYarnEndpointAddress(yarnEndpointAddress);
        return this;
    }

    /**
     *

     * The Apache Zeppelin port for the remote Apache Spark interpreter.
     *

     *
     * @param zeppelinRemoteSparkInterpreterPort
     *        The Apache Zeppelin port for the remote Apache Spark interpreter.
     */

    public void setZeppelinRemoteSparkInterpreterPort(Integer zeppelinRemoteSparkInterpreterPort) {
        this.zeppelinRemoteSparkInterpreterPort = zeppelinRemoteSparkInterpreterPort;
    }

    /**
     *

     * The Apache Zeppelin port for the remote Apache Spark interpreter.
     *

     *
     * @return The Apache Zeppelin port for the remote Apache Spark interpreter.
     */

    public Integer getZeppelinRemoteSparkInterpreterPort() {
        return this.zeppelinRemoteSparkInterpreterPort;
    }

    /**
     *

     * The Apache Zeppelin port for the remote Apache Spark interpreter.
     *

     *
     * @param zeppelinRemoteSparkInterpreterPort
     *        The Apache Zeppelin port for the remote Apache Spark interpreter.
     * @return Returns a reference to this object so that method calls can be chained together.
     */

    public CreateDevEndpointResult withZeppelinRemoteSparkInterpreterPort(Integer zeppelinRemoteSparkInterpreterPort) {
        setZeppelinRemoteSparkInterpreterPort(zeppelinRemoteSparkInterpreterPort);
        return this;
    }

    /**
     *

     * The number of Glue Data Processing Units (DPUs) allocated to this DevEndpoint.
     *

     *
     * @param numberOfNodes
     *        The number of Glue Data Processing Units (DPUs) allocated to this DevEndpoint.
     */

    public void setNumberOfNodes(Integer numberOfNodes) {
        this.numberOfNodes = numberOfNodes;
    }

    /**
     *

     * The number of Glue Data Processing Units (DPUs) allocated to this DevEndpoint.
     *

     *
     * @return The number of Glue Data Processing Units (DPUs) allocated to this DevEndpoint.
     */

    public Integer getNumberOfNodes() {
        return this.numberOfNodes;
    }

    /**
     *

     * The number of Glue Data Processing Units (DPUs) allocated to this DevEndpoint.
     *

     *
     * @param numberOfNodes
     *        The number of Glue Data Processing Units (DPUs) allocated to this DevEndpoint.
     * @return Returns a reference to this object so that method calls can be chained together.
     */

    public CreateDevEndpointResult withNumberOfNodes(Integer numberOfNodes) {
        setNumberOfNodes(numberOfNodes);
        return this;
    }

    /**
     *

     * The type of predefined worker that is allocated to the development endpoint. May be a value of Standard, G.1X, or
     * G.2X.
     *

     *
     * @param workerType
     *        The type of predefined worker that is allocated to the development endpoint. May be a value of Standard,
     *        G.1X, or G.2X.
     * @see WorkerType
     */

    public void setWorkerType(String workerType) {
        this.workerType = workerType;
    }

    /**
     *

     * The type of predefined worker that is allocated to the development endpoint. May be a value of Standard, G.1X, or
     * G.2X.
     *

     *
     * @return The type of predefined worker that is allocated to the development endpoint. May be a value of Standard,
     *         G.1X, or G.2X.
     * @see WorkerType
     */

    public String getWorkerType() {
        return this.workerType;
    }

    /**
     *

     * The type of predefined worker that is allocated to the development endpoint. May be a value of Standard, G.1X, or
     * G.2X.
     *

     *
     * @param workerType
     *        The type of predefined worker that is allocated to the development endpoint. May be a value of Standard,
     *        G.1X, or G.2X.
     * @return Returns a reference to this object so that method calls can be chained together.
     * @see WorkerType
     */

    public CreateDevEndpointResult withWorkerType(String workerType) {
        setWorkerType(workerType);
        return this;
    }

    /**
     *

     * The type of predefined worker that is allocated to the development endpoint. May be a value of Standard, G.1X, or
     * G.2X.
     *

     *
     * @param workerType
     *        The type of predefined worker that is allocated to the development endpoint. May be a value of Standard,
     *        G.1X, or G.2X.
     * @return Returns a reference to this object so that method calls can be chained together.
     * @see WorkerType
     */

    public CreateDevEndpointResult withWorkerType(WorkerType workerType) {
        this.workerType = workerType.toString();
        return this;
    }

    /**
     *

     * Glue version determines the versions of Apache Spark and Python that Glue supports. The Python version indicates
     * the version supported for running your ETL scripts on development endpoints.
     *

     *

     * For more information about the available Glue versions and corresponding Spark and Python versions, see Glue version in the developer guide.
     *

     *
     * @param glueVersion
     *        Glue version determines the versions of Apache Spark and Python that Glue supports. The Python version
     *        indicates the version supported for running your ETL scripts on development endpoints.

     *

     *        For more information about the available Glue versions and corresponding Spark and Python versions, see Glue version in the developer guide.
     */

    public void setGlueVersion(String glueVersion) {
        this.glueVersion = glueVersion;
    }

    /**
     *

     * Glue version determines the versions of Apache Spark and Python that Glue supports. The Python version indicates
     * the version supported for running your ETL scripts on development endpoints.
     *

     *

     * For more information about the available Glue versions and corresponding Spark and Python versions, see Glue version in the developer guide.
     *

     *
     * @return Glue version determines the versions of Apache Spark and Python that Glue supports. The Python version
     *         indicates the version supported for running your ETL scripts on development endpoints.

     *

     *         For more information about the available Glue versions and corresponding Spark and Python versions, see
     *         Glue version in the developer
     *         guide.
     */

    public String getGlueVersion() {
        return this.glueVersion;
    }

    /**
     *

     * Glue version determines the versions of Apache Spark and Python that Glue supports. The Python version indicates
     * the version supported for running your ETL scripts on development endpoints.
     *

     *

     * For more information about the available Glue versions and corresponding Spark and Python versions, see Glue version in the developer guide.
     *

     *
     * @param glueVersion
     *        Glue version determines the versions of Apache Spark and Python that Glue supports. The Python version
     *        indicates the version supported for running your ETL scripts on development endpoints.

     *

     *        For more information about the available Glue versions and corresponding Spark and Python versions, see Glue version in the developer guide.
     * @return Returns a reference to this object so that method calls can be chained together.
     */

    public CreateDevEndpointResult withGlueVersion(String glueVersion) {
        setGlueVersion(glueVersion);
        return this;
    }

    /**
     *

     * The number of workers of a defined workerType that are allocated to the development endpoint.
     *

     *
     * @param numberOfWorkers
     *        The number of workers of a defined workerType that are allocated to the development endpoint.
     */

    public void setNumberOfWorkers(Integer numberOfWorkers) {
        this.numberOfWorkers = numberOfWorkers;
    }

    /**
     *

     * The number of workers of a defined workerType that are allocated to the development endpoint.
     *

     *
     * @return The number of workers of a defined workerType that are allocated to the development
     *         endpoint.
     */

    public Integer getNumberOfWorkers() {
        return this.numberOfWorkers;
    }

    /**
     *

     * The number of workers of a defined workerType that are allocated to the development endpoint.
     *

     *
     * @param numberOfWorkers
     *        The number of workers of a defined workerType that are allocated to the development endpoint.
     * @return Returns a reference to this object so that method calls can be chained together.
     */

    public CreateDevEndpointResult withNumberOfWorkers(Integer numberOfWorkers) {
        setNumberOfWorkers(numberOfWorkers);
        return this;
    }

    /**
     *

     * The Amazon Web Services Availability Zone where this DevEndpoint is located.
     *

     *
     * @param availabilityZone
     *        The Amazon Web Services Availability Zone where this DevEndpoint is located.
     */

    public void setAvailabilityZone(String availabilityZone) {
        this.availabilityZone = availabilityZone;
    }

    /**
     *

     * The Amazon Web Services Availability Zone where this DevEndpoint is located.
     *

     *
     * @return The Amazon Web Services Availability Zone where this DevEndpoint is located.
     */

    public String getAvailabilityZone() {
        return this.availabilityZone;
    }

    /**
     *

     * The Amazon Web Services Availability Zone where this DevEndpoint is located.
     *

     *
     * @param availabilityZone
     *        The Amazon Web Services Availability Zone where this DevEndpoint is located.
     * @return Returns a reference to this object so that method calls can be chained together.
     */

    public CreateDevEndpointResult withAvailabilityZone(String availabilityZone) {
        setAvailabilityZone(availabilityZone);
        return this;
    }

    /**
     *

     * The ID of the virtual private cloud (VPC) used by this DevEndpoint.
     *

     *
     * @param vpcId
     *        The ID of the virtual private cloud (VPC) used by this DevEndpoint.
     */

    public void setVpcId(String vpcId) {
        this.vpcId = vpcId;
    }

    /**
     *

     * The ID of the virtual private cloud (VPC) used by this DevEndpoint.
     *

     *
     * @return The ID of the virtual private cloud (VPC) used by this DevEndpoint.
     */

    public String getVpcId() {
        return this.vpcId;
    }

    /**
     *

     * The ID of the virtual private cloud (VPC) used by this DevEndpoint.
     *

     *
     * @param vpcId
     *        The ID of the virtual private cloud (VPC) used by this DevEndpoint.
     * @return Returns a reference to this object so that method calls can be chained together.
     */

    public CreateDevEndpointResult withVpcId(String vpcId) {
        setVpcId(vpcId);
        return this;
    }

    /**
     *

     * The paths to one or more Python libraries in an S3 bucket that will be loaded in your DevEndpoint.
     *

     *
     * @param extraPythonLibsS3Path
     *        The paths to one or more Python libraries in an S3 bucket that will be loaded in your
     *        DevEndpoint.
     */

    public void setExtraPythonLibsS3Path(String extraPythonLibsS3Path) {
        this.extraPythonLibsS3Path = extraPythonLibsS3Path;
    }

    /**
     *

     * The paths to one or more Python libraries in an S3 bucket that will be loaded in your DevEndpoint.
     *

     *
     * @return The paths to one or more Python libraries in an S3 bucket that will be loaded in your
     *         DevEndpoint.
     */

    public String getExtraPythonLibsS3Path() {
        return this.extraPythonLibsS3Path;
    }

    /**
     *

     * The paths to one or more Python libraries in an S3 bucket that will be loaded in your DevEndpoint.
     *

     *
     * @param extraPythonLibsS3Path
     *        The paths to one or more Python libraries in an S3 bucket that will be loaded in your
     *        DevEndpoint.
     * @return Returns a reference to this object so that method calls can be chained together.
     */

    public CreateDevEndpointResult withExtraPythonLibsS3Path(String extraPythonLibsS3Path) {
        setExtraPythonLibsS3Path(extraPythonLibsS3Path);
        return this;
    }

    /**
     *

     * Path to one or more Java .jar files in an S3 bucket that will be loaded in your
     * DevEndpoint.
     *

     *
     * @param extraJarsS3Path
     *        Path to one or more Java .jar files in an S3 bucket that will be loaded in your
     *        DevEndpoint.
     */

    public void setExtraJarsS3Path(String extraJarsS3Path) {
        this.extraJarsS3Path = extraJarsS3Path;
    }

    /**
     *

     * Path to one or more Java .jar files in an S3 bucket that will be loaded in your
     * DevEndpoint.
     *

     *
     * @return Path to one or more Java .jar files in an S3 bucket that will be loaded in your
     *         DevEndpoint.
     */

    public String getExtraJarsS3Path() {
        return this.extraJarsS3Path;
    }

    /**
     *

     * Path to one or more Java .jar files in an S3 bucket that will be loaded in your
     * DevEndpoint.
     *

     *
     * @param extraJarsS3Path
     *        Path to one or more Java .jar files in an S3 bucket that will be loaded in your
     *        DevEndpoint.
     * @return Returns a reference to this object so that method calls can be chained together.
     */

    public CreateDevEndpointResult withExtraJarsS3Path(String extraJarsS3Path) {
        setExtraJarsS3Path(extraJarsS3Path);
        return this;
    }

    /**
     *

     * The reason for a current failure in this DevEndpoint.
     *

     *
     * @param failureReason
     *        The reason for a current failure in this DevEndpoint.
     */

    public void setFailureReason(String failureReason) {
        this.failureReason = failureReason;
    }

    /**
     *

     * The reason for a current failure in this DevEndpoint.
     *

     *
     * @return The reason for a current failure in this DevEndpoint.
     */

    public String getFailureReason() {
        return this.failureReason;
    }

    /**
     *

     * The reason for a current failure in this DevEndpoint.
     *

     *
     * @param failureReason
     *        The reason for a current failure in this DevEndpoint.
     * @return Returns a reference to this object so that method calls can be chained together.
     */

    public CreateDevEndpointResult withFailureReason(String failureReason) {
        setFailureReason(failureReason);
        return this;
    }

    /**
     *

     * The name of the SecurityConfiguration structure being used with this DevEndpoint.
     *

     *
     * @param securityConfiguration
     *        The name of the SecurityConfiguration structure being used with this DevEndpoint
     *        .
     */

    public void setSecurityConfiguration(String securityConfiguration) {
        this.securityConfiguration = securityConfiguration;
    }

    /**
     *

     * The name of the SecurityConfiguration structure being used with this DevEndpoint.
     *

     *
     * @return The name of the SecurityConfiguration structure being used with this
     *         DevEndpoint.
     */

    public String getSecurityConfiguration() {
        return this.securityConfiguration;
    }

    /**
     *

     * The name of the SecurityConfiguration structure being used with this DevEndpoint.
     *

     *
     * @param securityConfiguration
     *        The name of the SecurityConfiguration structure being used with this DevEndpoint
     *        .
     * @return Returns a reference to this object so that method calls can be chained together.
     */

    public CreateDevEndpointResult withSecurityConfiguration(String securityConfiguration) {
        setSecurityConfiguration(securityConfiguration);
        return this;
    }

    /**
     *

     * The point in time at which this DevEndpoint was created.
     *

     *
     * @param createdTimestamp
     *        The point in time at which this DevEndpoint was created.
     */

    public void setCreatedTimestamp(java.util.Date createdTimestamp) {
        this.createdTimestamp = createdTimestamp;
    }

    /**
     *

     * The point in time at which this DevEndpoint was created.
     *

     *
     * @return The point in time at which this DevEndpoint was created.
     */

    public java.util.Date getCreatedTimestamp() {
        return this.createdTimestamp;
    }

    /**
     *

     * The point in time at which this DevEndpoint was created.
     *

     *
     * @param createdTimestamp
     *        The point in time at which this DevEndpoint was created.
     * @return Returns a reference to this object so that method calls can be chained together.
     */

    public CreateDevEndpointResult withCreatedTimestamp(java.util.Date createdTimestamp) {
        setCreatedTimestamp(createdTimestamp);
        return this;
    }

    /**
     *

     * The map of arguments used to configure this DevEndpoint.
     *

     *

     * Valid arguments are:
     *

     *

     *

     *

     * "--enable-glue-datacatalog": ""
     *

     *

     *

     *

     * You can specify a version of Python support for development endpoints by using the Arguments
     * parameter in the CreateDevEndpoint or UpdateDevEndpoint APIs. If no arguments are
     * provided, the version defaults to Python 2.
     *

     *
     * @return The map of arguments used to configure this DevEndpoint.

     *

     *         Valid arguments are:
     *

     *

     *

     *

     *         "--enable-glue-datacatalog": ""
     *

     *

     *

     *

     *         You can specify a version of Python support for development endpoints by using the Arguments
     *         parameter in the CreateDevEndpoint or UpdateDevEndpoint APIs. If no arguments
     *         are provided, the version defaults to Python 2.
     */

    public java.util.Map<String, String> getArguments() {
        return arguments;
    }

    /**
     *

     * The map of arguments used to configure this DevEndpoint.
     *

     *

     * Valid arguments are:
     *

     *

     *

     *

     * "--enable-glue-datacatalog": ""
     *

     *

     *

     *

     * You can specify a version of Python support for development endpoints by using the Arguments
     * parameter in the CreateDevEndpoint or UpdateDevEndpoint APIs. If no arguments are
     * provided, the version defaults to Python 2.
     *

     *
     * @param arguments
     *        The map of arguments used to configure this DevEndpoint.

     *

     *        Valid arguments are:
     *

     *

     *

     *

     *        "--enable-glue-datacatalog": ""
     *

     *

     *

     *

     *        You can specify a version of Python support for development endpoints by using the Arguments
     *        parameter in the CreateDevEndpoint or UpdateDevEndpoint APIs. If no arguments
     *        are provided, the version defaults to Python 2.
     */

    public void setArguments(java.util.Map<String, String> arguments) {
        this.arguments = arguments;
    }

    /**
     *

     * The map of arguments used to configure this DevEndpoint.
     *

     *

     * Valid arguments are:
     *

     *

     *

     *

     * "--enable-glue-datacatalog": ""
     *

     *

     *

     *

     * You can specify a version of Python support for development endpoints by using the Arguments
     * parameter in the CreateDevEndpoint or UpdateDevEndpoint APIs. If no arguments are
     * provided, the version defaults to Python 2.
     *

     *
     * @param arguments
     *        The map of arguments used to configure this DevEndpoint.

     *

     *        Valid arguments are:
     *

     *

     *

     *

     *        "--enable-glue-datacatalog": ""
     *

     *

     *

     *

     *        You can specify a version of Python support for development endpoints by using the Arguments
     *        parameter in the CreateDevEndpoint or UpdateDevEndpoint APIs. If no arguments
     *        are provided, the version defaults to Python 2.
     * @return Returns a reference to this object so that method calls can be chained together.
     */

    public CreateDevEndpointResult withArguments(java.util.Map<String, String> arguments) {
        setArguments(arguments);
        return this;
    }

    /**
     * Add a single Arguments entry
     *
     * @see CreateDevEndpointResult#withArguments
     * @returns a reference to this object so that method calls can be chained together.
     */

    public CreateDevEndpointResult addArgumentsEntry(String key, String value) {
        if (null == this.arguments) {
            this.arguments = new java.util.HashMap<String, String>();
        }
        if (this.arguments.containsKey(key))
            throw new IllegalArgumentException("Duplicated keys (" + key.toString() + ") are provided.");
        this.arguments.put(key, value);
        return this;
    }

    /**
     * Removes all the entries added into Arguments.
     *
     * @return Returns a reference to this object so that method calls can be chained together.
     */

    public CreateDevEndpointResult clearArgumentsEntries() {
        this.arguments = null;
        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 (getEndpointName() != null)
            sb.append("EndpointName: ").append(getEndpointName()).append(",");
        if (getStatus() != null)
            sb.append("Status: ").append(getStatus()).append(",");
        if (getSecurityGroupIds() != null)
            sb.append("SecurityGroupIds: ").append(getSecurityGroupIds()).append(",");
        if (getSubnetId() != null)
            sb.append("SubnetId: ").append(getSubnetId()).append(",");
        if (getRoleArn() != null)
            sb.append("RoleArn: ").append(getRoleArn()).append(",");
        if (getYarnEndpointAddress() != null)
            sb.append("YarnEndpointAddress: ").append(getYarnEndpointAddress()).append(",");
        if (getZeppelinRemoteSparkInterpreterPort() != null)
            sb.append("ZeppelinRemoteSparkInterpreterPort: ").append(getZeppelinRemoteSparkInterpreterPort()).append(",");
        if (getNumberOfNodes() != null)
            sb.append("NumberOfNodes: ").append(getNumberOfNodes()).append(",");
        if (getWorkerType() != null)
            sb.append("WorkerType: ").append(getWorkerType()).append(",");
        if (getGlueVersion() != null)
            sb.append("GlueVersion: ").append(getGlueVersion()).append(",");
        if (getNumberOfWorkers() != null)
            sb.append("NumberOfWorkers: ").append(getNumberOfWorkers()).append(",");
        if (getAvailabilityZone() != null)
            sb.append("AvailabilityZone: ").append(getAvailabilityZone()).append(",");
        if (getVpcId() != null)
            sb.append("VpcId: ").append(getVpcId()).append(",");
        if (getExtraPythonLibsS3Path() != null)
            sb.append("ExtraPythonLibsS3Path: ").append(getExtraPythonLibsS3Path()).append(",");
        if (getExtraJarsS3Path() != null)
            sb.append("ExtraJarsS3Path: ").append(getExtraJarsS3Path()).append(",");
        if (getFailureReason() != null)
            sb.append("FailureReason: ").append(getFailureReason()).append(",");
        if (getSecurityConfiguration() != null)
            sb.append("SecurityConfiguration: ").append(getSecurityConfiguration()).append(",");
        if (getCreatedTimestamp() != null)
            sb.append("CreatedTimestamp: ").append(getCreatedTimestamp()).append(",");
        if (getArguments() != null)
            sb.append("Arguments: ").append(getArguments());
        sb.append("}");
        return sb.toString();
    }

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

        if (obj instanceof CreateDevEndpointResult == false)
            return false;
        CreateDevEndpointResult other = (CreateDevEndpointResult) obj;
        if (other.getEndpointName() == null ^ this.getEndpointName() == null)
            return false;
        if (other.getEndpointName() != null && other.getEndpointName().equals(this.getEndpointName()) == false)
            return false;
        if (other.getStatus() == null ^ this.getStatus() == null)
            return false;
        if (other.getStatus() != null && other.getStatus().equals(this.getStatus()) == false)
            return false;
        if (other.getSecurityGroupIds() == null ^ this.getSecurityGroupIds() == null)
            return false;
        if (other.getSecurityGroupIds() != null && other.getSecurityGroupIds().equals(this.getSecurityGroupIds()) == false)
            return false;
        if (other.getSubnetId() == null ^ this.getSubnetId() == null)
            return false;
        if (other.getSubnetId() != null && other.getSubnetId().equals(this.getSubnetId()) == false)
            return false;
        if (other.getRoleArn() == null ^ this.getRoleArn() == null)
            return false;
        if (other.getRoleArn() != null && other.getRoleArn().equals(this.getRoleArn()) == false)
            return false;
        if (other.getYarnEndpointAddress() == null ^ this.getYarnEndpointAddress() == null)
            return false;
        if (other.getYarnEndpointAddress() != null && other.getYarnEndpointAddress().equals(this.getYarnEndpointAddress()) == false)
            return false;
        if (other.getZeppelinRemoteSparkInterpreterPort() == null ^ this.getZeppelinRemoteSparkInterpreterPort() == null)
            return false;
        if (other.getZeppelinRemoteSparkInterpreterPort() != null
                && other.getZeppelinRemoteSparkInterpreterPort().equals(this.getZeppelinRemoteSparkInterpreterPort()) == false)
            return false;
        if (other.getNumberOfNodes() == null ^ this.getNumberOfNodes() == null)
            return false;
        if (other.getNumberOfNodes() != null && other.getNumberOfNodes().equals(this.getNumberOfNodes()) == false)
            return false;
        if (other.getWorkerType() == null ^ this.getWorkerType() == null)
            return false;
        if (other.getWorkerType() != null && other.getWorkerType().equals(this.getWorkerType()) == false)
            return false;
        if (other.getGlueVersion() == null ^ this.getGlueVersion() == null)
            return false;
        if (other.getGlueVersion() != null && other.getGlueVersion().equals(this.getGlueVersion()) == false)
            return false;
        if (other.getNumberOfWorkers() == null ^ this.getNumberOfWorkers() == null)
            return false;
        if (other.getNumberOfWorkers() != null && other.getNumberOfWorkers().equals(this.getNumberOfWorkers()) == false)
            return false;
        if (other.getAvailabilityZone() == null ^ this.getAvailabilityZone() == null)
            return false;
        if (other.getAvailabilityZone() != null && other.getAvailabilityZone().equals(this.getAvailabilityZone()) == false)
            return false;
        if (other.getVpcId() == null ^ this.getVpcId() == null)
            return false;
        if (other.getVpcId() != null && other.getVpcId().equals(this.getVpcId()) == false)
            return false;
        if (other.getExtraPythonLibsS3Path() == null ^ this.getExtraPythonLibsS3Path() == null)
            return false;
        if (other.getExtraPythonLibsS3Path() != null && other.getExtraPythonLibsS3Path().equals(this.getExtraPythonLibsS3Path()) == false)
            return false;
        if (other.getExtraJarsS3Path() == null ^ this.getExtraJarsS3Path() == null)
            return false;
        if (other.getExtraJarsS3Path() != null && other.getExtraJarsS3Path().equals(this.getExtraJarsS3Path()) == false)
            return false;
        if (other.getFailureReason() == null ^ this.getFailureReason() == null)
            return false;
        if (other.getFailureReason() != null && other.getFailureReason().equals(this.getFailureReason()) == false)
            return false;
        if (other.getSecurityConfiguration() == null ^ this.getSecurityConfiguration() == null)
            return false;
        if (other.getSecurityConfiguration() != null && other.getSecurityConfiguration().equals(this.getSecurityConfiguration()) == false)
            return false;
        if (other.getCreatedTimestamp() == null ^ this.getCreatedTimestamp() == null)
            return false;
        if (other.getCreatedTimestamp() != null && other.getCreatedTimestamp().equals(this.getCreatedTimestamp()) == false)
            return false;
        if (other.getArguments() == null ^ this.getArguments() == null)
            return false;
        if (other.getArguments() != null && other.getArguments().equals(this.getArguments()) == false)
            return false;
        return true;
    }

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

        hashCode = prime * hashCode + ((getEndpointName() == null) ? 0 : getEndpointName().hashCode());
        hashCode = prime * hashCode + ((getStatus() == null) ? 0 : getStatus().hashCode());
        hashCode = prime * hashCode + ((getSecurityGroupIds() == null) ? 0 : getSecurityGroupIds().hashCode());
        hashCode = prime * hashCode + ((getSubnetId() == null) ? 0 : getSubnetId().hashCode());
        hashCode = prime * hashCode + ((getRoleArn() == null) ? 0 : getRoleArn().hashCode());
        hashCode = prime * hashCode + ((getYarnEndpointAddress() == null) ? 0 : getYarnEndpointAddress().hashCode());
        hashCode = prime * hashCode + ((getZeppelinRemoteSparkInterpreterPort() == null) ? 0 : getZeppelinRemoteSparkInterpreterPort().hashCode());
        hashCode = prime * hashCode + ((getNumberOfNodes() == null) ? 0 : getNumberOfNodes().hashCode());
        hashCode = prime * hashCode + ((getWorkerType() == null) ? 0 : getWorkerType().hashCode());
        hashCode = prime * hashCode + ((getGlueVersion() == null) ? 0 : getGlueVersion().hashCode());
        hashCode = prime * hashCode + ((getNumberOfWorkers() == null) ? 0 : getNumberOfWorkers().hashCode());
        hashCode = prime * hashCode + ((getAvailabilityZone() == null) ? 0 : getAvailabilityZone().hashCode());
        hashCode = prime * hashCode + ((getVpcId() == null) ? 0 : getVpcId().hashCode());
        hashCode = prime * hashCode + ((getExtraPythonLibsS3Path() == null) ? 0 : getExtraPythonLibsS3Path().hashCode());
        hashCode = prime * hashCode + ((getExtraJarsS3Path() == null) ? 0 : getExtraJarsS3Path().hashCode());
        hashCode = prime * hashCode + ((getFailureReason() == null) ? 0 : getFailureReason().hashCode());
        hashCode = prime * hashCode + ((getSecurityConfiguration() == null) ? 0 : getSecurityConfiguration().hashCode());
        hashCode = prime * hashCode + ((getCreatedTimestamp() == null) ? 0 : getCreatedTimestamp().hashCode());
        hashCode = prime * hashCode + ((getArguments() == null) ? 0 : getArguments().hashCode());
        return hashCode;
    }

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

}


text:
<?php
require_once 'conf/smarty-conf.php';
include 'functions/invester_functions.php';
include 'functions/job_functions.php';
include 'functions/upload_functions.php';
require 'libs/class.phpmailer.php';
include 'functions/advertisement_functions.php';

if ($_REQUEST['job']=="save_job"){

	$ref_no=get_job_ref_no();

	//get the original name of the file from the clients machine
	$filename = stripslashes ($_FILES['detail'] ['name']);
	//get the extension of the file in a lower case format
	$extension = getExtension ($filename);
	$extension = strtolower ($extension);

	$file_name=$ref_no.'.'.$extension;
	$newname="upload/".$file_name;
	$copied = copy($_FILES['detail']['tmp_name'],$newname);

	$_SESSION['job_title']=$job_title=$_POST['job_title'];
	$_SESSION['catagory']=$catagory=$_POST['catagory'];
	$_SESSION['closing_date']=$closing_date=$_POST['closing_date'];
	$_SESSION['company_name']=$company_name=$_POST['company_name'];
	$_SESSION['contact_mail_id']=$contact_mail_id=$_POST['contact_mail_id'];
	$detail=$newname;
	$main_catagory=$_POST['main_catagory'];
	$keywords=$_POST['keywords'];
	$timing=$_POST['timing'];
	$detail_text=$_POST['detail_text'];

	save_job_non_member($job_title, $detail, $detail_text, $catagory, $closing_date, $ref_no, $company_name, $contact_mail_id, $main_catagory, $keywords, $timing);
	waiting_job($ref_no);
	$mail = new PHPMailer();

	$mail = new PHPMailer();

	$mail->IsSMTP();                                      // set mailer to use SMTP
	$mail->Host = "mail.imperialjobhub.com";                 // specify main and backup server
	$mail->SMTPAuth = true;                             // turn on SMTP authentication
	$mail->Username = "noreply+imperialjobhub.com";         // SMTP username
	$mail->Password = "noreply2016";                    // SMTP password

	$mail->From = "noreply@imperialjobhub.com";
	$mail->FromName = "$job_title Need an Approval.";
	$mail->AddAddress("$contact_mail_id", "$name");
	//$mail->AddAddress("ellen@example.com");                  // name is optional
	$mail->AddReplyTo("", "Information");

	$mail->WordWrap = 50;                                    // set word wrap to 50 characters
	//$mail->AddAttachment("$newname");        				// add attachments
	//$mail->AddAttachment("/tmp/image.jpg", "new.jpg");   // optional name
	$mail->IsHTML(true);                                  // set email format to HTML

	$mail->Subject = "Application For $job_title";
	$mail->Body    = "Dear Employer,

	Thank you for using imperialjobhub.com to post your vacancy. To display the job in our website please follow the below steps,

	Step 1 : Choose the option for duration of display of your vacancy.

	Option 1:             To display for 14 days (2 Weeks)               3,500/- (Three Thousand Five Hundred)

	Option 2:             To display for 30 days (4 Weeks)               5,000/- (Five Thousand)  - 30% off

	Step 2 : Make the payment to the following bank as per your choice in Step 1,

	Account Name            :ICBS Group of Companies

	Bank                    :Commercial Bank, Kollupitiya, Colombo 03

	Bank A/C No             :1108569701

	Step 3 : Upon completion of your payment, please call or send a SMS to our administrator in the following numbers for quick activation. In the event if you do not call or SMS your activation will be delayed.

	Contact No                 : +94 75 024 72 45 or +94 77 22 41 925";

	$mail->AltBody = "Dear Employer,
	Thank you for using imperialjobhub.com to post your vacancy. To display the job in our website please follow the below steps,
	Step 1 : Choose the option for duration of display of your vacancy.
	Option 1:             To display for 14 days (2 Weeks)               3,500/- (Three Thousand Five Hundred)
	Option 2:             To display for 30 days (4 Weeks)               5,000/- (Five Thousand)  - 30% off
	Step 2 : Make the payment to the following bank as per your choice in Step 1,
	Account Name            :ICBS Group of Companies
	Bank                    :Commercial Bank, Kollupitiya, Colombo 03
	Bank A/C No             :1108569701
	Step 3 : Upon completion of your payment, please call or send a SMS to our administrator in the following numbers for quick activation. In the event if you do not call or SMS your activation will be delayed.
	Contact No                 : +94 75 024 72 45 or +94 77 22 41 925";

	if(!$mail->Send()){
		exit;
	}

	$smarty->assign('error',"Job needed an approval, for approval details check your mail.");
	$smarty->assign('page',"Post Job");
	$smarty->assign('user_name', $_SESSION['user_name']);
	$smarty->display('job/non_member_post_job.tpl');
}

else{
	$smarty->assign('page',"Post Job");
	$smarty->assign('user_name', $_SESSION['user_name']);
	$smarty->display('job/non_member_post_job.tpl');
}


text:
import { Component } from '@angular/core';
import {FormBuilder, ValidatorFn, Validators} from '@angular/forms';
import { PropertyInputBase } from './property-input-base';

@Component({
    selector: 'float-input',
    templateUrl: './float-input.component.html',
})
export class ConfigurationPropertyFloatInputComponent  extends PropertyInputBase {
    constructor(formBuilder: FormBuilder) {
        super(formBuilder);
    }

    public getErrorMessage() {
        return this.formValue.hasError('required') ? 'You must enter a value' :
            this.formValue.hasError('min') ? 'Value must be greater than ' + this._definition.validationDefinition.min :
            this.formValue.hasError('max') ? 'Value must be less than ' + this._definition.validationDefinition.max :
                '';
    }

    protected getValidators() {
        const validators = new Array<ValidatorFn>();
        if (this._definition.validationDefinition.isRequired) {
            validators.push(Validators.required);
        }
        const min = this._definition.validationDefinition.min;
        if (min || min === 0) {
            validators.push(Validators.min(min as number));
        }
        const max = this._definition.validationDefinition.max;
        if (max || max === 0) {
            validators.push(Validators.max(max as number));
        }
        return validators;
    }
}


text:
using System.Reflection;

namespace UnityEditor.ShaderGraph
{
    [Title("Math", "Advanced", "Modulo")]
    class ModuloNode : CodeFunctionNode
    {
        public ModuloNode()
        {
            name = "Modulo";
        }

        protected override MethodInfo GetFunctionToConvert()
        {
            return GetType().GetMethod("Unity_Modulo", BindingFlags.Static | BindingFlags.NonPublic);
        }

        static string Unity_Modulo(
            [Slot(0, Binding.None, 0, 0, 0, 0)] DynamicDimensionVector A,
            [Slot(1, Binding.None, 1, 1, 1, 1)] DynamicDimensionVector B,
            [Slot(2, Binding.None)] out DynamicDimensionVector Out)
        {
            return
                @"
{
    Out = fmod(A, B);
}
";
        }
    }
}


text:
ACCEPTED

#### According to
The Catalogue of Life, 3rd January 2011

#### Published in
null

#### Original name
Magnolia cacuminicola Bisse

### Remarks
null


text:
package com.jameswald.skinnylatte.common.base;

import static com.jameswald.skinnylatte.common.base.Preconditions.checkNotNull;

import java.io.Serializable;

public abstract class Optional<T> implements Serializable {
  public static <T> Optional<T> absent() {
    return Absent.withType();
  }

  public static <T> Optional<T> of(T reference) {
    return new Present<T>(checkNotNull(reference));
  }

  public static <T> Optional<T> fromNullable(T nullableReference) {
    return (nullableReference == null)
        ? Optional.<T>absent()
        : new Present<T>(nullableReference);
  }

  Optional() {}

  public abstract boolean isPresent();

  public abstract T get();

  public abstract T or(T defaultValue);

  public abstract Optional<T> or(Optional<? extends T> secondChoice);

  public abstract T or(Supplier<? extends T> supplier);

  @Override
  public abstract boolean equals(Object object);

  @Override
  public abstract int hashCode();

  @Override
  public abstract String toString();

  private static final long serialVersionUID = 0;
}


text:
<?php

namespace CollectionTypeTest;

use Fake\Collection\CollectionSet\SetAbstractFake;

class SetAbstractForObjectTest extends \PHPUnit_Framework_TestCase
{
    /** @var \Fake\Collection\CollectionSet\SetAbstractFake $set */
    private $set;

    private $dummyType;

    private $objectA;

    private $objectB;

    private $objectC;

    private $objectD;

    private $objectE;

    public function setUp()
    {
        $this->dummyType = $this->prophesize('CollectionType\TypeValidator\ObjectTypeValidator');
        $this->dummyType->willImplement('CollectionType\TypeValidator\TypeValidatorInterface');

        $this->set = new SetAbstractFake($this->dummyType->reveal());

        $this->objectA = new \stdClass();
        $this->objectA->param = 'A';
        $this->objectB = new \stdClass();
        $this->objectB->param = 'B';
        $this->objectC = new \stdClass();
        $this->objectC->param = 'C';
        $this->objectD = new \stdClass();
        $this->objectD->param = 'D';
        $this->objectE = new \stdClass();
        $this->objectE->param = 'E';
    }

    public function tearDown()
    {
        $this->set = null;
        $this->dummyType = null;
    }

    /**
     * @covers       CollectionType\Collection\CollectionSet\SetAbstract::add
     * @covers       CollectionType\Collection\CollectionSet\SetAbstract::__construct
     */
    public function testAddForUnrepeatableValues()
    {
        $this->dummyType->isValid($this->objectA)->willReturn(true);
        $resultA = $this->set->add($this->objectA);

        $this->dummyType->isValid($this->objectB)->willReturn(true);
        $resultB = $this->set->add($this->objectB);

        $this->dummyType->isValid($this->objectC)->willReturn(true);
        $resultC = $this->set->add($this->objectC);

        $this->assertTrue($resultA && $resultB && $resultC);
    }

    /**
     * @covers       CollectionType\Collection\CollectionSet\SetAbstract::add
     * @covers       CollectionType\Collection\CollectionSet\SetAbstract::__construct
     */
    public function testAddForRepeatableValues()
    {
        $this->dummyType->isValid($this->objectA)->willReturn(true);
        $this->set->add($this->objectA);

        $this->dummyType->isValid($this->objectA)->willReturn(true);
        $result = $this->set->add($this->objectA);

        $this->assertFalse($result);
    }

    /**
     * @covers       CollectionType\Collection\CollectionSet\SetAbstract::addAll
     * @covers       CollectionType\Common\Util\UtilTrait::diffArrays
     */
    public function testAddAllForDifferentValues()
    {
        $aa = new \stdClass();
        $aa->param = 'A';

        $addedCollection = clone $this->set;

        $this->dummyType->isValid($this->objectA)->willReturn(true);
        $this->set->add($this->objectA);
        $this->dummyType->isValid($this->objectB)->willReturn(true);
        $this->set->add($this->objectB);
        $this->dummyType->isValid($this->objectC)->willReturn(true);
        $this->set->add($this->objectC);

        $this->dummyType->isValid($aa)->willReturn(true);
        $addedCollection->add($aa);
        $this->dummyType->isValid($this->objectA)->willReturn(true);
        $addedCollection->add($this->objectA);
        $this->dummyType->isValid($this->objectD)->willReturn(true);
        $addedCollection->add($this->objectD);
        $this->dummyType->isValid($this->objectE)->willReturn(true);
        $addedCollection->add($this->objectE);

        $this->set->addAll($addedCollection);

        $this->assertEquals([$this->objectA, $this->objectB, $this->objectC, $aa, $this->objectD, $this->objectE],
            $this->set->getAll());
    }
}


text:
package org.hl7.v3;

import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlType;

/**
 * Note: because this type is defined as an extension of SXCM_T,
 *             all of the attributes and elements accepted for T are also
 *             accepted by this definition.  However, they are NOT allowed
 *             by the normative description of this type.  Unfortunately,
 *             we cannot write a general purpose schematron contraints to
 *             provide that extra validation, thus applications must be
 *             aware that instance (fragments) that pass validation with
 *             this might might still not be legal.
 *
 *
Java class for EIVL_TS complex type.
 *
 *
The following schema fragment specifies the expected content contained within this class.
 *
 *

 * <complexType name="EIVL_TS">
 *   <complexContent>
 *     <extension base="{urn:hl7-org:v3}SXCM_TS">
 *       <sequence>
 *         <element name="event" type="{urn:hl7-org:v3}EIVL.event" minOccurs="0"/>
 *         <element name="offset" type="{urn:hl7-org:v3}IVL_PQ" minOccurs="0"/>
 *       </sequence>
 *     </extension>
 *   </complexContent>
 * </complexType>
 *

 *
 *
 */
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "EIVL_TS", propOrder = {
    "event",
    "offset"
})
public class EIVLTS
    extends SXCMTS
{

    protected EIVLEvent event;
    protected IVLPQ offset;

    /**
     * Gets the value of the event property.
     *
     * @return
     *     possible object is
     *     {@link EIVLEvent }
     *
     */
    public EIVLEvent getEvent() {
        return event;
    }

    /**
     * Sets the value of the event property.
     *
     * @param value
     *     allowed object is
     *     {@link EIVLEvent }
     *
     */
    public void setEvent(EIVLEvent value) {
        this.event = value;
    }

    /**
     * Gets the value of the offset property.
     *
     * @return
     *     possible object is
     *     {@link IVLPQ }
     *
     */
    public IVLPQ getOffset() {
        return offset;
    }

    /**
     * Sets the value of the offset property.
     *
     * @param value
     *     allowed object is
     *     {@link IVLPQ }
     *
     */
    public void setOffset(IVLPQ value) {
        this.offset = value;
    }

}


text:
<?xml version="1.0" encoding="utf-8"?>
<keyboard label="@string/qwerty_rus" keyTextSize="23sp" popupTextSize="37.5sp" topIconYOffset="1.67dp" upperCaseKeyTextYOffset="4dp" keyTextYOffset="1.67dp" topLabelTextSize="14.5dp" topLabelTextXOffset="-1.34dp" topLabelTextYOffset="3.5dp" previewTopLevel="false" keyboardPadding="0dp,0.67dp,0dp,0dp">
    <include xml="@xml/row_rus1" />
    <row width="36dp" height="44.5dp">
        <key codes="0x0444" label="ф" leftEdge="true" topLabel="~" popupCharacters="@string/alternates_for_tilde" accentType="3" alignIndex="0" />
        <key codes="0x044B" label="ы" topLabel="`" popupCharacters="@string/alternates_for_graveaccent" accentType="3" alignIndex="0" />
        <key codes="0x0432" label="в" topLabel="\@" popupCharacters="@string/alternates_for_at" accentType="3" alignIndex="0" />
        <key codes="0x0430" label="а" topLabel="\#" popupCharacters="@string/alternates_for_number" accentType="3" alignIndex="0" />
        <key codes="0x043F" label="п" topLabel="$" popupCharacters="@string/alternates_for_dollar" accentType="3" alignIndex="0" />
        <key codes="0x0440" label="р" topLabel="%" popupCharacters="@string/alternates_for_percent" accentType="3" alignIndex="0" />
        <key codes="0x043E" label="о" topLabel="&" popupCharacters="@string/alternates_for_ampersand" accentType="3" alignIndex="1" />
        <key codes="0x043B" label="л" topLabel="+" popupCharacters="@string/alternates_for_plus" accentType="3" alignIndex="0" />
        <key codes="0x0434" label="д" topLabel="=" popupCharacters="@string/alternates_label_equal" accentType="3" alignIndex="4" />
        <key codes="0x0436" label="ж" topLabel="/" rightEdge="true" popupCharacters="@string/alternates_for_slash" accentType="3" alignIndex="0" />
    </row>
    <include xml="@xml/row_rus3" />
    <row width="38dp" height="44.67dp">
        <key codes="-1" width="47dp" modifier="true" sticky="true" function="true" leftEdge="true" icon="@drawable/key_icon_shift_toggle" showPreview="false" />
        <key codes="0x0451" label="ё" />
        <key codes="0x0021" label="!" />
        <key codes="0x003F" label="\?" />
        <key codes="0x002D" label="-" />
        <key codes="0x044D" label="э" />
        <key codes="0x0445" label="х" />
        <key codes="0x044A" label="ъ" />
        <key codes="0x0008" width="47dp" function="true" rightEdge="true" repeatable="true" icon="@drawable/htc_sense_input_icon_backspace_dark" showPreview="false" />
    </row>
    <include xml="@xml/row_rus5" />
    <customize cust_dpad="true">
        <include xml="@xml/row_arrow" />
    </customize>
</keyboard>


text:
package com.codingchili.halloween.model;

import java.io.Serializable;

/**
 * @author Robin Duda
 *
 * @version 1.0
 * @date 2014-10-26
 *
 *       Model.TurnTimer: Keep track of turn lengths, awards bonus points for
 *       quick draws.
 */

public class TurnTimer implements Serializable {
	private int reset;
	private int left;
	private int bonus;
	private boolean enabled;

	/***
	 * @param reset
	 *            Time to set to when the timer is reset.
	 * @param bonusPerSecond
	 *            bonus score to add per second left.
	 */
	public TurnTimer(int reset, int bonusPerSecond) {
		this.bonus = bonusPerSecond;
		this.reset = reset;
		this.enabled = true;
	}

	/*** reset the timer value. */
	public void reset() {
		left = reset;
	}

	/***
	 * get time left
	 *
	 * @return returns the time left in frames. (1s = 60 at 60fps)
	 */
	public int getLeft() {
		return left;
	}

	/*** stop the timer, called when the game is paused */
	public void stop() {
		enabled = false;
	}

	/*** start the timer, called when the game is unpaused */
	public void start() {
		enabled = true;
	}

	/*** timer.enabled != enabled. */
	public void toggleEnabled() {
		enabled = !enabled;
	}

	/*** @return the time which the timer is set to on reset. (in frames) */
	public int getReset() {
		return reset;
	}

	/*** this method will modify the time left of the timer. */
	public void Process() {
		if (enabled && left > 0) {
			left--;
		}
	}

	/***
	 * @return the amount of bonus points the player earned depending on
	 *         bonusPerSecondLeft and the remaining time.
	 */
	public int getBonus() {
		return Math.round((left / 60 * bonus));
	}

	private static final long serialVersionUID = 1L;
}


text:
var parent = require('../../actual/symbol/for');

module.exports = parent;


text:
use cratesfyi::utils::extract_head_and_body;
use criterion::{black_box, criterion_group, criterion_main, Criterion};

pub fn criterion_benchmark(c: &mut Criterion) {
    let html = std::fs::read_to_string("benches/struct.CaptureMatches.html").unwrap();
    c.bench_function("parse regex html", |b| {
        b.iter(|| extract_head_and_body(black_box(&html)))
    });
}

criterion_group!(benches, criterion_benchmark);
criterion_main!(benches);


text:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
<title>ChineseMorphologicalAnalyzer(Chen): source/include/boost/type_traits/is_class.hpp Source File</title>
<link href="doxygen.css" rel="stylesheet" type="text/css">
<link href="tabs.css" rel="stylesheet" type="text/css">

Main Page

Namespaces

Classes

Files

source/include/boost/type_traits/is_class.hpp

00001 //  (C) Copyright Dave Abrahams, Steve Cleary, Beman Dawes, Howard
00002 //  Hinnant & John Maddock 2000-2003.
00003 //  Use, modification and distribution are subject to the Boost Software License,
00004 //  Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
00005 //  http://www.boost.org/LICENSE_1_0.txt).
00006 //
00007 //  See http://www.boost.org/libs/type_traits for most recent version including documentation.
00008
00009
00010 #ifndef BOOST_TT_IS_CLASS_HPP_INCLUDED
00011 #define BOOST_TT_IS_CLASS_HPP_INCLUDED
00012
00013 #include "boost/type_traits/config.hpp"
00014 #   include "boost/type_traits/is_union.hpp"
00015 #   include "boost/type_traits/detail/ice_and.hpp"
00016 #   include "boost/type_traits/detail/ice_not.hpp"
00017
00018 #ifdef BOOST_TT_HAS_CONFORMING_IS_CLASS_IMPLEMENTATION
00019 #   include "boost/type_traits/detail/yes_no_type.hpp"
00020 #else
00021 #   include "boost/type_traits/is_scalar.hpp"
00022 #   include "boost/type_traits/is_array.hpp"
00023 #   include "boost/type_traits/is_reference.hpp"
00024 #   include "boost/type_traits/is_void.hpp"
00025 #   include "boost/type_traits/is_function.hpp"
00026 #endif
00027
00028 #ifdef __EDG_VERSION__
00029 #   include "boost/type_traits/remove_cv.hpp"
00030 #endif
00031
00032 // should be the last #include
00033 #include "boost/type_traits/detail/bool_trait_def.hpp"
00034
00035 namespace boost {
00036
00037 namespace detail {
00038
00039 #ifdef BOOST_TT_HAS_CONFORMING_IS_CLASS_IMPLEMENTATION
00040
00041 // This is actually the conforming implementation which works with
00042 // abstract classes.  However, enough compilers have trouble with
00043 // it that most will use the one in
00044 // boost/type_traits/object_traits.hpp. This implementation
00045 // actually works with VC7.0, but other interactions seem to fail
00046 // when we use it.
00047
00048 // is_class<> metafunction due to Paul Mensonides
00049 // (leavings@attbi.com). For more details:
00050 // http://groups.google.com/groups?hl=en&selm=000001c1cc83%24e154d5e0%247772e50c%40c161550a&rnum=1
00051 #if defined(__GNUC__)  && !defined(__EDG_VERSION__)
00052
00053 template <class U> ::boost::type_traits::yes_type is_class_tester(void(U::*)(void));
00054 template <class U> ::boost::type_traits::no_type is_class_tester(...);
00055
00056 template <typename T>
00057 struct is_class_impl
00058 {
00059
00060     BOOST_STATIC_CONSTANT(bool, value =
00061         (::boost::type_traits::ice_and<
00062             sizeof(is_class_tester<T>(0)) == sizeof(::boost::type_traits::yes_type),
00063             ::boost::type_traits::ice_not< ::boost::is_union<T>::value >::value
00064         >::value)
00065         );
00066 };
00067
00068 #else
00069
00070 template <typename T>
00071 struct is_class_impl
00072 {
00073     template <class U> static ::boost::type_traits::yes_type is_class_tester(void(U::*)(void));
00074     template <class U> static ::boost::type_traits::no_type is_class_tester(...);
00075
00076     BOOST_STATIC_CONSTANT(bool, value =
00077         (::boost::type_traits::ice_and<
00078             sizeof(is_class_tester<T>(0)) == sizeof(::boost::type_traits::yes_type),
00079             ::boost::type_traits::ice_not< ::boost::is_union<T>::value >::value
00080         >::value)
00081         );
00082 };
00083
00084 #endif
00085
00086 #else
00087
00088 template <typename T>
00089 struct is_class_impl
00090 {
00091 #   ifndef BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
00092     BOOST_STATIC_CONSTANT(bool, value =
00093     (::boost::type_traits::ice_and<
00094         ::boost::type_traits::ice_not< ::boost::is_union<T>::value >::value,
00095         ::boost::type_traits::ice_not< ::boost::is_scalar<T>::value >::value,
00096         ::boost::type_traits::ice_not< ::boost::is_array<T>::value >::value,
00097         ::boost::type_traits::ice_not< ::boost::is_reference<T>::value>::value,
00098         ::boost::type_traits::ice_not< ::boost::is_void<T>::value >::value,
00099         ::boost::type_traits::ice_not< ::boost::is_function<T>::value >::value
00100         >::value));
00101 #   else
00102     BOOST_STATIC_CONSTANT(bool, value =
00103     (::boost::type_traits::ice_and<
00104         ::boost::type_traits::ice_not< ::boost::is_union<T>::value >::value,
00105         ::boost::type_traits::ice_not< ::boost::is_scalar<T>::value >::value,
00106         ::boost::type_traits::ice_not< ::boost::is_array<T>::value >::value,
00107         ::boost::type_traits::ice_not< ::boost::is_reference<T>::value>::value,
00108         ::boost::type_traits::ice_not< ::boost::is_void<T>::value >::value
00109         >::value));
00110 #   endif
00111 };
00112
00113 # endif // BOOST_TT_HAS_CONFORMING_IS_CLASS_IMPLEMENTATION
00114
00115 } // namespace detail
00116
00117 # ifdef __EDG_VERSION__
00118 BOOST_TT_AUX_BOOL_TRAIT_DEF1(
00119     is_class,T, detail::is_class_impl<typename remove_cv<T>::type>::value)
00120 # else
00121 BOOST_TT_AUX_BOOL_TRAIT_DEF1(is_class,T,::boost::detail::is_class_impl<T>::value)
00122 # endif
00123
00124 } // namespace boost
00125
00126 #include "boost/type_traits/detail/bool_trait_undef.hpp"
00127
00128 #endif // BOOST_TT_IS_CLASS_HPP_INCLUDED

<address style="text-align: right;">Generated on Thu Apr 30 11:47:23 2009 for ChineseMorphologicalAnalyzer(Chen) by

 1.5.5 </address>


text:
package org.protorabbit.communicator;

import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.ElementType;
import java.lang.annotation.Target;

@Retention(RetentionPolicy.RUNTIME)
@Target(ElementType.TYPE)
public @interface Namespace {
    String value();
}


text:
#ifndef ASYLO_UTIL_STD_THREAD_H_
#define ASYLO_UTIL_STD_THREAD_H_

#include <cstdint>
#include <functional>
#include <thread>

#include "asylo/util/logging.h"

namespace asylo {

// Asylo-specific Thread class to be used in place of std::thread. Rather than
// depend on std::thread directly the Asylo runtime provides this class in order
// to support environments where std::thread is not the preferred thread API.
// It exposes a limited subset of std::thread API and can be extended if
// necessary.
// An executable can only have one implementation of asylo::Thread, to be used
// in all cases a thread needs to be launched.
class Thread {
 public:
  using Id = uint64_t;

  // Creates a joinable thread with a functor (std::function or function
  // pointer) and optional arguments.
  template <class Function, class... Args>
  explicit Thread(Function &&f, Args &&... args)
      : Thread(/*is_detached=*/false, f, args...) {}

  // Move constructor and assign operator.
  Thread(Thread &&other) noexcept = default;
  Thread &operator=(Thread &&other) = default;

  // Disallow copying.
  Thread(const Thread &other) = delete;
  Thread &operator=(const Thread &other) = delete;

  // Static method that starts a detached thread. Creates a thread without
  // returning externally visible Thread object. Allows execution to continue
  // independently of the caller thread. Any resources allocated by
  // StartDetached will be freed once the thread exits.
  template <class Function, class... Args>
  static void StartDetached(Function &&f, Args &&... args) {
    Thread(/*is_detached=*/true, f, args...);
  }

  ~Thread() { CHECK(!thread_.joinable()); }

  // Joins the thread, blocking the current thread until the thread identified
  // by *this finishes execution. Not applicable to detached threads, since
  // StartDetach method does not return Thread object.
  void Join() {
    CHECK_NE(std::this_thread::get_id(), thread_.get_id());
    thread_.join();
  }

  // Returns a unique id of the thread.
  Id get_id() const { return ConvertToId(thread_.get_id()); }

  // Returns the current thread's id (if called within asylo::Thread body,
  // this_thread_id() == get_id()).
  static Id this_thread_id() { return ConvertToId(std::this_thread::get_id()); }

 private:
  // Private constructor creates a joinable or detachable thread with a functor
  // and optional arguments. Used by public constructor and by StartDetached
  // factory method.
  template <class Function, class... Args>
  Thread(bool is_detached, Function &&f, Args &&... args)
      : thread_(
            std::bind(std::forward<Function>(f), std::forward<Args>(args)...)) {
    if (is_detached) {
      thread_.detach();
    }
  }

  static Id ConvertToId(std::thread::id id) {
    static_assert(sizeof(Id) == sizeof(id),
                  "Expected std::thread::id to be an 8 byte entity");
    return *reinterpret_cast<const Id *>(&id);
  }

  std::thread thread_;
};

}  // namespace asylo

#endif  // ASYLO_UTIL_STD_THREAD_H_


text:
{% extends 'bordered.html' %}
{% block content %}
    Some content we want to include somewhere
{% endblock %}


text:
OpenFarm::Application.configure do
  config.cache_classes = true
  config.eager_load = true
  config.consider_all_requests_local       = false
  config.action_controller.perform_caching = true
  config.serve_static_assets = false
  config.assets.js_compressor = :uglifier
  config.assets.compile = true
  config.assets.digest = true
  config.assets.version = '1.0'
  config.force_ssl = true
  config.log_level = :info
  config.action_mailer.smtp_settings = {  address:   'smtp.mandrillapp.com',
                                          port:      587,
                                          user_name: ENV['MANDRILL_USERNAME'],
                                          password:  ENV['MANDRILL_APIKEY'] }

  config.middleware.use ExceptionNotification::Rack,
    email: {
      email_prefix: '[OpenFarm Errors] ',
      sender_address: %{"notifier" <notifier@openfarm.cc>},
      exception_recipients: ENV['ALERTS'].to_s.split('|')
    },
    ignore_exceptions: ['Mongoid::Errors::DocumentNotFound',
                        'AbstractController::ActionNotFound',
                        'ActionController::RoutingError',
                        'ActionController::InvalidAuthenticityToken',
                        'ActionView::MissingTemplate']
  config.action_mailer.default_url_options = { host: 'openfarm.cc' }
  config.action_mailer.delivery_method = :smtp
  config.action_mailer.perform_deliveries = true
  config.action_mailer.raise_delivery_errors = false
  config.i18n.fallbacks = true
  config.active_support.deprecation = :notify
  config.log_formatter = ::Logger::Formatter.new
  options = { storage: :s3,
              s3_protocol: :https,
              path: '/:rails_env/media/:class/:attachment/:id.:extension',
              s3_credentials: { bucket: ENV['S3_BUCKET_NAME'],
                                s3_protocol: :https,
                                access_key_id: ENV['SERVER_S3_ACCESS_KEY'],
                                secret_access_key: ENV['SERVER_S3_SECRET_KEY'] } }

  Paperclip::Attachment.default_options.merge!(options)

end


text:
namespace Storage
{
    void MemoryTrunk::InitLOContainer()
    {
        LOIndex = 1; //! Note here
        LOCount = 0;
        LOCapacity = TrinityConfig::MaxLargeObjectCount;

        LOPtrs = new char*[LOCapacity];
        LOPreservedSizeArray = new int32_t[LOCapacity];
    }

    void MemoryTrunk::EnsureLOCapacity(int32_t count)
    {
        LOCapacity = TrinityConfig::MaxLargeObjectCount;
        while (count >= LOCapacity)
            LOCapacity += TrinityConfig::MaxLargeObjectCount;
    }

#pragma warning(push)
#pragma warning(disable:6385)
#pragma warning(disable:6386)
    void MemoryTrunk::ShrinkLOContainer()
    {
        if (LOCount > 0 && LOIndex > (LOCount + 1))
        {
            LOCapacity = TrinityConfig::MaxLargeObjectCount;
            while (LOCount >= LOCapacity)
                LOCapacity += TrinityConfig::MaxLargeObjectCount;

            char** new_LOPtrs = new char*[LOCapacity];
            int32_t* new_LOPreservedSizeArray = new int[LOCapacity];
            int32_t new_lo_index = 1;

            int32_t entry_count = hashtable->NonEmptyEntryCount;
            for (int32_t i = 0; i < entry_count; i++)
            {
                if (hashtable->CellEntries[i].location != -1)
                {
                    if (hashtable->CellEntries[i].offset < 0)
                    {
                        int32_t index = -hashtable->CellEntries[i].offset;
                        new_LOPtrs[new_lo_index] = LOPtrs[index];
                        new_LOPreservedSizeArray[new_lo_index] = LOPreservedSizeArray[index];
                        int32_t current_index = new_lo_index++;
                        hashtable->CellEntries[i].offset = -current_index;
                    }
                }
            }

            LOPtrs = new_LOPtrs;
            LOPreservedSizeArray = new_LOPreservedSizeArray;
        }
    }

    void MemoryTrunk::ResizeLOContainer()
    {
        LOCapacity = LOCapacity + TrinityConfig::MaxLargeObjectCount;
        char** new_LOPtrs = new char*[LOCapacity];
        int* new_LOPreservedSizeArray = new int[LOCapacity];
        for (int32_t i = 1; i < LOIndex; i++)
        {
            new_LOPtrs[i] = LOPtrs[i];
            new_LOPreservedSizeArray[i] = LOPreservedSizeArray[i];
        }

        LOPtrs = new_LOPtrs;
        LOPreservedSizeArray = new_LOPreservedSizeArray;
    }
#pragma warning(pop)

    void MemoryTrunk::DisposeLargeObjects()
    {
        for (int32_t i = 1; i < LOIndex; i++)
        {
            Memory::FreeMemoryRegion(LOPtrs[i], LOPreservedSizeArray[i]);
            LOPtrs[i] = nullptr;
            LOPreservedSizeArray[i] = 0;
        }

        if (LOPtrs != nullptr)
        {
            delete[] LOPtrs;
            LOPtrs = nullptr;
        }
        if (LOPreservedSizeArray != nullptr)
        {
            delete[] LOPreservedSizeArray;
            LOPreservedSizeArray = nullptr;
        }

        LOCount = 0;
        LOIndex = 1;
    }

    void MemoryTrunk::DisposeLargeObject(int32_t lo_index)
    {
        Memory::FreeMemoryRegion(LOPtrs[lo_index], LOPreservedSizeArray[lo_index]);
        LOPtrs[lo_index] = nullptr;
        LOPreservedSizeArray[lo_index] = 0;
        LOCount--;
    }
}