text:
"""Transformer model."""

from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import copy
from tensor2tensor.layers import common_hparams
from tensor2tensor.layers import common_layers
from tensor2tensor.mesh_tensorflow import mesh_tensorflow as mtf
from tensor2tensor.mesh_tensorflow import mtf_beam_search
from tensor2tensor.mesh_tensorflow import mtf_layers
from tensor2tensor.mesh_tensorflow import mtf_model
from tensor2tensor.mesh_tensorflow.research import moe
from tensor2tensor.utils import registry
import tensorflow as tf

@registry.register_model
class MtfTransformer(mtf_model.MtfModel):
  """Transformer in mesh_tensorflow."""

  @property
  def batch_dims(self):
    hparams = self._hparams
    if hparams.outer_batch_size == 0:
      return [mtf.Dimension("batch", hparams.batch_size)]
    else:
      if hparams.batch_size % hparams.outer_batch_size != 0:
        raise ValueError(
            "hparams.outer_batch_size must divide hparams.batch_size")
      return [
          mtf.Dimension("outer_batch", hparams.outer_batch_size),
          mtf.Dimension("inner_batch",
                        hparams.batch_size // hparams.outer_batch_size)]

  @property
  def inputs_vocab_dim(self):
    assert self.has_input
    return mtf.Dimension("vocab", self._inputs_vocab_size)

  @property
  def targets_vocab_dim(self):
    return mtf.Dimension("vocab", self._targets_vocab_size)

  @property
  def model_dim(self):
    return mtf.Dimension("d_model", self._hparams.d_model)

  @property
  def max_length_dim(self):
    return mtf.Dimension("max_length", self._hparams.max_length)

  @property
  def length_dim(self):
    return mtf.Dimension("length", self._hparams.max_length)

  @property
  def memory_length_dim(self):
    return mtf.Dimension("memory_length", self._hparams.max_length)

  @property
  def heads_dim(self):
    return mtf.Dimension("heads", self._hparams.num_heads)

  @property
  def kv_dim(self):
    return mtf.Dimension("d_kv", self._hparams.d_kv)

  @property
  def feedforward_dim(self):
    return mtf.Dimension("d_ff", self._hparams.d_ff)

  @property
  def activation_dtype(self):
    if self._hparams.activation_dtype == "float32":
      return tf.float32
    elif self._hparams.activation_dtype == "bfloat16":
      return tf.bfloat16
    else:
      raise ValueError(
          "unknown hparams.activation_dtype %s"
          % self._hparams.activation_dtype)

  def _import_to_batch_by_length(self, x, name, mesh, hparams):
    del hparams
    mtf_shape = mtf.Shape(self.batch_dims + [self.length_dim])
    x = tf.reshape(x, mtf_shape.to_integer_list)
    return mtf.import_fully_replicated(mesh, x, mtf_shape, name=name)

  def _embedding_and_softmax_vars(self, mesh):
    hparams = self._hparams
    targets_embedding_var = mtf.get_variable(
        mesh, "targets_embedding",
        mtf.Shape([self.targets_vocab_dim, self.model_dim]),
        initializer=tf.random_normal_initializer(),
        activation_dtype=self.activation_dtype)
    if self.has_input:
      if hparams.shared_embedding:
        inputs_embedding_var = targets_embedding_var
      else:
        inputs_embedding_var = mtf.get_variable(
            mesh, "inputs_embedding",
            mtf.Shape([self.inputs_vocab_dim, self.model_dim]),
            initializer=tf.random_normal_initializer(),
            activation_dtype=self.activation_dtype)
    else:
      inputs_embedding_var = None
    if hparams.shared_embedding_and_softmax_weights:
      softmax_var = targets_embedding_var * (self.model_dim.size ** -0.5)
    else:
      softmax_var = mtf.get_variable(
          mesh,
          "softmax",
          mtf.Shape([self.targets_vocab_dim, self.model_dim]),
          initializer=tf.random_normal_initializer(
              stddev=self.model_dim.size**-0.5),
          activation_dtype=self.activation_dtype)
    positional_embedding_var = mtf.get_variable(
        mesh, "positional_embedding",
        mtf.Shape([self.max_length_dim, self.model_dim]),
        initializer=tf.random_normal_initializer(),
        activation_dtype=self.activation_dtype)
    return (inputs_embedding_var, targets_embedding_var,
            softmax_var, positional_embedding_var)

  def _mtf_model_fn(self, features, mesh):
    features = copy.copy(features)
    hparams = self._hparams
    targets = tf.to_int32(features["targets"])
    if len(targets.get_shape()) > 2:
      tf.logging.info("targets = %s" % targets)
      targets = tf.squeeze(targets, [2, 3])
    # pad targets to max_length
    def pad_to_max_length(x):
      extra_length = hparams.max_length - tf.shape(x)[1]
      x = tf.pad(x, [[0, 0], [0, extra_length]])
      x = tf.reshape(x, [hparams.batch_size, hparams.max_length])
      return x
    targets = pad_to_max_length(targets)
    for key in ["targets_segmentation", "targets_position",
                "inputs_segmentation", "inputs_position"]:
      if key in features:
        features[key] = pad_to_max_length(features[key])
    shifted_targets = common_layers.shift_right_2d(targets)

    targets = self._import_to_batch_by_length(targets, "targets", mesh, hparams)
    shifted_targets = self._import_to_batch_by_length(
        shifted_targets, "shifted_targets", mesh, hparams)

    if "targets_segmentation" in features:
      # "Packed" dataset - keep the examples from seeing each other.
      targets_segmentation = self._import_to_batch_by_length(
          features["targets_segmentation"], "targets_segmentation",
          mesh, hparams)
      targets_position = self._import_to_batch_by_length(
          features["targets_position"], "targets_position",
          mesh, hparams)
      decoder_self_attention_mask = (
          mtf_layers.attention_mask_autoregressive(
              targets_position, dtype=self.activation_dtype) +
          mtf_layers.attention_mask_same_segment(
              targets_segmentation, dtype=self.activation_dtype))
    else:
      targets_position = mtf.range(mesh, self.length_dim, dtype=tf.int32)
      decoder_self_attention_mask = mtf_layers.attention_mask_autoregressive(
          targets_position, dtype=self.activation_dtype)

    def layer_prepostprocess_dropout(x):
      return mtf.dropout(
          x, keep_prob=1.0 - hparams.layer_prepostprocess_dropout,
          noise_shape=mtf.Shape(self.batch_dims + [self.model_dim]))

    extra_losses = []
    (inputs_embedding_var,
     targets_embedding_var,
     softmax_var,
     positional_embedding_var) = self._embedding_and_softmax_vars(mesh)
    if self.has_input:
      inputs = tf.squeeze(tf.to_int32(features["inputs"]), [2, 3])
      inputs = pad_to_max_length(inputs)
      inputs = self._import_to_batch_by_length(inputs, "inputs", mesh, hparams)
      if "inputs_segmentation" in features:
        # "Packed" dataset - keep the examples from seeing each other.
        inputs_segmentation = self._import_to_batch_by_length(
            features["inputs_segmentation"], "inputs_segmentation",
            mesh, hparams)
        inputs_position = self._import_to_batch_by_length(
            features["inputs_position"], "inputs_position",
            mesh, hparams)
        encoder_self_attention_mask = (
            mtf_layers.attention_mask_same_segment(
                inputs_segmentation, dtype=self.activation_dtype))
        encoder_decoder_attention_mask = (
            mtf_layers.attention_mask_same_segment(
                targets_segmentation, inputs_segmentation,
                dtype=self.activation_dtype))
      else:
        inputs_position = mtf.range(mesh, self.length_dim, dtype=tf.int32)
        encoder_self_attention_mask = (
            mtf_layers.attention_mask_ignore_padding(
                inputs, dtype=self.activation_dtype))
        encoder_decoder_attention_mask = encoder_self_attention_mask

      x = (mtf.gather(inputs_embedding_var, inputs, self.inputs_vocab_dim) +
           mtf.gather(positional_embedding_var, inputs_position,
                      self.max_length_dim))
      x = layer_prepostprocess_dropout(x)
      with tf.variable_scope("encoder"):
        x = self._layer_stack(x,
                              hparams.num_encoder_layers,
                              self_attention_mask=encoder_self_attention_mask,
                              losses=extra_losses)
      encoder_output = mtf.rename_dimension(
          x, self.length_dim.name, self.memory_length_dim.name)
    else:
      encoder_output = None
      encoder_decoder_attention_mask = None

    # DECODER
    x = (mtf.gather(
        targets_embedding_var, shifted_targets, self.targets_vocab_dim) +
         mtf.gather(
             positional_embedding_var, targets_position, self.max_length_dim))
    x = layer_prepostprocess_dropout(x)

    # Decoder
    with tf.variable_scope("decoder"):
      x = self._layer_stack(
          x,
          hparams.num_decoder_layers,
          encoder_output=encoder_output,
          self_attention_mask=decoder_self_attention_mask,
          encdec_attention_mask=encoder_decoder_attention_mask,
          losses=extra_losses)
    logits = mtf.matmul(x, softmax_var)
    off_value = hparams.label_smoothing / self._targets_vocab_size
    on_value = 1.0 - hparams.label_smoothing + off_value
    soft_targets = mtf.one_hot(
        targets, self.targets_vocab_dim, on_value=on_value, off_value=off_value,
        dtype=self.activation_dtype)
    loss = mtf_layers.softmax_cross_entropy_with_logits(
        logits, soft_targets, self.targets_vocab_dim)
    weights = mtf_layers.weights_nonzero(
        targets, dtype=self.activation_dtype)
    loss = mtf.reduce_mean(loss * weights)
    for l in extra_losses:
      loss += l
    return logits, loss

  def mtf_model_fn(self, features, mesh):
    with tf.variable_scope("transformer"):
      return self._mtf_model_fn(features, mesh)

  @property
  def _targets_vocab_size(self):
    targets_vocab_size = self._problem_hparams.target_modality._vocab_size  # pylint: disable=protected-access
    targets_vocab_size += (-targets_vocab_size) % self._hparams.vocab_divisor
    return targets_vocab_size

  @property
  def _inputs_vocab_size(self):
    if not self.has_input:
      return None
    inputs_vocab_size = self._problem_hparams.input_modality[   # pylint: disable=protected-access
        "inputs"]._vocab_size
    inputs_vocab_size += (-inputs_vocab_size) % self._hparams.vocab_divisor
    return inputs_vocab_size

  def _feedforward_layer(self, x, losses=None):
    """Feed-forward layer.

    Args:
      x: a mtf.Tensor with shape [<batch_dims>, length_dim, model_dim]
      losses: a list to be appended-to
    Returns:
      a mtf.Tensor with shape [<batch_dims>, length_dim, model_dim]
    Raises:
      ValueError: if hparams make no sense
    """
    hparams = self._hparams
    feedforward_layer = hparams.feedforward_layer
    if feedforward_layer == "dense_relu_dense":
      return mtf_layers.dense_relu_dense(
          x, self.feedforward_dim, dropout=hparams.relu_dropout,
          dropout_broadcast_dims=[self.length_dim])
    elif feedforward_layer == "moe":
      output, loss = moe.transformer_moe_layer_v1(
          x,
          self.model_dim,
          hparams,
          hparams.mode == tf.estimator.ModeKeys.TRAIN)
      if losses is not None:
        losses.append(loss)
      return output
    elif feedforward_layer == "hmoe":
      output, loss = moe.transformer_moe_layer_v2(
          x,
          self.model_dim,
          hparams,
          hparams.mode == tf.estimator.ModeKeys.TRAIN)
      if losses is not None:
        losses.append(loss)
      return output
    else:
      raise ValueError(
          "hparams.feedforward_layer not recognized %s" % feedforward_layer)

  def _layer_stack(self,
                   x,
                   num_layers,
                   encoder_output=None,
                   self_attention_mask=None,
                   encdec_attention_mask=None,
                   losses=None):
    """Encoder or decoder stack.

    Args:
      x: a mtf.Tensor with shape [<batch_dims>, length_dim, model_dim]
      num_layers: an integer
      encoder_output: an optional mtf.Tensor with shape
        [<batch_dims>, encoder_length_dim, model_dim]
      self_attention_mask: an optional mtf.Tensor with shape
        [batch, length_dim, memory_length_dim] containing values 0 or -inf.
      encdec_attention_mask: an optional mtf.Tensor with shape
        [batch, length_dim, encoder_length_dim] containing values 0 or -inf.
      losses: a list to be appended-to
    Returns:
      a mtf.Tensor with shape [<batch_dims>, length_dim, model_dim]
    Raises:
      ValueError: if hparams make no sense
    """
    hparams = self._hparams
    def layer_prepostprocess_dropout(x):
      return mtf.dropout(
          x, keep_prob=1.0 - hparams.layer_prepostprocess_dropout,
          noise_shape=mtf.Shape(self.batch_dims + [self.model_dim]))
    num_layer_norms = num_layers * (2 if encoder_output is None else 3) + 1
    layer_norms_dim = mtf.Dimension("layer_norms", num_layer_norms)
    layer_norm_combined_var = mtf.get_variable(
        x.mesh,
        "layer_norm_scale",
        mtf.Shape([layer_norms_dim, self.model_dim]),
        initializer=tf.ones_initializer(),
        activation_dtype=x.dtype)
    layer_norm_vars = mtf.unstack(layer_norm_combined_var, layer_norms_dim)
    def normalize(x):
      scale = layer_norm_vars.pop(0)
      variance = mtf.reduce_mean(mtf.square(x), reduced_dim=self.model_dim)
      return x * mtf.rsqrt(variance + hparams.norm_epsilon) * scale

    for layer in range(num_layers):
      with tf.variable_scope("layer_%d" % layer):
        # Self attention layer
        x += layer_prepostprocess_dropout(
            mtf_layers.multihead_attention(
                normalize(x), None,
                self_attention_mask, self.kv_dim, self.heads_dim,
                dropout=hparams.attention_dropout,
                dropout_broadcast_dims=[self.length_dim],
                name="self_attention"))
        if encoder_output is not None:
          # Encoder-Decoder attention layer
          x += layer_prepostprocess_dropout(
              mtf_layers.multihead_attention(
                  normalize(x), encoder_output,
                  encdec_attention_mask, self.kv_dim, self.heads_dim,
                  dropout=hparams.attention_dropout,
                  dropout_broadcast_dims=[self.length_dim],
                  name="encdec_attention"))
        # ffn layer
        x += layer_prepostprocess_dropout(
            self._feedforward_layer(normalize(x), losses=losses))
    x = layer_prepostprocess_dropout(normalize(x))
    assert not layer_norm_vars
    return x

  def sample(self, features, mesh):
    with tf.variable_scope("transformer"):
      return self._sample(features, mesh)

  def _sample(self, features, mesh):
    hparams = self._hparams
    (inputs_embedding_var,
     targets_embedding_var,
     softmax_var,
     positional_embedding_var) = self._embedding_and_softmax_vars(mesh)
    if self.has_input:
      inputs = features["inputs"]
      while len(inputs.shape.as_list()) > 2:
        inputs = tf.squeeze(inputs, axis=2)
      actual_batch_size = tf.shape(inputs)[0]
      actual_length = tf.shape(inputs)[1]
      inputs = tf.pad(
          inputs, [[0, hparams.batch_size - actual_batch_size],
                   [0, hparams.max_length - actual_length]])
      inputs = self._import_to_batch_by_length(
          inputs, "inputs", mesh, hparams)
      x = (mtf.gather(inputs_embedding_var, inputs, self.inputs_vocab_dim) +
           mtf.reshape(positional_embedding_var,
                       mtf.Shape([self.length_dim, self.model_dim])))
      encoder_attention_mask = (
          mtf_layers.attention_mask_ignore_padding(
              inputs, dtype=self.activation_dtype))
      with tf.variable_scope("encoder"):
        x = self._layer_stack(x,
                              hparams.num_encoder_layers,
                              self_attention_mask=encoder_attention_mask)
      encoder_output = mtf.rename_dimension(
          x, self.length_dim.name, self.memory_length_dim.name)
      encdec_tensors = []
      for layer_num in xrange(hparams.num_decoder_layers):
        with tf.variable_scope("decoder/layer_%d/encdec_attention" % layer_num):
          q_var, k_var, v_var, o_var = mtf_layers.multihead_attention_vars(
              mesh, self.heads_dim, self.model_dim,
              self.kv_dim, self.activation_dtype)
          k = mtf.einsum(
              [encoder_output, k_var],
              mtf.Shape(
                  self.batch_dims + [self.heads_dim,
                                     self.memory_length_dim, self.kv_dim]))
          v = mtf.einsum(
              [encoder_output, v_var],
              mtf.Shape(
                  self.batch_dims + [self.heads_dim,
                                     self.memory_length_dim, self.kv_dim]))
        encdec_tensors.append((q_var, o_var, k, v))
      partial_targets = None
    else:
      encdec_tensors = None
      encoder_output = None
      encoder_attention_mask = None
      # Prepare partial targets.
      # In either features["inputs"] or features["targets"].
      # We force the outputs to begin with these sequences.
      partial_targets = features.get("inputs", None)
      if partial_targets is None:
        partial_targets = features.get("targets", None)
      if partial_targets is not None:
        partial_targets = common_layers.expand_squeeze_to_nd(partial_targets, 2)
        partial_targets = tf.to_int32(partial_targets)
        partial_targets_batch = tf.shape(partial_targets)[0]
        partial_targets_length = tf.shape(partial_targets)[1]
        partial_targets = tf.pad(
            partial_targets, [[0, hparams.batch_size - partial_targets_batch],
                              [0, hparams.max_length - partial_targets_length]])
        partial_targets = self._import_to_batch_by_length(
            partial_targets, "partial_targets", mesh, hparams)

    if hparams.beam_size == 1:
      ids_shape = mtf.Shape(self.batch_dims + [self.length_dim])
      kv_shape = mtf.Shape(self.batch_dims +
                           [self.heads_dim,
                            self.memory_length_dim, self.kv_dim])
    else:
      beam_dim = mtf.Dimension("beam", hparams.beam_size)
      ids_shape = mtf.Shape(self.batch_dims + [beam_dim, self.length_dim])
      kv_shape = mtf.Shape(self.batch_dims +
                           [beam_dim, self.heads_dim,
                            self.memory_length_dim, self.kv_dim])

    initial_ids = mtf.constant(mesh, 0, ids_shape, dtype=tf.int32)
    initial_kv_states = (
        [mtf.zeros(mesh, kv_shape, dtype=self.activation_dtype)]
        * (2 * hparams.num_decoder_layers))
    def logits_fn(step_num, ids, states):
      """Produce logits for this step, and new states."""
      self_attention_k = states[:hparams.num_decoder_layers]
      self_attention_v = states[hparams.num_decoder_layers:]
      ids_this_step = mtf.gather(ids, step_num - 1, self.length_dim)
      x = (mtf.gather(targets_embedding_var, ids_this_step,
                      self.targets_vocab_dim) +
           mtf.gather(positional_embedding_var, step_num, self.max_length_dim))
      with tf.variable_scope("decoder"):
        x, new_self_attention_k, new_self_attention_v = (
            self._decoder_layer_stack_incremental(
                x,
                step_num,
                encdec_tensors,
                self_attention_k,
                self_attention_v,
                encdec_attention_mask=encoder_attention_mask))
      logits = mtf.matmul(x, softmax_var)
      return logits, new_self_attention_k + new_self_attention_v

    if hparams.beam_size == 1:
      temperature = (0.0 if hparams.sampling_method == "argmax"
                     else hparams.sampling_temp)
      return mtf_beam_search.greedy_decode(
          logits_fn,
          initial_ids,
          temperature=temperature,
          initial_states=initial_kv_states,
          forced_ids=partial_targets,
          use_tpu=hparams.use_tpu)
    else:
      if self.has_input:
        input_length = mtf.reduce_sum(
            mtf.to_float(mtf.cast(inputs, tf.bool)),
            reduced_dim=self.length_dim)
        max_input_length = mtf.reduce_max(input_length)
        decode_length = mtf.cast(
            max_input_length * hparams.decode_length_multiplier
            + hparams.decode_length_constant, tf.int32)
      else:
        decode_length = None
      beams, unused_scores = mtf_beam_search.beam_search(
          logits_fn,
          initial_ids,
          hparams.alpha,
          states=initial_kv_states,
          decode_length=decode_length,
          use_tpu=hparams.use_tpu)
      return mtf.gather(beams, mtf.constant(mesh, 0, dtype=tf.int32), beam_dim)

  def _decoder_layer_stack_incremental(self,
                                       x,
                                       step_num,
                                       encdec_tensors,
                                       self_attention_k,
                                       self_attention_v,
                                       encdec_attention_mask=None):
    """Decoder layer stack during inference.

    We are processing only one position at a time.

    The self-attention keys and values have already been computed for
    previous positions.  In addition to the decoder output, we need to
    produce the updated self-attention keys and values.

    If there is an encoder, then additional Tensors are supplied in
    encdec_tensors, which give us the keys and values for encoder-decoder
    attention as well as the weight matrices q_var and o_var.

    Args:
      x: a mtf.Tensor with shape [<batch_dims>, model_dim]
      step_num: an mtf integer Scalar
      encdec_tensors: an optional list of num_layers tuples, each of the form
        (q_var, o_var, k, v)
      self_attention_k: an optional list of num_layers Tensors each with shape
        [batch, heads, memory_length, kv_channels]
      self_attention_v: an optional list of num_layers Tensors each with shape
        [batch, heads, memory_length, kv_channels]
      encdec_attention_mask: an optional mtf.Tensor with shape
        [batch, length_dim, encoder_length_dim] containing values 0 or -inf.

    Returns:
      y: a mtf.Tensor with shape [<batch_dims>, model_dim]
      new_self_attention_k: a list of num_layers mtf.Tensors, with the same
        shapes as the elements of self_attention_k
      new_self_attention_v: a list of num_layers mtf.Tensors, with the same
        shapes as the elements of self_attention_v

    Raises:
      ValueError: if hparams make no sense
    """
    hparams = self._hparams
    num_layers = hparams.num_decoder_layers
    num_layer_norms = num_layers * (2 if encdec_tensors is None else 3) + 1
    layer_norms_dim = mtf.Dimension("layer_norms", num_layer_norms)
    layer_norm_combined_var = mtf.get_variable(
        x.mesh,
        "layer_norm_scale",
        mtf.Shape([layer_norms_dim, self.model_dim]),
        initializer=tf.ones_initializer(),
        activation_dtype=x.dtype)
    layer_norm_vars = mtf.unstack(layer_norm_combined_var, layer_norms_dim)
    def normalize(x):
      scale = layer_norm_vars.pop(0)
      variance = mtf.reduce_mean(mtf.square(x), reduced_dim=self.model_dim)
      return x * mtf.rsqrt(variance + hparams.norm_epsilon) * scale

    new_self_attention_k = []
    new_self_attention_v = []
    for layer in range(num_layers):
      with tf.variable_scope("layer_%d" % layer):
        # Self attention layer
        y, new_k, new_v = mtf_layers.multihead_self_attention_incremental(
            normalize(x),
            prev_k=self_attention_k[layer],
            prev_v=self_attention_v[layer],
            step_num=step_num,
            name="self_attention")
        new_self_attention_k.append(new_k)
        new_self_attention_v.append(new_v)
        x += y
        if encdec_tensors is not None:
          # Encoder-Decoder attention layer
          q_var, o_var, k, v = encdec_tensors[layer]
          x += mtf_layers.multihead_encdec_attention_incremental(
              normalize(x),
              q_var, o_var, k, v,
              encdec_attention_mask,
              name="encdec_attention")
        # ffn layer
        x += self._feedforward_layer(normalize(x), hparams)
    x = normalize(x)
    assert not layer_norm_vars
    return x, new_self_attention_k, new_self_attention_v

@registry.register_hparams
def mtf_transformer_base():
  """Set of hyperparameters."""
  hparams = common_hparams.basic_params1()
  hparams.no_data_parallelism = True
  hparams.use_fixed_batch_size = True
  hparams.add_hparam("mtf_mode", True)
  hparams.batch_size = 64
  hparams.max_length = 256
  hparams.add_hparam("d_model", 512)
  hparams.add_hparam("d_kv", 128)
  hparams.label_smoothing = 0.1
  # 8-way model-parallelism
  hparams.add_hparam("mesh_shape", "model:8")
  hparams.add_hparam("layout", "batch:batch;vocab:model;d_ff:model;heads:model")
  hparams.add_hparam("num_heads", 8)
  hparams.add_hparam("d_ff", 2048)
  hparams.add_hparam("num_encoder_layers", 6)
  hparams.add_hparam("num_decoder_layers", 6)
  hparams.add_hparam("attention_dropout", 0.1)
  hparams.add_hparam("relu_dropout", 0.1)
  hparams.layer_prepostprocess_dropout = 0.1

  # round up vocab sizes to be a multiple of this value
  hparams.vocab_divisor = 128

  # options are dense_relu_dense, moe, hmoe
  hparams.add_hparam("feedforward_layer", "dense_relu_dense")

  # Use targets_embedding_var * rsqrt(d_model) as softmax_var
  hparams.shared_embedding_and_softmax_weights = True
  # Reuse targets_embedding_var as inputs_embedding_var
  hparams.shared_embedding = True
  hparams.optimizer = "Adafactor"
  hparams.learning_rate_schedule = "linear_warmup*rsqrt_decay*linear_decay"
  hparams.learning_rate_warmup_steps = 10000
  hparams.activation_dtype = "float32"

  # These parameters make Transformer model compatible with MtfTransformer
  # Do not override these, as mtf_transformer does not support other options.
  hparams.clip_grad_norm = 0.  # i.e. no gradient clipping
  hparams.target_modality = "symbol:identity"
  hparams.input_modalities = "inputs:symbol:identity"

  # Parameters for computing the maximum decode length in beam search.
  # Maximum decode length is:
  #    min(max_length,
  #        decode_length_multiplier * input_length + decode_length_constant)
  hparams.add_hparam("decode_length_multiplier", 1.5)
  hparams.add_hparam("decode_length_constant", 10.0)

  # If nonzero, we split the batch across two tensor-dimensions named
  # "outer_batch" and "inner_batch", allowing for splitting across two mesh
  # dimensions.  This is necessary for hierarchical mixture of experts.
  # The two tensor dimensions have sizes hparams.outer_batch_size and
  # hparams.batch_size // hparams.outer_batch_size.
  hparams.add_hparam("outer_batch_size", 0)

  return hparams

@registry.register_hparams
def mtf_transformer_tiny():
  """Catch bugs locally..."""
  hparams = mtf_transformer_base()
  hparams.d_model = 128
  hparams.d_ff = 512
  hparams.batch_size = 4
  hparams.num_encoder_layers = 2
  hparams.num_decoder_layers = 2
  hparams.num_heads = 4
  # data parallelism and model-parallelism
  hparams.mesh_shape = "batch:2;model:2"
  return hparams

@registry.register_hparams
def mtf_transformer_single():
  hparams = mtf_transformer_tiny()
  hparams.mesh_shape = ""
  return hparams

@registry.register_hparams
def mtf_transformer_tiny_8gpu():
  hparams = mtf_transformer_tiny()
  hparams.mesh_shape = "model:8"
  return hparams

def mtf_transformer_paper_lm(size):
  """Config for language-model experiments.

  Train these on languagemodel_lm1b32k_packed for 136000 steps (10 epochs)

  The size parameter is an integer that controls the number of heads and the
  size of the size of the feedforward hidden layers.  Increasing size by 1
  doubles each of these.

  Results:
  size   params/10^9  log-ppl(per-token)
  -1     0.14         3.209
  0      0.22         3.119
  1      0.37         3.037
  2      0.67         2.969
  3      1.28         2.912
  4      2.48         2.874
  5      4.90         2.871

  (to get word-level log-ppl, multiply by 1.1078)

  Args:
    size: an integer
  Returns:
    a hparams object
  """
  n = 2 ** size
  hparams = mtf_transformer_base()
  hparams.label_smoothing = 0.0
  hparams.batch_size = 256
  hparams.d_model = 1024
  hparams.d_ff = int(8192 * n)
  hparams.d_kv = 256
  hparams.num_heads = int(8 * n)
  hparams.shared_embedding_and_softmax_weights = False
  # one epoch for languagemodel_lm1b32k_packed = 13600 steps
  hparams.learning_rate_decay_steps = 13600
  return hparams

@registry.register_hparams
def mtf_transformer_paper_lm_m1():
  hparams = mtf_transformer_paper_lm(-1)
  hparams.mesh_shape = "batch:32"
  return hparams

@registry.register_hparams
def mtf_transformer_paper_lm_0():
  hparams = mtf_transformer_paper_lm(0)
  hparams.mesh_shape = "batch:32"
  return hparams

@registry.register_hparams
def mtf_transformer_paper_lm_1():
  hparams = mtf_transformer_paper_lm(1)
  hparams.mesh_shape = "model:4;batch:8"
  return hparams

@registry.register_hparams
def mtf_transformer_paper_lm_2():
  hparams = mtf_transformer_paper_lm(2)
  hparams.mesh_shape = "model:4;batch:8"
  return hparams

@registry.register_hparams
def mtf_transformer_paper_lm_3():
  hparams = mtf_transformer_paper_lm(3)
  hparams.mesh_shape = "model:8;batch:16"
  return hparams

@registry.register_hparams
def mtf_transformer_paper_lm_4():
  hparams = mtf_transformer_paper_lm(4)
  hparams.mesh_shape = "batch:16;model:32"
  return hparams

@registry.register_hparams
def mtf_transformer_paper_lm_5():
  hparams = mtf_transformer_paper_lm(5)
  hparams.mesh_shape = "batch:16;model:32"
  return hparams

def mtf_transformer_paper_tr(size):
  """Config for translation experiments.

  Train these on translate_enfr_wmt32k_packed for 154000 steps (3 epochs)

  The size parameter is an integer that controls the number of heads and the
  size of the size of the feedforward hidden layers.  Increasing size by 1
  doubles each of these.

  Args:
    size: an integer
  Returns:
    a hparams object
  """
  n = 2 ** size
  hparams = mtf_transformer_base()
  hparams.label_smoothing = 0.1
  hparams.batch_size = 128
  hparams.d_model = 1024
  hparams.d_ff = int(4096 * n)
  hparams.num_heads = int(8 * n)
  hparams.shared_embedding_and_softmax_weights = False
  # one epoch for translate_enfr_wmt32k_packed = 51400 steps
  hparams.learning_rate_decay_steps = 51400
  return hparams

@registry.register_hparams
def mtf_transformer_paper_tr_m1():
  hparams = mtf_transformer_paper_tr(-1)
  hparams.mesh_shape = "batch:32"
  return hparams

@registry.register_hparams
def mtf_transformer_paper_tr_0():
  hparams = mtf_transformer_paper_tr(0)
  hparams.mesh_shape = "batch:32"
  return hparams

@registry.register_hparams
def mtf_transformer_paper_tr_1():
  hparams = mtf_transformer_paper_tr(1)
  hparams.mesh_shape = "model:4;batch:8"
  return hparams

@registry.register_hparams
def mtf_transformer_paper_tr_2():
  hparams = mtf_transformer_paper_tr(2)
  hparams.mesh_shape = "model:4;batch:8"
  return hparams

@registry.register_hparams
def mtf_transformer_paper_tr_3():
  hparams = mtf_transformer_paper_tr(3)
  hparams.mesh_shape = "model:8;batch:16"
  return hparams

@registry.register_hparams
def mtf_transformer_paper_tr_4():
  hparams = mtf_transformer_paper_tr(4)
  hparams.mesh_shape = "model:8;batch:16"
  return hparams

@registry.register_hparams
def mtf_transformer_paper_tr_0_mesh_8():
  hparams = mtf_transformer_paper_tr(0)
  hparams.mesh_shape = "batch:8"
  return hparams

@registry.register_hparams
def mtf_transformer_paper_tr_4_mesh_16_8():
  hparams = mtf_transformer_paper_tr(4)
  hparams.mesh_shape = "batch:8;model:16"
  return hparams

@registry.register_hparams
def mtf_transformer_paper_tr_6_mesh_64_8():
  # Note: This mesh shape does align well with physical [16, 16, 2] topology.
  hparams = mtf_transformer_paper_tr(6)
  hparams.mesh_shape = "model:64;batch:8"
  return hparams

@registry.register_hparams
def mtf_transformer_paper_tr_0_mesh_8_v2():
  hparams = mtf_transformer_paper_tr(0)
  hparams.batch_size = int(hparams.batch_size / 4)
  hparams.mesh_shape = "batch:8"
  return hparams

@registry.register_hparams
def mtf_transformer_paper_tr_0_mesh_128():
  hparams = mtf_transformer_paper_tr(0)
  hparams.batch_size = int(hparams.batch_size * 4)
  hparams.mesh_shape = "batch:128"
  return hparams

@registry.register_hparams
def mtf_transformer_paper_tr_0_mesh_512():
  hparams = mtf_transformer_paper_tr(0)
  hparams.batch_size = int(hparams.batch_size * 16)
  hparams.mesh_shape = "batch:512"
  return hparams

@registry.register_hparams
def mtf_transformer_lm_baseline():
  """Small language model to run on 1 TPU.

  Run this on 2x2 on languagemodel_lm1b32k_packed for 272000 steps (10 epochs)
  Results:
         params/10^9  log-ppl(per-token)
         0.14         3.202

  Returns:
    a hparams
  """
  hparams = mtf_transformer_paper_lm(-1)
  hparams.batch_size = 128
  hparams.learning_rate_decay_steps = 27200  # one epoch on lm1b
  hparams.mesh_shape = "batch:8"
  return hparams


text:
var heads               = require('robohydra').heads,
    RoboHydraHeadProxy  = heads.RoboHydraHeadProxy,
    RoboHydraHeadFilter = heads.RoboHydraHeadFilter;

exports.getBodyParts = function() {
    "use strict";

    return {
        heads: [
            new RoboHydraHeadFilter({
                // path: '/.*',            // Already the default
                filter: function(body) {
                    return body.toString().replace(
                        new RegExp('developers', 'g'),
                        "DEVELOPERS, DEVELOPERS, DEVELOPERS, DEVELOPERS"
                    );
                }
            }),

            new RoboHydraHeadProxy({
                mountPath: '/',
                proxyTo: 'http://dev.opera.com',
                setHostHeader: true
            })
        ]
    };
};

redpajama_set_name: RedPajamaGithub


text:
class AddNameToVirtualSites < ActiveRecord::Migration
  def self.up
    add_column :virtual_sites, :name, :string
  end

  def self.down
    remove_column :virtual_sites, :name, :string
  end
end


text:
package mf.org.apache.xerces.util;

import java.util.ArrayList;
import java.util.HashMap;

import mf.org.apache.xerces.impl.Constants;
import mf.org.apache.xerces.xni.parser.XMLComponentManager;
import mf.org.apache.xerces.xni.parser.XMLConfigurationException;

/**
 * This class implements the basic operations for managing parser
 * configuration features and properties. This utility class can
 * be used as a base class for parser configurations or separately
 * to encapsulate a number of parser settings as a component
 * manager.
 *

 * This class can be constructed with a "parent" settings object
 * (in the form of an XMLComponentManager) that allows
 * parser configuration settings to be "chained" together.
 *
 * @author Andy Clark, IBM
 *
 * @version $Id: ParserConfigurationSettings.java 447241 2006-09-18 05:12:57Z mrglavas $
 */
public class ParserConfigurationSettings
    implements XMLComponentManager {

	protected static final String PARSER_SETTINGS =
			Constants.XERCES_FEATURE_PREFIX + Constants.PARSER_SETTINGS;

    //
    // Data
    //

    // data

    /** Recognized properties. */
    protected ArrayList fRecognizedProperties;

    /** Properties. */
    protected HashMap fProperties;

    /** Recognized features. */
    protected ArrayList fRecognizedFeatures;

    /** Features. */
    protected HashMap fFeatures;

    /** Parent parser configuration settings. */
    protected XMLComponentManager fParentSettings;

    //
    // Constructors
    //

    /** Default Constructor. */
    public ParserConfigurationSettings() {
        this(null);
    } // <init>()

    /**
     * Constructs a parser configuration settings object with a
     * parent settings object.
     */
    public ParserConfigurationSettings(XMLComponentManager parent) {

        // create storage for recognized features and properties
        fRecognizedFeatures = new ArrayList();
        fRecognizedProperties = new ArrayList();

        // create table for features and properties
        fFeatures = new HashMap();
        fProperties = new HashMap();

        // save parent
        fParentSettings = parent;

    } // <init>(XMLComponentManager)

    //
    // XMLParserConfiguration methods
    //

    /**
     * Allows a parser to add parser specific features to be recognized
     * and managed by the parser configuration.
     *
     * @param featureIds An array of the additional feature identifiers
     *                   to be recognized.
     */
    public void addRecognizedFeatures(String[] featureIds) {

        // add recognized features
        int featureIdsCount = featureIds != null ? featureIds.length : 0;
        for (int i = 0; i < featureIdsCount; i++) {
            String featureId = featureIds[i];
            if (!fRecognizedFeatures.contains(featureId)) {
                fRecognizedFeatures.add(featureId);
            }
        }

    } // addRecognizedFeatures(String[])

    /**
     * Set the state of a feature.
     *
     * Set the state of any feature in a SAX2 parser.  The parser
     * might not recognize the feature, and if it does recognize
     * it, it might not be able to fulfill the request.
     *
     * @param featureId The unique identifier (URI) of the feature.
     * @param state The requested state of the feature (true or false).
     *
     * @exception mf.org.apache.xerces.xni.parser.XMLConfigurationException If the
     *            requested feature is not known.
     */
    public void setFeature(String featureId, boolean state)
        throws XMLConfigurationException {

        // check and store
        checkFeature(featureId);

        fFeatures.put(featureId, state ? Boolean.TRUE : Boolean.FALSE);
    } // setFeature(String,boolean)

    /**
     * Allows a parser to add parser specific properties to be recognized
     * and managed by the parser configuration.
     *
     * @param propertyIds An array of the additional property identifiers
     *                    to be recognized.
     */
    public void addRecognizedProperties(String[] propertyIds) {

        // add recognizedProperties
        int propertyIdsCount = propertyIds != null ? propertyIds.length : 0;
        for (int i = 0; i < propertyIdsCount; i++) {
            String propertyId = propertyIds[i];
            if (!fRecognizedProperties.contains(propertyId)) {
                fRecognizedProperties.add(propertyId);
            }
        }

    } // addRecognizedProperties(String[])

    /**
     * setProperty
     *
     * @param propertyId
     * @param value
     * @exception mf.org.apache.xerces.xni.parser.XMLConfigurationException If the
     *            requested feature is not known.
     */
    public void setProperty(String propertyId, Object value)
        throws XMLConfigurationException {

        // check and store
        checkProperty(propertyId);
        fProperties.put(propertyId, value);

    } // setProperty(String,Object)

    //
    // XMLComponentManager methods
    //

    /**
     * Returns the state of a feature.
     *
     * @param featureId The feature identifier.
		 * @return true if the feature is supported
     *
     * @throws XMLConfigurationException Thrown for configuration error.
     *                                   In general, components should
     *                                   only throw this exception if
     *                                   it is really
     *                                   a critical error.
     */
    public boolean getFeature(String featureId)
        throws XMLConfigurationException {

        Boolean state = (Boolean) fFeatures.get(featureId);

        if (state == null) {
            checkFeature(featureId);
            return false;
        }
        return state.booleanValue();

    } // getFeature(String):boolean

    /**
     * Returns the value of a property.
     *
     * @param propertyId The property identifier.
		 * @return the value of the property
     *
     * @throws XMLConfigurationException Thrown for configuration error.
     *                                   In general, components should
     *                                   only throw this exception if
     *                                   it is really
     *                                   a critical error.
     */
    public Object getProperty(String propertyId)
        throws XMLConfigurationException {

        Object propertyValue = fProperties.get(propertyId);

        if (propertyValue == null) {
            checkProperty(propertyId);
        }

        return propertyValue;

    } // getProperty(String):Object

    //
    // Protected methods
    //

    /**
     * Check a feature. If feature is known and supported, this method simply
     * returns. Otherwise, the appropriate exception is thrown.
     *
     * @param featureId The unique identifier (URI) of the feature.
     *
     * @exception mf.org.apache.xerces.xni.parser.XMLConfigurationException If the
     *            requested feature is not known.
     */
    protected void checkFeature(String featureId)
        throws XMLConfigurationException {

        // check feature
        if (!fRecognizedFeatures.contains(featureId)) {
            if (fParentSettings != null) {
                fParentSettings.getFeature(featureId);
            }
            else {
                short type = XMLConfigurationException.NOT_RECOGNIZED;
                throw new XMLConfigurationException(type, featureId);
            }
        }

    } // checkFeature(String)

    /**
     * Check a property. If the property is known and supported, this method
     * simply returns. Otherwise, the appropriate exception is thrown.
     *
     * @param propertyId The unique identifier (URI) of the property
     *                   being set.
     * @exception mf.org.apache.xerces.xni.parser.XMLConfigurationException If the
     *            requested feature is not known.
     */
    protected void checkProperty(String propertyId)
        throws XMLConfigurationException {

        // check property
        if (!fRecognizedProperties.contains(propertyId)) {
            if (fParentSettings != null) {
                fParentSettings.getProperty(propertyId);
            }
            else {
                short type = XMLConfigurationException.NOT_RECOGNIZED;
                throw new XMLConfigurationException(type, propertyId);
            }
        }

    } // checkProperty(String)

} // class ParserConfigurationSettings


text:
package net.reliableresponse.notification.web.filters;

import java.io.IOException;
import java.util.Enumeration;

import javax.servlet.Filter;
import javax.servlet.FilterChain;
import javax.servlet.FilterConfig;
import javax.servlet.ServletContext;
import javax.servlet.ServletException;
import javax.servlet.ServletRequest;
import javax.servlet.ServletResponse;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import net.reliableresponse.notification.broker.BrokerFactory;
import net.reliableresponse.notification.usermgmt.Roles;
import net.reliableresponse.notification.usermgmt.User;

public class SOAPFilter implements Filter {
	ServletContext ctx;
	public void init(FilterConfig config) throws ServletException {
		System.out.println("Initializing SOAP Filter");
		ctx = config.getServletContext();

	}

	public void doFilter(ServletRequest request, ServletResponse response,
			FilterChain chain) throws IOException, ServletException {
		HttpServletRequest httpRequest =(HttpServletRequest) request;
		BrokerFactory.getLoggingBroker().logDebug("Running SOAP Filter");
		if (!httpRequest.getRequestURI().endsWith("jws")) {
			BrokerFactory.getLoggingBroker().logDebug("Not a JWS file");
			return;
		}
    	User user = null;
    	String uuid = (String)httpRequest.getSession().getAttribute("user");
		if (uuid != null) {
			user = BrokerFactory.getUserMgmtBroker().getUserByUuid(uuid);
		}

		if (user == null) {
			String authHeader = httpRequest.getHeader("authorization");
			BrokerFactory.getLoggingBroker().logDebug("authHeader="+authHeader);
			if (authHeader != null) {
				if (authHeader.toLowerCase().startsWith("basic ")) {
					authHeader = authHeader.substring (6, authHeader.length());
					String decoded = new String(org.apache.axis.encoding.Base64.decode(authHeader));
					if ((decoded != null) && (decoded.indexOf(":")>0)) {
						String userName = decoded.substring(0, decoded.indexOf(":"));
						String passphrase = decoded.substring(decoded.indexOf(":")+1, decoded.length());
						user = BrokerFactory.getAuthenticationBroker().authenticate(userName, passphrase);
						if (user != null) {
							httpRequest.setAttribute("user", user.getUuid());
						}
					}
				}
			}
		}

		BrokerFactory.getLoggingBroker().logDebug("Running SOAP as user "+user);
		if (!BrokerFactory.getAuthorizationBroker().isUserInRole(user, Roles.SOAP_CALLER)) {
			((HttpServletResponse)response).sendError(HttpServletResponse.SC_FORBIDDEN);
			return;
		}
		chain.doFilter(request, response);
	}

	public void destroy() {
		// TODO Auto-generated method stub

	}

}


text:
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE ldml SYSTEM "../../common/dtd/ldml.dtd">
<!-- Copyright © 1991-2013 Unicode, Inc.
CLDR data files are interpreted according to the LDML specification (http://unicode.org/reports/tr35/)
For terms of use, see http://www.unicode.org/copyright.html
-->
<ldml>
	<identity>
		<version number="$Revision: 9287 $"/>
		<generation date="$Date: 2013-08-28 21:32:04 -0500 (Wed, 28 Aug 2013) $"/>
		<language type="ksf"/>
	</identity>
	<localeDisplayNames>
		<languages>
			<language type="ak">riakan</language>
			<language type="am">riamarik</language>
			<language type="ar">riarab</language>
			<language type="be">ribɛlɔrís</language>
			<language type="bg">ribulgarí</language>
			<language type="bn">ribɛngáli</language>
			<language type="cs">ricɛ́k</language>
			<language type="de">ridjɛrman</language>
			<language type="el">rigrɛ́k</language>
			<language type="en">riingɛrís</language>
			<language type="es">rikpanyá</language>
			<language type="fa">ripɛrsán</language>
			<language type="fr">ripɛrɛsǝ́</language>
			<language type="ha">rikaksa</language>
			<language type="hi">riíndí</language>
			<language type="hu">riɔngrɔá</language>
			<language type="id">riindonɛsí</language>
			<language type="ig">riigbo</language>
			<language type="it">riitalyɛ́n</language>
			<language type="ja">rijapɔ́ŋ</language>
			<language type="jv">rijawanɛ́</language>
			<language type="km">rikmɛr</language>
			<language type="ko">rikɔrɛɛ́</language>
			<language type="ksf">rikpa</language>
			<language type="ms">rimalaí</language>
			<language type="my">ribirmán</language>
			<language type="ne">rinepalɛ́</language>
			<language type="nl">riɔlándɛ́</language>
			<language type="pa">ripɛnjabí</language>
			<language type="pl">ripɔlɔ́n</language>
			<language type="pt">ripɔrtugɛ́</language>
			<language type="ro">rirɔmán</language>
			<language type="ru">rirís</language>
			<language type="rw">rirwanda</language>
			<language type="so">risomalí</language>
			<language type="sv">riswɛ́dǝ</language>
			<language type="ta">ritamúl</language>
			<language type="th">ritaí</language>
			<language type="tr">riturk</language>
			<language type="uk">riukrɛ́n</language>
			<language type="ur">riurdú</language>
			<language type="vi">riwyɛtnám</language>
			<language type="yo">riyúuba</language>
			<language type="zh">ricinɔá</language>
			<language type="zu">rizúlu</language>
		</languages>
		<territories>
			<territory type="AD">andɔrǝ</territory>
			<territory type="AE">bǝlɔŋ bǝ kaksa bɛ táatáaŋzǝn</territory>
			<territory type="AF">afganistáŋ</territory>
			<territory type="AG">antiga ri barbúda</territory>
			<territory type="AI">angiya</territory>
			<territory type="AL">albaní</territory>
			<territory type="AM">armɛní</territory>
			<territory type="AN">antíyǝ nɛlandé</territory>
			<territory type="AO">angóla</territory>
			<territory type="AR">arjǝntín</territory>
			<territory type="AS">samɔa a amɛrika</territory>
			<territory type="AT">otric</territory>
			<territory type="AU">ɔstralí</territory>
			<territory type="AW">aruba</territory>
			<territory type="AZ">azabecán</territory>
			<territory type="BA">bɔsnyɛ ri hɛrsǝgɔvín</territory>
			<territory type="BB">baabaadǝ</territory>
			<territory type="BD">baŋladɛ́c</territory>
			<territory type="BE">bɛljík</territory>
			<territory type="BF">bukína fǝ́ asɔ</territory>
			<territory type="BG">bulgarí</territory>
			<territory type="BH">barǝ́n</territory>
			<territory type="BI">burundí</territory>
			<territory type="BJ">bɛnǝ́n</territory>
			<territory type="BM">bɛɛmúdǝ</territory>
			<territory type="BN">brunǝ́</territory>
			<territory type="BO">bɔɔlíví</territory>
			<territory type="BR">brɛsíl</territory>
			<territory type="BS">baamás</territory>
			<territory type="BT">bután</territory>
			<territory type="BW">botswana</territory>
			<territory type="BY">bɛlaris</territory>
			<territory type="BZ">bɛliz</territory>
			<territory type="CA">kanada</territory>
			<territory type="CD">kɔngó anyɔ́n</territory>
			<territory type="CF">santrafrík</territory>
			<territory type="CG">kɔngó</territory>
			<territory type="CH">swís</territory>
			<territory type="CI">kɔtiwuár</territory>
			<territory type="CK">zɛ i kúk</territory>
			<territory type="CL">cíli</territory>
			<territory type="CM">kamɛrún</territory>
			<territory type="CN">cín</territory>
			<territory type="CO">kolɔmbí</territory>
			<territory type="CR">kɔstaríka</territory>
			<territory type="CU">kuba</territory>
			<territory type="CV">kapvɛr</territory>
			<territory type="CY">cíprɛ</territory>
			<territory type="CZ">cɛ́k</territory>
			<territory type="DE">djɛrman</territory>
			<territory type="DJ">dyibutí</territory>
			<territory type="DK">danmak</territory>
			<territory type="DM">dɔminik</territory>
			<territory type="DO">dɔminik rɛpublík</territory>
			<territory type="DZ">aljɛrí</territory>
			<territory type="EC">ɛkwatɛǝ́</territory>
			<territory type="EE">ɛstoní</territory>
			<territory type="EG">ɛjípt</territory>
			<territory type="ER">ɛritrɛ́</territory>
			<territory type="ES">kpanyá</territory>
			<territory type="ET">ɛtyɔpí</territory>
			<territory type="FI">fínlan</territory>
			<territory type="FJ">fíji</territory>
			<territory type="FK">zǝ maalwín</territory>
			<territory type="FM">mikronɛ́si</territory>
			<territory type="FR">pɛrɛsǝ́</territory>
			<territory type="GA">gabɔŋ</territory>
			<territory type="GB">kǝlɔŋ kǝ kǝtáatáaŋzǝn</territory>
			<territory type="GD">grɛnadǝ</territory>
			<territory type="GE">jɔrjí</territory>
			<territory type="GF">guyán i pɛrɛsǝ́</territory>
			<territory type="GH">gána</territory>
			<territory type="GI">jibraltá</territory>
			<territory type="GL">grínlan</territory>
			<territory type="GM">gambí</territory>
			<territory type="GN">ginɛ́</territory>
			<territory type="GP">gwadɛlúp</territory>
			<territory type="GQ">ginɛ́ ɛkwatɔrial</territory>
			<territory type="GR">grɛ́k</territory>
			<territory type="GT">gwátǝmala</territory>
			<territory type="GU">gwám</territory>
			<territory type="GW">ginɛ́ bisɔ́</territory>
			<territory type="GY">guyán</territory>
			<territory type="HN">ɔnduras</territory>
			<territory type="HR">krwasí</territory>
			<territory type="HT">ayiti</territory>
			<territory type="HU">ɔngrí</territory>
			<territory type="ID">indonɛsí</territory>
			<territory type="IE">ilán</territory>
			<territory type="IL">israɛ́l</territory>
			<territory type="IN">indí</territory>
			<territory type="IO">zǝ ingɛrís ncɔ́m wa indi</territory>
			<territory type="IQ">irák</territory>
			<territory type="IR">iráŋ</territory>
			<territory type="IS">zǝ i glás</territory>
			<territory type="IT">italí</territory>
			<territory type="JM">jamaík</territory>
			<territory type="JO">jɔrdán</territory>
			<territory type="JP">japɔ́ŋ</territory>
			<territory type="KE">kɛnya</territory>
			<territory type="KG">kigistáŋ</territory>
			<territory type="KH">kambodj</territory>
			<territory type="KI">kiribáti</territory>
			<territory type="KM">komɔr</territory>
			<territory type="KN">sɛnkrǝstɔ́f ri nyɛ́vǝ</territory>
			<territory type="KP">korɛanɔ́r</territory>
			<territory type="KR">korɛasud</territory>
			<territory type="KW">kuwɛit</territory>
			<territory type="KY">zǝ i gan</territory>
			<territory type="KZ">kazakstáŋ</territory>
			<territory type="LA">laɔs</territory>
			<territory type="LB">libáŋ</territory>
			<territory type="LC">sɛntlísí</territory>
			<territory type="LI">lictɛnstɛ́n</territory>
			<territory type="LK">srílaŋka</territory>
			<territory type="LR">libɛrya</territory>
			<territory type="LS">lǝsóto</territory>
			<territory type="LT">litwaní</territory>
			<territory type="LU">luksɛmbúr</territory>
			<territory type="LV">lɛtoní</territory>
			<territory type="LY">libí</territory>
			<territory type="MA">marɔk</territory>
			<territory type="MC">monako</territory>
			<territory type="MD">mɔldaví</territory>
			<territory type="MG">madagaska</territory>
			<territory type="MH">zǝ i marcál</territory>
			<territory type="MK">másǝdwán</territory>
			<territory type="ML">mali</territory>
			<territory type="MM">myanmár</territory>
			<territory type="MN">mɔŋolí</territory>
			<territory type="MP">zǝ maryánnɔ́r</territory>
			<territory type="MQ">matiník</territory>
			<territory type="MR">mwaritaní</territory>
			<territory type="MS">mɔnsɛrat</territory>
			<territory type="MT">maltǝ</territory>
			<territory type="MU">mwarís</territory>
			<territory type="MV">maldivǝ</territory>
			<territory type="MW">malawi</territory>
			<territory type="MX">mɛksík</territory>
			<territory type="MY">malɛsí</territory>
			<territory type="MZ">mosambík</territory>
			<territory type="NA">namibí</territory>
			<territory type="NC">kalɛdoní anyɔ́n</territory>
			<territory type="NE">nijɛ́r</territory>
			<territory type="NF">zɛ nɔ́fɔlk</territory>
			<territory type="NG">nijɛ́rya</territory>
			<territory type="NI">níkarágwa</territory>
			<territory type="NL">kǝlɔŋ kǝ ázǝ</territory>
			<territory type="NO">nɔrvɛjǝ</territory>
			<territory type="NP">nɛpal</territory>
			<territory type="NR">nwarú</territory>
			<territory type="NU">niwɛ́</territory>
			<territory type="NZ">zɛlan anyɔ́n</territory>
			<territory type="OM">oman</territory>
			<territory type="PA">panama</territory>
			<territory type="PE">pɛrú</territory>
			<territory type="PF">pɔlinɛsí a pɛrɛsǝ́</territory>
			<territory type="PG">papwazí ginɛ́ anyɔ́n</territory>
			<territory type="PH">filipǝ́n</territory>
			<territory type="PK">pakistáŋ</territory>
			<territory type="PL">polɔ́n</territory>
			<territory type="PM">sɛnpyɛr ri mikɛlɔŋ</territory>
			<territory type="PN">pitkɛ́n</territory>
			<territory type="PR">pɔtoríko</territory>
			<territory type="PS">zǝ palɛstínǝ</territory>
			<territory type="PT">portugál</territory>
			<territory type="PW">palwa</territory>
			<territory type="PY">paragwɛ́</territory>
			<territory type="QA">katá</territory>
			<territory type="RE">rɛunyɔŋ</territory>
			<territory type="RO">rɔmaní</territory>
			<territory type="RU">risí</territory>
			<territory type="RW">rwanda</territory>
			<territory type="SA">arabí saodí</territory>
			<territory type="SB">zǝ salomɔ́n</territory>
			<territory type="SC">sɛcɛl</territory>
			<territory type="SD">sudan</territory>
			<territory type="SE">swɛdǝ</territory>
			<territory type="SG">siŋapó</territory>
			<territory type="SH">sɛntɛ́len</territory>
			<territory type="SI">slovɛní</territory>
			<territory type="SK">slovakí</territory>
			<territory type="SL">syɛraleon</territory>
			<territory type="SM">sɛnmarǝn</territory>
			<territory type="SN">sɛnɛgal</territory>
			<territory type="SO">somalí</territory>
			<territory type="SR">surinam</territory>
			<territory type="ST">saotomɛ́ ri priŋsib</territory>
			<territory type="SV">salvadɔr</territory>
			<territory type="SY">sirí</territory>
			<territory type="SZ">swazilan</territory>
			<territory type="TC">zǝ tirk ri kakɔs</territory>
			<territory type="TD">caád</territory>
			<territory type="TG">togo</territory>
			<territory type="TH">tɛlan</territory>
			<territory type="TJ">tadjikistaŋ</territory>
			<territory type="TK">tokǝlao</territory>
			<territory type="TL">timor anǝ á ɛst</territory>
			<territory type="TM">tirkmɛnistaŋ</territory>
			<territory type="TN">tunɛsí</territory>
			<territory type="TO">tɔŋa</territory>
			<territory type="TR">tirkí</territory>
			<territory type="TT">tɛrinitɛ ri tobago</territory>
			<territory type="TV">tuwalu</territory>
			<territory type="TW">tɛwán</territory>
			<territory type="TZ">tanzaní</territory>
			<territory type="UA">ukrain</territory>
			<territory type="UG">uganda</territory>
			<territory type="US">amɛrika</territory>
			<territory type="UY">urugwɛ́</territory>
			<territory type="UZ">usbɛkistaŋ</territory>
			<territory type="VA">watikáŋ</territory>
			<territory type="VC">sɛnvǝnsǝŋ ri grɛnadín</territory>
			<territory type="VE">wɛnǝzwɛla</territory>
			<territory type="VG">zǝ bɛ gɔn inɛ a ingɛrís</territory>
			<territory type="VI">zǝ bɛ gɔn inɛ á amɛrika</territory>
			<territory type="VN">wyɛtnám</territory>
			<territory type="VU">wanwatu</territory>
			<territory type="WF">walis ri futuna</territory>
			<territory type="WS">samɔa</territory>
			<territory type="YE">yɛmɛn</territory>
			<territory type="YT">mayɔ́t</territory>
			<territory type="ZA">afrik anǝ a sud</territory>
			<territory type="ZM">zambí</territory>
			<territory type="ZW">zimbabwɛ́</territory>
		</territories>
	</localeDisplayNames>
	<characters>
		<exemplarCharacters>[a á b c d e é ǝ {ǝ\u0301} ɛ {ɛ\u0301} f g h i í j k l m n ŋ o ó ɔ {ɔ\u0301} p r s t u ú v w y z]</exemplarCharacters>
		<exemplarCharacters type="auxiliary">[q x]</exemplarCharacters>
		<exemplarCharacters type="index">[A B C D E Ǝ Ɛ F G H I J K L M N Ŋ O Ɔ P R S T U V W Y Z]</exemplarCharacters>
	</characters>
	<delimiters>
		<quotationStart>«</quotationStart>
		<quotationEnd>»</quotationEnd>
		<alternateQuotationStart>'</alternateQuotationStart>
		<alternateQuotationEnd>'</alternateQuotationEnd>
	</delimiters>
	<dates>
		<calendars>
			<calendar type="generic">
				<dateFormats>
					<dateFormatLength type="full">
						<dateFormat>
							<pattern>EEEE d MMMM y G</pattern>
						</dateFormat>
					</dateFormatLength>
					<dateFormatLength type="long">
						<dateFormat>
							<pattern>d MMMM y G</pattern>
						</dateFormat>
					</dateFormatLength>
					<dateFormatLength type="medium">
						<dateFormat>
							<pattern>d MMM y G</pattern>
						</dateFormat>
					</dateFormatLength>
					<dateFormatLength type="short">
						<dateFormat>
							<pattern>d/M/y GGGGG</pattern>
						</dateFormat>
					</dateFormatLength>
				</dateFormats>
				<dateTimeFormats>
					<availableFormats>
						<dateFormatItem id="d">d</dateFormatItem>
						<dateFormatItem id="Ed">E d</dateFormatItem>
						<dateFormatItem id="hm">h:mm a</dateFormatItem>
						<dateFormatItem id="Hm">HH:mm</dateFormatItem>
						<dateFormatItem id="hms">h:mm:ss a</dateFormatItem>
						<dateFormatItem id="Hms">HH:mm:ss</dateFormatItem>
						<dateFormatItem id="M">L</dateFormatItem>
						<dateFormatItem id="Md">d/M</dateFormatItem>
						<dateFormatItem id="MEd">E d/M</dateFormatItem>
						<dateFormatItem id="MMM">LLL</dateFormatItem>
						<dateFormatItem id="MMMd">d MMM</dateFormatItem>
						<dateFormatItem id="MMMEd">E d MMM</dateFormatItem>
						<dateFormatItem id="ms">m:ss</dateFormatItem>
						<dateFormatItem id="y">y</dateFormatItem>
						<dateFormatItem id="yM">M/y</dateFormatItem>
						<dateFormatItem id="yMd">d/M/y</dateFormatItem>
						<dateFormatItem id="yMEd">E d/M/y</dateFormatItem>
						<dateFormatItem id="yMMM">MMM y</dateFormatItem>
						<dateFormatItem id="yMMMd">d MMM y</dateFormatItem>
						<dateFormatItem id="yMMMEd">E d MMM y</dateFormatItem>
						<dateFormatItem id="yQQQ">QQQ y</dateFormatItem>
						<dateFormatItem id="yQQQQ">QQQQ y</dateFormatItem>
					</availableFormats>
				</dateTimeFormats>
			</calendar>
			<calendar type="gregorian">
				<months>
					<monthContext type="format">
						<monthWidth type="abbreviated">
							<month type="1">ŋ1</month>
							<month type="2">ŋ2</month>
							<month type="3">ŋ3</month>
							<month type="4">ŋ4</month>
							<month type="5">ŋ5</month>
							<month type="6">ŋ6</month>
							<month type="7">ŋ7</month>
							<month type="8">ŋ8</month>
							<month type="9">ŋ9</month>
							<month type="10">ŋ10</month>
							<month type="11">ŋ11</month>
							<month type="12">ŋ12</month>
						</monthWidth>
						<monthWidth type="wide">
							<month type="1">ŋwíí a ntɔ́ntɔ</month>
							<month type="2">ŋwíí akǝ bɛ́ɛ</month>
							<month type="3">ŋwíí akǝ ráá</month>
							<month type="4">ŋwíí akǝ nin</month>
							<month type="5">ŋwíí akǝ táan</month>
							<month type="6">ŋwíí akǝ táafɔk</month>
							<month type="7">ŋwíí akǝ táabɛɛ</month>
							<month type="8">ŋwíí akǝ táaraa</month>
							<month type="9">ŋwíí akǝ táanin</month>
							<month type="10">ŋwíí akǝ ntɛk</month>
							<month type="11">ŋwíí akǝ ntɛk di bɔ́k</month>
							<month type="12">ŋwíí akǝ ntɛk di bɛ́ɛ</month>
						</monthWidth>
					</monthContext>
				</months>
				<days>
					<dayContext type="format">
						<dayWidth type="abbreviated">
							<day type="sun">sɔ́n</day>
							<day type="mon">lǝn</day>
							<day type="tue">maa</day>
							<day type="wed">mɛk</day>
							<day type="thu">jǝǝ</day>
							<day type="fri">júm</day>
							<day type="sat">sam</day>
						</dayWidth>
						<dayWidth type="wide">
							<day type="sun">sɔ́ndǝ</day>
							<day type="mon">lǝndí</day>
							<day type="tue">maadí</day>
							<day type="wed">mɛkrɛdí</day>
							<day type="thu">jǝǝdí</day>
							<day type="fri">júmbá</day>
							<day type="sat">samdí</day>
						</dayWidth>
					</dayContext>
					<dayContext type="stand-alone">
						<dayWidth type="narrow">
							<day type="sun">s</day>
							<day type="mon">l</day>
							<day type="tue">m</day>
							<day type="wed">m</day>
							<day type="thu">j</day>
							<day type="fri">j</day>
							<day type="sat">s</day>
						</dayWidth>
					</dayContext>
				</days>
				<quarters>
					<quarterContext type="format">
						<quarterWidth type="abbreviated">
							<quarter type="1">i1</quarter>
							<quarter type="2">i2</quarter>
							<quarter type="3">i3</quarter>
							<quarter type="4">i4</quarter>
						</quarterWidth>
						<quarterWidth type="wide">
							<quarter type="1">id́ɛ́n kǝbǝk kǝ ntɔ́ntɔ́</quarter>
							<quarter type="2">idɛ́n kǝbǝk kǝ kǝbɛ́ɛ</quarter>
							<quarter type="3">idɛ́n kǝbǝk kǝ kǝráá</quarter>
							<quarter type="4">idɛ́n kǝbǝk kǝ kǝnin</quarter>
						</quarterWidth>
					</quarterContext>
				</quarters>
				<dayPeriods>
					<dayPeriodContext type="format">
						<dayPeriodWidth type="wide">
							<dayPeriod type="am">sárúwá</dayPeriod>
							<dayPeriod type="pm">cɛɛ́nko</dayPeriod>
						</dayPeriodWidth>
					</dayPeriodContext>
				</dayPeriods>
				<eras>
					<eraNames>
						<era type="0">di Yɛ́sus aká yálɛ</era>
						<era type="1">cámɛɛn kǝ kǝbɔpka Y</era>
					</eraNames>
					<eraAbbr>
						<era type="0">d.Y.</era>
						<era type="1">k.Y.</era>
					</eraAbbr>
				</eras>
				<dateFormats>
					<dateFormatLength type="full">
						<dateFormat>
							<pattern>EEEE d MMMM y</pattern>
						</dateFormat>
					</dateFormatLength>
					<dateFormatLength type="long">
						<dateFormat>
							<pattern>d MMMM y</pattern>
						</dateFormat>
					</dateFormatLength>
					<dateFormatLength type="medium">
						<dateFormat>
							<pattern>d MMM y</pattern>
						</dateFormat>
					</dateFormatLength>
					<dateFormatLength type="short">
						<dateFormat>
							<pattern>d/M/y</pattern>
						</dateFormat>
					</dateFormatLength>
				</dateFormats>
				<timeFormats>
					<timeFormatLength type="full">
						<timeFormat>
							<pattern>HH:mm:ss zzzz</pattern>
						</timeFormat>
					</timeFormatLength>
					<timeFormatLength type="long">
						<timeFormat>
							<pattern>HH:mm:ss z</pattern>
						</timeFormat>
					</timeFormatLength>
					<timeFormatLength type="medium">
						<timeFormat>
							<pattern>HH:mm:ss</pattern>
						</timeFormat>
					</timeFormatLength>
					<timeFormatLength type="short">
						<timeFormat>
							<pattern>HH:mm</pattern>
						</timeFormat>
					</timeFormatLength>
				</timeFormats>
				<dateTimeFormats>
					<availableFormats>
						<dateFormatItem id="d">d</dateFormatItem>
						<dateFormatItem id="Ed">E d</dateFormatItem>
						<dateFormatItem id="hm">h:mm a</dateFormatItem>
						<dateFormatItem id="Hm">HH:mm</dateFormatItem>
						<dateFormatItem id="hms">h:mm:ss a</dateFormatItem>
						<dateFormatItem id="Hms">HH:mm:ss</dateFormatItem>
						<dateFormatItem id="M">L</dateFormatItem>
						<dateFormatItem id="Md">d/M</dateFormatItem>
						<dateFormatItem id="MEd">E d/M</dateFormatItem>
						<dateFormatItem id="MMM">LLL</dateFormatItem>
						<dateFormatItem id="MMMd">d MMM</dateFormatItem>
						<dateFormatItem id="MMMEd">E d MMM</dateFormatItem>
						<dateFormatItem id="ms">m:ss</dateFormatItem>
						<dateFormatItem id="y">y</dateFormatItem>
						<dateFormatItem id="yM">M/y</dateFormatItem>
						<dateFormatItem id="yMd">d/M/y</dateFormatItem>
						<dateFormatItem id="yMEd">E d/M/y</dateFormatItem>
						<dateFormatItem id="yMMM">MMM y</dateFormatItem>
						<dateFormatItem id="yMMMd">d MMM y</dateFormatItem>
						<dateFormatItem id="yMMMEd">E d MMM y</dateFormatItem>
						<dateFormatItem id="yQQQ">QQQ y</dateFormatItem>
						<dateFormatItem id="yQQQQ">QQQQ y</dateFormatItem>
					</availableFormats>
				</dateTimeFormats>
			</calendar>
		</calendars>
		<fields>
			<field type="era">
				<displayName>Byámɛɛn</displayName>
			</field>
			<field type="year">
				<displayName>Bǝk</displayName>
			</field>
			<field type="month">
				<displayName>Ŋwíí</displayName>
			</field>
			<field type="week">
				<displayName>Sɔ́ndǝ</displayName>
			</field>
			<field type="day">
				<displayName>Ŋwós</displayName>
				<relative type="-1">Rinkɔɔ́</relative>
				<relative type="0">Gɛ́ɛnǝ</relative>
				<relative type="1">Ridúrǝ́</relative>
			</field>
			<field type="weekday">
				<displayName>Mǝrú mǝ sɔ́ndǝ</displayName>
			</field>
			<field type="dayperiod">
				<displayName>Sárúwá / Cɛɛ́nko</displayName>
			</field>
			<field type="hour">
				<displayName>Cámɛɛn</displayName>
			</field>
			<field type="minute">
				<displayName>Mǝnít</displayName>
			</field>
			<field type="second">
				<displayName>Háu</displayName>
			</field>
			<field type="zone">
				<displayName>Wáas</displayName>
			</field>
		</fields>
	</dates>
	<numbers>
		<symbols numberSystem="latn">
			<decimal>,</decimal>
			<group> </group>
		</symbols>
		<decimalFormats numberSystem="latn">
			<decimalFormatLength>
				<decimalFormat>
					<pattern>#,##0.###</pattern>
				</decimalFormat>
			</decimalFormatLength>
		</decimalFormats>
		<currencyFormats numberSystem="latn">
			<currencyFormatLength>
				<currencyFormat type="standard">
					<pattern>#,##0.00 ¤</pattern>
				</currencyFormat>
			</currencyFormatLength>
		</currencyFormats>
		<currencies>
			<currency type="AED">
				<displayName>mɔni mǝ á bǝlɔŋ bǝ kaksa bɛ táatáaŋzǝn</displayName>
			</currency>
			<currency type="AOA">
				<displayName>mɔni mǝ á angóla</displayName>
			</currency>
			<currency type="AUD">
				<displayName>mɔni mǝ á ɔstralí</displayName>
			</currency>
			<currency type="BHD">
				<displayName>mɔni mǝ á barǝ́n</displayName>
			</currency>
			<currency type="BIF">
				<displayName>mɔni mǝ á burundí</displayName>
			</currency>
			<currency type="BWP">
				<displayName>mɔni mǝ á botswana</displayName>
			</currency>
			<currency type="CAD">
				<displayName>mɔni mǝ á kanada</displayName>
			</currency>
			<currency type="CDF">
				<displayName>mɔni mǝ á kɔngó</displayName>
			</currency>
			<currency type="CHF">
				<displayName>mɔni mǝ á swís</displayName>
			</currency>
			<currency type="CNY">
				<displayName>mɔni mǝ á cín</displayName>
			</currency>
			<currency type="CVE">
				<displayName>mɔni mǝ á kapvɛr</displayName>
			</currency>
			<currency type="DJF">
				<displayName>mɔni mǝ á dyibutí</displayName>
			</currency>
			<currency type="DZD">
				<displayName>mɔni mǝ á aljɛrí</displayName>
			</currency>
			<currency type="EGP">
				<displayName>mɔni mǝ á ɛjípt</displayName>
			</currency>
			<currency type="ERN">
				<displayName>mɔni mǝ á ɛritrɛ́</displayName>
			</currency>
			<currency type="ETB">
				<displayName>mɔni mǝ á ɛtyɔpí</displayName>
			</currency>
			<currency type="EUR">
				<displayName>mɔni mǝ á pɛrɛsǝ́</displayName>
			</currency>
			<currency type="GBP">
				<displayName>mɔni mǝ á ingɛrís</displayName>
			</currency>
			<currency type="GHC">
				<displayName>mɔni mǝ á gána</displayName>
			</currency>
			<currency type="GMD">
				<displayName>mɔni mǝ á gambí</displayName>
			</currency>
			<currency type="GNS">
				<displayName>mɔni mǝ á ginɛ́</displayName>
			</currency>
			<currency type="INR">
				<displayName>mɔni mǝ á indí</displayName>
			</currency>
			<currency type="JPY">
				<displayName>mɔni mǝ á japɔ́ŋ</displayName>
			</currency>
			<currency type="KES">
				<displayName>mɔni mǝ á kɛnya</displayName>
			</currency>
			<currency type="KMF">
				<displayName>mɔni mǝ á komɔr</displayName>
			</currency>
			<currency type="LRD">
				<displayName>mɔni mǝ á libɛrya</displayName>
			</currency>
			<currency type="LSL">
				<displayName>mɔni mǝ á lǝsóto</displayName>
			</currency>
			<currency type="LYD">
				<displayName>mɔni mǝ á libí</displayName>
			</currency>
			<currency type="MAD">
				<displayName>mɔni mǝ á marɔk</displayName>
			</currency>
			<currency type="MGA">
				<displayName>mɔni mǝ á madagaska</displayName>
			</currency>
			<currency type="MRO">
				<displayName>mɔni mǝ á mwaritaní</displayName>
			</currency>
			<currency type="MUR">
				<displayName>mɔni mǝ á mwarís</displayName>
			</currency>
			<currency type="MWK">
				<displayName>mɔni mǝ á malawi</displayName>
			</currency>
			<currency type="MZM">
				<displayName>mɔni mǝ á mosambík</displayName>
			</currency>
			<currency type="NAD">
				<displayName>mɔni mǝ á namibí</displayName>
			</currency>
			<currency type="NGN">
				<displayName>mɔni mǝ á nijɛ́rya</displayName>
			</currency>
			<currency type="RWF">
				<displayName>mɔni mǝ á rwanda</displayName>
			</currency>
			<currency type="SAR">
				<displayName>mɔni mǝ á arabí saodí</displayName>
			</currency>
			<currency type="SCR">
				<displayName>mɔni mǝ á sɛcɛl</displayName>
			</currency>
			<currency type="SDG">
				<displayName>mɔni mǝ á sudan</displayName>
			</currency>
			<currency type="SHP">
				<displayName>mɔni mǝ á sɛntɛ́len</displayName>
			</currency>
			<currency type="SLL">
				<displayName>mɔni mǝ á syɛraleon</displayName>
			</currency>
			<currency type="SOS">
				<displayName>mɔni mǝ á somalí</displayName>
			</currency>
			<currency type="STD">
				<displayName>mɔni mǝ á saotomɛ́ ri priŋsib</displayName>
			</currency>
			<currency type="SZL">
				<displayName>mɔni mǝ á swazilan</displayName>
			</currency>
			<currency type="TND">
				<displayName>mɔni mǝ á tunɛsí</displayName>
			</currency>
			<currency type="TZS">
				<displayName>mɔni mǝ á tanzaní</displayName>
			</currency>
			<currency type="UGX">
				<displayName>mɔni mǝ á uganda</displayName>
			</currency>
			<currency type="USD">
				<displayName>mɔni mǝ á amɛrika</displayName>
			</currency>
			<currency type="XAF">
				<displayName>fráŋ</displayName>
			</currency>
			<currency type="XOF">
				<displayName>mɔni mǝ á afríka aná wɛs</displayName>
			</currency>
			<currency type="ZAR">
				<displayName>mɔni mǝ á afrik anǝ a sud</displayName>
			</currency>
			<currency type="ZMK">
				<displayName>mɔni mǝ á zambí (1968–2012)</displayName>
			</currency>
			<currency type="ZMW">
				<displayName>mɔni mǝ á zambí</displayName>
			</currency>
			<currency type="ZWD">
				<displayName>mɔni mǝ á zimbabwɛ́</displayName>
			</currency>
		</currencies>
	</numbers>
	<posix>
		<messages>
			<yesstr>Ɛ́:Ɛ</yesstr>
			<nostr>EÉ:E</nostr>
		</messages>
	</posix>
</ldml>


text:
require_relative 'shared_examples/auth'

RSpec.describe 'Users API' do
  describe 'POST /metadata/publishers/:publisher_id/users' do
    include_examples 'requires auth', :post, '/metadata/publishers/0/users'

    context 'as admin' do
      let(:admin) { token.admin }
      let(:email) { Faker::Internet.email }
      let(:publisher) { create(:publisher, admin: admin) }
      let(:token) { create(:auth_token, :admin) }

      before do
        post "/metadata/publishers/#{publisher.id}/users",
             { email: email },
             'Authorization' => "Token #{token.value}"
      end

      context 'empty email' do
        let(:email) {}

        it do
          expect_status(:unprocessable_entity)
          expect_json('error', "Email can't be blank")
        end
      end

      context 'existing email' do
        let(:email) { create(:user).email.upcase }

        it do
          expect_status(:unprocessable_entity)
          expect_json('error', 'Email has already been taken')
        end
      end

      context "someone else's publisher" do
        let(:publisher) { create(:publisher) }

        it do
          expect_status(:not_found)
        end
      end

      context 'valid params' do
        it do
          user = User.last
          expect(user.publisher).to eq(publisher)
          expect(user.email).to eq(email)
          expect_status(:created)
          expect_json('id', user.id)
          expect_json('email', user.email)
        end
      end
    end

    context 'as publisher' do
      let(:token) { create(:auth_token) }

      it do
        post '/metadata/publishers/0/users',
             { email: '' },
             'Authorization' => "Token #{token.value}"
        expect_status(:forbidden)
      end
    end
  end
end


text:
/**
 *     This code was auto-generated by a Codezu.
 *
 *     Changes to this file may cause incorrect behavior and will be lost if
 *     the code is regenerated.
 */
package com.mozu.api.clients.commerce.customer;

import org.joda.time.DateTime;
import java.util.List;
import java.util.ArrayList;
import com.mozu.api.MozuClient;
import com.mozu.api.MozuClientFactory;
import com.mozu.api.MozuUrl;
import com.mozu.api.Headers;
import com.mozu.api.AsyncCallback;
import java.util.concurrent.CountDownLatch;

import com.mozu.api.security.AuthTicket;
import org.apache.commons.lang.StringUtils;

/**
 * Use the Customer Authentication Tickets resource to generate and refresh authentication tickets for customer accounts.
 *
 */
public class CustomerAuthTicketClient {

	/**
	 * Creates an authentication ticket for an anonymous shopper user.
	 *

	 * MozuClient<com.mozu.api.contracts.customer.CustomerAuthTicket> mozuClient=CreateAnonymousShopperAuthTicketClient();
	 * client.setBaseAddress(url);
	 * client.executeRequest();
	 * CustomerAuthTicket customerAuthTicket = client.Result();
	 *

	 * @return Mozu.Api.MozuClient <com.mozu.api.contracts.customer.CustomerAuthTicket>
	 * @see com.mozu.api.contracts.customer.CustomerAuthTicket
	 */
	public static MozuClient<com.mozu.api.contracts.customer.CustomerAuthTicket> createAnonymousShopperAuthTicketClient() throws Exception
	{
		return createAnonymousShopperAuthTicketClient( null);
	}

	/**
	 * Creates an authentication ticket for an anonymous shopper user.
	 *

	 * MozuClient<com.mozu.api.contracts.customer.CustomerAuthTicket> mozuClient=CreateAnonymousShopperAuthTicketClient( responseFields);
	 * client.setBaseAddress(url);
	 * client.executeRequest();
	 * CustomerAuthTicket customerAuthTicket = client.Result();
	 *

	 * @param responseFields Filtering syntax appended to an API call to increase or decrease the amount of data returned inside a JSON object. For example, ) returns only the  and  items inside the  array of the specified product.This paramter should only be used to retrieve data. Attempting to update data using this parmater may cause data loss.
	 * @return Mozu.Api.MozuClient <com.mozu.api.contracts.customer.CustomerAuthTicket>
	 * @see com.mozu.api.contracts.customer.CustomerAuthTicket
	 */
	public static MozuClient<com.mozu.api.contracts.customer.CustomerAuthTicket> createAnonymousShopperAuthTicketClient(String responseFields) throws Exception
	{
		MozuUrl url = com.mozu.api.urls.commerce.customer.CustomerAuthTicketUrl.createAnonymousShopperAuthTicketUrl(responseFields);
		String verb = "GET";
		Class<?> clz = com.mozu.api.contracts.customer.CustomerAuthTicket.class;
		MozuClient<com.mozu.api.contracts.customer.CustomerAuthTicket> mozuClient = (MozuClient<com.mozu.api.contracts.customer.CustomerAuthTicket>) MozuClientFactory.getInstance(clz);
		mozuClient.setVerb(verb);
		mozuClient.setResourceUrl(url);
		return mozuClient;

	}

	/**
	 * Generates a new authentication ticket for a customer account.
	 *

	 * MozuClient<com.mozu.api.contracts.customer.CustomerAuthTicket> mozuClient=CreateUserAuthTicketClient( userAuthInfo);
	 * client.setBaseAddress(url);
	 * client.executeRequest();
	 * CustomerAuthTicket customerAuthTicket = client.Result();
	 *

	 * @param userAuthInfo The authentication information required to generate an authentication ticket for a customer account.
	 * @return Mozu.Api.MozuClient <com.mozu.api.contracts.customer.CustomerAuthTicket>
	 * @see com.mozu.api.contracts.customer.CustomerAuthTicket
	 * @see com.mozu.api.contracts.customer.CustomerUserAuthInfo
	 */
	public static MozuClient<com.mozu.api.contracts.customer.CustomerAuthTicket> createUserAuthTicketClient(com.mozu.api.contracts.customer.CustomerUserAuthInfo userAuthInfo) throws Exception
	{
		return createUserAuthTicketClient( userAuthInfo,  null);
	}

	/**
	 * Generates a new authentication ticket for a customer account.
	 *

	 * MozuClient<com.mozu.api.contracts.customer.CustomerAuthTicket> mozuClient=CreateUserAuthTicketClient( userAuthInfo,  responseFields);
	 * client.setBaseAddress(url);
	 * client.executeRequest();
	 * CustomerAuthTicket customerAuthTicket = client.Result();
	 *

	 * @param responseFields Use this field to include those fields which are not included by default.
	 * @param userAuthInfo The authentication information required to generate an authentication ticket for a customer account.
	 * @return Mozu.Api.MozuClient <com.mozu.api.contracts.customer.CustomerAuthTicket>
	 * @see com.mozu.api.contracts.customer.CustomerAuthTicket
	 * @see com.mozu.api.contracts.customer.CustomerUserAuthInfo
	 */
	public static MozuClient<com.mozu.api.contracts.customer.CustomerAuthTicket> createUserAuthTicketClient(com.mozu.api.contracts.customer.CustomerUserAuthInfo userAuthInfo, String responseFields) throws Exception
	{
		MozuUrl url = com.mozu.api.urls.commerce.customer.CustomerAuthTicketUrl.createUserAuthTicketUrl(responseFields);
		String verb = "POST";
		Class<?> clz = com.mozu.api.contracts.customer.CustomerAuthTicket.class;
		MozuClient<com.mozu.api.contracts.customer.CustomerAuthTicket> mozuClient = (MozuClient<com.mozu.api.contracts.customer.CustomerAuthTicket>) MozuClientFactory.getInstance(clz);
		mozuClient.setVerb(verb);
		mozuClient.setResourceUrl(url);
		mozuClient.setBody(userAuthInfo);
		return mozuClient;

	}

	/**
	 * Refreshes an existing authentication ticket for a customer account by providing the refresh token string.
	 *

	 * MozuClient<com.mozu.api.contracts.customer.CustomerAuthTicket> mozuClient=RefreshUserAuthTicketClient( refreshToken);
	 * client.setBaseAddress(url);
	 * client.executeRequest();
	 * CustomerAuthTicket customerAuthTicket = client.Result();
	 *

	 * @param refreshToken Alphanumeric string used for access tokens. This token refreshes access for accounts by generating a new developer or application account authentication ticket after an access token expires.
	 * @return Mozu.Api.MozuClient <com.mozu.api.contracts.customer.CustomerAuthTicket>
	 * @see com.mozu.api.contracts.customer.CustomerAuthTicket
	 */
	public static MozuClient<com.mozu.api.contracts.customer.CustomerAuthTicket> refreshUserAuthTicketClient(String refreshToken) throws Exception
	{
		return refreshUserAuthTicketClient( refreshToken,  null);
	}

	/**
	 * Refreshes an existing authentication ticket for a customer account by providing the refresh token string.
	 *

	 * MozuClient<com.mozu.api.contracts.customer.CustomerAuthTicket> mozuClient=RefreshUserAuthTicketClient( refreshToken,  responseFields);
	 * client.setBaseAddress(url);
	 * client.executeRequest();
	 * CustomerAuthTicket customerAuthTicket = client.Result();
	 *

	 * @param refreshToken Alphanumeric string used for access tokens. This token refreshes access for accounts by generating a new developer or application account authentication ticket after an access token expires.
	 * @param responseFields Use this field to include those fields which are not included by default.
	 * @return Mozu.Api.MozuClient <com.mozu.api.contracts.customer.CustomerAuthTicket>
	 * @see com.mozu.api.contracts.customer.CustomerAuthTicket
	 */
	public static MozuClient<com.mozu.api.contracts.customer.CustomerAuthTicket> refreshUserAuthTicketClient(String refreshToken, String responseFields) throws Exception
	{
		MozuUrl url = com.mozu.api.urls.commerce.customer.CustomerAuthTicketUrl.refreshUserAuthTicketUrl(refreshToken, responseFields);
		String verb = "PUT";
		Class<?> clz = com.mozu.api.contracts.customer.CustomerAuthTicket.class;
		MozuClient<com.mozu.api.contracts.customer.CustomerAuthTicket> mozuClient = (MozuClient<com.mozu.api.contracts.customer.CustomerAuthTicket>) MozuClientFactory.getInstance(clz);
		mozuClient.setVerb(verb);
		mozuClient.setResourceUrl(url);
		return mozuClient;

	}

}


text:
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
  <component name="CMakeSettings">
    <configurations>
      <configuration PROFILE_NAME="Debug" CONFIG_NAME="Debug" />
    </configurations>
  </component>
  <component name="ProjectRootManager" version="2" languageLevel="JDK_1_8" default="true" project-jdk-name="1.8" project-jdk-type="JavaSDK">
    <output url="file://$PROJECT_DIR$/build/classes" />
  </component>
  <component name="ProjectType">
    <option name="id" value="Android" />
  </component>
</project>


text:
ACCEPTED

#### According to
Index Fungorum

#### Published in
Physis, Buenos Aires, C 4(17): 293 (1918)

#### Original name
Capnodium doratopsis Speg.

### Remarks
null


text:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Ookii.Dialogs
{
    /// <summary>
    /// Resource identifiers for default animations from shell32.dll.
    /// </summary>
    [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1008:EnumsShouldHaveZeroValue")]
    public enum ShellAnimation
    {
        /// <summary>
        /// An animation representing a file move.
        /// </summary>
        FileMove = 160,
        /// <summary>
        /// An animation representing a file copy.
        /// </summary>
        FileCopy = 161,
        /// <summary>
        /// An animation showing flying papers.
        /// </summary>
        FlyingPapers = 165,
        /// <summary>
        /// An animation showing a magnifying glass over a globe.
        /// </summary>
        SearchGlobe = 166,
        /// <summary>
        /// An animation representing a permament delete.
        /// </summary>
        PermanentDelete = 164,
        /// <summary>
        /// An animation representing deleting an item from the recycle bin.
        /// </summary>
        FromRecycleBinDelete = 163,
        /// <summary>
        /// An animation representing a file move to the recycle bin.
        /// </summary>
        ToRecycleBinDelete = 162,
        /// <summary>
        /// An animation representing a search spanning the local computer.
        /// </summary>
        SearchComputer = 152,
        /// <summary>
        /// An animation representing a search in a document..
        /// </summary>
        SearchDocument = 151,
        /// <summary>
        /// An animation representing a search using a flashlight animation.
        /// </summary>
        SearchFlashlight = 150,
    }
}


text:
using System;
using UnityEngine;
using Zenject;

namespace Zenject.Tests.ToPrefab
{
    public class Jim : MonoBehaviour
    {
        [NonSerialized]
        [Inject]
        public Bob Bob;
    }
}


text:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Drawing;

namespace stClient
{
    public static class ColorToHTML
    {
        public static string ColorToHEX(this Color c)
        {
            return "#" + c.R.ToString("X2") + c.G.ToString("X2") + c.B.ToString("X2");
        }

        public static string ColorToRGB(this Color c)
        {
            return "RGB(" + c.R.ToString() + "," + c.G.ToString() + "," + c.B.ToString() + ")";
        }
    }
}


text:
package au.com.breakpoint.hedron.daogen.strategy;

import org.w3c.dom.Node;
import org.w3c.dom.NodeList;
import au.com.breakpoint.hedron.core.context.ThreadContext;
import au.com.breakpoint.hedron.daogen.AttributeSet;
import au.com.breakpoint.hedron.daogen.Options;
import au.com.breakpoint.hedron.daogen.SchemaObjects;
import au.com.breakpoint.hedron.daogen.Table;

public class TableOverrideStrategy implements IOverrideStrategy
{
    public TableOverrideStrategy (@SuppressWarnings ("unused") final Options options, final Node node)
    {
        // First get the attributes of our own node.
        getAttributes (node);

        final NodeList childNodes = node.getChildNodes ();

        for (int i = 0; i < childNodes.getLength (); ++i)
        {
            final Node childNode = childNodes.item (i);

            if (childNode.getNodeType () == Node.ELEMENT_NODE)
            {
                final String nodeName = childNode.getNodeName ();
                ThreadContext.assertError (false, "[%s] unknown option element [%s]", getClass ().getSimpleName (),
                    nodeName);
            }
        }
    }

    @Override
    public void override (final SchemaObjects schemaObjects)
    {
        final Table t = schemaObjects.m_tables.get (m_tableName);

        // Don't assert non-null. Allow all the overrides to be set up, but only selected
        // stored procs to be generated.
        if (t != null)
        {
            if (m_overrideType.equals ("optimistic-lock"))
            {
                ThreadContext.assertError (m_columnName != null,
                    "column-name must be specified for optimistic-lock override for table [%s]", m_tableName);
                t.setOptimisticLockColumn (m_columnName);
            }
            else if (m_overrideType.equals ("identity"))
            {
                ThreadContext.assertError (m_columnName != null,
                    "column-name must be specified for identity override for table [%s]", m_tableName);
                t.findColumn (m_columnName).setIdentity (true);
            }
            else
            {
                ThreadContext.assertError (false, "Unknown override value [%s]", m_overrideType);
            }
        }
    }

    private void getAttributes (final Node node)
    {
        final AttributeSet attributeSet = new AttributeSet (node);

        m_tableName = attributeSet.getAttributeString ("name", null);
        m_overrideType = attributeSet.getAttributeString ("override", null);

        m_columnName = attributeSet.getAttributeString ("column-name", null);

        attributeSet.validate (); // look for any unsupported attributes
    }

    private String m_columnName;

    private String m_overrideType;

    // Attributes.
    private String m_tableName;
}


text:
package org.osc.core.broker.service.servicefunctionchain;

import static org.mockito.Mockito.when;

import java.util.ArrayList;
import java.util.List;

import javax.persistence.EntityManager;

import org.apache.commons.collections4.CollectionUtils;
import org.junit.Before;
import org.junit.Rule;
import org.junit.rules.ExpectedException;
import org.mockito.Answers;
import org.mockito.InjectMocks;
import org.mockito.Mock;
import org.mockito.Mockito;
import org.mockito.MockitoAnnotations;
import org.osc.core.broker.model.entities.appliance.TagEncapsulationType;
import org.osc.core.broker.model.entities.appliance.VirtualSystem;
import org.osc.core.broker.model.entities.virtualization.ServiceFunctionChain;
import org.osc.core.broker.model.entities.virtualization.VirtualizationConnector;
import org.osc.core.broker.model.plugin.ApiFactoryService;
import org.osc.core.broker.service.api.server.UserContextApi;
import org.osc.core.broker.service.validator.ServiceFunctionChainRequestValidator;
import org.osc.core.broker.util.TransactionalBroadcastUtil;
import org.osc.core.broker.util.db.DBConnectionManager;
import org.osc.core.common.virtualization.VirtualizationType;
import org.osc.core.test.util.TestTransactionControl;

public class BaseServiceFunctionChainRequestValidatorTest {
	@Rule
	public ExpectedException exception = ExpectedException.none();

	@Mock
	public EntityManager em;

	@Mock(answer = Answers.CALLS_REAL_METHODS)
	TestTransactionControl txControl;

	@Mock
	public TransactionalBroadcastUtil txBroadcastUtil;

	@Mock
	public UserContextApi userContext;

	@Mock
	public DBConnectionManager dbMgr;

	@InjectMocks
	public ServiceFunctionChainRequestValidator validator;

	@Before
	public void testInitialize() throws Exception {
		MockitoAnnotations.initMocks(this);

		this.txControl.setEntityManager(this.em);

		ApiFactoryService apiFactoryService = Mockito.mock(ApiFactoryService.class);

		this.validator = new ServiceFunctionChainRequestValidator().create(this.em);
		this.validator.apiFactoryService = apiFactoryService;

		Mockito.when(this.dbMgr.getTransactionalEntityManager()).thenReturn(this.em);
		Mockito.when(this.dbMgr.getTransactionControl()).thenReturn(this.txControl);

		Mockito.when(apiFactoryService.supportsNeutronSFC("Neutron-sfc")).thenReturn(true);
	}

	public VirtualizationConnector newVirtualConnector(String controllerType) {
		VirtualizationConnector vc;
		vc = new VirtualizationConnector();
		vc.setVirtualizationType(VirtualizationType.OPENSTACK);
		vc.setVirtualizationSoftwareVersion("vcSoftwareVersion");
		vc.setName("vcName");
		vc.setProviderIpAddress("127.0.0.1");
		vc.setProviderUsername("User-name");
		vc.setProviderPassword("********");
		vc.setControllerType(controllerType);
		return vc;
	}

	public VirtualizationConnector registerVirtualConnector(String controllerType, Long entityId) {
		VirtualizationConnector vc = newVirtualConnector(controllerType);
		vc.setId(entityId);
		when(this.em.find(VirtualizationConnector.class, vc.getId())).thenReturn(vc);
		return vc;
	}

	public VirtualSystem registerVirtualSystem(Long entityId, VirtualizationConnector vc) {
		VirtualSystem vs = newVirtualSystem(vc);
		vs.setId(entityId);
		when(this.em.find(VirtualSystem.class, vs.getId())).thenReturn(vs);
		return vs;
	}

	protected VirtualSystem newVirtualSystem(VirtualizationConnector vc) {
		VirtualSystem vs = new VirtualSystem(null);
		vs.setEncapsulationType(TagEncapsulationType.VLAN);
		vs.setVirtualizationConnector(vc);
		return vs;
	}

	protected ServiceFunctionChain registerServiceFunctionChain(String name, Long entityId, VirtualizationConnector vc,
			List<Long> vsIds) {
		List<VirtualSystem> virutalSystems = new ArrayList<VirtualSystem>();

		for (Long vsId : CollectionUtils.emptyIfNull(vsIds)) {
			VirtualSystem vs = newVirtualSystem(vc);
			vs.setId(vsId);
			virutalSystems.add(vs);
		}
		ServiceFunctionChain sfc = new ServiceFunctionChain(name, vc);
		sfc.setVirtualSystems(virutalSystems);
		sfc.setId(entityId);
		when(this.em.find(ServiceFunctionChain.class, sfc.getId())).thenReturn(sfc);
		return sfc;
	}

}


text:
package org.apache.camel.builder.component.dsl;

import javax.annotation.Generated;
import org.apache.camel.Component;
import org.apache.camel.builder.component.AbstractComponentBuilder;
import org.apache.camel.builder.component.ComponentBuilder;
import org.apache.camel.component.jslt.JsltComponent;

/**
 * The jslt component allows you to process a JSON messages using an JSLT
 * transformations.
 *
 * Generated by camel-package-maven-plugin - do not edit this file!
 */
@Generated("org.apache.camel.maven.packaging.ComponentDslMojo")
public interface JsltComponentBuilderFactory {

    /**
     * JSLT (camel-jslt)
     * The jslt component allows you to process a JSON messages using an JSLT
     * transformations.
     *
     * Category: transformation
     * Since: 3.1
     * Maven coordinates: org.apache.camel:camel-jslt
     */
    static JsltComponentBuilder jslt() {
        return new JsltComponentBuilderImpl();
    }

    /**
     * Builder for the JSLT component.
     */
    interface JsltComponentBuilder extends ComponentBuilder<JsltComponent> {
        /**
         * Whether the producer should be started lazy (on the first message).
         * By starting lazy you can use this to allow CamelContext and routes to
         * startup in situations where a producer may otherwise fail during
         * starting and cause the route to fail being started. By deferring this
         * startup to be lazy then the startup failure can be handled during
         * routing messages via Camel's routing error handlers. Beware that when
         * the first message is processed then creating and starting the
         * producer may take a little time and prolong the total processing time
         * of the processing.
         *
         * The option is a: boolean type.
         *
         * Default: false
         * Group: producer
         */
        default JsltComponentBuilder lazyStartProducer(boolean lazyStartProducer) {
            doSetProperty("lazyStartProducer", lazyStartProducer);
            return this;
        }
        /**
         * Whether the component should use basic property binding (Camel 2.x)
         * or the newer property binding with additional capabilities.
         *
         * The option is a: boolean type.
         *
         * Default: false
         * Group: advanced
         */
        default JsltComponentBuilder basicPropertyBinding(
                boolean basicPropertyBinding) {
            doSetProperty("basicPropertyBinding", basicPropertyBinding);
            return this;
        }
        /**
         * JSLT can be extended by plugging in functions written in Java.
         *
         * The option is a:
         * java.util.Collection<com.schibsted.spt.data.jslt.Function> type.
         *
         * Group: advanced
         */
        default JsltComponentBuilder functions(
                java.util.Collection<com.schibsted.spt.data.jslt.Function> functions) {
            doSetProperty("functions", functions);
            return this;
        }
    }

    class JsltComponentBuilderImpl
            extends
                AbstractComponentBuilder<JsltComponent>
            implements
                JsltComponentBuilder {
        @Override
        protected JsltComponent buildConcreteComponent() {
            return new JsltComponent();
        }
        @Override
        protected boolean setPropertyOnComponent(
                Component component,
                String name,
                Object value) {
            switch (name) {
            case "lazyStartProducer": ((JsltComponent) component).setLazyStartProducer((boolean) value); return true;
            case "basicPropertyBinding": ((JsltComponent) component).setBasicPropertyBinding((boolean) value); return true;
            case "functions": ((JsltComponent) component).setFunctions((java.util.Collection) value); return true;
            default: return false;
            }
        }
    }
}


text:
using System;

namespace Umbraco.Core.ObjectResolution
{
	/// <summary>
	/// Indicates the relative weight of a resolved object type.
	/// </summary>
	[AttributeUsage(AttributeTargets.Class, AllowMultiple = false)]
	internal class WeightedPluginAttribute : Attribute
	{
		/// <summary>
		/// Initializes a new instance of the <see cref="WeightedPluginAttribute"/> class with a weight.
		/// </summary>
		/// <param name="weight">The object type weight.</param>
		public WeightedPluginAttribute(int weight)
		{
			Weight = weight;
		}

		/// <summary>
		/// Gets or sets the weight of the object type.
		/// </summary>
		public int Weight { get; private set; }
	}
}


text:
require "instant2fa/resources"

module Instant2fa
  class Configuration
    attr_accessor :access_key
    attr_accessor :access_secret
    attr_accessor :api_base
    attr_accessor :debug

    def initialize
      @api_base = 'https://api.instant2fa.com/'
    end

    def debug?
      @debug
    end
  end
end


text:
**Wie das Netzwerk-Interface funktioniert**

Zuständige Entwickler: Marius Timmer
Noch niemand

## PRINZIP

MADN soll eine Server- und eine ClientKlasse bieten. Wird ein Spiel als Server gestartet, werden die anderen Instanzen dementsprechend als Clients gestartet und verbinden sich. Der Server informiert die Clients darüber wer zu Beginn wo steht und hält sie bei jeder Veränderung auf dem aktuellen Stand. Er verrät auch, welcher Spieler/Client gerade an der Reihe ist und wartet dann auf eine Aktion ( *=das Setzen einer Figur* ) des Clients. Beim Starten des Spiels wird ein kleines Hauptmenü erscheinen in dem der Nutzer wählen kann zwischen "offline-Spiel" ( *Standard* ), oder Netzwerk als Server/Client. In diesem Menü werden dann auch die Konfigurationen des Spiels vorgenommen ( *Spiel-Datei, Anzahl der Spieler, etc.*) oder im Netzwerk-Spiel die ServerNamen und -Ports ( *evtl. auch Spielernamen* ) angegeben.

Mehr Details über die Kommunikation untereinander sind noch nicht bekannt, da zuvor ein gemeinsames Protokoll entworfen werden muss.

## NETZWERK-PROTOKOLL

Die Netzwerk-Schnittstelle soll gewährleisten, dass die Befehle für das Programm auch von einer anderen Instanz des Spiels gegeben werden können. Um allerdings verschiedene Logiken gegeneinander antreten zu lassen, ist es zwingend erforderlich, dass sich die verschiedenen Programme mit ihren eigenen Logiken an einen bestimmten Befehlssatz einigen um untereinander zu kommunizieren.

Um das zu schaffen, werden wir uns einmal mit den anderen Gruppen zusammen setzen und uns auf ein einheitliches Protokoll einigen. Die anderen Gruppen werden dabei schon teilweise nahezu fertige Schnittstellen bieten, für die wir unser Projekt kompatibel schreiben. Einige minimale Anpassungen im Protokoll könnten erforderlich sein, da die verschiedenen Programme von Grund auf andere Funktionsweisen aufzeigen und besonders angesprochen werden müssten.


text:
	<iterator th:remove="tag" th:each="comment : ${commentPage.datas}">

				   查看对话

	</iterator>

 1}">