text:
"""Controls the closure-builder dependency."""

__author__ = ('ralphj@google.com (Julie Ralph)'
              'jasonstredwick@google.com (Jason Stredwick)')

import logging
import os
import shutil
import sys
import urllib
import zipfile

from builddefs.tools import base
from builddefs.tools import svn

BUILDER_JAR_NAME = 'builder.jar'
BUILDER_PATH_NAME = 'closure-builder'
BUILDER_URL = ('https://closure-builder.googlecode.com/files/'
                'builder-latest.zip')
BUILDER_ZIP_NAME = 'closure.zip'
LIBRARY_PATH_NAME = 'closure-library'
LIBRARY_URL = 'https://closure-library.googlecode.com/svn/trunk/'

class ClosureBuilderError(base.ToolError):
  """Thrown when an error happens related to the closure builder."""
  pass

class ClosureBuilder(base.Tool):
  """Control the closure builder dependency."""

  @staticmethod
  def Execute(params, location=None):
    """Executes the closure-builder with the given parameters.

    Args:
      params: Arguments supplied to the builder. (list of strings)
      location: Optional location to search for the tool. (string)

    Raises:
      ClosureBuilderError: Execution fails.
    """
    if not ClosureBuilder.IsInstalled(location):
      logging.error('Compile failed; closure-builder not installed.')
      raise ClosureBuilderError

    location = location or ''
    builder_path = os.path.join(location, BUILDER_PATH_NAME)
    builder_jar = os.path.join(builder_path, BUILDER_JAR_NAME)
    library_path = os.path.join(builder_path, LIBRARY_PATH_NAME)
    builder = os.path.join(library_path, 'closure', 'bin', 'build',
                           'closurebuilder.py')
    params.append('--root=%s' % library_path)
    params.append('--builder_jar=%s' % builder_jar)
    command = ' '.join([sys.executable, builder] + params)

    try:
      base.Tool._ExecuteCommand(command)
    except base.ToolError:
      logging.error('closure-builder failed to execute:\n    %s.' % command)
      raise ClosureBuilderError

  @staticmethod
  def Install(location=None):
    """Install the closure builder.

    Installation of the closure builder includes the checkout of the builder
    and library from their svn repositories.

    Args:
      location: Optional location to search for the tool. (string)

    Raises:
      ClosureBuilderError: Setup fails.
    """
    if not os.path.isdir(location):
      logging.error('Invalid location given for installing the '
                    'closure-builder.')
      raise ClosureBuilderError
    elif ClosureBuilder.IsInstalled(location):
      return

    # Create the directory structure for the closure builder.
    builder_path = os.path.join(location, BUILDER_PATH_NAME)
    os.makedirs(builder_path)

    # Checkout the closure library
    library_path = os.path.join(builder_path, LIBRARY_PATH_NAME)
    params = ['checkout', LIBRARY_URL, library_path]
    try:
      svn.Svn.Execute(params, location)
      if not os.path.isdir(library_path):
        raise ClosureBuilderError
    except (ClosureBuilderError, svn.SvnError):
      shutil.rmtree(builder_path)
      logging.error('Could not check out the closure library from %s.' %
                    LIBRARY_URL)
      raise ClosureBuilderError

    # Download and extract the closure builder.
    builder_jar = os.path.join(builder_path, BUILDER_JAR_NAME)
    builder_zip = os.path.join(builder_path, BUILDER_ZIP_NAME)
    builder_zipfile = None
    try:
      urllib.urlretrieve(BUILDER_URL, builder_zip)
      builder_zipfile = zipfile.ZipFile(builder_zip)
      builder_zipfile.extract(BUILDER_JAR_NAME, builder_path)
      if not os.path.isfile(builder_jar):
        raise ClosureBuilderError('closure-builder.jar could not be found '
                                   'after download and extraction.')
    except (IOError, urllib.ContentTooShortError, RuntimeError,
            ClosureBuilderError), e:
      shutil.rmtree(builder_path)
      logging.error('Failed to download and extract the closure-builder with '
                    'error: %s' % e)
      raise ClosureBuilderError
    finally:
      if os.path.isfile(builder_zip):
        os.remove(builder_zip)
      if builder_zipfile:
        builder_zipfile.close()

  @staticmethod
  def IsInstalled(location=None):
    """Determine if the closure builder is installed.

    Args:
      location: Optional location to search for the tool. (string)

    Returns:
      Whether or not the closure library and builder are installed.
    """
    location = location or ''
    return os.path.isdir(os.path.join(location, BUILDER_PATH_NAME))

  @staticmethod
  def Uninstall(location=None):
    """Removes the closure builder.

    Args:
      location: Optional location to search for the tool. (string)

    Raises:
      ClosureBuilderError: Fails to remove the closure-builder subtree.
    """
    if ClosureBuilder.IsInstalled(location):
      try:
        shutil.rmtree(os.path.join(location, BUILDER_PATH_NAME))
      except OSError, e:
        logging.error('Failed to remove the closure builder: %s.' % e)
        raise ClosureBuilderError

if __name__ == '__main__':
  pass


text:
package com.sinotrans.transport.dto;

import com.sinotrans.transport.common.enums.OrderProcessStateType;
import com.sinotrans.transport.dto.common.RestResponse;
import com.sinotrans.transport.dto.vo.NoticeRespVo;

/**
 * Created by emi on 2016/8/26.
 */
public class NoticeCreateResponse extends RestResponse {

    private String orderChangeState;//订单修改状态int类型
    private String orderChangeStateDesc;//订单修改状态string类型  0:不存在  1:已处理  2:未处理  3:催单中 !!

    private NoticeRespVo noticeVo;

    public NoticeCreateResponse() {
    }

    public NoticeCreateResponse(int orderChangeState, NoticeRespVo noticeVo) {
        this.orderChangeState = orderChangeState + "";
        this.orderChangeStateDesc = OrderProcessStateType.descOfChange(orderChangeState);
        this.noticeVo = noticeVo;
    }

    public String getOrderChangeState() {
        return orderChangeState;
    }

    public void setOrderChangeState(String orderChangeState) {
        this.orderChangeState = orderChangeState;
    }

    public String getOrderChangeStateDesc() {
        return orderChangeStateDesc;
    }

    public void setOrderChangeStateDesc(String orderChangeStateDesc) {
        this.orderChangeStateDesc = orderChangeStateDesc;
    }

    public NoticeRespVo getNoticeVo() {
        return noticeVo;
    }

    public void setNoticeVo(NoticeRespVo noticeVo) {
        this.noticeVo = noticeVo;
    }
}

redpajama_set_name: RedPajamaGithub


text:
=======
History
=======

0.2.0 (2019-05-29)
------------------

* Added support for Python 3.6, 3.7.
* Dropped support for Python 2.6, 3.2 - 3.4. They may still work, no promises.
* Renamed DEFAULT_ALOGRITHM to DEFAULT_ALGORITHM
* Renamed b58_digest arguments to b64digest
* Added Hash.b64digest
* Added type checking to Hash.__init__() arguments
* Added docstrings and doctests to Hash methods

0.1.0 (2015-10-19)
------------------

* Initial release.


text:
title: Porque NÃO cantar o "Abraço da Paz" na missa
date: 2015-01-19
author: Gustavo Furtado de Oliveira Alves
category: Músicas para Missa
slug: porque-nao-cantar-o-abraco-da-paz-na-missa
description: Porque não se deve ter a música de 'Abraço da Paz' na missa.
image: https://blog.musicasparamissa.com.br/images/canto-abraço-da-paz2.jpg

Em julho do ano de 2014, a Santa Sé, por meio da Congregação para o
Culto Divino e a Disciplina dos Sacramentos, [emitiu uma
carta](http://vaticaninsider.lastampa.it/fileadmin/user_upload/File_Versione_originale/Rito_de_la_Paz.pdf){:target="\_blank"}
que gerou bastante discussão entre os músicos que prestam serviços nas
missas. Então não é mais pra cantar no "Abraço da Paz" durante a missa?
Mas por quê?

![canto abraço da paz](/images/canto-abraço-da-paz.jpg){:style="float: right; padding: 10px; max-width: 100%;"}

Muita gente não sabia que, na verdade, o "canto da Paz" não é previsto
em nenhum ritual da Igreja, embora seja comum em muitas comunidades.
O canto da paz se tornou um **costume** no momento de saudar o irmão com
um abraço ou aperto de mãos, mas a oferta da paz já aconteceu quando o
sacerdote disse: "*A paz do Senhor esteja sempre convosco*" e o povo
respondeu: "*o amor de Cristo nos uniu*". Deste modo, o padre já
expressou o abraço da paz de forma coletiva.

##Então, nada de música?

A música no momento do abraço da paz faz este
momento se estender mais do que deveria. Por este motivo, a Santa Sé
pede que não se utilize mais músicas para este momento.

A carta emitida pela Santa Sé veio para acabar com os abusos, mas não
impede que nos saudemos. O que não deve acontecer é uma música dedicada
exclusivamente à saudação da paz para não estender este momento que não
deve ser longo.

A orientação aos músicos é que, caso o diácono diga "*Saudemos uns aos
outros na paz de Cristo*", o grupo de sustentação da música pode fazer
um breve instrumental, desde que este já seja em preparação para o canto
do Cordeiro, caso este seja cantado.

##A Carta Circular

Na "Carta Circular: O significado ritual do Dom da Paz na Missa" a Santa
Sé ordena que acabem com os abusos no momento da Paz. Dentre as
prescrições, a carta diz:

- Nada de sair do lugar para dar a paz, mas dar-se-á apenas para as
pessoas que estão mais próximas.

- Nada de músicas, pois isso além de não estar previsto, aumenta
bastante um momento que não deve ser longo.

- Nada de o celebrante sair do presbitério para dar a paz a outras
pessoas.

A carta foi escrita pelo **Cardeal CAÑIZARES LLOVERA**,
prefeito da CONGREGAÇÃO PARA O CULTO DIVINO E A DISCIPLINA DOS SACRAMENTOS.

![canĩzares e papa francisco](/images/canizares-francisco.jpg){:style="display: block; margin-left: auto; margin-right: auto; padding: 10px; max-width: 100%;" }

*O Santo Padre Francisco, no dia 7 de junho de 2014, aprovou e confirmou
o que se contém nesta Carta circular, preparada pela Congregação para o
Culto Divino e a Disciplina dos Sacramentos, e ordenou sua publicação.*

[Veja a carta original aqui]( http://vaticaninsider.lastampa.it/fileadmin/user_upload/File_Versione_originale/Rito_de_la_Paz.pdf){:target="\_blank"}

##Tradução da carta circular

**CONGREGAÇÃO PARA O CULTO DIVINO E A DISCIPLINA DOS SACRAMENTOS
CARTA CIRCULAR: O SIGNIFICADO RITUAL DO DOM DA PAZ NA MISSA**

1 - "Deixo-vos a paz, dou-vos a minha paz"[1], são as palavras com as
quais Jesus promete aos discípulos reunidos no cenáculo, antes de
enfrentar a paixão, o dom da paz, para infundir-lhes a gozosa certeza de
sua presença permanente. Depois de sua ressurreição, o Senhor leva ao
termo sua promessa apresentando-se no meio deles, no lugar em que se
encontravam por temor aos Judeus, dizendo: "A paz esteja convosco!"[2].
A paz, fruto da Redenção que Cristo trouxe ao mundo com sua morte e
ressurreição, é o dom que o Ressuscitado segue oferecendo hoje a sua
Igreja, reunida para a celebração da Eucaristia, de modo que possa
testemunhá-la na vida de cada dia.

2 - Na tradição litúrgica romana o sinal da paz, colocado antes da
Comunhão, tem um significado teológico próprio. Este encontra seu ponto
de referência na contemplação eucarística do mistério pascal -
diversamente de como fazem outras famílias litúrgicas que se inspiram na
passagem evangélica de Mateus (cf. Mt 5, 23) - apresentando-se assim
como o "beijo pascal" de Cristo ressuscitado presente no altar [3]. Os
ritos que preparam a comunhão constituem um conjunto bem articulado
dentro do qual cada elemento tem seu próprio significado e contribui ao
sentido do conjunto da sequência ritual, que conduz à participação
sacramental no mistério celebrado. O sinal da paz, portanto, se encontra
entre o Pater noster - ao qual se une mediante o embolismo que prepara
ao gesto da paz - e a fração do pão - durante a qual se implora ao
Cordeiro de Deus que nos dê sua paz -. Com este gesto, que significa a
paz, a comunhão e a caridade"[4], a Igreja implora a paz e a unidade
para si mesma e para toda a família humana, e os fiéis expressam a
comunhão eclesial e a mútua caridade, antes da comunhão sacramental"[5],
isto é, a comunhão no Corpo de Cristo Senhor.

3 - Na Exortação Apostólica pós-sinodal Sacramentum caritatis o papa
Bento XVI havia confiado a esta Congregação a tarefa de considerar a
problemática referente ao sinal da paz[6], com o fim de salvaguardar o
valor sagrado da celebração eucarística e o sentido do mistério no mundo
da Comunhão sacramental: "A Eucaristia é por sua natureza sacramento da
paz. Esta dimensão do Mistério eucarístico se expressa na celebração
litúrgica de maneira específica com o gesto da paz. Trata-se
indubitavelmente de um sinal de grande valor (cf. Jo 14, 28). Em nosso
tempo, tão cheio de conflitos, este gesto adquire, também a partir ponto
de vista da sensibilidade comum, um relevo especial, já que a Igreja
sente cada vez mais como tarefa própria pedir a Deus o dom da paz e a
unidade para si mesma e para toda a família humana. [...] Por isso se
compreende a intensidade com que se vive frequentemente o rito da paz na
celebração litúrgica. A este propósito, contudo, durante o Sínodo dos
bispos se viu a conveniência de moderar este gesto, que pode adquirir
expressões exageradas, provocando certa confusão na assembléia
precisamente antes da Comunhão. Seria bom recordar que o alto valor do
gesto não fica diminuído pela sobriedade necessária para manter um clima
adequado à celebração, limitando por exemplo a troca da paz aos mais
próximos"[7].

4 - O Papa Bento XVI, além de destacar o verdadeiro sentido do rito e do
sinal da paz, punha em evidência seu grande valor como colaboração dos
cristãos, para preencher, mediante sua oração e testemunho, as angústias
mais profundas e inquietantes da humanidade contemporânea. Por esta
razão, renovava seu convite para cuidar este rito e para realizar este
sinal litúrgico com sentido religioso e sobriedade.

5 - O Discasterio, baseado pelas disposições do Papa Bento XVI,
dirigiu-se às Conferências dos bispos em maio de 2008 pedindo seu
parecer sobre se manter o sinal da paz antes da Comunhão, onde se
encontra agora, ou se mudá-lo a outro momento, com o fim de melhorar a
compreensão e o desenvolvimento de tal gesto. Traz uma profunda
reflexão, se viu conveniente conservar na liturgia romana o rito da paz
em seu lugar tradicional e não introduzir mudanças estruturais no Missal
Romano. Oferecem-se na continuação algumas disposições práticas para
expressar melhor o conteúdo do sinal da paz e para moderar os excessos,
que suscitam confusão na assembléias litúrgica antes da Comunhão.

6 - O tema tratado é importante. Se os fiéis não compreendem e não
demonstram viver, em seus gestos rituais, o significado correto do rito
da paz, debilita-se o conceito cristão da paz e se vê afetada
negativamente sua própria frutuosa participação na Eucaristia. Portanto,
junto às precedentes reflexões, que podem constituir o núcleo de uma
oportuna catequese a respeito, para a qual se ofereceram algumas linhas
orientativas, submete-se a prudente consideração das Conferências dos
bispos algumas sugestões práticas:

a) Esclarece-se definitivamente que o rito da paz alcança já seu
profundo significado com a oração e o oferecimento da paz no contexto da
Eucaristia. O dar-se a paz corretamente entre os participantes na Missa
enriquece seu significado e confere expressividade ao próprio rito.
Portanto, é totalmente legítimo afirmar que não é necessário convidar
"mecanicamente" para se dar a paz. Se se prevê que tal troca não se
levará ao fim adequadamente por circunstâncias concretas, ou se retem
pedagogicamente conveniente não realizá-lo em determinadas ocasiões,
pode-se omitir, e inclusive, deve ser omitido. Recorda-se que a rúbrica
do Missal disse: Deinde, pro opportunitate, diaconus, vel sacerdos,
subiungit: Offerte vobis pacem"[8].

b) Baseado nas presentes reflexões, pode ser aconselhável que, com
ocasião da publicação da terceira edição típica do Missal Romano no
próprio País, ou quando se façam novas edições do mesmo, as Conferências
considerem se é oportuno mudar o modo de se dar a paz estabelecido em
seu momento. Por exemplo, naqueles lugares em nos quais se optou por
gesto familiares e profanos de saudação, traz a experiência destes anos,
poderiam-se substituir por gestos mais apropriados.

c) De todos os modos, será necessário que no momento de dar-se a paz
  se evitem alguns abusos tais como:

- A introdução de um "canto para a paz", inexistente no Rito romano
  [9].
- Os deslocamentos dos fiéis para trocar a paz.
- Que o sacerdote abandone o altar para dar a paz a alguns fiéis.
- Que em algumas circunstâncias, como a solenidade de Páscoa ou de
  Natal, ou Confirmação, o Matrimônio, as sagradas Ordens, as Profissões
  religiosas ou as Exequias, o dar-se a paz seja ocasião para felicitar
  ou expressar condolências entre os presentes[10].

d) Convida-se igualmente a todas as Conferências dos bispos a preparar
catequeses litúrgicas sobre o significado do rito da paz na liturgia
romana e sobre seu correto desenvolvimento na celebração da Santa Missa.
A este propósito, a Congregação para o Culto Divino e a Disiciplina dos
Sacramentos acompanha a presente carta com algumas pistas orientativas.

7 - A íntima relação entre lex orandi e lex credendi deve obviamente
estender-se a lex vivendi. Conseguir hoje um compromisso sério dos
católicos frente a construção de um mundo mais justo e pacífico implica
uma compreensão mais profunda do significado cristão da paz e de sua
expressão na celebração litúrgica. Convida-se, então, com insistência a
dar passos eficazes em tal matéria já que dele depende a qualidade de
nossa participação eucarística e o que nos vejamos incluídos entre os
que merecem a graça prometida nas bem-aventuranças aos que trabalham e
constroem a paz[11].

8 - Ao finalizar estas considerações, exorta-se aos bispos, e sob sua
guia, aos sacerdotes a considerar e aprofundar no significado espiritual
do rito da paz, tanto na celebração da Santa Missa como na própria
formação litúrgica e espiritual ou na oportuna catequese aos fiéis.
Cristo é nossa paz[12],a paz divina, anunciada pelos profetas e pelos
anjos, e que Ele trouxe ao mundo com seu mistério pascal. Esta paz do
Senhor Ressuscitado é invocada, anunciada e difundida nas celebração,
também através de um gesto humano elevado ao âmbito sagrado.

O Santo Padre Francisco, no dia 7 de junho de 2014, aprovou e
  confirmou o que se contém nesta Carta circular, preparada pela
  Congregação para o Culto Divino e a Disciplina dos Sacramentos, e
  ordenou sua publicação.
Na sede da Congregação para o Culto Divino e a Disciplina dos
  Sacramentos, ao dia 08 de junho de 2014, na solenidade de Pentecostes.

Antonio Card. CAÑIZARES LLOVERA
Prefeito

Arthur ROCHE
Arcebispo Secretário

--------------

Notas:

[1]. Jo 14, 27

[2]. Cfr. Jo 20, 19-23.

[3]. Cf. MISSALE ROMANUM *ex decreto SS. Concilii Tridentini restitutum
summorum pontificum cura recognitum, Editio typica*, 1962, *Ritus
servandus*, X, 3.

[4]. CONGREGAÇÃO PARA O CULTO DIVINO E A DISCIPLINA DOS SACRAMENTOS,
Instr., redemptionis sacramentum, 25 de março de 2004, n. 71: AAS 96
(2004) 571.

[5]. *MISSALE ROMANUM, ex decreto sacrosancti Oecumenici Concilii
Vaticani II instauratum, auctoritate Pauli Pp. VI promulgatum, Ioannis
Pauli Pp. II cura recognitum, editio typica tertiam, diei 20 aprilis
2000,Typis Vaticanis, reimpressio emendata 2008, Ordenação Geral do
Missal Romano*, n. 82.

[6]. Cf. BENTO XVI, Exhort. Apost. pós-sinod., *Sacramentum caritatis*,
22 de fevereiro de 2007, n. 49: AAS 99 (2007) 143

[7]. Cf. Bento XVI, Exhort. Apost., *Sacramentum caritatis*, 22 de
fevereiro de 2007, n. 49, nota n. 150: AAS 99 (2007) 143.

[8]. MISSALE ROMANUM, *Ordo Missae,* n. 128

[9]. No rito romano não está tradicionalmente previsto um canto para a
paz porque se prevê um tempo brevíssimo para dar a paz somente aos mais
perto. O canto da paz sugere, pelo contrário, um tempo muito largo para
a troca da paz.

[10]. Cf. Ordenação Geral do Missal Romano, n. 82: "Conveniente,
contudo, que cada um expresse sobriamente a paz somente aos que tem mais
próximo"; n. 154: "O sacerdote pode dar a paz aos ministros,
permanecendo sempre dentro do presbitério, para não alterar a
celebração. Faça-se do mesmo modo se, por uma causa razoável, deseja dar
a paz a alguns fiéis"; CONGREGAÇÃO PARA O CULTO DIVINO E A DISCIPLINA
DOS SACRAMENTOS, Instr., *Redemptionis sacramentum*, 25 de março de
2004, n. 72: AAS 96 (2004) 572.

[11]. Cf. Mt 5, 9ss.

[12]. Ef. 2, 14.


text:
class RSpec::Core::Example
  def passed?
    @exception.nil?
  end

  def failed?
    !passed?
  end
end


text:
<!DOCTYPE HTML>

        <title>Password required</title>

Password required

You need a password to access this page.

        <form action="{{ action_url }}" method="POST">
            {% csrf_token %}
            {{ form.as_p }}
            <input type="submit" value="Continue" class="button" />
        </form>


text:
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.

using Azure.Core;
using Azure.Core.Pipeline;
using Microsoft.AspNetCore.Hosting;

namespace Microsoft.Extensions.Azure.Samples
{
    internal class DependencyInjectionEnabledPolicy : HttpPipelineSynchronousPolicy
    {
        private readonly IHostingEnvironment _environment;

        public DependencyInjectionEnabledPolicy(IHostingEnvironment environment)
        {
            this._environment = environment;
        }

        public override void OnSendingRequest(HttpMessage message)
        {
            message.Request.Headers.Add("application-name", _environment.ApplicationName);
            base.OnSendingRequest(message);
        }
    }
}


text:
package com.amazonaws.services.cloudsearchv2.model.transform;

import org.w3c.dom.Node;

import com.amazonaws.AmazonServiceException;
import com.amazonaws.util.XpathUtils;
import com.amazonaws.transform.StandardErrorUnmarshaller;

import com.amazonaws.services.cloudsearchv2.model.DisabledOperationException;

public class DisabledOperationExceptionUnmarshaller extends
        StandardErrorUnmarshaller {

    public DisabledOperationExceptionUnmarshaller() {
        super(DisabledOperationException.class);
    }

    @Override
    public AmazonServiceException unmarshall(Node node) throws Exception {
        // Bail out if this isn't the right error code that this
        // marshaller understands
        String errorCode = parseErrorCode(node);
        if (errorCode == null || !errorCode.equals("DisabledAction"))
            return null;

        DisabledOperationException e = (DisabledOperationException) super
                .unmarshall(node);

        return e;
    }
}


text:
require File.expand_path('../../../spec_helper', __FILE__)
require File.expand_path('../fixtures/classes.rb', __FILE__)
require File.expand_path('../shared/slice.rb', __FILE__)

describe "String#slice" do
  it_behaves_like :string_slice, :slice
end

describe "String#slice with index, length" do
  it_behaves_like :string_slice_index_length, :slice
end

describe "String#slice with Range" do
  it_behaves_like :string_slice_range, :slice
end

describe "String#slice with Regexp" do
  it_behaves_like :string_slice_regexp, :slice
end

describe "String#slice with Regexp, index" do
  it_behaves_like :string_slice_regexp_index, :slice
end

ruby_version_is "1.9" do
  describe "String#slice with Regexp, group" do
    it_behaves_like :string_slice_regexp_group, :slice
  end
end

describe "String#slice with String" do
  it_behaves_like :string_slice_string, :slice
end

describe "String#slice! with index" do
  it "deletes and return the char at the given position" do
    a = "hello"
    a.slice!(1).should == ?e
    a.should == "hllo"
    a.slice!(-1).should == ?o
    a.should == "hll"
  end

  it "returns nil if idx is outside of self" do
    a = "hello"
    a.slice!(20).should == nil
    a.should == "hello"
    a.slice!(-20).should == nil
    a.should == "hello"
  end

  ruby_version_is ""..."1.9" do
    it "raises a TypeError if self is frozen" do
      lambda { "hello".freeze.slice!(1) }.should raise_error(TypeError)
    end
  end

  ruby_version_is "1.9" do
    it "raises a RuntimeError if self is frozen" do
      lambda { "hello".freeze.slice!(1)  }.should raise_error(RuntimeError)
      lambda { "hello".freeze.slice!(10) }.should raise_error(RuntimeError)
      lambda { "".freeze.slice!(0)       }.should raise_error(RuntimeError)
    end
  end

  ruby_version_is ""..."1.9" do
    it "doesn't raise a TypeError if self is frozen and idx is outside of self" do
      "hello".freeze.slice!(10).should be_nil
      "".freeze.slice!(0).should be_nil
    end
  end

  it "calls to_int on index" do
    "hello".slice!(0.5).should == ?h

    obj = mock('1')
    # MRI calls this twice so we can't use should_receive here.
    def obj.to_int() 1 end
    "hello".slice!(obj).should == ?e

    obj = mock('1')
    def obj.respond_to?(name, *) name == :to_int ? true : super; end
    def obj.method_missing(name, *) name == :to_int ? 1 : super; end
    "hello".slice!(obj).should == ?e
  end
end

describe "String#slice! with index, length" do
  it "deletes and returns the substring at idx and the given length" do
    a = "hello"
    a.slice!(1, 2).should == "el"
    a.should == "hlo"

    a.slice!(1, 0).should == ""
    a.should == "hlo"

    a.slice!(-2, 4).should == "lo"
    a.should == "h"
  end

  it "always taints resulting strings when self is tainted" do
    str = "hello world"
    str.taint

    str.slice!(0, 0).tainted?.should == true
    str.slice!(2, 1).tainted?.should == true
  end

  it "returns nil if the given position is out of self" do
    a = "hello"
    a.slice(10, 3).should == nil
    a.should == "hello"

    a.slice(-10, 20).should == nil
    a.should == "hello"
  end

  it "returns nil if the length is negative" do
    a = "hello"
    a.slice(4, -3).should == nil
    a.should == "hello"
  end

  ruby_version_is "1.9" do
    it "raises a RuntimeError if self is frozen" do
      lambda { "hello".freeze.slice!(1, 2)  }.should raise_error(RuntimeError)
      lambda { "hello".freeze.slice!(10, 3) }.should raise_error(RuntimeError)
      lambda { "hello".freeze.slice!(-10, 3)}.should raise_error(RuntimeError)
      lambda { "hello".freeze.slice!(4, -3) }.should raise_error(RuntimeError)
      lambda { "hello".freeze.slice!(10, 3) }.should raise_error(RuntimeError)
      lambda { "hello".freeze.slice!(-10, 3)}.should raise_error(RuntimeError)
      lambda { "hello".freeze.slice!(4, -3) }.should raise_error(RuntimeError)
    end
  end

  it "calls to_int on idx and length" do
    "hello".slice!(0.5, 2.5).should == "he"

    obj = mock('2')
    def obj.to_int() 2 end
    "hello".slice!(obj, obj).should == "ll"

    obj = mock('2')
    def obj.respond_to?(name, *) name == :to_int; end
    def obj.method_missing(name, *) name == :to_int ? 2 : super; end
    "hello".slice!(obj, obj).should == "ll"
  end

  it "returns subclass instances" do
    s = StringSpecs::MyString.new("hello")
    s.slice!(0, 0).should be_kind_of(StringSpecs::MyString)
    s.slice!(0, 4).should be_kind_of(StringSpecs::MyString)
  end
end

describe "String#slice! Range" do
  it "deletes and return the substring given by the offsets of the range" do
    a = "hello"
    a.slice!(1..3).should == "ell"
    a.should == "ho"
    a.slice!(0..0).should == "h"
    a.should == "o"
    a.slice!(0...0).should == ""
    a.should == "o"

    # Edge Case?
    "hello".slice!(-3..-9).should == ""
  end

  it "returns nil if the given range is out of self" do
    a = "hello"
    a.slice!(-6..-9).should == nil
    a.should == "hello"

    b = "hello"
    b.slice!(10..20).should == nil
    b.should == "hello"
  end

  it "always taints resulting strings when self is tainted" do
    str = "hello world"
    str.taint

    str.slice!(0..0).tainted?.should == true
    str.slice!(2..3).tainted?.should == true
  end

  it "returns subclass instances" do
    s = StringSpecs::MyString.new("hello")
    s.slice!(0...0).should be_kind_of(StringSpecs::MyString)
    s.slice!(0..4).should be_kind_of(StringSpecs::MyString)
  end

  it "calls to_int on range arguments" do
    from = mock('from')
    to = mock('to')

    # So we can construct a range out of them...
    def from.<=>(o) 0 end
    def to.<=>(o) 0 end

    def from.to_int() 1 end
    def to.to_int() -2 end

    "hello there".slice!(from..to).should == "ello ther"

    from = mock('from')
    to = mock('to')

    def from.<=>(o) 0 end
    def to.<=>(o) 0 end

    def from.respond_to?(name, *) name == :to_int; end
    def from.method_missing(name) name == :to_int ? 1 : super; end
    def to.respond_to?(name, *) name == :to_int; end
    def to.method_missing(name) name == :to_int ? -2 : super; end

    "hello there".slice!(from..to).should == "ello ther"
  end

  it "works with Range subclasses" do
    a = "GOOD"
    range_incl = StringSpecs::MyRange.new(1, 2)

    a.slice!(range_incl).should == "OO"
  end

  ruby_version_is ""..."1.9" do
    it "raises a TypeError on a frozen instance that would be modifed" do
      lambda { "hello".freeze.slice!(1..3) }.should raise_error(TypeError)
    end

    it "does not raise an exception on a frozen instance that would not be modified" do
      "hello".freeze.slice!(10..20).should be_nil
    end
  end

  ruby_version_is "1.9" do
    it "raises a RuntimeError on a frozen instance that is modified" do
      lambda { "hello".freeze.slice!(1..3)  }.should raise_error(RuntimeError)
    end

    # see redmine #1551
    it "raises a RuntimeError on a frozen instance that would not be modified" do
      lambda { "hello".freeze.slice!(10..20)}.should raise_error(RuntimeError)
    end
  end
end

describe "String#slice! with Regexp" do
  it "deletes and returns the first match from self" do
    s = "this is a string"
    s.slice!(/s.*t/).should == 's is a st'
    s.should == 'thiring'

    c = "hello hello"
    c.slice!(/llo/).should == "llo"
    c.should == "he hello"
  end

  it "returns nil if there was no match" do
    s = "this is a string"
    s.slice!(/zzz/).should == nil
    s.should == "this is a string"
  end

  it "always taints resulting strings when self or regexp is tainted" do
    strs = ["hello world"]
    strs += strs.map { |s| s.dup.taint }

    strs.each do |str|
      str = str.dup
      str.slice!(//).tainted?.should == str.tainted?
      str.slice!(/hello/).tainted?.should == str.tainted?

      tainted_re = /./
      tainted_re.taint

      str.slice!(tainted_re).tainted?.should == true
    end
  end

  it "doesn't taint self when regexp is tainted" do
    s = "hello"
    s.slice!(/./.taint)
    s.tainted?.should == false
  end

  it "returns subclass instances" do
    s = StringSpecs::MyString.new("hello")
    s.slice!(//).should be_kind_of(StringSpecs::MyString)
    s.slice!(/../).should be_kind_of(StringSpecs::MyString)
  end

  it "sets $~ to MatchData when there is a match and nil when there's none" do
    'hello'.slice!(/./)
    $~[0].should == 'h'

    'hello'.slice!(/not/)
    $~.should == nil
  end

  ruby_version_is ""..."1.9" do
    it "raises a TypeError on a frozen instance that is modified" do
      lambda { "this is a string".freeze.slice!(/s.*t/) }.should raise_error(TypeError)
    end

    it "does not raise an exception on a frozen instance that would not be modified" do
      "this is a string".freeze.slice!(/zzz/).should be_nil
    end
  end

  ruby_version_is "1.9" do
    it "raises a RuntimeError on a frozen instance that is modified" do
      lambda { "this is a string".freeze.slice!(/s.*t/) }.should raise_error(RuntimeError)
    end

    it "raises a RuntimeError on a frozen instance that would not be modified" do
      lambda { "this is a string".freeze.slice!(/zzz/)  }.should raise_error(RuntimeError)
    end
  end
end

describe "String#slice! with Regexp, index" do
  it "deletes and returns the capture for idx from self" do
    str = "hello there"
    str.slice!(/[aeiou](.)\1/, 0).should == "ell"
    str.should == "ho there"
    str.slice!(/(t)h/, 1).should == "t"
    str.should == "ho here"
  end

  it "always taints resulting strings when self or regexp is tainted" do
    strs = ["hello world"]
    strs += strs.map { |s| s.dup.taint }

    strs.each do |str|
      str = str.dup
      str.slice!(//, 0).tainted?.should == str.tainted?
      str.slice!(/hello/, 0).tainted?.should == str.tainted?

      tainted_re = /(.)(.)(.)/
      tainted_re.taint

      str.slice!(tainted_re, 1).tainted?.should == true
    end
  end

  it "doesn't taint self when regexp is tainted" do
    s = "hello"
    s.slice!(/(.)(.)/.taint, 1)
    s.tainted?.should == false
  end

  it "returns nil if there was no match" do
    s = "this is a string"
    s.slice!(/x(zzz)/, 1).should == nil
    s.should == "this is a string"
  end

  it "returns nil if there is no capture for idx" do
    "hello there".slice!(/[aeiou](.)\1/, 2).should == nil
    # You can't refer to 0 using negative indices
    "hello there".slice!(/[aeiou](.)\1/, -2).should == nil
  end

  it "calls to_int on idx" do
    obj = mock('2')
    def obj.to_int() 2 end

    "har".slice!(/(.)(.)(.)/, 1.5).should == "h"
    "har".slice!(/(.)(.)(.)/, obj).should == "a"

    obj = mock('2')
    def obj.respond_to?(name, *) name == :to_int; end
    def obj.method_missing(name) name == :to_int ? 2: super; end
    "har".slice!(/(.)(.)(.)/, obj).should == "a"
  end

  it "returns subclass instances" do
    s = StringSpecs::MyString.new("hello")
    s.slice!(/(.)(.)/, 0).should be_kind_of(StringSpecs::MyString)
    s.slice!(/(.)(.)/, 1).should be_kind_of(StringSpecs::MyString)
  end

  it "sets $~ to MatchData when there is a match and nil when there's none" do
    'hello'[/.(.)/, 0]
    $~[0].should == 'he'

    'hello'[/.(.)/, 1]
    $~[1].should == 'e'

    'hello'[/not/, 0]
    $~.should == nil
  end

  ruby_version_is ""..."1.9" do
    it "raises a TypeError if self is frozen" do
      lambda { "this is a string".freeze.slice!(/s.*t/) }.should raise_error(TypeError)
    end

    it "doesn't raise a TypeError if self is frozen but there is no match" do
      "this is a string".freeze.slice!(/zzz/, 0).should == nil
    end

    it "doesn't raise a TypeError if self is frozen but there is no capture for idx" do
      "this is a string".freeze.slice!(/(.)/, 2).should == nil
    end
  end

  ruby_version_is "1.9" do
    it "raises a RuntimeError if self is frozen" do
      lambda { "this is a string".freeze.slice!(/s.*t/)  }.should raise_error(RuntimeError)
      lambda { "this is a string".freeze.slice!(/zzz/, 0)}.should raise_error(RuntimeError)
      lambda { "this is a string".freeze.slice!(/(.)/, 2)}.should raise_error(RuntimeError)
    end
  end
end

describe "String#slice! with String" do
  it "removes and returns the first occurrence of other_str from self" do
    c = "hello hello"
    c.slice!('llo').should == "llo"
    c.should == "he hello"
  end

  it "taints resulting strings when other is tainted" do
    strs = ["", "hello world", "hello"]
    strs += strs.map { |s| s.dup.taint }

    strs.each do |str|
      str = str.dup
      strs.each do |other|
        other = other.dup
        r = str.slice!(other)

        r.tainted?.should == !r.nil? & other.tainted?
      end
    end
  end

  it "doesn't set $~" do
    $~ = nil

    'hello'.slice!('ll')
    $~.should == nil
  end

  it "returns nil if self does not contain other" do
    a = "hello"
    a.slice!('zzz').should == nil
    a.should == "hello"
  end

  it "doesn't call to_str on its argument" do
    o = mock('x')
    o.should_not_receive(:to_str)

    lambda { "hello".slice!(o) }.should raise_error(TypeError)
  end

  it "returns a subclass instance when given a subclass instance" do
    s = StringSpecs::MyString.new("el")
    r = "hello".slice!(s)
    r.should == "el"
    r.should be_kind_of(StringSpecs::MyString)
  end

  ruby_version_is ""..."1.9" do
    it "raises a TypeError if self is frozen" do
      lambda { "hello hello".freeze.slice!('llo') }.should raise_error(TypeError)
    end
  end

  ruby_version_is "1.9" do
    it "raises a RuntimeError if self is frozen" do
      lambda { "hello hello".freeze.slice!('llo')     }.should raise_error(RuntimeError)
      lambda { "this is a string".freeze.slice!('zzz')}.should raise_error(RuntimeError)
      lambda { "this is a string".freeze.slice!('zzz')}.should raise_error(RuntimeError)
    end
  end
end


text:
namespace device {

MockBluetoothAdapter::Observer::Observer() {}
MockBluetoothAdapter::Observer::~Observer() {}

MockBluetoothAdapter::MockBluetoothAdapter() {
}

MockBluetoothAdapter::~MockBluetoothAdapter() {}

}  // namespace device


text:
package com.googlecode.leptonica.android;

import android.graphics.Point;

/**
 * Wrapper for Leptonica's native BOX.
 *
 * @author alanv@google.com (Alan Viverette)
 */
public class Box {

    /** The index of the X coordinate within the geometry array. */
    public static final int INDEX_X = 0;

    /** The index of the Y coordinate within the geometry array. */
    public static final int INDEX_Y = 1;

    /** The index of the width within the geometry array. */
    public static final int INDEX_W = 2;

    /** The index of the height within the geometry array. */
    public static final int INDEX_H = 3;

    /**
     * A pointer to the native Box object. This is used internally by native
     * code.
     */
    private final long mNativeBox;

    private boolean mRecycled = false;

    /**
     * Creates a new Box wrapper for the specified native BOX.
     *
     * @param nativeBox A pointer to the native BOX.
     */
    public Box(long nativeBox) {
        mNativeBox = nativeBox;
        mRecycled = false;
    }

    /**
     * Creates a box with the specified geometry.
     *
     * @param x X-coordinate of the top-left corner of the box.
     * @param y Y-coordinate of the top-left corner of the box.
     * @param w Width of the box.
     * @param h Height of the box.
     */
    public Box(int x, int y, int w, int h) {
        long nativeBox = nativeCreate(x, y, w, h);

        if (nativeBox == 0) {
            throw new OutOfMemoryError();
        }

        mNativeBox = nativeBox;
        mRecycled = false;
    }

    public Point getCenter() {
        int[] g = new int[4];
        getGeometry(g);
        return new Point(g[0] + g[2] / 2, g[1] + g[3] / 2);
    }

    /**
     * Returns the box's x-coordinate in pixels.
     *
     * @return The box's x-coordinate in pixels.
     */
    public int getX() {
        return nativeGetX(mNativeBox);
    }

    /**
     * Returns the box's y-coordinate in pixels.
     *
     * @return The box's y-coordinate in pixels.
     */
    public int getY() {
        return nativeGetY(mNativeBox);
    }

    /**
     * Returns the box's width in pixels.
     *
     * @return The box's width in pixels.
     */
    public int getWidth() {
        return nativeGetWidth(mNativeBox);
    }

    /**
     * Returns the box's height in pixels.
     *
     * @return The box's height in pixels.
     */
    public int getHeight() {
        return nativeGetHeight(mNativeBox);
    }

    /**
     * Returns an array containing the coordinates of this box. See INDEX_*
     * constants for indices.
     *
     * @return an array of box oordinates
     */
    public int[] getGeometry() {
        int[] geometry = new int[4];

        if (getGeometry(geometry)) {
            return geometry;
        }

        return null;
    }

    /**
     * Fills an array containing the coordinates of this box. See INDEX_*
     * constants for indices.
     *
     * @param geometry A 4+ element integer array to fill with coordinates.
     * @return true on success
     */
    public boolean getGeometry(int[] geometry) {
        if (geometry.length < 4) {
            throw new IllegalArgumentException("Geometry array must be at least 4 elements long");
        }

        return nativeGetGeometry(mNativeBox, geometry);
    }

    /**
     * Releases resources and frees any memory associated with this Box.
     */
    public void recycle() {
        if (!mRecycled) {
            nativeDestroy(mNativeBox);

            mRecycled = true;
        }
    }

    public long getNativeBox() {
        return mNativeBox;
    }

    // ***************
    // * NATIVE CODE *
    // ***************

    private static native long nativeCreate(int x, int y, int w, int h);

    private static native int nativeGetX(long nativeBox);

    private static native int nativeGetY(long nativeBox);

    private static native int nativeGetWidth(long nativeBox);

    private static native int nativeGetHeight(long nativeBox);

    private static native void nativeDestroy(long nativeBox);

    private static native boolean nativeGetGeometry(long nativeBox, int[] geometry);

}


text:
package com.facebook.buck.core.description.arg;

import com.facebook.buck.core.model.UnflavoredBuildTarget;
import com.facebook.buck.core.sourcepath.SourcePath;
import com.google.common.collect.ImmutableList;
import com.google.common.collect.ImmutableSet;
import com.google.common.collect.ImmutableSortedSet;
import com.google.common.collect.Sets;
import java.util.Optional;
import java.util.Set;
import org.immutables.value.Value;

/** Common arguments for build rules (but not configuration rules) */
public interface BuildRuleArg extends ConstructorArg, HasContacts {
  ImmutableSet<SourcePath> getLicenses();

  @Value.NaturalOrder
  ImmutableSortedSet<String> getLabels();

  String DEFAULT_TARGET_PLATFORM_PARAM_NAME = "defaultTargetPlatform";

  /**
   * The name of build target default "new" platform: it is used when a platform is not specified
   * either globally or in a target which used this target as a dependency.
   *
   * <p>The value is a build target, but we specify it as string, because this function is not
   * actually called, but the attr is fetched by name from the raw (unconfigured) target node.
   */
  @Hint(isDep = false, isConfigurable = false)
  Optional<UnflavoredBuildTarget> getDefaultTargetPlatform();

  @Hint(isDep = false, isConfigurable = false)
  Optional<UnflavoredBuildTarget> getDefaultHostPlatform();

  /** A list of {@code config_setting} a target is compatible with. */
  @Hint(isDep = false, isConfigurable = false)
  ImmutableList<UnflavoredBuildTarget> getCompatibleWith();

  @Value.Derived
  default boolean labelsContainsAnyOf(Set<String> labels) {
    return !Sets.intersection(this.getLabels(), labels).isEmpty();
  }
}


text:
package rx.observables;

import java.io.IOException;

import org.junit.Test;

import rx.Observable;
import rx.observers.TestSubscriber;

public class ObservableSplitTest {

    void test(String[] input, String pattern, String[] output, boolean rebatch) {
        TestSubscriber<String> ts = new TestSubscriber<String>();
        Observable<String> o = StringObservable.split(Observable.from(input), pattern);
        if (rebatch) {
            o = o.rebatchRequests(1);
        }
        o.subscribe(ts);

        ts.assertValues(output);
        ts.assertNoErrors();
        ts.assertCompleted();
    }

    @Test
    public void split1() {
        test(new String[] {"ab", ":cd", "e:fgh" }, ":", new String[] { "ab", "cde", "fgh" }, false);
    }

    @Test
    public void split1Request1() {
        test(new String[] {"ab", ":cd", "e:fgh" }, ":", new String[] { "ab", "cde", "fgh" }, true);
    }

    @Test
    public void split2() {
        test(new String[] { "abcdefgh" }, ":", new String[] { "abcdefgh" }, false);
    }

    @Test
    public void split2Request1() {
        test(new String[] { "abcdefgh" }, ":", new String[] { "abcdefgh" }, true);
    }

    @Test
    public void splitEmpty() {
        test(new String[] { }, ":", new String[] { }, false);
    }

    @Test
    public void splitError() {
        TestSubscriber<String> ts = new TestSubscriber<String>();
        Observable<String> o = StringObservable.split(Observable.<String>empty().concatWith(Observable.<String>error(new IOException())), ":");
        o.subscribe(ts);

        ts.assertNoValues();
        ts.assertNotCompleted();
        ts.assertError(IOException.class);
    }

    @Test
    public void splitExample1() {
        test(new String[] { "boo:and:foo" }, ":", new String[] { "boo", "and", "foo" }, false);
    }

    @Test
    public void splitExample1Request1() {
        test(new String[] { "boo:and:foo" }, ":", new String[] { "boo", "and", "foo" }, true);
    }

    @Test
    public void splitExample2() {
        test(new String[] { "boo:and:foo" }, "o", new String[] { "b", "", ":and:f" }, false);
    }

    @Test
    public void splitExample2Request1() {
        test(new String[] { "boo:and:foo" }, "o", new String[] { "b", "", ":and:f" }, true);
    }

    @Test
    public void split3() {
        test(new String[] { "abqw", "ercdqw", "eref" }, "qwer", new String[] { "ab", "cd", "ef" }, false);
    }

    @Test
    public void split3Buffer1Request1() {
        test(new String[] { "abqw", "ercdqw", "eref" }, "qwer", new String[] { "ab", "cd", "ef" }, true);
    }

    @Test
    public void split4() {
        test(new String[] { "ab", ":", "", "", "c:d", "", "e:" }, ":", new String[] { "ab", "c", "de" }, false);
    }

    @Test
    public void split4Request1() {
        test(new String[] { "ab", ":", "", "", "c:d", "", "e:" }, ":", new String[] { "ab", "c", "de" }, true);
    }

}


text:
@class NSString, VoipForceStartObject;

@interface VoipForceStartInActiveState : MMService <MMService>
{
    VoipForceStartObject *_m_audioObject;
    VoipForceStartObject *_m_videoObject;
}

@property(retain, nonatomic) VoipForceStartObject *m_videoObject; // @synthesize m_videoObject=_m_videoObject;
@property(retain, nonatomic) VoipForceStartObject *m_audioObject; // @synthesize m_audioObject=_m_audioObject;
- (void).cxx_destruct;
- (void)startVideo;
- (void)updateVoipVideoStartBlock:(CDUnknownBlockType)arg1;
- (void)startAudio;
- (void)updateVoipAudioStartBlock:(CDUnknownBlockType)arg1;
- (id)init;

// Remaining properties
@property(readonly, copy) NSString *debugDescription;
@property(readonly, copy) NSString *description;
@property(readonly) unsigned long long hash;
@property(readonly) Class superclass;

@end


text:
from distutils.core import setup
#from distutils.command.build_py import build_py as _build_py
import distutils.cmd
from site_scons import pbs

from sys import version_info

# Actually it could work on Python2 but there's already a good riak library
assert (version_info[0] >= 3), ('This requires Python 3')

class Build_py_cmd(distutils.cmd.Command):
    def initialize_options(self):
        pass

    def finalize_options(self):
        pass

    def run(self):
        print("Calling SCons to build the module")
        pbs.scons()

class Clean_cmd(distutils.cmd.Command):
    user_options = []
    def initialize_options(self):
        pass

    def finalize_options(self):
        pass

    def run(self):
        pbs.scons('-c')

class Check_cmd(distutils.cmd.Command):
    user_options = []
    def initialize_options(self):
        pass

    def finalize_options(self):
        pass

    def run(self):
        pbs.scons('test')

setup(name = 'riak3k',
      packages = ['riak3k'],
      py_modules = ['build/release/riak3k.so'],
      package_dir = {'': 'build/release'},
      cmdclass = {
        'build_py': Build_py_cmd,
        'clean': Clean_cmd,
        'check': Check_cmd
      },
      ext_package = 'riak3k',
      version = '0.1',
      description = 'Riak module for python3',
      author = 'Pedro Larroy',
      author_email = 'pedro.larroy.lists@gmail.com',
      license = 'Apache License 2.0',
      keywords = 'riak python3',
      url='https://github.com/larroy/riak_python3',
      classifiers = [
        'Development Status :: 2 - Pre-Alpha',
        'Intended Audience :: Developers',
        'Operating System :: MacOS :: MacOS X',
        'Operating System :: Microsoft :: Windows',
        'Operating System :: POSIX',
        'Topic :: System :: Networking',
        'Topic :: Database',
        'Topic :: Internet'
      ]
)


text:
package org.priceutils.requestmodels;

import java.util.List;

public class MarketStatRequest {
	private boolean isSystem;
	private List<Integer> typeList;
	private int marketLocation;

	private final String urlPrefix
		= "http://api.eve-central.com/api/marketstat/json?";

	public MarketStatRequest(int marketLocation,
				List<Integer> typeList,
				boolean isSystem){
		this.setSystem(isSystem);
		this.setTypeList(typeList);
		this.setMarketLocation(marketLocation);
	}

	public String getRequestUrl(){
		if(typeList == null || typeList.size() == 0){
			return null;
		}
		String buildUrl = urlPrefix;
		if(isSystem){
			buildUrl += "usesystem=" + marketLocation;
		}else{
			buildUrl += "regionlimit=" + marketLocation;
		}

		for(Integer type : typeList){
			buildUrl += "&typeid=" + type;
		}
//		System.out.println("Making call with: " + buildUrl);
		return buildUrl;
	}

	public int getMarketLocation() {
		return marketLocation;
	}

	public void setMarketLocation(int marketLocation) {
		this.marketLocation = marketLocation;
	}

	public List<Integer> getTypeList() {
		return typeList;
	}

	public void setTypeList(List<Integer> typeList) {
		this.typeList = typeList;
	}

	public boolean isSystem() {
		return isSystem;
	}

	public void setSystem(boolean isSystem) {
		this.isSystem = isSystem;
	}

}


text:
package com.github.lufs.grpc.spring.consul.server;

import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.test.context.junit4.SpringRunner;

@RunWith(SpringRunner.class)
@SpringBootTest
public class GrpcSpringConsulServerApplicationTests {

	@Test
	public void contextLoads() {
	}

}


text:
require 'active_record'

# So excited for __dir__ in Ruby 2.0!
ROOT = "#{ File.dirname(File.expand_path(__FILE__)) }/.."

class SpotifyCache < ActiveRecord::Base
  establish_connection(
    adapter: "sqlite3",
    database: "#{ ROOT }/db/spotify-cache.db"
  )
end


text:
using System;
using System.Collections.Generic;
using System.Reactive.Linq;
using System.Reactive.Threading.Tasks;
using MS.Core;

namespace System
{
    public static class __InsufficientExecutionStackException
    {
    }
}


text:
package com.kind.samples.patterns.abstractfactory.impl;

import com.kind.samples.patterns.abstractfactory.BmwCarFactory;

/**
 * Created by weiguo.liu on 2016/10/14.
 */
public class BmwSportCar implements BmwCarFactory {
    public String createBmwCar() {
        return "I am a bmw sport car*********";
    }
}


text:
using System.IO;

using Microsoft.AspNetCore.Hosting;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Hosting;
using Microsoft.Extensions.Logging;

using Serilog;
using Serilog.Extensions.Logging;

using CloudFtpBridge.Core.Utils;

namespace CloudFtpBridge.BlazorApp
{
    public class Program
    {
        public static void Main(string[] args)
        {
            CreateHostBuilder(args).Build().Run();
        }

        public static IHostBuilder CreateHostBuilder(string[] args) =>
            Host.CreateDefaultBuilder(args)
                .UseWindowsService(options =>
                {
                    options.ServiceName = "TcCloudFtpBridge";
                })
                .ConfigureWebHostDefaults(webBuilder =>
                {
                    webBuilder.UseStartup<Startup>();
                })
                .ConfigureLogging((context, logging) =>
                {
                    logging.ClearProviders();

                    var loggerConfig = new LoggerConfiguration()
                        .MinimumLevel.Verbose()
                        .Enrich.FromLogContext()
                        .Enrich.WithEnvironmentUserName()
                        .Enrich.WithMachineName()
                        .WriteTo.File(
                            path: Path.Combine(PathHelper.GetDefaultStoragePath(), @"Logs\CloudFtpBridge.txt"),
                            fileSizeLimitBytes: (250 * 1024 * 1024), // 250MB
                            rollingInterval: RollingInterval.Day,
                            rollOnFileSizeLimit: true);

                    logging.AddProvider(new SerilogLoggerProvider(loggerConfig.CreateLogger(), true));
                })
                .ConfigureServices((context, services) =>
                {
                    services.AddCloudFtpBridge(context.Configuration, app =>
                    {
                        app.UseJsonMailSettingsProvider();
                        app.UseLiteDBLegacyStorage();
                        app.UseLiteDBStorage();
                        app.UseSmtpMailSender();

                        app.UseFluentFTPFileSystem();
                        app.UseLocalFileSystem();
                        app.UseFTPFileSystem();
                    });

                    services.AddHostedService<Worker>();
                });
    }
}


text:
#ifndef SECP256K1_MODULE_MUSIG_KEYAGG_H
#define SECP256K1_MODULE_MUSIG_KEYAGG_H

#include "../../../include/secp256k1.h"
#include "../../../include/secp256k1_musig.h"

#include "../../field.h"
#include "../../group.h"
#include "../../scalar.h"

typedef struct {
    secp256k1_ge pk;
    secp256k1_fe second_pk_x;
    unsigned char pk_hash[32];
    /* tweak is identical to value tacc[v] in the specification. */
    secp256k1_scalar tweak;
    /* parity_acc corresponds to gacc[v] in the spec. If gacc[v] is -1,
     * parity_acc is 1. Otherwise, parity_acc is 0. */
    int parity_acc;
} secp256k1_keyagg_cache_internal;

/* Requires that the saved point is not infinity */
static void secp256k1_point_save(unsigned char *data, secp256k1_ge *ge);

static void secp256k1_point_load(secp256k1_ge *ge, const unsigned char *data);

static int secp256k1_keyagg_cache_load(const secp256k1_context* ctx, secp256k1_keyagg_cache_internal *cache_i, const secp256k1_musig_keyagg_cache *cache);

static void secp256k1_musig_keyaggcoef(secp256k1_scalar *r, const secp256k1_keyagg_cache_internal *cache_i, secp256k1_fe *x);

#endif


text:
using BusinessObjects.Validators;

namespace FatturaElettronicaPA.Validators
{
    /// <summary>
    /// Validates FatturaElettronicaBody.DatiGenerali.DatiBeniServizi.DatiRiepilogo.EsigibilitaIVA.
    /// </summary>
    public class FEsigibilitaIVAValidator : DomainValidator
    {
        private const string BrokenDescription = "Valori ammessi [I] immediata, [D] differita, [S] scissione dei pagamenti.";

        /// <summary>
        /// Validates FatturaElettronicaBody.DatiGenerali.DatiBeniServizi.DatiRiepilogo.EsigibilitaIVA.
        /// </summary>
        public FEsigibilitaIVAValidator() : this(null, BrokenDescription) { }
        public FEsigibilitaIVAValidator(string propertyName) : this(propertyName, BrokenDescription) { }
        public FEsigibilitaIVAValidator(string propertyName, string description) : base(propertyName, description)
        {
            Domain = new[] { "I", "D", "S" };
        }
    }
}


text:
<!doctype html>

  <title>@Index | Mapping | Ebean</title>
  <meta charset="utf-8">
  <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
  <link rel="shortcut icon" href="/images/favicon.ico">
  <link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Roboto|Source+Sans+Pro|Ubuntu&display=swap">
  <link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.1.0/css/all.css" integrity="sha384-lKuwvrZot6UHsBSfcMvOkWwlCMgc0TaWr+30HWe3a4ltaBwTZhyTEggF5tJv8tbt" crossorigin="anonymous">
  <link rel="stylesheet" href="/css/reset3.css">
  <link rel="stylesheet" href="/css/site3.css">
  <link rel="stylesheet" href="/css/pygments3.css">

          Documentation / Mapping / Extension / @Index

    Getting started

    Introduction

    Documentation

    Best practice

    Query

    Persist

    Transactions

    Mapping

    Types

    JPA

    Extensions

    @Identity

    @Index

    @DbEnumValue

    @DbJson

    @DbArray

    @DbMap

    @DbComment

    @DbPartition

    @WhenCreated

    @WhenModified

    @WhoCreated

    @WhoModified

    @SoftDelete

    @Encrypted

    @Formula

    @View

    @History

    @ChangeLog

    @ReadAudit

    DDL & Migrations

    Logging

    Testing

    Database platforms

    Multiple databases

    Kotlin

Tuning

    Features

    Getting help

      API Javadoc

    Videos

    Upgrading

    Releases

<form action="https://www.google.com/search" method="get" class="inline-form">
  <input type="hidden" name="as_sitesearch" value="ebean.io">

      <input class="frm" name="q" id="searchinput" type="text" placeholder="Search... (press 's' to focus)" data-placeholder-focus="Search... (use '↑', '↓' and '⏎' to select results)" data-placeholder-blur="Search... (press 's' to focus)" autocomplete="off">

        <button class="frm" type="submit"></button>

Docs Documentation

And 101 more...

</form>

@Index

  With @Index we can specify additional indexes. We can use this to specify uniqueness,
  function based indexes, compound indexes, platform specific indexes and if the indexes should be
  created concurrently (Postgres only at this stage).

@Index(unique=true)

  This defines if the index is unique. This supports simple unique indexes but also
  function based unique indexes (e.g. unique lower name), compound uniqueness (multiple columns)
  and platform specific syntax.

  For simple cases we can alternatively use @Column(unique=true) or
  @UniqueConstraint.

Platforms

  The platforms attribute limits the database platforms that the index should apply to. It is used so
  that we can define platform specific index definitions.

  We can alternatively specify platform specific DDL for indexes via extra-dll.xml.

@Index(platforms = Platform.H2, unique = true, columnNames = {"name"})
@Index(platforms = Platform.POSTGRES, unique = true, name = "uq_printer_name", columnNames = {"lower(name)"})
@Entity
@Table(name = "printers")
public class DPrinter extends Model {
  ...

  In the above example we specify multiple @Index with the Postgres specific one using
  a function based index lower(name).

Concurrent

  For Postgres this indicates the index should be created concurrently.
  For all other platforms this attribute is ignored.

Definition

  The definition attribute allows use to specify the full DDL to create the index. When we do this we
  should specify the index name in order to support dropping the index.

@Index(
  platforms = Platform.POSTGRES,
  name = "ix_detail_lowername",
  definition = "create index ix_detail_lowername on t_detail using hash (lower(name)) where lower(name) like 'r%'")

  Often this index DDL will be platform specific and if we are testing against multiple database plaforms we specify the
  platforms that the index DDL applies to.


text:
<?php

namespace Alborq\SchemaGenerator\Value\DataValue;

use Alborq\SchemaGenerator\Ref\DataType\DataTypeInterface;

interface DataValueInterface extends DataTypeInterface
{
    /**
     * @return string Formated writting for php var
     */
    public function getPhpFormatedValue();
}


text:
"""Tensorflow Example proto decoder for object detection.

A decoder to decode string tensors containing serialized tensorflow.Example
protos for object detection.
"""
import tensorflow as tf

from tensorflow.python.ops import array_ops
from tensorflow.python.ops import control_flow_ops
from tensorflow.python.ops import math_ops
from object_detection.core import data_decoder
from object_detection.core import standard_fields as fields
from object_detection.protos import input_reader_pb2
from object_detection.utils import label_map_util

slim_example_decoder = tf.contrib.slim.tfexample_decoder

# TODO(lzc): keep LookupTensor and BackupHandler in sync with
# tf.contrib.slim.tfexample_decoder version.
class LookupTensor(slim_example_decoder.Tensor):
  """An ItemHandler that returns a parsed Tensor, the result of a lookup."""

  def __init__(self,
               tensor_key,
               table,
               shape_keys=None,
               shape=None,
               default_value=''):
    """Initializes the LookupTensor handler.

    Simply calls a vocabulary (most often, a label mapping) lookup.

    Args:
      tensor_key: the name of the `TFExample` feature to read the tensor from.
      table: A tf.lookup table.
      shape_keys: Optional name or list of names of the TF-Example feature in
        which the tensor shape is stored. If a list, then each corresponds to
        one dimension of the shape.
      shape: Optional output shape of the `Tensor`. If provided, the `Tensor` is
        reshaped accordingly.
      default_value: The value used when the `tensor_key` is not found in a
        particular `TFExample`.

    Raises:
      ValueError: if both `shape_keys` and `shape` are specified.
    """
    self._table = table
    super(LookupTensor, self).__init__(tensor_key, shape_keys, shape,
                                       default_value)

  def tensors_to_item(self, keys_to_tensors):
    unmapped_tensor = super(LookupTensor, self).tensors_to_item(keys_to_tensors)
    return self._table.lookup(unmapped_tensor)

class BackupHandler(slim_example_decoder.ItemHandler):
  """An ItemHandler that tries two ItemHandlers in order."""

  def __init__(self, handler, backup):
    """Initializes the BackupHandler handler.

    If the first Handler's tensors_to_item returns a Tensor with no elements,
    the second Handler is used.

    Args:
      handler: The primary ItemHandler.
      backup: The backup ItemHandler.

    Raises:
      ValueError: if either is not an ItemHandler.
    """
    if not isinstance(handler, slim_example_decoder.ItemHandler):
      raise ValueError('Primary handler is of type %s instead of ItemHandler' %
                       type(handler))
    if not isinstance(backup, slim_example_decoder.ItemHandler):
      raise ValueError(
          'Backup handler is of type %s instead of ItemHandler' % type(backup))
    self._handler = handler
    self._backup = backup
    super(BackupHandler, self).__init__(handler.keys + backup.keys)

  def tensors_to_item(self, keys_to_tensors):
    item = self._handler.tensors_to_item(keys_to_tensors)
    return control_flow_ops.cond(
        pred=math_ops.equal(math_ops.reduce_prod(array_ops.shape(item)), 0),
        true_fn=lambda: self._backup.tensors_to_item(keys_to_tensors),
        false_fn=lambda: item)

class TfExampleDecoder(data_decoder.DataDecoder):
  """Tensorflow Example proto decoder."""

  def __init__(self,
               load_instance_masks=False,
               instance_mask_type=input_reader_pb2.NUMERICAL_MASKS,
               label_map_proto_file=None,
               use_display_name=False,
               dct_method=''):
    """Constructor sets keys_to_features and items_to_handlers.

    Args:
      load_instance_masks: whether or not to load and handle instance masks.
      instance_mask_type: type of instance masks. Options are provided in
        input_reader.proto. This is only used if `load_instance_masks` is True.
      label_map_proto_file: a file path to a
        object_detection.protos.StringIntLabelMap proto. If provided, then the
        mapped IDs of 'image/object/class/text' will take precedence over the
        existing 'image/object/class/label' ID.  Also, if provided, it is
        assumed that 'image/object/class/text' will be in the data.
      use_display_name: whether or not to use the `display_name` for label
        mapping (instead of `name`).  Only used if label_map_proto_file is
        provided.
      dct_method: An optional string. Defaults to None. It only takes
        effect when image format is jpeg, used to specify a hint about the
        algorithm used for jpeg decompression. Currently valid values
        are ['INTEGER_FAST', 'INTEGER_ACCURATE']. The hint may be ignored, for
        example, the jpeg library does not have that specific option.

    Raises:
      ValueError: If `instance_mask_type` option is not one of
        input_reader_pb2.DEFAULT, input_reader_pb2.NUMERICAL, or
        input_reader_pb2.PNG_MASKS.
    """
    self.keys_to_features = {
        'image/encoded':
            tf.FixedLenFeature((), tf.string, default_value=''),
        'image/format':
            tf.FixedLenFeature((), tf.string, default_value='jpeg'),
        'image/filename':
            tf.FixedLenFeature((), tf.string, default_value=''),
        'image/key/sha256':
            tf.FixedLenFeature((), tf.string, default_value=''),
        'image/source_id':
            tf.FixedLenFeature((), tf.string, default_value=''),
        'image/height':
            tf.FixedLenFeature((), tf.int64, 1),
        'image/width':
            tf.FixedLenFeature((), tf.int64, 1),
        # Object boxes and classes.
        'image/object/bbox/xmin':
            tf.VarLenFeature(tf.float32),
        'image/object/bbox/xmax':
            tf.VarLenFeature(tf.float32),
        'image/object/bbox/ymin':
            tf.VarLenFeature(tf.float32),
        'image/object/bbox/ymax':
            tf.VarLenFeature(tf.float32),
        'image/object/class/label':
            tf.VarLenFeature(tf.int64),
        'image/object/class/text':
            tf.VarLenFeature(tf.string),
        'image/object/area':
            tf.VarLenFeature(tf.float32),
        'image/object/is_crowd':
            tf.VarLenFeature(tf.int64),
        'image/object/difficult':
            tf.VarLenFeature(tf.int64),
        'image/object/group_of':
            tf.VarLenFeature(tf.int64),
        'image/object/weight':
            tf.VarLenFeature(tf.float32),
    }
    if dct_method:
      image = slim_example_decoder.Image(
          image_key='image/encoded',
          format_key='image/format',
          channels=3,
          dct_method=dct_method)
    else:
      image = slim_example_decoder.Image(
          image_key='image/encoded', format_key='image/format', channels=3)
    self.items_to_handlers = {
        fields.InputDataFields.image:
            image,
        fields.InputDataFields.source_id: (
            slim_example_decoder.Tensor('image/source_id')),
        fields.InputDataFields.key: (
            slim_example_decoder.Tensor('image/key/sha256')),
        fields.InputDataFields.filename: (
            slim_example_decoder.Tensor('image/filename')),
        # Object boxes and classes.
        fields.InputDataFields.groundtruth_boxes: (
            slim_example_decoder.BoundingBox(['ymin', 'xmin', 'ymax', 'xmax'],
                                             'image/object/bbox/')),
        fields.InputDataFields.groundtruth_area:
            slim_example_decoder.Tensor('image/object/area'),
        fields.InputDataFields.groundtruth_is_crowd: (
            slim_example_decoder.Tensor('image/object/is_crowd')),
        fields.InputDataFields.groundtruth_difficult: (
            slim_example_decoder.Tensor('image/object/difficult')),
        fields.InputDataFields.groundtruth_group_of: (
            slim_example_decoder.Tensor('image/object/group_of')),
        fields.InputDataFields.groundtruth_weights: (
            slim_example_decoder.Tensor('image/object/weight')),
    }
    if load_instance_masks:
      if instance_mask_type in (input_reader_pb2.DEFAULT,
                                input_reader_pb2.NUMERICAL_MASKS):
        self.keys_to_features['image/object/mask'] = (
            tf.VarLenFeature(tf.float32))
        self.items_to_handlers[
            fields.InputDataFields.groundtruth_instance_masks] = (
                slim_example_decoder.ItemHandlerCallback(
                    ['image/object/mask', 'image/height', 'image/width'],
                    self._reshape_instance_masks))
      elif instance_mask_type == input_reader_pb2.PNG_MASKS:
        self.keys_to_features['image/object/mask'] = tf.VarLenFeature(tf.string)
        self.items_to_handlers[
            fields.InputDataFields.groundtruth_instance_masks] = (
                slim_example_decoder.ItemHandlerCallback(
                    ['image/object/mask', 'image/height', 'image/width'],
                    self._decode_png_instance_masks))
      else:
        raise ValueError('Did not recognize the `instance_mask_type` option.')
    if label_map_proto_file:
      label_map = label_map_util.get_label_map_dict(label_map_proto_file,
                                                    use_display_name)
      # We use a default_value of -1, but we expect all labels to be contained
      # in the label map.
      table = tf.contrib.lookup.HashTable(
          initializer=tf.contrib.lookup.KeyValueTensorInitializer(
              keys=tf.constant(list(label_map.keys())),
              values=tf.constant(list(label_map.values()), dtype=tf.int64)),
          default_value=-1)
      # If the label_map_proto is provided, try to use it in conjunction with
      # the class text, and fall back to a materialized ID.
      # TODO(lzc): note that here we are using BackupHandler defined in this
      # file(which is branching slim_example_decoder.BackupHandler). Need to
      # switch back to slim_example_decoder.BackupHandler once tf 1.5 becomes
      # more popular.
      label_handler = BackupHandler(
          LookupTensor('image/object/class/text', table, default_value=''),
          slim_example_decoder.Tensor('image/object/class/label'))
    else:
      label_handler = slim_example_decoder.Tensor('image/object/class/label')
    self.items_to_handlers[
        fields.InputDataFields.groundtruth_classes] = label_handler

  def decode(self, tf_example_string_tensor):
    """Decodes serialized tensorflow example and returns a tensor dictionary.

    Args:
      tf_example_string_tensor: a string tensor holding a serialized tensorflow
        example proto.

    Returns:
      A dictionary of the following tensors.
      fields.InputDataFields.image - 3D uint8 tensor of shape [None, None, 3]
        containing image.
      fields.InputDataFields.source_id - string tensor containing original
        image id.
      fields.InputDataFields.key - string tensor with unique sha256 hash key.
      fields.InputDataFields.filename - string tensor with original dataset
        filename.
      fields.InputDataFields.groundtruth_boxes - 2D float32 tensor of shape
        [None, 4] containing box corners.
      fields.InputDataFields.groundtruth_classes - 1D int64 tensor of shape
        [None] containing classes for the boxes.
      fields.InputDataFields.groundtruth_weights - 1D float32 tensor of
        shape [None] indicating the weights of groundtruth boxes.
      fields.InputDataFields.num_groundtruth_boxes - int32 scalar indicating
        the number of groundtruth_boxes.
      fields.InputDataFields.groundtruth_area - 1D float32 tensor of shape
        [None] containing containing object mask area in pixel squared.
      fields.InputDataFields.groundtruth_is_crowd - 1D bool tensor of shape
        [None] indicating if the boxes enclose a crowd.

    Optional:
      fields.InputDataFields.groundtruth_difficult - 1D bool tensor of shape
        [None] indicating if the boxes represent `difficult` instances.
      fields.InputDataFields.groundtruth_group_of - 1D bool tensor of shape
        [None] indicating if the boxes represent `group_of` instances.
      fields.InputDataFields.groundtruth_instance_masks - 3D float32 tensor of
        shape [None, None, None] containing instance masks.
    """
    serialized_example = tf.reshape(tf_example_string_tensor, shape=[])
    decoder = slim_example_decoder.TFExampleDecoder(self.keys_to_features,
                                                    self.items_to_handlers)
    keys = decoder.list_items()
    tensors = decoder.decode(serialized_example, items=keys)
    tensor_dict = dict(zip(keys, tensors))
    is_crowd = fields.InputDataFields.groundtruth_is_crowd
    tensor_dict[is_crowd] = tf.cast(tensor_dict[is_crowd], dtype=tf.bool)
    tensor_dict[fields.InputDataFields.image].set_shape([None, None, 3])
    tensor_dict[fields.InputDataFields.num_groundtruth_boxes] = tf.shape(
        tensor_dict[fields.InputDataFields.groundtruth_boxes])[0]

    def default_groundtruth_weights():
      return tf.ones(
          [tf.shape(tensor_dict[fields.InputDataFields.groundtruth_boxes])[0]],
          dtype=tf.float32)

    tensor_dict[fields.InputDataFields.groundtruth_weights] = tf.cond(
        tf.greater(
            tf.shape(
                tensor_dict[fields.InputDataFields.groundtruth_weights])[0],
            0), lambda: tensor_dict[fields.InputDataFields.groundtruth_weights],
        default_groundtruth_weights)
    return tensor_dict

  def _reshape_instance_masks(self, keys_to_tensors):
    """Reshape instance segmentation masks.

    The instance segmentation masks are reshaped to [num_instances, height,
    width].

    Args:
      keys_to_tensors: a dictionary from keys to tensors.

    Returns:
      A 3-D float tensor of shape [num_instances, height, width] with values
        in {0, 1}.
    """
    height = keys_to_tensors['image/height']
    width = keys_to_tensors['image/width']
    to_shape = tf.cast(tf.stack([-1, height, width]), tf.int32)
    masks = keys_to_tensors['image/object/mask']
    if isinstance(masks, tf.SparseTensor):
      masks = tf.sparse_tensor_to_dense(masks)
    masks = tf.reshape(tf.to_float(tf.greater(masks, 0.0)), to_shape)
    return tf.cast(masks, tf.float32)

  def _decode_png_instance_masks(self, keys_to_tensors):
    """Decode PNG instance segmentation masks and stack into dense tensor.

    The instance segmentation masks are reshaped to [num_instances, height,
    width].

    Args:
      keys_to_tensors: a dictionary from keys to tensors.

    Returns:
      A 3-D float tensor of shape [num_instances, height, width] with values
        in {0, 1}.
    """

    def decode_png_mask(image_buffer):
      image = tf.squeeze(
          tf.image.decode_image(image_buffer, channels=1), axis=2)
      image.set_shape([None, None])
      image = tf.to_float(tf.greater(image, 0))
      return image

    png_masks = keys_to_tensors['image/object/mask']
    height = keys_to_tensors['image/height']
    width = keys_to_tensors['image/width']
    if isinstance(png_masks, tf.SparseTensor):
      png_masks = tf.sparse_tensor_to_dense(png_masks, default_value='')
    return tf.cond(
        tf.greater(tf.size(png_masks), 0),
        lambda: tf.map_fn(decode_png_mask, png_masks, dtype=tf.float32),
        lambda: tf.zeros(tf.to_int32(tf.stack([0, height, width]))))


text:
import { Component, OnInit } from '@angular/core';
import { ActivatedRoute, Params } from '@angular/router';

// Services
import { OwnFeedstuffsService } from '../services/own-feedstuffs.service';

@Component({
  selector: 'app-own-feedstuff-edit',
  templateUrl: './own-feedstuff-edit.component.html',
  styleUrls: ['./own-feedstuff-edit.component.css'],
})
export class OwnFeedstuffEditComponent implements OnInit {

  public feedstuff: any = null;
  public elements: any[] = [];

  constructor(private activatedRoute: ActivatedRoute, private ownFeedstuffsService: OwnFeedstuffsService) { }

  public ngOnInit() {
    this.activatedRoute.queryParams.subscribe((params: Params) => {
      const feedstuffId = params['feedstuffId'];
      this.ownFeedstuffsService.findUserFeedstuff(feedstuffId).subscribe((getFeedstuffResult: any) => {
        this.feedstuff = getFeedstuffResult;
        this.feedstuff.id = feedstuffId;

        this.ownFeedstuffsService.listUserFeedstuffMeasurements(feedstuffId).subscribe((listMeasurementsResult: any[]) => {
          this.elements = listMeasurementsResult;
        });

      });
    });
  }

  public onClick_Save() {
    this.ownFeedstuffsService.saveUserFeedstuffMeasurements(this.feedstuff.id, this.elements.map((x) => {
      return {
        id: x.id,
        value: x.value,
      };
    })).subscribe((saveUserFeedstuffMeasurementsResult: boolean) => {
      window.location.href = '/ownfeedstuffs';
    });
  }

}


text:
define([
  'knockout',
  'atlas-state',
	'text!./terms-and-conditions.html',
  'components/Component',
  'utils/AutoBind',
  'utils/CommonUtils',
  'services/MomentAPI',
  'services/AuthAPI',
  'pages/Router',
  'appConfig',
  'less!./terms-and-conditions.less',
  'components/modal'
], function (
  ko,
  state,
	view,
  Component,
  AutoBind,
  commonUtils,
  momentApi,
  authApi,
  router,
  appConfig
) {
	class TermsAndConditions extends AutoBind(Component) {
		constructor(params) {
      super(params);

      this.availableLocales = state.availableLocales;
      this.locale = state.locale;

      this.isModalShown = ko.pureComputed({
        read: () => {
          return appConfig.enableTermsAndConditions && !this.isAccepted();
        },
        write: (value) => {
          return false;
        }
      });

      this.title = ko.i18n('licenseAgreement.title', 'License Agreement');
      this.description = ko.i18n('licenseAgreement.description', 'In order to use the SNOMED International SNOMED CT Browser and HemOnc, please accept the following license agreement:');
      this.content = ko.observable();
      this.adaptContentToLocaleChange(ko.unwrap(state.locale));

      state.locale.subscribe(this.adaptContentToLocaleChange);

      this.isAccepted = ko.observable(true);

      router.currentView.subscribe(() => {
        this.isAccepted(this.checkAcceptance());
      });
    }

    adaptContentToLocaleChange(locale) {
        const availableLocales = state.availableLocales();
        if (availableLocales.length > 1) {
            this.content(appConfig.termsAndConditions.contents[locale] || appConfig.termsAndConditions.contents.en);
        } else {
            this.content(appConfig.termsAndConditions.contents.en);
        }
    }

    checkAcceptance() {
      const acceptanceDate = localStorage.getItem('terms-and-conditions-acceptance-date');
      if (acceptanceDate !== null) {
        const isExpired = momentApi.diffInDays(parseInt(acceptanceDate, 10), Date.now()) >= appConfig.termsAndConditions.acceptanceExpiresInDays;
        return !isExpired;
      }
      return false;
    }

    accept() {
      localStorage.setItem('terms-and-conditions-acceptance-date', Date.now());
      this.isAccepted(true);
    }

    reject() {
      alert(ko.i18n('licenseAgreement.rejectWarning', 'Without accepting this terms & conditions you can\'t use Atlas')());
    }
	}

	return commonUtils.build('terms-and-conditions', TermsAndConditions, view);
});


text:
package local

import (
	"context"
	"io/ioutil"
	"os"
	"strings"
	"time"

	"github.com/docker/docker/pkg/idtools"
	"github.com/moby/buildkit/cache"
	"github.com/moby/buildkit/exporter"
	"github.com/moby/buildkit/session"
	"github.com/moby/buildkit/session/filesync"
	"github.com/moby/buildkit/snapshot"
	"github.com/moby/buildkit/util/progress"
	"github.com/tonistiigi/fsutil"
	fstypes "github.com/tonistiigi/fsutil/types"
	"golang.org/x/sync/errgroup"
	"golang.org/x/time/rate"
)

type Opt struct {
	SessionManager *session.Manager
}

type localExporter struct {
	opt Opt
	// session manager
}

func New(opt Opt) (exporter.Exporter, error) {
	le := &localExporter{opt: opt}
	return le, nil
}

func (e *localExporter) Resolve(ctx context.Context, opt map[string]string) (exporter.ExporterInstance, error) {
	return &localExporterInstance{localExporter: e}, nil
}

type localExporterInstance struct {
	*localExporter
}

func (e *localExporterInstance) Name() string {
	return "exporting to client"
}

func (e *localExporterInstance) Export(ctx context.Context, inp exporter.Source, sessionID string) (map[string]string, error) {

	timeoutCtx, cancel := context.WithTimeout(ctx, 5*time.Second)
	defer cancel()

	caller, err := e.opt.SessionManager.Get(timeoutCtx, sessionID)
	if err != nil {
		return nil, err
	}

	isMap := len(inp.Refs) > 0

	export := func(ctx context.Context, k string, ref cache.ImmutableRef) func() error {
		return func() error {
			var src string
			var err error
			var idmap *idtools.IdentityMapping
			if ref == nil {
				src, err = ioutil.TempDir("", "buildkit")
				if err != nil {
					return err
				}
				defer os.RemoveAll(src)
			} else {
				mount, err := ref.Mount(ctx, true)
				if err != nil {
					return err
				}

				lm := snapshot.LocalMounter(mount)

				src, err = lm.Mount()
				if err != nil {
					return err
				}

				idmap = mount.IdentityMapping()

				defer lm.Unmount()
			}

			walkOpt := &fsutil.WalkOpt{}

			if idmap != nil {
				walkOpt.Map = func(p string, st *fstypes.Stat) bool {
					uid, gid, err := idmap.ToContainer(idtools.Identity{
						UID: int(st.Uid),
						GID: int(st.Gid),
					})
					if err != nil {
						return false
					}
					st.Uid = uint32(uid)
					st.Gid = uint32(gid)
					return true
				}
			}

			fs := fsutil.NewFS(src, walkOpt)
			lbl := "copying files"
			if isMap {
				lbl += " " + k
				fs, err = fsutil.SubDirFS([]fsutil.Dir{{FS: fs, Stat: fstypes.Stat{
					Mode: uint32(os.ModeDir | 0755),
					Path: strings.Replace(k, "/", "_", -1),
				}}})
				if err != nil {
					return err
				}
			}

			progress := newProgressHandler(ctx, lbl)
			if err := filesync.CopyToCaller(ctx, fs, caller, progress); err != nil {
				return err
			}
			return nil
		}
	}

	eg, ctx := errgroup.WithContext(ctx)

	if isMap {
		for k, ref := range inp.Refs {
			eg.Go(export(ctx, k, ref))
		}
	} else {
		eg.Go(export(ctx, "", inp.Ref))
	}

	if err := eg.Wait(); err != nil {
		return nil, err
	}
	return nil, nil
}

func newProgressHandler(ctx context.Context, id string) func(int, bool) {
	limiter := rate.NewLimiter(rate.Every(100*time.Millisecond), 1)
	pw, _, _ := progress.FromContext(ctx)
	now := time.Now()
	st := progress.Status{
		Started: &now,
		Action:  "transferring",
	}
	pw.Write(id, st)
	return func(s int, last bool) {
		if last || limiter.Allow() {
			st.Current = s
			if last {
				now := time.Now()
				st.Completed = &now
			}
			pw.Write(id, st)
			if last {
				pw.Close()
			}
		}
	}
}


text:
package com.thinkgem.jeesite.modules.student.service;

import java.util.List;

import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.thinkgem.jeesite.common.persistence.Page;
import com.thinkgem.jeesite.common.service.CrudService;
import com.thinkgem.jeesite.modules.student.entity.StudentProjectpoll;
import com.thinkgem.jeesite.modules.student.dao.StudentProjectpollDao;

/**
 * 项目考核Service
 * @author cqx

 * @version 2017-11-01

 */
@Service
@Transactional(readOnly = true)
public class StudentProjectpollService extends CrudService<StudentProjectpollDao, StudentProjectpoll> {

	public StudentProjectpoll get(String id) {
		return super.get(id);
	}

	public List<StudentProjectpoll> findList(StudentProjectpoll studentProjectpoll) {
		return super.findList(studentProjectpoll);
	}

	public Page<StudentProjectpoll> findPage(Page<StudentProjectpoll> page, StudentProjectpoll studentProjectpoll) {
		return super.findPage(page, studentProjectpoll);
	}

	@Transactional(readOnly = false)
	public void save(StudentProjectpoll studentProjectpoll) {
		super.save(studentProjectpoll);
	}

	@Transactional(readOnly = false)
	public void delete(StudentProjectpoll studentProjectpoll) {
		super.delete(studentProjectpoll);
	}

}


text:
/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package us.guihouse.projector.other;

import us.guihouse.projector.other.file_filters.DatabaseFileFilter;
import java.io.File;
import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.SQLException;
import java.sql.Statement;
import java.util.Optional;
import java.util.logging.Level;
import java.util.logging.Logger;
import javafx.scene.control.Alert;
import javafx.scene.control.Alert.AlertType;
import javafx.scene.control.ButtonBar;
import javafx.scene.control.ButtonType;
import javafx.stage.FileChooser;

/**
 *
 * @author sqlitetutorial.net
 */
public class SQLiteJDBCDriverConnection {

    private static Connection conn;

    /**
     * Connect to a sample database
     */
    public static void connect() {
        try {
            // create a connection to the database
            String path = getDatabaseUrl();
            conn = DriverManager.getConnection("jdbc:sqlite:" + path);
            ProjectorPreferences.setSqlitePath(path);
            System.out.println("Connection to SQLite has been established.");
        } catch (SQLException e) {
            System.out.println(e.getMessage());
        }
    }

    private static String getDatabaseUrl() {
        String path = ProjectorPreferences.getSqlitePath();
        File current = new File(path);

        if ((!path.isEmpty()) && current.isFile() && current.canWrite()) {
            return path;
        }

        FileChooser chooser;

        do {
            boolean openFile = shouldOpenFile();

            chooser = new FileChooser();

            chooser.getExtensionFilters().setAll(DatabaseFileFilter.getFilter());
            chooser.setInitialFileName("musicas.db");

            if (openFile) {
                current = chooser.showOpenDialog(null);
            } else {
                current = chooser.showSaveDialog(null);
            }

            if (current == null) {
                throw new RuntimeException("Cannot proceed without database");
            }

            if (current.isDirectory()) {
                current = null;
                continue;
            }

            if (!current.getName().endsWith(".db")) {
                current = new File(current.getAbsolutePath() + ".db");
            }

            if (current.exists() && !current.canWrite()) {
                current = null;
            }
        } while (current == null);

        return current.getAbsolutePath();
    }

    private static boolean shouldOpenFile() {
        Alert d = new Alert(AlertType.CONFIRMATION);
        d.setTitle("Inicializar dados");
        d.setHeaderText("Começar com uma nova bibliotaca de letras?");
        d.setContentText("Você pode escolher entre começar sem nenhuma letra, ou abrir uma biblioteca de letras já existente.");

        ButtonType btOpen = new ButtonType("Abrir Biblioteca", ButtonBar.ButtonData.OTHER);
        ButtonType btInit = new ButtonType("Iniciar do zero", ButtonBar.ButtonData.OTHER);

        d.getDialogPane().getButtonTypes().setAll(btOpen, btInit);

        Optional<ButtonType> result = d.showAndWait();

        if (result.isPresent() && btOpen.equals(result.get())) {
            return true;
        }

        if (result.isPresent() && btInit.equals(result.get())) {
            return false;
        }

        throw new RuntimeException("Cannot proceed without database");
    }

    public static Connection getConn() {
        return conn;
    }

    public static void migrate() {
        if (conn == null) {
            return;
        }

        try {
            Statement stmt = conn.createStatement();

            String query = "CREATE TABLE IF NOT EXISTS artists("
                    + "id INTEGER PRIMARY KEY AUTOINCREMENT, "
                    + "name VARCHAR NOT NULL"
                    + ");";

            stmt.execute(query);
            stmt.execute("CREATE UNIQUE INDEX IF NOT EXISTS UQ_ARTIST_NAME ON artists(name);");

            query = "CREATE TABLE IF NOT EXISTS musics("
                    + "id INTEGER PRIMARY KEY AUTOINCREMENT, "
                    + "name VARCHAR NOT NULL, "
                    + "artist_id INTEGER, "
                    + "phrases TEXT, "
                    + "FOREIGN KEY(artist_id) REFERENCES artists(id)"
                    + ");";

            stmt.execute(query);
            stmt.execute("CREATE UNIQUE INDEX IF NOT EXISTS UQ_MUSIC ON musics(artist_id, name);");

            query = "CREATE TABLE IF NOT EXISTS music_themes("
                    + "id INTEGER PRIMARY KEY AUTOINCREMENT, "
                    + "music_id INTEGER NOT NULL, "
                    + "theme_name VARCHAR NOT NULL, "
                    + "FOREIGN KEY(music_id) REFERENCES musics(id) ON DELETE CASCADE"
                    + ")";
            stmt.execute(query);

            query = "CREATE TABLE IF NOT EXISTS musics_plays("
                    + "music_id INTEGER, "
                    + "date DATETIME, "
                    + "FOREIGN KEY(music_id) REFERENCES musics(id) ON DELETE CASCADE"
                    + ");";

            stmt.execute(query);

            query = "CREATE TABLE IF NOT EXISTS projection_lists("
                    + "id INTEGER PRIMARY KEY AUTOINCREMENT, "
                    + "title VARCHAR NOT NULL, "
                    + "active INTEGER NOT NULL DEFAULT 1"
                    + ")";
            stmt.execute(query);

            query = "CREATE TABLE IF NOT EXISTS projection_list_items("
                    + "id INTEGER PRIMARY KEY AUTOINCREMENT, "
                    + "title VARCHAR NOT NULL, "
                    + "type VARCHAR NOT NULL, "
                    + "projection_list_id INTEGER NOT NULL, "
                    + "order_number INTEGER NOT NULL, "
                    + "FOREIGN KEY(projection_list_id) REFERENCES projection_lists(id) ON DELETE CASCADE"
                    + ")";
            stmt.execute(query);

            query = "CREATE TABLE IF NOT EXISTS projection_list_item_properties("
                    + "id INTEGER PRIMARY KEY AUTOINCREMENT, "
                    + "key VARCHAR NOT NULL, "
                    + "value VARCHAR NOT NULL, "
                    + "projection_list_item_id INTEGER NOT NULL, "
                    + "FOREIGN KEY(projection_list_item_id) REFERENCES projection_list_items(id) ON DELETE CASCADE"
                    + ")";
            stmt.execute(query);

            stmt.close();

        } catch (SQLException ex) {
            Logger.getLogger(SQLiteJDBCDriverConnection.class.getName()).log(Level.SEVERE, null, ex);
            conn = null;
        }
    }
}


text:
#!/usr/bin/env node
'use strict';

var _ = require('../lodash'),
    fs = require('fs'),
    path = require('path');

var args = (args = process.argv)
  .slice((args[0] === process.execPath || args[0] === 'node') ? 2 : 0);

var filePath = path.resolve(args[1]),
    reLine = /.*/gm;

var pattern = (function() {
  var result = args[0],
      delimiter = result.charAt(0),
      lastIndex = result.lastIndexOf(delimiter);

  return RegExp(result.slice(1, lastIndex), result.slice(lastIndex + 1));
}());

/*----------------------------------------------------------------------------*/

fs.writeFileSync(filePath, fs.readFileSync(filePath, 'utf8').replace(pattern, function(match) {
  var snippet = _.slice(arguments, -3, -2)[0];
  return match.replace(snippet, snippet.replace(reLine, ''));
}));


text:
\documentclass[a4paper,8pt,titlepage]{scrbook}

\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage[ngerman]{babel}
\usepackage{hyperref}
\usepackage{tabularx}
\usepackage{amsmath}
\usepackage{amssymb}
\usepackage{graphicx}
\usepackage{listings}
\usepackage[ruled,vlined]{algorithm2e}
\usepackage{esdiff}
\usepackage{float}
\usepackage{geometry}
\geometry{left=2cm,right=2cm,top=2cm,bottom=2cm,bindingoffset=10mm}
\restylefloat{table}
\usepackage{enumitem}

\setlistdepth{20}
\renewlist{itemize}{itemize}{20}
\setlist[itemize]{label=$\cdot$}
\setlist[itemize,1]{label=\textbullet}
\setlist[itemize,2]{label=--}
\setlist[itemize,3]{label=\(\ast\)}

\title{Virtuelle Systeme am Karlsruher Institut für Technologie}
\date{Mai 2017}
\author{Maximilian Heß}

\begin{document}
\maketitle
\tableofcontents
\setcounter{tocdepth}{2}
\setcounter{secnumdepth}{2}

\include{vs}

\end{document}


text:
ACCEPTED

#### According to
The Catalogue of Life, 3rd January 2011

#### Published in
in Archer, Biblthca Lichenol. 69: 65 (1997)

#### Original name
Pertusaria ewersii A. W. Archer & Elix

### Remarks
null


text:
package com.adkdevelopment.e_contact.injection.module;

import android.app.Application;
import android.content.Context;
import android.content.SharedPreferences;
import android.preference.PreferenceManager;

import com.adkdevelopment.e_contact.data.DatabaseRealm;
import com.adkdevelopment.e_contact.data.RealmManager;
import com.adkdevelopment.e_contact.data.contracts.Manager;
import com.adkdevelopment.e_contact.data.remote.ApiService;
import com.adkdevelopment.e_contact.injection.ApplicationContext;

import javax.inject.Singleton;

import dagger.Module;
import dagger.Provides;

/**
 * Provide application-level dependencies.
 * Created by karataev on 5/10/16.
 */
@Module
public class AppModule {

    private final Application mApplication;

    public AppModule(Application application) {
        mApplication = application;
    }

    @Provides
    Application providesApplication() {
        return mApplication;
    }

    @Provides
    @ApplicationContext
    Context providesContext() {
        return mApplication;
    }

    @Provides
    @Singleton
    ApiService providesApiService() {
        return ApiService.Creator.newApiService();
    }

    @Provides
    @Singleton
    DatabaseRealm providesDatabaseRealm() {
        return new DatabaseRealm();
    }

    @Provides
    @Singleton
    Manager.RealmManager providesRealmManager() {
        return new RealmManager();
    }

    @Provides
    @Singleton
    SharedPreferences providesSharedPreferences(Application application) {
        return PreferenceManager.getDefaultSharedPreferences(application);
    }

}


text:
package com.intellij.codeInsight.template.macro;

import com.intellij.codeInsight.CodeInsightBundle;
import com.intellij.codeInsight.lookup.LookupElement;
import com.intellij.codeInsight.template.*;
import com.intellij.openapi.project.Project;
import com.intellij.psi.*;
import com.intellij.psi.util.TypeConversionUtil;
import org.jetbrains.annotations.NotNull;

/**
 * @author ven
 */
public class IterableComponentTypeMacro implements Macro {
  public String getName() {
    return "iterableComponentType";
  }

  public String getDescription() {
    return CodeInsightBundle.message("macro.iterable.component.type");
  }

  public String getDefaultValue() {
    return "a";
  }

  public Result calculateResult(@NotNull Expression[] params, ExpressionContext context) {
    if (params.length != 1) return null;
    final Result result = params[0].calculateResult(context);
    if (result == null) return null;

    Project project = context.getProject();
    PsiDocumentManager.getInstance(project).commitAllDocuments();

    PsiExpression expr = MacroUtil.resultToPsiExpression(result, context);
    if (expr == null) return null;
    PsiType type = expr.getType();
    if (type instanceof PsiArrayType) {
      return new PsiTypeResult(((PsiArrayType)type).getComponentType(), project);
    }

    if (type instanceof PsiClassType) {
      PsiClassType.ClassResolveResult resolveResult = ((PsiClassType)type).resolveGenerics();
      PsiClass aClass = resolveResult.getElement();

      if (aClass != null) {
        PsiClass iterableClass = JavaPsiFacade.getInstance(project).findClass("java.lang.Iterable", aClass.getResolveScope());
        if (iterableClass != null) {
          PsiSubstitutor substitutor = TypeConversionUtil.getClassSubstitutor(iterableClass, aClass, resolveResult.getSubstitutor());
          if (substitutor != null) {
            PsiType parameterType = substitutor.substitute(iterableClass.getTypeParameters()[0]);
            if (parameterType instanceof PsiCapturedWildcardType) {
              parameterType = ((PsiCapturedWildcardType)parameterType).getWildcard();
            }
            if (parameterType != null) {
              if (parameterType instanceof PsiWildcardType) {
                if (((PsiWildcardType)parameterType).isExtends()) {
                  return new PsiTypeResult(((PsiWildcardType)parameterType).getBound(), project);
                }
                else return null;
              }
              return new PsiTypeResult(parameterType, project);
            }
          }
        }
      }
    }

    return null;
  }

  public Result calculateQuickResult(@NotNull Expression[] params, ExpressionContext context) {
    return calculateResult(params, context);
  }

  public LookupElement[] calculateLookupItems(@NotNull Expression[] params, ExpressionContext context) {
    return LookupElement.EMPTY_ARRAY;
  }
}


text:
<?php

namespace Sonata\NewsBundle\Form\Type;

use Symfony\Component\Form\FormBuilderInterface;
use Symfony\Component\Form\AbstractType;
use Symfony\Component\OptionsResolver\OptionsResolverInterface;

class CommentType extends AbstractType
{
    /**
     * {@inheritdoc}
     */
    public function buildForm(FormBuilderInterface $builder, array $options)
    {
        $builder
            ->add('name', null, array('label' => 'form.comment.name'))
            ->add('email', 'email', array('required' => false, 'label' => 'form.comment.email'))
            ->add('url', 'url', array('required' => false, 'label' => 'form.comment.url'))
            ->add('message', null, array('label' => 'form.comment.message'))
        ;
    }

    /**
     * {@inheritdoc}
     */
    public function getName()
    {
        return 'sonata_post_comment';
    }

    /**
     * {@inheritdoc}
     */
    public function setDefaultOptions(OptionsResolverInterface $resolver)
    {;
        $resolver->setDefaults(array(
            'translation_domain' => 'SonataNewsBundle'
        ));
    }
}


text:
package YAML::Loader::Base;
use YAML::Mo;

our $VERSION = '0.80';

has load_code     => default => sub {0};
has stream        => default => sub {''};
has document      => default => sub {0};
has line          => default => sub {0};
has documents     => default => sub {[]};
has lines         => default => sub {[]};
has eos           => default => sub {0};
has done          => default => sub {0};
has anchor2node   => default => sub {{}};
has level         => default => sub {0};
has offset        => default => sub {[]};
has preface       => default => sub {''};
has content       => default => sub {''};
has indent        => default => sub {0};
has major_version => default => sub {0};
has minor_version => default => sub {0};
has inline        => default => sub {''};

sub set_global_options {
    my $self = shift;
    $self->load_code($YAML::LoadCode || $YAML::UseCode)
      if defined $YAML::LoadCode or defined $YAML::UseCode;
}

sub load {
    die 'load() not implemented in this class.';
}

1;

__END__

=head1 NAME

YAML::Loader::Base - Base class for YAML Loader classes

=head1 SYNOPSIS

    package YAML::Loader::Something;
    use YAML::Loader::Base -base;

=head1 DESCRIPTION

YAML::Loader::Base is a base class for creating YAML loader classes.

=head1 AUTHOR

Ingy döt Net <ingy@cpan.org>

=head1 COPYRIGHT

Copyright (c) 2006, 2011-2012. Ingy döt Net. All rights reserved.

This program is free software; you can redistribute it and/or modify it
under the same terms as Perl itself.

See L<http://www.perl.com/perl/misc/Artistic.html>

=cut