text:
import six

# Django
from django.contrib import admin
from django.db.models import Count
from django.utils.html import format_html, format_html_join
from django.utils.translation import ugettext_lazy as _
try:
    from django.urls import reverse
except ImportError:  # pragma: no cover
    from django.core.urlresolvers import reverse

# Django-FortuneCookie
from fortunecookie.models import LuckyNumber, ChineseWord, FortuneCookie

class OccurrencesListFilter(admin.SimpleListFilter):
    """Filter lists by number of occurrences in fortune cookies."""

    title = _('fortune cookie occurrences')
    parameter_name = 'fortune_cookies__count'

    def lookups(self, request, model_admin):
        qs = model_admin.get_queryset(request)
        occurrences = set(filter(None, qs.values_list(self.parameter_name, flat=True)))
        return [(x, six.text_type(x)) for x in sorted(occurrences)]

    def queryset(self, request, queryset):
        if self.value() is not None:
            return queryset.filter(fortune_cookies__count=self.value())

class LuckyNumberListFilter(admin.SimpleListFilter):
    """Filter fortune cookie list by lucky number."""

    title = _('lucky number')
    parameter_name = 'lucky_numbers__number'

    def lookups(self, request, model_admin):
        qs = model_admin.get_queryset(request)
        occurrences = set(filter(None, qs.values_list(self.parameter_name, flat=True)))
        return [(x, six.text_type(x)) for x in sorted(occurrences)]

    def queryset(self, request, queryset):
        if self.value() is not None:
            return queryset.filter(lucky_numbers__number=self.value())

class OccurrencesMixin(object):
    """Mixin to annotate queries with count of fortune cookies."""

    def get_queryset(self, request):
        qs = super(OccurrencesMixin, self).get_queryset(request)
        return qs.annotate(Count('fortune_cookies'))

    def get_occurrences_display(self, obj=None):
        url = reverse('admin:fortunecookie_fortunecookie_changelist')
        return format_html('{}', url,
                           self.occurrences_lookup, obj.pk, obj.occurrences)

    get_occurrences_display.short_description = _('Occurrences')
    get_occurrences_display.allow_tags = True
    get_occurrences_display.admin_order_field = 'fortune_cookies__count'

class LuckyNumberAdmin(OccurrencesMixin, admin.ModelAdmin):
    """Admin configuration for lucky numbers."""

    list_display = ('number', 'get_occurrences_display', 'created', 'modified')
    list_filter = (OccurrencesListFilter,)
    fields = ('number', 'get_occurrences_display', 'created', 'modified')
    readonly_fields = ('get_occurrences_display', 'created', 'modified')
    occurrences_lookup = 'lucky_numbers__number__exact'

    def get_fields(self, request, obj=None):
        return ('number',) if obj is None else self.fields

    def get_readonly_fields(self, request, obj=None):
        return self.readonly_fields if obj is None else self.fields

class ChineseWordAdmin(OccurrencesMixin, admin.ModelAdmin):
    """Admin configuration for Chinese words."""

    list_display = ('english_word', 'pinyin_word', 'chinese_word',
                    'get_occurrences_display', 'created', 'modified')
    list_filter = (OccurrencesListFilter,)
    fields = ('english_word', 'pinyin_word', 'chinese_word',
              'get_occurrences_display', 'created', 'modified')
    readonly_fields = ('get_occurrences_display', 'created', 'modified')
    occurrences_lookup = 'chinese_word__id__exact'

class FortuneCookieAdmin(admin.ModelAdmin):
    """Admin configuration for fortune cookies."""

    list_display = ('fortune', 'get_chinese_word_display',
                    'get_lucky_numbers_display', 'created', 'modified')
    list_filter = ('chinese_word', LuckyNumberListFilter)
    fields = ('fortune', 'chinese_word', 'lucky_numbers', 'created', 'modified')
    readonly_fields = ('created', 'modified')

    def get_queryset(self, request):
        qs = super(FortuneCookieAdmin, self).get_queryset(request)
        return qs.select_related('chinese_word').prefetch_related('lucky_numbers')

    def get_lucky_numbers_display(self, obj=None):
        if obj and obj.lucky_numbers.exists():
            return format_html_join(', ', u'{}', [
                (reverse('admin:fortunecookie_luckynumber_change', args=(ln.pk,)), ln)
                for ln in obj.lucky_numbers.all()
            ])
        return '-'

    get_lucky_numbers_display.short_description = _('Lucky numbers')
    get_lucky_numbers_display.allow_tags = True

    def get_chinese_word_display(self, obj=None):
        if obj and obj.chinese_word_id:
            url = reverse('admin:fortunecookie_chineseword_change',
                          args=(obj.chinese_word_id,))
            return format_html(u'{}', url, obj.chinese_word)
        return '-'

    get_chinese_word_display.short_description = _('Chinese word')
    get_chinese_word_display.allow_tags = True
    get_chinese_word_display.admin_order_field = 'chinese_word'

admin.site.register(LuckyNumber, LuckyNumberAdmin)
admin.site.register(ChineseWord, ChineseWordAdmin)
admin.site.register(FortuneCookie, FortuneCookieAdmin)


text:
package it.unisa.dia.gas.crypto.jpbc.fe.rl.w12.params;

/**
 * @author Angelo De Caro (jpbclib@gmail.com)
 */
public class RLW12EncryptionParameters extends RLW12KeyParameters {

    private RLW12PublicKeyParameters publicKey;
    private String w;

    public RLW12EncryptionParameters(RLW12PublicKeyParameters publicKey,
                                     String w) {
        super(false, publicKey.getParameters());

        this.publicKey = publicKey;
        this.w = w;
    }

    public RLW12PublicKeyParameters getPublicKey() {
        return publicKey;
    }

    public String getW() {
        return w;
    }
}

redpajama_set_name: RedPajamaGithub


text:
module Fog
  module Rackspace
    class Queues
      class Real

        # This operation queries the specified claim for the specified queue. Claims with malformed IDs or claims that are not found by ID are ignored.
        #
        # @param [String] queue_name Specifies the name of the queue.
        # @param [Integer] claim_id Specifies the claim ID.
        # @return [Excon::Response] response
        # @raise [Fog::Rackspace::Queues::NotFound] - HTTP 404
        # @raise [Fog::Rackspace::Queues::BadRequest] - HTTP 400
        # @raise [Fog::Rackspace::Queues::InternalServerError] - HTTP 500
        # @raise [Fog::Rackspace::Queues::ServiceError]
        # @see http://docs.rackspace.com/queues/api/v1.0/cq-devguide/content/GET_queryClaim__version__queues__queue_name__claims__claimId__claims-operations-dle001.html
        def get_claim(queue_name, claim_id)
          request(
            :expects => 200,
            :method => 'GET',
            :path => "queues/#{queue_name}/claims/#{claim_id}"
          )
        end
      end
    end
  end
end


text:
var mustache = require('mustache')
var data = require('./data')
var count = process.env.COUNT || 10000
var template = `

	{{#list}}

{{name}}{{age}}

	{{/list}}

`
mustache.parse(template)
data = {list: data}
// console.log(mustache.render(template, data))
console.time('Mustache')
while (count --) {
	mustache.render(template, data)
}
console.timeEnd('Mustache')


text:
"""Utils for latent variable models."""

from six.moves import range  # pylint: disable=redefined-builtin

from tensor2tensor.layers import common_attention
from tensor2tensor.layers import common_image_attention as cia
from tensor2tensor.layers import common_layers
from tensor2tensor.models import transformer
from tensor2tensor.utils import beam_search

import tensorflow as tf

DO_SUMMARIES = True

def compress_self_attention_layer(x, hparams, name):
  """Attend function."""
  with tf.variable_scope(name):
    x, xshape, _ = cia.maybe_reshape_4d_to_3d(x)
    y = common_attention.multihead_attention(
        common_layers.layer_preprocess(x, hparams),
        None,
        None,
        hparams.attention_key_channels or hparams.hidden_size,
        hparams.attention_value_channels or hparams.hidden_size,
        hparams.hidden_size, hparams.num_heads,
        hparams.attention_dropout)
    res = common_layers.layer_postprocess(x, y, hparams)
    return tf.reshape(res, xshape)

def multinomial_sample(x, vocab_size=None, sampling_method="random",
                       temperature=1.0):
  """Multinomial sampling from a n-dimensional tensor.

  Args:
    x: Tensor of shape [..., vocab_size]. Parameterizes logits of multinomial.
    vocab_size: Number of classes in multinomial distribution.
    sampling_method: String, "random" or otherwise deterministic.
    temperature: Positive float.

  Returns:
    Tensor of shape [...].
  """
  vocab_size = vocab_size or common_layers.shape_list(x)[-1]
  if sampling_method == "random" and temperature > 0.0:
    samples = tf.multinomial(tf.reshape(x, [-1, vocab_size]) / temperature, 1)
  else:
    samples = tf.argmax(x, axis=-1)
  reshaped_samples = tf.reshape(samples, common_layers.shape_list(x)[:-1])
  return reshaped_samples

def ae_latent_softmax(latents_pred, latents_discrete_hot, vocab_size, hparams):
  """Latent prediction and loss.

  Args:
    latents_pred: Tensor of shape [..., depth].
    latents_discrete_hot: Tensor of shape [..., vocab_size].
    vocab_size: an int representing the vocab size.
    hparams: tf.contrib.training.HParams.

  Returns:
    sample: Tensor of shape [...], a sample from a multinomial distribution.
    loss: Tensor of shape [...], the softmax cross-entropy.
  """
  with tf.variable_scope("latent_logits"):
    latents_logits = tf.layers.dense(latents_pred, vocab_size,
                                     name="logits_dense")
    if hparams.logit_normalization:
      latents_logits *= tf.rsqrt(1e-8 +
                                 tf.reduce_mean(tf.square(latents_logits)))
    loss = tf.nn.softmax_cross_entropy_with_logits_v2(
        labels=latents_discrete_hot, logits=latents_logits)

    # TODO(trandustin): tease this out from ae_latent_softmax.
    # we use just the loss portion to anchor prior / encoder on text.
    sample = multinomial_sample(latents_logits,
                                vocab_size,
                                hparams.sampling_method,
                                hparams.sampling_temp)
    return sample, loss

def ae_latent_sample_beam(latents_dense_in, inputs, ed, embed, hparams):
  """Samples from the latent space in the autoencoder.

  Args:
    latents_dense_in: Tensor of shape [batch, length_q, ...]. Only the shape of
      its first two dimensions are used.
    inputs: Tensor of shape [batch, length_kv, hparams.hidden_size]. Encodings
      to attend to in decoder.
    ed: Tensor which broadcasts with shape [batch, hparams.num_heads, length_q,
      length_kv]. Encoder-decoder attention bias.
    embed: Callable which embeds discrete latent hot-vectors and a hidden size
      and returns dense vectors.
    hparams: tf.contrib.training.HParams.

  Returns:
    Tensor of shape [batch, length].
  """

  def symbols_to_logits_fn(ids):
    """Go from ids to logits."""
    ids = tf.expand_dims(ids, axis=2)  # Ids start with added all-zeros.
    latents_discrete = tf.pad(ids[:, 1:], [[0, 0], [0, 1], [0, 0]])

    with tf.variable_scope(tf.get_variable_scope(), reuse=False):
      latents_dense = embed(
          tf.one_hot(latents_discrete, depth=2**hparams.bottleneck_bits),
          hparams.hidden_size)
      latents_pred = transformer_latent_decoder(
          latents_dense, inputs, ed, hparams, name="latent_prediction")
      logits = tf.layers.dense(
          latents_pred, 2**hparams.bottleneck_bits, name="logits_dense")
      current_output_position = common_layers.shape_list(ids)[1] - 1
      logits = logits[:, current_output_position, :]
    return logits

  initial_ids = tf.zeros([tf.shape(latents_dense_in)[0]], dtype=tf.int32)
  length = tf.shape(latents_dense_in)[1]
  ids, _ = beam_search.beam_search(
      symbols_to_logits_fn,
      initial_ids,
      1,
      length,
      2**hparams.bottleneck_bits,
      alpha=0.0,
      eos_id=-1,
      stop_early=False)

  res = tf.expand_dims(ids[:, 0, :], axis=2)  # Pick first beam.
  return res[:, 1:]  # Remove the added all-zeros from ids.

def residual_block_layer(inputs, hparams):
  """Residual block over inputs.

  Runs a residual block consisting of
    conv: kernel_size x kernel_size
    conv: 1x1
    dropout, add and normalize according to hparams.layer_postprocess_sequence.

  Args:
    inputs: Tensor of shape [batch, height, width, hparams.hidden_size].
    hparams: tf.contrib.training.HParams.

  Returns:
    Tensor of shape [batch, height, width, hparams.hidden_size].
  """
  kernel = (hparams.res_kernel_size, hparams.res_kernel_size)
  x = inputs
  for i in range(hparams.num_res_layers):
    with tf.variable_scope("res_conv_%d" % i):
      # kernel_size x kernel_size conv block
      y = common_layers.conv_block(
          common_layers.layer_norm(x, hparams.hidden_size, name="lnorm"),
          hparams.hidden_size, [((1, 1), kernel)],
          strides=(1, 1),
          padding="SAME",
          name="residual_conv")
      # 1x1 conv block
      y = common_layers.conv_block(
          y,
          hparams.hidden_size, [((1, 1), (1, 1))],
          strides=(1, 1),
          padding="SAME",
          name="residual_dense")
      x = common_layers.layer_postprocess(x, y, hparams)
  return x

def compress_encoder(inputs,
                     hparams,
                     strides=(2, 2),
                     kernel=(3, 3),
                     name="compress"):
  """Encoder that compresses 2-D inputs by 2**num_compress_steps.

  Args:
    inputs: Tensor of shape [batch, height, width, channels].
    hparams: tf.contrib.training.HParams.
    strides: Tuple, strides for conv block.
    kernel: Tuple, kernel window size for conv block.
    name: string, variable scope.

  Returns:
    Tensor of shape [batch, (height*width) / 2**(hparams.num_compress_steps),
    hparams.hidden_size].
  """
  with tf.variable_scope(name):
    x = inputs
    for i in range(hparams.num_compress_steps // 2):
      with tf.variable_scope("compress_conv_%d" % i):
        y = common_layers.conv_block(
            common_layers.layer_norm(
                x, hparams.hidden_size, name="lnorm"),
            hparams.hidden_size, [((1, 1), kernel)],
            strides=strides,
            padding="SAME",
            name="compress_conv_%d" % i)
        y = tf.nn.dropout(y, 1.0 - hparams.dropout)
        if hparams.do_compress_attend:
          y = compress_self_attention_layer(
              x, hparams, name="compress_selfatt_%d" % i)
          y += x
        x = y

    x = residual_block_layer(x, hparams)

    # If using multiple copies of latents, blow up the hidden size and then
    # reshape to increase by num_latents.
    shape_x = common_layers.shape_list(x)
    x = tf.layers.dense(x,
                        hparams.num_latents * hparams.hidden_size,
                        name=name + "_dense")
    new_shape = [shape_x[0],
                 shape_x[1] * shape_x[2] * hparams.num_latents,
                 hparams.hidden_size]
    return tf.reshape(x, new_shape)

def compress_encoder_2d(x, hparams, name):
  """Encoder that compresses 2-D inputs by 2**num_compress_steps.

  Args:
    x: Tensor of shape [batch, height, width, channels].
    hparams: tf.contrib.training.HParams.
    name: string, variable scope.

  Returns:
    Tensor of shape [batch, (height*width) / 2**hparams.num_compress_steps,
    hparams.hidden_size].
  """
  return compress_encoder(x, hparams,
                          strides=(2, 2),
                          kernel=(hparams.kernel_size, hparams.kernel_size),
                          name=name)

def compress_encoder_1d(x, hparams, name):
  """Encoder that compresses 1-D inputs by 2**num_compress_steps.

  Args:
    x: Tensor of shape [batch, length, channels].
    hparams: tf.contrib.training.HParams.
    name: string, variable scope.

  Returns:
    Tensor of shape [batch, length / 2**hparams.num_compress_steps,
    hparams.hidden_size].
  """
  x = tf.expand_dims(x, axis=2)
  return compress_encoder(x, hparams,
                          strides=(2, 1),
                          kernel=(hparams.kernel_size, 1),
                          name=name)

def decompress_decoder(inputs,
                       hparams,
                       strides=(2, 2),
                       kernel=(3, 3),
                       name="decompress"):
  """Decoder that decompresses 2-D inputs by 2**num_compress_steps.

  Args:
    inputs: Tensor of shape [batch, compress_height, compress_width, channels].
    hparams: tf.contrib.training.HParams.
    strides: Tuple, strides for conv block.
    kernel: Tuple, kernel window size for conv block.
    name: string, variable scope.

  Returns:
    Tensor of shape [batch, height, width, hparams.hidden_size].
  """
  with tf.variable_scope(name):
    x = inputs
    x = tf.layers.dense(x, hparams.hidden_size, name=name + "_dense")
    x = residual_block_layer(x, hparams)
    for i in range(hparams.num_compress_steps // 2):
      j = hparams.num_compress_steps // 2 - i - 1
      with tf.variable_scope(name + "_%d" % j):
        if hparams.do_decompress_attend:
          y = compress_self_attention_layer(
              x, hparams, name="decompress_selfatt")
          x += y
        y = tf.layers.conv2d_transpose(
            x,
            hparams.hidden_size,
            kernel,
            strides=strides,
            padding="SAME",
            activation=tf.nn.relu if i > 0 else None,
            name="decompress_conv")
        x = y
    return x

def decompress_decoder_2d(x, hparams, name):
  """Decoder that decompresses 2-D inputs by 2**num_compress_steps.

  Args:
    x: Tensor of shape [batch, compress_height, compress_width, channels].
    hparams: tf.contrib.training.HParams.
    name: string, variable scope.

  Returns:
    Tensor of shape [batch, height, width, hparams.hidden_size].
  """
  return decompress_decoder(x, hparams,
                            strides=(2, 2),
                            kernel=(hparams.kernel_size, hparams.kernel_size),
                            name=name)

def decompress_decoder_1d(x, hparams, name):
  """Decoder that decompresses 1-D inputs by 2**num_compress_steps.

  Args:
    x: Tensor of shape [batch, compress_length, channels].
    hparams: tf.contrib.training.HParams.
    name: string, variable scope.

  Returns:
    Tensor of shape [batch, length, hparams.hidden_size].
  """
  x = tf.expand_dims(x, axis=2)
  output = decompress_decoder(x, hparams,
                              strides=(2, 1),
                              kernel=(hparams.kernel_size, 1),
                              name=name)
  return tf.squeeze(output, axis=2)

def transformer_text_encoder(x,
                             space_id,
                             hparams,
                             name="transformer_text_encoder"):
  """Transformer text encoder over inputs with unmasked full attention.

  Args:
    x: Tensor of shape [batch, length, 1, hparams.hidden_size].
    space_id: int, id.
    hparams: tf.contrib.training.HParams.
    name: string, variable scope.

  Returns:
    encoder_output: Tensor of shape [batch, length, hparams.hidden_size].
    ed: Tensor of shape [batch, 1, 1, length]. Encoder-decoder attention bias
      for any padded tokens.
  """
  with tf.variable_scope(name):
    x = common_layers.flatten4d3d(x)
    (encoder_input, encoder_self_attention_bias,
     ed) = transformer.transformer_prepare_encoder(x, space_id, hparams)
    encoder_input = tf.nn.dropout(encoder_input, 1.0 - hparams.dropout)
    encoder_output = transformer.transformer_encoder(
        encoder_input, encoder_self_attention_bias, hparams)
    return encoder_output, ed

def transformer_image_decoder(x,
                              encoder_output,
                              ed_attention_bias,
                              hparams,
                              name="transformer_dec"):
  """Transformer image decoder over inputs with local attention.

  Args:
    x: Tensor of shape [batch, ...], and whose size is batch * height * width *
      hparams.num_channels * hparams.hidden_size.
    encoder_output: Tensor of shape [batch, length_kv, hparams.hidden_size].
    ed_attention_bias: Tensor which broadcasts with shape [batch,
      hparams.num_heads, length_q, length_kv]. Encoder-decoder attention bias.
    hparams: tf.contrib.training.HParams.
    name: string, variable scope.

  Returns:
    Tensor of shape [batch, height, width * hparams.num_channels,
    hparams.hidden_size].
  """
  with tf.variable_scope(name):
    batch_size = common_layers.shape_list(x)[0]
    targets = tf.reshape(x, [batch_size,
                             hparams.img_len,
                             hparams.img_len,
                             hparams.num_channels * hparams.hidden_size])
    decoder_input, _, _ = cia.prepare_decoder(targets, hparams)
    decoder_output = cia.transformer_decoder_layers(
        decoder_input,
        encoder_output,
        hparams.num_decoder_layers or hparams.num_hidden_layers,
        hparams,
        attention_type=hparams.dec_attention_type,
        encoder_decoder_attention_bias=ed_attention_bias,
        name="decoder")
    decoder_output = tf.reshape(decoder_output,
                                [batch_size,
                                 hparams.img_len,
                                 hparams.img_len * hparams.num_channels,
                                 hparams.hidden_size])
    return decoder_output

def transformer_latent_decoder(x,
                               encoder_output,
                               ed_attention_bias,
                               hparams,
                               name="transformer_latent_dec"):
  """Transformer decoder over latents using latent_attention_type.

  Args:
    x: Tensor of shape [batch, ...], and whose size is batch * length_q *
      hparams.hidden_size. Here, length_q is the latent length, which is
      height * width * hparams.num_latents / (2**hparams.num_compress_steps).
    encoder_output: Tensor of shape [batch, length_kv, hparams.hidden_size].
    ed_attention_bias: Tensor which broadcasts with shape [batch,
      hparams.num_heads, length_q, length_kv]. Encoder-decoder attention bias.
    hparams: tf.contrib.training.HParams.
    name: string, variable scope.

  Returns:
    Tensor of shape [batch, length_q, hparams.hidden_size].
  """
  with tf.variable_scope(name):
    batch_size = common_layers.shape_list(x)[0]
    compressed_img_len = hparams.img_len / 2**(hparams.num_compress_steps // 2)
    x = tf.reshape(x, [batch_size,
                       compressed_img_len,
                       compressed_img_len * hparams.num_latents,
                       hparams.hidden_size])
    decoder_input, _, _ = cia.prepare_decoder(x, hparams)
    decoder_output = cia.transformer_decoder_layers(
        decoder_input,
        encoder_output,
        hparams.num_latent_layers or hparams.num_hidden_layers,
        hparams,
        attention_type=hparams.latent_attention_type,
        encoder_decoder_attention_bias=ed_attention_bias,
        name="decoder")
    decoder_output = tf.reshape(decoder_output,
                                [batch_size,
                                 compressed_img_len**2 * hparams.num_latents,
                                 hparams.hidden_size])
    return decoder_output

def bottleneck_layer(targets_c,
                     hparams,
                     name="bottleneck_d"):
  """Compute latents from compressed targets."""
  latents_dense, latents_discrete, extra_loss, embed_func = (
      hparams.bottleneck(
          inputs=targets_c,
          filter_size=hparams.compress_filter_size,
          name=name,
          mode=hparams.mode))
  if DO_SUMMARIES:
    tf.summary.histogram("b0", tf.reshape(latents_discrete, [-1]))
  return latents_dense, latents_discrete, extra_loss, embed_func

def latent_prediction_model(inputs,
                            ed_attention_bias,
                            latents_discrete,
                            latents_dense,
                            hparams,
                            vocab_size=None,
                            name="latent_prediction"):
  """Transformer-based latent prediction model.

  It is an autoregressive decoder over latents_discrete given inputs.

  Args:
    inputs: Tensor of shape [batch, length_kv, hparams.hidden_size]. Inputs to
      attend to for the decoder on latents.
    ed_attention_bias: Tensor which broadcasts with shape [batch,
      hparams.num_heads, length_q, length_kv]. Encoder-decoder attention bias.
    latents_discrete: Tensor of shape [batch, length_q, vocab_size].
      One-hot latents to compute log-probability of given inputs.
    latents_dense: Tensor of shape [batch, length_q, hparams.hidden_size].
    hparams: tf.contrib.training.HParams.
    vocab_size: int, if given else None.
    name: string, variable scope.

  Returns:
    latents_pred: Tensor of shape [batch, length_q, hparams.hidden_size].
    latents_pred_loss: Tensor of shape [batch, length_q].
  """
  with tf.variable_scope(name):
    if hparams.mode != tf.estimator.ModeKeys.PREDICT:
      latents_pred = transformer_latent_decoder(tf.stop_gradient(latents_dense),
                                                inputs,
                                                ed_attention_bias,
                                                hparams,
                                                name)
      vocab_size = (2**hparams.bottleneck_bits
                    if vocab_size is None else vocab_size)
      _, latent_pred_loss = ae_latent_softmax(
          latents_pred, tf.stop_gradient(latents_discrete), vocab_size, hparams)
  return latents_pred, latent_pred_loss

def transformer_autoencoder(inputs,
                            targets,
                            target_space,
                            hparams,
                            cache=None,
                            predict_mask=1.0):
  """Auto-encoder using transformer decoder and prior over latents."""
  losses = {"extra": 0., "latent_pred": 0.}

  # Reshape image targets as 4d tensor.
  original_targets_shape = common_layers.shape_list(targets)
  batch_size = original_targets_shape[0]
  if len(original_targets_shape) == 4:
    compress_fn = compress_encoder_2d
    decompress_fn = decompress_decoder_2d
  else:
    compress_fn = compress_encoder_1d
    decompress_fn = decompress_decoder_1d

  # Input Encoder if present.
  ed_attention_bias = None
  if inputs is not None:
    inputs = common_layers.flatten4d3d(inputs)
    inputs, ed_attention_bias = transformer_text_encoder(
        inputs, target_space, hparams, "input_enc")

  # Encode targets to compute targets compressed.
  targets_c = compress_fn(targets, hparams, "compress")
  targets, _, _ = cia.maybe_reshape_4d_to_3d(targets)

  # Following code creates an exponentially decaying variable based on which
  # we rescale the loss values.
  pc = common_layers.inverse_exp_decay(hparams.startup_steps)
  pc = pc if hparams.mode == tf.estimator.ModeKeys.TRAIN else 1.0
  cond = tf.less(tf.random_uniform([batch_size]), pc)

  # Call bottleneck layer, that takes encoder output and outputs the latents.
  # Returns embedded latents, discrete latent codes, loss.
  if hparams.mode != tf.estimator.ModeKeys.PREDICT:
    latents_dense, latents_discrete, extra_loss, _ = (
        bottleneck_layer(targets_c, hparams))
    extra_loss = tf.reduce_mean(extra_loss) * tf.to_float(cond)

    _, latents_pred_loss = latent_prediction_model(
        inputs,
        ed_attention_bias,
        latents_discrete,
        latents_dense,
        hparams,
        name="latent_pred")
    latents_pred_loss = tf.reduce_mean(latents_pred_loss) * tf.to_float(cond)

    latents_shape = common_layers.shape_list(latents_dense)
    latents_dense = tf.nn.dropout(
        latents_dense, 1 - hparams.latent_dropout,
        noise_shape=[latents_shape[0], latents_shape[1], 1])

    losses["extra_loss"] = extra_loss
    losses["latent_pred"] = latents_pred_loss

    # We'll start training the extra model of latents after mask_startup_steps.
    latent_time = tf.less(hparams.mask_startup_steps,
                          tf.to_int32(tf.train.get_global_step()))
    losses["latent_pred"] *= tf.to_float(latent_time)
  else:
    latent_len = (
        hparams.img_len * hparams.img_len * hparams.num_latents) / 2**(
            hparams.num_compress_steps)
    _, _, _, embed = (
        bottleneck_layer(targets_c, hparams))
    latents_dense = tf.zeros([batch_size, latent_len, 1, hparams.hidden_size])
    if cache is None:
      cache = ae_latent_sample_beam(latents_dense, inputs, ed_attention_bias,
                                    embed, hparams)
    latents_dense = embed(
        tf.one_hot(cache, depth=2**hparams.bottleneck_bits),
        hparams.hidden_size)

  latents_decoder = latents_dense
  if len(original_targets_shape) == 4:
    compressed_img_len = hparams.img_len / 2**(hparams.num_compress_steps // 2)
    latents_decoder = tf.reshape(latents_decoder,
                                 [batch_size,
                                  compressed_img_len,
                                  compressed_img_len,
                                  hparams.num_latents * hparams.hidden_size])

  latents_decoder = decompress_fn(latents_decoder, hparams, name="decompress")
  # if we're operating in 2d space on images, then we're assuming that the
  # last dimension will not be a multiple of channels
  output = tf.reshape(
      latents_decoder,
      shape=[-1, hparams.img_len, hparams.img_len, hparams.hidden_size])

  if hparams.use_gold_targets:
    masking = common_layers.inverse_exp_decay(hparams.mask_startup_steps)
    if hparams.mode == tf.estimator.ModeKeys.PREDICT:
      masking = predict_mask
    mask = tf.less(masking, tf.random_uniform(
        common_layers.shape_list(targets)[:-1]))
    mask = tf.expand_dims(tf.to_float(mask), 2)
    output = mask * targets + (1.0 - mask) * output

  # reshape back to 4d here
  output = tf.reshape(output, original_targets_shape)
  if hparams.decode_autoregressive:
    # Transformer decoder, that goes from inputs->targets
    decoder_output = transformer_image_decoder(
        output, inputs, ed_attention_bias, hparams, "decoder")
  else:
    decoder_output = output
  return decoder_output, losses, cache


text:
package com.pluralsight.repository;

import java.util.List;

import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;
import org.springframework.stereotype.Repository;

import com.pluralsight.model.Goal;
import com.pluralsight.model.GoalReport;

@Repository("goalRepository")
public interface GoalRepository extends JpaRepository<Goal, Long> {

	@Query("SELECT new com.pluralsight.model.GoalReport(g.minutes, e.minutes, e.activity) "
			+ "FROM Goal g, Exercise e WHERE g.id = e.goal.id")
	List<GoalReport> findReports();

}


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

public class Eliminator : MonoBehaviour {

    public string[] TagsToDestroy;
    public DataCollector dataCollector;

	// Use this for initialization
	void Start () {

	}

	// Update is called once per frame
	void Update () {

	}

    private void OnTriggerEnter(Collider other)
    {
        if (TagsToDestroy.Contains(other.tag))
        {
            Destroy(other.gameObject);
            if (other.tag.Equals("Section"))
            {
                dataCollector.SegmentCleared();
            }
        }
    }
}


text:
using System;
using System.Text.Json;
using System.Threading;
using System.Threading.Tasks;
using Azure;
using Azure.Core;
using Azure.Core.Pipeline;
using Azure.ResourceManager.Compute.Models;

namespace Azure.ResourceManager.Compute
{
    internal partial class VirtualMachineExtensionsRestOperations
    {
        private string subscriptionId;
        private Uri endpoint;
        private ClientDiagnostics _clientDiagnostics;
        private HttpPipeline _pipeline;

        /// <summary> Initializes a new instance of VirtualMachineExtensionsRestOperations. </summary>
        /// <param name="clientDiagnostics"> The handler for diagnostic messaging in the client. </param>
        /// <param name="pipeline"> The HTTP pipeline for sending and receiving REST requests and responses. </param>
        /// <param name="subscriptionId"> Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. </param>
        /// <param name="endpoint"> server parameter. </param>
        /// <exception cref="ArgumentNullException"> This occurs when one of the required arguments is null. </exception>
        public VirtualMachineExtensionsRestOperations(ClientDiagnostics clientDiagnostics, HttpPipeline pipeline, string subscriptionId, Uri endpoint = null)
        {
            if (subscriptionId == null)
            {
                throw new ArgumentNullException(nameof(subscriptionId));
            }
            endpoint ??= new Uri("https://management.azure.com");

            this.subscriptionId = subscriptionId;
            this.endpoint = endpoint;
            _clientDiagnostics = clientDiagnostics;
            _pipeline = pipeline;
        }

        internal HttpMessage CreateCreateOrUpdateRequest(string resourceGroupName, string vmName, string vmExtensionName, VirtualMachineExtension extensionParameters)
        {
            var message = _pipeline.CreateMessage();
            var request = message.Request;
            request.Method = RequestMethod.Put;
            var uri = new RawRequestUriBuilder();
            uri.Reset(endpoint);
            uri.AppendPath("/subscriptions/", false);
            uri.AppendPath(subscriptionId, true);
            uri.AppendPath("/resourceGroups/", false);
            uri.AppendPath(resourceGroupName, true);
            uri.AppendPath("/providers/Microsoft.Compute/virtualMachines/", false);
            uri.AppendPath(vmName, true);
            uri.AppendPath("/extensions/", false);
            uri.AppendPath(vmExtensionName, true);
            uri.AppendQuery("api-version", "2019-12-01", true);
            request.Uri = uri;
            request.Headers.Add("Content-Type", "application/json");
            var content = new Utf8JsonRequestContent();
            content.JsonWriter.WriteObjectValue(extensionParameters);
            request.Content = content;
            return message;
        }

        /// <summary> The operation to create or update the extension. </summary>
        /// <param name="resourceGroupName"> The name of the resource group. </param>
        /// <param name="vmName"> The name of the virtual machine where the extension should be created or updated. </param>
        /// <param name="vmExtensionName"> The name of the virtual machine extension. </param>
        /// <param name="extensionParameters"> Parameters supplied to the Create Virtual Machine Extension operation. </param>
        /// <param name="cancellationToken"> The cancellation token to use. </param>
        public async Task<Response> CreateOrUpdateAsync(string resourceGroupName, string vmName, string vmExtensionName, VirtualMachineExtension extensionParameters, CancellationToken cancellationToken = default)
        {
            if (resourceGroupName == null)
            {
                throw new ArgumentNullException(nameof(resourceGroupName));
            }
            if (vmName == null)
            {
                throw new ArgumentNullException(nameof(vmName));
            }
            if (vmExtensionName == null)
            {
                throw new ArgumentNullException(nameof(vmExtensionName));
            }
            if (extensionParameters == null)
            {
                throw new ArgumentNullException(nameof(extensionParameters));
            }

            using var message = CreateCreateOrUpdateRequest(resourceGroupName, vmName, vmExtensionName, extensionParameters);
            await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false);
            switch (message.Response.Status)
            {
                case 200:
                case 201:
                    return message.Response;
                default:
                    throw await _clientDiagnostics.CreateRequestFailedExceptionAsync(message.Response).ConfigureAwait(false);
            }
        }

        /// <summary> The operation to create or update the extension. </summary>
        /// <param name="resourceGroupName"> The name of the resource group. </param>
        /// <param name="vmName"> The name of the virtual machine where the extension should be created or updated. </param>
        /// <param name="vmExtensionName"> The name of the virtual machine extension. </param>
        /// <param name="extensionParameters"> Parameters supplied to the Create Virtual Machine Extension operation. </param>
        /// <param name="cancellationToken"> The cancellation token to use. </param>
        public Response CreateOrUpdate(string resourceGroupName, string vmName, string vmExtensionName, VirtualMachineExtension extensionParameters, CancellationToken cancellationToken = default)
        {
            if (resourceGroupName == null)
            {
                throw new ArgumentNullException(nameof(resourceGroupName));
            }
            if (vmName == null)
            {
                throw new ArgumentNullException(nameof(vmName));
            }
            if (vmExtensionName == null)
            {
                throw new ArgumentNullException(nameof(vmExtensionName));
            }
            if (extensionParameters == null)
            {
                throw new ArgumentNullException(nameof(extensionParameters));
            }

            using var message = CreateCreateOrUpdateRequest(resourceGroupName, vmName, vmExtensionName, extensionParameters);
            _pipeline.Send(message, cancellationToken);
            switch (message.Response.Status)
            {
                case 200:
                case 201:
                    return message.Response;
                default:
                    throw _clientDiagnostics.CreateRequestFailedException(message.Response);
            }
        }

        internal HttpMessage CreateUpdateRequest(string resourceGroupName, string vmName, string vmExtensionName, VirtualMachineExtensionUpdate extensionParameters)
        {
            var message = _pipeline.CreateMessage();
            var request = message.Request;
            request.Method = RequestMethod.Patch;
            var uri = new RawRequestUriBuilder();
            uri.Reset(endpoint);
            uri.AppendPath("/subscriptions/", false);
            uri.AppendPath(subscriptionId, true);
            uri.AppendPath("/resourceGroups/", false);
            uri.AppendPath(resourceGroupName, true);
            uri.AppendPath("/providers/Microsoft.Compute/virtualMachines/", false);
            uri.AppendPath(vmName, true);
            uri.AppendPath("/extensions/", false);
            uri.AppendPath(vmExtensionName, true);
            uri.AppendQuery("api-version", "2019-12-01", true);
            request.Uri = uri;
            request.Headers.Add("Content-Type", "application/json");
            var content = new Utf8JsonRequestContent();
            content.JsonWriter.WriteObjectValue(extensionParameters);
            request.Content = content;
            return message;
        }

        /// <summary> The operation to update the extension. </summary>
        /// <param name="resourceGroupName"> The name of the resource group. </param>
        /// <param name="vmName"> The name of the virtual machine where the extension should be updated. </param>
        /// <param name="vmExtensionName"> The name of the virtual machine extension. </param>
        /// <param name="extensionParameters"> Parameters supplied to the Update Virtual Machine Extension operation. </param>
        /// <param name="cancellationToken"> The cancellation token to use. </param>
        public async Task<Response> UpdateAsync(string resourceGroupName, string vmName, string vmExtensionName, VirtualMachineExtensionUpdate extensionParameters, CancellationToken cancellationToken = default)
        {
            if (resourceGroupName == null)
            {
                throw new ArgumentNullException(nameof(resourceGroupName));
            }
            if (vmName == null)
            {
                throw new ArgumentNullException(nameof(vmName));
            }
            if (vmExtensionName == null)
            {
                throw new ArgumentNullException(nameof(vmExtensionName));
            }
            if (extensionParameters == null)
            {
                throw new ArgumentNullException(nameof(extensionParameters));
            }

            using var message = CreateUpdateRequest(resourceGroupName, vmName, vmExtensionName, extensionParameters);
            await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false);
            switch (message.Response.Status)
            {
                case 200:
                    return message.Response;
                default:
                    throw await _clientDiagnostics.CreateRequestFailedExceptionAsync(message.Response).ConfigureAwait(false);
            }
        }

        /// <summary> The operation to update the extension. </summary>
        /// <param name="resourceGroupName"> The name of the resource group. </param>
        /// <param name="vmName"> The name of the virtual machine where the extension should be updated. </param>
        /// <param name="vmExtensionName"> The name of the virtual machine extension. </param>
        /// <param name="extensionParameters"> Parameters supplied to the Update Virtual Machine Extension operation. </param>
        /// <param name="cancellationToken"> The cancellation token to use. </param>
        public Response Update(string resourceGroupName, string vmName, string vmExtensionName, VirtualMachineExtensionUpdate extensionParameters, CancellationToken cancellationToken = default)
        {
            if (resourceGroupName == null)
            {
                throw new ArgumentNullException(nameof(resourceGroupName));
            }
            if (vmName == null)
            {
                throw new ArgumentNullException(nameof(vmName));
            }
            if (vmExtensionName == null)
            {
                throw new ArgumentNullException(nameof(vmExtensionName));
            }
            if (extensionParameters == null)
            {
                throw new ArgumentNullException(nameof(extensionParameters));
            }

            using var message = CreateUpdateRequest(resourceGroupName, vmName, vmExtensionName, extensionParameters);
            _pipeline.Send(message, cancellationToken);
            switch (message.Response.Status)
            {
                case 200:
                    return message.Response;
                default:
                    throw _clientDiagnostics.CreateRequestFailedException(message.Response);
            }
        }

        internal HttpMessage CreateDeleteRequest(string resourceGroupName, string vmName, string vmExtensionName)
        {
            var message = _pipeline.CreateMessage();
            var request = message.Request;
            request.Method = RequestMethod.Delete;
            var uri = new RawRequestUriBuilder();
            uri.Reset(endpoint);
            uri.AppendPath("/subscriptions/", false);
            uri.AppendPath(subscriptionId, true);
            uri.AppendPath("/resourceGroups/", false);
            uri.AppendPath(resourceGroupName, true);
            uri.AppendPath("/providers/Microsoft.Compute/virtualMachines/", false);
            uri.AppendPath(vmName, true);
            uri.AppendPath("/extensions/", false);
            uri.AppendPath(vmExtensionName, true);
            uri.AppendQuery("api-version", "2019-12-01", true);
            request.Uri = uri;
            return message;
        }

        /// <summary> The operation to delete the extension. </summary>
        /// <param name="resourceGroupName"> The name of the resource group. </param>
        /// <param name="vmName"> The name of the virtual machine where the extension should be deleted. </param>
        /// <param name="vmExtensionName"> The name of the virtual machine extension. </param>
        /// <param name="cancellationToken"> The cancellation token to use. </param>
        public async Task<Response> DeleteAsync(string resourceGroupName, string vmName, string vmExtensionName, CancellationToken cancellationToken = default)
        {
            if (resourceGroupName == null)
            {
                throw new ArgumentNullException(nameof(resourceGroupName));
            }
            if (vmName == null)
            {
                throw new ArgumentNullException(nameof(vmName));
            }
            if (vmExtensionName == null)
            {
                throw new ArgumentNullException(nameof(vmExtensionName));
            }

            using var message = CreateDeleteRequest(resourceGroupName, vmName, vmExtensionName);
            await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false);
            switch (message.Response.Status)
            {
                case 200:
                case 202:
                case 204:
                    return message.Response;
                default:
                    throw await _clientDiagnostics.CreateRequestFailedExceptionAsync(message.Response).ConfigureAwait(false);
            }
        }

        /// <summary> The operation to delete the extension. </summary>
        /// <param name="resourceGroupName"> The name of the resource group. </param>
        /// <param name="vmName"> The name of the virtual machine where the extension should be deleted. </param>
        /// <param name="vmExtensionName"> The name of the virtual machine extension. </param>
        /// <param name="cancellationToken"> The cancellation token to use. </param>
        public Response Delete(string resourceGroupName, string vmName, string vmExtensionName, CancellationToken cancellationToken = default)
        {
            if (resourceGroupName == null)
            {
                throw new ArgumentNullException(nameof(resourceGroupName));
            }
            if (vmName == null)
            {
                throw new ArgumentNullException(nameof(vmName));
            }
            if (vmExtensionName == null)
            {
                throw new ArgumentNullException(nameof(vmExtensionName));
            }

            using var message = CreateDeleteRequest(resourceGroupName, vmName, vmExtensionName);
            _pipeline.Send(message, cancellationToken);
            switch (message.Response.Status)
            {
                case 200:
                case 202:
                case 204:
                    return message.Response;
                default:
                    throw _clientDiagnostics.CreateRequestFailedException(message.Response);
            }
        }

        internal HttpMessage CreateGetRequest(string resourceGroupName, string vmName, string vmExtensionName, string expand)
        {
            var message = _pipeline.CreateMessage();
            var request = message.Request;
            request.Method = RequestMethod.Get;
            var uri = new RawRequestUriBuilder();
            uri.Reset(endpoint);
            uri.AppendPath("/subscriptions/", false);
            uri.AppendPath(subscriptionId, true);
            uri.AppendPath("/resourceGroups/", false);
            uri.AppendPath(resourceGroupName, true);
            uri.AppendPath("/providers/Microsoft.Compute/virtualMachines/", false);
            uri.AppendPath(vmName, true);
            uri.AppendPath("/extensions/", false);
            uri.AppendPath(vmExtensionName, true);
            if (expand != null)
            {
                uri.AppendQuery("$expand", expand, true);
            }
            uri.AppendQuery("api-version", "2019-12-01", true);
            request.Uri = uri;
            return message;
        }

        /// <summary> The operation to get the extension. </summary>
        /// <param name="resourceGroupName"> The name of the resource group. </param>
        /// <param name="vmName"> The name of the virtual machine containing the extension. </param>
        /// <param name="vmExtensionName"> The name of the virtual machine extension. </param>
        /// <param name="expand"> The expand expression to apply on the operation. </param>
        /// <param name="cancellationToken"> The cancellation token to use. </param>
        public async Task<Response<VirtualMachineExtension>> GetAsync(string resourceGroupName, string vmName, string vmExtensionName, string expand = null, CancellationToken cancellationToken = default)
        {
            if (resourceGroupName == null)
            {
                throw new ArgumentNullException(nameof(resourceGroupName));
            }
            if (vmName == null)
            {
                throw new ArgumentNullException(nameof(vmName));
            }
            if (vmExtensionName == null)
            {
                throw new ArgumentNullException(nameof(vmExtensionName));
            }

            using var message = CreateGetRequest(resourceGroupName, vmName, vmExtensionName, expand);
            await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false);
            switch (message.Response.Status)
            {
                case 200:
                    {
                        VirtualMachineExtension value = default;
                        using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false);
                        if (document.RootElement.ValueKind == JsonValueKind.Null)
                        {
                            value = null;
                        }
                        else
                        {
                            value = VirtualMachineExtension.DeserializeVirtualMachineExtension(document.RootElement);
                        }
                        return Response.FromValue(value, message.Response);
                    }
                default:
                    throw await _clientDiagnostics.CreateRequestFailedExceptionAsync(message.Response).ConfigureAwait(false);
            }
        }

        /// <summary> The operation to get the extension. </summary>
        /// <param name="resourceGroupName"> The name of the resource group. </param>
        /// <param name="vmName"> The name of the virtual machine containing the extension. </param>
        /// <param name="vmExtensionName"> The name of the virtual machine extension. </param>
        /// <param name="expand"> The expand expression to apply on the operation. </param>
        /// <param name="cancellationToken"> The cancellation token to use. </param>
        public Response<VirtualMachineExtension> Get(string resourceGroupName, string vmName, string vmExtensionName, string expand = null, CancellationToken cancellationToken = default)
        {
            if (resourceGroupName == null)
            {
                throw new ArgumentNullException(nameof(resourceGroupName));
            }
            if (vmName == null)
            {
                throw new ArgumentNullException(nameof(vmName));
            }
            if (vmExtensionName == null)
            {
                throw new ArgumentNullException(nameof(vmExtensionName));
            }

            using var message = CreateGetRequest(resourceGroupName, vmName, vmExtensionName, expand);
            _pipeline.Send(message, cancellationToken);
            switch (message.Response.Status)
            {
                case 200:
                    {
                        VirtualMachineExtension value = default;
                        using var document = JsonDocument.Parse(message.Response.ContentStream);
                        if (document.RootElement.ValueKind == JsonValueKind.Null)
                        {
                            value = null;
                        }
                        else
                        {
                            value = VirtualMachineExtension.DeserializeVirtualMachineExtension(document.RootElement);
                        }
                        return Response.FromValue(value, message.Response);
                    }
                default:
                    throw _clientDiagnostics.CreateRequestFailedException(message.Response);
            }
        }

        internal HttpMessage CreateListRequest(string resourceGroupName, string vmName, string expand)
        {
            var message = _pipeline.CreateMessage();
            var request = message.Request;
            request.Method = RequestMethod.Get;
            var uri = new RawRequestUriBuilder();
            uri.Reset(endpoint);
            uri.AppendPath("/subscriptions/", false);
            uri.AppendPath(subscriptionId, true);
            uri.AppendPath("/resourceGroups/", false);
            uri.AppendPath(resourceGroupName, true);
            uri.AppendPath("/providers/Microsoft.Compute/virtualMachines/", false);
            uri.AppendPath(vmName, true);
            uri.AppendPath("/extensions", false);
            if (expand != null)
            {
                uri.AppendQuery("$expand", expand, true);
            }
            uri.AppendQuery("api-version", "2019-12-01", true);
            request.Uri = uri;
            return message;
        }

        /// <summary> The operation to get all extensions of a Virtual Machine. </summary>
        /// <param name="resourceGroupName"> The name of the resource group. </param>
        /// <param name="vmName"> The name of the virtual machine containing the extension. </param>
        /// <param name="expand"> The expand expression to apply on the operation. </param>
        /// <param name="cancellationToken"> The cancellation token to use. </param>
        public async Task<Response<VirtualMachineExtensionsListResult>> ListAsync(string resourceGroupName, string vmName, string expand = null, CancellationToken cancellationToken = default)
        {
            if (resourceGroupName == null)
            {
                throw new ArgumentNullException(nameof(resourceGroupName));
            }
            if (vmName == null)
            {
                throw new ArgumentNullException(nameof(vmName));
            }

            using var message = CreateListRequest(resourceGroupName, vmName, expand);
            await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false);
            switch (message.Response.Status)
            {
                case 200:
                    {
                        VirtualMachineExtensionsListResult value = default;
                        using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false);
                        if (document.RootElement.ValueKind == JsonValueKind.Null)
                        {
                            value = null;
                        }
                        else
                        {
                            value = VirtualMachineExtensionsListResult.DeserializeVirtualMachineExtensionsListResult(document.RootElement);
                        }
                        return Response.FromValue(value, message.Response);
                    }
                default:
                    throw await _clientDiagnostics.CreateRequestFailedExceptionAsync(message.Response).ConfigureAwait(false);
            }
        }

        /// <summary> The operation to get all extensions of a Virtual Machine. </summary>
        /// <param name="resourceGroupName"> The name of the resource group. </param>
        /// <param name="vmName"> The name of the virtual machine containing the extension. </param>
        /// <param name="expand"> The expand expression to apply on the operation. </param>
        /// <param name="cancellationToken"> The cancellation token to use. </param>
        public Response<VirtualMachineExtensionsListResult> List(string resourceGroupName, string vmName, string expand = null, CancellationToken cancellationToken = default)
        {
            if (resourceGroupName == null)
            {
                throw new ArgumentNullException(nameof(resourceGroupName));
            }
            if (vmName == null)
            {
                throw new ArgumentNullException(nameof(vmName));
            }

            using var message = CreateListRequest(resourceGroupName, vmName, expand);
            _pipeline.Send(message, cancellationToken);
            switch (message.Response.Status)
            {
                case 200:
                    {
                        VirtualMachineExtensionsListResult value = default;
                        using var document = JsonDocument.Parse(message.Response.ContentStream);
                        if (document.RootElement.ValueKind == JsonValueKind.Null)
                        {
                            value = null;
                        }
                        else
                        {
                            value = VirtualMachineExtensionsListResult.DeserializeVirtualMachineExtensionsListResult(document.RootElement);
                        }
                        return Response.FromValue(value, message.Response);
                    }
                default:
                    throw _clientDiagnostics.CreateRequestFailedException(message.Response);
            }
        }
    }
}


text:
package centreon::common::powershell::hyperv::2012::scvmmintegrationservice;

use strict;
use warnings;
use centreon::plugins::misc;

sub get_powershell {
    my (%options) = @_;
    my $no_ps = (defined($options{no_ps})) ? 1 : 0;

    return '' if ($no_ps == 1);

    my $ps = '
$culture = new-object "System.Globalization.CultureInfo" "en-us"
[System.Threading.Thread]::CurrentThread.CurrentUICulture = $culture
$ProgressPreference = "SilentlyContinue"

Try {
    $ErrorActionPreference = "Stop"
    Import-Module -Name "virtualmachinemanager"

    $username = "' . $options{scvmm_username} . '"
    $password = ConvertTo-SecureString "' . $options{scvmm_password} . '" -AsPlainText -Force
    $UserCredential = new-object -typename System.Management.Automation.PSCredential -argumentlist $username,$password

    $connection = Get-VMMServer -ComputerName "' . $options{scvmm_hostname} . '" -TCPPort ' . $options{scvmm_port} . ' -Credential $UserCredential
    $vms = Get-SCVirtualMachine -VMMServer $connection

    Foreach ($vm in $vms) {
        $desc = $vm.description -replace "\r",""
        $desc = $desc -replace "\n"," - "
        Write-Host ("[VM={0}]" -f $vm.Name) -NoNewline
        Write-Host ("[Description={0}]" -f $desc) -NoNewline
        Write-Host ("[Status={0}]" -f $vm.Status) -NoNewline
        Write-Host ("[Cloud={0}]" -f $vm.Cloud) -NoNewline
        Write-Host ("[HostGroup={0}]" -f $vm.HostGroupPath) -NoNewline
        Write-Host ("[VMAddition={0}]" -f $vm.VMAddition) -NoNewline
        Write-Host ("[OperatingSystemShutdownEnabled={0}]" -f $vm.OperatingSystemShutdownEnabled) -NoNewline
        Write-Host ("[TimeSynchronizationEnabled={0}]" -f $vm.TimeSynchronizationEnabled) -NoNewline
        Write-Host ("[DataExchangeEnabled={0}]" -f $vm.DataExchangeEnabled) -NoNewline
        Write-Host ("[HeartbeatEnabled={0}]" -f $vm.HeartbeatEnabled) -NoNewline
        Write-Host ("[BackupEnabled={0}]" -f $vm.BackupEnabled)
    }
} Catch {
    Write-Host $Error[0].Exception
    exit 1
}

exit 0
';

    return centreon::plugins::misc::powershell_encoded($ps);
}

1;

__END__

=head1 DESCRIPTION

Method to get hyper-v informations.

=cut


text:
function endingTeleportIDList = getEndingTeleportIDList()
%getEndingTeleportIDList Get the IDs of teleported vehicles.
%   endingTeleportIDList = getEndingTeleportIDList() Returns a cell array
%   of strings containing the IDs of the vehicles which ended to be
%   teleported in this time step.

%   Copyright 2013 Universidad Nacional de Colombia,
%   Politecnico Jaime Isaza Cadavid.
%   Authors: Andres Acosta, Jairo Espinosa, Jorge Espinosa.
%   $Id: getEndingTeleportIDList.m 2 2013-12-21 21:39:57Z aacosta $

import traci.constants
endingTeleportIDList = traci.simulation.getUniversal(constants.VAR_TELEPORT_ENDING_VEHICLES_IDS);


text:
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    package="esgi.project.ratpdroid"
    android:versionCode="1"
    android:versionName="1.0" >

    <uses-sdk
        android:minSdkVersion="11"
        android:targetSdkVersion="16" />

    <application
        android:name=".MyApplication"
        android:allowBackup="true"
        android:icon="@drawable/ic_launcher"
        android:label="@string/app_name"
		android:theme="@android:style/Theme.Holo.Light">
        <activity
            android:name=".SplashScreen"
            android:label="@string/app_name"
            android:configChanges="locale"
            android:windowSoftInputMode="stateHidden">
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />

                <category android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
        </activity>
        <activity
            android:name=".MainActivity"
            android:label="@string/app_name"
            android:windowSoftInputMode="stateHidden"
            android:configChanges="locale">

            <intent-filter>
			    <action android:name="android.intent.action.SEARCH" />
			</intent-filter>

            <meta-data
			    android:name="android.app.searchable"
			    android:resource="@xml/searchable" />
        </activity>

        <activity
            android:name=".ListTransports"
            android:label="@string/title_activity_list_transports"
            android:windowSoftInputMode="stateHidden"
            android:launchMode="singleTop"
            android:parentActivityName=".MainActivity"
            android:configChanges="locale">

            <meta-data
                android:name="android.support.PARENT_ACTIVITY"
                android:value=".MainActivity" />
        </activity>

        <activity
            android:name=".ListStations"
            android:label="@string/title_activity_list_stations"
            android:windowSoftInputMode="stateHidden"
            android:launchMode="singleTop"
            android:parentActivityName=".ListTransports"
            android:configChanges="locale">

            <meta-data
                android:name="android.support.PARENT_ACTIVITY"
                android:value=".ListTransports" />
        </activity>

        <activity
            android:name=".AddStation"
            android:label="@string/title_activity_add_station"
            android:windowSoftInputMode="stateHidden"
            android:launchMode="singleTop"
            android:parentActivityName=".ListStations"
            android:configChanges="locale">

            <meta-data
                android:name="android.support.PARENT_ACTIVITY"
                android:value=".ListStations" />
        </activity>

        <activity
            android:name=".DetailStation"
            android:label="@string/title_activity_detail_station"
            android:windowSoftInputMode="stateHidden"
            android:launchMode="singleTop"
            android:parentActivityName=".ListStations"
            android:configChanges="locale">

            <meta-data
                android:name="android.support.PARENT_ACTIVITY"
                android:value=".ListStations" />
        </activity>

        <activity
            android:name=".UpdateStation"
            android:label="@string/title_activity_update_station"
            android:windowSoftInputMode="stateHidden"
            android:launchMode="singleTop"
            android:parentActivityName=".DetailStation"
            android:configChanges="locale">

            <meta-data
                android:name="android.support.PARENT_ACTIVITY"
                android:value=".DetailStation" />
        </activity>
    </application>

</manifest>


text:
package term

import "syscall"

const ioctlReadTermios = syscall.TIOCGETA

// Termios is the Terminal Input/Output structure
type Termios syscall.Termios


text:
ACCEPTED

#### According to
Index Fungorum

#### Published in
null

#### Original name
Aspergillus effusus var. effusus Tirab.

### Remarks
null


text:
<?php

use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateMenusTable extends Migration {

	/**
	 * Run the migrations.
	 *
	 * @return void
	 */
	public function up()
	{
		//
		Schema::create('menus', function($table){
			$table->increments('id');
			$table->integer('semanal_id')->unsigned()->nullable();
			$table->date('fecha');
			$table->tinyInteger('tipo');
			$table->integer('raciones');
			$table->timestamps();
		});

		Schema::table('menus', function($table){
			$table->foreign('semanal_id')->references('id')
			->on('menu_semanales')->onDelete('set null');
		});
	}

	/**
	 * Reverse the migrations.
	 *
	 * @return void
	 */
	public function down()
	{
		//
		Schema::table('menus', function($table){
			$table->dropForeign('menus_semanal_id_foreign');
		});

		Schema::drop('menus');
	}

}


text:
<?php
namespace Avenue\Interfaces;

interface RouteInterface
{
    /**
     * Dispatch route arguments for matching.
     *
     * @param array $args
     */
    public function dispatch(array $args);

    /**
     * Instantiate controller.
     */
    public function initController();

    /**
     * Build controller class namespace.
     */
    public function buildControllerNamespace();

    /**
     * Match the route URI with regular expression.
     */
    public function matchRoute();

    /**
     * Set respective route params with actual value.
     */
    public function setRouteParams();

    /**
     * Set the default values route parameters.
     */
    public function setDefaultRouteParams();

    /**
     * Mapping the resource method representation.
     */
    public function mapResourceMethod();

    /**
     * Set value for particular URI based on the key/value.
     *
     * @param mixed $key
     * @param mixed $value
     */
    public function setParam($key, $value);

    /**
     * Get the route parameter value based on the key.
     *
     * @param mixed $key
     */
    public function getParams($key = null);

    /**
     * Check if particular route rule is fulfilled.
     */
    public function isFulfilled();

    /**
     * Get the actual matched rule's regexp.
     */
    public function getMatchedRuleRegexp();
}


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

<title>O-Index</title>
<meta name="date" content="2018-03-13">
<link rel="stylesheet" type="text/css" href="../stylesheet.css" title="Style">

JavaScript is disabled on your browser.

Skip navigation links

Overview

Package

Class

Tree

Deprecated

Index

Help

Prev Letter

Next Letter

Frames

No Frames

All Classes

A B C E F G I L M O Q R S V W

O

oscillationsProperty() - Method in class com.kirankunigiri.Sprint.Interpolators.ElasticInterpolator

The oscillations property.

A B C E F G I L M O Q R S V W

Skip navigation links

Overview

Package

Class

Tree

Deprecated

Index

Help

Prev Letter

Next Letter

Frames

No Frames

All Classes


text:
<!DOCTYPE html>

    <meta http-equiv="refresh" content="0;URL=../../../../libc/constant.RTF_GATEWAY.html">

Redirecting to ../../../../libc/constant.RTF_GATEWAY.html...


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

<META http-equiv="Content-Type" content="text/html; charset=utf-8">
<TITLE>
javax.crypto.interfaces (Java Platform SE 6)
</TITLE>

<META NAME="date" CONTENT="2007-03-19">

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

javax.crypto.interfaces

接口

DHKey

DHPrivateKey

DHPublicKey

PBEKey


text:
@interface ViewController () <CoverViewDelegate>
{
    IBOutlet UIView *MainView;

    SideView *sideView;
    CoverView *bgCoverView;
}

@end

@implementation ViewController

- (void)viewDidLoad {

    [super viewDidLoad];

    [self addCoverView];
    [self addSideMenuView];
    // Do any additional setup after loading the view, typically from a nib.
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

#pragma mark - add SideMenu & CoverView
-(void)addSideMenuView
{
    if (sideView == nil) {
        sideView = [[SideView alloc]initWithFrame:SIDEMENU_FRAME andSuperView:self];
    }

    [self.view addSubview:sideView];
}

-(void)addCoverView
{
    bgCoverView = [[CoverView alloc]initWithFrame:MainView.frame];

    bgCoverView.hidden = YES;
    bgCoverView.delegate = self;

    [MainView addSubview:bgCoverView];
}

#pragma mark - SideMune Method

-(IBAction)MenuBtnPressed:(id)sender
{
    [sideView openMenu];
    bgCoverView.hidden = NO;
}

#pragma mark - CoverViewDelegate

-(void)respondToTapGestureRecognizer
{
    [sideView closeMenu];
    bgCoverView.hidden = YES;
}

@end


text:
package com.gtm.csims.model.base;

import java.io.Serializable;

/**
 * This is an object that contains data related to the BS_DURING table.
 * Do not modify this class because it will be overwritten if the configuration file
 * related to this class is modified.
 *
 * @hibernate.class
 *  table="BsUserInfo"
 */

public abstract class BaseBsUserApplyInfo  implements Serializable {

	public static String REF = "BsUserApplyInfo";
	public static String PROP_ID = "Id";
	public static String PROP_NAME = "Name";
	public static String PROP_USERTYPE = "UserType";
	public static String PROP_ISPCBUSER = "IsPcbUser";
	public static String PROP_PASSWORD = "Password";
	public static String PROP_ZXNAME1 = "ZxName1";
	public static String PROP_ZXNAME2 = "ZxName2";
	public static String PROP_ZXNAME3 = "ZxName3";
	public static String PROP_ZXNAME4 = "ZxName4";
	public static String PROP_ZXNAME5 = "ZxName5";
	public static String PROP_ZXNAME6 = "ZxName6";
	public static String PROP_ZXNAME7 = "ZxName7";
	public static String PROP_ZXNAME8 = "ZxName8";
	public static String PROP_ZXNAME9 = "ZxName9";
	public static String PROP_ZXORGCODE1 = "ZxOrgCode1";
	public static String PROP_ZXORGCODE2 = "ZxOrgCode2";
	public static String PROP_ZXORGCODE3 = "ZxOrgCode3";
	public static String PROP_ZXORGCODE4 = "ZxOrgCode4";
	public static String PROP_ZXORGCODE5 = "ZxOrgCode5";
	public static String PROP_ZXORGCODE6 = "ZxOrgCode6";
	public static String PROP_ZXORGCODE7 = "ZxOrgCode7";
	public static String PROP_ZXORGCODE8 = "ZxOrgCode8";
	public static String PROP_ZXORGCODE9 = "ZxOrgCode9";
	public static String PROP_ZXORGNAME1 = "ZxOrgName1";
	public static String PROP_ZXORGNAME2 = "ZxOrgName2";
	public static String PROP_ZXORGNAME3 = "ZxOrgName3";
	public static String PROP_ZXORGNAME4 = "ZxOrgName4";
	public static String PROP_ZXORGNAME5 = "ZxOrgName5";
	public static String PROP_ZXORGNAME6 = "ZxOrgName6";
	public static String PROP_ZXORGNAME7 = "ZxOrgName7";
	public static String PROP_ZXORGNAME8 = "ZxOrgName8";
	public static String PROP_ZXORGNAME9 = "ZxOrgName9";
	public static String PROP_CARDTYPE = "CardType";
	public static String PROP_CARDID = "CardId";
	public static String PROP_JGPRINCIPAL = "JgPrincipal";
	public static String PROP_ZXPRINCIPAL = "ZxPrincipal";
	public static String PROP_USERCODE = "UserCode";
	public static String PROP_EDUCATION = "Education";
	public static String PROP_POST = "Post";
	public static String PROP_ORGCODEOFJR = "OrgCodeOfJr";
	public static String PROP_ORGCODEOFZZ = "OrgCodeOfZz";
	public static String PROP_ORGCODEOFXY = "OrgCodeOfXy";
	public static String PROP_ORGNAME = "OrgName";
	public static String PROP_PHONE = "Phone";
	public static String PROP_PHOTO = "Photo";
	public static String PROP_APPLYCODE = "ApplyCode";
	public static String PROP_APPLYNAME = "ApplyName";
	public static String PROP_CREATERCODE = "CreaterCode";
	public static String PROP_CREATEDATE = "CreateDate";
	public static String PROP_STATUS = "Status";
	public static String PROP_FLAG = "Flag";
	public static String PROP_DEPTNAME = "DeptName";
	public static String PROP_DEPTNO = "DeptNo";
	public static String PROP_USERCARD = "UserCard";

	// constructors
	public BaseBsUserApplyInfo () {
		initialize();
	}

	/**
	 * Constructor for primary key
	 */
	public BaseBsUserApplyInfo (java.lang.String id) {
		this.setId(id);
		initialize();
	}

	protected void initialize () {}

	private int hashCode = Integer.MIN_VALUE;

	// primary key
	private java.lang.String id;

	// fields
	private java.lang.String name;
	private java.lang.String isPcbUser;
	private java.lang.String userType;
	private java.lang.String password;
	private java.lang.String zxName1;
	private java.lang.String zxName2;
	private java.lang.String zxName3;
	private java.lang.String zxName4;
	private java.lang.String zxName5;
	private java.lang.String zxName6;
	private java.lang.String zxName7;
	private java.lang.String zxName8;
	private java.lang.String zxName9;
	private java.lang.String zxOrgCode1;
	private java.lang.String zxOrgCode2;
	private java.lang.String zxOrgCode3;
	private java.lang.String zxOrgCode4;
	private java.lang.String zxOrgCode5;
	private java.lang.String zxOrgCode6;
	private java.lang.String zxOrgCode7;
	private java.lang.String zxOrgCode8;
	private java.lang.String zxOrgCode9;
	private java.lang.String zxOrgName1;
	private java.lang.String zxOrgName2;
	private java.lang.String zxOrgName3;
	private java.lang.String zxOrgName4;
	private java.lang.String zxOrgName5;
	private java.lang.String zxOrgName6;
	private java.lang.String zxOrgName7;
	private java.lang.String zxOrgName8;
	private java.lang.String zxOrgName9;
	private java.lang.String cardType;
	private java.lang.String cardId;
	private java.lang.String jgPrincipal;
	private java.lang.String zxPrincipal;
	private java.lang.String userCode;
	private java.lang.String education;
	private java.lang.String post;
	private java.lang.String orgCodeOfJr;
	private java.lang.String orgCodeOfZz;
	private java.lang.String orgCodeOfXy;
	private java.lang.String orgName;
	private java.lang.String phone;
	private java.lang.String photo;
	private java.lang.String applyCode;
	private java.lang.String applyName;
	private java.lang.String createrCode;
	private java.lang.String status;
	private java.lang.String flag;
	private java.util.Date  createDate;
	private java.lang.String deptName;
	private java.lang.String deptNo;
	private java.lang.String userCard;

	/**
	 * Return the unique identifier of this class
     * @hibernate.id
     *  column="ID"
     */
	public java.lang.String getId () {
		return id;
	}

	/**
	 * Set the unique identifier of this class
	 * @param id the new ID
	 */
	public void setId (java.lang.String id) {
		this.id = id;
		this.hashCode = Integer.MIN_VALUE;
	}

	public int getHashCode() {
		return hashCode;
	}

	public void setHashCode(int hashCode) {
		this.hashCode = hashCode;
	}

	public java.lang.String getName() {
		return name;
	}

	public void setName(java.lang.String name) {
		this.name = name;
	}

	public java.lang.String getIsPcbUser() {
		return isPcbUser;
	}

	public void setIsPcbUser(java.lang.String isPcbUser) {
		this.isPcbUser = isPcbUser;
	}

	public java.lang.String getUserType() {
		return userType;
	}

	public void setUserType(java.lang.String userType) {
		this.userType = userType;
	}

	public java.lang.String getPassword() {
		return password;
	}

	public void setPassword(java.lang.String password) {
		this.password = password;
	}

	public java.lang.String getZxName1() {
		return zxName1;
	}

	public void setZxName1(java.lang.String zxName1) {
		this.zxName1 = zxName1;
	}

	public java.lang.String getZxName2() {
		return zxName2;
	}

	public void setZxName2(java.lang.String zxName2) {
		this.zxName2 = zxName2;
	}

	public java.lang.String getZxName3() {
		return zxName3;
	}

	public void setZxName3(java.lang.String zxName3) {
		this.zxName3 = zxName3;
	}

	public java.lang.String getZxName4() {
		return zxName4;
	}

	public void setZxName4(java.lang.String zxName4) {
		this.zxName4 = zxName4;
	}

	public java.lang.String getZxName5() {
		return zxName5;
	}

	public void setZxName5(java.lang.String zxName5) {
		this.zxName5 = zxName5;
	}

	public java.lang.String getZxName6() {
		return zxName6;
	}

	public void setZxName6(java.lang.String zxName6) {
		this.zxName6 = zxName6;
	}

	public java.lang.String getUserCard() {
		return userCard;
	}

	public void setUserCard(java.lang.String userCard) {
		this.userCard = userCard;
	}

	public java.lang.String getZxName7() {
		return zxName7;
	}

	public void setZxName7(java.lang.String zxName7) {
		this.zxName7 = zxName7;
	}

	public java.lang.String getZxName8() {
		return zxName8;
	}

	public void setZxName8(java.lang.String zxName8) {
		this.zxName8 = zxName8;
	}

	public java.lang.String getZxName9() {
		return zxName9;
	}

	public void setZxName9(java.lang.String zxName9) {
		this.zxName9 = zxName9;
	}

	public java.lang.String getZxOrgCode1() {
		return zxOrgCode1;
	}

	public void setZxOrgCode1(java.lang.String zxOrgCode1) {
		this.zxOrgCode1 = zxOrgCode1;
	}

	public java.lang.String getZxOrgCode2() {
		return zxOrgCode2;
	}

	public void setZxOrgCode2(java.lang.String zxOrgCode2) {
		this.zxOrgCode2 = zxOrgCode2;
	}

	public java.lang.String getZxOrgCode3() {
		return zxOrgCode3;
	}

	public void setZxOrgCode3(java.lang.String zxOrgCode3) {
		this.zxOrgCode3 = zxOrgCode3;
	}

	public java.lang.String getZxOrgCode4() {
		return zxOrgCode4;
	}

	public void setZxOrgCode4(java.lang.String zxOrgCode4) {
		this.zxOrgCode4 = zxOrgCode4;
	}

	public java.lang.String getZxOrgCode5() {
		return zxOrgCode5;
	}

	public void setZxOrgCode5(java.lang.String zxOrgCode5) {
		this.zxOrgCode5 = zxOrgCode5;
	}

	public java.lang.String getZxOrgCode6() {
		return zxOrgCode6;
	}

	public void setZxOrgCode6(java.lang.String zxOrgCode6) {
		this.zxOrgCode6 = zxOrgCode6;
	}

	public java.lang.String getZxOrgCode7() {
		return zxOrgCode7;
	}

	public void setZxOrgCode7(java.lang.String zxOrgCode7) {
		this.zxOrgCode7 = zxOrgCode7;
	}

	public java.lang.String getZxOrgCode8() {
		return zxOrgCode8;
	}

	public void setZxOrgCode8(java.lang.String zxOrgCode8) {
		this.zxOrgCode8 = zxOrgCode8;
	}

	public java.lang.String getZxOrgCode9() {
		return zxOrgCode9;
	}

	public void setZxOrgCode9(java.lang.String zxOrgCode9) {
		this.zxOrgCode9 = zxOrgCode9;
	}

	public java.lang.String getZxOrgName1() {
		return zxOrgName1;
	}

	public void setZxOrgName1(java.lang.String zxOrgName1) {
		this.zxOrgName1 = zxOrgName1;
	}

	public java.lang.String getZxOrgName2() {
		return zxOrgName2;
	}

	public void setZxOrgName2(java.lang.String zxOrgName2) {
		this.zxOrgName2 = zxOrgName2;
	}

	public java.lang.String getZxOrgName3() {
		return zxOrgName3;
	}

	public void setZxOrgName3(java.lang.String zxOrgName3) {
		this.zxOrgName3 = zxOrgName3;
	}

	public java.lang.String getZxOrgName4() {
		return zxOrgName4;
	}

	public void setZxOrgName4(java.lang.String zxOrgName4) {
		this.zxOrgName4 = zxOrgName4;
	}

	public java.lang.String getZxOrgName5() {
		return zxOrgName5;
	}

	public void setZxOrgName5(java.lang.String zxOrgName5) {
		this.zxOrgName5 = zxOrgName5;
	}

	public java.lang.String getZxOrgName6() {
		return zxOrgName6;
	}

	public void setZxOrgName6(java.lang.String zxOrgName6) {
		this.zxOrgName6 = zxOrgName6;
	}

	public java.lang.String getZxOrgName7() {
		return zxOrgName7;
	}

	public void setZxOrgName7(java.lang.String zxOrgName7) {
		this.zxOrgName7 = zxOrgName7;
	}

	public java.lang.String getZxOrgName8() {
		return zxOrgName8;
	}

	public void setZxOrgName8(java.lang.String zxOrgName8) {
		this.zxOrgName8 = zxOrgName8;
	}

	public java.lang.String getZxOrgName9() {
		return zxOrgName9;
	}

	public void setZxOrgName9(java.lang.String zxOrgName9) {
		this.zxOrgName9 = zxOrgName9;
	}

	public java.lang.String getCardType() {
		return cardType;
	}

	public void setCardType(java.lang.String cardType) {
		this.cardType = cardType;
	}

	public java.lang.String getCardId() {
		return cardId;
	}

	public void setCardId(java.lang.String cardId) {
		this.cardId = cardId;
	}

	public java.lang.String getJgPrincipal() {
		return jgPrincipal;
	}

	public void setJgPrincipal(java.lang.String jgPrincipal) {
		this.jgPrincipal = jgPrincipal;
	}

	public java.lang.String getZxPrincipal() {
		return zxPrincipal;
	}

	public void setZxPrincipal(java.lang.String zxPrincipal) {
		this.zxPrincipal = zxPrincipal;
	}

	public java.lang.String getUserCode() {
		return userCode;
	}

	public void setUserCode(java.lang.String userCode) {
		this.userCode = userCode;
	}

	public java.lang.String getEducation() {
		return education;
	}

	public void setEducation(java.lang.String education) {
		this.education = education;
	}

	public java.lang.String getPost() {
		return post;
	}

	public void setPost(java.lang.String post) {
		this.post = post;
	}

	public java.lang.String getOrgCodeOfJr() {
		return orgCodeOfJr;
	}

	public void setOrgCodeOfJr(java.lang.String orgCodeOfJr) {
		this.orgCodeOfJr = orgCodeOfJr;
	}

	public java.lang.String getOrgCodeOfZz() {
		return orgCodeOfZz;
	}

	public void setOrgCodeOfZz(java.lang.String orgCodeOfZz) {
		this.orgCodeOfZz = orgCodeOfZz;
	}

	public java.lang.String getOrgCodeOfXy() {
		return orgCodeOfXy;
	}

	public void setOrgCodeOfXy(java.lang.String orgCodeOfXy) {
		this.orgCodeOfXy = orgCodeOfXy;
	}

	public java.lang.String getOrgName() {
		return orgName;
	}

	public void setOrgName(java.lang.String orgName) {
		this.orgName = orgName;
	}

	public java.lang.String getDeptName() {
		return deptName;
	}

	public void setDeptName(java.lang.String deptName) {
		this.deptName = deptName;
	}

	public java.lang.String getDeptNo() {
		return deptNo;
	}

	public void setDeptNo(java.lang.String deptNo) {
		this.deptNo = deptNo;
	}

	public java.lang.String getPhone() {
		return phone;
	}

	public void setPhone(java.lang.String phone) {
		this.phone = phone;
	}

	public java.lang.String getPhoto() {
		return photo;
	}

	public void setPhoto(java.lang.String photo) {
		this.photo = photo;
	}

	public java.lang.String getStatus() {
		return status;
	}

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

	public java.lang.String getApplyCode() {
		return applyCode;
	}

	public void setApplyCode(java.lang.String applyCode) {
		this.applyCode = applyCode;
	}

	public java.lang.String getApplyName() {
		return applyName;
	}

	public void setApplyName(java.lang.String applyName) {
		this.applyName = applyName;
	}

	public java.lang.String getFlag() {
		return flag;
	}

	public void setFlag(java.lang.String flag) {
		this.flag = flag;
	}

	public java.util.Date getCreateDate() {
		return createDate;
	}

	public void setCreateDate(java.util.Date createDate) {
		this.createDate = createDate;
	}

	public java.lang.String getCreaterCode() {
		return createrCode;
	}

	public void setCreaterCode(java.lang.String createrCode) {
		this.createrCode = createrCode;
	}

	@Override
	public boolean equals (Object obj) {
		if (null == obj) return false;
		if (!(obj instanceof com.gtm.csims.model.BsUserApplyInfo)) return false;
		else {
			com.gtm.csims.model.BsUserApplyInfo bs = (com.gtm.csims.model.BsUserApplyInfo) obj;
			if (null == this.getId() || null == bs.getId()) return false;
			else return (this.getId().equals(bs.getId()));
		}
	}

	@Override
	public int hashCode () {
		if (Integer.MIN_VALUE == this.hashCode) {
			if (null == this.getId()) return super.hashCode();
			else {
				String hashStr = this.getClass().getName() + ":" + this.getId().hashCode();
				this.hashCode = hashStr.hashCode();
			}
		}
		return this.hashCode;
	}

	@Override
	public String toString () {
		return super.toString();
	}

}


text:
{{:: 'identity-providers' | translate}}

{{provider.name}}

{{:: 'add-identity-provider' | translate}}

    <kc-tabs-identity-provider></kc-tabs-identity-provider>

    <form class="form-horizontal" name="realmForm" novalidate kc-read-only="!access.manageIdentityProviders">
        <input type="text" readonly value="this is not a login form" style="display: none;">
        <input type="password" readonly value="this is not a login form" style="display: none;">

        <fieldset>

                {{:: 'redirect-uri' | translate}}

                    <input class="form-control" id="redirectUri" type="text" value="{{callbackUrl}}{{identityProvider.alias}}/endpoint" readonly kc-select-action="click">

                <kc-tooltip>{{:: 'redirect-uri.tooltip' | translate}}</kc-tooltip>

        </fieldset>
        <fieldset>

                * {{:: 'gitlab-application-id' | translate}}

                    <input class="form-control" id="clientId" type="text" ng-model="identityProvider.config.clientId" required>

                <kc-tooltip>{{:: 'gitlab.application-id.tooltip' | translate}}</kc-tooltip>

                * {{:: 'gitlab-application-secret' | translate}}

                    <input class="form-control" id="clientSecret" type="password" ng-model="identityProvider.config.clientSecret" required>

                <kc-tooltip>{{:: 'gitlab.application-secret.tooltip' | translate}}</kc-tooltip>

                {{:: 'default-scopes' | translate}}

                    <input class="form-control" id="defaultScope" type="text" ng-model="identityProvider.config.defaultScope">

                <kc-tooltip>{{:: 'gitlab.default-scopes.tooltip' | translate}}</kc-tooltip>

                {{:: 'store-tokens' | translate}}

                    <input ng-model="identityProvider.storeToken" id="storeToken" onoffswitch on-text="{{:: 'onText' | translate}}" off-text="{{:: 'offText' | translate}}" />

                <kc-tooltip>{{:: 'identity-provider.store-tokens.tooltip' | translate}}</kc-tooltip>

                {{:: 'stored-tokens-readable' | translate}}

                    <input ng-model="identityProvider.addReadTokenRoleOnCreate" id="storedTokensReadable" onoffswitch on-text="{{:: 'onText' | translate}}" off-text="{{:: 'offText' | translate}}" />

                <kc-tooltip>{{:: 'identity-provider.stored-tokens-readable.tooltip' | translate}}</kc-tooltip>

                {{:: 'enabled' | translate}}

                    <input ng-model="identityProvider.enabled" id="enabled" onoffswitch on-text="{{:: 'onText' | translate}}" off-text="{{:: 'offText' | translate}}" />

                <kc-tooltip>{{:: 'identity-provider.enabled.tooltip' | translate}}</kc-tooltip>

                {{:: 'trust-email' | translate}}

                    <input ng-model="identityProvider.trustEmail" name="identityProvider.trustEmail" id="trustEmail" onoffswitch on-text="{{:: 'onText' | translate}}" off-text="{{:: 'offText' | translate}}" />

                <kc-tooltip>{{:: 'trust-email.tooltip' | translate}}</kc-tooltip>

                {{:: 'link-only' | translate}}

                    <input ng-model="identityProvider.linkOnly" name="identityProvider.trustEmail" id="linkOnly" onoffswitch on-text="{{:: 'onText' | translate}}" off-text="{{:: 'offText' | translate}}" />

                <kc-tooltip>{{:: 'link-only.tooltip' | translate}}</kc-tooltip>

                {{:: 'hide-on-login-page' | translate}}

                    <input ng-model="identityProvider.config.hideOnLoginPage" name="identityProvider.config.hideOnLoginPage" id="hideOnLoginPage" onoffswitchvalue on-text="{{:: 'onText' | translate}}" off-text="{{:: 'offText' | translate}}" />

                <kc-tooltip>{{:: 'hide-on-login-page.tooltip' | translate}}</kc-tooltip>

                {{:: 'gui-order' | translate}}

                    <input class="form-control" id="guiOrder" type="text" ng-model="identityProvider.config.guiOrder">

                <kc-tooltip>{{:: 'gui-order.tooltip' | translate}}</kc-tooltip>

                {{:: 'first-broker-login-flow' | translate}}

                        <select class="form-control" id="firstBrokerLoginFlowAlias"
                                ng-model="identityProvider.firstBrokerLoginFlowAlias"
                                ng-options="flow.alias as flow.alias for flow in authFlows"
                                required>
                        </select>

                <kc-tooltip>{{:: 'first-broker-login-flow.tooltip' | translate}}</kc-tooltip>

                {{:: 'post-broker-login-flow' | translate}}

                        <select class="form-control" id="postBrokerLoginFlowAlias"
                                ng-model="identityProvider.postBrokerLoginFlowAlias"
                                ng-options="flow.alias as flow.alias for flow in postBrokerAuthFlows">
                        </select>

                <kc-tooltip>{{:: 'post-broker-login-flow.tooltip' | translate}}</kc-tooltip>

        </fieldset>

                <button kc-save data-ng-disabled="!changed">{{:: 'save' | translate}}</button>
                <button kc-cancel data-ng-click="cancel()" data-ng-disabled="!changed">{{:: 'cancel' | translate}}</button>

    </form>

<kc-menu></kc-menu>


text:
<?hh // strict

namespace tomzx\HackBot\Responders\Commands;

use tomzx\HackBot\Core\Dispatcher;
use tomzx\HackBot\Core\Responders\Command;

return [
	'type' => 'command',
	'identifier' => 'unalias',
	'command' => 'unalias',
	'parameters' => '(?<command>\S+)',
	'help' => 'command',
	'answer' => function (Dispatcher $dispatcher, array $data = [])
	{
		// TODO: Check if target command exist?
		$dataDirectory = 'data';
		$dataFile = $dataDirectory.'/alias.json';

		$command = $data['command'];

		$aliases = [];
		// TODO: Have a caching system so we don't read the file every time?
		if (file_exists($dataFile)) {
			$aliases = json_decode(file_get_contents($dataFile), true);
		}

		if ( ! array_key_exists($command, $aliases)) {
			return $command.' is not a know alias.';
		}

		unset($aliases[$command]);

		file_put_contents($dataFile, json_encode($aliases, JSON_PRETTY_PRINT));

		return 'Alias "'.$command.'" removed!';
	}
];


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

<title>Category (JUnit API)</title>
<meta name="date" content="2012-11-14">
<link rel="stylesheet" type="text/css" href="../../../../stylesheet.css" title="Style">

JavaScript is disabled on your browser.

Overview

Package

Class

Tree

Deprecated

Index

Help

Prev Class

Next Class

Frames

No Frames

All Classes

Summary:

Required |

Optional

Detail:

Element

org.junit.experimental.categories

Annotation Type Category

@Retention(value=RUNTIME)
public @interface Category

Marks a test class or test method as belonging to one or more categories of tests.
 The value is an array of arbitrary classes.

 This annotation is only interpreted by the Categories runner (at present).

 For example:

 public interface FastTests {}
 public interface SlowTests {}

 public static class A {
 @Test
 public void a() {
 fail();
 }

 @Category(SlowTests.class)
 @Test
 public void b() {
 }
 }

 @Category({SlowTests.class, FastTests.class})
 public static class B {
 @Test
 public void c() {

 }
 }

 For more usage, see code example on Categories.

Required Element Summary

Required Elements

Modifier and Type
Required Element and Description

Class<?>[]
value

Element Detail

value

public abstract Class<?>[] value

Overview

Package

Class

Tree

Deprecated

Index

Help

Prev Class

Next Class

Frames

No Frames

All Classes

Summary:

Required |

Optional

Detail:

Element


text:
using System;
using System.IO;
using System.Text;
using System.Threading.Tasks;
using Windows.Storage;
using Windows.Storage.Provider;
using Windows.UI.Popups;
using encryption_code_book.ViewModel;
using Newtonsoft.Json;

namespace encryption_code_book.Model
{
    public class KeySecret : NotifyProperty
    {
        public KeySecret()
        {
            AreNewEncrypt = true;
        }

        [JsonIgnore]
        public Account Account { set; get; }

        public KeySecret(Account account)
        {
            AreNewEncrypt = true;
            Account = account;
        }

        [JsonIgnore]
        public string Key
        {
            set
            {
                _key = value;
                OnPropertyChanged();
            }
            get
            {
                return _key;
            }
        }

        private string _key;
        [JsonIgnore]
        public bool AreNewEncrypt
        {
            set;
            get;
        }

        public string Name
        {
            set;
            get;
        }

        [JsonIgnore]
        public string ComfirmKey
        {
            set;
            get;
        }

        [JsonIgnore]
        public StorageFile File
        {
            set;
            get;
        }

        [JsonIgnore]
        public StorageFolder Folder { set; get; }

        public string Token
        {
            set;
            get;
        }

        public async Task Read()
        {
            if (Folder == null)
            {
                throw new FileNotFoundException();
            }
            var file = await Folder.GetFileAsync(Account.FacitFile);
            await Read(file);
        }

        public async Task Read(StorageFile file)
        {
            //读了确认
            try
            {
                CachedFileManager.DeferUpdates(file);
                using (Stream stream = await file.OpenStreamForReadAsync())
                {
                    var n = Account.ComfirmkeyLength;
                    byte[] buffer = new byte[n];
                    stream.Read(buffer, 0, n);
                    string comfirm = Account.Encod.GetString(buffer).Trim();
                    if (!comfirm.Equals(Account.Serializer()))
                    {
                        //以前版本
                        await (new MessageDialog("发现以前版本,请使用以前版本软件打开")).ShowAsync();
                    }

                    stream.Read(buffer, 0, n);
                    ComfirmKey = Account.Encod.GetString(buffer);
                }
                FileUpdateStatus updateStatus = await CachedFileManager.CompleteUpdatesAsync(file);
                if (updateStatus == FileUpdateStatus.Complete)
                {
                    File = file;
                    AreNewEncrypt = false;
                }
            }
            catch
            {

            }
        }

        public virtual async Task Storage()
        {
            string str = Account.Serializer().Trim();
            var n = Account.ComfirmkeyLength;
            var file = await Folder.CreateFileAsync(Account.FacitFile);
            byte[] buffer = new byte[n];

            using (Stream stream = await file.OpenStreamForWriteAsync())
            {
                Account.Encod.GetBytes(str).CopyTo(buffer, 0);
                stream.Write(buffer, 0, n);
                var key = new StringEncryption();
                ComfirmKey = key.Encryption(Key, Key);
                buffer = Account.Encod.GetBytes(str);
                stream.Write(buffer, 0, buffer.Length);

            }

        }
    }
}


text:
<?php

namespace Igorw\FileServeBundle\Response;

use Symfony\Component\HttpFoundation\Request;

class SendfileResponseFactoryTest extends \PHPUnit_Framework_TestCase
{
    /** @test */
    public function createShouldSetXAccelRedirectHeader()
    {
        $factory = new SendfileResponseFactory(__DIR__.'/../Fixtures', new Request());
        $response = $factory->create('internet.txt', 'application/zip');

        $this->assertSame(__DIR__.'/../Fixtures/internet.txt', $response->headers->get('X-Accel-Redirect'));
    }
}


text:
package com.rallydev.rest.response;

import com.google.gson.Gson;
import com.google.gson.JsonArray;
import com.google.gson.JsonObject;
import org.testng.Assert;
import org.testng.annotations.Test;

public class CollectionUpdateResponseTest {
    private CollectionUpdateResponse createResponse(String[] errors, JsonArray results) {
        return new CollectionUpdateResponse("{\"OperationResult\": { \"Errors\": " + new Gson().toJson(errors) + ", \"Warnings\": [], "  +
                "\"Results\": " + new Gson().toJson(results) + "}}");
    }

    @Test
    public void shouldReturnResults() {
        JsonArray results = new JsonArray();
        JsonObject r1 = new JsonObject();
        r1.addProperty("_ref", "/tag/12345");
        results.add(r1);
        JsonObject r2 = new JsonObject();
        r2.addProperty("_ref", "/tag/23456");
        results.add(r2);

        CollectionUpdateResponse r = createResponse(new String[]{}, results);

        Assert.assertEquals(r.getErrors().length, 0, "Error length correct");
        Assert.assertEquals(r.getResults().size(), 2, "Result length correct");
        Assert.assertEquals(r.getResults().get(0).getAsJsonObject().get("_ref").getAsString(), "/tag/12345", "First result correct");
        Assert.assertEquals(r.getResults().get(1).getAsJsonObject().get("_ref").getAsString(), "/tag/23456", "Second result correct");
        Assert.assertTrue(r.wasSuccessful());
    }

    @Test
    public void shouldReturnNoErrors() {
        CollectionUpdateResponse r = createResponse(new String[]{"Foo"}, new JsonArray());

        Assert.assertEquals(r.getErrors().length, 1, "Error length correct");
        Assert.assertEquals(r.getErrors()[0], "Foo");
        Assert.assertFalse(r.wasSuccessful());
        Assert.assertEquals(r.getResults().size(), 0);
    }
}


text:
'use strict'

const electron = require('electron')
const app = electron.app
const BrowserWindow = electron.BrowserWindow

// Prevent the window for being closed at JS garbage collection
// by keeping a reference in the global scope.
let mainWindow

const createWindow = () => {
    mainWindow = new BrowserWindow({ width: 320, height: 222 });
    mainWindow.loadURL('file://' + __dirname + '/gulped/index.html');

    // Emitted when the window is closed.
    mainWindow.on('closed', () => {
        // Dereference the window object, usually you would store windows
        // in an array if your app supports multi windows, this is the time
        // when you should delete the corresponding element.
        mainWindow = null;
    });

    // Open the DevTools.
    // mainWindow.webContents.openDevTools();
};

// Create window when electron is done initializating
app.on('ready', createWindow)

// Quit when all windows are closed.
app.on('window-all-closed', () => {
    // On OS X it is common for applications and their menu bar
    // to stay active until the user quits explicitly with Cmd + Q
    if (process.platform !== 'darwin') {
        app.quit()
    }
})

// For OS X: re-create window when dock icon is clicked and no windows are open
app.on('activate', () => {
    !mainWindow && createWindow()
})