text:
<?php

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

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

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

        if (0 === strpos($pathinfo, '/_')) {
            // _wdt
            if (0 === strpos($pathinfo, '/_wdt') && preg_match('#^/_wdt/(?P<token>[^/]++)$#s', $pathinfo, $matches)) {
                return $this->mergeDefaults(array_replace($matches, array('_route' => '_wdt')), array (  '_controller' => 'web_profiler.controller.profiler:toolbarAction',));
            }

            if (0 === strpos($pathinfo, '/_profiler')) {
                // _profiler_home
                if (rtrim($pathinfo, '/') === '/_profiler') {
                    if (substr($pathinfo, -1) !== '/') {
                        return $this->redirect($pathinfo.'/', '_profiler_home');
                    }

                    return array (  '_controller' => 'web_profiler.controller.profiler:homeAction',  '_route' => '_profiler_home',);
                }

                if (0 === strpos($pathinfo, '/_profiler/search')) {
                    // _profiler_search
                    if ($pathinfo === '/_profiler/search') {
                        return array (  '_controller' => 'web_profiler.controller.profiler:searchAction',  '_route' => '_profiler_search',);
                    }

                    // _profiler_search_bar
                    if ($pathinfo === '/_profiler/search_bar') {
                        return array (  '_controller' => 'web_profiler.controller.profiler:searchBarAction',  '_route' => '_profiler_search_bar',);
                    }

                }

                // _profiler_purge
                if ($pathinfo === '/_profiler/purge') {
                    return array (  '_controller' => 'web_profiler.controller.profiler:purgeAction',  '_route' => '_profiler_purge',);
                }

                if (0 === strpos($pathinfo, '/_profiler/i')) {
                    // _profiler_info
                    if (0 === strpos($pathinfo, '/_profiler/info') && preg_match('#^/_profiler/info/(?P<about>[^/]++)$#s', $pathinfo, $matches)) {
                        return $this->mergeDefaults(array_replace($matches, array('_route' => '_profiler_info')), array (  '_controller' => 'web_profiler.controller.profiler:infoAction',));
                    }

                    // _profiler_import
                    if ($pathinfo === '/_profiler/import') {
                        return array (  '_controller' => 'web_profiler.controller.profiler:importAction',  '_route' => '_profiler_import',);
                    }

                }

                // _profiler_export
                if (0 === strpos($pathinfo, '/_profiler/export') && preg_match('#^/_profiler/export/(?P<token>[^/\\.]++)\\.txt$#s', $pathinfo, $matches)) {
                    return $this->mergeDefaults(array_replace($matches, array('_route' => '_profiler_export')), array (  '_controller' => 'web_profiler.controller.profiler:exportAction',));
                }

                // _profiler_phpinfo
                if ($pathinfo === '/_profiler/phpinfo') {
                    return array (  '_controller' => 'web_profiler.controller.profiler:phpinfoAction',  '_route' => '_profiler_phpinfo',);
                }

                // _profiler_search_results
                if (preg_match('#^/_profiler/(?P<token>[^/]++)/search/results$#s', $pathinfo, $matches)) {
                    return $this->mergeDefaults(array_replace($matches, array('_route' => '_profiler_search_results')), array (  '_controller' => 'web_profiler.controller.profiler:searchResultsAction',));
                }

                // _profiler
                if (preg_match('#^/_profiler/(?P<token>[^/]++)$#s', $pathinfo, $matches)) {
                    return $this->mergeDefaults(array_replace($matches, array('_route' => '_profiler')), array (  '_controller' => 'web_profiler.controller.profiler:panelAction',));
                }

                // _profiler_router
                if (preg_match('#^/_profiler/(?P<token>[^/]++)/router$#s', $pathinfo, $matches)) {
                    return $this->mergeDefaults(array_replace($matches, array('_route' => '_profiler_router')), array (  '_controller' => 'web_profiler.controller.router:panelAction',));
                }

                // _profiler_exception
                if (preg_match('#^/_profiler/(?P<token>[^/]++)/exception$#s', $pathinfo, $matches)) {
                    return $this->mergeDefaults(array_replace($matches, array('_route' => '_profiler_exception')), array (  '_controller' => 'web_profiler.controller.exception:showAction',));
                }

                // _profiler_exception_css
                if (preg_match('#^/_profiler/(?P<token>[^/]++)/exception\\.css$#s', $pathinfo, $matches)) {
                    return $this->mergeDefaults(array_replace($matches, array('_route' => '_profiler_exception_css')), array (  '_controller' => 'web_profiler.controller.exception:cssAction',));
                }

            }

            if (0 === strpos($pathinfo, '/_configurator')) {
                // _configurator_home
                if (rtrim($pathinfo, '/') === '/_configurator') {
                    if (substr($pathinfo, -1) !== '/') {
                        return $this->redirect($pathinfo.'/', '_configurator_home');
                    }

                    return array (  '_controller' => 'Sensio\\Bundle\\DistributionBundle\\Controller\\ConfiguratorController::checkAction',  '_route' => '_configurator_home',);
                }

                // _configurator_step
                if (0 === strpos($pathinfo, '/_configurator/step') && preg_match('#^/_configurator/step/(?P<index>[^/]++)$#s', $pathinfo, $matches)) {
                    return $this->mergeDefaults(array_replace($matches, array('_route' => '_configurator_step')), array (  '_controller' => 'Sensio\\Bundle\\DistributionBundle\\Controller\\ConfiguratorController::stepAction',));
                }

                // _configurator_final
                if ($pathinfo === '/_configurator/final') {
                    return array (  '_controller' => 'Sensio\\Bundle\\DistributionBundle\\Controller\\ConfiguratorController::finalAction',  '_route' => '_configurator_final',);
                }

            }

        }

        if (0 === strpos($pathinfo, '/log')) {
            if (0 === strpos($pathinfo, '/login')) {
                // fos_user_security_login
                if ($pathinfo === '/login') {
                    return array (  '_controller' => 'FOS\\UserBundle\\Controller\\SecurityController::loginAction',  '_route' => 'fos_user_security_login',);
                }

                // fos_user_security_check
                if ($pathinfo === '/login_check') {
                    if ($this->context->getMethod() != 'POST') {
                        $allow[] = 'POST';
                        goto not_fos_user_security_check;
                    }

                    return array (  '_controller' => 'FOS\\UserBundle\\Controller\\SecurityController::checkAction',  '_route' => 'fos_user_security_check',);
                }
                not_fos_user_security_check:

            }

            // fos_user_security_logout
            if ($pathinfo === '/logout') {
                return array (  '_controller' => 'FOS\\UserBundle\\Controller\\SecurityController::logoutAction',  '_route' => 'fos_user_security_logout',);
            }

        }

        if (0 === strpos($pathinfo, '/profile')) {
            // fos_user_profile_show
            if ($pathinfo === '/profile/show') {
                return array (  '_controller' => 'FOS\\UserBundle\\Controller\\ProfileController::showAction',  '_route' => 'fos_user_profile_show',);
            }

            // fos_user_profile_edit
            if ($pathinfo === '/profile/edit') {
                return array (  '_controller' => 'FOS\\UserBundle\\Controller\\ProfileController::editAction',  '_route' => 'fos_user_profile_edit',);
            }

        }

        if (0 === strpos($pathinfo, '/re')) {
            if (0 === strpos($pathinfo, '/register')) {
                // fos_user_registration_register
                if (rtrim($pathinfo, '/') === '/register') {
                    if (substr($pathinfo, -1) !== '/') {
                        return $this->redirect($pathinfo.'/', 'fos_user_registration_register');
                    }

                    return array (  '_controller' => 'FOS\\UserBundle\\Controller\\RegistrationController::registerAction',  '_route' => 'fos_user_registration_register',);
                }

                if (0 === strpos($pathinfo, '/register/c')) {
                    // fos_user_registration_check_email
                    if ($pathinfo === '/register/check-email') {
                        if (!in_array($this->context->getMethod(), array('GET', 'HEAD'))) {
                            $allow = array_merge($allow, array('GET', 'HEAD'));
                            goto not_fos_user_registration_check_email;
                        }

                        return array (  '_controller' => 'FOS\\UserBundle\\Controller\\RegistrationController::checkEmailAction',  '_route' => 'fos_user_registration_check_email',);
                    }
                    not_fos_user_registration_check_email:

                    if (0 === strpos($pathinfo, '/register/confirm')) {
                        // fos_user_registration_confirm
                        if (preg_match('#^/register/confirm/(?P<token>[^/]++)$#s', $pathinfo, $matches)) {
                            if (!in_array($this->context->getMethod(), array('GET', 'HEAD'))) {
                                $allow = array_merge($allow, array('GET', 'HEAD'));
                                goto not_fos_user_registration_confirm;
                            }

                            return $this->mergeDefaults(array_replace($matches, array('_route' => 'fos_user_registration_confirm')), array (  '_controller' => 'FOS\\UserBundle\\Controller\\RegistrationController::confirmAction',));
                        }
                        not_fos_user_registration_confirm:

                        // fos_user_registration_confirmed
                        if ($pathinfo === '/register/confirmed') {
                            if (!in_array($this->context->getMethod(), array('GET', 'HEAD'))) {
                                $allow = array_merge($allow, array('GET', 'HEAD'));
                                goto not_fos_user_registration_confirmed;
                            }

                            return array (  '_controller' => 'FOS\\UserBundle\\Controller\\RegistrationController::confirmedAction',  '_route' => 'fos_user_registration_confirmed',);
                        }
                        not_fos_user_registration_confirmed:

                    }

                }

            }

            if (0 === strpos($pathinfo, '/resetting')) {
                // fos_user_resetting_request
                if ($pathinfo === '/resetting/request') {
                    if (!in_array($this->context->getMethod(), array('GET', 'HEAD'))) {
                        $allow = array_merge($allow, array('GET', 'HEAD'));
                        goto not_fos_user_resetting_request;
                    }

                    return array (  '_controller' => 'FOS\\UserBundle\\Controller\\ResettingController::requestAction',  '_route' => 'fos_user_resetting_request',);
                }
                not_fos_user_resetting_request:

                // fos_user_resetting_send_email
                if ($pathinfo === '/resetting/send-email') {
                    if ($this->context->getMethod() != 'POST') {
                        $allow[] = 'POST';
                        goto not_fos_user_resetting_send_email;
                    }

                    return array (  '_controller' => 'FOS\\UserBundle\\Controller\\ResettingController::sendEmailAction',  '_route' => 'fos_user_resetting_send_email',);
                }
                not_fos_user_resetting_send_email:

                // fos_user_resetting_check_email
                if ($pathinfo === '/resetting/check-email') {
                    if (!in_array($this->context->getMethod(), array('GET', 'HEAD'))) {
                        $allow = array_merge($allow, array('GET', 'HEAD'));
                        goto not_fos_user_resetting_check_email;
                    }

                    return array (  '_controller' => 'FOS\\UserBundle\\Controller\\ResettingController::checkEmailAction',  '_route' => 'fos_user_resetting_check_email',);
                }
                not_fos_user_resetting_check_email:

                // fos_user_resetting_reset
                if (0 === strpos($pathinfo, '/resetting/reset') && preg_match('#^/resetting/reset/(?P<token>[^/]++)$#s', $pathinfo, $matches)) {
                    if (!in_array($this->context->getMethod(), array('GET', 'POST', 'HEAD'))) {
                        $allow = array_merge($allow, array('GET', 'POST', 'HEAD'));
                        goto not_fos_user_resetting_reset;
                    }

                    return $this->mergeDefaults(array_replace($matches, array('_route' => 'fos_user_resetting_reset')), array (  '_controller' => 'FOS\\UserBundle\\Controller\\ResettingController::resetAction',));
                }
                not_fos_user_resetting_reset:

            }

        }

        // fos_user_change_password
        if ($pathinfo === '/profile/change-password') {
            if (!in_array($this->context->getMethod(), array('GET', 'POST', 'HEAD'))) {
                $allow = array_merge($allow, array('GET', 'POST', 'HEAD'));
                goto not_fos_user_change_password;
            }

            return array (  '_controller' => 'FOS\\UserBundle\\Controller\\ChangePasswordController::changePasswordAction',  '_route' => 'fos_user_change_password',);
        }
        not_fos_user_change_password:

        // _welcome
        if (rtrim($pathinfo, '/') === '') {
            if (substr($pathinfo, -1) !== '/') {
                return $this->redirect($pathinfo.'/', '_welcome');
            }

            return array (  '_controller' => 'Esprit\\TaxiDriverBundle\\Controller\\WelcomeController::indexAction',  '_route' => '_welcome',);
        }

        // esprit_taxidriver_client_homepage
        if ($pathinfo === '/client/accueil') {
            return array (  '_controller' => 'Esprit\\TaxiDriverBundle\\Controller\\DefaultController::accueilClientAction',  '_route' => 'esprit_taxidriver_client_homepage',);
        }

        // esprit_taxidriver_resp_agence_homepage
        if ($pathinfo === '/respAgence/accueil') {
            return array (  '_controller' => 'Esprit\\TaxiDriverBundle\\Controller\\DefaultController::accueilRespAgenceAction',  '_route' => 'esprit_taxidriver_resp_agence_homepage',);
        }

        // esprit_taxidriver_chauffeur_homepage
        if ($pathinfo === '/chauffeur/accueil') {
            return array (  '_controller' => 'Esprit\\TaxiDriverBundle\\Controller\\DefaultController::accueilChauffeurAction',  '_route' => 'esprit_taxidriver_chauffeur_homepage',);
        }

        if (0 === strpos($pathinfo, '/a')) {
            // esprit_taxidriver_admin_homepage
            if ($pathinfo === '/admin/accueil') {
                return array (  '_controller' => 'Esprit\\TaxiDriverBundle\\Controller\\DefaultController::accueilAdminAction',  '_route' => 'esprit_taxidriver_admin_homepage',);
            }

            // esprit_taxidriver_a_propos
            if ($pathinfo === '/apropos') {
                return array (  '_controller' => 'Esprit\\TaxiDriverBundle\\Controller\\DefaultController::aproposAction',  '_route' => 'esprit_taxidriver_a_propos',);
            }

        }

        // esprit_taxidriver_contact
        if ($pathinfo === '/contact') {
            return array (  '_controller' => 'Esprit\\TaxiDriverBundle\\Controller\\DefaultController::contactAction',  '_route' => 'esprit_taxidriver_contact',);
        }

        // esprit_taxidriver_affi_agence
        if ($pathinfo === '/agence') {
            return array (  '_controller' => 'Esprit\\TaxiDriverBundle\\Controller\\AgenceController::affAgenceAction',  '_route' => 'esprit_taxidriver_affi_agence',);
        }

        // esprit_taxidriver_affi_offre
        if ($pathinfo === '/offre') {
            return array (  '_controller' => 'Esprit\\TaxiDriverBundle\\Controller\\OffreController::affOffreAction',  '_route' => 'esprit_taxidriver_affi_offre',);
        }

        // esprit_taxidriver_affi_chauffeur
        if ($pathinfo === '/chauffeur') {
            return array (  '_controller' => 'Esprit\\TaxiDriverBundle\\Controller\\ChauffeurController::affChauffeurAction',  '_route' => 'esprit_taxidriver_affi_chauffeur',);
        }

        // esprit_taxidriver_affi_vehicule
        if ($pathinfo === '/voiture') {
            return array (  '_controller' => 'Esprit\\TaxiDriverBundle\\Controller\\VoitureController::affVehiculeAction',  '_route' => 'esprit_taxidriver_affi_vehicule',);
        }

        if (0 === strpos($pathinfo, '/client')) {
            // esprit_taxidriver_client_reservation_taxi
            if ($pathinfo === '/client/resTaxi') {
                return array (  '_controller' => 'Esprit\\TaxiDriverBundle\\Controller\\ReservationController::reserverAction',  '_route' => 'esprit_taxidriver_client_reservation_taxi',);
            }

            // esprit_taxidriver_client_consul_conf_res
            if ($pathinfo === '/client/consulConfRes') {
                return array (  '_controller' => 'Esprit\\TaxiDriverBundle\\Controller\\ReservationController::consulterConfResAction',  '_route' => 'esprit_taxidriver_client_consul_conf_res',);
            }

            // esprit_taxidriver_client_detail_offre
            if (0 === strpos($pathinfo, '/client/detailoffre') && preg_match('#^/client/detailoffre/(?P<id>[^/]++)$#s', $pathinfo, $matches)) {
                return $this->mergeDefaults(array_replace($matches, array('_route' => 'esprit_taxidriver_client_detail_offre')), array (  '_controller' => 'Esprit\\TaxiDriverBundle\\Controller\\OffreController::detailoffreAction',));
            }

        }

        // esprit_taxidriver_client_bestchauffeurs
        if ($pathinfo === '/bestchauffeurs') {
            return array (  '_controller' => 'Esprit\\TaxiDriverBundle\\Controller\\OffreController::bestchauffeursAction',  '_route' => 'esprit_taxidriver_client_bestchauffeurs',);
        }

        if (0 === strpos($pathinfo, '/respAgence')) {
            if (0 === strpos($pathinfo, '/respAgence/list')) {
                // esprit_taxidriver_resp_agence_listRNCreclamation
                if ($pathinfo === '/respAgence/listreclamationNC') {
                    return array (  '_controller' => 'Esprit\\TaxiDriverBundle\\Controller\\ReclamationController::listRecNonConfAction',  '_route' => 'esprit_taxidriver_resp_agence_listRNCreclamation',);
                }

                // esprit_taxidriver_resp_agence_listReclamation
                if ($pathinfo === '/respAgence/listReclamation') {
                    return array (  '_controller' => 'Esprit\\TaxiDriverBundle\\Controller\\ReclamationController::listReclamationAction',  '_route' => 'esprit_taxidriver_resp_agence_listReclamation',);
                }

            }

            // esprit_taxidriver_resp_agence_AffichReclamation
            if ($pathinfo === '/respAgence/AffichReclamation') {
                return array (  '_controller' => 'Esprit\\TaxiDriverBundle\\Controller\\ReclamationController::AffichReclamationAction',  '_route' => 'esprit_taxidriver_resp_agence_AffichReclamation',);
            }

            // esprit_taxidriver_resp_agence_affichageRec
            if (0 === strpos($pathinfo, '/respAgence/affichageRec') && preg_match('#^/respAgence/affichageRec/(?P<idreclamation>[^/]++)$#s', $pathinfo, $matches)) {
                return $this->mergeDefaults(array_replace($matches, array('_route' => 'esprit_taxidriver_resp_agence_affichageRec')), array (  '_controller' => 'Esprit\\TaxiDriverBundle\\Controller\\ReclamationController::affichageAction',));
            }

            // esprit_taxidriver_resp_agence_historiqueRec
            if ($pathinfo === '/respAgence/historique') {
                return array (  '_controller' => 'Esprit\\TaxiDriverBundle\\Controller\\ReclamationController::historiqueAction',  '_route' => 'esprit_taxidriver_resp_agence_historiqueRec',);
            }

            // esprit_taxidriver_resp_agence_confirmationRec
            if (0 === strpos($pathinfo, '/respAgence/confirmation') && preg_match('#^/respAgence/confirmation/(?P<idreclamation>[^/]++)$#s', $pathinfo, $matches)) {
                return $this->mergeDefaults(array_replace($matches, array('_route' => 'esprit_taxidriver_resp_agence_confirmationRec')), array (  '_controller' => 'Esprit\\TaxiDriverBundle\\Controller\\ReclamationController::confirmationAction',));
            }

            // esprit_taxidriver_resp_agence_affichagehistRec
            if (0 === strpos($pathinfo, '/respAgence/affichagehist') && preg_match('#^/respAgence/affichagehist/(?P<idreclamation>[^/]++)$#s', $pathinfo, $matches)) {
                return $this->mergeDefaults(array_replace($matches, array('_route' => 'esprit_taxidriver_resp_agence_affichagehistRec')), array ());
            }

            // esprit_taxidriver_resp_agence_listChauffeur
            if ($pathinfo === '/respAgence/listChauffeur') {
                return array (  '_controller' => 'Esprit\\TaxiDriverBundle\\Controller\\ChauffeurController::listChauffeurAction',  '_route' => 'esprit_taxidriver_resp_agence_listChauffeur',);
            }

            // esprit_taxidriver_resp_agence_updateChauffeur
            if (0 === strpos($pathinfo, '/respAgence/updateChauffeur') && preg_match('#^/respAgence/updateChauffeur/(?P<idchauffeur>[^/]++)$#s', $pathinfo, $matches)) {
                return $this->mergeDefaults(array_replace($matches, array('_route' => 'esprit_taxidriver_resp_agence_updateChauffeur')), array (  '_controller' => 'Esprit\\TaxiDriverBundle\\Controller\\ChauffeurController::updateChauffeurAction',));
            }

            // esprit_taxidriver_resp_agence_deleteChauffeur
            if (0 === strpos($pathinfo, '/respAgence/deleteChauffeur') && preg_match('#^/respAgence/deleteChauffeur/(?P<idchauffeur>[^/]++)$#s', $pathinfo, $matches)) {
                return $this->mergeDefaults(array_replace($matches, array('_route' => 'esprit_taxidriver_resp_agence_deleteChauffeur')), array (  '_controller' => 'Esprit\\TaxiDriverBundle\\Controller\\ChauffeurController::deleteChauffeurAction',));
            }

            // esprit_taxidriver_resp_agence_ajoutChauffeur
            if ($pathinfo === '/respAgence/ajoutChauffeur') {
                return array (  '_controller' => 'Esprit\\TaxiDriverBundle\\Controller\\ChauffeurController::ajoutChauffeurAction',  '_route' => 'esprit_taxidriver_resp_agence_ajoutChauffeur',);
            }

            // esprit_taxidriver_resp_agence_listVoiture
            if ($pathinfo === '/respAgence/listVoiture') {
                return array (  '_controller' => 'Esprit\\TaxiDriverBundle\\Controller\\VoitureController::listVoitureAction',  '_route' => 'esprit_taxidriver_resp_agence_listVoiture',);
            }

            // esprit_taxidriver_resp_agence_updateVoiture
            if (0 === strpos($pathinfo, '/respAgence/updateVoiture') && preg_match('#^/respAgence/updateVoiture/(?P<matricule>[^/]++)$#s', $pathinfo, $matches)) {
                return $this->mergeDefaults(array_replace($matches, array('_route' => 'esprit_taxidriver_resp_agence_updateVoiture')), array (  '_controller' => 'Esprit\\TaxiDriverBundle\\Controller\\VoitureController::updateVoitureAction',));
            }

            // esprit_taxidriver_resp_agence_deleteVoiture
            if (0 === strpos($pathinfo, '/respAgence/deleteVoiture') && preg_match('#^/respAgence/deleteVoiture/(?P<matricule>[^/]++)$#s', $pathinfo, $matches)) {
                return $this->mergeDefaults(array_replace($matches, array('_route' => 'esprit_taxidriver_resp_agence_deleteVoiture')), array (  '_controller' => 'Esprit\\TaxiDriverBundle\\Controller\\VoitureController::deleteVoitureAction',));
            }

            // esprit_taxidriver_resp_agence_ajoutVoiture
            if ($pathinfo === '/respAgence/ajoutVoiture') {
                return array (  '_controller' => 'Esprit\\TaxiDriverBundle\\Controller\\VoitureController::ajoutVoitureAction',  '_route' => 'esprit_taxidriver_resp_agence_ajoutVoiture',);
            }

            // esprit_taxidriver_resp_agence_listTrajet
            if ($pathinfo === '/respAgence/trajet') {
                return array (  '_controller' => 'Esprit\\TaxiDriverBundle\\Controller\\TrajetController::listTrajetAction',  '_route' => 'esprit_taxidriver_resp_agence_listTrajet',);
            }

            // esprit_taxidriver_resp_agence_confirmationtrajet
            if (0 === strpos($pathinfo, '/respAgence/confirmationtrajet') && preg_match('#^/respAgence/confirmationtrajet/(?P<idtrajet>[^/]++)$#s', $pathinfo, $matches)) {
                return $this->mergeDefaults(array_replace($matches, array('_route' => 'esprit_taxidriver_resp_agence_confirmationtrajet')), array (  '_controller' => 'Esprit\\TaxiDriverBundle\\Controller\\TrajetController::confirmationtrajetAction',));
            }

            // esprit_taxidriver_resp_agence_deleteTrajet
            if (0 === strpos($pathinfo, '/respAgence/deleteTrajet') && preg_match('#^/respAgence/deleteTrajet/(?P<idtrajet>[^/]++)$#s', $pathinfo, $matches)) {
                return $this->mergeDefaults(array_replace($matches, array('_route' => 'esprit_taxidriver_resp_agence_deleteTrajet')), array (  '_controller' => 'Esprit\\TaxiDriverBundle\\Controller\\TrajetController::deleteTrajetAction',));
            }

            // esprit_taxidriver_resp_agence_listOffre
            if ($pathinfo === '/respAgence/listOffre') {
                return array (  '_controller' => 'Esprit\\TaxiDriverBundle\\Controller\\OffreController::listOffreAction',  '_route' => 'esprit_taxidriver_resp_agence_listOffre',);
            }

            // esprit_taxidriver_resp_agence_updateOffre
            if (0 === strpos($pathinfo, '/respAgence/updateOffre') && preg_match('#^/respAgence/updateOffre/(?P<idOffre>[^/]++)$#s', $pathinfo, $matches)) {
                return $this->mergeDefaults(array_replace($matches, array('_route' => 'esprit_taxidriver_resp_agence_updateOffre')), array (  '_controller' => 'Esprit\\TaxiDriverBundle\\Controller\\OffreController::updateOffreAction',));
            }

            // esprit_taxidriver_resp_agence_deleteOffre
            if (0 === strpos($pathinfo, '/respAgence/deleteOffre') && preg_match('#^/respAgence/deleteOffre/(?P<idoffre>[^/]++)$#s', $pathinfo, $matches)) {
                return $this->mergeDefaults(array_replace($matches, array('_route' => 'esprit_taxidriver_resp_agence_deleteOffre')), array (  '_controller' => 'Esprit\\TaxiDriverBundle\\Controller\\OffreController::deleteOffreAction',));
            }

            // esprit_taxidriver_resp_agence_ajoutOffre
            if ($pathinfo === '/respAgence/ajoutOffre') {
                return array (  '_controller' => 'Esprit\\TaxiDriverBundle\\Controller\\OffreController::ajoutOffreAction',  '_route' => 'esprit_taxidriver_resp_agence_ajoutOffre',);
            }

        }

<<<<<<< HEAD
        // esprit_taxidriver_graphePie
        if ($pathinfo === '/pie') {
            return array (  '_controller' => 'Esprit\\TaxiDriverBundle\\Controller\\GrapheController::chartPieAction',  '_route' => 'esprit_taxidriver_graphePie',);
        }

        // esprit_taxidriver_grapheHistogramme
        if ($pathinfo === '/histogramme') {
            return array (  '_controller' => 'Esprit\\TaxiDriverBundle\\Controller\\GrapheController::chartHistogrammeAction',  '_route' => 'esprit_taxidriver_grapheHistogramme',);
        }

        // esprit_taxidriver_mail_redirection
        if ($pathinfo === '/redirection') {
            return array (  '_controller' => 'Esprit\\TaxiDriverBundle\\Controller\\MailController::redirectionAction',  '_route' => 'esprit_taxidriver_mail_redirection',);
        }

        // esprit_taxidriver_mail_sendMail
        if ($pathinfo === '/sendMail') {
            return array (  '_controller' => 'Esprit\\TaxiDriverBundle\\Controller\\MailController::sendMailAction',  '_route' => 'esprit_taxidriver_mail_sendMail',);
=======
        if (0 === strpos($pathinfo, '/admin')) {
            // esprit_taxidriver_admin_mail_sendMail
            if ($pathinfo === '/admin/sendMail') {
                return array (  '_controller' => 'EspritTaxiDriverBundle:Mail:sendMail',  '_route' => 'esprit_taxidriver_admin_mail_sendMail',);
            }

            // esprit_taxidriver_admin_taxi_voit
            if ($pathinfo === '/admin/voiture') {
                return array (  '_controller' => 'Esprit\\TaxiDriverBundle\\Controller\\VoitureController::listVAction',  '_route' => 'esprit_taxidriver_admin_taxi_voit',);
            }

            // esprit_taxidriver_admin_listClient
            if ($pathinfo === '/admin/client') {
                return array (  '_controller' => 'Esprit\\TaxiDriverBundle\\Controller\\ClientController::listClientAction',  '_route' => 'esprit_taxidriver_admin_listClient',);
            }

            // esprit_taxidriver_admin_listResp
            if ($pathinfo === '/admin/resp') {
                return array (  '_controller' => 'Esprit\\TaxiDriverBundle\\Controller\\ResponsableController::listRespAction',  '_route' => 'esprit_taxidriver_admin_listResp',);
            }

            // esprit_taxidriver_admin_updateResp
            if (0 === strpos($pathinfo, '/admin/updateResp') && preg_match('#^/admin/updateResp/(?P<idresp>[^/]++)$#s', $pathinfo, $matches)) {
                return $this->mergeDefaults(array_replace($matches, array('_route' => 'esprit_taxidriver_admin_updateResp')), array (  '_controller' => 'Esprit\\TaxiDriverBundle\\Controller\\ResponsableController::updateRespAction',));
            }

            // esprit_taxidriver_admin_deleteResp
            if (0 === strpos($pathinfo, '/admin/deleteResp') && preg_match('#^/admin/deleteResp/(?P<idresp>[^/]++)$#s', $pathinfo, $matches)) {
                return $this->mergeDefaults(array_replace($matches, array('_route' => 'esprit_taxidriver_admin_deleteResp')), array (  '_controller' => 'Esprit\\TaxiDriverBundle\\Controller\\ResponsableController::deleteRespAction',));
            }

            // esprit_taxidriver_admin_ajoutResp
            if ($pathinfo === '/admin/ajoutResp') {
                return array (  '_controller' => 'Esprit\\TaxiDriverBundle\\Controller\\ResponsableController::ajoutRespAction',  '_route' => 'esprit_taxidriver_admin_ajoutResp',);
            }

            // esprit_taxidriver_admin_listAgence
            if ($pathinfo === '/admin/Agence') {
                return array (  '_controller' => 'Esprit\\TaxiDriverBundle\\Controller\\AgenceController::listAgenceAction',  '_route' => 'esprit_taxidriver_admin_listAgence',);
            }

            // esprit_taxidriver_admin_updateAgence
            if (0 === strpos($pathinfo, '/admin/updateAgence') && preg_match('#^/admin/updateAgence/(?P<idagence>[^/]++)$#s', $pathinfo, $matches)) {
                return $this->mergeDefaults(array_replace($matches, array('_route' => 'esprit_taxidriver_admin_updateAgence')), array (  '_controller' => 'Esprit\\TaxiDriverBundle\\Controller\\AgenceController::updateAgenceAction',));
            }

            // esprit_taxidriver_admin_deleteAgence
            if (0 === strpos($pathinfo, '/admin/deleteAgence') && preg_match('#^/admin/deleteAgence/(?P<idagence>[^/]++)$#s', $pathinfo, $matches)) {
                return $this->mergeDefaults(array_replace($matches, array('_route' => 'esprit_taxidriver_admin_deleteAgence')), array (  '_controller' => 'Esprit\\TaxiDriverBundle\\Controller\\AgenceController::deleteAgenceAction',));
            }

            // esprit_taxidriver_admin_ajoutAgence
            if ($pathinfo === '/admin/ajoutAgence') {
                return array (  '_controller' => 'Esprit\\TaxiDriverBundle\\Controller\\AgenceController::ajoutAgenceAction',  '_route' => 'esprit_taxidriver_admin_ajoutAgence',);
            }

            // esprit_taxidriver_admin_stat
            if ($pathinfo === '/admin/taxiStat') {
                return array (  '_controller' => 'Esprit\\TaxiDriverBundle\\Controller\\StatistiqueController::statAction',  '_route' => 'esprit_taxidriver_admin_stat',);
            }

            // esprit_taxidriver_admin_com
            if ($pathinfo === '/admin/com') {
                return array (  '_controller' => 'EspritTaxiDriverBundle:Commentaire:listC',  '_route' => 'esprit_taxidriver_admin_com',);
            }

            // esprit_taxidriver_admin_suppCom
            if (0 === strpos($pathinfo, '/admin/suppCom') && preg_match('#^/admin/suppCom/(?P<id>[^/]++)$#s', $pathinfo, $matches)) {
                return $this->mergeDefaults(array_replace($matches, array('_route' => 'esprit_taxidriver_admin_suppCom')), array (  '_controller' => 'EspritTaxiDriverBundle:Commentaire:deleteCom',));
            }

            // esprit_taxidriver_admin_offre
            if ($pathinfo === '/admin/offre') {
                return array (  '_controller' => 'Esprit\\TaxiDriverBundle\\Controller\\OffreController::listOAction',  '_route' => 'esprit_taxidriver_admin_offre',);
            }

            // esprit_taxidriver_admin_hist
            if ($pathinfo === '/admin/hist') {
                return array (  '_controller' => 'Esprit\\TaxiDriverBundle\\Controller\\StatistiqueController::chartHistogrammeAction',  '_route' => 'esprit_taxidriver_admin_hist',);
            }

            // esprit_taxidriver_admin_calendrier
            if ($pathinfo === '/admin/calendrier') {
                return array (  '_controller' => 'Esprit\\TaxiDriverBundle\\Controller\\CalendrierController::calendrierAction',  '_route' => 'esprit_taxidriver_admin_calendrier',);
            }

>>>>>>> origin/master
        }

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


text:
package io.debezium.aggregation.hibernate;

import org.hibernate.boot.Metadata;
import org.hibernate.engine.spi.SessionFactoryImplementor;
import org.hibernate.event.service.spi.EventListenerRegistry;
import org.hibernate.event.spi.EventType;
import org.hibernate.integrator.spi.Integrator;
import org.hibernate.service.spi.SessionFactoryServiceRegistry;

/**
 * Integrator for Hibernate ORM that enables aggregate materialization via {@link MaterializeAggregate}.
 *
 * @author Gunnar Morling
 */
public class AggregationBuilderIntegrator implements Integrator {

    @Override
    public void integrate(Metadata metadata, SessionFactoryImplementor sessionFactory,
            SessionFactoryServiceRegistry serviceRegistry) {

        EventListenerRegistry eventListenerRegistry = serviceRegistry.getService(EventListenerRegistry.class);

        AggregationBuilderListener listener = new AggregationBuilderListener();

        eventListenerRegistry.appendListeners(EventType.POST_INSERT, listener);
        eventListenerRegistry.appendListeners(EventType.POST_UPDATE, listener);
        eventListenerRegistry.appendListeners(EventType.POST_DELETE, listener);
    }

    @Override
    public void disintegrate(SessionFactoryImplementor sessionFactory, SessionFactoryServiceRegistry serviceRegistry) {
    }
}

redpajama_set_name: RedPajamaGithub


text:
/*	$NetBSD: cpu.c,v 1.111.2.1 2015/01/12 21:06:41 snj Exp $	*/

/*-
 * Copyright (c) 2000-2012 NetBSD Foundation, Inc.
 * All rights reserved.
 *
 * This code is derived from software contributed to The NetBSD Foundation
 * by Bill Sommerfeld of RedBack Networks Inc, and by Andrew Doran.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions
 * are met:
 * 1. Redistributions of source code must retain the above copyright
 *    notice, this list of conditions and the following disclaimer.
 * 2. Redistributions in binary form must reproduce the above copyright
 *    notice, this list of conditions and the following disclaimer in the
 *    documentation and/or other materials provided with the distribution.
 *
 * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
 * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
 * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
 * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
 * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
 * POSSIBILITY OF SUCH DAMAGE.
 */

/*
 * Copyright (c) 1999 Stefan Grefen
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions
 * are met:
 * 1. Redistributions of source code must retain the above copyright
 *    notice, this list of conditions and the following disclaimer.
 * 2. Redistributions in binary form must reproduce the above copyright
 *    notice, this list of conditions and the following disclaimer in the
 *    documentation and/or other materials provided with the distribution.
 * 3. All advertising materials mentioning features or use of this software
 *    must display the following acknowledgement:
 *      This product includes software developed by the NetBSD
 *      Foundation, Inc. and its contributors.
 * 4. Neither the name of The NetBSD Foundation nor the names of its
 *    contributors may be used to endorse or promote products derived
 *    from this software without specific prior written permission.
 *
 * THIS SOFTWARE IS PROVIDED BY AUTHOR AND CONTRIBUTORS ``AS IS'' AND ANY
 * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
 * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR AND CONTRIBUTORS BE LIABLE
 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
 * SUCH DAMAGE.
 */

#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: cpu.c,v 1.111.2.1 2015/01/12 21:06:41 snj Exp $");

#include "opt_ddb.h"
#include "opt_mpbios.h"		/* for MPDEBUG */
#include "opt_mtrr.h"
#include "opt_multiprocessor.h"

#include "lapic.h"
#include "ioapic.h"

#include <sys/param.h>
#include <sys/proc.h>
#include <sys/systm.h>
#include <sys/device.h>
#include <sys/kmem.h>
#include <sys/cpu.h>
#include <sys/cpufreq.h>
#include <sys/idle.h>
#include <sys/atomic.h>
#include <sys/reboot.h>

#include <uvm/uvm.h>

#include "acpica.h"		/* for NACPICA, for mp_verbose */

#include <machine/cpufunc.h>
#include <machine/cpuvar.h>
#include <machine/pmap.h>
#include <machine/vmparam.h>
#if defined(MULTIPROCESSOR)
#include <machine/mpbiosvar.h>
#endif
#include <machine/mpconfig.h>		/* for mp_verbose */
#include <machine/pcb.h>
#include <machine/specialreg.h>
#include <machine/segments.h>
#include <machine/gdt.h>
#include <machine/mtrr.h>
#include <machine/pio.h>
#include <machine/cpu_counter.h>

#include <x86/fpu.h>

#ifdef i386
#include <machine/tlog.h>
#endif

#if NLAPIC > 0
#include <machine/apicvar.h>
#include <machine/i82489reg.h>
#include <machine/i82489var.h>
#endif

#include <dev/ic/mc146818reg.h>
#include <i386/isa/nvram.h>
#include <dev/isa/isareg.h>

#include "tsc.h"

static int	cpu_match(device_t, cfdata_t, void *);
static void	cpu_attach(device_t, device_t, void *);
static void	cpu_defer(device_t);
static int	cpu_rescan(device_t, const char *, const int *);
static void	cpu_childdetached(device_t, device_t);
static bool	cpu_stop(device_t);
static bool	cpu_suspend(device_t, const pmf_qual_t *);
static bool	cpu_resume(device_t, const pmf_qual_t *);
static bool	cpu_shutdown(device_t, int);

struct cpu_softc {
	device_t sc_dev;		/* device tree glue */
	struct cpu_info *sc_info;	/* pointer to CPU info */
	bool sc_wasonline;
};

#ifdef MULTIPROCESSOR
int mp_cpu_start(struct cpu_info *, paddr_t);
void mp_cpu_start_cleanup(struct cpu_info *);
const struct cpu_functions mp_cpu_funcs = { mp_cpu_start, NULL,
					    mp_cpu_start_cleanup };
#endif

CFATTACH_DECL2_NEW(cpu, sizeof(struct cpu_softc),
    cpu_match, cpu_attach, NULL, NULL, cpu_rescan, cpu_childdetached);

/*
 * Statically-allocated CPU info for the primary CPU (or the only
 * CPU, on uniprocessors).  The CPU info list is initialized to
 * point at it.
 */
#ifdef TRAPLOG
struct tlog tlog_primary;
#endif
struct cpu_info cpu_info_primary __aligned(CACHE_LINE_SIZE) = {
	.ci_dev = 0,
	.ci_self = &cpu_info_primary,
	.ci_idepth = -1,
	.ci_curlwp = &lwp0,
	.ci_curldt = -1,
#ifdef TRAPLOG
	.ci_tlog_base = &tlog_primary,
#endif /* !TRAPLOG */
};

struct cpu_info *cpu_info_list = &cpu_info_primary;

static void	cpu_set_tss_gates(struct cpu_info *);

#ifdef i386
static void	tss_init(struct i386tss *, void *, void *);
#endif

static void	cpu_init_idle_lwp(struct cpu_info *);

uint32_t cpu_feature[5]; /* X86 CPUID feature bits
			  *	[0] basic features %edx
			  *	[1] basic features %ecx
			  *	[2] extended features %edx
			  *	[3] extended features %ecx
			  *	[4] VIA padlock features
			  */

extern char x86_64_doubleflt_stack[];

#ifdef MULTIPROCESSOR
bool x86_mp_online;
paddr_t mp_trampoline_paddr = MP_TRAMPOLINE;
#endif
#if NLAPIC > 0
static vaddr_t cmos_data_mapping;
#endif
struct cpu_info *cpu_starting;

#ifdef MULTIPROCESSOR
void    	cpu_hatch(void *);
static void    	cpu_boot_secondary(struct cpu_info *ci);
static void    	cpu_start_secondary(struct cpu_info *ci);
#endif
#if NLAPIC > 0
static void	cpu_copy_trampoline(void);
#endif

/*
 * Runs once per boot once multiprocessor goo has been detected and
 * the local APIC on the boot processor has been mapped.
 *
 * Called from lapic_boot_init() (from mpbios_scan()).
 */
#if NLAPIC > 0
void
cpu_init_first(void)
{

	cpu_info_primary.ci_cpuid = lapic_cpu_number();
	cpu_copy_trampoline();

	cmos_data_mapping = uvm_km_alloc(kernel_map, PAGE_SIZE, 0, UVM_KMF_VAONLY);
	if (cmos_data_mapping == 0)
		panic("No KVA for page 0");
	pmap_kenter_pa(cmos_data_mapping, 0, VM_PROT_READ|VM_PROT_WRITE, 0);
	pmap_update(pmap_kernel());
}
#endif

static int
cpu_match(device_t parent, cfdata_t match, void *aux)
{

	return 1;
}

static void
cpu_vm_init(struct cpu_info *ci)
{
	int ncolors = 2, i;

	for (i = CAI_ICACHE; i <= CAI_L2CACHE; i++) {
		struct x86_cache_info *cai;
		int tcolors;

		cai = &ci->ci_cinfo[i];

		tcolors = atop(cai->cai_totalsize);
		switch(cai->cai_associativity) {
		case 0xff:
			tcolors = 1; /* fully associative */
			break;
		case 0:
		case 1:
			break;
		default:
			tcolors /= cai->cai_associativity;
		}
		ncolors = max(ncolors, tcolors);
		/*
		 * If the desired number of colors is not a power of
		 * two, it won't be good.  Find the greatest power of
		 * two which is an even divisor of the number of colors,
		 * to preserve even coloring of pages.
		 */
		if (ncolors & (ncolors - 1) ) {
			int try, picked = 1;
			for (try = 1; try < ncolors; try *= 2) {
				if (ncolors % try == 0) picked = try;
			}
			if (picked == 1) {
				panic("desired number of cache colors %d is "
			      	" > 1, but not even!", ncolors);
			}
			ncolors = picked;
		}
	}

	/*
	 * Knowing the size of the largest cache on this CPU, potentially
	 * re-color our pages.
	 */
	aprint_debug_dev(ci->ci_dev, "%d page colors\n", ncolors);
	uvm_page_recolor(ncolors);

	pmap_tlb_cpu_init(ci);
}

static void
cpu_attach(device_t parent, device_t self, void *aux)
{
	struct cpu_softc *sc = device_private(self);
	struct cpu_attach_args *caa = aux;
	struct cpu_info *ci;
	uintptr_t ptr;
#if NLAPIC > 0
	int cpunum = caa->cpu_number;
#endif
	static bool again;

	sc->sc_dev = self;

	if (ncpu == maxcpus) {
#ifndef _LP64
		aprint_error(": too many CPUs, please use NetBSD/amd64\n");
#else
		aprint_error(": too many CPUs\n");
#endif
		return;
	}

	/*
	 * If we're an Application Processor, allocate a cpu_info
	 * structure, otherwise use the primary's.
	 */
	if (caa->cpu_role == CPU_ROLE_AP) {
		if ((boothowto & RB_MD1) != 0) {
			aprint_error(": multiprocessor boot disabled\n");
			if (!pmf_device_register(self, NULL, NULL))
				aprint_error_dev(self,
				    "couldn't establish power handler\n");
			return;
		}
		aprint_naive(": Application Processor\n");
		ptr = (uintptr_t)kmem_zalloc(sizeof(*ci) + CACHE_LINE_SIZE - 1,
		    KM_SLEEP);
		ci = (struct cpu_info *)roundup2(ptr, CACHE_LINE_SIZE);
		ci->ci_curldt = -1;
#ifdef TRAPLOG
		ci->ci_tlog_base = kmem_zalloc(sizeof(struct tlog), KM_SLEEP);
#endif
	} else {
		aprint_naive(": %s Processor\n",
		    caa->cpu_role == CPU_ROLE_SP ? "Single" : "Boot");
		ci = &cpu_info_primary;
#if NLAPIC > 0
		if (cpunum != lapic_cpu_number()) {
			/* XXX should be done earlier. */
			uint32_t reg;
			aprint_verbose("\n");
			aprint_verbose_dev(self, "running CPU at apic %d"
			    " instead of at expected %d", lapic_cpu_number(),
			    cpunum);
			reg = i82489_readreg(LAPIC_ID);
			i82489_writereg(LAPIC_ID, (reg & ~LAPIC_ID_MASK) |
			    (cpunum << LAPIC_ID_SHIFT));
		}
		if (cpunum != lapic_cpu_number()) {
			aprint_error_dev(self, "unable to reset apic id\n");
		}
#endif
	}

	ci->ci_self = ci;
	sc->sc_info = ci;
	ci->ci_dev = self;
	ci->ci_acpiid = caa->cpu_id;
	ci->ci_cpuid = caa->cpu_number;
	ci->ci_func = caa->cpu_func;

	/* Must be before mi_cpu_attach(). */
	cpu_vm_init(ci);

	if (caa->cpu_role == CPU_ROLE_AP) {
		int error;

		error = mi_cpu_attach(ci);
		if (error != 0) {
			aprint_normal("\n");
			aprint_error_dev(self,
			    "mi_cpu_attach failed with %d\n", error);
			return;
		}
		cpu_init_tss(ci);
	} else {
		KASSERT(ci->ci_data.cpu_idlelwp != NULL);
	}

	pmap_reference(pmap_kernel());
	ci->ci_pmap = pmap_kernel();
	ci->ci_tlbstate = TLBSTATE_STALE;

	/*
	 * Boot processor may not be attached first, but the below
	 * must be done to allow booting other processors.
	 */
	if (!again) {
		atomic_or_32(&ci->ci_flags, CPUF_PRESENT | CPUF_PRIMARY);
		/* Basic init. */
		cpu_intr_init(ci);
		cpu_get_tsc_freq(ci);
		cpu_init(ci);
		cpu_set_tss_gates(ci);
		pmap_cpu_init_late(ci);
#if NLAPIC > 0
		if (caa->cpu_role != CPU_ROLE_SP) {
			/* Enable lapic. */
			lapic_enable();
			lapic_set_lvt();
			lapic_calibrate_timer(ci);
		}
#endif
		/* Make sure DELAY() is initialized. */
		DELAY(1);
		again = true;
	}

	/* further PCB init done later. */

	switch (caa->cpu_role) {
	case CPU_ROLE_SP:
		atomic_or_32(&ci->ci_flags, CPUF_SP);
		cpu_identify(ci);
		x86_errata();
		x86_cpu_idle_init();
		break;

	case CPU_ROLE_BP:
		atomic_or_32(&ci->ci_flags, CPUF_BSP);
		cpu_identify(ci);
		x86_errata();
		x86_cpu_idle_init();
		break;

#ifdef MULTIPROCESSOR
	case CPU_ROLE_AP:
		/*
		 * report on an AP
		 */
		cpu_intr_init(ci);
		gdt_alloc_cpu(ci);
		cpu_set_tss_gates(ci);
		pmap_cpu_init_late(ci);
		cpu_start_secondary(ci);
		if (ci->ci_flags & CPUF_PRESENT) {
			struct cpu_info *tmp;

			cpu_identify(ci);
			tmp = cpu_info_list;
			while (tmp->ci_next)
				tmp = tmp->ci_next;

			tmp->ci_next = ci;
		}
		break;
#endif

	default:
		aprint_normal("\n");
		panic("unknown processor type??\n");
	}

	pat_init(ci);

	if (!pmf_device_register1(self, cpu_suspend, cpu_resume, cpu_shutdown))
		aprint_error_dev(self, "couldn't establish power handler\n");

#ifdef MULTIPROCESSOR
	if (mp_verbose) {
		struct lwp *l = ci->ci_data.cpu_idlelwp;
		struct pcb *pcb = lwp_getpcb(l);

		aprint_verbose_dev(self,
		    "idle lwp at %p, idle sp at %p\n",
		    l,
#ifdef i386
		    (void *)pcb->pcb_esp
#else
		    (void *)pcb->pcb_rsp
#endif
		);
	}
#endif

	/*
	 * Postpone the "cpufeaturebus" scan.
	 * It is safe to scan the pseudo-bus
	 * only after all CPUs have attached.
	 */
	(void)config_defer(self, cpu_defer);
}

static void
cpu_defer(device_t self)
{
	cpu_rescan(self, NULL, NULL);
}

static int
cpu_rescan(device_t self, const char *ifattr, const int *locators)
{
	struct cpu_softc *sc = device_private(self);
	struct cpufeature_attach_args cfaa;
	struct cpu_info *ci = sc->sc_info;

	memset(&cfaa, 0, sizeof(cfaa));
	cfaa.ci = ci;

	if (ifattr_match(ifattr, "cpufeaturebus")) {

		if (ci->ci_frequency == NULL) {
			cfaa.name = "frequency";
			ci->ci_frequency = config_found_ia(self,
			    "cpufeaturebus", &cfaa, NULL);
		}

		if (ci->ci_padlock == NULL) {
			cfaa.name = "padlock";
			ci->ci_padlock = config_found_ia(self,
			    "cpufeaturebus", &cfaa, NULL);
		}

		if (ci->ci_temperature == NULL) {
			cfaa.name = "temperature";
			ci->ci_temperature = config_found_ia(self,
			    "cpufeaturebus", &cfaa, NULL);
		}

		if (ci->ci_vm == NULL) {
			cfaa.name = "vm";
			ci->ci_vm = config_found_ia(self,
			    "cpufeaturebus", &cfaa, NULL);
		}
	}

	return 0;
}

static void
cpu_childdetached(device_t self, device_t child)
{
	struct cpu_softc *sc = device_private(self);
	struct cpu_info *ci = sc->sc_info;

	if (ci->ci_frequency == child)
		ci->ci_frequency = NULL;

	if (ci->ci_padlock == child)
		ci->ci_padlock = NULL;

	if (ci->ci_temperature == child)
		ci->ci_temperature = NULL;

	if (ci->ci_vm == child)
		ci->ci_vm = NULL;
}

/*
 * Initialize the processor appropriately.
 */

void
cpu_init(struct cpu_info *ci)
{
	uint32_t cr4 = 0;

	lcr0(rcr0() | CR0_WP);

	/*
	 * On a P6 or above, enable global TLB caching if the
	 * hardware supports it.
	 */
	if (cpu_feature[0] & CPUID_PGE)
		cr4 |= CR4_PGE;	/* enable global TLB caching */

	/*
	 * If we have FXSAVE/FXRESTOR, use them.
	 */
	if (cpu_feature[0] & CPUID_FXSR) {
		cr4 |= CR4_OSFXSR;

		/*
		 * If we have SSE/SSE2, enable XMM exceptions.
		 */
		if (cpu_feature[0] & (CPUID_SSE|CPUID_SSE2))
			cr4 |= CR4_OSXMMEXCPT;
	}

	/* If xsave is supported, enable it */
	if (cpu_feature[1] & CPUID2_XSAVE)
		cr4 |= CR4_OSXSAVE;

	if (cr4) {
		cr4 |= rcr4();
		lcr4(cr4);
	}

	/* If xsave is enabled, enable all fpu features */
	if (cr4 & CR4_OSXSAVE)
		wrxcr(0, x86_xsave_features & XCR0_FPU);

#ifdef MTRR
	/*
	 * On a P6 or above, initialize MTRR's if the hardware supports them.
	 */
	if (cpu_feature[0] & CPUID_MTRR) {
		if ((ci->ci_flags & CPUF_AP) == 0)
			i686_mtrr_init_first();
		mtrr_init_cpu(ci);
	}

#ifdef i386
	if (strcmp((char *)(ci->ci_vendor), "AuthenticAMD") == 0) {
		/*
		 * Must be a K6-2 Step >= 7 or a K6-III.
		 */
		if (CPUID_TO_FAMILY(ci->ci_signature) == 5) {
			if (CPUID_TO_MODEL(ci->ci_signature) > 8 ||
			    (CPUID_TO_MODEL(ci->ci_signature) == 8 &&
			     CPUID_TO_STEPPING(ci->ci_signature) >= 7)) {
				mtrr_funcs = &k6_mtrr_funcs;
				k6_mtrr_init_first();
				mtrr_init_cpu(ci);
			}
		}
	}
#endif	/* i386 */
#endif /* MTRR */

	if (ci != &cpu_info_primary) {
		/* Synchronize TSC again, and check for drift. */
		wbinvd();
		atomic_or_32(&ci->ci_flags, CPUF_RUNNING);
		tsc_sync_ap(ci);
	} else {
		atomic_or_32(&ci->ci_flags, CPUF_RUNNING);
	}
}

#ifdef MULTIPROCESSOR
void
cpu_boot_secondary_processors(void)
{
	struct cpu_info *ci;
	kcpuset_t *cpus;
	u_long i;

	/* Now that we know the number of CPUs, patch the text segment. */
	x86_patch(false);

	kcpuset_create(&cpus, true);
	kcpuset_set(cpus, cpu_index(curcpu()));
	for (i = 0; i < maxcpus; i++) {
		ci = cpu_lookup(i);
		if (ci == NULL)
			continue;
		if (ci->ci_data.cpu_idlelwp == NULL)
			continue;
		if ((ci->ci_flags & CPUF_PRESENT) == 0)
			continue;
		if (ci->ci_flags & (CPUF_BSP|CPUF_SP|CPUF_PRIMARY))
			continue;
		cpu_boot_secondary(ci);
		kcpuset_set(cpus, cpu_index(ci));
	}
	while (!kcpuset_match(cpus, kcpuset_running))
		;
	kcpuset_destroy(cpus);

	x86_mp_online = true;

	/* Now that we know about the TSC, attach the timecounter. */
	tsc_tc_init();

	/* Enable zeroing of pages in the idle loop if we have SSE2. */
	vm_page_zero_enable = ((cpu_feature[0] & CPUID_SSE2) != 0);
}
#endif

static void
cpu_init_idle_lwp(struct cpu_info *ci)
{
	struct lwp *l = ci->ci_data.cpu_idlelwp;
	struct pcb *pcb = lwp_getpcb(l);

	pcb->pcb_cr0 = rcr0();
}

void
cpu_init_idle_lwps(void)
{
	struct cpu_info *ci;
	u_long i;

	for (i = 0; i < maxcpus; i++) {
		ci = cpu_lookup(i);
		if (ci == NULL)
			continue;
		if (ci->ci_data.cpu_idlelwp == NULL)
			continue;
		if ((ci->ci_flags & CPUF_PRESENT) == 0)
			continue;
		cpu_init_idle_lwp(ci);
	}
}

#ifdef MULTIPROCESSOR
void
cpu_start_secondary(struct cpu_info *ci)
{
	extern paddr_t mp_pdirpa;
	u_long psl;
	int i;

	mp_pdirpa = pmap_init_tmp_pgtbl(mp_trampoline_paddr);
	atomic_or_32(&ci->ci_flags, CPUF_AP);
	ci->ci_curlwp = ci->ci_data.cpu_idlelwp;
	if (CPU_STARTUP(ci, mp_trampoline_paddr) != 0) {
		return;
	}

	/*
	 * Wait for it to become ready.   Setting cpu_starting opens the
	 * initial gate and allows the AP to start soft initialization.
	 */
	KASSERT(cpu_starting == NULL);
	cpu_starting = ci;
	for (i = 100000; (!(ci->ci_flags & CPUF_PRESENT)) && i > 0; i--) {
#ifdef MPDEBUG
		extern int cpu_trace[3];
		static int otrace[3];
		if (memcmp(otrace, cpu_trace, sizeof(otrace)) != 0) {
			aprint_debug_dev(ci->ci_dev, "trace %02x %02x %02x\n",
			    cpu_trace[0], cpu_trace[1], cpu_trace[2]);
			memcpy(otrace, cpu_trace, sizeof(otrace));
		}
#endif
		i8254_delay(10);
	}

	if ((ci->ci_flags & CPUF_PRESENT) == 0) {
		aprint_error_dev(ci->ci_dev, "failed to become ready\n");
#if defined(MPDEBUG) && defined(DDB)
		printf("dropping into debugger; continue from here to resume boot\n");
		Debugger();
#endif
	} else {
		/*
		 * Synchronize time stamp counters. Invalidate cache and do
		 * twice to try and minimize possible cache effects. Disable
		 * interrupts to try and rule out any external interference.
		 */
		psl = x86_read_psl();
		x86_disable_intr();
		wbinvd();
		tsc_sync_bp(ci);
		x86_write_psl(psl);
	}

	CPU_START_CLEANUP(ci);
	cpu_starting = NULL;
}

void
cpu_boot_secondary(struct cpu_info *ci)
{
	int64_t drift;
	u_long psl;
	int i;

	atomic_or_32(&ci->ci_flags, CPUF_GO);
	for (i = 100000; (!(ci->ci_flags & CPUF_RUNNING)) && i > 0; i--) {
		i8254_delay(10);
	}
	if ((ci->ci_flags & CPUF_RUNNING) == 0) {
		aprint_error_dev(ci->ci_dev, "failed to start\n");
#if defined(MPDEBUG) && defined(DDB)
		printf("dropping into debugger; continue from here to resume boot\n");
		Debugger();
#endif
	} else {
		/* Synchronize TSC again, check for drift. */
		drift = ci->ci_data.cpu_cc_skew;
		psl = x86_read_psl();
		x86_disable_intr();
		wbinvd();
		tsc_sync_bp(ci);
		x86_write_psl(psl);
		drift -= ci->ci_data.cpu_cc_skew;
		aprint_debug_dev(ci->ci_dev, "TSC skew=%lld drift=%lld\n",
		    (long long)ci->ci_data.cpu_cc_skew, (long long)drift);
		tsc_sync_drift(drift);
	}
}

/*
 * The CPU ends up here when its ready to run
 * This is called from code in mptramp.s; at this point, we are running
 * in the idle pcb/idle stack of the new CPU.  When this function returns,
 * this processor will enter the idle loop and start looking for work.
 */
void
cpu_hatch(void *v)
{
	struct cpu_info *ci = (struct cpu_info *)v;
	struct pcb *pcb;
	int s, i;

	cpu_init_msrs(ci, true);
	cpu_probe(ci);

	ci->ci_data.cpu_cc_freq = cpu_info_primary.ci_data.cpu_cc_freq;
	/* cpu_get_tsc_freq(ci); */

	KDASSERT((ci->ci_flags & CPUF_PRESENT) == 0);

	/*
	 * Synchronize time stamp counters.  Invalidate cache and do twice
	 * to try and minimize possible cache effects.  Note that interrupts
	 * are off at this point.
	 */
	wbinvd();
	atomic_or_32(&ci->ci_flags, CPUF_PRESENT);
	tsc_sync_ap(ci);

	/*
	 * Wait to be brought online.  Use 'monitor/mwait' if available,
	 * in order to make the TSC drift as much as possible. so that
	 * we can detect it later.  If not available, try 'pause'.
	 * We'd like to use 'hlt', but we have interrupts off.
	 */
	while ((ci->ci_flags & CPUF_GO) == 0) {
		if ((cpu_feature[1] & CPUID2_MONITOR) != 0) {
			x86_monitor(&ci->ci_flags, 0, 0);
			if ((ci->ci_flags & CPUF_GO) != 0) {
				continue;
			}
			x86_mwait(0, 0);
		} else {
			for (i = 10000; i != 0; i--) {
				x86_pause();
			}
		}
	}

	/* Because the text may have been patched in x86_patch(). */
	wbinvd();
	x86_flush();
	tlbflushg();

	KASSERT((ci->ci_flags & CPUF_RUNNING) == 0);

#ifdef PAE
	pd_entry_t * l3_pd = ci->ci_pae_l3_pdir;
	for (i = 0 ; i < PDP_SIZE; i++) {
		l3_pd[i] = pmap_kernel()->pm_pdirpa[i] | PG_V;
	}
	lcr3(ci->ci_pae_l3_pdirpa);
#else
	lcr3(pmap_pdirpa(pmap_kernel(), 0));
#endif

	pcb = lwp_getpcb(curlwp);
	pcb->pcb_cr3 = rcr3();
	pcb = lwp_getpcb(ci->ci_data.cpu_idlelwp);
	lcr0(pcb->pcb_cr0);

	cpu_init_idt();
	gdt_init_cpu(ci);
#if NLAPIC > 0
	lapic_enable();
	lapic_set_lvt();
	lapic_initclocks();
#endif

	fpuinit(ci);
	lldt(GSYSSEL(GLDT_SEL, SEL_KPL));
	ltr(ci->ci_tss_sel);

	cpu_init(ci);
	cpu_get_tsc_freq(ci);

	s = splhigh();
#ifdef i386
	lapic_tpr = 0;
#else
	lcr8(0);
#endif
	x86_enable_intr();
	splx(s);
	x86_errata();

	aprint_debug_dev(ci->ci_dev, "running\n");

	idle_loop(NULL);
	KASSERT(false);
}
#endif

#if defined(DDB)

#include <ddb/db_output.h>
#include <machine/db_machdep.h>

/*
 * Dump CPU information from ddb.
 */
void
cpu_debug_dump(void)
{
	struct cpu_info *ci;
	CPU_INFO_ITERATOR cii;

	db_printf("addr		dev	id	flags	ipis	curlwp 		fpcurlwp\n");
	for (CPU_INFO_FOREACH(cii, ci)) {
		db_printf("%p	%s	%ld	%x	%x	%10p	%10p\n",
		    ci,
		    ci->ci_dev == NULL ? "BOOT" : device_xname(ci->ci_dev),
		    (long)ci->ci_cpuid,
		    ci->ci_flags, ci->ci_ipis,
		    ci->ci_curlwp,
		    ci->ci_fpcurlwp);
	}
}
#endif

#if NLAPIC > 0
static void
cpu_copy_trampoline(void)
{
	/*
	 * Copy boot code.
	 */
	extern u_char cpu_spinup_trampoline[];
	extern u_char cpu_spinup_trampoline_end[];

	vaddr_t mp_trampoline_vaddr;

	mp_trampoline_vaddr = uvm_km_alloc(kernel_map, PAGE_SIZE, 0,
	    UVM_KMF_VAONLY);

	pmap_kenter_pa(mp_trampoline_vaddr, mp_trampoline_paddr,
	    VM_PROT_READ | VM_PROT_WRITE, 0);
	pmap_update(pmap_kernel());
	memcpy((void *)mp_trampoline_vaddr,
	    cpu_spinup_trampoline,
	    cpu_spinup_trampoline_end - cpu_spinup_trampoline);

	pmap_kremove(mp_trampoline_vaddr, PAGE_SIZE);
	pmap_update(pmap_kernel());
	uvm_km_free(kernel_map, mp_trampoline_vaddr, PAGE_SIZE, UVM_KMF_VAONLY);
}
#endif

#ifdef i386
static void
tss_init(struct i386tss *tss, void *stack, void *func)
{
	KASSERT(curcpu()->ci_pmap == pmap_kernel());

	memset(tss, 0, sizeof *tss);
	tss->tss_esp0 = tss->tss_esp = (int)((char *)stack + USPACE - 16);
	tss->tss_ss0 = GSEL(GDATA_SEL, SEL_KPL);
	tss->__tss_cs = GSEL(GCODE_SEL, SEL_KPL);
	tss->tss_fs = GSEL(GCPU_SEL, SEL_KPL);
	tss->tss_gs = tss->__tss_es = tss->__tss_ds =
	    tss->__tss_ss = GSEL(GDATA_SEL, SEL_KPL);
	/* %cr3 contains the value associated to pmap_kernel */
	tss->tss_cr3 = rcr3();
	tss->tss_esp = (int)((char *)stack + USPACE - 16);
	tss->tss_ldt = GSEL(GLDT_SEL, SEL_KPL);
	tss->__tss_eflags = PSL_MBO | PSL_NT;	/* XXX not needed? */
	tss->__tss_eip = (int)func;
}

/* XXX */
#define IDTVEC(name)	__CONCAT(X, name)
typedef void (vector)(void);
extern vector IDTVEC(tss_trap08);
#if defined(DDB) && defined(MULTIPROCESSOR)
extern vector Xintrddbipi;
extern int ddb_vec;
#endif

static void
cpu_set_tss_gates(struct cpu_info *ci)
{
	struct segment_descriptor sd;

	ci->ci_doubleflt_stack = (char *)uvm_km_alloc(kernel_map, USPACE, 0,
	    UVM_KMF_WIRED);
	tss_init(&ci->ci_doubleflt_tss, ci->ci_doubleflt_stack,
	    IDTVEC(tss_trap08));
	setsegment(&sd, &ci->ci_doubleflt_tss, sizeof(struct i386tss) - 1,
	    SDT_SYS386TSS, SEL_KPL, 0, 0);
	ci->ci_gdt[GTRAPTSS_SEL].sd = sd;
	setgate(&idt[8], NULL, 0, SDT_SYSTASKGT, SEL_KPL,
	    GSEL(GTRAPTSS_SEL, SEL_KPL));

#if defined(DDB) && defined(MULTIPROCESSOR)
	/*
	 * Set up separate handler for the DDB IPI, so that it doesn't
	 * stomp on a possibly corrupted stack.
	 *
	 * XXX overwriting the gate set in db_machine_init.
	 * Should rearrange the code so that it's set only once.
	 */
	ci->ci_ddbipi_stack = (char *)uvm_km_alloc(kernel_map, USPACE, 0,
	    UVM_KMF_WIRED);
	tss_init(&ci->ci_ddbipi_tss, ci->ci_ddbipi_stack, Xintrddbipi);

	setsegment(&sd, &ci->ci_ddbipi_tss, sizeof(struct i386tss) - 1,
	    SDT_SYS386TSS, SEL_KPL, 0, 0);
	ci->ci_gdt[GIPITSS_SEL].sd = sd;

	setgate(&idt[ddb_vec], NULL, 0, SDT_SYSTASKGT, SEL_KPL,
	    GSEL(GIPITSS_SEL, SEL_KPL));
#endif
}
#else
static void
cpu_set_tss_gates(struct cpu_info *ci)
{

}
#endif	/* i386 */

#ifdef MULTIPROCESSOR
int
mp_cpu_start(struct cpu_info *ci, paddr_t target)
{
	unsigned short dwordptr[2];
	int error;

	/*
	 * Bootstrap code must be addressable in real mode
	 * and it must be page aligned.
	 */
	KASSERT(target < 0x10000 && target % PAGE_SIZE == 0);

	/*
	 * "The BSP must initialize CMOS shutdown code to 0Ah ..."
	 */

	outb(IO_RTC, NVRAM_RESET);
	outb(IO_RTC+1, NVRAM_RESET_JUMP);

	/*
	 * "and the warm reset vector (DWORD based at 40:67) to point
	 * to the AP startup code ..."
	 */

	dwordptr[0] = 0;
	dwordptr[1] = target >> 4;

#if NLAPIC > 0
	memcpy((uint8_t *)cmos_data_mapping + 0x467, dwordptr, 4);
#endif

	if ((cpu_feature[0] & CPUID_APIC) == 0) {
		aprint_error("mp_cpu_start: CPU does not have APIC\n");
		return ENODEV;
	}

	/*
	 * ... prior to executing the following sequence:".  We'll also add in
	 * local cache flush, in case the BIOS has left the AP with its cache
	 * disabled.  It may not be able to cope with MP coherency.
	 */
	wbinvd();

	if (ci->ci_flags & CPUF_AP) {
		error = x86_ipi_init(ci->ci_cpuid);
		if (error != 0) {
			aprint_error_dev(ci->ci_dev, "%s: IPI not taken (1)\n",
			    __func__);
			return error;
		}
		i8254_delay(10000);

		error = x86_ipi_startup(ci->ci_cpuid, target / PAGE_SIZE);
		if (error != 0) {
			aprint_error_dev(ci->ci_dev, "%s: IPI not taken (2)\n",
			    __func__);
			return error;
		}
		i8254_delay(200);

		error = x86_ipi_startup(ci->ci_cpuid, target / PAGE_SIZE);
		if (error != 0) {
			aprint_error_dev(ci->ci_dev, "%s: IPI not taken (3)\n",
			    __func__);
			return error;
		}
		i8254_delay(200);
	}

	return 0;
}

void
mp_cpu_start_cleanup(struct cpu_info *ci)
{
	/*
	 * Ensure the NVRAM reset byte contains something vaguely sane.
	 */

	outb(IO_RTC, NVRAM_RESET);
	outb(IO_RTC+1, NVRAM_RESET_RST);
}
#endif

#ifdef __x86_64__
typedef void (vector)(void);
extern vector Xsyscall, Xsyscall32;
#endif

void
cpu_init_msrs(struct cpu_info *ci, bool full)
{
#ifdef __x86_64__
	wrmsr(MSR_STAR,
	    ((uint64_t)GSEL(GCODE_SEL, SEL_KPL) << 32) |
	    ((uint64_t)LSEL(LSYSRETBASE_SEL, SEL_UPL) << 48));
	wrmsr(MSR_LSTAR, (uint64_t)Xsyscall);
	wrmsr(MSR_CSTAR, (uint64_t)Xsyscall32);
	wrmsr(MSR_SFMASK, PSL_NT|PSL_T|PSL_I|PSL_C);

	if (full) {
		wrmsr(MSR_FSBASE, 0);
		wrmsr(MSR_GSBASE, (uint64_t)ci);
		wrmsr(MSR_KERNELGSBASE, 0);
	}
#endif	/* __x86_64__ */

	if (cpu_feature[2] & CPUID_NOX)
		wrmsr(MSR_EFER, rdmsr(MSR_EFER) | EFER_NXE);
}

void
cpu_offline_md(void)
{
	int s;

	s = splhigh();
	fpusave_cpu(true);
	splx(s);
}

/* XXX joerg restructure and restart CPUs individually */
static bool
cpu_stop(device_t dv)
{
	struct cpu_softc *sc = device_private(dv);
	struct cpu_info *ci = sc->sc_info;
	int err;

	KASSERT((ci->ci_flags & CPUF_PRESENT) != 0);

	if ((ci->ci_flags & CPUF_PRIMARY) != 0)
		return true;

	if (ci->ci_data.cpu_idlelwp == NULL)
		return true;

	sc->sc_wasonline = !(ci->ci_schedstate.spc_flags & SPCF_OFFLINE);

	if (sc->sc_wasonline) {
		mutex_enter(&cpu_lock);
		err = cpu_setstate(ci, false);
		mutex_exit(&cpu_lock);

		if (err != 0)
			return false;
	}

	return true;
}

static bool
cpu_suspend(device_t dv, const pmf_qual_t *qual)
{
	struct cpu_softc *sc = device_private(dv);
	struct cpu_info *ci = sc->sc_info;

	if ((ci->ci_flags & CPUF_PRESENT) == 0)
		return true;
	else {
		cpufreq_suspend(ci);
	}

	return cpu_stop(dv);
}

static bool
cpu_resume(device_t dv, const pmf_qual_t *qual)
{
	struct cpu_softc *sc = device_private(dv);
	struct cpu_info *ci = sc->sc_info;
	int err = 0;

	if ((ci->ci_flags & CPUF_PRESENT) == 0)
		return true;

	if ((ci->ci_flags & CPUF_PRIMARY) != 0)
		goto out;

	if (ci->ci_data.cpu_idlelwp == NULL)
		goto out;

	if (sc->sc_wasonline) {
		mutex_enter(&cpu_lock);
		err = cpu_setstate(ci, true);
		mutex_exit(&cpu_lock);
	}

out:
	if (err != 0)
		return false;

	cpufreq_resume(ci);

	return true;
}

static bool
cpu_shutdown(device_t dv, int how)
{
	struct cpu_softc *sc = device_private(dv);
	struct cpu_info *ci = sc->sc_info;

	if ((ci->ci_flags & CPUF_BSP) != 0)
		return false;

	if ((ci->ci_flags & CPUF_PRESENT) == 0)
		return true;

	return cpu_stop(dv);
}

void
cpu_get_tsc_freq(struct cpu_info *ci)
{
	uint64_t last_tsc;

	if (cpu_hascounter()) {
		last_tsc = cpu_counter_serializing();
		i8254_delay(100000);
		ci->ci_data.cpu_cc_freq =
		    (cpu_counter_serializing() - last_tsc) * 10;
	}
}

void
x86_cpu_idle_mwait(void)
{
	struct cpu_info *ci = curcpu();

	KASSERT(ci->ci_ilevel == IPL_NONE);

	x86_monitor(&ci->ci_want_resched, 0, 0);
	if (__predict_false(ci->ci_want_resched)) {
		return;
	}
	x86_mwait(0, 0);
}

void
x86_cpu_idle_halt(void)
{
	struct cpu_info *ci = curcpu();

	KASSERT(ci->ci_ilevel == IPL_NONE);

	x86_disable_intr();
	if (!__predict_false(ci->ci_want_resched)) {
		x86_stihlt();
	} else {
		x86_enable_intr();
	}
}

/*
 * Loads pmap for the current CPU.
 */
void
cpu_load_pmap(struct pmap *pmap, struct pmap *oldpmap)
{
#ifdef PAE
	struct cpu_info *ci = curcpu();
	pd_entry_t *l3_pd = ci->ci_pae_l3_pdir;
	int i;

	/*
	 * disable interrupts to block TLB shootdowns, which can reload cr3.
	 * while this doesn't block NMIs, it's probably ok as NMIs unlikely
	 * reload cr3.
	 */
	x86_disable_intr();
	for (i = 0 ; i < PDP_SIZE; i++) {
		l3_pd[i] = pmap->pm_pdirpa[i] | PG_V;
	}
	x86_enable_intr();
	tlbflush();
#else /* PAE */
	lcr3(pmap_pdirpa(pmap, 0));
#endif /* PAE */
}

/*
 * Notify all other cpus to halt.
 */

void
cpu_broadcast_halt(void)
{
	x86_broadcast_ipi(X86_IPI_HALT);
}

/*
 * Send a dummy ipi to a cpu to force it to run splraise()/spllower()
 */

void
cpu_kick(struct cpu_info *ci)
{
	x86_send_ipi(ci, 0);
}


text:
package com.crawljax.crawltests;

import org.eclipse.jetty.util.resource.Resource;

import com.crawljax.test.BaseCrawler;

/**
 * Wraps a Crawljax instance the crawls the simplesite.
 */
public class SimpleJsSiteCrawl extends BaseCrawler {

	public static final int NUMBER_OF_STATES = 11;
	public static final int NUMBER_OF_EDGES = 10;

	public SimpleJsSiteCrawl() {
		super(Resource.newClassPathResource("sites"), "simple-js-site");
	}

}


text:
console.clear()

console.log('Hola Mundo desde la Consola :)')
var nombre = 'Jonathan'
console.log('Hola Mundo desde la Consola :) te saluda %s', nombre)
var anio = 2016
console.log('Hola Mundo desde la Consola :) te saluda %s, que tengas un excelente año %d', nombre, anio)

console.error('Error Configurado por el usuario')

var cursos = document.querySelector('.course-list')
console.log(cursos)
console.dir(cursos)

console.clear()

console.log(window)
console.dir(window)

console.clear()

console.log(Date())
console.dir(Date())

console.clear()

console.group('Cursos Bextlán')
console.log('Node.js')
console.log('jQuery')
console.log('WordPress')
console.log('Responsive Design')
console.log('Diseño y Programación Web')
console.groupEnd()

console.groupCollapsed('Tutoriales Bextlán')
console.log('JavaScript')
console.log('HTML5')
console.log('PHP')
console.log('AS3')
console.log('Vlog de MirCha')
console.groupEnd()

console.clear()

var bextlan = {
    "Cursos":['Node.js','jQuery','WordPress','Responsive Design','Diseño y Programacion Web'],
    "Tutoriales":['JavaScript','HTML5','PHP','AS3','Vlog de MirCha']
}
console.table(bextlan)

function Cursos(nombre, url, tipo){
    this.nombre = nombre
    this.url = url
    this.tipo = tipo
}

var node = new Cursos('Node.js', 'http://bextlan.com/cursos/nodejs','curso')
var js = new Cursos('JavaScript', 'http://bextlan.com/tutoriales/javascript','tutorial')
console.table(node)
console.table(js)

console.clear()

console.time('Cuanto tiempo tarda mi código')
var arreglo = new Array(1000000)
for(var i = arreglo.length - 1; i >= 0; i--)
{
    arreglo[i] = new Object()
}
console.timeEnd('Cuanto tiempo tarda mi código')


text:
#ifndef __CC_PLATFORMFUNC_BADA_H__
#define __CC_PLATFORMFUNC_BADA_H__

#ifdef __cplusplus
extern "C" {
#endif

#ifndef CC_BADA_2_0

int CC_DLL printf(const char* format, ...);
int CC_DLL sprintf(char* buf, const char *format, ...);
int CC_DLL sscanf (const char *s,const char *format, ...);

#endif

void CC_DLL badaAssert(const char* pFunction, int lineNumber, const char* pszContent);

#ifdef __cplusplus
}
#endif

#endif /* __CC_PLATFORMFUNC_BADA_H__ */


text:
local _M = {}
local mt = { __index = _M }
function _M.connect()
    local db = mysql:new()
    local db_ok, err, errno, sqlstate
    if db then
        db_ok, err, errno, sqlstate = db:connect({
                        host = "localhost",
                        port = 3306,
                        pool_size = 256,
                        database = "menudb",
                        user = "develop",
                        password = "qwerasdf"})
    end
    if not db_ok then
        print_error("conncet mysql error",db_ok,err,errno,sqlstate)
        return
    end
    return setmetatable({ db = db }, mt)
end

function _M.strcheck(str)
    return string.gsub(str,"['\"]",function (x) return x..x end)
end

function _M:get_user_list()
    return self.db:query("select uid,name from user")
end

function _M:get_user_order_list(menuid)
    return self.db:query("select uid,dishname,dishprice from userorder where menuid="..tonumber(menuid))
end

function _M:get_user_last_order_list()
    return self.db:query("select name, dishname , dishprice from userorder join user on userorder.uid=user.uid where menuid=(select max(uploadtime) from menu)")
end

function _M:get_last_menu_list()
    return self.db:query("select menupath,uploadtime from menu where uploadtime=(select max(uploadtime) from menu) limit 5")
end

function _M:add_menu(menupath, uploadtime)
    menupath = self.strcheck(menupath)
    uploadtime = tonumber(uploadtime)
    return self.db:query(sprintf("insert into menu(menupath,uploadtime) values ('%s','%d')",menupath,uploadtime))
end

function _M:add_user_order(uid, dishname, dishprice, menuid)
    uid = tonumber(uid)
    dishname = self.strcheck(dishname)
    dishprice = tonumber(dishprice)
    menuid = tonumber(menuid)
    local res = self.db:query(sprintf("select id from userorder where uid=%d and menuid=%d",uid,menuid))
    if #res==0 then
        return self.db:query(sprintf("insert into userorder(uid,dishname,dishprice,menuid) value ('%d','%s','%g','%d')",uid,dishname,dishprice,menuid))
    else
        return self.db:query(sprintf("update userorder set dishname='%s', dishprice='%s' where uid=%d and menuid=%d",dishname,dishprice,uid,menuid))
    end
end

return _M


text:
{-# LANGUAGE OverloadedStrings #-}
module Main where
import           Control.Exception
import           Data.ByteString           hiding (putStrLn)
import           Data.ByteString.Char8
import           Network.Socket            hiding (recvFrom)
import           Network.Socket.ByteString
import           Prelude                   hiding (concat, putStrLn)

port = "3030"

main = withSocketsDo $ bracket getSocket close procMessages
        where getSocket = do
                (serveraddr:_) <- getAddrInfo Nothing (Just "0.0.0.0") (Just port)
                s <- socket (addrFamily serveraddr) Datagram defaultProtocol
                bind s (addrAddress serveraddr)
                return s
              procMessages s = do
                 (msg, addr) <- recvFrom s 1024
                 putStrLn $ concat ["Received ", msg]
                 procMessages s


text:
package com.googlecode.actorom;

import com.googlecode.actorom.impl.core.failover.FailoverSchemeFactory;

/**
 * Define the policy to apply when an actor fails or is just killed inside a given {@link Topology}.
 *
 * @author Sergio Bossa
 */
public interface FailoverPolicy {

    public FailoverSchemeFactory getFailoverSchemeFactory();
}


text:
$packageName = 'wirelessnetview.portable'
$url = 'http://www.nirsoft.net/utils/wirelessnetview.zip'
$checksum = '409a16f77098af40015d37615608c7c76754a49d'
$checksumType = 'sha1'
$toolsDir = "$(Split-Path -parent $MyInvocation.MyCommand.Definition)"
$installFile = Join-Path $toolsDir "wirelessnetview.exe"

Install-ChocolateyZipPackage -PackageName "$packageName" `
                             -Url "$url" `
                             -UnzipLocation "$toolsDir" `
                             -Url64bit "" `
                             -Checksum "$checksum" `
                             -ChecksumType "$checksumType"

Set-Content -Path ("$installFile.gui") `
            -Value $null


text:
package org.apache.shindig.gadgets.render;

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

import org.apache.shindig.common.uri.Uri;
import org.apache.shindig.config.BasicContainerConfig;
import org.apache.shindig.gadgets.Gadget;
import org.apache.shindig.gadgets.GadgetContext;
import org.apache.shindig.gadgets.GadgetException;
import org.apache.shindig.gadgets.LockedDomainService;
import org.apache.shindig.gadgets.process.ProcessingException;
import org.apache.shindig.gadgets.process.Processor;
import org.apache.shindig.gadgets.spec.GadgetSpec;
import org.apache.shindig.gadgets.spec.View;

import com.google.common.collect.Maps;

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

import javax.servlet.http.HttpServletResponse;
import java.util.Arrays;
import java.util.Map;

/**
 * Tests for Renderer.
 */
public class RendererTest {
  protected static final Uri SPEC_URL = Uri.parse("http://example.org/gadget.xml");
  private static final Uri TYPE_URL_HREF = Uri.parse("http://example.org/gadget.php");
  private static final String BASIC_HTML_CONTENT = "Hello, World!";
  protected static final String GADGET =
      "<Module>" +
      " <ModulePrefs title='foo'/>" +
      " <Content view='html' type='html'>" + BASIC_HTML_CONTENT + "</Content>" +
      " <Content view='url' type='url' href='" + TYPE_URL_HREF + "'/>" +
      "</Module>";
  protected static final String GADGET_CAJA =
    "<Module>" +
    " <ModulePrefs title='foo'>" +
    "   <Require feature='caja'/>" +
    " </ModulePrefs>" +
    " <Content view='html' type='html'>" + BASIC_HTML_CONTENT + "</Content>" +
    " <Content view='url' type='url' href='" + TYPE_URL_HREF + "'/>" +
    "</Module>";

  private final FakeHtmlRenderer htmlRenderer = new FakeHtmlRenderer();
  private final FakeProcessor processor = new FakeProcessor();
  private final FakeLockedDomainService lockedDomainService =  new FakeLockedDomainService();
  private FakeContainerConfig containerConfig;
  private Renderer renderer;

  @Before
  public void setUp() throws Exception {
    containerConfig = new FakeContainerConfig();
    renderer = new Renderer(processor, htmlRenderer, containerConfig, lockedDomainService);
  }

  private GadgetContext makeContext(final String view) {
    return makeContext(view, null, null);
  }

  private GadgetContext makeContext(final String view, final String sanitize, final String caja) {
    return new GadgetContext() {
      @Override
      public String getView() {
        return view;
      }

      @Override
      public String getParameter(String name) {
        if (name.equals("parent")) {
          return "http://example.org/foo";
        } else if (name.equals("sanitize")) {
          return sanitize;
        } else if (name.equals("caja")) {
          return caja;
        }
        return null;
      }
    };
  }

  @Test
  public void renderTypeHtml() {
    RenderingResults results = renderer.render(makeContext("html"));
    assertEquals(RenderingResults.Status.OK, results.getStatus());
    assertEquals(BASIC_HTML_CONTENT, results.getContent());
  }

  @Test
  public void renderTypeUrl() {
    RenderingResults results = renderer.render(makeContext("url"));
    assertEquals(RenderingResults.Status.MUST_REDIRECT, results.getStatus());
    assertEquals(TYPE_URL_HREF, results.getRedirect());
  }

  @Test
  public void renderTypeUrlRequiresCajaIncompatible() {
    processor.setGadgetData(GADGET_CAJA);
    RenderingResults results = renderer.render(makeContext("url"));
    assertEquals(RenderingResults.Status.ERROR, results.getStatus());
    assertEquals(HttpServletResponse.SC_BAD_REQUEST, results.getHttpStatusCode());
  }

  @Test
  public void renderTypeUrlCajaParamIncompatible() {
    RenderingResults results = renderer.render(makeContext("url", null, "1"));
    assertEquals(RenderingResults.Status.ERROR, results.getStatus());
    assertEquals(HttpServletResponse.SC_BAD_REQUEST, results.getHttpStatusCode());
  }

  @Test
  public void renderTypeUrlSanitizedIncompatible() {
    RenderingResults results = renderer.render(makeContext("url", "1", null));
    assertEquals(RenderingResults.Status.ERROR, results.getStatus());
    assertEquals(HttpServletResponse.SC_BAD_REQUEST, results.getHttpStatusCode());
  }

  @Test
  public void handlesProcessingExceptionGracefully() {
    processor.exception = new ProcessingException("foo", HttpServletResponse.SC_FORBIDDEN);
    RenderingResults results = renderer.render(makeContext("html"));
    assertEquals(RenderingResults.Status.ERROR, results.getStatus());
    assertEquals("foo", results.getErrorMessage());
    assertEquals(HttpServletResponse.SC_FORBIDDEN, results.getHttpStatusCode());
  }

  @Test
  public void handlesRenderingExceptionGracefully() {
    htmlRenderer.exception = new RenderingException("four-oh-four", HttpServletResponse.SC_NOT_FOUND);
    RenderingResults results = renderer.render(makeContext("html"));
    assertEquals(RenderingResults.Status.ERROR, results.getStatus());
    assertEquals("four-oh-four", results.getErrorMessage());
    assertEquals(HttpServletResponse.SC_NOT_FOUND, results.getHttpStatusCode());
  }

  @Test
  public void handlesRuntimeWrappedGadgetExceptionGracefully() {
    htmlRenderer.runtimeException = new RuntimeException(
        new GadgetException(GadgetException.Code.FAILED_TO_RETRIEVE_CONTENT, "oh no!"));
    RenderingResults results = renderer.render(makeContext("html"));
    assertEquals(RenderingResults.Status.ERROR, results.getStatus());
    assertEquals("oh no!", results.getErrorMessage());
  }

  @Test(expected = RuntimeException.class)
  public void otherRuntimeExceptionsThrow() {
    htmlRenderer.runtimeException = new RuntimeException("Help!");
    renderer.render(makeContext("html"));
  }

  @Test
  public void validateParent() throws Exception {
    containerConfig.data.put("gadgets.parent",
        Arrays.asList("http:\\/\\/example\\.org\\/[a-z]+", "localhost"));

    RenderingResults results = renderer.render(makeContext("html"));
    assertEquals(RenderingResults.Status.OK, results.getStatus());
  }

  @Test
  public void validateBadParent() throws Exception {
    containerConfig.data.put("gadgets.parent",
        Arrays.asList("http:\\/\\/example\\.com\\/[a-z]+", "localhost"));
    RenderingResults results = renderer.render(makeContext("html"));
    assertEquals(RenderingResults.Status.ERROR, results.getStatus());
    assertNotNull("No error message provided for bad parent.", results.getErrorMessage());
  }

  @Test
  public void handlesNoCurrentViewGracefully() throws Exception {
    RenderingResults results = renderer.render(makeContext("bad-view-name"));
    assertEquals(RenderingResults.Status.ERROR, results.getStatus());
    assertNotNull("No error message for missing current view", results.getErrorMessage());
  }

  @Test
  public void verifyLockedDomain() throws Exception {
    renderer.render(makeContext("html"));
    assertTrue("Locked domain not verified", lockedDomainService.wasChecked);
  }

  @Test
  public void wrongDomainFails() throws Exception {
    lockedDomainService.canRender = false;
    RenderingResults results = renderer.render(makeContext("html"));
    assertEquals(RenderingResults.Status.ERROR, results.getStatus());
  }

  private static class FakeContainerConfig extends BasicContainerConfig {
    protected final Map<String, Object> data = Maps.newHashMap();

    @Override
    public Object getProperty(String container, String name) {
      return data.get(name);
    }
  }

  private static class FakeHtmlRenderer extends HtmlRenderer {
    protected RenderingException exception;
    protected RuntimeException runtimeException;

    public FakeHtmlRenderer() {
      super(null, null, null, null);
    }

    @Override
    public String render(Gadget gadget) throws RenderingException {
      if (exception != null) {
        throw exception;
      }
      if (runtimeException != null) {
        throw runtimeException;
      }
      return gadget.getCurrentView().getContent();
    }
  }

  private static class FakeProcessor extends Processor {
    protected ProcessingException exception;
    private String gadgetData;

    public FakeProcessor() {
      super(null, null, null, null, null);
      this.gadgetData = GADGET;
    }

    public void setGadgetData(String gadgetData) {
      this.gadgetData = gadgetData;
    }

    @Override
    public Gadget process(GadgetContext context) throws ProcessingException {
      if (exception != null) {
        throw exception;
      }
      try {
        GadgetSpec spec = new GadgetSpec(SPEC_URL, gadgetData);
        View view = spec.getView(context.getView());
        return new Gadget()
            .setContext(context)
            .setSpec(spec)
            .setCurrentView(view);
      } catch (GadgetException e) {
        throw new RuntimeException(e);
      }
    }
  }

  private static class FakeLockedDomainService implements LockedDomainService {
    protected boolean wasChecked = false;
    protected boolean canRender = true;

    protected FakeLockedDomainService() {
    }

    public boolean isGadgetValidForHost(String host, Gadget gadget, String container) {
      wasChecked = true;
      return canRender;
    }

    public String getLockedDomainForGadget(Gadget gadget, String container) {
      return null;
    }

    public boolean isSafeForOpenProxy(String host) {
      return false;
    }

    public boolean isEnabled() {
      return false;
    }

    public boolean isHostUsingLockedDomain(String host) {
      return false;
    }
  }
}


text:
<title>Growl</title>
<link rel="stylesheet" href="../main.css" type="text/css">
<meta charset="UTF-8">

Nieuw in Growl 2.1

Grote wijzigingen

We hebben de Automator Actie gerepareerd. Excuses daarvoor. Xcode probeerde te helpen bij de instellingen voor projectvalidatie. Dit deactiveerde op zijn beurt iets dat vereist was. Dit is nu permanent verholpen.

Schermbeveiliging en vergrendeldetectie doen het weer zoals bedoeld.

Nieuw in Growl 2.1

Grote wijzigingen

Mogelijkheid toegevoegd om script als actie te starten.

Mogelijkheid toegevoegd om meldingen te besturen via regels. Zie http://growl.info/documentation/applescript-rules voor meer informatie.

Growl hangt niet langer bij ontvangst van grote hoeveelheden meldingen (meer dan 100) in een keer.

Webkit-weergaven kunnen nu eigen sluitknoppen met opmaak bevatten.

Algemene wijzigingen

Verduidelijkt wanneer het programma prioriteit bepaalt.

AppleScript vergroot de afbeeldingsgrootte van 128x128 naar 1024x1024.

Bij gebruik van doorsturen met Berichtencentrum-doorsturen, ziet u nu meldingen op beide computers.

De Prowl-actieplugin stuurt nu de meldingen correct als het de melding-terugklik ingesteld heeft staan.

Automator

De automator-actie is nu vertaald.

De GrowlAction-workflow leest nu van de omschrijving van de Automator-actie.

Nieuw in Growl 2

Algemeen

Voegt ondersteuning toe voor OS X berichtencentrum toe onder 10.8.

Voegt ondersteuning voor Prowl en Boxcar-voorzieningen als actieweergaven.

Samenvatting heeft verbeterde pauzedetectie.

Growl is nu sandboxed.

Voorkeuren

De AAN/UIT schakelaar binnen Growl moet nu eenvoudiger te begrijpen zijn.

Toonstijlen

Spraak is nu beter te besturen.

Scheiding tussen Actietoonstijlen Visuele toonstijlen.

Muziekvideo kan nu tekst links en rechts uitlijnen.

Verbeteringen in de hoogte bij meerregelige meldingen in Muziekvideo.

Nano kan nu op meerdere locaties worden weergegeven, links, rechts en midden.

SoundAction-toonstijl toegevoegd.

Voorkeur om visuele meldingen te onderdrukken.

Opgeloste problemen

Lost hoog CPU-verbruik op.

Lost bepaalde onverwachte stops op.

Snelkoppelingen kunnen nu ook worden verwijderd.

Growl 1.4 wijzigingen

Algemeen

Programma's-tab opnieuw ontworpen! Dit is een groot herontwerp en moet tot meer gebruiksgemak leiden.

Besturing van Samenvatting verplaatst naar eigen tab.

Grote verbeteringen in netwerken.

Herontwerp voorkeurenpaneel

Nieuwe schuifregelaar voor aan/uit

Toetsenbordondersteuning toegevoegd aan positiebepaling.

Algemeen herontwerp tabs.

Netwerktab - ondersteuning voor abonneren

Historietab, contextueel menu voor historieoverzicht om naar de volgende app/meldingsinstellingen te springen

Samenvattingtab is de nieuwe plaats voor besturing van het Samenvattingvenster.

Toevoegen van een nieuwe toonstijl vereist niet langer een herstart van Growl.

Netwerk

Ondersteuning voor Notification-Callback-Target, een URL-veld in GNTP. Bij klikken laat Growl OSX uitzoeken hoe de URL moet worden geopend (zoals de standaardbrowser voor http://)

Ondersteuning voor abonneren, abonneer u op alle programma's op een andere machine.

Algemene verbeteringen in netwerkauthenticatie, vereiste verwijderd voor wachtwoordheaders als het wachtwoordveld leeg is

Netwerkcrash opgelost gerelateerd aan resolutie van adresgegevens.

Bind alleen met lokale socket als we niet staan te luisteren naar inkomende verbindingen.

Caching van adresgegevens en monitoren van netwerkwijzigingen om caches te legen.

AppleScript

URL-klik feedbackondersteuning, gelijk aan Notification-Callback-Target in GNTP

Opgeloste problemen

Probleem opgelost met webkit plugin bridge bij aanmaken.

Probleem opgelost met doorsturen.

Probleem opgelost waarbij de Spraaktoonstijl op voltooiing van een vorig bericht wacht en de CPU overbelast

Probleem opgelost met CFErrorGetDomain voor WebKit-toonstijlen.

Dubbele vermeldingen van weergaveplugins opgelost bij herinstallatie.

Er wordt nu rekening gehouden met Notification-Callback-Target, en gebruik gemaakt van, zelfs zonder method-header.

Om problemen heen gewerkt met betrekking tot defecte historie-databestanden.

Sorteerprobleem opgelost wanneer een onderdeel van de historielijst wordt verwijderd.


text:
package com.intellij.compilerOutputIndex.impl;

import com.intellij.codeInsight.completion.methodChains.ChainCompletionStringUtil;
import com.intellij.compilerOutputIndex.api.fs.AsmUtil;
import org.jetbrains.asm4.ClassReader;
import org.jetbrains.asm4.ClassVisitor;
import org.jetbrains.asm4.MethodVisitor;
import org.jetbrains.asm4.Opcodes;

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

/**
 * @author Dmitry Batkovich <dmitry.batkovich@jetbrains.com>
 */
public class ClassFileData {
  private final List<MethodData> myMethodDatas;

  public ClassFileData(final ClassReader classReader) {
    this(classReader, true);
  }

  public ClassFileData(final ClassReader classReader, final boolean checkForPrimitiveReturn) {
    myMethodDatas = new ArrayList<MethodData>();
    classReader.accept(new ClassVisitor(Opcodes.ASM4) {
      @Override
      public MethodVisitor visitMethod(final int access,
                                       final String name,
                                       final String desc,
                                       final String signature,
                                       final String[] exceptions) {
        final MethodDataAccumulator methodDataAccumulator = new MethodDataAccumulator(checkForPrimitiveReturn);
        myMethodDatas.add(methodDataAccumulator.getMethodData());
        return methodDataAccumulator;
      }
    }, Opcodes.ASM4);
  }

  public List<MethodData> getMethodDatas() {
    return myMethodDatas;
  }

  public static class MethodData {
    private final List<MethodInsnSignature> myMethodInsnSignatures = new ArrayList<MethodInsnSignature>();

    private void addSign(final MethodInsnSignature signature) {
      myMethodInsnSignatures.add(signature);
    }

    public List<MethodInsnSignature> getMethodInsnSignatures() {
      return myMethodInsnSignatures;
    }
  }

  private static class MethodDataAccumulator extends MethodVisitor {
    private final MethodData myMethodData = new MethodData();
    private final boolean myCheckForPrimitiveReturn;

    public MethodDataAccumulator(final boolean checkForPrimitiveReturn) {
      super(Opcodes.ASM4);
      myCheckForPrimitiveReturn = checkForPrimitiveReturn;
    }

    private MethodData getMethodData() {
      return myMethodData;
    }

    @Override
    public void visitMethodInsn(final int opcode, final String owner, final String name, final String desc) {
      if (MethodIncompleteSignature.CONSTRUCTOR_METHOD_NAME.equals(name)) {
        return;
      }
      final String ownerClassName = AsmUtil.getQualifiedClassName(owner);
      if (ChainCompletionStringUtil.isPrimitiveOrArrayOfPrimitives(ownerClassName)) {
        return;
      }
      if (myCheckForPrimitiveReturn) {
        final String returnType = AsmUtil.getReturnType(desc);
        if (ChainCompletionStringUtil.isPrimitiveOrArrayOfPrimitives(returnType)) {
          return;
        }
      }
      myMethodData.addSign(new MethodInsnSignature(opcode, owner, name, desc));
    }
  }

  public static class MethodInsnSignature {
    private final int myOpcode;
    private final String myOwner;
    private final String myName;
    private final String myDesc;

    private MethodInsnSignature(final int opcode, final String owner, final String name, final String desc) {
      myOpcode = opcode;
      myOwner = owner;
      myName = name;
      myDesc = desc;
    }

    public int getOpcode() {
      return myOpcode;
    }

    public String getOwner() {
      return myOwner;
    }

    public String getName() {
      return myName;
    }

    public String getDesc() {
      return myDesc;
    }
  }
}


text:
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>Android on Reflections</title>
    <link>http://blog.shiv.me/tags/android/</link>
    <description>Recent content in Android on Reflections</description>
    <generator>Hugo -- gohugo.io</generator>
    <language>en</language>
    <copyright>Copyright 2016 &copy; Shivanand Velmurugan</copyright>
    <lastBuildDate>Tue, 16 Mar 2010 00:00:00 +0000</lastBuildDate><atom:link href="http://blog.shiv.me/tags/android/index.xml" rel="self" type="application/rss+xml" />
    <item>
      <title>So long and thanks for the "jailed" iphone</title>
      <link>http://blog.shiv.me/2010/03/16/so-long-and-thanks-for-the-jailed-iphone/</link>
      <pubDate>Tue, 16 Mar 2010 00:00:00 +0000</pubDate>

      <guid>http://blog.shiv.me/2010/03/16/so-long-and-thanks-for-the-jailed-iphone/</guid>
      <description>[caption id=&ldquo;attachment_737&rdquo; align=&ldquo;alignnone&rdquo; width=&ldquo;300&rdquo;] So long oppression[/caption]
Thanks for the iPhone, Mr. Jobs. There is a new way to protest the iPhone. I don&rsquo;t have to sign petitions anymore. I can now take my $500 elsewhere, for a slightly more open experience. I didn&rsquo;t ask for much, but I don&rsquo;t have to wait on your whim any longer (no offense meant to you personally, Mr Jobs).</description>
    </item>

  </channel>
</rss>


text:
package com.hazelcast.scheduledexecutor.impl;

import java.util.concurrent.RejectedExecutionException;

/**
 * A capacity controller that keeps track of task counts upon scheduling/disposing and Rejects tasks accordingly
 */
public interface CapacityPermit {

    /**
     * Acquires a permit to schedule a new task.
     * When max allowance is reached, future attempts will trigger a {@link RejectedExecutionException} exception
     *
     * @throws RejectedExecutionException
     */
    void acquire() throws RejectedExecutionException;

    /**
     * Acquires a permit to schedule a new task.
     * When max allowance is reached, future attempts will silently keep acquiring permits without any exceptions
     */
    void acquireQuietly();

    /**
     * Releases a permit back to pool for future use
     */
    void release();

    /**
     * @return the total number of acquired permits
     */
    int totalAcquired();
}


text:
namespace Cocoa.Plugins
{
    /// <summary>
    /// Represents a file associated with a document, this could be an image, or an attachment
    /// </summary>
    public class FileReference
    {
        public FileReference(string fullPath, string relativePath, bool saved   )
        {
            FullPath = fullPath;
            RelativePath = relativePath;
            Saved = saved;
        }

        /// <summary>
        /// The absolute path to the file
        /// </summary>
        public string FullPath { get; private set; }

        /// <summary>
        /// Path Relative to the document
        /// </summary>
        public string RelativePath { get; private set; }

        public bool Saved { get; set; }
    }
}


text:
package pgproto3

import (
	"encoding/json"
)

type NoData struct{}

// Backend identifies this message as sendable by the PostgreSQL backend.
func (*NoData) Backend() {}

// Decode decodes src into dst. src must contain the complete message with the exception of the initial 1 byte message
// type identifier and 4 byte message length.
func (dst *NoData) Decode(src []byte) error {
	if len(src) != 0 {
		return &invalidMessageLenErr{messageType: "NoData", expectedLen: 0, actualLen: len(src)}
	}

	return nil
}

// Encode encodes src into dst. dst will include the 1 byte message type identifier and the 4 byte message length.
func (src *NoData) Encode(dst []byte) []byte {
	return append(dst, 'n', 0, 0, 0, 4)
}

// MarshalJSON implements encoding/json.Marshaler.
func (src NoData) MarshalJSON() ([]byte, error) {
	return json.Marshal(struct {
		Type string
	}{
		Type: "NoData",
	})
}


text:
#pragma once

#include "../Application.hpp"
#include "qt_executor.hpp"

#include <QTimer>
#include <QThread>

namespace runos {

enum class PollerType {
    Application, Polling
};

class Polling : public QObject {
public:
    virtual void polling() = 0;
};

class Poller {
public:
    Poller(Application* parent, uint16_t poll_interval);
    Poller(Polling* parent, uint16_t poll_interval);
    ~Poller();

    void run();
    void stop();
    void pause();
    void apply(const std::function<void()>& f);

private:
    Poller(Application* parent, Polling* polling_parent,
           uint16_t poll_interval, PollerType type);

private:
    QTimer* wtimer;
    QThread* wthread;
    qt_executor* executor;
    Application* parent;
    Polling* polling_parent;
    PollerType type;
};

} // namespace runos


text:
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text.

using osu.Framework.Graphics.Containers;
using osu.Framework.Graphics;
using osu.Game.Graphics.Containers;

namespace osu.Game.Overlays
{
    public abstract class WaveOverlayContainer : OsuFocusedOverlayContainer
    {
        protected readonly WaveContainer Waves;

        protected override bool BlockNonPositionalInput => true;
        protected override Container<Drawable> Content => Waves;

        protected override bool StartHidden => true;

        protected WaveOverlayContainer()
        {
            AddInternal(Waves = new WaveContainer
            {
                RelativeSizeAxes = Axes.Both,
            });
        }

        protected override void PopIn()
        {
            base.PopIn();

            Waves.Show();
            this.FadeIn(100, Easing.OutQuint);
        }

        protected override void PopOut()
        {
            base.PopOut();

            Waves.Hide();
            this.FadeOut(WaveContainer.DISAPPEAR_DURATION, Easing.InQuint);
        }
    }
}


text:
package org.drools.guvnor.client.rpc;

import com.google.gwt.user.client.rpc.IsSerializable;

/**
 * The configuration information required for a new Asset with no default
 * content
 */
public class NewAssetConfiguration
    implements
    IsSerializable {

    private String assetName;
    private String packageName;
    private String packageUUID;
    private String description;
    private String initialCategory;
    private String format;

    // For GWT serialisation
    public NewAssetConfiguration() {
    }

    public NewAssetConfiguration(String assetName,
                                 String packageName,
                                 String packageUUID,
                                 String description,
                                 String initialCategory,
                                 String format) {
        this.assetName = assetName;
        this.packageName = packageName;
        this.packageUUID = packageUUID;
        this.description = description;
        this.initialCategory = initialCategory;
        this.format = format;
    }

    // ************************************************************************
    // Getters
    // ************************************************************************

    public String getAssetName() {
        return assetName;
    }

    public String getPackageName() {
        return packageName;
    }

    public String getPackageUUID() {
        return packageUUID;
    }

    public String getDescription() {
        return description;
    }

    public String getInitialCategory() {
        return initialCategory;
    }

    public String getFormat() {
        return format;
    }

}