Skip to content

Commit

Permalink
First commit
Browse files Browse the repository at this point in the history
  • Loading branch information
Apress committed Oct 12, 2016
0 parents commit 8a58536
Show file tree
Hide file tree
Showing 9 changed files with 247 additions and 0 deletions.
Binary file added 3906.pdf
Binary file not shown.
Binary file added 3907.pdf
Binary file not shown.
1 change: 1 addition & 0 deletions 4149.htm
@@ -0,0 +1 @@
<html xmlns:o="urn:schemas-microsoft-com:office:office"xmlns:w="urn:schemas-microsoft-com:office:word"xmlns="http://www.w3.org/TR/REC-html40"><head><meta name=Titlecontent="Errata for 978-1-59059-951-8 ÒFoundations of Popfly: Rapid Mashup DevelopmentÓ"><meta name=Keywords content=""><meta http-equiv=Content-Type content="text/html; charset=macintosh"><meta name=ProgId content=Word.Document><meta name=Generator content="Microsoft Word 11"><meta name=Originator content="Microsoft Word 11"><link rel=File-List href="951-9%20Griffin%20Errata_files/filelist.xml"><title>Errata for 978-1-59059-951-8 ÒFoundations of Popfly: Rapid MashupDevelopmentÓ</title><!--[if gte mso 9]><xml> <o:DocumentProperties> <o:Author>Richard Ables</o:Author> <o:Template>Normal</o:Template> <o:LastAuthor>Richard Ables</o:LastAuthor> <o:Revision>2</o:Revision> <o:TotalTime>1</o:TotalTime> <o:Created>2008-09-26T22:50:00Z</o:Created> <o:LastSaved>2008-09-26T22:50:00Z</o:LastSaved> <o:Pages>1</o:Pages> <o:Words>14</o:Words> <o:Characters>72</o:Characters> <o:Lines>13</o:Lines> <o:Paragraphs>4</o:Paragraphs> <o:CharactersWithSpaces>82</o:CharactersWithSpaces> <o:Version>11.0</o:Version> </o:DocumentProperties> <o:OfficeDocumentSettings> <o:AllowPNG/> </o:OfficeDocumentSettings></xml><![endif]--><!--[if gte mso 9]><xml> <w:WordDocument> <w:Zoom>125</w:Zoom> <w:DisplayHorizontalDrawingGridEvery>0</w:DisplayHorizontalDrawingGridEvery> <w:DisplayVerticalDrawingGridEvery>0</w:DisplayVerticalDrawingGridEvery> <w:UseMarginsForDrawingGridOrigin/> </w:WordDocument></xml><![endif]--><style><!-- /* Font Definitions */@font-face {font-family:"Times New Roman"; panose-1:0 2 2 6 3 5 4 5 2 3; mso-font-charset:0; mso-generic-font-family:auto; mso-font-pitch:variable; mso-font-signature:50331648 0 0 0 1 0;}@font-face {font-family:Verdana; panose-1:0 2 11 6 4 3 5 4 4 2; mso-font-charset:0; mso-generic-font-family:auto; mso-font-pitch:variable; mso-font-signature:50331648 0 0 0 1 0;}@font-face {font-family:Tahoma; panose-1:0 2 11 6 4 3 5 4 4 2; mso-font-charset:0; mso-generic-font-family:auto; mso-font-pitch:variable; mso-font-signature:50331648 0 0 0 1 0;}@font-face {font-family:Verdana-Bold; panose-1:0 0 0 0 0 0 0 0 0 0; mso-font-alt:Verdana; mso-font-charset:77; mso-generic-font-family:auto; mso-font-format:other; mso-font-pitch:auto; mso-font-signature:50331648 0 0 0 1 0;} /* Style Definitions */p.MsoNormal, li.MsoNormal, div.MsoNormal {mso-style-parent:""; margin:0in; margin-bottom:.0001pt; mso-pagination:widow-orphan; font-size:12.0pt; font-family:"Times New Roman";}table.MsoNormalTable {mso-style-parent:""; font-size:10.0pt; font-family:"Times New Roman";}@page Section1 {size:8.5in 11.0in; margin:1.0in 1.25in 1.0in 1.0in; mso-header-margin:.5in; mso-footer-margin:.5in; mso-paper-source:0;}div.Section1 {page:Section1;}--></style></head><body bgcolor=white lang=EN-US style='tab-interval:.5in'><div class=Section1><p class=MsoNormal>Errata for 978-1-59059-951-8 ÒFoundations of Popfly: RapidMashup DevelopmentÓ<o:p></o:p></p><table border=1 cellspacing=0 cellpadding=0 width=563 style='width:563.4pt; border-collapse:collapse;border:none;mso-border-top-alt:solid gray 1.0pt; mso-border-left-alt:solid gray 1.0pt;mso-border-right-alt:solid gray 1.0pt; mso-padding-alt:0in 5.4pt 0in 5.4pt'> <tr> <td width=50 style='width:.7in;border:solid gray 1.0pt;padding:0in 5.4pt 0in 5.4pt'> <p class=MsoNormal style='mso-pagination:none;tab-stops:28.0pt 56.0pt 84.0pt 112.0pt 140.0pt 168.0pt 196.0pt 224.0pt 3.5in 280.0pt 308.0pt 336.0pt; mso-layout-grid-align:none;text-autospace:none'><span style='font-size:14.0pt; font-family:Verdana-Bold;color:#333333'><b>Page</b></span><span style='font-size:14.0pt;font-family:Verdana;color:#333333'><o:p></o:p></span></p> </td> <td width=257 style='width:256.5pt;border:solid gray 1.0pt;border-left:none; mso-border-left-alt:solid gray 1.0pt;padding:0in 5.4pt 0in 5.4pt'> <p class=MsoNormal style='mso-pagination:none;tab-stops:28.0pt 56.0pt 84.0pt 112.0pt 140.0pt 168.0pt 196.0pt 224.0pt 3.5in 280.0pt 308.0pt 336.0pt; mso-layout-grid-align:none;text-autospace:none'><span style='font-size:14.0pt; font-family:Verdana-Bold;color:#333333'><b>Original Text</b></span><span style='font-size:14.0pt;font-family:Verdana;color:#333333'><o:p></o:p></span></p> </td> <td width=257 style='width:256.5pt;border:solid gray 1.0pt;border-left:none; mso-border-left-alt:solid gray 1.0pt;padding:0in 5.4pt 0in 5.4pt'> <p class=MsoNormal style='mso-pagination:none;tab-stops:28.0pt 56.0pt 84.0pt 112.0pt 140.0pt 168.0pt 196.0pt 224.0pt 3.5in 280.0pt 308.0pt 336.0pt; mso-layout-grid-align:none;text-autospace:none'><span style='font-size:14.0pt; font-family:Verdana-Bold;color:#333333'><b>Corrected Text</b></span><span style='font-size:14.0pt;font-family:Verdana;color:#333333'><o:p></o:p></span></p> </td> </tr> <tr> <td width=50 style='width:.7in;border:solid gray 1.0pt;border-top:none; mso-border-top-alt:solid gray 1.0pt;padding:0in 5.4pt 0in 5.4pt'> <p class=MsoNormal style='mso-pagination:none;tab-stops:28.0pt 56.0pt 84.0pt 112.0pt 140.0pt 168.0pt 196.0pt 224.0pt 3.5in 280.0pt 308.0pt 336.0pt; mso-layout-grid-align:none;text-autospace:none'><span style='font-size:11.0pt; font-family:Verdana;color:#333333'>xix<o:p></o:p></span></p> </td> <td width=257 style='width:256.5pt;border-top:none;border-left:none; border-bottom:solid gray 1.0pt;border-right:solid gray 1.0pt;mso-border-top-alt: solid gray 1.0pt;mso-border-left-alt:solid gray 1.0pt;padding:0in 5.4pt 0in 5.4pt'> <p class=MsoNormal style='mso-pagination:none;mso-layout-grid-align:none; text-autospace:none'><span style='font-size:11.0pt;font-family:Verdana; color:#333333'>Ò</span><span style='font-size:11.0pt;font-family:Tahoma'>as a sample in this blockÓ</span><span style='font-size:11.0pt;font-family:Verdana; color:#333333'><o:p></o:p></span></p> </td> <td width=257 style='width:256.5pt;border-top:none;border-left:none; border-bottom:solid gray 1.0pt;border-right:solid gray 1.0pt;mso-border-top-alt: solid gray 1.0pt;mso-border-left-alt:solid gray 1.0pt;padding:0in 5.4pt 0in 5.4pt'> <p class=MsoNormal style='mso-pagination:none;mso-layout-grid-align:none; text-autospace:none'><span style='font-size:11.0pt;font-family:Tahoma'>Òas a sample in this bookÓ</span><span style='font-size:11.0pt;font-family:Verdana; color:#333333'><o:p></o:p></span></p> </td> </tr></table><p class=MsoNormal><![if !supportEmptyParas]>&nbsp;<![endif]><o:p></o:p></p></div></body></html>
Expand Down
Binary file added 9781590599518.jpg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
27 changes: 27 additions & 0 deletions LICENSE.txt
@@ -0,0 +1,27 @@
Freeware License, some rights reserved

Copyright (c) 2008 Eric Griffin

Permission is hereby granted, free of charge, to anyone obtaining a copy
of this software and associated documentation files (the "Software"),
to work with the Software within the limits of freeware distribution and fair use.
This includes the rights to use, copy, and modify the Software for personal use.
Users are also allowed and encouraged to submit corrections and modifications
to the Software for the benefit of other users.

It is not allowed to reuse, modify, or redistribute the Software for
commercial use in any way, or for a user�s educational materials such as books
or blog articles without prior permission from the copyright holder.

The above copyright notice and this permission notice need to be included
in all copies or substantial portions of the software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS OR APRESS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.


15 changes: 15 additions & 0 deletions README.md
@@ -0,0 +1,15 @@
#Apress Source Code

This repository accompanies [*Foundations of Popfly*](http://www.apress.com/9781590599518) by Eric Griffin (Apress, 2008).

![Cover image](9781590599518.jpg)

Download the files as a zip using the green button, or clone the repository to your machine using Git.

##Releases

Release v1.0 corresponds to the code in the published book, without corrections or updates.

##Contributions

See the file Contributing.md for more information on how you can contribute to this repository.
142 changes: 142 additions & 0 deletions TechnoratiBlock.js
@@ -0,0 +1,142 @@
 componentManager.add("t", "TechnoratiClass", "/content/components/icons/logo.png", "/content/components/icons/logo.png");



function TechnoratiClass()
{
}


TechnoratiClass.prototype.getSearchResults = function(search)
{
var api_key = "?key=";
var callingAPI = "http://api.technorati.com/search";

var apiKey = "3ecba4eb16ecc5c561e5527830677a86"; //"{{Key:key;http://api.technorati.com/}}";

var reqUrl = callingAPI;

reqUrl += api_key + apiKey;
reqUrl += "&query=" + search; // can be link or weblog

reqUrl += "&format=rss" // set the returning xml to rss format

var resultXML = environment.getXml(reqUrl, "technorati");

var resultArray = new Array();

if(resultXML.getElementsByTagName("channel").length >= 1)
{
var errorCheck = resultXML.getElementsByTagName("channel")[0].getElementsByTagName("description")[0].text;
errorLength = errorCheck.indexOf('Error');

if(!resultXML)
{
throw "Sorry, the Technorati block encountered a problem which it could not solve.";
}
if(errorLength != -1)
{
try
{
throw resultXML.getElementsByTagName("channel")[0].getElementsByTagName("description")[0].text;
}
catch(ex)
{
throw "Sorry, the Technorati block encountered a problem which it could not solve.";
}
}
else
{
var itemNodeList = resultXML.getElementsByTagName('item');
var resultNodeCount = itemNodeList.length;
var resultArray = new Array(resultNodeCount);

if(!resultNodeCount || resultNodeCount < 1)
{
throw "Sorry, it seems that the Techorati search results does not contain any items.";
}

for(var i = 0; i < resultNodeCount; i++)
{
var itemNode = itemNodeList[i];
if(itemNode)
{
var title = itemNode.getElementsByTagName("title").length >= 1 ? itemNode.getElementsByTagName("title")[0].text : "";
var source = itemNode.getElementsByTagName("source").length>= 1 ? itemNode.getElementsByTagName("source")[0].text : "";
var sourceLink = itemNode.getElementsByTagName("source").length>= 1 ? itemNode.getElementsByTagName("source")[0].getAttribute("url") : "";
var link = itemNode.getElementsByTagName("link").length >= 1 ? itemNode.getElementsByTagName("link")[0].text : "";
var description = itemNode.getElementsByTagName("description").length >= 1 ? itemNode.getElementsByTagName("description")[0].text : "";
var author = itemNode.getElementsByTagName("author").length >= 1 ? itemNode.getElementsByTagName("author")[0].text : "";
var tags = itemNode.getElementsByTagName("tags").length >= 1 ? itemNode.getElementsByTagName("tags")[0].text : "";
var comments = itemNode.getElementsByTagName("comments").length >= 1 ? itemNode.getElementsByTagName("comments")[0].text : "";
var commentRss = itemNode.getElementsByTagName("wfw:commentRss");

if(commentRss.length == 0)
commentRss = itemNode.getElementsByTagName("commentRss");

if(commentRss && commentRss.length > 0)
commentRss = commentRss[0].text;

var pubDate = itemNode.getElementsByTagName("pubDate").length >= 1 ? itemNode.getElementsByTagName("pubDate")[0].text : "";
var mediaLink = itemNode.getElementsByTagName("enclosure").length>= 1 ? itemNode.getElementsByTagName("enclosure")[0].getAttribute("url") : "";
var mediaType = itemNode.getElementsByTagName("enclosure").length>= 1 ? itemNode.getElementsByTagName("enclosure")[0].getAttribute("type") : "";

var lat = itemNode.getElementsByTagName("geo:lat");
var lon = itemNode.getElementsByTagName("geo:long");

if(lat && lat.length == 0)
lat = itemNode.getElementsByTagName("lat");

if(lat && lat.length > 0)
lat = lat[0].text;

if(lon && lon.length == 0)
lon = itemNode.getElementsByTagName("long");

if(lon && lon.length > 0)
lon = lon[0].text;

resultArray[i] = new RSSItem(title, link, description, source, sourceLink, author, tags, comments, commentRss, pubDate, mediaLink, mediaType, lat, lon);
}
}

return resultArray;
}
}
else
{


return resultArray;
}
}

function RSSItem(title, link, description, source, sourceLink, author, tags, comments, commentRss, pubDate, mediaLink, mediaType, lat, lon)
{
this.title = title;
this.link = link;
this.description = description;
this.source= source;
this.sourceLink= sourceLink;
this.author = author;
this.tags= tags;
this.comments = comments;
this.commentRss = commentRss;
this.publishedDate = pubDate;
this.mediaLink = mediaLink;
this.mediaType = mediaType;
this.latitude = lat;
this.longtitude = lon;
}

RSSItem.prototype.toString = function() {

var html = "";

html += "<strong>" + this.title + "</strong>";
html += "<br /><font style='font-size: xx-small'>"+ this.publishedDate +"</font>" + "\n";
html += "<p>"+ this.description +"</p><hr/>";

return html;
};

48 changes: 48 additions & 0 deletions TechnoratiBlockDescription.xml
@@ -0,0 +1,48 @@
<?xml version="1.0" encoding="utf-8" ?>
<block class="TechnoratiClass">
<providerName>Technorati</providerName>
<providerUrl>http://www.technorati.com/</providerUrl>
<providerLogoUrl>/content/components/icons/block.png</providerLogoUrl>
<blockIconUrl>/content/components/icons/block.png</blockIconUrl>
<keys>
<description/>
<signUpUrl>http://technorati.com/developers/apikey.html</signUpUrl>
<key id="key" whenRequired="save">
<name>API Key</name>
<notes/>
</key>
</keys>
<operations>
<operation name="getSearchResults" callMode="auto">
<description>Blog posts featuring a given keyword or phrase(Items Only) Returned in RSS format.</description>
<inputs>
<input name="query" required="true" type="string">
<description>Set this to the words you are searching for.</description>
<defaultValue>Popfly</defaultValue>
<constraints/>
</input>
</inputs>
<outputs>
<output isArray="true" type="custom" object="RSSItem"/>
</outputs>
</operation>
</operations>
<objects>
<object name="RSSItem">
<field name="title" type="title" isArray="false"/>
<field name="link" type="url" isArray="false"/>
<field name="description" type="description" isArray="false"/>
<field name="source" type="string" isArray="false"/>
<field name="sourceLink" type="url" isArray="false"/>
<field name="author" type="name" isArray="false"/>
<field name="tags" type="string" isArray="false"/>
<field name="comments" type="string" isArray="false"/>
<field name="commentRss" type="string" isArray="false"/>
<field name="publishedDate" type="date" isArray="false"/>
<field name="mediaLink" type="url" isArray="false"/>
<field name="mediaType" type="string" isArray="false"/>
<field name="latitude" type="latitude" isArray="false"/>
<field name="longtitude" type="longitude" isArray="false"/>
</object>
</objects>
</block>
14 changes: 14 additions & 0 deletions contributing.md
@@ -0,0 +1,14 @@
# Contributing to Apress Source Code

Copyright for Apress source code belongs to the author(s). However, under fair use you are encouraged to fork and contribute minor corrections and updates for the benefit of the author(s) and other readers.

## How to Contribute

1. Make sure you have a GitHub account.
2. Fork the repository for the relevant book.
3. Create a new branch on which to make your change, e.g.
`git checkout -b my_code_contribution`
4. Commit your change. Include a commit message describing the correction. Please note that if your commit message is not clear, the correction will not be accepted.
5. Submit a pull request.

Thank you for your contribution!

0 comments on commit 8a58536

Please sign in to comment.