text:
<?xml version="1.0" encoding="utf-8"?>
<!--
ATENÇÃO! Este é o XML dos endereços dos webservices da NFC-e (NF-e modelo 65)
layout "3.10", portanto é incompatível com a versão "2.00" do layout da NF-e,
prevista para ser desativada em 01/12/2014.

ATENÇÃO!!! Em Julho/2014, vários endereços destes webservices ainda não foram
totalmente revisados e/ou estão incompletos, testar com cuidado conforme cada
UF/ambiente.
-->
<WS xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
  <UF>
    <sigla>AM</sigla>
    <homologacao>
      <NfeAutorizacao method="nfeAutorizacaoLote" operation="NfeAutorizacao" version="3.10">https://homnfce.sefaz.am.gov.br/nfce-services/services/NfeAutorizacao</NfeAutorizacao>
      <NFeRetAutorizacao method="nfeRetAutorizacaoLote" operation="NFeRetAutorizacao" version="3.10">https://homnfe.sefaz.am.gov.br/services2/services/NfeRetAutorizacao</NFeRetAutorizacao>
      <NfeConsultaCadastro method="consultaCadastro2" operation="NfeConsultaCadastro" version="3.10">https://homnfce.sefaz.am.gov.br/nfce-services/services/cadconsultacadastro2</NfeConsultaCadastro>
      <NfeConsultaProtocolo method="nfeConsultaNF2" operation="NfeConsulta2" version="3.10">https://homnfce.sefaz.am.gov.br/nfce-services/services/NfeConsulta2</NfeConsultaProtocolo>
      <NfeConsultaQR method="QR-CODE" operation="NfeConsultaQR" version="1.00">http://homnfce.sefaz.am.gov.br/nfceweb/consultarNFCe.jsp</NfeConsultaQR>
      <NfeInutilizacao method="nfeInutilizacaoNF2" operation="NfeInutilizacao2" version="3.10">https://homnfce.sefaz.am.gov.br/nfce-services/services/NfeInutilizacao2</NfeInutilizacao>
      <NfeStatusServico method="nfeStatusServicoNF2" operation="NfeStatusServico2" version="3.10">https://homnfce.sefaz.am.gov.br/nfce-services/services/NfeStatusServico2</NfeStatusServico>
      <RecepcaoEvento method="nfeRecepcaoEvento" operation="RecepcaoEvento" version="1.00">https://homnfce.sefaz.am.gov.br/nfce-services/services/RecepcaoEvento</RecepcaoEvento>
    </homologacao>
    <producao>
      <NfeAutorizacao method="nfeAutorizacaoLote" operation="NfeAutorizacao" version="3.10">https://nfce.sefaz.am.gov.br/nfce-services/services/NfeAutorizacao</NfeAutorizacao>
      <NfeRetAutorizacao method="nfeRetAutorizacaoLote" operation="NfeRetAutorizacao" version="3.10">https://nfe.sefaz.am.gov.br/services2/services/NfeRetAutorizacao</NfeRetAutorizacao>
      <NfeConsultaCadastro method="consultaCadastro2" operation="NfeConsultaCadastro" version="2.00"></NfeConsultaCadastro>
      <NfeConsultaProtocolo method="nfeConsultaNF2" operation="NfeConsulta2" version="2.01">https://nfce.sefaz.am.gov.br/nfce-services/services/NfeConsulta2</NfeConsultaProtocolo>
      <NfeConsultaQR method="QR-CODE" operation="NfeConsultaQR" version="1.00">http://sistemas.sefaz.am.gov.br/nfceweb/consultarNFCe.jsp</NfeConsultaQR>
      <NfeInutilizacao method="nfeInutilizacaoNF2" operation="NfeInutilizacao2" version="3.10">https://nfce.sefaz.am.gov.br/nfce-services/services/NfeInutilizacao2</NfeInutilizacao>
      <NfeStatusServico method="nfeStatusServicoNF2" operation="NfeStatusServico" version="3.10">https://nfce.sefaz.am.gov.br/nfce-services/services/NfeStatusServico2</NfeStatusServico>
      <RecepcaoEvento method="nfeRecepcaoEvento" operation="RecepcaoEvento" version="1.00">https://nfce.sefaz.am.gov.br/nfce-services/services/RecepcaoEvento</RecepcaoEvento>
    </producao>
  </UF>
  <UF>
    <sigla>AN</sigla>
    <homologacao>
      <NfeConsultaDest method="nfeConsultaNFDest" operation="NfeConsultaDest" version="1.01">https://hom.nfe.fazenda.gov.br/NFeConsultaDest/NFeConsultaDest.asmx</NfeConsultaDest>
      <NFeDistribuicaoDFe method="nfeDistDFeInteresse" operation="NFeDistribuicaoDFe" version="1.00">https://hom.nfe.fazenda.gov.br/NFeDistribuicaoDFe/NFeDistribuicaoDFe.asmx</NFeDistribuicaoDFe>
      <NfeDownloadNF method="nfeDownloadNF" operation="NfeDownloadNF" version="3.10">https://hom.nfe.fazenda.gov.br/NfeDownloadNF/NfeDownloadNF.asmx</NfeDownloadNF>
      <RecepcaoEvento method="nfeRecepcaoEvento" operation="RecepcaoEvento" version="3.10">https://hom.nfe.fazenda.gov.br/RecepcaoEvento/RecepcaoEvento.asmx</RecepcaoEvento>
    </homologacao>
    <producao>
      <NfeConsultaDest method="nfeConsultaNFDest" operation="NfeConsultaDest" version="1.01">https://www.nfe.fazenda.gov.br/NFeConsultaDest/NFeConsultaDest.asmx</NfeConsultaDest>
      <!-- TODO fmertins 06/11/14: falta a publicação do WS "NFeDistribuicaoDFe" ambiente de produção -->
      <NfeDownloadNF method="nfeDownloadNF" operation="NfeDownloadNF" version="3.10">https://www.nfe.fazenda.gov.br/NfeDownloadNF/NfeDownloadNF.asmx</NfeDownloadNF>
      <RecepcaoEvento method="nfeRecepcaoEvento" operation="RecepcaoEvento" version="3.10">https://www.nfe.fazenda.gov.br/RecepcaoEvento/RecepcaoEvento.asmx</RecepcaoEvento>
    </producao>
  </UF>
  <UF>
    <sigla>BA</sigla>
    <homologacao>
      <NfeInutilizacao method="nfeInutilizacaoNF2" operation="NfeInutilizacao2" version="3.10"></NfeInutilizacao>
      <NfeConsultaProtocolo method="nfeConsultaNF2" operation="NfeConsulta" version="3.10"></NfeConsultaProtocolo>
      <NfeStatusServico method="nfeStatusServicoNF2" operation="NfeStatusServico2" version="3.10"></NfeStatusServico>
      <NfeConsultaCadastro method="consultaCadastro2" operation="NfeConsultaCadastro" version="3.10"></NfeConsultaCadastro>
      <RecepcaoEvento method="nfeRecepcaoEvento" operation="RecepcaoEvento" version="1.00"></RecepcaoEvento>
      <NfeConsultaQR method="QR-CODE" operation="NfeConsultaQR" version="3.10"></NfeConsultaQR>
      <NfeConsultaDest method="nfeConsultaNFDest" operation="NfeConsultaDest" version="3.10"></NfeConsultaDest>
      <NfeDownloadNF method="nfeDownloadNF" operation="NfeDownloadNF" version="3.10"></NfeDownloadNF>
    </homologacao>
    <producao>
      <NfeInutilizacao method="nfeInutilizacaoNF2" operation="" version="3.10"></NfeInutilizacao>
      <NfeConsultaProtocolo method="nfeConsultaNF2" operation="" version="3.10"></NfeConsultaProtocolo>
      <NfeStatusServico method="nfeStatusServicoNF2" operation="" version="3.10"></NfeStatusServico>
      <NfeConsultaCadastro method="consultaCadastro2" operation="" version="3.10"></NfeConsultaCadastro>
      <RecepcaoEvento method="nfeRecepcaoEvento" operation="" version="1.00"></RecepcaoEvento>
      <NfeConsultaQR method="QR-CODE" operation="" version="3.10"></NfeConsultaQR>
      <NfeConsultaDest method="nfeConsultaNFDest" operation="" version="3.10"></NfeConsultaDest>
      <NfeDownloadNF method="nfeDownloadNF" operation="" version="3.10"></NfeDownloadNF>
    </producao>
  </UF>
  <UF>
    <sigla>CE</sigla>
    <homologacao>
      <NfeInutilizacao method="nfeInutilizacaoNF2" operation="" version="3.10"></NfeInutilizacao>
      <NfeConsultaProtocolo method="nfeConsultaNF2" operation="" version="3.10"></NfeConsultaProtocolo>
      <NfeStatusServico method="nfeStatusServicoNF2" operation="" version="3.10"></NfeStatusServico>
      <NfeConsultaCadastro method="consultaCadastro2" operation="" version="3.10"></NfeConsultaCadastro>
      <RecepcaoEvento method="nfeRecepcaoEvento" operation="" version="3.10"></RecepcaoEvento>
      <NfeConsultaQR method="QR-CODE" operation="" version="3.10"></NfeConsultaQR>
      <NfeConsultaDest method="nfeConsultaNFDest" operation="" version="3.10"></NfeConsultaDest>
      <NfeDownloadNF method="nfeDownloadNF" operation="" version="3.10"></NfeDownloadNF>
    </homologacao>
    <producao>
      <NfeInutilizacao method="nfeInutilizacaoNF2" operation="" version="3.10"></NfeInutilizacao>
      <NfeConsultaProtocolo method="nfeConsultaNF2" operation="" version="3.10"></NfeConsultaProtocolo>
      <NfeStatusServico method="nfeStatusServicoNF2" operation="" version="3.10"></NfeStatusServico>
      <NfeConsultaCadastro method="consultaCadastro2" operation="" version="3.10"></NfeConsultaCadastro>
      <RecepcaoEvento method="nfeRecepcaoEvento" operation="" version="3.10"></RecepcaoEvento>
      <NfeConsultaQR method="QR-CODE" operation="" version="3.10"></NfeConsultaQR>
      <NfeConsultaDest method="nfeConsultaNFDest" operation="" version="3.10"></NfeConsultaDest>
      <NfeDownloadNF method="nfeDownloadNF" operation="" version="3.10"></NfeDownloadNF>
    </producao>
  </UF>
  <UF>
    <sigla>GO</sigla>
    <homologacao>
      <NfeInutilizacao method="nfeInutilizacaoNF2" operation="" version="3.10"></NfeInutilizacao>
      <NfeConsultaProtocolo method="nfeConsultaNF2" operation="" version="3.10"></NfeConsultaProtocolo>
      <NfeStatusServico method="nfeStatusServicoNF2" operation="" version="3.10"></NfeStatusServico>
      <NfeConsultaCadastro method="consultaCadastro2" operation="" version="3.10"></NfeConsultaCadastro>
      <RecepcaoEvento method="nfeRecepcaoEvento" operation="" version="3.10"></RecepcaoEvento>
      <NfeConsultaQR method="QR-CODE" operation="" version="3.10"></NfeConsultaQR>
      <NfeConsultaDest method="nfeConsultaNFDest" operation="" version="3.10"></NfeConsultaDest>
      <NfeDownloadNF method="nfeDownloadNF" operation="" version="3.10"></NfeDownloadNF>
    </homologacao>
    <producao>
      <NfeInutilizacao method="nfeInutilizacaoNF2" operation="" version="3.10"></NfeInutilizacao>
      <NfeConsultaProtocolo method="nfeConsultaNF2" operation="" version="3.10"></NfeConsultaProtocolo>
      <NfeStatusServico method="nfeStatusServicoNF2" operation="" version="3.10"></NfeStatusServico>
      <NfeConsultaCadastro method="consultaCadastro2" operation="" version="3.10"></NfeConsultaCadastro>
      <RecepcaoEvento method="nfeRecepcaoEvento" operation="" version="3.10"></RecepcaoEvento>
      <NfeConsultaQR method="QR-CODE" operation="" version="3.10"></NfeConsultaQR>
      <NfeConsultaDest method="nfeConsultaNFDest" operation="" version="3.10"></NfeConsultaDest>
      <NfeDownloadNF method="nfeDownloadNF" operation="" version="3.10"></NfeDownloadNF>
    </producao>
  </UF>
  <UF>
    <sigla>MA</sigla>
    <homologacao>
      <NfeConsultaQR method="QR-CODE" operation="" version="3.10">http://www.hom.nfce.sefaz.ma.gov.br/portal/consultarNFCe.jsp</NfeConsultaQR>
    </homologacao>
    <producao>
      <NfeConsultaQR method="QR-CODE" operation="" version="3.10">http://www.nfce.sefaz.ma.gov.br/portal/consultarNFCe.jsp</NfeConsultaQR>
    </producao>
  </UF>
  <UF>
    <sigla>MG</sigla>
    <homologacao>
      <NfeConsultaCadastro method="consultaCadastro2" operation="" version="3.10"></NfeConsultaCadastro>
      <NfeConsultaDest method="nfeConsultaNFDest" operation="" version="3.10"></NfeConsultaDest>
      <NfeConsultaProtocolo method="nfeConsultaNF2" operation="" version="3.10"></NfeConsultaProtocolo>
      <NfeConsultaQR method="QR-CODE" operation="" version="3.10"></NfeConsultaQR>
      <NfeDownloadNF method="nfeDownloadNF" operation="" version="3.10"></NfeDownloadNF>
      <NfeInutilizacao method="nfeInutilizacaoNF2" operation="" version="3.10"></NfeInutilizacao>
      <NfeStatusServico method="nfeStatusServicoNF2" operation="" version="3.10"></NfeStatusServico>
      <RecepcaoEvento method="nfeRecepcaoEvento" operation="" version="3.10"></RecepcaoEvento>
    </homologacao>
    <producao>
      <NfeConsultaCadastro method="consultaCadastro2" operation="" version="3.10"></NfeConsultaCadastro>
      <NfeConsultaDest method="nfeConsultaNFDest" operation="" version="3.10"></NfeConsultaDest>
      <NfeConsultaProtocolo method="nfeConsultaNF2" operation="" version="3.10"></NfeConsultaProtocolo>
      <NfeConsultaQR method="QR-CODE" operation="" version="3.10"></NfeConsultaQR>
      <NfeDownloadNF method="nfeDownloadNF" operation="" version="3.10"></NfeDownloadNF>
      <NfeInutilizacao method="nfeInutilizacaoNF2" operation="" version="3.10"></NfeInutilizacao>
      <NfeStatusServico method="nfeStatusServicoNF2" operation="" version="3.10"></NfeStatusServico>
      <RecepcaoEvento method="nfeRecepcaoEvento" operation="" version="3.10"></RecepcaoEvento>
    </producao>
  </UF>
  <UF>
    <sigla>MS</sigla>
    <homologacao>
      <NfeInutilizacao method="nfeInutilizacaoNF2" operation="" version="3.10"></NfeInutilizacao>
      <NfeConsultaProtocolo method="nfeConsultaNF2" operation="" version="3.10"></NfeConsultaProtocolo>
      <NfeStatusServico method="nfeStatusServicoNF2" operation="" version="3.10"></NfeStatusServico>
      <NfeConsultaCadastro method="consultaCadastro2" operation="" version="3.10"></NfeConsultaCadastro>
      <RecepcaoEvento method="nfeRecepcaoEvento" operation="" version="3.10"></RecepcaoEvento>
      <NfeConsultaQR method="QR-CODE" operation="" version="3.10"></NfeConsultaQR>
      <NfeConsultaDest method="nfeConsultaNFDest" operation="" version="3.10"></NfeConsultaDest>
      <NfeDownloadNF method="nfeDownloadNF" operation="" version="3.10"></NfeDownloadNF>
    </homologacao>
    <producao>
      <NfeInutilizacao method="nfeInutilizacaoNF2" operation="" version="3.10"></NfeInutilizacao>
      <NfeConsultaProtocolo method="nfeConsultaNF2" operation="" version="3.10"></NfeConsultaProtocolo>
      <NfeStatusServico method="nfeStatusServicoNF2" operation="" version="3.10"></NfeStatusServico>
      <NfeConsultaCadastro method="consultaCadastro2" operation="" version="3.10"></NfeConsultaCadastro>
      <RecepcaoEvento method="nfeRecepcaoEvento" operation="" version="3.10"></RecepcaoEvento>
      <NfeConsultaQR method="QR-CODE" operation="" version="3.10"></NfeConsultaQR>
      <NfeConsultaDest method="nfeConsultaNFDest" operation="" version="3.10"></NfeConsultaDest>
      <NfeDownloadNF method="nfeDownloadNF" operation="" version="3.10"></NfeDownloadNF>
    </producao>
  </UF>
  <UF>
    <sigla>MT</sigla>
    <homologacao>
      <NfeInutilizacao method="nfeInutilizacaoNF2" operation="" version="3.10">https://homologacao.sefaz.mt.gov.br/nfcews/services/NfeInutilizacao2</NfeInutilizacao>
      <NfeConsultaProtocolo method="nfeConsultaNF2" operation="" version="3.10">https://homologacao.sefaz.mt.gov.br/nfcews/services/NfeConsulta2</NfeConsultaProtocolo>
      <NfeStatusServico method="nfeStatusServicoNF2" operation="" version="3.10">https://homologacao.sefaz.mt.gov.br/nfcews/services/NfeStatusServico2</NfeStatusServico>
      <NfeConsultaCadastro method="consultaCadastro2" operation="" version="3.10"></NfeConsultaCadastro>
      <RecepcaoEvento method="nfeRecepcaoEvento" operation="" version="1.00">https://homologacao.sefaz.mt.gov.br/nfcews/services/RecepcaoEvento</RecepcaoEvento>
      <NfeConsultaQR method="QR-CODE" operation="" version="100">http://www.hom.nfe.sefaz.mt.gov.br/portal/consultarNFCe.jsp</NfeConsultaQR>
      <NfeConsultaDest method="nfeConsultaNFDest" operation="" version="3.10"></NfeConsultaDest>
      <NfeDownloadNF method="nfeDownloadNF" operation="" version="3.10"></NfeDownloadNF>
    </homologacao>
    <producao>
      <NfeInutilizacao method="nfeInutilizacaoNF2" operation="" version="3.10">https://nfce.sefaz.mt.gov.br/nfcews/services/NfeInutilizacao2</NfeInutilizacao>
      <NfeConsultaProtocolo method="nfeConsultaNF2" operation="" version="3.10">https://nfce.sefaz.mt.gov.br/nfcews/services/NfeConsulta2</NfeConsultaProtocolo>
      <NfeStatusServico method="nfeStatusServicoNF2" operation="" version="3.10">https://nfce.sefaz.mt.gov.br/nfcews/services/NfeStatusServico2</NfeStatusServico>
      <NfeConsultaCadastro method="consultaCadastro2" operation="" version="3.10"></NfeConsultaCadastro>
      <RecepcaoEvento method="nfeRecepcaoEvento" operation="" version="1.00">https://nfce.sefaz.mt.gov.br/nfcews/services/RecepcaoEvento</RecepcaoEvento>
      <NfeConsultaQR method="QR-CODE" operation="" version="100">http://www.sefaz.mt.gov.br/nfe/portal/consultanfce</NfeConsultaQR>
      <NfeConsultaDest method="nfeConsultaNFDest" operation="" version="3.10"></NfeConsultaDest>
      <NfeDownloadNF method="nfeDownloadNF" operation="" version="3.10"></NfeDownloadNF>
    </producao>
  </UF>
  <UF>
    <sigla>PE</sigla>
    <homologacao>
      <NfeInutilizacao method="nfeInutilizacaoNF2" operation="" version="3.10"></NfeInutilizacao>
      <NfeConsultaProtocolo method="nfeConsultaNF2" operation="" version="3.10"></NfeConsultaProtocolo>
      <NfeStatusServico method="nfeStatusServicoNF2" operation="" version="3.10"></NfeStatusServico>
      <NfeConsultaCadastro method="consultaCadastro2" operation="" version="3.10"></NfeConsultaCadastro>
      <RecepcaoEvento method="nfeRecepcaoEvento" operation="" version="3.10"></RecepcaoEvento>
      <NfeConsultaQR method="QR-CODE" operation="" version="3.10"></NfeConsultaQR>
      <NfeConsultaDest method="nfeConsultaNFDest" operation="" version="3.10"></NfeConsultaDest>
      <NfeDownloadNF method="nfeDownloadNF" operation="" version="3.10"></NfeDownloadNF>
    </homologacao>
    <producao>
      <NfeInutilizacao method="nfeInutilizacaoNF2" operation="" version="3.10"></NfeInutilizacao>
      <NfeConsultaProtocolo method="nfeConsultaNF2" operation="" version="3.10"></NfeConsultaProtocolo>
      <NfeStatusServico method="nfeStatusServicoNF2" operation="" version="3.10"></NfeStatusServico>
      <NfeConsultaCadastro method="consultaCadastro2" operation="" version="3.10"></NfeConsultaCadastro>
      <RecepcaoEvento method="nfeRecepcaoEvento" operation="" version="3.10"></RecepcaoEvento>
      <NfeConsultaQR method="QR-CODE" operation="" version="3.10"></NfeConsultaQR>
      <NfeConsultaDest method="nfeConsultaNFDest" operation="" version="3.10"></NfeConsultaDest>
      <NfeDownloadNF method="nfeDownloadNF" operation="" version="3.10"></NfeDownloadNF>
    </producao>
  </UF>
  <UF>
    <sigla>PR</sigla>
    <homologacao>
      <NfeInutilizacao method="nfeInutilizacaoNF2" operation="" version="3.10"></NfeInutilizacao>
      <NfeConsultaProtocolo method="nfeConsultaNF2" operation="" version="3.10"></NfeConsultaProtocolo>
      <NfeStatusServico method="nfeStatusServicoNF2" operation="" version="3.10"></NfeStatusServico>
      <NfeConsultaCadastro method="consultaCadastro2" operation="" version="3.10"></NfeConsultaCadastro>
      <RecepcaoEvento method="nfeRecepcaoEvento" operation="" version="3.10"></RecepcaoEvento>
      <NfeConsultaQR method="QR-CODE" operation="" version="3.10"></NfeConsultaQR>
      <NfeConsultaDest method="nfeConsultaNFDest" operation="" version="3.10"></NfeConsultaDest>
      <NfeDownloadNF method="nfeDownloadNF" operation="" version="3.10"></NfeDownloadNF>
    </homologacao>
    <producao>
      <NfeInutilizacao method="nfeInutilizacaoNF2" operation="" version="3.10"></NfeInutilizacao>
      <NfeConsultaProtocolo method="nfeConsultaNF2" operation="" version="3.10"></NfeConsultaProtocolo>
      <NfeStatusServico method="nfeStatusServicoNF2" operation="" version="3.10"></NfeStatusServico>
      <NfeConsultaCadastro method="consultaCadastro2" operation="" version="3.10"></NfeConsultaCadastro>
      <RecepcaoEvento method="nfeRecepcaoEvento" operation="" version="3.10"></RecepcaoEvento>
      <NfeConsultaQR method="QR-CODE" operation="" version="3.10"></NfeConsultaQR>
      <NfeConsultaDest method="nfeConsultaNFDest" operation="" version="3.10"></NfeConsultaDest>
      <NfeDownloadNF method="nfeDownloadNF" operation="" version="3.10"></NfeDownloadNF>
    </producao>
  </UF>
  <UF>
    <sigla>RN</sigla>
    <homologacao>
      <NfeConsultaQR method="QR-CODE" operation="" version="3.10">http://www.hom.nfe.rn.gov.br/portal/consultarNFCe.jsp</NfeConsultaQR>
    </homologacao>
    <producao>
      <NfeConsultaQR method="QR-CODE" operation="" version="3.10">http://www.nfe.rn.gov.br/portal/consultarNFCe.jsp</NfeConsultaQR>
    </producao>
  </UF>
  <UF>
    <sigla>RS</sigla>
    <homologacao>
      <NfeAutorizacao method="nfeAutorizacaoLote" operation="" version="3.10">https://homologacao.nfe.sefaz.rs.gov.br/ws/NfeAutorizacao/NFeAutorizacao.asmx</NfeAutorizacao>
      <NfeConsultaCadastro method="consultaCadastro2" operation="" version="3.10"></NfeConsultaCadastro>
      <NfeConsultaDest method="nfeConsultaNFDest" operation="" version="3.10">https://homologacao.nfe.sefaz.rs.gov.br/ws/nfeConsultaDest/nfeConsultaDest.asmx</NfeConsultaDest>
      <NfeConsultaProtocolo method="nfeConsultaNF2" operation="" version="3.10">https://homologacao.nfe.sefaz.rs.gov.br/ws/NfeConsulta/NfeConsulta2.asmx</NfeConsultaProtocolo>
      <NfeConsultaQR method="QR-CODE" operation="" version="3.10">https://www.sefaz.rs.gov.br/NFCE/NFCE-COM.aspx</NfeConsultaQR>
      <NfeDownloadNF method="nfeDownloadNF" operation="" version="3.10">https://homologacao.nfe.sefaz.rs.gov.br/ws/nfeDownloadNF/nfeDownloadNF.asmx</NfeDownloadNF>
      <NfeInutilizacao method="nfeInutilizacaoNF2" operation="" version="3.10">https://homologacao.nfe.sefaz.rs.gov.br/ws/nfeinutilizacao/nfeinutilizacao2.asmx</NfeInutilizacao>
      <NfeRetAutorizacao method="nfeRetAutorizacaoLote" operation="" version="3.10">https://homologacao.nfe.sefaz.rs.gov.br/ws/NfeRetAutorizacao/NFeRetAutorizacao.asmx</NfeRetAutorizacao>
      <NfeStatusServico method="nfeStatusServicoNF2" operation="" version="3.10">https://homologacao.nfe.sefaz.rs.gov.br/ws/NfeStatusServico/NfeStatusServico2.asmx</NfeStatusServico>
      <RecepcaoEvento method="nfeRecepcaoEvento" operation="" version="1.00">https://homologacao.nfe.sefaz.rs.gov.br/ws/recepcaoevento/recepcaoevento.asmx</RecepcaoEvento>
    </homologacao>
    <producao>
      <NfeConsultaCadastro method="consultaCadastro2" operation="" version="3.10">https://sef.sefaz.rs.gov.br/ws/cadconsultacadastro/cadconsultacadastro2.asmx</NfeConsultaCadastro>
      <NfeConsultaDest method="nfeConsultaNFDest" operation="" version="3.10">https://nfe.sefaz.rs.gov.br/ws/nfeConsultaDest/nfeConsultaDest.asmx</NfeConsultaDest>
      <NfeConsultaProtocolo method="nfeConsultaNF2" operation="" version="3.10">https://nfe.sefaz.rs.gov.br/ws/NfeConsulta/NfeConsulta2.asmx</NfeConsultaProtocolo>
      <NfeConsultaQR method="QR-CODE" operation="" version="3.10">https://www.sefaz.rs.gov.br/NFCE/NFCE-COM.aspx</NfeConsultaQR>
      <NfeDownloadNF method="nfeDownloadNF" operation="" version="3.10">https://nfe.sefaz.rs.gov.br/ws/nfeDownloadNF/nfeDownloadNF.asmx</NfeDownloadNF>
      <NfeInutilizacao method="nfeInutilizacaoNF2" operation="" version="3.10">https://nfe.sefaz.rs.gov.br/ws/nfeinutilizacao/nfeinutilizacao2.asmx</NfeInutilizacao>
      <NfeStatusServico method="nfeStatusServicoNF2" operation="" version="3.10">https://nfe.sefaz.rs.gov.br/ws/NfeStatusServico/NfeStatusServico2.asmx</NfeStatusServico>
      <RecepcaoEvento method="nfeRecepcaoEvento" operation="" version="1.00">https://nfe.sefaz.rs.gov.br/ws/recepcaoevento/recepcaoevento.asmx</RecepcaoEvento>
    </producao>
  </UF>
  <UF>
    <sigla>SE</sigla>
    <homologacao>
      <NfeConsultaQR method="QR-CODE" operation="" version="3.10">http://www.hom.nfe.se.gov.br/portal/consultarNFCe.jsp</NfeConsultaQR>
    </homologacao>
    <producao>
      <NfeConsultaQR method="QR-CODE" operation="" version="3.10">http://www.nfe.se.gov.br/portal/consultarNFCe.jsp</NfeConsultaQR>
    </producao>
  </UF>
  <UF>
    <sigla>SP</sigla>
    <homologacao>
      <NfeAutorizacao method="nfeAutorizacaoLote" operation="NfeAutorizacao" version="3.10"></NfeAutorizacao>
      <NfeConsultaCadastro method="consultaCadastro2" operation="NfeConsultaCadastro" version="3.10"></NfeConsultaCadastro>
      <NfeConsultaDest method="nfeConsultaNFDest" operation="NfeConsultaDest" version="3.10"></NfeConsultaDest>
      <NfeConsultaProtocolo method="nfeConsultaNF2" operation="NfeConsulta2" version="3.10"></NfeConsultaProtocolo>
      <NfeConsultaQR method="QR-CODE" operation="NfeConsultaQR" version="3.10"></NfeConsultaQR>
      <NfeDownloadNF method="nfeDownloadNF" operation="NfeDownloadNF" version="3.10"></NfeDownloadNF>
      <NfeInutilizacao method="nfeInutilizacaoNF2" operation="NfeInutilizacao2" version="3.10"></NfeInutilizacao>
      <NfeRetAutorizacao method="nfeRetAutorizacaoLote" operation="NfeRetAutorizacao" version="3.10"></NfeRetAutorizacao>
      <NfeStatusServico method="nfeStatusServicoNF2" operation="NfeStatusServico2" version="3.10"></NfeStatusServico>
      <RecepcaoEvento method="nfeRecepcaoEvento" operation="RecepcaoEvento" version="1.00"></RecepcaoEvento>
    </homologacao>
    <producao>
      <NfeAutorizacao method="nfeAutorizacaoLote" operation="NfeAutorizacao" version="3.10"></NfeAutorizacao>
      <NfeConsultaCadastro method="consultaCadastro2" operation="NfeConsultaCadastro" version="3.10"></NfeConsultaCadastro>
      <NfeConsultaDest method="nfeConsultaNFDest" operation="NfeConsultaDest" version="3.10"></NfeConsultaDest>
      <NfeConsultaProtocolo method="nfeConsultaNF2" operation="NfeConsulta2" version="3.10"></NfeConsultaProtocolo>
      <NfeConsultaQR method="QR-CODE" operation="NfeConsultaQR" version="3.10"></NfeConsultaQR>
      <NfeDownloadNF method="nfeDownloadNF" operation="NfeDownloadNF" version="3.10"></NfeDownloadNF>
      <NfeInutilizacao method="nfeInutilizacaoNF2" operation="NfeInutilizacao2" version="3.10"></NfeInutilizacao>
      <NfeRetAutorizacao method="nfeRetAutorizacaoLote" operation="NfeRetAutorizacao" version="3.10"></NfeRetAutorizacao>
      <NfeStatusServico method="nfeStatusServicoNF2" operation="NfeStatusServico2" version="3.10"></NfeStatusServico>
      <RecepcaoEvento method="nfeRecepcaoEvento" operation="RecepcaoEvento" version="1.00"></RecepcaoEvento>
    </producao>
  </UF>
  <UF>
    <sigla>SVAN</sigla>
    <homologacao>
      <NfeAutorizacao method="nfeAutorizacaoLote" operation="NfeAutorizacao" version="3.10"></NfeAutorizacao>
      <NfeConsultaCadastro method="consultaCadastro2" operation="NfeConsultaCadastro" version="3.10"></NfeConsultaCadastro>
      <NfeConsultaDest method="nfeConsultaNFDest" operation="NfeConsultaDest" version="3.10"></NfeConsultaDest>
      <NfeConsultaProtocolo method="nfeConsultaNF2" operation="NfeConsulta2" version="3.10"></NfeConsultaProtocolo>
      <NfeConsultaQR method="QR-CODE" operation="NfeConsultaQR" version="3.10"></NfeConsultaQR>
      <NfeDownloadNF method="nfeDownloadNF" operation="NfeDownloadNF" version="3.10"></NfeDownloadNF>
      <NfeInutilizacao method="nfeInutilizacaoNF2" operation="NfeInutilizacao2" version="3.10"></NfeInutilizacao>
      <NfeRetAutorizacao method="nfeRetAutorizacaoLote" operation="NfeRetAutorizacao" version="3.10"></NfeRetAutorizacao>
      <NfeStatusServico method="nfeStatusServicoNF2" operation="NfeStatusServico2" version="3.10"></NfeStatusServico>
      <RecepcaoEvento method="nfeRecepcaoEvento" operation="RecepcaoEvento" version="1.00"></RecepcaoEvento>
    </homologacao>
    <producao>
      <NfeAutorizacao method="nfeAutorizacaoLote" operation="NfeAutorizacao" version="3.10"></NfeAutorizacao>
      <NfeConsultaCadastro method="consultaCadastro2" operation="NfeConsultaCadastro" version="3.10"></NfeConsultaCadastro>
      <NfeConsultaDest method="nfeConsultaNFDest" operation="NfeConsultaDest" version="3.10"></NfeConsultaDest>
      <NfeConsultaProtocolo method="nfeConsultaNF2" operation="NfeConsulta2" version="3.10"></NfeConsultaProtocolo>
      <NfeConsultaQR method="QR-CODE" operation="NfeConsultaQR" version="3.10"></NfeConsultaQR>
      <NfeDownloadNF method="nfeDownloadNF" operation="NfeDownloadNF" version="3.10"></NfeDownloadNF>
      <NfeInutilizacao method="nfeInutilizacaoNF2" operation="NfeInutilizacao2" version="3.10"></NfeInutilizacao>
      <NfeRetAutorizacao method="nfeRetAutorizacaoLote" operation="NfeRetAutorizacao" version="3.10"></NfeRetAutorizacao>
      <NfeStatusServico method="nfeStatusServicoNF2" operation="NfeStatusServico2" version="3.10"></NfeStatusServico>
      <RecepcaoEvento method="nfeRecepcaoEvento" operation="RecepcaoEvento" version="1.00"></RecepcaoEvento>
    </producao>
  </UF>
  <UF>
    <sigla>SVRS</sigla>
    <homologacao>
      <NfeAutorizacao method="nfeAutorizacaoLote" operation="NfeAutorizacao" version="3.10"></NfeAutorizacao>
      <NfeConsultaCadastro method="consultaCadastro2" operation="NfeConsultaCadastro" version="3.10"></NfeConsultaCadastro>
      <NfeConsultaDest method="nfeConsultaNFDest" operation="NfeConsultaDest" version="3.10"></NfeConsultaDest>
      <NfeConsultaProtocolo method="nfeConsultaNF2" operation="NfeConsulta2" version="3.10"></NfeConsultaProtocolo>
      <NfeConsultaQR method="QR-CODE" operation="NfeConsultaQR" version="3.10"></NfeConsultaQR>
      <NfeDownloadNF method="nfeDownloadNF" operation="NfeDownloadNF" version="3.10"></NfeDownloadNF>
      <NfeInutilizacao method="nfeInutilizacaoNF2" operation="NfeInutilizacao2" version="3.10"></NfeInutilizacao>
      <NfeRetAutorizacao method="nfeRetAutorizacaoLote" operation="NfeRetAutorizacao" version="3.10"></NfeRetAutorizacao>
      <NfeStatusServico method="nfeStatusServicoNF2" operation="NfeStatusServico2" version="3.10"></NfeStatusServico>
      <RecepcaoEvento method="nfeRecepcaoEvento" operation="RecepcaoEvento" version="1.00"></RecepcaoEvento>
    </homologacao>
    <producao>
      <NfeAutorizacao method="nfeAutorizacaoLote" operation="NfeAutorizacao" version="3.10"></NfeAutorizacao>
      <NfeConsultaCadastro method="consultaCadastro2" operation="NfeConsultaCadastro" version="3.10"></NfeConsultaCadastro>
      <NfeConsultaDest method="nfeConsultaNFDest" operation="NfeConsultaDest" version="3.10"></NfeConsultaDest>
      <NfeConsultaProtocolo method="nfeConsultaNF2" operation="NfeConsulta2" version="3.10"></NfeConsultaProtocolo>
      <NfeConsultaQR method="QR-CODE" operation="NfeConsultaQR" version="3.10"></NfeConsultaQR>
      <NfeDownloadNF method="nfeDownloadNF" operation="NfeDownloadNF" version="3.10"></NfeDownloadNF>
      <NfeInutilizacao method="nfeInutilizacaoNF2" operation="NfeInutilizacao2" version="3.10"></NfeInutilizacao>
      <NfeRetAutorizacao method="nfeRetAutorizacaoLote" operation="NfeRetAutorizacao" version="3.10"></NfeRetAutorizacao>
      <NfeStatusServico method="nfeStatusServicoNF2" operation="NfeStatusServico2" version="3.10"></NfeStatusServico>
      <RecepcaoEvento method="nfeRecepcaoEvento" operation="RecepcaoEvento" version="1.00"></RecepcaoEvento>
    </producao>
  </UF>
  <UF>
    <sigla>SVCAN</sigla>
    <homologacao>
      <NfeAutorizacao method="nfeAutorizacaoLote" operation="NfeAutorizacao" version="3.10"></NfeAutorizacao>
      <NfeConsultaCadastro method="consultaCadastro2" operation="NfeConsultaCadastro" version="3.10"></NfeConsultaCadastro>
      <NfeConsultaDest method="nfeConsultaNFDest" operation="NfeConsultaDest" version="3.10"></NfeConsultaDest>
      <NfeConsultaProtocolo method="nfeConsultaNF2" operation="NfeConsulta2" version="3.10"></NfeConsultaProtocolo>
      <NfeConsultaQR method="QR-CODE" operation="NfeConsultaQR" version="3.10"></NfeConsultaQR>
      <NfeDownloadNF method="nfeDownloadNF" operation="NfeDownloadNF" version="3.10"></NfeDownloadNF>
      <NfeInutilizacao method="nfeInutilizacaoNF2" operation="NfeInutilizacao2" version="3.10"></NfeInutilizacao>
      <NfeRetAutorizacao method="nfeRetAutorizacaoLote" operation="NfeRetAutorizacao" version="3.10"></NfeRetAutorizacao>
      <NfeStatusServico method="nfeStatusServicoNF2" operation="NfeStatusServico2" version="3.10"></NfeStatusServico>
      <RecepcaoEvento method="nfeRecepcaoEvento" operation="RecepcaoEvento" version="1.00"></RecepcaoEvento>
    </homologacao>
    <producao>
      <NfeAutorizacao method="nfeAutorizacaoLote" operation="NfeAutorizacao" version="3.10"></NfeAutorizacao>
      <NfeConsultaCadastro method="consultaCadastro2" operation="NfeConsultaCadastro" version="3.10"></NfeConsultaCadastro>
      <NfeConsultaDest method="nfeConsultaNFDest" operation="NfeConsultaDest" version="3.10"></NfeConsultaDest>
      <NfeConsultaProtocolo method="nfeConsultaNF2" operation="NfeConsulta2" version="3.10"></NfeConsultaProtocolo>
      <NfeConsultaQR method="QR-CODE" operation="NfeConsultaQR" version="3.10"></NfeConsultaQR>
      <NfeDownloadNF method="nfeDownloadNF" operation="NfeDownloadNF" version="3.10"></NfeDownloadNF>
      <NfeInutilizacao method="nfeInutilizacaoNF2" operation="NfeInutilizacao2" version="3.10"></NfeInutilizacao>
      <NfeRetAutorizacao method="nfeRetAutorizacaoLote" operation="NfeRetAutorizacao" version="3.10"></NfeRetAutorizacao>
      <NfeStatusServico method="nfeStatusServicoNF2" operation="NfeStatusServico2" version="3.10"></NfeStatusServico>
      <RecepcaoEvento method="nfeRecepcaoEvento" operation="RecepcaoEvento" version="1.00"></RecepcaoEvento>
    </producao>
  </UF>
  <UF>
    <sigla>SVCRS</sigla>
    <homologacao>
      <NfeAutorizacao method="nfeAutorizacaoLote" operation="NfeAutorizacao" version="3.10"></NfeAutorizacao>
      <NfeConsultaCadastro method="consultaCadastro2" operation="NfeConsultaCadastro" version="3.10"></NfeConsultaCadastro>
      <NfeConsultaDest method="nfeConsultaNFDest" operation="NfeConsultaDest" version="3.10"></NfeConsultaDest>
      <NfeConsultaProtocolo method="nfeConsultaNF2" operation="NfeConsulta2" version="3.10"></NfeConsultaProtocolo>
      <NfeConsultaQR method="QR-CODE" operation="NfeConsultaQR" version="3.10"></NfeConsultaQR>
      <NfeDownloadNF method="nfeDownloadNF" operation="NfeDownloadNF" version="3.10"></NfeDownloadNF>
      <NfeInutilizacao method="nfeInutilizacaoNF2" operation="NfeInutilizacao2" version="3.10"></NfeInutilizacao>
      <NfeRetAutorizacao method="nfeRetAutorizacaoLote" operation="NfeRetAutorizacao" version="3.10"></NfeRetAutorizacao>
      <NfeStatusServico method="nfeStatusServicoNF2" operation="NfeStatusServico2" version="3.10"></NfeStatusServico>
      <RecepcaoEvento method="nfeRecepcaoEvento" operation="RecepcaoEvento" version="1.00"></RecepcaoEvento>
    </homologacao>
    <producao>
      <NfeAutorizacao method="nfeAutorizacaoLote" operation="NfeAutorizacao" version="3.10"></NfeAutorizacao>
      <NfeConsultaCadastro method="consultaCadastro2" operation="NfeConsultaCadastro" version="3.10"></NfeConsultaCadastro>
      <NfeConsultaDest method="nfeConsultaNFDest" operation="NfeConsultaDest" version="3.10"></NfeConsultaDest>
      <NfeConsultaProtocolo method="nfeConsultaNF2" operation="NfeConsulta2" version="3.10"></NfeConsultaProtocolo>
      <NfeConsultaQR method="QR-CODE" operation="NfeConsultaQR" version="3.10"></NfeConsultaQR>
      <NfeDownloadNF method="nfeDownloadNF" operation="NfeDownloadNF" version="3.10"></NfeDownloadNF>
      <NfeInutilizacao method="nfeInutilizacaoNF2" operation="NfeInutilizacao2" version="3.10"></NfeInutilizacao>
      <NfeRetAutorizacao method="nfeRetAutorizacaoLote" operation="NfeRetAutorizacao" version="3.10"></NfeRetAutorizacao>
      <NfeStatusServico method="nfeStatusServicoNF2" operation="NfeStatusServico2" version="3.10"></NfeStatusServico>
      <RecepcaoEvento method="nfeRecepcaoEvento" operation="RecepcaoEvento" version="1.00"></RecepcaoEvento>
    </producao>
  </UF>
</WS>


text:
using System;
using System.Collections.Generic;
using System.Runtime.CompilerServices;
using Urasandesu.NAnonym;
using Urasandesu.Prig.Framework.PilotStubberConfiguration;

namespace Urasandesu.Prig.Framework
{
    public abstract class UntypedBehaviorPreparableImpl : BehaviorPreparableImpl
    {
        protected UntypedBehaviorPreparableImpl(IndirectionStub stub, Type[] typeGenericArgs, Type[] methodGenericArgs) :
            base(stub, typeGenericArgs, methodGenericArgs)
        { }

        public virtual Work Body
        {
            get { return BodyCore; }
            set { BodyCore = value; }
        }

        public virtual Work BodyCore
        {
            get
            {
                var holder = LooseCrossDomainAccessorUntyped.GetOrRegister(IndirectionStub.GetIndirectionDelegate(TypeGenericArguments, MethodGenericArguments));
                return holder.GetOrDefault(Info);
            }
            set
            {
                var holder = LooseCrossDomainAccessorUntyped.GetOrRegister(IndirectionStub.GetIndirectionDelegate(TypeGenericArguments, MethodGenericArguments));
                if (value == null)
                    holder.Remove(Info);
                else
                    holder.AddOrUpdate(Info, value);
            }
        }

        public override void Prepare(IndirectionBehaviors defaultBehavior)
        {
            var behavior = IndirectionStub.CreateWorkOfDefaultBehavior(defaultBehavior, TypeGenericArguments, MethodGenericArguments);
            Body = behavior;
        }

        Work GetBodyOfDefaultBehavior()
        {
            return BodyCore == null ?
                        IndirectionStub.CreateWorkOfDefaultBehavior(IndirectionBehaviors.Fallthrough, TypeGenericArguments, MethodGenericArguments) :
                        BodyCore;
        }

        void SetBodyExecutingDefaultOr(Work defaultBehavior, Dictionary<object, TargetSettingValue<Work>> indirections)
        {
            BodyCore = IndirectionStub.CreateWorkExecutingDefaultOr(defaultBehavior, indirections, TypeGenericArguments, MethodGenericArguments);
        }

        protected void SetTargetInstanceBody<TBehaviorPreparableImpl>(object target, Work value) where TBehaviorPreparableImpl : BehaviorPreparableImpl
        {
            SetTargetInstanceBody<TBehaviorPreparableImpl, Work>(target, value, GetBodyOfDefaultBehavior, SetBodyExecutingDefaultOr);
        }

        void SetBodyToOriginal(Work original)
        {
            BodyCore = original;
        }

        protected void RemoveTargetInstanceBody<TBehaviorPreparableImpl>(object target) where TBehaviorPreparableImpl : BehaviorPreparableImpl
        {
            RemoveTargetInstanceBody<TBehaviorPreparableImpl, Work>(target, SetBodyToOriginal);
        }
    }
}

redpajama_set_name: RedPajamaGithub


text:
defineSuite([
        'Core/Math'
    ], function(
        CesiumMath) {
    'use strict';

    it('sign of -2', function() {
        expect(CesiumMath.sign(-2)).toEqual(-1);
    });

    it('sign of 2', function() {
        expect(CesiumMath.sign(2)).toEqual(1);
    });

    it('sign of 0', function() {
        expect(CesiumMath.sign(0)).toEqual(0);
    });

    it('sign of -0', function() {
        expect(CesiumMath.sign(-0)).toEqual(-0);
    });

    it('sign of NaN', function() {
        expect(CesiumMath.sign(NaN)).toBeNaN();
    });

    it('signNotZero of -2', function() {
        expect(CesiumMath.signNotZero(-2)).toEqual(-1);
    });

    it('signNotZero of 2', function() {
        expect(CesiumMath.signNotZero(2)).toEqual(1);
    });

    it('signNotZero of 0', function() {
        expect(CesiumMath.signNotZero(0)).toEqual(1);
    });

    //////////////////////////////////////////////////////////////////////
    it('toSNorm -1.0', function() {
        expect(CesiumMath.toSNorm(-1.0)).toEqual(0);
    });

    it('toSNorm 1.0', function() {
        expect(CesiumMath.toSNorm(1.0)).toEqual(255);
    });

    it('toSNorm -1.0001', function() {
        expect(CesiumMath.toSNorm(-1.0001)).toEqual(0);
    });

    it('toSNorm 1.0001', function() {
        expect(CesiumMath.toSNorm(1.0001)).toEqual(255);
    });

    it('toSNorm 0.0', function() {
        expect(CesiumMath.toSNorm(0.0)).toEqual(128);
    });

    it('fromSNorm 0', function() {
        expect(CesiumMath.fromSNorm(0)).toEqual(-1.0);
    });

    it('fromSNorm 255', function() {
        expect(CesiumMath.fromSNorm(255)).toEqual(1.0);
    });

    it('fromSNorm -0.0001', function() {
        expect(CesiumMath.fromSNorm(-0.0001)).toEqual(-1.0);
    });

    it('fromSNorm 255.00001', function() {
        expect(CesiumMath.fromSNorm(255.00001)).toEqual(1.0);
    });

    it('fromSNorm 128', function() {
        expect(CesiumMath.fromSNorm(255.0 / 2)).toEqual(0.0);
    });

    //////////////////////////////////////////////////////////////////////

    it('cosh', function() {
        expect(CesiumMath.cosh(0.0)).toEqual(1.0);
        expect(CesiumMath.cosh(-1.0)).toBeGreaterThan(1.0);
        expect(CesiumMath.cosh(1.0)).toBeGreaterThan(1.0);
    });

    it('cosh NaN', function() {
        expect(isNaN(CesiumMath.cosh(NaN))).toEqual(true);
    });

    it('cosh infinity', function() {
        expect(CesiumMath.cosh(Infinity)).toEqual(Infinity);
        expect(CesiumMath.cosh(-Infinity)).toEqual(Infinity);
    });

    it('sinh', function() {
        expect(CesiumMath.sinh(0.0)).toEqual(0.0);
        expect(CesiumMath.sinh(-1.0)).toBeLessThan(1.0);
        expect(CesiumMath.sinh(1.0)).toBeGreaterThan(1.0);
    });

    it('sinh NaN', function() {
        expect(isNaN(CesiumMath.sinh(NaN))).toEqual(true);
    });

    it('sinh infinity', function() {
        expect(CesiumMath.sinh(Infinity)).toEqual(Infinity);
        expect(CesiumMath.sinh(-Infinity)).toEqual(-Infinity);
    });

    ///////////////////////////////////////////////////////////////////////

    it('lerps at time 0', function() {
        expect(CesiumMath.lerp(1.0, 2.0, 0.0)).toEqual(1.0);
    });

    it('lerps at time 0.5', function() {
        expect(CesiumMath.lerp(1.0, 2.0, 0.5)).toEqual(1.5);
    });

    it('lerps at time 1', function() {
        expect(CesiumMath.lerp(1.0, 2.0, 1.0)).toEqual(2.0);
    });

    ///////////////////////////////////////////////////////////////////////

    it('toRadians', function() {
        expect(CesiumMath.toRadians(360.0)).toEqual(2 * Math.PI);
    });

    it('toRadians throws for undefined', function() {
        expect(function() {
            CesiumMath.toRadians();
        }).toThrowDeveloperError();
    });

    it('toDegrees', function() {
        expect(CesiumMath.toDegrees(Math.PI)).toEqual(180.0);
    });

    it('toDegrees throws for undefined', function() {
        expect(function() {
            CesiumMath.toDegrees();
        }).toThrowDeveloperError();
    });

    it('convertLongitudeRange (1)', function() {
        expect(CesiumMath.convertLongitudeRange(CesiumMath.THREE_PI_OVER_TWO)).toEqualEpsilon(-CesiumMath.PI_OVER_TWO, CesiumMath.EPSILON16);
    });

    it('convertLongitudeRange (2)', function() {
        expect(CesiumMath.convertLongitudeRange(-Math.PI)).toEqualEpsilon(-Math.PI, CesiumMath.EPSILON16);
    });

    it('convertLongitudeRange (3)', function() {
        expect(CesiumMath.convertLongitudeRange(Math.PI)).toEqualEpsilon(-Math.PI, CesiumMath.EPSILON16);
    });

    it('convertLongitudeRange throws for undefined', function() {
        expect(function() {
            CesiumMath.convertLongitudeRange();
        }).toThrowDeveloperError();
    });

    it('clampToLatitudeRange (1)', function() {
        expect(CesiumMath.clampToLatitudeRange(Math.PI)).toEqual(CesiumMath.PI_OVER_TWO);
    });

    it('clampToLatitudeRange (2)', function() {
        expect(CesiumMath.clampToLatitudeRange(-Math.PI)).toEqual(-CesiumMath.PI_OVER_TWO);
    });

    it('clampToLatitudeRange throws for undefined', function() {
        expect(function() {
            CesiumMath.clampToLatitudeRange();
        }).toThrowDeveloperError();
    });

    it('negativePiToPi positive', function() {
        expect(CesiumMath.negativePiToPi((Math.PI / 2) * Math.PI)).toEqualEpsilon((Math.PI / 2) * Math.PI - CesiumMath.TWO_PI, CesiumMath.EPSILON16);
        expect(CesiumMath.negativePiToPi(Math.PI / 0.5)).toEqualEpsilon(0.0, CesiumMath.EPSILON16);
        expect(CesiumMath.negativePiToPi(Math.PI + CesiumMath.EPSILON10)).toEqualEpsilon(-Math.PI, CesiumMath.EPSILON9);
        expect(CesiumMath.negativePiToPi(Math.PI)).toEqualEpsilon(Math.PI, CesiumMath.EPSILON9);
    });

    it('negativePiToPi negative', function() {
        expect(CesiumMath.negativePiToPi(-Math.PI / 0.5)).toEqualEpsilon(0.0, CesiumMath.EPSILON16);
        expect(CesiumMath.negativePiToPi(-(Math.PI / 2) * Math.PI)).toEqualEpsilon(-(Math.PI / 2) * Math.PI + CesiumMath.TWO_PI, CesiumMath.EPSILON16);
        expect(CesiumMath.negativePiToPi(-(Math.PI + CesiumMath.EPSILON10))).toEqualEpsilon(Math.PI, CesiumMath.EPSILON9);
        expect(CesiumMath.negativePiToPi(-Math.PI)).toEqualEpsilon(-Math.PI, CesiumMath.EPSILON9);
    });

    it('negativePiToPi should not change', function() {
        expect(CesiumMath.negativePiToPi(Math.PI - 1)).toEqualEpsilon(Math.PI - 1, CesiumMath.EPSILON16);
        expect(CesiumMath.negativePiToPi(-Math.PI + 1)).toEqualEpsilon(-Math.PI + 1, CesiumMath.EPSILON16);
    });

    it('negativePiToPi throws for undefined', function() {
        expect(function() {
            CesiumMath.negativePiToPi();
        }).toThrowDeveloperError();
    });

    it('zeroToTwoPi', function() {
        expect(CesiumMath.zeroToTwoPi(0.0)).toEqualEpsilon(0.0, CesiumMath.EPSILON14);
        expect(CesiumMath.zeroToTwoPi(Math.PI)).toEqualEpsilon(Math.PI, CesiumMath.EPSILON14);
        expect(CesiumMath.zeroToTwoPi(CesiumMath.TWO_PI)).toEqualEpsilon(CesiumMath.TWO_PI, CesiumMath.EPSILON14);
        expect(CesiumMath.zeroToTwoPi(3.0 * Math.PI)).toEqualEpsilon(Math.PI, CesiumMath.EPSILON14);
        expect(CesiumMath.zeroToTwoPi(2.0 * CesiumMath.TWO_PI)).toEqualEpsilon(CesiumMath.TWO_PI, CesiumMath.EPSILON14);
        expect(CesiumMath.zeroToTwoPi(-Math.PI)).toEqualEpsilon(Math.PI, CesiumMath.EPSILON14);
        expect(CesiumMath.zeroToTwoPi(-CesiumMath.TWO_PI)).toEqualEpsilon(CesiumMath.TWO_PI, CesiumMath.EPSILON14);
    });

    it('zeroToTwoPi throws for undefined', function() {
        expect(function() {
            CesiumMath.zeroToTwoPi();
        }).toThrowDeveloperError();
    });

    it('equalsEpsilon', function() {
        expect(CesiumMath.equalsEpsilon(1.0, 1.0, 0.0)).toEqual(true);
        expect(CesiumMath.equalsEpsilon(1.0, 1.0, 1.0)).toEqual(true);
        expect(CesiumMath.equalsEpsilon(1.0, 1.0 + CesiumMath.EPSILON7, CesiumMath.EPSILON7)).toEqual(true);
        expect(CesiumMath.equalsEpsilon(1.0, 1.0 + CesiumMath.EPSILON7, CesiumMath.EPSILON9)).toEqual(false);

        expect(CesiumMath.equalsEpsilon(3000000.0, 3000000.0, 0.0)).toEqual(true);
        expect(CesiumMath.equalsEpsilon(3000000.0, 3000000.0, CesiumMath.EPSILON7)).toEqual(true);
        expect(CesiumMath.equalsEpsilon(3000000.0, 3000000.2, CesiumMath.EPSILON7)).toEqual(true);
        expect(CesiumMath.equalsEpsilon(3000000.0, 3000000.2, CesiumMath.EPSILON9)).toEqual(false);
    });

    it('equalsEpsilon throws for undefined left', function() {
        expect(function() {
            CesiumMath.equalsEpsilon(undefined, 5.0, CesiumMath.EPSILON16);
        }).toThrowDeveloperError();
    });

    it('equalsEpsilon throws for undefined right', function() {
        expect(function() {
            CesiumMath.equalsEpsilon(1.0, undefined, CesiumMath.EPSILON16);
        }).toThrowDeveloperError();
    });

    it('equalsEpsilon throws for undefined relativeEpsilon', function() {
        expect(function() {
            CesiumMath.equalsEpsilon(1.0, 5.0, undefined);
        }).toThrowDeveloperError();
    });

    it('equalsEpsilon throws for undefined', function() {
        expect(function() {
            CesiumMath.equalsEpsilon();
        }).toThrowDeveloperError();
    });

    it('factorial produces the correct results', function() {
        var factorials = [1, 1, 2, 6, 24, 120, 720, 5040, 40320, 362880, 3628800, 39916800, 479001600, 6227020800, 87178291200, 1307674368000, 20922789888000, 355687428096000, 6402373705728000,
                          121645100408832000, 2432902008176640000, 51090942171709440000, 1124000727777607680000, 25852016738884976640000, 620448401733239439360000];

        for ( var i = 0; i < factorials.length; i++) {
            expect(CesiumMath.factorial(i)).toEqual(factorials[i]);
        }
    });

    it('incrementWrap correctly increments and wraps', function() {
        expect(CesiumMath.incrementWrap(5, 10, 0)).toEqual(6);
        expect(CesiumMath.incrementWrap(10, 10, 0)).toEqual(0);
        expect(CesiumMath.incrementWrap(10, 10)).toEqual(0);
    });

    it('incrementWrap throws for undefined', function() {
        expect(function() {
            CesiumMath.incrementWrap();
        }).toThrowDeveloperError();
    });

    it('isPowerOfTwo finds powers of two', function() {
        expect(CesiumMath.isPowerOfTwo(1)).toEqual(true);
        expect(CesiumMath.isPowerOfTwo(2)).toEqual(true);
        expect(CesiumMath.isPowerOfTwo(4)).toEqual(true);
        expect(CesiumMath.isPowerOfTwo(8)).toEqual(true);
        expect(CesiumMath.isPowerOfTwo(16)).toEqual(true);
        expect(CesiumMath.isPowerOfTwo(256)).toEqual(true);
        expect(CesiumMath.isPowerOfTwo(1024)).toEqual(true);
        expect(CesiumMath.isPowerOfTwo(16 * 1024)).toEqual(true);
    });

    it('isPowerOfTwo does not find powers of two', function() {
        expect(CesiumMath.isPowerOfTwo(0)).toEqual(false);
        expect(CesiumMath.isPowerOfTwo(3)).toEqual(false);
        expect(CesiumMath.isPowerOfTwo(5)).toEqual(false);
        expect(CesiumMath.isPowerOfTwo(12)).toEqual(false);
    });

    it('nextPowerOfTwo finds next power of two', function() {
        expect(CesiumMath.nextPowerOfTwo(0)).toEqual(0);
        expect(CesiumMath.nextPowerOfTwo(257)).toEqual(512);
        expect(CesiumMath.nextPowerOfTwo(512)).toEqual(512);
        expect(CesiumMath.nextPowerOfTwo(1023)).toEqual(1024);
    });

    it('factorial throws for non-numbers', function() {
        expect(function() {
            CesiumMath.factorial({});
        }).toThrowDeveloperError();
    });

    it('factorial throws for negative numbers', function() {
        expect(function() {
            CesiumMath.factorial(-1);
        }).toThrowDeveloperError();
    });

    it('factorial throws for undefined', function() {
        expect(function() {
            CesiumMath.factorial();
        }).toThrowDeveloperError();
    });

    it('incrementWrap throws for minimum value >= maximum value', function() {
        expect(function() {
            CesiumMath.incrementWrap(5, 0, 10);
        }).toThrowDeveloperError();
        expect(function() {
            CesiumMath.incrementWrap(5, 10, 10);
        }).toThrowDeveloperError();
    });

    it('isPowerOfTwo throws for non-numbers', function() {
        expect(function() {
            CesiumMath.isPowerOfTwo({});
        }).toThrowDeveloperError();
    });

    it('isPowerOfTwo throws for negative numbers', function() {
        expect(function() {
            CesiumMath.isPowerOfTwo(-1);
        }).toThrowDeveloperError();
    });

    it('isPowerOfTwo throws for undefined', function() {
        expect(function() {
            CesiumMath.isPowerOfTwo();
        }).toThrowDeveloperError();
    });

    it('nextPowerOfTwo throws for non-numbers', function() {
        expect(function() {
            CesiumMath.nextPowerOfTwo({});
        }).toThrowDeveloperError();
    });

    it('nextPowerOfTwo throws for negative numbers', function() {
        expect(function() {
            CesiumMath.nextPowerOfTwo(-1);
        }).toThrowDeveloperError();
    });

    it('nextPowerOfTwo throws for undefined', function() {
        expect(function() {
            CesiumMath.nextPowerOfTwo();
        }).toThrowDeveloperError();
    });

    it('clamp throws for undefined', function() {
        expect(function() {
            CesiumMath.clamp();
        }).toThrowDeveloperError();
    });

    it('acosClamped returns acos for normal values', function() {
        expect(CesiumMath.acosClamped(0.5)).toBe(Math.acos(0.5));
        expect(CesiumMath.acosClamped(0.123)).toBe(Math.acos(0.123));
        expect(CesiumMath.acosClamped(-0.123)).toBe(Math.acos(-0.123));
        expect(CesiumMath.acosClamped(-1.0)).toBe(Math.acos(-1.0));
        expect(CesiumMath.acosClamped(1.0)).toBe(Math.acos(1.0));
    });

    it('acosClamped returns acos of clamped value when value is outside the valid range', function() {
        expect(CesiumMath.acosClamped(-1.01)).toBe(Math.acos(-1.0));
        expect(CesiumMath.acosClamped(1.01)).toBe(Math.acos(1.0));
    });

    it('acosClamped throws without value', function() {
        expect(function() {
            CesiumMath.acosClamped();
        }).toThrowDeveloperError();
    });

    it('asinClamped returns asin for normal values', function() {
        expect(CesiumMath.asinClamped(0.5)).toBe(Math.asin(0.5));
        expect(CesiumMath.asinClamped(0.123)).toBe(Math.asin(0.123));
        expect(CesiumMath.asinClamped(-0.123)).toBe(Math.asin(-0.123));
        expect(CesiumMath.asinClamped(-1.0)).toBe(Math.asin(-1.0));
        expect(CesiumMath.asinClamped(1.0)).toBe(Math.asin(1.0));
    });

    it('asinClamped returns asin of clamped value when value is outside the valid range', function() {
        expect(CesiumMath.asinClamped(-1.01)).toBe(Math.asin(-1.0));
        expect(CesiumMath.asinClamped(1.01)).toBe(Math.asin(1.0));
    });

    it('asinClamped throws without value', function() {
        expect(function() {
            CesiumMath.asinClamped();
        }).toThrowDeveloperError();
    });

    it('chordLength finds the chord length', function() {
        expect(CesiumMath.chordLength(CesiumMath.PI_OVER_THREE, 1.0)).toEqualEpsilon(1.0, CesiumMath.EPSILON14);
        expect(CesiumMath.chordLength(CesiumMath.PI_OVER_THREE, 5.0)).toEqualEpsilon(5.0, CesiumMath.EPSILON14);
        expect(CesiumMath.chordLength(2.0 * CesiumMath.PI_OVER_THREE, 1.0)).toEqualEpsilon(Math.sqrt(3.0), CesiumMath.EPSILON14);
        expect(CesiumMath.chordLength(2.0 * CesiumMath.PI_OVER_THREE, 5.0)).toEqualEpsilon(5.0 * Math.sqrt(3.0), CesiumMath.EPSILON14);
        expect(CesiumMath.chordLength(CesiumMath.PI, 10.0)).toEqualEpsilon(2.0 * 10.0, CesiumMath.EPSILON14);
    });

    it('chordLength throws without angle', function() {
        expect(function() {
            CesiumMath.chordLength(undefined, 1.0);
        }).toThrowDeveloperError();
    });

    it('chordLength throws without radius', function() {
        expect(function() {
            CesiumMath.chordLength(0.0, undefined);
        }).toThrowDeveloperError();
    });

    it('logBase', function() {
        expect(CesiumMath.logBase(64, 4)).toEqual(3);
    });

    it('logBase throws without number', function() {
        expect(function() {
            CesiumMath.logBase(undefined);
        }).toThrowDeveloperError();
    });

    it('logBase throws without base', function() {
        expect(function() {
            CesiumMath.logBase(64, undefined);
        }).toThrowDeveloperError();
    });

    it('cbrt', function() {
        expect(CesiumMath.cbrt(27.0)).toEqual(3.0);
        expect(CesiumMath.cbrt(-27.0)).toEqual(-3.0);
        expect(CesiumMath.cbrt(0.0)).toEqual(0.0);
        expect(CesiumMath.cbrt(1.0)).toEqual(1.0);
        expect(CesiumMath.cbrt()).toEqual(NaN);
    });

    it('fastApproximateAtan', function() {
        expect(CesiumMath.fastApproximateAtan(0.0)).toEqualEpsilon(0.0, CesiumMath.EPSILON3);
        expect(CesiumMath.fastApproximateAtan(1.0)).toEqualEpsilon(CesiumMath.PI_OVER_FOUR, CesiumMath.EPSILON3);
        expect(CesiumMath.fastApproximateAtan(-1.0)).toEqualEpsilon(-CesiumMath.PI_OVER_FOUR, CesiumMath.EPSILON3);
    });

    it('fastApproximateAtan2', function() {
        expect(CesiumMath.fastApproximateAtan2(1.0, 0.0)).toEqualEpsilon(0.0, CesiumMath.EPSILON3);
        expect(CesiumMath.fastApproximateAtan2(1.0, 1.0)).toEqualEpsilon(CesiumMath.PI_OVER_FOUR, CesiumMath.EPSILON3);
        expect(CesiumMath.fastApproximateAtan2(-1.0, 1.0)).toEqualEpsilon(CesiumMath.PI_OVER_FOUR + CesiumMath.PI_OVER_TWO, CesiumMath.EPSILON3);
    });

    it('fastApproximateAtan2 throws if both arguments are zero', function() {
        expect(function() {
            CesiumMath.fastApproximateAtan2(0, 0);
        }).toThrowDeveloperError();
    });
});


text:
#site-title{
  color: inherit;
  text-decoration: none;
}
.mdl-layout__drawer > .mdl-layout-title{
  padding-left: 16px;
  padding-right: 16px;
  text-align: center;
}
.content{
  max-width: 100%;
  padding: 40px 40px 40px 40px;
  margin-left: auto;
  margin-right: auto;
}
.parent{
  font-weight: bold;
}
.child{
  padding: 5px 40px 5px 60px !important;
}
.is-active{
  background-color: #e0e0e0;
}
.content img {
  max-width: 100%;
  padding: 10px;
  border: 1px whitesmoke solid;
  border-radius: 10px;
}
footer{
  text-align: right;
  padding-right: 10px;
}
.lineno{
  padding-right: 8px;
}

.header-left{
  display: inline-block;
  margin: auto;
  margin-left: 0px;
  float: left;
}

.header-right{
  display: inline-block;
  margin: auto;
  margin-right: 0px;
  float: right;
}

.mdl-textfield {
  width: 500px;
}

.path {
  display: inline-block;
}

.pre-path {
  font-size: 16px;
  font-family: "Helvetica","Arial",sans-serif;
}

a.mdl-chip__text {
  text-decoration: None;
  color: black;
}

.page-link {
  text-decoration: None;
  font-size: 1.5em;
  font-style: bold;
}

.row-clickable {
  cursor: pointer;
}

.runs-hidden {
  display: None;
}

.runs-visible {
  display: table-row;
}

.chart {
  /*width: 600px;*/
  /*height: 600px;*/
}

.grid-sizer, .grid-item {
  width: 30%;
}

.gutter-sizer {
    width: 5%;
}

.grid-item {
  float: left;
  margin-bottom: 40px;
}

.delete {
    cursor: pointer;
}

.delete:hover {
    color: blue;
}

/* Copied from Syntax.css (https://github.com/mojombo/tpw/blob/master/css/syntax.css) */
.highlight  { background: #ffffff; }
.highlight .c { color: #999988; font-style: italic } /* Comment */
.highlight .err { color: #a61717; background-color: #e3d2d2 } /* Error */
.highlight .k { font-weight: bold } /* Keyword */
.highlight .o { font-weight: bold } /* Operator */
.highlight .cm { color: #999988; font-style: italic } /* Comment.Multiline */
.highlight .cp { color: #999999; font-weight: bold } /* Comment.Preproc */
.highlight .c1 { color: #999988; font-style: italic } /* Comment.Single */
.highlight .cs { color: #999999; font-weight: bold; font-style: italic } /* Comment.Special */
.highlight .gd { color: #000000; background-color: #ffdddd } /* Generic.Deleted */
.highlight .gd .x { color: #000000; background-color: #ffaaaa } /* Generic.Deleted.Specific */
.highlight .ge { font-style: italic } /* Generic.Emph */
.highlight .gr { color: #aa0000 } /* Generic.Error */
.highlight .gh { color: #999999 } /* Generic.Heading */
.highlight .gi { color: #000000; background-color: #ddffdd } /* Generic.Inserted */
.highlight .gi .x { color: #000000; background-color: #aaffaa } /* Generic.Inserted.Specific */
.highlight .go { color: #888888 } /* Generic.Output */
.highlight .gp { color: #555555 } /* Generic.Prompt */
.highlight .gs { font-weight: bold } /* Generic.Strong */
.highlight .gu { color: #aaaaaa } /* Generic.Subheading */
.highlight .gt { color: #aa0000 } /* Generic.Traceback */
.highlight .kc { font-weight: bold } /* Keyword.Constant */
.highlight .kd { font-weight: bold } /* Keyword.Declaration */
.highlight .kp { font-weight: bold } /* Keyword.Pseudo */
.highlight .kr { font-weight: bold } /* Keyword.Reserved */
.highlight .kt { color: #445588; font-weight: bold } /* Keyword.Type */
.highlight .m { color: #009999 } /* Literal.Number */
.highlight .s { color: #d14 } /* Literal.String */
.highlight .na { color: #008080 } /* Name.Attribute */
.highlight .nb { color: #0086B3 } /* Name.Builtin */
.highlight .nc { color: #445588; font-weight: bold } /* Name.Class */
.highlight .no { color: #008080 } /* Name.Constant */
.highlight .ni { color: #800080 } /* Name.Entity */
.highlight .ne { color: #990000; font-weight: bold } /* Name.Exception */
.highlight .nf { color: #990000; font-weight: bold } /* Name.Function */
.highlight .nn { color: #555555 } /* Name.Namespace */
.highlight .nt { color: #000080 } /* Name.Tag */
.highlight .nv { color: #008080 } /* Name.Variable */
.highlight .ow { font-weight: bold } /* Operator.Word */
.highlight .w { color: #bbbbbb } /* Text.Whitespace */
.highlight .mf { color: #009999 } /* Literal.Number.Float */
.highlight .mh { color: #009999 } /* Literal.Number.Hex */
.highlight .mi { color: #009999 } /* Literal.Number.Integer */
.highlight .mo { color: #009999 } /* Literal.Number.Oct */
.highlight .sb { color: #d14 } /* Literal.String.Backtick */
.highlight .sc { color: #d14 } /* Literal.String.Char */
.highlight .sd { color: #d14 } /* Literal.String.Doc */
.highlight .s2 { color: #d14 } /* Literal.String.Double */
.highlight .se { color: #d14 } /* Literal.String.Escape */
.highlight .sh { color: #d14 } /* Literal.String.Heredoc */
.highlight .si { color: #d14 } /* Literal.String.Interpol */
.highlight .sx { color: #d14 } /* Literal.String.Other */
.highlight .sr { color: #009926 } /* Literal.String.Regex */
.highlight .s1 { color: #d14 } /* Literal.String.Single */
.highlight .ss { color: #990073 } /* Literal.String.Symbol */
.highlight .bp { color: #999999 } /* Name.Builtin.Pseudo */
.highlight .vc { color: #008080 } /* Name.Variable.Class */
.highlight .vg { color: #008080 } /* Name.Variable.Global */
.highlight .vi { color: #008080 } /* Name.Variable.Instance */
.highlight .il { color: #009999 } /* Literal.Number.Integer.Long */


text:
/* eslint-disable */

/**
 * app.js
 *
 * This is the entry file for the application, only setup and boilerplate
 * code.
 */
// Needed for redux-saga es6 generator support
import 'babel-polyfill';

import React from 'react';
import ReactDOM from 'react-dom';

// Import all the third party stuff
import { AppContainer } from 'react-hot-loader';
import { Provider } from 'react-redux';
import createHistory from 'history/createBrowserHistory';
import { ConnectedRouter, syncHistoryWithStore } from 'react-router-redux';
import injectTapEventPlugin from 'react-tap-event-plugin'
import 'ScrollToPlugin';
import rootSaga from './modules/sagas';
import FontFaceObserver from 'fontfaceobserver';
import 'normalize.css/normalize.css';
import './main.scss';

// Import selector for `syncHistoryWithStore`
import { selectLocationState } from './modules/router/router.selectors';

import configureStore from './modules/store';

// Observe loading of Open Sans (to remove open sans, remove the <link> tag in
// the index.html file and this observer)
const openSansObserver = new FontFaceObserver('Open Sans', {});

// When Open Sans is loaded, add a font-family using Open Sans to the body
openSansObserver.load().then(() => {
  document.body.classList.add('fontLoaded');
}, () => {
  document.body.classList.remove('fontLoaded');
});

// Needed for onTouchTap
// Check this repo:
// https://github.com/zilverline/react-tap-event-plugin
injectTapEventPlugin();

// Create redux store with history
// this uses the singleton browserHistory provided by react-router
// Optionally, this could be changed to leverage a created history
// e.g. `const browserHistory = useRouterHistory(createBrowserHistory)();`
const browserHistory = createHistory();
const initialState = window.APP_STATE;
const store = configureStore(initialState, browserHistory);
delete window.APP_STATE;
store.runSaga(rootSaga);

if (process.env.NODE_ENV === 'development') {
  const DevToolsComponent = require('./utils/devtools.component').default;
  const devToolsRoot = window.document.createElement('div');

  window.document.body.appendChild(devToolsRoot);

  ReactDOM.render(
    <Provider store={store}>
      <DevToolsComponent />
    </Provider>,
    devToolsRoot
  );
}

const render = () => {
  const NextApp = require('./routes').default;

  ReactDOM.render(
    <AppContainer>
      <Provider store={store}>
        <ConnectedRouter history={browserHistory}>
          <NextApp userAgent={navigator.userAgent} />
        </ConnectedRouter>
      </Provider>
    </AppContainer>,
    document.getElementById('app')
  );
};

if (!window.Intl) {
  (new Promise((resolve) => {
    resolve(require('intl'));
  }))
    .then(() => Promise.all([
      require('intl/locale-data/jsonp/en.js'),
      require('intl/locale-data/jsonp/de.js'),
    ]))
    .then(() => render())
    .catch((err) => {
      throw err;
    });
} else {
  render();
}

if (module.hot) {
  module.hot.accept('./routes', () => {
    render();
  });
}

// Install ServiceWorker and AppCache in the end since
// it's not most important operation and if main code fails,
// we do not want it installed
if (process.env.NODE_ENV === 'production') {
  require('offline-plugin/runtime').install(); // eslint-disable-line global-require, import/no-extraneous-dependencies
}


text:
FROM osixia/openldap:1.2.4

EXPOSE 389 636

ENV MODULE_NAME ldap

ADD modules/${MODULE_NAME}/config /config
ADD modules/${MODULE_NAME}/script /script

RUN chmod -R 500 /script && \
    chmod -R 400 /config && sync && \
    /script/init_image.sh

ENTRYPOINT []
CMD ["/script/init_container.sh"]


text:
from __future__ import (absolute_import, division, generators, nested_scopes, print_function,
                        unicode_literals, with_statement)

import os
import re

import pystache
from pkg_resources import resource_string

from pants.backend.core.tasks.console_task import ConsoleTask
from pants.backend.core.tasks.reflect import assemble_buildsyms

class TargetsHelp(ConsoleTask):
  """Show online help for symbols usable in BUILD files (java_library, etc)."""

  @classmethod
  def register_options(cls, register):
    super(TargetsHelp, cls).register_options(register)
    register('--details', help='Display details about the specific target type or BUILD symbol.')

  def __init__(self, *args, **kwargs):
    super(TargetsHelp, self).__init__(*args, **kwargs)
    self._templates_dir = os.path.join('templates', 'targets_help')

  def list_all(self):
    d = assemble_buildsyms(build_file_parser=self.context.build_file_parser)
    max_sym_len = max(len(sym) for sym in d.keys())
    console = []
    blurb_template = resource_string(__name__,
                                     os.path.join(self._templates_dir,
                                                  'cli_list_blurb.mustache'))
    for sym, data in sorted(d.items(), key=lambda(k, v): k.lower()):
      blurb = pystache.render(blurb_template, data)
      summary = re.sub('\s+', ' ', blurb).strip()
      if len(summary) > 50:
        summary = summary[:47].strip() + '...'
      console.append('{0}: {1}'.format(sym.rjust(max_sym_len), summary))
    return console

  def details(self, sym):
    '''Show details of one symbol.

    :param sym: string like 'java_library' or 'artifact'.'''
    d = assemble_buildsyms(build_file_parser=self.context.build_file_parser)
    if not sym in d:
      return ['\nNo such symbol: {0}\n'.format(sym)]
    template = resource_string(__name__, os.path.join(self._templates_dir,
                                                      'cli_details.mustache'))
    spacey_render = pystache.render(template, d[sym]['defn'])
    compact_render = re.sub('\n\n+', '\n\n', spacey_render)
    return compact_render.splitlines()

  def console_output(self, targets):
    if self.get_options().details:
      return self.details(self.get_options().details)
    else:
      return self.list_all()


text:
license: Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to you 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.
---

# errore mediaError

Una funzione di callback specificato dall'utente che viene eseguito quando si verifica un errore in funzioni multimediali.

    function(error) {
        // Handle the error
    }

## Parametri

*   **errore**: l'errore restituito dal dispositivo. *(Errore MediaError)*


text:
package com.morgan.client.alert;

import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;

import com.google.inject.BindingAnnotation;

/**
 * Collection of GIN bindings common for alerts.
 *
 * @author mark@mark-morgan.net (Mark Morgan)
 */
public final class CommonAlertBindings {

  private CommonAlertBindings() {
    // Do not instantiate.
  }

  @BindingAnnotation
  @Retention(RetentionPolicy.RUNTIME)
  @Target({ElementType.FIELD, ElementType.PARAMETER, ElementType.METHOD, ElementType.TYPE})
  public @interface Loading {
  }
}


text:
<?php

namespace app\modules\entries\models\search;

use app\modules\entries\models\Place;
use Yii;
use yii\data\ActiveDataProvider;
use yii\db\Query;

class PlaceSearch extends Place
{
    /**
     * @inheritdoc
     */
    public function rules()
    {
        return [
            [['id', 'status'], 'integer'],
            [['name'], 'string', 'max' => 60],
        ];
    }

    /**
     * Creates data provider instance with search query applied
     * @param array $params
     * @return ActiveDataProvider
     */
    public function search($params)
    {
        if (empty($params['status']))
            $this->status = '';

        /** @var Query $query */
        $query = Place::find();

        $dataProvider = new ActiveDataProvider([
            'query' => $query,
            'pagination' => [
                'pageSize' => Yii::$app->params['pagination']['pageSize'],
            ],
            'sort' => [
                'defaultOrder' => ['name' => SORT_ASC]
            ]
        ]);

        $this->load($params);

        if (!$this->validate())
            return $dataProvider;

        $query->andFilterWhere(['id' => $this->id]);
        $query->andFilterWhere(['status' => $this->status]);
        $query->andFilterWhere(['like', 'name', $this->name]);

        return $dataProvider;
    }
}


text:
import cv2
import numpy as np
import argparse
from operator import xor
import skvideo.io               # pip3 install sk-video

def callback(value):
    pass

def setup_trackbars(range_filter):
    cv2.namedWindow("Trackbars", 0)

    for i in ["MIN", "MAX"]:
        v = 0 if i == "MIN" else 255

        for j in range_filter:
            cv2.createTrackbar("%s_%s" % (j, i), "Trackbars", v, 255, callback)

def get_arguments():
    ap = argparse.ArgumentParser()
    ap.add_argument('-f', '--filter', required=True,
                    help='Range filter. RGB or HSV')
    ap.add_argument('-i', '--image', required=False,
                    help='Path to the image')
    ap.add_argument('-w', '--webcam', required=False,
                    help='Use webcam', action='store_true')
    ap.add_argument('--video', help='Specify a video as input')
    ap.add_argument('-p', '--preview', required=False,
                    help='Show a preview of the image after applying the mask',
                    action='store_true')
    ap.add_argument('--scale', type=float, default=0.25)
    args = vars(ap.parse_args())

    #if not xor(bool(args['image']), bool(args['webcam'])):
    #    ap.error("Please specify only one image source")

    if not args['filter'].upper() in ['RGB', 'HSV', 'GGG']:
        ap.error("Please speciy a correct filter.")

    return args

def get_trackbar_values(range_filter):
    values = []

    for i in ["MIN", "MAX"]:
        for j in range_filter:
            v = cv2.getTrackbarPos("%s_%s" % (j, i), "Trackbars")
            values.append(v)

    return values

def main():
    args = get_arguments()

    range_filter = args['filter'].upper()

    if args['image']:
        image = cv2.imread(args['image'], flags=cv2.IMREAD_ANYCOLOR|cv2.IMREAD_ANYDEPTH|cv2.IMREAD_IGNORE_ORIENTATION)
        image = cv2.GaussianBlur(image, (5,5), 4)
        (h, w) = image.shape[:2]
        image = cv2.resize(image, (int(w*args['scale']), int(h*args['scale'])))

        if range_filter == 'RGB':
            frame_to_thresh = image.copy()
        elif range_filter == 'HSV':
            frame_to_thresh = cv2.cvtColor(image, cv2.COLOR_BGR2HSV)
            hue, sat, val = cv2.split(frame_to_thresh)
            hue = np.mod((hue.astype('float') + 90), 180).astype('uint8')
            frame_to_thresh = cv2.merge( (hue, sat, val) )
        else:
            g, b, r = cv2.split(image)
            gray = cv2.cvtColor(image, cv2.COLOR_BGR2GRAY)
            g[g==0] = 1                 # protect against divide by zero
            ratio = (r / g).astype('float') * 0.25
            # knock out the low end
            lum = gray.astype('float') / 255
            lumf = lum / 0.15
            lumf[lumf>1] = 1
            ratio *= lumf
            ratio[ratio>1] = 1
            index = (ratio*255).astype('uint8')
            frame_to_thresh = cv2.merge( (index, index, index) )

    elif args['video']:
        print("Opening ", args['video'])
        reader = skvideo.io.FFmpegReader(args['video'], inputdict={}, outputdict={})
    else:
        camera = cv2.VideoCapture(0)

    setup_trackbars(range_filter)

    while True:
        if args['video']:
            for image in reader.nextFrame():
                image = image[:,:,::-1]     # convert from RGB to BGR (to make opencv happy)

                #frame_to_thresh = cv2.cvtColor(image, cv2.COLOR_BGR2HSV)
                frame_to_thresh = image.copy()
                h, s, v = cv2.split(frame_to_thresh)
                cv2.imshow('hue', h)
                print(np.min(h), np.max(h), np.average(h))
                v1_min, v2_min, v3_min, v1_max, v2_max, v3_max = get_trackbar_values(range_filter)
                print( (v1_min, v2_min, v3_min), (v1_max, v2_max, v3_max) )
                thresh = cv2.inRange(frame_to_thresh, (v1_min, v2_min, v3_min), (v1_max, v2_max, v3_max))
                preview = cv2.bitwise_and(image, image, mask=thresh)
                cv2.imshow("Preview", preview)
                if cv2.waitKey(1) & 0xFF is ord('q'):
                    break
        elif args['webcam']:
            ret, image = camera.read()

            if not ret:
                break

            if range_filter == 'RGB':
                frame_to_thresh = image.copy()
            else:
                frame_to_thresh = cv2.cvtColor(image, cv2.COLOR_BGR2HSV)

        v1_min, v2_min, v3_min, v1_max, v2_max, v3_max = get_trackbar_values(range_filter)

        thresh = cv2.inRange(frame_to_thresh, (v1_min, v2_min, v3_min), (v1_max, v2_max, v3_max))

        if args['preview']:
            preview = cv2.bitwise_and(image, image, mask=thresh)
            cv2.imshow("Preview", preview)
        else:
            cv2.imshow("Original", image)
            cv2.imshow("Thresh", thresh)

        if cv2.waitKey(1) & 0xFF is ord('q'):
            break

if __name__ == '__main__':
    main()


text:
// HTMLParser Library $Name: v1_5 $ - A java-based parser for HTML
// http://sourceforge.org/projects/htmlparser
// Copyright (C) 2003 Somik Raha
//
// Revision Control Information
//
// $Source: /cvsroot/htmlparser/htmlparser/src/org/htmlparser/scanners/ScriptScanner.java,v $
// $Author: derrickoswald $
// $Date: 2005/03/12 17:53:10 $
// $Revision: 1.63 $
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
// Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public
// License along with this library; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
//

package org.htmlparser.scanners;

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

import org.htmlparser.Attribute;
import org.htmlparser.Node;
import org.htmlparser.Tag;
import org.htmlparser.lexer.Lexer;
import org.htmlparser.tags.ScriptTag;
import org.htmlparser.util.NodeList;
import org.htmlparser.util.ParserException;

/**
 * The ScriptScanner handles script CDATA.
 */
public class ScriptScanner
    extends
        CompositeTagScanner
{
    /**
     * Strict parsing of CDATA flag.
     * If this flag is set true, the parsing of script is performed without
     * regard to quotes. This means that erroneous script such as:
     *

     * document.write("</script&gt");
     *

     * will be parsed in strict accordance with appendix
     *
     * B.3.2 Specifying non-HTML data of the
     * HTML 4.01 Specification and
     * hence will be split into two or more nodes. Correct javascript would
     * escape the ETAGO:
     *

     * document.write("<\/script&gt");
     *

     * If true, CDATA parsing will stop at the first ETAGO ("</") no matter
     * whether it is quoted or not. If false, balanced quotes (either single or
     * double) will shield an ETAGO. Beacuse of the possibility of quotes within
     * single or multiline comments, these are also parsed. In most cases,
     * users prefer non-strict handling since there is so much broken script
     * out in the wild.
     */
    public static boolean STRICT = false;

    /**
     * Create a script scanner.
     */
    public ScriptScanner()
    {
    }

    /**
     * Scan for script.
     * Accumulates text from the page, until </[a-zA-Z] is encountered.
     * @param tag The tag this scanner is responsible for.
     * @param lexer The source of CDATA.
     * @param stack The parse stack, not used.
     */
    public Tag scan (Tag tag, Lexer lexer, NodeList stack)
        throws ParserException
    {
        String language;
        String code;
        Node content;
        int position;
        Node node;
        Attribute attribute;
        List vector;

        if (tag instanceof ScriptTag)
        {
            language = ((ScriptTag)tag).getLanguage ();
            if ((null != language) &&
                (language.equalsIgnoreCase ("JScript.Encode") ||
                 language.equalsIgnoreCase ("VBScript.Encode")))
            {
                code = ScriptDecoder.Decode (lexer.getPage (), lexer.getCursor ());
                ((ScriptTag)tag).setScriptCode (code);
            }
        }
        content = lexer.parseScriptCDATA(!STRICT);
        position = lexer.getPosition ();
        node = lexer.nextNode (false);
        if (null != node)
            if (!(node instanceof Tag) || !(   ((Tag)node).isEndTag ()
                && ((Tag)node).getTagName ().equals (tag.getIds ()[0])))
            {
                lexer.setPosition (position);
                node = null;
            }

        // build new end tag if required
        if (null == node)
        {
            attribute = new Attribute ("/script", null);
            vector = new ArrayList ();
            vector.add (attribute);
            node = lexer.getNodeFactory ().createTagNode (
                lexer.getPage (), position, position, vector);
        }
        tag.setEndTag ((Tag)node);
        if (null != content)
        {
            tag.setChildren (new NodeList (content));
            content.setParent (tag);
        }
        node.setParent (tag);
        tag.doSemanticAction ();

        return (tag);
    }
}


text:
A scalatra based OAuth2 server, with a default mongodb backend.
The default templates use twitter bootstrap, they are just meant to be customized.

```
git clone git://github.com/scalatra/oauth2-server.git
cd oauth2-server && rm -rf .git
git init
```

After running those commands you'll have a working oauth2 server

## Patches
Patches are gladly accepted from their original author. Along with any patches, please state that the patch is your original work and that you license the work to the *scalatra* project under the MIT License.

## License
MIT licensed. check the [LICENSE](https://github.com/mojolly/scalatra/blob/master/LICENSE) file


text:
namespace SmartConnect.Web.ViewModels.Common
{
    public class BasePageViewModel
    {
        public HeaderViewModel Header { get; set; }
    }
}


text:
package madgik.exareme.master.engine.executor.remote.operator.data;

import madgik.exareme.common.app.engine.AdpDBOperatorType;
import madgik.exareme.common.app.engine.AdpDBSelectOperator;
import madgik.exareme.common.schema.Select;
import madgik.exareme.common.schema.Table;
import madgik.exareme.master.engine.executor.remote.operator.ExecuteQueryState;
import madgik.exareme.utils.encoding.Base64Util;
import madgik.exareme.utils.file.FileReaderThread;
import madgik.exareme.utils.net.NetUtil;
import madgik.exareme.utils.properties.AdpDBProperties;
import madgik.exareme.worker.art.concreteOperator.AbstractMiMo;
import madgik.exareme.worker.art.container.adaptor.WriteAdaptorWrapper;
import org.apache.log4j.Logger;

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

/**
 * @author herald
 */
public class TableUnionReplicator extends AbstractMiMo {

    private static Logger log = Logger.getLogger(TableUnionReplicator.class);

    @Override public void run() throws Exception {
        log.trace("Parse DB Operator ...");
        AdpDBSelectOperator dbOp =
            Base64Util.decodeBase64(super.getParameterManager().getQueryString());

        String operatorName = super.getSessionManager().getOperatorName();
        log.debug("Operator Name : " + operatorName);
        dbOp.printStatistics(operatorName);

        log.trace("Create state ...");
        ExecuteQueryState state =
            new ExecuteQueryState(dbOp, getDiskManager(), getProcessManager(), false);

        log.debug("Read inputs ...");
        state.readInputs(super.getAdaptorManager());
        super.getAdaptorManager().closeAllInputs();

        log.debug("Execute query ...");
        Select q = state.getOperator().getQuery();
        q.clearQueryStatement();
        q.addQueryStatement(q.getQuery());
        state.executeSelect();

        ArrayList<FileReaderThread> fileReaders = new ArrayList<FileReaderThread>();
        for (String table : dbOp.getOutputTables()) {
            List<Integer> partitions = dbOp.getOutputPartitions(table);
            for (int part : partitions) {
                log.debug("Write partition: " + table + "/" + part);

                for (int out = 0; out < super.getAdaptorManager().getOutputCount(); out++) {
                    WriteAdaptorWrapper outStream =
                        super.getAdaptorManager().getWriteStreamAdaptor(out);

                    fileReaders.add(state.writeTable(table, part, outStream.getOutputStream()));
                }
            }
        }
        log.debug("Waiting the writing of the tables ... ");
        for (FileReaderThread reader : fileReaders) {
            if (reader != null) {
                reader.join();

                if (reader.getException() != null) {
                    throw new Exception("Cannot write tables ... ", reader.getException());
                }
            }
        }
        log.debug("Finished writing tables!");
        super.getAdaptorManager().closeAllOutputs();

        //if(AdpDBProperties.getAdpDBProps().getString("db.cache").equals("true")) {
        if(dbOp.useCache()){
            if (dbOp.getType() == AdpDBOperatorType.tableUnionReplicator) {
                Table outputTable = dbOp.getQuery().getOutputTable().getTable();
                state.getExitMessage().outTableInfo.setLocation(NetUtil.getIPv4());
                log.debug("Saving output table (" + outputTable.getName() + ") ..." + dbOp.getType());
                state.saveOutputTable();
            }
            log.debug(state.toString());
        }else {

            if (super.getAdaptorManager().getOutputCount() == 0) {
                log.debug("Save the non-temporary tables ...");
                Table outputTable = dbOp.getQuery().getOutputTable().getTable();
                if (outputTable.isTemp() == false) {
                    log.debug("Saving output table (" + outputTable.getName() + ") ...");
                    state.saveOutputTable();
                }
            } else {
                log.debug("Skip saving tables ... ");
            }
        }

        log.debug(state.toString());
        exit(0, state.getExitMessage());

//        if (super.getAdaptorManager().getOutputCount() == 0) {
//            log.debug("Save the non-temporary tables ...");
//            Table outputTable = dbOp.getQuery().getOutputTable().getTable();
//            if (outputTable.isTemp() == false) {
//                log.debug("Saving output table (" + outputTable.getName() + ") ...");
//                state.saveOutputTable();
//            }
//        } else {
//            log.debug("Skip saving tables ... ");
//        }
//        log.debug(state.toString());
//        exit(0, state.getExitMessage());
//     //           exit(0);
    }
}


text:
CaldasTurismo
=============

Sistema de Reservas Caldas Turismo


text:
'use strict';

const webpack = require('webpack');
const logger = require('../../server/lib/logger');
logger.info('Running development configuration...');

const WEBPACK_HOST = 'localhost';
const WEBPACK_PORT = 3000;

// Override base configuration.
const config = require('./config.base.js');
config.devtool = 'eval-source-map';
config.debug = true;
config.entry = [
  'webpack-dev-server/client?http://' + WEBPACK_HOST + ':' + WEBPACK_PORT,
  'webpack/hot/only-dev-server',
  config.entry.app
];
config.output.publicPath = 'http://localhost:3000' + config.output.publicPath;

// Stats configuration.
config.stats = {
  colors: true,
  reasons: true
};

// Development modules.
config.module.loaders.push({
  test: /\.css$/,
  loader: 'style-loader!css-loader!postcss-loader'
});

// Webpack plugins.
config.plugins = config.plugins.concat([
  new webpack.HotModuleReplacementPlugin()
]);

module.exports = config;


text:
extract:
	${tooldir}/ecore2bgf WfMC.ecore grammar.bgf

include ../../Makefile.grammar


text:
package uts.edu.service;

import javax.ejb.*;

import uts.edu.bean.Cart;

@TransactionManagement(TransactionManagementType.CONTAINER)
@Stateless(mappedName = "ejb/RemoveCartItem")
public class RemoveCartItem implements RemoveCartItemRemote,
		RemoveCartItemLocal
	{

		@Override
		@TransactionAttribute(TransactionAttributeType.REQUIRED)
		public void removeCartItem(String id, Cart cart)
			{
				cart.removeCartItem(id);
				cart.setTotalPrice();
			}
	}


text:
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
  <modelVersion>4.0.0</modelVersion>
  <groupId>ch.fhnw</groupId>
  <version>0.0.1-SNAPSHOT</version>
  <name>CantonApp</name>
  <dependencies>
  	<dependency>
  		<groupId>com.kenai.nbpwr</groupId>
  		<artifactId>org-jdesktop-animation-timing</artifactId>
  		<version>1.0-201002281504</version>
  		<classifier>tests</classifier>
  	</dependency>
  	<dependency>
  		<groupId>com.kenai.nbpwr</groupId>
  		<artifactId>org-jdesktop-swingx</artifactId>
  		<version>1.6-201002261215</version>
  		<type>nbm</type>
  	</dependency>
  	<dependency>
  		<groupId>com.kenai.nbpwr</groupId>
  		<artifactId>org-jdesktop-swingx-ws</artifactId>
  		<version>1.0-201002281504</version>
  		<type>nbm</type>
  	</dependency>
  	<dependency>
  		<groupId>org.jdesktop</groupId>
  		<artifactId>appframework</artifactId>
  		<version>1.0.3</version>
  	</dependency>
  	<dependency>
  		<groupId>com.jtattoo</groupId>
  		<artifactId>JTattoo</artifactId>
  		<version>1.6.10</version>
  	</dependency>
  	<dependency>
  		<groupId>org.swinglabs</groupId>
  		<artifactId>swing-layout</artifactId>
  		<version>1.0.3</version>
  	</dependency>
  	<dependency>
  		<groupId>org.swinglabs</groupId>
  		<artifactId>swing-worker</artifactId>
  		<version>1.1</version>
  	</dependency>
  	<dependency>
  		<groupId>com.miglayout</groupId>
  		<artifactId>miglayout</artifactId>
  		<version>3.7.4</version>
  	</dependency>
  	<dependency>
  		<groupId>com.miglayout</groupId>
  		<artifactId>miglayout-swing</artifactId>
  		<version>4.2</version>
  	</dependency>
  </dependencies>
  <artifactId>CantonApp</artifactId>
</project>


text:
URL_REPO="https://github.com/Shipmee/Shipmee.git"
ENV_NAME="Shipmee"

PATH_ROOT="/home/core/Shipmee_CID_Workspace"
REPO_PATH="$PATH_ROOT/repositories"
PASSWORD_PATH="$PATH_ROOT/generatedPasswords.log"

SHIPMEE_PRIV_CONFIG_PATH="/home/core/Shipmee_Priv_Config/deploy"

DOCKERS_LOGS_PATH="$PATH_ROOT/old_logs"

mkdir -p $PATH_ROOT

MYSQL_PROJECT_ROUTE="localhost"
MYSQL_ROOT_PASSWORD="$(date +%s | sha256sum | base64 | head -c 32)"

RANDOM_FOLDER_NAME="$(date +%s | sha256sum | base64 | head -c 4)"


text:
class Solution(object):
	def parse(self, on):
		hours = 0
		for i in on:
			if i < 4:
				hours += 2**i
		minutes = 0
		for i in on:
			if i >= 4:
				minutes += 2**(i-4)
		if hours > 11 or minutes > 59:
			return None
		return '%d:%02d' % (hours, minutes)

	def readBinaryWatch(self, num):
		"""
		:type num: int
		:rtype: List[str]
		"""
		from itertools import combinations
		ret = []
		for i in combinations(range(10), num):
			res = self.parse(i)
			if res is not None:
				ret.append(res)
		return ret

print Solution().readBinaryWatch(2)


text:
require 'test_helper'

require 'vacuum_cleaner/normalizer'
require 'vacuum_cleaner/normalizations'

class PrefixDoctorNormalizer < VacuumCleaner::Normalizer
  def normalize_value(value)
    "Dr. #{value}"
  end
end

class Person
  include VacuumCleaner::Normalizations

  attr_accessor :last_name, :first_name

  normalizes :last_name
  normalizes :first_name
end

class Doctor
  include VacuumCleaner::Normalizations
  attr_accessor :name

  class GirlifyNormalizer < VacuumCleaner::Normalizer
    def normalize_value(value)
      value == "J.D." ? "Maria" : value
    end
  end

  normalizes :name, :girlify => true
end

class VacuumCleaner::NormalizationsTest < Test::Unit::TestCase
  context "VacuumCleaner::Normalizations" do
    context "ClassMethods#normalizes" do
      should "throw ArgumentError if no attributes are passed in" do
        assert_raise ArgumentError do
          klass = Class.new { include VacuumCleaner::Normalizations; normalizes }
        end
      end

      should "throw ArgumentError if invalid/unknown normalizer is used" do
        assert_raise ArgumentError do
          klass = Class.new { include VacuumCleaner::Normalizations; normalizes(:name, :foobar_unkown_normalizer => true) }
        end
      end

      should "take a symbol as argument" do
        assert_respond_to Class.new { include VacuumCleaner::Normalizations; normalizes(:name) }, :normalizes
      end

      should "take multiple symbols as argument" do
        klass = Class.new { include VacuumCleaner::Normalizations; normalizes(:name, :first_name) }
        assert_respond_to klass, :normalizes
      end

      should "create a setter for supplied attribute" do
        obj = Class.new { include VacuumCleaner::Normalizations; normalizes(:name) }.new
        assert_respond_to obj, :name=
        assert_respond_to obj, :normalize_name
      end

      should "set the instance variable using the setter" do
        obj = Class.new { include VacuumCleaner::Normalizations; attr_reader :name; normalizes(:name) }.new
        obj.name = "J.D."
        assert_equal "J.D.", obj.name
      end

      should "alias method to <attr>_without_normalization= if <attr>= already defined" do
        klass = Class.new do
          include VacuumCleaner::Normalizations
          attr_reader :name, :foo
          def name=(name); @foo = name end
          normalizes :name
        end
        obj = klass.new
        obj.name = "Elliot Reid"
        assert_respond_to obj, :name_without_normalization=
        assert_equal "Elliot Reid", obj.foo
        assert_nil obj.name
      end

      should "convert any blank input, like empty string, nil etc. to => <nil>" do
        obj = Person.new
        obj.first_name = " "
        obj.last_name = ''
        assert_nil obj.first_name
        assert_nil obj.last_name
      end

      should "strip leading and trailing white-space" do
        obj = Person.new
        obj.first_name = "\nElliot\t "
        obj.last_name = nil
        assert_nil obj.last_name
        assert_equal "Elliot", obj.first_name
      end

      should "accept a block which overrides the default to_nil_if_empty strategy" do
        klass = Class.new do
          include VacuumCleaner::Normalizations
          attr_accessor :name
          normalizes :name do |value|
            value ? value.upcase : value
          end
        end
        obj = klass.new
        obj.name = "Turk"
        assert_equal "TURK", obj.name
      end

      should "accept custom options hash to define other normalizers to run" do
        klass = Class.new do
          include VacuumCleaner::Normalizations
          attr_accessor :email
          normalizes :email, :downcase => true
        end
        obj = klass.new
        obj.email = "\nJ.D.Dorian@Sacred-Heart.com "
        assert_equal "j.d.dorian@sacred-heart.com", obj.email
      end

      should "raise ArgumentError if invalid/unknown normalizer is called" do
        assert_raise ArgumentError do
          Class.new do
            include VacuumCleaner::Normalizations
            normalizes :foo, :invalid_unknown_normalizer => true
          end
        end
      end

      should "ignore default split/empty? normalizer if :default => false" do
        klass = Class.new do
          include VacuumCleaner::Normalizations
          attr_accessor :name
          normalizes :name, :default => false, :upcase => true
        end
        obj = klass.new
        obj.name = "Dr. Dorian\n\t"
        assert_equal "DR. DORIAN\n\t", obj.name
      end

      should "be able to use normalizers from the global namespace" do
        klass = Class.new do
          include VacuumCleaner::Normalizations
          attr_accessor :name
          normalizes :name, :prefix_doctor => true
        end
        obj = klass.new
        obj.name = "Elliot Reid"
        assert_equal "Dr. Elliot Reid", obj.name
      end

      should "be able to use normalizers from within the class itself" do
        obj = Doctor.new
        obj.name = "Elliot Reid"
        assert_equal "Elliot Reid", obj.name
        obj = Doctor.new
        obj.name = "J.D."
        assert_equal "Maria", obj.name
      end

      should "be able to combine normalizers and custom blocks" do
        klass = Class.new do
          include VacuumCleaner::Normalizations
          attr_accessor :name, :first_name
          normalizes(:name, :first_name, :downcase => true) do |value|
            value.nil? ? value : "#{value.to_s[0,1].upcase}#{value.to_s[1..-1]}"
          end
        end

        obj = klass.new
        obj.name = "REID"
        obj.first_name = "ELLIOT"
        assert_equal "Reid", obj.name
        assert_equal "Elliot", obj.first_name
      end

      should "provide block with all values if asking for them!" do
        klass = Class.new do
          include VacuumCleaner::Normalizations
          attr_accessor :name
          normalizes(:name) do |object, attribute, value|
            [object.object_id, attribute, value]
          end
        end

        obj = klass.new
        obj.name = "Carla"
        assert_equal [obj.object_id, :name, "Carla"], obj.name
      end
    end

    context "ClassMethods#normalized_attributes" do
      should "keep an array with all normalized attributes" do
        assert_equal [:name], Doctor.normalized_attributes
        assert_equal [:last_name, :first_name], Person.normalized_attributes
      end

      should "guard against calling `normalizes` twice for an attribute, to avoid stack level too deep error!" do
        klass = Class.new(Doctor) do
          attr_accessor :coolness
          normalizes :coolness, :downcase => true
        end

        assert_equal [:name, :coolness], klass.normalized_attributes
        assert_equal [:name], Doctor.normalized_attributes

        klass.send(:normalizes, :coolness, :upcase => true) # should be ignored!
        assert_equal [:name, :coolness], klass.normalized_attributes

        obj = klass.new
        assert_nothing_raised do
          obj.coolness = "AWESOME"
        end
        assert_equal "awesome", obj.coolness
      end
    end
  end
end


text:
package wroblicky.andrew.euterpe.songs;

import java.sql.Connection;
import java.sql.ResultSet;
import java.sql.Statement;
import java.util.HashSet;
import java.util.Set;

import wroblicky.andrew.euterpe.artists.Artist;
import wroblicky.andrew.euterpe.dao.SqliteDAOFactory;
import wroblicky.andrew.euterpe.parser.SongIdentificationKey;

public class SongDAOImpl implements SongDAO {

	public void createSongTable() {
		Statement stmt = null;
		try (Connection connection = SqliteDAOFactory.createConnection()) {

			stmt = connection.createStatement();
			String sql = "CREATE TABLE songs "
					+ "(ID INTEGER PRIMARY KEY AUTOINCREMENT,"
					+ " NAME           TEXT    NOT NULL,"
					+ " ARTIST_ID      INTEGER     NOT NULL,"
					+ " DATE_ADDED     TIMESTAMP,"
					+ " FOREIGN KEY(ARTIST_ID) REFERENCES ARTISTS(ID))";
			stmt.executeUpdate(sql);
			stmt.close();
		} catch (Exception e) {
			e.printStackTrace();
			System.err.println(e.getClass().getName() + ": " + e.getMessage());
			System.exit(0);
		}
		System.out.println("Songs table created successfully");

	}

	@Override
	public void insertSong(Song song) {
		Statement stmt = null;
		try (Connection connection = SqliteDAOFactory.createConnection()) {
			stmt = connection.createStatement();
			String sql = "INSERT INTO SONGS (NAME,ARTIST_ID,DATE_ADDED) "
					+ "VALUES ('" + song.getName() + "',"
					+ song.getArtist().getID() + "," + song.getDateAdded()
					+ ");";
			stmt.executeUpdate(sql);

			stmt.close();
			connection.commit();
		} catch (Exception e) {
			System.err.println(e.getClass().getName() + ": " + e.getMessage());
			System.exit(0);
		}
		System.out.println("Song record created successfully");
	}

	@Override
	public Set<Song> getSongs() {
	    Statement stmt = null;
	    Set<Song> songs = new HashSet<>();
	    try (Connection connection = SqliteDAOFactory.createConnection()) {
	      stmt = connection.createStatement();
	      ResultSet rs = stmt.executeQuery( "SELECT * FROM SONGS JOIN ARTISTS WHERE songs.artist_id = artists.id ;" );

	      while ( rs.next() ) {
	         int id = rs.getInt("id");
	         String songName = rs.getString("songs.name");
	         int artistId = rs.getInt("artists.id");
	         String artistName  = rs.getString("artists.name");
	         Artist artist = new Artist(artistId, artistName);
	         Long dateAdded = rs.getLong("date_added");
	         songs.add(new Song(id, songName, artist, dateAdded));
	      }
	      rs.close();
	      stmt.close();
	    } catch (Exception e) {
	      System.err.println( e.getClass().getName() + ": " + e.getMessage() );
	      System.exit(0);
	    }
	    System.out.println("Operation done successfully");
	    return songs;
	}

	@Override
	public Song getSong(Artist artist, String name) {
		return null;
	}

	@Override
	public Song getSong(String id) {
		return null;
	}

	@Override
	public void dropSongs() {
		Statement stmt = null;
		try (Connection connection = SqliteDAOFactory.createConnection()) {
			stmt = connection.createStatement();
			String sql = "DROP TABLE IF EXISTS songs; ";
			stmt.executeUpdate(sql);
			stmt.close();
			connection.close();
		} catch (Exception e) {
			System.err.println(e.getClass().getName() + ": " + e.getMessage());
			System.exit(0);
		}
		System.out.println("Song table dropped successfully");
	}

	@Override
	public Song getSong(SongIdentificationKey key) {
		// TODO Auto-generated method stub
		return null;
	}

}