text:
<?php

use Symfony\Component\Routing\Exception\MethodNotAllowedException;
use Symfony\Component\Routing\Exception\ResourceNotFoundException;
use Symfony\Component\Routing\RequestContext;

/**
 * appprodUrlMatcher
 *
 * This class has been auto-generated
 * by the Symfony Routing Component.
 */
class appprodUrlMatcher extends Symfony\Bundle\FrameworkBundle\Routing\RedirectableUrlMatcher
{
    /**
     * Constructor.
     */
    public function __construct(RequestContext $context)
    {
        $this->context = $context;
    }

    public function match($pathinfo)
    {
        $allow = array();
        $pathinfo = urldecode($pathinfo);

        // _login
        if ($pathinfo === '/login') {
            return array (  '_controller' => 'Pasa\\RequirementBundle\\Controller\\SecuredController::loginAction',  '_route' => '_login',);
        }

        // _security_check
        if ($pathinfo === '/login_check') {
            return array (  '_controller' => 'Pasa\\RequirementBundle\\Controller\\SecuredController::securityCheckAction',  '_route' => '_security_check',);
        }

        // pasa_requirement_secured_redirect
        if (rtrim($pathinfo, '/') === '') {
            if (substr($pathinfo, -1) !== '/') {
                return $this->redirect($pathinfo.'/', 'pasa_requirement_secured_redirect');
            }
            return array (  '_controller' => 'Pasa\\RequirementBundle\\Controller\\SecuredController::redirectAction',  '_route' => 'pasa_requirement_secured_redirect',);
        }

        // _logout
        if ($pathinfo === '/logout') {
            return array (  '_controller' => 'Pasa\\RequirementBundle\\Controller\\SecuredController::logoutAction',  '_route' => '_logout',);
        }

        // default
        if (rtrim($pathinfo, '/') === '/default') {
            if (substr($pathinfo, -1) !== '/') {
                return $this->redirect($pathinfo.'/', 'default');
            }
            return array (  '_controller' => 'Pasa\\RequirementBundle\\Controller\\DefaultController::indexAction',  '_route' => 'default',);
        }

        // collaboratorfront
        if (rtrim($pathinfo, '/') === '/collaboratorfront') {
            if (substr($pathinfo, -1) !== '/') {
                return $this->redirect($pathinfo.'/', 'collaboratorfront');
            }
            return array (  '_controller' => 'Pasa\\RequirementBundle\\Controller\\CollaboratorFrontController::indexAction',  '_route' => 'collaboratorfront',);
        }

        // collaboratorfront_exigency
        if ($pathinfo === '/collaboratorfront/exigency') {
            return array (  '_controller' => 'Pasa\\RequirementBundle\\Controller\\CollaboratorFrontController::exigency_indexAction',  '_route' => 'collaboratorfront_exigency',);
        }

        // collaboratorfront_exigency_show
        if (0 === strpos($pathinfo, '/collaboratorfront/exigency') && preg_match('#^/collaboratorfront/exigency/(?P<id>[^/]+?)/show$#s', $pathinfo, $matches)) {
            return array_merge($this->mergeDefaults($matches, array (  '_controller' => 'Pasa\\RequirementBundle\\Controller\\CollaboratorFrontController::exigency_showAction',)), array('_route' => 'collaboratorfront_exigency_show'));
        }

        // collaboratorfront_exigency_new
        if ($pathinfo === '/collaboratorfront/exigency/new') {
            return array (  '_controller' => 'Pasa\\RequirementBundle\\Controller\\CollaboratorFrontController::exigency_newAction',  '_route' => 'collaboratorfront_exigency_new',);
        }

        // collaboratorfront_exigency_create
        if ($pathinfo === '/collaboratorfront/exigency/create') {
            if ($this->context->getMethod() != 'POST') {
                $allow[] = 'POST';
                goto not_collaboratorfront_exigency_create;
            }
            return array (  '_controller' => 'Pasa\\RequirementBundle\\Controller\\CollaboratorFrontController::exigency_createAction',  '_route' => 'collaboratorfront_exigency_create',);
        }
        not_collaboratorfront_exigency_create:

        // collaboratorfront_exigency_edit
        if (0 === strpos($pathinfo, '/collaboratorfront/exigency') && preg_match('#^/collaboratorfront/exigency/(?P<id>[^/]+?)/edit$#s', $pathinfo, $matches)) {
            return array_merge($this->mergeDefaults($matches, array (  '_controller' => 'Pasa\\RequirementBundle\\Controller\\CollaboratorFrontController::exigency_editAction',)), array('_route' => 'collaboratorfront_exigency_edit'));
        }

        // collaboratorfront_exigency_update
        if (0 === strpos($pathinfo, '/collaboratorfront/exigency') && preg_match('#^/collaboratorfront/exigency/(?P<id>[^/]+?)/update$#s', $pathinfo, $matches)) {
            if ($this->context->getMethod() != 'POST') {
                $allow[] = 'POST';
                goto not_collaboratorfront_exigency_update;
            }
            return array_merge($this->mergeDefaults($matches, array (  '_controller' => 'Pasa\\RequirementBundle\\Controller\\CollaboratorFrontController::exigency_updateAction',)), array('_route' => 'collaboratorfront_exigency_update'));
        }
        not_collaboratorfront_exigency_update:

        // collaboratorfront_exigency_delete
        if (0 === strpos($pathinfo, '/collaboratorfront/exigency') && preg_match('#^/collaboratorfront/exigency/(?P<id>[^/]+?)/delete$#s', $pathinfo, $matches)) {
            if ($this->context->getMethod() != 'POST') {
                $allow[] = 'POST';
                goto not_collaboratorfront_exigency_delete;
            }
            return array_merge($this->mergeDefaults($matches, array (  '_controller' => 'Pasa\\RequirementBundle\\Controller\\CollaboratorFrontController::exigency_deleteAction',)), array('_route' => 'collaboratorfront_exigency_delete'));
        }
        not_collaboratorfront_exigency_delete:

        // manager
        if (rtrim($pathinfo, '/') === '/manager') {
            if (substr($pathinfo, -1) !== '/') {
                return $this->redirect($pathinfo.'/', 'manager');
            }
            return array (  '_controller' => 'Pasa\\RequirementBundle\\Controller\\ManagerController::indexAction',  '_route' => 'manager',);
        }

        // manager_show
        if (0 === strpos($pathinfo, '/manager') && preg_match('#^/manager/(?P<id>[^/]+?)/show$#s', $pathinfo, $matches)) {
            return array_merge($this->mergeDefaults($matches, array (  '_controller' => 'Pasa\\RequirementBundle\\Controller\\ManagerController::showAction',)), array('_route' => 'manager_show'));
        }

        // manager_new
        if ($pathinfo === '/manager/new') {
            return array (  '_controller' => 'Pasa\\RequirementBundle\\Controller\\ManagerController::newAction',  '_route' => 'manager_new',);
        }

        // manager_create
        if ($pathinfo === '/manager/create') {
            if ($this->context->getMethod() != 'POST') {
                $allow[] = 'POST';
                goto not_manager_create;
            }
            return array (  '_controller' => 'Pasa\\RequirementBundle\\Controller\\ManagerController::createAction',  '_route' => 'manager_create',);
        }
        not_manager_create:

        // manager_edit
        if (0 === strpos($pathinfo, '/manager') && preg_match('#^/manager/(?P<id>[^/]+?)/edit$#s', $pathinfo, $matches)) {
            return array_merge($this->mergeDefaults($matches, array (  '_controller' => 'Pasa\\RequirementBundle\\Controller\\ManagerController::editAction',)), array('_route' => 'manager_edit'));
        }

        // manager_update
        if (0 === strpos($pathinfo, '/manager') && preg_match('#^/manager/(?P<id>[^/]+?)/update$#s', $pathinfo, $matches)) {
            if ($this->context->getMethod() != 'POST') {
                $allow[] = 'POST';
                goto not_manager_update;
            }
            return array_merge($this->mergeDefaults($matches, array (  '_controller' => 'Pasa\\RequirementBundle\\Controller\\ManagerController::updateAction',)), array('_route' => 'manager_update'));
        }
        not_manager_update:

        // manager_delete
        if (0 === strpos($pathinfo, '/manager') && preg_match('#^/manager/(?P<id>[^/]+?)/delete$#s', $pathinfo, $matches)) {
            if ($this->context->getMethod() != 'POST') {
                $allow[] = 'POST';
                goto not_manager_delete;
            }
            return array_merge($this->mergeDefaults($matches, array (  '_controller' => 'Pasa\\RequirementBundle\\Controller\\ManagerController::deleteAction',)), array('_route' => 'manager_delete'));
        }
        not_manager_delete:

        // exigency
        if (rtrim($pathinfo, '/') === '/exigency') {
            if (substr($pathinfo, -1) !== '/') {
                return $this->redirect($pathinfo.'/', 'exigency');
            }
            return array (  '_controller' => 'Pasa\\RequirementBundle\\Controller\\ExigencyController::indexAction',  '_route' => 'exigency',);
        }

        // exigency_show
        if (0 === strpos($pathinfo, '/exigency') && preg_match('#^/exigency/(?P<id>[^/]+?)/show$#s', $pathinfo, $matches)) {
            return array_merge($this->mergeDefaults($matches, array (  '_controller' => 'Pasa\\RequirementBundle\\Controller\\ExigencyController::showAction',)), array('_route' => 'exigency_show'));
        }

        // exigency_new
        if ($pathinfo === '/exigency/new') {
            return array (  '_controller' => 'Pasa\\RequirementBundle\\Controller\\ExigencyController::newAction',  '_route' => 'exigency_new',);
        }

        // exigency_create
        if ($pathinfo === '/exigency/create') {
            if ($this->context->getMethod() != 'POST') {
                $allow[] = 'POST';
                goto not_exigency_create;
            }
            return array (  '_controller' => 'Pasa\\RequirementBundle\\Controller\\ExigencyController::createAction',  '_route' => 'exigency_create',);
        }
        not_exigency_create:

        // exigency_edit
        if (0 === strpos($pathinfo, '/exigency') && preg_match('#^/exigency/(?P<id>[^/]+?)/edit$#s', $pathinfo, $matches)) {
            return array_merge($this->mergeDefaults($matches, array (  '_controller' => 'Pasa\\RequirementBundle\\Controller\\ExigencyController::editAction',)), array('_route' => 'exigency_edit'));
        }

        // exigency_update
        if (0 === strpos($pathinfo, '/exigency') && preg_match('#^/exigency/(?P<id>[^/]+?)/update$#s', $pathinfo, $matches)) {
            if ($this->context->getMethod() != 'POST') {
                $allow[] = 'POST';
                goto not_exigency_update;
            }
            return array_merge($this->mergeDefaults($matches, array (  '_controller' => 'Pasa\\RequirementBundle\\Controller\\ExigencyController::updateAction',)), array('_route' => 'exigency_update'));
        }
        not_exigency_update:

        // exigency_delete
        if (0 === strpos($pathinfo, '/exigency') && preg_match('#^/exigency/(?P<id>[^/]+?)/delete$#s', $pathinfo, $matches)) {
            if ($this->context->getMethod() != 'POST') {
                $allow[] = 'POST';
                goto not_exigency_delete;
            }
            return array_merge($this->mergeDefaults($matches, array (  '_controller' => 'Pasa\\RequirementBundle\\Controller\\ExigencyController::deleteAction',)), array('_route' => 'exigency_delete'));
        }
        not_exigency_delete:

        // progression
        if (rtrim($pathinfo, '/') === '/progression') {
            if (substr($pathinfo, -1) !== '/') {
                return $this->redirect($pathinfo.'/', 'progression');
            }
            return array (  '_controller' => 'Pasa\\RequirementBundle\\Controller\\ProgressionController::indexAction',  '_route' => 'progression',);
        }

        // progression_show
        if (0 === strpos($pathinfo, '/progression') && preg_match('#^/progression/(?P<id>[^/]+?)/show$#s', $pathinfo, $matches)) {
            return array_merge($this->mergeDefaults($matches, array (  '_controller' => 'Pasa\\RequirementBundle\\Controller\\ProgressionController::showAction',)), array('_route' => 'progression_show'));
        }

        // progression_new
        if ($pathinfo === '/progression/new') {
            return array (  '_controller' => 'Pasa\\RequirementBundle\\Controller\\ProgressionController::newAction',  '_route' => 'progression_new',);
        }

        // progression_create
        if ($pathinfo === '/progression/create') {
            if ($this->context->getMethod() != 'POST') {
                $allow[] = 'POST';
                goto not_progression_create;
            }
            return array (  '_controller' => 'Pasa\\RequirementBundle\\Controller\\ProgressionController::createAction',  '_route' => 'progression_create',);
        }
        not_progression_create:

        // progression_edit
        if (0 === strpos($pathinfo, '/progression') && preg_match('#^/progression/(?P<id>[^/]+?)/edit$#s', $pathinfo, $matches)) {
            return array_merge($this->mergeDefaults($matches, array (  '_controller' => 'Pasa\\RequirementBundle\\Controller\\ProgressionController::editAction',)), array('_route' => 'progression_edit'));
        }

        // progression_update
        if (0 === strpos($pathinfo, '/progression') && preg_match('#^/progression/(?P<id>[^/]+?)/update$#s', $pathinfo, $matches)) {
            if ($this->context->getMethod() != 'POST') {
                $allow[] = 'POST';
                goto not_progression_update;
            }
            return array_merge($this->mergeDefaults($matches, array (  '_controller' => 'Pasa\\RequirementBundle\\Controller\\ProgressionController::updateAction',)), array('_route' => 'progression_update'));
        }
        not_progression_update:

        // progression_delete
        if (0 === strpos($pathinfo, '/progression') && preg_match('#^/progression/(?P<id>[^/]+?)/delete$#s', $pathinfo, $matches)) {
            if ($this->context->getMethod() != 'POST') {
                $allow[] = 'POST';
                goto not_progression_delete;
            }
            return array_merge($this->mergeDefaults($matches, array (  '_controller' => 'Pasa\\RequirementBundle\\Controller\\ProgressionController::deleteAction',)), array('_route' => 'progression_delete'));
        }
        not_progression_delete:

        // feature
        if (rtrim($pathinfo, '/') === '/feature') {
            if (substr($pathinfo, -1) !== '/') {
                return $this->redirect($pathinfo.'/', 'feature');
            }
            return array (  '_controller' => 'Pasa\\RequirementBundle\\Controller\\FeatureController::indexAction',  '_route' => 'feature',);
        }

        // feature_show
        if (0 === strpos($pathinfo, '/feature') && preg_match('#^/feature/(?P<id>[^/]+?)/show$#s', $pathinfo, $matches)) {
            return array_merge($this->mergeDefaults($matches, array (  '_controller' => 'Pasa\\RequirementBundle\\Controller\\FeatureController::showAction',)), array('_route' => 'feature_show'));
        }

        // feature_new
        if ($pathinfo === '/feature/new') {
            return array (  '_controller' => 'Pasa\\RequirementBundle\\Controller\\FeatureController::newAction',  '_route' => 'feature_new',);
        }

        // feature_create
        if ($pathinfo === '/feature/create') {
            if ($this->context->getMethod() != 'POST') {
                $allow[] = 'POST';
                goto not_feature_create;
            }
            return array (  '_controller' => 'Pasa\\RequirementBundle\\Controller\\FeatureController::createAction',  '_route' => 'feature_create',);
        }
        not_feature_create:

        // feature_edit
        if (0 === strpos($pathinfo, '/feature') && preg_match('#^/feature/(?P<id>[^/]+?)/edit$#s', $pathinfo, $matches)) {
            return array_merge($this->mergeDefaults($matches, array (  '_controller' => 'Pasa\\RequirementBundle\\Controller\\FeatureController::editAction',)), array('_route' => 'feature_edit'));
        }

        // feature_update
        if (0 === strpos($pathinfo, '/feature') && preg_match('#^/feature/(?P<id>[^/]+?)/update$#s', $pathinfo, $matches)) {
            if ($this->context->getMethod() != 'POST') {
                $allow[] = 'POST';
                goto not_feature_update;
            }
            return array_merge($this->mergeDefaults($matches, array (  '_controller' => 'Pasa\\RequirementBundle\\Controller\\FeatureController::updateAction',)), array('_route' => 'feature_update'));
        }
        not_feature_update:

        // feature_delete
        if (0 === strpos($pathinfo, '/feature') && preg_match('#^/feature/(?P<id>[^/]+?)/delete$#s', $pathinfo, $matches)) {
            if ($this->context->getMethod() != 'POST') {
                $allow[] = 'POST';
                goto not_feature_delete;
            }
            return array_merge($this->mergeDefaults($matches, array (  '_controller' => 'Pasa\\RequirementBundle\\Controller\\FeatureController::deleteAction',)), array('_route' => 'feature_delete'));
        }
        not_feature_delete:

        // project
        if (rtrim($pathinfo, '/') === '/project') {
            if (substr($pathinfo, -1) !== '/') {
                return $this->redirect($pathinfo.'/', 'project');
            }
            return array (  '_controller' => 'Pasa\\RequirementBundle\\Controller\\ProjectController::indexAction',  '_route' => 'project',);
        }

        // project_show
        if (0 === strpos($pathinfo, '/project') && preg_match('#^/project/(?P<id>[^/]+?)/show$#s', $pathinfo, $matches)) {
            return array_merge($this->mergeDefaults($matches, array (  '_controller' => 'Pasa\\RequirementBundle\\Controller\\ProjectController::showAction',)), array('_route' => 'project_show'));
        }

        // project_new
        if ($pathinfo === '/project/new') {
            return array (  '_controller' => 'Pasa\\RequirementBundle\\Controller\\ProjectController::newAction',  '_route' => 'project_new',);
        }

        // project_create
        if ($pathinfo === '/project/create') {
            if ($this->context->getMethod() != 'POST') {
                $allow[] = 'POST';
                goto not_project_create;
            }
            return array (  '_controller' => 'Pasa\\RequirementBundle\\Controller\\ProjectController::createAction',  '_route' => 'project_create',);
        }
        not_project_create:

        // project_edit
        if (0 === strpos($pathinfo, '/project') && preg_match('#^/project/(?P<id>[^/]+?)/edit$#s', $pathinfo, $matches)) {
            return array_merge($this->mergeDefaults($matches, array (  '_controller' => 'Pasa\\RequirementBundle\\Controller\\ProjectController::editAction',)), array('_route' => 'project_edit'));
        }

        // project_update
        if (0 === strpos($pathinfo, '/project') && preg_match('#^/project/(?P<id>[^/]+?)/update$#s', $pathinfo, $matches)) {
            if ($this->context->getMethod() != 'POST') {
                $allow[] = 'POST';
                goto not_project_update;
            }
            return array_merge($this->mergeDefaults($matches, array (  '_controller' => 'Pasa\\RequirementBundle\\Controller\\ProjectController::updateAction',)), array('_route' => 'project_update'));
        }
        not_project_update:

        // project_delete
        if (0 === strpos($pathinfo, '/project') && preg_match('#^/project/(?P<id>[^/]+?)/delete$#s', $pathinfo, $matches)) {
            if ($this->context->getMethod() != 'POST') {
                $allow[] = 'POST';
                goto not_project_delete;
            }
            return array_merge($this->mergeDefaults($matches, array (  '_controller' => 'Pasa\\RequirementBundle\\Controller\\ProjectController::deleteAction',)), array('_route' => 'project_delete'));
        }
        not_project_delete:

        // managerfront
        if (rtrim($pathinfo, '/') === '/managerfront') {
            if (substr($pathinfo, -1) !== '/') {
                return $this->redirect($pathinfo.'/', 'managerfront');
            }
            return array (  '_controller' => 'Pasa\\RequirementBundle\\Controller\\ManagerFrontController::indexAction',  '_route' => 'managerfront',);
        }

        // managerfront_project
        if ($pathinfo === '/managerfront/project') {
            return array (  '_controller' => 'Pasa\\RequirementBundle\\Controller\\ManagerFrontController::project_indexAction',  '_route' => 'managerfront_project',);
        }

        // managerfront_project_show
        if (0 === strpos($pathinfo, '/managerfront/project') && preg_match('#^/managerfront/project/(?P<id>[^/]+?)/show$#s', $pathinfo, $matches)) {
            return array_merge($this->mergeDefaults($matches, array (  '_controller' => 'Pasa\\RequirementBundle\\Controller\\ManagerFrontController::project_showAction',)), array('_route' => 'managerfront_project_show'));
        }

        // managerfront_project_new
        if ($pathinfo === '/managerfront/project/new') {
            return array (  '_controller' => 'Pasa\\RequirementBundle\\Controller\\ManagerFrontController::project_newAction',  '_route' => 'managerfront_project_new',);
        }

        // managerfront_project_create
        if ($pathinfo === '/managerfront/project/create') {
            if ($this->context->getMethod() != 'POST') {
                $allow[] = 'POST';
                goto not_managerfront_project_create;
            }
            return array (  '_controller' => 'Pasa\\RequirementBundle\\Controller\\ManagerFrontController::project_createAction',  '_route' => 'managerfront_project_create',);
        }
        not_managerfront_project_create:

        // managerfront_project_edit
        if (0 === strpos($pathinfo, '/managerfront/project') && preg_match('#^/managerfront/project/(?P<id>[^/]+?)/edit$#s', $pathinfo, $matches)) {
            return array_merge($this->mergeDefaults($matches, array (  '_controller' => 'Pasa\\RequirementBundle\\Controller\\ManagerFrontController::project_editAction',)), array('_route' => 'managerfront_project_edit'));
        }

        // managerfront_project_update
        if (0 === strpos($pathinfo, '/managerfront/project') && preg_match('#^/managerfront/project/(?P<id>[^/]+?)/update$#s', $pathinfo, $matches)) {
            if ($this->context->getMethod() != 'POST') {
                $allow[] = 'POST';
                goto not_managerfront_project_update;
            }
            return array_merge($this->mergeDefaults($matches, array (  '_controller' => 'Pasa\\RequirementBundle\\Controller\\ManagerFrontController::project_updateAction',)), array('_route' => 'managerfront_project_update'));
        }
        not_managerfront_project_update:

        // managerfront_project_delete
        if (0 === strpos($pathinfo, '/managerfront/project') && preg_match('#^/managerfront/project/(?P<id>[^/]+?)/delete$#s', $pathinfo, $matches)) {
            if ($this->context->getMethod() != 'POST') {
                $allow[] = 'POST';
                goto not_managerfront_project_delete;
            }
            return array_merge($this->mergeDefaults($matches, array (  '_controller' => 'Pasa\\RequirementBundle\\Controller\\ManagerFrontController::project_deleteAction',)), array('_route' => 'managerfront_project_delete'));
        }
        not_managerfront_project_delete:

        // managerfront_collaborator
        if ($pathinfo === '/managerfront/collaborator') {
            return array (  '_controller' => 'Pasa\\RequirementBundle\\Controller\\ManagerFrontController::collaborator_indexAction',  '_route' => 'managerfront_collaborator',);
        }

        // managerfront_collaborator_show
        if (0 === strpos($pathinfo, '/managerfront/collaborator') && preg_match('#^/managerfront/collaborator/(?P<id>[^/]+?)/show$#s', $pathinfo, $matches)) {
            return array_merge($this->mergeDefaults($matches, array (  '_controller' => 'Pasa\\RequirementBundle\\Controller\\ManagerFrontController::collaborator_showAction',)), array('_route' => 'managerfront_collaborator_show'));
        }

        // managerfront_collaborator_new
        if ($pathinfo === '/managerfront/collaborator/new') {
            return array (  '_controller' => 'Pasa\\RequirementBundle\\Controller\\ManagerFrontController::collaborator_newAction',  '_route' => 'managerfront_collaborator_new',);
        }

        // managerfront_collaborator_create
        if ($pathinfo === '/managerfront/collaborator/create') {
            if ($this->context->getMethod() != 'POST') {
                $allow[] = 'POST';
                goto not_managerfront_collaborator_create;
            }
            return array (  '_controller' => 'Pasa\\RequirementBundle\\Controller\\ManagerFrontController::collaborator_createAction',  '_route' => 'managerfront_collaborator_create',);
        }
        not_managerfront_collaborator_create:

        // managerfront_collaborator_edit
        if (0 === strpos($pathinfo, '/managerfront/collaborator') && preg_match('#^/managerfront/collaborator/(?P<id>[^/]+?)/edit$#s', $pathinfo, $matches)) {
            return array_merge($this->mergeDefaults($matches, array (  '_controller' => 'Pasa\\RequirementBundle\\Controller\\ManagerFrontController::collaborator_editAction',)), array('_route' => 'managerfront_collaborator_edit'));
        }

        // managerfront_collaborator_update
        if (0 === strpos($pathinfo, '/managerfront/collaborator') && preg_match('#^/managerfront/collaborator/(?P<id>[^/]+?)/update$#s', $pathinfo, $matches)) {
            if ($this->context->getMethod() != 'POST') {
                $allow[] = 'POST';
                goto not_managerfront_collaborator_update;
            }
            return array_merge($this->mergeDefaults($matches, array (  '_controller' => 'Pasa\\RequirementBundle\\Controller\\ManagerFrontController::collaborator_updateAction',)), array('_route' => 'managerfront_collaborator_update'));
        }
        not_managerfront_collaborator_update:

        // managerfront_collaborator_delete
        if (0 === strpos($pathinfo, '/managerfront/collaborator') && preg_match('#^/managerfront/collaborator/(?P<id>[^/]+?)/delete$#s', $pathinfo, $matches)) {
            if ($this->context->getMethod() != 'POST') {
                $allow[] = 'POST';
                goto not_managerfront_collaborator_delete;
            }
            return array_merge($this->mergeDefaults($matches, array (  '_controller' => 'Pasa\\RequirementBundle\\Controller\\ManagerFrontController::collaborator_deleteAction',)), array('_route' => 'managerfront_collaborator_delete'));
        }
        not_managerfront_collaborator_delete:

        // managerfront_exigency
        if ($pathinfo === '/managerfront/exigency') {
            return array (  '_controller' => 'Pasa\\RequirementBundle\\Controller\\ManagerFrontController::exigency_indexAction',  '_route' => 'managerfront_exigency',);
        }

        // managerfront_exigency_show
        if (0 === strpos($pathinfo, '/managerfront/exigency') && preg_match('#^/managerfront/exigency/(?P<id>[^/]+?)/show$#s', $pathinfo, $matches)) {
            return array_merge($this->mergeDefaults($matches, array (  '_controller' => 'Pasa\\RequirementBundle\\Controller\\ManagerFrontController::exigency_showAction',)), array('_route' => 'managerfront_exigency_show'));
        }

        // managerfront_exigency_new
        if ($pathinfo === '/managerfront/exigency/new') {
            return array (  '_controller' => 'Pasa\\RequirementBundle\\Controller\\ManagerFrontController::exigency_newAction',  '_route' => 'managerfront_exigency_new',);
        }

        // managerfront_exigency_create
        if ($pathinfo === '/managerfront/exigency/create') {
            if ($this->context->getMethod() != 'POST') {
                $allow[] = 'POST';
                goto not_managerfront_exigency_create;
            }
            return array (  '_controller' => 'Pasa\\RequirementBundle\\Controller\\ManagerFrontController::exigency_createAction',  '_route' => 'managerfront_exigency_create',);
        }
        not_managerfront_exigency_create:

        // managerfront_exigency_edit
        if (0 === strpos($pathinfo, '/managerfront/exigency') && preg_match('#^/managerfront/exigency/(?P<id>[^/]+?)/edit$#s', $pathinfo, $matches)) {
            return array_merge($this->mergeDefaults($matches, array (  '_controller' => 'Pasa\\RequirementBundle\\Controller\\ManagerFrontController::exigency_editAction',)), array('_route' => 'managerfront_exigency_edit'));
        }

        // managerfront_exigency_update
        if (0 === strpos($pathinfo, '/managerfront/exigency') && preg_match('#^/managerfront/exigency/(?P<id>[^/]+?)/update$#s', $pathinfo, $matches)) {
            if ($this->context->getMethod() != 'POST') {
                $allow[] = 'POST';
                goto not_managerfront_exigency_update;
            }
            return array_merge($this->mergeDefaults($matches, array (  '_controller' => 'Pasa\\RequirementBundle\\Controller\\ManagerFrontController::exigency_updateAction',)), array('_route' => 'managerfront_exigency_update'));
        }
        not_managerfront_exigency_update:

        // managerfront_exigency_delete
        if (0 === strpos($pathinfo, '/managerfront/exigency') && preg_match('#^/managerfront/exigency/(?P<id>[^/]+?)/delete$#s', $pathinfo, $matches)) {
            if ($this->context->getMethod() != 'POST') {
                $allow[] = 'POST';
                goto not_managerfront_exigency_delete;
            }
            return array_merge($this->mergeDefaults($matches, array (  '_controller' => 'Pasa\\RequirementBundle\\Controller\\ManagerFrontController::exigency_deleteAction',)), array('_route' => 'managerfront_exigency_delete'));
        }
        not_managerfront_exigency_delete:

        // collaborator
        if (rtrim($pathinfo, '/') === '/collaborator') {
            if (substr($pathinfo, -1) !== '/') {
                return $this->redirect($pathinfo.'/', 'collaborator');
            }
            return array (  '_controller' => 'Pasa\\RequirementBundle\\Controller\\CollaboratorController::indexAction',  '_route' => 'collaborator',);
        }

        // collaborator_show
        if (0 === strpos($pathinfo, '/collaborator') && preg_match('#^/collaborator/(?P<id>[^/]+?)/show$#s', $pathinfo, $matches)) {
            return array_merge($this->mergeDefaults($matches, array (  '_controller' => 'Pasa\\RequirementBundle\\Controller\\CollaboratorController::showAction',)), array('_route' => 'collaborator_show'));
        }

        // collaborator_new
        if ($pathinfo === '/collaborator/new') {
            return array (  '_controller' => 'Pasa\\RequirementBundle\\Controller\\CollaboratorController::newAction',  '_route' => 'collaborator_new',);
        }

        // collaborator_create
        if ($pathinfo === '/collaborator/create') {
            if ($this->context->getMethod() != 'POST') {
                $allow[] = 'POST';
                goto not_collaborator_create;
            }
            return array (  '_controller' => 'Pasa\\RequirementBundle\\Controller\\CollaboratorController::createAction',  '_route' => 'collaborator_create',);
        }
        not_collaborator_create:

        // collaborator_edit
        if (0 === strpos($pathinfo, '/collaborator') && preg_match('#^/collaborator/(?P<id>[^/]+?)/edit$#s', $pathinfo, $matches)) {
            return array_merge($this->mergeDefaults($matches, array (  '_controller' => 'Pasa\\RequirementBundle\\Controller\\CollaboratorController::editAction',)), array('_route' => 'collaborator_edit'));
        }

        // collaborator_update
        if (0 === strpos($pathinfo, '/collaborator') && preg_match('#^/collaborator/(?P<id>[^/]+?)/update$#s', $pathinfo, $matches)) {
            if ($this->context->getMethod() != 'POST') {
                $allow[] = 'POST';
                goto not_collaborator_update;
            }
            return array_merge($this->mergeDefaults($matches, array (  '_controller' => 'Pasa\\RequirementBundle\\Controller\\CollaboratorController::updateAction',)), array('_route' => 'collaborator_update'));
        }
        not_collaborator_update:

        // collaborator_delete
        if (0 === strpos($pathinfo, '/collaborator') && preg_match('#^/collaborator/(?P<id>[^/]+?)/delete$#s', $pathinfo, $matches)) {
            if ($this->context->getMethod() != 'POST') {
                $allow[] = 'POST';
                goto not_collaborator_delete;
            }
            return array_merge($this->mergeDefaults($matches, array (  '_controller' => 'Pasa\\RequirementBundle\\Controller\\CollaboratorController::deleteAction',)), array('_route' => 'collaborator_delete'));
        }
        not_collaborator_delete:

        throw 0 < count($allow) ? new MethodNotAllowedException(array_unique($allow)) : new ResourceNotFoundException();
    }
}


text:
<?php
/* Problem 01.	Sum Two Numbers */
declare(strict_types = 1);

$a = floatval(trim(fgets(STDIN)));
$b = floatval(trim(fgets(STDIN)));

$sumTwo = function(float $a, float $b){
    return $a + $b;
}; // anonymous function

echo $sumTwo($a, $b);

redpajama_set_name: RedPajamaGithub


text:
const mongoose = require('mongoose');
const Schema = mongoose.Schema;

const UserSchema = new Schema({
  acount: { type: String },
  password: { type: String },
	company: [{
		type: Schema.Types.ObjectId,
		ref: 'company'
	}],
});

UserSchema.statics.addCompany = function(acount, name, position,
  reservationDate, minSalary, maxSalary) {
  const Company = mongoose.model('company');

  return this.findOne({ acount: acount })
    .then(user => {
      const company = new Company({ name, position,
        reservationDate, minSalary, maxSalary })
      user.company.push(company)
      return Promise.all([company.save(), user.save()])
        .then(([company, user]) => user);
    });
}

UserSchema.statics.findCompany = function(id) {
	return this.findById(id)
	  .populate('company')
	  .then(user => user.company);
}

mongoose.model('user', UserSchema);


text:
package binding

import (
	"net/http"

	"gopkg.in/go-playground/validator.v8"
)

const (
	MIMEJSON              = "application/json"
	MIMEHTML              = "text/html"
	MIMEXML               = "application/xml"
	MIMEXML2              = "text/xml"
	MIMEPlain             = "text/plain"
	MIMEPOSTForm          = "application/x-www-form-urlencoded"
	MIMEMultipartPOSTForm = "multipart/form-data"
	MIMEPROTOBUF          = "application/x-protobuf"
	MIMEMSGPACK           = "application/x-msgpack"
	MIMEMSGPACK2          = "application/msgpack"
)

type Binding interface {
	Name() string
	Bind(*http.Request, interface{}) error
}

type StructValidator interface {
	// ValidateStruct can receive any kind of type and it should never panic, even if the configuration is not right.
	// If the received type is not a struct, any validation should be skipped and nil must be returned.
	// If the received type is a struct or pointer to a struct, the validation should be performed.
	// If the struct is not valid or the validation itself fails, a descriptive error should be returned.
	// Otherwise nil must be returned.
	ValidateStruct(interface{}) error

	// RegisterValidation adds a validation Func to a Validate's map of validators denoted by the key
	// NOTE: if the key already exists, the previous validation function will be replaced.
	// NOTE: this method is not thread-safe it is intended that these all be registered prior to any validation
	RegisterValidation(string, validator.Func) error
}

var Validator StructValidator = &defaultValidator{}

var (
	JSON          = jsonBinding{}
	XML           = xmlBinding{}
	Form          = formBinding{}
	Query         = queryBinding{}
	FormPost      = formPostBinding{}
	FormMultipart = formMultipartBinding{}
	ProtoBuf      = protobufBinding{}
	MsgPack       = msgpackBinding{}
)

func Default(method, contentType string) Binding {
	if method == "GET" {
		return Form
	}

	switch contentType {
	case MIMEJSON:
		return JSON
	case MIMEXML, MIMEXML2:
		return XML
	case MIMEPROTOBUF:
		return ProtoBuf
	case MIMEMSGPACK, MIMEMSGPACK2:
		return MsgPack
	default: //case MIMEPOSTForm, MIMEMultipartPOSTForm:
		return Form
	}
}

func validate(obj interface{}) error {
	if Validator == nil {
		return nil
	}
	return Validator.ValidateStruct(obj)
}


text:
int y;
float x = (float)&y; // CHECK: /error: cast from pointer to floating type/


text:
using System;
using System.Collections.Generic;
using System.ComponentModel.Composition;
using System.ComponentModel.Design;
using Microsoft.PythonTools;
using Microsoft.PythonTools.Intellisense;
using Microsoft.PythonTools.Navigation;
using Microsoft.PythonTools.Options;
using Microsoft.PythonTools.Project;
using Microsoft.VisualStudio;
using Microsoft.VisualStudio.Settings;
using Microsoft.VisualStudio.Shell;
using Microsoft.VisualStudio.Shell.Interop;
using Microsoft.VisualStudio.Text.Adornments;
using Microsoft.VisualStudioTools;
using Microsoft.VisualStudioTools.MockVsTests;
using TestUtilities.Python;

namespace PythonToolsMockTests {
    using TaskProvider = Microsoft.PythonTools.Intellisense.TaskProvider;

    [Export(typeof(IMockPackage))]
    sealed class MockPythonToolsPackage : IMockPackage {
        private readonly IServiceContainer _serviceContainer;
        private readonly List<Action> _onDispose = new List<Action>();

        [ImportingConstructor]
        public MockPythonToolsPackage([Import(typeof(SVsServiceProvider))]IServiceContainer serviceProvider) {
            _serviceContainer = serviceProvider;
        }

        public void Initialize() {
            var settings = (IVsSettingsManager)_serviceContainer.GetService(typeof(SVsSettingsManager));
            IVsWritableSettingsStore store;
            ErrorHandler.ThrowOnFailure(settings.GetWritableSettingsStore((uint)SettingsScope.Configuration, out store));

            _serviceContainer.AddService(typeof(IPythonToolsOptionsService), (sp, t) => new MockPythonToolsOptionsService());
            _serviceContainer.AddService(typeof(IClipboardService), (sp, t) => new MockClipboardService());
            _serviceContainer.AddService(typeof(MockErrorProviderFactory), (sp, t) => new MockErrorProviderFactory(), true);
            _serviceContainer.AddService(typeof(PythonLanguageInfo), (sp, t) => new PythonLanguageInfo(sp), true);
            _serviceContainer.AddService(typeof(PythonToolsService), (sp, t) => new PythonToolsService(sp), true);
            _serviceContainer.AddService(typeof(ErrorTaskProvider), CreateTaskProviderService, true);
            _serviceContainer.AddService(typeof(CommentTaskProvider), CreateTaskProviderService, true);
            _serviceContainer.AddService(typeof(SolutionEventsListener), (sp, t) => new SolutionEventsListener(sp), true);

            UIThread.EnsureService(_serviceContainer);

            _serviceContainer.AddService(typeof(IPythonLibraryManager), (object)null);

            // register our project factory...
            var regProjectTypes = (IVsRegisterProjectTypes)_serviceContainer.GetService(typeof(SVsRegisterProjectTypes));
            uint cookie;
            var guid = Guid.Parse(PythonConstants.ProjectFactoryGuid);
            regProjectTypes.RegisterProjectType(
                ref guid,
                new PythonProjectFactory(_serviceContainer),
                out cookie
            );
        }

        public void RemoveService(Type type) {
            _serviceContainer.RemoveService(type);
        }

        public static bool SuppressTaskProvider { get; set; }

        private static object CreateTaskProviderService(IServiceContainer container, Type type) {
            if (SuppressTaskProvider) {
                return null;
            }
            var errorProvider = container.GetComponentModel().GetService<IErrorProviderFactory>();
            if (type == typeof(ErrorTaskProvider)) {
                return new ErrorTaskProvider(container, null, errorProvider);
            } else if (type == typeof(CommentTaskProvider)) {
                return new CommentTaskProvider(container, null, errorProvider);
            } else {
                return null;
            }
        }

        public void Dispose() {
            List<Action> tasks;
            lock (_onDispose) {
                tasks = new List<Action>(_onDispose);
                _onDispose.Clear();
            }

            foreach (var t in tasks) {
                t();
            }
        }
    }
}


text:
/*
  call_closure

  - url: the url of the web app
  - closure_key: comes from Scheme (e.g., using body-as-closure-key)
  - post_params: a dict from post keys to values.
  - callback (optional): a thunk
 */
function call_closure(url, closure_key, post_params, callback) {
  if (callback == null) {
    callback = function() { };
  }
  post_params['function'] = closure_key;
  $.post(url, post_params, callback, "json");
}

/*
  load_into_dom_id

  loads the result of calling the given closure into a dom elt on your web page.

  - url: the url of the web app (cannot have query params unless post_params is empty)
  - closure_key: comes from Scheme (e.g., using body-as-url)
  - dom_id: some elt in your page
  - post_params: a dict from post keys to values.

  MMM could add an optional fn to pass as 3rd arg to load, which is just a done callback
 */
function load_into_dom_id(url, closure_key, dom_id, post_params) {
  var elt_str = '#' + dom_id;
  post_params['function'] = closure_key;
  $(elt_str).load(url, post_params);
}

// turns the given link_elt to a show/hide toggler of the given elt.
function show_hide_link(elt_id, link_elt_id, hide_label, show_by_default) {
  $(document).ready(function() {
      var to_toggle = $('#' + elt_id);
      var link_elt = $('#' + link_elt_id);
      var show_label = link_elt.html();
      if (show_by_default) {
	link_elt.html(hide_label);
	to_toggle.show();
      }
      else {
	link_elt.html(show_label);
	to_toggle.hide();
      }
      link_elt.click (function() {
	  if (link_elt.html() == hide_label) {
	    link_elt.html(show_label);
	  }
	  else {
	    link_elt.html(hide_label);
	  }
	  to_toggle.toggle();
	  return false;
	});
    });
}


text:
@charset "utf-8";

/* css reset */
html, body, div, span,  object, iframe,
h1, h2, h3, h4, h5, h6, p, blockquote, pre,
a, abbr, acronym, address, big, cite, code,
del, dfn, em, img, ins, kbd, q, s, samp,
small, strike, strong, sub, sup, tt, var,
dl, dt, dd, ol, ul, li,
fieldset, form, label, legend,
table, caption, tbody, tfoot, thead, tr, th, td,
article, aside, canvas,figure, figcaption, footer, header, hgroup,
menu, nav,section, summary,
time, mark, audio, video,button,input,select,option {
  margin: 0;
  padding: 0;
  border: 0;
  font-family:"微软雅黑";
  font-size: 100%;-webkit-text-size-adjust:none;
 }
h2,h3,h4{font-weight: normal;-webkit-text-size-adjust:none;}

/* applyPage css*/
body{background: #f0f0f0;}
.main_applyPage {z-index:1;background: #f0f0f0; position: absolute; left: 0; right: 0; top: 0; bottom: 0;}
.main_accontsPage h2,
.main_applyPage h2 ,
.main_registerPage h2,
.main_fingerPage h2{font-size:1.5rem; text-align: center; font-weight: normal;margin:1rem 0;}
.apply_inputList {width: 80%;margin:1.2rem 7%; background: #fff;padding: 3%;border-radius:0.5rem;}
.apply_inputList ul li{font-size:.925rem;height: 2.5rem; color: #737373; line-height: 3rem;position:relative; display: block;border-bottom:1px solid #f0f0f0; }
.apply_inputList ul li span{color: #db761e}
.apply_inputList ul li:last-child {border-bottom: 0;}
.submit_seartch{font-size:1.3rem;background:url(../image/button_background.jpg);border: 0;color: #fff; background-size:100% 100%;display: block; height: 2.5rem;width:40%; line-height:2.5rem; margin:1rem auto;}
.prompt_massge {color: red; display: block; font-size: 1rem; text-align: center;}

.search_list {clear:both;width:85%;margin:1.2rem auto;}
.search_list span{color: #db761e;font-size:.925rem;height: 2.5rem;line-height: 2.5rem;display: inline-block;}
.search_list input{  font-size: 0.85rem;  width: 74%;height:1.8rem;display:inline-block;background: #e7e7e7;box-shadow: 0 0 3px #ccc inset;border-radius:.35rem;}
.main_applyPage h4{text-align: center;margin-bottom: 1rem;line-height: 2.5rem;}
.main_applyPage h5{text-align: center; font-weight: normal;font-size: .8rem;margin:1rem auto;}
.main_applyPage h4 span{color: #db761e;}
.main_applyPage h4 img{  width: 2rem;  vertical-align: middle;  margin-right: 0.5rem;}

@media (min-width:320px){
	body{font-size: 16px;}
}
@media (min-width:480px){
	body{font-size: 22px;}
}
@media (min-width:540px){
	body{font-size: 24px;}
}
@media (min-width:720px){
	body{font-size: 22px;}
}

@media (device-width:375px) and (-webkit-min-device-pixel-ratio:2){/* 兼容iphone 6 */
	body{font-size: 20px;}
}
@media (device-width:414px) and (-webkit-min-device-pixel-ratio:3.0){/* 兼容iphone6 plus */
	body{font-size: 22px;}
	.apply_inputList label ,
	.apply_inputList label input{height:3.3rem; line-height: 3.3rem;}
	button.submit{margin:0.5rem auto;}
}

@media (device-height:480px) and (-webkit-min-device-pixel-ratio:2){/* 兼容iphone4/4s */
	body{font-size: 16px;}
	.apply_inputList label ,
	.apply_inputList label input{height:2.75rem; line-height: 2.75rem;}
	button.submit{margin:3% auto;}
	.main_fingerPage h2 {margin:.5rem auto;}
	.main_applyPage h2 {margin:0.8rem auto;}
}
@media (device-height:568px){/* 兼容iphone5 */
}
@media screen (min-width: 1024px){
	body{font-size:30px;}
}
.main_fingerPage .nomargin {margin:0 6%;}
body.auto_scroll .main_applyPage {overflow-y:auto; }


text:
namespace SunLine.Community.Repositories.Migrations
{
    using System.CodeDom.Compiler;
    using System.Data.Entity.Migrations;
    using System.Data.Entity.Migrations.Infrastructure;
    using System.Resources;

    [GeneratedCode("EntityFramework.Migrations", "6.1.1-30610")]
    public sealed partial class MoveFavouriteMessageToNewTable : IMigrationMetadata
    {
        private readonly ResourceManager Resources = new ResourceManager(typeof(MoveFavouriteMessageToNewTable));

        string IMigrationMetadata.Id
        {
            get { return "201412041103039_MoveFavouriteMessageToNewTable"; }
        }

        string IMigrationMetadata.Source
        {
            get { return null; }
        }

        string IMigrationMetadata.Target
        {
            get { return Resources.GetString("Target"); }
        }
    }
}


text:
gravel-common-ssl
==========

OpenSSL TLS-PSK wrapper for Python

Use `ssl_psk.wrap_socket` instead of 'ssl.wrap_socket' with `psk` paramater set to PSK key string.

```
wrapper = ssl_psk.wrap_socket(sock, psk='really secret secret', ciphers='PSK-AES256-CBC-SHA',
                              ssl_version=ssl.PROTOCOL_TLSv1,
                              server_side=True)
```


text:
package br.com.revisao;

public class Printf {

	public static void main(String[] args) {
		// TODO Auto-generated method stub

		System.out.printf("%s %s %d","printf:","Ola mundo",2);

	}

}


text:
#ifndef SKELETON_H
#define SKELETON_H

#include <vector>
#include <memory>
#include <functional>

#include "Transform.h"
#include "Animation.h"

struct Joint
{
	Transform transform;
    Vector2i screenCoord;
    bool isHovered;
    bool isPicked;
	bool hasDelta;
	int index;

	Joint() :
		isHovered{ false },
		isPicked{ false },
		hasDelta{ false }
	{
		transform.setJoint(this);
	}

	void setDelta(bool delta)
	{
		hasDelta = delta;
		for (auto& t : transform.getChildren())
		{
			t->getJoint()->setDelta(delta);
		}
	}
};

class Skeleton
{
private:
    std::vector<std::unique_ptr<Joint>> joints;

    /*Update screen coordinates of joints*/
	void updateScreenCoord();

public:
    /*True if the skeleton has a joint selected*/
    bool hasJointSelected;

	Animation animation;
	size_t currentFrameIdx;
	bool isAnimating;

	AnimationKeyFrame* from;
	AnimationKeyFrame* to;

	float time;
	float duration;

	std::function<Quatf(const Quatf&, const Quatf&, float t)>  interpFunction;

	Skeleton()
		: hasJointSelected{ false }
		, currentFrameIdx{ 0 }
		, isAnimating{ false }
		, interpFunction{Quatf::slerp}
	{
		animation.keyframes.push_back(AnimationKeyFrame());
	};
    /*
     * Load Skeleton file
     */
    void loadSkeleton(std::string skelFileName);

    /*
     * Load animation file
     */
    void loadAnimation(std::string skelFileName);

    /*
     * Draw skeleton with OpenGL
     */
    void glDrawSkeleton();

	void glDrawTransformHierarchy(Joint& root) const;

    /*
     * Check if any joint is hovered by given mouse coordinate
     */
    void checkHoveringStatus(int x, int y);

    void release();

    void selectOrReleaseJoint();

	Joint* getSelectedJoint();

	const std::vector<std::unique_ptr<Joint>>* getJoints() const;

	void resetDeltas() const;

	auto setPose(const AnimationKeyFrame& frame) -> void;

	auto updateAnimation(float delta) -> void;

	auto resetAnimParams() -> void;
};

#endif


text:
<?php

namespace AppBundle\Controller;

use AppBundle\Form\SubCategoryType;
use Doctrine\ORM\Query\Expr\Join;
use Symfony\Bundle\FrameworkBundle\Controller\Controller;
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Method;
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Route;
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Template;
use AppBundle\Entity\SubCategory;
use Symfony\Component\HttpFoundation\JsonResponse;
use Symfony\Component\HttpFoundation\Request;

/**
 * SubCategory controller.
 *
 * @Route("/admin")
 */
class SubCategoryController extends Controller
{

    /**
     * Lists all SubCategory entities.
     *
     * @Route("/sub-category", name="subCategory")
     * @Template()
     */
    public function indexAction(Request $request)
    {
        $em = $this->getDoctrine()->getManager();

       $categoryId = $request->query->get("categoryId");

        $builder = $em->createQueryBuilder();
        $builder->select("sc.id, sc.name, c.categoryName, sc.isDeleted")
                         ->from("AppBundle:SubCategory" ,'sc')
                         ->leftjoin("AppBundle:Category", "c" , Join::WITH , 'sc.categoryId = c.id ')
                         ->orderBy("sc.name", "DESC")
            ;
        if( intval($categoryId) > 0  ) {
            $builder->where('sc.categoryId = :categoryId')
                    ->setParameter("categoryId", $categoryId);

        }

        $query = $builder->getQuery();

        $subCategories = $query->getResult();

        if( $request->isXmlHttpRequest() ) {
            return new JsonResponse( array (
                            'success' => true,
                            'data' => $subCategories
                        )
                    );
        }

        return array(
            'subCategories' => $subCategories,
        );
    }

    /**
     * Add New Sub Category.
     *
     * @Route("/sub-category/add", name="addNewSubCategory")
     * @Template("AppBundle:SubCategory:add-new-sub-category.html.twig")
     */
    public function addNewSubCategoryAction(Request $request)
    {
        $subCategory = new SubCategory();
        $form = $this->createForm(new SubCategoryType(), $subCategory);
        $form->handleRequest($request);
        $errors = "";
        if( $request->isMethod("POST") ) {
            $subCategory->setCategoryId( $request->request->get("categoryId"));
            $session = $request->getSession();
            if ($form->isValid() && $subCategory->getName() != "") {
                $em = $this->getDoctrine()->getManager();
                $em->persist($subCategory);
                $em->flush();

                $session->getFlashBag()->add('success', 'New sub category has been added successfully.');

                return $this->redirect($this->generateUrl("subCategory"));

            } else {
                $session->getFlashBag()->add('danger', 'Please Enter Valid data');
            }
        }

        $categories = $this->getDoctrine()->getRepository("AppBundle:Category")->findAll();
        //var_dump($categories);exit;

        return array(
            'form' => $form->createView(),
            'errors' => $errors,
            'categories' => $categories
        );
    }

    /**
     * Finds and displays a SubCategory entity.
     *
     * @Route("/subcategory-details/{id}", name="subCategoryDetails")
     * @Method("GET")
     * @Template()
     */
    public function showAction($id)
    {
        $em = $this->getDoctrine()->getManager();

        $entity = $em->getRepository('AppBundle:SubCategory')->find($id);

        if (!$entity) {
            throw $this->createNotFoundException('Unable to find SubCategory entity.');
        }

        return array(
            'entity'      => $entity,
        );
    }
}


text:
<?xml version="1.0" encoding="utf-8"?>
<!--
  ~ Copyright 2014 Regional Adult Education Program of Lee, Scott, Wise, and Norton Public Schools
  ~
  ~    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.
  -->

<edu.mecc.race2ged.navigation.DrawerLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:id="@+id/side_panel_frame"
    android:layout_width="match_parent"
    android:layout_height="match_parent">

    <ListView
        android:id="@+id/side_panel_list_view"
        android:background="@color/drawer_bg_color"
        android:layout_width="fill_parent"
        android:layout_height="fill_parent"
        android:listSelector="@android:color/transparent"
        android:divider="@null"
        android:dividerHeight="0.0px" />

</edu.mecc.race2ged.navigation.DrawerLayout>


text:
#include "IfrLibrary.h"

EFI_STATUS
GetCurrentLanguage (
  OUT     CHAR16              *Lang
  )
/*++

Routine Description:

  Determine what is the current language setting

Arguments:

  Lang      - Pointer of system language

Returns:

  Status code

--*/
{
  EFI_STATUS  Status;
  UINTN       Size;
  UINTN       Index;
  CHAR8       Language[4];

  //
  // Getting the system language and placing it into our Global Data
  //
  Size = sizeof (Language);

  Status = gRT->GetVariable (
                  L"Lang",
                  &gEfiGlobalVariableGuid,
                  NULL,
                  &Size,
                  Language
                  );

  if (EFI_ERROR (Status)) {
    EfiAsciiStrCpy (Language, (CHAR8 *) "eng");
  }

  for (Index = 0; Index < 3; Index++) {
    //
    // Bitwise AND ascii value with 0xDF yields an uppercase value.
    // Sign extend into a unicode value
    //
    Lang[Index] = (CHAR16) (Language[Index] & 0xDF);
  }

  //
  // Null-terminate the value
  //
  Lang[3] = (CHAR16) 0;

  return Status;
}

#ifdef SUPPORT_DEPRECATED_IFRSUPPORTLIB_API
EFI_STATUS
AddString (
  IN      VOID                *StringBuffer,
  IN      CHAR16              *Language,
  IN      CHAR16              *String,
  IN OUT  STRING_REF          *StringToken
  )
/*++

Routine Description:

  Add a string to the incoming buffer and return the token and offset data

Arguments:

  StringBuffer      - The incoming buffer

  Language          - Currrent language

  String            - The string to be added

  StringToken       - The index where the string placed

Returns:

  EFI_OUT_OF_RESOURCES    - No enough buffer to allocate

  EFI_SUCCESS             - String successfully added to the incoming buffer

--*/
{
  EFI_HII_STRING_PACK *StringPack;
  EFI_HII_STRING_PACK *StringPackBuffer;
  VOID                *NewBuffer;
  RELOFST             *PackSource;
  RELOFST             *PackDestination;
  UINT8               *Source;
  UINT8               *Destination;
  UINTN               Index;
  BOOLEAN             Finished;
  UINTN               SizeofLanguage;
  UINTN               SizeofString;

  StringPack  = (EFI_HII_STRING_PACK *) StringBuffer;
  Finished    = FALSE;

  //
  // Pre-allocate a buffer sufficient for us to work on.
  // We will use it as a destination scratch pad to build data on
  // and when complete shift the data back to the original buffer
  //
  NewBuffer = EfiLibAllocateZeroPool (DEFAULT_STRING_BUFFER_SIZE);
  if (NewBuffer == NULL) {
    return EFI_OUT_OF_RESOURCES;
  }

  StringPackBuffer = (EFI_HII_STRING_PACK *) NewBuffer;

  //
  // StringPack is terminated with a length 0 entry
  //
  for (; StringPack->Header.Length != 0;) {
    //
    // If this stringpack's language is same as CurrentLanguage, use it
    //
    if (EfiCompareMem ((VOID *) ((CHAR8 *) (StringPack) + StringPack->LanguageNameString), Language, 3) == 0) {
      //
      // We have some data in this string pack, copy the string package up to the string data
      //
      EfiCopyMem (&StringPackBuffer->Header, &StringPack->Header, sizeof (StringPack));

      //
      // These are references in the structure to tokens, need to increase them by the space occupied by an additional StringPointer
      //
      StringPackBuffer->LanguageNameString = (UINT16) (StringPackBuffer->LanguageNameString + (UINT16) sizeof (RELOFST));
      StringPackBuffer->PrintableLanguageName = (UINT16) (StringPackBuffer->PrintableLanguageName + (UINT16) sizeof (RELOFST));

      PackSource      = (RELOFST *) (StringPack + 1);
      PackDestination = (RELOFST *) (StringPackBuffer + 1);
      for (Index = 0; PackSource[Index] != 0x0000; Index++) {
        //
        // Copy the stringpointers from old to new buffer
        // remember that we are adding a string, so the string offsets will all go up by sizeof (RELOFST)
        //
        PackDestination[Index] = (UINT16) (PackDestination[Index] + sizeof (RELOFST));
      }

      //
      // Add a new stringpointer in the new buffer since we are adding a string.  Null terminate it
      //
      PackDestination[Index] = (UINT16)(PackDestination[Index-1] +
                                        EfiStrSize((CHAR16 *)((CHAR8 *)(StringPack) + PackSource[Index-1])));
      PackDestination[Index + 1] = (UINT16) 0;

      //
      // Index is the token value for the new string
      //
      *StringToken = (UINT16) Index;

      //
      // Source now points to the beginning of the old buffer strings
      // Destination now points to the beginning of the new buffer strings
      //
      Source      = (UINT8 *) &PackSource[Index + 1];
      Destination = (UINT8 *) &PackDestination[Index + 2];

      //
      // This should copy all the strings from the old buffer to the new buffer
      //
      for (; Index != 0; Index--) {
        //
        // Copy Source string to destination buffer
        //
        EfiStrCpy ((CHAR16 *) Destination, (CHAR16 *) Source);

        //
        // Adjust the source/destination to the next string location
        //
        Destination = Destination + EfiStrSize ((CHAR16 *) Source);
        Source      = Source + EfiStrSize ((CHAR16 *) Source);
      }

      //
      // This copies the new string to the destination buffer
      //
      EfiStrCpy ((CHAR16 *) Destination, (CHAR16 *) String);

      //
      // Adjust the size of the changed string pack by adding the size of the new string
      // along with the size of the additional offset entry for the new string
      //
      StringPackBuffer->Header.Length = (UINT32) ((UINTN) StringPackBuffer->Header.Length + EfiStrSize (String) + sizeof (RELOFST));

      //
      // Advance the buffers to point to the next spots.
      //
      StringPackBuffer  = (EFI_HII_STRING_PACK *) ((CHAR8 *) (StringPackBuffer) + StringPackBuffer->Header.Length);
      StringPack        = (EFI_HII_STRING_PACK *) ((CHAR8 *) (StringPack) + StringPack->Header.Length);
      Finished          = TRUE;
      continue;
    }
    //
    // This isn't the language of the stringpack we were asked to add a string to
    // so we need to copy it to the new buffer.
    //
    EfiCopyMem (&StringPackBuffer->Header, &StringPack->Header, StringPack->Header.Length);

    //
    // Advance the buffers to point to the next spots.
    //
    StringPackBuffer  = (EFI_HII_STRING_PACK *) ((CHAR8 *) (StringPackBuffer) + StringPack->Header.Length);
    StringPack        = (EFI_HII_STRING_PACK *) ((CHAR8 *) (StringPack) + StringPack->Header.Length);
  }

  //
  // If we didn't copy the new data to a stringpack yet
  //
  if (!Finished) {
    PackDestination = (RELOFST *) (StringPackBuffer + 1);
    //
    // Pointing to a new string pack location
    //
    SizeofLanguage = EfiStrSize (Language);
    SizeofString   = EfiStrSize (String);
    StringPackBuffer->Header.Length = (UINT32)
      (
        sizeof (EFI_HII_STRING_PACK) -
        sizeof (EFI_STRING) +
        sizeof (RELOFST) +
        sizeof (RELOFST) +
        SizeofLanguage +
        SizeofString
      );
    StringPackBuffer->Header.Type           = EFI_HII_STRING;
    StringPackBuffer->LanguageNameString    = (UINT16) ((UINTN) &PackDestination[3] - (UINTN) StringPackBuffer);
    StringPackBuffer->PrintableLanguageName = (UINT16) ((UINTN) &PackDestination[3] - (UINTN) StringPackBuffer);
    StringPackBuffer->Attributes            = 0;
    PackDestination[0]                      = (UINT16) ((UINTN) &PackDestination[3] - (UINTN) StringPackBuffer);
    PackDestination[1]                      = (UINT16) (PackDestination[0] + EfiStrSize (Language));
    PackDestination[2]                      = (UINT16) 0;

    //
    // The first string location will be set to destination.  The minimum number of strings
    // associated with a stringpack will always be token 0 stored as the languagename (e.g. ENG, SPA, etc)
    // and token 1 as the new string being added and and null entry for the stringpointers
    //
    Destination = (CHAR8 *) &PackDestination[3];

    //
    // Copy the language name string to the new buffer
    //
    EfiStrCpy ((CHAR16 *) Destination, Language);

    //
    // Advance the destination to the new empty spot
    //
    Destination = Destination + EfiStrSize (Language);

    //
    // Copy the string to the new buffer
    //
    EfiStrCpy ((CHAR16 *) Destination, String);

    //
    // Since we are starting with a new string pack - we know the new string is token 1
    //
    *StringToken = (UINT16) 1;
  }

  //
  // Zero out the original buffer and copy the updated data in the new buffer to the old buffer
  //
  EfiZeroMem (StringBuffer, DEFAULT_STRING_BUFFER_SIZE);
  EfiCopyMem (StringBuffer, NewBuffer, DEFAULT_STRING_BUFFER_SIZE);

  //
  // Free the newly created buffer since we don't need it anymore
  //
  gBS->FreePool (NewBuffer);
  return EFI_SUCCESS;
}

EFI_STATUS
AddOpCode (
  IN      VOID                *FormBuffer,
  IN OUT  VOID                *OpCodeData
  )
/*++

Routine Description:

  Add op-code data to the FormBuffer

Arguments:

  FormBuffer      - Form buffer to be inserted to

  OpCodeData      - Op-code data to be inserted

Returns:

  EFI_OUT_OF_RESOURCES    - No enough buffer to allocate

  EFI_SUCCESS             - Op-code data successfully inserted

--*/
{
  EFI_HII_PACK_HEADER *NewBuffer;
  UINT8               *Source;
  UINT8               *Destination;

  //
  // Pre-allocate a buffer sufficient for us to work on.
  // We will use it as a destination scratch pad to build data on
  // and when complete shift the data back to the original buffer
  //
  NewBuffer = EfiLibAllocateZeroPool (DEFAULT_FORM_BUFFER_SIZE);
  if (NewBuffer == NULL) {
    return EFI_OUT_OF_RESOURCES;
  }

  Source      = (UINT8 *) FormBuffer;
  Destination = (UINT8 *) NewBuffer;

  //
  // Copy the IFR Package header to the new buffer
  //
  EfiCopyMem (Destination, Source, sizeof (EFI_HII_PACK_HEADER));

  //
  // Advance Source and Destination to next op-code
  //
  Source      = Source + sizeof (EFI_HII_PACK_HEADER);
  Destination = Destination + sizeof (EFI_HII_PACK_HEADER);

  //
  // Copy data to the new buffer until we run into the end_form
  //
  for (; ((EFI_IFR_OP_HEADER *) Source)->OpCode != EFI_IFR_END_FORM_OP;) {
    //
    // If the this opcode is an end_form_set we better be creating and endform
    // Nonetheless, we will add data before the end_form_set.  This also provides
    // for interesting behavior in the code we will run, but has no bad side-effects
    // since we will possibly do a 0 byte copy in this particular end-case.
    //
    if (((EFI_IFR_OP_HEADER *) Source)->OpCode == EFI_IFR_END_FORM_SET_OP) {
      break;
    }

    //
    // Copy data to new buffer
    //
    EfiCopyMem (Destination, Source, ((EFI_IFR_OP_HEADER *) Source)->Length);

    //
    // Adjust Source/Destination to next op-code location
    //
    Destination = Destination + (UINTN) ((EFI_IFR_OP_HEADER *) Source)->Length;
    Source      = Source + (UINTN) ((EFI_IFR_OP_HEADER *) Source)->Length;
  }

  //
  // Prior to the end_form is where we insert the new op-code data
  //
  EfiCopyMem (Destination, OpCodeData, ((EFI_IFR_OP_HEADER *) OpCodeData)->Length);
  Destination       = Destination + (UINTN) ((EFI_IFR_OP_HEADER *) OpCodeData)->Length;

  NewBuffer->Length = (UINT32) (NewBuffer->Length + (UINT32) (((EFI_IFR_OP_HEADER *) OpCodeData)->Length));

  //
  // Copy end-form data to new buffer
  //
  EfiCopyMem (Destination, Source, ((EFI_IFR_OP_HEADER *) Source)->Length);

  //
  // Adjust Source/Destination to next op-code location
  //
  Destination = Destination + (UINTN) ((EFI_IFR_OP_HEADER *) Source)->Length;
  Source      = Source + (UINTN) ((EFI_IFR_OP_HEADER *) Source)->Length;

  //
  // Copy end-formset data to new buffer
  //
  EfiCopyMem (Destination, Source, ((EFI_IFR_OP_HEADER *) Source)->Length);

  //
  // Zero out the original buffer and copy the updated data in the new buffer to the old buffer
  //
  EfiZeroMem (FormBuffer, DEFAULT_FORM_BUFFER_SIZE);
  EfiCopyMem (FormBuffer, NewBuffer, DEFAULT_FORM_BUFFER_SIZE);

  //
  // Free the newly created buffer since we don't need it anymore
  //
  gBS->FreePool (NewBuffer);
  return EFI_SUCCESS;
}
#endif

EFI_STATUS
GetHiiInterface (
  OUT     EFI_HII_PROTOCOL    **Hii
  )
/*++

Routine Description:

  Get the HII protocol interface

Arguments:

  Hii     - HII protocol interface

Returns:

  Status code

--*/
{
  EFI_STATUS  Status;

  //
  // There should only be one HII protocol
  //
  Status = gBS->LocateProtocol (
                  &gEfiHiiProtocolGuid,
                  NULL,
                  (VOID **) Hii
                  );

  return Status;;
}

EFI_STATUS
ExtractDataFromHiiHandle (
  IN      EFI_HII_HANDLE      HiiHandle,
  IN OUT  UINT16              *ImageLength,
  OUT     UINT8               *DefaultImage,
  OUT     EFI_GUID            *Guid
  )
/*++

Routine Description:

  Extract information pertaining to the HiiHandle

Arguments:

  HiiHandle       - Hii handle

  ImageLength     - For input, length of DefaultImage;
                    For output, length of actually required

  DefaultImage    - Image buffer prepared by caller

  Guid            - Guid information about the form

Returns:

  EFI_OUT_OF_RESOURCES    - No enough buffer to allocate

  EFI_BUFFER_TOO_SMALL    - DefualtImage has no enough ImageLength

  EFI_SUCCESS             - Successfully extract data from Hii database.

--*/
{
  EFI_STATUS        Status;
  EFI_HII_PROTOCOL  *Hii;
  UINTN             DataLength;
  UINT8             *RawData;
  UINT8             *OldData;
  UINTN             Index;
  UINTN             Temp;
  UINTN             SizeOfNvStore;
  UINTN             CachedStart;

  DataLength    = DEFAULT_FORM_BUFFER_SIZE;
  SizeOfNvStore = 0;
  CachedStart   = 0;

  Status        = GetHiiInterface (&Hii);

  if (EFI_ERROR (Status)) {
    return Status;
  }

  //
  // Allocate space for retrieval of IFR data
  //
  RawData = EfiLibAllocateZeroPool ((UINTN) DataLength);
  if (RawData == NULL) {
    return EFI_OUT_OF_RESOURCES;
  }

  //
  // Get all the forms associated with this HiiHandle
  //
  Status = Hii->GetForms (Hii, HiiHandle, 0, &DataLength, RawData);

  if (EFI_ERROR (Status)) {
    gBS->FreePool (RawData);

    //
    // Allocate space for retrieval of IFR data
    //
    RawData = EfiLibAllocateZeroPool ((UINTN) DataLength);
    if (RawData == NULL) {
      return EFI_OUT_OF_RESOURCES;
    }

    //
    // Get all the forms associated with this HiiHandle
    //
    Status = Hii->GetForms (Hii, HiiHandle, 0, &DataLength, RawData);
  }

  OldData = RawData;

  //
  // Point RawData to the beginning of the form data
  //
  RawData = (UINT8 *) ((UINTN) RawData + sizeof (EFI_HII_PACK_HEADER));

  for (Index = 0; RawData[Index] != EFI_IFR_END_FORM_SET_OP;) {
    switch (RawData[Index]) {
    case EFI_IFR_FORM_SET_OP:
      //
      // Copy the GUID information from this handle
      //
      EfiCopyMem (Guid, &((EFI_IFR_FORM_SET *) &RawData[Index])->Guid, sizeof (EFI_GUID));
      break;

    case EFI_IFR_ONE_OF_OP:
    case EFI_IFR_CHECKBOX_OP:
    case EFI_IFR_NUMERIC_OP:
    case EFI_IFR_DATE_OP:
    case EFI_IFR_TIME_OP:
    case EFI_IFR_PASSWORD_OP:
    case EFI_IFR_STRING_OP:
      //
      // Remember, multiple op-codes may reference the same item, so let's keep a running
      // marker of what the highest QuestionId that wasn't zero length.  This will accurately
      // maintain the Size of the NvStore
      //
      if (((EFI_IFR_ONE_OF *) &RawData[Index])->Width != 0) {
        Temp = ((EFI_IFR_ONE_OF *) &RawData[Index])->QuestionId + ((EFI_IFR_ONE_OF *) &RawData[Index])->Width;
        if (SizeOfNvStore < Temp) {
          SizeOfNvStore = ((EFI_IFR_ONE_OF *) &RawData[Index])->QuestionId + ((EFI_IFR_ONE_OF *) &RawData[Index])->Width;
        }
      }
    }

    Index = RawData[Index + 1] + Index;
  }

  //
  // Return an error if buffer is too small
  //
  if (SizeOfNvStore > *ImageLength || DefaultImage == NULL) {
    gBS->FreePool (OldData);
    *ImageLength = (UINT16) SizeOfNvStore;
    return EFI_BUFFER_TOO_SMALL;
  }

  EfiZeroMem (DefaultImage, SizeOfNvStore);

  //
  // Copy the default image information to the user's buffer
  //
  for (Index = 0; RawData[Index] != EFI_IFR_END_FORM_SET_OP;) {
    switch (RawData[Index]) {
    case EFI_IFR_ONE_OF_OP:
      CachedStart = ((EFI_IFR_ONE_OF *) &RawData[Index])->QuestionId;
      break;

    case EFI_IFR_ONE_OF_OPTION_OP:
      if (((EFI_IFR_ONE_OF_OPTION *) &RawData[Index])->Flags & EFI_IFR_FLAG_DEFAULT) {
        EfiCopyMem (&DefaultImage[CachedStart], &((EFI_IFR_ONE_OF_OPTION *) &RawData[Index])->Value, 2);
      }
      break;

    case EFI_IFR_CHECKBOX_OP:
      DefaultImage[((EFI_IFR_ONE_OF *) &RawData[Index])->QuestionId] = ((EFI_IFR_CHECK_BOX *) &RawData[Index])->Flags;
      break;

    case EFI_IFR_NUMERIC_OP:
      EfiCopyMem (
        &DefaultImage[((EFI_IFR_ONE_OF *) &RawData[Index])->QuestionId],
        &((EFI_IFR_NUMERIC *) &RawData[Index])->Default,
        2
        );
      break;

    }

    Index = RawData[Index + 1] + Index;
  }

  *ImageLength = (UINT16) SizeOfNvStore;

  //
  // Free our temporary repository of form data
  //
  gBS->FreePool (OldData);

  return EFI_SUCCESS;
}

EFI_HII_HANDLE
FindHiiHandle (
  IN OUT EFI_HII_PROTOCOL    **HiiProtocol, OPTIONAL
  IN     EFI_GUID            *Guid
  )
/*++

Routine Description:
  Finds HII handle for given pack GUID previously registered with the HII.

Arguments:
  HiiProtocol - pointer to pointer to HII protocol interface.
                If NULL, the interface will be found but not returned.
                If it points to NULL, the interface will be found and
                written back to the pointer that is pointed to.
  Guid        - The GUID of the pack that registered with the HII.

Returns:
  Handle to the HII pack previously registered by the memory driver.

--*/
{
  EFI_STATUS        Status;

  EFI_HII_HANDLE    *HiiHandleBuffer;
  EFI_HII_HANDLE    HiiHandle;
  UINT16            HiiHandleBufferLength;
  UINT32            NumberOfHiiHandles;
  EFI_GUID          HiiGuid;
  EFI_HII_PROTOCOL  *HiiProt;
  UINT32            Index;
  UINT16            Length;

  HiiHandle = 0;
  if ((HiiProtocol != NULL) && (*HiiProtocol != NULL)) {
    //
    // The protocol has been passed in
    //
    HiiProt = *HiiProtocol;
  } else {
    gBS->LocateProtocol (
          &gEfiHiiProtocolGuid,
          NULL,
          (VOID **) &HiiProt
          );
    if (HiiProt == NULL) {
      return HiiHandle;
    }

    if (HiiProtocol != NULL) {
      //
      // Return back the HII protocol for the caller as promissed
      //
      *HiiProtocol = HiiProt;
    }
  }
  //
  // Allocate buffer
  //
  HiiHandleBufferLength = 10;
  HiiHandleBuffer       = EfiLibAllocatePool (HiiHandleBufferLength);
  ASSERT (HiiHandleBuffer != NULL);

  //
  // Get the Handles of the packages that were registered with Hii
  //
  Status = HiiProt->FindHandles (
                      HiiProt,
                      &HiiHandleBufferLength,
                      HiiHandleBuffer
                      );

  //
  // Get a bigger bugffer if this one is to small, and try again
  //
  if (Status == EFI_BUFFER_TOO_SMALL) {

    gBS->FreePool (HiiHandleBuffer);

    HiiHandleBuffer = EfiLibAllocatePool (HiiHandleBufferLength);
    ASSERT (HiiHandleBuffer != NULL);

    Status = HiiProt->FindHandles (
                        HiiProt,
                        &HiiHandleBufferLength,
                        HiiHandleBuffer
                        );
  }

  if (EFI_ERROR (Status)) {
    goto lbl_exit;
  }

  NumberOfHiiHandles = HiiHandleBufferLength / sizeof (EFI_HII_HANDLE);

  //
  // Iterate Hii handles and look for the one that matches our Guid
  //
  for (Index = 0; Index < NumberOfHiiHandles; Index++) {

    Length = 0;
    ExtractDataFromHiiHandle (HiiHandleBuffer[Index], &Length, NULL, &HiiGuid);

    if (EfiCompareGuid (&HiiGuid, Guid)) {

      HiiHandle = HiiHandleBuffer[Index];
      break;
    }
  }

lbl_exit:
  gBS->FreePool (HiiHandleBuffer);
  return HiiHandle;
}

#ifdef SUPPORT_DEPRECATED_IFRSUPPORTLIB_API
EFI_STATUS
ValidateDataFromHiiHandle (
  IN      EFI_HII_HANDLE      HiiHandle,
  OUT     BOOLEAN             *Results
  )
/*++

Routine Description:

  Validate that the data associated with the HiiHandle in NVRAM is within
  the reasonable parameters for that FormSet.  Values for strings and passwords
  are not verified due to their not having the equivalent of valid range settings.

Arguments:

  HiiHandle -   Handle of the HII database entry to query

  Results -     If return Status is EFI_SUCCESS, Results provides valid data
                TRUE  = NVRAM Data is within parameters
                FALSE = NVRAM Data is NOT within parameters

Returns:

  EFI_OUT_OF_RESOURCES      - No enough buffer to allocate

  EFI_SUCCESS               - Data successfully validated
--*/
{
  EFI_STATUS        Status;
  EFI_HII_PROTOCOL  *Hii;
  EFI_GUID          Guid;
  UINT8             *RawData;
  UINT8             *OldData;
  UINTN             RawDataLength;
  UINT8             *VariableData;
  UINTN             Index;
  UINTN             Temp;
  UINTN             SizeOfNvStore;
  UINTN             CachedStart;
  BOOLEAN           GotMatch;

  RawDataLength = DEFAULT_FORM_BUFFER_SIZE;
  SizeOfNvStore = 0;
  CachedStart   = 0;
  GotMatch      = FALSE;
  *Results      = TRUE;

  Status        = GetHiiInterface (&Hii);

  if (EFI_ERROR (Status)) {
    return Status;
  }

  //
  // Allocate space for retrieval of IFR data
  //
  RawData = EfiLibAllocateZeroPool (RawDataLength);
  if (RawData == NULL) {
    return EFI_OUT_OF_RESOURCES;
  }

  //
  // Get all the forms associated with this HiiHandle
  //
  Status = Hii->GetForms (Hii, HiiHandle, 0, &RawDataLength, RawData);

  if (EFI_ERROR (Status)) {
    gBS->FreePool (RawData);

    //
    // Allocate space for retrieval of IFR data
    //
    RawData = EfiLibAllocateZeroPool (RawDataLength);
    if (RawData == NULL) {
      return EFI_OUT_OF_RESOURCES;
    }

    //
    // Get all the forms associated with this HiiHandle
    //
    Status = Hii->GetForms (Hii, HiiHandle, 0, &RawDataLength, RawData);
  }

  OldData = RawData;

  //
  // Point RawData to the beginning of the form data
  //
  RawData = (UINT8 *) ((UINTN) RawData + sizeof (EFI_HII_PACK_HEADER));

  for (Index = 0; RawData[Index] != EFI_IFR_END_FORM_SET_OP;) {
    if (RawData[Index] == EFI_IFR_FORM_SET_OP) {
      EfiCopyMem (&Guid, &((EFI_IFR_FORM_SET *) &RawData[Index])->Guid, sizeof (EFI_GUID));
      break;
    }

    Index = RawData[Index + 1] + Index;
  }

  for (Index = 0; RawData[Index] != EFI_IFR_END_FORM_SET_OP;) {
    switch (RawData[Index]) {
    case EFI_IFR_FORM_SET_OP:
      break;

    case EFI_IFR_ONE_OF_OP:
    case EFI_IFR_CHECKBOX_OP:
    case EFI_IFR_NUMERIC_OP:
    case EFI_IFR_DATE_OP:
    case EFI_IFR_TIME_OP:
    case EFI_IFR_PASSWORD_OP:
    case EFI_IFR_STRING_OP:
      //
      // Remember, multiple op-codes may reference the same item, so let's keep a running
      // marker of what the highest QuestionId that wasn't zero length.  This will accurately
      // maintain the Size of the NvStore
      //
      if (((EFI_IFR_ONE_OF *) &RawData[Index])->Width != 0) {
        Temp = ((EFI_IFR_ONE_OF *) &RawData[Index])->QuestionId + ((EFI_IFR_ONE_OF *) &RawData[Index])->Width;
        if (SizeOfNvStore < Temp) {
          SizeOfNvStore = ((EFI_IFR_ONE_OF *) &RawData[Index])->QuestionId + ((EFI_IFR_ONE_OF *) &RawData[Index])->Width;
        }
      }
    }

    Index = RawData[Index + 1] + Index;
  }

  //
  // Allocate memory for our File Form Tags
  //
  VariableData = EfiLibAllocateZeroPool (SizeOfNvStore);
  if (VariableData == NULL) {
    return EFI_OUT_OF_RESOURCES;
  }

  Status = gRT->GetVariable (
                  L"Setup",
                  &Guid,
                  NULL,
                  &SizeOfNvStore,
                  (VOID *) VariableData
                  );

  if (EFI_ERROR (Status)) {

    //
    // If there is a variable that exists already and it is larger than what we calculated the
    // storage needs to be, we must assume the variable size from GetVariable is correct and not
    // allow the truncation of the variable.  It is very possible that the user who created the IFR
    // we are cracking is not referring to a variable that was in a previous map, however we cannot
    // allow it's truncation.
    //
    if (Status == EFI_BUFFER_TOO_SMALL) {
      //
      // Free the buffer that was allocated that was too small
      //
      gBS->FreePool (VariableData);

      VariableData = EfiLibAllocatePool (SizeOfNvStore);
      if (VariableData == NULL) {
        return EFI_OUT_OF_RESOURCES;
      }

      Status = gRT->GetVariable (
                      L"Setup",
                      &Guid,
                      NULL,
                      &SizeOfNvStore,
                      (VOID *) VariableData
                      );
    }
  }

  //
  // Walk through the form and see that the variable data it refers to is ok.
  // This allows for the possibility of stale (obsoleted) data in the variable
  // can be overlooked without causing an error
  //
  for (Index = 0; RawData[Index] != EFI_IFR_END_FORM_SET_OP;) {
    switch (RawData[Index]) {
    case EFI_IFR_ONE_OF_OP:
      //
      // A one_of has no data, its the option that does - cache the storage Id
      //
      CachedStart = ((EFI_IFR_ONE_OF *) &RawData[Index])->QuestionId;
      break;

    case EFI_IFR_ONE_OF_OPTION_OP:
      //
      // A one_of_option can be any value
      //
      if (VariableData[CachedStart] == ((EFI_IFR_ONE_OF_OPTION *) &RawData[Index])->Value) {
        GotMatch = TRUE;
      }
      break;

    case EFI_IFR_END_ONE_OF_OP:
      //
      // At this point lets make sure that the data value in the NVRAM matches one of the options
      //
      if (!GotMatch) {
        *Results = FALSE;
        return EFI_SUCCESS;
      }
      break;

    case EFI_IFR_CHECKBOX_OP:
      //
      // A checkbox is a boolean, so 0 and 1 are valid
      // Remember, QuestionId corresponds to the offset location of the data in the variable
      //
      if (VariableData[((EFI_IFR_CHECK_BOX *) &RawData[Index])->QuestionId] > 1) {
        *Results = FALSE;
        return EFI_SUCCESS;
      }
      break;

    case EFI_IFR_NUMERIC_OP:
        if ((VariableData[((EFI_IFR_NUMERIC *)&RawData[Index])->QuestionId] < ((EFI_IFR_NUMERIC *)&RawData[Index])->Minimum) ||
            (VariableData[((EFI_IFR_NUMERIC *)&RawData[Index])->QuestionId] > ((EFI_IFR_NUMERIC *)&RawData[Index])->Maximum)) {
        *Results = FALSE;
        return EFI_SUCCESS;
      }
      break;

    }

    Index = RawData[Index + 1] + Index;
  }

  //
  // Free our temporary repository of form data
  //
  gBS->FreePool (OldData);
  gBS->FreePool (VariableData);

  return EFI_SUCCESS;
}
#endif

EFI_HII_PACKAGES *
PreparePackages (
  IN      UINTN               NumberOfPackages,
  IN      EFI_GUID            *GuidId,
  ...
  )
/*++

Routine Description:

  Assemble EFI_HII_PACKAGES according to the passed in packages.

Arguments:

  NumberOfPackages  -  Number of packages.
  GuidId            -  Package GUID.

Returns:

  Pointer of EFI_HII_PACKAGES.

--*/
{
  VA_LIST           args;
  EFI_HII_PACKAGES  *HiiPackages;
  VOID              **Package;
  UINTN             Index;

  ASSERT (NumberOfPackages > 0);

  HiiPackages                   = EfiLibAllocateZeroPool (sizeof (EFI_HII_PACKAGES) + NumberOfPackages * sizeof (VOID *));

  HiiPackages->GuidId           = GuidId;
  HiiPackages->NumberOfPackages = NumberOfPackages;
  Package                       = (VOID **) (((UINT8 *) HiiPackages) + sizeof (EFI_HII_PACKAGES));

  VA_START (args, GuidId);

  for (Index = 0; Index < NumberOfPackages; Index++) {
    *Package = VA_ARG (args, VOID *);
    Package++;
  }

  VA_END (args);

  return HiiPackages;
}


text:
<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html
     PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
     "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

  <title>new (OpenID::Server::AssociateRequest)</title>
  <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
  <link rel="stylesheet" href="../../../.././rdoc-style.css" type="text/css" media="screen" />

# File lib/openid/server.rb, line 303
      def initialize(session, assoc_type)
        super()
        @session = session
        @assoc_type = assoc_type

        @mode = "associate"
      end


text:
"use strict";

Object.defineProperty(exports, "__esModule", {
  value: true
});

var _index = require("./addons/domAlign/index.js");

exports.default = _index.domAlign;


text:
/**
 * Test dependencies.
 */
const SubDocQuery = require('../../lib/subDocQuery')
const db = require('../helper/db')

describe('subDocQuery findOne tests', () => {
  let subDocQuery

  before(() => {
    db.connect()
    subDocQuery = new SubDocQuery(db.getModel('Article'))
  })

  after((done) => {
    db.disconnect(done)
  })

  beforeEach((done) => {
    db.initialise(done)
  })

  it('findOne subDoc - must return one specific available record', (done) => {
    const config = {
      conditions: {
        name: 'article-one'
      },
      subDoc: {
        path: 'comments',
        conditions: {
          name: 'comment-one'
        }
      }
    }

    subDocQuery.findOne(config, (err, record) => {
      if (err) {
        throw err
      }
      record.name.should.equal('comment-one')
      record.body.should.equal('Article One First Comment')
      done()
    })
  })

  it('findOne subDoc subDoc - must return one specific available record', (done) => {
    const config = {
      conditions: {
        name: 'article-one'
      },
      subDoc: {
        path: 'comments',
        conditions: {
          name: 'comment-two'
        },
        subDoc: {
          path: 'replies',
          conditions: {
            name: 'reply-two'
          }
        }
      }
    }

    subDocQuery.findOne(config, (err, record) => {
      if (err) {
        throw err
      }
      record.name.should.equal('reply-two')
      record.body.should.equal('Article One Second Comment Second Reply')
      done()
    })
  })
})


text:
module Sidekiq
  module Restart
    module WebExtension

      def self.registered(app)
        app.use Rack::MethodOverride

        app.helpers do
          def find_template(sidekiq_views, name, engine, &block)
            view_path = File.join(File.expand_path("../../../../web", __FILE__), "views")
            super(view_path, name, engine, &block)
            super(sidekiq_views, name, engine, &block)
          end
        end

        app.delete "/workers/:id" do |id|
          Restart.worker id
          redirect "#{root_path}workers", 301
        end
      end
    end
  end
end


text:
from django.conf.urls.defaults import *
from django.conf import settings

from django.contrib import admin
admin.autodiscover()

urlpatterns = patterns(
    '',
    # --
    (r'^admin/', include(admin.site.urls)),
    (r'^', include('pydocweb.docweb.urls')),
)

if settings.DEBUG:
    urlpatterns += patterns(
        '',
        (r'^site_media/(?P<path>.*)$',
         'django.views.static.serve', {'document_root': settings.MEDIA_ROOT}),
    )


text:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">

<title>Uses of Class influent.idl.FL_SearchResult</title>
<meta name="date" content="2014-05-03">
<link rel="stylesheet" type="text/css" href="../../../stylesheet.css" title="Style">

JavaScript is disabled on your browser.

Overview

Package

Class

Use

Tree

Deprecated

Index

Help

Prev

Next

Frames

No Frames

All Classes

Uses of Class
influent.idl.FL_SearchResult

Packages that use FL_SearchResult

Package
Description

influent.idl

Uses of FL_SearchResult in influent.idl

Methods in influent.idl that return FL_SearchResult

Modifier and Type
Method and Description

FL_SearchResult
FL_SearchResult.Builder.build()

Methods in influent.idl that return types with arguments of type FL_SearchResult

Modifier and Type
Method and Description

java.util.List<FL_SearchResult>
FL_SearchResults.getResults()

Gets the value of the 'results' field.

java.util.List<FL_SearchResult>
FL_SearchResults.Builder.getResults()

Gets the value of the 'results' field

Methods in influent.idl with parameters of type FL_SearchResult

Modifier and Type
Method and Description

static FL_SearchResult.Builder
FL_SearchResult.newBuilder(FL_SearchResult other)

Creates a new FL_SearchResult RecordBuilder by copying an existing FL_SearchResult instance

Method parameters in influent.idl with type arguments of type FL_SearchResult

Modifier and Type
Method and Description

void
FL_SearchResults.setResults(java.util.List<FL_SearchResult> value)

Sets the value of the 'results' field.

FL_SearchResults.Builder
FL_SearchResults.Builder.setResults(java.util.List<FL_SearchResult> value)

Sets the value of the 'results' field

Constructor parameters in influent.idl with type arguments of type FL_SearchResult

Constructor and Description

FL_SearchResults(java.lang.Long total,
                java.util.List<FL_SearchResult> results)

All-args constructor.

Overview

Package

Class

Use

Tree

Deprecated

Index

Help

Prev

Next

Frames

No Frames

All Classes


text:
D_HALF = "half"
D_FLOAT = "float"
D_DOUBLE = "double"
D_FLOAT2 = "float2"
D_DOUBLE2 = "double2"
D_HALF_OPENCL = "cl_half"
D_FLOAT2_OPENCL = "cl_float2"
D_DOUBLE2_OPENCL = "cl_double2"

class DataType:
    """Class holding data-type and precision information"""

    def __init__(self, precision_name, name, template, scalars, buffer_type):
        self.precision_name = precision_name
        self.name = name
        self.template = template
        self.alpha_cpp = scalars[0]
        self.beta_cpp = scalars[1]
        self.alpha_cl = scalars[2]
        self.beta_cl = scalars[3]
        self.buffer_type = buffer_type

    def use_alpha(self, postfix=""):
        """Outputs the name of the data-type (alpha/beta), possibly transforming into the right type"""
        if self.alpha_cpp in [D_FLOAT2, D_DOUBLE2]:
            return self.alpha_cpp + "{alpha" + postfix + ".s[0], alpha" + postfix + ".s[1]}"
        return "alpha" + postfix

    def use_beta(self, postfix=""):
        """As above, but for beta instead of alpha"""
        if self.beta_cpp in [D_FLOAT2, D_DOUBLE2]:
            return self.beta_cpp + "{beta" + postfix + ".s[0], beta" + postfix + ".s[1]}"
        return "beta" + postfix

    def use_alpha_opencl(self):
        """As above, but the transformation is in the opposite direction"""
        if self.alpha_cpp in [D_FLOAT2, D_DOUBLE2]:
            return self.alpha_cl + "{{alpha.real(), alpha.imag()}}"
        return "alpha"

    def use_beta_opencl(self):
        """As above, but for beta instead of alpha"""
        if self.beta_cpp in [D_FLOAT2, D_DOUBLE2]:
            return self.beta_cl + "{{beta.real(), beta.imag()}}"
        return "beta"

    def use_alpha_clblast(self):
        """Transforms a Netlib CBLAS parameter to CLBlast style"""
        if self.alpha_cpp == D_FLOAT2:
            return self.alpha_cpp + "{reinterpret_cast<const float*>(alpha)[0], reinterpret_cast<const float*>(alpha)[1]}"
        elif self.alpha_cpp == D_DOUBLE2:
            return self.alpha_cpp + "{reinterpret_cast<const double*>(alpha)[0], reinterpret_cast<const double*>(alpha)[1]}"
        return "alpha"

    def use_beta_clblast(self):
        """As above, but for beta instead of alpha"""
        if self.beta_cpp == D_FLOAT2:
            return self.beta_cpp + "{reinterpret_cast<const float*>(beta)[0], reinterpret_cast<const float*>(beta)[1]}"
        elif self.beta_cpp == D_DOUBLE2:
            return self.beta_cpp + "{reinterpret_cast<const double*>(beta)[0], reinterpret_cast<const double*>(beta)[1]}"
        return "beta"

    def test_template(self):
        """Returns the template as used in the correctness/performance tests"""
        buffer_type = "clblast::" + self.buffer_type if self.is_non_standard() else self.buffer_type
        beta_cpp = "clblast::" + self.beta_cpp if self.beta_cpp in [D_HALF, D_FLOAT2, D_DOUBLE2] else self.beta_cpp
        if self.buffer_type != self.beta_cpp:
            return "<" + buffer_type + "," + self.beta_cpp + ">, " + buffer_type + ", " + beta_cpp
        return "<" + buffer_type + ">, " + buffer_type + ", " + beta_cpp

    def is_complex(self, scalar):
        """Current scalar is complex"""
        return ((scalar == "alpha" and self.alpha_cpp in [D_FLOAT2, D_DOUBLE2]) or
                (scalar == "beta" and self.beta_cpp in [D_FLOAT2, D_DOUBLE2]))

    def is_non_standard(self):
        """Current type is of a non-standard type"""
        return self.buffer_type in [D_HALF, D_FLOAT2, D_DOUBLE2]

    def name_cublas(self):
        if "i" in self.name:
            return "I" + self.name[1].lower()
        return self.name

# Regular data-types
H = DataType("H", "H", D_HALF, [D_HALF] * 2 + [D_HALF_OPENCL] * 2, D_HALF)  # half (16)
S = DataType("S", "S", D_FLOAT, [D_FLOAT] * 4, D_FLOAT)  # single (32)
D = DataType("D", "D", D_DOUBLE, [D_DOUBLE] * 4, D_DOUBLE)  # double (64)
C = DataType("C", "C", D_FLOAT2, [D_FLOAT2] * 2 + [D_FLOAT2_OPENCL] * 2, D_FLOAT2)  # single-complex (3232)
Z = DataType("Z", "Z", D_DOUBLE2, [D_DOUBLE2] * 2 + [D_DOUBLE2_OPENCL] * 2, D_DOUBLE2)  # double-complex (6464)

# Special cases
Sc = DataType("C", "Sc", D_FLOAT2, [D_FLOAT2] * 4, D_FLOAT2)  # As C, but with real output
Dz = DataType("Z", "Dz", D_DOUBLE2, [D_DOUBLE2] * 4, D_DOUBLE2)  # As Z, but with real output
iH = DataType("H", "iH", D_HALF, [D_HALF] * 4, D_HALF)  # As H, but with integer output
iS = DataType("S", "iS", D_FLOAT, [D_FLOAT] * 4, D_FLOAT)  # As S, but with integer output
iD = DataType("D", "iD", D_DOUBLE, [D_DOUBLE] * 4, D_DOUBLE)  # As D, but with integer output
iC = DataType("C", "iC", D_FLOAT2, [D_FLOAT2] * 2 + [D_FLOAT2_OPENCL] * 2, D_FLOAT2)  # As C, but with integer output
iZ = DataType("Z", "iZ", D_DOUBLE2, [D_DOUBLE2] * 2 + [D_DOUBLE2_OPENCL] * 2, D_DOUBLE2)  # As Z, but with int output
Css = DataType("C", "C", D_FLOAT, [D_FLOAT, D_FLOAT, D_FLOAT, D_FLOAT], D_FLOAT2)  # As C, but with constants from S
Zdd = DataType("Z", "Z", D_DOUBLE, [D_DOUBLE] * 4, D_DOUBLE2)  # As Z, but with constants from D
Ccs = DataType("C", "C", D_FLOAT2 + "," + D_FLOAT, [D_FLOAT2, D_FLOAT, D_FLOAT2_OPENCL, D_FLOAT], D_FLOAT2)  # As C, but with one constant from S
Zzd = DataType("Z", "Z", D_DOUBLE2 + "," + D_DOUBLE, [D_DOUBLE2, D_DOUBLE, D_DOUBLE2_OPENCL, D_DOUBLE], D_DOUBLE2)  # As Z, but with one constant from D

# C++ template data-types
T = DataType("T", "typename T", "T", ["T", "T", "T", "T"], "T")  # regular routine
Tc = DataType("Tc", "typename T", "std::complex<T>,T", ["T", "T", "T", "T"], "std::complex<T>")  # for herk
TU = DataType("TU", "typename T, typename U", "T,U", ["T", "U", "T", "U"], "T")  # for her2k


text:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<servico xsi:schemaLocation="http://servicos.gov.br/v3/schema.../servico.xsd" xmlns="http://servicos.gov.br/v3/schema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    <id>participar-de-capacitacoes-da-agu</id>
    <dbId>915</dbId>
    <nome>Participar de Capacitações da AGU</nome>
    <sigla></sigla>
    <descricao>Oferta de vagas para cidadãos em eventos de capacitação sobre temáticas específicas de interesse da sociedade.</descricao>
    <contato></contato>
    <gratuito>true</gratuito>
    <porcentagem-manual>false</porcentagem-manual>
    <solicitantes>
        <solicitante id="1007">
            <tipo>Cidadãos e Famílias</tipo>
            <requisitos></requisitos>
        </solicitante>
        <solicitante id="1008">
            <tipo>Fundações e autarquias de direito público</tipo>
            <requisitos></requisitos>
        </solicitante>
        <solicitante id="1009">
            <tipo>Órgãos da administração direta</tipo>
            <requisitos></requisitos>
        </solicitante>
    </solicitantes>
    <tempo-total-estimado>
        <entre min="16" max="30" unidade="dias-corridos"/>
        <descricao></descricao>
    </tempo-total-estimado>
    <validade-documento>
        <descricao></descricao>
    </validade-documento>
    <etapas>
        <etapa id="2383">
            <titulo>Inscrever-se no evento escolhido</titulo>
            <descricao>Solicitar inscrição no evento</descricao>
            <documentos>
                <default>
                    <item id="2650">Carteira de identidade</item>
                    <item id="2651">carteira funcional</item>
                </default>
            </documentos>
            <custos>
                <default/>
            </custos>
            <canais-de-prestacao>
                <default>
                    <canal-de-prestacao id="3048" tipo="web-inscrever-se">
                        <descricao>http://sge.agu.gov.br/</descricao>
                    </canal-de-prestacao>
                </default>
            </canais-de-prestacao>
        </etapa>
        <etapa id="2384">
            <titulo>Participar do evento escolhido</titulo>
            <descricao></descricao>
            <documentos>
                <default>
                    <item id="2652">Carteira de identidade</item>
                    <item id="2653">carteira funcional</item>
                </default>
            </documentos>
            <custos>
                <default/>
            </custos>
            <canais-de-prestacao>
                <default>
                    <canal-de-prestacao id="3046" tipo="presencial">
                        <descricao>Local de realização do evento, geralmente a sede da EAGU na c idade</descricao>
                    </canal-de-prestacao>
                </default>
            </canais-de-prestacao>
        </etapa>
        <etapa id="2385">
            <titulo>Obter Certificado de Participação</titulo>
            <descricao></descricao>
            <documentos>
                <default>
                    <item id="2654">Nenhum</item>
                </default>
            </documentos>
            <custos>
                <default/>
            </custos>
            <canais-de-prestacao>
                <default>
                    <canal-de-prestacao id="3047" tipo="web">
                        <descricao>www.agu.gov.br/escola</descricao>
                    </canal-de-prestacao>
                </default>
            </canais-de-prestacao>
        </etapa>
    </etapas>
    <orgao id="http://estruturaorganizacional.dados.gov.br/id/unidade-organizacional/46" dbId="822">
        <nomeOrgao>Advocacia-Geral da União (AGU)</nomeOrgao>
    </orgao>
    <segmentos-da-sociedade>
        <item idSegmento="1" idServicoSegmento="2675">Cidadãos</item>
        <item idSegmento="2" idServicoSegmento="2676">Órgãos e entidades públicas</item>
    </segmentos-da-sociedade>
    <areas-de-interesse>
        <item>Cultura</item>
        <item>Cidadania</item>
        <item>Educação</item>
        <item>Meio ambiente</item>
        <item>Saúde</item>
    </areas-de-interesse>
    <palavras-chave>
        <item id="2354">Capacitação</item>
        <item id="2355">curso</item>
        <item id="2356">evento</item>
        <item id="2357">palestra</item>
        <item id="2358">certificado</item>
        <item id="2359">AGU</item>
        <item id="2360">advocacia geral</item>
    </palavras-chave>
    <legislacoes>
        <item id="775">-</item>
    </legislacoes>
</servico>


text:
namespace GridAgentSharedLib
{
    public interface ISlaveTask
    {
        /// <summary>
        ///     Gets or sets the progress of the task. <seealso cref="StepsGoal" />
        /// </summary>
        /// <value> The progress of the task. </value>
        long StepsCompleted { get; }

        /// <summary>
        ///     Gets or sets the steps required to complete the task. <seealso cref="StepsCompleted" />
        /// </summary>
        /// <value> The steps required to complete the task. </value>
        long StepsGoal { get; }

        /// <summary>
        ///     Gets or sets the result of the task. This value is valid only after the task is complete.
        /// </summary>
        /// <value> The result of processing this task. </value>
        string Result { get; }

        string ExecutionDirectoryPath { get; set; }

        void RunInternal();
        void Initialise(TaskDescriptor taskDescriptor);
    }
}