text:
<?php

use Symfony\Component\Translation\MessageCatalogue;

$catalogue = new MessageCatalogue('pt_PT', array (
  'security' =>
  array (
    'An authentication exception occurred.' => 'Ocorreu uma excepção durante a autenticação.',
    'Authentication credentials could not be found.' => 'As credenciais de autenticação não foram encontradas.',
    'Authentication request could not be processed due to a system problem.' => 'O pedido de autenticação não foi concluído devido a um problema no sistema.',
    'Invalid credentials.' => 'Credenciais inválidas.',
    'Cookie has already been used by someone else.' => 'Este cookie já está em uso.',
    'Not privileged to request the resource.' => 'Não possui privilégios para aceder a este recurso.',
    'Invalid CSRF token.' => 'Token CSRF inválido.',
    'Digest nonce has expired.' => 'Digest nonce expirado.',
    'No authentication provider found to support the authentication token.' => 'Nenhum fornecedor de autenticação encontrado para suportar o token de autenticação.',
    'No session available, it either timed out or cookies are not enabled.' => 'Não existe sessão disponível, esta expirou ou os cookies estão desativados.',
    'No token could be found.' => 'O token não foi encontrado.',
    'Username could not be found.' => 'Nome de utilizador não encontrado.',
    'Account has expired.' => 'A conta expirou.',
    'Credentials have expired.' => 'As credenciais expiraram.',
    'Account is disabled.' => 'Conta desativada.',
    'Account is locked.' => 'A conta está trancada.',
  ),
));

$cataloguePt = new MessageCatalogue('pt', array (
  'validators' =>
  array (
    'This value should be false.' => 'Este valor deveria ser falso.',
    'This value should be true.' => 'Este valor deveria ser verdadeiro.',
    'This value should be of type {{ type }}.' => 'Este valor deveria ser do tipo {{ type }}.',
    'This value should be blank.' => 'Este valor deveria ser vazio.',
    'The value you selected is not a valid choice.' => 'O valor selecionado não é uma opção válida.',
    'You must select at least {{ limit }} choice.|You must select at least {{ limit }} choices.' => 'Você deveria selecionar {{ limit }} opção no mínimo.|Você deveria selecionar {{ limit }} opções no mínimo.',
    'You must select at most {{ limit }} choice.|You must select at most {{ limit }} choices.' => 'Você deve selecionar, no máximo {{ limit }} opção.|Você deve selecionar, no máximo {{ limit }} opções.',
    'One or more of the given values is invalid.' => 'Um ou mais dos valores introduzidos não são válidos.',
    'This field was not expected.' => 'Este campo não era esperado.',
    'This field is missing.' => 'Este campo está faltando.',
    'This value is not a valid date.' => 'Este valor não é uma data válida.',
    'This value is not a valid datetime.' => 'Este valor não é uma data-hora válida.',
    'This value is not a valid email address.' => 'Este valor não é um endereço de e-mail válido.',
    'The file could not be found.' => 'O arquivo não pôde ser encontrado.',
    'The file is not readable.' => 'O arquivo não pôde ser lido.',
    'The file is too large ({{ size }} {{ suffix }}). Allowed maximum size is {{ limit }} {{ suffix }}.' => 'O arquivo é muito grande ({{ size }} {{ suffix }}). O tamanho máximo permitido é de {{ limit }} {{ suffix }}.',
    'The mime type of the file is invalid ({{ type }}). Allowed mime types are {{ types }}.' => 'O tipo mime do arquivo é inválido ({{ type }}). Os tipos mime permitidos são {{ types }}.',
    'This value should be {{ limit }} or less.' => 'Este valor deveria ser {{ limit }} ou menor.',
    'This value is too long. It should have {{ limit }} character or less.|This value is too long. It should have {{ limit }} characters or less.' => 'O valor é muito longo. Deveria ter {{ limit }} caracteres ou menos.',
    'This value should be {{ limit }} or more.' => 'Este valor deveria ser {{ limit }} ou mais.',
    'This value is too short. It should have {{ limit }} character or more.|This value is too short. It should have {{ limit }} characters or more.' => 'O valor é muito curto. Deveria de ter {{ limit }} caractere ou mais.|O valor é muito curto. Deveria de ter {{ limit }} caracteres ou mais.',
    'This value should not be blank.' => 'Este valor não deveria ser branco/vazio.',
    'This value should not be null.' => 'Este valor não deveria ser nulo.',
    'This value should be null.' => 'Este valor deveria ser nulo.',
    'This value is not valid.' => 'Este valor não é válido.',
    'This value is not a valid time.' => 'Este valor não é uma hora válida.',
    'This value is not a valid URL.' => 'Este valor não é um URL válido.',
    'The two values should be equal.' => 'Os dois valores deveriam ser iguais.',
    'The file is too large. Allowed maximum size is {{ limit }} {{ suffix }}.' => 'O arquivo é muito grande. O tamanho máximo permitido é de {{ limit }} {{ suffix }}.',
    'The file is too large.' => 'O ficheiro é muito grande.',
    'The file could not be uploaded.' => 'Não foi possível carregar o ficheiro.',
    'This value should be a valid number.' => 'Este valor deveria de ser um número válido.',
    'This file is not a valid image.' => 'Este ficheiro não é uma imagem.',
    'This is not a valid IP address.' => 'Este endereço de IP não é válido.',
    'This value is not a valid language.' => 'Este valor não é uma linguagem válida.',
    'This value is not a valid locale.' => 'Este valor não é um \'locale\' válido.',
    'This value is not a valid country.' => 'Este valor não é um País válido.',
    'This value is already used.' => 'Este valor já está a ser usado.',
    'The size of the image could not be detected.' => 'O tamanho da imagem não foi detetado.',
    'The image width is too big ({{ width }}px). Allowed maximum width is {{ max_width }}px.' => 'A largura da imagem ({{ width }}px) é muito grande. A largura máxima da imagem é: {{ max_width }}px.',
    'The image width is too small ({{ width }}px). Minimum width expected is {{ min_width }}px.' => 'A largura da imagem ({{ width }}px) é muito pequena. A largura miníma da imagem é de: {{ min_width }}px.',
    'The image height is too big ({{ height }}px). Allowed maximum height is {{ max_height }}px.' => 'A altura da imagem ({{ height }}px) é muito grande. A altura máxima da imagem é de: {{ max_height }}px.',
    'The image height is too small ({{ height }}px). Minimum height expected is {{ min_height }}px.' => 'A altura da imagem ({{ height }}px) é muito pequena. A altura miníma da imagem é de: {{ min_height }}px.',
    'This value should be the user\'s current password.' => 'Este valor deveria de ser a password atual do utilizador.',
    'This value should have exactly {{ limit }} character.|This value should have exactly {{ limit }} characters.' => 'Este valor tem de ter exatamente {{ limit }} carateres.',
    'The file was only partially uploaded.' => 'Só foi enviado parte do ficheiro.',
    'No file was uploaded.' => 'Nenhum ficheiro foi enviado.',
    'No temporary folder was configured in php.ini.' => 'Não existe nenhum directório temporária configurado no ficheiro php.ini.',
    'Cannot write temporary file to disk.' => 'Não foi possível escrever ficheiros temporários no disco.',
    'A PHP extension caused the upload to fail.' => 'Uma extensão PHP causou a falha no envio.',
    'This collection should contain {{ limit }} element or more.|This collection should contain {{ limit }} elements or more.' => 'Esta coleção deve conter {{ limit }} elemento ou mais.|Esta coleção deve conter {{ limit }} elementos ou mais.',
    'This collection should contain {{ limit }} element or less.|This collection should contain {{ limit }} elements or less.' => 'Esta coleção deve conter {{ limit }} elemento ou menos.|Esta coleção deve conter {{ limit }} elementos ou menos.',
    'This collection should contain exactly {{ limit }} element.|This collection should contain exactly {{ limit }} elements.' => 'Esta coleção deve conter exatamente {{ limit }} elemento.|Esta coleção deve conter exatamente {{ limit }} elementos.',
    'Invalid card number.' => 'Número de cartão inválido.',
    'Unsupported card type or invalid card number.' => 'Tipo de cartão não suportado ou número de cartão inválido.',
    'This is not a valid International Bank Account Number (IBAN).' => 'Este não é um Número Internacional de Conta Bancária (IBAN) válido.',
    'This value is not a valid ISBN-10.' => 'Este valor não é um ISBN-10 válido.',
    'This value is not a valid ISBN-13.' => 'Este valor não é um ISBN-13 válido.',
    'This value is neither a valid ISBN-10 nor a valid ISBN-13.' => 'Este valor não é um ISBN-10 ou ISBN-13 válido.',
    'This value is not a valid ISSN.' => 'Este valor não é um ISSN válido.',
    'This value is not a valid currency.' => 'Este não é um valor monetário válido.',
    'This value should be equal to {{ compared_value }}.' => 'Este valor deve ser igual a {{ compared_value }}.',
    'This value should be greater than {{ compared_value }}.' => 'Este valor deve ser superior a {{ compared_value }}.',
    'This value should be greater than or equal to {{ compared_value }}.' => 'Este valor deve ser igual ou superior a {{ compared_value }}.',
    'This value should be identical to {{ compared_value_type }} {{ compared_value }}.' => 'Este valor deve ser idêntico a {{ compared_value_type }} {{ compared_value }}.',
    'This value should be less than {{ compared_value }}.' => 'Este valor deve ser inferior a {{ compared_value }}.',
    'This value should be less than or equal to {{ compared_value }}.' => 'Este valor deve ser igual ou inferior a {{ compared_value }}.',
    'This value should not be equal to {{ compared_value }}.' => 'Este valor não deve ser igual a {{ compared_value }}.',
    'This value should not be identical to {{ compared_value_type }} {{ compared_value }}.' => 'Este valor não deve ser idêntico a {{ compared_value_type }} {{ compared_value }}.',
    'The image ratio is too big ({{ ratio }}). Allowed maximum ratio is {{ max_ratio }}.' => 'O formato da imagem é muito grande ({{ ratio }}). O formato máximo é {{ max_ratio }}.',
    'The image ratio is too small ({{ ratio }}). Minimum ratio expected is {{ min_ratio }}.' => 'O formato da imagem é muito pequeno ({{ ratio }}). O formato mínimo esperado é {{ min_ratio }}.',
    'The image is square ({{ width }}x{{ height }}px). Square images are not allowed.' => 'A imagem é um quadrado ({{ width }}x{{ height }}px). Imagens quadradas não são permitidas.',
    'The image is landscape oriented ({{ width }}x{{ height }}px). Landscape oriented images are not allowed.' => 'A imagem está orientada à paisagem ({{ width }}x{{ height }}px). Imagens orientadas à paisagem não são permitidas.',
    'The image is portrait oriented ({{ width }}x{{ height }}px). Portrait oriented images are not allowed.' => 'A imagem está orientada ao retrato ({{ width }}x{{ height }}px). Imagens orientadas ao retrato não são permitidas.',
    'An empty file is not allowed.' => 'Ficheiro vazio não é permitido.',
    'This form should not contain extra fields.' => 'Este formulário não deveria conter campos extra.',
    'The uploaded file was too large. Please try to upload a smaller file.' => 'O arquivo enviado é muito grande. Por favor, tente enviar um ficheiro mais pequeno.',
    'The CSRF token is invalid. Please try to resubmit the form.' => 'O token CSRF é inválido. Por favor submeta o formulário novamente.',
    'fos_user.username.already_used' => 'Este utilizador já existe',
    'fos_user.username.blank' => 'Por favor introduza o nome de utilizador',
    'fos_user.username.short' => '[-Inf,Inf]O nome de utilizador é muito curto',
    'fos_user.username.long' => '[-Inf,Inf]O nome de utilizador é muito longo',
    'fos_user.email.already_used' => 'Este email já está a ser usado',
    'fos_user.email.blank' => 'Por favor introduza o email',
    'fos_user.email.short' => '[-Inf,Inf]Este email é muito curto',
    'fos_user.email.long' => '[-Inf,Inf]Este email é muito longo',
    'fos_user.email.invalid' => 'Este email é inválido',
    'fos_user.password.blank' => 'Por favor introduza a senha',
    'fos_user.password.short' => '[-Inf,Inf]Esta senha é muito curta',
    'fos_user.password.mismatch' => 'As senhas não correspondem',
    'fos_user.new_password.blank' => 'Por favor introduza a nova senha',
    'fos_user.new_password.short' => '[-Inf,Inf]A nova senha é muito curta',
    'fos_user.current_password.invalid' => 'A senha está incorreta',
    'fos_user.group.blank' => 'Por favor introduza o nome',
    'fos_user.group.short' => '[-Inf,Inf]O nome é muito curto',
    'fos_user.group.long' => '[-Inf,Inf]O nome é muito longo',
  ),
  'FOSUserBundle' =>
  array (
    'group.edit.submit' => 'Atualizar Grupo',
    'group.show.name' => 'Nome do Grupo',
    'group.new.submit' => 'Criar Grupo',
    'group.flash.updated' => 'O grupo foi atualizado',
    'group.flash.created' => 'O grupo foi criado',
    'group.flash.deleted' => 'O grupo foi apagado',
    'security.login.username' => 'Utilizador',
    'security.login.password' => 'Password',
    'security.login.remember_me' => 'Lembrar-me',
    'security.login.submit' => 'Entrar',
    'profile.show.username' => 'Utilizador',
    'profile.show.email' => 'Email',
    'profile.edit.submit' => 'Atualizar conta',
    'profile.flash.updated' => 'O perfil foi atualizado',
    'change_password.submit' => 'Mudar a password',
    'change_password.flash.success' => 'A password foi alterada',
    'registration.check_email' => 'Foi enviado um email para %email%. Este contém um link de ativação que terá de visitar para ativar a sua conta.',
    'registration.confirmed' => 'Parabéns %username%, a sua conta foi confirmada.',
    'registration.back' => 'Voltar para a página anterior.',
    'registration.submit' => 'Registar',
    'registration.flash.user_created' => 'O utilizador foi criado com sucesso',
    'registration.email.subject' => 'Bem-vindo(a) %username%!',
    'registration.email.message' => 'Olá %username%!

Para completar a validação da sua conta, por favor visite o seguinte link: %confirmationUrl%

Cumprimentos,
A equipa.
',
    'resetting.password_already_requested' => 'Uma password para este utilizador já foi requisitada nas últimas 24 horas.',
    'resetting.check_email' => 'Foi enviado um email para %email% com a informação necessária para recuperar a sua password.',
    'resetting.request.invalid_username' => 'O username ou email "%username%" não existe.',
    'resetting.request.username' => 'Utilizador',
    'resetting.request.submit' => 'Recuperar password',
    'resetting.reset.submit' => 'Alterar password',
    'resetting.flash.success' => 'A password foi recuperada com sucesso',
    'resetting.email.subject' => 'Recuperar password',
    'resetting.email.message' => 'Olá %username%!

Para recuperar a password, por favor visite o seguinte link: %confirmationUrl%

Cumprimentos,
A equipa.
',
    'layout.logout' => 'Sair',
    'layout.login' => 'Entrar',
    'layout.register' => 'Registar',
    'layout.logged_in_as' => 'Entrou como %username%',
    'form.group_name' => 'Nome do Grupo',
    'form.username' => 'Utilizador',
    'form.email' => 'Email',
    'form.current_password' => 'Password atual',
    'form.password' => 'Password',
    'form.password_confirmation' => 'Verificar',
    'form.new_password' => 'Nova password',
    'form.new_password_confirmation' => 'Verificar',
  ),
));
$catalogue->addFallbackCatalogue($cataloguePt);
$catalogueEn = new MessageCatalogue('en', array (
  'validators' =>
  array (
    'This value should be false.' => 'This value should be false.',
    'This value should be true.' => 'This value should be true.',
    'This value should be of type {{ type }}.' => 'This value should be of type {{ type }}.',
    'This value should be blank.' => 'This value should be blank.',
    'The value you selected is not a valid choice.' => 'The value you selected is not a valid choice.',
    'You must select at least {{ limit }} choice.|You must select at least {{ limit }} choices.' => 'You must select at least {{ limit }} choice.|You must select at least {{ limit }} choices.',
    'You must select at most {{ limit }} choice.|You must select at most {{ limit }} choices.' => 'You must select at most {{ limit }} choice.|You must select at most {{ limit }} choices.',
    'One or more of the given values is invalid.' => 'One or more of the given values is invalid.',
    'This field was not expected.' => 'This field was not expected.',
    'This field is missing.' => 'This field is missing.',
    'This value is not a valid date.' => 'This value is not a valid date.',
    'This value is not a valid datetime.' => 'This value is not a valid datetime.',
    'This value is not a valid email address.' => 'This value is not a valid email address.',
    'The file could not be found.' => 'The file could not be found.',
    'The file is not readable.' => 'The file is not readable.',
    'The file is too large ({{ size }} {{ suffix }}). Allowed maximum size is {{ limit }} {{ suffix }}.' => 'The file is too large ({{ size }} {{ suffix }}). Allowed maximum size is {{ limit }} {{ suffix }}.',
    'The mime type of the file is invalid ({{ type }}). Allowed mime types are {{ types }}.' => 'The mime type of the file is invalid ({{ type }}). Allowed mime types are {{ types }}.',
    'This value should be {{ limit }} or less.' => 'This value should be {{ limit }} or less.',
    'This value is too long. It should have {{ limit }} character or less.|This value is too long. It should have {{ limit }} characters or less.' => 'This value is too long. It should have {{ limit }} character or less.|This value is too long. It should have {{ limit }} characters or less.',
    'This value should be {{ limit }} or more.' => 'This value should be {{ limit }} or more.',
    'This value is too short. It should have {{ limit }} character or more.|This value is too short. It should have {{ limit }} characters or more.' => 'This value is too short. It should have {{ limit }} character or more.|This value is too short. It should have {{ limit }} characters or more.',
    'This value should not be blank.' => 'This value should not be blank.',
    'This value should not be null.' => 'This value should not be null.',
    'This value should be null.' => 'This value should be null.',
    'This value is not valid.' => 'This value is not valid.',
    'This value is not a valid time.' => 'This value is not a valid time.',
    'This value is not a valid URL.' => 'This value is not a valid URL.',
    'The two values should be equal.' => 'The two values should be equal.',
    'The file is too large. Allowed maximum size is {{ limit }} {{ suffix }}.' => 'The file is too large. Allowed maximum size is {{ limit }} {{ suffix }}.',
    'The file is too large.' => 'The file is too large.',
    'The file could not be uploaded.' => 'The file could not be uploaded.',
    'This value should be a valid number.' => 'This value should be a valid number.',
    'This file is not a valid image.' => 'This file is not a valid image.',
    'This is not a valid IP address.' => 'This is not a valid IP address.',
    'This value is not a valid language.' => 'This value is not a valid language.',
    'This value is not a valid locale.' => 'This value is not a valid locale.',
    'This value is not a valid country.' => 'This value is not a valid country.',
    'This value is already used.' => 'This value is already used.',
    'The size of the image could not be detected.' => 'The size of the image could not be detected.',
    'The image width is too big ({{ width }}px). Allowed maximum width is {{ max_width }}px.' => 'The image width is too big ({{ width }}px). Allowed maximum width is {{ max_width }}px.',
    'The image width is too small ({{ width }}px). Minimum width expected is {{ min_width }}px.' => 'The image width is too small ({{ width }}px). Minimum width expected is {{ min_width }}px.',
    'The image height is too big ({{ height }}px). Allowed maximum height is {{ max_height }}px.' => 'The image height is too big ({{ height }}px). Allowed maximum height is {{ max_height }}px.',
    'The image height is too small ({{ height }}px). Minimum height expected is {{ min_height }}px.' => 'The image height is too small ({{ height }}px). Minimum height expected is {{ min_height }}px.',
    'This value should be the user\'s current password.' => 'This value should be the user\'s current password.',
    'This value should have exactly {{ limit }} character.|This value should have exactly {{ limit }} characters.' => 'This value should have exactly {{ limit }} character.|This value should have exactly {{ limit }} characters.',
    'The file was only partially uploaded.' => 'The file was only partially uploaded.',
    'No file was uploaded.' => 'No file was uploaded.',
    'No temporary folder was configured in php.ini.' => 'No temporary folder was configured in php.ini.',
    'Cannot write temporary file to disk.' => 'Cannot write temporary file to disk.',
    'A PHP extension caused the upload to fail.' => 'A PHP extension caused the upload to fail.',
    'This collection should contain {{ limit }} element or more.|This collection should contain {{ limit }} elements or more.' => 'This collection should contain {{ limit }} element or more.|This collection should contain {{ limit }} elements or more.',
    'This collection should contain {{ limit }} element or less.|This collection should contain {{ limit }} elements or less.' => 'This collection should contain {{ limit }} element or less.|This collection should contain {{ limit }} elements or less.',
    'This collection should contain exactly {{ limit }} element.|This collection should contain exactly {{ limit }} elements.' => 'This collection should contain exactly {{ limit }} element.|This collection should contain exactly {{ limit }} elements.',
    'Invalid card number.' => 'Invalid card number.',
    'Unsupported card type or invalid card number.' => 'Unsupported card type or invalid card number.',
    'This is not a valid International Bank Account Number (IBAN).' => 'This is not a valid International Bank Account Number (IBAN).',
    'This value is not a valid ISBN-10.' => 'This value is not a valid ISBN-10.',
    'This value is not a valid ISBN-13.' => 'This value is not a valid ISBN-13.',
    'This value is neither a valid ISBN-10 nor a valid ISBN-13.' => 'This value is neither a valid ISBN-10 nor a valid ISBN-13.',
    'This value is not a valid ISSN.' => 'This value is not a valid ISSN.',
    'This value is not a valid currency.' => 'This value is not a valid currency.',
    'This value should be equal to {{ compared_value }}.' => 'This value should be equal to {{ compared_value }}.',
    'This value should be greater than {{ compared_value }}.' => 'This value should be greater than {{ compared_value }}.',
    'This value should be greater than or equal to {{ compared_value }}.' => 'This value should be greater than or equal to {{ compared_value }}.',
    'This value should be identical to {{ compared_value_type }} {{ compared_value }}.' => 'This value should be identical to {{ compared_value_type }} {{ compared_value }}.',
    'This value should be less than {{ compared_value }}.' => 'This value should be less than {{ compared_value }}.',
    'This value should be less than or equal to {{ compared_value }}.' => 'This value should be less than or equal to {{ compared_value }}.',
    'This value should not be equal to {{ compared_value }}.' => 'This value should not be equal to {{ compared_value }}.',
    'This value should not be identical to {{ compared_value_type }} {{ compared_value }}.' => 'This value should not be identical to {{ compared_value_type }} {{ compared_value }}.',
    'The image ratio is too big ({{ ratio }}). Allowed maximum ratio is {{ max_ratio }}.' => 'The image ratio is too big ({{ ratio }}). Allowed maximum ratio is {{ max_ratio }}.',
    'The image ratio is too small ({{ ratio }}). Minimum ratio expected is {{ min_ratio }}.' => 'The image ratio is too small ({{ ratio }}). Minimum ratio expected is {{ min_ratio }}.',
    'The image is square ({{ width }}x{{ height }}px). Square images are not allowed.' => 'The image is square ({{ width }}x{{ height }}px). Square images are not allowed.',
    'The image is landscape oriented ({{ width }}x{{ height }}px). Landscape oriented images are not allowed.' => 'The image is landscape oriented ({{ width }}x{{ height }}px). Landscape oriented images are not allowed.',
    'The image is portrait oriented ({{ width }}x{{ height }}px). Portrait oriented images are not allowed.' => 'The image is portrait oriented ({{ width }}x{{ height }}px). Portrait oriented images are not allowed.',
    'An empty file is not allowed.' => 'An empty file is not allowed.',
    'The host could not be resolved.' => 'The host could not be resolved.',
    'This value does not match the expected {{ charset }} charset.' => 'This value does not match the expected {{ charset }} charset.',
    'This is not a valid Business Identifier Code (BIC).' => 'This is not a valid Business Identifier Code (BIC).',
    'This form should not contain extra fields.' => 'This form should not contain extra fields.',
    'The uploaded file was too large. Please try to upload a smaller file.' => 'The uploaded file was too large. Please try to upload a smaller file.',
    'The CSRF token is invalid. Please try to resubmit the form.' => 'The CSRF token is invalid. Please try to resubmit the form.',
    'fos_user.username.already_used' => 'The username is already used',
    'fos_user.username.blank' => 'Please enter a username',
    'fos_user.username.short' => '[-Inf,Inf]The username is too short',
    'fos_user.username.long' => '[-Inf,Inf]The username is too long',
    'fos_user.email.already_used' => 'The email is already used',
    'fos_user.email.blank' => 'Please enter an email',
    'fos_user.email.short' => '[-Inf,Inf]The email is too short',
    'fos_user.email.long' => '[-Inf,Inf]The email is too long',
    'fos_user.email.invalid' => 'The email is not valid',
    'fos_user.password.blank' => 'Please enter a password',
    'fos_user.password.short' => '[-Inf,Inf]The password is too short',
    'fos_user.password.mismatch' => 'The entered passwords don\'t match',
    'fos_user.new_password.blank' => 'Please enter a new password',
    'fos_user.new_password.short' => '[-Inf,Inf]The new password is too short',
    'fos_user.current_password.invalid' => 'The entered password is invalid',
    'fos_user.group.blank' => 'Please enter a name',
    'fos_user.group.short' => '[-Inf,Inf]The name is too short',
    'fos_user.group.long' => '[-Inf,Inf]The name is too long',
  ),
  'security' =>
  array (
    'An authentication exception occurred.' => 'An authentication exception occurred.',
    'Authentication credentials could not be found.' => 'Authentication credentials could not be found.',
    'Authentication request could not be processed due to a system problem.' => 'Authentication request could not be processed due to a system problem.',
    'Invalid credentials.' => 'Invalid credentials.',
    'Cookie has already been used by someone else.' => 'Cookie has already been used by someone else.',
    'Not privileged to request the resource.' => 'Not privileged to request the resource.',
    'Invalid CSRF token.' => 'Invalid CSRF token.',
    'Digest nonce has expired.' => 'Digest nonce has expired.',
    'No authentication provider found to support the authentication token.' => 'No authentication provider found to support the authentication token.',
    'No session available, it either timed out or cookies are not enabled.' => 'No session available, it either timed out or cookies are not enabled.',
    'No token could be found.' => 'No token could be found.',
    'Username could not be found.' => 'Username could not be found.',
    'Account has expired.' => 'Account has expired.',
    'Credentials have expired.' => 'Credentials have expired.',
    'Account is disabled.' => 'Account is disabled.',
    'Account is locked.' => 'Account is locked.',
  ),
  'FOSUserBundle' =>
  array (
    'group.edit.submit' => 'Update group',
    'group.show.name' => 'Group name',
    'group.new.submit' => 'Create group',
    'group.flash.updated' => 'The group has been updated',
    'group.flash.created' => 'The group has been created',
    'group.flash.deleted' => 'The group has been deleted',
    'security.login.username' => 'Username',
    'security.login.password' => 'Password',
    'security.login.remember_me' => 'Remember me',
    'security.login.submit' => 'Log in',
    'profile.show.username' => 'Username',
    'profile.show.email' => 'Email',
    'profile.edit.submit' => 'Update',
    'profile.flash.updated' => 'The profile has been updated',
    'change_password.submit' => 'Change password',
    'change_password.flash.success' => 'The password has been changed',
    'registration.check_email' => 'An email has been sent to %email%. It contains an activation link you must click to activate your account.',
    'registration.confirmed' => 'Congrats %username%, your account is now activated.',
    'registration.back' => 'Back to the originating page.',
    'registration.submit' => 'Register',
    'registration.flash.user_created' => 'The user has been created successfully',
    'registration.email.subject' => 'Welcome %username%!',
    'registration.email.message' => 'Hello %username%!

To finish activating your account - please visit %confirmationUrl%

Regards,
the Team.
',
    'resetting.password_already_requested' => 'The password for this user has already been requested within the last 24 hours.',
    'resetting.check_email' => 'An email has been sent to %email%. It contains a link you must click to reset your password.',
    'resetting.request.invalid_username' => 'The username or email address "%username%" does not exist.',
    'resetting.request.username' => 'Username or email address',
    'resetting.request.submit' => 'Reset password',
    'resetting.reset.submit' => 'Change password',
    'resetting.flash.success' => 'The password has been reset successfully',
    'resetting.email.subject' => 'Reset Password',
    'resetting.email.message' => 'Hello %username%!

To reset your password - please visit %confirmationUrl%

Regards,
the Team.
',
    'layout.logout' => 'Log out',
    'layout.login' => 'Log in',
    'layout.register' => 'Register',
    'layout.logged_in_as' => 'Logged in as %username%',
    'form.group_name' => 'Group name',
    'form.username' => 'Username',
    'form.email' => 'Email',
    'form.current_password' => 'Current password',
    'form.password' => 'Password',
    'form.password_confirmation' => 'Repeat password',
    'form.new_password' => 'New password',
    'form.new_password_confirmation' => 'Repeat new password',
  ),
  'VichUploaderBundle' =>
  array (
    'download' => 'Download',
    'form.label.delete' => 'Delete?',
  ),
));
$cataloguePt->addFallbackCatalogue($catalogueEn);

return $catalogue;


text:
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://www.netbeans.org/ns/project/1">
    <type>org.netbeans.modules.apisupport.project</type>
    <configuration>
        <data xmlns="http://www.netbeans.org/ns/nb-module-project/3">
            <code-name-base>org.cmuchimps.gort.modules.appview</code-name-base>
            <suite-component/>
            <module-dependencies>
                <dependency>
                    <code-name-base>att.grappa</code-name-base>
                    <build-prerequisite/>
                    <compile-dependency/>
                    <run-dependency>
                        <specification-version>1.0</specification-version>
                    </run-dependency>
                </dependency>
                <dependency>
                    <code-name-base>org.cmuchimps.gort.api.gort</code-name-base>
                    <build-prerequisite/>
                    <compile-dependency/>
                    <run-dependency>
                        <specification-version>1.0</specification-version>
                    </run-dependency>
                </dependency>
                <dependency>
                    <code-name-base>org.cmuchimps.gort.modules.dataobject</code-name-base>
                    <build-prerequisite/>
                    <compile-dependency/>
                    <run-dependency>
                        <specification-version>1.0</specification-version>
                    </run-dependency>
                </dependency>
                <dependency>
                    <code-name-base>org.cmuchimps.gort.modules.helper</code-name-base>
                    <build-prerequisite/>
                    <compile-dependency/>
                    <run-dependency>
                        <specification-version>1.0</specification-version>
                    </run-dependency>
                </dependency>
                <dependency>
                    <code-name-base>org.cmuchimps.gort.modules.tablewidgets</code-name-base>
                    <build-prerequisite/>
                    <compile-dependency/>
                    <run-dependency>
                        <specification-version>1.0</specification-version>
                    </run-dependency>
                </dependency>
                <dependency>
                    <code-name-base>org.cmuchimps.gort.modules.uihelpers</code-name-base>
                    <build-prerequisite/>
                    <compile-dependency/>
                    <run-dependency>
                        <specification-version>1.0</specification-version>
                    </run-dependency>
                </dependency>
                <dependency>
                    <code-name-base>org.hibernate</code-name-base>
                    <build-prerequisite/>
                    <compile-dependency/>
                    <run-dependency>
                        <specification-version>1.0</specification-version>
                    </run-dependency>
                </dependency>
                <dependency>
                    <code-name-base>org.jdesktop.layout</code-name-base>
                    <build-prerequisite/>
                    <compile-dependency/>
                    <run-dependency>
                        <release-version>1</release-version>
                        <specification-version>1.24.1</specification-version>
                    </run-dependency>
                </dependency>
                <dependency>
                    <code-name-base>org.netbeans.api.visual</code-name-base>
                    <build-prerequisite/>
                    <compile-dependency/>
                    <run-dependency>
                        <specification-version>2.36.1</specification-version>
                    </run-dependency>
                </dependency>
                <dependency>
                    <code-name-base>org.netbeans.modules.print</code-name-base>
                    <build-prerequisite/>
                    <compile-dependency/>
                    <run-dependency>
                        <specification-version>7.16.1</specification-version>
                    </run-dependency>
                </dependency>
                <dependency>
                    <code-name-base>org.netbeans.modules.projectapi</code-name-base>
                    <build-prerequisite/>
                    <compile-dependency/>
                    <run-dependency>
                        <release-version>1</release-version>
                        <specification-version>1.50.1</specification-version>
                    </run-dependency>
                </dependency>
                <dependency>
                    <code-name-base>org.netbeans.modules.settings</code-name-base>
                    <build-prerequisite/>
                    <compile-dependency/>
                    <run-dependency>
                        <release-version>1</release-version>
                        <specification-version>1.38.2</specification-version>
                    </run-dependency>
                </dependency>
                <dependency>
                    <code-name-base>org.netbeans.spi.navigator</code-name-base>
                    <build-prerequisite/>
                    <compile-dependency/>
                    <run-dependency>
                        <release-version>1</release-version>
                        <specification-version>1.27.1</specification-version>
                    </run-dependency>
                </dependency>
                <dependency>
                    <code-name-base>org.netbeans.spi.palette</code-name-base>
                    <build-prerequisite/>
                    <compile-dependency/>
                    <run-dependency>
                        <release-version>1</release-version>
                        <specification-version>1.35.1</specification-version>
                    </run-dependency>
                </dependency>
                <dependency>
                    <code-name-base>org.openide.awt</code-name-base>
                    <build-prerequisite/>
                    <compile-dependency/>
                    <run-dependency>
                        <specification-version>7.55.1</specification-version>
                    </run-dependency>
                </dependency>
                <dependency>
                    <code-name-base>org.openide.dialogs</code-name-base>
                    <build-prerequisite/>
                    <compile-dependency/>
                    <run-dependency>
                        <specification-version>7.28.1</specification-version>
                    </run-dependency>
                </dependency>
                <dependency>
                    <code-name-base>org.openide.filesystems</code-name-base>
                    <build-prerequisite/>
                    <compile-dependency/>
                    <run-dependency>
                        <specification-version>8.5.1</specification-version>
                    </run-dependency>
                </dependency>
                <dependency>
                    <code-name-base>org.openide.loaders</code-name-base>
                    <build-prerequisite/>
                    <compile-dependency/>
                    <run-dependency>
                        <specification-version>7.44.3</specification-version>
                    </run-dependency>
                </dependency>
                <dependency>
                    <code-name-base>org.openide.util</code-name-base>
                    <build-prerequisite/>
                    <compile-dependency/>
                    <run-dependency>
                        <specification-version>8.29.3</specification-version>
                    </run-dependency>
                </dependency>
                <dependency>
                    <code-name-base>org.openide.util.lookup</code-name-base>
                    <build-prerequisite/>
                    <compile-dependency/>
                    <run-dependency>
                        <specification-version>8.19.1</specification-version>
                    </run-dependency>
                </dependency>
                <dependency>
                    <code-name-base>org.openide.windows</code-name-base>
                    <build-prerequisite/>
                    <compile-dependency/>
                    <run-dependency>
                        <specification-version>6.60.1</specification-version>
                    </run-dependency>
                </dependency>
            </module-dependencies>
            <public-packages/>
        </data>
    </configuration>
</project>

redpajama_set_name: RedPajamaGithub


text: load File.expand_path('../../tasks/uploads.rake', __FILE__)


text:
package com.xinyu.mwp.activity;

import android.os.Handler;
import android.support.v7.widget.LinearLayoutManager;
import android.support.v7.widget.RecyclerView;
import android.view.View;
import android.widget.TextView;

import com.xinyu.mwp.R;
import com.xinyu.mwp.activity.base.BaseMultiFragmentActivity;
import com.xinyu.mwp.adapter.GalleryAdapter;
import com.xinyu.mwp.entity.ProductEntity;
import com.xinyu.mwp.fragment.BaseDealAllGoodsFragment;
import com.xinyu.mwp.listener.OnAPIListener;
import com.xinyu.mwp.networkapi.NetworkAPIFactoryImpl;
import com.xinyu.mwp.user.UserManager;
import com.xinyu.mwp.util.ErrorCodeUtil;
import com.xinyu.mwp.util.LogUtil;
import com.xinyu.mwp.util.NumberUtils;

import org.xutils.view.annotation.ViewInject;

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

/**
 * Created by Benjamin on 17/1/12.
 */

public class DealDetailFragmentActivity extends BaseMultiFragmentActivity {
    @ViewInject(R.id.money)
    private TextView money;
    @ViewInject(R.id.allHandsCount)
    private TextView allHandsCount;
    @ViewInject(R.id.allOrdersCount)
    private TextView allOrdersCount;
//
//    @ViewInject(R.id.bottomLayout)
//    private LinearLayout bottombar;

    @ViewInject(R.id.rv_title)
    private RecyclerView mRecyclerView;
    private long first;
    private List<ProductEntity> productList;
    private BaseDealAllGoodsFragment baseDealAllGoodsFragment;
    private List<String> mTitleList;
    private GalleryAdapter mAdapter;
    private List<String> mSymbolList;

    @Override
    public int getFragmentContainerId() {
        return R.id.contentContainer;
    }

    @Override
    protected int getLayoutID() {
        return R.layout.activity_dealdetail_fragment;
    }

    @Override
    public void createFragmentsToBackStack() {
        if (mSymbolList != null) {
            for (String s : mSymbolList) {
                baseDealAllGoodsFragment = new BaseDealAllGoodsFragment(mSymbolList);
                fragments.add(baseDealAllGoodsFragment);
            }
        }
        pushFragmentToBackStack(0);
    }

    @Override
    public void pushFragmentToBackStack(int selectIndex) {
        super.pushFragmentToBackStack(selectIndex);
    }

    @Override
    protected void initView() {
        super.initView();
        setTitle("交易明细");
        requestProductList();//请求商品列表获取标题
    }

    private void requestProductList() {
        NetworkAPIFactoryImpl.getDealAPI().products(new OnAPIListener<List<ProductEntity>>() {
            @Override
            public void onError(Throwable ex) {
                ex.printStackTrace();
                mRecyclerView.setVisibility(View.GONE);
                ErrorCodeUtil.showEeorMsg(context,ex);
            }

            @Override
            public void onSuccess(List<ProductEntity> productEntities) {
                if (productList != null) {
                    productList.clear();
                }
                mRecyclerView.setVisibility(View.VISIBLE);
                productList = productEntities;
                LogUtil.d("商品列表--请求成功的信息是:" + productEntities.toString());
                processData();
            }
        });
    }

    /**
     * 加载标题
     */
    private void processData() {
        mTitleList = new ArrayList<>();
        mSymbolList = new ArrayList<>();
        HashSet<String> setList = new HashSet<>();
        for (ProductEntity productEntity : productList) {
            if (setList.add(productEntity.getShowSymbol())) {
                mTitleList.add(productEntity.getShowSymbol());
                mSymbolList.add(productEntity.getSymbol());
            }
        }
        initProductName();//加载标题
        createFragmentsToBackStack();
    }

    private void initProductName() {
        if (mTitleList == null) {
            return;
        }
        if (mAdapter != null) {
            mAdapter.notifyDataSetChanged();
        } else {
            LinearLayoutManager linearLayoutManager = new LinearLayoutManager(context);
            linearLayoutManager.setOrientation(LinearLayoutManager.HORIZONTAL);
            mRecyclerView.setLayoutManager(linearLayoutManager);
            mAdapter = new GalleryAdapter(context, mTitleList);
            mRecyclerView.setAdapter(mAdapter);
        }
        mAdapter.setPosition(0);
        mAdapter.setOnItemClick(new GalleryAdapter.OnClickListener() {
            @Override
            public void OnClick(View view, int position) {
                baseDealAllGoodsFragment.updateFragment(position);
                pushFragmentToBackStack(position); //点击后切换不同的fragment
                mAdapter.setPosition(position);
                mAdapter.notifyDataSetChanged();
            }

            @Override
            public boolean OnLongClick(RecyclerView.ViewHolder viewHolder, View view, int position) {
                return false;
            }
        });
    }

    @Override
    protected void initData() {
        super.initData();
        showLoader();
        new Handler().postDelayed(new Runnable() {
            @Override
            public void run() {
                money.setText(NumberUtils.halfAdjust2(UserManager.getInstance().getUserEntity().getBalance()));
//                allHandsCount.setText("---");
//                allOrdersCount.setText("---");
                closeLoader();
            }
        }, 1000);
    }
}


text:
<?php if (!defined('BASEPATH')) exit('No direct script access allowed');

class Model_user_webs_personales extends CI_Model{

	function __construct() {
		parent::__construct();
	}

	function traer_afiliado($id){
		$tipos = $this->db->get_where('users', array('id' => $id));

		return $tipos->result();
	}

	function traer_afiliado_por_username($username){
		$tipos = $this->db->get_where('users', array('username' => $username));

		return $tipos->result();
	}

	function traer_acceso_web_personal_afiliado($username){
		$tipos = $this->db->get_where('user_webs_personales', array('username' => $username));

		return $tipos->result();
	}

	function listar_por_afiliado($username){
		$tipos = $this->db->get_where('user_webs_personales', array('username' => $username));
		return $tipos->result();
	}

	function actualizar($username, $clave){
		$datos = array(
				'clave' => $clave);
		$this->db->where("username",$username);
		$this->db->update("user_webs_personales",$datos);
	}

	function insertar($username, $clave){
		$datos = array(
				'username' => $username,
				'clave' => $clave
		);
		$this->db->insert("user_webs_personales",$datos);
	}
}


text:
// Global varianbles
/*global Waypoint, lightbox, WOW */

// Detect IE version
var detectIEVersion = function() {
  var userAgent = window.navigator.userAgent;
  var internetExplorer = userAgent.indexOf('MSIE ');
  if (internetExplorer > 0) {
    return parseInt(userAgent.substring(internetExplorer + 5, userAgent.indexOf('.', internetExplorer)));
  }

  var trident = userAgent.indexOf('Trident/');
  if (trident > 0) {
    var rv = userAgent.indexOf('rv:');
    return parseInt( userAgent.substring(rv + 3,  userAgent.indexOf('.', rv)));
  }

  var edge = userAgent.indexOf('Edge/');
  if (edge > 0) {
    return parseInt(userAgent.substring(edge + 5, userAgent.indexOf('.', edge)));
  }
  return false;
};
var IEVersion = detectIEVersion();

var calculateScrollBarWidth = function() {
  var scrollBarDiv = document.createElement('div');
  scrollBarDiv.className = 'modal-scrollbar-measure';
  $(document.body).append(scrollBarDiv);
  var scrollBarWidth = scrollBarDiv.offsetWidth - scrollBarDiv.clientWidth;
  $(document.body)[0].removeChild(scrollBarDiv);
  return scrollBarWidth;
};
var scrollBarWidth = calculateScrollBarWidth();

// Body
var body = $('body');

$(window).load(function() {
  $(".loader").fadeOut("slow");
})

$(document).ready(function() {

  // Nav bar section
  var navBarSection = body.find('.nav-bar-section');
  if (navBarSection.length) {
    navBarSection.find('.navbar-nav').onePageNav({
      changeHash: true,
      scrollSpeed: 400
    });
    navBarSection.find('.navbar-fixed-top').autoHidingNavbar({
      hideOffset: 210
    });
    navBarSection.find('a.dropdown-toggle').hover(function(e) {
      var _this = $(this);
      var parent = _this.offsetParent('.dropdown-menu');
      _this.parent('li').toggleClass('open');

      if(!parent.parent().hasClass('nav')) {
        _this.next().css({'top': _this[0].offsetTop, 'left': parent.outerWidth() - 4});
      }

      $('.nav li.open').not(_this.parents('li')).removeClass('open');

      return false;
    });
  }

  // Hero slider section
  var heroSliderSection = body.find('.hero-slider-section');
  if (heroSliderSection.length) {
    var heroSlider = heroSliderSection.find('.owl-carousel');
    var heroTitle = heroSlider.find('.hero-title');
    var heroSubtitle = heroSlider.find('.hero-subtitle');
    var animated = 'animated ';
    var heroTitleAnimation = animated + heroTitle.data('animation');
    var heroSubtitleAnimation = animated + heroSubtitle.data('animation');
    var heroTitleDelay = heroTitle.data('delay');
    var heroSubtitleDelay = heroSubtitle.data('delay');

    setTimeout(function () {
        heroTitle.addClass('animated ' + heroTitleAnimation);
      }, heroTitleDelay
    );
    setTimeout(function () {
        heroSubtitle.addClass('animated ' + heroSubtitleAnimation);
      }, heroSubtitleDelay
    );
    heroSlider.owlCarousel({
      autoplay: true,
      autoplayHoverPause: true,
      autoplayTimeout: 5000,
      dots: false,
      items: 1,
      loop: true,
      nav: true,
      navText: [
        "",
        ""
      ]
    }).on('change.owl.carousel', function(event) {
      heroTitle.removeClass('animated ' + heroTitleAnimation);
      heroSubtitle.removeClass('animated ' + heroSubtitleAnimation);
      heroSlider.find('.owl-item.cloned').find('.hero-title').removeClass(heroTitleAnimation);
      heroSlider.find('.owl-item.cloned').find('.hero-subtitle').removeClass(heroSubtitleAnimation);
    }).on('changed.owl.carousel', function(event) {
      setTimeout(function () {
          heroSlider.find('.owl-item.active').find('.hero-title').addClass(heroTitleAnimation);
        }, heroTitleDelay
      );
      setTimeout(function () {
          heroSlider.find('.owl-item.active').find('.hero-subtitle').addClass(heroSubtitleAnimation);
        }, heroSubtitleDelay
      );
    });
  }

  // Gallery section
  var gallerySection = body.find('.gallery-section');
  if (gallerySection.length) {
    if (!$('.lb-outerContainer').parent().hasClass('lb-wrapper')) {
      $('.lb-outerContainer').wrap( "

" );
    }
    gallerySection.find('a[data-lightbox="main-gallery"]').on('click', function() {
      $('body').css('padding-right', scrollBarWidth);
      $('#lightboxOverlay, .lb-loader, .lb-close').on('click', function() {
        $('body').css('padding-right', '0');
      });
      $('.lb-wrapper').on('click', function() {
        $('body').css('padding-right', '0');
        $('.lb-close').click();
      });
    });
  }

  // Services section
  var servicesSection = body.find('.services-section');
  if (servicesSection.length) {
    servicesSection.find('.service-card .service-description').matchHeight();
  }

  // Counter section
  var counterSection = body.find('.counter-section');
  if (counterSection.length) {
    var counterSectionWaypoint = new Waypoint({
      element: counterSection,
      handler: function() {
        counterSection.find('.counter').countTo({
          refreshInterval: 11,
          speed: 900
        });
        this.destroy();
      },
      offset: '211px'
    });
  }

  // Testimonials section
  var testimonialsSection = body.find('.testimonials-section');
  if (testimonialsSection.length) {
    testimonialsSection.find('.owl-carousel').owlCarousel({
      animateIn: 'fadeIn',
      autoplay: true,
      autoplayTimeout: 5000,
      dots: false,
      items: 1,
      loop: true,
      nav: true,
      navText: [
        "",
        ""
      ]
    });
  }

  // Sponsors section
  var sponsorsSection = body.find('.sponsors-section');
  if (sponsorsSection.length) {
    var sponsorsSLider = sponsorsSection.find('.owl-carousel');
    sponsorsSLider.owlCarousel({
      autoplay: true,
      autoplayTimeout: 3000,
      responsive:{
        0:{
            items: 1
        },
        500:{
            items: 3
        },
        1000:{
            items: 5
        }
      }
    }).on('mousewheel', '.owl-stage', function (e) {
      if (e.deltaY>0) {
        sponsorsSLider.trigger('next.owl');
      } else {
        sponsorsSLider.trigger('prev.owl');
      }
      e.preventDefault();
    });
  }

  // Lightbox Config
  lightbox.option({
    disableScrolling: true
  });

  // ScrollUp Config
  $(function () {
    $.scrollUp({
      animation: 'slide',
      scrollDistance: 400,
      scrollSpeed: 400,
      scrollText: ""
    });
  });

  // jQuery stellar config
  $.stellar({
    responsive: true
  });

  // Wow js Config
  var wow = body.find('.wow');
  if (wow.length) {
    new WOW().init();
  }
});


text:
if(!dojo._hasResource["dojox.grid.enhanced.plugins.Filter"]){
dojo._hasResource["dojox.grid.enhanced.plugins.Filter"]=true;
dojo.provide("dojox.grid.enhanced.plugins.Filter");
dojo.requireLocalization("dojox.grid.enhanced","Filter",null,"ROOT,ar,ca,cs,da,de,el,es,fi,fr,he,hu,it,ja,kk,ko,nb,nl,pl,pt,pt-pt,ru,sl,sv,th,tr,zh,zh-tw");
dojo.require("dojox.grid.enhanced._Plugin");
dojo.require("dojox.grid.enhanced.plugins.Dialog");
dojo.require("dojox.grid.enhanced.plugins.filter.FilterLayer");
dojo.require("dojox.grid.enhanced.plugins.filter.FilterBar");
dojo.require("dojox.grid.enhanced.plugins.filter.FilterDefDialog");
dojo.require("dojox.grid.enhanced.plugins.filter.FilterStatusTip");
dojo.require("dojox.grid.enhanced.plugins.filter.ClearFilterConfirm");
(function(){
var ns=dojox.grid.enhanced.plugins,_1=ns.filter;
dojo.declare("dojox.grid.enhanced.plugins.Filter",dojox.grid.enhanced._Plugin,{name:"filter",constructor:function(_2,_3){
this.grid=_2;
this.nls=dojo.i18n.getLocalization("dojox.grid.enhanced","Filter");
_3=this.args=dojo.isObject(_3)?_3:{};
if(typeof _3.ruleCount!="number"||_3.ruleCount<0){
_3.ruleCount=3;
}
this._wrapStore();
var _4={"plugin":this};
this.clearFilterDialog=new dojox.grid.enhanced.plugins.Dialog({refNode:this.grid.domNode,title:this.nls["clearFilterDialogTitle"],content:new _1.ClearFilterConfirm(_4)});
this.filterDefDialog=new _1.FilterDefDialog(_4);
this.filterBar=new _1.FilterBar(_4);
this.filterStatusTip=new _1.FilterStatusTip(_4);
_2.onFilterDefined=function(){
};
this.connect(_2.layer("filter"),"onFilterDefined",function(_5){
_2.onFilterDefined(_2.getFilter(),_2.getFilterRelation());
});
},destroy:function(){
this.inherited(arguments);
try{
this.grid.unwrap("filter");
this.filterBar.destroyRecursive();
this.filterBar=null;
this.clearFilterDialog.destroyRecursive();
this.clearFilterDialog=null;
this.filterStatusTip.destroy();
this.filterStatusTip=null;
this.filterDefDialog.destroy();
this.filterDefDialog=null;
this.grid=null;
this.nls=null;
this.args=null;
}
catch(e){
console.warn("Filter.destroy() error:",e);
}
},_wrapStore:function(){
var g=this.grid;
var _6=this.args;
var _7=_6.isServerSide?new _1.ServerSideFilterLayer(_6):new _1.ClientSideFilterLayer({cacheSize:_6.filterCacheSize,fetchAll:_6.fetchAllOnFirstFilter,getter:this._clientFilterGetter});
ns.wrap(g,"_storeLayerFetch",_7);
this.connect(g,"_onDelete",dojo.hitch(_7,"invalidate"));
},onSetStore:function(_8){
this.filterDefDialog.clearFilter(true);
},_clientFilterGetter:function(_9,_a,_b){
return _a.get(_b,_9);
}});
})();
dojox.grid.EnhancedGrid.registerPlugin(dojox.grid.enhanced.plugins.Filter);
}


text:
/*
 * (C) 2007-2012 Alibaba Group Holding Limited.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package com.taobao.gecko.service.impl;

import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNotNull;
import static org.junit.Assert.assertNull;
import static org.junit.Assert.assertSame;
import static org.junit.Assert.assertTrue;

import java.util.Set;

import org.junit.After;
import org.junit.Before;
import org.junit.Test;

import com.taobao.gecko.core.command.Constants;
import com.taobao.gecko.core.nio.NioSession;
import com.taobao.gecko.service.config.ClientConfig;
import com.taobao.gecko.service.mock.MockSession;
import com.taobao.gecko.service.notify.NotifyCommandFactory;

/**
 *
 *
 *
 * @author boyan
 *
 * @since 1.0, 2009-12-21 ÏÂÎç02:28:37
 */

public class DefaultRemotingContextUnitTest {
    private static final class MockTask implements Runnable {
        public void run() {
            while (!Thread.currentThread().isInterrupted()) {

            }
        }
    }

    private DefaultRemotingContext remotingContext;

    @Before
    public void setUp() {
        final ClientConfig config = new ClientConfig();
        config.setCallBackExecutorPoolSize(1);
        config.setCallBackExecutorQueueSize(1);
        config.setMaxCallBackExecutorPoolSize(1);
        this.remotingContext = new DefaultRemotingContext(config, new NotifyCommandFactory());
    }

    @After
    public void tearDown() {
        if (this.remotingContext != null) {
            this.remotingContext.dispose();
        }
    }

    @Test
    public void testAttribute() {
        assertNull(this.remotingContext.getAttribute("a"));
        assertEquals(1, this.remotingContext.getAttribute("a", 1));
        this.remotingContext.setAttribute("a", 2);
        assertEquals(2, this.remotingContext.getAttribute("a", 1));
        Set<Object> keys = this.remotingContext.getAttributeKeys();
        assertTrue(keys.contains("a"));
        assertEquals(1, keys.size());

        this.remotingContext.setAttributeIfAbsent("b", 3);
        keys = this.remotingContext.getAttributeKeys();
        assertEquals(2, keys.size());
        assertEquals(3, this.remotingContext.getAttribute("b"));

        this.remotingContext.removeAttribute("a");
        assertNull(this.remotingContext.getAttribute("a"));
        this.remotingContext.removeAttribute("b");
        assertNull(this.remotingContext.getAttribute("b"));
        keys = this.remotingContext.getAttributeKeys();
        assertTrue(keys.isEmpty());
    }

    @Test
    public void testSession2ConnectionMapping() {
        final NioSession session = new MockSession();
        final String groupName = "group1";
        final DefaultConnection conn = new DefaultConnection(session, this.remotingContext);

        assertNull(this.remotingContext.getConnectionsByGroup(Constants.DEFAULT_GROUP));
        assertNull(this.remotingContext.getConnectionsByGroup(groupName));
        // ¼ÓÈëĬÈÏ·Ö×é
        this.remotingContext.addConnection(conn);
        assertNotNull(this.remotingContext.getConnectionsByGroup(Constants.DEFAULT_GROUP));

        assertEquals(1, this.remotingContext.getConnectionsByGroup(Constants.DEFAULT_GROUP).size());
        assertTrue(this.remotingContext.getConnectionsByGroup(Constants.DEFAULT_GROUP).contains(conn));
        assertNull(this.remotingContext.getConnectionsByGroup(groupName));

        // ¼ÓÈëgroupName
        this.remotingContext.addConnectionToGroup(groupName, conn);
        assertEquals(1, this.remotingContext.getConnectionsByGroup(Constants.DEFAULT_GROUP).size());
        assertEquals(1, this.remotingContext.getConnectionsByGroup(groupName).size());
        assertTrue(this.remotingContext.getConnectionsByGroup(groupName).contains(conn));

        final Set<String> groupSet = this.remotingContext.getGroupSet();
        assertEquals(2, groupSet.size());
        assertTrue(groupSet.contains(Constants.DEFAULT_GROUP));
        assertTrue(groupSet.contains(groupName));

        // ´ÓĬÈÏ·Ö×éÒƳý
        this.remotingContext.removeConnection(conn);
        assertNull(this.remotingContext.getConnectionsByGroup(Constants.DEFAULT_GROUP));
        // ´ÓgroupNameÒƳý
        this.remotingContext.removeConnectionFromGroup(groupName, conn);
        assertNull(this.remotingContext.getConnectionsByGroup(groupName));
        assertTrue(this.remotingContext.getGroupSet().isEmpty());

        // ²âÊÔsessionµ½connµÄÓ³Éä
        this.remotingContext.addSession2ConnectionMapping(session, conn);
        assertSame(conn, this.remotingContext.getConnectionBySession(session));
        assertSame(conn, this.remotingContext.removeSession2ConnectionMapping(session));
        assertNull(this.remotingContext.getConnectionBySession(session));
    }

}


text:
@interface NUPropertyInspectorViewTests : SenTestCase {
    NSWindow *_window;
    NUPropertyInspectorView *_inspector;
}
@end

@implementation NUPropertyInspectorViewTests

- (void) setUp
{
    _window = [[NSWindow alloc] initWithContentRect:CGRectMake(0, 0, 100, 100)
                                          styleMask:NSBorderlessWindowMask
                                            backing:NSBackingStoreBuffered
                                              defer:YES];

    _inspector = [NUPropertyInspectorView propertyInspectorWithName:@"inspector.property"
                                                              label:@"property"
                                                          andControl:[[NSTextField alloc] init]];
    _inspector.frame = CGRectMake(0, 0, 100, 28);
    [_window.contentView addSubview:_inspector];
    [_inspector updateConstraints];
}

- (void) testDefaultProperties
{
    STAssertEqualObjects(_inspector.name, @"inspector.property", @"Values should match");
    STAssertEqualObjects(_inspector.label, @"property", @"Values should match");
    STAssertNotNil(_inspector.labelField, @"Value should not be nil");
    STAssertEqualObjects(_inspector.labelField.stringValue, @"property", @"Values should match");
    STAssertNotNil(_inspector.valueControl, @"Value should not be nil");
    STAssertTrue([_inspector.valueControl isKindOfClass:[NSTextField class]], @"Should be a text field");
    STAssertNil(_inspector.textField, @"Value should be nil");
    STAssertNil(_inspector.units, @"Value should be nil");
    STAssertNil(_inspector.unitsField, @"Value should be nil");
    STAssertTrue(_inspector.resizableControl, @"Control should be resizable by default");
    STAssertFalse(_inspector.translatesAutoresizingMaskIntoConstraints, @"Should not use resizing mask");
    STAssertTrue(_inspector.constraints.isNotEmpty, @"There should be some constraints");

    STAssertTrue([_inspector.labelField.cell controlSize] == NSSmallControlSize, @"Inspectors should use small controls");
    STAssertTrue([_inspector.valueControl.cell controlSize] == NSSmallControlSize, @"Inspectors should use small controls");
    STAssertTrue([[_inspector.labelField.cell font] fontSize] == [NSFont systemFontSizeForControlSize:NSSmallControlSize], @"Inspectors should use small font size");
}

- (void) testLabelProperty
{
    _inspector.label = @"Another Label";
    STAssertEqualObjects(_inspector.label, @"Another Label", @"Values should match");
    STAssertEqualObjects(_inspector.labelField.stringValue, @"Another Label", @"Values should match");
}

- (void) testUnitsProperty
{
    STAssertNil(_inspector.unitsField, @"Value should be nil");

    _inspector.units = @"GB";
    [_inspector updateConstraints];

    NSTextField *field = _inspector.unitsField;

    STAssertEqualObjects(_inspector.units, @"GB", @"Values should match");
    STAssertNotNil(field, @"Value should no longer be nil");
    STAssertEqualObjects(field.stringValue, @"GB", @"Values should match");
    STAssertTrue([field.cell controlSize] == NSSmallControlSize, @"Inspectors should use small controls");
    STAssertTrue([[field.cell font] fontSize] == [NSFont systemFontSizeForControlSize:NSSmallControlSize], @"Inspectors should use small font size");

    _inspector.units = nil;
    STAssertNil(_inspector.units, @"Value should be nil");
    STAssertNil(_inspector.unitsField, @"Value should no longer be nil");
}

- (void) testTextFieldProperty
{
    _inspector.textField = [[NSTextField alloc] init];
    [_inspector updateConstraints];

    NSTextField *field = _inspector.textField;

    STAssertNotNil(field, @"Value should no longer be nil");
    STAssertTrue([field.cell controlSize] == NSSmallControlSize, @"Inspectors should use small controls");
    STAssertTrue([[field.cell font] fontSize] == [NSFont systemFontSizeForControlSize:NSSmallControlSize], @"Inspectors should use small font size");

    _inspector.units = @"GB";
    [_inspector updateConstraints];

    _inspector.textField = nil;
    STAssertNil(_inspector.textField, @"Value should be nil");

}

@end


text:
/**
 * Expose `ImageObject`
 */

module.exports = require('./lib/imageobject.js');


text:
.. _topics-loaders:

============
Item Loaders
============

.. module:: scrapy.loader
   :synopsis: Item Loader class

Item Loaders provide a convenient mechanism for populating scraped :ref:`items
<topics-items>`. Even though items can be populated directly, Item Loaders provide a
much more convenient API for populating them from a scraping process, by automating
some common tasks like parsing the raw extracted data before assigning it.

In other words, :ref:`items <topics-items>` provide the *container* of
scraped data, while Item Loaders provide the mechanism for *populating* that
container.

Item Loaders are designed to provide a flexible, efficient and easy mechanism
for extending and overriding different field parsing rules, either by spider,
or by source format (HTML, XML, etc) without becoming a nightmare to maintain.

.. note:: Item Loaders are an extension of the itemloaders_ library that make it
    easier to work with Scrapy by adding support for
    :ref:`responses <topics-request-response>`.

Using Item Loaders to populate items
====================================

To use an Item Loader, you must first instantiate it. You can either
instantiate it with an :ref:`item object <topics-items>` or without one, in which
case an :ref:`item object <topics-items>` is automatically created in the
Item Loader ``__init__`` method using the :ref:`item <topics-items>` class
specified in the :attr:`ItemLoader.default_item_class` attribute.

Then, you start collecting values into the Item Loader, typically using
:ref:`Selectors <topics-selectors>`. You can add more than one value to
the same item field; the Item Loader will know how to "join" those values later
using a proper processing function.

.. note:: Collected data is internally stored as lists,
   allowing to add several values to the same field.
   If an ``item`` argument is passed when creating a loader,
   each of the item's values will be stored as-is if it's already
   an iterable, or wrapped with a list if it's a single value.

Here is a typical Item Loader usage in a :ref:`Spider <topics-spiders>`, using
the :ref:`Product item <topics-items-declaring>` declared in the :ref:`Items
chapter <topics-items>`::

    from scrapy.loader import ItemLoader
    from myproject.items import Product

    def parse(self, response):
        l = ItemLoader(item=Product(), response=response)
        l.add_xpath('name', '//div[@class="product_name"]')
        l.add_xpath('name', '//div[@class="product_title"]')
        l.add_xpath('price', '//p[@id="price"]')
        l.add_css('stock', 'p#stock]')
        l.add_value('last_updated', 'today') # you can also use literal values
        return l.load_item()

By quickly looking at that code, we can see the ``name`` field is being
extracted from two different XPath locations in the page:

1. ``//div[@class="product_name"]``
2. ``//div[@class="product_title"]``

In other words, data is being collected by extracting it from two XPath
locations, using the :meth:`~ItemLoader.add_xpath` method. This is the
data that will be assigned to the ``name`` field later.

Afterwards, similar calls are used for ``price`` and ``stock`` fields
(the latter using a CSS selector with the :meth:`~ItemLoader.add_css` method),
and finally the ``last_update`` field is populated directly with a literal value
(``today``) using a different method: :meth:`~ItemLoader.add_value`.

Finally, when all data is collected, the :meth:`ItemLoader.load_item` method is
called which actually returns the item populated with the data
previously extracted and collected with the :meth:`~ItemLoader.add_xpath`,
:meth:`~ItemLoader.add_css`, and :meth:`~ItemLoader.add_value` calls.

.. _topics-loaders-dataclass:

Working with dataclass items
============================

By default, :ref:`dataclass items <dataclass-items>` require all fields to be
passed when created. This could be an issue when using dataclass items with
item loaders: unless a pre-populated item is passed to the loader, fields
will be populated incrementally using the loader's :meth:`~ItemLoader.add_xpath`,
:meth:`~ItemLoader.add_css` and :meth:`~ItemLoader.add_value` methods.

One approach to overcome this is to define items using the
:func:`~dataclasses.field` function, with a ``default`` argument::

    from dataclasses import dataclass, field
    from typing import Optional

    @dataclass
    class InventoryItem:
        name: Optional[str] = field(default=None)
        price: Optional[float] = field(default=None)
        stock: Optional[int] = field(default=None)

.. _topics-loaders-processors:

Input and Output processors
===========================

An Item Loader contains one input processor and one output processor for each
(item) field. The input processor processes the extracted data as soon as it's
received (through the :meth:`~ItemLoader.add_xpath`, :meth:`~ItemLoader.add_css` or
:meth:`~ItemLoader.add_value` methods) and the result of the input processor is
collected and kept inside the ItemLoader. After collecting all data, the
:meth:`ItemLoader.load_item` method is called to populate and get the populated
:ref:`item object <topics-items>`.  That's when the output processor is
called with the data previously collected (and processed using the input
processor). The result of the output processor is the final value that gets
assigned to the item.

Let's see an example to illustrate how the input and output processors are
called for a particular field (the same applies for any other field)::

    l = ItemLoader(Product(), some_selector)
    l.add_xpath('name', xpath1) # (1)
    l.add_xpath('name', xpath2) # (2)
    l.add_css('name', css) # (3)
    l.add_value('name', 'test') # (4)
    return l.load_item() # (5)

So what happens is:

1. Data from ``xpath1`` is extracted, and passed through the *input processor* of
   the ``name`` field. The result of the input processor is collected and kept in
   the Item Loader (but not yet assigned to the item).

2. Data from ``xpath2`` is extracted, and passed through the same *input
   processor* used in (1). The result of the input processor is appended to the
   data collected in (1) (if any).

3. This case is similar to the previous ones, except that the data is extracted
   from the ``css`` CSS selector, and passed through the same *input
   processor* used in (1) and (2). The result of the input processor is appended to the
   data collected in (1) and (2) (if any).

4. This case is also similar to the previous ones, except that the value to be
   collected is assigned directly, instead of being extracted from a XPath
   expression or a CSS selector.
   However, the value is still passed through the input processors. In this
   case, since the value is not iterable it is converted to an iterable of a
   single element before passing it to the input processor, because input
   processor always receive iterables.

5. The data collected in steps (1), (2), (3) and (4) is passed through
   the *output processor* of the ``name`` field.
   The result of the output processor is the value assigned to the ``name``
   field in the item.

It's worth noticing that processors are just callable objects, which are called
with the data to be parsed, and return a parsed value. So you can use any
function as input or output processor. The only requirement is that they must
accept one (and only one) positional argument, which will be an iterable.

.. versionchanged:: 2.0
   Processors no longer need to be methods.

.. note:: Both input and output processors must receive an iterable as their
   first argument. The output of those functions can be anything. The result of
   input processors will be appended to an internal list (in the Loader)
   containing the collected values (for that field). The result of the output
   processors is the value that will be finally assigned to the item.

The other thing you need to keep in mind is that the values returned by input
processors are collected internally (in lists) and then passed to output
processors to populate the fields.

Last, but not least, itemloaders_ comes with some :ref:`commonly used
processors <itemloaders:built-in-processors>` built-in for convenience.

Declaring Item Loaders
======================

Item Loaders are declared using a class definition syntax. Here is an example::

    from itemloaders.processors import TakeFirst, MapCompose, Join
    from scrapy.loader import ItemLoader

    class ProductLoader(ItemLoader):

        default_output_processor = TakeFirst()

        name_in = MapCompose(str.title)
        name_out = Join()

        price_in = MapCompose(str.strip)

        # ...

As you can see, input processors are declared using the ``_in`` suffix while
output processors are declared using the ``_out`` suffix. And you can also
declare a default input/output processors using the
:attr:`ItemLoader.default_input_processor` and
:attr:`ItemLoader.default_output_processor` attributes.

.. _topics-loaders-processors-declaring:

Declaring Input and Output Processors
=====================================

As seen in the previous section, input and output processors can be declared in
the Item Loader definition, and it's very common to declare input processors
this way. However, there is one more place where you can specify the input and
output processors to use: in the :ref:`Item Field <topics-items-fields>`
metadata. Here is an example::

    import scrapy
    from itemloaders.processors import Join, MapCompose, TakeFirst
    from w3lib.html import remove_tags

    def filter_price(value):
        if value.isdigit():
            return value

    class Product(scrapy.Item):
        name = scrapy.Field(
            input_processor=MapCompose(remove_tags),
            output_processor=Join(),
        )
        price = scrapy.Field(
            input_processor=MapCompose(remove_tags, filter_price),
            output_processor=TakeFirst(),
        )

>>> from scrapy.loader import ItemLoader
>>> il = ItemLoader(item=Product())
>>> il.add_value('name', ['Welcome to my', 'website'])
>>> il.add_value('price', ['€', '1000'])
>>> il.load_item()
{'name': 'Welcome to my website', 'price': '1000'}

The precedence order, for both input and output processors, is as follows:

1. Item Loader field-specific attributes: ``field_in`` and ``field_out`` (most
   precedence)
2. Field metadata (``input_processor`` and ``output_processor`` key)
3. Item Loader defaults: :meth:`ItemLoader.default_input_processor` and
   :meth:`ItemLoader.default_output_processor` (least precedence)

See also: :ref:`topics-loaders-extending`.

.. _topics-loaders-context:

Item Loader Context
===================

The Item Loader Context is a dict of arbitrary key/values which is shared among
all input and output processors in the Item Loader. It can be passed when
declaring, instantiating or using Item Loader. They are used to modify the
behaviour of the input/output processors.

For example, suppose you have a function ``parse_length`` which receives a text
value and extracts a length from it::

    def parse_length(text, loader_context):
        unit = loader_context.get('unit', 'm')
        # ... length parsing code goes here ...
        return parsed_length

By accepting a ``loader_context`` argument the function is explicitly telling
the Item Loader that it's able to receive an Item Loader context, so the Item
Loader passes the currently active context when calling it, and the processor
function (``parse_length`` in this case) can thus use them.

There are several ways to modify Item Loader context values:

1. By modifying the currently active Item Loader context
   (:attr:`~ItemLoader.context` attribute)::

      loader = ItemLoader(product)
      loader.context['unit'] = 'cm'

2. On Item Loader instantiation (the keyword arguments of Item Loader
   ``__init__`` method are stored in the Item Loader context)::

      loader = ItemLoader(product, unit='cm')

3. On Item Loader declaration, for those input/output processors that support
   instantiating them with an Item Loader context. :class:`~processor.MapCompose` is one of
   them::

       class ProductLoader(ItemLoader):
           length_out = MapCompose(parse_length, unit='cm')

ItemLoader objects
==================

.. autoclass:: scrapy.loader.ItemLoader
    :members:
    :inherited-members:

.. _topics-loaders-nested:

Nested Loaders
==============

When parsing related values from a subsection of a document, it can be
useful to create nested loaders.  Imagine you're extracting details from
a footer of a page that looks something like:

Example::

        Like Us
        Follow Us
        Email Us

Without nested loaders, you need to specify the full xpath (or css) for each value
that you wish to extract.

Example::

    loader = ItemLoader(item=Item())
    # load stuff not in the footer
    loader.add_xpath('social', '//footer/a[@class = "social"]/@href')
    loader.add_xpath('email', '//footer/a[@class = "email"]/@href')
    loader.load_item()

Instead, you can create a nested loader with the footer selector and add values
relative to the footer.  The functionality is the same but you avoid repeating
the footer selector.

Example::

    loader = ItemLoader(item=Item())
    # load stuff not in the footer
    footer_loader = loader.nested_xpath('//footer')
    footer_loader.add_xpath('social', 'a[@class = "social"]/@href')
    footer_loader.add_xpath('email', 'a[@class = "email"]/@href')
    # no need to call footer_loader.load_item()
    loader.load_item()

You can nest loaders arbitrarily and they work with either xpath or css selectors.
As a general guideline, use nested loaders when they make your code simpler but do
not go overboard with nesting or your parser can become difficult to read.

.. _topics-loaders-extending:

Reusing and extending Item Loaders
==================================

As your project grows bigger and acquires more and more spiders, maintenance
becomes a fundamental problem, especially when you have to deal with many
different parsing rules for each spider, having a lot of exceptions, but also
wanting to reuse the common processors.

Item Loaders are designed to ease the maintenance burden of parsing rules,
without losing flexibility and, at the same time, providing a convenient
mechanism for extending and overriding them. For this reason Item Loaders
support traditional Python class inheritance for dealing with differences of
specific spiders (or groups of spiders).

Suppose, for example, that some particular site encloses their product names in
three dashes (e.g. ``---Plasma TV---``) and you don't want to end up scraping
those dashes in the final product names.

Here's how you can remove those dashes by reusing and extending the default
Product Item Loader (``ProductLoader``)::

    from itemloaders.processors import MapCompose
    from myproject.ItemLoaders import ProductLoader

    def strip_dashes(x):
        return x.strip('-')

    class SiteSpecificLoader(ProductLoader):
        name_in = MapCompose(strip_dashes, ProductLoader.name_in)

Another case where extending Item Loaders can be very helpful is when you have
multiple source formats, for example XML and HTML. In the XML version you may
want to remove ``CDATA`` occurrences. Here's an example of how to do it::

    from itemloaders.processors import MapCompose
    from myproject.ItemLoaders import ProductLoader
    from myproject.utils.xml import remove_cdata

    class XmlProductLoader(ProductLoader):
        name_in = MapCompose(remove_cdata, ProductLoader.name_in)

And that's how you typically extend input processors.

As for output processors, it is more common to declare them in the field metadata,
as they usually depend only on the field and not on each specific site parsing
rule (as input processors do). See also:
:ref:`topics-loaders-processors-declaring`.

There are many other possible ways to extend, inherit and override your Item
Loaders, and different Item Loaders hierarchies may fit better for different
projects. Scrapy only provides the mechanism; it doesn't impose any specific
organization of your Loaders collection - that's up to you and your project's
needs.

.. _itemloaders: https://itemloaders.readthedocs.io/en/latest/
.. _processors: https://itemloaders.readthedocs.io/en/latest/built-in-processors.html


text:
package com.bazaarvoice.emodb.queue.core;

import com.bazaarvoice.emodb.event.api.ChannelConfiguration;

import java.time.Duration;

public class QueueChannelConfiguration implements ChannelConfiguration {
    // Amazon SQS keeps messages for 14 days.  Seems like a reasonable choice...
    private static final Duration TTL = Duration.ofDays(14);

    @Override
    public Duration getEventTtl(String queue) {
        return TTL;
    }
}


text:
using System;
using System.ComponentModel;

namespace Azure.ResourceManager.Sql.Models
{
    /// <summary> The state of the elastic pool. </summary>
    public readonly partial struct ElasticPoolState : IEquatable<ElasticPoolState>
    {
        private readonly string _value;

        /// <summary> Initializes a new instance of <see cref="ElasticPoolState"/>. </summary>
        /// <exception cref="ArgumentNullException"> <paramref name="value"/> is null. </exception>
        public ElasticPoolState(string value)
        {
            _value = value ?? throw new ArgumentNullException(nameof(value));
        }

        private const string CreatingValue = "Creating";
        private const string ReadyValue = "Ready";
        private const string DisabledValue = "Disabled";

        /// <summary> Creating. </summary>
        public static ElasticPoolState Creating { get; } = new ElasticPoolState(CreatingValue);
        /// <summary> Ready. </summary>
        public static ElasticPoolState Ready { get; } = new ElasticPoolState(ReadyValue);
        /// <summary> Disabled. </summary>
        public static ElasticPoolState Disabled { get; } = new ElasticPoolState(DisabledValue);
        /// <summary> Determines if two <see cref="ElasticPoolState"/> values are the same. </summary>
        public static bool operator ==(ElasticPoolState left, ElasticPoolState right) => left.Equals(right);
        /// <summary> Determines if two <see cref="ElasticPoolState"/> values are not the same. </summary>
        public static bool operator !=(ElasticPoolState left, ElasticPoolState right) => !left.Equals(right);
        /// <summary> Converts a string to a <see cref="ElasticPoolState"/>. </summary>
        public static implicit operator ElasticPoolState(string value) => new ElasticPoolState(value);

        /// <inheritdoc />
        [EditorBrowsable(EditorBrowsableState.Never)]
        public override bool Equals(object obj) => obj is ElasticPoolState other && Equals(other);
        /// <inheritdoc />
        public bool Equals(ElasticPoolState other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase);

        /// <inheritdoc />
        [EditorBrowsable(EditorBrowsableState.Never)]
        public override int GetHashCode() => _value?.GetHashCode() ?? 0;
        /// <inheritdoc />
        public override string ToString() => _value;
    }
}


text:
module Git
  module Command
    # TODO replace hard-coded details with data retrieved from the gemspec
    COPYRIGHT = "git-command v#{Git::Command::VERSION} Copyright (c) 2012 Peter Vandenberk"
  end
end


text:
(function($) {
    $(document).ready(function() {

        var $headerSvg = $('#header-svg');
        var $headerSvgMobile = $('#header-svg-mobile');

        // console.log($headerSvg);
        // if($headerSvg[0].clientHeight) {
        //     var parallaxHeader = new Parallax($headerSvg[0]);
        // } else {
        //     var parallaxHeader = new Parallax($headerSvgMobile[0]);
        // }

        var $mobileMenuToggle = $('#mobile-menu-toggle');
        var $mobileMenu = $('#nav-main');
        var $headerLink = $('.hdr-logo-link');

        $mobileMenuToggle.on('click', function() {
            $(this).toggleClass('active');
            $mobileMenu.toggleClass('active');
            $headerLink.toggleClass('flip');
        });

        var $vectorPortraitProductSteps = $('.post-323 .wccpf_fields_table');
        var $vectorPortraitAddToCart = $('.post-323 [type=submit]');

        // console.log($vectorPortraitAddToCart);

        $vectorPortraitAddToCart.prop('disabled', true);

        // Give first step active class
        $vectorPortraitProductSteps.first().addClass('active');

        var $stepOne = $vectorPortraitProductSteps.first();
        var $stepOneInput = $stepOne.find('input');

        // Loop through each product step and setup event handlers with closure
        for(var i = 0; i < $vectorPortraitProductSteps.length; i++) {
            (function(i) {
                $($vectorPortraitProductSteps[i]).find('input, textarea').on('change', function() {
                    if($(this).val().length) {
                        progressProductSteps(i);
                        // If this is step 2, light up the submit button
                        if(i >= 0) {
                            $vectorPortraitAddToCart.addClass('active').prop('disabled', false);
                        }
                    }
                });
            })(i);
        }

        // $stepOneInput.on

        // $vectorPortraitProductSteps.last().on('change', function() {
        // });

        function progressProductSteps(i) {
            // Using the index of the current step, remove the active class,
            // and then add active to the next step
            $($vectorPortraitProductSteps[i]).removeClass('active').addClass('valid').next().addClass('active');
        }

        // SINGLE PRODUCT SLIDER
        var $productGallery = $('.single-product__gallery');

        $productGallery.slick({
            infinite: true,
            speed: 2000,
            autoplay: true,
            dots: false,
            arrows: false,
            autoplaySpeed: 0,
            slidesToShow: 8,
            cssEase: 'linear',
            slidesToScroll: 1,
            pauseOnFocus: false,
            pauseOnHover: false,
            responsive: [
                {
                breakpoint: 1024,
                settings: {
                    slidesToShow: 6,
                }
                },
                {
                breakpoint: 600,
                settings: {
                    slidesToShow: 4,
                }
                },
                {
                breakpoint: 480,
                settings: {
                    slidesToShow: 2,
                }
                }
                // You can unslick at a given breakpoint now by adding:
                // settings: "unslick"
                // instead of a settings object
            ]
        });

    });
})(jQuery);


text:
Provides LocalizationServlet, which serves localization messages.

## Example

```GET localhost:8080/localization/cs_CZ/cz.cvut.fel.nutforms.example.model.Bug/edit```

```
{
{
    "form.description.label": "Popis",
    "form.id.label": "ID",
    "form.localizedDescription.label": "P\u0159eklad popisu",
    "form.log.label": "Log",
    "form.submit.value": "Upravit"
}
}
```

```GET localhost:8080/localization/cs_CZ/cz.cvut.fel.nutforms.example.model.Bug/edit/form.description.label```

```
Popis
```


text:
{-# LANGUAGE Safe #-}

module Scheduler ( Scheduler(schedule)
                 , SchedulerIO
                 , getCurrentScheduler
                 , BackgroundScheduler
                 , newScheduler
                 ) where

import Control.Applicative
import Control.Concurrent.STM
import Scheduler.Internal

-- | Creates a new background scheduler.
newScheduler :: IO BackgroundScheduler
newScheduler = BackgroundScheduler <$> atomically newTQueue