text:
<?php

namespace Packagist\WebBundle\Controller;

use Composer\Factory;
use Composer\IO\BufferIO;
use Symfony\Component\Console\Output\OutputInterface;
use Composer\Package\Loader\ArrayLoader;
use Composer\Package\Loader\ValidatingArrayLoader;
use Composer\Console\HtmlOutputFormatter;
use Composer\Repository\VcsRepository;
use Doctrine\ORM\NoResultException;
use Packagist\WebBundle\Entity\PackageRepository;
use Packagist\WebBundle\Entity\VersionRepository;
use Packagist\WebBundle\Form\Model\MaintainerRequest;
use Packagist\WebBundle\Form\Type\AbandonedType;
use Packagist\WebBundle\Entity\Package;
use Packagist\WebBundle\Entity\Version;
use Packagist\WebBundle\Form\Type\AddMaintainerRequestType;
use Packagist\WebBundle\Form\Type\PackageType;
use Packagist\WebBundle\Form\Type\RemoveMaintainerRequestType;
use Predis\Connection\ConnectionException;
use Symfony\Component\HttpFoundation\RedirectResponse;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\JsonResponse;
use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\HttpKernel\Exception\BadRequestHttpException;
use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;
use Symfony\Component\Security\Core\Exception\AccessDeniedException;
use Composer\Package\Version\VersionParser;
use DateTimeImmutable;
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Cache;
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Method;
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Route;
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Template;
use Pagerfanta\Adapter\FixedAdapter;
use Pagerfanta\Pagerfanta;
use Packagist\WebBundle\Package\Updater;

class PackageController extends Controller
{
    /**
     * @Template("PackagistWebBundle:Package:browse.html.twig")
     * @Route("/packages/", name="allPackages")
     * @Cache(smaxage=900)
     */
    public function allAction(Request $req)
    {
        $filters = array(
            'type' => $req->query->get('type'),
            'tag' => $req->query->get('tag'),
        );

        $data = $filters;
        $page = $req->query->get('page', 1);

        $packages = $this->getDoctrine()
            ->getRepository('PackagistWebBundle:Package')
            ->getFilteredQueryBuilder($filters);

        $data['packages'] = $this->setupPager($packages, $page);
        $data['meta'] = $this->getPackagesMetadata($data['packages']);

        return $data;
    }

    /**
     * @Route("/packages/list.json", name="list", defaults={"_format"="json"})
     * @Method({"GET"})
     * @Cache(smaxage=300)
     */
    public function listAction(Request $req)
    {
        /** @var PackageRepository $repo */
        $repo = $this->getDoctrine()->getRepository('PackagistWebBundle:Package');
        $fields = (array) $req->query->get('fields', array());
        $fields = array_intersect($fields, array('repository', 'type'));

        if ($fields) {
            $filters = array_filter(array(
                'type' => $req->query->get('type'),
                'vendor' => $req->query->get('vendor'),
            ));

            return new JsonResponse(array('packages' => $repo->getPackagesWithFields($filters, $fields)));
        }

        if ($req->query->get('type')) {
            $names = $repo->getPackageNamesByType($req->query->get('type'));
        } elseif ($req->query->get('vendor')) {
            $names = $repo->getPackageNamesByVendor($req->query->get('vendor'));
        } else {
            $names = $repo->getPackageNames();
        }

        return new JsonResponse(array('packageNames' => $names));
    }

    /**
     * @Template()
     * @Route("/packages/submit", name="submit")
     */
    public function submitPackageAction(Request $req)
    {
        $package = new Package;
        $package->setEntityRepository($this->getDoctrine()->getRepository('PackagistWebBundle:Package'));
        $package->setRouter($this->get('router'));
        $form = $this->createForm(new PackageType(), $package);
        $user = $this->getUser();
        $package->addMaintainer($user);

        if ('POST' === $req->getMethod()) {
            $form->bind($req);
            if ($form->isValid()) {
                try {
                    $em = $this->getDoctrine()->getManager();
                    $em->persist($package);
                    $em->flush();

                    $this->get('session')->getFlashBag()->set('success', $package->getName().' has been added to the package list, the repository will now be crawled.');

                    return new RedirectResponse($this->generateUrl('view_package', array('name' => $package->getName())));
                } catch (\Exception $e) {
                    $this->get('logger')->crit($e->getMessage(), array('exception', $e));
                    $this->get('session')->getFlashBag()->set('error', $package->getName().' could not be saved.');
                }
            }
        }

        return array('form' => $form->createView(), 'page' => 'submit');
    }

    /**
     * @Route("/packages/fetch-info", name="submit.fetch_info", defaults={"_format"="json"})
     */
    public function fetchInfoAction(Request $req)
    {
        $package = new Package;
        $package->setEntityRepository($this->getDoctrine()->getRepository('PackagistWebBundle:Package'));
        $package->setRouter($this->get('router'));
        $form = $this->createForm(new PackageType, $package);
        $user = $this->getUser();
        $package->addMaintainer($user);

        $response = array('status' => 'error', 'reason' => 'No data posted.');
        if ('POST' === $req->getMethod()) {
            $form->bind($req);
            if ($form->isValid()) {
                list(, $name) = explode('/', $package->getName(), 2);

                $existingPackages = $this->getDoctrine()
                    ->getRepository('PackagistWebBundle:Package')
                    ->createQueryBuilder('p')
                    ->where('p.name LIKE ?0')
                    ->setParameters(array('%/'.$name))
                    ->getQuery()
                    ->getResult();

                $similar = array();

                /** @var Package $existingPackage */
                foreach ($existingPackages as $existingPackage) {
                    $similar[] = array(
                        'name' => $existingPackage->getName(),
                        'url' => $this->generateUrl('view_package', array('name' => $existingPackage->getName()), true),
                    );
                }

                $response = array('status' => 'success', 'name' => $package->getName(), 'similar' => $similar);
            } else {
                $errors = array();
                if (count($form->getErrors())) {
                    foreach ($form->getErrors() as $error) {
                        $errors[] = $error->getMessageTemplate();
                    }
                }
                foreach ($form->all() as $child) {
                    if (count($child->getErrors())) {
                        foreach ($child->getErrors() as $error) {
                            $errors[] = $error->getMessageTemplate();
                        }
                    }
                }
                $response = array('status' => 'error', 'reason' => $errors);
            }
        }

        return new JsonResponse($response);
    }

    /**
     * @Template()
     * @Route("/packages/{vendor}/", name="view_vendor", requirements={"vendor"="[A-Za-z0-9_.-]+"})
     */
    public function viewVendorAction($vendor)
    {
        $packages = $this->getDoctrine()
            ->getRepository('PackagistWebBundle:Package')
            ->createQueryBuilder('p')
            ->where('p.name LIKE ?0')
            ->setParameters(array($vendor.'/%'))
            ->getQuery()
            ->getResult();

        if (!$packages) {
            return $this->redirect($this->generateUrl('search', array('q' => $vendor, 'reason' => 'vendor_not_found')));
        }

        return array(
            'packages' => $packages,
            'meta' => $this->getPackagesMetadata($packages),
            'vendor' => $vendor,
            'paginate' => false,
        );
    }

    /**
     * @Route(
     *     "/p/{name}.{_format}",
     *     name="view_package_alias",
     *     requirements={"name"="[A-Za-z0-9_.-]+(/[A-Za-z0-9_.-]+?)?", "_format"="(json)"},
     *     defaults={"_format"="html"}
     * )
     * @Route(
     *     "/packages/{name}",
     *     name="view_package_alias2",
     *     requirements={"name"="[A-Za-z0-9_.-]+(/[A-Za-z0-9_.-]+?)?/"},
     *     defaults={"_format"="html"}
     * )
     * @Method({"GET"})
     */
    public function viewPackageAliasAction(Request $req, $name)
    {
        $format = $req->getRequestFormat();
        if ($format === 'html') {
            $format = null;
        }

        if (false === strpos(trim($name, '/'), '/')) {
            return $this->redirect($this->generateUrl('view_vendor', array('vendor' => $name, '_format' => $format)));
        }

        return $this->redirect($this->generateUrl('view_package', array('name' => trim($name, '/'), '_format' => $format)));
    }

    /**
     * @Template()
     * @Route(
     *     "/providers/{name}",
     *     name="view_providers",
     *     requirements={"name"="[A-Za-z0-9/_.-]+?"},
     *     defaults={"_format"="html"}
     * )
     * @Method({"GET"})
     */
    public function viewProvidersAction(Request $req, $name)
    {
        /** @var PackageRepository $repo */
        $repo = $this->getDoctrine()->getRepository('PackagistWebBundle:Package');
        $providers = $repo->findProviders($name);
        if (!$providers) {
            return $this->redirect($this->generateUrl('search', array('q' => $name, 'reason' => 'package_not_found')));
        }

        try {
            $redis = $this->get('snc_redis.default');
            $trendiness = array();
            foreach ($providers as $package) {
                /** @var Package $package */
                $trendiness[$package->getId()] = (int) $redis->zscore('downloads:trending', $package->getId());
            }
            usort($providers, function ($a, $b) use ($trendiness) {
                if ($trendiness[$a->getId()] === $trendiness[$b->getId()]) {
                    return strcmp($a->getName(), $b->getName());
                }
                return $trendiness[$a->getId()] > $trendiness[$b->getId()] ? -1 : 1;
            });
        } catch (ConnectionException $e) {}

        return $this->render('PackagistWebBundle:Package:providers.html.twig', array(
            'name' => $name,
            'packages' => $providers,
            'meta' => $this->getPackagesMetadata($providers),
            'paginate' => false,
        ));
    }

    /**
     * @Template()
     * @Route(
     *     "/packages/{name}.{_format}",
     *     name="view_package",
     *     requirements={"name"="[A-Za-z0-9_.-]+/[A-Za-z0-9_.-]+?", "_format"="(json)"},
     *     defaults={"_format"="html"}
     * )
     * @Method({"GET"})
     */
    public function viewPackageAction(Request $req, $name)
    {
        /** @var PackageRepository $repo */
        $repo = $this->getDoctrine()->getRepository('PackagistWebBundle:Package');

        try {
            /** @var Package $package */
            $package = $repo->findOneByName($name);
        } catch (NoResultException $e) {
            if ('json' === $req->getRequestFormat()) {
                return new JsonResponse(array('status' => 'error', 'message' => 'Package not found'), 404);
            }

            if ($providers = $repo->findProviders($name)) {
                return $this->redirect($this->generateUrl('view_providers', array('name' => $name)));
            }

            return $this->redirect($this->generateUrl('search', array('q' => $name, 'reason' => 'package_not_found')));
        }

        if ('json' === $req->getRequestFormat()) {
            $data = $package->toArray();

            try {
                $data['downloads'] = $this->get('packagist.download_manager')->getDownloads($package);
                $data['favers'] = $this->get('packagist.favorite_manager')->getFaverCount($package);
            } catch (ConnectionException $e) {
                $data['downloads'] = null;
                $data['favers'] = null;
            }

            // TODO invalidate cache on update and make the ttl longer
            $response = new JsonResponse(array('package' => $data));
            $response->setSharedMaxAge(3600);

            return $response;
        }

        $version = null;
        $expandedVersion = null;
        $versions = $package->getVersions();
        if (is_object($versions)) {
            $versions = $versions->toArray();
        }

        usort($versions, Package::class.'::sortVersions');

        if (count($versions)) {
            /** @var VersionRepository $versionRepo */
            $versionRepo = $this->getDoctrine()->getRepository('PackagistWebBundle:Version');
            $version = $versionRepo->getFullVersion(reset($versions)->getId());

            $expandedVersion = reset($versions);
            foreach ($versions as $v) {
                if (!$v->isDevelopment()) {
                    $expandedVersion = $v;
                    break;
                }
            }
            $expandedVersion = $versionRepo->getFullVersion($expandedVersion->getId());
        }

        $data = array(
            'package' => $package,
            'version' => $version,
            'versions' => $versions,
            'expandedVersion' => $expandedVersion,
        );

        try {
            $data['downloads'] = $this->get('packagist.download_manager')->getDownloads($package);

            if ($this->getUser()) {
                $data['is_favorite'] = $this->get('packagist.favorite_manager')->isMarked($this->getUser(), $package);
            }
        } catch (ConnectionException $e) {
        }

        $data['dependents'] = $repo->getDependentCount($package->getName());

        if ($maintainerForm = $this->createAddMaintainerForm($package)) {
            $data['addMaintainerForm'] = $maintainerForm->createView();
        }
        if ($removeMaintainerForm = $this->createRemoveMaintainerForm($package)) {
            $data['removeMaintainerForm'] = $removeMaintainerForm->createView();
        }
        if ($deleteForm = $this->createDeletePackageForm($package)) {
            $data['deleteForm'] = $deleteForm->createView();
        }
        if ($this->getUser() && (
                $this->isGranted('ROLE_DELETE_PACKAGES')
                || $package->getMaintainers()->contains($this->getUser())
            )) {
            $data['deleteVersionCsrfToken'] = $this->get('security.csrf.token_manager')->getToken('delete_version');
        }

        return $data;
    }

    /**
     * @Template()
     * @Route(
     *     "/packages/{name}/downloads.{_format}",
     *     name="package_downloads_full",
     *     requirements={"name"="[A-Za-z0-9_.-]+/[A-Za-z0-9_.-]+?", "_format"="(json)"}
     * )
     * @Method({"GET"})
     */
    public function viewPackageDownloadsAction(Request $req, $name)
    {
        /** @var PackageRepository $repo */
        $repo = $this->getDoctrine()->getRepository('PackagistWebBundle:Package');

        try {
            /** @var $package Package */
            $package = $repo->findOneByName($name);
        } catch (NoResultException $e) {
            if ('json' === $req->getRequestFormat()) {
                return new JsonResponse(array('status' => 'error', 'message' => 'Package not found'), 404);
            }

            if ($providers = $repo->findProviders($name)) {
                return $this->redirect($this->generateUrl('view_providers', array('name' => $name)));
            }

            return $this->redirect($this->generateUrl('search', array('q' => $name, 'reason' => 'package_not_found')));
        }

        $versions = $package->getVersions();
        $data = array(
            'name' => $package->getName(),
        );

        try {
            $data['downloads']['total'] = $this->get('packagist.download_manager')->getDownloads($package);
            $data['favers'] = $this->get('packagist.favorite_manager')->getFaverCount($package);
        } catch (ConnectionException $e) {
            $data['downloads']['total'] = null;
            $data['favers'] = null;
        }

        foreach ($versions as $version) {
            try {
                $data['downloads']['versions'][$version->getVersion()] = $this->get('packagist.download_manager')->getDownloads($package, $version);
            } catch (ConnectionException $e) {
                $data['downloads']['versions'][$version->getVersion()] = null;
            }
        }

        $response = new Response(json_encode(array('package' => $data)), 200);
        $response->setSharedMaxAge(3600);

        return $response;
    }

    /**
     * @Template()
     * @Route(
     *     "/versions/{versionId}.{_format}",
     *     name="view_version",
     *     requirements={"name"="[A-Za-z0-9_.-]+/[A-Za-z0-9_.-]+?", "versionId"="[0-9]+", "_format"="(json)"}
     * )
     * @Method({"GET"})
     */
    public function viewPackageVersionAction(Request $req, $versionId)
    {
        /** @var VersionRepository $repo  */
        $repo = $this->getDoctrine()->getRepository('PackagistWebBundle:Version');

        $html = $this->renderView(
            'PackagistWebBundle:Package:versionDetails.html.twig',
            array('version' => $repo->getFullVersion($versionId))
        );

        return new JsonResponse(array('content' => $html));
    }

    /**
     * @Template()
     * @Route(
     *     "/versions/{versionId}/delete",
     *     name="delete_version",
     *     requirements={"name"="[A-Za-z0-9_.-]+/[A-Za-z0-9_.-]+?", "versionId"="[0-9]+"}
     * )
     * @Method({"DELETE"})
     */
    public function deletePackageVersionAction(Request $req, $versionId)
    {
        /** @var VersionRepository $repo  */
        $repo = $this->getDoctrine()->getRepository('PackagistWebBundle:Version');

        /** @var Version $version  */
        $version = $repo->getFullVersion($versionId);
        $package = $version->getPackage();

        if (!$package->getMaintainers()->contains($this->getUser()) && !$this->isGranted('ROLE_DELETE_PACKAGES')) {
            throw new AccessDeniedException;
        }

        if (!$this->get('form.csrf_provider')->isCsrfTokenValid('delete_version', $req->request->get('_token'))) {
            throw new AccessDeniedException;
        }

        $repo->remove($version);
        $this->getDoctrine()->getManager()->flush();
        $this->getDoctrine()->getManager()->clear();

        return new Response('', 204);
    }

    /**
     * @Template()
     * @Route("/packages/{name}", name="update_package", requirements={"name"="[A-Za-z0-9_.-]+/[A-Za-z0-9_.-]+"}, defaults={"_format" = "json"})
     * @Method({"PUT"})
     */
    public function updatePackageAction(Request $req, $name)
    {
        $doctrine = $this->getDoctrine();

        try {
            /** @var Package $package */
            $package = $doctrine
                ->getRepository('PackagistWebBundle:Package')
                ->getPackageByName($name);
        } catch (NoResultException $e) {
            return new Response(json_encode(array('status' => 'error', 'message' => 'Package not found',)), 404);
        }

        $username = $req->request->has('username') ?
            $req->request->get('username') :
            $req->query->get('username');

        $apiToken = $req->request->has('apiToken') ?
            $req->request->get('apiToken') :
            $req->query->get('apiToken');

        $update = $req->request->get('update', $req->query->get('update'));
        $autoUpdated = $req->request->get('autoUpdated', $req->query->get('autoUpdated'));
        $updateEqualRefs = $req->request->get('updateAll', $req->query->get('updateAll'));
        $showOutput = $req->request->get('showOutput', $req->query->get('showOutput', false));

        $user = $this->getUser() ?: $doctrine
            ->getRepository('PackagistWebBundle:User')
            ->findOneBy(array('username' => $username, 'apiToken' => $apiToken));

        if (!$user) {
            return new Response(json_encode(array('status' => 'error', 'message' => 'Invalid credentials',)), 403);
        }

        if ($package->getMaintainers()->contains($user) || $this->isGranted('ROLE_UPDATE_PACKAGES')) {
            $req->getSession()->save();

            if (null !== $autoUpdated) {
                $package->setAutoUpdated((Boolean) $autoUpdated);
                $doctrine->getManager()->flush();
            }

            if ($update) {
                set_time_limit(3600);
                $updater = $this->get('packagist.package_updater');

                $io = new BufferIO('', OutputInterface::VERBOSITY_VERY_VERBOSE, new HtmlOutputFormatter(Factory::createAdditionalStyles()));
                $config = Factory::createConfig();
                $io->loadConfiguration($config);
                $repository = new VcsRepository(array('url' => $package->getRepository()), $io, $config);
                $loader = new ValidatingArrayLoader(new ArrayLoader());
                $repository->setLoader($loader);

                try {
                    $updater->update($io, $config, $package, $repository, $updateEqualRefs ? Updater::UPDATE_EQUAL_REFS : 0);
                } catch (\Exception $e) {
                    return new JsonResponse([
                        'status' => 'error',
                        'message' => '['.get_class($e).'] '.$e->getMessage(),
                        'details' => '<pre>'.$io->getOutput().'</pre>',
                    ], 400);
                }

                if ($showOutput) {
                    return new JsonResponse([
                        'status' => 'error',
                        'message' => 'Update successful',
                        'details' => '<pre>'.$io->getOutput().'</pre>',
                    ], 400);
                }
            }

            return new Response('{"status": "success"}', 202);
        }

        return new JsonResponse(array('status' => 'error', 'message' => 'Could not find a package that matches this request (does user maintain the package?)',), 404);
    }

    /**
     * @Template()
     * @Route("/packages/{name}", name="delete_package", requirements={"name"="[A-Za-z0-9_.-]+/[A-Za-z0-9_.-]+"})
     * @Method({"DELETE"})
     */
    public function deletePackageAction(Request $req, $name)
    {
        $doctrine = $this->getDoctrine();

        try {
            /** @var Package $package */
            $package = $doctrine
                ->getRepository('PackagistWebBundle:Package')
                ->findOneByName($name);
        } catch (NoResultException $e) {
            throw new NotFoundHttpException('The requested package, '.$name.', was not found.');
        }

        if (!$form = $this->createDeletePackageForm($package)) {
            throw new AccessDeniedException;
        }
        $form->bind($req->request->get('form'));
        if ($form->isValid()) {
            $req->getSession()->save();

            /** @var VersionRepository $versionRepo */
            $versionRepo = $doctrine->getRepository('PackagistWebBundle:Version');
            foreach ($package->getVersions() as $version) {
                $versionRepo->remove($version);
            }

            $packageId = $package->getId();
            $em = $doctrine->getManager();
            $em->remove($package);
            $em->flush();

            // attempt solr cleanup
            try {
                /** @var \Solarium_Client $solarium */
                $solarium = $this->get('solarium.client');

                $update = $solarium->createUpdate();
                $update->addDeleteById($packageId);
                $update->addCommit();

                $solarium->update($update);
            } catch (\Solarium_Client_HttpException $e) {
            }

            return new Response('', 204);
        }

        return new Response('Invalid form input', 400);
    }

    /**
     * @Template("PackagistWebBundle:Package:viewPackage.html.twig")
     * @Route("/packages/{name}/maintainers/", name="add_maintainer", requirements={"name"="[A-Za-z0-9_.-]+/[A-Za-z0-9_.-]+"})
     */
    public function createMaintainerAction(Request $req, $name)
    {
        /** @var $package Package */
        $package = $this->getDoctrine()
            ->getRepository('PackagistWebBundle:Package')
            ->findOneByName($name);

        if (!$package) {
            throw new NotFoundHttpException('The requested package, '.$name.', was not found.');
        }

        if (!$form = $this->createAddMaintainerForm($package)) {
            throw new AccessDeniedException('You must be a package\'s maintainer to modify maintainers.');
        }

        $data = array(
            'package' => $package,
            'versions' => null,
            'expandedVersion' => null,
            'version' => null,
            'addMaintainerForm' => $form->createView(),
            'show_add_maintainer_form' => true,
        );

        if ('POST' === $req->getMethod()) {
            $form->bind($req);
            if ($form->isValid()) {
                try {
                    $em = $this->getDoctrine()->getManager();
                    $user = $form->getData()->getUser();

                    if (!empty($user)) {
                        if (!$package->getMaintainers()->contains($user)) {
                            $package->addMaintainer($user);
                            $this->get('packagist.package_manager')->notifyNewMaintainer($user, $package);
                        }

                        $em->persist($package);
                        $em->flush();

                        $this->get('session')->getFlashBag()->set('success', $user->getUsername().' is now a '.$package->getName().' maintainer.');

                        return new RedirectResponse($this->generateUrl('view_package', array('name' => $package->getName())));
                    }
                    $this->get('session')->getFlashBag()->set('error', 'The user could not be found.');
                } catch (\Exception $e) {
                    $this->get('logger')->crit($e->getMessage(), array('exception', $e));
                    $this->get('session')->getFlashBag()->set('error', 'The maintainer could not be added.');
                }
            }
        }

        return $data;
    }

    /**
     * @Template("PackagistWebBundle:Package:viewPackage.html.twig")
     * @Route("/packages/{name}/maintainers/delete", name="remove_maintainer", requirements={"name"="[A-Za-z0-9_.-]+/[A-Za-z0-9_.-]+"})
     */
    public function removeMaintainerAction(Request $req, $name)
    {
        /** @var $package Package */
        $package = $this->getDoctrine()
            ->getRepository('PackagistWebBundle:Package')
            ->findOneByName($name);

        if (!$package) {
            throw new NotFoundHttpException('The requested package, '.$name.', was not found.');
        }
        if (!$removeMaintainerForm = $this->createRemoveMaintainerForm($package)) {
            throw new AccessDeniedException('You must be a package\'s maintainer to modify maintainers.');
        }

        $data = array(
            'package' => $package,
            'versions' => null,
            'expandedVersion' => null,
            'version' => null,
            'removeMaintainerForm' => $removeMaintainerForm->createView(),
            'show_remove_maintainer_form' => true,
        );

        if ('POST' === $req->getMethod()) {
            $removeMaintainerForm->bind($req);
            if ($removeMaintainerForm->isValid()) {
                try {
                    $em = $this->getDoctrine()->getManager();
                    $user = $removeMaintainerForm->getData()->getUser();

                    if (!empty($user)) {
                        if ($package->getMaintainers()->contains($user)) {
                            $package->getMaintainers()->removeElement($user);
                        }

                        $em->persist($package);
                        $em->flush();

                        $this->get('session')->getFlashBag()->set('success', $user->getUsername().' is no longer a '.$package->getName().' maintainer.');

                        return new RedirectResponse($this->generateUrl('view_package', array('name' => $package->getName())));
                    }
                    $this->get('session')->getFlashBag()->set('error', 'The user could not be found.');
                } catch (\Exception $e) {
                    $this->get('logger')->crit($e->getMessage(), array('exception', $e));
                    $this->get('session')->getFlashBag()->set('error', 'The maintainer could not be removed.');
                }
            }
        }

        return $data;
    }

    /**
     * @Template()
     * @Route(
     *     "/packages/{name}/edit",
     *     name="edit_package",
     *     requirements={"name"="[A-Za-z0-9_.-]+/[A-Za-z0-9_.-]+?"}
     * )
     */
    public function editAction(Request $req, Package $package)
    {
        if (!$package->getMaintainers()->contains($this->getUser()) && !$this->isGranted('ROLE_EDIT_PACKAGES')) {
            throw new AccessDeniedException;
        }

        $form = $this->createFormBuilder($package, array("validation_groups" => array("Update")))
            ->add("repository", "text")
            ->getForm();

        if ($req->isMethod("POST")) {
            $form->bind($req);

            if ($form->isValid()) {
                // Force updating of packages once the package is viewed after the redirect.
                $package->setCrawledAt(null);

                $em = $this->getDoctrine()->getManager();
                $em->persist($package);
                $em->flush();

                $this->get("session")->getFlashBag()->set("success", "Changes saved.");

                return $this->redirect(
                    $this->generateUrl("view_package", array("name" => $package->getName()))
                );
            }
        }

        return array(
            "package" => $package, "form" => $form->createView()
        );
    }

    /**
     * @Route(
     *      "/packages/{name}/abandon",
     *      name="abandon_package",
     *      requirements={"name"="[A-Za-z0-9_.-]+/[A-Za-z0-9_.-]+?"}
     * )
     * @Template()
     */
    public function abandonAction(Request $request, Package $package)
    {
        if (!$package->getMaintainers()->contains($this->getUser()) && !$this->isGranted('ROLE_EDIT_PACKAGES')) {
            throw new AccessDeniedException;
        }

        $form = $this->createForm(new AbandonedType());
        if ($request->getMethod() === 'POST') {
            $form->bind($request->request->get('package'));
            if ($form->isValid()) {
                $package->setAbandoned(true);
                $package->setReplacementPackage(str_replace('https://packagist.org/packages/', '', $form->get('replacement')->getData()));
                $package->setIndexedAt(null);

                $em = $this->getDoctrine()->getManager();
                $em->flush();

                return $this->redirect($this->generateUrl('view_package', array('name' => $package->getName())));
            }
        }

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

    /**
     * @Route(
     *      "/packages/{name}/unabandon",
     *      name="unabandon_package",
     *      requirements={"name"="[A-Za-z0-9_.-]+/[A-Za-z0-9_.-]+?"}
     * )
     */
    public function unabandonAction(Package $package)
    {
        if (!$package->getMaintainers()->contains($this->getUser()) && !$this->isGranted('ROLE_EDIT_PACKAGES')) {
            throw new AccessDeniedException;
        }

        $package->setAbandoned(false);
        $package->setReplacementPackage(null);
        $package->setIndexedAt(null);

        $em = $this->getDoctrine()->getManager();
        $em->flush();

        return $this->redirect($this->generateUrl('view_package', array('name' => $package->getName())));
    }

    /**
     * @Route(
     *      "/packages/{name}/stats.{_format}",
     *      name="view_package_stats",
     *      requirements={"name"="[A-Za-z0-9_.-]+/[A-Za-z0-9_.-]+?", "_format"="(json)"},
     *      defaults={"_format"="html"}
     * )
     * @Template()
     */
    public function statsAction(Request $req, Package $package)
    {
        $versions = $package->getVersions()->toArray();
        usort($versions, Package::class.'::sortVersions');
        $date = $this->guessStatsStartDate($package);
        $data = [
            'downloads' => $this->get('packagist.download_manager')->getDownloads($package),
            'versions' => $versions,
            'average' => $this->guessStatsAverage($date),
            'date' => $date->format('Y-m-d'),
        ];

        if ($req->getRequestFormat() === 'json') {
            $data['versions'] = array_map(function ($version) {
                /** @var Version $version */
                return $version->getVersion();
            }, $data['versions']);

            return new JsonResponse($data);
        }

        $data['package'] = $package;

        $expandedVersion = reset($versions);
        foreach ($versions as $v) {
            /** @var Version $v */
            if (!$v->isDevelopment()) {
                $expandedVersion = $v;
                break;
            }
        }
        $data['expandedId'] = $expandedVersion ? $expandedVersion->getId() : false;

        return $data;
    }

    /**
     * @Route(
     *      "/packages/{name}/dependents",
     *      name="view_package_dependents",
     *      requirements={"name"="[A-Za-z0-9_.-]+/[A-Za-z0-9_.-]+?"}
     * )
     * @Template()
     */
    public function dependentsAction(Request $req, $name)
    {
        $page = $req->query->get('page', 1);

        /** @var PackageRepository $repo */
        $repo = $this->getDoctrine()->getRepository('PackagistWebBundle:Package');
        $depCount = $repo->getDependentCount($name);
        $packages = $repo->getDependents($name, ($page - 1) * 15, 15);

        $paginator = new Pagerfanta(new FixedAdapter($depCount, $packages));
        $paginator->setMaxPerPage(15);
        $paginator->setCurrentPage($page, false, true);

        $data['packages'] = $paginator;

        $data['meta'] = $this->getPackagesMetadata($data['packages']);
        $data['name'] = $name;

        return $data;
    }

    /**
     * @Route(
     *      "/packages/{name}/stats/all.json",
     *      name="package_stats",
     *      requirements={"name"="[A-Za-z0-9_.-]+/[A-Za-z0-9_.-]+?"}
     * )
     */
    public function overallStatsAction(Request $req, Package $package, Version $version = null)
    {
        if ($from = $req->query->get('from')) {
            $from = new DateTimeImmutable($from);
        } else {
            $from = $this->guessStatsStartDate($version ?: $package);
        }
        if ($to = $req->query->get('to')) {
            $to = new DateTimeImmutable($to);
        } else {
            $to = new DateTimeImmutable('-2days 00:00:00');
        }
        $average = $req->query->get('average', $this->guessStatsAverage($from, $to));

        $datePoints = $this->createDatePoints($from, $to, $average, $package, $version);

        $redis = $this->get('snc_redis.default');
        if ($average === 'Daily') {
            $datePoints = array_map(function ($vals) {
                return $vals[0];
            }, $datePoints);

            $datePoints = array(
                'labels' => array_keys($datePoints),
                'values' => $redis->mget(array_values($datePoints))
            );
        } else {
            $datePoints = array(
                'labels' => array_keys($datePoints),
                'values' => array_values(array_map(function ($vals) use ($redis) {
                    return array_sum($redis->mget(array_values($vals)));
                }, $datePoints))
            );
        }

        $datePoints['average'] = $average;

        if ($average !== 'daily') {
            $dividers = [
                'monthly' => 30.41,
                'weekly' => 7,
            ];
            $divider = $dividers[$average];
            $datePoints['values'] = array_map(function ($val) use ($divider) {
                return ceil($val / $divider);
            }, $datePoints['values']);
        }

        if (empty($datePoints['labels']) && empty($datePoints['values'])) {
            $datePoints['labels'][] = date('Y-m-d');
            $datePoints['values'][] = 0;
        }

        $response = new JsonResponse($datePoints);
        $response->setSharedMaxAge(1800);

        return $response;
    }

    /**
     * @Route(
     *      "/packages/{name}/stats/{version}.json",
     *      name="version_stats",
     *      requirements={"name"="[A-Za-z0-9_.-]+/[A-Za-z0-9_.-]+?", "version"=".+?"}
     * )
     */
    public function versionStatsAction(Request $req, Package $package, $version)
    {
        $normalizer = new VersionParser;
        $normVersion = $normalizer->normalize($version);

        $version = $this->getDoctrine()->getRepository('PackagistWebBundle:Version')->findOneBy([
            'package' => $package,
            'normalizedVersion' => $normVersion
        ]);

        if (!$version) {
            throw new NotFoundHttpException();
        }

        return $this->overallStatsAction($req, $package, $version);
    }

    private function createAddMaintainerForm($package)
    {
        if (!$user = $this->getUser()) {
            return;
        }

        if ($this->isGranted('ROLE_EDIT_PACKAGES') || $package->getMaintainers()->contains($user)) {
            $maintainerRequest = new MaintainerRequest();
            return $this->createForm(new AddMaintainerRequestType(), $maintainerRequest);
        }
    }

    private function createRemoveMaintainerForm(Package $package)
    {
        if (!($user = $this->getUser()) || 1 == $package->getMaintainers()->count()) {
            return;
        }

        if ($this->isGranted('ROLE_EDIT_PACKAGES') || $package->getMaintainers()->contains($user)) {
            $maintainerRequest = new MaintainerRequest();
            return $this->createForm(new RemoveMaintainerRequestType(), $maintainerRequest, array('package'=>$package));
        }
    }

    private function createDeletePackageForm(Package $package)
    {
        if (!$user = $this->getUser()) {
            return;
        }

        // super admins bypass additional checks
        if (!$this->isGranted('ROLE_DELETE_PACKAGES')) {
            // non maintainers can not delete
            if (!$package->getMaintainers()->contains($user)) {
                return;
            }

            try {
                $downloads = $this->get('packagist.download_manager')->getTotalDownloads($package);
            } catch (ConnectionException $e) {
                return;
            }

            // more than 100 downloads = established package, do not allow deletion by maintainers
            if ($downloads > 100) {
                return;
            }
        }

        return $this->createFormBuilder(array())->getForm();
    }

    private function createDatePoints(DateTimeImmutable $from, DateTimeImmutable $to, $average, Package $package, Version $version = null)
    {
        $interval = $this->getStatsInterval($average);

        $dateKey = $average === 'monthly' ? 'Ym' : 'Ymd';
        $dateFormat = $average === 'monthly' ? 'Y-m' : 'Y-m-d';
        $dateJump = $average === 'monthly' ? '+1month' : '+1day';
        if ($average === 'monthly') {
            $to = new DateTimeImmutable('last day of '.$to->format('Y-m'));
        }

        $nextDataPointLabel = $from->format($dateFormat);
        $nextDataPoint = $from->modify($interval);

        $datePoints = [];
        while ($from <= $to) {
            $datePoints[$nextDataPointLabel][] = 'dl:'.$package->getId().($version ? '-' . $version->getId() : '').':'.$from->format($dateKey);

            $from = $from->modify($dateJump);
            if ($from >= $nextDataPoint) {
                $nextDataPointLabel = $from->format($dateFormat);
                $nextDataPoint = $from->modify($interval);
            }
        }

        return $datePoints;
    }

    private function guessStatsStartDate($packageOrVersion)
    {
        if ($packageOrVersion instanceof Package) {
            $date = DateTimeImmutable::createFromMutable($packageOrVersion->getCreatedAt());
        } elseif ($packageOrVersion instanceof Version) {
            $date = DateTimeImmutable::createFromMutable($packageOrVersion->getReleasedAt());
        } else {
            throw new \LogicException('Version or Package expected');
        }

        $statsRecordDate = new DateTimeImmutable('2012-04-13 00:00:00');
        if ($date < $statsRecordDate) {
            $date = $statsRecordDate;
        }

        return $date->setTime(0, 0, 0);
    }

    private function guessStatsAverage(DateTimeImmutable $from, DateTimeImmutable $to = null)
    {
        if ($to === null) {
            $to = new DateTimeImmutable('-2 days');
        }
        if ($from < $to->modify('-48months')) {
            $average = 'monthly';
        } elseif ($from < $to->modify('-7months')) {
            $average = 'weekly';
        } else {
            $average = 'daily';
        }

        return $average;
    }

    private function getStatsInterval($average)
    {
        $intervals = [
            'monthly' => '+1month',
            'weekly' => '+7days',
            'daily' => '+1day',
        ];

        if (!isset($intervals[$average])) {
            throw new BadRequestHttpException();
        }

        return $intervals[$average];
    }
}

redpajama_set_name: RedPajamaGithub


text:
import GafferScene

# Registering an adaptor by providing a callable that returns a SceneProcessor.
# If it's necessary to set attributes on the node, provide a function object
# that wraps a call to the class object.
GafferScene.registerAdaptor( "LightLinking", GafferScene.EvaluateLightLinks )


text:
using namespace v8;
using namespace GenApi_3_0_Basler_pylon_v5_0;
using namespace GenICam_3_0_Basler_pylon_v5_0;

class EnumEntryWrap : public node::ObjectWrap
{
public:
    static NAN_MODULE_INIT(Initialize);
    static Nan::Persistent<v8::FunctionTemplate> prototype;

    IEnumEntry* GetWrapped() const
    {
        return m_EnumEntry;
    };

    void SetWrapped(IEnumEntry* enumEntry)
    {
        m_EnumEntry = enumEntry;
    };

    static v8::Handle<v8::Value> NewInstance(IEnumEntry* enumEntry);

private:
    static Nan::Persistent<v8::Function> constructor;
    EnumEntryWrap(Nan::NAN_METHOD_ARGS_TYPE info);
    ~EnumEntryWrap();
    static NAN_METHOD(New);

    // Wrapped methods
    static NAN_METHOD(GetValue);
    static NAN_METHOD(GetSymbolic);
    static NAN_METHOD(GetNumericValue);
    static NAN_METHOD(IsSelfClearing);

    // Wrapped object
    IEnumEntry* m_EnumEntry;
};


text:
← Chaotic New Year's Eve in Cologne shatters Germany
Wahnsinn →
Prof Ergüder: 'Turkish style presidency means no check and balances
As the government has been pushing for a new constitution that will involve switching Turkey's parliamentary system to a presidential system, one of Turkey's internationally most renowned political scientistays that this is most likely to be a Turkish-style presidency without checks and balances.
(Here is the interview by Yonca Poyraz Doğan, with Today's Zaman:)
"This is what's in (President Recep Tayyip) Erdoğan's mind. He is drunk on power, but this is not only his fault. I know from my years as a university rector that everybody asked me everything. But I resisted getting drunk on power and corruption. It is easy to enjoy it when you have power," said Üstün Ergüder, a political scientist known as the legendary rector of the distinguished Boğaziçi University of Turkey. Ergüder is also the only Turkish citizen to serve as the president of the Council of the Magna Charta Observatory, which monitors and advises on the status of academic freedom and institutional autonomy worldwide.
"'Power tends to corrupt and absolute power corrupts absolutely' as Lord Acton put it. This is the syndrome Erdoğan goes through," said Ergüder, adding that he is not the only one to blame as Turkish society breeds a culture of submission to its leaders.
In our interview, we also talked about last year's elections, the Kurdish issue, education problems related to Kurdish children in the Southeast, Syrian refugees, the recent conflict regarding the Middle East Technical University (ODTÜ), President Erdoğan in the 1990s, and Prime Minister Ahmet Davutoğlu, who was Ergüder's student.
We also referred to his recent book "In Tumultuous Waters of Higher Education" ("Yükseköğretimin Fırtınalı Sularında") in which Ergüder tells not only the story of Boğaziçi University but also his efforts to protect its autonomy, even in turbulent times such as when the infamous Higher Education Board (YÖK) issued directives to be respected, especially on the headscarf.
When we had our last interview in June 2012 the government had approved Kurdish as an elective course in schools and you had said that even though this was a positive first step, more liberalization was needed in the area. Now the Kurdish issue has a completely new dimension: The peace process has ended, giving way to war and the situation looks dismal. How would you evaluate it?
It's very unfortunate. Back in 2012, we were moving in the right direction in terms of solving this problem. I don't think this problem can be solved by autocratic and military methods. There should be formulas to solve social and cultural problems, and problems of exclusion. It's very popular to blame the government but to be fair; we have to look at both sides of the issue. Some people say that the process was not really a genuine process. I supported the process but during the process, apparently, there was arming of the PKK [Kurdish Workers' Party] and they prepared themselves for the next round of violence. We should not overlook that side of the issue. Any government would not tolerate it but I am critical of the government for tolerating it until it was too late — until you had an entrenched group of people to wage urban guerilla warfare. But the government had this attitude before. Take the Ergenekon trials; the government said it was fooled in this regard by the Gülen movement. It's not an argument; it's a weakness if they were fooled and they should have paid for it politically but they did not. The government says the same thing here. They say that the supporters of the PKK dug trenches and stored weapons, ammunition, etc. during the peace process. My other criticism of the government is in regard to the rise of the Peoples' Democratic Party (HDP). I am very disturbed to see that the political integration of the Kurdish movement took a heavy blow between the two elections [of June 7 and Nov. 1, 2015].
Would you elaborate on this idea?
We needed to understand the HDP's dilemma. The HDP was genuinely trying to integrate itself into Turkish politics. They also had a Kurdish constituency, which believed in integrating itself into Turkish politics. There was also another part of its constituency that believed in violence and separating itself from Turkey. There was a tug of war between those groups. This was reflected in the HDP's dilemma after the elections. It was like a group of people were pulling on one leg and the other group was pulling on the other leg in the opposite direction. Turkish politics failed between the two elections to pull the HDP closer towards the center. The government treated the HDP as the major villain — a totally wrong strategy.
Do you think it was not right to have another election on Nov. 1?
Turkey needed coalitions because times have changed. If you had read what I had written as a political scientist back in the '70s and '80s, you would find me anti-coalition because during those days Turkey was unable to produce an effective government, and there were important problems — the Kurdish problem was on the rise, there was student violence in cities, economic problems, etc. There was a lack of credible political leadership. Part of the responsibility lay with an electoral system that kept producing coalition governments, so I was very critical of it. But now Turkey has reached a stage in which we went through a period of single-party governments with effective leadership that produced some reforms. In that same period, we had a rise in authoritarianism and lack of checks and balances. That's why the elections of June 7 provided a very good opportunity, and the opposition was able to produce a credible alternative, a credible coalition. I am very critical of the stance taken by the Nationalist Movement Party [MHP]. On the evening of the election, they said that they would not be part of any coalition and did not regard the HDP as a legitimate political party — exactly what should not have been done. People were looking for a credible opposition but there was none. Then we had rise in violence, economic problems and no attempt to produce a coalition.
Can the peace process be restored?
Let's look at the election results from both June 7 and Nov. 1. Did the HDP lose votes because some voters from İstanbul's Beşiktaş and Nişantaşı districts did not vote for it again on Nov. 1? No, the HDP lost votes in the Southeast, and apparently, a good portion of the people in the Southeast do not want to separate from Turkey. Military approaches cannot produce solutions, and the peace process should come back so as not to lose those people altogether.
There are issues related to the education problems of young people in the region. Approximately, 150,000 children, maybe even more, cannot go to school. The ERG [Education Reform Initiative] had a statement in this regard, right?
Without blaming anybody in the statement, we said that the state has a responsibility to provide education and should produce a solution in this regard. How? They should seriously think about it and develop a plan. If they ask us, we can help. As if they responded to our statement, government officials started to talk about the issue, but we don't know what they are doing in this regard. There is also another issue: the education of Syrian children in Turkey. Many Syrian immigrants' children are on the streets. Ten years from now, they will be 20 year olds. Right now they are potential terrorists. Look at children in the trenches of the Southeast. Ten years ago, how old were they? They have only seen war, not education. This has been like this for 30-40 years. Young people know of only guns and battles. For Syrians, there are other issues, too: Are you going to educate them as Syrians or do you regard them as future Turkish citizens? I think you have to use your education system to integrate them into Turkish society. These decisions have to be made. There are some education services provided in refugee camps but most of the Syrians are not in the camps now, they are everywhere in Turkey.
You have been to the Southeast for work and you know that part of Turkey. People who live in western Turkey cannot usually identify with that part of the country. Do you observe this as well?
Back in the 1980s and 1990s, I sometimes said in my academic papers that Turkey is both Denmark and Bangladesh within the same borders. This is an extreme statement but parts of Turkey are like Europe while parts of it are really backwards. That's what I was trying to say. In big cities today, there are canton-like neighborhoods. Those who live in Fatih are quite different to the ones in Nişantaşı.
There was a conflict at the Middle East Technical University (ODTÜ) during the last days of December as some students clashed over a demand for the construction of another mosque on the campus. Soon after, President Erdoğan called on the Higher Education Board [YÖK] to do "what was necessary," indicating that his office would be closely following the case. YÖK set up a commission to monitor the situation at the university. And recently, about 700 academics have issued a declaration calling for respect to be given to the university's autonomy. Do you see it as an attempt by the government through YÖK to control ODTÜ?
I am against any intervention into universities. To me, universities are the brain of the society, and there should be freethinking. Universities should promote even nonsense but violence cannot be accepted. Students and faculties should be able to say whatever they are thinking of, otherwise, we cannot expect innovation. A university is a place for critical thinking. Universities are not vocational schools. YÖK has been an institution every Turkish political leader was critical of and then, after spending some time in power, they all loved it. Why? Because YÖK is a good tool to control universities — that is wrong. The ODTÜ administration is capable of handling the situation; there is no need to interfere.
We have not heard the ODTÜ administration talking about the issue, have we?
Silence can be a strategy. We had to do that at the Boğaziçi University many times. At the time of my presidency, we had most problems due to headscarved female students' desire to attend classes. Some of the faculty members said it was their human right to attend classes and some others said no. In addition, YÖK was pressuring us not to allow headscarved female students into classes. Even though I sided with the faculty who wanted to allow those students into classes, I had to answer to YÖK. We did not go to the media at the time and said that we allow those students into classes and that Boğaziçi was one of rare higher education institutions to allow them into classes. However, we acted as if we were respecting YÖK regulations and we started disciplinary actions against faculty members who allowed those female students to take classes. But we told those faculty members not to attach importance to them; we were slowing down the disciplinary process. In the meantime, students were able to graduate. We need to be rationalistic to be able to solve problems.
The ODTÜ, which operates the country's main Internet domain, also faced accusations from Transportation, Maritime Affairs and Communications Minister Binali Yıldırım who said the university fails to take the necessary measures to prevent attacks and does not cooperate with the security forces as Internet servers continue to suffer from one of the country's most intense cyber attacks to date. What are your thoughts on this?
ODTÜ is a real university. It tries to remain autonomous. And such universities would attract negative reaction in Turkey. It has been like this in other periods, too. The ODTÜ is only one of only a few universities to be in such a position. Boğaziçi University has that quality as well but the ODTÜ is disadvantageous because of being in Ankara. In Ankara, universities are more statist than the ones in İstanbul. When it comes to the technical issue, theoretically, this task had better be in the hands of the state rather than at a university in normal circumstances. This task was given to the ODTÜ because only it had the capacity to handle it. What needs be done about it now? I would support that the task remains with the ODTÜ because first, it is still the best institution to handle it technologically. Second, having the task at the ODTÜ guarantees that our freedoms are protected. If this task is given to the ministry, we could have been finished.
A new regulation gives YÖK the authority to close down private universities that "have become a focal point for activities against the state's indivisible integrity." And this is believed to have been passed in order to close down universities affiliated with the Gülen movement. What's your opinion?
This is a very dangerous things to do because if a government changes and a completely different type of government comes into play, then such regulations can be used to close universities that are thought to belong to groups that the government does not like.
In your book you have a section titled "Recep Tayyip Erdoğan." There, you express a positive view of him as you interacted with him when you were president of Boğaziçi University and he was the mayor of İstanbul. Have your views changed about Erdoğan?
It is not possible to have the same opinion. It was 1994 then and about 20 years have passed. We have to look at his performance over time. He then became prime minister and later president, and we have been through a period in which there have been no checks and balances. He was scared of the Turkish military and now there is no such issue. The European Union was there but it is not anymore. We live in a society where the culture of being submissive to the leader is encouraged. "Power tends to corrupt, and absolute power corrupts absolutely," as Lord Acton put it. This is Tayyip Erdoğan's syndrome. Therefore, 1994 is very different to 2015. In 1994, as I explained in the book, we visited his office as rectors of different universities. But the atmosphere was rather like, "We are against you." This is not an attitude that I can ever agree with. He was an elected mayor and we needed to have dialogue to do business. Therefore, I asked for another appointment with him to discuss the issues regarding the university. My impression of him was that he was ready to listen to you more than anybody else if you used the right language, and at the same time that he could get very nervous over even a small matter. During our talk, I told him that I had no interest in religion. He told me that this is the Turkey he wants — everybody can do whatever they want to do. As you know, he lost this outlook later and started to meddle with issues such as the appropriate length of women's skirts and of alcohol, as he referred to some people as drunkards, etc. In other words, he injected his personal views into the public arena. However, I believed him then.
Do you think you would be more skeptical of Tayyip Erdoğan back in 1994 if you had known what you know now about his political performance?
Yes, I would be. Now, I am trying to place myself in Tayyip Erdoğan's shoes and think about how everybody around him approves his behavior, bending over backwards to please him. If I were in his shoes, I might have become deluded as well. That's why term limits and checks and balances are important.
And we have a government desire to transform the parliamentary system into a presidential one. Is this worrying for you?
The Turkish style of presidency means no checks and balances. This is what is in Erdoğan's mind. He is drunk on power, but it is not only his fault; it can happen to anyone because we are the ones who cause this. I was a university rector. Everybody asked me everything. I knew it was dangerous. I felt it at just a small university, so he must have felt it as a leader who has been victorious in every election. And politicians say that people elected them. But democracy is not only about elections. There is also the issue of human rights. In order to respect human rights you need to protect the rights of those who did not elect you. But this is not our understanding of democracy in Turkey.
Because of the demand of the government, the presidential system has come onto the agenda of Turkey again. HDP leader Selahattin Demirtaş recently called on Prime Minister Ahmet Davutoğlu to debate on live television, saying that Davutoğlu should explain what kind of presidential system the government wants while he himself will explain what self-administration (a demand expressed especially by the HDP) is. What do you think about Demirtaş's request?
This is a good call. We need this kind of environment for debate. Turkey has a problem in Ankara — too much centralization. This is not a problem only for the Southeast, we need power in local governments everywhere in Turkey. When I was a university rector, I fought for autonomy. Think about it, when you became the head of a university, a top body (YÖK) starts to see you as a person who will evade regulations. There is an awful form of centralization and they tell you what to do all of the time. There is a top-down approach. I will never forget the day that I came back from the United States. I was in Ankara's Kızılay at the time of day when people get out of work. On that gloomy day I saw crowds coming out of work, the dark-suited men who rule Turkey from Ankara. But do they really know Turkey? That's what I thought that day. I support Demirtaş in this regard. We need autonomous universities and powerful local governments throughout Turkey.
Prime Minister Davutoğlu was your student.
He was a very good student.
How do you evaluate his performance as prime minister?
A very good student and a very good academic doesn't necessarily make a good politician. Davutoğlu has a long way to go as a politician because he has been in that position under the wing of a very powerful leader without proving his capacity. Therefore, I cannot make a judgment on his performance as a politician. However, I believe he knows how important checks and balances are in a democracy and democracy is very much linked to human rights. I don't think Tayyip Erdoğan knows it. I hope Davutoğlu's practice will reflect those values. When he became prime minister, I wrote him a letter and said that I am sure he will apply the values with which he was molded at Boğaziçi University in his position.
Did he reply?
No. But he seems to be open to communication. When I call with an issue, he responds.
Full interview here.
Dr. Üstün Ergüder
Emeritus professor at Sabanci University, he is the only Turkish citizen who served (in 2009-2013) as president of the Council of Magna Charta Observatory located in Bologna, Italy. Between August 1992 and August 2000 he served as the rector of Boğaziçi University for two consecutive terms. Prior to his appointment as rector, he chaired the department of political science and international relations. He was the director of the İstanbul Policy Center at Sabancı University in 2001-2010. Currently, he directs the Education Reform Initiative (ERG), an advocacy project located at Sabancı University and chairs the executive committee and the Board of Trustees of the Third Sector Foundation of Turkey. He most recently became the chair of the Open Society Foundation in Turkey.

redpajama_set_name: RedPajamaCommonCrawl


We offer a variety of personal injury practice areas for those who are entitled to compensation and justice for injuries that have resulted from another person or company's negligence. View all other personal injury practice areas.
Spring Hill, Brooksville, Weeki Wachi, FL and surrounding areas listed below. If you have been in a car accident, boating accident, motorcycle accident in any of these locations. Hernando County, Fl personal injury trial lawyer, Wendy Doyle-Palumbo will fight with dogged determination to obtain the compensation you are entitled to under Florida's Personal Injury Law.
CAR ACCIDENT, MOTORCYCLE ACCIDENT, PERSONAL INJURY ATTORNEY - Injury attorney Spring Hill, Brooksville, South Brooksville, Ridge Manor, Weeki Wachee, Hernando Beach, FL. Wendy Doyle-Palumbo, Esq. , PIP, Examination Under Oath, Wrongful Death.


VisitDallas and the City of Dallas are excited to announce Deck the Plaza, a free holiday celebration on Friday, Nov. 30, from 4:30 to 8 p.m. Join Mayor Mike Rawlings for the official illumination of City Hall Plaza, including a 40-foot tree lighting.
The festive, family-friendly event will include interfaith speakers and a special arrival from the big man himself… Santa Claus! Musical entertainment will be provided by Dallas Winds and the Castro band, headlined by locals Jason and Michael Castro of "American Idol" fame. Attendees can enjoy holiday treats including hot chocolate, apple cider and cookies.
Deck the Plaza is the anchor event of VisitDallas' BIG D Holiday promotion, an annual partnership with arts institutions and area attractions to showcase a full array of seasonal events for locals and visitors to enjoy. From magical musical performances to sparkling city lights, Dallas offers festive holiday fun for the whole family. Visit bigdholiday.com for more information and a complete list of events.
For more information please visit bigdholiday.com.


text:
Crypto Biz: Institutions short Bitcoin as SBF is 'deeply sorry' for FTX collapse
Published: Friday, 25th November, 2022 - 22:30
The monumental collapse of FTX will go down as one of the biggest corporate scandals of all time. But, at least Sam Bankman-Fried, or SBF, is sorry. On Nov. 22, the disgraced founder of FTX penned a letter to his former employees describing his role in the company's bankruptcy. "I never intended this to happen," he wrote. "I did not realize the full extent of the margin position, nor did I realize the magnitude of the risk posed by a hyper-correlated crash." Get this: SBF still thinks the company can be saved because "there are billion of dollars of genuine interest from new investors." Shouldn't he be preoccupied with trying to avoid jail right now?
Bitcoin (BTC) and the broader crypto market have been reeling in the wake of the scandal. While this has allowed many diamond handed hodlers to accumulate more BTC on the cheap, institutional investors are using this opportunity to short the market. We may finally get that final capitulation to round out the current four-year cycle.
As always, this week's Crypto Biz newsletter delivers all of the latest high-profile business news from our industry.
Sam Bankman-Fried says he is 'deeply sorry' for collapse in letter to FTX team
SBF's letter to former FTX employees painted the picture of a deeply remorseful founder who managed to squander billions because of excessive margins and poor oversight. He also blamed the "run on the bank" for FTX's ultimate demise. For those of you keeping track, the bank run that SBF mentioned was triggered by Binance CEO Changpeng Zhao who, on Nov. 6, disclosed on Twitter — of all places — that he would be selling $500 million worth of FTX tokens. That announcement triggered a tidal wave of redemptions on FTX as users rushed for the exit. Within 48 hours, FTX was shown to be insolvent.
FTX owes over $3 billion to its 50 biggest creditors: Bankruptcy filing
The hole in FTX's balance sheet is estimated to be worth around $8 billion — and a huge portion of that is owed to just 50 people. New bankruptcy filings in the state of Delaware confirmed this week that FTX's top 50 creditors are owed a combined $3.1 billion. One individual is owed more than $226 million, while the rest of the top 50 had anywhere between $21 million and $203 million on the failed derivatives exchange. So, when can FTX creditors expect to get some of their money back? It could take years or even decades, according to insolvency lawyer Stephen Earel.
FTX discloses its top 50 creditors are owed $3.1 billion.
The largest creditor is owed $226 million.
All names were redacted. pic.twitter.com/JGeddvMB7w
— Tom Dunleavy (@dunleavy89) November 20, 2022
FTX crisis leads to record inflows into short-investment products
Believers in Bitcoin as a sound money alternative to the current monetary regime have used the latest market collapse to accumulate more BTC. But, for some institutional investors, the FTX collapse has triggered a new shorting opportunity. According to CoinShares, 75% of institutional crypto investments last week went to short investment products. In other words, they're betting that Bitcoin and other crypto assets will see a further decline in price. BTC has already plunged to around $15,500, marking a new low for the cycle. Although Bitcoin can go much lower, we are nearing the end of the current four-year cycle. So, the bottom could be close.
US senators urge Fidelity to reconsider its Bitcoin offerings after FTX blow-up
Fidelity Investments, one of the earliest institutional backers of digital assets, is being strongly urged by members of Congress to limit its Bitcoin investment offerings. This week, Senators Elizabeth Warren, Tina Smith and Richard Durbin once again called on Fidelity to reconsider its Bitcoin 401(k) product offering in the wake of the FTX disaster. "Since our previous letter [from July 26, 2022], the digital asset industry has only grown more volatile, tumultuous, and chaotic—all features of an asset class no plan sponsor or person saving for retirement should want to go anywhere near," the senators wrote. The crypto skeptics can take their victory lap for now, but Bitcoin will get the last laugh.
The implosion of FTX has made it clear that the digital asset industry has serious problems. I joined @SenWarren & @SenTinaSmith to urge Fidelity to do what is best & reconsider its decision to expose retirement accounts & employer-sponsored plans to these volatile assets. pic.twitter.com/qQn4PF80AP
— Senator Dick Durbin (@SenatorDurbin) November 21, 2022
Before you go: Could Grayscale trigger the next Bitcoin price collapse?
Concerns around Grayscale's Bitcoin Investment Trust (GBTC) began to mount last week after the company refused to provide on-chain proof of its reserves. Now, investors are worried about whether Grayscale's parent company, Digital Currency Group (DCG), could be forced to liquidate a portion of its GBTC to cover a massive hold in Genesis Global Trading's balance sheet. What's the relationship between DCG, GBTC and Genesis? In this week's Market Report, Marcel Pechman and I discuss this relationship and why it matters to Bitcoin investors. You can watch the full replay below.
Crypto Biz is your weekly pulse of the business behind blockchain and crypto delivered directly to your inbox every Thursday.
This post first appeared on: Cointelegraph
Author: Sam Bourgi
ftx, Grayscale, investments, Sam Bankman-Fried, senate
Top 3 Liquid Staking Derivatives Tokens Below $50M Market Cap To Watch In January 2023
POS Giant Clover Teams Up With Strike To Bring Bitcoin's Lightning Network To Millions Of Merchants
Senator Ted Cruz Wants Vendors to Accept Bitcoin at the Capitol


text:
An Inconvenient Book by Glenn Beck
Posted on January 4, 2010 by thekoolaidmom
Title: An Inconvenient Book: Real Solutions to the World's Biggest Problems
Author: Glenn Beck
"Although [political correctness] arises from the laudable desire to sweep away the debris of racism and sexism and hatred, it replaces old prejudice with new ones. It declares certain topics off-limits, certain expressions off-limits, even certain gestures off-limits.
"What began as a crusade for civility has sourced into a cause of conflict and even censorship. Disputants treat sheer force – getting their foes punished or expelled, for instance – as a substitute for the power of ideas.
"Throughout history, attempts to micromanage casual conversation have only incited distrust. They have invited people to look for an insult in every word, gesture, action. And, in their own Orwellian way, crusades that demand correct behavior crush diversity in the name of diversity."
–An Inconvenient Book by Glenn Beck, page 151
The above quote begins chapter 12: "You Can't Say That! The Politics of Correctness" in An Inconvenient Book by Glenn Beck. The shocking thing about this quote is that it was delivered in a 1991 commencement speech given by former President George H. W. Bush. 1991 was just the beginning of the PC movement, and at that time, it felt more like a passing liberal fad than the enslaving censor that it has become. Bush's speech now seems oracular.
I found this book to be very intelligently, and often funny, written. It wasn't just a bunch of right-wing rhetoric slapped on pages and tossed out to the public. On occasion, Beck even agrees with the left, often the right, but mostly he lands somewhere in the middle with his own well-researched thoughts and ideas. It is set up in textbook style, with inserts and graphs and illustrations to further make his points. With the chapter on Child Molesters, he makes it a point to say that this is a subject in which all political lines fall and we become just people, fathers and mothers, who desire to protect our children. With each chapter, Beck offers a solution to the problems he addresses.
I believe that political correctness is the biggest threat this nation faces today. Sure, you won't see newspaper articles about the nuclear program it's working on, but it's an enemy nonetheless.
Think of it as a poison that was dumped into our water supply years ago by our enemies. They knew that it would take time for the entire country to be affected, but they were patient, and now the entire country has been poisoned, and most don't even know it.
The only antidote for this toxin is for everyone to stop sitting down and taking it like French soldiers at war. We all have to start being open about the fact that political correctness not only exists but is killing us. The first small step in doing that is becoming aware and suspicious of the people and groups who are always trying to ban certain words or otherwise restrict your freedom of speech. Let's call them the linguistically intolerant or the opposing-viewpoint-averse.
When you see them, stop and ask yourself a simple question: Why? … It's time to take back the First Amendment. -page 160
Not only does he say, "Here's the problem and here's how we can solve it," but he also explores the history and thinking behind the problem and how we got here. His chapter on the UN is particularly acerbic, his solution to the problem a bit shocking.
I read this at the very end of 2009, when I was reading nearly a book a day to make my 75-book goal, and therefore some of what I read went in one eye and out the other. I do plan to re-read it again, this time with highlighters and flags in hand, and a notepad and pen to my left. There is just far too much info crammed in the book to just leave it with one read.
I give An Inconvenient Book by Glenn Beck 4 out of 5 stars.
Filed under: Book Reviews | Tagged: adultery, aging, Al Gore, an inconvenient book, child molester, Glenn Beck, global warming, hypocrite, illegal immigration, income gap, indoctrination, Islam, media bias, minimum wage, Muslim, oil dependence, opinion polls, parenting, political correctness, porn, prozac, radical islam, The UN | 2 Comments »
Home Repair by Liz Rosenberg
Title: Home Repair
Author: Liz Rosenberg
Challenges: ARC Challenge
But it was more than facing the clutter and the mess, this grip of cold gloom that surrounded her. She had never been prone to depression, not even after Ivan died, but what she suffered now felt like a disease of the soul. She wandered aimlessly around the house. The flowers in their clay pots out on the front porch were long dead and withered. A few brown leaves stuck out from the stems. She seemed to be staring at the demise of everything. Everything she'd already lost, all the losses still to come. It all headed toward grief in the end. Humans were soap bubbles, clinging to any solid surface. They rested briefly, then were gone. Her mother would be gone soon, and not long after, it would be herself, and one day even her own children…
A chill stabbed her heart. Why on earth bother? Why clean, take out the trash, make the beds. Why not let it all alone to rot?
– Home Repair by Liz Rosenberg, pages 183-184 (ARE)
I'd first like to thank Jennifer, aka Book Club Girl, for the opportunity to read Home Repair and participate in a discussion with Liz Rosenberg, the book's author. You can listen to her July 8th broadcast on Blog Talk Radio with the author by clicking here. It was my first time participating in a live discussion with an author, and was an interesting experience. It would definitely be more interesting to have the author's voice at a book club discussion more often.
One of the things that sticks out most for me with Home Repair is that it truly has a feeling of authenticity. Often in books, when the tragic or fantastic occurs, it feels contrived or manufactured, a vehicle for the author to get the characters from one point to another, or to teach a lesson. However, with this book, the events feel natural. When Eve and her seventeen-year-old son, Marcus, get into a fight about him going for a ride in his friend's new sports car, it had a very familiar feeling to me, a mother of two teens of my own. The events that followed the argument also felt familiar and made me think back to something that had happened within my own family. Another aspect of Home Repair that I kept thinking of while reading it was that the characters were very real to me. At times I could see my own mother in Charlotte, Eve's mom, with Eve playing my part, at other times Mrs. Dunrea could've been me. Also, Rosenberg has set Home Repair in her home town of Bignhamton, New York, adding even more realism to the book.
Home Repair by Liz Rosenberg begins on a bright, sunny and unseasonably mild day as Eve holds a garage sale to clear out some of the clutter in her family of four's life. As the day progresses, she becomes aware that her husband, Chuck, has taken the opportunity to clear out for good. Eve is left with the task of explaining to her two children, Marcus and Noni, that he's left them, and to somehow manage to dig down within herself and soldier on. The book takes us on a year journey as Eve rediscovers who she is, develops friendships and connections with new and different people, and deepens her relationships with those she already knows. When her mother moves up from Tennessee to "help," Eve is faced with her mother's own eventual mortality and humanness, as she struggles in the in-between land of mother caring for her own children while being a child caring for her mother. Home Repair is the story of healing, family and friendship that will stay with you and gives hope that "This too shall pass."
"Why does anyone get married? Why do middle-aged men leave their wives, or women abandon their families and run off to Tahiti? Why does anyone bother to become friends with anyone, or adopt a child, or own a pet, for that matter? We're all going to die sooner or later, if that's what you're thinking," Charlotte said. "That's life. Nothing we do can change that. We're all going to someday say good-bye. We're all going to have to cry, little girl," she said, putting one hand out to touch Eve's hair. The touch did not quite happen, but hovered, and then settled back down, like a butterfly, still quivering. "We might as well be happy while we can."
–Home Repair by Liz Rosenberg, page 324 (ARE)
Home Repair by Liz Rosenberg is a comfort, homey read that reminds us that we're not alone and gives us hope. It tells us that we're stronger than we think and love is the best home repair. I give it 4 out of 5 stars.
Filed under: ARC Challenge, Book Reviews | Tagged: aging, aging parent, American Fiction, Binghamton, car accident, caregiving, Charlotte Dunrea, Christian, community, crime, death, divorce, empty nest, Eve, family drama, fiction, grief, hero, interfaith, interracial, Jewish, Lev, Liz Rosenberg, loss, Marcus, mothers, mothers and daughters, New York, Noni, parenting, pets, romance, secretary, self-discovery, seperation, single parent, Tracy, Van Gogh, widow, women | 12 Comments »
Water for Elephants by Sara Gruen
Title: Water for Elephants
Author: Sara Gruen
…[Camel] comes to a stop in front of a stock car. "Joe! Hey, Joe!"
A head appears in the doorway.
"I got a First of May here. Fresh from the crate. Think you can use him?"
The figure steps forward onto the ramp. He pushes up the brim of a battered hat with a hand missing three of its fingers. He scrutinizes me, shoots an oyster of dark brown tobacco juice out the side of his mouth, and goes back inside.
Camel pats my arm in a congratulatory fashion. "You're in, kid."
"I am?"
"Yep. Now go shovel some shit. I'll catch up with you later."
–Water for Elephants by Sara Gruen, page 33
Jacob Jankowski was one week and his final exams away from being a vet. Then tragedy hits, claiming the lives of his parents, and revealing that they'd mortgaged everything to keep their only child enrolled in Cornell University. The weight and guilt of this bears down on young Jacob, and he just walks off from school… and keeps on walking. When he finally stops for the night, he decides to jump aboard a passing train, only to find he's just joined the Benzini Brothers Most Spectacular Show on Earth.
Vividly imaginitive and well-researched, Water for Elephantsby Sara Gruenis a compelling, character-driven tale with the feel of magic and wonder we feel as children going to the circus for the first time. It has a gritty realism to it and exposes the behind-the-scenes working and stratification of classes of the travelling circus. Bosses, freaks, an exotic menagerie, performers, clowns and dwarfs, working men and roustabouts… in that order. Everyone has a history, and a pervasive loneliness binds them all together.
I was enrapt by both the writing and the story in Water for Elephants. Gruen, a female writer, captures the male perspective amazingly well. The story takes place in two timelines: Young Jacob at 23 and joining the circus, and the elderly Jacob, who is either 91 or 93 (he can't remember anymore), in an assisted living facility, dealing with the emotions of being left behind -by his kids and his deceased wife- in a place where there's baby food to eat, your neighbor poops his pants, and your desires and opinions are discounted and ignored. I was carried along through the story, and it was over before I even knew it.
I loved Water for Elephantsby Sara Gruen and give it 5 out of 5 stars 🙂
Ladies and Gentlemen, children of all ages! Presenting a video clip of Ringling Brothers Greatest Show on Earth!
Filed under: Book Reviews | Tagged: 1930s, Adult, adultery, aging, alcohol, American, animal cruelty, animals, bears, circus, circus life, circus performers, clowns, Cornell, death, depression, depression era, domestic abuse, drinking, dwarf, elephants, fiction, freaks, great depression, grief, historical fiction, horses, Jamaica ginger paralysis, lions, loss, love, love story, murder, nursing home, old age, paranoid schitzophrenia, prohibition, redlighting, Ringling, romance, side show, tigers, trains, Uncle Al, vetrinarian | 14 Comments »
Title: The Curious Case of Benjamin Button
Author: F. Scott Fitzgerald
Date Published: February 18, 2008
Publisher: Juniper Grove
A nurse was sitting behind a desk in the opaque gloom of the hall. Swallowing his shame, Mr. Button approached her.
"Good-morning," she remarked, looking up at him pleasantly.
"Good-morning. I -I am Mr. Button."
At this a look of utter terror spread itself over the girl's face. She rose to her feet and seemed about to fly from the hall, restraining herself only with the most apparent difficulty.
"I want to see my child," said Mr. Button.
…Ranged around the walls were half a dozen white-enameled rolling cribs, each with a tag tied at the head.
"Well," gasped Mr. Button, "which is mine?"
"There!" said the nurse.
Mr. Button's eyes followed her pointing finger, and this is what he saw. Wrapped in a voluminous white blanket, and partially crammed into one of the cribs, there sat an old man apparently about seventy years of age. His sparse hair was almost white, and from his chin dripped a long smoke-colored beard, which waved absurdly back and forth, fanned by the breeze coming in at the window. He looked up at Mr. Button with dim, faded eyes in which lurked a puzzled question.
"Am I mad?" thundered Mr. Button, his terror resolving into rage. "Is this some ghastly hospital joke?"
"It doesn't seem like a joke to us," replied the nurse severely. "And I don't know whether you're mad or not – but that is most certainly your child."
-"The Curious Case of Benjamin Button" by F. Scott Fitzgerald, pages 3-4
Originally published in Collier's, F. Scott Fitzgerald's short story, "The Curious Case of Benjamin Button," was inspired by a comment once made by Mark Twain.
Life would be infinitely happier if we could only be born at the age of 80 and gradually approach 18.
Such was the beginning for the stories main character, Benjamin Button. Born as an elderly man, much to the chagrin of his socially and financially prominent family, his father initially intends to name his newborn "Methuselah" after the longest-living biblical patriarch who died at the age of 969 years of age.
Throughout the story, Benjamin lives a life that lacks, for the most part, acceptance. His father doesn't accept him as a child and insists he wear short pants and play with toys, all the while the aged young Button would rather read the Encyclopedia Britannica and smoke Cuban cigars. At the age of 18 (though looking 50), Benjamin is run out of New Haven, Connecticut by a mob when he insists to the Yale registrar that he is indeed both a freshman and eighteen. As he grows younger and his wife grows older, she insists he stop being different and grow old like normal people, a sentiment later echoed by his own son.
While "The Curious Case of Benjamin Button" is an interesting story, it is dated in it's language and cultural sense. A fifty-year-old college freshman would be commended today, rather than mocked. In a world with the Internet and Paparazzi lurking behind every bush, waiting to snap a picture of the social elite, when those same pictures are discussed for weeks and speculations are made on national television, blogs and by comedians and late-night talk show host as to whether they've had work done, are suffering from an eating disorder or are doing crack, the global nature of our "community" would render it impossible to notice Button's de-aging process.
And I won't even go into the physiological impossibility for a woman of average height, 5′ 4″ to give birth to a 5'8″ baby. She wouldn't have even been able to carry the baby to term. And this same baby is born with the ability to talk intelligently, to know the difference between milk and steak, and to walk home from the hospital? OKAY… so this story requires an incredible amount of "willingness to suspend belief".
But, most of all…. This is a short story that I very much wish had been fleshed out into a novel. It leaves out so much detail and is over so quickly. I was able to read it in about an hour, as it was only 26 pages, and I judged a cartwheel contest in that hour, as well.
It is important to remember that "The Curious Case of Benjamin Button" was written by Fitzgerald in the early 20s. I thought about one of my favorite television series from my childhood, Mork and Mindy, the movie Jack and, of course, the recent film version of the short story starring Cate Blanchett and Brad Pitt.
Not only did Fitzgerald take his inspiration for the story, "The Curious Case of Benjamin Button," from Mark Twain, but the writing style also had a Twain-esque feel to it, which was probably one of the things that helped me get through it. All in all, I'd say, if ya got the book lying around, read it… it's short enough not to be a punishment… but don't go out of your way to find a copy. I can now watch the movie, guilt-free, and I'm betting the movie is better than the book, which feels more like a concept for a novel than a completed work. I give "The Curious Case of Benjamin Button" 3 1/2 out of 5 stars.
Trailer for the movie version of "The Curious Case of Benjamin Buttons"… And I would definitely HAVE TO SAY that the movie is about as much "based" on Fitzgerald's story as the story was "based" on Twain's quote. From what I've seen in the trailer, I'd have to say that it bears little resemblance to the short story, but it looks a lot more magical than the written story was.
Filed under: Book Reviews | Tagged: 1920s, acceptance, aging, America, American, antebellum, antebellum Baltimore, Baltimore, big baby, blog, Brad Pitt, Cate Blanchett, Civil War, Collier's, conformity, Connecticut, Cuban cigars, de-aging, F. Scott Fitzgerald, fable, fairy tale, fantasy, fiction, hardware store, Harvard, Jack, Mark Twain, Maryland, Methuselah, Mork and Mindy, New Haven, paparazzi, reverse aging, Robin Williams, short story, The Curious Case of Benjamin Button, The Encyclopedia Britannica, turn of the century, World War I, Yale | 5 Comments »
Exit Ghost by Philip Roth
Posted on February 28, 2009 by thekoolaidmom
Title: Exit Ghost
Author: Philip Roth
Publisher: Houghton Mifflin Company
Publish Date:2007
What surprised me most my first few days walking around the city? The most obvious thing – the cell phones. We had no reception as yet up on my mountain, and down in Athena, where they do have it, I'd rarely see people striding the streets talking uninhibitedly into their phones. I remembered a New York when the only people walking up Broadway seemingly talking to themselves were crazy. What had happened in these ten years fo there suddenly to be so much to say – so much so pressing that it couldn't wait to be said? Everywhere I walked, somebody was approaching me talking on a phone and someone was behind me talking on a phone. Inside the cars, the driver were on the phone. When I took a taxi, the cabbie was on the phone. For one who frequently went without talking to anyone for days at a time, I had to wonder what that had previously held them up had collapsed in people to make incessant talking into a telephone preferable to walking about under no one's surveillance, momentarily solitary, assimilating the streets through one's animal senses and thinking the myriad thoughts that the activities of a city inspire. For me it made the streets appear comic and the people ridiculous.
–Exit Ghost by Philip Roth, pages 63-64
Nathan Zuckerman is man in the twilight years of his life. As an author, words and ideas have been his medium to work and creation, yet, now age seventy-one, senility and his growing "word salad" difficulty has begun is slowly robbing him of his ability to write. Once virile and in control of his destiny, a prostectomy has rendered him impotent and incontinent. And, after ten years of New England solitude, the hope of regaining some bladder control from a medical procedure has brought him back to the cosmopolis of his exodus, New York City, where he likens himself to Rip Van Winkle, returning from his twenty-year nap and finding the entire world changed.
In his week-long stay, he makes connections with three people who that threaten to irreversibly alter his chosen isolation and reality. With the first, he makes a rash decision to answer an add to swap homes and meets the young and seductive, Jamie Logan, who inspires a fantasy affair in Zuckerman's mind and reawakens his all-but-lost desire for female company. His second, the serendipitous running into of Amy Bellette, the mistress of his literary icon, Manny Lonoff, reminds him of both his youthful past and his ever-creeping mortality. The third connection he makes is with Richard Kliman, an abrasive, tenacious wanna-be literateur, who believes he has discovered Lonoff's "great secret" and wants to write his biography, exposing the author's shameful "crime" in the titillating tell-all fashion of the modern biography, a genre of current writing that is more Weekly World News than World News.
Meeting these three people force Zuckerman to face and accept the realities that his isolation has allowed him to ignore: He is getting old, each day bringing him closer to his own life's end, and after his death he will no longer have control of that life he lived, as some young writer wanting to make a name for himself may decide to write the expose of Nathan Zuckerman. In the end, he asks himself this questions: Once I am dead, who can protect the story of my life? How will I have failed to be the model human? What will be my great, unseemly secret?
Exit Ghost is my first experience reading Philip Roth, but I don't plan on making it my last. Slow going at first, I wasn't sure I would really be able to get into it. How can a mid-thirties, single mom understand and relate to a septuagenarian man? How can I, a moderate to conservative Republican from the mid-west, relate to a liberal Democrat New Englander? I'm a product of the Eighties and Nineties, he is a product of the fifties and sixties. I'm a W.A.S.P. and he a Jew. I am in the Summer of my life when all my body parts are where the good Lord put them, and work within normal parameters. He is entering the Winter of his, incontinent, showing the beginning of dementia, with a mutinous body. I'm aware death will someday happen, though not many I know have experienced it. Zuckerman is facing it's certainty, many of his friends and contemporaries having already passed through that gate.
However, for all this lack of commonality, Roth manages the miraculous; for a time, a young woman in her prime became an aging man in his decline.
Winner of several prestigious awards, Philip Roth is a skilled, intelligent yet readable, wordsmith. He references Joseph Conrad (an author I have not yet read, but I do have Heart of Darknesson Mt. TBR) often in Exit Ghost, and I found his writing style to be reminiscent of Faulkner (not surprisingly, he has won the PEN/Faulkner Award three times).
For it's ability to transport the reader to a life completely foreign and unimaginable, as well as for it's well-written and memorable passages that are sure to be included in quotable literature books, I give Exit Ghost by Philip Roth five out of five stars.
Filed under: Book Reviews | Tagged: adultery, aging, cancer, divorce, elderly, impotance, incest, incontinance, isolationism, Jew, Jewish, Jewish literature, liberal, mortality, Nathan Zuckerman, Nazi, New England, novelist, terrorism, writer, Youth | 3 Comments »


text:
Coinfections and complications
Respiratory failure in PCP patients can recur after HAART initiated
1 October 2001. Related: Coinfections and complications.
Recurrence of acute respiratory failure is a threat when highly active antiretroviral therapy (HAART) is initiated early after the diagnosis of AIDS-inaugurating Pneumocystis carinii pneumonia (PCP), according to Parisian investigators.
Dr. Jacques Cadranel, of Hôpital Tenon, and associates report that this phenomenon occurred in three patients out of 65 with PCP treated at a single centre between 1996 and 2000. The severe PCP, which in all three cases was the first sign of HIV infection, resolved after 15 days of parenteral cotrimoxazole and steroids.
HAART was initiated within 1 to 16 days of PCP diagnosis. As reported in the American Journal of Respiratory and Critical Care Medicine for September 1, acute respiratory failure with high-grade fever developed within 7 to 17 days. Lung biopsies and bronchoalveolar lavage revealed severe nonspecific pulmonary inflammatory foci surrounding rare P. carinii cysts.
HAART was interrupted in two patients and steroids were reintroduced in two. All three patients recovered from the respiratory failure.
Dr. Cadranel's team reports that HAART initiation led to marked decreases in plasma viral load, but that "circulating CD4+ cell counts did not increase in parallel, suggesting possible CD4+ cell sequestration in the lungs and their participation in the acute pulmonary reaction."
Wislez M et al. Acute Respiratory Failure Following HAART Introduction in Patients Treated for Pneumocystis carinii Pneumonia. Am J Respir Crit Care Med 2001;164:847-851.
http://www.ncbi.nlm.nih.gov/pubmed/11549544?dopt=Abstract
Source: Reuters Health
Valcyte receives Dutch regulatory approval for treatment of AIDS-related CMV retinitis
Can low-dose shark cartilage shrink KS?