Template:Mainpage-rssfeeds

From NAS-Central Buffalo - The Linkstation Wiki
Revision as of 16:20, 29 July 2006 by Ramuk (Talk | contribs) (RSS-Feed Mediawiki extension)

Jump to: navigation, search

UNIQ298b8c092e358d7c-rss-00000000-QINU UNIQ298b8c092e358d7c-rss-00000001-QINU

GISWiki/RSS

Uses an extension from: http://meta.wikimedia.org/wiki/GISWiki/RSS


RSS-Feed Mediawiki extension

  • original by mutante 25.03.2005
  • extended by Duesentrieb 30.04.2005
  • extended by Rdb78 07.07.2005
  • extended by Mafs 10.07.2005, 24.07.2005
  • extended by User:Arcy 07.09.2005
  • Updated for MediaWiki 1.6 by User:piku 13.06.2006
  • Update for Wikicode output, by User:cogdog 14.jul.2006

Requires:

Installation:

  • put this file (rss.php) into the extension directory of your mediawiki installation
  • add the following to the end of LocalSettings.php: include("extensions/rss.php");
  • make sure magpie can be found by PHP.

Usage:

Use one section between <rss>-tags for each feed. The rss section may contain parameters separated by a pipe ("|"), just like links and templates. These parameters are supported:

  • charset=... The charset used by the feed. iconv is used to convert this.
  • short Do not show the description text for each news item.
  • max=x Shows x most recent headlines.
  • highlight= term1 term2 The terms separated by a space are highlighted.
  • filter= term1 term2 Show only rss items containing at least one of the terms.
  • reverse display the rss items in reverse order.
  • title=x display an alternative title instead of chanel name.
  • title = none dont display any title.

Example:

<rss>http://slashdot.org/slashdot.rss|charset=UTF-8|short|max=5</rss>

Scientists Consider 'Cloud Brightening' To Preserve Australia's Great Barrier Reef

Sun, 23 Apr 2017 23:44:00

An anonymous reader quotes MIT Technology Review:

A group of Australian marine scientists believe that altering clouds might offer one of the best hopes for saving the Great Barrier Reef. For the last six months, researchers at the Sydney Institute of Marine Science and the University of Sydney School of Geosciences have been meeting regularly to explore the possibility of making low-lying clouds off the northeastern coast of Australia more reflective in order to cool the waters surrounding the world's biggest coral reef system... Last year, as El Nino events cranked up ocean temperatures, at least 20% of the reef died and more than 90% of it was damaged. The Australian researchers took a hard look at a number of potential ways to preserve the reefs. But at this point, making clouds more reflective looks like the most feasible way to protect an ecosystem that stretches across more than 130,000 square miles, says Daniel Harrison, a postdoctoral research associate with the Ocean Technology Group at the University of Sydney. Cloud brightening is the only thing we've identified that's scalable, sensible, and relatively environmentally benign," he says... Next month, he plans to start computer climate modeling to explore whether cloud brightening could make a big enough temperature difference to help.

They're collaborating with Silicon Valley's Marine Cloud Brightening Project, which has spent the last seven years "developing a nozzle that they believe can spray salt particles of just the right size and quantity to alter the clouds. They're attempting to raise several million dollars to build full-scale sprayers." The article describes them as "one of several research groups that have started to explore whether cloud brightening, generally discussed as a potential tool to alter the climate as a whole, could be applied in more targeted ways."

Share on Google+


Read more of this story at Slashdot.

Is Social Media Making Us Hate Each Other?

Sun, 23 Apr 2017 22:44:00

Nicholas Carr's book The Shallows: What the Internet Is Doing to Our Brains was a finalist for the 2011 Pulitzer Prize. Now an anonymous Slashdot reader reports on Carr's newest warning:

It seems obvious: The more we learn about other people, the more we'll come to like them. The assumption underpins our deep-seated belief that communication networks, from the telephone system to Facebook, will help create social harmony. But what if the opposite is true? In a Boston Globe article, Nicholas Carr presents evidence showing that as we get more information about other people, we tend to like them less, not more. Through a phenomenon called "dissimilarity cascades," we place greater stress on personal and cultural differences than on similarities, and the bias strengthens as information accumulates. "Proximity makes differences stand out," he writes. The phenomenon intensifies online, where people are rewarded for sharing endless information about themselves. What the research indicates, warns Carr, is that the spread of social media is more likely to create social strife than social harmony.

The article concludes by opposing the idea that "If we get the engineering right, our better angels will triumph. It's a pleasant thought, but it's a fantasy... Technology is an amplifier. It magnifies our best traits, and it magnifies our worst. What it doesn't do is make us better people. That's a job we can't offload on machines."

Share on Google+


Read more of this story at Slashdot.

Uber Tried To Hide Its Secret IPhone Fingerprinting From Apple

Sun, 23 Apr 2017 21:44:00

theodp quotes today's New York Times profile of Uber CEO Travis Kalanick:

For months, Mr. Kalanick had pulled a fast one on Apple by directing his employees to help camouflage the ride-hailing app from Apple's engineers. The reason? So Apple would not find out that Uber had secretly been tracking iPhones even after its app had been deleted from the devices, violating Apple's privacy guidelines. Uber told TechCrunch this afternoon that it still uses a form of this device fingerprinting, saying they need a way to identify those devices which committed fraud in the past -- especially in China, where Uber drivers used stolen iPhones to request dozens of rides from themselves to increase their pay rate. It's been modified to comply with Apple's rules, and "We absolutely do not track individual users or their location if they've deleted the app..." an Uber spokesperson said. "Being able to recognize known bad actors when they try to get back onto our network is an important security measure for both Uber and our users."

The article offers a longer biography of Kalanick, who dropped out of UCLA in 1998 to start a peer-to-peer music-sharing service named Scour. (The service eventually declared bankruptcy after being sued for $250 billion for alleged copyright infringement.) Desperately trying to save his next company, Kalanick "took the tax dollars from employee paychecks -- which are supposed to be withheld and sent to the Internal Revenue Service," according to the Times, "and reinvested the money into the start-up, even as friends and advisers warned him the action was potentially illegal." The money eventually reached the IRS as he "staved off bankruptcy for a second time by raising another round of funding." But the article ultimately argues that Kalanick's drive to win in life "has led to a pattern of risk-taking that has put his ride-hailing company on the brink of implosion."

Share on Google+


Read more of this story at Slashdot.

Companies Are Paying Millions For White Hat Hacking

Sun, 23 Apr 2017 20:34:00

White hat hackers "are in very high demand," says PwC's director of cyber investigation and breach response, in a New York Post article titled "Companies are paying millions to get hacked -- on purpose." An anonymous reader quotes their report:

HackerOne, a San Francisco-based "vulnerability coordination and bug bounty platform," reports that it has some 800 corporate customers who paid out more than $15 million in bonuses to white-hat hackers since its founding in 2012. Most of that bounty was paid in the past two years, as companies have become more aware of their cyber vulnerabilities. Clients that have used the platform include General Motors, Uber, Twitter, Starbucks and even the US Department of Defense.

Google paid $3 million last year through its own bounty program, according to HackerOne's CEO Marten Micko, who touts his company's "turn-key" solution -- a platform which now offers the services of 100,000 ethical (and vetted) hackers. "With a diverse group, all types of vulnerabilities can be found," Micko told TechRepublic. "This is a corollary to the 'given enough eyeballs' wisdom... they find them faster than other solutions, the hunting is ongoing and not happening at just one time, and the cost is a tenth of what it would be with other methods." And one of the platform's white hat hackers has already earned over $600,000 in just two years.

Share on Google+


Read more of this story at Slashdot.

Startup Still Working On 'Immortal Avatars' That Will Live Forever

Sun, 23 Apr 2017 19:34:00

Startup Eternime, founded by MIT fellow Marius Ursache, is still working on "immortal avatars" that, after your death, will continue interacting with your loves ones from beyond the grave. An anonymous reader quotes CNET:

Give Eternime access to your social media profiles and the startup's algorithms will scrape your posts and interactions to build a profile... The algorithms will study your memories and mannerisms. They'll learn how to be "you"... Eternime was announced in 2014 after Ursache developed the idea during the MIT Entrepreneurship Development Program. He wasn't entirely sure if he should develop the project further and wanted to get a sense of public reaction.

In the first four days, 3,000 people signed up at Eterni.me, the company's website, for a private beta. Then, Urasche received an email from a man dying of terminal cancer. "Eternime, he wrote, was the last chance to leave something behind for friends and family," Urasche told me. "That was the moment I decided that this was something worth dedicating my life to"... Since 2014, the Eternime website has largely been silent, although it continues to take names of people who want to test the service. Ursache says the Eternime team has been refining the product over the last two years, testing features, figuring out what will work and what won't.

"The private beta test is ongoing," according to the article, "and Ursache says the feedback has been positive." But unfortunately, the service still isn't operational yet.

Share on Google+


Read more of this story at Slashdot.


<?php
# RSS-Feed Mediawiki extension
# 
# original by mutante 25.03.2005
# extended by Duesentrieb 30.04.2005
# extended by Rdb78 07.07.2005
# extended by Mafs  10.07.2005, 24.07.2005
# extended by User:Arcy  07.09.2005
# Updated for MediaWiki 1.6 by User:piku 13.06.2006
# Update for Wikicode output, by User:cogdog 14.jul.2006
#
# Requires: 
#  * magpie rss parser <http://magpierss.sourceforge.net/>
#  * iconv <http://www.gnu.org/software/libiconv/>, see also <http://www.php.net/iconv>
#
# Installation:
#  * put this file (rss.php) into the extension directory of your mediawiki installation 
#  * add the following to the end of LocalSettings.php: include("extensions/rss.php");
#  * make sure magpie can be found by PHP.
#
# Usage:
#  Use one section between <rss>-tags for each feed. The rss section may contain parameters
#  separated by a pipe ("|"), just like links and templates. These parameters are supported:
#
#    * charset=...             The charset used by the feed. iconv is used to convert this.
#    * short                   Do not show the description text for each news item.
#    * max=x                   Shows x most recent headlines.
#    * highlight= term1 term2  The terms separated by a space are highlighted.
#    * filter= term1 term2     Show only rss items containing at least one of the terms.
#    * reverse                 display the rss items in reverse order.
#    * title=x                 display an alternative title instead of chanel name.
#    * title = none            dont display any title.
#
# Example: 
#    <rss>http://slashdot.org/slashdot.rss|charset=UTF-8|short|max=5</rss>
#

#change this according to your magpie installation!
require_once('rss_fetch.inc'); 

#install extension hook
$wgExtensionFunctions[] = "wfRssExtension"; 

#extension hook callback function
function wfRssExtension() { 
  global $wgParser;

  #install parser hook for <rss> tags
  $wgParser->setHook( "rss", "renderRss" );
}

#parser hook callback function
function renderRss($input, $argv, $parser = null) {
  if (!$parser) $parser =& $GLOBALS['wgParser'];
  global $wgOutputEncoding;

  $DefaultEncoding = "ISO-8859-1";
  $DisableCache = true;

  # $input = mysql_escape_string($input);

  if (!$input) return ""; #if <rss>-section is empty, return nothing

  #parse fields in rss-section
  $fields= explode("|",$input);
  $url= @$fields[0];

  $args= array();
  for ($i=1; $i<sizeof($fields); $i++) {
    $f= $fields[$i];

    if (strpos($f,"=")===False) $args[strtolower(trim($f))]= False;
    else {
      list($k,$v)= explode("=",$f,2);
      if (trim($v)==False) $args[strtolower(trim($k))] = False; 
      else $args[strtolower(trim($k))]= trim($v);
    }
  }

  #get charset from argument-array    
  $charset= @$args["charset"];
  if (!$charset) $charset= $DefaultEncoding;

  #get max number of headlines from argument-array
  $maxheads = @$args["max"];
  $headcnt = 0;

  #get short-flag from argument-array
  #if short is set, no description text is printed
  if (isset($args["short"])) $short = True; else $short = False;

  #get reverse-flag from argument-array
  if (isset($args["reverse"])) $reverse = True; else $reverse = False;

  #get highlight terms from argument-array    
  $rssHighlight= @$args["highlight"];
  $rssHighlight= str_replace("  "," ", $rssHighlight);
  $rssHighlight= explode(" ", trim($rssHighlight));

  #get filter terms from argument-array    
  $rssFilter= @$args["filter"];
  $rssFilter= str_replace("  "," ", $rssFilter);
  $rssFilter= explode(" ", trim($rssFilter));    

  #fetch rss. may be cached locally.
  #Refer to the documentation of magpie for details.
  $rss = @fetch_rss($url);


  #check for errors.
  if ($rss->ERROR) {
     # return "Feed error"; #localize...
      #return "<div>Failed to load RSS feed from $url: ".$rss->ERROR."</div>"; #localize...
  }

  if (!is_array($rss->items)) {
     # return "Feed error"; #localize...
      #return "<div>Failed to load RSS feed from $url!</div>"; #localize...
  }

  #Bild title line    
  #get title from argument-array    
  
  $rssTitle= @$args["title"];
  $rssTitle= trim($rssTitle);

  if ($rssTitle !=='none') {
    if ($rssTitle=='') {
        $title= iconv($charset,$wgOutputEncoding,$rss->channel['title']);
        if ($rss->channel['link']) $title= "[".$rss->channel['link']." $title]";
        $output = "=== $title ===\n";
    }
    else
    {
      $title= "[".$rss->channel['link']." $rssTitle]";
      $output="=== $title ===\n";
    }
  } else {
      $output="\n\n\n";
  }
  
  if ($reverse) $rss->items = array_reverse($rss->items);

  $description = False; 
  foreach ($rss->items as $item) {
      if ($item['description']) {$description = True; break;}
  }

  #Bild items
  if (!$short and $description) { #full item list

    $output.="";
    foreach ($rss->items as $item) {

      $d_text = true;
      $d_title = true;

      $href = trim(iconv($charset,$wgOutputEncoding,$item['link']));
      $title = trim(iconv($charset,$wgOutputEncoding,$item['title']));

      $d_title = wfRssFilter ($title, $rssFilter);
      $title= wfRssHighlight($title, $rssHighlight);

      #bild description text if desired
      if ($item["description"]) {
        $text= trim(iconv($charset,$wgOutputEncoding,$item['description']));

        #avoid pre-tags
        $text= str_replace("\r"," ",$text);
        $text= str_replace("\n"," ",$text);
        $text= str_replace("\t"," ",$text);

        $d_text = wfRssFilter ($text, $rssFilter);
        $text= wfRssHighlight($text, $rssHighlight);

        $display = $d_text or $d_title;

      }
        else   {
          $text = "";
          $display = $d_title;
        }       

      if ($display) {
        $output.="* [$href $title]";
        if ($text) $output.="<br>$text";
        $output .= "\n";
      }

    #Cut off output when maxheads is reached:
    if (++$headcnt == $maxheads)  break;

    }
    # $output.="</dl>";
  }
  else { #short item list
   #  $output.="<ul>";
    foreach ($rss->items as $item) {
      $href = trim(iconv($charset,$wgOutputEncoding,$item['link']));
      $title = trim(iconv($charset,$wgOutputEncoding,$item['title']));

        $d_title = wfRssFilter ($title, $rssFilter);
        $title= wfRssHighlight($title, $rssHighlight);

        if ($d_title ) $output.="* [$href $title]\n";

      #Cut off output when maxheads is reached:
      if (++$headcnt == $maxheads)  break;
    }
    # $output.="</ul>";
  }


  if ($DisableCache) {

    global $wgVersion;

    # Do not cache this wiki page.
    # for details see http://public.kitware.com/Wiki/User:Barre/MediaWiki/Extensions
    global $wgTitle, $wgDBprefix;
    $ts = mktime();
    $now = gmdate("YmdHis", $ts + 120);
    $ns = $wgTitle->getNamespace();
    $ti = wfStrencode($wgTitle->getDBkey());

    $version = preg_replace("/^([1-9]).([1-9]).*/", "\\1\\2", $wgVersion);
    if ($version>14) $sql = "UPDATE $wgDBprefix"."page SET page_touched='$now' WHERE page_namespace=$ns AND page_title='$ti'";
    else             $sql = "UPDATE $wgDBprefix"."cur SET cur_touched='$now' WHERE cur_namespace=$ns AND cur_title='$ti'";

    wfQuery($sql, DB_WRITE, "");
  }

  $out = $parser->parse ($output, $parser->mTitle,$parser->mOptions, true, false);
  return $out->getText();
}


function wfRssFilter ($text, $rssFilter) {

  $display = true;

  if (is_array($rssFilter)) {
    foreach($rssFilter as $term) {

      if ($term) {
        $display = false;
        if (preg_match("|$term|i", $text, $a))  {  $display = true; return $display; }
      }
    if ($display) break;
    }
  }
  return $display;
}


function wfRssHighlight($text, $rssHighlight) {

  $i=0;
  $starttag = "v8x5u3t3u8h";
  $endtag   = "q8n4f6n4n4x";

  $color[]="coral";
  $color[]="greenyellow";
  $color[]="lightskyblue";
  $color[]="gold";
  $color[]="violet";

  $count_color = count($color);

  if (is_array($rssHighlight)) {
    foreach($rssHighlight as $term) {
      if ($term) {
        $text = preg_replace("|\b(\w*?".$term."\w*?)\b|i", "$starttag"."_".$i."\\1$endtag", $text);
        $i++;
        if ($i == $count_color) $i=0;
        }
      }
    }
  # to avoid trouble should someone wants to highlight the terms "span", "style", ...
  for ($i=0; $i<5; $i++) {
    $text = preg_replace("|$starttag"."_".$i."|", "<span style=\"background-color:".$color[$i]."; font-weight: bold;\">", $text);
    $text = preg_replace("|$endtag|", "</span>", $text);
    }

  return $text;
}

?>