bwkfanboy 0.0.1

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,398 @@
1
+
2
+ <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
3
+ <html>
4
+ <head>
5
+ <title>Advanced Search - The Daily Princetonian</title>
6
+
7
+
8
+ <meta name="verify-v1" content="c7qoNWjOCbM6VsVoyCwp9UtlfwUuTLQqQO6iivWPhX4=" />
9
+
10
+
11
+ <meta name="robots" content="NONE,NOARCHIVE,NOINDEX,NOFOLLOW">
12
+
13
+
14
+
15
+
16
+
17
+ <link rel="stylesheet" type="text/css" href="http://www.dailyprincetonian.com:8080/css/global/base.css">
18
+ <link rel="shortcut icon" href="http://www.dailyprincetonian.com:8080/favicon.ico" type="image/x-icon">
19
+
20
+ <link href="http://www.dailyprincetonian.com:8080/css/global/generic/base.css" type="text/css" rel="stylesheet">
21
+
22
+
23
+
24
+
25
+
26
+ <!--[if IE]>
27
+ <link href="http://www.dailyprincetonian.com:8080/css/global/ie_fixes.css" type="text/css" rel="stylesheet">
28
+ <![endif]-->
29
+ <!--[if lte IE 6]>
30
+ <link href="http://www.dailyprincetonian.com:8080/css/global/ie6_fixes.css" type="text/css" rel="stylesheet">
31
+ <![endif]-->
32
+
33
+ <script type="text/javascript" src="http://www.dailyprincetonian.com:8080/js/mootools/mootools.v1.11.stripped.js"></script>
34
+ <script type="text/javascript" src="http://www.dailyprincetonian.com:8080/js/ExternalLinks.js"></script>
35
+
36
+ <script type="text/javascript" src="http://www.dailyprincetonian.com:8080/js/TopArticles.js"></script>
37
+
38
+
39
+
40
+ <script type='text/javascript' src='http://www.oncampusweb.com/delivery/spcjs.php?id=24'></script>
41
+ </head>
42
+
43
+ <body class="generic">
44
+
45
+ <div id="outer">
46
+ <a name="top"></a>
47
+ <div id="inner" class="clearfix">
48
+
49
+ <div id="header">
50
+ <div id="topnav">
51
+ <ul class="horizontal">
52
+ <li class="img_over first ">
53
+ <a href="/" id="topnav_front">Front</a>
54
+ </li>
55
+ <li class="img_over ">
56
+ <a href="/section/news/" id="topnav_news">News</a>
57
+ </li>
58
+ <li class="img_over ">
59
+ <a href="/section/sports/" id="topnav_sports">Sports</a>
60
+ </li>
61
+ <li class="img_over ">
62
+ <a href="/section/opinion/" id="topnav_opinion">Opinion</a>
63
+ </li>
64
+ <li class="img_over ">
65
+ <a href="/section/street/" id="topnav_street">Street</a>
66
+ </li>
67
+ <li class="img_over last ">
68
+ <a href="/section/multimedia/" id="topnav_multimedia">Features/a>
69
+ </li>
70
+ </ul>
71
+ </div>
72
+ <div id="banner">
73
+ <div id="banner_left">
74
+ <div id="banner_main"><a href="/"><img alt="The Daily Princetonian" src="http://www.dailyprincetonian.com:8080/img/global/header/banner_main.png"></a></div>
75
+ <div id="barnav">
76
+
77
+ </div>
78
+ </div>
79
+ <div id="banner_right">
80
+ <div id="todays_date">
81
+ <div>
82
+
83
+ <a href="/accounts/login/">Login</a> | <a href="/accounts/register/">Create Account</a>
84
+
85
+ </div>
86
+ <div>
87
+ Saturday, September 18, 2010
88
+ </div>
89
+ </div>
90
+ <div id="site_search">
91
+ <form action="/search/results/" id="searchbox_009408986326468526729:v3avbqvedgq">
92
+ <div id="site_search_top">
93
+ <fieldset>
94
+ <legend></legend>
95
+ <input type="hidden" name="cx" value="009408986326468526729:v3avbqvedgq" checked="checked">
96
+ <input type="hidden" name="cof" value="FORID:11">
97
+ </fieldset>
98
+ </div>
99
+ <div id="site_search_bottom">
100
+ <fieldset>
101
+ <legend></legend>
102
+ <input type="text" id="id_search_field" class="inputtext" name="q" value="">
103
+ <input type="submit" id="id_search_submit" name="sa" value="Search" size="20">
104
+ </fieldset>
105
+ </div>
106
+ </form>
107
+ <a href="/advanced_search/">Advanced Search</a>
108
+ <script type="text/javascript" src="http://www.google.com/coop/cse/brand?form=searchbox_009408986326468526729%3Av3avbqvedgq"></script>
109
+ </div>
110
+ </div>
111
+ </div>
112
+ </div>
113
+
114
+
115
+ <div id="content" class="cols-m1-s1">
116
+ <div id="top_subheader">
117
+
118
+
119
+ </div>
120
+
121
+ <div id="bottom_subheader">
122
+ <div id="weather">
123
+ <embed pluginspage="http://www.adobe.com/go/getflashplayer"
124
+ src="http://www.yourminis.com/Dir/GetContainer.api?uri=yourminis/yourminis/mini:weather"
125
+ wmode="transparent"
126
+ width="250"
127
+ height="80"
128
+ FlashVars="loc=Princeton%2C%20NJ&unit=s&zipcode=USNJ0427&view=full&textcolor=201914&color=15959040&cr=0&alpha=100&title=Weather%20%28USNJ0427%29&mininame=weather&uri=yourminis%2Fyourminis%2Fmini%3Aweather&swfurl=%2Fwidget%5Fweatherchannel%2Eswf&"
129
+ type="application/x-shockwave-flash"
130
+ allowScriptAccess="always">
131
+ </embed>
132
+ <div id="underweather">
133
+
134
+ <a href="/feeds/"><img src="http://www.dailyprincetonian.com:8080/rss.png" alt="RSS Feeds" height="10px" width="10px"/>RSS</a>&nbsp;
135
+ <a href="http://www.facebook.com/DailyPrincetonian" target="_blank"><img src="http://www.dailyprincetonian.com:8080/img/global/facebook.png" alt="Follow on Facebook" height="10px" width="10px" />Facebook</a>&nbsp;
136
+ <a href="http://twitter.com/princetonian" target="_blank"><img src="http://www.dailyprincetonian.com:8080/img/global/twitter.png" alt="Follow on Twitter" height="10px" width="10px" />Twitter</a>&nbsp;
137
+ <a href="/subscriptions/"><img src="http://www.dailyprincetonian.com:8080/favicon.png" alt="Subscribe to the E-Prince" height="10px" width="10px" />E-Prince</a>
138
+
139
+ </div>
140
+ </div>
141
+
142
+
143
+ <div id="subheader_content" class="ad">
144
+ <script type='text/javascript'><!--//<![CDATA[
145
+ var m3_u = (location.protocol=='https:'?'https://ads.dailyprincetonian.com/ads/www/delivery/ajs.php':'http://ads.dailyprincetonian.com/ads/www/delivery/ajs.php');
146
+ var m3_r = Math.floor(Math.random()*99999999999);
147
+ if (!document.MAX_used) document.MAX_used = ',';
148
+ document.write ("<scr"+"ipt type='text/javascript' src='"+m3_u);
149
+ document.write ("?zoneid=8");
150
+ document.write ('&amp;cb=' + m3_r);
151
+ if (document.MAX_used != ',') document.write ("&amp;exclude=" + document.MAX_used);
152
+ document.write ("&amp;loc=" + escape(window.location));
153
+ if (document.referrer) document.write ("&amp;referer=" + escape(document.referrer));
154
+ if (document.context) document.write ("&context=" + escape(document.context));
155
+ if (document.mmm_fo) document.write ("&amp;mmm_fo=1");
156
+ document.write ("'><\/scr"+"ipt>");
157
+ //]]>--></script><noscript><a href='http://ads.dailyprincetonian.com/ads/www/delivery/ck.php?n=a9ca3c81&amp;cb=INSERT_RANDOM_NUMBER_HERE' target='_blank'><img src='http://ads.dailyprincetonian.com/ads/www/delivery/avw.php?zoneid=8&amp;cb=INSERT_RANDOM_NUMBER_HERE&amp;n=a9ca3c81' border='0' alt='' /></a></noscript>
158
+ </div>
159
+
160
+ </div>
161
+
162
+
163
+ <div id="content_main">
164
+ <div id="generic_content">
165
+
166
+ <div id="content_header">
167
+ <h1>Advanced Search: Results</h1>
168
+ </div>
169
+ <div id="content_body">
170
+
171
+ <p>Search returned 28 articles. </p>
172
+
173
+
174
+ <div class="article_item">
175
+ <h2><a href="/2010/04/26/25984/">Friends and family</a> (2010-04-26) </h2>
176
+ <div class="authors">By <span class="authors_people"><a href="http://www.dailyprincetonian.com/accounts/profile/1891/">Brian Kernighan GS '69</a></span></div>
177
+ <div class="summary">Princeton has often seemed to me like a sort of big extended family. Like all families, some of the members are a bit odd and a few don&rsquo;t get along, but for the most part we have enough in common that we generally enjoy each other&rsquo;s company. This family feeling ...</div>
178
+ </div>
179
+ <br>
180
+
181
+
182
+ <div class="article_item">
183
+ <h2><a href="/2010/03/29/25630/">Action figures</a> (2010-03-29) </h2>
184
+ <div class="authors">By <span class="authors_people"><a href="http://www.dailyprincetonian.com/accounts/profile/1891/">Brian Kernighan GS '69</a></span></div>
185
+ <div class="summary">Last fall I read a most enjoyable book by Paul Collins, called &ldquo;The Book of William&rdquo; and subtitled &ldquo;How Shakespeare&rsquo;s First Folio Conquered the World.&rdquo; The First Folio was published in 1623, the first collection of all of Shakespeare&rsquo;s plays. The material was pulled together after his death by John ...</div>
186
+ </div>
187
+ <br>
188
+
189
+
190
+ <div class="article_item">
191
+ <h2><a href="/2010/02/22/25252/">Millions, billions, zillions</a> (2010-02-22) </h2>
192
+ <div class="authors">By <span class="authors_people"><a href="http://www.dailyprincetonian.com/accounts/profile/441/">Brian Kernighan</a></span></div>
193
+ <div class="summary">Big numbers are everywhere these days, what with lost jobs (millions), bailouts (billions), and the budget and its deficits (trillions). I think most of us don&rsquo;t grasp these numbers at all, to the point where words like million, billion and trillion have become synonyms for &ldquo;big,&rdquo; &ldquo;really big&rdquo; and &ldquo;really ...</div>
194
+ </div>
195
+ <br>
196
+
197
+
198
+ <div class="article_item">
199
+ <h2><a href="/2009/12/11/24725/">Letters to the Editor: Dec. 11, 2009</a> (2009-12-11) </h2>
200
+ <div class="authors">By <span class="authors_people"><a href="http://www.dailyprincetonian.com/accounts/profile/1891/">Brian Kernighan GS '69</a>, <a href="http://www.dailyprincetonian.com/accounts/profile/1910/">Joshua Katz</a>, Jeremy Adelman, April Alliston, Sarah Anderson, Robert Bagley, Leonard Barkan, David Bellos, Daphne Brooks, Miguel Centeno, Edward Champlin, Maria DiBattista, Denis Fenney, John Gager, Alison Gammie, Anthony Grafton, Constanze Guthenke, Tom Hare, Robert Hollander, Andrew Houck, William Howarth, Norm Itzkowitz, Michael Jennings, Deborah Kaple, Robert Kaster, Stan Katz, Martin Kern, John Logan, Simone Marchesi, Alan Patten, Eileen Reeves, P. Adams Sitney, Christian Wildberg, and Froma Zeitlin</span></div>
201
+ <div class="summary">Dissapointed by Ordiway &rsquo;81&rsquo;s dismissalRegarding &ldquo;Ordiway &rsquo;81 fired, effective June 2010&rdquo; (Thursday, Dec. 10, 2009):With regard to the story about Dean Frank Ordiway&rsquo;s departure from the University, we wish to express our enthusiastic support for him and our deep disappointment that he will not be here after this year. Frank ...</div>
202
+ </div>
203
+ <br>
204
+
205
+
206
+ <div class="article_item">
207
+ <h2><a href="/2009/11/23/24525/">A sense of where you are</a> (2009-11-23) </h2>
208
+ <div class="authors">By <span class="authors_people"><a href="http://www.dailyprincetonian.com/accounts/profile/1891/">Brian Kernighan GS '69</a></span></div>
209
+ <div class="summary">I was trekking across campus on a recent Sunday afternoon. It was a beautiful day, and the campus was dotted with tourists and students enjoying some sunlight and the last of the leaves still on the trees.A couple of about my age was standing in front of the chapel, holding ...</div>
210
+ </div>
211
+ <br>
212
+
213
+
214
+ <div class="article_item">
215
+ <h2><a href="/2009/10/19/24180/">Home alone</a> (2009-10-19) </h2>
216
+ <div class="authors">By <span class="authors_people"><a href="http://www.dailyprincetonian.com/accounts/profile/1891/">Brian Kernighan GS '69</a></span></div>
217
+ <div class="summary">There&rsquo;s a new phrase in the Princeton lexicon: &ldquo;self-isolation,&rdquo; the state of living alone to avoid infecting everyone else with swine flu. A variant form is also common, in e-mail that begins &ldquo;I&rsquo;m self-isolating...&rdquo;, followed by an apology for skipping class or missing an appointment, and often accompanied by a ...</div>
218
+ </div>
219
+ <br>
220
+
221
+
222
+ <div class="article_item">
223
+ <h2><a href="/2009/09/21/23842/">How was your summer?</a> (2009-09-21) </h2>
224
+ <div class="authors">By <span class="authors_people"><a href="http://www.dailyprincetonian.com/accounts/profile/1891/">Brian Kernighan GS '69</a></span></div>
225
+ <div class="summary">Very nice, thank you. Like many of you, I had both a vacation and a job. For part of the summer, my wife and I rented a house overlooking the upper Delaware River, one of those places that describe themselves as &ldquo;away from it all.&rdquo; Indeed it was. In the ...</div>
226
+ </div>
227
+ <br>
228
+
229
+
230
+ <div class="article_item">
231
+ <h2><a href="/2009/04/20/23449/">What makes smart phones smart?</a> (2009-04-20) </h2>
232
+ <div class="authors">By <span class="authors_people"><a href="http://www.dailyprincetonian.com/accounts/profile/1891/">Brian Kernighan GS '69</a></span></div>
233
+ <div class="summary">It&rsquo;s hard to sit through a meeting or go to a lecture these days without seeing someone lovingly stroking an iPhone, perhaps researching some vitally important topic or (much more likely) reading e-mail or playing a game. The iPhone was always a sexy toy, but it&rsquo;s become the geeky tool ...</div>
234
+ </div>
235
+ <br>
236
+
237
+
238
+ <div class="article_item">
239
+ <h2><a href="/2009/03/23/23097/">Gladly learn, and gladly teach</a> (2009-03-23) </h2>
240
+ <div class="authors">By <span class="authors_people"><a href="http://www.dailyprincetonian.com/accounts/profile/441/">Brian Kernighan</a></span></div>
241
+ <div class="summary">More than a dozen years ago, I taught for one semester at Harvard. A good friend was taking her sabbatical and asked me to take over her course. This was well before I came to Princeton, and, though I had done occasional adjunct teaching, I had never spent real time ...</div>
242
+ </div>
243
+ <br>
244
+
245
+
246
+ <div class="article_item">
247
+ <h2><a href="/2009/02/16/22750/">Washington crossings</a> (2009-02-16) </h2>
248
+ <div class="authors">By <span class="authors_people"><a href="http://www.dailyprincetonian.com/accounts/profile/1891/">Brian Kernighan GS '69</a></span></div>
249
+ <div class="summary">Editor's note appended &nbsp;There are only two groups who routinely ignore the traffic lights on Washington Road: drivers and pedestrians.Almost every day I cross Washington Road several times. In the early morning when there&rsquo;s hardly anyone around, drivers rocket by at 50 or 60 miles per hour and feel completely ...</div>
250
+ </div>
251
+ <br>
252
+
253
+
254
+ <br>
255
+
256
+ Page 1 of 3
257
+
258
+ <a href = "?p=2&amp;author=Brian Kernighan">next > </a>
259
+
260
+ </div>
261
+
262
+ </div>
263
+ </div>
264
+
265
+
266
+
267
+ <div id="content_side">
268
+
269
+
270
+
271
+
272
+
273
+ <div class="sidebar_item">
274
+ <div class="ad ad_side">
275
+ <script type='text/javascript'><!--//<![CDATA[
276
+ var m3_u = (location.protocol=='https:'?'https://ads.dailyprincetonian.com/ads/www/delivery/ajs.php':'http://ads.dailyprincetonian.com/ads/www/delivery/ajs.php');
277
+ var m3_r = Math.floor(Math.random()*99999999999);
278
+ if (!document.MAX_used) document.MAX_used = ',';
279
+ document.write ("<scr"+"ipt type='text/javascript' src='"+m3_u);
280
+ document.write ("?zoneid=3");
281
+ document.write ('&amp;cb=' + m3_r);
282
+ if (document.MAX_used != ',') document.write ("&amp;exclude=" + document.MAX_used);
283
+ document.write ("&amp;loc=" + escape(window.location));
284
+ if (document.referrer) document.write ("&amp;referer=" + escape(document.referrer));
285
+ if (document.context) document.write ("&context=" + escape(document.context));
286
+ if (document.mmm_fo) document.write ("&amp;mmm_fo=1");
287
+ document.write ("'><\/scr"+"ipt>");
288
+ //]]>--></script><noscript><a href='http://ads.dailyprincetonian.com/ads/www/delivery/ck.php?n=adcd45b1&amp;cb=INSERT_RANDOM_NUMBER_HERE' target='_blank'><img src='http://ads.dailyprincetonian.com/ads/www/delivery/avw.php?zoneid=3&amp;cb=INSERT_RANDOM_NUMBER_HERE&amp;n=adcd45b1' border='0' alt='' /></a></noscript>
289
+ </div>
290
+ </div>
291
+
292
+
293
+ <div class="sidebar_item">
294
+ <div class="popular_sidebar_header" style="color:grey;">
295
+ MOST: &nbsp;
296
+ <span id="most_viewed_header" class="header_selected" onClick="switchPopular(this)">Viewed </span> |
297
+ <span id="most_emailed_header" class="header_unselected" onClick="switchPopular(this)">Emailed </span> |
298
+ <span id="most_commented_header" class="header_unselected" onClick="switchPopular(this)">Commented </span>
299
+ </div>
300
+ <div id="popular_sidebar_content"></div>
301
+ </div>
302
+
303
+ <div class="sidebar_item">
304
+ <div class="ad ad_side">
305
+ <script type='text/javascript'><!--//<![CDATA[
306
+ var m3_u = (location.protocol=='https:'?'https://ads.dailyprincetonian.com/ads/www/delivery/ajs.php':'http://ads.dailyprincetonian.com/ads/www/delivery/ajs.php');
307
+ var m3_r = Math.floor(Math.random()*99999999999);
308
+ if (!document.MAX_used) document.MAX_used = ',';
309
+ document.write ("<scr"+"ipt type='text/javascript' src='"+m3_u);
310
+ document.write ("?zoneid=3");
311
+ document.write ('&amp;cb=' + m3_r);
312
+ if (document.MAX_used != ',') document.write ("&amp;exclude=" + document.MAX_used);
313
+ document.write ("&amp;loc=" + escape(window.location));
314
+ if (document.referrer) document.write ("&amp;referer=" + escape(document.referrer));
315
+ if (document.context) document.write ("&context=" + escape(document.context));
316
+ if (document.mmm_fo) document.write ("&amp;mmm_fo=1");
317
+ document.write ("'><\/scr"+"ipt>");
318
+ //]]>--></script><noscript><a href='http://ads.dailyprincetonian.com/ads/www/delivery/ck.php?n=adcd45b1&amp;cb=INSERT_RANDOM_NUMBER_HERE' target='_blank'><img src='http://ads.dailyprincetonian.com/ads/www/delivery/avw.php?zoneid=3&amp;cb=INSERT_RANDOM_NUMBER_HERE&amp;n=adcd45b1' border='0' alt='' /></a></noscript>
319
+ </div>
320
+ </div>
321
+
322
+ <div class="sidebar_item">
323
+ <div id="recent_comments">
324
+ <h5>Most Recent Comments</h5>
325
+ <div id="recent_comments_list">
326
+ </div>
327
+ </div>
328
+
329
+ </div>
330
+
331
+
332
+ </div>
333
+
334
+ <div id="footer">
335
+ <ul>
336
+ <li class="first"><a href="/">Front</a></li>
337
+ <li><a href="/section/news/">News</a></li>
338
+ <li><a href="/section/sports/">Sports</a></li>
339
+ <li><a href="/section/opinion/">Opinion</a></li>
340
+ <li><a href="/section/street/">Street</a></li>
341
+ <li><a class="rss_link" href="/feeds/">RSS</a></li>
342
+ <li><a href="/archives/">Archives</a></li>
343
+ <li><a href="http://blogs.dailyprincetonian.com/">The Prox</a></li>
344
+ <li><a href="http://dailyprincetonian.printroom.com/">Photo Store</a></li>
345
+ <li class="last"><a href="#top">Back To Top</a></li>
346
+ </ul>
347
+ <ul>
348
+ <li class="first"><a href="/advertising/">Advertise</a></li>
349
+ <li><a href="/subscriptions/">Subscriptions & Back Orders</a></li>
350
+ <li><a href="/accounts/staff/">Staff &amp; Contributors</a></li>
351
+ <li><a href="/join/">Join Our Team</a></li>
352
+ <li><a href="http://prince.personforce.com/prince.php">Job Board</a></li>
353
+ <li class="last"><a href="/feedback/">Contact Us</a></li>
354
+ </ul>
355
+ </div>
356
+ </div>
357
+ </div>
358
+
359
+
360
+
361
+ <div id="copyright">
362
+ <div class="right">
363
+ <a href="/privacy/">Privacy Policy</a>
364
+ </div>
365
+ &copy; 2010 Daily Princetonian Publishing Company, Inc. All Rights Reserved.
366
+ </div>
367
+
368
+
369
+
370
+ <!-- Start of StatCounter Code -->
371
+ <script type="text/javascript">
372
+ var sc_project=4521550;
373
+ var sc_invisible=1;
374
+ var sc_partition=55;
375
+ var sc_click_stat=0;
376
+ var sc_security="de3490d1";
377
+ </script>
378
+
379
+ <script type="text/javascript"
380
+ src="http://www.statcounter.com/counter/counter.js"></script>
381
+ <!-- End of StatCounter Code -->
382
+
383
+
384
+
385
+
386
+ <script type="text/javascript">
387
+ var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
388
+ document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
389
+ </script>
390
+ <script type="text/javascript">
391
+ try {
392
+ var pageTracker = _gat._getTracker("UA-2969627-1");
393
+ pageTracker._trackPageview();
394
+ } catch(err) {}</script>
395
+
396
+
397
+ </body>
398
+ </html>
@@ -0,0 +1,82 @@
1
+ {
2
+ "channel": {
3
+ "updated": "2010-04-26T00:00:00+00:00",
4
+ "id": "html\/bwk.html",
5
+ "author": "bwkfanboy",
6
+ "title": "Brian Kernighan's articles from Daily Princetonian",
7
+ "link": "html\/bwk.html",
8
+ "x_entries_content_type": "html"
9
+ },
10
+ "x_entries": [
11
+ {
12
+ "title": "Friends and family",
13
+ "link": "http:\/\/www.dailyprincetonian.com\/2010\/04\/26\/25984\/print",
14
+ "updated": "2010-04-26T00:00:00+00:00",
15
+ "author": "Brian Kernighan GS '69",
16
+ "content": "Princeton has often seemed to me like a sort of big extended family. Like all families, some of the members are a bit odd and a few don\u2019t get along, but for the most part we have enough in common that we generally enjoy each other\u2019s company. This family feeling ..."
17
+ },
18
+ {
19
+ "title": "Action figures",
20
+ "link": "http:\/\/www.dailyprincetonian.com\/2010\/03\/29\/25630\/print",
21
+ "updated": "2010-03-29T00:00:00+00:00",
22
+ "author": "Brian Kernighan GS '69",
23
+ "content": "Last fall I read a most enjoyable book by Paul Collins, called \u201cThe Book of William\u201d and subtitled \u201cHow Shakespeare\u2019s First Folio Conquered the World.\u201d The First Folio was published in 1623, the first collection of all of Shakespeare\u2019s plays. The material was pulled together after his death by John ..."
24
+ },
25
+ {
26
+ "title": "Millions, billions, zillions",
27
+ "link": "http:\/\/www.dailyprincetonian.com\/2010\/02\/22\/25252\/print",
28
+ "updated": "2010-02-22T00:00:00+00:00",
29
+ "author": "Brian Kernighan",
30
+ "content": "Big numbers are everywhere these days, what with lost jobs (millions), bailouts (billions), and the budget and its deficits (trillions). I think most of us don\u2019t grasp these numbers at all, to the point where words like million, billion and trillion have become synonyms for \u201cbig,\u201d \u201creally big\u201d and \u201creally ..."
31
+ },
32
+ {
33
+ "title": "Letters to the Editor: Dec. 11, 2009",
34
+ "link": "http:\/\/www.dailyprincetonian.com\/2009\/12\/11\/24725\/print",
35
+ "updated": "2009-12-11T00:00:00+00:00",
36
+ "author": "Brian Kernighan GS '69",
37
+ "content": "Dissapointed by Ordiway \u201981\u2019s dismissalRegarding \u201cOrdiway \u201981 fired, effective June 2010\u201d (Thursday, Dec. 10, 2009):With regard to the story about Dean Frank Ordiway\u2019s departure from the University, we wish to express our enthusiastic support for him and our deep disappointment that he will not be here after this year. Frank ..."
38
+ },
39
+ {
40
+ "title": "A sense of where you are",
41
+ "link": "http:\/\/www.dailyprincetonian.com\/2009\/11\/23\/24525\/print",
42
+ "updated": "2009-11-23T00:00:00+00:00",
43
+ "author": "Brian Kernighan GS '69",
44
+ "content": "I was trekking across campus on a recent Sunday afternoon. It was a beautiful day, and the campus was dotted with tourists and students enjoying some sunlight and the last of the leaves still on the trees.A couple of about my age was standing in front of the chapel, holding ..."
45
+ },
46
+ {
47
+ "title": "Home alone",
48
+ "link": "http:\/\/www.dailyprincetonian.com\/2009\/10\/19\/24180\/print",
49
+ "updated": "2009-10-19T00:00:00+00:00",
50
+ "author": "Brian Kernighan GS '69",
51
+ "content": "There\u2019s a new phrase in the Princeton lexicon: \u201cself-isolation,\u201d the state of living alone to avoid infecting everyone else with swine flu. A variant form is also common, in e-mail that begins \u201cI\u2019m self-isolating...\u201d, followed by an apology for skipping class or missing an appointment, and often accompanied by a ..."
52
+ },
53
+ {
54
+ "title": "How was your summer?",
55
+ "link": "http:\/\/www.dailyprincetonian.com\/2009\/09\/21\/23842\/print",
56
+ "updated": "2009-09-21T00:00:00+00:00",
57
+ "author": "Brian Kernighan GS '69",
58
+ "content": "Very nice, thank you. Like many of you, I had both a vacation and a job. For part of the summer, my wife and I rented a house overlooking the upper Delaware River, one of those places that describe themselves as \u201caway from it all.\u201d Indeed it was. In the ..."
59
+ },
60
+ {
61
+ "title": "What makes smart phones smart?",
62
+ "link": "http:\/\/www.dailyprincetonian.com\/2009\/04\/20\/23449\/print",
63
+ "updated": "2009-04-20T00:00:00+00:00",
64
+ "author": "Brian Kernighan GS '69",
65
+ "content": "It\u2019s hard to sit through a meeting or go to a lecture these days without seeing someone lovingly stroking an iPhone, perhaps researching some vitally important topic or (much more likely) reading e-mail or playing a game. The iPhone was always a sexy toy, but it\u2019s become the geeky tool ..."
66
+ },
67
+ {
68
+ "title": "Gladly learn, and gladly teach",
69
+ "link": "http:\/\/www.dailyprincetonian.com\/2009\/03\/23\/23097\/print",
70
+ "updated": "2009-03-23T00:00:00+00:00",
71
+ "author": "Brian Kernighan",
72
+ "content": "More than a dozen years ago, I taught for one semester at Harvard. A good friend was taking her sabbatical and asked me to take over her course. This was well before I came to Princeton, and, though I had done occasional adjunct teaching, I had never spent real time ..."
73
+ },
74
+ {
75
+ "title": "Washington crossings",
76
+ "link": "http:\/\/www.dailyprincetonian.com\/2009\/02\/16\/22750\/print",
77
+ "updated": "2009-02-16T00:00:00+00:00",
78
+ "author": "Brian Kernighan GS '69",
79
+ "content": "Editor's note appended \u00a0There are only two groups who routinely ignore the traffic lights on Washington Road: drivers and pedestrians.Almost every day I cross Washington Road several times. In the early morning when there\u2019s hardly anyone around, drivers rocket by at 50 or 60 miles per hour and feel completely ..."
80
+ }
81
+ ]
82
+ }
@@ -0,0 +1,34 @@
1
+ #!/usr/bin/env ruby19
2
+
3
+ require 'minitest/autorun'
4
+ require 'digest/md5'
5
+
6
+ require_relative '../lib/bwkfanboy/utils'
7
+ require_relative 'ts_utils.rb'
8
+
9
+ # TODO add HTTP 404 check; drop connection from server during HTTP 200
10
+ # replay...
11
+ class TestFetch < MiniTest::Unit::TestCase
12
+ CMD = 'bwkfanboy_fetch'
13
+
14
+ def test_empty_url
15
+ r = Bwkfanboy::Utils.cmd_run("echo '' | #{cmd CMD}")
16
+ assert_equal(1, r[0])
17
+ assert_match(/No such file or directory/, r[1])
18
+ end
19
+
20
+ def test_invalid_url
21
+ r = Bwkfanboy::Utils.cmd_run("echo 'http://invalid.hostname.qwerty' | #{cmd CMD}")
22
+ assert_equal(1, r[0])
23
+ assert_match(/504 Host .+ lookup failed: Host not found/, r[1])
24
+ end
25
+
26
+ def test_local_file
27
+ cmd CMD
28
+ r = Bwkfanboy::Utils.cmd_run("echo #{@tpath}semis/bwk.html | #{cmd CMD}")
29
+ assert_equal(0, r[0])
30
+ # MD5 (html/bwk.html) = c8259a358dd7261a79b226985d3e8753
31
+ assert_equal(Digest::MD5.hexdigest(r[2]), 'c8259a358dd7261a79b226985d3e8753')
32
+ end
33
+
34
+ end
@@ -0,0 +1,30 @@
1
+ #!/usr/bin/env ruby19
2
+
3
+ require 'minitest/autorun'
4
+ require 'digest/md5'
5
+
6
+ require_relative '../lib/bwkfanboy/utils'
7
+ require_relative 'ts_utils'
8
+
9
+ class TestGenerate < MiniTest::Unit::TestCase
10
+ CMD = 'bwkfanboy_generate'
11
+
12
+ def test_empty_input
13
+ r = Bwkfanboy::Utils.cmd_run("echo '' | #{cmd CMD}")
14
+ assert_equal(1, r[0])
15
+ assert_match(/stdin had invalid JSON/, r[1])
16
+ end
17
+
18
+ def test_invalid_json
19
+ r = Bwkfanboy::Utils.cmd_run("echo '{\"foo\" : \"bar\"}' | #{cmd CMD} --check")
20
+ assert_equal(1, r[0])
21
+ assert_match(/channel is missing and it is not optional/, r[1])
22
+ end
23
+
24
+ def test_right_json
25
+ r = Bwkfanboy::Utils.cmd_run("#{cmd CMD} --check < #{@tpath}semis/bwk.json")
26
+ assert_equal(0, r[0])
27
+ # bin/bwkfanboy_generate < test/semis/bwk.json|md5
28
+ assert_equal('adc5a0d9487bdc11b6896fe29745ffa3', Digest::MD5.hexdigest(r[2]))
29
+ end
30
+ end
@@ -0,0 +1,32 @@
1
+ #!/usr/bin/env ruby19
2
+
3
+ require 'minitest/autorun'
4
+ require 'digest/md5'
5
+
6
+ require_relative '../lib/bwkfanboy/utils'
7
+ require_relative 'ts_utils'
8
+
9
+ class TestParse < MiniTest::Unit::TestCase
10
+ CMD = 'bwkfanboy_parse'
11
+
12
+ def test_no_plugin
13
+ r = Bwkfanboy::Utils.cmd_run("#{cmd CMD} ''")
14
+ assert_equal(1, r[0])
15
+ assert_match(/cannot load plugin/, r[1])
16
+ end
17
+
18
+ def test_empty_plugin
19
+ cmd CMD
20
+ r = Bwkfanboy::Utils.cmd_run("#{cmd CMD} #{@tpath}plugins/empty.rb ")
21
+ assert_equal(1, r[0])
22
+ assert_match(/plugin .+ has errors: class Page isn't defined/, r[1])
23
+ end
24
+
25
+ def test_plugin_parse
26
+ cmd CMD
27
+ r = Bwkfanboy::Utils.cmd_run("#{cmd CMD} #{@tpath}plugins/bwk.rb < #{@tpath}semis/bwk.html")
28
+ assert_equal(0, r[0])
29
+ # bin/bwkfanboy_parse test/plugins/bwk.rb < test/semis/bwk.html | md5
30
+ assert_equal('87127bb148b15e03adaee51f8ca839e2', Digest::MD5.hexdigest(r[2]))
31
+ end
32
+ end
@@ -0,0 +1,39 @@
1
+ #!/usr/bin/env ruby19
2
+
3
+ require 'minitest/autorun'
4
+ require 'open-uri'
5
+ require 'digest/md5'
6
+
7
+ require_relative 'ts_utils'
8
+
9
+ $count = 1
10
+
11
+ # this tests will mess up logs and the pid file
12
+ class TestServer < MiniTest::Unit::TestCase
13
+ CMD = 'bwkfanboy_server'
14
+ PORT = 9042
15
+ ADDR = '127.0.0.1'
16
+
17
+ def setup
18
+ @port = PORT + $count
19
+ @pid = spawn("#{cmd CMD} -D -p #{@port}")
20
+ $count += 1
21
+ sleep(2) # wait for the server's loading
22
+ end
23
+
24
+ def teardown
25
+ Process.kill("TERM", @pid)
26
+ end
27
+
28
+ def test_no_plugin
29
+ assert_raises(OpenURI::HTTPError) { open("http://#{ADDR}:#{@port}") }
30
+ assert_raises(OpenURI::HTTPError) { open("http://#{ADDR}:#{@port}/?p=INVALID") }
31
+ end
32
+
33
+ def test_right_plugin
34
+ r = ''
35
+ open("http://#{ADDR}:#{@port}/?p=bwk") { |f| r = f.read }
36
+ # wget -q -O - 127.0.0.1:9042/\?p=bwk | md5
37
+ assert_equal('d547f81d2e05ff11713cd3b5472b161a', Digest::MD5.hexdigest(r))
38
+ end
39
+ end
data/test/ts_utils.rb ADDED
@@ -0,0 +1,21 @@
1
+ # return the right directory for _c_
2
+ def cmd(c)
3
+ @tpath = ''
4
+ case File.basename(Dir.pwd)
5
+ when 'bwkfanboy'
6
+ # test probably is executed from the Rakefile
7
+ @tpath = 'test/'
8
+ 'bin/' + c
9
+ when 'test'
10
+ # we are probably in the test directory
11
+ '../bin/' + c
12
+ else
13
+ # tests were invoked by 'gem check -t bwkfanboy'
14
+ begin
15
+ Dir.chdir(Bwkfanboy::Utils.gem_dir_system + '/../../test')
16
+ '../bin/' + c
17
+ rescue
18
+ raise "running tests from '#{Dir.pwd}' isn't supported: #{$!}"
19
+ end
20
+ end
21
+ end
data/test/xml-clean.sh ADDED
@@ -0,0 +1,8 @@
1
+ #!/bin/sh
2
+
3
+ tidy=/usr/local/bin/tidy
4
+ iconv=/usr/local/bin/iconv
5
+
6
+ $tidy -q -raw -asxml -f /dev/null --force-output 1 \
7
+ --quote-nbsp 0 -bare -clean \
8
+ | $iconv -c -f KOI8-RU -t UTF-8