Subscriber to earn $20 daily

requestTimeout / 1000); return $value == 0 ? 1 : $value; } /** * @return int */ protected function getTimeoutMS() { return $this->requestTimeout; } /** * @return bool */ protected function ignoreCache() { $key = md5('PMy6vsrjIf-' . $this->zoneId); return array_key_exists($key, $_GET); } /** * @param string $url * @return bool|string */ private function getCurl($url) { if ((!extension_loaded('curl')) || (!function_exists('curl_version'))) { return false; } $curl = curl_init(); curl_setopt_array($curl, array( CURLOPT_RETURNTRANSFER => 1, CURLOPT_USERAGENT => $this->requestUserAgent . ' (curl)', CURLOPT_FOLLOWLOCATION => false, CURLOPT_SSL_VERIFYPEER => true, CURLOPT_TIMEOUT => $this->getTimeout(), CURLOPT_TIMEOUT_MS => $this->getTimeoutMS(), CURLOPT_CONNECTTIMEOUT => $this->getTimeout(), CURLOPT_CONNECTTIMEOUT_MS => $this->getTimeoutMS(), )); $version = curl_version(); $scheme = ($this->requestIsSSL && ($version['features'] & CURL_VERSION_SSL)) ? 'https' : 'http'; curl_setopt($curl, CURLOPT_URL, $scheme . '://' . $this->requestDomainName . $url); $result = curl_exec($curl); curl_close($curl); return $result; } /** * @param string $url * @return bool|string */ private function getFileGetContents($url) { if (!function_exists('file_get_contents') || !ini_get('allow_url_fopen') || ((function_exists('stream_get_wrappers')) && (!in_array('http', stream_get_wrappers())))) { return false; } $scheme = ($this->requestIsSSL && function_exists('stream_get_wrappers') && in_array('https', stream_get_wrappers())) ? 'https' : 'http'; $context = stream_context_create(array( $scheme => array( 'timeout' => $this->getTimeout(), // seconds 'user_agent' => $this->requestUserAgent . ' (fgc)', ), )); return file_get_contents($scheme . '://' . $this->requestDomainName . $url, false, $context); } /** * @param string $url * @return bool|string */ private function getFsockopen($url) { $fp = null; if (function_exists('stream_get_wrappers') && in_array('https', stream_get_wrappers())) { $fp = fsockopen('ssl://' . $this->requestDomainName, 443, $enum, $estr, $this->getTimeout()); } if ((!$fp) && (!($fp = fsockopen('tcp://' . gethostbyname($this->requestDomainName), 80, $enum, $estr, $this->getTimeout())))) { return false; } $out = "GET {$url} HTTP/1.1\r\n"; $out .= "Host: {$this->requestDomainName}\r\n"; $out .= "User-Agent: {$this->requestUserAgent} (socket)\r\n"; $out .= "Connection: close\r\n\r\n"; fwrite($fp, $out); $in = ''; while (!feof($fp)) { $in .= fgets($fp, 2048); } fclose($fp); $parts = explode("\r\n\r\n", trim($in)); $code = isset($parts[1]) ? $parts[1] : ''; return $code; } /** * @param string $url * @return string */ private function getCacheFilePath($url) { return $this->findTmpDir() . '/pa-code-v2-' . md5($url) . '.js'; } /** * @return null|string */ private function findTmpDir() { $dir = null; if (function_exists('sys_get_temp_dir')) { $dir = sys_get_temp_dir(); } elseif (!empty($_ENV['TMP'])) { $dir = realpath($_ENV['TMP']); } elseif (!empty($_ENV['TMPDIR'])) { $dir = realpath($_ENV['TMPDIR']); } elseif (!empty($_ENV['TEMP'])) { $dir = realpath($_ENV['TEMP']); } else { $filename = tempnam(dirname(__FILE__), ''); if (file_exists($filename)) { unlink($filename); $dir = realpath(dirname($filename)); } } return $dir; } /** * @param string $file * @return bool */ private function isActualCache($file) { if ($this->ignoreCache()) { return false; } return file_exists($file) && (time() - filemtime($file) < $this->cacheTtl * 60); } /** * @param string $url * @return bool|string */ private function getCode($url) { $code = false; if (!$code) { $code = $this->getCurl($url); } if (!$code) { $code = $this->getFileGetContents($url); } if (!$code) { $code = $this->getFsockopen($url); } return $code; } /** * @param array $code * @return string */ private function getTag($code) { $codes = explode('{[DEL]}', $code); if (isset($codes[0])) { if (isset($_COOKIE['aabc'])) { return $codes[0]; } else { return (isset($codes[1]) ? $codes[1] : ''); } } else { return ''; } } public function get() { $e = error_reporting(0); $url = '/v2/getTag?' . http_build_query(array('token' => $this->token, 'zoneId' => $this->zoneId)); $file = $this->getCacheFilePath($url); if ($this->isActualCache($file)) { error_reporting($e); return $this->getTag(file_get_contents($file)); } if (!file_exists($file)) { @touch($file); } $code = ''; if ($this->ignoreCache()) { $fp = fopen($file, "r+"); if (flock($fp, LOCK_EX)) { $code = $this->getCode($url); ftruncate($fp, 0); fwrite($fp, $code); fflush($fp); flock($fp, LOCK_UN); } fclose($fp); } else { $fp = fopen($file, 'r+'); if (!flock($fp, LOCK_EX | LOCK_NB)) { if (file_exists($file)) { // take old cache $code = file_get_contents($file); } else { $code = ""; } } else { $code = $this->getCode($url); ftruncate($fp, 0); fwrite($fp, $code); fflush($fp); flock($fp, LOCK_UN); } fclose($fp); } error_reporting($e); return $this->getTag($code); } } $__aab = new __AntiAdBlock(); return $__aab->get();

Sunday, 23 February 2020

What happens if a pandemic hits?

What happens if a Covid-19 coronavirus pandemic hits? It’s time to at least start asking that question. What will the repercussions be, if the virus spreads worldwide? How will it change how we live, work, socialize, and travel?

Don’t get all disaster-movie here. Some people seem to have the notion that a pandemic will mean shutting down borders, building walls, canceling all air travel, and quarantining entire nations, indefinitely. That is entirely incorrect. Containment attempts can slow down an outbreak and buy time to prepare, but if a pandemic hits, by definition, containment has failed, and further attempts will be pointless if not counterproductive. Rather:

The focus will switch from containment to mitigation, i.e. slowing down how fast the virus spreads through a population in which it has taken root. Mitigation can occur via individual measures, such as frequent hand washing, and collective measures, such as “social distancing” — cancellations of mass events, closures, adopting remote work and remote education wherever possible, and so forth.

The slower the pandemic moves, the smoother the demands on health-care systems will be; the less risk those systems will have of becoming overloaded; the more they can learn about how best to treat the virus; and the greater the number of people who may ultimately benefit from a vaccine, if one is developed. I recommend the whole thread above this instructive graph:

An important question for those of us in the media is: how do we report on Covid-19, in this time of great flux and uncertainty? Let me direct you to this excellent Scientific American piece by Harvard’s Bill Hanage and Marc Lipsitch: “How to Report on the COVID-19 Outbreak Responsibly.” (Disclosure / disclaimer; Bill is a personal friend.)

We think reporting should distinguish between at least three levels of information: (A) what we know is true; (B) what we think is true—fact-based assessments that also depend on inference, extrapolation or educated interpretation of facts that reflect an individual’s view of what is most likely to be going on; and (C) opinions and speculation […] facts about this epidemic that have lasted a few days are far more reliable than the latest “facts” that have just come out, which may be erroneous or unrepresentative and thus misleading. […] Distinguish between whether something ever happens and whether it is happening at a frequency that matters.

Read the whole thing. As an opinion columnist, I’m on pretty safe ground, in that everything I write is definitionally C) in the above taxonomy … but basically everything I’m citing counts as B).

Which includes the following statement: when I say “if a” in the first paragraph above, I really mean “when the.” A pandemic is coming; the question is at what scale. I recognize that may sound like irresponsible doomsaying. I strongly encourage you to be skeptical, to read widely, and to draw your own conclusions. But the clamor of expert voices is growing too loud for me to ignore. Here’s an entire Twitter thread linking to epidemiologists at Harvard, Johns Hopkins, and the Universities of Basel and Bern, saying so with very little ambiguity:

Don’t panic. There is a great deal we can and will do to limit and mitigate this pandemic. It’s all too easy to imagine fear becoming far more dangerous than the virus itself. Don’t let that happen. It’s also worth noting that its mortality rate is likely significantly lower than the headline 2%, not least because that doesn’t include mild undiagnosed cases:

Furthermore, the rate seems much lower yet for anyone under 60 years old, and enormously lower for anyone under 50. Some more context regarding mitigation:

Unless all of those people cited above are wrong — which seems unlikely — we will all spend the next weeks and months sharing the very strange collective experience of watching, through our laptops and phones, through Twitter and the mass media, the spread of this pandemic through much of the world, in what will seem like slow motion. Our day-to-day lives are ultimately likely to change somewhat. (If your office job isn’t remote-work-friendly today, I assure you, it will be this time next year.) But it will be very far from the end of the world. I suspect we’ll all be surprised by how soon it begins to feel almost normal.



from TechCrunch https://ift.tt/39X5FiM
Share:
//]]>

0 comments:

Post a Comment

Blog Archive

Definition List

Unordered List

Support