text:
#pragma once
#include <aws/glue/Glue_EXPORTS.h>
#include <aws/core/utils/memory/stl/AWSString.h>
#include <aws/core/utils/DateTime.h>
#include <aws/glue/model/StorageDescriptor.h>
#include <aws/core/utils/memory/stl/AWSVector.h>
#include <aws/core/utils/memory/stl/AWSMap.h>
#include <aws/glue/model/TableIdentifier.h>
#include <aws/glue/model/Column.h>
#include <utility>

namespace Aws
{
namespace Utils
{
namespace Json
{
  class JsonValue;
  class JsonView;
} // namespace Json
} // namespace Utils
namespace Glue
{
namespace Model
{

  /**
   *
Represents a collection of related data organized in columns and
   * rows.

See Also:
   AWS API
   * Reference

   */
  class AWS_GLUE_API Table
  {
  public:
    Table();
    Table(Aws::Utils::Json::JsonView jsonValue);
    Table& operator=(Aws::Utils::Json::JsonView jsonValue);
    Aws::Utils::Json::JsonValue Jsonize() const;

    /**
     *
The table name. For Hive compatibility, this must be entirely lowercase.

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

    /**
     *
The table name. For Hive compatibility, this must be entirely lowercase.

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

    /**
     *
The table name. For Hive compatibility, this must be entirely lowercase.

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

    /**
     *
The table name. For Hive compatibility, this must be entirely lowercase.

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

    /**
     *
The table name. For Hive compatibility, this must be entirely lowercase.

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

    /**
     *
The table name. For Hive compatibility, this must be entirely lowercase.

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

    /**
     *
The table name. For Hive compatibility, this must be entirely lowercase.

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

    /**
     *
The table name. For Hive compatibility, this must be entirely lowercase.

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

    /**
     *
The name of the database where the table metadata resides. For Hive
     * compatibility, this must be all lowercase.

     */
    inline const Aws::String& GetDatabaseName() const{ return m_databaseName; }

    /**
     *
The name of the database where the table metadata resides. For Hive
     * compatibility, this must be all lowercase.

     */
    inline bool DatabaseNameHasBeenSet() const { return m_databaseNameHasBeenSet; }

    /**
     *
The name of the database where the table metadata resides. For Hive
     * compatibility, this must be all lowercase.

     */
    inline void SetDatabaseName(const Aws::String& value) { m_databaseNameHasBeenSet = true; m_databaseName = value; }

    /**
     *
The name of the database where the table metadata resides. For Hive
     * compatibility, this must be all lowercase.

     */
    inline void SetDatabaseName(Aws::String&& value) { m_databaseNameHasBeenSet = true; m_databaseName = std::move(value); }

    /**
     *
The name of the database where the table metadata resides. For Hive
     * compatibility, this must be all lowercase.

     */
    inline void SetDatabaseName(const char* value) { m_databaseNameHasBeenSet = true; m_databaseName.assign(value); }

    /**
     *
The name of the database where the table metadata resides. For Hive
     * compatibility, this must be all lowercase.

     */
    inline Table& WithDatabaseName(const Aws::String& value) { SetDatabaseName(value); return *this;}

    /**
     *
The name of the database where the table metadata resides. For Hive
     * compatibility, this must be all lowercase.

     */
    inline Table& WithDatabaseName(Aws::String&& value) { SetDatabaseName(std::move(value)); return *this;}

    /**
     *
The name of the database where the table metadata resides. For Hive
     * compatibility, this must be all lowercase.

     */
    inline Table& WithDatabaseName(const char* value) { SetDatabaseName(value); return *this;}

    /**
     *
A description of the table.

     */
    inline const Aws::String& GetDescription() const{ return m_description; }

    /**
     *
A description of the table.

     */
    inline bool DescriptionHasBeenSet() const { return m_descriptionHasBeenSet; }

    /**
     *
A description of the table.

     */
    inline void SetDescription(const Aws::String& value) { m_descriptionHasBeenSet = true; m_description = value; }

    /**
     *
A description of the table.

     */
    inline void SetDescription(Aws::String&& value) { m_descriptionHasBeenSet = true; m_description = std::move(value); }

    /**
     *
A description of the table.

     */
    inline void SetDescription(const char* value) { m_descriptionHasBeenSet = true; m_description.assign(value); }

    /**
     *
A description of the table.

     */
    inline Table& WithDescription(const Aws::String& value) { SetDescription(value); return *this;}

    /**
     *
A description of the table.

     */
    inline Table& WithDescription(Aws::String&& value) { SetDescription(std::move(value)); return *this;}

    /**
     *
A description of the table.

     */
    inline Table& WithDescription(const char* value) { SetDescription(value); return *this;}

    /**
     *
The owner of the table.

     */
    inline const Aws::String& GetOwner() const{ return m_owner; }

    /**
     *
The owner of the table.

     */
    inline bool OwnerHasBeenSet() const { return m_ownerHasBeenSet; }

    /**
     *
The owner of the table.

     */
    inline void SetOwner(const Aws::String& value) { m_ownerHasBeenSet = true; m_owner = value; }

    /**
     *
The owner of the table.

     */
    inline void SetOwner(Aws::String&& value) { m_ownerHasBeenSet = true; m_owner = std::move(value); }

    /**
     *
The owner of the table.

     */
    inline void SetOwner(const char* value) { m_ownerHasBeenSet = true; m_owner.assign(value); }

    /**
     *
The owner of the table.

     */
    inline Table& WithOwner(const Aws::String& value) { SetOwner(value); return *this;}

    /**
     *
The owner of the table.

     */
    inline Table& WithOwner(Aws::String&& value) { SetOwner(std::move(value)); return *this;}

    /**
     *
The owner of the table.

     */
    inline Table& WithOwner(const char* value) { SetOwner(value); return *this;}

    /**
     *
The time when the table definition was created in the Data Catalog.

     */
    inline const Aws::Utils::DateTime& GetCreateTime() const{ return m_createTime; }

    /**
     *
The time when the table definition was created in the Data Catalog.

     */
    inline bool CreateTimeHasBeenSet() const { return m_createTimeHasBeenSet; }

    /**
     *
The time when the table definition was created in the Data Catalog.

     */
    inline void SetCreateTime(const Aws::Utils::DateTime& value) { m_createTimeHasBeenSet = true; m_createTime = value; }

    /**
     *
The time when the table definition was created in the Data Catalog.

     */
    inline void SetCreateTime(Aws::Utils::DateTime&& value) { m_createTimeHasBeenSet = true; m_createTime = std::move(value); }

    /**
     *
The time when the table definition was created in the Data Catalog.

     */
    inline Table& WithCreateTime(const Aws::Utils::DateTime& value) { SetCreateTime(value); return *this;}

    /**
     *
The time when the table definition was created in the Data Catalog.

     */
    inline Table& WithCreateTime(Aws::Utils::DateTime&& value) { SetCreateTime(std::move(value)); return *this;}

    /**
     *
The last time that the table was updated.

     */
    inline const Aws::Utils::DateTime& GetUpdateTime() const{ return m_updateTime; }

    /**
     *
The last time that the table was updated.

     */
    inline bool UpdateTimeHasBeenSet() const { return m_updateTimeHasBeenSet; }

    /**
     *
The last time that the table was updated.

     */
    inline void SetUpdateTime(const Aws::Utils::DateTime& value) { m_updateTimeHasBeenSet = true; m_updateTime = value; }

    /**
     *
The last time that the table was updated.

     */
    inline void SetUpdateTime(Aws::Utils::DateTime&& value) { m_updateTimeHasBeenSet = true; m_updateTime = std::move(value); }

    /**
     *
The last time that the table was updated.

     */
    inline Table& WithUpdateTime(const Aws::Utils::DateTime& value) { SetUpdateTime(value); return *this;}

    /**
     *
The last time that the table was updated.

     */
    inline Table& WithUpdateTime(Aws::Utils::DateTime&& value) { SetUpdateTime(std::move(value)); return *this;}

    /**
     *
The last time that the table was accessed. This is usually taken from HDFS,
     * and might not be reliable.

     */
    inline const Aws::Utils::DateTime& GetLastAccessTime() const{ return m_lastAccessTime; }

    /**
     *
The last time that the table was accessed. This is usually taken from HDFS,
     * and might not be reliable.

     */
    inline bool LastAccessTimeHasBeenSet() const { return m_lastAccessTimeHasBeenSet; }

    /**
     *
The last time that the table was accessed. This is usually taken from HDFS,
     * and might not be reliable.

     */
    inline void SetLastAccessTime(const Aws::Utils::DateTime& value) { m_lastAccessTimeHasBeenSet = true; m_lastAccessTime = value; }

    /**
     *
The last time that the table was accessed. This is usually taken from HDFS,
     * and might not be reliable.

     */
    inline void SetLastAccessTime(Aws::Utils::DateTime&& value) { m_lastAccessTimeHasBeenSet = true; m_lastAccessTime = std::move(value); }

    /**
     *
The last time that the table was accessed. This is usually taken from HDFS,
     * and might not be reliable.

     */
    inline Table& WithLastAccessTime(const Aws::Utils::DateTime& value) { SetLastAccessTime(value); return *this;}

    /**
     *
The last time that the table was accessed. This is usually taken from HDFS,
     * and might not be reliable.

     */
    inline Table& WithLastAccessTime(Aws::Utils::DateTime&& value) { SetLastAccessTime(std::move(value)); return *this;}

    /**
     *
The last time that column statistics were computed for this table.

     */
    inline const Aws::Utils::DateTime& GetLastAnalyzedTime() const{ return m_lastAnalyzedTime; }

    /**
     *
The last time that column statistics were computed for this table.

     */
    inline bool LastAnalyzedTimeHasBeenSet() const { return m_lastAnalyzedTimeHasBeenSet; }

    /**
     *
The last time that column statistics were computed for this table.

     */
    inline void SetLastAnalyzedTime(const Aws::Utils::DateTime& value) { m_lastAnalyzedTimeHasBeenSet = true; m_lastAnalyzedTime = value; }

    /**
     *
The last time that column statistics were computed for this table.

     */
    inline void SetLastAnalyzedTime(Aws::Utils::DateTime&& value) { m_lastAnalyzedTimeHasBeenSet = true; m_lastAnalyzedTime = std::move(value); }

    /**
     *
The last time that column statistics were computed for this table.

     */
    inline Table& WithLastAnalyzedTime(const Aws::Utils::DateTime& value) { SetLastAnalyzedTime(value); return *this;}

    /**
     *
The last time that column statistics were computed for this table.

     */
    inline Table& WithLastAnalyzedTime(Aws::Utils::DateTime&& value) { SetLastAnalyzedTime(std::move(value)); return *this;}

    /**
     *
The retention time for this table.

     */
    inline int GetRetention() const{ return m_retention; }

    /**
     *
The retention time for this table.

     */
    inline bool RetentionHasBeenSet() const { return m_retentionHasBeenSet; }

    /**
     *
The retention time for this table.

     */
    inline void SetRetention(int value) { m_retentionHasBeenSet = true; m_retention = value; }

    /**
     *
The retention time for this table.

     */
    inline Table& WithRetention(int value) { SetRetention(value); return *this;}

    /**
     *
A storage descriptor containing information about the physical storage of
     * this table.

     */
    inline const StorageDescriptor& GetStorageDescriptor() const{ return m_storageDescriptor; }

    /**
     *
A storage descriptor containing information about the physical storage of
     * this table.

     */
    inline bool StorageDescriptorHasBeenSet() const { return m_storageDescriptorHasBeenSet; }

    /**
     *
A storage descriptor containing information about the physical storage of
     * this table.

     */
    inline void SetStorageDescriptor(const StorageDescriptor& value) { m_storageDescriptorHasBeenSet = true; m_storageDescriptor = value; }

    /**
     *
A storage descriptor containing information about the physical storage of
     * this table.

     */
    inline void SetStorageDescriptor(StorageDescriptor&& value) { m_storageDescriptorHasBeenSet = true; m_storageDescriptor = std::move(value); }

    /**
     *
A storage descriptor containing information about the physical storage of
     * this table.

     */
    inline Table& WithStorageDescriptor(const StorageDescriptor& value) { SetStorageDescriptor(value); return *this;}

    /**
     *
A storage descriptor containing information about the physical storage of
     * this table.

     */
    inline Table& WithStorageDescriptor(StorageDescriptor&& value) { SetStorageDescriptor(std::move(value)); return *this;}

    /**
     *
A list of columns by which the table is partitioned. Only primitive types are
     * supported as partition keys.

When you create a table used by Amazon
     * Athena, and you do not specify any partitionKeys, you must at least
     * set the value of partitionKeys to an empty list. For example:

     *
 "PartitionKeys": []

     */
    inline const Aws::Vector<Column>& GetPartitionKeys() const{ return m_partitionKeys; }

    /**
     *
A list of columns by which the table is partitioned. Only primitive types are
     * supported as partition keys.

When you create a table used by Amazon
     * Athena, and you do not specify any partitionKeys, you must at least
     * set the value of partitionKeys to an empty list. For example:

     *
 "PartitionKeys": []

     */
    inline bool PartitionKeysHasBeenSet() const { return m_partitionKeysHasBeenSet; }

    /**
     *
A list of columns by which the table is partitioned. Only primitive types are
     * supported as partition keys.

When you create a table used by Amazon
     * Athena, and you do not specify any partitionKeys, you must at least
     * set the value of partitionKeys to an empty list. For example:

     *
 "PartitionKeys": []

     */
    inline void SetPartitionKeys(const Aws::Vector<Column>& value) { m_partitionKeysHasBeenSet = true; m_partitionKeys = value; }

    /**
     *
A list of columns by which the table is partitioned. Only primitive types are
     * supported as partition keys.

When you create a table used by Amazon
     * Athena, and you do not specify any partitionKeys, you must at least
     * set the value of partitionKeys to an empty list. For example:

     *
 "PartitionKeys": []

     */
    inline void SetPartitionKeys(Aws::Vector<Column>&& value) { m_partitionKeysHasBeenSet = true; m_partitionKeys = std::move(value); }

    /**
     *
A list of columns by which the table is partitioned. Only primitive types are
     * supported as partition keys.

When you create a table used by Amazon
     * Athena, and you do not specify any partitionKeys, you must at least
     * set the value of partitionKeys to an empty list. For example:

     *
 "PartitionKeys": []

     */
    inline Table& WithPartitionKeys(const Aws::Vector<Column>& value) { SetPartitionKeys(value); return *this;}

    /**
     *
A list of columns by which the table is partitioned. Only primitive types are
     * supported as partition keys.

When you create a table used by Amazon
     * Athena, and you do not specify any partitionKeys, you must at least
     * set the value of partitionKeys to an empty list. For example:

     *
 "PartitionKeys": []

     */
    inline Table& WithPartitionKeys(Aws::Vector<Column>&& value) { SetPartitionKeys(std::move(value)); return *this;}

    /**
     *
A list of columns by which the table is partitioned. Only primitive types are
     * supported as partition keys.

When you create a table used by Amazon
     * Athena, and you do not specify any partitionKeys, you must at least
     * set the value of partitionKeys to an empty list. For example:

     *
 "PartitionKeys": []

     */
    inline Table& AddPartitionKeys(const Column& value) { m_partitionKeysHasBeenSet = true; m_partitionKeys.push_back(value); return *this; }

    /**
     *
A list of columns by which the table is partitioned. Only primitive types are
     * supported as partition keys.

When you create a table used by Amazon
     * Athena, and you do not specify any partitionKeys, you must at least
     * set the value of partitionKeys to an empty list. For example:

     *
 "PartitionKeys": []

     */
    inline Table& AddPartitionKeys(Column&& value) { m_partitionKeysHasBeenSet = true; m_partitionKeys.push_back(std::move(value)); return *this; }

    /**
     *
If the table is a view, the original text of the view; otherwise
     * null.

     */
    inline const Aws::String& GetViewOriginalText() const{ return m_viewOriginalText; }

    /**
     *
If the table is a view, the original text of the view; otherwise
     * null.

     */
    inline bool ViewOriginalTextHasBeenSet() const { return m_viewOriginalTextHasBeenSet; }

    /**
     *
If the table is a view, the original text of the view; otherwise
     * null.

     */
    inline void SetViewOriginalText(const Aws::String& value) { m_viewOriginalTextHasBeenSet = true; m_viewOriginalText = value; }

    /**
     *
If the table is a view, the original text of the view; otherwise
     * null.

     */
    inline void SetViewOriginalText(Aws::String&& value) { m_viewOriginalTextHasBeenSet = true; m_viewOriginalText = std::move(value); }

    /**
     *
If the table is a view, the original text of the view; otherwise
     * null.

     */
    inline void SetViewOriginalText(const char* value) { m_viewOriginalTextHasBeenSet = true; m_viewOriginalText.assign(value); }

    /**
     *
If the table is a view, the original text of the view; otherwise
     * null.

     */
    inline Table& WithViewOriginalText(const Aws::String& value) { SetViewOriginalText(value); return *this;}

    /**
     *
If the table is a view, the original text of the view; otherwise
     * null.

     */
    inline Table& WithViewOriginalText(Aws::String&& value) { SetViewOriginalText(std::move(value)); return *this;}

    /**
     *
If the table is a view, the original text of the view; otherwise
     * null.

     */
    inline Table& WithViewOriginalText(const char* value) { SetViewOriginalText(value); return *this;}

    /**
     *
If the table is a view, the expanded text of the view; otherwise
     * null.

     */
    inline const Aws::String& GetViewExpandedText() const{ return m_viewExpandedText; }

    /**
     *
If the table is a view, the expanded text of the view; otherwise
     * null.

     */
    inline bool ViewExpandedTextHasBeenSet() const { return m_viewExpandedTextHasBeenSet; }

    /**
     *
If the table is a view, the expanded text of the view; otherwise
     * null.

     */
    inline void SetViewExpandedText(const Aws::String& value) { m_viewExpandedTextHasBeenSet = true; m_viewExpandedText = value; }

    /**
     *
If the table is a view, the expanded text of the view; otherwise
     * null.

     */
    inline void SetViewExpandedText(Aws::String&& value) { m_viewExpandedTextHasBeenSet = true; m_viewExpandedText = std::move(value); }

    /**
     *
If the table is a view, the expanded text of the view; otherwise
     * null.

     */
    inline void SetViewExpandedText(const char* value) { m_viewExpandedTextHasBeenSet = true; m_viewExpandedText.assign(value); }

    /**
     *
If the table is a view, the expanded text of the view; otherwise
     * null.

     */
    inline Table& WithViewExpandedText(const Aws::String& value) { SetViewExpandedText(value); return *this;}

    /**
     *
If the table is a view, the expanded text of the view; otherwise
     * null.

     */
    inline Table& WithViewExpandedText(Aws::String&& value) { SetViewExpandedText(std::move(value)); return *this;}

    /**
     *
If the table is a view, the expanded text of the view; otherwise
     * null.

     */
    inline Table& WithViewExpandedText(const char* value) { SetViewExpandedText(value); return *this;}

    /**
     *
The type of this table (EXTERNAL_TABLE,
     * VIRTUAL_VIEW, etc.).

     */
    inline const Aws::String& GetTableType() const{ return m_tableType; }

    /**
     *
The type of this table (EXTERNAL_TABLE,
     * VIRTUAL_VIEW, etc.).

     */
    inline bool TableTypeHasBeenSet() const { return m_tableTypeHasBeenSet; }

    /**
     *
The type of this table (EXTERNAL_TABLE,
     * VIRTUAL_VIEW, etc.).

     */
    inline void SetTableType(const Aws::String& value) { m_tableTypeHasBeenSet = true; m_tableType = value; }

    /**
     *
The type of this table (EXTERNAL_TABLE,
     * VIRTUAL_VIEW, etc.).

     */
    inline void SetTableType(Aws::String&& value) { m_tableTypeHasBeenSet = true; m_tableType = std::move(value); }

    /**
     *
The type of this table (EXTERNAL_TABLE,
     * VIRTUAL_VIEW, etc.).

     */
    inline void SetTableType(const char* value) { m_tableTypeHasBeenSet = true; m_tableType.assign(value); }

    /**
     *
The type of this table (EXTERNAL_TABLE,
     * VIRTUAL_VIEW, etc.).

     */
    inline Table& WithTableType(const Aws::String& value) { SetTableType(value); return *this;}

    /**
     *
The type of this table (EXTERNAL_TABLE,
     * VIRTUAL_VIEW, etc.).

     */
    inline Table& WithTableType(Aws::String&& value) { SetTableType(std::move(value)); return *this;}

    /**
     *
The type of this table (EXTERNAL_TABLE,
     * VIRTUAL_VIEW, etc.).

     */
    inline Table& WithTableType(const char* value) { SetTableType(value); return *this;}

    /**
     *
These key-value pairs define properties associated with the table.

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

    /**
     *
These key-value pairs define properties associated with the table.

     */
    inline bool ParametersHasBeenSet() const { return m_parametersHasBeenSet; }

    /**
     *
These key-value pairs define properties associated with the table.

     */
    inline void SetParameters(const Aws::Map<Aws::String, Aws::String>& value) { m_parametersHasBeenSet = true; m_parameters = value; }

    /**
     *
These key-value pairs define properties associated with the table.

     */
    inline void SetParameters(Aws::Map<Aws::String, Aws::String>&& value) { m_parametersHasBeenSet = true; m_parameters = std::move(value); }

    /**
     *
These key-value pairs define properties associated with the table.

     */
    inline Table& WithParameters(const Aws::Map<Aws::String, Aws::String>& value) { SetParameters(value); return *this;}

    /**
     *
These key-value pairs define properties associated with the table.

     */
    inline Table& WithParameters(Aws::Map<Aws::String, Aws::String>&& value) { SetParameters(std::move(value)); return *this;}

    /**
     *
These key-value pairs define properties associated with the table.

     */
    inline Table& AddParameters(const Aws::String& key, const Aws::String& value) { m_parametersHasBeenSet = true; m_parameters.emplace(key, value); return *this; }

    /**
     *
These key-value pairs define properties associated with the table.

     */
    inline Table& AddParameters(Aws::String&& key, const Aws::String& value) { m_parametersHasBeenSet = true; m_parameters.emplace(std::move(key), value); return *this; }

    /**
     *
These key-value pairs define properties associated with the table.

     */
    inline Table& AddParameters(const Aws::String& key, Aws::String&& value) { m_parametersHasBeenSet = true; m_parameters.emplace(key, std::move(value)); return *this; }

    /**
     *
These key-value pairs define properties associated with the table.

     */
    inline Table& AddParameters(Aws::String&& key, Aws::String&& value) { m_parametersHasBeenSet = true; m_parameters.emplace(std::move(key), std::move(value)); return *this; }

    /**
     *
These key-value pairs define properties associated with the table.

     */
    inline Table& AddParameters(const char* key, Aws::String&& value) { m_parametersHasBeenSet = true; m_parameters.emplace(key, std::move(value)); return *this; }

    /**
     *
These key-value pairs define properties associated with the table.

     */
    inline Table& AddParameters(Aws::String&& key, const char* value) { m_parametersHasBeenSet = true; m_parameters.emplace(std::move(key), value); return *this; }

    /**
     *
These key-value pairs define properties associated with the table.

     */
    inline Table& AddParameters(const char* key, const char* value) { m_parametersHasBeenSet = true; m_parameters.emplace(key, value); return *this; }

    /**
     *
The person or entity who created the table.

     */
    inline const Aws::String& GetCreatedBy() const{ return m_createdBy; }

    /**
     *
The person or entity who created the table.

     */
    inline bool CreatedByHasBeenSet() const { return m_createdByHasBeenSet; }

    /**
     *
The person or entity who created the table.

     */
    inline void SetCreatedBy(const Aws::String& value) { m_createdByHasBeenSet = true; m_createdBy = value; }

    /**
     *
The person or entity who created the table.

     */
    inline void SetCreatedBy(Aws::String&& value) { m_createdByHasBeenSet = true; m_createdBy = std::move(value); }

    /**
     *
The person or entity who created the table.

     */
    inline void SetCreatedBy(const char* value) { m_createdByHasBeenSet = true; m_createdBy.assign(value); }

    /**
     *
The person or entity who created the table.

     */
    inline Table& WithCreatedBy(const Aws::String& value) { SetCreatedBy(value); return *this;}

    /**
     *
The person or entity who created the table.

     */
    inline Table& WithCreatedBy(Aws::String&& value) { SetCreatedBy(std::move(value)); return *this;}

    /**
     *
The person or entity who created the table.

     */
    inline Table& WithCreatedBy(const char* value) { SetCreatedBy(value); return *this;}

    /**
     *
Indicates whether the table has been registered with AWS Lake Formation.

     */
    inline bool GetIsRegisteredWithLakeFormation() const{ return m_isRegisteredWithLakeFormation; }

    /**
     *
Indicates whether the table has been registered with AWS Lake Formation.

     */
    inline bool IsRegisteredWithLakeFormationHasBeenSet() const { return m_isRegisteredWithLakeFormationHasBeenSet; }

    /**
     *
Indicates whether the table has been registered with AWS Lake Formation.

     */
    inline void SetIsRegisteredWithLakeFormation(bool value) { m_isRegisteredWithLakeFormationHasBeenSet = true; m_isRegisteredWithLakeFormation = value; }

    /**
     *
Indicates whether the table has been registered with AWS Lake Formation.

     */
    inline Table& WithIsRegisteredWithLakeFormation(bool value) { SetIsRegisteredWithLakeFormation(value); return *this;}

    /**
     *
A TableIdentifier structure that describes a target table for
     * resource linking.

     */
    inline const TableIdentifier& GetTargetTable() const{ return m_targetTable; }

    /**
     *
A TableIdentifier structure that describes a target table for
     * resource linking.

     */
    inline bool TargetTableHasBeenSet() const { return m_targetTableHasBeenSet; }

    /**
     *
A TableIdentifier structure that describes a target table for
     * resource linking.

     */
    inline void SetTargetTable(const TableIdentifier& value) { m_targetTableHasBeenSet = true; m_targetTable = value; }

    /**
     *
A TableIdentifier structure that describes a target table for
     * resource linking.

     */
    inline void SetTargetTable(TableIdentifier&& value) { m_targetTableHasBeenSet = true; m_targetTable = std::move(value); }

    /**
     *
A TableIdentifier structure that describes a target table for
     * resource linking.

     */
    inline Table& WithTargetTable(const TableIdentifier& value) { SetTargetTable(value); return *this;}

    /**
     *
A TableIdentifier structure that describes a target table for
     * resource linking.

     */
    inline Table& WithTargetTable(TableIdentifier&& value) { SetTargetTable(std::move(value)); return *this;}

    /**
     *
The ID of the Data Catalog in which the table resides.

     */
    inline const Aws::String& GetCatalogId() const{ return m_catalogId; }

    /**
     *
The ID of the Data Catalog in which the table resides.

     */
    inline bool CatalogIdHasBeenSet() const { return m_catalogIdHasBeenSet; }

    /**
     *
The ID of the Data Catalog in which the table resides.

     */
    inline void SetCatalogId(const Aws::String& value) { m_catalogIdHasBeenSet = true; m_catalogId = value; }

    /**
     *
The ID of the Data Catalog in which the table resides.

     */
    inline void SetCatalogId(Aws::String&& value) { m_catalogIdHasBeenSet = true; m_catalogId = std::move(value); }

    /**
     *
The ID of the Data Catalog in which the table resides.

     */
    inline void SetCatalogId(const char* value) { m_catalogIdHasBeenSet = true; m_catalogId.assign(value); }

    /**
     *
The ID of the Data Catalog in which the table resides.

     */
    inline Table& WithCatalogId(const Aws::String& value) { SetCatalogId(value); return *this;}

    /**
     *
The ID of the Data Catalog in which the table resides.

     */
    inline Table& WithCatalogId(Aws::String&& value) { SetCatalogId(std::move(value)); return *this;}

    /**
     *
The ID of the Data Catalog in which the table resides.

     */
    inline Table& WithCatalogId(const char* value) { SetCatalogId(value); return *this;}

  private:

    Aws::String m_name;
    bool m_nameHasBeenSet;

    Aws::String m_databaseName;
    bool m_databaseNameHasBeenSet;

    Aws::String m_description;
    bool m_descriptionHasBeenSet;

    Aws::String m_owner;
    bool m_ownerHasBeenSet;

    Aws::Utils::DateTime m_createTime;
    bool m_createTimeHasBeenSet;

    Aws::Utils::DateTime m_updateTime;
    bool m_updateTimeHasBeenSet;

    Aws::Utils::DateTime m_lastAccessTime;
    bool m_lastAccessTimeHasBeenSet;

    Aws::Utils::DateTime m_lastAnalyzedTime;
    bool m_lastAnalyzedTimeHasBeenSet;

    int m_retention;
    bool m_retentionHasBeenSet;

    StorageDescriptor m_storageDescriptor;
    bool m_storageDescriptorHasBeenSet;

    Aws::Vector<Column> m_partitionKeys;
    bool m_partitionKeysHasBeenSet;

    Aws::String m_viewOriginalText;
    bool m_viewOriginalTextHasBeenSet;

    Aws::String m_viewExpandedText;
    bool m_viewExpandedTextHasBeenSet;

    Aws::String m_tableType;
    bool m_tableTypeHasBeenSet;

    Aws::Map<Aws::String, Aws::String> m_parameters;
    bool m_parametersHasBeenSet;

    Aws::String m_createdBy;
    bool m_createdByHasBeenSet;

    bool m_isRegisteredWithLakeFormation;
    bool m_isRegisteredWithLakeFormationHasBeenSet;

    TableIdentifier m_targetTable;
    bool m_targetTableHasBeenSet;

    Aws::String m_catalogId;
    bool m_catalogIdHasBeenSet;
  };

} // namespace Model
} // namespace Glue
} // namespace Aws


text:
import { serialize, serializeAsColor3, expandToProperty, serializeAsTexture } from "../../Misc/decorators";
import { Scene } from "../../scene";
import { Color3 } from "../../Maths/math.color";
import { PBRBaseMaterial } from "./pbrBaseMaterial";
import { BaseTexture } from "../../Materials/Textures/baseTexture";

/**
 * The Physically based simple base material of BJS.
 *
 * This enables better naming and convention enforcements on top of the pbrMaterial.
 * It is used as the base class for both the specGloss and metalRough conventions.
 */
export abstract class PBRBaseSimpleMaterial extends PBRBaseMaterial {

    /**
     * Number of Simultaneous lights allowed on the material.
     */
    @serialize()
    @expandToProperty("_markAllSubMeshesAsLightsDirty")
    public maxSimultaneousLights = 4;

    /**
     * If sets to true, disables all the lights affecting the material.
     */
    @serialize()
    @expandToProperty("_markAllSubMeshesAsLightsDirty")
    public disableLighting = false;

    /**
     * Environment Texture used in the material (this is use for both reflection and environment lighting).
     */
    @serializeAsTexture()
    @expandToProperty("_markAllSubMeshesAsTexturesDirty", "_reflectionTexture")
    public environmentTexture: BaseTexture;

    /**
     * If sets to true, x component of normal map value will invert (x = 1.0 - x).
     */
    @serialize()
    @expandToProperty("_markAllSubMeshesAsTexturesDirty")
    public invertNormalMapX = false;

    /**
     * If sets to true, y component of normal map value will invert (y = 1.0 - y).
     */
    @serialize()
    @expandToProperty("_markAllSubMeshesAsTexturesDirty")
    public invertNormalMapY = false;

    /**
     * Normal map used in the model.
     */
    @serializeAsTexture()
    @expandToProperty("_markAllSubMeshesAsTexturesDirty", "_bumpTexture")
    public normalTexture: BaseTexture;

    /**
     * Emissivie color used to self-illuminate the model.
     */
    @serializeAsColor3("emissive")
    @expandToProperty("_markAllSubMeshesAsTexturesDirty")
    public emissiveColor = new Color3(0, 0, 0);

    /**
     * Emissivie texture used to self-illuminate the model.
     */
    @serializeAsTexture()
    @expandToProperty("_markAllSubMeshesAsTexturesDirty")
    public emissiveTexture: BaseTexture;

    /**
     * Occlusion Channel Strenght.
     */
    @serialize()
    @expandToProperty("_markAllSubMeshesAsTexturesDirty", "_ambientTextureStrength")
    public occlusionStrength: number = 1.0;

    /**
     * Occlusion Texture of the material (adding extra occlusion effects).
     */
    @serializeAsTexture()
    @expandToProperty("_markAllSubMeshesAsTexturesDirty", "_ambientTexture")
    public occlusionTexture: BaseTexture;

    /**
     * Defines the alpha limits in alpha test mode.
     */
    @serialize()
    @expandToProperty("_markAllSubMeshesAsTexturesDirty", "_alphaCutOff")
    public alphaCutOff: number;

    /**
     * Gets the current double sided mode.
     */
    @serialize()
    public get doubleSided(): boolean {
        return this._twoSidedLighting;
    }
    /**
     * If sets to true and backfaceCulling is false, normals will be flipped on the backside.
     */
    public set doubleSided(value: boolean) {
        if (this._twoSidedLighting === value) {
            return;
        }
        this._twoSidedLighting = value;
        this.backFaceCulling = !value;
        this._markAllSubMeshesAsTexturesDirty();
    }

    /**
     * Stores the pre-calculated light information of a mesh in a texture.
     */
    @serializeAsTexture()
    @expandToProperty("_markAllSubMeshesAsTexturesDirty", null)
    public lightmapTexture: BaseTexture;

    /**
     * If true, the light map contains occlusion information instead of lighting info.
     */
    @serialize()
    @expandToProperty("_markAllSubMeshesAsTexturesDirty")
    public useLightmapAsShadowmap = false;

    /**
     * Instantiates a new PBRMaterial instance.
     *
     * @param name The material name
     * @param scene The scene the material will be use in.
     */
    constructor(name: string, scene: Scene) {
        super(name, scene);

        this._useAlphaFromAlbedoTexture = true;
        this._useAmbientInGrayScale = true;
    }

    public getClassName(): string {
        return "PBRBaseSimpleMaterial";
    }
}

redpajama_set_name: RedPajamaGithub


text:
import * as React from "react"

import _Button from "@material-ui/core/Button"

interface ButtonProps {
  label: string
  type?: "primary" | "secondary"
  fullWidth?: boolean
}

export function Button({
  label,
  type = "primary",
  fullWidth = false
}: ButtonProps) {
  return (
    <_Button
      variant="contained"
      color={type}
      style={{ width: fullWidth ? "100%" : "initial" }}
    >
      {label}
    </_Button>
  )
}


text:
// Copyright 2009 the Sputnik authors.  All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.

/**
* @name: S15.5.4.14_A3_T10;
* @section: 15.5.4.14;
* @assertion: String.prototype.split() returns an Array object with:
*  i) length equaled to 1,
* ii) [[Get]](0) equaled to the result of converting this object to a string;
* @description: Instance is new String;
*/

var __string = new String;

var __split = __string.split();

//////////////////////////////////////////////////////////////////////////////
//CHECK#1
if (__split.constructor !== Array) {
  $ERROR('#1: var __string = new String; __split = __string.split(); __split.constructor === Array. Actual: '+__split.constructor );
}
//
//////////////////////////////////////////////////////////////////////////////

//////////////////////////////////////////////////////////////////////////////
//CHECK#2
if (__split.length !== 1) {
  $ERROR('#2: var __string = new String; __split = __string.split(); __split.length === 1. Actual: '+__split.length );
}
//
//////////////////////////////////////////////////////////////////////////////

//////////////////////////////////////////////////////////////////////////////
//CHECK#3
if (__split[0] !== "") {
  $ERROR('#3: var __string = new String; __split = __string.split(); __split[0] === "". Actual: '+__split[0] );
}
//
//////////////////////////////////////////////////////////////////////////////


text:
@implementation RMRMercatorProjection

- (CGPoint)pointForCoordinate:(RMRMapCoordinate)coordinate zoomLevel:(NSUInteger)zoom tileSize:(CGSize)tileSize {

	double sinLatitude = sin(coordinate.latitude * M_PI / 180);
	CGFloat y = ((0.5 - log((1 + sinLatitude) / (1 - sinLatitude)) / (4 * M_PI)) * ((long) tileSize.height << zoom));
	CGFloat x = ((coordinate.longitude + 180) / 360 * ((long) tileSize.width << zoom));

	return CGPointMake(x, y);
}

- (RMRMapCoordinate)coordinateForPoint:(CGPoint)point zoomLevel:(NSUInteger)zoom tileSize:(CGSize)tileSize {

	RMRLongitude lon = 360 * ((point.x / ((long) tileSize.width << zoom)) - 0.5);

	double y = 0.5 - (point.y / ((long) tileSize.height << zoom));
	RMRLatitude lat = 90 - 360 * atan(exp(-y * 2 * M_PI)) / M_PI;

	return RMRMapCoordinateMake(lat, lon);
}

@end


text:
#include <iostream>
#include "../../Lib/PlanGenerator/PlanGenerator.h"
#include "../../Lib/WorkspaceParser/WorkspaceParser.h"
using namespace std;

extern "C" { const char* primitive_file_path = "primitive.txt"; }

int main()
{
	char* pathToWorkspace = "C:\\Workspace\\Drona\\Src\\Workspaces\\Exp1\\Workspace.xml";
	//char* pathToWorkspace = "../../Src/Workspaces/Exp2";
	int count;
	int* output_seq_of_locations = (int*)malloc(100 * sizeof(int));
	int output_size = 0;
	/*int obs[34] = {
		21,	44,
		22,	43,
		23,	42,
		24,	41,
		25,	40,
		26,	39,
		27,	38,
		28,	37,
		78,	83,
		77,	84,
		76,	85,
		74,	87,
		71,	90,
		70,	91,
		69,	92,
		98,	127,
		97,	128
	};*/

	WorkspaceInfo* WSInfo = ParseWorkspaceConfig(pathToWorkspace);
	// Testcase: Only static obstacles.
	//AvoidPositions *avoidsArr = NULL;
	//GenerateMotionPlanFor(*WSInfo, 4, 113, WSInfo->obstacles.locations, WSInfo->obstacles.size, avoidsArr, 0, output_seq_of_locations, output_size);

	// Testcase: Two other robots are present in the workspace, but they do not block the trajectory
	// of the current robot.
        //AvoidPositions avoidsArr[] = { { { 10, 11, 10 }, 3 }, { { 11, 14 }, 2 } };
	//GenerateMotionPlanFor(4, 113, obs, 34, avoidsArr, 2, output_seq_of_locations, output_size);

	// Testcase: The end location of one robot block the end location of the current robot. No trajectory exists.
        //AvoidPositions avoidsArr[] = { { { 30, 29, 36, 61 }, 4 } };
	//GenerateMotionPlanFor(4, 61, obs, 34, avoidsArr, 1, output_seq_of_locations, output_size);

	// Testcase: The location of the other robot at timestep 2 blocks the shortest path of the current robot.
	// We find an alternative path that avoid collision.
	//AvoidPositions avoidsArr[] = { { { 19, 35, 51, 52 }, 4 } };
        //GenerateMotionPlanFor(*WSInfo, 3, 53, WSInfo->obstacles.locations, WSInfo->obstacles.size, avoidsArr, 1, output_seq_of_locations, output_size);

	AvoidPositions avoidsArr[] = { { { 60, 59, 58, 57 }, 4 } };
	for (int i = 0; i < WSInfo->obstacles.size; i++)
	{
		cout << WSInfo->obstacles.locations[i] << " ";
	}

	GenerateMotionPlanFor(*WSInfo, WSInfo->starts.locations[0], WSInfo->ends.locations[4], WSInfo->obstacles.locations, WSInfo->obstacles.size, avoidsArr, 1, output_seq_of_locations, &output_size);

	cout << "Trajectory Length = " << output_size << endl;
	cout << "Trajectory: " << endl;
	for (count = 0; count < output_size; count++)
	{
		cout << output_seq_of_locations[count] << endl;
	}
	free(output_seq_of_locations);
	getchar();
	return 0;
}


text:
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
    <modelVersion>4.0.0</modelVersion>
    <artifactId>${artifactId}</artifactId>
    <name>Alfresco Share JAR Module</name>
    <packaging>jar</packaging>
    <description>Sample Share JAR Module (to be included in the share.war) - part of AIO - SDK 4.4</description>

    <parent>
        <groupId>${groupId}</groupId>
        <artifactId>${rootArtifactId}</artifactId>
        <version>${version}</version>
    </parent>

    <properties>
    </properties>

    <!-- Following dependencies are needed for compiling Java code in src/main/java;
         <scope>provided</scope> is inherited for each of the following;
         for more info, please refer to alfresco-platform-distribution POM -->
    <dependencies>
        <dependency>
            <groupId>${alfresco.groupId}</groupId>
            <artifactId>share</artifactId>
            <classifier>classes</classifier>
        </dependency>
    </dependencies>

    <build>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-assembly-plugin</artifactId>
            </plugin>
        </plugins>
    </build>

</project>


text:
from JumpScale import j
import pg

class DBConnection(object):
    """
    only support postgresql for now
    """

    def __init__(self, ip, dbname, login, passwd=None):
        kwargs = dict()
        if ip:
            kwargs['host'] = ip
        if dbname:
            kwargs['dbname'] = dbname
        if login:
            kwargs['user'] = login
        if passwd:
            kwargs['passwd'] = passwd
        self._connection = pg.connect(**kwargs)
        self.__db = pg.DB(self._connection)
        self.defaultowner="postgres"
        self.metadatapopulated=False

    def sqlexecute(self,sql):
        try:
            return self._connection.query(sql)
        except:
            self._connection.reset()
            raise

    def getDatabaseMetadata(self):
        """
        fetch all relevant metadata about database e.g. tablespaces, tables, columns, ... store in tablespacesReality
        make sure this only happens once per dbconnection
        """
        if self.metadatapopulated==False:
            pass #populate tablespacesReality array in this object

    def existsTable(self,tablename,tablespace=""):
        self.getDatabaseMetadata() #make sure metadata info is populated
        #ttodo

    def existsTableColumn(self,tablename,columnname,tablespace=""):
        self.getDatabaseMetadata() #make sure metadata info is populated
        #ttodo

    def listTables(self,tablespace=""):
        return self.__db.get_tables()

    def listColumns(self,tablename,tablespace=""):
        return self._get_attnames(tablename if not tablespace else "%s.%s"%(tablespace, tablename))

    def _get_attnames(self, cl):
        cl = self.__db._split_schema(cl)
        qcl = pg._join_parts(cl)
        if qcl in self.__db._attnames:
            return self.__db._attnames[qcl]
        if qcl not in self.__db.get_relations('rv'):
            raise pg.ProgrammingError('Class %s does not exist' % qcl)
        t = {}
        for att, typ in self.__db.db.query("SELECT pg_attribute.attname,"
            " pg_type.typname FROM pg_class"
            " JOIN pg_namespace ON pg_class.relnamespace = pg_namespace.oid"
            " JOIN pg_attribute ON pg_attribute.attrelid = pg_class.oid"
            " JOIN pg_type ON pg_type.oid = pg_attribute.atttypid"
            " WHERE pg_namespace.nspname = '%s' AND pg_class.relname = '%s'"
            " AND (pg_attribute.attnum > 0 or pg_attribute.attname = 'oid')"
            " AND pg_attribute.attisdropped = 'f'"
                % cl).getresult():
            if typ.startswith('bool'):
                t[att] = 'bool'
            elif typ.startswith('abstime') or typ.startswith('date') or typ.startswith('interval'):
                t[att] = 'date'
            elif typ.startswith('timestamp'):
                t[att] = 'datetime'
            elif typ.startswith('money'):
                t[att] = 'money'
            elif typ.startswith('numeric'):
                t[att] = 'num'
            elif typ.startswith('float'):
                t[att] = 'float'
            elif typ.startswith('int') or typ.startswith('oid'):
                t[att] = 'int'
            elif typ.startswith('uuid'):
                t[att] = 'uuid'
            else:
                t[att] = 'text'
        self.__db._attnames[qcl] = t # cache it
        return self.__db._attnames[qcl]

    def __del__(self):
        # If something goes wrong during __init__, the _connections attribute
        # might not exist - Trac #157
        connection = getattr(self, '_connection', None)

        if not connection:
            return

        connection.close()


text:
#include "hb-ot-shape-normalize-private.hh"
#include "hb-ot-shape-complex-private.hh"
#include "hb-ot-shape-private.hh"

/*
 * HIGHLEVEL DESIGN:
 *
 * This file exports one main function: _hb_ot_shape_normalize().
 *
 * This function closely reflects the Unicode Normalization Algorithm,
 * yet it's different.
 *
 * Each shaper specifies whether it prefers decomposed (NFD) or composed (NFC).
 * The logic however tries to use whatever the font can support.
 *
 * In general what happens is that: each grapheme is decomposed in a chain
 * of 1:2 decompositions, marks reordered, and then recomposed if desired,
 * so far it's like Unicode Normalization.  However, the decomposition and
 * recomposition only happens if the font supports the resulting characters.
 *
 * The goals are:
 *
 *   - Try to render all canonically equivalent strings similarly.  To really
 *     achieve this we have to always do the full decomposition and then
 *     selectively recompose from there.  It's kinda too expensive though, so
 *     we skip some cases.  For example, if composed is desired, we simply
 *     don't touch 1-character clusters that are supported by the font, even
 *     though their NFC may be different.
 *
 *   - When a font has a precomposed character for a sequence but the 'ccmp'
 *     feature in the font is not adequate, use the precomposed character
 *     which typically has better mark positioning.
 *
 *   - When a font does not support a combining mark, but supports it precomposed
 *     with previous base, use that.  This needs the itemizer to have this
 *     knowledge too.  We need to provide assistance to the itemizer.
 *
 *   - When a font does not support a character but supports its decomposition,
 *     well, use the decomposition (preferring the canonical decomposition, but
 *     falling back to the compatibility decomposition if necessary).  The
 *     compatibility decomposition is really nice to have, for characters like
 *     ellipsis, or various-sized space characters.
 *
 *   - The complex shapers can customize the compose and decompose functions to
 *     offload some of their requirements to the normalizer.  For example, the
 *     Indic shaper may want to disallow recomposing of two matras.
 *
 *   - We try compatibility decomposition if decomposing through canonical
 *     decomposition alone failed to find a sequence that the font supports.
 *     We don't try compatibility decomposition recursively during the canonical
 *     decomposition phase.  This has minimal impact.  There are only a handful
 *     of Greek letter that have canonical decompositions that include characters
 *     with compatibility decomposition.  Those can be found using this command:
 *
 *     egrep  "`echo -n ';('; grep ';<' UnicodeData.txt | cut -d';' -f1 | tr '\n' '|'; echo ') '`" UnicodeData.txt
 */

static bool
decompose_unicode (const hb_ot_shape_normalize_context_t *c,
		   hb_codepoint_t  ab,
		   hb_codepoint_t *a,
		   hb_codepoint_t *b)
{
  return c->unicode->decompose (ab, a, b);
}

static bool
compose_unicode (const hb_ot_shape_normalize_context_t *c,
		 hb_codepoint_t  a,
		 hb_codepoint_t  b,
		 hb_codepoint_t *ab)
{
  return c->unicode->compose (a, b, ab);
}

static inline void
set_glyph (hb_glyph_info_t &info, hb_font_t *font)
{
  font->get_glyph (info.codepoint, 0, &info.glyph_index());
}

static inline void
output_char (hb_buffer_t *buffer, hb_codepoint_t unichar, hb_codepoint_t glyph)
{
  buffer->cur().glyph_index() = glyph;
  buffer->output_glyph (unichar);
  _hb_glyph_info_set_unicode_props (&buffer->prev(), buffer->unicode);
}

static inline void
next_char (hb_buffer_t *buffer, hb_codepoint_t glyph)
{
  buffer->cur().glyph_index() = glyph;
  buffer->next_glyph ();
}

static inline void
skip_char (hb_buffer_t *buffer)
{
  buffer->skip_glyph ();
}

/* Returns 0 if didn't decompose, number of resulting characters otherwise. */
static inline unsigned int
decompose (const hb_ot_shape_normalize_context_t *c, bool shortest, hb_codepoint_t ab)
{
  hb_codepoint_t a, b, a_glyph, b_glyph;

  if (!c->decompose (c, ab, &a, &b) ||
      (b && !c->font->get_glyph (b, 0, &b_glyph)))
    return 0;

  bool has_a = c->font->get_glyph (a, 0, &a_glyph);
  if (shortest && has_a) {
    /* Output a and b */
    output_char (c->buffer, a, a_glyph);
    if (likely (b)) {
      output_char (c->buffer, b, b_glyph);
      return 2;
    }
    return 1;
  }

  unsigned int ret;
  if ((ret = decompose (c, shortest, a))) {
    if (b) {
      output_char (c->buffer, b, b_glyph);
      return ret + 1;
    }
    return ret;
  }

  if (has_a) {
    output_char (c->buffer, a, a_glyph);
    if (likely (b)) {
      output_char (c->buffer, b, b_glyph);
      return 2;
    }
    return 1;
  }

  return 0;
}

/* Returns 0 if didn't decompose, number of resulting characters otherwise. */
static inline bool
decompose_compatibility (const hb_ot_shape_normalize_context_t *c, hb_codepoint_t u)
{
  unsigned int len, i;
  hb_codepoint_t decomposed[HB_UNICODE_MAX_DECOMPOSITION_LEN];
  hb_codepoint_t glyphs[HB_UNICODE_MAX_DECOMPOSITION_LEN];

  len = c->buffer->unicode->decompose_compatibility (u, decomposed);
  if (!len)
    return 0;

  for (i = 0; i < len; i++)
    if (!c->font->get_glyph (decomposed[i], 0, &glyphs[i]))
      return 0;

  for (i = 0; i < len; i++)
    output_char (c->buffer, decomposed[i], glyphs[i]);

  return len;
}

/* Returns true if recomposition may be benefitial. */
static inline bool
decompose_current_character (const hb_ot_shape_normalize_context_t *c, bool shortest)
{
  hb_buffer_t * const buffer = c->buffer;
  hb_codepoint_t glyph;
  unsigned int len = 1;

  /* Kind of a cute waterfall here... */
  if (shortest && c->font->get_glyph (buffer->cur().codepoint, 0, &glyph))
    next_char (buffer, glyph);
  else if ((len = decompose (c, shortest, buffer->cur().codepoint)))
    skip_char (buffer);
  else if (!shortest && c->font->get_glyph (buffer->cur().codepoint, 0, &glyph))
    next_char (buffer, glyph);
  else if ((len = decompose_compatibility (c, buffer->cur().codepoint)))
    skip_char (buffer);
  else
    next_char (buffer, glyph); /* glyph is initialized in earlier branches. */

  /*
   * A recomposition would only be useful if we decomposed into at least three
   * characters...
   */
  return len > 2;
}

static inline void
handle_variation_selector_cluster (const hb_ot_shape_normalize_context_t *c, unsigned int end)
{
  hb_buffer_t * const buffer = c->buffer;
  for (; buffer->idx < end - 1;) {
    if (unlikely (buffer->unicode->is_variation_selector (buffer->cur(+1).codepoint))) {
      /* The next two lines are some ugly lines... But work. */
      c->font->get_glyph (buffer->cur().codepoint, buffer->cur(+1).codepoint, &buffer->cur().glyph_index());
      buffer->replace_glyphs (2, 1, &buffer->cur().codepoint);
    } else {
      set_glyph (buffer->cur(), c->font);
      buffer->next_glyph ();
    }
  }
  if (likely (buffer->idx < end)) {
    set_glyph (buffer->cur(), c->font);
    buffer->next_glyph ();
  }
}

/* Returns true if recomposition may be benefitial. */
static inline bool
decompose_multi_char_cluster (const hb_ot_shape_normalize_context_t *c, unsigned int end)
{
  hb_buffer_t * const buffer = c->buffer;
  /* TODO Currently if there's a variation-selector we give-up, it's just too hard. */
  for (unsigned int i = buffer->idx; i < end; i++)
    if (unlikely (buffer->unicode->is_variation_selector (buffer->info[i].codepoint))) {
      handle_variation_selector_cluster (c, end);
      return false;
    }

  while (buffer->idx < end)
    decompose_current_character (c, false);
  /* We can be smarter here and only return true if there are at least two ccc!=0 marks.
   * But does not matter. */
  return true;
}

static inline bool
decompose_cluster (const hb_ot_shape_normalize_context_t *c, bool short_circuit, unsigned int end)
{
  if (likely (c->buffer->idx + 1 == end))
    return decompose_current_character (c, short_circuit);
  else
    return decompose_multi_char_cluster (c, end);
}

static int
compare_combining_class (const hb_glyph_info_t *pa, const hb_glyph_info_t *pb)
{
  unsigned int a = _hb_glyph_info_get_modified_combining_class (pa);
  unsigned int b = _hb_glyph_info_get_modified_combining_class (pb);

  return a < b ? -1 : a == b ? 0 : +1;
}

void
_hb_ot_shape_normalize (const hb_ot_shape_plan_t *plan,
			hb_buffer_t *buffer,
			hb_font_t *font)
{
  hb_ot_shape_normalization_mode_t mode = plan->shaper->normalization_preference ?
					  plan->shaper->normalization_preference (&buffer->props) :
					  HB_OT_SHAPE_NORMALIZATION_MODE_DEFAULT;
  const hb_ot_shape_normalize_context_t c = {
    plan,
    buffer,
    font,
    buffer->unicode,
    plan->shaper->decompose ? plan->shaper->decompose : decompose_unicode,
    plan->shaper->compose   ? plan->shaper->compose   : compose_unicode
  };

  bool short_circuit = mode != HB_OT_SHAPE_NORMALIZATION_MODE_DECOMPOSED &&
		       mode != HB_OT_SHAPE_NORMALIZATION_MODE_COMPOSED_DIACRITICS_NO_SHORT_CIRCUIT;
  bool can_use_recompose = false;
  unsigned int count;

  /* We do a fairly straightforward yet custom normalization process in three
   * separate rounds: decompose, reorder, recompose (if desired).  Currently
   * this makes two buffer swaps.  We can make it faster by moving the last
   * two rounds into the inner loop for the first round, but it's more readable
   * this way. */

  /* First round, decompose */

  buffer->clear_output ();
  count = buffer->len;
  for (buffer->idx = 0; buffer->idx < count;)
  {
    unsigned int end;
    for (end = buffer->idx + 1; end < count; end++)
      if (buffer->cur().cluster != buffer->info[end].cluster)
        break;

    can_use_recompose = decompose_cluster (&c, short_circuit, end) || can_use_recompose;
  }
  buffer->swap_buffers ();

  if (mode != HB_OT_SHAPE_NORMALIZATION_MODE_COMPOSED_FULL && !can_use_recompose)
    return; /* Done! */

  /* Second round, reorder (inplace) */

  count = buffer->len;
  for (unsigned int i = 0; i < count; i++)
  {
    if (_hb_glyph_info_get_modified_combining_class (&buffer->info[i]) == 0)
      continue;

    unsigned int end;
    for (end = i + 1; end < count; end++)
      if (_hb_glyph_info_get_modified_combining_class (&buffer->info[end]) == 0)
        break;

    /* We are going to do a bubble-sort.  Only do this if the
     * sequence is short.  Doing it on long sequences can result
     * in an O(n^2) DoS. */
    if (end - i > 10) {
      i = end;
      continue;
    }

    hb_bubble_sort (buffer->info + i, end - i, compare_combining_class);

    i = end;
  }

  if (mode == HB_OT_SHAPE_NORMALIZATION_MODE_DECOMPOSED)
    return;

  /* Third round, recompose */

  /* As noted in the comment earlier, we don't try to combine
   * ccc=0 chars with their previous Starter. */

  buffer->clear_output ();
  count = buffer->len;
  unsigned int starter = 0;
  buffer->next_glyph ();
  while (buffer->idx < count)
  {
    hb_codepoint_t composed, glyph;
    if (/* If mode is NOT COMPOSED_FULL (ie. it's COMPOSED_DIACRITICS), we don't try to
	 * compose a CCC=0 character with it's preceding starter. */
	(mode == HB_OT_SHAPE_NORMALIZATION_MODE_COMPOSED_FULL ||
	 _hb_glyph_info_get_modified_combining_class (&buffer->cur()) != 0) &&
	/* If there's anything between the starter and this char, they should have CCC
	 * smaller than this character's. */
	(starter == buffer->out_len - 1 ||
	 _hb_glyph_info_get_modified_combining_class (&buffer->prev()) < _hb_glyph_info_get_modified_combining_class (&buffer->cur())) &&
	/* And compose. */
	c.compose (&c,
		   buffer->out_info[starter].codepoint,
		   buffer->cur().codepoint,
		   &composed) &&
	/* And the font has glyph for the composite. */
	font->get_glyph (composed, 0, &glyph))
    {
      /* Composes. */
      buffer->next_glyph (); /* Copy to out-buffer. */
      if (unlikely (buffer->in_error))
        return;
      buffer->merge_out_clusters (starter, buffer->out_len);
      buffer->out_len--; /* Remove the second composable. */
      buffer->out_info[starter].codepoint = composed; /* Modify starter and carry on. */
      set_glyph (buffer->out_info[starter], font);
      _hb_glyph_info_set_unicode_props (&buffer->out_info[starter], buffer->unicode);

      continue;
    }

    /* Blocked, or doesn't compose. */
    buffer->next_glyph ();

    if (_hb_glyph_info_get_modified_combining_class (&buffer->prev()) == 0)
      starter = buffer->out_len - 1;
  }
  buffer->swap_buffers ();

}


text:
package com.kyakujin.android.autoeco.service;

import com.kyakujin.android.autoeco.Conf;
import com.kyakujin.android.autoeco.Logger;
import com.kyakujin.android.autoeco.db.AutoEcoContract.BatteryQuery;
import com.kyakujin.android.autoeco.db.AutoEcoContract.BatteryTbl;

import android.content.Context;
import android.content.Intent;
import android.database.Cursor;
import android.database.sqlite.SQLiteException;

/**
 * 端末Boot検出時処理のクラス<br>
 * {@link BatteryService}を起動する。
 */
public class OnBootReceiverBattery extends BaseOnBootReceiver {

    private final String TAG = Conf.APP_NAME + ":" + this.getClass().getSimpleName();

    @Override
    protected void onDeviceBoot(Context context) {
        Logger.d(TAG, "BOOT検出 in Battery!");

        Cursor c = null;
        try {
            String where = BatteryTbl.ENABLED + "=1";
            c = context.getContentResolver().query(BatteryTbl.CONTENT_URI,
                    BatteryQuery.PROJECTION, where, null, null);
            if (c.getCount() >= 1) {
                context.startService(new Intent(context, BatteryService.class));
            }
        } catch (SQLiteException e) {
            e.printStackTrace();
        } finally {
            if (c != null) {
                c.close();
            }
        }
    }
}


text:
from flask import Blueprint, render_template, current_app, redirect, url_for, send_from_directory
from flask.ext.login import login_required, current_user

from .models import User
from .constants import DEFAULT_USER_AVATAR

user = Blueprint('user', __name__, url_prefix='/user')

@user.route('/')
@login_required
def index():
    return render_template('user/index.html', current_user=current_user)

@user.route('/<name>')
def pub(name):
    if current_user.is_authenticated() and current_user.name == name:
        return redirect(url_for('user.index'))

    user = User.objects.filter_by(name=name).first_or_404()
    return render_template('user/show.html', user=user)

@user.route('/avatar')
@user.route('/avatar/<path:avatar_filename>')
def avatar(avatar_filename=None):
    if avatar_filename is None:
        avatar_filename = DEFAULT_USER_AVATAR
    return send_from_directory(current_app.config['USER_AVATAR_UPLOAD_FOLDER'], avatar_filename)


text:
// Copyright (c) .NET Foundation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for license information.

using System.IO;
using Microsoft.Azure.Cosmos;
using Microsoft.Azure.WebJobs.Hosting;
using Newtonsoft.Json;

namespace Microsoft.Azure.WebJobs.Extensions.CosmosDB
{
    public class CosmosDBOptions : IOptionsFormatter
    {
        /// <summary>
        /// Gets or sets the ConnectionMode used in the CosmosClient instances.
        /// </summary>
        /// <remarks>Default is Gateway mode.</remarks>
        public ConnectionMode? ConnectionMode { get; set; }

        /// <summary>
        /// Gets or sets a string to be included in the User Agent for all operations by Cosmos DB bindings and triggers.
        /// </summary>
        public string UserAgentSuffix { get; set; }

        public string Format()
        {
            StringWriter sw = new StringWriter();
            using (JsonTextWriter writer = new JsonTextWriter(sw) { Formatting = Formatting.Indented })
            {
                writer.WriteStartObject();

                writer.WritePropertyName(nameof(this.ConnectionMode));
                writer.WriteValue(this.ConnectionMode);

                if (!string.IsNullOrEmpty(UserAgentSuffix))
                {
                    writer.WritePropertyName(nameof(this.UserAgentSuffix));
                    writer.WriteValue(this.UserAgentSuffix);
                }

                writer.WriteEndObject();
            }

            return sw.ToString();
        }
    }
}