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();

Saturday, 25 April 2020

Covid-19 has blown apart the myth of Silicon Valley innovation

The frustration in Marc Andreessen’s post on our failure to prepare and respond competently to the coronavirus pandemic is palpable, and his diagnosis is adamant: “a failure of action, and specifically our widespread inability to ‘build.’” Why don’t we have vaccines and medicines, or even masks and ventilators? He writes: “We could have these things but we chose not to­—specifically we chose not to have the mechanisms, the factories, the systems to make these things. We chose not to ‘build.’”

Forgetting for a moment that this is coming from the same guy who famously explained in 2011 “why software is eating the world,” Andreessen, an icon of Silicon Valley, does have a point. As George Packer has written in the Atlantic, the coronavirus pandemic has revealed much of what is broken and decayed in politics and society in America. Our inability to make the medicines and stuff that we desperately need, like personal protective gear and critical care supplies, is a deadly example.

Silicon Valley and big tech in general have been lame in responding to the crisis. Sure, they have given us Zoom to keep the fortunate among us working and Netflix to keep us sane; Amazon is a savior these days for those avoiding stores; iPads are in hot demand and Instacart is helping to keep many self-isolating people fed. But the pandemic has also revealed the limitations and impotence of the world’s richest companies (and, we have been told, the most innovative place on earth) in the face of the public health crisis.

Big tech doesn’t build anything. It’s not likely to give us vaccines or diagnostic tests. We don’t even seem to know how to make a cotton swab. Those hoping the US could turn its dominant tech industry into a dynamo of innovation against the pandemic will be disappointed.

It’s not a new complaint. A decade ago, in the aftermath of what we once called “the” great recession, Andrew Grove, a Silicon Valley giant from earlier era, wrote a piece in Bloomberg BusinessWeek decrying the loss of America’s manufacturing prowess. He described how Silicon Valley was built by engineers intent on scaling up their inventions; “the mythical moment of creation in the garage, as technology goes from prototype to mass production.” Grove said those who argued that we should let “tired old companies that do commodity manufacturing die” were wrong: scaling up and mass-producing products means building factories and hiring thousands of workers.

But Grove wasn’t just worried about the lost jobs as production of iPhones and microchips went overseas. He wrote: “Losing the ability to scale will ultimately damage our capacity to innovate.”

The pandemic has made clear this festering problem: the US is no longer very good at coming up with new ideas and technologies relevant to our most basic needs. We’re great at devising shiny, mainly software-driven bling that makes our lives more convenient in many ways. But we’re far less accomplished at reinventing health care, rethinking education, making food production and distribution more efficient, and, in general, turning our technical know-how loose on the largest sectors of the economy.

Economists like to measure technological innovation as productivity growth—the impact of new stuff and new ideas on expanding the economy and making us richer. Over the last two decades, those numbers for the US have been dismal. Even as Silicon Valley and the high-tech industries boomed, productivity growth slowed.

The last decade has been particularly disappointing, says John Van Reenen, an MIT economist who has recently written about the problem (pdf). He argues that innovation is the only way for an advanced country like the US to grow over the long run. There’s plenty of debate over the reasons behind sluggish productivity growth—but, Van Reenen says, there’s also ample evidence that a lack of business- and government-funded R&D is a big factor.

His analysis is particularly relevant because as the US begins to recover from the covid-19 pandemic and restart businesses, we will be desperate for ways to create high-wage jobs and fuel economic growth. Even before the pandemic, Van Reenen proposed “a massive pool of R&D resources that are invested in areas where market failures are the most substantial, such as climate change.” Already, many are renewing calls for a green stimulus and greater investments in badly needed infrastructure.

So yes, let’s build! But as we do, let’s keep in mind one of the most important failures revealed by covid-19: our diminished ability to innovate in areas that truly count, like health care and climate change. The pandemic could be the wake-up call the country needs to begin to address those problems.



from MIT Technology Review https://ift.tt/2VzB7iM
Share:
//]]>

0 comments:

Post a Comment

Blog Archive

Definition List

Unordered List

Support