text:
<?php

/* :enseignantsViews:addEnseignant.html.twig */
class __TwigTemplate_216a09af1716b9036932bc47f809d14ce194d93dd92dc74aa5c32f642e03b2ab extends Twig_Template
{
    public function __construct(Twig_Environment $env)
    {
        parent::__construct($env);

        // line 1
        $this->parent = $this->loadTemplate("base.html.twig", ":enseignantsViews:addEnseignant.html.twig", 1);
        $this->blocks = array(
            'body' => array($this, 'block_body'),
        );
    }

    protected function doGetParent(array $context)
    {
        return "base.html.twig";
    }

    protected function doDisplay(array $context, array $blocks = array())
    {
        $__internal_f937205a31e905e3489e308b8a4d169bb991a409d40fbd77e609591271256fee = $this->env->getExtension("Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension");
        $__internal_f937205a31e905e3489e308b8a4d169bb991a409d40fbd77e609591271256fee->enter($__internal_f937205a31e905e3489e308b8a4d169bb991a409d40fbd77e609591271256fee_prof = new Twig_Profiler_Profile($this->getTemplateName(), "template", ":enseignantsViews:addEnseignant.html.twig"));

        $__internal_c8468e43b589aad91df3d9f7f0f6a62515a6ab8dd531e38a3b4ae36f729854bc = $this->env->getExtension("Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension");
        $__internal_c8468e43b589aad91df3d9f7f0f6a62515a6ab8dd531e38a3b4ae36f729854bc->enter($__internal_c8468e43b589aad91df3d9f7f0f6a62515a6ab8dd531e38a3b4ae36f729854bc_prof = new Twig_Profiler_Profile($this->getTemplateName(), "template", ":enseignantsViews:addEnseignant.html.twig"));

        $this->parent->display($context, array_merge($this->blocks, $blocks));

        $__internal_f937205a31e905e3489e308b8a4d169bb991a409d40fbd77e609591271256fee->leave($__internal_f937205a31e905e3489e308b8a4d169bb991a409d40fbd77e609591271256fee_prof);

        $__internal_c8468e43b589aad91df3d9f7f0f6a62515a6ab8dd531e38a3b4ae36f729854bc->leave($__internal_c8468e43b589aad91df3d9f7f0f6a62515a6ab8dd531e38a3b4ae36f729854bc_prof);

    }

    // line 3
    public function block_body($context, array $blocks = array())
    {
        $__internal_f87a3e0b227f1de9af63ccc57c36714f041910f824de2fd36233dc15239042d9 = $this->env->getExtension("Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension");
        $__internal_f87a3e0b227f1de9af63ccc57c36714f041910f824de2fd36233dc15239042d9->enter($__internal_f87a3e0b227f1de9af63ccc57c36714f041910f824de2fd36233dc15239042d9_prof = new Twig_Profiler_Profile($this->getTemplateName(), "block", "body"));

        $__internal_330269f81b0547a33a1fc00e0009663a1755214f4488b0dd36d6afce9bf5799a = $this->env->getExtension("Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension");
        $__internal_330269f81b0547a33a1fc00e0009663a1755214f4488b0dd36d6afce9bf5799a->enter($__internal_330269f81b0547a33a1fc00e0009663a1755214f4488b0dd36d6afce9bf5799a_prof = new Twig_Profiler_Profile($this->getTemplateName(), "block", "body"));

        // line 4
        echo "

";
        // line 5
        if ((isset($context["edit"]) ? $context["edit"] : $this->getContext($context, "edit"))) {
            echo twig_escape_filter($this->env, $this->env->getExtension('Symfony\Bridge\Twig\Extension\TranslationExtension')->trans("edit"), "html", null, true);
        } else {
            echo twig_escape_filter($this->env, $this->env->getExtension('Symfony\Bridge\Twig\Extension\TranslationExtension')->trans("add"), "html", null, true);
        }
        echo " ";
        echo twig_escape_filter($this->env, $this->env->getExtension('Symfony\Bridge\Twig\Extension\TranslationExtension')->trans("teacher"), "html", null, true);
        echo "

\t";
        // line 7
        echo         $this->env->getRuntime('Symfony\Bridge\Twig\Form\TwigRenderer')->renderBlock((isset($context["form"]) ? $context["form"] : $this->getContext($context, "form")), 'form_start');
        echo "
\t\t

\t\t\t";
        // line 9
        echo $this->env->getRuntime('Symfony\Bridge\Twig\Form\TwigRenderer')->searchAndRenderBlock($this->getAttribute((isset($context["form"]) ? $context["form"] : $this->getContext($context, "form")), "photo", array()), 'label');
        echo "
\t\t    ";
        // line 10
        echo $this->env->getRuntime('Symfony\Bridge\Twig\Form\TwigRenderer')->searchAndRenderBlock($this->getAttribute((isset($context["form"]) ? $context["form"] : $this->getContext($context, "form")), "photo", array()), 'widget', array("attr" => array("class" => "form-control")));
        echo "
\t\t    ";
        // line 11
        echo $this->env->getRuntime('Symfony\Bridge\Twig\Form\TwigRenderer')->searchAndRenderBlock($this->getAttribute((isset($context["form"]) ? $context["form"] : $this->getContext($context, "form")), "photo", array()), 'errors');
        echo "
\t\t

\t\t

\t\t\t";
        // line 14
        echo $this->env->getRuntime('Symfony\Bridge\Twig\Form\TwigRenderer')->searchAndRenderBlock($this->getAttribute((isset($context["form"]) ? $context["form"] : $this->getContext($context, "form")), "nom", array()), 'label');
        echo "
\t\t    ";
        // line 15
        echo $this->env->getRuntime('Symfony\Bridge\Twig\Form\TwigRenderer')->searchAndRenderBlock($this->getAttribute((isset($context["form"]) ? $context["form"] : $this->getContext($context, "form")), "nom", array()), 'widget', array("attr" => array("class" => "form-control")));
        echo "
\t\t    ";
        // line 16
        echo $this->env->getRuntime('Symfony\Bridge\Twig\Form\TwigRenderer')->searchAndRenderBlock($this->getAttribute((isset($context["form"]) ? $context["form"] : $this->getContext($context, "form")), "nom", array()), 'errors');
        echo "
\t\t

\t\t

\t\t\t";
        // line 19
        echo $this->env->getRuntime('Symfony\Bridge\Twig\Form\TwigRenderer')->searchAndRenderBlock($this->getAttribute((isset($context["form"]) ? $context["form"] : $this->getContext($context, "form")), "prenom", array()), 'label');
        echo "
\t\t    ";
        // line 20
        echo $this->env->getRuntime('Symfony\Bridge\Twig\Form\TwigRenderer')->searchAndRenderBlock($this->getAttribute((isset($context["form"]) ? $context["form"] : $this->getContext($context, "form")), "prenom", array()), 'widget', array("attr" => array("class" => "form-control")));
        echo "
\t\t    ";
        // line 21
        echo $this->env->getRuntime('Symfony\Bridge\Twig\Form\TwigRenderer')->searchAndRenderBlock($this->getAttribute((isset($context["form"]) ? $context["form"] : $this->getContext($context, "form")), "prenom", array()), 'errors');
        echo "
\t\t

\t\t

\t\t\t";
        // line 24
        echo $this->env->getRuntime('Symfony\Bridge\Twig\Form\TwigRenderer')->searchAndRenderBlock($this->getAttribute((isset($context["form"]) ? $context["form"] : $this->getContext($context, "form")), "genre", array()), 'label');
        echo "
\t\t    ";
        // line 25
        echo $this->env->getRuntime('Symfony\Bridge\Twig\Form\TwigRenderer')->searchAndRenderBlock($this->getAttribute((isset($context["form"]) ? $context["form"] : $this->getContext($context, "form")), "genre", array()), 'widget', array("attr" => array("class" => "form-control")));
        echo "
\t\t    ";
        // line 26
        echo $this->env->getRuntime('Symfony\Bridge\Twig\Form\TwigRenderer')->searchAndRenderBlock($this->getAttribute((isset($context["form"]) ? $context["form"] : $this->getContext($context, "form")), "genre", array()), 'errors');
        echo "
\t\t

\t\t

\t\t\t";
        // line 29
        echo $this->env->getRuntime('Symfony\Bridge\Twig\Form\TwigRenderer')->searchAndRenderBlock($this->getAttribute((isset($context["form"]) ? $context["form"] : $this->getContext($context, "form")), "dateDeNaissance", array()), 'label');
        echo "
\t\t    ";
        // line 30
        echo $this->env->getRuntime('Symfony\Bridge\Twig\Form\TwigRenderer')->searchAndRenderBlock($this->getAttribute((isset($context["form"]) ? $context["form"] : $this->getContext($context, "form")), "dateDeNaissance", array()), 'widget', array("attr" => array("class" => "form-control")));
        echo "
\t\t    ";
        // line 31
        echo $this->env->getRuntime('Symfony\Bridge\Twig\Form\TwigRenderer')->searchAndRenderBlock($this->getAttribute((isset($context["form"]) ? $context["form"] : $this->getContext($context, "form")), "dateDeNaissance", array()), 'errors');
        echo "
\t\t

\t\t

\t\t\t";
        // line 34
        echo $this->env->getRuntime('Symfony\Bridge\Twig\Form\TwigRenderer')->searchAndRenderBlock($this->getAttribute((isset($context["form"]) ? $context["form"] : $this->getContext($context, "form")), "lieuDeNaissance", array()), 'label');
        echo "
\t\t    ";
        // line 35
        echo $this->env->getRuntime('Symfony\Bridge\Twig\Form\TwigRenderer')->searchAndRenderBlock($this->getAttribute((isset($context["form"]) ? $context["form"] : $this->getContext($context, "form")), "lieuDeNaissance", array()), 'widget', array("attr" => array("class" => "form-control")));
        echo "
\t\t    ";
        // line 36
        echo $this->env->getRuntime('Symfony\Bridge\Twig\Form\TwigRenderer')->searchAndRenderBlock($this->getAttribute((isset($context["form"]) ? $context["form"] : $this->getContext($context, "form")), "lieuDeNaissance", array()), 'errors');
        echo "
\t\t

\t\t

\t\t\t";
        // line 39
        echo $this->env->getRuntime('Symfony\Bridge\Twig\Form\TwigRenderer')->searchAndRenderBlock($this->getAttribute((isset($context["form"]) ? $context["form"] : $this->getContext($context, "form")), "dateDEntree", array()), 'label');
        echo "
\t\t    ";
        // line 40
        echo $this->env->getRuntime('Symfony\Bridge\Twig\Form\TwigRenderer')->searchAndRenderBlock($this->getAttribute((isset($context["form"]) ? $context["form"] : $this->getContext($context, "form")), "dateDEntree", array()), 'widget', array("attr" => array("class" => "form-control")));
        echo "
\t\t    ";
        // line 41
        echo $this->env->getRuntime('Symfony\Bridge\Twig\Form\TwigRenderer')->searchAndRenderBlock($this->getAttribute((isset($context["form"]) ? $context["form"] : $this->getContext($context, "form")), "dateDEntree", array()), 'errors');
        echo "
\t\t

\t\t

\t\t\t";
        // line 44
        echo $this->env->getRuntime('Symfony\Bridge\Twig\Form\TwigRenderer')->searchAndRenderBlock($this->getAttribute((isset($context["form"]) ? $context["form"] : $this->getContext($context, "form")), "cIN", array()), 'label');
        echo "
\t\t    ";
        // line 45
        echo $this->env->getRuntime('Symfony\Bridge\Twig\Form\TwigRenderer')->searchAndRenderBlock($this->getAttribute((isset($context["form"]) ? $context["form"] : $this->getContext($context, "form")), "cIN", array()), 'widget', array("attr" => array("class" => "form-control")));
        echo "
\t\t    ";
        // line 46
        echo $this->env->getRuntime('Symfony\Bridge\Twig\Form\TwigRenderer')->searchAndRenderBlock($this->getAttribute((isset($context["form"]) ? $context["form"] : $this->getContext($context, "form")), "cIN", array()), 'errors');
        echo "
\t\t

\t\t

\t\t\t";
        // line 49
        echo $this->env->getRuntime('Symfony\Bridge\Twig\Form\TwigRenderer')->searchAndRenderBlock($this->getAttribute((isset($context["form"]) ? $context["form"] : $this->getContext($context, "form")), "adresse", array()), 'label');
        echo "
\t\t    ";
        // line 50
        echo $this->env->getRuntime('Symfony\Bridge\Twig\Form\TwigRenderer')->searchAndRenderBlock($this->getAttribute((isset($context["form"]) ? $context["form"] : $this->getContext($context, "form")), "adresse", array()), 'widget', array("attr" => array("class" => "form-control")));
        echo "
\t\t    ";
        // line 51
        echo $this->env->getRuntime('Symfony\Bridge\Twig\Form\TwigRenderer')->searchAndRenderBlock($this->getAttribute((isset($context["form"]) ? $context["form"] : $this->getContext($context, "form")), "adresse", array()), 'errors');
        echo "
\t\t

\t\t

\t\t\t";
        // line 54
        echo $this->env->getRuntime('Symfony\Bridge\Twig\Form\TwigRenderer')->searchAndRenderBlock($this->getAttribute((isset($context["form"]) ? $context["form"] : $this->getContext($context, "form")), "codePostal", array()), 'label');
        echo "
\t\t    ";
        // line 55
        echo $this->env->getRuntime('Symfony\Bridge\Twig\Form\TwigRenderer')->searchAndRenderBlock($this->getAttribute((isset($context["form"]) ? $context["form"] : $this->getContext($context, "form")), "codePostal", array()), 'widget', array("attr" => array("class" => "form-control")));
        echo "
\t\t    ";
        // line 56
        echo $this->env->getRuntime('Symfony\Bridge\Twig\Form\TwigRenderer')->searchAndRenderBlock($this->getAttribute((isset($context["form"]) ? $context["form"] : $this->getContext($context, "form")), "codePostal", array()), 'errors');
        echo "
\t\t

\t\t

\t\t\t";
        // line 59
        echo $this->env->getRuntime('Symfony\Bridge\Twig\Form\TwigRenderer')->searchAndRenderBlock($this->getAttribute((isset($context["form"]) ? $context["form"] : $this->getContext($context, "form")), "telephone", array()), 'label');
        echo "
\t\t    ";
        // line 60
        echo $this->env->getRuntime('Symfony\Bridge\Twig\Form\TwigRenderer')->searchAndRenderBlock($this->getAttribute((isset($context["form"]) ? $context["form"] : $this->getContext($context, "form")), "telephone", array()), 'widget', array("attr" => array("class" => "form-control")));
        echo "
\t\t    ";
        // line 61
        echo $this->env->getRuntime('Symfony\Bridge\Twig\Form\TwigRenderer')->searchAndRenderBlock($this->getAttribute((isset($context["form"]) ? $context["form"] : $this->getContext($context, "form")), "telephone", array()), 'errors');
        echo "
\t\t

\t\t

\t\t\t";
        // line 64
        echo $this->env->getRuntime('Symfony\Bridge\Twig\Form\TwigRenderer')->searchAndRenderBlock($this->getAttribute((isset($context["form"]) ? $context["form"] : $this->getContext($context, "form")), "commentaire", array()), 'label');
        echo "
\t\t    ";
        // line 65
        echo $this->env->getRuntime('Symfony\Bridge\Twig\Form\TwigRenderer')->searchAndRenderBlock($this->getAttribute((isset($context["form"]) ? $context["form"] : $this->getContext($context, "form")), "commentaire", array()), 'widget', array("attr" => array("class" => "form-control")));
        echo "
\t\t    ";
        // line 66
        echo $this->env->getRuntime('Symfony\Bridge\Twig\Form\TwigRenderer')->searchAndRenderBlock($this->getAttribute((isset($context["form"]) ? $context["form"] : $this->getContext($context, "form")), "commentaire", array()), 'errors');
        echo "
\t\t

\t\t

\t\t\t";
        // line 69
        echo $this->env->getRuntime('Symfony\Bridge\Twig\Form\TwigRenderer')->searchAndRenderBlock($this->getAttribute((isset($context["form"]) ? $context["form"] : $this->getContext($context, "form")), "typeContrat", array()), 'label');
        echo "
\t\t    ";
        // line 70
        echo $this->env->getRuntime('Symfony\Bridge\Twig\Form\TwigRenderer')->searchAndRenderBlock($this->getAttribute((isset($context["form"]) ? $context["form"] : $this->getContext($context, "form")), "typeContrat", array()), 'widget', array("attr" => array("class" => "form-control")));
        echo "
\t\t    ";
        // line 71
        echo $this->env->getRuntime('Symfony\Bridge\Twig\Form\TwigRenderer')->searchAndRenderBlock($this->getAttribute((isset($context["form"]) ? $context["form"] : $this->getContext($context, "form")), "typeContrat", array()), 'errors');
        echo "
\t\t

\t\t

\t\t\t";
        // line 74
        echo $this->env->getRuntime('Symfony\Bridge\Twig\Form\TwigRenderer')->searchAndRenderBlock($this->getAttribute((isset($context["form"]) ? $context["form"] : $this->getContext($context, "form")), "email", array()), 'label');
        echo "
\t\t    ";
        // line 75
        echo $this->env->getRuntime('Symfony\Bridge\Twig\Form\TwigRenderer')->searchAndRenderBlock($this->getAttribute((isset($context["form"]) ? $context["form"] : $this->getContext($context, "form")), "email", array()), 'widget', array("attr" => array("class" => "form-control")));
        echo "
\t\t    ";
        // line 76
        echo $this->env->getRuntime('Symfony\Bridge\Twig\Form\TwigRenderer')->searchAndRenderBlock($this->getAttribute((isset($context["form"]) ? $context["form"] : $this->getContext($context, "form")), "email", array()), 'errors');
        echo "
\t\t

\t\t

\t\t\t";
        // line 79
        echo $this->env->getRuntime('Symfony\Bridge\Twig\Form\TwigRenderer')->searchAndRenderBlock($this->getAttribute((isset($context["form"]) ? $context["form"] : $this->getContext($context, "form")), "username", array()), 'label');
        echo "
\t\t    ";
        // line 80
        echo $this->env->getRuntime('Symfony\Bridge\Twig\Form\TwigRenderer')->searchAndRenderBlock($this->getAttribute((isset($context["form"]) ? $context["form"] : $this->getContext($context, "form")), "username", array()), 'widget', array("attr" => array("class" => "form-control")));
        echo "
\t\t    ";
        // line 81
        echo $this->env->getRuntime('Symfony\Bridge\Twig\Form\TwigRenderer')->searchAndRenderBlock($this->getAttribute((isset($context["form"]) ? $context["form"] : $this->getContext($context, "form")), "username", array()), 'errors');
        echo "
\t\t

\t";
        // line 83
        if (((isset($context["edit"]) ? $context["edit"] : $this->getContext($context, "edit")) == false)) {
            // line 84
            echo "\t\t

\t\t\t";
            // line 85
            echo $this->env->getRuntime('Symfony\Bridge\Twig\Form\TwigRenderer')->searchAndRenderBlock($this->getAttribute($this->getAttribute((isset($context["form"]) ? $context["form"] : $this->getContext($context, "form")), "plainPassword", array()), "first", array()), 'label');
            echo "
\t\t    ";
            // line 86
            echo $this->env->getRuntime('Symfony\Bridge\Twig\Form\TwigRenderer')->searchAndRenderBlock($this->getAttribute($this->getAttribute((isset($context["form"]) ? $context["form"] : $this->getContext($context, "form")), "plainPassword", array()), "first", array()), 'widget', array("attr" => array("class" => "form-control")));
            echo "
\t\t    ";
            // line 87
            echo $this->env->getRuntime('Symfony\Bridge\Twig\Form\TwigRenderer')->searchAndRenderBlock($this->getAttribute($this->getAttribute((isset($context["form"]) ? $context["form"] : $this->getContext($context, "form")), "plainPassword", array()), "first", array()), 'errors');
            echo "
\t\t

\t\t

\t\t\t";
            // line 90
            echo $this->env->getRuntime('Symfony\Bridge\Twig\Form\TwigRenderer')->searchAndRenderBlock($this->getAttribute($this->getAttribute((isset($context["form"]) ? $context["form"] : $this->getContext($context, "form")), "plainPassword", array()), "second", array()), 'label');
            echo "
\t\t    ";
            // line 91
            echo $this->env->getRuntime('Symfony\Bridge\Twig\Form\TwigRenderer')->searchAndRenderBlock($this->getAttribute($this->getAttribute((isset($context["form"]) ? $context["form"] : $this->getContext($context, "form")), "plainPassword", array()), "second", array()), 'widget', array("attr" => array("class" => "form-control")));
            echo "
\t\t    ";
            // line 92
            echo $this->env->getRuntime('Symfony\Bridge\Twig\Form\TwigRenderer')->searchAndRenderBlock($this->getAttribute($this->getAttribute((isset($context["form"]) ? $context["form"] : $this->getContext($context, "form")), "plainPassword", array()), "second", array()), 'errors');
            echo "
\t\t

\t";
        } else {
            // line 95
            echo "\t";
            $this->getAttribute($this->getAttribute((isset($context["form"]) ? $context["form"] : $this->getContext($context, "form")), "plainPassword", array()), "setRendered", array());
            // line 96
            echo "\t";
        }
        echo "\t
\t\t<button type=\"submit\">Valider</button>
\t";
        // line 98
        echo         $this->env->getRuntime('Symfony\Bridge\Twig\Form\TwigRenderer')->renderBlock((isset($context["form"]) ? $context["form"] : $this->getContext($context, "form")), 'form_end');
        echo "

";

        $__internal_330269f81b0547a33a1fc00e0009663a1755214f4488b0dd36d6afce9bf5799a->leave($__internal_330269f81b0547a33a1fc00e0009663a1755214f4488b0dd36d6afce9bf5799a_prof);

        $__internal_f87a3e0b227f1de9af63ccc57c36714f041910f824de2fd36233dc15239042d9->leave($__internal_f87a3e0b227f1de9af63ccc57c36714f041910f824de2fd36233dc15239042d9_prof);

    }

    public function getTemplateName()
    {
        return ":enseignantsViews:addEnseignant.html.twig";
    }

    public function isTraitable()
    {
        return false;
    }

    public function getDebugInfo()
    {
        return array (  319 => 98,  313 => 96,  310 => 95,  304 => 92,  300 => 91,  296 => 90,  290 => 87,  286 => 86,  282 => 85,  279 => 84,  277 => 83,  272 => 81,  268 => 80,  264 => 79,  258 => 76,  254 => 75,  250 => 74,  244 => 71,  240 => 70,  236 => 69,  230 => 66,  226 => 65,  222 => 64,  216 => 61,  212 => 60,  208 => 59,  202 => 56,  198 => 55,  194 => 54,  188 => 51,  184 => 50,  180 => 49,  174 => 46,  170 => 45,  166 => 44,  160 => 41,  156 => 40,  152 => 39,  146 => 36,  142 => 35,  138 => 34,  132 => 31,  128 => 30,  124 => 29,  118 => 26,  114 => 25,  110 => 24,  104 => 21,  100 => 20,  96 => 19,  90 => 16,  86 => 15,  82 => 14,  76 => 11,  72 => 10,  68 => 9,  63 => 7,  52 => 5,  49 => 4,  40 => 3,  11 => 1,);
    }

    /** @deprecated since 1.27 (to be removed in 2.0). Use getSourceContext() instead */
    public function getSource()
    {
        @trigger_error('The '.__METHOD__.' method is deprecated since version 1.27 and will be removed in 2.0. Use getSourceContext() instead.', E_USER_DEPRECATED);

        return $this->getSourceContext()->getCode();
    }

    public function getSourceContext()
    {
        return new Twig_Source("{% extends 'base.html.twig' %}

{% block body %}

{% if edit %}{{'edit'|trans}}{% else %}{{'add'|trans}}{% endif %} {{'teacher'|trans}}

\t{{ form_start(form) }}
\t\t

\t\t\t{{ form_label(form.photo) }}
\t\t    {{ form_widget(form.photo ,{ 'attr': {'class': 'form-control'} }) }}
\t\t    {{ form_errors(form.photo) }}
\t\t

\t\t

\t\t\t{{ form_label(form.nom) }}
\t\t    {{ form_widget(form.nom ,{ 'attr': {'class': 'form-control'} }) }}
\t\t    {{ form_errors(form.nom) }}
\t\t

\t\t

\t\t\t{{ form_label(form.prenom) }}
\t\t    {{ form_widget(form.prenom ,{ 'attr': {'class': 'form-control'} }) }}
\t\t    {{ form_errors(form.prenom) }}
\t\t

\t\t

\t\t\t{{ form_label(form.genre) }}
\t\t    {{ form_widget(form.genre ,{ 'attr': {'class': 'form-control'} }) }}
\t\t    {{ form_errors(form.genre) }}
\t\t

\t\t

\t\t\t{{ form_label(form.dateDeNaissance) }}
\t\t    {{ form_widget(form.dateDeNaissance ,{ 'attr': {'class': 'form-control'} }) }}
\t\t    {{ form_errors(form.dateDeNaissance) }}
\t\t

\t\t

\t\t\t{{ form_label(form.lieuDeNaissance) }}
\t\t    {{ form_widget(form.lieuDeNaissance ,{ 'attr': {'class': 'form-control'} }) }}
\t\t    {{ form_errors(form.lieuDeNaissance) }}
\t\t

\t\t

\t\t\t{{ form_label(form.dateDEntree) }}
\t\t    {{ form_widget(form.dateDEntree ,{ 'attr': {'class': 'form-control'} }) }}
\t\t    {{ form_errors(form.dateDEntree) }}
\t\t

\t\t

\t\t\t{{ form_label(form.cIN) }}
\t\t    {{ form_widget(form.cIN ,{ 'attr': {'class': 'form-control'} }) }}
\t\t    {{ form_errors(form.cIN) }}
\t\t

\t\t

\t\t\t{{ form_label(form.adresse) }}
\t\t    {{ form_widget(form.adresse ,{ 'attr': {'class': 'form-control'} }) }}
\t\t    {{ form_errors(form.adresse) }}
\t\t

\t\t

\t\t\t{{ form_label(form.codePostal) }}
\t\t    {{ form_widget(form.codePostal ,{ 'attr': {'class': 'form-control'} }) }}
\t\t    {{ form_errors(form.codePostal) }}
\t\t

\t\t

\t\t\t{{ form_label(form.telephone) }}
\t\t    {{ form_widget(form.telephone ,{ 'attr': {'class': 'form-control'} }) }}
\t\t    {{ form_errors(form.telephone) }}
\t\t

\t\t

\t\t\t{{ form_label(form.commentaire) }}
\t\t    {{ form_widget(form.commentaire ,{ 'attr': {'class': 'form-control'} }) }}
\t\t    {{ form_errors(form.commentaire) }}
\t\t

\t\t

\t\t\t{{ form_label(form.typeContrat) }}
\t\t    {{ form_widget(form.typeContrat ,{ 'attr': {'class': 'form-control'} }) }}
\t\t    {{ form_errors(form.typeContrat) }}
\t\t

\t\t

\t\t\t{{ form_label(form.email) }}
\t\t    {{ form_widget(form.email ,{ 'attr': {'class': 'form-control'} }) }}
\t\t    {{ form_errors(form.email) }}
\t\t

\t\t

\t\t\t{{ form_label(form.username) }}
\t\t    {{ form_widget(form.username ,{ 'attr': {'class': 'form-control'} }) }}
\t\t    {{ form_errors(form.username) }}
\t\t

\t{% if edit==false %}
\t\t

\t\t\t{{ form_label(form.plainPassword.first) }}
\t\t    {{ form_widget(form.plainPassword.first ,{ 'attr': {'class': 'form-control'} }) }}
\t\t    {{ form_errors(form.plainPassword.first) }}
\t\t

\t\t

\t\t\t{{ form_label(form.plainPassword.second) }}
\t\t    {{ form_widget(form.plainPassword.second ,{ 'attr': {'class': 'form-control'} }) }}
\t\t    {{ form_errors(form.plainPassword.second) }}
\t\t

\t{% else %}
\t{% do form.plainPassword.setRendered %}
\t{% endif %}\t
\t\t<button type=\"submit\">Valider</button>
\t{{ form_end(form) }}

{% endblock %}", ":enseignantsViews:addEnseignant.html.twig", "/Applications/MAMP/htdocs/Symfony/app/Resources/views/enseignantsViews/addEnseignant.html.twig");
    }
}


text:
class NamedLayer: public PixelLayer {

public:

    NamedLayer(int _x, int _y, int _w, int _h, const std::string& _name, float _opacity)
        : PixelLayer(_x, _y, _w, _h), name(_name) { setOpacity(_opacity); }

    NamedLayer(const NamedLayer& other)
        : PixelLayer(other), name(other.name), opacity(other.opacity) { }

    NamedLayer& operator = (const NamedLayer& other) {

        if(this != &other) {
            PixelLayer::operator = (other);
            name = other.name;
        }
        return *this;
    }

    const std::string& getName() const { return name; }

    void setName(const std::string& newName) { name = newName; }

    void setOpacity(float amount) {
        opacity = amount;
        if(opacity < 0)      opacity = 0;
        else if(opacity > 1) opacity = 1;
    }

    float getOpacity() const { return opacity; }

private:

    std::string name;
    float opacity; // [0, 1]

};

#endif // _NAMED_LAYER_H_

redpajama_set_name: RedPajamaGithub


text:
set -v

echo "gem: --no-ri --no-rdoc --no-document" > ~/.gemrc
travis_retry gem install bundler -v ">= 1.11.1"

# suites that need bower assets to work: javascript, vmdb
if [[ "$TEST_SUITE" = "rspec" ]]; then
  which bower || npm install -g bower
  bower install --allow-root -F --config.analytics=false
fi

set +v


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

    <parent>
        <groupId>org.keycloak</groupId>
        <artifactId>keycloak-authz-parent</artifactId>
        <version>14.0.0-SNAPSHOT</version>
        <relativePath>../pom.xml</relativePath>
    </parent>

    <artifactId>keycloak-authz-provider-parent</artifactId>
    <packaging>pom</packaging>

    <name>KeyCloak AuthZ: Provider Parent</name>
    <description>KeyCloak AuthZ: Provider Parent</description>

    <modules>
        <module>common</module>
    </modules>

</project>


text:
import { download } from 'electron-dl'
import { createLogger } from './log'

const log = createLogger('robot-logs')

export function registerRobotLogs(dispatch, mainWindow) {
  return function handleIncomingAction(action) {
    if (action.type === 'shell:DOWNLOAD_LOGS') {
      const { logUrls } = action.payload

      log.debug('Downloading robot logs', { logUrls })

      logUrls
        .reduce((result, url, index) => {
          return result.then(() => {
            return download(mainWindow, url, {
              saveAs: true,
              openFolderWhenDone: index === logUrls.length - 1,
            })
          })
        }, Promise.resolve())
        .catch(error => log.error('Error downloading robot logs', { error }))
        .then(() => dispatch({ type: 'shell:DOWNLOAD_LOGS_DONE' }))
    }
  }
}


text:
class CreateWidgets < ActiveRecord::Migration[5.1]
  def change
    create_table :widgets do |t|
      t.string :title

      t.timestamps
    end
  end
end


text:
#include	<stdio.h>
#include	"csa_types.h"
#include	"csa_defs.h"

#ifdef	QUICK_MIN
#define	sort_insert(best, size, a, a_prc, nsize) \
\
{\
unsigned	si_i, si_j;\
\
if (size == 0)\
  best[0] = a;\
else\
  {\
  si_j = size;\
  for (si_i = 0; si_i < size; si_i++)\
    if (a_prc < best[si_i]->c - best[si_i]->head->p)\
      {\
      si_j = si_i;\
      for (si_i = nsize - 1; si_i > si_j; si_i--)\
	best[si_i] = best[si_i - 1];\
      break;\
      }\
  best[si_j] = a;\
  }\
}
#endif

extern	lhs_ptr		head_lhs_node, tail_lhs_node;
#ifdef	DEBUG
extern	rhs_ptr		head_rhs_node;
#endif

extern	double		epsilon;
extern	unsigned	total_e;
extern	ACTIVE_TYPE	active;

extern	double		po_cost_thresh;

#ifdef	USE_SP_AUG
extern	void		sp_aug();
#endif
#ifdef	USE_P_UPDATE
extern	WORK_TYPE	upd_work_thresh;
extern	void		p_update();
#endif
#ifdef	STRONG_PO
extern	WORK_TYPE	po_work_thresh;
extern	int		check_po_arcs();
#endif

#if	defined(DEBUG) && defined(CHECK_EPS_OPT)
extern	void		check_e_o();
#endif
#ifdef	CHECK_EPS_OPT
extern	int		check_e_o_node();
extern	rhs_ptr		head_rhs_node;
#endif

extern	char		*st_pop(), *deq();

extern	unsigned	myclock();
extern	unsigned	refine_time;
extern	unsigned	double_pushes, pushes, relabelings, refines;
#ifdef	QUICK_MIN
extern	unsigned	rebuilds, scans, non_scans;
#endif
#ifdef	EXPLICIT_LHS_PRICES
extern	unsigned	unnec_rel;
#endif

#ifdef	QUICK_MIN
void	best_build(v)

lhs_ptr	v;

{
unsigned	i;
lr_aptr		a, a_stop;
double		red_cost, save_max;

rebuilds++;
for (i = 0, a = v->first; i < NUM_BEST; i++, a++)
  {
  red_cost = a->c - a->head->p;
  sort_insert(v->best, i, a, red_cost, i + 1);
  }
#ifdef	LOOSE_BOUND
v->next_best = v->best[NUM_BEST - 1]->c -
	       v->best[NUM_BEST - 1]->head->p;
#else
/*
Calculate initial next_best by looking at the next arc in the
adjacency list.
*/
if ((v->next_best = a->c - a->head->p) <
    (red_cost = v->best[NUM_BEST - 1]->c -
		v->best[NUM_BEST - 1]->head->p))
  {
  sort_insert(v->best, NUM_BEST, a, v->next_best, NUM_BEST);
  v->next_best = red_cost;
  }
a++;
#endif
/*
Now go through remaining arcs in adjacency list and place each one
at the appropriate place in best[], if any.
*/
a_stop = (v+1)->priced_out;
for (; a != a_stop; a++)
  {
  if ((red_cost = a->c - a->head->p) < v->next_best)
#ifdef	LOOSE_BOUND
    {
    sort_insert(v->best, NUM_BEST, a, red_cost, NUM_BEST);
    v->next_best = v->best[NUM_BEST - 1]->c -
		   v->best[NUM_BEST - 1]->head->p;
    }
#else
    if (red_cost < (save_max = v->best[NUM_BEST - 1]->c -
			       v->best[NUM_BEST - 1]->head->p))
      {
      sort_insert(v->best, NUM_BEST, a, red_cost, NUM_BEST);
      v->next_best = save_max;
      }
    else
      v->next_best = red_cost;
#endif
  }
}
#endif

/* Assume v has excess (is unassigned) and do a double push from v. */

void	double_push(v)

lhs_ptr	v;

{
double	v_pref, v_second, red_cost, adm_gap;
lr_aptr	a, a_stop, adm;
rhs_ptr	w;
lhs_ptr	u;
#ifdef	QUICK_MIN
unsigned	i;
lr_aptr		*check_arc;
#endif

#ifdef	DEBUG
(void) printf("%lu p's, %lu dp's: dp on %ld ", pushes, double_pushes,
	      v - head_lhs_node + 1);
#endif

/*
Begin part I: Compute the following:
  o adm, the minimum-reduced-cost arc incident to v,
  o adm_gap, the amount by which the reduced cost of adm must be
    increased to make it equal in reduced cost to another arc incident
    to v, or enough to price the arc out if it is the only incident
    arc.
*/

#ifdef	QUICK_MIN
if (v->node_info.few_arcs)
  {
  scans++;
#endif

  /*
  If the input problem is feasible, it is never the case that
  (a_stop == a) after the following two lines because we never get
  excess at a node with no incident arcs.
  */
  a_stop = (v+1)->priced_out;
  a = v->first;
  v_pref = a->c - a->head->p;
  v_second = v_pref + epsilon * (po_cost_thresh + 1.0);
  adm = a;
  /*
  After this loop, v_pref is the minimum reduced cost of an edge out of
  v, and v_second is the second-to-minimum such reduced cost.
  */
  for (a++; a != a_stop; a++)
    if (v_pref > (red_cost = a->c - a->head->p))
      {
      v_second = v_pref;
      v_pref = red_cost;
      adm = a;
      }
    else if (v_second > red_cost)
      v_second = red_cost;

#ifdef	QUICK_MIN
  }
else
  {
  /*
  Find the minimum and second-minimum edges listed in the node's
  best[] array, and check whether their present partial reduced
  costs are below the node's bound as stored in next_best. If they
  are, we calculate adm_gap and are done with part I. If not, we
  rebuild the best[] array and the next_best bound, and calculate the
  required information.
  */
  adm = v->best[1];
  v_second = adm->c - adm->head->p;
  adm = v->best[0];
  v_pref = adm->c - adm->head->p;
  if (v_pref > v_second)
    {
    adm = v->best[1];
    red_cost = v_second;
    v_second = v_pref;
    v_pref = red_cost;
    }
#if	(NUM_BEST > 2)
  for (i = NUM_BEST - 2, check_arc = &v->best[2]; i > 0; i--, check_arc++)
    {
    a = *check_arc;
    if (v_pref > (red_cost = a->c - a->head->p))
      {
      v_second = v_pref;
      v_pref = red_cost;
      adm = a;
      }
    else if (v_second > red_cost)
      v_second = red_cost;
    }
#endif
  if (v_second > v->next_best)
    {
    /*
    Rebuild the best[] array and recalculate next_best.
    !v->node_info.few_arcs, so we know there are enough incident arcs
    to fill up best[] initially and have one left over for next_best.
    */
    best_build(v);
    adm = v->best[1];
    v_second = adm->c - adm->head->p;
    adm = v->best[0];
    v_pref = adm->c - adm->head->p;
    }
  else
    non_scans++;
  }
#endif

adm_gap = v_second - v_pref;

#ifdef	EXPLICIT_LHS_PRICES
if (v->p + v_pref > epsilon)
  {
  /*
  v needs relabeling, so we rack up a relabeling that we wouldn't if
  we were using implicit prices. This relabeling makes adm an
  admissible arc.
  */
  unnec_rel++;
  v->p = -v_pref;
  }
#endif

#ifdef	DEBUG
(void) printf("to %lu. Gap = %lg\n", adm->head - head_rhs_node + 1, adm_gap);
#endif

/*
Begin part II: Using the information computed in part I,
  o match v to w, adm's head, and
  o unmatch the node (if any) formerly matched to w.
In the case where w's current matching arc is priced out, we do not
change the matching, but we reset the value of adm_gap so that the
(v, w) arc will be priced out.
*/
w = adm->head;
if (u = w->matched)
  /*
  If w's matched arc is priced in, go ahead and unmatch (u, w) and
  match (v, w). If w's matched arc is priced out, abort the double
  push and relabel w so v no longer prefers w.
  */
  if (w->node_info.priced_in)
    {
    pushes += 2;
    double_pushes++;
    u->matched = NULL;
    make_active(u);
    v->matched = adm;
    w->matched = v;
    }
  else
    {
    adm_gap = epsilon * po_cost_thresh;
    make_active(v);
    }
else
  {
  total_e--;
  pushes++;
  v->matched = adm;
  w->matched = v;
  }

#ifdef	EXPLICIT_LHS_PRICES
/*
Relabel v: v's price is chosen to make the reduced cost of v's new
preferred arc (v->p + v_pref + adm_gap) equal to zero.
*/
relabelings++;
v->p = -(v_pref + adm_gap);
#endif

/*
Relabel w: v's price is chosen to make the implicit reduced cost of
v's new preferred arc (v_pref + adm_gap) equal to zero. Then w's price
is chosen so that the arc just matched has implicit reduced cost
-epsilon.
*/
relabelings++;
w->p -= adm_gap + epsilon;
}

void	refine()

{
lhs_ptr	v;
#ifdef	USE_P_UPDATE
WORK_TYPE	old_refine_work_upd;
#endif
#ifdef	STRONG_PO
WORK_TYPE	old_refine_work_po;
#endif

refine_time -= myclock();
refines++;
/*
Saturate all negative arcs: Negative arcs are exactly those
right-to-left matching arcs with negative reduced cost, and there is
an interpretation of the implicit price function on the left that
admits all right-to-left matching arcs. This interpretation is
always consistent with the stored prices of lhs nodes in the case
of EXPLICIT_PRICES.
*/
total_e = 0;
for (v = head_lhs_node; v != tail_lhs_node; v++)
  {
  if (v->matched && v->matched->head->node_info.priced_in)
    {
    v->matched->head->matched = NULL;
    v->matched = NULL;
    }
  if (v->matched == NULL)
    {
    total_e++;
    make_active(v);
    }
  }

#ifdef	USE_P_UPDATE
old_refine_work_upd = REFINE_WORK;
#endif
#ifdef	STRONG_PO
old_refine_work_po = REFINE_WORK;
#endif

#ifdef	STRONG_PO
while ((total_e > 0) || (old_refine_work_po = REFINE_WORK,
			 !check_po_arcs()))
#else
while (total_e > EXCESS_THRESH)
#endif
  {
#ifdef	USE_P_UPDATE
  if (REFINE_WORK - old_refine_work_upd > upd_work_thresh)
    {
    old_refine_work_upd = REFINE_WORK;
    p_update();
#if	defined(DEBUG) && defined(CHECK_EPS_OPT)
    check_e_o(epsilon);
#endif
    }
#endif
#ifdef	STRONG_PO
  if (REFINE_WORK - old_refine_work_po > po_work_thresh)
    {
    old_refine_work_po = REFINE_WORK;
    (void) check_po_arcs();
#if	defined(DEBUG) && defined(CHECK_EPS_OPT)
    check_e_o(epsilon);
#endif
    }
#endif
  get_active_node(v);
  double_push(v);
  }

#ifdef	USE_SP_AUG
if (total_e > 0)
  sp_aug();
#endif

refine_time += myclock();
}


text:
using ForEvolve.Api.Contracts.Errors;
using Microsoft.AspNetCore.Mvc;
using System;
using System.Collections.Generic;
using System.Text;

namespace ForEvolve.DynamicInternalServerError
{
    public static class ControllerExtensions
    {
        public static DynamicExceptionResult InternalServerError(this Controller controller, Error error)
        {
            return new DynamicExceptionResult(error);
        }

        public static DynamicExceptionResult InternalServerError(this Controller controller, string code, string message, IEnumerable<Error> details)
        {
            return new DynamicExceptionResult(new Error
            {
                Code = code,
                Message = message,
                Details = new List<Error>(details)
            });
        }
    }
}


text:
package com.tle.cla.web.service;

import com.tle.beans.cla.CLAHolding;
import com.tle.beans.cla.CLAPortion;
import com.tle.beans.cla.CLASection;
import com.tle.cla.service.CLAService;
import com.tle.core.copyright.service.CopyrightService;
import com.tle.core.guice.Bind;
import com.tle.web.copyright.service.impl.AbstractCopyrightWebService;
import javax.inject.Inject;
import javax.inject.Singleton;

@Bind
@Singleton
public class CLAWebServiceImpl extends AbstractCopyrightWebService<CLAHolding> {

  @Inject private CLAService claService;

  @Override
  public CopyrightService<CLAHolding, CLAPortion, CLASection> getCopyrightServiceImpl() {
    return claService;
  }
}


text:
<?xml version="1.0" encoding="UTF-8"?>

<!--
  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.
-->

<project xmlns              = "http://maven.apache.org/POM/4.0.0"
         xmlns:xsi          = "http://www.w3.org/2001/XMLSchema-instance"
         xsi:schemaLocation = "http://maven.apache.org/POM/4.0.0
                               http://maven.apache.org/xsd/maven-4.0.0.xsd">
  <modelVersion>4.0.0</modelVersion>

  <parent>
    <groupId>org.apache.sis</groupId>
    <artifactId>core</artifactId>
    <version>0.8-jdk8-SNAPSHOT</version>
  </parent>

  <groupId>org.apache.sis.core</groupId>
  <artifactId>sis-referencing</artifactId>
  <packaging>bundle</packaging>
  <name>Apache SIS referencing</name>
  <description>
  <!-- Left alignment because this description will be copied in META-INF/MANIFEST.MF
       The leading space after the first line is necessary for proper formatting. -->
Implementations of Coordinate Reference Systems (CRS),
 conversion and transformation services derived from ISO 19111.
  </description>

  <!-- ===========================================================
           Developers and Contributors
       =========================================================== -->
  <developers>
    <developer>
      <name>Chris A. Mattmann</name>
      <id>mattmann</id>
      <email>mattmann@apache.org</email>
      <url>http://sunset.usc.edu/~mattmann/</url>
      <organization>NASA Jet Propulsion Laboratory</organization>
      <organizationUrl>http://www.jpl.nasa.gov</organizationUrl>
      <timezone>-8</timezone>
      <roles>
        <role>committer</role>
      </roles>
    </developer>
    <developer>
      <name>Martin Desruisseaux</name>
      <id>desruisseaux</id>
      <email>desruisseaux@apache.org</email>
      <organization>Geomatys</organization>
      <organizationUrl>http://www.geomatys.com</organizationUrl>
      <timezone>+1</timezone>
      <roles>
        <role>developer</role>
      </roles>
    </developer>
    <developer>
      <name>Rémi Maréchal</name>
      <id>rmarechal</id>
      <email>remi.marechal@geomatys.com</email>
      <organization>Geomatys</organization>
      <organizationUrl>http://www.geomatys.com</organizationUrl>
      <timezone>+1</timezone>
      <roles>
        <role>developer</role>
      </roles>
    </developer>
  </developers>

  <!-- ===========================================================
           Build configuration
       =========================================================== -->
  <build>
    <plugins>

      <!-- Package as OSGi bundle -->
      <plugin>
        <groupId>org.apache.felix</groupId>
        <artifactId>maven-bundle-plugin</artifactId>
        <configuration>
          <instructions>
            <Bundle-SymbolicName>org.apache.sis.referencing</Bundle-SymbolicName>
            <Export-Package>org.apache.sis.internal.referencing, *</Export-Package>
            <Require-Capability>osgi.extender;
            filter:="(osgi.extender=osgi.serviceloader.registrar)"</Require-Capability>
            <Provide-Capability>osgi.serviceloader;
            osgi.serviceloader=org.apache.sis.internal.jaxb.TypeRegistration; osgi.serviceloader=org.apache.sis.internal.jaxb.AdapterReplacement,org.opengis.referencing.operation.MathTransformFactory,org.opengis.referencing.operation.OperationMethod,org.opengis.temporal.TemporalFactory</Provide-Capability>
          </instructions>
        </configuration>
      </plugin>
    </plugins>
  </build>

  <!-- ===========================================================
           Dependencies
       =========================================================== -->
  <dependencies>
    <dependency>
      <groupId>org.apache.sis.core</groupId>
      <artifactId>sis-utility</artifactId>
      <version>${project.version}</version>
    </dependency>
    <dependency>
      <groupId>org.apache.sis.core</groupId>
      <artifactId>sis-metadata</artifactId>
      <version>${project.version}</version>
    </dependency>

    <!-- Test dependencies -->
    <dependency>
      <groupId>gov.nist.math</groupId>
      <artifactId>jama</artifactId>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.apache.sis.core</groupId>
      <artifactId>sis-utility</artifactId>
      <version>${project.version}</version>
      <type>test-jar</type>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.apache.sis.core</groupId>
      <artifactId>sis-metadata</artifactId>
      <version>${project.version}</version>
      <type>test-jar</type>
      <scope>test</scope>
    </dependency>
  </dependencies>

</project>


text:
  {% if include.url %}

    {% endif %}

    {% if include.url %}

  {% endif %}
  {% if include.caption %}

{{ include.caption }}

  {% endif %}


text:
require File.expand_path('spec/spec_helper')

describe FlashDevelop::Scope do
  subject { FlashDevelop::Scope.new }

  it 'should have a valid buffer' do
    VIM::Buffer.load('ArrayUtil.as')
    $curbuf.name.index("spec/fixtures/buffer/ArrayUtil.as").should >= 0
    $curbuf.count.should == 213
    $curbuf[1].should == "/*"
    $curbuf[213].should == "}"
  end

  it 'should identify import and package statements' do
    VIM::Buffer.load('ArrayUtil.as')
    subject.imports.should be_empty
    subject.package.should == 'com.adobe.utils'
    subject.package_imported?('com.something.ClassName').should be_false

    VIM::Buffer.load('MD5.as')
    subject.imports.should == ["com.adobe.utils.IntUtil", "flash.utils.ByteArray"]
    subject.package.should == 'com.adobe.crypto'
    subject.package_imported?('com.adobe.utils.IntUtil').should be_true
    subject.package_imported?('flash.utils.ByteArray').should be_true
    subject.package_imported?('com.adobe.utils.Something').should be_false

    VIM::Buffer.load('FlixelMain.as')
    subject.imports.should == ['flash.display.BlendMode',
                               'flash.display.Sprite',
                               'flash.geom.Matrix',
                               'framework.sound.SomManager',
                               'org.flixel.*',
                               'game.core.ILevel',
                               'game.scenes.MainMenu']

    subject.package.should == ''
    subject.package_imported?('framework.sound.SomManager').should be_true
    subject.package_imported?('org.flixel.*').should be_true
    subject.package_imported?('org.flixel.FlxGame').should be_true
    subject.package_imported?('org.flixel.FlxSprite').should be_true
    subject.package_imported?('org.flixel.something.Inexistent').should be_false
  end
end


text:
title:  Localize strings more beautifully with an extension
redirect_to:
- https://www.swifttalking.com/localize-strings-more-beautifully-with-an-extension/
---


text:
namespace slick {
template<typename DeriSMxSM, typename DeriMMx1,
         typename DeriMMxSM, typename DeriMMxMM>
Eigen::Matrix<typename DeriSMxSM::Scalar, DeriSMxSM::RowsAtCompileTime, 1>
kalman_update(Eigen::MatrixBase<DeriSMxSM> & P,
              const Eigen::MatrixBase<DeriMMx1> &innovation,
              const Eigen::MatrixBase<DeriMMxSM> &H,
              const Eigen::MatrixBase<DeriMMxMM> &measurement_noise) {
  const Eigen::Matrix<typename DeriSMxSM::Scalar, DeriSMxSM::RowsAtCompileTime,
      DeriMMxMM::RowsAtCompileTime> P12 = P * H.transpose();
#if 0  // this only works for R*R' = chol(X), but TooN Cholesky is L * D * L':/
  TooN::Cholesky<MEASDIM, T> R(H * P12 + measurement_noise);
  const TooN::Matrix<STATEDIM, MEASDIM, T> U = R.backsub(P12.T()).T();
  P = P - U * U.T();
  return U * R.backsub(innovation);
#endif
  Eigen::LLT<Eigen::Matrix<typename DeriMMxMM::Scalar,
      DeriMMxMM::RowsAtCompileTime,
      DeriMMxMM::RowsAtCompileTime> > R(H * P12 + measurement_noise);
  P = P - P12 * R.solve(P12.transpose());
  return P12 * R.solve(innovation);
}
}  // namespace slick


text:
layout: docs
authors:
  - blairanderson
date: 2014-08-12 22:22:22
title: :submit Selector in Javascript - without jQuery
description: Selects all elements of type submit.
method: submit-selector
href: "docs/submit-selector.html"
status: "inactive"
---

#### Sorry, we do not have code examples for implementing [submit-selector](http://api.jquery.com/submit-selector/) in vanilla javascript.

It would be great if you submitted code on [github](https://github.com/blairanderson/without-jquery/blob/master/docs/submit-selector.md)

### Example:

```javascript
  //jQuery
  var i = submit-selector(taco);

  //Javascript
  var i = document[somethingOtherThansubmit-selector](taco);

```

**REASONS:**
> Faster, and creates an event upon xyz

*example is computer generated, obviously not real.*


text:
namespace ash {
namespace quick_answers {
namespace prefs {

// A preference that indicates the user has seen the Quick Answers notice.
const char kQuickAnswersNoticed[] = "settings.quick_answers.consented";

// A preference that indicates the user has enabled the Quick Answers services.
// This preference can be overridden by the administrator policy.
const char kQuickAnswersEnabled[] = "settings.quick_answers.enabled";

// A preference that indicates the user consent status for the Quick
// Answers feature.
const char kQuickAnswersConsentStatus[] =
    "settings.quick_answers.consent_status";

// A preference that indicates the user has enabled the Quick Answers definition
// services.
// This preference can be overridden by the administrator policy.
const char kQuickAnswersDefinitionEnabled[] =
    "settings.quick_answers.definition.enabled";

// A preference that indicates the user has enabled the Quick Answers
// translation services.
// This preference can be overridden by the administrator policy.
const char kQuickAnswersTranslationEnabled[] =
    "settings.quick_answers.translation.enabled";

// A preference that indicates the user has enabled the Quick Answers unit
// conversion services.
// This preference can be overridden by the administrator policy.
const char kQuickAnswersUnitConverstionEnabled[] =
    "settings.quick_answers.unit_conversion.enabled";

// A preference to keep track of the number of Quick Answers notice impression.
const char kQuickAnswersNoticeImpressionCount[] =
    "settings.quick_answers.consent.count";

// A preference to keep track of how long (in seconds) the Quick Answers notice
// has shown to the user.
const char kQuickAnswersNoticeImpressionDuration[] =
    "settings.quick_answers.consent.duration";

void RegisterProfilePrefs(PrefRegistrySimple* registry) {
  registry->RegisterBooleanPref(kQuickAnswersNoticed, false);
  registry->RegisterBooleanPref(kQuickAnswersEnabled, false);
  registry->RegisterIntegerPref(kQuickAnswersConsentStatus,
                                ConsentStatus::kUnknown);
  registry->RegisterBooleanPref(kQuickAnswersDefinitionEnabled, true);
  registry->RegisterBooleanPref(kQuickAnswersTranslationEnabled, true);
  registry->RegisterBooleanPref(kQuickAnswersUnitConverstionEnabled, true);
  registry->RegisterIntegerPref(kQuickAnswersNoticeImpressionCount, 0);
  registry->RegisterIntegerPref(kQuickAnswersNoticeImpressionDuration, 0);
}

}  // namespace prefs
}  // namespace quick_answers
}  // namespace ash


text:
layout: post
title: The need to keep on learning
---
_Taking it one day at a time._

## Progress being made

The last few months have been nothing short of spectacular. I have been enjoying my work a lot and as an extra bonus this semester's studies turned out to be really interesting.

I have learned a lot in system analysis and design and I now have a better understanding of what goes into managing and planning a big project. Management Information Systems is a lot of work and I still have a way to go before the exams. Getting the bigger picture from a management perspective helps me appreciate the tremendous responsibility project managers have every day.

I am currently finishing some "nice to haves" on my VB.NET project for my semester project and learned so much from doing this project. I struggle to understand OOP fundamentals and this project helped me tremendously with basic object oriented principles.

## Object-oriented programming (OOP) and the hunger for knowledge

I now want to learn more about OOP in PHP specifically because I am used to a functional programming style and don't have much exposure to OOP. I am dabbling with Laravel because it follows a strict object oriented approach with MVC concepts.

The need to keep on learning keeps me hungry for new knowledge and skills. Studies have shown that the rate of depression is lower for adults who are actively involved in learning activities. We can make a bigger contribution by learning new and interesting skills that help us better ourselves and those around us.

When people learn, they gain confidence for trying new things and stretching themselves. In the last year, I have learned a lot from my fellow developers in a lot of different areas. Never be afraid to ask questions. I am working on a very challenging project at work and I got to a point where I was stuck in a rut, so I turned to a fellow developer for help and was back on track in record time and motivated to get going again.

> When people learn, they gain confidence for trying new things and stretching themselves.

Sometimes we just need that little push to get going in the right direction. The next few months will be tough with exams coming up but starting on a new project at work and I have a little Arduino project that I want to get to so that will keep things interesting.

Never stop learning and never stop dabbling with new technologies.


text:
//
//   Copyright 2015 Blu Age Corporation - Plano, Texas
//
//   Licensed under the Apache License, Version 2.0 (the "License");
//   you may not use this file except in compliance with the License.
//   You may obtain a copy of the License at
//
//       http://www.apache.org/licenses/LICENSE-2.0
//
//   Unless required by applicable law or agreed to in writing, software
//   distributed under the License is distributed on an "AS IS" BASIS,
//   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
//   See the License for the specific language governing permissions and
//   limitations under the License.

//   This file has been modified.
//   Original copyright notice :

using System.Collections.Generic;

namespace Summer.Batch.Core.Job.Flow
{
    /// <summary>
    /// Interface to be implemented by flows.
    /// </summary>
    public interface IFlow
    {
        /// <summary>
        /// </summary>
        /// <returns>the name of the flow</returns>
        string GetName();

        /// <summary>
        /// Retrieve the <see cref="IState"/> with the given name. If there is no State with the
        /// given name, then return null.
        /// </summary>
        /// <param name="stateName"></param>
        /// <returns></returns>
        IState GetState(string stateName);

        /// <summary>
        /// Starts the flow, using given executor.
        /// </summary>
        /// <param name="executor"></param>
        /// <returns></returns>
        /// <exception cref="FlowExecutionException"> </exception>
        FlowExecution Start(IFlowExecutor executor);

        /// <summary>
        /// Resumes the flow.
        /// </summary>
        /// <param name="currentStateName"> the name of the state to resume on</param>
        /// <param name="executor">the context to be passed into each state executed</param>
        /// <returns>a FlowExecution containing the exit status of the flow</returns>
        /// <exception cref="FlowExecutionException"> </exception>
        FlowExecution Resume(string currentStateName, IFlowExecutor executor);

        /// <summary>
        ///  Convenient accessor for clients needing to explore the states of this flow.
        /// </summary>
        /// <returns></returns>
        ICollection<IState> GetStates();
    }
}


text:
android-images-sample
=====================

Sample app that shows off Google image search


text:
app.controller('adminCtrl', function($scope,$window,$location) {
$scope.hello="Under Construction";

$scope.getdata=function()
{
	var tickets = Parse.Object.extend("Ticket");
	var query = new Parse.Query(tickets);

		$scope.tickets = [];
		$scope.developers=[];
		query.find({
		  success: function(results) {

		    for (var i = 0; i < results.length; i++) {
		      var object = results[i];
		      $scope.tickets.push({"title":results[i].get('title'),"id":results[i].id});
		    }

		    $scope.$apply();
		  },
		  error: function(error) {
		    alert("Error: " + error.code + " " + error.message);
		  }
		});

		$scope.roleUser = [];

		query = (new Parse.Query(Parse.Role));
		query.equalTo("name", "developer");
		query.first({ success: function(role) {

			role.relation('users').query().find({success: function(users) {

		  	for (var i = 0; i < users.length; i++) {

			  	query = (new Parse.Query(Parse.User));
					query.equalTo("objectId", users[i].id);
					query.find({
							success: function(res){
							var userNamesInDev = JSON.parse((JSON.stringify(res)));
							$scope.roleUser.push({"id":userNamesInDev[0].objectId, "name":userNamesInDev[0].username});
							$scope.$apply();
						}
					})
	  		}
			},
			  error: function(error) {
		  	  alert("Error: " + error.code + " " + error.message);
		 	 	}
			})
		}})

}

	$scope.assign = function( developerId , ticketid )
	{

		var tickets = Parse.Object.extend("Ticket");
		var query = new Parse.Query(tickets);

    query.equalTo("objectId", ticketid);
    query.find({
      success: function(results) {

        $.each(results, function(i,result){

            result.save(null, {
              success: function(result) {
                result.set("assignee", developerId);
                result.save();
              }
            });

        });

      }
    });

	}

	$scope.deleteTicket = function( ticketid ) {

	var DeleteTicket = Parse.Object.extend("Ticket");
	var query = new Parse.Query(DeleteTicket);
	query.get(ticketid, {
	  success: function(myObj) {
	    myObj.destroy({});
	  },
	  error: function(object, error) {
	  	console.log(error);
	  }
	});

	}

});


text:
package demasoft.alhabibshop.app.view.fragments;

import android.app.Activity;
import android.content.DialogInterface;
import android.content.Intent;
import android.os.Bundle;
import android.support.annotation.NonNull;
import android.support.v4.app.Fragment;
import android.support.v7.app.AlertDialog;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.Button;
import android.widget.EditText;
import android.widget.RadioButton;
import android.widget.RadioGroup;
import android.widget.TextView;

import demasoft.alhabibshop.app.utils.AppConstants;
import demasoft.alhabibshop.app.utils.Preferences;
import demasoft.alhabibshop.app.R;
import demasoft.alhabibshop.app.view.activities.FetchData;

import org.json.JSONArray;
import org.json.JSONException;
import org.json.JSONObject;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

import static demasoft.alhabibshop.app.utils.AppConstants.ADD_ADDRESS_REQUEST_CODE;
import static demasoft.alhabibshop.app.utils.AppConstants.COUNTRIES_REQUEST_CODE;
import static demasoft.alhabibshop.app.utils.AppConstants.CUSTOMER_ID_KEY;
import static demasoft.alhabibshop.app.utils.AppConstants.DEFAULT_STRING_VAL;
import static demasoft.alhabibshop.app.utils.AppConstants.EDIT_ADDRESS_REQUEST_CODE;
import static demasoft.alhabibshop.app.utils.AppConstants.RIGHT;
import static demasoft.alhabibshop.app.utils.AppConstants.STATES_REQUEST_CODE;
import static demasoft.alhabibshop.app.utils.AppConstants.appContext;

/**
 * A simple {@link Fragment} subclass.
 */
public class AddAddress extends MyBaseFragment implements View.OnClickListener {

    private String countryId = "-1", zoneId = "-1";
    private EditText fNameET, lNameET, addressET, cityET;
    private Button continueBtn, countryBtn, stateBtn;
    private RadioGroup radioGroup;
    private RadioButton rbYes, rbNo;
    private List<String> countryList, countryIdList, stateList, stateIdList;
    private Bundle bundle;
    private TextView headingTV;

    public AddAddress() {
        // Required empty public constructor
    }

    @Override
    public View onCreateView(@NonNull LayoutInflater inflater, ViewGroup container,
                             Bundle savedInstanceState) {
        // Inflate the layout for this fragment
        View view = inflater.inflate(R.layout.frag_add_address, container, false);
        initUtils();
        initViews(view);
//        Toast.makeText(context,"Click and hold to Edit or Delete Address",
//                Toast.LENGTH_LONG).show();

        radioGroup.check(R.id.rbNo);
        countryBtn.setOnClickListener(this);
        stateBtn.setOnClickListener(this);
        getCountries();
        continueBtn.setOnClickListener(this);

        bundle = getArguments();
        if (bundle != null && bundle.getBoolean("isEditAddress")) {
            headingTV.setText(R.string.edit_address_text);

            fNameET.setText(bundle.getString("first_name", DEFAULT_STRING_VAL));
            lNameET.setText(bundle.getString("last_name", DEFAULT_STRING_VAL));
            addressET.setText(bundle.getString("address", DEFAULT_STRING_VAL));
            cityET.setText(bundle.getString("city", DEFAULT_STRING_VAL));

        }

        return view;
    }

    private void getCountries() {
        AppConstants.setMidFixApi("getCountries");
        Intent intent = new Intent(getContext(), FetchData.class);
        startActivityForResult(intent, COUNTRIES_REQUEST_CODE);
    }

    private void getStates(String countryId) {
        AppConstants.setMidFixApi("getZones");
        Map<String, String> map = new HashMap<>();
        map.put("country_id", countryId);
        Bundle bundle = new Bundle();
        bundle.putBoolean("hasParameters", true);
        bundle.putSerializable("parameters", (Serializable) map);
        Intent intent = new Intent(getContext(), FetchData.class);
        intent.putExtras(bundle);
        startActivityForResult(intent, STATES_REQUEST_CODE);
    }

    private void initViews(View view) {

        headingTV = view.findViewById(R.id.heading_tv);
        fNameET = view.findViewById(R.id.f_name_et);
        lNameET = view.findViewById(R.id.l_name_et);
        addressET = view.findViewById(R.id.address_et);
        cityET = view.findViewById(R.id.city_et);
        countryBtn = view.findViewById(R.id.country_btn);
        stateBtn = view.findViewById(R.id.state_btn);
        radioGroup = view.findViewById(R.id.radio_group);
        rbYes = view.findViewById(R.id.rbYes);
        rbNo = view.findViewById(R.id.rbNo);

        continueBtn = view.findViewById(R.id.continue_btn);

        utils.setCompoundDrawable(stateBtn, RIGHT, R.drawable.ic_expand_more_black);
        utils.setCompoundDrawable(countryBtn, RIGHT, R.drawable.ic_expand_more_black);
    }

    @Override
    public void onActivityResult(int requestCode, int resultCode, Intent data) {
        super.onActivityResult(requestCode, resultCode, data);
        JSONObject response = null;
        if (data != null) {
            try {
                response = new JSONObject(data.getStringExtra("result"));
            } catch (JSONException e) {
                e.printStackTrace();
            }
            if (response != null) {
                if (resultCode == Activity.RESULT_OK) {
                    if (requestCode == ADD_ADDRESS_REQUEST_CODE) {
                        utils.switchFragment(new AddressBook());
                    } else if (requestCode == EDIT_ADDRESS_REQUEST_CODE) {
                        utils.switchFragment(new AddressBook());
                    } else if (requestCode == COUNTRIES_REQUEST_CODE) {
                        try {
                            JSONArray countries = response.optJSONArray("countries");
                            countryList = new ArrayList<>();
                            countryIdList = new ArrayList<>();
                            for (int i = 0; i < countries.length(); i++) {
                                JSONObject country = countries.optJSONObject(i);
                                countryList.add(country.getString("name"));
                                countryIdList.add(country.getString("country_id"));
                            }
                        } catch (JSONException e) {
                            e.printStackTrace();
                        }
                    } else if (requestCode == STATES_REQUEST_CODE) {
                        try {
                            JSONArray states = response.optJSONArray("Zones");
                            stateList = new ArrayList<>();
                            stateIdList = new ArrayList<>();
                            if (states != null) {
                                for (int i = 0; i < states.length(); i++) {
                                    JSONObject country = states.optJSONObject(i);
                                    stateList.add(country.getString("name"));
                                    stateIdList.add(country.getString("zone_id"));
                                }
                            } else {
                                utils.showAlert(R.string.an_error, R.string.error_fetching_data,
                                        false,
                                        R.string.ok, null,
                                        R.string.cancel_text, null);
                            }
                        } catch (JSONException e) {
                            e.printStackTrace();
                        }
                    }
                } else if (resultCode == AppConstants.FORCE_CANCELED) {
                    String message = response.optString("message");
                    if (!message.isEmpty()) {
                        utils.showAlert(R.string.information_text, message,
                                false,
                                R.string.ok, null,
                                R.string.cancel_text, null);
                    }
                } else if (resultCode == Activity.RESULT_CANCELED) {
                    utils.showAlert(R.string.an_error, R.string.error_fetching_data,
                            false,
                            R.string.ok, null,
                            R.string.cancel_text, null);
                }
            } else {
                utils.showAlert(R.string.an_error, R.string.error_fetching_data,
                        false,
                        R.string.ok, null,
                        R.string.cancel_text, null);
            }
        }
    }

    @Override
    public void onClick(View v) {
        final AlertDialog.Builder builder = new AlertDialog.Builder(mContext);
        AlertDialog dialog;

        switch (v.getId()) {
            case R.id.country_btn:
                builder.setTitle(R.string.select_country);
                builder.setSingleChoiceItems(countryList.toArray(new String[countryList.size()]),
                        -1, new DialogInterface.OnClickListener() {
                            @Override
                            public void onClick(DialogInterface dialog, int which) {
                                utils.printLog("CountryId", countryIdList.get(which));
                                countryBtn.setHint(countryList.get(which));
                                getStates(countryIdList.get(which));
                                countryId = countryIdList.get(which);
                                dialog.dismiss();
                                countryBtn.setHintTextColor(getResources()
                                        .getColor(R.color.text_color));
                            }
                        });
                dialog = builder.create();
                dialog.show();
                break;
            case R.id.state_btn:
                builder.setTitle(R.string.select_state);
                builder.setSingleChoiceItems(stateList.toArray(new String[stateList.size()]),
                        -1, new DialogInterface.OnClickListener() {
                            @Override
                            public void onClick(DialogInterface dialog, int which) {
                                stateBtn.setHint(stateList.get(which));
                                dialog.dismiss();
                                zoneId = stateIdList.get(which);
                                stateBtn.setHintTextColor(getResources().getColor(R.color.text_color));
                            }
                        });
                dialog = builder.create();
                dialog.show();
                break;
            case R.id.continue_btn:
                utils.printLog("ContinueButtonClicked", "Success");
                String fNameVal = fNameET.getText().toString().trim();
                String lNameVal = lNameET.getText().toString().trim();
                String addressVal = addressET.getText().toString().trim();
                String cityVal = cityET.getText().toString().trim();
                String countryVal = countryBtn.getHint().toString().trim();
                String stateVal = stateBtn.getHint().toString().trim();
                utils.printLog("CountryVal", countryVal + "CVal");
                if (fNameVal.isEmpty()) {
                    utils.setError(fNameET);
                } else if (lNameVal.isEmpty()) {
                    utils.setError(lNameET);
                } else if (addressVal.isEmpty()) {
                    utils.setError(addressET);
                } else if (cityVal.isEmpty()) {
                    utils.setError(cityET);
                } else if (countryVal.isEmpty() || countryId.equals("-1") ||
                        stateVal.isEmpty() || countryId.equals("-1")) {
                    utils.showAlert(R.string.information_text, R.string.empty_fields,
                            false,
                            R.string.ok, null,
                            R.string.cancel_text, null);
                } else {

                    Map<String, String> map = new HashMap<>();
                    map.put("customer_id", Preferences.getSharedPreferenceString(appContext,
                            CUSTOMER_ID_KEY, DEFAULT_STRING_VAL));
                    map.put("firstname", fNameVal);
                    map.put("lastname", lNameVal);
                    map.put("address_1", addressVal);
                    map.put("city", cityVal);
                    map.put("country_id", countryId);
                    map.put("zone_id", zoneId);
                    Bundle b = new Bundle();
                    b.putBoolean("hasParameters", true);
                    b.putSerializable("parameters", (Serializable) map);
                    Intent intent = new Intent(getContext(), FetchData.class);
                    intent.putExtras(b);
                    if (bundle != null && bundle.getBoolean("isEditAddress")) {
                        AppConstants.setMidFixApi("editaddress");
                        startActivityForResult(intent, EDIT_ADDRESS_REQUEST_CODE);
                    } else {
                        AppConstants.setMidFixApi("addAddress");
                        startActivityForResult(intent, ADD_ADDRESS_REQUEST_CODE);
                    }
                }
                break;
        }
    }
}


text:
var ArrayFilter = (function () {
    function ArrayFilter() {
        this.filterOperators = {
            '=': 1,
            '<=': 2,
            '>=': 3,
            '<': 4,
            '>': 5,
            '*': 6,
            '!=': 7,
            '!*': 8,
            '*=': 9,
            '=*': 10
        };
        this.lastFilter = [];
    }
    ArrayFilter.prototype.getOperatorNo = function (val) {
        return this.filterOperators[val];
    };
    ArrayFilter.prototype.getLastFilter = function () {
        return this.lastFilter;
    };
    ArrayFilter.prototype.runQueryOn = function (objArray, ObjFilter) {
        var _this = this;
        this.lastFilter = ObjFilter;
        var resultArray = objArray.filter(function (data) {
            var result = true;
            ObjFilter.forEach(function (x) {
                var rowValue;
                var filterValue;
                var filterOperator = _this.getOperatorNo(x.operator);
                var newFilterOperator;
                var typeBool = {
                    true: true,
                    false: false
                };
                var type;
                try {
                    if (data[x.attribute] === null || data[x.attribute] === undefined) {
                        type = 'string';
                    }
                    else {
                        type = typeof (data[x.attribute]);
                    }
                }
                catch (e) {
                    type = 'string';
                }
                switch (type) {
                    case 'number':
                        rowValue = data[x.attribute];
                        filterValue = Number(x.value);
                        filterOperator = filterOperator || 1;
                        if (filterOperator === 6) {
                            filterOperator = 1;
                        }
                        break;
                    case 'string':
                        if (data[x.attribute] === null || data[x.attribute] === undefined) {
                            rowValue = '';
                        }
                        else {
                            rowValue = data[x.attribute].toLowerCase();
                        }
                        filterValue = x.value.toLowerCase();
                        filterOperator = filterOperator || 9;
                        newFilterOperator = filterOperator;
                        if (x.value.charAt(0) === '*' && filterOperator === 9) {
                            newFilterOperator = 6;
                            filterValue = filterValue.substr(1, filterValue.length);
                        }
                        if (x.value.charAt(0) === '*' && filterOperator === 1) {
                            newFilterOperator = 10;
                            filterValue = filterValue.substr(1, filterValue.length);
                        }
                        if (x.value.charAt(x.value.length - 1) === '*' && filterOperator === 1 && newFilterOperator === 10) {
                            newFilterOperator = 6;
                            filterValue = filterValue.substr(0, filterValue.length - 1);
                        }
                        if (x.value.charAt(x.value.length - 1) === '*'
                            && filterOperator === 1
                            && newFilterOperator !== 10
                            && newFilterOperator !== 6) {
                            newFilterOperator = 9;
                            filterValue = filterValue.substr(0, filterValue.length - 1);
                        }
                        if (filterOperator !== newFilterOperator) {
                            filterOperator = newFilterOperator;
                        }
                        break;
                    case 'boolean':
                        rowValue = data[x.attribute];
                        filterValue = typeBool[x.value];
                        filterOperator = 1;
                        break;
                    case 'object':
                        try {
                            rowValue = new Date(data[x.attribute].getFullYear(), data[x.attribute].getMonth(), data[x.attribute].getDate()).getTime();
                            filterValue = new Date(x.value.getFullYear(), x.value.getMonth(), x.value.getDate()).getTime();
                        }
                        catch (e) {
                            rowValue = 0;
                            filterValue = 1;
                        }
                        filterOperator = filterOperator || 2;
                        break;
                    default:
                        try {
                            rowValue = data[x.attribute].toLowerCase();
                        }
                        catch (err) {
                            rowValue = data[x.attribute];
                        }
                        try {
                            filterValue = x.value.toLowerCase();
                        }
                        catch (err) {
                            filterValue = x.value;
                        }
                        filterOperator = filterOperator || 1;
                        break;
                }
                switch (filterOperator) {
                    case 1:
                        if (rowValue !== filterValue) {
                            result = false;
                        }
                        break;
                    case 2:
                        if (!(rowValue <= filterValue)) {
                            result = false;
                        }
                        break;
                    case 3:
                        if (!(rowValue >= filterValue)) {
                            result = false;
                        }
                        break;
                    case 4:
                        if (!(rowValue < filterValue)) {
                            result = false;
                        }
                        break;
                    case 5:
                        if (!(rowValue > filterValue)) {
                            result = false;
                        }
                        break;
                    case 6:
                        if (rowValue.indexOf(filterValue) === -1) {
                            result = false;
                        }
                        break;
                    case 7:
                        if (rowValue === filterValue) {
                            result = false;
                        }
                        break;
                    case 8:
                        if (rowValue.indexOf(filterValue) !== -1) {
                            result = false;
                        }
                        break;
                    case 9:
                        if (rowValue.substring(0, filterValue.length) !== filterValue) {
                            result = false;
                        }
                        break;
                    case 10:
                        if (rowValue.substring(rowValue.length - filterValue.length, rowValue.length) !== filterValue) {
                            result = false;
                        }
                        break;
                    default:
                        if (rowValue !== filterValue) {
                            result = false;
                        }
                }
                if (type === 'string') {
                    if (x.value.charAt(0) === '*' && x.value.length === 1) {
                        result = true;
                    }
                }
            });
            return result;
        });
        return resultArray;
    };
    return ArrayFilter;
}());
export { ArrayFilter };
//# sourceMappingURL=arrayFilter.js.map


text:
package buildenv

import (
	"flag"
	"fmt"
	"strings"
)

const (
	prefix = "https://www.googleapis.com/compute/v1/projects/"
)

// KubeConfig describes the configuration of a Kubernetes cluster.
type KubeConfig struct {
	// MinNodes is the minimum number of nodes in the Kubernetes cluster.
	// The autoscaler will ensure that at least this many nodes is always
	// running despite any scale-down decision.
	MinNodes int64

	// MaxNodes is the maximum number of nodes that the autoscaler can
	// provision in the Kubernetes cluster.
	// If MaxNodes is 0, Kubernetes is not used.
	MaxNodes int64

	// MachineType is the GCE machine type to use for the Kubernetes cluster nodes.
	MachineType string

	// Name is the name of the Kubernetes cluster that will be created.
	Name string
}

// Environment describes the configuration of the infrastructure for a
// coordinator and its buildlet resources running on Google Cloud Platform.
// Staging and Production are the two common build environments.
type Environment struct {
	// The GCP project name that the build infrastructure will be provisioned in.
	// This field may be overridden as necessary without impacting other fields.
	ProjectName string

	// The IsProd flag indicates whether production functionality should be
	// enabled. When true, GCE and Kubernetes builders are enabled and the
	// coordinator serves on 443. Otherwise, GCE and Kubernetes builders are
	// disabled and the coordinator serves on 8119.
	IsProd bool

	// Zone is the GCE zone that the coordinator instance and Kubernetes cluster
	// will run in. This field may be overridden as necessary without impacting
	// other fields.
	Zone string

	// ZonesToClean are the GCE zones that will be periodically cleaned by
	// deleting old VMs. The zero value means that no cleaning will occur.
	// This field is optional.
	ZonesToClean []string

	// StaticIP is the public, static IP address that will be attached to the
	// coordinator instance. The zero value means the address will be looked
	// up by name. This field is optional.
	StaticIP string

	// MachineType is the GCE machine type to use for the coordinator.
	MachineType string

	// KubeBuild is the Kubernetes config for the buildlet cluster.
	KubeBuild KubeConfig
	// KubeTools is the Kubernetes config for the tools cluster.
	KubeTools KubeConfig

	// DashURL is the base URL of the build dashboard, ending in a slash.
	DashURL string

	// PerfDataURL is the base URL of the benchmark storage server.
	PerfDataURL string

	// CoordinatorURL is the location from which the coordinator
	// binary will be downloaded.
	// This is only used by cmd/coordinator/buildongce/create.go when
	// creating the coordinator VM from scratch.
	CoordinatorURL string

	// CoordinatorName is the hostname of the coordinator instance.
	CoordinatorName string

	// BuildletBucket is the GCS bucket that stores buildlet binaries.
	// TODO: rename. this is not just for buildlets; also for bootstrap.
	BuildletBucket string

	// LogBucket is the GCS bucket to which logs are written.
	LogBucket string

	// SnapBucket is the GCS bucket to which snapshots of
	// completed builds (after make.bash, before tests) are
	// written.
	SnapBucket string

	// MaxBuilds is the maximum number of concurrent builds that
	// can run. Zero means unlimit. This is typically only used
	// in a development or staging environment.
	MaxBuilds int

	// AutoCertCacheBucket is the GCS bucket to use for the
	// golang.org/x/crypto/acme/autocert (LetsEncrypt) cache.
	// If empty, LetsEncrypt isn't used.
	AutoCertCacheBucket string
}

// MachineTypeURI returns the URI for the environment's Machine Type.
func (e Environment) MachineTypeURI() string {
	return e.ComputePrefix() + "/zones/" + e.Zone + "/machineTypes/" + e.MachineType
}

// ComputePrefix returns the URI prefix for Compute Engine resources in a project.
func (e Environment) ComputePrefix() string {
	return prefix + e.ProjectName
}

// Region returns the GCE region, derived from its zone.
func (e Environment) Region() string {
	return e.Zone[:strings.LastIndex(e.Zone, "-")]
}

// SnapshotURL returns the absolute URL of the .tar.gz containing a
// built Go tree for the builderType and Go rev (40 character Git
// commit hash). The tarball is suitable for passing to
// (*buildlet.Client).PutTarFromURL.
func (e Environment) SnapshotURL(builderType, rev string) string {
	return fmt.Sprintf("https://storage.googleapis.com/%s/go/%s/%s.tar.gz", e.SnapBucket, builderType, rev)
}

// DashBase returns the base URL of the build dashboard, ending in a slash.
func (e Environment) DashBase() string {
	// TODO(quentin): Should we really default to production? That's what the old code did.
	if e.DashURL != "" {
		return e.DashURL
	}
	return Production.DashURL
}

// ByProjectID returns an Environment for the specified
// project ID. It is currently limited to the symbolic-datum-552
// and go-dashboard-dev projects.
// ByProjectID will panic if the project ID is not known.
func ByProjectID(projectID string) *Environment {
	var envKeys []string

	for k := range possibleEnvs {
		envKeys = append(envKeys, k)
	}

	var env *Environment
	env, ok := possibleEnvs[projectID]
	if !ok {
		panic(fmt.Sprintf("Can't get buildenv for unknown project %q. Possible envs are %s", projectID, envKeys))
	}

	return env
}

// Staging defines the environment that the coordinator and build
// infrastructure is deployed to before it is released to production.
// For local dev, override the project with the program's flag to set
// a custom project.
var Staging = &Environment{
	ProjectName:  "go-dashboard-dev",
	IsProd:       true,
	Zone:         "us-central1-f",
	ZonesToClean: []string{"us-central1-a", "us-central1-b", "us-central1-f"},
	StaticIP:     "104.154.113.235",
	MachineType:  "n1-standard-1",
	KubeBuild: KubeConfig{
		MinNodes:    1,
		MaxNodes:    2,
		Name:        "buildlets",
		MachineType: "n1-standard-8",
	},
	KubeTools: KubeConfig{
		MinNodes:    3,
		MaxNodes:    3,
		Name:        "go",
		MachineType: "n1-standard-4",
	},
	DashURL:         "https://go-dashboard-dev.appspot.com/",
	PerfDataURL:     "https://perfdata.golang.org",
	CoordinatorURL:  "https://storage.googleapis.com/dev-go-builder-data/coordinator",
	CoordinatorName: "farmer",
	BuildletBucket:  "dev-go-builder-data",
	LogBucket:       "dev-go-build-log",
	SnapBucket:      "dev-go-build-snap",
}

// Production defines the environment that the coordinator and build
// infrastructure is deployed to for production usage at build.golang.org.
var Production = &Environment{
	ProjectName:  "symbolic-datum-552",
	IsProd:       true,
	Zone:         "us-central1-f",
	ZonesToClean: []string{"us-central1-f"},
	StaticIP:     "107.178.219.46",
	MachineType:  "n1-standard-4",
	KubeBuild: KubeConfig{
		MinNodes:    5,
		MaxNodes:    5, // auto-scaling disabled
		Name:        "buildlets",
		MachineType: "n1-standard-32",
	},
	KubeTools: KubeConfig{
		MinNodes:    3,
		MaxNodes:    3,
		Name:        "go",
		MachineType: "n1-standard-4",
	},
	DashURL:             "https://build.golang.org/",
	PerfDataURL:         "https://perfdata.golang.org",
	CoordinatorURL:      "https://storage.googleapis.com/go-builder-data/coordinator",
	CoordinatorName:     "farmer",
	BuildletBucket:      "go-builder-data",
	LogBucket:           "go-build-log",
	SnapBucket:          "go-build-snap",
	AutoCertCacheBucket: "farmer-golang-org-autocert-cache",
}

var Development = &Environment{
	IsProd:   false,
	StaticIP: "127.0.0.1",
}

// possibleEnvs enumerate the known buildenv.Environment definitions.
var possibleEnvs = map[string]*Environment{
	"dev":                Development,
	"symbolic-datum-552": Production,
	"go-dashboard-dev":   Staging,
}

var (
	registeredFlags bool
	stagingFlag     bool
	localDevFlag    bool
)

// RegisterFlags registers the "staging" flag. It is required if FromFlags is used.
func RegisterFlags() {
	if !registeredFlags {
		flag.BoolVar(&stagingFlag, "staging", false, "use the staging build coordinator and buildlets")
		flag.BoolVar(&localDevFlag, "localdev", false, "use the localhost in-development coordinator")
		registeredFlags = true
	}
}

// FromFlags returns the build environment specified from flags.
// By default it returns the production environment.
func FromFlags() *Environment {
	if !registeredFlags {
		panic("FromFlags called without RegisterFlags")
	}
	if localDevFlag {
		return Development
	}
	if stagingFlag {
		return Staging
	}
	return Production
}


text:
<android.support.v4.widget.DrawerLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:id="@+id/drawer_layout"
    android:layout_width="fill_parent"
    android:layout_height="fill_parent" >

    <RelativeLayout
        xmlns:android="http://schemas.android.com/apk/res/android"
        xmlns:app="http://schemas.android.com/apk/res-auto"
        xmlns:tools="http://schemas.android.com/tools"
        android:layout_width="match_parent" android:id="@+id/content"
        android:layout_height="match_parent" >
    </RelativeLayout>

    <!-- The navigation drawer -->

    <ListView
        android:id="@+id/left_drawer"
        android:layout_width="250dp"
        android:layout_height="match_parent"
        android:layout_gravity="start"
        android:background="#CCCCCC"
        android:choiceMode="singleChoice" />

</android.support.v4.widget.DrawerLayout>


text:
<?php

namespace App\JoboardBundle\Tests\Utils;

use App\JoboardBundle\Utils\Joboard;

class JoboardTest extends \PHPUnit_Framework_TestCase
{
    public function testSlugify()
    {
        $this->assertEquals('company', Joboard::slugify('Company'));
        $this->assertEquals('ooo-company', Joboard::slugify('ooo company'));
        $this->assertEquals('company', Joboard::slugify(' company'));
        $this->assertEquals('company', Joboard::slugify('company '));
	$this->assertEquals('n-a', Joboard::slugify(''));
	$this->assertEquals('n-a', Joboard::slugify(' - '));
	$this->assertEquals('developpeur-web', Joboard::slugify('Développeur Web'));
    }
}


text:
package com.sleepycat.collections.test;

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

import com.sleepycat.bind.EntityBinding;
import com.sleepycat.bind.EntryBinding;
import com.sleepycat.bind.RecordNumberBinding;
import com.sleepycat.collections.CurrentTransaction;
import com.sleepycat.compat.DbCompat;
import com.sleepycat.je.Database;
import com.sleepycat.je.DatabaseException;
import com.sleepycat.je.Environment;
import com.sleepycat.je.SecondaryConfig;

/**
 * @author Mark Hayes
 */
class TestStore {

    static final TestKeyCreator BYTE_EXTRACTOR = new TestKeyCreator(false);
    static final TestKeyCreator RECNO_EXTRACTOR = new TestKeyCreator(true);
    static final EntryBinding VALUE_BINDING = new TestDataBinding();
    static final EntryBinding BYTE_KEY_BINDING = VALUE_BINDING;
    static final EntryBinding RECNO_KEY_BINDING = new RecordNumberBinding();
    static final EntityBinding BYTE_ENTITY_BINDING =
            new TestEntityBinding(false);
    static final EntityBinding RECNO_ENTITY_BINDING =
            new TestEntityBinding(true);
    static final TestKeyAssigner BYTE_KEY_ASSIGNER =
            new TestKeyAssigner(false);
    static final TestKeyAssigner RECNO_KEY_ASSIGNER =
            new TestKeyAssigner(true);

    static final TestStore BTREE_UNIQ;
    static final TestStore BTREE_DUP;
    static final TestStore BTREE_DUPSORT;
    static final TestStore BTREE_RECNUM;
    static final TestStore HASH_UNIQ;
    static final TestStore HASH_DUP;
    static final TestStore HASH_DUPSORT;
    static final TestStore QUEUE;
    static final TestStore RECNO;
    static final TestStore RECNO_RENUM;

    static final TestStore[] ALL;
    static {
        List list = new ArrayList();
        SecondaryConfig config;

        config = new SecondaryConfig();
        DbCompat.setTypeBtree(config);
        BTREE_UNIQ = new TestStore("btree-uniq", config);
        BTREE_UNIQ.indexOf = BTREE_UNIQ;
        list.add(BTREE_UNIQ);

        if (DbCompat.INSERTION_ORDERED_DUPLICATES) {
            config = new SecondaryConfig();
            DbCompat.setTypeBtree(config);
            DbCompat.setUnsortedDuplicates(config, true);
            BTREE_DUP = new TestStore("btree-dup", config);
            BTREE_DUP.indexOf = null; // indexes must use sorted dups
            list.add(BTREE_DUP);
        } else {
            BTREE_DUP = null;
        }

        config = new SecondaryConfig();
        DbCompat.setTypeBtree(config);
        DbCompat.setSortedDuplicates(config, true);
        BTREE_DUPSORT = new TestStore("btree-dupsort", config);
        BTREE_DUPSORT.indexOf = BTREE_UNIQ;
        list.add(BTREE_DUPSORT);

        if (DbCompat.BTREE_RECNUM_METHOD) {
            config = new SecondaryConfig();
            DbCompat.setTypeBtree(config);
            DbCompat.setBtreeRecordNumbers(config, true);
            BTREE_RECNUM = new TestStore("btree-recnum", config);
            BTREE_RECNUM.indexOf = BTREE_RECNUM;
            list.add(BTREE_RECNUM);
        } else {
            BTREE_RECNUM = null;
        }

        if (DbCompat.HASH_METHOD) {
            config = new SecondaryConfig();
            DbCompat.setTypeHash(config);
            HASH_UNIQ = new TestStore("hash-uniq", config);
            HASH_UNIQ.indexOf = HASH_UNIQ;
            list.add(HASH_UNIQ);

            if (DbCompat.INSERTION_ORDERED_DUPLICATES) {
                config = new SecondaryConfig();
                DbCompat.setTypeHash(config);
                DbCompat.setUnsortedDuplicates(config, true);
                HASH_DUP = new TestStore("hash-dup", config);
                HASH_DUP.indexOf = null; // indexes must use sorted dups
                list.add(HASH_DUP);
            } else {
                HASH_DUP = null;
            }

            config = new SecondaryConfig();
            DbCompat.setTypeHash(config);
            DbCompat.setSortedDuplicates(config, true);
            HASH_DUPSORT = new TestStore("hash-dupsort", config);
            HASH_DUPSORT.indexOf = HASH_UNIQ;
            list.add(HASH_DUPSORT);
        } else {
            HASH_UNIQ = null;
            HASH_DUP = null;
            HASH_DUPSORT = null;
        }

        if (DbCompat.QUEUE_METHOD) {
            config = new SecondaryConfig();
            DbCompat.setTypeQueue(config);
            QUEUE = new TestStore("queue", config);
            QUEUE.indexOf = QUEUE;
            list.add(QUEUE);
        } else {
            QUEUE = null;
        }

        if (DbCompat.RECNO_METHOD) {
            config = new SecondaryConfig();
            DbCompat.setTypeRecno(config);
            RECNO = new TestStore("recno", config);
            RECNO.indexOf = RECNO;
            list.add(RECNO);

            config = new SecondaryConfig();
            DbCompat.setTypeRecno(config);
            DbCompat.setRenumbering(config, true);
            RECNO_RENUM = new TestStore("recno-renum", config);
            RECNO_RENUM.indexOf = null; // indexes must have stable keys
            list.add(RECNO_RENUM);
        } else {
            RECNO = null;
            RECNO_RENUM = null;
        }

        ALL = new TestStore[list.size()];
        list.toArray(ALL);
    }

    private String name;
    private SecondaryConfig config;
    private TestStore indexOf;
    private boolean isRecNumFormat;

    private TestStore(String name, SecondaryConfig config) {

        this.name = name;
        this.config = config;

        isRecNumFormat = isQueueOrRecno() ||
                            (DbCompat.isTypeBtree(config) &&
                             DbCompat.getBtreeRecordNumbers(config));
    }

    EntryBinding getValueBinding() {

        return VALUE_BINDING;
    }

    EntryBinding getKeyBinding() {

        return isRecNumFormat ? RECNO_KEY_BINDING : BYTE_KEY_BINDING;
    }

    EntityBinding getEntityBinding() {

        return isRecNumFormat ? RECNO_ENTITY_BINDING : BYTE_ENTITY_BINDING;
    }

    TestKeyAssigner getKeyAssigner() {

        if (isQueueOrRecno()) {
            return null;
        } else {
            if (isRecNumFormat) {
                return RECNO_KEY_ASSIGNER;
            } else {
                return BYTE_KEY_ASSIGNER;
            }
        }
    }

    String getName() {

        return name;
    }

    boolean isOrdered() {

        return !DbCompat.isTypeHash(config);
    }

    boolean isQueueOrRecno() {

        return DbCompat.isTypeQueue(config) || DbCompat.isTypeRecno(config);
    }

    boolean areKeyRangesAllowed() {
        return isOrdered() && !isQueueOrRecno();
    }

    boolean areDuplicatesAllowed() {

        return DbCompat.getSortedDuplicates(config) ||
               DbCompat.getUnsortedDuplicates(config);
    }

    boolean hasRecNumAccess() {

        return isRecNumFormat;
    }

    boolean areKeysRenumbered() {

        return hasRecNumAccess() &&
                (DbCompat.isTypeBtree(config) ||
                 DbCompat.getRenumbering(config));
    }

    TestStore getIndexOf() {

        return DbCompat.SECONDARIES ? indexOf : null;
    }

    Database open(Environment env, String fileName)
        throws DatabaseException {

        int fixedLen = (isQueueOrRecno() ? 1 : 0);
        return openDb(env, fileName, fixedLen, null);
    }

    Database openIndex(Database primary, String fileName)
        throws DatabaseException {

        int fixedLen = (isQueueOrRecno() ? 4 : 0);
        config.setKeyCreator(isRecNumFormat ? RECNO_EXTRACTOR
                                            : BYTE_EXTRACTOR);
        Environment env = primary.getEnvironment();
        return openDb(env, fileName, fixedLen, primary);
    }

    private Database openDb(Environment env, String fileName, int fixedLen,
                            Database primary)
        throws DatabaseException {

        if (fixedLen > 0) {
            DbCompat.setRecordLength(config, fixedLen);
            DbCompat.setRecordPad(config, 0);
        } else {
            DbCompat.setRecordLength(config, 0);
        }
        config.setAllowCreate(true);
        DbCompat.setReadUncommitted(config, true);
        config.setTransactional(CurrentTransaction.getInstance(env) != null);
        if (primary != null) {
            return DbCompat.testOpenSecondaryDatabase
                (env, null, fileName, null, primary, config);
        } else {
            return DbCompat.testOpenDatabase
                (env, null, fileName, null, config);
        }
    }
}


text:
<?xml version="1.0" encoding="UTF-8"?>
<project-private xmlns="http://www.netbeans.org/ns/project-private/1">
    <editor-bookmarks xmlns="http://www.netbeans.org/ns/editor-bookmarks/2" lastBookmarkId="0"/>
    <open-files xmlns="http://www.netbeans.org/ns/projectui-open-files/2">
        <group>
            <file>file:/C:/Users/Kristian/Documents/NetBeansProjects/login/src/java/servlet/MySQLConnect.java</file>
            <file>file:/C:/Users/Kristian/Documents/NetBeansProjects/login/web/WEB-INF/web.xml</file>
            <file>file:/C:/Users/Kristian/Documents/NetBeansProjects/login/test/servlet/MySQLConnectTest.java</file>
            <file>file:/C:/Users/Kristian/Documents/NetBeansProjects/login/web/index.html</file>
        </group>
    </open-files>
</project-private>