text:
import datetime

class BaseModel(object):

    def __str__(self):
        return self.__repr__()

    def __repr__(self):
        ret = "\n"
        for attr, value in self.__dict__.items():
            ret += "(" + str(attr) + ":" + str(value) + ")\n"
        return ret

def extract_list_elements(json_data, property_name, factory_method):
    elements = []
    if property_name in json_data:
        list_property = json_data[property_name]
        if list_property:
            for element in list_property:
                elements.append(factory_method(element))
    return elements

def extract_element(json_data, property_name, factory_method):
    if property_name in json_data:
        element = json_data[property_name]
        if element:
            return factory_method(element)
    return None

class ApplicationDescription(BaseModel):
    """
Describes the properties of an application.
\n"""

    def __init__(self):
        self._application_name = None
        self._configuration_templates = None
        self._date_created = None
        self._date_created_raw = None
        self._date_updated = None
        self._date_updated_raw = None
        self._description = None
        self._versions = None

    @classmethod
    def from_json(cls, json_data):
        """ Create instance of ApplicationDescription from structured json data"""
        ad = cls()
        ad._application_name = json_data['ApplicationName']
        ad._configuration_templates = json_data['ConfigurationTemplates']
        ad._date_created_raw = json_data['DateCreated']
        ad._date_created = datetime.datetime.fromtimestamp(ad._date_created_raw).\
            replace(microsecond=0)
        ad._date_updated_raw = json_data['DateUpdated']
        ad._date_updated = datetime.datetime.fromtimestamp(ad._date_updated_raw).\
            replace(microsecond=0)
        ad._description = json_data['Description']
        ad._versions = json_data['Versions']
        return ad

    @property
    def application_name(self):
        """
The name of the application.
\n"""
        return self._application_name

    @property
    def configuration_templates(self):
        """
 The names of the configuration templates associated with this
            application.
\n"""
        return self._configuration_templates

    @property
    def date_created(self):
        """
The date when the application was created.
\n"""
        return self._date_created

    @property
    def date_updated(self):
        """
The date when the application was last modified.
\n"""
        return self._date_updated

    @property
    def description(self):
        """
User-defined description of the application.
\n"""
        return self._description

    @property
    def versions(self):
        """
The names of the versions for this application.
\n"""
        return self._versions

    @property
    def date_created_raw(self):
        return self._date_created_raw

    @property
    def date_updated_raw(self):
        return self._date_updated_raw

class S3Location(BaseModel):
    """
A specification of a location in Amazon S3.
\n"""
    def __init__(self):
        self._s3_bucket = None
        self._s3_key = None

    @classmethod
    def from_json(cls, json_data):
        """ Create instance of S3Location from structured json data"""
        s3l = cls()
        s3l._s3_bucket = json_data['S3Bucket']
        s3l._s3_key = json_data['S3Key']
        return s3l

    @property
    def s3_bucket(self):
        """
The Amazon S3 bucket where the data is located.
\n"""
        return self._s3_bucket

    @property
    def s3_key(self):
        """
The Amazon S3 key where the data is located.
\n"""
        return self._s3_key

class ApplicationVersionDescription(BaseModel):
    """
 Describes the properties of an application version.
\n"""
    def __init__(self):
        self._application_name = None
        self._date_created = None
        self._date_created_raw = None
        self._date_updated = None
        self._date_updated_raw = None
        self._description = None
        self._source_bundle = None
        self._version_label = None

    @classmethod
    def from_json(cls, json_data):
        """ Create instance of ApplicationVersionDescription from structured json data"""
        avd = cls()
        avd._application_name = json_data['ApplicationName']
        avd._date_created_raw = json_data['DateCreated']
        avd._date_created = datetime.datetime.fromtimestamp(avd._date_created_raw).\
            replace(microsecond=0)
        avd._date_updated_raw = json_data['DateUpdated']
        avd._date_updated = datetime.datetime.fromtimestamp(avd._date_updated_raw).\
            replace(microsecond=0)
        avd._description = json_data['Description']
        avd._source_bundle = S3Location.from_json(json_data['SourceBundle'])
        avd._version_label = json_data['VersionLabel']
        return avd

    @property
    def application_name(self):
        """
The name of the application associated with this release.
\n"""
        return self._application_name

    @property
    def date_created(self):
        """
The creation date of the application version.
\n"""
        return self._date_created

    @property
    def date_updated(self):
        """
The last modified date of the application version.
\n"""
        return self._date_updated

    @property
    def description(self):
        """
The description of this application version.
\n"""
        return self._description

    @property
    def source_bundle(self):
        """
The location where the source bundle is located for this version.
\n"""
        return self._version_label

    @property
    def version_label(self):
        """
A label uniquely identifying the version for the associated application.
\n"""
        return self._version_label

    @property
    def date_created_raw(self):
        return self._date_created_raw

    @property
    def date_updated_raw(self):
        return self._date_updated_raw

class EnvironmentDescription(BaseModel):
    """
Describes the properties of an environment.
\n"""

    def __init__(self):
        self._application_name = None
        self._cname = None
        self._date_created = None
        self._date_created_raw = None
        self._date_updated = None
        self._date_updated_raw = None
        self._description = None
        self._endpoint_url = None
        self._environment_name = None
        self._environment_id = None
        self._health = None
        self._resources = None
        self._status = None
        self._solution_stack_name = None
        self._template_name = None
        self._version_label = None

    @classmethod
    def from_json(cls, json_data):
        """ Create instance of EnvironmentDescription from structured json data"""
        en = cls()
        en._application_name = json_data['ApplicationName']
        en._cname = json_data['CNAME']
        en._date_created_raw = json_data['DateCreated']
        en._date_created = datetime.datetime.fromtimestamp(en._date_created_raw).\
            replace(microsecond=0)
        en._date_updated_raw = json_data['DateUpdated']
        en._date_updated = datetime.datetime.fromtimestamp(en._date_updated_raw).\
            replace(microsecond=0)
        en._description = json_data['Description']
        en._endpoint_url = json_data['EndpointURL']
        en._environment_id = json_data['EnvironmentId']
        en._environment_name = json_data['EnvironmentName']
        en._health = json_data['Health']
        en._resources = json_data['Resources']
        en._solution_stack_name = json_data['SolutionStackName']
        en._status = json_data['Status']
        en._template_name = json_data['TemplateName']
        en._version_label = json_data['VersionLabel']
        en._tier = extract_element(json_data, 'Tier', EnvironmentTier.from_json)

        return en

    @property
    def environment_name(self):
        """
The name of this environment.
\n"""
        return self._environment_name

    @property
    def environment_id(self):
        """
The ID of this environment.
\n"""
        return self._environment_id

    @property
    def application_name(self):
        """
The name of the application associated with this environment.
\n"""
        return self._application_name

    @property
    def version_label(self):
        """
The application version deployed in this environment.
\n"""
        return self._version_label

    @property
    def tier(self):
        """
The environment tier for this environment.
\n"""
        return self._tier

    @property
    def solution_stack_name(self):
        """
The name of the SolutionStack deployed with this environment.
\n"""
        return self._solution_stack_name

    @property
    def template_name(self):
        """
The name of the configuration template used to originally launch this environment.
\n"""
        return self._template_name

    @property
    def description(self):
        """
Describes this environment.
\n"""
        return self._description

    @property
    def endpoint_url(self):
        """
The URL to the LoadBalancer for this environment.
\n"""
        return self._endpoint_url

    @property
    def cname(self):
        """
The URL to the CNAME for this environment.
\n"""
        return self._cname

    @property
    def date_created(self):
        """
The creation date for this environment.
\n"""
        return self._date_created

    @property
    def date_updated(self):
        """
The last modified date for this environment.
\n"""
        return self._date_updated

    @property
    def status(self):
        """
The current operational status of the environment:

                Launching: Environment is in the process of
                initial deployment.

                Updating: Environment is in the process of
                updating its configuration settings or
                application version.

                Ready: Environment is available to have an action
                performed on it, such as update or terminate.

                Terminating: Environment is in the shut-down process.

                Terminated: Environment is not running.

\n"""
        return self._status

    @property
    def health(self):
        """
 Describes the health status of the environment.
                AWS Elastic Beanstalk indicates the failure levels for a running environment:

          <enumValues>
             <value name="Red">

                   Red
                   : Indicates the environment is not working.

             </value>
             <value name="Yellow">

                   Yellow: Indicates that something is wrong, the application
                   might not be available, but the instances appear running.

             </value>
             <value name="Green">

                   Green: Indicates the environment is
                   healthy and fully functional.

             </value>
          </enumValues>"""
        return self._health

    @property
    def resources(self):
        """
The description of the AWS resources used by this environment.
\n"""
        return self._resources

    @property
    def date_created_raw(self):
        return self._date_created_raw

    @property
    def date_updated_raw(self):
        return self._date_updated_raw

class EnvironmentTier(BaseModel):

    def __init__(self):
        self._name = None
        self._type = None
        self._version = None

    @classmethod
    def from_values(cls, tier_name, tier_type, tier_version):
        et = cls()
        et._name = tier_name
        et._type = tier_type
        et._version = tier_version
        return et

    SEPARATOR = "::"
    @classmethod
    def from_serialized_string(cls, serialized_string):

        elements = serialized_string.split(EnvironmentTier.SEPARATOR)
        if elements and (len(elements)==3):
            return  cls.from_values(elements[0], elements[1], elements[2])

        return None

    @classmethod
    def from_json(cls, json_data):
        """ Create instance of EnvironmentTier from structured json data"""
        et = cls()
        et._name = json_data['Name']
        et._type = json_data['Type']
        et._version = json_data['Version']
        return et

    @property
    def name(self):
        return self._name

    @property
    def type(self):
        return self._type

    @property
    def version(self):
        return self._version

    def to_serialized_string(self):
        return EnvironmentTier.SEPARATOR.join((self.name, self.type, self.version))

class EnvironmentResourceDescription(BaseModel):
    """
Describes the AWS resources in use by this environment. This data is live.
\n"""

    def __init__(self):
        self._auto_scaling_groups = None
        self._environment_name = None
        self._instances = None
        self._launch_configurations = None
        self._load_balancers = None
        self._triggers = None
        self._resources = None
        self._queues = None

    @classmethod
    def from_json(cls, json_data):
        """ Create instance of EnvironmentResourceDescription from structured json data"""
        erd = cls()
        erd._auto_scaling_groups = json_data['AutoScalingGroups']
        erd._environment_name = json_data['EnvironmentName']
        erd._instances = json_data['Instances']
        erd._launch_configurations = json_data['LaunchConfigurations']
        erd._load_balancers = json_data['LoadBalancers']
        erd._triggers = json_data['Triggers']
        erd._resources = extract_list_elements(json_data, 'Resources', ResourceDescription.from_json)
        erd._queues = extract_list_elements(json_data, 'Queues', Queue.from_json)
        return erd

    @property
    def auto_scaling_groups(self):
        """
 The AutoScalingGroups used by this environment.
\n"""
        return self._auto_scaling_groups

    @property
    def environment_name(self):
        """
 Environment name.
\n"""
        return self._environment_name

    @property
    def instances(self):
        """
The Amazon EC2 instances used by this environment.
\n"""
        return self._instances

    @property
    def launch_configurations(self):
        """
The Auto Scaling launch configurations in use by this environment.
\n"""
        return self._launch_configurations

    @property
    def load_balancers(self):
        """
The LoadBalancers in use by this environment.
\n"""
        return self._load_balancers

    @property
    def triggers(self):
        """The AutoScaling triggers in use by this environment.
\n"""
        return self._triggers

    @property
    def resources(self):
        return self._resources

    @property
    def queues(self):
        return self._queues

class ResourceProperty(BaseModel):

    def __init__(self):
        self._name = None
        self._value = None

    @classmethod
    def from_json(cls, json_data):
        """ Create instance of ResourceProperty from structured json data"""
        rp = cls()
        rp._name = json_data['Name']
        rp._value = json_data['Value']
        return rp

    @property
    def name(self):
        return self._name

    @property
    def value(self):
        return self._value

class ResourceDescription(BaseModel):

    def __init__(self):
        self._description = None
        self._logical_resource_id = None
        self._physical_resource_id = None
        self._properties = None
        self._type = None

    @classmethod
    def from_json(cls, json_data):
        """ Create instance of ResourceDescription from structured json data"""
        rd = cls()
        rd._description = json_data['Description']
        rd._logical_resource_id = json_data['LogicalResourceId']
        rd._physical_resource_id = json_data['PhysicalResourceId']
        rd._properties = extract_list_elements(json_data, 'Properties', ResourceProperty.from_json)
        rd._type = json_data['Type']
        return rd

    @property
    def description(self):
        return self._description

    @property
    def logical_resource_id(self):
        return self._logical_resource_id

    @property
    def physical_resource_id(self):
        return self._physical_resource_id

    @property
    def properties(self):
        return self._properties

    @property
    def type(self):
        return self._type

class Queue(BaseModel):

    def __init__(self):
        self._name = None
        self._url = None

    @classmethod
    def from_json(cls, json_data):
        """ Create instance of Queue from structured json data"""
        q = cls()
        q._name = json_data['Name']
        q._url = json_data['URL']
        return q

    @property
    def name(self):
        return self._name

    @property
    def url(self):
        return self._url

class EventDescription(BaseModel):
    """
Describes an event.
\n"""

    def __init__(self):
        self._application_name = None
        self._environment_name = None
        self._event_date = None
        self._event_date_raw = None
        self._message = None
        self._request_id = None
        self._severity = None
        self._template_name = None
        self._version_label = None

    @classmethod
    def from_json(cls, json_data):
        """ Create instance of EventDescription from structured json data"""
        ev = cls()
        ev._application_name = json_data['ApplicationName']
        ev._environment_name = json_data['EnvironmentName']
        ev._event_date_raw = json_data['EventDate']
        ev._event_date = datetime.datetime.fromtimestamp(ev._event_date_raw).\
            replace(microsecond=0)
        ev._message = json_data['Message']
        ev._request_id = json_data['RequestId']
        ev._severity = json_data['Severity']
        ev._template_name = json_data['TemplateName']
        ev._version_label = json_data['VersionLabel']
        return ev

    @property
    def application_name(self):
        """
The application associated with the event.
\n"""
        return self._application_name

    @property
    def environment_name(self):
        """
The name of the environment associated with this event.
\n"""
        return self._environment_name

    @property
    def event_date(self):
        """
The date when the event occurred.
\n"""
        return self._event_date

    @property
    def message(self):
        """
The event message.
\n"""
        return self._message

    @property
    def request_id(self):
        """
The web service request ID for the activity of this event.
\n"""
        return self._request_id

    @property
    def severity(self):
        """
The severity level of this event.
\n"""
        return self._severity

    @property
    def template_name(self):
        """
The name of the configuration associated with this event.
\n"""
        return self._template_name

    @property
    def version_label(self):
        """
The release label for the application version associated with this event.
\n"""
        return self._version_label

    @property
    def event_date_raw(self):
        return self._event_date_raw

class SolutionStackDescription(BaseModel):
    """
Describes the solution stack.
\n"""

    def __init__(self):
        self._solutionstack_name = None
        self._permitted_file_types = None

    @classmethod
    def from_json(cls, json_data):
        """ Create instance of SolutionStackDescription from structured json data"""
        ssd = cls()
        ssd._solutionstack_name = json_data['SolutionStackName']
        ssd._permitted_file_types = json_data['PermittedFileTypes']
        return ssd

    @property
    def solutionstack_name(self):
        """
The name of the solution stack.
\n"""
        return self._solutionstack_name

    @property
    def permitted_file_types(self):
        """
 The permitted file types allowed for a solution stack.
\n"""
        return self._permitted_file_types

class ConfigurationOptionDescription(BaseModel):
    """
 Describes the possible values for a configuration option.
\n"""

    def __init__(self):
        self._namespace = None
        self._name = None
        self._default_value = None
        self._change_severity = None
        self._user_defined = None
        self._value_type = None
        self._value_options = None
        self._min_value = None
        self._max_value = None
        self._max_length = None
        self._regex = None

    @classmethod
    def from_json(cls, json_data):
        """ Create instance of ConfigurationOptionDescription from structured json data"""
        co = cls()
        co._namespace = json_data['Namespace']
        co._name = json_data['Name']
        co._default_value = json_data['DefaultValue']
        co._change_severity = json_data['ChangeSeverity']
        co._user_defined = json_data['UserDefined']
        co._value_type = json_data['ValueType']
        co._value_options = json_data['ValueOptions']
        co._min_value = json_data['MinValue']
        co._max_value = json_data['MaxValue']
        co._max_length = json_data['MaxLength']
        co._regex = json_data['Regex']
        return co

    @property
    def namespace(self):
        """
 A unique namespace identifying the option's associated AWS resource.
\n"""
        return self._namespace

    @property
    def name(self):
        """
 The name of the configuration option.
\n"""
        return self._name

    @property
    def default_value(self):
        """
 The default value for this configuration option.
\n"""
        return self._default_value

    @property
    def change_severity(self):
        """

         An indication of which action is required if the value for this
         configuration option changes:

      <enumValues>
         <value name="NoInterruption">

               NoInterruption - There is no interruption to the
               environment or application availability.

         </value>
         <value name="RestartEnvironment">

               RestartEnvironment - The environment is
               restarted, all AWS resources are deleted and recreated, and
               the environment is unavailable during the process.

         </value>
         <value name="RestartApplicationServer">

               RestartApplicationServer - The environment is available
               the entire time. However, a short application
               outage occurs when the application servers on the running Amazon EC2 instances
               are restarted.

         </value>
      </enumValues>
        """
        return self._change_severity

    @property
    def user_defined(self):
        """

         An indication of whether the user defined this configuration option:

      <enumValues>
         <value name="true">

               true
               : This configuration option was defined by the user. It is a
               valid choice for specifying this as an Option to Remove when
               updating configuration settings.

         </value>
         <value name="false">

               false
               : This configuration was not defined by the user.

         </value>
      </enumValues>
        """
        return self._user_defined

    @property
    def value_type(self):
        """

         An indication of which type of values this option has and whether
         it is allowable to select one or more than one of the possible values:

      <enumValues>
         <value name="Scalar">

               Scalar
               : Values for this option are a single selection from the
               possible values, or a unformatted string or numeric value governed
               by the MIN/MAX/Regex constraints:

         </value>
         <value name="List">

               List
               : Values for this option are multiple selections of the
               possible values.

         </value>
         <value name="Boolean">

               Boolean
               : Values for this option are either
               true
               or
               false
               .

         </value>
      </enumValues>
        """
        return self._value_type

    @property
    def value_options(self):
        """
 If specified, values for the configuration option are selected
         from this list.
\n"""
        return self._value_options

    @property
    def min_value(self):
        """
 If specified, the configuration option must be a numeric value
         greater than this value.
\n"""
        return self._min_value

    @property
    def max_value(self):
        """
 If specified, the configuration option must be a numeric value less than this
         value.
\n"""
        return self._max_value

    @property
    def max_length(self):
        """
 If specified, the configuration option must be a string value no longer than
         this value.
\n"""
        return self._max_length

    @property
    def regex(self):
        """
 If specified, the configuration option must be a string value that satisfies
         this regular expression.
\n"""
        return self._regex

class OptionSepcification(BaseModel):
    """
 A specification identifying an individual configuration option.
\n"""
    def __init__(self, namespace = None, option_name = None):
        self._namespace = namespace
        self._option_name = option_name

    @classmethod
    def from_json(cls, json_data):
        """ Create instance of OptionSepcification from structured json data"""
        os = cls()
        os._namespace = json_data['Namespace']
        os._option_name = json_data['OptionName']
        return os

    @property
    def namespace(self):
        """
 A unique namespace identifying the option's associated AWS resource.
\n"""
        return self._namespace

    @property
    def option_name(self):
        """
 The name of the configuration option.
\n"""
        return self._option_name

class ConfigurationOptionSetting(BaseModel):
    """
 A specification identifying an individual configuration option along with its
         current value.
\n
    """

    def __init__(self, namespace = None, option_name = None, value = None):
        self._namespace = namespace
        self._option_name = option_name
        self._value = value

    @classmethod
    def from_json(cls, json_data):
        """ Create instance of ConfigurationOptionSetting from structured json data"""
        cos = cls()
        cos._namespace = json_data['Namespace']
        cos._option_name = json_data['OptionName']
        cos._value = json_data['Value']
        return cos

    @property
    def namespace(self):
        """
 A unique namespace identifying the option's associated AWS resource.
\n"""
        return self._namespace

    @property
    def option_name(self):
        """
 The name of the configuration option.
\n"""
        return self._option_name

    @property
    def value(self):
        """
 The current value for the configuration option.
\n"""
        return self._value

    @namespace.setter
    def namespace(self, namespace):
        self._namespace = namespace

    @option_name.setter
    def option_name(self, option_name):
        self._option_name = option_name

    @value.setter
    def value(self, value):
        self._value = value

class ConfigurationSettingsDescription(BaseModel):
    """
 Describes the settings for a configuration set.
\n"""

    def __init__(self):
        self._application_name = None
        self._date_created = None
        self._date_created_raw = None
        self._date_updated = None
        self._date_updated_raw = None
        self._deployment_status = None
        self._description = None
        self._environment_name = None
        self._option_settings = None
        self._solution_stack_name = None
        self._template_name = None

    @classmethod
    def from_json(cls, json_data):
        """ Create instance of ConfigurationSettingsDescription from structured json data"""
        csd = cls()
        csd._application_name = json_data['ApplicationName']
        csd._date_created_raw = json_data['DateCreated']
        csd._date_created = datetime.datetime.fromtimestamp(csd._date_created_raw).\
            replace(microsecond=0)
        csd._date_updated_raw = json_data['DateUpdated']
        csd._date_updated = datetime.datetime.fromtimestamp(csd._date_updated_raw).\
            replace(microsecond=0)
        csd._deployment_status = json_data['DeploymentStatus']
        csd._description = json_data['Description']
        csd._environment_name = json_data['EnvironmentName']
        csd._option_settings = extract_list_elements(json_data, 'OptionSettings', ConfigurationOptionSetting.from_json)
        csd._solution_stack_name = json_data['SolutionStackName']
        csd._template_name = json_data['TemplateName']
        return csd

    @property
    def application_name(self):
        """
 The name of the application associated with this configuration set.
\n"""
        return self._solution_stack_name

    @property
    def date_created(self):
        """
 The date (in UTC time) when this configuration set was created.
\n"""
        return self._date_created

    @property
    def date_updated(self):
        """
 The date (in UTC time) when this configuration set was last modified.
\n"""
        return self._date_updated

    @property
    def deployment_status(self):
        """

           If this configuration set is associated with an environment, the
           DeploymentStatus parameter indicates
           the deployment status of this configuration set:

        <enumValues>
           <value name="null">

                 null: This configuration is not associated with a running
                 environment.

           </value>
           <value name="pending">

                 pending: This is a draft configuration that is not deployed
                 to the
                 associated environment but is in the process of deploying.

           </value>
           <value name="deployed">

                 deployed: This is the configuration that is currently deployed
                 to the associated running environment.

           </value>
           <value name="failed">

                 failed: This is a draft configuration, that
                 failed to successfully deploy.

           </value>
        </enumValues>"""
        return self._deployment_status

    @property
    def description(self):
        """
 Describes this configuration set.
\n"""
        return self._description

    @property
    def environment_name(self):
        """
 If not null, the name of the environment for this configuration set.

\n"""
        return self._environment_name

    @property
    def option_settings(self):
        """
 A list of the configuration options and their values in this configuration
         set.
\n"""
        return self._option_settings

    @property
    def template_name(self):
        """
 The name of the solution stack this configuration set uses.
\n"""
        return self._template_name

    @property
    def solution_stack_name(self):
        """
 The name of the solution stack this configuration set uses.
\n"""
        return self._solution_stack_name

class ValidationMessage(BaseModel):
    """
 An error or warning for a desired configuration option value.
\n"""

    def __init__(self):
        self._message = None
        self._namespace = None
        self._option_name = None
        self._severity = None

    @classmethod
    def from_json(cls, json_data):
        """ Create instance of ValidationMessage from structured json data"""
        vm = cls()

        vm._message = json_data['Message']
        vm._namespace = json_data['Namespace']
        vm._option_name = json_data['OptionName']
        vm._severity = json_data['Severity']

        return vm

    @property
    def message(self):
        """
 A message describing the error or warning.
\n"""
        return self._message

    @property
    def severity(self):
        """
 An indication of the severity of this message:

      <enumValues>
         <value name="error">

               error: This message indicates that this is not a valid setting for an option.

         </value>
         <value name="warning">

               warning: This message is providing information you should take into
               account.

         </value>
      </enumValues>"""
        return self._severity

    @property
    def namespace(self):
        return self._namespace

    @property
    def option_name(self):
        return self._option_name

class EnvironmentInfoDescription(BaseModel):
    """
The information retrieved from the Amazon EC2 instances.
\n"""

    def __init__(self):
        self._info_type = None
        self._ec2_instance_id = None
        self._message = None
        self._sample_timestamp = None

    @classmethod
    def from_json(cls, json_data):
        """ Create instance of EnvironmentInfoDescription from structured json data"""
        eid = cls()
        eid._info_type = json_data['InfoType']
        eid._ec2_instance_id = json_data['Ec2InstanceId']
        eid._message = json_data['Message']
        eid._sample_timestamp = json_data['SampleTimestamp']

        return eid

    @property
    def info_type(self):
        """
The type of information retrieved.
\n"""
        return self._info_type

    @property
    def ec2_instance_id(self):
        """
The Amazon EC2 Instance ID for this information.
\n"""
        return self._ec2_instance_id

    @property
    def sample_timestamp(self):
        """
The time stamp when this information was retrieved.
\n"""
        return self._sample_timestamp

    @property
    def message(self):
        """
The retrieved information.
\n"""
        return self._message


text:
copyright:
  years: 2016,2017
lastupdated: "2017-04-27"
---

{:new_window: target="_blank"}
{:shortdesc: .shortdesc}
{:screen: .screen}
{:codeblock: .codeblock}
{:pre: .pre}

# Introdução ao Compose for RethinkDB
{: #getting-started-with-compose-for-rethinkdb}

O {{site.data.keyword.composeForRethinkDB}} dá a você um banco de dados distribuído, baseado em documento JSON, com um console integrado de administração e exploração. O RethinkDB usa a linguagem de consulta ReQL, que é construída com encadeamento de funções e está disponível nas bibliotecas do cliente para Java, JavaScript, Python e Ruby. Com a ReQL, é possível usar os recursos no lado do servidor RethinkDB, como junções e subconsultas distribuídas entre os nós do cluster. O RethinkDB também suporta índices secundários para melhor desempenho de consulta de leitura. O mais poderoso recurso do RethinkDB, changefeeds, permite que muitas consultas ReQL sejam convertidas em feeds em tempo real.
{:shortdesc}

**Nota:** todas as instâncias de serviço do Compose que foram
provisionadas antes de 14 de setembro de 2016 que ainda estiverem ativas poderão ser
usadas e acessadas diretamente em
[https://www.compose.com/](https://www.compose.com). Qualquer instância
de serviço do Compose que for provisionada desse ponto em diante será diretamente
acessada e usada dentro de sua conta do Bluemix.

Conclua estas etapas para obter uma introdução ao
{{site.data.keyword.composeForRethinkDB}}.

1. [Crie
uma instância do {{site.data.keyword.composeForRethinkDB}}](https://console.ng.bluemix.net/catalog/services/compose-for-rethinkdb/).

  Ao criar uma instância do serviço, assegure-se de escolher um nome para seu
serviço e um nome de credencial. Deixe o serviço desvinculado; é possível conectar um
aplicativo ao seu serviço mais tarde usando as credenciais que são fornecidas quando o
serviço é provisionado. Os diversos valores de credenciais são listados na seção
*Credenciais disponíveis*.

2. Conecte-se ao seu serviço do {{site.data.keyword.composeForRethinkDB}}.

   Para conectar um app ao seu serviço, use as [credenciais](./credentials.html) que são criadas com o serviço. O app de amostra demonstra como usar o Node.js para se conectar a um serviço do
{{site.data.keyword.composeForRethinkDB}}.

   Faça download do app de amostra [compose-rethinkdb-helloworld-nodejs](https://github.com/IBM-Bluemix/compose-rethinkdb-helloworld-nodejs) e siga as instruções no arquivo leia-me. Em seguida, na página de detalhes de seu aplicativo no Bluemix, clique em **Visualizar APP**.

redpajama_set_name: RedPajamaGithub


text:
/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package com.anggaranothing.pakar.dyslexia.model;

import java.io.Serializable;

/**
 *
 * @author AnggaraNothing
 */
public class Group implements Serializable {

    private int id;
    private String name;

    /**
     * Get group ID.
     * @return the id
     */
    public int getId() {
        return id;
    }

    /**
     * Set group ID.
     * @param id the id to set
     */
    public void setId(int id) {
        this.id = id;
    }

    /**
     * Get group name.
     * @return the name
     */
    public String getName() {
        return name;
    }

    /**
     * Set group name.
     * @param nama the name to set
     */
    public void setName(String nama) {
        this.name = nama;
    }

}


text:
#import <VectorKit/VKCameraController.h>

@class VKAnimation, VKCameraContext, VKMapModel;

// Not exported
@interface VKTrackingCameraController : VKCameraController
{
    id <VKTrackingCameraControllerDelegate> _trackingDelegate;
    int _viewStyle;
    int _focusStyle;
    VKAnimation *_animation;
    double _verticalGroundspan;
    double _verticalGroundspanScale;
    struct VKPoint _farthestPoi;
    CDStruct_b926a728 _puckPosition;
    struct VKPoint _puckTargetPosition;
    double _startZoomScale;
    double _endZoomScale;
    double _zoomScale;
    double _startPinchScale;
    VKMapModel *_mapModel;
    double _startTime;
    _Bool _animatingIn;
    double _startPitch;
    double _startCourse;
    double _startDistance;
    struct VKPoint _startPuckScreenPosition;
    id _completionHandler;
    double _puckOffset;
    struct VKPoint _previousReference;
    double _previousCourse;
    double _previousOffset;
    struct VKCircularBuffer<double> *_rotationRateBuffer;
    double _previousStepTime;
    VKAnimation *_tapZoomAnimation;
    double _tracePlaybackSpeedMultiplier;
    _Bool _receivedFirstUpdate;
    _Bool _puckAnimatorRunning;
    double _cruisePhi;
    double _cruiseHeight;
    double _cruisePhiOverride;
    double _cruiseHeightOverride;
    VKCameraContext *_lastCameraContext;
    _Bool _shouldLimitTopDownHeight;
    struct VKEdgeInsets _insets;
    _Bool _insetsAnimating;
    double _puckOffsetDelta;
    struct VKNavigationCameraModel _cameraModel;
    int _panStyle;
    struct State {
        State_3e0671f0 modelState;
        struct VKPoint puckPosition;
    } _panStartCameraState;
    Vec3Imp_f658403c _panCameraOffset;
    CDStruct_aa5aacbc _panCameraOrientation;
    struct {
        double x;
        double y;
        double z;
        double w;
    } _panCameraOrientationQuaternion;
    double _panReturnStartTime;
    struct CGPoint _startPanPoint;
    double _panCourseOffset;
    double _panPitchOffset;
    VKAnimation *_panAnimation;
    _Bool _panning;
    double _pitchOffset;
    VKAnimation *_pitchAnimation;
    _Bool _pitching;
    _Bool _zooming;
    double _userZoomFocusStyleZoomScale;
    double _userZoomFocusStyleMinZoomScale;
    double _userZoomFocusStyleMaxZoomScale;
    VKAnimation *_zoomScaleAnimation;
    VKAnimation *_horizontalOffsetAnimation;
    double _horizontalOffset;
}

@property(nonatomic) double verticalGroundspanScale; // @synthesize verticalGroundspanScale=_verticalGroundspanScale;
@property(nonatomic) int panStyle; // @synthesize panStyle=_panStyle;
@property(nonatomic) _Bool shouldLimitTopDownHeight; // @synthesize shouldLimitTopDownHeight=_shouldLimitTopDownHeight;
@property(nonatomic) double tracePlaybackSpeedMultiplier; // @synthesize tracePlaybackSpeedMultiplier=_tracePlaybackSpeedMultiplier;
@property(retain, nonatomic) VKMapModel *mapModel; // @synthesize mapModel=_mapModel;
@property(nonatomic) id <VKTrackingCameraControllerDelegate> trackingDelegate; // @synthesize trackingDelegate=_trackingDelegate;
- (id).cxx_construct;
- (void)stopPitchingWithFocusPoint:(struct CGPoint)arg1;
- (void)updatePitchWithFocusPoint:(struct CGPoint)arg1 translation:(double)arg2;
- (void)startPitchingWithFocusPoint:(struct CGPoint)arg1;
- (void)pan:(struct CGPoint)arg1 worldDelta:(const Vec3Imp_f658403c *)arg2;
- (void)stopPanning:(struct CGPoint)arg1;
- (void)startPanning:(struct CGPoint)arg1;
- (void)canvasFrameDidChange;
- (id)detailedDescription;
- (void)stopPinchingWithFocusPoint:(struct CGPoint)arg1;
- (void)updatePinchWithFocusPoint:(struct CGPoint)arg1 oldFactor:(double)arg2 newFactor:(double)arg3;
- (void)startPinchingWithFocusPoint:(struct CGPoint)arg1;
- (void)zoom:(double)arg1 relativeToPoint:(struct CGPoint)arg2 completionHandler:(id)arg3;
- (void)_startTapZoomAnimationFrom:(double)arg1 to:(double)arg2 completionHandler:(id)arg3;
- (void)setGesturing:(_Bool)arg1;
@property(nonatomic) double userZoomFocusStyleMaxGroundspanMeters;
@property(nonatomic) double userZoomFocusStyleMinGroundspanMeters;
@property(nonatomic) double userZoomFocusStyleGroundspanMeters;
- (double)relevantZoomScale;
- (void)setRelevantZoomScale:(double)arg1;
- (void)_resumeAnimationIfNecessary;
- (void)setUserZoomFocusStyleZoomScale:(double)arg1;
@property(nonatomic) double zoomScale;
- (_Bool)isAtDefaultZoomScale;
- (void)_updateCruiseHeightAndPhi;
- (void)_updateCameraForStartAnimation:(double)arg1 position:(struct VKPoint)arg2 orientation:(const CDStruct_aa5aacbc *)arg3;
- (void)_step;
- (void)_updateVerticalGroundspanForCameraContext:(id)arg1 reference:(struct VKPoint)arg2 focus:(struct VKPoint)arg3 offset:(double)arg4;
- (void)puckAnimator:(id)arg1 updatedTargetPosition:(struct VKPoint)arg2;
- (void)puckAnimatorDidStop:(id)arg1;
- (void)puckAnimator:(id)arg1 updatedPosition:(CDStruct_b926a728 *)arg2;
- (void)resumeIfNeeded;
- (void)pauseIfNeeded;
- (_Bool)isGesturing;
- (void)updateCameraContext:(id)arg1;
- (void)dealloc;
- (void)stop;
- (void)startWithPounce:(_Bool)arg1 pounceCompletionHandler:(id)arg2;
- (void)setPuckHorizontalOffset:(double)arg1 duration:(double)arg2 timingFunction:(id)arg3;
- (void)edgeInsetsDidEndAnimating;
- (void)edgeInsetsWillBeginAnimating;
- (void)setEdgeInsets:(struct VKEdgeInsets)arg1;
- (void)observeValueForKeyPath:(id)arg1 ofObject:(id)arg2 change:(id)arg3 context:(void *)arg4;
- (id)init;

@end


text:
/*jslint vars: true, plusplus: true, devel: true, nomen: true, indent: 4, forin: true, maxerr: 50, regexp: true */
/*global brackets, define, $, less, window, XMLHttpRequest */

/**
 * main integrates LiveDevelopment into Brackets
 *
 * This module creates two menu items:
 *
 *  "Go Live": open or close a Live Development session and visualize the status
 *  "Highlight": toggle source highlighting
 *
 * @require DocumentManager
 */
define(function main(require, exports, module) {
    "use strict";

    var DocumentManager     = require("document/DocumentManager"),
        Commands            = require("command/Commands"),
        AppInit             = require("utils/AppInit"),
        LiveDevelopment     = require("LiveDevelopment/LiveDevelopment"),
        Inspector           = require("LiveDevelopment/Inspector/Inspector"),
        CommandManager      = require("command/CommandManager"),
        PreferencesManager  = require("preferences/PreferencesManager"),
        Dialogs             = require("widgets/Dialogs"),
        UrlParams           = require("utils/UrlParams").UrlParams,
        Strings             = require("strings");

    var PREFERENCES_KEY = "com.adobe.brackets.live-development";
    var prefs;
    var params = new UrlParams();
    var config = {
        experimental: false, // enable experimental features
        debug: true, // enable debug output and helpers
        autoconnect: false, // go live automatically after startup?
        highlight: false, // enable highlighting?
        highlightConfig: { // the highlight configuration for the Inspector
            borderColor:  {r: 255, g: 229, b: 153, a: 0.66},
            contentColor: {r: 111, g: 168, b: 220, a: 0.55},
            marginColor:  {r: 246, g: 178, b: 107, a: 0.66},
            paddingColor: {r: 147, g: 196, b: 125, a: 0.66},
            showInfo: true
        }
    };
    var _checkMark = "✓"; // Check mark character
    // Status labels/styles are ordered: error, not connected, progress1, progress2, connected.
    var _statusTooltip = [Strings.LIVE_DEV_STATUS_TIP_NOT_CONNECTED, Strings.LIVE_DEV_STATUS_TIP_NOT_CONNECTED,
                          Strings.LIVE_DEV_STATUS_TIP_PROGRESS1, Strings.LIVE_DEV_STATUS_TIP_PROGRESS2,
                          Strings.LIVE_DEV_STATUS_TIP_CONNECTED, Strings.LIVE_DEV_STATUS_TIP_OUT_OF_SYNC];  // Status indicator tooltip
    var _statusStyle = ["warning", "", "info", "info", "success", "out-of-sync"];  // Status indicator's CSS class
    var _allStatusStyles = _statusStyle.join(" ");

    var _$btnGoLive; // reference to the GoLive button
    var _$btnHighlight; // reference to the HighlightButton

    /** Load Live Development LESS Style */
    function _loadStyles() {
        var request = new XMLHttpRequest();
        request.open("GET", "LiveDevelopment/main.less", true);
        request.onload = function onLoad(event) {
            var parser = new less.Parser();
            parser.parse(request.responseText, function onParse(err, tree) {
                console.assert(!err, err);
                $("")
                    .appendTo(window.document.head);
            });
        };
        request.send(null);
    }

    /**
     * Change the appearance of a button. Omit text to remove any extra text; omit style to return to default styling;
     * omit tooltip to leave tooltip unchanged.
     */
    function _setLabel($btn, text, style, tooltip) {
        // Clear text/styles from previous status
        $("span", $btn).remove();
        $btn.removeClass(_allStatusStyles);

        // Set text/styles for new status
        if (text && text.length > 0) {
            $("")
                .addClass(style)
                .text(text)
                .appendTo($btn);
        } else {
            $btn.addClass(style);
        }

        if (tooltip) {
            $btn.attr("title", tooltip);
        }
    }

    /** Toggles LiveDevelopment and synchronizes the state of UI elements that reports LiveDevelopment status */
    function _handleGoLiveCommand() {
        if (LiveDevelopment.status >= LiveDevelopment.STATUS_CONNECTING) {
            LiveDevelopment.close();
        } else {
            if (!params.get("skipLiveDevelopmentInfo") && !prefs.getValue("afterFirstLaunch")) {
                prefs.setValue("afterFirstLaunch", "true");
                Dialogs.showModalDialog(
                    Dialogs.DIALOG_ID_INFO,
                    Strings.LIVE_DEVELOPMENT_INFO_TITLE,
                    Strings.LIVE_DEVELOPMENT_INFO_MESSAGE
                ).done(function (id) {
                    LiveDevelopment.open();
                });
            } else {
                LiveDevelopment.open();
            }
        }
    }

    /** Create the menu item "Go Live" */
    function _setupGoLiveButton() {
        _$btnGoLive = $("#toolbar-go-live");
        _$btnGoLive.click(function onGoLive() {
            _handleGoLiveCommand();
        });
        $(LiveDevelopment).on("statusChange", function statusChange(event, status) {
            // status starts at -1 (error), so add one when looking up name and style
            // See the comments at the top of LiveDevelopment.js for details on the
            // various status codes.
            _setLabel(_$btnGoLive, null, _statusStyle[status + 1], _statusTooltip[status + 1]);
            if (config.autoconnect) {
                window.sessionStorage.setItem("live.enabled", status === 3);
            }
        });

        // Initialize tooltip for 'not connected' state
        _setLabel(_$btnGoLive, null, _statusStyle[1], _statusTooltip[1]);
    }

    /** Maintains state of the Live Preview menu item */
    function _setupGoLiveMenu() {
        $(LiveDevelopment).on("statusChange", function statusChange(event, status) {
            // Update the checkmark next to 'Live Preview' menu item
            // Add checkmark when status is STATUS_ACTIVE; otherwise remove it
            CommandManager.get(Commands.FILE_LIVE_FILE_PREVIEW).setChecked(status === LiveDevelopment.STATUS_ACTIVE);
        });
    }

    /** Create the menu item "Highlight" */
    function _setupHighlightButton() {
        // TODO: this should be moved into index.html like the Go Live button once it's re-enabled
        _$btnHighlight = $("Highlight ");
        $(".nav").append($("
").append(_$btnHighlight));
        _$btnHighlight.click(function onClick() {
            config.highlight = !config.highlight;
            if (config.highlight) {
                _setLabel(_$btnHighlight, _checkMark, "success");
            } else {
                _setLabel(_$btnHighlight);
                LiveDevelopment.hideHighlight();
            }
        });
        if (config.highlight) {
            _setLabel(_$btnHighlight, _checkMark, "success");
        }
    }

    /** Setup window references to useful LiveDevelopment modules */
    function _setupDebugHelpers() {
        window.ld = LiveDevelopment;
        window.i = Inspector;
        window.report = function report(params) { window.params = params; console.info(params); };
    }

    /** Initialize LiveDevelopment */
    function init() {
        prefs = PreferencesManager.getPreferenceStorage(PREFERENCES_KEY);
        params.parse();

        Inspector.init(config);
        LiveDevelopment.init(config);
        _loadStyles();
        _setupGoLiveButton();
        _setupGoLiveMenu();

        /* _setupHighlightButton(); FUTURE - Highlight button */
        if (config.debug) {
            _setupDebugHelpers();
        }

        // trigger autoconnect
        if (config.autoconnect && window.sessionStorage.getItem("live.enabled") === "true") {
            AppInit.appReady(function () {
                if (DocumentManager.getCurrentDocument()) {
                    _handleGoLiveCommand();
                }
            });
        }
    }
    window.setTimeout(init);

    CommandManager.register(Strings.CMD_LIVE_FILE_PREVIEW,  Commands.FILE_LIVE_FILE_PREVIEW, _handleGoLiveCommand);

    // Export public functions
    exports.init = init;
});


text:
package com.knockturnmc.api.ext.loader.descriptors;

import com.knockturnmc.api.ext.loader.ModuleLoaderException;

import java.io.File;
import java.io.IOException;
import java.io.InputStream;
import java.util.*;
import java.util.zip.ZipEntry;
import java.util.zip.ZipFile;

public class ModulePropertyDescriptor implements ModuleDescriptor {

    private Properties properties;

    private File sourceFile;

    public ModulePropertyDescriptor(File sourceFile) {
        if (sourceFile == null) throw new NullPointerException("Source file for module was null!");

        this.sourceFile = sourceFile;
        this.properties = new Properties();
    }

    /**
     * Loads the module descriptor from the zip file
     */
    @Override
    public void load() {
        try (ZipFile zip = new ZipFile(this.sourceFile)) {

            ZipEntry entry = zip.getEntry("module.properties");
            if (entry == null) throw new ModuleLoaderException("Could not load module as it is missing a module.properties file");

            try (InputStream propertiesStream = zip.getInputStream(entry)) {
                this.properties.load(propertiesStream);
            }
        } catch (IOException e) {
            throw new ModuleLoaderException("Could not load the module " + this.sourceFile.getName() + " as it isn't a zip file");
        }
    }

    /**
     * Returns the module's name
     *
     * @return the name
     */
    @Override
    public String getName() {
        return properties.getProperty("name", sourceFile.getName());
    }

    /**
     * Returns the author
     *
     * @return the author
     */
    @Override
    public String getAuthor() {
        return properties.getProperty("author", "");
    }

    /**
     * Returns the module version
     *
     * @return the version
     */
    @Override
    public String getVersion() {
        return properties.getProperty("version", "");
    }

    /**
     * Returns the dependencies this module has
     *
     * @return the dependencies
     */
    @Override
    public Collection<String> getDependencies() {
        List<String> dependencies = new ArrayList<>(Arrays.asList(properties.getProperty("dependencies", "").split(",")));
        dependencies.removeIf(String::isEmpty);
        return dependencies;
    }

    /**
     * Returns the module class that this module contains
     *
     * @return the class
     */
    @Override
    public Optional<String> getModuleClassName() {
        return Optional.ofNullable(properties.getProperty("main"));
    }

    /**
     * Returns the file this module descriptor is pointing at
     *
     * @return the file
     */
    @Override
    public File getFile() {
        return sourceFile;
    }

    /**
     * Returns if the module is designed to be reloadble
     *
     * @return the module
     */
    @Override
    public boolean isReloadable() {
        return Boolean.parseBoolean(properties.getProperty("reloadable", "true"));
    }
}


text:
pip install Flask
pip install flask-script
pip install flask-wtf WTForms
pip install flask-sqlalchemy
pip install MySQL-python
pip install Flask-Admin
pip install Flask-Login
pip install Flask-QRcode
pip install pyotp

# Third party packages
pip install dropbox
pip install --upgrade google-api-python-client


text:
require 'rubygems'

ENV['RAILS_RELATIVE_URL_ROOT']='/appname'

gem 'rails', '~>3'
require 'active_support'
require 'action_controller'
require 'active_support/test_case'
require 'test/unit'
require 'rails'

RAILS_ROOT='.'
AUTH_LOG_DIR = File.join(RAILS_ROOT,'log')
Dir.mkdir(AUTH_LOG_DIR) unless File.directory?(AUTH_LOG_DIR)

module Rails
  def Rails.root
    '.'
  end
end

Rails.application = Rails::Application.instance_exec { new }

Rails.application.routes.draw do
  match '/dummy/very_low_security', :controller => :dummy, :action => :very_low_security
end


text:
<title>Common Blocks - STABS</title>
<meta http-equiv="Content-Type" content="text/html">
<meta name="description" content="STABS">
<meta name="generator" content="makeinfo 4.11">
<link title="Top" rel="start" href="index.html#Top">
<link rel="up" href="Variables.html#Variables" title="Variables">
<link rel="prev" href="Register-Variables.html#Register-Variables" title="Register Variables">
<link rel="next" href="Statics.html#Statics" title="Statics">
<link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage">

<meta http-equiv="Content-Style-Type" content="text/css">

Next: Statics,
Previous: Register Variables,
Up: Variables

4.4 Common Blocks

A common block is a statically allocated section of memory which can be
referred to by several source files.  It may contain several variables.
I believe Fortran is the only language with this feature.

A N_BCOMM stab begins a common block and an N_ECOMM stab
ends it.  The only field that is significant in these two stabs is the
string, which names a normal (non-debugging) symbol that gives the
address of the common block.  According to IBM documentation, only the
N_BCOMM has the name of the common block (even though their
compiler actually puts it both places).

The stabs for the members of the common block are between the
N_BCOMM and the N_ECOMM; the value of each stab is the
offset within the common block of that variable.  IBM uses the
C_ECOML stab type, and there is a corresponding N_ECOML
stab type, but Sun's Fortran compiler uses N_GSYM instead.  The
variables within a common block use the ‘<samp>V</samp>’ symbol descriptor (I
believe this is true of all Fortran variables).  Other stabs (at least
type declarations using C_DECL) can also be between the
N_BCOMM and the N_ECOMM.


text:
import { LiveAnnouncer } from '@angular/cdk/a11y';
import { Component } from '@angular/core';
import { FileUploader } from 'ng2-file-upload';
import { BaseDocumentationSection } from '../../../../../components/base-documentation-section/base-documentation-section';
import { DocumentationSectionComponent } from '../../../../../decorators/documentation-section-component';
import { IPlayground } from '../../../../../interfaces/IPlayground';
import { IPlaygroundProvider } from '../../../../../interfaces/IPlaygroundProvider';

@Component({
    selector: 'uxd-components-file-upload',
    templateUrl: './file-upload.component.html'
})
@DocumentationSectionComponent('ComponentsFileUploadComponent')
export class ComponentsFileUploadComponent extends BaseDocumentationSection implements IPlaygroundProvider {

    fileOver: boolean = false;
    uploader: FileUploader = new FileUploader({});

    playground: IPlayground = {
        files: {
            'app.component.html': this.snippets.raw.appHtml,
            'app.component.ts': this.snippets.raw.appTs
        },
        modules: [
            {
                imports: ['FileUploadModule'],
                library: 'ng2-file-upload'
            },
            {
                imports: ['ProgressBarModule'],
                library: '@ux-aspects/ux-aspects'
            },
            {
                imports: ['A11yModule'],
                library: '@angular/cdk/a11y'
            }
        ]
    };

    constructor(announcer: LiveAnnouncer) {
        super(require.context('./snippets/', false, /\.(html|css|js|ts)$/));

        this.uploader.onCompleteAll = () => announcer.announce('All files have been uploaded.');
    }

}


text:
<?php

namespace emilkm\tests\asset\value;

/**
 * @author  Emil Malinov
 * @package efxphp
 * @subpackage tests
 */
class VoExplicitTypeNotSet
{
}


text:
package com.vmware.vim25;

/**
* @author Steve Jin (http://www.doublecloud.org)
* @version 5.1
*/

public enum VirtualDiskType {
  preallocated ("preallocated"),
  thin ("thin"),
  seSparse ("seSparse"),
  rdm ("rdm"),
  rdmp ("rdmp"),
  raw ("raw"),
  delta ("delta"),
  sparse2Gb ("sparse2Gb"),
  thick2Gb ("thick2Gb"),
  eagerZeroedThick ("eagerZeroedThick"),
  sparseMonolithic ("sparseMonolithic"),
  flatMonolithic ("flatMonolithic"),
  thick ("thick");

  @SuppressWarnings("unused")
  private final String val;
  private VirtualDiskType(String val)
  {
    this.val = val;
  }
}


text:
<div xmlns:f="http://typo3.org/ns/fluid/ViewHelpers" xmlns="http://www.w3.org/1999/xhtml"
     lang="en">
	<f:section name="Default">
		<!-- theme_bootstrap_highland: Partials/Content/Menu.html [begin] -->

		<div id="partialContentMenu" class="content-column">
			<!--TYPO3SEARCH_begin-->
			<f:cObject typoscriptObjectPath="lib.content.menu"/>
			<!--TYPO3SEARCH_end-->
		</div>

		<!-- theme_bootstrap_highland: Partials/Content/Menu.html [end] -->
	</f:section>
</div>


text:
package io.pivotal.literx;

import java.time.Duration;

import io.pivotal.literx.domain.User;
import org.junit.jupiter.api.Test;
import reactor.core.publisher.Flux;
import reactor.core.publisher.Mono;

/**
 * Learn how to use StepVerifier to test Mono, Flux or any other kind of Reactive Streams Publisher.
 *
 * @author Sebastien Deleuze
 * @see StepVerifier Javadoc
 */
public class Part03StepVerifierTest {

	Part03StepVerifier workshop = new Part03StepVerifier();

//========================================================================================

	@Test
	public void expectElementsThenComplete() {
		workshop.expectFooBarComplete(Flux.just("foo", "bar"));
	}

//========================================================================================

	@Test
	public void expect2ElementsThenError() {
		workshop.expectFooBarError(Flux.just("foo", "bar").concatWith(Mono.error(new RuntimeException())));
	}

//========================================================================================

	@Test
	public void expectElementsWithThenComplete() {
		workshop.expectSkylerJesseComplete(Flux.just(new User("swhite", null, null), new User("jpinkman", null, null)));
	}

//========================================================================================

	@Test
	public void count() {
		workshop.expect10Elements(Flux.interval(Duration.ofSeconds(1)).take(10));
	}

//========================================================================================

	@Test
	public void countWithVirtualTime() {
		workshop.expect3600Elements(() -> Flux.interval(Duration.ofSeconds(1)).take(3600));
	}

}


text:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">

<meta name="collection" content="api">

<TITLE>
InvokeHandler (Java 2 Platform SE 5.0)
</TITLE>

<META NAME="keywords" CONTENT="org.omg.CORBA.portable.InvokeHandler interface">
<META NAME="keywords" CONTENT="_invoke()">

<LINK REL ="stylesheet" TYPE="text/css" HREF="../../../../stylesheet.css" TITLE="Style">

      Overview
      Package
    Class
      Use
      Tree
      Deprecated
      Index
      Help

JavaTM 2 Platform
Standard Ed. 5.0

 PREV CLASS
 NEXT CLASS

  FRAMES
 NO FRAMES

  All Classes

  SUMMARY: NESTED | FIELD | CONSTR | METHOD

DETAIL: FIELD | CONSTR | METHOD

org.omg.CORBA.portable

Interface InvokeHandler

All Known Subinterfaces:
Tie

All Known Implementing Classes:
BindingIteratorPOA, NamingContextExtPOA, NamingContextPOA, ServantActivatorPOA, ServantLocatorPOA

public interface InvokeHandler

This interface provides a dispatching mechanism for an incoming call.
It is invoked by the ORB to dispatch a request to a servant.

Method Summary

 OutputStream
_invoke(String method,
        InputStream input,
        ResponseHandler handler)

          Invoked by the ORB to dispatch a request to the servant.

Method Detail

_invoke

OutputStream _invoke(String method,
                     InputStream input,
                     ResponseHandler handler)
                     throws SystemException

Invoked by the ORB to dispatch a request to the servant.

 ORB passes the method name, an InputStream containing the
 marshalled arguments, and a ResponseHandler which the servant
 uses to construct a proper reply.

 Only CORBA SystemException may be thrown by this method.

 The method must return an OutputStream created by the
 ResponseHandler which contains the marshalled reply.

 A servant must not retain a reference to the ResponseHandler
 beyond the lifetime of a method invocation.

 Servant behaviour is defined as follows:

1. Determine correct method, and unmarshal parameters from
    InputStream.

2. Invoke method implementation.

3. If no user exception, create a normal reply using
    ResponseHandler.

4. If user exception occurred, create exception reply using
    ResponseHandler.

5. Marshal reply into OutputStream returned by
    ResponseHandler.

6. Return OutputStream to ORB.

Parameters:
method - The method name.
input - The InputStream containing the marshalled arguments.
handler - The ResponseHandler which the servant uses
 to construct a proper reply

Returns:
The OutputStream created by the
 ResponseHandler which contains the marshalled reply

Throws:

SystemException - is thrown when invocation fails due to a CORBA system exception.

      Overview
      Package
    Class
      Use
      Tree
      Deprecated
      Index
      Help

JavaTM 2 Platform
Standard Ed. 5.0

 PREV CLASS
 NEXT CLASS

  FRAMES
 NO FRAMES

  All Classes

  SUMMARY: NESTED | FIELD | CONSTR | METHOD

DETAIL: FIELD | CONSTR | METHOD

Submit a bug or feature
For further API reference and developer documentation, see Java 2 SDK SE Developer Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 2004, 2010 Oracle and/or its affiliates. All rights reserved. Use is subject to license terms. Also see the documentation redistribution policy.


text:
<?php

namespace DirkGroenen\Pinterest\Exceptions;

class InvalidEndpointException extends \Exception {

}


text:
package com.blockwithme.generic;

/**
 * LongFixedBooleanGenericObjectAccessor implements IGenericObjectAccessor using longs.
 * Booleans are fixed to 64. Instances are not immutable/thread-safe.
 * Using float and doubles require a native call, and so goes slower.
 *
 * @see IGenericObjectAccessor for more documentation.
 *
 * @author monster
 */
@GwtIncompatible
public class LongFixedBooleanGenericObjectAccessor implements
        IGenericObjectAccessor<Object[]> {
    /** Initial index (not boolean). */
    private static final int START_INDEX = 1;
    /** Minimum size (not boolean) */
    private static final int MIN_SIZE = 8 + 1 /* +1 either for long[] or booleans) */;
    /** Maximum size (not boolean) */
    private static final int MAX_SIZE = Integer.MAX_VALUE - 1;
    /** Initial boolean index. */
    private static final int START_BOOLEAN_INDEX = 0;
    /** Maximum boolean size */
    private static final int MAX_BOOLEAN_SIZE = 64;

    //////////////////////////////////////////////////////////////////////////

    /**
     * Validates the non-boolean index.
     *
     * @param index The non-boolean index
     */
    private static void checkNonBooleanIndex(final int index) {
        if ((index < START_INDEX) || (index >= MAX_SIZE)) {
            throw new IllegalArgumentException("index: " + index
                    + " must be withing [" + START_INDEX + ", "
                    + (MAX_SIZE - 1) + "]");
        }
    }

    /**
     * Validates the boolean index.
     *
     * @param index The boolean index
     */
    private static void checkBooleanIndex(final int index) {
        if ((index < START_BOOLEAN_INDEX) || (index >= MAX_BOOLEAN_SIZE)) {
            throw new IllegalArgumentException("index: " + index
                    + " must be withing [" + START_BOOLEAN_INDEX + ", "
                    + (MAX_BOOLEAN_SIZE - 1) + "]");
        }
    }

    /** Computes a "new size" */
    private static int newSize(final int reservedSize, final String name) {
        if ((reservedSize < 0) || (reservedSize > MAX_SIZE)) {
            throw new IllegalArgumentException(name + ": " + reservedSize);
        }
        final int newSize;
        if (reservedSize > (MIN_SIZE - START_INDEX)) {
            final int powerOfTwo = 32 - Integer
                    .numberOfLeadingZeros(reservedSize - 1);
            if (powerOfTwo == 31) {
                // Cannot represent (1 << 31) correctly
                newSize = Integer.MAX_VALUE;
            } else {
                newSize = (1 << powerOfTwo) + 1 /* For booleans */;
            }
        } else {
            newSize = MIN_SIZE;
        }
        return newSize;
    }

    /** Returns the primitive array */
    private static long[] getPrimitiveArray(final Object[] instance) {
        return (long[]) instance[0];
    }

    //////////////////////////////////////////////////////////////////////////

    /**
     * @see IGenericObjectAccessor#isBooleanValuesIDSpaceIndependentFromPrimitive()
     */
    public static boolean _isBooleanValuesIDSpaceIndependentFromPrimitive() {
        return true;
    }

    /**
     * @see IGenericObjectAccessor#isBooleanValuesIDSpaceFixed()
     */
    public static boolean _isBooleanValuesIDSpaceFixed() {
        return true;
    }

    /**
     * @see IGenericObjectAccessor#isPrimitiveValuesIDSpaceIndependentFromObject()
     */
    public static boolean _isPrimitiveValuesIDSpaceIndependentFromObject() {
        return true;
    }

    /**
     * @see IGenericObjectAccessor#getBooleanValuesIDSpaceFixedSize()
     */
    public static int _getBooleanValuesIDSpaceFixedSize() {
        return MAX_BOOLEAN_SIZE;
    }

    /**
     * @see IGenericObjectAccessor#isImmutableInstancesUsed()
     */
    public static boolean _isImmutableInstancesUsed() {
        return false;
    }

    /**
     * @see IGenericObjectAccessor#isThreadSafeInstancesUsed()
     */
    public static boolean _isThreadSafeInstancesUsed() {
        return false;
    }

    /**
     * @see IGenericObjectAccessor#isLongUsingTwoPrimitiveSlots()
     */
    public static boolean _isLongUsingTwoPrimitiveSlots() {
        return false;
    }

    /**
     * @see IGenericObjectAccessor#isDoubleUsingTwoPrimitiveSlots()
     */
    public static boolean _isDoubleUsingTwoPrimitiveSlots() {
        return false;
    }

    //////////////////////////////////////////////////////////////////////////

    /**
     * @see IGenericObjectAccessor#isOptimalPackingUsedForPrimitiveValues()
     */
    public static boolean _isOptimalPackingUsedForPrimitiveValues() {
        return false;
    }

    /**
     * @see IGenericObjectAccessor#isOptimalPackingUsedForBooleanValues()
     */
    public static boolean _isOptimalPackingUsedForBooleanValues()
            throws UnsupportedOperationException {
        // Fixed-size means NOT optimal
        return false;
    }

    /**
     * @see IGenericObjectAccessor#isOptimalPackingUsedForObjectValues()
     */
    public static boolean _isOptimalPackingUsedForObjectValues() {
        return false;
    }

    //////////////////////////////////////////////////////////////////////////

    /**
     * @see IGenericObjectAccessor#getPrimitiveValuesStartIndex()
     */
    public static int _getPrimitiveValuesStartIndex() {
        return START_INDEX;
    }

    /**
     * @see IGenericObjectAccessor#getBooleanValuesStartIndex()
     */
    public static int _getBooleanValuesStartIndex()
            throws UnsupportedOperationException {
        return START_BOOLEAN_INDEX;
    }

    /**
     * @see IGenericObjectAccessor#getObjectValuesStartIndex()
     */
    public static int _getObjectValuesStartIndex() {
        return START_INDEX;
    }

    //////////////////////////////////////////////////////////////////////////

    /**
     * @see IGenericObjectAccessor#getPrimitiveValuesMaximumCount()
     */
    public static int _getPrimitiveValuesMaximumCount() {
        return MAX_SIZE;
    }

    /**
     * @see IGenericObjectAccessor#getBooleanValuesMaximumCount()
     */
    public static int _getBooleanValuesMaximumCount()
            throws UnsupportedOperationException {
        return MAX_BOOLEAN_SIZE;
    }

    /**
     * @see IGenericObjectAccessor#getObjectValuesMaximumCount()
     */
    public static int _getObjectValuesMaximumCount() {
        return MAX_SIZE;
    }

    //////////////////////////////////////////////////////////////////////////

    /**
     * @see IGenericObjectAccessor#newEmptyGenericObject()
     */
    public static Object[] _newEmptyGenericObject() {
        final Object[] result = new Object[MIN_SIZE];
        result[0] = new long[MIN_SIZE];
        return result;
    }

    /**
     * @see IGenericObjectAccessor#newGenericObject(int,int,int)
     */
    public static Object[] _newGenericObject(final int requiredPrimitiveSlots,
            final int requiredBooleanSlots, final int requiredObjectSlots)
            throws UnsupportedOperationException {
        throw new UnsupportedOperationException("Boolean ID Space is fixed");
    }

    /**
     * @see IGenericObjectAccessor#newGenericObject(int,int)
     */
    public static Object[] _newGenericObject(final int requiredPrimitiveSlots,
            final int requiredObjectSlots) {
        final int newPrimitiveSize = newSize(requiredPrimitiveSlots,
                "requiredPrimitiveSlots");
        final int newObjectSize = newSize(requiredObjectSlots,
                "requiredObjectSlots");
        final Object[] result = new Object[newObjectSize];
        result[0] = new long[newPrimitiveSize];
        return result;
    }

    //////////////////////////////////////////////////////////////////////////

    /**
     * @see IGenericObjectAccessor#getPrimitiveValuesMaximumIndex(Object)
     */
    public static int _getPrimitiveValuesMaximumIndex(final Object[] instance) {
        return getPrimitiveArray(instance).length - (1 + START_INDEX);
    }

    /**
     * @see IGenericObjectAccessor#getBooleanValuesMaximumIndex(Object)
     */
    public static int _getBooleanValuesMaximumIndex(final Object[] instance)
            throws UnsupportedOperationException {
        return MAX_BOOLEAN_SIZE - (1 + START_BOOLEAN_INDEX);
    }

    /**
     * @see IGenericObjectAccessor#getObjectValuesMaximumIndex(Object)
     */
    public static int _getObjectValuesMaximumIndex(final Object[] instance) {
        return instance.length - (1 + START_INDEX);
    }

    //////////////////////////////////////////////////////////////////////////

    /**
     * @see IGenericObjectAccessor#getPrimitiveValuesSlotsAvailable(Object)
     */
    public static int _getPrimitiveValuesSlotsAvailable(final Object[] instance) {
        return getPrimitiveArray(instance).length - START_INDEX;
    }

    /**
     * @see IGenericObjectAccessor#getBooleanValuesSlotsAvailable(Object)
     */
    public static int _getBooleanValuesSlotsAvailable(final Object[] instance)
            throws UnsupportedOperationException {
        return MAX_BOOLEAN_SIZE - START_BOOLEAN_INDEX;
    }

    /**
     * @see IGenericObjectAccessor#getObjectValuesSlotsAvailable(Object)
     */
    public static int _getObjectValuesSlotsAvailable(final Object[] instance) {
        return instance.length - START_INDEX;
    }

    //////////////////////////////////////////////////////////////////////////

    /**
     * @see IGenericObjectAccessor#getPrimitiveValuesReservedSize(Object)
     */
    public static int _getPrimitiveValuesReservedSize(final Object[] instance)
            throws UnsupportedOperationException {
        throw new UnsupportedOperationException(
                "Reserved size is not available");
    }

    /**
     * @see IGenericObjectAccessor#getBooleanValuesReservedSize(Object)
     */
    public static int _getBooleanValuesReservedSize(final Object[] instance)
            throws UnsupportedOperationException {
        throw new UnsupportedOperationException(
                "Reserved size is not available");
    }

    /**
     * @see IGenericObjectAccessor#getObjectValuesReservedSize(Object)
     */
    public static int _getObjectValuesReservedSize(final Object[] instance)
            throws UnsupportedOperationException {
        throw new UnsupportedOperationException(
                "Reserved size is not available");
    }

    //////////////////////////////////////////////////////////////////////////

    /**
     * @see IGenericObjectAccessor#resizePrimitiveValues(Object, int)
     */
    public static Object[] _resizePrimitiveValues(final Object[] instance,
            final int reservedSize) {
        final long[] oldData = getPrimitiveArray(instance);
        final int oldSize = oldData.length;
        final int newSize = newSize(reservedSize, "reservedSize");
        if (oldSize < newSize) {
            final long[] newData = new long[newSize];
            System.arraycopy(oldData, 0, newData, 0, oldSize);
            instance[0] = newData;
        }
        return instance;
    }

    /**
     * @see IGenericObjectAccessor#resizeBooleanValues(Object, int)
     */
    public static Object[] _resizeBooleanValues(final Object[] instance,
            final int reservedSize) throws UnsupportedOperationException {
        throw new UnsupportedOperationException("Boolean ID Space is fixed");
    }

    /**
     * @see IGenericObjectAccessor#resizeObjectValues(Object, int)
     */
    public static Object[] _resizeObjectValues(final Object[] instance,
            final int reservedSize) {
        final Object[] oldData = instance;
        final int oldSize = oldData.length;
        final int newSize = newSize(reservedSize, "reservedSize");
        if (oldSize < newSize) {
            final Object[] newData = new Object[newSize];
            System.arraycopy(oldData, 0, newData, 0, oldSize);
            return newData;
        }
        return instance;
    }

    //////////////////////////////////////////////////////////////////////////

    /**
     * @see IGenericObjectAccessor#getBooleanValue(Object, int)
     */
    public static boolean _getBooleanValue(final Object[] instance,
            final int index) {
        checkBooleanIndex(index);
        final long booleans = getPrimitiveArray(instance)[0];
        return (booleans & (1L << index)) != 0;
    }

    /**
     * @see IGenericObjectAccessor#setBooleanValue(Object, int, boolean)
     */
    public static Object[] _setBooleanValue(final Object[] instance,
            final int index, final boolean value) {
        checkBooleanIndex(index);
        final long[] longs = getPrimitiveArray(instance);
        final long booleans = longs[0];
        if (value) {
            longs[0] = booleans | (1L << index);
        } else {
            longs[0] = booleans & ~(1L << index);
        }
        return instance;
    }

    //////////////////////////////////////////////////////////////////////////

    /**
     * @see IGenericObjectAccessor#getByteValue(Object, int)
     */
    public static byte _getByteValue(final Object[] instance, final int index) {
        checkNonBooleanIndex(index);
        return (byte) getPrimitiveArray(instance)[index + START_INDEX];
    }

    /**
     * @see IGenericObjectAccessor#setByteValue(Object, int, byte)
     */
    public static Object[] _setByteValue(final Object[] instance,
            final int index, final byte value) {
        checkNonBooleanIndex(index);
        getPrimitiveArray(instance)[index + START_INDEX] = value;
        return instance;
    }

    //////////////////////////////////////////////////////////////////////////

    /**
     * @see IGenericObjectAccessor#getCharValue(Object, int)
     */
    public static char _getCharValue(final Object[] instance, final int index) {
        checkNonBooleanIndex(index);
        return (char) getPrimitiveArray(instance)[index + START_INDEX];
    }

    /**
     * @see IGenericObjectAccessor#setCharValue(Object, int, char)
     */
    public static Object[] _setCharValue(final Object[] instance,
            final int index, final char value) {
        checkNonBooleanIndex(index);
        getPrimitiveArray(instance)[index + START_INDEX] = value;
        return instance;
    }

    //////////////////////////////////////////////////////////////////////////

    /**
     * @see IGenericObjectAccessor#getShortValue(Object, int)
     */
    public static short _getShortValue(final Object[] instance, final int index) {
        checkNonBooleanIndex(index);
        return (short) getPrimitiveArray(instance)[index + START_INDEX];
    }

    /**
     * @see IGenericObjectAccessor#setShortValue(Object, int, short)
     */
    public static Object[] _setShortValue(final Object[] instance,
            final int index, final short value) {
        checkNonBooleanIndex(index);
        getPrimitiveArray(instance)[index + START_INDEX] = value;
        return instance;
    }

    //////////////////////////////////////////////////////////////////////////

    /**
     * @see IGenericObjectAccessor#getIntValue(Object, int)
     */
    public static int _getIntValue(final Object[] instance, final int index) {
        checkNonBooleanIndex(index);
        return (int) getPrimitiveArray(instance)[index + START_INDEX];
    }

    /**
     * @see IGenericObjectAccessor#setIntValue(Object, int, int)
     */
    public static Object[] _setIntValue(final Object[] instance,
            final int index, final int value) {
        checkNonBooleanIndex(index);
        getPrimitiveArray(instance)[index + START_INDEX] = value;
        return instance;
    }

    //////////////////////////////////////////////////////////////////////////

    /**
     * @see IGenericObjectAccessor#getFloatValue(Object, int)
     */
    public static float _getFloatValue(final Object[] instance, final int index) {
        return Float.intBitsToFloat(_getIntValue(instance, index));
    }

    /**
     * @see IGenericObjectAccessor#setFloatValue(Object, int, float)
     */
    public static Object[] _setFloatValue(final Object[] instance,
            final int index, final float value) {
        return _setIntValue(instance, index, Float.floatToRawIntBits(value));
    }

    //////////////////////////////////////////////////////////////////////////

    /**
     * @see IGenericObjectAccessor#getLongValue(Object, int)
     */
    public static long _getLongValue(final Object[] instance, final int index) {
        checkNonBooleanIndex(index);
        return getPrimitiveArray(instance)[index + START_INDEX];
    }

    /**
     * @see IGenericObjectAccessor#setLongValue(Object, int, long)
     */
    public static Object[] _setLongValue(final Object[] instance,
            final int index, final long value) {
        checkNonBooleanIndex(index);
        getPrimitiveArray(instance)[index + START_INDEX] = value;
        return instance;
    }

    //////////////////////////////////////////////////////////////////////////

    /**
     * @see IGenericObjectAccessor#getDoubleValue(Object, int)
     */
    public static double _getDoubleValue(final Object[] instance,
            final int index) {
        return Double.longBitsToDouble(_getLongValue(instance, index));
    }

    /**
     * @see IGenericObjectAccessor#setDoubleValue(Object, int, double)
     */
    public static Object[] _setDoubleValue(final Object[] instance,
            final int index, final double value) {
        return _setLongValue(instance, index, Double.doubleToRawLongBits(value));
    }

    //////////////////////////////////////////////////////////////////////////

    /**
     * @see IGenericObjectAccessor#getObjectValue(Object, int)
     */
    public static Object _getObjectValue(final Object[] instance,
            final int index) {
        checkNonBooleanIndex(index);
        return instance[index + START_INDEX];
    }

    /**
     * @see IGenericObjectAccessor#setObjectValue(Object, int, Object)
     */
    public static Object[] _setObjectValue(final Object[] instance,
            final int index, final Object value) {
        checkNonBooleanIndex(index);
        instance[index + START_INDEX] = value;
        return instance;
    }

    //////////////////////////////////////////////////////////////////////////

    /**
     * @see IGenericObjectAccessor#isBooleanValuesIDSpaceIndependentFromPrimitive()
     */
    @Override
    public final boolean isBooleanValuesIDSpaceIndependentFromPrimitive() {
        return _isBooleanValuesIDSpaceIndependentFromPrimitive();
    }

    /**
     * @see IGenericObjectAccessor#isBooleanValuesIDSpaceFixed()
     */
    @Override
    public final boolean isBooleanValuesIDSpaceFixed() {
        return _isBooleanValuesIDSpaceFixed();
    }

    /**
     * @see IGenericObjectAccessor#isPrimitiveValuesIDSpaceIndependentFromObject()
     */
    @Override
    public final boolean isPrimitiveValuesIDSpaceIndependentFromObject() {
        return _isPrimitiveValuesIDSpaceIndependentFromObject();
    }

    /**
     * @see IGenericObjectAccessor#getBooleanValuesIDSpaceFixedSize()
     */
    @Override
    public final int getBooleanValuesIDSpaceFixedSize() {
        return _getBooleanValuesIDSpaceFixedSize();
    }

    /**
     * @see IGenericObjectAccessor#isImmutableInstancesUsed()
     */
    @Override
    public final boolean isImmutableInstancesUsed() {
        return _isImmutableInstancesUsed();
    }

    /**
     * @see IGenericObjectAccessor#isThreadSafeInstancesUsed()
     */
    @Override
    public final boolean isThreadSafeInstancesUsed() {
        return _isThreadSafeInstancesUsed();
    }

    /**
     * @see IGenericObjectAccessor#isLongUsingTwoPrimitiveSlots()
     */
    @Override
    public final boolean isLongUsingTwoPrimitiveSlots() {
        return _isLongUsingTwoPrimitiveSlots();
    }

    /**
     * @see IGenericObjectAccessor#isDoubleUsingTwoPrimitiveSlots()
     */
    @Override
    public final boolean isDoubleUsingTwoPrimitiveSlots() {
        return _isDoubleUsingTwoPrimitiveSlots();
    }

    //////////////////////////////////////////////////////////////////////////

    /**
     * @see IGenericObjectAccessor#isOptimalPackingUsedForPrimitiveValues()
     */
    @Override
    public final boolean isOptimalPackingUsedForPrimitiveValues() {
        return _isOptimalPackingUsedForPrimitiveValues();
    }

    /**
     * @see IGenericObjectAccessor#isOptimalPackingUsedForBooleanValues()
     */
    @Override
    public final boolean isOptimalPackingUsedForBooleanValues()
            throws UnsupportedOperationException {
        return _isOptimalPackingUsedForBooleanValues();
    }

    /**
     * @see IGenericObjectAccessor#isOptimalPackingUsedForObjectValues()
     */
    @Override
    public final boolean isOptimalPackingUsedForObjectValues() {
        return _isOptimalPackingUsedForObjectValues();
    }

    //////////////////////////////////////////////////////////////////////////

    /**
     * @see IGenericObjectAccessor#getPrimitiveValuesStartIndex()
     */
    @Override
    public final int getPrimitiveValuesStartIndex() {
        return _getPrimitiveValuesStartIndex();
    }

    /**
     * @see IGenericObjectAccessor#getBooleanValuesStartIndex()
     */
    @Override
    public final int getBooleanValuesStartIndex()
            throws UnsupportedOperationException {
        return _getBooleanValuesStartIndex();
    }

    /**
     * @see IGenericObjectAccessor#getObjectValuesStartIndex()
     */
    @Override
    public final int getObjectValuesStartIndex() {
        return _getObjectValuesStartIndex();
    }

    //////////////////////////////////////////////////////////////////////////

    /**
     * @see IGenericObjectAccessor#getPrimitiveValuesMaximumCount()
     */
    @Override
    public final int getPrimitiveValuesMaximumCount() {
        return _getPrimitiveValuesMaximumCount();
    }

    /**
     * @see IGenericObjectAccessor#getBooleanValuesMaximumCount()
     */
    @Override
    public final int getBooleanValuesMaximumCount()
            throws UnsupportedOperationException {
        return _getBooleanValuesMaximumCount();
    }

    /**
     * @see IGenericObjectAccessor#getObjectValuesMaximumCount()
     */
    @Override
    public final int getObjectValuesMaximumCount() {
        return _getObjectValuesMaximumCount();
    }

    //////////////////////////////////////////////////////////////////////////

    /**
     * @see IGenericObjectAccessor#newEmptyGenericObject()
     */
    @Override
    public final Object[] newEmptyGenericObject() {
        return _newEmptyGenericObject();
    }

    /**
     * @see IGenericObjectAccessor#newGenericObject(int,int,int)
     */
    @Override
    public final Object[] newGenericObject(final int requiredPrimitiveSlots,
            final int requiredBooleanSlots, final int requiredObjectSlots)
            throws UnsupportedOperationException {
        return _newGenericObject(requiredPrimitiveSlots, requiredBooleanSlots,
                requiredObjectSlots);
    }

    /**
     * @see IGenericObjectAccessor#newGenericObject(int,int)
     */
    @Override
    public final Object[] newGenericObject(final int requiredPrimitiveSlots,
            final int requiredObjectSlots) {
        return _newGenericObject(requiredPrimitiveSlots, requiredObjectSlots);
    }

    //////////////////////////////////////////////////////////////////////////

    /**
     * @see IGenericObjectAccessor#getPrimitiveValuesMaximumIndex(Object)
     */
    @Override
    public final int getPrimitiveValuesMaximumIndex(final Object[] instance) {
        return _getPrimitiveValuesMaximumIndex(instance);
    }

    /**
     * @see IGenericObjectAccessor#getBooleanValuesMaximumIndex(Object)
     */
    @Override
    public final int getBooleanValuesMaximumIndex(final Object[] instance)
            throws UnsupportedOperationException {
        return _getBooleanValuesMaximumIndex(instance);
    }

    /**
     * @see IGenericObjectAccessor#getObjectValuesMaximumIndex(Object)
     */
    @Override
    public final int getObjectValuesMaximumIndex(final Object[] instance) {
        return _getObjectValuesMaximumIndex(instance);
    }

    //////////////////////////////////////////////////////////////////////////

    /**
     * @see IGenericObjectAccessor#getPrimitiveValuesSlotsAvailable(Object)
     */
    @Override
    public final int getPrimitiveValuesSlotsAvailable(final Object[] instance) {
        return _getPrimitiveValuesSlotsAvailable(instance);
    }

    /**
     * @see IGenericObjectAccessor#getBooleanValuesSlotsAvailable(Object)
     */
    @Override
    public final int getBooleanValuesSlotsAvailable(final Object[] instance)
            throws UnsupportedOperationException {
        return _getBooleanValuesSlotsAvailable(instance);
    }

    /**
     * @see IGenericObjectAccessor#getObjectValuesSlotsAvailable(Object)
     */
    @Override
    public final int getObjectValuesSlotsAvailable(final Object[] instance) {
        return _getObjectValuesSlotsAvailable(instance);
    }

    //////////////////////////////////////////////////////////////////////////

    /**
     * @see IGenericObjectAccessor#getPrimitiveValuesReservedSize(Object)
     */
    @Override
    public final int getPrimitiveValuesReservedSize(final Object[] instance)
            throws UnsupportedOperationException {
        return _getPrimitiveValuesReservedSize(instance);
    }

    /**
     * @see IGenericObjectAccessor#getBooleanValuesReservedSize(Object)
     */
    @Override
    public final int getBooleanValuesReservedSize(final Object[] instance)
            throws UnsupportedOperationException {
        return _getBooleanValuesReservedSize(instance);
    }

    /**
     * @see IGenericObjectAccessor#getObjectValuesReservedSize(Object)
     */
    @Override
    public final int getObjectValuesReservedSize(final Object[] instance)
            throws UnsupportedOperationException {
        return _getObjectValuesReservedSize(instance);
    }

    //////////////////////////////////////////////////////////////////////////

    /**
     * @see IGenericObjectAccessor#resizePrimitiveValues(Object, int)
     */
    @Override
    public final Object[] resizePrimitiveValues(final Object[] instance,
            final int reservedSize) {
        return _resizePrimitiveValues(instance, reservedSize);
    }

    /**
     * @see IGenericObjectAccessor#resizeBooleanValues(Object, int)
     */
    @Override
    public final Object[] resizeBooleanValues(final Object[] instance,
            final int reservedSize) throws UnsupportedOperationException {
        return _resizeBooleanValues(instance, reservedSize);
    }

    /**
     * @see IGenericObjectAccessor#resizeObjectValues(Object, int)
     */
    @Override
    public final Object[] resizeObjectValues(final Object[] instance,
            final int reservedSize) {
        return _resizeObjectValues(instance, reservedSize);
    }

    //////////////////////////////////////////////////////////////////////////

    /**
     * @see IGenericObjectAccessor#getBooleanValue(Object, int)
     */
    @Override
    public final boolean getBooleanValue(final Object[] instance,
            final int index) {
        return _getBooleanValue(instance, index);
    }

    /**
     * @see IGenericObjectAccessor#setBooleanValue(Object, int, boolean)
     */
    @Override
    public final Object[] setBooleanValue(final Object[] instance,
            final int index, final boolean value) {
        return _setBooleanValue(instance, index, value);
    }

    //////////////////////////////////////////////////////////////////////////

    /**
     * @see IGenericObjectAccessor#getByteValue(Object, int)
     */
    @Override
    public final byte getByteValue(final Object[] instance, final int index) {
        return _getByteValue(instance, index);
    }

    /**
     * @see IGenericObjectAccessor#setByteValue(Object, int, byte)
     */
    @Override
    public final Object[] setByteValue(final Object[] instance,
            final int index, final byte value) {
        return _setByteValue(instance, index, value);
    }

    //////////////////////////////////////////////////////////////////////////

    /**
     * @see IGenericObjectAccessor#getCharValue(Object, int)
     */
    @Override
    public final char getCharValue(final Object[] instance, final int index) {
        return _getCharValue(instance, index);
    }

    /**
     * @see IGenericObjectAccessor#setCharValue(Object, int, char)
     */
    @Override
    public final Object[] setCharValue(final Object[] instance,
            final int index, final char value) {
        return _setCharValue(instance, index, value);
    }

    //////////////////////////////////////////////////////////////////////////

    /**
     * @see IGenericObjectAccessor#getShortValue(Object, int)
     */
    @Override
    public final short getShortValue(final Object[] instance, final int index) {
        return _getShortValue(instance, index);
    }

    /**
     * @see IGenericObjectAccessor#setShortValue(Object, int, short)
     */
    @Override
    public final Object[] setShortValue(final Object[] instance,
            final int index, final short value) {
        return _setShortValue(instance, index, value);
    }

    //////////////////////////////////////////////////////////////////////////

    /**
     * @see IGenericObjectAccessor#getIntValue(Object, int)
     */
    @Override
    public final int getIntValue(final Object[] instance, final int index) {
        return _getIntValue(instance, index);
    }

    /**
     * @see IGenericObjectAccessor#setIntValue(Object, int, int)
     */
    @Override
    public final Object[] setIntValue(final Object[] instance, final int index,
            final int value) {
        return _setIntValue(instance, index, value);
    }

    //////////////////////////////////////////////////////////////////////////

    /**
     * @see IGenericObjectAccessor#getFloatValue(Object, int)
     */
    @Override
    public final float getFloatValue(final Object[] instance, final int index) {
        return _getFloatValue(instance, index);
    }

    /**
     * @see IGenericObjectAccessor#setFloatValue(Object, int, float)
     */
    @Override
    public final Object[] setFloatValue(final Object[] instance,
            final int index, final float value) {
        return _setFloatValue(instance, index, value);
    }

    //////////////////////////////////////////////////////////////////////////

    /**
     * @see IGenericObjectAccessor#getLongValue(Object, int)
     */
    @Override
    public final long getLongValue(final Object[] instance, final int index) {
        return _getLongValue(instance, index);
    }

    /**
     * @see IGenericObjectAccessor#setLongValue(Object, int, long)
     */
    @Override
    public final Object[] setLongValue(final Object[] instance,
            final int index, final long value) {
        return _setLongValue(instance, index, value);
    }

    //////////////////////////////////////////////////////////////////////////

    /**
     * @see IGenericObjectAccessor#getDoubleValue(Object, int)
     */
    @Override
    public final double getDoubleValue(final Object[] instance, final int index) {
        return _getDoubleValue(instance, index);
    }

    /**
     * @see IGenericObjectAccessor#setDoubleValue(Object, int, double)
     */
    @Override
    public final Object[] setDoubleValue(final Object[] instance,
            final int index, final double value) {
        return _setDoubleValue(instance, index, value);
    }

    //////////////////////////////////////////////////////////////////////////

    /**
     * @see IGenericObjectAccessor#getObjectValue(Object, int)
     */
    @Override
    public final Object getObjectValue(final Object[] instance, final int index) {
        return _getObjectValue(instance, index);
    }

    /**
     * @see IGenericObjectAccessor#setObjectValue(Object, int, Object)
     */
    @Override
    public final Object[] setObjectValue(final Object[] instance,
            final int index, final Object value) {
        return _setObjectValue(instance, index, value);
    }
}


text:
import re
from collections import OrderedDict

import numpy as np

from utils.functional import cached_property

class DomainVar(object):
    def __init__(self, name, domain, boundry):
        self.domain = domain
        self.value = np.zeros(domain.num_nodes, dtype=np.float32)
        self._ddt = np.zeros(domain.num_nodes, dtype=np.float32)
        self.boundry = boundry
        domain.add_var_to_domain(name, self)

    @property
    def ddt(self):
        k, v = self.boundry
        self._ddt[k] = self.value[k] - v
        return self._ddt

    @ddt.setter
    def ddt(self, value):
        self._ddt = value

    @cached_property
    def ddx(self):
        return np.gradient(self.value) / self.domain.dx

class Domain(object):
    num_nodes = 0
    length = 0
    dx = 0
    domain_vars = OrderedDict()

    def __init__(self, length, num_nodes):
        self.num_nodes = num_nodes
        self.length = length
        self.dx = self.length / (num_nodes - 1)

    def __getattr__(self, name):
        if name in self.domain_vars:
            return self.domain_vars[name].value
        if re.match(r"d(.*?)dx", name):
            var_name = re.findall(r"d(.*?)dx", name)[0]
            return self.domain_vars[var_name].ddx
        if re.match(r"d(.*?)dt", name):
            var_name = re.findall(r"d(.*?)dt", name)[0]
            return self.domain_vars[var_name].ddt
        raise AttributeError("Attribute {} not found".format(name))

    def __setattr__(self, name, value):
        if re.match(r"d(.*?)dt", name):
            var_name = re.findall(r"d(.*?)dt", name)[0]
            self.domain_vars[var_name].ddt = value
        object.__setattr__(self, name, value)

    def add_var_to_domain(self, name, var):
        self.domain_vars.update({name: var})

    def import_array_to_vars(self, input_array):
        # TODO: vectorize this
        in_arr = np.array(input_array, dtype=np.float32)
        in_reshaped = in_arr.reshape(len(self.domain_vars), self.num_nodes)
        for i, (k, v) in enumerate(self.domain_vars.iteritems()):
            v.value = in_reshaped[i, :]
        self.invalidate_cache()

    def export_vars_to_array(self):
        # TODO: vectorize this
        out_arr = np.zeros((len(self.domain_vars), self.num_nodes), dtype=np.float32)
        for i, (k, v) in enumerate(self.domain_vars.iteritems()):
            out_arr[i, :] = v.ddt
        return out_arr.reshape(len(self.domain_vars) * (self.num_nodes))

    def initialize_vars(self):
        out_arr = np.zeros((len(self.domain_vars), self.num_nodes), dtype=np.float32)
        for i, (k, v) in enumerate(self.domain_vars.iteritems()):
            out_arr[i, :] = v.value
        return out_arr.reshape(len(self.domain_vars) * (self.num_nodes))

    def invalidate_cache(self):
        for (k, v) in self.domain_vars.iteritems():
            cached_property.invalidate_cache(v)