text:
(function() {
    var customFieldsListTemplate, customFieldsTemplates;

    function getTemplates() {
        customFieldsListTemplate = _.template($('#customFieldsListTemplate').text());
        customFieldsTemplates = {
            picklist: _.template($('#customFieldsPicklistTemplate').text()),
            checkbox: _.template($('#customFieldsCheckboxTemplate').text()),
            textarea: _.template($('#customFieldsTextareaTemplate').text()),
            input: _.template($('#customFieldsInputTemplate').text()),
            upload: _.template($('#customFieldsUploadTemplate').text()),
            boolean: _.template($('#customFieldsBooleanTemplate').text())
        };
    }

    var CustomFieldsModule = function(opts)
    {
        this.options = opts || {};

        this.render = function(target) {
            if (!customFieldsListTemplate) {
                getTemplates();
            }

            var $el = target || this.options.el;
            $el = $el instanceof $ ? $el : $($el);
            var html = customFieldsListTemplate({
                fields: this.options.fields || {},
                values: this.options.values || {},
                textareas: this.options.textareas || {},
                folders: this.options.folders || {},
                folderOrder: this.options.folderOrder || null,
                pipelineFilters: this.options.pipelineFilters || {},
                item: this.options.item || {id: 0},
                itemType: this.options.itemType || '',
                fieldClass: this.options.fieldClass || '',
                templates: customFieldsTemplates,
                fieldFilter: _.isFunction(this.options.fieldFilter) ? this.options.fieldFilter : null
            });
            $el.html(html);

            $el.find('.datepicker').datepicker({
                dateFormat: "yy-mm-dd",
                onSelect: function(dateText, inst) { $(this).attr('value', dateText); }
            });

            $el.find('.datetimepicker').datetimepicker({
                onSelect: function(dateText, inst) { $(this).attr('value', dateText); },
                defaultTime: "00:00:00",
                format: "Y-m-d H:i:s"
            });
        };
    };

    // todo - proper module?
    window.CustomFieldsModule = CustomFieldsModule;
    return CustomFieldsModule;
})();


text:
package imanager.report;

import java.sql.*;
import java.util.*;

import imanager.misc.*;

import iobjects.*;
import iobjects.help.*;
import iobjects.report.*;
import iobjects.util.*;

/**
 * Representa o relatório de Ranking Atendimento Usuário.
 */
public class RelatorioRankingAtendimentoUsuario extends Report {

  // identificação da classe
  static public final String CLASS_NAME = "imanager.report.RelatorioRankingAtendimentoUsuario";
  // nossa ajuda extra
  static public final String HELP = "";
  // nossas ações
  static public final Action ACTION               = new Action("relatorioRankingAtendimentoUsuario", "Atendimento por Usuário", "Emite o relatório de Ranking Atendimento por Usuário.", HELP, "report/relatoriorankingatendimentousuario.jsp", "CRM", "Atendimento", Action.CATEGORY_REPORT, false, true);
  static public final Action ACTION_RELATORIO     = new Action("relatorioRankingAtendimentoUsuarioRelatorio", ACTION.getCaption(), ACTION.getDescription(), HELP, "report/relatoriorankingatendimentousuariorelatorio.jsp", ACTION.getModule(), ACTION.getAccessPath(), Action.CATEGORY_REPORT, ACTION.getMobile(), false);
  // nossos comandos
  static public final Command COMMAND_MAKE_REPORT = ACTION.addCommand(new Command(Command.COMMAND_MAKE_REPORT, "Gerar", "Gera e exibe o relatório com os parâmetros informados."));
  static public final Command COMMAND_PRINT       = ACTION.addCommand(new Command(Command.COMMAND_PRINT, "Imprimir", "Envia o relatório exibido."));
  static public final Command COMMAND_COPY        = ACTION.addCommand(new Command(Command.COMMAND_COPY, "Copiar", "Copia todo o conteúdo do relatório exibido."));
  // nossos parâmetros de usuário
  public final Param USER_PARAM_DEPARTAMENTO_ID = new Param("userParamDepartamentoId", "Departamento", "Selecione o Departamento.", "", 250, Param.ALIGN_LEFT, Param.FORMAT_INTEGER, "", "", "");
  public final Param USER_PARAM_CAMPANHA_ID     = new Param("userParamCampanhaId", "Campanha", "Selecione a Campanha.", "", 250, Param.ALIGN_LEFT, Param.FORMAT_INTEGER, "", "", "");
  public final Param USER_PARAM_DATA_INICIAL    = new Param("userParamDataInicial", "Data Incial", "Informe a Data Inicial.", "", 250, Param.ALIGN_LEFT, Param.FORMAT_DATE, "", "value != ''", "Obrigatório informar a Data Inicial.");
  public final Param USER_PARAM_DATA_FINAL      = new Param("userParamDataFinal", "Data Final", "Informe a Data Final.", "", 250, Param.ALIGN_LEFT, Param.FORMAT_DATE, "", "value != ''", "Obrigatório informar a Data Final.");
  public final Param USER_PARAM_CONSOLIDADO     = new Param("userParamConsolidado", "Consolidado", "Selecione se os dados serão consolidados entre todas empresas.", "");

  {
   // lookup
   USER_PARAM_CONSOLIDADO.setLookupList(NaoSim.LOOKUP_LIST_FOR_FIELD);
   // valores padrão
   USER_PARAM_DATA_INICIAL.setValue("01/" + NumberTools.completeZero(DateTools.getActualMonth(), 2) + "/" + DateTools.getActualYear());
   USER_PARAM_DATA_FINAL.setValue(DateTools.formatDate(DateTools.getActualDate()));
   //*
   USER_PARAM_DATA_FINAL.setSpecialConstraint(true, USER_PARAM_DATA_INICIAL);
  }

  /**
   * Construtor padrão.
   */
  public RelatorioRankingAtendimentoUsuario() {
    // nossas ações
    actionList().add(ACTION);
    actionList().add(ACTION_RELATORIO);
    // nossos parâmetros de usuário
    userParamList().add(USER_PARAM_DEPARTAMENTO_ID);
    userParamList().add(USER_PARAM_CAMPANHA_ID);
    userParamList().add(USER_PARAM_DATA_INICIAL);
    userParamList().add(USER_PARAM_DATA_FINAL);
    userParamList().add(USER_PARAM_CONSOLIDADO);
  }

  /**
   * Retorna o ResultSet de Ranking Atendimento Usuário.
   * Importante: a rotina que executar este método deve ser responsável por
   * fechar o ResultSet retornardo e o seu Statement.
   * @param empresaId int Empresa ID.
   * @param departamentoId int Departamento ID ou 0.
   * @param campanhaId int Campanha ID ou 0.
   * @param dataInicial Timestamp Data Inicial.
   * @param dataFinal Timestamp Data Final.
   * @param consolidado NaoSim.SIM para que a análise exibida seja consolidada.
   * @return ResultSet Retorna o ResultSet de Ranking Atendimento Usuário.
   *                   Importante: a rotina que executar este método deve ser
   *                   responsável por fechar o ResultSet retornardo e o seu
   *                   Statement.
   * @throws Exception Em caso de exceção na tentativa de acesso ao banco de
   *                   dados.
   */
  public ResultSet getResultSetRankingAtendimentoUsuario(
                       int empresaId,
                       int departamentoId,
                       int campanhaId,
                       Timestamp dataInicial,
                       Timestamp dataFinal,
                       int consolidado
                    ) throws Exception {
    // inicia transação
    getFacade().beginTransaction();
    try {
      // SQL
      String sql = "SELECT securityservice_usuario.va_nome as nome, count(crm_atendimento.in_usuario_inclusao_id) as total_atendimento "
                 + "FROM crm_atendimento "
                 + "INNER JOIN securityservice_usuario ON (securityservice_usuario.in_usuario_id = crm_atendimento.in_usuario_inclusao_id) "
                 + "WHERE ((crm_atendimento.in_empresa_id = ?) OR (" + (consolidado == NaoSim.SIM) + ")) "
                 + " AND ((crm_atendimento.in_departamento_id = ?) OR (" + departamentoId + " = 0 )) "
                 + " AND ((crm_atendimento.in_campanha_id = ?) OR (" + campanhaId + " = 0 )) "
                 + "  AND (crm_atendimento.dt_inicio >= ? "
                 + "  AND crm_atendimento.dt_inicio <= ?) "
                 + "GROUP BY securityservice_usuario.va_nome "
                 + "ORDER BY total_atendimento DESC, securityservice_usuario.va_nome ";
      // prepara a query
      PreparedStatement preparedStatement = prepare(sql);
      // preenche os parâmetros
      preparedStatement.setInt(1, empresaId);
      preparedStatement.setInt(2, departamentoId);
      preparedStatement.setInt(3, campanhaId);
      preparedStatement.setTimestamp(4, dataInicial);
      preparedStatement.setTimestamp(5, new Timestamp(DateTools.getCalculatedDays(dataFinal, 1).getTime()));
      // executa
      preparedStatement.execute();
      // salva tudo
      getFacade().commitTransaction();
      // retorna
      return preparedStatement.getResultSet();
    }
    catch (Exception e) {
      // desfaz tudo
      getFacade().rollbackTransaction();
      throw e;
    } // try-catch
  }

  /**
   * Retorna o ResultSet de Usuários.
   * Importante: a rotina que executar este método deve ser responsável por
   * fechar o ResultSet retornardo e o seu Statement.
   * @param empresaId int Empresa ID.
   * @param departamentoId int Departamento ID.
   * @param campanhaId int Campanha ID.
   * @param dataInicial Timestamp Data Inicial.
   * @param dataFinal Timestamp Data Final.
   * @param consolidado NaoSim.SIM para que a análise exibida seja consolidada
   * @return ResultSet Retorna o ResultSet de Usuários.
   *                   Importante: a rotina que executar este método deve ser
   *                   responsável por fechar o ResultSet retornardo e o seu
   *                   Statement.
   * @throws Exception Em caso de exceção na tentativa de acesso ao banco de
   *                   dados.
   */
  public ResultSet getResultSetUsuarios(
                       int empresaId,
                       int departamentoId,
                       int campanhaId,
                       Timestamp dataInicial,
                       Timestamp dataFinal,
                       int consolidado
                    ) throws Exception {
    // inicia transação
    getFacade().beginTransaction();
    try {
      // SQL
      String sql = "SELECT securityservice_usuario.va_nome as nome_usuario, crm_atendimento.in_atendimento_id, global_departamento.va_nome as nome_departamento, crm_assunto.va_nome as nome_assunto, crm_meio.va_nome as nome_meio, crm_campanha.va_nome as nome_campanha, relacionamento_contato.va_nome as nome_cliente, crm_atendimento.dt_inicio, crm_atendimento.dt_termino, crm_atendimento.in_empresa_id, crm_atendimento.va_descricao "
                 + "FROM crm_atendimento "
                 + "INNER JOIN securityservice_usuario ON (securityservice_usuario.in_usuario_id = crm_atendimento.in_usuario_inclusao_id) "
                 + "INNER JOIN global_departamento ON (global_departamento.in_empresa_id = crm_atendimento.in_empresa_id AND global_departamento.in_departamento_id = crm_atendimento.in_departamento_id) "
                 + "INNER JOIN crm_assunto ON (crm_assunto.in_assunto_id = crm_atendimento.in_assunto_id) "
                 + "INNER JOIN crm_meio ON (crm_meio.in_meio_id = crm_atendimento.in_meio_id) "
                 + "INNER JOIN crm_campanha ON (crm_campanha.in_campanha_id = crm_atendimento.in_campanha_id) "
                 + "INNER JOIN relacionamento_contato ON (relacionamento_contato.in_contato_id = crm_atendimento.in_cliente_id) "
                 + "WHERE ((crm_atendimento.in_empresa_id = ?)  OR (" + (consolidado == NaoSim.SIM) + ")) "
                 + " AND ((crm_atendimento.in_departamento_id = ?) OR (" + departamentoId + " = 0 )) "
                 + " AND ((crm_atendimento.in_campanha_id = ?) OR (" + campanhaId + " = 0 )) "
                 + "   AND (crm_atendimento.dt_inicio >= ? "
                 + "   AND crm_atendimento.dt_inicio <= ?) "
                 + "ORDER BY securityservice_usuario.va_nome, crm_atendimento.in_atendimento_id ";
      // prepara a query
      PreparedStatement preparedStatement = prepare(sql);
      // preenche os parâmetros
      preparedStatement.setInt(1, empresaId);
      preparedStatement.setInt(2, departamentoId);
      preparedStatement.setInt(3, campanhaId);
      preparedStatement.setTimestamp(4, dataInicial);
      preparedStatement.setTimestamp(5, new Timestamp(DateTools.getCalculatedDays(dataFinal, 1).getTime()));
      // executa
      preparedStatement.execute();
      // salva tudo
      getFacade().commitTransaction();
      // retorna
      return preparedStatement.getResultSet();
    }
    catch (Exception e) {
      // desfaz tudo
      getFacade().rollbackTransaction();
      throw e;
    } // try-catch
  }

}

redpajama_set_name: RedPajamaGithub


text:
package types

// DO NOT EDIT. THIS FILE WAS AUTOMATICALLY GENERATED

// SoftLayer_Software_Component_Package - This object specifies a specific type of Software Component:
// A package instance.
type SoftLayer_Software_Component_Package struct {
}

func (softlayer_software_component_package *SoftLayer_Software_Component_Package) String() string {
	return "SoftLayer_Software_Component_Package"
}


text:
package org.apache.flink.kubernetes.configuration;

import org.apache.flink.configuration.Configuration;
import org.apache.flink.configuration.DeploymentOptions;

import org.junit.Test;

import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertSame;
import static org.junit.Assert.assertTrue;

/**
 * Tests for the {@link KubernetesDeploymentTarget}.
 */
public class KubernetesDeploymentTargetTest {

	@Test
	public void testCorrectInstantiationFromConfiguration() {
		for (KubernetesDeploymentTarget t : KubernetesDeploymentTarget.values()) {
			testCorrectInstantiationFromConfigurationHelper(t);
		}
	}

	@Test(expected = IllegalArgumentException.class)
	public void testInvalidInstantiationFromConfiguration() {
		final Configuration configuration = getConfigurationWithTarget("invalid-target");
		KubernetesDeploymentTarget.fromConfig(configuration);
	}

	@Test(expected = IllegalArgumentException.class)
	public void testNullInstantiationFromConfiguration() {
		KubernetesDeploymentTarget.fromConfig(new Configuration());
	}

	@Test
	public void testThatAValidOptionIsValid() {
		assertTrue(KubernetesDeploymentTarget.isValidKubernetesTarget(KubernetesDeploymentTarget.APPLICATION.getName()));
	}

	@Test
	public void testThatAnInvalidOptionIsInvalid() {
		assertFalse(KubernetesDeploymentTarget.isValidKubernetesTarget("invalid-target"));
	}

	private void testCorrectInstantiationFromConfigurationHelper(final KubernetesDeploymentTarget expectedDeploymentTarget) {
		final Configuration configuration = getConfigurationWithTarget(expectedDeploymentTarget.getName().toUpperCase());
		final KubernetesDeploymentTarget actualDeploymentTarget = KubernetesDeploymentTarget.fromConfig(configuration);

		assertSame(actualDeploymentTarget, expectedDeploymentTarget);
	}

	private Configuration getConfigurationWithTarget(final String target) {
		final Configuration configuration = new Configuration();
		configuration.set(DeploymentOptions.TARGET,  target);
		return configuration;
	}
}


text:
using System;
using System.IO;
using System.Linq;
using System.Web;
using CodedViews.Base;
using CodedViews.Base.Html;
using CodedViews.Html.Constants;
using Uri = CodedViews.Html.SupportingTypes.Uri;

// ReSharper disable CheckNamespace

namespace CodedViews.Html.Elements
{
    // http://www.w3schools.com/tags/tag_a.asp
    public static partial class HtmlExtensions
    {
        private static readonly string[] AllowedAudioExtensions = { "mp3", "ogg", "wav" };

        /// <summary>
        /// The <c><audio></c> tag defines sound, such as music or other audio streams.
        /// Currently, there are 3 supported file formats for the <c><audio></c> element: MP3, Wav, and Ogg:<remarks> </remarks>
        ///
        /// For more information see: <see cref="http://www.w3schools.com/tags/tag_audio.asp"/>
        /// </summary>
        /// <param name="builder">Builder for the Html Component</param>
        /// <param name="attributes">Standard HTML Attributes (optional)</param>
        /// <returns></returns>
        public static IHtmlElement AudioElement(IBuilder builder, IHtmlAttributes attributes = null)
        {
            return builder.CreateElement("a", false, attributes);
        }

        /// <summary>
        /// The <c><audio></c> tag defines sound, such as music or other audio streams.
        /// Currently, there are 3 supported file formats for the <c><audio></c> element: MP3, Wav, and Ogg:<remarks> </remarks>
        ///
        /// For more information see: <see cref="http://www.w3schools.com/tags/tag_audio.asp"/>
        /// </summary>
        /// <param name="builder">Builder for the Html Component</param>
        /// <param name="source">The URI pointing to the audio source<c> [src]</c></param>
        /// <param name="mimeType">
        ///     The MimeType of the audioFile<c> [type]</c> (Optional) <remarks></remarks>
        ///     If left blank the mimetype will be resolved by the file extension
        /// </param>
        /// <param name="autoplay">Specifies that the audio will start playing as soon as it is ready (optional)</param>
        /// <param name="controls">Specifies that audio controls should be displayed (such as a play/pause button etc) (optional)</param>
        /// <param name="loop">Specifies that the audio will start over again, every time it is finished (optional)</param>
        /// <param name="muted">Specifies that the audio output should be muted (optional)</param>
        /// <param name="preload">Specifies if and how the author thinks the audio should be loaded when the page loads<c> [auto|metadata|none]</c> (optional)</param>
        /// <param name="attributes">Standard HTML Attributes (optional)</param>
        /// <returns></returns>
        public static IHtmlElement Audio(this IBuilder builder,
            Uri source,
            string mimeType = null,
            bool? autoplay = null,
            bool? controls = null,
            bool? loop = null,
            bool? muted = null,
            MediaPreloadType preload = null,
            IHtmlAttributes attributes = null)
        {
            mimeType = CheckFileExtension(source, mimeType);
            var newAttributes = attributes ?? new HtmlAttributes();
            newAttributes.Add("href", source.ToString());
            newAttributes.Add("type", mimeType);
            if(autoplay.HasValue) newAttributes.Add("autoplay", nameof(autoplay));
            if(controls.HasValue) newAttributes.Add("controls", nameof(autoplay));
            if(loop.HasValue) newAttributes.Add("loop", nameof(loop));
            if(muted.HasValue) newAttributes.Add("muted", nameof(muted));
            if(preload != null) newAttributes.Add("preload", preload.ToString());
            return AudioElement(builder, newAttributes);
        }

        /// <summary>
        /// Check wether the file extension is correct
        /// </summary>
        /// <param name="source">The URI pointing to the audio source<c> [src]</c></param>
        /// <param name="mimeType">
        ///     The MimeType of the audioFile<c> [type]</c> (Optional) <remarks></remarks>
        ///     If left blank the mimetype will be resolved by the file extension
        /// </param>
        /// <returns></returns>
        private static string CheckFileExtension(Uri source, string mimeType)
        {
            var fileExtension = !Path.HasExtension(source.ToString())
                ? null
                : Path.GetExtension(source.ToString()).ToLowerInvariant();
            if (fileExtension != null)
            {
                if (!AllowedAudioExtensions.Contains(fileExtension))
                    throw new ArgumentException(
                        $"The extension '{fileExtension}' is not allowed, " +
                        $"the audio element currently supports: [{String.Join("|", AllowedAudioExtensions)}]",
                        nameof(fileExtension));
                mimeType = mimeType ?? MimeMapping.GetMimeMapping(source.ToString());
            }
            return mimeType;
        }
    }
}


text:
require 'grpc'
require 'google/cloud/oslogin/v1beta/oslogin_pb'

module Google
  module Cloud
    module OsLogin
      module V1beta
        module OsLoginService
          # Cloud OS Login API
          #
          # The Cloud OS Login API allows you to manage users and their associated SSH
          # public keys for logging into virtual machines on Google Cloud Platform.
          class Service

            include ::GRPC::GenericService

            self.marshal_class_method = :encode
            self.unmarshal_class_method = :decode
            self.service_name = 'google.cloud.oslogin.v1beta.OsLoginService'

            # Create an SSH public key
            rpc :CreateSshPublicKey, ::Google::Cloud::OsLogin::V1beta::CreateSshPublicKeyRequest, ::Google::Cloud::OsLogin::Common::SshPublicKey
            # Deletes a POSIX account.
            rpc :DeletePosixAccount, ::Google::Cloud::OsLogin::V1beta::DeletePosixAccountRequest, ::Google::Protobuf::Empty
            # Deletes an SSH public key.
            rpc :DeleteSshPublicKey, ::Google::Cloud::OsLogin::V1beta::DeleteSshPublicKeyRequest, ::Google::Protobuf::Empty
            # Retrieves the profile information used for logging in to a virtual machine
            # on Google Compute Engine.
            rpc :GetLoginProfile, ::Google::Cloud::OsLogin::V1beta::GetLoginProfileRequest, ::Google::Cloud::OsLogin::V1beta::LoginProfile
            # Retrieves an SSH public key.
            rpc :GetSshPublicKey, ::Google::Cloud::OsLogin::V1beta::GetSshPublicKeyRequest, ::Google::Cloud::OsLogin::Common::SshPublicKey
            # Adds an SSH public key and returns the profile information. Default POSIX
            # account information is set when no username and UID exist as part of the
            # login profile.
            rpc :ImportSshPublicKey, ::Google::Cloud::OsLogin::V1beta::ImportSshPublicKeyRequest, ::Google::Cloud::OsLogin::V1beta::ImportSshPublicKeyResponse
            # Updates an SSH public key and returns the profile information. This method
            # supports patch semantics.
            rpc :UpdateSshPublicKey, ::Google::Cloud::OsLogin::V1beta::UpdateSshPublicKeyRequest, ::Google::Cloud::OsLogin::Common::SshPublicKey
          end

          Stub = Service.rpc_stub_class
        end
      end
    end
  end
end


text:
layout: page
title: Harry Herman's 79th Birthday
date: 2016-05-24
author: Evelyn Lam
tags: weekly links, java
status: published
summary: Donec mattis tellus nunc, id malesuada tellus.
banner: images/banner/wedding.jpg
booking:
  startDate: 03/25/2018
  endDate: 03/29/2018
  ctyhocn: DVKKYHX
  groupCode: HH7B
published: true
---
Duis vel quam aliquet odio congue tincidunt id in felis. Nullam eget lorem ac nisl mattis faucibus. Nulla sit amet leo at risus porta fringilla et sit amet elit. Aenean semper nisi eu tempor venenatis. Vestibulum aliquam condimentum sodales. Nam fringilla metus eget cursus imperdiet. Donec sed auctor orci. Fusce mi lorem, cursus ac nisl sed, eleifend vehicula felis. Quisque semper vestibulum laoreet. Praesent posuere quis dolor non hendrerit. Maecenas nec arcu sed erat viverra posuere id a felis. Vivamus eget nisl vitae lorem placerat facilisis nec imperdiet ligula. Donec malesuada posuere turpis, sit amet volutpat risus tempor in.

* Nullam cursus nunc ac elementum faucibus
* Fusce eu libero eget mi aliquam tristique
* Aliquam aliquet nisl sit amet erat luctus mollis
* Fusce molestie libero vitae elit pellentesque, id ornare leo dapibus.

Integer ac tellus nec lacus consectetur tristique. Cras rutrum interdum justo nec placerat. In vel erat viverra, dapibus elit dictum, dapibus massa. Nulla commodo, lectus vitae accumsan aliquam, orci risus aliquam ante, id viverra mauris augue sit amet tellus. Nulla lorem nibh, iaculis et dolor nec, euismod efficitur magna. Quisque blandit, lectus eu ultricies semper, enim odio tincidunt sapien, id condimentum leo dolor vel mauris. Sed orci dui, mattis nec fringilla nec, tincidunt volutpat est.


text:
#ifndef __igtlI420Decoder_h
#define __igtlI420Decoder_h

#include "igtl_types.h"
#include "igtlVideoMessage.h"
#include "igtlCodecCommonClasses.h"

namespace igtl {

#define NO_DELAY_DECODING
  class IGTLCommon_EXPORT I420Decoder :public GenericDecoder
  {
  public:
    igtlTypeMacro(I420Decoder, GenericDecoder);
    igtlNewMacro(I420Decoder);

    I420Decoder();
    ~I420Decoder();

    int DecodeBitStreamIntoFrame(unsigned char* bitStream, igtl_uint8* outputFrame, igtl_uint32 iDimensions[2], igtl_uint64 &iStreamSize) override { return -1; };
    int DecodeVideoMSGIntoSingleFrame(igtl::VideoMessage* videoMessage, SourcePicture* pDecodedPic) override;

  };

} // namespace igtl

#endif


text:
package com.zfxf.douniu.bean;

import java.util.List;

/**
 * @author Admin
 * @time 2017/4/7 9:44
 * @des ${TODO}
 */

public class XuanguHistoryDetail {
    public String date;//时间
    public List<XuanguGupiaoDetail> list;
}


text:
package fr.esir.nsoc.tsen.ade.object;

public class Project {

	private int id;
	private String name;

	public Project(int id, String name) {
		super();
		this.id = id;
		this.name = name;
	}

	public int getId() {
		return id;
	}
	public String getName() {
		return name;
	}

}


text:
package recipes

import (
	"context"
	"fmt"
	"io/ioutil"
	"os"
	"path/filepath"
	"time"

	"github.com/GoogleCloudPlatform/osconfig/clog"

	agentendpointpb "google.golang.org/genproto/googleapis/cloud/osconfig/agentendpoint/v1beta"
)

// InstallRecipe installs a recipe.
func InstallRecipe(ctx context.Context, recipe *agentendpointpb.SoftwareRecipe) error {
	ctx = clog.WithLabels(ctx, map[string]string{"recipe_name": recipe.GetName()})
	steps := recipe.InstallSteps
	recipeDB, err := newRecipeDB()
	if err != nil {
		return err
	}
	installedRecipe, ok := recipeDB.getRecipe(recipe.Name)
	if ok {
		clog.Debugf(ctx, "Currently installed version of software recipe %s with version %s.", recipe.GetName(), installedRecipe.Version)
		if (installedRecipe.compare(recipe.Version)) && (recipe.DesiredState == agentendpointpb.DesiredState_UPDATED) {
			clog.Infof(ctx, "Upgrading software recipe %s from version %s to %s.", recipe.Name, installedRecipe.Version, recipe.GetVersion())
			steps = recipe.UpdateSteps
		} else {
			clog.Debugf(ctx, "Skipping software recipe %s.", recipe.GetName())
			return nil
		}
	} else {
		clog.Infof(ctx, "Installing software recipe %s.", recipe.GetName())
	}

	clog.Debugf(ctx, "Creating working directory for recipe %s.", recipe.GetName())
	runID := fmt.Sprintf("run_%d", time.Now().UnixNano())
	runDir, err := createBaseDir(recipe, runID)
	if err != nil {
		return fmt.Errorf("failed to create base directory: %v", err)
	}
	defer func() {
		if err := os.RemoveAll(runDir); err != nil {
			clog.Warningf(ctx, "Failed to remove recipe working directory at %q: %v", runDir, err)
		}
	}()
	artifacts, err := fetchArtifacts(ctx, recipe.Artifacts, runDir)
	if err != nil {
		return fmt.Errorf("failed to obtain artifacts: %v", err)
	}

	runEnvs := []string{
		fmt.Sprintf("RECIPE_NAME=%s", recipe.Name),
		fmt.Sprintf("RECIPE_VERSION=%s", recipe.Version),
		fmt.Sprintf("RUNID=%s", runID),
	}
	for artifactID, artifactPath := range artifacts {
		runEnvs = append(runEnvs, fmt.Sprintf("%s=%s", artifactID, artifactPath))
	}

	for i, step := range steps {
		clog.Debugf(ctx, "Running step %d: %q", i, step)
		stepDir := filepath.Join(runDir, fmt.Sprintf("step%02d", i))
		if err := os.MkdirAll(stepDir, 0755); err != nil {
			return fmt.Errorf("failed to create recipe step dir %q: %s", stepDir, err)
		}

		var err error
		var stepType string
		switch {
		case step.GetFileCopy() != nil:
			stepType = "CopyFile"
			err = stepCopyFile(step.GetFileCopy(), artifacts, runEnvs, stepDir)
		case step.GetArchiveExtraction() != nil:
			stepType = "ExtractArchive"
			err = stepExtractArchive(ctx, step.GetArchiveExtraction(), artifacts, runEnvs, stepDir)
		case step.GetMsiInstallation() != nil:
			stepType = "InstallMsi"
			err = stepInstallMsi(ctx, step.GetMsiInstallation(), artifacts, runEnvs, stepDir)
		case step.GetFileExec() != nil:
			stepType = "ExecFile"
			err = stepExecFile(ctx, step.GetFileExec(), artifacts, runEnvs, stepDir)
		case step.GetScriptRun() != nil:
			stepType = "RunScript"
			err = stepRunScript(ctx, step.GetScriptRun(), artifacts, runEnvs, stepDir)
		case step.GetDpkgInstallation() != nil:
			stepType = "InstallDpkg"
			err = stepInstallDpkg(ctx, step.GetDpkgInstallation(), artifacts)
		case step.GetRpmInstallation() != nil:
			stepType = "InstallRpm"
			err = stepInstallRpm(ctx, step.GetRpmInstallation(), artifacts)
		}
		if err != nil {
			recipeDB.addRecipe(recipe.Name, recipe.Version, false)
			if stepType == "" {
				return fmt.Errorf("unknown step type for step %d", i)
			}
			return fmt.Errorf("error running step %d (%s): %v", i, stepType, err)
		}
	}

	clog.Infof(ctx, "All steps completed successfully, marking recipe %s as installed.", recipe.Name)
	return recipeDB.addRecipe(recipe.Name, recipe.Version, true)
}

func createBaseDir(recipe *agentendpointpb.SoftwareRecipe, runID string) (string, error) {
	name := recipe.Name
	if recipe.Version != "" {
		name = fmt.Sprintf("%s_%s", name, recipe.Version)
	}

	dir, err := ioutil.TempDir("", fmt.Sprintf("%s_%s_", name, runID))
	if err != nil {
		return "", fmt.Errorf("failed to create working dir for recipe: %q %s", recipe.Name, err)
	}

	return dir, nil
}


text:
using UnityEngine;

public class PlayerState_Live : EntityState_Live
{
    private Player m_player;

    private readonly float m_timeBetweenAttack = 1.0f;
    private float m_timeRemainingForNextAttack;

    public PlayerState_Live(StateMachine psm)
        : base(psm)
    {
    }

    public override void Constructor()
    {
        base.Constructor();
        m_player = FSM.MonoBehaviour as Player;
    }

    public override void Destructor()
    {
        base.Destructor();
    }

    public override void Update()
    {
        m_player.BeforeInputPos = m_player.transform.position;
        m_player.AfterInputPos = m_player.BeforeInputPos;

        if (m_player.HealthComponent.Health <= 0)
        {
            SwitchState<PlayerState_Dead>();
            GameManager.Instance.OnMainPlayerDead();
            return;
        }

        m_timeRemainingForNextAttack -= TimeManager.Dt;

        // Compute actual Player speed
        float speed = m_player.PlayerSpeed;

        TileInfo tileInfo = GameManager.Instance.GetTileFromWorldPos(m_player.transform.position);
        TileProperties tileProperties = TileMapping.Instance.GetTileProperties(tileInfo.Tile);

        if (tileProperties != null)
        {
            speed *= tileProperties.SpeedFactor;
        }

        Vector3 direction = Vector3.zero;
        if (Input.GetKey(KeyCode.UpArrow) || Input.GetKey(KeyCode.W))
            direction.y = speed;
        else if (Input.GetKey(KeyCode.DownArrow) || Input.GetKey(KeyCode.S))
            direction.y = -speed;

        if (Input.GetKey(KeyCode.LeftArrow) || Input.GetKey(KeyCode.A))
            direction.x = -speed;
        else if (Input.GetKey(KeyCode.RightArrow) || Input.GetKey(KeyCode.D))
            direction.x = speed;

        direction *= TimeManager.Dt;

        m_player.transform.position = m_player.BeforeInputPos + (Vector2) direction;

        HandleAutoAttack();

        base.Update();

        m_player.AfterInputPos = m_player.transform.position;
    }

    private void HandleAutoAttack()
    {
        // Enable auto-attack
        if (m_timeRemainingForNextAttack <= 0.0f && EntityManager.Instance.Count<SwordAttack>() == 0)
        {
            Enemy closest = null;
            float closestSqrDistance = float.MaxValue;
            foreach (Entity e in EntityManager.Instance.Entities)
            {
                Enemy candidate = e as Enemy;
                if (candidate == null)
                    continue;

                float sqrDistance = (candidate.transform.position - m_player.transform.position).sqrMagnitude;
                if (sqrDistance < closestSqrDistance)
                {
                    closest = candidate;
                    closestSqrDistance = sqrDistance;
                }
            }

            if (closest != null && closestSqrDistance <= 4.0f * 4.0f)
            {
                m_player.SpawnAttackToward(m_player.transform.position, closest.transform.position);
                m_timeRemainingForNextAttack = m_timeBetweenAttack;
            }
        }
    }
}


text:
/* ** GENEREATED FILE - DO NOT MODIFY ** */
package com.wilutions.mslib.uccollaborationlib.impl;
import com.wilutions.com.*;

@SuppressWarnings("all")
@CoClass(guid="{605470D1-6241-9EE3-0243-45818AC8B460}")
public class IRoomMessageImpl extends Dispatch implements com.wilutions.mslib.uccollaborationlib.IRoomMessage {
  @DeclDISPID(1610743808)  public Integer getId() throws ComException {
    final Object obj = this._dispatchCall(1610743808,"Id", DISPATCH_PROPERTYGET,null);
    if (obj == null) return null;
    return (Integer)obj;
  }
  @DeclDISPID(1610743809)  public com.wilutions.mslib.uccollaborationlib.IRoomMessageDictionary getMessageDictionary() throws ComException {
    final Object obj = this._dispatchCall(1610743809,"MessageDictionary", DISPATCH_PROPERTYGET,null);
    if (obj == null) return null;
    return Dispatch.as(obj, com.wilutions.mslib.uccollaborationlib.impl.IRoomMessageDictionaryImpl.class);
  }
  @DeclDISPID(1610743810)  public java.util.Date getSentTime() throws ComException {
    final Object obj = this._dispatchCall(1610743810,"SentTime", DISPATCH_PROPERTYGET,null);
    if (obj == null) return null;
    return (java.util.Date)obj;
  }
  @DeclDISPID(1610743811)  public String getSenderUri() throws ComException {
    final Object obj = this._dispatchCall(1610743811,"SenderUri", DISPATCH_PROPERTYGET,null);
    if (obj == null) return null;
    return (String)obj;
  }
  @DeclDISPID(1610743812)  public String getRoomUri() throws ComException {
    final Object obj = this._dispatchCall(1610743812,"RoomUri", DISPATCH_PROPERTYGET,null);
    if (obj == null) return null;
    return (String)obj;
  }
  public IRoomMessageImpl(String progId) throws ComException {
    super(progId, "{A0C3E9BA-C622-45A2-9FED-2C662F3F489A}");
  }
  protected IRoomMessageImpl(long ndisp) {
    super(ndisp);
  }
  public String toString() {
    return "[IRoomMessageImpl" + super.toString() + "]";
  }
}


text:
<?php

namespace AMQPAL\Adapter\AMQP\Options;

class ConnectionOptionsTest extends \PHPUnit_Framework_TestCase
{
    public function testGetterAndSetter()
    {
        $configuration = [
            'host' => 'test-host',
            'port' => 1234,
            'username' => 'test-username',
            'password' => 'test-password',
            'vhost' => 'test-vhost',
            'read_timeout' => 12,
            'write_timeout' => 13,
            'connect_timeout' => 432,
            'heartbeat' => 234,
            'channel_max' => 16,
            'frame_max' => 16,
            'persistent' => true,
        ];

        $options = new ConnectionOptions();
        $options->setFromArray($configuration);

        static::assertEquals($configuration['host'], $options->getHost());
        static::assertEquals($configuration['port'], $options->getPort());
        static::assertEquals($configuration['username'], $options->getUsername());
        static::assertEquals($configuration['password'], $options->getPassword());
        static::assertEquals($configuration['vhost'], $options->getVhost());
        static::assertEquals($configuration['read_timeout'], $options->getReadTimeout());
        static::assertEquals($configuration['write_timeout'], $options->getWriteTimeout());
        static::assertEquals($configuration['heartbeat'], $options->getHeartbeat());
        static::assertEquals($configuration['connect_timeout'], $options->getConnectTimeout());
        static::assertEquals($configuration['channel_max'], $options->getChannelMax());
        static::assertEquals($configuration['frame_max'], $options->getFrameMax());
        static::assertEquals($configuration['persistent'], $options->isPersistent());
    }
}


text:
import sys,os

hashMap = dict()

for line in sys.stdin:

    data = line.split("\t")
    tableName = data[0]
    columnName = data[1].rstrip('\n')

    if tableName == "TABLE_NAME":
        continue

    if tableName in hashMap:
        hashMap[tableName] = hashMap[tableName] + [columnName]
    else:
        hashMap[tableName] = [columnName]

for key in hashMap.keys():
    printString = ""
    currList = hashMap[key]

    for index,colName in enumerate(currList):
        printString += colName
        if index < len(currList)-1:
            printString += ", "

    print(key + "(" + printString + ")")
    print("")
    print("")


text:
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
    <modelVersion>4.0.0</modelVersion>

    <parent>
        <artifactId>quarkus-extensions-parent</artifactId>
        <groupId>io.quarkus</groupId>
        <version>999-SNAPSHOT</version>
        <relativePath>../pom.xml</relativePath>
    </parent>

    <artifactId>quarkus-redis-client-parent</artifactId>
    <packaging>pom</packaging>

    <name>Quarkus - Redis Client</name>

    <modules>
        <module>deployment</module>
        <module>runtime</module>
    </modules>

</project>


text:
/*!
 * \file   scoped_enum_compile_fail_conv_to_int.cpp
 * \author Andrey Semashev
 * \date   06.06.2014
 *
 * \brief  This test checks that scoped enum emulation prohibits implicit conversions to int
 */

#include <boost/core/scoped_enum.hpp>

BOOST_SCOPED_ENUM_DECLARE_BEGIN(color)
{
    red,
    green,
    blue
}
BOOST_SCOPED_ENUM_DECLARE_END(color)

int main(int, char*[])
{
    color col = color::red;
    int n = col;

    return n;
}


text:
// flowlint ambiguous-object-type:error

'use strict';

const RelayFeatureFlags = require('../util/RelayFeatureFlags');

const areEqual = require('areEqual');
const invariant = require('invariant');
const isScalarAndEqual = require('../util/isScalarAndEqual');
const reportMissingRequiredFields = require('../util/reportMissingRequiredFields');
const warning = require('warning');

const {getPromiseForActiveRequest} = require('../query/fetchQueryInternal');
const {createRequestDescriptor} = require('./RelayModernOperationDescriptor');
const {
  areEqualSelectors,
  createReaderSelector,
  getSelectorsFromObject,
} = require('./RelayModernSelector');

import type {ConcreteRequest} from '../util/RelayConcreteNode';
import type {Disposable, Variables} from '../util/RelayRuntimeTypes';
import type {
  IEnvironment,
  FragmentMap,
  FragmentSpecResolver,
  FragmentSpecResults,
  MissingRequiredFields,
  PluralReaderSelector,
  RelayContext,
  SelectorData,
  SingularReaderSelector,
  Snapshot,
} from './RelayStoreTypes';

type Props = {[key: string]: mixed, ...};
type Resolvers = {
  [key: string]: ?(SelectorListResolver | SelectorResolver),
  ...,
};

/**
 * A utility for resolving and subscribing to the results of a fragment spec
 * (key -> fragment mapping) given some "props" that determine the root ID
 * and variables to use when reading each fragment. When props are changed via
 * `setProps()`, the resolver will update its results and subscriptions
 * accordingly. Internally, the resolver:
 * - Converts the fragment map & props map into a map of `Selector`s.
 * - Removes any resolvers for any props that became null.
 * - Creates resolvers for any props that became non-null.
 * - Updates resolvers with the latest props.
 *
 * This utility is implemented as an imperative, stateful API for performance
 * reasons: reusing previous resolvers, callback functions, and subscriptions
 * all helps to reduce object allocation and thereby decrease GC time.
 *
 * The `resolve()` function is also lazy and memoized: changes in the store mark
 * the resolver as stale and notify the caller, and the actual results are
 * recomputed the first time `resolve()` is called.
 */
class RelayModernFragmentSpecResolver implements FragmentSpecResolver {
  _callback: ?() => void;
  _context: RelayContext;
  _rootIsQueryRenderer: boolean;
  _data: Object;
  _fragments: FragmentMap;
  _props: Props;
  _resolvers: Resolvers;
  _stale: boolean;

  constructor(
    context: RelayContext,
    fragments: FragmentMap,
    props: Props,
    callback?: () => void,
    rootIsQueryRenderer: boolean,
  ) {
    this._callback = callback;
    this._context = context;
    this._data = {};
    this._fragments = fragments;
    this._props = {};
    this._resolvers = {};
    this._stale = false;
    this._rootIsQueryRenderer = rootIsQueryRenderer;

    this.setProps(props);
  }

  dispose(): void {
    for (const key in this._resolvers) {
      if (this._resolvers.hasOwnProperty(key)) {
        disposeCallback(this._resolvers[key]);
      }
    }
  }

  resolve(): FragmentSpecResults {
    if (this._stale) {
      // Avoid mapping the object multiple times, which could occur if data for
      // multiple keys changes in the same event loop.
      const prevData = this._data;
      let nextData;
      for (const key in this._resolvers) {
        if (this._resolvers.hasOwnProperty(key)) {
          const resolver = this._resolvers[key];
          const prevItem = prevData[key];
          if (resolver) {
            const nextItem = resolver.resolve();
            if (nextData || nextItem !== prevItem) {
              nextData = nextData || {...prevData};
              nextData[key] = nextItem;
            }
          } else {
            const prop = this._props[key];
            const nextItem = prop !== undefined ? prop : null;
            if (nextData || !isScalarAndEqual(nextItem, prevItem)) {
              nextData = nextData || {...prevData};
              nextData[key] = nextItem;
            }
          }
        }
      }
      this._data = nextData || prevData;
      this._stale = false;
    }
    return this._data;
  }

  setCallback(callback: () => void): void {
    this._callback = callback;
  }

  setProps(props: Props): void {
    const ownedSelectors = getSelectorsFromObject(this._fragments, props);
    this._props = {};

    for (const key in ownedSelectors) {
      if (ownedSelectors.hasOwnProperty(key)) {
        const ownedSelector = ownedSelectors[key];
        let resolver = this._resolvers[key];
        if (ownedSelector == null) {
          if (resolver != null) {
            resolver.dispose();
          }
          resolver = null;
        } else if (ownedSelector.kind === 'PluralReaderSelector') {
          if (resolver == null) {
            resolver = new SelectorListResolver(
              this._context.environment,
              this._rootIsQueryRenderer,
              ownedSelector,
              this._onChange,
            );
          } else {
            invariant(
              resolver instanceof SelectorListResolver,
              'RelayModernFragmentSpecResolver: Expected prop `%s` to always be an array.',
              key,
            );
            resolver.setSelector(ownedSelector);
          }
        } else {
          if (resolver == null) {
            resolver = new SelectorResolver(
              this._context.environment,
              this._rootIsQueryRenderer,
              ownedSelector,
              this._onChange,
            );
          } else {
            invariant(
              resolver instanceof SelectorResolver,
              'RelayModernFragmentSpecResolver: Expected prop `%s` to always be an object.',
              key,
            );
            resolver.setSelector(ownedSelector);
          }
        }
        this._props[key] = props[key];
        this._resolvers[key] = resolver;
      }
    }
    this._stale = true;
  }

  setVariables(variables: Variables, request: ConcreteRequest): void {
    for (const key in this._resolvers) {
      if (this._resolvers.hasOwnProperty(key)) {
        const resolver = this._resolvers[key];
        if (resolver) {
          resolver.setVariables(variables, request);
        }
      }
    }
    this._stale = true;
  }

  _onChange = (): void => {
    this._stale = true;

    if (typeof this._callback === 'function') {
      this._callback();
    }
  };
}

/**
 * A resolver for a single Selector.
 */
class SelectorResolver {
  _callback: () => void;
  _data: ?SelectorData;
  _environment: IEnvironment;
  _isMissingData: boolean;
  _missingRequiredFields: ?MissingRequiredFields;
  _rootIsQueryRenderer: boolean;
  _selector: SingularReaderSelector;
  _subscription: ?Disposable;

  constructor(
    environment: IEnvironment,
    rootIsQueryRenderer: boolean,
    selector: SingularReaderSelector,
    callback: () => void,
  ) {
    const snapshot = environment.lookup(selector);
    this._callback = callback;
    this._data = snapshot.data;
    this._isMissingData = snapshot.isMissingData;
    this._missingRequiredFields = snapshot.missingRequiredFields;
    this._environment = environment;
    this._rootIsQueryRenderer = rootIsQueryRenderer;
    this._selector = selector;
    this._subscription = environment.subscribe(snapshot, this._onChange);
  }

  dispose(): void {
    if (this._subscription) {
      this._subscription.dispose();
      this._subscription = null;
    }
  }

  resolve(): ?Object {
    if (
      RelayFeatureFlags.ENABLE_RELAY_CONTAINERS_SUSPENSE === true &&
      this._isMissingData === true
    ) {
      // NOTE: This branch exists to handle the case in which:
      // - A RelayModern container is rendered as a descendant of a Relay Hook
      //   root using a "partial" renderPolicy (this means that eargerly
      //   reading any cached data that is available instead of blocking
      //   at the root until the whole query is fetched).
      // - A parent Relay Hook didnt' suspend earlier on data being fetched,
      //   either because the fragment data for the parent was available, or
      //   the parent fragment didn't have any data dependencies.
      // Even though our Flow types reflect the possiblity of null data, there
      // might still be cases where it's not handled at runtime becuase the
      // Flow types are being ignored, or simply not being used (for example,
      // the case reported here: https://fburl.com/srnbucf8, was due to
      // misuse of Flow types here: https://fburl.com/g3m0mqqh).
      // Additionally, even though the null data might be handled without a
      // runtime error, we might not suspend when we intended to if a parent
      // Relay Hook (e.g. that is using @defer) decided not to suspend becuase
      // it's immediate data was already available (even if it was deferred),
      // or it didn't actually need any data (was just spreading other fragments).
      // This should eventually go away with something like @optional, where we only
      // suspend at specific boundaries depending on whether the boundary
      // can be fulfilled or not.
      const promise =
        getPromiseForActiveRequest(this._environment, this._selector.owner) ??
        this._environment
          .getOperationTracker()
          .getPromiseForPendingOperationsAffectingOwner(this._selector.owner);
      if (promise != null) {
        if (this._rootIsQueryRenderer) {
          warning(
            false,
            'Relay: Relay Container for fragment `%s` has missing data and ' +
              'would suspend. When using features such as @defer or @module, ' +
              'use `useFragment` instead of a Relay Container.',
            this._selector.node.name,
          );
        } else {
          warning(
            false,
            'Relay: Relay Container for fragment `%s` suspended. When using ' +
              'features such as @defer or @module, use `useFragment` instead ' +
              'of a Relay Container.',
            this._selector.node.name,
          );
          throw promise;
        }
      }
    }
    if (this._missingRequiredFields != null) {
      reportMissingRequiredFields(
        this._environment,
        this._missingRequiredFields,
      );
    }
    return this._data;
  }

  setSelector(selector: SingularReaderSelector): void {
    if (
      this._subscription != null &&
      areEqualSelectors(selector, this._selector)
    ) {
      return;
    }
    this.dispose();
    const snapshot = this._environment.lookup(selector);
    this._data = snapshot.data;
    this._isMissingData = snapshot.isMissingData;
    this._missingRequiredFields = snapshot.missingRequiredFields;
    this._selector = selector;
    this._subscription = this._environment.subscribe(snapshot, this._onChange);
  }

  setVariables(variables: Variables, request: ConcreteRequest): void {
    if (areEqual(variables, this._selector.variables)) {
      // If we're not actually setting new variables, we don't actually want
      // to create a new fragment owner, since areEqualSelectors relies on
      // owner identity.
      // In fact, we don't even need to try to attempt to set a new selector.
      // When fragment ownership is not enabled, setSelector will also bail
      // out since the selector doesn't really change, so we're doing it here
      // earlier.
      return;
    }
    // NOTE: We manually create the request descriptor here instead of
    // calling createOperationDescriptor() because we want to set a
    // descriptor with *unaltered* variables as the fragment owner.
    // This is a hack that allows us to preserve existing (broken)
    // behavior of RelayModern containers while using fragment ownership
    // to propagate variables instead of Context.
    // For more details, see the summary of D13999308
    const requestDescriptor = createRequestDescriptor(request, variables);
    const selector = createReaderSelector(
      this._selector.node,
      this._selector.dataID,
      variables,
      requestDescriptor,
    );
    this.setSelector(selector);
  }

  _onChange = (snapshot: Snapshot): void => {
    this._data = snapshot.data;
    this._isMissingData = snapshot.isMissingData;
    this._missingRequiredFields = snapshot.missingRequiredFields;
    this._callback();
  };
}

/**
 * A resolver for an array of Selectors.
 */
class SelectorListResolver {
  _callback: () => void;
  _data: Array<?SelectorData>;
  _environment: IEnvironment;
  _resolvers: Array<SelectorResolver>;
  _rootIsQueryRenderer: boolean;
  _stale: boolean;

  constructor(
    environment: IEnvironment,
    rootIsQueryRenderer: boolean,
    selector: PluralReaderSelector,
    callback: () => void,
  ) {
    this._callback = callback;
    this._data = [];
    this._environment = environment;
    this._resolvers = [];
    this._stale = true;
    this._rootIsQueryRenderer = rootIsQueryRenderer;

    this.setSelector(selector);
  }

  dispose(): void {
    this._resolvers.forEach(disposeCallback);
  }

  resolve(): Array<?Object> {
    if (this._stale) {
      // Avoid mapping the array multiple times, which could occur if data for
      // multiple indices changes in the same event loop.
      const prevData = this._data;
      let nextData;
      for (let ii = 0; ii < this._resolvers.length; ii++) {
        const prevItem = prevData[ii];
        const nextItem = this._resolvers[ii].resolve();
        if (nextData || nextItem !== prevItem) {
          nextData = nextData || prevData.slice(0, ii);
          nextData.push(nextItem);
        }
      }
      if (!nextData && this._resolvers.length !== prevData.length) {
        nextData = prevData.slice(0, this._resolvers.length);
      }
      this._data = nextData || prevData;
      this._stale = false;
    }
    return this._data;
  }

  setSelector(selector: PluralReaderSelector): void {
    const {selectors} = selector;
    while (this._resolvers.length > selectors.length) {
      const resolver = this._resolvers.pop();
      resolver.dispose();
    }
    for (let ii = 0; ii < selectors.length; ii++) {
      if (ii < this._resolvers.length) {
        this._resolvers[ii].setSelector(selectors[ii]);
      } else {
        this._resolvers[ii] = new SelectorResolver(
          this._environment,
          this._rootIsQueryRenderer,
          selectors[ii],
          this._onChange,
        );
      }
    }
    this._stale = true;
  }

  setVariables(variables: Variables, request: ConcreteRequest): void {
    this._resolvers.forEach(resolver =>
      resolver.setVariables(variables, request),
    );
    this._stale = true;
  }

  _onChange = (data: ?Object): void => {
    this._stale = true;
    this._callback();
  };
}

function disposeCallback(disposable: ?Disposable): void {
  disposable && disposable.dispose();
}

module.exports = RelayModernFragmentSpecResolver;


text:
$script:DSCModuleName   = 'xNetworking'
$script:DSCResourceName = 'MSFT_xNetworkTeam'

#region HEADER
# Unit Test Template Version: 1.1.0
[string] $script:moduleRoot = Join-Path -Path $(Split-Path -Parent (Split-Path -Parent (Split-Path -Parent $Script:MyInvocation.MyCommand.Path))) -ChildPath 'Modules\xNetworking'
if ( (-not (Test-Path -Path (Join-Path -Path $script:moduleRoot -ChildPath 'DSCResource.Tests'))) -or `
     (-not (Test-Path -Path (Join-Path -Path $script:moduleRoot -ChildPath 'DSCResource.Tests\TestHelper.psm1'))) )
{
    & git @('clone','https://github.com/PowerShell/DscResource.Tests.git',(Join-Path -Path $script:moduleRoot -ChildPath '\DSCResource.Tests\'))
}

Import-Module (Join-Path -Path $script:moduleRoot -ChildPath 'DSCResource.Tests\TestHelper.psm1') -Force
$TestEnvironment = Initialize-TestEnvironment `
    -DSCModuleName $script:DSCModuleName `
    -DSCResourceName $script:DSCResourceName `
    -TestType Unit
#endregion HEADER

# Begin Testing
try
{
    #region Pester Tests
    InModuleScope $script:DSCResourceName {

        # Create the Mock Objects that will be used for running tests
        $MockNetTeam = [PSCustomObject] @{
            Name                = 'HostTeam'
            Members             = @('NIC1','NIC2')
        }

        $TestTeam = [PSObject]@{
            Name                    = $MockNetTeam.Name
            TeamMembers             = $MockNetTeam.Members
        }

        $MockTeam = [PSObject]@{
            Name                    = $TestTeam.Name
            Members                 = $TestTeam.TeamMembers
            loadBalancingAlgorithm  = 'Dynamic'
            teamingMode             = 'SwitchIndependent'
            Ensure                  = 'Present'
        }

        Describe "MSFT_xNetworkTeam\Get-TargetResource" {

            Context 'Team does not exist' {
                Mock Get-NetLbfoTeam
                It 'should return ensure as absent' {
                    $Result = Get-TargetResource `
                        @TestTeam
                    $Result.Ensure | Should Be 'Absent'
                }
                It 'should call the expected mocks' {
                    Assert-MockCalled -commandName Get-NetLbfoTeam -Exactly 1
                }
            }

            Context 'Network Team exists' {
                Mock Get-NetLbfoTeam -MockWith { $MockTeam }
                It 'should return team properties' {
                    $Result = Get-TargetResource @TestTeam
                    $Result.Ensure                 | Should Be 'Present'
                    $Result.Name                   | Should Be $TestTeam.Name
                    $Result.TeamMembers            | Should Be $TestTeam.TeamMembers
                    $Result.loadBalancingAlgorithm | Should Be 'Dynamic'
                    $Result.teamingMode            | Should Be 'SwitchIndependent'
                }
                It 'should call the expected mocks' {
                    Assert-MockCalled -commandName Get-NetLbfoTeam -Exactly 1
                }
            }
        }

        Describe "MSFT_xNetworkTeam\Set-TargetResource" {
            $newTeam = [PSObject]@{
                Name                    = $TestTeam.Name
                TeamMembers             = $TestTeam.TeamMembers
                loadBalancingAlgorithm  = 'Dynamic'
                teamingMode             = 'SwitchIndependent'
                Ensure                  = 'Present'
            }

            Context 'Team does not exist but should' {

                Mock Get-NetLbfoTeam
                Mock New-NetLbfoTeam
                Mock Set-NetLbfoTeam
                Mock Remove-NetLbfoTeamMember
                Mock Add-NetLbfoTeamMember

                It 'should not throw error' {
                    {
                        Set-TargetResource @newTeam
                    } | Should Not Throw
                }
                It 'should call expected Mocks' {
                    Assert-MockCalled -commandName Get-NetLbfoTeam -Exactly 1
                    Assert-MockCalled -commandName New-NetLbfoTeam -Exactly 1
                    Assert-MockCalled -commandName Set-NetLbfoTeam -Exactly 0
                    Assert-MockCalled -commandName Remove-NetLbfoTeamMember -Exactly 0
                    Assert-MockCalled -commandName Add-NetLbfoTeamMember -Exactly 0
                }
            }

            Context 'team exists but needs a different teaming mode' {

                Mock Get-NetLbfoTeam -MockWith { $MockTeam }
                Mock New-NetLbfoTeam
                Mock Set-NetLbfoTeam
                Mock Remove-NetLbfoTeam

                It 'should not throw error' {
                    {
                        $updateTeam = $newTeam.Clone()
                        $updateTeam.teamingMode = 'LACP'
                        Set-TargetResource @updateTeam
                    } | Should Not Throw
                }
                It 'should call expected Mocks' {
                    Assert-MockCalled -commandName Get-NetLbfoTeam -Exactly 1
                    Assert-MockCalled -commandName New-NetLbfoTeam -Exactly 0
                    Assert-MockCalled -commandName Set-NetLbfoTeam -Exactly 1
                    Assert-MockCalled -commandName Remove-NetLbfoTeam -Exactly 0
                }
            }

            Context 'team exists but needs a different load balacing algorithm' {
                Mock Get-NetLbfoTeam -MockWith { $MockTeam }
                Mock New-NetLbfoTeam
                Mock Set-NetLbfoTeam
                Mock Remove-NetLbfoTeam

                It 'should not throw error' {
                    {
                        $updateTeam = $newTeam.Clone()
                        $updateTeam.loadBalancingAlgorithm = 'HyperVPort'
                        Set-TargetResource @updateTeam
                    } | Should Not Throw
                }
                It 'should call expected Mocks' {
                    Assert-MockCalled -commandName Get-NetLbfoTeam -Exactly 1
                    Assert-MockCalled -commandName New-NetLbfoTeam -Exactly 0
                    Assert-MockCalled -commandName Set-NetLbfoTeam -Exactly 1
                    Assert-MockCalled -commandName Remove-NetLbfoTeam -Exactly 0
                }
            }

            Context 'team exists but has to remove a member adapter' {
                Mock Get-NetLbfoTeam -MockWith { $MockTeam }
                Mock New-NetLbfoTeam
                Mock Set-NetLbfoTeam
                Mock Remove-NetLbfoTeam
                Mock Remove-NetLbfoTeamMember

                It 'should not throw error' {
                    {
                        $updateTeam = $newTeam.Clone()
                        $updateTeam.TeamMembers = $newTeam.TeamMembers[0]
                        Set-TargetResource @updateTeam
                    } | Should Not Throw
                }
                It 'should call expected Mocks' {
                    Assert-MockCalled -commandName Get-NetLbfoTeam -Exactly 1
                    Assert-MockCalled -commandName New-NetLbfoTeam -Exactly 0
                    Assert-MockCalled -commandName Set-NetLbfoTeam -Exactly 0
                    Assert-MockCalled -commandName Remove-NetLbfoTeam -Exactly 0
                    Assert-MockCalled -commandName Remove-NetLbfoTeamMember -Exactly 1
                }
            }

            Context 'team exists but has to add a member adapter' {
                Mock Get-NetLbfoTeam -MockWith { $MockTeam }
                Mock New-NetLbfoTeam
                Mock Set-NetLbfoTeam
                Mock Remove-NetLbfoTeam
                Mock Remove-NetLbfoTeamMember
                Mock Add-NetLbfoTeamMember

                It 'should not throw error' {
                    {
                        $updateTeam = $newTeam.Clone()
                        $updateTeam.TeamMembers += 'NIC3'
                        Set-TargetResource @updateTeam
                    } | Should Not Throw
                }
                It 'should call expected Mocks' {
                    Assert-MockCalled -commandName Get-NetLbfoTeam -Exactly 1
                    Assert-MockCalled -commandName New-NetLbfoTeam -Exactly 0
                    Assert-MockCalled -commandName Set-NetLbfoTeam -Exactly 0
                    Assert-MockCalled -commandName Remove-NetLbfoTeam -Exactly 0
                    Assert-MockCalled -commandName Remove-NetLbfoTeamMember -Exactly 0
                    Assert-MockCalled -commandName Add-NetLbfoTeamMember -Exactly 1
                }
            }

            Context 'team exists but should not exist' {
                Mock Get-NetLbfoTeam -MockWith { $MockTeam }
                Mock New-NetLbfoTeam
                Mock Set-NetLbfoTeam
                Mock Remove-NetLbfoTeam
                Mock Remove-NetLbfoTeamMember
                Mock Add-NetLbfoTeamMember

                It 'should not throw error' {
                    {
                        $updateTeam = $newTeam.Clone()
                        $updateTeam.Ensure = 'absent'
                        Set-TargetResource @updateTeam
                    } | Should Not Throw
                }
                It 'should call expected Mocks' {
                    Assert-MockCalled -commandName Get-NetLbfoTeam -Exactly 1
                    Assert-MockCalled -commandName New-NetLbfoTeam -Exactly 0
                    Assert-MockCalled -commandName Set-NetLbfoTeam -Exactly 0
                    Assert-MockCalled -commandName Remove-NetLbfoTeam -Exactly 1
                    Assert-MockCalled -commandName Remove-NetLbfoTeamMember -Exactly 0
                    Assert-MockCalled -commandName Add-NetLbfoTeamMember -Exactly 0
                }
            }
        }

        Describe "MSFT_xNetworkTeam\Test-TargetResource" {
            $newTeam = [PSObject]@{
                Name                    = $TestTeam.Name
                TeamMembers             = $TestTeam.TeamMembers
                loadBalancingAlgorithm  = 'Dynamic'
                teamingMode             = 'SwitchIndependent'
                Ensure                  = 'Present'
            }

            Context 'Team does not exist but should' {
                Mock Get-NetLbfoTeam

                It 'should return false' {
                        Test-TargetResource @newTeam | Should be $false
                }
                It 'should call expected Mocks' {
                    Assert-MockCalled -commandName Get-NetLbfoTeam -Exactly 1
                }
            }

            Context 'team exists but needs a different teaming mode' {
                Mock Get-NetLbfoTeam -MockWith { $MockTeam }

                It 'should return false' {
                    $updateTeam = $newTeam.Clone()
                    $updateTeam.teamingMode = 'LACP'
                    Test-TargetResource @updateTeam | Should Be $false
                }
                It 'should call expected Mocks' {
                    Assert-MockCalled -commandName Get-NetLbfoTeam -Exactly 1
                }
            }

            Context 'team exists but needs a different load balacing algorithm' {
                Mock Get-NetLbfoTeam -MockWith { $MockTeam }

                It 'should return false' {
                    $updateTeam = $newTeam.Clone()
                    $updateTeam.loadBalancingAlgorithm = 'HyperVPort'
                    Test-TargetResource @updateTeam | Should Be $false
                }
                It 'should call expected Mocks' {
                    Assert-MockCalled -commandName Get-NetLbfoTeam -Exactly 1
                }
            }

            Context 'team exists but has to remove a member adapter' {
                Mock Get-NetLbfoTeam -MockWith { $MockTeam }

                It 'should return false' {
                    $updateTeam = $newTeam.Clone()
                    $updateTeam.TeamMembers = $newTeam.TeamMembers[0]
                    Test-TargetResource @updateTeam | Should Be $false
                }
                It 'should call expected Mocks' {
                    Assert-MockCalled -commandName Get-NetLbfoTeam -Exactly 1
                }
            }

            Context 'team exists but has to add a member adapter' {
                Mock Get-NetLbfoTeam -MockWith { $MockTeam }

                It 'should return false' {
                    $updateTeam = $newTeam.Clone()
                    $updateTeam.TeamMembers += 'NIC3'
                    Test-TargetResource @updateTeam | Should Be $false
                }
                It 'should call expected Mocks' {
                    Assert-MockCalled -commandName Get-NetLbfoTeam -Exactly 1
                }
            }

            Context 'team exists but should not exist' {
                Mock Get-NetLbfoTeam -MockWith { $MockTeam }

                It 'should return $false' {
                    $updateTeam = $newTeam.Clone()
                    $updateTeam.Ensure = 'absent'
                    Test-TargetResource @updateTeam | Should Be $false
                }
                It 'should call expected Mocks' {
                    Assert-MockCalled -commandName Get-NetLbfoTeam -Exactly 1
                }
            }

            Context 'team exists and no action needed' {
                Mock Get-NetLbfoTeam -MockWith { $MockTeam }

                It 'should return true' {
                    $updateTeam = $newTeam.Clone()
                    Test-TargetResource @updateTeam | Should Be $true
                }
                It 'should call expected Mocks' {
                    Assert-MockCalled -commandName Get-NetLbfoTeam -Exactly 1
                }
            }

            Context 'team does not and no action needed' {
                Mock Get-NetLbfoTeam

                It 'should return true' {
                    $updateTeam = $newTeam.Clone()
                    $updateTeam.Ensure = 'Absent'
                    Test-TargetResource @updateTeam | Should Be $true
                }
                It 'should call expected Mocks' {
                    Assert-MockCalled -commandName Get-NetLbfoTeam -Exactly 1
                }
            }
        }

    }
    #endregion
}
finally
{
    #region FOOTER
    Restore-TestEnvironment -TestEnvironment $TestEnvironment
    #endregion
}


text:
module DPLA::MAP
  class TimeSpan < ActiveTriples::Resource
    configure :type => RDF::EDM.TimeSpan

    validates_presence_of :providedLabel

    property :prefLabel, :predicate => RDF::SKOS.prefLabel
    property :providedLabel, :predicate => RDF::DPLA.providedLabel
    property :begin, :predicate => RDF::EDM.begin
    property :end, :predicate => RDF::EDM.end
  end
end


text:
from typing import Optional, Tuple, cast

from django.db.models.fields import Field
from django.db.models.fields.related import RelatedField
from mypy.nodes import AssignmentStmt, NameExpr, TypeInfo
from mypy.plugin import FunctionContext
from mypy.types import AnyType, Instance
from mypy.types import Type as MypyType
from mypy.types import TypeOfAny

from mypy_django_plugin.django.context import DjangoContext
from mypy_django_plugin.lib import fullnames, helpers

def _get_current_field_from_assignment(ctx: FunctionContext, django_context: DjangoContext) -> Optional[Field]:
    outer_model_info = helpers.get_typechecker_api(ctx).scope.active_class()
    if (outer_model_info is None
            or not helpers.is_model_subclass_info(outer_model_info, django_context)):
        return None

    field_name = None
    for stmt in outer_model_info.defn.defs.body:
        if isinstance(stmt, AssignmentStmt):
            if stmt.rvalue == ctx.context:
                if not isinstance(stmt.lvalues[0], NameExpr):
                    return None
                field_name = stmt.lvalues[0].name
                break
    if field_name is None:
        return None

    model_cls = django_context.get_model_class_by_fullname(outer_model_info.fullname)
    if model_cls is None:
        return None

    current_field = model_cls._meta.get_field(field_name)
    return current_field

def reparametrize_related_field_type(related_field_type: Instance, set_type, get_type) -> Instance:
    args = [
        helpers.convert_any_to_type(related_field_type.args[0], set_type),
        helpers.convert_any_to_type(related_field_type.args[1], get_type),
    ]
    return helpers.reparametrize_instance(related_field_type, new_args=args)

def fill_descriptor_types_for_related_field(ctx: FunctionContext, django_context: DjangoContext) -> MypyType:
    current_field = _get_current_field_from_assignment(ctx, django_context)
    if current_field is None:
        return AnyType(TypeOfAny.from_error)

    assert isinstance(current_field, RelatedField)

    related_model_cls = django_context.get_field_related_model_cls(current_field)
    if related_model_cls is None:
        return AnyType(TypeOfAny.from_error)

    default_related_field_type = set_descriptor_types_for_field(ctx)

    # self reference with abstract=True on the model where ForeignKey is defined
    current_model_cls = current_field.model
    if (current_model_cls._meta.abstract
            and current_model_cls == related_model_cls):
        # for all derived non-abstract classes, set variable with this name to
        # __get__/__set__ of ForeignKey of derived model
        for model_cls in django_context.all_registered_model_classes:
            if issubclass(model_cls, current_model_cls) and not model_cls._meta.abstract:
                derived_model_info = helpers.lookup_class_typeinfo(helpers.get_typechecker_api(ctx), model_cls)
                if derived_model_info is not None:
                    fk_ref_type = Instance(derived_model_info, [])
                    derived_fk_type = reparametrize_related_field_type(default_related_field_type,
                                                                       set_type=fk_ref_type, get_type=fk_ref_type)
                    helpers.add_new_sym_for_info(derived_model_info,
                                                 name=current_field.name,
                                                 sym_type=derived_fk_type)

    related_model = related_model_cls
    related_model_to_set = related_model_cls
    if related_model_to_set._meta.proxy_for_model is not None:
        related_model_to_set = related_model_to_set._meta.proxy_for_model

    typechecker_api = helpers.get_typechecker_api(ctx)

    related_model_info = helpers.lookup_class_typeinfo(typechecker_api, related_model)
    if related_model_info is None:
        # maybe no type stub
        related_model_type = AnyType(TypeOfAny.unannotated)
    else:
        related_model_type = Instance(related_model_info, [])  # type: ignore

    related_model_to_set_info = helpers.lookup_class_typeinfo(typechecker_api, related_model_to_set)
    if related_model_to_set_info is None:
        # maybe no type stub
        related_model_to_set_type = AnyType(TypeOfAny.unannotated)
    else:
        related_model_to_set_type = Instance(related_model_to_set_info, [])  # type: ignore

    # replace Any with referred_to_type
    return reparametrize_related_field_type(default_related_field_type,
                                            set_type=related_model_to_set_type,
                                            get_type=related_model_type)

def get_field_descriptor_types(field_info: TypeInfo, is_nullable: bool) -> Tuple[MypyType, MypyType]:
    set_type = helpers.get_private_descriptor_type(field_info, '_pyi_private_set_type',
                                                   is_nullable=is_nullable)
    get_type = helpers.get_private_descriptor_type(field_info, '_pyi_private_get_type',
                                                   is_nullable=is_nullable)
    return set_type, get_type

def set_descriptor_types_for_field(ctx: FunctionContext) -> Instance:
    default_return_type = cast(Instance, ctx.default_return_type)

    is_nullable = False
    null_expr = helpers.get_call_argument_by_name(ctx, 'null')
    if null_expr is not None:
        is_nullable = helpers.parse_bool(null_expr) or False

    set_type, get_type = get_field_descriptor_types(default_return_type.type, is_nullable)
    return helpers.reparametrize_instance(default_return_type, [set_type, get_type])

def determine_type_of_array_field(ctx: FunctionContext, django_context: DjangoContext) -> MypyType:
    default_return_type = set_descriptor_types_for_field(ctx)

    base_field_arg_type = helpers.get_call_argument_type_by_name(ctx, 'base_field')
    if not base_field_arg_type or not isinstance(base_field_arg_type, Instance):
        return default_return_type

    base_type = base_field_arg_type.args[1]  # extract __get__ type
    args = []
    for default_arg in default_return_type.args:
        args.append(helpers.convert_any_to_type(default_arg, base_type))

    return helpers.reparametrize_instance(default_return_type, args)

def transform_into_proper_return_type(ctx: FunctionContext, django_context: DjangoContext) -> MypyType:
    default_return_type = ctx.default_return_type
    assert isinstance(default_return_type, Instance)

    outer_model_info = helpers.get_typechecker_api(ctx).scope.active_class()
    if (outer_model_info is None
            or not helpers.is_model_subclass_info(outer_model_info, django_context)):
        return ctx.default_return_type

    assert isinstance(outer_model_info, TypeInfo)

    if helpers.has_any_of_bases(default_return_type.type, fullnames.RELATED_FIELDS_CLASSES):
        return fill_descriptor_types_for_related_field(ctx, django_context)

    if default_return_type.type.has_base(fullnames.ARRAY_FIELD_FULLNAME):
        return determine_type_of_array_field(ctx, django_context)

    return set_descriptor_types_for_field(ctx)


text:
package io.reactivex.internal.operators.single;

import java.util.concurrent.CancellationException;
import java.util.concurrent.atomic.AtomicReference;

import org.reactivestreams.*;

import io.reactivex.*;
import io.reactivex.disposables.Disposable;
import io.reactivex.internal.disposables.*;
import io.reactivex.internal.subscriptions.SubscriptionHelper;
import io.reactivex.plugins.RxJavaPlugins;

/**
 * Signals the events of the source Single or signals a CancellationException if the
 * other Publisher signalled first.
 * @param <T> the main value type
 * @param <U> the other value type
 */
public final class SingleTakeUntil<T, U> extends Single<T> {

    final SingleSource<T> source;

    final Publisher<U> other;

    public SingleTakeUntil(SingleSource<T> source, Publisher<U> other) {
        this.source = source;
        this.other = other;
    }

    @Override
    protected void subscribeActual(SingleObserver<? super T> observer) {
        TakeUntilMainObserver<T> parent = new TakeUntilMainObserver<T>(observer);
        observer.onSubscribe(parent);

        other.subscribe(parent.other);

        source.subscribe(parent);
    }

    static final class TakeUntilMainObserver<T>
    extends AtomicReference<Disposable>
    implements SingleObserver<T>, Disposable {

        private static final long serialVersionUID = -622603812305745221L;

        final SingleObserver<? super T> actual;

        final TakeUntilOtherSubscriber other;

        TakeUntilMainObserver(SingleObserver<? super T> actual) {
            this.actual = actual;
            this.other = new TakeUntilOtherSubscriber(this);
        }

        @Override
        public void dispose() {
            DisposableHelper.dispose(this);
        }

        @Override
        public boolean isDisposed() {
            return DisposableHelper.isDisposed(get());
        }

        @Override
        public void onSubscribe(Disposable d) {
            DisposableHelper.setOnce(this, d);
        }

        @Override
        public void onSuccess(T value) {
            other.dispose();

            Disposable a = getAndSet(DisposableHelper.DISPOSED);
            if (a != DisposableHelper.DISPOSED) {
                actual.onSuccess(value);
            }
        }

        @Override
        public void onError(Throwable e) {
            other.dispose();

            Disposable a = get();
            if (a != DisposableHelper.DISPOSED) {
                a = getAndSet(DisposableHelper.DISPOSED);
                if (a != DisposableHelper.DISPOSED) {
                    actual.onError(e);
                    return;
                }
            }
            RxJavaPlugins.onError(e);
        }

        void otherError(Throwable e) {
            Disposable a = get();
            if (a != DisposableHelper.DISPOSED) {
                a = getAndSet(DisposableHelper.DISPOSED);
                if (a != DisposableHelper.DISPOSED) {
                    if (a != null) {
                        a.dispose();
                    }
                    actual.onError(e);
                    return;
                }
            }
            RxJavaPlugins.onError(e);
        }
    }

    static final class TakeUntilOtherSubscriber
    extends AtomicReference<Subscription>
    implements FlowableSubscriber<Object> {

        private static final long serialVersionUID = 5170026210238877381L;

        final TakeUntilMainObserver<?> parent;

        TakeUntilOtherSubscriber(TakeUntilMainObserver<?> parent) {
            this.parent = parent;
        }

        @Override
        public void onSubscribe(Subscription s) {
            SubscriptionHelper.setOnce(this, s, Long.MAX_VALUE);
        }

        @Override
        public void onNext(Object t) {
            if (SubscriptionHelper.cancel(this)) {
                parent.otherError(new CancellationException());
            }
        }

        @Override
        public void onError(Throwable t) {
            parent.otherError(t);
        }

        @Override
        public void onComplete() {
            if (get() != SubscriptionHelper.CANCELLED) {
                lazySet(SubscriptionHelper.CANCELLED);
                parent.otherError(new CancellationException());
            }
        }

        public void dispose() {
            SubscriptionHelper.cancel(this);
        }
    }
}


text:
ACCEPTED

#### According to
Index Fungorum

#### Published in
null

#### Original name
Coccidomyces dactylopii Buchner

### Remarks
null


text:
<!doctype html>

  <title>DOM mutations during parsing in HTML</title>

FAIL

FAIL

FAIL (script didn't run)


text:
import matplotlib.pyplot as plt
import matplotlib.image as mpimg
import numpy as np
import cv2
import math
import os
# Import everything needed to edit/save/watch video clips
from moviepy.editor import VideoFileClip

def grayscale(img):
    """Applies the Grayscale transform
    This will return an image with only one color channel
    but NOTE: to see the returned image as grayscale
    (assuming your grayscaled image is called 'gray')
    you should call plt.imshow(gray, cmap='gray')"""
    return cv2.cvtColor(img, cv2.COLOR_RGB2GRAY)
    # Or use BGR2GRAY if you read an image with cv2.imread()
    # return cv2.cvtColor(img, cv2.COLOR_BGR2GRAY)

def canny(img, low_threshold, high_threshold):
    """Applies the Canny transform"""
    return cv2.Canny(img, low_threshold, high_threshold)

def gaussian_blur(img, kernel_size):
    """Applies a Gaussian Noise kernel"""
    return cv2.GaussianBlur(img, (kernel_size, kernel_size), 0)

def region_of_interest(img, vertices):
    """
    Applies an image mask.

    Only keeps the region of the image defined by the polygon
    formed from `vertices`. The rest of the image is set to black.
    """
    #defining a blank mask to start with
    mask = np.zeros_like(img)

    #defining a 3 channel or 1 channel color to fill the mask with depending on the input image
    if len(img.shape) > 2:
        channel_count = img.shape[2]  # i.e. 3 or 4 depending on your image
        ignore_mask_color = (255,) * channel_count
    else:
        ignore_mask_color = 255

    #filling pixels inside the polygon defined by "vertices" with the fill color
    cv2.fillPoly(mask, vertices, ignore_mask_color)

    #returning the image only where mask pixels are nonzero
    masked_image = cv2.bitwise_and(img, mask)
    return masked_image

def hough_lines(img, rho, theta, threshold, min_line_len, max_line_gap):
    """
    `img` should be the output of a Canny transform.

    Returns an image with hough lines drawn.
    """
    lines = cv2.HoughLinesP(img, rho, theta, threshold, np.array([]), minLineLength=min_line_len, maxLineGap=max_line_gap)
    line_img = np.zeros((img.shape[0], img.shape[1], 3), dtype=np.uint8)
    draw_lines(line_img, lines)
    return line_img

def draw_lines(img, lines, color=[255, 0, 0], thickness = 10):
    """
    NOTE: this is the function you might want to use as a starting point once you want to
    average/extrapolate the line segments you detect to map out the full
    extent of the lane (going from the result shown in raw-lines-example.mp4
    to that shown in P1_example.mp4).

    Think about things like separating line segments by their
    slope ((y2-y1)/(x2-x1)) to decide which segments are part of the left
    line vs. the right line.  Then, you can average the position of each of
    the lines and extrapolate to the top and bottom of the lane.

    This function draws `lines` with `color` and `thickness`.
    Lines are drawn on the image inplace (mutates the image).
    If you want to make the lines semi-transparent, think about combining
    this function with the weighted_img() function below
    """
    left_x = []
    left_y = []

    right_x = []
    right_y = []

    for line in lines:
        for x1,y1,x2,y2 in line:
            # 1. we dont need horizontal; i.e slope =0  they are noise
            # 2. slope >0 is right ; slope <0 is left
            slope = ((y2-y1)/(x2-x1))
            if (slope < 0):
                left_x.append(x1)
                left_x.append(x2)
                left_y.append(y1)
                left_y.append(y2)
            elif (slope > 0):
                right_x.append(x1)
                right_x.append(x2)
                right_y.append(y1)
                right_y.append(y2)

    if (len(left_x) > 0  and len(left_y) > 0):
        # find coefficient
        coeff_left = np.polyfit(left_x, left_y, 1)
        # construct y =xa +b
        func_left = np.poly1d(coeff_left)
        x1L = int(func_left(0))
        x2L = int(func_left(460))
        cv2.line(img, (0, x1L), (460, x2L), color, thickness)

    if (len(right_x) > 0  and len(right_y) > 0):
        # find coefficient
        coeff_right = np.polyfit(right_x, right_y, 1)
        # construct y =xa +b
        func_right = np.poly1d(coeff_right)
        x1R = int(func_right(500))
        x2R = int(func_right(img.shape[1]))
        cv2.line(img, (500, x1R), (img.shape[1], x2R), color, thickness)

# Python 3 has support for cool math symbols.

def weighted_img(img, initial_img, α=0.8, β=1., λ=0.):
    """
    `img` is the output of the hough_lines(), An image with lines drawn on it.
    Should be a blank image (all black) with lines drawn on it.

    `initial_img` should be the image before any processing.

    The result image is computed as follows:

    initial_img * α + img * β + λ
    NOTE: initial_img and img must be the same shape!
    """
    return cv2.addWeighted(initial_img, α, img, β, λ)

def process_image(image):
    # NOTE: The output you return should be a color image (3 channel) for processing video below
    # you should return the final output (image where lines are drawn on lanes)
    img = grayscale(image)
    # further smoothing to blur image for better result
    img = gaussian_blur(img, kernel_size = 3)
    img = canny(img, low_threshold = 80, high_threshold = 240)

    # This time we are defining a four sided polygon to mask
    imshape = image.shape
    vertices = np.array([[(0,imshape[0]),(460, 320), (500, 320), (imshape[1],imshape[0])]], dtype=np.int32)
    img = region_of_interest(img, vertices)

    # Hough transform
    line_image = hough_lines(img, rho = 2, theta= np.pi/180, threshold = 50, min_line_len = 40, max_line_gap = 20)

    # Draw the lines on the edge image
    final = weighted_img(line_image, image, α = 0.8, β = 1., λ = 0.)
    return final

if __name__ == '__main__':
	white_line_output = '../test_videos_output/solidWhiteRight.mp4'
	clip1 = VideoFileClip('../test_videos/solidWhiteRight.mp4')
	white_line_clip = clip1.fl_image(process_image) #NOTE: this function expects color images!!

	yellow_output = '../test_videos_output/solidYellowLeft.mp4'
	clip2 = VideoFileClip('../test_videos/solidYellowLeft.mp4')
	yellow_clip = clip2.fl_image(process_image)

	challenge_output = '../test_videos_output/challenge.mp4'
	clip3 = VideoFileClip('../test_videos/challenge.mp4')
	challenge_clip = clip3.fl_image(process_image)


text:
FloppyDisk
==========

Flappy Bird game variation based on: Ptakopysk Framework (https://github.com/PsichiX/Ptakopysk)


text:
package psidev.psi.mi.jami.utils.comparator.participant;

import psidev.psi.mi.jami.model.CvTerm;
import psidev.psi.mi.jami.model.ModelledFeature;
import psidev.psi.mi.jami.model.ModelledParticipantCandidate;
import psidev.psi.mi.jami.model.ModelledParticipantPool;
import psidev.psi.mi.jami.utils.comparator.cv.DefaultCvTermComparator;
import psidev.psi.mi.jami.utils.comparator.feature.DefaultModelledFeatureComparator;

import java.util.ArrayList;
import java.util.Collection;
import java.util.Iterator;

/**
 * Default biological participant pool comparator.
 * It will compare the basic properties of a biological participant using DefaultParticipantBaseComparator.
 * It will compare the participant candidates using DefaultModelledEntityComparator
 *
 * This comparator will ignore all the other properties of a biological participant.
 *
 * @author Marine Dumousseau (marine@ebi.ac.uk)
 * @version $Id$
 * @since
13/02/13

 */
public class DefaultModelledParticipantPoolComparator {

    /**
     * Use DefaultModelledParticipantPoolComparator to know if two biological participant pools are equals.
     *
     * @param bioParticipant1 a {@link psidev.psi.mi.jami.model.ModelledParticipantPool} object.
     * @param bioParticipant2 a {@link psidev.psi.mi.jami.model.ModelledParticipantPool} object.
     * @return true if the two biological participant pools are equal
     * @param checkComplexesAsInteractors a boolean.
     */
    public static boolean areEquals(ModelledParticipantPool bioParticipant1, ModelledParticipantPool bioParticipant2, boolean checkComplexesAsInteractors){
        if (bioParticipant1 == bioParticipant2){
            return true;
        }
        else if (bioParticipant1 == null || bioParticipant2 == null){
            return false;
        }
        else {
            if (bioParticipant1 == bioParticipant2){
                return true;
            }
            else if (bioParticipant1 == null || bioParticipant2 == null){
                return false;
            }
            else {
                if (!DefaultParticipantBaseComparator.areEquals(bioParticipant1, bioParticipant2, true)){
                    return false;
                }

                // then compares the features
                Collection<ModelledFeature> features1 = bioParticipant1.getFeatures();
                Collection<ModelledFeature> features2 = bioParticipant2.getFeatures();

                if (features1.size() != features2.size()){
                    return false;
                }
                else {
                    Iterator<ModelledFeature> f1Iterator = new ArrayList<ModelledFeature>(features1).iterator();
                    Collection<ModelledFeature> f2List = new ArrayList<ModelledFeature>(features2);

                    while (f1Iterator.hasNext()){
                        ModelledFeature f1 = f1Iterator.next();
                        ModelledFeature f2ToRemove = null;
                        for (ModelledFeature f2 : f2List){
                            if (DefaultModelledFeatureComparator.areEquals(f1, f2)){
                                f2ToRemove = f2;
                                break;
                            }
                        }
                        if (f2ToRemove != null){
                            f2List.remove(f2ToRemove);
                            f1Iterator.remove();
                        }
                        else {
                            return false;
                        }
                    }

                    if (f1Iterator.hasNext() || !f2List.isEmpty()){
                        return false;
                    }
                }

                // compare types
                CvTerm type1 = bioParticipant1.getType();
                CvTerm type2 = bioParticipant2.getType();
                if (!DefaultCvTermComparator.areEquals(type1, type2)){
                    return false;
                }

                // compare collections
                Iterator<ModelledParticipantCandidate> f1Iterator = new ArrayList<ModelledParticipantCandidate>(bioParticipant1).iterator();
                Collection<ModelledParticipantCandidate> f2List = new ArrayList<ModelledParticipantCandidate>(bioParticipant2);

                while (f1Iterator.hasNext()){
                    ModelledParticipantCandidate f1 = f1Iterator.next();
                    ModelledParticipantCandidate f2ToRemove = null;
                    for (ModelledParticipantCandidate f2 : f2List){
                        if (DefaultModelledEntityComparator.areEquals(f1, f2, checkComplexesAsInteractors)){
                            f2ToRemove = f2;
                            break;
                        }
                    }
                    if (f2ToRemove != null){
                        f2List.remove(f2ToRemove);
                        f1Iterator.remove();
                    }
                    else {
                        return false;
                    }
                }

                if (f1Iterator.hasNext() || !f2List.isEmpty()){
                    return false;
                }
                else{
                    return true;
                }
            }
        }
    }
}


text:
module Discerner
  module DictionaryCustomMethods
  end

  class Dictionary < ActiveRecord::Base
    include Discerner::Methods::Models::Dictionary
    include Discerner::DictionaryCustomMethods
  end
end


text:
             Ana Sayfa
             Ortaklık

Ortaklık programı, bizimle havalı kaplamalar kazanın!

                        Partner bağlantınız:
                        <input type="text" name="link" id="promolink" placeholder="" style="width: 271px" readonly="" class="click_to_copy" value="https://hellcase.com/bonus7070103">
                        Promosyon kodu:

                        <input type="text" name="desiredname" id="promocode" placeholder="" maxlength="19" style="width: 71px" value="7070103">

                         Değiştir

Seviye 1

Yönlendirdikleriniz

                        0

Oyuncular

Bir sonraki seviyeye

                                0 /
                                500

                            0 /                             500

Yüzdeniz

                            5%

Yönlendirme mevduatından

Yönlendirmeden alınan

                            0.30

Promosyon kodu için

Tahsil edilen yönlendirmeler

                            0.00

Kazancınız

                        0.00

Ortak seviyesi

                    Seviye
                    Bir sonraki seviyeye
                    Yüzdeniz
                    Yönlendirmeden alınan

                         Senin seviyen
                        $0

                        5%

                        $0.30

                        $500

                        6%

                        $0.40

                        $2000

                        7%

                        $0.45

                        $5000

                        8%

                        $0.60

                        $7500

                        9%

                        $0.65

                        $10000

                        10%

                        $0.70

İnternet içerik üreticisi türevi misiniz? Site yöneticisi? Twitch? Youtube?
 Belki de bir e-sporlar takımına sahipsinizdir? Doğru yerdesiniz!

Hellcase Premium ile ne tür ortaklık bonusları beni bekliyor?

Yönlendirdiklerinizin ödemelerinden ilave %1 gelir ve kodunuzu kullanan kullanıcılardan $0.05 bonus kazanırsınız.

30,000+ takipçili, videosu 5,000+ kez izlenen bir YouTuber veya 5,000+ ziyaretçisi olan bir internet sitesi sahibi misiniz? Başka ortaklık teklifleriniz var mı?

Sizin için de bizim için de faydalı olacak iş birliğimizi görüşelim! Herhangi bir ortaklık teklifiniz varsa media@hellcase.com ile iletişime geçin!

Hellcase'in ortaklık programları nelerdir?

Ortaklık bağlantınızı veya promosyon kodunuzu yapıştırabilir ve web sitemizdeki bakiyenize bonuslar kazanabilirsiniz!

Bunu bilmek çok önemli!

-Bir kullanıcı sadece bir farklı kullanıcının ortağı olabilir;
-Ortağınızın cüzdanı doldurulduktan hemen sonra para hesabınıza geçer;
-Promosyon kodunu sadece bir kez kullanabilirsiniz;

Yönlendirme bağlantımı birçok kişiye verdim, ancak hiç para alamadım.

Yönlendirme bağlantınızı kullanan kullanıcılar zaten site içindedir veya başka kullanıcılar ile ortaklardır.
 Her kullanıcı sadece bir kez ortak olabilir.

 Ortağımın satın almalarından aldığım kar yüzdemi nasıl yükseltebilirim?

Aktif kullanıcıların takibi yapılmakla birlikte yüzdeleri de otomatik olarak arttırılmaktadır. Daha çok yönlendirme daha çok yüzde demek!

Sosyal ağlarımızda promosyon kodunuzu mesaj sağanağı yapmak yasaktır!

Promosyon kodunuzu sosyal ağlarda mesaj sağanağı olarak gönderirseniz ortaklık süreciniz veya tüm Hellcase hesabınız engellenebilir.


text:
Title: ReStructured Text

Chapter 1 Title
===============

Section 1.1 Title
-----------------

Subsection 1.1.1 Title
~~~~~~~~~~~~~~~~~~~~~~

Section 1.2 Title
-----------------

Chapter 2 Title
===============