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

UNIQef022d2070aaad98-rss-00000000-QINU UNIQef022d2070aaad98-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>

Google Tests A Software That Judges Hollywood's Portrayal of Women

Mon, 29 Aug 2016 01:30:00

Slashdot reader theodp writes: Aside from it being hosted in a town without a movie theater, the 2016 Bentonville Film Festival was also unusual in that it required all entrants to submit "film scripts and downloadable versions of the film" for judgment by "the team at Google and USC", apparently part of a larger Google-funded research project with USC Engineering "to develop a computer science tool that could quickly and efficiently assess how women are represented in films"... Fest reports noted that representatives of Google and the White House Office of Science and Technology Policy appeared in a "Reel vs. Real Diversity" panel presentation at the fest, where the importance of diversity and science to President Obama were discussed, and the lack of qualified people to fill 500,000 U.S. tech jobs was blamed in part on how STEM careers have been presented in film and television... In a 2015 report on a Google-sponsored USC Viterbi School of Engineering MacGyver-themed event to promote women in engineering, USC reported that President Obama was kept briefed on efforts to challenge media's stereotypical portrayals of women. As for its own track record, Google recently updated its Diversity page, boasting that "21% of new hires in 2015 were women in tech, compared to 19% of our current population"....

Share on Google+


Read more of this story at Slashdot.

How G.E. Is Transforming Into An IoT Start-Up

Sun, 28 Aug 2016 23:00:00

Slashdot reader mspohr shares an article about "General Electric 're-inventing' itself as a software start-up." Jeffrey R. Immelt, the CEO of America's largest manufacturer, describes how he realized that data collected from their machines -- like turbines, engines, and medical-imaging equipment -- could be as valuable as the machines themselves. Now G.E. is hiring software engineers and data scientists from Amazon, Apple, Facebook and Google to try to transform the company into a "124-year-old startup" to take advantage of the Internet of Things and offer futuristic new services like predictive maintenance. The Times calls it "the next battlefield as companies fight to develop the dominant software layer that connects the machines," adding that by 2020 there will be 100 times as much data flowing from G.E.'s machines. Now G.E. Digital is using the open source PaaS, Cloud Foundry, to develop Predix, a cloud-based operating system for industrial applications like monitoring and adjusting equipment in the field, whether it's an oil-field rig or a wind-farm turbine. To help transform the company into a digital powerhouse, they're building a 1,400-employee complex in San Ramon, California "designed to suit the free-range working ways of software developers: open-plan floors, bench seating, whiteboards, couches for impromptu meetings, balconies overlooking the grounds and kitchen areas with snacks." And they've also launched the Industrial Dojo program "to accelerate the ability for developers to contribute code that enables the Industrial Internet".

Share on Google+


Read more of this story at Slashdot.

Recent College Grads Aim To Land A Robot On The Moon

Sun, 28 Aug 2016 21:50:00

Sunday the Indian Space Research Organization successfully test-launched a scramjet rocket, propelled by "an air-breathing propulsion system which uses hydrogen as fuel and oxygen from the atmosphere air as the oxidizer" rather than carrying a tank of liquid oxygen. "if the need for liquid oxygen is taken away, the space craft can be much lighter, hence cheaper to launch," notes one newspaper, adding that India is only the fourth country to flight-test a scramjet engine after the U.S., Russia and the European Space Agency.

But in addition, 15 former ISRO scientists are now helping Team Indus, one of the 16 teams remaining in Google's $30 million Lunar XPRIZE competition, who will use ISRO's polar satellite launch vehicle to send their spacecraft to the moon. GillBates0 writes: An official designated as "Skywalker", said that such space missions used to be limited to extremely elite people and PhDs in the past. That stereotype is now breaking. "I was just a college student a couple of years ago and now I am working on an actual space mission, how cool is that," said Karan Vaish, 23, who is helping the team to design the lunar rover. Eighty per cent of the team is reported to be less than five years out of college.

Share on Google+


Read more of this story at Slashdot.

Ask Slashdot: What's The Best Way To Backup Large Amounts Of Personal Data?

Sun, 28 Aug 2016 20:50:00

An anonymous Slashdot reader has "approximately two terabytes of photos, currently sitting on two 4-terabyte 'Intel Rapid Storage' RAID 1 disks." But now they're considering three alternatives after moving to a new PC:

a) Keep these exactly as they are... The current configuration is OK, but it's a pain if a RAID re-sync is needed as it takes a long time to check four terabytes. b) Move to "Storage Spaces". I've not used Storage Spaces before, but reports seem to show it's good... It's a Good Thing that the disks are 100% identical and removable and readable separately. Downside? Unknown territory. c) Break the RAID, and set up the second disk as a file-copied backup... [This] would lose a (small) amount of resilience, but wouldn't suffer from the RAID-sync issues, ideally a Mac-like "TimeMachine" backup would handle file histories. Any recommendations?

This is also a good time to share your experiences with Storage Spaces, so leave your answers in the comments. What's the best way to backup large amounts of personal data?

Share on Google+


Read more of this story at Slashdot.

Welcome To 1986: Inside 'Halt And Catch Fire's' High-Tech Time Machine

Sun, 28 Aug 2016 19:50:00

The third season of AMC's technology drama "Halt and Catch Fire" painstakingly recreated Silicon Valley and San Francisco in 1986. Long-time Slashdot reader harrymcc shares his first-person report:

The new episodes...are rich with carefully-researched plot points, dialogue, and sets full of vintage technology (including a startup equipped with real Commodore 64s and a recreated IBM mainframe). I visited the soundstage in Atlanta where the producers have recreated Northern California in the 1980s, and spoke with the show's creators and stars about the loving attention they devote to getting things right.

Harry argues that the show "is in part about how we got from the past to the present," and writes that he saw several 5 1/4-inch floppy disks "including Memorex, 3M, and BASF FlexyDisk," plus "a manual for Frogger for the Atari 2600, a copy of a spreadsheet program known as MicroPro CalcStar...and countless other little pieces of history."

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;
}

?>